geonetwork-ui 2.5.0-dev.d91908296 → 2.5.0-dev.e060bf76e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.mjs +11 -1
- package/esm2022/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.mjs +1 -1
- package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +50 -32
- package/esm2022/libs/api/repository/src/lib/gn4/gn4-repository.mjs +23 -3
- 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/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +7 -4
- package/esm2022/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.mjs +18 -16
- package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +24 -14
- package/esm2022/libs/feature/dataviz/src/lib/table-view/table-view.component.mjs +16 -18
- package/esm2022/libs/feature/editor/src/lib/components/constraint-card/constraint-card.component.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/components/generic-keywords/generic-keywords.component.mjs +2 -2
- package/esm2022/libs/feature/editor/src/lib/components/online-service-resource-input/online-service-resource-input.component.mjs +2 -2
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts/form-field-contacts.component.mjs +2 -2
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.mjs +3 -2
- package/esm2022/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.mjs +2 -2
- package/esm2022/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.mjs +7 -23
- package/esm2022/libs/feature/editor/src/lib/components/wizard-summarize/wizard-summarize.component.mjs +11 -11
- package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +2 -2
- package/esm2022/libs/feature/editor/src/lib/models/wizard-field.type.mjs +3 -4
- package/esm2022/libs/feature/map/src/lib/add-layer-from-catalog/add-layer-from-catalog.component.mjs +1 -1
- package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +25 -5
- package/esm2022/libs/feature/record/src/lib/feature-record.module.mjs +6 -7
- package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +10 -7
- package/esm2022/libs/feature/record/src/lib/state/mdview.actions.mjs +4 -1
- package/esm2022/libs/feature/record/src/lib/state/mdview.effects.mjs +7 -2
- package/esm2022/libs/feature/record/src/lib/state/mdview.facade.mjs +9 -1
- package/esm2022/libs/feature/record/src/lib/state/mdview.reducer.mjs +19 -1
- package/esm2022/libs/feature/record/src/lib/state/mdview.selectors.mjs +6 -1
- package/esm2022/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.mjs +6 -3
- package/esm2022/libs/feature/search/src/lib/results-table/results-table-container.component.mjs +1 -1
- package/esm2022/libs/feature/search/src/lib/utils/service/fields.mjs +46 -1
- package/esm2022/libs/feature/search/src/lib/utils/service/fields.service.mjs +3 -2
- package/esm2022/libs/ui/dataviz/src/index.mjs +3 -3
- package/esm2022/libs/ui/dataviz/src/lib/data-table/custom.mat.paginator.intl.mjs +51 -0
- package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.component.mjs +133 -0
- package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.data.source.mjs +24 -0
- package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.fixtures.mjs +82 -0
- package/esm2022/libs/ui/elements/src/index.mjs +2 -1
- package/esm2022/libs/ui/elements/src/lib/application-banner/application-banner.component.mjs +78 -0
- package/esm2022/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.mjs +3 -3
- package/esm2022/libs/ui/elements/src/lib/metadata-info/metadata-info.component.mjs +18 -10
- package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +2 -1
- package/esm2022/libs/ui/elements/src/lib/ui-elements.module.mjs +10 -4
- package/esm2022/libs/ui/inputs/src/index.mjs +1 -2
- package/esm2022/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.mjs +43 -3
- package/esm2022/libs/ui/inputs/src/lib/ui-inputs.module.mjs +1 -6
- package/esm2022/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.mjs +14 -4
- package/esm2022/libs/ui/search/src/lib/results-table/results-table.component.mjs +22 -13
- package/esm2022/libs/ui/widgets/src/index.mjs +1 -2
- package/esm2022/libs/ui/widgets/src/lib/ui-widgets.module.mjs +5 -6
- package/esm2022/libs/util/data-fetcher/src/index.mjs +3 -1
- package/esm2022/libs/util/data-fetcher/src/lib/data-fetcher.mjs +5 -4
- package/esm2022/libs/util/data-fetcher/src/lib/model.mjs +7 -3
- package/esm2022/libs/util/data-fetcher/src/lib/readers/base-cache.mjs +12 -0
- package/esm2022/libs/util/data-fetcher/src/lib/readers/base-file.mjs +3 -3
- package/esm2022/libs/util/data-fetcher/src/lib/readers/base.mjs +1 -1
- package/esm2022/libs/util/data-fetcher/src/lib/readers/csv.mjs +2 -2
- package/esm2022/libs/util/data-fetcher/src/lib/readers/excel.mjs +2 -2
- package/esm2022/libs/util/data-fetcher/src/lib/readers/geojson.mjs +2 -2
- package/esm2022/libs/util/data-fetcher/src/lib/readers/gml.mjs +5 -3
- package/esm2022/libs/util/data-fetcher/src/lib/readers/json.mjs +2 -2
- package/esm2022/libs/util/data-fetcher/src/lib/readers/wfs.mjs +35 -9
- package/esm2022/libs/util/data-fetcher/src/lib/utils.mjs +11 -9
- package/esm2022/libs/util/shared/src/lib/services/date.service.mjs +41 -0
- package/esm2022/libs/util/shared/src/lib/services/index.mjs +2 -1
- package/esm2022/libs/util/shared/src/lib/utils/temporal-extent-union.mjs +4 -4
- package/esm2022/translations/de.json +10 -75
- package/esm2022/translations/en.json +10 -75
- package/esm2022/translations/es.json +9 -74
- package/esm2022/translations/fr.json +22 -87
- package/esm2022/translations/it.json +27 -91
- package/esm2022/translations/nl.json +9 -74
- package/esm2022/translations/pt.json +9 -74
- package/fesm2022/geonetwork-ui.mjs +1185 -1207
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts +3 -0
- package/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts +3 -1
- package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/gn4-repository.d.ts +2 -1
- 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 +6 -0
- 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 +2 -1
- package/libs/common/domain/src/lib/repository/records-repository.interface.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +2 -1
- package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.d.ts +7 -9
- package/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts +2 -2
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts +5 -7
- package/libs/feature/dataviz/src/lib/table-view/table-view.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.d.ts +1 -3
- package/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/wizard-summarize/wizard-summarize.component.d.ts +3 -3
- package/libs/feature/editor/src/lib/components/wizard-summarize/wizard-summarize.component.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/models/wizard-field.type.d.ts +2 -3
- package/libs/feature/editor/src/lib/models/wizard-field.type.d.ts.map +1 -1
- package/libs/feature/record/src/lib/data-view/data-view.component.d.ts +5 -1
- package/libs/feature/record/src/lib/data-view/data-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/feature-record.module.d.ts +2 -2
- package/libs/feature/record/src/lib/feature-record.module.d.ts.map +1 -1
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts +3 -2
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.actions.d.ts +16 -1
- package/libs/feature/record/src/lib/state/mdview.actions.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.effects.d.ts +5 -0
- package/libs/feature/record/src/lib/state/mdview.effects.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.facade.d.ts +2 -0
- 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 +4 -1
- package/libs/feature/record/src/lib/state/mdview.reducer.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.selectors.d.ts +2 -0
- package/libs/feature/record/src/lib/state/mdview.selectors.d.ts.map +1 -1
- package/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.d.ts +2 -1
- package/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.d.ts.map +1 -1
- package/libs/feature/search/src/lib/utils/service/fields.d.ts +10 -0
- package/libs/feature/search/src/lib/utils/service/fields.d.ts.map +1 -1
- package/libs/feature/search/src/lib/utils/service/fields.service.d.ts.map +1 -1
- package/libs/ui/dataviz/src/index.d.ts +2 -2
- package/libs/ui/dataviz/src/index.d.ts.map +1 -1
- package/libs/ui/dataviz/src/lib/data-table/custom.mat.paginator.intl.d.ts +14 -0
- package/libs/ui/dataviz/src/lib/data-table/custom.mat.paginator.intl.d.ts.map +1 -0
- package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts +45 -0
- package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts.map +1 -0
- package/libs/ui/dataviz/src/lib/data-table/data-table.data.source.d.ts +12 -0
- package/libs/ui/dataviz/src/lib/data-table/data-table.data.source.d.ts.map +1 -0
- package/libs/ui/dataviz/src/lib/data-table/data-table.fixtures.d.ts +10 -0
- package/libs/ui/dataviz/src/lib/data-table/data-table.fixtures.d.ts.map +1 -0
- package/libs/ui/elements/src/index.d.ts +1 -0
- package/libs/ui/elements/src/index.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/application-banner/application-banner.component.d.ts +16 -0
- package/libs/ui/elements/src/lib/application-banner/application-banner.component.d.ts.map +1 -0
- package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts +5 -0
- package/libs/ui/elements/src/lib/metadata-info/metadata-info.component.d.ts.map +1 -1
- 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 +2 -1
- package/libs/ui/elements/src/lib/ui-elements.module.d.ts.map +1 -1
- package/libs/ui/inputs/src/index.d.ts +0 -1
- package/libs/ui/inputs/src/index.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts +16 -1
- package/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts +27 -28
- package/libs/ui/inputs/src/lib/ui-inputs.module.d.ts.map +1 -1
- package/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.d.ts +4 -2
- package/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.d.ts.map +1 -1
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts +6 -3
- package/libs/ui/search/src/lib/results-table/results-table.component.d.ts.map +1 -1
- package/libs/ui/widgets/src/index.d.ts +0 -1
- package/libs/ui/widgets/src/index.d.ts.map +1 -1
- package/libs/ui/widgets/src/lib/ui-widgets.module.d.ts +8 -9
- package/libs/ui/widgets/src/lib/ui-widgets.module.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/index.d.ts +3 -1
- package/libs/util/data-fetcher/src/index.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/data-fetcher.d.ts +2 -2
- package/libs/util/data-fetcher/src/lib/data-fetcher.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/model.d.ts +1 -1
- package/libs/util/data-fetcher/src/lib/model.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/readers/base-cache.d.ts +8 -0
- package/libs/util/data-fetcher/src/lib/readers/base-cache.d.ts.map +1 -0
- package/libs/util/data-fetcher/src/lib/readers/base-file.d.ts +2 -2
- package/libs/util/data-fetcher/src/lib/readers/base-file.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/readers/base.d.ts +2 -2
- package/libs/util/data-fetcher/src/lib/readers/base.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/readers/gml.d.ts +5 -3
- package/libs/util/data-fetcher/src/lib/readers/gml.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/readers/wfs.d.ts +7 -4
- package/libs/util/data-fetcher/src/lib/readers/wfs.d.ts.map +1 -1
- package/libs/util/data-fetcher/src/lib/utils.d.ts +2 -2
- package/libs/util/data-fetcher/src/lib/utils.d.ts.map +1 -1
- package/libs/util/shared/src/lib/services/date.service.d.ts +13 -0
- package/libs/util/shared/src/lib/services/date.service.d.ts.map +1 -0
- package/libs/util/shared/src/lib/services/index.d.ts +1 -0
- package/libs/util/shared/src/lib/services/index.d.ts.map +1 -1
- package/libs/util/shared/src/lib/utils/temporal-extent-union.d.ts +2 -1
- package/libs/util/shared/src/lib/utils/temporal-extent-union.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +25 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +4 -0
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +55 -32
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +42 -7
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +3 -1
- package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +4 -1
- package/src/libs/common/fixtures/src/lib/records.fixtures.ts +75 -0
- package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +4 -1
- package/src/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.html +3 -3
- package/src/libs/feature/dataviz/src/lib/geo-table-view/geo-table-view.component.ts +17 -15
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +43 -20
- package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.html +4 -3
- package/src/libs/feature/dataviz/src/lib/table-view/table-view.component.ts +10 -18
- package/src/libs/feature/editor/src/lib/components/constraint-card/constraint-card.component.html +1 -1
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts-for-resource/form-field-contacts-for-resource.component.ts +1 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-rich/form-field-rich.component.ts +1 -1
- package/src/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.html +0 -13
- package/src/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.ts +0 -20
- package/src/libs/feature/editor/src/lib/components/wizard-summarize/wizard-summarize.component.ts +3 -4
- package/src/libs/feature/editor/src/lib/fields.config.ts +1 -1
- package/src/libs/feature/editor/src/lib/models/wizard-field.type.ts +0 -1
- package/src/libs/feature/record/src/lib/data-view/data-view.component.html +24 -11
- package/src/libs/feature/record/src/lib/data-view/data-view.component.ts +26 -4
- package/src/libs/feature/record/src/lib/feature-record.module.ts +6 -4
- package/src/libs/feature/record/src/lib/map-view/map-view.component.html +71 -60
- package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +6 -3
- package/src/libs/feature/record/src/lib/state/mdview.actions.ts +16 -0
- package/src/libs/feature/record/src/lib/state/mdview.effects.ts +21 -2
- package/src/libs/feature/record/src/lib/state/mdview.facade.ts +15 -0
- package/src/libs/feature/record/src/lib/state/mdview.reducer.ts +30 -1
- package/src/libs/feature/record/src/lib/state/mdview.selectors.ts +12 -0
- package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.html +1 -0
- package/src/libs/feature/search/src/lib/fuzzy-search/fuzzy-search.component.ts +1 -0
- package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +2 -0
- package/src/libs/feature/search/src/lib/utils/service/fields.ts +55 -0
- package/src/libs/ui/dataviz/src/index.ts +2 -2
- package/src/libs/ui/dataviz/src/lib/data-table/custom.mat.paginator.intl.ts +52 -0
- package/src/libs/ui/dataviz/src/lib/{table/table.component.css → data-table/data-table.component.css} +4 -0
- package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.html +67 -0
- package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.ts +173 -0
- package/src/libs/ui/dataviz/src/lib/data-table/data-table.data.source.ts +33 -0
- package/src/libs/ui/dataviz/src/lib/data-table/data-table.fixtures.ts +84 -0
- package/src/libs/ui/elements/src/index.ts +1 -0
- package/src/libs/ui/elements/src/lib/application-banner/application-banner.component.css +0 -0
- package/src/libs/ui/elements/src/lib/application-banner/application-banner.component.html +25 -0
- package/src/libs/ui/elements/src/lib/application-banner/application-banner.component.ts +70 -0
- package/src/libs/ui/elements/src/lib/markdown-parser/markdown-parser.component.ts +2 -2
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.html +3 -3
- package/src/libs/ui/elements/src/lib/metadata-info/metadata-info.component.ts +12 -2
- package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts +2 -0
- package/src/libs/ui/elements/src/lib/ui-elements.module.ts +3 -0
- package/src/libs/ui/inputs/src/index.ts +0 -1
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +48 -0
- package/src/libs/ui/inputs/src/lib/ui-inputs.module.ts +0 -3
- package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.html +37 -1
- package/src/libs/ui/search/src/lib/results-table/action-menu/action-menu.component.ts +8 -2
- package/src/libs/ui/search/src/lib/results-table/results-table.component.html +2 -0
- package/src/libs/ui/search/src/lib/results-table/results-table.component.ts +10 -2
- package/src/libs/ui/widgets/src/index.ts +0 -1
- package/src/libs/ui/widgets/src/lib/ui-widgets.module.ts +2 -3
- package/src/libs/util/data-fetcher/src/index.ts +3 -0
- package/src/libs/util/data-fetcher/src/lib/data-fetcher.ts +13 -4
- package/src/libs/util/data-fetcher/src/lib/model.ts +6 -2
- package/src/libs/util/data-fetcher/src/lib/readers/base-cache.ts +14 -0
- package/src/libs/util/data-fetcher/src/lib/readers/base-file.ts +2 -1
- package/src/libs/util/data-fetcher/src/lib/readers/base.ts +2 -2
- package/src/libs/util/data-fetcher/src/lib/readers/csv.ts +1 -1
- package/src/libs/util/data-fetcher/src/lib/readers/excel.ts +1 -1
- package/src/libs/util/data-fetcher/src/lib/readers/geojson.ts +1 -1
- package/src/libs/util/data-fetcher/src/lib/readers/gml.ts +7 -7
- package/src/libs/util/data-fetcher/src/lib/readers/json.ts +1 -1
- package/src/libs/util/data-fetcher/src/lib/readers/wfs.ts +53 -8
- package/src/libs/util/data-fetcher/src/lib/utils.ts +36 -32
- package/src/libs/util/shared/src/lib/services/date.service.ts +45 -0
- package/src/libs/util/shared/src/lib/services/index.ts +1 -0
- package/src/libs/util/shared/src/lib/utils/temporal-extent-union.ts +6 -3
- package/translations/de.json +10 -75
- package/translations/en.json +10 -75
- package/translations/es.json +9 -74
- package/translations/fr.json +22 -87
- package/translations/it.json +27 -91
- package/translations/nl.json +9 -74
- package/translations/pt.json +9 -74
- package/translations/sk.json +9 -74
- package/esm2022/libs/ui/dataviz/src/lib/table/table.component.mjs +0 -61
- package/esm2022/libs/ui/dataviz/src/lib/table/table.fixtures.mjs +0 -40
- package/esm2022/libs/ui/inputs/src/lib/chips-input/chips-input.component.mjs +0 -78
- package/esm2022/libs/ui/widgets/src/lib/step-bar/step-bar.component.mjs +0 -55
- package/libs/ui/dataviz/src/lib/table/table.component.d.ts +0 -29
- package/libs/ui/dataviz/src/lib/table/table.component.d.ts.map +0 -1
- package/libs/ui/dataviz/src/lib/table/table.fixtures.d.ts +0 -11
- package/libs/ui/dataviz/src/lib/table/table.fixtures.d.ts.map +0 -1
- package/libs/ui/inputs/src/lib/chips-input/chips-input.component.d.ts +0 -33
- package/libs/ui/inputs/src/lib/chips-input/chips-input.component.d.ts.map +0 -1
- package/libs/ui/widgets/src/lib/step-bar/step-bar.component.d.ts +0 -21
- package/libs/ui/widgets/src/lib/step-bar/step-bar.component.d.ts.map +0 -1
- package/src/libs/data-access/datafeeder/src/index.ts +0 -1
- package/src/libs/data-access/datafeeder/src/openapi/api/api.ts +0 -11
- package/src/libs/data-access/datafeeder/src/openapi/api/config.api.service.ts +0 -168
- package/src/libs/data-access/datafeeder/src/openapi/api/dataPublishing.api.service.ts +0 -270
- package/src/libs/data-access/datafeeder/src/openapi/api/fileUpload.api.service.ts +0 -734
- package/src/libs/data-access/datafeeder/src/openapi/api.module.ts +0 -46
- package/src/libs/data-access/datafeeder/src/openapi/configuration.ts +0 -125
- package/src/libs/data-access/datafeeder/src/openapi/encoder.ts +0 -20
- package/src/libs/data-access/datafeeder/src/openapi/index.ts +0 -5
- package/src/libs/data-access/datafeeder/src/openapi/model/analysisStatusEnum.api.model.ts +0 -24
- package/src/libs/data-access/datafeeder/src/openapi/model/boundingBox.api.model.ts +0 -20
- package/src/libs/data-access/datafeeder/src/openapi/model/cRS.api.model.ts +0 -25
- package/src/libs/data-access/datafeeder/src/openapi/model/datasetMetadata.api.model.ts +0 -45
- package/src/libs/data-access/datafeeder/src/openapi/model/datasetPublishRequest.api.model.ts +0 -39
- package/src/libs/data-access/datafeeder/src/openapi/model/datasetPublishingStatus.api.model.ts +0 -50
- package/src/libs/data-access/datafeeder/src/openapi/model/datasetUploadStatus.api.model.ts +0 -39
- package/src/libs/data-access/datafeeder/src/openapi/model/models.ts +0 -13
- package/src/libs/data-access/datafeeder/src/openapi/model/property.api.model.ts +0 -17
- package/src/libs/data-access/datafeeder/src/openapi/model/publishJobStatus.api.model.ts +0 -33
- package/src/libs/data-access/datafeeder/src/openapi/model/publishRequest.api.model.ts +0 -16
- package/src/libs/data-access/datafeeder/src/openapi/model/publishStatusEnum.api.model.ts +0 -20
- package/src/libs/data-access/datafeeder/src/openapi/model/publishStepEnum.api.model.ts +0 -42
- package/src/libs/data-access/datafeeder/src/openapi/model/uploadJobStatus.api.model.ts +0 -33
- package/src/libs/data-access/datafeeder/src/openapi/variables.ts +0 -9
- package/src/libs/data-access/datafeeder/src/spec.yaml +0 -537
- package/src/libs/ui/dataviz/src/lib/table/table.component.html +0 -40
- package/src/libs/ui/dataviz/src/lib/table/table.component.ts +0 -80
- package/src/libs/ui/dataviz/src/lib/table/table.fixtures.ts +0 -40
- package/src/libs/ui/inputs/src/lib/chips-input/chips-input.component.css +0 -36
- package/src/libs/ui/inputs/src/lib/chips-input/chips-input.component.html +0 -23
- package/src/libs/ui/inputs/src/lib/chips-input/chips-input.component.ts +0 -81
- package/src/libs/ui/widgets/src/lib/step-bar/step-bar.component.css +0 -3
- package/src/libs/ui/widgets/src/lib/step-bar/step-bar.component.html +0 -13
- package/src/libs/ui/widgets/src/lib/step-bar/step-bar.component.ts +0 -55
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
>
|
|
7
7
|
<ul class="flex flex-col gap-2 w-full">
|
|
8
8
|
<gn-ui-button
|
|
9
|
+
*ngIf="!isDraftPage"
|
|
9
10
|
type="light"
|
|
10
11
|
extraClass="flex flex-row items-center gap-2 w-full justify-start"
|
|
11
12
|
(buttonClick)="duplicate.emit()"
|
|
@@ -23,7 +24,10 @@
|
|
|
23
24
|
(buttonClick)="displayDeleteMenu()"
|
|
24
25
|
[disabled]="!canDelete"
|
|
25
26
|
data-test="record-menu-delete-button"
|
|
26
|
-
><span translate>record.action.delete</span
|
|
27
|
+
><span *ngIf="!isDraftPage" translate>record.action.delete</span>
|
|
28
|
+
<span *ngIf="isDraftPage" translate
|
|
29
|
+
>record.action.rollback</span
|
|
30
|
+
></gn-ui-button
|
|
27
31
|
>
|
|
28
32
|
</ul>
|
|
29
33
|
</div>
|
|
@@ -60,4 +64,36 @@
|
|
|
60
64
|
</div>
|
|
61
65
|
</div>
|
|
62
66
|
</ng-container>
|
|
67
|
+
<ng-container *ngSwitchCase="'rollbackMenu'">
|
|
68
|
+
<div
|
|
69
|
+
data-test="rollbackMenuSection"
|
|
70
|
+
class="w-80 p-6 flex flex-col gap-3 mt-2 border border-gray-100 bg-white shadow-2xl rounded-2xl"
|
|
71
|
+
>
|
|
72
|
+
<span class="text-lg font-bold text-center">{{
|
|
73
|
+
'editor.record.undo.confirmation.title' | translate
|
|
74
|
+
}}</span>
|
|
75
|
+
<span class="text-center">{{
|
|
76
|
+
'editor.record.undo.confirmation.message' | translate
|
|
77
|
+
}}</span>
|
|
78
|
+
<div class="flex flex-row gap-8 justify-center">
|
|
79
|
+
<gn-ui-button
|
|
80
|
+
(buttonClick)="rollback.emit()"
|
|
81
|
+
cdkFocusInitial
|
|
82
|
+
type="primary"
|
|
83
|
+
data-cy="confirm-button"
|
|
84
|
+
[style.--gn-ui-button-width]="'120px'"
|
|
85
|
+
>{{
|
|
86
|
+
'editor.record.undo.confirmation.confirmText' | translate
|
|
87
|
+
}}</gn-ui-button
|
|
88
|
+
>
|
|
89
|
+
<gn-ui-button
|
|
90
|
+
[style.--gn-ui-button-width]="'120px'"
|
|
91
|
+
(buttonClick)="closeActionMenu.emit()"
|
|
92
|
+
>{{
|
|
93
|
+
'editor.record.undo.confirmation.cancelText' | translate
|
|
94
|
+
}}</gn-ui-button
|
|
95
|
+
>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</ng-container>
|
|
63
99
|
</ng-container>
|
|
@@ -13,7 +13,7 @@ import { ConfirmationDialogComponent } from '../../../../../../../libs/ui/elemen
|
|
|
13
13
|
import { ButtonComponent } from '../../../../../../../libs/ui/inputs/src'
|
|
14
14
|
import { TranslateModule } from '@ngx-translate/core'
|
|
15
15
|
|
|
16
|
-
type ActionMenuPage = 'mainMenu' | 'deleteMenu'
|
|
16
|
+
type ActionMenuPage = 'mainMenu' | 'deleteMenu' | 'rollbackMenu'
|
|
17
17
|
|
|
18
18
|
@Component({
|
|
19
19
|
selector: 'gn-ui-action-menu',
|
|
@@ -32,9 +32,11 @@ type ActionMenuPage = 'mainMenu' | 'deleteMenu'
|
|
|
32
32
|
export class ActionMenuComponent {
|
|
33
33
|
@Input() canDuplicate: boolean
|
|
34
34
|
@Input() canDelete: boolean
|
|
35
|
+
@Input() isDraftPage: boolean
|
|
35
36
|
@Output() duplicate = new EventEmitter<void>()
|
|
36
37
|
@Output() delete = new EventEmitter<void>()
|
|
37
38
|
@Output() closeActionMenu = new EventEmitter<void>()
|
|
39
|
+
@Output() rollback = new EventEmitter<void>()
|
|
38
40
|
|
|
39
41
|
@ViewChild(MatMenuTrigger) trigger: MatMenuTrigger
|
|
40
42
|
|
|
@@ -55,7 +57,11 @@ export class ActionMenuComponent {
|
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
displayDeleteMenu() {
|
|
58
|
-
this.
|
|
60
|
+
if (this.isDraftPage) {
|
|
61
|
+
this.sectionDisplayed = 'rollbackMenu'
|
|
62
|
+
} else {
|
|
63
|
+
this.sectionDisplayed = 'deleteMenu'
|
|
64
|
+
}
|
|
59
65
|
this.cdr.markForCheck()
|
|
60
66
|
}
|
|
61
67
|
}
|
|
@@ -162,9 +162,11 @@
|
|
|
162
162
|
<gn-ui-action-menu
|
|
163
163
|
[canDuplicate]="canDuplicate(item) && !isDuplicating"
|
|
164
164
|
[canDelete]="canDelete(item)"
|
|
165
|
+
[isDraftPage]="isDraftPage"
|
|
165
166
|
(duplicate)="handleDuplicate(item)"
|
|
166
167
|
(delete)="handleDelete(item)"
|
|
167
168
|
(closeActionMenu)="closeActionMenu()"
|
|
169
|
+
(rollback)="handleRollback(item)"
|
|
168
170
|
>
|
|
169
171
|
</gn-ui-action-menu>
|
|
170
172
|
</ng-template>
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
InteractiveTableComponent,
|
|
22
22
|
} from '../../../../../../libs/ui/layout/src'
|
|
23
23
|
import {
|
|
24
|
+
DateService,
|
|
24
25
|
FileFormat,
|
|
25
26
|
formatUserInfo,
|
|
26
27
|
getBadgeColor,
|
|
@@ -73,6 +74,7 @@ export class ResultsTableComponent {
|
|
|
73
74
|
@Output() recordClick = new EventEmitter<CatalogRecord>()
|
|
74
75
|
@Output() duplicateRecord = new EventEmitter<CatalogRecord>()
|
|
75
76
|
@Output() deleteRecord = new EventEmitter<CatalogRecord>()
|
|
77
|
+
@Output() rollbackDraft = new EventEmitter<CatalogRecord>()
|
|
76
78
|
@Output() recordsSelectedChange = new EventEmitter<
|
|
77
79
|
[CatalogRecord[], boolean]
|
|
78
80
|
>()
|
|
@@ -86,7 +88,8 @@ export class ResultsTableComponent {
|
|
|
86
88
|
constructor(
|
|
87
89
|
private overlay: Overlay,
|
|
88
90
|
private viewContainerRef: ViewContainerRef,
|
|
89
|
-
private cdr: ChangeDetectorRef
|
|
91
|
+
private cdr: ChangeDetectorRef,
|
|
92
|
+
private dateService: DateService
|
|
90
93
|
) {}
|
|
91
94
|
|
|
92
95
|
openActionMenu(item, template) {
|
|
@@ -139,7 +142,7 @@ export class ResultsTableComponent {
|
|
|
139
142
|
}
|
|
140
143
|
|
|
141
144
|
dateToString(date: Date): string {
|
|
142
|
-
return date
|
|
145
|
+
return this.dateService.formatDate(date, {
|
|
143
146
|
year: 'numeric',
|
|
144
147
|
month: 'long',
|
|
145
148
|
day: 'numeric',
|
|
@@ -184,6 +187,11 @@ export class ResultsTableComponent {
|
|
|
184
187
|
this.closeActionMenu()
|
|
185
188
|
}
|
|
186
189
|
|
|
190
|
+
handleRollback(item: unknown) {
|
|
191
|
+
this.rollbackDraft.emit(item as CatalogRecord)
|
|
192
|
+
this.closeActionMenu()
|
|
193
|
+
}
|
|
194
|
+
|
|
187
195
|
setSortBy(col: string, order: 'asc' | 'desc') {
|
|
188
196
|
this.sortByChange.emit([col, order])
|
|
189
197
|
}
|
|
@@ -5,4 +5,3 @@ export * from './lib/loading-mask/loading-mask.component'
|
|
|
5
5
|
export * from './lib/color-scale/color-scale.component'
|
|
6
6
|
export * from './lib/popup-alert/popup-alert.component'
|
|
7
7
|
export * from './lib/spinning-loader/spinning-loader.component'
|
|
8
|
-
export * from './lib/step-bar/step-bar.component'
|
|
@@ -3,14 +3,13 @@ import { UtilSharedModule } from '../../../../../libs/util/shared/src'
|
|
|
3
3
|
import { TranslateModule } from '@ngx-translate/core'
|
|
4
4
|
import { NgxDropzoneModule } from 'ngx-dropzone'
|
|
5
5
|
import { ColorScaleComponent } from './color-scale/color-scale.component'
|
|
6
|
-
import { StepBarComponent } from './step-bar/step-bar.component'
|
|
7
6
|
import { TagInputModule } from 'ngx-chips'
|
|
8
7
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
|
|
9
8
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'
|
|
10
9
|
import { CommonModule } from '@angular/common'
|
|
11
10
|
|
|
12
11
|
@NgModule({
|
|
13
|
-
declarations: [ColorScaleComponent
|
|
12
|
+
declarations: [ColorScaleComponent],
|
|
14
13
|
imports: [
|
|
15
14
|
CommonModule,
|
|
16
15
|
TranslateModule.forChild(),
|
|
@@ -21,6 +20,6 @@ import { CommonModule } from '@angular/common'
|
|
|
21
20
|
UtilSharedModule,
|
|
22
21
|
MatProgressSpinnerModule,
|
|
23
22
|
],
|
|
24
|
-
exports: [
|
|
23
|
+
exports: [],
|
|
25
24
|
})
|
|
26
25
|
export class UiWidgetsModule {}
|
|
@@ -5,6 +5,9 @@ export {
|
|
|
5
5
|
DataItem,
|
|
6
6
|
FetchError,
|
|
7
7
|
FieldAggregation,
|
|
8
|
+
PropertyInfo,
|
|
8
9
|
} from './lib/model'
|
|
9
10
|
export { getJsonDataItemsProxy } from './lib/utils'
|
|
10
11
|
export { BaseReader } from './lib/readers/base'
|
|
12
|
+
export { BaseFileReader } from './lib/readers/base-file'
|
|
13
|
+
export { GeojsonReader } from './lib/readers/geojson'
|
|
@@ -17,10 +17,17 @@ export async function openDataset(
|
|
|
17
17
|
namespace?: string
|
|
18
18
|
wfsVersion?: WfsVersion
|
|
19
19
|
wfsFeatureType?: string
|
|
20
|
-
}
|
|
20
|
+
},
|
|
21
|
+
cacheActive?: boolean
|
|
21
22
|
): Promise<BaseReader> {
|
|
22
23
|
const fileType = await inferDatasetType(url, typeHint)
|
|
23
|
-
let reader:
|
|
24
|
+
let reader:
|
|
25
|
+
| CsvReader
|
|
26
|
+
| JsonReader
|
|
27
|
+
| GeojsonReader
|
|
28
|
+
| ExcelReader
|
|
29
|
+
| GmlReader
|
|
30
|
+
| WfsReader
|
|
24
31
|
try {
|
|
25
32
|
switch (fileType) {
|
|
26
33
|
case 'csv':
|
|
@@ -42,6 +49,7 @@ export async function openDataset(
|
|
|
42
49
|
reader = await WfsReader.createReader(url, options.wfsFeatureType)
|
|
43
50
|
break
|
|
44
51
|
}
|
|
52
|
+
reader.setCacheActive(cacheActive)
|
|
45
53
|
reader.load()
|
|
46
54
|
return reader
|
|
47
55
|
} catch (e: any) {
|
|
@@ -61,9 +69,10 @@ export async function openDataset(
|
|
|
61
69
|
export async function readDataset(
|
|
62
70
|
url: string,
|
|
63
71
|
typeHint?: SupportedType,
|
|
64
|
-
options?: any
|
|
72
|
+
options?: any,
|
|
73
|
+
cacheActive = true
|
|
65
74
|
): Promise<DataItem[]> {
|
|
66
|
-
const reader = await openDataset(url, typeHint, options)
|
|
75
|
+
const reader = await openDataset(url, typeHint, options, cacheActive)
|
|
67
76
|
try {
|
|
68
77
|
return await reader.read()
|
|
69
78
|
} catch (e: any) {
|
|
@@ -13,8 +13,12 @@ export class FetchError {
|
|
|
13
13
|
) {
|
|
14
14
|
this.message = `An error happened in the data fetcher, type: ${type}, info: ${info}`
|
|
15
15
|
}
|
|
16
|
-
static http(code: number) {
|
|
17
|
-
|
|
16
|
+
static http(code: number, body?: string) {
|
|
17
|
+
const info = body
|
|
18
|
+
? `Error ${code}
|
|
19
|
+
${body}`
|
|
20
|
+
: `${code}`
|
|
21
|
+
return new FetchError('http', info, code)
|
|
18
22
|
}
|
|
19
23
|
static corsOrNetwork(message: string) {
|
|
20
24
|
return new FetchError('network', message, 0)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseReader } from './base'
|
|
2
|
+
|
|
3
|
+
export abstract class BaseCacheReader extends BaseReader {
|
|
4
|
+
constructor(
|
|
5
|
+
protected url: string,
|
|
6
|
+
protected cacheActive = true
|
|
7
|
+
) {
|
|
8
|
+
super(url)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
setCacheActive(value: boolean) {
|
|
12
|
+
this.cacheActive = value
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -2,13 +2,14 @@ import { BaseReader } from './base'
|
|
|
2
2
|
import { DataItem, DatasetInfo, PropertyInfo } from '../model'
|
|
3
3
|
import { getJsonDataItemsProxy, jsonToGeojsonFeature } from '../utils'
|
|
4
4
|
import { generateSqlQuery } from '../sql-utils'
|
|
5
|
+
import { BaseCacheReader } from './base-cache'
|
|
5
6
|
|
|
6
7
|
type ParseResult = {
|
|
7
8
|
items: DataItem[]
|
|
8
9
|
properties: PropertyInfo[]
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
export class BaseFileReader extends
|
|
12
|
+
export class BaseFileReader extends BaseCacheReader {
|
|
12
13
|
private parseResult_: Promise<ParseResult>
|
|
13
14
|
|
|
14
15
|
protected getData(): Promise<ParseResult> {
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
|
|
12
12
|
export class BaseReader {
|
|
13
13
|
protected selected: FieldName[] = null
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
public groupedBy: FieldGroupBy[] = null
|
|
15
|
+
public aggregations: FieldAggregation[] = null
|
|
16
16
|
protected filter: FieldFilter = null
|
|
17
17
|
protected sort: FieldSort[] = null
|
|
18
18
|
protected startIndex: number = null
|
|
@@ -28,6 +28,6 @@ export function parseExcel(buffer: ArrayBuffer): Promise<{
|
|
|
28
28
|
|
|
29
29
|
export class ExcelReader extends BaseFileReader {
|
|
30
30
|
getData() {
|
|
31
|
-
return fetchDataAsArrayBuffer(this.url).then(parseExcel)
|
|
31
|
+
return fetchDataAsArrayBuffer(this.url, this.cacheActive).then(parseExcel)
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -37,17 +37,17 @@ export function parseGml(
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
export class GmlReader extends BaseFileReader {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
constructor(
|
|
41
|
+
protected url: string,
|
|
42
|
+
protected namespace: string,
|
|
43
|
+
protected version: WfsVersion,
|
|
44
|
+
protected cacheActive = true
|
|
45
|
+
) {
|
|
44
46
|
super(url)
|
|
45
|
-
this.namespace = namespace
|
|
46
|
-
this.version = version
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
protected getData() {
|
|
50
|
-
return fetchDataAsText(this.url).then((text) =>
|
|
50
|
+
return fetchDataAsText(this.url, this.cacheActive).then((text) =>
|
|
51
51
|
parseGml(text, this.namespace, this.version)
|
|
52
52
|
)
|
|
53
53
|
}
|
|
@@ -1,24 +1,46 @@
|
|
|
1
1
|
import { WfsEndpoint, WfsVersion } from '@camptocamp/ogc-client'
|
|
2
2
|
import { DataItem, DatasetInfo, PropertyInfo } from '../model'
|
|
3
3
|
import { fetchDataAsText } from '../utils'
|
|
4
|
-
import { BaseReader } from './base'
|
|
5
4
|
import { GmlReader, parseGml } from './gml'
|
|
6
5
|
import { GeojsonReader, parseGeojson } from './geojson'
|
|
6
|
+
import { BaseCacheReader } from './base-cache'
|
|
7
|
+
import { getJsonDataItemsProxy, jsonToGeojsonFeature } from '../utils'
|
|
8
|
+
import { generateSqlQuery } from '../sql-utils'
|
|
7
9
|
|
|
8
|
-
export class WfsReader extends
|
|
10
|
+
export class WfsReader extends BaseCacheReader {
|
|
9
11
|
endpoint: WfsEndpoint
|
|
10
12
|
featureTypeName: string
|
|
11
13
|
version: WfsVersion
|
|
12
14
|
|
|
13
|
-
constructor(
|
|
14
|
-
|
|
15
|
+
constructor(
|
|
16
|
+
url: string,
|
|
17
|
+
wfsEndpoint: WfsEndpoint,
|
|
18
|
+
featureTypeName: string,
|
|
19
|
+
cacheActive?: boolean
|
|
20
|
+
) {
|
|
21
|
+
super(url, cacheActive)
|
|
15
22
|
this.endpoint = wfsEndpoint
|
|
16
23
|
this.featureTypeName = featureTypeName
|
|
17
24
|
this.version = this.endpoint.getVersion()
|
|
18
25
|
}
|
|
19
26
|
|
|
20
27
|
get properties(): Promise<PropertyInfo[]> {
|
|
21
|
-
return this.
|
|
28
|
+
return this.endpoint
|
|
29
|
+
.getFeatureTypeFull(this.featureTypeName)
|
|
30
|
+
.then((featureType) =>
|
|
31
|
+
Object.keys(featureType.properties).map((prop) => {
|
|
32
|
+
const originalType = featureType.properties[prop]
|
|
33
|
+
const type =
|
|
34
|
+
originalType === 'float' || originalType === 'integer'
|
|
35
|
+
? 'number'
|
|
36
|
+
: (originalType as PropertyInfo['type']) // FIXME: ogc-client typing is incorrect, should be a string union
|
|
37
|
+
return {
|
|
38
|
+
name: prop,
|
|
39
|
+
label: prop,
|
|
40
|
+
type,
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
)
|
|
22
44
|
}
|
|
23
45
|
|
|
24
46
|
get info(): Promise<DatasetInfo> {
|
|
@@ -74,13 +96,18 @@ export class WfsReader extends BaseReader {
|
|
|
74
96
|
}
|
|
75
97
|
}
|
|
76
98
|
|
|
77
|
-
|
|
99
|
+
public async getData(aggregation?, groupedBy?) {
|
|
100
|
+
if (aggregation || groupedBy) {
|
|
101
|
+
return { items: await this.getQueryData() }
|
|
102
|
+
}
|
|
78
103
|
const asJson = this.endpoint.supportsJson(this.featureTypeName)
|
|
104
|
+
const attributes = this.selected ?? undefined
|
|
79
105
|
let url = this.endpoint.getFeatureUrl(this.featureTypeName, {
|
|
80
106
|
...(this.startIndex !== null && { startIndex: this.startIndex }),
|
|
81
107
|
...(this.count !== null && { maxFeatures: this.count }),
|
|
82
108
|
asJson,
|
|
83
109
|
outputCrs: 'EPSG:4326',
|
|
110
|
+
attributes,
|
|
84
111
|
// sortBy: this.sort // TODO: no sort in ogc-client?
|
|
85
112
|
})
|
|
86
113
|
|
|
@@ -95,18 +122,36 @@ export class WfsReader extends BaseReader {
|
|
|
95
122
|
url = `${url}${finalUrl.search ? '&' : ''}SORTBY=${sorts}`
|
|
96
123
|
}
|
|
97
124
|
|
|
98
|
-
return fetchDataAsText(url).then((text) =>
|
|
125
|
+
return fetchDataAsText(url, this.cacheActive).then((text) =>
|
|
99
126
|
asJson
|
|
100
127
|
? parseGeojson(text)
|
|
101
128
|
: parseGml(text, this.featureTypeName, this.version)
|
|
102
129
|
)
|
|
103
130
|
}
|
|
104
131
|
|
|
132
|
+
public async getQueryData() {
|
|
133
|
+
const items = (await this.getData()).items
|
|
134
|
+
const jsonItems = getJsonDataItemsProxy(items)
|
|
135
|
+
const query = generateSqlQuery(
|
|
136
|
+
this.selected,
|
|
137
|
+
this.filter,
|
|
138
|
+
this.sort,
|
|
139
|
+
this.startIndex,
|
|
140
|
+
this.count,
|
|
141
|
+
this.groupedBy,
|
|
142
|
+
this.aggregations
|
|
143
|
+
)
|
|
144
|
+
const result = await import('alasql').then((module) =>
|
|
145
|
+
module.default(query, [jsonItems])
|
|
146
|
+
)
|
|
147
|
+
return result.map(jsonToGeojsonFeature)
|
|
148
|
+
}
|
|
149
|
+
|
|
105
150
|
load() {
|
|
106
151
|
// Nothing to load for Wfs
|
|
107
152
|
}
|
|
108
153
|
|
|
109
154
|
async read(): Promise<DataItem[]> {
|
|
110
|
-
return (await this.getData()).items
|
|
155
|
+
return (await this.getData(this.aggregations, this.groupedBy)).items
|
|
111
156
|
}
|
|
112
157
|
}
|
|
@@ -51,39 +51,43 @@ export function fetchHeaders(url: string): Promise<DatasetHeaders> {
|
|
|
51
51
|
})
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
export function fetchDataAsText(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
54
|
+
export function fetchDataAsText(
|
|
55
|
+
url: string,
|
|
56
|
+
cacheActive: boolean
|
|
57
|
+
): Promise<string> {
|
|
58
|
+
const fetchFactory = () =>
|
|
59
|
+
sharedFetch(url)
|
|
60
|
+
.catch((error) => {
|
|
61
|
+
throw FetchError.corsOrNetwork(error.message)
|
|
62
|
+
})
|
|
63
|
+
.then(async (response) => {
|
|
64
|
+
if (!response.ok) {
|
|
65
|
+
throw FetchError.http(response.status, await response.text())
|
|
66
|
+
}
|
|
67
|
+
return response.text()
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
return cacheActive ? useCache(fetchFactory, url, 'asText') : fetchFactory()
|
|
70
71
|
}
|
|
71
|
-
export function fetchDataAsArrayBuffer(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
72
|
+
export function fetchDataAsArrayBuffer(
|
|
73
|
+
url: string,
|
|
74
|
+
cacheActive: boolean
|
|
75
|
+
): Promise<ArrayBuffer> {
|
|
76
|
+
const fetchFactory = () =>
|
|
77
|
+
sharedFetch(url)
|
|
78
|
+
.catch((error) => {
|
|
79
|
+
throw FetchError.corsOrNetwork(error.message)
|
|
80
|
+
})
|
|
81
|
+
.then(async (response) => {
|
|
82
|
+
if (!response.ok) {
|
|
83
|
+
throw FetchError.http(response.status, await response.text())
|
|
84
|
+
}
|
|
85
|
+
// convert to a numeric array so that we can store the response in cache
|
|
86
|
+
return Array.from(new Uint8Array(await response.arrayBuffer()))
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
cacheActive ? useCache(fetchFactory, url, 'asArrayBuffer') : fetchFactory()
|
|
87
91
|
).then((array) => {
|
|
88
92
|
return new Uint8Array(array).buffer
|
|
89
93
|
})
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core'
|
|
2
|
+
import { TranslateService } from '@ngx-translate/core'
|
|
3
|
+
|
|
4
|
+
@Injectable({
|
|
5
|
+
providedIn: 'root',
|
|
6
|
+
})
|
|
7
|
+
export class DateService {
|
|
8
|
+
constructor(private translateService: TranslateService) {}
|
|
9
|
+
|
|
10
|
+
private getDateObject(date: Date | string): Date {
|
|
11
|
+
if (typeof date === 'string') {
|
|
12
|
+
const dateObj = new Date(date)
|
|
13
|
+
if (isNaN(dateObj.getTime())) {
|
|
14
|
+
throw new Error('Invalid date string')
|
|
15
|
+
}
|
|
16
|
+
return dateObj
|
|
17
|
+
}
|
|
18
|
+
return date
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
private getLocaleAndDate(date: Date | string): {
|
|
22
|
+
locale: string
|
|
23
|
+
dateObj: Date
|
|
24
|
+
} {
|
|
25
|
+
const locale = this.translateService.currentLang || 'en-US'
|
|
26
|
+
const dateObj = this.getDateObject(date)
|
|
27
|
+
return { locale, dateObj }
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
formatDate(
|
|
31
|
+
date: Date | string,
|
|
32
|
+
options?: Intl.DateTimeFormatOptions
|
|
33
|
+
): string {
|
|
34
|
+
const { locale, dateObj } = this.getLocaleAndDate(date)
|
|
35
|
+
return dateObj.toLocaleDateString(locale, options)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
formatDateTime(
|
|
39
|
+
date: Date | string,
|
|
40
|
+
options?: Intl.DateTimeFormatOptions
|
|
41
|
+
): string {
|
|
42
|
+
const { locale, dateObj } = this.getLocaleAndDate(date)
|
|
43
|
+
return dateObj.toLocaleString(locale, options)
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { DateService } from '../services'
|
|
2
|
+
|
|
1
3
|
export function getTemporalRangeUnion(
|
|
2
4
|
ranges: {
|
|
3
5
|
start?: Date
|
|
4
6
|
end?: Date
|
|
5
|
-
}[]
|
|
7
|
+
}[],
|
|
8
|
+
dateService: DateService
|
|
6
9
|
) {
|
|
7
10
|
let earliestStartDate = Infinity
|
|
8
11
|
let latestEndDate = -Infinity
|
|
@@ -24,11 +27,11 @@ export function getTemporalRangeUnion(
|
|
|
24
27
|
return {
|
|
25
28
|
start:
|
|
26
29
|
earliestStartDate !== -Infinity
|
|
27
|
-
? new Date(earliestStartDate)
|
|
30
|
+
? dateService.formatDate(new Date(earliestStartDate))
|
|
28
31
|
: undefined,
|
|
29
32
|
end:
|
|
30
33
|
latestEndDate !== Infinity
|
|
31
|
-
? new Date(latestEndDate)
|
|
34
|
+
? dateService.formatDate(new Date(latestEndDate))
|
|
32
35
|
: undefined,
|
|
33
36
|
}
|
|
34
37
|
} else {
|