geonetwork-ui 2.4.0-dev.d5b28b1e → 2.4.0-dev.dd042cec
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/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 -3
- 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/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/translations/de.json +23 -0
- package/esm2022/translations/en.json +23 -0
- package/esm2022/translations/es.json +23 -0
- package/esm2022/translations/fr.json +24 -1
- package/esm2022/translations/it.json +23 -0
- package/esm2022/translations/nl.json +23 -0
- package/esm2022/translations/pt.json +23 -0
- package/fesm2022/geonetwork-ui.mjs +507 -16
- 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/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/fields.config.d.ts +6 -0
- package/libs/feature/editor/src/lib/fields.config.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/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/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/fields.config.ts +20 -1
- package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.html +1 -1
- 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/translations/de.json +23 -0
- package/translations/en.json +23 -0
- package/translations/es.json +23 -0
- package/translations/fr.json +24 -1
- package/translations/it.json +23 -0
- package/translations/nl.json +23 -0
- package/translations/pt.json +23 -0
- package/translations/sk.json +23 -0
|
@@ -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;
|
|
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"}
|
|
@@ -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"}
|
package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts
CHANGED
|
@@ -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
|
}
|
package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map
CHANGED
|
@@ -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,
|
|
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"}
|
|
@@ -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,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,
|
|
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;
|
|
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"}
|
package/package.json
CHANGED
|
@@ -180,11 +180,11 @@ export function findParent(
|
|
|
180
180
|
|
|
181
181
|
export function readText(): ChainableFunction<XmlElement, string> {
|
|
182
182
|
return (el) => {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
return textNode ? textNode.text :
|
|
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 {
|
|
File without changes
|
|
@@ -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
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<div class="flex flex-col gap-3">
|
|
2
|
+
<div class="flex flex-row flex-wrap gap-2" data-test="rolesToPick">
|
|
3
|
+
<ng-container *ngFor="let role of rolesToPick">
|
|
4
|
+
<gn-ui-button
|
|
5
|
+
extraClass="px-2 py-1.5"
|
|
6
|
+
(buttonClick)="addRoleToDisplay(role)"
|
|
7
|
+
>
|
|
8
|
+
<div class="flex flex-row gap-1 items-center">
|
|
9
|
+
<span class="text-primary text-[20px] leading-[0] font-bold pb-[5px]"
|
|
10
|
+
>₊</span
|
|
11
|
+
>
|
|
12
|
+
<span class="font-bold" translate>{{ roleToLabel(role) }}</span>
|
|
13
|
+
</div>
|
|
14
|
+
</gn-ui-button>
|
|
15
|
+
</ng-container>
|
|
16
|
+
</div>
|
|
17
|
+
<div
|
|
18
|
+
class="mt-8"
|
|
19
|
+
*ngIf="
|
|
20
|
+
roleSectionsToDisplay && roleSectionsToDisplay.length > 0;
|
|
21
|
+
else noContact
|
|
22
|
+
"
|
|
23
|
+
data-test="displayedRoles"
|
|
24
|
+
>
|
|
25
|
+
<div
|
|
26
|
+
*ngFor="
|
|
27
|
+
let role of roleSectionsToDisplay;
|
|
28
|
+
let index = index;
|
|
29
|
+
let isLast = last
|
|
30
|
+
"
|
|
31
|
+
class="flex flex-col gap-4"
|
|
32
|
+
>
|
|
33
|
+
<div class="flex flex-row justify-between">
|
|
34
|
+
<span class="font-bold text-base" translate>{{
|
|
35
|
+
roleToLabel(role)
|
|
36
|
+
}}</span>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<gn-ui-autocomplete
|
|
40
|
+
[placeholder]="'Choose a contact'"
|
|
41
|
+
[action]="autoCompleteAction"
|
|
42
|
+
(itemSelected)="addContact($event, role)"
|
|
43
|
+
[displayWithFn]="displayWithFn"
|
|
44
|
+
[minCharacterCount]="1"
|
|
45
|
+
[clearOnSelection]="true"
|
|
46
|
+
>
|
|
47
|
+
</gn-ui-autocomplete>
|
|
48
|
+
|
|
49
|
+
<ng-container *ngIf="contactsForRessourceByRole.get(role) as contacts">
|
|
50
|
+
<ng-container *ngIf="contacts.length > 1">
|
|
51
|
+
<gn-ui-sortable-list
|
|
52
|
+
[elements]="contactsAsDynElemByRole.get(role)"
|
|
53
|
+
(elementsChange)="handleContactsChanged($event)"
|
|
54
|
+
></gn-ui-sortable-list>
|
|
55
|
+
</ng-container>
|
|
56
|
+
<ng-container *ngIf="contacts.length === 1">
|
|
57
|
+
<ng-container *ngFor="let contact of contacts">
|
|
58
|
+
<gn-ui-contact-card
|
|
59
|
+
[contact]="contact"
|
|
60
|
+
(contactRemoved)="removeContact(index)"
|
|
61
|
+
></gn-ui-contact-card> </ng-container
|
|
62
|
+
></ng-container>
|
|
63
|
+
</ng-container>
|
|
64
|
+
|
|
65
|
+
<hr class="border-t-[#D6D3D1] mt-4 mb-6" *ngIf="!isLast" />
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
<ng-template #noContact>
|
|
69
|
+
<div
|
|
70
|
+
class="p-4 border border-primary bg-primary-lightest rounded-lg"
|
|
71
|
+
translate
|
|
72
|
+
>
|
|
73
|
+
editor.record.form.field.contactsForResource.noContact
|
|
74
|
+
</div>
|
|
75
|
+
</ng-template>
|
|
76
|
+
</div>
|