From e2b37ddfb4d532e83f286d78e8135256cfe6218b Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Tue, 20 Feb 2024 14:38:48 +0100 Subject: [PATCH 01/63] fix(assets): fix typo in Verlaufsskizze --- src/assets/data/edition/series/1/section/5/op25/graph.json | 2 +- .../data/edition/series/1/section/5/op25/textcritics.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/assets/data/edition/series/1/section/5/op25/graph.json b/src/assets/data/edition/series/1/section/5/op25/graph.json index 8105b8fcab..b537cc4d43 100644 --- a/src/assets/data/edition/series/1/section/5/op25/graph.json +++ b/src/assets/data/edition/series/1/section/5/op25/graph.json @@ -82,7 +82,7 @@ "queryString": "PREFIX dc: \nPREFIX rdf: \nPREFIX rdfs: \nPREFIX owl: \nPREFIX awg: \n\n SELECT * \n WHERE { \n\t ?resource a ?resource_class ; awg:precedes ?preceding_sketch .\n ?preceding_sketch awg:concomitates ?concomitating_sketch . \n }" } ], - "triples": "@prefix dc: .\n@prefix rdf: .\n@prefix rdfs: .\n@prefix owl: .\n@prefix awg: .\n\n\n# ONTO\nawg:follows a rdf:Property .\n\nawg:precedes a owl:TransitiveProperty .\nawg:precedes_scripture rdfs:subPropertyOf awg:precedes .\nawg:precedes_content rdfs:subPropertyOf awg:precedes .\n\nawg:concomitates owl:inverseOf awg:is_concomitated_by .\nawg:concomitates_unsure rdfs:subPropertyOf awg:concomitates .\n\nawg:EditionComplex a owl:Thing .\nawg:Sketch a owl:Thing .\nawg:Paratext a owl:Thing .\n\n# DATA\n# Work complexes\nawg:Op24_1 a awg:EditionComplex ;\n\t rdfs:label \"Op. 24/1\" .\n\nawg:Op25_1 a awg:EditionComplex ;\n\t rdfs:label \"Op. 25/1\" .\n\n# Sk1\nawg:M_317_Sk1 a awg:Sketch ;\n\t awg:precedes_scripture awg:M_317_Sk2 ;\n\t rdfs:label \"Sk1\" .\n\n#Sk2\nawg:M_317_Sk2 a awg:Sketch ;\n\t awg:precedes_content awg:M_317_Sk3 ;\n\t rdfs:label \"Sk2\" .\n\nawg:M_317_Sk2_1 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk2 ;\n\t rdfs:label \"Sk2.1\" .\n\nawg:M_317_Sk2_1_1 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk2_1 ;\n\t awg:precedes awg:M_317_Sk2_1_2 ;\n\t rdfs:label \"Sk2.1.1\" .\n\nawg:M_317_Sk2_1_2 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk2_1 ;\n\t rdfs:label \"Sk2.1.2\" .\n\nawg:M_317_Sk2_1_3 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk2_1 ;\n\t rdfs:label \"Sk2.1.3\" .\n\nawg:M_317_Sk2_1_2_1 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk2_1_2 ;\n\t rdfs:label \"Sk2.1.2.1\" .\n\n# Sk3\nawg:M_317_Sk3 a awg:Sketch ;\n\t awg:precedes awg:M_317_Sk4 ;\n\t rdfs:label \"Sk3\" .\n\nawg:M_317_Sk3_1 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk3 ;\n\t rdfs:label \"Sk3.1\" .\n\nawg:M_317_Sk3_1_1 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk3_1 ;\n\t rdfs:label \"Sk3.1.1\" .\n\nawg:M_317_Sk3_1_2 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk3_1 ;\n\t rdfs:label \"Sk3.1.2\" .\n\nawg:M_317_Sk3_1_3 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk3_1 ;\n\t rdfs:label \"Sk3.1.3 (Reihentabelle)\" .\n\nawg:M_317_Sk3_1_3_1 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk3_1_3 ;\n\t rdfs:label \"Sk3.1.3.1\" .\n\n# Sk4\nawg:M_317_Sk4 a awg:Sketch ;\n\t rdfs:label \"Sk4 (Verlaufskizze)\" ;\n\t dc:hasPart awg:M_317_Sk4a , awg:M_317_Sk4b , awg:M_317_Sk4c , awg:M_317_Sk4d ;\n\t awg:precedes awg:PT_SB3_38v_6_page75 ;\n\t awg:precedes awg:PT_SB3_39r_3_page76 ;\n\t awg:precedes awg:PT_SB3_39r_2_date_19340716 .\n\nawg:M_317_Sk4a a awg:Sketch ;\n\t rdfs:label \"Sk4 T. 1A–3A\" ;\n\t awg:concomitates awg:M_317_Sk4_1 ;\n\t awg:concomitates awg:PT_SB3_38v_4_Akk14_16 ;\n\t awg:precedes awg:M_317_Sk4b .\n\nawg:M_317_Sk4b a awg:Sketch ;\n\t rdfs:label \"Sk4 T. 3B–6\" ;\n\t awg:precedes awg:M_317_Sk4c .\n\nawg:M_317_Sk4c a awg:Sketch ;\n\t rdfs:label \"Sk4 T. 7–12\" ;\n\t awg:precedes awg:M_317_Sk4d .\n\nawg:M_317_Sk4d a awg:Sketch ;\n\t rdfs:label \"Sk4 T. 13–15\" ;\n\t awg:concomitates awg:M_317_Sk4_2 ;\n\t awg:concomitates awg:M_317_Sk4_3 .\n\nawg:M_317_Sk4_1 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk4 ;\n\t rdfs:label \"Sk4.1\" .\n\nawg:M_317_Sk4_2 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk4 ;\n\t rdfs:label \"Sk4.2\" .\n\nawg:M_317_Sk4_3 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk4 ;\n\t rdfs:label \"Sk4.3\" .\n\n# Paratexts\nawg:PT_SB3_39r_1_Akk a awg:Paratext ;\n\t rdfs:label \"Akkolade\" ;\n\t awg:precedes awg:M_317_Sk1 ;\n\t dc:isPartOf awg:Op24_1 .\n\nawg:PT_SB3_38v_1_Akk1_4 a awg:Paratext ;\n\t rdfs:label \"Akkoladenstrich: System 1–4\" ;\n\t awg:precedes awg:M_317_Sk1 ;\n\t dc:isPartOf awg:Op24_1 .\n\nawg:PT_SB3_38v_4_Akk14_16 a awg:Paratext ;\n\t rdfs:label \"Akkoladenstrich: System 14–16\" ;\n\t awg:precedes awg:M_317_Sk4_1 ;\n\t dc:isPartOf awg:Op25_1 .\n\nawg:PT_SB3_38v_2_date_19340704 a awg:Paratext ;\n\t rdfs:label \"Datierung: 4.VII 34\" ;\n\t awg:concomitates awg:M_317_Sk1, awg:M_317_Sk2 ;\n\t dc:isPartOf awg:Op25_1 .\n\nawg:PT_SB3_38v_3_timesignature2 a awg:Paratext ;\n\t rdfs:label \"Schlüssel- und Taktvorzeichnung\" ;\n\t awg:precedes_scripture awg:M_317_Sk3 ;\n\t dc:isPartOf awg:Op25_1 .\n\nawg:PT_SB3_39r_2_date_19340716 a awg:Paratext ;\n\t rdfs:label \"Schlussdatierung: Maria Enzersdorf 16.VII.34\" ;\n\t awg:precedes awg:PT_SB3_38v_5_Titel ;\n\t dc:isPartOf awg:Op25_1 .\n\nawg:PT_SB3_38v_5_Titel a awg:Paratext ;\n\t rdfs:label \"„Wie bin ich froh!“\" ;\n\t dc:isPartOf awg:Op25_1 .\n\nawg:PT_SB3_38v_6_page75 a awg:Paratext ;\n\t rdfs:label \"Seitenzahl: 75\" ;\n\t dc:isPartOf awg:Op25_1 .\n\nawg:PT_SB3_39r_3_page76 a awg:Paratext ;\n\t rdfs:label \"Seitenzahl: 76\" ;\n\t dc:isPartOf awg:Op25_1 .\n" + "triples": "@prefix dc: .\n@prefix rdf: .\n@prefix rdfs: .\n@prefix owl: .\n@prefix awg: .\n\n\n# ONTO\nawg:follows a rdf:Property .\n\nawg:precedes a owl:TransitiveProperty .\nawg:precedes_scripture rdfs:subPropertyOf awg:precedes .\nawg:precedes_content rdfs:subPropertyOf awg:precedes .\n\nawg:concomitates owl:inverseOf awg:is_concomitated_by .\nawg:concomitates_unsure rdfs:subPropertyOf awg:concomitates .\n\nawg:EditionComplex a owl:Thing .\nawg:Sketch a owl:Thing .\nawg:Paratext a owl:Thing .\n\n# DATA\n# Work complexes\nawg:Op24_1 a awg:EditionComplex ;\n\t rdfs:label \"Op. 24/1\" .\n\nawg:Op25_1 a awg:EditionComplex ;\n\t rdfs:label \"Op. 25/1\" .\n\n# Sk1\nawg:M_317_Sk1 a awg:Sketch ;\n\t awg:precedes_scripture awg:M_317_Sk2 ;\n\t rdfs:label \"Sk1\" .\n\n#Sk2\nawg:M_317_Sk2 a awg:Sketch ;\n\t awg:precedes_content awg:M_317_Sk3 ;\n\t rdfs:label \"Sk2\" .\n\nawg:M_317_Sk2_1 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk2 ;\n\t rdfs:label \"Sk2.1\" .\n\nawg:M_317_Sk2_1_1 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk2_1 ;\n\t awg:precedes awg:M_317_Sk2_1_2 ;\n\t rdfs:label \"Sk2.1.1\" .\n\nawg:M_317_Sk2_1_2 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk2_1 ;\n\t rdfs:label \"Sk2.1.2\" .\n\nawg:M_317_Sk2_1_3 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk2_1 ;\n\t rdfs:label \"Sk2.1.3\" .\n\nawg:M_317_Sk2_1_2_1 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk2_1_2 ;\n\t rdfs:label \"Sk2.1.2.1\" .\n\n# Sk3\nawg:M_317_Sk3 a awg:Sketch ;\n\t awg:precedes awg:M_317_Sk4 ;\n\t rdfs:label \"Sk3\" .\n\nawg:M_317_Sk3_1 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk3 ;\n\t rdfs:label \"Sk3.1\" .\n\nawg:M_317_Sk3_1_1 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk3_1 ;\n\t rdfs:label \"Sk3.1.1\" .\n\nawg:M_317_Sk3_1_2 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk3_1 ;\n\t rdfs:label \"Sk3.1.2\" .\n\nawg:M_317_Sk3_1_3 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk3_1 ;\n\t rdfs:label \"Sk3.1.3 (Reihentabelle)\" .\n\nawg:M_317_Sk3_1_3_1 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk3_1_3 ;\n\t rdfs:label \"Sk3.1.3.1\" .\n\n# Sk4\nawg:M_317_Sk4 a awg:Sketch ;\n\t rdfs:label \"Sk4 (Verlaufsskizze)\" ;\n\t dc:hasPart awg:M_317_Sk4a , awg:M_317_Sk4b , awg:M_317_Sk4c , awg:M_317_Sk4d ;\n\t awg:precedes awg:PT_SB3_38v_6_page75 ;\n\t awg:precedes awg:PT_SB3_39r_3_page76 ;\n\t awg:precedes awg:PT_SB3_39r_2_date_19340716 .\n\nawg:M_317_Sk4a a awg:Sketch ;\n\t rdfs:label \"Sk4 T. 1A–3A\" ;\n\t awg:concomitates awg:M_317_Sk4_1 ;\n\t awg:concomitates awg:PT_SB3_38v_4_Akk14_16 ;\n\t awg:precedes awg:M_317_Sk4b .\n\nawg:M_317_Sk4b a awg:Sketch ;\n\t rdfs:label \"Sk4 T. 3B–6\" ;\n\t awg:precedes awg:M_317_Sk4c .\n\nawg:M_317_Sk4c a awg:Sketch ;\n\t rdfs:label \"Sk4 T. 7–12\" ;\n\t awg:precedes awg:M_317_Sk4d .\n\nawg:M_317_Sk4d a awg:Sketch ;\n\t rdfs:label \"Sk4 T. 13–15\" ;\n\t awg:concomitates awg:M_317_Sk4_2 ;\n\t awg:concomitates awg:M_317_Sk4_3 .\n\nawg:M_317_Sk4_1 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk4 ;\n\t rdfs:label \"Sk4.1\" .\n\nawg:M_317_Sk4_2 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk4 ;\n\t rdfs:label \"Sk4.2\" .\n\nawg:M_317_Sk4_3 a awg:Sketch ;\n\t awg:concomitates awg:M_317_Sk4 ;\n\t rdfs:label \"Sk4.3\" .\n\n# Paratexts\nawg:PT_SB3_39r_1_Akk a awg:Paratext ;\n\t rdfs:label \"Akkolade\" ;\n\t awg:precedes awg:M_317_Sk1 ;\n\t dc:isPartOf awg:Op24_1 .\n\nawg:PT_SB3_38v_1_Akk1_4 a awg:Paratext ;\n\t rdfs:label \"Akkoladenstrich: System 1–4\" ;\n\t awg:precedes awg:M_317_Sk1 ;\n\t dc:isPartOf awg:Op24_1 .\n\nawg:PT_SB3_38v_4_Akk14_16 a awg:Paratext ;\n\t rdfs:label \"Akkoladenstrich: System 14–16\" ;\n\t awg:precedes awg:M_317_Sk4_1 ;\n\t dc:isPartOf awg:Op25_1 .\n\nawg:PT_SB3_38v_2_date_19340704 a awg:Paratext ;\n\t rdfs:label \"Datierung: 4.VII 34\" ;\n\t awg:concomitates awg:M_317_Sk1, awg:M_317_Sk2 ;\n\t dc:isPartOf awg:Op25_1 .\n\nawg:PT_SB3_38v_3_timesignature2 a awg:Paratext ;\n\t rdfs:label \"Schlüssel- und Taktvorzeichnung\" ;\n\t awg:precedes_scripture awg:M_317_Sk3 ;\n\t dc:isPartOf awg:Op25_1 .\n\nawg:PT_SB3_39r_2_date_19340716 a awg:Paratext ;\n\t rdfs:label \"Schlussdatierung: Maria Enzersdorf 16.VII.34\" ;\n\t awg:precedes awg:PT_SB3_38v_5_Titel ;\n\t dc:isPartOf awg:Op25_1 .\n\nawg:PT_SB3_38v_5_Titel a awg:Paratext ;\n\t rdfs:label \"„Wie bin ich froh!“\" ;\n\t dc:isPartOf awg:Op25_1 .\n\nawg:PT_SB3_38v_6_page75 a awg:Paratext ;\n\t rdfs:label \"Seitenzahl: 75\" ;\n\t dc:isPartOf awg:Op25_1 .\n\nawg:PT_SB3_39r_3_page76 a awg:Paratext ;\n\t rdfs:label \"Seitenzahl: 76\" ;\n\t dc:isPartOf awg:Op25_1 .\n" }, "staticImage": "\"graphOp25\"" } diff --git a/src/assets/data/edition/series/1/section/5/op25/textcritics.json b/src/assets/data/edition/series/1/section/5/op25/textcritics.json index d26d2d7e5f..b88c1427b5 100644 --- a/src/assets/data/edition/series/1/section/5/op25/textcritics.json +++ b/src/assets/data/edition/series/1/section/5/op25/textcritics.json @@ -34,7 +34,7 @@ "id": "M_317_Sk1", "label": "M 317 Sk1", "description": [ - "Sk1 entwirft eine viertönige Figur, die in ihrem Tonvorrat und ihrer rhythmischen Kontur dem Anfang der Singstimme von „Wie bin ich froh!“ M 317 entspricht. Dass es sich um die erste Skizzeneinheit zu dem Lied handelt, erschließt sich aus dem skripturalen Zusammenhang mit der links danebenstehenden Einheit Sk2: Diese weist an ihrem rechten Ende ein deutlich zusammengedrängtes Schriftbild auf, was sich durch den bereits von Sk1 beanspruchten Raum auf der Seite erklärt.
Noch vor der Niederschrift von Sk1 war die Seite am linken Rand vermutlich mit dem Akkoladenstrich von System 1–4 sowie der Schlüsselung in System 2–3 versehen: Diese präparieren die Seite für die Fortsetzung der (bereits im Sommer 1931 begonnenen) Verlaufsskizze zu op. 24/I auf Bl. 22v–26r, 31v–33r und 36v–38r im Skizzenbuch. (Siehe auch Akkoladenstrich, Schlüsselung und Taktziffer am linken Rand von Bl. 39r System 1–4, die ebenfalls als Präparierung der Verlaufskizze zu op. 24/1 fungieren [Sk4 T. 3B–6].)
Die Datierung 4. VII. 34 oberhalb vom linken Rand von System 1 ist möglicherweise bereits im Zusammenhang mit Sk1, vielleicht aber auch erst mit Sk2 notiert worden.
Der über System 1 stehende Titel „Wie bin ich froh!“ ist allerdings sehr wahrscheinlich erst nach Abschluss der Verlaufskizze Sk4, möglicherweise erst bei einer späteren Redaktion des gesamten Skizzenbuches eingetragen worden, worauf der auch für andere entsprechende Titel im Skizzenbuch verwendete Schreibstoff und Schreibduktus hinweist." + "Sk1 entwirft eine viertönige Figur, die in ihrem Tonvorrat und ihrer rhythmischen Kontur dem Anfang der Singstimme von „Wie bin ich froh!“ M 317 entspricht. Dass es sich um die erste Skizzeneinheit zu dem Lied handelt, erschließt sich aus dem skripturalen Zusammenhang mit der links danebenstehenden Einheit Sk2: Diese weist an ihrem rechten Ende ein deutlich zusammengedrängtes Schriftbild auf, was sich durch den bereits von Sk1 beanspruchten Raum auf der Seite erklärt.
Noch vor der Niederschrift von Sk1 war die Seite am linken Rand vermutlich mit dem Akkoladenstrich von System 1–4 sowie der Schlüsselung in System 2–3 versehen: Diese präparieren die Seite für die Fortsetzung der (bereits im Sommer 1931 begonnenen) Verlaufsskizze zu op. 24/I auf Bl. 22v–26r, 31v–33r und 36v–38r im Skizzenbuch. (Siehe auch Akkoladenstrich, Schlüsselung und Taktziffer am linken Rand von Bl. 39r System 1–4, die ebenfalls als Präparierung der Verlaufsskizze zu op. 24/1 fungieren [Sk4 T. 3B–6].)
Die Datierung 4. VII. 34 oberhalb vom linken Rand von System 1 ist möglicherweise bereits im Zusammenhang mit Sk1, vielleicht aber auch erst mit Sk2 notiert worden.
Der über System 1 stehende Titel „Wie bin ich froh!“ ist allerdings sehr wahrscheinlich erst nach Abschluss der Verlaufsskizze Sk4, möglicherweise erst bei einer späteren Redaktion des gesamten Skizzenbuches eingetragen worden, worauf der auch für andere entsprechende Titel im Skizzenbuch verwendete Schreibstoff und Schreibduktus hinweist." ], "comments": [ { @@ -1166,7 +1166,7 @@ "id": "M_317_Sk4", "label": "M 317 Sk4", "description": [ - "Sk4 ist eine vollständige Verlaufskizze des Liedes „Wie bin ich froh!“. Die Verlaufskizze erstreckt sich über vier Akkoladen (T. {{ '{' }}1A{{ '}' }}–3A, T. 3B–6, T. 7–12 und T. 13–15) und umfasst im Unterschied zu den Reinschriften von Textfassung 1 und Textfassung 2 nicht zwölf, sondern 15 gültige Takte.
Bereits vor der Niederschrift von Sk4 war Bl. 39r mit Akkoladenstrich, Schlüsselung und Taktziffer am linken Rand von System 1–4 versehen (Sk4 T. 3B–6): Diese präparieren die Seite für die Fortsetzung der (bereits im Sommer 1931 begonnenen) Verlaufskizze zu M 316 (op. 24/I) auf Bl. 22v–26r, 31v–33r, und 36v–38r im selben Skizzenbuch.
(Siehe auch Akkoladenstrich von System 1–4 sowie die Schlüsselung in System 2–3 am linken Rand von Bl. 38v, die ebenfalls als Präparierung der Verlaufskizze zu M 316 fungieren [Sk1 bis Sk3.1.2].)
Sk4 ist laut der nach T. 15 folgenden Datierung am 16. Juli 1934 beendet worden.", + "Sk4 ist eine vollständige Verlaufsskizze des Liedes „Wie bin ich froh!“ M 317. Die Verlaufsskizze erstreckt sich über vier Akkoladen (T. {{ '{' }}1A{{ '}' }}–3A, T. 3B–6, T. 7–12 und T. 13–15) und umfasst im Unterschied zu den Reinschriften von Textfassung 1 und Textfassung 2 nicht zwölf, sondern 15 gültige Takte.
Bereits vor der Niederschrift von Sk4 war Bl. 39r mit Akkoladenstrich, Schlüsselung und Taktziffer am linken Rand von System 1–4 versehen (Sk4 T. 3B–6): Diese präparieren die Seite für die Fortsetzung der (bereits im Sommer 1931 begonnenen) Verlaufsskizze zu M 316 (op. 24/I) auf Bl. 22v–26r, 31v–33r, und 36v–38r im selben Skizzenbuch.
(Siehe auch Akkoladenstrich von System 1–4 sowie die Schlüsselung in System 2–3 am linken Rand von Bl. 38v, die ebenfalls als Präparierung der Verlaufsskizze zu M 316 fungieren [Sk1 bis Sk3.1.2].)
Sk4 ist laut der nach T. 15 folgenden Datierung am 16. Juli 1934 beendet worden.", "Die Ziffern 1 (Gg), 2 (Kgis), 3 (Ug) und 4 (KUfis) bezeichnen in der Regel den Anfang von Reihenformen gemäß den Reihentabellen Sk3.1.3 und M 317 Sk5 / M 321 Sk1 / M 322 Sk1. Winkel markieren in der Regel deren Ende (┐, ┘) oder Anfang (┌, └)." ], "comments": [ From c028516f6a3b64a987bab54874d7622e62a9c6cc Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Tue, 20 Feb 2024 14:42:10 +0100 Subject: [PATCH 02/63] fix(assets): fix supplied class names --- .../img/edition/series/2/section/2a/m31/M31_Sk5-3von3-final.svg | 2 +- .../edition/series/2/section/2a/m34/M34_Sk1_1-1von1-final.svg | 2 +- .../series/2/section/2a/m35_42/M35_42_Sk1_1-1von1-final.svg | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/assets/img/edition/series/2/section/2a/m31/M31_Sk5-3von3-final.svg b/src/assets/img/edition/series/2/section/2a/m31/M31_Sk5-3von3-final.svg index 7177cbe664..666f10b26f 100644 --- a/src/assets/img/edition/series/2/section/2a/m31/M31_Sk5-3von3-final.svg +++ b/src/assets/img/edition/series/2/section/2a/m31/M31_Sk5-3von3-final.svg @@ -104,7 +104,7 @@ - + diff --git a/src/assets/img/edition/series/2/section/2a/m34/M34_Sk1_1-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m34/M34_Sk1_1-1von1-final.svg index a0e5782cf3..65228a98ff 100644 --- a/src/assets/img/edition/series/2/section/2a/m34/M34_Sk1_1-1von1-final.svg +++ b/src/assets/img/edition/series/2/section/2a/m34/M34_Sk1_1-1von1-final.svg @@ -366,7 +366,7 @@ - + diff --git a/src/assets/img/edition/series/2/section/2a/m35_42/M35_42_Sk1_1-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m35_42/M35_42_Sk1_1-1von1-final.svg index 7b32032195..08a7b75a00 100644 --- a/src/assets/img/edition/series/2/section/2a/m35_42/M35_42_Sk1_1-1von1-final.svg +++ b/src/assets/img/edition/series/2/section/2a/m35_42/M35_42_Sk1_1-1von1-final.svg @@ -160,7 +160,7 @@ - + From 7891b65b834b75e9917385d36610620f56cfc3ad Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Tue, 20 Feb 2024 14:43:14 +0100 Subject: [PATCH 03/63] fix(assets): unify wording in sketch commentary --- .../series/2/section/2a/m30/textcritics.json | 4 ++-- .../series/2/section/2a/m31/textcritics.json | 14 +++++++------- .../series/2/section/2a/m34/textcritics.json | 4 ++-- .../series/2/section/2a/m35_42/textcritics.json | 2 +- .../series/2/section/2a/m37/textcritics.json | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/assets/data/edition/series/2/section/2a/m30/textcritics.json b/src/assets/data/edition/series/2/section/2a/m30/textcritics.json index 6a472015dc..edc2ac60e9 100644 --- a/src/assets/data/edition/series/2/section/2a/m30/textcritics.json +++ b/src/assets/data/edition/series/2/section/2a/m30/textcritics.json @@ -4,7 +4,7 @@ "id": "M_30_TF1", "label": "M 30 einzige Textfassung", "description": [ - "##Quellenbewertung:## Für die Textedition der Studienkomposition für Klavier M 31 ist B relevante Quelle. A enthält Skizzen.
B weist zwei unterscheidbare Korrekturschichten auf: Korrekturen 1 mit Tinte sowie die später entstandenen Korrekturen 2 mit Bleistift. Der Zustand vor Korrekturen 1 ist nicht immer zu entziffern.
Hauptquelle für die Textedition der Studienkomposition für Klavier M 31 ist B nach Korrekturen 1." + "##Quellenbewertung:## Für die Textedition der Studienkomposition für Klavier M 30 ist B relevante Quelle. A enthält Skizzen.
B weist zwei unterscheidbare Korrekturschichten auf: Korrekturen 1 mit Tinte sowie die später entstandenen Korrekturen 2 mit Bleistift. Der Zustand vor Korrekturen 1 ist nicht immer zu entziffern.
Hauptquelle für die Textedition der Studienkomposition für Klavier M 30 ist B nach Korrekturen 1." ], "comments": [ { @@ -55,7 +55,7 @@ "id": "M_30_Sk1", "label": "M 30 Sk1", "description": [ - "Sk1 ist die Verlaufsskizze zu Studienkomposition für Klavier M 30, die allerdings zahlreiche Überarbeitungen in Form von Streichungen und Ersetzungen aufweist." + "Sk1 ist die Verlaufsskizze zur Studienkomposition für Klavier M 30, die allerdings zahlreiche Überarbeitungen in Form von Streichungen und Ersetzungen aufweist." ], "comments": [ { diff --git a/src/assets/data/edition/series/2/section/2a/m31/textcritics.json b/src/assets/data/edition/series/2/section/2a/m31/textcritics.json index 896fea9632..284f4c75d2 100644 --- a/src/assets/data/edition/series/2/section/2a/m31/textcritics.json +++ b/src/assets/data/edition/series/2/section/2a/m31/textcritics.json @@ -69,7 +69,7 @@ "id": "M_31_Sk1", "label": "M 31 Sk1", "description": [ - "M 31 Sk1 enthält eine erste rhythmische Skizze zum Hauptthema der Studienkomposition für Klavier M 31." + "Sk1 enthält eine erste rhythmische Skizze zum Hauptthema der Studienkomposition für Klavier M 31." ], "comments": [ { @@ -101,7 +101,7 @@ "id": "M_31_Sk2", "label": "M 31 Sk2", "description": [ - "M 31 Sk2 formuliert ein kontrastierendes Thema in E-Dur für den B-Teil, das von der Tintenniederschrift jedoch noch stark abweicht." + "Sk2 formuliert ein kontrastierendes Thema in E-Dur für den B-Teil, das von der Tintenniederschrift jedoch noch stark abweicht." ], "comments": [ { @@ -117,7 +117,7 @@ "id": "M_31_Sk3", "label": "M 31 Sk3", "description": [ - "M 31 Sk3 beinhaltet eine Verlaufsskizze vom A-Teil und B-Teil der Studienkomposition für Klavier M 31, deren Übergang zur Reprise von der Tintenniederschrift abweicht." + "Sk3 beinhaltet eine Verlaufsskizze vom A-Teil und B-Teil der Studienkomposition für Klavier M 31, deren Übergang zur Reprise von der Tintenniederschrift abweicht." ], "comments": [ { @@ -212,7 +212,7 @@ "id": "M_31_Sk3_1", "label": "M 31 Sk3.1", "description": [ - "M 31 Sk3.1 fügt einen zusätzlichen Takt zwischen T. 10 und T. 11 von Sk3 ein." + "Sk3.1 fügt einen zusätzlichen Takt zwischen T. 10 und T. 11 von Sk3 ein." ], "comments": [ { @@ -244,7 +244,7 @@ "id": "M_31_Sk3_2", "label": "M 31 Sk3.2", "description": [ - "M 31 Sk3.2 skizziert vermutlich das Vorhaben, den Übergang zur Reprise in M 31 Sk3 von D nach G um eine Quinte nach unten zu transponieren." + "Sk3.2 skizziert vermutlich das Vorhaben, den Übergang zur Reprise in Sk3 von D nach G um eine Quinte nach unten zu transponieren." ], "comments": [ { @@ -276,7 +276,7 @@ "id": "M_31_Sk4", "label": "M 31 Sk4", "description": [ - "M 31 Sk4 setzt erneut beim B-Teil an, um einen – unter erheblichen Korrekturvorgängen – mit der Tintenniederschrift nahezu übereinstimmenden Verlauf des Mittelteils zu formulieren." + "Sk4 setzt erneut beim B-Teil an, um einen – unter erheblichen Korrekturvorgängen – mit der Tintenniederschrift nahezu übereinstimmenden Verlauf des Mittelteils zu formulieren." ], "comments": [ { @@ -413,7 +413,7 @@ "id": "M_31_Sk5", "label": "M 31 Sk5", "description": [ - "M 31 Sk5 enthält die Reprise des A-Teils zur Studienkomposition für Klavier M 31. Obwohl sämtliche Takte gestrichen sind, entsprechen sie der späteren Tintenniederschrift." + "Sk5 enthält die Reprise des A-Teils zur Studienkomposition für Klavier M 31. Obwohl sämtliche Takte gestrichen sind, entsprechen sie der späteren Tintenniederschrift." ], "comments": [ { diff --git a/src/assets/data/edition/series/2/section/2a/m34/textcritics.json b/src/assets/data/edition/series/2/section/2a/m34/textcritics.json index 5ad49c40a2..d2596521cd 100644 --- a/src/assets/data/edition/series/2/section/2a/m34/textcritics.json +++ b/src/assets/data/edition/series/2/section/2a/m34/textcritics.json @@ -20,7 +20,7 @@ "id": "M_34_Sk1", "label": "M 34 Sk1", "description": [ - "M 34 Sk1 ist die Verlaufsskizze zu M 34, die jedoch ab T. 7–15 maßgeblich von der späteren achttaktigen Tintenniederschrift abweicht, indem sie stattdessen eine sechzehntaktige Periode formuliert." + "Sk1 ist die Verlaufsskizze zur Studienkomposition für Klavier M 34, die jedoch ab T. 7–15 maßgeblich von der späteren achttaktigen Tintenniederschrift abweicht, indem sie stattdessen eine sechzehntaktige Periode formuliert." ], "comments": [ { @@ -129,7 +129,7 @@ "id": "M_34_Sk1_1", "label": "M 34 Sk1.1", "description": [ - "M 34 Sk1.1 entwirft auf der Basis von M 34 Sk1 eine alternative Fortsetzung ab T. 5, die zu einer Verkürzung auf eine achttaktige Periode analog der späteren Tintenniederschrift führt." + "Sk1.1 entwirft auf der Basis von M 34 Sk1 eine alternative Fortsetzung ab T. 5, die zu einer Verkürzung auf eine achttaktige Periode analog der späteren Tintenniederschrift führt." ], "comments": [ { diff --git a/src/assets/data/edition/series/2/section/2a/m35_42/textcritics.json b/src/assets/data/edition/series/2/section/2a/m35_42/textcritics.json index 7573f37178..ce0002d4c5 100644 --- a/src/assets/data/edition/series/2/section/2a/m35_42/textcritics.json +++ b/src/assets/data/edition/series/2/section/2a/m35_42/textcritics.json @@ -47,7 +47,7 @@ { "id": "M_35_42_Sk1", "label": "M 35/42 Sk1", - "description": ["Sk1 ist die Verlaufsskizze zu Studienkomposition für Klavier M 35/42."], + "description": ["Sk1 ist die Verlaufsskizze zur Studienkomposition für Klavier M 35/42."], "comments": [ { "svgGroupId": "g5408", diff --git a/src/assets/data/edition/series/2/section/2a/m37/textcritics.json b/src/assets/data/edition/series/2/section/2a/m37/textcritics.json index 8cc5175450..12806a6a05 100644 --- a/src/assets/data/edition/series/2/section/2a/m37/textcritics.json +++ b/src/assets/data/edition/series/2/section/2a/m37/textcritics.json @@ -41,7 +41,7 @@ "id": "M_37_Sk1", "label": "M 37 Sk1", "description": [ - "Sk1 skizziert möglicherweise eine erste melodische Linie für M 37. Die Zugehörigkeit zu der Studienkomposition für Klavier M 37 ist allerdings nicht eindeutig." + "Sk1 skizziert möglicherweise eine erste melodische Linie für M 37. Die Zugehörigkeit zur Studienkomposition für Klavier M 37 ist allerdings nicht eindeutig." ], "linkBoxes": [ { @@ -64,7 +64,7 @@ "id": "M_37_Sk2", "label": "M 37 Sk2", "description": [ - "Sk2 skizziert möglicherweise eine Variante zu der ersten melodischen Linie aus Sk1. Die Zugehörigkeit zu der Studienkomposition für Klavier M 37 ist allerdings nicht eindeutig." + "Sk2 skizziert möglicherweise eine Variante zu der ersten melodischen Linie aus Sk1. Die Zugehörigkeit zur Studienkomposition für Klavier M 37 ist allerdings nicht eindeutig." ], "comments": [ { @@ -102,7 +102,7 @@ { "id": "M_37_Sk3", "label": "M 37 Sk3", - "description": ["Sk3 ist die Verlaufsskizze zu der Studienkomposition für Klavier M 37."], + "description": ["Sk3 ist die Verlaufsskizze zur Studienkomposition für Klavier M 37."], "comments": [ { "svgGroupId": "g56588", From 8a6eb719465e73c3e1d05da48ecc1ac1fe2fbdde Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Tue, 20 Feb 2024 16:21:34 +0100 Subject: [PATCH 04/63] fix(home): fix wording on landing page --- .../views/home-view/home-view.component.html | 15 +++----- .../home-view/home-view.component.spec.ts | 34 ------------------- 2 files changed, 4 insertions(+), 45 deletions(-) diff --git a/src/app/views/home-view/home-view.component.html b/src/app/views/home-view/home-view.component.html index 8964415ed2..192a0b6c8f 100644 --- a/src/app/views/home-view/home-view.component.html +++ b/src/app/views/home-view/home-view.component.html @@ -53,20 +53,13 @@

Die online zugänglichen Bestandteile und Datenbestände der AWG-Online-Edition werden als Open Data über diese Webapplikation präsentiert und über das Software-Framework - DaSCH Service Platform (DSP)/SALSAH - des - Digital Humanities Lab - der Universität Basel aufbereitet. Zudem werden die Datenbestände durch das + DaSCH Service Platform (DSP) des Swiss National Data & Service Center for the Humanities (DaSCH) - zugänglich gehalten und langfristig aufbewahrt. Das DaSCH garantiert eine Zugänglichkeit der Daten gemäss - FAIR-Prinzipien, die Zuweisung von digitalen Identifikatoren, maschinenlesbaren Metadaten und den langfristigen - Betrieb der technischen Infrastruktur (vgl. + aufbereitet, zugänglich gehalten und langfristig aufbewahrt. Das DaSCH garantiert eine Zugänglichkeit der Daten + gemäss FAIR-Prinzipien, die Zuweisung von digitalen Identifikatoren, maschinenlesbaren Metadaten und den + langfristigen Betrieb der technischen Infrastruktur (vgl. Mission Statement DaSCH).

diff --git a/src/app/views/home-view/home-view.component.spec.ts b/src/app/views/home-view/home-view.component.spec.ts index d6fa4c0662..bca2878b0e 100644 --- a/src/app/views/home-view/home-view.component.spec.ts +++ b/src/app/views/home-view/home-view.component.spec.ts @@ -221,22 +221,6 @@ describe('HomeViewComponent (DONE)', () => { expect(dspEl.href).not.toBeTruthy(); }); - it('... SALSAH', () => { - const salsahDes = getAndExpectDebugElementByCss(compDe, 'a#salsah-link', 1, 1); - const salsahEl = salsahDes[0].nativeElement; - - expect(salsahEl).toBeDefined(); - expect(salsahEl.href).not.toBeTruthy(); - }); - - it('... DHLAB', () => { - const dhlabDes = getAndExpectDebugElementByCss(compDe, 'a#dhlab-link', 1, 1); - const dhlabEl = dhlabDes[0].nativeElement; - - expect(dhlabEl).toBeDefined(); - expect(dhlabEl.href).not.toBeTruthy(); - }); - it('... DaSCH', () => { const daschDes = getAndExpectDebugElementByCss(compDe, 'a#dasch-link', 1, 1); const daschEl = daschDes[0].nativeElement; @@ -476,24 +460,6 @@ describe('HomeViewComponent (DONE)', () => { expectToBe(dspEl.textContent, 'DaSCH Service Platform (DSP)'); }); - it('... SALSAH', () => { - const salsahDes = getAndExpectDebugElementByCss(compDe, 'a#salsah-link', 1, 1); - const salsahEl = salsahDes[0].nativeElement; - - expect(salsahEl).toBeDefined(); - expectToBe(salsahEl.href, expectedPageMetaData.salsahUrl); - expectToBe(salsahEl.textContent, 'SALSAH'); - }); - - it('... DHLAB', () => { - const dhlabDes = getAndExpectDebugElementByCss(compDe, 'a#dhlab-link', 1, 1); - const dhlabEl = dhlabDes[0].nativeElement; - - expect(dhlabEl).toBeDefined(); - expectToBe(dhlabEl.href, expectedPageMetaData.dhlabUrl); - expectToBe(dhlabEl.textContent, 'Digital Humanities Lab'); - }); - it('... DaSCH', () => { const daschDes = getAndExpectDebugElementByCss(compDe, 'a#dasch-link', 1, 1); const daschEl = daschDes[0].nativeElement; From 860609d5a211b12c30309629917e6d78afe3dbdd Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Tue, 20 Feb 2024 16:24:30 +0100 Subject: [PATCH 05/63] fix(assets): add firm signs for source B and D of m35/42 --- .../source-description/source-description.component.spec.ts | 2 ++ .../source-description/source-description.component.ts | 2 ++ .../series/2/section/2a/m35_42/source-description.json | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.spec.ts index 43bd4fafe7..a7fecd5073 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.spec.ts @@ -89,7 +89,9 @@ describe('SourceDescriptionComponent (DONE)', () => { }, M35_42: { A: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_C], + B: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_C], C: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_D], + D: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_D], }, M37: { A: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_C], diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.ts index 203ad1df0e..08fc9f21e6 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.ts @@ -73,7 +73,9 @@ export class SourceDescriptionComponent { }, M35_42: { A: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_C], + B: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_C], C: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_D], + D: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_D], }, M37: { A: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_C], diff --git a/src/assets/data/edition/series/2/section/2a/m35_42/source-description.json b/src/assets/data/edition/series/2/section/2a/m35_42/source-description.json index 658e62b33a..652a4d1752 100644 --- a/src/assets/data/edition/series/2/section/2a/m35_42/source-description.json +++ b/src/assets/data/edition/series/2/section/2a/m35_42/source-description.json @@ -599,7 +599,7 @@ "desc": [ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 7/8) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8). Kleiner Riss am rechten Rand von Bl. 2." ], - "writingMaterial": "Notenpapier, 18 Systeme, Format: hoch 348 × 266 mm, Firmenzeichen ##[JE]## | Protokoll. Schutzmarke | No. 5 | 18 linig. unten links auf Bl. 1r–2r.", + "writingMaterial": "Notenpapier, 18 Systeme, Format: hoch 348 × 266 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", "writingInstruments": { "main": "Bleistift", "secondary": [] @@ -1325,7 +1325,7 @@ "desc": [ "1 Blatt: Das Blatt ist Bestandteil (Bl. 5) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8). Rissspuren am linken Rand: von Bogen abgetrennt." ], - "writingMaterial": "Notenpapier, 18 Systeme, Format: hoch 347 × 265 mm, Firmenzeichen ##[JE]## | Protokoll. Schutzmarke | No. 5 | 18 linig. unten links auf Bl. 1r.", + "writingMaterial": "Notenpapier, 18 Systeme, Format: hoch 347 × 265 mm, Firmenzeichen:

unten links auf Bl. 1r.", "writingInstruments": { "main": "schwarze Tinte", "secondary": [] From 071fd2822e78411473fb5c6c28c3d88aec299a55 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 19:35:40 +0000 Subject: [PATCH 06/63] build(deps): bump ip from 2.0.0 to 2.0.1 Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1. - [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1) --- updated-dependencies: - dependency-name: ip dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 7b5f430379..18aac59526 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7408,9 +7408,9 @@ internal-slot@^1.0.4, internal-slot@^1.0.5: side-channel "^1.0.4" ip@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da" - integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ== + version "2.0.1" + resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.1.tgz#e8f3595d33a3ea66490204234b77636965307105" + integrity sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ== ipaddr.js@1.9.1: version "1.9.1" From af142e6b925f32ef94f0bf799e1a61e6b31f8284 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:20:10 +0000 Subject: [PATCH 07/63] build(deps-dev): bump the typescript-eslint group with 2 updates Bumps the typescript-eslint group with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 7.0.1 to 7.0.2 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.0.2/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 7.0.1 to 7.0.2 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.0.2/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: typescript-eslint - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: typescript-eslint ... Signed-off-by: dependabot[bot] --- package.json | 4 +-- yarn.lock | 100 +++++++++++++++++++++++++-------------------------- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/package.json b/package.json index be476dcc93..34f9339cfb 100644 --- a/package.json +++ b/package.json @@ -132,8 +132,8 @@ "@types/d3": "^7.4.3", "@types/jasmine": "~5.1.4", "@types/node": "^18.19.14", - "@typescript-eslint/eslint-plugin": "^7.0.1", - "@typescript-eslint/parser": "^7.0.1", + "@typescript-eslint/eslint-plugin": "^7.0.2", + "@typescript-eslint/parser": "^7.0.2", "angular-cli-ghpages": "^1.0.7", "conventional-recommended-bump": "^9.0.0", "eslint": "^8.56.0", diff --git a/yarn.lock b/yarn.lock index 18aac59526..39997c977f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3135,16 +3135,16 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.0.1.tgz#407daffe09d964d57aceaf3ac51846359fbe61b0" - integrity sha512-OLvgeBv3vXlnnJGIAgCLYKjgMEU+wBGj07MQ/nxAaON+3mLzX7mJbhRYrVGiVvFiXtwFlkcBa/TtmglHy0UbzQ== +"@typescript-eslint/eslint-plugin@^7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.0.2.tgz#c13a34057be425167cc4a765158c46fdf2fd981d" + integrity sha512-/XtVZJtbaphtdrWjr+CJclaCVGPtOdBpFEnvtNf/jRV0IiEemRrL0qABex/nEt8isYcnFacm3nPHYQwL+Wb7qg== dependencies: "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "7.0.1" - "@typescript-eslint/type-utils" "7.0.1" - "@typescript-eslint/utils" "7.0.1" - "@typescript-eslint/visitor-keys" "7.0.1" + "@typescript-eslint/scope-manager" "7.0.2" + "@typescript-eslint/type-utils" "7.0.2" + "@typescript-eslint/utils" "7.0.2" + "@typescript-eslint/visitor-keys" "7.0.2" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.2.4" @@ -3152,15 +3152,15 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/parser@^7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.0.1.tgz#e9c61d9a5e32242477d92756d36086dc40322eed" - integrity sha512-8GcRRZNzaHxKzBPU3tKtFNing571/GwPBeCvmAUw0yBtfE2XVd0zFKJIMSWkHJcPQi0ekxjIts6L/rrZq5cxGQ== +"@typescript-eslint/parser@^7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.0.2.tgz#95c31233d343db1ca1df8df7811b5b87ca7b1a68" + integrity sha512-GdwfDglCxSmU+QTS9vhz2Sop46ebNCXpPPvsByK7hu0rFGRHL+AusKQJ7SoN+LbLh6APFpQwHKmDSwN35Z700Q== dependencies: - "@typescript-eslint/scope-manager" "7.0.1" - "@typescript-eslint/types" "7.0.1" - "@typescript-eslint/typescript-estree" "7.0.1" - "@typescript-eslint/visitor-keys" "7.0.1" + "@typescript-eslint/scope-manager" "7.0.2" + "@typescript-eslint/types" "7.0.2" + "@typescript-eslint/typescript-estree" "7.0.2" + "@typescript-eslint/visitor-keys" "7.0.2" debug "^4.3.4" "@typescript-eslint/scope-manager@6.19.0": @@ -3179,13 +3179,13 @@ "@typescript-eslint/types" "6.21.0" "@typescript-eslint/visitor-keys" "6.21.0" -"@typescript-eslint/scope-manager@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.0.1.tgz#611ec8e78c70439b152a805e1b10aaac36de7c00" - integrity sha512-v7/T7As10g3bcWOOPAcbnMDuvctHzCFYCG/8R4bK4iYzdFqsZTbXGln0cZNVcwQcwewsYU2BJLay8j0/4zOk4w== +"@typescript-eslint/scope-manager@7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.0.2.tgz#6ec4cc03752758ddd1fdaae6fbd0ed9a2ca4fe63" + integrity sha512-l6sa2jF3h+qgN2qUMjVR3uCNGjWw4ahGfzIYsCtFrQJCjhbrDPdiihYT8FnnqFwsWX+20hK592yX9I2rxKTP4g== dependencies: - "@typescript-eslint/types" "7.0.1" - "@typescript-eslint/visitor-keys" "7.0.1" + "@typescript-eslint/types" "7.0.2" + "@typescript-eslint/visitor-keys" "7.0.2" "@typescript-eslint/type-utils@6.19.0": version "6.19.0" @@ -3197,13 +3197,13 @@ debug "^4.3.4" ts-api-utils "^1.0.1" -"@typescript-eslint/type-utils@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.0.1.tgz#0fba92c1f81cad561d7b3adc812aa1cc0e35cdae" - integrity sha512-YtT9UcstTG5Yqy4xtLiClm1ZpM/pWVGFnkAa90UfdkkZsR1eP2mR/1jbHeYp8Ay1l1JHPyGvoUYR6o3On5Nhmw== +"@typescript-eslint/type-utils@7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.0.2.tgz#a7fc0adff0c202562721357e7478207d380a757b" + integrity sha512-IKKDcFsKAYlk8Rs4wiFfEwJTQlHcdn8CLwLaxwd6zb8HNiMcQIFX9sWax2k4Cjj7l7mGS5N1zl7RCHOVwHq2VQ== dependencies: - "@typescript-eslint/typescript-estree" "7.0.1" - "@typescript-eslint/utils" "7.0.1" + "@typescript-eslint/typescript-estree" "7.0.2" + "@typescript-eslint/utils" "7.0.2" debug "^4.3.4" ts-api-utils "^1.0.1" @@ -3217,10 +3217,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== -"@typescript-eslint/types@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.0.1.tgz#dcfabce192db5b8bf77ea3c82cfaabe6e6a3c901" - integrity sha512-uJDfmirz4FHib6ENju/7cz9SdMSkeVvJDK3VcMFvf/hAShg8C74FW+06MaQPODHfDJp/z/zHfgawIJRjlu0RLg== +"@typescript-eslint/types@7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.0.2.tgz#b6edd108648028194eb213887d8d43ab5750351c" + integrity sha512-ZzcCQHj4JaXFjdOql6adYV4B/oFOFjPOC9XYwCaZFRvqN8Llfvv4gSxrkQkd2u4Ci62i2c6W6gkDwQJDaRc4nA== "@typescript-eslint/typescript-estree@6.19.0": version "6.19.0" @@ -3250,13 +3250,13 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/typescript-estree@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.1.tgz#1d52ac03da541693fa5bcdc13ad655def5046faf" - integrity sha512-SO9wHb6ph0/FN5OJxH4MiPscGah5wjOd0RRpaLvuBv9g8565Fgu0uMySFEPqwPHiQU90yzJ2FjRYKGrAhS1xig== +"@typescript-eslint/typescript-estree@7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.2.tgz#3c6dc8a3b9799f4ef7eca0d224ded01974e4cb39" + integrity sha512-3AMc8khTcELFWcKcPc0xiLviEvvfzATpdPj/DXuOGIdQIIFybf4DMT1vKRbuAEOFMwhWt7NFLXRkbjsvKZQyvw== dependencies: - "@typescript-eslint/types" "7.0.1" - "@typescript-eslint/visitor-keys" "7.0.1" + "@typescript-eslint/types" "7.0.2" + "@typescript-eslint/visitor-keys" "7.0.2" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -3277,17 +3277,17 @@ "@typescript-eslint/typescript-estree" "6.19.0" semver "^7.5.4" -"@typescript-eslint/utils@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.0.1.tgz#b8ceac0ba5fef362b4a03a33c0e1fedeea3734ed" - integrity sha512-oe4his30JgPbnv+9Vef1h48jm0S6ft4mNwi9wj7bX10joGn07QRfqIqFHoMiajrtoU88cIhXf8ahwgrcbNLgPA== +"@typescript-eslint/utils@7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.0.2.tgz#8756123054cd934c8ba7db6a6cffbc654b10b5c4" + integrity sha512-PZPIONBIB/X684bhT1XlrkjNZJIEevwkKDsdwfiu1WeqBxYEEdIgVDgm8/bbKHVu+6YOpeRqcfImTdImx/4Bsw== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.12" "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "7.0.1" - "@typescript-eslint/types" "7.0.1" - "@typescript-eslint/typescript-estree" "7.0.1" + "@typescript-eslint/scope-manager" "7.0.2" + "@typescript-eslint/types" "7.0.2" + "@typescript-eslint/typescript-estree" "7.0.2" semver "^7.5.4" "@typescript-eslint/utils@^6.0.0": @@ -3319,12 +3319,12 @@ "@typescript-eslint/types" "6.21.0" eslint-visitor-keys "^3.4.1" -"@typescript-eslint/visitor-keys@7.0.1": - version "7.0.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.1.tgz#864680ac5a8010ec4814f8a818e57595f79f464e" - integrity sha512-hwAgrOyk++RTXrP4KzCg7zB2U0xt7RUU0ZdMSCsqF3eKUwkdXUMyTb0qdCuji7VIbcpG62kKTU9M1J1c9UpFBw== +"@typescript-eslint/visitor-keys@7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.2.tgz#2899b716053ad7094962beb895d11396fc12afc7" + integrity sha512-8Y+YiBmqPighbm5xA2k4wKTxRzx9EkBu7Rlw+WHqMvRJ3RPz/BMBO9b2ru0LUNmXg120PHUXD5+SWFy2R8DqlQ== dependencies: - "@typescript-eslint/types" "7.0.1" + "@typescript-eslint/types" "7.0.2" eslint-visitor-keys "^3.4.1" "@ungap/structured-clone@^1.2.0": From 7735209d0346c85550e5aceb3232e799e1eb6040 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Wed, 21 Feb 2024 18:31:46 +0100 Subject: [PATCH 08/63] refactor(edition): rename writingMaterialString --- .../source-description/source-description.component.html | 4 ++-- .../views/edition-view/models/source-description.model.ts | 5 +++++ .../series/1/section/1/op24/source-description.json | 2 +- .../series/1/section/2/op22/source-description.json | 2 +- .../series/1/section/2/op27/source-description.json | 2 +- .../series/1/section/3/op19/source-description.json | 2 +- .../series/1/section/5/op12/source-description.json | 4 ++-- .../series/1/section/5/op23/source-description.json | 7 +++---- .../series/1/section/5/op25/source-description.json | 6 +++--- .../series/2/section/2a/m30/source-description.json | 4 ++-- .../series/2/section/2a/m31/source-description.json | 4 ++-- .../series/2/section/2a/m34/source-description.json | 4 ++-- .../series/2/section/2a/m35_42/source-description.json | 8 ++++---- .../series/2/section/2a/m37/source-description.json | 4 ++-- 14 files changed, 31 insertions(+), 27 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.html b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.html index 605127fa56..8d63cdd861 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.html +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.html @@ -39,11 +39,11 @@ } } - @if (sourceDescription.description.writingMaterial) { + @if (sourceDescription.description.writingMaterialString) {

Beschreibstoff: 

} diff --git a/src/app/views/edition-view/models/source-description.model.ts b/src/app/views/edition-view/models/source-description.model.ts index 594821f334..16d2f69d88 100644 --- a/src/app/views/edition-view/models/source-description.model.ts +++ b/src/app/views/edition-view/models/source-description.model.ts @@ -127,6 +127,11 @@ export class SourceDescriptionDesc { */ desc?: string[]; + /** + * The string representation of a writing material used for a source (optional). + */ + writingMaterialString?: string; + /** * The writing material used for a source (optional). */ diff --git a/src/assets/data/edition/series/1/section/1/op24/source-description.json b/src/assets/data/edition/series/1/section/1/op24/source-description.json index fd3e7dba47..9116ae6493 100644 --- a/src/assets/data/edition/series/1/section/1/op24/source-description.json +++ b/src/assets/data/edition/series/1/section/1/op24/source-description.json @@ -10,7 +10,7 @@ "desc": [ "2 Blätter (Bl. 1–2). Rissspuren am linken Rand (Bl. 1, 2): von Bögen abgetrennt und beschnitten. Risse an den Rändern von Bl. 2. Kunststoffklebestreifen am linken Rand von Bl. 1r und 2v. Löcher von Reißzwecken oder Nadeln an Bl. 1 rechts und Bl. 2 links. Knickecken an beiden Blättern oben rechts. Horizontale Knickfalte an Bl. 2 unten (System 13). Archivalische Paginierung [1] bis [4] mit Bleistift auf Bl. 1–2 unten rechts oder links. Verso-Seiten bis auf die archivalische Paginierung unbeschriftet." ], - "writingMaterial": "Notenpapier, 12 Systeme (unten beschnitten), Format (quer): 198 × 267 mm, kein Firmenzeichen (Bl. 1);
Notenpapier, 13 Systeme (unten beschnitten), Format (quer): 209 × 267 mm, kein Firmenzeichen (Bl. 2).", + "writingMaterialString": "Notenpapier, 12 Systeme (unten beschnitten), Format (quer): 198 × 267 mm, kein Firmenzeichen (Bl. 1);
Notenpapier, 13 Systeme (unten beschnitten), Format (quer): 209 × 267 mm, kein Firmenzeichen (Bl. 2).", "writingInstruments": { "main": "schwarze Tinte", "secondary": ["Bleistift", "grüner Buntstift", "blauer Buntstift", "roter Buntstift"] diff --git a/src/assets/data/edition/series/1/section/2/op22/source-description.json b/src/assets/data/edition/series/1/section/2/op22/source-description.json index a2868954e2..9902e6e507 100644 --- a/src/assets/data/edition/series/1/section/2/op22/source-description.json +++ b/src/assets/data/edition/series/1/section/2/op22/source-description.json @@ -10,7 +10,7 @@ "desc": [ "3 Blätter (Bl. 1–3). Riss- bzw. Schnittspuren am rechten (Bl. 1, 2) bzw. linken Rand (Bl. 3): von Bögen abgetrennt und beschnitten. Kunststoffklebestreifen am linken Rand von Bl. 1r, 2r und 3v. Löcher von Reißzwecken oder Nadeln an den linken und rechten Rändern aller Blätter (außer Bl. 1 links und Bl. 3 rechts). Archivalische Paginierung [1] bis [6] mit Bleistift auf Bl. 1–3 unten rechts oder links. Bl. 2v bis auf die archivalische Paginierung unbeschriftet." ], - "writingMaterial": "Notenpapier, 8 Systeme (oben und unten beschnitten), Format (quer): 170–172 × 270 mm, kein Firmenzeichen (Bl. 1);
Notenpapier, 9 Systeme (oben, unten und rechts beschnitten), Format (quer): 135 × 255–260 mm, kein Firmenzeichen (Bl. 2);
Notenpapier, 7 Systeme (oben beschnitten), recto System 8 mit Bleistift handgezogen, Format (quer): 170 × 270 mm, kein Firmenzeichen (Bl. 3).", + "writingMaterialString": "Notenpapier, 8 Systeme (oben und unten beschnitten), Format (quer): 170–172 × 270 mm, kein Firmenzeichen (Bl. 1);
Notenpapier, 9 Systeme (oben, unten und rechts beschnitten), Format (quer): 135 × 255–260 mm, kein Firmenzeichen (Bl. 2);
Notenpapier, 7 Systeme (oben beschnitten), recto System 8 mit Bleistift handgezogen, Format (quer): 170 × 270 mm, kein Firmenzeichen (Bl. 3).", "writingInstruments": { "main": "Bleistift", "secondary": ["blauer Buntstift", "grüner Buntstift", "roter Buntstift", "schwarze Tinte"] diff --git a/src/assets/data/edition/series/1/section/2/op27/source-description.json b/src/assets/data/edition/series/1/section/2/op27/source-description.json index ad70f5ee75..ad79781436 100644 --- a/src/assets/data/edition/series/1/section/2/op27/source-description.json +++ b/src/assets/data/edition/series/1/section/2/op27/source-description.json @@ -9,7 +9,7 @@ "desc": [ "3 Blätter (Bl. 1–3). Rissspuren am rechten (Bl. 1) bzw. linken Rand (Bl. 2, 3): von Bögen abgetrennt und beschnitten. Kunststoffklebestreifen am linken (recto) Rand von Bl. 1, 2 und 3. Löcher von Reißzwecken oder Nadeln an den linken und rechten Rändern aller Blätter (außer Bl. 1 links). Archivalische Paginierung [1] bis [6] mit Bleistift auf Bl. 1r–3v unten rechts oder links. Verso-Seiten bis auf die archivalische Paginierung unbeschriftet." ], - "writingMaterial": "Notenpapier, 8 Systeme (unten beschnitten), Format (quer): 141 × 268 mm, kein Firmenzeichen (Bl. 1);
Notenpapier, 8 Systeme (unten beschnitten), Format (quer): 143 × 268 mm, kein Firmenzeichen (Bl. 2);
Notenpapier, 8 Systeme (unten beschnitten), Format (quer): 146–149 × 270 mm, Firmenzeichen:

auf dem Kopf stehend auf Bl. 3v oben rechts (Bl. 3).", + "writingMaterialString": "Notenpapier, 8 Systeme (unten beschnitten), Format (quer): 141 × 268 mm, kein Firmenzeichen (Bl. 1);
Notenpapier, 8 Systeme (unten beschnitten), Format (quer): 143 × 268 mm, kein Firmenzeichen (Bl. 2);
Notenpapier, 8 Systeme (unten beschnitten), Format (quer): 146–149 × 270 mm, Firmenzeichen:

auf dem Kopf stehend auf Bl. 3v oben rechts (Bl. 3).", "writingInstruments": { "main": "schwarze Tinte", "secondary": ["Bleistift", "blauer Buntstift", "grüner Buntstift", "roter Buntstift"] diff --git a/src/assets/data/edition/series/1/section/3/op19/source-description.json b/src/assets/data/edition/series/1/section/3/op19/source-description.json index c5e5c9ebf0..d8124b228d 100644 --- a/src/assets/data/edition/series/1/section/3/op19/source-description.json +++ b/src/assets/data/edition/series/1/section/3/op19/source-description.json @@ -10,7 +10,7 @@ "desc": [ "1 Blatt (Bl. 1). Rissspuren am linken Rand: von Bogen abgetrennt und beschnitten. Abriss an der oberen rechten Ecke. Zwei Risse am rechten Rand. Archivalische Paginierung [1] bis [2] unten links oder rechts. Verso-Seite bis auf die archivalische Paginierung unbeschriftet." ], - "writingMaterial": "Notenpapier, 12 Systeme (unten beschnitten), Format (quer): 163 × 255 mm, kein Firmenzeichen.", + "writingMaterialString": "Notenpapier, 12 Systeme (unten beschnitten), Format (quer): 163 × 255 mm, kein Firmenzeichen.", "writingInstruments": { "main": "Bleistift", "secondary": ["blauer Buntstift", "grüner Buntstift", "roter Buntstift", "Kopierstift"] diff --git a/src/assets/data/edition/series/1/section/5/op12/source-description.json b/src/assets/data/edition/series/1/section/5/op12/source-description.json index 9af2abbd86..47b44b1184 100644 --- a/src/assets/data/edition/series/1/section/5/op12/source-description.json +++ b/src/assets/data/edition/series/1/section/5/op12/source-description.json @@ -18,7 +18,7 @@ "desc": [ "2 Blätter (Bl. 1–2). Archivalische Paginierung [1] bis [4] unten links (recto) bzw. rechts (verso) mit Bleistift. Bl. 2v mit Ausnahme der archivalischen Paginierung unbeschriftet. Rissspuren am linken und oberen Rand: Blätter von Bogen abgetrennt und im Format verändert." ], - "writingMaterial": "Notenpapier, 14 Systeme, Format: quer ca. 160–180 × 267 mm, Firmenzeichen:

auf Bl. 1r unten links (Bl. 1);
Notenpapier, 16 Systeme, Format: quer 175 × 270 mm, kein Firmenzeichen (Bl. 2).", + "writingMaterialString": "Notenpapier, 14 Systeme, Format: quer ca. 160–180 × 267 mm, Firmenzeichen:

auf Bl. 1r unten links (Bl. 1);
Notenpapier, 16 Systeme, Format: quer 175 × 270 mm, kein Firmenzeichen (Bl. 2).", "writingInstruments": { "main": "Bleistift", "secondary": [] @@ -205,7 +205,7 @@ "desc": [ "1 Blatt (Bl. 1). Archivalische Paginierung von [1] bis [2] unten links (recto) bzw. links (verso). Rissspuren am linken Rand: von Bogen abgetrennt. Knickecken und Flecke auf Bl. 1r oben rechts; blaue Tintenflecke auf Bl. 1r unten rechts; Flecke auf Bl. 1v; blaue Tintenflecke auf Bl. 1v unten rechts und am rechten Rand." ], - "writingMaterial": "Notenpapier, 12 Systeme, Format: hoch 346 × 266 mm, Firmenzeichen:

auf Bl. 1r unten links.", + "writingMaterialString": "Notenpapier, 12 Systeme, Format: hoch 346 × 266 mm, Firmenzeichen:

auf Bl. 1r unten links.", "writingInstruments": { "main": "schwarze Tinte", "secondary": ["rote Tinte [Teile des Titels und vertonter Text]", "Bleistift"] diff --git a/src/assets/data/edition/series/1/section/5/op23/source-description.json b/src/assets/data/edition/series/1/section/5/op23/source-description.json index 84e89c9dd6..47b471f59c 100644 --- a/src/assets/data/edition/series/1/section/5/op23/source-description.json +++ b/src/assets/data/edition/series/1/section/5/op23/source-description.json @@ -7,11 +7,10 @@ "type": "Reihentabelle.", "location": "CH-Bps, Sammlung Anton Webern.", "description": { - "desc:": [ - "1 Bogen (Bl. 1/2). Unterer Rand beschnitten. Archivalische Paginierung [1] bis [4] mit Bleistift unten rechts oder links. Bl. 1v–2v bis auf die archivalische Paginierung unbeschriftet.", - "Beschreibstoff: Notenpapier, 4 Systeme (unten beschnitten), Format (quer): 74 × 270 mm, kein Firmenzeichen (Bl. 1/2)." + "desc": [ + "1 Bogen (Bl. 1/2). Unterer Rand beschnitten. Archivalische Paginierung [1] bis [4] mit Bleistift unten rechts oder links. Bl. 1v–2v bis auf die archivalische Paginierung unbeschriftet." ], - "writingMaterial": "", + "writingMaterialString": "Notenpapier, 4 Systeme (unten beschnitten), Format (quer): 74 × 270 mm, kein Firmenzeichen (Bl. 1/2).", "writingInstruments": { "main": "Bleistift", "secondary": ["roter Buntstift"] diff --git a/src/assets/data/edition/series/1/section/5/op25/source-description.json b/src/assets/data/edition/series/1/section/5/op25/source-description.json index 0525252677..7b308c275e 100644 --- a/src/assets/data/edition/series/1/section/5/op25/source-description.json +++ b/src/assets/data/edition/series/1/section/5/op25/source-description.json @@ -8,7 +8,7 @@ "location": "CH-Bps, Sammlung Anton Webern.", "description": { "desc": ["2 Seiten in Skizzenbuch 3: Bl. 38v–39r."], - "writingMaterial": "Notenpapier, 16 Systeme, Format: quer 270 × 335 mm, Firmenzeichen:

auf Bl. 39r unten links (Bl. 38–39).", + "writingMaterialString": "Notenpapier, 16 Systeme, Format: quer 270 × 335 mm, Firmenzeichen:

auf Bl. 39r unten links (Bl. 38–39).", "writingInstruments": { "main": "Bleistift", "secondary": ["grüner Buntstift", "roter Buntstift", "schwarzer Buntstift"] @@ -508,7 +508,7 @@ "desc": [ "4 Blätter (Bl. 1–4): 2 ineinander gelegte Bögen (Bl. 1/4, 2/3), archivalische Paginierung von [1] bis [8] auf Bl. 1r–4v innere Seitenecken unten mit Bleistift, mit Ausnahme der archivalischen Paginierung unbeschriftet: Bl. 3v–4v. Archivalischer Eintrag [op. 25 no. 1] auf Bl. 1r unten halbrechts mit Bleistift." ], - "writingMaterial": "Notenpapier, 12 Systeme, Format: hoch 340 × 270 mm, Firmenzeichen:

auf Bl. 1r und 2r unten links (Bl. 1–2).", + "writingMaterialString": "Notenpapier, 12 Systeme, Format: hoch 340 × 270 mm, Firmenzeichen:

auf Bl. 1r und 2r unten links (Bl. 1–2).", "writingInstruments": { "main": "schwarze Tinte", "secondary": "Bleistift" @@ -612,7 +612,7 @@ "desc": [ "1 Blatt (Bl. 1). Rissspuren am linken Rand: von Bogen abgetrennt und beschnitten. Löcher von Reißzwecken oben Mitte und rechts sowie System 7 Mitte. Archivalische Paginierung [1] bis [2] mit Bleistift unten rechts oder links. Verso-Seite bis auf die archivalische Paginierung unbeschriftet." ], - "writingMaterial": "Notenpapier, 7 Systeme (oben beschnitten), Format: quer 169 × 267 mm, Firmenzeichen:

auf Bl. 1r unten links (Bl. 1).", + "writingMaterialString": "Notenpapier, 7 Systeme (oben beschnitten), Format: quer 169 × 267 mm, Firmenzeichen:

auf Bl. 1r unten links (Bl. 1).", "writingInstruments": { "main": "Bleistift", "secondary": ["blauer Buntstift", "grüner Buntstift", "roter Buntstift"] diff --git a/src/assets/data/edition/series/2/section/2a/m30/source-description.json b/src/assets/data/edition/series/2/section/2a/m30/source-description.json index a06dc3690e..ceaf82eaf9 100644 --- a/src/assets/data/edition/series/2/section/2a/m30/source-description.json +++ b/src/assets/data/edition/series/2/section/2a/m30/source-description.json @@ -10,7 +10,7 @@ "desc": [ "2 Blätter (Bl. 1–2). Schnittspuren am rechten Rand von Bl. 1: von Bogen abgeschnitten. Riss unten Mitte sowie Ecke oben links abgetrennt auf Bl. 1. Rissspuren am rechten Rand von Bl. 2: von Bogen abgetrennt. Kleiner Risse am linken Rand von Bl. 2." ], - "writingMaterial": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen: [J.E. & Co.] | No. 5 | 18 linig. unten links auf Bl. 1v–2v.", + "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen: [J.E. & Co.] | No. 5 | 18 linig. unten links auf Bl. 1v–2v.", "writingInstruments": { "main": "Bleistift", "secondary": [] @@ -455,7 +455,7 @@ "location": "CH-Bps, Sammlung Anton Webern.", "description": { "desc": ["1 Blatt. Schnittspuren am rechten Rand: von Bogen abgeschnitten."], - "writingMaterial": "Notenpapier, 18 Systeme, Format: hoch 347 × 265 mm, Firmenzeichen:

unten links auf Bl. 1v.", + "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 347 × 265 mm, Firmenzeichen:

unten links auf Bl. 1v.", "writingInstruments": { "main": "schwarze Tinte", "secondary": ["Bleistift"] diff --git a/src/assets/data/edition/series/2/section/2a/m31/source-description.json b/src/assets/data/edition/series/2/section/2a/m31/source-description.json index 7d3c8bf6c1..331085350d 100644 --- a/src/assets/data/edition/series/2/section/2a/m31/source-description.json +++ b/src/assets/data/edition/series/2/section/2a/m31/source-description.json @@ -10,7 +10,7 @@ "desc": [ "2 Blätter (Bl. 1–2). Schnittspuren am rechten Rand von Bl. 1: von Bogen abgeschnitten. Riss unten Mitte sowie Ecke oben links abgetrennt auf Bl. 1. Rissspuren am rechten Rand von Bl. 2: von Bogen abgetrennt. Kleiner Risse am linken Rand von Bl. 2." ], - "writingMaterial": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen: [J.E. & Co.] | No. 5 | 18 linig. unten links auf Bl. 1v–2v.", + "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen: [J.E. & Co.] | No. 5 | 18 linig. unten links auf Bl. 1v–2v.", "writingInstruments": { "main": "Bleistift", "secondary": [] @@ -455,7 +455,7 @@ "location": "CH-Bps, Sammlung Anton Webern.", "description": { "desc": ["1 Blatt. Schnittspuren am rechten Rand: von Bogen abgeschnitten."], - "writingMaterial": "Notenpapier, 18 Systeme, Format: hoch 347 × 265 mm, Firmenzeichen:

unten links auf Bl. 1v.", + "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 347 × 265 mm, Firmenzeichen:

unten links auf Bl. 1v.", "writingInstruments": { "main": "schwarze Tinte", "secondary": ["Bleistift"] diff --git a/src/assets/data/edition/series/2/section/2a/m34/source-description.json b/src/assets/data/edition/series/2/section/2a/m34/source-description.json index d0e675b6ba..61be73162e 100644 --- a/src/assets/data/edition/series/2/section/2a/m34/source-description.json +++ b/src/assets/data/edition/series/2/section/2a/m34/source-description.json @@ -10,7 +10,7 @@ "desc": [ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 1/2) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8)." ], - "writingMaterial": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", + "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", "writingInstruments": { "main": "Bleistift", "secondary": [] @@ -599,7 +599,7 @@ "desc": [ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 3/4) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8). Stockfleck und rötliche Verfärbung mittig am oberen Rand des Bogens." ], - "writingMaterial": "Notenpapier, 18 Systeme, Format: hoch 349 × 267 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", + "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 267 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", "writingInstruments": { "main": "schwarze Tinte", "secondary": ["Bleistift"] diff --git a/src/assets/data/edition/series/2/section/2a/m35_42/source-description.json b/src/assets/data/edition/series/2/section/2a/m35_42/source-description.json index 652a4d1752..01998515d6 100644 --- a/src/assets/data/edition/series/2/section/2a/m35_42/source-description.json +++ b/src/assets/data/edition/series/2/section/2a/m35_42/source-description.json @@ -10,7 +10,7 @@ "desc": [ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 1/2) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8)." ], - "writingMaterial": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", + "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", "writingInstruments": { "main": "Bleistift", "secondary": [] @@ -599,7 +599,7 @@ "desc": [ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 7/8) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8). Kleiner Riss am rechten Rand von Bl. 2." ], - "writingMaterial": "Notenpapier, 18 Systeme, Format: hoch 348 × 266 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", + "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 348 × 266 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", "writingInstruments": { "main": "Bleistift", "secondary": [] @@ -945,7 +945,7 @@ "desc": [ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 3/4) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8). Stockfleck und rötliche Verfärbung mittig am oberen Rand des Bogens." ], - "writingMaterial": "Notenpapier, 18 Systeme, Format: hoch 349 × 267 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", + "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 267 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", "writingInstruments": { "main": "schwarze Tinte", "secondary": ["Bleistift"] @@ -1323,7 +1323,7 @@ "location": "CH-Bps, Sammlung Anton Webern.", "description": { "desc": [ - "1 Blatt: Das Blatt ist Bestandteil (Bl. 5) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8). Rissspuren am linken Rand: von Bogen abgetrennt." + "1 Blatt (Bl. 1): Das Blatt ist Bestandteil (Bl. 5) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8). Rissspuren am linken Rand: von Bogen abgetrennt." ], "writingMaterial": "Notenpapier, 18 Systeme, Format: hoch 347 × 265 mm, Firmenzeichen:

unten links auf Bl. 1r.", "writingInstruments": { diff --git a/src/assets/data/edition/series/2/section/2a/m37/source-description.json b/src/assets/data/edition/series/2/section/2a/m37/source-description.json index b7b8772974..2e0975fa71 100644 --- a/src/assets/data/edition/series/2/section/2a/m37/source-description.json +++ b/src/assets/data/edition/series/2/section/2a/m37/source-description.json @@ -10,7 +10,7 @@ "desc": [ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 1/2) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8)." ], - "writingMaterial": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", + "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", "writingInstruments": { "main": "Bleistift", "secondary": [] @@ -599,7 +599,7 @@ "desc": [ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 3/4) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8). Stockfleck und rötliche Verfärbung mittig am oberen Rand des Bogens." ], - "writingMaterial": "Notenpapier, 18 Systeme, Format: hoch 349 × 267 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", + "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 267 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", "writingInstruments": { "main": "schwarze Tinte", "secondary": ["Bleistift"] From cf8c69891ba61df6e043a55c4887a7fa4ab699ae Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Wed, 21 Feb 2024 18:45:54 +0100 Subject: [PATCH 09/63] test(edition): fix tests for writing material --- .../source-description/source-description.component.spec.ts | 2 +- src/testing/mock-data/mockEditionData.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.spec.ts index a7fecd5073..bbbf3e20dc 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.spec.ts @@ -329,7 +329,7 @@ describe('SourceDescriptionComponent (DONE)', () => { const expectedHtmlTextContent = mockDocument.createElement('p'); expectedHtmlTextContent.innerHTML = 'Beschreibstoff: ' + - expectedSourceDescriptionListData.sources[1].description.writingMaterial + + expectedSourceDescriptionListData.sources[1].description.writingMaterialString + ''; expect(pEl).toHaveClass('awg-source-description-writing-material'); diff --git a/src/testing/mock-data/mockEditionData.ts b/src/testing/mock-data/mockEditionData.ts index 421df67dc3..d768943d30 100644 --- a/src/testing/mock-data/mockEditionData.ts +++ b/src/testing/mock-data/mockEditionData.ts @@ -227,7 +227,7 @@ export const mockEditionData = { desc: [ '2 Blätter (Bl. 1–2). Archivalische Paginierung [1] bis [4] unten links (recto) bzw. rechts (verso) mit Bleistift. Bl. 2v mit Ausnahme der archivalischen Paginierung unbeschriftet. Rissspuren am linken und oberen Rand: Blätter von Bogen abgetrennt und im Format verändert. Zeichen ergänzt mit Blick auf Textfassung 2', ], - writingMaterial: + writingMaterialString: 'Notenpapier, 14 Systeme, Format: quer ca. 160–180 × 267 mm, Firmenzeichen:

auf Bl. 1r unten links (Bl. 1);
Notenpapier, 16 Systeme, Format: quer 175 × 270 mm, kein Firmenzeichen (Bl. 2).', writingInstruments: { main: 'Bleistift', From df59bab38903e33a046714f4344e82e8ba9f52d1 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Thu, 22 Feb 2024 11:23:43 +0100 Subject: [PATCH 10/63] fix(assets): fix folio info for firm signs in vol. II/2a --- .../edition/series/2/section/2a/m30/source-description.json | 2 +- .../edition/series/2/section/2a/m31/source-description.json | 2 +- .../edition/series/2/section/2a/m34/source-description.json | 4 ++-- .../series/2/section/2a/m35_42/source-description.json | 6 +++--- .../edition/series/2/section/2a/m37/source-description.json | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/assets/data/edition/series/2/section/2a/m30/source-description.json b/src/assets/data/edition/series/2/section/2a/m30/source-description.json index ceaf82eaf9..36424d90ea 100644 --- a/src/assets/data/edition/series/2/section/2a/m30/source-description.json +++ b/src/assets/data/edition/series/2/section/2a/m30/source-description.json @@ -10,7 +10,7 @@ "desc": [ "2 Blätter (Bl. 1–2). Schnittspuren am rechten Rand von Bl. 1: von Bogen abgeschnitten. Riss unten Mitte sowie Ecke oben links abgetrennt auf Bl. 1. Rissspuren am rechten Rand von Bl. 2: von Bogen abgetrennt. Kleiner Risse am linken Rand von Bl. 2." ], - "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen: [J.E. & Co.] | No. 5 | 18 linig. unten links auf Bl. 1v–2v.", + "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen: [J.E. & Co.] | No. 5 | 18 linig. unten links auf Bl. 1v und 2v.", "writingInstruments": { "main": "Bleistift", "secondary": [] diff --git a/src/assets/data/edition/series/2/section/2a/m31/source-description.json b/src/assets/data/edition/series/2/section/2a/m31/source-description.json index 331085350d..1247c35d3c 100644 --- a/src/assets/data/edition/series/2/section/2a/m31/source-description.json +++ b/src/assets/data/edition/series/2/section/2a/m31/source-description.json @@ -10,7 +10,7 @@ "desc": [ "2 Blätter (Bl. 1–2). Schnittspuren am rechten Rand von Bl. 1: von Bogen abgeschnitten. Riss unten Mitte sowie Ecke oben links abgetrennt auf Bl. 1. Rissspuren am rechten Rand von Bl. 2: von Bogen abgetrennt. Kleiner Risse am linken Rand von Bl. 2." ], - "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen: [J.E. & Co.] | No. 5 | 18 linig. unten links auf Bl. 1v–2v.", + "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen: [J.E. & Co.] | No. 5 | 18 linig. unten links auf Bl. 1v und 2v.", "writingInstruments": { "main": "Bleistift", "secondary": [] diff --git a/src/assets/data/edition/series/2/section/2a/m34/source-description.json b/src/assets/data/edition/series/2/section/2a/m34/source-description.json index 61be73162e..f7eabb1640 100644 --- a/src/assets/data/edition/series/2/section/2a/m34/source-description.json +++ b/src/assets/data/edition/series/2/section/2a/m34/source-description.json @@ -10,7 +10,7 @@ "desc": [ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 1/2) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8)." ], - "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", + "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen:

unten links auf Bl. 1r und 2r.", "writingInstruments": { "main": "Bleistift", "secondary": [] @@ -599,7 +599,7 @@ "desc": [ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 3/4) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8). Stockfleck und rötliche Verfärbung mittig am oberen Rand des Bogens." ], - "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 267 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", + "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 267 mm, Firmenzeichen:

unten links auf Bl. 1r und 2r.", "writingInstruments": { "main": "schwarze Tinte", "secondary": ["Bleistift"] diff --git a/src/assets/data/edition/series/2/section/2a/m35_42/source-description.json b/src/assets/data/edition/series/2/section/2a/m35_42/source-description.json index 01998515d6..3a8b22358c 100644 --- a/src/assets/data/edition/series/2/section/2a/m35_42/source-description.json +++ b/src/assets/data/edition/series/2/section/2a/m35_42/source-description.json @@ -10,7 +10,7 @@ "desc": [ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 1/2) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8)." ], - "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", + "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen:

unten links auf Bl. 1r und 2r.", "writingInstruments": { "main": "Bleistift", "secondary": [] @@ -599,7 +599,7 @@ "desc": [ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 7/8) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8). Kleiner Riss am rechten Rand von Bl. 2." ], - "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 348 × 266 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", + "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 348 × 266 mm, Firmenzeichen:

unten links auf Bl. 1r und 2r.", "writingInstruments": { "main": "Bleistift", "secondary": [] @@ -945,7 +945,7 @@ "desc": [ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 3/4) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8). Stockfleck und rötliche Verfärbung mittig am oberen Rand des Bogens." ], - "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 267 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", + "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 267 mm, Firmenzeichen:

unten links auf Bl. 1r und 2r.", "writingInstruments": { "main": "schwarze Tinte", "secondary": ["Bleistift"] diff --git a/src/assets/data/edition/series/2/section/2a/m37/source-description.json b/src/assets/data/edition/series/2/section/2a/m37/source-description.json index 2e0975fa71..625ff20422 100644 --- a/src/assets/data/edition/series/2/section/2a/m37/source-description.json +++ b/src/assets/data/edition/series/2/section/2a/m37/source-description.json @@ -10,7 +10,7 @@ "desc": [ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 1/2) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8)." ], - "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", + "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen:

unten links auf Bl. 1r und 2r.", "writingInstruments": { "main": "Bleistift", "secondary": [] @@ -599,7 +599,7 @@ "desc": [ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 3/4) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8). Stockfleck und rötliche Verfärbung mittig am oberen Rand des Bogens." ], - "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 267 mm, Firmenzeichen:

unten links auf Bl. 1r–2r.", + "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 267 mm, Firmenzeichen:

unten links auf Bl. 1r und 2r.", "writingInstruments": { "main": "schwarze Tinte", "secondary": ["Bleistift"] From 1167e4004c946c9e2e86c3812a5c225095459844 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Thu, 22 Feb 2024 13:46:20 +0100 Subject: [PATCH 11/63] refactor(edition): use helper method for writing instruments --- .../source-description.component.html | 30 +------- .../source-description.component.spec.ts | 68 ++++++++++++++++++- .../source-description.component.ts | 19 +++++- .../1/section/5/op25/source-description.json | 2 +- src/testing/mock-data/mockEditionData.ts | 2 +- 5 files changed, 88 insertions(+), 33 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.html b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.html index 8d63cdd861..30428c7407 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.html +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.html @@ -52,33 +52,9 @@ @if (sourceDescription.description.writingInstruments.main) {

Schreibstoff:  - - @if ( - utils.isNotEmptyArray( - sourceDescription.description.writingInstruments.secondary - ) - ) { - - @for ( - secondary of sourceDescription?.description?.writingInstruments - ?.secondary; - track secondary; - let last = $last - ) { - - - @if (!last) { - - } @else { - . - } - - } - } @else { - . - } + {{ + getWritingInstruments(sourceDescription.description.writingInstruments) + }}

} } diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.spec.ts index bbbf3e20dc..67169c3107 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.spec.ts @@ -17,7 +17,7 @@ import { RouterLinkStubDirective } from '@testing/router-stubs'; import { UtilityService } from '@awg-core/services'; import { CompileHtmlComponent } from '@awg-shared/compile-html'; import { EDITION_FIRM_SIGNS_DATA } from '@awg-views/edition-view/data'; -import { SourceDescriptionList } from '@awg-views/edition-view/models'; +import { SourceDescriptionList, SourceDescriptionWritingInstruments } from '@awg-views/edition-view/models'; import { SourceDescriptionComponent } from './source-description.component'; @@ -350,8 +350,8 @@ describe('SourceDescriptionComponent (DONE)', () => { expectedHtmlTextContent.innerHTML = 'Schreibstoff: ' + instruments.main + - '; ' + - instruments.secondary.join(', ') + + '; ' + + instruments.secondary.join(', ') + '.'; expect(pEl).toHaveClass('awg-source-description-writing-instruments'); @@ -1107,6 +1107,68 @@ describe('SourceDescriptionComponent (DONE)', () => { }); }); + describe('#getWritingInstruments()', () => { + it('... should have a method `getWritingInstruments`', () => { + expect(component.getWritingInstruments).toBeDefined(); + }); + + describe('... should return only main writing instrument when', () => { + it('... secondary is undefined', () => { + const writingInstruments: SourceDescriptionWritingInstruments = { + main: 'main instrument', + secondary: undefined, + }; + + const result = component.getWritingInstruments(writingInstruments); + + expectToBe(result, 'main instrument.'); + }); + + it('... secondary is an empty array', () => { + const writingInstruments: SourceDescriptionWritingInstruments = { + main: 'main instrument', + secondary: [], + }; + + const result = component.getWritingInstruments(writingInstruments); + + expectToBe(result, 'main instrument.'); + }); + }); + + it('... should return main and a single secondary writing instrument if provided', () => { + const writingInstruments: SourceDescriptionWritingInstruments = { + main: 'main instrument', + secondary: ['secondary1'], + }; + + const result = component.getWritingInstruments(writingInstruments); + + expectToBe(result, 'main instrument; secondary1.'); + }); + + it('... should return main and mulitple secondary writing instruments if provided', () => { + const writingInstruments: SourceDescriptionWritingInstruments = { + main: 'main instrument', + secondary: ['secondary1', 'secondary2', 'secondary3'], + }; + + const result = component.getWritingInstruments(writingInstruments); + + expectToBe(result, 'main instrument; secondary1, secondary2, secondary3.'); + }); + + it('... should handle case when main is undefined', () => { + const writingInstruments: SourceDescriptionWritingInstruments = { + main: undefined, + secondary: ['secondary1', 'secondary2'], + }; + + const result = component.getWritingInstruments(writingInstruments); + + expectToBe(result, 'undefined; secondary1, secondary2.'); + }); + }); describe('#openModal()', () => { it('... should have a method `openModal`', () => { expect(component.openModal).toBeDefined(); diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.ts index 08fc9f21e6..f5ebb400e9 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.ts @@ -2,7 +2,7 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from import { UtilityService } from '@awg-core/services'; import { EDITION_FIRM_SIGNS_DATA } from '@awg-views/edition-view/data'; -import { SourceDescriptionList } from '@awg-views/edition-view/models'; +import { SourceDescriptionList, SourceDescriptionWritingInstruments } from '@awg-views/edition-view/models'; /** * The SourceDescription component. @@ -100,6 +100,23 @@ export class SourceDescriptionComponent { this.ref = this; } + /** + * Public method: getWritingInstruments. + * + * It retrieves the string representation of the writing instruments + * provided in the source description. + * + * @param {SourceDescriptionWritingInstruments} writingInstruments The given writing instruments data. + * @returns {string} The retrieved writing instruments string. + */ + getWritingInstruments(writingInstruments: SourceDescriptionWritingInstruments): string { + const secondaryInstruments = writingInstruments.secondary?.join(', '); + const instrumentsString = secondaryInstruments + ? `${writingInstruments.main}; ${secondaryInstruments}` + : writingInstruments.main; + + return `${instrumentsString}.`; + } /** * Public method: openModal. * diff --git a/src/assets/data/edition/series/1/section/5/op25/source-description.json b/src/assets/data/edition/series/1/section/5/op25/source-description.json index 7b308c275e..066e8093a0 100644 --- a/src/assets/data/edition/series/1/section/5/op25/source-description.json +++ b/src/assets/data/edition/series/1/section/5/op25/source-description.json @@ -511,7 +511,7 @@ "writingMaterialString": "Notenpapier, 12 Systeme, Format: hoch 340 × 270 mm, Firmenzeichen:

auf Bl. 1r und 2r unten links (Bl. 1–2).", "writingInstruments": { "main": "schwarze Tinte", - "secondary": "Bleistift" + "secondary": ["Bleistift"] }, "title": "„Wie bin ich froh!“ | von Hildegard Jone [Mitte] | Anton Webern [halbrechts] auf Bl. 2r System 1–2.", "date": "David Josef Bach | zum 60. Geburtstag | 13. VIII. 1934 [System 6–7 Mitte] | von seinem Anton Webern [System 11 rechts] auf Bl. 1r; 1934 vertikal aufsteigend auf Bl. 3r System 3–4 nach T. 12.", diff --git a/src/testing/mock-data/mockEditionData.ts b/src/testing/mock-data/mockEditionData.ts index d768943d30..9039d2a050 100644 --- a/src/testing/mock-data/mockEditionData.ts +++ b/src/testing/mock-data/mockEditionData.ts @@ -231,7 +231,7 @@ export const mockEditionData = { 'Notenpapier, 14 Systeme, Format: quer ca. 160–180 × 267 mm, Firmenzeichen:

auf Bl. 1r unten links (Bl. 1);
Notenpapier, 16 Systeme, Format: quer 175 × 270 mm, kein Firmenzeichen (Bl. 2).', writingInstruments: { main: 'Bleistift', - secondary: ['roter Buntstrift', 'blaue Tinte', 'Kopierstift'], + secondary: ['roter Buntstift', 'blaue Tinte', 'Kopierstift'], }, title: 'test title', date: 'test date', From 7aa0937cd22570b8989e3d7285c77ca31d09a393 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Thu, 22 Feb 2024 16:27:51 +0100 Subject: [PATCH 12/63] feat(edition): datafy writing material of source description --- .../source-description.component.html | 75 ++++- .../source-description.component.spec.ts | 276 +++++++++++++++++- .../source-description.component.ts | 102 ++++++- src/app/views/edition-view/models/index.ts | 15 +- .../models/source-description.model.ts | 175 ++++++++++- .../1/section/1/op24/source-description.json | 64 ++++ .../1/section/2/op22/source-description.json | 95 ++++++ .../1/section/2/op27/source-description.json | 95 ++++++ .../1/section/3/op19/source-description.json | 33 +++ .../1/section/5/op12/source-description.json | 97 ++++++ .../1/section/5/op23/source-description.json | 33 +++ .../1/section/5/op25/source-description.json | 99 +++++++ .../2/section/2a/m30/source-description.json | 68 ++++- .../2/section/2a/m31/source-description.json | 68 ++++- .../2/section/2a/m34/source-description.json | 66 +++++ .../section/2a/m35_42/source-description.json | 133 ++++++++- .../2/section/2a/m37/source-description.json | 66 +++++ 17 files changed, 1548 insertions(+), 12 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.html b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.html index 30428c7407..a80d02610a 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.html +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.html @@ -39,7 +39,10 @@ } } - @if (sourceDescription.description.writingMaterialString) { + @if ( + sourceDescription.description.writingMaterialString && + !sourceDescription.description.writingMaterial + ) {

Beschreibstoff: 

} + @if (sourceDescription.description.writingMaterial) { +

+ Beschreibstoff:  + + @for ( + writingMaterial of sourceDescription?.description?.writingMaterial; + track writingMaterial; + let lastWritingMaterial = $last + ) { + @if (writingMaterial.paperType) { + {{ + writingMaterial.paperType + }}, + } + @if (utils.isNotEmptyObject(writingMaterial.systems)) { + + {{ getWritingMaterialSystems(writingMaterial.systems) }}, + + } + @if (utils.isNotEmptyObject(writingMaterial.format)) { + + {{ getWritingMaterialFormat(writingMaterial.format) }}, + } + @if ( + utils.isNotEmptyObject(writingMaterial.firmSign) && + (writingMaterial.firmSign?.variant || writingMaterial.firmSign?.alt) + ) { + Firmenzeichen: + @if (writingMaterial.firmSign.variant) { +

+ } @else { +   + } +
+ @for (location of writingMaterial.firmSign.location; track location) { + + } + } @else { + kein Firmenzeichen + } + @if (writingMaterial.folioAddendum) { +  (Bl. {{ writingMaterial.folioAddendum }}) + } + @if (!lastWritingMaterial) { + ;
+ } @else { + . + } + } +

+ } @if (utils.isNotEmptyObject(sourceDescription.description.writingInstruments)) { @if (sourceDescription.description.writingInstruments.main) { diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.spec.ts index 67169c3107..392f54d655 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.spec.ts @@ -17,7 +17,13 @@ import { RouterLinkStubDirective } from '@testing/router-stubs'; import { UtilityService } from '@awg-core/services'; import { CompileHtmlComponent } from '@awg-shared/compile-html'; import { EDITION_FIRM_SIGNS_DATA } from '@awg-views/edition-view/data'; -import { SourceDescriptionList, SourceDescriptionWritingInstruments } from '@awg-views/edition-view/models'; +import { + SourceDescriptionList, + SourceDescriptionWritingInstruments, + SourceDescriptionWritingMaterialFirmSignLocation, + SourceDescriptionWritingMaterialFormat, + SourceDescriptionWritingMaterialSystems, +} from '@awg-views/edition-view/models'; import { SourceDescriptionComponent } from './source-description.component'; @@ -1169,6 +1175,274 @@ describe('SourceDescriptionComponent (DONE)', () => { expectToBe(result, 'undefined; secondary1, secondary2.'); }); }); + + describe('#getWritingMaterialFirmSign()', () => { + it('... should have a method `getWritingMaterialFirmSign`', () => { + expect(component.getWritingMaterialFirmSign).toBeDefined(); + }); + + it('... should return the correct firm sign when variant is provided and exists in firm sign data', () => { + const variant = 'FIRM_JE_NO_2_LIN_12'; + + const result = component.getWritingMaterialFirmSign(variant); + + expectToEqual(result, EDITION_FIRM_SIGNS_DATA[variant]); + }); + + it('... should return unknown firm sign when variant is provided but does not exist in firm sign data', () => { + const variant = 'nonexistent'; + + const result = component.getWritingMaterialFirmSign(variant); + + expectToEqual(result, { route: '', full: 'Not a known firm sign.', short: 'unknown' }); + }); + + it('... should return unknown firm sign when variant is not provided', () => { + let variant = null; + + const result1 = component.getWritingMaterialFirmSign(variant); + + expect(result1).toEqual({ route: '', full: 'Not a known firm sign.', short: 'unknown' }); + + variant = undefined; + + const result2 = component.getWritingMaterialFirmSign(variant); + + expect(result2).toEqual({ route: '', full: 'Not a known firm sign.', short: 'unknown' }); + }); + }); + + describe('#getWritingMaterialFirmSignLocation()', () => { + it('... should have a method `getWritingMaterialFirmSignLocation`', () => { + expect(component.getWritingMaterialFirmSignLocation).toBeDefined(); + }); + + describe('... should return empty string', () => { + it('... if location is undefined', () => { + const location: SourceDescriptionWritingMaterialFirmSignLocation = undefined; + + const result = component.getWritingMaterialFirmSignLocation(location); + + expectToBe(result, ''); + }); + + it('... if location is an empty object', () => { + const location: SourceDescriptionWritingMaterialFirmSignLocation = {}; + + const result = component.getWritingMaterialFirmSignLocation(location); + + expectToBe(result, ''); + }); + + it('... if position is undefined', () => { + const location: SourceDescriptionWritingMaterialFirmSignLocation = { + info: '', + folios: ['1'], + position: undefined, + }; + + const result = component.getWritingMaterialFirmSignLocation(location); + + expectToBe(result, ''); + }); + + it('... if folios are undefined', () => { + const location: SourceDescriptionWritingMaterialFirmSignLocation = { + info: '', + folios: undefined, + position: 'bottom', + }; + const result = component.getWritingMaterialFirmSignLocation(location); + expectToBe(result, ''); + }); + + it('... if folios array is empty', () => { + const location: SourceDescriptionWritingMaterialFirmSignLocation = { + info: '', + folios: [], + position: 'top', + }; + const result = component.getWritingMaterialFirmSignLocation(location); + expectToBe(result, ''); + }); + }); + + describe('... should return correct location string', () => { + it('... for a single folio', () => { + const location: SourceDescriptionWritingMaterialFirmSignLocation = { + info: '', + folios: ['1'], + position: 'top', + }; + + const result = component.getWritingMaterialFirmSignLocation(location); + + expectToBe(result, 'auf Bl. 1 top'); + }); + + it('... for two folios', () => { + const location: SourceDescriptionWritingMaterialFirmSignLocation = { + info: '', + folios: ['1', '2'], + position: 'bottom', + }; + const result = component.getWritingMaterialFirmSignLocation(location); + expectToBe(result, 'auf Bl. 1 und 2 bottom'); + }); + + it('... for multiple folios', () => { + const location: SourceDescriptionWritingMaterialFirmSignLocation = { + info: '', + folios: ['1', '2', '3'], + position: 'bottom', + }; + const result = component.getWritingMaterialFirmSignLocation(location); + expectToBe(result, 'auf Bl. 1, 2 und 3 bottom'); + }); + + it('... for folios with r or v at the end', () => { + const location: SourceDescriptionWritingMaterialFirmSignLocation = { + info: '', + folios: ['1r', '2v', '3'], + position: 'middle', + }; + const result = component.getWritingMaterialFirmSignLocation(location); + + expectToBe(result, 'auf Bl. 1r, 2v und 3 middle'); + }); + + it('... for folios with additional info', () => { + const location: SourceDescriptionWritingMaterialFirmSignLocation = { + info: 'auf dem Kopf stehend', + folios: ['1', '2', '3'], + position: 'middle', + }; + + const result = component.getWritingMaterialFirmSignLocation(location); + + expectToBe(result, 'auf dem Kopf stehend auf Bl. 1, 2 und 3 middle'); + }); + }); + }); + + describe('#getWritingMaterialFormat()', () => { + it('... should have a method `getWritingMaterialFormat`', () => { + expect(component.getWritingMaterialFormat).toBeDefined(); + }); + + it('... should return format string without uncertainty', () => { + const format: SourceDescriptionWritingMaterialFormat = { + orientation: 'hoch', + height: { value: '170', uncertainty: '' }, + width: { value: '270', uncertainty: '' }, + }; + + const result = component.getWritingMaterialFormat(format); + + expectToBe(result, 'Format: hoch 170 × 270 mm'); + }); + + it('... should return format string with uncertainty', () => { + const format: SourceDescriptionWritingMaterialFormat = { + orientation: 'hoch', + height: { value: '170', uncertainty: 'ca.' }, + width: { value: '270–275', uncertainty: 'ca.' }, + }; + + const result = component.getWritingMaterialFormat(format); + + expectToBe(result, 'Format: hoch ca. 170 × ca. 270–275 mm'); + }); + + it('... should return format string with orientation `quer`', () => { + const format: SourceDescriptionWritingMaterialFormat = { + orientation: 'quer', + height: { value: '170', uncertainty: '' }, + width: { value: '270', uncertainty: '' }, + }; + + const result = component.getWritingMaterialFormat(format); + + expectToBe(result, 'Format: quer 170 × 270 mm'); + }); + + it('... should handle missing values gracefully', () => { + const format: SourceDescriptionWritingMaterialFormat = { + orientation: 'hoch', + height: { value: '170', uncertainty: '' }, + width: {}, + }; + + const result = component.getWritingMaterialFormat(format); + + expectToBe(result, 'Format: hoch 170 × mm'); + }); + }); + + describe('#getWritingMaterialSystems()', () => { + it('... should have a method `getWritingMaterialSystems`', () => { + expect(component.getWritingMaterialSystems).toBeDefined(); + }); + + it('... should return correct systems string when info and addendum are undefined and system number is 1', () => { + const systems: SourceDescriptionWritingMaterialSystems = { + number: 1, + info: undefined, + addendum: undefined, + }; + + const result = component.getWritingMaterialSystems(systems); + + expectToBe(result, '1 System'); + }); + + it('... should return correct systems string when info and addendum are undefined and system number is bigger 1', () => { + const systems: SourceDescriptionWritingMaterialSystems = { + number: 2, + info: undefined, + addendum: undefined, + }; + + const result = component.getWritingMaterialSystems(systems); + + expectToBe(result, '2 Systeme'); + }); + + it('... should return correct systems string when info is given and addendum is undefined', () => { + const systems: SourceDescriptionWritingMaterialSystems = { + number: 2, + info: 'info', + addendum: undefined, + }; + + const result = component.getWritingMaterialSystems(systems); + + expectToBe(result, '2 Systeme (info)'); + }); + + it('... should return correct systems string when info is undefined and addendum is given', () => { + const systems: SourceDescriptionWritingMaterialSystems = { + number: 3, + info: undefined, + addendum: 'addendum', + }; + + const result = component.getWritingMaterialSystems(systems); + + expectToBe(result, '3 Systeme, addendum'); + }); + + it('... should return correct systems string when info and addendum are given', () => { + const systems: SourceDescriptionWritingMaterialSystems = { + number: 4, + info: 'info', + addendum: 'addendum', + }; + const result = component.getWritingMaterialSystems(systems); + expectToBe(result, '4 Systeme (info), addendum'); + }); + }); + describe('#openModal()', () => { it('... should have a method `openModal`', () => { expect(component.openModal).toBeDefined(); diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.ts index f5ebb400e9..600f149d33 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.ts @@ -2,7 +2,14 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from import { UtilityService } from '@awg-core/services'; import { EDITION_FIRM_SIGNS_DATA } from '@awg-views/edition-view/data'; -import { SourceDescriptionList, SourceDescriptionWritingInstruments } from '@awg-views/edition-view/models'; +import { + SourceDescriptionList, + SourceDescriptionWritingInstruments, + SourceDescriptionWritingMaterialDimension, + SourceDescriptionWritingMaterialFirmSignLocation, + SourceDescriptionWritingMaterialFormat, + SourceDescriptionWritingMaterialSystems, +} from '@awg-views/edition-view/models'; /** * The SourceDescription component. @@ -117,6 +124,99 @@ export class SourceDescriptionComponent { return `${instrumentsString}.`; } + + /** + * Public method: getWritingMaterialFirmSign. + * + * It retrieves a firm sign for a given variant + * from the {@link EDITION_FIRM_SIGNS_DATA}. + * + * @param {string} variant The given variant. + * @returns {object} The retrieved firm sign. + */ + getWritingMaterialFirmSign(variant: string): { + readonly route: string; + readonly full: string; + readonly short: string; + } { + return variant && EDITION_FIRM_SIGNS_DATA[variant] + ? EDITION_FIRM_SIGNS_DATA[variant] + : { route: '', full: 'Not a known firm sign.', short: 'unknown' }; + } + + /** + * Public method: getWritingMaterialFirmSignLocation. + * + * It retrieves the string representation of the location + * of the firm sign of the writing material + * provided in the source description. + * + * @param {SourceDescriptionWritingMaterialFirmSignLocation} location The given location data. + * @returns {string} The retrieved location string. + */ + getWritingMaterialFirmSignLocation(location: SourceDescriptionWritingMaterialFirmSignLocation): string { + if ( + !this.utils.isNotEmptyObject(location) || + !this.utils.isNotEmptyArray(location.folios) || + !location.position + ) { + return ''; + } + const foliosFormatted = location.folios.map((folio: string) => folio.endsWith('v') || folio.endsWith('r') + ? `${folio.slice(0, -1)}${folio.slice(-1)}` + : folio); + + const foliosString = + foliosFormatted.length > 1 + ? `${foliosFormatted.slice(0, -1).join(', ')} und ${foliosFormatted.slice(-1)}` + : foliosFormatted[0]; + + const info = location.info ? `${location.info} ` : ''; + + return `${info}auf Bl. ${foliosString} ${location.position}`; + } + + /** + * Public method: getWritingMaterialFormat. + * + * It retrieves the string representation of the format + * of the writing material provided in the source description. + * + * @param {SourceDescriptionWritingMaterialFormat} format The given format data. + * @returns {string} The retrieved format string. + */ + getWritingMaterialFormat(format: SourceDescriptionWritingMaterialFormat): string { + const { orientation, height, width } = format; + + const getDimension = (dimension: SourceDescriptionWritingMaterialDimension) => { + if (!this.utils.isNotEmptyObject(dimension)) { + return ''; + } + return dimension.uncertainty ? `${dimension.uncertainty} ${dimension.value}` : dimension.value; + }; + + return `Format: ${orientation} ${getDimension(height)} × ${getDimension(width)} mm`; + } + + /** + * Public method: getWritingMaterialSystems. + * + * It retrieves the systems of the writing material + * provided in the source description. + * + * @param {SourceDescriptionWritingMaterialSystems} systems The given systems data. + * @returns {string} The retrieved systems string. + */ + getWritingMaterialSystems(systems: SourceDescriptionWritingMaterialSystems): string { + const systemsOutput = [ + `${systems.number} ${systems.number === 1 ? 'System' : 'Systeme'}`, + systems.info && ` (${systems.info})`, + systems.addendum && `, ${systems.addendum}`, + ]; + + return systemsOutput.filter(Boolean).join(''); + } + /** * Public method: openModal. * diff --git a/src/app/views/edition-view/models/index.ts b/src/app/views/edition-view/models/index.ts index c4d9202f11..4ed1cb364f 100644 --- a/src/app/views/edition-view/models/index.ts +++ b/src/app/views/edition-view/models/index.ts @@ -31,7 +31,15 @@ import { Folio, FolioContent, FolioConvolute, FolioConvoluteList, FolioFormat, F import { Graph, GraphList, GraphRDFData, GraphSparqlQuery } from './graph.model'; import { Intro, IntroList } from './intro.model'; -import { SourceDescription, SourceDescriptionList } from './source-description.model'; +import { + SourceDescription, + SourceDescriptionList, + SourceDescriptionWritingInstruments, + SourceDescriptionWritingMaterialDimension, + SourceDescriptionWritingMaterialFirmSignLocation, + SourceDescriptionWritingMaterialFormat, + SourceDescriptionWritingMaterialSystems, +} from './source-description.model'; import { SourceEvaluation, SourceEvaluationList } from './source-evaluation.model'; import { Source, SourceList } from './source-list.model'; @@ -76,6 +84,11 @@ export { Source, SourceDescription, SourceDescriptionList, + SourceDescriptionWritingInstruments, + SourceDescriptionWritingMaterialDimension, + SourceDescriptionWritingMaterialFirmSignLocation, + SourceDescriptionWritingMaterialFormat, + SourceDescriptionWritingMaterialSystems, SourceEvaluation, SourceEvaluationList, SourceList, diff --git a/src/app/views/edition-view/models/source-description.model.ts b/src/app/views/edition-view/models/source-description.model.ts index 16d2f69d88..10ae40c152 100644 --- a/src/app/views/edition-view/models/source-description.model.ts +++ b/src/app/views/edition-view/models/source-description.model.ts @@ -114,6 +114,174 @@ export class SourceDescriptionContent { folios?: SourceDescriptionFolio[]; } +/** + * The SourceDescriptionWritingMaterialDimension class. + * + * It is used in the context of the edition view + * to store the data for the dimensions of the writing material of a source description + * from a source description json file. + */ +export class SourceDescriptionWritingMaterialDimension { + /** + * The uncertainty of the dimension of the writing material (optional). + */ + uncertainty?: string; + + /** + * The value of the dimension of the writing material (optional). + */ + value?: string; +} + +/** + * The SourceDescriptionWritingMaterialFormat class. + * + * It is used in the context of the edition view + * to store the data for the format of the writing material of a source description + * from a source description json file. + */ +export class SourceDescriptionWritingMaterialFormat { + /** + * The orientation of the writing material (optional). + */ + orientation?: string; + + /** + * The height dimensions of the writing material (optional). + */ + height?: SourceDescriptionWritingMaterialDimension; + + /** + * The width dimensions of the writing material (optional). + */ + width?: SourceDescriptionWritingMaterialDimension; +} + +/** + * The SourceDescriptionWritingMaterialFirmSignLocation class. + * + * It is used in the context of the edition view + * to store the data for the location of the firm sign of the writing material of a source description + * from a source description json file. + */ +export class SourceDescriptionWritingMaterialFirmSignLocation { + /** + * An additional info to the firm sign location on the writing material (optional). + */ + info?: string; + + /** + * The folios on which the firm sign is placed on the writing material (optional). + */ + folios?: string[]; + + /** + * The position of the firm sign on the writing material (optional). + */ + position?: string; +} + +/** + * The SourceDescriptionWritingMaterialFirmSign class. + * + * It is used in the context of the edition view + * to store the data for the firm sign of the writing material of a source description + * from a source description json file. + */ +export class SourceDescriptionWritingMaterialFirmSign { + /** + * The variant of the firm sign used on the writing material (optional). + */ + variant?: string; + + /** + * An alternative string for the firm sign used on the writing material (optional). + */ + alt?: string; + + /** + * The location of the firm sign on the writing material (optional). + */ + location?: SourceDescriptionWritingMaterialFirmSignLocation[]; +} + +/** + * The SourceDescriptionWritingMaterialSystems class. + * + * It is used in the context of the edition view + * to store the data for the systems of the writing material of a source description + * from a source description json file. + */ +export class SourceDescriptionWritingMaterialSystems { + /** + * The number of systems available (optional). + */ + number?: number; + + /** + * Another info to the number of systems available (optional). + */ + info?: string; + + /** + * An addendum to the systems available (optional). + */ + addendum?: string; +} + +/** + * The SourceDescriptionWritingMaterial class. + * + * It is used in the context of the edition view + * to store the data for the writing material of a source description + * from a source description json file. + */ +export class SourceDescriptionWritingMaterial { + /** + * The paper type of the writing material (optional). + */ + paperType?: string; + + /** + * The systems of the writing material (optional). + */ + systems?: SourceDescriptionWritingMaterialSystems; + + /** + * The format of the writing material (optional). + */ + format?: SourceDescriptionWritingMaterialFormat; + + /** + * The firm sign of the writing material (optional). + */ + firmSign?: SourceDescriptionWritingMaterialFirmSign; + + /** + * The folio addendum of the writing material (optional). + */ + folioAddendum?: string; +} + +/** + * The SourceDescriptionWritingInstruments class. + * + * It is used in the context of the edition view + * to store the data for the writing instruments of a source description + * from a source description json file. + */ +export class SourceDescriptionWritingInstruments { + /** + * The main writing instrument used in a source (optional). + */ + main?: string; + + /** + * The secondary writing instruments used in a source (optional). + */ + secondary?: string[]; +} + /** * The SourceDescriptionDesc class. * @@ -135,15 +303,12 @@ export class SourceDescriptionDesc { /** * The writing material used for a source (optional). */ - writingMaterial?: string; + writingMaterial?: SourceDescriptionWritingMaterial[]; /** * The writing instruments used in a source (optional). */ - writingInstruments?: { - main?: string; - secondary?: string[]; - }; + writingInstruments?: SourceDescriptionWritingInstruments; /** * A title as it appears in a source (optional). diff --git a/src/assets/data/edition/series/1/section/1/op24/source-description.json b/src/assets/data/edition/series/1/section/1/op24/source-description.json index 9116ae6493..784d0f96ec 100644 --- a/src/assets/data/edition/series/1/section/1/op24/source-description.json +++ b/src/assets/data/edition/series/1/section/1/op24/source-description.json @@ -11,6 +11,70 @@ "2 Blätter (Bl. 1–2). Rissspuren am linken Rand (Bl. 1, 2): von Bögen abgetrennt und beschnitten. Risse an den Rändern von Bl. 2. Kunststoffklebestreifen am linken Rand von Bl. 1r und 2v. Löcher von Reißzwecken oder Nadeln an Bl. 1 rechts und Bl. 2 links. Knickecken an beiden Blättern oben rechts. Horizontale Knickfalte an Bl. 2 unten (System 13). Archivalische Paginierung [1] bis [4] mit Bleistift auf Bl. 1–2 unten rechts oder links. Verso-Seiten bis auf die archivalische Paginierung unbeschriftet." ], "writingMaterialString": "Notenpapier, 12 Systeme (unten beschnitten), Format (quer): 198 × 267 mm, kein Firmenzeichen (Bl. 1);
Notenpapier, 13 Systeme (unten beschnitten), Format (quer): 209 × 267 mm, kein Firmenzeichen (Bl. 2).", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 12, + "info": "unten beschnitten", + "addendum": "" + }, + "format": { + "orientation": "quer", + "height": { + "uncertainty": "", + "value": "198" + }, + "width": { + "uncertainty": "", + "value": "267" + } + }, + "firmSign": { + "variant": "", + "alt": "", + "location": [ + { + "info": "", + "folios": [], + "position": "" + } + ] + }, + "folioAddendum": "1" + }, + { + "paperType": "Notenpapier", + "systems": { + "number": 13, + "info": "unten beschnitten", + "addendum": "" + }, + "format": { + "orientation": "quer", + "height": { + "uncertainty": "", + "value": "209" + }, + "width": { + "uncertainty": "", + "value": "267" + } + }, + "firmSign": { + "variant": "", + "alt": "", + "location": [ + { + "info": "", + "folios": [], + "position": "" + } + ] + }, + "folioAddendum": "2" + } + ], "writingInstruments": { "main": "schwarze Tinte", "secondary": ["Bleistift", "grüner Buntstift", "blauer Buntstift", "roter Buntstift"] diff --git a/src/assets/data/edition/series/1/section/2/op22/source-description.json b/src/assets/data/edition/series/1/section/2/op22/source-description.json index 9902e6e507..37857881b8 100644 --- a/src/assets/data/edition/series/1/section/2/op22/source-description.json +++ b/src/assets/data/edition/series/1/section/2/op22/source-description.json @@ -11,6 +11,101 @@ "3 Blätter (Bl. 1–3). Riss- bzw. Schnittspuren am rechten (Bl. 1, 2) bzw. linken Rand (Bl. 3): von Bögen abgetrennt und beschnitten. Kunststoffklebestreifen am linken Rand von Bl. 1r, 2r und 3v. Löcher von Reißzwecken oder Nadeln an den linken und rechten Rändern aller Blätter (außer Bl. 1 links und Bl. 3 rechts). Archivalische Paginierung [1] bis [6] mit Bleistift auf Bl. 1–3 unten rechts oder links. Bl. 2v bis auf die archivalische Paginierung unbeschriftet." ], "writingMaterialString": "Notenpapier, 8 Systeme (oben und unten beschnitten), Format (quer): 170–172 × 270 mm, kein Firmenzeichen (Bl. 1);
Notenpapier, 9 Systeme (oben, unten und rechts beschnitten), Format (quer): 135 × 255–260 mm, kein Firmenzeichen (Bl. 2);
Notenpapier, 7 Systeme (oben beschnitten), recto System 8 mit Bleistift handgezogen, Format (quer): 170 × 270 mm, kein Firmenzeichen (Bl. 3).", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 8, + "info": "oben und unten beschnitten", + "addendum": "" + }, + "format": { + "orientation": "quer", + "height": { + "uncertainty": "", + "value": "170–172" + }, + "width": { + "uncertainty": "", + "value": "270" + } + }, + "firmSign": { + "variant": "", + "alt": "", + "location": [ + { + "info": "", + "folios": [], + "position": "" + } + ] + }, + "folioAddendum": "1" + }, + { + "paperType": "Notenpapier", + "systems": { + "number": 9, + "info": "oben, unten und rechts beschnitten", + "addendum": "" + }, + "format": { + "orientation": "quer", + "height": { + "uncertainty": "", + "value": "135" + }, + "width": { + "uncertainty": "", + "value": "255–260" + } + }, + "firmSign": { + "variant": "", + "alt": "", + "location": [ + { + "info": "", + "folios": [], + "position": "" + } + ] + }, + "folioAddendum": "2" + }, + { + "paperType": "Notenpapier", + "systems": { + "number": 7, + "info": "oben beschnitten", + "addendum": "recto System 8 mit Bleistift handgezogen" + }, + "format": { + "orientation": "quer", + "height": { + "uncertainty": "", + "value": "170" + }, + "width": { + "uncertainty": "", + "value": "270" + } + }, + "firmSign": { + "variant": "", + "alt": "", + "location": [ + { + "info": "", + "folios": [], + "position": "" + } + ] + }, + "folioAddendum": "3" + } + ], "writingInstruments": { "main": "Bleistift", "secondary": ["blauer Buntstift", "grüner Buntstift", "roter Buntstift", "schwarze Tinte"] diff --git a/src/assets/data/edition/series/1/section/2/op27/source-description.json b/src/assets/data/edition/series/1/section/2/op27/source-description.json index ad79781436..54e874bd4c 100644 --- a/src/assets/data/edition/series/1/section/2/op27/source-description.json +++ b/src/assets/data/edition/series/1/section/2/op27/source-description.json @@ -10,6 +10,101 @@ "3 Blätter (Bl. 1–3). Rissspuren am rechten (Bl. 1) bzw. linken Rand (Bl. 2, 3): von Bögen abgetrennt und beschnitten. Kunststoffklebestreifen am linken (recto) Rand von Bl. 1, 2 und 3. Löcher von Reißzwecken oder Nadeln an den linken und rechten Rändern aller Blätter (außer Bl. 1 links). Archivalische Paginierung [1] bis [6] mit Bleistift auf Bl. 1r–3v unten rechts oder links. Verso-Seiten bis auf die archivalische Paginierung unbeschriftet." ], "writingMaterialString": "Notenpapier, 8 Systeme (unten beschnitten), Format (quer): 141 × 268 mm, kein Firmenzeichen (Bl. 1);
Notenpapier, 8 Systeme (unten beschnitten), Format (quer): 143 × 268 mm, kein Firmenzeichen (Bl. 2);
Notenpapier, 8 Systeme (unten beschnitten), Format (quer): 146–149 × 270 mm, Firmenzeichen:

auf dem Kopf stehend auf Bl. 3v oben rechts (Bl. 3).", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 8, + "info": "unten beschnitten", + "addendum": "" + }, + "format": { + "orientation": "quer", + "height": { + "uncertainty": "", + "value": "141" + }, + "width": { + "uncertainty": "", + "value": "268" + } + }, + "firmSign": { + "variant": "", + "alt": "", + "location": [ + { + "info": "", + "folios": [], + "position": "" + } + ] + }, + "folioAddendum": "1" + }, + { + "paperType": "Notenpapier", + "systems": { + "number": 8, + "info": "unten beschnitten", + "addendum": "" + }, + "format": { + "orientation": "quer", + "height": { + "uncertainty": "", + "value": "143" + }, + "width": { + "uncertainty": "", + "value": "268" + } + }, + "firmSign": { + "variant": "", + "alt": "", + "location": [ + { + "info": "", + "folios": [], + "position": "" + } + ] + }, + "folioAddendum": "2" + }, + { + "paperType": "Notenpapier", + "systems": { + "number": 8, + "info": "unten beschnitten", + "addendum": "" + }, + "format": { + "orientation": "quer", + "height": { + "uncertainty": "", + "value": "146–149" + }, + "width": { + "uncertainty": "", + "value": "270" + } + }, + "firmSign": { + "variant": "FIRM_JE_NO_6_LIN_20", + "alt": "", + "location": [ + { + "info": "auf dem Kopf stehend", + "folios": ["3v"], + "position": "oben rechts" + } + ] + }, + "folioAddendum": "3" + } + ], "writingInstruments": { "main": "schwarze Tinte", "secondary": ["Bleistift", "blauer Buntstift", "grüner Buntstift", "roter Buntstift"] diff --git a/src/assets/data/edition/series/1/section/3/op19/source-description.json b/src/assets/data/edition/series/1/section/3/op19/source-description.json index d8124b228d..6e57648e06 100644 --- a/src/assets/data/edition/series/1/section/3/op19/source-description.json +++ b/src/assets/data/edition/series/1/section/3/op19/source-description.json @@ -11,6 +11,39 @@ "1 Blatt (Bl. 1). Rissspuren am linken Rand: von Bogen abgetrennt und beschnitten. Abriss an der oberen rechten Ecke. Zwei Risse am rechten Rand. Archivalische Paginierung [1] bis [2] unten links oder rechts. Verso-Seite bis auf die archivalische Paginierung unbeschriftet." ], "writingMaterialString": "Notenpapier, 12 Systeme (unten beschnitten), Format (quer): 163 × 255 mm, kein Firmenzeichen.", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 12, + "info": "unten beschnitten", + "addendum": "" + }, + "format": { + "orientation": "quer", + "height": { + "uncertainty": "", + "value": "163" + }, + "width": { + "uncertainty": "", + "value": "255" + } + }, + "firmSign": { + "variant": "", + "alt": "", + "location": [ + { + "info": "", + "folios": [], + "position": "" + } + ] + }, + "folioAddendum": "1" + } + ], "writingInstruments": { "main": "Bleistift", "secondary": ["blauer Buntstift", "grüner Buntstift", "roter Buntstift", "Kopierstift"] diff --git a/src/assets/data/edition/series/1/section/5/op12/source-description.json b/src/assets/data/edition/series/1/section/5/op12/source-description.json index 47b44b1184..c695a4203a 100644 --- a/src/assets/data/edition/series/1/section/5/op12/source-description.json +++ b/src/assets/data/edition/series/1/section/5/op12/source-description.json @@ -19,6 +19,70 @@ "2 Blätter (Bl. 1–2). Archivalische Paginierung [1] bis [4] unten links (recto) bzw. rechts (verso) mit Bleistift. Bl. 2v mit Ausnahme der archivalischen Paginierung unbeschriftet. Rissspuren am linken und oberen Rand: Blätter von Bogen abgetrennt und im Format verändert." ], "writingMaterialString": "Notenpapier, 14 Systeme, Format: quer ca. 160–180 × 267 mm, Firmenzeichen:

auf Bl. 1r unten links (Bl. 1);
Notenpapier, 16 Systeme, Format: quer 175 × 270 mm, kein Firmenzeichen (Bl. 2).", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 14, + "info": "", + "addendum": "" + }, + "format": { + "orientation": "quer", + "height": { + "uncertainty": "ca.", + "value": "160–180" + }, + "width": { + "uncertainty": "", + "value": "267" + } + }, + "firmSign": { + "variant": "FIRM_JE_NO_9_LIN_28", + "alt": "", + "location": [ + { + "info": "", + "folios": ["1r"], + "position": "unten links" + } + ] + }, + "folioAddendum": "1" + }, + { + "paperType": "Notenpapier", + "systems": { + "number": 16, + "info": "", + "addendum": "" + }, + "format": { + "orientation": "quer", + "height": { + "uncertainty": "", + "value": "175" + }, + "width": { + "uncertainty": "", + "value": "270" + } + }, + "firmSign": { + "variant": "", + "alt": "", + "location": [ + { + "info": "", + "folios": [], + "position": "" + } + ] + }, + "folioAddendum": "2" + } + ], "writingInstruments": { "main": "Bleistift", "secondary": [] @@ -206,6 +270,39 @@ "1 Blatt (Bl. 1). Archivalische Paginierung von [1] bis [2] unten links (recto) bzw. links (verso). Rissspuren am linken Rand: von Bogen abgetrennt. Knickecken und Flecke auf Bl. 1r oben rechts; blaue Tintenflecke auf Bl. 1r unten rechts; Flecke auf Bl. 1v; blaue Tintenflecke auf Bl. 1v unten rechts und am rechten Rand." ], "writingMaterialString": "Notenpapier, 12 Systeme, Format: hoch 346 × 266 mm, Firmenzeichen:

auf Bl. 1r unten links.", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 12, + "info": "", + "addendum": "" + }, + "format": { + "orientation": "hoch", + "height": { + "uncertainty": "", + "value": "346" + }, + "width": { + "uncertainty": "", + "value": "266" + } + }, + "firmSign": { + "variant": "FIRM_JE_NO_2_LIN_12_B", + "alt": "", + "location": [ + { + "info": "", + "folios": ["1r"], + "position": "unten links" + } + ] + }, + "folioAddendum": "1" + } + ], "writingInstruments": { "main": "schwarze Tinte", "secondary": ["rote Tinte [Teile des Titels und vertonter Text]", "Bleistift"] diff --git a/src/assets/data/edition/series/1/section/5/op23/source-description.json b/src/assets/data/edition/series/1/section/5/op23/source-description.json index 47b471f59c..45bfec7667 100644 --- a/src/assets/data/edition/series/1/section/5/op23/source-description.json +++ b/src/assets/data/edition/series/1/section/5/op23/source-description.json @@ -11,6 +11,39 @@ "1 Bogen (Bl. 1/2). Unterer Rand beschnitten. Archivalische Paginierung [1] bis [4] mit Bleistift unten rechts oder links. Bl. 1v–2v bis auf die archivalische Paginierung unbeschriftet." ], "writingMaterialString": "Notenpapier, 4 Systeme (unten beschnitten), Format (quer): 74 × 270 mm, kein Firmenzeichen (Bl. 1/2).", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 4, + "info": "unten beschnitten", + "addendum": "" + }, + "format": { + "orientation": "quer", + "height": { + "uncertainty": "", + "value": "74" + }, + "width": { + "uncertainty": "", + "value": "270" + } + }, + "firmSign": { + "variant": "", + "alt": "", + "location": [ + { + "info": "", + "folios": [""], + "position": "" + } + ] + }, + "folioAddendum": "1/2" + } + ], "writingInstruments": { "main": "Bleistift", "secondary": ["roter Buntstift"] diff --git a/src/assets/data/edition/series/1/section/5/op25/source-description.json b/src/assets/data/edition/series/1/section/5/op25/source-description.json index 066e8093a0..d7ad20d2d2 100644 --- a/src/assets/data/edition/series/1/section/5/op25/source-description.json +++ b/src/assets/data/edition/series/1/section/5/op25/source-description.json @@ -9,6 +9,39 @@ "description": { "desc": ["2 Seiten in Skizzenbuch 3: Bl. 38v–39r."], "writingMaterialString": "Notenpapier, 16 Systeme, Format: quer 270 × 335 mm, Firmenzeichen:

auf Bl. 39r unten links (Bl. 38–39).", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 16, + "info": "", + "addendum": "" + }, + "format": { + "orientation": "quer", + "height": { + "uncertainty": "", + "value": "270" + }, + "width": { + "uncertainty": "", + "value": "335" + } + }, + "firmSign": { + "variant": "FIRM_JE_NO_15_LIN_16", + "alt": "", + "location": [ + { + "info": "", + "folios": ["39r"], + "position": "unten links" + } + ] + }, + "folioAddendum": "38–39" + } + ], "writingInstruments": { "main": "Bleistift", "secondary": ["grüner Buntstift", "roter Buntstift", "schwarzer Buntstift"] @@ -509,6 +542,39 @@ "4 Blätter (Bl. 1–4): 2 ineinander gelegte Bögen (Bl. 1/4, 2/3), archivalische Paginierung von [1] bis [8] auf Bl. 1r–4v innere Seitenecken unten mit Bleistift, mit Ausnahme der archivalischen Paginierung unbeschriftet: Bl. 3v–4v. Archivalischer Eintrag [op. 25 no. 1] auf Bl. 1r unten halbrechts mit Bleistift." ], "writingMaterialString": "Notenpapier, 12 Systeme, Format: hoch 340 × 270 mm, Firmenzeichen:

auf Bl. 1r und 2r unten links (Bl. 1–2).", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 12, + "info": "", + "addendum": "" + }, + "format": { + "orientation": "hoch", + "height": { + "uncertainty": "", + "value": "340" + }, + "width": { + "uncertainty": "", + "value": "270" + } + }, + "firmSign": { + "variant": "FIRM_JE_NO_2_LIN_12", + "alt": "", + "location": [ + { + "info": "", + "folios": ["1r", "2r"], + "position": "unten links" + } + ] + }, + "folioAddendum": "1–2" + } + ], "writingInstruments": { "main": "schwarze Tinte", "secondary": ["Bleistift"] @@ -613,6 +679,39 @@ "1 Blatt (Bl. 1). Rissspuren am linken Rand: von Bogen abgetrennt und beschnitten. Löcher von Reißzwecken oben Mitte und rechts sowie System 7 Mitte. Archivalische Paginierung [1] bis [2] mit Bleistift unten rechts oder links. Verso-Seite bis auf die archivalische Paginierung unbeschriftet." ], "writingMaterialString": "Notenpapier, 7 Systeme (oben beschnitten), Format: quer 169 × 267 mm, Firmenzeichen:

auf Bl. 1r unten links (Bl. 1).", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 7, + "info": "oben beschnitten", + "addendum": "" + }, + "format": { + "orientation": "quer", + "height": { + "uncertainty": "", + "value": "169" + }, + "width": { + "uncertainty": "", + "value": "267" + } + }, + "firmSign": { + "variant": "FIRM_JE_NO_3_LIN_14", + "alt": "", + "location": [ + { + "info": "", + "folios": ["1r"], + "position": "unten links" + } + ] + }, + "folioAddendum": "1" + } + ], "writingInstruments": { "main": "Bleistift", "secondary": ["blauer Buntstift", "grüner Buntstift", "roter Buntstift"] diff --git a/src/assets/data/edition/series/2/section/2a/m30/source-description.json b/src/assets/data/edition/series/2/section/2a/m30/source-description.json index 36424d90ea..4765d52301 100644 --- a/src/assets/data/edition/series/2/section/2a/m30/source-description.json +++ b/src/assets/data/edition/series/2/section/2a/m30/source-description.json @@ -11,6 +11,39 @@ "2 Blätter (Bl. 1–2). Schnittspuren am rechten Rand von Bl. 1: von Bogen abgeschnitten. Riss unten Mitte sowie Ecke oben links abgetrennt auf Bl. 1. Rissspuren am rechten Rand von Bl. 2: von Bogen abgetrennt. Kleiner Risse am linken Rand von Bl. 2." ], "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen: [J.E. & Co.] | No. 5 | 18 linig. unten links auf Bl. 1v und 2v.", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 18, + "info": "", + "addendum": "" + }, + "format": { + "orientation": "hoch", + "height": { + "uncertainty": "", + "value": "349" + }, + "width": { + "uncertainty": "", + "value": "265" + } + }, + "firmSign": { + "variant": "", + "alt": "[J.E. & Co.] | No. 5 | 18 linig.", + "location": [ + { + "info": "", + "folios": ["1v", "2v"], + "position": "unten links" + } + ] + }, + "folioAddendum": "1–2" + } + ], "writingInstruments": { "main": "Bleistift", "secondary": [] @@ -454,8 +487,41 @@ "type": "Tintenniederschrift.", "location": "CH-Bps, Sammlung Anton Webern.", "description": { - "desc": ["1 Blatt. Schnittspuren am rechten Rand: von Bogen abgeschnitten."], + "desc": ["1 Blatt (Bl. 1). Schnittspuren am rechten Rand: von Bogen abgeschnitten."], "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 347 × 265 mm, Firmenzeichen:

unten links auf Bl. 1v.", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 18, + "info": "", + "addendum": "" + }, + "format": { + "orientation": "hoch", + "height": { + "uncertainty": "", + "value": "347" + }, + "width": { + "uncertainty": "", + "value": "265" + } + }, + "firmSign": { + "variant": "FIRM_JE_NO_5_LIN_18_B", + "alt": "", + "location": [ + { + "info": "", + "folios": ["1v"], + "position": "unten links" + } + ] + }, + "folioAddendum": "1" + } + ], "writingInstruments": { "main": "schwarze Tinte", "secondary": ["Bleistift"] diff --git a/src/assets/data/edition/series/2/section/2a/m31/source-description.json b/src/assets/data/edition/series/2/section/2a/m31/source-description.json index 1247c35d3c..d2ad51468c 100644 --- a/src/assets/data/edition/series/2/section/2a/m31/source-description.json +++ b/src/assets/data/edition/series/2/section/2a/m31/source-description.json @@ -11,6 +11,39 @@ "2 Blätter (Bl. 1–2). Schnittspuren am rechten Rand von Bl. 1: von Bogen abgeschnitten. Riss unten Mitte sowie Ecke oben links abgetrennt auf Bl. 1. Rissspuren am rechten Rand von Bl. 2: von Bogen abgetrennt. Kleiner Risse am linken Rand von Bl. 2." ], "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen: [J.E. & Co.] | No. 5 | 18 linig. unten links auf Bl. 1v und 2v.", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 18, + "info": "", + "addendum": "" + }, + "format": { + "orientation": "hoch", + "height": { + "uncertainty": "", + "value": "349" + }, + "width": { + "uncertainty": "", + "value": "265" + } + }, + "firmSign": { + "variant": "", + "alt": "[J.E. & Co.] | No. 5 | 18 linig.", + "location": [ + { + "info": "", + "folios": ["1v", "2v"], + "position": "unten links" + } + ] + }, + "folioAddendum": "1–2" + } + ], "writingInstruments": { "main": "Bleistift", "secondary": [] @@ -454,8 +487,41 @@ "type": "Tintenniederschrift.", "location": "CH-Bps, Sammlung Anton Webern.", "description": { - "desc": ["1 Blatt. Schnittspuren am rechten Rand: von Bogen abgeschnitten."], + "desc": ["1 Blatt (Bl. 1). Schnittspuren am rechten Rand: von Bogen abgeschnitten."], "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 347 × 265 mm, Firmenzeichen:

unten links auf Bl. 1v.", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 18, + "info": "", + "addendum": "" + }, + "format": { + "orientation": "hoch", + "height": { + "uncertainty": "", + "value": "347" + }, + "width": { + "uncertainty": "", + "value": "265" + } + }, + "firmSign": { + "variant": "FIRM_JE_NO_5_LIN_18_B", + "alt": "", + "location": [ + { + "info": "", + "folios": ["1v"], + "position": "unten links" + } + ] + }, + "folioAddendum": "1" + } + ], "writingInstruments": { "main": "schwarze Tinte", "secondary": ["Bleistift"] diff --git a/src/assets/data/edition/series/2/section/2a/m34/source-description.json b/src/assets/data/edition/series/2/section/2a/m34/source-description.json index f7eabb1640..2028ac1cd0 100644 --- a/src/assets/data/edition/series/2/section/2a/m34/source-description.json +++ b/src/assets/data/edition/series/2/section/2a/m34/source-description.json @@ -11,6 +11,39 @@ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 1/2) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8)." ], "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen:

unten links auf Bl. 1r und 2r.", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 18, + "info": "", + "addendum": "" + }, + "format": { + "orientation": "hoch", + "height": { + "uncertainty": "", + "value": "349" + }, + "width": { + "uncertainty": "", + "value": "265" + } + }, + "firmSign": { + "variant": "FIRM_JE_NO_5_LIN_18_C", + "alt": "", + "location": [ + { + "info": "", + "folios": ["1r", "2r"], + "position": "unten links" + } + ] + }, + "folioAddendum": "1/2" + } + ], "writingInstruments": { "main": "Bleistift", "secondary": [] @@ -600,6 +633,39 @@ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 3/4) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8). Stockfleck und rötliche Verfärbung mittig am oberen Rand des Bogens." ], "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 267 mm, Firmenzeichen:

unten links auf Bl. 1r und 2r.", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 18, + "info": "", + "addendum": "" + }, + "format": { + "orientation": "hoch", + "height": { + "uncertainty": "", + "value": "349" + }, + "width": { + "uncertainty": "", + "value": "267" + } + }, + "firmSign": { + "variant": "FIRM_JE_NO_5_LIN_18_D", + "alt": "", + "location": [ + { + "info": "", + "folios": ["1r", "2r"], + "position": "unten links" + } + ] + }, + "folioAddendum": "1/2" + } + ], "writingInstruments": { "main": "schwarze Tinte", "secondary": ["Bleistift"] diff --git a/src/assets/data/edition/series/2/section/2a/m35_42/source-description.json b/src/assets/data/edition/series/2/section/2a/m35_42/source-description.json index 3a8b22358c..1ab72f5d29 100644 --- a/src/assets/data/edition/series/2/section/2a/m35_42/source-description.json +++ b/src/assets/data/edition/series/2/section/2a/m35_42/source-description.json @@ -11,6 +11,39 @@ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 1/2) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8)." ], "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen:

unten links auf Bl. 1r und 2r.", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 18, + "info": "", + "addendum": "" + }, + "format": { + "orientation": "hoch", + "height": { + "uncertainty": "", + "value": "349" + }, + "width": { + "uncertainty": "", + "value": "265" + } + }, + "firmSign": { + "variant": "FIRM_JE_NO_5_LIN_18_C", + "alt": "", + "location": [ + { + "info": "", + "folios": ["1r", "2r"], + "position": "unten links" + } + ] + }, + "folioAddendum": "1/2" + } + ], "writingInstruments": { "main": "Bleistift", "secondary": [] @@ -600,6 +633,39 @@ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 7/8) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8). Kleiner Riss am rechten Rand von Bl. 2." ], "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 348 × 266 mm, Firmenzeichen:

unten links auf Bl. 1r und 2r.", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 18, + "info": "", + "addendum": "" + }, + "format": { + "orientation": "hoch", + "height": { + "uncertainty": "", + "value": "348" + }, + "width": { + "uncertainty": "", + "value": "266" + } + }, + "firmSign": { + "variant": "FIRM_JE_NO_5_LIN_18_C", + "alt": "", + "location": [ + { + "info": "", + "folios": ["1r", "2r"], + "position": "unten links" + } + ] + }, + "folioAddendum": "1/2" + } + ], "writingInstruments": { "main": "Bleistift", "secondary": [] @@ -946,6 +1012,39 @@ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 3/4) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8). Stockfleck und rötliche Verfärbung mittig am oberen Rand des Bogens." ], "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 267 mm, Firmenzeichen:

unten links auf Bl. 1r und 2r.", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 18, + "info": "", + "addendum": "" + }, + "format": { + "orientation": "hoch", + "height": { + "uncertainty": "", + "value": "349" + }, + "width": { + "uncertainty": "", + "value": "267" + } + }, + "firmSign": { + "variant": "FIRM_JE_NO_5_LIN_18_D", + "alt": "", + "location": [ + { + "info": "", + "folios": ["1r", "2r"], + "position": "unten links" + } + ] + }, + "folioAddendum": "1/2" + } + ], "writingInstruments": { "main": "schwarze Tinte", "secondary": ["Bleistift"] @@ -1325,7 +1424,39 @@ "desc": [ "1 Blatt (Bl. 1): Das Blatt ist Bestandteil (Bl. 5) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8). Rissspuren am linken Rand: von Bogen abgetrennt." ], - "writingMaterial": "Notenpapier, 18 Systeme, Format: hoch 347 × 265 mm, Firmenzeichen:

unten links auf Bl. 1r.", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 18, + "info": "", + "addendum": "" + }, + "format": { + "orientation": "hoch", + "height": { + "uncertainty": "", + "value": "347" + }, + "width": { + "uncertainty": "", + "value": "265" + } + }, + "firmSign": { + "variant": "FIRM_JE_NO_5_LIN_18_D", + "alt": "", + "location": [ + { + "info": "", + "folios": ["1r"], + "position": "unten links" + } + ] + }, + "folioAddendum": "1" + } + ], "writingInstruments": { "main": "schwarze Tinte", "secondary": [] diff --git a/src/assets/data/edition/series/2/section/2a/m37/source-description.json b/src/assets/data/edition/series/2/section/2a/m37/source-description.json index 625ff20422..58682d1046 100644 --- a/src/assets/data/edition/series/2/section/2a/m37/source-description.json +++ b/src/assets/data/edition/series/2/section/2a/m37/source-description.json @@ -11,6 +11,39 @@ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 1/2) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8)." ], "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 265 mm, Firmenzeichen:

unten links auf Bl. 1r und 2r.", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 18, + "info": "", + "addendum": "" + }, + "format": { + "orientation": "hoch", + "height": { + "uncertainty": "", + "value": "349" + }, + "width": { + "uncertainty": "", + "value": "265" + } + }, + "firmSign": { + "variant": "FIRM_JE_NO_5_LIN_18_C", + "alt": "", + "location": [ + { + "info": "", + "folios": ["1r", "2r"], + "position": "unten links" + } + ] + }, + "folioAddendum": "1/2" + } + ], "writingInstruments": { "main": "Bleistift", "secondary": [] @@ -600,6 +633,39 @@ "1 Bogen (Bl. 1/2): Der Bogen ist Bestandteil (Bl. 3/4) eines größeren Konvoluts aus 2 Bögen (Bl. 1/2, 3/4), 2 Blättern (Bl. 5–6) und 1 Bogen (Bl. 7/8). Stockfleck und rötliche Verfärbung mittig am oberen Rand des Bogens." ], "writingMaterialString": "Notenpapier, 18 Systeme, Format: hoch 349 × 267 mm, Firmenzeichen:

unten links auf Bl. 1r und 2r.", + "writingMaterial": [ + { + "paperType": "Notenpapier", + "systems": { + "number": 18, + "info": "", + "addendum": "" + }, + "format": { + "orientation": "hoch", + "height": { + "uncertainty": "", + "value": "349" + }, + "width": { + "uncertainty": "", + "value": "267" + } + }, + "firmSign": { + "variant": "FIRM_JE_NO_5_LIN_18_D", + "alt": "", + "location": [ + { + "info": "", + "folios": ["1r", "2r"], + "position": "unten links" + } + ] + }, + "folioAddendum": "1/2" + } + ], "writingInstruments": { "main": "schwarze Tinte", "secondary": ["Bleistift"] From 6c1376f34c9b327638e2c5c019bde6c1028c44c4 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Thu, 22 Feb 2024 16:29:53 +0100 Subject: [PATCH 13/63] test(edition): unify syntax for test descriptions --- src/app/shared/license/license.component.spec.ts | 2 +- .../edition-svg-sheet-viewer.component.spec.ts | 6 +++--- .../edition-tka-description.component.spec.ts | 2 +- .../services/edition-svg-drawing.service.spec.ts | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/shared/license/license.component.spec.ts b/src/app/shared/license/license.component.spec.ts index ad81088f3d..eba48dcb8a 100644 --- a/src/app/shared/license/license.component.spec.ts +++ b/src/app/shared/license/license.component.spec.ts @@ -32,7 +32,7 @@ describe('LicenseComponent', () => { expectedLicenseImageText = 'Creative Commons Attribution-ShareAlike BY-SA 4.0 International License'; }); - it('should create', () => { + it('... should create', () => { expect(component).toBeTruthy(); }); diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-accolade/edition-svg-sheet-viewer/edition-svg-sheet-viewer.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-accolade/edition-svg-sheet-viewer/edition-svg-sheet-viewer.component.spec.ts index 12f687eb98..7b672325eb 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-accolade/edition-svg-sheet-viewer/edition-svg-sheet-viewer.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-accolade/edition-svg-sheet-viewer/edition-svg-sheet-viewer.component.spec.ts @@ -1132,7 +1132,7 @@ describe('EditionSvgSheetViewerComponent', () => { expect((component as any)._getSelectedOverlays).toBeDefined(); }); - it('should return an empty array if no overlays are selected', () => { + it('... should return an empty array if no overlays are selected', () => { const noSelectedOverlays: EditionSvgOverlay[] = [ new EditionSvgOverlay(EditionSvgOverlayTypes.tka, 'tkk-1', false), new EditionSvgOverlay(EditionSvgOverlayTypes.tka, 'tkk-2', false), @@ -1143,7 +1143,7 @@ describe('EditionSvgSheetViewerComponent', () => { expectToEqual(selectedOverlays, []); }); - it('should return only selected overlays', () => { + it('... should return only selected overlays', () => { const selectableOverlays: EditionSvgOverlay[] = [ new EditionSvgOverlay(EditionSvgOverlayTypes.tka, 'tkk-1', true), new EditionSvgOverlay(EditionSvgOverlayTypes.tka, 'tkk-2', false), @@ -1274,7 +1274,7 @@ describe('EditionSvgSheetViewerComponent', () => { }); }); - it('should call `_zoomBehaviour.scaleTo` if `svgSheetSelection` and `sliderConfig.value` are given', () => { + it('... should call `_zoomBehaviour.scaleTo` if `svgSheetSelection` and `sliderConfig.value` are given', () => { expect(component.svgSheetSelection).toBeTruthy(); expect(component.sliderConfig.value).toBeTruthy(); diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-tka/edition-tka-description/edition-tka-description.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-tka/edition-tka-description/edition-tka-description.component.spec.ts index 884ea8f929..be5ef0f6b5 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-tka/edition-tka-description/edition-tka-description.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-tka/edition-tka-description/edition-tka-description.component.spec.ts @@ -76,7 +76,7 @@ describe('EditionTkaDescriptionComponent (DONE)', () => { selectSvgSheetRequestEmitSpy = spyOn(component.selectSvgSheetRequest, 'emit').and.callThrough(); }); - it('should create', () => { + it('... should create', () => { expect(component).toBeTruthy(); }); diff --git a/src/app/views/edition-view/services/edition-svg-drawing.service.spec.ts b/src/app/views/edition-view/services/edition-svg-drawing.service.spec.ts index 118a642b11..1f1c413016 100644 --- a/src/app/views/edition-view/services/edition-svg-drawing.service.spec.ts +++ b/src/app/views/edition-view/services/edition-svg-drawing.service.spec.ts @@ -621,7 +621,7 @@ describe('EditionSvgDrawingService (DONE)', () => { expectToEqual(opacity, ''); }); - it('should toggle opacity of a single supplied class', () => { + it('... should toggle opacity of a single supplied class', () => { const suppliedClassName = expectedSuppliedClassNames[0].split(' ')[1]; const suppliedSelections = service.getGroupsBySelector(expectedSvgRootGroup, suppliedClassName); const expectedSelection = D3_SELECTION.select(suppliedSelections.nodes()[0]); @@ -639,7 +639,7 @@ describe('EditionSvgDrawingService (DONE)', () => { expectToEqual(opacity, '1'); }); - it('should toggle opacity of all supplied classes if no class name is provided', () => { + it('... should toggle opacity of all supplied classes if no class name is provided', () => { const suppliedSelections = service.getGroupsBySelector(expectedSvgRootGroup, 'supplied'); service.toggleSuppliedClassOpacity(expectedSvgRootGroup, '', true); From 37e49bdb0fba6153544dfca1b7f4917b75fd06aa Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Thu, 22 Feb 2024 16:32:21 +0100 Subject: [PATCH 14/63] fix(edition): lint source description file --- .../source-description/source-description.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.ts index 600f149d33..b0a27cceea 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.ts @@ -162,9 +162,9 @@ export class SourceDescriptionComponent { ) { return ''; } - const foliosFormatted = location.folios.map((folio: string) => folio.endsWith('v') || folio.endsWith('r') - ? `${folio.slice(0, -1)}${folio.slice(-1)}` - : folio); + const foliosFormatted = location.folios.map((folio: string) => + folio.endsWith('v') || folio.endsWith('r') ? `${folio.slice(0, -1)}${folio.slice(-1)}` : folio + ); const foliosString = foliosFormatted.length > 1 From 8542df51193e0b78956fe2dcc0263b40e0969c14 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Thu, 22 Feb 2024 16:42:43 +0100 Subject: [PATCH 15/63] fix(edition): remove redundant mapping of firm signs --- .../source-description.component.spec.ts | 35 +---------------- .../source-description.component.ts | 39 ++----------------- src/testing/mock-data/mockEditionData.ts | 2 +- 3 files changed, 5 insertions(+), 71 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.spec.ts index 392f54d655..f14bb421ca 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.spec.ts @@ -70,40 +70,7 @@ describe('SourceDescriptionComponent (DONE)', () => { expectedNextSheetId = 'test_item_id_2'; expectedModalSnippet = JSON.parse(JSON.stringify(mockEditionData.mockModalSnippet)); expectedSourceDescriptionListData = JSON.parse(JSON.stringify(mockEditionData.mockSourceDescriptionListData)); - expectedFirmSigns = { - OP12: { - A: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_9_LIN_28], - B: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_2_LIN_12_B], - }, - OP25: { - A: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_15_LIN_16], - B: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_2_LIN_12], - C: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_3_LIN_14], - }, - OP27: { - B: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_6_LIN_20], - }, - M30: { - B: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_B], - }, - M31: { - B: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_B], - }, - M34: { - A: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_C], - B: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_D], - }, - M35_42: { - A: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_C], - B: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_C], - C: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_D], - D: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_D], - }, - M37: { - A: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_C], - B: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_D], - }, - }; + expectedFirmSigns = EDITION_FIRM_SIGNS_DATA; // Spies on component functions // `.and.callThrough` will track the spy down the nested describes, see diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.ts index b0a27cceea..3919d3f81e 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-report/source-description/source-description.component.ts @@ -55,40 +55,7 @@ export class SourceDescriptionComponent { * * It keeps the routes to the firm signs. */ - readonly FIRM_SIGNS = { - OP12: { - A: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_9_LIN_28], - B: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_2_LIN_12_B], - }, - OP25: { - A: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_15_LIN_16], - B: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_2_LIN_12], - C: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_3_LIN_14], - }, - OP27: { - B: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_6_LIN_20], - }, - M30: { - B: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_B], - }, - M31: { - B: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_B], - }, - M34: { - A: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_C], - B: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_D], - }, - M35_42: { - A: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_C], - B: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_C], - C: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_D], - D: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_D], - }, - M37: { - A: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_C], - B: [EDITION_FIRM_SIGNS_DATA.FIRM_JE_NO_5_LIN_18_D], - }, - }; + readonly FIRM_SIGNS = EDITION_FIRM_SIGNS_DATA; /** * Self-referring variable needed for CompileHtml library. @@ -139,8 +106,8 @@ export class SourceDescriptionComponent { readonly full: string; readonly short: string; } { - return variant && EDITION_FIRM_SIGNS_DATA[variant] - ? EDITION_FIRM_SIGNS_DATA[variant] + return variant && this.FIRM_SIGNS[variant] + ? this.FIRM_SIGNS[variant] : { route: '', full: 'Not a known firm sign.', short: 'unknown' }; } diff --git a/src/testing/mock-data/mockEditionData.ts b/src/testing/mock-data/mockEditionData.ts index 9039d2a050..950dcd9a0c 100644 --- a/src/testing/mock-data/mockEditionData.ts +++ b/src/testing/mock-data/mockEditionData.ts @@ -228,7 +228,7 @@ export const mockEditionData = { '2 Blätter (Bl. 1–2). Archivalische Paginierung [1] bis [4] unten links (recto) bzw. rechts (verso) mit Bleistift. Bl. 2v mit Ausnahme der archivalischen Paginierung unbeschriftet. Rissspuren am linken und oberen Rand: Blätter von Bogen abgetrennt und im Format verändert. Zeichen ergänzt mit Blick auf Textfassung 2', ], writingMaterialString: - 'Notenpapier, 14 Systeme, Format: quer ca. 160–180 × 267 mm, Firmenzeichen:

auf Bl. 1r unten links (Bl. 1);
Notenpapier, 16 Systeme, Format: quer 175 × 270 mm, kein Firmenzeichen (Bl. 2).', + 'Notenpapier, 14 Systeme, Format: quer ca. 160–180 × 267 mm, Firmenzeichen:

auf Bl. 1r unten links (Bl. 1);
Notenpapier, 16 Systeme, Format: quer 175 × 270 mm, kein Firmenzeichen (Bl. 2).', writingInstruments: { main: 'Bleistift', secondary: ['roter Buntstift', 'blaue Tinte', 'Kopierstift'], From 71e1c6b72f0eb1696bb36f25ccf1409a374fa4b0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 14:07:34 +0000 Subject: [PATCH 16/63] build(deps-dev): bump eslint-plugin-jsdoc from 48.1.0 to 48.2.0 Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 48.1.0 to 48.2.0. - [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases) - [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc) - [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v48.1.0...v48.2.0) --- updated-dependencies: - dependency-name: eslint-plugin-jsdoc dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 34f9339cfb..96bd735516 100644 --- a/package.json +++ b/package.json @@ -141,7 +141,7 @@ "eslint-plugin-angular": "^4.1.0", "eslint-plugin-deprecation": "^2.0.0", "eslint-plugin-import": "^2.29.1", - "eslint-plugin-jsdoc": "^48.1.0", + "eslint-plugin-jsdoc": "^48.2.0", "eslint-plugin-prettier": "^5.1.3", "gzipper": "^7.2.0", "husky": "^9.0.11", diff --git a/yarn.lock b/yarn.lock index 39997c977f..3a704d228c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5985,10 +5985,10 @@ eslint-plugin-import@^2.29.1: semver "^6.3.1" tsconfig-paths "^3.15.0" -eslint-plugin-jsdoc@^48.1.0: - version "48.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.1.0.tgz#565363770b433485bfc70dc862b50b7f780529ec" - integrity sha512-g9S8ukmTd1DVcV/xeBYPPXOZ6rc8WJ4yi0+MVxJ1jBOrz5kmxV9gJJQ64ltCqIWFnBChLIhLVx3tbTSarqVyFA== +eslint-plugin-jsdoc@^48.2.0: + version "48.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.2.0.tgz#a726fbd6fa286fad8fc14f0a6aca48488d188d95" + integrity sha512-O2B1XLBJnUCRkggFzUQ+PBYJDit8iAgXdlu8ucolqGrbmOWPvttZQZX8d1sC0MbqDMSLs8SHSQxaNPRY1RQREg== dependencies: "@es-joy/jsdoccomment" "~0.42.0" are-docs-informative "^0.0.2" From 7ce83147879609278d0874aa154b6f12fef65753 Mon Sep 17 00:00:00 2001 From: chael-mi Date: Fri, 23 Feb 2024 11:02:40 +0100 Subject: [PATCH 17/63] fix(assets): update svg files for m37 Sk1 & Sk2 --- .../2/section/2a/m37/M37_Sk1-1von1-final.svg | 568 ++++++++++---- .../2/section/2a/m37/M37_Sk2-1von1-final.svg | 740 +++++++++++++----- 2 files changed, 944 insertions(+), 364 deletions(-) diff --git a/src/assets/img/edition/series/2/section/2a/m37/M37_Sk1-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m37/M37_Sk1-1von1-final.svg index adaff57519..4cc85613ae 100644 --- a/src/assets/img/edition/series/2/section/2a/m37/M37_Sk1-1von1-final.svg +++ b/src/assets/img/edition/series/2/section/2a/m37/M37_Sk1-1von1-final.svg @@ -1,157 +1,411 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - - + + 2 diff --git a/src/assets/img/edition/series/2/section/2a/m37/M37_Sk2-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m37/M37_Sk2-1von1-final.svg index fc9be1c964..981e0caede 100644 --- a/src/assets/img/edition/series/2/section/2a/m37/M37_Sk2-1von1-final.svg +++ b/src/assets/img/edition/series/2/section/2a/m37/M37_Sk2-1von1-final.svg @@ -1,207 +1,533 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + From 5a994515610d5618e4625e35e0765cd018951bb9 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Fri, 23 Feb 2024 15:11:59 +0100 Subject: [PATCH 18/63] fix(assets): optimize svgs with SVGO --- .../2/section/2a/m37/M37_Sk1-1von1-final.svg | 564 ++++--------- .../2/section/2a/m37/M37_Sk2-1von1-final.svg | 738 +++++------------- 2 files changed, 358 insertions(+), 944 deletions(-) diff --git a/src/assets/img/edition/series/2/section/2a/m37/M37_Sk1-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m37/M37_Sk1-1von1-final.svg index 4cc85613ae..06433281bf 100644 --- a/src/assets/img/edition/series/2/section/2a/m37/M37_Sk1-1von1-final.svg +++ b/src/assets/img/edition/series/2/section/2a/m37/M37_Sk1-1von1-final.svg @@ -1,411 +1,153 @@ - - 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + + + diff --git a/src/assets/img/edition/series/2/section/2a/m37/M37_Sk2-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m37/M37_Sk2-1von1-final.svg index 981e0caede..70401f395e 100644 --- a/src/assets/img/edition/series/2/section/2a/m37/M37_Sk2-1von1-final.svg +++ b/src/assets/img/edition/series/2/section/2a/m37/M37_Sk2-1von1-final.svg @@ -1,533 +1,205 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 2a22c3a1036f0ff6ee50b752cf7b54ac9813d56d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Feb 2024 14:12:10 +0000 Subject: [PATCH 19/63] build(deps-dev): bump the angular-cli-devkit group with 2 updates Bumps the angular-cli-devkit group with 2 updates: [@angular-devkit/build-angular](https://github.com/angular/angular-cli) and [@angular/cli](https://github.com/angular/angular-cli). Updates `@angular-devkit/build-angular` from 17.2.0 to 17.2.1 - [Release notes](https://github.com/angular/angular-cli/releases) - [Changelog](https://github.com/angular/angular-cli/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular-cli/compare/17.2.0...17.2.1) Updates `@angular/cli` from 17.2.0 to 17.2.1 - [Release notes](https://github.com/angular/angular-cli/releases) - [Changelog](https://github.com/angular/angular-cli/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular-cli/compare/17.2.0...17.2.1) --- updated-dependencies: - dependency-name: "@angular-devkit/build-angular" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: angular-cli-devkit - dependency-name: "@angular/cli" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: angular-cli-devkit ... Signed-off-by: dependabot[bot] --- package.json | 4 +-- yarn.lock | 90 ++++++++++++++++++++++++++-------------------------- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/package.json b/package.json index 96bd735516..be4c3e58a3 100644 --- a/package.json +++ b/package.json @@ -118,13 +118,13 @@ "zone.js": "~0.14.2" }, "devDependencies": { - "@angular-devkit/build-angular": "^17.2.0", + "@angular-devkit/build-angular": "^17.2.1", "@angular-eslint/builder": "^17.2.1", "@angular-eslint/eslint-plugin": "^17.2.1", "@angular-eslint/eslint-plugin-template": "^17.2.1", "@angular-eslint/schematics": "^17.2.1", "@angular-eslint/template-parser": "^17.2.1", - "@angular/cli": "^17.2.0", + "@angular/cli": "^17.2.1", "@angular/compiler-cli": "^17.2.1", "@commitlint/cli": "^18.6.1", "@commitlint/config-angular": "^18.6.1", diff --git a/yarn.lock b/yarn.lock index 3a704d228c..12936cce16 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20,23 +20,23 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" -"@angular-devkit/architect@0.1702.0": - version "0.1702.0" - resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1702.0.tgz#f70df7b518f433212f1d4f9835663343b1d21ee4" - integrity sha512-+HkOYhdq8ez2+yqpxaQ6XtQevOYJNaDpM4oDmZ2lIpiIusFNsmpY2b9iL5PZGb4EfUgN8KsY3n9Q9fmRlRB9eA== +"@angular-devkit/architect@0.1702.1": + version "0.1702.1" + resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1702.1.tgz#242916367392bc79bde6ca2352aef88d33419b59" + integrity sha512-eYYtR3kCG0V7aHsL34O4v8W2nW6MX4+SebhBO2dHGz2nCAS09LPtyO2fZZGawPgXOrN0nkLfghghI0hJ0dDaOw== dependencies: - "@angular-devkit/core" "17.2.0" + "@angular-devkit/core" "17.2.1" rxjs "7.8.1" -"@angular-devkit/build-angular@^17.2.0": - version "17.2.0" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-17.2.0.tgz#11a50c3e47515e5638e7d29dd66b5d9a063209da" - integrity sha512-zO2YKcRRL3Ck3KZ3Ir/lWlciYIguJd3W9iYICKkeK4whi94y3NhrCy0Iualoo2WP7hE043uKQ0SwtVABft0SgA== +"@angular-devkit/build-angular@^17.2.1": + version "17.2.1" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-17.2.1.tgz#b8955e1228f5f5420a9970f5cc1895cdad2fc8b7" + integrity sha512-Wq3ggliCMQCRVCucbjE4/9BJCN1KMSGfF6Bx1ke2B+vW3ElLt+M4x4Eeyg2dSPEYB7slgY9WOx7qtyOkUy15tQ== dependencies: "@ampproject/remapping" "2.2.1" - "@angular-devkit/architect" "0.1702.0" - "@angular-devkit/build-webpack" "0.1702.0" - "@angular-devkit/core" "17.2.0" + "@angular-devkit/architect" "0.1702.1" + "@angular-devkit/build-webpack" "0.1702.1" + "@angular-devkit/core" "17.2.1" "@babel/core" "7.23.9" "@babel/generator" "7.23.6" "@babel/helper-annotate-as-pure" "7.22.5" @@ -47,7 +47,7 @@ "@babel/preset-env" "7.23.9" "@babel/runtime" "7.23.9" "@discoveryjs/json-ext" "0.5.7" - "@ngtools/webpack" "17.2.0" + "@ngtools/webpack" "17.2.1" "@vitejs/plugin-basic-ssl" "1.1.0" ansi-colors "4.1.3" autoprefixer "10.4.17" @@ -99,12 +99,12 @@ optionalDependencies: esbuild "0.20.0" -"@angular-devkit/build-webpack@0.1702.0": - version "0.1702.0" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1702.0.tgz#609f9d0e582e6ef396ec6e585021e4974a14c7b6" - integrity sha512-HrJ01MXlXNCeJeohIOIjpulWktUUJQpq01OWX4UazLnN0DAHKIFCwiKZZio5rYIFFUjdKI0+cCGxFbkzetRjWg== +"@angular-devkit/build-webpack@0.1702.1": + version "0.1702.1" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1702.1.tgz#9416246be15cd03058abb41117647f6cbe0bb507" + integrity sha512-cmtGn8IYqruHuq1yPYEA17tLDTGmMhDPLagAbjZPVAjTpwCwC28H6sRXyhLTiSpzXdXUgROTO6bSXTvtJyyDSA== dependencies: - "@angular-devkit/architect" "0.1702.0" + "@angular-devkit/architect" "0.1702.1" rxjs "7.8.1" "@angular-devkit/core@14.2.12": @@ -118,10 +118,10 @@ rxjs "6.6.7" source-map "0.7.4" -"@angular-devkit/core@17.2.0": - version "17.2.0" - resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-17.2.0.tgz#f7fb2425ce44269bd8f14c3f24ead34a1a4aeb17" - integrity sha512-GIOYHChtDqSOvSiEefJ6hAledEl55J5Pxw8JuKXrM4IJBbviI3c40FAc0Lu5NCj2lYoELOhrLy/UP36sLy+DGA== +"@angular-devkit/core@17.2.1": + version "17.2.1" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-17.2.1.tgz#f35f4a534de9a86b01f0c44f6488cc1a68642daf" + integrity sha512-4jWG7akd5wVxjKkLKDT1zUTyLJeBP5mDmGUPooZ6zVHy39X6htYC+BV3uu/T6gVrD4FyONMDezedpBOrQPtZ6A== dependencies: ajv "8.12.0" ajv-formats "2.1.1" @@ -141,12 +141,12 @@ ora "5.4.1" rxjs "6.6.7" -"@angular-devkit/schematics@17.2.0": - version "17.2.0" - resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-17.2.0.tgz#b0557d09ac33188afd75baf777296697e21ea0e0" - integrity sha512-gGyUVYRKTeRODW9S0MohfBlryoUHrbxqN27olhktrM/fZavyUVnZpyfb8okp6tTUz9HWmGac8ULE6IU+YW16gw== +"@angular-devkit/schematics@17.2.1": + version "17.2.1" + resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-17.2.1.tgz#d294097ae79bf6780bd1a2465d6f083e34346e68" + integrity sha512-PgbjZgMSk1Q8QAH4mAx/dHDzPjNnXFONsNmwo80JPp6eJcBN0pODbchulFYdY7kPry07sNtGGWpQeWtdPAZHPw== dependencies: - "@angular-devkit/core" "17.2.0" + "@angular-devkit/core" "17.2.1" jsonc-parser "3.2.1" magic-string "0.30.7" ora "5.4.1" @@ -221,15 +221,15 @@ dependencies: tslib "^2.3.0" -"@angular/cli@^17.2.0": - version "17.2.0" - resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-17.2.0.tgz#8af2a84367e7c80857e5409d130996127024c348" - integrity sha512-JSfNQB76qrc8QNPLUvvqR10T4+WUrfz+ogmOliO+jAdhbpfZQ4tIt0WwUYvo+0foM8x7hTe3Wdhg8zWwteBnuw== +"@angular/cli@^17.2.1": + version "17.2.1" + resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-17.2.1.tgz#9d045ca01d697cff8485011ec94a2bd82c9e7c7f" + integrity sha512-zurPJunprq6ZRpNd6Icx7Ne819WN+pL7tQAlwTof7xuCnwfnIV32xiylFkvn77eyRN0Qh+so1FLlFy0t1jH4Mw== dependencies: - "@angular-devkit/architect" "0.1702.0" - "@angular-devkit/core" "17.2.0" - "@angular-devkit/schematics" "17.2.0" - "@schematics/angular" "17.2.0" + "@angular-devkit/architect" "0.1702.1" + "@angular-devkit/core" "17.2.1" + "@angular-devkit/schematics" "17.2.1" + "@schematics/angular" "17.2.1" "@yarnpkg/lockfile" "1.1.0" ansi-colors "4.1.3" ini "4.1.1" @@ -2306,10 +2306,10 @@ dependencies: tslib "^2.3.0" -"@ngtools/webpack@17.2.0": - version "17.2.0" - resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-17.2.0.tgz#b3fe32c6430bab3462eddd69b2eeecf5bd736d43" - integrity sha512-3VilWAMylVpOqffhnLdc/UeElUWhBbG5j2XzxYWfQXb8OcVYoKNYPmJLc1vemoaYkkbaUX3zc5AEAN93Hk/q/g== +"@ngtools/webpack@17.2.1": + version "17.2.1" + resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-17.2.1.tgz#f7eb2c6dc9c5edbcc4fa3cbebafb8d8d6704a2ee" + integrity sha512-5O493oqZw0os1Gj3otVTcIXS3nGs60eXZ9w3vsK5w7tZ5x6XqZvO00X8WZQhcxXA9HMG4iDCsU2ll3lcYZVxmg== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -2581,13 +2581,13 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.5.tgz#10491ccf4f63c814d4149e0316541476ea603602" integrity sha512-1q+mykKE3Vot1kaFJIDoUFv5TuW+QQVaf2FmTT9krg86pQrGStOSJJ0Zil7CFagyxDuouTepzt5Y5TVzyajOdQ== -"@schematics/angular@17.2.0": - version "17.2.0" - resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-17.2.0.tgz#35f03dab83df0b6ab15b2ef005d76ae3ee617fd5" - integrity sha512-k5SisAPTRXxP2WVjWHgQl2sQkaAkUiOZJrHhTmUghTowULN2eIiW+1SSdNBFCbv+qkl276NfavOi22j+C7uaKQ== +"@schematics/angular@17.2.1": + version "17.2.1" + resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-17.2.1.tgz#13e5dcb12f46eb349c61e57507f34859b56c8742" + integrity sha512-OUKupokfgmomWVysBpZ6CB7S3gzyjbVBb5L6UyhNLKAGRFxKOG5XWMPOo0ZdZjfuHB++HyRVj9Dh/rq0+PKHfA== dependencies: - "@angular-devkit/core" "17.2.0" - "@angular-devkit/schematics" "17.2.0" + "@angular-devkit/core" "17.2.1" + "@angular-devkit/schematics" "17.2.1" jsonc-parser "3.2.1" "@sigstore/bundle@^2.1.1": From 493df86a981151d816392f1fe12edbb296ee9f52 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Feb 2024 14:38:01 +0000 Subject: [PATCH 20/63] build(deps): bump the angular group with 11 updates Bumps the angular group with 11 updates: | Package | From | To | | --- | --- | --- | | [@angular/animations](https://github.com/angular/angular/tree/HEAD/packages/animations) | `17.2.1` | `17.2.2` | | [@angular/common](https://github.com/angular/angular/tree/HEAD/packages/common) | `17.2.1` | `17.2.2` | | [@angular/compiler](https://github.com/angular/angular/tree/HEAD/packages/compiler) | `17.2.1` | `17.2.2` | | [@angular/core](https://github.com/angular/angular/tree/HEAD/packages/core) | `17.2.1` | `17.2.2` | | [@angular/forms](https://github.com/angular/angular/tree/HEAD/packages/forms) | `17.2.1` | `17.2.2` | | [@angular/localize](https://github.com/angular/angular) | `17.2.1` | `17.2.2` | | [@angular/platform-browser](https://github.com/angular/angular/tree/HEAD/packages/platform-browser) | `17.2.1` | `17.2.2` | | [@angular/platform-browser-dynamic](https://github.com/angular/angular/tree/HEAD/packages/platform-browser-dynamic) | `17.2.1` | `17.2.2` | | [@angular/platform-server](https://github.com/angular/angular/tree/HEAD/packages/platform-server) | `17.2.1` | `17.2.2` | | [@angular/router](https://github.com/angular/angular/tree/HEAD/packages/router) | `17.2.1` | `17.2.2` | | [@angular/compiler-cli](https://github.com/angular/angular/tree/HEAD/packages/compiler-cli) | `17.2.1` | `17.2.2` | Updates `@angular/animations` from 17.2.1 to 17.2.2 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.2/packages/animations) Updates `@angular/common` from 17.2.1 to 17.2.2 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.2/packages/common) Updates `@angular/compiler` from 17.2.1 to 17.2.2 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.2/packages/compiler) Updates `@angular/core` from 17.2.1 to 17.2.2 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.2/packages/core) Updates `@angular/forms` from 17.2.1 to 17.2.2 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.2/packages/forms) Updates `@angular/localize` from 17.2.1 to 17.2.2 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/compare/17.2.1...17.2.2) Updates `@angular/platform-browser` from 17.2.1 to 17.2.2 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.2/packages/platform-browser) Updates `@angular/platform-browser-dynamic` from 17.2.1 to 17.2.2 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.2/packages/platform-browser-dynamic) Updates `@angular/platform-server` from 17.2.1 to 17.2.2 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.2/packages/platform-server) Updates `@angular/router` from 17.2.1 to 17.2.2 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.2/packages/router) Updates `@angular/compiler-cli` from 17.2.1 to 17.2.2 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.2/packages/compiler-cli) --- updated-dependencies: - dependency-name: "@angular/animations" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/common" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/compiler" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/core" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/forms" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/localize" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/platform-browser" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/platform-browser-dynamic" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/platform-server" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/router" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/compiler-cli" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: angular ... Signed-off-by: dependabot[bot] --- package.json | 22 ++++++------- yarn.lock | 88 ++++++++++++++++++++++++++-------------------------- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/package.json b/package.json index be4c3e58a3..a7ebe00f34 100644 --- a/package.json +++ b/package.json @@ -82,16 +82,16 @@ "deploy:ci": "ng deploy --no-build --message=\"Release $npm_package_name (v$npm_package_version) on gh-pages\"" }, "dependencies": { - "@angular/animations": "^17.2.1", - "@angular/common": "^17.2.1", - "@angular/compiler": "^17.2.1", - "@angular/core": "^17.2.1", - "@angular/forms": "^17.2.1", - "@angular/localize": "^17.2.1", - "@angular/platform-browser": "^17.2.1", - "@angular/platform-browser-dynamic": "^17.2.1", - "@angular/platform-server": "^17.2.1", - "@angular/router": "^17.2.1", + "@angular/animations": "^17.2.2", + "@angular/common": "^17.2.2", + "@angular/compiler": "^17.2.2", + "@angular/core": "^17.2.2", + "@angular/forms": "^17.2.2", + "@angular/localize": "^17.2.2", + "@angular/platform-browser": "^17.2.2", + "@angular/platform-browser-dynamic": "^17.2.2", + "@angular/platform-server": "^17.2.2", + "@angular/router": "^17.2.2", "@codemirror/legacy-modes": "^6.3.3", "@fortawesome/angular-fontawesome": "^0.14.1", "@fortawesome/fontawesome-svg-core": "^6.5.1", @@ -125,7 +125,7 @@ "@angular-eslint/schematics": "^17.2.1", "@angular-eslint/template-parser": "^17.2.1", "@angular/cli": "^17.2.1", - "@angular/compiler-cli": "^17.2.1", + "@angular/compiler-cli": "^17.2.2", "@commitlint/cli": "^18.6.1", "@commitlint/config-angular": "^18.6.1", "@compodoc/compodoc": "^1.1.23", diff --git a/yarn.lock b/yarn.lock index 12936cce16..aee6226e0f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -214,10 +214,10 @@ "@angular-eslint/bundled-angular-compiler" "17.2.1" "@typescript-eslint/utils" "6.19.0" -"@angular/animations@^17.2.1": - version "17.2.1" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-17.2.1.tgz#53061f0d8a8f1094f270172990a1e2d65cf3c23f" - integrity sha512-JCccG8EPM04OtN+Wayi79QnbkCYpKY69okWjEM7cPq8fbjIQE/ZAWxnzYMR/Xq3prwUtlH7LMyB5YdYCc6Ea1A== +"@angular/animations@^17.2.2": + version "17.2.2" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-17.2.2.tgz#ba260a3f609f62c984d583e5c4bad36f157093b4" + integrity sha512-ENr35pDVslioJO8zBLo1QClzC7NqTc0Du36UMtWkw3cg+QRLnAZ7zfju5w0O8K7Z3omDtFzgVSPfyS0VDkrXPQ== dependencies: tslib "^2.3.0" @@ -245,17 +245,17 @@ symbol-observable "4.0.0" yargs "17.7.2" -"@angular/common@^17.2.1": - version "17.2.1" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-17.2.1.tgz#2495fb1bf055ace692f928bce94c23d847ffade2" - integrity sha512-ZkQwvjJhnqKulJn3kwbnodYvQf8g8hy2FUMB2MRLXKgwLPv9iqF/KRgSwcNIZnq8hyvIr6FmAntMdyCOonykDQ== +"@angular/common@^17.2.2": + version "17.2.2" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-17.2.2.tgz#30da82e24e53cb71b3c979c17b796176637c8a65" + integrity sha512-F2wQj/lYcZUNZuNmuuDb8RK8tU7e1w7IzN8J6nT2gQHq6NiZfYiUL2XrToGtdd/cZjBeYKGiWRBW/PsZzKyC3A== dependencies: tslib "^2.3.0" -"@angular/compiler-cli@^17.2.1": - version "17.2.1" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-17.2.1.tgz#5c71cb5e1e68effdeba839335da11fd1e4a3cecc" - integrity sha512-7/1KgQOyjekVJxxLnGq+PcpbhIosK4yUaYDyUr33ehDYE5MoEGtyukNx6Sn/CPex4AcJ/978zKfSXHYY451S8w== +"@angular/compiler-cli@^17.2.2": + version "17.2.2" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-17.2.2.tgz#09333d1613f3bd230e97bad392ab509d71742281" + integrity sha512-tFfbamdLhn8R30/aKxhXNG6CwelJOpVxfUnTizb7pWUJ/UQ4py0xzJp7s0QzKjR1lpRAq3rPtsE3f9BbcHD1HA== dependencies: "@babel/core" "7.23.9" "@jridgewell/sourcemap-codec" "^1.4.14" @@ -266,63 +266,63 @@ tslib "^2.3.0" yargs "^17.2.1" -"@angular/compiler@^17.2.1": - version "17.2.1" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-17.2.1.tgz#ab5f8d4df945ae881e20ac7fe881b8c265ebc015" - integrity sha512-jKk1ZQxZA/iGj0RsCa5rbd4gaygmfZcj7K1+VfGcY6NPyFkBGfFxIcA5fkZPOBvlNHjurXGuejA8NrsQ0kHbOw== +"@angular/compiler@^17.2.2": + version "17.2.2" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-17.2.2.tgz#691104aa52e1ff464c49a5da611023f664635009" + integrity sha512-loRr4+9/JkSDszExZiS+iuhjXj7wvLF4gJeqlbp2PbPl4eUoGKYq0RVZ3a7IkIXxB5sgoYB5MjKsbdm/uaMK1A== dependencies: tslib "^2.3.0" -"@angular/core@^17.2.1": - version "17.2.1" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-17.2.1.tgz#c68b8eb4055d0c06147b25979f034fc941b0fc7b" - integrity sha512-gfWeskXA8RA0D3WOPBV5wT8RpqtqFhB8OCR8diGfLojqbMrmZXEvxALBHKAgfarWcR1rnRgmjCQKejWLWCLmmg== +"@angular/core@^17.2.2": + version "17.2.2" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-17.2.2.tgz#68029e4d765ef42ff8fdcd9a8e9b4b83cbcf3c50" + integrity sha512-jXnrOVsA9b34PJN383EOss3ejd5+xUTeijuUy5njPRXpxMxrGjV5gkk0lSxsALRxw2ICax2tMoGmHXfXO1x9gw== dependencies: tslib "^2.3.0" -"@angular/forms@^17.2.1": - version "17.2.1" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-17.2.1.tgz#85fe7e419ee98ca6e83b4775d8de99ffaa4d9508" - integrity sha512-ACV2sxBOHfoHiVQFQfP5a7pXWSNPpnYbl8NKjuZzHDWueQ/IInAk6ycUEsycTh8mTm0+bBAUMw8uXTCRItML9A== +"@angular/forms@^17.2.2": + version "17.2.2" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-17.2.2.tgz#c20142c23795031722b68e123a22785d397b623c" + integrity sha512-xxy1Khpun2TpSDQch6BK4uHkqIxZvxsBU2LZgo/3W604lKoVjBGKPZqoYFRew2OPeCQ3VjK9P8a8ZhitsLLlKQ== dependencies: tslib "^2.3.0" -"@angular/localize@^17.2.1": - version "17.2.1" - resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-17.2.1.tgz#527d1ba895d6bd25f5523d62f69864cc4cce70b1" - integrity sha512-6aIaGin816vJayFbYBVF0cT8cnmsKeB6PQuIrQ0FX8pO4gSFNtR5ycH2VeD+x8aqvJ8+3njbEldOCB633dHvew== +"@angular/localize@^17.2.2": + version "17.2.2" + resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-17.2.2.tgz#dbb84165a4990e49150cc338969beee569ee84d2" + integrity sha512-VK4tjRXihJlFIccmplmwnWJfSByXbP+scCt8DvBRcbgxgF4eX/sJHx3UC1u7NIfBwDHV6dHXTJQVHKgD/RwOqw== dependencies: "@babel/core" "7.23.9" "@types/babel__core" "7.20.5" fast-glob "3.3.2" yargs "^17.2.1" -"@angular/platform-browser-dynamic@^17.2.1": - version "17.2.1" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-17.2.1.tgz#0fd42e2125a445fbab970b89b665906b63717586" - integrity sha512-J8mpB/LDMnPez1Xtaq/j4JEp7E1m7vVMfzJQvKPt1vZmp5EEzyo++u9k5yYKnGpfWTudBXHRIjK2mCjo7wNajg== +"@angular/platform-browser-dynamic@^17.2.2": + version "17.2.2" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-17.2.2.tgz#01b6dc901af05341a07c3d0454d9790eb7f9ce94" + integrity sha512-I52zbDSic4LB0yhCFUEBZKg9QkLKVUCGTco0XFHNRy3EF54Jvs0uWBqG79egsuXmyBNQY0E3op9eqhhn6Mnwbw== dependencies: tslib "^2.3.0" -"@angular/platform-browser@^17.2.1": - version "17.2.1" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-17.2.1.tgz#9dcef84ae19502b10c03b275b3e363f694884cbc" - integrity sha512-on+fTZiDTBJmRQbQe6GOClqaUFe4GJdLS1EbmI+6/8Ntv4QW2PowWnaxajoqTj2Zrh22J9DSNy7RWcrQDdyU3g== +"@angular/platform-browser@^17.2.2": + version "17.2.2" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-17.2.2.tgz#5cceed30dc21bab290b335c8ddf78ce404999128" + integrity sha512-6AZhQfZpo/apiRKwhy6es1RpoxgCXMR4y7Eo7GvVHpMKBwioWwP2H+qg83ed2xv0/GXIyqZsHjpEjsLPE83uyw== dependencies: tslib "^2.3.0" -"@angular/platform-server@^17.2.1": - version "17.2.1" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-17.2.1.tgz#7d0dafd8767b7cdf7382d1e71832916c006299c0" - integrity sha512-7R06FkmZ4/nDoHj4m15N9Bm92YcKU+YyDfg+vZIqDMGHAX1D5G2tFE2a5Bb+fG2xUfvpmJ6AoRQpdMMOltp7WQ== +"@angular/platform-server@^17.2.2": + version "17.2.2" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-17.2.2.tgz#5da8e1991d5fac8f8a34c0f20cb99c31a01b437b" + integrity sha512-XED+F4m7jCIJuSBL+NF6cOsDmM8OJ7kAzTXUIbHTeHO6sGtqqZq6ceOGeD+FX0Pi4v0ai5voH66qTEAHkd0oog== dependencies: tslib "^2.3.0" xhr2 "^0.2.0" -"@angular/router@^17.2.1": - version "17.2.1" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-17.2.1.tgz#1c0de953f7e2cbf7fd274f20c74d53fffef2ddd3" - integrity sha512-sJFraoPTHV09jZQV3XcFHRJsY7EAuXcBn5k+7GGye60YgTXAjL3OC++Cuv4AScFYRp+IqbrE3I0tflsRtQzemw== +"@angular/router@^17.2.2": + version "17.2.2" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-17.2.2.tgz#d52e2e5506a292ad41856135a0b888beaf51859f" + integrity sha512-3mT2+qBF8urFeY6eZVZX5bmAdK9ojJRZi7yB9ocpieE1Jdd/1NYCfIsQxJk032syEGc2NJftijTzuNiflLzlTA== dependencies: tslib "^2.3.0" From 019f29d6fdd47196671b11b215501665f30c2847 Mon Sep 17 00:00:00 2001 From: chael-mi <108875866+chael-mi@users.noreply.github.com> Date: Fri, 23 Feb 2024 15:47:30 +0100 Subject: [PATCH 21/63] fix(assets): update svg file for m35/42 Sk2 * feature/m35_42_sk2_update * feature/m35_42_sk2_update --- .../2a/m35_42/M35_42_Sk2-1von1-final.svg | 1087 ++++++++++++----- 1 file changed, 802 insertions(+), 285 deletions(-) diff --git a/src/assets/img/edition/series/2/section/2a/m35_42/M35_42_Sk2-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m35_42/M35_42_Sk2-1von1-final.svg index 93453da2f0..50106e9558 100644 --- a/src/assets/img/edition/series/2/section/2a/m35_42/M35_42_Sk2-1von1-final.svg +++ b/src/assets/img/edition/series/2/section/2a/m35_42/M35_42_Sk2-1von1-final.svg @@ -1,285 +1,802 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + From 5f3cffd8d4eaceb45d0333c5e834a737150a1584 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Fri, 23 Feb 2024 15:52:35 +0100 Subject: [PATCH 22/63] fix(assets): optimize svgs with SVGO --- .../2a/m35_42/M35_42_Sk2-1von1-final.svg | 1103 +++++------------ 1 file changed, 301 insertions(+), 802 deletions(-) diff --git a/src/assets/img/edition/series/2/section/2a/m35_42/M35_42_Sk2-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m35_42/M35_42_Sk2-1von1-final.svg index 50106e9558..12c507d773 100644 --- a/src/assets/img/edition/series/2/section/2a/m35_42/M35_42_Sk2-1von1-final.svg +++ b/src/assets/img/edition/series/2/section/2a/m35_42/M35_42_Sk2-1von1-final.svg @@ -1,802 +1,301 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From d968bea5b9d18355586ab12f4836c7aa6ddbe719 Mon Sep 17 00:00:00 2001 From: chael-mi <108875866+chael-mi@users.noreply.github.com> Date: Fri, 23 Feb 2024 16:03:53 +0100 Subject: [PATCH 23/63] feat(assets): add files for M 22 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feature/m22_newfiles * feature/M22_Sk14corrected * feature/M22_Sk14_Sk23_corrected * freat/M22update * feat/M22_Sk32.1.1_umbenannt * feature/m22_newfiles * feature/M22_Sk14corrected * feature/M22_Sk14_Sk23_corrected * freat/M22update * feat/M22_Sk32.1.1_umbenannt * featuer/m22_json * feature/m22_svg --------- Co-authored-by: Stefan Münnich --- .../series/2/section/2a/m22/source-list.json | 46 + .../series/2/section/2a/m22/textcritics.json | 1902 ++++++++++ .../2/section/2a/m22/M22_Sk1-1von1-final.svg | 1418 +++++++ .../2/section/2a/m22/M22_Sk10-1von1-final.svg | 906 +++++ .../2/section/2a/m22/M22_Sk11-1von1-final.svg | 2034 ++++++++++ .../2/section/2a/m22/M22_Sk12-1von1-final.svg | 2290 ++++++++++++ .../2/section/2a/m22/M22_Sk13-1von1-final.svg | 958 +++++ .../2/section/2a/m22/M22_Sk14-1von1-final.svg | 816 ++++ .../2/section/2a/m22/M22_Sk15-1von1-final.svg | 1468 ++++++++ .../2/section/2a/m22/M22_Sk16-1von1-final.svg | 1050 ++++++ .../2/section/2a/m22/M22_Sk17-1von1-final.svg | 1793 +++++++++ .../2/section/2a/m22/M22_Sk18-1von2-final.svg | 1354 +++++++ .../2/section/2a/m22/M22_Sk18-2von2-final.svg | 480 +++ .../2/section/2a/m22/M22_Sk19-1von1-final.svg | 587 +++ .../2/section/2a/m22/M22_Sk2-1von1-final.svg | 1859 +++++++++ .../2/section/2a/m22/M22_Sk20-1von1-final.svg | 1000 +++++ .../2/section/2a/m22/M22_Sk21-1von3-final.svg | 1004 +++++ .../2/section/2a/m22/M22_Sk21-2von3-final.svg | 842 +++++ .../2/section/2a/m22/M22_Sk21-3von3-final.svg | 760 ++++ .../2/section/2a/m22/M22_Sk22-1von3-final.svg | 1820 +++++++++ .../2/section/2a/m22/M22_Sk22-2von3-final.svg | 861 +++++ .../2/section/2a/m22/M22_Sk22-3von3-final.svg | 851 +++++ .../2/section/2a/m22/M22_Sk23-1von4-final.svg | 1031 +++++ .../2/section/2a/m22/M22_Sk23-2von4-final.svg | 891 +++++ .../2/section/2a/m22/M22_Sk23-3von4-final.svg | 808 ++++ .../2/section/2a/m22/M22_Sk23-4von4-final.svg | 761 ++++ .../2/section/2a/m22/M22_Sk24-1von1-final.svg | 1671 +++++++++ .../2/section/2a/m22/M22_Sk25-1von2-final.svg | 1833 +++++++++ .../2/section/2a/m22/M22_Sk25-2von2-final.svg | 666 ++++ .../2/section/2a/m22/M22_Sk26-1von2-final.svg | 2414 ++++++++++++ .../2/section/2a/m22/M22_Sk26-2von2-final.svg | 1436 +++++++ .../2/section/2a/m22/M22_Sk27-1von1-final.svg | 1675 +++++++++ .../section/2a/m22/M22_Sk27_1-1von2-final.svg | 731 ++++ .../section/2a/m22/M22_Sk27_1-2von2-final.svg | 825 ++++ .../2/section/2a/m22/M22_Sk28-1von2-final.svg | 3256 ++++++++++++++++ .../2/section/2a/m22/M22_Sk28-2von2-final.svg | 1094 ++++++ .../section/2a/m22/M22_Sk28_1-1von1-final.svg | 1024 +++++ .../2/section/2a/m22/M22_Sk29-1von1-final.svg | 3324 +++++++++++++++++ .../2/section/2a/m22/M22_Sk3-1von2-final.svg | 2306 ++++++++++++ .../2/section/2a/m22/M22_Sk3-2von2-final.svg | 718 ++++ .../2/section/2a/m22/M22_Sk30-1von1-final.svg | 449 +++ .../2/section/2a/m22/M22_Sk31-1von2-final.svg | 2786 ++++++++++++++ .../2/section/2a/m22/M22_Sk31-2von2-final.svg | 765 ++++ .../2/section/2a/m22/M22_Sk32-1von1-final.svg | 2564 +++++++++++++ .../section/2a/m22/M22_Sk32_1-1von1-final.svg | 1741 +++++++++ .../2a/m22/M22_Sk32_1_1-1von1-final.svg | 641 ++++ .../2/section/2a/m22/M22_Sk33-1von1-final.svg | 2738 ++++++++++++++ .../2/section/2a/m22/M22_Sk4-1von2-final.svg | 2577 +++++++++++++ .../2/section/2a/m22/M22_Sk4-2von2-final.svg | 1051 ++++++ .../2/section/2a/m22/M22_Sk5-1von1-final.svg | 1192 ++++++ .../2/section/2a/m22/M22_Sk6-1von1-final.svg | 1589 ++++++++ .../2/section/2a/m22/M22_Sk7-1von1-final.svg | 720 ++++ .../2/section/2a/m22/M22_Sk8-1von1-final.svg | 403 ++ .../2/section/2a/m22/M22_Sk9-1von2-final.svg | 2149 +++++++++++ .../2/section/2a/m22/M22_Sk9-2von2-final.svg | 1376 +++++++ 55 files changed, 75304 insertions(+) create mode 100644 src/assets/data/edition/series/2/section/2a/m22/source-list.json create mode 100644 src/assets/data/edition/series/2/section/2a/m22/textcritics.json create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk1-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk10-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk11-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk12-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk13-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk14-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk15-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk16-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk17-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk18-1von2-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk18-2von2-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk19-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk2-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk20-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk21-1von3-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk21-2von3-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk21-3von3-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk22-1von3-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk22-2von3-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk22-3von3-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk23-1von4-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk23-2von4-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk23-3von4-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk23-4von4-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk24-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk25-1von2-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk25-2von2-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk26-1von2-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk26-2von2-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk27-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk27_1-1von2-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk27_1-2von2-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk28-1von2-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk28-2von2-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk28_1-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk29-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk3-1von2-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk3-2von2-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk30-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk31-1von2-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk31-2von2-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk32-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk32_1-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk32_1_1-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk33-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk4-1von2-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk4-2von2-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk5-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk6-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk7-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk8-1von1-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk9-1von2-final.svg create mode 100644 src/assets/img/edition/series/2/section/2a/m22/M22_Sk9-2von2-final.svg diff --git a/src/assets/data/edition/series/2/section/2a/m22/source-list.json b/src/assets/data/edition/series/2/section/2a/m22/source-list.json new file mode 100644 index 0000000000..9a22ecade8 --- /dev/null +++ b/src/assets/data/edition/series/2/section/2a/m22/source-list.json @@ -0,0 +1,46 @@ +{ + "sources": [ + { + "siglum": "A", + "type": "Skizzen zu
Studienkomposition für Klavier / Streichquartett M 22.
Enthält auch Skizzen zu Studienkomposition für Klavier M* 411–412 sowie Tintenniederschrift von Studienkomposition für Streichquartett M* 408.", + "location": "CH-Bps, Sammlung Anton Webern.", + "hasDescription": true, + "linkTo": "sourceA" + }, + { + "siglum": "B", + "type": "Skizzen zu
Studienkomposition für Klavier / Streichquartett M 22.
Enthält auch Skizzen zu Studienkomposition für Klavier M 32 Textfassung 3 und M* 413–414 sowie Tintenniederschrift von Studienkomposition für Klavier M 32 Textfassung 2.", + "location": "CH-Bps, Sammlung Anton Webern.", + "hasDescription": true, + "linkTo": "sourceB" + }, + { + "siglum": "C", + "type": "Skizzen zu
Studienkomposition für Klavier / Streichquartett M 22.
Enthält auch Skizzen zu Studienkomposition für Klavier M* 408.", + "location": "CH-Bps, Sammlung Anton Webern.", + "hasDescription": true, + "linkTo": "sourceC" + }, + { + "siglum": "D", + "type": "Skizzen zu
Studienkomposition für Klavier / Streichquartett M 22.
Enthält auch Skizzen zu Studienkomposition für Klavier M 29 und M* 400–401, M* 415–416.", + "location": "CH-Bps, Sammlung Anton Webern.", + "hasDescription": true, + "linkTo": "sourceD" + }, + { + "siglum": "E", + "type": "Skizzen zu
Studienkomposition für Klavier / Streichquartett M 22.
Enthält auch Skizzen zu Studienkomposition für Klavier M 23 Textfassung 2, M 24 und M* 417–422, M* 433–451.", + "location": "CH-Bps, Sammlung Anton Webern.", + "hasDescription": true, + "linkTo": "sourceE" + }, + { + "siglum": "F", + "type": "Tintenniederschrift von
Studienkomposition für Klavier / Streichquartett M 22.
Enthält auch Tintenniederschrift von Studienkomposition für Klavier M 23 Textfassung 1 und M* 409–410, M* 412–416, M* 420–422 sowie Skizzen zu Studienkomposition für Klavier M 23 Textfassung 2 und Studienkomposition M* 423–432.", + "location": "CH-Bps, Sammlung Anton Webern.", + "hasDescription": true, + "linkTo": "sourceF" + } + ] +} diff --git a/src/assets/data/edition/series/2/section/2a/m22/textcritics.json b/src/assets/data/edition/series/2/section/2a/m22/textcritics.json new file mode 100644 index 0000000000..30827b7f8e --- /dev/null +++ b/src/assets/data/edition/series/2/section/2a/m22/textcritics.json @@ -0,0 +1,1902 @@ +{ + "textcritics": [ + { + "id": "M_22_Sk1", + "label": "M 22 Sk1", + "description": [ + "M 22 Sk1 entwirft das Thema der Variationen von M 22." + ], + "comments": [ + { + "svgGroupId": "g339", + "measure": "4", + "system": "23", + "position": "", + "comment": "Noten pauschal gestrichen." + }, + { + "svgGroupId": "g345", + "measure": "5", + "system": "22", + "position": "1. Pause", + "comment": "Punktierte Achtelpause überschreibt Viertelnote a1" + }, + { + "svgGroupId": "g350", + "measure": "7", + "system": "22", + "position": "1.–2. Note", + "comment": "Balkierung überschreibt Achtelfähnchen." + }, + { + "svgGroupId": "g354", + "measure": "7", + "system": "22", + "position": "3/4", + "comment": "e2 gestrichen." + } + ] + }, + { + "id": "M_31_Sk2", + "label": "M 31 Sk2", + "description": [ + "M 22 Sk2 entwirft Var. I von M 22." + ], + "comments": [ + { + "svgGroupId": "g410", + "measure": "3", + "system": "28", + "position": "6/16", + "comment": "a1 überschreibt h1." + }, + { + "svgGroupId": "g416", + "measure": "5", + "system": "27", + "position": "3/4", + "comment": "Viertelnote cis gestrichen." + }, + { + "svgGroupId": "g420", + "measure": "5", + "system": "28", + "position": "12/16", + "comment": "cis2 gestrichen." + }, + { + "svgGroupId": "g425", + "measure": "7", + "system": "27", + "position": "2/4", + "comment": "Viertelpause überschreibt Viertelnote e." + } + ] + }, + { + "id": "M_22_Sk3", + "label": "M 22 Sk3", + "description": [ + "M 22 Sk3 entwirft Var. II von M 22." + ], + "comments": [ + { + "svgGroupId": "g496", + "measure": "{1A}", + "system": "25", + "position": "", + "comment": "Noten pauschal gestrichen." + }, + { + "svgGroupId": "g502", + "measure": "1B", + "system": "26", + "position": "5/8", + "comment": "Notenkopf a1 radiert." + }, + { + "svgGroupId": "g507", + "measure": "3", + "system": "26", + "position": "1. Pause", + "comment": "Punktierte Achtelpause überschreibt Viertelpause." + }, + { + "svgGroupId": "g519", + "measure": "3", + "system": "25", + "position": "3–4/16", + "comment": "h–a gestrichen." + }, + { + "svgGroupId": "g514", + "measure": "3", + "system": "26", + "position": "4/8", + "comment": "Achtelnote gis1/h gestrichen." + }, + { + "svgGroupId": "g524", + "measure": "3", + "system": "25", + "position": "7–8/16", + "comment": "fis–e gestrichen." + }, + { + "svgGroupId": "g1476", + "measure": "3", + "system": "26", + "position": "5/8", + "comment": "h1/d2 überschreibt a1/c2." + }, + { + "svgGroupId": "g530", + "measure": "3", + "system": "25", + "position": "11/16", + "comment": "f überschreibt g." + }, + { + "svgGroupId": "g549", + "measure": "3", + "system": "25", + "position": "12/16", + "comment": "e gestrichen." + }, + { + "svgGroupId": "g554", + "measure": "4", + "system": "26", + "position": "4/16", + "comment": "gis1 gestrichen." + }, + { + "svgGroupId": "g1328", + "measure": "4", + "system": "25", + "position": "5–7/16", + "comment": "gis–a–h überschreibt e–f–e." + }, + { + "svgGroupId": "g563", + "measure": "{5A}", + "system": "", + "position": "", + "comment": "Takt pauschal gestrichen." + }, + { + "svgGroupId": "g1341", + "measure": "5B", + "system": "26", + "position": "3/8", + "comment": "h2 überschreibt a2." + }, + { + "svgGroupId": "g584", + "measure": "5B", + "system": "26", + "position": "6/8", + "comment": "c2 gestrichen." + }, + { + "svgGroupId": "g580", + "measure": "6", + "system": "25", + "position": "2/16", + "comment": "d1 überschreibt e1." + }, + { + "svgGroupId": "g589", + "measure": "6", + "system": "26", + "position": "2/4", + "comment": "Viertelnote f1 gestrichen." + }, + { + "svgGroupId": "g980", + "measure": "7", + "system": "24", + "position": "5/8", + "comment": "Notenkopf gis1 radiert." + } + ] + }, + { + "id": "M_22_Sk4", + "label": "M 22 Sk4", + "description": [ + "M 22 Sk4 entwirft Var. III von M 22." + ], + "comments": [ + { + "svgGroupId": "g1460", + "measure": "1", + "system": "21", + "position": "3/16", + "comment": "h überschreibt gis." + }, + { + "svgGroupId": "g1468", + "measure": "1", + "system": "21", + "position": "4/16", + "comment": "a überschreibt e1." + }, + { + "svgGroupId": "g1474", + "measure": "3", + "system": "21", + "position": "7/16", + "comment": "g überschreibt h." + }, + { + "svgGroupId": "g1488", + "measure": "3", + "system": "22", + "position": "10–12/16", + "comment": "h1–c2–d2 überschreibt c2–d2–e2." + }, + { + "svgGroupId": "g1505", + "measure": "4", + "system": "21", + "position": "1–2/16", + "comment": "e–f und c1 gestrichen. " + }, + { + "svgGroupId": "g1517", + "measure": "{5A}", + "system": "", + "position": "", + "comment": "Takt pauschal gestrichen." + }, + { + "svgGroupId": "g1512", + "measure": "{5A}", + "system": "21", + "position": "4/16", + "comment": "h überschreibt cis1." + }, + { + "svgGroupId": "g5", + "measure": "{5A}", + "system": "21", + "position": "6–7/16", + "comment": "h–cis1 gestrichen." + }, + { + "svgGroupId": "g1524", + "measure": "5B", + "system": "21", + "position": "4/16", + "comment": "d1 überschreibt cis1." + }, + { + "svgGroupId": "g1085", + "measure": "7", + "system": "19", + "position": "5/16", + "comment": "a gestrichen." + }, + { + "svgGroupId": "g1089", + "measure": "7", + "system": "19", + "position": "6/16", + "comment": "d gestrichen." + }, + { + "svgGroupId": "g1066", + "measure": "7", + "system": "19", + "position": "10/16", + "comment": "fis überschreibt e1." + } + ] + }, + { + "id": "M_22_Sk5", + "label": "M 22 Sk5", + "description": [ + "M 22 Sk5 entwirft die unvollständig gebliebene Var. IV von M 22." + ], + "comments": [ + { + "svgGroupId": "g1104", + "measure": "3", + "system": "17", + "position": "5/8", + "comment": "f überschreibt e." + } + ] + }, + { + "id": "M_22_Sk6", + "label": "M 22 Sk6", + "description": [ + "M 22 Sk6 entwirft Var. V von M 22." + ], + "comments": [ + { + "svgGroupId": "g1201", + "measure": "1", + "system": "16", + "position": "(4/16)", + "comment": "Ansatz zu Achtelnote e2 gestrichen." + }, + { + "svgGroupId": "g5", + "measure": "1", + "system": "15", + "position": "2/4", + "comment": "Notenkopf a radiert." + }, + { + "svgGroupId": "g1185", + "measure": "4", + "system": "15", + "position": "1. Note", + "comment": "e1 gestrichen." + }, + { + "svgGroupId": "g1213", + "measure": "4", + "system": "16", + "position": "3–4/8", + "comment": "gis2–f2 überschreibt f2–e2." + }, + { + "svgGroupId": "g1218", + "measure": "5", + "system": "15", + "position": "1/4", + "comment": "Viertelnote g gestrichen." + }, + { + "svgGroupId": "g1222", + "measure": "5", + "system": "15", + "position": "2/4", + "comment": "c1 gestrichen." + }, + { + "svgGroupId": "g1237", + "measure": "7", + "system": "16", + "position": "2–4/8", + "comment": "gis1–a1–e2 überschreibt e2–c2–d2." + } + ] + }, + { + "id": "M_22_Sk7", + "label": "M 22 Sk7", + "description": [ + "M 22 Sk7 entwirft die unvollständig gebliebene Var. I von M 22." + ] + }, + { + "id": "M_22_Sk8", + "label": "M 22 Sk8", + "description": [ + "M 22 Sk8 entwirft den Beginn einer verworfenen Variation zwischen Var. VI und Var. VII von M 22." + ], + "comments": [ + { + "svgGroupId": "g917", + "measure": "1", + "system": "12", + "position": "1. Note", + "comment": "Halbe Note der Unterstimmenschicht überschreibt mit Oberstimmenschicht zusammengehalste Viertelnote." + } + ] + }, + { + "id": "M_22_Sk9", + "label": "M 22 Sk9", + "description": [ + "M 22 Sk9 entwirft Var. VII von M 22." + ], + "comments": [ + { + "svgGroupId": "g1345", + "measure": "{1A–2A}", + "system": "", + "position": "", + "comment": "Takt pauschal gestrichen." + }, + { + "svgGroupId": "g1367", + "measure": "{2A}", + "system": "10", + "position": "4/8", + "comment": "[#] zu a1 gestrichen." + }, + { + "svgGroupId": "g1305", + "measure": "3", + "system": "9", + "position": "2/4", + "comment": "F/f überschreibt A/a." + }, + { + "svgGroupId": "g1381", + "measure": "3", + "system": "10", + "position": "6. Note", + "comment": "e1 überschreibt h1." + }, + { + "svgGroupId": "g1387", + "measure": "3", + "system": "10", + "position": "8. Note", + "comment": "a1 überschreibt h1." + }, + { + "svgGroupId": "g1164", + "measure": "5", + "system": "7", + "position": "1. Note", + "comment": "e2 überschreibt f2." + }, + { + "svgGroupId": "g1170", + "measure": "5", + "system": "7", + "position": "5. Note", + "comment": "dis2 überschreibt f2." + }, + { + "svgGroupId": "g1174", + "measure": "6", + "system": "7", + "position": "3. Note", + "comment": "[#] zu g2 gestrichen." + }, + { + "svgGroupId": "g1178", + "measure": "6", + "system": "7", + "position": "4. Note", + "comment": "[#] zu f2 gestrichen." + }, + { + "svgGroupId": "g1191", + "measure": "6", + "system": "6", + "position": "3/4", + "comment": "c/c1 überschreibt d/d1. D: sic. " + }, + { + "svgGroupId": "g1200", + "measure": "7", + "system": "6", + "position": "2/4", + "comment": "E/e überschreibt A/a." + }, + { + "svgGroupId": "g1212", + "measure": "8", + "system": "6", + "position": "2/4", + "comment": "Viertelnote überschreibt Halbe Note." + } + ] + }, + { + "id": "M_22_Sk10", + "label": "M 22 Sk10", + "description": [ + "M 22 Sk10 entwirft den Beginn einer verworfenen Variante von Var. IX von M 22." + ], + "comments": [ + { + "svgGroupId": "g1066", + "measure": "{1–3}", + "system": "", + "position": "", + "comment": "Takte pauschal gestrichen." + } + ] + }, + { + "id": "M_22_Sk11", + "label": "M 22 Sk11", + "description": [ + "M 22 Sk11 entwirft Var. IX von M 22." + ], + "comments": [ + { + "svgGroupId": "g1309", + "measure": "2", + "system": "5", + "position": "2/4", + "comment": "gis2 überschreibt fis2." + }, + { + "svgGroupId": "g4", + "measure": "2", + "system": "4", + "position": "3–4/8", + "comment": "Achtelnoten h/d1–cis1/e1 gestrichen." + }, + { + "svgGroupId": "g1314", + "measure": "2", + "system": "5", + "position": "5–6/8", + "comment": "e1–d1 gestrichen." + }, + { + "svgGroupId": "g1337", + "measure": "3", + "system": "5", + "position": "1/4", + "comment": "Oberstimmenschicht: cis1/cis2 überschreibt a/a1." + }, + { + "svgGroupId": "g1342", + "measure": "3", + "system": "4", + "position": "1. Note", + "comment": "Achtelnote gis in Oberstimmenschicht überschreibt mit Unterstimmenschicht zusammengehalste Viertelnote a." + }, + { + "svgGroupId": "g1292", + "measure": "3", + "system": "5", + "position": "2/4", + "comment": "Oberstimmenschicht: sic: cis1." + }, + { + "svgGroupId": "g1346", + "measure": "{5A}", + "system": "", + "position": "", + "comment": "Takt pauschal gestrichen." + }, + { + "svgGroupId": "g1352", + "measure": "6", + "system": "5", + "position": "6/8", + "comment": "h2 überschreibt a2." + }, + { + "svgGroupId": "g1357", + "measure": "{7A–8A}", + "system": "", + "position": "", + "comment": "Takte pauschal gestrichen." + }, + { + "svgGroupId": "g1365", + "measure": "7B", + "system": "5", + "position": "3/4", + "comment": "fis1/fis2 überschreibt gis1/gis2." + }, + { + "svgGroupId": "g1374", + "measure": "8B", + "system": "4", + "position": "1. Note", + "comment": "Punktierte Achtelnote überschreibt Halbe Note." + } + ] + }, + { + "id": "M_22_Sk12", + "label": "M 22 Sk12", + "description": [ + "M 22 Sk12 entwirft Var. X von M 22." + ], + "comments": [ + { + "svgGroupId": "g1619", + "measure": "1", + "system": "3", + "position": "1. Note", + "comment": "e2 (und möglicherweise weitere Akkordtöne) in Bleistift überschrieben durch Notenhals zu a/c1/e1/a1 in Tinte." + }, + { + "svgGroupId": "g1362", + "measure": "2", + "system": "2", + "position": "1. Note", + "comment": "c1 gestrichen." + }, + { + "svgGroupId": "g1578", + "measure": "3", + "system": "3", + "position": "1. Note", + "comment": "a2 mit Tinte gestrichen." + }, + { + "svgGroupId": "g1390", + "measure": "3", + "system": "3", + "position": "3–4/8", + "comment": "Zwei Achtelnoten überschreiben punktierte Achtelnote und Sechzehntelnote." + }, + { + "svgGroupId": "g1419", + "measure": "3", + "system": "3", + "position": "5–6/8", + "comment": "d3–c3–h2 überschreibt c3–d3." + }, + { + "svgGroupId": "g1570", + "measure": "3", + "system": "2", + "position": "4. Note", + "comment": "G/g überschreibt Fis/fis." + }, + { + "svgGroupId": "g1547", + "measure": "4", + "system": "2", + "position": "1/8", + "comment": "Achtelpause überschreibt Notenkopf g." + }, + { + "svgGroupId": "g1552", + "measure": "4", + "system": "2", + "position": "(2/8–2/4)", + "comment": "Achtelnote G/g und Viertelnote E/e gestrichen." + }, + { + "svgGroupId": "g1451", + "measure": "5", + "system": "3", + "position": "4/8", + "comment": "h1 überschreibt h2." + }, + { + "svgGroupId": "g1631", + "measure": "6", + "system": "3", + "position": "(1/4)", + "comment": "Achtelnote a1 und Sechzehntelnote a1 bzw. a2 gestrichen." + }, + { + "svgGroupId": "g1530", + "measure": "6", + "system": "2", + "position": "(1/4)", + "comment": "Viertelnote d1 gestrichen." + }, + { + "svgGroupId": "g1636", + "measure": "6", + "system": "3", + "position": "(2/4)", + "comment": "Viertelnote f2 gestrichen." + }, + { + "svgGroupId": "g1514", + "measure": "7", + "system": "2", + "position": "1. Pause", + "comment": "Achtelpause überschreibt Viertelnote e." + }, + { + "svgGroupId": "g1524", + "measure": "7", + "system": "2", + "position": "2/4", + "comment": "d/d1 überschreibt c/e/g." + } + ] + }, + { + "id": "M_22_Sk13", + "label": "M 22 Sk13", + "description": [ + "M 22 Sk13 entwirft die unvollständig gebliebene Var. XI von M 22." + ], + "comments": [ + { + "svgGroupId": "g1038", + "measure": "{1A}", + "system": "1", + "position": "", + "comment": "Noten gestrichen." + }, + { + "svgGroupId": "g1042", + "measure": "2", + "system": "2", + "position": "4. Note", + "comment": "h gestrichen." + } + ] + }, + { + "id": "M_22_Sk14", + "label": "M 22 Sk14", + "description": [ + "M 22 Sk14 entwirft den Beginn einer verworfenen Variation zwischen Var. XI und Var. XII von M 22." + ] + }, + { + "id": "M_22_Sk15", + "label": "M 22 Sk15", + "description": [ + "M 22 Sk15 entwirft Var. XII von M 22." + ], + "comments": [ + { + "svgGroupId": "g1158", + "measure": "4", + "system": "5", + "position": "1. Note", + "comment": "Oberstimmenschicht: Halbe Note überschreibt Viertelnote." + }, + { + "svgGroupId": "g1164", + "measure": "3B", + "system": "5", + "position": "2/4", + "comment": "a1 überschreibt e1." + }, + { + "svgGroupId": "g1170", + "measure": "3B", + "system": "5", + "position": "3/4", + "comment": "Viertelpause überschreibt Viertelnote e1/cis2." + } + ] + }, + { + "id": "M_22_Sk16", + "label": "M 22 Sk16", + "description": [ + "M 22 Sk16 entwirft einen ersten figurativen Verlauf für Var. VIII von M 22." + ], + "comments": [ + { + "svgGroupId": "g1082", + "measure": "1", + "system": "11", + "position": "1–2/8", + "comment": "Achtelnoten cis2–a1 gestrichen." + }, + { + "svgGroupId": "g1089", + "measure": "4B", + "system": "11", + "position": "1. Note", + "comment": "e2 überschreibt a2." + }, + { + "svgGroupId": "g1095", + "measure": "4B", + "system": "12", + "position": "1/4", + "comment": "Viertelnote gis gestrichen." + }, + { + "svgGroupId": "g1102", + "measure": "5", + "system": "11", + "position": "(2–3/4)", + "comment": "Möglicherweise Viertelnoten gis2–h2 radiert. Entzifferung unsicher." + } + ] + }, + { + "id": "M_22_Sk17", + "label": "M 22 Sk17", + "description": [ + "M 22 Sk17 entwirft eine erste, verworfene Version von Var. XIII von M 22." + ], + "comments": [ + { + "svgGroupId": "g1245", + "measure": "1", + "system": "14", + "position": "4/16", + "comment": "A/a überschreibt c/c1; Notenkopf c1 gestrichen." + }, + { + "svgGroupId": "g1255", + "measure": "1", + "system": "14", + "position": "4/16", + "comment": "A/a überschreibt c/c1." + }, + { + "svgGroupId": "g1309", + "measure": "2", + "system": "14", + "position": "1. Note", + "comment": "gis gestrichen." + }, + { + "svgGroupId": "g1269", + "measure": "4", + "system": "14", + "position": "1. Note", + "comment": "E überschreibt A1." + }, + { + "svgGroupId": "g1273", + "measure": "4", + "system": "13", + "position": "(2/4)", + "comment": "Viertelpause gestrichen." + }, + { + "svgGroupId": "g1277", + "measure": "5", + "system": "13", + "position": "1/4", + "comment": "h1 gestrichen." + }, + { + "svgGroupId": "g1489", + "measure": "5", + "system": "14", + "position": "1.–2. Note", + "comment": "E–e/e überschreibt Gis1/Gis–Gis/gis. " + } + ] + }, + { + "id": "M_22_Sk18", + "label": "M 22 Sk18", + "description": [ + "M 22 Sk18 entwirft die gültige Version von Var. XIII von M 22." + ], + "comments": [ + { + "svgGroupId": "g1143", + "measure": "2", + "system": "16", + "position": "16", + "comment": "E überschreibt C." + }, + { + "svgGroupId": "g1122", + "measure": "6", + "system": "16", + "position": "7. Note", + "comment": "a überschreibt c1." + }, + { + "svgGroupId": "g925", + "measure": "7", + "system": "13", + "position": "2.–3. Note", + "comment": "a–f1 überschreibt d2–a1." + } + ] + }, + { + "id": "M_22_Sk19", + "label": "M 22 Sk19", + "description": [ + "M 22 Sk19 entwirft eine verworfene Variation zwischen Var. XIII und Var. XIV von M 22." + ] + }, + { + "id": "M_22_Sk20", + "label": "M 22 Sk20", + "description": [ + "M 22 Sk20 entwirft Var. XIV von M 22." + ], + "comments": [ + { + "svgGroupId": "g1079", + "measure": "{1A}", + "system": "16", + "position": "", + "comment": "Noten gestrichen." + }, + { + "svgGroupId": "g1091", + "measure": "2", + "system": "17", + "position": "4/8", + "comment": "Balkierung überschreibt Achtelfähnchen." + }, + { + "svgGroupId": "g1084", + "measure": "2", + "system": "16", + "position": "(3/4)", + "comment": "Viertelnote e1 gestrichen." + }, + { + "svgGroupId": "g1097", + "measure": "2", + "system": "17", + "position": "6/8", + "comment": "e überschreibt fis." + } + ] + }, + { + "id": "M_22_Sk21", + "label": "M 22 Sk21", + "description": [ + "M 22 Sk21 entwirft Var. XV von M 22." + ], + "comments": [ + { + "svgGroupId": "g1052", + "measure": "{1A}", + "system": "17", + "position": "1. Note", + "comment": "Achtelnote c2/e2 gestrichen." + }, + { + "svgGroupId": "g5", + "measure": "{1A}", + "system": "17–18", + "position": "(1/4)", + "comment": "Noten gestrichen." + }, + { + "svgGroupId": "g1084", + "measure": "1B", + "system": "17", + "position": "5–6/8", + "comment": "Noten gestrichen." + }, + { + "svgGroupId": "g1094", + "measure": "1B", + "system": "18", + "position": "5/8", + "comment": "a überschreibt c1." + }, + { + "svgGroupId": "g1108", + "measure": "2", + "system": "18", + "position": "1–2/8", + "comment": "E–g überschreibt Gis–h." + }, + { + "svgGroupId": "g1115", + "measure": "2", + "system": "18", + "position": "5/8", + "comment": "gis überschreibt h." + }, + { + "svgGroupId": "g1131", + "measure": "3", + "system": "17", + "position": "3–4/8", + "comment": "a1/c2 überschreibt h1/d2." + }, + { + "svgGroupId": "g1138", + "measure": "3", + "system": "18", + "position": "5/8", + "comment": "g überschreibt h." + }, + { + "svgGroupId": "g977", + "measure": "5", + "system": "16", + "position": "1/4", + "comment": "Viertelpause überschreibt Achtelpause." + }, + { + "svgGroupId": "g984", + "measure": "5", + "system": "17", + "position": "2/8", + "comment": "c1 überschreibt a." + }, + { + "svgGroupId": "g988", + "measure": "6", + "system": "16", + "position": "1/4", + "comment": "Viertelpause überschreibt Achtelpause." + } + ] + }, + { + "id": "M_22_Sk22", + "label": "M 22 Sk22", + "description": [ + "M 22 Sk22 entwirft die vollständige Version von Var. VIII von M 22." + ], + "comments": [ + { + "svgGroupId": "g1169", + "measure": "1", + "system": "13", + "position": "7. Note", + "comment": "fis gestrichen." + }, + { + "svgGroupId": "g1219", + "measure": "2", + "system": "13", + "position": "4. Note", + "comment": "h überschreibt d1." + }, + { + "svgGroupId": "g1176", + "measure": "2", + "system": "13", + "position": "7. Note", + "comment": "h gestrichen und ersetzt durch gis." + }, + { + "svgGroupId": "g1236", + "measure": "3", + "system": "14", + "position": "1.–3. Note", + "comment": "Nach unten gehalste, gebalkte Achtelnoten e2–a1–e1 überschreiben nach oben gehalste, gebalkte Achtelnoten cis2–a1–e1." + }, + { + "svgGroupId": "g1253", + "measure": "3", + "system": "14", + "position": "4.–6. Note", + "comment": "a1–fis1–cis1 überschreibt cis2–a1–fis1." + }, + { + "svgGroupId": "g1259", + "measure": "3", + "system": "14", + "position": "8. Note", + "comment": "fis1 überschreibt a1." + }, + { + "svgGroupId": "g1013", + "measure": "6", + "system": "15", + "position": "7. Note", + "comment": "Fis überschreibt a." + }, + { + "svgGroupId": "g1018", + "measure": "8", + "system": "17", + "position": "1. Note", + "comment": "cis gestrichen." + } + ] + }, + { + "id": "M_22_Sk23", + "label": "M 22 Sk23", + "description": [ + "M 22 Sk23 entwirft eine erste Version von Var. XVI von M 22." + ], + "comments": [ + { + "svgGroupId": "g1028", + "measure": "1", + "system": "4", + "position": "2/4", + "comment": "a gestrichen." + }, + { + "svgGroupId": "g1033", + "measure": "2", + "system": "3", + "position": "2. Note", + "comment": "gis gestrichen." + }, + { + "svgGroupId": "g992", + "measure": "3", + "system": "5", + "position": "1/4", + "comment": "e1 gestrichen." + }, + { + "svgGroupId": "g1010", + "measure": "3", + "system": "5", + "position": "2. Note", + "comment": "d und f1 gestrichen." + }, + { + "svgGroupId": "g987", + "measure": "4", + "system": "6", + "position": "2–3/4", + "comment": "F/f–E/e überschreibt E/e–D/d." + }, + { + "svgGroupId": "g9", + "measure": "7", + "system": "3", + "position": "1/4", + "comment": "A radiert." + }, + { + "svgGroupId": "g970", + "measure": "7", + "system": "4", + "position": "1/4", + "comment": "Viertelnote H/h gestrichen." + }, + { + "svgGroupId": "g978", + "measure": "7", + "system": "4", + "position": "2/8", + "comment": "f überschreibt e." + } + ] + }, + { + "id": "M_22_Sk24", + "label": "M 22 Sk24", + "description": [ + "M 22 Sk25 entwirft die gültige Version von Var. XIV von M 22." + ], + "comments": [ + { + "svgGroupId": "g1163", + "measure": "1", + "system": "1", + "position": "Taktanfang", + "comment": "Bassschlüssel überschreibt Violinschlüssel." + }, + { + "svgGroupId": "g1229", + "measure": "3", + "system": "1", + "position": "2. Note", + "comment": "cis1 gestrichen." + }, + { + "svgGroupId": "g1234", + "measure": "4", + "system": "1", + "position": "1/4", + "comment": "e1 gestrichen." + }, + { + "svgGroupId": "g1224", + "measure": "4", + "system": "2", + "position": "2/4", + "comment": "H1/D/H gestrichen." + }, + { + "svgGroupId": "g1202", + "measure": "6", + "system": "2", + "position": "2/4", + "comment": "e überschreibt f." + }, + { + "svgGroupId": "g1215", + "measure": "7", + "system": "1", + "position": "2. Note", + "comment": "Halbe Note E/gis/h/e1 gestrichen und ersetzt durch Tonbuchstaben über dem System: g[sic. lies: gis]/d/e." + } + ] + }, + { + "id": "M_22_Sk25", + "label": "M 22 Sk25", + "description": [ + "M 22 Sk25 entwirft eine verworfene Variation zwischen Var. XVI und Var. XVII von M 22. ." + ], + "comments": [ + { + "svgGroupId": "g1175", + "measure": "{1–5}", + "system": "4–5", + "position": "", + "comment": "Takte pauschal gestrichen." + }, + { + "svgGroupId": "g1199", + "measure": "{1}", + "system": "5", + "position": "1–2/8", + "comment": "c1/e1–h/dis1 überschreibt h–g." + }, + { + "svgGroupId": "g1205", + "measure": "{1}", + "system": "4", + "position": "3/16", + "comment": "f2 überschreibt e2." + }, + { + "svgGroupId": "g1227", + "measure": "{3}", + "system": "4", + "position": "1–2/16", + "comment": "a2–e3 überschreibt c3–f3." + }, + { + "svgGroupId": "g1234", + "measure": "{3}", + "system": "5", + "position": "(4/8)", + "comment": "Viertelnote h/d1 gestrichen." + }, + { + "svgGroupId": "g2", + "measure": "{6–8}", + "system": "6–7", + "position": "", + "comment": "Takte pauschal gestrichen." + } + ] + }, + { + "id": "M_22_Sk26", + "label": "M 22 Sk26", + "description": [ + "M 22 Sk26 entwirft Var. XVII von M 22." + ], + "comments": [ + { + "svgGroupId": "g1316", + "measure": "1", + "system": "8", + "position": "5/8", + "comment": "h überschreibt c2." + }, + { + "svgGroupId": "g1328", + "measure": "3", + "system": "8", + "position": "5–6/16", + "comment": "f1–e1 überschreibt e1–d1." + }, + { + "svgGroupId": "g1335", + "measure": "3", + "system": "8", + "position": "5/8", + "comment": "e1 überschreibt f1." + }, + { + "svgGroupId": "g1339", + "measure": "5", + "system": "8", + "position": "", + "comment": "Noten pauschal gestrichen." + }, + { + "svgGroupId": "g1121", + "measure": "6", + "system": "11", + "position": "Taktanfang", + "comment": "Bassschlüssel überschreibt Violinschlüssel." + }, + { + "svgGroupId": "g1117", + "measure": "6", + "system": "11", + "position": "1. Note", + "comment": "Viertelnote D gestrichen? Entzifferung unklar." + }, + { + "svgGroupId": "g1111", + "measure": "8", + "system": "11", + "position": "6–7/8", + "comment": "e–f überschreibt d–e." + } + ] + }, + { + "id": "M_22_Sk27", + "label": "M 22 Sk27", + "description": [ + "M 22 Sk27 entwirft die T. 1–6 von Var. XVIII von M 22." + ], + "comments": [ + { + "svgGroupId": "g1194", + "measure": "3", + "system": "14", + "position": "3/4", + "comment": "a überschreibt cis1." + }, + { + "svgGroupId": "g1199", + "measure": "5", + "system": "10", + "position": "1. Note", + "comment": "cis2 gestrichen." + } + ] + }, + { + "id": "M_22_Sk27.1", + "label": "M 22 Sk27.1", + "description": [ + "M 22 Sk27.1 überarbeitet die T. 5–6 aus M 22 Sk27 und fügt die T. 7–8 zu Var. XVIII von M 22 hinzu." + ], + "comments": [ + { + "svgGroupId": "g980", + "measure": "5", + "system": "1", + "position": "6/8", + "comment": "gis1 überschreibt e1." + }, + { + "svgGroupId": "g976", + "measure": "6", + "system": "1", + "position": "1. Note", + "comment": "Halbe Note überschreibt Viertelnote." + }, + { + "svgGroupId": "g1012", + "measure": "7", + "system": "3", + "position": "(1/4)", + "comment": "Viertelnote h gestrichen." + }, + { + "svgGroupId": "g1020", + "measure": "7", + "system": "3", + "position": "1. Note", + "comment": "h/fis1 gestrichen." + }, + { + "svgGroupId": "g1029", + "measure": "7", + "system": "4", + "position": "2/4", + "comment": "Viertelnote cis gestrichen." + }, + { + "svgGroupId": "g1024", + "measure": "7", + "system": "4", + "position": "4/8", + "comment": "d1 gestrichen." + } + ] + }, + { + "id": "M_22_Sk28", + "label": "M 22 Sk28", + "description": [ + "M 22 Sk28 entwirft Var. XIX von M 22." + ], + "comments": [ + { + "svgGroupId": "g1573", + "measure": "{1A–2A}", + "system": "14–13", + "position": "", + "comment": "Takte pauschal gestrichen." + }, + { + "svgGroupId": "1425", + "measure": "{2A}", + "system": "14", + "position": "1. Note", + "comment": "Oberstimmenschicht: Halbe Note überschreibt Viertelnote." + }, + { + "svgGroupId": "g1419", + "measure": "{2A}", + "system": "14", + "position": "1/4", + "comment": "Unterstimmenschicht: Viertelnote überschreibt Halbe Note." + }, + { + "svgGroupId": "g1332", + "measure": "1B", + "system": "14", + "position": "2. Note", + "comment": "e2 überschreibt a2" + }, + { + "svgGroupId": "g1350", + "measure": "1B", + "system": "13", + "position": "2.–4. Note", + "comment": "Noten gestrichen." + }, + { + "svgGroupId": "g1284", + "measure": "2B", + "system": "14", + "position": "1. Pause", + "comment": "Punktierte Achtelpause überschreibt Viertelpause." + }, + { + "svgGroupId": "g1295", + "measure": "3", + "system": "13", + "position": "4/16", + "comment": "d/d1 überschreibt A/a." + }, + { + "svgGroupId": "g1588", + "measure": "3", + "system": "14", + "position": "2.–3. Note", + "comment": "Noten gestrichen." + }, + { + "svgGroupId": "g1314", + "measure": "3", + "system": "14", + "position": "12/16", + "comment": "Sechzehntelbalken gestrichen und ersetzt durch Sechzehntelfähnchen (siehe auch Korrektur zuvor)." + }, + { + "svgGroupId": "g1604", + "measure": "5", + "system": "14", + "position": "1. Pause", + "comment": "Punktierte Achtelnote überschreibt Viertelnote a2/a3. Entzifferung von a3 jedoch unsicher und auch als e3 lesbar." + }, + { + "svgGroupId": "g975", + "measure": "7", + "system": "10", + "position": "2/4", + "comment": "Viertelpause überschreibt Achtelpause." + }, + { + "svgGroupId": "g992", + "measure": "7", + "system": "9", + "position": "(2/4)", + "comment": "c1/a überschreibt a/e." + }, + { + "svgGroupId": "g979", + "measure": "8", + "system": "10", + "position": "2/4", + "comment": "a/a1 überschreibt c1/c2." + } + ] + }, + { + "id": "M_22_Sk28.1", + "label": "M 22 Sk28.1", + "description": [ + "M 22 Sk28.1 formuliert einen harmonisch und motivisch leicht abgewandelten Schluss zu Var. XIX von M22." + ], + "comments": [ + { + "svgGroupId": "g4431", + "measure": "7", + "system": "3", + "position": "2/4", + "comment": "Viertelnote gestrichen und ersetzt durch Achtelnote auf 4/8." + }, + { + "svgGroupId": "g4444", + "measure": "7", + "system": "4", + "position": "2.–3. Note", + "comment": "c1–a überschreibt a–e." + } + ] + }, + { + "id": "M_22_Sk29", + "label": "M 22 Sk29", + "description": [ + "M 22 Sk29 entwirft Var. XX von M 22." + ], + "comments": [ + { + "svgGroupId": "g1259", + "measure": "1", + "system": "1", + "position": "(2/4)", + "comment": "Unterstimmenschicht: Metrisch falsch positionierte Viertelnote e1 gestrichen." + }, + { + "svgGroupId": "g1273", + "measure": "2", + "system": "1", + "position": "5/8", + "comment": "Unterstimmenschicht: Metrisch falsch positionierte Achtelnote e1 gestrichen." + }, + { + "svgGroupId": "g1279", + "measure": "3", + "system": "1", + "position": "5/8", + "comment": "Unterstimmenschicht: Achtelnote d1 gestrichen." + }, + { + "svgGroupId": "g1289", + "measure": "4", + "system": "1", + "position": "(2/8–5/8)", + "comment": "Zwei Viertelnoten c2–c2 radiert." + }, + { + "svgGroupId": "g4", + "measure": "4", + "system": "1–2", + "position": "zwischen 4/8 und 5/8", + "comment": "Taktstrich radiert." + }, + { + "svgGroupId": "g1295", + "measure": "5", + "system": "1", + "position": "1. Pause", + "comment": "Unterstimmenschicht: Achtelpause überschreibt Halbe Note e1/e2." + }, + { + "svgGroupId": "g1307", + "measure": "5", + "system": "1", + "position": "1. Note", + "comment": "Oberstimmenschicht: Viertelnote überschreibt punktierte Halbe Note." + }, + { + "svgGroupId": "g1315", + "measure": "5", + "system": "2", + "position": "(2/8–5/8)", + "comment": "Metrisch falsch positionierte Viertelnoten gestrichen und versetzt auf 2–3/4." + }, + { + "svgGroupId": "g1325", + "measure": "5", + "system": "1", + "position": "3/4", + "comment": "c2/c3 gestrichen und ersetzt durch h1/h22 am Ende des Takts." + }, + { + "svgGroupId": "g1292", + "measure": "7", + "system": "1", + "position": "1. Note", + "comment": "Oberstimmenschicht: Viertelnote d2/d3 überschreibt Halbe Note d2/d3, die wiederum Halbe Note f1/f2 überschreibt." + }, + { + "svgGroupId": "g1343", + "measure": "7", + "system": "1", + "position": "2/4", + "comment": "Unterstimmenschicht: Viertelnote h1 gestrichen." + }, + { + "svgGroupId": "g1357", + "measure": "8", + "system": "1", + "position": "1. Note", + "comment": "Oberstimmenschicht: Halbe Note a/a1/a2 überschreibt Viertelnote a1/a2." + }, + { + "svgGroupId": "g6", + "measure": "8", + "system": "2", + "position": "1–3/4", + "comment": "Noten gestrichen." + }, + { + "svgGroupId": "g5", + "measure": "8", + "system": "1", + "position": "(2/8)–6/8", + "comment": "Unterstimmenschicht: Noten gestrichen und um eine Oktave nach oben versetzt." + } + ] + }, + { + "id": "M_22_Sk30", + "label": "M 22 Sk30", + "description": [ + "M 22 Sk30 skizziert die ersten Noten zu Var. XXI von M 22." + ] + }, + { + "id": "M_22_Sk31", + "label": "M 22 Sk31", + "description": [ + "M 22 Sk31 entwirft Var. XXI von M 22." + ], + "comments": [ + { + "svgGroupId": "g1308", + "measure": "3", + "system": "1", + "position": "2.–3. Note", + "comment": "Oberstimmenschicht: f2–a2 überschreibt a2–f2." + }, + { + "svgGroupId": "g1302", + "measure": "4", + "system": "2", + "position": "(6/8)", + "comment": "Zwei Sechzehntelnoten a–h radiert." + }, + { + "svgGroupId": "g1306", + "measure": "5", + "system": "2", + "position": "1/4", + "comment": "Unterstimmenschicht: Viertelpause überschreibt Achtelpause." + }, + { + "svgGroupId": "g1310", + "measure": "6", + "system": "1", + "position": "(2/4)", + "comment": "Notenkopf a2 radiert." + }, + { + "svgGroupId": "g1317", + "measure": "6", + "system": "1", + "position": "5/8", + "comment": "d2 überschreibt f2." + }, + { + "svgGroupId": "g951", + "measure": "8", + "system": "4", + "position": "5/16", + "comment": "Sechzehntelpause gestrichen." + }, + { + "svgGroupId": "g4", + "measure": "8", + "system": "3–4", + "position": "zwischen 4/8 und 12/16", + "comment": "Schlussstrich gestrichen." + } + ] + }, + { + "id": "M_22_Sk32", + "label": "M 22 Sk32", + "description": [ + "M 22 Sk32 entwirft Var. XXII von M 22." + ], + "comments": [ + { + "svgGroupId": "g1226", + "measure": "3", + "system": "10", + "position": "1/4", + "comment": "Unterstimmenschicht: Viertelnote c1 gestrichen." + }, + { + "svgGroupId": "g1283", + "measure": "4", + "system": "11", + "position": "1–2/8", + "comment": "Balkierung überschreibt Achtelfähnchen zu 1/8." + }, + { + "svgGroupId": "g1234", + "measure": "5", + "system": "10", + "position": "1. Note", + "comment": "Oberstimmenschicht: Viertelnote cis2 überschreibt Halbe Note fis2." + }, + { + "svgGroupId": "g1273", + "measure": "5", + "system": "11", + "position": "1. Note", + "comment": "Unterstimmenschicht: Viertelnote überschreibt Halbe Note." + }, + { + "svgGroupId": "g1279", + "measure": "5", + "system": "11", + "position": "2/4", + "comment": "Viertelnote c1 gestrichen." + }, + { + "svgGroupId": "g1236", + "measure": "6", + "system": "10", + "position": "2/8", + "comment": "Unterstimmenschicht: f1 überschreibt d1; h1 gestrichen." + }, + { + "svgGroupId": "g1248", + "measure": "7", + "system": "11", + "position": "1/4", + "comment": "Viertelnote H/e gestrichen." + }, + { + "svgGroupId": "g1259", + "measure": "7", + "system": "10", + "position": "2/4", + "comment": "Viertelnoten a/fis1 und a1 gestrichen." + }, + { + "svgGroupId": "g1267", + "measure": "8", + "system": "11", + "position": "1. Note", + "comment": "Oberstimmenschicht: Halbe Note überschreibt Viertelnote." + } + ] + }, + { + "id": "M_22_Sk32.1", + "label": "M 22 Sk32.1", + "description": [ + "M 22 Sk32.1 schließt an T. 5 von M 22 Sk32 an und entwirft einen alternativen Schluss zu Var. XXII von M 22." + ], + "comments": [ + { + "svgGroupId": "g1097", + "measure": "6", + "system": "12", + "position": "4/8", + "comment": "Achtelnote e2 gestrichen." + }, + { + "svgGroupId": "g5", + "measure": "{7A}", + "system": "12–13", + "position": "", + "comment": "Takt pauschal gestrichen." + }, + { + "svgGroupId": "g1130", + "measure": "{7A}", + "system": "13", + "position": "2/8", + "comment": "Achtelnote e gestrichen." + }, + { + "svgGroupId": "g1122", + "measure": "{7A}", + "system": "13", + "position": "4–5/8", + "comment": "h–e überschreibt c1–h." + }, + { + "svgGroupId": "g1123", + "measure": "{8A}", + "system": "12", + "position": "", + "comment": "Noten gestrichen." + } + ] + }, + { + "id": "M_22_Sk32.1.1", + "label": "M 22 Sk32.1.1", + "description": [ + "M 22 Sk32.1.1 formuliert im Anschluss an M 22 Sk32.1 den melodischen Übergang in T. 7 zum Schlussakkord neu." + ] + }, + { + "id": "M_22_Sk33", + "label": "M 22 Sk33", + "description": [ + "M 22 Sk33 entwirft Var. XXIII von M 22." + ], + "comments": [ + { + "svgGroupId": "g1237", + "measure": "3", + "system": "14", + "position": "1. Note", + "comment": "Mittelstimmenschicht: Halbe Note überschreibt Viertelnote." + }, + { + "svgGroupId": "g1243", + "measure": "3", + "system": "15", + "position": "2/4", + "comment": "Viertelnote überschreibt Halbe Note." + }, + { + "svgGroupId": "g1249", + "measure": "4", + "system": "14", + "position": "1/4", + "comment": "Mittelstimmenschicht: Viertelnote überschreibt Halbe Note." + }, + { + "svgGroupId": "g1254", + "measure": "4", + "system": "14", + "position": "1. Note", + "comment": "Oberstimmenschicht: Halbe Note g2 gestrichen." + }, + { + "svgGroupId": "g1260", + "measure": "5", + "system": "14", + "position": "1/4", + "comment": "Mittelstimmenschicht: Viertelnote überschreibt Halbe Note." + }, + { + "svgGroupId": "g1266", + "measure": "5", + "system": "14", + "position": "2. Note", + "comment": "Mittelstimmenschicht:Halbe Note überschreibt Viertelnote." + }, + { + "svgGroupId": "g1271", + "measure": "5", + "system": "15", + "position": "3/4", + "comment": "Viertelnote c gestrichen." + }, + { + "svgGroupId": "g1244", + "measure": "5–6", + "system": "14", + "position": "letzte Note bis 1. Note", + "comment": "Unterstimmenschicht: f1 überschreibt g1 in T. 6; Ligatur zu g1 in T. gestrichen." + }, + { + "svgGroupId": "g1229", + "measure": "6", + "system": "14", + "position": "3/4", + "comment": "Mittelstimmenschicht: f2 überschreibt h1." + }, + { + "svgGroupId": "g1290", + "measure": "7", + "system": "14", + "position": "1. Note", + "comment": "Oberstimmenschicht: Halbe Note überschreibt Viertelnote." + }, + { + "svgGroupId": "g1250", + "measure": "7", + "system": "14", + "position": "1. Note", + "comment": "Mittelstimmenschicht: f2 überschreibt a1." + }, + { + "svgGroupId": "g1299", + "measure": "7", + "system": "14", + "position": "2/4", + "comment": "Mittelstimmenschicht: e2 überschreibt e3." + }, + { + "svgGroupId": "g1310", + "measure": "8", + "system": "14", + "position": "1. Note", + "comment": "Oberstimmenschicht: Augmentationspunkt zu a2 gestrichen." + }, + { + "svgGroupId": "g1286", + "measure": "8", + "system": "14", + "position": "3/4", + "comment": "Oberstimmenschicht: Viertelnote c2 überschreibt Halbe Note e2." + } + ] + } + ] +} diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk1-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk1-1von1-final.svg new file mode 100644 index 0000000000..dff57ee6ae --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk1-1von1-final.svg @@ -0,0 +1,1418 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk10-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk10-1von1-final.svg new file mode 100644 index 0000000000..503c208ca5 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk10-1von1-final.svg @@ -0,0 +1,906 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk11-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk11-1von1-final.svg new file mode 100644 index 0000000000..0d9595e659 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk11-1von1-final.svg @@ -0,0 +1,2034 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk12-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk12-1von1-final.svg new file mode 100644 index 0000000000..b76c475bf2 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk12-1von1-final.svg @@ -0,0 +1,2290 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk13-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk13-1von1-final.svg new file mode 100644 index 0000000000..9bcf30c8f1 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk13-1von1-final.svg @@ -0,0 +1,958 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk14-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk14-1von1-final.svg new file mode 100644 index 0000000000..c5613a6550 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk14-1von1-final.svg @@ -0,0 +1,816 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk15-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk15-1von1-final.svg new file mode 100644 index 0000000000..716a9353c4 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk15-1von1-final.svg @@ -0,0 +1,1468 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk16-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk16-1von1-final.svg new file mode 100644 index 0000000000..2eec89067e --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk16-1von1-final.svg @@ -0,0 +1,1050 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk17-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk17-1von1-final.svg new file mode 100644 index 0000000000..e721b68c25 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk17-1von1-final.svg @@ -0,0 +1,1793 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk18-1von2-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk18-1von2-final.svg new file mode 100644 index 0000000000..5b625b78a2 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk18-1von2-final.svg @@ -0,0 +1,1354 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk18-2von2-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk18-2von2-final.svg new file mode 100644 index 0000000000..31ce89782e --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk18-2von2-final.svg @@ -0,0 +1,480 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk19-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk19-1von1-final.svg new file mode 100644 index 0000000000..684a40dbcc --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk19-1von1-final.svg @@ -0,0 +1,587 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk2-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk2-1von1-final.svg new file mode 100644 index 0000000000..498e5aefd0 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk2-1von1-final.svg @@ -0,0 +1,1859 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk20-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk20-1von1-final.svg new file mode 100644 index 0000000000..86c0d1eedf --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk20-1von1-final.svg @@ -0,0 +1,1000 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk21-1von3-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk21-1von3-final.svg new file mode 100644 index 0000000000..b681a5b756 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk21-1von3-final.svg @@ -0,0 +1,1004 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk21-2von3-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk21-2von3-final.svg new file mode 100644 index 0000000000..b1d6aef0a9 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk21-2von3-final.svg @@ -0,0 +1,842 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk21-3von3-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk21-3von3-final.svg new file mode 100644 index 0000000000..2ef1c3ae49 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk21-3von3-final.svg @@ -0,0 +1,760 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk22-1von3-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk22-1von3-final.svg new file mode 100644 index 0000000000..7129877dbf --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk22-1von3-final.svg @@ -0,0 +1,1820 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk22-2von3-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk22-2von3-final.svg new file mode 100644 index 0000000000..599a07ab53 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk22-2von3-final.svg @@ -0,0 +1,861 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk22-3von3-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk22-3von3-final.svg new file mode 100644 index 0000000000..17a76df08f --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk22-3von3-final.svg @@ -0,0 +1,851 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk23-1von4-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk23-1von4-final.svg new file mode 100644 index 0000000000..031e65f251 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk23-1von4-final.svg @@ -0,0 +1,1031 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk23-2von4-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk23-2von4-final.svg new file mode 100644 index 0000000000..ab0d8be6c6 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk23-2von4-final.svg @@ -0,0 +1,891 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk23-3von4-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk23-3von4-final.svg new file mode 100644 index 0000000000..6559e18009 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk23-3von4-final.svg @@ -0,0 +1,808 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk23-4von4-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk23-4von4-final.svg new file mode 100644 index 0000000000..3d02574ef9 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk23-4von4-final.svg @@ -0,0 +1,761 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk24-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk24-1von1-final.svg new file mode 100644 index 0000000000..373ab933d0 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk24-1von1-final.svg @@ -0,0 +1,1671 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk25-1von2-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk25-1von2-final.svg new file mode 100644 index 0000000000..e36914c6b0 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk25-1von2-final.svg @@ -0,0 +1,1833 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk25-2von2-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk25-2von2-final.svg new file mode 100644 index 0000000000..19ebf83490 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk25-2von2-final.svg @@ -0,0 +1,666 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk26-1von2-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk26-1von2-final.svg new file mode 100644 index 0000000000..4ad53cf8be --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk26-1von2-final.svg @@ -0,0 +1,2414 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk26-2von2-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk26-2von2-final.svg new file mode 100644 index 0000000000..ddf8e36719 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk26-2von2-final.svg @@ -0,0 +1,1436 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk27-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk27-1von1-final.svg new file mode 100644 index 0000000000..3f73374f36 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk27-1von1-final.svg @@ -0,0 +1,1675 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk27_1-1von2-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk27_1-1von2-final.svg new file mode 100644 index 0000000000..4daeb68a98 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk27_1-1von2-final.svg @@ -0,0 +1,731 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk27_1-2von2-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk27_1-2von2-final.svg new file mode 100644 index 0000000000..161e201974 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk27_1-2von2-final.svg @@ -0,0 +1,825 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk28-1von2-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk28-1von2-final.svg new file mode 100644 index 0000000000..257c35e4e7 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk28-1von2-final.svg @@ -0,0 +1,3256 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk28-2von2-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk28-2von2-final.svg new file mode 100644 index 0000000000..91ae62e2d6 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk28-2von2-final.svg @@ -0,0 +1,1094 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk28_1-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk28_1-1von1-final.svg new file mode 100644 index 0000000000..007476abc2 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk28_1-1von1-final.svg @@ -0,0 +1,1024 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk29-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk29-1von1-final.svg new file mode 100644 index 0000000000..82437c1794 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk29-1von1-final.svg @@ -0,0 +1,3324 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk3-1von2-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk3-1von2-final.svg new file mode 100644 index 0000000000..8bdcd9d910 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk3-1von2-final.svg @@ -0,0 +1,2306 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk3-2von2-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk3-2von2-final.svg new file mode 100644 index 0000000000..f14f307036 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk3-2von2-final.svg @@ -0,0 +1,718 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk30-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk30-1von1-final.svg new file mode 100644 index 0000000000..a6099958cb --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk30-1von1-final.svg @@ -0,0 +1,449 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk31-1von2-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk31-1von2-final.svg new file mode 100644 index 0000000000..f38bd47caf --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk31-1von2-final.svg @@ -0,0 +1,2786 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk31-2von2-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk31-2von2-final.svg new file mode 100644 index 0000000000..6013085e5e --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk31-2von2-final.svg @@ -0,0 +1,765 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk32-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk32-1von1-final.svg new file mode 100644 index 0000000000..848cba4a06 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk32-1von1-final.svg @@ -0,0 +1,2564 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk32_1-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk32_1-1von1-final.svg new file mode 100644 index 0000000000..ac4ce96e6f --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk32_1-1von1-final.svg @@ -0,0 +1,1741 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk32_1_1-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk32_1_1-1von1-final.svg new file mode 100644 index 0000000000..cb4914760d --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk32_1_1-1von1-final.svg @@ -0,0 +1,641 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk33-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk33-1von1-final.svg new file mode 100644 index 0000000000..ccd13336b7 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk33-1von1-final.svg @@ -0,0 +1,2738 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk4-1von2-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk4-1von2-final.svg new file mode 100644 index 0000000000..5949d62ba9 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk4-1von2-final.svg @@ -0,0 +1,2577 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk4-2von2-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk4-2von2-final.svg new file mode 100644 index 0000000000..18d4bfe73b --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk4-2von2-final.svg @@ -0,0 +1,1051 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk5-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk5-1von1-final.svg new file mode 100644 index 0000000000..931c324e73 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk5-1von1-final.svg @@ -0,0 +1,1192 @@ + +image/svg+xml Sk22 T. 7–8 diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk6-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk6-1von1-final.svg new file mode 100644 index 0000000000..5cfb850f3c --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk6-1von1-final.svg @@ -0,0 +1,1589 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk7-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk7-1von1-final.svg new file mode 100644 index 0000000000..c67cee0021 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk7-1von1-final.svg @@ -0,0 +1,720 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk8-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk8-1von1-final.svg new file mode 100644 index 0000000000..d5c5547460 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk8-1von1-final.svg @@ -0,0 +1,403 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk9-1von2-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk9-1von2-final.svg new file mode 100644 index 0000000000..4b35484b76 --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk9-1von2-final.svg @@ -0,0 +1,2149 @@ + +image/svg+xml diff --git a/src/assets/img/edition/series/2/section/2a/m22/M22_Sk9-2von2-final.svg b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk9-2von2-final.svg new file mode 100644 index 0000000000..26e3e8a59f --- /dev/null +++ b/src/assets/img/edition/series/2/section/2a/m22/M22_Sk9-2von2-final.svg @@ -0,0 +1,1376 @@ + +image/svg+xml From 4690ab4667cc6579c995bc8d541b4c1ab38029fd Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Fri, 23 Feb 2024 16:12:19 +0100 Subject: [PATCH 24/63] build(deps): bump rdfstore from v0.9.18-alpha.13 to v0.9.18-alpha.14 --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index a7ebe00f34..69f7cc91c0 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "json2typescript": "^1.5.1", "n3": "^1.17.2", "ngx-json-viewer": "^3.2.1", - "rdfstore": "musicenfanthen/rdfstore-js#v0.9.18-alpha.13", + "rdfstore": "musicenfanthen/rdfstore-js#v0.9.18-alpha.14", "rxjs": "~7.8.1", "snapsvg": "^0.5.1", "stream": "^0.0.2", diff --git a/yarn.lock b/yarn.lock index aee6226e0f..0e6488df5e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9982,9 +9982,9 @@ rdf-canonize@^3.4.0: dependencies: setimmediate "^1.0.5" -rdfstore@musicenfanthen/rdfstore-js#v0.9.18-alpha.13: - version "0.9.18-alpha.13" - resolved "https://codeload.github.com/musicenfanthen/rdfstore-js/tar.gz/b4077e2cf9f3814d09d7323d5e8e85596cdb5dd5" +rdfstore@musicenfanthen/rdfstore-js#v0.9.18-alpha.14: + version "0.9.18-alpha.14" + resolved "https://codeload.github.com/musicenfanthen/rdfstore-js/tar.gz/c00cce13128f117a53830c1bdaff7319cbdee771" dependencies: jsonld "^8.3.1" n3 "^0.11.3" From 051a648b2d7f8ebcc5e72391677bba5b4c2387b3 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Fri, 23 Feb 2024 16:13:18 +0100 Subject: [PATCH 25/63] build(deps-dev): bump @types/node from 18.19.14 to 18.19.18 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 69f7cc91c0..e5657a078f 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,7 @@ "@compodoc/compodoc": "^1.1.23", "@types/d3": "^7.4.3", "@types/jasmine": "~5.1.4", - "@types/node": "^18.19.14", + "@types/node": "^18.19.18", "@typescript-eslint/eslint-plugin": "^7.0.2", "@typescript-eslint/parser": "^7.0.2", "angular-cli-ghpages": "^1.0.7", diff --git a/yarn.lock b/yarn.lock index 0e6488df5e..b3a39d3471 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3065,10 +3065,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.3.1.tgz#e8a83f1aa8b649377bb1fb5d7bac5cb90e784dfe" integrity sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg== -"@types/node@^18.19.14": - version "18.19.14" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.14.tgz#1880ff1b3ac913f3877f711588e5ed227da01886" - integrity sha512-EnQ4Us2rmOS64nHDWr0XqAD8DsO6f3XR6lf9UIIrZQpUzPVdN/oPuEzfDWNHSyXLvoGgjuEm/sPwFGSSs35Wtg== +"@types/node@^18.19.18": + version "18.19.18" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.18.tgz#7526471b28828d1fef1f7e4960fb9477e6e4369c" + integrity sha512-80CP7B8y4PzZF0GWx15/gVWRrB5y/bIjNI84NK3cmQJu0WZwvmj2WMA5LcofQFVfLqqCSp545+U2LsrVzX36Zg== dependencies: undici-types "~5.26.4" From 2aad2a3a0a42153318eca2b4726c3e70428d0224 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Feb 2024 14:43:40 +0000 Subject: [PATCH 26/63] build(deps): bump bootstrap from 5.3.2 to 5.3.3 Bumps [bootstrap](https://github.com/twbs/bootstrap) from 5.3.2 to 5.3.3. - [Release notes](https://github.com/twbs/bootstrap/releases) - [Commits](https://github.com/twbs/bootstrap/compare/v5.3.2...v5.3.3) --- updated-dependencies: - dependency-name: bootstrap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index e5657a078f..bbd321913f 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "@kolkov/ngx-gallery": "2.0.1", "@ng-bootstrap/ng-bootstrap": "^16.0.0", "@popperjs/core": "^2.11.8", - "bootstrap": "^5.3.2", + "bootstrap": "^5.3.3", "codemirror": "^6.0.1", "d3-drag": "^3.0.0", "d3-fetch": "^3.0.1", diff --git a/yarn.lock b/yarn.lock index b3a39d3471..7324271082 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4127,10 +4127,10 @@ bootstrap.native@^5.0.10: "@thednp/event-listener" "^2.0.4" "@thednp/shorty" "2.0.0-alpha22" -bootstrap@^5.3.2: - version "5.3.2" - resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.3.2.tgz#97226583f27aae93b2b28ab23f4c114757ff16ae" - integrity sha512-D32nmNWiQHo94BKHLmOrdjlL05q1c8oxbtBphQFb9Z5to6eGRDCm0QgeaZ4zFBHzfg2++rqa2JkqCcxDy0sH0g== +bootstrap@^5.3.3: + version "5.3.3" + resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.3.3.tgz#de35e1a765c897ac940021900fcbb831602bac38" + integrity sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg== bplist-parser@^0.2.0: version "0.2.0" From fa3a17261e31e0ad06e31ba48271e4959aa6ebdf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Feb 2024 14:10:51 +0000 Subject: [PATCH 27/63] build(deps): bump codecov/codecov-action from 4.0.1 to 4.0.2 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.0.1 to 4.0.2. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/e0b68c6749509c5f83f984dd99a76a1c1a231044...0cfda1dd0a4ad9efc75517f399d859cd1ea4ced1) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/ci_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_workflow.yml b/.github/workflows/ci_workflow.yml index ef1dc2a7c6..73340e7719 100644 --- a/.github/workflows/ci_workflow.yml +++ b/.github/workflows/ci_workflow.yml @@ -42,7 +42,7 @@ jobs: yarn run test:ci - name: Upload code coverage if: matrix.node-version == 20.9 # upload coverage report for current node version only - uses: codecov/codecov-action@e0b68c6749509c5f83f984dd99a76a1c1a231044 # ratchet:codecov/codecov-action@v4.0.1 + uses: codecov/codecov-action@0cfda1dd0a4ad9efc75517f399d859cd1ea4ced1 # ratchet:codecov/codecov-action@v4.0.2 with: flags: unittests env_vars: ${{ matrix.os }}, ${{ matrix.node-version }} From 74b5bb47352a5d45aad7e0acdbea44135fbfcf0e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Feb 2024 14:40:32 +0000 Subject: [PATCH 28/63] build(deps-dev): bump eslint from 8.56.0 to 8.57.0 Bumps [eslint](https://github.com/eslint/eslint) from 8.56.0 to 8.57.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.56.0...v8.57.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 40 ++++++++++++++++++++-------------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index bbd321913f..679ccd0ff3 100644 --- a/package.json +++ b/package.json @@ -136,7 +136,7 @@ "@typescript-eslint/parser": "^7.0.2", "angular-cli-ghpages": "^1.0.7", "conventional-recommended-bump": "^9.0.0", - "eslint": "^8.56.0", + "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-angular": "^4.1.0", "eslint-plugin-deprecation": "^2.0.0", diff --git a/yarn.lock b/yarn.lock index 7324271082..d2bd651b05 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2041,10 +2041,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.56.0": - version "8.56.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.56.0.tgz#ef20350fec605a7f7035a01764731b2de0f3782b" - integrity sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A== +"@eslint/js@8.57.0": + version "8.57.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" + integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== "@fastify/busboy@^2.0.0": version "2.0.0" @@ -2129,13 +2129,13 @@ dependencies: base64-js "^1.3.0" -"@humanwhocodes/config-array@^0.11.13": - version "0.11.13" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.13.tgz#075dc9684f40a531d9b26b0822153c1e832ee297" - integrity sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ== +"@humanwhocodes/config-array@^0.11.14": + version "0.11.14" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" + integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== dependencies: - "@humanwhocodes/object-schema" "^2.0.1" - debug "^4.1.1" + "@humanwhocodes/object-schema" "^2.0.2" + debug "^4.3.1" minimatch "^3.0.5" "@humanwhocodes/module-importer@^1.0.1": @@ -2143,10 +2143,10 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz#e5211452df060fa8522b55c7b3c0c4d1981cb044" - integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw== +"@humanwhocodes/object-schema@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz#d9fae00a2d5cb40f92cfe64b47ad749fbc38f917" + integrity sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw== "@hutson/parse-repository-url@^3.0.0": version "3.0.2" @@ -6037,16 +6037,16 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^8.56.0: - version "8.56.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.56.0.tgz#4957ce8da409dc0809f99ab07a1b94832ab74b15" - integrity sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ== +eslint@^8.57.0: + version "8.57.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" + integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.56.0" - "@humanwhocodes/config-array" "^0.11.13" + "@eslint/js" "8.57.0" + "@humanwhocodes/config-array" "^0.11.14" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" "@ungap/structured-clone" "^1.2.0" From c61dd6f38cf5d6156cdb61e693516b9ec2467ed8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Feb 2024 11:21:06 +0000 Subject: [PATCH 29/63] build(deps): bump es5-ext from 0.10.62 to 0.10.63 Bumps [es5-ext](https://github.com/medikoo/es5-ext) from 0.10.62 to 0.10.63. - [Release notes](https://github.com/medikoo/es5-ext/releases) - [Changelog](https://github.com/medikoo/es5-ext/blob/main/CHANGELOG.md) - [Commits](https://github.com/medikoo/es5-ext/compare/v0.10.62...v0.10.63) --- updated-dependencies: - dependency-name: es5-ext dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index d2bd651b05..8ccacf775a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5767,12 +5767,13 @@ es-to-primitive@^1.2.1: is-symbol "^1.0.2" es5-ext@^0.10.35, es5-ext@^0.10.50, es5-ext@^0.10.62, es5-ext@~0.10.14: - version "0.10.62" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" - integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== + version "0.10.63" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.63.tgz#9c222a63b6a332ac80b1e373b426af723b895bd6" + integrity sha512-hUCZd2Byj/mNKjfP9jXrdVZ62B8KuA/VoK7X8nUh5qT+AxDmcbvZz041oDVZdbIN1qW6XY9VDNwzkvKnZvK2TQ== dependencies: es6-iterator "^2.0.3" es6-symbol "^3.1.3" + esniff "^2.0.1" next-tick "^1.1.0" es6-iterator@^2.0.3, es6-iterator@~2.0.1, es6-iterator@~2.0.3: @@ -6081,6 +6082,16 @@ eslint@^8.57.0: strip-ansi "^6.0.1" text-table "^0.2.0" +esniff@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308" + integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg== + dependencies: + d "^1.0.1" + es5-ext "^0.10.62" + event-emitter "^0.3.5" + type "^2.7.2" + espree@^9.6.0, espree@^9.6.1: version "9.6.1" resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" From eea00e8f8d68460599c3c2833bb8652d4f82d15c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Feb 2024 11:23:59 +0000 Subject: [PATCH 30/63] build(deps-dev): bump karma from 6.4.2 to 6.4.3 Bumps [karma](https://github.com/karma-runner/karma) from 6.4.2 to 6.4.3. - [Release notes](https://github.com/karma-runner/karma/releases) - [Changelog](https://github.com/karma-runner/karma/blob/master/CHANGELOG.md) - [Commits](https://github.com/karma-runner/karma/compare/v6.4.2...v6.4.3) --- updated-dependencies: - dependency-name: karma dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 38 +++++++++++++++++++------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index 679ccd0ff3..662410c249 100644 --- a/package.json +++ b/package.json @@ -146,7 +146,7 @@ "gzipper": "^7.2.0", "husky": "^9.0.11", "jasmine-core": "~5.1.2", - "karma": "~6.4.2", + "karma": "~6.4.3", "karma-chrome-launcher": "~3.2.0", "karma-coverage": "^2.2.1", "karma-jasmine": "~5.1.0", diff --git a/yarn.lock b/yarn.lock index 8ccacf775a..4e644358a6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5606,15 +5606,15 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: dependencies: once "^1.4.0" -engine.io-parser@~5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.1.0.tgz#d593d6372d7f79212df48f807b8cace1ea1cb1b8" - integrity sha512-enySgNiK5tyZFynt3z7iqBR+Bto9EVVVvDFuTT0ioHCGbzirZVGDGiQjZzEp8hWl6hd5FSVytJGuScX1C1C35w== +engine.io-parser@~5.2.1: + version "5.2.2" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.2.2.tgz#37b48e2d23116919a3453738c5720455e64e1c49" + integrity sha512-RcyUFKA93/CXH20l4SoVvzZfrSDMOTUS3bWVpTt2FuFP+XYrL8i8oonHP7WInRyVHXh0n/ORtoeiE1os+8qkSw== -engine.io@~6.5.0: - version "6.5.0" - resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.5.0.tgz#02b9d9941c0d3ab2d46628e98ac3331dd533dff0" - integrity sha512-UlfoK1iD62Hkedw2TmuHdhDsZCGaAyp+LZ/AvnImjYBeWagA3qIEETum90d6shMeFZiDuGT66zVCdx1wKYKGGg== +engine.io@~6.5.2: + version "6.5.4" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.5.4.tgz#6822debf324e781add2254e912f8568508850cdc" + integrity sha512-KdVSDKhVKyOi+r5uEabrDLZw2qXStVvCsEB/LN3mw4WFi6Gx50jTyuxYVCwAAC0U46FdnzP/ScKRBTXb/NiEOg== dependencies: "@types/cookie" "^0.4.1" "@types/cors" "^2.8.12" @@ -5624,7 +5624,7 @@ engine.io@~6.5.0: cookie "~0.4.1" cors "~2.8.5" debug "~4.3.1" - engine.io-parser "~5.1.0" + engine.io-parser "~5.2.1" ws "~8.11.0" enhanced-resolve@^5.15.0: @@ -8032,10 +8032,10 @@ karma-source-map-support@1.4.0: dependencies: source-map-support "^0.5.5" -karma@~6.4.2: - version "6.4.2" - resolved "https://registry.yarnpkg.com/karma/-/karma-6.4.2.tgz#a983f874cee6f35990c4b2dcc3d274653714de8e" - integrity sha512-C6SU/53LB31BEgRg+omznBEMY4SjHU3ricV6zBcAe1EeILKkeScr+fZXtaI5WyDbkVowJxxAI6h73NcFPmXolQ== +karma@~6.4.3: + version "6.4.3" + resolved "https://registry.yarnpkg.com/karma/-/karma-6.4.3.tgz#763e500f99597218bbb536de1a14acc4ceea7ce8" + integrity sha512-LuucC/RE92tJ8mlCwqEoRWXP38UMAqpnq98vktmS9SznSoUPPUJQbc91dHcxcunROvfQjdORVA/YFviH+Xci9Q== dependencies: "@colors/colors" "1.5.0" body-parser "^1.19.0" @@ -8056,7 +8056,7 @@ karma@~6.4.2: qjobs "^1.2.0" range-parser "^1.2.1" rimraf "^3.0.2" - socket.io "^4.4.1" + socket.io "^4.7.2" source-map "^0.6.1" tmp "^0.2.1" ua-parser-js "^0.7.30" @@ -10695,16 +10695,16 @@ socket.io-parser@~4.2.4: "@socket.io/component-emitter" "~3.1.0" debug "~4.3.1" -socket.io@^4.4.1: - version "4.7.0" - resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.7.0.tgz#ae21460d5aef23b152d38de64d7c1798cd2d23fc" - integrity sha512-eOpu7oCNiPGBHn9Falg0cAGivp6TpDI3Yt596fbsf+vln8kRLFWxXKrecFrybn/xNYVn9HcdJNAkYToCmTjsyg== +socket.io@^4.7.2: + version "4.7.4" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.7.4.tgz#2401a2d7101e4bdc64da80b140d5d8b6a8c7738b" + integrity sha512-DcotgfP1Zg9iP/dH9zvAQcWrE0TtbMVwXmlV4T4mqsvY+gw+LqUGPfx2AoVyRk0FLME+GQhufDMyacFmw7ksqw== dependencies: accepts "~1.3.4" base64id "~2.0.0" cors "~2.8.5" debug "~4.3.2" - engine.io "~6.5.0" + engine.io "~6.5.2" socket.io-adapter "~2.5.2" socket.io-parser "~4.2.4" From 15ee52e247db4fee9a782372790964b197008be0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Feb 2024 14:05:58 +0000 Subject: [PATCH 31/63] build(deps-dev): bump the typescript-eslint group with 2 updates Bumps the typescript-eslint group with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 7.0.2 to 7.1.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.1.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 7.0.2 to 7.1.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.1.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: typescript-eslint - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: typescript-eslint ... Signed-off-by: dependabot[bot] --- package.json | 4 +-- yarn.lock | 100 +++++++++++++++++++++++++-------------------------- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/package.json b/package.json index 662410c249..a4ce805c96 100644 --- a/package.json +++ b/package.json @@ -132,8 +132,8 @@ "@types/d3": "^7.4.3", "@types/jasmine": "~5.1.4", "@types/node": "^18.19.18", - "@typescript-eslint/eslint-plugin": "^7.0.2", - "@typescript-eslint/parser": "^7.0.2", + "@typescript-eslint/eslint-plugin": "^7.1.0", + "@typescript-eslint/parser": "^7.1.0", "angular-cli-ghpages": "^1.0.7", "conventional-recommended-bump": "^9.0.0", "eslint": "^8.57.0", diff --git a/yarn.lock b/yarn.lock index 4e644358a6..51e51ea674 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3135,16 +3135,16 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.0.2.tgz#c13a34057be425167cc4a765158c46fdf2fd981d" - integrity sha512-/XtVZJtbaphtdrWjr+CJclaCVGPtOdBpFEnvtNf/jRV0IiEemRrL0qABex/nEt8isYcnFacm3nPHYQwL+Wb7qg== +"@typescript-eslint/eslint-plugin@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.1.0.tgz#22bb999a8d59893c0ea07923e8a21f9d985ad740" + integrity sha512-j6vT/kCulhG5wBmGtstKeiVr1rdXE4nk+DT1k6trYkwlrvW9eOF5ZbgKnd/YR6PcM4uTEXa0h6Fcvf6X7Dxl0w== dependencies: "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "7.0.2" - "@typescript-eslint/type-utils" "7.0.2" - "@typescript-eslint/utils" "7.0.2" - "@typescript-eslint/visitor-keys" "7.0.2" + "@typescript-eslint/scope-manager" "7.1.0" + "@typescript-eslint/type-utils" "7.1.0" + "@typescript-eslint/utils" "7.1.0" + "@typescript-eslint/visitor-keys" "7.1.0" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.2.4" @@ -3152,15 +3152,15 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/parser@^7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.0.2.tgz#95c31233d343db1ca1df8df7811b5b87ca7b1a68" - integrity sha512-GdwfDglCxSmU+QTS9vhz2Sop46ebNCXpPPvsByK7hu0rFGRHL+AusKQJ7SoN+LbLh6APFpQwHKmDSwN35Z700Q== +"@typescript-eslint/parser@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.1.0.tgz#b89dab90840f7d2a926bf4c23b519576e8c31970" + integrity sha512-V1EknKUubZ1gWFjiOZhDSNToOjs63/9O0puCgGS8aDOgpZY326fzFu15QAUjwaXzRZjf/qdsdBrckYdv9YxB8w== dependencies: - "@typescript-eslint/scope-manager" "7.0.2" - "@typescript-eslint/types" "7.0.2" - "@typescript-eslint/typescript-estree" "7.0.2" - "@typescript-eslint/visitor-keys" "7.0.2" + "@typescript-eslint/scope-manager" "7.1.0" + "@typescript-eslint/types" "7.1.0" + "@typescript-eslint/typescript-estree" "7.1.0" + "@typescript-eslint/visitor-keys" "7.1.0" debug "^4.3.4" "@typescript-eslint/scope-manager@6.19.0": @@ -3179,13 +3179,13 @@ "@typescript-eslint/types" "6.21.0" "@typescript-eslint/visitor-keys" "6.21.0" -"@typescript-eslint/scope-manager@7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.0.2.tgz#6ec4cc03752758ddd1fdaae6fbd0ed9a2ca4fe63" - integrity sha512-l6sa2jF3h+qgN2qUMjVR3uCNGjWw4ahGfzIYsCtFrQJCjhbrDPdiihYT8FnnqFwsWX+20hK592yX9I2rxKTP4g== +"@typescript-eslint/scope-manager@7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.1.0.tgz#e4babaa39a3d612eff0e3559f3e99c720a2b4a54" + integrity sha512-6TmN4OJiohHfoOdGZ3huuLhpiUgOGTpgXNUPJgeZOZR3DnIpdSgtt83RS35OYNNXxM4TScVlpVKC9jyQSETR1A== dependencies: - "@typescript-eslint/types" "7.0.2" - "@typescript-eslint/visitor-keys" "7.0.2" + "@typescript-eslint/types" "7.1.0" + "@typescript-eslint/visitor-keys" "7.1.0" "@typescript-eslint/type-utils@6.19.0": version "6.19.0" @@ -3197,13 +3197,13 @@ debug "^4.3.4" ts-api-utils "^1.0.1" -"@typescript-eslint/type-utils@7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.0.2.tgz#a7fc0adff0c202562721357e7478207d380a757b" - integrity sha512-IKKDcFsKAYlk8Rs4wiFfEwJTQlHcdn8CLwLaxwd6zb8HNiMcQIFX9sWax2k4Cjj7l7mGS5N1zl7RCHOVwHq2VQ== +"@typescript-eslint/type-utils@7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.1.0.tgz#372dfa470df181bcee0072db464dc778b75ed722" + integrity sha512-UZIhv8G+5b5skkcuhgvxYWHjk7FW7/JP5lPASMEUoliAPwIH/rxoUSQPia2cuOj9AmDZmwUl1usKm85t5VUMew== dependencies: - "@typescript-eslint/typescript-estree" "7.0.2" - "@typescript-eslint/utils" "7.0.2" + "@typescript-eslint/typescript-estree" "7.1.0" + "@typescript-eslint/utils" "7.1.0" debug "^4.3.4" ts-api-utils "^1.0.1" @@ -3217,10 +3217,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== -"@typescript-eslint/types@7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.0.2.tgz#b6edd108648028194eb213887d8d43ab5750351c" - integrity sha512-ZzcCQHj4JaXFjdOql6adYV4B/oFOFjPOC9XYwCaZFRvqN8Llfvv4gSxrkQkd2u4Ci62i2c6W6gkDwQJDaRc4nA== +"@typescript-eslint/types@7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.1.0.tgz#52a86d6236fda646e7e5fe61154991dc0dc433ef" + integrity sha512-qTWjWieJ1tRJkxgZYXx6WUYtWlBc48YRxgY2JN1aGeVpkhmnopq+SUC8UEVGNXIvWH7XyuTjwALfG6bFEgCkQA== "@typescript-eslint/typescript-estree@6.19.0": version "6.19.0" @@ -3250,13 +3250,13 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/typescript-estree@7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.0.2.tgz#3c6dc8a3b9799f4ef7eca0d224ded01974e4cb39" - integrity sha512-3AMc8khTcELFWcKcPc0xiLviEvvfzATpdPj/DXuOGIdQIIFybf4DMT1vKRbuAEOFMwhWt7NFLXRkbjsvKZQyvw== +"@typescript-eslint/typescript-estree@7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.1.0.tgz#419b1310f061feee6df676c5bed460537310c593" + integrity sha512-k7MyrbD6E463CBbSpcOnwa8oXRdHzH1WiVzOipK3L5KSML92ZKgUBrTlehdi7PEIMT8k0bQixHUGXggPAlKnOQ== dependencies: - "@typescript-eslint/types" "7.0.2" - "@typescript-eslint/visitor-keys" "7.0.2" + "@typescript-eslint/types" "7.1.0" + "@typescript-eslint/visitor-keys" "7.1.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -3277,17 +3277,17 @@ "@typescript-eslint/typescript-estree" "6.19.0" semver "^7.5.4" -"@typescript-eslint/utils@7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.0.2.tgz#8756123054cd934c8ba7db6a6cffbc654b10b5c4" - integrity sha512-PZPIONBIB/X684bhT1XlrkjNZJIEevwkKDsdwfiu1WeqBxYEEdIgVDgm8/bbKHVu+6YOpeRqcfImTdImx/4Bsw== +"@typescript-eslint/utils@7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.1.0.tgz#710ecda62aff4a3c8140edabf3c5292d31111ddd" + integrity sha512-WUFba6PZC5OCGEmbweGpnNJytJiLG7ZvDBJJoUcX4qZYf1mGZ97mO2Mps6O2efxJcJdRNpqweCistDbZMwIVHw== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.12" "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "7.0.2" - "@typescript-eslint/types" "7.0.2" - "@typescript-eslint/typescript-estree" "7.0.2" + "@typescript-eslint/scope-manager" "7.1.0" + "@typescript-eslint/types" "7.1.0" + "@typescript-eslint/typescript-estree" "7.1.0" semver "^7.5.4" "@typescript-eslint/utils@^6.0.0": @@ -3319,12 +3319,12 @@ "@typescript-eslint/types" "6.21.0" eslint-visitor-keys "^3.4.1" -"@typescript-eslint/visitor-keys@7.0.2": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.0.2.tgz#2899b716053ad7094962beb895d11396fc12afc7" - integrity sha512-8Y+YiBmqPighbm5xA2k4wKTxRzx9EkBu7Rlw+WHqMvRJ3RPz/BMBO9b2ru0LUNmXg120PHUXD5+SWFy2R8DqlQ== +"@typescript-eslint/visitor-keys@7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.0.tgz#576c4ad462ca1378135a55e2857d7aced96ce0a0" + integrity sha512-FhUqNWluiGNzlvnDZiXad4mZRhtghdoKW6e98GoEOYSu5cND+E39rG5KwJMUzeENwm1ztYBRqof8wMLP+wNPIA== dependencies: - "@typescript-eslint/types" "7.0.2" + "@typescript-eslint/types" "7.1.0" eslint-visitor-keys "^3.4.1" "@ungap/structured-clone@^1.2.0": From 46cb94085f7d7d2a60f4236305f3a2dc346960ca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Feb 2024 14:06:33 +0000 Subject: [PATCH 32/63] build(deps-dev): bump the commitlint group with 2 updates Bumps the commitlint group with 2 updates: [@commitlint/cli](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/cli) and [@commitlint/config-angular](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/config-angular). Updates `@commitlint/cli` from 18.6.1 to 19.0.0 - [Release notes](https://github.com/conventional-changelog/commitlint/releases) - [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/cli/CHANGELOG.md) - [Commits](https://github.com/conventional-changelog/commitlint/commits/v19.0.0/@commitlint/cli) Updates `@commitlint/config-angular` from 18.6.1 to 19.0.0 - [Release notes](https://github.com/conventional-changelog/commitlint/releases) - [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/config-angular/CHANGELOG.md) - [Commits](https://github.com/conventional-changelog/commitlint/commits/v19.0.0/@commitlint/config-angular) --- updated-dependencies: - dependency-name: "@commitlint/cli" dependency-type: direct:development update-type: version-update:semver-major dependency-group: commitlint - dependency-name: "@commitlint/config-angular" dependency-type: direct:development update-type: version-update:semver-major dependency-group: commitlint ... Signed-off-by: dependabot[bot] --- package.json | 4 +- yarn.lock | 296 +++++++++++++++++++++++++++------------------------ 2 files changed, 156 insertions(+), 144 deletions(-) diff --git a/package.json b/package.json index a4ce805c96..fcc42681e3 100644 --- a/package.json +++ b/package.json @@ -126,8 +126,8 @@ "@angular-eslint/template-parser": "^17.2.1", "@angular/cli": "^17.2.1", "@angular/compiler-cli": "^17.2.2", - "@commitlint/cli": "^18.6.1", - "@commitlint/config-angular": "^18.6.1", + "@commitlint/cli": "^19.0.0", + "@commitlint/config-angular": "^19.0.0", "@compodoc/compodoc": "^1.1.23", "@types/d3": "^7.4.3", "@types/jasmine": "~5.1.4", diff --git a/yarn.lock b/yarn.lock index 51e51ea674..057c4a0b88 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1512,167 +1512,165 @@ resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== -"@commitlint/cli@^18.6.1": - version "18.6.1" - resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-18.6.1.tgz#78bffdfa00d6f01425d53096954993d83f2b343d" - integrity sha512-5IDE0a+lWGdkOvKH892HHAZgbAjcj1mT5QrfA/SVbLJV/BbBMGyKN0W5mhgjekPJJwEQdVNvhl9PwUacY58Usw== - dependencies: - "@commitlint/format" "^18.6.1" - "@commitlint/lint" "^18.6.1" - "@commitlint/load" "^18.6.1" - "@commitlint/read" "^18.6.1" - "@commitlint/types" "^18.6.1" - execa "^5.0.0" - lodash.isfunction "^3.0.9" - resolve-from "5.0.0" - resolve-global "1.0.0" +"@commitlint/cli@^19.0.0": + version "19.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-19.0.0.tgz#03a5c8cef2cbffd514d0ff1a517a633c46fd4456" + integrity sha512-SVBQG6k+eOOmlejYTtxnqJGmhrzy/m0qH3bVeoHY3gtlJBK3Kb32RjJioteBYk8Vuo58x5ehAjXwsQFX58X+xw== + dependencies: + "@commitlint/format" "^19.0.0" + "@commitlint/lint" "^19.0.0" + "@commitlint/load" "^19.0.0" + "@commitlint/read" "^19.0.0" + "@commitlint/types" "^19.0.0" + execa "^8.0.1" + resolve-from "^5.0.0" + resolve-global "^2.0.0" yargs "^17.0.0" -"@commitlint/config-angular-type-enum@^18.6.1": - version "18.6.1" - resolved "https://registry.yarnpkg.com/@commitlint/config-angular-type-enum/-/config-angular-type-enum-18.6.1.tgz#713078a657c040064a1fd710dc66e625a04d3336" - integrity sha512-qX9MdNJ82I5nKY7zD20Mo6Oz8Qx1cBhoet+ZI7ItWdhKAzp9jY2HTg40sLM2zxGrd1pHZCot6MXXKaBHr7bU9A== +"@commitlint/config-angular-type-enum@^19.0.0": + version "19.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/config-angular-type-enum/-/config-angular-type-enum-19.0.0.tgz#5bbbdb94e2af4c5d566de3173bc2a3a94dc300c7" + integrity sha512-t+VwImd0faPg4ZCNb7rfMkyOvvLhDLpp4YjEQEek/TBYTaAWeAXGuEUmdigMd1QEL2t+DP08CMmEcDg9UZQ4dw== -"@commitlint/config-angular@^18.6.1": - version "18.6.1" - resolved "https://registry.yarnpkg.com/@commitlint/config-angular/-/config-angular-18.6.1.tgz#6c8a456830d2ef3ee17d2989af862f652f81b28c" - integrity sha512-Aki/xnNPc36bo47gkD/BIgR+vWAik/9k3l+9I46K3UlZadcE1XqqrEPkFWwhGHEGb4X3571IUbJZM33qXuSIcw== +"@commitlint/config-angular@^19.0.0": + version "19.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/config-angular/-/config-angular-19.0.0.tgz#77ed7a7815b324b23958c76817d21d32c6416c29" + integrity sha512-Xm4CCVnUFUI0T6NBbm60fRwylyXsfubopXBiSHxqxYz2JKkkE7gT2iNrwzfliOg219jwVrLc1yeka7a7jxiqcA== dependencies: - "@commitlint/config-angular-type-enum" "^18.6.1" + "@commitlint/config-angular-type-enum" "^19.0.0" -"@commitlint/config-validator@^18.6.1": - version "18.6.1" - resolved "https://registry.yarnpkg.com/@commitlint/config-validator/-/config-validator-18.6.1.tgz#e0d71a99c984a68586c7ae7afd3f52342022fae8" - integrity sha512-05uiToBVfPhepcQWE1ZQBR/Io3+tb3gEotZjnI4tTzzPk16NffN6YABgwFQCLmzZefbDcmwWqJWc2XT47q7Znw== +"@commitlint/config-validator@^19.0.0": + version "19.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/config-validator/-/config-validator-19.0.0.tgz#11891a4f6a0c2a7efbb7ed231dc214350e95b77e" + integrity sha512-oxJ2k+jBPRyWzv1ixfxwGZO5DJ1S+v3D8u/QESMwuPh3kQmeOYBRxGI+5FDWMwiVSHpztlhvvxDAU9SFXeMqUA== dependencies: - "@commitlint/types" "^18.6.1" + "@commitlint/types" "^19.0.0" ajv "^8.11.0" -"@commitlint/ensure@^18.6.1": - version "18.6.1" - resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-18.6.1.tgz#17141e083200ca94d8480dc23b0e8f8b1fd37b7f" - integrity sha512-BPm6+SspyxQ7ZTsZwXc7TRQL5kh5YWt3euKmEIBZnocMFkJevqs3fbLRb8+8I/cfbVcAo4mxRlpTPfz8zX7SnQ== +"@commitlint/ensure@^19.0.0": + version "19.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-19.0.0.tgz#7426b27853f21ebbe403ac7a97cffe4fc3e99acf" + integrity sha512-G0avCIwjKplTP1Oc9MlDhsYqi1yOWORtJSBpyMbQEnalQAW1tuRxG4LOLRZVKfFqlDWs2SfVQPN0Uw51Ge0f6w== dependencies: - "@commitlint/types" "^18.6.1" + "@commitlint/types" "^19.0.0" lodash.camelcase "^4.3.0" lodash.kebabcase "^4.1.1" lodash.snakecase "^4.1.1" lodash.startcase "^4.4.0" lodash.upperfirst "^4.3.1" -"@commitlint/execute-rule@^18.6.1": - version "18.6.1" - resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-18.6.1.tgz#18175e043fe6fb5fceea7b8530316c644f93dfe6" - integrity sha512-7s37a+iWyJiGUeMFF6qBlyZciUkF8odSAnHijbD36YDctLhGKoYltdvuJ/AFfRm6cBLRtRk9cCVPdsEFtt/2rg== +"@commitlint/execute-rule@^19.0.0": + version "19.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-19.0.0.tgz#928fb239ae8deec82a6e3b05ec9cfe20afa83856" + integrity sha512-mtsdpY1qyWgAO/iOK0L6gSGeR7GFcdW7tIjcNFxcWkfLDF5qVbPHKuGATFqRMsxcO8OUKNj0+3WOHB7EHm4Jdw== -"@commitlint/format@^18.6.1": - version "18.6.1" - resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-18.6.1.tgz#5f2b8b3ae4d8d80bd9239178e97df63e5b8d280a" - integrity sha512-K8mNcfU/JEFCharj2xVjxGSF+My+FbUHoqR+4GqPGrHNqXOGNio47ziiR4HQUPKtiNs05o8/WyLBoIpMVOP7wg== +"@commitlint/format@^19.0.0": + version "19.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-19.0.0.tgz#5da103249bf0e7bdb2ad5e757a37a94e2294c45a" + integrity sha512-36P4/2tpGSGQsYoSZEso5fTSTaMSArIK9fszy+5B8hwwAvOfnD4kQtrwfMhiXnf7PCgeX2lx5Jma+pY3Bq326A== dependencies: - "@commitlint/types" "^18.6.1" - chalk "^4.1.0" + "@commitlint/types" "^19.0.0" + chalk "^5.3.0" -"@commitlint/is-ignored@^18.6.1": - version "18.6.1" - resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-18.6.1.tgz#4ee08ba91ff3defb06e0ef19259a9c6734a8d06e" - integrity sha512-MOfJjkEJj/wOaPBw5jFjTtfnx72RGwqYIROABudOtJKW7isVjFe9j0t8xhceA02QebtYf4P/zea4HIwnXg8rvA== +"@commitlint/is-ignored@^19.0.0": + version "19.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-19.0.0.tgz#c2fef35374eb58510d59380592269adcc1b67f8a" + integrity sha512-5b2nIrl8GEjzYAnOK2ZAUxBXvUonYrp3+8kJkUMl8QOtjt2O1gsd71jar7UtoDEqTWJhc+n7lG6lQYMXtcQJAw== dependencies: - "@commitlint/types" "^18.6.1" - semver "7.6.0" + "@commitlint/types" "^19.0.0" + semver "^7.6.0" -"@commitlint/lint@^18.6.1": - version "18.6.1" - resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-18.6.1.tgz#fe3834636c99ee14534a8eb3832831ac362e9fd8" - integrity sha512-8WwIFo3jAuU+h1PkYe5SfnIOzp+TtBHpFr4S8oJWhu44IWKuVx6GOPux3+9H1iHOan/rGBaiacicZkMZuluhfQ== - dependencies: - "@commitlint/is-ignored" "^18.6.1" - "@commitlint/parse" "^18.6.1" - "@commitlint/rules" "^18.6.1" - "@commitlint/types" "^18.6.1" - -"@commitlint/load@^18.6.1": - version "18.6.1" - resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-18.6.1.tgz#fb79ed7ee8b5897a9b5c274c1e24eda9162df816" - integrity sha512-p26x8734tSXUHoAw0ERIiHyW4RaI4Bj99D8YgUlVV9SedLf8hlWAfyIFhHRIhfPngLlCe0QYOdRKYFt8gy56TA== - dependencies: - "@commitlint/config-validator" "^18.6.1" - "@commitlint/execute-rule" "^18.6.1" - "@commitlint/resolve-extends" "^18.6.1" - "@commitlint/types" "^18.6.1" - chalk "^4.1.0" +"@commitlint/lint@^19.0.0": + version "19.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-19.0.0.tgz#eb093263f50ac3b28acf1653b5058979fce8a222" + integrity sha512-rAAisSpxhA+z4uhsveSt1CuTB+Jld5d7zyNSEK2UWjQaOxicwDP+LFiOdM32n/vwsLlOJqhrInA50UcbRSVaGg== + dependencies: + "@commitlint/is-ignored" "^19.0.0" + "@commitlint/parse" "^19.0.0" + "@commitlint/rules" "^19.0.0" + "@commitlint/types" "^19.0.0" + +"@commitlint/load@^19.0.0": + version "19.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-19.0.0.tgz#fc716f5054c0d6f7d72293eaaa4a184c5000f933" + integrity sha512-pC/6xDjkWPWgqfILY0KMMpxz0dTZqC7fUpxyWMLRrlbZCC9S54/gsg/8UltFrUH+C+F1zz4Ip8CQgzKonpH6rg== + dependencies: + "@commitlint/config-validator" "^19.0.0" + "@commitlint/execute-rule" "^19.0.0" + "@commitlint/resolve-extends" "^19.0.0" + "@commitlint/types" "^19.0.0" + chalk "^5.3.0" cosmiconfig "^8.3.6" cosmiconfig-typescript-loader "^5.0.0" lodash.isplainobject "^4.0.6" lodash.merge "^4.6.2" lodash.uniq "^4.5.0" - resolve-from "^5.0.0" -"@commitlint/message@^18.6.1": - version "18.6.1" - resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-18.6.1.tgz#107bd40923ad23d2de56c92a68b179ebfb7e314e" - integrity sha512-VKC10UTMLcpVjMIaHHsY1KwhuTQtdIKPkIdVEwWV+YuzKkzhlI3aNy6oo1eAN6b/D2LTtZkJe2enHmX0corYRw== +"@commitlint/message@^19.0.0": + version "19.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-19.0.0.tgz#f789dd1b7a1f9c784578e0111f46cc3fecf5a531" + integrity sha512-c9czf6lU+9oF9gVVa2lmKaOARJvt4soRsVmbR7Njwp9FpbBgste5i7l/2l5o8MmbwGh4yE1snfnsy2qyA2r/Fw== -"@commitlint/parse@^18.6.1": - version "18.6.1" - resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-18.6.1.tgz#2946b814125e907b9c4d63d3e71d0c1b54b30b62" - integrity sha512-eS/3GREtvVJqGZrwAGRwR9Gdno3YcZ6Xvuaa+vUF8j++wsmxrA2En3n0ccfVO2qVOLJC41ni7jSZhQiJpMPGOQ== +"@commitlint/parse@^19.0.0": + version "19.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-19.0.0.tgz#e7200b24033e6a7efe2213f9c9ac86de75f95d28" + integrity sha512-/2hT08V/2Lh+aQ5cSAw5vO74FlA3LJGYzLfsNMcx6aW8Kmrsa9W7chNNY5hMWbucCF92s/JE3eVIHnzoEBKTTA== dependencies: - "@commitlint/types" "^18.6.1" + "@commitlint/types" "^19.0.0" conventional-changelog-angular "^7.0.0" conventional-commits-parser "^5.0.0" -"@commitlint/read@^18.6.1": - version "18.6.1" - resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-18.6.1.tgz#8c138311ed9749427920c369f6276be136f2aa50" - integrity sha512-ia6ODaQFzXrVul07ffSgbZGFajpe8xhnDeLIprLeyfz3ivQU1dIoHp7yz0QIorZ6yuf4nlzg4ZUkluDrGN/J/w== +"@commitlint/read@^19.0.0": + version "19.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-19.0.0.tgz#05ce4ef95730dd601fc138f827a39db7d6fa22b0" + integrity sha512-AbK/fQjWrXGAAHl+KeOtZtWJryhzkTnynhkABF4IUFZqK71JSviSIPHYuUQjdwNrD0PJGs5f19ORjY8LOXP08w== dependencies: - "@commitlint/top-level" "^18.6.1" - "@commitlint/types" "^18.6.1" - git-raw-commits "^2.0.11" - minimist "^1.2.6" + "@commitlint/top-level" "^19.0.0" + "@commitlint/types" "^19.0.0" + git-raw-commits "^4.0.0" + minimist "^1.2.8" -"@commitlint/resolve-extends@^18.6.1": - version "18.6.1" - resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-18.6.1.tgz#f0572c682fc24dbabe2e0f42873261e0fa42c91a" - integrity sha512-ifRAQtHwK+Gj3Bxj/5chhc4L2LIc3s30lpsyW67yyjsETR6ctHAHRu1FSpt0KqahK5xESqoJ92v6XxoDRtjwEQ== +"@commitlint/resolve-extends@^19.0.0": + version "19.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-19.0.0.tgz#5ab8f72020f8a758be406b44f71babcb02c51104" + integrity sha512-ej0fALn5yZQOYKH8wPZnzw5LGvD0n5gJBPvV6DnMiSYudqgwYwhdNJ//MukZCXNpLIM1yMA8KUyrCP6D4WnUbg== dependencies: - "@commitlint/config-validator" "^18.6.1" - "@commitlint/types" "^18.6.1" + "@commitlint/config-validator" "^19.0.0" + "@commitlint/types" "^19.0.0" import-fresh "^3.0.0" + import-meta-resolve "^4.0.0" lodash.mergewith "^4.6.2" - resolve-from "^5.0.0" - resolve-global "^1.0.0" + resolve-global "^2.0.0" -"@commitlint/rules@^18.6.1": - version "18.6.1" - resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-18.6.1.tgz#da25aeffe6c0e1c7625e44f46089fb8860986caf" - integrity sha512-kguM6HxZDtz60v/zQYOe0voAtTdGybWXefA1iidjWYmyUUspO1zBPQEmJZ05/plIAqCVyNUTAiRPWIBKLCrGew== +"@commitlint/rules@^19.0.0": + version "19.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-19.0.0.tgz#c6f5aeae52ff14ed37e54cf96156968b1f979ac6" + integrity sha512-uwb5Ro5vvJlEjnWPezL3AcdlbLdJz24SD5VembgA6IXqqunphZr5LFsQL1z5efP7p3MUdJEXFynIx8o62+j2lA== dependencies: - "@commitlint/ensure" "^18.6.1" - "@commitlint/message" "^18.6.1" - "@commitlint/to-lines" "^18.6.1" - "@commitlint/types" "^18.6.1" - execa "^5.0.0" + "@commitlint/ensure" "^19.0.0" + "@commitlint/message" "^19.0.0" + "@commitlint/to-lines" "^19.0.0" + "@commitlint/types" "^19.0.0" + execa "^8.0.1" -"@commitlint/to-lines@^18.6.1": - version "18.6.1" - resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-18.6.1.tgz#d28827a4a540c98eea1aae31dafd66f80b2f1b9e" - integrity sha512-Gl+orGBxYSNphx1+83GYeNy5N0dQsHBQ9PJMriaLQDB51UQHCVLBT/HBdOx5VaYksivSf5Os55TLePbRLlW50Q== +"@commitlint/to-lines@^19.0.0": + version "19.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-19.0.0.tgz#aa6618eb371bafbc0cd3b48f0db565c4a40462c6" + integrity sha512-vkxWo+VQU5wFhiP9Ub9Sre0FYe019JxFikrALVoD5UGa8/t3yOJEpEhxC5xKiENKKhUkTpEItMTRAjHw2SCpZw== -"@commitlint/top-level@^18.6.1": - version "18.6.1" - resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-18.6.1.tgz#429fcb985e3beaba9b17e05c0ae61926c647baf0" - integrity sha512-HyiHQZUTf0+r0goTCDs/bbVv/LiiQ7AVtz6KIar+8ZrseB9+YJAIo8HQ2IC2QT1y3N1lbW6OqVEsTHjbT6hGSw== +"@commitlint/top-level@^19.0.0": + version "19.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-19.0.0.tgz#9c44d7cec533bb9598bfae9658737e2d6a903605" + integrity sha512-KKjShd6u1aMGNkCkaX4aG1jOGdn7f8ZI8TR1VEuNqUOjWTOdcDSsmglinglJ18JTjuBX5I1PtjrhQCRcixRVFQ== dependencies: - find-up "^5.0.0" + find-up "^7.0.0" -"@commitlint/types@^18.6.1": - version "18.6.1" - resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-18.6.1.tgz#7eb3ab2d799d9166fbb98b96b0744581e59a4ad4" - integrity sha512-gwRLBLra/Dozj2OywopeuHj2ac26gjGkz2cZ+86cTJOdtWfiRRr4+e77ZDAGc6MDWxaWheI+mAV5TLWWRwqrFg== +"@commitlint/types@^19.0.0": + version "19.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-19.0.0.tgz#d5af1c8730c85a1622ae885f2d728fced17a4e0c" + integrity sha512-qLjLUdYXKi0TIavONrjBkxrElp7KguqDbvzIRbqTdJBV/cAAr8QEhHe1qUq8OcCM3gFWTlUrDz3ISZbkRoGsAg== dependencies: - chalk "^4.1.0" + chalk "^5.3.0" "@compodoc/compodoc@^1.1.23": version "1.1.23" @@ -6206,7 +6204,7 @@ events@^3.2.0, events@^3.3.0: resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== -execa@8.0.1: +execa@8.0.1, execa@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/execa/-/execa-8.0.1.tgz#51f6a5943b580f963c3ca9c6321796db8cc39b8c" integrity sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg== @@ -6512,6 +6510,15 @@ find-up@^6.3.0: locate-path "^7.1.0" path-exists "^5.0.0" +find-up@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-7.0.0.tgz#e8dec1455f74f78d888ad65bf7ca13dd2b4e66fb" + integrity sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g== + dependencies: + locate-path "^7.2.0" + path-exists "^5.0.0" + unicorn-magic "^0.1.0" + flat-cache@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" @@ -6805,7 +6812,7 @@ gh-pages@^3.1.0: fs-extra "^8.1.0" globby "^6.1.0" -git-raw-commits@^2.0.11, git-raw-commits@^2.0.8: +git-raw-commits@^2.0.8: version "2.0.11" resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.11.tgz#bc3576638071d18655e1cc60d7f524920008d723" integrity sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A== @@ -6910,12 +6917,12 @@ glob@^7.0.3, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7: once "^1.3.0" path-is-absolute "^1.0.0" -global-dirs@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" - integrity sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg== +global-directory@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/global-directory/-/global-directory-4.0.1.tgz#4d7ac7cfd2cb73f304c53b8810891748df5e361e" + integrity sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q== dependencies: - ini "^1.3.4" + ini "4.1.1" globals@^11.1.0: version "11.12.0" @@ -7336,6 +7343,11 @@ import-fresh@^3.0.0, import-fresh@^3.2.1, import-fresh@^3.3.0: parent-module "^1.0.0" resolve-from "^4.0.0" +import-meta-resolve@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/import-meta-resolve/-/import-meta-resolve-4.0.0.tgz#0b1195915689f60ab00f830af0f15cc841e8919e" + integrity sha512-okYUR7ZQPH+efeuMJGlq4f8ubUgO50kByRPyt/Cy1Io4PSRsPjxME+YlVaCOx+NIToW7hCsZNFJyTPFFKepRSA== + imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -7383,7 +7395,7 @@ ini@4.1.1: resolved "https://registry.yarnpkg.com/ini/-/ini-4.1.1.tgz#d95b3d843b1e906e56d6747d5447904ff50ce7a1" integrity sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g== -ini@^1.3.2, ini@^1.3.4: +ini@^1.3.2: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== @@ -8247,7 +8259,7 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" -locate-path@^7.1.0: +locate-path@^7.1.0, locate-path@^7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-7.2.0.tgz#69cb1779bd90b35ab1e771e1f2f89a202c2a8a8a" integrity sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA== @@ -8264,11 +8276,6 @@ lodash.debounce@^4.0.8: resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== -lodash.isfunction@^3.0.9: - version "3.0.9" - resolved "https://registry.yarnpkg.com/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz#06de25df4db327ac931981d1bdb067e5af68d051" - integrity sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw== - lodash.ismatch@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" @@ -10195,22 +10202,22 @@ requires-port@^1.0.0: resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== -resolve-from@5.0.0, resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve-global@1.0.0, resolve-global@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/resolve-global/-/resolve-global-1.0.0.tgz#a2a79df4af2ca3f49bf77ef9ddacd322dad19255" - integrity sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw== +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve-global@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-global/-/resolve-global-2.0.0.tgz#2ff55640800bf3692f089b6008357f75e1a27e54" + integrity sha512-gnAQ0Q/KkupGkuiMyX4L0GaBV8iFwlmoXsMtOz+DFTaKmHhOO/dSlP1RMKhpvHv/dh6K/IQkowGJBqUG0NfBUw== dependencies: - global-dirs "^0.1.1" + global-directory "^4.0.1" resolve-url-loader@5.0.0: version "5.0.0" @@ -11656,6 +11663,11 @@ unicode-trie@^2.0.0: pako "^0.2.5" tiny-inflate "^1.0.0" +unicorn-magic@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/unicorn-magic/-/unicorn-magic-0.1.0.tgz#1bb9a51c823aaf9d73a8bfcd3d1a23dde94b0ce4" + integrity sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ== + unique-filename@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" From 40e903ced5a9e3d99f83be612dcdbc740e467927 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Feb 2024 14:59:11 +0000 Subject: [PATCH 33/63] build(deps): bump codecov/codecov-action from 4.0.2 to 4.1.0 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.0.2 to 4.1.0. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/0cfda1dd0a4ad9efc75517f399d859cd1ea4ced1...54bcd8715eee62d40e33596ef5e8f0f48dbbccab) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/ci_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_workflow.yml b/.github/workflows/ci_workflow.yml index 73340e7719..2c1f949646 100644 --- a/.github/workflows/ci_workflow.yml +++ b/.github/workflows/ci_workflow.yml @@ -42,7 +42,7 @@ jobs: yarn run test:ci - name: Upload code coverage if: matrix.node-version == 20.9 # upload coverage report for current node version only - uses: codecov/codecov-action@0cfda1dd0a4ad9efc75517f399d859cd1ea4ced1 # ratchet:codecov/codecov-action@v4.0.2 + uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # ratchet:codecov/codecov-action@v4.1.0 with: flags: unittests env_vars: ${{ matrix.os }}, ${{ matrix.node-version }} From f301a79133a11b70af65181b95399d9c85df8245 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Tue, 27 Feb 2024 16:42:15 +0100 Subject: [PATCH 34/63] refactor(edition): move from Snap.js to D3.js for FolioViewer --- angular.json | 2 - package.json | 1 - .../edition-folio-viewer.component.html | 10 +- .../edition-folio-viewer.component.ts | 75 ++-- .../edition-folio-viewer/folio.service.ts | 397 ++++++++---------- yarn.lock | 12 - 6 files changed, 220 insertions(+), 277 deletions(-) diff --git a/angular.json b/angular.json index 19d949c716..377b747d12 100644 --- a/angular.json +++ b/angular.json @@ -33,7 +33,6 @@ "src/styles.scss" ], "scripts": [ - "node_modules/snapsvg/dist/snap.svg-min.js", "node_modules/rdfstore/dist/rdfstore_min.js", "src/assets/js/dateConverter.js", "src/assets/js/htmlConverter.js" @@ -126,7 +125,6 @@ "src/styles.scss" ], "scripts": [ - "node_modules/snapsvg/dist/snap.svg-min.js", "node_modules/rdfstore/dist/rdfstore_min.js", "src/assets/js/dateConverter.js", "src/assets/js/htmlConverter.js" diff --git a/package.json b/package.json index fcc42681e3..5f647d0e89 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,6 @@ "ngx-json-viewer": "^3.2.1", "rdfstore": "musicenfanthen/rdfstore-js#v0.9.18-alpha.14", "rxjs": "~7.8.1", - "snapsvg": "^0.5.1", "stream": "^0.0.2", "tslib": "^2.6.2", "zone.js": "~0.14.2" diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.html b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.html index 036a01cc82..3d36585a7f 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.html +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.html @@ -1,11 +1,11 @@ -@if (folioSvgData) { +@if (folioSvgDataArray) {
- @for (folio of folioSvgData; track folio) { -
- [{{ folio.sheet.folioId }}] - + @for (folioSvgData of folioSvgDataArray; track folioSvgData) { +
+ [{{ folioSvgData.sheet.folioId }}] +
}
diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.ts index 67f8b1ae2e..1ead47357e 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.ts @@ -10,6 +10,7 @@ import { } from '@angular/core'; import { + D3Selection, EditionSvgSheet, Folio, FolioConvolute, @@ -19,12 +20,7 @@ import { } from '@awg-views/edition-view/models'; import { FolioService } from './folio.service'; -/** - * Declared variable: Snap. - * - * It provides access to the embedded SnapSvg library (see snapsvg.io). - */ -declare let Snap: any; +import * as D3_SELECTION from 'd3-selection'; /** * The EditionFolioViewer component. @@ -51,7 +47,7 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked /** * Public variable: selectedSvgSheet. * - * It keeps the selected svg sheet. + * It keeps the selected SVG sheet. */ @Input() selectedSvgSheet: EditionSvgSheet; @@ -68,7 +64,7 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked /** * Output variable: selectSvgSheetRequest. * - * It keeps an event emitter for the selected ids of an edition complex and svg sheet. + * It keeps an event emitter for the selected ids of an edition complex and SVG sheet. */ @Output() selectSvgSheetRequest: EventEmitter<{ complexId: string; sheetId: string }> = new EventEmitter(); @@ -76,17 +72,17 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked /** * Public variable: canvasArray. * - * It keeps the array with a Snap canvas per folio. + * It keeps the array with a SVG canvas per folio. */ canvasArray = []; /** - * Public variable: folioSvgData. + * Public variable: folioSvgDataArray. * - * It keeps the array with the svg data - * needed to draw the Snap canvas of the folios. + * It keeps the array with the SVG data + * needed to draw the SVG canvas of the folios. */ - folioSvgData: FolioSvgData[] = []; + folioSvgDataArray: FolioSvgData[] = []; /** * Public variable: vbArray. @@ -174,7 +170,7 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked * after the view was checked. */ ngAfterViewChecked() { - // Start to create svg canvas only after view, inputs and calculation are available + // Start to create SVG canvas only after view, inputs and calculation are available this.createSVGCanvas(); } @@ -182,7 +178,7 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked * Public method: isSelectedSvgSheet. * * It compares a given id with the id - * of the latest selected svg sheet. + * of the latest selected SVG sheet. * * @param {string} id The given sheet id. * @returns {boolean} The boolean value of the comparison result. @@ -198,14 +194,14 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked /** * Public method: prepareFolioSvgOutput. * - * It prepares the viewbox and svg data for all folios - * to render the folio svg object (SnapCanvas). + * It prepares the viewbox and SVG data for all folios + * to render the folio SVG canvas. * * @returns {void} Sets the vbArray and folioSvgData. */ prepareFolioSvgOutput(): void { - // Reset folioSvgData - this.folioSvgData = []; + // Reset folioSvgDataArray + this.folioSvgDataArray = []; // Loop over folios of selected convolute this.selectedConvolute.folios.forEach((folio: Folio, folioIndex: number) => { @@ -227,16 +223,16 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked this.vbArray[folioIndex] = new ViewBox(vbWidth, vbHeight); - // Populate folioSvgData with calculated svg data - this.folioSvgData[folioIndex] = this.folioService.getFolioSvgData(this.folioSettings, folio); + // Populate folioSvgData with calculated SVG data + this.folioSvgDataArray[folioIndex] = this.folioService.getFolioSvgData(this.folioSettings, folio); }); } /** * Public method: createSVGCanvas. * - * It provides the folio viewbox and svg data - * to the SnapCanvas. + * It provides the folio viewbox and folioSVG data + * to the SVG canvas. * * @returns {void} Creates the SVG canvas. */ @@ -244,22 +240,26 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked // Empty canvasArray this.canvasArray = []; - /* Apply data from folioSvgData to render the svg image with snapsvg */ - this.folioSvgData.forEach((folioSvg: FolioSvgData, folioIndex: number) => { + // Apply data from folioSvgData to render the SVG image with d3.js + this.folioSvgDataArray.forEach((folioSvgData: FolioSvgData, folioIndex: number) => { // Init canvas - const snapId: string = '#folio-' + this.selectedSvgSheet.id + '-' + folioSvg.sheet.folioId; - const snapCanvas: any = Snap(snapId); - if (!snapCanvas) { + const svgId: string = '#folio-' + this.selectedSvgSheet.id + '-' + folioSvgData.sheet.folioId; + + const svgCanvas: D3Selection = D3_SELECTION.select(svgId); + if (svgCanvas.empty()) { return; } - // Svg viewBox - this.folioService.addViewBoxToSnapSvgCanvas(snapCanvas, this.vbArray[folioIndex]); + // Clear the SVG elements before redrawing + svgCanvas.selectAll('*').remove(); + + // SVG viewBox + this.folioService.addViewBoxToSvgCanvas(svgCanvas, this.vbArray[folioIndex]); - // Svg content - this.folioService.addFolioToSnapSvgCanvas(snapCanvas, folioSvg, this.bgColor, this.fgColor, this.ref); + // SVG content + this.folioService.addFolioToSvgCanvas(svgCanvas, folioSvgData, this.bgColor, this.fgColor, this.ref); - this.canvasArray.push(snapCanvas); + this.canvasArray.push(svgCanvas); }); // Toggle active classes after view was checked @@ -281,10 +281,11 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked } this.canvasArray.forEach(canvas => { // Find all item groups - canvas.selectAll('.item-group').forEach(itemGroup => { + canvas.selectAll('.item-group').each((_d, i, groups) => { // Toggle active class if itemId corresponds to selectedSvgSheetId - const itemId = itemGroup.node.attributes.itemId.value; - itemGroup.toggleClass('active', this.isSelectedSvgSheet(itemId)); + const itemGroup = D3_SELECTION.select(groups[i]); + const itemId = itemGroup.attr('itemId'); + itemGroup.classed('active', this.isSelectedSvgSheet(itemId)); }); }); } @@ -306,7 +307,7 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked * Public method: selectSvgSheet. * * It emits the given ids of a selected edition complex - * and svg sheet to the {@link selectSvgSheetRequest}. + * and SVG sheet to the {@link selectSvgSheetRequest}. * * @param {string} complexId The given complex id. * @param {string} sheetId The given sheet id. diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts index 8a304dfa21..607b209167 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts @@ -1,6 +1,7 @@ import { Injectable } from '@angular/core'; import { + D3Selection, Folio, FolioCalculation, FolioCalculationLine, @@ -9,18 +10,11 @@ import { ViewBox, } from '@awg-views/edition-view/models'; -/** - * Declared variable: Snap. - * - * It provides access to the embedded SnapSvg library (see {@link snapsvg.io}). - */ -declare let Snap: any; - /** * The Folio service. * - * It handles the calculations needed for edition folio svg's - * and prepares the Snap svg canvas object. + * It handles the calculations needed for edition folio SVG's + * and prepares the SVG canvas. * * Provided in: `root`. */ @@ -39,166 +33,166 @@ export class FolioService { * Private variable: _itemsOffsetCorrection. * * It corrects the offset (in px) to avoid - * border collision between rendered svg items. + * border collision between rendered SVG items. */ private _itemsOffsetCorrection = 4; /** * Public method: getFolioSvgData. * - * It calculates and provides the folio svg data - * to render the folio svg object (SnapCanvas). + * It calculates and provides the folio SVG data + * to render the folio SVG. * * @param {FolioSettings} folioSettings The given folio format settings. * @param {Folio} folio The given folio. - * @returns {FolioSvgData} The calculated folio data. + * @returns {FolioSvgData} The calculated folio SVG data. */ getFolioSvgData(folioSettings: FolioSettings, folio: Folio): FolioSvgData { - // Calculate values for svg + // Calculate values for SVG const calculation = new FolioCalculation(folioSettings, folio, this._itemsOffsetCorrection); - // Get svg data from calculation + // Get SVG data from calculation return new FolioSvgData(calculation); } /** - * Public method: addViewBoxToSnapSvgCanvas. + * Public method: addViewBoxToSvgCanvas. * - * It adds the svg viewbox attributes to a Snap canvas svg object. + * It adds the SVG viewbox attributes to the SVG canvas. * - * @param {*} snapCanvas The given Snap canvas svg object. + * @param {D3Selection} svgCanvas The given SVG canvas selection. * @param {ViewBox} vb The given ViewBox object. - * @returns {void} Adds the svg viewbox attributes to the Snap canvas svg object. + * @returns {void} Adds the SVG viewbox attributes to the SVG canvas selection. */ - addViewBoxToSnapSvgCanvas(snapCanvas: any, vb: ViewBox): void { - snapCanvas.attr({ - viewBox: vb.viewBox, - width: vb.svgWidth, - height: vb.svgHeight, - version: '1.1', - xmlns: 'https://www.w3.org/2000/svg', - xlink: 'https://www.w3.org/1999/xlink', - preserveAspectRatio: 'xMinYMin meet', - }); + addViewBoxToSvgCanvas(svgCanvas: D3Selection, vb: ViewBox): void { + svgCanvas + .attr('viewBox', vb.viewBox) + .attr('width', vb.svgWidth) + .attr('height', vb.svgHeight) + .attr('version', '1.1') + .attr('xmlns', 'https://www.w3.org/2000/svg') + .attr('xlink', 'https://www.w3.org/1999/xlink') + .attr('preserveAspectRatio', 'xMinYMin meet'); } /** - * Public method: addFolioToSnapSvgCanvas. + * Public method: addFolioToSvgCanvas. * - * It coordinates the drawing of the calculated folio svg data - * for a folio's sheet, systems and items to the folio svg object - * (SnapCanvas). + * It coordinates the drawing of the calculated folio SVG data + * for a folio's sheet, systems and items to the folio SVG canvas. * - * @param {*} snapCanvas The given Snap canvas svg object. + * @param {D3Selection} svgCanvas The given SVG canvas selection. * @param {FolioSvgData} folioSvg The given calculated folio data. * @param {string} bgColor The given background color. * @param {string} fgColor The given foreground color. * @param {*} ref The given reference to the calling component. - * @returns {void} Adds the folio to the Snap canvas svg object. + * @returns {void} Adds the folio to the SVG canvas selection. */ - addFolioToSnapSvgCanvas(snapCanvas: any, folioSvg: FolioSvgData, bgColor: string, fgColor: string, ref: any): void { + addFolioToSvgCanvas( + svgCanvas: D3Selection, + folioSvgData: FolioSvgData, + bgColor: string, + fgColor: string, + ref: any + ): void { /** * Self-referring variable needed for CompileHtml library. */ this.ref = ref; /** - * The Snap canvas sheet group object. + * The SVG canvas sheet group selection. */ - const snapSheetGroup: any = snapCanvas.group(); + const svgSheetGroup = svgCanvas.append('g'); /** * Draw sheet. */ - this._addFolioSheetToSnapSvgCanvas(snapCanvas, snapSheetGroup, folioSvg, bgColor); + this._addFolioSheetToSvgCanvas(svgCanvas, svgSheetGroup, folioSvgData, bgColor); /** * Draw systems. */ - this._addFolioSystemsToSnapSvgCanvas(snapCanvas, snapSheetGroup, folioSvg, bgColor); + this._addFolioSystemsToSvgCanvas(svgCanvas, svgSheetGroup, folioSvgData, bgColor); /** * Draw items. */ - this._addFolioItemsToSnapSvgCanvas(snapCanvas, snapSheetGroup, folioSvg, fgColor); + this._addFolioItemsToSvgCanvas(svgCanvas, svgSheetGroup, folioSvgData, fgColor); } /** - * Private method: _addFolioSheetToSnapSvgCanvas. + * Private method: _addFolioSheetToSvgCanvas. * * It adds the folio's sheet from the calculated - * folio svg data to the folio svg object (SnapCanvas). + * folio SVG data to the folio SVG canvas. * - * @param {*} snapCanvas The given Snap canvas svg object. - * @param {*} snapSheetGroup The given Snap canvas sheet group object. - * @param {FolioSvgData} folioSvg The given calculated folio data. + * @param {D3Selection} svgCanvas The given SVG canvas selection. + * @param {D3Selection} svgSheetGroup The given SVG sheet group selection. + * @param {FolioSvgData} folioSvgData The given calculated folio SVG data. * @param {string} bgColor The given background color. - * @returns {void} Adds the sheet to the Snap canvas svg object. + * @returns {void} Adds the sheet to the SVG canvas selection. */ - private _addFolioSheetToSnapSvgCanvas( - snapCanvas: any, - snapSheetGroup: any, - folioSvg: FolioSvgData, + private _addFolioSheetToSvgCanvas( + svgCanvas: D3Selection, + svgSheetGroup: D3Selection, + folioSvgData: FolioSvgData, bgColor: string ): void { // Init - const folioId = folioSvg.sheet.folioId; - const x1 = folioSvg.sheet.upperLeftCorner.x; - const y1 = folioSvg.sheet.upperLeftCorner.y; - const x2 = folioSvg.sheet.lowerRightCorner.x; - const y2 = folioSvg.sheet.lowerRightCorner.y; - - // Sheet id - snapSheetGroup.attr({ - sheetGroupId: folioId, - class: 'sheet-group', - }); - - // Sheet rectangle - const snapSheetRect: any = snapCanvas.rect(x1, y1, x2, y2); - snapSheetRect.attr({ - fill: 'white', - stroke: bgColor, - strokeWidth: 1, - }); - - // Sheet title - const snapSheetGroupTitle: string = Snap.parse('Bl. ' + folioId + ''); - - // Add the sheet group title to the sheet group - snapSheetGroup.append(snapSheetGroupTitle); - - // Add the sheet rectangle to the sheet group - snapSheetGroup.add(snapSheetRect); + const folioId = folioSvgData.sheet.folioId; + const x1 = folioSvgData.sheet.upperLeftCorner.x; + const y1 = folioSvgData.sheet.upperLeftCorner.y; + const x2 = folioSvgData.sheet.lowerRightCorner.x; + const y2 = folioSvgData.sheet.lowerRightCorner.y; + + // SVG sheet id + svgSheetGroup.attr('sheetGroupId', folioId).attr('class', 'sheet-group'); + + // SVG sheet rectangle + const svgSheetRect = svgCanvas + .append('rect') + .attr('x', x1) + .attr('y', y1) + .attr('width', x2 - x1) + .attr('height', y2 - y1) + .attr('fill', 'white') + .attr('stroke', bgColor) + .attr('stroke-width', 1); + + // SVG sheet title + svgSheetGroup.append('title').text('Bl. ' + folioId); + + // Add the SVG sheet rectangle to the SVG sheet group + svgSheetGroup.node().appendChild(svgSheetRect.node()); } /** - * Private method: _addFolioSystemsToSnapSvgCanvas. + * Private method: _addFolioSystemsToSvgCanvas. * * It adds the folio's systems from the calculated - * folio svg data to the folio svg object (SnapCanvas). + * folio SVG data to the folio SVG canvas. * - * @param {*} snapCanvas The given Snap canvas svg object. - * @param {*} snapSheetGroup The given Snap canvas sheet group object. - * @param {FolioSvgData} folioSvg The given calculated folio data. + * @param {D3Selection} svgCanvas The given SVG canvas selection. + * @param {D3Selection} svgSheetGroup The given SVG sheet group selection. + * @param {FolioSvgData} folioSvgData The given calculated folio SVG data. * @param {string} bgColor The given background color. - * @returns {void} Adds the systems to the Snap canvas svg object. + * @returns {void} Adds the systems to the SVG canvas selection. */ - private _addFolioSystemsToSnapSvgCanvas( - snapCanvas: any, - snapSheetGroup: any, - folioSvg: FolioSvgData, + private _addFolioSystemsToSvgCanvas( + svgCanvas: D3Selection, + svgSheetGroup: D3Selection, + folioSvgData: FolioSvgData, bgColor: string ): void { - folioSvg.systems.lineArrays.forEach((lineArray: FolioCalculationLine[], systemIndex: number) => { + folioSvgData.systems.lineArrays.forEach((lineArray: FolioCalculationLine[], systemIndex: number) => { // Notational system - const snapSystemLineGroup: any = snapCanvas.group(); - snapSystemLineGroup.attr({ - systemLineGroupId: systemIndex + 1, - class: 'system-line-group', - }); + const svgSystemLineGroup = svgCanvas + .append('g') + .attr('systemLineGroupId', systemIndex + 1) + .attr('class', 'system-line-group'); - // System lines + // SVG system lines lineArray.forEach(line => { // Init const x1 = line.startPoint.x; @@ -206,64 +200,67 @@ export class FolioService { const x2 = line.endPoint.x; const y2 = line.endPoint.y; - const systemLine: any = snapCanvas.line(x1, y1, x2, y2); - systemLine.attr({ - class: 'system-line', - stroke: bgColor, - strokeWidth: 0.7, - }); - snapSystemLineGroup.add(systemLine); + const systemLine = svgCanvas + .append('line') + .attr('x1', x1) + .attr('y1', y1) + .attr('x2', x2) + .attr('y2', y2) + .attr('class', 'system-line') + .attr('stroke', bgColor) + .attr('stroke-width', 0.7); + + svgSystemLineGroup.node().appendChild(systemLine.node()); }); - // System label - // Init - const x = folioSvg.systems.lineLabelArray[systemIndex].x; - const y = folioSvg.systems.lineLabelArray[systemIndex].y; + // SVG system label + const x = folioSvgData.systems.lineLabelArray[systemIndex].x; + const y = folioSvgData.systems.lineLabelArray[systemIndex].y; const systemLabel = systemIndex + 1; - const snapSystemLabel: any = snapCanvas.text(x, y, systemLabel); - snapSystemLabel.attr({ - class: 'system-label', - dominantBaseline: 'hanging', - fill: bgColor, - }); - - // Systems group - const snapSystemsGroup: any = snapCanvas.group(snapSystemLineGroup, snapSystemLabel); - snapSystemsGroup.attr({ - systemsGroupId: systemIndex + 1, - class: 'systems-group', - }); - - // Add the systems group to the sheet group - snapSheetGroup.add(snapSystemsGroup); + const svgSystemLabel = svgCanvas + .append('text') + .attr('x', x) + .attr('y', y) + .text(systemLabel) + .attr('class', 'system-label') + .attr('dominant-baseline', 'hanging') + .attr('fill', bgColor); + + // SVG systems group + const svgSystemsGroup = svgCanvas.append('g'); + svgSystemsGroup.node().appendChild(svgSystemLineGroup.node()); + svgSystemsGroup.node().appendChild(svgSystemLabel.node()); + svgSystemsGroup.attr('systemsGroupId', systemIndex + 1).attr('class', 'systems-group'); + + // Add the SVG systems group to the SVG sheet group + svgSheetGroup.node().appendChild(svgSystemsGroup.node()); }); } /** - * Private method: _addFolioItemsToSnapSvgCanvas. + * Private method: _addFolioItemsToSvgCanvas. * * It adds the folio's items from the calculated - * folio svg data to the folio svg object (SnapCanvas). + * folio SVG data to the folio SVG canvas. * - * @param {*} snapCanvas The given Snap canvas svg object. - * @param {*} snapSheetGroup The given Snap canvas sheet group object. - * @param {FolioSvgData} folioSvg The given calculated folio data. + * @param {D3Selection} svgCanvas The given SVG canvas selection. + * @param {D3Selection} svgSheetGroup The given SVG sheet group selection. + * @param {FolioSvgData} folioSvgData The given calculated folio data. * @param {string} fgColor The given foreground color. - * @returns {void} Adds the items to the Snap canvas svg object. + * @returns {void} Adds the items to the SVG canvas selection. */ - private _addFolioItemsToSnapSvgCanvas( - snapCanvas: any, - snapSheetGroup: any, - folioSvg: FolioSvgData, + private _addFolioItemsToSvgCanvas( + svgCanvas: D3Selection, + svgSheetGroup: D3Selection, + folioSvgData: FolioSvgData, fgColor: string ): void { - folioSvg.contentItemsArray.forEach(contentItem => { + folioSvgData.contentItemsArray.forEach(contentItem => { if (!contentItem) { return; } - // Item label // Init const halfWidth = contentItem.width / 2; const halfHeight = contentItem.height / 2; @@ -282,107 +279,67 @@ export class FolioService { contentItem.sigleAddendum ? ` ${contentItem.sigleAddendum}` : '', ]; - const snapItemLabel: any = snapCanvas.text(centeredXPosition, centeredYPosition, itemLabelArray); - snapItemLabel.attr({ - class: 'item-label', - style: 'font: 12px Source Sans Pro, source-sans-pro, sans-serif', - dominantBaseline: 'middle', - textAnchor: 'middle', - }); - - // Rotate the text 180 degrees around its center - if (contentItem.reversed) { - snapItemLabel.transform(`r180,${centeredXPosition},${centeredYPosition}`); - } - - // Attributes for tspan elements of itemLabel array - snapItemLabel.select('tspan:first-of-type').attr({ - x: centeredXPosition, - y: centeredYPosition, - textAnchor: 'middle', - }); - if (itemLabelArray.length > 1) { - snapItemLabel.select('tspan:last-of-type').attr({ - x: centeredXPosition, - y: centeredYPosition, - textAnchor: 'middle', - dy: '1.2em', - }); - } - - // Item shape - const snapItemShape = snapCanvas.group(); - - const polygoneCornerPointArray = []; - polygoneCornerPointArray.push( + const polygoneCornerPointArray = [ contentItem.cornerPoints.upperLeftCorner.x, - contentItem.cornerPoints.upperLeftCorner.y - ); - polygoneCornerPointArray.push( + contentItem.cornerPoints.upperLeftCorner.y, contentItem.cornerPoints.upperRightCorner.x, - contentItem.cornerPoints.upperRightCorner.y - ); - polygoneCornerPointArray.push( + contentItem.cornerPoints.upperRightCorner.y, contentItem.cornerPoints.lowerRightCorner.x, - contentItem.cornerPoints.lowerRightCorner.y - ); - polygoneCornerPointArray.push( + contentItem.cornerPoints.lowerRightCorner.y, contentItem.cornerPoints.lowerLeftCorner.x, - contentItem.cornerPoints.lowerLeftCorner.y - ); - polygoneCornerPointArray.push( + contentItem.cornerPoints.lowerLeftCorner.y, contentItem.cornerPoints.upperLeftCorner.x, - contentItem.cornerPoints.upperLeftCorner.y - ); - const polygone = snapCanvas.polyline(polygoneCornerPointArray); - - snapItemShape.add(polygone); - snapItemShape.attr({ - class: 'item-shape', - strokeWidth: 2, - fill: '#eeeeee', - }); + contentItem.cornerPoints.upperLeftCorner.y, + ]; - // Item link - const snapItemLink: any = snapCanvas.el('a'); - snapItemLink.attr({ - class: 'item-link', - }); + // SVG item group + const svgItemGroup = svgCanvas + .append('g') + .attr('itemGroupId', itemLabelArray.join(' ')) + .attr('itemId', contentItem.sheetId) + .attr('class', 'item-group'); - // Add shape and label to item link - snapItemLink.add(snapItemShape); - snapItemLink.add(snapItemLabel); + // SVG item link + const svgItemLink = svgItemGroup.append('a').attr('class', 'item-link'); - // Item group - const snapItemGroup: any = snapCanvas.group(snapItemLink); - snapItemGroup.attr({ - itemGroupId: itemLabelArray, - itemId: contentItem.sheetId, - class: 'item-group', - }); + // SVG item shape + const svgItemShape = svgItemLink + .append('polygon') + .attr('points', polygoneCornerPointArray.join(' ')) + .attr('class', 'item-shape') + .attr('stroke-width', 2) + .attr('fill', '#eeeeee'); + + // Item label + const svgItemLabel = svgItemLink + .append('text') + .attr('x', centeredXPosition) + .attr('y', centeredYPosition) + .attr('class', 'item-label') + .attr('style', 'font: 12px Source Sans Pro, source-sans-pro, sans-serif') + .attr('dominant-baseline', 'middle') + .attr('text-anchor', 'middle') + .text(itemLabelArray.join(' ')); + + // Rotate the text 180 degrees around its center + if (contentItem.reversed) { + svgItemLabel.attr('transform', `rotate(180, ${centeredXPosition}, ${centeredYPosition})`); + } // Apply title when hovering item - const snapItemGroupTitle: string = Snap.parse('' + itemLabelArray + ''); - snapItemGroup.append(snapItemGroupTitle); + svgItemGroup.append('title').text(itemLabelArray.join(' ')); // Add click event handler - // Exclude and mute non-selectable sketches for now if (contentItem.selectable === false) { - snapItemGroup.click(() => this.ref.openModal(contentItem.linkTo)); - snapItemGroup.attr({ - stroke: 'grey', - fill: 'grey', - }); + svgItemGroup.attr('stroke', 'grey').attr('fill', 'grey'); + svgItemGroup.on('click', () => this.ref.openModal(contentItem.linkTo)); } else { - snapItemGroup.click(() => this.ref.selectSvgSheet(contentItem.complexId, contentItem.sheetId)); - snapItemGroup.attr({ - stroke: fgColor, - fill: fgColor, - }); + svgItemGroup.attr('stroke', fgColor).attr('fill', fgColor); + svgItemGroup.on('click', () => this.ref.selectSvgSheet(contentItem.complexId, contentItem.sheetId)); } - // Add the item group to the sheet group - snapSheetGroup.add(snapItemGroup); + // Add the SVG item group to the SVG sheet group + svgSheetGroup.node().appendChild(svgItemGroup.node()); }); } } diff --git a/yarn.lock b/yarn.lock index 057c4a0b88..10873c9cb5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6158,11 +6158,6 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== -eve@~0.5.1: - version "0.5.4" - resolved "https://registry.yarnpkg.com/eve/-/eve-0.5.4.tgz#67d080b9725291d7e389e34c26860dd97f1debaa" - integrity sha512-aqprQ9MAOh1t66PrHxDFmMXPlgNO6Uv1uqvxmwjprQV50jaQ2RqO7O1neY4PJwC+hMnkyMDphu2AQPOPZdjQog== - event-emitter@^0.3.5, event-emitter@~0.3.5: version "0.3.5" resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" @@ -10680,13 +10675,6 @@ smart-buffer@^4.2.0: resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== -snapsvg@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/snapsvg/-/snapsvg-0.5.1.tgz#0caf52c79189a290746fc446cc5e863f6bdddfe3" - integrity sha512-CjwWYsL7+CCk1vCk9BBKGYS4WJVDfJAOMWU+Zhzf8wf6pAm/xT34wnpaMPAgcgCNkxuU6OkQPPd8wGuRCY9aNw== - dependencies: - eve "~0.5.1" - socket.io-adapter@~2.5.2: version "2.5.2" resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz#5de9477c9182fdc171cd8c8364b9a8894ec75d12" From 9ef9ca0556a7dbbd0dd6eff3ea367b75a65bca52 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Wed, 28 Feb 2024 23:18:58 +0100 Subject: [PATCH 35/63] test(edition): add tests for FolioViewer Component --- .../edition-folio-viewer.component.html | 6 +- .../edition-folio-viewer.component.spec.ts | 738 +++++++++++++++++- .../edition-folio-viewer.component.ts | 205 ++--- 3 files changed, 844 insertions(+), 105 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.html b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.html index 3d36585a7f..de1394f2d8 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.html +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.html @@ -1,11 +1,11 @@ - + @if (folioSvgDataArray) {
@for (folioSvgData of folioSvgDataArray; track folioSvgData) {
- [{{ folioSvgData.sheet.folioId }}] - + [{{ folioSvgData.sheet?.folioId }}] +
}
diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.spec.ts index 3f3509081e..b004b0aecc 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.spec.ts @@ -1,40 +1,145 @@ -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { DOCUMENT } from '@angular/common'; +import { DebugElement, SimpleChange } from '@angular/core'; +import { ComponentFixture, TestBed, fakeAsync, waitForAsync } from '@angular/core/testing'; +import * as D3_SELECTION from 'd3-selection'; +import Spy = jasmine.Spy; + +import { cleanStylesFromDOM } from '@testing/clean-up-helper'; +import { clickAndAwaitChanges } from '@testing/click-helper'; +import { expectSpyCall, expectToBe, expectToEqual, getAndExpectDebugElementByCss } from '@testing/expect-helper'; import { mockEditionData } from '@testing/mock-data'; +import { createD3TestSvg } from '@testing/svg-drawing-helper'; -import { EditionSvgSheet, FolioConvolute } from '@awg-views/edition-view/models'; +import { + D3Selection, + EditionSvgSheet, + Folio, + FolioCalculation, + FolioConvolute, + FolioSettings, + FolioSvgData, + ViewBox, +} from '@awg-views/edition-view/models'; +import { FolioService } from './folio.service'; import { EditionFolioViewerComponent } from './edition-folio-viewer.component'; -import { FolioService } from './folio.service'; -describe('EditionFolioViewerComponent', () => { +describe('EditionFolioViewerComponent (DONE)', () => { let component: EditionFolioViewerComponent; let fixture: ComponentFixture; + let compDe: DebugElement; + + let mockDocument: Document; + let mockFolioService: Partial; + + let createSVGCanvasSpy: Spy; + let d3SelectSpy: Spy; + let isSelectedSvgSheetSpy: Spy; + let openModalSpy: Spy; + let openModalRequestEmitSpy: Spy; + let prepareFolioSvgOutputSpy: Spy; + let selectSvgSheetSpy: Spy; + let selectSvgSheetRequestEmitSpy: Spy; + let toggleActiveClassSpy: Spy; + + let serviceAddFolioToSvgCanvasSpy: Spy; + let serviceAddViewBoxToSvgCanvasSpy: Spy; + let serviceGetFolioSvgDataSpy: Spy; let expectedConvolute: FolioConvolute; + let expectedFolioSettingsArray: FolioSettings[]; + let expectedFolioSettings: FolioSettings; + let expectedFolioSvgDataArray: FolioSvgData[]; + let expectedModalSnippet: string; let expectedSvgSheet: EditionSvgSheet; + let expectedSvgSheetWithPartialA: EditionSvgSheet; beforeEach(waitForAsync(() => { + // Stub service for test purposes + mockFolioService = { + addFolioToSvgCanvas: () => {}, + addViewBoxToSvgCanvas: () => {}, + getFolioSvgData: (folioSettings: FolioSettings, folio: Folio) => + new FolioSvgData(new FolioCalculation(folioSettings, folio, 4)), + }; + TestBed.configureTestingModule({ declarations: [EditionFolioViewerComponent], - providers: [FolioService], + providers: [{ provide: FolioService, useValue: mockFolioService }], }).compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(EditionFolioViewerComponent); component = fixture.componentInstance; + compDe = fixture.debugElement; + + mockDocument = TestBed.inject(DOCUMENT); // Test data - // Mock the inputs supplied by the parent component + expectedModalSnippet = JSON.parse(JSON.stringify(mockEditionData.mockModalSnippet)); expectedSvgSheet = JSON.parse(JSON.stringify(mockEditionData.mockSvgSheet_Sk1)); + expectedSvgSheetWithPartialA = JSON.parse(JSON.stringify(mockEditionData.mockSvgSheet_Sk2a)); expectedConvolute = mockEditionData.mockFolioConvoluteData.convolutes[0]; + + expectedFolioSettings = { + factor: 1.5, + formatX: 175, + formatY: 270, + initialOffsetX: 5, + initialOffsetY: 5, + numberOfFolios: 0, + }; + expectedFolioSettingsArray = []; + expectedFolioSvgDataArray = []; + expectedConvolute.folios.forEach((folio, _index) => { + const folioSettings = { + ...expectedFolioSettings, + formatX: +folio.format.width, + formatY: +folio.format.height, + numberOfFolios: expectedConvolute.folios.length, + }; + + expectedFolioSettingsArray.push(folioSettings); + + const expectedFolioSvgData = new FolioSvgData(new FolioCalculation(folioSettings, folio, 4)); + + expectedFolioSvgDataArray.push(expectedFolioSvgData); + }); + + // Spies on component functions + // `.and.callThrough` will track the spy down the nested describes, see + // https://jasmine.github.io/2.0/introduction.html#section-Spies:_%3Ccode%3Eand.callThrough%3C/code%3E + createSVGCanvasSpy = spyOn(component, 'createSVGCanvas').and.callThrough(); + d3SelectSpy = spyOn(component as any, '_d3Select').and.callThrough(); + isSelectedSvgSheetSpy = spyOn(component, 'isSelectedSvgSheet').and.callThrough(); + openModalSpy = spyOn(component, 'openModal').and.callThrough(); + openModalRequestEmitSpy = spyOn(component.openModalRequest, 'emit').and.callThrough(); + prepareFolioSvgOutputSpy = spyOn(component, 'prepareFolioSvgOutput').and.callThrough(); + selectSvgSheetSpy = spyOn(component, 'selectSvgSheet').and.callThrough(); + selectSvgSheetRequestEmitSpy = spyOn(component.selectSvgSheetRequest, 'emit').and.callThrough(); + toggleActiveClassSpy = spyOn(component, 'toggleActiveClass').and.callThrough(); + + // Service spies + serviceAddFolioToSvgCanvasSpy = spyOn(mockFolioService, 'addFolioToSvgCanvas').and.callThrough(); + serviceAddViewBoxToSvgCanvasSpy = spyOn(mockFolioService, 'addViewBoxToSvgCanvas').and.callThrough(); + serviceGetFolioSvgDataSpy = spyOn(mockFolioService, 'getFolioSvgData').and.callThrough(); + }); + + afterAll(() => { + cleanStylesFromDOM(); }); it('... should create', () => { expect(component).toBeTruthy(); }); + it('... injected service should use provided mockValue', () => { + const folioService = TestBed.inject(FolioService); + expect(mockFolioService === folioService).toBeTrue(); + }); + describe('BEFORE initial data binding', () => { it('... should not have `selectedConvolute` input', () => { expect(component.selectedConvolute).toBeUndefined(); @@ -43,6 +148,39 @@ describe('EditionFolioViewerComponent', () => { it('... should not have `selectedSvgSheet` input', () => { expect(component.selectedSvgSheet).toBeUndefined(); }); + + it('... should have empty `canvasArray`', () => { + expectToEqual(component.canvasArray, []); + expectToBe(component.canvasArray.length, 0); + }); + + it('... should have empty `folioSvgDataArray`', () => { + expectToEqual(component.folioSvgDataArray, []); + expectToBe(component.folioSvgDataArray.length, 0); + }); + + it('... should have empty `viewBoxArray`', () => { + expectToEqual(component.viewBoxArray, []); + expectToBe(component.viewBoxArray.length, 0); + }); + + it('... should have `bgColor`', () => { + expectToBe(component.bgColor, '#a3a3a3'); + }); + + it('... should have `fgColor`', () => { + expectToBe(component.fgColor, 'orange'); + }); + + it('... should have `_folioSettings` object', () => { + expectToEqual((component as any)._folioSettings, expectedFolioSettings); + }); + + describe('VIEW', () => { + it('... should not contain one div.svgGrid yet', () => { + getAndExpectDebugElementByCss(compDe, 'div.svgGrid', 0, 0); + }); + }); }); describe('AFTER initial data binding', () => { @@ -51,18 +189,598 @@ describe('EditionFolioViewerComponent', () => { component.selectedConvolute = expectedConvolute; component.selectedSvgSheet = expectedSvgSheet; + // Manually trigger ngOnChanges + component.ngOnChanges({ + selectedConvolute: new SimpleChange(undefined, expectedConvolute, true), + }); + // Trigger initial data binding fixture.detectChanges(); }); it('... should have `selectedSvgSheet` input', () => { - expect(component.selectedSvgSheet).toBeTruthy(); - expect(component.selectedSvgSheet).withContext(`should be ${expectedSvgSheet}`).toBe(expectedSvgSheet); + expectToBe(component.selectedSvgSheet, expectedSvgSheet); }); it('... should have `selectedConvolute` input', () => { - expect(component.selectedConvolute).toBeTruthy(); - expect(component.selectedConvolute).withContext(`should be ${expectedConvolute}`).toBe(expectedConvolute); + expectToBe(component.selectedConvolute, expectedConvolute); + }); + + describe('VIEW', () => { + it('... should contain one div.svgGrid with one div.svgRow', () => { + const gridDe = getAndExpectDebugElementByCss(compDe, 'div.svgGrid', 1, 1); + + getAndExpectDebugElementByCss(gridDe[0], 'div.svgRow', 1, 1); + }); + + it('... should contain as many div.svgCol in div.svgRow as items in folioSvgDataArray', async () => { + const rowDe = getAndExpectDebugElementByCss(compDe, 'div.svgGrid div.svgRow', 1, 1); + + expect(component.folioSvgDataArray.length).toBeGreaterThan(0); + getAndExpectDebugElementByCss( + rowDe[0], + 'div.svgCol', + expectedFolioSvgDataArray.length, + expectedFolioSvgDataArray.length + ); + }); + + it('... should have correct bootstrap grid classes for div.svgCol', () => { + const rowDe = getAndExpectDebugElementByCss(compDe, 'div.svgGrid div.svgRow', 1, 1); + + const colDe = getAndExpectDebugElementByCss( + rowDe[0], + 'div.svgCol', + expectedFolioSvgDataArray.length, + expectedFolioSvgDataArray.length + ); + + colDe.forEach((col, _index) => { + const colEl = col.nativeElement; + + const expectedLgColClass = 'col-lg-' + Math.floor(12 / expectedFolioSvgDataArray.length); + + expect(colEl.classList.contains('col-sm-6')).toBeTrue(); + expect(colEl.classList.contains(expectedLgColClass)).toBeTrue(); + }); + }); + + it('... should contain as many muted span elements in div.svgCol as items in folioSvgDataArray', () => { + const rowDe = getAndExpectDebugElementByCss(compDe, 'div.svgGrid div.svgRow', 1, 1); + const colDe = getAndExpectDebugElementByCss( + rowDe[0], + 'div.svgCol', + expectedFolioSvgDataArray.length, + expectedFolioSvgDataArray.length + ); + + colDe.forEach((col, _index) => { + getAndExpectDebugElementByCss(col, 'span.text-muted', 1, 1); + }); + }); + + it('... should display correct folioId in muted span elements', () => { + const rowDe = getAndExpectDebugElementByCss(compDe, 'div.svgGrid div.svgRow', 1, 1); + const colDe = getAndExpectDebugElementByCss( + rowDe[0], + 'div.svgCol', + expectedFolioSvgDataArray.length, + expectedFolioSvgDataArray.length + ); + + colDe.forEach((col, index) => { + const spanDe = getAndExpectDebugElementByCss(col, 'span.text-muted', 1, 1); + const spanEl = spanDe[0].nativeElement; + const expectedFolioId = expectedFolioSvgDataArray[index].sheet.folioId; + const expectedContent = `[${expectedFolioId}]`; + + expectToBe(spanEl.textContent, expectedContent); + }); + }); + + it('... should contain as many svg elements in div.svgCol as items in folioSvgDataArray', () => { + const rowDe = getAndExpectDebugElementByCss(compDe, 'div.svgGrid div.svgRow', 1, 1); + + const colDe = getAndExpectDebugElementByCss( + rowDe[0], + 'div.svgCol', + expectedFolioSvgDataArray.length, + expectedFolioSvgDataArray.length + ); + + colDe.forEach((col, _index) => { + getAndExpectDebugElementByCss(col, 'svg', 1, 1); + }); + }); + + it('... should have correct id for each svg element', () => { + const rowDe = getAndExpectDebugElementByCss(compDe, 'div.svgGrid div.svgRow', 1, 1); + const colDe = getAndExpectDebugElementByCss( + rowDe[0], + 'div.svgCol', + expectedFolioSvgDataArray.length, + expectedFolioSvgDataArray.length + ); + + colDe.forEach((col, index) => { + const svgDe = getAndExpectDebugElementByCss(col, 'svg', 1, 1); + const svgEl = svgDe[0].nativeElement; + const expectedSvgId = `folio-${expectedSvgSheet.id}-${expectedFolioSvgDataArray[index].sheet.folioId}`; + + expectToBe(svgEl.id, expectedSvgId); + }); + }); + }); + + describe('#ngOnChanges', () => { + it('... should have a method ngOnChanges', () => { + expect(component.ngOnChanges).toBeDefined(); + }); + + it('... should call `prepareFolioSvgOutput` if `selectedConvolute` changes on the first change', () => { + expectSpyCall(prepareFolioSvgOutputSpy, 1); + + component.ngOnChanges({ + selectedConvolute: new SimpleChange( + expectedConvolute, + mockEditionData.mockFolioConvoluteData.convolutes[1], + true + ), + }); + + expectSpyCall(prepareFolioSvgOutputSpy, 2); + }); + + it('... should call `prepareFolioSvgOutput` if `selectedConvolute` changes on subsequent changes', () => { + expectSpyCall(prepareFolioSvgOutputSpy, 1); + + component.ngOnChanges({ + selectedConvolute: new SimpleChange( + mockEditionData.mockFolioConvoluteData.convolutes[1], + expectedConvolute, + false + ), + }); + + expectSpyCall(prepareFolioSvgOutputSpy, 2); + }); + + it('... should not call `prepareFolioSvgOutput` if `selectedConvolute` does not change', () => { + expectSpyCall(prepareFolioSvgOutputSpy, 1); + + component.ngOnChanges({}); + + expectSpyCall(prepareFolioSvgOutputSpy, 1); + }); + }); + + describe('#ngAfterViewChecked()', () => { + it('... should have a method ngAfterViewChecked', () => { + expect(component.ngAfterViewChecked).toBeDefined(); + }); + + it('... should call `createSVGCanvas`', () => { + expectSpyCall(createSVGCanvasSpy, 1); + + component.ngAfterViewChecked(); + + expectSpyCall(createSVGCanvasSpy, 2); + }); + }); + + describe('#createSVGCanvas()', () => { + it('... should have a method `createSVGCanvas`', () => { + expect(component.createSVGCanvas).toBeDefined(); + }); + + describe('... should have empty canvasArray if', () => { + it('... `viewBoxArray` and `folioSvgDataArray` have different length', () => { + component.viewBoxArray = [new ViewBox(10, 10), new ViewBox(20, 20)]; + component.folioSvgDataArray = expectedFolioSvgDataArray; + + component.createSVGCanvas(); + + expect(component.viewBoxArray.length).not.toEqual(component.folioSvgDataArray.length); + expectToEqual(component.canvasArray, []); + expectToBe(component.canvasArray.length, 0); + }); + + it('... svgCanvas is empty', () => { + d3SelectSpy.and.returnValue({ empty: () => true }); + + component.prepareFolioSvgOutput(); + component.createSVGCanvas(); + + expect(component.canvasArray).toEqual([]); + }); + }); + + describe('... should populate canvasArray', () => { + let svgSelection: D3Selection; + + beforeEach(() => { + // Create mocked SVG element with D3 and return selection + const svgId = `folio-${expectedSvgSheet.id}-${expectedFolioSvgDataArray[0].sheet.folioId}`; + const container: HTMLElement = mockDocument.createElement('div'); + svgSelection = D3_SELECTION.select(container).append('svg').attr('id', svgId); + + d3SelectSpy.and.returnValue(svgSelection); + + // Prepare folio data + component.prepareFolioSvgOutput(); + }); + + afterEach(() => { + svgSelection.selectAll('*').remove(); + }); + + it('... by creating a canvas for each folio', () => { + component.createSVGCanvas(); + + expectToEqual(component.canvasArray.length, expectedConvolute.folios.length); + }); + + it('... should trigger `addViewBoxToSvgCanvas()` for each folio', () => { + expectSpyCall(serviceAddViewBoxToSvgCanvasSpy, expectedConvolute.folios.length); + + component.createSVGCanvas(); + + expectSpyCall(serviceAddViewBoxToSvgCanvasSpy, 2 * expectedConvolute.folios.length); + }); + + it('... should trigger `addFolioToSvgCanvas()` for each folio', () => { + expectSpyCall(serviceAddFolioToSvgCanvasSpy, expectedConvolute.folios.length); + + component.createSVGCanvas(); + + expectSpyCall(serviceAddFolioToSvgCanvasSpy, 2 * expectedConvolute.folios.length); + }); + + it('should trigger `toggleActiveClass()` at the end', () => { + expectSpyCall(toggleActiveClassSpy, 1); + + component.createSVGCanvas(); + + expectSpyCall(toggleActiveClassSpy, 2); + }); + }); + }); + + describe('#isSelectedSvgSheet()', () => { + it('... should have a method `isSelectedSvgSheet`', () => { + expect(component.isSelectedSvgSheet).toBeDefined(); + }); + + describe('... should return true if', () => { + it('... the given id matches the selectedSvgSheet id', () => { + component.selectedSvgSheet = expectedSvgSheet; + + expect(component.isSelectedSvgSheet('test-1')).toBeTrue(); + }); + + it('... the given id matches the selectedSvgSheet id with partial', () => { + component.selectedSvgSheet = expectedSvgSheetWithPartialA; + + expect(component.isSelectedSvgSheet('test-2a')).toBeTrue(); + }); + }); + + describe('... should return false if', () => { + it('... the given id does not match the selectedSvgSheet id', () => { + component.selectedSvgSheet = expectedSvgSheet; + + expect(component.isSelectedSvgSheet('other-test')).toBeFalse(); + }); + + it('... given the id does not match the selectedSvgSheet id with partial', () => { + component.selectedSvgSheet = expectedSvgSheetWithPartialA; + + expect(component.isSelectedSvgSheet('test-2b')).toBeFalse(); + }); + + it('... selectedSvgSheet is undefined', () => { + component.selectedSvgSheet = undefined; + + expect(component.isSelectedSvgSheet('test-1')).toBeFalse(); + }); + }); + }); + + describe('#prepareFolioSvgOutput()', () => { + beforeEach(() => { + // Add custom equality tester to ignore functions + jasmine.addCustomEqualityTester((first, second) => { + if (typeof first === 'function' && typeof second === 'function') { + return true; + } + return undefined; + }); + }); + + it('... should have a method `prepareFolioSvgOutput`', () => { + expect(component.prepareFolioSvgOutput).toBeDefined(); + }); + + describe('... should reset folioSvgDataArray and viewBoxArray and return early if', () => { + it('... given selectedConvolute is undefined', () => { + expectSpyCall(serviceGetFolioSvgDataSpy, 1); + + component.selectedConvolute = undefined; + + component.prepareFolioSvgOutput(); + + expectToEqual(component.folioSvgDataArray, []); + expectToEqual(component.viewBoxArray, []); + expectSpyCall(serviceGetFolioSvgDataSpy, 1); + }); + + it('... given selectedConvolute.folios are undefined', () => { + expectSpyCall(serviceGetFolioSvgDataSpy, 1); + + component.selectedConvolute = { ...expectedConvolute, folios: undefined }; + + component.prepareFolioSvgOutput(); + + expectToEqual(component.folioSvgDataArray, []); + expectToEqual(component.viewBoxArray, []); + expectSpyCall(serviceGetFolioSvgDataSpy, 1); + }); + }); + + it('... should populate folioSvgDataArray and viewBoxArray based on selectedConvolute', () => { + expectSpyCall(serviceGetFolioSvgDataSpy, expectedConvolute.folios.length); + + component.selectedConvolute = expectedConvolute; + + component.prepareFolioSvgOutput(); + + expectToEqual(component.folioSvgDataArray.length, expectedConvolute.folios.length); + expectToEqual(component.viewBoxArray.length, expectedConvolute.folios.length); + expectSpyCall(serviceGetFolioSvgDataSpy, 2 * expectedConvolute.folios.length); + }); + + it('... should calculate viewBox dimensions for each folio', () => { + component.selectedConvolute = expectedConvolute; + + component.prepareFolioSvgOutput(); + + component.viewBoxArray.forEach((viewBox, index) => { + const folioSettings = expectedFolioSettingsArray[index]; + const expectedViewBoxWidth = + (folioSettings.formatX + 2 * folioSettings.initialOffsetX) * folioSettings.factor; + const expectedViewBoxHeight = + (folioSettings.formatY + 2 * folioSettings.initialOffsetY) * folioSettings.factor; + const expectedViewBoxValue = `0 0 ${expectedViewBoxWidth} ${expectedViewBoxHeight}`; + + expectToBe(viewBox.viewBox, expectedViewBoxValue); + }); + }); + + it('... should get folio svg data from service for each folio', () => { + expectSpyCall(serviceGetFolioSvgDataSpy, expectedConvolute.folios.length); + + component.selectedConvolute = expectedConvolute; + + component.prepareFolioSvgOutput(); + + component.folioSvgDataArray.forEach((folioSvgData, index) => { + expectToEqual(folioSvgData, expectedFolioSvgDataArray[index]); + }); + + expectSpyCall(serviceGetFolioSvgDataSpy, 2 * expectedConvolute.folios.length); + }); + }); + + describe('#openModal()', () => { + it('... should have a method `openModal`', () => { + expect(component.openModal).toBeDefined(); + }); + + xit('... should trigger on click', fakeAsync(() => { + // TODO: update + const divDes = getAndExpectDebugElementByCss(compDe, 'div.awg-source-description-body', 1, 1); + // Find description paragraphs + const pDes = getAndExpectDebugElementByCss(divDes[0], 'p.awg-source-description-desc', 1, 1); + + // Find anchors in second description paragraph + const anchorDes = getAndExpectDebugElementByCss(pDes[0], 'a', 1, 1); + + // Click on first anchor with modal call + clickAndAwaitChanges(anchorDes[0], fixture); + + expectSpyCall(openModalSpy, 1, expectedModalSnippet); + })); + + describe('... should not emit anything if ', () => { + it('... id is undefined', () => { + component.openModal(undefined); + + expectSpyCall(openModalRequestEmitSpy, 0); + }); + + it('... id is null', () => { + component.openModal(undefined); + + expectSpyCall(openModalRequestEmitSpy, 0, null); + }); + it('... id is empty string', () => { + component.openModal(''); + + expectSpyCall(openModalRequestEmitSpy, 0); + }); + }); + + it('... should emit id of given modal snippet', () => { + component.openModal(expectedModalSnippet); + + expectSpyCall(openModalRequestEmitSpy, 1, expectedModalSnippet); + }); + }); + + describe('#selectSvgSheet()', () => { + it('... should have a method `selectSvgSheet`', () => { + expect(component.selectSvgSheet).toBeDefined(); + }); + + xit('... should trigger on click', fakeAsync(() => { + // TODO: update + const divDes = getAndExpectDebugElementByCss(compDe, 'div.awg-source-description-body', 1, 1); + + // Find content item spans + const contentItemDes = getAndExpectDebugElementByCss( + divDes[0], + 'span.awg-source-description-content-item', + 3, + 3 + ); + + // Find anchors in second paragraph + const anchorDes = getAndExpectDebugElementByCss(contentItemDes[0], 'a', 1, 1); + + // CLick on anchor (with selectSvgSheet call) + clickAndAwaitChanges(anchorDes[0], fixture); + + // TODO: [expectedComplexId, expectedSheetId] should be used in spy call response + expectSpyCall(selectSvgSheetSpy, 1); + })); + + it('... should not emit anything if no id is provided', () => { + component.selectSvgSheet(undefined, undefined); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 0, undefined); + + component.selectSvgSheet('', ''); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 0, undefined); + }); + + it('... should emit id of selected svg sheet within same complex', () => { + const expectedSheetIds = { complexId: 'test-complex', sheetId: expectedSvgSheet.id }; + component.selectSvgSheet(expectedSheetIds.complexId, expectedSheetIds.sheetId); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 1, expectedSheetIds); + + const expectedNextSheetIds = { complexId: 'test-complex', sheetId: expectedSvgSheetWithPartialA.id }; + component.selectSvgSheet(expectedNextSheetIds.complexId, expectedNextSheetIds.sheetId); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 2, expectedNextSheetIds); + }); + + it('... should emit id of selected svg sheet for another complex', () => { + const expectedSheetIds = { complexId: 'test-complex', sheetId: expectedSvgSheet.id }; + component.selectSvgSheet(expectedSheetIds.complexId, expectedSheetIds.sheetId); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 1, expectedSheetIds); + + const expectedNextSheetIds = { + complexId: 'test-next-complex', + sheetId: expectedSvgSheetWithPartialA.id, + }; + component.selectSvgSheet(expectedNextSheetIds.complexId, expectedNextSheetIds.sheetId); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 2, expectedNextSheetIds); + }); + }); + + describe('#toggleActiveClass()', () => { + let svgSelection: D3Selection; + let svgGroupSelection1: D3Selection; + let svgGroupSelection2: D3Selection; + + beforeEach(() => { + // Create mocked SVG element with D3 + const itemId = expectedSvgSheet.id; + const anotherItemId = 'another-id'; + + svgSelection = createD3TestSvg(mockDocument); + svgGroupSelection1 = svgSelection.append('g').attr('class', 'item-group').attr('itemId', itemId); + svgGroupSelection2 = svgSelection.append('g').attr('class', 'item-group').attr('itemId', anotherItemId); + }); + + afterEach(() => { + svgSelection.selectAll('*').remove(); + }); + + it('should have a method `toggleActiveClass`', () => { + expect(component.toggleActiveClass).toBeDefined(); + }); + + it('should not do anything if canvasArray is not defined', () => { + component.canvasArray = undefined; + + component.toggleActiveClass(); + + expectSpyCall(isSelectedSvgSheetSpy, 0); + }); + + it('should check if each item group is active', () => { + component.canvasArray = [svgSelection]; + + component.toggleActiveClass(); + + expectSpyCall(isSelectedSvgSheetSpy, 2); + }); + + it('should toggle the active class for each item group based on whether it is active', () => { + component.canvasArray = [svgSelection]; + + isSelectedSvgSheetSpy.and.callFake(itemId => itemId === expectedSvgSheet.id); + + component.toggleActiveClass(); + + expect(svgGroupSelection1.classed('active')).toBe(true); + expect(svgGroupSelection2.classed('active')).toBe(false); + + isSelectedSvgSheetSpy.and.callFake(itemId => itemId === 'another-id'); + + component.toggleActiveClass(); + + expect(svgGroupSelection1.classed('active')).toBe(false); + expect(svgGroupSelection2.classed('active')).toBe(true); + }); + }); + + describe('#_calculateViewBoxDimension()', () => { + it('... should have a method `_calculateViewBoxDimension`', () => { + expect((component as any)._calculateViewBoxDimension).toBeDefined(); + }); + + it('... should calculate viewBox dimension for X input', () => { + const dimension = 'X'; + const expectedDimension = + (expectedFolioSettings.formatX + 2 * expectedFolioSettings.initialOffsetX) * + expectedFolioSettings.factor; + + const result = (component as any)._calculateViewBoxDimension(expectedFolioSettings, dimension); + + expectToEqual(result, expectedDimension); + }); + + it('... should calculate viewBox dimension for Y input', () => { + const dimension = 'Y'; + const expectedDimension = + (expectedFolioSettings.formatY + 2 * expectedFolioSettings.initialOffsetY) * + expectedFolioSettings.factor; + + const result = (component as any)._calculateViewBoxDimension(expectedFolioSettings, dimension); + + expectToEqual(result, expectedDimension); + }); + }); + + describe('#_d3Select()', () => { + it('... should have a method `_d3Select`', () => { + expect((component as any)._d3Select).toBeDefined(); + }); + + it('... should return the D3 selection of a given selector', () => { + const selector = 'test-selector'; + const expectedSelection = D3_SELECTION.select(selector); + + const result = (component as any)._d3Select(selector); + + expectToEqual(result, expectedSelection); + }); }); }); }); diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.ts index 1ead47357e..d17e54cc0f 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.ts @@ -74,7 +74,7 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked * * It keeps the array with a SVG canvas per folio. */ - canvasArray = []; + canvasArray: D3Selection[] = []; /** * Public variable: folioSvgDataArray. @@ -85,12 +85,12 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked folioSvgDataArray: FolioSvgData[] = []; /** - * Public variable: vbArray. + * Public variable: viewBoxArray. * * It keeps the array with the * viewbox data for the folios. */ - vbArray: ViewBox[] = []; + viewBoxArray: ViewBox[] = []; /** * Public variable: bgColor. @@ -138,20 +138,6 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked this.ref = this; } - /** - * Getter for folio format settings. - */ - get folioSettings() { - return this._folioSettings; - } - - /** - * Setter for folio format settings. - */ - set folioSettings(settings: FolioSettings) { - this._folioSettings = settings; - } - /** * Angular life cycle hook: ngOnChanges. * @@ -174,6 +160,50 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked this.createSVGCanvas(); } + /** + * Public method: createSVGCanvas. + * + * It provides the folio viewbox and folioSVG data + * to the SVG canvas. + * + * @returns {void} Creates the SVG canvas. + */ + createSVGCanvas(): void { + // Empty canvasArray + this.canvasArray = []; + + // Check if data arrays have the same length + if (this.viewBoxArray.length !== this.folioSvgDataArray.length) { + return; + } + + // Apply data to render the SVG image with d3.js + this.folioSvgDataArray.forEach((folioSvgData: FolioSvgData, folioIndex: number) => { + // Init canvas + const svgId = `#folio-${this.selectedSvgSheet.id}-${folioSvgData.sheet.folioId}`; + + const svgCanvas: D3Selection = this._d3Select(svgId); + + if (svgCanvas.empty()) { + return; + } + + // Clear the SVG elements before redrawing + svgCanvas.selectAll('*').remove(); + + // SVG viewBox + this.folioService.addViewBoxToSvgCanvas(svgCanvas, this.viewBoxArray[folioIndex]); + + // SVG content + this.folioService.addFolioToSvgCanvas(svgCanvas, folioSvgData, this.bgColor, this.fgColor, this.ref); + + this.canvasArray.push(svgCanvas); + }); + + // Toggle active class + this.toggleActiveClass(); + } + /** * Public method: isSelectedSvgSheet. * @@ -184,11 +214,24 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked * @returns {boolean} The boolean value of the comparison result. */ isSelectedSvgSheet(id: string): boolean { - let partial = ''; - if (this.selectedSvgSheet.content[0].partial) { - partial = this.selectedSvgSheet.content[0].partial; + const partial = this.selectedSvgSheet?.content[0]?.partial || ''; + return id === `${this.selectedSvgSheet?.id}${partial}`; + } + + /** + * Public method: openModal. + * + * It emits a given id of a modal snippet text + * to the {@link openModalRequest}. + * + * @param {string} id The given modal snippet id. + * @returns {void} Emits the id. + */ + openModal(id: string): void { + if (!id) { + return; } - return id === this.selectedSvgSheet.id + partial; + this.openModalRequest.emit(id); } /** @@ -200,70 +243,51 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked * @returns {void} Sets the vbArray and folioSvgData. */ prepareFolioSvgOutput(): void { - // Reset folioSvgDataArray + // Reset folioSvgDataArray and viewBoxArray this.folioSvgDataArray = []; + this.viewBoxArray = []; + + // If selectedConvolute or folios are undefined, return early + if (!this.selectedConvolute?.folios) { + return; + } // Loop over folios of selected convolute - this.selectedConvolute.folios.forEach((folio: Folio, folioIndex: number) => { - // Update folio settings - this.folioSettings = { - factor: this.folioSettings.factor, + this.folioSvgDataArray = this.selectedConvolute.folios.map((folio: Folio) => { + // Create folio settings for each folio + const folioSettings = { + ...this._folioSettings, formatX: +folio.format.width, formatY: +folio.format.height, - initialOffsetX: this.folioSettings.initialOffsetX, - initialOffsetY: this.folioSettings.initialOffsetY, - numberOfFolios: +this.selectedConvolute.folios.length, + numberOfFolios: this.selectedConvolute.folios.length, }; // Prepare viewbox settings by calculating the width and height for the viewBox string - const vbWidth = - (this.folioSettings.formatX + 2 * this.folioSettings.initialOffsetX) * this.folioSettings.factor; - const vbHeight = - (this.folioSettings.formatY + 2 * this.folioSettings.initialOffsetY) * this.folioSettings.factor; + const viewBoxWidth = this._calculateViewBoxDimension(folioSettings, 'X'); + const viewBoxHeight = this._calculateViewBoxDimension(folioSettings, 'Y'); - this.vbArray[folioIndex] = new ViewBox(vbWidth, vbHeight); + this.viewBoxArray.push(new ViewBox(viewBoxWidth, viewBoxHeight)); // Populate folioSvgData with calculated SVG data - this.folioSvgDataArray[folioIndex] = this.folioService.getFolioSvgData(this.folioSettings, folio); + return this.folioService.getFolioSvgData(folioSettings, folio); }); } /** - * Public method: createSVGCanvas. + * Public method: selectSvgSheet. * - * It provides the folio viewbox and folioSVG data - * to the SVG canvas. + * It emits the given ids of a selected edition complex + * and SVG sheet to the {@link selectSvgSheetRequest}. * - * @returns {void} Creates the SVG canvas. + * @param {string} complexId The given complex id. + * @param {string} sheetId The given sheet id. + * @returns {void} Emits the ids. */ - createSVGCanvas(): void { - // Empty canvasArray - this.canvasArray = []; - - // Apply data from folioSvgData to render the SVG image with d3.js - this.folioSvgDataArray.forEach((folioSvgData: FolioSvgData, folioIndex: number) => { - // Init canvas - const svgId: string = '#folio-' + this.selectedSvgSheet.id + '-' + folioSvgData.sheet.folioId; - - const svgCanvas: D3Selection = D3_SELECTION.select(svgId); - if (svgCanvas.empty()) { - return; - } - - // Clear the SVG elements before redrawing - svgCanvas.selectAll('*').remove(); - - // SVG viewBox - this.folioService.addViewBoxToSvgCanvas(svgCanvas, this.vbArray[folioIndex]); - - // SVG content - this.folioService.addFolioToSvgCanvas(svgCanvas, folioSvgData, this.bgColor, this.fgColor, this.ref); - - this.canvasArray.push(svgCanvas); - }); - - // Toggle active classes after view was checked - this.toggleActiveClass(); + selectSvgSheet(complexId: string, sheetId: string): void { + if (!sheetId) { + return; + } + this.selectSvgSheetRequest.emit({ complexId: complexId, sheetId: sheetId }); } /** @@ -275,48 +299,45 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked * @returns {void} Toggles the css class. */ toggleActiveClass(): void { - // Iterate over canvas Array if (!this.canvasArray) { return; } + this.canvasArray.forEach(canvas => { - // Find all item groups - canvas.selectAll('.item-group').each((_d, i, groups) => { - // Toggle active class if itemId corresponds to selectedSvgSheetId - const itemGroup = D3_SELECTION.select(groups[i]); - const itemId = itemGroup.attr('itemId'); - itemGroup.classed('active', this.isSelectedSvgSheet(itemId)); + canvas.selectAll('.item-group').classed('active', (d, i, nodes) => { + const itemId = D3_SELECTION.select(nodes[i]).attr('itemId'); + return this.isSelectedSvgSheet(itemId); }); }); } /** - * Public method: openModal. + * Private method: _calculateViewBoxDimension. * - * It emits a given id of a modal snippet text - * to the {@link openModalRequest}. + * It calculates the width and height for the viewBox string + * based on the given folio settings. * - * @param {string} id The given modal snippet id. - * @returns {void} Emits the id. + * @param {FolioSettings} folioSettings The given folio settings. + * @param {string} dimension The given dimension. + * + * @returns {number} The calculated dimension. */ - openModal(id: string): void { - this.openModalRequest.emit(id); + private _calculateViewBoxDimension(folioSettings: FolioSettings, dimension: string): number { + const format = `format${dimension}`; + const offset = `initialOffset${dimension}`; + return (folioSettings[format] + 2 * folioSettings[offset]) * folioSettings.factor; } /** - * Public method: selectSvgSheet. + * Private method: _d3Select. * - * It emits the given ids of a selected edition complex - * and SVG sheet to the {@link selectSvgSheetRequest}. + * It returns the D3 selection of a given selector. * - * @param {string} complexId The given complex id. - * @param {string} sheetId The given sheet id. - * @returns {void} Emits the ids. + * @param {string} selector The given selector. + * + * @returns {D3Selection} The D3 selection of the selector. */ - selectSvgSheet(complexId: string, sheetId: string): void { - if (!sheetId) { - return; - } - this.selectSvgSheetRequest.emit({ complexId: complexId, sheetId: sheetId }); + private _d3Select(selector: string) { + return D3_SELECTION.select(selector); } } From cf29606945626ef38faaf7e3278a5861562358bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 Feb 2024 14:43:58 +0000 Subject: [PATCH 36/63] build(deps-dev): bump the commitlint group with 2 updates Bumps the commitlint group with 2 updates: [@commitlint/cli](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/cli) and [@commitlint/config-angular](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/config-angular). Updates `@commitlint/cli` from 19.0.0 to 19.0.3 - [Release notes](https://github.com/conventional-changelog/commitlint/releases) - [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/cli/CHANGELOG.md) - [Commits](https://github.com/conventional-changelog/commitlint/commits/v19.0.3/@commitlint/cli) Updates `@commitlint/config-angular` from 19.0.0 to 19.0.3 - [Release notes](https://github.com/conventional-changelog/commitlint/releases) - [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/config-angular/CHANGELOG.md) - [Commits](https://github.com/conventional-changelog/commitlint/commits/v19.0.3/@commitlint/config-angular) --- updated-dependencies: - dependency-name: "@commitlint/cli" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: commitlint - dependency-name: "@commitlint/config-angular" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: commitlint ... Signed-off-by: dependabot[bot] --- package.json | 4 +- yarn.lock | 173 +++++++++++++++++++++++++-------------------------- 2 files changed, 88 insertions(+), 89 deletions(-) diff --git a/package.json b/package.json index 5f647d0e89..7a04aebb3d 100644 --- a/package.json +++ b/package.json @@ -125,8 +125,8 @@ "@angular-eslint/template-parser": "^17.2.1", "@angular/cli": "^17.2.1", "@angular/compiler-cli": "^17.2.2", - "@commitlint/cli": "^19.0.0", - "@commitlint/config-angular": "^19.0.0", + "@commitlint/cli": "^19.0.3", + "@commitlint/config-angular": "^19.0.3", "@compodoc/compodoc": "^1.1.23", "@types/d3": "^7.4.3", "@types/jasmine": "~5.1.4", diff --git a/yarn.lock b/yarn.lock index 10873c9cb5..a9750e90d2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1512,19 +1512,17 @@ resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== -"@commitlint/cli@^19.0.0": - version "19.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-19.0.0.tgz#03a5c8cef2cbffd514d0ff1a517a633c46fd4456" - integrity sha512-SVBQG6k+eOOmlejYTtxnqJGmhrzy/m0qH3bVeoHY3gtlJBK3Kb32RjJioteBYk8Vuo58x5ehAjXwsQFX58X+xw== - dependencies: - "@commitlint/format" "^19.0.0" - "@commitlint/lint" "^19.0.0" - "@commitlint/load" "^19.0.0" - "@commitlint/read" "^19.0.0" - "@commitlint/types" "^19.0.0" +"@commitlint/cli@^19.0.3": + version "19.0.3" + resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-19.0.3.tgz#a415069099864b75dc65bb22c703c11a3837f258" + integrity sha512-mGhh/aYPib4Vy4h+AGRloMY+CqkmtdeKPV9poMcZeImF5e3knQ5VYaSeAM0mEzps1dbKsHvABwaDpafLUuM96g== + dependencies: + "@commitlint/format" "^19.0.3" + "@commitlint/lint" "^19.0.3" + "@commitlint/load" "^19.0.3" + "@commitlint/read" "^19.0.3" + "@commitlint/types" "^19.0.3" execa "^8.0.1" - resolve-from "^5.0.0" - resolve-global "^2.0.0" yargs "^17.0.0" "@commitlint/config-angular-type-enum@^19.0.0": @@ -1532,27 +1530,27 @@ resolved "https://registry.yarnpkg.com/@commitlint/config-angular-type-enum/-/config-angular-type-enum-19.0.0.tgz#5bbbdb94e2af4c5d566de3173bc2a3a94dc300c7" integrity sha512-t+VwImd0faPg4ZCNb7rfMkyOvvLhDLpp4YjEQEek/TBYTaAWeAXGuEUmdigMd1QEL2t+DP08CMmEcDg9UZQ4dw== -"@commitlint/config-angular@^19.0.0": - version "19.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/config-angular/-/config-angular-19.0.0.tgz#77ed7a7815b324b23958c76817d21d32c6416c29" - integrity sha512-Xm4CCVnUFUI0T6NBbm60fRwylyXsfubopXBiSHxqxYz2JKkkE7gT2iNrwzfliOg219jwVrLc1yeka7a7jxiqcA== +"@commitlint/config-angular@^19.0.3": + version "19.0.3" + resolved "https://registry.yarnpkg.com/@commitlint/config-angular/-/config-angular-19.0.3.tgz#8da8f4f8b9001178cbb6f21f33441b6a5e41ff8a" + integrity sha512-HxSFaJyGekLDs0YWG4jjWJdeZqrlGC9QgwvFclGCISdntqvf+Vk09FH3QPZb6hM5Kgbs9AMChCUlVAQIR4sRFQ== dependencies: "@commitlint/config-angular-type-enum" "^19.0.0" -"@commitlint/config-validator@^19.0.0": - version "19.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/config-validator/-/config-validator-19.0.0.tgz#11891a4f6a0c2a7efbb7ed231dc214350e95b77e" - integrity sha512-oxJ2k+jBPRyWzv1ixfxwGZO5DJ1S+v3D8u/QESMwuPh3kQmeOYBRxGI+5FDWMwiVSHpztlhvvxDAU9SFXeMqUA== +"@commitlint/config-validator@^19.0.3": + version "19.0.3" + resolved "https://registry.yarnpkg.com/@commitlint/config-validator/-/config-validator-19.0.3.tgz#052b181a30da6b4fc16dc5230f4589ac95e0bc81" + integrity sha512-2D3r4PKjoo59zBc2auodrSCaUnCSALCx54yveOFwwP/i2kfEAQrygwOleFWswLqK0UL/F9r07MFi5ev2ohyM4Q== dependencies: - "@commitlint/types" "^19.0.0" + "@commitlint/types" "^19.0.3" ajv "^8.11.0" -"@commitlint/ensure@^19.0.0": - version "19.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-19.0.0.tgz#7426b27853f21ebbe403ac7a97cffe4fc3e99acf" - integrity sha512-G0avCIwjKplTP1Oc9MlDhsYqi1yOWORtJSBpyMbQEnalQAW1tuRxG4LOLRZVKfFqlDWs2SfVQPN0Uw51Ge0f6w== +"@commitlint/ensure@^19.0.3": + version "19.0.3" + resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-19.0.3.tgz#d172b1b72ca88cbd317ea1ee79f3a03dbaccc76e" + integrity sha512-SZEpa/VvBLoT+EFZVb91YWbmaZ/9rPH3ESrINOl0HD2kMYsjvl0tF7nMHh0EpTcv4+gTtZBAe1y/SS6/OhfZzQ== dependencies: - "@commitlint/types" "^19.0.0" + "@commitlint/types" "^19.0.3" lodash.camelcase "^4.3.0" lodash.kebabcase "^4.1.1" lodash.snakecase "^4.1.1" @@ -1564,41 +1562,41 @@ resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-19.0.0.tgz#928fb239ae8deec82a6e3b05ec9cfe20afa83856" integrity sha512-mtsdpY1qyWgAO/iOK0L6gSGeR7GFcdW7tIjcNFxcWkfLDF5qVbPHKuGATFqRMsxcO8OUKNj0+3WOHB7EHm4Jdw== -"@commitlint/format@^19.0.0": - version "19.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-19.0.0.tgz#5da103249bf0e7bdb2ad5e757a37a94e2294c45a" - integrity sha512-36P4/2tpGSGQsYoSZEso5fTSTaMSArIK9fszy+5B8hwwAvOfnD4kQtrwfMhiXnf7PCgeX2lx5Jma+pY3Bq326A== +"@commitlint/format@^19.0.3": + version "19.0.3" + resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-19.0.3.tgz#6e3dcdc028b39d370ba717b8bde0853705c467dc" + integrity sha512-QjjyGyoiVWzx1f5xOteKHNLFyhyweVifMgopozSgx1fGNrGV8+wp7k6n1t6StHdJ6maQJ+UUtO2TcEiBFRyR6Q== dependencies: - "@commitlint/types" "^19.0.0" + "@commitlint/types" "^19.0.3" chalk "^5.3.0" -"@commitlint/is-ignored@^19.0.0": - version "19.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-19.0.0.tgz#c2fef35374eb58510d59380592269adcc1b67f8a" - integrity sha512-5b2nIrl8GEjzYAnOK2ZAUxBXvUonYrp3+8kJkUMl8QOtjt2O1gsd71jar7UtoDEqTWJhc+n7lG6lQYMXtcQJAw== +"@commitlint/is-ignored@^19.0.3": + version "19.0.3" + resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-19.0.3.tgz#a64e0e217044f2d916127369d21ea12324a834fe" + integrity sha512-MqDrxJaRSVSzCbPsV6iOKG/Lt52Y+PVwFVexqImmYYFhe51iVJjK2hRhOG2jUAGiUHk4jpdFr0cZPzcBkSzXDQ== dependencies: - "@commitlint/types" "^19.0.0" + "@commitlint/types" "^19.0.3" semver "^7.6.0" -"@commitlint/lint@^19.0.0": - version "19.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-19.0.0.tgz#eb093263f50ac3b28acf1653b5058979fce8a222" - integrity sha512-rAAisSpxhA+z4uhsveSt1CuTB+Jld5d7zyNSEK2UWjQaOxicwDP+LFiOdM32n/vwsLlOJqhrInA50UcbRSVaGg== +"@commitlint/lint@^19.0.3": + version "19.0.3" + resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-19.0.3.tgz#7db83188310c1a5fbdffebbb32a35aa1b0aacee3" + integrity sha512-uHPyRqIn57iIplYa5xBr6oNu5aPXKGC4WLeuHfqQHclwIqbJ33g3yA5fIA+/NYnp5ZM2EFiujqHFaVUYj6HlKA== dependencies: - "@commitlint/is-ignored" "^19.0.0" - "@commitlint/parse" "^19.0.0" - "@commitlint/rules" "^19.0.0" - "@commitlint/types" "^19.0.0" + "@commitlint/is-ignored" "^19.0.3" + "@commitlint/parse" "^19.0.3" + "@commitlint/rules" "^19.0.3" + "@commitlint/types" "^19.0.3" -"@commitlint/load@^19.0.0": - version "19.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-19.0.0.tgz#fc716f5054c0d6f7d72293eaaa4a184c5000f933" - integrity sha512-pC/6xDjkWPWgqfILY0KMMpxz0dTZqC7fUpxyWMLRrlbZCC9S54/gsg/8UltFrUH+C+F1zz4Ip8CQgzKonpH6rg== +"@commitlint/load@^19.0.3": + version "19.0.3" + resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-19.0.3.tgz#f05ce3830482e3908799f8e6eb202c8d9713efd8" + integrity sha512-18Tk/ZcDFRKIoKfEcl7kC+bYkEQ055iyKmGsYDoYWpKf6FUvBrP9bIWapuy/MB+kYiltmP9ITiUx6UXtqC9IRw== dependencies: - "@commitlint/config-validator" "^19.0.0" + "@commitlint/config-validator" "^19.0.3" "@commitlint/execute-rule" "^19.0.0" - "@commitlint/resolve-extends" "^19.0.0" - "@commitlint/types" "^19.0.0" + "@commitlint/resolve-extends" "^19.0.3" + "@commitlint/types" "^19.0.3" chalk "^5.3.0" cosmiconfig "^8.3.6" cosmiconfig-typescript-loader "^5.0.0" @@ -1611,46 +1609,46 @@ resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-19.0.0.tgz#f789dd1b7a1f9c784578e0111f46cc3fecf5a531" integrity sha512-c9czf6lU+9oF9gVVa2lmKaOARJvt4soRsVmbR7Njwp9FpbBgste5i7l/2l5o8MmbwGh4yE1snfnsy2qyA2r/Fw== -"@commitlint/parse@^19.0.0": - version "19.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-19.0.0.tgz#e7200b24033e6a7efe2213f9c9ac86de75f95d28" - integrity sha512-/2hT08V/2Lh+aQ5cSAw5vO74FlA3LJGYzLfsNMcx6aW8Kmrsa9W7chNNY5hMWbucCF92s/JE3eVIHnzoEBKTTA== +"@commitlint/parse@^19.0.3": + version "19.0.3" + resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-19.0.3.tgz#a2d09876d458e17ad0e1695b04f41af8b50a41c2" + integrity sha512-Il+tNyOb8VDxN3P6XoBBwWJtKKGzHlitEuXA5BP6ir/3loWlsSqDr5aecl6hZcC/spjq4pHqNh0qPlfeWu38QA== dependencies: - "@commitlint/types" "^19.0.0" + "@commitlint/types" "^19.0.3" conventional-changelog-angular "^7.0.0" conventional-commits-parser "^5.0.0" -"@commitlint/read@^19.0.0": - version "19.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-19.0.0.tgz#05ce4ef95730dd601fc138f827a39db7d6fa22b0" - integrity sha512-AbK/fQjWrXGAAHl+KeOtZtWJryhzkTnynhkABF4IUFZqK71JSviSIPHYuUQjdwNrD0PJGs5f19ORjY8LOXP08w== +"@commitlint/read@^19.0.3": + version "19.0.3" + resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-19.0.3.tgz#b04abaa4daae2ba84f5f77a3800a6c3bc27cd94d" + integrity sha512-b5AflTyAXkUx5qKw4TkjjcOccXZHql3JqMi522knTQktq2AubKXFz60Sws+K4FsefwPws6fGz9mqiI/NvsvxFA== dependencies: "@commitlint/top-level" "^19.0.0" - "@commitlint/types" "^19.0.0" + "@commitlint/types" "^19.0.3" git-raw-commits "^4.0.0" minimist "^1.2.8" -"@commitlint/resolve-extends@^19.0.0": - version "19.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-19.0.0.tgz#5ab8f72020f8a758be406b44f71babcb02c51104" - integrity sha512-ej0fALn5yZQOYKH8wPZnzw5LGvD0n5gJBPvV6DnMiSYudqgwYwhdNJ//MukZCXNpLIM1yMA8KUyrCP6D4WnUbg== +"@commitlint/resolve-extends@^19.0.3": + version "19.0.3" + resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-19.0.3.tgz#04d0e95f9119983765741df603d36f4457f56c13" + integrity sha512-18BKmta8OC8+Ub+Q3QGM9l27VjQaXobloVXOrMvu8CpEwJYv62vC/t7Ka5kJnsW0tU9q1eMqJFZ/nN9T/cOaIA== dependencies: - "@commitlint/config-validator" "^19.0.0" - "@commitlint/types" "^19.0.0" - import-fresh "^3.0.0" + "@commitlint/config-validator" "^19.0.3" + "@commitlint/types" "^19.0.3" + global-directory "^4.0.1" import-meta-resolve "^4.0.0" lodash.mergewith "^4.6.2" - resolve-global "^2.0.0" + resolve-from "^5.0.0" -"@commitlint/rules@^19.0.0": - version "19.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-19.0.0.tgz#c6f5aeae52ff14ed37e54cf96156968b1f979ac6" - integrity sha512-uwb5Ro5vvJlEjnWPezL3AcdlbLdJz24SD5VembgA6IXqqunphZr5LFsQL1z5efP7p3MUdJEXFynIx8o62+j2lA== +"@commitlint/rules@^19.0.3": + version "19.0.3" + resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-19.0.3.tgz#de647a9055847cae4f3ae32b4798096b604584f3" + integrity sha512-TspKb9VB6svklxNCKKwxhELn7qhtY1rFF8ls58DcFd0F97XoG07xugPjjbVnLqmMkRjZDbDIwBKt9bddOfLaPw== dependencies: - "@commitlint/ensure" "^19.0.0" + "@commitlint/ensure" "^19.0.3" "@commitlint/message" "^19.0.0" "@commitlint/to-lines" "^19.0.0" - "@commitlint/types" "^19.0.0" + "@commitlint/types" "^19.0.3" execa "^8.0.1" "@commitlint/to-lines@^19.0.0": @@ -1665,11 +1663,12 @@ dependencies: find-up "^7.0.0" -"@commitlint/types@^19.0.0": - version "19.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-19.0.0.tgz#d5af1c8730c85a1622ae885f2d728fced17a4e0c" - integrity sha512-qLjLUdYXKi0TIavONrjBkxrElp7KguqDbvzIRbqTdJBV/cAAr8QEhHe1qUq8OcCM3gFWTlUrDz3ISZbkRoGsAg== +"@commitlint/types@^19.0.3": + version "19.0.3" + resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-19.0.3.tgz#feff4ecac2b5c359f2a57f9ab094b2ac80ef0266" + integrity sha512-tpyc+7i6bPG9mvaBbtKUeghfyZSDgWquIDfMgqYtTbmZ9Y9VzEm2je9EYcQ0aoz5o7NvGS+rcDec93yO08MHYA== dependencies: + "@types/conventional-commits-parser" "^5.0.0" chalk "^5.3.0" "@compodoc/compodoc@^1.1.23": @@ -2743,6 +2742,13 @@ dependencies: "@types/node" "*" +"@types/conventional-commits-parser@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@types/conventional-commits-parser/-/conventional-commits-parser-5.0.0.tgz#8c9d23e0b415b24b91626d07017303755d542dc8" + integrity sha512-loB369iXNmAZglwWATL+WRe+CRMmmBPtpolYzIebFaX4YA3x+BEfLqhUAV9WanycKI3TG1IMr5bMJDajDKLlUQ== + dependencies: + "@types/node" "*" + "@types/cookie@^0.4.1": version "0.4.1" resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.4.1.tgz#bfd02c1f2224567676c1545199f87c3a861d878d" @@ -7330,7 +7336,7 @@ immutable@^4.0.0: resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.0.tgz#eb1738f14ffb39fd068b1dbe1296117484dd34be" integrity sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg== -import-fresh@^3.0.0, import-fresh@^3.2.1, import-fresh@^3.3.0: +import-fresh@^3.2.1, import-fresh@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -10207,13 +10213,6 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== -resolve-global@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve-global/-/resolve-global-2.0.0.tgz#2ff55640800bf3692f089b6008357f75e1a27e54" - integrity sha512-gnAQ0Q/KkupGkuiMyX4L0GaBV8iFwlmoXsMtOz+DFTaKmHhOO/dSlP1RMKhpvHv/dh6K/IQkowGJBqUG0NfBUw== - dependencies: - global-directory "^4.0.1" - resolve-url-loader@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/resolve-url-loader/-/resolve-url-loader-5.0.0.tgz#ee3142fb1f1e0d9db9524d539cfa166e9314f795" From 1e33b739daffbd2f1740dabd707d26a7198186cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 Feb 2024 14:44:24 +0000 Subject: [PATCH 37/63] build(deps-dev): bump the angular-cli-devkit group with 2 updates Bumps the angular-cli-devkit group with 2 updates: [@angular-devkit/build-angular](https://github.com/angular/angular-cli) and [@angular/cli](https://github.com/angular/angular-cli). Updates `@angular-devkit/build-angular` from 17.2.1 to 17.2.2 - [Release notes](https://github.com/angular/angular-cli/releases) - [Changelog](https://github.com/angular/angular-cli/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular-cli/compare/17.2.1...17.2.2) Updates `@angular/cli` from 17.2.1 to 17.2.2 - [Release notes](https://github.com/angular/angular-cli/releases) - [Changelog](https://github.com/angular/angular-cli/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular-cli/compare/17.2.1...17.2.2) --- updated-dependencies: - dependency-name: "@angular-devkit/build-angular" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: angular-cli-devkit - dependency-name: "@angular/cli" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: angular-cli-devkit ... Signed-off-by: dependabot[bot] --- package.json | 4 +-- yarn.lock | 90 ++++++++++++++++++++++++++-------------------------- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/package.json b/package.json index 7a04aebb3d..ec76519931 100644 --- a/package.json +++ b/package.json @@ -117,13 +117,13 @@ "zone.js": "~0.14.2" }, "devDependencies": { - "@angular-devkit/build-angular": "^17.2.1", + "@angular-devkit/build-angular": "^17.2.2", "@angular-eslint/builder": "^17.2.1", "@angular-eslint/eslint-plugin": "^17.2.1", "@angular-eslint/eslint-plugin-template": "^17.2.1", "@angular-eslint/schematics": "^17.2.1", "@angular-eslint/template-parser": "^17.2.1", - "@angular/cli": "^17.2.1", + "@angular/cli": "^17.2.2", "@angular/compiler-cli": "^17.2.2", "@commitlint/cli": "^19.0.3", "@commitlint/config-angular": "^19.0.3", diff --git a/yarn.lock b/yarn.lock index a9750e90d2..1579bda537 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20,23 +20,23 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" -"@angular-devkit/architect@0.1702.1": - version "0.1702.1" - resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1702.1.tgz#242916367392bc79bde6ca2352aef88d33419b59" - integrity sha512-eYYtR3kCG0V7aHsL34O4v8W2nW6MX4+SebhBO2dHGz2nCAS09LPtyO2fZZGawPgXOrN0nkLfghghI0hJ0dDaOw== +"@angular-devkit/architect@0.1702.2": + version "0.1702.2" + resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1702.2.tgz#fb219163a89c4d28a35ad574fa56d79cf70f7405" + integrity sha512-qBvif8/NquFUqVQgs4U+8wXh/rQZv+YlYwg6eDZly1bIaTd/k9spko/seTtNT1OpK/Be+GLo5IbiQ7i2SON3iQ== dependencies: - "@angular-devkit/core" "17.2.1" + "@angular-devkit/core" "17.2.2" rxjs "7.8.1" -"@angular-devkit/build-angular@^17.2.1": - version "17.2.1" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-17.2.1.tgz#b8955e1228f5f5420a9970f5cc1895cdad2fc8b7" - integrity sha512-Wq3ggliCMQCRVCucbjE4/9BJCN1KMSGfF6Bx1ke2B+vW3ElLt+M4x4Eeyg2dSPEYB7slgY9WOx7qtyOkUy15tQ== +"@angular-devkit/build-angular@^17.2.2": + version "17.2.2" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-17.2.2.tgz#8a6291c7fd74d995284f665bf1a3cdf7340fc347" + integrity sha512-K55xBiWBfxD4wmxLR2viOPbBryOk6YaZeNr72IMkp1yIrIy1BES6LDJi7R9fDW7+TprqZdM4B91Tkc+BCwYQzQ== dependencies: "@ampproject/remapping" "2.2.1" - "@angular-devkit/architect" "0.1702.1" - "@angular-devkit/build-webpack" "0.1702.1" - "@angular-devkit/core" "17.2.1" + "@angular-devkit/architect" "0.1702.2" + "@angular-devkit/build-webpack" "0.1702.2" + "@angular-devkit/core" "17.2.2" "@babel/core" "7.23.9" "@babel/generator" "7.23.6" "@babel/helper-annotate-as-pure" "7.22.5" @@ -47,7 +47,7 @@ "@babel/preset-env" "7.23.9" "@babel/runtime" "7.23.9" "@discoveryjs/json-ext" "0.5.7" - "@ngtools/webpack" "17.2.1" + "@ngtools/webpack" "17.2.2" "@vitejs/plugin-basic-ssl" "1.1.0" ansi-colors "4.1.3" autoprefixer "10.4.17" @@ -99,12 +99,12 @@ optionalDependencies: esbuild "0.20.0" -"@angular-devkit/build-webpack@0.1702.1": - version "0.1702.1" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1702.1.tgz#9416246be15cd03058abb41117647f6cbe0bb507" - integrity sha512-cmtGn8IYqruHuq1yPYEA17tLDTGmMhDPLagAbjZPVAjTpwCwC28H6sRXyhLTiSpzXdXUgROTO6bSXTvtJyyDSA== +"@angular-devkit/build-webpack@0.1702.2": + version "0.1702.2" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1702.2.tgz#a7c6bcfa1bf30eb8504f3bae85a636b333f71bb3" + integrity sha512-+c7rHD2Se1VD9i9uPEYHqhq8hTnsUAn5LfeJCLS8g7FU8T42tDSC/k1qWxHp7d99kf7ecg2BvYcZDlYaBUnl3A== dependencies: - "@angular-devkit/architect" "0.1702.1" + "@angular-devkit/architect" "0.1702.2" rxjs "7.8.1" "@angular-devkit/core@14.2.12": @@ -118,10 +118,10 @@ rxjs "6.6.7" source-map "0.7.4" -"@angular-devkit/core@17.2.1": - version "17.2.1" - resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-17.2.1.tgz#f35f4a534de9a86b01f0c44f6488cc1a68642daf" - integrity sha512-4jWG7akd5wVxjKkLKDT1zUTyLJeBP5mDmGUPooZ6zVHy39X6htYC+BV3uu/T6gVrD4FyONMDezedpBOrQPtZ6A== +"@angular-devkit/core@17.2.2": + version "17.2.2" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-17.2.2.tgz#81f1f9b7f98453fffb25716633f3ff21c6a93643" + integrity sha512-bKMi6bBkEeN4a3qTxCykhrAvE0ESHhKO38Qh1bN/8QSyvKVAEyVAVls5W9IN5GKRHvXgEn9aw+DSzRnPpy9nyw== dependencies: ajv "8.12.0" ajv-formats "2.1.1" @@ -141,12 +141,12 @@ ora "5.4.1" rxjs "6.6.7" -"@angular-devkit/schematics@17.2.1": - version "17.2.1" - resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-17.2.1.tgz#d294097ae79bf6780bd1a2465d6f083e34346e68" - integrity sha512-PgbjZgMSk1Q8QAH4mAx/dHDzPjNnXFONsNmwo80JPp6eJcBN0pODbchulFYdY7kPry07sNtGGWpQeWtdPAZHPw== +"@angular-devkit/schematics@17.2.2": + version "17.2.2" + resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-17.2.2.tgz#d85e6b34d0e6130bf451cc2fbd1511c9e76a5e99" + integrity sha512-t6dBhHvto9BEIo+Kew0+YyIS3TV1SEd4MActUk+zF4NNQyJ8wRUHL+8glUKB6ZWPyCTYSinJ+QKn/3yytELTHg== dependencies: - "@angular-devkit/core" "17.2.1" + "@angular-devkit/core" "17.2.2" jsonc-parser "3.2.1" magic-string "0.30.7" ora "5.4.1" @@ -221,15 +221,15 @@ dependencies: tslib "^2.3.0" -"@angular/cli@^17.2.1": - version "17.2.1" - resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-17.2.1.tgz#9d045ca01d697cff8485011ec94a2bd82c9e7c7f" - integrity sha512-zurPJunprq6ZRpNd6Icx7Ne819WN+pL7tQAlwTof7xuCnwfnIV32xiylFkvn77eyRN0Qh+so1FLlFy0t1jH4Mw== +"@angular/cli@^17.2.2": + version "17.2.2" + resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-17.2.2.tgz#a613dd782b3e2c30c447a4987d179a6409973c03" + integrity sha512-cGGOnOTjU1bHBAU+5LMR1vfjUSmIY204pUcRAHu6xq1Qp8jm0Wf1lYOG1KrzpDezKa8d0WZe6FIVlxsCZRRYSw== dependencies: - "@angular-devkit/architect" "0.1702.1" - "@angular-devkit/core" "17.2.1" - "@angular-devkit/schematics" "17.2.1" - "@schematics/angular" "17.2.1" + "@angular-devkit/architect" "0.1702.2" + "@angular-devkit/core" "17.2.2" + "@angular-devkit/schematics" "17.2.2" + "@schematics/angular" "17.2.2" "@yarnpkg/lockfile" "1.1.0" ansi-colors "4.1.3" ini "4.1.1" @@ -2303,10 +2303,10 @@ dependencies: tslib "^2.3.0" -"@ngtools/webpack@17.2.1": - version "17.2.1" - resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-17.2.1.tgz#f7eb2c6dc9c5edbcc4fa3cbebafb8d8d6704a2ee" - integrity sha512-5O493oqZw0os1Gj3otVTcIXS3nGs60eXZ9w3vsK5w7tZ5x6XqZvO00X8WZQhcxXA9HMG4iDCsU2ll3lcYZVxmg== +"@ngtools/webpack@17.2.2": + version "17.2.2" + resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-17.2.2.tgz#e755e35c2e3c887227ecebc1c33d290f3f7b042f" + integrity sha512-HgvClGO6WVq4VA5d0ZvlDG5hrj8lQzRH99Gt87URm7G8E5XkatysdOsMqUQsJz+OwFWhP4PvTRWVblpBDiDl/A== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -2578,13 +2578,13 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.5.tgz#10491ccf4f63c814d4149e0316541476ea603602" integrity sha512-1q+mykKE3Vot1kaFJIDoUFv5TuW+QQVaf2FmTT9krg86pQrGStOSJJ0Zil7CFagyxDuouTepzt5Y5TVzyajOdQ== -"@schematics/angular@17.2.1": - version "17.2.1" - resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-17.2.1.tgz#13e5dcb12f46eb349c61e57507f34859b56c8742" - integrity sha512-OUKupokfgmomWVysBpZ6CB7S3gzyjbVBb5L6UyhNLKAGRFxKOG5XWMPOo0ZdZjfuHB++HyRVj9Dh/rq0+PKHfA== +"@schematics/angular@17.2.2": + version "17.2.2" + resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-17.2.2.tgz#32551e5ab958e41c672fd62ca508c562c7306f12" + integrity sha512-Q3VAQ/S4gj8D1JPWgWG4enDdDZUu8mUXWVRG1rOi4sHgOF5zgPieQFp3LXqMUgOncmzbXrctkbO6NKc4N2FAag== dependencies: - "@angular-devkit/core" "17.2.1" - "@angular-devkit/schematics" "17.2.1" + "@angular-devkit/core" "17.2.2" + "@angular-devkit/schematics" "17.2.2" jsonc-parser "3.2.1" "@sigstore/bundle@^2.1.1": From c97e3dc4a8654609b8b917e73afd799a53fdab03 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 12:53:12 +0000 Subject: [PATCH 38/63] build(deps): bump the angular group with 11 updates Bumps the angular group with 11 updates: | Package | From | To | | --- | --- | --- | | [@angular/animations](https://github.com/angular/angular/tree/HEAD/packages/animations) | `17.2.2` | `17.2.3` | | [@angular/common](https://github.com/angular/angular/tree/HEAD/packages/common) | `17.2.2` | `17.2.3` | | [@angular/compiler](https://github.com/angular/angular/tree/HEAD/packages/compiler) | `17.2.2` | `17.2.3` | | [@angular/core](https://github.com/angular/angular/tree/HEAD/packages/core) | `17.2.2` | `17.2.3` | | [@angular/forms](https://github.com/angular/angular/tree/HEAD/packages/forms) | `17.2.2` | `17.2.3` | | [@angular/localize](https://github.com/angular/angular) | `17.2.2` | `17.2.3` | | [@angular/platform-browser](https://github.com/angular/angular/tree/HEAD/packages/platform-browser) | `17.2.2` | `17.2.3` | | [@angular/platform-browser-dynamic](https://github.com/angular/angular/tree/HEAD/packages/platform-browser-dynamic) | `17.2.2` | `17.2.3` | | [@angular/platform-server](https://github.com/angular/angular/tree/HEAD/packages/platform-server) | `17.2.2` | `17.2.3` | | [@angular/router](https://github.com/angular/angular/tree/HEAD/packages/router) | `17.2.2` | `17.2.3` | | [@angular/compiler-cli](https://github.com/angular/angular/tree/HEAD/packages/compiler-cli) | `17.2.2` | `17.2.3` | Updates `@angular/animations` from 17.2.2 to 17.2.3 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.3/packages/animations) Updates `@angular/common` from 17.2.2 to 17.2.3 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.3/packages/common) Updates `@angular/compiler` from 17.2.2 to 17.2.3 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.3/packages/compiler) Updates `@angular/core` from 17.2.2 to 17.2.3 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.3/packages/core) Updates `@angular/forms` from 17.2.2 to 17.2.3 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.3/packages/forms) Updates `@angular/localize` from 17.2.2 to 17.2.3 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/compare/17.2.2...17.2.3) Updates `@angular/platform-browser` from 17.2.2 to 17.2.3 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.3/packages/platform-browser) Updates `@angular/platform-browser-dynamic` from 17.2.2 to 17.2.3 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.3/packages/platform-browser-dynamic) Updates `@angular/platform-server` from 17.2.2 to 17.2.3 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.3/packages/platform-server) Updates `@angular/router` from 17.2.2 to 17.2.3 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.3/packages/router) Updates `@angular/compiler-cli` from 17.2.2 to 17.2.3 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.3/packages/compiler-cli) --- updated-dependencies: - dependency-name: "@angular/animations" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/common" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/compiler" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/core" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/forms" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/localize" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/platform-browser" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/platform-browser-dynamic" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/platform-server" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/router" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/compiler-cli" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: angular ... Signed-off-by: dependabot[bot] --- package.json | 22 ++++++------- yarn.lock | 88 ++++++++++++++++++++++++++-------------------------- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/package.json b/package.json index ec76519931..a9d8bebf04 100644 --- a/package.json +++ b/package.json @@ -82,16 +82,16 @@ "deploy:ci": "ng deploy --no-build --message=\"Release $npm_package_name (v$npm_package_version) on gh-pages\"" }, "dependencies": { - "@angular/animations": "^17.2.2", - "@angular/common": "^17.2.2", - "@angular/compiler": "^17.2.2", - "@angular/core": "^17.2.2", - "@angular/forms": "^17.2.2", - "@angular/localize": "^17.2.2", - "@angular/platform-browser": "^17.2.2", - "@angular/platform-browser-dynamic": "^17.2.2", - "@angular/platform-server": "^17.2.2", - "@angular/router": "^17.2.2", + "@angular/animations": "^17.2.3", + "@angular/common": "^17.2.3", + "@angular/compiler": "^17.2.3", + "@angular/core": "^17.2.3", + "@angular/forms": "^17.2.3", + "@angular/localize": "^17.2.3", + "@angular/platform-browser": "^17.2.3", + "@angular/platform-browser-dynamic": "^17.2.3", + "@angular/platform-server": "^17.2.3", + "@angular/router": "^17.2.3", "@codemirror/legacy-modes": "^6.3.3", "@fortawesome/angular-fontawesome": "^0.14.1", "@fortawesome/fontawesome-svg-core": "^6.5.1", @@ -124,7 +124,7 @@ "@angular-eslint/schematics": "^17.2.1", "@angular-eslint/template-parser": "^17.2.1", "@angular/cli": "^17.2.2", - "@angular/compiler-cli": "^17.2.2", + "@angular/compiler-cli": "^17.2.3", "@commitlint/cli": "^19.0.3", "@commitlint/config-angular": "^19.0.3", "@compodoc/compodoc": "^1.1.23", diff --git a/yarn.lock b/yarn.lock index 1579bda537..94e7a4ff23 100644 --- a/yarn.lock +++ b/yarn.lock @@ -214,10 +214,10 @@ "@angular-eslint/bundled-angular-compiler" "17.2.1" "@typescript-eslint/utils" "6.19.0" -"@angular/animations@^17.2.2": - version "17.2.2" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-17.2.2.tgz#ba260a3f609f62c984d583e5c4bad36f157093b4" - integrity sha512-ENr35pDVslioJO8zBLo1QClzC7NqTc0Du36UMtWkw3cg+QRLnAZ7zfju5w0O8K7Z3omDtFzgVSPfyS0VDkrXPQ== +"@angular/animations@^17.2.3": + version "17.2.3" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-17.2.3.tgz#1caa126e73b9469008affa017ecd50a3df0741f1" + integrity sha512-eQcN6hC/dXISEYC/TjRuQJgfdZieBROBlXrS+BxRbsy9T4/QeKxChC3yiNxTmdxl5mvjLKvQTXHR8X0AWc07/Q== dependencies: tslib "^2.3.0" @@ -245,17 +245,17 @@ symbol-observable "4.0.0" yargs "17.7.2" -"@angular/common@^17.2.2": - version "17.2.2" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-17.2.2.tgz#30da82e24e53cb71b3c979c17b796176637c8a65" - integrity sha512-F2wQj/lYcZUNZuNmuuDb8RK8tU7e1w7IzN8J6nT2gQHq6NiZfYiUL2XrToGtdd/cZjBeYKGiWRBW/PsZzKyC3A== +"@angular/common@^17.2.3": + version "17.2.3" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-17.2.3.tgz#abb7b3435a338f08745f6bb52586f6db68a9a563" + integrity sha512-XR3rWS4W7/+RknyJMUUo9E81mSeyUznpclqTZ+Hy7+i4Naeso0qcRaIyr6JJmB5UGvlnfT1MlH9Fj78Dc80NEw== dependencies: tslib "^2.3.0" -"@angular/compiler-cli@^17.2.2": - version "17.2.2" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-17.2.2.tgz#09333d1613f3bd230e97bad392ab509d71742281" - integrity sha512-tFfbamdLhn8R30/aKxhXNG6CwelJOpVxfUnTizb7pWUJ/UQ4py0xzJp7s0QzKjR1lpRAq3rPtsE3f9BbcHD1HA== +"@angular/compiler-cli@^17.2.3": + version "17.2.3" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-17.2.3.tgz#bcfe2e2fcb3cb64cd85ee14bb86369e4092d30b4" + integrity sha512-mATybangypneXwO270VQeIw3N0avzc2Lpvdb8nm9WZYj23AcTUzpUUKOn63HtJdwMT5J2GjkyZFSRXisiPmpkA== dependencies: "@babel/core" "7.23.9" "@jridgewell/sourcemap-codec" "^1.4.14" @@ -266,63 +266,63 @@ tslib "^2.3.0" yargs "^17.2.1" -"@angular/compiler@^17.2.2": - version "17.2.2" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-17.2.2.tgz#691104aa52e1ff464c49a5da611023f664635009" - integrity sha512-loRr4+9/JkSDszExZiS+iuhjXj7wvLF4gJeqlbp2PbPl4eUoGKYq0RVZ3a7IkIXxB5sgoYB5MjKsbdm/uaMK1A== +"@angular/compiler@^17.2.3": + version "17.2.3" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-17.2.3.tgz#9cf35dd1bb49edcdf4f854cb459c630efc126698" + integrity sha512-U2okLZ+4ipD5zTv32pMp+RsrM3kkP0XneSsIMPRpYZZfKgfnGLIwkRx6FoVoBwByugng6lBG/PiIe8DhRU/HFg== dependencies: tslib "^2.3.0" -"@angular/core@^17.2.2": - version "17.2.2" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-17.2.2.tgz#68029e4d765ef42ff8fdcd9a8e9b4b83cbcf3c50" - integrity sha512-jXnrOVsA9b34PJN383EOss3ejd5+xUTeijuUy5njPRXpxMxrGjV5gkk0lSxsALRxw2ICax2tMoGmHXfXO1x9gw== +"@angular/core@^17.2.3": + version "17.2.3" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-17.2.3.tgz#e4e05f4d12b40178f67831e9cdca3c3aeeaf4cc3" + integrity sha512-DU+RdUB4E4I489R2P2hOrgkCDJNXlVaTzYixpgeDnuldCIYM0MatEzjor9DYNL3EDCayHF+M4HlVOcn6T/IVPQ== dependencies: tslib "^2.3.0" -"@angular/forms@^17.2.2": - version "17.2.2" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-17.2.2.tgz#c20142c23795031722b68e123a22785d397b623c" - integrity sha512-xxy1Khpun2TpSDQch6BK4uHkqIxZvxsBU2LZgo/3W604lKoVjBGKPZqoYFRew2OPeCQ3VjK9P8a8ZhitsLLlKQ== +"@angular/forms@^17.2.3": + version "17.2.3" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-17.2.3.tgz#caa45536ea99f2ea8c0580e262c8b829bd068a9c" + integrity sha512-v+/6pimht808F5XpmVTNV4/109s+A7m3nadQP97qvIDsrtwrPPZR7cST+DRioG2C41VwtjXM0HVbIon/3ydo6A== dependencies: tslib "^2.3.0" -"@angular/localize@^17.2.2": - version "17.2.2" - resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-17.2.2.tgz#dbb84165a4990e49150cc338969beee569ee84d2" - integrity sha512-VK4tjRXihJlFIccmplmwnWJfSByXbP+scCt8DvBRcbgxgF4eX/sJHx3UC1u7NIfBwDHV6dHXTJQVHKgD/RwOqw== +"@angular/localize@^17.2.3": + version "17.2.3" + resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-17.2.3.tgz#99e38dd2d5cf2bb474a44c5e08783f2432e206c3" + integrity sha512-RCReeQabENpWNzhF/jZMhiMCbGt78lb5mgiMNvbGet62IHR62q3Qu1bXprjJvgGIHsxQlM4pkGgMGTZ/8/my4A== dependencies: "@babel/core" "7.23.9" "@types/babel__core" "7.20.5" fast-glob "3.3.2" yargs "^17.2.1" -"@angular/platform-browser-dynamic@^17.2.2": - version "17.2.2" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-17.2.2.tgz#01b6dc901af05341a07c3d0454d9790eb7f9ce94" - integrity sha512-I52zbDSic4LB0yhCFUEBZKg9QkLKVUCGTco0XFHNRy3EF54Jvs0uWBqG79egsuXmyBNQY0E3op9eqhhn6Mnwbw== +"@angular/platform-browser-dynamic@^17.2.3": + version "17.2.3" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-17.2.3.tgz#6e8a8e5b68ed2d94dcc09c446bc5f0ebfe56d814" + integrity sha512-K8CsHbmG2nvV1jrNN9PYxyA0zJNoIWp+qf2udvPhG8rJ+Pyw61qmptrarpQUUkr8ONOtjwtOsnKa9/w+15nExw== dependencies: tslib "^2.3.0" -"@angular/platform-browser@^17.2.2": - version "17.2.2" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-17.2.2.tgz#5cceed30dc21bab290b335c8ddf78ce404999128" - integrity sha512-6AZhQfZpo/apiRKwhy6es1RpoxgCXMR4y7Eo7GvVHpMKBwioWwP2H+qg83ed2xv0/GXIyqZsHjpEjsLPE83uyw== +"@angular/platform-browser@^17.2.3": + version "17.2.3" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-17.2.3.tgz#6079b1991628a25e58ea6825e8dc560bc27d5cac" + integrity sha512-bFi+H8avyCjwSBy+zpOKmqx852MRH8fkuZa4XgwKCPJRay8BfSCjHdtIo3eokUNPMu9JsyXM7HYKIfzLu5y6LA== dependencies: tslib "^2.3.0" -"@angular/platform-server@^17.2.2": - version "17.2.2" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-17.2.2.tgz#5da8e1991d5fac8f8a34c0f20cb99c31a01b437b" - integrity sha512-XED+F4m7jCIJuSBL+NF6cOsDmM8OJ7kAzTXUIbHTeHO6sGtqqZq6ceOGeD+FX0Pi4v0ai5voH66qTEAHkd0oog== +"@angular/platform-server@^17.2.3": + version "17.2.3" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-17.2.3.tgz#8b9777e8276b12dee78192f1ab5677a88611b0e7" + integrity sha512-RUzyNyx9TTkfJ5HZhifOhQG6b9B3JH+OiB+RgwOb0lHHYHrhg8vKlBEueVmqkMwk6odd7gTcyVJDmKXpwfGgpg== dependencies: tslib "^2.3.0" xhr2 "^0.2.0" -"@angular/router@^17.2.2": - version "17.2.2" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-17.2.2.tgz#d52e2e5506a292ad41856135a0b888beaf51859f" - integrity sha512-3mT2+qBF8urFeY6eZVZX5bmAdK9ojJRZi7yB9ocpieE1Jdd/1NYCfIsQxJk032syEGc2NJftijTzuNiflLzlTA== +"@angular/router@^17.2.3": + version "17.2.3" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-17.2.3.tgz#03fa1fac44518a709941559986e6009f4b2b7678" + integrity sha512-8UPjMzI98xZ6cDNm0MzHd9hFq6aOQJGmgxKDUPIG2h74glRwwbiewpo5hPo2EGIF8BLvQmmAm9ytr5zesHu0cg== dependencies: tslib "^2.3.0" From 90bd051aa9ecfbd4a38419741e07943ab85f210a Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Sat, 2 Mar 2024 00:04:02 +0100 Subject: [PATCH 39/63] fix(assets): optimize svgs with SVGO --- .../2/section/2a/m34/M34_Sk1-1von3-final.svg | 244 ++++++++--------- .../2/section/2a/m34/M34_Sk1-2von3-final.svg | 166 ++++++------ .../2/section/2a/m34/M34_Sk1-3von3-final.svg | 94 +++---- .../section/2a/m34/M34_Sk1_1-1von1-final.svg | 172 ++++++------ .../2a/m34/M34_Textfassung1-1von1-final.svg | 252 +----------------- 5 files changed, 346 insertions(+), 582 deletions(-) diff --git a/src/assets/img/edition/series/2/section/2a/m34/M34_Sk1-1von3-final.svg b/src/assets/img/edition/series/2/section/2a/m34/M34_Sk1-1von3-final.svg index b1d7dd9f60..8170a645f0 100644 --- a/src/assets/img/edition/series/2/section/2a/m34/M34_Sk1-1von3-final.svg +++ b/src/assets/img/edition/series/2/section/2a/m34/M34_Sk1-1von3-final.svg @@ -1,4 +1,4 @@ - + @@ -6,14 +6,14 @@ - - - - - - - - + + + + + + + + @@ -21,16 +21,16 @@ - + - + - - + + @@ -39,37 +39,37 @@ - + - + - + - + - + - + - + - + - + @@ -109,21 +109,21 @@ - + - + - + - + @@ -131,10 +131,10 @@ - + - + @@ -144,24 +144,24 @@ - + - + - + - + - + - + @@ -170,18 +170,18 @@ - + - + - + @@ -189,11 +189,11 @@ - + - + @@ -209,45 +209,45 @@ - + - + - + - + - + - + - + - + - + - + - + @@ -259,12 +259,12 @@ - + - + @@ -272,15 +272,15 @@ - + - + - + @@ -292,98 +292,98 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -392,15 +392,15 @@ - + - + - + @@ -408,7 +408,7 @@ - + @@ -418,7 +418,7 @@ - + @@ -426,23 +426,23 @@ - + - + - + - + - + @@ -462,13 +462,13 @@ - + - + - + @@ -487,10 +487,10 @@ - + - + @@ -507,7 +507,7 @@ - + @@ -519,34 +519,34 @@ - + - + - + - + - + - + - + - + @@ -561,33 +561,33 @@ - + - - + + - + - + - + - + - + - + @@ -596,32 +596,32 @@ - + - + - + - + - + - + - + - + diff --git a/src/assets/img/edition/series/2/section/2a/m34/M34_Sk1-2von3-final.svg b/src/assets/img/edition/series/2/section/2a/m34/M34_Sk1-2von3-final.svg index d30272291c..b6a7815b50 100644 --- a/src/assets/img/edition/series/2/section/2a/m34/M34_Sk1-2von3-final.svg +++ b/src/assets/img/edition/series/2/section/2a/m34/M34_Sk1-2von3-final.svg @@ -1,4 +1,4 @@ - + @@ -7,16 +7,16 @@ - - - - - + + + + + - - - - + + + + @@ -24,14 +24,14 @@ - + - - - + + + @@ -39,14 +39,14 @@ - + - + - - + + @@ -54,10 +54,10 @@ - + - + @@ -89,17 +89,17 @@ - + - + - + @@ -107,15 +107,15 @@ - + - + - + @@ -123,10 +123,10 @@ - + - + @@ -134,25 +134,25 @@ - + - + - + - + - + @@ -166,32 +166,32 @@ - + - + - + - + - + @@ -199,15 +199,15 @@ - + - + - + @@ -215,7 +215,7 @@ - + @@ -231,7 +231,7 @@ - + @@ -245,7 +245,7 @@ - + @@ -256,7 +256,7 @@ - + @@ -268,24 +268,24 @@ - + - + - + - + - + @@ -293,43 +293,43 @@ - + - + - + - + - + - + - + - + @@ -337,14 +337,14 @@ - + - + @@ -354,11 +354,11 @@ - + - + @@ -366,11 +366,11 @@ - + - + @@ -378,7 +378,7 @@ - + @@ -386,7 +386,7 @@ - + @@ -394,15 +394,15 @@ - + - + - + @@ -413,7 +413,7 @@ - + @@ -422,7 +422,7 @@ - + @@ -430,11 +430,11 @@ - + - + @@ -442,14 +442,14 @@ - + - + - + @@ -457,7 +457,7 @@ - + @@ -465,14 +465,14 @@ - + - + - + @@ -484,7 +484,7 @@ - + @@ -502,14 +502,14 @@ - + - + diff --git a/src/assets/img/edition/series/2/section/2a/m34/M34_Sk1-3von3-final.svg b/src/assets/img/edition/series/2/section/2a/m34/M34_Sk1-3von3-final.svg index 4291c092fd..f597bbc280 100644 --- a/src/assets/img/edition/series/2/section/2a/m34/M34_Sk1-3von3-final.svg +++ b/src/assets/img/edition/series/2/section/2a/m34/M34_Sk1-3von3-final.svg @@ -1,4 +1,4 @@ - + @@ -6,13 +6,13 @@ - - - + + + - - - + + + @@ -21,14 +21,14 @@ - + - - - + + + @@ -40,16 +40,16 @@ - + - + - + - + @@ -80,52 +80,52 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -133,28 +133,28 @@ - + - + - + - + - + - + @@ -162,11 +162,11 @@ - + - + @@ -174,7 +174,7 @@ - + @@ -200,7 +200,7 @@ - + @@ -219,40 +219,40 @@ - + - + - + - + - + - + - + - + - + diff --git a/src/assets/img/edition/series/2/section/2a/m34/M34_Sk1_1-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m34/M34_Sk1_1-1von1-final.svg index 65228a98ff..afbb4f6786 100644 --- a/src/assets/img/edition/series/2/section/2a/m34/M34_Sk1_1-1von1-final.svg +++ b/src/assets/img/edition/series/2/section/2a/m34/M34_Sk1_1-1von1-final.svg @@ -1,4 +1,4 @@ - + @@ -6,14 +6,14 @@ - - - - - + + + + + - + @@ -22,14 +22,14 @@ - - + + - - + + @@ -42,13 +42,13 @@ - + - + - - + + @@ -85,59 +85,59 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -145,196 +145,196 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -343,7 +343,7 @@ - + @@ -358,7 +358,7 @@ - + @@ -375,20 +375,20 @@ - + - + - + - + @@ -398,7 +398,7 @@ - + @@ -410,16 +410,16 @@ - + - + - + diff --git a/src/assets/img/edition/series/2/section/2a/m34/M34_Textfassung1-1von1-final.svg b/src/assets/img/edition/series/2/section/2a/m34/M34_Textfassung1-1von1-final.svg index e2b03f61d6..fe6b0d63a6 100644 --- a/src/assets/img/edition/series/2/section/2a/m34/M34_Textfassung1-1von1-final.svg +++ b/src/assets/img/edition/series/2/section/2a/m34/M34_Textfassung1-1von1-final.svg @@ -1,188 +1,12 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -191,10 +15,10 @@ - + - + @@ -220,66 +44,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -308,7 +72,7 @@ - + @@ -323,7 +87,7 @@ - + @@ -355,7 +119,7 @@ - + From 26b4f27621eec95222d6340b24b3644cc8907f49 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Sat, 2 Mar 2024 00:04:48 +0100 Subject: [PATCH 40/63] fix(assets): fix convolute sigle for m34 Sk1.1 --- .../data/edition/series/2/section/2a/m34/folio-convolute.json | 2 +- .../edition/series/2/section/2a/m35_42/folio-convolute.json | 2 +- .../data/edition/series/2/section/2a/m37/folio-convolute.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/assets/data/edition/series/2/section/2a/m34/folio-convolute.json b/src/assets/data/edition/series/2/section/2a/m34/folio-convolute.json index 60da1dd57c..bae510c455 100644 --- a/src/assets/data/edition/series/2/section/2a/m34/folio-convolute.json +++ b/src/assets/data/edition/series/2/section/2a/m34/folio-convolute.json @@ -56,7 +56,7 @@ "complexId": "m34", "sheetId": "M_34_Sk1_1", "sigle": "M 34 Sk1.1", - "sigleAddendum": "T. 5–8", + "sigleAddendum": "", "sectionPartition": 2, "sections": [ { diff --git a/src/assets/data/edition/series/2/section/2a/m35_42/folio-convolute.json b/src/assets/data/edition/series/2/section/2a/m35_42/folio-convolute.json index 2ea915c25c..8abe276300 100644 --- a/src/assets/data/edition/series/2/section/2a/m35_42/folio-convolute.json +++ b/src/assets/data/edition/series/2/section/2a/m35_42/folio-convolute.json @@ -56,7 +56,7 @@ "complexId": "m34", "sheetId": "M_34_Sk1_1", "sigle": "M 34 Sk1.1", - "sigleAddendum": "T. 5–8", + "sigleAddendum": "", "sectionPartition": 2, "sections": [ { diff --git a/src/assets/data/edition/series/2/section/2a/m37/folio-convolute.json b/src/assets/data/edition/series/2/section/2a/m37/folio-convolute.json index 60da1dd57c..bae510c455 100644 --- a/src/assets/data/edition/series/2/section/2a/m37/folio-convolute.json +++ b/src/assets/data/edition/series/2/section/2a/m37/folio-convolute.json @@ -56,7 +56,7 @@ "complexId": "m34", "sheetId": "M_34_Sk1_1", "sigle": "M 34 Sk1.1", - "sigleAddendum": "T. 5–8", + "sigleAddendum": "", "sectionPartition": 2, "sections": [ { From 7385b9855e11f4ceb2b04eb36c85874472d9f145 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Sat, 2 Mar 2024 00:09:56 +0100 Subject: [PATCH 41/63] fix(edition): move folio viewer colors to folio service --- .../edition-folio-viewer.component.spec.ts | 8 ----- .../edition-folio-viewer.component.ts | 16 +-------- .../edition-folio-viewer/folio.service.ts | 35 +++++++++++++------ 3 files changed, 26 insertions(+), 33 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.spec.ts index b004b0aecc..0570a2b61c 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.spec.ts @@ -164,14 +164,6 @@ describe('EditionFolioViewerComponent (DONE)', () => { expectToBe(component.viewBoxArray.length, 0); }); - it('... should have `bgColor`', () => { - expectToBe(component.bgColor, '#a3a3a3'); - }); - - it('... should have `fgColor`', () => { - expectToBe(component.fgColor, 'orange'); - }); - it('... should have `_folioSettings` object', () => { expectToEqual((component as any)._folioSettings, expectedFolioSettings); }); diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.ts index d17e54cc0f..ee1cd26db9 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.ts @@ -92,20 +92,6 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked */ viewBoxArray: ViewBox[] = []; - /** - * Public variable: bgColor. - * - * It keeps the background color for the folio. - */ - bgColor = '#a3a3a3'; - - /** - * Public variable: fgColor. - * - * It keeps the foreground color for the folio. - */ - fgColor = 'orange'; - /** * Self-referring variable needed for CompileHtml library. */ @@ -195,7 +181,7 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked this.folioService.addViewBoxToSvgCanvas(svgCanvas, this.viewBoxArray[folioIndex]); // SVG content - this.folioService.addFolioToSvgCanvas(svgCanvas, folioSvgData, this.bgColor, this.fgColor, this.ref); + this.folioService.addFolioToSvgCanvas(svgCanvas, folioSvgData, this.ref); this.canvasArray.push(svgCanvas); }); diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts index 607b209167..8f9b973d22 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts @@ -30,12 +30,33 @@ export class FolioService { ref: any; /** - * Private variable: _itemsOffsetCorrection. + * Private variable: _bgColor. + * + * It keeps the background color for the folio. + */ + private _bgColor = '#a3a3a3'; + + /** + * Private variable: _disabledColor. + * + * It keeps the disabled color for the folios. + */ + private _disabledColor = 'grey'; + + /** + * Private variable: _fgColor. + * + * It keeps the foreground color for the folios. + */ + private _fgColor = 'orange'; + + /** + * Private variable: _itemOffsetCorrection. * * It corrects the offset (in px) to avoid * border collision between rendered SVG items. */ - private _itemsOffsetCorrection = 4; + private _itemOffsetCorrection = 4; /** * Public method: getFolioSvgData. @@ -49,7 +70,7 @@ export class FolioService { */ getFolioSvgData(folioSettings: FolioSettings, folio: Folio): FolioSvgData { // Calculate values for SVG - const calculation = new FolioCalculation(folioSettings, folio, this._itemsOffsetCorrection); + const calculation = new FolioCalculation(folioSettings, folio, this._itemOffsetCorrection); // Get SVG data from calculation return new FolioSvgData(calculation); @@ -88,13 +109,7 @@ export class FolioService { * @param {*} ref The given reference to the calling component. * @returns {void} Adds the folio to the SVG canvas selection. */ - addFolioToSvgCanvas( - svgCanvas: D3Selection, - folioSvgData: FolioSvgData, - bgColor: string, - fgColor: string, - ref: any - ): void { + addFolioToSvgCanvas(svgCanvas: D3Selection, folioSvgData: FolioSvgData, ref: any): void { /** * Self-referring variable needed for CompileHtml library. */ From 74fc38323b729b3afd67e39d5a677ab91a262c5f Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Sun, 3 Mar 2024 00:56:25 +0100 Subject: [PATCH 42/63] refactor(edition): atomize FolioService for better readability --- .../edition-folio-viewer/folio.service.ts | 588 ++++++++++++------ .../models/folio-calculation.model.ts | 73 ++- .../models/folio-svg-data.model.ts | 41 +- src/app/views/edition-view/models/index.ts | 11 +- 4 files changed, 488 insertions(+), 225 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts index 8f9b973d22..9e0272b0f2 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts @@ -5,7 +5,9 @@ import { Folio, FolioCalculation, FolioCalculationLine, + FolioCalculationPoint, FolioSettings, + FolioSvgContentItem, FolioSvgData, ViewBox, } from '@awg-views/edition-view/models'; @@ -50,6 +52,20 @@ export class FolioService { */ private _fgColor = 'orange'; + /** + * Private variable: _itemFillColor. + * + * It keeps the fill color for the items. + */ + private _itemFillColor = '#eeeeee'; + + /** + * Private variable: _itemFontStyle. + * + * It keeps the font style for the items. + */ + private _itemFontStyle = '11px Source Sans Pro, source-sans-pro, sans-serif'; + /** * Private variable: _itemOffsetCorrection. * @@ -58,6 +74,41 @@ export class FolioService { */ private _itemOffsetCorrection = 4; + /** + * Private variable: _itemRotationAngle. + * + * It keeps the rotation angle for the reversed items. + */ + private _itemReversedRotationAngle = 180; + + /** + * Private variable: _itemStrokeWidth. + * + * It keeps the stroke width for the items. + */ + private _itemStrokeWidth = 2; + + /** + * Private variable: _sheetFillColor. + * + * It keeps the fill color for the sheets. + */ + private _sheetFillColor = 'white'; + + /** + * Private variable: _sheetStrokeWidth. + * + * It keeps the stroke width for the sheets. + */ + private _sheetStrokeWidth = 1; + + /** + * Private variable: _systemsLineStrokeWidth. + * + * It keeps the stroke width for the systems. + */ + private _systemsLineStrokeWidth = 0.7; + /** * Public method: getFolioSvgData. * @@ -110,146 +161,64 @@ export class FolioService { * @returns {void} Adds the folio to the SVG canvas selection. */ addFolioToSvgCanvas(svgCanvas: D3Selection, folioSvgData: FolioSvgData, ref: any): void { - /** - * Self-referring variable needed for CompileHtml library. - */ + // Self-referring variable needed for CompileHtml library. this.ref = ref; - /** - * The SVG canvas sheet group selection. - */ - const svgSheetGroup = svgCanvas.append('g'); - - /** - * Draw sheet. - */ - this._addFolioSheetToSvgCanvas(svgCanvas, svgSheetGroup, folioSvgData, bgColor); - - /** - * Draw systems. - */ - this._addFolioSystemsToSvgCanvas(svgCanvas, svgSheetGroup, folioSvgData, bgColor); - - /** - * Draw items. - */ - this._addFolioItemsToSvgCanvas(svgCanvas, svgSheetGroup, folioSvgData, fgColor); + // Create the SVG canvas sheet group selection. + const svgSheetGroup = this._appendCanvasSheetGroup(svgCanvas, folioSvgData); + + // Draw sheet. + this._addFolioSheetToSvgCanvas(svgSheetGroup, folioSvgData); + + // Draw systems. + this._addFolioSystemsToSvgCanvas(svgSheetGroup, folioSvgData); + + // Draw items. + this._addFolioItemsToSvgCanvas(svgSheetGroup, folioSvgData); } /** * Private method: _addFolioSheetToSvgCanvas. * * It adds the folio's sheet from the calculated - * folio SVG data to the folio SVG canvas. + * folio SVG data to the SVG sheet group. * - * @param {D3Selection} svgCanvas The given SVG canvas selection. * @param {D3Selection} svgSheetGroup The given SVG sheet group selection. * @param {FolioSvgData} folioSvgData The given calculated folio SVG data. - * @param {string} bgColor The given background color. * @returns {void} Adds the sheet to the SVG canvas selection. */ - private _addFolioSheetToSvgCanvas( - svgCanvas: D3Selection, - svgSheetGroup: D3Selection, - folioSvgData: FolioSvgData, - bgColor: string - ): void { - // Init - const folioId = folioSvgData.sheet.folioId; - const x1 = folioSvgData.sheet.upperLeftCorner.x; - const y1 = folioSvgData.sheet.upperLeftCorner.y; - const x2 = folioSvgData.sheet.lowerRightCorner.x; - const y2 = folioSvgData.sheet.lowerRightCorner.y; - - // SVG sheet id - svgSheetGroup.attr('sheetGroupId', folioId).attr('class', 'sheet-group'); - - // SVG sheet rectangle - const svgSheetRect = svgCanvas - .append('rect') - .attr('x', x1) - .attr('y', y1) - .attr('width', x2 - x1) - .attr('height', y2 - y1) - .attr('fill', 'white') - .attr('stroke', bgColor) - .attr('stroke-width', 1); - - // SVG sheet title - svgSheetGroup.append('title').text('Bl. ' + folioId); - - // Add the SVG sheet rectangle to the SVG sheet group - svgSheetGroup.node().appendChild(svgSheetRect.node()); + private _addFolioSheetToSvgCanvas(svgSheetGroup: D3Selection, folioSvgData: FolioSvgData): void { + const { sheet } = folioSvgData; + const { upperLeftCorner, lowerRightCorner, folioId } = sheet; + + this._appendSheetGroupTitle(svgSheetGroup, folioId); + this._appendSheetGroupRectangle(svgSheetGroup, upperLeftCorner, lowerRightCorner); } /** * Private method: _addFolioSystemsToSvgCanvas. * * It adds the folio's systems from the calculated - * folio SVG data to the folio SVG canvas. + * folio SVG data to the SVG sheet group. * - * @param {D3Selection} svgCanvas The given SVG canvas selection. * @param {D3Selection} svgSheetGroup The given SVG sheet group selection. * @param {FolioSvgData} folioSvgData The given calculated folio SVG data. * @param {string} bgColor The given background color. * @returns {void} Adds the systems to the SVG canvas selection. */ - private _addFolioSystemsToSvgCanvas( - svgCanvas: D3Selection, - svgSheetGroup: D3Selection, - folioSvgData: FolioSvgData, - bgColor: string - ): void { + private _addFolioSystemsToSvgCanvas(svgSheetGroup: D3Selection, folioSvgData: FolioSvgData): void { folioSvgData.systems.lineArrays.forEach((lineArray: FolioCalculationLine[], systemIndex: number) => { - // Notational system - const svgSystemLineGroup = svgCanvas - .append('g') - .attr('systemLineGroupId', systemIndex + 1) - .attr('class', 'system-line-group'); - - // SVG system lines - lineArray.forEach(line => { - // Init - const x1 = line.startPoint.x; - const y1 = line.startPoint.y; - const x2 = line.endPoint.x; - const y2 = line.endPoint.y; - - const systemLine = svgCanvas - .append('line') - .attr('x1', x1) - .attr('y1', y1) - .attr('x2', x2) - .attr('y2', y2) - .attr('class', 'system-line') - .attr('stroke', bgColor) - .attr('stroke-width', 0.7); - - svgSystemLineGroup.node().appendChild(systemLine.node()); + const svgSystemsGroup = this._appendSvgElementWithAttrs(svgSheetGroup, 'g', { + systemsGroupId: systemIndex + 1, + class: 'systems-group', + }); + const svgSystemLineGroup = this._appendSvgElementWithAttrs(svgSystemsGroup, 'g', { + systemLineGroupId: systemIndex + 1, + class: 'system-line-group', }); - // SVG system label - const x = folioSvgData.systems.lineLabelArray[systemIndex].x; - const y = folioSvgData.systems.lineLabelArray[systemIndex].y; - const systemLabel = systemIndex + 1; - - const svgSystemLabel = svgCanvas - .append('text') - .attr('x', x) - .attr('y', y) - .text(systemLabel) - .attr('class', 'system-label') - .attr('dominant-baseline', 'hanging') - .attr('fill', bgColor); - - // SVG systems group - const svgSystemsGroup = svgCanvas.append('g'); - svgSystemsGroup.node().appendChild(svgSystemLineGroup.node()); - svgSystemsGroup.node().appendChild(svgSystemLabel.node()); - svgSystemsGroup.attr('systemsGroupId', systemIndex + 1).attr('class', 'systems-group'); - - // Add the SVG systems group to the SVG sheet group - svgSheetGroup.node().appendChild(svgSystemsGroup.node()); + this._appendSystemsGroupLabel(svgSystemsGroup, folioSvgData, systemIndex); + this._appendSystemsGroupLines(svgSystemLineGroup, lineArray); }); } @@ -265,96 +234,333 @@ export class FolioService { * @param {string} fgColor The given foreground color. * @returns {void} Adds the items to the SVG canvas selection. */ - private _addFolioItemsToSvgCanvas( - svgCanvas: D3Selection, - svgSheetGroup: D3Selection, - folioSvgData: FolioSvgData, - fgColor: string - ): void { - folioSvgData.contentItemsArray.forEach(contentItem => { + private _addFolioItemsToSvgCanvas(svgSheetGroup: D3Selection, folioSvgData: FolioSvgData): void { + folioSvgData?.contentItemsArray?.forEach((contentItem: FolioSvgContentItem) => { if (!contentItem) { return; } - // Init - const halfWidth = contentItem.width / 2; - const halfHeight = contentItem.height / 2; - const yOffset = 5; + // Draw item group. + const svgItemGroup = this._appendItemGroup(svgSheetGroup, contentItem); - let centeredXPosition = contentItem.upperLeftCorner.x + halfWidth; - let centeredYPosition = contentItem.upperLeftCorner.y + halfHeight - yOffset; + // Draw item link. + const svgItemLink = this._appendItemLink(svgItemGroup); - if (contentItem.reversed) { - centeredXPosition = contentItem.cornerPoints.lowerRightCorner.x - halfWidth; - centeredYPosition = contentItem.cornerPoints.lowerRightCorner.y - halfHeight + yOffset; - } + // Draw item polygon. + this._appendItemLinkPolygon(svgItemLink, contentItem.polygonCornerPoints); - const itemLabelArray: string[] = [ - contentItem.sigle, - contentItem.sigleAddendum ? ` ${contentItem.sigleAddendum}` : '', - ]; - - const polygoneCornerPointArray = [ - contentItem.cornerPoints.upperLeftCorner.x, - contentItem.cornerPoints.upperLeftCorner.y, - contentItem.cornerPoints.upperRightCorner.x, - contentItem.cornerPoints.upperRightCorner.y, - contentItem.cornerPoints.lowerRightCorner.x, - contentItem.cornerPoints.lowerRightCorner.y, - contentItem.cornerPoints.lowerLeftCorner.x, - contentItem.cornerPoints.lowerLeftCorner.y, - contentItem.cornerPoints.upperLeftCorner.x, - contentItem.cornerPoints.upperLeftCorner.y, - ]; - - // SVG item group - const svgItemGroup = svgCanvas - .append('g') - .attr('itemGroupId', itemLabelArray.join(' ')) - .attr('itemId', contentItem.sheetId) - .attr('class', 'item-group'); - - // SVG item link - const svgItemLink = svgItemGroup.append('a').attr('class', 'item-link'); - - // SVG item shape - const svgItemShape = svgItemLink - .append('polygon') - .attr('points', polygoneCornerPointArray.join(' ')) - .attr('class', 'item-shape') - .attr('stroke-width', 2) - .attr('fill', '#eeeeee'); - - // Item label - const svgItemLabel = svgItemLink - .append('text') - .attr('x', centeredXPosition) - .attr('y', centeredYPosition) - .attr('class', 'item-label') - .attr('style', 'font: 12px Source Sans Pro, source-sans-pro, sans-serif') - .attr('dominant-baseline', 'middle') - .attr('text-anchor', 'middle') - .text(itemLabelArray.join(' ')); - - // Rotate the text 180 degrees around its center - if (contentItem.reversed) { - svgItemLabel.attr('transform', `rotate(180, ${centeredXPosition}, ${centeredYPosition})`); - } + // Draw item link label. + this._appendItemLinkLabel(svgItemLink, contentItem); + }); + } + + /** + * Private method: _appendCanvasSheetGroup. + * + * It appends a sheet group to the SVG canvas. + * + * @param {D3Selection} svgCanvas The given SVG canvas selection. + * @param {FolioSvgData} folioSvgData The given calculated folio SVG data. + * @returns {D3Selection} Appends a sheet group to the SVG canvas selection. + */ + private _appendCanvasSheetGroup(svgCanvas: D3Selection, folioSvgData: FolioSvgData): D3Selection { + return this._appendSvgElementWithAttrs(svgCanvas, 'g', { + sheetGroupId: folioSvgData.sheet.folioId, + class: 'sheet-group', + }); + } + + /** + * Private method: _appendItemGroup. + * + * It appends an item group to the sheet group. + * + * @param {D3Selection} svgSheetGroup The given SVG sheet group selection. + * @param {FolioSvgContentItem} contentItem The given calculated folio data. + * @returns {D3Selection} Appends an item group to the sheet group selection. + */ + private _appendItemGroup(svgSheetGroup: D3Selection, contentItem: FolioSvgContentItem): D3Selection { + // Draw item group element. + const itemGroup = this._appendItemGroupElement(svgSheetGroup, contentItem); + + // Apply title when hovering item + this._appendItemGroupTitle(itemGroup, contentItem); + + // Add click event handler + itemGroup.on('click', () => + contentItem.selectable + ? this.ref.selectSvgSheet(contentItem.complexId, contentItem.sheetId) + : this.ref.openModal(contentItem.linkTo) + ); + + return itemGroup; + } + + /** + * Private method: _appendItemGroupElement. + * + * It appends an item group element to the sheet group. + * + * @param {D3Selection} svgSheetGroup The given SVG sheet group selection. + * @param {FolioSvgContentItem} contentItem The given calculated folio data. + * @returns {D3Selection} Appends an item group element to the sheet group selection. + */ + private _appendItemGroupElement(svgSheetGroup: D3Selection, contentItem: FolioSvgContentItem): D3Selection { + return this._appendSvgElementWithAttrs(svgSheetGroup, 'g', { + itemGroupId: contentItem.itemLabel, + itemId: contentItem.sheetId, + class: 'item-group', + stroke: contentItem.selectable ? this._fgColor : this._disabledColor, + fill: contentItem.selectable ? this._fgColor : this._disabledColor, + }); + } + + /** + * Private method: _appendItemGroupTitle. + * + * It appends a title to the item group. + * + * @param {D3Selection} itemGroup The given SVG item group selection. + * @param {FolioSvgContentItem} contentItem The given calculated folio data. + * @returns {D3Selection} Appends a title to the item group selection. + */ + private _appendItemGroupTitle(itemGroup: D3Selection, contentItem: FolioSvgContentItem): D3Selection { + return this._appendSvgElementWithAttrs(itemGroup, 'title', {}).text(contentItem.itemLabel); + } + + /** + * Private method: _appendItemLink. + * + * It appends a link to the item group. + * + * @param {D3Selection} svgItemGroup The given SVG item group selection. + * @returns {D3Selection} Appends a link to the item group selection. + */ + private _appendItemLink(svgItemGroup: D3Selection): D3Selection { + return this._appendSvgElementWithAttrs(svgItemGroup, 'a', { class: 'item-link' }); + } + + /** + * Private method: _appendItemLinkLabel. + * + * It appends a label to the item link. + * + * @param {D3Selection} svgItemLink The given SVG item link selection. + * @param {FolioSvgContentItem} contentItem The given calculated folio data. + * @returns {D3Selection} Appends a label to the item link selection. + */ + private _appendItemLinkLabel(svgItemLink: any, contentItem: FolioSvgContentItem): D3Selection { + const label = this._appendItemLinkLabelTextElement( + svgItemLink, + contentItem.centeredXPosition, + contentItem.centeredYPosition + ); + + this._appendItemLinkLabelTspanElements(label, contentItem); + + // Rotate the label 180 degrees around its center when reversed + if (contentItem.reversed) { + label.attr( + 'transform', + `rotate(${this._itemReversedRotationAngle}, ${contentItem.centeredXPosition}, ${contentItem.centeredYPosition})` + ); + } + + return label; + } - // Apply title when hovering item - svgItemGroup.append('title').text(itemLabelArray.join(' ')); + /** + * Private method: _appendItemLinkLabelTextElement. + * + * It appends a text element to the item link label. + * + * @param {D3Selection} svgItemLink The given SVG item link selection. + * @param {number} centeredXPosition The given centered x position. + * @param {number} centeredYPosition The given centered y position. + * @returns {D3Selection} Appends a text element to the item link selection. + */ + private _appendItemLinkLabelTextElement( + svgItemLink: D3Selection, + centeredXPosition: number, + centeredYPosition: number + ): D3Selection { + const attributes = { + class: 'item-label', + x: centeredXPosition, + y: centeredYPosition, + style: this._itemFontStyle, + }; + attributes['dominant-baseline'] = 'middle'; + attributes['text-anchor'] = 'middle'; + + return this._appendSvgElementWithAttrs(svgItemLink, 'text', attributes); + } - // Add click event handler - if (contentItem.selectable === false) { - svgItemGroup.attr('stroke', 'grey').attr('fill', 'grey'); - svgItemGroup.on('click', () => this.ref.openModal(contentItem.linkTo)); - } else { - svgItemGroup.attr('stroke', fgColor).attr('fill', fgColor); - svgItemGroup.on('click', () => this.ref.selectSvgSheet(contentItem.complexId, contentItem.sheetId)); + /** + * Private method: _appendItemLinkLabelTspanElements. + * + * It appends tspan elements to the item link label. + * + * @param {D3Selection} labelSelection The given label selection. + * @param {FolioSvgContentItem} contentItem The given calculated folio data. + * @returns {void} Appends tspan elements to the label selection. + */ + private _appendItemLinkLabelTspanElements(labelSelection: D3Selection, contentItem: FolioSvgContentItem): void { + contentItem.itemLabelArray.forEach((label, index) => { + if (label !== '') { + const attributes: any = {}; + if (index > 0) { + attributes.x = contentItem.centeredXPosition; + attributes.y = contentItem.centeredYPosition; + attributes.dy = '1.2em'; + attributes['text-anchor'] = 'middle'; + } + + this._appendSvgElementWithAttrs(labelSelection, 'tspan', attributes).text(label); } + }); + } + + /** + * Private method: _appendItemLinkPolygon. + * + * It appends a polygon shape to the item link. + * + * @param {D3Selection} svgItemLink The given SVG item link selection. + * @param {string} polygonCornerPoints The given polygon corner points. + * @returns {D3Selection} Appends a polygon shape to the item link selection. + */ + private _appendItemLinkPolygon(svgItemLink: D3Selection, polygonCornerPoints: string): D3Selection { + const attributes = { + class: 'item-shape', + points: polygonCornerPoints, + fill: this._itemFillColor, + }; + attributes['stroke-width'] = this._itemStrokeWidth; + + return this._appendSvgElementWithAttrs(svgItemLink, 'polygon', attributes); + } - // Add the SVG item group to the SVG sheet group - svgSheetGroup.node().appendChild(svgItemGroup.node()); + /** + * Private method: _appendSheetGroupRectangle. + * + * It appends a rectangle to the sheet group. + * + * @param {D3Selection} svgSheetGroup The given SVG sheet group selection. + * @param {FolioCalculationPoint} upperLeftCorner The given upper left corner point. + * @param {FolioCalculationPoint} lowerRightCorner The given lower right corner point. + * @param {string} bgColor The given background color. + * @returns {D3Selection} Appends a rectangle to the sheet group selection. + */ + private _appendSheetGroupRectangle( + svgSheetGroup: D3Selection, + upperLeftCorner: FolioCalculationPoint, + lowerRightCorner: FolioCalculationPoint + ): D3Selection { + const { x: x1, y: y1 } = upperLeftCorner; + const { x: x2, y: y2 } = lowerRightCorner; + const attributes = { + x: x1, + y: y1, + width: x2 - x1, + height: y2 - y1, + fill: this._sheetFillColor, + stroke: this._bgColor, + }; + attributes['stroke-width'] = this._sheetStrokeWidth; + + return this._appendSvgElementWithAttrs(svgSheetGroup, 'rect', attributes); + } + + /** + * Private method: _appendSheetGroupTitle. + * + * It appends a title to the sheet group. + * + * @param {D3Selection} svgSheetGroup The given SVG sheet group selection. + * @param {string} folioId The given folio id. + * @returns {void} Appends a title to the sheet group selection. + */ + private _appendSheetGroupTitle(svgSheetGroup: D3Selection, folioId: string): void { + this._appendSvgElementWithAttrs(svgSheetGroup, 'title', {}).text(`Bl. ${folioId}`); + } + + /** + * Private method: _appendSystemsGroupLabel. + * + * It appends a label to the systems group. + * + * @param {D3Selection} svgSystemsGroup The given SVG systems group selection. + * @param {FolioSvgData} folioSvgData The given calculated folio SVG data. + * @param {number} systemIndex The given system index. + * @param {string} bgColor The given background color. + * @returns {void} Appends a label to the systems group selection. + */ + private _appendSystemsGroupLabel( + svgSystemsGroup: D3Selection, + folioSvgData: FolioSvgData, + systemIndex: number + ): void { + const { x, y } = folioSvgData.systems.lineLabelArray[systemIndex]; + const systemLabel = systemIndex + 1; + const attributes = { + class: 'system-label', + x: x, + y: y, + fill: this._bgColor, + }; + attributes['dominant-baseline'] = 'hanging'; + + this._appendSvgElementWithAttrs(svgSystemsGroup, 'text', attributes).text(systemLabel); + } + + /** + * Private method: _appendSystemsGroupLines. + * + * It appends system lines to the systems group. + * + * @param {D3Selection} svgSystemsGroup The given SVG systems group selection. + * @param {FolioCalculationLine[]} lineArray The given line array. + * @param {string} bgColor The given background color. + * @returns {void} Appends system lines to the systems group selection. + */ + private _appendSystemsGroupLines(svgSystemsGroup: D3Selection, lineArray: FolioCalculationLine[]): void { + lineArray.forEach(line => { + const { x: x1, y: y1 } = line.startPoint; + const { x: x2, y: y2 } = line.endPoint; + const attributes = { + class: 'system-line', + x1: x1, + y1: y1, + x2: x2, + y2: y2, + stroke: this._bgColor, + }; + attributes['stroke-width'] = this._systemsLineStrokeWidth; + + this._appendSvgElementWithAttrs(svgSystemsGroup, 'line', attributes); }); } + + /** + * Private method: _appendSvgElementWithAttrs. + * + * It appends an SVG element with attributes to a parent element. + * + * @param {D3Selection} parent The given parent selection. + * @param {string} type The given type of SVG element. + * @param {Record} attributes The given attributes. + * @returns {D3Selection} The appended SVG element with attributes. + */ + private _appendSvgElementWithAttrs = ( + parent: D3Selection, + type: string, + attributes: Record + ): D3Selection => { + const selection = parent.append(type); + Object.keys(attributes).forEach(key => { + selection.attr(key, attributes[key]); + }); + return selection; + }; } diff --git a/src/app/views/edition-view/models/folio-calculation.model.ts b/src/app/views/edition-view/models/folio-calculation.model.ts index fe43bcbe1f..c0612f8202 100644 --- a/src/app/views/edition-view/models/folio-calculation.model.ts +++ b/src/app/views/edition-view/models/folio-calculation.model.ts @@ -176,6 +176,16 @@ export class FolioCalculationContentItem { */ height: number; + /** + * The centered X position of the content item (number). + */ + centeredXPosition: number; + + /** + * The centered y position of the content item (number). + */ + centeredYPosition: number; + /** * The system range of the content item (number). */ @@ -221,6 +231,11 @@ export class FolioCalculationContentItem { */ previous: FolioCalculationContentItemCache; + /** + * The corner points of the content item polygon (string). + */ + polygonCornerPoints: string; + /** * The label for the id of the edition complex of the content item (string). */ @@ -231,6 +246,16 @@ export class FolioCalculationContentItem { */ sheetId: string; + /** + * The array of label strings for the content item (string[]). + */ + itemLabelArray: string[]; + + /** + * The label for the content item (string). + */ + itemLabel: string; + /** * The label for the sigle of the content item (string). */ @@ -549,7 +574,7 @@ export class FolioCalculation { * @param {FolioContent[]} contents The given folio contents. * @returns {FolioCalculationContentItem[]} The array of the calculated content items. */ - private _calculateContentArray(contents: FolioContent[]): FolioCalculationContentItem[] { + private _calculateContentArray(contents: FolioContent[] = []): FolioCalculationContentItem[] { // Init const calculatedContentItems: FolioCalculationContentItem[] = []; @@ -580,7 +605,7 @@ export class FolioCalculation { return; } // Iterate over sections - content.sections.forEach((section: FolioSection, sectionIndex: number) => { + content.sections.forEach((section: FolioSection, _sectionIndex: number) => { // Set section cache this._setContentItemSectionCache(calculatedContentItem, section); @@ -591,15 +616,55 @@ export class FolioCalculation { calculatedContentItem.current.cornerPoints = new FolioCalculationContentItemCornerPoints( calculatedContentItem ); + calculatedContentItem.polygonCornerPoints = [ + calculatedContentItem.current.cornerPoints.upperLeftCorner.x, + calculatedContentItem.current.cornerPoints.upperLeftCorner.y, + calculatedContentItem.current.cornerPoints.upperRightCorner.x, + calculatedContentItem.current.cornerPoints.upperRightCorner.y, + calculatedContentItem.current.cornerPoints.lowerRightCorner.x, + calculatedContentItem.current.cornerPoints.lowerRightCorner.y, + calculatedContentItem.current.cornerPoints.lowerLeftCorner.x, + calculatedContentItem.current.cornerPoints.lowerLeftCorner.y, + calculatedContentItem.current.cornerPoints.upperLeftCorner.x, + calculatedContentItem.current.cornerPoints.upperLeftCorner.y, + ].join(' '); calculatedContentItem.complexId = content.complexId; calculatedContentItem.sheetId = content.sheetId; - calculatedContentItem.sigle = content.sigle; - calculatedContentItem.sigleAddendum = content.sigleAddendum; calculatedContentItem.selectable = content.selectable ?? true; calculatedContentItem.reversed = content.reversed ?? false; calculatedContentItem.linkTo = content.linkTo || ''; + calculatedContentItem.sigle = content.sigle; + calculatedContentItem.sigleAddendum = content.sigleAddendum; + calculatedContentItem.itemLabelArray = [ + calculatedContentItem.sigle, + calculatedContentItem.sigleAddendum ? ` ${calculatedContentItem.sigleAddendum}` : '', + ]; + calculatedContentItem.itemLabel = calculatedContentItem.itemLabelArray.join(' '); + const itemLabelOffset = + calculatedContentItem.itemLabelArray.length > 1 && + calculatedContentItem.itemLabelArray[1] !== '' + ? 5 + : 0; + + const halfWidth = calculatedContentItem.width / 2; + const halfHeight = calculatedContentItem.height / 2; + + calculatedContentItem.centeredXPosition = + calculatedContentItem.current.cornerPoints.upperLeftCorner.x + halfWidth; + calculatedContentItem.centeredYPosition = + calculatedContentItem.current.cornerPoints.upperLeftCorner.y + halfHeight - itemLabelOffset; + + if (calculatedContentItem.reversed) { + calculatedContentItem.centeredXPosition = + calculatedContentItem.current.cornerPoints.lowerRightCorner.x - halfWidth; + calculatedContentItem.centeredYPosition = + calculatedContentItem.current.cornerPoints.lowerRightCorner.y - + halfHeight + + itemLabelOffset; + } + calculatedContentItems.push(calculatedContentItem); }); } else { diff --git a/src/app/views/edition-view/models/folio-svg-data.model.ts b/src/app/views/edition-view/models/folio-svg-data.model.ts index f38e46cb37..a2bdfae79a 100644 --- a/src/app/views/edition-view/models/folio-svg-data.model.ts +++ b/src/app/views/edition-view/models/folio-svg-data.model.ts @@ -1,7 +1,6 @@ import { FolioCalculation, FolioCalculationContentItem, - FolioCalculationContentItemCornerPoints, FolioCalculationLine, FolioCalculationPoint, FolioCalculationSheet, @@ -98,7 +97,7 @@ class FolioSvgSystems { * * Not exposed, only called internally from {@link FolioSvgData}. */ -class FolioSvgContentItem { +export class FolioSvgContentItem { /** * The id for the label of a content item edition complex (string). */ @@ -135,30 +134,29 @@ class FolioSvgContentItem { linkTo: string; /** - * The upper left corner of a content item (FolioCalculationPoint). - * - * It contains the calculated upper left corner point (in px) - * to draw the svg of a content item of a folio. + * The array of labels of a content item (string[]). */ - upperLeftCorner: FolioCalculationPoint; + itemLabelArray: string[]; /** - * The width of a content item (number). + * The label of a content item (string). */ - width: number; + itemLabel: string; /** - * The height of a content item (number). + * The corner points of a content item polygon (string). */ - height: number; + polygonCornerPoints: string; /** - * The corner points of a content item (FolioCalculationContentItemCornerPoints). - * - * It contains all corner points of a content item (in px) - * to draw the svg of the content item of a folio. + * The centered X position of a content item (number). + */ + centeredXPosition: number; + + /** + * The centered y position of a content item (number). */ - cornerPoints: FolioCalculationContentItemCornerPoints; + centeredYPosition: number; /** * Constructor of the FolioSvgContentItem class. @@ -170,16 +168,15 @@ class FolioSvgContentItem { constructor(calculatedContentItem: FolioCalculationContentItem) { this.complexId = calculatedContentItem.complexId; this.sheetId = calculatedContentItem.sheetId; - this.sigle = calculatedContentItem.sigle; - this.sigleAddendum = calculatedContentItem.sigleAddendum; this.selectable = calculatedContentItem.selectable; this.reversed = calculatedContentItem.reversed; this.linkTo = calculatedContentItem.linkTo; - this.upperLeftCorner = calculatedContentItem.current.cornerPoints.upperLeftCorner; - this.width = calculatedContentItem.width; - this.height = calculatedContentItem.height; - this.cornerPoints = calculatedContentItem.current.cornerPoints; + this.polygonCornerPoints = calculatedContentItem.polygonCornerPoints; + this.itemLabelArray = calculatedContentItem.itemLabelArray; + this.itemLabel = calculatedContentItem.itemLabel; + this.centeredXPosition = calculatedContentItem.centeredXPosition; + this.centeredYPosition = calculatedContentItem.centeredYPosition; } } diff --git a/src/app/views/edition-view/models/index.ts b/src/app/views/edition-view/models/index.ts index 4ed1cb364f..4ea2ac0f6e 100644 --- a/src/app/views/edition-view/models/index.ts +++ b/src/app/views/edition-view/models/index.ts @@ -18,14 +18,9 @@ import { EditionSvgLinkBox } from './edition-svg-link-box.model'; import { EditionSvgOverlay, EditionSvgOverlayActionTypes, EditionSvgOverlayTypes } from './edition-svg-overlay.model'; import { EditionSvgSheet, EditionSvgSheetList } from './edition-svg-sheet.model'; -import { - FolioCalculation, - FolioCalculationContentItemCornerPoints, - FolioCalculationLine, - FolioCalculationPoint, -} from './folio-calculation.model'; +import { FolioCalculation, FolioCalculationLine, FolioCalculationPoint } from './folio-calculation.model'; import { FolioSettings } from './folio-settings.model'; -import { FolioSvgData } from './folio-svg-data.model'; +import { FolioSvgContentItem, FolioSvgData } from './folio-svg-data.model'; import { Folio, FolioContent, FolioConvolute, FolioConvoluteList, FolioFormat, FolioSection } from './folio.model'; import { Graph, GraphList, GraphRDFData, GraphSparqlQuery } from './graph.model'; @@ -65,7 +60,6 @@ export { EditionTitleStatement, Folio, FolioCalculation, - FolioCalculationContentItemCornerPoints, FolioCalculationLine, FolioCalculationPoint, FolioContent, @@ -74,6 +68,7 @@ export { FolioFormat, FolioSection, FolioSettings, + FolioSvgContentItem, FolioSvgData, Graph, GraphList, From c2f0f60c4624c57c1f102cb04f229714259314b7 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Sun, 3 Mar 2024 00:59:06 +0100 Subject: [PATCH 43/63] test(edition): add tests for FolioService --- .../folio.service.spec.ts | 1716 ++++++++++++++++- src/testing/mock-data/mockEditionData.ts | 2 +- 2 files changed, 1713 insertions(+), 5 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts index 0cf9c38897..9d46a49673 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts @@ -1,15 +1,1723 @@ -import { inject, TestBed } from '@angular/core/testing'; +import { TestBed } from '@angular/core/testing'; +import * as D3_SELECTION from 'd3-selection'; + +import Spy = jasmine.Spy; + +import { cleanStylesFromDOM } from '@testing/clean-up-helper'; +import { expectSpyCall, expectToBe, expectToEqual } from '@testing/expect-helper'; +import { mockEditionData } from '@testing/mock-data'; + +import { + Folio, + FolioCalculation, + FolioCalculationLine, + FolioCalculationPoint, + FolioConvolute, + FolioSettings, + FolioSvgContentItem, + FolioSvgData, + ViewBox, +} from '@awg-app/views/edition-view/models'; import { FolioService } from './folio.service'; describe('FolioService', () => { + let folioService: FolioService; + let refMock: any; + + let addFolioSheetToSvgCanvasSpy: Spy; + let addFolioSystemsToSvgCanvasSpy: Spy; + let addFolioItemsToSvgCanvasSpy: Spy; + let appendCanvasSheetGroupSpy: Spy; + let appendItemGroupSpy: Spy; + let appendItemGroupElementSpy: Spy; + let appendItemGroupTitleSpy: Spy; + let appendItemLinkSpy: Spy; + let appendItemLinkLabelSpy: Spy; + let appendItemLinkLabelTextElementSpy: Spy; + let appendItemLinkLabelTspanElementsSpy: Spy; + let appendItemLinkPolygonSpy: Spy; + let appendSheetGroupTitleSpy: Spy; + let appendSheetGroupRectangleSpy: Spy; + let appendSystemsGroupLabelSpy: Spy; + let appendSystemsGroupLinesSpy: Spy; + let appendSvgElementWithAttrsSpy: Spy; + + let expectedConvolutes: FolioConvolute[]; + let expectedFolioSettings: FolioSettings; + let expectedFolioSvgData: FolioSvgData; + + let expectedUpperLeftCorner: FolioCalculationPoint; + let expectedLowerRightCorner: FolioCalculationPoint; + + let expectedBgColor: string; + let expectedDisabledColor: string; + let expectedFgColor: string; + let expectedItemFillColor: string; + let expectedSheetFillColor: string; + + let expectedItemFontStyle: string; + let expectedItemOffsetCorrection: number; + let expectedItemReversedRotationAngle: number; + let expectedItemStrokeWidth: number; + let expectedSheetStrokeWidth: number; + let expectedSystemsLineStrokeWidth: number; + beforeEach(() => { TestBed.configureTestingModule({ providers: [FolioService], }); + + // Inject services and http client handler + folioService = TestBed.inject(FolioService); + refMock = { + selectSvgSheet: jasmine.createSpy('selectSvgSheet'), + openModal: jasmine.createSpy('openModal'), + }; + + // Test data + expectedConvolutes = JSON.parse(JSON.stringify(mockEditionData.mockFolioConvoluteData.convolutes)); + expectedFolioSettings = { + factor: 1.5, + formatX: 175, + formatY: 270, + initialOffsetX: 5, + initialOffsetY: 5, + numberOfFolios: 0, + }; + expectedBgColor = '#a3a3a3'; + expectedDisabledColor = 'grey'; + expectedFgColor = 'orange'; + expectedItemFillColor = '#eeeeee'; + expectedSheetFillColor = 'white'; + + expectedItemOffsetCorrection = 4; + expectedItemFontStyle = '11px Source Sans Pro, source-sans-pro, sans-serif'; + expectedItemReversedRotationAngle = 180; + + expectedItemStrokeWidth = 2; + expectedSheetStrokeWidth = 1; + expectedSystemsLineStrokeWidth = 0.7; + + expectedUpperLeftCorner = new FolioCalculationPoint(10, 20); + expectedLowerRightCorner = new FolioCalculationPoint(30, 40); + + expectedFolioSvgData = new FolioSvgData( + new FolioCalculation(expectedFolioSettings, expectedConvolutes[0].folios[0], expectedItemOffsetCorrection) + ); + + // Spies on service functions + // `.and.callThrough` will track the spy down the nested describes, see + // https://jasmine.github.io/2.0/introduction.html#section-Spies:_%3Ccode%3Eand.callThrough%3C/code%3E + addFolioSheetToSvgCanvasSpy = spyOn(folioService as any, '_addFolioSheetToSvgCanvas').and.callThrough(); + addFolioSystemsToSvgCanvasSpy = spyOn(folioService as any, '_addFolioSystemsToSvgCanvas').and.callThrough(); + addFolioItemsToSvgCanvasSpy = spyOn(folioService as any, '_addFolioItemsToSvgCanvas').and.callThrough(); + appendCanvasSheetGroupSpy = spyOn(folioService as any, '_appendCanvasSheetGroup').and.callThrough(); + appendItemGroupSpy = spyOn(folioService as any, '_appendItemGroup').and.callThrough(); + appendItemGroupElementSpy = spyOn(folioService as any, '_appendItemGroupElement').and.callThrough(); + appendItemGroupTitleSpy = spyOn(folioService as any, '_appendItemGroupTitle').and.callThrough(); + appendItemLinkSpy = spyOn(folioService as any, '_appendItemLink').and.callThrough(); + appendItemLinkLabelSpy = spyOn(folioService as any, '_appendItemLinkLabel').and.callThrough(); + appendItemLinkLabelTextElementSpy = spyOn( + folioService as any, + '_appendItemLinkLabelTextElement' + ).and.callThrough(); + appendItemLinkLabelTspanElementsSpy = spyOn( + folioService as any, + '_appendItemLinkLabelTspanElements' + ).and.callThrough(); + appendItemLinkPolygonSpy = spyOn(folioService as any, '_appendItemLinkPolygon').and.callThrough(); + appendSheetGroupTitleSpy = spyOn(folioService as any, '_appendSheetGroupTitle').and.callThrough(); + appendSheetGroupRectangleSpy = spyOn(folioService as any, '_appendSheetGroupRectangle').and.callThrough(); + appendSystemsGroupLabelSpy = spyOn(folioService as any, '_appendSystemsGroupLabel').and.callThrough(); + appendSystemsGroupLinesSpy = spyOn(folioService as any, '_appendSystemsGroupLines').and.callThrough(); + appendSvgElementWithAttrsSpy = spyOn(folioService as any, '_appendSvgElementWithAttrs').and.callThrough(); + }); + + afterAll(() => { + cleanStylesFromDOM(); + }); + + it('... should inject', () => { + expect(folioService).toBeTruthy(); + }); + + describe('default values', () => { + it('... should have `_bgColor`', () => { + expectToBe((folioService as any)._bgColor, expectedBgColor); + }); + + it('... should have `_disabledColor`', () => { + expectToBe((folioService as any)._disabledColor, expectedDisabledColor); + }); + + it('... should have `_fgColor`', () => { + expectToBe((folioService as any)._fgColor, expectedFgColor); + }); + + it('... should have `_itemFillColor`', () => { + expectToBe((folioService as any)._itemFillColor, expectedItemFillColor); + }); + + it('... should have `_sheetFillColor`', () => { + expectToBe((folioService as any)._sheetFillColor, expectedSheetFillColor); + }); + + it('... should have `_itemFontStyle`', () => { + expectToBe((folioService as any)._itemFontStyle, expectedItemFontStyle); + }); + + it('... should have `_itemOffsetCorrection`', () => { + expectToBe((folioService as any)._itemOffsetCorrection, expectedItemOffsetCorrection); + }); + + it('... should have `_itemReversedRotationAngle`', () => { + expectToBe((folioService as any)._itemReversedRotationAngle, expectedItemReversedRotationAngle); + }); + + it('... should have `_itemStrokeWidth`', () => { + expectToBe((folioService as any)._itemStrokeWidth, expectedItemStrokeWidth); + }); + + it('... should have `_sheetStrokeWidth`', () => { + expectToBe((folioService as any)._sheetStrokeWidth, expectedSheetStrokeWidth); + }); + + it('... should have `_systemsLineStrokeWidth`', () => { + expectToBe((folioService as any)._systemsLineStrokeWidth, expectedSystemsLineStrokeWidth); + }); + }); + + describe('#getFolioSvgData', () => { + beforeEach(() => { + // Add custom equality tester to ignore functions + jasmine.addCustomEqualityTester((first, second) => { + if (typeof first === 'function' && typeof second === 'function') { + return true; + } + return undefined; + }); + }); + + it('... should have a method `getFolioSvgData`', () => { + expect(folioService.getFolioSvgData).toBeDefined(); + }); + + it('... should return an instance of FolioSvgData object', () => { + // Create mock FolioSettings and Folio objects + const folioSettings: FolioSettings = new FolioSettings(); + const folio: Folio = new Folio(); + + // Call the method with the mock objects + const result = folioService.getFolioSvgData(folioSettings, folio); + + // Check if the result is a FolioSvgData object + expect(result).toBeInstanceOf(FolioSvgData); + }); + + it('... should create a new FolioCalculation object with the correct parameters', () => { + // Create mock FolioSettings and Folio objects + const folioSettings: FolioSettings = expectedFolioSettings; + const folio: Folio = expectedConvolutes[0].folios[0]; + + const result = folioService.getFolioSvgData(folioSettings, folio); + + expectToEqual(result, expectedFolioSvgData); + }); + + it('... should create a new FolioCalculation object when itemOffsetCorrection is undefined', () => { + // Create mock FolioSettings and Folio objects + const folioSettings: FolioSettings = expectedFolioSettings; + const folio: Folio = expectedConvolutes[0].folios[0]; + + const expectedFolioSvgDataWithoutOffset = new FolioSvgData(new FolioCalculation(folioSettings, folio, 0)); + + (folioService as any)._itemOffsetCorrection = undefined; + + const result = folioService.getFolioSvgData(folioSettings, folio); + + expectToEqual(result, expectedFolioSvgDataWithoutOffset); + }); + }); + + describe('#addViewBoxToSvgCanvas', () => { + it('... should have a method `addViewBoxToSvgCanvas`', () => { + expect(folioService.addViewBoxToSvgCanvas).toBeDefined(); + }); + + describe('... when called', () => { + let svgCanvas: D3_SELECTION.Selection; + let vb: ViewBox; + + beforeEach(() => { + svgCanvas = D3_SELECTION.create('svg'); + vb = new ViewBox(100, 100); + + folioService.addViewBoxToSvgCanvas(svgCanvas, vb); + }); + + it('... should set the `viewBox` attribute of the svg canvas', () => { + expectToEqual(svgCanvas.attr('viewBox'), vb.viewBox); + }); + + it('... should set the `width` attribute of the svg canvas', () => { + expectToEqual(svgCanvas.attr('width'), vb.svgWidth); + }); + + it('... should set the `height` attribute of the svg canvas', () => { + expectToEqual(svgCanvas.attr('height'), vb.svgHeight); + }); + + it('... should set the `version` attribute of the svg canvas', () => { + expectToEqual(svgCanvas.attr('version'), '1.1'); + }); + + it('... should set the `xmlns` attribute of the svg canvas', () => { + expectToEqual(svgCanvas.attr('xmlns'), 'https://www.w3.org/2000/svg'); + }); + + it('... should set the `xlink` attribute of the svg canvas', () => { + expectToEqual(svgCanvas.attr('xlink'), 'https://www.w3.org/1999/xlink'); + }); + + it('... should set the `preserveAspectRatio` attribute of the svg canvas', () => { + expectToEqual(svgCanvas.attr('preserveAspectRatio'), 'xMinYMin meet'); + }); + + it('... should only have specified attributes', () => { + const expectedAttributes = [ + 'viewBox', + 'width', + 'height', + 'version', + 'xmlns', + 'xlink', + 'preserveAspectRatio', + ]; + const actualAttributes = Array.from((svgCanvas.node() as Element).attributes).map(attr => attr.name); + + expectToBe((svgCanvas.node() as Element).attributes.length, 7); + expectToEqual(actualAttributes, expectedAttributes); + }); + }); + }); + + describe('#addFolioToSvgCanvas', () => { + it('... should have a method `addFolioToSvgCanvas`', () => { + expect(folioService.addFolioToSvgCanvas).toBeDefined(); + }); + + describe('... when called', () => { + let svgCanvas: D3_SELECTION.Selection; + let svgSheetGroup: D3_SELECTION.Selection; + let ref: any; + + beforeEach(() => { + svgCanvas = D3_SELECTION.create('svg'); + ref = refMock; + + folioService.addFolioToSvgCanvas(svgCanvas, expectedFolioSvgData, ref); + + svgSheetGroup = svgCanvas.select('g.sheet-group'); + }); + + it('should set the ref variable', () => { + expect(folioService.ref).toBe(ref); + }); + + it('... should trigger `_appendCanvasSheetGroup` method', () => { + expectSpyCall(appendCanvasSheetGroupSpy, 1, [svgCanvas, expectedFolioSvgData]); + }); + + it('should append one SVG sheet group to the svg canvas', () => { + expect(svgSheetGroup).toBeDefined(); + expect(svgSheetGroup.size()).toBe(1); + }); + + it('... should trigger `_addFolioSheetToSvgCanvas` method', () => { + expectSpyCall(addFolioSheetToSvgCanvasSpy, 1, [svgSheetGroup, expectedFolioSvgData]); + }); + + it('... should trigger `_addFolioSystemsToSvgCanvas` method with correct parameters', () => { + expectSpyCall(addFolioSystemsToSvgCanvasSpy, 1, [svgSheetGroup, expectedFolioSvgData]); + }); + + it('... should trigger `_addFolioItemsToSvgCanvas` method with correct parameters', () => { + expectSpyCall(addFolioItemsToSvgCanvasSpy, 1, [svgSheetGroup, expectedFolioSvgData]); + }); + }); }); - it('... should create', inject([FolioService], (service: FolioService) => { - expect(service).toBeTruthy(); - })); + describe('#_addFolioSheetToSvgCanvas', () => { + let svgSheetGroup: D3_SELECTION.Selection; + + beforeEach(() => { + svgSheetGroup = D3_SELECTION.create('g'); + + (folioService as any)._addFolioSheetToSvgCanvas(svgSheetGroup, expectedFolioSvgData); + }); + + it('... should have a method `_addFolioSheetToSvgCanvas`', () => { + expect((folioService as any)._addFolioSheetToSvgCanvas).toBeDefined(); + }); + + it('... should trigger `_appendSheetGroupTitle` with correct arguments', () => { + expectSpyCall(appendSheetGroupTitleSpy, 1, [svgSheetGroup, expectedFolioSvgData.sheet.folioId]); + }); + + it('... should trigger `_appendSheetGroupRectangle` with correct arguments', () => { + expectSpyCall(appendSheetGroupRectangleSpy, 1, [ + svgSheetGroup, + expectedFolioSvgData.sheet.upperLeftCorner, + expectedFolioSvgData.sheet.lowerRightCorner, + ]); + }); + + it('... should append a title element with correct text content to the svg sheet group', () => { + expect(svgSheetGroup).toBeDefined(); + + expect(svgSheetGroup.select('title')).toBeDefined(); + expectToBe(svgSheetGroup.selectAll('title').size(), 1); + expectToBe(svgSheetGroup.select('title').text(), `Bl. ${expectedFolioSvgData.sheet.folioId}`); + }); + + it('... should append a rect element with correct attributes to the svg sheet group', () => { + expect(svgSheetGroup).toBeDefined(); + + const rectElement = svgSheetGroup.select('rect'); + + expect(rectElement).toBeDefined(); + expectToBe(rectElement.attr('x'), String(expectedFolioSvgData.sheet.upperLeftCorner.x)); + expectToBe(rectElement.attr('y'), String(expectedFolioSvgData.sheet.upperLeftCorner.y)); + expectToBe( + rectElement.attr('width'), + String(expectedFolioSvgData.sheet.lowerRightCorner.x - expectedFolioSvgData.sheet.upperLeftCorner.x) + ); + expectToBe( + rectElement.attr('height'), + String(expectedFolioSvgData.sheet.lowerRightCorner.y - expectedFolioSvgData.sheet.upperLeftCorner.y) + ); + expectToBe(rectElement.attr('fill'), expectedSheetFillColor); + expectToBe(rectElement.attr('stroke'), expectedBgColor); + expectToBe(rectElement.attr('stroke-width'), String(expectedSheetStrokeWidth)); + expectToBe((rectElement.node() as Element).attributes.length, 7); + }); + }); + + describe('#_addFolioSystemsToSvgCanvas', () => { + it('... should have a method `_addFolioSystemsToSvgCanvas`', () => { + expect((folioService as any)._addFolioSystemsToSvgCanvas).toBeDefined(); + }); + + describe('... when called', () => { + let svgSheetGroup: D3_SELECTION.Selection; + + beforeEach(() => { + svgSheetGroup = D3_SELECTION.create('g'); + + (folioService as any)._addFolioSystemsToSvgCanvas(svgSheetGroup, expectedFolioSvgData); + }); + + afterEach(() => { + svgSheetGroup.remove(); + }); + + it('... should append a systems group and a system line group to the SVG sheet group for each system', () => { + const systemCount = expectedFolioSvgData.systems.lineArrays.length; + + expectToBe(svgSheetGroup.selectAll('.systems-group').size(), systemCount); + expectToBe(svgSheetGroup.selectAll('.system-line-group').size(), systemCount); + }); + + it('... should trigger `_appendSystemsGroupLabel` for each system', () => { + const systemIndex = expectedFolioSvgData.systems.lineLabelArray.length - 1; + + const systemsGroup = svgSheetGroup + .append('g') + .attr('systemsGroupId', systemIndex + 1) + .attr('class', 'systems-group'); + systemsGroup + .append('g') + .attr('systemLineGroupId', systemIndex + 1) + .attr('class', 'system-line-group'); + + expectToBe(appendSystemsGroupLabelSpy.calls.count(), systemIndex + 1); + expectSpyCall(appendSystemsGroupLabelSpy, systemIndex + 1, [ + svgSheetGroup.select(`[systemsGroupId="${systemIndex + 1}"]`), + expectedFolioSvgData, + systemIndex, + ]); + }); + + it('... should trigger `_appendSystemsGroupLines` for each system', () => { + const systemIndex = expectedFolioSvgData.systems.lineLabelArray.length - 1; + + svgSheetGroup + .append('g') + .attr('systemLineGroupId', systemIndex + 1) + .attr('class', 'system-line-group'); + + expectToBe(appendSystemsGroupLinesSpy.calls.count(), systemIndex + 1); + expectSpyCall(appendSystemsGroupLinesSpy, systemIndex + 1, [ + svgSheetGroup.select(`[systemLineGroupId="${systemIndex + 1}"]`), + expectedFolioSvgData.systems.lineArrays.at(-1), + ]); + }); + + it('... should append a text element with correct text content to each systems group', () => { + const systemsGroups = svgSheetGroup.selectAll('.systems-group').nodes(); + + systemsGroups.forEach((group, i) => { + const systemsGroup = D3_SELECTION.select(group); + const textElement = systemsGroup.select('text'); + + expectToBe(textElement.empty(), false); + expectToBe(textElement.text(), String(i + 1)); + }); + }); + + it('... should add correct attributes to each text element of the systems groups', () => { + const systemsGroups = svgSheetGroup.selectAll('.systems-group').nodes(); + + systemsGroups.forEach((group, i) => { + const systemsGroup = D3_SELECTION.select(group); + const textElement = systemsGroup.select('text'); + const expectedLabel = expectedFolioSvgData.systems.lineLabelArray[i]; + + expectToBe(textElement.attr('class'), 'system-label'); + expectToBe(textElement.attr('x'), String(expectedLabel.x)); + expectToBe(textElement.attr('y'), String(expectedLabel.y)); + expectToBe(textElement.attr('dominant-baseline'), 'hanging'); + expectToBe(textElement.attr('fill'), expectedBgColor); + expectToBe((textElement.node() as Element).attributes.length, 5); + }); + }); + + it('... should append as many line elements as items in lineArray to each system line group', () => { + const systemLineGroups = svgSheetGroup.selectAll('.system-line-group').nodes(); + + systemLineGroups.forEach((group, i) => { + const systemLineGroup = D3_SELECTION.select(group); + + expectToBe( + systemLineGroup.selectAll('line').size(), + expectedFolioSvgData.systems.lineArrays[i].length + ); + }); + }); + + it('... should add correct attributes to each line element of the system line groups', () => { + const systemLineGroups = svgSheetGroup.selectAll('.system-line-group').nodes(); + + systemLineGroups.forEach((group, i) => { + const systemLineGroup = D3_SELECTION.select(group); + const lineElements = systemLineGroup.selectAll('line').nodes(); + + lineElements.forEach((lineNode, j) => { + const lineElement = D3_SELECTION.select(lineNode); + const expectedLine = expectedFolioSvgData.systems.lineArrays[i][j]; + + expectToBe(lineElement.attr('class'), 'system-line'); + expectToBe(lineElement.attr('x1'), String(expectedLine.startPoint.x)); + expectToBe(lineElement.attr('y1'), String(expectedLine.startPoint.y)); + expectToBe(lineElement.attr('x2'), String(expectedLine.endPoint.x)); + expectToBe(lineElement.attr('y2'), String(expectedLine.endPoint.y)); + expectToBe(lineElement.attr('stroke'), expectedBgColor); + expectToBe(lineElement.attr('stroke-width'), String(expectedSystemsLineStrokeWidth)); + expectToBe((lineElement.node() as Element).attributes.length, 7); + }); + }); + }); + }); + }); + + describe('#_addFolioItemsToSvgCanvas', () => { + it('... should have a method `_addFolioItemsToSvgCanvas`', () => { + expect((folioService as any)._addFolioItemsToSvgCanvas).toBeDefined(); + }); + + describe('... when called', () => { + let svgSheetGroup: D3_SELECTION.Selection; + + beforeEach(() => { + svgSheetGroup = D3_SELECTION.create('g'); + + (folioService as any)._addFolioItemsToSvgCanvas(svgSheetGroup, expectedFolioSvgData); + }); + + afterEach(() => { + svgSheetGroup.remove(); + }); + + it('... should not do anything if there are no content items', () => { + const expectedCount = expectedFolioSvgData.contentItemsArray.length; + + const folioSvgDataWithEmptyContent: FolioSvgData = { + ...expectedFolioSvgData, + contentItemsArray: [null], + }; + const emptySvgSheetGroup = D3_SELECTION.create('g'); + + (folioService as any)._addFolioItemsToSvgCanvas(emptySvgSheetGroup, folioSvgDataWithEmptyContent); + + expectToBe(emptySvgSheetGroup.selectAll('g.item-group').size(), 0); + expectSpyCall(appendItemGroupSpy, expectedCount); + expectSpyCall(appendItemLinkSpy, expectedCount); + expectSpyCall(appendItemLinkLabelSpy, expectedCount); + expectSpyCall(appendItemLinkPolygonSpy, expectedCount); + }); + + it('... should trigger `_appendItemGroup` for each item', () => { + expectSpyCall(appendItemGroupSpy, expectedFolioSvgData.contentItemsArray.length); + }); + + it('... should append one item group to the SVG sheet group for each item', () => { + const itemGroups = svgSheetGroup.selectAll('g.item-group'); + expectToBe(itemGroups.size(), expectedFolioSvgData.contentItemsArray.length); + }); + + it('... should trigger `_appendItemLink` for each item group', () => { + expectSpyCall(appendItemLinkSpy, expectedFolioSvgData.contentItemsArray.length); + + const itemGroups = svgSheetGroup.selectAll('g.item-group').nodes(); + + expectedFolioSvgData.contentItemsArray.forEach((_contentItem, i) => { + const itemGroup = D3_SELECTION.select(itemGroups[i]); + const callArgs = appendItemLinkSpy.calls.argsFor(i); + + expectToEqual(callArgs, [itemGroup]); + }); + }); + + it('... should append one link element to each item group', () => { + const itemGroups = svgSheetGroup.selectAll('g.item-group').nodes(); + + itemGroups.forEach((itemGroup, i) => { + const group = D3_SELECTION.select(itemGroup); + const itemLink = group.select('a'); + + expect(itemLink).toBeDefined(); + expectToBe(group.selectAll('a').size(), 1); + }); + }); + + it('... should trigger `_appendItemLinkPolygon` for each item link', () => { + expectSpyCall(appendItemLinkPolygonSpy, expectedFolioSvgData.contentItemsArray.length); + + const itemGroups = svgSheetGroup.selectAll('g.item-group').nodes(); + + expectedFolioSvgData.contentItemsArray.forEach((_contentItem, i) => { + const itemGroup = D3_SELECTION.select(itemGroups[i]); + const itemLink = itemGroup.select('a'); + const callArgs = appendItemLinkPolygonSpy.calls.argsFor(i); + + expectToEqual(callArgs, [itemLink, expectedFolioSvgData.contentItemsArray[i].polygonCornerPoints]); + }); + }); + + it('... should append a polygon element to each item link', () => { + const itemGroups = svgSheetGroup.selectAll('g.item-group').nodes(); + + itemGroups.forEach((itemGroup, i) => { + const group = D3_SELECTION.select(itemGroup); + const itemLink = group.select('a'); + const polygonElement = itemLink.select('polygon'); + + expect(polygonElement).toBeDefined(); + expectToBe(itemLink.selectAll('polygon').size(), 1); + }); + }); + + it('... should trigger `_appendItemLinkLabel` for each item link', () => { + expectSpyCall(appendItemLinkLabelSpy, expectedFolioSvgData.contentItemsArray.length); + + const itemGroups = svgSheetGroup.selectAll('g.item-group').nodes(); + + expectedFolioSvgData.contentItemsArray.forEach((_contentItem, i) => { + const itemGroup = D3_SELECTION.select(itemGroups[i]); + const itemLink = itemGroup.select('a'); + const callArgs = appendItemLinkLabelSpy.calls.argsFor(i); + + expectToEqual(callArgs, [itemLink, expectedFolioSvgData.contentItemsArray[i]]); + }); + }); + + it('... should append a text label with tspans to each item link', () => { + const itemGroups = svgSheetGroup.selectAll('g.item-group').nodes(); + + itemGroups.forEach((itemGroup, i) => { + const group = D3_SELECTION.select(itemGroup); + const itemLink = group.select('a'); + const textElement = itemLink.select('text'); + + expect(textElement).toBeDefined(); + expectToBe(itemLink.selectAll('text').size(), 1); + + const tspans = textElement.selectAll('tspan'); + const expectedLabels = expectedFolioSvgData.contentItemsArray[i].itemLabelArray; + + expect(tspans).toBeDefined(); + expectToBe(tspans.size(), expectedLabels.length); + + tspans.nodes().forEach((tspanNode, tspanIndex) => { + const tspanText = D3_SELECTION.select(tspanNode).text(); + expectToBe(tspanText, expectedLabels[tspanIndex]); + }); + }); + }); + }); + }); + + describe('#_appendCanvasSheetGroup', () => { + it('... should have a method `_appendCanvasSheetGroup`', () => { + expect((folioService as any)._appendCanvasSheetGroup).toBeDefined(); + }); + + describe('... when called', () => { + let svgCanvas: D3_SELECTION.Selection; + + beforeEach(() => { + svgCanvas = D3_SELECTION.create('svg'); + + (folioService as any)._appendCanvasSheetGroup(svgCanvas, expectedFolioSvgData); + }); + + it('... should trigger `_appendSvgElementWithAttrs` with correct arguments', () => { + expectSpyCall(appendSvgElementWithAttrsSpy, 1, [ + svgCanvas, + 'g', + { + sheetGroupId: expectedFolioSvgData.sheet.folioId, + class: 'sheet-group', + }, + ]); + }); + + it('... should append one sheet group to the svg canvas', () => { + const sheetGroup = svgCanvas.select('g.sheet-group'); + + expect(sheetGroup).toBeDefined(); + expect(sheetGroup.size()).toBe(1); + }); + + it('... should set the `sheetGroupId` attribute of the sheet group', () => { + const sheetGroup = svgCanvas.select('g.sheet-group'); + + expectToBe(sheetGroup.attr('sheetGroupId'), expectedFolioSvgData.sheet.folioId); + }); + + it('... should set the `class` attribute of the sheet group', () => { + const sheetGroup = svgCanvas.select('g.sheet-group'); + + expectToBe(sheetGroup.attr('class'), 'sheet-group'); + }); + + it('... should only have specified attributes', () => { + const expectedAttributes = ['sheetGroupId', 'class']; + const actualAttributes = Array.from( + (svgCanvas.select('g.sheet-group').node() as Element).attributes + ).map(attr => attr.name); + + expectToBe((svgCanvas.select('g.sheet-group').node() as Element).attributes.length, 2); + expectToEqual(actualAttributes, expectedAttributes); + }); + }); + }); + + describe('#_appendItemGroup', () => { + it('... should have a method `_appendItemGroup`', () => { + expect((folioService as any)._appendItemGroup).toBeDefined(); + }); + + describe('... when called', () => { + let svgSheetGroup: D3_SELECTION.Selection; + let expectedContentItem: FolioSvgContentItem; + + beforeEach(() => { + svgSheetGroup = D3_SELECTION.create('g'); + + expectedContentItem = expectedFolioSvgData.contentItemsArray[0]; + + (folioService as any)._appendItemGroup(svgSheetGroup, expectedContentItem); + }); + + afterEach(() => { + svgSheetGroup.remove(); + }); + + it('... should trigger `_appendItemGroupElement` with correct arguments', () => { + expectSpyCall(appendItemGroupElementSpy, 1, [svgSheetGroup, expectedContentItem]); + }); + + it('... should trigger `_appendItemGroupTitle` with correct arguments', () => { + const itemGroup = svgSheetGroup.select('g.item-group'); + + expectSpyCall(appendItemGroupTitleSpy, 1, [itemGroup, expectedContentItem]); + }); + + it('... should trigger the referenced `selectSvgSheet` method when the item is selectable and clicked', () => { + const itemGroup = svgSheetGroup.select('g.item-group'); + expectedContentItem.selectable = true; + + folioService.ref = refMock; + + // Dispatch a click event manually + (itemGroup.node() as Element).dispatchEvent(new Event('click')); + + expectSpyCall(refMock.selectSvgSheet, 1, [expectedContentItem.complexId, expectedContentItem.sheetId]); + }); + + it('... should trigger the referenced `openModal` method when the item is not selectable and clicked', () => { + const itemGroup = svgSheetGroup.select('g.item-group'); + expectedContentItem.selectable = false; + + folioService.ref = refMock; + + // Dispatch a click event manually + (itemGroup.node() as Element).dispatchEvent(new Event('click')); + + expectSpyCall(refMock.openModal, 1, expectedContentItem.linkTo); + }); + }); + }); + + describe('#_appendItemGroupElement', () => { + it('... should have a method `_appendItemGroupElement`', () => { + expect((folioService as any)._appendItemGroupElement).toBeDefined(); + }); + + describe('... when called', () => { + let svgSheetGroup: D3_SELECTION.Selection; + let itemGroup: D3_SELECTION.Selection; + let expectedContentItem: FolioSvgContentItem; + + beforeEach(() => { + svgSheetGroup = D3_SELECTION.create('g'); + + expectedContentItem = expectedFolioSvgData.contentItemsArray[0]; + + itemGroup = (folioService as any)._appendItemGroupElement(svgSheetGroup, expectedContentItem); + }); + + afterEach(() => { + svgSheetGroup.remove(); + }); + + it('... should trigger `_appendSvgElementWithAttrs` with correct arguments', () => { + expectSpyCall(appendSvgElementWithAttrsSpy, 1, [ + svgSheetGroup, + 'g', + { + itemGroupId: expectedContentItem.itemLabel, + itemId: expectedContentItem.sheetId, + class: 'item-group', + stroke: expectedFgColor, + fill: expectedFgColor, + }, + ]); + }); + + it('... should append one group element to the SVG sheet group', () => { + expect(itemGroup).toBeDefined(); + expectToBe(svgSheetGroup.selectAll('g').size(), 1); + }); + + it('... should set the `itemGroupId` attribute of the group element', () => { + expectToBe(itemGroup.attr('itemGroupId'), expectedContentItem.itemLabel); + }); + + it('... should set the `itemId` attribute of the group element', () => { + expectToBe(itemGroup.attr('itemId'), expectedContentItem.sheetId); + }); + + it('... should set the `class` attribute of the group element', () => { + expectToBe(itemGroup.attr('class'), 'item-group'); + }); + + it('... should set the correct `stroke` attribute of the group element (if selectable)', () => { + expectToBe(itemGroup.attr('stroke'), expectedFgColor); + }); + + it('... should set the correct `stroke` attribute of the group element (if not selectable)', () => { + expectedContentItem.selectable = false; + + itemGroup = (folioService as any)._appendItemGroupElement(svgSheetGroup, expectedContentItem); + + expectToBe(itemGroup.attr('stroke'), expectedDisabledColor); + }); + + it('... should set the correct `fill` attribute of the group element (if selectable)', () => { + expectToBe(itemGroup.attr('fill'), expectedFgColor); + }); + + it('... should set the correct `fill` attribute of the group element (if not selectable)', () => { + expectedContentItem.selectable = false; + + itemGroup = (folioService as any)._appendItemGroupElement(svgSheetGroup, expectedContentItem); + + expectToBe(itemGroup.attr('fill'), expectedDisabledColor); + }); + + it('... should only have specified attribute', () => { + const expectedAttributes = ['itemGroupId', 'itemId', 'class', 'stroke', 'fill'].map(attr => + attr.toLowerCase() + ); + const actualAttributes = Array.from((itemGroup.node() as Element).attributes).map(attr => attr.name); + + expectToBe((itemGroup.node() as Element).attributes.length, 5); + expectToEqual(actualAttributes, expectedAttributes); + }); + }); + }); + + describe('#_appendItemGroupTitle', () => { + it('... should have a method `_appendItemGroupTitle`', () => { + expect((folioService as any)._appendItemGroupTitle).toBeDefined(); + }); + + describe('... when called', () => { + let itemGroup: D3_SELECTION.Selection; + let expectedContentItem: FolioSvgContentItem; + + beforeEach(() => { + // Create a new SVG group for testing + const svg = D3_SELECTION.create('svg'); + itemGroup = svg.append('g'); + + expectedContentItem = expectedFolioSvgData.contentItemsArray[0]; + + (folioService as any)._appendItemGroupTitle(itemGroup, expectedContentItem); + }); + + afterEach(() => { + D3_SELECTION.select('svg').remove(); + }); + + it('... should trigger `_appendSvgElementWithAttrs` with correct arguments', () => { + expectSpyCall(appendSvgElementWithAttrsSpy, 1, [itemGroup, 'title', {}]); + }); + + it('... should append a title element to the SVG group', () => { + const titleElement = itemGroup.select('title'); + + expect(titleElement).toBeDefined(); + expectToBe(itemGroup.selectAll('title').size(), 1); + }); + + it('... should set the text content of the title element', () => { + const titleElement = itemGroup.select('title'); + + expectToBe(titleElement.text(), expectedContentItem.itemLabel); + }); + + it('... should not have any attributes', () => { + const titleElement = itemGroup.select('title'); + + const expectedAttributes = []; + const actualAttributes = Array.from((titleElement.node() as Element).attributes).map(attr => attr.name); + + expectToBe((titleElement.node() as Element).attributes.length, 0); + expectToEqual(actualAttributes, expectedAttributes); + }); + }); + }); + + describe('#_appendItemLink', () => { + it('... should have a method `_appendItemLink`', () => { + expect((folioService as any)._appendItemLink).toBeDefined(); + }); + + describe('... when called', () => { + let itemGroup: D3_SELECTION.Selection; + + beforeEach(() => { + // Create a new SVG group for testing + const svg = D3_SELECTION.create('svg'); + itemGroup = svg.append('g'); + + (folioService as any)._appendItemLink(itemGroup); + }); + + afterEach(() => { + D3_SELECTION.select('svg').remove(); + }); + + it('... should trigger `_appendSvgElementWithAttrs` with correct arguments', () => { + expectSpyCall(appendSvgElementWithAttrsSpy, 1, [itemGroup, 'a', { class: 'item-link' }]); + }); + + it('... should append one link element to the SVG group', () => { + const linkElement = itemGroup.select('a'); + + expect(linkElement).toBeDefined(); + expectToBe(itemGroup.selectAll('a').size(), 1); + }); + + it('... should set the `class` attribute of the link element', () => { + const linkElement = itemGroup.select('a'); + + expectToBe(linkElement.attr('class'), 'item-link'); + }); + + it('... should only have specified attribute', () => { + const linkElement = itemGroup.select('a'); + + const expectedAttributes = ['class'].map(attr => attr.toLowerCase()); + const actualAttributes = Array.from((linkElement.node() as Element).attributes).map(attr => attr.name); + + expectToBe((linkElement.node() as Element).attributes.length, 1); + expectToEqual(actualAttributes, expectedAttributes); + }); + }); + }); + + describe('#_appendItemLinkLabel', () => { + it('... should have a method `_appendItemLinkLabel`', () => { + expect((folioService as any)._appendItemLinkLabel).toBeDefined(); + }); + + describe('... when called', () => { + let itemLink: D3_SELECTION.Selection; + let expectedContentItem: FolioSvgContentItem; + + beforeEach(() => { + // Create a new SVG group for testing + const itemGroup = D3_SELECTION.create('g'); + itemLink = itemGroup.append('svg:a'); + + expectedContentItem = expectedFolioSvgData.contentItemsArray[0]; + + (folioService as any)._appendItemLinkLabel(itemLink, expectedContentItem); + }); + + afterEach(() => { + D3_SELECTION.select('g').remove(); + }); + + it('... should trigger `_appendItemLinkLabelTextElement` with correct arguments', () => { + expectSpyCall(appendItemLinkLabelTextElementSpy, 1, [ + itemLink, + expectedContentItem.centeredXPosition, + expectedContentItem.centeredYPosition, + ]); + }); + + it('... should trigger `_appendItemLinkLabelTspanElements` with correct arguments', () => { + const itemLinkLabel = itemLink.select('text'); + + expectSpyCall(appendItemLinkLabelTspanElementsSpy, 1, [itemLinkLabel, expectedContentItem]); + }); + + it('... should rotate the label if reversed is true', () => { + const itemLinkReversed = D3_SELECTION.create('svg:a'); + expectedContentItem.reversed = true; + + (folioService as any)._appendItemLinkLabel(itemLinkReversed, expectedContentItem); + + const itemLinkLabel = itemLinkReversed.select('text'); + + expectToBe( + itemLinkLabel.attr('transform'), + `rotate(${expectedItemReversedRotationAngle}, ${expectedContentItem.centeredXPosition}, ${expectedContentItem.centeredYPosition})` + ); + }); + }); + }); + + describe('#_appendItemLinkLabelTextElement', () => { + it('... should have a method `_appendItemLinkLabelTextElement`', () => { + expect((folioService as any)._appendItemLinkLabelTextElement).toBeDefined(); + }); + + describe('... when called', () => { + let itemLink: D3_SELECTION.Selection; + let expectedContentItem: FolioSvgContentItem; + + beforeEach(() => { + // Create a new SVG group for testing + const itemGroup = D3_SELECTION.create('g'); + itemLink = itemGroup.append('svg:a'); + + expectedContentItem = expectedFolioSvgData.contentItemsArray[0]; + + (folioService as any)._appendItemLinkLabelTextElement( + itemLink, + expectedContentItem.centeredXPosition, + expectedContentItem.centeredYPosition + ); + }); + + afterEach(() => { + D3_SELECTION.select('g').remove(); + }); + + it('... should trigger `_appendSvgElementWithAttrs` with correct arguments', () => { + const attributes = { + class: 'item-label', + x: expectedContentItem.centeredXPosition, + y: expectedContentItem.centeredYPosition, + style: expectedItemFontStyle, + }; + attributes['dominant-baseline'] = 'middle'; + attributes['text-anchor'] = 'middle'; + + expectSpyCall(appendSvgElementWithAttrsSpy, 1, [itemLink, 'text', attributes]); + }); + + it('... should append one text element to the SVG item link', () => { + const textElement = itemLink.select('text'); + + expect(textElement).toBeDefined(); + expectToBe(itemLink.selectAll('text').size(), 1); + }); + + it('... should set the `class` attribute of the text element', () => { + const textElement = itemLink.select('text'); + + expectToBe(textElement.attr('class'), 'item-label'); + }); + + it('... should set the `x` attribute of the text element', () => { + const textElement = itemLink.select('text'); + + expectToBe(textElement.attr('x'), String(expectedContentItem.centeredXPosition)); + }); + + it('... should set the `y` attribute of the text element', () => { + const textElement = itemLink.select('text'); + + expectToBe(textElement.attr('y'), String(expectedContentItem.centeredYPosition)); + }); + + it('... should set the `style` attribute of the text element', () => { + const textElement = itemLink.select('text'); + + expectToBe(textElement.attr('style'), expectedItemFontStyle); + }); + + it('... should set the `dominant-baseline` attribute of the text element', () => { + const textElement = itemLink.select('text'); + + expectToBe(textElement.attr('dominant-baseline'), 'middle'); + }); + + it('... should set the `text-anchor` attribute of the text element', () => { + const textElement = itemLink.select('text'); + + expectToBe(textElement.attr('text-anchor'), 'middle'); + }); + + it('... should only have specified attributes', () => { + const textElement = itemLink.select('text'); + + const expectedAttributes = ['class', 'x', 'y', 'style', 'dominant-baseline', 'text-anchor'].map(attr => + attr.toLowerCase() + ); + const actualAttributes = Array.from((textElement.node() as Element).attributes).map(attr => attr.name); + + expectToBe((textElement.node() as Element).attributes.length, 6); + expectToEqual(actualAttributes, expectedAttributes); + }); + }); + }); + + describe('#_appendItemLinkLabelTspanElements', () => { + it('... should have a method `_appendItemLinkLabelTspanElements`', () => { + expect((folioService as any)._appendItemLinkLabelTspanElements).toBeDefined(); + }); + + describe('... when called', () => { + let labelSelection: D3_SELECTION.Selection; + let expectedContentItem: FolioSvgContentItem; + + beforeEach(() => { + // Create a new SVG group for testing + const itemGroup = D3_SELECTION.create('g'); + labelSelection = itemGroup.append('text'); + + expectedContentItem = expectedFolioSvgData.contentItemsArray[0]; + + (folioService as any)._appendItemLinkLabelTspanElements(labelSelection, expectedContentItem); + }); + + afterEach(() => { + D3_SELECTION.select('g').remove(); + }); + + it('... should trigger `_appendSvgElementWithAttrs` with correct arguments for each item in the itemLabelArray', () => { + const labelArrayLength = expectedContentItem.itemLabelArray.length; + const commonArgs = [labelSelection, 'tspan']; + const additionalAttributes = { + x: expectedContentItem.centeredXPosition, + y: expectedContentItem.centeredYPosition, + dy: '1.2em', + }; + additionalAttributes['text-anchor'] = 'middle'; + + expectToBe(appendSvgElementWithAttrsSpy.calls.count(), labelArrayLength); + + expectedContentItem.itemLabelArray.forEach((_label, i) => { + const callArgs = appendSvgElementWithAttrsSpy.calls.argsFor(i); + const expectedArgs = [...commonArgs, i === 0 ? {} : additionalAttributes]; + + expect(callArgs.length).toBe(expectedArgs.length); + expect(callArgs).toEqual(expectedArgs); + }); + }); + + it('... should append a tspan element for each item in the itemLabelArray', () => { + const labelArrayLength = expectedContentItem.itemLabelArray.length; + + expectToBe(labelSelection.selectAll('tspan').size(), labelArrayLength); + }); + + it('... should append correct text content for each tspan element of an item', () => { + const tspanElements = labelSelection.selectAll('tspan').nodes(); + + expectedContentItem.itemLabelArray.forEach((label, i) => { + const tspanElement = D3_SELECTION.select(tspanElements[i]); + + expectToBe(tspanElement.text(), label); + }); + }); + + it('... should set the `x` attribute of the second tspan element', () => { + const tspanElement = labelSelection.selectAll('tspan').nodes()[1]; + + expectToBe(D3_SELECTION.select(tspanElement).attr('x'), String(expectedContentItem.centeredXPosition)); + }); + + it('... should set the `y` attribute of the second tspan element', () => { + const tspanElement = labelSelection.selectAll('tspan').nodes()[1]; + + expectToBe(D3_SELECTION.select(tspanElement).attr('y'), String(expectedContentItem.centeredYPosition)); + }); + + it('... should set the `dy` attribute of the second tspan element', () => { + const tspanElement = labelSelection.selectAll('tspan').nodes()[1]; + + expectToBe(D3_SELECTION.select(tspanElement).attr('dy'), '1.2em'); + }); + + it('... should set the `text-anchor` attribute of the second tspan element', () => { + const tspanElement = labelSelection.selectAll('tspan').nodes()[1]; + + expectToBe(D3_SELECTION.select(tspanElement).attr('text-anchor'), 'middle'); + }); + + it('... should have no attributes on first tspan element', () => { + const tspanElement = labelSelection.selectAll('tspan').nodes()[0]; + + expectToBe((tspanElement as Element).attributes.length, 0); + }); + + it('... should only have specified attributes on second tspan element', () => { + const tspanElement = labelSelection.selectAll('tspan').nodes()[1]; + + const expectedAttributes = ['x', 'y', 'dy', 'text-anchor'].map(attr => attr.toLowerCase()); + const actualAttributes = Array.from((tspanElement as Element).attributes).map(attr => attr.name); + + expectToBe((tspanElement as Element).attributes.length, 4); + expectToEqual(actualAttributes, expectedAttributes); + }); + + it('... should not append a second tspan element if the itemLabelArray has only one item', () => { + const itemLinkLabel = D3_SELECTION.create('text'); + expectedContentItem.itemLabelArray = ['test']; + + (folioService as any)._appendItemLinkLabelTspanElements(itemLinkLabel, expectedContentItem); + + expectToBe(itemLinkLabel.selectAll('tspan').size(), 1); + }); + + it('... should not append a tspan element if the itemLabelArray is empty', () => { + const itemLinkLabel = D3_SELECTION.create('text'); + expectedContentItem.itemLabelArray = []; + + (folioService as any)._appendItemLinkLabelTspanElements(itemLinkLabel, expectedContentItem); + + expectToBe(itemLinkLabel.selectAll('tspan').size(), 0); + }); + }); + }); + + describe('#_appendItemLinkPolygon', () => { + it('... should have a method `_appendItemLinkPolygon`', () => { + expect((folioService as any)._appendItemLinkPolygon).toBeDefined(); + }); + + describe('... when called', () => { + let itemLink: D3_SELECTION.Selection; + let expectedContentItem: FolioSvgContentItem; + + beforeEach(() => { + // Create a new SVG group for testing + const itemGroup = D3_SELECTION.create('g'); + itemLink = itemGroup.append('svg:a'); + + expectedContentItem = expectedFolioSvgData.contentItemsArray[0]; + + (folioService as any)._appendItemLinkPolygon(itemLink, expectedContentItem.polygonCornerPoints); + }); + + afterEach(() => { + D3_SELECTION.select('g').remove(); + }); + + it('... should trigger `_appendSvgElementWithAttrs` with correct arguments', () => { + const attributes = { + class: 'item-shape', + points: expectedContentItem.polygonCornerPoints, + fill: expectedItemFillColor, + }; + attributes['stroke-width'] = expectedItemStrokeWidth; + + expectSpyCall(appendSvgElementWithAttrsSpy, 1, [itemLink, 'polygon', attributes]); + }); + + it('... should append one polygon element to the SVG item link', () => { + const polygonElement = itemLink.select('polygon'); + + expect(polygonElement).toBeDefined(); + expectToBe(itemLink.selectAll('polygon').size(), 1); + }); + + it('... should set the `class` attribute of the polygon element', () => { + const polygonElement = itemLink.select('polygon'); + + expectToBe(polygonElement.attr('class'), 'item-shape'); + }); + + it('... should set the `points` attribute of the polygon element', () => { + const polygonElement = itemLink.select('polygon'); + + expectToBe(polygonElement.attr('points'), expectedContentItem.polygonCornerPoints); + }); + + it('... should set the `fill` attribute of the polygon element', () => { + const polygonElement = itemLink.select('polygon'); + + expectToBe(polygonElement.attr('fill'), expectedItemFillColor); + }); + + it('... should set the `stroke-width` attribute of the polygon element', () => { + const polygonElement = itemLink.select('polygon'); + + expectToBe(polygonElement.attr('stroke-width'), String(expectedItemStrokeWidth)); + }); + + it('... should only have specified attributes', () => { + const polygonElement = itemLink.select('polygon'); + + const expectedAttributes = ['class', 'points', 'fill', 'stroke-width'].map(attr => attr.toLowerCase()); + const actualAttributes = Array.from((polygonElement.node() as Element).attributes).map( + attr => attr.name + ); + + expectToBe((polygonElement.node() as Element).attributes.length, 4); + expectToEqual(actualAttributes, expectedAttributes); + }); + }); + }); + + describe('#_appendSheetGroupRectangle', () => { + it('... should have a method `_appendSheetGroupRectangle`', () => { + expect((folioService as any)._appendSheetGroupRectangle).toBeDefined(); + }); + + describe('... when called', () => { + let svgSheetGroup: D3_SELECTION.Selection; + let rectElement: D3_SELECTION.Selection; + + beforeEach(() => { + svgSheetGroup = D3_SELECTION.create('g'); + + (folioService as any)._appendSheetGroupRectangle( + svgSheetGroup, + expectedUpperLeftCorner, + expectedLowerRightCorner + ); + + rectElement = svgSheetGroup.select('rect'); + }); + + afterEach(() => { + D3_SELECTION.select('g').remove(); + }); + + it('... should trigger `_appendSvgElementWithAttrs` with correct arguments', () => { + const attributes = { + x: expectedUpperLeftCorner.x, + y: expectedUpperLeftCorner.y, + width: expectedLowerRightCorner.x - expectedUpperLeftCorner.x, + height: expectedLowerRightCorner.y - expectedUpperLeftCorner.y, + fill: expectedSheetFillColor, + stroke: expectedBgColor, + }; + attributes['stroke-width'] = expectedSheetStrokeWidth; + + expectSpyCall(appendSvgElementWithAttrsSpy, 1, [svgSheetGroup, 'rect', attributes]); + }); + + it('... should add a rect element to the svgSheetGroup', () => { + expect(rectElement).toBeDefined(); + expectToBe(rectElement.empty(), false); + }); + + it('... should set the `x` attribute of the `rect` element', () => { + expectToBe(rectElement.attr('x'), String(expectedUpperLeftCorner.x)); + }); + + it('... should set the `y` attribute of the `rect` element', () => { + expectToBe(rectElement.attr('y'), String(expectedUpperLeftCorner.y)); + }); + + it('... should set the `width` attribute of the `rect` element', () => { + expectToBe(rectElement.attr('width'), String(expectedLowerRightCorner.x - expectedUpperLeftCorner.x)); + }); + + it('... should set the `height` attribute of the `rect` element', () => { + expectToBe(rectElement.attr('height'), String(expectedLowerRightCorner.y - expectedUpperLeftCorner.y)); + }); + + it('... should set the `fill` attribute of the `rect` element', () => { + expectToBe(rectElement.attr('fill'), expectedSheetFillColor); + }); + + it('... should set the `stroke` attribute of the `rect` element', () => { + expectToBe(rectElement.attr('stroke'), expectedBgColor); + }); + + it('... should set the `stroke-width` attribute of the `rect` element', () => { + expectToBe(rectElement.attr('stroke-width'), String(expectedSheetStrokeWidth)); + }); + + it('... should only have specified attributes', () => { + const expectedAttributes = ['x', 'y', 'width', 'height', 'fill', 'stroke', 'stroke-width'].map(attr => + attr.toLowerCase() + ); + const actualAttributes = Array.from((rectElement.node() as Element).attributes).map(attr => attr.name); + + expectToBe((rectElement.node() as Element).attributes.length, 7); + expectToEqual(actualAttributes, expectedAttributes); + }); + }); + }); + + describe('#_appendSheetGroupTitle', () => { + it('... should have a method `_appendSheetGroupTitle`', () => { + expect((folioService as any)._appendSheetGroupTitle).toBeDefined(); + }); + + describe('... when called', () => { + let svgSheetGroup: D3_SELECTION.Selection; + let titleElement: D3_SELECTION.Selection; + let folioId: string; + + beforeEach(() => { + svgSheetGroup = D3_SELECTION.create('g'); + folioId = 'test-folio'; + + (folioService as any)._appendSheetGroupTitle(svgSheetGroup, folioId); + + titleElement = svgSheetGroup.select('title'); + }); + + afterEach(() => { + D3_SELECTION.select('g').remove(); + }); + + it('... should trigger `_appendSvgElementWithAttrs` with no arguments', () => { + expectSpyCall(appendSvgElementWithAttrsSpy, 1, [svgSheetGroup, 'title', {}]); + }); + + it('... should add a title element to the svgSheetGroup', () => { + expect(titleElement).toBeDefined(); + }); + + it('... should have no attributes on title element', () => { + const expectedAttributes = [].map(attr => attr.toLowerCase()); + const actualAttributes = Array.from((titleElement.node() as Element).attributes).map(attr => attr.name); + + expectToBe((titleElement.node() as Element).attributes.length, 0); + expectToEqual(actualAttributes, expectedAttributes); + }); + + it('... should set the text content of the title element', () => { + expectToBe(titleElement.empty(), false); + expectToBe(titleElement.text(), `Bl. ${folioId}`); + }); + }); + }); + + describe('#_appendSystemsGroupLabel', () => { + it('... should have a method `_appendSystemsGroupLabel`', () => { + expect((folioService as any)._appendSystemsGroupLabel).toBeDefined(); + }); + + describe('... when called', () => { + let systemsGroup: D3_SELECTION.Selection; + let systemIndex: number; + + beforeEach(() => { + // Create a new SVG group for testing + const svg = D3_SELECTION.create('svg'); + systemsGroup = svg.append('g'); + + systemIndex = 0; + + (folioService as any)._appendSystemsGroupLabel(systemsGroup, expectedFolioSvgData, systemIndex); + }); + + afterEach(() => { + D3_SELECTION.select('svg').remove(); + }); + + it('... should trigger `_appendSvgElementWithAttrs` with correct arguments', () => { + const attributes = { + class: 'system-label', + x: expectedFolioSvgData.systems.lineLabelArray[systemIndex].x, + y: expectedFolioSvgData.systems.lineLabelArray[systemIndex].y, + fill: expectedBgColor, + }; + attributes['dominant-baseline'] = 'hanging'; + + expectSpyCall(appendSvgElementWithAttrsSpy, 1, [systemsGroup, 'text', attributes]); + }); + + it('... should append a text element to the SVG group', () => { + expect(systemsGroup.select('text')).toBeDefined(); + expectToBe(systemsGroup.selectAll('text').size(), 1); + }); + + it('... should set the text content of the text element', () => { + const textElement = systemsGroup.select('text'); + + expectToBe(textElement.empty(), false); + expectToBe(textElement.text(), String(systemIndex + 1)); + }); + + it('... should set the `class` attribute of the text element', () => { + const textElement = systemsGroup.select('text'); + + expectToBe(textElement.attr('class'), 'system-label'); + }); + + it('... should set the `x` attribute of the text element', () => { + const textElement = systemsGroup.select('text'); + const { x } = expectedFolioSvgData.systems.lineLabelArray[systemIndex]; + + expectToBe(textElement.attr('x'), String(x)); + }); + + it('... should set the `y` attribute of the text element', () => { + const textElement = systemsGroup.select('text'); + const { y } = expectedFolioSvgData.systems.lineLabelArray[systemIndex]; + + expectToBe(textElement.attr('y'), String(y)); + }); + + it('... should set the `dominant-baseline` attribute of the text element', () => { + const textElement = systemsGroup.select('text'); + + expectToBe(textElement.attr('dominant-baseline'), 'hanging'); + }); + + it('... should set the `fill` attribute of the text element', () => { + const textElement = systemsGroup.select('text'); + + expectToBe(textElement.attr('fill'), expectedBgColor); + }); + + it('... should only have specified attributes', () => { + const textElement = systemsGroup.select('text'); + + const expectedAttributes = ['class', 'x', 'y', 'fill', 'dominant-baseline'].map(attr => + attr.toLowerCase() + ); + const actualAttributes = Array.from((textElement.node() as Element).attributes).map(attr => attr.name); + + expectToBe((textElement.node() as Element).attributes.length, 5); + expectToEqual(actualAttributes, expectedAttributes); + }); + }); + }); + + describe('#_appendSystemsGroupLines', () => { + it('... should have a method `_appendSystemsGroupLines`', () => { + expect((folioService as any)._appendSystemsGroupLines).toBeDefined(); + }); + + describe('... when called', () => { + let systemsGroup: D3_SELECTION.Selection; + let lineArray: FolioCalculationLine[]; + + beforeEach(() => { + // Create a new SVG group for testing + const svg = D3_SELECTION.create('svg'); + systemsGroup = svg.append('g'); + + lineArray = expectedFolioSvgData.systems.lineArrays[0]; + + (folioService as any)._appendSystemsGroupLines(systemsGroup, lineArray); + }); + + afterEach(() => { + D3_SELECTION.select('svg').remove(); + }); + + it('... should trigger `_appendSvgElementWithAttrs` for each line with correct arguments', () => { + const attributes = { + class: 'system-line', + x1: lineArray.at(-1).startPoint.x, + y1: lineArray.at(-1).startPoint.y, + x2: lineArray.at(-1).endPoint.x, + y2: lineArray.at(-1).endPoint.y, + stroke: expectedBgColor, + }; + attributes['stroke-width'] = expectedSystemsLineStrokeWidth; + + expectSpyCall(appendSvgElementWithAttrsSpy, lineArray.length, [systemsGroup, 'line', attributes]); + }); + + it('... should append a line element to the SVG group for each line in the array', () => { + expectToBe(systemsGroup.selectAll('line').size(), lineArray.length); + }); + + it('... should set the `class` attribute for each line element', () => { + lineArray.forEach((_line, index) => { + const lineElement = systemsGroup.selectAll('line').nodes()[index]; + + expectToBe(D3_SELECTION.select(lineElement).attr('class'), 'system-line'); + }); + }); + + it('... should set the `x1` attribute for each line element', () => { + lineArray.forEach((line, index) => { + const lineElement = systemsGroup.selectAll('line').nodes()[index]; + + expectToBe(D3_SELECTION.select(lineElement).attr('x1'), String(line.startPoint.x)); + }); + }); + + it('... should set the `y1` attribute for each line element', () => { + lineArray.forEach((line, index) => { + const lineElement = systemsGroup.selectAll('line').nodes()[index]; + + expectToBe(D3_SELECTION.select(lineElement).attr('y1'), String(line.startPoint.y)); + }); + }); + + it('... should set the `x2` attribute for each line element', () => { + lineArray.forEach((line, index) => { + const lineElement = systemsGroup.selectAll('line').nodes()[index]; + + expectToBe(D3_SELECTION.select(lineElement).attr('x2'), String(line.endPoint.x)); + }); + }); + + it('... should set the `y2` attribute for each line element', () => { + lineArray.forEach((line, index) => { + const lineElement = systemsGroup.selectAll('line').nodes()[index]; + + expectToBe(D3_SELECTION.select(lineElement).attr('y2'), String(line.endPoint.y)); + }); + }); + + it('... should set the `stroke` attribute for each line element', () => { + lineArray.forEach((_line, index) => { + const lineElement = systemsGroup.selectAll('line').nodes()[index]; + + expectToBe(D3_SELECTION.select(lineElement).attr('stroke'), expectedBgColor); + }); + }); + + it('... should set the `stroke-width` attribute for each line element', () => { + lineArray.forEach((_line, index) => { + const lineElement = systemsGroup.selectAll('line').nodes()[index]; + + expectToBe( + D3_SELECTION.select(lineElement).attr('stroke-width'), + String(expectedSystemsLineStrokeWidth) + ); + }); + }); + + it('... should only have specified attributes', () => { + lineArray.forEach((_line, index) => { + const lineElement = systemsGroup.select('line'); + + const expectedAttributes = ['class', 'x1', 'y1', 'x2', 'y2', 'stroke', 'stroke-width'].map(attr => + attr.toLowerCase() + ); + const actualAttributes = Array.from((lineElement.node() as Element).attributes).map( + attr => attr.name + ); + + expectToEqual(actualAttributes, expectedAttributes); + }); + }); + }); + }); + + describe('#_appendSvgElementWithAttrs', () => { + it('... should have a method `_appendSvgElementWithAttrs`', () => { + expect((folioService as any)._appendSvgElementWithAttrs).toBeDefined(); + }); + + describe('... when called', () => { + let svgSelection: D3_SELECTION.Selection; + + let type: string; + let attributes: Record; + + beforeEach(() => { + svgSelection = D3_SELECTION.create('svg'); + + // Set up test data + type = 'g'; + attributes = { + testId: 'testValue', + class: 'testClass', + }; + + (folioService as any)._appendSvgElementWithAttrs(svgSelection, type, attributes); + }); + + afterEach(() => { + svgSelection.remove(); + }); + + it('... should append the correct element type to the SVG selection', () => { + expect(svgSelection).toBeDefined(); + expectToBe(svgSelection.empty(), false); + + expect(svgSelection.select('g')).toBeDefined(); + + (folioService as any)._appendSvgElementWithAttrs(svgSelection, 'title', attributes); + + expect(svgSelection.select('title')).toBeDefined(); + + (folioService as any)._appendSvgElementWithAttrs(svgSelection, 'rect', attributes); + + expect(svgSelection.select('rect')).toBeDefined(); + }); + + it('... should set the correct attributes on the appended element', () => { + const group = svgSelection.select('g'); + + Object.entries(attributes).forEach(([attrId, attrValue]) => { + expectToBe(group.attr(attrId), attrValue.toString()); + }); + }); + + it('... should only have given attributes on the appended element', () => { + const group = svgSelection.select('g'); + const expectedAttributes = Object.keys(attributes); + const actualAttributes = Array.from((group.node() as Element).attributes).map(attr => attr.name); + + expectToEqual(actualAttributes, expectedAttributes); + }); + }); + }); }); diff --git a/src/testing/mock-data/mockEditionData.ts b/src/testing/mock-data/mockEditionData.ts index 950dcd9a0c..434cddabf4 100644 --- a/src/testing/mock-data/mockEditionData.ts +++ b/src/testing/mock-data/mockEditionData.ts @@ -32,7 +32,7 @@ export const mockEditionData = { sheetId: 'M_212_Sk1', sigle: 'M 212 Sk1', sigleAddendum: 'T. 1–2, [3–6]', - selectable: false, + selectable: true, linkTo: 'OP12_SOURCE_NOT_AVAILABLE', sectionPartition: 1, sections: [ From b01689bb696d0863c6679da0c0786e7c7ac7d5c2 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Sun, 3 Mar 2024 01:25:15 +0100 Subject: [PATCH 44/63] refactor(edition): rename systemArray --- .../folio.service.spec.ts | 58 +++++++++---------- .../edition-folio-viewer/folio.service.ts | 13 ++--- .../models/folio-calculation.model.ts | 8 +-- .../models/folio-svg-data.model.ts | 8 +-- 4 files changed, 43 insertions(+), 44 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts index 9d46a49673..329673d1cd 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts @@ -423,14 +423,14 @@ describe('FolioService', () => { }); it('... should append a systems group and a system line group to the SVG sheet group for each system', () => { - const systemCount = expectedFolioSvgData.systems.lineArrays.length; + const systemCount = expectedFolioSvgData.systems.systemsArrays.length; expectToBe(svgSheetGroup.selectAll('.systems-group').size(), systemCount); expectToBe(svgSheetGroup.selectAll('.system-line-group').size(), systemCount); }); it('... should trigger `_appendSystemsGroupLabel` for each system', () => { - const systemIndex = expectedFolioSvgData.systems.lineLabelArray.length - 1; + const systemIndex = expectedFolioSvgData.systems.systemsLabelArray.length - 1; const systemsGroup = svgSheetGroup .append('g') @@ -450,7 +450,7 @@ describe('FolioService', () => { }); it('... should trigger `_appendSystemsGroupLines` for each system', () => { - const systemIndex = expectedFolioSvgData.systems.lineLabelArray.length - 1; + const systemIndex = expectedFolioSvgData.systems.systemsLabelArray.length - 1; svgSheetGroup .append('g') @@ -460,7 +460,7 @@ describe('FolioService', () => { expectToBe(appendSystemsGroupLinesSpy.calls.count(), systemIndex + 1); expectSpyCall(appendSystemsGroupLinesSpy, systemIndex + 1, [ svgSheetGroup.select(`[systemLineGroupId="${systemIndex + 1}"]`), - expectedFolioSvgData.systems.lineArrays.at(-1), + expectedFolioSvgData.systems.systemsArrays.at(-1), ]); }); @@ -482,7 +482,7 @@ describe('FolioService', () => { systemsGroups.forEach((group, i) => { const systemsGroup = D3_SELECTION.select(group); const textElement = systemsGroup.select('text'); - const expectedLabel = expectedFolioSvgData.systems.lineLabelArray[i]; + const expectedLabel = expectedFolioSvgData.systems.systemsLabelArray[i]; expectToBe(textElement.attr('class'), 'system-label'); expectToBe(textElement.attr('x'), String(expectedLabel.x)); @@ -493,7 +493,7 @@ describe('FolioService', () => { }); }); - it('... should append as many line elements as items in lineArray to each system line group', () => { + it('... should append as many line elements as items in systemArray to each system line group', () => { const systemLineGroups = svgSheetGroup.selectAll('.system-line-group').nodes(); systemLineGroups.forEach((group, i) => { @@ -501,7 +501,7 @@ describe('FolioService', () => { expectToBe( systemLineGroup.selectAll('line').size(), - expectedFolioSvgData.systems.lineArrays[i].length + expectedFolioSvgData.systems.systemsArrays[i].length ); }); }); @@ -515,7 +515,7 @@ describe('FolioService', () => { lineElements.forEach((lineNode, j) => { const lineElement = D3_SELECTION.select(lineNode); - const expectedLine = expectedFolioSvgData.systems.lineArrays[i][j]; + const expectedLine = expectedFolioSvgData.systems.systemsArrays[i][j]; expectToBe(lineElement.attr('class'), 'system-line'); expectToBe(lineElement.attr('x1'), String(expectedLine.startPoint.x)); @@ -1476,8 +1476,8 @@ describe('FolioService', () => { it('... should trigger `_appendSvgElementWithAttrs` with correct arguments', () => { const attributes = { class: 'system-label', - x: expectedFolioSvgData.systems.lineLabelArray[systemIndex].x, - y: expectedFolioSvgData.systems.lineLabelArray[systemIndex].y, + x: expectedFolioSvgData.systems.systemsLabelArray[systemIndex].x, + y: expectedFolioSvgData.systems.systemsLabelArray[systemIndex].y, fill: expectedBgColor, }; attributes['dominant-baseline'] = 'hanging'; @@ -1505,14 +1505,14 @@ describe('FolioService', () => { it('... should set the `x` attribute of the text element', () => { const textElement = systemsGroup.select('text'); - const { x } = expectedFolioSvgData.systems.lineLabelArray[systemIndex]; + const { x } = expectedFolioSvgData.systems.systemsLabelArray[systemIndex]; expectToBe(textElement.attr('x'), String(x)); }); it('... should set the `y` attribute of the text element', () => { const textElement = systemsGroup.select('text'); - const { y } = expectedFolioSvgData.systems.lineLabelArray[systemIndex]; + const { y } = expectedFolioSvgData.systems.systemsLabelArray[systemIndex]; expectToBe(textElement.attr('y'), String(y)); }); @@ -1550,16 +1550,16 @@ describe('FolioService', () => { describe('... when called', () => { let systemsGroup: D3_SELECTION.Selection; - let lineArray: FolioCalculationLine[]; + let systemArray: FolioCalculationLine[]; beforeEach(() => { // Create a new SVG group for testing const svg = D3_SELECTION.create('svg'); systemsGroup = svg.append('g'); - lineArray = expectedFolioSvgData.systems.lineArrays[0]; + systemArray = expectedFolioSvgData.systems.systemsArrays[0]; - (folioService as any)._appendSystemsGroupLines(systemsGroup, lineArray); + (folioService as any)._appendSystemsGroupLines(systemsGroup, systemArray); }); afterEach(() => { @@ -1569,23 +1569,23 @@ describe('FolioService', () => { it('... should trigger `_appendSvgElementWithAttrs` for each line with correct arguments', () => { const attributes = { class: 'system-line', - x1: lineArray.at(-1).startPoint.x, - y1: lineArray.at(-1).startPoint.y, - x2: lineArray.at(-1).endPoint.x, - y2: lineArray.at(-1).endPoint.y, + x1: systemArray.at(-1).startPoint.x, + y1: systemArray.at(-1).startPoint.y, + x2: systemArray.at(-1).endPoint.x, + y2: systemArray.at(-1).endPoint.y, stroke: expectedBgColor, }; attributes['stroke-width'] = expectedSystemsLineStrokeWidth; - expectSpyCall(appendSvgElementWithAttrsSpy, lineArray.length, [systemsGroup, 'line', attributes]); + expectSpyCall(appendSvgElementWithAttrsSpy, systemArray.length, [systemsGroup, 'line', attributes]); }); it('... should append a line element to the SVG group for each line in the array', () => { - expectToBe(systemsGroup.selectAll('line').size(), lineArray.length); + expectToBe(systemsGroup.selectAll('line').size(), systemArray.length); }); it('... should set the `class` attribute for each line element', () => { - lineArray.forEach((_line, index) => { + systemArray.forEach((_line, index) => { const lineElement = systemsGroup.selectAll('line').nodes()[index]; expectToBe(D3_SELECTION.select(lineElement).attr('class'), 'system-line'); @@ -1593,7 +1593,7 @@ describe('FolioService', () => { }); it('... should set the `x1` attribute for each line element', () => { - lineArray.forEach((line, index) => { + systemArray.forEach((line, index) => { const lineElement = systemsGroup.selectAll('line').nodes()[index]; expectToBe(D3_SELECTION.select(lineElement).attr('x1'), String(line.startPoint.x)); @@ -1601,7 +1601,7 @@ describe('FolioService', () => { }); it('... should set the `y1` attribute for each line element', () => { - lineArray.forEach((line, index) => { + systemArray.forEach((line, index) => { const lineElement = systemsGroup.selectAll('line').nodes()[index]; expectToBe(D3_SELECTION.select(lineElement).attr('y1'), String(line.startPoint.y)); @@ -1609,7 +1609,7 @@ describe('FolioService', () => { }); it('... should set the `x2` attribute for each line element', () => { - lineArray.forEach((line, index) => { + systemArray.forEach((line, index) => { const lineElement = systemsGroup.selectAll('line').nodes()[index]; expectToBe(D3_SELECTION.select(lineElement).attr('x2'), String(line.endPoint.x)); @@ -1617,7 +1617,7 @@ describe('FolioService', () => { }); it('... should set the `y2` attribute for each line element', () => { - lineArray.forEach((line, index) => { + systemArray.forEach((line, index) => { const lineElement = systemsGroup.selectAll('line').nodes()[index]; expectToBe(D3_SELECTION.select(lineElement).attr('y2'), String(line.endPoint.y)); @@ -1625,7 +1625,7 @@ describe('FolioService', () => { }); it('... should set the `stroke` attribute for each line element', () => { - lineArray.forEach((_line, index) => { + systemArray.forEach((_line, index) => { const lineElement = systemsGroup.selectAll('line').nodes()[index]; expectToBe(D3_SELECTION.select(lineElement).attr('stroke'), expectedBgColor); @@ -1633,7 +1633,7 @@ describe('FolioService', () => { }); it('... should set the `stroke-width` attribute for each line element', () => { - lineArray.forEach((_line, index) => { + systemArray.forEach((_line, index) => { const lineElement = systemsGroup.selectAll('line').nodes()[index]; expectToBe( @@ -1644,7 +1644,7 @@ describe('FolioService', () => { }); it('... should only have specified attributes', () => { - lineArray.forEach((_line, index) => { + systemArray.forEach((_line, index) => { const lineElement = systemsGroup.select('line'); const expectedAttributes = ['class', 'x1', 'y1', 'x2', 'y2', 'stroke', 'stroke-width'].map(attr => diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts index 9e0272b0f2..4498ff32e1 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts @@ -207,7 +207,7 @@ export class FolioService { * @returns {void} Adds the systems to the SVG canvas selection. */ private _addFolioSystemsToSvgCanvas(svgSheetGroup: D3Selection, folioSvgData: FolioSvgData): void { - folioSvgData.systems.lineArrays.forEach((lineArray: FolioCalculationLine[], systemIndex: number) => { + folioSvgData.systems.systemsArrays.forEach((systemArray: FolioCalculationLine[], systemIndex: number) => { const svgSystemsGroup = this._appendSvgElementWithAttrs(svgSheetGroup, 'g', { systemsGroupId: systemIndex + 1, class: 'systems-group', @@ -218,7 +218,7 @@ export class FolioService { }); this._appendSystemsGroupLabel(svgSystemsGroup, folioSvgData, systemIndex); - this._appendSystemsGroupLines(svgSystemLineGroup, lineArray); + this._appendSystemsGroupLines(svgSystemLineGroup, systemArray); }); } @@ -501,7 +501,7 @@ export class FolioService { folioSvgData: FolioSvgData, systemIndex: number ): void { - const { x, y } = folioSvgData.systems.lineLabelArray[systemIndex]; + const { x, y } = folioSvgData.systems.systemsLabelArray[systemIndex]; const systemLabel = systemIndex + 1; const attributes = { class: 'system-label', @@ -520,12 +520,11 @@ export class FolioService { * It appends system lines to the systems group. * * @param {D3Selection} svgSystemsGroup The given SVG systems group selection. - * @param {FolioCalculationLine[]} lineArray The given line array. - * @param {string} bgColor The given background color. + * @param {FolioCalculationLine[]} systemArray The given line array. * @returns {void} Appends system lines to the systems group selection. */ - private _appendSystemsGroupLines(svgSystemsGroup: D3Selection, lineArray: FolioCalculationLine[]): void { - lineArray.forEach(line => { + private _appendSystemsGroupLines(svgSystemsGroup: D3Selection, systemArray: FolioCalculationLine[]): void { + systemArray.forEach(line => { const { x: x1, y: y1 } = line.startPoint; const { x: x2, y: y2 } = line.endPoint; const attributes = { diff --git a/src/app/views/edition-view/models/folio-calculation.model.ts b/src/app/views/edition-view/models/folio-calculation.model.ts index c0612f8202..6ef69b497a 100644 --- a/src/app/views/edition-view/models/folio-calculation.model.ts +++ b/src/app/views/edition-view/models/folio-calculation.model.ts @@ -406,12 +406,12 @@ export class FolioCalculationSystems { /** * The optional line label array of the systems (FolioCalculationPoint[]). */ - lineLabelArray?: FolioCalculationPoint[]; + systemsLabelArray?: FolioCalculationPoint[]; /** * The optional array of line arrays of the systems (FolioCalculationLine[][]). */ - lineArrays?: FolioCalculationLine[][]; + systemsArrays?: FolioCalculationLine[][]; } /** @@ -537,7 +537,7 @@ export class FolioCalculation { calculatedSystems.yArray = this._getSystemYArray(calculatedSystems.upperMargin, calculatedSystems.startY); // System lines - calculatedSystems.lineArrays = calculatedSystems.yArray.map(lineArray => + calculatedSystems.systemsArrays = calculatedSystems.yArray.map(lineArray => lineArray.map( line => new FolioCalculationLine( @@ -555,7 +555,7 @@ export class FolioCalculation { // Reduce start values with lineLabelOffsetCorrection to get start positions of numbers // LineArray[0] = first line of a system - calculatedSystems.lineLabelArray = calculatedSystems.yArray.map( + calculatedSystems.systemsLabelArray = calculatedSystems.yArray.map( lineArray => new FolioCalculationPoint( calculatedSystems.labelStartX, diff --git a/src/app/views/edition-view/models/folio-svg-data.model.ts b/src/app/views/edition-view/models/folio-svg-data.model.ts index a2bdfae79a..1688172cc7 100644 --- a/src/app/views/edition-view/models/folio-svg-data.model.ts +++ b/src/app/views/edition-view/models/folio-svg-data.model.ts @@ -66,7 +66,7 @@ class FolioSvgSystems { * It contains all calculated labels and their positions (in px) * to draw the svg of the systems of a folio. */ - lineLabelArray: FolioCalculationPoint[]; + systemsLabelArray: FolioCalculationPoint[]; /** * The array of line arrays of a folio (FolioCalculationLine[][]). @@ -74,7 +74,7 @@ class FolioSvgSystems { * It contains all calculated lines and their positions (in px) * to draw the svg of the systems of a folio. */ - lineArrays: FolioCalculationLine[][]; + systemsArrays: FolioCalculationLine[][]; /** * Constructor of the FolioSvgSystems class. @@ -84,8 +84,8 @@ class FolioSvgSystems { * @param {FolioCalculationSystems} calculatedSystems The given calculated folio systems. */ constructor(calculatedSystems: FolioCalculationSystems) { - this.lineLabelArray = calculatedSystems.lineLabelArray; - this.lineArrays = calculatedSystems.lineArrays; + this.systemsLabelArray = calculatedSystems.systemsLabelArray; + this.systemsArrays = calculatedSystems.systemsArrays; } } From aeab45c1817d74f0584329cc6940229bef3522b2 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Sun, 3 Mar 2024 16:20:00 +0100 Subject: [PATCH 45/63] refactor(edition): rename contentItem -> contentSegment --- .../folio.service.spec.ts | 395 ++++++++++-------- .../edition-folio-viewer/folio.service.ts | 145 ++++--- .../models/folio-calculation.model.ts | 14 +- .../models/folio-svg-data.model.ts | 93 ++--- src/app/views/edition-view/models/index.ts | 4 +- 5 files changed, 354 insertions(+), 297 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts index 329673d1cd..0e156f6e2e 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts @@ -14,7 +14,7 @@ import { FolioCalculationPoint, FolioConvolute, FolioSettings, - FolioSvgContentItem, + FolioSvgContentSegment, FolioSvgData, ViewBox, } from '@awg-app/views/edition-view/models'; @@ -27,16 +27,16 @@ describe('FolioService', () => { let addFolioSheetToSvgCanvasSpy: Spy; let addFolioSystemsToSvgCanvasSpy: Spy; - let addFolioItemsToSvgCanvasSpy: Spy; + let addFolioContentSegmentsToSvgCanvasSpy: Spy; let appendCanvasSheetGroupSpy: Spy; - let appendItemGroupSpy: Spy; - let appendItemGroupElementSpy: Spy; - let appendItemGroupTitleSpy: Spy; - let appendItemLinkSpy: Spy; - let appendItemLinkLabelSpy: Spy; - let appendItemLinkLabelTextElementSpy: Spy; - let appendItemLinkLabelTspanElementsSpy: Spy; - let appendItemLinkPolygonSpy: Spy; + let appendContentSegmentGroupSpy: Spy; + let appendContentSegmentGroupElementSpy: Spy; + let appendContentSegmentGroupTitleSpy: Spy; + let appendContentSegmentLinkSpy: Spy; + let appendContentSegmentLinkLabelSpy: Spy; + let appendContentSegmentLinkLabelTextElementSpy: Spy; + let appendContentSegmentLinkLabelTspanElementsSpy: Spy; + let appendContentSegmentLinkPolygonSpy: Spy; let appendSheetGroupTitleSpy: Spy; let appendSheetGroupRectangleSpy: Spy; let appendSystemsGroupLabelSpy: Spy; @@ -51,15 +51,15 @@ describe('FolioService', () => { let expectedLowerRightCorner: FolioCalculationPoint; let expectedBgColor: string; + let expectedContentSegmentFillColor: string; let expectedDisabledColor: string; let expectedFgColor: string; - let expectedItemFillColor: string; let expectedSheetFillColor: string; - let expectedItemFontStyle: string; - let expectedItemOffsetCorrection: number; - let expectedItemReversedRotationAngle: number; - let expectedItemStrokeWidth: number; + let expectedContentSegmentFontStyle: string; + let expectedContentSegmentOffsetCorrection: number; + let expectedContentSegmentReversedRotationAngle: number; + let expectedContentSegmentStrokeWidth: number; let expectedSheetStrokeWidth: number; let expectedSystemsLineStrokeWidth: number; @@ -88,14 +88,14 @@ describe('FolioService', () => { expectedBgColor = '#a3a3a3'; expectedDisabledColor = 'grey'; expectedFgColor = 'orange'; - expectedItemFillColor = '#eeeeee'; + expectedContentSegmentFillColor = '#eeeeee'; expectedSheetFillColor = 'white'; - expectedItemOffsetCorrection = 4; - expectedItemFontStyle = '11px Source Sans Pro, source-sans-pro, sans-serif'; - expectedItemReversedRotationAngle = 180; + expectedContentSegmentOffsetCorrection = 4; + expectedContentSegmentFontStyle = '11px Source Sans Pro, source-sans-pro, sans-serif'; + expectedContentSegmentReversedRotationAngle = 180; - expectedItemStrokeWidth = 2; + expectedContentSegmentStrokeWidth = 2; expectedSheetStrokeWidth = 1; expectedSystemsLineStrokeWidth = 0.7; @@ -103,7 +103,11 @@ describe('FolioService', () => { expectedLowerRightCorner = new FolioCalculationPoint(30, 40); expectedFolioSvgData = new FolioSvgData( - new FolioCalculation(expectedFolioSettings, expectedConvolutes[0].folios[0], expectedItemOffsetCorrection) + new FolioCalculation( + expectedFolioSettings, + expectedConvolutes[0].folios[0], + expectedContentSegmentOffsetCorrection + ) ); // Spies on service functions @@ -111,22 +115,37 @@ describe('FolioService', () => { // https://jasmine.github.io/2.0/introduction.html#section-Spies:_%3Ccode%3Eand.callThrough%3C/code%3E addFolioSheetToSvgCanvasSpy = spyOn(folioService as any, '_addFolioSheetToSvgCanvas').and.callThrough(); addFolioSystemsToSvgCanvasSpy = spyOn(folioService as any, '_addFolioSystemsToSvgCanvas').and.callThrough(); - addFolioItemsToSvgCanvasSpy = spyOn(folioService as any, '_addFolioItemsToSvgCanvas').and.callThrough(); + addFolioContentSegmentsToSvgCanvasSpy = spyOn( + folioService as any, + '_addFolioContentSegmentsToSvgCanvas' + ).and.callThrough(); appendCanvasSheetGroupSpy = spyOn(folioService as any, '_appendCanvasSheetGroup').and.callThrough(); - appendItemGroupSpy = spyOn(folioService as any, '_appendItemGroup').and.callThrough(); - appendItemGroupElementSpy = spyOn(folioService as any, '_appendItemGroupElement').and.callThrough(); - appendItemGroupTitleSpy = spyOn(folioService as any, '_appendItemGroupTitle').and.callThrough(); - appendItemLinkSpy = spyOn(folioService as any, '_appendItemLink').and.callThrough(); - appendItemLinkLabelSpy = spyOn(folioService as any, '_appendItemLinkLabel').and.callThrough(); - appendItemLinkLabelTextElementSpy = spyOn( + appendContentSegmentGroupSpy = spyOn(folioService as any, '_appendContentSegmentGroup').and.callThrough(); + appendContentSegmentGroupElementSpy = spyOn( + folioService as any, + '_appendContentSegmentGroupElement' + ).and.callThrough(); + appendContentSegmentGroupTitleSpy = spyOn( + folioService as any, + '_appendContentSegmentGroupTitle' + ).and.callThrough(); + appendContentSegmentLinkSpy = spyOn(folioService as any, '_appendContentSegmentLink').and.callThrough(); + appendContentSegmentLinkLabelSpy = spyOn( + folioService as any, + '_appendContentSegmentLinkLabel' + ).and.callThrough(); + appendContentSegmentLinkLabelTextElementSpy = spyOn( + folioService as any, + '_appendContentSegmentLinkLabelTextElement' + ).and.callThrough(); + appendContentSegmentLinkLabelTspanElementsSpy = spyOn( folioService as any, - '_appendItemLinkLabelTextElement' + '_appendContentSegmentLinkLabelTspanElements' ).and.callThrough(); - appendItemLinkLabelTspanElementsSpy = spyOn( + appendContentSegmentLinkPolygonSpy = spyOn( folioService as any, - '_appendItemLinkLabelTspanElements' + '_appendContentSegmentLinkPolygon' ).and.callThrough(); - appendItemLinkPolygonSpy = spyOn(folioService as any, '_appendItemLinkPolygon').and.callThrough(); appendSheetGroupTitleSpy = spyOn(folioService as any, '_appendSheetGroupTitle').and.callThrough(); appendSheetGroupRectangleSpy = spyOn(folioService as any, '_appendSheetGroupRectangle').and.callThrough(); appendSystemsGroupLabelSpy = spyOn(folioService as any, '_appendSystemsGroupLabel').and.callThrough(); @@ -156,7 +175,7 @@ describe('FolioService', () => { }); it('... should have `_itemFillColor`', () => { - expectToBe((folioService as any)._itemFillColor, expectedItemFillColor); + expectToBe((folioService as any)._itemFillColor, expectedContentSegmentFillColor); }); it('... should have `_sheetFillColor`', () => { @@ -164,19 +183,19 @@ describe('FolioService', () => { }); it('... should have `_itemFontStyle`', () => { - expectToBe((folioService as any)._itemFontStyle, expectedItemFontStyle); + expectToBe((folioService as any)._itemFontStyle, expectedContentSegmentFontStyle); }); it('... should have `_itemOffsetCorrection`', () => { - expectToBe((folioService as any)._itemOffsetCorrection, expectedItemOffsetCorrection); + expectToBe((folioService as any)._itemOffsetCorrection, expectedContentSegmentOffsetCorrection); }); it('... should have `_itemReversedRotationAngle`', () => { - expectToBe((folioService as any)._itemReversedRotationAngle, expectedItemReversedRotationAngle); + expectToBe((folioService as any)._itemReversedRotationAngle, expectedContentSegmentReversedRotationAngle); }); it('... should have `_itemStrokeWidth`', () => { - expectToBe((folioService as any)._itemStrokeWidth, expectedItemStrokeWidth); + expectToBe((folioService as any)._itemStrokeWidth, expectedContentSegmentStrokeWidth); }); it('... should have `_sheetStrokeWidth`', () => { @@ -342,8 +361,8 @@ describe('FolioService', () => { expectSpyCall(addFolioSystemsToSvgCanvasSpy, 1, [svgSheetGroup, expectedFolioSvgData]); }); - it('... should trigger `_addFolioItemsToSvgCanvas` method with correct parameters', () => { - expectSpyCall(addFolioItemsToSvgCanvasSpy, 1, [svgSheetGroup, expectedFolioSvgData]); + it('... should trigger `_addFolioContentSegmentsToSvgCanvas` method with correct parameters', () => { + expectSpyCall(addFolioContentSegmentsToSvgCanvasSpy, 1, [svgSheetGroup, expectedFolioSvgData]); }); }); }); @@ -531,9 +550,9 @@ describe('FolioService', () => { }); }); - describe('#_addFolioItemsToSvgCanvas', () => { - it('... should have a method `_addFolioItemsToSvgCanvas`', () => { - expect((folioService as any)._addFolioItemsToSvgCanvas).toBeDefined(); + describe('#_addFolioContentSegmentsToSvgCanvas', () => { + it('... should have a method `_addFolioContentSegmentsToSvgCanvas`', () => { + expect((folioService as any)._addFolioContentSegmentsToSvgCanvas).toBeDefined(); }); describe('... when called', () => { @@ -542,7 +561,7 @@ describe('FolioService', () => { beforeEach(() => { svgSheetGroup = D3_SELECTION.create('g'); - (folioService as any)._addFolioItemsToSvgCanvas(svgSheetGroup, expectedFolioSvgData); + (folioService as any)._addFolioContentSegmentsToSvgCanvas(svgSheetGroup, expectedFolioSvgData); }); afterEach(() => { @@ -550,40 +569,43 @@ describe('FolioService', () => { }); it('... should not do anything if there are no content items', () => { - const expectedCount = expectedFolioSvgData.contentItemsArray.length; + const expectedCount = expectedFolioSvgData.contentSegments.length; const folioSvgDataWithEmptyContent: FolioSvgData = { ...expectedFolioSvgData, - contentItemsArray: [null], + contentSegments: [null], }; const emptySvgSheetGroup = D3_SELECTION.create('g'); - (folioService as any)._addFolioItemsToSvgCanvas(emptySvgSheetGroup, folioSvgDataWithEmptyContent); + (folioService as any)._addFolioContentSegmentsToSvgCanvas( + emptySvgSheetGroup, + folioSvgDataWithEmptyContent + ); expectToBe(emptySvgSheetGroup.selectAll('g.item-group').size(), 0); - expectSpyCall(appendItemGroupSpy, expectedCount); - expectSpyCall(appendItemLinkSpy, expectedCount); - expectSpyCall(appendItemLinkLabelSpy, expectedCount); - expectSpyCall(appendItemLinkPolygonSpy, expectedCount); + expectSpyCall(appendContentSegmentGroupSpy, expectedCount); + expectSpyCall(appendContentSegmentLinkSpy, expectedCount); + expectSpyCall(appendContentSegmentLinkLabelSpy, expectedCount); + expectSpyCall(appendContentSegmentLinkPolygonSpy, expectedCount); }); - it('... should trigger `_appendItemGroup` for each item', () => { - expectSpyCall(appendItemGroupSpy, expectedFolioSvgData.contentItemsArray.length); + it('... should trigger `_appendContentSegmentGroup` for each item', () => { + expectSpyCall(appendContentSegmentGroupSpy, expectedFolioSvgData.contentSegments.length); }); it('... should append one item group to the SVG sheet group for each item', () => { const itemGroups = svgSheetGroup.selectAll('g.item-group'); - expectToBe(itemGroups.size(), expectedFolioSvgData.contentItemsArray.length); + expectToBe(itemGroups.size(), expectedFolioSvgData.contentSegments.length); }); - it('... should trigger `_appendItemLink` for each item group', () => { - expectSpyCall(appendItemLinkSpy, expectedFolioSvgData.contentItemsArray.length); + it('... should trigger `_appendContentSegmentLink` for each item group', () => { + expectSpyCall(appendContentSegmentLinkSpy, expectedFolioSvgData.contentSegments.length); const itemGroups = svgSheetGroup.selectAll('g.item-group').nodes(); - expectedFolioSvgData.contentItemsArray.forEach((_contentItem, i) => { + expectedFolioSvgData.contentSegments.forEach((_contentContentSegment, i) => { const itemGroup = D3_SELECTION.select(itemGroups[i]); - const callArgs = appendItemLinkSpy.calls.argsFor(i); + const callArgs = appendContentSegmentLinkSpy.calls.argsFor(i); expectToEqual(callArgs, [itemGroup]); }); @@ -601,17 +623,17 @@ describe('FolioService', () => { }); }); - it('... should trigger `_appendItemLinkPolygon` for each item link', () => { - expectSpyCall(appendItemLinkPolygonSpy, expectedFolioSvgData.contentItemsArray.length); + it('... should trigger `_appendContentSegmentLinkPolygon` for each item link', () => { + expectSpyCall(appendContentSegmentLinkPolygonSpy, expectedFolioSvgData.contentSegments.length); const itemGroups = svgSheetGroup.selectAll('g.item-group').nodes(); - expectedFolioSvgData.contentItemsArray.forEach((_contentItem, i) => { + expectedFolioSvgData.contentSegments.forEach((_contentSegment, i) => { const itemGroup = D3_SELECTION.select(itemGroups[i]); const itemLink = itemGroup.select('a'); - const callArgs = appendItemLinkPolygonSpy.calls.argsFor(i); + const callArgs = appendContentSegmentLinkPolygonSpy.calls.argsFor(i); - expectToEqual(callArgs, [itemLink, expectedFolioSvgData.contentItemsArray[i].polygonCornerPoints]); + expectToEqual(callArgs, [itemLink, expectedFolioSvgData.contentSegments[i].polygonCornerPoints]); }); }); @@ -628,17 +650,17 @@ describe('FolioService', () => { }); }); - it('... should trigger `_appendItemLinkLabel` for each item link', () => { - expectSpyCall(appendItemLinkLabelSpy, expectedFolioSvgData.contentItemsArray.length); + it('... should trigger `_appendContentSegmentLinkLabel` for each item link', () => { + expectSpyCall(appendContentSegmentLinkLabelSpy, expectedFolioSvgData.contentSegments.length); const itemGroups = svgSheetGroup.selectAll('g.item-group').nodes(); - expectedFolioSvgData.contentItemsArray.forEach((_contentItem, i) => { + expectedFolioSvgData.contentSegments.forEach((_contentSegment, i) => { const itemGroup = D3_SELECTION.select(itemGroups[i]); const itemLink = itemGroup.select('a'); - const callArgs = appendItemLinkLabelSpy.calls.argsFor(i); + const callArgs = appendContentSegmentLinkLabelSpy.calls.argsFor(i); - expectToEqual(callArgs, [itemLink, expectedFolioSvgData.contentItemsArray[i]]); + expectToEqual(callArgs, [itemLink, expectedFolioSvgData.contentSegments[i]]); }); }); @@ -654,7 +676,7 @@ describe('FolioService', () => { expectToBe(itemLink.selectAll('text').size(), 1); const tspans = textElement.selectAll('tspan'); - const expectedLabels = expectedFolioSvgData.contentItemsArray[i].itemLabelArray; + const expectedLabels = expectedFolioSvgData.contentSegments[i].segmentLabelArray; expect(tspans).toBeDefined(); expectToBe(tspans.size(), expectedLabels.length); @@ -724,79 +746,85 @@ describe('FolioService', () => { }); }); - describe('#_appendItemGroup', () => { - it('... should have a method `_appendItemGroup`', () => { - expect((folioService as any)._appendItemGroup).toBeDefined(); + describe('#_appendContentSegmentGroup', () => { + it('... should have a method `_appendContentSegmentGroup`', () => { + expect((folioService as any)._appendContentSegmentGroup).toBeDefined(); }); describe('... when called', () => { let svgSheetGroup: D3_SELECTION.Selection; - let expectedContentItem: FolioSvgContentItem; + let expectedContentSegment: FolioSvgContentSegment; beforeEach(() => { svgSheetGroup = D3_SELECTION.create('g'); - expectedContentItem = expectedFolioSvgData.contentItemsArray[0]; + expectedContentSegment = expectedFolioSvgData.contentSegments[0]; - (folioService as any)._appendItemGroup(svgSheetGroup, expectedContentItem); + (folioService as any)._appendContentSegmentGroup(svgSheetGroup, expectedContentSegment); }); afterEach(() => { svgSheetGroup.remove(); }); - it('... should trigger `_appendItemGroupElement` with correct arguments', () => { - expectSpyCall(appendItemGroupElementSpy, 1, [svgSheetGroup, expectedContentItem]); + it('... should trigger `_appendContentSegmentGroupElement` with correct arguments', () => { + expectSpyCall(appendContentSegmentGroupElementSpy, 1, [svgSheetGroup, expectedContentSegment]); }); - it('... should trigger `_appendItemGroupTitle` with correct arguments', () => { + it('... should trigger `_appendContentSegmentGroupTitle` with correct arguments', () => { const itemGroup = svgSheetGroup.select('g.item-group'); - expectSpyCall(appendItemGroupTitleSpy, 1, [itemGroup, expectedContentItem]); + expectSpyCall(appendContentSegmentGroupTitleSpy, 1, [itemGroup, expectedContentSegment]); }); it('... should trigger the referenced `selectSvgSheet` method when the item is selectable and clicked', () => { const itemGroup = svgSheetGroup.select('g.item-group'); - expectedContentItem.selectable = true; + expectedContentSegment.selectable = true; folioService.ref = refMock; // Dispatch a click event manually (itemGroup.node() as Element).dispatchEvent(new Event('click')); - expectSpyCall(refMock.selectSvgSheet, 1, [expectedContentItem.complexId, expectedContentItem.sheetId]); + expectSpyCall(refMock.selectSvgSheet, 1, [ + expectedContentSegment.complexId, + expectedContentSegment.sheetId, + ]); }); it('... should trigger the referenced `openModal` method when the item is not selectable and clicked', () => { const itemGroup = svgSheetGroup.select('g.item-group'); - expectedContentItem.selectable = false; + expectedContentSegment.selectable = false; folioService.ref = refMock; // Dispatch a click event manually (itemGroup.node() as Element).dispatchEvent(new Event('click')); - expectSpyCall(refMock.openModal, 1, expectedContentItem.linkTo); + expectSpyCall(refMock.openModal, 1, expectedContentSegment.linkTo); }); }); }); - describe('#_appendItemGroupElement', () => { - it('... should have a method `_appendItemGroupElement`', () => { - expect((folioService as any)._appendItemGroupElement).toBeDefined(); + describe('#_appendContentSegmentGroupElement', () => { + it('... should have a method `_appendContentSegmentGroupElement`', () => { + expect((folioService as any)._appendContentSegmentGroupElement).toBeDefined(); }); describe('... when called', () => { let svgSheetGroup: D3_SELECTION.Selection; let itemGroup: D3_SELECTION.Selection; - let expectedContentItem: FolioSvgContentItem; + let expectedContentSegment: FolioSvgContentSegment; beforeEach(() => { svgSheetGroup = D3_SELECTION.create('g'); - expectedContentItem = expectedFolioSvgData.contentItemsArray[0]; + expectedContentSegment = expectedFolioSvgData.contentSegments[0]; - itemGroup = (folioService as any)._appendItemGroupElement(svgSheetGroup, expectedContentItem); + itemGroup = (folioService as any)._appendContentSegmentGroupElement( + svgSheetGroup, + expectedContentSegment + ); }); afterEach(() => { @@ -808,8 +836,8 @@ describe('FolioService', () => { svgSheetGroup, 'g', { - itemGroupId: expectedContentItem.itemLabel, - itemId: expectedContentItem.sheetId, + itemGroupId: expectedContentSegment.segmentLabel, + itemId: expectedContentSegment.sheetId, class: 'item-group', stroke: expectedFgColor, fill: expectedFgColor, @@ -823,11 +851,11 @@ describe('FolioService', () => { }); it('... should set the `itemGroupId` attribute of the group element', () => { - expectToBe(itemGroup.attr('itemGroupId'), expectedContentItem.itemLabel); + expectToBe(itemGroup.attr('itemGroupId'), expectedContentSegment.segmentLabel); }); it('... should set the `itemId` attribute of the group element', () => { - expectToBe(itemGroup.attr('itemId'), expectedContentItem.sheetId); + expectToBe(itemGroup.attr('itemId'), expectedContentSegment.sheetId); }); it('... should set the `class` attribute of the group element', () => { @@ -839,9 +867,12 @@ describe('FolioService', () => { }); it('... should set the correct `stroke` attribute of the group element (if not selectable)', () => { - expectedContentItem.selectable = false; + expectedContentSegment.selectable = false; - itemGroup = (folioService as any)._appendItemGroupElement(svgSheetGroup, expectedContentItem); + itemGroup = (folioService as any)._appendContentSegmentGroupElement( + svgSheetGroup, + expectedContentSegment + ); expectToBe(itemGroup.attr('stroke'), expectedDisabledColor); }); @@ -851,9 +882,12 @@ describe('FolioService', () => { }); it('... should set the correct `fill` attribute of the group element (if not selectable)', () => { - expectedContentItem.selectable = false; + expectedContentSegment.selectable = false; - itemGroup = (folioService as any)._appendItemGroupElement(svgSheetGroup, expectedContentItem); + itemGroup = (folioService as any)._appendContentSegmentGroupElement( + svgSheetGroup, + expectedContentSegment + ); expectToBe(itemGroup.attr('fill'), expectedDisabledColor); }); @@ -870,23 +904,23 @@ describe('FolioService', () => { }); }); - describe('#_appendItemGroupTitle', () => { - it('... should have a method `_appendItemGroupTitle`', () => { - expect((folioService as any)._appendItemGroupTitle).toBeDefined(); + describe('#_appendContentSegmentGroupTitle', () => { + it('... should have a method `_appendContentSegmentGroupTitle`', () => { + expect((folioService as any)._appendContentSegmentGroupTitle).toBeDefined(); }); describe('... when called', () => { let itemGroup: D3_SELECTION.Selection; - let expectedContentItem: FolioSvgContentItem; + let expectedContentSegment: FolioSvgContentSegment; beforeEach(() => { // Create a new SVG group for testing const svg = D3_SELECTION.create('svg'); itemGroup = svg.append('g'); - expectedContentItem = expectedFolioSvgData.contentItemsArray[0]; + expectedContentSegment = expectedFolioSvgData.contentSegments[0]; - (folioService as any)._appendItemGroupTitle(itemGroup, expectedContentItem); + (folioService as any)._appendContentSegmentGroupTitle(itemGroup, expectedContentSegment); }); afterEach(() => { @@ -907,7 +941,7 @@ describe('FolioService', () => { it('... should set the text content of the title element', () => { const titleElement = itemGroup.select('title'); - expectToBe(titleElement.text(), expectedContentItem.itemLabel); + expectToBe(titleElement.text(), expectedContentSegment.segmentLabel); }); it('... should not have any attributes', () => { @@ -922,9 +956,9 @@ describe('FolioService', () => { }); }); - describe('#_appendItemLink', () => { - it('... should have a method `_appendItemLink`', () => { - expect((folioService as any)._appendItemLink).toBeDefined(); + describe('#_appendContentSegmentLink', () => { + it('... should have a method `_appendContentSegmentLink`', () => { + expect((folioService as any)._appendContentSegmentLink).toBeDefined(); }); describe('... when called', () => { @@ -935,7 +969,7 @@ describe('FolioService', () => { const svg = D3_SELECTION.create('svg'); itemGroup = svg.append('g'); - (folioService as any)._appendItemLink(itemGroup); + (folioService as any)._appendContentSegmentLink(itemGroup); }); afterEach(() => { @@ -971,79 +1005,82 @@ describe('FolioService', () => { }); }); - describe('#_appendItemLinkLabel', () => { - it('... should have a method `_appendItemLinkLabel`', () => { - expect((folioService as any)._appendItemLinkLabel).toBeDefined(); + describe('#_appendContentSegmentLinkLabel', () => { + it('... should have a method `_appendContentSegmentLinkLabel`', () => { + expect((folioService as any)._appendContentSegmentLinkLabel).toBeDefined(); }); describe('... when called', () => { let itemLink: D3_SELECTION.Selection; - let expectedContentItem: FolioSvgContentItem; + let expectedContentSegment: FolioSvgContentSegment; beforeEach(() => { // Create a new SVG group for testing const itemGroup = D3_SELECTION.create('g'); itemLink = itemGroup.append('svg:a'); - expectedContentItem = expectedFolioSvgData.contentItemsArray[0]; + expectedContentSegment = expectedFolioSvgData.contentSegments[0]; - (folioService as any)._appendItemLinkLabel(itemLink, expectedContentItem); + (folioService as any)._appendContentSegmentLinkLabel(itemLink, expectedContentSegment); }); afterEach(() => { D3_SELECTION.select('g').remove(); }); - it('... should trigger `_appendItemLinkLabelTextElement` with correct arguments', () => { - expectSpyCall(appendItemLinkLabelTextElementSpy, 1, [ + it('... should trigger `_appendContentSegmentLinkLabelTextElement` with correct arguments', () => { + expectSpyCall(appendContentSegmentLinkLabelTextElementSpy, 1, [ itemLink, - expectedContentItem.centeredXPosition, - expectedContentItem.centeredYPosition, + expectedContentSegment.centeredXPosition, + expectedContentSegment.centeredYPosition, ]); }); - it('... should trigger `_appendItemLinkLabelTspanElements` with correct arguments', () => { + it('... should trigger `_appendContentSegmentLinkLabelTspanElements` with correct arguments', () => { const itemLinkLabel = itemLink.select('text'); - expectSpyCall(appendItemLinkLabelTspanElementsSpy, 1, [itemLinkLabel, expectedContentItem]); + expectSpyCall(appendContentSegmentLinkLabelTspanElementsSpy, 1, [ + itemLinkLabel, + expectedContentSegment, + ]); }); it('... should rotate the label if reversed is true', () => { const itemLinkReversed = D3_SELECTION.create('svg:a'); - expectedContentItem.reversed = true; + expectedContentSegment.reversed = true; - (folioService as any)._appendItemLinkLabel(itemLinkReversed, expectedContentItem); + (folioService as any)._appendContentSegmentLinkLabel(itemLinkReversed, expectedContentSegment); const itemLinkLabel = itemLinkReversed.select('text'); expectToBe( itemLinkLabel.attr('transform'), - `rotate(${expectedItemReversedRotationAngle}, ${expectedContentItem.centeredXPosition}, ${expectedContentItem.centeredYPosition})` + `rotate(${expectedContentSegmentReversedRotationAngle}, ${expectedContentSegment.centeredXPosition}, ${expectedContentSegment.centeredYPosition})` ); }); }); }); - describe('#_appendItemLinkLabelTextElement', () => { - it('... should have a method `_appendItemLinkLabelTextElement`', () => { - expect((folioService as any)._appendItemLinkLabelTextElement).toBeDefined(); + describe('#_appendContentSegmentLinkLabelTextElement', () => { + it('... should have a method `_appendContentSegmentLinkLabelTextElement`', () => { + expect((folioService as any)._appendContentSegmentLinkLabelTextElement).toBeDefined(); }); describe('... when called', () => { let itemLink: D3_SELECTION.Selection; - let expectedContentItem: FolioSvgContentItem; + let expectedContentSegment: FolioSvgContentSegment; beforeEach(() => { // Create a new SVG group for testing const itemGroup = D3_SELECTION.create('g'); itemLink = itemGroup.append('svg:a'); - expectedContentItem = expectedFolioSvgData.contentItemsArray[0]; + expectedContentSegment = expectedFolioSvgData.contentSegments[0]; - (folioService as any)._appendItemLinkLabelTextElement( + (folioService as any)._appendContentSegmentLinkLabelTextElement( itemLink, - expectedContentItem.centeredXPosition, - expectedContentItem.centeredYPosition + expectedContentSegment.centeredXPosition, + expectedContentSegment.centeredYPosition ); }); @@ -1054,9 +1091,9 @@ describe('FolioService', () => { it('... should trigger `_appendSvgElementWithAttrs` with correct arguments', () => { const attributes = { class: 'item-label', - x: expectedContentItem.centeredXPosition, - y: expectedContentItem.centeredYPosition, - style: expectedItemFontStyle, + x: expectedContentSegment.centeredXPosition, + y: expectedContentSegment.centeredYPosition, + style: expectedContentSegmentFontStyle, }; attributes['dominant-baseline'] = 'middle'; attributes['text-anchor'] = 'middle'; @@ -1080,19 +1117,19 @@ describe('FolioService', () => { it('... should set the `x` attribute of the text element', () => { const textElement = itemLink.select('text'); - expectToBe(textElement.attr('x'), String(expectedContentItem.centeredXPosition)); + expectToBe(textElement.attr('x'), String(expectedContentSegment.centeredXPosition)); }); it('... should set the `y` attribute of the text element', () => { const textElement = itemLink.select('text'); - expectToBe(textElement.attr('y'), String(expectedContentItem.centeredYPosition)); + expectToBe(textElement.attr('y'), String(expectedContentSegment.centeredYPosition)); }); it('... should set the `style` attribute of the text element', () => { const textElement = itemLink.select('text'); - expectToBe(textElement.attr('style'), expectedItemFontStyle); + expectToBe(textElement.attr('style'), expectedContentSegmentFontStyle); }); it('... should set the `dominant-baseline` attribute of the text element', () => { @@ -1121,42 +1158,45 @@ describe('FolioService', () => { }); }); - describe('#_appendItemLinkLabelTspanElements', () => { - it('... should have a method `_appendItemLinkLabelTspanElements`', () => { - expect((folioService as any)._appendItemLinkLabelTspanElements).toBeDefined(); + describe('#_appendContentSegmentLinkLabelTspanElements', () => { + it('... should have a method `_appendContentSegmentLinkLabelTspanElements`', () => { + expect((folioService as any)._appendContentSegmentLinkLabelTspanElements).toBeDefined(); }); describe('... when called', () => { let labelSelection: D3_SELECTION.Selection; - let expectedContentItem: FolioSvgContentItem; + let expectedContentSegment: FolioSvgContentSegment; beforeEach(() => { // Create a new SVG group for testing const itemGroup = D3_SELECTION.create('g'); labelSelection = itemGroup.append('text'); - expectedContentItem = expectedFolioSvgData.contentItemsArray[0]; + expectedContentSegment = expectedFolioSvgData.contentSegments[0]; - (folioService as any)._appendItemLinkLabelTspanElements(labelSelection, expectedContentItem); + (folioService as any)._appendContentSegmentLinkLabelTspanElements( + labelSelection, + expectedContentSegment + ); }); afterEach(() => { D3_SELECTION.select('g').remove(); }); - it('... should trigger `_appendSvgElementWithAttrs` with correct arguments for each item in the itemLabelArray', () => { - const labelArrayLength = expectedContentItem.itemLabelArray.length; + it('... should trigger `_appendSvgElementWithAttrs` with correct arguments for each item in the labelArray', () => { + const labelArrayLength = expectedContentSegment.segmentLabelArray.length; const commonArgs = [labelSelection, 'tspan']; const additionalAttributes = { - x: expectedContentItem.centeredXPosition, - y: expectedContentItem.centeredYPosition, + x: expectedContentSegment.centeredXPosition, + y: expectedContentSegment.centeredYPosition, dy: '1.2em', }; additionalAttributes['text-anchor'] = 'middle'; expectToBe(appendSvgElementWithAttrsSpy.calls.count(), labelArrayLength); - expectedContentItem.itemLabelArray.forEach((_label, i) => { + expectedContentSegment.segmentLabelArray.forEach((_label, i) => { const callArgs = appendSvgElementWithAttrsSpy.calls.argsFor(i); const expectedArgs = [...commonArgs, i === 0 ? {} : additionalAttributes]; @@ -1165,8 +1205,8 @@ describe('FolioService', () => { }); }); - it('... should append a tspan element for each item in the itemLabelArray', () => { - const labelArrayLength = expectedContentItem.itemLabelArray.length; + it('... should append a tspan element for each item in the labelArray', () => { + const labelArrayLength = expectedContentSegment.segmentLabelArray.length; expectToBe(labelSelection.selectAll('tspan').size(), labelArrayLength); }); @@ -1174,7 +1214,7 @@ describe('FolioService', () => { it('... should append correct text content for each tspan element of an item', () => { const tspanElements = labelSelection.selectAll('tspan').nodes(); - expectedContentItem.itemLabelArray.forEach((label, i) => { + expectedContentSegment.segmentLabelArray.forEach((label, i) => { const tspanElement = D3_SELECTION.select(tspanElements[i]); expectToBe(tspanElement.text(), label); @@ -1184,13 +1224,19 @@ describe('FolioService', () => { it('... should set the `x` attribute of the second tspan element', () => { const tspanElement = labelSelection.selectAll('tspan').nodes()[1]; - expectToBe(D3_SELECTION.select(tspanElement).attr('x'), String(expectedContentItem.centeredXPosition)); + expectToBe( + D3_SELECTION.select(tspanElement).attr('x'), + String(expectedContentSegment.centeredXPosition) + ); }); it('... should set the `y` attribute of the second tspan element', () => { const tspanElement = labelSelection.selectAll('tspan').nodes()[1]; - expectToBe(D3_SELECTION.select(tspanElement).attr('y'), String(expectedContentItem.centeredYPosition)); + expectToBe( + D3_SELECTION.select(tspanElement).attr('y'), + String(expectedContentSegment.centeredYPosition) + ); }); it('... should set the `dy` attribute of the second tspan element', () => { @@ -1221,43 +1267,52 @@ describe('FolioService', () => { expectToEqual(actualAttributes, expectedAttributes); }); - it('... should not append a second tspan element if the itemLabelArray has only one item', () => { + it('... should not append a second tspan element if the labelArray has only one item', () => { const itemLinkLabel = D3_SELECTION.create('text'); - expectedContentItem.itemLabelArray = ['test']; + expectedContentSegment.segmentLabelArray = ['test']; - (folioService as any)._appendItemLinkLabelTspanElements(itemLinkLabel, expectedContentItem); + (folioService as any)._appendContentSegmentLinkLabelTspanElements( + itemLinkLabel, + expectedContentSegment + ); expectToBe(itemLinkLabel.selectAll('tspan').size(), 1); }); - it('... should not append a tspan element if the itemLabelArray is empty', () => { + it('... should not append a tspan element if the labelArray is empty', () => { const itemLinkLabel = D3_SELECTION.create('text'); - expectedContentItem.itemLabelArray = []; + expectedContentSegment.segmentLabelArray = []; - (folioService as any)._appendItemLinkLabelTspanElements(itemLinkLabel, expectedContentItem); + (folioService as any)._appendContentSegmentLinkLabelTspanElements( + itemLinkLabel, + expectedContentSegment + ); expectToBe(itemLinkLabel.selectAll('tspan').size(), 0); }); }); }); - describe('#_appendItemLinkPolygon', () => { - it('... should have a method `_appendItemLinkPolygon`', () => { - expect((folioService as any)._appendItemLinkPolygon).toBeDefined(); + describe('#_appendContentSegmentLinkPolygon', () => { + it('... should have a method `_appendContentSegmentLinkPolygon`', () => { + expect((folioService as any)._appendContentSegmentLinkPolygon).toBeDefined(); }); describe('... when called', () => { let itemLink: D3_SELECTION.Selection; - let expectedContentItem: FolioSvgContentItem; + let expectedContentSegment: FolioSvgContentSegment; beforeEach(() => { // Create a new SVG group for testing const itemGroup = D3_SELECTION.create('g'); itemLink = itemGroup.append('svg:a'); - expectedContentItem = expectedFolioSvgData.contentItemsArray[0]; + expectedContentSegment = expectedFolioSvgData.contentSegments[0]; - (folioService as any)._appendItemLinkPolygon(itemLink, expectedContentItem.polygonCornerPoints); + (folioService as any)._appendContentSegmentLinkPolygon( + itemLink, + expectedContentSegment.polygonCornerPoints + ); }); afterEach(() => { @@ -1267,10 +1322,10 @@ describe('FolioService', () => { it('... should trigger `_appendSvgElementWithAttrs` with correct arguments', () => { const attributes = { class: 'item-shape', - points: expectedContentItem.polygonCornerPoints, - fill: expectedItemFillColor, + points: expectedContentSegment.polygonCornerPoints, + fill: expectedContentSegmentFillColor, }; - attributes['stroke-width'] = expectedItemStrokeWidth; + attributes['stroke-width'] = expectedContentSegmentStrokeWidth; expectSpyCall(appendSvgElementWithAttrsSpy, 1, [itemLink, 'polygon', attributes]); }); @@ -1291,19 +1346,19 @@ describe('FolioService', () => { it('... should set the `points` attribute of the polygon element', () => { const polygonElement = itemLink.select('polygon'); - expectToBe(polygonElement.attr('points'), expectedContentItem.polygonCornerPoints); + expectToBe(polygonElement.attr('points'), expectedContentSegment.polygonCornerPoints); }); it('... should set the `fill` attribute of the polygon element', () => { const polygonElement = itemLink.select('polygon'); - expectToBe(polygonElement.attr('fill'), expectedItemFillColor); + expectToBe(polygonElement.attr('fill'), expectedContentSegmentFillColor); }); it('... should set the `stroke-width` attribute of the polygon element', () => { const polygonElement = itemLink.select('polygon'); - expectToBe(polygonElement.attr('stroke-width'), String(expectedItemStrokeWidth)); + expectToBe(polygonElement.attr('stroke-width'), String(expectedContentSegmentStrokeWidth)); }); it('... should only have specified attributes', () => { diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts index 4498ff32e1..45c3acf000 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts @@ -7,7 +7,7 @@ import { FolioCalculationLine, FolioCalculationPoint, FolioSettings, - FolioSvgContentItem, + FolioSvgContentSegment, FolioSvgData, ViewBox, } from '@awg-views/edition-view/models'; @@ -154,9 +154,7 @@ export class FolioService { * for a folio's sheet, systems and items to the folio SVG canvas. * * @param {D3Selection} svgCanvas The given SVG canvas selection. - * @param {FolioSvgData} folioSvg The given calculated folio data. - * @param {string} bgColor The given background color. - * @param {string} fgColor The given foreground color. + * @param {FolioSvgData} folioSvgData The given calculated folio SVG data. * @param {*} ref The given reference to the calling component. * @returns {void} Adds the folio to the SVG canvas selection. */ @@ -174,7 +172,7 @@ export class FolioService { this._addFolioSystemsToSvgCanvas(svgSheetGroup, folioSvgData); // Draw items. - this._addFolioItemsToSvgCanvas(svgSheetGroup, folioSvgData); + this._addFolioContentSegmentsToSvgCanvas(svgSheetGroup, folioSvgData); } /** @@ -203,7 +201,6 @@ export class FolioService { * * @param {D3Selection} svgSheetGroup The given SVG sheet group selection. * @param {FolioSvgData} folioSvgData The given calculated folio SVG data. - * @param {string} bgColor The given background color. * @returns {void} Adds the systems to the SVG canvas selection. */ private _addFolioSystemsToSvgCanvas(svgSheetGroup: D3Selection, folioSvgData: FolioSvgData): void { @@ -223,34 +220,32 @@ export class FolioService { } /** - * Private method: _addFolioItemsToSvgCanvas. + * Private method: _addFolioContentSegmentsToSvgCanvas. * * It adds the folio's items from the calculated * folio SVG data to the folio SVG canvas. * - * @param {D3Selection} svgCanvas The given SVG canvas selection. * @param {D3Selection} svgSheetGroup The given SVG sheet group selection. - * @param {FolioSvgData} folioSvgData The given calculated folio data. - * @param {string} fgColor The given foreground color. + * @param {FolioSvgData} folioSvgData The given calculated folio SVG data. * @returns {void} Adds the items to the SVG canvas selection. */ - private _addFolioItemsToSvgCanvas(svgSheetGroup: D3Selection, folioSvgData: FolioSvgData): void { - folioSvgData?.contentItemsArray?.forEach((contentItem: FolioSvgContentItem) => { - if (!contentItem) { + private _addFolioContentSegmentsToSvgCanvas(svgSheetGroup: D3Selection, folioSvgData: FolioSvgData): void { + folioSvgData?.contentSegments?.forEach((contentSegment: FolioSvgContentSegment) => { + if (!contentSegment) { return; } // Draw item group. - const svgItemGroup = this._appendItemGroup(svgSheetGroup, contentItem); + const svgContentSegmentGroup = this._appendContentSegmentGroup(svgSheetGroup, contentSegment); // Draw item link. - const svgItemLink = this._appendItemLink(svgItemGroup); + const svgContentSegmentLink = this._appendContentSegmentLink(svgContentSegmentGroup); // Draw item polygon. - this._appendItemLinkPolygon(svgItemLink, contentItem.polygonCornerPoints); + this._appendContentSegmentLinkPolygon(svgContentSegmentLink, contentSegment.polygonCornerPoints); // Draw item link label. - this._appendItemLinkLabel(svgItemLink, contentItem); + this._appendContentSegmentLinkLabel(svgContentSegmentLink, contentSegment); }); } @@ -271,98 +266,110 @@ export class FolioService { } /** - * Private method: _appendItemGroup. + * Private method: _appendContentSegmentGroup. * * It appends an item group to the sheet group. * * @param {D3Selection} svgSheetGroup The given SVG sheet group selection. - * @param {FolioSvgContentItem} contentItem The given calculated folio data. + * @param {FolioSvgContentSegment} contentSegment The given content segment. * @returns {D3Selection} Appends an item group to the sheet group selection. */ - private _appendItemGroup(svgSheetGroup: D3Selection, contentItem: FolioSvgContentItem): D3Selection { + private _appendContentSegmentGroup( + svgSheetGroup: D3Selection, + contentSegment: FolioSvgContentSegment + ): D3Selection { // Draw item group element. - const itemGroup = this._appendItemGroupElement(svgSheetGroup, contentItem); + const itemGroup = this._appendContentSegmentGroupElement(svgSheetGroup, contentSegment); // Apply title when hovering item - this._appendItemGroupTitle(itemGroup, contentItem); + this._appendContentSegmentGroupTitle(itemGroup, contentSegment); // Add click event handler itemGroup.on('click', () => - contentItem.selectable - ? this.ref.selectSvgSheet(contentItem.complexId, contentItem.sheetId) - : this.ref.openModal(contentItem.linkTo) + contentSegment.selectable + ? this.ref.selectSvgSheet(contentSegment.complexId, contentSegment.sheetId) + : this.ref.openModal(contentSegment.linkTo) ); return itemGroup; } /** - * Private method: _appendItemGroupElement. + * Private method: _appendContentSegmentGroupElement. * * It appends an item group element to the sheet group. * * @param {D3Selection} svgSheetGroup The given SVG sheet group selection. - * @param {FolioSvgContentItem} contentItem The given calculated folio data. + * @param {FolioSvgContentSegment} contentSegment The given content segment. * @returns {D3Selection} Appends an item group element to the sheet group selection. */ - private _appendItemGroupElement(svgSheetGroup: D3Selection, contentItem: FolioSvgContentItem): D3Selection { + private _appendContentSegmentGroupElement( + svgSheetGroup: D3Selection, + contentSegment: FolioSvgContentSegment + ): D3Selection { return this._appendSvgElementWithAttrs(svgSheetGroup, 'g', { - itemGroupId: contentItem.itemLabel, - itemId: contentItem.sheetId, + itemGroupId: contentSegment.segmentLabel, + itemId: contentSegment.sheetId, class: 'item-group', - stroke: contentItem.selectable ? this._fgColor : this._disabledColor, - fill: contentItem.selectable ? this._fgColor : this._disabledColor, + stroke: contentSegment.selectable ? this._fgColor : this._disabledColor, + fill: contentSegment.selectable ? this._fgColor : this._disabledColor, }); } /** - * Private method: _appendItemGroupTitle. + * Private method: _appendContentSegmentGroupTitle. * * It appends a title to the item group. * * @param {D3Selection} itemGroup The given SVG item group selection. - * @param {FolioSvgContentItem} contentItem The given calculated folio data. + * @param {FolioSvgContentSegment} contentSegment The given content segment. * @returns {D3Selection} Appends a title to the item group selection. */ - private _appendItemGroupTitle(itemGroup: D3Selection, contentItem: FolioSvgContentItem): D3Selection { - return this._appendSvgElementWithAttrs(itemGroup, 'title', {}).text(contentItem.itemLabel); + private _appendContentSegmentGroupTitle( + itemGroup: D3Selection, + contentSegment: FolioSvgContentSegment + ): D3Selection { + return this._appendSvgElementWithAttrs(itemGroup, 'title', {}).text(contentSegment.segmentLabel); } /** - * Private method: _appendItemLink. + * Private method: _appendContentSegmentLink. * * It appends a link to the item group. * - * @param {D3Selection} svgItemGroup The given SVG item group selection. + * @param {D3Selection} svgContentSegmentGroup The given SVG item group selection. * @returns {D3Selection} Appends a link to the item group selection. */ - private _appendItemLink(svgItemGroup: D3Selection): D3Selection { - return this._appendSvgElementWithAttrs(svgItemGroup, 'a', { class: 'item-link' }); + private _appendContentSegmentLink(svgContentSegmentGroup: D3Selection): D3Selection { + return this._appendSvgElementWithAttrs(svgContentSegmentGroup, 'a', { class: 'item-link' }); } /** - * Private method: _appendItemLinkLabel. + * Private method: _appendContentSegmentLinkLabel. * * It appends a label to the item link. * - * @param {D3Selection} svgItemLink The given SVG item link selection. - * @param {FolioSvgContentItem} contentItem The given calculated folio data. + * @param {D3Selection} svgContentSegmentLink The given SVG item link selection. + * @param {FolioSvgContentSegment} contentSegment The given content segment. * @returns {D3Selection} Appends a label to the item link selection. */ - private _appendItemLinkLabel(svgItemLink: any, contentItem: FolioSvgContentItem): D3Selection { - const label = this._appendItemLinkLabelTextElement( - svgItemLink, - contentItem.centeredXPosition, - contentItem.centeredYPosition + private _appendContentSegmentLinkLabel( + svgContentSegmentLink: any, + contentSegment: FolioSvgContentSegment + ): D3Selection { + const label = this._appendContentSegmentLinkLabelTextElement( + svgContentSegmentLink, + contentSegment.centeredXPosition, + contentSegment.centeredYPosition ); - this._appendItemLinkLabelTspanElements(label, contentItem); + this._appendContentSegmentLinkLabelTspanElements(label, contentSegment); // Rotate the label 180 degrees around its center when reversed - if (contentItem.reversed) { + if (contentSegment.reversed) { label.attr( 'transform', - `rotate(${this._itemReversedRotationAngle}, ${contentItem.centeredXPosition}, ${contentItem.centeredYPosition})` + `rotate(${this._itemReversedRotationAngle}, ${contentSegment.centeredXPosition}, ${contentSegment.centeredYPosition})` ); } @@ -370,17 +377,17 @@ export class FolioService { } /** - * Private method: _appendItemLinkLabelTextElement. + * Private method: _appendContentSegmentLinkLabelTextElement. * * It appends a text element to the item link label. * - * @param {D3Selection} svgItemLink The given SVG item link selection. + * @param {D3Selection} svgContentSegmentLink The given SVG item link selection. * @param {number} centeredXPosition The given centered x position. * @param {number} centeredYPosition The given centered y position. * @returns {D3Selection} Appends a text element to the item link selection. */ - private _appendItemLinkLabelTextElement( - svgItemLink: D3Selection, + private _appendContentSegmentLinkLabelTextElement( + svgContentSegmentLink: D3Selection, centeredXPosition: number, centeredYPosition: number ): D3Selection { @@ -393,25 +400,28 @@ export class FolioService { attributes['dominant-baseline'] = 'middle'; attributes['text-anchor'] = 'middle'; - return this._appendSvgElementWithAttrs(svgItemLink, 'text', attributes); + return this._appendSvgElementWithAttrs(svgContentSegmentLink, 'text', attributes); } /** - * Private method: _appendItemLinkLabelTspanElements. + * Private method: _appendContentSegmentLinkLabelTspanElements. * * It appends tspan elements to the item link label. * * @param {D3Selection} labelSelection The given label selection. - * @param {FolioSvgContentItem} contentItem The given calculated folio data. + * @param {FolioSvgContentSegment} contentSegment The given content segment. * @returns {void} Appends tspan elements to the label selection. */ - private _appendItemLinkLabelTspanElements(labelSelection: D3Selection, contentItem: FolioSvgContentItem): void { - contentItem.itemLabelArray.forEach((label, index) => { + private _appendContentSegmentLinkLabelTspanElements( + labelSelection: D3Selection, + contentSegment: FolioSvgContentSegment + ): void { + contentSegment.segmentLabelArray.forEach((label, index) => { if (label !== '') { const attributes: any = {}; if (index > 0) { - attributes.x = contentItem.centeredXPosition; - attributes.y = contentItem.centeredYPosition; + attributes.x = contentSegment.centeredXPosition; + attributes.y = contentSegment.centeredYPosition; attributes.dy = '1.2em'; attributes['text-anchor'] = 'middle'; } @@ -422,15 +432,18 @@ export class FolioService { } /** - * Private method: _appendItemLinkPolygon. + * Private method: _appendContentSegmentLinkPolygon. * * It appends a polygon shape to the item link. * - * @param {D3Selection} svgItemLink The given SVG item link selection. + * @param {D3Selection} svgContentSegmentLink The given SVG item link selection. * @param {string} polygonCornerPoints The given polygon corner points. * @returns {D3Selection} Appends a polygon shape to the item link selection. */ - private _appendItemLinkPolygon(svgItemLink: D3Selection, polygonCornerPoints: string): D3Selection { + private _appendContentSegmentLinkPolygon( + svgContentSegmentLink: D3Selection, + polygonCornerPoints: string + ): D3Selection { const attributes = { class: 'item-shape', points: polygonCornerPoints, @@ -438,7 +451,7 @@ export class FolioService { }; attributes['stroke-width'] = this._itemStrokeWidth; - return this._appendSvgElementWithAttrs(svgItemLink, 'polygon', attributes); + return this._appendSvgElementWithAttrs(svgContentSegmentLink, 'polygon', attributes); } /** diff --git a/src/app/views/edition-view/models/folio-calculation.model.ts b/src/app/views/edition-view/models/folio-calculation.model.ts index 6ef69b497a..7af57a74cd 100644 --- a/src/app/views/edition-view/models/folio-calculation.model.ts +++ b/src/app/views/edition-view/models/folio-calculation.model.ts @@ -117,13 +117,13 @@ export class FolioCalculationContentItemCornerPoints { * It initializes the class with four points * for upper and lower left and upper and lower right corners. * - * @param {FolioCalculationContentItem} calculatedContentItem The given calculated content item. + * @param {FolioCalculationContentSegment} calculatedContentItem The given calculated content item. */ - constructor(calculatedContentItem: FolioCalculationContentItem) { - this.upperLeftCorner = new FolioCalculationPoint(calculatedContentItem.startX, calculatedContentItem.startY); - this.upperRightCorner = new FolioCalculationPoint(calculatedContentItem.endX, calculatedContentItem.startY); - this.lowerRightCorner = new FolioCalculationPoint(calculatedContentItem.endX, calculatedContentItem.endY); - this.lowerLeftCorner = new FolioCalculationPoint(calculatedContentItem.startX, calculatedContentItem.endY); + constructor({ startX, startY, endX, endY }: FolioCalculationContentSegment) { + this.upperLeftCorner = new FolioCalculationPoint(startX, startY); + this.upperRightCorner = new FolioCalculationPoint(endX, startY); + this.lowerRightCorner = new FolioCalculationPoint(endX, endY); + this.lowerLeftCorner = new FolioCalculationPoint(startX, endY); } } @@ -155,7 +155,7 @@ class FolioCalculationContentItemCache { * * Exposed to be used throughout {@link EditionSheetsModule}. */ -export class FolioCalculationContentItem { +export class FolioCalculationContentSegment { /** * The correction value for the offset of the content item (number). */ diff --git a/src/app/views/edition-view/models/folio-svg-data.model.ts b/src/app/views/edition-view/models/folio-svg-data.model.ts index 1688172cc7..d32c003068 100644 --- a/src/app/views/edition-view/models/folio-svg-data.model.ts +++ b/src/app/views/edition-view/models/folio-svg-data.model.ts @@ -1,6 +1,6 @@ import { FolioCalculation, - FolioCalculationContentItem, + FolioCalculationContentSegment, FolioCalculationLine, FolioCalculationPoint, FolioCalculationSheet, @@ -90,93 +90,82 @@ class FolioSvgSystems { } /** - * The FolioSvgContentItem class. + * The FolioSvgContentSegment class. * * It is used in the context of the edition folio convolutes - * to store the svg data for the content item of a folio. + * to store the svg data for the content segment of a folio. * - * Not exposed, only called internally from {@link FolioSvgData}. + * Exposed to be used throughout {@link EditionSheetsModule}. */ -export class FolioSvgContentItem { +export class FolioSvgContentSegment { /** - * The id for the label of a content item edition complex (string). + * The id for the label of a content segment edition complex (string). */ complexId: string; /** - * The id for the label of a content item sheet (string). + * The id for the label of a content segment sheet (string). */ sheetId: string; /** - * The sigle for the label of a content item (string). - */ - sigle: string; - - /** - * The sigle addendum for the label of a content item (string). + * The optional link to a convolute description in the critical report. */ - sigleAddendum: string; + linkTo: string; /** - * The optional boolean flag if the content item can be selected.. + * The optional boolean flag if the content segment can be selected. */ selectable: boolean; /** - * The optional boolean flag if the content item is reversed. + * The optional boolean flag if the content segment is reversed. */ reversed: boolean; /** - * The optional link to a convolute description in the critical report. - */ - linkTo: string; - - /** - * The array of labels of a content item (string[]). + * The array of labels of a content segment (string[]). */ - itemLabelArray: string[]; + segmentLabelArray: string[]; /** - * The label of a content item (string). + * The label of a content segment (string). */ - itemLabel: string; + segmentLabel: string; /** - * The corner points of a content item polygon (string). + * The corner points of a content segment polygon (string). */ polygonCornerPoints: string; /** - * The centered X position of a content item (number). + * The centered X position of a content segment (number). */ centeredXPosition: number; /** - * The centered y position of a content item (number). + * The centered y position of a content segment (number). */ centeredYPosition: number; /** - * Constructor of the FolioSvgContentItem class. + * Constructor of the FolioSvgContentSegment class. * - * It initializes the class with values from the folio content item calculation. + * It initializes the class with values from the folio content segment calculation. * - * @param {FolioCalculationContentItem} calculatedContentItem The given calculated folio content item. - */ - constructor(calculatedContentItem: FolioCalculationContentItem) { - this.complexId = calculatedContentItem.complexId; - this.sheetId = calculatedContentItem.sheetId; - this.selectable = calculatedContentItem.selectable; - this.reversed = calculatedContentItem.reversed; - this.linkTo = calculatedContentItem.linkTo; - - this.polygonCornerPoints = calculatedContentItem.polygonCornerPoints; - this.itemLabelArray = calculatedContentItem.itemLabelArray; - this.itemLabel = calculatedContentItem.itemLabel; - this.centeredXPosition = calculatedContentItem.centeredXPosition; - this.centeredYPosition = calculatedContentItem.centeredYPosition; + * @param {FolioCalculationContentSegment} calculatedContentSegment The given calculated folio content segment. + */ + constructor(calculatedContentSegment: FolioCalculationContentSegment) { + this.complexId = calculatedContentSegment.complexId; + this.sheetId = calculatedContentSegment.sheetId; + this.linkTo = calculatedContentSegment.linkTo; + this.selectable = calculatedContentSegment.selectable; + this.reversed = calculatedContentSegment.reversed; + this.polygonCornerPoints = calculatedContentSegment.polygonCornerPoints; + this.segmentLabelArray = calculatedContentSegment.itemLabelArray; + this.segmentLabel = calculatedContentSegment.itemLabel; + this.centeredXPosition = calculatedContentSegment.centeredXPosition; + this.centeredYPosition = calculatedContentSegment.centeredYPosition; } } @@ -206,26 +195,26 @@ export class FolioSvgData { systems: FolioSvgSystems; /** - * The content items array of a folio (FolioSvgContentItems). + * The content segments of a folio (FolioSvgContentSegments). * * It contains all calculated values and their positions (in px) - * to draw the svg of the content items of a folio. + * to draw the svg of the content segments of a folio. */ - contentItemsArray: FolioSvgContentItem[]; + contentSegments: FolioSvgContentSegment[]; /** * Constructor of the FolioSvgData class. * * It initializes the class with values from the folio calculation. * - * @param {FolioCalculation[]} calculation The given folio calculation. + * @param {FolioCalculation} calculation The given folio calculation. */ constructor(calculation: FolioCalculation) { this.sheet = new FolioSvgSheet(calculation.sheet); this.systems = new FolioSvgSystems(calculation.systems); - this.contentItemsArray = []; - calculation.contentItemsArray.forEach((calculatedContentItem: FolioCalculationContentItem) => { - this.contentItemsArray.push(new FolioSvgContentItem(calculatedContentItem)); - }); + this.contentSegments = []; + this.contentSegments = calculation.contentSegments.map( + calculatedContentSegment => new FolioSvgContentSegment(calculatedContentSegment) + ); } } diff --git a/src/app/views/edition-view/models/index.ts b/src/app/views/edition-view/models/index.ts index 4ea2ac0f6e..da6f3da5c4 100644 --- a/src/app/views/edition-view/models/index.ts +++ b/src/app/views/edition-view/models/index.ts @@ -20,7 +20,7 @@ import { EditionSvgSheet, EditionSvgSheetList } from './edition-svg-sheet.model' import { FolioCalculation, FolioCalculationLine, FolioCalculationPoint } from './folio-calculation.model'; import { FolioSettings } from './folio-settings.model'; -import { FolioSvgContentItem, FolioSvgData } from './folio-svg-data.model'; +import { FolioSvgContentSegment, FolioSvgData } from './folio-svg-data.model'; import { Folio, FolioContent, FolioConvolute, FolioConvoluteList, FolioFormat, FolioSection } from './folio.model'; import { Graph, GraphList, GraphRDFData, GraphSparqlQuery } from './graph.model'; @@ -68,7 +68,7 @@ export { FolioFormat, FolioSection, FolioSettings, - FolioSvgContentItem, + FolioSvgContentSegment, FolioSvgData, Graph, GraphList, From 0547141e0662f7814e1685df9803701a092304dc Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Sun, 3 Mar 2024 17:05:53 +0100 Subject: [PATCH 46/63] refactor(edition): rename contentItem -> contentSegment (continued) --- .../edition-folio-viewer.component.spec.ts | 32 +- .../edition-folio-viewer.component.ts | 8 +- .../folio.service.spec.ts | 323 +++++++++--------- .../edition-folio-viewer/folio.service.ts | 124 +++---- 4 files changed, 254 insertions(+), 233 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.spec.ts index 0570a2b61c..b0779c92c9 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.spec.ts @@ -205,7 +205,7 @@ describe('EditionFolioViewerComponent (DONE)', () => { getAndExpectDebugElementByCss(gridDe[0], 'div.svgRow', 1, 1); }); - it('... should contain as many div.svgCol in div.svgRow as items in folioSvgDataArray', async () => { + it('... should contain as many div.svgCol in div.svgRow as content segments in folioSvgDataArray', async () => { const rowDe = getAndExpectDebugElementByCss(compDe, 'div.svgGrid div.svgRow', 1, 1); expect(component.folioSvgDataArray.length).toBeGreaterThan(0); @@ -237,7 +237,7 @@ describe('EditionFolioViewerComponent (DONE)', () => { }); }); - it('... should contain as many muted span elements in div.svgCol as items in folioSvgDataArray', () => { + it('... should contain as many muted span elements in div.svgCol as content segments in folioSvgDataArray', () => { const rowDe = getAndExpectDebugElementByCss(compDe, 'div.svgGrid div.svgRow', 1, 1); const colDe = getAndExpectDebugElementByCss( rowDe[0], @@ -270,7 +270,7 @@ describe('EditionFolioViewerComponent (DONE)', () => { }); }); - it('... should contain as many svg elements in div.svgCol as items in folioSvgDataArray', () => { + it('... should contain as many svg elements in div.svgCol as content segments in folioSvgDataArray', () => { const rowDe = getAndExpectDebugElementByCss(compDe, 'div.svgGrid div.svgRow', 1, 1); const colDe = getAndExpectDebugElementByCss( @@ -619,7 +619,7 @@ describe('EditionFolioViewerComponent (DONE)', () => { const divDes = getAndExpectDebugElementByCss(compDe, 'div.awg-source-description-body', 1, 1); // Find content item spans - const contentItemDes = getAndExpectDebugElementByCss( + const contentSegmentDes = getAndExpectDebugElementByCss( divDes[0], 'span.awg-source-description-content-item', 3, @@ -627,7 +627,7 @@ describe('EditionFolioViewerComponent (DONE)', () => { ); // Find anchors in second paragraph - const anchorDes = getAndExpectDebugElementByCss(contentItemDes[0], 'a', 1, 1); + const anchorDes = getAndExpectDebugElementByCss(contentSegmentDes[0], 'a', 1, 1); // CLick on anchor (with selectSvgSheet call) clickAndAwaitChanges(anchorDes[0], fixture); @@ -681,12 +681,18 @@ describe('EditionFolioViewerComponent (DONE)', () => { beforeEach(() => { // Create mocked SVG element with D3 - const itemId = expectedSvgSheet.id; - const anotherItemId = 'another-id'; + const contentSegmentId = expectedSvgSheet.id; + const anotherContentSegmentId = 'another-id'; svgSelection = createD3TestSvg(mockDocument); - svgGroupSelection1 = svgSelection.append('g').attr('class', 'item-group').attr('itemId', itemId); - svgGroupSelection2 = svgSelection.append('g').attr('class', 'item-group').attr('itemId', anotherItemId); + svgGroupSelection1 = svgSelection + .append('g') + .attr('class', 'content-segment-group') + .attr('contentSegmentId', contentSegmentId); + svgGroupSelection2 = svgSelection + .append('g') + .attr('class', 'content-segment-group') + .attr('contentSegmentId', anotherContentSegmentId); }); afterEach(() => { @@ -705,7 +711,7 @@ describe('EditionFolioViewerComponent (DONE)', () => { expectSpyCall(isSelectedSvgSheetSpy, 0); }); - it('should check if each item group is active', () => { + it('should check if each content segment group is active', () => { component.canvasArray = [svgSelection]; component.toggleActiveClass(); @@ -713,17 +719,17 @@ describe('EditionFolioViewerComponent (DONE)', () => { expectSpyCall(isSelectedSvgSheetSpy, 2); }); - it('should toggle the active class for each item group based on whether it is active', () => { + it('should toggle the active class for each content segment group based on whether it is active', () => { component.canvasArray = [svgSelection]; - isSelectedSvgSheetSpy.and.callFake(itemId => itemId === expectedSvgSheet.id); + isSelectedSvgSheetSpy.and.callFake(contentSegmentId => contentSegmentId === expectedSvgSheet.id); component.toggleActiveClass(); expect(svgGroupSelection1.classed('active')).toBe(true); expect(svgGroupSelection2.classed('active')).toBe(false); - isSelectedSvgSheetSpy.and.callFake(itemId => itemId === 'another-id'); + isSelectedSvgSheetSpy.and.callFake(contentSegmentId => contentSegmentId === 'another-id'); component.toggleActiveClass(); diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.ts index ee1cd26db9..1eda4ecfee 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.ts @@ -280,7 +280,7 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked * Public method: toggleActiveClass. * * It toggles css class 'active' on a selected sheet - * (canvas item-group). + * (canvas content-segment-group). * * @returns {void} Toggles the css class. */ @@ -290,9 +290,9 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked } this.canvasArray.forEach(canvas => { - canvas.selectAll('.item-group').classed('active', (d, i, nodes) => { - const itemId = D3_SELECTION.select(nodes[i]).attr('itemId'); - return this.isSelectedSvgSheet(itemId); + canvas.selectAll('.content-segment-group').classed('active', (d, i, nodes) => { + const contentSegmentId = D3_SELECTION.select(nodes[i]).attr('contentSegmentId'); + return this.isSelectedSvgSheet(contentSegmentId); }); }); } diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts index 0e156f6e2e..4be3e889e0 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts @@ -174,28 +174,31 @@ describe('FolioService', () => { expectToBe((folioService as any)._fgColor, expectedFgColor); }); - it('... should have `_itemFillColor`', () => { - expectToBe((folioService as any)._itemFillColor, expectedContentSegmentFillColor); + it('... should have `_contentSegmentFillColor`', () => { + expectToBe((folioService as any)._contentSegmentFillColor, expectedContentSegmentFillColor); }); it('... should have `_sheetFillColor`', () => { expectToBe((folioService as any)._sheetFillColor, expectedSheetFillColor); }); - it('... should have `_itemFontStyle`', () => { - expectToBe((folioService as any)._itemFontStyle, expectedContentSegmentFontStyle); + it('... should have `_contentSegmentFontStyle`', () => { + expectToBe((folioService as any)._contentSegmentFontStyle, expectedContentSegmentFontStyle); }); - it('... should have `_itemOffsetCorrection`', () => { - expectToBe((folioService as any)._itemOffsetCorrection, expectedContentSegmentOffsetCorrection); + it('... should have `_contentSegmentOffsetCorrection`', () => { + expectToBe((folioService as any)._contentSegmentOffsetCorrection, expectedContentSegmentOffsetCorrection); }); - it('... should have `_itemReversedRotationAngle`', () => { - expectToBe((folioService as any)._itemReversedRotationAngle, expectedContentSegmentReversedRotationAngle); + it('... should have `_contentSegmentReversedRotationAngle`', () => { + expectToBe( + (folioService as any)._contentSegmentReversedRotationAngle, + expectedContentSegmentReversedRotationAngle + ); }); - it('... should have `_itemStrokeWidth`', () => { - expectToBe((folioService as any)._itemStrokeWidth, expectedContentSegmentStrokeWidth); + it('... should have `_contentSegmentStrokeWidth`', () => { + expectToBe((folioService as any)._contentSegmentStrokeWidth, expectedContentSegmentStrokeWidth); }); it('... should have `_sheetStrokeWidth`', () => { @@ -244,14 +247,14 @@ describe('FolioService', () => { expectToEqual(result, expectedFolioSvgData); }); - it('... should create a new FolioCalculation object when itemOffsetCorrection is undefined', () => { + it('... should create a new FolioCalculation object when contentSegmentOffsetCorrection is undefined', () => { // Create mock FolioSettings and Folio objects const folioSettings: FolioSettings = expectedFolioSettings; const folio: Folio = expectedConvolutes[0].folios[0]; const expectedFolioSvgDataWithoutOffset = new FolioSvgData(new FolioCalculation(folioSettings, folio, 0)); - (folioService as any)._itemOffsetCorrection = undefined; + (folioService as any)._contentSegmentOffsetCorrection = undefined; const result = folioService.getFolioSvgData(folioSettings, folio); @@ -512,7 +515,7 @@ describe('FolioService', () => { }); }); - it('... should append as many line elements as items in systemArray to each system line group', () => { + it('... should append as many line elements as content segments in systemArray to each system line group', () => { const systemLineGroups = svgSheetGroup.selectAll('.system-line-group').nodes(); systemLineGroups.forEach((group, i) => { @@ -568,7 +571,7 @@ describe('FolioService', () => { svgSheetGroup.remove(); }); - it('... should not do anything if there are no content items', () => { + it('... should not do anything if there are no content content segments', () => { const expectedCount = expectedFolioSvgData.contentSegments.length; const folioSvgDataWithEmptyContent: FolioSvgData = { @@ -582,98 +585,101 @@ describe('FolioService', () => { folioSvgDataWithEmptyContent ); - expectToBe(emptySvgSheetGroup.selectAll('g.item-group').size(), 0); + expectToBe(emptySvgSheetGroup.selectAll('g.content-segment-group').size(), 0); expectSpyCall(appendContentSegmentGroupSpy, expectedCount); expectSpyCall(appendContentSegmentLinkSpy, expectedCount); expectSpyCall(appendContentSegmentLinkLabelSpy, expectedCount); expectSpyCall(appendContentSegmentLinkPolygonSpy, expectedCount); }); - it('... should trigger `_appendContentSegmentGroup` for each item', () => { + it('... should trigger `_appendContentSegmentGroup` for each content segment', () => { expectSpyCall(appendContentSegmentGroupSpy, expectedFolioSvgData.contentSegments.length); }); - it('... should append one item group to the SVG sheet group for each item', () => { - const itemGroups = svgSheetGroup.selectAll('g.item-group'); - expectToBe(itemGroups.size(), expectedFolioSvgData.contentSegments.length); + it('... should append one content segment group to the SVG sheet group for each content segment', () => { + const contentSegmentGroups = svgSheetGroup.selectAll('g.content-segment-group'); + expectToBe(contentSegmentGroups.size(), expectedFolioSvgData.contentSegments.length); }); - it('... should trigger `_appendContentSegmentLink` for each item group', () => { + it('... should trigger `_appendContentSegmentLink` for each content segment group', () => { expectSpyCall(appendContentSegmentLinkSpy, expectedFolioSvgData.contentSegments.length); - const itemGroups = svgSheetGroup.selectAll('g.item-group').nodes(); + const contentSegmentGroups = svgSheetGroup.selectAll('g.content-segment-group').nodes(); expectedFolioSvgData.contentSegments.forEach((_contentContentSegment, i) => { - const itemGroup = D3_SELECTION.select(itemGroups[i]); + const contentSegmentGroup = D3_SELECTION.select(contentSegmentGroups[i]); const callArgs = appendContentSegmentLinkSpy.calls.argsFor(i); - expectToEqual(callArgs, [itemGroup]); + expectToEqual(callArgs, [contentSegmentGroup]); }); }); - it('... should append one link element to each item group', () => { - const itemGroups = svgSheetGroup.selectAll('g.item-group').nodes(); + it('... should append one link element to each content segment group', () => { + const contentSegmentGroups = svgSheetGroup.selectAll('g.content-segment-group').nodes(); - itemGroups.forEach((itemGroup, i) => { - const group = D3_SELECTION.select(itemGroup); - const itemLink = group.select('a'); + contentSegmentGroups.forEach((contentSegmentGroup, i) => { + const group = D3_SELECTION.select(contentSegmentGroup); + const contentSegmentLink = group.select('a'); - expect(itemLink).toBeDefined(); + expect(contentSegmentLink).toBeDefined(); expectToBe(group.selectAll('a').size(), 1); }); }); - it('... should trigger `_appendContentSegmentLinkPolygon` for each item link', () => { + it('... should trigger `_appendContentSegmentLinkPolygon` for each content segment link', () => { expectSpyCall(appendContentSegmentLinkPolygonSpy, expectedFolioSvgData.contentSegments.length); - const itemGroups = svgSheetGroup.selectAll('g.item-group').nodes(); + const contentSegmentGroups = svgSheetGroup.selectAll('g.content-segment-group').nodes(); expectedFolioSvgData.contentSegments.forEach((_contentSegment, i) => { - const itemGroup = D3_SELECTION.select(itemGroups[i]); - const itemLink = itemGroup.select('a'); + const contentSegmentGroup = D3_SELECTION.select(contentSegmentGroups[i]); + const contentSegmentLink = contentSegmentGroup.select('a'); const callArgs = appendContentSegmentLinkPolygonSpy.calls.argsFor(i); - expectToEqual(callArgs, [itemLink, expectedFolioSvgData.contentSegments[i].polygonCornerPoints]); + expectToEqual(callArgs, [ + contentSegmentLink, + expectedFolioSvgData.contentSegments[i].polygonCornerPoints, + ]); }); }); - it('... should append a polygon element to each item link', () => { - const itemGroups = svgSheetGroup.selectAll('g.item-group').nodes(); + it('... should append a polygon element to each content segment link', () => { + const contentSegmentGroups = svgSheetGroup.selectAll('g.content-segment-group').nodes(); - itemGroups.forEach((itemGroup, i) => { - const group = D3_SELECTION.select(itemGroup); - const itemLink = group.select('a'); - const polygonElement = itemLink.select('polygon'); + contentSegmentGroups.forEach((contentSegmentGroup, i) => { + const group = D3_SELECTION.select(contentSegmentGroup); + const contentSegmentLink = group.select('a'); + const polygonElement = contentSegmentLink.select('polygon'); expect(polygonElement).toBeDefined(); - expectToBe(itemLink.selectAll('polygon').size(), 1); + expectToBe(contentSegmentLink.selectAll('polygon').size(), 1); }); }); - it('... should trigger `_appendContentSegmentLinkLabel` for each item link', () => { + it('... should trigger `_appendContentSegmentLinkLabel` for each content segment link', () => { expectSpyCall(appendContentSegmentLinkLabelSpy, expectedFolioSvgData.contentSegments.length); - const itemGroups = svgSheetGroup.selectAll('g.item-group').nodes(); + const contentSegmentGroups = svgSheetGroup.selectAll('g.content-segment-group').nodes(); expectedFolioSvgData.contentSegments.forEach((_contentSegment, i) => { - const itemGroup = D3_SELECTION.select(itemGroups[i]); - const itemLink = itemGroup.select('a'); + const contentSegmentGroup = D3_SELECTION.select(contentSegmentGroups[i]); + const contentSegmentLink = contentSegmentGroup.select('a'); const callArgs = appendContentSegmentLinkLabelSpy.calls.argsFor(i); - expectToEqual(callArgs, [itemLink, expectedFolioSvgData.contentSegments[i]]); + expectToEqual(callArgs, [contentSegmentLink, expectedFolioSvgData.contentSegments[i]]); }); }); - it('... should append a text label with tspans to each item link', () => { - const itemGroups = svgSheetGroup.selectAll('g.item-group').nodes(); + it('... should append a text label with tspans to each content segment link', () => { + const contentSegmentGroups = svgSheetGroup.selectAll('g.content-segment-group').nodes(); - itemGroups.forEach((itemGroup, i) => { - const group = D3_SELECTION.select(itemGroup); - const itemLink = group.select('a'); - const textElement = itemLink.select('text'); + contentSegmentGroups.forEach((contentSegmentGroup, i) => { + const group = D3_SELECTION.select(contentSegmentGroup); + const contentSegmentLink = group.select('a'); + const textElement = contentSegmentLink.select('text'); expect(textElement).toBeDefined(); - expectToBe(itemLink.selectAll('text').size(), 1); + expectToBe(contentSegmentLink.selectAll('text').size(), 1); const tspans = textElement.selectAll('tspan'); const expectedLabels = expectedFolioSvgData.contentSegments[i].segmentLabelArray; @@ -772,19 +778,19 @@ describe('FolioService', () => { }); it('... should trigger `_appendContentSegmentGroupTitle` with correct arguments', () => { - const itemGroup = svgSheetGroup.select('g.item-group'); + const contentSegmentGroup = svgSheetGroup.select('g.content-segment-group'); - expectSpyCall(appendContentSegmentGroupTitleSpy, 1, [itemGroup, expectedContentSegment]); + expectSpyCall(appendContentSegmentGroupTitleSpy, 1, [contentSegmentGroup, expectedContentSegment]); }); - it('... should trigger the referenced `selectSvgSheet` method when the item is selectable and clicked', () => { - const itemGroup = svgSheetGroup.select('g.item-group'); + it('... should trigger the referenced `selectSvgSheet` method when the content segment is selectable and clicked', () => { + const contentSegmentGroup = svgSheetGroup.select('g.content-segment-group'); expectedContentSegment.selectable = true; folioService.ref = refMock; // Dispatch a click event manually - (itemGroup.node() as Element).dispatchEvent(new Event('click')); + (contentSegmentGroup.node() as Element).dispatchEvent(new Event('click')); expectSpyCall(refMock.selectSvgSheet, 1, [ expectedContentSegment.complexId, @@ -792,14 +798,14 @@ describe('FolioService', () => { ]); }); - it('... should trigger the referenced `openModal` method when the item is not selectable and clicked', () => { - const itemGroup = svgSheetGroup.select('g.item-group'); + it('... should trigger the referenced `openModal` method when the content segment is not selectable and clicked', () => { + const contentSegmentGroup = svgSheetGroup.select('g.content-segment-group'); expectedContentSegment.selectable = false; folioService.ref = refMock; // Dispatch a click event manually - (itemGroup.node() as Element).dispatchEvent(new Event('click')); + (contentSegmentGroup.node() as Element).dispatchEvent(new Event('click')); expectSpyCall(refMock.openModal, 1, expectedContentSegment.linkTo); }); @@ -813,7 +819,7 @@ describe('FolioService', () => { describe('... when called', () => { let svgSheetGroup: D3_SELECTION.Selection; - let itemGroup: D3_SELECTION.Selection; + let contentSegmentGroup: D3_SELECTION.Selection; let expectedContentSegment: FolioSvgContentSegment; beforeEach(() => { @@ -821,7 +827,7 @@ describe('FolioService', () => { expectedContentSegment = expectedFolioSvgData.contentSegments[0]; - itemGroup = (folioService as any)._appendContentSegmentGroupElement( + contentSegmentGroup = (folioService as any)._appendContentSegmentGroupElement( svgSheetGroup, expectedContentSegment ); @@ -836,9 +842,9 @@ describe('FolioService', () => { svgSheetGroup, 'g', { - itemGroupId: expectedContentSegment.segmentLabel, - itemId: expectedContentSegment.sheetId, - class: 'item-group', + contentSegmentGroupId: expectedContentSegment.segmentLabel, + contentSegmentId: expectedContentSegment.sheetId, + class: 'content-segment-group', stroke: expectedFgColor, fill: expectedFgColor, }, @@ -846,59 +852,61 @@ describe('FolioService', () => { }); it('... should append one group element to the SVG sheet group', () => { - expect(itemGroup).toBeDefined(); + expect(contentSegmentGroup).toBeDefined(); expectToBe(svgSheetGroup.selectAll('g').size(), 1); }); - it('... should set the `itemGroupId` attribute of the group element', () => { - expectToBe(itemGroup.attr('itemGroupId'), expectedContentSegment.segmentLabel); + it('... should set the `contentSegmentGroupId` attribute of the group element', () => { + expectToBe(contentSegmentGroup.attr('contentSegmentGroupId'), expectedContentSegment.segmentLabel); }); - it('... should set the `itemId` attribute of the group element', () => { - expectToBe(itemGroup.attr('itemId'), expectedContentSegment.sheetId); + it('... should set the `contentSegmentId` attribute of the group element', () => { + expectToBe(contentSegmentGroup.attr('contentSegmentId'), expectedContentSegment.sheetId); }); it('... should set the `class` attribute of the group element', () => { - expectToBe(itemGroup.attr('class'), 'item-group'); + expectToBe(contentSegmentGroup.attr('class'), 'content-segment-group'); }); it('... should set the correct `stroke` attribute of the group element (if selectable)', () => { - expectToBe(itemGroup.attr('stroke'), expectedFgColor); + expectToBe(contentSegmentGroup.attr('stroke'), expectedFgColor); }); it('... should set the correct `stroke` attribute of the group element (if not selectable)', () => { expectedContentSegment.selectable = false; - itemGroup = (folioService as any)._appendContentSegmentGroupElement( + contentSegmentGroup = (folioService as any)._appendContentSegmentGroupElement( svgSheetGroup, expectedContentSegment ); - expectToBe(itemGroup.attr('stroke'), expectedDisabledColor); + expectToBe(contentSegmentGroup.attr('stroke'), expectedDisabledColor); }); it('... should set the correct `fill` attribute of the group element (if selectable)', () => { - expectToBe(itemGroup.attr('fill'), expectedFgColor); + expectToBe(contentSegmentGroup.attr('fill'), expectedFgColor); }); it('... should set the correct `fill` attribute of the group element (if not selectable)', () => { expectedContentSegment.selectable = false; - itemGroup = (folioService as any)._appendContentSegmentGroupElement( + contentSegmentGroup = (folioService as any)._appendContentSegmentGroupElement( svgSheetGroup, expectedContentSegment ); - expectToBe(itemGroup.attr('fill'), expectedDisabledColor); + expectToBe(contentSegmentGroup.attr('fill'), expectedDisabledColor); }); it('... should only have specified attribute', () => { - const expectedAttributes = ['itemGroupId', 'itemId', 'class', 'stroke', 'fill'].map(attr => - attr.toLowerCase() + const expectedAttributes = ['contentSegmentGroupId', 'contentSegmentId', 'class', 'stroke', 'fill'].map( + attr => attr.toLowerCase() + ); + const actualAttributes = Array.from((contentSegmentGroup.node() as Element).attributes).map( + attr => attr.name ); - const actualAttributes = Array.from((itemGroup.node() as Element).attributes).map(attr => attr.name); - expectToBe((itemGroup.node() as Element).attributes.length, 5); + expectToBe((contentSegmentGroup.node() as Element).attributes.length, 5); expectToEqual(actualAttributes, expectedAttributes); }); }); @@ -910,17 +918,17 @@ describe('FolioService', () => { }); describe('... when called', () => { - let itemGroup: D3_SELECTION.Selection; + let contentSegmentGroup: D3_SELECTION.Selection; let expectedContentSegment: FolioSvgContentSegment; beforeEach(() => { // Create a new SVG group for testing const svg = D3_SELECTION.create('svg'); - itemGroup = svg.append('g'); + contentSegmentGroup = svg.append('g'); expectedContentSegment = expectedFolioSvgData.contentSegments[0]; - (folioService as any)._appendContentSegmentGroupTitle(itemGroup, expectedContentSegment); + (folioService as any)._appendContentSegmentGroupTitle(contentSegmentGroup, expectedContentSegment); }); afterEach(() => { @@ -928,24 +936,24 @@ describe('FolioService', () => { }); it('... should trigger `_appendSvgElementWithAttrs` with correct arguments', () => { - expectSpyCall(appendSvgElementWithAttrsSpy, 1, [itemGroup, 'title', {}]); + expectSpyCall(appendSvgElementWithAttrsSpy, 1, [contentSegmentGroup, 'title', {}]); }); it('... should append a title element to the SVG group', () => { - const titleElement = itemGroup.select('title'); + const titleElement = contentSegmentGroup.select('title'); expect(titleElement).toBeDefined(); - expectToBe(itemGroup.selectAll('title').size(), 1); + expectToBe(contentSegmentGroup.selectAll('title').size(), 1); }); it('... should set the text content of the title element', () => { - const titleElement = itemGroup.select('title'); + const titleElement = contentSegmentGroup.select('title'); expectToBe(titleElement.text(), expectedContentSegment.segmentLabel); }); it('... should not have any attributes', () => { - const titleElement = itemGroup.select('title'); + const titleElement = contentSegmentGroup.select('title'); const expectedAttributes = []; const actualAttributes = Array.from((titleElement.node() as Element).attributes).map(attr => attr.name); @@ -962,14 +970,14 @@ describe('FolioService', () => { }); describe('... when called', () => { - let itemGroup: D3_SELECTION.Selection; + let contentSegmentGroup: D3_SELECTION.Selection; beforeEach(() => { // Create a new SVG group for testing const svg = D3_SELECTION.create('svg'); - itemGroup = svg.append('g'); + contentSegmentGroup = svg.append('g'); - (folioService as any)._appendContentSegmentLink(itemGroup); + (folioService as any)._appendContentSegmentLink(contentSegmentGroup); }); afterEach(() => { @@ -977,24 +985,28 @@ describe('FolioService', () => { }); it('... should trigger `_appendSvgElementWithAttrs` with correct arguments', () => { - expectSpyCall(appendSvgElementWithAttrsSpy, 1, [itemGroup, 'a', { class: 'item-link' }]); + expectSpyCall(appendSvgElementWithAttrsSpy, 1, [ + contentSegmentGroup, + 'a', + { class: 'content-segment-link' }, + ]); }); it('... should append one link element to the SVG group', () => { - const linkElement = itemGroup.select('a'); + const linkElement = contentSegmentGroup.select('a'); expect(linkElement).toBeDefined(); - expectToBe(itemGroup.selectAll('a').size(), 1); + expectToBe(contentSegmentGroup.selectAll('a').size(), 1); }); it('... should set the `class` attribute of the link element', () => { - const linkElement = itemGroup.select('a'); + const linkElement = contentSegmentGroup.select('a'); - expectToBe(linkElement.attr('class'), 'item-link'); + expectToBe(linkElement.attr('class'), 'content-segment-link'); }); it('... should only have specified attribute', () => { - const linkElement = itemGroup.select('a'); + const linkElement = contentSegmentGroup.select('a'); const expectedAttributes = ['class'].map(attr => attr.toLowerCase()); const actualAttributes = Array.from((linkElement.node() as Element).attributes).map(attr => attr.name); @@ -1011,17 +1023,17 @@ describe('FolioService', () => { }); describe('... when called', () => { - let itemLink: D3_SELECTION.Selection; + let contentSegmentLink: D3_SELECTION.Selection; let expectedContentSegment: FolioSvgContentSegment; beforeEach(() => { // Create a new SVG group for testing - const itemGroup = D3_SELECTION.create('g'); - itemLink = itemGroup.append('svg:a'); + const contentSegmentGroup = D3_SELECTION.create('g'); + contentSegmentLink = contentSegmentGroup.append('svg:a'); expectedContentSegment = expectedFolioSvgData.contentSegments[0]; - (folioService as any)._appendContentSegmentLinkLabel(itemLink, expectedContentSegment); + (folioService as any)._appendContentSegmentLinkLabel(contentSegmentLink, expectedContentSegment); }); afterEach(() => { @@ -1030,31 +1042,34 @@ describe('FolioService', () => { it('... should trigger `_appendContentSegmentLinkLabelTextElement` with correct arguments', () => { expectSpyCall(appendContentSegmentLinkLabelTextElementSpy, 1, [ - itemLink, + contentSegmentLink, expectedContentSegment.centeredXPosition, expectedContentSegment.centeredYPosition, ]); }); it('... should trigger `_appendContentSegmentLinkLabelTspanElements` with correct arguments', () => { - const itemLinkLabel = itemLink.select('text'); + const contentSegmentLinkLabel = contentSegmentLink.select('text'); expectSpyCall(appendContentSegmentLinkLabelTspanElementsSpy, 1, [ - itemLinkLabel, + contentSegmentLinkLabel, expectedContentSegment, ]); }); it('... should rotate the label if reversed is true', () => { - const itemLinkReversed = D3_SELECTION.create('svg:a'); + const contentSegmentLinkReversed = D3_SELECTION.create('svg:a'); expectedContentSegment.reversed = true; - (folioService as any)._appendContentSegmentLinkLabel(itemLinkReversed, expectedContentSegment); + (folioService as any)._appendContentSegmentLinkLabel( + contentSegmentLinkReversed, + expectedContentSegment + ); - const itemLinkLabel = itemLinkReversed.select('text'); + const contentSegmentLinkLabel = contentSegmentLinkReversed.select('text'); expectToBe( - itemLinkLabel.attr('transform'), + contentSegmentLinkLabel.attr('transform'), `rotate(${expectedContentSegmentReversedRotationAngle}, ${expectedContentSegment.centeredXPosition}, ${expectedContentSegment.centeredYPosition})` ); }); @@ -1067,18 +1082,18 @@ describe('FolioService', () => { }); describe('... when called', () => { - let itemLink: D3_SELECTION.Selection; + let contentSegmentLink: D3_SELECTION.Selection; let expectedContentSegment: FolioSvgContentSegment; beforeEach(() => { // Create a new SVG group for testing - const itemGroup = D3_SELECTION.create('g'); - itemLink = itemGroup.append('svg:a'); + const contentSegmentGroup = D3_SELECTION.create('g'); + contentSegmentLink = contentSegmentGroup.append('svg:a'); expectedContentSegment = expectedFolioSvgData.contentSegments[0]; (folioService as any)._appendContentSegmentLinkLabelTextElement( - itemLink, + contentSegmentLink, expectedContentSegment.centeredXPosition, expectedContentSegment.centeredYPosition ); @@ -1090,7 +1105,7 @@ describe('FolioService', () => { it('... should trigger `_appendSvgElementWithAttrs` with correct arguments', () => { const attributes = { - class: 'item-label', + class: 'content-segment-label', x: expectedContentSegment.centeredXPosition, y: expectedContentSegment.centeredYPosition, style: expectedContentSegmentFontStyle, @@ -1098,54 +1113,54 @@ describe('FolioService', () => { attributes['dominant-baseline'] = 'middle'; attributes['text-anchor'] = 'middle'; - expectSpyCall(appendSvgElementWithAttrsSpy, 1, [itemLink, 'text', attributes]); + expectSpyCall(appendSvgElementWithAttrsSpy, 1, [contentSegmentLink, 'text', attributes]); }); - it('... should append one text element to the SVG item link', () => { - const textElement = itemLink.select('text'); + it('... should append one text element to the SVG content segment link', () => { + const textElement = contentSegmentLink.select('text'); expect(textElement).toBeDefined(); - expectToBe(itemLink.selectAll('text').size(), 1); + expectToBe(contentSegmentLink.selectAll('text').size(), 1); }); it('... should set the `class` attribute of the text element', () => { - const textElement = itemLink.select('text'); + const textElement = contentSegmentLink.select('text'); - expectToBe(textElement.attr('class'), 'item-label'); + expectToBe(textElement.attr('class'), 'content-segment-label'); }); it('... should set the `x` attribute of the text element', () => { - const textElement = itemLink.select('text'); + const textElement = contentSegmentLink.select('text'); expectToBe(textElement.attr('x'), String(expectedContentSegment.centeredXPosition)); }); it('... should set the `y` attribute of the text element', () => { - const textElement = itemLink.select('text'); + const textElement = contentSegmentLink.select('text'); expectToBe(textElement.attr('y'), String(expectedContentSegment.centeredYPosition)); }); it('... should set the `style` attribute of the text element', () => { - const textElement = itemLink.select('text'); + const textElement = contentSegmentLink.select('text'); expectToBe(textElement.attr('style'), expectedContentSegmentFontStyle); }); it('... should set the `dominant-baseline` attribute of the text element', () => { - const textElement = itemLink.select('text'); + const textElement = contentSegmentLink.select('text'); expectToBe(textElement.attr('dominant-baseline'), 'middle'); }); it('... should set the `text-anchor` attribute of the text element', () => { - const textElement = itemLink.select('text'); + const textElement = contentSegmentLink.select('text'); expectToBe(textElement.attr('text-anchor'), 'middle'); }); it('... should only have specified attributes', () => { - const textElement = itemLink.select('text'); + const textElement = contentSegmentLink.select('text'); const expectedAttributes = ['class', 'x', 'y', 'style', 'dominant-baseline', 'text-anchor'].map(attr => attr.toLowerCase() @@ -1169,8 +1184,8 @@ describe('FolioService', () => { beforeEach(() => { // Create a new SVG group for testing - const itemGroup = D3_SELECTION.create('g'); - labelSelection = itemGroup.append('text'); + const contentSegmentGroup = D3_SELECTION.create('g'); + labelSelection = contentSegmentGroup.append('text'); expectedContentSegment = expectedFolioSvgData.contentSegments[0]; @@ -1184,7 +1199,7 @@ describe('FolioService', () => { D3_SELECTION.select('g').remove(); }); - it('... should trigger `_appendSvgElementWithAttrs` with correct arguments for each item in the labelArray', () => { + it('... should trigger `_appendSvgElementWithAttrs` with correct arguments for each content segment in the labelArray', () => { const labelArrayLength = expectedContentSegment.segmentLabelArray.length; const commonArgs = [labelSelection, 'tspan']; const additionalAttributes = { @@ -1205,13 +1220,13 @@ describe('FolioService', () => { }); }); - it('... should append a tspan element for each item in the labelArray', () => { + it('... should append a tspan element for each content segment in the labelArray', () => { const labelArrayLength = expectedContentSegment.segmentLabelArray.length; expectToBe(labelSelection.selectAll('tspan').size(), labelArrayLength); }); - it('... should append correct text content for each tspan element of an item', () => { + it('... should append correct text content for each tspan element of an content segment', () => { const tspanElements = labelSelection.selectAll('tspan').nodes(); expectedContentSegment.segmentLabelArray.forEach((label, i) => { @@ -1267,28 +1282,28 @@ describe('FolioService', () => { expectToEqual(actualAttributes, expectedAttributes); }); - it('... should not append a second tspan element if the labelArray has only one item', () => { - const itemLinkLabel = D3_SELECTION.create('text'); + it('... should not append a second tspan element if the labelArray has only one content segment', () => { + const contentSegmentLinkLabel = D3_SELECTION.create('text'); expectedContentSegment.segmentLabelArray = ['test']; (folioService as any)._appendContentSegmentLinkLabelTspanElements( - itemLinkLabel, + contentSegmentLinkLabel, expectedContentSegment ); - expectToBe(itemLinkLabel.selectAll('tspan').size(), 1); + expectToBe(contentSegmentLinkLabel.selectAll('tspan').size(), 1); }); it('... should not append a tspan element if the labelArray is empty', () => { - const itemLinkLabel = D3_SELECTION.create('text'); + const contentSegmentLinkLabel = D3_SELECTION.create('text'); expectedContentSegment.segmentLabelArray = []; (folioService as any)._appendContentSegmentLinkLabelTspanElements( - itemLinkLabel, + contentSegmentLinkLabel, expectedContentSegment ); - expectToBe(itemLinkLabel.selectAll('tspan').size(), 0); + expectToBe(contentSegmentLinkLabel.selectAll('tspan').size(), 0); }); }); }); @@ -1299,18 +1314,18 @@ describe('FolioService', () => { }); describe('... when called', () => { - let itemLink: D3_SELECTION.Selection; + let contentSegmentLink: D3_SELECTION.Selection; let expectedContentSegment: FolioSvgContentSegment; beforeEach(() => { // Create a new SVG group for testing - const itemGroup = D3_SELECTION.create('g'); - itemLink = itemGroup.append('svg:a'); + const contentSegmentGroup = D3_SELECTION.create('g'); + contentSegmentLink = contentSegmentGroup.append('svg:a'); expectedContentSegment = expectedFolioSvgData.contentSegments[0]; (folioService as any)._appendContentSegmentLinkPolygon( - itemLink, + contentSegmentLink, expectedContentSegment.polygonCornerPoints ); }); @@ -1321,48 +1336,48 @@ describe('FolioService', () => { it('... should trigger `_appendSvgElementWithAttrs` with correct arguments', () => { const attributes = { - class: 'item-shape', + class: 'content-segment-shape', points: expectedContentSegment.polygonCornerPoints, fill: expectedContentSegmentFillColor, }; attributes['stroke-width'] = expectedContentSegmentStrokeWidth; - expectSpyCall(appendSvgElementWithAttrsSpy, 1, [itemLink, 'polygon', attributes]); + expectSpyCall(appendSvgElementWithAttrsSpy, 1, [contentSegmentLink, 'polygon', attributes]); }); - it('... should append one polygon element to the SVG item link', () => { - const polygonElement = itemLink.select('polygon'); + it('... should append one polygon element to the SVG content segment link', () => { + const polygonElement = contentSegmentLink.select('polygon'); expect(polygonElement).toBeDefined(); - expectToBe(itemLink.selectAll('polygon').size(), 1); + expectToBe(contentSegmentLink.selectAll('polygon').size(), 1); }); it('... should set the `class` attribute of the polygon element', () => { - const polygonElement = itemLink.select('polygon'); + const polygonElement = contentSegmentLink.select('polygon'); - expectToBe(polygonElement.attr('class'), 'item-shape'); + expectToBe(polygonElement.attr('class'), 'content-segment-shape'); }); it('... should set the `points` attribute of the polygon element', () => { - const polygonElement = itemLink.select('polygon'); + const polygonElement = contentSegmentLink.select('polygon'); expectToBe(polygonElement.attr('points'), expectedContentSegment.polygonCornerPoints); }); it('... should set the `fill` attribute of the polygon element', () => { - const polygonElement = itemLink.select('polygon'); + const polygonElement = contentSegmentLink.select('polygon'); expectToBe(polygonElement.attr('fill'), expectedContentSegmentFillColor); }); it('... should set the `stroke-width` attribute of the polygon element', () => { - const polygonElement = itemLink.select('polygon'); + const polygonElement = contentSegmentLink.select('polygon'); expectToBe(polygonElement.attr('stroke-width'), String(expectedContentSegmentStrokeWidth)); }); it('... should only have specified attributes', () => { - const polygonElement = itemLink.select('polygon'); + const polygonElement = contentSegmentLink.select('polygon'); const expectedAttributes = ['class', 'points', 'fill', 'stroke-width'].map(attr => attr.toLowerCase()); const actualAttributes = Array.from((polygonElement.node() as Element).attributes).map( diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts index 45c3acf000..9ba85856b9 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts @@ -53,40 +53,40 @@ export class FolioService { private _fgColor = 'orange'; /** - * Private variable: _itemFillColor. + * Private variable: _contentSegmentFillColor. * - * It keeps the fill color for the items. + * It keeps the fill color for the content segments. */ - private _itemFillColor = '#eeeeee'; + private _contentSegmentFillColor = '#eeeeee'; /** - * Private variable: _itemFontStyle. + * Private variable: _contentSegmentFontStyle. * - * It keeps the font style for the items. + * It keeps the font style for the content segments. */ - private _itemFontStyle = '11px Source Sans Pro, source-sans-pro, sans-serif'; + private _contentSegmentFontStyle = '11px Source Sans Pro, source-sans-pro, sans-serif'; /** - * Private variable: _itemOffsetCorrection. + * Private variable: _contentSegmentOffsetCorrection. * * It corrects the offset (in px) to avoid - * border collision between rendered SVG items. + * border collision between rendered SVG content segments. */ - private _itemOffsetCorrection = 4; + private _contentSegmentOffsetCorrection = 4; /** - * Private variable: _itemRotationAngle. + * Private variable: _contentSegmentRotationAngle. * - * It keeps the rotation angle for the reversed items. + * It keeps the rotation angle for the reversed content segments. */ - private _itemReversedRotationAngle = 180; + private _contentSegmentReversedRotationAngle = 180; /** - * Private variable: _itemStrokeWidth. + * Private variable: _contentSegmentStrokeWidth. * - * It keeps the stroke width for the items. + * It keeps the stroke width for the content segments. */ - private _itemStrokeWidth = 2; + private _contentSegmentStrokeWidth = 2; /** * Private variable: _sheetFillColor. @@ -121,7 +121,7 @@ export class FolioService { */ getFolioSvgData(folioSettings: FolioSettings, folio: Folio): FolioSvgData { // Calculate values for SVG - const calculation = new FolioCalculation(folioSettings, folio, this._itemOffsetCorrection); + const calculation = new FolioCalculation(folioSettings, folio, this._contentSegmentOffsetCorrection); // Get SVG data from calculation return new FolioSvgData(calculation); @@ -151,7 +151,7 @@ export class FolioService { * Public method: addFolioToSvgCanvas. * * It coordinates the drawing of the calculated folio SVG data - * for a folio's sheet, systems and items to the folio SVG canvas. + * for a folio's sheet, systems and content segments to the folio SVG canvas. * * @param {D3Selection} svgCanvas The given SVG canvas selection. * @param {FolioSvgData} folioSvgData The given calculated folio SVG data. @@ -171,7 +171,7 @@ export class FolioService { // Draw systems. this._addFolioSystemsToSvgCanvas(svgSheetGroup, folioSvgData); - // Draw items. + // Draw content segments. this._addFolioContentSegmentsToSvgCanvas(svgSheetGroup, folioSvgData); } @@ -222,12 +222,12 @@ export class FolioService { /** * Private method: _addFolioContentSegmentsToSvgCanvas. * - * It adds the folio's items from the calculated + * It adds the folio's content segments from the calculated * folio SVG data to the folio SVG canvas. * * @param {D3Selection} svgSheetGroup The given SVG sheet group selection. * @param {FolioSvgData} folioSvgData The given calculated folio SVG data. - * @returns {void} Adds the items to the SVG canvas selection. + * @returns {void} Adds the content segments to the SVG canvas selection. */ private _addFolioContentSegmentsToSvgCanvas(svgSheetGroup: D3Selection, folioSvgData: FolioSvgData): void { folioSvgData?.contentSegments?.forEach((contentSegment: FolioSvgContentSegment) => { @@ -235,16 +235,16 @@ export class FolioService { return; } - // Draw item group. + // Draw content segment group. const svgContentSegmentGroup = this._appendContentSegmentGroup(svgSheetGroup, contentSegment); - // Draw item link. + // Draw content segment link. const svgContentSegmentLink = this._appendContentSegmentLink(svgContentSegmentGroup); - // Draw item polygon. + // Draw content segment polygon. this._appendContentSegmentLinkPolygon(svgContentSegmentLink, contentSegment.polygonCornerPoints); - // Draw item link label. + // Draw content segment link label. this._appendContentSegmentLinkLabel(svgContentSegmentLink, contentSegment); }); } @@ -268,49 +268,49 @@ export class FolioService { /** * Private method: _appendContentSegmentGroup. * - * It appends an item group to the sheet group. + * It appends an content segment group to the sheet group. * * @param {D3Selection} svgSheetGroup The given SVG sheet group selection. * @param {FolioSvgContentSegment} contentSegment The given content segment. - * @returns {D3Selection} Appends an item group to the sheet group selection. + * @returns {D3Selection} Appends an content segment group to the sheet group selection. */ private _appendContentSegmentGroup( svgSheetGroup: D3Selection, contentSegment: FolioSvgContentSegment ): D3Selection { - // Draw item group element. - const itemGroup = this._appendContentSegmentGroupElement(svgSheetGroup, contentSegment); + // Draw content segment group element. + const contentSegmentGroup = this._appendContentSegmentGroupElement(svgSheetGroup, contentSegment); - // Apply title when hovering item - this._appendContentSegmentGroupTitle(itemGroup, contentSegment); + // Apply title when hovering content segment. + this._appendContentSegmentGroupTitle(contentSegmentGroup, contentSegment); // Add click event handler - itemGroup.on('click', () => + contentSegmentGroup.on('click', () => contentSegment.selectable ? this.ref.selectSvgSheet(contentSegment.complexId, contentSegment.sheetId) : this.ref.openModal(contentSegment.linkTo) ); - return itemGroup; + return contentSegmentGroup; } /** * Private method: _appendContentSegmentGroupElement. * - * It appends an item group element to the sheet group. + * It appends an content segment group element to the sheet group. * * @param {D3Selection} svgSheetGroup The given SVG sheet group selection. * @param {FolioSvgContentSegment} contentSegment The given content segment. - * @returns {D3Selection} Appends an item group element to the sheet group selection. + * @returns {D3Selection} Appends an content segment group element to the sheet group selection. */ private _appendContentSegmentGroupElement( svgSheetGroup: D3Selection, contentSegment: FolioSvgContentSegment ): D3Selection { return this._appendSvgElementWithAttrs(svgSheetGroup, 'g', { - itemGroupId: contentSegment.segmentLabel, - itemId: contentSegment.sheetId, - class: 'item-group', + contentSegmentGroupId: contentSegment.segmentLabel, + contentSegmentId: contentSegment.sheetId, + class: 'content-segment-group', stroke: contentSegment.selectable ? this._fgColor : this._disabledColor, fill: contentSegment.selectable ? this._fgColor : this._disabledColor, }); @@ -319,39 +319,39 @@ export class FolioService { /** * Private method: _appendContentSegmentGroupTitle. * - * It appends a title to the item group. + * It appends a title to the content segment group. * - * @param {D3Selection} itemGroup The given SVG item group selection. + * @param {D3Selection} contentSegmentGroup The given SVG content segment group selection. * @param {FolioSvgContentSegment} contentSegment The given content segment. - * @returns {D3Selection} Appends a title to the item group selection. + * @returns {D3Selection} Appends a title to the content segment group selection. */ private _appendContentSegmentGroupTitle( - itemGroup: D3Selection, + contentSegmentGroup: D3Selection, contentSegment: FolioSvgContentSegment ): D3Selection { - return this._appendSvgElementWithAttrs(itemGroup, 'title', {}).text(contentSegment.segmentLabel); + return this._appendSvgElementWithAttrs(contentSegmentGroup, 'title', {}).text(contentSegment.segmentLabel); } /** * Private method: _appendContentSegmentLink. * - * It appends a link to the item group. + * It appends a link to the content segment group. * - * @param {D3Selection} svgContentSegmentGroup The given SVG item group selection. - * @returns {D3Selection} Appends a link to the item group selection. + * @param {D3Selection} svgContentSegmentGroup The given SVG content segment group selection. + * @returns {D3Selection} Appends a link to the content segment group selection. */ private _appendContentSegmentLink(svgContentSegmentGroup: D3Selection): D3Selection { - return this._appendSvgElementWithAttrs(svgContentSegmentGroup, 'a', { class: 'item-link' }); + return this._appendSvgElementWithAttrs(svgContentSegmentGroup, 'a', { class: 'content-segment-link' }); } /** * Private method: _appendContentSegmentLinkLabel. * - * It appends a label to the item link. + * It appends a label to the content segment link. * - * @param {D3Selection} svgContentSegmentLink The given SVG item link selection. + * @param {D3Selection} svgContentSegmentLink The given SVG content segment link selection. * @param {FolioSvgContentSegment} contentSegment The given content segment. - * @returns {D3Selection} Appends a label to the item link selection. + * @returns {D3Selection} Appends a label to the content segment link selection. */ private _appendContentSegmentLinkLabel( svgContentSegmentLink: any, @@ -369,7 +369,7 @@ export class FolioService { if (contentSegment.reversed) { label.attr( 'transform', - `rotate(${this._itemReversedRotationAngle}, ${contentSegment.centeredXPosition}, ${contentSegment.centeredYPosition})` + `rotate(${this._contentSegmentReversedRotationAngle}, ${contentSegment.centeredXPosition}, ${contentSegment.centeredYPosition})` ); } @@ -379,12 +379,12 @@ export class FolioService { /** * Private method: _appendContentSegmentLinkLabelTextElement. * - * It appends a text element to the item link label. + * It appends a text element to the content segment link label. * - * @param {D3Selection} svgContentSegmentLink The given SVG item link selection. + * @param {D3Selection} svgContentSegmentLink The given SVG content segment link selection. * @param {number} centeredXPosition The given centered x position. * @param {number} centeredYPosition The given centered y position. - * @returns {D3Selection} Appends a text element to the item link selection. + * @returns {D3Selection} Appends a text element to the content segment link selection. */ private _appendContentSegmentLinkLabelTextElement( svgContentSegmentLink: D3Selection, @@ -392,10 +392,10 @@ export class FolioService { centeredYPosition: number ): D3Selection { const attributes = { - class: 'item-label', + class: 'content-segment-label', x: centeredXPosition, y: centeredYPosition, - style: this._itemFontStyle, + style: this._contentSegmentFontStyle, }; attributes['dominant-baseline'] = 'middle'; attributes['text-anchor'] = 'middle'; @@ -406,7 +406,7 @@ export class FolioService { /** * Private method: _appendContentSegmentLinkLabelTspanElements. * - * It appends tspan elements to the item link label. + * It appends tspan elements to the content segment link label. * * @param {D3Selection} labelSelection The given label selection. * @param {FolioSvgContentSegment} contentSegment The given content segment. @@ -434,22 +434,22 @@ export class FolioService { /** * Private method: _appendContentSegmentLinkPolygon. * - * It appends a polygon shape to the item link. + * It appends a polygon shape to the content segment link. * - * @param {D3Selection} svgContentSegmentLink The given SVG item link selection. + * @param {D3Selection} svgContentSegmentLink The given SVG content segment link selection. * @param {string} polygonCornerPoints The given polygon corner points. - * @returns {D3Selection} Appends a polygon shape to the item link selection. + * @returns {D3Selection} Appends a polygon shape to the content segment link selection. */ private _appendContentSegmentLinkPolygon( svgContentSegmentLink: D3Selection, polygonCornerPoints: string ): D3Selection { const attributes = { - class: 'item-shape', + class: 'content-segment-shape', points: polygonCornerPoints, - fill: this._itemFillColor, + fill: this._contentSegmentFillColor, }; - attributes['stroke-width'] = this._itemStrokeWidth; + attributes['stroke-width'] = this._contentSegmentStrokeWidth; return this._appendSvgElementWithAttrs(svgContentSegmentLink, 'polygon', attributes); } From c8b02224febbb3038e20851220e812760762c1c6 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Mon, 4 Mar 2024 11:36:17 +0100 Subject: [PATCH 47/63] refactor(edition): refactor FolioCalculationModel (ongoing) --- .eslintrc.json | 6 + .../edition-folio-viewer.component.ts | 2 +- .../folio.service.spec.ts | 32 +- .../edition-folio-viewer/folio.service.ts | 17 +- .../models/folio-calculation.model.ts | 1163 ++++++++++------- .../models/folio-svg-data.model.ts | 20 +- src/assets/themes/scss/main.scss | 6 +- 7 files changed, 764 insertions(+), 482 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index b21bfc322c..9958b463c8 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -71,6 +71,12 @@ "leadingUnderscore": "allow", "trailingUnderscore": "allow" }, + { + "selector": ["classProperty"], + "modifiers": ["private", "readonly"], + "format": ["camelCase", "UPPER_CASE"], + "leadingUnderscore": "allow" + }, { "selector": ["classProperty", "classMethod"], "modifiers": ["private"], diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.ts index 1eda4ecfee..72b3012333 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/edition-folio-viewer.component.ts @@ -323,7 +323,7 @@ export class EditionFolioViewerComponent implements OnChanges, AfterViewChecked * * @returns {D3Selection} The D3 selection of the selector. */ - private _d3Select(selector: string) { + private _d3Select(selector: string): D3Selection { return D3_SELECTION.select(selector); } } diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts index 4be3e889e0..86045d3aba 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts @@ -540,10 +540,10 @@ describe('FolioService', () => { const expectedLine = expectedFolioSvgData.systems.systemsArrays[i][j]; expectToBe(lineElement.attr('class'), 'system-line'); - expectToBe(lineElement.attr('x1'), String(expectedLine.startPoint.x)); - expectToBe(lineElement.attr('y1'), String(expectedLine.startPoint.y)); - expectToBe(lineElement.attr('x2'), String(expectedLine.endPoint.x)); - expectToBe(lineElement.attr('y2'), String(expectedLine.endPoint.y)); + expectToBe(lineElement.attr('x1'), String(expectedLine.START_POINT.x)); + expectToBe(lineElement.attr('y1'), String(expectedLine.START_POINT.y)); + expectToBe(lineElement.attr('x2'), String(expectedLine.END_POINT.x)); + expectToBe(lineElement.attr('y2'), String(expectedLine.END_POINT.y)); expectToBe(lineElement.attr('stroke'), expectedBgColor); expectToBe(lineElement.attr('stroke-width'), String(expectedSystemsLineStrokeWidth)); expectToBe((lineElement.node() as Element).attributes.length, 7); @@ -638,7 +638,7 @@ describe('FolioService', () => { expectToEqual(callArgs, [ contentSegmentLink, - expectedFolioSvgData.contentSegments[i].polygonCornerPoints, + expectedFolioSvgData.contentSegments[i].segmentVertices, ]); }); }); @@ -1326,7 +1326,7 @@ describe('FolioService', () => { (folioService as any)._appendContentSegmentLinkPolygon( contentSegmentLink, - expectedContentSegment.polygonCornerPoints + expectedContentSegment.segmentVertices ); }); @@ -1337,7 +1337,7 @@ describe('FolioService', () => { it('... should trigger `_appendSvgElementWithAttrs` with correct arguments', () => { const attributes = { class: 'content-segment-shape', - points: expectedContentSegment.polygonCornerPoints, + points: expectedContentSegment.segmentVertices, fill: expectedContentSegmentFillColor, }; attributes['stroke-width'] = expectedContentSegmentStrokeWidth; @@ -1361,7 +1361,7 @@ describe('FolioService', () => { it('... should set the `points` attribute of the polygon element', () => { const polygonElement = contentSegmentLink.select('polygon'); - expectToBe(polygonElement.attr('points'), expectedContentSegment.polygonCornerPoints); + expectToBe(polygonElement.attr('points'), expectedContentSegment.segmentVertices); }); it('... should set the `fill` attribute of the polygon element', () => { @@ -1639,10 +1639,10 @@ describe('FolioService', () => { it('... should trigger `_appendSvgElementWithAttrs` for each line with correct arguments', () => { const attributes = { class: 'system-line', - x1: systemArray.at(-1).startPoint.x, - y1: systemArray.at(-1).startPoint.y, - x2: systemArray.at(-1).endPoint.x, - y2: systemArray.at(-1).endPoint.y, + x1: systemArray.at(-1).START_POINT.x, + y1: systemArray.at(-1).START_POINT.y, + x2: systemArray.at(-1).END_POINT.x, + y2: systemArray.at(-1).END_POINT.y, stroke: expectedBgColor, }; attributes['stroke-width'] = expectedSystemsLineStrokeWidth; @@ -1666,7 +1666,7 @@ describe('FolioService', () => { systemArray.forEach((line, index) => { const lineElement = systemsGroup.selectAll('line').nodes()[index]; - expectToBe(D3_SELECTION.select(lineElement).attr('x1'), String(line.startPoint.x)); + expectToBe(D3_SELECTION.select(lineElement).attr('x1'), String(line.START_POINT.x)); }); }); @@ -1674,7 +1674,7 @@ describe('FolioService', () => { systemArray.forEach((line, index) => { const lineElement = systemsGroup.selectAll('line').nodes()[index]; - expectToBe(D3_SELECTION.select(lineElement).attr('y1'), String(line.startPoint.y)); + expectToBe(D3_SELECTION.select(lineElement).attr('y1'), String(line.START_POINT.y)); }); }); @@ -1682,7 +1682,7 @@ describe('FolioService', () => { systemArray.forEach((line, index) => { const lineElement = systemsGroup.selectAll('line').nodes()[index]; - expectToBe(D3_SELECTION.select(lineElement).attr('x2'), String(line.endPoint.x)); + expectToBe(D3_SELECTION.select(lineElement).attr('x2'), String(line.END_POINT.x)); }); }); @@ -1690,7 +1690,7 @@ describe('FolioService', () => { systemArray.forEach((line, index) => { const lineElement = systemsGroup.selectAll('line').nodes()[index]; - expectToBe(D3_SELECTION.select(lineElement).attr('y2'), String(line.endPoint.y)); + expectToBe(D3_SELECTION.select(lineElement).attr('y2'), String(line.END_POINT.y)); }); }); diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts index 9ba85856b9..8adb82246c 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts @@ -242,7 +242,7 @@ export class FolioService { const svgContentSegmentLink = this._appendContentSegmentLink(svgContentSegmentGroup); // Draw content segment polygon. - this._appendContentSegmentLinkPolygon(svgContentSegmentLink, contentSegment.polygonCornerPoints); + this._appendContentSegmentLinkPolygon(svgContentSegmentLink, contentSegment.segmentVertices); // Draw content segment link label. this._appendContentSegmentLinkLabel(svgContentSegmentLink, contentSegment); @@ -437,16 +437,13 @@ export class FolioService { * It appends a polygon shape to the content segment link. * * @param {D3Selection} svgContentSegmentLink The given SVG content segment link selection. - * @param {string} polygonCornerPoints The given polygon corner points. + * @param {string} segmentVertices The given segment vertices. * @returns {D3Selection} Appends a polygon shape to the content segment link selection. */ - private _appendContentSegmentLinkPolygon( - svgContentSegmentLink: D3Selection, - polygonCornerPoints: string - ): D3Selection { + private _appendContentSegmentLinkPolygon(svgContentSegmentLink: D3Selection, segmentVertices: string): D3Selection { const attributes = { class: 'content-segment-shape', - points: polygonCornerPoints, + points: segmentVertices, fill: this._contentSegmentFillColor, }; attributes['stroke-width'] = this._contentSegmentStrokeWidth; @@ -462,7 +459,6 @@ export class FolioService { * @param {D3Selection} svgSheetGroup The given SVG sheet group selection. * @param {FolioCalculationPoint} upperLeftCorner The given upper left corner point. * @param {FolioCalculationPoint} lowerRightCorner The given lower right corner point. - * @param {string} bgColor The given background color. * @returns {D3Selection} Appends a rectangle to the sheet group selection. */ private _appendSheetGroupRectangle( @@ -506,7 +502,6 @@ export class FolioService { * @param {D3Selection} svgSystemsGroup The given SVG systems group selection. * @param {FolioSvgData} folioSvgData The given calculated folio SVG data. * @param {number} systemIndex The given system index. - * @param {string} bgColor The given background color. * @returns {void} Appends a label to the systems group selection. */ private _appendSystemsGroupLabel( @@ -538,8 +533,8 @@ export class FolioService { */ private _appendSystemsGroupLines(svgSystemsGroup: D3Selection, systemArray: FolioCalculationLine[]): void { systemArray.forEach(line => { - const { x: x1, y: y1 } = line.startPoint; - const { x: x2, y: y2 } = line.endPoint; + const { x: x1, y: y1 } = line.START_POINT; + const { x: x2, y: y2 } = line.END_POINT; const attributes = { class: 'system-line', x1: x1, diff --git a/src/app/views/edition-view/models/folio-calculation.model.ts b/src/app/views/edition-view/models/folio-calculation.model.ts index 7af57a74cd..3e1147c0c1 100644 --- a/src/app/views/edition-view/models/folio-calculation.model.ts +++ b/src/app/views/edition-view/models/folio-calculation.model.ts @@ -1,6 +1,24 @@ import { FolioSettings } from './folio-settings.model'; import { Folio, FolioContent, FolioSection } from './folio.model'; +/** + * Utility function: round. + * + * It rounds a given number to a given number of decimal places. + * JS in-built round-method is sometimes not correct, + * see: {@link http://www.jacklmoore.com/notes/rounding-in-javascript/}. + * + * @param {number} value The given input value to be rounded. + * @param {number} decimals The number of decimal places to round to. + * @returns {number} The rounded number. + */ +function round(value: number, decimals: number): number { + if (Number.isNaN(value)) { + return undefined; + } + return Number(Math.round(Number(value + 'e' + decimals)) + 'e-' + decimals); +} + /** * The FolioCalculationPoint class. * @@ -13,22 +31,12 @@ export class FolioCalculationPoint { /** * The x value (in px) of a point. */ - x: number; + public x: number; /** * The y value (in px) of a point. */ - y: number; - - /** - * Method: add. - * - * It adds x and y values (in px) to an existing point. - * - * @param {number} addX Add to x value. - * @param {number} addY Add to y value. - */ - add: (addX: number, addY: number) => FolioCalculationPoint; + public y: number; /** * Constructor of the FolioCalculationPoint class. @@ -41,11 +49,20 @@ export class FolioCalculationPoint { constructor(x: number, y: number) { this.x = x; this.y = y; - this.add = (addX: number, addY: number) => { - this.x += addX; - this.y += addY; - return this; - }; + } + + /** + * Public method: add. + * + * It adds x and y values (in px) to an existing point. + * + * @param {number} addX Add to x value. + * @param {number} addY Add to y value. + */ + public add(addX: number, addY: number): FolioCalculationPoint { + this.x += addX; + this.y += addY; + return this; } } @@ -61,12 +78,12 @@ export class FolioCalculationLine { /** * The starting point of a line (FolioCalculationPoint). */ - startPoint: FolioCalculationPoint; + public readonly START_POINT: FolioCalculationPoint; /** * The ending point of a line (FolioCalculationPoint). */ - endPoint: FolioCalculationPoint; + public readonly END_POINT: FolioCalculationPoint; /** * Constructor of the FolioCalculationLine class. @@ -77,202 +94,228 @@ export class FolioCalculationLine { * @param {FolioCalculationPoint} endPoint The given ending point. */ constructor(startPoint: FolioCalculationPoint, endPoint: FolioCalculationPoint) { - this.startPoint = startPoint; - this.endPoint = endPoint; + this.START_POINT = startPoint; + this.END_POINT = endPoint; } } /** - * The FolioCalculationContentItemCornerPoints class. + * The FolioCalculationContentSegmentVertices class. * * It is used in the context of the edition folio convolutes - * to calculate the values of a content item's corners on the folio canvas. + * to calculate the values of a content segment's vertices on the folio canvas. * * Not exposed, only called internally from {@link FolioCalculation}. */ -export class FolioCalculationContentItemCornerPoints { +export class FolioCalculationContentSegmentVertices { /** - * The upper left corner point of a content item (FolioCalculationPoint). + * The upper left vertex of a content segment (FolioCalculationPoint). */ - upperLeftCorner: FolioCalculationPoint; + public readonly UPPER_LEFT_VERTEX: FolioCalculationPoint; /** - * The upper right corner point of a content item (FolioCalculationPoint). + * The upper right vertex of a content segment (FolioCalculationPoint). */ - upperRightCorner: FolioCalculationPoint; + public readonly UPPER_RIGHT_VERTEX: FolioCalculationPoint; /** - * The lower right corner point of a content item (FolioCalculationPoint). + * The lower right vertex of a content segment (FolioCalculationPoint). */ - lowerRightCorner: FolioCalculationPoint; + public readonly LOWER_RIGHT_VERTEX: FolioCalculationPoint; /** - * The lower left corner point of a content item (FolioCalculationPoint). + * The lower left vertex of a content segment (FolioCalculationPoint). */ - lowerLeftCorner: FolioCalculationPoint; + public readonly LOWER_LEFT_VERTEX: FolioCalculationPoint; /** - * Constructor of the FolioCalculationContentItemCornerPoints class. + * Constructor of the FolioCalculationContentSegmentVertices class. * * It initializes the class with four points - * for upper and lower left and upper and lower right corners. + * for upper and lower left and upper and lower right vertices. * - * @param {FolioCalculationContentSegment} calculatedContentItem The given calculated content item. + * @param {FolioCalculationContentSegment} calculatedContentSegment The given calculated content segment. */ constructor({ startX, startY, endX, endY }: FolioCalculationContentSegment) { - this.upperLeftCorner = new FolioCalculationPoint(startX, startY); - this.upperRightCorner = new FolioCalculationPoint(endX, startY); - this.lowerRightCorner = new FolioCalculationPoint(endX, endY); - this.lowerLeftCorner = new FolioCalculationPoint(startX, endY); + this.UPPER_LEFT_VERTEX = new FolioCalculationPoint(startX, startY); + this.UPPER_RIGHT_VERTEX = new FolioCalculationPoint(endX, startY); + this.LOWER_RIGHT_VERTEX = new FolioCalculationPoint(endX, endY); + this.LOWER_LEFT_VERTEX = new FolioCalculationPoint(startX, endY); + } + + /** + * Public method: getSegmentVertices. + * + * It returns the vertices of a content segment as a string. + * + * @returns {string} The vertices of a content segment as a string. + */ + public getSegmentVerticesAsString(): string { + return [ + this.UPPER_LEFT_VERTEX.x, + this.UPPER_LEFT_VERTEX.y, + this.UPPER_RIGHT_VERTEX.x, + this.UPPER_RIGHT_VERTEX.y, + this.LOWER_RIGHT_VERTEX.x, + this.LOWER_RIGHT_VERTEX.y, + this.LOWER_LEFT_VERTEX.x, + this.LOWER_LEFT_VERTEX.y, + this.UPPER_LEFT_VERTEX.x, + this.UPPER_LEFT_VERTEX.y, + ].join(' '); } } /** - * The FolioCalculationContentItemCache class. + * The FolioCalculationContentSegmentCache class. * * It is used in the context of the edition folio convolutes - * to calculate the values of a content item cache on the folio canvas. + * to calculate the values of a content segment cache on the folio canvas. * * Not exposed, only called internally from {@link FolioCalculation}. */ -class FolioCalculationContentItemCache { +class FolioCalculationContentSegmentCache { /** - * The section of a content item (FolioSection). + * The section of a content segment (FolioSection). */ section: FolioSection; /** - * The corner points of a content item (FolioCalculationContentItemCornerPoints). + * The vertices of a content segment (FolioCalculationContentSegmentCornerPoints). */ - cornerPoints: FolioCalculationContentItemCornerPoints; + vertices: FolioCalculationContentSegmentVertices; + + constructor() { + this.section = new FolioSection(); + } } /** - * The FolioCalculationContentItem class. + * The FolioCalculationContentSegment class. * * It is used in the context of the edition folio convolutes - * to calculate the values of a content item on the folio canvas. + * to calculate the values of a content segment on the folio canvas. * * Exposed to be used throughout {@link EditionSheetsModule}. */ export class FolioCalculationContentSegment { /** - * The correction value for the offset of the content item (number). + * The correction value for the offset of the content segment (number). */ offsetCorrection: number; /** - * The width including offset of the content item (number). + * The width including offset of the content segment (number). */ widthWithOffset: number; /** - * The width of the content item (number). + * The width of the content segment (number). */ width: number; /** - * The height of the content item (number). + * The height of the content segment (number). */ height: number; /** - * The centered X position of the content item (number). + * The centered X position of the content segment (number). */ centeredXPosition: number; /** - * The centered y position of the content item (number). + * The centered y position of the content segment (number). */ centeredYPosition: number; /** - * The system range of the content item (number). + * The system range of the content segment (number). */ systemRange: number; /** - * The start position (x-value) of the index of the content item (number). + * The start position (x-value) of the index of the content segment (number). */ startXIndex: number; /** - * The start position (y-value) of the index of the content item (number). + * The start position (y-value) of the index of the content segment (number). */ startYIndex: number; /** - * The start position (x-value) of the content item (number). + * The start position (x-value) of the content segment (number). */ startX: number; /** - * The end position (x-value) of the content item (number). + * The end position (x-value) of the content segment (number). */ endX: number; /** - * The start position (y-value) of the content item (number). + * The start position (y-value) of the content segment (number). */ startY: number; /** - * The end position (y-value) of the content item (number). + * The end position (y-value) of the content segment (number). */ endY: number; /** - * The current content item (FolioCalculationContentItemCache). + * The current content segment (FolioCalculationContentSegmentCache). */ - current: FolioCalculationContentItemCache; + current: FolioCalculationContentSegmentCache; /** - * The previous content item (FolioCalculationContentItemCache). + * The previous content segment (FolioCalculationContentSegmentCache). */ - previous: FolioCalculationContentItemCache; + previous: FolioCalculationContentSegmentCache; /** - * The corner points of the content item polygon (string). + * The vertices of the content segment polygon (string). */ - polygonCornerPoints: string; + segmentVertices: string; /** - * The label for the id of the edition complex of the content item (string). + * The label for the id of the edition complex of the content segment (string). */ complexId: string; /** - * The label for the id of the content item (string). + * The label for the id of the content segment (string). */ sheetId: string; /** - * The array of label strings for the content item (string[]). + * The array of label strings for the content segment (string[]). */ - itemLabelArray: string[]; + segmentLabelArray: string[]; /** - * The label for the content item (string). + * The label for the content segment (string). */ - itemLabel: string; + segmentLabel: string; /** - * The label for the sigle of the content item (string). + * The label for the sigle of the content segment (string). */ sigle: string; /** - * The label for the sigle addendum of the content item (string). + * The label for the sigle addendum of the content segment (string). */ sigleAddendum: string; /** - * The boolean flag if the content item can be selected.. + * The boolean flag if the content segment can be selected. */ selectable: boolean; /** - * The boolean flag if the content item is reversed. + * The boolean flag if the content segment is reversed. */ reversed: boolean; @@ -280,6 +323,16 @@ export class FolioCalculationContentSegment { * The link to a convolute description in the critical report. */ linkTo: string; + + /** + * The section partition of the content segment (number). + */ + sectionPartition: number; + + constructor() { + this.previous = new FolioCalculationContentSegmentCache(); + this.current = new FolioCalculationContentSegmentCache(); + } } /** @@ -294,32 +347,32 @@ export class FolioCalculationSheet { /** * The offset of the sheet (FolioCalculationPoint). */ - offset: FolioCalculationPoint; + public readonly OFFSET: FolioCalculationPoint; /** * The width of the sheet (number). */ - width: number; + public readonly SHEET_WIDTH: number; /** * The height of the sheet (number). */ - height: number; + public readonly SHEET_HEIGHT: number; /** * The optional folio id of the sheet (string). */ - folioId?: string; + public readonly FOLIO_ID?: string; /** * The optional upper left corner point of the sheet (FolioCalculationPoint). */ - upperLeftCorner?: FolioCalculationPoint; + public readonly UPPER_LEFT_CORNER?: FolioCalculationPoint; /** * The optional lower right corner point of the sheet (FolioCalculationPoint). */ - lowerRightCorner?: FolioCalculationPoint; + public readonly LOWER_RIGHT_CORNER?: FolioCalculationPoint; /** * Constructor of the FolioCalculationSheet class. @@ -329,535 +382,763 @@ export class FolioCalculationSheet { * @param {FolioSettings} folioSettings The given folio settings. * @param {string} folioId The given folio id. */ - constructor(folioSettings: FolioSettings, folioId: string) { - this.folioId = folioId; - this.offset = new FolioCalculationPoint(folioSettings.initialOffsetX, folioSettings.initialOffsetY); - this.width = folioSettings.formatX * folioSettings.factor; - this.height = folioSettings.formatY * folioSettings.factor; - this.upperLeftCorner = this.offset; - this.lowerRightCorner = new FolioCalculationPoint(this.width, this.height); + constructor({ initialOffsetX, initialOffsetY, formatX, formatY, factor }: FolioSettings, folioId: string) { + this.FOLIO_ID = folioId; + this.SHEET_WIDTH = formatX * factor; + this.SHEET_HEIGHT = formatY * factor; + this.OFFSET = new FolioCalculationPoint(initialOffsetX, initialOffsetY); + this.UPPER_LEFT_CORNER = this.OFFSET; + this.LOWER_RIGHT_CORNER = new FolioCalculationPoint(this.SHEET_WIDTH, this.SHEET_HEIGHT); } } /** - * The FolioCalculationSystems class. + * The FolioCalculationSystemsMargins class. * * It is used in the context of the edition folio convolutes - * to calculate the values of the systems on the folio canvas. - * - * Exposed to be used throughout {@link EditionSheetsModule}. + * to calculate the margins of the systems on the folio canvas. */ -export class FolioCalculationSystems { +class FolioCalculationSystemsMargins { /** - * The width of the systems (number). + * The left margin factor of the systems (number). */ - width: number; + private static readonly LEFT_MARGIN_FACTOR = 1 / 6; + + /** + * The right margin factor of the systems (number). + */ + private static readonly RIGHT_MARGIN_FACTOR = FolioCalculationSystemsMargins.LEFT_MARGIN_FACTOR / 2; + + /** + * The horizontal margins of the systems (number). + */ + public readonly HORIZONTAL_MARGINS: number; /** * The left margin of the systems (number). */ - leftMargin: number; + public readonly LEFT_MARGIN: number; /** * The right margin of the systems (number). */ - rightMargin: number; + public readonly RIGHT_MARGIN: number; /** * The upper margin of the systems (number). */ - upperMargin: number; + public readonly UPPER_MARGIN: number; /** - * The margins of the systems (number). - */ - margins: number; + * Constructor of the FolioCalculationSystemsMargins class. + * + * It initializes the class with values + * from the sheet and the number of systems. + * + * @param {FolioCalculationSheet} sheet The given calculated folio sheet. + * @param {number} numberOfSystems The given number of systems. + */ + constructor( + private sheet: FolioCalculationSheet, + private numberOfSystems: number + ) { + const UPPER_MARGIN_FACTOR = 1 / (this.numberOfSystems + 2); + + this.UPPER_MARGIN = this._calculateSheetMargin(this.sheet.SHEET_HEIGHT, UPPER_MARGIN_FACTOR); + this.LEFT_MARGIN = this._calculateSheetMargin( + this.sheet.SHEET_WIDTH, + FolioCalculationSystemsMargins.LEFT_MARGIN_FACTOR + ); + this.RIGHT_MARGIN = this._calculateSheetMargin( + this.sheet.SHEET_WIDTH, + FolioCalculationSystemsMargins.RIGHT_MARGIN_FACTOR + ); + this.HORIZONTAL_MARGINS = this.LEFT_MARGIN + this.RIGHT_MARGIN; + } /** - * The start position (x-value) of the systems (number). + * Private method: _calculateSheetWidthMargin. + * + * It calculates the width margin of the systems of a folio. + * + * @param {number} dimension The given dimension for the margin calculation. + * @param {number} factor The given factor for the margin calculation. + * @returns {number} The calculated width margin of the systems. */ - startX: number; + private _calculateSheetMargin(dimension: number, factor: number): number { + return round(dimension * factor, 2); + } +} +/** + * The FolioCalculationSystemsDimensions class. + * + * It is used in the context of the edition folio convolutes + * to calculate the dimensions of the systems on the folio canvas. + */ +class FolioCalculationSystemsDimensions { /** * The end position (x-value) of the systems (number). */ - endX: number; + public readonly END_X: number; /** - * The start position (y-value) of the systems (number). + * The start position (x-value) of the systems (number). */ - startY: number; + public readonly START_X: number; /** - * The array of y-value arrays for the systems (number). + * The start position (y-value) of the systems (number). */ - yArray: number[][]; + public readonly START_Y: number; /** - * The start position (x-value) of the labels of the systems (number). + * The width of the systems (number). */ - labelStartX: number; + public readonly SYSTEMS_WIDTH: number; /** - * The correction value for the offset of the labels of the systems (number). + * Constructor of the FolioCalculationSystemsDimensions class. + * + * It initializes the class with values + * from the sheet and the calculated margins. + * + * @param {FolioCalculationSheet} sheet The given calculated folio sheet. + * @param {FolioCalculationSystemsMargins} systemsMargins The given calculated systems margins. + */ + constructor( + private sheet: FolioCalculationSheet, + private systemsMargins: FolioCalculationSystemsMargins + ) { + const { SHEET_WIDTH: WIDTH, UPPER_LEFT_CORNER } = this.sheet; + const { HORIZONTAL_MARGINS, LEFT_MARGIN, UPPER_MARGIN } = this.systemsMargins; + + this.SYSTEMS_WIDTH = WIDTH - HORIZONTAL_MARGINS; + this.START_X = UPPER_LEFT_CORNER.x + LEFT_MARGIN; + this.END_X = this.START_X + this.SYSTEMS_WIDTH; + this.START_Y = UPPER_LEFT_CORNER.y + UPPER_MARGIN; + } +} + +/** + * The FolioCalculationSystemsLines class. + * + * It is used in the context of the edition folio convolutes + * to calculate the lines of the systems on the folio canvas. + */ +class FolioCalculationSystemsLines { + /** + * The array of line arrays of the systems (FolioCalculationLine[][]). */ - labelOffsetCorrection: number; + public readonly SYSTEMS_ARRAYS: FolioCalculationLine[][]; + + /** + * Constructor of the FolioCalculationSystemsLines class. + * + * It initializes the class with values + * from the yArray and the calculated dimensions. + * + * @param {number[][]} yArray The given y-value array for the systems. + * @param {FolioCalculationSystemsDimensions} systemsDimensions The given calculated systems dimensions. + */ + constructor( + private yArray: number[][], + private systemsDimensions: FolioCalculationSystemsDimensions + ) { + this.SYSTEMS_ARRAYS = this._calculateSystemsArrays(); + } /** - * The optional line label array of the systems (FolioCalculationPoint[]). + * Private method: calculateSystemsArrays. + * + * It calculates the systems arrays. + * + * @returns {FolioCalculationLine[][]} The calculated systems arrays. */ - systemsLabelArray?: FolioCalculationPoint[]; + private _calculateSystemsArrays(): FolioCalculationLine[][] { + return this.yArray.map(lineArray => lineArray.map(this._calculateSystemLine)); + } /** - * The optional array of line arrays of the systems (FolioCalculationLine[][]). + * Private arrow function: _calculateSystemLine. + * + * It calculates a single line of a system of a folio. + * + * @param {number} line The given line number. + * @returns {FolioCalculationLine} The calculated line of a system. */ - systemsArrays?: FolioCalculationLine[][]; + private _calculateSystemLine = (line: number): FolioCalculationLine => { + const { START_X: startX, END_X: endX } = this.systemsDimensions; + return new FolioCalculationLine(new FolioCalculationPoint(startX, line), new FolioCalculationPoint(endX, line)); + }; } /** - * The FolioCalculation class. + * The FolioCalculationSystemsLabels class. * * It is used in the context of the edition folio convolutes - * to calculate all the values needed for the folio canvas. - * - * Exposed to be used throughout {@link EditionSheetsModule}. + * to calculate the labels of the systems on the folio canvas. */ -export class FolioCalculation { +class FolioCalculationSystemsLabels { /** - * The correction value for the offset of the folio items (number). + * The label x start factor (number). */ - itemsOffsetCorrection: number; + private static readonly LABEL_START_X_OFFSET_FACTOR = 0.6; /** - * The number of systems (number). + * The label y offset correction factor (number). */ - numberOfSystems: number; + private static readonly LABEL_START_Y_OFFSET_FACTOR = 3; /** - * The zoom factor (number). + * The line label array of the systems (FolioCalculationPoint[]). */ - zoomFactor: number; + public readonly SYSTEMS_LABELS_ARRAY: FolioCalculationPoint[]; /** - * The calculated values for the sheet - * of a folio (FolioCalculationSheet). - */ - sheet: FolioCalculationSheet; + * Constructor of the FolioCalculationSystemsLabels class. + * + * It initializes the class with values + * from the yArray, the calculated margins and dimensions and the zoom factor. + * + * @param {number[][]} yArray The given y-value array for the systems. + * @param {FolioCalculationSystemsMargins} systemsMargins The given calculated systems margins. + * @param {FolioCalculationSystemsDimensions} systemsDimensions The given calculated systems dimensions. + * @param {number} zoomFactor The given zoom factor. + */ + constructor( + private yArray: number[][], + private systemsMargins: FolioCalculationSystemsMargins, + private systemsDimensions: FolioCalculationSystemsDimensions, + private zoomFactor: number + ) { + this.SYSTEMS_LABELS_ARRAY = this._calculateSystemsLabelArray(); + } /** - * The calculated values for the systems - * of a folio (FolioCalculationSystems). + * Private method: _calculateSystemsLabelArray. + * + * It calculates the label array of the systems. + * + * @returns {FolioCalculationPoint[]} The calculated label array of the systems. */ - systems: FolioCalculationSystems; + private _calculateSystemsLabelArray(): FolioCalculationPoint[] { + const labelStartX = round( + this.systemsDimensions.START_X - + this.systemsMargins.LEFT_MARGIN * FolioCalculationSystemsLabels.LABEL_START_X_OFFSET_FACTOR, + 2 + ); + const labelStartYOffset = round(FolioCalculationSystemsLabels.LABEL_START_Y_OFFSET_FACTOR / this.zoomFactor, 2); + + return this.yArray.map(lineArray => { + const labelStartY = lineArray[0] - labelStartYOffset; + return new FolioCalculationPoint(labelStartX, labelStartY); + }); + } +} +/** + * The FolioCalculationSystemsYArray class. + * + * It is used in the context of the edition folio convolutes + * to calculate the y-values of the systems on the folio canvas. + */ +class FolioCalculationSystemsYArray { /** - * The calculated values for the array of content items - * of a folio (FolioCalculationContentItem[]). + * The array of y-value arrays for the systems (number). */ - contentItemsArray: FolioCalculationContentItem[]; + public readonly Y_ARRAY: number[][]; /** - * Constructor of the FolioCalculation class. + * Constructor of the FolioCalculationSystemsYArray class. * - * It initializes the class with values from folio settings, folio data and itemsOffset correction. + * It initializes the class with values + * from the number of systems, the start position of the systems, the line space factor, the zoom factor and the offset. * - * @param {FolioSettings} folioSettings The given folio settings. - * @param {Folio} folioData The given folio data. - * @param {number} [itemsOffsetCorrection] The optional given itemsOffset correction. + * @param {number} numberOfSystems The given number of systems. + * @param {number} systemStartY The given start position of the systems. + * @param {number} lineSpaceFactor The given line space factor. + * @param {number} zoomFactor The given zoom factor. + * @param {number} offset The given offset. */ - constructor(folioSettings: FolioSettings, folioData: Folio, itemsOffsetCorrection?: number) { - this.itemsOffsetCorrection = itemsOffsetCorrection || 0; - this.numberOfSystems = folioData.systems ? parseInt(folioData.systems, 10) : 0; - this.zoomFactor = folioSettings.factor; + constructor( + private numberOfSystems: number, + private systemStartY: number, + private lineSpaceFactor: number, + private zoomFactor: number, + private offset: number + ) { + this.Y_ARRAY = this._calculateSystemYArray(); + } - this._calculateFolio(folioSettings, folioData); + /** + * Private method: _calculateSystemYArray. + * + * It calculates the array of start positions of the systems of a folio. + * + * @returns {number[][]} The array of start position arrays (Y values) for the calculatedSystems. + */ + private _calculateSystemYArray(): number[][] { + return Array.from({ length: this.numberOfSystems }, (_, i) => { + const yStartValue = this._getContentSegmentStart(i); + return this._calculateSystemLineArray(yStartValue); + }); } /** - * Private method: _calculateFolio. + * Private method: _calculateSystemLineArray. * - * It calls the calculation methods for the sheet, - * systems and contentItemsArray of a folio. + * It calculates the start position of the lines per system of a folio. * - * @param {FolioSettings} folioSettings The given folio settings. - * @param {Folio} folioData The given folio data. + * @param {number} y The Y start value of the first line of a system. + * @returns {number[]} The start position array (Y values) of a system. + */ + private _calculateSystemLineArray(y: number): number[] { + if (!y) { + return undefined; + } + + // Generate an array with 5 elements, each one being the start value for a line + return Array.from({ length: 5 }, (_, i) => y + this.lineSpaceFactor * i * this.zoomFactor); + } + + /** + * Private method: _getContentSegmentStart. + * + * It calculates the start position of a content segment of a folio. * - * @returns {void} Sets the sheet, systems and contentItemsArray variables. + * @param {number} index The given index position (offset * index --> + * (X: start at segment 1, 2, 3 etc; Y: start at system line 1, 2, 3 etc.)). + * @returns {number} The start position for a calculatedContentSegment. */ - private _calculateFolio(folioSettings: FolioSettings, folioData: Folio): void { - this.sheet = this._calculateSheet(folioSettings, folioData.folioId); - this.systems = this._calculateSystems(); - this.contentItemsArray = this._calculateContentArray(folioData.content); + private _getContentSegmentStart(index: number): number { + const segmentValue = this.systemStartY + this.offset * index; + return round(parseFloat(segmentValue.toString()), 2); } +} + +/** + * The FolioCalculationSystems class. + * + * It is used in the context of the edition folio convolutes + * to calculate the values of the systems on the folio canvas. + * + * Exposed to be used throughout {@link EditionSheetsModule}. + */ +export class FolioCalculationSystems { + /** + * The line space factor of the systems (number). + */ + public lineSpaceFactor = 1.5; + + /** + * The line label array of the systems (FolioCalculationPoint[]). + */ + public readonly SYSTEMS_LABEL_ARRAY: FolioCalculationPoint[]; /** - * Private method: _calculateSheet. + * The array of line arrays of the systems (FolioCalculationLine[][]). + */ + public readonly SYSTEMS_ARRAYS: FolioCalculationLine[][]; + + /** + * The calculated margins of the systems (FolioCalculationSystemsMarginCalculator). + */ + public readonly SYSTEMS_MARGINS: FolioCalculationSystemsMargins; + + /** + * The calculated dimensions of the systems (FolioCalculationSystemsDimensions). + */ + public readonly SYSTEMS_DIMENSIONS: FolioCalculationSystemsDimensions; + + /** + * The array of y-value arrays for the systems (number). + */ + private readonly Y_ARRAY: number[][]; + + /** + * Constructor of the FolioCalculationSheet class. * - * It returns a FolioCalculationSheet class that provides - * all the calculated values for the sheet of a folio. + * It initializes the class with values from folio settings, the folio id and zoom factor. * - * @param {FolioSettings} folioSettings The given folio settings. - * @param {string} folioId The given folio id. + * @param {FolioCalculationSheet} sheet The given calculated folio sheet. + * @param {number} numberOfSystems The given number of systems. + * @param {number} zoomFactor The given zoom factor. + */ + constructor( + private sheet: FolioCalculationSheet, + private numberOfSystems: number, + private zoomFactor: number + ) { + this.SYSTEMS_MARGINS = this._calculateSystemsMargins(); + this.SYSTEMS_DIMENSIONS = this._calculateSystemsDimensions(); + + this.Y_ARRAY = this._calculateSystemsYArray().Y_ARRAY; + this.SYSTEMS_ARRAYS = this._calculateSystemsLines().SYSTEMS_ARRAYS; + this.SYSTEMS_LABEL_ARRAY = this._calculateSystemsLabels().SYSTEMS_LABELS_ARRAY; + } + + /** + * Private method: _calculateSystemsMargins. * - * @returns {FolioCalculationSheet} The calculated sheet. + * It calculates the margins of the systems of a folio. + * + * @returns {FolioCalculationSystemsMargins} The calculated margins of the systems. */ - private _calculateSheet(folioSettings: FolioSettings, folioId: string): FolioCalculationSheet { - return new FolioCalculationSheet(folioSettings, folioId); + private _calculateSystemsMargins(): FolioCalculationSystemsMargins { + return new FolioCalculationSystemsMargins(this.sheet, this.numberOfSystems); } /** - * Private method: _calculateSystems. + * Private method: _calculateSystemsDimensions. * - * It returns a FolioCalculationSystems class that provides - * all the calculated values for the systems of a folio. + * It calculates the dimensions of the systems of a folio. * - * @returns {FolioCalculationSystems} The calculated systems. + * @returns {FolioCalculationSystemsDimensions} The calculated dimensions of the systems. */ - private _calculateSystems(): FolioCalculationSystems { - // Init - const calculatedSystems = new FolioCalculationSystems(); + private _calculateSystemsDimensions(): FolioCalculationSystemsDimensions { + return new FolioCalculationSystemsDimensions(this.sheet, this.SYSTEMS_MARGINS); + } - // Offset correction - calculatedSystems.labelOffsetCorrection = 4 / this.zoomFactor; // OffsetCorrection for system line labels dependent from zoom factor + /** + * Private method: _calculateSystemsYArray. + * + * It calculates the array of start positions of the systems of a folio. + * + * @returns {FolioCalculationSystemsYArray} The calculated array of start positions for the systems. + */ + private _calculateSystemsYArray(): FolioCalculationSystemsYArray { + return new FolioCalculationSystemsYArray( + this.numberOfSystems, + this.SYSTEMS_DIMENSIONS.START_Y, + this.lineSpaceFactor, + this.zoomFactor, + this.SYSTEMS_MARGINS.UPPER_MARGIN + ); + } - // X-values - calculatedSystems.leftMargin = this._round(this.sheet.width / 6, 2); // Reserve 1/6 of sheetWidth for left margin - calculatedSystems.rightMargin = this._round(calculatedSystems.leftMargin * 0.5, 2); // Right margin is 1/2 leftMargin - calculatedSystems.margins = calculatedSystems.leftMargin + calculatedSystems.rightMargin; // Outer margins + /** + * Private method: _calculateSystemsLines. + * + * It calculates the lines of the systems of a folio. + * + * @returns {FolioCalculationSystemsLines} The calculated lines of the systems. + */ + private _calculateSystemsLines(): FolioCalculationSystemsLines { + return new FolioCalculationSystemsLines(this.Y_ARRAY, this.SYSTEMS_DIMENSIONS); + } - calculatedSystems.width = this.sheet.width - calculatedSystems.margins; // Sheet width minus outer margins - calculatedSystems.startX = this.sheet.upperLeftCorner.x + calculatedSystems.leftMargin; // Begin of sheet plus left margin - calculatedSystems.endX = calculatedSystems.startX + calculatedSystems.width; // Begin of system plus its width + /** + * Private method: _calculateSystemsLabels. + * + * It calculates the labels of the systems of a folio. + * + * @returns {FolioCalculationSystemsLabels} The calculated labels of the systems. + */ + private _calculateSystemsLabels(): FolioCalculationSystemsLabels { + return new FolioCalculationSystemsLabels( + this.Y_ARRAY, + this.SYSTEMS_MARGINS, + this.SYSTEMS_DIMENSIONS, + this.zoomFactor + ); + } +} - // Y-values - calculatedSystems.upperMargin = this._round(this.sheet.height / (this.numberOfSystems + 2), 2); // Reserve (1 / numberOfSystems plus two empty lines) of sheetHeight as offset - calculatedSystems.startY = this.sheet.upperLeftCorner.y + calculatedSystems.upperMargin; // Begin of sheet plus upper margin +/** + * The FolioCalculation class. + * + * It is used in the context of the edition folio convolutes + * to calculate all the values needed for the folio canvas. + * + * Exposed to be used throughout {@link EditionSheetsModule}. + */ +export class FolioCalculation { + /** + * The number of systems (number). + */ + public readonly NUMBER_OF_SYSTEMS: number; - // Get y values for systems - calculatedSystems.yArray = this._getSystemYArray(calculatedSystems.upperMargin, calculatedSystems.startY); + /** + * The zoom factor (number). + */ + public readonly ZOOM_FACTOR: number; - // System lines - calculatedSystems.systemsArrays = calculatedSystems.yArray.map(lineArray => - lineArray.map( - line => - new FolioCalculationLine( - new FolioCalculationPoint(calculatedSystems.startX, line), - new FolioCalculationPoint(calculatedSystems.endX, line) - ) - ) - ); // Line is the y value + /** + * The calculated values for the sheet + * of a folio (FolioCalculationSheet). + */ + public sheet: FolioCalculationSheet; - // System numbers (labels) - calculatedSystems.labelStartX = this._round( - calculatedSystems.startX - (calculatedSystems.leftMargin * 3) / 4, - 2 - ); // Place numbers 3/4 of left margin in front of system - - // Reduce start values with lineLabelOffsetCorrection to get start positions of numbers - // LineArray[0] = first line of a system - calculatedSystems.systemsLabelArray = calculatedSystems.yArray.map( - lineArray => - new FolioCalculationPoint( - calculatedSystems.labelStartX, - lineArray[0] - calculatedSystems.labelOffsetCorrection - ) - ); + /** + * The calculated values for the systems + * of a folio (FolioCalculationSystems). + */ + public systems: FolioCalculationSystems; - return calculatedSystems; - } + /** + * The calculated values for content segments + * of a folio (FolioCalculationContentSegment[]). + */ + public contentSegments: FolioCalculationContentSegment[]; /** - * Private method: _calculateContentArray. + * Constructor of the FolioCalculation class. * - * It provides all the calculated values for the content items of a folio. + * It initializes the class with values from folio settings, folio data and segment offset correction. * - * @param {FolioContent[]} contents The given folio contents. - * @returns {FolioCalculationContentItem[]} The array of the calculated content items. + * @param {FolioSettings} folioSettings The given folio settings. + * @param {Folio} folioData The given folio data. + * @param {number} [segmentOffsetCorrection] The optional given segment offset correction. */ - private _calculateContentArray(contents: FolioContent[] = []): FolioCalculationContentItem[] { - // Init - const calculatedContentItems: FolioCalculationContentItem[] = []; + constructor( + folioSettings: FolioSettings, + folioData: Folio, + private segmentOffsetCorrection: number = 0 + ) { + this.NUMBER_OF_SYSTEMS = folioData.systems ? parseInt(folioData.systems, 10) : 0; + this.ZOOM_FACTOR = folioSettings.factor; - // Iterate over items - contents.forEach((content: FolioContent) => { - // Init - const calculatedContentItem: FolioCalculationContentItem = new FolioCalculationContentItem(); - calculatedContentItem.previous = new FolioCalculationContentItemCache(); - calculatedContentItem.current = new FolioCalculationContentItemCache(); - calculatedContentItem.previous.section = new FolioSection(); // Reset prevSection - calculatedContentItem.current.section = new FolioSection(); // Reset currentSection - let sectionPartition = 1; // Default: 1 section + this.sheet = new FolioCalculationSheet(folioSettings, folioData.folioId); + this.systems = new FolioCalculationSystems(this.sheet, this.NUMBER_OF_SYSTEMS, this.ZOOM_FACTOR); - // OffsetCorrection to avoid collision between items - calculatedContentItem.offsetCorrection = this.itemsOffsetCorrection; + this.contentSegments = this._calculateContentSegments(folioData.content); + } - // Check if number of sections exist in data; if yes, apply value - if (content['sectionPartition']) { - sectionPartition = content['sectionPartition']; - } + private _calculateContentSegments(contents: FolioContent[] = []): FolioCalculationContentSegment[] { + return contents.map((content: FolioContent) => this._calculateContentSegment(content)); + } - // Check if sections exist - if (content.sections) { - // Check if sections length is bigger than sectionPartition - const sectionsLength = content.sections.length; - if (sectionsLength > sectionPartition) { - console.error('Sections array is bigger than sectionPartition'); - return; - } - // Iterate over sections - content.sections.forEach((section: FolioSection, _sectionIndex: number) => { - // Set section cache - this._setContentItemSectionCache(calculatedContentItem, section); - - // Set main values for item - this._setContentItemMainValues(calculatedContentItem, section, sectionPartition, content); - - // Set item corner points - calculatedContentItem.current.cornerPoints = new FolioCalculationContentItemCornerPoints( - calculatedContentItem - ); - calculatedContentItem.polygonCornerPoints = [ - calculatedContentItem.current.cornerPoints.upperLeftCorner.x, - calculatedContentItem.current.cornerPoints.upperLeftCorner.y, - calculatedContentItem.current.cornerPoints.upperRightCorner.x, - calculatedContentItem.current.cornerPoints.upperRightCorner.y, - calculatedContentItem.current.cornerPoints.lowerRightCorner.x, - calculatedContentItem.current.cornerPoints.lowerRightCorner.y, - calculatedContentItem.current.cornerPoints.lowerLeftCorner.x, - calculatedContentItem.current.cornerPoints.lowerLeftCorner.y, - calculatedContentItem.current.cornerPoints.upperLeftCorner.x, - calculatedContentItem.current.cornerPoints.upperLeftCorner.y, - ].join(' '); - - calculatedContentItem.complexId = content.complexId; - calculatedContentItem.sheetId = content.sheetId; - calculatedContentItem.selectable = content.selectable ?? true; - calculatedContentItem.reversed = content.reversed ?? false; - calculatedContentItem.linkTo = content.linkTo || ''; - - calculatedContentItem.sigle = content.sigle; - calculatedContentItem.sigleAddendum = content.sigleAddendum; - calculatedContentItem.itemLabelArray = [ - calculatedContentItem.sigle, - calculatedContentItem.sigleAddendum ? ` ${calculatedContentItem.sigleAddendum}` : '', - ]; - calculatedContentItem.itemLabel = calculatedContentItem.itemLabelArray.join(' '); - const itemLabelOffset = - calculatedContentItem.itemLabelArray.length > 1 && - calculatedContentItem.itemLabelArray[1] !== '' - ? 5 - : 0; - - const halfWidth = calculatedContentItem.width / 2; - const halfHeight = calculatedContentItem.height / 2; - - calculatedContentItem.centeredXPosition = - calculatedContentItem.current.cornerPoints.upperLeftCorner.x + halfWidth; - calculatedContentItem.centeredYPosition = - calculatedContentItem.current.cornerPoints.upperLeftCorner.y + halfHeight - itemLabelOffset; - - if (calculatedContentItem.reversed) { - calculatedContentItem.centeredXPosition = - calculatedContentItem.current.cornerPoints.lowerRightCorner.x - halfWidth; - calculatedContentItem.centeredYPosition = - calculatedContentItem.current.cornerPoints.lowerRightCorner.y - - halfHeight + - itemLabelOffset; - } - - calculatedContentItems.push(calculatedContentItem); - }); - } else { - console.error('No sections array in content', content); - } + private _calculateContentSegment(content: FolioContent): FolioCalculationContentSegment { + const calculatedContentSegment = new FolioCalculationContentSegment(); + this._setOffsetCorrection(calculatedContentSegment); + this._setSectionPartition(calculatedContentSegment, content); + this._handleSections(calculatedContentSegment, content); + + return calculatedContentSegment; + } + + private _setOffsetCorrection(calculatedContentSegment: FolioCalculationContentSegment): void { + calculatedContentSegment.offsetCorrection = this.segmentOffsetCorrection; + } + + private _setSectionPartition( + calculatedContentSegment: FolioCalculationContentSegment, + content: FolioContent + ): void { + calculatedContentSegment.sectionPartition = content.sectionPartition ?? 1; + } + + private _handleSections(calculatedContentSegment: FolioCalculationContentSegment, content: FolioContent): void { + if (!content.sections) { + console.error('No sections array in content', content); + return; + } + if (content.sections.length > calculatedContentSegment.sectionPartition) { + console.error('Sections array is bigger than sectionPartition'); + return; + } + content.sections.forEach((section: FolioSection, _sectionIndex: number) => { + this._handleSection(calculatedContentSegment, section, content); }); + } - return calculatedContentItems; + private _handleSection( + calculatedContentSegment: FolioCalculationContentSegment, + section: FolioSection, + content: FolioContent + ): void { + this._setContentSegmentSectionCache(calculatedContentSegment, section); + this._setContentSegmentMainValues(calculatedContentSegment, section, content); + this._setVertices(calculatedContentSegment); + this._setOtherProperties(calculatedContentSegment, content); + } + + private _setVertices(calculatedContentSegment: FolioCalculationContentSegment): void { + calculatedContentSegment.current.vertices = new FolioCalculationContentSegmentVertices( + calculatedContentSegment + ); + calculatedContentSegment.segmentVertices = + calculatedContentSegment.current.vertices.getSegmentVerticesAsString(); + } + + private _setOtherProperties( + calculatedContentSegment: FolioCalculationContentSegment, + { complexId, sheetId, selectable = true, reversed = false, linkTo = '', sigle, sigleAddendum }: FolioContent + ): void { + const { segmentLabel, segmentLabelArray, segmentLabelOffset } = this._getSegmentLabelAndOffset( + sigle, + sigleAddendum + ); + + const { centeredXPosition, centeredYPosition } = this._calculateCenteredPositions( + calculatedContentSegment, + segmentLabelOffset, + reversed + ); + + Object.assign(calculatedContentSegment, { + complexId, + sheetId, + sigle, + sigleAddendum, + selectable: selectable, + reversed: reversed, + linkTo: linkTo, + segmentLabelArray, + segmentLabel, + centeredXPosition, + centeredYPosition, + }); + } + + private _calculateCenteredPositions( + calculatedContentSegment: FolioCalculationContentSegment, + segmentLabelOffset: number, + reversed: boolean + ): { centeredXPosition: number; centeredYPosition: number } { + const { UPPER_LEFT_VERTEX: upperLeftCorner, LOWER_RIGHT_VERTEX: lowerRightCorner } = + calculatedContentSegment.current.vertices; + + const centeredXPosition = (upperLeftCorner.x + lowerRightCorner.x) / 2; + const offsetCorrection = reversed ? -segmentLabelOffset : segmentLabelOffset; + const centeredYPosition = (upperLeftCorner.y + lowerRightCorner.y) / 2 - offsetCorrection; + + return { centeredXPosition, centeredYPosition }; + } + + private _getSegmentLabelAndOffset( + sigle: string, + sigleAddendum: string | null + ): { segmentLabel: string; segmentLabelArray: string[]; segmentLabelOffset: number } { + const segmentLabelArray = [sigle, sigleAddendum ? ` ${sigleAddendum}` : '']; + const segmentLabel = segmentLabelArray.join(' '); + const segmentLabelOffset = sigleAddendum ? 5 : 0; + + return { segmentLabel, segmentLabelArray, segmentLabelOffset }; } /** - * Private helper method for _calculateContentArray: _setContentItemMainValues. + * Private helper method for _calculateContentArray: _setContentSegmentMainValues. * - * It calculates the main values for the content items of a folio. + * It calculates the main values for the content segments of a folio. * - * @param {FolioCalculationContentItem} calculatedContentItem The given calculated content item. + * @param {FolioCalculationContentSegment} calculatedContentSegment The given calculated content segment. * @param {FolioSection} section The given section. - * @param {number} sectionPartition The given section partition. - * @param {FolioContent} item The given folio content. - * @returns {void} Calculates and sets the main values of the calculatedContentItem. + * @param {FolioContent} content The given folio content. + * @returns {void} Calculates and sets the main values of the calculatedContentSegment. */ - private _setContentItemMainValues( - calculatedContentItem: FolioCalculationContentItem, + private _setContentSegmentMainValues( + calculatedContentSegment: FolioCalculationContentSegment, section: FolioSection, - sectionPartition: number, - item: FolioContent + content: FolioContent ): void { - if (!calculatedContentItem) { + if (!calculatedContentSegment) { return; } - // ItemsWidth - calculatedContentItem.widthWithOffset = this._round(this.systems.width / sectionPartition, 2); - calculatedContentItem.width = calculatedContentItem.widthWithOffset - this.itemsOffsetCorrection; // OffsetCorrection to avoid horizontal collision between items - - // ItemsHeight - calculatedContentItem.systemRange = section.endSystem - section.startSystem + 1; - calculatedContentItem.height = this._round( - this.systems.upperMargin * calculatedContentItem.systemRange - this.itemsOffsetCorrection, + // SegmentsWidth + calculatedContentSegment.widthWithOffset = round( + this.systems.SYSTEMS_DIMENSIONS.SYSTEMS_WIDTH / calculatedContentSegment.sectionPartition, 2 - ); // OffsetCorrection to avoid vertical collision between items + ); + calculatedContentSegment.width = + calculatedContentSegment.widthWithOffset - calculatedContentSegment.offsetCorrection; // OffsetCorrection to avoid horizontal collision between segments + + // SegmentsHeight + calculatedContentSegment.systemRange = section.endSystem - section.startSystem + 1; + calculatedContentSegment.height = round( + this.systems.SYSTEMS_MARGINS.UPPER_MARGIN * calculatedContentSegment.systemRange - + calculatedContentSegment.offsetCorrection, + 2 + ); // OffsetCorrection to avoid vertical collision between segments - // Find item start indices - calculatedContentItem.startYIndex = section.startSystem - 1; - calculatedContentItem.startXIndex = 0; + // Find segment start indices + calculatedContentSegment.startYIndex = section.startSystem - 1; + calculatedContentSegment.startXIndex = 0; // Check if position exists ... if (section.position) { const position: number = section.position; - if (position > sectionPartition) { + if (position > calculatedContentSegment.sectionPartition) { // ... and is bigger than number of sections // Index remains 0 console.error( - 'Assuming position 1 because current position is bigger than number of sections for item ', - item + 'Assuming position 1 because current position is bigger than number of sections for segment ', + content ); - } else if (sectionPartition > 1) { + } else if (calculatedContentSegment.sectionPartition > 1) { // ... or is smaller or equal to number of sections which is bigger 1 // Than index is position - 1 (positions go from 1, 2, 3 to n) - calculatedContentItem.startXIndex = position - 1; + calculatedContentSegment.startXIndex = position - 1; } } // For other cases index remains 0 (default) - // ItemsStartX + // SegmentsStartX // WidthWithOffset * startXIndex - // Add half the offsetCorrection to systemStartX to center items - calculatedContentItem.startX = this._getContentItemStart( - calculatedContentItem.widthWithOffset, - calculatedContentItem.startXIndex, - this.systems.startX, - this.itemsOffsetCorrection / 2 + // Add half the offsetCorrection to systemStartX to center segments + calculatedContentSegment.startX = this._getContentSegmentStart( + calculatedContentSegment.widthWithOffset, + calculatedContentSegment.startXIndex, + this.systems.SYSTEMS_DIMENSIONS.START_X, + calculatedContentSegment.offsetCorrection / 2 ); - calculatedContentItem.endX = this._round(calculatedContentItem.startX + calculatedContentItem.width, 2); - - // ItemsStartY - // Subtract half the offsetCorrection from systemStartY to center items - calculatedContentItem.startY = this._getContentItemStart( - this.systems.upperMargin, - calculatedContentItem.startYIndex, - this.systems.startY, - -this.itemsOffsetCorrection / 2 + calculatedContentSegment.endX = round(calculatedContentSegment.startX + calculatedContentSegment.width, 2); + + // SegmentsStartY + // Subtract half the offsetCorrection from systemStartY to center segments + calculatedContentSegment.startY = this._getContentSegmentStart( + this.systems.SYSTEMS_MARGINS.UPPER_MARGIN, + calculatedContentSegment.startYIndex, + this.systems.SYSTEMS_DIMENSIONS.START_Y, + -calculatedContentSegment.offsetCorrection / 2 ); - calculatedContentItem.endY = this._round(calculatedContentItem.startY + calculatedContentItem.height, 2); + calculatedContentSegment.endY = round(calculatedContentSegment.startY + calculatedContentSegment.height, 2); } /** - * Private helper method for _calculateContentArray: _setContentItemSectionCache. + * Private method: _setContentSegmentSectionCache. * - * It caches the current and previous section of a calculated content item. + * It caches the current and previous section of a calculated content segment. * - * @param {FolioCalculationContentItem} calculatedContentItem The given calculated content item. + * @param {FolioCalculationContentSegment} calculatedContentSegment The given calculated content segment. * @param {FolioSection} section The given section. - * @returns {void} Caches the current and previous section of the calculatedContentItem. + * @returns {void} Caches the current and previous section of the calculatedContentSegment. */ - private _setContentItemSectionCache( - calculatedContentItem: FolioCalculationContentItem, + private _setContentSegmentSectionCache( + calculatedContentSegment: FolioCalculationContentSegment, section: FolioSection ): void { - if (!calculatedContentItem) { + if (!calculatedContentSegment) { return; } - if (calculatedContentItem.current['section']) { - calculatedContentItem.previous.section = calculatedContentItem.current.section; - calculatedContentItem.previous.cornerPoints = calculatedContentItem.current.cornerPoints; + if (calculatedContentSegment.current['section']) { + calculatedContentSegment.previous.section = calculatedContentSegment.current.section; + calculatedContentSegment.previous.vertices = calculatedContentSegment.current.vertices; } - calculatedContentItem.current.section = section; + calculatedContentSegment.current.section = section; } /** - * Private helper method for _calculateContentArray: _getContentItemStart. + * Private helper method for _calculateContentArray: _getContentSegmentStart. * - * It calculates the start position of a content item of a folio. + * It calculates the start position of a content segment of a folio. * * @param {number} offset The given offset. * @param {number} index The given index position (offset * index --> - * (X: start at item 1, 2, 3 etc; Y: start at system line 1, 2, 3 etc.)). + * (X: start at segment 1, 2, 3 etc; Y: start at system line 1, 2, 3 etc.)). * @param {number} systemStart The given horizontal(X) or vertical (Y) systemsMargins. - * @param {number} [offsetCorrection] The optional given offset correction value (mostly needed to center items). - * @returns {number} The start position for a calculatedContentItem. + * @param {number} [offsetCorrection] The optional given offset correction value (mostly needed to center segments). + * @returns {number} The start position for a calculatedContentSegment. */ - private _getContentItemStart( + private _getContentSegmentStart( offset: number, index: number, systemStart: number, - offsetCorrection?: number + offsetCorrection: number = 0 ): number { - let itemValue = systemStart + offset * index; - if (offsetCorrection) { - itemValue += offsetCorrection; - } - return this._round(parseFloat(itemValue.toString()), 2); - } - - /** - * Private helper method for _calculateSystems: _getSystemYArray. - * - * It calculates the array of start positions of the systems of a folio. - * - * @param {number} offset The given offset. - * @param {number} systemStartY The given (Y) systemsMargins (begin of sheet plus upper margin). - * @param {number} [offsetCorrection] The optional given offset correction value (mostly needed to center items). - * @returns {number[][]} The array of start position arrays (Y values) for the calculatedSystems. - */ - private _getSystemYArray(offset: number, systemStartY: number, offsetCorrection?: number): number[][] { - const arr = []; - // Iterate over systems and get their start position - for (let i = 0; i < this.numberOfSystems; i++) { - // Use the same method as for items to populate the systems array - const yStartValue = this._getContentItemStart(offset, i, systemStartY, offsetCorrection); - arr[i] = this._getSystemLineArray(yStartValue); - } - return arr; - } - - /** - * Private helper method for _calculateSystems: _getSystemLineArray. - * - * It calculates the start position of the lines per system of a folio. - * - * @param {number} y The Y start value of the first line of a system. - * @returns {number[]} The start position array (Y values) of a system. - */ - private _getSystemLineArray(y: number): number[] { - if (!y) { - return undefined; - } - - const lineArray: number[] = []; - const lineSpaceFactor = 1.5; // Factor to adjust the space between lines - - // Iterate from 0 to 4 (5 notation lines) and get start values for each line - for (let i = 0; i < 5; i++) { - lineArray[i] = y + lineSpaceFactor * i * this.zoomFactor; - } - return lineArray; - } - - /** - * Private helper method for folio calculation model: _round. - * - * It rounds a given number to a given number of decimal places. - * JS in-built round-method is sometimes not correct, - * see: {@link http://www.jacklmoore.com/notes/rounding-in-javascript/}. - * - * @param {number} value The given input value to be rounded. - * @param {number} decimals The number of decimal places to round to. - * @returns {number} The rounded number. - */ - private _round(value: number, decimals: number): number { - if (Number.isNaN(value)) { - return undefined; - } - return Number(Math.round(Number(value + 'e' + decimals)) + 'e-' + decimals); + const segmentValue = systemStart + offset * index + offsetCorrection; + return round(parseFloat(segmentValue.toString()), 2); } } diff --git a/src/app/views/edition-view/models/folio-svg-data.model.ts b/src/app/views/edition-view/models/folio-svg-data.model.ts index d32c003068..10ab0c1ce7 100644 --- a/src/app/views/edition-view/models/folio-svg-data.model.ts +++ b/src/app/views/edition-view/models/folio-svg-data.model.ts @@ -45,9 +45,9 @@ class FolioSvgSheet { * @param {FolioCalculationSheet} calculatedSheet The given calculated folio sheet. */ constructor(calculatedSheet: FolioCalculationSheet) { - this.folioId = calculatedSheet.folioId; - this.upperLeftCorner = calculatedSheet.upperLeftCorner; - this.lowerRightCorner = calculatedSheet.lowerRightCorner; + this.folioId = calculatedSheet.FOLIO_ID; + this.upperLeftCorner = calculatedSheet.UPPER_LEFT_CORNER; + this.lowerRightCorner = calculatedSheet.LOWER_RIGHT_CORNER; } } @@ -84,8 +84,8 @@ class FolioSvgSystems { * @param {FolioCalculationSystems} calculatedSystems The given calculated folio systems. */ constructor(calculatedSystems: FolioCalculationSystems) { - this.systemsLabelArray = calculatedSystems.systemsLabelArray; - this.systemsArrays = calculatedSystems.systemsArrays; + this.systemsLabelArray = calculatedSystems.SYSTEMS_LABEL_ARRAY; + this.systemsArrays = calculatedSystems.SYSTEMS_ARRAYS; } } @@ -134,9 +134,9 @@ export class FolioSvgContentSegment { segmentLabel: string; /** - * The corner points of a content segment polygon (string). + * The vertices of a content segment polygon (string). */ - polygonCornerPoints: string; + segmentVertices: string; /** * The centered X position of a content segment (number). @@ -161,9 +161,9 @@ export class FolioSvgContentSegment { this.linkTo = calculatedContentSegment.linkTo; this.selectable = calculatedContentSegment.selectable; this.reversed = calculatedContentSegment.reversed; - this.polygonCornerPoints = calculatedContentSegment.polygonCornerPoints; - this.segmentLabelArray = calculatedContentSegment.itemLabelArray; - this.segmentLabel = calculatedContentSegment.itemLabel; + this.segmentVertices = calculatedContentSegment.segmentVertices; + this.segmentLabelArray = calculatedContentSegment.segmentLabelArray; + this.segmentLabel = calculatedContentSegment.segmentLabel; this.centeredXPosition = calculatedContentSegment.centeredXPosition; this.centeredYPosition = calculatedContentSegment.centeredYPosition; } diff --git a/src/assets/themes/scss/main.scss b/src/assets/themes/scss/main.scss index 83304fa1eb..d3ebba874e 100644 --- a/src/assets/themes/scss/main.scss +++ b/src/assets/themes/scss/main.scss @@ -338,11 +338,11 @@ svg a.active rect { fill: OliveDrab; opacity: 0.2; } -.item-group.active, -.item-group.active > .item-link > .item-shape { +.content-segment-group.active, +.content-segment-group.active > .content-segment-link > .content-segment-shape { stroke: OliveDrab; } -.item-group.active > .item-link > .item-label { +.content-segment-group.active > .content-segment-link > .content-segment-label { fill: OliveDrab; } From 99e8350edb2734eb7f1187f9bdf38b9601da17c3 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Tue, 5 Mar 2024 00:59:38 +0100 Subject: [PATCH 48/63] refactor(edition): refactor FolioCalculationModel (finish) --- .../edition-folio-viewer/folio.service.ts | 4 +- .../models/folio-calculation.model.ts | 909 +++++++----------- .../models/folio-svg-data.model.ts | 23 +- 3 files changed, 370 insertions(+), 566 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts index 8adb82246c..ce4fe844e8 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts @@ -204,7 +204,7 @@ export class FolioService { * @returns {void} Adds the systems to the SVG canvas selection. */ private _addFolioSystemsToSvgCanvas(svgSheetGroup: D3Selection, folioSvgData: FolioSvgData): void { - folioSvgData.systems.systemsArrays.forEach((systemArray: FolioCalculationLine[], systemIndex: number) => { + folioSvgData.systems.systemsLines.forEach((systemArray: FolioCalculationLine[], systemIndex: number) => { const svgSystemsGroup = this._appendSvgElementWithAttrs(svgSheetGroup, 'g', { systemsGroupId: systemIndex + 1, class: 'systems-group', @@ -509,7 +509,7 @@ export class FolioService { folioSvgData: FolioSvgData, systemIndex: number ): void { - const { x, y } = folioSvgData.systems.systemsLabelArray[systemIndex]; + const { x, y } = folioSvgData.systems.systemsLabelPositions[systemIndex]; const systemLabel = systemIndex + 1; const attributes = { class: 'system-label', diff --git a/src/app/views/edition-view/models/folio-calculation.model.ts b/src/app/views/edition-view/models/folio-calculation.model.ts index 3e1147c0c1..157b77da7c 100644 --- a/src/app/views/edition-view/models/folio-calculation.model.ts +++ b/src/app/views/edition-view/models/folio-calculation.model.ts @@ -50,20 +50,6 @@ export class FolioCalculationPoint { this.x = x; this.y = y; } - - /** - * Public method: add. - * - * It adds x and y values (in px) to an existing point. - * - * @param {number} addX Add to x value. - * @param {number} addY Add to y value. - */ - public add(addX: number, addY: number): FolioCalculationPoint { - this.x += addX; - this.y += addY; - return this; - } } /** @@ -99,6 +85,86 @@ export class FolioCalculationLine { } } +/** + * The FolioCalculationContentSegmentCenteredPositions class. + * + * It is used in the context of the edition folio convolutes + * to calculate the centered positions of a content segment on the folio canvas. + * + * Not exposed, only called internally from {@link FolioCalculation}. + */ +class FolioCalculationContentSegmentCenteredPositions { + /** + * The centered X position of the content segment (number). + */ + public readonly CENTERED_X_POSITION: number; + + /** + * The centered Y position of the content segment (number). + */ + public readonly CENTERED_Y_POSITION: number; + + /** + * Constructor of the FolioCalculationContentSegmentCenteredPositions class. + * + * It initializes the class with values + * from the segment vertices, the segment label offset and the reversed flag. + * + * @param {FolioCalculationContentSegmentVertices} segmentVertices The given segment vertices. + * @param {number} segmentLabelOffset The given segment label offset. + * @param {boolean} reversed The given reversed flag. + */ + constructor( + segmentVertices: FolioCalculationContentSegmentVertices, + segmentLabelOffset: number, + reversed: boolean + ) { + const { UPPER_LEFT_VERTEX, LOWER_RIGHT_VERTEX } = segmentVertices; + + this.CENTERED_X_POSITION = (UPPER_LEFT_VERTEX.x + LOWER_RIGHT_VERTEX.x) / 2; + const offsetCorrection = reversed ? -segmentLabelOffset : segmentLabelOffset; + this.CENTERED_Y_POSITION = (UPPER_LEFT_VERTEX.y + LOWER_RIGHT_VERTEX.y) / 2 - offsetCorrection; + } +} + +/** + * The FolioCalculationContentSegmentCenteredPositions class. + * + * It is used in the context of the edition folio convolutes + * to calculate the centered positions of the content segments on the folio canvas. + */ +class FolioCalculationContentSegmentLabel { + /** + * The label for the content segment (string). + */ + public readonly SEGMENT_LABEL: string; + + /** + * The array of label strings for the content segment (string[]). + */ + public readonly SEGMENT_LABEL_ARRAY: string[]; + + /** + * The label offset for the content segment (number). + */ + public readonly SEGMENT_LABEL_OFFSET: number; + + /** + * Constructor of the FolioCalculationContentSegmentLabelAndOffset class. + * + * It initializes the class with values + * from the sigle and sigle addendum of the content segment. + * + * @param {string} sigle The given sigle of the content segment. + * @param {string | null} sigleAddendum The given sigle addendum of the content segment. + */ + constructor(sigle: string, sigleAddendum: string | null) { + this.SEGMENT_LABEL_ARRAY = [sigle, sigleAddendum ? ` ${sigleAddendum}` : '']; + this.SEGMENT_LABEL = this.SEGMENT_LABEL_ARRAY.join(' '); + this.SEGMENT_LABEL_OFFSET = sigleAddendum ? 5 : 0; + } +} + /** * The FolioCalculationContentSegmentVertices class. * @@ -128,65 +194,112 @@ export class FolioCalculationContentSegmentVertices { */ public readonly LOWER_LEFT_VERTEX: FolioCalculationPoint; + /** + * The vertices of a content segment as a string (string). + */ + public readonly VERTICES_AS_STRING: string; + /** * Constructor of the FolioCalculationContentSegmentVertices class. * * It initializes the class with four points * for upper and lower left and upper and lower right vertices. * - * @param {FolioCalculationContentSegment} calculatedContentSegment The given calculated content segment. + * @param {FolioSection} section The given section of the folio content. + * @param {FolioCalculationSystems} systems The given calculated systems. + * @param {number} sectionPartition The given section partition. + * @param {number} segmentOffsetCorrection The given segment offset correction. */ - constructor({ startX, startY, endX, endY }: FolioCalculationContentSegment) { + constructor( + section: FolioSection, + private systems: FolioCalculationSystems, + private sectionPartition: number, + private segmentOffsetCorrection: number + ) { + const { startX, startY, endX, endY } = this._calculateVertices(section); + this.UPPER_LEFT_VERTEX = new FolioCalculationPoint(startX, startY); this.UPPER_RIGHT_VERTEX = new FolioCalculationPoint(endX, startY); this.LOWER_RIGHT_VERTEX = new FolioCalculationPoint(endX, endY); this.LOWER_LEFT_VERTEX = new FolioCalculationPoint(startX, endY); + this.VERTICES_AS_STRING = this._getSegmentVerticesAsString(); } /** - * Public method: getSegmentVertices. + * Private method: _calculateVertices. * - * It returns the vertices of a content segment as a string. + * It calculates the vertices of a content segment. * - * @returns {string} The vertices of a content segment as a string. + * @param {FolioSection} section The given section of the folio content. + * @returns {FolioCalculationPoint} The calculated vertices of a content segment. */ - public getSegmentVerticesAsString(): string { - return [ - this.UPPER_LEFT_VERTEX.x, - this.UPPER_LEFT_VERTEX.y, - this.UPPER_RIGHT_VERTEX.x, - this.UPPER_RIGHT_VERTEX.y, - this.LOWER_RIGHT_VERTEX.x, - this.LOWER_RIGHT_VERTEX.y, - this.LOWER_LEFT_VERTEX.x, - this.LOWER_LEFT_VERTEX.y, - this.UPPER_LEFT_VERTEX.x, - this.UPPER_LEFT_VERTEX.y, - ].join(' '); + private _calculateVertices(section: FolioSection): { startX: number; startY: number; endX: number; endY: number } { + const startX = this._calculateX(section, true); + const endX = this._calculateX(section, false); + const startY = this._calculateY(section, true); + const endY = this._calculateY(section, false); + + return { startX, startY, endX, endY }; } -} -/** - * The FolioCalculationContentSegmentCache class. - * - * It is used in the context of the edition folio convolutes - * to calculate the values of a content segment cache on the folio canvas. - * - * Not exposed, only called internally from {@link FolioCalculation}. - */ -class FolioCalculationContentSegmentCache { /** - * The section of a content segment (FolioSection). + * Private method: _calculateX. + * + * It calculates the x value of the content segment vertices. + * + * @param {FolioSection} section The given section of the folio content. + * @param {boolean} isStart The given flag if the x value is for the start. + * @returns {number} The calculated the content segment vertices. */ - section: FolioSection; + private _calculateX(section: FolioSection, isStart: boolean): number { + const width = round(this.systems.SYSTEMS_DIMENSIONS.SYSTEMS_WIDTH / this.sectionPartition, 2); + + const systemIndex = section.position && section.position <= this.sectionPartition ? section.position - 1 : 0; + const baseX = this.systems.SYSTEMS_DIMENSIONS.START_X; + const offset = this.segmentOffsetCorrection / 2; + + const xValue = baseX + systemIndex * width + offset; + const correction = isStart ? 0 : width - this.segmentOffsetCorrection; + + return round(xValue + correction, 2); + } /** - * The vertices of a content segment (FolioCalculationContentSegmentCornerPoints). + * Private method: _calculateY. + * + * It calculates the y value of the content segment vertices. + * + * @param {FolioSection} section The given section of the folio content. + * @param {boolean} isStart The given flag if the y value is for the start. + * @returns {number} The calculated y value of the content segment vertices. */ - vertices: FolioCalculationContentSegmentVertices; + private _calculateY(section: FolioSection, isStart: boolean): number { + const systemIndex = isStart ? section.startSystem - 1 : section.endSystem - 1; + const systemLines = this.systems.SYSTEMS_LINES.SYSTEMS_ARRAYS[systemIndex]; - constructor() { - this.section = new FolioSection(); + const yValue = isStart ? systemLines.at(0).START_POINT.y : systemLines.at(-1).END_POINT.y; + const correction = this.segmentOffsetCorrection * (isStart ? -1 : 1); + + return round(yValue + correction, 2); + } + + /** + * Private method: getSegmentVerticesAsString. + * + * It returns the vertices of a content segment as a string. + * + * @returns {string} The vertices of a content segment as a string. + */ + private _getSegmentVerticesAsString(): string { + const vertices = [ + this.UPPER_LEFT_VERTEX, + this.UPPER_RIGHT_VERTEX, + this.LOWER_RIGHT_VERTEX, + this.LOWER_LEFT_VERTEX, + this.UPPER_LEFT_VERTEX, + ]; + + return vertices.map(vertex => `${vertex.x} ${vertex.y}`).join(' '); } } @@ -199,26 +312,6 @@ class FolioCalculationContentSegmentCache { * Exposed to be used throughout {@link EditionSheetsModule}. */ export class FolioCalculationContentSegment { - /** - * The correction value for the offset of the content segment (number). - */ - offsetCorrection: number; - - /** - * The width including offset of the content segment (number). - */ - widthWithOffset: number; - - /** - * The width of the content segment (number). - */ - width: number; - - /** - * The height of the content segment (number). - */ - height: number; - /** * The centered X position of the content segment (number). */ @@ -230,75 +323,50 @@ export class FolioCalculationContentSegment { centeredYPosition: number; /** - * The system range of the content segment (number). - */ - systemRange: number; - - /** - * The start position (x-value) of the index of the content segment (number). - */ - startXIndex: number; - - /** - * The start position (y-value) of the index of the content segment (number). - */ - startYIndex: number; - - /** - * The start position (x-value) of the content segment (number). + * The label for the id of the edition complex of the content segment (string). */ - startX: number; + complexId: string; /** - * The end position (x-value) of the content segment (number). + * The link to a convolute description in the critical report. */ - endX: number; + linkTo: string; /** - * The start position (y-value) of the content segment (number). + * The boolean flag if the content segment is reversed. */ - startY: number; + reversed: boolean; /** - * The end position (y-value) of the content segment (number). + * The section of a content segment (FolioSection). */ - endY: number; + section: FolioSection; /** - * The current content segment (FolioCalculationContentSegmentCache). + * The section partition of the content segment (number). */ - current: FolioCalculationContentSegmentCache; + sectionPartition: number; /** - * The previous content segment (FolioCalculationContentSegmentCache). + * The array of label strings for the content segment (string[]). */ - previous: FolioCalculationContentSegmentCache; + segmentLabelArray: string[]; /** - * The vertices of the content segment polygon (string). + * The label for the content segment (string). */ - segmentVertices: string; + segmentLabel: string; /** - * The label for the id of the edition complex of the content segment (string). + * The boolean flag if the content segment can be selected. */ - complexId: string; + selectable: boolean; /** * The label for the id of the content segment (string). */ sheetId: string; - /** - * The array of label strings for the content segment (string[]). - */ - segmentLabelArray: string[]; - - /** - * The label for the content segment (string). - */ - segmentLabel: string; - /** * The label for the sigle of the content segment (string). */ @@ -310,28 +378,98 @@ export class FolioCalculationContentSegment { sigleAddendum: string; /** - * The boolean flag if the content segment can be selected. + * The vertices of a content segment (FolioCalculationContentSegmentVertices). */ - selectable: boolean; + vertices: FolioCalculationContentSegmentVertices; /** - * The boolean flag if the content segment is reversed. + * Constructor of the FolioCalculationContentSegment class. + * + * It initializes the class with values from the content segment, + * the calculated systems and the segment offset correction. + * + * @param {FolioContent} content The given content segment. + * @param {FolioCalculationSystems} systems The given calculated systems. + * @param {number} segmentOffsetCorrection The given segment offset correction. */ - reversed: boolean; + constructor( + content: FolioContent, + private systems: FolioCalculationSystems, + private segmentOffsetCorrection: number + ) { + this.sectionPartition = content.sectionPartition ?? 1; + + this._getContentSections(content); + } /** - * The link to a convolute description in the critical report. + * Private method: _getContentSections. + * + * It gets the sections of a given folio content. + * + * @param {FolioContent} content The given folio content. + * @returns {void} Gets the sections of a given folio content. */ - linkTo: string; + private _getContentSections(content: FolioContent): void { + if (!content.sections) { + console.error('No sections array in content', content); + return; + } + if (content.sections.length > this.sectionPartition) { + console.error('Sections array is bigger than sectionPartition'); + return; + } + if (this.systems.NUMBER_OF_SYSTEMS === 0) { + console.error('No systems in folio'); + return; + } + content.sections.forEach((section: FolioSection, _sectionIndex: number) => { + this._setProperties(content, section); + }); + } /** - * The section partition of the content segment (number). + * Private method: setProperties. + * + * It sets the properties of a content segment. + * + * @param {FolioContent} content The given folio content. + * @param {FolioSection} section The given section of the folio content. + * @returns {void} Sets the properties of a content segment. */ - sectionPartition: number; + private _setProperties(content: FolioContent, section: FolioSection): void { + const { complexId, sheetId, selectable = true, reversed = false, linkTo = '', sigle, sigleAddendum } = content; + + this.section = section; + + const label = new FolioCalculationContentSegmentLabel(sigle, sigleAddendum); - constructor() { - this.previous = new FolioCalculationContentSegmentCache(); - this.current = new FolioCalculationContentSegmentCache(); + this.vertices = new FolioCalculationContentSegmentVertices( + section, + this.systems, + this.sectionPartition, + this.segmentOffsetCorrection + ); + + const centeredPositions = new FolioCalculationContentSegmentCenteredPositions( + this.vertices, + label.SEGMENT_LABEL_OFFSET, + reversed + ); + + Object.assign(this, { + complexId, + sheetId, + sigle, + sigleAddendum, + selectable: selectable, + reversed: reversed, + linkTo: linkTo, + segmentLabelArray: label.SEGMENT_LABEL_ARRAY, + segmentLabel: label.SEGMENT_LABEL, + centeredXPosition: centeredPositions.CENTERED_X_POSITION, + centeredYPosition: centeredPositions.CENTERED_Y_POSITION, + }); } } @@ -400,14 +538,14 @@ export class FolioCalculationSheet { */ class FolioCalculationSystemsMargins { /** - * The left margin factor of the systems (number). + * The horizontal margin factor of the systems (number). */ - private static readonly LEFT_MARGIN_FACTOR = 1 / 6; + private static readonly HORIZONTAL_MARGIN_FACTOR = 1 / 6; /** - * The right margin factor of the systems (number). + * The vertical margin factor of the systems (number). */ - private static readonly RIGHT_MARGIN_FACTOR = FolioCalculationSystemsMargins.LEFT_MARGIN_FACTOR / 2; + private static readonly VERTICAL_MARGIN_FACTOR = 0.05; /** * The horizontal margins of the systems (number). @@ -419,6 +557,11 @@ class FolioCalculationSystemsMargins { */ public readonly LEFT_MARGIN: number; + /** + * The lower margin of the systems (number). + */ + public readonly LOWER_MARGIN: number; + /** * The right margin of the systems (number). */ @@ -429,6 +572,11 @@ class FolioCalculationSystemsMargins { */ public readonly UPPER_MARGIN: number; + /** + * The vertical margins of the systems (number). + */ + public readonly VERTICAL_MARGINS: number; + /** * Constructor of the FolioCalculationSystemsMargins class. * @@ -436,24 +584,25 @@ class FolioCalculationSystemsMargins { * from the sheet and the number of systems. * * @param {FolioCalculationSheet} sheet The given calculated folio sheet. - * @param {number} numberOfSystems The given number of systems. */ - constructor( - private sheet: FolioCalculationSheet, - private numberOfSystems: number - ) { - const UPPER_MARGIN_FACTOR = 1 / (this.numberOfSystems + 2); + constructor(private sheet: FolioCalculationSheet) { + this.UPPER_MARGIN = this._calculateSheetMargin( + this.sheet.SHEET_HEIGHT, + FolioCalculationSystemsMargins.VERTICAL_MARGIN_FACTOR + ); + this.LOWER_MARGIN = this.UPPER_MARGIN; - this.UPPER_MARGIN = this._calculateSheetMargin(this.sheet.SHEET_HEIGHT, UPPER_MARGIN_FACTOR); this.LEFT_MARGIN = this._calculateSheetMargin( this.sheet.SHEET_WIDTH, - FolioCalculationSystemsMargins.LEFT_MARGIN_FACTOR + FolioCalculationSystemsMargins.HORIZONTAL_MARGIN_FACTOR ); this.RIGHT_MARGIN = this._calculateSheetMargin( this.sheet.SHEET_WIDTH, - FolioCalculationSystemsMargins.RIGHT_MARGIN_FACTOR + FolioCalculationSystemsMargins.HORIZONTAL_MARGIN_FACTOR / 2 ); + this.HORIZONTAL_MARGINS = this.LEFT_MARGIN + this.RIGHT_MARGIN; + this.VERTICAL_MARGINS = this.UPPER_MARGIN + this.LOWER_MARGIN; } /** @@ -482,6 +631,11 @@ class FolioCalculationSystemsDimensions { */ public readonly END_X: number; + /** + * The end position (y-value) of the systems (number). + */ + public readonly END_Y: number; + /** * The start position (x-value) of the systems (number). */ @@ -497,6 +651,11 @@ class FolioCalculationSystemsDimensions { */ public readonly SYSTEMS_WIDTH: number; + /** + * The height of the systems (number). + */ + public readonly SYSTEMS_HEIGHT: number; + /** * Constructor of the FolioCalculationSystemsDimensions class. * @@ -510,13 +669,17 @@ class FolioCalculationSystemsDimensions { private sheet: FolioCalculationSheet, private systemsMargins: FolioCalculationSystemsMargins ) { - const { SHEET_WIDTH: WIDTH, UPPER_LEFT_CORNER } = this.sheet; - const { HORIZONTAL_MARGINS, LEFT_MARGIN, UPPER_MARGIN } = this.systemsMargins; + const { SHEET_WIDTH, SHEET_HEIGHT, UPPER_LEFT_CORNER } = this.sheet; + const { HORIZONTAL_MARGINS, VERTICAL_MARGINS, LEFT_MARGIN, UPPER_MARGIN } = this.systemsMargins; + + this.SYSTEMS_WIDTH = SHEET_WIDTH - HORIZONTAL_MARGINS; + this.SYSTEMS_HEIGHT = SHEET_HEIGHT - VERTICAL_MARGINS; - this.SYSTEMS_WIDTH = WIDTH - HORIZONTAL_MARGINS; this.START_X = UPPER_LEFT_CORNER.x + LEFT_MARGIN; - this.END_X = this.START_X + this.SYSTEMS_WIDTH; this.START_Y = UPPER_LEFT_CORNER.y + UPPER_MARGIN; + + this.END_X = this.START_X + this.SYSTEMS_WIDTH; + this.END_Y = this.START_Y + this.SYSTEMS_HEIGHT; } } @@ -568,8 +731,11 @@ class FolioCalculationSystemsLines { * @returns {FolioCalculationLine} The calculated line of a system. */ private _calculateSystemLine = (line: number): FolioCalculationLine => { - const { START_X: startX, END_X: endX } = this.systemsDimensions; - return new FolioCalculationLine(new FolioCalculationPoint(startX, line), new FolioCalculationPoint(endX, line)); + const { START_X, END_X } = this.systemsDimensions; + return new FolioCalculationLine( + new FolioCalculationPoint(START_X, line), + new FolioCalculationPoint(END_X, line) + ); }; } @@ -637,86 +803,6 @@ class FolioCalculationSystemsLabels { } } -/** - * The FolioCalculationSystemsYArray class. - * - * It is used in the context of the edition folio convolutes - * to calculate the y-values of the systems on the folio canvas. - */ -class FolioCalculationSystemsYArray { - /** - * The array of y-value arrays for the systems (number). - */ - public readonly Y_ARRAY: number[][]; - - /** - * Constructor of the FolioCalculationSystemsYArray class. - * - * It initializes the class with values - * from the number of systems, the start position of the systems, the line space factor, the zoom factor and the offset. - * - * @param {number} numberOfSystems The given number of systems. - * @param {number} systemStartY The given start position of the systems. - * @param {number} lineSpaceFactor The given line space factor. - * @param {number} zoomFactor The given zoom factor. - * @param {number} offset The given offset. - */ - constructor( - private numberOfSystems: number, - private systemStartY: number, - private lineSpaceFactor: number, - private zoomFactor: number, - private offset: number - ) { - this.Y_ARRAY = this._calculateSystemYArray(); - } - - /** - * Private method: _calculateSystemYArray. - * - * It calculates the array of start positions of the systems of a folio. - * - * @returns {number[][]} The array of start position arrays (Y values) for the calculatedSystems. - */ - private _calculateSystemYArray(): number[][] { - return Array.from({ length: this.numberOfSystems }, (_, i) => { - const yStartValue = this._getContentSegmentStart(i); - return this._calculateSystemLineArray(yStartValue); - }); - } - - /** - * Private method: _calculateSystemLineArray. - * - * It calculates the start position of the lines per system of a folio. - * - * @param {number} y The Y start value of the first line of a system. - * @returns {number[]} The start position array (Y values) of a system. - */ - private _calculateSystemLineArray(y: number): number[] { - if (!y) { - return undefined; - } - - // Generate an array with 5 elements, each one being the start value for a line - return Array.from({ length: 5 }, (_, i) => y + this.lineSpaceFactor * i * this.zoomFactor); - } - - /** - * Private method: _getContentSegmentStart. - * - * It calculates the start position of a content segment of a folio. - * - * @param {number} index The given index position (offset * index --> - * (X: start at segment 1, 2, 3 etc; Y: start at system line 1, 2, 3 etc.)). - * @returns {number} The start position for a calculatedContentSegment. - */ - private _getContentSegmentStart(index: number): number { - const segmentValue = this.systemStartY + this.offset * index; - return round(parseFloat(segmentValue.toString()), 2); - } -} - /** * The FolioCalculationSystems class. * @@ -732,14 +818,19 @@ export class FolioCalculationSystems { public lineSpaceFactor = 1.5; /** - * The line label array of the systems (FolioCalculationPoint[]). + * The number of systems (number). */ - public readonly SYSTEMS_LABEL_ARRAY: FolioCalculationPoint[]; + public readonly NUMBER_OF_SYSTEMS: number; /** - * The array of line arrays of the systems (FolioCalculationLine[][]). + * The labels of the systems (FolioCalculationSystemsLabels). */ - public readonly SYSTEMS_ARRAYS: FolioCalculationLine[][]; + public readonly SYSTEMS_LABELS: FolioCalculationSystemsLabels; + + /** + * The lines of the systems (FolioCalculationSystemsLines). + */ + public readonly SYSTEMS_LINES: FolioCalculationSystemsLines; /** * The calculated margins of the systems (FolioCalculationSystemsMarginCalculator). @@ -752,96 +843,64 @@ export class FolioCalculationSystems { public readonly SYSTEMS_DIMENSIONS: FolioCalculationSystemsDimensions; /** - * The array of y-value arrays for the systems (number). + * The zoom factor (number). */ - private readonly Y_ARRAY: number[][]; + public readonly ZOOM_FACTOR: number; /** * Constructor of the FolioCalculationSheet class. * - * It initializes the class with values from folio settings, the folio id and zoom factor. + * It initializes the class with values + * from the calculated folio sheet, the systems string and the zoom factor. * * @param {FolioCalculationSheet} sheet The given calculated folio sheet. - * @param {number} numberOfSystems The given number of systems. - * @param {number} zoomFactor The given zoom factor. + * @param {string} systems The given systems string. + * @param {number} factor The given zoom factor. */ - constructor( - private sheet: FolioCalculationSheet, - private numberOfSystems: number, - private zoomFactor: number - ) { - this.SYSTEMS_MARGINS = this._calculateSystemsMargins(); - this.SYSTEMS_DIMENSIONS = this._calculateSystemsDimensions(); + constructor(sheet: FolioCalculationSheet, systems: string, factor: number) { + this.NUMBER_OF_SYSTEMS = systems ? parseInt(systems, 10) : 0; + this.ZOOM_FACTOR = factor; - this.Y_ARRAY = this._calculateSystemsYArray().Y_ARRAY; - this.SYSTEMS_ARRAYS = this._calculateSystemsLines().SYSTEMS_ARRAYS; - this.SYSTEMS_LABEL_ARRAY = this._calculateSystemsLabels().SYSTEMS_LABELS_ARRAY; - } + this.SYSTEMS_MARGINS = new FolioCalculationSystemsMargins(sheet); + this.SYSTEMS_DIMENSIONS = new FolioCalculationSystemsDimensions(sheet, this.SYSTEMS_MARGINS); - /** - * Private method: _calculateSystemsMargins. - * - * It calculates the margins of the systems of a folio. - * - * @returns {FolioCalculationSystemsMargins} The calculated margins of the systems. - */ - private _calculateSystemsMargins(): FolioCalculationSystemsMargins { - return new FolioCalculationSystemsMargins(this.sheet, this.numberOfSystems); - } - - /** - * Private method: _calculateSystemsDimensions. - * - * It calculates the dimensions of the systems of a folio. - * - * @returns {FolioCalculationSystemsDimensions} The calculated dimensions of the systems. - */ - private _calculateSystemsDimensions(): FolioCalculationSystemsDimensions { - return new FolioCalculationSystemsDimensions(this.sheet, this.SYSTEMS_MARGINS); - } - - /** - * Private method: _calculateSystemsYArray. - * - * It calculates the array of start positions of the systems of a folio. - * - * @returns {FolioCalculationSystemsYArray} The calculated array of start positions for the systems. - */ - private _calculateSystemsYArray(): FolioCalculationSystemsYArray { - return new FolioCalculationSystemsYArray( - this.numberOfSystems, - this.SYSTEMS_DIMENSIONS.START_Y, - this.lineSpaceFactor, - this.zoomFactor, - this.SYSTEMS_MARGINS.UPPER_MARGIN + const Y_ARRAY = this._calculateSystemYArray(); + this.SYSTEMS_LINES = new FolioCalculationSystemsLines(Y_ARRAY, this.SYSTEMS_DIMENSIONS); + this.SYSTEMS_LABELS = new FolioCalculationSystemsLabels( + Y_ARRAY, + this.SYSTEMS_MARGINS, + this.SYSTEMS_DIMENSIONS, + this.ZOOM_FACTOR ); } /** - * Private method: _calculateSystemsLines. + * Private method: _calculateSystemYArray. * - * It calculates the lines of the systems of a folio. + * It calculates the array of start positions of the systems of a folio. * - * @returns {FolioCalculationSystemsLines} The calculated lines of the systems. + * @returns {number[][]} The array of start position arrays (Y values) for the calculatedSystems. */ - private _calculateSystemsLines(): FolioCalculationSystemsLines { - return new FolioCalculationSystemsLines(this.Y_ARRAY, this.SYSTEMS_DIMENSIONS); + private _calculateSystemYArray(): number[][] { + const spacePerSystem = this.SYSTEMS_DIMENSIONS.SYSTEMS_HEIGHT / this.NUMBER_OF_SYSTEMS; + const array = Array.from({ length: this.NUMBER_OF_SYSTEMS }, (_, i) => { + const yStartValue = round(this.SYSTEMS_DIMENSIONS.START_Y + i * spacePerSystem, 2); + return this._calculateSystemLineArray(yStartValue); + }); + return array; } /** - * Private method: _calculateSystemsLabels. + * Private method: _calculateSystemLineArray. * - * It calculates the labels of the systems of a folio. + * It calculates the start position of the 5 lines per system of a folio. * - * @returns {FolioCalculationSystemsLabels} The calculated labels of the systems. + * @param {number} y The Y start value of the first line of a system. + * @returns {number[]} The start position array (Y values) of a system. */ - private _calculateSystemsLabels(): FolioCalculationSystemsLabels { - return new FolioCalculationSystemsLabels( - this.Y_ARRAY, - this.SYSTEMS_MARGINS, - this.SYSTEMS_DIMENSIONS, - this.zoomFactor - ); + private _calculateSystemLineArray(y: number): number[] { + const NUMBER_OF_LINES = 5; + return Array.from({ length: NUMBER_OF_LINES }, (_, i) => y + i * this.lineSpaceFactor * this.ZOOM_FACTOR); } } @@ -854,33 +913,23 @@ export class FolioCalculationSystems { * Exposed to be used throughout {@link EditionSheetsModule}. */ export class FolioCalculation { - /** - * The number of systems (number). - */ - public readonly NUMBER_OF_SYSTEMS: number; - - /** - * The zoom factor (number). - */ - public readonly ZOOM_FACTOR: number; - /** * The calculated values for the sheet * of a folio (FolioCalculationSheet). */ - public sheet: FolioCalculationSheet; + public readonly SHEET: FolioCalculationSheet; /** * The calculated values for the systems * of a folio (FolioCalculationSystems). */ - public systems: FolioCalculationSystems; + public readonly SYSTEMS: FolioCalculationSystems; /** * The calculated values for content segments * of a folio (FolioCalculationContentSegment[]). */ - public contentSegments: FolioCalculationContentSegment[]; + public readonly CONTENT_SEGMENTS: FolioCalculationContentSegment[]; /** * Constructor of the FolioCalculation class. @@ -891,254 +940,12 @@ export class FolioCalculation { * @param {Folio} folioData The given folio data. * @param {number} [segmentOffsetCorrection] The optional given segment offset correction. */ - constructor( - folioSettings: FolioSettings, - folioData: Folio, - private segmentOffsetCorrection: number = 0 - ) { - this.NUMBER_OF_SYSTEMS = folioData.systems ? parseInt(folioData.systems, 10) : 0; - this.ZOOM_FACTOR = folioSettings.factor; - - this.sheet = new FolioCalculationSheet(folioSettings, folioData.folioId); - this.systems = new FolioCalculationSystems(this.sheet, this.NUMBER_OF_SYSTEMS, this.ZOOM_FACTOR); - - this.contentSegments = this._calculateContentSegments(folioData.content); - } - - private _calculateContentSegments(contents: FolioContent[] = []): FolioCalculationContentSegment[] { - return contents.map((content: FolioContent) => this._calculateContentSegment(content)); - } - - private _calculateContentSegment(content: FolioContent): FolioCalculationContentSegment { - const calculatedContentSegment = new FolioCalculationContentSegment(); - this._setOffsetCorrection(calculatedContentSegment); - this._setSectionPartition(calculatedContentSegment, content); - this._handleSections(calculatedContentSegment, content); - - return calculatedContentSegment; - } - - private _setOffsetCorrection(calculatedContentSegment: FolioCalculationContentSegment): void { - calculatedContentSegment.offsetCorrection = this.segmentOffsetCorrection; - } - - private _setSectionPartition( - calculatedContentSegment: FolioCalculationContentSegment, - content: FolioContent - ): void { - calculatedContentSegment.sectionPartition = content.sectionPartition ?? 1; - } - - private _handleSections(calculatedContentSegment: FolioCalculationContentSegment, content: FolioContent): void { - if (!content.sections) { - console.error('No sections array in content', content); - return; - } - if (content.sections.length > calculatedContentSegment.sectionPartition) { - console.error('Sections array is bigger than sectionPartition'); - return; - } - content.sections.forEach((section: FolioSection, _sectionIndex: number) => { - this._handleSection(calculatedContentSegment, section, content); - }); - } - - private _handleSection( - calculatedContentSegment: FolioCalculationContentSegment, - section: FolioSection, - content: FolioContent - ): void { - this._setContentSegmentSectionCache(calculatedContentSegment, section); - this._setContentSegmentMainValues(calculatedContentSegment, section, content); - this._setVertices(calculatedContentSegment); - this._setOtherProperties(calculatedContentSegment, content); - } - - private _setVertices(calculatedContentSegment: FolioCalculationContentSegment): void { - calculatedContentSegment.current.vertices = new FolioCalculationContentSegmentVertices( - calculatedContentSegment - ); - calculatedContentSegment.segmentVertices = - calculatedContentSegment.current.vertices.getSegmentVerticesAsString(); - } - - private _setOtherProperties( - calculatedContentSegment: FolioCalculationContentSegment, - { complexId, sheetId, selectable = true, reversed = false, linkTo = '', sigle, sigleAddendum }: FolioContent - ): void { - const { segmentLabel, segmentLabelArray, segmentLabelOffset } = this._getSegmentLabelAndOffset( - sigle, - sigleAddendum - ); - - const { centeredXPosition, centeredYPosition } = this._calculateCenteredPositions( - calculatedContentSegment, - segmentLabelOffset, - reversed + constructor(folioSettings: FolioSettings, folioData: Folio, segmentOffsetCorrection: number = 0) { + this.SHEET = new FolioCalculationSheet(folioSettings, folioData.folioId); + this.SYSTEMS = new FolioCalculationSystems(this.SHEET, folioData.systems, folioSettings.factor); + this.CONTENT_SEGMENTS = folioData.content.map( + (content: FolioContent) => + new FolioCalculationContentSegment(content, this.SYSTEMS, segmentOffsetCorrection) ); - - Object.assign(calculatedContentSegment, { - complexId, - sheetId, - sigle, - sigleAddendum, - selectable: selectable, - reversed: reversed, - linkTo: linkTo, - segmentLabelArray, - segmentLabel, - centeredXPosition, - centeredYPosition, - }); - } - - private _calculateCenteredPositions( - calculatedContentSegment: FolioCalculationContentSegment, - segmentLabelOffset: number, - reversed: boolean - ): { centeredXPosition: number; centeredYPosition: number } { - const { UPPER_LEFT_VERTEX: upperLeftCorner, LOWER_RIGHT_VERTEX: lowerRightCorner } = - calculatedContentSegment.current.vertices; - - const centeredXPosition = (upperLeftCorner.x + lowerRightCorner.x) / 2; - const offsetCorrection = reversed ? -segmentLabelOffset : segmentLabelOffset; - const centeredYPosition = (upperLeftCorner.y + lowerRightCorner.y) / 2 - offsetCorrection; - - return { centeredXPosition, centeredYPosition }; - } - - private _getSegmentLabelAndOffset( - sigle: string, - sigleAddendum: string | null - ): { segmentLabel: string; segmentLabelArray: string[]; segmentLabelOffset: number } { - const segmentLabelArray = [sigle, sigleAddendum ? ` ${sigleAddendum}` : '']; - const segmentLabel = segmentLabelArray.join(' '); - const segmentLabelOffset = sigleAddendum ? 5 : 0; - - return { segmentLabel, segmentLabelArray, segmentLabelOffset }; - } - - /** - * Private helper method for _calculateContentArray: _setContentSegmentMainValues. - * - * It calculates the main values for the content segments of a folio. - * - * @param {FolioCalculationContentSegment} calculatedContentSegment The given calculated content segment. - * @param {FolioSection} section The given section. - * @param {FolioContent} content The given folio content. - * @returns {void} Calculates and sets the main values of the calculatedContentSegment. - */ - private _setContentSegmentMainValues( - calculatedContentSegment: FolioCalculationContentSegment, - section: FolioSection, - content: FolioContent - ): void { - if (!calculatedContentSegment) { - return; - } - - // SegmentsWidth - calculatedContentSegment.widthWithOffset = round( - this.systems.SYSTEMS_DIMENSIONS.SYSTEMS_WIDTH / calculatedContentSegment.sectionPartition, - 2 - ); - calculatedContentSegment.width = - calculatedContentSegment.widthWithOffset - calculatedContentSegment.offsetCorrection; // OffsetCorrection to avoid horizontal collision between segments - - // SegmentsHeight - calculatedContentSegment.systemRange = section.endSystem - section.startSystem + 1; - calculatedContentSegment.height = round( - this.systems.SYSTEMS_MARGINS.UPPER_MARGIN * calculatedContentSegment.systemRange - - calculatedContentSegment.offsetCorrection, - 2 - ); // OffsetCorrection to avoid vertical collision between segments - - // Find segment start indices - calculatedContentSegment.startYIndex = section.startSystem - 1; - calculatedContentSegment.startXIndex = 0; - // Check if position exists ... - if (section.position) { - const position: number = section.position; - if (position > calculatedContentSegment.sectionPartition) { - // ... and is bigger than number of sections - // Index remains 0 - console.error( - 'Assuming position 1 because current position is bigger than number of sections for segment ', - content - ); - } else if (calculatedContentSegment.sectionPartition > 1) { - // ... or is smaller or equal to number of sections which is bigger 1 - // Than index is position - 1 (positions go from 1, 2, 3 to n) - calculatedContentSegment.startXIndex = position - 1; - } - } - // For other cases index remains 0 (default) - - // SegmentsStartX - // WidthWithOffset * startXIndex - // Add half the offsetCorrection to systemStartX to center segments - calculatedContentSegment.startX = this._getContentSegmentStart( - calculatedContentSegment.widthWithOffset, - calculatedContentSegment.startXIndex, - this.systems.SYSTEMS_DIMENSIONS.START_X, - calculatedContentSegment.offsetCorrection / 2 - ); - calculatedContentSegment.endX = round(calculatedContentSegment.startX + calculatedContentSegment.width, 2); - - // SegmentsStartY - // Subtract half the offsetCorrection from systemStartY to center segments - calculatedContentSegment.startY = this._getContentSegmentStart( - this.systems.SYSTEMS_MARGINS.UPPER_MARGIN, - calculatedContentSegment.startYIndex, - this.systems.SYSTEMS_DIMENSIONS.START_Y, - -calculatedContentSegment.offsetCorrection / 2 - ); - calculatedContentSegment.endY = round(calculatedContentSegment.startY + calculatedContentSegment.height, 2); - } - - /** - * Private method: _setContentSegmentSectionCache. - * - * It caches the current and previous section of a calculated content segment. - * - * @param {FolioCalculationContentSegment} calculatedContentSegment The given calculated content segment. - * @param {FolioSection} section The given section. - * @returns {void} Caches the current and previous section of the calculatedContentSegment. - */ - private _setContentSegmentSectionCache( - calculatedContentSegment: FolioCalculationContentSegment, - section: FolioSection - ): void { - if (!calculatedContentSegment) { - return; - } - - if (calculatedContentSegment.current['section']) { - calculatedContentSegment.previous.section = calculatedContentSegment.current.section; - calculatedContentSegment.previous.vertices = calculatedContentSegment.current.vertices; - } - calculatedContentSegment.current.section = section; - } - - /** - * Private helper method for _calculateContentArray: _getContentSegmentStart. - * - * It calculates the start position of a content segment of a folio. - * - * @param {number} offset The given offset. - * @param {number} index The given index position (offset * index --> - * (X: start at segment 1, 2, 3 etc; Y: start at system line 1, 2, 3 etc.)). - * @param {number} systemStart The given horizontal(X) or vertical (Y) systemsMargins. - * @param {number} [offsetCorrection] The optional given offset correction value (mostly needed to center segments). - * @returns {number} The start position for a calculatedContentSegment. - */ - private _getContentSegmentStart( - offset: number, - index: number, - systemStart: number, - offsetCorrection: number = 0 - ): number { - const segmentValue = systemStart + offset * index + offsetCorrection; - return round(parseFloat(segmentValue.toString()), 2); } } diff --git a/src/app/views/edition-view/models/folio-svg-data.model.ts b/src/app/views/edition-view/models/folio-svg-data.model.ts index 10ab0c1ce7..6623c8b00f 100644 --- a/src/app/views/edition-view/models/folio-svg-data.model.ts +++ b/src/app/views/edition-view/models/folio-svg-data.model.ts @@ -61,20 +61,20 @@ class FolioSvgSheet { */ class FolioSvgSystems { /** - * The line label array of a folio (FolioCalculationPoint[]). + * The systems label positions of a folio (FolioCalculationPoint[]). * * It contains all calculated labels and their positions (in px) * to draw the svg of the systems of a folio. */ - systemsLabelArray: FolioCalculationPoint[]; + systemsLabelPositions: FolioCalculationPoint[]; /** - * The array of line arrays of a folio (FolioCalculationLine[][]). + * The system lines of a folio (FolioCalculationLine[][]). * * It contains all calculated lines and their positions (in px) * to draw the svg of the systems of a folio. */ - systemsArrays: FolioCalculationLine[][]; + systemsLines: FolioCalculationLine[][]; /** * Constructor of the FolioSvgSystems class. @@ -84,8 +84,8 @@ class FolioSvgSystems { * @param {FolioCalculationSystems} calculatedSystems The given calculated folio systems. */ constructor(calculatedSystems: FolioCalculationSystems) { - this.systemsLabelArray = calculatedSystems.SYSTEMS_LABEL_ARRAY; - this.systemsArrays = calculatedSystems.SYSTEMS_ARRAYS; + this.systemsLabelPositions = calculatedSystems.SYSTEMS_LABELS.SYSTEMS_LABELS_ARRAY; + this.systemsLines = calculatedSystems.SYSTEMS_LINES.SYSTEMS_ARRAYS; } } @@ -161,7 +161,7 @@ export class FolioSvgContentSegment { this.linkTo = calculatedContentSegment.linkTo; this.selectable = calculatedContentSegment.selectable; this.reversed = calculatedContentSegment.reversed; - this.segmentVertices = calculatedContentSegment.segmentVertices; + this.segmentVertices = calculatedContentSegment.vertices?.VERTICES_AS_STRING; this.segmentLabelArray = calculatedContentSegment.segmentLabelArray; this.segmentLabel = calculatedContentSegment.segmentLabel; this.centeredXPosition = calculatedContentSegment.centeredXPosition; @@ -210,11 +210,8 @@ export class FolioSvgData { * @param {FolioCalculation} calculation The given folio calculation. */ constructor(calculation: FolioCalculation) { - this.sheet = new FolioSvgSheet(calculation.sheet); - this.systems = new FolioSvgSystems(calculation.systems); - this.contentSegments = []; - this.contentSegments = calculation.contentSegments.map( - calculatedContentSegment => new FolioSvgContentSegment(calculatedContentSegment) - ); + this.sheet = new FolioSvgSheet(calculation.SHEET); + this.systems = new FolioSvgSystems(calculation.SYSTEMS); + this.contentSegments = calculation.CONTENT_SEGMENTS.map(segment => new FolioSvgContentSegment(segment)); } } From 3cd082f149e5da69cc950fb0ef489546db51587a Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Tue, 5 Mar 2024 01:01:39 +0100 Subject: [PATCH 49/63] test(edition): add more tests for FolioService --- .../folio.service.spec.ts | 233 ++++++++++++++---- src/testing/mock-data/mockEditionData.ts | 34 +++ 2 files changed, 225 insertions(+), 42 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts index 86045d3aba..97cbdefc04 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts @@ -19,9 +19,10 @@ import { ViewBox, } from '@awg-app/views/edition-view/models'; +import { mockConsole } from '@testing/mock-helper'; import { FolioService } from './folio.service'; -describe('FolioService', () => { +describe('FolioService (DONE)', () => { let folioService: FolioService; let refMock: any; @@ -42,10 +43,12 @@ describe('FolioService', () => { let appendSystemsGroupLabelSpy: Spy; let appendSystemsGroupLinesSpy: Spy; let appendSvgElementWithAttrsSpy: Spy; + let consoleSpy: Spy; let expectedConvolutes: FolioConvolute[]; let expectedFolioSettings: FolioSettings; let expectedFolioSvgData: FolioSvgData; + let expectedReversedFolio: Folio; let expectedUpperLeftCorner: FolioCalculationPoint; let expectedLowerRightCorner: FolioCalculationPoint; @@ -58,7 +61,7 @@ describe('FolioService', () => { let expectedContentSegmentFontStyle: string; let expectedContentSegmentOffsetCorrection: number; - let expectedContentSegmentReversedRotationAngle: number; + let expectedReversedRotationAngle: number; let expectedContentSegmentStrokeWidth: number; let expectedSheetStrokeWidth: number; let expectedSystemsLineStrokeWidth: number; @@ -77,6 +80,7 @@ describe('FolioService', () => { // Test data expectedConvolutes = JSON.parse(JSON.stringify(mockEditionData.mockFolioConvoluteData.convolutes)); + expectedReversedFolio = JSON.parse(JSON.stringify(mockEditionData.mockReversedFolio)); expectedFolioSettings = { factor: 1.5, formatX: 175, @@ -93,7 +97,7 @@ describe('FolioService', () => { expectedContentSegmentOffsetCorrection = 4; expectedContentSegmentFontStyle = '11px Source Sans Pro, source-sans-pro, sans-serif'; - expectedContentSegmentReversedRotationAngle = 180; + expectedReversedRotationAngle = 180; expectedContentSegmentStrokeWidth = 2; expectedSheetStrokeWidth = 1; @@ -151,6 +155,16 @@ describe('FolioService', () => { appendSystemsGroupLabelSpy = spyOn(folioService as any, '_appendSystemsGroupLabel').and.callThrough(); appendSystemsGroupLinesSpy = spyOn(folioService as any, '_appendSystemsGroupLines').and.callThrough(); appendSvgElementWithAttrsSpy = spyOn(folioService as any, '_appendSvgElementWithAttrs').and.callThrough(); + consoleSpy = spyOn(console, 'error').and.callFake(mockConsole.log); + }); + + afterEach(() => { + // Clear mock stores after each test + mockConsole.clear(); + }); + + afterAll(() => { + cleanStylesFromDOM(); }); afterAll(() => { @@ -161,6 +175,18 @@ describe('FolioService', () => { expect(folioService).toBeTruthy(); }); + describe('mock test objects (self-test)', () => { + it('... should use mock console', () => { + console.error('Test'); + + expect(mockConsole.get(0)).toBe('Test'); + }); + + it('... should clear mock console after each run', () => { + expect(mockConsole.get(0)).toBeUndefined(); + }); + }); + describe('default values', () => { it('... should have `_bgColor`', () => { expectToBe((folioService as any)._bgColor, expectedBgColor); @@ -191,10 +217,7 @@ describe('FolioService', () => { }); it('... should have `_contentSegmentReversedRotationAngle`', () => { - expectToBe( - (folioService as any)._contentSegmentReversedRotationAngle, - expectedContentSegmentReversedRotationAngle - ); + expectToBe((folioService as any)._contentSegmentReversedRotationAngle, expectedReversedRotationAngle); }); it('... should have `_contentSegmentStrokeWidth`', () => { @@ -227,8 +250,8 @@ describe('FolioService', () => { it('... should return an instance of FolioSvgData object', () => { // Create mock FolioSettings and Folio objects - const folioSettings: FolioSettings = new FolioSettings(); - const folio: Folio = new Folio(); + const folioSettings: FolioSettings = expectedFolioSettings; + const folio: Folio = expectedConvolutes[0].folios[0]; // Call the method with the mock objects const result = folioService.getFolioSvgData(folioSettings, folio); @@ -424,6 +447,34 @@ describe('FolioService', () => { expectToBe(rectElement.attr('stroke-width'), String(expectedSheetStrokeWidth)); expectToBe((rectElement.node() as Element).attributes.length, 7); }); + + describe('... should set sheet vertex to NaN if', () => { + it('... sheet width is NaN in folioCalculation model', () => { + const altSvgSheetGroup = D3_SELECTION.create('g'); + + expectedFolioSettings.formatX = NaN; + const altFolioSvgData = new FolioSvgData( + new FolioCalculation(expectedFolioSettings, expectedReversedFolio, 0) + ); + + (folioService as any)._addFolioSheetToSvgCanvas(altSvgSheetGroup, altFolioSvgData); + + expectToEqual(altFolioSvgData.sheet.lowerRightCorner.x, NaN); + }); + + it('... sheet height is NaN in folioCalculation model', () => { + const altSvgSheetGroup = D3_SELECTION.create('g'); + + expectedFolioSettings.formatY = NaN; + const altFolioSvgData = new FolioSvgData( + new FolioCalculation(expectedFolioSettings, expectedReversedFolio, 0) + ); + + (folioService as any)._addFolioSheetToSvgCanvas(altSvgSheetGroup, altFolioSvgData); + + expectToEqual(altFolioSvgData.sheet.lowerRightCorner.y, NaN); + }); + }); }); describe('#_addFolioSystemsToSvgCanvas', () => { @@ -444,15 +495,34 @@ describe('FolioService', () => { svgSheetGroup.remove(); }); + describe('... should not append anything and log an error if', () => { + it('... number of systems is not given in folioCalculation model', () => { + const emptySvgSheetGroup = D3_SELECTION.create('g'); + + expectedReversedFolio.systems = ''; + const emptyFolioSvgData = new FolioSvgData( + new FolioCalculation(expectedFolioSettings, expectedReversedFolio, 0) + ); + + (folioService as any)._addFolioSystemsToSvgCanvas(emptySvgSheetGroup, emptyFolioSvgData); + + expectToBe(emptySvgSheetGroup.selectAll('.systems-group').size(), 0); + expectToBe(emptySvgSheetGroup.selectAll('.system-line-group').size(), 0); + + expectSpyCall(consoleSpy, 1); + expectToBe(mockConsole.get(0), 'No systems in folio'); + }); + }); + it('... should append a systems group and a system line group to the SVG sheet group for each system', () => { - const systemCount = expectedFolioSvgData.systems.systemsArrays.length; + const systemCount = expectedFolioSvgData.systems.systemsLines.length; expectToBe(svgSheetGroup.selectAll('.systems-group').size(), systemCount); expectToBe(svgSheetGroup.selectAll('.system-line-group').size(), systemCount); }); it('... should trigger `_appendSystemsGroupLabel` for each system', () => { - const systemIndex = expectedFolioSvgData.systems.systemsLabelArray.length - 1; + const systemIndex = expectedFolioSvgData.systems.systemsLabelPositions.length - 1; const systemsGroup = svgSheetGroup .append('g') @@ -472,7 +542,7 @@ describe('FolioService', () => { }); it('... should trigger `_appendSystemsGroupLines` for each system', () => { - const systemIndex = expectedFolioSvgData.systems.systemsLabelArray.length - 1; + const systemIndex = expectedFolioSvgData.systems.systemsLabelPositions.length - 1; svgSheetGroup .append('g') @@ -482,7 +552,7 @@ describe('FolioService', () => { expectToBe(appendSystemsGroupLinesSpy.calls.count(), systemIndex + 1); expectSpyCall(appendSystemsGroupLinesSpy, systemIndex + 1, [ svgSheetGroup.select(`[systemLineGroupId="${systemIndex + 1}"]`), - expectedFolioSvgData.systems.systemsArrays.at(-1), + expectedFolioSvgData.systems.systemsLines.at(-1), ]); }); @@ -504,7 +574,7 @@ describe('FolioService', () => { systemsGroups.forEach((group, i) => { const systemsGroup = D3_SELECTION.select(group); const textElement = systemsGroup.select('text'); - const expectedLabel = expectedFolioSvgData.systems.systemsLabelArray[i]; + const expectedLabel = expectedFolioSvgData.systems.systemsLabelPositions[i]; expectToBe(textElement.attr('class'), 'system-label'); expectToBe(textElement.attr('x'), String(expectedLabel.x)); @@ -515,7 +585,7 @@ describe('FolioService', () => { }); }); - it('... should append as many line elements as content segments in systemArray to each system line group', () => { + it('... should append as many line elements as lines in systemsLines to each system line group', () => { const systemLineGroups = svgSheetGroup.selectAll('.system-line-group').nodes(); systemLineGroups.forEach((group, i) => { @@ -523,7 +593,7 @@ describe('FolioService', () => { expectToBe( systemLineGroup.selectAll('line').size(), - expectedFolioSvgData.systems.systemsArrays[i].length + expectedFolioSvgData.systems.systemsLines[i].length ); }); }); @@ -537,7 +607,7 @@ describe('FolioService', () => { lineElements.forEach((lineNode, j) => { const lineElement = D3_SELECTION.select(lineNode); - const expectedLine = expectedFolioSvgData.systems.systemsArrays[i][j]; + const expectedLine = expectedFolioSvgData.systems.systemsLines[i][j]; expectToBe(lineElement.attr('class'), 'system-line'); expectToBe(lineElement.attr('x1'), String(expectedLine.START_POINT.x)); @@ -571,25 +641,57 @@ describe('FolioService', () => { svgSheetGroup.remove(); }); - it('... should not do anything if there are no content content segments', () => { - const expectedCount = expectedFolioSvgData.contentSegments.length; + describe('... should not append anything and log an error if', () => { + it('... content.sections are not given in folioCalculation model', () => { + const emptySvgSheetGroup = D3_SELECTION.create('g'); - const folioSvgDataWithEmptyContent: FolioSvgData = { - ...expectedFolioSvgData, - contentSegments: [null], - }; - const emptySvgSheetGroup = D3_SELECTION.create('g'); + expectedReversedFolio.content[0].sections = undefined; + const emptyFolioSvgData = new FolioSvgData( + new FolioCalculation(expectedFolioSettings, expectedReversedFolio, 0) + ); - (folioService as any)._addFolioContentSegmentsToSvgCanvas( - emptySvgSheetGroup, - folioSvgDataWithEmptyContent - ); + (folioService as any)._addFolioSystemsToSvgCanvas(emptySvgSheetGroup, emptyFolioSvgData); - expectToBe(emptySvgSheetGroup.selectAll('g.content-segment-group').size(), 0); - expectSpyCall(appendContentSegmentGroupSpy, expectedCount); - expectSpyCall(appendContentSegmentLinkSpy, expectedCount); - expectSpyCall(appendContentSegmentLinkLabelSpy, expectedCount); - expectSpyCall(appendContentSegmentLinkPolygonSpy, expectedCount); + expectToBe(emptySvgSheetGroup.selectAll('g.content-segment-group').size(), 0); + + expectSpyCall(consoleSpy, 1); + expectToBe(mockConsole.get(0), 'No sections array in content'); + }); + + it('... content.sections length is greater than sectionPartition in folioCalculation model', () => { + const emptySvgSheetGroup = D3_SELECTION.create('g'); + + const sections = expectedReversedFolio.content[0].sections; + const partitionIndex = expectedReversedFolio.content[0].sectionPartition - 1; + sections.push(sections[partitionIndex]); + + const emptyFolioSvgData = new FolioSvgData( + new FolioCalculation(expectedFolioSettings, expectedReversedFolio, 0) + ); + + (folioService as any)._addFolioSystemsToSvgCanvas(emptySvgSheetGroup, emptyFolioSvgData); + + expectToBe(emptySvgSheetGroup.selectAll('g.content-segment-group').size(), 0); + + expectSpyCall(consoleSpy, 1); + expectToBe(mockConsole.get(0), 'Sections array is bigger than sectionPartition'); + }); + + it('... number of systems is not given in folioCalculation model', () => { + const emptySvgSheetGroup = D3_SELECTION.create('g'); + + expectedReversedFolio.systems = ''; + const emptyFolioSvgData = new FolioSvgData( + new FolioCalculation(expectedFolioSettings, expectedReversedFolio, 0) + ); + + (folioService as any)._addFolioSystemsToSvgCanvas(emptySvgSheetGroup, emptyFolioSvgData); + + expectToBe(emptySvgSheetGroup.selectAll('g.content-segment-group').size(), 0); + + expectSpyCall(consoleSpy, 1); + expectToBe(mockConsole.get(0), 'No systems in folio'); + }); }); it('... should trigger `_appendContentSegmentGroup` for each content segment', () => { @@ -643,7 +745,7 @@ describe('FolioService', () => { }); }); - it('... should append a polygon element to each content segment link', () => { + it('... should append one polygon element to each content segment link', () => { const contentSegmentGroups = svgSheetGroup.selectAll('g.content-segment-group').nodes(); contentSegmentGroups.forEach((contentSegmentGroup, i) => { @@ -1059,18 +1161,26 @@ describe('FolioService', () => { it('... should rotate the label if reversed is true', () => { const contentSegmentLinkReversed = D3_SELECTION.create('svg:a'); - expectedContentSegment.reversed = true; + + const folioSvgData = new FolioSvgData( + new FolioCalculation( + expectedFolioSettings, + expectedReversedFolio, + expectedContentSegmentOffsetCorrection + ) + ); + const reversedContentSegment = folioSvgData.contentSegments[0]; (folioService as any)._appendContentSegmentLinkLabel( contentSegmentLinkReversed, - expectedContentSegment + reversedContentSegment ); const contentSegmentLinkLabel = contentSegmentLinkReversed.select('text'); expectToBe( contentSegmentLinkLabel.attr('transform'), - `rotate(${expectedContentSegmentReversedRotationAngle}, ${expectedContentSegment.centeredXPosition}, ${expectedContentSegment.centeredYPosition})` + `rotate(${expectedReversedRotationAngle}, ${reversedContentSegment.centeredXPosition}, ${reversedContentSegment.centeredYPosition})` ); }); }); @@ -1352,6 +1462,45 @@ describe('FolioService', () => { expectToBe(contentSegmentLink.selectAll('polygon').size(), 1); }); + it('... should append one polygon element to the SVG content segment link even if content.sectionPartition is not given in folioCalculation model', () => { + const altSegmentLink = D3_SELECTION.create('svg:a'); + + expectedReversedFolio.content[0].sectionPartition = undefined; + const altFolioSvgData = new FolioSvgData( + new FolioCalculation(expectedFolioSettings, expectedReversedFolio, 0) + ); + + (folioService as any)._appendContentSegmentLinkPolygon( + altSegmentLink, + altFolioSvgData.contentSegments[0].segmentVertices + ); + + const polygonElement = altSegmentLink.select('polygon'); + + expect(polygonElement).toBeDefined(); + expectToBe(altSegmentLink.selectAll('polygon').size(), 1); + }); + + it('... should append one polygon element to the SVG content segment link even if section.position is not given or less than sectionPartition in folioCalculation model', () => { + const altSegmentLink = D3_SELECTION.create('svg:a'); + + expectedReversedFolio.content[0].sectionPartition = 1; + expectedReversedFolio.content[0].sections[0].position = undefined; + const altFolioSvgData = new FolioSvgData( + new FolioCalculation(expectedFolioSettings, expectedReversedFolio, 0) + ); + + (folioService as any)._appendContentSegmentLinkPolygon( + altSegmentLink, + altFolioSvgData.contentSegments[0].segmentVertices + ); + + const polygonElement = altSegmentLink.select('polygon'); + + expect(polygonElement).toBeDefined(); + expectToBe(altSegmentLink.selectAll('polygon').size(), 1); + }); + it('... should set the `class` attribute of the polygon element', () => { const polygonElement = contentSegmentLink.select('polygon'); @@ -1546,8 +1695,8 @@ describe('FolioService', () => { it('... should trigger `_appendSvgElementWithAttrs` with correct arguments', () => { const attributes = { class: 'system-label', - x: expectedFolioSvgData.systems.systemsLabelArray[systemIndex].x, - y: expectedFolioSvgData.systems.systemsLabelArray[systemIndex].y, + x: expectedFolioSvgData.systems.systemsLabelPositions[systemIndex].x, + y: expectedFolioSvgData.systems.systemsLabelPositions[systemIndex].y, fill: expectedBgColor, }; attributes['dominant-baseline'] = 'hanging'; @@ -1575,14 +1724,14 @@ describe('FolioService', () => { it('... should set the `x` attribute of the text element', () => { const textElement = systemsGroup.select('text'); - const { x } = expectedFolioSvgData.systems.systemsLabelArray[systemIndex]; + const { x } = expectedFolioSvgData.systems.systemsLabelPositions[systemIndex]; expectToBe(textElement.attr('x'), String(x)); }); it('... should set the `y` attribute of the text element', () => { const textElement = systemsGroup.select('text'); - const { y } = expectedFolioSvgData.systems.systemsLabelArray[systemIndex]; + const { y } = expectedFolioSvgData.systems.systemsLabelPositions[systemIndex]; expectToBe(textElement.attr('y'), String(y)); }); @@ -1627,7 +1776,7 @@ describe('FolioService', () => { const svg = D3_SELECTION.create('svg'); systemsGroup = svg.append('g'); - systemArray = expectedFolioSvgData.systems.systemsArrays[0]; + systemArray = expectedFolioSvgData.systems.systemsLines[0]; (folioService as any)._appendSystemsGroupLines(systemsGroup, systemArray); }); diff --git a/src/testing/mock-data/mockEditionData.ts b/src/testing/mock-data/mockEditionData.ts index 434cddabf4..cf65f349f8 100644 --- a/src/testing/mock-data/mockEditionData.ts +++ b/src/testing/mock-data/mockEditionData.ts @@ -37,6 +37,7 @@ export const mockEditionData = { sectionPartition: 1, sections: [ { + position: 1, startSystem: 2, endSystem: 4, }, @@ -55,6 +56,39 @@ export const mockEditionData = { ], }, + /** + * Test helper data constant: mockReversedFolio. + * + * It provides a mocked reversed folio object. + */ + mockReversedFolio: { + folioId: '1', + systems: '12', + format: { + height: 180, + width: 267, + }, + content: [ + { + complexId: 'op12', + sheetId: 'M_212_Sk1_1', + sigle: 'M 212 Sk1.1', + sigleAddendum: '', + selectable: undefined, + reversed: true, + linkTo: undefined, + sectionPartition: 1, + sections: [ + { + position: 1, + startSystem: 2, + endSystem: 4, + }, + ], + }, + ], + }, + /** * Test helper data constant: mockGraphEmptyData. * From 7ba70b0e112813bd6bdf36663776d9dbb4f4ea97 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 14:08:33 +0000 Subject: [PATCH 50/63] build(deps-dev): bump the typescript-eslint group with 2 updates Bumps the typescript-eslint group with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 7.1.0 to 7.1.1 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.1.1/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 7.1.0 to 7.1.1 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.1.1/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: typescript-eslint - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: typescript-eslint ... Signed-off-by: dependabot[bot] --- package.json | 4 +-- yarn.lock | 100 +++++++++++++++++++++++++-------------------------- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/package.json b/package.json index a9d8bebf04..35dc7e3725 100644 --- a/package.json +++ b/package.json @@ -131,8 +131,8 @@ "@types/d3": "^7.4.3", "@types/jasmine": "~5.1.4", "@types/node": "^18.19.18", - "@typescript-eslint/eslint-plugin": "^7.1.0", - "@typescript-eslint/parser": "^7.1.0", + "@typescript-eslint/eslint-plugin": "^7.1.1", + "@typescript-eslint/parser": "^7.1.1", "angular-cli-ghpages": "^1.0.7", "conventional-recommended-bump": "^9.0.0", "eslint": "^8.57.0", diff --git a/yarn.lock b/yarn.lock index 94e7a4ff23..ab0b71a085 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3139,16 +3139,16 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.1.0.tgz#22bb999a8d59893c0ea07923e8a21f9d985ad740" - integrity sha512-j6vT/kCulhG5wBmGtstKeiVr1rdXE4nk+DT1k6trYkwlrvW9eOF5ZbgKnd/YR6PcM4uTEXa0h6Fcvf6X7Dxl0w== +"@typescript-eslint/eslint-plugin@^7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.1.1.tgz#dd71fc5c7ecec745ca26ece506d84d203a205c0e" + integrity sha512-zioDz623d0RHNhvx0eesUmGfIjzrk18nSBC8xewepKXbBvN/7c1qImV7Hg8TI1URTxKax7/zxfxj3Uph8Chcuw== dependencies: "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "7.1.0" - "@typescript-eslint/type-utils" "7.1.0" - "@typescript-eslint/utils" "7.1.0" - "@typescript-eslint/visitor-keys" "7.1.0" + "@typescript-eslint/scope-manager" "7.1.1" + "@typescript-eslint/type-utils" "7.1.1" + "@typescript-eslint/utils" "7.1.1" + "@typescript-eslint/visitor-keys" "7.1.1" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.2.4" @@ -3156,15 +3156,15 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/parser@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.1.0.tgz#b89dab90840f7d2a926bf4c23b519576e8c31970" - integrity sha512-V1EknKUubZ1gWFjiOZhDSNToOjs63/9O0puCgGS8aDOgpZY326fzFu15QAUjwaXzRZjf/qdsdBrckYdv9YxB8w== +"@typescript-eslint/parser@^7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.1.1.tgz#6a9d0a5c9ccdf5dbd3cb8c949728c64e24e07d1f" + integrity sha512-ZWUFyL0z04R1nAEgr9e79YtV5LbafdOtN7yapNbn1ansMyaegl2D4bL7vHoJ4HPSc4CaLwuCVas8CVuneKzplQ== dependencies: - "@typescript-eslint/scope-manager" "7.1.0" - "@typescript-eslint/types" "7.1.0" - "@typescript-eslint/typescript-estree" "7.1.0" - "@typescript-eslint/visitor-keys" "7.1.0" + "@typescript-eslint/scope-manager" "7.1.1" + "@typescript-eslint/types" "7.1.1" + "@typescript-eslint/typescript-estree" "7.1.1" + "@typescript-eslint/visitor-keys" "7.1.1" debug "^4.3.4" "@typescript-eslint/scope-manager@6.19.0": @@ -3183,13 +3183,13 @@ "@typescript-eslint/types" "6.21.0" "@typescript-eslint/visitor-keys" "6.21.0" -"@typescript-eslint/scope-manager@7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.1.0.tgz#e4babaa39a3d612eff0e3559f3e99c720a2b4a54" - integrity sha512-6TmN4OJiohHfoOdGZ3huuLhpiUgOGTpgXNUPJgeZOZR3DnIpdSgtt83RS35OYNNXxM4TScVlpVKC9jyQSETR1A== +"@typescript-eslint/scope-manager@7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.1.1.tgz#9e301803ff8e21a74f50c6f89a4baccad9a48f93" + integrity sha512-cirZpA8bJMRb4WZ+rO6+mnOJrGFDd38WoXCEI57+CYBqta8Yc8aJym2i7vyqLL1vVYljgw0X27axkUXz32T8TA== dependencies: - "@typescript-eslint/types" "7.1.0" - "@typescript-eslint/visitor-keys" "7.1.0" + "@typescript-eslint/types" "7.1.1" + "@typescript-eslint/visitor-keys" "7.1.1" "@typescript-eslint/type-utils@6.19.0": version "6.19.0" @@ -3201,13 +3201,13 @@ debug "^4.3.4" ts-api-utils "^1.0.1" -"@typescript-eslint/type-utils@7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.1.0.tgz#372dfa470df181bcee0072db464dc778b75ed722" - integrity sha512-UZIhv8G+5b5skkcuhgvxYWHjk7FW7/JP5lPASMEUoliAPwIH/rxoUSQPia2cuOj9AmDZmwUl1usKm85t5VUMew== +"@typescript-eslint/type-utils@7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.1.1.tgz#aee820d5bedd39b83c18585a526cc520ddb7a226" + integrity sha512-5r4RKze6XHEEhlZnJtR3GYeCh1IueUHdbrukV2KSlLXaTjuSfeVF8mZUVPLovidCuZfbVjfhi4c0DNSa/Rdg5g== dependencies: - "@typescript-eslint/typescript-estree" "7.1.0" - "@typescript-eslint/utils" "7.1.0" + "@typescript-eslint/typescript-estree" "7.1.1" + "@typescript-eslint/utils" "7.1.1" debug "^4.3.4" ts-api-utils "^1.0.1" @@ -3221,10 +3221,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== -"@typescript-eslint/types@7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.1.0.tgz#52a86d6236fda646e7e5fe61154991dc0dc433ef" - integrity sha512-qTWjWieJ1tRJkxgZYXx6WUYtWlBc48YRxgY2JN1aGeVpkhmnopq+SUC8UEVGNXIvWH7XyuTjwALfG6bFEgCkQA== +"@typescript-eslint/types@7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.1.1.tgz#ca33ba7cf58224fb46a84fea62593c2c53cd795f" + integrity sha512-KhewzrlRMrgeKm1U9bh2z5aoL4s7K3tK5DwHDn8MHv0yQfWFz/0ZR6trrIHHa5CsF83j/GgHqzdbzCXJ3crx0Q== "@typescript-eslint/typescript-estree@6.19.0": version "6.19.0" @@ -3254,13 +3254,13 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/typescript-estree@7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.1.0.tgz#419b1310f061feee6df676c5bed460537310c593" - integrity sha512-k7MyrbD6E463CBbSpcOnwa8oXRdHzH1WiVzOipK3L5KSML92ZKgUBrTlehdi7PEIMT8k0bQixHUGXggPAlKnOQ== +"@typescript-eslint/typescript-estree@7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.1.1.tgz#09c54af0151a1b05d0875c0fc7fe2ec7a2476ece" + integrity sha512-9ZOncVSfr+sMXVxxca2OJOPagRwT0u/UHikM2Rd6L/aB+kL/QAuTnsv6MeXtjzCJYb8PzrXarypSGIPx3Jemxw== dependencies: - "@typescript-eslint/types" "7.1.0" - "@typescript-eslint/visitor-keys" "7.1.0" + "@typescript-eslint/types" "7.1.1" + "@typescript-eslint/visitor-keys" "7.1.1" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -3281,17 +3281,17 @@ "@typescript-eslint/typescript-estree" "6.19.0" semver "^7.5.4" -"@typescript-eslint/utils@7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.1.0.tgz#710ecda62aff4a3c8140edabf3c5292d31111ddd" - integrity sha512-WUFba6PZC5OCGEmbweGpnNJytJiLG7ZvDBJJoUcX4qZYf1mGZ97mO2Mps6O2efxJcJdRNpqweCistDbZMwIVHw== +"@typescript-eslint/utils@7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.1.1.tgz#bdeeb789eee4af5d3fb5400a69566d4dbf97ff3b" + integrity sha512-thOXM89xA03xAE0lW7alstvnyoBUbBX38YtY+zAUcpRPcq9EIhXPuJ0YTv948MbzmKh6e1AUszn5cBFK49Umqg== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.12" "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "7.1.0" - "@typescript-eslint/types" "7.1.0" - "@typescript-eslint/typescript-estree" "7.1.0" + "@typescript-eslint/scope-manager" "7.1.1" + "@typescript-eslint/types" "7.1.1" + "@typescript-eslint/typescript-estree" "7.1.1" semver "^7.5.4" "@typescript-eslint/utils@^6.0.0": @@ -3323,12 +3323,12 @@ "@typescript-eslint/types" "6.21.0" eslint-visitor-keys "^3.4.1" -"@typescript-eslint/visitor-keys@7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.0.tgz#576c4ad462ca1378135a55e2857d7aced96ce0a0" - integrity sha512-FhUqNWluiGNzlvnDZiXad4mZRhtghdoKW6e98GoEOYSu5cND+E39rG5KwJMUzeENwm1ztYBRqof8wMLP+wNPIA== +"@typescript-eslint/visitor-keys@7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.1.tgz#e6538a58c9b157f03bcbb29e3b6a92fe39a6ab0d" + integrity sha512-yTdHDQxY7cSoCcAtiBzVzxleJhkGB9NncSIyMYe2+OGON1ZsP9zOPws/Pqgopa65jvknOjlk/w7ulPlZ78PiLQ== dependencies: - "@typescript-eslint/types" "7.1.0" + "@typescript-eslint/types" "7.1.1" eslint-visitor-keys "^3.4.1" "@ungap/structured-clone@^1.2.0": From 2391f8a4f5e42f219171a643896903a79a99f23b Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Wed, 6 Mar 2024 13:02:22 +0100 Subject: [PATCH 51/63] fix(edition): set fontFamily and fontSize correctly in FolioService --- .../folio.service.spec.ts | 40 ++++++++++++++----- .../edition-folio-viewer/folio.service.ts | 20 +++++++--- 2 files changed, 44 insertions(+), 16 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts index 97cbdefc04..8ba590e5ae 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts @@ -59,7 +59,8 @@ describe('FolioService (DONE)', () => { let expectedFgColor: string; let expectedSheetFillColor: string; - let expectedContentSegmentFontStyle: string; + let expectedContentSegmentFontFamily: string; + let expectedContentSegmentFontSize: string; let expectedContentSegmentOffsetCorrection: number; let expectedReversedRotationAngle: number; let expectedContentSegmentStrokeWidth: number; @@ -96,7 +97,8 @@ describe('FolioService (DONE)', () => { expectedSheetFillColor = 'white'; expectedContentSegmentOffsetCorrection = 4; - expectedContentSegmentFontStyle = '11px Source Sans Pro, source-sans-pro, sans-serif'; + expectedContentSegmentFontFamily = 'Source Sans Pro, source-sans-pro, sans-serif'; + expectedContentSegmentFontSize = '11px'; expectedReversedRotationAngle = 180; expectedContentSegmentStrokeWidth = 2; @@ -208,8 +210,12 @@ describe('FolioService (DONE)', () => { expectToBe((folioService as any)._sheetFillColor, expectedSheetFillColor); }); - it('... should have `_contentSegmentFontStyle`', () => { - expectToBe((folioService as any)._contentSegmentFontStyle, expectedContentSegmentFontStyle); + it('... should have `_contentSegmentFontFamily`', () => { + expectToBe((folioService as any)._contentSegmentFontFamily, expectedContentSegmentFontFamily); + }); + + it('... should have `_contentSegmentFontSize`', () => { + expectToBe((folioService as any)._contentSegmentFontSize, expectedContentSegmentFontSize); }); it('... should have `_contentSegmentOffsetCorrection`', () => { @@ -1218,8 +1224,8 @@ describe('FolioService (DONE)', () => { class: 'content-segment-label', x: expectedContentSegment.centeredXPosition, y: expectedContentSegment.centeredYPosition, - style: expectedContentSegmentFontStyle, }; + attributes['font-family'] = expectedContentSegmentFontFamily; attributes['dominant-baseline'] = 'middle'; attributes['text-anchor'] = 'middle'; @@ -1251,10 +1257,10 @@ describe('FolioService (DONE)', () => { expectToBe(textElement.attr('y'), String(expectedContentSegment.centeredYPosition)); }); - it('... should set the `style` attribute of the text element', () => { + it('... should set the `font-family` attribute of the text element', () => { const textElement = contentSegmentLink.select('text'); - expectToBe(textElement.attr('style'), expectedContentSegmentFontStyle); + expectToBe(textElement.attr('font-family'), expectedContentSegmentFontFamily); }); it('... should set the `dominant-baseline` attribute of the text element', () => { @@ -1269,15 +1275,27 @@ describe('FolioService (DONE)', () => { expectToBe(textElement.attr('text-anchor'), 'middle'); }); + it('... should set the `font-size` style of the text element', () => { + const textElement = contentSegmentLink.select('text'); + + expectToBe(textElement.style('font-size'), expectedContentSegmentFontSize); + }); + it('... should only have specified attributes', () => { const textElement = contentSegmentLink.select('text'); - const expectedAttributes = ['class', 'x', 'y', 'style', 'dominant-baseline', 'text-anchor'].map(attr => - attr.toLowerCase() - ); + const expectedAttributes = [ + 'class', + 'x', + 'y', + 'font-family', + 'dominant-baseline', + 'text-anchor', + 'style', + ].map(attr => attr.toLowerCase()); const actualAttributes = Array.from((textElement.node() as Element).attributes).map(attr => attr.name); - expectToBe((textElement.node() as Element).attributes.length, 6); + expectToBe((textElement.node() as Element).attributes.length, expectedAttributes.length); expectToEqual(actualAttributes, expectedAttributes); }); }); diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts index ce4fe844e8..e60b00bb7f 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.ts @@ -60,11 +60,18 @@ export class FolioService { private _contentSegmentFillColor = '#eeeeee'; /** - * Private variable: _contentSegmentFontStyle. + * Private variable: _contentSegmentFontFamily. * - * It keeps the font style for the content segments. + * It keeps the font family for the content segments. */ - private _contentSegmentFontStyle = '11px Source Sans Pro, source-sans-pro, sans-serif'; + private _contentSegmentFontFamily = 'Source Sans Pro, source-sans-pro, sans-serif'; + + /** + * Private variable: _contentSegmentFontSize. + * + * It keeps the font size for the content segments. + */ + private _contentSegmentFontSize = '11px'; /** * Private variable: _contentSegmentOffsetCorrection. @@ -395,12 +402,15 @@ export class FolioService { class: 'content-segment-label', x: centeredXPosition, y: centeredYPosition, - style: this._contentSegmentFontStyle, }; + attributes['font-family'] = this._contentSegmentFontFamily; attributes['dominant-baseline'] = 'middle'; attributes['text-anchor'] = 'middle'; - return this._appendSvgElementWithAttrs(svgContentSegmentLink, 'text', attributes); + return this._appendSvgElementWithAttrs(svgContentSegmentLink, 'text', attributes).style( + 'font-size', + this._contentSegmentFontSize + ); } /** From 7aad9956d37a249f2d8fb0d328b80e87c3af060a Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Wed, 6 Mar 2024 13:05:32 +0100 Subject: [PATCH 52/63] test(edition): adjust check for attributes lengths in FolioService --- .../folio.service.spec.ts | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts index 8ba590e5ae..32486a68dd 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts @@ -347,7 +347,7 @@ describe('FolioService (DONE)', () => { ]; const actualAttributes = Array.from((svgCanvas.node() as Element).attributes).map(attr => attr.name); - expectToBe((svgCanvas.node() as Element).attributes.length, 7); + expectToBe((svgCanvas.node() as Element).attributes.length, expectedAttributes.length); expectToEqual(actualAttributes, expectedAttributes); }); }); @@ -854,7 +854,10 @@ describe('FolioService (DONE)', () => { (svgCanvas.select('g.sheet-group').node() as Element).attributes ).map(attr => attr.name); - expectToBe((svgCanvas.select('g.sheet-group').node() as Element).attributes.length, 2); + expectToBe( + (svgCanvas.select('g.sheet-group').node() as Element).attributes.length, + expectedAttributes.length + ); expectToEqual(actualAttributes, expectedAttributes); }); }); @@ -1014,7 +1017,7 @@ describe('FolioService (DONE)', () => { attr => attr.name ); - expectToBe((contentSegmentGroup.node() as Element).attributes.length, 5); + expectToBe((contentSegmentGroup.node() as Element).attributes.length, expectedAttributes.length); expectToEqual(actualAttributes, expectedAttributes); }); }); @@ -1066,7 +1069,7 @@ describe('FolioService (DONE)', () => { const expectedAttributes = []; const actualAttributes = Array.from((titleElement.node() as Element).attributes).map(attr => attr.name); - expectToBe((titleElement.node() as Element).attributes.length, 0); + expectToBe((titleElement.node() as Element).attributes.length, expectedAttributes.length); expectToEqual(actualAttributes, expectedAttributes); }); }); @@ -1119,7 +1122,7 @@ describe('FolioService (DONE)', () => { const expectedAttributes = ['class'].map(attr => attr.toLowerCase()); const actualAttributes = Array.from((linkElement.node() as Element).attributes).map(attr => attr.name); - expectToBe((linkElement.node() as Element).attributes.length, 1); + expectToBe((linkElement.node() as Element).attributes.length, expectedAttributes.length); expectToEqual(actualAttributes, expectedAttributes); }); }); @@ -1406,7 +1409,7 @@ describe('FolioService (DONE)', () => { const expectedAttributes = ['x', 'y', 'dy', 'text-anchor'].map(attr => attr.toLowerCase()); const actualAttributes = Array.from((tspanElement as Element).attributes).map(attr => attr.name); - expectToBe((tspanElement as Element).attributes.length, 4); + expectToBe((tspanElement as Element).attributes.length, expectedAttributes.length); expectToEqual(actualAttributes, expectedAttributes); }); @@ -1551,7 +1554,7 @@ describe('FolioService (DONE)', () => { attr => attr.name ); - expectToBe((polygonElement.node() as Element).attributes.length, 4); + expectToBe((polygonElement.node() as Element).attributes.length, expectedAttributes.length); expectToEqual(actualAttributes, expectedAttributes); }); }); @@ -1635,7 +1638,7 @@ describe('FolioService (DONE)', () => { ); const actualAttributes = Array.from((rectElement.node() as Element).attributes).map(attr => attr.name); - expectToBe((rectElement.node() as Element).attributes.length, 7); + expectToBe((rectElement.node() as Element).attributes.length, expectedAttributes.length); expectToEqual(actualAttributes, expectedAttributes); }); }); @@ -1676,7 +1679,7 @@ describe('FolioService (DONE)', () => { const expectedAttributes = [].map(attr => attr.toLowerCase()); const actualAttributes = Array.from((titleElement.node() as Element).attributes).map(attr => attr.name); - expectToBe((titleElement.node() as Element).attributes.length, 0); + expectToBe((titleElement.node() as Element).attributes.length, expectedAttributes.length); expectToEqual(actualAttributes, expectedAttributes); }); @@ -1774,7 +1777,7 @@ describe('FolioService (DONE)', () => { ); const actualAttributes = Array.from((textElement.node() as Element).attributes).map(attr => attr.name); - expectToBe((textElement.node() as Element).attributes.length, 5); + expectToBe((textElement.node() as Element).attributes.length, expectedAttributes.length); expectToEqual(actualAttributes, expectedAttributes); }); }); From 3f333f054ebf135ea256ff6616959b52e632dc03 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Wed, 6 Mar 2024 19:14:18 +0100 Subject: [PATCH 53/63] fix(edition): improve queryParams handling when loading SheetViewer --- .../edition-sheets.component.spec.ts | 38 ++++++----- .../edition-sheets.component.ts | 67 ++++++++++++------- 2 files changed, 66 insertions(+), 39 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-sheets.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-sheets.component.spec.ts index c229579c5e..9758b6519e 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-sheets.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-sheets.component.spec.ts @@ -182,20 +182,16 @@ describe('EditionSheetsComponent', () => { }); describe('BEFORE initial data binding', () => { - it('... should not have `folioConvoluteData`', () => { - expect(component.folioConvoluteData).toBeUndefined(); - }); - - it('... should not have `svgSheetsData`', () => { - expect(component.svgSheetsData).toBeUndefined(); + it('... should not have `editionComplex`', () => { + expect(component.editionComplex).toBeUndefined(); }); - it('... should not have `textcriticsData`', () => { - expect(component.textcriticsData).toBeUndefined(); + it('... should not have `errorMessage`', () => { + expect(component.errorMessage).toBeUndefined(); }); - it('... should not have `editionComplex`', () => { - expect(component.editionComplex).toBeUndefined(); + it('... should not have `folioConvoluteData`', () => { + expect(component.folioConvoluteData).toBeUndefined(); }); it('... should not have `selectedConvolute`', () => { @@ -214,15 +210,27 @@ describe('EditionSheetsComponent', () => { expect(component.selectedTextcritics).toBeUndefined(); }); - it('... should not have `errorMessage`', () => { - expect(component.errorMessage).toBeUndefined(); - }); - it('... should have `showTkA===false`', () => { expect(component.showTkA).toBeFalse(); }); - it('... should have `editionRouteConstants`', () => { + it('... should not have `snapshotQueryParamsId`', () => { + expect(component.snapshotQueryParamsId).toBeUndefined(); + }); + + it('... should not have `svgSheetsData`', () => { + expect(component.svgSheetsData).toBeUndefined(); + }); + + it('... should not have `textcriticsData`', () => { + expect(component.textcriticsData).toBeUndefined(); + }); + + it('... should have `_isFirstPageLoad===true`', () => { + expect((component as any)._isFirstPageLoad).toBeTrue(); + }); + + it('... should have `editionRouteConstants` getter', () => { expectToEqual(component.editionRouteConstants, expectedEditionRouteConstants); }); }); diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-sheets.component.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-sheets.component.ts index 3c69214ac8..1b960c6563 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-sheets.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-sheets.component.ts @@ -49,6 +49,13 @@ export class EditionSheetsComponent implements OnInit, OnDestroy { */ editionComplex: EditionComplex; + /** + * Public variable: errorMessage. + * + * It keeps an errorMessage for the service calls. + */ + errorMessage: string = undefined; + /** * Public variable: folioConvoluteData. * @@ -85,32 +92,32 @@ export class EditionSheetsComponent implements OnInit, OnDestroy { selectedTextcritics: Textcritics; /** - * Public variable: svgSheetsData. + * Public variable: showTka. * - * It keeps the SVG sheets data of the edition sheets. + * If the textcritics shall be displayed. */ - svgSheetsData: EditionSvgSheetList; + showTkA = false; /** - * Public variable: textcriticsData. + * Public variable: snapshotQueryParamsId. * - * It keeps the textcritics data of the edition sheets. + * It keeps the snapshot of the queryParams id. */ - textcriticsData: TextcriticsList; + snapshotQueryParamsId: string; /** - * Public variable: errorMessage. + * Public variable: svgSheetsData. * - * It keeps an errorMessage for the service calls. + * It keeps the SVG sheets data of the edition sheets. */ - errorMessage: string = undefined; + svgSheetsData: EditionSvgSheetList; /** - * Public variable: showTka. + * Public variable: textcriticsData. * - * If the textcritics shall be displayed. + * It keeps the textcritics data of the edition sheets. */ - showTkA = false; + textcriticsData: TextcriticsList; /** * Private variable: _destroyed$. @@ -119,6 +126,13 @@ export class EditionSheetsComponent implements OnInit, OnDestroy { */ private _destroyed$: Subject = new Subject(); + /** + * Private variable: _isFirstPageLoad. + * + * It keeps the information if the page is loaded for the first time. + */ + private _isFirstPageLoad = true; + /** * Constructor of the EditionSheetsComponent. * @@ -169,6 +183,8 @@ export class EditionSheetsComponent implements OnInit, OnDestroy { * @returns {void} Gets the current edition complex and all necessary edition data. */ getEditionSheetsData(): void { + this.snapshotQueryParamsId = this.route.snapshot.queryParamMap.get('id'); + combineLatest([this.route.paramMap, this.route.queryParamMap]) .pipe( switchMap(([_params, queryParams]) => this._fetchEditionComplexData(queryParams)), @@ -356,14 +372,9 @@ export class EditionSheetsComponent implements OnInit, OnDestroy { */ private _getDefaultSheetId(): string { const defaultSheet = this.svgSheetsData?.sheets?.sketchEditions?.[0]; - let defaultSheetId = defaultSheet?.id; + const defaultSheetContentPartial = defaultSheet?.content?.length > 1 ? defaultSheet.content[0]?.partial : ''; - if (defaultSheet?.content?.length > 1) { - const defaultSheetContent = defaultSheet.content[0]; - defaultSheetId += defaultSheetContent?.partial; - } - - return defaultSheetId || ''; + return (defaultSheet?.id || '') + defaultSheetContentPartial; } /** @@ -375,16 +386,23 @@ export class EditionSheetsComponent implements OnInit, OnDestroy { * @returns {void} Handles the query params and selects the corresponding SVG sheet. */ private _handleQueryParams(queryParams: ParamMap): void { - const idFromQueryParams = queryParams?.get('id'); + let sheetIdFromQueryParams = queryParams?.get('id'); + + if (sheetIdFromQueryParams && this.svgSheetsData) { + this._selectSvgSheet(sheetIdFromQueryParams); + } else { + sheetIdFromQueryParams = + this._isFirstPageLoad && this.snapshotQueryParamsId + ? this.snapshotQueryParamsId + : this._getDefaultSheetId(); - if (!idFromQueryParams) { this.onSvgSheetSelect({ complexId: '', - sheetId: this._getDefaultSheetId(), + sheetId: sheetIdFromQueryParams, }); - } else if (this.svgSheetsData) { - this._selectSvgSheet(idFromQueryParams); } + + this._isFirstPageLoad = false; } /** @@ -413,6 +431,7 @@ export class EditionSheetsComponent implements OnInit, OnDestroy { // Clear overlay selections and textcritical comments this.onOverlaySelect([]); + if ( this.utils.isNotEmptyObject(this.selectedTextcritics) && this.utils.isNotEmptyArray(this.selectedTextcritics.comments) From 2f3a597b564c1efa65465acb2ae27ad7cb79494d Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Wed, 6 Mar 2024 19:46:47 +0100 Subject: [PATCH 54/63] test(edition): fix tests for edition sheets --- .../edition-sheets/edition-sheets.component.spec.ts | 13 +++++++++++++ src/testing/router-stubs.ts | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-sheets.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-sheets.component.spec.ts index 9758b6519e..1c6305db66 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-sheets.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-sheets.component.spec.ts @@ -152,6 +152,8 @@ describe('EditionSheetsComponent', () => { component = fixture.componentInstance; compDe = fixture.debugElement; + mockActivatedRoute.testQueryParamMap = { id: '' }; + // Test data expectedEditionComplex = EDITION_COMPLEXES.OP12; expectedComplexId = 'op12'; @@ -246,6 +248,17 @@ describe('EditionSheetsComponent', () => { fixture.detectChanges(); }); + it('... should change urls', () => { + expectToEqual(mockActivatedRoute.snapshot.url[0].path, expectedPath); + + const changedPath = 'other'; + const changedRouteUrl: UrlSegmentStub[] = [{ path: changedPath }]; + + mockActivatedRoute.testUrl = changedRouteUrl; + + expectToEqual(mockActivatedRoute.snapshot.url[0].path, changedPath); + }); + describe('#onNavigateToReportFragment()', () => { it('... should have a method `onNavigateToReportFragment`', () => { expect(component.onNavigateToReportFragment).toBeDefined(); diff --git a/src/testing/router-stubs.ts b/src/testing/router-stubs.ts index a86fdb9220..7ac9a28b72 100644 --- a/src/testing/router-stubs.ts +++ b/src/testing/router-stubs.ts @@ -1,7 +1,7 @@ /* eslint-disable @angular-eslint/no-input-rename */ /* eslint-disable @angular-eslint/directive-selector, @angular-eslint/component-selector */ import { Component, Directive, HostListener, Injectable, Input, NgModule } from '@angular/core'; -import { convertToParamMap, ParamMap, Params, QueryParamsHandling } from '@angular/router'; +import { ParamMap, Params, QueryParamsHandling, convertToParamMap } from '@angular/router'; import { BehaviorSubject } from 'rxjs'; import { AppModule } from '@awg-app/app.module'; From 4b3bdab8c13c7f833e9d60d95f92e08998cdb2f4 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Wed, 6 Mar 2024 20:30:30 +0100 Subject: [PATCH 55/63] test(app): adjust test syntax --- .../footer-logo/footer-logo.component.spec.ts | 16 +- src/app/core/navbar/navbar.component.spec.ts | 12 +- .../analytics.service.spec.ts | 42 ++-- .../services/api-service/api.service.spec.ts | 64 +++--- .../core-service/core.service.spec.ts | 35 ++- .../data-streamer.service.spec.ts | 40 +--- .../services/gnd-service/gnd.service.spec.ts | 205 +++++++----------- .../http-cache/http-cache.service.spec.ts | 15 +- .../loading-service/loading.service.spec.ts | 5 +- .../side-info.service.spec.ts | 34 +-- .../storage-service/storage.service.spec.ts | 71 +++--- .../view-container.component.spec.ts | 4 +- .../search-panel.component.spec.ts | 9 +- 13 files changed, 212 insertions(+), 340 deletions(-) diff --git a/src/app/core/footer/footer-logo/footer-logo.component.spec.ts b/src/app/core/footer/footer-logo/footer-logo.component.spec.ts index 57a7bdaa58..f687ce8832 100644 --- a/src/app/core/footer/footer-logo/footer-logo.component.spec.ts +++ b/src/app/core/footer/footer-logo/footer-logo.component.spec.ts @@ -158,9 +158,7 @@ describe('FooterLogoComponent (DONE)', () => { classList = component.getLogoClass(component.logo.id); expect(classList).toBeTruthy(); - expect(classList) - .withContext(`should not contain ${cssClassFloatRight}`) - .not.toContain(cssClassFloatRight); + expect(classList).not.toContain(cssClassFloatRight); // Not main footer logo // Trigger changes in data binding @@ -263,9 +261,7 @@ describe('FooterLogoComponent (DONE)', () => { await detectChangesOnPush(fixture); // Fixture.detectChanges with onPush strategy expect(imageDes[0].classes[cssClassFloatRight]).not.toBeTruthy(); - expect(imageEl.classList) - .withContext(`should not contain ${cssClassFloatRight}`) - .not.toContain(cssClassFloatRight); + expect(imageEl.classList).not.toContain(cssClassFloatRight); // Not main footer logo // Trigger changes in data binding @@ -273,9 +269,7 @@ describe('FooterLogoComponent (DONE)', () => { await detectChangesOnPush(fixture); // Fixture.detectChanges with onPush expect(imageDes[0].classes[cssClassFloatRight]).not.toBeTruthy(); - expect(imageEl.classList) - .withContext(`should not contain ${cssClassFloatRight}`) - .not.toContain(cssClassFloatRight); + expect(imageEl.classList).not.toContain(cssClassFloatRight); }); it('... should have CSS class `my-2` applied only to main footer logos', async () => { @@ -303,9 +297,7 @@ describe('FooterLogoComponent (DONE)', () => { await detectChangesOnPush(fixture); // Fixture.detectChanges with onPush expect(imageDes[0].classes[cssClassMarginY2]).not.toBeTruthy(); - expect(imageEl.classList) - .withContext(`should not contain ${cssClassMarginY2}`) - .not.toContain(cssClassMarginY2); + expect(imageEl.classList).not.toContain(cssClassMarginY2); }); it('... should have [ngClass] resolve to correct classes', async () => { diff --git a/src/app/core/navbar/navbar.component.spec.ts b/src/app/core/navbar/navbar.component.spec.ts index a98f6e7e7a..bd9f1f5a32 100644 --- a/src/app/core/navbar/navbar.component.spec.ts +++ b/src/app/core/navbar/navbar.component.spec.ts @@ -652,16 +652,12 @@ describe('NavbarComponent (DONE)', () => { }); it('... can get correct numer of routerLinks from template', () => { - expect(routerLinks.length) - .withContext(`should have ${expectedOrderOfRouterlinks.length} routerLinks`) - .toBe(expectedOrderOfRouterlinks.length); + expectToBe(routerLinks.length, expectedOrderOfRouterlinks.length); }); it('... can get correct linkParams from template', () => { routerLinks.forEach((routerLink, index) => { - expect(routerLink.linkParams) - .withContext(`should equal ${expectedOrderOfRouterlinks[index]}`) - .toEqual(expectedOrderOfRouterlinks[index]); + expectToEqual(routerLink.linkParams, expectedOrderOfRouterlinks[index]); }); }); @@ -675,9 +671,7 @@ describe('NavbarComponent (DONE)', () => { click(linkDe); fixture.detectChanges(); - expect(routerLink.navigatedTo) - .withContext(`should equal ${expectedRouterLink}`) - .toEqual(expectedRouterLink); + expectToEqual(routerLink.navigatedTo, expectedRouterLink); }); }); }); diff --git a/src/app/core/services/analytics-sercvice/analytics.service.spec.ts b/src/app/core/services/analytics-sercvice/analytics.service.spec.ts index f858278062..ead665c9d3 100644 --- a/src/app/core/services/analytics-sercvice/analytics.service.spec.ts +++ b/src/app/core/services/analytics-sercvice/analytics.service.spec.ts @@ -4,7 +4,7 @@ import { TestBed } from '@angular/core/testing'; import Spy = jasmine.Spy; import { cleanStylesFromDOM } from '@testing/clean-up-helper'; -import { expectSpyCall } from '@testing/expect-helper'; +import { expectSpyCall, expectToBe, expectToEqual } from '@testing/expect-helper'; import { mockAnalytics, mockConsole } from '@testing/mock-helper'; import { AnalyticsService } from './analytics.service'; @@ -79,7 +79,7 @@ describe('AnalyticsService (DONE)', () => { it('... should use mock console', () => { console.info('Test'); - expect(mockConsole.get(0)).toBe('Test'); + expectToBe(mockConsole.get(0), 'Test'); }); it('... should clear mock console after each run', () => { @@ -89,9 +89,7 @@ describe('AnalyticsService (DONE)', () => { it('... should use mock analytics', () => { (window as any).gtag('test', 'analytics', {}); - expect(mockAnalytics.getGtag(0)) - .withContext(`should equal '[test', 'analytics', {}]`) - .toEqual(['test', 'analytics', {}]); + expectToEqual(mockAnalytics.getGtag(0), ['test', 'analytics', {}]); }); it('... should clear mock analytics store after each run', () => { @@ -134,7 +132,7 @@ describe('AnalyticsService (DONE)', () => { setupAnalytics(analyticsService, expectedAnalyticsEndpoint, expectedAnalyticsId, false); expectSpyCall(consoleSpy, 1, expectedLogMessage); - expect(mockConsole.get(0)).withContext(`should be ${expectedLogMessage}`).toBe(expectedLogMessage); + expectToBe(mockConsole.get(0), expectedLogMessage); }); it('... should not log a replacement message in production mode', () => { @@ -235,9 +233,7 @@ describe('AnalyticsService (DONE)', () => { analyticsService.trackPageView(expectedPage); expectSpyCall(gtagSpy, 1, expectedAnalyticsEvent); - expect(mockAnalytics.getGtag(0)) - .withContext(`should be ${expectedAnalyticsEvent}`) - .toEqual(expectedAnalyticsEvent); + expectToEqual(mockAnalytics.getGtag(0), expectedAnalyticsEvent); }); it('... should track page changes', () => { @@ -262,26 +258,14 @@ describe('AnalyticsService (DONE)', () => { expectSpyCall(gtagSpy, 2, otherAnalyticsEvent); expect(gtagSpy.calls.any()).toBeTruthy(); - expect(gtagSpy.calls.count()).withContext(`should be 2`).toBe(2); - expect(gtagSpy.calls.first().args) - .withContext(`should equal ${expectedAnalyticsEvent}`) - .toEqual(expectedAnalyticsEvent); - expect(gtagSpy.calls.allArgs()[0]) - .withContext(`should equal ${expectedAnalyticsEvent}`) - .toEqual(expectedAnalyticsEvent); - expect(gtagSpy.calls.allArgs()[1]) - .withContext(`should equal ${otherAnalyticsEvent}`) - .toEqual(otherAnalyticsEvent); - expect(gtagSpy.calls.mostRecent().args) - .withContext(`should equal ${otherAnalyticsEvent}`) - .toEqual(otherAnalyticsEvent); - - expect(mockAnalytics.getGtag(0)) - .withContext(`should equal ${expectedAnalyticsEvent}`) - .toEqual(expectedAnalyticsEvent); - expect(mockAnalytics.getGtag(1)) - .withContext(`should equal ${otherAnalyticsEvent}`) - .toEqual(otherAnalyticsEvent); + expectToBe(gtagSpy.calls.count(), 2); + expectToEqual(gtagSpy.calls.first().args, expectedAnalyticsEvent); + expectToEqual(gtagSpy.calls.allArgs()[0], expectedAnalyticsEvent); + expectToEqual(gtagSpy.calls.allArgs()[1], otherAnalyticsEvent); + expectToEqual(gtagSpy.calls.mostRecent().args, otherAnalyticsEvent); + + expectToEqual(mockAnalytics.getGtag(0), expectedAnalyticsEvent); + expectToEqual(mockAnalytics.getGtag(1), otherAnalyticsEvent); }); }); }); diff --git a/src/app/core/services/api-service/api.service.spec.ts b/src/app/core/services/api-service/api.service.spec.ts index 89571a96fb..721e2ce9cc 100644 --- a/src/app/core/services/api-service/api.service.spec.ts +++ b/src/app/core/services/api-service/api.service.spec.ts @@ -7,6 +7,7 @@ import { Data } from '@angular/router'; import { throwError as observableThrowError } from 'rxjs'; import { cleanStylesFromDOM } from '@testing/clean-up-helper'; +import { expectToBe, expectToEqual } from '@testing/expect-helper'; import { AppConfig } from '@awg-app/app.config'; import { ApiServiceError } from '@awg-core/services/api-service/api-service-error.model'; @@ -19,10 +20,10 @@ import { ApiService } from './api.service'; // Helper function function expectErrorResponse(error, expectedError) { - expect(error.status).withContext('status').toEqual(expectedError.status); - expect(error.statusText).withContext('statusText').toEqual(expectedError.statusText); - expect(error.url).withContext('url').toEqual(expectedError.url); - expect(error.errorInfo).withContext('errorInfo').toEqual(expectedError.errorInfo); + expectToEqual(error.status, expectedError.status); + expectToEqual(error.statusText, expectedError.statusText); + expectToEqual(error.url, expectedError.url); + expectToEqual(error.errorInfo, expectedError.errorInfo); } function createApiServiceError(status: number, statusText: string, noErrorInfo?: boolean): ApiServiceError { @@ -87,8 +88,7 @@ describe('ApiService', () => { it('... should have serviceName', () => { const expectedServiceName = 'ApiService'; - expect(apiService.serviceName).toBeDefined(); - expect(apiService.serviceName).withContext(`should be ${expectedServiceName}`).toBe(expectedServiceName); + expectToBe(apiService.serviceName, expectedServiceName); }); it("... should have empty 'httpGetUrl'", () => { @@ -103,7 +103,7 @@ describe('ApiService', () => { httpClient.get('/foo/bar').subscribe({ next: data => { - expect(data).withContext(`should equal ${testData}`).toEqual(testData); + expectToEqual(data, testData); }, }); @@ -113,7 +113,7 @@ describe('ApiService', () => { }); // Check for GET request - expect(call.request.method).withContext(`should be 'GET'`).toBe('GET'); + expectToBe(call.request.method, 'GET'); // Respond with mocked data call.flush(testData); @@ -137,9 +137,9 @@ describe('ApiService', () => { `GET to ${expectedUrl}` ); - expect(call.request.method).withContext(`should be 'GET'`).toBe('GET'); - expect(call.request.responseType).withContext(`should be 'json'`).toBe('json'); - expect(call.request.url).withContext(`should be ${expectedUrl}`).toEqual(expectedUrl); + expectToBe(call.request.method, 'GET'); + expectToBe(call.request.responseType, 'json'); + expectToEqual(call.request.url, expectedUrl); })); it('... should apply an empty param object for HTTP GET if none is provided', waitForAsync(() => { @@ -156,11 +156,11 @@ describe('ApiService', () => { `GET to ${expectedUrl} without params` ); - expect(call.request.method).withContext(`should be 'GET'`).toBe('GET'); - expect(call.request.responseType).withContext(`should be 'json'`).toBe('json'); - expect(call.request.url).withContext(`should be ${expectedUrl}`).toEqual(expectedUrl); + expectToBe(call.request.method, 'GET'); + expectToBe(call.request.responseType, 'json'); + expectToEqual(call.request.url, expectedUrl); expect(call.request.params).toBeDefined(); - expect(call.request.params.keys().length).withContext('should be 0').toBe(0); + expectToBe(call.request.params.keys().length, 0); })); it('... should apply provided params for HTTP GET', waitForAsync(() => { @@ -179,17 +179,13 @@ describe('ApiService', () => { `GET to ${expectedUrl} with 'searchtype=fulltext' and 'nrows=10'` ); - expect(call.request.method).withContext(`should be 'GET'`).toBe('GET'); - expect(call.request.responseType).withContext(`should be 'json'`).toBe('json'); - expect(call.request.url).withContext(`should be ${expectedUrl}`).toEqual(expectedUrl); + expectToBe(call.request.method, 'GET'); + expectToBe(call.request.responseType, 'json'); + expectToEqual(call.request.url, expectedUrl); expect(call.request.params).toBeDefined(); - expect(call.request.params.keys().length).withContext('should be 2').toBe(2); - expect(call.request.params.get('searchtype')) - .withContext(`should be ${expectedSearchType}`) - .toBe(expectedSearchType); - expect(call.request.params.get('show_nrows')) - .withContext(`should be ${expectedNRows}`) - .toBe(expectedNRows); + expectToBe(call.request.params.keys().length, 2); + expectToBe(call.request.params.get('searchtype'), expectedSearchType); + expectToBe(call.request.params.get('show_nrows'), expectedNRows); })); }); @@ -201,16 +197,9 @@ describe('ApiService', () => { // Call service function (success) apiService.getApiResponse(ApiServiceResult, queryPath, queryHttpParams).subscribe({ next: (res: ApiServiceResult) => { - expect(res).toBeTruthy(); - expect(res.status) - .withContext(`should equal ${expectedApiServiceResult.status}`) - .toEqual(expectedApiServiceResult.status); - expect(res.statusText) - .withContext(`should equal ${expectedApiServiceResult.statusText}`) - .toEqual(expectedApiServiceResult.statusText); - expect(res.url) - .withContext(`should equal ${expectedApiServiceResult.url}`) - .toEqual(expectedApiServiceResult.url); + expectToEqual(res.status, expectedApiServiceResult.status); + expectToEqual(res.statusText, expectedApiServiceResult.statusText); + expectToEqual(res.url, expectedApiServiceResult.url); expect(res.body).toBeUndefined(); }, }); @@ -231,10 +220,7 @@ describe('ApiService', () => { // Call service function (success) apiService.getApiResponse(UserDataJson, queryPath, queryHttpParams).subscribe({ next: (res: UserDataJson) => { - expect(res).toBeTruthy(); - expect(res) - .withContext(`should equal ${expectedJsonResponse}`) - .toEqual(expectedJsonResponse); + expectToEqual(res, expectedJsonResponse); }, }); diff --git a/src/app/core/services/core-service/core.service.spec.ts b/src/app/core/services/core-service/core.service.spec.ts index a2f00a0c97..0b81d1bb39 100644 --- a/src/app/core/services/core-service/core.service.spec.ts +++ b/src/app/core/services/core-service/core.service.spec.ts @@ -1,6 +1,7 @@ import { TestBed } from '@angular/core/testing'; import { cleanStylesFromDOM } from '@testing/clean-up-helper'; +import { expectToEqual } from '@testing/expect-helper'; import { LOGOSDATA, METADATA } from '@awg-core/core-data'; import { Logos, Meta, MetaSectionTypes } from '@awg-core/core-models'; @@ -40,7 +41,7 @@ describe('CoreService (DONE)', () => { it('... should return METADATA', () => { // Call service function - expect(coreService.getMetaData()).withContext(`should be ${expectedMetaData}`).toBe(expectedMetaData); + expectToEqual(coreService.getMetaData(), expectedMetaData); }); }); @@ -50,30 +51,27 @@ describe('CoreService (DONE)', () => { }); it('... should return page METADATA if parameter is given', () => { - const metaSection = MetaSectionTypes.page; + const pageMetaSection = MetaSectionTypes.page; - // Call service function - expect(coreService.getMetaDataSection(metaSection)) - .withContext(`should be ${expectedMetaData[metaSection]}`) - .toBe(expectedMetaData[metaSection]); + const actualMetaData = coreService.getMetaDataSection(pageMetaSection); + + expectToEqual(actualMetaData, expectedMetaData[pageMetaSection]); }); it('... should return structure METADATA if parameter is given', () => { - const metaSection = MetaSectionTypes.structure; + const structureMetaSection = MetaSectionTypes.structure; - // Call service function - expect(coreService.getMetaDataSection(metaSection)) - .withContext(`should be ${expectedMetaData[metaSection]}`) - .toBe(expectedMetaData[metaSection]); + const actualMetaData = coreService.getMetaDataSection(structureMetaSection); + + expectToEqual(actualMetaData, expectedMetaData[structureMetaSection]); }); it('... should return contact METADATA if parameter is given', () => { - const metaSection = MetaSectionTypes.contact; + const contactMetaSection = MetaSectionTypes.contact; - // Call service function - expect(coreService.getMetaDataSection(metaSection)) - .withContext(`should be ${expectedMetaData[metaSection]}`) - .toBe(expectedMetaData[metaSection]); + const actualMetaData = coreService.getMetaDataSection(contactMetaSection); + + expectToEqual(actualMetaData, expectedMetaData[contactMetaSection]); }); }); @@ -83,8 +81,9 @@ describe('CoreService (DONE)', () => { }); it('... should return LOGOS', () => { - // Call service function - expect(coreService.getLogos()).withContext(`should be ${expectedLogosData}`).toBe(expectedLogosData); + const actualLogosData = coreService.getLogos(); + + expectToEqual(actualLogosData, expectedLogosData); }); }); }); diff --git a/src/app/core/services/data-streamer-service/data-streamer.service.spec.ts b/src/app/core/services/data-streamer-service/data-streamer.service.spec.ts index 91e94e6bce..86d8bad78e 100644 --- a/src/app/core/services/data-streamer-service/data-streamer.service.spec.ts +++ b/src/app/core/services/data-streamer-service/data-streamer.service.spec.ts @@ -1,6 +1,7 @@ import { TestBed, waitForAsync } from '@angular/core/testing'; import { cleanStylesFromDOM } from '@testing/clean-up-helper'; +import { expectToBe, expectToEqual } from '@testing/expect-helper'; import { mockSearchResponseJson } from '@testing/mock-data'; import { SearchResponseJson } from '@awg-shared/api-objects'; @@ -33,10 +34,7 @@ describe('DataStreamerService (DONE)', () => { }); it('... should have bufferSize = 1', () => { - expect((dataStreamerService as any)._bufferSize).toBeTruthy(); - expect((dataStreamerService as any)._bufferSize) - .withContext('should be 1') - .toBe(1); + expectToBe((dataStreamerService as any)._bufferSize, 1); }); it('... should have searchResponseWithQuerySubject', () => { @@ -64,9 +62,7 @@ describe('DataStreamerService (DONE)', () => { it('... should return given searchResponse', waitForAsync(() => { dataStreamerService.getSearchResponseWithQuery().subscribe({ next: (searchResponseWithQuery: SearchResponseWithQuery) => { - expect(searchResponseWithQuery) - .withContext(`should equal ${expectedSearchResponse}`) - .toEqual(expectedSearchResponse); + expectToEqual(searchResponseWithQuery, expectedSearchResponse); }, }); @@ -77,9 +73,7 @@ describe('DataStreamerService (DONE)', () => { it('... should return updated searchResponse', waitForAsync(() => { dataStreamerService.getSearchResponseWithQuery().subscribe({ next: (searchResponseWithQuery: SearchResponseWithQuery) => { - expect(searchResponseWithQuery) - .withContext(`should equal ${expectedSearchResponse}`) - .toEqual(expectedSearchResponse); + expectToEqual(searchResponseWithQuery, expectedSearchResponse); }, }); @@ -100,9 +94,7 @@ describe('DataStreamerService (DONE)', () => { it('... should emit updated searchResponse', waitForAsync(() => { dataStreamerService.getSearchResponseWithQuery().subscribe({ next: (searchResponseWithQuery: SearchResponseWithQuery) => { - expect(searchResponseWithQuery) - .withContext(`should equal ${expectedSearchResponse}`) - .toEqual(expectedSearchResponse); + expectToEqual(searchResponseWithQuery, expectedSearchResponse); }, }); @@ -123,9 +115,7 @@ describe('DataStreamerService (DONE)', () => { it('... should update search results with empty SearchResponseWithQuery', waitForAsync(() => { dataStreamerService.getSearchResponseWithQuery().subscribe({ next: (searchResponseWithQuery: SearchResponseWithQuery) => { - expect(searchResponseWithQuery) - .withContext('should be empty SearchResponseWithQuery object') - .toEqual(expectedSearchResponse); + expectToEqual(searchResponseWithQuery, expectedSearchResponse); }, }); @@ -137,9 +127,7 @@ describe('DataStreamerService (DONE)', () => { it('... should overwrite existing search results', waitForAsync(() => { dataStreamerService.getSearchResponseWithQuery().subscribe({ next: (searchResponseWithQuery: SearchResponseWithQuery) => { - expect(searchResponseWithQuery) - .withContext(`should equal ${expectedSearchResponse}`) - .toEqual(expectedSearchResponse); + expectToEqual(searchResponseWithQuery, expectedSearchResponse); }, }); @@ -165,8 +153,7 @@ describe('DataStreamerService (DONE)', () => { dataStreamerService.getResourceId().subscribe({ next: (id: string) => { - expect(id).toBeTruthy(); - expect(id).withContext(`should be ${expectedResourceId}`).toBe(expectedResourceId); + expectToBe(id, expectedResourceId); }, }); @@ -180,8 +167,7 @@ describe('DataStreamerService (DONE)', () => { dataStreamerService.getResourceId().subscribe({ next: (id: string) => { - expect(id).toBeTruthy(); - expect(id).withContext(`should be ${expectedResourceId}`).toBe(expectedResourceId); + expectToBe(id, expectedResourceId); }, }); @@ -205,8 +191,7 @@ describe('DataStreamerService (DONE)', () => { dataStreamerService.getResourceId().subscribe({ next: (id: string) => { - expect(id).toBeTruthy(); - expect(id).withContext(`should be ${expectedResourceId}`).toBe(expectedResourceId); + expectToBe(id, expectedResourceId); }, }); @@ -230,8 +215,7 @@ describe('DataStreamerService (DONE)', () => { dataStreamerService.getResourceId().subscribe({ next: (id: string) => { - expect(id).not.toBeTruthy(); - expect(id).withContext(`should be ${expectedResourceId}`).toBe(expectedResourceId); + expectToBe(id, expectedResourceId); }, }); @@ -244,7 +228,7 @@ describe('DataStreamerService (DONE)', () => { dataStreamerService.getResourceId().subscribe({ next: (id: string) => { - expect(id).withContext(`should be ${expectedResourceId}`).toBe(expectedResourceId); + expectToBe(id, expectedResourceId); }, }); diff --git a/src/app/core/services/gnd-service/gnd.service.spec.ts b/src/app/core/services/gnd-service/gnd.service.spec.ts index 8e02d0b3e5..3d7cc7d238 100644 --- a/src/app/core/services/gnd-service/gnd.service.spec.ts +++ b/src/app/core/services/gnd-service/gnd.service.spec.ts @@ -1,7 +1,7 @@ import { TestBed } from '@angular/core/testing'; import { cleanStylesFromDOM } from '@testing/clean-up-helper'; -import { expectSpyCall } from '@testing/expect-helper'; +import { expectSpyCall, expectToBe, expectToEqual } from '@testing/expect-helper'; import { mockConsole, mockLocalStorage, mockSessionStorage, mockWindow } from '@testing/mock-helper'; import { AppConfig } from '@awg-app/app.config'; @@ -91,7 +91,7 @@ describe('GndService (DONE)', () => { it('... should use mock console', () => { console.warn('Test'); - expect(mockConsole.get(0)).withContext(`should be 'Test'`).toBe('Test'); + expectToBe(mockConsole.get(0), 'Test'); }); it('... should clear mock console after each run', () => { @@ -105,9 +105,7 @@ describe('GndService (DONE)', () => { window.parent.window.postMessage('testMessage', 'testTarget'); expectSpyCall(postMessageSpy, 1, 'testMessage'); - expect(mockWindow.get(0)) - .withContext(`should equal ['testMessage', 'testTarget']`) - .toEqual(['testMessage', 'testTarget']); + expectToEqual(mockWindow.get(0), ['testMessage', 'testTarget']); }); it('... should clear mock window after each run', () => { @@ -117,11 +115,11 @@ describe('GndService (DONE)', () => { it('... should use mock storage', () => { expectedStorage.setItem('testkey', 'testvalue'); - expect(mockStorage.getItem('testkey')).withContext(`should equal 'testvalue'`).toEqual('testvalue'); + expectToBe(mockStorage.getItem('testkey'), 'testvalue'); expectedStorage.removeItem('testkey'); - expect(mockStorage.getItem('testkey')).withContext('should be null').toBeNull(); + expect(mockStorage.getItem('testkey')).toBeNull(); }); it('... should use correct mock storage', () => { @@ -130,16 +128,16 @@ describe('GndService (DONE)', () => { expectedStorage.setItem('testkey', 'testvalue'); - expect(mockStorage.getItem('testkey')).withContext(`should equal 'testvalue'`).toEqual('testvalue'); - expect(otherMockStorage.getItem('testkey')).withContext('should be null').toBeNull(); + expectToBe(mockStorage.getItem('testkey'), 'testvalue'); + expect(otherMockStorage.getItem('testkey')).toBeNull(); mockStorage.clear(); otherMockStorage.clear(); expectedOtherStorage.setItem('testkey', 'testvalue'); - expect(otherMockStorage.getItem('testkey')).withContext(`should equal 'testvalue'`).toEqual('testvalue'); - expect(mockStorage.getItem('testkey')).withContext('should be null').toBeNull(); + expectToBe(otherMockStorage.getItem('testkey'), 'testvalue'); + expect(mockStorage.getItem('testkey')).toBeNull(); otherMockStorage.clear(); }); @@ -147,50 +145,48 @@ describe('GndService (DONE)', () => { it('... should set and get an item', () => { expectedStorage.setItem('testkey', 'testvalue'); - expect(mockStorage.getItem('testkey')).withContext(`should equal 'testvalue'`).toEqual('testvalue'); + expectToBe(mockStorage.getItem('testkey'), 'testvalue'); }); it('... should remove an item', () => { expectedStorage.setItem('testkey', 'testvalue'); - expect(mockStorage.getItem('testkey')).withContext(`should equal 'testvalue'`).toEqual('testvalue'); + expectToBe(mockStorage.getItem('testkey'), 'testvalue'); expectedStorage.removeItem('testkey'); - expect(mockStorage.getItem('testkey')).withContext('should be null').toBeNull(); + expect(mockStorage.getItem('testkey')).toBeNull(); }); it('... should remove the correct item', () => { expectedStorage.setItem('testkey', 'testvalue'); expectedStorage.setItem('testkey2', 'testvalue2'); - expect(mockStorage.getItem('testkey')).withContext(`should equal 'testvalue'`).toEqual('testvalue'); - expect(mockStorage.getItem('testkey2')).withContext(`should equal 'testvalue2'`).toEqual('testvalue2'); + expectToBe(mockStorage.getItem('testkey'), 'testvalue'); + expectToBe(mockStorage.getItem('testkey2'), 'testvalue2'); expectedStorage.removeItem('testkey'); - expect(mockStorage.getItem('testkey')).withContext('should be null').toBeNull(); - expect(mockStorage.getItem('testkey2')).withContext(`should equal 'testvalue2'`).toEqual('testvalue2'); + expect(mockStorage.getItem('testkey')).toBeNull(); + expectToBe(mockStorage.getItem('testkey2'), 'testvalue2'); expectedStorage.removeItem('testkey2'); - expect(mockStorage.getItem('testkey')).withContext('should be null').toBeNull(); - expect(mockStorage.getItem('testkey2')).withContext('should be null').toBeNull(); + expect(mockStorage.getItem('testkey')).toBeNull(); + expect(mockStorage.getItem('testkey2')).toBeNull(); }); it('... should clear mock storage after each run', () => { - expect(mockStorage.getItem('testkey')).withContext('should be null').toBeNull(); + expect(mockStorage.getItem('testkey')).toBeNull(); }); }); it('... should have GND_KEY', () => { - expect(gndService.GND_KEY).toBeTruthy(); - expect(gndService.GND_KEY).withContext(`should equal ${expectedGndKey}`).toEqual(expectedGndKey); + expectToBe(gndService.GND_KEY, expectedGndKey); }); it('... should have DNB_REG', () => { - expect(gndService.DNB_REG).toBeTruthy(); - expect(gndService.DNB_REG).withContext(`should equal ${expectedDnbReg}`).toEqual(expectedDnbReg); + expectToEqual(gndService.DNB_REG, expectedDnbReg); }); it('... should not have linkRegArr before exposeGnd call', () => { @@ -198,7 +194,7 @@ describe('GndService (DONE)', () => { gndService.exposeGnd(expectedSetEvent); - expect(gndService.linkRegArr).withContext('should be defined').toBeDefined(); + expect(gndService.linkRegArr).toBeDefined(); }); describe('#exposeGnd()', () => { @@ -208,64 +204,62 @@ describe('GndService (DONE)', () => { describe('... should not do anything if', () => { it('... gndEvent is undefined', () => { - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); gndService.exposeGnd(undefined); expectSpyCall(setGndToSessionStorageSpy, 0); expectSpyCall(removeGndFromSessionStorageSpy, 0); - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); }); it('... gndEvent is null', () => { - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); gndService.exposeGnd(null); expectSpyCall(setGndToSessionStorageSpy, 0); expectSpyCall(removeGndFromSessionStorageSpy, 0); - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); }); it('... gndEvent has undefined type', () => { - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); gndService.exposeGnd(new GndEvent(undefined, '123')); expectSpyCall(setGndToSessionStorageSpy, 0); expectSpyCall(removeGndFromSessionStorageSpy, 0); - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); }); it('... gndEvent has type null', () => { - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); gndService.exposeGnd(new GndEvent(null, '123')); expectSpyCall(setGndToSessionStorageSpy, 0); expectSpyCall(removeGndFromSessionStorageSpy, 0); - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); }); it('... gndEvent has GET type', () => { const expectedDefaultMessage = 'Got an uncatched GND event'; - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); gndService.exposeGnd(new GndEvent(GndEventType.GET, '123')); expectSpyCall(setGndToSessionStorageSpy, 0); expectSpyCall(removeGndFromSessionStorageSpy, 0); - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); expectSpyCall(consoleSpy, 1, expectedDefaultMessage); - expect(mockConsole.get(0)) - .withContext(`should be ${expectedDefaultMessage}`) - .toBe(expectedDefaultMessage); + expectToBe(mockConsole.get(0), expectedDefaultMessage); }); }); @@ -278,15 +272,13 @@ describe('GndService (DONE)', () => { }); it('... should set key/value pair to storage if given gndEvent type is `set`', () => { - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); gndService.exposeGnd(expectedSetEvent); expectSpyCall(setGndToSessionStorageSpy, 1); - expect(mockStorage.getItem(expectedGndKey)) - .withContext(`should equal ${expectedItem}`) - .toEqual(expectedItem); + expectToBe(mockStorage.getItem(expectedGndKey), expectedItem); }); it('... should expose gnd if given gndEvent type is `set`', () => { @@ -308,9 +300,7 @@ describe('GndService (DONE)', () => { expectSpyCall(exposeGndMessageToParentSpy, 1, expectedItem); expectSpyCall(postMessageSpy, 1, [{ gnd: expectedItem }, target]); - expect(mockWindow.get(0)) - .withContext(`should equal [{ gnd: ${expectedItem}, ${target}]]`) - .toEqual([{ gnd: expectedItem }, target]); + expectToEqual(mockWindow.get(0), [{ gnd: expectedItem }, target]); }); it('... should expose gnd to parent window if target meets parent location (localhost)', () => { @@ -326,9 +316,7 @@ describe('GndService (DONE)', () => { expectSpyCall(exposeGndMessageToParentSpy, 1, expectedItem); expectSpyCall(postMessageSpy, 1, [{ gnd: expectedItem }, target]); - expect(mockWindow.get(0)) - .withContext(`should equal [{ gnd: ${expectedItem}, ${target}]]`) - .toEqual([{ gnd: expectedItem }, target]); + expectToEqual(mockWindow.get(0), [{ gnd: expectedItem }, target]); }); it('... should not expose gnd to window if target does not meet parent location', () => { @@ -350,47 +338,39 @@ describe('GndService (DONE)', () => { it('... should set an item to the correct storage if given gndEvent value has gnd link', () => { const otherMockStorage = mockLocalStorage; - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); - expect(otherMockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(otherMockStorage.getItem(expectedGndKey)).toBeNull(); gndService.exposeGnd(expectedSetEvent); - expect(mockStorage.getItem(expectedGndKey)) - .withContext(`should equal ${expectedItem}`) - .toEqual(expectedItem); - expect(otherMockStorage.getItem(expectedGndKey)) - .withContext(`should not equal ${otherItem}`) - .not.toEqual(expectedItem); - expect(otherMockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expectToEqual(mockStorage.getItem(expectedGndKey), expectedItem); + expect(otherMockStorage.getItem(expectedGndKey)).not.toEqual(expectedItem); + expect(otherMockStorage.getItem(expectedGndKey)).toBeNull(); otherMockStorage.clear(); }); it('... should overwrite an existing gnd key if gndEvent value has gnd link', () => { - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); gndService.exposeGnd(expectedSetEvent); - expect(mockStorage.getItem(expectedGndKey)) - .withContext(`should equal ${expectedItem}`) - .toEqual(expectedItem); + expectToEqual(mockStorage.getItem(expectedGndKey), expectedItem); gndService.exposeGnd(otherSetEvent); - expect(mockStorage.getItem(expectedGndKey)) - .withContext(`should not equal ${expectedItem}`) - .not.toEqual(expectedItem); - expect(mockStorage.getItem(expectedGndKey)).withContext(`should equal ${otherItem}`).toEqual(otherItem); + expect(mockStorage.getItem(expectedGndKey)).not.toEqual(expectedItem); + expectToEqual(mockStorage.getItem(expectedGndKey), otherItem); }); it('... should return null if value has no gnd link', () => { - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); gndService.exposeGnd(noLinkGndSetEvent); - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); }); it('... should call helper function with input value to check if value has gnd link', () => { - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); const valueHasGndSpy = spyOn(gndService, '_valueHasGnd').and.callThrough(); gndService.exposeGnd(expectedSetEvent); @@ -405,7 +385,7 @@ describe('GndService (DONE)', () => { it('... should execute regex check and populate linkRegArr if value has gnd link', () => { expect(gndService.linkRegArr).toBeUndefined(); - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); const valueHasGndSpy = spyOn(gndService, '_valueHasGnd').and.callFake(checkValue => { gndService.linkRegArr = gndService.DNB_REG.exec(checkValue); @@ -415,13 +395,12 @@ describe('GndService (DONE)', () => { expectSpyCall(valueHasGndSpy, 1, expectedGndEventValue); expect(expectedGndEventValue).toMatch(expectedDnbReg); - expect(gndService.linkRegArr).withContext('should be defined').toBeDefined(); - expect(gndService.linkRegArr).toEqual(expectedDnbReg.exec(expectedGndEventValue)); + expectToEqual(gndService.linkRegArr, expectedDnbReg.exec(expectedGndEventValue)); }); it('... should execute regex check and set linkRegArr = null if value has no gnd link', () => { expect(gndService.linkRegArr).toBeUndefined(); - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); const valueHasGndSpy = spyOn(gndService, '_valueHasGnd').and.callThrough(); gndService.exposeGnd(noLinkGndSetEvent); @@ -429,32 +408,30 @@ describe('GndService (DONE)', () => { expectSpyCall(valueHasGndSpy, 1, noLinkGndEventValue); expect(noLinkGndEventValue).not.toMatch(expectedDnbReg); - expect(gndService.linkRegArr).withContext('should be null').toBeNull(); + expect(gndService.linkRegArr).toBeNull(); }); it('... should return true (and set item) if value has gnd link', () => { expect(gndService.linkRegArr).toBeUndefined(); - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); const valueHasGndSpy = spyOn(gndService, '_valueHasGnd').and.callThrough(); gndService.exposeGnd(expectedSetEvent); expectSpyCall(valueHasGndSpy, 1, expectedGndEventValue); - expect(mockStorage.getItem(expectedGndKey)) - .withContext(`should equal ${expectedItem}`) - .toEqual(expectedItem); + expectToEqual(mockStorage.getItem(expectedGndKey), expectedItem); }); it('... should return false (and set no item) if value has no gnd link', () => { expect(gndService.linkRegArr).toBeUndefined(); - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); const valueHasGndSpy = spyOn(gndService, '_valueHasGnd').and.callThrough(); gndService.exposeGnd(noLinkGndSetEvent); expectSpyCall(valueHasGndSpy, 1, noLinkGndEventValue); - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); }); }); }); @@ -468,16 +445,14 @@ describe('GndService (DONE)', () => { }); it('... should remove an item by key from the storage if given gndEvent type is `remove`', () => { - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); expectedStorage.setItem(expectedGndKey, expectedItem); - expect(mockStorage.getItem(expectedGndKey)) - .withContext(`should equal ${expectedItem}`) - .toEqual(expectedItem); + expectToEqual(mockStorage.getItem(expectedGndKey), expectedItem); gndService.exposeGnd(expectedRemoveEvent); - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); }); it('... should expose null value if given gndEvent type is `remove`', () => { @@ -499,9 +474,7 @@ describe('GndService (DONE)', () => { expectSpyCall(exposeGndMessageToParentSpy, 1, null); expectSpyCall(postMessageSpy, 1, [{ gnd: null }, target]); - expect(mockWindow.get(0)) - .withContext(`should equal [{ gnd: ${expectedItem}, ${target}]]`) - .toEqual([{ gnd: null }, target]); + expectToEqual(mockWindow.get(0), [{ gnd: null }, target]); }); it('... should expose null value to parent window if target meets parent location (localhost)', () => { @@ -517,34 +490,26 @@ describe('GndService (DONE)', () => { expectSpyCall(exposeGndMessageToParentSpy, 1, null); expectSpyCall(postMessageSpy, 1, [{ gnd: null }, target]); - expect(mockWindow.get(0)) - .withContext(`should equal [{ gnd: ${expectedItem}, ${target}]]`) - .toEqual([{ gnd: null }, target]); + expectToEqual(mockWindow.get(0), [{ gnd: null }, target]); }); it('... should remove an item from the correct storage', () => { const expectedOtherStorage = expectedLocalStorage; const otherMockStorage = mockLocalStorage; - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); - expect(otherMockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(otherMockStorage.getItem(expectedGndKey)).toBeNull(); expectedStorage.setItem(expectedGndKey, expectedItem); expectedOtherStorage.setItem(expectedGndKey, otherItem); - expect(mockStorage.getItem(expectedGndKey)) - .withContext(`should equal ${expectedItem}`) - .toEqual(expectedItem); - expect(otherMockStorage.getItem(expectedGndKey)) - .withContext(`should equal ${otherItem}`) - .toEqual(otherItem); + expectToEqual(mockStorage.getItem(expectedGndKey), expectedItem); + expectToEqual(otherMockStorage.getItem(expectedGndKey), otherItem); gndService.exposeGnd(expectedRemoveEvent); - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); - expect(otherMockStorage.getItem(expectedGndKey)) - .withContext(`should equal ${otherItem}`) - .toEqual(otherItem); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expectToEqual(otherMockStorage.getItem(expectedGndKey), otherItem); otherMockStorage.clear(); }); @@ -552,51 +517,45 @@ describe('GndService (DONE)', () => { it('... should remove the correct item from the storage', () => { const otherKey = 'otherKey'; - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); - expect(mockStorage.getItem(otherKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(mockStorage.getItem(otherKey)).toBeNull(); expectedStorage.setItem(expectedGndKey, expectedItem); expectedStorage.setItem(otherKey, expectedItem); - expect(mockStorage.getItem(expectedGndKey)) - .withContext(`should equal ${expectedItem}`) - .toEqual(expectedItem); - expect(mockStorage.getItem(otherKey)).withContext(`should equal ${expectedItem}`).toEqual(expectedItem); + expectToEqual(mockStorage.getItem(expectedGndKey), expectedItem); + expectToEqual(mockStorage.getItem(otherKey), expectedItem); gndService.exposeGnd(expectedRemoveEvent); - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); - expect(mockStorage.getItem(otherKey)).withContext(`should equal ${expectedItem}`).toEqual(expectedItem); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expectToEqual(mockStorage.getItem(otherKey), expectedItem); }); describe('... should do nothing if:', () => { it('- storage has not the gnd key', () => { - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); gndService.exposeGnd(expectedRemoveEvent); - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); }); it('- storage has other key but not the gnd key', () => { const otherKey = 'otherKey'; - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); - expect(mockStorage.getItem(otherKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(mockStorage.getItem(otherKey)).toBeNull(); expectedStorage.setItem(otherKey, expectedItem); - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); - expect(mockStorage.getItem(otherKey)) - .withContext(`should equal ${expectedItem}`) - .toEqual(expectedItem); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expectToEqual(mockStorage.getItem(otherKey), expectedItem); gndService.exposeGnd(expectedRemoveEvent); - expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); - expect(mockStorage.getItem(otherKey)) - .withContext(`should equal ${expectedItem}`) - .toEqual(expectedItem); + expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expectToEqual(mockStorage.getItem(otherKey), expectedItem); }); }); }); diff --git a/src/app/core/services/http-cache/http-cache.service.spec.ts b/src/app/core/services/http-cache/http-cache.service.spec.ts index fd2406ad83..caa9e48dc1 100644 --- a/src/app/core/services/http-cache/http-cache.service.spec.ts +++ b/src/app/core/services/http-cache/http-cache.service.spec.ts @@ -1,6 +1,8 @@ import { HttpHeaders, HttpRequest, HttpResponse } from '@angular/common/http'; import { TestBed } from '@angular/core/testing'; +import { expectToBe, expectToEqual } from '@testing/expect-helper'; + import { AppConfig } from '@awg-app/app.config'; import { HttpCacheService } from './http-cache.service'; @@ -38,9 +40,7 @@ describe('HttpCacheService (DONE)', () => { it('... should have empty _cachedResponses before any call is made', () => { expect((httpCacheService as any)._cachedResponses).toBeTruthy(); - expect((httpCacheService as any)._cachedResponses.size) - .withContext('should be 0') - .toBe(0); + expectToBe((httpCacheService as any)._cachedResponses.size, 0); }); describe('#put()', () => { @@ -55,8 +55,7 @@ describe('HttpCacheService (DONE)', () => { expectedRequest.urlWithParams ); - expect(expectedCachedResponse).toBeTruthy(); - expect(expectedCachedResponse).withContext(`should be ${expectedResponse}`).toEqual(expectedResponse); + expectToEqual(expectedCachedResponse, expectedResponse); }); }); @@ -81,12 +80,10 @@ describe('HttpCacheService (DONE)', () => { const expectedCachedResponse = (httpCacheService as any)._cachedResponses.get( expectedRequest.urlWithParams ); - expect(expectedCachedResponse).toBeTruthy(); - expect(expectedCachedResponse).withContext(`should be ${expectedResponse}`).toEqual(expectedResponse); + expectToEqual(expectedCachedResponse, expectedResponse); const expectedGetCache = httpCacheService.get(expectedRequest); - expect(expectedGetCache).toBeTruthy(); - expect(expectedGetCache).withContext(`should equal ${expectedResponse}`).toEqual(expectedResponse); + expectToEqual(expectedGetCache, expectedResponse); }); }); }); diff --git a/src/app/core/services/loading-service/loading.service.spec.ts b/src/app/core/services/loading-service/loading.service.spec.ts index 2c8b9a8947..3c5bc338cd 100644 --- a/src/app/core/services/loading-service/loading.service.spec.ts +++ b/src/app/core/services/loading-service/loading.service.spec.ts @@ -1,6 +1,7 @@ import { TestBed, waitForAsync } from '@angular/core/testing'; import { cleanStylesFromDOM } from '@testing/clean-up-helper'; +import { expectToBe } from '@testing/expect-helper'; import { LoadingService } from './loading.service'; @@ -52,7 +53,7 @@ describe('LoadingService (DONE)', () => { it('... should return updated value', waitForAsync(() => { loadingService.getLoadingStatus().subscribe({ next: (isLoading: boolean) => { - expect(isLoading).withContext(`should be ${loadingStatus}`).toBe(loadingStatus); + expectToBe(isLoading, loadingStatus); }, }); @@ -70,7 +71,7 @@ describe('LoadingService (DONE)', () => { it('... should emit updated loading status', waitForAsync(() => { loadingService.getLoadingStatus().subscribe({ next: (isLoading: boolean) => { - expect(isLoading).withContext(`should be ${loadingStatus}`).toBe(loadingStatus); + expectToBe(isLoading, loadingStatus); }, }); diff --git a/src/app/core/services/side-info-service/side-info.service.spec.ts b/src/app/core/services/side-info-service/side-info.service.spec.ts index f4eedbe77c..feff40f26f 100644 --- a/src/app/core/services/side-info-service/side-info.service.spec.ts +++ b/src/app/core/services/side-info-service/side-info.service.spec.ts @@ -1,6 +1,7 @@ import { TestBed, waitForAsync } from '@angular/core/testing'; import { cleanStylesFromDOM } from '@testing/clean-up-helper'; +import { expectToBe, expectToEqual } from '@testing/expect-helper'; import { SearchInfo } from '@awg-side-info/side-info-models'; import { SideInfoService } from './side-info.service'; @@ -56,10 +57,7 @@ describe('SideInfoService (DONE)', () => { it('... should return default empty search info data', waitForAsync(() => { sideInfoService.getSearchInfoData().subscribe({ next: (searchInfo: SearchInfo) => { - expect(searchInfo).toBeTruthy(); - expect(searchInfo) - .withContext(`should equal ${expectedSearchInfoData}`) - .toEqual(expectedSearchInfoData); + expectToEqual(searchInfo, expectedSearchInfoData); }, }); })); @@ -67,10 +65,7 @@ describe('SideInfoService (DONE)', () => { it('... should return updated search info data', waitForAsync(() => { sideInfoService.getSearchInfoData().subscribe({ next: (searchInfo: SearchInfo) => { - expect(searchInfo).toBeTruthy(); - expect(searchInfo) - .withContext(`should equal ${expectedSearchInfoData}`) - .toEqual(expectedSearchInfoData); + expectToEqual(searchInfo, expectedSearchInfoData); }, }); @@ -88,10 +83,7 @@ describe('SideInfoService (DONE)', () => { it('... should emit updated search info data', waitForAsync(() => { sideInfoService.getSearchInfoData().subscribe({ next: (searchInfo: SearchInfo) => { - expect(searchInfo).toBeTruthy(); - expect(searchInfo) - .withContext(`should equal ${expectedSearchInfoData}`) - .toEqual(expectedSearchInfoData); + expectToEqual(searchInfo, expectedSearchInfoData); }, }); @@ -113,10 +105,7 @@ describe('SideInfoService (DONE)', () => { it('... should update search info data with empty SearchInfo', waitForAsync(() => { sideInfoService.getSearchInfoData().subscribe({ next: (searchInfo: SearchInfo) => { - expect(searchInfo).toBeTruthy(); - expect(searchInfo) - .withContext(`should equal ${expectedSearchInfoData}`) - .toEqual(expectedSearchInfoData); + expectToEqual(searchInfo, expectedSearchInfoData); }, }); @@ -127,10 +116,7 @@ describe('SideInfoService (DONE)', () => { it('... should overwrite existing search info data', waitForAsync(() => { sideInfoService.getSearchInfoData().subscribe({ next: (searchInfo: SearchInfo) => { - expect(searchInfo).toBeTruthy(); - expect(searchInfo) - .withContext(`should equal ${expectedSearchInfoData}`) - .toEqual(expectedSearchInfoData); + expectToEqual(searchInfo, expectedSearchInfoData); }, }); @@ -155,7 +141,7 @@ describe('SideInfoService (DONE)', () => { sideInfoService.getSearchInfoTitle().subscribe({ next: (title: string) => { expect(title).not.toBeTruthy(); - expect(title).withContext(`should be ${expectedSearchInfoTitle}`).toBe(expectedSearchInfoTitle); + expectToBe(title, expectedSearchInfoTitle); }, }); })); @@ -163,7 +149,7 @@ describe('SideInfoService (DONE)', () => { it('... should return updated search info title', waitForAsync(() => { sideInfoService.getSearchInfoTitle().subscribe({ next: (title: string) => { - expect(title).withContext(`should be ${expectedSearchInfoTitle}`).toBe(expectedSearchInfoTitle); + expectToBe(title, expectedSearchInfoTitle); }, }); @@ -181,7 +167,7 @@ describe('SideInfoService (DONE)', () => { it('... should emit updated search info title', waitForAsync(() => { sideInfoService.getSearchInfoTitle().subscribe({ next: (title: string) => { - expect(title).withContext(`should be ${expectedSearchInfoTitle}`).toBe(expectedSearchInfoTitle); + expectToBe(title, expectedSearchInfoTitle); }, }); @@ -213,7 +199,7 @@ describe('SideInfoService (DONE)', () => { it('... should overwrite existing search info title', waitForAsync(() => { sideInfoService.getSearchInfoTitle().subscribe({ next: (title: string) => { - expect(title).withContext(`should be ${expectedSearchInfoTitle}`).toBe(expectedSearchInfoTitle); + expectToBe(title, expectedSearchInfoTitle); }, }); diff --git a/src/app/core/services/storage-service/storage.service.spec.ts b/src/app/core/services/storage-service/storage.service.spec.ts index 624bf54c34..79184cad89 100644 --- a/src/app/core/services/storage-service/storage.service.spec.ts +++ b/src/app/core/services/storage-service/storage.service.spec.ts @@ -1,6 +1,7 @@ import { TestBed } from '@angular/core/testing'; import { cleanStylesFromDOM } from '@testing/clean-up-helper'; +import { expectToBe } from '@testing/expect-helper'; import { mockLocalStorage, mockSessionStorage } from '@testing/mock-helper'; import { StorageService, StorageType } from './storage.service'; @@ -62,7 +63,7 @@ describe('StorageService (DONE)', () => { it('... should use mock storage', () => { expectedStorage.setItem('testkey', 'testvalue'); - expect(mockStorage.getItem('testkey')).withContext(`should be 'testvalue'`).toBe('testvalue'); + expectToBe(mockStorage.getItem('testkey'), 'testvalue'); expectedStorage.removeItem('testkey'); @@ -75,7 +76,7 @@ describe('StorageService (DONE)', () => { expectedStorage.setItem('testkey', 'testvalue'); - expect(mockStorage.getItem('testkey')).withContext(`should be 'testvalue'`).toBe('testvalue'); + expectToBe(mockStorage.getItem('testkey'), 'testvalue'); expect(otherMockStorage.getItem('testkey')).toBeNull(); mockStorage.clear(); @@ -83,7 +84,7 @@ describe('StorageService (DONE)', () => { expectedOtherStorage.setItem('testkey', 'testvalue'); - expect(otherMockStorage.getItem('testkey')).withContext(`should be 'testvalue'`).toBe('testvalue'); + expectToBe(otherMockStorage.getItem('testkey'), 'testvalue'); expect(mockStorage.getItem('testkey')).toBeNull(); otherMockStorage.clear(); @@ -92,13 +93,13 @@ describe('StorageService (DONE)', () => { it('... should set and get an item', () => { expectedStorage.setItem('testkey', 'testvalue'); - expect(mockStorage.getItem('testkey')).withContext(`should be 'testvalue'`).toBe('testvalue'); + expectToBe(mockStorage.getItem('testkey'), 'testvalue'); }); it('... should remove an item', () => { expectedStorage.setItem('testkey', 'testvalue'); - expect(mockStorage.getItem('testkey')).withContext(`should be 'testvalue'`).toBe('testvalue'); + expectToBe(mockStorage.getItem('testkey'), 'testvalue'); expectedStorage.removeItem('testkey'); @@ -109,13 +110,13 @@ describe('StorageService (DONE)', () => { expectedStorage.setItem('testkey', 'testvalue'); expectedStorage.setItem('testkey2', 'testvalue2'); - expect(mockStorage.getItem('testkey')).withContext(`should be 'testvalue'`).toBe('testvalue'); - expect(mockStorage.getItem('testkey2')).withContext(`should be 'testvalue2'`).toBe('testvalue2'); + expectToBe(mockStorage.getItem('testkey'), 'testvalue'); + expectToBe(mockStorage.getItem('testkey2'), 'testvalue2'); expectedStorage.removeItem('testkey'); expect(mockStorage.getItem('testkey')).toBeNull(); - expect(mockStorage.getItem('testkey2')).withContext(`should be 'testvalue2'`).toBe('testvalue2'); + expectToBe(mockStorage.getItem('testkey2'), 'testvalue2'); expectedStorage.removeItem('testkey2'); @@ -137,7 +138,7 @@ describe('StorageService (DONE)', () => { expect(mockStorage.getItem(expectedKey)).toBeNull(); storageService.setStorageKey(sessionType, expectedKey, expectedItem); - expect(mockStorage.getItem(expectedKey)).withContext(`should be ${expectedItem}`).toBe(expectedItem); + expectToBe(mockStorage.getItem(expectedKey), expectedItem); }); it('... should set item to the correct storage type', () => { @@ -149,8 +150,8 @@ describe('StorageService (DONE)', () => { storageService.setStorageKey(sessionType, expectedKey, expectedItem); storageService.setStorageKey(localType, expectedKey, otherItem); - expect(mockStorage.getItem(expectedKey)).withContext(`should be ${expectedItem}`).toBe(expectedItem); - expect(otherMockStorage.getItem(expectedKey)).withContext(`should be ${otherItem}`).toBe(otherItem); + expectToBe(mockStorage.getItem(expectedKey), expectedItem); + expectToBe(otherMockStorage.getItem(expectedKey), otherItem); otherMockStorage.clear(); }); @@ -159,17 +160,17 @@ describe('StorageService (DONE)', () => { expect(mockStorage.getItem(expectedKey)).toBeNull(); storageService.setStorageKey(sessionType, expectedKey, expectedItem); - expect(mockStorage.getItem(expectedKey)).withContext(`should be ${expectedItem}`).toBe(expectedItem); + expectToBe(mockStorage.getItem(expectedKey), expectedItem); }); it('... should overwrite an existing item with the correct item when a key exists', () => { expect(mockStorage.getItem(expectedKey)).toBeNull(); storageService.setStorageKey(sessionType, expectedKey, expectedItem); - expect(mockStorage.getItem(expectedKey)).withContext(`should be ${expectedItem}`).toBe(expectedItem); + expectToBe(mockStorage.getItem(expectedKey), expectedItem); storageService.setStorageKey(sessionType, expectedKey, otherItem); - expect(expectedStorage.getItem(expectedKey)).withContext(`should be ${otherItem}`).toBe(otherItem); + expectToBe(expectedStorage.getItem(expectedKey), otherItem); }); describe('... should do nothing if:', () => { @@ -236,9 +237,7 @@ describe('StorageService (DONE)', () => { expect(mockStorage.getItem(expectedKey)).toBeNull(); expectedStorage.setItem(expectedKey, expectedItem); - expect(storageService.getStorageKey(sessionType, expectedKey)) - .withContext(`should be ${expectedItem}`) - .toBe(expectedItem); + expectToBe(storageService.getStorageKey(sessionType, expectedKey), expectedItem); }); it('... should get item from the correct storage type', () => { @@ -251,12 +250,8 @@ describe('StorageService (DONE)', () => { expectedStorage.setItem(expectedKey, expectedItem); expectedOtherStorage.setItem(expectedKey, otherItem); - expect(storageService.getStorageKey(sessionType, expectedKey)) - .withContext(`should be ${expectedItem}`) - .toBe(expectedItem); - expect(storageService.getStorageKey(localType, expectedKey)) - .withContext(`should be ${otherItem}`) - .toBe(otherItem); + expectToBe(storageService.getStorageKey(sessionType, expectedKey), expectedItem); + expectToBe(storageService.getStorageKey(localType, expectedKey), otherItem); otherMockStorage.clear(); }); @@ -318,7 +313,7 @@ describe('StorageService (DONE)', () => { it('... should remove an item by key from a given storage type', () => { expect(mockStorage.getItem(expectedKey)).toBeNull(); storageService.setStorageKey(sessionType, expectedKey, expectedItem); - expect(mockStorage.getItem(expectedKey)).withContext(`should be ${expectedItem}`).toBe(expectedItem); + expectToBe(mockStorage.getItem(expectedKey), expectedItem); storageService.removeStorageKey(sessionType, expectedKey); expect(mockStorage.getItem(expectedKey)).toBeNull(); @@ -337,7 +332,7 @@ describe('StorageService (DONE)', () => { storageService.removeStorageKey(sessionType, expectedKey); expect(mockStorage.getItem(expectedKey)).toBeNull(); - expect(otherMockStorage.getItem(expectedKey)).withContext(`should be ${otherItem}`).toBe(otherItem); + expectToBe(otherMockStorage.getItem(expectedKey), otherItem); storageService.removeStorageKey(localType, expectedKey); @@ -356,60 +351,58 @@ describe('StorageService (DONE)', () => { expect(mockStorage.getItem(expectedKey)).toBeNull(); expectedStorage.setItem(expectedKey, expectedItem); - expect(mockStorage.getItem(expectedKey)).withContext(`should be ${expectedItem}`).toBe(expectedItem); + expectToBe(mockStorage.getItem(expectedKey), expectedItem); storageService.removeStorageKey(undefined, expectedKey); - expect(mockStorage.getItem(expectedKey)).withContext(`should be ${expectedItem}`).toBe(expectedItem); + expectToBe(mockStorage.getItem(expectedKey), expectedItem); }); it('- storage type is null', () => { expect(mockStorage.getItem(expectedKey)).toBeNull(); expectedStorage.setItem(expectedKey, expectedItem); - expect(mockStorage.getItem(expectedKey)).withContext(`should be ${expectedItem}`).toBe(expectedItem); + expectToBe(mockStorage.getItem(expectedKey), expectedItem); storageService.removeStorageKey(null, expectedKey); - expect(mockStorage.getItem(expectedKey)).withContext(`should be ${expectedItem}`).toBe(expectedItem); + expectToBe(mockStorage.getItem(expectedKey), expectedItem); }); it('- storage has not the given key', () => { expect(mockStorage.getItem(expectedKey)).toBeNull(); expectedStorage.setItem(expectedKey, expectedItem); - expect(mockStorage.getItem(expectedKey)).withContext(`should be ${expectedItem}`).toBe(expectedItem); + expectToBe(mockStorage.getItem(expectedKey), expectedItem); spyOn(storageService, '_storageHasKey').and.returnValue(false); storageService.removeStorageKey(sessionType, expectedKey); - expect(mockStorage.getItem(expectedKey)).withContext(`should be ${expectedItem}`).toBe(expectedItem); + expectToBe(mockStorage.getItem(expectedKey), expectedItem); }); it('- storage is not supported', () => { expect(mockStorage.getItem(expectedKey)).toBeNull(); expectedStorage.setItem(expectedKey, expectedItem); - expect(expectedStorage.getItem(expectedKey)) - .withContext(`should be ${expectedItem}`) - .toBe(expectedItem); + expectToBe(expectedStorage.getItem(expectedKey), expectedItem); spyOn(storageService, '_storageIsSupported').and.returnValue(undefined); storageService.removeStorageKey(sessionType, expectedKey); - expect(mockStorage.getItem(expectedKey)).withContext(`should be ${expectedItem}`).toBe(expectedItem); + expectToBe(mockStorage.getItem(expectedKey), expectedItem); }); it('- storage is not available', () => { expect(mockStorage.getItem(expectedKey)).toBeNull(); expectedStorage.setItem(expectedKey, expectedItem); - expect(mockStorage.getItem(expectedKey)).withContext(`should be ${expectedItem}`).toBe(expectedItem); + expectToBe(mockStorage.getItem(expectedKey), expectedItem); spyOn(storageService, '_storageIsAvailable').and.returnValue(undefined); storageService.removeStorageKey(sessionType, expectedKey); - expect(mockStorage.getItem(expectedKey)).withContext(`should be ${expectedItem}`).toBe(expectedItem); + expectToBe(mockStorage.getItem(expectedKey), expectedItem); }); }); }); @@ -420,11 +413,11 @@ describe('StorageService (DONE)', () => { }); it('... should return true if the storage is available', () => { - expect((storageService as any)._storageIsAvailable(expectedStorage)).toBe(true); + expectToBe((storageService as any)._storageIsAvailable(expectedStorage), true); }); it('... should return false if the storage is not available', () => { - expect((storageService as any)._storageIsAvailable(null)).toBe(false); + expectToBe((storageService as any)._storageIsAvailable(null), false); }); }); }); diff --git a/src/app/core/view-container/view-container.component.spec.ts b/src/app/core/view-container/view-container.component.spec.ts index 1c68421b23..7560a8323d 100644 --- a/src/app/core/view-container/view-container.component.spec.ts +++ b/src/app/core/view-container/view-container.component.spec.ts @@ -2,7 +2,7 @@ import { DebugElement } from '@angular/core'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { cleanStylesFromDOM } from '@testing/clean-up-helper'; -import { getAndExpectDebugElementByCss, getAndExpectDebugElementByDirective } from '@testing/expect-helper'; +import { expectToBe, getAndExpectDebugElementByCss, getAndExpectDebugElementByDirective } from '@testing/expect-helper'; import { RouterLinkStubDirective, RouterOutletStubComponent } from '@testing/router-stubs'; import { ViewContainerComponent } from './view-container.component'; @@ -57,7 +57,7 @@ describe('ViewContainerComponent (DONE)', () => { // Secondary outlet should be named 'side' expect(routletDes[1].attributes).toBeDefined(); expect(routletDes[1].attributes['name']).toBeDefined(); - expect(routletDes[1].attributes['name']).withContext('should have name `side`').toBe('side'); + expectToBe(routletDes[1].attributes['name'], 'side'); }); }); }); diff --git a/src/app/views/data-view/data-outlets/search-panel/search-panel.component.spec.ts b/src/app/views/data-view/data-outlets/search-panel/search-panel.component.spec.ts index 0b5562375a..fbaf284d17 100644 --- a/src/app/views/data-view/data-outlets/search-panel/search-panel.component.spec.ts +++ b/src/app/views/data-view/data-outlets/search-panel/search-panel.component.spec.ts @@ -5,6 +5,7 @@ import { ActivatedRoute, NavigationEnd, Router } from '@angular/router'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; import { of as observableOf } from 'rxjs'; +import { expectToEqual } from '@testing/expect-helper'; import { ActivatedRouteStub, UrlSegmentStub } from '@testing/router-stubs'; import { ConversionService, DataStreamerService, LoadingService } from '@awg-core/services'; @@ -115,17 +116,13 @@ describe('SearchPanelComponent', () => { }); it('... should change urls', () => { - expect(mockActivatedRoute.snapshot.url[0].path).toBeTruthy(); - expect(mockActivatedRoute.snapshot.url[0].path) - .withContext(`should equal ${expectedPath}`) - .toEqual(expectedPath); + expectToEqual(mockActivatedRoute.snapshot.url[0].path, expectedPath); const changedPath = 'other'; const changedRouteUrl: UrlSegmentStub[] = [{ path: changedPath }]; mockActivatedRoute.testUrl = changedRouteUrl; - expect(mockActivatedRoute.snapshot.url[0].path).toBeTruthy(); - expect(mockActivatedRoute.snapshot.url[0].path).withContext(`should equal ${changedPath}`).toEqual(changedPath); + expectToEqual(mockActivatedRoute.snapshot.url[0].path, changedPath); }); }); From 6a65040f011de2ef6915c84a33c85a12298f00e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Mar 2024 11:05:45 +0000 Subject: [PATCH 56/63] build(deps-dev): bump the angular-cli-devkit group with 2 updates Bumps the angular-cli-devkit group with 2 updates: [@angular-devkit/build-angular](https://github.com/angular/angular-cli) and [@angular/cli](https://github.com/angular/angular-cli). Updates `@angular-devkit/build-angular` from 17.2.2 to 17.2.3 - [Release notes](https://github.com/angular/angular-cli/releases) - [Changelog](https://github.com/angular/angular-cli/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular-cli/compare/17.2.2...17.2.3) Updates `@angular/cli` from 17.2.2 to 17.2.3 - [Release notes](https://github.com/angular/angular-cli/releases) - [Changelog](https://github.com/angular/angular-cli/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular-cli/compare/17.2.2...17.2.3) --- updated-dependencies: - dependency-name: "@angular-devkit/build-angular" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: angular-cli-devkit - dependency-name: "@angular/cli" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: angular-cli-devkit ... Signed-off-by: dependabot[bot] --- package.json | 4 +-- yarn.lock | 90 ++++++++++++++++++++++++++-------------------------- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/package.json b/package.json index 35dc7e3725..ddfccc7299 100644 --- a/package.json +++ b/package.json @@ -117,13 +117,13 @@ "zone.js": "~0.14.2" }, "devDependencies": { - "@angular-devkit/build-angular": "^17.2.2", + "@angular-devkit/build-angular": "^17.2.3", "@angular-eslint/builder": "^17.2.1", "@angular-eslint/eslint-plugin": "^17.2.1", "@angular-eslint/eslint-plugin-template": "^17.2.1", "@angular-eslint/schematics": "^17.2.1", "@angular-eslint/template-parser": "^17.2.1", - "@angular/cli": "^17.2.2", + "@angular/cli": "^17.2.3", "@angular/compiler-cli": "^17.2.3", "@commitlint/cli": "^19.0.3", "@commitlint/config-angular": "^19.0.3", diff --git a/yarn.lock b/yarn.lock index ab0b71a085..dd3f13de76 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20,23 +20,23 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" -"@angular-devkit/architect@0.1702.2": - version "0.1702.2" - resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1702.2.tgz#fb219163a89c4d28a35ad574fa56d79cf70f7405" - integrity sha512-qBvif8/NquFUqVQgs4U+8wXh/rQZv+YlYwg6eDZly1bIaTd/k9spko/seTtNT1OpK/Be+GLo5IbiQ7i2SON3iQ== +"@angular-devkit/architect@0.1702.3": + version "0.1702.3" + resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1702.3.tgz#4bdd844f55c94dc6b3153bb693b6b1c5621d3ae2" + integrity sha512-4jeBgtBIZxAeJyiwSdbRE4+rWu34j0UMCKia8s7473rKj0Tn4+dXlHmA/kuFYIp6K/9pE/hBoeUFxLNA/DZuRQ== dependencies: - "@angular-devkit/core" "17.2.2" + "@angular-devkit/core" "17.2.3" rxjs "7.8.1" -"@angular-devkit/build-angular@^17.2.2": - version "17.2.2" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-17.2.2.tgz#8a6291c7fd74d995284f665bf1a3cdf7340fc347" - integrity sha512-K55xBiWBfxD4wmxLR2viOPbBryOk6YaZeNr72IMkp1yIrIy1BES6LDJi7R9fDW7+TprqZdM4B91Tkc+BCwYQzQ== +"@angular-devkit/build-angular@^17.2.3": + version "17.2.3" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-17.2.3.tgz#0ff93a434fc1f31d065943688b5c9559bdfc1593" + integrity sha512-AZsEHZj+k2Lxb7uQUwfEpSE6TvQhCoIgP6XLKgKxZHUOiTUVXDj84WhNcbup5SsSG1cafmoVN7APxxuSwHcoeg== dependencies: "@ampproject/remapping" "2.2.1" - "@angular-devkit/architect" "0.1702.2" - "@angular-devkit/build-webpack" "0.1702.2" - "@angular-devkit/core" "17.2.2" + "@angular-devkit/architect" "0.1702.3" + "@angular-devkit/build-webpack" "0.1702.3" + "@angular-devkit/core" "17.2.3" "@babel/core" "7.23.9" "@babel/generator" "7.23.6" "@babel/helper-annotate-as-pure" "7.22.5" @@ -47,7 +47,7 @@ "@babel/preset-env" "7.23.9" "@babel/runtime" "7.23.9" "@discoveryjs/json-ext" "0.5.7" - "@ngtools/webpack" "17.2.2" + "@ngtools/webpack" "17.2.3" "@vitejs/plugin-basic-ssl" "1.1.0" ansi-colors "4.1.3" autoprefixer "10.4.17" @@ -99,12 +99,12 @@ optionalDependencies: esbuild "0.20.0" -"@angular-devkit/build-webpack@0.1702.2": - version "0.1702.2" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1702.2.tgz#a7c6bcfa1bf30eb8504f3bae85a636b333f71bb3" - integrity sha512-+c7rHD2Se1VD9i9uPEYHqhq8hTnsUAn5LfeJCLS8g7FU8T42tDSC/k1qWxHp7d99kf7ecg2BvYcZDlYaBUnl3A== +"@angular-devkit/build-webpack@0.1702.3": + version "0.1702.3" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1702.3.tgz#9054793a57e494f4f80d541611a7c1c63377a24c" + integrity sha512-G9F2Ori8WxJtMvOQGxTdg7d+5aAO1IPeEtMiZwFPrw65Ey6Gvfm0h2+3FnQdzeKrZmGaTk5E6gffHXJJQfCnmQ== dependencies: - "@angular-devkit/architect" "0.1702.2" + "@angular-devkit/architect" "0.1702.3" rxjs "7.8.1" "@angular-devkit/core@14.2.12": @@ -118,10 +118,10 @@ rxjs "6.6.7" source-map "0.7.4" -"@angular-devkit/core@17.2.2": - version "17.2.2" - resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-17.2.2.tgz#81f1f9b7f98453fffb25716633f3ff21c6a93643" - integrity sha512-bKMi6bBkEeN4a3qTxCykhrAvE0ESHhKO38Qh1bN/8QSyvKVAEyVAVls5W9IN5GKRHvXgEn9aw+DSzRnPpy9nyw== +"@angular-devkit/core@17.2.3": + version "17.2.3" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-17.2.3.tgz#9e38dc4242212a6b00bf03e518add0f9b75b6e7f" + integrity sha512-A7WWl1/VsZw6utFFPBib1wSbAB5OeBgAgQmVpVe9wW8u9UZa6CLc7b3InWtRRyBXTo9Sa5GNZDFfwlXhy3iW3w== dependencies: ajv "8.12.0" ajv-formats "2.1.1" @@ -141,12 +141,12 @@ ora "5.4.1" rxjs "6.6.7" -"@angular-devkit/schematics@17.2.2": - version "17.2.2" - resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-17.2.2.tgz#d85e6b34d0e6130bf451cc2fbd1511c9e76a5e99" - integrity sha512-t6dBhHvto9BEIo+Kew0+YyIS3TV1SEd4MActUk+zF4NNQyJ8wRUHL+8glUKB6ZWPyCTYSinJ+QKn/3yytELTHg== +"@angular-devkit/schematics@17.2.3": + version "17.2.3" + resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-17.2.3.tgz#1e9f803deccdfdd1eeeff36c702d6dadae91227f" + integrity sha512-JZCzHHheotv+iJ4p6qLc3pEi2M8NO12Slo6uiCg2T9B01glAcJB7DA1nwqjwD1cElf24Pt0C+HI0r+Lng48IsQ== dependencies: - "@angular-devkit/core" "17.2.2" + "@angular-devkit/core" "17.2.3" jsonc-parser "3.2.1" magic-string "0.30.7" ora "5.4.1" @@ -221,15 +221,15 @@ dependencies: tslib "^2.3.0" -"@angular/cli@^17.2.2": - version "17.2.2" - resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-17.2.2.tgz#a613dd782b3e2c30c447a4987d179a6409973c03" - integrity sha512-cGGOnOTjU1bHBAU+5LMR1vfjUSmIY204pUcRAHu6xq1Qp8jm0Wf1lYOG1KrzpDezKa8d0WZe6FIVlxsCZRRYSw== +"@angular/cli@^17.2.3": + version "17.2.3" + resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-17.2.3.tgz#c5e70fcb8f1e4cc15ef5fba04533fbe414e875c1" + integrity sha512-GIF9NF4t8PiHS4wt6baw1hECfmMOmNHvDAuT12/xoAueOairxIQ+AX13WaEHMJriWujm31TjqbwXmhPxMSEQpw== dependencies: - "@angular-devkit/architect" "0.1702.2" - "@angular-devkit/core" "17.2.2" - "@angular-devkit/schematics" "17.2.2" - "@schematics/angular" "17.2.2" + "@angular-devkit/architect" "0.1702.3" + "@angular-devkit/core" "17.2.3" + "@angular-devkit/schematics" "17.2.3" + "@schematics/angular" "17.2.3" "@yarnpkg/lockfile" "1.1.0" ansi-colors "4.1.3" ini "4.1.1" @@ -2303,10 +2303,10 @@ dependencies: tslib "^2.3.0" -"@ngtools/webpack@17.2.2": - version "17.2.2" - resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-17.2.2.tgz#e755e35c2e3c887227ecebc1c33d290f3f7b042f" - integrity sha512-HgvClGO6WVq4VA5d0ZvlDG5hrj8lQzRH99Gt87URm7G8E5XkatysdOsMqUQsJz+OwFWhP4PvTRWVblpBDiDl/A== +"@ngtools/webpack@17.2.3": + version "17.2.3" + resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-17.2.3.tgz#d1e06039407487dfcca1f136ca036c1f4c6eba40" + integrity sha512-+d5Q7/ctDHePYZXcg0GFwL/AbyEkPMHoCiT7pmLI0B0n87D/mYKK/qmVN1VANBrFLTuIe8RtcL0aJ9pw8HAxWA== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -2578,13 +2578,13 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.5.tgz#10491ccf4f63c814d4149e0316541476ea603602" integrity sha512-1q+mykKE3Vot1kaFJIDoUFv5TuW+QQVaf2FmTT9krg86pQrGStOSJJ0Zil7CFagyxDuouTepzt5Y5TVzyajOdQ== -"@schematics/angular@17.2.2": - version "17.2.2" - resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-17.2.2.tgz#32551e5ab958e41c672fd62ca508c562c7306f12" - integrity sha512-Q3VAQ/S4gj8D1JPWgWG4enDdDZUu8mUXWVRG1rOi4sHgOF5zgPieQFp3LXqMUgOncmzbXrctkbO6NKc4N2FAag== +"@schematics/angular@17.2.3": + version "17.2.3" + resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-17.2.3.tgz#0e618017da1139ec921071019ba0c0e13446a996" + integrity sha512-rXsYmWC1a8uvGTC6RwICwg1GLLQlTw8jOSqHf6T2AFMzP4p1FV3/GFSGyPIMl9yPwn6JqbmfQy3Bvj0stQNM0Q== dependencies: - "@angular-devkit/core" "17.2.2" - "@angular-devkit/schematics" "17.2.2" + "@angular-devkit/core" "17.2.3" + "@angular-devkit/schematics" "17.2.3" jsonc-parser "3.2.1" "@sigstore/bundle@^2.1.1": From 0102d9a26cd78b8e9f19880a9cfc781c07bf5a8d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Mar 2024 11:13:18 +0000 Subject: [PATCH 57/63] build(deps): bump the angular group with 11 updates Bumps the angular group with 11 updates: | Package | From | To | | --- | --- | --- | | [@angular/animations](https://github.com/angular/angular/tree/HEAD/packages/animations) | `17.2.3` | `17.2.4` | | [@angular/common](https://github.com/angular/angular/tree/HEAD/packages/common) | `17.2.3` | `17.2.4` | | [@angular/compiler](https://github.com/angular/angular/tree/HEAD/packages/compiler) | `17.2.3` | `17.2.4` | | [@angular/core](https://github.com/angular/angular/tree/HEAD/packages/core) | `17.2.3` | `17.2.4` | | [@angular/forms](https://github.com/angular/angular/tree/HEAD/packages/forms) | `17.2.3` | `17.2.4` | | [@angular/localize](https://github.com/angular/angular) | `17.2.3` | `17.2.4` | | [@angular/platform-browser](https://github.com/angular/angular/tree/HEAD/packages/platform-browser) | `17.2.3` | `17.2.4` | | [@angular/platform-browser-dynamic](https://github.com/angular/angular/tree/HEAD/packages/platform-browser-dynamic) | `17.2.3` | `17.2.4` | | [@angular/platform-server](https://github.com/angular/angular/tree/HEAD/packages/platform-server) | `17.2.3` | `17.2.4` | | [@angular/router](https://github.com/angular/angular/tree/HEAD/packages/router) | `17.2.3` | `17.2.4` | | [@angular/compiler-cli](https://github.com/angular/angular/tree/HEAD/packages/compiler-cli) | `17.2.3` | `17.2.4` | Updates `@angular/animations` from 17.2.3 to 17.2.4 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.4/packages/animations) Updates `@angular/common` from 17.2.3 to 17.2.4 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.4/packages/common) Updates `@angular/compiler` from 17.2.3 to 17.2.4 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.4/packages/compiler) Updates `@angular/core` from 17.2.3 to 17.2.4 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.4/packages/core) Updates `@angular/forms` from 17.2.3 to 17.2.4 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.4/packages/forms) Updates `@angular/localize` from 17.2.3 to 17.2.4 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/compare/17.2.3...17.2.4) Updates `@angular/platform-browser` from 17.2.3 to 17.2.4 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.4/packages/platform-browser) Updates `@angular/platform-browser-dynamic` from 17.2.3 to 17.2.4 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.4/packages/platform-browser-dynamic) Updates `@angular/platform-server` from 17.2.3 to 17.2.4 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.4/packages/platform-server) Updates `@angular/router` from 17.2.3 to 17.2.4 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.4/packages/router) Updates `@angular/compiler-cli` from 17.2.3 to 17.2.4 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.2.4/packages/compiler-cli) --- updated-dependencies: - dependency-name: "@angular/animations" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/common" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/compiler" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/core" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/forms" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/localize" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/platform-browser" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/platform-browser-dynamic" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/platform-server" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/router" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/compiler-cli" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: angular ... Signed-off-by: dependabot[bot] --- package.json | 22 ++++++------- yarn.lock | 88 ++++++++++++++++++++++++++-------------------------- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/package.json b/package.json index ddfccc7299..4a259d9f56 100644 --- a/package.json +++ b/package.json @@ -82,16 +82,16 @@ "deploy:ci": "ng deploy --no-build --message=\"Release $npm_package_name (v$npm_package_version) on gh-pages\"" }, "dependencies": { - "@angular/animations": "^17.2.3", - "@angular/common": "^17.2.3", - "@angular/compiler": "^17.2.3", - "@angular/core": "^17.2.3", - "@angular/forms": "^17.2.3", - "@angular/localize": "^17.2.3", - "@angular/platform-browser": "^17.2.3", - "@angular/platform-browser-dynamic": "^17.2.3", - "@angular/platform-server": "^17.2.3", - "@angular/router": "^17.2.3", + "@angular/animations": "^17.2.4", + "@angular/common": "^17.2.4", + "@angular/compiler": "^17.2.4", + "@angular/core": "^17.2.4", + "@angular/forms": "^17.2.4", + "@angular/localize": "^17.2.4", + "@angular/platform-browser": "^17.2.4", + "@angular/platform-browser-dynamic": "^17.2.4", + "@angular/platform-server": "^17.2.4", + "@angular/router": "^17.2.4", "@codemirror/legacy-modes": "^6.3.3", "@fortawesome/angular-fontawesome": "^0.14.1", "@fortawesome/fontawesome-svg-core": "^6.5.1", @@ -124,7 +124,7 @@ "@angular-eslint/schematics": "^17.2.1", "@angular-eslint/template-parser": "^17.2.1", "@angular/cli": "^17.2.3", - "@angular/compiler-cli": "^17.2.3", + "@angular/compiler-cli": "^17.2.4", "@commitlint/cli": "^19.0.3", "@commitlint/config-angular": "^19.0.3", "@compodoc/compodoc": "^1.1.23", diff --git a/yarn.lock b/yarn.lock index dd3f13de76..8876048cb0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -214,10 +214,10 @@ "@angular-eslint/bundled-angular-compiler" "17.2.1" "@typescript-eslint/utils" "6.19.0" -"@angular/animations@^17.2.3": - version "17.2.3" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-17.2.3.tgz#1caa126e73b9469008affa017ecd50a3df0741f1" - integrity sha512-eQcN6hC/dXISEYC/TjRuQJgfdZieBROBlXrS+BxRbsy9T4/QeKxChC3yiNxTmdxl5mvjLKvQTXHR8X0AWc07/Q== +"@angular/animations@^17.2.4": + version "17.2.4" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-17.2.4.tgz#d1c7d74b1bc360ba853c299a8db70d1a9517bf1c" + integrity sha512-eTjD8XeioL1Xj+W6iQayOh2JBCfjkg+MG3wzyEW0jhetE/N+wm2xbI1aub2pYplKsu96hOih3lfowYt7qIKGfw== dependencies: tslib "^2.3.0" @@ -245,17 +245,17 @@ symbol-observable "4.0.0" yargs "17.7.2" -"@angular/common@^17.2.3": - version "17.2.3" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-17.2.3.tgz#abb7b3435a338f08745f6bb52586f6db68a9a563" - integrity sha512-XR3rWS4W7/+RknyJMUUo9E81mSeyUznpclqTZ+Hy7+i4Naeso0qcRaIyr6JJmB5UGvlnfT1MlH9Fj78Dc80NEw== +"@angular/common@^17.2.4": + version "17.2.4" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-17.2.4.tgz#d56054b499fc9bbc9350df668111b1680c09b1fa" + integrity sha512-ymzDHZPQWpBKVQ7lPZucU+vBSb70Re6y5TKzkOX7oYE8Z1+tiNGLvfmzGsO2/N0lvwyZWXjkdXYEDON2hIlZ1Q== dependencies: tslib "^2.3.0" -"@angular/compiler-cli@^17.2.3": - version "17.2.3" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-17.2.3.tgz#bcfe2e2fcb3cb64cd85ee14bb86369e4092d30b4" - integrity sha512-mATybangypneXwO270VQeIw3N0avzc2Lpvdb8nm9WZYj23AcTUzpUUKOn63HtJdwMT5J2GjkyZFSRXisiPmpkA== +"@angular/compiler-cli@^17.2.4": + version "17.2.4" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-17.2.4.tgz#2aa9366974723a428530fdfd29ecfa5cdfad1839" + integrity sha512-VGQx1YoYuifQZNj2/nGMEyYVYvXSWrt1ZXK43dgxPDH3jCWNncOBUYtmyCmYvxKvDz0aDO3KL8cro8c4+N0pPw== dependencies: "@babel/core" "7.23.9" "@jridgewell/sourcemap-codec" "^1.4.14" @@ -266,63 +266,63 @@ tslib "^2.3.0" yargs "^17.2.1" -"@angular/compiler@^17.2.3": - version "17.2.3" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-17.2.3.tgz#9cf35dd1bb49edcdf4f854cb459c630efc126698" - integrity sha512-U2okLZ+4ipD5zTv32pMp+RsrM3kkP0XneSsIMPRpYZZfKgfnGLIwkRx6FoVoBwByugng6lBG/PiIe8DhRU/HFg== +"@angular/compiler@^17.2.4": + version "17.2.4" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-17.2.4.tgz#82fb29e80096b1fb3f6fd4d4f2c22fdbc0bb9a9b" + integrity sha512-McSsBcoHhMkaQpHM5/wTosAKTzJY5uE6ji3z+ec5GrIJhV7jrVfa67+RUoUzHe+rlD/7oQbX1L/OaHKDP8+/mA== dependencies: tslib "^2.3.0" -"@angular/core@^17.2.3": - version "17.2.3" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-17.2.3.tgz#e4e05f4d12b40178f67831e9cdca3c3aeeaf4cc3" - integrity sha512-DU+RdUB4E4I489R2P2hOrgkCDJNXlVaTzYixpgeDnuldCIYM0MatEzjor9DYNL3EDCayHF+M4HlVOcn6T/IVPQ== +"@angular/core@^17.2.4": + version "17.2.4" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-17.2.4.tgz#46600cbc399e150ed6332db48d8c4b644789169f" + integrity sha512-5Bko+vk7H1Ce57MHuRcpZtq2Srq5euufSvwg0piPozp0yYmCqNoYN7c128kgi6PbiPQeAnKRzRbEuYd1YCU4Tw== dependencies: tslib "^2.3.0" -"@angular/forms@^17.2.3": - version "17.2.3" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-17.2.3.tgz#caa45536ea99f2ea8c0580e262c8b829bd068a9c" - integrity sha512-v+/6pimht808F5XpmVTNV4/109s+A7m3nadQP97qvIDsrtwrPPZR7cST+DRioG2C41VwtjXM0HVbIon/3ydo6A== +"@angular/forms@^17.2.4": + version "17.2.4" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-17.2.4.tgz#0ec0d0e5e53659162397b631240786c681438234" + integrity sha512-flubCxK6Rc1YmAu23+o+NwqaIWbJ4MIYij05b1GlpRKB5GRX6M0fOl7uRHZmA6dC4xZGt/MUklRqb71T7dJ5JQ== dependencies: tslib "^2.3.0" -"@angular/localize@^17.2.3": - version "17.2.3" - resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-17.2.3.tgz#99e38dd2d5cf2bb474a44c5e08783f2432e206c3" - integrity sha512-RCReeQabENpWNzhF/jZMhiMCbGt78lb5mgiMNvbGet62IHR62q3Qu1bXprjJvgGIHsxQlM4pkGgMGTZ/8/my4A== +"@angular/localize@^17.2.4": + version "17.2.4" + resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-17.2.4.tgz#adb03882d1dc0d1bf54c3c04d5be9bc4ddd511a3" + integrity sha512-l6qZzP7f0fH6bCufyrhlUD6n7ggfTEaerIZW/jw0mnXFqVsHVfXX2jWHKljaZJWT3vhDp312i8xAukoAPM0uSQ== dependencies: "@babel/core" "7.23.9" "@types/babel__core" "7.20.5" fast-glob "3.3.2" yargs "^17.2.1" -"@angular/platform-browser-dynamic@^17.2.3": - version "17.2.3" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-17.2.3.tgz#6e8a8e5b68ed2d94dcc09c446bc5f0ebfe56d814" - integrity sha512-K8CsHbmG2nvV1jrNN9PYxyA0zJNoIWp+qf2udvPhG8rJ+Pyw61qmptrarpQUUkr8ONOtjwtOsnKa9/w+15nExw== +"@angular/platform-browser-dynamic@^17.2.4": + version "17.2.4" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-17.2.4.tgz#c28d405c812d39ce885a4cd65909457741ac062d" + integrity sha512-tNS6WexBbdks4uiB0JfPjUG2/rJ/5wuWr9C11CIgsMo+Onbw49imwDQQTxsx1A3misVb72mUufRza9DcxfSBxg== dependencies: tslib "^2.3.0" -"@angular/platform-browser@^17.2.3": - version "17.2.3" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-17.2.3.tgz#6079b1991628a25e58ea6825e8dc560bc27d5cac" - integrity sha512-bFi+H8avyCjwSBy+zpOKmqx852MRH8fkuZa4XgwKCPJRay8BfSCjHdtIo3eokUNPMu9JsyXM7HYKIfzLu5y6LA== +"@angular/platform-browser@^17.2.4": + version "17.2.4" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-17.2.4.tgz#06733dbbd49c3b28f77be142dc6b0dbb7be07638" + integrity sha512-A1jkx4ApIx76VDxm8UZLKEq+gwpKZb4qjzCTBDfjOpXB0MJQ5IaYdCrV0E/vPCKZhIfjbEHK+9H1vHRYDCcXtA== dependencies: tslib "^2.3.0" -"@angular/platform-server@^17.2.3": - version "17.2.3" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-17.2.3.tgz#8b9777e8276b12dee78192f1ab5677a88611b0e7" - integrity sha512-RUzyNyx9TTkfJ5HZhifOhQG6b9B3JH+OiB+RgwOb0lHHYHrhg8vKlBEueVmqkMwk6odd7gTcyVJDmKXpwfGgpg== +"@angular/platform-server@^17.2.4": + version "17.2.4" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-17.2.4.tgz#650a233aea951d168faf6eb8b26c37e316f19045" + integrity sha512-xTo7CY0CGKAv9Eqb9N0fVRxRCB70tgh4EXVbnB0sJamv3PibxmXl5xHSkxREZ5ZZfTkQmt+tSgMz0qtghAvlrw== dependencies: tslib "^2.3.0" xhr2 "^0.2.0" -"@angular/router@^17.2.3": - version "17.2.3" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-17.2.3.tgz#03fa1fac44518a709941559986e6009f4b2b7678" - integrity sha512-8UPjMzI98xZ6cDNm0MzHd9hFq6aOQJGmgxKDUPIG2h74glRwwbiewpo5hPo2EGIF8BLvQmmAm9ytr5zesHu0cg== +"@angular/router@^17.2.4": + version "17.2.4" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-17.2.4.tgz#b376d14d2022cdea86172f2013884af5ee7a8f54" + integrity sha512-HnEq6OtyXVJx24Vps0N2GsdvynQ8Mv6twjGmhBlo3x/19ay0WEHdHdsayOSKFvxXg9LCLPnSDYlmpk074IsgqA== dependencies: tslib "^2.3.0" From e60038453297fa6a43f13c210df2bd891bd67018 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Mar 2024 11:27:58 +0000 Subject: [PATCH 58/63] build(deps-dev): bump eslint-plugin-jsdoc from 48.2.0 to 48.2.1 Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 48.2.0 to 48.2.1. - [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases) - [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc) - [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v48.2.0...v48.2.1) --- updated-dependencies: - dependency-name: eslint-plugin-jsdoc dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 4a259d9f56..b16f819756 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "eslint-plugin-angular": "^4.1.0", "eslint-plugin-deprecation": "^2.0.0", "eslint-plugin-import": "^2.29.1", - "eslint-plugin-jsdoc": "^48.2.0", + "eslint-plugin-jsdoc": "^48.2.1", "eslint-plugin-prettier": "^5.1.3", "gzipper": "^7.2.0", "husky": "^9.0.11", diff --git a/yarn.lock b/yarn.lock index 8876048cb0..6b56f7e8e3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5990,10 +5990,10 @@ eslint-plugin-import@^2.29.1: semver "^6.3.1" tsconfig-paths "^3.15.0" -eslint-plugin-jsdoc@^48.2.0: - version "48.2.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.2.0.tgz#a726fbd6fa286fad8fc14f0a6aca48488d188d95" - integrity sha512-O2B1XLBJnUCRkggFzUQ+PBYJDit8iAgXdlu8ucolqGrbmOWPvttZQZX8d1sC0MbqDMSLs8SHSQxaNPRY1RQREg== +eslint-plugin-jsdoc@^48.2.1: + version "48.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.2.1.tgz#9334a05555a95fdc192980627142177963b668b4" + integrity sha512-iUvbcyDZSO/9xSuRv2HQBw++8VkV/pt3UWtX9cpPH0l7GKPq78QC/6+PmyQHHvNZaTjAce6QVciEbnc6J/zH5g== dependencies: "@es-joy/jsdoccomment" "~0.42.0" are-docs-informative "^0.0.2" From cc4b95bbfb18be72920237a4fb6c77f5ffdfc405 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Thu, 7 Mar 2024 14:30:14 +0100 Subject: [PATCH 59/63] test(edition): fix tests in FolioService --- .../folio.service.spec.ts | 34 ++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts index 32486a68dd..8cd38d7ab1 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-detail/edition-sheets/edition-convolute/edition-folio-viewer/folio.service.spec.ts @@ -647,8 +647,34 @@ describe('FolioService (DONE)', () => { svgSheetGroup.remove(); }); - describe('... should not append anything and log an error if', () => { - it('... content.sections are not given in folioCalculation model', () => { + describe('... should not append anything if', () => { + it('... contentSegments array is empty', () => { + const emptySvgSheetGroup = D3_SELECTION.create('g'); + + const emptyFolioSvgData = new FolioSvgData( + new FolioCalculation(expectedFolioSettings, expectedReversedFolio, 0) + ); + emptyFolioSvgData.contentSegments = []; + + (folioService as any)._addFolioContentSegmentsToSvgCanvas(emptySvgSheetGroup, emptyFolioSvgData); + + expectToBe(emptySvgSheetGroup.selectAll('g.content-segment-group').size(), 0); + }); + + it('... contentSegments array contains null or undefined', () => { + const emptySvgSheetGroup = D3_SELECTION.create('g'); + + const emptyFolioSvgData = new FolioSvgData( + new FolioCalculation(expectedFolioSettings, expectedReversedFolio, 0) + ); + emptyFolioSvgData.contentSegments = [null, undefined]; + + (folioService as any)._addFolioContentSegmentsToSvgCanvas(emptySvgSheetGroup, emptyFolioSvgData); + + expectToBe(emptySvgSheetGroup.selectAll('g.content-segment-group').size(), 0); + }); + + it('... content.sections are not given in folioCalculation model (with log error)', () => { const emptySvgSheetGroup = D3_SELECTION.create('g'); expectedReversedFolio.content[0].sections = undefined; @@ -664,7 +690,7 @@ describe('FolioService (DONE)', () => { expectToBe(mockConsole.get(0), 'No sections array in content'); }); - it('... content.sections length is greater than sectionPartition in folioCalculation model', () => { + it('... content.sections length is greater than sectionPartition in folioCalculation model (with log error)', () => { const emptySvgSheetGroup = D3_SELECTION.create('g'); const sections = expectedReversedFolio.content[0].sections; @@ -683,7 +709,7 @@ describe('FolioService (DONE)', () => { expectToBe(mockConsole.get(0), 'Sections array is bigger than sectionPartition'); }); - it('... number of systems is not given in folioCalculation model', () => { + it('... number of systems is not given in folioCalculation model (with log error)', () => { const emptySvgSheetGroup = D3_SELECTION.create('g'); expectedReversedFolio.systems = ''; From 80ac3a2185a4bd3e720a4df97213fa8361acdc6f Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Thu, 7 Mar 2024 14:33:55 +0100 Subject: [PATCH 60/63] test(edition): fix tests for EditionComplexComponent --- .../edition-complex.component.spec.ts | 183 ++++++++++++++++-- .../models/edition-complex.model.ts | 6 +- 2 files changed, 171 insertions(+), 18 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-complex/edition-complex.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-complex/edition-complex.component.spec.ts index 0d994f2cf8..cc90bc1e25 100644 --- a/src/app/views/edition-view/edition-outlets/edition-complex/edition-complex.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-complex/edition-complex.component.spec.ts @@ -10,7 +10,11 @@ import { expectSpyCall } from '@testing/expect-helper'; import { ActivatedRouteStub } from '@testing/router-stubs'; import { EDITION_COMPLEXES } from '@awg-views/edition-view/data'; -import { EDITION_ROUTE_CONSTANTS } from '@awg-views/edition-view/edition-route-constants'; +import { + EDITION_CATALOGUE_TYPE_CONSTANTS, + EDITION_ROUTE_CONSTANTS, + EDITION_TYPE_CONSTANTS, +} from '@awg-views/edition-view/edition-route-constants'; import { EditionComplex } from '@awg-views/edition-view/models'; import { EditionService } from '@awg-views/edition-view/services'; @@ -31,8 +35,9 @@ describe('EditionComplexComponent (DONE)', () => { let editionServiceUpdateEditionComplexSpy: Spy; let editionServiceClearEditionComplexSpy: Spy; + let expectedEditionComplexes: typeof EDITION_COMPLEXES; let expectedSelectedEditionComplex: EditionComplex; - let expectedSelectedEditionComplexId = 'OP12'; + let expectedSelectedEditionComplexId: string; const expectedEditionRouteConstants: typeof EDITION_ROUTE_CONSTANTS = EDITION_ROUTE_CONSTANTS; beforeEach(async () => { @@ -65,7 +70,9 @@ describe('EditionComplexComponent (DONE)', () => { compDe = fixture.debugElement; // TestData - expectedSelectedEditionComplex = EDITION_COMPLEXES.OP12; + expectedEditionComplexes = EDITION_COMPLEXES; + expectedSelectedEditionComplex = expectedEditionComplexes.OP12; + expectedSelectedEditionComplexId = 'OP12'; // Spies on component functions // `.and.callThrough` will track the spy down the nested describes, see @@ -124,14 +131,14 @@ describe('EditionComplexComponent (DONE)', () => { expectSpyCall( editionServiceUpdateEditionComplexSpy, 1, - EDITION_COMPLEXES[expectedSelectedEditionComplexId] + expectedEditionComplexes[expectedSelectedEditionComplexId] ); }); it('... should get correct id from router', () => { // Call with op. 12 (default) expectSpyCall(getEditionComplexFromRouteSpy, 1); - expectSpyCall(editionServiceUpdateEditionComplexSpy, 1, EDITION_COMPLEXES.OP12); + expectSpyCall(editionServiceUpdateEditionComplexSpy, 1, expectedEditionComplexes.OP12); // ---------------- // Change to op. 25 @@ -141,7 +148,7 @@ describe('EditionComplexComponent (DONE)', () => { fixture.detectChanges(); expectSpyCall(getEditionComplexFromRouteSpy, 1); - expectSpyCall(editionServiceUpdateEditionComplexSpy, 2, EDITION_COMPLEXES.OP25); + expectSpyCall(editionServiceUpdateEditionComplexSpy, 2, expectedEditionComplexes.OP25); // ------------------ // Change to non-existing id @@ -151,7 +158,7 @@ describe('EditionComplexComponent (DONE)', () => { fixture.detectChanges(); expectSpyCall(getEditionComplexFromRouteSpy, 1); - expectSpyCall(editionServiceUpdateEditionComplexSpy, 3, EDITION_COMPLEXES['fail']); + expectSpyCall(editionServiceUpdateEditionComplexSpy, 3, expectedEditionComplexes['fail']); // ------------------ // Change to empty id @@ -161,7 +168,7 @@ describe('EditionComplexComponent (DONE)', () => { fixture.detectChanges(); expectSpyCall(getEditionComplexFromRouteSpy, 1); - expectSpyCall(editionServiceUpdateEditionComplexSpy, 4, EDITION_COMPLEXES['']); + expectSpyCall(editionServiceUpdateEditionComplexSpy, 4, expectedEditionComplexes['']); // ---------------------- // Change to another key @@ -171,7 +178,7 @@ describe('EditionComplexComponent (DONE)', () => { fixture.detectChanges(); expectSpyCall(getEditionComplexFromRouteSpy, 1); - expectSpyCall(editionServiceUpdateEditionComplexSpy, 5, EDITION_COMPLEXES['']); + expectSpyCall(editionServiceUpdateEditionComplexSpy, 5, expectedEditionComplexes['']); }); it('... should have updated selectedEditionComplex$ (via EditionService)', () => { @@ -179,7 +186,7 @@ describe('EditionComplexComponent (DONE)', () => { expectSpyCall( editionServiceUpdateEditionComplexSpy, 1, - EDITION_COMPLEXES[expectedSelectedEditionComplexId] + expectedEditionComplexes[expectedSelectedEditionComplexId] ); }); @@ -188,7 +195,7 @@ describe('EditionComplexComponent (DONE)', () => { expectSpyCall( editionServiceUpdateEditionComplexSpy, 1, - EDITION_COMPLEXES[expectedSelectedEditionComplexId] + expectedEditionComplexes[expectedSelectedEditionComplexId] ); expectSpyCall(editionServiceGetEditionComplexSpy, 1); @@ -202,13 +209,13 @@ describe('EditionComplexComponent (DONE)', () => { expectSpyCall( editionServiceUpdateEditionComplexSpy, 1, - EDITION_COMPLEXES[expectedSelectedEditionComplexId] + expectedEditionComplexes[expectedSelectedEditionComplexId] ); expectSpyCall(editionServiceGetEditionComplexSpy, 1); // ---------------- // Change to op. 25 - expectedSelectedEditionComplexId = 'OP25'; + expectedSelectedEditionComplexId = 'op25'; mockActivatedRoute.testParamMap = { complexId: expectedSelectedEditionComplexId }; // Apply changes @@ -218,12 +225,160 @@ describe('EditionComplexComponent (DONE)', () => { expectSpyCall( editionServiceUpdateEditionComplexSpy, 2, - EDITION_COMPLEXES[expectedSelectedEditionComplexId] + expectedEditionComplexes[expectedSelectedEditionComplexId] ); expectSpyCall(editionServiceGetEditionComplexSpy, 2); expect(component.selectedEditionComplex$).toBeDefined(); }); + + it('... should get an edition complex with opus number from EditionService', () => { + const opusComplex = new EditionComplex( + { + title: 'Test Opus Complex', + catalogueType: EDITION_CATALOGUE_TYPE_CONSTANTS.OPUS, + catalogueNumber: '100', + }, + { + editors: [], + lastModified: '---', + }, + EDITION_ROUTE_CONSTANTS.SERIES_1, + EDITION_ROUTE_CONSTANTS.SECTION_5, + EDITION_TYPE_CONSTANTS.SKETCH_EDITION + ); + expectedSelectedEditionComplexId = 'op100'; + expectedEditionComplexes[expectedSelectedEditionComplexId.toUpperCase()] = opusComplex; + + mockActivatedRoute.testParamMap = { complexId: expectedSelectedEditionComplexId }; + editionServiceUpdateEditionComplexSpy.and.callThrough(); + + // Apply changes + fixture.detectChanges(); + + expectSpyCall(getEditionComplexFromRouteSpy, 1); + expectSpyCall(editionServiceUpdateEditionComplexSpy, 2, opusComplex); + expectSpyCall(editionServiceGetEditionComplexSpy, 2); + + expect(component.selectedEditionComplex$).toBeDefined(); + }); + + it('... should get an edition complex with M number from EditionService', () => { + const mnrComplex = new EditionComplex( + { + title: 'Test M Complex', + catalogueType: EDITION_CATALOGUE_TYPE_CONSTANTS.MNR, + catalogueNumber: '100', + }, + { + editors: [], + lastModified: '---', + }, + EDITION_ROUTE_CONSTANTS.SERIES_1, + EDITION_ROUTE_CONSTANTS.SECTION_5, + EDITION_TYPE_CONSTANTS.SKETCH_EDITION + ); + expectedSelectedEditionComplexId = 'm100'; + expectedEditionComplexes[expectedSelectedEditionComplexId.toUpperCase()] = mnrComplex; + + mockActivatedRoute.testParamMap = { complexId: expectedSelectedEditionComplexId }; + editionServiceUpdateEditionComplexSpy.and.callThrough(); + + // Apply changes + fixture.detectChanges(); + + expectSpyCall(getEditionComplexFromRouteSpy, 1); + expectSpyCall(editionServiceUpdateEditionComplexSpy, 2, mnrComplex); + expectSpyCall(editionServiceGetEditionComplexSpy, 2); + + expect(component.selectedEditionComplex$).toBeDefined(); + }); + + it('... should get an edition complex with M* number from EditionService', () => { + const mnrPlusComplex = new EditionComplex( + { + title: 'Test M* Complex', + catalogueType: EDITION_CATALOGUE_TYPE_CONSTANTS.MNR_PLUS, + catalogueNumber: '100', + }, + { + editors: [], + lastModified: '---', + }, + EDITION_ROUTE_CONSTANTS.SERIES_1, + EDITION_ROUTE_CONSTANTS.SECTION_5, + EDITION_TYPE_CONSTANTS.SKETCH_EDITION + ); + expectedSelectedEditionComplexId = 'mPlus100'; + expectedEditionComplexes[expectedSelectedEditionComplexId.toUpperCase()] = mnrPlusComplex; + + mockActivatedRoute.testParamMap = { complexId: expectedSelectedEditionComplexId }; + editionServiceUpdateEditionComplexSpy.and.callThrough(); + + // Apply changes + fixture.detectChanges(); + + expectSpyCall(getEditionComplexFromRouteSpy, 1); + expectSpyCall(editionServiceUpdateEditionComplexSpy, 2, mnrPlusComplex); + expectSpyCall(editionServiceGetEditionComplexSpy, 2); + + expect(component.selectedEditionComplex$).toBeDefined(); + }); + + it('... should get an edition complex with missing values from EditionService', () => { + const incompleteComplex = new EditionComplex( + { + title: 'Test Incomplete Complex', + catalogueType: EDITION_CATALOGUE_TYPE_CONSTANTS.OPUS, + catalogueNumber: '100', + }, + null, + null, + null, + null + ); + expectedSelectedEditionComplexId = 'op100'; + expectedEditionComplexes[expectedSelectedEditionComplexId.toUpperCase()] = incompleteComplex; + + mockActivatedRoute.testParamMap = { complexId: expectedSelectedEditionComplexId }; + editionServiceUpdateEditionComplexSpy.and.callThrough(); + + // Apply changes + fixture.detectChanges(); + + expectSpyCall(getEditionComplexFromRouteSpy, 1); + expectSpyCall(editionServiceUpdateEditionComplexSpy, 2, incompleteComplex); + expectSpyCall(editionServiceGetEditionComplexSpy, 2); + + expect(component.selectedEditionComplex$).toBeDefined(); + }); + + it('... should get an edition complex with missing titleStatement from EditionService', () => { + const incompleteComplex = new EditionComplex( + null, + { + editors: [], + lastModified: '---', + }, + EDITION_ROUTE_CONSTANTS.SERIES_1, + EDITION_ROUTE_CONSTANTS.SECTION_5, + EDITION_TYPE_CONSTANTS.SKETCH_EDITION + ); + expectedSelectedEditionComplexId = 'op100'; + expectedEditionComplexes[expectedSelectedEditionComplexId.toUpperCase()] = incompleteComplex; + + mockActivatedRoute.testParamMap = { complexId: expectedSelectedEditionComplexId }; + editionServiceUpdateEditionComplexSpy.and.callThrough(); + + // Apply changes + fixture.detectChanges(); + + expectSpyCall(getEditionComplexFromRouteSpy, 1); + expectSpyCall(editionServiceUpdateEditionComplexSpy, 2, incompleteComplex); + expectSpyCall(editionServiceGetEditionComplexSpy, 2); + + expect(component.selectedEditionComplex$).toBeDefined(); + }); }); describe('#ngOnDestroy()', () => { diff --git a/src/app/views/edition-view/models/edition-complex.model.ts b/src/app/views/edition-view/models/edition-complex.model.ts index 92f858192b..7c948e075c 100644 --- a/src/app/views/edition-view/models/edition-complex.model.ts +++ b/src/app/views/edition-view/models/edition-complex.model.ts @@ -117,7 +117,7 @@ export class EditionComplex { const spacer = ' '; // Set dynamic routes - this.titleStatement = titleStatement || new EditionTitleStatement(); + this.titleStatement = titleStatement; this.responsibilityStatement = responsibilityStatement || new EditionResponsibilityStatement(); this.complexId = new EditionRouteConstant(); @@ -138,9 +138,7 @@ export class EditionComplex { this.type = type || new EditionRouteConstant(); // Set base route - let rootPath = EDITION_ROUTE_CONSTANTS.EDITION.route; - rootPath += EDITION_ROUTE_CONSTANTS.COMPLEX.route; - + const rootPath = EDITION_ROUTE_CONSTANTS.EDITION.route + EDITION_ROUTE_CONSTANTS.COMPLEX.route; this.baseRoute = rootPath + this.complexId.route + delimiter; } } From 81ce5c8bba85b6a593a2ff284716c52e9ec914ce Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Thu, 7 Mar 2024 14:41:35 +0100 Subject: [PATCH 61/63] build(deps-dev): bump @types/node from 18.19.18 to 18.19.22 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b16f819756..50d6d72ec9 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "@compodoc/compodoc": "^1.1.23", "@types/d3": "^7.4.3", "@types/jasmine": "~5.1.4", - "@types/node": "^18.19.18", + "@types/node": "^18.19.22", "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "angular-cli-ghpages": "^1.0.7", diff --git a/yarn.lock b/yarn.lock index 6b56f7e8e3..f67ba0cb9a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3069,10 +3069,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.3.1.tgz#e8a83f1aa8b649377bb1fb5d7bac5cb90e784dfe" integrity sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg== -"@types/node@^18.19.18": - version "18.19.18" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.18.tgz#7526471b28828d1fef1f7e4960fb9477e6e4369c" - integrity sha512-80CP7B8y4PzZF0GWx15/gVWRrB5y/bIjNI84NK3cmQJu0WZwvmj2WMA5LcofQFVfLqqCSp545+U2LsrVzX36Zg== +"@types/node@^18.19.22": + version "18.19.22" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.22.tgz#f622f92514b897e6b09903e97c16a0db8e94689f" + integrity sha512-p3pDIfuMg/aXBmhkyanPshdfJuX5c5+bQjYLIikPLXAUycEogij/c50n/C+8XOA5L93cU4ZRXtn+dNQGi0IZqQ== dependencies: undici-types "~5.26.4" From 614e80520fbd34af52be1c25d83751ad780a6c78 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Thu, 7 Mar 2024 14:49:36 +0100 Subject: [PATCH 62/63] chore(release): 0.11.7 --- CHANGELOG.md | 83 ++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- src/app/app.globals.ts | 6 +-- 3 files changed, 87 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5889f70a6..eabecb0817 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,89 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [0.11.7](https://github.com/webern-unibas-ch/awg-app/compare/v0.11.6...v0.11.7) (2024-03-07) + + +### Features + +* **assets:** add files for M 22 ([d968bea](https://github.com/webern-unibas-ch/awg-app/commit/d968bea5b9d18355586ab12f4836c7aa6ddbe719)) +* **edition:** datafy writing material of source description ([7aa0937](https://github.com/webern-unibas-ch/awg-app/commit/7aa0937cd22570b8989e3d7285c77ca31d09a393)) + + +### Bug Fixes + +* **assets:** add firm signs for source B and D of m35/42 ([860609d](https://github.com/webern-unibas-ch/awg-app/commit/860609d5a211b12c30309629917e6d78afe3dbdd)) +* **assets:** fix convolute sigle for m34 Sk1.1 ([26b4f27](https://github.com/webern-unibas-ch/awg-app/commit/26b4f27621eec95222d6340b24b3644cc8907f49)) +* **assets:** fix folio info for firm signs in vol. II/2a ([df59bab](https://github.com/webern-unibas-ch/awg-app/commit/df59bab38903e33a046714f4344e82e8ba9f52d1)) +* **assets:** fix supplied class names ([c028516](https://github.com/webern-unibas-ch/awg-app/commit/c028516f6a3b64a987bab54874d7622e62a9c6cc)) +* **assets:** fix typo in Verlaufsskizze ([e2b37dd](https://github.com/webern-unibas-ch/awg-app/commit/e2b37ddfb4d532e83f286d78e8135256cfe6218b)) +* **assets:** optimize svgs with SVGO ([90bd051](https://github.com/webern-unibas-ch/awg-app/commit/90bd051aa9ecfbd4a38419741e07943ab85f210a)) +* **assets:** optimize svgs with SVGO ([5f3cffd](https://github.com/webern-unibas-ch/awg-app/commit/5f3cffd8d4eaceb45d0333c5e834a737150a1584)) +* **assets:** optimize svgs with SVGO ([5a99451](https://github.com/webern-unibas-ch/awg-app/commit/5a994515610d5618e4625e35e0765cd018951bb9)) +* **assets:** unify wording in sketch commentary ([7891b65](https://github.com/webern-unibas-ch/awg-app/commit/7891b65b834b75e9917385d36610620f56cfc3ad)) +* **assets:** update svg file for m35/42 Sk2 ([019f29d](https://github.com/webern-unibas-ch/awg-app/commit/019f29d6fdd47196671b11b215501665f30c2847)) +* **assets:** update svg files for m37 Sk1 & Sk2 ([7ce8314](https://github.com/webern-unibas-ch/awg-app/commit/7ce83147879609278d0874aa154b6f12fef65753)) +* **edition:** improve queryParams handling when loading SheetViewer ([3f333f0](https://github.com/webern-unibas-ch/awg-app/commit/3f333f054ebf135ea256ff6616959b52e632dc03)) +* **edition:** lint source description file ([37e49bd](https://github.com/webern-unibas-ch/awg-app/commit/37e49bdb0fba6153544dfca1b7f4917b75fd06aa)) +* **edition:** move folio viewer colors to folio service ([7385b98](https://github.com/webern-unibas-ch/awg-app/commit/7385b9855e11f4ceb2b04eb36c85874472d9f145)) +* **edition:** remove redundant mapping of firm signs ([8542df5](https://github.com/webern-unibas-ch/awg-app/commit/8542df51193e0b78956fe2dcc0263b40e0969c14)) +* **edition:** set fontFamily and fontSize correctly in FolioService ([2391f8a](https://github.com/webern-unibas-ch/awg-app/commit/2391f8a4f5e42f219171a643896903a79a99f23b)) +* **home:** fix wording on landing page ([8a6eb71](https://github.com/webern-unibas-ch/awg-app/commit/8a6eb719465e73c3e1d05da48ecc1ac1fe2fbdde)) + + +### Code Refactoring + +* **edition:** atomize FolioService for better readability ([74fc383](https://github.com/webern-unibas-ch/awg-app/commit/74fc38323b729b3afd67e39d5a677ab91a262c5f)) +* **edition:** move from Snap.js to D3.js for FolioViewer ([f301a79](https://github.com/webern-unibas-ch/awg-app/commit/f301a79133a11b70af65181b95399d9c85df8245)) +* **edition:** refactor FolioCalculationModel (finish) ([99e8350](https://github.com/webern-unibas-ch/awg-app/commit/99e8350edb2734eb7f1187f9bdf38b9601da17c3)) +* **edition:** refactor FolioCalculationModel (ongoing) ([c8b0222](https://github.com/webern-unibas-ch/awg-app/commit/c8b02224febbb3038e20851220e812760762c1c6)) +* **edition:** rename contentItem -> contentSegment ([aeab45c](https://github.com/webern-unibas-ch/awg-app/commit/aeab45c1817d74f0584329cc6940229bef3522b2)) +* **edition:** rename contentItem -> contentSegment (continued) ([0547141](https://github.com/webern-unibas-ch/awg-app/commit/0547141e0662f7814e1685df9803701a092304dc)) +* **edition:** rename systemArray ([b01689b](https://github.com/webern-unibas-ch/awg-app/commit/b01689bb696d0863c6679da0c0786e7c7ac7d5c2)) +* **edition:** rename writingMaterialString ([7735209](https://github.com/webern-unibas-ch/awg-app/commit/7735209d0346c85550e5aceb3232e799e1eb6040)) +* **edition:** use helper method for writing instruments ([1167e40](https://github.com/webern-unibas-ch/awg-app/commit/1167e4004c946c9e2e86c3812a5c225095459844)) + + +### Tests + +* **app:** adjust test syntax ([4b3bdab](https://github.com/webern-unibas-ch/awg-app/commit/4b3bdab8c13c7f833e9d60d95f92e08998cdb2f4)) +* **edition:** add more tests for FolioService ([3cd082f](https://github.com/webern-unibas-ch/awg-app/commit/3cd082f149e5da69cc950fb0ef489546db51587a)) +* **edition:** add tests for FolioService ([c2f0f60](https://github.com/webern-unibas-ch/awg-app/commit/c2f0f60c4624c57c1f102cb04f229714259314b7)) +* **edition:** add tests for FolioViewer Component ([9ef9ca0](https://github.com/webern-unibas-ch/awg-app/commit/9ef9ca0556a7dbbd0dd6eff3ea367b75a65bca52)) +* **edition:** adjust check for attributes lengths in FolioService ([7aad995](https://github.com/webern-unibas-ch/awg-app/commit/7aad9956d37a249f2d8fb0d328b80e87c3af060a)) +* **edition:** fix tests for edition sheets ([2f3a597](https://github.com/webern-unibas-ch/awg-app/commit/2f3a597b564c1efa65465acb2ae27ad7cb79494d)) +* **edition:** fix tests for EditionComplexComponent ([80ac3a2](https://github.com/webern-unibas-ch/awg-app/commit/80ac3a2185a4bd3e720a4df97213fa8361acdc6f)) +* **edition:** fix tests for writing material ([cf8c698](https://github.com/webern-unibas-ch/awg-app/commit/cf8c69891ba61df6e043a55c4887a7fa4ab699ae)) +* **edition:** fix tests in FolioService ([cc4b95b](https://github.com/webern-unibas-ch/awg-app/commit/cc4b95bbfb18be72920237a4fb6c77f5ffdfc405)) +* **edition:** unify syntax for test descriptions ([6c1376f](https://github.com/webern-unibas-ch/awg-app/commit/6c1376f34c9b327638e2c5c019bde6c1028c44c4)) + + +### Build System + +* **deps-dev:** bump @types/node from 18.19.14 to 18.19.18 ([051a648](https://github.com/webern-unibas-ch/awg-app/commit/051a648b2d7f8ebcc5e72391677bba5b4c2387b3)) +* **deps-dev:** bump @types/node from 18.19.18 to 18.19.22 ([81ce5c8](https://github.com/webern-unibas-ch/awg-app/commit/81ce5c8bba85b6a593a2ff284716c52e9ec914ce)) +* **deps-dev:** bump eslint from 8.56.0 to 8.57.0 ([74b5bb4](https://github.com/webern-unibas-ch/awg-app/commit/74b5bb47352a5d45aad7e0acdbea44135fbfcf0e)) +* **deps-dev:** bump eslint-plugin-jsdoc from 48.1.0 to 48.2.0 ([71e1c6b](https://github.com/webern-unibas-ch/awg-app/commit/71e1c6b72f0eb1696bb36f25ccf1409a374fa4b0)) +* **deps-dev:** bump eslint-plugin-jsdoc from 48.2.0 to 48.2.1 ([e600384](https://github.com/webern-unibas-ch/awg-app/commit/e60038453297fa6a43f13c210df2bd891bd67018)) +* **deps-dev:** bump karma from 6.4.2 to 6.4.3 ([eea00e8](https://github.com/webern-unibas-ch/awg-app/commit/eea00e8f8d68460599c3c2833bb8652d4f82d15c)) +* **deps-dev:** bump the angular-cli-devkit group with 2 updates ([6a65040](https://github.com/webern-unibas-ch/awg-app/commit/6a65040f011de2ef6915c84a33c85a12298f00e4)) +* **deps-dev:** bump the angular-cli-devkit group with 2 updates ([1e33b73](https://github.com/webern-unibas-ch/awg-app/commit/1e33b739daffbd2f1740dabd707d26a7198186cd)) +* **deps-dev:** bump the angular-cli-devkit group with 2 updates ([2a22c3a](https://github.com/webern-unibas-ch/awg-app/commit/2a22c3a1036f0ff6ee50b752cf7b54ac9813d56d)) +* **deps-dev:** bump the commitlint group with 2 updates ([cf29606](https://github.com/webern-unibas-ch/awg-app/commit/cf29606945626ef38faaf7e3278a5861562358bd)) +* **deps-dev:** bump the commitlint group with 2 updates ([46cb940](https://github.com/webern-unibas-ch/awg-app/commit/46cb94085f7d7d2a60f4236305f3a2dc346960ca)) +* **deps-dev:** bump the typescript-eslint group with 2 updates ([7ba70b0](https://github.com/webern-unibas-ch/awg-app/commit/7ba70b0e112813bd6bdf36663776d9dbb4f4ea97)) +* **deps-dev:** bump the typescript-eslint group with 2 updates ([15ee52e](https://github.com/webern-unibas-ch/awg-app/commit/15ee52e247db4fee9a782372790964b197008be0)) +* **deps-dev:** bump the typescript-eslint group with 2 updates ([af142e6](https://github.com/webern-unibas-ch/awg-app/commit/af142e6b925f32ef94f0bf799e1a61e6b31f8284)) +* **deps:** bump bootstrap from 5.3.2 to 5.3.3 ([2aad2a3](https://github.com/webern-unibas-ch/awg-app/commit/2aad2a3a0a42153318eca2b4726c3e70428d0224)) +* **deps:** bump codecov/codecov-action from 4.0.1 to 4.0.2 ([fa3a172](https://github.com/webern-unibas-ch/awg-app/commit/fa3a17261e31e0ad06e31ba48271e4959aa6ebdf)) +* **deps:** bump codecov/codecov-action from 4.0.2 to 4.1.0 ([40e903c](https://github.com/webern-unibas-ch/awg-app/commit/40e903ced5a9e3d99f83be612dcdbc740e467927)) +* **deps:** bump es5-ext from 0.10.62 to 0.10.63 ([c61dd6f](https://github.com/webern-unibas-ch/awg-app/commit/c61dd6f38cf5d6156cdb61e693516b9ec2467ed8)) +* **deps:** bump ip from 2.0.0 to 2.0.1 ([071fd28](https://github.com/webern-unibas-ch/awg-app/commit/071fd2822e78411473fb5c6c28c3d88aec299a55)) +* **deps:** bump rdfstore from v0.9.18-alpha.13 to v0.9.18-alpha.14 ([4690ab4](https://github.com/webern-unibas-ch/awg-app/commit/4690ab4667cc6579c995bc8d541b4c1ab38029fd)) +* **deps:** bump the angular group with 11 updates ([0102d9a](https://github.com/webern-unibas-ch/awg-app/commit/0102d9a26cd78b8e9f19880a9cfc781c07bf5a8d)) +* **deps:** bump the angular group with 11 updates ([c97e3dc](https://github.com/webern-unibas-ch/awg-app/commit/c97e3dc4a8654609b8b917e73afd799a53fdab03)) +* **deps:** bump the angular group with 11 updates ([493df86](https://github.com/webern-unibas-ch/awg-app/commit/493df86a981151d816392f1fe12edbb296ee9f52)) + ### [0.11.6](https://github.com/webern-unibas-ch/awg-app/compare/v0.11.5...v0.11.6) (2024-02-19) diff --git a/package.json b/package.json index 50d6d72ec9..372b60e35c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "awg-app", - "version": "0.11.6", + "version": "0.11.7", "license": "MIT", "author": { "name": "Stefan Münnich", diff --git a/src/app/app.globals.ts b/src/app/app.globals.ts index 83df2d87fa..17c81aaf56 100644 --- a/src/app/app.globals.ts +++ b/src/app/app.globals.ts @@ -1,15 +1,15 @@ // THIS IS AN AUTO-GENERATED FILE. DO NOT CHANGE IT MANUALLY! -// Generated last time on Mon, Feb 19, 2024 6:33:56 PM +// Generated last time on Thu, Mar 7, 2024 2:49:33 PM /** * The latest version of the AWG App */ -export const appVersion = '0.11.6'; +export const appVersion = '0.11.7'; /** * The release date of the latest version of the AWG App */ -export const appVersionReleaseDate = '19. Februar 2024'; +export const appVersionReleaseDate = '07. März 2024'; /** * The URL of the AWG App From 7e830b83d9734684369b9e5afe403e6415f09e28 Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Thu, 7 Mar 2024 14:58:24 +0100 Subject: [PATCH 63/63] docs(CHANGELOG): add credits to contributors --- CHANGELOG.md | 160 ++++++++++++++++++++++++--------------------------- 1 file changed, 75 insertions(+), 85 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eabecb0817..d382e71978 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,122 +4,112 @@ All notable changes to this project will be documented in this file. See [standa ### [0.11.7](https://github.com/webern-unibas-ch/awg-app/compare/v0.11.6...v0.11.7) (2024-03-07) - ### Features -* **assets:** add files for M 22 ([d968bea](https://github.com/webern-unibas-ch/awg-app/commit/d968bea5b9d18355586ab12f4836c7aa6ddbe719)) -* **edition:** datafy writing material of source description ([7aa0937](https://github.com/webern-unibas-ch/awg-app/commit/7aa0937cd22570b8989e3d7285c77ca31d09a393)) - +- **assets:** add files for M 22 ([d968bea](https://github.com/webern-unibas-ch/awg-app/commit/d968bea5b9d18355586ab12f4836c7aa6ddbe719); thanks to [@chael-mi](https://github.com/chael-mi)) +- **edition:** datafy writing material of source description ([7aa0937](https://github.com/webern-unibas-ch/awg-app/commit/7aa0937cd22570b8989e3d7285c77ca31d09a393)) ### Bug Fixes -* **assets:** add firm signs for source B and D of m35/42 ([860609d](https://github.com/webern-unibas-ch/awg-app/commit/860609d5a211b12c30309629917e6d78afe3dbdd)) -* **assets:** fix convolute sigle for m34 Sk1.1 ([26b4f27](https://github.com/webern-unibas-ch/awg-app/commit/26b4f27621eec95222d6340b24b3644cc8907f49)) -* **assets:** fix folio info for firm signs in vol. II/2a ([df59bab](https://github.com/webern-unibas-ch/awg-app/commit/df59bab38903e33a046714f4344e82e8ba9f52d1)) -* **assets:** fix supplied class names ([c028516](https://github.com/webern-unibas-ch/awg-app/commit/c028516f6a3b64a987bab54874d7622e62a9c6cc)) -* **assets:** fix typo in Verlaufsskizze ([e2b37dd](https://github.com/webern-unibas-ch/awg-app/commit/e2b37ddfb4d532e83f286d78e8135256cfe6218b)) -* **assets:** optimize svgs with SVGO ([90bd051](https://github.com/webern-unibas-ch/awg-app/commit/90bd051aa9ecfbd4a38419741e07943ab85f210a)) -* **assets:** optimize svgs with SVGO ([5f3cffd](https://github.com/webern-unibas-ch/awg-app/commit/5f3cffd8d4eaceb45d0333c5e834a737150a1584)) -* **assets:** optimize svgs with SVGO ([5a99451](https://github.com/webern-unibas-ch/awg-app/commit/5a994515610d5618e4625e35e0765cd018951bb9)) -* **assets:** unify wording in sketch commentary ([7891b65](https://github.com/webern-unibas-ch/awg-app/commit/7891b65b834b75e9917385d36610620f56cfc3ad)) -* **assets:** update svg file for m35/42 Sk2 ([019f29d](https://github.com/webern-unibas-ch/awg-app/commit/019f29d6fdd47196671b11b215501665f30c2847)) -* **assets:** update svg files for m37 Sk1 & Sk2 ([7ce8314](https://github.com/webern-unibas-ch/awg-app/commit/7ce83147879609278d0874aa154b6f12fef65753)) -* **edition:** improve queryParams handling when loading SheetViewer ([3f333f0](https://github.com/webern-unibas-ch/awg-app/commit/3f333f054ebf135ea256ff6616959b52e632dc03)) -* **edition:** lint source description file ([37e49bd](https://github.com/webern-unibas-ch/awg-app/commit/37e49bdb0fba6153544dfca1b7f4917b75fd06aa)) -* **edition:** move folio viewer colors to folio service ([7385b98](https://github.com/webern-unibas-ch/awg-app/commit/7385b9855e11f4ceb2b04eb36c85874472d9f145)) -* **edition:** remove redundant mapping of firm signs ([8542df5](https://github.com/webern-unibas-ch/awg-app/commit/8542df51193e0b78956fe2dcc0263b40e0969c14)) -* **edition:** set fontFamily and fontSize correctly in FolioService ([2391f8a](https://github.com/webern-unibas-ch/awg-app/commit/2391f8a4f5e42f219171a643896903a79a99f23b)) -* **home:** fix wording on landing page ([8a6eb71](https://github.com/webern-unibas-ch/awg-app/commit/8a6eb719465e73c3e1d05da48ecc1ac1fe2fbdde)) - +- **assets:** add firm signs for source B and D of m35/42 ([860609d](https://github.com/webern-unibas-ch/awg-app/commit/860609d5a211b12c30309629917e6d78afe3dbdd)) +- **assets:** fix convolute sigle for m34 Sk1.1 ([26b4f27](https://github.com/webern-unibas-ch/awg-app/commit/26b4f27621eec95222d6340b24b3644cc8907f49)) +- **assets:** fix folio info for firm signs in vol. II/2a ([df59bab](https://github.com/webern-unibas-ch/awg-app/commit/df59bab38903e33a046714f4344e82e8ba9f52d1)) +- **assets:** fix supplied class names ([c028516](https://github.com/webern-unibas-ch/awg-app/commit/c028516f6a3b64a987bab54874d7622e62a9c6cc)) +- **assets:** fix typo in Verlaufsskizze ([e2b37dd](https://github.com/webern-unibas-ch/awg-app/commit/e2b37ddfb4d532e83f286d78e8135256cfe6218b)) +- **assets:** optimize svgs with SVGO ([90bd051](https://github.com/webern-unibas-ch/awg-app/commit/90bd051aa9ecfbd4a38419741e07943ab85f210a)) +- **assets:** optimize svgs with SVGO ([5f3cffd](https://github.com/webern-unibas-ch/awg-app/commit/5f3cffd8d4eaceb45d0333c5e834a737150a1584)) +- **assets:** optimize svgs with SVGO ([5a99451](https://github.com/webern-unibas-ch/awg-app/commit/5a994515610d5618e4625e35e0765cd018951bb9)) +- **assets:** unify wording in sketch commentary ([7891b65](https://github.com/webern-unibas-ch/awg-app/commit/7891b65b834b75e9917385d36610620f56cfc3ad)) +- **assets:** update svg file for m35/42 Sk2 ([019f29d](https://github.com/webern-unibas-ch/awg-app/commit/019f29d6fdd47196671b11b215501665f30c2847)) +- **assets:** update svg files for m37 Sk1 & Sk2 ([7ce8314](https://github.com/webern-unibas-ch/awg-app/commit/7ce83147879609278d0874aa154b6f12fef65753)) +- **edition:** improve queryParams handling when loading SheetViewer ([3f333f0](https://github.com/webern-unibas-ch/awg-app/commit/3f333f054ebf135ea256ff6616959b52e632dc03)) +- **edition:** lint source description file ([37e49bd](https://github.com/webern-unibas-ch/awg-app/commit/37e49bdb0fba6153544dfca1b7f4917b75fd06aa)) +- **edition:** move folio viewer colors to folio service ([7385b98](https://github.com/webern-unibas-ch/awg-app/commit/7385b9855e11f4ceb2b04eb36c85874472d9f145)) +- **edition:** remove redundant mapping of firm signs ([8542df5](https://github.com/webern-unibas-ch/awg-app/commit/8542df51193e0b78956fe2dcc0263b40e0969c14)) +- **edition:** set fontFamily and fontSize correctly in FolioService ([2391f8a](https://github.com/webern-unibas-ch/awg-app/commit/2391f8a4f5e42f219171a643896903a79a99f23b)) +- **home:** fix wording on landing page ([8a6eb71](https://github.com/webern-unibas-ch/awg-app/commit/8a6eb719465e73c3e1d05da48ecc1ac1fe2fbdde)) ### Code Refactoring -* **edition:** atomize FolioService for better readability ([74fc383](https://github.com/webern-unibas-ch/awg-app/commit/74fc38323b729b3afd67e39d5a677ab91a262c5f)) -* **edition:** move from Snap.js to D3.js for FolioViewer ([f301a79](https://github.com/webern-unibas-ch/awg-app/commit/f301a79133a11b70af65181b95399d9c85df8245)) -* **edition:** refactor FolioCalculationModel (finish) ([99e8350](https://github.com/webern-unibas-ch/awg-app/commit/99e8350edb2734eb7f1187f9bdf38b9601da17c3)) -* **edition:** refactor FolioCalculationModel (ongoing) ([c8b0222](https://github.com/webern-unibas-ch/awg-app/commit/c8b02224febbb3038e20851220e812760762c1c6)) -* **edition:** rename contentItem -> contentSegment ([aeab45c](https://github.com/webern-unibas-ch/awg-app/commit/aeab45c1817d74f0584329cc6940229bef3522b2)) -* **edition:** rename contentItem -> contentSegment (continued) ([0547141](https://github.com/webern-unibas-ch/awg-app/commit/0547141e0662f7814e1685df9803701a092304dc)) -* **edition:** rename systemArray ([b01689b](https://github.com/webern-unibas-ch/awg-app/commit/b01689bb696d0863c6679da0c0786e7c7ac7d5c2)) -* **edition:** rename writingMaterialString ([7735209](https://github.com/webern-unibas-ch/awg-app/commit/7735209d0346c85550e5aceb3232e799e1eb6040)) -* **edition:** use helper method for writing instruments ([1167e40](https://github.com/webern-unibas-ch/awg-app/commit/1167e4004c946c9e2e86c3812a5c225095459844)) - +- **edition:** atomize FolioService for better readability ([74fc383](https://github.com/webern-unibas-ch/awg-app/commit/74fc38323b729b3afd67e39d5a677ab91a262c5f)) +- **edition:** move from Snap.js to D3.js for FolioViewer ([f301a79](https://github.com/webern-unibas-ch/awg-app/commit/f301a79133a11b70af65181b95399d9c85df8245)) +- **edition:** refactor FolioCalculationModel (finish) ([99e8350](https://github.com/webern-unibas-ch/awg-app/commit/99e8350edb2734eb7f1187f9bdf38b9601da17c3)) +- **edition:** refactor FolioCalculationModel (ongoing) ([c8b0222](https://github.com/webern-unibas-ch/awg-app/commit/c8b02224febbb3038e20851220e812760762c1c6)) +- **edition:** rename contentItem -> contentSegment ([aeab45c](https://github.com/webern-unibas-ch/awg-app/commit/aeab45c1817d74f0584329cc6940229bef3522b2)) +- **edition:** rename contentItem -> contentSegment (continued) ([0547141](https://github.com/webern-unibas-ch/awg-app/commit/0547141e0662f7814e1685df9803701a092304dc)) +- **edition:** rename systemArray ([b01689b](https://github.com/webern-unibas-ch/awg-app/commit/b01689bb696d0863c6679da0c0786e7c7ac7d5c2)) +- **edition:** rename writingMaterialString ([7735209](https://github.com/webern-unibas-ch/awg-app/commit/7735209d0346c85550e5aceb3232e799e1eb6040)) +- **edition:** use helper method for writing instruments ([1167e40](https://github.com/webern-unibas-ch/awg-app/commit/1167e4004c946c9e2e86c3812a5c225095459844)) ### Tests -* **app:** adjust test syntax ([4b3bdab](https://github.com/webern-unibas-ch/awg-app/commit/4b3bdab8c13c7f833e9d60d95f92e08998cdb2f4)) -* **edition:** add more tests for FolioService ([3cd082f](https://github.com/webern-unibas-ch/awg-app/commit/3cd082f149e5da69cc950fb0ef489546db51587a)) -* **edition:** add tests for FolioService ([c2f0f60](https://github.com/webern-unibas-ch/awg-app/commit/c2f0f60c4624c57c1f102cb04f229714259314b7)) -* **edition:** add tests for FolioViewer Component ([9ef9ca0](https://github.com/webern-unibas-ch/awg-app/commit/9ef9ca0556a7dbbd0dd6eff3ea367b75a65bca52)) -* **edition:** adjust check for attributes lengths in FolioService ([7aad995](https://github.com/webern-unibas-ch/awg-app/commit/7aad9956d37a249f2d8fb0d328b80e87c3af060a)) -* **edition:** fix tests for edition sheets ([2f3a597](https://github.com/webern-unibas-ch/awg-app/commit/2f3a597b564c1efa65465acb2ae27ad7cb79494d)) -* **edition:** fix tests for EditionComplexComponent ([80ac3a2](https://github.com/webern-unibas-ch/awg-app/commit/80ac3a2185a4bd3e720a4df97213fa8361acdc6f)) -* **edition:** fix tests for writing material ([cf8c698](https://github.com/webern-unibas-ch/awg-app/commit/cf8c69891ba61df6e043a55c4887a7fa4ab699ae)) -* **edition:** fix tests in FolioService ([cc4b95b](https://github.com/webern-unibas-ch/awg-app/commit/cc4b95bbfb18be72920237a4fb6c77f5ffdfc405)) -* **edition:** unify syntax for test descriptions ([6c1376f](https://github.com/webern-unibas-ch/awg-app/commit/6c1376f34c9b327638e2c5c019bde6c1028c44c4)) - +- **app:** adjust test syntax ([4b3bdab](https://github.com/webern-unibas-ch/awg-app/commit/4b3bdab8c13c7f833e9d60d95f92e08998cdb2f4)) +- **edition:** add more tests for FolioService ([3cd082f](https://github.com/webern-unibas-ch/awg-app/commit/3cd082f149e5da69cc950fb0ef489546db51587a)) +- **edition:** add tests for FolioService ([c2f0f60](https://github.com/webern-unibas-ch/awg-app/commit/c2f0f60c4624c57c1f102cb04f229714259314b7)) +- **edition:** add tests for FolioViewer Component ([9ef9ca0](https://github.com/webern-unibas-ch/awg-app/commit/9ef9ca0556a7dbbd0dd6eff3ea367b75a65bca52)) +- **edition:** adjust check for attributes lengths in FolioService ([7aad995](https://github.com/webern-unibas-ch/awg-app/commit/7aad9956d37a249f2d8fb0d328b80e87c3af060a)) +- **edition:** fix tests for edition sheets ([2f3a597](https://github.com/webern-unibas-ch/awg-app/commit/2f3a597b564c1efa65465acb2ae27ad7cb79494d)) +- **edition:** fix tests for EditionComplexComponent ([80ac3a2](https://github.com/webern-unibas-ch/awg-app/commit/80ac3a2185a4bd3e720a4df97213fa8361acdc6f)) +- **edition:** fix tests for writing material ([cf8c698](https://github.com/webern-unibas-ch/awg-app/commit/cf8c69891ba61df6e043a55c4887a7fa4ab699ae)) +- **edition:** fix tests in FolioService ([cc4b95b](https://github.com/webern-unibas-ch/awg-app/commit/cc4b95bbfb18be72920237a4fb6c77f5ffdfc405)) +- **edition:** unify syntax for test descriptions ([6c1376f](https://github.com/webern-unibas-ch/awg-app/commit/6c1376f34c9b327638e2c5c019bde6c1028c44c4)) ### Build System -* **deps-dev:** bump @types/node from 18.19.14 to 18.19.18 ([051a648](https://github.com/webern-unibas-ch/awg-app/commit/051a648b2d7f8ebcc5e72391677bba5b4c2387b3)) -* **deps-dev:** bump @types/node from 18.19.18 to 18.19.22 ([81ce5c8](https://github.com/webern-unibas-ch/awg-app/commit/81ce5c8bba85b6a593a2ff284716c52e9ec914ce)) -* **deps-dev:** bump eslint from 8.56.0 to 8.57.0 ([74b5bb4](https://github.com/webern-unibas-ch/awg-app/commit/74b5bb47352a5d45aad7e0acdbea44135fbfcf0e)) -* **deps-dev:** bump eslint-plugin-jsdoc from 48.1.0 to 48.2.0 ([71e1c6b](https://github.com/webern-unibas-ch/awg-app/commit/71e1c6b72f0eb1696bb36f25ccf1409a374fa4b0)) -* **deps-dev:** bump eslint-plugin-jsdoc from 48.2.0 to 48.2.1 ([e600384](https://github.com/webern-unibas-ch/awg-app/commit/e60038453297fa6a43f13c210df2bd891bd67018)) -* **deps-dev:** bump karma from 6.4.2 to 6.4.3 ([eea00e8](https://github.com/webern-unibas-ch/awg-app/commit/eea00e8f8d68460599c3c2833bb8652d4f82d15c)) -* **deps-dev:** bump the angular-cli-devkit group with 2 updates ([6a65040](https://github.com/webern-unibas-ch/awg-app/commit/6a65040f011de2ef6915c84a33c85a12298f00e4)) -* **deps-dev:** bump the angular-cli-devkit group with 2 updates ([1e33b73](https://github.com/webern-unibas-ch/awg-app/commit/1e33b739daffbd2f1740dabd707d26a7198186cd)) -* **deps-dev:** bump the angular-cli-devkit group with 2 updates ([2a22c3a](https://github.com/webern-unibas-ch/awg-app/commit/2a22c3a1036f0ff6ee50b752cf7b54ac9813d56d)) -* **deps-dev:** bump the commitlint group with 2 updates ([cf29606](https://github.com/webern-unibas-ch/awg-app/commit/cf29606945626ef38faaf7e3278a5861562358bd)) -* **deps-dev:** bump the commitlint group with 2 updates ([46cb940](https://github.com/webern-unibas-ch/awg-app/commit/46cb94085f7d7d2a60f4236305f3a2dc346960ca)) -* **deps-dev:** bump the typescript-eslint group with 2 updates ([7ba70b0](https://github.com/webern-unibas-ch/awg-app/commit/7ba70b0e112813bd6bdf36663776d9dbb4f4ea97)) -* **deps-dev:** bump the typescript-eslint group with 2 updates ([15ee52e](https://github.com/webern-unibas-ch/awg-app/commit/15ee52e247db4fee9a782372790964b197008be0)) -* **deps-dev:** bump the typescript-eslint group with 2 updates ([af142e6](https://github.com/webern-unibas-ch/awg-app/commit/af142e6b925f32ef94f0bf799e1a61e6b31f8284)) -* **deps:** bump bootstrap from 5.3.2 to 5.3.3 ([2aad2a3](https://github.com/webern-unibas-ch/awg-app/commit/2aad2a3a0a42153318eca2b4726c3e70428d0224)) -* **deps:** bump codecov/codecov-action from 4.0.1 to 4.0.2 ([fa3a172](https://github.com/webern-unibas-ch/awg-app/commit/fa3a17261e31e0ad06e31ba48271e4959aa6ebdf)) -* **deps:** bump codecov/codecov-action from 4.0.2 to 4.1.0 ([40e903c](https://github.com/webern-unibas-ch/awg-app/commit/40e903ced5a9e3d99f83be612dcdbc740e467927)) -* **deps:** bump es5-ext from 0.10.62 to 0.10.63 ([c61dd6f](https://github.com/webern-unibas-ch/awg-app/commit/c61dd6f38cf5d6156cdb61e693516b9ec2467ed8)) -* **deps:** bump ip from 2.0.0 to 2.0.1 ([071fd28](https://github.com/webern-unibas-ch/awg-app/commit/071fd2822e78411473fb5c6c28c3d88aec299a55)) -* **deps:** bump rdfstore from v0.9.18-alpha.13 to v0.9.18-alpha.14 ([4690ab4](https://github.com/webern-unibas-ch/awg-app/commit/4690ab4667cc6579c995bc8d541b4c1ab38029fd)) -* **deps:** bump the angular group with 11 updates ([0102d9a](https://github.com/webern-unibas-ch/awg-app/commit/0102d9a26cd78b8e9f19880a9cfc781c07bf5a8d)) -* **deps:** bump the angular group with 11 updates ([c97e3dc](https://github.com/webern-unibas-ch/awg-app/commit/c97e3dc4a8654609b8b917e73afd799a53fdab03)) -* **deps:** bump the angular group with 11 updates ([493df86](https://github.com/webern-unibas-ch/awg-app/commit/493df86a981151d816392f1fe12edbb296ee9f52)) +- **deps-dev:** bump @types/node from 18.19.14 to 18.19.18 ([051a648](https://github.com/webern-unibas-ch/awg-app/commit/051a648b2d7f8ebcc5e72391677bba5b4c2387b3)) +- **deps-dev:** bump @types/node from 18.19.18 to 18.19.22 ([81ce5c8](https://github.com/webern-unibas-ch/awg-app/commit/81ce5c8bba85b6a593a2ff284716c52e9ec914ce)) +- **deps-dev:** bump eslint from 8.56.0 to 8.57.0 ([74b5bb4](https://github.com/webern-unibas-ch/awg-app/commit/74b5bb47352a5d45aad7e0acdbea44135fbfcf0e)) +- **deps-dev:** bump eslint-plugin-jsdoc from 48.1.0 to 48.2.0 ([71e1c6b](https://github.com/webern-unibas-ch/awg-app/commit/71e1c6b72f0eb1696bb36f25ccf1409a374fa4b0)) +- **deps-dev:** bump eslint-plugin-jsdoc from 48.2.0 to 48.2.1 ([e600384](https://github.com/webern-unibas-ch/awg-app/commit/e60038453297fa6a43f13c210df2bd891bd67018)) +- **deps-dev:** bump karma from 6.4.2 to 6.4.3 ([eea00e8](https://github.com/webern-unibas-ch/awg-app/commit/eea00e8f8d68460599c3c2833bb8652d4f82d15c)) +- **deps-dev:** bump the angular-cli-devkit group with 2 updates ([6a65040](https://github.com/webern-unibas-ch/awg-app/commit/6a65040f011de2ef6915c84a33c85a12298f00e4)) +- **deps-dev:** bump the angular-cli-devkit group with 2 updates ([1e33b73](https://github.com/webern-unibas-ch/awg-app/commit/1e33b739daffbd2f1740dabd707d26a7198186cd)) +- **deps-dev:** bump the angular-cli-devkit group with 2 updates ([2a22c3a](https://github.com/webern-unibas-ch/awg-app/commit/2a22c3a1036f0ff6ee50b752cf7b54ac9813d56d)) +- **deps-dev:** bump the commitlint group with 2 updates ([cf29606](https://github.com/webern-unibas-ch/awg-app/commit/cf29606945626ef38faaf7e3278a5861562358bd)) +- **deps-dev:** bump the commitlint group with 2 updates ([46cb940](https://github.com/webern-unibas-ch/awg-app/commit/46cb94085f7d7d2a60f4236305f3a2dc346960ca)) +- **deps-dev:** bump the typescript-eslint group with 2 updates ([7ba70b0](https://github.com/webern-unibas-ch/awg-app/commit/7ba70b0e112813bd6bdf36663776d9dbb4f4ea97)) +- **deps-dev:** bump the typescript-eslint group with 2 updates ([15ee52e](https://github.com/webern-unibas-ch/awg-app/commit/15ee52e247db4fee9a782372790964b197008be0)) +- **deps-dev:** bump the typescript-eslint group with 2 updates ([af142e6](https://github.com/webern-unibas-ch/awg-app/commit/af142e6b925f32ef94f0bf799e1a61e6b31f8284)) +- **deps:** bump bootstrap from 5.3.2 to 5.3.3 ([2aad2a3](https://github.com/webern-unibas-ch/awg-app/commit/2aad2a3a0a42153318eca2b4726c3e70428d0224)) +- **deps:** bump codecov/codecov-action from 4.0.1 to 4.0.2 ([fa3a172](https://github.com/webern-unibas-ch/awg-app/commit/fa3a17261e31e0ad06e31ba48271e4959aa6ebdf)) +- **deps:** bump codecov/codecov-action from 4.0.2 to 4.1.0 ([40e903c](https://github.com/webern-unibas-ch/awg-app/commit/40e903ced5a9e3d99f83be612dcdbc740e467927)) +- **deps:** bump es5-ext from 0.10.62 to 0.10.63 ([c61dd6f](https://github.com/webern-unibas-ch/awg-app/commit/c61dd6f38cf5d6156cdb61e693516b9ec2467ed8)) +- **deps:** bump ip from 2.0.0 to 2.0.1 ([071fd28](https://github.com/webern-unibas-ch/awg-app/commit/071fd2822e78411473fb5c6c28c3d88aec299a55)) +- **deps:** bump rdfstore from v0.9.18-alpha.13 to v0.9.18-alpha.14 ([4690ab4](https://github.com/webern-unibas-ch/awg-app/commit/4690ab4667cc6579c995bc8d541b4c1ab38029fd)) +- **deps:** bump the angular group with 11 updates ([0102d9a](https://github.com/webern-unibas-ch/awg-app/commit/0102d9a26cd78b8e9f19880a9cfc781c07bf5a8d)) +- **deps:** bump the angular group with 11 updates ([c97e3dc](https://github.com/webern-unibas-ch/awg-app/commit/c97e3dc4a8654609b8b917e73afd799a53fdab03)) +- **deps:** bump the angular group with 11 updates ([493df86](https://github.com/webern-unibas-ch/awg-app/commit/493df86a981151d816392f1fe12edbb296ee9f52)) ### [0.11.6](https://github.com/webern-unibas-ch/awg-app/compare/v0.11.5...v0.11.6) (2024-02-19) - ### Features -* **edition:** add option to display reversed folio items ([08df6b4](https://github.com/webern-unibas-ch/awg-app/commit/08df6b4bee336f666cd46a0fa4f05dde17ff9ebc)) - +- **edition:** add option to display reversed folio items ([08df6b4](https://github.com/webern-unibas-ch/awg-app/commit/08df6b4bee336f666cd46a0fa4f05dde17ff9ebc)) ### Bug Fixes -* **assets:** add convolute ids for text versions ([612be8b](https://github.com/webern-unibas-ch/awg-app/commit/612be8b3e375c88ffceaa799e1e152c1b4a6d79e)) -* **assets:** move convolutes to sheet contents ([2dd0b77](https://github.com/webern-unibas-ch/awg-app/commit/2dd0b7751c8b9b2d6f6f3696da7b73c848428cf7)) -* **assets:** unify description of writing material in op25 ([1fcbdcf](https://github.com/webern-unibas-ch/awg-app/commit/1fcbdcf76827baf66f0b4367b2eb85084fa8f468)) -* **edition:** fix overlapping of svgs on reload ([b9b0cf6](https://github.com/webern-unibas-ch/awg-app/commit/b9b0cf6aa90e72f0d8830f5fcb32e88c28054e54)) -* **edition:** fix reload of svgs again ([cf857c8](https://github.com/webern-unibas-ch/awg-app/commit/cf857c8484012ace28be5bc97e462413d33a3c8d)) -* **edition:** move convolute to sheet content model ([946ad3e](https://github.com/webern-unibas-ch/awg-app/commit/946ad3e952809721ff2b171ea3bf2cc1453b3fbf)) -* **edition:** update condition for displaying sheet viewer switch ([46d1426](https://github.com/webern-unibas-ch/awg-app/commit/46d1426a2963dbbd7055f541363806c65dbc488d)) - +- **assets:** add convolute ids for text versions ([612be8b](https://github.com/webern-unibas-ch/awg-app/commit/612be8b3e375c88ffceaa799e1e152c1b4a6d79e)) +- **assets:** move convolutes to sheet contents ([2dd0b77](https://github.com/webern-unibas-ch/awg-app/commit/2dd0b7751c8b9b2d6f6f3696da7b73c848428cf7)) +- **assets:** unify description of writing material in op25 ([1fcbdcf](https://github.com/webern-unibas-ch/awg-app/commit/1fcbdcf76827baf66f0b4367b2eb85084fa8f468)) +- **edition:** fix overlapping of svgs on reload ([b9b0cf6](https://github.com/webern-unibas-ch/awg-app/commit/b9b0cf6aa90e72f0d8830f5fcb32e88c28054e54)) +- **edition:** fix reload of svgs again ([cf857c8](https://github.com/webern-unibas-ch/awg-app/commit/cf857c8484012ace28be5bc97e462413d33a3c8d)) +- **edition:** move convolute to sheet content model ([946ad3e](https://github.com/webern-unibas-ch/awg-app/commit/946ad3e952809721ff2b171ea3bf2cc1453b3fbf)) +- **edition:** update condition for displaying sheet viewer switch ([46d1426](https://github.com/webern-unibas-ch/awg-app/commit/46d1426a2963dbbd7055f541363806c65dbc488d)) ### Tests -* **edition:** create deep instead of shallow copy of mock objects ([bb30323](https://github.com/webern-unibas-ch/awg-app/commit/bb30323385dd0420edf28618431edefad6f511fc)) - +- **edition:** create deep instead of shallow copy of mock objects ([bb30323](https://github.com/webern-unibas-ch/awg-app/commit/bb30323385dd0420edf28618431edefad6f511fc)) ### Build System -* **deps-dev:** bump the angular-cli-devkit group with 2 updates ([b7aec87](https://github.com/webern-unibas-ch/awg-app/commit/b7aec87fd87e3d7f5446f43336b085cc6837d515)) -* **deps:** bump ericcornelissen/svgo-action from 4.0.7 to 4.0.8 ([20d5ba4](https://github.com/webern-unibas-ch/awg-app/commit/20d5ba44ab70f0364f9d587adee6e03d3fcb0bdf)) -* **deps:** bump the angular group with 11 updates ([02be766](https://github.com/webern-unibas-ch/awg-app/commit/02be766b40306e134226c0aa808d5e4cb1da208b)) -* **deps:** bump undici from 5.27.2 to 5.28.3 ([b1ba896](https://github.com/webern-unibas-ch/awg-app/commit/b1ba8964b72a09f7e87c86fffdecf391edba25af)) - +- **deps-dev:** bump the angular-cli-devkit group with 2 updates ([b7aec87](https://github.com/webern-unibas-ch/awg-app/commit/b7aec87fd87e3d7f5446f43336b085cc6837d515)) +- **deps:** bump ericcornelissen/svgo-action from 4.0.7 to 4.0.8 ([20d5ba4](https://github.com/webern-unibas-ch/awg-app/commit/20d5ba44ab70f0364f9d587adee6e03d3fcb0bdf)) +- **deps:** bump the angular group with 11 updates ([02be766](https://github.com/webern-unibas-ch/awg-app/commit/02be766b40306e134226c0aa808d5e4cb1da208b)) +- **deps:** bump undici from 5.27.2 to 5.28.3 ([b1ba896](https://github.com/webern-unibas-ch/awg-app/commit/b1ba8964b72a09f7e87c86fffdecf391edba25af)) ### Code Refactoring -* **assets:** restructure firm sign folder ([98356bc](https://github.com/webern-unibas-ch/awg-app/commit/98356bc575c95b5617c112db7909b5215638e86b)) +- **assets:** restructure firm sign folder ([98356bc](https://github.com/webern-unibas-ch/awg-app/commit/98356bc575c95b5617c112db7909b5215638e86b)) ### [0.11.5](https://github.com/webern-unibas-ch/awg-app/compare/v0.11.4...v0.11.5) (2024-02-14)