geonetwork-ui 2.11.0-dev.1cf4ab0c6 → 2.11.0-dev.22978eb28
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/fesm2022/geonetwork-ui.mjs +1408 -1003
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/index.d.ts +248 -106
- package/index.d.ts.map +1 -1
- package/package.json +6 -5
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/dcat-ap.converter.ts +2 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/mel.records.dataset+featurecatalog.ts +395 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +35 -8
- package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +19 -0
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.ts +17 -6
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.ts +110 -0
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.ts +131 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +9 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +2 -1
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +95 -32
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +79 -35
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +11 -0
- package/src/libs/common/domain/src/lib/model/record/flags.model.ts +1 -0
- package/src/libs/common/domain/src/lib/model/record/index.ts +1 -0
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +14 -18
- package/src/libs/common/domain/src/lib/model/search/aggregation.model.ts +2 -0
- package/src/libs/common/domain/src/lib/model/search/filter.model.ts +12 -2
- package/src/libs/common/domain/src/lib/platform.service.interface.ts +1 -0
- package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +20 -1
- package/src/libs/common/fixtures/src/lib/records.fixtures.ts +42 -62
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +32 -19
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-constraints/form-field-constraints.component.ts +3 -5
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts/form-field-contacts.component.ts +2 -2
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-record-flags/form-field-record-flag-component.html +18 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-record-flags/form-field-record-flag-component.ts +86 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +100 -88
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +11 -4
- package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.ts +18 -4
- package/src/libs/feature/editor/src/lib/expressions.ts +67 -0
- package/src/libs/feature/editor/src/lib/fields.config.ts +13 -0
- package/src/libs/feature/editor/src/lib/models/editor-config.model.ts +10 -4
- package/src/libs/feature/map/src/index.ts +0 -2
- package/src/libs/feature/map/src/lib/feature-map.module.ts +1 -8
- package/src/libs/feature/notify-reuse/src/lib/notify-reuse-form/notify-reuse-form.component.ts +8 -3
- package/src/libs/feature/record/src/lib/state/mdview.effects.ts +3 -1
- package/src/libs/feature/record/src/lib/state/mdview.facade.ts +1 -1
- package/src/libs/feature/search/src/index.ts +2 -0
- package/src/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.html +7 -1
- package/src/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.ts +26 -4
- package/src/libs/feature/search/src/lib/geocoding/geocoding.service.ts +105 -0
- package/src/libs/feature/search/src/lib/location-search/location-search.component.html +18 -0
- package/src/libs/feature/search/src/lib/location-search/location-search.component.ts +114 -0
- package/src/libs/feature/search/src/lib/search-filters-summary-item/search-filters-summary-item.component.ts +1 -0
- package/src/libs/feature/search/src/lib/state/reducer.ts +1 -4
- package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +56 -4
- package/src/libs/feature/search/src/lib/utils/service/fields.ts +60 -17
- package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.html +3 -3
- package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.ts +2 -2
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.css +0 -4
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.html +12 -3
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +11 -3
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.html +7 -4
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.ts +12 -9
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.model.ts +2 -2
- package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts +2 -1
- package/src/libs/ui/inputs/src/lib/spatial-extent-dropdown/spatial-extent-dropdown.component.html +8 -2
- package/src/libs/ui/inputs/src/lib/spatial-extent-dropdown/spatial-extent-dropdown.component.ts +34 -5
- package/src/libs/ui/layout/src/lib/block-list/block-list.component.css +1 -0
- package/src/libs/util/app-config/src/index.ts +1 -0
- package/src/libs/util/app-config/src/lib/app-config.ts +338 -250
- package/src/libs/util/app-config/src/lib/fixtures.ts +37 -1
- package/src/libs/util/app-config/src/lib/model.ts +41 -1
- package/src/libs/util/app-config/src/lib/parse-utils.ts +8 -4
- package/src/libs/util/shared/src/lib/utils/geojson.ts +37 -10
- package/translations/de.json +12 -2
- package/translations/en.json +14 -4
- package/translations/es.json +12 -2
- package/translations/fr.json +20 -10
- package/translations/it.json +12 -2
- package/translations/nl.json +12 -2
- package/translations/pt.json +12 -2
- package/translations/sk.json +12 -2
- package/src/libs/feature/map/src/lib/geocoding/geocoding.component.html +0 -41
- package/src/libs/feature/map/src/lib/geocoding/geocoding.component.ts +0 -112
- package/src/libs/feature/map/src/lib/geocoding.service.ts +0 -57
- package/src/libs/feature/map/src/lib/style/index.ts +0 -2
- package/src/libs/feature/map/src/lib/style/map-style.fixtures.ts +0 -47
- package/src/libs/feature/map/src/lib/style/map-style.service.ts +0 -108
- /package/src/libs/feature/{map/src/lib/geocoding/geocoding.component.css → editor/src/lib/components/record-form/form-field/form-field-record-flags/form-field-record-flag-component.css} +0 -0
|
@@ -16,10 +16,6 @@ gn-ui-button {
|
|
|
16
16
|
--gn-ui-button-padding: 0;
|
|
17
17
|
font-size: 1em;
|
|
18
18
|
}
|
|
19
|
-
ng-icon.search {
|
|
20
|
-
margin-top: 0.6rem;
|
|
21
|
-
margin-left: 0.6rem;
|
|
22
|
-
}
|
|
23
19
|
gn-ui-button:last-of-type {
|
|
24
20
|
--gn-ui-button-rounded: 0 var(--gn-ui-text-input-rounded, 0.25em)
|
|
25
21
|
var(--gn-ui-text-input-rounded, 0.25em) 0;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<span class="w-full inline-block relative">
|
|
2
2
|
@if (!allowSubmit) {
|
|
3
3
|
<div
|
|
4
|
-
class="absolute inset-y-[--icon-padding] left-[--icon-padding] w-[--icon-width] pointer-events-none"
|
|
4
|
+
class="absolute inset-y-[--icon-padding] left-[--icon-padding] w-[--icon-width] pointer-events-none flex items-center justify-center"
|
|
5
5
|
>
|
|
6
|
-
<ng-icon name="iconoirSearch" class="text-primary
|
|
6
|
+
<ng-icon name="iconoirSearch" class="text-primary"></ng-icon>
|
|
7
7
|
</div>
|
|
8
8
|
}
|
|
9
9
|
<div class="flex flex-row">
|
|
@@ -83,7 +83,16 @@
|
|
|
83
83
|
>
|
|
84
84
|
@for (suggestion of suggestions$ | async; track suggestion) {
|
|
85
85
|
<mat-option [value]="suggestion" class="p-2 suggestion text-start">
|
|
86
|
-
|
|
86
|
+
@if (displayWithTemplate) {
|
|
87
|
+
<ng-container
|
|
88
|
+
*ngTemplateOutlet="
|
|
89
|
+
displayWithTemplate;
|
|
90
|
+
context: { $implicit: suggestion }
|
|
91
|
+
"
|
|
92
|
+
></ng-container>
|
|
93
|
+
} @else {
|
|
94
|
+
{{ displayWithFnInternal(suggestion) }}
|
|
95
|
+
}
|
|
87
96
|
</mat-option>
|
|
88
97
|
}
|
|
89
98
|
</mat-autocomplete>
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
OnInit,
|
|
12
12
|
Output,
|
|
13
13
|
SimpleChanges,
|
|
14
|
+
TemplateRef,
|
|
14
15
|
ViewChild,
|
|
15
16
|
inject,
|
|
16
17
|
} from '@angular/core'
|
|
@@ -97,6 +98,13 @@ export class AutocompleteComponent
|
|
|
97
98
|
@ViewChild(MatAutocompleteTrigger) triggerRef: MatAutocompleteTrigger
|
|
98
99
|
@ViewChild(MatAutocomplete) autocomplete: MatAutocomplete
|
|
99
100
|
@ViewChild('searchInput') inputRef: ElementRef<HTMLInputElement>
|
|
101
|
+
/**
|
|
102
|
+
* Custom template to render each suggestion. Takes precedence over
|
|
103
|
+
* `displayWithFn` when set.
|
|
104
|
+
*/
|
|
105
|
+
@Input() displayWithTemplate?: TemplateRef<{
|
|
106
|
+
$implicit: AutocompleteItem
|
|
107
|
+
}>
|
|
100
108
|
|
|
101
109
|
searching: boolean
|
|
102
110
|
control = new UntypedFormControl()
|
|
@@ -126,13 +134,13 @@ export class AutocompleteComponent
|
|
|
126
134
|
getExtraClass(): string {
|
|
127
135
|
if (this.allowSubmit) {
|
|
128
136
|
if (this.enterButton) {
|
|
129
|
-
return 'border rounded-lg absolute w-8 h-8 right-[calc(var(--icon-width)+var(--icon-padding))]
|
|
137
|
+
return 'border rounded-lg absolute w-8 h-8 right-[calc(var(--icon-width)+var(--icon-padding))] top-1/2 -translate-y-1/2'
|
|
130
138
|
} else {
|
|
131
|
-
return 'border rounded-lg absolute w-8 h-8 right-[calc(var(--icon-width)+0.25*var(--icon-width))]
|
|
139
|
+
return 'border rounded-lg absolute w-8 h-8 right-[calc(var(--icon-width)+0.25*var(--icon-width))] top-1/2 -translate-y-1/2'
|
|
132
140
|
}
|
|
133
141
|
} else {
|
|
134
142
|
if (!this.enterButton) {
|
|
135
|
-
return 'border rounded-lg absolute w-8 h-8 right-2
|
|
143
|
+
return 'border rounded-lg absolute w-8 h-8 right-2 top-1/2 -translate-y-1/2'
|
|
136
144
|
}
|
|
137
145
|
}
|
|
138
146
|
return 'border rounded-lg absolute w-8 h-8'
|
|
@@ -20,10 +20,13 @@
|
|
|
20
20
|
</div>
|
|
21
21
|
}
|
|
22
22
|
</div>
|
|
23
|
-
<button
|
|
23
|
+
<button
|
|
24
|
+
class="h-6 w-6 flex items-center justify-center"
|
|
25
|
+
data-test="dropdown-clear"
|
|
26
|
+
>
|
|
24
27
|
@if (hasSelectedChoices && !overlayOpen) {
|
|
25
28
|
<ng-icon
|
|
26
|
-
class="shrink-0 opacity-40
|
|
29
|
+
class="shrink-0 opacity-40 hover:opacity-80 transition-colors clear-btn"
|
|
27
30
|
(click)="clearSelection($event)"
|
|
28
31
|
name="matClose"
|
|
29
32
|
></ng-icon>
|
|
@@ -61,13 +64,13 @@
|
|
|
61
64
|
#overlayContainer
|
|
62
65
|
>
|
|
63
66
|
<div
|
|
64
|
-
class="border border-gray-300 rounded mb-2 mx-2 min-h-[44px] flex flex-row gap-
|
|
67
|
+
class="border border-gray-300 rounded mb-2 mx-2 min-h-[44px] flex flex-row gap-1 flex-wrap p-2 focus-within:rounded focus-within:border-2 focus-within:border-primary"
|
|
65
68
|
>
|
|
66
69
|
@for (selected of selectedChoices; track selected) {
|
|
67
70
|
<button
|
|
68
71
|
type="button"
|
|
69
72
|
[title]="selected.label"
|
|
70
|
-
class="max-w-full bg-main text-white rounded pr-[7px] flex gap-1 items-center opacity-70 hover:opacity-100 focus:opacity-100 transition-opacity
|
|
73
|
+
class="max-w-full bg-main text-white rounded pr-[7px] flex gap-1 items-center opacity-70 hover:opacity-100 focus:opacity-100 transition-opacity"
|
|
71
74
|
(click)="select(selected, false)"
|
|
72
75
|
>
|
|
73
76
|
<div class="text-sm truncate leading-[26px] px-2">
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
propagateToDocumentOnly,
|
|
25
25
|
} from '../../../../../../libs/util/shared/src'
|
|
26
26
|
import { ButtonComponent } from '../button/button.component'
|
|
27
|
-
import { NgIcon, provideIcons } from '@ng-icons/core'
|
|
27
|
+
import { NgIcon, provideIcons, provideNgIconsConfig } from '@ng-icons/core'
|
|
28
28
|
import { FormsModule } from '@angular/forms'
|
|
29
29
|
import { TranslatePipe } from '@ngx-translate/core'
|
|
30
30
|
|
|
@@ -46,19 +46,22 @@ import {
|
|
|
46
46
|
matExpandMore,
|
|
47
47
|
matExpandLess,
|
|
48
48
|
}),
|
|
49
|
+
provideNgIconsConfig({
|
|
50
|
+
size: '1.5rem',
|
|
51
|
+
}),
|
|
49
52
|
],
|
|
50
53
|
standalone: true,
|
|
51
54
|
})
|
|
52
|
-
export class DropdownMultiselectComponent {
|
|
55
|
+
export class DropdownMultiselectComponent<T = unknown> {
|
|
53
56
|
private scrollStrategies = inject(ScrollStrategyOptions)
|
|
54
57
|
|
|
55
58
|
@Input() title: string
|
|
56
|
-
@Input() choices: Choice[]
|
|
57
|
-
@Input() selected:
|
|
59
|
+
@Input() choices: Choice<T>[]
|
|
60
|
+
@Input() selected: T[] = []
|
|
58
61
|
@Input() allowSearch = true
|
|
59
62
|
@Input() maxRows: number
|
|
60
63
|
@Input() searchInputValue = ''
|
|
61
|
-
@Output() selectValues = new EventEmitter<
|
|
64
|
+
@Output() selectValues = new EventEmitter<T[]>()
|
|
62
65
|
@ViewChild('overlayOrigin') overlayOrigin: CdkOverlayOrigin
|
|
63
66
|
@ViewChild(CdkConnectedOverlay) overlay: CdkConnectedOverlay
|
|
64
67
|
@ViewChild('overlayContainer', { read: ElementRef })
|
|
@@ -115,7 +118,7 @@ export class DropdownMultiselectComponent {
|
|
|
115
118
|
|
|
116
119
|
private setFocus() {
|
|
117
120
|
setTimeout(() => {
|
|
118
|
-
this.searchFieldInput
|
|
121
|
+
this.searchFieldInput?.nativeElement.focus()
|
|
119
122
|
}, 0)
|
|
120
123
|
}
|
|
121
124
|
|
|
@@ -194,18 +197,18 @@ export class DropdownMultiselectComponent {
|
|
|
194
197
|
this.checkboxes.get(newIndex).nativeElement.focus()
|
|
195
198
|
}
|
|
196
199
|
|
|
197
|
-
isSelected(choice: Choice) {
|
|
200
|
+
isSelected(choice: Choice<T>) {
|
|
198
201
|
return this.selected.indexOf(choice.value) > -1
|
|
199
202
|
}
|
|
200
203
|
|
|
201
|
-
select(choice: Choice
|
|
204
|
+
select(choice: Choice<T>, selected: boolean) {
|
|
202
205
|
this.selected = selected
|
|
203
206
|
? [...this.selected.filter((v) => v !== choice.value), choice.value]
|
|
204
207
|
: this.selected.filter((v) => v !== choice.value)
|
|
205
208
|
this.selectValues.emit(this.selected)
|
|
206
209
|
}
|
|
207
210
|
|
|
208
|
-
toggle(choice: Choice) {
|
|
211
|
+
toggle(choice: Choice<T>) {
|
|
209
212
|
this.select(choice, !this.isSelected(choice))
|
|
210
213
|
}
|
|
211
214
|
|
package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts
CHANGED
|
@@ -56,7 +56,8 @@ export class SearchFeatureCatalogComponent {
|
|
|
56
56
|
const fuzzyFilter = createFuzzyFilter(searchTerm)
|
|
57
57
|
return (
|
|
58
58
|
fuzzyFilter(featureType.name) ||
|
|
59
|
-
(featureType.
|
|
59
|
+
(featureType.description &&
|
|
60
|
+
fuzzyFilter(featureType.description))
|
|
60
61
|
)
|
|
61
62
|
}
|
|
62
63
|
)
|
package/src/libs/ui/inputs/src/lib/spatial-extent-dropdown/spatial-extent-dropdown.component.html
CHANGED
|
@@ -58,7 +58,12 @@
|
|
|
58
58
|
[class]="
|
|
59
59
|
(hasSelection
|
|
60
60
|
? 'border-b-[1px] border-gray-400 pb-[20px]'
|
|
61
|
-
: 'pb-[
|
|
61
|
+
: 'pb-[12px]') + ' text-black flex flex-col gap-[8px]'
|
|
62
|
+
"
|
|
63
|
+
style="
|
|
64
|
+
--gn-ui-text-input-rounded: 8px;
|
|
65
|
+
--gn-ui-text-input-border-size: 1px;
|
|
66
|
+
--gn-ui-text-input-padding: 6px;
|
|
62
67
|
"
|
|
63
68
|
>
|
|
64
69
|
<gn-ui-drag-and-drop-file-input
|
|
@@ -68,12 +73,13 @@
|
|
|
68
73
|
[showFileName]="false"
|
|
69
74
|
textClass="text-black truncate"
|
|
70
75
|
dropzoneBackgroundColor="transparent"
|
|
71
|
-
icon="
|
|
76
|
+
icon="iconoirUpload"
|
|
72
77
|
extraClass="gn-ui-gray-outline-input w-full !h-[32px] px-[8px] py-[4px] justify-between"
|
|
73
78
|
(fileChange)="handleFileSelected($event)"
|
|
74
79
|
(errorChange)="handleFileError($event)"
|
|
75
80
|
data-cy="importGeojson"
|
|
76
81
|
></gn-ui-drag-and-drop-file-input>
|
|
82
|
+
<ng-content></ng-content>
|
|
77
83
|
</div>
|
|
78
84
|
|
|
79
85
|
@if (hasSelection) {
|
package/src/libs/ui/inputs/src/lib/spatial-extent-dropdown/spatial-extent-dropdown.component.ts
CHANGED
|
@@ -20,9 +20,9 @@ import { ButtonComponent } from '../button/button.component'
|
|
|
20
20
|
import { NgIcon, provideIcons } from '@ng-icons/core'
|
|
21
21
|
import {
|
|
22
22
|
iconoirCheckCircle,
|
|
23
|
-
iconoirImport,
|
|
24
23
|
iconoirSquareDashed,
|
|
25
24
|
iconoirTrash,
|
|
25
|
+
iconoirUpload,
|
|
26
26
|
} from '@ng-icons/iconoir'
|
|
27
27
|
import {
|
|
28
28
|
matClose,
|
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
BoundingBox,
|
|
36
36
|
getGeometryBoundingBox,
|
|
37
37
|
getGeometryFromGeoJSON,
|
|
38
|
+
isBoundingBoxWithinWorldExtent,
|
|
38
39
|
propagateToDocumentOnly,
|
|
39
40
|
readFileAsText,
|
|
40
41
|
} from '../../../../../../libs/util/shared/src'
|
|
@@ -46,11 +47,18 @@ import {
|
|
|
46
47
|
marker('search.filters.spatialExtent.import')
|
|
47
48
|
marker('search.filters.spatialExtent.helpText')
|
|
48
49
|
marker('search.filters.spatialExtent.error.title')
|
|
50
|
+
marker('search.filters.spatialExtent.error.outOfBounds')
|
|
49
51
|
|
|
50
52
|
const LABEL_FROM_FILE = marker('search.filters.spatialExtent.bboxFromFile')
|
|
51
53
|
const LABEL_FROM_FILE_DELETE = marker(
|
|
52
54
|
'search.filters.spatialExtent.bboxFromFileDelete'
|
|
53
55
|
)
|
|
56
|
+
const LABEL_FROM_LOCATION = marker(
|
|
57
|
+
'search.filters.spatialExtent.bboxFromLocation'
|
|
58
|
+
)
|
|
59
|
+
const LABEL_FROM_LOCATION_DELETE = marker(
|
|
60
|
+
'search.filters.spatialExtent.bboxFromLocationDelete'
|
|
61
|
+
)
|
|
54
62
|
const LABEL_INITIAL = marker('search.filters.spatialExtent.bboxInitial')
|
|
55
63
|
const LABEL_INITIAL_DELETE = marker(
|
|
56
64
|
'search.filters.spatialExtent.bboxInitialDelete'
|
|
@@ -74,9 +82,9 @@ export interface SpatialExtentDropdownError {
|
|
|
74
82
|
providers: [
|
|
75
83
|
provideIcons({
|
|
76
84
|
iconoirCheckCircle,
|
|
77
|
-
iconoirImport,
|
|
78
85
|
iconoirSquareDashed,
|
|
79
86
|
iconoirTrash,
|
|
87
|
+
iconoirUpload,
|
|
80
88
|
matClose,
|
|
81
89
|
matExpandLess,
|
|
82
90
|
matExpandMore,
|
|
@@ -103,6 +111,7 @@ export class SpatialExtentDropdownComponent {
|
|
|
103
111
|
|
|
104
112
|
bbox: BoundingBox | null = null
|
|
105
113
|
fileName = ''
|
|
114
|
+
locationName = ''
|
|
106
115
|
|
|
107
116
|
@ViewChild('overlayOrigin') overlayOrigin: CdkOverlayOrigin
|
|
108
117
|
@ViewChild(CdkConnectedOverlay) overlay: CdkConnectedOverlay
|
|
@@ -136,15 +145,19 @@ export class SpatialExtentDropdownComponent {
|
|
|
136
145
|
}
|
|
137
146
|
|
|
138
147
|
get selectionLabelKey() {
|
|
139
|
-
|
|
148
|
+
if (this.fileName) return LABEL_FROM_FILE
|
|
149
|
+
if (this.locationName) return LABEL_FROM_LOCATION
|
|
150
|
+
return LABEL_INITIAL
|
|
140
151
|
}
|
|
141
152
|
|
|
142
153
|
get selectionDeleteLabelKey() {
|
|
143
|
-
|
|
154
|
+
if (this.fileName) return LABEL_FROM_FILE_DELETE
|
|
155
|
+
if (this.locationName) return LABEL_FROM_LOCATION_DELETE
|
|
156
|
+
return LABEL_INITIAL_DELETE
|
|
144
157
|
}
|
|
145
158
|
|
|
146
159
|
get selectionLabelParams() {
|
|
147
|
-
return { fileName: this.fileName }
|
|
160
|
+
return { fileName: this.fileName, locationName: this.locationName }
|
|
148
161
|
}
|
|
149
162
|
|
|
150
163
|
openOverlay() {
|
|
@@ -178,8 +191,13 @@ export class SpatialExtentDropdownComponent {
|
|
|
178
191
|
return
|
|
179
192
|
}
|
|
180
193
|
const bbox = getGeometryBoundingBox(geometry)
|
|
194
|
+
if (!isBoundingBoxWithinWorldExtent(bbox)) {
|
|
195
|
+
this.setError(marker('search.filters.spatialExtent.error.outOfBounds'))
|
|
196
|
+
return
|
|
197
|
+
}
|
|
181
198
|
this.bbox = bbox
|
|
182
199
|
this.fileName = file.name
|
|
200
|
+
this.locationName = ''
|
|
183
201
|
this.bboxChange.emit(bbox)
|
|
184
202
|
this.cd.markForCheck()
|
|
185
203
|
} catch {
|
|
@@ -188,6 +206,16 @@ export class SpatialExtentDropdownComponent {
|
|
|
188
206
|
}
|
|
189
207
|
}
|
|
190
208
|
|
|
209
|
+
setLocationBbox(bbox: BoundingBox, name: string) {
|
|
210
|
+
this.errorKey = null
|
|
211
|
+
this.bbox = bbox
|
|
212
|
+
this.locationName = name
|
|
213
|
+
this.fileName = ''
|
|
214
|
+
this.fileInput?.clear()
|
|
215
|
+
this.bboxChange.emit(bbox)
|
|
216
|
+
this.cd.markForCheck()
|
|
217
|
+
}
|
|
218
|
+
|
|
191
219
|
handleFileError(error: DragAndDropFileInputError) {
|
|
192
220
|
if (error === 'file-too-large') {
|
|
193
221
|
this.setError(marker('search.filters.spatialExtent.error.fileTooLarge'), {
|
|
@@ -207,6 +235,7 @@ export class SpatialExtentDropdownComponent {
|
|
|
207
235
|
removeSelection(event: Event) {
|
|
208
236
|
this.bbox = null
|
|
209
237
|
this.fileName = ''
|
|
238
|
+
this.locationName = ''
|
|
210
239
|
this.errorKey = null
|
|
211
240
|
this.fileInput?.clear()
|
|
212
241
|
this.bboxChange.emit(null)
|