geonetwork-ui 2.4.0-dev.656babc7 → 2.4.0-dev.6c8dcba0
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/gn4/types/index.mjs +1 -2
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +1 -1
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/utils/keyword.mapper.mjs +1 -1
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +1 -1
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.mjs +3 -11
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +14 -34
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/model/thesaurus/thesaurus.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +3 -8
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/index.mjs +1 -2
- package/esm2022/libs/feature/editor/src/lib/feature-editor.module.mjs +3 -4
- package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +1 -8
- package/esm2022/libs/feature/search/src/lib/results-table/results-table.component.mjs +6 -6
- package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/index.mjs +1 -2
- package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +4 -10
- package/esm2022/libs/ui/widgets/src/index.mjs +2 -1
- package/esm2022/libs/ui/widgets/src/lib/badge/badge.component.mjs +18 -0
- package/fesm2022/geonetwork-ui.mjs +37 -163
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/types/index.d.ts +0 -1
- package/libs/api/metadata-converter/src/lib/gn4/types/index.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts +2 -3
- package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/utils/keyword.mapper.d.ts +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/utils/keyword.mapper.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts +2 -3
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.d.ts +3 -3
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +5 -8
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +7 -4
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/thesaurus/thesaurus.model.d.ts +5 -12
- package/libs/common/domain/src/lib/model/thesaurus/thesaurus.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/platform.service.interface.d.ts +3 -3
- package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts +0 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts +0 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/feature-editor.module.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
- package/libs/feature/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts +1 -1
- package/libs/ui/inputs/src/index.d.ts +0 -1
- package/libs/ui/inputs/src/index.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +1 -2
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
- package/libs/ui/widgets/src/index.d.ts +1 -0
- package/libs/ui/widgets/src/index.d.ts.map +1 -1
- package/libs/ui/widgets/src/lib/badge/badge.component.d.ts +7 -0
- package/libs/ui/widgets/src/lib/badge/badge.component.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/libs/api/metadata-converter/src/lib/gn4/types/index.ts +0 -1
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +2 -2
- package/src/libs/api/metadata-converter/src/lib/iso19139/utils/keyword.mapper.ts +1 -1
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +2 -2
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.mapper.ts +3 -24
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +21 -70
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +9 -4
- package/src/libs/common/domain/src/lib/model/thesaurus/thesaurus.model.ts +6 -13
- package/src/libs/common/domain/src/lib/platform.service.interface.ts +3 -3
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +0 -5
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +0 -5
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/index.ts +1 -1
- package/src/libs/feature/editor/src/lib/feature-editor.module.ts +1 -2
- package/src/libs/feature/editor/src/lib/fields.config.ts +0 -7
- package/src/libs/feature/search/src/lib/results-table/results-table.component.ts +2 -1
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +2 -2
- package/src/libs/ui/inputs/src/index.ts +0 -1
- package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +0 -3
- package/src/libs/ui/widgets/src/index.ts +1 -0
- package/src/libs/ui/widgets/src/lib/badge/badge.component.html +10 -0
- package/src/libs/ui/widgets/src/lib/badge/badge.component.ts +14 -0
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/types/keywords.model.mjs +0 -2
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.mjs +0 -87
- package/esm2022/libs/ui/inputs/src/lib/badge/badge.component.mjs +0 -28
- package/libs/api/metadata-converter/src/lib/gn4/types/keywords.model.d.ts +0 -31
- package/libs/api/metadata-converter/src/lib/gn4/types/keywords.model.d.ts.map +0 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.d.ts +0 -35
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/badge/badge.component.d.ts +0 -11
- package/libs/ui/inputs/src/lib/badge/badge.component.d.ts.map +0 -1
- package/src/libs/api/metadata-converter/src/lib/gn4/types/keywords.model.ts +0 -31
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.html +0 -20
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.ts +0 -119
- package/src/libs/ui/inputs/src/lib/badge/badge.component.html +0 -18
- package/src/libs/ui/inputs/src/lib/badge/badge.component.ts +0 -27
- /package/src/libs/ui/{inputs → widgets}/src/lib/badge/badge.component.css +0 -0
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class BadgeComponent {
|
|
4
|
-
clickable?: boolean;
|
|
5
|
-
removable?: boolean;
|
|
6
|
-
badgeRemoveClicked: EventEmitter<void>;
|
|
7
|
-
removeBadge(): void;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BadgeComponent, never>;
|
|
9
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BadgeComponent, "gn-ui-badge", never, { "clickable": { "alias": "clickable"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; }, { "badgeRemoveClicked": "badgeRemoveClicked"; }, never, ["*"], true, never>;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=badge.component.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"badge.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/inputs/src/lib/badge/badge.component.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,YAAY,EAGb,MAAM,eAAe,CAAA;;AAGtB,qBAQa,cAAc;IAChB,SAAS,CAAC,UAAQ;IAClB,SAAS,CAAC,UAAQ;IACjB,kBAAkB,qBAA2B;IAEvD,WAAW;yCALA,cAAc;2CAAd,cAAc;CAQ1B"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export interface KeywordApiResponse {
|
|
2
|
-
values?: {
|
|
3
|
-
eng: string
|
|
4
|
-
}
|
|
5
|
-
definitions?: {
|
|
6
|
-
eng: string
|
|
7
|
-
}
|
|
8
|
-
coordEast?: string
|
|
9
|
-
coordWest?: string
|
|
10
|
-
coordSouth?: string
|
|
11
|
-
coordNorth?: string
|
|
12
|
-
thesaurusKey?: string
|
|
13
|
-
definition?: string
|
|
14
|
-
value?: string
|
|
15
|
-
uri?: string
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface ThesaurusApiResponse {
|
|
19
|
-
key?: string
|
|
20
|
-
dname?: string
|
|
21
|
-
description?: string[] | string
|
|
22
|
-
filename?: string
|
|
23
|
-
title?: string
|
|
24
|
-
multilingualTitles?: string[]
|
|
25
|
-
dublinCoreMultilinguals?: string[]
|
|
26
|
-
date?: string
|
|
27
|
-
url?: string
|
|
28
|
-
defaultNamespace?: string
|
|
29
|
-
type?: string
|
|
30
|
-
activated?: string
|
|
31
|
-
}
|
|
File without changes
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<div class="flex flex-col gap-3">
|
|
2
|
-
<gn-ui-autocomplete
|
|
3
|
-
[placeholder]="'Search for keywords in all thesaurus'"
|
|
4
|
-
[displayWithFn]="displayWithFn"
|
|
5
|
-
[action]="autoCompleteAction"
|
|
6
|
-
(itemSelected)="handleItemSelection($event)"
|
|
7
|
-
(inputSubmitted)="handleInputSubmission($event)"
|
|
8
|
-
(inputCleared)="handleInputCleared()"
|
|
9
|
-
[value]="searchInputValue$ | async"
|
|
10
|
-
[clearOnSelection]="true"
|
|
11
|
-
></gn-ui-autocomplete>
|
|
12
|
-
<div class="flex gap-2 flex-wrap">
|
|
13
|
-
<gn-ui-badge
|
|
14
|
-
*ngFor="let keyword of control.value; let index = index"
|
|
15
|
-
[removable]="true"
|
|
16
|
-
(badgeRemoveClicked)="removeKeyword(index)"
|
|
17
|
-
>{{ keyword.label }}</gn-ui-badge
|
|
18
|
-
>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common'
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
EventEmitter,
|
|
6
|
-
Input,
|
|
7
|
-
OnInit,
|
|
8
|
-
Output,
|
|
9
|
-
} from '@angular/core'
|
|
10
|
-
import { FormControl } from '@angular/forms'
|
|
11
|
-
import {
|
|
12
|
-
KeywordType,
|
|
13
|
-
ThesaurusModel,
|
|
14
|
-
} from '../../../../../../../../../libs/common/domain/src/lib/model/thesaurus'
|
|
15
|
-
import { PlatformServiceInterface } from '../../../../../../../../../libs/common/domain/src/lib/platform.service.interface'
|
|
16
|
-
import {
|
|
17
|
-
DropdownSelectorComponent,
|
|
18
|
-
UiInputsModule,
|
|
19
|
-
} from '../../../../../../../../../libs/ui/inputs/src'
|
|
20
|
-
import { UiWidgetsModule } from '../../../../../../../../../libs/ui/widgets/src'
|
|
21
|
-
import { Observable, map } from 'rxjs'
|
|
22
|
-
|
|
23
|
-
@Component({
|
|
24
|
-
selector: 'gn-ui-form-field-keywords',
|
|
25
|
-
templateUrl: './form-field-keywords.component.html',
|
|
26
|
-
styleUrls: ['./form-field-keywords.component.css'],
|
|
27
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
28
|
-
standalone: true,
|
|
29
|
-
imports: [
|
|
30
|
-
DropdownSelectorComponent,
|
|
31
|
-
UiInputsModule,
|
|
32
|
-
CommonModule,
|
|
33
|
-
UiWidgetsModule,
|
|
34
|
-
],
|
|
35
|
-
})
|
|
36
|
-
export class FormFieldKeywordsComponent implements OnInit {
|
|
37
|
-
@Input() control: FormControl<any>
|
|
38
|
-
@Output() itemSelected = new EventEmitter<string>()
|
|
39
|
-
@Output() inputSubmitted = new EventEmitter<string>()
|
|
40
|
-
searchInputValue$: Observable<void | { title: string }>
|
|
41
|
-
allThesaurus$: Observable<any[]>
|
|
42
|
-
|
|
43
|
-
displayWithFn = (item) => {
|
|
44
|
-
if (item) {
|
|
45
|
-
return `${item?.title} (${item?.value?.name})`
|
|
46
|
-
}
|
|
47
|
-
return null
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
autoCompleteAction = (query: string) => {
|
|
51
|
-
const keywords$ = this.platformService.searchKeywords(query).pipe(
|
|
52
|
-
map((thesaurus) =>
|
|
53
|
-
thesaurus.map((thes) => {
|
|
54
|
-
return { title: thes.label, value: thes.thesaurus }
|
|
55
|
-
})
|
|
56
|
-
)
|
|
57
|
-
)
|
|
58
|
-
|
|
59
|
-
return keywords$
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
constructor(private platformService: PlatformServiceInterface) {}
|
|
63
|
-
|
|
64
|
-
ngOnInit(): void {
|
|
65
|
-
this.searchInputValue$ = this.autoCompleteAction('')[0]
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// type: { title: string; value: ThesaurusModel }
|
|
69
|
-
handleItemSelection(item) {
|
|
70
|
-
this.addKeyword({
|
|
71
|
-
label: item.title,
|
|
72
|
-
thesaurus: item.value,
|
|
73
|
-
type: item.value.type,
|
|
74
|
-
})
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
handleInputSubmission(any: string) {
|
|
78
|
-
// Should there be an input submission?
|
|
79
|
-
|
|
80
|
-
if (this.inputSubmitted.observers.length > 0) {
|
|
81
|
-
this.inputSubmitted.emit(any)
|
|
82
|
-
} else {
|
|
83
|
-
// this.searchService.updateFilters({ any })
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
async handleInputCleared() {
|
|
88
|
-
this.autoCompleteAction('')
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
addKeyword(item: {
|
|
92
|
-
label: string
|
|
93
|
-
thesaurus: ThesaurusModel
|
|
94
|
-
type: KeywordType
|
|
95
|
-
}) {
|
|
96
|
-
const addedKeywords = [...this.control.value, item]
|
|
97
|
-
|
|
98
|
-
// remove duplicates from keyword
|
|
99
|
-
const filteredKeywords = addedKeywords.filter((value, index, self) => {
|
|
100
|
-
return (
|
|
101
|
-
index ===
|
|
102
|
-
self.findIndex(
|
|
103
|
-
(t) =>
|
|
104
|
-
t?.label === value?.label &&
|
|
105
|
-
t?.thesaurus?.id === value?.thesaurus?.id &&
|
|
106
|
-
t?.type === value?.type
|
|
107
|
-
)
|
|
108
|
-
)
|
|
109
|
-
})
|
|
110
|
-
|
|
111
|
-
this.control.setValue(filteredKeywords)
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
removeKeyword(index: number) {
|
|
115
|
-
const removeKeywords = this.control.value.filter((_, i) => i !== index)
|
|
116
|
-
|
|
117
|
-
this.control.setValue(removeKeywords)
|
|
118
|
-
}
|
|
119
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<div
|
|
2
|
-
class="gn-ui-badge flex items-center gap-1.5"
|
|
3
|
-
[ngClass]="
|
|
4
|
-
clickable
|
|
5
|
-
? 'hover:bg-primary cursor-pointer transition-colors duration-100'
|
|
6
|
-
: ''
|
|
7
|
-
"
|
|
8
|
-
>
|
|
9
|
-
<span><ng-content></ng-content></span>
|
|
10
|
-
<gn-ui-button
|
|
11
|
-
class="material-symbols-outlined cursor-pointer text-xs"
|
|
12
|
-
*ngIf="removable"
|
|
13
|
-
(buttonClick)="removeBadge()"
|
|
14
|
-
extraClass="p-1 bg-transparent border-0 border-transparent "
|
|
15
|
-
>
|
|
16
|
-
close
|
|
17
|
-
</gn-ui-button>
|
|
18
|
-
</div>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common'
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
EventEmitter,
|
|
6
|
-
Input,
|
|
7
|
-
Output,
|
|
8
|
-
} from '@angular/core'
|
|
9
|
-
import { ButtonComponent } from '../button/button.component'
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: 'gn-ui-badge',
|
|
13
|
-
templateUrl: './badge.component.html',
|
|
14
|
-
styleUrls: ['./badge.component.css'],
|
|
15
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16
|
-
standalone: true,
|
|
17
|
-
imports: [CommonModule, ButtonComponent],
|
|
18
|
-
})
|
|
19
|
-
export class BadgeComponent {
|
|
20
|
-
@Input() clickable? = false
|
|
21
|
-
@Input() removable? = false
|
|
22
|
-
@Output() badgeRemoveClicked = new EventEmitter<void>()
|
|
23
|
-
|
|
24
|
-
removeBadge() {
|
|
25
|
-
this.badgeRemoveClicked.emit()
|
|
26
|
-
}
|
|
27
|
-
}
|
|
File without changes
|