geonetwork-ui 2.4.0-dev.cec60ff1 → 2.4.0-dev.e079151e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/libs/api/metadata-converter/src/index.mjs +2 -1
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/atomic-operations.mjs +2 -1
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.mjs +1 -1
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.mjs +5 -5
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/read-parts.mjs +30 -2
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/utils/geometry.mjs +31 -0
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +23 -1
- package/esm2022/libs/api/metadata-converter/src/lib/xml-utils.mjs +6 -1
- package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +12 -1
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/repository/records-repository.interface.mjs +1 -1
- package/esm2022/libs/data-access/gn4/src/openapi/api/records.api.service.mjs +2 -6
- package/esm2022/libs/feature/editor/src/lib/+state/editor.actions.mjs +2 -1
- package/esm2022/libs/feature/editor/src/lib/+state/editor.effects.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/+state/editor.facade.mjs +7 -2
- package/esm2022/libs/feature/editor/src/lib/+state/editor.models.mjs +1 -1
- package/esm2022/libs/feature/editor/src/lib/+state/editor.reducer.mjs +7 -3
- package/esm2022/libs/feature/editor/src/lib/+state/editor.selectors.mjs +16 -6
- package/esm2022/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.mjs +138 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.mjs +21 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +19 -9
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/index.mjs +1 -2
- package/esm2022/libs/feature/editor/src/lib/components/record-form/record-form.component.mjs +12 -7
- package/esm2022/libs/feature/editor/src/lib/expressions.mjs +1 -1
- package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +153 -60
- package/esm2022/libs/feature/editor/src/lib/models/editor-config.model.mjs +2 -0
- package/esm2022/libs/feature/editor/src/lib/models/index.mjs +2 -1
- package/esm2022/libs/feature/editor/src/lib/services/editor.service.mjs +4 -3
- package/esm2022/libs/feature/map/src/lib/utils/map-utils.service.mjs +3 -4
- package/esm2022/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.mjs +42 -23
- package/esm2022/libs/feature/record/src/lib/data-view-share/data-view-share.component.mjs +13 -5
- package/esm2022/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.mjs +49 -15
- package/esm2022/libs/feature/search/src/lib/results-table/results-table-container.component.mjs +9 -3
- package/esm2022/libs/ui/elements/src/lib/api-card/api-card.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +5 -11
- package/esm2022/libs/ui/elements/src/lib/metadata-quality-item/metadata-quality-item.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +5 -2
- package/esm2022/libs/ui/elements/src/lib/user-preview/user-preview.component.mjs +3 -3
- package/esm2022/libs/ui/inputs/src/lib/image-input/image-input.component.mjs +11 -5
- package/esm2022/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.mjs +29 -0
- package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +15 -7
- package/esm2022/libs/ui/widgets/src/index.mjs +2 -1
- package/esm2022/libs/ui/widgets/src/lib/popover/popover.component.mjs +68 -0
- package/esm2022/translations/de.json +58 -32
- package/esm2022/translations/en.json +34 -8
- package/esm2022/translations/es.json +31 -5
- package/esm2022/translations/fr.json +34 -8
- package/esm2022/translations/it.json +32 -6
- package/esm2022/translations/nl.json +31 -5
- package/esm2022/translations/pt.json +31 -5
- package/fesm2022/geonetwork-ui.mjs +937 -236
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/index.d.ts +1 -0
- package/libs/api/metadata-converter/src/index.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/atomic-operations.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts +1 -0
- package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts +8 -1
- package/libs/api/metadata-converter/src/lib/iso19139/read-parts.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/utils/geometry.d.ts +5 -0
- package/libs/api/metadata-converter/src/lib/iso19139/utils/geometry.d.ts.map +1 -0
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts +3 -1
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/xml-utils.d.ts +1 -0
- package/libs/api/metadata-converter/src/lib/xml-utils.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +1 -0
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts +2 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts +9 -0
- package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
- package/libs/data-access/gn4/src/openapi/api/records.api.service.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.actions.d.ts +5 -0
- package/libs/feature/editor/src/lib/+state/editor.actions.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.facade.d.ts +4 -4
- package/libs/feature/editor/src/lib/+state/editor.facade.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.models.d.ts +8 -0
- package/libs/feature/editor/src/lib/+state/editor.models.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.reducer.d.ts +4 -3
- package/libs/feature/editor/src/lib/+state/editor.reducer.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.selectors.d.ts +4 -8
- package/libs/feature/editor/src/lib/+state/editor.selectors.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.d.ts +27 -0
- package/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.d.ts +11 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts +6 -2
- 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/components/record-form/record-form.component.d.ts +5 -7
- package/libs/feature/editor/src/lib/components/record-form/record-form.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/expressions.d.ts +1 -1
- package/libs/feature/editor/src/lib/expressions.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/fields.config.d.ts +39 -2
- package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/models/editor-config.model.d.ts +36 -0
- package/libs/feature/editor/src/lib/models/editor-config.model.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/models/index.d.ts +1 -0
- package/libs/feature/editor/src/lib/models/index.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/services/editor.service.d.ts +2 -2
- package/libs/feature/editor/src/lib/services/editor.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/data-view-permalink/data-view-permalink.component.d.ts +4 -1
- package/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/data-view-share/data-view-share.component.d.ts +4 -1
- package/libs/feature/record/src/lib/data-view-share/data-view-share.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.d.ts +4 -1
- package/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/results-table/results-table-container.component.d.ts +3 -1
- package/libs/feature/search/src/lib/results-table/results-table-container.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/metadata-quality/metadata-quality.component.d.ts +0 -3
- package/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts +1 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts +7 -6
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts +4 -2
- package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.d.ts +11 -0
- package/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.d.ts.map +1 -0
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +4 -2
- package/libs/ui/search/src/lib/results-table/results-table.component.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/popover/popover.component.d.ts +19 -0
- package/libs/ui/widgets/src/lib/popover/popover.component.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/libs/api/metadata-converter/src/index.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/geo2france.records.ts +5 -1
- package/src/libs/api/metadata-converter/src/lib/fixtures/geocat-ch.records.ts +37 -12
- package/src/libs/api/metadata-converter/src/lib/fixtures/metawal.records.ts +5 -1
- package/src/libs/api/metadata-converter/src/lib/gn4/atomic-operations.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +1 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +4 -2
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +72 -2
- package/src/libs/api/metadata-converter/src/lib/iso19139/utils/geometry.ts +39 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +70 -1
- package/src/libs/api/metadata-converter/src/lib/xml-utils.ts +8 -0
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +20 -0
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +2 -1
- package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +12 -0
- package/src/libs/common/fixtures/src/index.ts +2 -0
- package/src/libs/common/fixtures/src/lib/editor/editor.fixtures.ts +156 -0
- package/src/libs/common/fixtures/src/lib/editor/index.ts +1 -0
- package/src/libs/data-access/gn4/src/openapi/api/records.api.service.ts +1 -5
- package/src/libs/data-access/gn4/src/spec.yaml +0 -8
- package/src/libs/feature/editor/src/lib/+state/editor.actions.ts +5 -0
- package/src/libs/feature/editor/src/lib/+state/editor.effects.ts +2 -2
- package/src/libs/feature/editor/src/lib/+state/editor.facade.ts +9 -1
- package/src/libs/feature/editor/src/lib/+state/editor.models.ts +11 -0
- package/src/libs/feature/editor/src/lib/+state/editor.reducer.ts +11 -5
- package/src/libs/feature/editor/src/lib/+state/editor.selectors.ts +22 -8
- package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.html +3 -1
- package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.ts +117 -21
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.html +5 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-overviews/form-field-overviews.component.ts +22 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +15 -9
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +15 -2
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/index.ts +0 -1
- package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.html +51 -11
- package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.ts +16 -8
- package/src/libs/feature/editor/src/lib/expressions.ts +1 -1
- package/src/libs/feature/editor/src/lib/fields.config.ts +186 -61
- package/src/libs/feature/editor/src/lib/models/editor-config.model.ts +53 -0
- package/src/libs/feature/editor/src/lib/models/index.ts +1 -0
- package/src/libs/feature/editor/src/lib/services/editor.service.ts +8 -4
- package/src/libs/feature/map/src/lib/utils/map-utils.service.ts +2 -3
- package/src/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.ts +36 -19
- package/src/libs/feature/record/src/lib/data-view-share/data-view-share.component.html +6 -2
- package/src/libs/feature/record/src/lib/data-view-share/data-view-share.component.ts +11 -0
- package/src/libs/feature/record/src/lib/data-view-web-component/data-view-web-component.component.ts +59 -12
- package/src/libs/feature/search/src/lib/results-table/results-table-container.component.html +1 -0
- package/src/libs/feature/search/src/lib/results-table/results-table-container.component.ts +5 -0
- package/src/libs/ui/elements/src/lib/api-card/api-card.component.html +29 -29
- package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +14 -20
- package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.ts +0 -10
- package/src/libs/ui/elements/src/lib/metadata-quality-item/metadata-quality-item.component.html +1 -1
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +2 -1
- package/src/libs/ui/elements/src/lib/user-preview/user-preview.component.html +1 -1
- package/src/libs/ui/inputs/src/lib/image-input/image-input.component.html +1 -1
- package/src/libs/ui/inputs/src/lib/image-input/image-input.component.ts +7 -2
- package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.css +31 -0
- package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.html +15 -0
- package/src/libs/ui/inputs/src/lib/switch-toggle/switch-toggle.component.ts +38 -0
- package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.css +0 -0
- package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.html +17 -0
- package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.ts +22 -0
- package/src/libs/ui/search/src/lib/results-table/results-table.component.html +9 -0
- package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +26 -12
- package/src/libs/ui/widgets/src/index.ts +1 -0
- package/src/libs/ui/widgets/src/lib/popover/popover.component.css +0 -0
- package/src/libs/ui/widgets/src/lib/popover/popover.component.html +3 -0
- package/src/libs/ui/widgets/src/lib/popover/popover.component.ts +85 -0
- package/tailwind.base.css +2 -1
- package/translations/de.json +58 -32
- package/translations/en.json +34 -8
- package/translations/es.json +31 -5
- package/translations/fr.json +34 -8
- package/translations/it.json +32 -6
- package/translations/nl.json +31 -5
- package/translations/pt.json +31 -5
- package/translations/sk.json +32 -6
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.mjs +0 -2
- package/esm2022/libs/feature/editor/src/lib/models/fields.model.mjs +0 -2
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.d.ts +0 -26
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.d.ts.map +0 -1
- package/libs/feature/editor/src/lib/models/fields.model.d.ts +0 -15
- package/libs/feature/editor/src/lib/models/fields.model.d.ts.map +0 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.ts +0 -43
- package/src/libs/feature/editor/src/lib/models/fields.model.ts +0 -29
package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts
CHANGED
|
@@ -25,10 +25,13 @@ import { FormFieldObjectComponent } from './form-field-object/form-field-object.
|
|
|
25
25
|
import { FormFieldRichComponent } from './form-field-rich/form-field-rich.component'
|
|
26
26
|
import { FormFieldSimpleComponent } from './form-field-simple/form-field-simple.component'
|
|
27
27
|
import { FormFieldSpatialExtentComponent } from './form-field-spatial-extent/form-field-spatial-extent.component'
|
|
28
|
-
import { FormFieldConfig } from './form-field.model'
|
|
29
28
|
import { FormFieldUpdateFrequencyComponent } from './form-field-update-frequency/form-field-update-frequency.component'
|
|
30
29
|
import { CatalogRecordKeys } from '../../../../../../../../libs/common/domain/src/lib/model/record'
|
|
31
30
|
import { FormFieldKeywordsComponent } from './form-field-keywords/form-field-keywords.component'
|
|
31
|
+
import { FormFieldOverviewsComponent } from './form-field-overviews/form-field-overviews.component'
|
|
32
|
+
import { map, take } from 'rxjs/operators'
|
|
33
|
+
import { EditorFacade } from '../../../+state/editor.facade'
|
|
34
|
+
import { FormFieldConfig } from '../../../models'
|
|
32
35
|
|
|
33
36
|
@Component({
|
|
34
37
|
selector: 'gn-ui-form-field',
|
|
@@ -55,6 +58,7 @@ import { FormFieldKeywordsComponent } from './form-field-keywords/form-field-key
|
|
|
55
58
|
FormFieldArrayComponent,
|
|
56
59
|
FormFieldKeywordsComponent,
|
|
57
60
|
TranslateModule,
|
|
61
|
+
FormFieldOverviewsComponent,
|
|
58
62
|
],
|
|
59
63
|
})
|
|
60
64
|
export class FormFieldComponent {
|
|
@@ -65,13 +69,19 @@ export class FormFieldComponent {
|
|
|
65
69
|
emitEvent: false,
|
|
66
70
|
})
|
|
67
71
|
}
|
|
72
|
+
|
|
68
73
|
@Output() valueChange: Observable<unknown>
|
|
69
74
|
|
|
70
75
|
@ViewChild('titleInput') titleInput: ElementRef
|
|
71
76
|
|
|
77
|
+
metadataUuid$ = this.facade.record$.pipe(
|
|
78
|
+
take(1),
|
|
79
|
+
map((record) => record.uniqueIdentifier)
|
|
80
|
+
)
|
|
81
|
+
|
|
72
82
|
formControl = new FormControl()
|
|
73
83
|
|
|
74
|
-
constructor() {
|
|
84
|
+
constructor(private facade: EditorFacade) {
|
|
75
85
|
this.valueChange = this.formControl.valueChanges
|
|
76
86
|
}
|
|
77
87
|
|
|
@@ -100,6 +110,9 @@ export class FormFieldComponent {
|
|
|
100
110
|
get isSpatialExtentField() {
|
|
101
111
|
return this.model === 'spatialExtents'
|
|
102
112
|
}
|
|
113
|
+
get isGraphicOverview() {
|
|
114
|
+
return this.model === 'overviews'
|
|
115
|
+
}
|
|
103
116
|
get isSimpleField() {
|
|
104
117
|
return this.model === 'uniqueIdentifier' || this.model === 'recordUpdated'
|
|
105
118
|
}
|
|
@@ -9,4 +9,3 @@ export * from './form-field-object/form-field-object.component'
|
|
|
9
9
|
export * from './form-field-array/form-field-array.component'
|
|
10
10
|
export * from './form-field-spatial-extent/form-field-spatial-extent.component'
|
|
11
11
|
export * from './form-field.component'
|
|
12
|
-
export * from './form-field.model'
|
|
@@ -1,11 +1,51 @@
|
|
|
1
|
-
<
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
<ng-container>
|
|
2
|
+
<div class="flex flex-col gap-6 p-8">
|
|
3
|
+
<ng-container
|
|
4
|
+
*ngFor="
|
|
5
|
+
let section of facade.currentSections$ | async;
|
|
6
|
+
trackBy: sectionTracker
|
|
7
|
+
"
|
|
8
|
+
>
|
|
9
|
+
<ng-container *ngIf="!section.hidden">
|
|
10
|
+
<div class="flex flex-col gap-8 border p-8 rounded-[8px] shadow">
|
|
11
|
+
<div
|
|
12
|
+
class="flex flex-col gap-2"
|
|
13
|
+
[ngClass]="section.labelKey ? 'mb-4' : 'hidden'"
|
|
14
|
+
>
|
|
15
|
+
<div
|
|
16
|
+
*ngIf="section.labelKey"
|
|
17
|
+
class="text-2xl font-petrona text-secondary"
|
|
18
|
+
translate
|
|
19
|
+
>
|
|
20
|
+
{{ section.labelKey }}
|
|
21
|
+
</div>
|
|
22
|
+
<div
|
|
23
|
+
*ngIf="section.descriptionKey"
|
|
24
|
+
class="text-secondary-lightest"
|
|
25
|
+
translate
|
|
26
|
+
>
|
|
27
|
+
{{ section.descriptionKey }}
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
<ng-container
|
|
31
|
+
*ngFor="
|
|
32
|
+
let field of section.fieldsWithValues;
|
|
33
|
+
trackBy: fieldTracker
|
|
34
|
+
"
|
|
35
|
+
>
|
|
36
|
+
<ng-container *ngIf="!field.config.hidden">
|
|
37
|
+
<gn-ui-form-field
|
|
38
|
+
[model]="field.config.model!"
|
|
39
|
+
[config]="field.config.formFieldConfig"
|
|
40
|
+
[value]="field.value"
|
|
41
|
+
(valueChange)="
|
|
42
|
+
handleFieldValueChange(field.config.model!, $event)
|
|
43
|
+
"
|
|
44
|
+
></gn-ui-form-field>
|
|
45
|
+
</ng-container>
|
|
46
|
+
</ng-container>
|
|
47
|
+
</div>
|
|
48
|
+
</ng-container>
|
|
49
|
+
</ng-container>
|
|
50
|
+
</div>
|
|
51
|
+
</ng-container>
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common'
|
|
2
2
|
import { ChangeDetectionStrategy, Component } from '@angular/core'
|
|
3
3
|
import { EditorFacade } from '../../+state/editor.facade'
|
|
4
|
-
import {
|
|
4
|
+
import { EditorFieldValue } from '../../models'
|
|
5
5
|
import { FormFieldComponent } from './form-field'
|
|
6
|
+
import { TranslateModule } from '@ngx-translate/core'
|
|
7
|
+
import {
|
|
8
|
+
EditorFieldWithValue,
|
|
9
|
+
EditorSectionWithValues,
|
|
10
|
+
} from '../../+state/editor.models'
|
|
6
11
|
|
|
7
12
|
@Component({
|
|
8
13
|
selector: 'gn-ui-record-form',
|
|
@@ -10,21 +15,24 @@ import { FormFieldComponent } from './form-field'
|
|
|
10
15
|
styleUrls: ['./record-form.component.css'],
|
|
11
16
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12
17
|
standalone: true,
|
|
13
|
-
imports: [CommonModule, FormFieldComponent],
|
|
18
|
+
imports: [CommonModule, FormFieldComponent, TranslateModule],
|
|
14
19
|
})
|
|
15
20
|
export class RecordFormComponent {
|
|
16
|
-
fields$ = this.facade.recordFields$
|
|
17
|
-
|
|
18
21
|
constructor(public facade: EditorFacade) {}
|
|
19
22
|
|
|
20
|
-
handleFieldValueChange(
|
|
21
|
-
if (!
|
|
23
|
+
handleFieldValueChange(model: string, newValue: EditorFieldValue) {
|
|
24
|
+
if (!model) {
|
|
22
25
|
return
|
|
23
26
|
}
|
|
24
|
-
|
|
27
|
+
console.log(newValue)
|
|
28
|
+
this.facade.updateRecordField(model, newValue)
|
|
25
29
|
}
|
|
26
30
|
|
|
27
|
-
fieldTracker(index: number, field:
|
|
31
|
+
fieldTracker(index: number, field: EditorFieldWithValue): any {
|
|
28
32
|
return field.config.model
|
|
29
33
|
}
|
|
34
|
+
|
|
35
|
+
sectionTracker(index: number, section: EditorSectionWithValues): any {
|
|
36
|
+
return section.labelKey
|
|
37
|
+
}
|
|
30
38
|
}
|
|
@@ -1,71 +1,196 @@
|
|
|
1
1
|
import { marker } from '@biesbjerg/ngx-translate-extract-marker'
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import {
|
|
3
|
+
EditorConfig,
|
|
4
|
+
EditorField,
|
|
5
|
+
EditorSection,
|
|
6
|
+
} from './models/editor-config.model'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* This file contains the configuration of the fields that will be displayed in the editor.
|
|
10
|
+
* To add a new field, you need to create a new EditorField object in the fields part of this file.
|
|
11
|
+
* Then add it to the corresponding section in the sections part of this file.
|
|
12
|
+
* Finally, add the section to the corresponding page in the pages part of this file.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/************************************************************
|
|
16
|
+
*************** FIELDS *****************
|
|
17
|
+
************************************************************
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
export const RECORD_LICENSE_FIELD: EditorField = {
|
|
21
|
+
model: 'licenses',
|
|
22
|
+
formFieldConfig: {
|
|
23
|
+
labelKey: marker('editor.record.form.field.license'),
|
|
11
24
|
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const RECORD_KEYWORDS_FIELD: EditorField = {
|
|
28
|
+
model: 'keywords',
|
|
29
|
+
formFieldConfig: {
|
|
30
|
+
labelKey: marker('editor.record.form.field.keywords'),
|
|
18
31
|
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const RECORD_UNIQUE_IDENTIFIER_FIELD: EditorField = {
|
|
35
|
+
model: 'uniqueIdentifier',
|
|
36
|
+
formFieldConfig: {
|
|
37
|
+
labelKey: marker('editor.record.form.field.uniqueIdentifier'),
|
|
38
|
+
locked: true,
|
|
26
39
|
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
onSaveProcess: '${dateNow()}',
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const RECORD_RESOURCE_UPDATED_FIELD: EditorField = {
|
|
43
|
+
model: 'resourceUpdated',
|
|
44
|
+
formFieldConfig: {
|
|
45
|
+
labelKey: marker('editor.record.form.field.resourceUpdated'),
|
|
35
46
|
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const RECORD_UPDATED_FIELD: EditorField = {
|
|
50
|
+
model: 'recordUpdated',
|
|
51
|
+
formFieldConfig: {
|
|
52
|
+
labelKey: marker('editor.record.form.field.recordUpdated'),
|
|
53
|
+
locked: true,
|
|
42
54
|
},
|
|
43
|
-
{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
55
|
+
onSaveProcess: '${dateNow()}',
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export const RECORD_UPDATE_FREQUENCY_FIELD: EditorField = {
|
|
59
|
+
model: 'updateFrequency',
|
|
60
|
+
formFieldConfig: {
|
|
61
|
+
labelKey: marker('editor.record.form.field.updateFrequency'),
|
|
49
62
|
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export const RECORD_TEMPORAL_EXTENTS_FIELD: EditorField = {
|
|
66
|
+
model: 'temporalExtents',
|
|
67
|
+
formFieldConfig: {
|
|
68
|
+
labelKey: marker('editor.record.form.field.temporalExtents'),
|
|
56
69
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export const RECORD_TITLE_FIELD: EditorField = {
|
|
73
|
+
model: 'title',
|
|
74
|
+
formFieldConfig: {
|
|
75
|
+
labelKey: marker('editor.record.form.field.title'),
|
|
63
76
|
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export const RECORD_ABSTRACT_FIELD: EditorField = {
|
|
80
|
+
model: 'abstract',
|
|
81
|
+
formFieldConfig: {
|
|
82
|
+
labelKey: marker('editor.record.form.field.abstract'),
|
|
70
83
|
},
|
|
71
|
-
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export const RECORD_GRAPHICAL_OVERVIEW_FIELD: EditorField = {
|
|
87
|
+
model: 'overviews',
|
|
88
|
+
formFieldConfig: {
|
|
89
|
+
labelKey: marker('editor.record.form.field.overviews'),
|
|
90
|
+
},
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/************************************************************
|
|
94
|
+
*************** SECTIONS *****************
|
|
95
|
+
************************************************************
|
|
96
|
+
*/
|
|
97
|
+
|
|
98
|
+
export const TITLE_SECTION: EditorSection = {
|
|
99
|
+
hidden: false,
|
|
100
|
+
fields: [
|
|
101
|
+
RECORD_TITLE_FIELD,
|
|
102
|
+
RECORD_ABSTRACT_FIELD,
|
|
103
|
+
RECORD_GRAPHICAL_OVERVIEW_FIELD,
|
|
104
|
+
],
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export const ABOUT_SECTION: EditorSection = {
|
|
108
|
+
labelKey: marker('editor.record.form.section.about.label'),
|
|
109
|
+
descriptionKey: marker('editor.record.form.section.about.description'),
|
|
110
|
+
hidden: false,
|
|
111
|
+
fields: [
|
|
112
|
+
RECORD_UNIQUE_IDENTIFIER_FIELD,
|
|
113
|
+
RECORD_RESOURCE_UPDATED_FIELD,
|
|
114
|
+
RECORD_UPDATED_FIELD,
|
|
115
|
+
RECORD_UPDATE_FREQUENCY_FIELD,
|
|
116
|
+
RECORD_TEMPORAL_EXTENTS_FIELD,
|
|
117
|
+
],
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export const GEOGRAPHICAL_COVERAGE_SECTION: EditorSection = {
|
|
121
|
+
labelKey: marker('editor.record.form.section.geographicalCoverage.label'),
|
|
122
|
+
hidden: false,
|
|
123
|
+
fields: [],
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export const ASSOCIATED_RESOURCES_SECTION: EditorSection = {
|
|
127
|
+
labelKey: marker('editor.record.form.section.associatedResources.label'),
|
|
128
|
+
descriptionKey: marker(
|
|
129
|
+
'editor.record.form.section.associatedResources.description'
|
|
130
|
+
),
|
|
131
|
+
hidden: false,
|
|
132
|
+
fields: [],
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export const ANNEXES_SECTION: EditorSection = {
|
|
136
|
+
labelKey: marker('editor.record.form.section.annexes.label'),
|
|
137
|
+
hidden: false,
|
|
138
|
+
fields: [],
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export const CLASSIFICATION_SECTION: EditorSection = {
|
|
142
|
+
labelKey: marker('editor.record.form.section.classification.label'),
|
|
143
|
+
descriptionKey: marker(
|
|
144
|
+
'editor.record.form.section.classification.description'
|
|
145
|
+
),
|
|
146
|
+
hidden: false,
|
|
147
|
+
fields: [RECORD_KEYWORDS_FIELD],
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export const USE_AND_ACCESS_CONDITIONS_SECTION: EditorSection = {
|
|
151
|
+
labelKey: marker('editor.record.form.section.useAndAccessConditions.label'),
|
|
152
|
+
hidden: false,
|
|
153
|
+
fields: [RECORD_LICENSE_FIELD],
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export const DATA_MANAGERS_SECTION: EditorSection = {
|
|
157
|
+
labelKey: marker('editor.record.form.section.dataManagers.label'),
|
|
158
|
+
descriptionKey: marker('editor.record.form.section.dataManagers.description'),
|
|
159
|
+
hidden: false,
|
|
160
|
+
fields: [],
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export const DATA_POINT_OF_CONTACT_SECTION: EditorSection = {
|
|
164
|
+
labelKey: marker('editor.record.form.section.dataPointOfContact.label'),
|
|
165
|
+
descriptionKey: marker(
|
|
166
|
+
'editor.record.form.section.dataPointOfContact.description'
|
|
167
|
+
),
|
|
168
|
+
hidden: false,
|
|
169
|
+
fields: [],
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/************************************************************
|
|
173
|
+
*************** PAGES *****************
|
|
174
|
+
************************************************************
|
|
175
|
+
*/
|
|
176
|
+
export const DEFAULT_CONFIGURATION: EditorConfig = {
|
|
177
|
+
pages: [
|
|
178
|
+
{
|
|
179
|
+
labelKey: marker('editor.record.form.page.description'),
|
|
180
|
+
sections: [TITLE_SECTION, ABOUT_SECTION, GEOGRAPHICAL_COVERAGE_SECTION],
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
labelKey: marker('editor.record.form.page.ressources'),
|
|
184
|
+
sections: [ASSOCIATED_RESOURCES_SECTION, ANNEXES_SECTION],
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
labelKey: marker('editor.record.form.page.accessAndContact'),
|
|
188
|
+
sections: [
|
|
189
|
+
CLASSIFICATION_SECTION,
|
|
190
|
+
USE_AND_ACCESS_CONDITIONS_SECTION,
|
|
191
|
+
DATA_MANAGERS_SECTION,
|
|
192
|
+
DATA_POINT_OF_CONTACT_SECTION,
|
|
193
|
+
],
|
|
194
|
+
},
|
|
195
|
+
],
|
|
196
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { CatalogRecordKeys } from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
2
|
+
|
|
3
|
+
// Expressions should be enclosed in `${}` to be recognized as such
|
|
4
|
+
// eg. ${dateNow()}
|
|
5
|
+
export type EditorFieldExpression = `$\{${string}}`
|
|
6
|
+
|
|
7
|
+
export type EditorFieldValue = string | number | boolean | unknown
|
|
8
|
+
|
|
9
|
+
export interface FormFieldConfig {
|
|
10
|
+
labelKey?: string
|
|
11
|
+
hintKey?: string
|
|
12
|
+
tooltipKey?: string
|
|
13
|
+
required?: boolean
|
|
14
|
+
locked?: boolean
|
|
15
|
+
invalid?: boolean
|
|
16
|
+
invalidHintKey?: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface EditorField {
|
|
20
|
+
// configuration of the form field used as presentation
|
|
21
|
+
formFieldConfig: FormFieldConfig
|
|
22
|
+
|
|
23
|
+
// name of the target field in the record; will not change the record directly if not defined
|
|
24
|
+
model?: CatalogRecordKeys
|
|
25
|
+
|
|
26
|
+
// a hidden field won't show but can still be used to modify the record
|
|
27
|
+
// FIXME: currently this is redundant with an absence of formFieldConfig but necessary for clarity
|
|
28
|
+
hidden?: boolean
|
|
29
|
+
|
|
30
|
+
// the result of this expression will replace the field value on save
|
|
31
|
+
onSaveProcess?: EditorFieldExpression
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface EditorSection {
|
|
35
|
+
labelKey?: string
|
|
36
|
+
descriptionKey?: string
|
|
37
|
+
hidden: boolean
|
|
38
|
+
fields: EditorField[]
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface EditorFieldPage {
|
|
42
|
+
labelKey?: string
|
|
43
|
+
sections: EditorSection[]
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface EditorConfig {
|
|
47
|
+
pages: EditorFieldPage[]
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface EditorFieldState {
|
|
51
|
+
model: string
|
|
52
|
+
value: EditorFieldValue
|
|
53
|
+
}
|
|
@@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'
|
|
|
2
2
|
import { Observable, switchMap } from 'rxjs'
|
|
3
3
|
import { map, tap } from 'rxjs/operators'
|
|
4
4
|
import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
5
|
-
import {
|
|
5
|
+
import { EditorConfig } from '../models/'
|
|
6
6
|
import { evaluate } from '../expressions'
|
|
7
7
|
import { RecordsRepositoryInterface } from '../../../../../../libs/common/domain/src/lib/repository/records-repository.interface'
|
|
8
8
|
|
|
@@ -15,17 +15,21 @@ export class EditorService {
|
|
|
15
15
|
// returns the record as it was when saved, alongside its source
|
|
16
16
|
saveRecord(
|
|
17
17
|
record: CatalogRecord,
|
|
18
|
-
fieldsConfig:
|
|
18
|
+
fieldsConfig: EditorConfig,
|
|
19
19
|
generateNewUniqueIdentifier = false
|
|
20
20
|
): Observable<[CatalogRecord, string]> {
|
|
21
21
|
const savedRecord = { ...record }
|
|
22
22
|
|
|
23
|
+
const fields = fieldsConfig.pages.flatMap((page) =>
|
|
24
|
+
page.sections.flatMap((section) => section.fields)
|
|
25
|
+
)
|
|
26
|
+
|
|
23
27
|
// run onSave processes
|
|
24
|
-
for (const field of
|
|
28
|
+
for (const field of fields) {
|
|
25
29
|
if (field.onSaveProcess && field.model) {
|
|
26
30
|
const evaluator = evaluate(field.onSaveProcess)
|
|
27
31
|
savedRecord[field.model] = evaluator({
|
|
28
|
-
|
|
32
|
+
model: field.model,
|
|
29
33
|
value: record[field.model],
|
|
30
34
|
})
|
|
31
35
|
}
|
|
@@ -220,11 +220,10 @@ export class MapUtilsService {
|
|
|
220
220
|
if (!('spatialExtents' in record) || record.spatialExtents.length === 0) {
|
|
221
221
|
return null
|
|
222
222
|
}
|
|
223
|
-
//
|
|
223
|
+
// extend all the spatial extents bbox into an including bbox
|
|
224
224
|
const totalExtent = record.spatialExtents.reduce(
|
|
225
225
|
(prev, curr) => {
|
|
226
|
-
|
|
227
|
-
return extend(prev, geom.getExtent())
|
|
226
|
+
return extend(prev, curr.bbox)
|
|
228
227
|
},
|
|
229
228
|
[Infinity, Infinity, -Infinity, -Infinity]
|
|
230
229
|
)
|
package/src/libs/feature/record/src/lib/data-view-permalink/data-view-permalink.component.ts
CHANGED
|
@@ -3,10 +3,11 @@ import {
|
|
|
3
3
|
Component,
|
|
4
4
|
Inject,
|
|
5
5
|
InjectionToken,
|
|
6
|
+
Input,
|
|
6
7
|
Optional,
|
|
7
8
|
} from '@angular/core'
|
|
8
9
|
import { Configuration } from '../../../../../../libs/data-access/gn4/src'
|
|
9
|
-
import { combineLatest, map } from 'rxjs'
|
|
10
|
+
import { BehaviorSubject, combineLatest, map } from 'rxjs'
|
|
10
11
|
import { MdViewFacade } from '../state'
|
|
11
12
|
import { GN_UI_VERSION } from '../gn-ui-version.token'
|
|
12
13
|
|
|
@@ -21,29 +22,45 @@ export const WEB_COMPONENT_EMBEDDER_URL = new InjectionToken<string>(
|
|
|
21
22
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
22
23
|
})
|
|
23
24
|
export class DataViewPermalinkComponent {
|
|
25
|
+
viewType$ = new BehaviorSubject<string>('map')
|
|
26
|
+
@Input()
|
|
27
|
+
set viewType(value: string) {
|
|
28
|
+
this.viewType$.next(value)
|
|
29
|
+
}
|
|
30
|
+
|
|
24
31
|
permalinkUrl$ = combineLatest([
|
|
32
|
+
this.viewType$,
|
|
25
33
|
this.facade.chartConfig$,
|
|
26
34
|
this.facade.metadata$,
|
|
27
35
|
]).pipe(
|
|
28
|
-
map(([config, metadata]) => {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
map(([viewType, config, metadata]) => {
|
|
37
|
+
const url = new URL(`${this.wcEmbedderBaseUrl}`, window.location.origin)
|
|
38
|
+
url.searchParams.set('v', `${this.version}`)
|
|
39
|
+
if (viewType === 'chart') {
|
|
40
|
+
if (config) {
|
|
41
|
+
const { aggregation, xProperty, yProperty, chartType } = config
|
|
42
|
+
url.searchParams.append('e', `gn-dataset-view-chart`)
|
|
43
|
+
url.searchParams.append('a', `aggregation=${aggregation}`)
|
|
44
|
+
url.searchParams.append('a', `x-property=${xProperty}`)
|
|
45
|
+
url.searchParams.append('a', `y-property=${yProperty}`)
|
|
46
|
+
url.searchParams.append('a', `chart-type=${chartType}`)
|
|
47
|
+
} else {
|
|
48
|
+
return ''
|
|
49
|
+
}
|
|
50
|
+
} else if (viewType === 'table') {
|
|
51
|
+
// table
|
|
52
|
+
url.searchParams.append('e', `gn-dataset-view-table`)
|
|
53
|
+
} else {
|
|
54
|
+
// map
|
|
55
|
+
url.searchParams.append('e', `gn-dataset-view-map`)
|
|
45
56
|
}
|
|
46
|
-
|
|
57
|
+
url.searchParams.append('a', `api-url=${this.config.basePath}`)
|
|
58
|
+
url.searchParams.append('a', `dataset-id=${metadata.uniqueIdentifier}`)
|
|
59
|
+
url.searchParams.append('a', `primary-color=#0f4395`)
|
|
60
|
+
url.searchParams.append('a', `secondary-color=#8bc832`)
|
|
61
|
+
url.searchParams.append('a', `main-color=#555`)
|
|
62
|
+
url.searchParams.append('a', `background-color=#fdfbff`)
|
|
63
|
+
return url.toString()
|
|
47
64
|
})
|
|
48
65
|
)
|
|
49
66
|
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
<ng-template mat-tab-label>
|
|
11
11
|
<span class="tab-header-label-gray" translate>share.tab.permalink</span>
|
|
12
12
|
</ng-template>
|
|
13
|
-
<gn-ui-data-view-permalink
|
|
13
|
+
<gn-ui-data-view-permalink
|
|
14
|
+
[viewType]="viewType"
|
|
15
|
+
></gn-ui-data-view-permalink>
|
|
14
16
|
</mat-tab>
|
|
15
17
|
<mat-tab>
|
|
16
18
|
<ng-template mat-tab-label>
|
|
@@ -24,7 +26,9 @@
|
|
|
24
26
|
>share.tab.webComponent</span
|
|
25
27
|
>
|
|
26
28
|
</ng-template>
|
|
27
|
-
<gn-ui-data-view-web-component
|
|
29
|
+
<gn-ui-data-view-web-component
|
|
30
|
+
[viewType]="viewType"
|
|
31
|
+
></gn-ui-data-view-web-component>
|
|
28
32
|
</mat-tab>
|
|
29
33
|
</mat-tab-group>
|
|
30
34
|
</div>
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
ChangeDetectionStrategy,
|
|
3
3
|
Component,
|
|
4
4
|
Inject,
|
|
5
|
+
Input,
|
|
5
6
|
Optional,
|
|
6
7
|
} from '@angular/core'
|
|
7
8
|
import { WEB_COMPONENT_EMBEDDER_URL } from '../data-view-permalink/data-view-permalink.component'
|
|
@@ -13,6 +14,16 @@ import { WEB_COMPONENT_EMBEDDER_URL } from '../data-view-permalink/data-view-per
|
|
|
13
14
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
14
15
|
})
|
|
15
16
|
export class DataViewShareComponent {
|
|
17
|
+
private _viewType: string
|
|
18
|
+
|
|
19
|
+
@Input()
|
|
20
|
+
set viewType(value: string) {
|
|
21
|
+
this._viewType = value
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
get viewType(): string {
|
|
25
|
+
return this._viewType
|
|
26
|
+
}
|
|
16
27
|
constructor(
|
|
17
28
|
@Optional()
|
|
18
29
|
@Inject(WEB_COMPONENT_EMBEDDER_URL)
|