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.
Files changed (80) hide show
  1. package/esm2022/libs/api/metadata-converter/src/lib/xml-utils.mjs +5 -3
  2. package/esm2022/libs/common/domain/src/lib/model/record/contact.model.mjs +28 -1
  3. package/esm2022/libs/feature/editor/src/lib/components/contact-card/contact-card.component.mjs +29 -0
  4. package/esm2022/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.mjs +17 -24
  5. 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
  6. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.mjs +3 -3
  7. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-open-data/form-field-open-data.component.mjs +47 -0
  8. package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +17 -3
  9. package/esm2022/libs/feature/editor/src/lib/components/record-form/record-form.component.mjs +3 -4
  10. package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +19 -2
  11. package/esm2022/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.mjs +3 -3
  12. package/esm2022/libs/feature/search/src/lib/results-table/results-table-container.component.mjs +6 -1
  13. package/esm2022/libs/ui/elements/src/lib/sortable-list/sortable-list.component.mjs +2 -1
  14. package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +19 -5
  15. package/esm2022/libs/ui/inputs/src/lib/image-input/image-input.component.mjs +5 -11
  16. package/esm2022/translations/de.json +25 -0
  17. package/esm2022/translations/en.json +25 -0
  18. package/esm2022/translations/es.json +25 -0
  19. package/esm2022/translations/fr.json +26 -1
  20. package/esm2022/translations/it.json +25 -0
  21. package/esm2022/translations/nl.json +25 -0
  22. package/esm2022/translations/pt.json +25 -0
  23. package/fesm2022/geonetwork-ui.mjs +546 -49
  24. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  25. package/libs/common/domain/src/lib/model/record/contact.model.d.ts +1 -0
  26. package/libs/common/domain/src/lib/model/record/contact.model.d.ts.map +1 -1
  27. package/libs/feature/editor/src/lib/components/contact-card/contact-card.component.d.ts +12 -0
  28. package/libs/feature/editor/src/lib/components/contact-card/contact-card.component.d.ts.map +1 -0
  29. package/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.d.ts +1 -1
  30. package/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.d.ts.map +1 -1
  31. 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
  32. 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
  33. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-open-data/form-field-open-data.component.d.ts +17 -0
  34. 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
  35. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts +4 -0
  36. package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -1
  37. package/libs/feature/editor/src/lib/components/record-form/record-form.component.d.ts.map +1 -1
  38. package/libs/feature/editor/src/lib/fields.config.d.ts +6 -0
  39. package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
  40. package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts.map +1 -1
  41. package/libs/ui/elements/src/lib/sortable-list/sortable-list.component.d.ts +1 -2
  42. package/libs/ui/elements/src/lib/sortable-list/sortable-list.component.d.ts.map +1 -1
  43. package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts +9 -1
  44. package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts.map +1 -1
  45. package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts +2 -4
  46. package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts.map +1 -1
  47. package/package.json +1 -1
  48. package/src/libs/api/metadata-converter/src/lib/xml-utils.ts +5 -5
  49. package/src/libs/common/domain/src/lib/model/record/contact.model.ts +28 -0
  50. package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.css +0 -0
  51. package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.html +25 -0
  52. package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.ts +30 -0
  53. package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.html +0 -1
  54. package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.ts +18 -23
  55. 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
  56. 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
  57. 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
  58. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.html +1 -1
  59. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-open-data/form-field-open-data.component.css +0 -0
  60. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-open-data/form-field-open-data.component.html +6 -0
  61. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-open-data/form-field-open-data.component.ts +59 -0
  62. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +12 -1
  63. package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +17 -0
  64. package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.html +1 -1
  65. package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.ts +0 -1
  66. package/src/libs/feature/editor/src/lib/fields.config.ts +20 -1
  67. package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.html +1 -1
  68. package/src/libs/feature/search/src/lib/results-table/results-table-container.component.ts +12 -0
  69. package/src/libs/ui/elements/src/lib/sortable-list/sortable-list.component.ts +2 -2
  70. package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +15 -3
  71. package/src/libs/ui/inputs/src/lib/image-input/image-input.component.html +1 -1
  72. package/src/libs/ui/inputs/src/lib/image-input/image-input.component.ts +2 -7
  73. package/translations/de.json +25 -0
  74. package/translations/en.json +25 -0
  75. package/translations/es.json +25 -0
  76. package/translations/fr.json +26 -1
  77. package/translations/it.json +25 -0
  78. package/translations/nl.json +25 -0
  79. package/translations/pt.json +25 -0
  80. package/translations/sk.json +25 -0
@@ -1,5 +1,6 @@
1
1
  import { Organization } from './organization.model';
2
2
  export declare const RoleValues: string[];
3
+ export declare const RoleLabels: Map<string, string>;
3
4
  export type Role = typeof RoleValues[number];
4
5
  export interface Individual {
5
6
  firstName?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"contact.model.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/common/domain/src/lib/model/record/contact.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnD,eAAO,MAAM,UAAU,UAsBtB,CAAA;AAED,MAAM,MAAM,IAAI,GAAG,OAAO,UAAU,CAAC,MAAM,CAAC,CAAA;AAE5C,MAAM,WAAW,UAAU;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,IAAI,CAAA;IACV,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,YAAY,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf"}
1
+ {"version":3,"file":"contact.model.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/common/domain/src/lib/model/record/contact.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAGnD,eAAO,MAAM,UAAU,UAsBtB,CAAA;AAED,eAAO,MAAM,UAAU,qBAyBrB,CAAA;AAEF,MAAM,MAAM,IAAI,GAAG,OAAO,UAAU,CAAC,MAAM,CAAC,CAAA;AAE5C,MAAM,WAAW,UAAU;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,IAAI,CAAA;IACV,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,YAAY,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf"}
@@ -0,0 +1,12 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { Individual } from '../../../../../../../libs/common/domain/src/lib/model/record';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ContactCardComponent {
5
+ contact: Individual;
6
+ removable: boolean;
7
+ contactRemoved: EventEmitter<Individual>;
8
+ removeContact(contact: Individual): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<ContactCardComponent, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<ContactCardComponent, "gn-ui-contact-card", never, { "contact": { "alias": "contact"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; }, { "contactRemoved": "contactRemoved"; }, never, never, true, never>;
11
+ }
12
+ //# sourceMappingURL=contact-card.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact-card.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAGb,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAA;;AAMzF,qBAQa,oBAAoB;IACtB,OAAO,EAAE,UAAU,CAAA;IACnB,SAAS,UAAO;IACf,cAAc,2BAAiC;IAEzD,aAAa,CAAC,OAAO,EAAE,UAAU;yCALtB,oBAAoB;2CAApB,oBAAoB;CAQhC"}
@@ -12,7 +12,7 @@ export declare class OverviewUploadComponent implements OnInit, OnChanges {
12
12
  altTextChange: EventEmitter<string>;
13
13
  resourceAltText: string;
14
14
  resourceFileName: string;
15
- resourceUrl: URL;
15
+ resourceUrl: string;
16
16
  constructor(recordsApiService: RecordsApiService, cd: ChangeDetectorRef);
17
17
  ngOnInit(): void;
18
18
  handleFileChange(file: File): void;
@@ -1 +1 @@
1
- {"version":3,"file":"overview-upload.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAEjB,YAAY,EAEZ,SAAS,EACT,MAAM,EAEN,aAAa,EACd,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAA;AAEjF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;;AAQ9F,qBAQa,uBAAwB,YAAW,MAAM,EAAE,SAAS;IAW7D,OAAO,CAAC,iBAAiB;IACzB,OAAO,CAAC,EAAE;IAXH,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,EAAG,WAAW,CAAA;IACxB,cAAc,gCAA6C;IAC3D,aAAa,EAAE,YAAY,CAAC,MAAM,CAAC,CAAqB;IAElE,eAAe,SAAK;IACpB,gBAAgB,SAAK;IACrB,WAAW,EAAE,GAAG,CAAA;gBAGN,iBAAiB,EAAE,iBAAiB,EACpC,EAAE,EAAE,iBAAiB;IAG/B,QAAQ,IAAI,IAAI;IAsBhB,gBAAgB,CAAC,IAAI,EAAE,IAAI;IAmB3B,eAAe,CAAC,GAAG,EAAE,MAAM;IAmB3B,mBAAmB,CAAC,UAAU,EAAE,MAAM;IAUtC,YAAY;IAgBZ,OAAO,CAAC,WAAW,CAUlB;IAED,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;yCAjH9B,uBAAuB;2CAAvB,uBAAuB;CAsInC"}
1
+ {"version":3,"file":"overview-upload.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAEjB,YAAY,EAEZ,SAAS,EACT,MAAM,EAEN,aAAa,EACd,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAA;AAEjF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;;AAE9F,qBAQa,uBAAwB,YAAW,MAAM,EAAE,SAAS;IAW7D,OAAO,CAAC,iBAAiB;IACzB,OAAO,CAAC,EAAE;IAXH,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,EAAG,WAAW,CAAA;IACxB,cAAc,gCAA6C;IAC3D,aAAa,EAAE,YAAY,CAAC,MAAM,CAAC,CAAqB;IAElE,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB,EAAE,MAAM,CAAA;IACxB,WAAW,EAAE,MAAM,CAAA;gBAGT,iBAAiB,EAAE,iBAAiB,EACpC,EAAE,EAAE,iBAAiB;IAG/B,QAAQ,IAAI,IAAI;IAqBhB,gBAAgB,CAAC,IAAI,EAAE,IAAI;IAmB3B,eAAe,CAAC,GAAG,EAAE,MAAM;IAmB3B,mBAAmB,CAAC,UAAU,EAAE,MAAM;IAWtC,YAAY;IAiBZ,OAAO,CAAC,WAAW,CAUlB;IAED,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;yCAlH9B,uBAAuB;2CAAvB,uBAAuB;CAuInC"}
@@ -0,0 +1,47 @@
1
+ import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
2
+ import { FormControl } from '@angular/forms';
3
+ import { Individual, Organization, Role } from '../../../../../../../../../libs/common/domain/src/lib/model/record';
4
+ import { Observable, Subscription } from 'rxjs';
5
+ import { UserModel } from '../../../../../../../../../libs/common/domain/src/lib/model/user';
6
+ import { PlatformServiceInterface } from '../../../../../../../../../libs/common/domain/src/lib/platform.service.interface';
7
+ import { OrganizationsServiceInterface } from '../../../../../../../../../libs/common/domain/src/lib/organizations.service.interface';
8
+ import { DynamicElement } from '../../../../../../../../../libs/ui/elements/src';
9
+ import * as i0 from "@angular/core";
10
+ export declare class FormFieldContactsForResourceComponent implements OnInit, OnDestroy {
11
+ private platformServiceInterface;
12
+ private organizationsServiceInterface;
13
+ private changeDetectorRef;
14
+ control: FormControl<Individual[]>;
15
+ subscription: Subscription;
16
+ allUsers$: Observable<UserModel[]>;
17
+ contactsForRessourceByRole: Map<Role, Individual[]>;
18
+ contactsAsDynElemByRole: Map<Role, DynamicElement[]>;
19
+ rolesToPick: Role[];
20
+ roleSectionsToDisplay: Role[];
21
+ allOrganizations: Map<string, Organization>;
22
+ constructor(platformServiceInterface: PlatformServiceInterface, organizationsServiceInterface: OrganizationsServiceInterface, changeDetectorRef: ChangeDetectorRef);
23
+ ngOnInit(): Promise<void>;
24
+ addRoleToDisplay(roleToAdd: string): void;
25
+ filterRolesToPick(): void;
26
+ updateContactsForRessource(): void;
27
+ manageRoleSectionsToDisplay(contactsForResource: Individual[]): void;
28
+ removeContact(index: number): void;
29
+ handleContactsChanged(event: DynamicElement[]): void;
30
+ protected roleToLabel(role: string): string;
31
+ /**
32
+ * gn-ui-autocomplete
33
+ */
34
+ displayWithFn: (user: UserModel) => string;
35
+ /**
36
+ * gn-ui-autocomplete
37
+ */
38
+ autoCompleteAction: (query: string) => Observable<UserModel[]>;
39
+ /**
40
+ * gn-ui-autocomplete
41
+ */
42
+ addContact(contact: UserModel, role: string): void;
43
+ ngOnDestroy(): void;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldContactsForResourceComponent, never>;
45
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldContactsForResourceComponent, "gn-ui-form-field-contacts-for-resource", never, { "control": { "alias": "control"; "required": false; }; }, {}, never, never, true, never>;
46
+ }
47
+ //# sourceMappingURL=form-field-contacts-for-resource.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-field-contacts-for-resource.component.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,iBAAiB,EAGjB,SAAS,EACT,MAAM,EACP,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAO5C,OAAO,EACL,UAAU,EACV,YAAY,EACZ,IAAI,EAEL,MAAM,oEAAoE,CAAA;AAE3E,OAAO,EAIL,UAAU,EACV,YAAY,EAEb,MAAM,MAAM,CAAA;AACb,OAAO,EAAE,SAAS,EAAE,MAAM,kEAAkE,CAAA;AAC5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,kFAAkF,CAAA;AAC3H,OAAO,EAAE,6BAA6B,EAAE,MAAM,uFAAuF,CAAA;AAErI,OAAO,EACL,cAAc,EAEf,MAAM,iDAAiD,CAAA;;AAIxD,qBAiBa,qCACX,YAAW,MAAM,EAAE,SAAS;IAyB1B,OAAO,CAAC,wBAAwB;IAChC,OAAO,CAAC,6BAA6B;IACrC,OAAO,CAAC,iBAAiB;IAzBlB,OAAO,EAAE,WAAW,CAAC,UAAU,EAAE,CAAC,CAAA;IAE3C,YAAY,EAAE,YAAY,CAAqB;IAE/C,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,CAAC,CAAA;IAElC,0BAA0B,EAAE,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,CAAC,CAAY;IAE/D,uBAAuB,EAAE,GAAG,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC,CAAY;IAEhE,WAAW,EAAE,IAAI,EAAE,CAMlB;IAED,qBAAqB,EAAE,IAAI,EAAE,CAAK;IAElC,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAY;gBAG7C,wBAAwB,EAAE,wBAAwB,EAClD,6BAA6B,EAAE,6BAA6B,EAC5D,iBAAiB,EAAE,iBAAiB;IAKxC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAuB/B,gBAAgB,CAAC,SAAS,EAAE,MAAM;IAKlC,iBAAiB;IAMjB,0BAA0B;IAyD1B,2BAA2B,CAAC,mBAAmB,EAAE,UAAU,EAAE;IAY7D,aAAa,CAAC,KAAK,EAAE,MAAM;IAO3B,qBAAqB,CAAC,KAAK,EAAE,cAAc,EAAE;IAgB7C,SAAS,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAI3C;;OAEG;IACH,aAAa,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,MAAM,CAGtC;IAEJ;;OAEG;IACH,kBAAkB,UAAW,MAAM,6BAUlC;IAED;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM;IAmB3C,WAAW,IAAI,IAAI;yCAhNR,qCAAqC;2CAArC,qCAAqC;CAmNjD"}
@@ -0,0 +1,17 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { FormControl } from '@angular/forms';
3
+ import { Subscription } from 'rxjs';
4
+ import * as i0 from "@angular/core";
5
+ export declare class FormFieldOpenDataComponent implements OnInit {
6
+ control: FormControl;
7
+ value: boolean;
8
+ visibilityChange: EventEmitter<boolean>;
9
+ subscription: Subscription;
10
+ get config(): string[];
11
+ ngOnInit(): void;
12
+ initToggle(): void;
13
+ onOpenDataToggled(boolean: any): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldOpenDataComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldOpenDataComponent, "gn-ui-form-field-open-data", never, { "control": { "alias": "control"; "required": false; }; }, { "visibilityChange": "visibilityChange"; }, never, never, true, never>;
16
+ }
17
+ //# sourceMappingURL=form-field-open-data.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-field-open-data.component.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-open-data/form-field-open-data.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAGZ,MAAM,EAGP,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAI5C,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;;AAEnC,qBAQa,0BAA2B,YAAW,MAAM;IAC9C,OAAO,EAAE,WAAW,CAAA;IAC7B,KAAK,UAAQ;IACH,gBAAgB,wBAA8B;IACxD,YAAY,EAAE,YAAY,CAAA;IAE1B,IAAI,MAAM,aAET;IAED,QAAQ;IAYR,UAAU;IAKV,iBAAiB,CAAC,OAAO,KAAA;yCA3Bd,0BAA0B;2CAA1B,0BAA0B;CAkCtC"}
@@ -11,11 +11,13 @@ export declare class FormFieldComponent {
11
11
  config: FormFieldConfig;
12
12
  set value(v: unknown);
13
13
  valueChange: Observable<unknown>;
14
+ isHidden: boolean;
14
15
  titleInput: ElementRef;
15
16
  metadataUuid$: Observable<string>;
16
17
  formControl: FormControl<any>;
17
18
  constructor(facade: EditorFacade);
18
19
  focusTitleInput(): void;
20
+ onVisibilityChange(visibility: boolean): void;
19
21
  get isTitle(): boolean;
20
22
  get isAbstract(): boolean;
21
23
  get isLicenses(): boolean;
@@ -27,7 +29,9 @@ export declare class FormFieldComponent {
27
29
  get isSimpleField(): boolean;
28
30
  get isReadOnly(): boolean;
29
31
  get isKeywords(): boolean;
32
+ get isContactsForResource(): boolean;
30
33
  get withoutWrapper(): boolean;
34
+ get isOpenData(): boolean;
31
35
  static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldComponent, never>;
32
36
  static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldComponent, "gn-ui-form-field", never, { "model": { "alias": "model"; "required": false; }; "config": { "alias": "config"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
33
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"form-field.component.d.ts","sourceRoot":"","sources":["../../../../../../../../src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,UAAU,EAIX,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,WAAW,EAAuB,MAAM,gBAAgB,CAAA;AAMjE,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAajC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iEAAiE,CAAA;AAInG,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;;AAEjD,qBA4Ba,kBAAkB;IAoBjB,OAAO,CAAC,MAAM;IAnBjB,KAAK,EAAE,iBAAiB,CAAA;IACxB,MAAM,EAAE,eAAe,CAAA;IAChC,IAAa,KAAK,CAAC,CAAC,EAAE,OAAO,EAI5B;IAES,WAAW,EAAE,UAAU,CAAC,OAAO,CAAC,CAAA;IAEjB,UAAU,EAAE,UAAU,CAAA;IAE/C,aAAa,qBAGZ;IAED,WAAW,mBAAoB;gBAEX,MAAM,EAAE,YAAY;IAIxC,eAAe;IAIf,IAAI,OAAO,YAEV;IACD,IAAI,UAAU,YAEb;IACD,IAAI,UAAU,YAEb;IACD,IAAI,iBAAiB,YAEpB;IACD,IAAI,iBAAiB,YAEpB;IACD,IAAI,iBAAiB,YAEpB;IACD,IAAI,oBAAoB,YAEvB;IACD,IAAI,iBAAiB,YAEpB;IACD,IAAI,aAAa,YAEhB;IACD,IAAI,UAAU,YAEb;IACD,IAAI,UAAU,YAEb;IAED,IAAI,cAAc,YAEjB;yCAhEU,kBAAkB;2CAAlB,kBAAkB;CAiE9B"}
1
+ {"version":3,"file":"form-field.component.d.ts","sourceRoot":"","sources":["../../../../../../../../src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,UAAU,EAKX,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,WAAW,EAAuB,MAAM,gBAAgB,CAAA;AAMjE,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAajC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iEAAiE,CAAA;AAInG,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;;AAIjD,qBA8Ba,kBAAkB;IAqBjB,OAAO,CAAC,MAAM;IApBjB,KAAK,EAAE,iBAAiB,CAAA;IACxB,MAAM,EAAE,eAAe,CAAA;IAChC,IAAa,KAAK,CAAC,CAAC,EAAE,OAAO,EAI5B;IAES,WAAW,EAAE,UAAU,CAAC,OAAO,CAAC,CAAA;IAC1C,QAAQ,UAAQ;IAES,UAAU,EAAE,UAAU,CAAA;IAE/C,aAAa,qBAGZ;IAED,WAAW,mBAAoB;gBAEX,MAAM,EAAE,YAAY;IAIxC,eAAe;IAIf,kBAAkB,CAAC,UAAU,EAAE,OAAO;IAItC,IAAI,OAAO,YAEV;IACD,IAAI,UAAU,YAEb;IACD,IAAI,UAAU,YAEb;IACD,IAAI,iBAAiB,YAEpB;IACD,IAAI,iBAAiB,YAEpB;IACD,IAAI,iBAAiB,YAEpB;IACD,IAAI,oBAAoB,YAEvB;IACD,IAAI,iBAAiB,YAEpB;IACD,IAAI,aAAa,YAEhB;IACD,IAAI,UAAU,YAEb;IACD,IAAI,UAAU,YAEb;IACD,IAAI,qBAAqB,YAExB;IAED,IAAI,cAAc,YAEjB;IAED,IAAI,UAAU,YAEb;yCA5EU,kBAAkB;2CAAlB,kBAAkB;CA6E9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"record-form.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/feature/editor/src/lib/components/record-form/record-form.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAG/C,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACxB,MAAM,4BAA4B,CAAA;;AAEnC,qBAQa,mBAAmB;IACX,MAAM,EAAE,YAAY;gBAApB,MAAM,EAAE,YAAY;IAEvC,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB;IAQhE,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB,GAAG,GAAG;IAI7D,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB,GAAG,GAAG;yCAfzD,mBAAmB;2CAAnB,mBAAmB;CAkB/B"}
1
+ {"version":3,"file":"record-form.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/feature/editor/src/lib/components/record-form/record-form.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAG/C,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACxB,MAAM,4BAA4B,CAAA;;AAEnC,qBAQa,mBAAmB;IACX,MAAM,EAAE,YAAY;gBAApB,MAAM,EAAE,YAAY;IAEvC,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB;IAOhE,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB,GAAG,GAAG;IAI7D,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB,GAAG,GAAG;yCAdzD,mBAAmB;2CAAnB,mBAAmB;CAiB/B"}
@@ -18,6 +18,7 @@ export declare const RECORD_UPDATE_FREQUENCY_FIELD: EditorField;
18
18
  export declare const RECORD_TEMPORAL_EXTENTS_FIELD: EditorField;
19
19
  export declare const RECORD_TITLE_FIELD: EditorField;
20
20
  export declare const RECORD_ABSTRACT_FIELD: EditorField;
21
+ export declare const CONTACTS_FOR_RESOURCE_FIELD: EditorField;
21
22
  export declare const RECORD_GRAPHICAL_OVERVIEW_FIELD: EditorField;
22
23
  /************************************************************
23
24
  *************** SECTIONS *****************
@@ -37,4 +38,9 @@ export declare const DATA_POINT_OF_CONTACT_SECTION: EditorSection;
37
38
  ************************************************************
38
39
  */
39
40
  export declare const DEFAULT_CONFIGURATION: EditorConfig;
41
+ /************************************************************
42
+ *************** LICENSES *****************
43
+ ************************************************************
44
+ */
45
+ export declare const OPEN_DATA_LICENSES: string[];
40
46
  //# sourceMappingURL=fields.config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fields.config.d.ts","sourceRoot":"","sources":["../../../../../src/libs/feature/editor/src/lib/fields.config.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,WAAW,EACX,aAAa,EACd,MAAM,8BAA8B,CAAA;AAErC;;;;;GAKG;AAEH;;;GAGG;AAEH,eAAO,MAAM,oBAAoB,EAAE,WAKlC,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,WAKnC,CAAA;AAED,eAAO,MAAM,8BAA8B,EAAE,WAM5C,CAAA;AAED,eAAO,MAAM,6BAA6B,EAAE,WAK3C,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,WAOlC,CAAA;AAED,eAAO,MAAM,6BAA6B,EAAE,WAK3C,CAAA;AAED,eAAO,MAAM,6BAA6B,EAAE,WAK3C,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,WAKhC,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,WAKnC,CAAA;AAED,eAAO,MAAM,+BAA+B,EAAE,WAK7C,CAAA;AAED;;;GAGG;AAEH,eAAO,MAAM,aAAa,EAAE,aAO3B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,aAW3B,CAAA;AAED,eAAO,MAAM,6BAA6B,EAAE,aAI3C,CAAA;AAED,eAAO,MAAM,4BAA4B,EAAE,aAO1C,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,aAI7B,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,aAOpC,CAAA;AAED,eAAO,MAAM,iCAAiC,EAAE,aAI/C,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,aAKnC,CAAA;AAED,eAAO,MAAM,6BAA6B,EAAE,aAO3C,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,YAoBnC,CAAA"}
1
+ {"version":3,"file":"fields.config.d.ts","sourceRoot":"","sources":["../../../../../src/libs/feature/editor/src/lib/fields.config.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,WAAW,EACX,aAAa,EACd,MAAM,8BAA8B,CAAA;AAErC;;;;;GAKG;AAEH;;;GAGG;AAEH,eAAO,MAAM,oBAAoB,EAAE,WAKlC,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,WAKnC,CAAA;AAED,eAAO,MAAM,8BAA8B,EAAE,WAM5C,CAAA;AAED,eAAO,MAAM,6BAA6B,EAAE,WAK3C,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,WAOlC,CAAA;AAED,eAAO,MAAM,6BAA6B,EAAE,WAK3C,CAAA;AAED,eAAO,MAAM,6BAA6B,EAAE,WAK3C,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,WAKhC,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,WAKnC,CAAA;AAED,eAAO,MAAM,2BAA2B,EAAE,WAKzC,CAAA;AAED,eAAO,MAAM,+BAA+B,EAAE,WAK7C,CAAA;AAED;;;GAGG;AAEH,eAAO,MAAM,aAAa,EAAE,aAO3B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,aAW3B,CAAA;AAED,eAAO,MAAM,6BAA6B,EAAE,aAI3C,CAAA;AAED,eAAO,MAAM,4BAA4B,EAAE,aAO1C,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,aAI7B,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,aAOpC,CAAA;AAED,eAAO,MAAM,iCAAiC,EAAE,aAI/C,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,aAKnC,CAAA;AAED,eAAO,MAAM,6BAA6B,EAAE,aAO3C,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,YAoBnC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,EAMtC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"results-table-container.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/search/src/lib/results-table/results-table-container.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAE,SAAS,EAAU,MAAM,eAAe,CAAA;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,2DAA2D,CAAA;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sFAAsF,CAAA;AAGjI,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAA;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;;AAEtD,qBAOa,8BAA+B,YAAW,SAAS;IAc5D,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,iBAAiB;IACzB,OAAO,CAAC,oBAAoB;IAC5B,OAAO,CAAC,gBAAgB;IAlBhB,WAAW,8BAAoC;IAC/C,eAAe,8BAAoC;IAE7D,YAAY,eAAqB;IAEjC,QAAQ,6CAA6B;IACrC,gBAAgB,2CAAoD;IACpE,OAAO,qGAA4B;IAEnC,QAAQ,WAAY,aAAa,KAAG,OAAO,CACqB;gBAGtD,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,EAAE,0BAA0B,EAC7C,oBAAoB,EAAE,oBAAoB,EAC1C,gBAAgB,EAAE,gBAAgB;IAG5C,iBAAiB,CAAC,IAAI,EAAE,OAAO;IAI/B,qBAAqB,CAAC,IAAI,EAAE,OAAO;IAI7B,kBAAkB,CAAC,IAAI,EAAE,OAAO;IA0BtC,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM;IAIrD,2BAA2B,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,QAAQ,EAAE,OAAO;IAQvE,WAAW;yCApEA,8BAA8B;2CAA9B,8BAA8B;CAuE1C"}
1
+ {"version":3,"file":"results-table-container.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/search/src/lib/results-table/results-table-container.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAE,SAAS,EAAU,MAAM,eAAe,CAAA;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,2DAA2D,CAAA;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sFAAsF,CAAA;AAGjI,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAA;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;;AAEtD,qBAOa,8BAA+B,YAAW,SAAS;IAc5D,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,iBAAiB;IACzB,OAAO,CAAC,oBAAoB;IAC5B,OAAO,CAAC,gBAAgB;IAlBhB,WAAW,8BAAoC;IAC/C,eAAe,8BAAoC;IAE7D,YAAY,eAAqB;IAEjC,QAAQ,6CAA6B;IACrC,gBAAgB,2CAAoD;IACpE,OAAO,qGAA4B;IAEnC,QAAQ,WAAY,aAAa,KAAG,OAAO,CACqB;gBAGtD,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,EAAE,0BAA0B,EAC7C,oBAAoB,EAAE,oBAAoB,EAC1C,gBAAgB,EAAE,gBAAgB;IAG5C,iBAAiB,CAAC,IAAI,EAAE,OAAO;IAI/B,qBAAqB,CAAC,IAAI,EAAE,OAAO;IAI7B,kBAAkB,CAAC,IAAI,EAAE,OAAO;IAsCtC,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM;IAIrD,2BAA2B,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,QAAQ,EAAE,OAAO;IAQvE,WAAW;yCAhFA,8BAA8B;2CAA9B,8BAA8B;CAmF1C"}
@@ -1,7 +1,7 @@
1
1
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
2
2
  import { EventEmitter, Type } from '@angular/core';
3
3
  import * as i0 from "@angular/core";
4
- type DynamicElement = {
4
+ export type DynamicElement = {
5
5
  component: Type<unknown>;
6
6
  inputs: Record<string, unknown>;
7
7
  };
@@ -19,5 +19,4 @@ export declare class SortableListComponent {
19
19
  static ɵfac: i0.ɵɵFactoryDeclaration<SortableListComponent, never>;
20
20
  static ɵcmp: i0.ɵɵComponentDeclaration<SortableListComponent, "gn-ui-sortable-list", never, { "elements": { "alias": "elements"; "required": false; }; "addOptions": { "alias": "addOptions"; "required": false; }; }, { "elementsChange": "elementsChange"; "add": "add"; }, never, never, true, never>;
21
21
  }
22
- export {};
23
22
  //# sourceMappingURL=sortable-list.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sortable-list.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/elements/src/lib/sortable-list/sortable-list.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,EAIZ,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EAGL,YAAY,EAGZ,IAAI,EACL,MAAM,eAAe,CAAA;;AAItB,KAAK,cAAc,GAAG;IACpB,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;IACxB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAChC,CAAA;AAED,qBAgBa,qBAAqB;IACvB,QAAQ,EAAE,KAAK,CAAC,cAAc,CAAC,CAAA;IAC/B,UAAU,EAAE,KAAK,CAAC;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC5D,cAAc,iCAA4C;IAC1D,GAAG,uBAA6B;IAE1C,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC;IAKjC,aAAa,CAAC,KAAK,EAAE,MAAM;IAK3B,SAAS,CAAC,KAAK,EAAE,MAAM;yCAhBZ,qBAAqB;2CAArB,qBAAqB;CAmBjC"}
1
+ {"version":3,"file":"sortable-list.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/elements/src/lib/sortable-list/sortable-list.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,EAIZ,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EAGL,YAAY,EAGZ,IAAI,EACL,MAAM,eAAe,CAAA;;AAItB,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;IACxB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAChC,CAAA;AAED,qBAgBa,qBAAqB;IACvB,QAAQ,EAAE,KAAK,CAAC,cAAc,CAAC,CAAA;IAC/B,UAAU,EAAE,KAAK,CAAC;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAK;IACjE,cAAc,iCAA4C;IAC1D,GAAG,uBAA6B;IAE1C,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC;IAKjC,aAAa,CAAC,KAAK,EAAE,MAAM;IAK3B,SAAS,CAAC,KAAK,EAAE,MAAM;yCAhBZ,qBAAqB;2CAArB,qBAAqB;CAmBjC"}
@@ -10,6 +10,7 @@ export declare class AutocompleteComponent implements OnInit, AfterViewInit, OnD
10
10
  action: (value: string) => Observable<AutocompleteItem[]>;
11
11
  value?: AutocompleteItem;
12
12
  clearOnSelection: boolean;
13
+ preventCompleteOnSelection: boolean;
13
14
  autoFocus: boolean;
14
15
  minCharacterCount?: number;
15
16
  allowSubmit: boolean;
@@ -38,8 +39,15 @@ export declare class AutocompleteComponent implements OnInit, AfterViewInit, OnD
38
39
  clear(): void;
39
40
  handleEnter(any: string): void;
40
41
  handleClickSearch(): void;
42
+ /**
43
+ * This function is triggered when an item is selected in the list of displayed items.
44
+ * If preventCompleteOnSelection is true then the input will be left as entered by the user.
45
+ * If preventCompleteOnSelection is false (by default) then the input will be completed with the item selected by the user.
46
+ * If clearOnSelection is true then the input will be cleared upon selection.
47
+ * @param event
48
+ */
41
49
  handleSelection(event: MatAutocompleteSelectedEvent): void;
42
50
  static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteComponent, never>;
43
- static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteComponent, "gn-ui-autocomplete", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "action": { "alias": "action"; "required": false; }; "value": { "alias": "value"; "required": false; }; "clearOnSelection": { "alias": "clearOnSelection"; "required": false; }; "autoFocus": { "alias": "autoFocus"; "required": false; }; "minCharacterCount": { "alias": "minCharacterCount"; "required": false; }; "allowSubmit": { "alias": "allowSubmit"; "required": false; }; "displayWithFn": { "alias": "displayWithFn"; "required": false; }; }, { "itemSelected": "itemSelected"; "inputSubmitted": "inputSubmitted"; "inputCleared": "inputCleared"; }, never, never, true, never>;
51
+ static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteComponent, "gn-ui-autocomplete", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "action": { "alias": "action"; "required": false; }; "value": { "alias": "value"; "required": false; }; "clearOnSelection": { "alias": "clearOnSelection"; "required": false; }; "preventCompleteOnSelection": { "alias": "preventCompleteOnSelection"; "required": false; }; "autoFocus": { "alias": "autoFocus"; "required": false; }; "minCharacterCount": { "alias": "minCharacterCount"; "required": false; }; "allowSubmit": { "alias": "allowSubmit"; "required": false; }; "displayWithFn": { "alias": "displayWithFn"; "required": false; }; }, { "itemSelected": "itemSelected"; "inputSubmitted": "inputSubmitted"; "inputCleared": "inputCleared"; }, never, never, true, never>;
44
52
  }
45
53
  //# sourceMappingURL=autocomplete.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEb,iBAAiB,EAEjB,UAAU,EACV,YAAY,EAEZ,SAAS,EACT,SAAS,EACT,MAAM,EAEN,aAAa,EAEd,MAAM,eAAe,CAAA;AACtB,OAAO,EAAuB,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACxE,OAAO,EACL,eAAe,EAEf,4BAA4B,EAC5B,sBAAsB,EACvB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAgB,UAAU,EAAM,aAAa,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;;AAiBhF,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAA;AAEtC,qBAea,qBACX,YAAW,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS;IAiC1C,OAAO,CAAC,KAAK;IA/BhB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,UAAU,CAAC,gBAAgB,EAAE,CAAC,CAAA;IACzD,KAAK,CAAC,EAAE,gBAAgB,CAAA;IACxB,gBAAgB,UAAQ;IACxB,SAAS,UAAQ;IACjB,iBAAiB,CAAC,SAAI;IACtB,WAAW,UAAO;IACjB,YAAY,wBAAuC;IACnD,cAAc,uBAA6B;IAC3C,YAAY,qBAA2B;IACd,UAAU,EAAE,sBAAsB,CAAA;IACzC,YAAY,EAAE,eAAe,CAAA;IAC/B,QAAQ,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAA;IAEhE,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,qBAA2B;IAClC,WAAW,UAAO;IAClB,gBAAgB,8CAAqD;IACrE,eAAe,wBAA+B;IAC9C,KAAK,EAAE,MAAM,GAAG,IAAI,CAAO;IAC3B,YAAY,EAAE,UAAU,CAAC,gBAAgB,EAAE,CAAC,CAAA;IAC5C,YAAY,eAAqB;IAExB,aAAa,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,MAAM,CACzC;IAEjB,qBAAqB,UAAW,gBAAgB,YAG/C;gBAEmB,KAAK,EAAE,iBAAiB;IAC5C,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAWzC,QAAQ,IAAI,IAAI;IAkEhB,eAAe,IAAI,IAAI;IAQvB,WAAW,IAAI,IAAI;IAInB,gBAAgB,CAAC,KAAK,EAAE,gBAAgB;IASxC,KAAK,IAAI,IAAI;IASb,WAAW,CAAC,GAAG,EAAE,MAAM;IAMvB,iBAAiB;IAIjB,eAAe,CAAC,KAAK,EAAE,4BAA4B;yCAxJxC,qBAAqB;2CAArB,qBAAqB;CAiKjC"}
1
+ {"version":3,"file":"autocomplete.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEb,iBAAiB,EAEjB,UAAU,EACV,YAAY,EAEZ,SAAS,EACT,SAAS,EACT,MAAM,EAEN,aAAa,EAEd,MAAM,eAAe,CAAA;AACtB,OAAO,EAAuB,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACxE,OAAO,EACL,eAAe,EAEf,4BAA4B,EAC5B,sBAAsB,EACvB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAgB,UAAU,EAAM,aAAa,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;;AAiBhF,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAA;AAEtC,qBAea,qBACX,YAAW,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS;IAkC1C,OAAO,CAAC,KAAK;IAhChB,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,UAAU,CAAC,gBAAgB,EAAE,CAAC,CAAA;IACzD,KAAK,CAAC,EAAE,gBAAgB,CAAA;IACxB,gBAAgB,UAAQ;IACxB,0BAA0B,UAAQ;IAClC,SAAS,UAAQ;IACjB,iBAAiB,CAAC,SAAI;IACtB,WAAW,UAAO;IACjB,YAAY,wBAAuC;IACnD,cAAc,uBAA6B;IAC3C,YAAY,qBAA2B;IACd,UAAU,EAAE,sBAAsB,CAAA;IACzC,YAAY,EAAE,eAAe,CAAA;IAC/B,QAAQ,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAA;IAEhE,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,qBAA2B;IAClC,WAAW,UAAO;IAClB,gBAAgB,8CAAqD;IACrE,eAAe,wBAA+B;IAC9C,KAAK,EAAE,MAAM,GAAG,IAAI,CAAO;IAC3B,YAAY,EAAE,UAAU,CAAC,gBAAgB,EAAE,CAAC,CAAA;IAC5C,YAAY,eAAqB;IAExB,aAAa,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,MAAM,CACzC;IAEjB,qBAAqB,UAAW,gBAAgB,YAG/C;gBAEmB,KAAK,EAAE,iBAAiB;IAC5C,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAWzC,QAAQ,IAAI,IAAI;IAkEhB,eAAe,IAAI,IAAI;IAQvB,WAAW,IAAI,IAAI;IAInB,gBAAgB,CAAC,KAAK,EAAE,gBAAgB;IASxC,KAAK,IAAI,IAAI;IASb,WAAW,CAAC,GAAG,EAAE,MAAM;IAMvB,iBAAiB;IAIjB;;;;;;OAMG;IACH,eAAe,CAAC,KAAK,EAAE,4BAA4B;yCAhKxC,qBAAqB;2CAArB,qBAAqB;CA6KjC"}
@@ -1,13 +1,11 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import { ChangeDetectorRef, EventEmitter } from '@angular/core';
3
- import { FormControl } from '@angular/forms';
4
3
  import * as i0 from "@angular/core";
5
4
  export declare class ImageInputComponent {
6
5
  private http;
7
6
  private cd;
8
- formControl: FormControl;
9
7
  maxSizeMB: number;
10
- previewUrl?: URL;
8
+ previewUrl?: string;
11
9
  altText?: string;
12
10
  uploadProgress?: number;
13
11
  uploadError?: boolean;
@@ -41,6 +39,6 @@ export declare class ImageInputComponent {
41
39
  private filterTypeImage;
42
40
  private resizeAndEmit;
43
41
  static ɵfac: i0.ɵɵFactoryDeclaration<ImageInputComponent, never>;
44
- static ɵcmp: i0.ɵɵComponentDeclaration<ImageInputComponent, "gn-ui-image-input", never, { "formControl": { "alias": "formControl"; "required": false; }; "maxSizeMB": { "alias": "maxSizeMB"; "required": false; }; "previewUrl": { "alias": "previewUrl"; "required": false; }; "altText": { "alias": "altText"; "required": false; }; "uploadProgress": { "alias": "uploadProgress"; "required": false; }; "uploadError": { "alias": "uploadError"; "required": false; }; }, { "fileChange": "fileChange"; "urlChange": "urlChange"; "uploadCancel": "uploadCancel"; "delete": "delete"; "altTextChange": "altTextChange"; }, never, never, true, never>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<ImageInputComponent, "gn-ui-image-input", never, { "maxSizeMB": { "alias": "maxSizeMB"; "required": false; }; "previewUrl": { "alias": "previewUrl"; "required": false; }; "altText": { "alias": "altText"; "required": false; }; "uploadProgress": { "alias": "uploadProgress"; "required": false; }; "uploadError": { "alias": "uploadError"; "required": false; }; }, { "fileChange": "fileChange"; "urlChange": "urlChange"; "uploadCancel": "uploadCancel"; "delete": "delete"; "altTextChange": "altTextChange"; }, never, never, true, never>;
45
43
  }
46
44
  //# sourceMappingURL=image-input.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"image-input.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/inputs/src/lib/image-input/image-input.component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,EAEL,iBAAiB,EAEjB,YAAY,EAGb,MAAM,eAAe,CAAA;AAStB,OAAO,EAAE,WAAW,EAAuB,MAAM,gBAAgB,CAAA;;AAEjE,qBAgBa,mBAAmB;IAsBlB,OAAO,CAAC,IAAI;IAAc,OAAO,CAAC,EAAE;IArBvC,WAAW,EAAG,WAAW,CAAA;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,GAAG,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,EAAE,YAAY,CAAC,IAAI,CAAC,CAAqB;IACnD,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,CAAqB;IACpD,YAAY,EAAE,YAAY,CAAC,IAAI,CAAC,CAAqB;IACrD,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,CAAqB;IAC/C,aAAa,EAAE,YAAY,CAAC,MAAM,CAAC,CAAqB;IAElE,aAAa,UAAQ;IACrB,YAAY,UAAQ;IACpB,aAAa,UAAQ;IACrB,gBAAgB,UAAQ;IAExB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,GAAG,KAAK,CAAA;IAC/B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;gBAEb,IAAI,EAAE,UAAU,EAAU,EAAE,EAAE,iBAAiB;IAEnE,cAAc;IAUd,gBAAgB;IAUhB,mBAAmB,CAAC,aAAa,EAAE,OAAO;IAO1C,eAAe,CAAC,KAAK,EAAE,IAAI,EAAE;IAS7B,eAAe,CAAC,KAAK,EAAE,KAAK;IAQ5B,eAAe;IAKf,eAAe,CAAC,KAAK,EAAE,KAAK;IAKtB,WAAW;IAiCjB,wBAAwB;IAQxB,YAAY;IAIZ,WAAW;IAWX,YAAY;IAKZ,kBAAkB;IAIlB,mBAAmB,CAAC,KAAK,EAAE,KAAK;IAKhC,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,aAAa;yCA1JV,mBAAmB;2CAAnB,mBAAmB;CAiK/B"}
1
+ {"version":3,"file":"image-input.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/inputs/src/lib/image-input/image-input.component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,EAEL,iBAAiB,EAEjB,YAAY,EAGb,MAAM,eAAe,CAAA;;AAUtB,qBAea,mBAAmB;IAqBlB,OAAO,CAAC,IAAI;IAAc,OAAO,CAAC,EAAE;IApBvC,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,EAAE,YAAY,CAAC,IAAI,CAAC,CAAqB;IACnD,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,CAAqB;IACpD,YAAY,EAAE,YAAY,CAAC,IAAI,CAAC,CAAqB;IACrD,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,CAAqB;IAC/C,aAAa,EAAE,YAAY,CAAC,MAAM,CAAC,CAAqB;IAElE,aAAa,UAAQ;IACrB,YAAY,UAAQ;IACpB,aAAa,UAAQ;IACrB,gBAAgB,UAAQ;IAExB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,GAAG,KAAK,CAAA;IAC/B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;gBAEb,IAAI,EAAE,UAAU,EAAU,EAAE,EAAE,iBAAiB;IAEnE,cAAc;IAUd,gBAAgB;IAUhB,mBAAmB,CAAC,aAAa,EAAE,OAAO;IAO1C,eAAe,CAAC,KAAK,EAAE,IAAI,EAAE;IAS7B,eAAe,CAAC,KAAK,EAAE,KAAK;IAQ5B,eAAe;IAKf,eAAe,CAAC,KAAK,EAAE,KAAK;IAKtB,WAAW;IAgCjB,wBAAwB;IAQxB,YAAY;IAIZ,WAAW;IAWX,YAAY;IAIZ,kBAAkB;IAIlB,mBAAmB,CAAC,KAAK,EAAE,KAAK;IAKhC,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,aAAa;yCAvJV,mBAAmB;2CAAnB,mBAAmB;CA8J/B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geonetwork-ui",
3
- "version": "2.4.0-dev.ac57b75b",
3
+ "version": "2.4.0-dev.b0bcda82",
4
4
  "engines": {
5
5
  "node": ">=14.17.0"
6
6
  },
@@ -180,11 +180,11 @@ export function findParent(
180
180
 
181
181
  export function readText(): ChainableFunction<XmlElement, string> {
182
182
  return (el) => {
183
- const textNode =
184
- el && Array.isArray(el.children)
185
- ? (el.children.find((node) => node.type === 'text') as XmlText)
186
- : null
187
- return textNode ? textNode.text : null
183
+ if (!el) return null
184
+ const textNode = Array.isArray(el.children)
185
+ ? (el.children.find((node) => node.type === 'text') as XmlText)
186
+ : null
187
+ return textNode ? textNode.text : ''
188
188
  }
189
189
  }
190
190
 
@@ -1,4 +1,5 @@
1
1
  import { Organization } from './organization.model'
2
+ import { marker } from '@biesbjerg/ngx-translate-extract-marker'
2
3
 
3
4
  export const RoleValues = [
4
5
  'unspecified',
@@ -24,6 +25,33 @@ export const RoleValues = [
24
25
  'user', // Party who uses the resource
25
26
  ]
26
27
 
28
+ export const RoleLabels = new Map<Role, string>([
29
+ ['unspecified', marker('domain.contact.role.unspecified')],
30
+ ['other', marker('domain.contact.role.other')],
31
+ ['author', marker('domain.contact.role.author')],
32
+ ['collaborator', marker('domain.contact.role.collaborator')],
33
+ ['contributor', marker('domain.contact.role.contributor')],
34
+ ['custodian', marker('domain.contact.role.custodian')],
35
+ ['distributor', marker('domain.contact.role.distributor')],
36
+ ['editor', marker('domain.contact.role.editor')],
37
+ ['funder', marker('domain.contact.role.funder')],
38
+ ['mediator', marker('domain.contact.role.mediator')],
39
+ ['originator', marker('domain.contact.role.originator')],
40
+ ['owner', marker('domain.contact.role.owner')],
41
+ ['point_of_contact', marker('domain.contact.role.point_of_contact')],
42
+ [
43
+ 'principal_investigator',
44
+ marker('domain.contact.role.principal_investigator'),
45
+ ],
46
+ ['processor', marker('domain.contact.role.processor')],
47
+ ['publisher', marker('domain.contact.role.publisher')],
48
+ ['resource_provider', marker('domain.contact.role.resource_provider')],
49
+ ['rights_holder', marker('domain.contact.role.rights_holder')],
50
+ ['sponsor', marker('domain.contact.role.sponsor')],
51
+ ['stakeholder', marker('domain.contact.role.stakeholder')],
52
+ ['user', marker('domain.contact.role.user')],
53
+ ])
54
+
27
55
  export type Role = typeof RoleValues[number]
28
56
 
29
57
  export interface Individual {
@@ -0,0 +1,25 @@
1
+ <div class="flex flex-row gap-4 items-center">
2
+ <div class="flex flex-row border border-gray-200 rounded-xl p-4 gap-4 w-full">
3
+ <gn-ui-thumbnail
4
+ class="w-[56px] h-[56px] rounded-[4px]"
5
+ [thumbnailUrl]="contact.organization.logoUrl?.href"
6
+ [fit]="'contain'"
7
+ ></gn-ui-thumbnail>
8
+ <div class="flex flex-col w-full">
9
+ <div class="flex flex-row justify-between">
10
+ <span class="flex flex-wrap font-bold w-full"
11
+ >{{ contact.firstName }} {{ contact.lastName }}</span
12
+ >
13
+ </div>
14
+ <div>{{ contact.email }}</div>
15
+ </div>
16
+ </div>
17
+ <gn-ui-button
18
+ *ngIf="removable"
19
+ data-test="removeContactButton"
20
+ type="light"
21
+ extraClass="w-[20px] h-[20px] flex items-center justify-center"
22
+ (buttonClick)="removeContact(contact)"
23
+ ><span class="material-symbols-outlined"> close </span>
24
+ </gn-ui-button>
25
+ </div>
@@ -0,0 +1,30 @@
1
+ import {
2
+ ChangeDetectionStrategy,
3
+ Component,
4
+ EventEmitter,
5
+ Input,
6
+ Output,
7
+ } from '@angular/core'
8
+ import { Individual } from '../../../../../../../libs/common/domain/src/lib/model/record'
9
+ import { MatIconModule } from '@angular/material/icon'
10
+ import { CommonModule } from '@angular/common'
11
+ import { ButtonComponent } from '../../../../../../../libs/ui/inputs/src'
12
+ import { ThumbnailComponent } from '../../../../../../../libs/ui/elements/src'
13
+
14
+ @Component({
15
+ selector: 'gn-ui-contact-card',
16
+ templateUrl: './contact-card.component.html',
17
+ styleUrls: ['./contact-card.component.css'],
18
+ changeDetection: ChangeDetectionStrategy.OnPush,
19
+ standalone: true,
20
+ imports: [CommonModule, MatIconModule, ButtonComponent, ThumbnailComponent],
21
+ })
22
+ export class ContactCardComponent {
23
+ @Input() contact: Individual
24
+ @Input() removable = true
25
+ @Output() contactRemoved = new EventEmitter<Individual>()
26
+
27
+ removeContact(contact: Individual) {
28
+ this.contactRemoved.emit(contact)
29
+ }
30
+ }
@@ -2,7 +2,6 @@
2
2
  [maxSizeMB]="5"
3
3
  [previewUrl]="resourceUrl"
4
4
  [altText]="resourceAltText"
5
- [formControl]="formControl"
6
5
  (fileChange)="handleFileChange($event)"
7
6
  (urlChange)="handleUrlChange($event)"
8
7
  (altTextChange)="handleAltTextChange($event)"
@@ -15,12 +15,6 @@ import { UiInputsModule } from '../../../../../../../libs/ui/inputs/src'
15
15
  import { FormControl } from '@angular/forms'
16
16
  import { GraphicOverview } from '../../../../../../../libs/common/domain/src/lib/model/record'
17
17
 
18
- const extractFileNameFromUrl = (url: string): string => {
19
- const pattern = new RegExp(`attachments/([^/?#]+)(?:[/?#]|$)`, 'i')
20
- const match = url.match(pattern)
21
- return match ? match[1] : ''
22
- }
23
-
24
18
  @Component({
25
19
  selector: 'gn-ui-overview-upload',
26
20
  standalone: true,
@@ -35,9 +29,9 @@ export class OverviewUploadComponent implements OnInit, OnChanges {
35
29
  @Output() overviewChange = new EventEmitter<GraphicOverview | null>()
36
30
  @Output() altTextChange: EventEmitter<string> = new EventEmitter()
37
31
 
38
- resourceAltText = '' // = ressourceFileName by default
39
- resourceFileName = ''
40
- resourceUrl: URL
32
+ resourceAltText: string
33
+ resourceFileName: string
34
+ resourceUrl: string
41
35
 
42
36
  constructor(
43
37
  private recordsApiService: RecordsApiService,
@@ -48,14 +42,13 @@ export class OverviewUploadComponent implements OnInit, OnChanges {
48
42
  this.recordsApiService.getAllResources(this.metadataUuid).subscribe({
49
43
  next: (resources) => {
50
44
  if (resources && resources.length > 0) {
51
- this.resourceUrl = new URL(resources[0]?.url)
52
- this.resourceAltText =
53
- this.resourceAltText === ''
54
- ? resources[0].filename
55
- : this.resourceAltText
56
- this.resourceFileName = extractFileNameFromUrl(resources[0]?.url)
45
+ this.resourceUrl = resources[0].url
46
+ this.resourceFileName = resources[0].filename
47
+ if (!this.resourceAltText) {
48
+ this.resourceAltText = this.resourceFileName
49
+ }
57
50
  } else {
58
- this.resourceUrl = null
51
+ this.resourceUrl = ''
59
52
  this.resourceAltText = ''
60
53
  this.resourceFileName = ''
61
54
  }
@@ -71,7 +64,7 @@ export class OverviewUploadComponent implements OnInit, OnChanges {
71
64
  .putResource(this.metadataUuid, file, 'public')
72
65
  .subscribe({
73
66
  next: (resource) => {
74
- this.resourceUrl = new URL(resource.url)
67
+ this.resourceUrl = resource.url
75
68
  this.resourceAltText = resource.filename
76
69
 
77
70
  this.overviewChange.emit({
@@ -90,7 +83,7 @@ export class OverviewUploadComponent implements OnInit, OnChanges {
90
83
  .putResourceFromURL(this.metadataUuid, url, 'public')
91
84
  .subscribe({
92
85
  next: (resource) => {
93
- this.resourceUrl = new URL(resource.url)
86
+ this.resourceUrl = resource.url
94
87
  this.resourceAltText = resource.filename
95
88
 
96
89
  this.overviewChange.emit({
@@ -108,19 +101,21 @@ export class OverviewUploadComponent implements OnInit, OnChanges {
108
101
  this.resourceAltText = newAltText
109
102
 
110
103
  this.overviewChange.emit({
111
- url: this.resourceUrl,
104
+ url: new URL(this.resourceUrl),
112
105
  description: this.resourceAltText,
113
106
  })
107
+
114
108
  this.cd.markForCheck()
115
109
  }
116
110
 
117
111
  handleDelete() {
112
+ //this.formControl.markAsDirty()
118
113
  this.recordsApiService
119
114
  .delResource(this.metadataUuid, this.resourceFileName)
120
115
  .subscribe({
121
116
  next: () => {
122
- this.resourceAltText = null
123
- this.resourceUrl = null
117
+ this.resourceAltText = ''
118
+ this.resourceUrl = ''
124
119
 
125
120
  this.overviewChange.emit(null)
126
121
 
@@ -133,7 +128,7 @@ export class OverviewUploadComponent implements OnInit, OnChanges {
133
128
  private errorHandle = (error: never) => {
134
129
  console.error(error)
135
130
 
136
- this.resourceUrl = null
131
+ this.resourceUrl = ''
137
132
  this.resourceAltText = ''
138
133
  this.resourceFileName = ''
139
134
 
@@ -157,7 +152,7 @@ export class OverviewUploadComponent implements OnInit, OnChanges {
157
152
  } else {
158
153
  return
159
154
  }
160
- if (overview.description && overview.description !== '') {
155
+ if (overview.description) {
161
156
  this.resourceAltText = overview.description
162
157
  this.cd.markForCheck()
163
158
  }