geonetwork-ui 2.3.0-dev.376e0e90 → 2.3.0-dev.6083baae
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/index.mjs +2 -1
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +5 -1
- package/esm2022/libs/data-access/gn4/src/openapi/api/records.api.service.mjs +35 -7
- package/esm2022/libs/data-access/gn4/src/openapi/model/models.mjs +1 -2
- package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +2 -2
- package/esm2022/libs/feature/editor/src/index.mjs +2 -2
- package/esm2022/libs/feature/editor/src/lib/+state/editor.facade.mjs +6 -2
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-array/form-field-array.component.mjs +11 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-file/form-field-file.component.mjs +28 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-object/form-field-object.component.mjs +11 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.mjs +45 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-simple/form-field-simple.component.mjs +50 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +11 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extent/form-field-temporal-extent.component.mjs +11 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.mjs +93 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.mjs +2 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/index.mjs +10 -0
- package/esm2022/libs/feature/editor/src/lib/components/record-form/record-form.component.mjs +39 -0
- package/esm2022/libs/feature/editor/src/lib/feature-editor.module.mjs +10 -10
- package/esm2022/libs/feature/editor/src/lib/models/fields.model.mjs +1 -1
- package/esm2022/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.mjs +6 -2
- package/esm2022/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.mjs +3 -3
- package/esm2022/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.mjs +72 -0
- package/esm2022/libs/feature/map/src/lib/feature-map.module.mjs +7 -3
- package/esm2022/libs/feature/map/src/lib/layers-panel/layers-panel.component.mjs +12 -7
- package/esm2022/libs/feature/map/src/lib/map-context/map-context.model.mjs +2 -1
- package/esm2022/libs/feature/map/src/lib/map-context/map-context.service.mjs +52 -25
- package/esm2022/libs/feature/map/src/lib/utils/map-utils.service.mjs +12 -49
- package/esm2022/libs/feature/notifications/src/index.mjs +4 -0
- package/esm2022/libs/feature/notifications/src/lib/feature-notifications.module.mjs +18 -0
- package/esm2022/libs/feature/notifications/src/lib/notification.model.mjs +2 -0
- package/esm2022/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.mjs +49 -0
- package/esm2022/libs/feature/notifications/src/lib/notifications.service.mjs +29 -0
- package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +6 -2
- package/esm2022/libs/feature/search/src/lib/results-table/results-table.component.mjs +3 -3
- package/esm2022/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/index.mjs +15 -15
- package/esm2022/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.mjs +5 -5
- package/esm2022/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.mjs +45 -0
- package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/notification/notification.component.mjs +34 -0
- package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/thumbnail/thumbnail.component.mjs +4 -3
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +6 -5
- package/esm2022/libs/ui/inputs/src/index.mjs +1 -2
- package/esm2022/libs/ui/inputs/src/lib/button/button.component.mjs +2 -1
- package/esm2022/libs/ui/inputs/src/lib/files-drop/files-drop.directive.mjs +59 -0
- package/esm2022/libs/ui/inputs/src/lib/image-input/image-input.component.mjs +183 -0
- package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +10 -23
- package/esm2022/libs/ui/layout/src/index.mjs +6 -5
- package/esm2022/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.mjs +18 -0
- package/esm2022/libs/util/shared/src/lib/utils/bytes-convert.mjs +4 -0
- package/esm2022/libs/util/shared/src/lib/utils/image-resize.mjs +60 -0
- package/esm2022/libs/util/shared/src/lib/utils/index.mjs +8 -6
- package/esm2022/translations/de.json +20 -0
- package/esm2022/translations/en.json +20 -0
- package/esm2022/translations/es.json +20 -0
- package/esm2022/translations/fr.json +20 -0
- package/esm2022/translations/it.json +20 -0
- package/esm2022/translations/nl.json +20 -0
- package/esm2022/translations/pt.json +20 -0
- package/fesm2022/geonetwork-ui.mjs +3505 -2799
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.ts +1 -0
- package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
- package/libs/data-access/gn4/src/openapi/api/records.api.service.d.ts +9 -5
- package/libs/data-access/gn4/src/openapi/api/records.api.service.d.ts.map +1 -1
- package/libs/data-access/gn4/src/openapi/model/models.d.ts +0 -1
- package/libs/data-access/gn4/src/openapi/model/models.d.ts.map +1 -1
- package/libs/feature/editor/src/index.d.ts +1 -1
- package/libs/feature/editor/src/index.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/+state/editor.facade.d.ts +8 -5
- package/libs/feature/editor/src/lib/+state/editor.facade.d.ts.map +1 -1
- package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-array/form-field-array.component.d.ts +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-array/form-field-array.component.d.ts.map +1 -0
- package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-file/form-field-file.component.d.ts +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-file/form-field-file.component.d.ts.map +1 -0
- package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-object/form-field-object.component.d.ts +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-object/form-field-object.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts +16 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts.map +1 -0
- package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-simple/form-field-simple.component.d.ts +2 -2
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-simple/form-field-simple.component.d.ts.map +1 -0
- package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts.map +1 -0
- package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-temporal-extent/form-field-temporal-extent.component.d.ts +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-temporal-extent/form-field-temporal-extent.component.d.ts.map +1 -0
- package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.component.d.ts +4 -3
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field.model.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/components/record-form/form-field/index.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/{record-form → components/record-form}/record-form.component.d.ts +3 -3
- package/libs/feature/editor/src/lib/components/record-form/record-form.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/feature-editor.module.d.ts +1 -1
- package/libs/feature/editor/src/lib/feature-editor.module.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/models/fields.model.d.ts +1 -1
- package/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.d.ts +23 -0
- package/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.d.ts.map +1 -0
- package/libs/feature/map/src/lib/feature-map.module.d.ts +2 -1
- package/libs/feature/map/src/lib/feature-map.module.d.ts.map +1 -1
- package/libs/feature/map/src/lib/layers-panel/layers-panel.component.d.ts +2 -0
- package/libs/feature/map/src/lib/layers-panel/layers-panel.component.d.ts.map +1 -1
- package/libs/feature/map/src/lib/map-context/map-context.model.d.ts +10 -5
- 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 +2 -3
- package/libs/feature/map/src/lib/utils/map-utils.service.d.ts.map +1 -1
- package/libs/feature/notifications/src/index.d.ts +4 -0
- package/libs/feature/notifications/src/index.d.ts.map +1 -0
- package/libs/feature/notifications/src/lib/feature-notifications.module.d.ts +7 -0
- package/libs/feature/notifications/src/lib/feature-notifications.module.d.ts.map +1 -0
- package/libs/feature/notifications/src/lib/notification.model.d.ts +7 -0
- package/libs/feature/notifications/src/lib/notification.model.d.ts.map +1 -0
- package/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.d.ts +12 -0
- package/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.d.ts.map +1 -0
- package/libs/feature/notifications/src/lib/notifications.service.d.ts +15 -0
- package/libs/feature/notifications/src/lib/notifications.service.d.ts.map +1 -0
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
- package/libs/ui/elements/src/index.d.ts +14 -14
- package/libs/ui/elements/src/index.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts +13 -0
- package/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/notification/notification.component.d.ts +13 -0
- package/libs/ui/elements/src/lib/notification/notification.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/thumbnail/thumbnail.component.d.ts +1 -1
- package/libs/ui/elements/src/lib/thumbnail/thumbnail.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts +20 -20
- package/libs/ui/inputs/src/index.d.ts +0 -1
- package/libs/ui/inputs/src/index.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/button/button.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/files-drop/files-drop.directive.d.ts +14 -0
- package/libs/ui/inputs/src/lib/files-drop/files-drop.directive.d.ts.map +1 -0
- package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts +44 -0
- package/libs/ui/inputs/src/lib/image-input/image-input.component.d.ts.map +1 -0
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +26 -33
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
- package/libs/ui/layout/src/index.d.ts +5 -4
- package/libs/ui/layout/src/index.d.ts.map +1 -1
- package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts +8 -0
- package/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.d.ts.map +1 -0
- package/libs/util/shared/src/lib/utils/bytes-convert.d.ts +2 -0
- package/libs/util/shared/src/lib/utils/bytes-convert.d.ts.map +1 -0
- package/libs/util/shared/src/lib/utils/image-resize.d.ts +3 -0
- package/libs/util/shared/src/lib/utils/image-resize.d.ts.map +1 -0
- package/libs/util/shared/src/lib/utils/index.d.ts +7 -5
- package/libs/util/shared/src/lib/utils/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +6 -0
- package/src/libs/data-access/gn4/src/openapi/api/records.api.service.ts +43 -12
- package/src/libs/data-access/gn4/src/openapi/model/models.ts +0 -1
- package/src/libs/data-access/gn4/src/spec.yaml +1 -1
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +1 -1
- package/src/libs/feature/editor/src/index.ts +1 -1
- package/src/libs/feature/editor/src/lib/+state/editor.facade.ts +8 -1
- package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.html +8 -0
- package/src/libs/feature/editor/src/lib/components/overview-upload/overview-upload.component.ts +70 -0
- package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-array/form-field-array.component.ts +1 -0
- package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-file/form-field-file.component.ts +4 -1
- package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-object/form-field-object.component.ts +1 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.css +5 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.html +20 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.ts +44 -0
- package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-simple/form-field-simple.component.ts +4 -1
- package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-spatial-extent/form-field-spatial-extent.component.ts +1 -0
- package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-temporal-extent/form-field-temporal-extent.component.ts +1 -0
- package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.component.html +4 -4
- package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.component.ts +31 -5
- package/src/libs/feature/editor/src/lib/{record-form → components/record-form}/record-form.component.html +1 -0
- package/src/libs/feature/editor/src/lib/{record-form → components/record-form}/record-form.component.ts +23 -4
- package/src/libs/feature/editor/src/lib/feature-editor.module.ts +9 -9
- package/src/libs/feature/editor/src/lib/models/fields.model.ts +1 -1
- package/src/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-record-preview/add-layer-record-preview.component.ts +5 -1
- package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.html +1 -1
- package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.css +0 -0
- package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.html +36 -0
- package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.ts +80 -0
- package/src/libs/feature/map/src/lib/feature-map.module.ts +2 -0
- package/src/libs/feature/map/src/lib/layers-panel/layers-panel.component.html +8 -0
- package/src/libs/feature/map/src/lib/layers-panel/layers-panel.component.ts +5 -0
- package/src/libs/feature/map/src/lib/map-context/map-context.model.ts +10 -3
- package/src/libs/feature/map/src/lib/map-context/map-context.service.ts +60 -32
- package/src/libs/feature/map/src/lib/utils/map-utils.service.ts +17 -61
- package/src/libs/feature/notifications/src/index.ts +3 -0
- package/src/libs/feature/notifications/src/lib/feature-notifications.module.ts +10 -0
- package/src/libs/feature/notifications/src/lib/notification.model.ts +6 -0
- package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.css +0 -0
- package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.html +17 -0
- package/src/libs/feature/notifications/src/lib/notifications-container/notifications-container.component.ts +44 -0
- package/src/libs/feature/notifications/src/lib/notifications.service.ts +27 -0
- package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +5 -1
- package/src/libs/feature/search/src/lib/results-table/results-table.component.html +3 -3
- package/src/libs/ui/catalog/src/lib/organisation-preview/organisation-preview.component.html +5 -5
- package/src/libs/ui/elements/src/index.ts +14 -14
- package/src/libs/ui/elements/src/lib/image-overlay-preview/image-overlay-preview.component.html +1 -1
- package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.css +0 -5
- package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.html +0 -21
- package/src/libs/ui/elements/src/lib/markdown-editor/markdown-editor.component.ts +1 -14
- package/src/libs/ui/elements/src/lib/notification/notification.component.css +0 -0
- package/src/libs/ui/elements/src/lib/notification/notification.component.html +52 -0
- package/src/libs/ui/elements/src/lib/notification/notification.component.ts +31 -0
- package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.html +1 -1
- package/src/libs/ui/elements/src/lib/thumbnail/thumbnail.component.ts +5 -3
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +1 -1
- package/src/libs/ui/inputs/src/index.ts +0 -1
- package/src/libs/ui/inputs/src/lib/button/button.component.ts +1 -1
- package/src/libs/ui/inputs/src/lib/files-drop/files-drop.directive.ts +45 -0
- package/src/libs/ui/inputs/src/lib/image-input/image-input.component.css +0 -0
- package/src/libs/ui/inputs/src/lib/image-input/image-input.component.html +146 -0
- package/src/libs/ui/inputs/src/lib/image-input/image-input.component.ts +193 -0
- package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +3 -19
- package/src/libs/ui/layout/src/index.ts +5 -4
- package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.css +5 -0
- package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.html +18 -0
- package/src/libs/ui/layout/src/lib/form-field-wrapper/form-field-wrapper.component.ts +16 -0
- package/src/libs/util/shared/src/lib/utils/bytes-convert.ts +3 -0
- package/src/libs/util/shared/src/lib/utils/image-resize.ts +72 -0
- package/src/libs/util/shared/src/lib/utils/index.ts +7 -5
- package/tailwind.base.css +29 -0
- package/translations/de.json +20 -0
- package/translations/en.json +20 -0
- package/translations/es.json +20 -0
- package/translations/fr.json +20 -0
- package/translations/it.json +20 -0
- package/translations/nl.json +20 -0
- package/translations/pt.json +20 -0
- package/translations/sk.json +20 -0
- package/esm2022/libs/data-access/gn4/src/openapi/model/inlineObject3.api.model.mjs +0 -13
- package/esm2022/libs/feature/editor/src/lib/record-form/record-form.component.mjs +0 -30
- package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-array/form-field-array.component.mjs +0 -11
- package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-file/form-field-file.component.mjs +0 -27
- package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-object/form-field-object.component.mjs +0 -11
- package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.mjs +0 -27
- package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-simple/form-field-simple.component.mjs +0 -49
- package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-spatial-extent/form-field-spatial-extent.component.mjs +0 -11
- package/esm2022/libs/ui/inputs/src/lib/form-field/form-field-temporal-extent/form-field-temporal-extent.component.mjs +0 -11
- package/esm2022/libs/ui/inputs/src/lib/form-field/form-field.component.mjs +0 -76
- package/esm2022/libs/ui/inputs/src/lib/form-field/form-field.model.mjs +0 -2
- package/esm2022/libs/ui/inputs/src/lib/form-field/index.mjs +0 -10
- package/libs/data-access/gn4/src/openapi/model/inlineObject3.api.model.d.ts +0 -18
- package/libs/data-access/gn4/src/openapi/model/inlineObject3.api.model.d.ts.map +0 -1
- package/libs/feature/editor/src/lib/record-form/record-form.component.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/form-field/form-field-array/form-field-array.component.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/form-field/form-field-file/form-field-file.component.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/form-field/form-field-object/form-field-object.component.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.d.ts +0 -11
- package/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/form-field/form-field-simple/form-field-simple.component.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/form-field/form-field-spatial-extent/form-field-spatial-extent.component.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/form-field/form-field-temporal-extent/form-field-temporal-extent.component.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/form-field/form-field.component.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/form-field/form-field.model.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/form-field/index.d.ts.map +0 -1
- package/src/libs/data-access/gn4/src/openapi/model/inlineObject3.api.model.ts +0 -18
- package/src/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.html +0 -11
- package/src/libs/ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.ts +0 -15
- /package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.model.d.ts +0 -0
- /package/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/index.d.ts +0 -0
- /package/src/libs/feature/editor/src/lib/{record-form/record-form.component.css → components/overview-upload/overview-upload.component.css} +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-array/form-field-array.component.css +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-array/form-field-array.component.html +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-file/form-field-file.component.css +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-file/form-field-file.component.html +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-object/form-field-object.component.css +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-object/form-field-object.component.html +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-simple/form-field-simple.component.css +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-simple/form-field-simple.component.html +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-spatial-extent/form-field-spatial-extent.component.css +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-spatial-extent/form-field-spatial-extent.component.html +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-temporal-extent/form-field-temporal-extent.component.css +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field-temporal-extent/form-field-temporal-extent.component.html +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.component.css +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/form-field.model.ts +0 -0
- /package/src/libs/{ui/inputs/src/lib → feature/editor/src/lib/components/record-form}/form-field/index.ts +0 -0
- /package/src/libs/{ui/inputs/src/lib/form-field/form-field-rich/form-field-rich.component.css → feature/editor/src/lib/components/record-form/record-form.component.css} +0 -0
|
@@ -5,5 +5,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'
|
|
|
5
5
|
templateUrl: './form-field-array.component.html',
|
|
6
6
|
styleUrls: ['./form-field-array.component.css'],
|
|
7
7
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8
|
+
standalone: true,
|
|
8
9
|
})
|
|
9
10
|
export class FormFieldArrayComponent {}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common'
|
|
1
2
|
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
|
|
2
|
-
import { FormControl } from '@angular/forms'
|
|
3
|
+
import { FormControl, ReactiveFormsModule } from '@angular/forms'
|
|
3
4
|
|
|
4
5
|
@Component({
|
|
5
6
|
selector: 'gn-ui-form-field-file',
|
|
6
7
|
templateUrl: './form-field-file.component.html',
|
|
7
8
|
styleUrls: ['./form-field-file.component.css'],
|
|
8
9
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10
|
+
standalone: true,
|
|
11
|
+
imports: [CommonModule, ReactiveFormsModule],
|
|
9
12
|
})
|
|
10
13
|
export class FormFieldFileComponent {
|
|
11
14
|
@Input() control!: FormControl
|
|
@@ -5,5 +5,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'
|
|
|
5
5
|
templateUrl: './form-field-object.component.html',
|
|
6
6
|
styleUrls: ['./form-field-object.component.css'],
|
|
7
7
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8
|
+
standalone: true,
|
|
8
9
|
})
|
|
9
10
|
export class FormFieldObjectComponent {}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<gn-ui-form-field-wrapper [label]="label" [hint]="hint">
|
|
2
|
+
<gn-ui-button
|
|
3
|
+
form-field-interaction
|
|
4
|
+
[extraClass]="getButtonExtraClass()"
|
|
5
|
+
(buttonClick)="togglePreview()"
|
|
6
|
+
>
|
|
7
|
+
<span class="material-symbols-outlined mr-1 icon-small">{{
|
|
8
|
+
preview ? 'visibility' : 'visibility_off'
|
|
9
|
+
}}</span>
|
|
10
|
+
{{ preview ? 'WYSIWYG' : 'Markdown' }}
|
|
11
|
+
</gn-ui-button>
|
|
12
|
+
<gn-ui-markdown-editor
|
|
13
|
+
class="h-full"
|
|
14
|
+
[preview]="preview"
|
|
15
|
+
[helperText]="helperText"
|
|
16
|
+
[placeholder]="placeholder"
|
|
17
|
+
[textContent]="control.value"
|
|
18
|
+
(textContentChanged)="handleTextContentChanged($event)"
|
|
19
|
+
></gn-ui-markdown-editor>
|
|
20
|
+
</gn-ui-form-field-wrapper>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common'
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
|
|
3
|
+
import { FormControl, ReactiveFormsModule } from '@angular/forms'
|
|
4
|
+
import { MarkdownEditorComponent } from '../../../../../../../../../libs/ui/elements/src'
|
|
5
|
+
import { ButtonComponent } from '../../../../../../../../../libs/ui/inputs/src'
|
|
6
|
+
import { FormFieldWrapperComponent } from '../../../../../../../../../libs/ui/layout/src'
|
|
7
|
+
|
|
8
|
+
@Component({
|
|
9
|
+
selector: 'gn-ui-form-field-rich',
|
|
10
|
+
templateUrl: './form-field-rich.component.html',
|
|
11
|
+
styleUrls: ['./form-field-rich.component.css'],
|
|
12
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
13
|
+
standalone: true,
|
|
14
|
+
imports: [
|
|
15
|
+
CommonModule,
|
|
16
|
+
ReactiveFormsModule,
|
|
17
|
+
MarkdownEditorComponent,
|
|
18
|
+
FormFieldWrapperComponent,
|
|
19
|
+
ButtonComponent,
|
|
20
|
+
],
|
|
21
|
+
})
|
|
22
|
+
export class FormFieldRichComponent {
|
|
23
|
+
@Input() control!: FormControl
|
|
24
|
+
@Input() label: string
|
|
25
|
+
@Input() hint: string
|
|
26
|
+
@Input() helperText: string
|
|
27
|
+
@Input() placeholder = 'Votre texte ici' //TODO: translate
|
|
28
|
+
|
|
29
|
+
preview = false
|
|
30
|
+
|
|
31
|
+
getButtonExtraClass() {
|
|
32
|
+
return `${
|
|
33
|
+
this.preview ? 'text-gray-200 bg-gray-900' : 'text-gray-900 bg-gray-200'
|
|
34
|
+
} rounded-[1.25rem] p-[0.375rem] text-xs font-medium w-24`
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
togglePreview() {
|
|
38
|
+
this.preview = !this.preview
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
handleTextContentChanged(textContent: string) {
|
|
42
|
+
this.control.setValue(textContent)
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common'
|
|
1
2
|
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
|
|
2
|
-
import { FormControl } from '@angular/forms'
|
|
3
|
+
import { FormControl, ReactiveFormsModule } from '@angular/forms'
|
|
3
4
|
|
|
4
5
|
@Component({
|
|
5
6
|
selector: 'gn-ui-form-field-simple',
|
|
6
7
|
templateUrl: './form-field-simple.component.html',
|
|
7
8
|
styleUrls: ['./form-field-simple.component.css'],
|
|
8
9
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10
|
+
standalone: true,
|
|
11
|
+
imports: [CommonModule, ReactiveFormsModule],
|
|
9
12
|
})
|
|
10
13
|
export class FormFieldSimpleComponent {
|
|
11
14
|
@Input() type: 'date' | 'url' | 'text' | 'number' | 'list' | 'toggle'
|
|
@@ -5,5 +5,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'
|
|
|
5
5
|
templateUrl: './form-field-spatial-extent.component.html',
|
|
6
6
|
styleUrls: ['./form-field-spatial-extent.component.css'],
|
|
7
7
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8
|
+
standalone: true,
|
|
8
9
|
})
|
|
9
10
|
export class FormFieldSpatialExtentComponent {}
|
|
@@ -5,5 +5,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'
|
|
|
5
5
|
templateUrl: './form-field-temporal-extent.component.html',
|
|
6
6
|
styleUrls: ['./form-field-temporal-extent.component.css'],
|
|
7
7
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8
|
+
standalone: true,
|
|
8
9
|
})
|
|
9
10
|
export class FormFieldTemporalExtentComponent {}
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
[invalid]="isFieldInvalid"
|
|
40
40
|
></gn-ui-form-field-file>
|
|
41
41
|
</ng-container>
|
|
42
|
-
<ng-container *ngIf="
|
|
42
|
+
<ng-container *ngIf="isAbstract">
|
|
43
43
|
<gn-ui-form-field-rich
|
|
44
|
-
class="
|
|
44
|
+
class="h-[8rem]"
|
|
45
45
|
[control]="formControl"
|
|
46
|
-
[
|
|
47
|
-
[
|
|
46
|
+
[label]="config.labelKey | translate"
|
|
47
|
+
[hint]="config.hintKey | translate"
|
|
48
48
|
></gn-ui-form-field-rich>
|
|
49
49
|
</ng-container>
|
|
50
50
|
<ng-container *ngIf="isArrayField">
|
|
@@ -4,17 +4,42 @@ import {
|
|
|
4
4
|
Input,
|
|
5
5
|
Output,
|
|
6
6
|
} from '@angular/core'
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { FormControl, ReactiveFormsModule } from '@angular/forms'
|
|
8
|
+
import { MatIconModule } from '@angular/material/icon'
|
|
9
|
+
import { TranslateModule } from '@ngx-translate/core'
|
|
9
10
|
import { Observable } from 'rxjs'
|
|
11
|
+
import { FormFieldArrayComponent } from './form-field-array/form-field-array.component'
|
|
12
|
+
import { FormFieldFileComponent } from './form-field-file/form-field-file.component'
|
|
13
|
+
import { FormFieldObjectComponent } from './form-field-object/form-field-object.component'
|
|
14
|
+
import { FormFieldRichComponent } from './form-field-rich/form-field-rich.component'
|
|
15
|
+
import { FormFieldSimpleComponent } from './form-field-simple/form-field-simple.component'
|
|
16
|
+
import { FormFieldSpatialExtentComponent } from './form-field-spatial-extent/form-field-spatial-extent.component'
|
|
17
|
+
import { FormFieldTemporalExtentComponent } from './form-field-temporal-extent/form-field-temporal-extent.component'
|
|
18
|
+
import { FormFieldConfig } from './form-field.model'
|
|
19
|
+
import { CommonModule } from '@angular/common'
|
|
10
20
|
|
|
11
21
|
@Component({
|
|
12
22
|
selector: 'gn-ui-form-field',
|
|
13
23
|
templateUrl: './form-field.component.html',
|
|
14
24
|
styleUrls: ['./form-field.component.css'],
|
|
15
25
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
26
|
+
standalone: true,
|
|
27
|
+
imports: [
|
|
28
|
+
FormFieldSimpleComponent,
|
|
29
|
+
FormFieldRichComponent,
|
|
30
|
+
FormFieldObjectComponent,
|
|
31
|
+
FormFieldSpatialExtentComponent,
|
|
32
|
+
FormFieldTemporalExtentComponent,
|
|
33
|
+
FormFieldFileComponent,
|
|
34
|
+
FormFieldArrayComponent,
|
|
35
|
+
CommonModule,
|
|
36
|
+
ReactiveFormsModule,
|
|
37
|
+
TranslateModule,
|
|
38
|
+
MatIconModule,
|
|
39
|
+
],
|
|
16
40
|
})
|
|
17
41
|
export class FormFieldComponent {
|
|
42
|
+
@Input() model: string
|
|
18
43
|
@Input() config: FormFieldConfig
|
|
19
44
|
@Input() set value(v: unknown) {
|
|
20
45
|
this.formControl.setValue(v, {
|
|
@@ -49,9 +74,6 @@ export class FormFieldComponent {
|
|
|
49
74
|
this.config.type === 'toggle'
|
|
50
75
|
)
|
|
51
76
|
}
|
|
52
|
-
get isRichField() {
|
|
53
|
-
return this.config.type === 'rich'
|
|
54
|
-
}
|
|
55
77
|
get isFileField() {
|
|
56
78
|
return this.config.type === 'file'
|
|
57
79
|
}
|
|
@@ -77,4 +99,8 @@ export class FormFieldComponent {
|
|
|
77
99
|
get isFieldInvalid() {
|
|
78
100
|
return !this.config.locked && this.config.invalid
|
|
79
101
|
}
|
|
102
|
+
|
|
103
|
+
get isAbstract() {
|
|
104
|
+
return this.model === 'abstract'
|
|
105
|
+
}
|
|
80
106
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<ng-container *ngFor="let field of fields$ | async; trackBy: fieldTracker">
|
|
3
3
|
<gn-ui-form-field
|
|
4
4
|
*ngIf="field.config.formFieldConfig && !field.config.hidden"
|
|
5
|
+
[model]="field.config.model"
|
|
5
6
|
[config]="field.config.formFieldConfig"
|
|
6
7
|
[value]="field.value"
|
|
7
8
|
(valueChange)="handleFieldValueChange(field, $event)"
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common'
|
|
2
2
|
import { ChangeDetectionStrategy, Component } from '@angular/core'
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { EditorFacade } from '../../+state/editor.facade'
|
|
4
|
+
import { EditorFieldState, EditorFieldValue } from '../../models/fields.model'
|
|
5
|
+
import {
|
|
6
|
+
FormFieldArrayComponent,
|
|
7
|
+
FormFieldComponent,
|
|
8
|
+
FormFieldFileComponent,
|
|
9
|
+
FormFieldObjectComponent,
|
|
10
|
+
FormFieldRichComponent,
|
|
11
|
+
FormFieldSimpleComponent,
|
|
12
|
+
FormFieldSpatialExtentComponent,
|
|
13
|
+
FormFieldTemporalExtentComponent,
|
|
14
|
+
} from './form-field'
|
|
6
15
|
|
|
7
16
|
@Component({
|
|
8
17
|
selector: 'gn-ui-record-form',
|
|
@@ -10,7 +19,17 @@ import { EditorFieldState, EditorFieldValue } from '../models/fields.model'
|
|
|
10
19
|
styleUrls: ['./record-form.component.css'],
|
|
11
20
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12
21
|
standalone: true,
|
|
13
|
-
imports: [
|
|
22
|
+
imports: [
|
|
23
|
+
CommonModule,
|
|
24
|
+
FormFieldComponent,
|
|
25
|
+
FormFieldArrayComponent,
|
|
26
|
+
FormFieldFileComponent,
|
|
27
|
+
FormFieldObjectComponent,
|
|
28
|
+
FormFieldRichComponent,
|
|
29
|
+
FormFieldSimpleComponent,
|
|
30
|
+
FormFieldSpatialExtentComponent,
|
|
31
|
+
FormFieldTemporalExtentComponent,
|
|
32
|
+
],
|
|
14
33
|
})
|
|
15
34
|
export class RecordFormComponent {
|
|
16
35
|
fields$ = this.facade.recordFields$
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common'
|
|
2
|
+
import { HttpClientModule, HttpClientXsrfModule } from '@angular/common/http'
|
|
1
3
|
import { NgModule } from '@angular/core'
|
|
2
4
|
import { MatNativeDateModule } from '@angular/material/core'
|
|
3
5
|
import { MatDatepickerModule } from '@angular/material/datepicker'
|
|
4
6
|
import { MatFormFieldModule } from '@angular/material/form-field'
|
|
5
|
-
import { WizardComponent } from './components/wizard/wizard.component'
|
|
6
|
-
import { WizardFieldComponent } from './components/wizard-field/wizard-field.component'
|
|
7
7
|
import { UiInputsModule } from '../../../../../libs/ui/inputs/src'
|
|
8
8
|
import { UiWidgetsModule } from '../../../../../libs/ui/widgets/src'
|
|
9
|
-
import { TranslateModule } from '@ngx-translate/core'
|
|
10
|
-
import { WizardSummarizeComponent } from './components/wizard-summarize/wizard-summarize.component'
|
|
11
|
-
import { CommonModule } from '@angular/common'
|
|
12
|
-
import { HttpClientModule, HttpClientXsrfModule } from '@angular/common/http'
|
|
13
|
-
import { StoreModule } from '@ngrx/store'
|
|
14
9
|
import { EffectsModule } from '@ngrx/effects'
|
|
15
|
-
import
|
|
10
|
+
import { StoreModule } from '@ngrx/store'
|
|
11
|
+
import { TranslateModule } from '@ngx-translate/core'
|
|
16
12
|
import { EditorEffects } from './+state/editor.effects'
|
|
17
13
|
import { EditorFacade } from './+state/editor.facade'
|
|
14
|
+
import * as fromEditor from './+state/editor.reducer'
|
|
15
|
+
import { WizardFieldComponent } from './components/wizard-field/wizard-field.component'
|
|
16
|
+
import { WizardSummarizeComponent } from './components/wizard-summarize/wizard-summarize.component'
|
|
17
|
+
import { WizardComponent } from './components/wizard/wizard.component'
|
|
18
18
|
|
|
19
19
|
@NgModule({
|
|
20
20
|
declarations: [
|
|
@@ -42,5 +42,5 @@ import { EditorFacade } from './+state/editor.facade'
|
|
|
42
42
|
providers: [EditorFacade],
|
|
43
43
|
})
|
|
44
44
|
export class FeatureEditorModule {}
|
|
45
|
-
export * from './services/wizard.service'
|
|
46
45
|
export * from './models/index'
|
|
46
|
+
export * from './services/wizard.service'
|
|
@@ -59,7 +59,11 @@ export class AddLayerRecordPreviewComponent extends RecordPreviewComponent {
|
|
|
59
59
|
name: link.name,
|
|
60
60
|
})
|
|
61
61
|
} else if (link.accessServiceProtocol === 'wmts') {
|
|
62
|
-
return
|
|
62
|
+
return of({
|
|
63
|
+
url: link.url.toString(),
|
|
64
|
+
type: MapContextLayerTypeEnum.WMTS,
|
|
65
|
+
name: link.name,
|
|
66
|
+
})
|
|
63
67
|
}
|
|
64
68
|
return throwError(() => 'protocol not supported')
|
|
65
69
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div class="flex flex-col gap-2 my-2">
|
|
2
2
|
<div class="flex items-center gap-4">
|
|
3
|
-
<div class="
|
|
3
|
+
<div class="grow rounded-md border-2 border-gray-200">
|
|
4
4
|
<gn-ui-drag-and-drop-file-input
|
|
5
5
|
(fileChange)="handleFileChange($event)"
|
|
6
6
|
[accept]="acceptedMimeType.join(',')"
|
package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.css
ADDED
|
File without changes
|
package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.html
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<div class="flex items-center mb-5">
|
|
2
|
+
<gn-ui-text-input
|
|
3
|
+
[(value)]="ogcUrl"
|
|
4
|
+
(valueChange)="urlChange.next($event)"
|
|
5
|
+
[hint]="'map.ogc.urlInput.hint' | translate"
|
|
6
|
+
class="w-96"
|
|
7
|
+
>
|
|
8
|
+
</gn-ui-text-input>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div *ngIf="errorMessage" class="text-red-500 mt-2">
|
|
12
|
+
{{ errorMessage }}
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div *ngIf="loading">
|
|
16
|
+
<p class="loading-message" translate>map.loading.service</p>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div *ngIf="!loading && layers.length > 0">
|
|
20
|
+
<h2 class="font-bold" translate>map.layers.available</h2>
|
|
21
|
+
<ng-container *ngFor="let layer of layers">
|
|
22
|
+
<div class="flex items-center justify-between my-2 layer-item-tree">
|
|
23
|
+
<p class="max-w-xs overflow-hidden overflow-ellipsis whitespace-nowrap">
|
|
24
|
+
{{ layer }}
|
|
25
|
+
</p>
|
|
26
|
+
<gn-ui-button
|
|
27
|
+
class="layer-add-btn"
|
|
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
|
|
33
|
+
>
|
|
34
|
+
</div>
|
|
35
|
+
</ng-container>
|
|
36
|
+
</div>
|
package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
OnInit,
|
|
4
|
+
Output,
|
|
5
|
+
EventEmitter,
|
|
6
|
+
ChangeDetectionStrategy,
|
|
7
|
+
Input,
|
|
8
|
+
ChangeDetectorRef,
|
|
9
|
+
} from '@angular/core'
|
|
10
|
+
import { OgcApiEndpoint } from '@camptocamp/ogc-client'
|
|
11
|
+
import { Subject, debounceTime } from 'rxjs'
|
|
12
|
+
import {
|
|
13
|
+
MapContextLayerModel,
|
|
14
|
+
MapContextLayerTypeEnum,
|
|
15
|
+
} from '../map-context/map-context.model'
|
|
16
|
+
import { TranslateModule } from '@ngx-translate/core'
|
|
17
|
+
import { UiInputsModule } from '../../../../../../libs/ui/inputs/src'
|
|
18
|
+
import { CommonModule } from '@angular/common'
|
|
19
|
+
import { MapLayer } from '../+state/map.models'
|
|
20
|
+
|
|
21
|
+
@Component({
|
|
22
|
+
selector: 'gn-ui-add-layer-from-ogc-api',
|
|
23
|
+
templateUrl: './add-layer-from-ogc-api.component.html',
|
|
24
|
+
styleUrls: ['./add-layer-from-ogc-api.component.css'],
|
|
25
|
+
standalone: true,
|
|
26
|
+
imports: [CommonModule, TranslateModule, UiInputsModule],
|
|
27
|
+
})
|
|
28
|
+
export class AddLayerFromOgcApiComponent implements OnInit {
|
|
29
|
+
@Input() ogcUrl: string
|
|
30
|
+
@Output() layerAdded = new EventEmitter<MapLayer>()
|
|
31
|
+
|
|
32
|
+
urlChange = new Subject<string>()
|
|
33
|
+
layerUrl = ''
|
|
34
|
+
loading = false
|
|
35
|
+
layers: string[] = []
|
|
36
|
+
ogcEndpoint: OgcApiEndpoint = null
|
|
37
|
+
errorMessage: string | null = null
|
|
38
|
+
|
|
39
|
+
constructor(private changeDetectorRef: ChangeDetectorRef) {}
|
|
40
|
+
|
|
41
|
+
ngOnInit() {
|
|
42
|
+
this.urlChange.pipe(debounceTime(700)).subscribe(() => {
|
|
43
|
+
this.loadLayers()
|
|
44
|
+
this.changeDetectorRef.detectChanges() // manually trigger change detection
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async loadLayers() {
|
|
49
|
+
this.errorMessage = null
|
|
50
|
+
try {
|
|
51
|
+
this.loading = true
|
|
52
|
+
if (this.ogcUrl.trim() === '') {
|
|
53
|
+
this.layers = []
|
|
54
|
+
return
|
|
55
|
+
}
|
|
56
|
+
this.ogcEndpoint = await new OgcApiEndpoint(this.ogcUrl)
|
|
57
|
+
|
|
58
|
+
// Currently only supports feature collections
|
|
59
|
+
this.layers = await this.ogcEndpoint.featureCollections
|
|
60
|
+
} catch (error) {
|
|
61
|
+
const err = error as Error
|
|
62
|
+
this.layers = []
|
|
63
|
+
this.errorMessage = 'Error loading layers: ' + err.message
|
|
64
|
+
} finally {
|
|
65
|
+
this.loading = false
|
|
66
|
+
this.changeDetectorRef.markForCheck()
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
async addLayer(layer: string) {
|
|
71
|
+
this.layerUrl = await this.ogcEndpoint.getCollectionItemsUrl(layer)
|
|
72
|
+
|
|
73
|
+
const layerToAdd: MapContextLayerModel = {
|
|
74
|
+
name: layer,
|
|
75
|
+
url: this.layerUrl,
|
|
76
|
+
type: MapContextLayerTypeEnum.OGCAPI,
|
|
77
|
+
}
|
|
78
|
+
this.layerAdded.emit({ ...layerToAdd, title: layer })
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -25,6 +25,7 @@ import { AddLayerFromFileComponent } from './add-layer-from-file/add-layer-from-
|
|
|
25
25
|
import { AddLayerFromWfsComponent } from './add-layer-from-wfs/add-layer-from-wfs.component'
|
|
26
26
|
import { GeocodingComponent } from './geocoding/geocoding.component'
|
|
27
27
|
import { GEOCODING_PROVIDER, GeocodingProvider } from './geocoding.service'
|
|
28
|
+
import { AddLayerFromOgcApiComponent } from './add-layer-from-ogc-api/add-layer-from-ogc-api.component'
|
|
28
29
|
|
|
29
30
|
@NgModule({
|
|
30
31
|
declarations: [
|
|
@@ -59,6 +60,7 @@ import { GEOCODING_PROVIDER, GeocodingProvider } from './geocoding.service'
|
|
|
59
60
|
EffectsModule.forFeature([MapEffects]),
|
|
60
61
|
UiElementsModule,
|
|
61
62
|
UiInputsModule,
|
|
63
|
+
AddLayerFromOgcApiComponent,
|
|
62
64
|
],
|
|
63
65
|
providers: [
|
|
64
66
|
{
|
|
@@ -40,6 +40,14 @@
|
|
|
40
40
|
<gn-ui-add-layer-from-wfs></gn-ui-add-layer-from-wfs>
|
|
41
41
|
</div>
|
|
42
42
|
</mat-tab>
|
|
43
|
+
<mat-tab [label]="'map.add.layer.ogc.api' | translate" bodyClass="h-full">
|
|
44
|
+
<div class="p-3">
|
|
45
|
+
<gn-ui-add-layer-from-ogc-api
|
|
46
|
+
[ogcUrl]="ogcUrl"
|
|
47
|
+
(layerAdded)="addLayer($event)"
|
|
48
|
+
></gn-ui-add-layer-from-ogc-api>
|
|
49
|
+
</div>
|
|
50
|
+
</mat-tab>
|
|
43
51
|
<mat-tab [label]="'map.add.layer.file' | translate" bodyClass="h-full">
|
|
44
52
|
<div class="p-3">
|
|
45
53
|
<gn-ui-add-layer-from-file></gn-ui-add-layer-from-file>
|
|
@@ -9,9 +9,14 @@ import { MapFacade } from '../+state/map.facade'
|
|
|
9
9
|
})
|
|
10
10
|
export class LayersPanelComponent {
|
|
11
11
|
layers$ = this.mapFacade.layers$
|
|
12
|
+
ogcUrl = ''
|
|
12
13
|
constructor(private mapFacade: MapFacade) {}
|
|
13
14
|
|
|
14
15
|
deleteLayer(index: number) {
|
|
15
16
|
this.mapFacade.removeLayer(index)
|
|
16
17
|
}
|
|
18
|
+
|
|
19
|
+
addLayer(layer) {
|
|
20
|
+
this.mapFacade.addLayer(layer)
|
|
21
|
+
}
|
|
17
22
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { FeatureCollection } from 'geojson'
|
|
2
2
|
import { Coordinate } from 'ol/coordinate'
|
|
3
3
|
import type { Extent } from 'ol/extent'
|
|
4
|
-
import { Options } from 'ol/source/WMTS'
|
|
5
4
|
|
|
6
5
|
export enum MapContextLayerTypeEnum {
|
|
7
6
|
XYZ = 'xyz',
|
|
@@ -9,6 +8,7 @@ export enum MapContextLayerTypeEnum {
|
|
|
9
8
|
WMTS = 'wmts',
|
|
10
9
|
WFS = 'wfs',
|
|
11
10
|
GEOJSON = 'geojson',
|
|
11
|
+
OGCAPI = 'ogcapi',
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export interface MapContextModel {
|
|
@@ -24,8 +24,8 @@ export interface MapContextLayerWmsModel {
|
|
|
24
24
|
|
|
25
25
|
export interface MapContextLayerWmtsModel {
|
|
26
26
|
type: 'wmts'
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
url: string
|
|
28
|
+
name: string
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
interface MapContextLayerWfsModel {
|
|
@@ -34,6 +34,12 @@ interface MapContextLayerWfsModel {
|
|
|
34
34
|
name: string
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
export interface MapContextLayerOgcapiModel {
|
|
38
|
+
type: 'ogcapi'
|
|
39
|
+
url: string
|
|
40
|
+
name: string
|
|
41
|
+
}
|
|
42
|
+
|
|
37
43
|
interface LayerXyzModel {
|
|
38
44
|
type: 'xyz'
|
|
39
45
|
name?: string
|
|
@@ -71,6 +77,7 @@ export type MapContextLayerModel =
|
|
|
71
77
|
| MapContextLayerWfsModel
|
|
72
78
|
| MapContextLayerXyzModel
|
|
73
79
|
| MapContextLayerGeojsonModel
|
|
80
|
+
| MapContextLayerOgcapiModel
|
|
74
81
|
|
|
75
82
|
export interface MapContextViewModel {
|
|
76
83
|
center?: Coordinate // expressed in long/lat (EPSG:4326)
|