geonetwork-ui 2.4.0-dev.ac57b75b → 2.4.0-dev.b0bcda82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/libs/api/metadata-converter/src/lib/xml-utils.mjs +5 -3
- package/esm2022/libs/common/domain/src/lib/model/record/contact.model.mjs +28 -1
- package/esm2022/libs/feature/editor/src/lib/components/contact-card/contact-card.component.mjs +29 -0
- package/esm2022/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.mjs +17 -24
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.mjs +170 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-open-data/form-field-open-data.component.mjs +47 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +17 -3
- package/esm2022/libs/feature/editor/src/lib/components/record-form/record-form.component.mjs +3 -4
- package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +19 -2
- package/esm2022/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.mjs +3 -3
- package/esm2022/libs/feature/search/src/lib/results-table/results-table-container.component.mjs +6 -1
- package/esm2022/libs/ui/elements/src/lib/sortable-list/sortable-list.component.mjs +2 -1
- package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +19 -5
- package/esm2022/libs/ui/inputs/src/lib/image-input/image-input.component.mjs +5 -11
- package/esm2022/translations/de.json +25 -0
- package/esm2022/translations/en.json +25 -0
- package/esm2022/translations/es.json +25 -0
- package/esm2022/translations/fr.json +26 -1
- package/esm2022/translations/it.json +25 -0
- package/esm2022/translations/nl.json +25 -0
- package/esm2022/translations/pt.json +25 -0
- package/fesm2022/geonetwork-ui.mjs +546 -49
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/common/domain/src/lib/model/record/contact.model.d.ts +1 -0
- package/libs/common/domain/src/lib/model/record/contact.model.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/contact-card/contact-card.component.d.ts +12 -0
- package/libs/feature/editor/src/lib/components/contact-card/contact-card.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.d.ts +1 -1
- package/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.d.ts +47 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-open-data/form-field-open-data.component.d.ts +17 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-open-data/form-field-open-data.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts +4 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/record-form.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/fields.config.d.ts +6 -0
- package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
- package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/sortable-list/sortable-list.component.d.ts +1 -2
- package/libs/ui/elements/src/lib/sortable-list/sortable-list.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts +9 -1
- package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts +2 -4
- package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/libs/api/metadata-converter/src/lib/xml-utils.ts +5 -5
- package/src/libs/common/domain/src/lib/model/record/contact.model.ts +28 -0
- package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.html +25 -0
- package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.ts +30 -0
- package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.html +0 -1
- package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.ts +18 -23
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.html +76 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.ts +271 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.html +1 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-open-data/form-field-open-data.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-open-data/form-field-open-data.component.html +6 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-open-data/form-field-open-data.component.ts +59 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +12 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +17 -0
- package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.html +1 -1
- package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.ts +0 -1
- package/src/libs/feature/editor/src/lib/fields.config.ts +20 -1
- package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.html +1 -1
- package/src/libs/feature/search/src/lib/results-table/results-table-container.component.ts +12 -0
- package/src/libs/ui/elements/src/lib/sortable-list/sortable-list.component.ts +2 -2
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +15 -3
- package/src/libs/ui/inputs/src/lib/image-input/image-input.component.html +1 -1
- package/src/libs/ui/inputs/src/lib/image-input/image-input.component.ts +2 -7
- package/translations/de.json +25 -0
- package/translations/en.json +25 -0
- package/translations/es.json +25 -0
- package/translations/fr.json +26 -1
- package/translations/it.json +25 -0
- package/translations/nl.json +25 -0
- package/translations/pt.json +25 -0
- package/translations/sk.json +25 -0
|
@@ -328,10 +328,12 @@ function findParent(parentName) {
|
|
|
328
328
|
}
|
|
329
329
|
function readText() {
|
|
330
330
|
return (el) => {
|
|
331
|
-
|
|
331
|
+
if (!el)
|
|
332
|
+
return null;
|
|
333
|
+
const textNode = Array.isArray(el.children)
|
|
332
334
|
? el.children.find((node) => node.type === 'text')
|
|
333
335
|
: null;
|
|
334
|
-
return textNode ? textNode.text :
|
|
336
|
+
return textNode ? textNode.text : '';
|
|
335
337
|
};
|
|
336
338
|
}
|
|
337
339
|
function readAttribute(attrName) {
|
|
@@ -17537,6 +17539,27 @@ var de = {
|
|
|
17537
17539
|
"dataset.error.parse": "Die Daten wurden geladen, konnten aber nicht gelesen werden: \"{ info }\"",
|
|
17538
17540
|
"dataset.error.unknown": "Die Daten können nicht angezeigt werden: \"{ info }\"",
|
|
17539
17541
|
"dataset.error.unsupportedType": "Der folgende Inhaltstyp wird nicht unterstützt: \"{ info }\"",
|
|
17542
|
+
"domain.contact.role.author": "",
|
|
17543
|
+
"domain.contact.role.collaborator": "",
|
|
17544
|
+
"domain.contact.role.contributor": "",
|
|
17545
|
+
"domain.contact.role.custodian": "",
|
|
17546
|
+
"domain.contact.role.distributor": "",
|
|
17547
|
+
"domain.contact.role.editor": "",
|
|
17548
|
+
"domain.contact.role.funder": "",
|
|
17549
|
+
"domain.contact.role.mediator": "",
|
|
17550
|
+
"domain.contact.role.originator": "",
|
|
17551
|
+
"domain.contact.role.other": "",
|
|
17552
|
+
"domain.contact.role.owner": "",
|
|
17553
|
+
"domain.contact.role.point_of_contact": "",
|
|
17554
|
+
"domain.contact.role.principal_investigator": "",
|
|
17555
|
+
"domain.contact.role.processor": "",
|
|
17556
|
+
"domain.contact.role.publisher": "",
|
|
17557
|
+
"domain.contact.role.resource_provider": "",
|
|
17558
|
+
"domain.contact.role.rights_holder": "",
|
|
17559
|
+
"domain.contact.role.sponsor": "",
|
|
17560
|
+
"domain.contact.role.stakeholder": "",
|
|
17561
|
+
"domain.contact.role.unspecified": "",
|
|
17562
|
+
"domain.contact.role.user": "",
|
|
17540
17563
|
"domain.record.status.completed": "Abgeschlossen",
|
|
17541
17564
|
"domain.record.status.deprecated": "Veraltet",
|
|
17542
17565
|
"domain.record.status.ongoing": "Kontinuierliche Aktualisierung",
|
|
@@ -17562,10 +17585,13 @@ var de = {
|
|
|
17562
17585
|
"editor.record.deleteError.body": "Der Datensatz konnte nicht gelöscht werden:",
|
|
17563
17586
|
"editor.record.deleteError.closeMessage": "Verstanden",
|
|
17564
17587
|
"editor.record.deleteError.title": "Fehler beim Löschen des Datensatzes",
|
|
17588
|
+
"editor.record.deleteSuccess.body": "",
|
|
17589
|
+
"editor.record.deleteSuccess.title": "",
|
|
17565
17590
|
"editor.record.form.bottomButtons.comeBackLater": "",
|
|
17566
17591
|
"editor.record.form.bottomButtons.next": "",
|
|
17567
17592
|
"editor.record.form.bottomButtons.previous": "",
|
|
17568
17593
|
"editor.record.form.field.abstract": "Kurzbeschreibung",
|
|
17594
|
+
"editor.record.form.field.contactsForResource.noContact": "",
|
|
17569
17595
|
"editor.record.form.field.keywords": "Schlagwörter",
|
|
17570
17596
|
"editor.record.form.field.license": "Lizenz",
|
|
17571
17597
|
"editor.record.form.field.overviews": "",
|
|
@@ -17575,6 +17601,7 @@ var de = {
|
|
|
17575
17601
|
"editor.record.form.field.title": "Metadaten-Titel",
|
|
17576
17602
|
"editor.record.form.field.uniqueIdentifier": "Eindeutige Kennung (ID)",
|
|
17577
17603
|
"editor.record.form.field.updateFrequency": "Aktualisierungshäufigkeit",
|
|
17604
|
+
"editor.record.form.classification.opendata": "",
|
|
17578
17605
|
"editor.record.form.license.cc-by": "Creative Commons CC-BY",
|
|
17579
17606
|
"editor.record.form.license.cc-by-sa": "Creative Commons CC-BY-SA",
|
|
17580
17607
|
"editor.record.form.license.cc-zero": "Creative Commons CC-0",
|
|
@@ -18002,6 +18029,27 @@ var en = {
|
|
|
18002
18029
|
"dataset.error.parse": "The data was loaded but could not be parsed: \"{ info }\"",
|
|
18003
18030
|
"dataset.error.unknown": "The data cannot be displayed: \"{ info }\"",
|
|
18004
18031
|
"dataset.error.unsupportedType": "The following content type is unsupported: \"{ info }\"",
|
|
18032
|
+
"domain.contact.role.author": "Author",
|
|
18033
|
+
"domain.contact.role.collaborator": "Collaborator",
|
|
18034
|
+
"domain.contact.role.contributor": "Contributor",
|
|
18035
|
+
"domain.contact.role.custodian": "Custodian",
|
|
18036
|
+
"domain.contact.role.distributor": "Distributor",
|
|
18037
|
+
"domain.contact.role.editor": "Editor",
|
|
18038
|
+
"domain.contact.role.funder": "Funder",
|
|
18039
|
+
"domain.contact.role.mediator": "Mediator",
|
|
18040
|
+
"domain.contact.role.originator": "Originator",
|
|
18041
|
+
"domain.contact.role.other": "Other",
|
|
18042
|
+
"domain.contact.role.owner": "Owner",
|
|
18043
|
+
"domain.contact.role.point_of_contact": "Point of contact",
|
|
18044
|
+
"domain.contact.role.principal_investigator": "Principal investigator",
|
|
18045
|
+
"domain.contact.role.processor": "Processor",
|
|
18046
|
+
"domain.contact.role.publisher": "Publisher",
|
|
18047
|
+
"domain.contact.role.resource_provider": "Resource provider",
|
|
18048
|
+
"domain.contact.role.rights_holder": "Rights holder",
|
|
18049
|
+
"domain.contact.role.sponsor": "Sponsor",
|
|
18050
|
+
"domain.contact.role.stakeholder": "Stakeholder",
|
|
18051
|
+
"domain.contact.role.unspecified": "Unspecified",
|
|
18052
|
+
"domain.contact.role.user": "User",
|
|
18005
18053
|
"domain.record.status.completed": "Completed",
|
|
18006
18054
|
"domain.record.status.deprecated": "Deprecated",
|
|
18007
18055
|
"domain.record.status.ongoing": "On going",
|
|
@@ -18027,10 +18075,14 @@ var en = {
|
|
|
18027
18075
|
"editor.record.deleteError.body": "The record could not be deleted:",
|
|
18028
18076
|
"editor.record.deleteError.closeMessage": "Understood",
|
|
18029
18077
|
"editor.record.deleteError.title": "Error deleting record",
|
|
18078
|
+
"editor.record.deleteSuccess.body": "The record was successfully deleted !",
|
|
18079
|
+
"editor.record.deleteSuccess.title": "Delete success",
|
|
18030
18080
|
"editor.record.form.bottomButtons.comeBackLater": "Come back later",
|
|
18031
18081
|
"editor.record.form.bottomButtons.next": "Next",
|
|
18032
18082
|
"editor.record.form.bottomButtons.previous": "Previous",
|
|
18083
|
+
"editor.record.form.classification.opendata": "Open Data",
|
|
18033
18084
|
"editor.record.form.field.abstract": "Abstract",
|
|
18085
|
+
"editor.record.form.field.contactsForResource.noContact": "Please provide at least one point of contact responsible for the data.",
|
|
18034
18086
|
"editor.record.form.field.keywords": "Keywords",
|
|
18035
18087
|
"editor.record.form.field.license": "License",
|
|
18036
18088
|
"editor.record.form.field.overviews": "Overviews",
|
|
@@ -18467,6 +18519,27 @@ var es = {
|
|
|
18467
18519
|
"dataset.error.parse": "",
|
|
18468
18520
|
"dataset.error.unknown": "",
|
|
18469
18521
|
"dataset.error.unsupportedType": "",
|
|
18522
|
+
"domain.contact.role.author": "",
|
|
18523
|
+
"domain.contact.role.collaborator": "",
|
|
18524
|
+
"domain.contact.role.contributor": "",
|
|
18525
|
+
"domain.contact.role.custodian": "",
|
|
18526
|
+
"domain.contact.role.distributor": "",
|
|
18527
|
+
"domain.contact.role.editor": "",
|
|
18528
|
+
"domain.contact.role.funder": "",
|
|
18529
|
+
"domain.contact.role.mediator": "",
|
|
18530
|
+
"domain.contact.role.originator": "",
|
|
18531
|
+
"domain.contact.role.other": "",
|
|
18532
|
+
"domain.contact.role.owner": "",
|
|
18533
|
+
"domain.contact.role.point_of_contact": "",
|
|
18534
|
+
"domain.contact.role.principal_investigator": "",
|
|
18535
|
+
"domain.contact.role.processor": "",
|
|
18536
|
+
"domain.contact.role.publisher": "",
|
|
18537
|
+
"domain.contact.role.resource_provider": "",
|
|
18538
|
+
"domain.contact.role.rights_holder": "",
|
|
18539
|
+
"domain.contact.role.sponsor": "",
|
|
18540
|
+
"domain.contact.role.stakeholder": "",
|
|
18541
|
+
"domain.contact.role.unspecified": "",
|
|
18542
|
+
"domain.contact.role.user": "",
|
|
18470
18543
|
"domain.record.status.completed": "",
|
|
18471
18544
|
"domain.record.status.deprecated": "",
|
|
18472
18545
|
"domain.record.status.ongoing": "",
|
|
@@ -18492,10 +18565,14 @@ var es = {
|
|
|
18492
18565
|
"editor.record.deleteError.body": "",
|
|
18493
18566
|
"editor.record.deleteError.closeMessage": "",
|
|
18494
18567
|
"editor.record.deleteError.title": "",
|
|
18568
|
+
"editor.record.deleteSuccess.body": "",
|
|
18569
|
+
"editor.record.deleteSuccess.title": "",
|
|
18495
18570
|
"editor.record.form.bottomButtons.comeBackLater": "",
|
|
18496
18571
|
"editor.record.form.bottomButtons.next": "",
|
|
18497
18572
|
"editor.record.form.bottomButtons.previous": "",
|
|
18573
|
+
"editor.record.form.classification.opendata": "",
|
|
18498
18574
|
"editor.record.form.field.abstract": "",
|
|
18575
|
+
"editor.record.form.field.contactsForResource.noContact": "",
|
|
18499
18576
|
"editor.record.form.field.keywords": "",
|
|
18500
18577
|
"editor.record.form.field.license": "",
|
|
18501
18578
|
"editor.record.form.field.overviews": "",
|
|
@@ -18932,6 +19009,27 @@ var fr = {
|
|
|
18932
19009
|
"dataset.error.parse": "Les données ont été chargées mais leur décodage a échoué: \"{ info }\"",
|
|
18933
19010
|
"dataset.error.unknown": "Les données ne peuvent être affichées: \"{ info }\"",
|
|
18934
19011
|
"dataset.error.unsupportedType": "Le type de contenu suivant n'est pas pris en charge: \"{ info }\"",
|
|
19012
|
+
"domain.contact.role.author": "Auteur",
|
|
19013
|
+
"domain.contact.role.collaborator": "Collaborateur",
|
|
19014
|
+
"domain.contact.role.contributor": "Contributeur",
|
|
19015
|
+
"domain.contact.role.custodian": "Gestionnaire",
|
|
19016
|
+
"domain.contact.role.distributor": "Distributeur",
|
|
19017
|
+
"domain.contact.role.editor": "Éditeur",
|
|
19018
|
+
"domain.contact.role.funder": "Financeur",
|
|
19019
|
+
"domain.contact.role.mediator": "Médiateur",
|
|
19020
|
+
"domain.contact.role.originator": "Créateur",
|
|
19021
|
+
"domain.contact.role.other": "Autre",
|
|
19022
|
+
"domain.contact.role.owner": "Propriétaire",
|
|
19023
|
+
"domain.contact.role.point_of_contact": "Point de contact",
|
|
19024
|
+
"domain.contact.role.principal_investigator": "Chercheur principal",
|
|
19025
|
+
"domain.contact.role.processor": "Processeur",
|
|
19026
|
+
"domain.contact.role.publisher": "Éditeur",
|
|
19027
|
+
"domain.contact.role.resource_provider": "Fournisseur",
|
|
19028
|
+
"domain.contact.role.rights_holder": "Détenteur des droits",
|
|
19029
|
+
"domain.contact.role.sponsor": "Sponsor",
|
|
19030
|
+
"domain.contact.role.stakeholder": "Partie prenante",
|
|
19031
|
+
"domain.contact.role.unspecified": "Non spécifié",
|
|
19032
|
+
"domain.contact.role.user": "Utilisateur",
|
|
18935
19033
|
"domain.record.status.completed": "Finalisé",
|
|
18936
19034
|
"domain.record.status.deprecated": "Obsolète",
|
|
18937
19035
|
"domain.record.status.ongoing": "Mise à jour continue",
|
|
@@ -18957,17 +19055,21 @@ var fr = {
|
|
|
18957
19055
|
"editor.record.deleteError.body": "La fiche n'a pas pu être supprimée :",
|
|
18958
19056
|
"editor.record.deleteError.closeMessage": "Compris",
|
|
18959
19057
|
"editor.record.deleteError.title": "Erreur lors de la suppression",
|
|
19058
|
+
"editor.record.deleteSuccess.body": "La fiche a bien été supprimée !",
|
|
19059
|
+
"editor.record.deleteSuccess.title": "Suppression réussie",
|
|
18960
19060
|
"editor.record.form.bottomButtons.comeBackLater": "Revenir plus tard",
|
|
18961
19061
|
"editor.record.form.bottomButtons.next": "Suivant",
|
|
18962
19062
|
"editor.record.form.bottomButtons.previous": "Précédent",
|
|
19063
|
+
"editor.record.form.classification.opendata": "Données ouvertes",
|
|
18963
19064
|
"editor.record.form.field.abstract": "Résumé",
|
|
19065
|
+
"editor.record.form.field.contactsForResource.noContact": "Veuillez renseigner au moins un point de contact responsable de la donnée.",
|
|
18964
19066
|
"editor.record.form.field.keywords": "Mots-clés",
|
|
18965
19067
|
"editor.record.form.field.license": "Licence",
|
|
18966
19068
|
"editor.record.form.field.overviews": "Aperçus",
|
|
18967
19069
|
"editor.record.form.field.recordUpdated": "Date de dernière révision",
|
|
18968
19070
|
"editor.record.form.field.resourceUpdated": "Date de dernière révision",
|
|
18969
19071
|
"editor.record.form.field.temporalExtents": "Étendue temporelle",
|
|
18970
|
-
"editor.record.form.field.title": "
|
|
19072
|
+
"editor.record.form.field.title": "",
|
|
18971
19073
|
"editor.record.form.field.uniqueIdentifier": "Identifiant unique",
|
|
18972
19074
|
"editor.record.form.field.updateFrequency": "Fréquence de mise à jour",
|
|
18973
19075
|
"editor.record.form.license.cc-by": "",
|
|
@@ -19397,6 +19499,27 @@ var it = {
|
|
|
19397
19499
|
"dataset.error.parse": "I dati sono stati caricati ma la decodifica non è riuscita: \"{info}\"",
|
|
19398
19500
|
"dataset.error.unknown": "Impossibile visualizzare i dati: \"{info}\"",
|
|
19399
19501
|
"dataset.error.unsupportedType": "Il seguente tipo di contenuto non è supportato: \"{info}\"",
|
|
19502
|
+
"domain.contact.role.author": "",
|
|
19503
|
+
"domain.contact.role.collaborator": "",
|
|
19504
|
+
"domain.contact.role.contributor": "",
|
|
19505
|
+
"domain.contact.role.custodian": "",
|
|
19506
|
+
"domain.contact.role.distributor": "",
|
|
19507
|
+
"domain.contact.role.editor": "",
|
|
19508
|
+
"domain.contact.role.funder": "",
|
|
19509
|
+
"domain.contact.role.mediator": "",
|
|
19510
|
+
"domain.contact.role.originator": "",
|
|
19511
|
+
"domain.contact.role.other": "",
|
|
19512
|
+
"domain.contact.role.owner": "",
|
|
19513
|
+
"domain.contact.role.point_of_contact": "",
|
|
19514
|
+
"domain.contact.role.principal_investigator": "",
|
|
19515
|
+
"domain.contact.role.processor": "",
|
|
19516
|
+
"domain.contact.role.publisher": "",
|
|
19517
|
+
"domain.contact.role.resource_provider": "",
|
|
19518
|
+
"domain.contact.role.rights_holder": "",
|
|
19519
|
+
"domain.contact.role.sponsor": "",
|
|
19520
|
+
"domain.contact.role.stakeholder": "",
|
|
19521
|
+
"domain.contact.role.unspecified": "",
|
|
19522
|
+
"domain.contact.role.user": "",
|
|
19400
19523
|
"domain.record.status.completed": "Completato",
|
|
19401
19524
|
"domain.record.status.deprecated": "Deprecato",
|
|
19402
19525
|
"domain.record.status.ongoing": "Aggiornamento continuo",
|
|
@@ -19422,10 +19545,14 @@ var it = {
|
|
|
19422
19545
|
"editor.record.deleteError.body": "",
|
|
19423
19546
|
"editor.record.deleteError.closeMessage": "",
|
|
19424
19547
|
"editor.record.deleteError.title": "",
|
|
19548
|
+
"editor.record.deleteSuccess.body": "",
|
|
19549
|
+
"editor.record.deleteSuccess.title": "",
|
|
19425
19550
|
"editor.record.form.bottomButtons.comeBackLater": "",
|
|
19426
19551
|
"editor.record.form.bottomButtons.next": "",
|
|
19427
19552
|
"editor.record.form.bottomButtons.previous": "",
|
|
19553
|
+
"editor.record.form.classification.opendata": "",
|
|
19428
19554
|
"editor.record.form.field.abstract": "",
|
|
19555
|
+
"editor.record.form.field.contactsForResource.noContact": "",
|
|
19429
19556
|
"editor.record.form.field.keywords": "",
|
|
19430
19557
|
"editor.record.form.field.license": "Licenza",
|
|
19431
19558
|
"editor.record.form.field.overviews": "",
|
|
@@ -19862,6 +19989,27 @@ var nl = {
|
|
|
19862
19989
|
"dataset.error.parse": "",
|
|
19863
19990
|
"dataset.error.unknown": "",
|
|
19864
19991
|
"dataset.error.unsupportedType": "",
|
|
19992
|
+
"domain.contact.role.author": "",
|
|
19993
|
+
"domain.contact.role.collaborator": "",
|
|
19994
|
+
"domain.contact.role.contributor": "",
|
|
19995
|
+
"domain.contact.role.custodian": "",
|
|
19996
|
+
"domain.contact.role.distributor": "",
|
|
19997
|
+
"domain.contact.role.editor": "",
|
|
19998
|
+
"domain.contact.role.funder": "",
|
|
19999
|
+
"domain.contact.role.mediator": "",
|
|
20000
|
+
"domain.contact.role.originator": "",
|
|
20001
|
+
"domain.contact.role.other": "",
|
|
20002
|
+
"domain.contact.role.owner": "",
|
|
20003
|
+
"domain.contact.role.point_of_contact": "",
|
|
20004
|
+
"domain.contact.role.principal_investigator": "",
|
|
20005
|
+
"domain.contact.role.processor": "",
|
|
20006
|
+
"domain.contact.role.publisher": "",
|
|
20007
|
+
"domain.contact.role.resource_provider": "",
|
|
20008
|
+
"domain.contact.role.rights_holder": "",
|
|
20009
|
+
"domain.contact.role.sponsor": "",
|
|
20010
|
+
"domain.contact.role.stakeholder": "",
|
|
20011
|
+
"domain.contact.role.unspecified": "",
|
|
20012
|
+
"domain.contact.role.user": "",
|
|
19865
20013
|
"domain.record.status.completed": "",
|
|
19866
20014
|
"domain.record.status.deprecated": "",
|
|
19867
20015
|
"domain.record.status.ongoing": "",
|
|
@@ -19887,10 +20035,14 @@ var nl = {
|
|
|
19887
20035
|
"editor.record.deleteError.body": "",
|
|
19888
20036
|
"editor.record.deleteError.closeMessage": "",
|
|
19889
20037
|
"editor.record.deleteError.title": "",
|
|
20038
|
+
"editor.record.deleteSuccess.body": "",
|
|
20039
|
+
"editor.record.deleteSuccess.title": "",
|
|
19890
20040
|
"editor.record.form.bottomButtons.comeBackLater": "",
|
|
19891
20041
|
"editor.record.form.bottomButtons.next": "",
|
|
19892
20042
|
"editor.record.form.bottomButtons.previous": "",
|
|
20043
|
+
"editor.record.form.classification.opendata": "",
|
|
19893
20044
|
"editor.record.form.field.abstract": "",
|
|
20045
|
+
"editor.record.form.field.contactsForResource.noContact": "",
|
|
19894
20046
|
"editor.record.form.field.keywords": "",
|
|
19895
20047
|
"editor.record.form.field.license": "",
|
|
19896
20048
|
"editor.record.form.field.overviews": "",
|
|
@@ -20327,6 +20479,27 @@ var pt = {
|
|
|
20327
20479
|
"dataset.error.parse": "",
|
|
20328
20480
|
"dataset.error.unknown": "",
|
|
20329
20481
|
"dataset.error.unsupportedType": "",
|
|
20482
|
+
"domain.contact.role.author": "",
|
|
20483
|
+
"domain.contact.role.collaborator": "",
|
|
20484
|
+
"domain.contact.role.contributor": "",
|
|
20485
|
+
"domain.contact.role.custodian": "",
|
|
20486
|
+
"domain.contact.role.distributor": "",
|
|
20487
|
+
"domain.contact.role.editor": "",
|
|
20488
|
+
"domain.contact.role.funder": "",
|
|
20489
|
+
"domain.contact.role.mediator": "",
|
|
20490
|
+
"domain.contact.role.originator": "",
|
|
20491
|
+
"domain.contact.role.other": "",
|
|
20492
|
+
"domain.contact.role.owner": "",
|
|
20493
|
+
"domain.contact.role.point_of_contact": "",
|
|
20494
|
+
"domain.contact.role.principal_investigator": "",
|
|
20495
|
+
"domain.contact.role.processor": "",
|
|
20496
|
+
"domain.contact.role.publisher": "",
|
|
20497
|
+
"domain.contact.role.resource_provider": "",
|
|
20498
|
+
"domain.contact.role.rights_holder": "",
|
|
20499
|
+
"domain.contact.role.sponsor": "",
|
|
20500
|
+
"domain.contact.role.stakeholder": "",
|
|
20501
|
+
"domain.contact.role.unspecified": "",
|
|
20502
|
+
"domain.contact.role.user": "",
|
|
20330
20503
|
"domain.record.status.completed": "",
|
|
20331
20504
|
"domain.record.status.deprecated": "",
|
|
20332
20505
|
"domain.record.status.ongoing": "",
|
|
@@ -20352,10 +20525,14 @@ var pt = {
|
|
|
20352
20525
|
"editor.record.deleteError.body": "",
|
|
20353
20526
|
"editor.record.deleteError.closeMessage": "",
|
|
20354
20527
|
"editor.record.deleteError.title": "",
|
|
20528
|
+
"editor.record.deleteSuccess.body": "",
|
|
20529
|
+
"editor.record.deleteSuccess.title": "",
|
|
20355
20530
|
"editor.record.form.bottomButtons.comeBackLater": "",
|
|
20356
20531
|
"editor.record.form.bottomButtons.next": "",
|
|
20357
20532
|
"editor.record.form.bottomButtons.previous": "",
|
|
20533
|
+
"editor.record.form.classification.opendata": "",
|
|
20358
20534
|
"editor.record.form.field.abstract": "",
|
|
20535
|
+
"editor.record.form.field.contactsForResource.noContact": "",
|
|
20359
20536
|
"editor.record.form.field.keywords": "",
|
|
20360
20537
|
"editor.record.form.field.license": "",
|
|
20361
20538
|
"editor.record.form.field.overviews": "",
|
|
@@ -25129,6 +25306,7 @@ class AutocompleteComponent {
|
|
|
25129
25306
|
constructor(cdRef) {
|
|
25130
25307
|
this.cdRef = cdRef;
|
|
25131
25308
|
this.clearOnSelection = false;
|
|
25309
|
+
this.preventCompleteOnSelection = false;
|
|
25132
25310
|
this.autoFocus = false;
|
|
25133
25311
|
this.minCharacterCount = 3;
|
|
25134
25312
|
this.allowSubmit = true;
|
|
@@ -25221,17 +25399,28 @@ class AutocompleteComponent {
|
|
|
25221
25399
|
handleClickSearch() {
|
|
25222
25400
|
this.inputSubmitted.emit(this.inputRef.nativeElement.value);
|
|
25223
25401
|
}
|
|
25402
|
+
/**
|
|
25403
|
+
* This function is triggered when an item is selected in the list of displayed items.
|
|
25404
|
+
* If preventCompleteOnSelection is true then the input will be left as entered by the user.
|
|
25405
|
+
* If preventCompleteOnSelection is false (by default) then the input will be completed with the item selected by the user.
|
|
25406
|
+
* If clearOnSelection is true then the input will be cleared upon selection.
|
|
25407
|
+
* @param event
|
|
25408
|
+
*/
|
|
25224
25409
|
handleSelection(event) {
|
|
25225
25410
|
this.cancelEnter = true;
|
|
25226
25411
|
this.itemSelected.emit(event.option.value);
|
|
25227
|
-
if (this.
|
|
25228
|
-
this.lastInputValue$.pipe(first()).subscribe((
|
|
25229
|
-
this.inputRef.nativeElement.value =
|
|
25412
|
+
if (this.preventCompleteOnSelection) {
|
|
25413
|
+
this.lastInputValue$.pipe(first()).subscribe((lastInputValue) => {
|
|
25414
|
+
this.inputRef.nativeElement.value = lastInputValue;
|
|
25230
25415
|
});
|
|
25416
|
+
return;
|
|
25417
|
+
}
|
|
25418
|
+
if (this.clearOnSelection) {
|
|
25419
|
+
this.inputRef.nativeElement.value = '';
|
|
25231
25420
|
}
|
|
25232
25421
|
}
|
|
25233
25422
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AutocompleteComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
25234
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AutocompleteComponent, isStandalone: true, selector: "gn-ui-autocomplete", inputs: { placeholder: "placeholder", action: "action", value: "value", clearOnSelection: "clearOnSelection", autoFocus: "autoFocus", minCharacterCount: "minCharacterCount", allowSubmit: "allowSubmit", displayWithFn: "displayWithFn" }, outputs: { itemSelected: "itemSelected", inputSubmitted: "inputSubmitted", inputCleared: "inputCleared" }, viewQueries: [{ propertyName: "triggerRef", first: true, predicate: MatAutocompleteTrigger, descendants: true }, { propertyName: "autocomplete", first: true, predicate: MatAutocomplete, descendants: true }, { propertyName: "inputRef", first: true, predicate: ["searchInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"relative\">\n <input\n #searchInput\n type=\"text\"\n class=\"appearance-none focus:outline-white focus:outline-2 focus:outline-dotted focus:outline-offset-2 leading-tight rounded w-full text-black shadow-xl focus:shadow-[0_0_24px_0_rgba(21,40,184,0.09)]\"\n [placeholder]=\"placeholder\"\n [formControl]=\"control\"\n [matAutocomplete]=\"auto\"\n (keyup.enter)=\"handleEnter(searchInput.value)\"\n />\n <div class=\"flex flex-row absolute inset-y-0 right-0\">\n <button\n type=\"button\"\n class=\"text-primary-lightest hover:text-primary hover:bg-gray-50 transition-all duration-100 clear-btn\"\n *ngIf=\"searchInput.value\"\n aria-label=\"Clear\"\n (click)=\"clear()\"\n >\n <mat-icon class=\"material-symbols-outlined\">close</mat-icon>\n </button>\n <button\n type=\"button\"\n class=\"text-primary bg-white hover:text-primary-darkest hover:bg-gray-100 border-gray-300 hover:border-gray-500 transition-all duration-100 search-btn rounded-r\"\n aria-label=\"Trigger search\"\n *ngIf=\"allowSubmit\"\n data-test=\"autocomplete-submit-btn\"\n (click)=\"handleClickSearch()\"\n >\n <mat-icon class=\"material-symbols-outlined\">search</mat-icon>\n </button>\n </div>\n <gn-ui-popup-alert\n *ngIf=\"error\"\n class=\"absolute mt-2 w-full top-[100%] left-0\"\n icon=\"error_outline\"\n position=\"top\"\n type=\"warning\"\n >\n <span translate>search.autocomplete.error</span>\n {{ error }}\n </gn-ui-popup-alert>\n</div>\n<mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"handleSelection($event)\"\n [displayWith]=\"displayWithFnInternal\"\n>\n <mat-option\n *ngFor=\"let suggestion of suggestions$ | async\"\n [value]=\"suggestion\"\n class=\"p-2 suggestion\"\n >\n {{ displayWithFnInternal(suggestion) }}\n </mat-option>\n</mat-autocomplete>\n", styles: [":host{--input-height: 3.5em}.clear-btn{width:var(--input-height);height:100%}.search-btn{width:var(--input-height);height:100%;border-left-width:.1em}mat-icon{width:100%;height:100%;padding:.65em;font-size:1.5em}input{height:var(--input-height);padding:1.05em;padding-right:calc(2 * var(--input-height))}input:placeholder-shown{text-overflow:ellipsis}.mat-mdc-option.suggestion.mat-mdc-option-active{background-color:var(--color-primary-lightest)}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: PopupAlertComponent, selector: "gn-ui-popup-alert", inputs: ["icon", "type", "position"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i2$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i3.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i2$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$3.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
25423
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AutocompleteComponent, isStandalone: true, selector: "gn-ui-autocomplete", inputs: { placeholder: "placeholder", action: "action", value: "value", clearOnSelection: "clearOnSelection", preventCompleteOnSelection: "preventCompleteOnSelection", autoFocus: "autoFocus", minCharacterCount: "minCharacterCount", allowSubmit: "allowSubmit", displayWithFn: "displayWithFn" }, outputs: { itemSelected: "itemSelected", inputSubmitted: "inputSubmitted", inputCleared: "inputCleared" }, viewQueries: [{ propertyName: "triggerRef", first: true, predicate: MatAutocompleteTrigger, descendants: true }, { propertyName: "autocomplete", first: true, predicate: MatAutocomplete, descendants: true }, { propertyName: "inputRef", first: true, predicate: ["searchInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"relative\">\n <input\n #searchInput\n type=\"text\"\n class=\"appearance-none focus:outline-white focus:outline-2 focus:outline-dotted focus:outline-offset-2 leading-tight rounded w-full text-black shadow-xl focus:shadow-[0_0_24px_0_rgba(21,40,184,0.09)]\"\n [placeholder]=\"placeholder\"\n [formControl]=\"control\"\n [matAutocomplete]=\"auto\"\n (keyup.enter)=\"handleEnter(searchInput.value)\"\n />\n <div class=\"flex flex-row absolute inset-y-0 right-0\">\n <button\n type=\"button\"\n class=\"text-primary-lightest hover:text-primary hover:bg-gray-50 transition-all duration-100 clear-btn\"\n *ngIf=\"searchInput.value\"\n aria-label=\"Clear\"\n (click)=\"clear()\"\n >\n <mat-icon class=\"material-symbols-outlined\">close</mat-icon>\n </button>\n <button\n type=\"button\"\n class=\"text-primary bg-white hover:text-primary-darkest hover:bg-gray-100 border-gray-300 hover:border-gray-500 transition-all duration-100 search-btn rounded-r\"\n aria-label=\"Trigger search\"\n *ngIf=\"allowSubmit\"\n data-test=\"autocomplete-submit-btn\"\n (click)=\"handleClickSearch()\"\n >\n <mat-icon class=\"material-symbols-outlined\">search</mat-icon>\n </button>\n </div>\n <gn-ui-popup-alert\n *ngIf=\"error\"\n class=\"absolute mt-2 w-full top-[100%] left-0\"\n icon=\"error_outline\"\n position=\"top\"\n type=\"warning\"\n >\n <span translate>search.autocomplete.error</span>\n {{ error }}\n </gn-ui-popup-alert>\n</div>\n<mat-autocomplete\n #auto=\"matAutocomplete\"\n (optionSelected)=\"handleSelection($event)\"\n [displayWith]=\"displayWithFnInternal\"\n>\n <mat-option\n *ngFor=\"let suggestion of suggestions$ | async\"\n [value]=\"suggestion\"\n class=\"p-2 suggestion\"\n >\n {{ displayWithFnInternal(suggestion) }}\n </mat-option>\n</mat-autocomplete>\n", styles: [":host{--input-height: 3.5em}.clear-btn{width:var(--input-height);height:100%}.search-btn{width:var(--input-height);height:100%;border-left-width:.1em}mat-icon{width:100%;height:100%;padding:.65em;font-size:1.5em}input{height:var(--input-height);padding:1.05em;padding-right:calc(2 * var(--input-height))}input:placeholder-shown{text-overflow:ellipsis}.mat-mdc-option.suggestion.mat-mdc-option-active{background-color:var(--color-primary-lightest)}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: PopupAlertComponent, selector: "gn-ui-popup-alert", inputs: ["icon", "type", "position"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i2$1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i3.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i2$1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$3.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
25235
25424
|
}
|
|
25236
25425
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AutocompleteComponent, decorators: [{
|
|
25237
25426
|
type: Component,
|
|
@@ -25251,6 +25440,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
25251
25440
|
type: Input
|
|
25252
25441
|
}], clearOnSelection: [{
|
|
25253
25442
|
type: Input
|
|
25443
|
+
}], preventCompleteOnSelection: [{
|
|
25444
|
+
type: Input
|
|
25254
25445
|
}], autoFocus: [{
|
|
25255
25446
|
type: Input
|
|
25256
25447
|
}], minCharacterCount: [{
|
|
@@ -26331,8 +26522,7 @@ class ImageInputComponent {
|
|
|
26331
26522
|
const file = new File([blob], name);
|
|
26332
26523
|
this.fileChange.emit(file);
|
|
26333
26524
|
},
|
|
26334
|
-
error: (
|
|
26335
|
-
console.error(error);
|
|
26525
|
+
error: () => {
|
|
26336
26526
|
this.downloadError = true;
|
|
26337
26527
|
this.cd.markForCheck();
|
|
26338
26528
|
this.urlChange.emit(this.urlInputValue);
|
|
@@ -26368,7 +26558,6 @@ class ImageInputComponent {
|
|
|
26368
26558
|
}
|
|
26369
26559
|
}
|
|
26370
26560
|
handleDelete() {
|
|
26371
|
-
this.formControl.markAsDirty();
|
|
26372
26561
|
this.delete.emit();
|
|
26373
26562
|
}
|
|
26374
26563
|
toggleAltTextInput() {
|
|
@@ -26391,7 +26580,7 @@ class ImageInputComponent {
|
|
|
26391
26580
|
});
|
|
26392
26581
|
}
|
|
26393
26582
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ImageInputComponent, deps: [{ token: i1.HttpClient }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
26394
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ImageInputComponent, isStandalone: true, selector: "gn-ui-image-input", inputs: {
|
|
26583
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ImageInputComponent, isStandalone: true, selector: "gn-ui-image-input", inputs: { maxSizeMB: "maxSizeMB", previewUrl: "previewUrl", altText: "altText", uploadProgress: "uploadProgress", uploadError: "uploadError" }, outputs: { fileChange: "fileChange", urlChange: "urlChange", uploadCancel: "uploadCancel", delete: "delete", altTextChange: "altTextChange" }, ngImport: i0, template: "<ng-container *ngIf=\"previewUrl; then withImage; else withoutImage\">\n</ng-container>\n\n<ng-template #withImage>\n <div class=\"w-full h-full flex flex-col gap-2\">\n <div class=\"flex-1 group relative\">\n <img\n class=\"w-full h-full object-cover border-2 border-gray-300 rounded-lg\"\n [alt]=\"altText\"\n loading=\"lazy\"\n [src]=\"previewUrl\"\n />\n <gn-ui-button\n [extraClass]=\"\n 'bg-gray-200 absolute right-2 bottom-2 invisible group-hover:visible'\n \"\n (buttonClick)=\"handleDelete()\"\n >\n <mat-icon class=\"material-symbols-outlined\">delete</mat-icon>\n </gn-ui-button>\n </div>\n <input\n *ngIf=\"showAltTextInput\"\n type=\"text\"\n class=\"py-3 px-2 border-2 border-gray-300 rounded-lg text-sm font-medium\"\n [placeholder]=\"'input.image.altTextPlaceholder' | translate\"\n [value]=\"altText\"\n (change)=\"handleAltTextChange($event)\"\n />\n <div class=\"flex flex-row gap-2\">\n <gn-ui-button\n [extraClass]=\"'bg-gray-200 font-bold'\"\n (buttonClick)=\"handleDelete()\"\n >\n <mat-icon class=\"material-symbols-outlined me-1\">delete</mat-icon>\n {{ 'input.image.delete' | translate }}\n </gn-ui-button>\n <gn-ui-button\n *ngIf=\"!showAltTextInput\"\n [extraClass]=\"'bg-gray-200 font-bold'\"\n (buttonClick)=\"toggleAltTextInput()\"\n >\n <mat-icon class=\"material-symbols-outlined me-1\">add</mat-icon>\n {{ 'input.image.displayAltTextInput' | translate }}\n </gn-ui-button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #withoutImage>\n <div class=\"w-full h-full flex flex-col gap-2\">\n <label\n gnUiFilesDrop\n class=\"block flex-1 border-2 border-dashed border-gray-300 rounded-lg p-6 flex flex-col items-center justify-center gap-4\"\n (dragFilesOver)=\"handleDragFilesOver($event)\"\n (dropFiles)=\"handleDropFiles($event)\"\n >\n <div class=\"w-14 h-14 rounded-md bg-gray-200 grid\">\n <mat-icon\n *ngIf=\"!dragFilesOver && !uploadProgress && !uploadError\"\n class=\"material-symbols-outlined place-self-center text-blue-500\"\n >image</mat-icon\n >\n <mat-icon\n *ngIf=\"dragFilesOver && !uploadProgress && !uploadError\"\n class=\"material-symbols-outlined place-self-center text-blue-500\"\n >add_box</mat-icon\n >\n <div *ngIf=\"uploadProgress\">\n <mat-progress-spinner\n class=\"place-self-center\"\n [diameter]=\"56\"\n [mode]=\"'determinate'\"\n [value]=\"uploadProgress\"\n ></mat-progress-spinner>\n <span\n class=\"text-sm font-medium relative inline-block width-[30px] bottom-[40px] left-[15px]\"\n >\n {{ uploadProgress }}%\n </span>\n </div>\n <mat-icon\n *ngIf=\"uploadError\"\n class=\"material-symbols-outlined place-self-center text-rose-500\"\n >broken_image</mat-icon\n >\n </div>\n <div class=\"flex flex-col items-center gap-1\">\n <p class=\"font-medium\">{{ getPrimaryText() | translate }}</p>\n <p\n class=\"text-sm\"\n [class]=\"\n uploadProgress || uploadError\n ? 'font-bold text-blue-500 cursor-pointer'\n : 'font-medium text-gray-500'\n \"\n (click)=\"handleSecondaryTextClick()\"\n >\n {{ getSecondaryText() | translate }}\n </p>\n </div>\n <input\n type=\"file\"\n class=\"hidden\"\n (change)=\"handleFileInput($event)\"\n [disabled]=\"showUrlInput || uploadProgress || uploadError\"\n />\n </label>\n <div *ngIf=\"!showUrlInput\" class=\"flex-none\">\n <gn-ui-button\n [extraClass]=\"'bg-gray-200 font-bold'\"\n (buttonClick)=\"displayUrlInput()\"\n >\n <mat-icon class=\"material-symbols-outlined me-1\">link</mat-icon>\n {{ 'input.image.displayUrlInput' | translate }}\n </gn-ui-button>\n </div>\n <div *ngIf=\"showUrlInput\" class=\"flex-none flex flex-col gap-2\">\n <div class=\"h-2\"></div>\n <div class=\"flex gap-2 items-center\">\n <div class=\"flex-1 flex rounded-lg\">\n <span\n class=\"material-symbols-outlined px-4 inline-flex items-center min-w-fit rounded-s-lg border-2 border-e-0 border-gray-300\"\n >link</span\n >\n <input\n type=\"text\"\n class=\"py-3 ps-1 block w-full border-2 border-s-0 border-e-0 border-gray-300 text-sm font-medium\"\n placeholder=\"https://exemple.com/image.jpg\"\n (change)=\"handleUrlChange($event)\"\n />\n <gn-ui-button\n class=\"px-1 inline-flex items-center min-w-fit rounded-e-lg border-2 border-s-0 border-gray-300 text-white\"\n [extraClass]=\"\n urlInputValue && !downloadError ? 'bg-blue-500' : 'bg-gray-500'\n \"\n [disabled]=\"!urlInputValue || downloadError\"\n (buttonClick)=\"downloadUrl()\"\n >\n <mat-icon class=\"material-symbols-outlined\">arrow_upward</mat-icon>\n </gn-ui-button>\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "gn-ui-button", inputs: ["type", "disabled", "extraClass"], outputs: ["buttonClick"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: FilesDropDirective, selector: "[gnUiFilesDrop]", outputs: ["dragFilesOver", "dropFiles"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i1$4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
26395
26584
|
}
|
|
26396
26585
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ImageInputComponent, decorators: [{
|
|
26397
26586
|
type: Component,
|
|
@@ -26402,11 +26591,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
26402
26591
|
FilesDropDirective,
|
|
26403
26592
|
MatProgressSpinnerModule,
|
|
26404
26593
|
TranslateModule,
|
|
26405
|
-
|
|
26406
|
-
|
|
26407
|
-
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { formControl: [{
|
|
26408
|
-
type: Input
|
|
26409
|
-
}], maxSizeMB: [{
|
|
26594
|
+
], template: "<ng-container *ngIf=\"previewUrl; then withImage; else withoutImage\">\n</ng-container>\n\n<ng-template #withImage>\n <div class=\"w-full h-full flex flex-col gap-2\">\n <div class=\"flex-1 group relative\">\n <img\n class=\"w-full h-full object-cover border-2 border-gray-300 rounded-lg\"\n [alt]=\"altText\"\n loading=\"lazy\"\n [src]=\"previewUrl\"\n />\n <gn-ui-button\n [extraClass]=\"\n 'bg-gray-200 absolute right-2 bottom-2 invisible group-hover:visible'\n \"\n (buttonClick)=\"handleDelete()\"\n >\n <mat-icon class=\"material-symbols-outlined\">delete</mat-icon>\n </gn-ui-button>\n </div>\n <input\n *ngIf=\"showAltTextInput\"\n type=\"text\"\n class=\"py-3 px-2 border-2 border-gray-300 rounded-lg text-sm font-medium\"\n [placeholder]=\"'input.image.altTextPlaceholder' | translate\"\n [value]=\"altText\"\n (change)=\"handleAltTextChange($event)\"\n />\n <div class=\"flex flex-row gap-2\">\n <gn-ui-button\n [extraClass]=\"'bg-gray-200 font-bold'\"\n (buttonClick)=\"handleDelete()\"\n >\n <mat-icon class=\"material-symbols-outlined me-1\">delete</mat-icon>\n {{ 'input.image.delete' | translate }}\n </gn-ui-button>\n <gn-ui-button\n *ngIf=\"!showAltTextInput\"\n [extraClass]=\"'bg-gray-200 font-bold'\"\n (buttonClick)=\"toggleAltTextInput()\"\n >\n <mat-icon class=\"material-symbols-outlined me-1\">add</mat-icon>\n {{ 'input.image.displayAltTextInput' | translate }}\n </gn-ui-button>\n </div>\n </div>\n</ng-template>\n\n<ng-template #withoutImage>\n <div class=\"w-full h-full flex flex-col gap-2\">\n <label\n gnUiFilesDrop\n class=\"block flex-1 border-2 border-dashed border-gray-300 rounded-lg p-6 flex flex-col items-center justify-center gap-4\"\n (dragFilesOver)=\"handleDragFilesOver($event)\"\n (dropFiles)=\"handleDropFiles($event)\"\n >\n <div class=\"w-14 h-14 rounded-md bg-gray-200 grid\">\n <mat-icon\n *ngIf=\"!dragFilesOver && !uploadProgress && !uploadError\"\n class=\"material-symbols-outlined place-self-center text-blue-500\"\n >image</mat-icon\n >\n <mat-icon\n *ngIf=\"dragFilesOver && !uploadProgress && !uploadError\"\n class=\"material-symbols-outlined place-self-center text-blue-500\"\n >add_box</mat-icon\n >\n <div *ngIf=\"uploadProgress\">\n <mat-progress-spinner\n class=\"place-self-center\"\n [diameter]=\"56\"\n [mode]=\"'determinate'\"\n [value]=\"uploadProgress\"\n ></mat-progress-spinner>\n <span\n class=\"text-sm font-medium relative inline-block width-[30px] bottom-[40px] left-[15px]\"\n >\n {{ uploadProgress }}%\n </span>\n </div>\n <mat-icon\n *ngIf=\"uploadError\"\n class=\"material-symbols-outlined place-self-center text-rose-500\"\n >broken_image</mat-icon\n >\n </div>\n <div class=\"flex flex-col items-center gap-1\">\n <p class=\"font-medium\">{{ getPrimaryText() | translate }}</p>\n <p\n class=\"text-sm\"\n [class]=\"\n uploadProgress || uploadError\n ? 'font-bold text-blue-500 cursor-pointer'\n : 'font-medium text-gray-500'\n \"\n (click)=\"handleSecondaryTextClick()\"\n >\n {{ getSecondaryText() | translate }}\n </p>\n </div>\n <input\n type=\"file\"\n class=\"hidden\"\n (change)=\"handleFileInput($event)\"\n [disabled]=\"showUrlInput || uploadProgress || uploadError\"\n />\n </label>\n <div *ngIf=\"!showUrlInput\" class=\"flex-none\">\n <gn-ui-button\n [extraClass]=\"'bg-gray-200 font-bold'\"\n (buttonClick)=\"displayUrlInput()\"\n >\n <mat-icon class=\"material-symbols-outlined me-1\">link</mat-icon>\n {{ 'input.image.displayUrlInput' | translate }}\n </gn-ui-button>\n </div>\n <div *ngIf=\"showUrlInput\" class=\"flex-none flex flex-col gap-2\">\n <div class=\"h-2\"></div>\n <div class=\"flex gap-2 items-center\">\n <div class=\"flex-1 flex rounded-lg\">\n <span\n class=\"material-symbols-outlined px-4 inline-flex items-center min-w-fit rounded-s-lg border-2 border-e-0 border-gray-300\"\n >link</span\n >\n <input\n type=\"text\"\n class=\"py-3 ps-1 block w-full border-2 border-s-0 border-e-0 border-gray-300 text-sm font-medium\"\n placeholder=\"https://exemple.com/image.jpg\"\n (change)=\"handleUrlChange($event)\"\n />\n <gn-ui-button\n class=\"px-1 inline-flex items-center min-w-fit rounded-e-lg border-2 border-s-0 border-gray-300 text-white\"\n [extraClass]=\"\n urlInputValue && !downloadError ? 'bg-blue-500' : 'bg-gray-500'\n \"\n [disabled]=\"!urlInputValue || downloadError\"\n (buttonClick)=\"downloadUrl()\"\n >\n <mat-icon class=\"material-symbols-outlined\">arrow_upward</mat-icon>\n </gn-ui-button>\n </div>\n </div>\n </div>\n </div>\n</ng-template>\n" }]
|
|
26595
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { maxSizeMB: [{
|
|
26410
26596
|
type: Input
|
|
26411
26597
|
}], previewUrl: [{
|
|
26412
26598
|
type: Input
|
|
@@ -28308,6 +28494,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
28308
28494
|
|
|
28309
28495
|
class SortableListComponent {
|
|
28310
28496
|
constructor() {
|
|
28497
|
+
this.addOptions = [];
|
|
28311
28498
|
this.elementsChange = new EventEmitter();
|
|
28312
28499
|
this.add = new EventEmitter();
|
|
28313
28500
|
}
|
|
@@ -30324,11 +30511,11 @@ class FuzzySearchComponent {
|
|
|
30324
30511
|
}
|
|
30325
30512
|
}
|
|
30326
30513
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FuzzySearchComponent, deps: [{ token: SearchFacade }, { token: SearchService }, { token: RecordsRepositoryInterface }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
30327
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FuzzySearchComponent, selector: "gn-ui-fuzzy-search", inputs: { autoFocus: "autoFocus" }, outputs: { itemSelected: "itemSelected", inputSubmitted: "inputSubmitted" }, viewQueries: [{ propertyName: "autocomplete", first: true, predicate: AutocompleteComponent, descendants: true }], ngImport: i0, template: "<gn-ui-autocomplete\n [placeholder]=\"'search.field.any.placeholder' | translate\"\n [displayWithFn]=\"displayWithFn\"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"handleItemSelection($event)\"\n (inputSubmitted)=\"handleInputSubmission($event)\"\n (inputCleared)=\"handleInputCleared()\"\n [value]=\"searchInputValue$ | async\"\n [
|
|
30514
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FuzzySearchComponent, selector: "gn-ui-fuzzy-search", inputs: { autoFocus: "autoFocus" }, outputs: { itemSelected: "itemSelected", inputSubmitted: "inputSubmitted" }, viewQueries: [{ propertyName: "autocomplete", first: true, predicate: AutocompleteComponent, descendants: true }], ngImport: i0, template: "<gn-ui-autocomplete\n [placeholder]=\"'search.field.any.placeholder' | translate\"\n [displayWithFn]=\"displayWithFn\"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"handleItemSelection($event)\"\n (inputSubmitted)=\"handleInputSubmission($event)\"\n (inputCleared)=\"handleInputCleared()\"\n [value]=\"searchInputValue$ | async\"\n [preventCompleteOnSelection]=\"true\"\n [autoFocus]=\"autoFocus\"\n></gn-ui-autocomplete>\n", styles: [""], dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "gn-ui-autocomplete", inputs: ["placeholder", "action", "value", "clearOnSelection", "preventCompleteOnSelection", "autoFocus", "minCharacterCount", "allowSubmit", "displayWithFn"], outputs: ["itemSelected", "inputSubmitted", "inputCleared"] }, { kind: "pipe", type: i1$3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
30328
30515
|
}
|
|
30329
30516
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FuzzySearchComponent, decorators: [{
|
|
30330
30517
|
type: Component,
|
|
30331
|
-
args: [{ selector: 'gn-ui-fuzzy-search', changeDetection: ChangeDetectionStrategy.OnPush, template: "<gn-ui-autocomplete\n [placeholder]=\"'search.field.any.placeholder' | translate\"\n [displayWithFn]=\"displayWithFn\"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"handleItemSelection($event)\"\n (inputSubmitted)=\"handleInputSubmission($event)\"\n (inputCleared)=\"handleInputCleared()\"\n [value]=\"searchInputValue$ | async\"\n [
|
|
30518
|
+
args: [{ selector: 'gn-ui-fuzzy-search', changeDetection: ChangeDetectionStrategy.OnPush, template: "<gn-ui-autocomplete\n [placeholder]=\"'search.field.any.placeholder' | translate\"\n [displayWithFn]=\"displayWithFn\"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"handleItemSelection($event)\"\n (inputSubmitted)=\"handleInputSubmission($event)\"\n (inputCleared)=\"handleInputCleared()\"\n [value]=\"searchInputValue$ | async\"\n [preventCompleteOnSelection]=\"true\"\n [autoFocus]=\"autoFocus\"\n></gn-ui-autocomplete>\n" }]
|
|
30332
30519
|
}], ctorParameters: function () { return [{ type: SearchFacade }, { type: SearchService }, { type: RecordsRepositoryInterface }]; }, propDecorators: { autocomplete: [{
|
|
30333
30520
|
type: ViewChild,
|
|
30334
30521
|
args: [AutocompleteComponent]
|
|
@@ -31350,6 +31537,11 @@ class ResultsTableContainerComponent {
|
|
|
31350
31537
|
next: () => {
|
|
31351
31538
|
this.recordsRepository.clearRecordDraft(uniqueIdentifier);
|
|
31352
31539
|
this.searchFacade.requestNewResults();
|
|
31540
|
+
this.notificationsService.showNotification({
|
|
31541
|
+
type: 'success',
|
|
31542
|
+
title: this.translateService.instant('editor.record.deleteSuccess.title'),
|
|
31543
|
+
text: `${this.translateService.instant('editor.record.deleteSuccess.body')}`,
|
|
31544
|
+
}, 2500);
|
|
31353
31545
|
},
|
|
31354
31546
|
error: (error) => {
|
|
31355
31547
|
this.notificationsService.showNotification({
|
|
@@ -34814,6 +35006,12 @@ const RECORD_ABSTRACT_FIELD = {
|
|
|
34814
35006
|
labelKey: marker('editor.record.form.field.abstract'),
|
|
34815
35007
|
},
|
|
34816
35008
|
};
|
|
35009
|
+
const CONTACTS_FOR_RESOURCE_FIELD = {
|
|
35010
|
+
model: 'contactsForResource',
|
|
35011
|
+
formFieldConfig: {
|
|
35012
|
+
labelKey: '',
|
|
35013
|
+
},
|
|
35014
|
+
};
|
|
34817
35015
|
const RECORD_GRAPHICAL_OVERVIEW_FIELD = {
|
|
34818
35016
|
model: 'overviews',
|
|
34819
35017
|
formFieldConfig: {
|
|
@@ -34875,7 +35073,7 @@ const DATA_MANAGERS_SECTION = {
|
|
|
34875
35073
|
labelKey: marker('editor.record.form.section.dataManagers.label'),
|
|
34876
35074
|
descriptionKey: marker('editor.record.form.section.dataManagers.description'),
|
|
34877
35075
|
hidden: false,
|
|
34878
|
-
fields: [],
|
|
35076
|
+
fields: [CONTACTS_FOR_RESOURCE_FIELD],
|
|
34879
35077
|
};
|
|
34880
35078
|
const DATA_POINT_OF_CONTACT_SECTION = {
|
|
34881
35079
|
labelKey: marker('editor.record.form.section.dataPointOfContact.label'),
|
|
@@ -34908,6 +35106,17 @@ const DEFAULT_CONFIGURATION = {
|
|
|
34908
35106
|
},
|
|
34909
35107
|
],
|
|
34910
35108
|
};
|
|
35109
|
+
/************************************************************
|
|
35110
|
+
*************** LICENSES *****************
|
|
35111
|
+
************************************************************
|
|
35112
|
+
*/
|
|
35113
|
+
const OPEN_DATA_LICENSES = [
|
|
35114
|
+
'etalab',
|
|
35115
|
+
'etalab-v2',
|
|
35116
|
+
'odbl',
|
|
35117
|
+
'odc-by',
|
|
35118
|
+
'pddl',
|
|
35119
|
+
];
|
|
34911
35120
|
|
|
34912
35121
|
const EDITOR_FEATURE_KEY = 'editor';
|
|
34913
35122
|
const initialEditorState = {
|
|
@@ -35540,7 +35749,7 @@ class FormFieldKeywordsComponent {
|
|
|
35540
35749
|
this.control.setValue(removeKeywords);
|
|
35541
35750
|
}
|
|
35542
35751
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormFieldKeywordsComponent, deps: [{ token: PlatformServiceInterface }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
35543
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormFieldKeywordsComponent, isStandalone: true, selector: "gn-ui-form-field-keywords", inputs: { control: "control" }, ngImport: i0, template: "<div class=\"flex flex-col gap-3\">\n <gn-ui-autocomplete\n [placeholder]=\"'Search for keywords in all thesaurus'\"\n [displayWithFn]=\"displayWithFn\"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"handleItemSelection($event)\"\n [
|
|
35752
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormFieldKeywordsComponent, isStandalone: true, selector: "gn-ui-form-field-keywords", inputs: { control: "control" }, ngImport: i0, template: "<div class=\"flex flex-col gap-3\">\n <gn-ui-autocomplete\n [placeholder]=\"'Search for keywords in all thesaurus'\"\n [displayWithFn]=\"displayWithFn\"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"handleItemSelection($event)\"\n [preventCompleteOnSelection]=\"true\"\n [minCharacterCount]=\"0\"\n [allowSubmit]=\"false\"\n ></gn-ui-autocomplete>\n <div class=\"flex gap-2 flex-wrap\">\n <gn-ui-badge\n *ngFor=\"let keyword of control.value; let index = index\"\n [removable]=\"true\"\n (badgeRemoveClicked)=\"removeKeyword(index)\"\n >{{ keyword.label }}</gn-ui-badge\n >\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: UiInputsModule }, { kind: "component", type: BadgeComponent, selector: "gn-ui-badge", inputs: ["clickable", "removable"], outputs: ["badgeRemoveClicked"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: UiWidgetsModule }, { kind: "component", type: AutocompleteComponent, selector: "gn-ui-autocomplete", inputs: ["placeholder", "action", "value", "clearOnSelection", "preventCompleteOnSelection", "autoFocus", "minCharacterCount", "allowSubmit", "displayWithFn"], outputs: ["itemSelected", "inputSubmitted", "inputCleared"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
35544
35753
|
}
|
|
35545
35754
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormFieldKeywordsComponent, decorators: [{
|
|
35546
35755
|
type: Component,
|
|
@@ -35550,7 +35759,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
35550
35759
|
CommonModule,
|
|
35551
35760
|
UiWidgetsModule,
|
|
35552
35761
|
AutocompleteComponent,
|
|
35553
|
-
], template: "<div class=\"flex flex-col gap-3\">\n <gn-ui-autocomplete\n [placeholder]=\"'Search for keywords in all thesaurus'\"\n [displayWithFn]=\"displayWithFn\"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"handleItemSelection($event)\"\n [
|
|
35762
|
+
], template: "<div class=\"flex flex-col gap-3\">\n <gn-ui-autocomplete\n [placeholder]=\"'Search for keywords in all thesaurus'\"\n [displayWithFn]=\"displayWithFn\"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"handleItemSelection($event)\"\n [preventCompleteOnSelection]=\"true\"\n [minCharacterCount]=\"0\"\n [allowSubmit]=\"false\"\n ></gn-ui-autocomplete>\n <div class=\"flex gap-2 flex-wrap\">\n <gn-ui-badge\n *ngFor=\"let keyword of control.value; let index = index\"\n [removable]=\"true\"\n (badgeRemoveClicked)=\"removeKeyword(index)\"\n >{{ keyword.label }}</gn-ui-badge\n >\n </div>\n</div>\n" }]
|
|
35554
35763
|
}], ctorParameters: function () { return [{ type: PlatformServiceInterface }]; }, propDecorators: { control: [{
|
|
35555
35764
|
type: Input
|
|
35556
35765
|
}] } });
|
|
@@ -35984,22 +36193,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
35984
36193
|
type: Input
|
|
35985
36194
|
}] } });
|
|
35986
36195
|
|
|
35987
|
-
const extractFileNameFromUrl = (url) => {
|
|
35988
|
-
const pattern = new RegExp(`attachments/([^/?#]+)(?:[/?#]|$)`, 'i');
|
|
35989
|
-
const match = url.match(pattern);
|
|
35990
|
-
return match ? match[1] : '';
|
|
35991
|
-
};
|
|
35992
36196
|
class OverviewUploadComponent {
|
|
35993
36197
|
constructor(recordsApiService, cd) {
|
|
35994
36198
|
this.recordsApiService = recordsApiService;
|
|
35995
36199
|
this.cd = cd;
|
|
35996
36200
|
this.overviewChange = new EventEmitter();
|
|
35997
36201
|
this.altTextChange = new EventEmitter();
|
|
35998
|
-
this.resourceAltText = ''; // = ressourceFileName by default
|
|
35999
|
-
this.resourceFileName = '';
|
|
36000
36202
|
this.errorHandle = (error) => {
|
|
36001
36203
|
console.error(error);
|
|
36002
|
-
this.resourceUrl =
|
|
36204
|
+
this.resourceUrl = '';
|
|
36003
36205
|
this.resourceAltText = '';
|
|
36004
36206
|
this.resourceFileName = '';
|
|
36005
36207
|
this.overviewChange.emit(null);
|
|
@@ -36010,15 +36212,14 @@ class OverviewUploadComponent {
|
|
|
36010
36212
|
this.recordsApiService.getAllResources(this.metadataUuid).subscribe({
|
|
36011
36213
|
next: (resources) => {
|
|
36012
36214
|
if (resources && resources.length > 0) {
|
|
36013
|
-
this.resourceUrl =
|
|
36014
|
-
this.
|
|
36015
|
-
|
|
36016
|
-
|
|
36017
|
-
|
|
36018
|
-
this.resourceFileName = extractFileNameFromUrl(resources[0]?.url);
|
|
36215
|
+
this.resourceUrl = resources[0].url;
|
|
36216
|
+
this.resourceFileName = resources[0].filename;
|
|
36217
|
+
if (!this.resourceAltText) {
|
|
36218
|
+
this.resourceAltText = this.resourceFileName;
|
|
36219
|
+
}
|
|
36019
36220
|
}
|
|
36020
36221
|
else {
|
|
36021
|
-
this.resourceUrl =
|
|
36222
|
+
this.resourceUrl = '';
|
|
36022
36223
|
this.resourceAltText = '';
|
|
36023
36224
|
this.resourceFileName = '';
|
|
36024
36225
|
}
|
|
@@ -36032,7 +36233,7 @@ class OverviewUploadComponent {
|
|
|
36032
36233
|
.putResource(this.metadataUuid, file, 'public')
|
|
36033
36234
|
.subscribe({
|
|
36034
36235
|
next: (resource) => {
|
|
36035
|
-
this.resourceUrl =
|
|
36236
|
+
this.resourceUrl = resource.url;
|
|
36036
36237
|
this.resourceAltText = resource.filename;
|
|
36037
36238
|
this.overviewChange.emit({
|
|
36038
36239
|
url: new URL(resource.url),
|
|
@@ -36048,7 +36249,7 @@ class OverviewUploadComponent {
|
|
|
36048
36249
|
.putResourceFromURL(this.metadataUuid, url, 'public')
|
|
36049
36250
|
.subscribe({
|
|
36050
36251
|
next: (resource) => {
|
|
36051
|
-
this.resourceUrl =
|
|
36252
|
+
this.resourceUrl = resource.url;
|
|
36052
36253
|
this.resourceAltText = resource.filename;
|
|
36053
36254
|
this.overviewChange.emit({
|
|
36054
36255
|
url: new URL(resource.url),
|
|
@@ -36062,18 +36263,19 @@ class OverviewUploadComponent {
|
|
|
36062
36263
|
handleAltTextChange(newAltText) {
|
|
36063
36264
|
this.resourceAltText = newAltText;
|
|
36064
36265
|
this.overviewChange.emit({
|
|
36065
|
-
url: this.resourceUrl,
|
|
36266
|
+
url: new URL(this.resourceUrl),
|
|
36066
36267
|
description: this.resourceAltText,
|
|
36067
36268
|
});
|
|
36068
36269
|
this.cd.markForCheck();
|
|
36069
36270
|
}
|
|
36070
36271
|
handleDelete() {
|
|
36272
|
+
//this.formControl.markAsDirty()
|
|
36071
36273
|
this.recordsApiService
|
|
36072
36274
|
.delResource(this.metadataUuid, this.resourceFileName)
|
|
36073
36275
|
.subscribe({
|
|
36074
36276
|
next: () => {
|
|
36075
|
-
this.resourceAltText =
|
|
36076
|
-
this.resourceUrl =
|
|
36277
|
+
this.resourceAltText = '';
|
|
36278
|
+
this.resourceUrl = '';
|
|
36077
36279
|
this.overviewChange.emit(null);
|
|
36078
36280
|
this.cd.markForCheck();
|
|
36079
36281
|
},
|
|
@@ -36092,18 +36294,18 @@ class OverviewUploadComponent {
|
|
|
36092
36294
|
else {
|
|
36093
36295
|
return;
|
|
36094
36296
|
}
|
|
36095
|
-
if (overview.description
|
|
36297
|
+
if (overview.description) {
|
|
36096
36298
|
this.resourceAltText = overview.description;
|
|
36097
36299
|
this.cd.markForCheck();
|
|
36098
36300
|
}
|
|
36099
36301
|
}
|
|
36100
36302
|
}
|
|
36101
36303
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OverviewUploadComponent, deps: [{ token: RecordsApiService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
36102
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: OverviewUploadComponent, isStandalone: true, selector: "gn-ui-overview-upload", inputs: { metadataUuid: "metadataUuid", formControl: "formControl" }, outputs: { overviewChange: "overviewChange", altTextChange: "altTextChange" }, usesOnChanges: true, ngImport: i0, template: "<gn-ui-image-input\n [maxSizeMB]=\"5\"\n [previewUrl]=\"resourceUrl\"\n [altText]=\"resourceAltText\"\n
|
|
36304
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: OverviewUploadComponent, isStandalone: true, selector: "gn-ui-overview-upload", inputs: { metadataUuid: "metadataUuid", formControl: "formControl" }, outputs: { overviewChange: "overviewChange", altTextChange: "altTextChange" }, usesOnChanges: true, ngImport: i0, template: "<gn-ui-image-input\n [maxSizeMB]=\"5\"\n [previewUrl]=\"resourceUrl\"\n [altText]=\"resourceAltText\"\n (fileChange)=\"handleFileChange($event)\"\n (urlChange)=\"handleUrlChange($event)\"\n (altTextChange)=\"handleAltTextChange($event)\"\n (delete)=\"handleDelete()\"\n></gn-ui-image-input>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: UiInputsModule }, { kind: "component", type: ImageInputComponent, selector: "gn-ui-image-input", inputs: ["maxSizeMB", "previewUrl", "altText", "uploadProgress", "uploadError"], outputs: ["fileChange", "urlChange", "uploadCancel", "delete", "altTextChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
36103
36305
|
}
|
|
36104
36306
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: OverviewUploadComponent, decorators: [{
|
|
36105
36307
|
type: Component,
|
|
36106
|
-
args: [{ selector: 'gn-ui-overview-upload', standalone: true, imports: [CommonModule, UiInputsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<gn-ui-image-input\n [maxSizeMB]=\"5\"\n [previewUrl]=\"resourceUrl\"\n [altText]=\"resourceAltText\"\n
|
|
36308
|
+
args: [{ selector: 'gn-ui-overview-upload', standalone: true, imports: [CommonModule, UiInputsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<gn-ui-image-input\n [maxSizeMB]=\"5\"\n [previewUrl]=\"resourceUrl\"\n [altText]=\"resourceAltText\"\n (fileChange)=\"handleFileChange($event)\"\n (urlChange)=\"handleUrlChange($event)\"\n (altTextChange)=\"handleAltTextChange($event)\"\n (delete)=\"handleDelete()\"\n></gn-ui-image-input>\n" }]
|
|
36107
36309
|
}], ctorParameters: function () { return [{ type: RecordsApiService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { metadataUuid: [{
|
|
36108
36310
|
type: Input
|
|
36109
36311
|
}], formControl: [{
|
|
@@ -36130,6 +36332,290 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
36130
36332
|
type: Input
|
|
36131
36333
|
}] } });
|
|
36132
36334
|
|
|
36335
|
+
const RoleValues = [
|
|
36336
|
+
'unspecified',
|
|
36337
|
+
'other',
|
|
36338
|
+
'author',
|
|
36339
|
+
'collaborator',
|
|
36340
|
+
'contributor',
|
|
36341
|
+
'custodian',
|
|
36342
|
+
'distributor',
|
|
36343
|
+
'editor',
|
|
36344
|
+
'funder',
|
|
36345
|
+
'mediator',
|
|
36346
|
+
'originator',
|
|
36347
|
+
'owner',
|
|
36348
|
+
'point_of_contact',
|
|
36349
|
+
'principal_investigator',
|
|
36350
|
+
'processor',
|
|
36351
|
+
'publisher',
|
|
36352
|
+
'resource_provider',
|
|
36353
|
+
'rights_holder',
|
|
36354
|
+
'sponsor',
|
|
36355
|
+
'stakeholder',
|
|
36356
|
+
'user', // Party who uses the resource
|
|
36357
|
+
];
|
|
36358
|
+
const RoleLabels = new Map([
|
|
36359
|
+
['unspecified', marker('domain.contact.role.unspecified')],
|
|
36360
|
+
['other', marker('domain.contact.role.other')],
|
|
36361
|
+
['author', marker('domain.contact.role.author')],
|
|
36362
|
+
['collaborator', marker('domain.contact.role.collaborator')],
|
|
36363
|
+
['contributor', marker('domain.contact.role.contributor')],
|
|
36364
|
+
['custodian', marker('domain.contact.role.custodian')],
|
|
36365
|
+
['distributor', marker('domain.contact.role.distributor')],
|
|
36366
|
+
['editor', marker('domain.contact.role.editor')],
|
|
36367
|
+
['funder', marker('domain.contact.role.funder')],
|
|
36368
|
+
['mediator', marker('domain.contact.role.mediator')],
|
|
36369
|
+
['originator', marker('domain.contact.role.originator')],
|
|
36370
|
+
['owner', marker('domain.contact.role.owner')],
|
|
36371
|
+
['point_of_contact', marker('domain.contact.role.point_of_contact')],
|
|
36372
|
+
[
|
|
36373
|
+
'principal_investigator',
|
|
36374
|
+
marker('domain.contact.role.principal_investigator'),
|
|
36375
|
+
],
|
|
36376
|
+
['processor', marker('domain.contact.role.processor')],
|
|
36377
|
+
['publisher', marker('domain.contact.role.publisher')],
|
|
36378
|
+
['resource_provider', marker('domain.contact.role.resource_provider')],
|
|
36379
|
+
['rights_holder', marker('domain.contact.role.rights_holder')],
|
|
36380
|
+
['sponsor', marker('domain.contact.role.sponsor')],
|
|
36381
|
+
['stakeholder', marker('domain.contact.role.stakeholder')],
|
|
36382
|
+
['user', marker('domain.contact.role.user')],
|
|
36383
|
+
]);
|
|
36384
|
+
|
|
36385
|
+
marker('domain.record.updateFrequency.unknown');
|
|
36386
|
+
marker('domain.record.updateFrequency.notPlanned');
|
|
36387
|
+
marker('domain.record.updateFrequency.asNeeded');
|
|
36388
|
+
marker('domain.record.updateFrequency.irregular');
|
|
36389
|
+
marker('domain.record.updateFrequency.continual');
|
|
36390
|
+
marker('domain.record.updateFrequency.periodic');
|
|
36391
|
+
marker('domain.record.updateFrequency.day');
|
|
36392
|
+
marker('domain.record.updateFrequency.week');
|
|
36393
|
+
marker('domain.record.updateFrequency.month');
|
|
36394
|
+
marker('domain.record.updateFrequency.year');
|
|
36395
|
+
marker('domain.record.status.completed');
|
|
36396
|
+
marker('domain.record.status.ongoing');
|
|
36397
|
+
marker('domain.record.status.under_development');
|
|
36398
|
+
marker('domain.record.status.deprecated');
|
|
36399
|
+
marker('domain.record.status.removed');
|
|
36400
|
+
const RecordStatusValues = [
|
|
36401
|
+
'completed',
|
|
36402
|
+
'ongoing',
|
|
36403
|
+
'under_development',
|
|
36404
|
+
'deprecated',
|
|
36405
|
+
'removed',
|
|
36406
|
+
];
|
|
36407
|
+
|
|
36408
|
+
class ContactCardComponent {
|
|
36409
|
+
constructor() {
|
|
36410
|
+
this.removable = true;
|
|
36411
|
+
this.contactRemoved = new EventEmitter();
|
|
36412
|
+
}
|
|
36413
|
+
removeContact(contact) {
|
|
36414
|
+
this.contactRemoved.emit(contact);
|
|
36415
|
+
}
|
|
36416
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContactCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
36417
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ContactCardComponent, isStandalone: true, selector: "gn-ui-contact-card", inputs: { contact: "contact", removable: "removable" }, outputs: { contactRemoved: "contactRemoved" }, ngImport: i0, template: "<div class=\"flex flex-row gap-4 items-center\">\n <div class=\"flex flex-row border border-gray-200 rounded-xl p-4 gap-4 w-full\">\n <gn-ui-thumbnail\n class=\"w-[56px] h-[56px] rounded-[4px]\"\n [thumbnailUrl]=\"contact.organization.logoUrl?.href\"\n [fit]=\"'contain'\"\n ></gn-ui-thumbnail>\n <div class=\"flex flex-col w-full\">\n <div class=\"flex flex-row justify-between\">\n <span class=\"flex flex-wrap font-bold w-full\"\n >{{ contact.firstName }} {{ contact.lastName }}</span\n >\n </div>\n <div>{{ contact.email }}</div>\n </div>\n </div>\n <gn-ui-button\n *ngIf=\"removable\"\n data-test=\"removeContactButton\"\n type=\"light\"\n extraClass=\"w-[20px] h-[20px] flex items-center justify-center\"\n (buttonClick)=\"removeContact(contact)\"\n ><span class=\"material-symbols-outlined\"> close </span>\n </gn-ui-button>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: ButtonComponent, selector: "gn-ui-button", inputs: ["type", "disabled", "extraClass"], outputs: ["buttonClick"] }, { kind: "component", type: ThumbnailComponent, selector: "gn-ui-thumbnail", inputs: ["thumbnailUrl", "fit"], outputs: ["placeholderShown"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
36418
|
+
}
|
|
36419
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ContactCardComponent, decorators: [{
|
|
36420
|
+
type: Component,
|
|
36421
|
+
args: [{ selector: 'gn-ui-contact-card', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, MatIconModule, ButtonComponent, ThumbnailComponent], template: "<div class=\"flex flex-row gap-4 items-center\">\n <div class=\"flex flex-row border border-gray-200 rounded-xl p-4 gap-4 w-full\">\n <gn-ui-thumbnail\n class=\"w-[56px] h-[56px] rounded-[4px]\"\n [thumbnailUrl]=\"contact.organization.logoUrl?.href\"\n [fit]=\"'contain'\"\n ></gn-ui-thumbnail>\n <div class=\"flex flex-col w-full\">\n <div class=\"flex flex-row justify-between\">\n <span class=\"flex flex-wrap font-bold w-full\"\n >{{ contact.firstName }} {{ contact.lastName }}</span\n >\n </div>\n <div>{{ contact.email }}</div>\n </div>\n </div>\n <gn-ui-button\n *ngIf=\"removable\"\n data-test=\"removeContactButton\"\n type=\"light\"\n extraClass=\"w-[20px] h-[20px] flex items-center justify-center\"\n (buttonClick)=\"removeContact(contact)\"\n ><span class=\"material-symbols-outlined\"> close </span>\n </gn-ui-button>\n</div>\n" }]
|
|
36422
|
+
}], propDecorators: { contact: [{
|
|
36423
|
+
type: Input
|
|
36424
|
+
}], removable: [{
|
|
36425
|
+
type: Input
|
|
36426
|
+
}], contactRemoved: [{
|
|
36427
|
+
type: Output
|
|
36428
|
+
}] } });
|
|
36429
|
+
|
|
36430
|
+
class FormFieldContactsForResourceComponent {
|
|
36431
|
+
constructor(platformServiceInterface, organizationsServiceInterface, changeDetectorRef) {
|
|
36432
|
+
this.platformServiceInterface = platformServiceInterface;
|
|
36433
|
+
this.organizationsServiceInterface = organizationsServiceInterface;
|
|
36434
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
36435
|
+
this.subscription = new Subscription();
|
|
36436
|
+
this.contactsForRessourceByRole = new Map();
|
|
36437
|
+
this.contactsAsDynElemByRole = new Map();
|
|
36438
|
+
this.rolesToPick = [
|
|
36439
|
+
'resource_provider',
|
|
36440
|
+
'custodian',
|
|
36441
|
+
'owner',
|
|
36442
|
+
'point_of_contact',
|
|
36443
|
+
'author',
|
|
36444
|
+
];
|
|
36445
|
+
this.roleSectionsToDisplay = [];
|
|
36446
|
+
this.allOrganizations = new Map();
|
|
36447
|
+
/**
|
|
36448
|
+
* gn-ui-autocomplete
|
|
36449
|
+
*/
|
|
36450
|
+
this.displayWithFn = (user) => `${user.name} ${user.surname} ${user.organisation ? `(${user.organisation})` : ''}`;
|
|
36451
|
+
/**
|
|
36452
|
+
* gn-ui-autocomplete
|
|
36453
|
+
*/
|
|
36454
|
+
this.autoCompleteAction = (query) => {
|
|
36455
|
+
const fuzzyFilter = createFuzzyFilter(query);
|
|
36456
|
+
return this.allUsers$.pipe(switchMap((users) => [
|
|
36457
|
+
users.filter((user) => fuzzyFilter(user.username)),
|
|
36458
|
+
]), map$1((results) => results.slice(0, 10)), debounceTime$1(300), distinctUntilChanged$1());
|
|
36459
|
+
};
|
|
36460
|
+
this.allUsers$ = this.platformServiceInterface.getUsers();
|
|
36461
|
+
}
|
|
36462
|
+
async ngOnInit() {
|
|
36463
|
+
this.allOrganizations = new Map((await firstValueFrom(this.organizationsServiceInterface.organisations$)).map((organization) => [organization.name, organization]));
|
|
36464
|
+
this.updateContactsForRessource();
|
|
36465
|
+
this.manageRoleSectionsToDisplay(this.control.value);
|
|
36466
|
+
this.filterRolesToPick();
|
|
36467
|
+
this.changeDetectorRef.markForCheck();
|
|
36468
|
+
this.subscription.add(this.control.valueChanges.subscribe((contactsForResource) => {
|
|
36469
|
+
this.updateContactsForRessource();
|
|
36470
|
+
this.manageRoleSectionsToDisplay(contactsForResource);
|
|
36471
|
+
this.filterRolesToPick();
|
|
36472
|
+
this.changeDetectorRef.markForCheck();
|
|
36473
|
+
}));
|
|
36474
|
+
}
|
|
36475
|
+
addRoleToDisplay(roleToAdd) {
|
|
36476
|
+
this.roleSectionsToDisplay.push(roleToAdd);
|
|
36477
|
+
this.filterRolesToPick();
|
|
36478
|
+
}
|
|
36479
|
+
filterRolesToPick() {
|
|
36480
|
+
this.rolesToPick = this.rolesToPick.filter((role) => !this.roleSectionsToDisplay.includes(role));
|
|
36481
|
+
}
|
|
36482
|
+
updateContactsForRessource() {
|
|
36483
|
+
this.contactsForRessourceByRole = this.control.value.reduce((acc, contact) => {
|
|
36484
|
+
const completeOrganization = this.allOrganizations.get(contact.organization.name);
|
|
36485
|
+
const updatedContact = {
|
|
36486
|
+
...contact,
|
|
36487
|
+
organization: completeOrganization ??
|
|
36488
|
+
{ name: contact.organization.name },
|
|
36489
|
+
};
|
|
36490
|
+
if (!acc.has(contact.role)) {
|
|
36491
|
+
acc.set(contact.role, []);
|
|
36492
|
+
}
|
|
36493
|
+
acc.get(contact.role).push(updatedContact);
|
|
36494
|
+
return acc;
|
|
36495
|
+
}, new Map());
|
|
36496
|
+
this.contactsAsDynElemByRole = this.control.value.reduce((acc, contact) => {
|
|
36497
|
+
const completeOrganization = this.allOrganizations.get(contact.organization.name);
|
|
36498
|
+
const updatedContact = {
|
|
36499
|
+
...contact,
|
|
36500
|
+
organization: completeOrganization ??
|
|
36501
|
+
{ name: contact.organization.name },
|
|
36502
|
+
};
|
|
36503
|
+
const contactAsDynElem = {
|
|
36504
|
+
component: ContactCardComponent,
|
|
36505
|
+
inputs: {
|
|
36506
|
+
contact: updatedContact,
|
|
36507
|
+
removable: false,
|
|
36508
|
+
},
|
|
36509
|
+
};
|
|
36510
|
+
if (!acc.has(contact.role)) {
|
|
36511
|
+
acc.set(contact.role, []);
|
|
36512
|
+
}
|
|
36513
|
+
acc.get(contact.role).push(contactAsDynElem);
|
|
36514
|
+
return acc;
|
|
36515
|
+
}, new Map());
|
|
36516
|
+
this.changeDetectorRef.markForCheck();
|
|
36517
|
+
}
|
|
36518
|
+
manageRoleSectionsToDisplay(contactsForResource) {
|
|
36519
|
+
const roles = contactsForResource.map((contact) => contact.role);
|
|
36520
|
+
roles.forEach((role) => {
|
|
36521
|
+
if (!this.roleSectionsToDisplay.includes(role)) {
|
|
36522
|
+
this.roleSectionsToDisplay.push(role);
|
|
36523
|
+
}
|
|
36524
|
+
});
|
|
36525
|
+
}
|
|
36526
|
+
removeContact(index) {
|
|
36527
|
+
const newContactsforRessource = this.control.value.filter((_, i) => i !== index);
|
|
36528
|
+
this.control.setValue(newContactsforRessource);
|
|
36529
|
+
}
|
|
36530
|
+
handleContactsChanged(event) {
|
|
36531
|
+
const newContactsOrdered = event.map((contactAsDynElem) => contactAsDynElem.inputs['contact']);
|
|
36532
|
+
const role = newContactsOrdered[0].role;
|
|
36533
|
+
this.contactsForRessourceByRole.set(role, newContactsOrdered);
|
|
36534
|
+
const newControlValue = Array.from(this.contactsForRessourceByRole.values()).flat();
|
|
36535
|
+
this.control.setValue(newControlValue);
|
|
36536
|
+
}
|
|
36537
|
+
roleToLabel(role) {
|
|
36538
|
+
return RoleLabels.get(role);
|
|
36539
|
+
}
|
|
36540
|
+
/**
|
|
36541
|
+
* gn-ui-autocomplete
|
|
36542
|
+
*/
|
|
36543
|
+
addContact(contact, role) {
|
|
36544
|
+
const newContactsForRessource = {
|
|
36545
|
+
firstName: contact.name ?? '',
|
|
36546
|
+
lastName: contact.surname ?? '',
|
|
36547
|
+
organization: this.allOrganizations.get(contact.organisation) ??
|
|
36548
|
+
{ name: contact.organisation },
|
|
36549
|
+
email: contact.email ?? '',
|
|
36550
|
+
role,
|
|
36551
|
+
address: '',
|
|
36552
|
+
phone: '',
|
|
36553
|
+
position: '',
|
|
36554
|
+
};
|
|
36555
|
+
const newControlValue = [...this.control.value, newContactsForRessource];
|
|
36556
|
+
this.control.setValue(newControlValue);
|
|
36557
|
+
}
|
|
36558
|
+
ngOnDestroy() {
|
|
36559
|
+
this.subscription.unsubscribe();
|
|
36560
|
+
}
|
|
36561
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormFieldContactsForResourceComponent, deps: [{ token: PlatformServiceInterface }, { token: OrganizationsServiceInterface }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
36562
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormFieldContactsForResourceComponent, isStandalone: true, selector: "gn-ui-form-field-contacts-for-resource", inputs: { control: "control" }, ngImport: i0, template: "<div class=\"flex flex-col gap-3\">\n <div class=\"flex flex-row flex-wrap gap-2\" data-test=\"rolesToPick\">\n <ng-container *ngFor=\"let role of rolesToPick\">\n <gn-ui-button\n extraClass=\"px-2 py-1.5\"\n (buttonClick)=\"addRoleToDisplay(role)\"\n >\n <div class=\"flex flex-row gap-1 items-center\">\n <span class=\"text-primary text-[20px] leading-[0] font-bold pb-[5px]\"\n >₊</span\n >\n <span class=\"font-bold\" translate>{{ roleToLabel(role) }}</span>\n </div>\n </gn-ui-button>\n </ng-container>\n </div>\n <div\n class=\"mt-8\"\n *ngIf=\"\n roleSectionsToDisplay && roleSectionsToDisplay.length > 0;\n else noContact\n \"\n data-test=\"displayedRoles\"\n >\n <div\n *ngFor=\"\n let role of roleSectionsToDisplay;\n let index = index;\n let isLast = last\n \"\n class=\"flex flex-col gap-4\"\n >\n <div class=\"flex flex-row justify-between\">\n <span class=\"font-bold text-base\" translate>{{\n roleToLabel(role)\n }}</span>\n </div>\n\n <gn-ui-autocomplete\n [placeholder]=\"'Choose a contact'\"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"addContact($event, role)\"\n [displayWithFn]=\"displayWithFn\"\n [minCharacterCount]=\"1\"\n [clearOnSelection]=\"true\"\n >\n </gn-ui-autocomplete>\n\n <ng-container *ngIf=\"contactsForRessourceByRole.get(role) as contacts\">\n <ng-container *ngIf=\"contacts.length > 1\">\n <gn-ui-sortable-list\n [elements]=\"contactsAsDynElemByRole.get(role)\"\n (elementsChange)=\"handleContactsChanged($event)\"\n ></gn-ui-sortable-list>\n </ng-container>\n <ng-container *ngIf=\"contacts.length === 1\">\n <ng-container *ngFor=\"let contact of contacts\">\n <gn-ui-contact-card\n [contact]=\"contact\"\n (contactRemoved)=\"removeContact(index)\"\n ></gn-ui-contact-card> </ng-container\n ></ng-container>\n </ng-container>\n\n <hr class=\"border-t-[#D6D3D1] mt-4 mb-6\" *ngIf=\"!isLast\" />\n </div>\n </div>\n <ng-template #noContact>\n <div\n class=\"p-4 border border-primary bg-primary-lightest rounded-lg\"\n translate\n >\n editor.record.form.field.contactsForResource.noContact\n </div>\n </ng-template>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: UiInputsModule }, { kind: "component", type: ButtonComponent, selector: "gn-ui-button", inputs: ["type", "disabled", "extraClass"], outputs: ["buttonClick"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: UiWidgetsModule }, { kind: "component", type: AutocompleteComponent, selector: "gn-ui-autocomplete", inputs: ["placeholder", "action", "value", "clearOnSelection", "preventCompleteOnSelection", "autoFocus", "minCharacterCount", "allowSubmit", "displayWithFn"], outputs: ["itemSelected", "inputSubmitted", "inputCleared"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "component", type: ContactCardComponent, selector: "gn-ui-contact-card", inputs: ["contact", "removable"], outputs: ["contactRemoved"] }, { kind: "component", type: SortableListComponent, selector: "gn-ui-sortable-list", inputs: ["elements", "addOptions"], outputs: ["elementsChange", "add"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
36563
|
+
}
|
|
36564
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormFieldContactsForResourceComponent, decorators: [{
|
|
36565
|
+
type: Component,
|
|
36566
|
+
args: [{ selector: 'gn-ui-form-field-contacts-for-resource', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
36567
|
+
DropdownSelectorComponent,
|
|
36568
|
+
UiInputsModule,
|
|
36569
|
+
CommonModule,
|
|
36570
|
+
UiWidgetsModule,
|
|
36571
|
+
AutocompleteComponent,
|
|
36572
|
+
TranslateModule,
|
|
36573
|
+
ContactCardComponent,
|
|
36574
|
+
SortableListComponent,
|
|
36575
|
+
], template: "<div class=\"flex flex-col gap-3\">\n <div class=\"flex flex-row flex-wrap gap-2\" data-test=\"rolesToPick\">\n <ng-container *ngFor=\"let role of rolesToPick\">\n <gn-ui-button\n extraClass=\"px-2 py-1.5\"\n (buttonClick)=\"addRoleToDisplay(role)\"\n >\n <div class=\"flex flex-row gap-1 items-center\">\n <span class=\"text-primary text-[20px] leading-[0] font-bold pb-[5px]\"\n >₊</span\n >\n <span class=\"font-bold\" translate>{{ roleToLabel(role) }}</span>\n </div>\n </gn-ui-button>\n </ng-container>\n </div>\n <div\n class=\"mt-8\"\n *ngIf=\"\n roleSectionsToDisplay && roleSectionsToDisplay.length > 0;\n else noContact\n \"\n data-test=\"displayedRoles\"\n >\n <div\n *ngFor=\"\n let role of roleSectionsToDisplay;\n let index = index;\n let isLast = last\n \"\n class=\"flex flex-col gap-4\"\n >\n <div class=\"flex flex-row justify-between\">\n <span class=\"font-bold text-base\" translate>{{\n roleToLabel(role)\n }}</span>\n </div>\n\n <gn-ui-autocomplete\n [placeholder]=\"'Choose a contact'\"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"addContact($event, role)\"\n [displayWithFn]=\"displayWithFn\"\n [minCharacterCount]=\"1\"\n [clearOnSelection]=\"true\"\n >\n </gn-ui-autocomplete>\n\n <ng-container *ngIf=\"contactsForRessourceByRole.get(role) as contacts\">\n <ng-container *ngIf=\"contacts.length > 1\">\n <gn-ui-sortable-list\n [elements]=\"contactsAsDynElemByRole.get(role)\"\n (elementsChange)=\"handleContactsChanged($event)\"\n ></gn-ui-sortable-list>\n </ng-container>\n <ng-container *ngIf=\"contacts.length === 1\">\n <ng-container *ngFor=\"let contact of contacts\">\n <gn-ui-contact-card\n [contact]=\"contact\"\n (contactRemoved)=\"removeContact(index)\"\n ></gn-ui-contact-card> </ng-container\n ></ng-container>\n </ng-container>\n\n <hr class=\"border-t-[#D6D3D1] mt-4 mb-6\" *ngIf=\"!isLast\" />\n </div>\n </div>\n <ng-template #noContact>\n <div\n class=\"p-4 border border-primary bg-primary-lightest rounded-lg\"\n translate\n >\n editor.record.form.field.contactsForResource.noContact\n </div>\n </ng-template>\n</div>\n" }]
|
|
36576
|
+
}], ctorParameters: function () { return [{ type: PlatformServiceInterface }, { type: OrganizationsServiceInterface }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { control: [{
|
|
36577
|
+
type: Input
|
|
36578
|
+
}] } });
|
|
36579
|
+
|
|
36580
|
+
class FormFieldOpenDataComponent {
|
|
36581
|
+
constructor() {
|
|
36582
|
+
this.value = false;
|
|
36583
|
+
this.visibilityChange = new EventEmitter();
|
|
36584
|
+
}
|
|
36585
|
+
get config() {
|
|
36586
|
+
return OPEN_DATA_LICENSES;
|
|
36587
|
+
}
|
|
36588
|
+
ngOnInit() {
|
|
36589
|
+
this.initToggle();
|
|
36590
|
+
this.subscription = new Subscription();
|
|
36591
|
+
this.subscription.add(this.control.valueChanges.subscribe((value) => {
|
|
36592
|
+
this.value = this.config.includes(value[0].text);
|
|
36593
|
+
this.visibilityChange.emit(this.value);
|
|
36594
|
+
}));
|
|
36595
|
+
}
|
|
36596
|
+
initToggle() {
|
|
36597
|
+
this.value = this.config.includes(this.control.value[0].text);
|
|
36598
|
+
this.visibilityChange.emit(this.value);
|
|
36599
|
+
}
|
|
36600
|
+
onOpenDataToggled(boolean) {
|
|
36601
|
+
if (boolean) {
|
|
36602
|
+
this.control.setValue([{ text: this.config[0] }]);
|
|
36603
|
+
}
|
|
36604
|
+
this.value = !this.value;
|
|
36605
|
+
this.visibilityChange.emit(boolean);
|
|
36606
|
+
}
|
|
36607
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormFieldOpenDataComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
36608
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormFieldOpenDataComponent, isStandalone: true, selector: "gn-ui-form-field-open-data", inputs: { control: "control" }, outputs: { visibilityChange: "visibilityChange" }, ngImport: i0, template: "<gn-ui-check-toggle\n [label]=\"'editor.record.form.classification.opendata' | translate\"\n [value]=\"value\"\n (toggled)=\"onOpenDataToggled($event)\"\n data-cy=\"openDataToggle\"\n></gn-ui-check-toggle>\n", styles: [""], dependencies: [{ kind: "component", type: CheckToggleComponent, selector: "gn-ui-check-toggle", inputs: ["title", "label", "value", "color"], outputs: ["toggled"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
36609
|
+
}
|
|
36610
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormFieldOpenDataComponent, decorators: [{
|
|
36611
|
+
type: Component,
|
|
36612
|
+
args: [{ selector: 'gn-ui-form-field-open-data', standalone: true, imports: [CheckToggleComponent, TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<gn-ui-check-toggle\n [label]=\"'editor.record.form.classification.opendata' | translate\"\n [value]=\"value\"\n (toggled)=\"onOpenDataToggled($event)\"\n data-cy=\"openDataToggle\"\n></gn-ui-check-toggle>\n" }]
|
|
36613
|
+
}], propDecorators: { control: [{
|
|
36614
|
+
type: Input
|
|
36615
|
+
}], visibilityChange: [{
|
|
36616
|
+
type: Output
|
|
36617
|
+
}] } });
|
|
36618
|
+
|
|
36133
36619
|
class FormFieldComponent {
|
|
36134
36620
|
set value(v) {
|
|
36135
36621
|
this.formControl.setValue(v, {
|
|
@@ -36138,6 +36624,7 @@ class FormFieldComponent {
|
|
|
36138
36624
|
}
|
|
36139
36625
|
constructor(facade) {
|
|
36140
36626
|
this.facade = facade;
|
|
36627
|
+
this.isHidden = false;
|
|
36141
36628
|
this.metadataUuid$ = this.facade.record$.pipe(take(1), map$1((record) => record.uniqueIdentifier));
|
|
36142
36629
|
this.formControl = new FormControl();
|
|
36143
36630
|
this.valueChange = this.formControl.valueChanges;
|
|
@@ -36145,6 +36632,9 @@ class FormFieldComponent {
|
|
|
36145
36632
|
focusTitleInput() {
|
|
36146
36633
|
this.titleInput.nativeElement.children[0].focus();
|
|
36147
36634
|
}
|
|
36635
|
+
onVisibilityChange(visibility) {
|
|
36636
|
+
this.isHidden = visibility;
|
|
36637
|
+
}
|
|
36148
36638
|
get isTitle() {
|
|
36149
36639
|
return this.model === 'title';
|
|
36150
36640
|
}
|
|
@@ -36178,11 +36668,17 @@ class FormFieldComponent {
|
|
|
36178
36668
|
get isKeywords() {
|
|
36179
36669
|
return this.model === 'keywords';
|
|
36180
36670
|
}
|
|
36671
|
+
get isContactsForResource() {
|
|
36672
|
+
return this.model === 'contactsForResource';
|
|
36673
|
+
}
|
|
36181
36674
|
get withoutWrapper() {
|
|
36182
36675
|
return this.model === 'title' || this.model === 'abstract';
|
|
36183
36676
|
}
|
|
36677
|
+
get isOpenData() {
|
|
36678
|
+
return this.model === 'licenses';
|
|
36679
|
+
}
|
|
36184
36680
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormFieldComponent, deps: [{ token: EditorFacade }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
36185
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormFieldComponent, isStandalone: true, selector: "gn-ui-form-field", inputs: { model: "model", config: "config", value: "value" }, outputs: { valueChange: "valueChange" }, viewQueries: [{ propertyName: "titleInput", first: true, predicate: ["titleInput"], descendants: true }], ngImport: i0, template: "<div class=\"flex flex-col h-full\">\n <ng-container *ngIf=\"withoutWrapper; else withGenericWrapper\">\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n </ng-container>\n <ng-template #withGenericWrapper>\n <gn-ui-form-field-wrapper\n [label]=\"config.labelKey! | translate\"\n [hint]=\"config.hintKey! | translate\"\n >\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n </gn-ui-form-field-wrapper>\n </ng-template>\n</div>\n\n<ng-template #fieldContent>\n <ng-container *ngIf=\"isTitle\">\n <div class=\"flex justify-between items-center gap-3\">\n <span\n #titleInput\n class=\"grow font-title text-3xl font-normal\"\n [gnUiEditableLabel]=\"true\"\n (editableLabelChanged)=\"formControl.setValue($event)\"\n >\n {{ formControl.value }}\n </span>\n <span\n class=\"material-symbols-outlined gn-ui-icon-small m-2 cursor-pointer\"\n (click)=\"focusTitleInput()\"\n >edit</span\n >\n <span\n class=\"material-symbols-outlined gn-ui-icon-small m-2\"\n [matTooltip]=\"config.hintKey! | translate\"\n matTooltipPosition=\"above\"\n >\n help\n </span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"isAbstract\">\n <gn-ui-form-field-rich\n class=\"h-[8rem]\"\n [control]=\"formControl\"\n [label]=\"config.labelKey! | translate\"\n [hint]=\"config.hintKey! | translate\"\n ></gn-ui-form-field-rich>\n </ng-container>\n <ng-container *ngIf=\"isLicenses\">\n <gn-ui-form-field-license\n [control]=\"formControl\"\n [label]=\"config.labelKey! | translate\"\n ></gn-ui-form-field-license>\n </ng-container>\n <ng-container *ngIf=\"isResourceUpdated\">\n <gn-ui-form-field-resource-updated\n [control]=\"formControl\"\n ></gn-ui-form-field-resource-updated>\n </ng-container>\n <ng-container *ngIf=\"isUpdateFrequency\">\n <gn-ui-form-field-update-frequency\n [control]=\"formControl\"\n ></gn-ui-form-field-update-frequency>\n </ng-container>\n <ng-container *ngIf=\"isTemporalExtents\">\n <gn-ui-form-field-temporal-extents\n [control]=\"formControl\"\n ></gn-ui-form-field-temporal-extents>\n </ng-container>\n <ng-container *ngIf=\"isSimpleField\">\n <gn-ui-form-field-simple\n type=\"text\"\n [control]=\"formControl\"\n [readonly]=\"isReadOnly\"\n ></gn-ui-form-field-simple>\n </ng-container>\n <ng-container *ngIf=\"isSpatialExtentField\">\n <gn-ui-form-field-spatial-extent></gn-ui-form-field-spatial-extent>\n </ng-container>\n <ng-container *ngIf=\"isGraphicOverview\">\n <gn-ui-form-field-overviews\n [control]=\"formControl\"\n [metadataUuid]=\"metadataUuid$ | async\"\n ></gn-ui-form-field-overviews>\n </ng-container>\n <ng-container *ngIf=\"isKeywords\">\n <gn-ui-form-field-keywords\n [control]=\"formControl\"\n ></gn-ui-form-field-keywords>\n </ng-container>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$3.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: EditableLabelDirective, selector: "[gnUiEditableLabel]", inputs: ["gnUiEditableLabel"], outputs: ["editableLabelChanged"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: FormFieldWrapperComponent, selector: "gn-ui-form-field-wrapper", inputs: ["label", "hint"] }, { kind: "component", type: FormFieldLicenseComponent, selector: "gn-ui-form-field-license", inputs: ["control", "label"] }, { kind: "component", type: FormFieldResourceUpdatedComponent, selector: "gn-ui-form-field-resource-updated", inputs: ["control"] }, { kind: "component", type: FormFieldUpdateFrequencyComponent, selector: "gn-ui-form-field-update-frequency", inputs: ["control"] }, { kind: "component", type: FormFieldTemporalExtentsComponent, selector: "gn-ui-form-field-temporal-extents", inputs: ["control"] }, { kind: "component", type: FormFieldSimpleComponent, selector: "gn-ui-form-field-simple", inputs: ["type", "control", "readonly", "invalid", "placeholder", "options"] }, { kind: "component", type: FormFieldRichComponent, selector: "gn-ui-form-field-rich", inputs: ["control", "label", "hint", "helperText", "placeholder"] }, { kind: "component", type: FormFieldSpatialExtentComponent, selector: "gn-ui-form-field-spatial-extent" }, { kind: "component", type: FormFieldKeywordsComponent, selector: "gn-ui-form-field-keywords", inputs: ["control"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "component", type: FormFieldOverviewsComponent, selector: "gn-ui-form-field-overviews", inputs: ["metadataUuid", "control"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
36681
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormFieldComponent, isStandalone: true, selector: "gn-ui-form-field", inputs: { model: "model", config: "config", value: "value" }, outputs: { valueChange: "valueChange" }, viewQueries: [{ propertyName: "titleInput", first: true, predicate: ["titleInput"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"isOpenData\">\n <gn-ui-form-field-open-data\n [control]=\"formControl\"\n (visibilityChange)=\"onVisibilityChange($event)\"\n ></gn-ui-form-field-open-data>\n</ng-container>\n<div class=\"flex flex-col h-full\" *ngIf=\"!isHidden\">\n <ng-container *ngIf=\"withoutWrapper; else withGenericWrapper\">\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n </ng-container>\n <ng-template #withGenericWrapper>\n <gn-ui-form-field-wrapper\n [label]=\"config.labelKey! | translate\"\n [hint]=\"config.hintKey! | translate\"\n >\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n </gn-ui-form-field-wrapper>\n </ng-template>\n</div>\n\n<ng-template #fieldContent>\n <ng-container *ngIf=\"isTitle\">\n <div class=\"flex justify-between items-center gap-3\">\n <span\n #titleInput\n class=\"grow font-title text-3xl font-normal\"\n [gnUiEditableLabel]=\"true\"\n (editableLabelChanged)=\"formControl.setValue($event)\"\n >\n {{ formControl.value }}\n </span>\n <span\n class=\"material-symbols-outlined gn-ui-icon-small m-2 cursor-pointer\"\n (click)=\"focusTitleInput()\"\n >edit</span\n >\n <span\n class=\"material-symbols-outlined gn-ui-icon-small m-2\"\n [matTooltip]=\"config.hintKey! | translate\"\n matTooltipPosition=\"above\"\n >\n help\n </span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"isAbstract\">\n <gn-ui-form-field-rich\n class=\"h-[8rem]\"\n [control]=\"formControl\"\n [label]=\"config.labelKey! | translate\"\n [hint]=\"config.hintKey! | translate\"\n ></gn-ui-form-field-rich>\n </ng-container>\n <ng-container *ngIf=\"isLicenses\">\n <gn-ui-form-field-license\n [control]=\"formControl\"\n [label]=\"config.labelKey! | translate\"\n ></gn-ui-form-field-license>\n </ng-container>\n <ng-container *ngIf=\"isResourceUpdated\">\n <gn-ui-form-field-resource-updated\n [control]=\"formControl\"\n ></gn-ui-form-field-resource-updated>\n </ng-container>\n <ng-container *ngIf=\"isUpdateFrequency\">\n <gn-ui-form-field-update-frequency\n [control]=\"formControl\"\n ></gn-ui-form-field-update-frequency>\n </ng-container>\n <ng-container *ngIf=\"isTemporalExtents\">\n <gn-ui-form-field-temporal-extents\n [control]=\"formControl\"\n ></gn-ui-form-field-temporal-extents>\n </ng-container>\n <ng-container *ngIf=\"isSimpleField\">\n <gn-ui-form-field-simple\n type=\"text\"\n [control]=\"formControl\"\n [readonly]=\"isReadOnly\"\n ></gn-ui-form-field-simple>\n </ng-container>\n <ng-container *ngIf=\"isSpatialExtentField\">\n <gn-ui-form-field-spatial-extent></gn-ui-form-field-spatial-extent>\n </ng-container>\n <ng-container *ngIf=\"isGraphicOverview\">\n <gn-ui-form-field-overviews\n [control]=\"formControl\"\n [metadataUuid]=\"metadataUuid$ | async\"\n ></gn-ui-form-field-overviews>\n </ng-container>\n <ng-container *ngIf=\"isKeywords\">\n <gn-ui-form-field-keywords\n [control]=\"formControl\"\n ></gn-ui-form-field-keywords>\n </ng-container>\n <ng-container *ngIf=\"isContactsForResource\">\n <gn-ui-form-field-contacts-for-resource\n [control]=\"formControl\"\n ></gn-ui-form-field-contacts-for-resource>\n </ng-container>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$3.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: EditableLabelDirective, selector: "[gnUiEditableLabel]", inputs: ["gnUiEditableLabel"], outputs: ["editableLabelChanged"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: FormFieldWrapperComponent, selector: "gn-ui-form-field-wrapper", inputs: ["label", "hint"] }, { kind: "component", type: FormFieldLicenseComponent, selector: "gn-ui-form-field-license", inputs: ["control", "label"] }, { kind: "component", type: FormFieldResourceUpdatedComponent, selector: "gn-ui-form-field-resource-updated", inputs: ["control"] }, { kind: "component", type: FormFieldUpdateFrequencyComponent, selector: "gn-ui-form-field-update-frequency", inputs: ["control"] }, { kind: "component", type: FormFieldTemporalExtentsComponent, selector: "gn-ui-form-field-temporal-extents", inputs: ["control"] }, { kind: "component", type: FormFieldSimpleComponent, selector: "gn-ui-form-field-simple", inputs: ["type", "control", "readonly", "invalid", "placeholder", "options"] }, { kind: "component", type: FormFieldRichComponent, selector: "gn-ui-form-field-rich", inputs: ["control", "label", "hint", "helperText", "placeholder"] }, { kind: "component", type: FormFieldSpatialExtentComponent, selector: "gn-ui-form-field-spatial-extent" }, { kind: "component", type: FormFieldKeywordsComponent, selector: "gn-ui-form-field-keywords", inputs: ["control"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "component", type: FormFieldOverviewsComponent, selector: "gn-ui-form-field-overviews", inputs: ["metadataUuid", "control"] }, { kind: "component", type: FormFieldContactsForResourceComponent, selector: "gn-ui-form-field-contacts-for-resource", inputs: ["control"] }, { kind: "component", type: FormFieldOpenDataComponent, selector: "gn-ui-form-field-open-data", inputs: ["control"], outputs: ["visibilityChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
36186
36682
|
}
|
|
36187
36683
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
36188
36684
|
type: Component,
|
|
@@ -36206,7 +36702,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
36206
36702
|
FormFieldKeywordsComponent,
|
|
36207
36703
|
TranslateModule,
|
|
36208
36704
|
FormFieldOverviewsComponent,
|
|
36209
|
-
|
|
36705
|
+
FormFieldContactsForResourceComponent,
|
|
36706
|
+
FormFieldOpenDataComponent,
|
|
36707
|
+
], template: "<ng-container *ngIf=\"isOpenData\">\n <gn-ui-form-field-open-data\n [control]=\"formControl\"\n (visibilityChange)=\"onVisibilityChange($event)\"\n ></gn-ui-form-field-open-data>\n</ng-container>\n<div class=\"flex flex-col h-full\" *ngIf=\"!isHidden\">\n <ng-container *ngIf=\"withoutWrapper; else withGenericWrapper\">\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n </ng-container>\n <ng-template #withGenericWrapper>\n <gn-ui-form-field-wrapper\n [label]=\"config.labelKey! | translate\"\n [hint]=\"config.hintKey! | translate\"\n >\n <ng-container *ngTemplateOutlet=\"fieldContent\"></ng-container>\n </gn-ui-form-field-wrapper>\n </ng-template>\n</div>\n\n<ng-template #fieldContent>\n <ng-container *ngIf=\"isTitle\">\n <div class=\"flex justify-between items-center gap-3\">\n <span\n #titleInput\n class=\"grow font-title text-3xl font-normal\"\n [gnUiEditableLabel]=\"true\"\n (editableLabelChanged)=\"formControl.setValue($event)\"\n >\n {{ formControl.value }}\n </span>\n <span\n class=\"material-symbols-outlined gn-ui-icon-small m-2 cursor-pointer\"\n (click)=\"focusTitleInput()\"\n >edit</span\n >\n <span\n class=\"material-symbols-outlined gn-ui-icon-small m-2\"\n [matTooltip]=\"config.hintKey! | translate\"\n matTooltipPosition=\"above\"\n >\n help\n </span>\n </div>\n </ng-container>\n <ng-container *ngIf=\"isAbstract\">\n <gn-ui-form-field-rich\n class=\"h-[8rem]\"\n [control]=\"formControl\"\n [label]=\"config.labelKey! | translate\"\n [hint]=\"config.hintKey! | translate\"\n ></gn-ui-form-field-rich>\n </ng-container>\n <ng-container *ngIf=\"isLicenses\">\n <gn-ui-form-field-license\n [control]=\"formControl\"\n [label]=\"config.labelKey! | translate\"\n ></gn-ui-form-field-license>\n </ng-container>\n <ng-container *ngIf=\"isResourceUpdated\">\n <gn-ui-form-field-resource-updated\n [control]=\"formControl\"\n ></gn-ui-form-field-resource-updated>\n </ng-container>\n <ng-container *ngIf=\"isUpdateFrequency\">\n <gn-ui-form-field-update-frequency\n [control]=\"formControl\"\n ></gn-ui-form-field-update-frequency>\n </ng-container>\n <ng-container *ngIf=\"isTemporalExtents\">\n <gn-ui-form-field-temporal-extents\n [control]=\"formControl\"\n ></gn-ui-form-field-temporal-extents>\n </ng-container>\n <ng-container *ngIf=\"isSimpleField\">\n <gn-ui-form-field-simple\n type=\"text\"\n [control]=\"formControl\"\n [readonly]=\"isReadOnly\"\n ></gn-ui-form-field-simple>\n </ng-container>\n <ng-container *ngIf=\"isSpatialExtentField\">\n <gn-ui-form-field-spatial-extent></gn-ui-form-field-spatial-extent>\n </ng-container>\n <ng-container *ngIf=\"isGraphicOverview\">\n <gn-ui-form-field-overviews\n [control]=\"formControl\"\n [metadataUuid]=\"metadataUuid$ | async\"\n ></gn-ui-form-field-overviews>\n </ng-container>\n <ng-container *ngIf=\"isKeywords\">\n <gn-ui-form-field-keywords\n [control]=\"formControl\"\n ></gn-ui-form-field-keywords>\n </ng-container>\n <ng-container *ngIf=\"isContactsForResource\">\n <gn-ui-form-field-contacts-for-resource\n [control]=\"formControl\"\n ></gn-ui-form-field-contacts-for-resource>\n </ng-container>\n</ng-template>\n" }]
|
|
36210
36708
|
}], ctorParameters: function () { return [{ type: EditorFacade }]; }, propDecorators: { model: [{
|
|
36211
36709
|
type: Input
|
|
36212
36710
|
}], config: [{
|
|
@@ -36228,7 +36726,6 @@ class RecordFormComponent {
|
|
|
36228
36726
|
if (!model) {
|
|
36229
36727
|
return;
|
|
36230
36728
|
}
|
|
36231
|
-
console.log(newValue);
|
|
36232
36729
|
this.facade.updateRecordField(model, newValue);
|
|
36233
36730
|
}
|
|
36234
36731
|
fieldTracker(index, field) {
|
|
@@ -36238,11 +36735,11 @@ class RecordFormComponent {
|
|
|
36238
36735
|
return section.labelKey;
|
|
36239
36736
|
}
|
|
36240
36737
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RecordFormComponent, deps: [{ token: EditorFacade }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
36241
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: RecordFormComponent, isStandalone: true, selector: "gn-ui-record-form", ngImport: i0, template: "<ng-container>\n <div class=\"flex flex-col gap-6 p-8\">\n <ng-container\n *ngFor=\"\n let section of facade.currentSections$ | async;\n trackBy: sectionTracker\n \"\n >\n <ng-container *ngIf=\"!section.hidden\">\n <div class=\"flex flex-col gap-8 border p-8 rounded-[8px] shadow\">\n <div\n class=\"flex flex-col gap-2\"\n [ngClass]=\"section.labelKey ? 'mb-4' : 'hidden'\"\n >\n <div\n *ngIf=\"section.labelKey\"\n class=\"text-2xl font-
|
|
36738
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: RecordFormComponent, isStandalone: true, selector: "gn-ui-record-form", ngImport: i0, template: "<ng-container>\n <div class=\"flex flex-col gap-6 p-8\">\n <ng-container\n *ngFor=\"\n let section of facade.currentSections$ | async;\n trackBy: sectionTracker\n \"\n >\n <ng-container *ngIf=\"!section.hidden\">\n <div class=\"flex flex-col gap-8 border p-8 rounded-[8px] shadow\">\n <div\n class=\"flex flex-col gap-2\"\n [ngClass]=\"section.labelKey ? 'mb-4' : 'hidden'\"\n >\n <div\n *ngIf=\"section.labelKey\"\n class=\"text-2xl font-title text-secondary\"\n translate\n >\n {{ section.labelKey }}\n </div>\n <div\n *ngIf=\"section.descriptionKey\"\n class=\"text-secondary-lightest\"\n translate\n >\n {{ section.descriptionKey }}\n </div>\n </div>\n <ng-container\n *ngFor=\"\n let field of section.fieldsWithValues;\n trackBy: fieldTracker\n \"\n >\n <ng-container *ngIf=\"!field.config.hidden\">\n <gn-ui-form-field\n [model]=\"field.config.model!\"\n [config]=\"field.config.formFieldConfig\"\n [value]=\"field.value\"\n (valueChange)=\"\n handleFieldValueChange(field.config.model!, $event)\n \"\n ></gn-ui-form-field>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n </div>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$3.AsyncPipe, name: "async" }, { kind: "component", type: FormFieldComponent, selector: "gn-ui-form-field", inputs: ["model", "config", "value"], outputs: ["valueChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "directive", type: i1$1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
36242
36739
|
}
|
|
36243
36740
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RecordFormComponent, decorators: [{
|
|
36244
36741
|
type: Component,
|
|
36245
|
-
args: [{ selector: 'gn-ui-record-form', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, FormFieldComponent, TranslateModule], template: "<ng-container>\n <div class=\"flex flex-col gap-6 p-8\">\n <ng-container\n *ngFor=\"\n let section of facade.currentSections$ | async;\n trackBy: sectionTracker\n \"\n >\n <ng-container *ngIf=\"!section.hidden\">\n <div class=\"flex flex-col gap-8 border p-8 rounded-[8px] shadow\">\n <div\n class=\"flex flex-col gap-2\"\n [ngClass]=\"section.labelKey ? 'mb-4' : 'hidden'\"\n >\n <div\n *ngIf=\"section.labelKey\"\n class=\"text-2xl font-
|
|
36742
|
+
args: [{ selector: 'gn-ui-record-form', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, FormFieldComponent, TranslateModule], template: "<ng-container>\n <div class=\"flex flex-col gap-6 p-8\">\n <ng-container\n *ngFor=\"\n let section of facade.currentSections$ | async;\n trackBy: sectionTracker\n \"\n >\n <ng-container *ngIf=\"!section.hidden\">\n <div class=\"flex flex-col gap-8 border p-8 rounded-[8px] shadow\">\n <div\n class=\"flex flex-col gap-2\"\n [ngClass]=\"section.labelKey ? 'mb-4' : 'hidden'\"\n >\n <div\n *ngIf=\"section.labelKey\"\n class=\"text-2xl font-title text-secondary\"\n translate\n >\n {{ section.labelKey }}\n </div>\n <div\n *ngIf=\"section.descriptionKey\"\n class=\"text-secondary-lightest\"\n translate\n >\n {{ section.descriptionKey }}\n </div>\n </div>\n <ng-container\n *ngFor=\"\n let field of section.fieldsWithValues;\n trackBy: fieldTracker\n \"\n >\n <ng-container *ngIf=\"!field.config.hidden\">\n <gn-ui-form-field\n [model]=\"field.config.model!\"\n [config]=\"field.config.formFieldConfig\"\n [value]=\"field.value\"\n (valueChange)=\"\n handleFieldValueChange(field.config.model!, $event)\n \"\n ></gn-ui-form-field>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n </div>\n</ng-container>\n" }]
|
|
36246
36743
|
}], ctorParameters: function () { return [{ type: EditorFacade }]; } });
|
|
36247
36744
|
|
|
36248
36745
|
const ROUTER_STATE_KEY = 'router';
|