geonetwork-ui 2.3.0-dev.3efe236f → 2.3.0-dev.431347d3
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/iso19139/read-parts.mjs +2 -2
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +2 -2
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +9 -7
- package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +1 -1
- package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +35 -2
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.mjs +64 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.mjs +15 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.mjs +104 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +25 -6
- package/esm2022/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.mjs +1 -1
- package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +23 -1
- package/esm2022/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.mjs +73 -20
- package/esm2022/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.mjs +1 -1
- package/esm2022/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.mjs +1 -1
- package/esm2022/libs/feature/map/src/lib/map-context/map-context.model.mjs +1 -1
- package/esm2022/libs/feature/map/src/lib/map-context/map-context.service.mjs +37 -8
- package/esm2022/libs/feature/map/src/lib/utils/map-utils.service.mjs +6 -2
- package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +1 -1
- package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +4 -3
- package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +1 -1
- package/esm2022/libs/feature/record/src/lib/state/mdview.reducer.mjs +1 -3
- package/esm2022/libs/feature/search/src/index.mjs +2 -1
- package/esm2022/libs/feature/search/src/lib/results-layout/results-layout.component.mjs +1 -1
- package/esm2022/libs/feature/search/src/lib/sort-by/sort-by.component.mjs +1 -1
- package/esm2022/libs/feature/search/src/lib/utils/service/fields.service.mjs +1 -1
- package/esm2022/libs/ui/catalog/src/lib/language-switcher/language-switcher.component.mjs +1 -1
- package/esm2022/libs/ui/catalog/src/lib/organisations-filter/organisations-filter.component.mjs +1 -1
- package/esm2022/libs/ui/elements/src/lib/api-card/api-card.component.mjs +3 -2
- package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +2 -2
- package/esm2022/libs/ui/elements/src/lib/link-card/link-card.component.mjs +16 -3
- package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +98 -36
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +1 -6
- package/esm2022/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.mjs +3 -5
- package/esm2022/libs/ui/inputs/src/index.mjs +16 -15
- package/esm2022/libs/ui/inputs/src/lib/check-toggle/check-toggle.component.mjs +4 -3
- package/esm2022/libs/ui/inputs/src/lib/date-picker/date-picker.component.mjs +22 -0
- package/esm2022/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.mjs +7 -5
- package/esm2022/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.mjs +19 -8
- package/esm2022/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.mjs +29 -0
- package/esm2022/libs/ui/inputs/src/lib/text-input/text-input.component.mjs +5 -3
- package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +14 -11
- package/esm2022/libs/ui/layout/src/index.mjs +2 -1
- package/esm2022/libs/ui/layout/src/lib/block-list/block-list.component.mjs +76 -0
- package/esm2022/libs/ui/layout/src/lib/carousel/carousel.component.mjs +42 -18
- package/esm2022/libs/ui/layout/src/lib/ui-layout.module.mjs +3 -8
- package/esm2022/libs/util/shared/src/lib/links/link-classifier.service.mjs +2 -2
- package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +22 -1
- package/esm2022/translations/de.json +22 -14
- package/esm2022/translations/en.json +22 -14
- package/esm2022/translations/es.json +22 -14
- package/esm2022/translations/fr.json +22 -14
- package/esm2022/translations/it.json +22 -14
- package/esm2022/translations/nl.json +22 -14
- package/esm2022/translations/pt.json +22 -14
- package/fesm2022/geonetwork-ui.mjs +1520 -912
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- 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.service.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts +3 -1
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.d.ts +39 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.d.ts +8 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.d.ts +21 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts +4 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
- package/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.d.ts +10 -5
- package/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/map-context/map-context.model.d.ts +7 -0
- package/libs/feature/map/src/lib/map-context/map-context.model.d.ts.map +1 -1
- package/libs/feature/map/src/lib/map-context/map-context.service.d.ts.map +1 -1
- package/libs/feature/map/src/lib/utils/map-utils.service.d.ts.map +1 -1
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.reducer.d.ts.map +1 -1
- package/libs/feature/search/src/index.d.ts +1 -0
- package/libs/feature/search/src/index.d.ts.map +1 -1
- package/libs/feature/search/src/lib/utils/service/fields.service.d.ts +3 -3
- package/libs/feature/search/src/lib/utils/service/fields.service.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/api-card/api-card.component.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/link-card/link-card.component.d.ts +3 -1
- package/libs/ui/elements/src/lib/link-card/link-card.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts +24 -4
- package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts +29 -30
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.d.ts +1 -2
- package/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/index.d.ts +15 -14
- package/libs/ui/inputs/src/index.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/check-toggle/check-toggle.component.d.ts +1 -1
- package/libs/ui/inputs/src/lib/check-toggle/check-toggle.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/date-picker/date-picker.component.d.ts +9 -0
- package/libs/ui/inputs/src/lib/date-picker/date-picker.component.d.ts.map +1 -0
- package/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.d.ts +1 -1
- package/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.d.ts +2 -1
- package/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.d.ts +12 -0
- package/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.d.ts.map +1 -0
- package/libs/ui/inputs/src/lib/text-input/text-input.component.d.ts +2 -1
- package/libs/ui/inputs/src/lib/text-input/text-input.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +35 -35
- package/libs/ui/layout/src/index.d.ts +1 -0
- package/libs/ui/layout/src/index.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts +25 -0
- package/libs/ui/layout/src/lib/block-list/block-list.component.d.ts.map +1 -0
- package/libs/ui/layout/src/lib/carousel/carousel.component.d.ts +13 -6
- package/libs/ui/layout/src/lib/carousel/carousel.component.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/ui-layout.module.d.ts +4 -5
- package/libs/ui/layout/src/lib/ui-layout.module.d.ts.map +1 -1
- package/libs/util/shared/src/lib/links/link-utils.d.ts +18 -0
- package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +1 -1
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +1 -4
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +16 -10
- package/src/libs/common/fixtures/src/lib/link.fixtures.ts +8 -0
- package/src/libs/common/fixtures/src/lib/records.fixtures.ts +2 -2
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +51 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.html +8 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-license/form-field-license.component.ts +64 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-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.html +4 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-resource-updated/form-field-resource-updated.component.ts +15 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.html +14 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-update-frequency/form-field-update-frequency.component.ts +143 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +38 -33
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +21 -0
- package/src/libs/feature/editor/src/lib/fields.config.ts +22 -0
- package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.css +7 -0
- package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.html +32 -18
- package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.ts +72 -17
- package/src/libs/feature/map/src/lib/map-context/map-context.model.ts +7 -0
- package/src/libs/feature/map/src/lib/map-context/map-context.service.ts +34 -8
- package/src/libs/feature/map/src/lib/utils/map-utils.service.ts +5 -1
- package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +2 -1
- package/src/libs/feature/record/src/lib/state/mdview.facade.ts +0 -1
- package/src/libs/feature/record/src/lib/state/mdview.reducer.ts +0 -2
- package/src/libs/feature/search/src/index.ts +1 -0
- package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +2 -2
- package/src/libs/ui/elements/src/lib/api-card/api-card.component.ts +2 -1
- package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +1 -1
- package/src/libs/ui/elements/src/lib/link-card/link-card.component.html +38 -20
- package/src/libs/ui/elements/src/lib/link-card/link-card.component.ts +12 -0
- package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.html +26 -10
- package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts +125 -30
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +0 -2
- package/src/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.html +1 -1
- package/src/libs/ui/elements/src/lib/user-feedback-item/user-feedback-item.component.ts +0 -1
- package/src/libs/ui/inputs/src/index.ts +15 -14
- package/src/libs/ui/inputs/src/lib/check-toggle/check-toggle.component.ts +3 -0
- package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.css +3 -0
- package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.html +11 -0
- package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.ts +16 -0
- package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.ts +8 -1
- package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.html +1 -0
- package/src/libs/ui/inputs/src/lib/dropdown-selector/dropdown-selector.component.ts +14 -0
- package/src/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.css +6 -0
- package/src/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.html +26 -0
- package/src/libs/ui/inputs/src/lib/previous-next-buttons/previous-next-buttons.component.ts +32 -0
- package/src/libs/ui/inputs/src/lib/text-input/text-input.component.html +1 -0
- package/src/libs/ui/inputs/src/lib/text-input/text-input.component.ts +1 -0
- package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +3 -3
- package/src/libs/ui/layout/src/index.ts +1 -0
- package/src/libs/ui/layout/src/lib/block-list/block-list.component.css +23 -0
- package/src/libs/ui/layout/src/lib/block-list/block-list.component.html +20 -0
- package/src/libs/ui/layout/src/lib/block-list/block-list.component.ts +84 -0
- package/src/libs/ui/layout/src/lib/carousel/carousel.component.css +8 -4
- package/src/libs/ui/layout/src/lib/carousel/carousel.component.html +4 -4
- package/src/libs/ui/layout/src/lib/carousel/carousel.component.ts +45 -15
- package/src/libs/ui/layout/src/lib/ui-layout.module.ts +0 -2
- package/src/libs/util/shared/src/lib/links/link-classifier.service.ts +1 -1
- package/src/libs/util/shared/src/lib/links/link-utils.ts +21 -0
- package/translations/de.json +22 -14
- package/translations/en.json +22 -14
- package/translations/es.json +22 -14
- package/translations/fr.json +22 -14
- package/translations/it.json +22 -14
- package/translations/nl.json +22 -14
- package/translations/pt.json +22 -14
- package/translations/sk.json +22 -14
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
|
|
2
|
+
import { FormControl } from '@angular/forms'
|
|
3
|
+
import { marker } from '@biesbjerg/ngx-translate-extract-marker'
|
|
4
|
+
import { DropdownSelectorComponent } from '../../../../../../../../../libs/ui/inputs/src'
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'gn-ui-form-field-license',
|
|
8
|
+
templateUrl: './form-field-license.component.html',
|
|
9
|
+
styleUrls: ['./form-field-license.component.css'],
|
|
10
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11
|
+
standalone: true,
|
|
12
|
+
imports: [DropdownSelectorComponent],
|
|
13
|
+
})
|
|
14
|
+
export class FormFieldLicenseComponent {
|
|
15
|
+
@Input() control!: FormControl
|
|
16
|
+
@Input() label: string
|
|
17
|
+
|
|
18
|
+
get selected() {
|
|
19
|
+
return this.control.value[0]?.text
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
onSelectValue(value: unknown) {
|
|
23
|
+
this.control.setValue([{ text: value }])
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
choices = [
|
|
27
|
+
{
|
|
28
|
+
value: 'cc-by',
|
|
29
|
+
label: marker('editor.record.form.license.cc-by'),
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
value: 'cc-by-sa',
|
|
33
|
+
label: marker('editor.record.form.license.cc-by-sa'),
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
value: 'cc-zero',
|
|
37
|
+
label: marker('editor.record.form.license.cc-zero'),
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
value: 'etalab',
|
|
41
|
+
label: marker('editor.record.form.license.etalab'),
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
value: 'etalab-v2',
|
|
45
|
+
label: marker('editor.record.form.license.etalab-v2'),
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
value: 'odbl',
|
|
49
|
+
label: marker('editor.record.form.license.odbl'),
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
value: 'odc-by',
|
|
53
|
+
label: marker('editor.record.form.license.odc-by'),
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
value: 'pddl',
|
|
57
|
+
label: marker('editor.record.form.license.pddl'),
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
value: 'unknown',
|
|
61
|
+
label: marker('editor.record.form.license.unknown'),
|
|
62
|
+
},
|
|
63
|
+
]
|
|
64
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
|
|
2
|
+
import { FormControl } from '@angular/forms'
|
|
3
|
+
import { DatePickerComponent } from '../../../../../../../../../libs/ui/inputs/src'
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'gn-ui-form-field-resource-updated',
|
|
7
|
+
templateUrl: './form-field-resource-updated.component.html',
|
|
8
|
+
styleUrls: ['./form-field-resource-updated.component.css'],
|
|
9
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10
|
+
standalone: true,
|
|
11
|
+
imports: [DatePickerComponent],
|
|
12
|
+
})
|
|
13
|
+
export class FormFieldResourceUpdatedComponent {
|
|
14
|
+
@Input() control!: FormControl
|
|
15
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<gn-ui-check-toggle
|
|
2
|
+
[label]="'editor.record.form.updateFrequency.planned' | translate"
|
|
3
|
+
[value]="planned"
|
|
4
|
+
(toggled)="onPlannedToggled()"
|
|
5
|
+
></gn-ui-check-toggle>
|
|
6
|
+
<gn-ui-dropdown-selector
|
|
7
|
+
title="updateFrequency"
|
|
8
|
+
[showTitle]="false"
|
|
9
|
+
[choices]="choices"
|
|
10
|
+
[selected]="selectedFrequency"
|
|
11
|
+
(selectValue)="onSelectFrequencyValue($event)"
|
|
12
|
+
[disabled]="!planned"
|
|
13
|
+
>
|
|
14
|
+
</gn-ui-dropdown-selector>
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
Input,
|
|
5
|
+
OnInit,
|
|
6
|
+
} from '@angular/core'
|
|
7
|
+
import { FormControl } from '@angular/forms'
|
|
8
|
+
import { marker } from '@biesbjerg/ngx-translate-extract-marker'
|
|
9
|
+
import {
|
|
10
|
+
CheckToggleComponent,
|
|
11
|
+
DropdownSelectorComponent,
|
|
12
|
+
} from '../../../../../../../../../libs/ui/inputs/src'
|
|
13
|
+
import { TranslateModule, TranslateService } from '@ngx-translate/core'
|
|
14
|
+
|
|
15
|
+
@Component({
|
|
16
|
+
selector: 'gn-ui-form-field-update-frequency',
|
|
17
|
+
templateUrl: './form-field-update-frequency.component.html',
|
|
18
|
+
styleUrls: ['./form-field-update-frequency.component.css'],
|
|
19
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
20
|
+
standalone: true,
|
|
21
|
+
imports: [CheckToggleComponent, DropdownSelectorComponent, TranslateModule],
|
|
22
|
+
})
|
|
23
|
+
export class FormFieldUpdateFrequencyComponent implements OnInit {
|
|
24
|
+
@Input() control: FormControl
|
|
25
|
+
|
|
26
|
+
get planned() {
|
|
27
|
+
return this.control.value !== 'notPlanned'
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
constructor(private translateService: TranslateService) {}
|
|
31
|
+
|
|
32
|
+
ngOnInit() {
|
|
33
|
+
const updatedTimes = this.control.value?.updatedTimes
|
|
34
|
+
const per = this.control.value?.per
|
|
35
|
+
if (updatedTimes && updatedTimes !== 1 && updatedTimes !== 2) {
|
|
36
|
+
this.choices = [
|
|
37
|
+
{
|
|
38
|
+
value: `${per}.${updatedTimes}`,
|
|
39
|
+
label: this.translateService.instant(
|
|
40
|
+
`domain.record.updateFrequency.${per}`,
|
|
41
|
+
{
|
|
42
|
+
count: updatedTimes,
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
},
|
|
46
|
+
...this.choices,
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
onPlannedToggled() {
|
|
52
|
+
if (this.planned) {
|
|
53
|
+
this.control.setValue('notPlanned')
|
|
54
|
+
} else {
|
|
55
|
+
this.control.setValue({ updatedTimes: 1, per: 'day' })
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
get selectedFrequency() {
|
|
60
|
+
const { updatedTimes, per } = this.control.value
|
|
61
|
+
return `${per}.${updatedTimes}`
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
onSelectFrequencyValue(value: unknown) {
|
|
65
|
+
const split = (value as string).split('.')
|
|
66
|
+
this.control.setValue({ updatedTimes: Number(split[1]), per: split[0] })
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
choices = [
|
|
70
|
+
{
|
|
71
|
+
value: 'day.1',
|
|
72
|
+
label: this.translateService.instant(
|
|
73
|
+
'domain.record.updateFrequency.day',
|
|
74
|
+
{
|
|
75
|
+
count: 1,
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
value: 'day.2',
|
|
81
|
+
label: this.translateService.instant(
|
|
82
|
+
'domain.record.updateFrequency.day',
|
|
83
|
+
{
|
|
84
|
+
count: 2,
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
value: 'week.1',
|
|
90
|
+
label: this.translateService.instant(
|
|
91
|
+
'domain.record.updateFrequency.week',
|
|
92
|
+
{
|
|
93
|
+
count: 1,
|
|
94
|
+
}
|
|
95
|
+
),
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
value: 'week.2',
|
|
99
|
+
label: this.translateService.instant(
|
|
100
|
+
'domain.record.updateFrequency.week',
|
|
101
|
+
{
|
|
102
|
+
count: 2,
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
value: 'month.1',
|
|
108
|
+
label: this.translateService.instant(
|
|
109
|
+
'domain.record.updateFrequency.month',
|
|
110
|
+
{
|
|
111
|
+
count: 1,
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
value: 'month.2',
|
|
117
|
+
label: this.translateService.instant(
|
|
118
|
+
'domain.record.updateFrequency.month',
|
|
119
|
+
{
|
|
120
|
+
count: 2,
|
|
121
|
+
}
|
|
122
|
+
),
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
value: 'year.1',
|
|
126
|
+
label: this.translateService.instant(
|
|
127
|
+
'domain.record.updateFrequency.year',
|
|
128
|
+
{
|
|
129
|
+
count: 1,
|
|
130
|
+
}
|
|
131
|
+
),
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
value: 'year.2',
|
|
135
|
+
label: this.translateService.instant(
|
|
136
|
+
'domain.record.updateFrequency.year',
|
|
137
|
+
{
|
|
138
|
+
count: 2,
|
|
139
|
+
}
|
|
140
|
+
),
|
|
141
|
+
},
|
|
142
|
+
]
|
|
143
|
+
}
|
package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html
CHANGED
|
@@ -1,29 +1,18 @@
|
|
|
1
1
|
<div class="flex flex-col h-full">
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
</span>
|
|
10
|
-
</label>
|
|
11
|
-
<mat-icon
|
|
12
|
-
*ngIf="isFieldOk"
|
|
13
|
-
class="material-symbols-outlined text-[#c6d950] icon-ok"
|
|
14
|
-
>check_circle</mat-icon
|
|
15
|
-
>
|
|
16
|
-
<mat-icon
|
|
17
|
-
*ngIf="isFieldLocked"
|
|
18
|
-
class="material-symbols-outlined text-blue-400 icon-locked"
|
|
19
|
-
>lock</mat-icon
|
|
20
|
-
>
|
|
21
|
-
<mat-icon
|
|
22
|
-
*ngIf="isFieldInvalid"
|
|
23
|
-
class="material-symbols-outlined text-pink-500 icon-invalid"
|
|
24
|
-
>cancel</mat-icon
|
|
2
|
+
<ng-container *ngIf="withoutWrapper; else withGenericWrapper">
|
|
3
|
+
<ng-container *ngTemplateOutlet="fieldContent"></ng-container>
|
|
4
|
+
</ng-container>
|
|
5
|
+
<ng-template #withGenericWrapper>
|
|
6
|
+
<gn-ui-form-field-wrapper
|
|
7
|
+
[label]="config.labelKey | translate"
|
|
8
|
+
[hint]="config.hintKey | translate"
|
|
25
9
|
>
|
|
26
|
-
|
|
10
|
+
<ng-container *ngTemplateOutlet="fieldContent"></ng-container>
|
|
11
|
+
</gn-ui-form-field-wrapper>
|
|
12
|
+
</ng-template>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<ng-template #fieldContent>
|
|
27
16
|
<ng-container *ngIf="isTitle">
|
|
28
17
|
<div class="flex justify-between items-center gap-3">
|
|
29
18
|
<h2
|
|
@@ -48,6 +37,30 @@
|
|
|
48
37
|
</span>
|
|
49
38
|
</div>
|
|
50
39
|
</ng-container>
|
|
40
|
+
<ng-container *ngIf="isAbstract">
|
|
41
|
+
<gn-ui-form-field-rich
|
|
42
|
+
class="h-[8rem]"
|
|
43
|
+
[control]="formControl"
|
|
44
|
+
[label]="config.labelKey | translate"
|
|
45
|
+
[hint]="config.hintKey | translate"
|
|
46
|
+
></gn-ui-form-field-rich>
|
|
47
|
+
</ng-container>
|
|
48
|
+
<ng-container *ngIf="isLicenses">
|
|
49
|
+
<gn-ui-form-field-license
|
|
50
|
+
[control]="formControl"
|
|
51
|
+
[label]="config.labelKey | translate"
|
|
52
|
+
></gn-ui-form-field-license>
|
|
53
|
+
</ng-container>
|
|
54
|
+
<ng-container *ngIf="isResourceUpdated">
|
|
55
|
+
<gn-ui-form-field-resource-updated
|
|
56
|
+
[control]="formControl"
|
|
57
|
+
></gn-ui-form-field-resource-updated>
|
|
58
|
+
</ng-container>
|
|
59
|
+
<ng-container *ngIf="isUpdateFrequency">
|
|
60
|
+
<gn-ui-form-field-update-frequency
|
|
61
|
+
[control]="formControl"
|
|
62
|
+
></gn-ui-form-field-update-frequency>
|
|
63
|
+
</ng-container>
|
|
51
64
|
<ng-container *ngIf="isSimpleField">
|
|
52
65
|
<gn-ui-form-field-simple
|
|
53
66
|
[type]="simpleType"
|
|
@@ -63,14 +76,6 @@
|
|
|
63
76
|
[invalid]="isFieldInvalid"
|
|
64
77
|
></gn-ui-form-field-file>
|
|
65
78
|
</ng-container>
|
|
66
|
-
<ng-container *ngIf="isAbstract">
|
|
67
|
-
<gn-ui-form-field-rich
|
|
68
|
-
class="h-[8rem]"
|
|
69
|
-
[control]="formControl"
|
|
70
|
-
[label]="config.labelKey | translate"
|
|
71
|
-
[hint]="config.hintKey | translate"
|
|
72
|
-
></gn-ui-form-field-rich>
|
|
73
|
-
</ng-container>
|
|
74
79
|
<ng-container *ngIf="isArrayField">
|
|
75
80
|
<gn-ui-form-field-array></gn-ui-form-field-array>
|
|
76
81
|
</ng-container>
|
|
@@ -89,4 +94,4 @@
|
|
|
89
94
|
>
|
|
90
95
|
{{ config.invalidHintKey | translate }}
|
|
91
96
|
</div>
|
|
92
|
-
</
|
|
97
|
+
</ng-template>
|
package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts
CHANGED
|
@@ -11,16 +11,20 @@ import { FormControl, ReactiveFormsModule } from '@angular/forms'
|
|
|
11
11
|
import { MatIconModule } from '@angular/material/icon'
|
|
12
12
|
import { MatTooltipModule } from '@angular/material/tooltip'
|
|
13
13
|
import { EditableLabelDirective } from '../../../../../../../../libs/ui/inputs/src'
|
|
14
|
+
import { FormFieldWrapperComponent } from '../../../../../../../../libs/ui/layout/src'
|
|
14
15
|
import { TranslateModule } from '@ngx-translate/core'
|
|
15
16
|
import { Observable } from 'rxjs'
|
|
16
17
|
import { FormFieldArrayComponent } from './form-field-array/form-field-array.component'
|
|
17
18
|
import { FormFieldFileComponent } from './form-field-file/form-field-file.component'
|
|
19
|
+
import { FormFieldLicenseComponent } from './form-field-license/form-field-license.component'
|
|
18
20
|
import { FormFieldObjectComponent } from './form-field-object/form-field-object.component'
|
|
21
|
+
import { FormFieldResourceUpdatedComponent } from './form-field-resource-updated/form-field-resource-updated.component'
|
|
19
22
|
import { FormFieldRichComponent } from './form-field-rich/form-field-rich.component'
|
|
20
23
|
import { FormFieldSimpleComponent } from './form-field-simple/form-field-simple.component'
|
|
21
24
|
import { FormFieldSpatialExtentComponent } from './form-field-spatial-extent/form-field-spatial-extent.component'
|
|
22
25
|
import { FormFieldTemporalExtentComponent } from './form-field-temporal-extent/form-field-temporal-extent.component'
|
|
23
26
|
import { FormFieldConfig } from './form-field.model'
|
|
27
|
+
import { FormFieldUpdateFrequencyComponent } from './form-field-update-frequency/form-field-update-frequency.component'
|
|
24
28
|
|
|
25
29
|
@Component({
|
|
26
30
|
selector: 'gn-ui-form-field',
|
|
@@ -34,6 +38,10 @@ import { FormFieldConfig } from './form-field.model'
|
|
|
34
38
|
EditableLabelDirective,
|
|
35
39
|
MatIconModule,
|
|
36
40
|
MatTooltipModule,
|
|
41
|
+
FormFieldWrapperComponent,
|
|
42
|
+
FormFieldLicenseComponent,
|
|
43
|
+
FormFieldResourceUpdatedComponent,
|
|
44
|
+
FormFieldUpdateFrequencyComponent,
|
|
37
45
|
FormFieldSimpleComponent,
|
|
38
46
|
FormFieldRichComponent,
|
|
39
47
|
FormFieldObjectComponent,
|
|
@@ -118,4 +126,17 @@ export class FormFieldComponent {
|
|
|
118
126
|
get isAbstract() {
|
|
119
127
|
return this.model === 'abstract'
|
|
120
128
|
}
|
|
129
|
+
get isLicenses() {
|
|
130
|
+
return this.model === 'licenses'
|
|
131
|
+
}
|
|
132
|
+
get isResourceUpdated() {
|
|
133
|
+
return this.model === 'resourceUpdated'
|
|
134
|
+
}
|
|
135
|
+
get isUpdateFrequency() {
|
|
136
|
+
return this.model === 'updateFrequency'
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
get withoutWrapper() {
|
|
140
|
+
return this.model === 'title' || this.model === 'abstract'
|
|
141
|
+
}
|
|
121
142
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { marker } from '@biesbjerg/ngx-translate-extract-marker'
|
|
1
2
|
import { EditorFieldsConfig } from './models/fields.model'
|
|
2
3
|
|
|
3
4
|
export const DEFAULT_FIELDS: EditorFieldsConfig = [
|
|
@@ -32,4 +33,25 @@ export const DEFAULT_FIELDS: EditorFieldsConfig = [
|
|
|
32
33
|
},
|
|
33
34
|
onSaveProcess: '${dateNow()}',
|
|
34
35
|
},
|
|
36
|
+
{
|
|
37
|
+
model: 'licenses',
|
|
38
|
+
formFieldConfig: {
|
|
39
|
+
labelKey: marker('editor.record.form.license'),
|
|
40
|
+
type: 'list',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
model: 'resourceUpdated',
|
|
45
|
+
formFieldConfig: {
|
|
46
|
+
labelKey: marker('editor.record.form.resourceUpdated'),
|
|
47
|
+
type: 'date',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
model: 'updateFrequency',
|
|
52
|
+
formFieldConfig: {
|
|
53
|
+
labelKey: marker('editor.record.form.updateFrequency'),
|
|
54
|
+
type: 'text',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
35
57
|
]
|
package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.html
CHANGED
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
(valueChange)="urlChange.next($event)"
|
|
5
5
|
[hint]="'map.ogc.urlInput.hint' | translate"
|
|
6
6
|
class="w-96"
|
|
7
|
-
>
|
|
8
|
-
</gn-ui-text-input>
|
|
7
|
+
></gn-ui-text-input>
|
|
9
8
|
</div>
|
|
10
9
|
|
|
11
10
|
<div *ngIf="errorMessage" class="text-red-500 mt-2">
|
|
@@ -16,21 +15,36 @@
|
|
|
16
15
|
<p class="loading-message" translate>map.loading.service</p>
|
|
17
16
|
</div>
|
|
18
17
|
|
|
19
|
-
<
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
type="primary"
|
|
29
|
-
(buttonClick)="addLayer(layer)"
|
|
30
|
-
extraClass="text-sm !px-2 !py-1"
|
|
31
|
-
translate
|
|
32
|
-
><span translate> map.layer.add </span></gn-ui-button
|
|
18
|
+
<ng-container *ngFor="let layer of layers">
|
|
19
|
+
<div
|
|
20
|
+
*ngIf="shouldDisplayLayer(layer)"
|
|
21
|
+
class="flex items-center justify-between my-2 layer-item-tree"
|
|
22
|
+
>
|
|
23
|
+
<div class="flex flex-col items-start w-full">
|
|
24
|
+
<p
|
|
25
|
+
class="max-w-xs overflow-hidden overflow-ellipsis whitespace-nowrap"
|
|
26
|
+
[title]="layer.name"
|
|
33
27
|
>
|
|
28
|
+
{{ layer.name }}
|
|
29
|
+
</p>
|
|
30
|
+
<div class="flex justify-between items-center w-full">
|
|
31
|
+
<gn-ui-dropdown-selector
|
|
32
|
+
[title]="'Add Layer As' | translate"
|
|
33
|
+
[choices]="getLayerChoices(layer)"
|
|
34
|
+
(selectValue)="onLayerTypeSelect(layer.name, $event)"
|
|
35
|
+
[selected]="selectedLayerTypes[layer.name]"
|
|
36
|
+
extraBtnClass="w-6 h-5 !text-sm !px-2 !py-1"
|
|
37
|
+
></gn-ui-dropdown-selector>
|
|
38
|
+
<gn-ui-button
|
|
39
|
+
class="layer-add-btn"
|
|
40
|
+
type="primary"
|
|
41
|
+
(buttonClick)="addLayer(layer.name, selectedLayerTypes[layer.name])"
|
|
42
|
+
extraClass="text-sm !px-2 !py-1"
|
|
43
|
+
translate
|
|
44
|
+
>
|
|
45
|
+
<span translate>map.layer.add</span>
|
|
46
|
+
</gn-ui-button>
|
|
47
|
+
</div>
|
|
34
48
|
</div>
|
|
35
|
-
</
|
|
36
|
-
</
|
|
49
|
+
</div>
|
|
50
|
+
</ng-container>
|
package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.ts
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
MapContextLayerTypeEnum,
|
|
15
15
|
} from '../map-context/map-context.model'
|
|
16
16
|
import { TranslateModule } from '@ngx-translate/core'
|
|
17
|
-
import { UiInputsModule } from '../../../../../../libs/ui/inputs/src'
|
|
17
|
+
import { DropdownChoice, UiInputsModule } from '../../../../../../libs/ui/inputs/src'
|
|
18
18
|
import { CommonModule } from '@angular/common'
|
|
19
19
|
import { MapLayer } from '../+state/map.models'
|
|
20
20
|
|
|
@@ -30,18 +30,16 @@ export class AddLayerFromOgcApiComponent implements OnInit {
|
|
|
30
30
|
@Output() layerAdded = new EventEmitter<MapLayer>()
|
|
31
31
|
|
|
32
32
|
urlChange = new Subject<string>()
|
|
33
|
-
layerUrl = ''
|
|
34
33
|
loading = false
|
|
35
|
-
layers:
|
|
36
|
-
ogcEndpoint: OgcApiEndpoint = null
|
|
34
|
+
layers: any[] = []
|
|
37
35
|
errorMessage: string | null = null
|
|
36
|
+
selectedLayerTypes: { [key: string]: DropdownChoice['value'] } = {}
|
|
38
37
|
|
|
39
38
|
constructor(private changeDetectorRef: ChangeDetectorRef) {}
|
|
40
39
|
|
|
41
40
|
ngOnInit() {
|
|
42
41
|
this.urlChange.pipe(debounceTime(700)).subscribe(() => {
|
|
43
42
|
this.loadLayers()
|
|
44
|
-
this.changeDetectorRef.detectChanges() // manually trigger change detection
|
|
45
43
|
})
|
|
46
44
|
}
|
|
47
45
|
|
|
@@ -49,14 +47,13 @@ export class AddLayerFromOgcApiComponent implements OnInit {
|
|
|
49
47
|
this.errorMessage = null
|
|
50
48
|
try {
|
|
51
49
|
this.loading = true
|
|
52
|
-
if (this.ogcUrl.trim()
|
|
50
|
+
if (!this.ogcUrl.trim()) {
|
|
53
51
|
this.layers = []
|
|
54
52
|
return
|
|
55
53
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
this.layers = await this.ogcEndpoint.featureCollections
|
|
54
|
+
const ogcEndpoint = await new OgcApiEndpoint(this.ogcUrl)
|
|
55
|
+
this.layers = await ogcEndpoint.allCollections
|
|
56
|
+
this.setDefaultLayerTypes()
|
|
60
57
|
} catch (error) {
|
|
61
58
|
const err = error as Error
|
|
62
59
|
this.layers = []
|
|
@@ -67,14 +64,72 @@ export class AddLayerFromOgcApiComponent implements OnInit {
|
|
|
67
64
|
}
|
|
68
65
|
}
|
|
69
66
|
|
|
70
|
-
|
|
71
|
-
this.
|
|
67
|
+
setDefaultLayerTypes() {
|
|
68
|
+
this.layers.forEach((layer) => {
|
|
69
|
+
const choices = this.getLayerChoices(layer)
|
|
70
|
+
if (choices.length > 0) {
|
|
71
|
+
this.selectedLayerTypes[layer.name] = choices[0].value
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
}
|
|
72
75
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
getLayerChoices(layer: any) {
|
|
77
|
+
const choices = []
|
|
78
|
+
if (layer.hasRecords) {
|
|
79
|
+
choices.push({ label: 'Records', value: 'record' })
|
|
80
|
+
}
|
|
81
|
+
if (layer.hasFeatures) {
|
|
82
|
+
choices.push({ label: 'Features', value: 'features' })
|
|
83
|
+
}
|
|
84
|
+
if (layer.hasVectorTiles) {
|
|
85
|
+
choices.push({ label: 'Vector Tiles', value: 'vectorTiles' })
|
|
86
|
+
}
|
|
87
|
+
if (layer.hasMapTiles) {
|
|
88
|
+
choices.push({ label: 'Map Tiles', value: 'mapTiles' })
|
|
89
|
+
}
|
|
90
|
+
return choices
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
shouldDisplayLayer(layer: any) {
|
|
94
|
+
return (
|
|
95
|
+
layer.hasRecords ||
|
|
96
|
+
layer.hasFeatures ||
|
|
97
|
+
layer.hasVectorTiles ||
|
|
98
|
+
layer.hasMapTiles
|
|
99
|
+
)
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
onLayerTypeSelect(layerName: string, selectedType: any) {
|
|
103
|
+
this.selectedLayerTypes[layerName] = selectedType
|
|
104
|
+
? selectedType
|
|
105
|
+
: this.getLayerChoices(layerName)[0]?.value
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
async addLayer(layer: string, layerType: any) {
|
|
109
|
+
try {
|
|
110
|
+
const ogcEndpoint = await new OgcApiEndpoint(this.ogcUrl)
|
|
111
|
+
let layerUrl: string
|
|
112
|
+
|
|
113
|
+
if (layerType === 'vectorTiles') {
|
|
114
|
+
layerUrl = await ogcEndpoint.getVectorTilesetUrl(layer)
|
|
115
|
+
} else if (layerType === 'mapTiles') {
|
|
116
|
+
layerUrl = await ogcEndpoint.getMapTilesetUrl(layer)
|
|
117
|
+
} else {
|
|
118
|
+
layerUrl = await ogcEndpoint.getCollectionItemsUrl(layer, {
|
|
119
|
+
outputFormat: 'json',
|
|
120
|
+
})
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const layerToAdd: MapContextLayerModel = {
|
|
124
|
+
name: layer,
|
|
125
|
+
url: layerUrl,
|
|
126
|
+
type: MapContextLayerTypeEnum.OGCAPI,
|
|
127
|
+
layerType: layerType,
|
|
128
|
+
}
|
|
129
|
+
this.layerAdded.emit({ ...layerToAdd, title: layer })
|
|
130
|
+
} catch (error) {
|
|
131
|
+
const err = error as Error
|
|
132
|
+
console.error('Error adding layer:', err.message)
|
|
77
133
|
}
|
|
78
|
-
this.layerAdded.emit({ ...layerToAdd, title: layer })
|
|
79
134
|
}
|
|
80
135
|
}
|
|
@@ -20,29 +20,35 @@ export interface MapContextLayerWmsModel {
|
|
|
20
20
|
type: 'wms'
|
|
21
21
|
url: string
|
|
22
22
|
name: string
|
|
23
|
+
attributions?: string
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
export interface MapContextLayerWmtsModel {
|
|
26
27
|
type: 'wmts'
|
|
27
28
|
url: string
|
|
28
29
|
name: string
|
|
30
|
+
attributions?: string
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
interface MapContextLayerWfsModel {
|
|
32
34
|
type: 'wfs'
|
|
33
35
|
url: string
|
|
34
36
|
name: string
|
|
37
|
+
attributions?: string
|
|
35
38
|
}
|
|
36
39
|
|
|
37
40
|
export interface MapContextLayerOgcapiModel {
|
|
38
41
|
type: 'ogcapi'
|
|
39
42
|
url: string
|
|
40
43
|
name: string
|
|
44
|
+
layerType: 'feature' | 'vectorTiles' | 'mapTiles' | 'record'
|
|
45
|
+
attributions?: string
|
|
41
46
|
}
|
|
42
47
|
|
|
43
48
|
interface LayerXyzModel {
|
|
44
49
|
type: 'xyz'
|
|
45
50
|
name?: string
|
|
51
|
+
attributions?: string
|
|
46
52
|
}
|
|
47
53
|
interface LayerXyzModelWithUrl extends LayerXyzModel {
|
|
48
54
|
url: string
|
|
@@ -58,6 +64,7 @@ export type MapContextLayerXyzModel =
|
|
|
58
64
|
|
|
59
65
|
interface LayerGeojson {
|
|
60
66
|
type: 'geojson'
|
|
67
|
+
attributions?: string
|
|
61
68
|
}
|
|
62
69
|
interface LayerGeojsonWithUrl extends LayerGeojson {
|
|
63
70
|
url: string
|