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 +1,10 @@
|
|
|
1
1
|
import { Injectable } from '@angular/core'
|
|
2
|
-
import { Observable,
|
|
2
|
+
import { Observable, of, switchMap } from 'rxjs'
|
|
3
3
|
import { catchError, map, shareReplay, tap } from 'rxjs/operators'
|
|
4
4
|
import {
|
|
5
5
|
MeApiService,
|
|
6
6
|
RegistriesApiService,
|
|
7
7
|
SiteApiService,
|
|
8
|
-
ThesaurusInfoApiModel,
|
|
9
8
|
ToolsApiService,
|
|
10
9
|
UserfeedbackApiService,
|
|
11
10
|
UsersApiService,
|
|
@@ -13,18 +12,13 @@ import {
|
|
|
13
12
|
import { PlatformServiceInterface } from '../../../../../../../libs/common/domain/src/lib/platform.service.interface'
|
|
14
13
|
import { UserModel } from '../../../../../../../libs/common/domain/src/lib/model/user/user.model'
|
|
15
14
|
import {
|
|
16
|
-
Keyword,
|
|
17
15
|
Organization,
|
|
18
16
|
UserFeedback,
|
|
19
17
|
} from '../../../../../../../libs/common/domain/src/lib/model/record'
|
|
20
18
|
import { Gn4PlatformMapper } from './gn4-platform.mapper'
|
|
21
19
|
import { ltr } from 'semver'
|
|
20
|
+
import { ThesaurusModel } from '../../../../../../../libs/common/domain/src/lib/model/thesaurus/thesaurus.model'
|
|
22
21
|
import { LangService } from '../../../../../../../libs/util/i18n/src'
|
|
23
|
-
import { HttpClient } from '@angular/common/http'
|
|
24
|
-
import {
|
|
25
|
-
KeywordApiResponse,
|
|
26
|
-
ThesaurusApiResponse,
|
|
27
|
-
} from '../../../../../../../libs/api/metadata-converter/src'
|
|
28
22
|
|
|
29
23
|
const minApiVersion = '4.2.2'
|
|
30
24
|
|
|
@@ -66,7 +60,7 @@ export class Gn4PlatformService implements PlatformServiceInterface {
|
|
|
66
60
|
* A map of already loaded thesauri (groups of keywords); the key is a URI
|
|
67
61
|
* @private
|
|
68
62
|
*/
|
|
69
|
-
private
|
|
63
|
+
private thesauri: Record<string, Observable<ThesaurusModel>> = {}
|
|
70
64
|
|
|
71
65
|
constructor(
|
|
72
66
|
private siteApiService: SiteApiService,
|
|
@@ -76,8 +70,7 @@ export class Gn4PlatformService implements PlatformServiceInterface {
|
|
|
76
70
|
private toolsApiService: ToolsApiService,
|
|
77
71
|
private registriesApiService: RegistriesApiService,
|
|
78
72
|
private langService: LangService,
|
|
79
|
-
private userfeedbackApiService: UserfeedbackApiService
|
|
80
|
-
private httpClient: HttpClient
|
|
73
|
+
private userfeedbackApiService: UserfeedbackApiService
|
|
81
74
|
) {
|
|
82
75
|
this.me$ = this.meApi.getMe().pipe(
|
|
83
76
|
switchMap((apiUser) => this.mapper.userFromMeApi(apiUser)),
|
|
@@ -128,7 +121,7 @@ export class Gn4PlatformService implements PlatformServiceInterface {
|
|
|
128
121
|
// the thesaurus URI is inferred by removing a part of the keyword URI
|
|
129
122
|
// this is not exact science but it's OK, we'll still end up loading a bunch of keywords at once anyway
|
|
130
123
|
const thesaurusUri = key.replace(/\/([^/]+)$/, '/')
|
|
131
|
-
return this.
|
|
124
|
+
return this.getThesaurusByUri(thesaurusUri).pipe(
|
|
132
125
|
map((thesaurus) => {
|
|
133
126
|
for (const item of thesaurus) {
|
|
134
127
|
if (item.key === key) return item.label
|
|
@@ -140,49 +133,12 @@ export class Gn4PlatformService implements PlatformServiceInterface {
|
|
|
140
133
|
return this.keyTranslations$.pipe(map((translations) => translations[key]))
|
|
141
134
|
}
|
|
142
135
|
|
|
143
|
-
|
|
144
|
-
.
|
|
145
|
-
|
|
146
|
-
)
|
|
147
|
-
.pipe(
|
|
148
|
-
map((thesaurus) => {
|
|
149
|
-
// FIXME: find a better way to exclude place keywords
|
|
150
|
-
// thesaurus[0].filter((thes) => thes.dname !== 'place')
|
|
151
|
-
return thesaurus[0] as ThesaurusApiResponse[]
|
|
152
|
-
}),
|
|
153
|
-
shareReplay(1)
|
|
154
|
-
)
|
|
155
|
-
|
|
156
|
-
searchKeywords(query: string): Observable<Keyword[]> {
|
|
157
|
-
const keywords$: Observable<KeywordApiResponse[]> =
|
|
158
|
-
this.registriesApiService.searchKeywords(
|
|
159
|
-
query,
|
|
160
|
-
this.langService.iso3,
|
|
161
|
-
10,
|
|
162
|
-
0,
|
|
163
|
-
null,
|
|
164
|
-
null,
|
|
165
|
-
null,
|
|
166
|
-
`*${query}*`
|
|
167
|
-
) as Observable<KeywordApiResponse[]>
|
|
168
|
-
|
|
169
|
-
return combineLatest([keywords$, this.allThesaurus$]).pipe(
|
|
170
|
-
map(([keywords, thesaurus]) => {
|
|
171
|
-
return this.mapper.keywordsFromApi(
|
|
172
|
-
keywords,
|
|
173
|
-
thesaurus,
|
|
174
|
-
this.langService.iso3
|
|
175
|
-
)
|
|
176
|
-
})
|
|
177
|
-
)
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
getKeywordsByUri(uri: string): Observable<Keyword[]> {
|
|
181
|
-
if (this.keywordsByThesauri[uri]) {
|
|
182
|
-
return this.keywordsByThesauri[uri]
|
|
136
|
+
getThesaurusByUri(uri: string): Observable<ThesaurusModel> {
|
|
137
|
+
if (this.thesauri[uri]) {
|
|
138
|
+
return this.thesauri[uri]
|
|
183
139
|
}
|
|
184
|
-
|
|
185
|
-
|
|
140
|
+
this.thesauri[uri] = this.registriesApiService
|
|
141
|
+
.searchKeywords(
|
|
186
142
|
null,
|
|
187
143
|
this.langService.iso3,
|
|
188
144
|
1000,
|
|
@@ -191,23 +147,18 @@ export class Gn4PlatformService implements PlatformServiceInterface {
|
|
|
191
147
|
null,
|
|
192
148
|
null,
|
|
193
149
|
`${uri}*`
|
|
194
|
-
)
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
this.langService.iso3
|
|
205
|
-
)
|
|
206
|
-
}),
|
|
207
|
-
shareReplay(1)
|
|
208
|
-
)
|
|
150
|
+
)
|
|
151
|
+
.pipe(
|
|
152
|
+
map((thesaurus) =>
|
|
153
|
+
this.mapper.thesaurusFromApi(
|
|
154
|
+
thesaurus as any[],
|
|
155
|
+
this.langService.iso3
|
|
156
|
+
)
|
|
157
|
+
),
|
|
158
|
+
shareReplay(1)
|
|
159
|
+
)
|
|
209
160
|
|
|
210
|
-
return this.
|
|
161
|
+
return this.thesauri[uri]
|
|
211
162
|
}
|
|
212
163
|
|
|
213
164
|
getUserFeedbacks(uuid: string): Observable<UserFeedback[]> {
|
|
@@ -2,7 +2,6 @@ import { marker } from '@biesbjerg/ngx-translate-extract-marker'
|
|
|
2
2
|
import type { Individual } from './contact.model'
|
|
3
3
|
import type { Organization } from './organization.model'
|
|
4
4
|
import type { Geometry } from 'geojson'
|
|
5
|
-
import { KeywordType, ThesaurusModel } from '../thesaurus'
|
|
6
5
|
|
|
7
6
|
type Uuid = string
|
|
8
7
|
|
|
@@ -61,12 +60,18 @@ export type SpatialRepresentationType =
|
|
|
61
60
|
| 'table'
|
|
62
61
|
| 'point'
|
|
63
62
|
|
|
63
|
+
export type KeywordType = 'place' | 'temporal' | 'theme' | 'other'
|
|
64
|
+
|
|
65
|
+
export type KeywordThesaurus = {
|
|
66
|
+
id: string
|
|
67
|
+
name?: string
|
|
68
|
+
url?: URL
|
|
69
|
+
}
|
|
70
|
+
|
|
64
71
|
export interface Keyword {
|
|
65
|
-
key?: string
|
|
66
72
|
label: string
|
|
67
|
-
description?: string
|
|
68
73
|
type: KeywordType
|
|
69
|
-
thesaurus?:
|
|
74
|
+
thesaurus?: KeywordThesaurus
|
|
70
75
|
}
|
|
71
76
|
// languages should be expressed using two-letters ISO 639-1 codes
|
|
72
77
|
export type LanguageCode = string
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name?: string
|
|
6
|
-
url?: URL
|
|
7
|
-
thesaurusKey?: string
|
|
8
|
-
definition?: string
|
|
9
|
-
definitions?: object
|
|
10
|
-
uri?: string
|
|
11
|
-
value?: string
|
|
12
|
-
values?: object
|
|
13
|
-
type?: KeywordType
|
|
1
|
+
export interface ThesaurusItemModel {
|
|
2
|
+
key: string
|
|
3
|
+
label: string
|
|
4
|
+
description?: string
|
|
14
5
|
}
|
|
6
|
+
|
|
7
|
+
export type ThesaurusModel = ThesaurusItemModel[]
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Observable } from 'rxjs'
|
|
2
2
|
import type { UserModel } from './model/user/user.model'
|
|
3
3
|
import type { Organization } from './model/record/organization.model'
|
|
4
|
-
import {
|
|
4
|
+
import type { ThesaurusModel } from './model/thesaurus/'
|
|
5
|
+
import { UserFeedback } from './model/record'
|
|
5
6
|
|
|
6
7
|
export abstract class PlatformServiceInterface {
|
|
7
8
|
abstract getType(): string
|
|
@@ -15,8 +16,7 @@ export abstract class PlatformServiceInterface {
|
|
|
15
16
|
): Observable<UserModel[]>
|
|
16
17
|
abstract getOrganizations(): Observable<Organization[]>
|
|
17
18
|
abstract translateKey(key: string): Observable<string>
|
|
18
|
-
abstract
|
|
19
|
-
abstract getKeywordsByUri(uri: string): Observable<Keyword[]>
|
|
19
|
+
abstract getThesaurusByUri(uri: string): Observable<ThesaurusModel>
|
|
20
20
|
abstract getUserFeedbacks(recordUuid: string): Observable<UserFeedback[]>
|
|
21
21
|
abstract postUserFeedbacks(recordUuid: UserFeedback): Observable<void>
|
|
22
22
|
}
|
package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html
CHANGED
|
@@ -90,11 +90,6 @@
|
|
|
90
90
|
<ng-container *ngIf="isSpatialExtentField">
|
|
91
91
|
<gn-ui-form-field-spatial-extent></gn-ui-form-field-spatial-extent>
|
|
92
92
|
</ng-container>
|
|
93
|
-
<ng-container *ngIf="isKeywords">
|
|
94
|
-
<gn-ui-form-field-keywords
|
|
95
|
-
[control]="formControl"
|
|
96
|
-
></gn-ui-form-field-keywords>
|
|
97
|
-
</ng-container>
|
|
98
93
|
<div
|
|
99
94
|
*ngIf="isFieldInvalid && config.invalidHintKey"
|
|
100
95
|
class="mt-2 text-pink-500 text-sm field-invalid-hint"
|
package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts
CHANGED
|
@@ -27,7 +27,6 @@ import { FormFieldSimpleComponent } from './form-field-simple/form-field-simple.
|
|
|
27
27
|
import { FormFieldSpatialExtentComponent } from './form-field-spatial-extent/form-field-spatial-extent.component'
|
|
28
28
|
import { FormFieldConfig } from './form-field.model'
|
|
29
29
|
import { FormFieldUpdateFrequencyComponent } from './form-field-update-frequency/form-field-update-frequency.component'
|
|
30
|
-
import { FormFieldKeywordsComponent } from './form-field-keywords/form-field-keywords.component'
|
|
31
30
|
|
|
32
31
|
@Component({
|
|
33
32
|
selector: 'gn-ui-form-field',
|
|
@@ -52,7 +51,6 @@ import { FormFieldKeywordsComponent } from './form-field-keywords/form-field-key
|
|
|
52
51
|
FormFieldSpatialExtentComponent,
|
|
53
52
|
FormFieldFileComponent,
|
|
54
53
|
FormFieldArrayComponent,
|
|
55
|
-
FormFieldKeywordsComponent,
|
|
56
54
|
TranslateModule,
|
|
57
55
|
],
|
|
58
56
|
})
|
|
@@ -139,9 +137,6 @@ export class FormFieldComponent {
|
|
|
139
137
|
get isTemporalExtents() {
|
|
140
138
|
return this.model === 'temporalExtents'
|
|
141
139
|
}
|
|
142
|
-
get isKeywords() {
|
|
143
|
-
return this.model === 'keywords'
|
|
144
|
-
}
|
|
145
140
|
|
|
146
141
|
get withoutWrapper() {
|
|
147
142
|
return this.model === 'title' || this.model === 'abstract'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './form-field-keywords/form-field-keywords.component'
|
|
2
1
|
export * from './form-field-license/form-field-license.component'
|
|
3
2
|
export * from './form-field-resource-updated/form-field-resource-updated.component'
|
|
4
3
|
export * from './form-field-temporal-extents/form-field-temporal-extents.component'
|
|
4
|
+
|
|
5
5
|
export * from './form-field-simple/form-field-simple.component'
|
|
6
6
|
export * from './form-field-file/form-field-file.component'
|
|
7
7
|
export * from './form-field-rich/form-field-rich.component'
|
|
@@ -15,7 +15,6 @@ import * as fromEditor from './+state/editor.reducer'
|
|
|
15
15
|
import { WizardFieldComponent } from './components/wizard-field/wizard-field.component'
|
|
16
16
|
import { WizardSummarizeComponent } from './components/wizard-summarize/wizard-summarize.component'
|
|
17
17
|
import { WizardComponent } from './components/wizard/wizard.component'
|
|
18
|
-
import { Gn4PlatformService } from '../../../../../libs/api/repository/src'
|
|
19
18
|
|
|
20
19
|
@NgModule({
|
|
21
20
|
declarations: [
|
|
@@ -40,7 +39,7 @@ import { Gn4PlatformService } from '../../../../../libs/api/repository/src'
|
|
|
40
39
|
EffectsModule.forFeature([EditorEffects]),
|
|
41
40
|
],
|
|
42
41
|
exports: [WizardComponent, WizardSummarizeComponent],
|
|
43
|
-
providers: [EditorFacade
|
|
42
|
+
providers: [EditorFacade],
|
|
44
43
|
})
|
|
45
44
|
export class FeatureEditorModule {}
|
|
46
45
|
export * from './models/index'
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getFileFormat,
|
|
7
7
|
getFormatPriority,
|
|
8
8
|
} from '../../../../../../libs/util/shared/src'
|
|
9
|
-
import {
|
|
9
|
+
import { UiInputsModule } from '../../../../../../libs/ui/inputs/src'
|
|
10
10
|
import {
|
|
11
11
|
InteractiveTableColumnComponent,
|
|
12
12
|
InteractiveTableComponent,
|
|
@@ -20,6 +20,7 @@ import { CommonModule } from '@angular/common'
|
|
|
20
20
|
import { map, take } from 'rxjs/operators'
|
|
21
21
|
import { FieldSort } from '../../../../../../libs/common/domain/src/lib/model/search'
|
|
22
22
|
import { SearchService } from '../utils/service/search.service'
|
|
23
|
+
import { BadgeComponent } from '../../../../../../libs/ui/widgets/src'
|
|
23
24
|
import { RecordsRepositoryInterface } from '../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
|
|
24
25
|
|
|
25
26
|
@Component({
|
|
@@ -9,7 +9,7 @@ import { ContentGhostComponent } from './content-ghost/content-ghost.component'
|
|
|
9
9
|
import { DownloadItemComponent } from './download-item/download-item.component'
|
|
10
10
|
import { DownloadsListComponent } from './downloads-list/downloads-list.component'
|
|
11
11
|
import { ApiCardComponent } from './api-card/api-card.component'
|
|
12
|
-
import { UiWidgetsModule } from '../../../../../libs/ui/widgets/src'
|
|
12
|
+
import { BadgeComponent, UiWidgetsModule } from '../../../../../libs/ui/widgets/src'
|
|
13
13
|
import { UiLayoutModule } from '../../../../../libs/ui/layout/src'
|
|
14
14
|
import { TranslateModule } from '@ngx-translate/core'
|
|
15
15
|
import { RelatedRecordCardComponent } from './related-record-card/related-record-card.component'
|
|
@@ -20,7 +20,7 @@ import { MetadataQualityItemComponent } from './metadata-quality-item/metadata-q
|
|
|
20
20
|
import { ErrorComponent } from './error/error.component'
|
|
21
21
|
import { PaginationComponent } from './pagination/pagination.component'
|
|
22
22
|
import { ThumbnailComponent } from './thumbnail/thumbnail.component'
|
|
23
|
-
import {
|
|
23
|
+
import { UiInputsModule } from '../../../../../libs/ui/inputs/src'
|
|
24
24
|
import { FormsModule } from '@angular/forms'
|
|
25
25
|
import { AvatarComponent } from './avatar/avatar.component'
|
|
26
26
|
import { UserPreviewComponent } from './user-preview/user-preview.component'
|
|
@@ -6,7 +6,6 @@ import { TagInputModule } from 'ngx-chips'
|
|
|
6
6
|
import { NgxDropzoneModule } from 'ngx-dropzone'
|
|
7
7
|
import { AutocompleteComponent } from './autocomplete/autocomplete.component'
|
|
8
8
|
import { ButtonComponent } from './button/button.component'
|
|
9
|
-
import { BadgeComponent } from './badge/badge.component'
|
|
10
9
|
import { ChipsInputComponent } from './chips-input/chips-input.component'
|
|
11
10
|
import { DragAndDropFileInputComponent } from './drag-and-drop-file-input/drag-and-drop-file-input.component'
|
|
12
11
|
import { DropdownSelectorComponent } from './dropdown-selector/dropdown-selector.component'
|
|
@@ -74,7 +73,6 @@ import { ImageInputComponent } from './image-input/image-input.component'
|
|
|
74
73
|
DropdownSelectorComponent,
|
|
75
74
|
DateRangePickerComponent,
|
|
76
75
|
CheckToggleComponent,
|
|
77
|
-
BadgeComponent,
|
|
78
76
|
],
|
|
79
77
|
exports: [
|
|
80
78
|
DropdownSelectorComponent,
|
|
@@ -95,7 +93,6 @@ import { ImageInputComponent } from './image-input/image-input.component'
|
|
|
95
93
|
DateRangePickerComponent,
|
|
96
94
|
EditableLabelDirective,
|
|
97
95
|
ImageInputComponent,
|
|
98
|
-
BadgeComponent,
|
|
99
96
|
],
|
|
100
97
|
})
|
|
101
98
|
export class UiInputsModule {}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './lib/ui-widgets.module'
|
|
2
2
|
export * from './lib/progress-bar/progress-bar.component'
|
|
3
3
|
export * from './lib/loading-mask/loading-mask.component'
|
|
4
|
+
export * from './lib/badge/badge.component'
|
|
4
5
|
export * from './lib/color-scale/color-scale.component'
|
|
5
6
|
export * from './lib/popup-alert/popup-alert.component'
|
|
6
7
|
export * from './lib/spinning-loader/spinning-loader.component'
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
|
|
2
|
+
import { CommonModule } from '@angular/common'
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'gn-ui-badge',
|
|
6
|
+
templateUrl: './badge.component.html',
|
|
7
|
+
styleUrls: ['./badge.component.css'],
|
|
8
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9
|
+
standalone: true,
|
|
10
|
+
imports: [CommonModule],
|
|
11
|
+
})
|
|
12
|
+
export class BadgeComponent {
|
|
13
|
+
@Input() clickable = false
|
|
14
|
+
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia2V5d29yZHMubW9kZWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2FwaS9tZXRhZGF0YS1jb252ZXJ0ZXIvc3JjL2xpYi9nbjQvdHlwZXMva2V5d29yZHMubW9kZWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBpbnRlcmZhY2UgS2V5d29yZEFwaVJlc3BvbnNlIHtcbiAgdmFsdWVzPzoge1xuICAgIGVuZzogc3RyaW5nXG4gIH1cbiAgZGVmaW5pdGlvbnM/OiB7XG4gICAgZW5nOiBzdHJpbmdcbiAgfVxuICBjb29yZEVhc3Q/OiBzdHJpbmdcbiAgY29vcmRXZXN0Pzogc3RyaW5nXG4gIGNvb3JkU291dGg/OiBzdHJpbmdcbiAgY29vcmROb3J0aD86IHN0cmluZ1xuICB0aGVzYXVydXNLZXk/OiBzdHJpbmdcbiAgZGVmaW5pdGlvbj86IHN0cmluZ1xuICB2YWx1ZT86IHN0cmluZ1xuICB1cmk/OiBzdHJpbmdcbn1cblxuZXhwb3J0IGludGVyZmFjZSBUaGVzYXVydXNBcGlSZXNwb25zZSB7XG4gIGtleT86IHN0cmluZ1xuICBkbmFtZT86IHN0cmluZ1xuICBkZXNjcmlwdGlvbj86IHN0cmluZ1tdIHwgc3RyaW5nXG4gIGZpbGVuYW1lPzogc3RyaW5nXG4gIHRpdGxlPzogc3RyaW5nXG4gIG11bHRpbGluZ3VhbFRpdGxlcz86IHN0cmluZ1tdXG4gIGR1YmxpbkNvcmVNdWx0aWxpbmd1YWxzPzogc3RyaW5nW11cbiAgZGF0ZT86IHN0cmluZ1xuICB1cmw/OiBzdHJpbmdcbiAgZGVmYXVsdE5hbWVzcGFjZT86IHN0cmluZ1xuICB0eXBlPzogc3RyaW5nXG4gIGFjdGl2YXRlZD86IHN0cmluZ1xufVxuIl19
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, } from '@angular/core';
|
|
3
|
-
import { FormControl } from '@angular/forms';
|
|
4
|
-
import { PlatformServiceInterface } from '../../../../../../../../../libs/common/domain/src/lib/platform.service.interface';
|
|
5
|
-
import { DropdownSelectorComponent, UiInputsModule, } from '../../../../../../../../../libs/ui/inputs/src';
|
|
6
|
-
import { UiWidgetsModule } from '../../../../../../../../../libs/ui/widgets/src';
|
|
7
|
-
import { map } from 'rxjs';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "../../../../../../../../../libs/common/domain/src/lib/platform.service.interface";
|
|
10
|
-
import * as i2 from "../../../../../../../../ui/inputs/src/lib/autocomplete/autocomplete.component";
|
|
11
|
-
import * as i3 from "../../../../../../../../ui/inputs/src/lib/badge/badge.component";
|
|
12
|
-
import * as i4 from "@angular/common";
|
|
13
|
-
export class FormFieldKeywordsComponent {
|
|
14
|
-
constructor(platformService) {
|
|
15
|
-
this.platformService = platformService;
|
|
16
|
-
this.itemSelected = new EventEmitter();
|
|
17
|
-
this.inputSubmitted = new EventEmitter();
|
|
18
|
-
this.displayWithFn = (item) => {
|
|
19
|
-
if (item) {
|
|
20
|
-
return `${item?.title} (${item?.value?.name})`;
|
|
21
|
-
}
|
|
22
|
-
return null;
|
|
23
|
-
};
|
|
24
|
-
this.autoCompleteAction = (query) => {
|
|
25
|
-
const keywords$ = this.platformService.searchKeywords(query).pipe(map((thesaurus) => thesaurus.map((thes) => {
|
|
26
|
-
return { title: thes.label, value: thes.thesaurus };
|
|
27
|
-
})));
|
|
28
|
-
return keywords$;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
ngOnInit() {
|
|
32
|
-
this.searchInputValue$ = this.autoCompleteAction('')[0];
|
|
33
|
-
}
|
|
34
|
-
// type: { title: string; value: ThesaurusModel }
|
|
35
|
-
handleItemSelection(item) {
|
|
36
|
-
this.addKeyword({
|
|
37
|
-
label: item.title,
|
|
38
|
-
thesaurus: item.value,
|
|
39
|
-
type: item.value.type,
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
handleInputSubmission(any) {
|
|
43
|
-
// Should there be an input submission?
|
|
44
|
-
if (this.inputSubmitted.observers.length > 0) {
|
|
45
|
-
this.inputSubmitted.emit(any);
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
// this.searchService.updateFilters({ any })
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
async handleInputCleared() {
|
|
52
|
-
this.autoCompleteAction('');
|
|
53
|
-
}
|
|
54
|
-
addKeyword(item) {
|
|
55
|
-
const addedKeywords = [...this.control.value, item];
|
|
56
|
-
// remove duplicates from keyword
|
|
57
|
-
const filteredKeywords = addedKeywords.filter((value, index, self) => {
|
|
58
|
-
return (index ===
|
|
59
|
-
self.findIndex((t) => t?.label === value?.label &&
|
|
60
|
-
t?.thesaurus?.id === value?.thesaurus?.id &&
|
|
61
|
-
t?.type === value?.type));
|
|
62
|
-
});
|
|
63
|
-
this.control.setValue(filteredKeywords);
|
|
64
|
-
}
|
|
65
|
-
removeKeyword(index) {
|
|
66
|
-
const removeKeywords = this.control.value.filter((_, i) => i !== index);
|
|
67
|
-
this.control.setValue(removeKeywords);
|
|
68
|
-
}
|
|
69
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormFieldKeywordsComponent, deps: [{ token: i1.PlatformServiceInterface }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
70
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormFieldKeywordsComponent, isStandalone: true, selector: "gn-ui-form-field-keywords", inputs: { control: "control" }, outputs: { itemSelected: "itemSelected", inputSubmitted: "inputSubmitted" }, ngImport: i0, template: "<div class=\"flex flex-col gap-3\">\n <gn-ui-autocomplete\n [placeholder]=\"'Search for keywords in all thesaurus'\"\n [displayWithFn]=\"displayWithFn\"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"handleItemSelection($event)\"\n (inputSubmitted)=\"handleInputSubmission($event)\"\n (inputCleared)=\"handleInputCleared()\"\n [value]=\"searchInputValue$ | async\"\n [clearOnSelection]=\"true\"\n ></gn-ui-autocomplete>\n <div class=\"flex gap-2 flex-wrap\">\n <gn-ui-badge\n *ngFor=\"let keyword of control.value; let index = index\"\n [removable]=\"true\"\n (badgeRemoveClicked)=\"removeKeyword(index)\"\n >{{ keyword.label }}</gn-ui-badge\n >\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: UiInputsModule }, { kind: "component", type: i2.AutocompleteComponent, selector: "gn-ui-autocomplete", inputs: ["placeholder", "action", "value", "clearOnSelection", "autoFocus", "displayWithFn"], outputs: ["itemSelected", "inputSubmitted", "inputCleared"] }, { kind: "component", type: i3.BadgeComponent, selector: "gn-ui-badge", inputs: ["clickable", "removable"], outputs: ["badgeRemoveClicked"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "ngmodule", type: UiWidgetsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
71
|
-
}
|
|
72
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormFieldKeywordsComponent, decorators: [{
|
|
73
|
-
type: Component,
|
|
74
|
-
args: [{ selector: 'gn-ui-form-field-keywords', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
75
|
-
DropdownSelectorComponent,
|
|
76
|
-
UiInputsModule,
|
|
77
|
-
CommonModule,
|
|
78
|
-
UiWidgetsModule,
|
|
79
|
-
], template: "<div class=\"flex flex-col gap-3\">\n <gn-ui-autocomplete\n [placeholder]=\"'Search for keywords in all thesaurus'\"\n [displayWithFn]=\"displayWithFn\"\n [action]=\"autoCompleteAction\"\n (itemSelected)=\"handleItemSelection($event)\"\n (inputSubmitted)=\"handleInputSubmission($event)\"\n (inputCleared)=\"handleInputCleared()\"\n [value]=\"searchInputValue$ | async\"\n [clearOnSelection]=\"true\"\n ></gn-ui-autocomplete>\n <div class=\"flex gap-2 flex-wrap\">\n <gn-ui-badge\n *ngFor=\"let keyword of control.value; let index = index\"\n [removable]=\"true\"\n (badgeRemoveClicked)=\"removeKeyword(index)\"\n >{{ keyword.label }}</gn-ui-badge\n >\n </div>\n</div>\n" }]
|
|
80
|
-
}], ctorParameters: function () { return [{ type: i1.PlatformServiceInterface }]; }, propDecorators: { control: [{
|
|
81
|
-
type: Input
|
|
82
|
-
}], itemSelected: [{
|
|
83
|
-
type: Output
|
|
84
|
-
}], inputSubmitted: [{
|
|
85
|
-
type: Output
|
|
86
|
-
}] } });
|
|
87
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1maWVsZC1rZXl3b3Jkcy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2ZlYXR1cmUvZWRpdG9yL3NyYy9saWIvY29tcG9uZW50cy9yZWNvcmQtZm9ybS9mb3JtLWZpZWxkL2Zvcm0tZmllbGQta2V5d29yZHMvZm9ybS1maWVsZC1rZXl3b3Jkcy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2ZlYXR1cmUvZWRpdG9yL3NyYy9saWIvY29tcG9uZW50cy9yZWNvcmQtZm9ybS9mb3JtLWZpZWxkL2Zvcm0tZmllbGQta2V5d29yZHMvZm9ybS1maWVsZC1rZXl3b3Jkcy5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUE7QUFDOUMsT0FBTyxFQUNMLHVCQUF1QixFQUN2QixTQUFTLEVBQ1QsWUFBWSxFQUNaLEtBQUssRUFFTCxNQUFNLEdBQ1AsTUFBTSxlQUFlLENBQUE7QUFDdEIsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLGdCQUFnQixDQUFBO0FBSzVDLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLGtGQUFrRixDQUFBO0FBQzNILE9BQU8sRUFDTCx5QkFBeUIsRUFDekIsY0FBYyxHQUNmLE1BQU0sK0NBQStDLENBQUE7QUFDdEQsT0F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vbXBsZXRlXG4gICAgW3BsYWNlaG9sZGVyXT1cIidTZWFyY2ggZm9yIGtleXdvcmRzIGluIGFsbCB0aGVzYXVydXMnXCJcbiAgICBbZGlzcGxheVdpdGhGbl09XCJkaXNwbGF5V2l0aEZuXCJcbiAgICBbYWN0aW9uXT1cImF1dG9Db21wbGV0ZUFjdGlvblwiXG4gICAgKGl0ZW1TZWxlY3RlZCk9XCJoYW5kbGVJdGVtU2VsZWN0aW9uKCRldmVudClcIlxuICAgIChpbnB1dFN1Ym1pdHRlZCk9XCJoYW5kbGVJbnB1dFN1Ym1pc3Npb24oJGV2ZW50KVwiXG4gICAgKGlucHV0Q2xlYXJlZCk9XCJoYW5kbGVJbnB1dENsZWFyZWQoKVwiXG4gICAgW3ZhbHVlXT1cInNlYXJjaElucHV0VmFsdWUkIHwgYXN5bmNcIlxuICAgIFtjbGVhck9uU2VsZWN0aW9uXT1cInRydWVcIlxuICA+PC9nbi11aS1hdXRvY29tcGxldGU+XG4gIDxkaXYgY2xhc3M9XCJmbGV4IGdhcC0yIGZsZXgtd3JhcFwiPlxuICAgIDxnbi11aS1iYWRnZVxuICAgICAgKm5nRm9yPVwibGV0IGtleXdvcmQgb2YgY29udHJvbC52YWx1ZTsgbGV0IGluZGV4ID0gaW5kZXhcIlxuICAgICAgW3JlbW92YWJsZV09XCJ0cnVlXCJcbiAgICAgIChiYWRnZVJlbW92ZUNsaWNrZWQpPVwicmVtb3ZlS2V5d29yZChpbmRleClcIlxuICAgICAgPnt7IGtleXdvcmQubGFiZWwgfX08L2duLXVpLWJhZGdlXG4gICAgPlxuICA8L2Rpdj5cbjwvZGl2PlxuIl19
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, } from '@angular/core';
|
|
3
|
-
import { ButtonComponent } from '../button/button.component';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "@angular/common";
|
|
6
|
-
export class BadgeComponent {
|
|
7
|
-
constructor() {
|
|
8
|
-
this.clickable = false;
|
|
9
|
-
this.removable = false;
|
|
10
|
-
this.badgeRemoveClicked = new EventEmitter();
|
|
11
|
-
}
|
|
12
|
-
removeBadge() {
|
|
13
|
-
this.badgeRemoveClicked.emit();
|
|
14
|
-
}
|
|
15
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
16
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: BadgeComponent, isStandalone: true, selector: "gn-ui-badge", inputs: { clickable: "clickable", removable: "removable" }, outputs: { badgeRemoveClicked: "badgeRemoveClicked" }, ngImport: i0, template: "<div\n class=\"gn-ui-badge flex items-center gap-1.5\"\n [ngClass]=\"\n clickable\n ? 'hover:bg-primary cursor-pointer transition-colors duration-100'\n : ''\n \"\n>\n <span><ng-content></ng-content></span>\n <gn-ui-button\n class=\"material-symbols-outlined cursor-pointer text-xs\"\n *ngIf=\"removable\"\n (buttonClick)=\"removeBadge()\"\n extraClass=\"p-1 bg-transparent border-0 border-transparent \"\n >\n close\n </gn-ui-button>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "gn-ui-button", inputs: ["type", "disabled", "extraClass"], outputs: ["buttonClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
17
|
-
}
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BadgeComponent, decorators: [{
|
|
19
|
-
type: Component,
|
|
20
|
-
args: [{ selector: 'gn-ui-badge', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, ButtonComponent], template: "<div\n class=\"gn-ui-badge flex items-center gap-1.5\"\n [ngClass]=\"\n clickable\n ? 'hover:bg-primary cursor-pointer transition-colors duration-100'\n : ''\n \"\n>\n <span><ng-content></ng-content></span>\n <gn-ui-button\n class=\"material-symbols-outlined cursor-pointer text-xs\"\n *ngIf=\"removable\"\n (buttonClick)=\"removeBadge()\"\n extraClass=\"p-1 bg-transparent border-0 border-transparent \"\n >\n close\n </gn-ui-button>\n</div>\n" }]
|
|
21
|
-
}], propDecorators: { clickable: [{
|
|
22
|
-
type: Input
|
|
23
|
-
}], removable: [{
|
|
24
|
-
type: Input
|
|
25
|
-
}], badgeRemoveClicked: [{
|
|
26
|
-
type: Output
|
|
27
|
-
}] } });
|
|
28
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFkZ2UuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy91aS9pbnB1dHMvc3JjL2xpYi9iYWRnZS9iYWRnZS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3VpL2lucHV0cy9zcmMvbGliL2JhZGdlL2JhZGdlLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQTtBQUM5QyxPQUFPLEVBQ0wsdUJBQXVCLEVBQ3ZCLFNBQVMsRUFDVCxZQUFZLEVBQ1osS0FBSyxFQUNMLE1BQU0sR0FDUCxNQUFNLGVBQWUsQ0FBQTtBQUN0QixPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sNEJBQTRCLENBQUE7OztBQVU1RCxNQUFNLE9BQU8sY0FBY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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
|
-
export interface ThesaurusApiResponse {
|
|
18
|
-
key?: string;
|
|
19
|
-
dname?: string;
|
|
20
|
-
description?: string[] | string;
|
|
21
|
-
filename?: string;
|
|
22
|
-
title?: string;
|
|
23
|
-
multilingualTitles?: string[];
|
|
24
|
-
dublinCoreMultilinguals?: string[];
|
|
25
|
-
date?: string;
|
|
26
|
-
url?: string;
|
|
27
|
-
defaultNamespace?: string;
|
|
28
|
-
type?: string;
|
|
29
|
-
activated?: string;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=keywords.model.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keywords.model.d.ts","sourceRoot":"","sources":["../../../../../../../src/libs/api/metadata-converter/src/lib/gn4/types/keywords.model.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE;QACP,GAAG,EAAE,MAAM,CAAA;KACZ,CAAA;IACD,WAAW,CAAC,EAAE;QACZ,GAAG,EAAE,MAAM,CAAA;KACZ,CAAA;IACD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,oBAAoB;IACnC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC7B,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAA;IAClC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
-
import { FormControl } from '@angular/forms';
|
|
3
|
-
import { KeywordType, ThesaurusModel } from '../../../../../../../../../libs/common/domain/src/lib/model/thesaurus';
|
|
4
|
-
import { PlatformServiceInterface } from '../../../../../../../../../libs/common/domain/src/lib/platform.service.interface';
|
|
5
|
-
import { Observable } from 'rxjs';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class FormFieldKeywordsComponent implements OnInit {
|
|
8
|
-
private platformService;
|
|
9
|
-
control: FormControl<any>;
|
|
10
|
-
itemSelected: EventEmitter<string>;
|
|
11
|
-
inputSubmitted: EventEmitter<string>;
|
|
12
|
-
searchInputValue$: Observable<void | {
|
|
13
|
-
title: string;
|
|
14
|
-
}>;
|
|
15
|
-
allThesaurus$: Observable<any[]>;
|
|
16
|
-
displayWithFn: (item: any) => string;
|
|
17
|
-
autoCompleteAction: (query: string) => Observable<{
|
|
18
|
-
title: string;
|
|
19
|
-
value: ThesaurusModel;
|
|
20
|
-
}[]>;
|
|
21
|
-
constructor(platformService: PlatformServiceInterface);
|
|
22
|
-
ngOnInit(): void;
|
|
23
|
-
handleItemSelection(item: any): void;
|
|
24
|
-
handleInputSubmission(any: string): void;
|
|
25
|
-
handleInputCleared(): Promise<void>;
|
|
26
|
-
addKeyword(item: {
|
|
27
|
-
label: string;
|
|
28
|
-
thesaurus: ThesaurusModel;
|
|
29
|
-
type: KeywordType;
|
|
30
|
-
}): void;
|
|
31
|
-
removeKeyword(index: number): void;
|
|
32
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldKeywordsComponent, never>;
|
|
33
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldKeywordsComponent, "gn-ui-form-field-keywords", never, { "control": { "alias": "control"; "required": false; }; }, { "itemSelected": "itemSelected"; "inputSubmitted": "inputSubmitted"; }, never, never, true, never>;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=form-field-keywords.component.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-field-keywords.component.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-keywords/form-field-keywords.component.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,YAAY,EAEZ,MAAM,EAEP,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EACL,WAAW,EACX,cAAc,EACf,MAAM,uEAAuE,CAAA;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,kFAAkF,CAAA;AAM3H,OAAO,EAAE,UAAU,EAAO,MAAM,MAAM,CAAA;;AAEtC,qBAaa,0BAA2B,YAAW,MAAM;IA0B3C,OAAO,CAAC,eAAe;IAzB1B,OAAO,EAAE,WAAW,CAAC,GAAG,CAAC,CAAA;IACxB,YAAY,uBAA6B;IACzC,cAAc,uBAA6B;IACrD,iBAAiB,EAAE,UAAU,CAAC,IAAI,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACvD,aAAa,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,CAAA;IAEhC,aAAa,wBAKZ;IAED,kBAAkB,UAAW,MAAM;;;SAUlC;gBAEmB,eAAe,EAAE,wBAAwB;IAE7D,QAAQ,IAAI,IAAI;IAKhB,mBAAmB,CAAC,IAAI,KAAA;IAQxB,qBAAqB,CAAC,GAAG,EAAE,MAAM;IAU3B,kBAAkB;IAIxB,UAAU,CAAC,IAAI,EAAE;QACf,KAAK,EAAE,MAAM,CAAA;QACb,SAAS,EAAE,cAAc,CAAA;QACzB,IAAI,EAAE,WAAW,CAAA;KAClB;IAmBD,aAAa,CAAC,KAAK,EAAE,MAAM;yCA9EhB,0BAA0B;2CAA1B,0BAA0B;CAmFtC"}
|