geonetwork-ui 2.4.0-dev.9075aa64 → 2.4.0-dev.9b37393d
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/index.mjs +2 -1
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.mjs +3 -3
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +1 -16
- package/esm2022/libs/api/metadata-converter/src/lib/xml-utils.mjs +18 -2
- package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +78 -39
- package/esm2022/libs/common/domain/src/lib/repository/records-repository.interface.mjs +1 -1
- package/esm2022/libs/feature/editor/src/index.mjs +2 -1
- package/esm2022/libs/feature/editor/src/lib/components/contact-card/contact-card.component.mjs +4 -16
- package/esm2022/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.mjs +4 -2
- package/esm2022/libs/feature/editor/src/lib/components/import-record/import-record.component.mjs +93 -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 +6 -3
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-date-updated/form-field-date-updated.component.mjs +19 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.mjs +23 -10
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.mjs +4 -8
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +10 -7
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.mjs +6 -3
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +5 -5
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/index.mjs +2 -2
- 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 +6 -4
- package/esm2022/libs/feature/editor/src/lib/models/editor-config.model.mjs +1 -1
- package/esm2022/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.mjs +6 -6
- package/esm2022/libs/ui/inputs/src/index.mjs +2 -1
- package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +7 -4
- package/esm2022/libs/ui/inputs/src/lib/badge/badge.component.mjs +5 -3
- package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +8 -1
- package/esm2022/libs/ui/inputs/src/lib/date-picker/date-picker.component.mjs +11 -4
- package/esm2022/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.mjs +9 -3
- package/esm2022/libs/ui/inputs/src/lib/file-input/file-input.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/image-input/image-input.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/url-input/url-input.component.mjs +3 -3
- package/esm2022/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.mjs +5 -3
- package/esm2022/libs/util/shared/src/lib/services/theme.service.mjs +2 -1
- package/esm2022/translations/de.json +9 -0
- package/esm2022/translations/en.json +9 -0
- package/esm2022/translations/es.json +9 -0
- package/esm2022/translations/fr.json +9 -0
- package/esm2022/translations/it.json +9 -0
- package/esm2022/translations/nl.json +9 -0
- package/esm2022/translations/pt.json +9 -0
- package/fesm2022/geonetwork-ui.mjs +388 -186
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/index.d.ts +1 -0
- package/libs/api/metadata-converter/src/index.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts +0 -1
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/xml-utils.d.ts +6 -0
- package/libs/api/metadata-converter/src/lib/xml-utils.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +12 -7
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
- package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts +7 -0
- package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
- package/libs/feature/editor/src/index.d.ts +1 -0
- package/libs/feature/editor/src/index.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/contact-card/contact-card.component.d.ts +1 -5
- package/libs/feature/editor/src/lib/components/contact-card/contact-card.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.d.ts +2 -1
- package/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/import-record/import-record.component.d.ts +33 -0
- package/libs/feature/editor/src/lib/components/import-record/import-record.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.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-date-updated/form-field-date-updated.component.d.ts +9 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-date-updated/form-field-date-updated.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.d.ts +5 -2
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts +1 -3
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/models/editor-config.model.d.ts +1 -0
- package/libs/feature/editor/src/lib/models/editor-config.model.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +1 -1
- package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts +2 -2
- package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts +1 -1
- package/libs/ui/inputs/src/index.d.ts +1 -0
- package/libs/ui/inputs/src/index.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/badge/badge.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/button/button.component.d.ts +1 -1
- package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/date-picker/date-picker.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts +2 -2
- package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/interactive-table/interactive-table-column/interactive-table-column.component.d.ts +1 -1
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +1 -1
- package/libs/util/shared/src/lib/services/theme.service.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/libs/api/metadata-converter/src/index.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +1 -2
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +0 -27
- package/src/libs/api/metadata-converter/src/lib/xml-utils.ts +20 -1
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +132 -68
- package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +10 -0
- package/src/libs/feature/editor/src/index.ts +1 -0
- package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.html +12 -22
- package/src/libs/feature/editor/src/lib/components/contact-card/contact-card.component.ts +1 -13
- package/src/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.ts +1 -0
- package/src/libs/feature/editor/src/lib/components/import-record/import-record.component.html +43 -0
- package/src/libs/feature/editor/src/lib/components/import-record/import-record.component.ts +129 -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 +4 -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 +13 -33
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.ts +2 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-date-updated/form-field-date-updated.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/{form-field-resource-updated/form-field-resource-updated.component.ts → form-field-date-updated/form-field-date-updated.component.ts} +4 -4
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.html +3 -2
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.ts +35 -3
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.css +8 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-online-link-resources/form-field-online-link-resources.component.html +1 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.html +13 -6
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.ts +0 -9
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.html +1 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.ts +16 -5
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.css +4 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.html +2 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extents/form-field-temporal-extents.component.ts +2 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.css +4 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.html +16 -14
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +19 -20
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +2 -2
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/index.ts +1 -1
- package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.html +30 -29
- package/src/libs/feature/editor/src/lib/fields.config.ts +5 -3
- package/src/libs/feature/editor/src/lib/models/editor-config.model.ts +3 -0
- package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.html +1 -0
- package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.html +13 -20
- package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.ts +1 -1
- package/src/libs/ui/inputs/src/index.ts +1 -0
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.css +25 -18
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.html +38 -24
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +4 -1
- package/src/libs/ui/inputs/src/lib/badge/badge.component.html +12 -3
- package/src/libs/ui/inputs/src/lib/badge/badge.component.ts +2 -1
- package/src/libs/ui/inputs/src/lib/button/button.component.ts +15 -1
- package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.css +7 -2
- package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.html +13 -6
- package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.ts +7 -1
- package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.css +7 -2
- package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.html +27 -23
- package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.ts +7 -1
- package/src/libs/ui/inputs/src/lib/file-input/file-input.component.css +4 -0
- package/src/libs/ui/inputs/src/lib/file-input/file-input.component.html +6 -2
- package/src/libs/ui/inputs/src/lib/image-input/image-input.component.css +4 -0
- package/src/libs/ui/inputs/src/lib/image-input/image-input.component.html +29 -21
- package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.css +4 -3
- package/src/libs/ui/inputs/src/lib/url-input/url-input.component.html +1 -1
- package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.html +8 -3
- package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.ts +4 -3
- package/src/libs/util/shared/src/lib/services/theme.service.ts +1 -0
- package/tailwind.base.config.js +1 -0
- package/tailwind.base.css +30 -4
- package/translations/de.json +9 -0
- package/translations/en.json +9 -0
- package/translations/es.json +9 -0
- package/translations/fr.json +9 -0
- package/translations/it.json +9 -0
- package/translations/nl.json +9 -0
- package/translations/pt.json +9 -0
- package/translations/sk.json +9 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.mjs +0 -19
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.d.ts +0 -9
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.d.ts.map +0 -1
- /package/src/libs/feature/editor/src/lib/components/{record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.css → import-record/import-record.component.css} +0 -0
- /package/src/libs/feature/editor/src/lib/components/record-form/form-field/{form-field-resource-updated/form-field-resource-updated.component.html → form-field-date-updated/form-field-date-updated.component.html} +0 -0
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
<div class="flex flex-col gap-3">
|
|
2
2
|
<div class="flex flex-row flex-wrap gap-2" data-test="rolesToPick">
|
|
3
3
|
<ng-container *ngFor="let role of rolesToPick">
|
|
4
|
-
<gn-ui-button
|
|
5
|
-
|
|
6
|
-
|
|
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>
|
|
4
|
+
<gn-ui-button type="gray" (buttonClick)="addRoleToDisplay(role)">
|
|
5
|
+
<mat-icon class="material-symbols-outlined text-primary">add</mat-icon>
|
|
6
|
+
|
|
7
|
+
<span translate>{{ roleToLabel(role) }}</span>
|
|
14
8
|
</gn-ui-button>
|
|
15
9
|
</ng-container>
|
|
16
10
|
</div>
|
|
@@ -43,33 +37,19 @@
|
|
|
43
37
|
[displayWithFn]="displayWithFn"
|
|
44
38
|
[minCharacterCount]="1"
|
|
45
39
|
[clearOnSelection]="true"
|
|
40
|
+
[allowSubmit]="false"
|
|
46
41
|
>
|
|
47
42
|
</gn-ui-autocomplete>
|
|
48
43
|
|
|
49
44
|
<ng-container *ngIf="contactsForRessourceByRole.get(role) as contacts">
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
<gn-ui-contact-card
|
|
59
|
-
[contact]="contact"
|
|
60
|
-
[removable]="false"
|
|
61
|
-
></gn-ui-contact-card>
|
|
62
|
-
</div>
|
|
63
|
-
</ng-template>
|
|
64
|
-
</ng-container>
|
|
65
|
-
<ng-container *ngIf="contacts.length === 1">
|
|
66
|
-
<ng-container *ngFor="let contact of contacts">
|
|
67
|
-
<gn-ui-contact-card
|
|
68
|
-
[contact]="contact"
|
|
69
|
-
(contactRemoved)="removeContact(index)"
|
|
70
|
-
></gn-ui-contact-card>
|
|
71
|
-
</ng-container>
|
|
72
|
-
</ng-container>
|
|
45
|
+
<gn-ui-sortable-list
|
|
46
|
+
[items]="contacts"
|
|
47
|
+
(itemsOrderChange)="handleContactsChanged($event)"
|
|
48
|
+
[elementTemplate]="contactTemplate"
|
|
49
|
+
></gn-ui-sortable-list>
|
|
50
|
+
<ng-template #contactTemplate let-contact>
|
|
51
|
+
<gn-ui-contact-card [contact]="contact"></gn-ui-contact-card>
|
|
52
|
+
</ng-template>
|
|
73
53
|
</ng-container>
|
|
74
54
|
|
|
75
55
|
<hr class="border-t-[#D6D3D1] mt-4 mb-6" *ngIf="!isLast" />
|
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
} from 'rxjs'
|
|
35
35
|
import { map } from 'rxjs/operators'
|
|
36
36
|
import { ContactCardComponent } from '../../../contact-card/contact-card.component'
|
|
37
|
+
import { MatIconModule } from '@angular/material/icon'
|
|
37
38
|
|
|
38
39
|
@Component({
|
|
39
40
|
selector: 'gn-ui-form-field-contacts-for-resource',
|
|
@@ -50,6 +51,7 @@ import { ContactCardComponent } from '../../../contact-card/contact-card.compone
|
|
|
50
51
|
TranslateModule,
|
|
51
52
|
ContactCardComponent,
|
|
52
53
|
SortableListComponent,
|
|
54
|
+
MatIconModule,
|
|
53
55
|
],
|
|
54
56
|
})
|
|
55
57
|
export class FormFieldContactsForResourceComponent
|
|
File without changes
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
import { DatePickerComponent } from '../../../../../../../../../libs/ui/inputs/src'
|
|
9
9
|
|
|
10
10
|
@Component({
|
|
11
|
-
selector: 'gn-ui-form-field-
|
|
12
|
-
templateUrl: './form-field-
|
|
13
|
-
styleUrls: ['./form-field-
|
|
11
|
+
selector: 'gn-ui-form-field-date-updated',
|
|
12
|
+
templateUrl: './form-field-date-updated.component.html',
|
|
13
|
+
styleUrls: ['./form-field-date-updated.component.css'],
|
|
14
14
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
15
|
standalone: true,
|
|
16
16
|
imports: [DatePickerComponent],
|
|
17
17
|
})
|
|
18
|
-
export class
|
|
18
|
+
export class FormFieldDateUpdatedComponent {
|
|
19
19
|
@Input() value: Date
|
|
20
20
|
@Output() valueChange: EventEmitter<Date> = new EventEmitter()
|
|
21
21
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<div class="flex flex-col gap-3">
|
|
2
2
|
<gn-ui-generic-keywords
|
|
3
|
-
[keywords]="
|
|
3
|
+
[keywords]="filteredKeywords"
|
|
4
4
|
[keywordTypes]="keywordTypes"
|
|
5
|
-
[placeholder]="placeholder | translate"
|
|
5
|
+
[placeholder]="'editor.form.keywords.placeholder' | translate"
|
|
6
6
|
(changedKeywords)="handleKeywordsChange($event)"
|
|
7
|
+
[allowSubmit]="false"
|
|
7
8
|
>
|
|
8
9
|
</gn-ui-generic-keywords>
|
|
9
10
|
</div>
|
|
@@ -16,6 +16,10 @@ import { Keyword } from '../../../../../../../../../libs/common/domain/src/lib/m
|
|
|
16
16
|
import { GenericKeywordsComponent } from '../../../generic-keywords/generic-keywords.component'
|
|
17
17
|
import { TranslateModule } from '@ngx-translate/core'
|
|
18
18
|
import { KeywordType } from '../../../../../../../../../libs/common/domain/src/lib/model/thesaurus'
|
|
19
|
+
import { EditorFacade } from '../../../../+state/editor.facade'
|
|
20
|
+
import { firstValueFrom, map } from 'rxjs'
|
|
21
|
+
import { SPATIAL_SCOPES } from '../../../../fields.config'
|
|
22
|
+
import { all } from 'ol/loadingstrategy'
|
|
19
23
|
|
|
20
24
|
@Component({
|
|
21
25
|
selector: 'gn-ui-form-field-keywords',
|
|
@@ -38,9 +42,37 @@ export class FormFieldKeywordsComponent {
|
|
|
38
42
|
@Output() valueChange: EventEmitter<Keyword[]> = new EventEmitter()
|
|
39
43
|
|
|
40
44
|
keywordTypes = ['temporal', 'theme', 'other'] as KeywordType[]
|
|
41
|
-
placeholder = 'editor.form.keywords.placeholder'
|
|
42
45
|
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
get filteredKeywords(): Keyword[] {
|
|
47
|
+
return (
|
|
48
|
+
this.value?.filter(
|
|
49
|
+
(keyword) =>
|
|
50
|
+
keyword.type !== 'place' && // filter out place keywords
|
|
51
|
+
!SPATIAL_SCOPES.some(
|
|
52
|
+
(spatialScope) => spatialScope.label === keyword.label
|
|
53
|
+
) // filter out keywords matching spatialScope keys
|
|
54
|
+
) || []
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
constructor(private editorFacade: EditorFacade) {}
|
|
59
|
+
|
|
60
|
+
async handleKeywordsChange(keywords: Keyword[]) {
|
|
61
|
+
const filteredKeywords = await firstValueFrom(
|
|
62
|
+
this.editorFacade.record$.pipe(
|
|
63
|
+
map((record) =>
|
|
64
|
+
record.keywords.filter(
|
|
65
|
+
(k) =>
|
|
66
|
+
k.type === 'place' || // get back place keyword
|
|
67
|
+
SPATIAL_SCOPES.some(
|
|
68
|
+
(spatialScope) => spatialScope.label === k.label // get back spatialScope keywords
|
|
69
|
+
)
|
|
70
|
+
)
|
|
71
|
+
)
|
|
72
|
+
)
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
const allKeywords = [...filteredKeywords, ...keywords]
|
|
76
|
+
this.valueChange.emit(allKeywords)
|
|
45
77
|
}
|
|
46
78
|
}
|
|
@@ -1,20 +1,27 @@
|
|
|
1
1
|
<gn-ui-form-field-wrapper [label]="label" [hint]="hint">
|
|
2
2
|
<gn-ui-button
|
|
3
3
|
form-field-interaction
|
|
4
|
-
[
|
|
4
|
+
[type]="preview ? 'black' : 'gray'"
|
|
5
|
+
style="
|
|
6
|
+
--gn-ui-button-padding: 3px 8px;
|
|
7
|
+
--gn-ui-button-font-size: 12px;
|
|
8
|
+
--gn-ui-button-rounded: 20px;
|
|
9
|
+
"
|
|
5
10
|
(buttonClick)="togglePreview()"
|
|
6
11
|
>
|
|
7
|
-
<span
|
|
8
|
-
|
|
9
|
-
|
|
12
|
+
<span
|
|
13
|
+
class="material-symbols-outlined gn-ui-icon-small"
|
|
14
|
+
[ngClass]="{ 'text-primary': !preview }"
|
|
15
|
+
>{{ preview ? 'visibility' : 'visibility_off' }}</span
|
|
16
|
+
>
|
|
17
|
+
|
|
10
18
|
{{ preview ? 'WYSIWYG' : 'Markdown' }}
|
|
11
19
|
</gn-ui-button>
|
|
12
20
|
<gn-ui-markdown-editor
|
|
13
|
-
class="h-full"
|
|
14
21
|
[preview]="preview"
|
|
15
|
-
[helperText]="helperText"
|
|
16
22
|
[placeholder]="placeholder"
|
|
17
23
|
[textContent]="value"
|
|
18
24
|
(textContentChanged)="valueChange.emit($event)"
|
|
25
|
+
textAreaExtraClass="min-h-[100px]"
|
|
19
26
|
></gn-ui-markdown-editor>
|
|
20
27
|
</gn-ui-form-field-wrapper>
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common'
|
|
2
2
|
import {
|
|
3
3
|
ChangeDetectionStrategy,
|
|
4
|
-
ChangeDetectorRef,
|
|
5
4
|
Component,
|
|
6
5
|
EventEmitter,
|
|
7
6
|
Input,
|
|
8
|
-
OnInit,
|
|
9
7
|
Output,
|
|
10
8
|
} from '@angular/core'
|
|
11
9
|
import { ReactiveFormsModule } from '@angular/forms'
|
|
@@ -30,7 +28,6 @@ import { FormFieldWrapperComponent } from '../../../../../../../../../libs/ui/la
|
|
|
30
28
|
export class FormFieldRichComponent {
|
|
31
29
|
@Input() label: string
|
|
32
30
|
@Input() hint: string
|
|
33
|
-
@Input() helperText: string
|
|
34
31
|
@Input() placeholder = 'Votre texte ici' //TODO: translate
|
|
35
32
|
@Input() value: string
|
|
36
33
|
|
|
@@ -38,12 +35,6 @@ export class FormFieldRichComponent {
|
|
|
38
35
|
|
|
39
36
|
preview = false
|
|
40
37
|
|
|
41
|
-
getButtonExtraClass() {
|
|
42
|
-
return `${
|
|
43
|
-
this.preview ? 'text-gray-200 bg-gray-900' : 'text-gray-900 bg-gray-200'
|
|
44
|
-
} rounded-[1.25rem] p-[0.375rem] text-xs font-medium w-24`
|
|
45
|
-
}
|
|
46
|
-
|
|
47
38
|
togglePreview() {
|
|
48
39
|
this.preview = !this.preview
|
|
49
40
|
}
|
|
@@ -175,16 +175,27 @@ export class FormFieldSpatialExtentComponent {
|
|
|
175
175
|
...(thesaurus && { thesaurus }),
|
|
176
176
|
} as Keyword)
|
|
177
177
|
)
|
|
178
|
-
|
|
178
|
+
|
|
179
|
+
const notPlaceKwAndSpatialScopeKw = await firstValueFrom(
|
|
179
180
|
this.editorFacade.record$.pipe(
|
|
180
|
-
map((record) =>
|
|
181
|
+
map((record) =>
|
|
182
|
+
record.keywords.filter(
|
|
183
|
+
(k) =>
|
|
184
|
+
k.type !== 'place' ||
|
|
185
|
+
SPATIAL_SCOPES.some(
|
|
186
|
+
(spatialScope) => spatialScope.label === k.label // get back spatialScope keywords
|
|
187
|
+
)
|
|
188
|
+
)
|
|
189
|
+
)
|
|
181
190
|
)
|
|
182
191
|
)
|
|
183
192
|
|
|
184
|
-
|
|
185
|
-
...
|
|
193
|
+
const allKeywords = [
|
|
194
|
+
...notPlaceKwAndSpatialScopeKw,
|
|
186
195
|
...filteredPlaceKeywords,
|
|
187
|
-
]
|
|
196
|
+
]
|
|
197
|
+
|
|
198
|
+
this.editorFacade.updateRecordField('keywords', allKeywords)
|
|
188
199
|
this.editorFacade.updateRecordField('spatialExtents', spatialExtents)
|
|
189
200
|
}
|
|
190
201
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<div class="flex gap-2 mb-2">
|
|
2
2
|
<gn-ui-button
|
|
3
|
+
type="gray"
|
|
3
4
|
*ngFor="let addOption of addOptions$ | async"
|
|
4
5
|
(buttonClick)="onAdd(addOption.eventName)"
|
|
5
6
|
>
|
|
6
|
-
<
|
|
7
|
+
<mat-icon class="material-symbols-outlined text-primary">add</mat-icon>
|
|
7
8
|
{{ addOption.buttonLabel }}</gn-ui-button
|
|
8
9
|
>
|
|
9
10
|
</div>
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
} from '../../../../../../../../../libs/ui/inputs/src'
|
|
16
16
|
import { TranslateModule, TranslateService } from '@ngx-translate/core'
|
|
17
17
|
import { combineLatest, map } from 'rxjs'
|
|
18
|
+
import { MatIconModule } from '@angular/material/icon'
|
|
18
19
|
|
|
19
20
|
@Component({
|
|
20
21
|
selector: 'gn-ui-form-field-temporal-extents',
|
|
@@ -29,6 +30,7 @@ import { combineLatest, map } from 'rxjs'
|
|
|
29
30
|
DatePickerComponent,
|
|
30
31
|
DateRangePickerComponent,
|
|
31
32
|
TranslateModule,
|
|
33
|
+
MatIconModule,
|
|
32
34
|
],
|
|
33
35
|
})
|
|
34
36
|
export class FormFieldTemporalExtentsComponent {
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
<div class="flex flex-col gap-2">
|
|
2
|
+
<gn-ui-check-toggle
|
|
3
|
+
[label]="'editor.record.form.updateFrequency.planned' | translate"
|
|
4
|
+
[value]="planned"
|
|
5
|
+
(toggled)="onPlannedToggled()"
|
|
6
|
+
></gn-ui-check-toggle>
|
|
7
|
+
<gn-ui-dropdown-selector
|
|
8
|
+
title="updateFrequency"
|
|
9
|
+
[showTitle]="false"
|
|
10
|
+
[choices]="choices"
|
|
11
|
+
[selected]="selectedFrequency"
|
|
12
|
+
(selectValue)="onSelectFrequencyValue($event)"
|
|
13
|
+
[disabled]="!planned"
|
|
14
|
+
>
|
|
15
|
+
</gn-ui-dropdown-selector>
|
|
16
|
+
</div>
|
package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html
CHANGED
|
@@ -22,30 +22,31 @@
|
|
|
22
22
|
<ng-template #fieldContent>
|
|
23
23
|
<ng-container [ngSwitch]="model">
|
|
24
24
|
<ng-container *ngSwitchCase="'title'">
|
|
25
|
-
<div class="flex
|
|
25
|
+
<div class="flex flex-row flex-start items-center gap-3 mb-[12px]">
|
|
26
26
|
<span
|
|
27
27
|
#titleInput
|
|
28
28
|
class="grow font-title text-3xl font-normal"
|
|
29
29
|
[gnUiEditableLabel]="valueAsString"
|
|
30
30
|
(editableLabelChanged)="valueChange.emit($event)"
|
|
31
31
|
></span>
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
32
|
+
<div class="flex flex-row justify-between">
|
|
33
|
+
<span
|
|
34
|
+
class="material-symbols-outlined gn-ui-icon-small m-2 cursor-pointer"
|
|
35
|
+
(click)="focusTitleInput()"
|
|
36
|
+
>edit</span
|
|
37
|
+
>
|
|
38
|
+
<span
|
|
39
|
+
class="material-symbols-outlined gn-ui-icon-small m-2"
|
|
40
|
+
[matTooltip]="config.hintKey! | translate"
|
|
41
|
+
matTooltipPosition="above"
|
|
42
|
+
>
|
|
43
|
+
help
|
|
44
|
+
</span>
|
|
45
|
+
</div>
|
|
44
46
|
</div>
|
|
45
47
|
</ng-container>
|
|
46
48
|
<ng-container *ngSwitchCase="'abstract'">
|
|
47
49
|
<gn-ui-form-field-rich
|
|
48
|
-
class="h-[8rem]"
|
|
49
50
|
[label]="config.labelKey! | translate"
|
|
50
51
|
[hint]="config.hintKey! | translate"
|
|
51
52
|
[value]="valueAsString"
|
|
@@ -68,18 +69,16 @@
|
|
|
68
69
|
></gn-ui-form-field-simple>
|
|
69
70
|
</ng-container>
|
|
70
71
|
<ng-container *ngSwitchCase="'resourceUpdated'">
|
|
71
|
-
<gn-ui-form-field-
|
|
72
|
+
<gn-ui-form-field-date-updated
|
|
72
73
|
[value]="valueAsDate"
|
|
73
74
|
(valueChange)="valueChange.emit($event)"
|
|
74
|
-
></gn-ui-form-field-
|
|
75
|
+
></gn-ui-form-field-date-updated>
|
|
75
76
|
</ng-container>
|
|
76
77
|
<ng-container *ngSwitchCase="'recordUpdated'">
|
|
77
|
-
<gn-ui-form-field-
|
|
78
|
-
type="date"
|
|
79
|
-
[readonly]="true"
|
|
78
|
+
<gn-ui-form-field-date-updated
|
|
80
79
|
[value]="valueAsDate"
|
|
81
80
|
(valueChange)="valueChange.emit($event)"
|
|
82
|
-
></gn-ui-form-field-
|
|
81
|
+
></gn-ui-form-field-date-updated>
|
|
83
82
|
</ng-container>
|
|
84
83
|
<ng-container *ngSwitchCase="'updateFrequency'">
|
|
85
84
|
<gn-ui-form-field-update-frequency
|
package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts
CHANGED
|
@@ -25,7 +25,7 @@ import { FormFieldWrapperComponent } from '../../../../../../../../libs/ui/layou
|
|
|
25
25
|
import { TranslateModule } from '@ngx-translate/core'
|
|
26
26
|
import {
|
|
27
27
|
FormFieldLicenseComponent,
|
|
28
|
-
|
|
28
|
+
FormFieldDateUpdatedComponent,
|
|
29
29
|
FormFieldTemporalExtentsComponent,
|
|
30
30
|
} from '.'
|
|
31
31
|
import { FieldModelSpecifier, FormFieldConfig } from '../../../models'
|
|
@@ -56,7 +56,7 @@ import { FormFieldOnlineLinkResourcesComponent } from './form-field-online-link-
|
|
|
56
56
|
MatTooltipModule,
|
|
57
57
|
FormFieldWrapperComponent,
|
|
58
58
|
FormFieldLicenseComponent,
|
|
59
|
-
|
|
59
|
+
FormFieldDateUpdatedComponent,
|
|
60
60
|
FormFieldUpdateFrequencyComponent,
|
|
61
61
|
FormFieldTemporalExtentsComponent,
|
|
62
62
|
FormFieldSimpleComponent,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './form-field-keywords/form-field-keywords.component'
|
|
2
2
|
export * from './form-field-license/form-field-license.component'
|
|
3
|
-
export * from './form-field-
|
|
3
|
+
export * from './form-field-date-updated/form-field-date-updated.component'
|
|
4
4
|
export * from './form-field-temporal-extents/form-field-temporal-extents.component'
|
|
5
5
|
export * from './form-field-simple/form-field-simple.component'
|
|
6
6
|
export * from './form-field-file/form-field-file.component'
|
|
@@ -1,32 +1,28 @@
|
|
|
1
|
-
<
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
>
|
|
9
|
-
<
|
|
10
|
-
<div
|
|
1
|
+
<div class="flex flex-col gap-6">
|
|
2
|
+
<ng-container
|
|
3
|
+
*ngFor="
|
|
4
|
+
let section of facade.currentSections$ | async;
|
|
5
|
+
trackBy: sectionTracker
|
|
6
|
+
"
|
|
7
|
+
>
|
|
8
|
+
<ng-container *ngIf="!section.hidden">
|
|
9
|
+
<div class="flex flex-col gap-8 border p-8 rounded-[8px] shadow">
|
|
10
|
+
<div
|
|
11
|
+
class="flex flex-col gap-2"
|
|
12
|
+
[ngClass]="section.labelKey ? 'mb-4' : 'hidden'"
|
|
13
|
+
>
|
|
11
14
|
<div
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
*ngIf="section.labelKey"
|
|
16
|
+
class="text-2xl font-title text-main"
|
|
17
|
+
translate
|
|
14
18
|
>
|
|
15
|
-
|
|
16
|
-
*ngIf="section.labelKey"
|
|
17
|
-
class="text-2xl font-title text-secondary"
|
|
18
|
-
translate
|
|
19
|
-
>
|
|
20
|
-
{{ section.labelKey }}
|
|
21
|
-
</div>
|
|
22
|
-
<div
|
|
23
|
-
*ngIf="section.descriptionKey"
|
|
24
|
-
class="text-secondary-lightest"
|
|
25
|
-
translate
|
|
26
|
-
>
|
|
27
|
-
{{ section.descriptionKey }}
|
|
28
|
-
</div>
|
|
19
|
+
{{ section.labelKey }}
|
|
29
20
|
</div>
|
|
21
|
+
<div *ngIf="section.descriptionKey" class="text-gray-800" translate>
|
|
22
|
+
{{ section.descriptionKey }}
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="grid auto-rows-auto grid-cols-2 gap-[32px]">
|
|
30
26
|
<ng-container
|
|
31
27
|
*ngFor="
|
|
32
28
|
let field of section.fieldsWithValues;
|
|
@@ -35,6 +31,11 @@
|
|
|
35
31
|
>
|
|
36
32
|
<ng-container *ngIf="!field.config.hidden">
|
|
37
33
|
<gn-ui-form-field
|
|
34
|
+
[ngClass]="
|
|
35
|
+
field.config.gridColumnSpan === 1
|
|
36
|
+
? 'col-span-1'
|
|
37
|
+
: 'col-span-2'
|
|
38
|
+
"
|
|
38
39
|
[uniqueIdentifier]="recordUniqueIdentifier$ | async"
|
|
39
40
|
[model]="field.config.model!"
|
|
40
41
|
[modelSpecifier]="field.config.modelSpecifier!"
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
</ng-container>
|
|
48
49
|
</ng-container>
|
|
49
50
|
</div>
|
|
50
|
-
</
|
|
51
|
+
</div>
|
|
51
52
|
</ng-container>
|
|
52
|
-
</
|
|
53
|
-
</
|
|
53
|
+
</ng-container>
|
|
54
|
+
</div>
|
|
@@ -45,6 +45,7 @@ export const RECORD_RESOURCE_UPDATED_FIELD: EditorField = {
|
|
|
45
45
|
formFieldConfig: {
|
|
46
46
|
labelKey: marker('editor.record.form.field.resourceUpdated'),
|
|
47
47
|
},
|
|
48
|
+
gridColumnSpan: 1,
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
export const RECORD_UPDATED_FIELD: EditorField = {
|
|
@@ -54,14 +55,15 @@ export const RECORD_UPDATED_FIELD: EditorField = {
|
|
|
54
55
|
locked: true,
|
|
55
56
|
},
|
|
56
57
|
onSaveProcess: '${dateNow()}',
|
|
58
|
+
gridColumnSpan: 1,
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
export const RECORD_UPDATE_FREQUENCY_FIELD: EditorField = {
|
|
60
62
|
model: 'updateFrequency',
|
|
61
|
-
formFieldConfig: {
|
|
62
|
-
labelKey: marker('editor.record.form.field.updateFrequency'),
|
|
63
|
-
},
|
|
63
|
+
formFieldConfig: {},
|
|
64
64
|
}
|
|
65
|
+
// keeping track of the label to not lose existing translation
|
|
66
|
+
marker('editor.record.form.field.updateFrequency')
|
|
65
67
|
|
|
66
68
|
export const RECORD_TEMPORAL_EXTENTS_FIELD: EditorField = {
|
|
67
69
|
model: 'temporalExtents',
|
|
@@ -32,6 +32,9 @@ export interface EditorField {
|
|
|
32
32
|
model?: CatalogRecordKeys
|
|
33
33
|
modelSpecifier?: FieldModelSpecifier
|
|
34
34
|
|
|
35
|
+
// grid column span; if unspecified, full width will be used
|
|
36
|
+
gridColumnSpan?: number
|
|
37
|
+
|
|
35
38
|
// a hidden field won't show but can still be used to modify the record
|
|
36
39
|
// FIXME: currently this is redundant with an absence of formFieldConfig but necessary for clarity
|
|
37
40
|
hidden?: boolean
|
|
@@ -1,21 +1,14 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
</div>
|
|
15
|
-
<div
|
|
16
|
-
class="flex-1 border border-gray-800 rounded overflow-y-scroll"
|
|
17
|
-
[hidden]="!preview"
|
|
18
|
-
>
|
|
19
|
-
<gn-ui-markdown-parser [textContent]="textContent"></gn-ui-markdown-parser>
|
|
20
|
-
</div>
|
|
1
|
+
<gn-ui-text-area
|
|
2
|
+
[hidden]="preview"
|
|
3
|
+
[placeholder]="placeholder"
|
|
4
|
+
[value]="textContent"
|
|
5
|
+
[extraClass]="textAreaExtraClass + ' !leading-normal'"
|
|
6
|
+
(valueChange)="textContentChangedHandler($event)"
|
|
7
|
+
></gn-ui-text-area>
|
|
8
|
+
|
|
9
|
+
<div
|
|
10
|
+
class="gn-ui-text-input border-gray-100 hover:border-gray-100"
|
|
11
|
+
[hidden]="!preview"
|
|
12
|
+
>
|
|
13
|
+
<gn-ui-markdown-parser [textContent]="textContent"></gn-ui-markdown-parser>
|
|
21
14
|
</div>
|
|
@@ -32,9 +32,9 @@ import { MatTooltipModule } from '@angular/material/tooltip'
|
|
|
32
32
|
})
|
|
33
33
|
export class MarkdownEditorComponent {
|
|
34
34
|
@Input() preview = false
|
|
35
|
-
@Input() helperText?: string
|
|
36
35
|
@Input() placeholder: string
|
|
37
36
|
@Input() textContent: string
|
|
37
|
+
@Input() textAreaExtraClass = ''
|
|
38
38
|
@Output() textContentChanged: EventEmitter<string> =
|
|
39
39
|
new EventEmitter<string>()
|
|
40
40
|
|