geonetwork-ui 2.7.0-dev.d500b08cc → 2.7.0-dev.d51ff2ddf
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/utils/status.mapper.mjs +4 -1
- package/esm2022/libs/api/metadata-converter/src/lib/iso19139/write-parts.mjs +5 -1
- package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/constant.mjs +4 -6
- package/esm2022/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.mjs +47 -3
- package/esm2022/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.mjs +32 -4
- package/esm2022/libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model.mjs +1 -1
- package/esm2022/libs/common/domain/src/lib/model/record/metadata.model.mjs +5 -1
- package/esm2022/libs/common/domain/src/lib/platform.service.interface.mjs +1 -1
- package/esm2022/libs/feature/dataviz/src/lib/chart-view/chart-view.component.mjs +10 -2
- package/esm2022/libs/feature/dataviz/src/lib/service/data.service.mjs +2 -2
- package/esm2022/libs/feature/editor/src/index.mjs +2 -1
- package/esm2022/libs/feature/editor/src/lib/components/metadata-quality-panel/metadata-quality-panel.component.mjs +80 -0
- package/esm2022/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.mjs +3 -3
- package/esm2022/libs/feature/editor/src/lib/fields.config.mjs +1 -3
- package/esm2022/libs/feature/map/src/lib/utils/map-utils.service.mjs +3 -5
- package/esm2022/libs/feature/record/src/lib/data-view/data-view.component.mjs +31 -12
- package/esm2022/libs/feature/record/src/lib/map-view/map-view.component.mjs +76 -27
- package/esm2022/libs/feature/record/src/lib/state/mdview.effects.mjs +4 -2
- package/esm2022/libs/feature/search/src/lib/state/reducer.mjs +5 -2
- package/esm2022/libs/ui/dataviz/src/lib/data-table/data-table.component.mjs +4 -3
- package/esm2022/libs/ui/elements/src/lib/downloads-list/downloads-list.component.mjs +5 -4
- package/esm2022/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.mjs +5 -4
- package/esm2022/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.mjs +4 -4
- package/esm2022/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.mjs +21 -43
- package/esm2022/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.mjs +5 -4
- package/esm2022/libs/ui/map/src/lib/components/map-legend/map-legend.component.mjs +2 -2
- package/esm2022/libs/util/app-config/src/lib/app-config.mjs +5 -1
- package/esm2022/libs/util/app-config/src/lib/model.mjs +1 -1
- package/esm2022/libs/util/shared/src/index.mjs +2 -2
- package/esm2022/libs/util/shared/src/lib/links/link-utils.mjs +12 -2
- package/esm2022/libs/util/shared/src/lib/record/index.mjs +3 -0
- package/esm2022/libs/util/shared/src/lib/record/quality-score.util.mjs +45 -0
- package/esm2022/libs/util/shared/src/lib/record/record.util.mjs +56 -0
- package/esm2022/libs/util/shared/src/lib/utils/geojson.mjs +58 -1
- package/esm2022/libs/util/shared/src/lib/utils/index.mjs +2 -1
- package/esm2022/libs/util/shared/src/lib/utils/mobile-screen.mjs +9 -0
- package/esm2022/translations/de.json +9 -1
- package/esm2022/translations/en.json +9 -1
- package/esm2022/translations/es.json +9 -1
- package/esm2022/translations/fr.json +10 -2
- package/esm2022/translations/it.json +9 -1
- package/esm2022/translations/nl.json +9 -1
- package/esm2022/translations/pt.json +9 -1
- package/esm2022/translations/sk.json +9 -1
- package/fesm2022/geonetwork-ui.mjs +2725 -2331
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/utils/status.mapper.d.ts.map +1 -1
- package/libs/api/metadata-converter/src/lib/iso19139/write-parts.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/elasticsearch/constant.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts +1 -1
- package/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.d.ts.map +1 -1
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts +3 -0
- package/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model.d.ts +1 -0
- package/libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/model/record/metadata.model.d.ts.map +1 -1
- package/libs/common/domain/src/lib/platform.service.interface.d.ts +1 -0
- package/libs/common/domain/src/lib/platform.service.interface.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts +3 -2
- package/libs/feature/dataviz/src/lib/chart-view/chart-view.component.d.ts.map +1 -1
- package/libs/feature/dataviz/src/lib/service/data.service.d.ts.map +1 -1
- package/libs/feature/editor/src/index.d.ts +1 -0
- package/libs/feature/editor/src/index.d.ts.map +1 -1
- package/libs/feature/editor/src/lib/components/metadata-quality-panel/metadata-quality-panel.component.d.ts +19 -0
- package/libs/feature/editor/src/lib/components/metadata-quality-panel/metadata-quality-panel.component.d.ts.map +1 -0
- package/libs/feature/editor/src/lib/fields.config.d.ts.map +1 -1
- package/libs/feature/map/src/lib/utils/map-utils.service.d.ts +2 -2
- package/libs/feature/map/src/lib/utils/map-utils.service.d.ts.map +1 -1
- package/libs/feature/record/src/lib/data-view/data-view.component.d.ts +8 -4
- package/libs/feature/record/src/lib/data-view/data-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts +12 -5
- package/libs/feature/record/src/lib/map-view/map-view.component.d.ts.map +1 -1
- package/libs/feature/record/src/lib/state/mdview.effects.d.ts.map +1 -1
- package/libs/feature/search/src/lib/state/reducer.d.ts.map +1 -1
- package/libs/ui/dataviz/src/lib/data-table/data-table.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts +1 -0
- package/libs/ui/elements/src/lib/downloads-list/downloads-list.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.d.ts +1 -0
- package/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.d.ts.map +1 -1
- package/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.d.ts +7 -6
- package/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.d.ts.map +1 -1
- package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts +1 -0
- package/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.d.ts.map +1 -1
- package/libs/util/app-config/src/lib/app-config.d.ts.map +1 -1
- package/libs/util/app-config/src/lib/model.d.ts +2 -0
- package/libs/util/app-config/src/lib/model.d.ts.map +1 -1
- package/libs/util/shared/src/index.d.ts +1 -1
- package/libs/util/shared/src/index.d.ts.map +1 -1
- package/libs/util/shared/src/lib/links/link-utils.d.ts +2 -1
- package/libs/util/shared/src/lib/links/link-utils.d.ts.map +1 -1
- package/libs/util/shared/src/lib/record/index.d.ts +3 -0
- package/libs/util/shared/src/lib/record/index.d.ts.map +1 -0
- package/libs/util/shared/src/lib/record/quality-score.util.d.ts +13 -0
- package/libs/util/shared/src/lib/record/quality-score.util.d.ts.map +1 -0
- package/libs/util/shared/src/lib/record/record.util.d.ts +3 -0
- package/libs/util/shared/src/lib/record/record.util.d.ts.map +1 -0
- package/libs/util/shared/src/lib/utils/geojson.d.ts +7 -2
- package/libs/util/shared/src/lib/utils/geojson.d.ts.map +1 -1
- package/libs/util/shared/src/lib/utils/index.d.ts +1 -0
- package/libs/util/shared/src/lib/utils/index.d.ts.map +1 -1
- package/libs/util/shared/src/lib/utils/mobile-screen.d.ts +2 -0
- package/libs/util/shared/src/lib/utils/mobile-screen.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/utils/status.mapper.ts +3 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/utils/status.mapper.ts +3 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/write-parts.ts +4 -0
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/constant.ts +3 -5
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +50 -3
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +38 -4
- package/src/libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model.ts +1 -0
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +4 -0
- package/src/libs/common/domain/src/lib/platform.service.interface.ts +2 -0
- package/src/libs/common/fixtures/src/lib/editor/editor.fixtures.ts +0 -3
- package/src/libs/feature/dataviz/src/lib/chart-view/chart-view.component.ts +10 -1
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +3 -1
- package/src/libs/feature/editor/src/index.ts +1 -0
- package/src/libs/feature/editor/src/lib/components/metadata-quality-panel/metadata-quality-panel.component.css +0 -0
- package/src/libs/feature/editor/src/lib/components/metadata-quality-panel/metadata-quality-panel.component.html +37 -0
- package/src/libs/feature/editor/src/lib/components/metadata-quality-panel/metadata-quality-panel.component.ts +90 -0
- package/src/libs/feature/editor/src/lib/components/multilingual-panel/multilingual-panel.component.html +2 -1
- package/src/libs/feature/editor/src/lib/fields.config.ts +0 -2
- package/src/libs/feature/map/src/lib/utils/map-utils.service.ts +8 -8
- package/src/libs/feature/record/src/lib/data-view/data-view.component.html +2 -0
- package/src/libs/feature/record/src/lib/data-view/data-view.component.ts +34 -15
- package/src/libs/feature/record/src/lib/map-view/map-view.component.html +5 -2
- package/src/libs/feature/record/src/lib/map-view/map-view.component.ts +70 -23
- package/src/libs/feature/record/src/lib/state/mdview.effects.ts +5 -1
- package/src/libs/feature/search/src/lib/state/reducer.ts +4 -1
- package/src/libs/ui/dataviz/src/lib/data-table/data-table.component.ts +6 -1
- package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.html +12 -11
- package/src/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +7 -1
- package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.html +4 -1
- package/src/libs/ui/elements/src/lib/geo-data-badge/geo-data-badge.component.ts +7 -1
- package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.html +1 -0
- package/src/libs/ui/elements/src/lib/internal-link-card/internal-link-card.component.ts +5 -1
- package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.html +1 -0
- package/src/libs/ui/elements/src/lib/metadata-quality/metadata-quality.component.ts +21 -54
- package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.html +7 -1
- package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts +3 -1
- package/src/libs/ui/map/src/lib/components/map-legend/map-legend.component.ts +1 -1
- package/src/libs/util/app-config/src/lib/app-config.ts +4 -0
- package/src/libs/util/app-config/src/lib/model.ts +2 -0
- package/src/libs/util/shared/src/index.ts +1 -1
- package/src/libs/util/shared/src/lib/links/link-utils.ts +11 -1
- package/src/libs/util/shared/src/lib/record/index.ts +2 -0
- package/src/libs/util/shared/src/lib/record/quality-score.util.ts +69 -0
- package/src/libs/util/shared/src/lib/{record.util.ts → record/record.util.ts} +1 -1
- package/src/libs/util/shared/src/lib/utils/geojson.ts +72 -2
- package/src/libs/util/shared/src/lib/utils/index.ts +1 -0
- package/src/libs/util/shared/src/lib/utils/mobile-screen.ts +14 -0
- package/translations/de.json +9 -1
- package/translations/en.json +9 -1
- package/translations/es.json +9 -1
- package/translations/fr.json +10 -2
- package/translations/it.json +9 -1
- package/translations/nl.json +9 -1
- package/translations/pt.json +9 -1
- package/translations/sk.json +9 -1
- package/esm2022/libs/util/shared/src/lib/record.util.mjs +0 -56
- package/libs/util/shared/src/lib/record.util.d.ts +0 -3
- package/libs/util/shared/src/lib/record.util.d.ts.map +0 -1
|
@@ -7,7 +7,7 @@ export declare const FORMATS: {
|
|
|
7
7
|
readonly mimeTypes: readonly ["text/csv", "application/csv"];
|
|
8
8
|
};
|
|
9
9
|
readonly excel: {
|
|
10
|
-
readonly extensions: readonly ["excel", "
|
|
10
|
+
readonly extensions: readonly ["excel", "xlsx", "xls", "ms-excel", "openxmlformats-officedocument"];
|
|
11
11
|
readonly priority: 2;
|
|
12
12
|
readonly color: "#FFDE10";
|
|
13
13
|
readonly mimeTypes: readonly ["application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"];
|
|
@@ -106,6 +106,7 @@ export declare function isFormatInQueryParam(link: DatasetOnlineResource | Servi
|
|
|
106
106
|
export declare function mimeTypeToFormat(mimeType: string): FileFormat;
|
|
107
107
|
export declare function checkFileFormat(link: DatasetOnlineResource | ServiceOnlineResource, format: FileFormat): boolean;
|
|
108
108
|
export declare function getBadgeColor(linkFormat: FileFormat): string;
|
|
109
|
+
export declare function getLinkId(link: DatasetOnlineResource): string;
|
|
109
110
|
export declare function getLinkLabel(link: DatasetOnlineResource | ServiceOnlineResource): string;
|
|
110
111
|
export declare function getLayers(url: string, serviceProtocol: ServiceProtocol): Promise<{
|
|
111
112
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-utils.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/links/link-utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EAChB,MAAM,2DAA2D,CAAA;AAUlE,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgHV,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,OAAO,CAAA;AAE7C,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAUhE;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,qBAAqB,GAAG,qBAAqB,GAClD,MAAM,CAER;AAED,wBAAgB,8BAA8B,CAC5C,aAAa,EAAE,MAAM,GACpB,UAAU,GAAG,IAAI,CAgBnB;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,qBAAqB,GAAG,qBAAqB,GAClD,UAAU,CAcZ;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,qBAAqB,GAAG,qBAAqB,EACnD,KAAK,EAAE,MAAM,GACZ,OAAO,
|
|
1
|
+
{"version":3,"file":"link-utils.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/links/link-utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EAChB,MAAM,2DAA2D,CAAA;AAUlE,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgHV,CAAA;AAEV,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,OAAO,CAAA;AAE7C,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAUhE;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,qBAAqB,GAAG,qBAAqB,GAClD,MAAM,CAER;AAED,wBAAgB,8BAA8B,CAC5C,aAAa,EAAE,MAAM,GACpB,UAAU,GAAG,IAAI,CAgBnB;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,qBAAqB,GAAG,qBAAqB,GAClD,UAAU,CAcZ;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,qBAAqB,GAAG,qBAAqB,EACnD,KAAK,EAAE,MAAM,GACZ,OAAO,CAST;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAO7D;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,qBAAqB,GAAG,qBAAqB,EACnD,MAAM,EAAE,UAAU,GACjB,OAAO,CAQT;AAED,wBAAgB,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAQ5D;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,qBAAqB,GAAG,MAAM,CAO7D;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,qBAAqB,GAAG,qBAAqB,GAClD,MAAM,CA6BR;AAED,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe;;;;;;8JAmC5E;AAED,wBAAgB,eAAe,CAAC,SAAS,KAAA,SAUxC;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAEtE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/record/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record';
|
|
2
|
+
type TValidatorMapper = {
|
|
3
|
+
[key: string]: (metadata: Partial<CatalogRecord>) => boolean;
|
|
4
|
+
};
|
|
5
|
+
declare const ValidatorMapper: TValidatorMapper;
|
|
6
|
+
export type ValidatorMapperKeys = keyof typeof ValidatorMapper & string;
|
|
7
|
+
export declare function getAllKeysValidator(): string[];
|
|
8
|
+
export declare function getQualityValidators(record: Partial<CatalogRecord>, propsToValidate: ValidatorMapperKeys[]): {
|
|
9
|
+
name: string;
|
|
10
|
+
validator: () => boolean;
|
|
11
|
+
}[];
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=quality-score.util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quality-score.util.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/record/quality-score.util.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEd,MAAM,2DAA2D,CAAA;AAElE,KAAK,gBAAgB,GAAG;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,aAAa,CAAC,KAAK,OAAO,CAAA;CAC7D,CAAA;AAED,QAAA,MAAM,eAAe,EAAE,gBAcb,CAAA;AAEV,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,eAAe,GAAG,MAAM,CAAA;AAEvE,wBAAgB,mBAAmB,aAElC;AA2BD,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,EAC9B,eAAe,EAAE,mBAAmB,EAAE;;;IAUvC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { CatalogRecord, LanguageCode } from '../../../../../../libs/common/domain/src/lib/model/record';
|
|
2
|
+
export declare function updateLanguages<T extends CatalogRecord>(record: T, defaultLanguage: LanguageCode, otherLanguages: LanguageCode[]): T;
|
|
3
|
+
//# sourceMappingURL=record.util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record.util.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/record/record.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EAMb,YAAY,EAIb,MAAM,2DAA2D,CAAA;AAalE,wBAAgB,eAAe,CAAC,CAAC,SAAS,aAAa,EACrD,MAAM,EAAE,CAAC,EACT,eAAe,EAAE,YAAY,EAC7B,cAAc,EAAE,YAAY,EAAE,GAC7B,CAAC,CAoFH"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import { Feature, FeatureCollection, Geometry } from 'geojson';
|
|
2
|
-
|
|
1
|
+
import type { Feature, FeatureCollection, Geometry } from 'geojson';
|
|
2
|
+
/**
|
|
3
|
+
* @returns The geometry if available, otherwise null.
|
|
4
|
+
*/
|
|
5
|
+
export declare function getGeometryFromGeoJSON(data: FeatureCollection | Feature | Geometry): Geometry | null;
|
|
6
|
+
export type BoundingBox = [number, number, number, number];
|
|
7
|
+
export declare function getGeometryBoundingBox(geometry: Geometry): BoundingBox;
|
|
3
8
|
//# sourceMappingURL=geojson.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geojson.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/utils/geojson.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"geojson.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/utils/geojson.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAY,MAAM,SAAS,CAAA;AAE7E;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,iBAAiB,GAAG,OAAO,GAAG,QAAQ,GAC3C,QAAQ,GAAG,IAAI,CAqBjB;AAGD,MAAM,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;AAE1D,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,GAAG,WAAW,CA8DtE"}
|
|
@@ -4,6 +4,7 @@ export * from './format-fields';
|
|
|
4
4
|
export * from './fuzzy-filter';
|
|
5
5
|
export * from './geojson';
|
|
6
6
|
export * from './image-resize';
|
|
7
|
+
export * from './mobile-screen';
|
|
7
8
|
export * from './no-duplicate-file-name';
|
|
8
9
|
export * from './parse';
|
|
9
10
|
export * from './remove-whitespace';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,0BAA0B,CAAA;AACxC,cAAc,SAAS,CAAA;AACvB,cAAc,qBAAqB,CAAA;AACnC,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,OAAO,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA;AACvB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,SAAS,CAAA;AACvB,cAAc,qBAAqB,CAAA;AACnC,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,OAAO,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobile-screen.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/util/shared/src/lib/utils/mobile-screen.ts"],"names":[],"mappings":"AAOA,wBAAgB,WAAW,uCAM1B"}
|
package/package.json
CHANGED
|
@@ -11,8 +11,11 @@ export function getStatusFromStatusCode(statusCode: string): RecordStatus {
|
|
|
11
11
|
case 'onGoing':
|
|
12
12
|
return 'ongoing'
|
|
13
13
|
case 'planned':
|
|
14
|
+
return 'planned'
|
|
14
15
|
case 'required':
|
|
16
|
+
return 'required'
|
|
15
17
|
case 'underDevelopment':
|
|
18
|
+
return 'under_development'
|
|
16
19
|
default:
|
|
17
20
|
return 'under_development'
|
|
18
21
|
}
|
|
@@ -11,8 +11,11 @@ export function getStatusFromStatusCode(statusCode: string): RecordStatus {
|
|
|
11
11
|
case 'onGoing':
|
|
12
12
|
return 'ongoing'
|
|
13
13
|
case 'planned':
|
|
14
|
+
return 'planned'
|
|
14
15
|
case 'required':
|
|
16
|
+
return 'required'
|
|
15
17
|
case 'underDevelopment':
|
|
18
|
+
return 'under_development'
|
|
16
19
|
default:
|
|
17
20
|
return 'under_development'
|
|
18
21
|
}
|
|
@@ -183,6 +183,10 @@ export function getProgressCode(status: RecordStatus): string {
|
|
|
183
183
|
return 'removed'
|
|
184
184
|
case 'under_development':
|
|
185
185
|
return 'underDevelopment'
|
|
186
|
+
case 'planned':
|
|
187
|
+
return 'planned'
|
|
188
|
+
case 'required':
|
|
189
|
+
return 'required'
|
|
186
190
|
default:
|
|
187
191
|
throw new Error(
|
|
188
192
|
`Could not determine progress code from status: ${status}`
|
|
@@ -10,14 +10,12 @@ export const ES_SOURCE_SUMMARY = [
|
|
|
10
10
|
'codelist_status_text',
|
|
11
11
|
'link',
|
|
12
12
|
'linkProtocol',
|
|
13
|
-
'contactForResource
|
|
14
|
-
'contact
|
|
15
|
-
'contact
|
|
13
|
+
'contactForResource*.organisation*',
|
|
14
|
+
'contact*.organisation*',
|
|
15
|
+
'contact*.email',
|
|
16
16
|
'userSavedCount',
|
|
17
|
-
'updateFrequency',
|
|
18
17
|
'cl_topic',
|
|
19
18
|
'cl_maintenanceAndUpdateFrequency',
|
|
20
|
-
'tag',
|
|
21
19
|
'MD_LegalConstraints*Object',
|
|
22
20
|
'qualityScore',
|
|
23
21
|
'allKeywords',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Injectable, Injector } from '@angular/core'
|
|
2
|
-
import { Geometry } from 'geojson'
|
|
2
|
+
import type { Geometry } from 'geojson'
|
|
3
3
|
import {
|
|
4
4
|
ES_QUERY_FIELDS_PRIORITY,
|
|
5
5
|
ES_SOURCE_SUMMARY,
|
|
@@ -30,6 +30,9 @@ import { getLang3FromLang2 } from '../../../../../../../libs/util/i18n/src'
|
|
|
30
30
|
import { formatDate, isDateRange } from './date-range.utils'
|
|
31
31
|
import { CatalogRecord } from '../../../../../../../libs/common/domain/src/lib/model/record'
|
|
32
32
|
import { TranslateService } from '@ngx-translate/core'
|
|
33
|
+
import { getGeometryBoundingBox } from '../../../../../../../libs/util/shared/src'
|
|
34
|
+
import { getLength as getGeodesicLength } from 'ol/sphere'
|
|
35
|
+
import { LineString } from 'ol/geom'
|
|
33
36
|
|
|
34
37
|
export type DateRange = { start?: Date; end?: Date }
|
|
35
38
|
|
|
@@ -351,6 +354,11 @@ export class ElasticsearchService {
|
|
|
351
354
|
})
|
|
352
355
|
}
|
|
353
356
|
if (geometry) {
|
|
357
|
+
// boosts applied using the filter geometry:
|
|
358
|
+
// * records completely within the geometry receive a boost of 5
|
|
359
|
+
// * records intersecting the geometry receive a boost of 2
|
|
360
|
+
// * records close to the geometry center receive a boost of 5 (based on the `location` field)
|
|
361
|
+
// * records on the outskirt of the geometry receive a boost of 2.5
|
|
354
362
|
should.push(
|
|
355
363
|
{
|
|
356
364
|
geo_shape: {
|
|
@@ -358,7 +366,7 @@ export class ElasticsearchService {
|
|
|
358
366
|
shape: geometry,
|
|
359
367
|
relation: 'within',
|
|
360
368
|
},
|
|
361
|
-
boost:
|
|
369
|
+
boost: 5.0,
|
|
362
370
|
},
|
|
363
371
|
},
|
|
364
372
|
{
|
|
@@ -367,10 +375,49 @@ export class ElasticsearchService {
|
|
|
367
375
|
shape: geometry,
|
|
368
376
|
relation: 'intersects',
|
|
369
377
|
},
|
|
370
|
-
boost:
|
|
378
|
+
boost: 2.0,
|
|
371
379
|
},
|
|
372
380
|
}
|
|
373
381
|
)
|
|
382
|
+
|
|
383
|
+
// this will boost the results variably depending on their distance from the given geometry
|
|
384
|
+
// note: this takes into account the `location` field of a record; this is generally the center of all spatial extents
|
|
385
|
+
// combined, and thus the actual size/coverage of the record spatial extent isn't relevant here
|
|
386
|
+
const bbox = getGeometryBoundingBox(geometry)
|
|
387
|
+
const center = [(bbox[0] + bbox[2]) / 2, (bbox[1] + bbox[3]) / 2]
|
|
388
|
+
const northToCenter = new LineString([
|
|
389
|
+
[center[0], bbox[3]],
|
|
390
|
+
center,
|
|
391
|
+
]).transform('EPSG:4326', 'EPSG:3857')
|
|
392
|
+
const southToCenter = new LineString([
|
|
393
|
+
[center[0], bbox[1]],
|
|
394
|
+
center,
|
|
395
|
+
]).transform('EPSG:4326', 'EPSG:3857')
|
|
396
|
+
const westToCenter = new LineString([
|
|
397
|
+
[bbox[0], center[1]],
|
|
398
|
+
center,
|
|
399
|
+
]).transform('EPSG:4326', 'EPSG:3857')
|
|
400
|
+
const eastToCenter = new LineString([
|
|
401
|
+
[bbox[2], center[1]],
|
|
402
|
+
center,
|
|
403
|
+
]).transform('EPSG:4326', 'EPSG:3857')
|
|
404
|
+
// cutoff distance is the distance from where the boost will only be half of the max value
|
|
405
|
+
// it is an average of the "size" of the bounding box in every direction, in meters
|
|
406
|
+
const cutoffDistance =
|
|
407
|
+
(getGeodesicLength(northToCenter) +
|
|
408
|
+
getGeodesicLength(southToCenter) +
|
|
409
|
+
getGeodesicLength(westToCenter) +
|
|
410
|
+
getGeodesicLength(eastToCenter)) /
|
|
411
|
+
4
|
|
412
|
+
|
|
413
|
+
should.push({
|
|
414
|
+
distance_feature: {
|
|
415
|
+
field: 'location',
|
|
416
|
+
pivot: `${Math.round(cutoffDistance).toFixed(0)}m`,
|
|
417
|
+
origin: center,
|
|
418
|
+
boost: 5.0,
|
|
419
|
+
},
|
|
420
|
+
})
|
|
374
421
|
}
|
|
375
422
|
|
|
376
423
|
return {
|
|
@@ -55,6 +55,7 @@ export class Gn4PlatformService implements PlatformServiceInterface {
|
|
|
55
55
|
private readonly me$: Observable<UserModel>
|
|
56
56
|
private readonly users$: Observable<UserModel[]>
|
|
57
57
|
private readonly isUserAnonymous$: Observable<boolean>
|
|
58
|
+
private readonly gnParseVersion = '4.2.5'
|
|
58
59
|
|
|
59
60
|
private keyTranslations$ = this.toolsApiService
|
|
60
61
|
.getTranslationsPackage1('gnui')
|
|
@@ -323,10 +324,15 @@ export class Gn4PlatformService implements PlatformServiceInterface {
|
|
|
323
324
|
...(Array.isArray(onlines) ? onlines : []),
|
|
324
325
|
...(Array.isArray(thumbnails) ? thumbnails : []),
|
|
325
326
|
].map((resource) => Object.values(resource.url)[0])
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
327
|
+
const fileToDelete = attachments.reduce<string[]>((acc, attachment) => {
|
|
328
|
+
if (
|
|
329
|
+
!urlsToKeep.includes(attachment.url) &&
|
|
330
|
+
attachment.filename !== 'datavizConfig.json'
|
|
331
|
+
) {
|
|
332
|
+
acc.push(attachment.filename)
|
|
333
|
+
}
|
|
334
|
+
return acc
|
|
335
|
+
}, [])
|
|
330
336
|
|
|
331
337
|
return fileToDelete
|
|
332
338
|
}),
|
|
@@ -384,6 +390,34 @@ export class Gn4PlatformService implements PlatformServiceInterface {
|
|
|
384
390
|
})
|
|
385
391
|
)
|
|
386
392
|
}
|
|
393
|
+
getFileContent(url: URL | string): Observable<any> {
|
|
394
|
+
return combineLatest([
|
|
395
|
+
this.httpClient.get(url.toString(), { responseType: 'text' }),
|
|
396
|
+
this.getApiVersion(),
|
|
397
|
+
]).pipe(
|
|
398
|
+
map(([text, version]) => {
|
|
399
|
+
const parsed = JSON.parse(text)
|
|
400
|
+
|
|
401
|
+
if (version > this.gnParseVersion) {
|
|
402
|
+
return parsed
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
const decoded = this.decodeBase64(parsed)
|
|
406
|
+
return JSON.parse(decoded)
|
|
407
|
+
})
|
|
408
|
+
)
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
decodeBase64(base64) {
|
|
412
|
+
const text = atob(base64)
|
|
413
|
+
const length = text.length
|
|
414
|
+
const bytes = new Uint8Array(length)
|
|
415
|
+
for (let i = 0; i < length; i++) {
|
|
416
|
+
bytes[i] = text.charCodeAt(i)
|
|
417
|
+
}
|
|
418
|
+
const decoder = new TextDecoder()
|
|
419
|
+
return decoder.decode(bytes)
|
|
420
|
+
}
|
|
387
421
|
|
|
388
422
|
attachFileToRecord(
|
|
389
423
|
recordUuid: string,
|
|
@@ -69,6 +69,8 @@ marker('domain.record.status.ongoing')
|
|
|
69
69
|
marker('domain.record.status.under_development')
|
|
70
70
|
marker('domain.record.status.deprecated')
|
|
71
71
|
marker('domain.record.status.removed')
|
|
72
|
+
marker('domain.record.status.planned')
|
|
73
|
+
marker('domain.record.status.required')
|
|
72
74
|
|
|
73
75
|
export const RecordStatusValues = [
|
|
74
76
|
'completed',
|
|
@@ -76,6 +78,8 @@ export const RecordStatusValues = [
|
|
|
76
78
|
'under_development',
|
|
77
79
|
'deprecated',
|
|
78
80
|
'removed',
|
|
81
|
+
'planned',
|
|
82
|
+
'required',
|
|
79
83
|
]
|
|
80
84
|
export type RecordStatus = (typeof RecordStatusValues)[number]
|
|
81
85
|
|
|
@@ -3,6 +3,7 @@ import type { UserModel } from './model/user/user.model'
|
|
|
3
3
|
import type { Organization } from './model/record/organization.model'
|
|
4
4
|
import { CatalogRecord, Keyword, UserFeedback } from './model/record'
|
|
5
5
|
import { KeywordType } from './model/thesaurus'
|
|
6
|
+
import { DatavizConfigModel } from './model/dataviz/dataviz-configuration.model'
|
|
6
7
|
|
|
7
8
|
export interface RecordAttachment {
|
|
8
9
|
url: URL
|
|
@@ -55,4 +56,5 @@ export abstract class PlatformServiceInterface {
|
|
|
55
56
|
file: File,
|
|
56
57
|
removeDuplicate?: boolean
|
|
57
58
|
): Observable<UploadEvent>
|
|
59
|
+
abstract getFileContent(url: URL): Observable<any>
|
|
58
60
|
}
|
|
@@ -127,9 +127,6 @@ export const editorFieldSpatialExtentsFixture = () => ({
|
|
|
127
127
|
export const editorFieldKeywordsFixture = () => ({
|
|
128
128
|
model: 'keywords',
|
|
129
129
|
hidden: false,
|
|
130
|
-
formFieldConfig: {
|
|
131
|
-
labelKey: 'editor.record.form.field.keywords',
|
|
132
|
-
},
|
|
133
130
|
})
|
|
134
131
|
|
|
135
132
|
export const editorFieldUniqueIdentifierFixture = () => ({
|
|
@@ -28,7 +28,10 @@ import {
|
|
|
28
28
|
tap,
|
|
29
29
|
} from 'rxjs/operators'
|
|
30
30
|
import { DataService } from '../service/data.service'
|
|
31
|
-
import {
|
|
31
|
+
import {
|
|
32
|
+
DatavizChartConfigModel,
|
|
33
|
+
InputChartType,
|
|
34
|
+
} from '../../../../../../libs/common/domain/src/lib/model/dataviz/dataviz-configuration.model'
|
|
32
35
|
import {
|
|
33
36
|
DatasetFeatureCatalog,
|
|
34
37
|
DatasetOnlineResource,
|
|
@@ -104,6 +107,12 @@ export class ChartViewComponent {
|
|
|
104
107
|
}
|
|
105
108
|
chartType$ = new BehaviorSubject<InputChartType>('bar')
|
|
106
109
|
|
|
110
|
+
@Input() set userChartConfig(config: DatavizChartConfigModel) {
|
|
111
|
+
this.aggregation$.next(config.aggregation)
|
|
112
|
+
this.xProperty$.next(config.xProperty)
|
|
113
|
+
this.yProperty$.next(config.yProperty)
|
|
114
|
+
this.chartType$.next(config.chartType)
|
|
115
|
+
}
|
|
107
116
|
@Output() chartConfig$ = combineLatest([
|
|
108
117
|
this.xProperty$.pipe(filter((value) => value !== undefined)),
|
|
109
118
|
this.yProperty$.pipe(filter((value) => value !== undefined)),
|
|
@@ -237,7 +237,9 @@ export class DataService {
|
|
|
237
237
|
tmsLink: DatasetServiceDistribution,
|
|
238
238
|
keepOriginalLink = false
|
|
239
239
|
): Promise<DatasetServiceDistribution[]> {
|
|
240
|
-
const endpoint = new TmsEndpoint(
|
|
240
|
+
const endpoint = new TmsEndpoint(
|
|
241
|
+
tmsLink.url.toString().replace(/\/?$/, `/${tmsLink.name}`)
|
|
242
|
+
)
|
|
241
243
|
const tileMaps = await endpoint.allTileMaps.catch(() => {
|
|
242
244
|
throw new Error(`ogc.unreachable.unknown`)
|
|
243
245
|
})
|
|
@@ -9,3 +9,4 @@ export * from './lib/components/import-record/import-record.component'
|
|
|
9
9
|
export * from './lib/components/record-form/record-form.component'
|
|
10
10
|
export * from './lib/components/record-form/form-field'
|
|
11
11
|
export * from './lib/components/multilingual-panel/multilingual-panel.component'
|
|
12
|
+
export * from './lib/components/metadata-quality-panel/metadata-quality-panel.component'
|
|
File without changes
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<div
|
|
2
|
+
class="flex flex-col h-full w-[302px] border-l border-gray-300 py-8 px-3 gap-3 overflow-auto"
|
|
3
|
+
style="background-color: #fafaf9"
|
|
4
|
+
>
|
|
5
|
+
<div class="flex flex-row px-2 justify-between">
|
|
6
|
+
<span class="text-3xl font-title text-black/80" translate
|
|
7
|
+
>editor.record.form.metadataQuality.title</span
|
|
8
|
+
>
|
|
9
|
+
</div>
|
|
10
|
+
<div
|
|
11
|
+
*ngFor="let properties of propertiesByPage; let i = index"
|
|
12
|
+
class="flex flex-col gap-2"
|
|
13
|
+
>
|
|
14
|
+
<gn-ui-button
|
|
15
|
+
*ngFor="let property of properties"
|
|
16
|
+
[extraClass]="getExtraClass(property.value)"
|
|
17
|
+
type="outline"
|
|
18
|
+
attr.data-cy="md-quality-btn-{{ property.label }}"
|
|
19
|
+
>
|
|
20
|
+
<span>{{ property.label | translate }}</span>
|
|
21
|
+
<div class="flex flex-row gap-2 items-center">
|
|
22
|
+
<ng-icon
|
|
23
|
+
*ngIf="property.value; else notChecked"
|
|
24
|
+
class="text-primary"
|
|
25
|
+
name="iconoirBadgeCheck"
|
|
26
|
+
></ng-icon>
|
|
27
|
+
<ng-template #notChecked>
|
|
28
|
+
<ng-icon class="text-neutral-300" name="iconoirSystemShut"></ng-icon>
|
|
29
|
+
</ng-template>
|
|
30
|
+
</div>
|
|
31
|
+
</gn-ui-button>
|
|
32
|
+
<hr
|
|
33
|
+
*ngIf="i !== propertiesByPage.length - 1"
|
|
34
|
+
class="border-gray-300 w-11/12 mx-auto"
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common'
|
|
2
|
+
import { Component, Input, OnChanges } from '@angular/core'
|
|
3
|
+
import { CatalogRecord } from '../../../../../../../libs/common/domain/src/lib/model/record'
|
|
4
|
+
import { ButtonComponent } from '../../../../../../../libs/ui/inputs/src'
|
|
5
|
+
import {
|
|
6
|
+
getAllKeysValidator,
|
|
7
|
+
getQualityValidators,
|
|
8
|
+
ValidatorMapperKeys,
|
|
9
|
+
} from '../../../../../../../libs/util/shared/src'
|
|
10
|
+
import {
|
|
11
|
+
NgIconComponent,
|
|
12
|
+
provideIcons,
|
|
13
|
+
provideNgIconsConfig,
|
|
14
|
+
} from '@ng-icons/core'
|
|
15
|
+
import { iconoirBadgeCheck, iconoirSystemShut } from '@ng-icons/iconoir'
|
|
16
|
+
import { TranslateDirective, TranslatePipe } from '@ngx-translate/core'
|
|
17
|
+
import { EditorConfig } from '../../models'
|
|
18
|
+
import { marker } from '@biesbjerg/ngx-translate-extract-marker'
|
|
19
|
+
|
|
20
|
+
//forced translations that are not available in fields.config.ts
|
|
21
|
+
marker('editor.record.form.field.keywords')
|
|
22
|
+
marker('editor.record.form.field.topics')
|
|
23
|
+
marker('editor.record.form.field.contacts')
|
|
24
|
+
marker('editor.record.form.field.organisation')
|
|
25
|
+
@Component({
|
|
26
|
+
selector: 'gn-ui-metadata-quality-panel',
|
|
27
|
+
standalone: true,
|
|
28
|
+
imports: [
|
|
29
|
+
CommonModule,
|
|
30
|
+
TranslateDirective,
|
|
31
|
+
TranslatePipe,
|
|
32
|
+
ButtonComponent,
|
|
33
|
+
NgIconComponent,
|
|
34
|
+
],
|
|
35
|
+
providers: [
|
|
36
|
+
provideIcons({
|
|
37
|
+
iconoirSystemShut,
|
|
38
|
+
iconoirBadgeCheck,
|
|
39
|
+
}),
|
|
40
|
+
provideNgIconsConfig({
|
|
41
|
+
size: '1.25em',
|
|
42
|
+
}),
|
|
43
|
+
],
|
|
44
|
+
templateUrl: './metadata-quality-panel.component.html',
|
|
45
|
+
styleUrl: './metadata-quality-panel.component.css',
|
|
46
|
+
})
|
|
47
|
+
export class MetadataQualityPanelComponent implements OnChanges {
|
|
48
|
+
propsToValidate: ValidatorMapperKeys[] = getAllKeysValidator()
|
|
49
|
+
propertiesByPage: { label: string; value: boolean }[][] = []
|
|
50
|
+
@Input() editorConfig: EditorConfig
|
|
51
|
+
@Input() record: CatalogRecord
|
|
52
|
+
|
|
53
|
+
ngOnChanges() {
|
|
54
|
+
if (this.editorConfig && this.record) {
|
|
55
|
+
const fieldsByPage = this.editorConfig.pages.map((page) =>
|
|
56
|
+
page.sections.flatMap((section) =>
|
|
57
|
+
section.fields
|
|
58
|
+
.filter((field) => this.propsToValidate.includes(field.model))
|
|
59
|
+
.map((field) => field.model as ValidatorMapperKeys)
|
|
60
|
+
)
|
|
61
|
+
)
|
|
62
|
+
// FIXME: temporarily add topics and organisation to the first and third page
|
|
63
|
+
// as long as they are not handled by the editor
|
|
64
|
+
if (fieldsByPage.length > 0) {
|
|
65
|
+
fieldsByPage[0].includes('topics') || fieldsByPage[0].push('topics')
|
|
66
|
+
fieldsByPage[2].includes('organisation') ||
|
|
67
|
+
fieldsByPage[2].push('organisation')
|
|
68
|
+
}
|
|
69
|
+
this.propertiesByPage = fieldsByPage
|
|
70
|
+
.map((fields) =>
|
|
71
|
+
getQualityValidators(
|
|
72
|
+
this.record,
|
|
73
|
+
fields as ValidatorMapperKeys[]
|
|
74
|
+
).map(({ name, validator }) => ({
|
|
75
|
+
label: `editor.record.form.field.${name}`, // use same translations as in fields.config.ts
|
|
76
|
+
value: validator(),
|
|
77
|
+
}))
|
|
78
|
+
)
|
|
79
|
+
.filter((arr) => arr.length > 0)
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
getExtraClass(checked: boolean): string {
|
|
84
|
+
const baseClasses =
|
|
85
|
+
'flex flex-row justify-between rounded mb-1 h-[34px] w-full focus:ring-0 hover:border-none border-none hover:text-black text-black cursor-default'
|
|
86
|
+
return checked
|
|
87
|
+
? `${baseClasses} bg-neutral-100 hover:bg-neutral-100`
|
|
88
|
+
: `${baseClasses} bg-transparent hover:bg-transparent`
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<div
|
|
2
|
-
class="flex flex-col h-full w-[302px]
|
|
2
|
+
class="flex flex-col h-full w-[302px] border-l border-gray-300 py-8 px-3 gap-6 overflow-auto"
|
|
3
|
+
style="background-color: #fafaf9"
|
|
3
4
|
>
|
|
4
5
|
<div class="flex flex-row px-2 justify-between">
|
|
5
6
|
<span class="text-3xl font-title text-black/80" translate
|
|
@@ -63,8 +63,6 @@ export const RECORD_KEYWORDS_FIELD: EditorField = {
|
|
|
63
63
|
model: 'keywords',
|
|
64
64
|
formFieldConfig: {},
|
|
65
65
|
}
|
|
66
|
-
// keeping track of the label to not lose existing translation
|
|
67
|
-
marker('editor.record.form.field.keywords')
|
|
68
66
|
|
|
69
67
|
export const RECORD_RESOURCE_CREATED_FIELD: EditorField = {
|
|
70
68
|
model: 'resourceCreated',
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { Injectable } from '@angular/core'
|
|
2
|
-
import { extend
|
|
3
|
-
import GeoJSON from 'ol/format/GeoJSON'
|
|
2
|
+
import { extend } from 'ol/extent'
|
|
4
3
|
import { CatalogRecord } from '../../../../../../libs/common/domain/src/lib/model/record'
|
|
5
|
-
|
|
6
|
-
const GEOJSON = new GeoJSON()
|
|
4
|
+
import { BoundingBox, getGeometryBoundingBox } from '../../../../../../libs/util/shared/src'
|
|
7
5
|
|
|
8
6
|
@Injectable({
|
|
9
7
|
providedIn: 'root',
|
|
10
8
|
})
|
|
11
9
|
export class MapUtilsService {
|
|
12
|
-
getRecordExtent(record: Partial<CatalogRecord>):
|
|
10
|
+
getRecordExtent(record: Partial<CatalogRecord>): BoundingBox {
|
|
13
11
|
if (!('spatialExtents' in record) || record.spatialExtents.length === 0) {
|
|
14
12
|
return null
|
|
15
13
|
}
|
|
16
14
|
// extend all the spatial extents into an including bbox
|
|
17
15
|
return record.spatialExtents.reduce(
|
|
18
16
|
(prev, curr) => {
|
|
19
|
-
if ('bbox' in curr) return extend(prev, curr.bbox)
|
|
17
|
+
if ('bbox' in curr) return extend(prev, curr.bbox) as BoundingBox
|
|
20
18
|
else if ('geometry' in curr) {
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
return extend(
|
|
20
|
+
prev,
|
|
21
|
+
getGeometryBoundingBox(curr.geometry)
|
|
22
|
+
) as BoundingBox
|
|
23
23
|
}
|
|
24
24
|
return prev
|
|
25
25
|
},
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
class="h-[44px] w-full"
|
|
10
10
|
extraBtnClass="font-sans font-bold"
|
|
11
11
|
[choices]="choices"
|
|
12
|
+
[selected]="_selectedChoice"
|
|
12
13
|
(selectValue)="selectLink($event)"
|
|
13
14
|
></gn-ui-dropdown-selector>
|
|
14
15
|
</div>
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
[cacheActive]="cacheActive$ | async"
|
|
36
37
|
[link]="selectedLink$ | async"
|
|
37
38
|
[featureCatalog]="mdViewFacade.featureCatalog$ | async"
|
|
39
|
+
[userChartConfig]="_chartConfig"
|
|
38
40
|
></gn-ui-chart-view>
|
|
39
41
|
</div>
|
|
40
42
|
</ng-template>
|