geonetwork-ui 2.3.0-dev.89188551 → 2.3.0-dev.9f0464ae

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.
Files changed (34) hide show
  1. package/esm2022/libs/feature/editor/src/lib/components/wizard-field/wizard-field.component.mjs +1 -1
  2. package/esm2022/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.mjs +73 -20
  3. package/esm2022/libs/feature/map/src/lib/add-layer-from-wfs/add-layer-from-wfs.component.mjs +1 -1
  4. package/esm2022/libs/feature/map/src/lib/add-layer-from-wms/add-layer-from-wms.component.mjs +1 -1
  5. package/esm2022/libs/feature/map/src/lib/map-context/map-context.model.mjs +1 -1
  6. package/esm2022/libs/feature/map/src/lib/map-context/map-context.service.mjs +29 -8
  7. package/esm2022/libs/ui/elements/src/lib/api-card/api-card.component.mjs +3 -2
  8. package/esm2022/libs/ui/elements/src/lib/record-api-form/record-api-form.component.mjs +59 -26
  9. package/esm2022/libs/ui/inputs/src/lib/text-input/text-input.component.mjs +5 -3
  10. package/esm2022/libs/ui/layout/src/lib/carousel/carousel.component.mjs +3 -3
  11. package/fesm2022/geonetwork-ui.mjs +178 -71
  12. package/fesm2022/geonetwork-ui.mjs.map +1 -1
  13. package/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.d.ts +10 -5
  14. package/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.d.ts.map +1 -1
  15. package/libs/feature/map/src/lib/map-context/map-context.model.d.ts +1 -0
  16. package/libs/feature/map/src/lib/map-context/map-context.model.d.ts.map +1 -1
  17. package/libs/feature/map/src/lib/map-context/map-context.service.d.ts.map +1 -1
  18. package/libs/ui/elements/src/lib/api-card/api-card.component.d.ts.map +1 -1
  19. package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts +9 -2
  20. package/libs/ui/elements/src/lib/record-api-form/record-api-form.component.d.ts.map +1 -1
  21. package/libs/ui/inputs/src/lib/text-input/text-input.component.d.ts +2 -1
  22. package/libs/ui/inputs/src/lib/text-input/text-input.component.d.ts.map +1 -1
  23. package/package.json +1 -1
  24. package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.css +7 -0
  25. package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.html +32 -18
  26. package/src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.ts +72 -17
  27. package/src/libs/feature/map/src/lib/map-context/map-context.model.ts +1 -0
  28. package/src/libs/feature/map/src/lib/map-context/map-context.service.ts +26 -8
  29. package/src/libs/ui/elements/src/lib/api-card/api-card.component.ts +2 -1
  30. package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.html +25 -9
  31. package/src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts +67 -26
  32. package/src/libs/ui/inputs/src/lib/text-input/text-input.component.html +1 -0
  33. package/src/libs/ui/inputs/src/lib/text-input/text-input.component.ts +1 -0
  34. package/src/libs/ui/layout/src/lib/carousel/carousel.component.css +1 -0
@@ -1,6 +1,6 @@
1
1
  import { OnInit, EventEmitter, ChangeDetectorRef } from '@angular/core';
2
- import { OgcApiEndpoint } from '@camptocamp/ogc-client';
3
2
  import { Subject } from 'rxjs';
3
+ import { DropdownChoice } from '../../../../../../libs/ui/inputs/src';
4
4
  import { MapLayer } from '../+state/map.models';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class AddLayerFromOgcApiComponent implements OnInit {
@@ -8,15 +8,20 @@ export declare class AddLayerFromOgcApiComponent implements OnInit {
8
8
  ogcUrl: string;
9
9
  layerAdded: EventEmitter<MapLayer>;
10
10
  urlChange: Subject<string>;
11
- layerUrl: string;
12
11
  loading: boolean;
13
- layers: string[];
14
- ogcEndpoint: OgcApiEndpoint;
12
+ layers: any[];
15
13
  errorMessage: string | null;
14
+ selectedLayerTypes: {
15
+ [key: string]: DropdownChoice['value'];
16
+ };
16
17
  constructor(changeDetectorRef: ChangeDetectorRef);
17
18
  ngOnInit(): void;
18
19
  loadLayers(): Promise<void>;
19
- addLayer(layer: string): Promise<void>;
20
+ setDefaultLayerTypes(): void;
21
+ getLayerChoices(layer: any): any[];
22
+ shouldDisplayLayer(layer: any): any;
23
+ onLayerTypeSelect(layerName: string, selectedType: any): void;
24
+ addLayer(layer: string, layerType: any): Promise<void>;
20
25
  static ɵfac: i0.ɵɵFactoryDeclaration<AddLayerFromOgcApiComponent, never>;
21
26
  static ɵcmp: i0.ɵɵComponentDeclaration<AddLayerFromOgcApiComponent, "gn-ui-add-layer-from-ogc-api", never, { "ogcUrl": { "alias": "ogcUrl"; "required": false; }; }, { "layerAdded": "layerAdded"; }, never, never, true, never>;
22
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"add-layer-from-ogc-api.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAEN,YAAY,EAGZ,iBAAiB,EAClB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,EAAE,OAAO,EAAgB,MAAM,MAAM,CAAA;AAQ5C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;;AAE/C,qBAOa,2BAA4B,YAAW,MAAM;IAW5C,OAAO,CAAC,iBAAiB;IAV5B,MAAM,EAAE,MAAM,CAAA;IACb,UAAU,yBAA+B;IAEnD,SAAS,kBAAwB;IACjC,QAAQ,SAAK;IACb,OAAO,UAAQ;IACf,MAAM,EAAE,MAAM,EAAE,CAAK;IACrB,WAAW,EAAE,cAAc,CAAO;IAClC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAO;gBAEd,iBAAiB,EAAE,iBAAiB;IAExD,QAAQ;IAOF,UAAU;IAsBV,QAAQ,CAAC,KAAK,EAAE,MAAM;yCA1CjB,2BAA2B;2CAA3B,2BAA2B;CAoDvC"}
1
+ {"version":3,"file":"add-layer-from-ogc-api.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/map/src/lib/add-layer-from-ogc-api/add-layer-from-ogc-api.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAEN,YAAY,EAGZ,iBAAiB,EAClB,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,OAAO,EAAgB,MAAM,MAAM,CAAA;AAM5C,OAAO,EAAE,cAAc,EAAkB,MAAM,sCAAsC,CAAA;AAErF,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;;AAE/C,qBAOa,2BAA4B,YAAW,MAAM;IAU5C,OAAO,CAAC,iBAAiB;IAT5B,MAAM,EAAE,MAAM,CAAA;IACb,UAAU,yBAA+B;IAEnD,SAAS,kBAAwB;IACjC,OAAO,UAAQ;IACf,MAAM,EAAE,GAAG,EAAE,CAAK;IAClB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAO;IAClC,kBAAkB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA;KAAE,CAAK;gBAE/C,iBAAiB,EAAE,iBAAiB;IAExD,QAAQ;IAMF,UAAU;IAqBhB,oBAAoB;IASpB,eAAe,CAAC,KAAK,EAAE,GAAG;IAiB1B,kBAAkB,CAAC,KAAK,EAAE,GAAG;IAS7B,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG;IAMhD,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG;yCAhFjC,2BAA2B;2CAA3B,2BAA2B;CA2GvC"}
@@ -32,6 +32,7 @@ export interface MapContextLayerOgcapiModel {
32
32
  type: 'ogcapi';
33
33
  url: string;
34
34
  name: string;
35
+ layerType: 'feature' | 'vectorTiles' | 'mapTiles' | 'record';
35
36
  }
36
37
  interface LayerXyzModel {
37
38
  type: 'xyz';
@@ -1 +1 @@
1
- {"version":3,"file":"map-context.model.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/map/src/lib/map-context/map-context.model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAEvC,oBAAY,uBAAuB;IACjC,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,oBAAoB,EAAE,CAAA;IAC9B,IAAI,CAAC,EAAE,mBAAmB,CAAA;CAC3B;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,KAAK,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb;AAED,UAAU,uBAAuB;IAC/B,IAAI,EAAE,KAAK,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,QAAQ,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb;AAED,UAAU,aAAa;IACrB,IAAI,EAAE,KAAK,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AACD,UAAU,oBAAqB,SAAQ,aAAa;IAClD,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,KAAK,CAAA;CACb;AACD,UAAU,qBAAsB,SAAQ,aAAa;IACnD,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,GAAG,CAAC,EAAE,KAAK,CAAA;CACZ;AACD,MAAM,MAAM,uBAAuB,GAC/B,oBAAoB,GACpB,qBAAqB,CAAA;AAEzB,UAAU,YAAY;IACpB,IAAI,EAAE,SAAS,CAAA;CAChB;AACD,UAAU,mBAAoB,SAAQ,YAAY;IAChD,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,KAAK,CAAA;CACb;AACD,UAAU,oBAAqB,SAAQ,YAAY;IACjD,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAAA;IAChC,GAAG,CAAC,EAAE,KAAK,CAAA;CACZ;AACD,MAAM,MAAM,2BAA2B,GACnC,mBAAmB,GACnB,oBAAoB,CAAA;AAExB,MAAM,MAAM,oBAAoB,GAC5B,uBAAuB,GACvB,wBAAwB,GACxB,uBAAuB,GACvB,uBAAuB,GACvB,2BAA2B,GAC3B,0BAA0B,CAAA;AAE9B,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
1
+ {"version":3,"file":"map-context.model.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/map/src/lib/map-context/map-context.model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAEvC,oBAAY,uBAAuB;IACjC,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,oBAAoB,EAAE,CAAA;IAC9B,IAAI,CAAC,EAAE,mBAAmB,CAAA;CAC3B;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,KAAK,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb;AAED,UAAU,uBAAuB;IAC/B,IAAI,EAAE,KAAK,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,QAAQ,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,SAAS,GAAG,aAAa,GAAG,UAAU,GAAG,QAAQ,CAAA;CAC7D;AAED,UAAU,aAAa;IACrB,IAAI,EAAE,KAAK,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AACD,UAAU,oBAAqB,SAAQ,aAAa;IAClD,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,KAAK,CAAA;CACb;AACD,UAAU,qBAAsB,SAAQ,aAAa;IACnD,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,GAAG,CAAC,EAAE,KAAK,CAAA;CACZ;AACD,MAAM,MAAM,uBAAuB,GAC/B,oBAAoB,GACpB,qBAAqB,CAAA;AAEzB,UAAU,YAAY;IACpB,IAAI,EAAE,SAAS,CAAA;CAChB;AACD,UAAU,mBAAoB,SAAQ,YAAY;IAChD,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,KAAK,CAAA;CACb;AACD,UAAU,oBAAqB,SAAQ,YAAY;IACjD,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAAA;IAChC,GAAG,CAAC,EAAE,KAAK,CAAA;CACZ;AACD,MAAM,MAAM,2BAA2B,GACnC,mBAAmB,GACnB,oBAAoB,CAAA;AAExB,MAAM,MAAM,oBAAoB,GAC5B,uBAAuB,GACvB,wBAAwB,GACxB,uBAAuB,GACvB,uBAAuB,GACvB,2BAA2B,GAC3B,0BAA0B,CAAA;AAE9B,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"map-context.service.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/map/src/lib/map-context/map-context.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EACL,oBAAoB,EAEpB,uBAAuB,EACvB,eAAe,EACf,mBAAmB,EACpB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,GAAG,MAAM,QAAQ,CAAA;AACxB,OAAO,IAAI,MAAM,SAAS,CAAA;AAC1B,OAAO,KAAK,MAAM,eAAe,CAAA;AAOjC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAA;;AAQnF,eAAO,MAAM,yBAAyB,EAAE,uBAOvC,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,mBAG1B,CAAA;AAED,eAAO,MAAM,gBAAgB,QAAQ,CAAA;AAErC,qBAGa,iBAAiB;IAE1B,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,YAAY;gBADZ,QAAQ,EAAE,eAAe,EACzB,YAAY,EAAE,eAAe;IAGvC,mBAAmB,CACjB,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,eAAe,EAC3B,SAAS,CAAC,EAAE,SAAS,GACpB,GAAG;IAkBN,WAAW,CAAC,UAAU,EAAE,oBAAoB,GAAG,KAAK;IAmHpD,UAAU,CAAC,SAAS,EAAE,mBAAmB,EAAE,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI;IAqB3D,0BAA0B,CACxB,MAAM,EAAE,oBAAoB,EAAE,GAC7B,oBAAoB,EAAE;IAMzB,yBAAyB,CACvB,UAAU,EAAE,eAAe,EAC3B,SAAS,EAAE,SAAS,GACnB,eAAe;IAsBlB,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,mBAAmB;IAM1D,yBAAyB,CAAC,MAAM,EAAE,WAAW,GAAG,oBAAoB;yCA3MzD,iBAAiB;6CAAjB,iBAAiB;CAsO7B"}
1
+ {"version":3,"file":"map-context.service.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/feature/map/src/lib/map-context/map-context.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC5D,OAAO,EACL,oBAAoB,EAEpB,uBAAuB,EACvB,eAAe,EACf,mBAAmB,EACpB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,GAAG,MAAM,QAAQ,CAAA;AACxB,OAAO,IAAI,MAAM,SAAS,CAAA;AAC1B,OAAO,KAAK,MAAM,eAAe,CAAA;AAOjC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAE5D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAA;;AAYnF,eAAO,MAAM,yBAAyB,EAAE,uBAOvC,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,mBAG1B,CAAA;AAED,eAAO,MAAM,gBAAgB,QAAQ,CAAA;AAErC,qBAGa,iBAAiB;IAE1B,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,YAAY;gBADZ,QAAQ,EAAE,eAAe,EACzB,YAAY,EAAE,eAAe;IAGvC,mBAAmB,CACjB,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,eAAe,EAC3B,SAAS,CAAC,EAAE,SAAS,GACpB,GAAG;IAkBN,WAAW,CAAC,UAAU,EAAE,oBAAoB,GAAG,KAAK;IAiIpD,UAAU,CAAC,SAAS,EAAE,mBAAmB,EAAE,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI;IAqB3D,0BAA0B,CACxB,MAAM,EAAE,oBAAoB,EAAE,GAC7B,oBAAoB,EAAE;IAMzB,yBAAyB,CACvB,UAAU,EAAE,eAAe,EAC3B,SAAS,EAAE,SAAS,GACnB,eAAe;IAsBlB,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,mBAAmB;IAM1D,yBAAyB,CAAC,MAAM,EAAE,WAAW,GAAG,oBAAoB;yCAzNzD,iBAAiB;6CAAjB,iBAAiB;CAoP7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"api-card.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/elements/src/lib/api-card/api-card.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,2DAA2D,CAAA;AACtG,OAAO,EAGL,YAAY,EAEZ,SAAS,EACT,MAAM,EAEN,aAAa,EACd,MAAM,eAAe,CAAA;;AAEtB,qBAMa,gBAAiB,YAAW,MAAM,EAAE,SAAS;IAC/C,IAAI,EAAE,0BAA0B,CAAA;IAChC,WAAW,EAAE,0BAA0B,CAAA;IAChD,oBAAoB,EAAE,OAAO,CAAA;IAC7B,eAAe,UAAQ;IACb,iBAAiB,EAAE,YAAY,CAAC,0BAA0B,CAAC,CACrB;IAEhD,QAAQ;IAKR,WAAW,CAAC,OAAO,EAAE,aAAa;IAKlC,sBAAsB;yCAlBX,gBAAgB;2CAAhB,gBAAgB;CAwB5B"}
1
+ {"version":3,"file":"api-card.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/elements/src/lib/api-card/api-card.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,2DAA2D,CAAA;AACtG,OAAO,EAGL,YAAY,EAEZ,SAAS,EACT,MAAM,EAEN,aAAa,EACd,MAAM,eAAe,CAAA;;AAEtB,qBAMa,gBAAiB,YAAW,MAAM,EAAE,SAAS;IAC/C,IAAI,EAAE,0BAA0B,CAAA;IAChC,WAAW,EAAE,0BAA0B,CAAA;IAChD,oBAAoB,EAAE,OAAO,CAAA;IAC7B,eAAe,UAAQ;IACb,iBAAiB,EAAE,YAAY,CAAC,0BAA0B,CAAC,CACrB;IAEhD,QAAQ;IAMR,WAAW,CAAC,OAAO,EAAE,aAAa;IAKlC,sBAAsB;yCAnBX,gBAAgB;2CAAhB,gBAAgB;CAyB5B"}
@@ -1,4 +1,4 @@
1
- import { DatasetServiceDistribution } from '../../../../../../libs/common/domain/src/lib/model/record';
1
+ import { DatasetServiceDistribution, ServiceProtocol } from '../../../../../../libs/common/domain/src/lib/model/record';
2
2
  import { BehaviorSubject } from 'rxjs';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class RecordApiFormComponent {
@@ -7,6 +7,9 @@ export declare class RecordApiFormComponent {
7
7
  limit$: BehaviorSubject<string>;
8
8
  format$: BehaviorSubject<string>;
9
9
  apiBaseUrl: string;
10
+ apiFeatureType: string;
11
+ supportOffset: boolean;
12
+ accessServiceProtocol: ServiceProtocol | undefined;
10
13
  outputFormats: {
11
14
  value: string;
12
15
  label: string;
@@ -19,7 +22,11 @@ export declare class RecordApiFormComponent {
19
22
  setFormat(value: string | unknown): void;
20
23
  resetUrl(): void;
21
24
  parseOutputFormats(): void;
22
- getOutputFormats(url: any): Promise<import("@camptocamp/ogc-client").OgcApiCollectionInfo>;
25
+ mapFormats(formats: any[]): {
26
+ label: string;
27
+ value: "json" | "html" | "pdf" | "geojson" | "svg" | "csv" | "excel" | "shp" | "gml" | "kml" | "gpkg" | "zip" | "jpg" | "dxf" | "fgb" | "jsonfg";
28
+ }[];
29
+ getOutputFormats(url: string, accessServiceProtocol: string): Promise<import("@camptocamp/ogc-client").GenericEndpointInfo | import("@camptocamp/ogc-client").OgcApiCollectionInfo>;
23
30
  static ɵfac: i0.ɵɵFactoryDeclaration<RecordApiFormComponent, never>;
24
31
  static ɵcmp: i0.ɵɵComponentDeclaration<RecordApiFormComponent, "gn-ui-record-api-form", never, { "apiLink": { "alias": "apiLink"; "required": false; }; }, {}, never, never, false, never>;
25
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":"record-api-form.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,2DAA2D,CAAA;AAEtG,OAAO,EAAE,eAAe,EAAsB,MAAM,MAAM,CAAA;;AAO1D,qBAMa,sBAAsB;IACjC,IAAa,OAAO,CAAC,KAAK,EAAE,0BAA0B,EAOrD;IACD,OAAO,0BAA0B;IACjC,MAAM,0BAA0B;IAChC,OAAO,0BAA0B;IACjC,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa;;;QAAqC;IAClD,YAAY,iCAiBX;IACD,eAAe,qCAEd;IAED,aAAa,oCAEZ;IAED,SAAS,CAAC,KAAK,EAAE,MAAM;IAIvB,QAAQ,CAAC,KAAK,EAAE,MAAM;IAKtB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAIjC,QAAQ;IAMR,kBAAkB;IA6BZ,gBAAgB,CAAC,GAAG,KAAA;yCAxFf,sBAAsB;2CAAtB,sBAAsB;CA6FlC"}
1
+ {"version":3,"file":"record-api-form.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/elements/src/lib/record-api-form/record-api-form.component.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,0BAA0B,EAC1B,eAAe,EAChB,MAAM,2DAA2D,CAAA;AAElE,OAAO,EAAE,eAAe,EAAiC,MAAM,MAAM,CAAA;;AAOrE,qBAMa,sBAAsB;IACjC,IAAa,OAAO,CAAC,KAAK,EAAE,0BAA0B,EASrD;IAED,OAAO,0BAA0B;IACjC,MAAM,0BAA0B;IAChC,OAAO,0BAA0B;IACjC,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,EAAE,MAAM,CAAA;IACtB,aAAa,UAAO;IACpB,qBAAqB,EAAE,eAAe,GAAG,SAAS,CAAA;IAClD,aAAa;;;QAAqC;IAElD,YAAY,iCA+BX;IACD,eAAe,qCAEd;IAED,aAAa,oCAEZ;IAED,SAAS,CAAC,KAAK,EAAE,MAAM;IAIvB,QAAQ,CAAC,KAAK,EAAE,MAAM;IAKtB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAIjC,QAAQ;IAMR,kBAAkB;IA2BlB,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE;;;;IAanB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM;yCAxHtD,sBAAsB;2CAAtB,sBAAsB;CAmIlC"}
@@ -7,6 +7,7 @@ export declare class TextInputComponent implements AfterViewInit {
7
7
  extraClass: string;
8
8
  hint: string;
9
9
  required: boolean;
10
+ disabled: boolean;
10
11
  rawChange: Subject<string>;
11
12
  valueChange: import("rxjs").Observable<string>;
12
13
  input: any;
@@ -15,6 +16,6 @@ export declare class TextInputComponent implements AfterViewInit {
15
16
  checkRequired(value: any): void;
16
17
  handleChange($event: any): void;
17
18
  static ɵfac: i0.ɵɵFactoryDeclaration<TextInputComponent, never>;
18
- static ɵcmp: i0.ɵɵComponentDeclaration<TextInputComponent, "gn-ui-text-input", never, { "value": { "alias": "value"; "required": false; }; "extraClass": { "alias": "extraClass"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "required": { "alias": "required"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, false, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<TextInputComponent, "gn-ui-text-input", never, { "value": { "alias": "value"; "required": false; }; "extraClass": { "alias": "extraClass"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, false, never>;
19
20
  }
20
21
  //# sourceMappingURL=text-input.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-input.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/inputs/src/lib/text-input/text-input.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAKd,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;;AAE9B,qBAKa,kBAAmB,YAAW,aAAa;IACtD,OAAO,CAAC,QAAQ,CAAC,SAAS,CASf;IAEF,KAAK,SAAK;IACV,UAAU,SAAK;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,UAAQ;IACzB,SAAS,kBAAwB;IACvB,WAAW,oCAA8C;IAC/C,KAAK,MAAA;IAEzB,IAAI,SAAS,WAEZ;IAED,eAAe;IAIf,aAAa,CAAC,KAAK,KAAA;IAOnB,YAAY,CAAC,MAAM,KAAA;yCAnCR,kBAAkB;2CAAlB,kBAAkB;CAwC9B"}
1
+ {"version":3,"file":"text-input.component.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/ui/inputs/src/lib/text-input/text-input.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAKd,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;;AAE9B,qBAKa,kBAAmB,YAAW,aAAa;IACtD,OAAO,CAAC,QAAQ,CAAC,SAAS,CASf;IAEF,KAAK,SAAK;IACV,UAAU,SAAK;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,UAAQ;IAChB,QAAQ,EAAE,OAAO,CAAA;IAC1B,SAAS,kBAAwB;IACvB,WAAW,oCAA8C;IAC/C,KAAK,MAAA;IAEzB,IAAI,SAAS,WAEZ;IAED,eAAe;IAIf,aAAa,CAAC,KAAK,KAAA;IAOnB,YAAY,CAAC,MAAM,KAAA;yCApCR,kBAAkB;2CAAlB,kBAAkB;CAyC9B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geonetwork-ui",
3
- "version": "2.3.0-dev.89188551",
3
+ "version": "2.3.0-dev.9f0464ae",
4
4
  "engines": {
5
5
  "node": ">=14.17.0"
6
6
  },
@@ -0,0 +1,7 @@
1
+ .dropdown-content {
2
+ display: none;
3
+ }
4
+
5
+ .relative:hover .dropdown-content {
6
+ display: block;
7
+ }
@@ -4,8 +4,7 @@
4
4
  (valueChange)="urlChange.next($event)"
5
5
  [hint]="'map.ogc.urlInput.hint' | translate"
6
6
  class="w-96"
7
- >
8
- </gn-ui-text-input>
7
+ ></gn-ui-text-input>
9
8
  </div>
10
9
 
11
10
  <div *ngIf="errorMessage" class="text-red-500 mt-2">
@@ -16,21 +15,36 @@
16
15
  <p class="loading-message" translate>map.loading.service</p>
17
16
  </div>
18
17
 
19
- <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
18
+ <ng-container *ngFor="let layer of layers">
19
+ <div
20
+ *ngIf="shouldDisplayLayer(layer)"
21
+ class="flex items-center justify-between my-2 layer-item-tree"
22
+ >
23
+ <div class="flex flex-col items-start w-full">
24
+ <p
25
+ class="max-w-xs overflow-hidden overflow-ellipsis whitespace-nowrap"
26
+ [title]="layer.name"
33
27
  >
28
+ {{ layer.name }}
29
+ </p>
30
+ <div class="flex justify-between items-center w-full">
31
+ <gn-ui-dropdown-selector
32
+ [title]="'Add Layer As' | translate"
33
+ [choices]="getLayerChoices(layer)"
34
+ (selectValue)="onLayerTypeSelect(layer.name, $event)"
35
+ [selected]="selectedLayerTypes[layer.name]"
36
+ extraBtnClass="w-6 h-5 !text-sm !px-2 !py-1"
37
+ ></gn-ui-dropdown-selector>
38
+ <gn-ui-button
39
+ class="layer-add-btn"
40
+ type="primary"
41
+ (buttonClick)="addLayer(layer.name, selectedLayerTypes[layer.name])"
42
+ extraClass="text-sm !px-2 !py-1"
43
+ translate
44
+ >
45
+ <span translate>map.layer.add</span>
46
+ </gn-ui-button>
47
+ </div>
34
48
  </div>
35
- </ng-container>
36
- </div>
49
+ </div>
50
+ </ng-container>
@@ -14,7 +14,7 @@ import {
14
14
  MapContextLayerTypeEnum,
15
15
  } from '../map-context/map-context.model'
16
16
  import { TranslateModule } from '@ngx-translate/core'
17
- import { UiInputsModule } from '../../../../../../libs/ui/inputs/src'
17
+ import { DropdownChoice, UiInputsModule } from '../../../../../../libs/ui/inputs/src'
18
18
  import { CommonModule } from '@angular/common'
19
19
  import { MapLayer } from '../+state/map.models'
20
20
 
@@ -30,18 +30,16 @@ export class AddLayerFromOgcApiComponent implements OnInit {
30
30
  @Output() layerAdded = new EventEmitter<MapLayer>()
31
31
 
32
32
  urlChange = new Subject<string>()
33
- layerUrl = ''
34
33
  loading = false
35
- layers: string[] = []
36
- ogcEndpoint: OgcApiEndpoint = null
34
+ layers: any[] = []
37
35
  errorMessage: string | null = null
36
+ selectedLayerTypes: { [key: string]: DropdownChoice['value'] } = {}
38
37
 
39
38
  constructor(private changeDetectorRef: ChangeDetectorRef) {}
40
39
 
41
40
  ngOnInit() {
42
41
  this.urlChange.pipe(debounceTime(700)).subscribe(() => {
43
42
  this.loadLayers()
44
- this.changeDetectorRef.detectChanges() // manually trigger change detection
45
43
  })
46
44
  }
47
45
 
@@ -49,14 +47,13 @@ export class AddLayerFromOgcApiComponent implements OnInit {
49
47
  this.errorMessage = null
50
48
  try {
51
49
  this.loading = true
52
- if (this.ogcUrl.trim() === '') {
50
+ if (!this.ogcUrl.trim()) {
53
51
  this.layers = []
54
52
  return
55
53
  }
56
- this.ogcEndpoint = await new OgcApiEndpoint(this.ogcUrl)
57
-
58
- // Currently only supports feature collections
59
- this.layers = await this.ogcEndpoint.featureCollections
54
+ const ogcEndpoint = await new OgcApiEndpoint(this.ogcUrl)
55
+ this.layers = await ogcEndpoint.allCollections
56
+ this.setDefaultLayerTypes()
60
57
  } catch (error) {
61
58
  const err = error as Error
62
59
  this.layers = []
@@ -67,14 +64,72 @@ export class AddLayerFromOgcApiComponent implements OnInit {
67
64
  }
68
65
  }
69
66
 
70
- async addLayer(layer: string) {
71
- this.layerUrl = await this.ogcEndpoint.getCollectionItemsUrl(layer)
67
+ setDefaultLayerTypes() {
68
+ this.layers.forEach((layer) => {
69
+ const choices = this.getLayerChoices(layer)
70
+ if (choices.length > 0) {
71
+ this.selectedLayerTypes[layer.name] = choices[0].value
72
+ }
73
+ })
74
+ }
72
75
 
73
- const layerToAdd: MapContextLayerModel = {
74
- name: layer,
75
- url: this.layerUrl,
76
- type: MapContextLayerTypeEnum.OGCAPI,
76
+ getLayerChoices(layer: any) {
77
+ const choices = []
78
+ if (layer.hasRecords) {
79
+ choices.push({ label: 'Records', value: 'record' })
80
+ }
81
+ if (layer.hasFeatures) {
82
+ choices.push({ label: 'Features', value: 'features' })
83
+ }
84
+ if (layer.hasVectorTiles) {
85
+ choices.push({ label: 'Vector Tiles', value: 'vectorTiles' })
86
+ }
87
+ if (layer.hasMapTiles) {
88
+ choices.push({ label: 'Map Tiles', value: 'mapTiles' })
89
+ }
90
+ return choices
91
+ }
92
+
93
+ shouldDisplayLayer(layer: any) {
94
+ return (
95
+ layer.hasRecords ||
96
+ layer.hasFeatures ||
97
+ layer.hasVectorTiles ||
98
+ layer.hasMapTiles
99
+ )
100
+ }
101
+
102
+ onLayerTypeSelect(layerName: string, selectedType: any) {
103
+ this.selectedLayerTypes[layerName] = selectedType
104
+ ? selectedType
105
+ : this.getLayerChoices(layerName)[0]?.value
106
+ }
107
+
108
+ async addLayer(layer: string, layerType: any) {
109
+ try {
110
+ const ogcEndpoint = await new OgcApiEndpoint(this.ogcUrl)
111
+ let layerUrl: string
112
+
113
+ if (layerType === 'vectorTiles') {
114
+ layerUrl = await ogcEndpoint.getVectorTilesetUrl(layer)
115
+ } else if (layerType === 'mapTiles') {
116
+ layerUrl = await ogcEndpoint.getMapTilesetUrl(layer)
117
+ } else {
118
+ layerUrl = await ogcEndpoint.getCollectionItemsUrl(layer, {
119
+ outputFormat: 'json',
120
+ })
121
+ }
122
+
123
+ const layerToAdd: MapContextLayerModel = {
124
+ name: layer,
125
+ url: layerUrl,
126
+ type: MapContextLayerTypeEnum.OGCAPI,
127
+ layerType: layerType,
128
+ }
129
+ this.layerAdded.emit({ ...layerToAdd, title: layer })
130
+ } catch (error) {
131
+ const err = error as Error
132
+ console.error('Error adding layer:', err.message)
77
133
  }
78
- this.layerAdded.emit({ ...layerToAdd, title: layer })
79
134
  }
80
135
  }
@@ -38,6 +38,7 @@ export interface MapContextLayerOgcapiModel {
38
38
  type: 'ogcapi'
39
39
  url: string
40
40
  name: string
41
+ layerType: 'feature' | 'vectorTiles' | 'mapTiles' | 'record'
41
42
  }
42
43
 
43
44
  interface LayerXyzModel {
@@ -25,6 +25,10 @@ import WMTS from 'ol/source/WMTS'
25
25
  import { Geometry } from 'ol/geom'
26
26
  import Feature from 'ol/Feature'
27
27
  import { WfsEndpoint, WmtsEndpoint } from '@camptocamp/ogc-client'
28
+ import OGCVectorTile from 'ol/source/OGCVectorTile.js'
29
+ import { MVT } from 'ol/format'
30
+ import VectorTileLayer from 'ol/layer/VectorTile'
31
+ import OGCMapTile from 'ol/source/OGCMapTile.js'
28
32
 
29
33
  export const DEFAULT_BASELAYER_CONTEXT: MapContextLayerXyzModel = {
30
34
  type: MapContextLayerTypeEnum.XYZ,
@@ -78,14 +82,28 @@ export class MapContextService {
78
82
  const style = this.styleService.styles.default
79
83
  switch (type) {
80
84
  case MapContextLayerTypeEnum.OGCAPI:
81
- return new VectorLayer({
82
- source: new VectorSource({
83
- format: new GeoJSON(),
84
- url: layerModel.url,
85
- }),
86
- style,
87
- })
88
-
85
+ if (layerModel.layerType === 'vectorTiles') {
86
+ return new VectorTileLayer({
87
+ source: new OGCVectorTile({
88
+ url: layerModel.url,
89
+ format: new MVT(),
90
+ }),
91
+ })
92
+ } else if (layerModel.layerType === 'mapTiles') {
93
+ return new TileLayer({
94
+ source: new OGCMapTile({
95
+ url: layerModel.url,
96
+ }),
97
+ })
98
+ } else {
99
+ return new VectorLayer({
100
+ source: new VectorSource({
101
+ format: new GeoJSON(),
102
+ url: layerModel.url,
103
+ }),
104
+ style,
105
+ })
106
+ }
89
107
  case MapContextLayerTypeEnum.XYZ:
90
108
  return new TileLayer({
91
109
  source: new XYZ({
@@ -26,7 +26,8 @@ export class ApiCardComponent implements OnInit, OnChanges {
26
26
 
27
27
  ngOnInit() {
28
28
  this.displayApiFormButton =
29
- this.link.accessServiceProtocol === 'ogcFeatures' ? true : false
29
+ this.link.accessServiceProtocol === 'ogcFeatures' ||
30
+ this.link.accessServiceProtocol === 'wfs'
30
31
  }
31
32
 
32
33
  ngOnChanges(changes: SimpleChanges) {
@@ -37,15 +37,31 @@
37
37
  </div>
38
38
  </div>
39
39
  </div>
40
- <div class="flex flex-col gap-3">
41
- <p class="text-sm" translate>record.metadata.api.form.offset</p>
42
- <gn-ui-text-input
43
- class="w-20"
44
- [value]="offset$ | async"
45
- (valueChange)="setOffset($event)"
46
- hint=""
47
- >
48
- </gn-ui-text-input>
40
+ <div class="flex flex-col gap-3 relative">
41
+ <p class="text-sm" [class.text-gray-600]="!supportOffset" translate>
42
+ record.metadata.api.form.offset
43
+ </p>
44
+ <div class="flex items-center">
45
+ <gn-ui-text-input
46
+ class="w-20"
47
+ [value]="offset$ | async"
48
+ [disabled]="!supportOffset"
49
+ (valueChange)="supportOffset ? setOffset($event) : null"
50
+ hint=""
51
+ >
52
+ </gn-ui-text-input>
53
+ <div
54
+ *ngIf="!supportOffset"
55
+ class="flex items-center gap-2 text-orange-500 z-10 ml-3"
56
+ >
57
+ <span
58
+ class="material-symbols-outlined"
59
+ matTooltip="Not supported on this service"
60
+ >
61
+ warning
62
+ </span>
63
+ </div>
64
+ </div>
49
65
  </div>
50
66
  <div class="flex flex-col gap-3">
51
67
  <p class="text-sm" translate>record.metadata.api.form.type</p>
@@ -1,8 +1,11 @@
1
1
  import { ChangeDetectionStrategy, Component, Input } from '@angular/core'
2
- import { OgcApiEndpoint } from '@camptocamp/ogc-client'
3
- import { DatasetServiceDistribution } from '../../../../../../libs/common/domain/src/lib/model/record'
2
+ import { OgcApiEndpoint, WfsEndpoint } from '@camptocamp/ogc-client'
3
+ import {
4
+ DatasetServiceDistribution,
5
+ ServiceProtocol,
6
+ } from '../../../../../../libs/common/domain/src/lib/model/record'
4
7
  import { mimeTypeToFormat } from '../../../../../../libs/util/shared/src'
5
- import { BehaviorSubject, combineLatest, map } from 'rxjs'
8
+ import { BehaviorSubject, combineLatest, map, switchMap } from 'rxjs'
6
9
 
7
10
  const DEFAULT_PARAMS = {
8
11
  OFFSET: '',
@@ -18,19 +21,26 @@ const DEFAULT_PARAMS = {
18
21
  export class RecordApiFormComponent {
19
22
  @Input() set apiLink(value: DatasetServiceDistribution) {
20
23
  this.outputFormats = [{ value: 'json', label: 'JSON' }]
24
+ this.accessServiceProtocol = value ? value.accessServiceProtocol : undefined
25
+ this.apiFeatureType = value ? value.name : undefined
21
26
  if (value) {
22
27
  this.apiBaseUrl = value.url.href
23
28
  this.parseOutputFormats()
24
29
  }
25
30
  this.resetUrl()
26
31
  }
32
+
27
33
  offset$ = new BehaviorSubject('')
28
34
  limit$ = new BehaviorSubject('')
29
35
  format$ = new BehaviorSubject('')
30
36
  apiBaseUrl: string
37
+ apiFeatureType: string
38
+ supportOffset = true
39
+ accessServiceProtocol: ServiceProtocol | undefined
31
40
  outputFormats = [{ value: 'json', label: 'JSON' }]
41
+
32
42
  apiQueryUrl$ = combineLatest([this.offset$, this.limit$, this.format$]).pipe(
33
- map(([offset, limit, format]) => {
43
+ switchMap(async ([offset, limit, format]) => {
34
44
  let outputUrl
35
45
  if (this.apiBaseUrl) {
36
46
  const url = new URL(this.apiBaseUrl)
@@ -44,6 +54,20 @@ export class RecordApiFormComponent {
44
54
  }
45
55
  outputUrl = url.toString()
46
56
  }
57
+
58
+ if (this.accessServiceProtocol === 'wfs') {
59
+ const wfsEndpoint = new WfsEndpoint(this.apiBaseUrl)
60
+ if (await wfsEndpoint.isReady()) {
61
+ const options = {
62
+ outputFormat: format,
63
+ startIndex: Number(offset),
64
+ }
65
+ if (limit !== '-1') {
66
+ options['maxFeatures'] = Number(limit)
67
+ }
68
+ outputUrl = wfsEndpoint.getFeatureUrl(this.apiFeatureType, options)
69
+ }
70
+ }
47
71
  return outputUrl
48
72
  })
49
73
  )
@@ -80,32 +104,49 @@ export class RecordApiFormComponent {
80
104
  ? this.apiBaseUrl.slice(0, -1)
81
105
  : this.apiBaseUrl
82
106
 
83
- this.getOutputFormats(apiUrl).then((outputFormats) => {
84
- const formatsList = outputFormats.itemFormats.map((format) => {
85
- const normalizedFormat = mimeTypeToFormat(format)
86
- if (normalizedFormat) {
87
- return {
88
- label: normalizedFormat?.toUpperCase(),
89
- value: normalizedFormat,
90
- }
107
+ this.getOutputFormats(apiUrl, this.accessServiceProtocol).then(
108
+ (outputFormats) => {
109
+ let formatsList = []
110
+ if ('itemFormats' in outputFormats) {
111
+ formatsList = this.mapFormats(outputFormats.itemFormats)
112
+ } else if ('outputFormats' in outputFormats) {
113
+ formatsList = this.mapFormats(outputFormats.outputFormats)
91
114
  }
92
- return null
93
- })
94
- this.outputFormats = this.outputFormats.concat(
95
- formatsList.filter(Boolean)
96
- )
97
- this.outputFormats = this.outputFormats
98
- .filter(
99
- (format, index, self) =>
100
- index === self.findIndex((t) => t.value === format.value)
115
+ this.outputFormats = this.outputFormats.concat(
116
+ formatsList.filter(Boolean)
101
117
  )
102
- .sort((a, b) => a.label.localeCompare(b.label))
118
+ this.outputFormats = this.outputFormats
119
+ .filter(
120
+ (format, index, self) =>
121
+ index === self.findIndex((t) => t.value === format.value)
122
+ )
123
+ .sort((a, b) => a.label.localeCompare(b.label))
124
+ }
125
+ )
126
+ }
127
+
128
+ mapFormats(formats: any[]) {
129
+ return formats.map((format) => {
130
+ const normalizedFormat = mimeTypeToFormat(format)
131
+ if (normalizedFormat) {
132
+ return {
133
+ label: normalizedFormat.toUpperCase(),
134
+ value: normalizedFormat,
135
+ }
136
+ }
137
+ return null
103
138
  })
104
139
  }
105
140
 
106
- async getOutputFormats(url) {
107
- const endpoint = await new OgcApiEndpoint(url)
108
- const firstCollection = (await endpoint.featureCollections)[0]
109
- return endpoint.getCollectionInfo(firstCollection)
141
+ async getOutputFormats(url: string, accessServiceProtocol: string) {
142
+ if (accessServiceProtocol === 'wfs') {
143
+ const endpoint = await new WfsEndpoint(url).isReady()
144
+ this.supportOffset = endpoint.supportsStartIndex()
145
+ return endpoint.getServiceInfo()
146
+ } else {
147
+ const endpoint = await new OgcApiEndpoint(url)
148
+ const firstCollection = (await endpoint.featureCollections)[0]
149
+ return endpoint.getCollectionInfo(firstCollection)
150
+ }
110
151
  }
111
152
  }
@@ -8,4 +8,5 @@
8
8
  [placeholder]="hint"
9
9
  [attr.aria-label]="hint"
10
10
  [attr.required]="required || null"
11
+ [disabled]="disabled"
11
12
  />
@@ -29,6 +29,7 @@ export class TextInputComponent implements AfterViewInit {
29
29
  @Input() extraClass = ''
30
30
  @Input() hint: string
31
31
  @Input() required = false
32
+ @Input() disabled: boolean
32
33
  rawChange = new Subject<string>()
33
34
  @Output() valueChange = this.rawChange.pipe(distinctUntilChanged())
34
35
  @ViewChild('input') input
@@ -4,6 +4,7 @@
4
4
 
5
5
  :host {
6
6
  position: relative;
7
+ display: block;
7
8
  }
8
9
 
9
10
  .carousel-step-dot {