@geogirafe/lib-geoportal 1.1.0-dev.2440886319 → 1.1.0-dev.2450198337

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.
@@ -7,7 +7,7 @@ class NewsPanelComponent extends GirafeHTMLElement {
7
7
  styleUrls = null;
8
8
  template = () => {
9
9
  return uHtml `<style>
10
- #panel{box-sizing:border-box;flex-direction:column;min-width:20rem;height:100%;min-height:0;display:flex;overflow:auto}#content{background:var(--bkg-color);box-sizing:border-box;width:100%;min-width:0;color:var(--text-color);flex:auto;margin:0;padding:1.5rem}.news-item{box-sizing:border-box;background-color:#c8d1d12b;border:1px solid #d5d5d5;width:100%;min-width:0;margin:16px 0;padding:15px 13px;box-shadow:0 0 5px #0000001f}.news-header{justify-content:space-between;align-items:flex-start;gap:1rem;display:flex}.news-title{flex:auto;min-width:0;font-size:14px}.news-meta{text-align:right;color:#6b7280;white-space:nowrap;flex:none;font-size:.8rem;line-height:1.3}.news-date{font-weight:500}.news-age{opacity:.8}.news-description{margin-top:.75rem}.news-details{width:100%;min-width:0;margin-top:.75rem}.details-content{box-sizing:border-box;contain:inline-size;width:100%;min-width:0;max-width:100%;overflow-x:auto}.news-details-toggle{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:none;padding:6px}.news-details-toggle:hover{background-color:#fdf6c3ba}
10
+ #panel{box-sizing:border-box;flex-direction:column;min-width:20rem;height:100%;min-height:0;font-family:Arial,sans-serif;font-size:14px;display:flex;overflow:auto}#content{background:var(--bkg-color);box-sizing:border-box;width:100%;min-width:0;color:var(--text-color);flex:auto;margin:0;padding:.5rem}.news-item{box-sizing:border-box;border-bottom:1px solid #cbd5e1;width:100%;min-width:0;margin:0;padding:16px 15px}.news-header{justify-content:space-between;align-items:flex-start;gap:1rem;display:flex}.news-title{flex:auto;min-width:0;font-size:14px}.news-meta{text-align:right;color:#6b7280;white-space:nowrap;flex:none;font-size:.8rem;line-height:1.3}.news-date{border:1px solid #cbd5e1;border-radius:4px;padding:4px;font-weight:500}.news-age{opacity:.8}.news-description{margin-top:.75rem}.news-details{width:100%;min-width:0;margin-top:.75rem}.details-content{box-sizing:border-box;contain:inline-size;width:100%;min-width:0;max-width:100%;overflow-x:auto}.news-details-toggle{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:none;border-radius:5px;padding:10px}.news-details-toggle:hover{background-color:#f0f9ff}
11
11
  </style><style>
12
12
  *{font-family:Arial,sans-serif}.hidden{display:none!important}.gg-rotate90{transform:rotate(90deg)}.gg-rotate180{transform:rotate(180deg)}.gg-rotate270{transform:rotate(270deg)}img{filter:var(--svg-filter)}img.legend-image{filter:var(--svg-map-filter);background:var(--svg-legend-bkg)}div{scrollbar-width:thin}a,a:visited{color:var(--link-color)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin-wait{0%{transform:rotate(0)}7%{transform:rotate(360deg)}to{transform:rotate(360deg)}}.gg-spin{animation-name:spin;animation-duration:2s;animation-timing-function:linear;animation-iteration-count:infinite}.gg-spin-wait{animation-name:spin-wait;animation-duration:10s;animation-timing-function:linear;animation-iteration-count:infinite}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:#999}.gg-button,.gg-select,.gg-input,.gg-textarea{background-color:var(--bkg-color);color:var(--text-color);border:var(--app-standard-border);box-sizing:border-box;cursor:pointer;border-radius:3px;outline:0;margin:0;padding:0 0 0 .5rem;display:inline-block}.gg-label{background-color:var(--bkg-color);color:var(--text-color);border:none;align-items:center;margin:0;padding:0;display:flex}.gg-button,.gg-select,.gg-input,.gg-label{min-height:calc(var(--app-standard-height) / 1.5)}.gg-textarea{max-height:initial;resize:vertical;height:6rem;padding:.5rem;line-height:1.3rem}.gg-input{cursor:text}.gg-checkbox{accent-color:var(--text-color);width:1.2rem}.gg-range{accent-color:var(--text-color)}.gg-button{padding:0 .5rem}.gg-button.active{border:solid 1px var(--text-color-grad2);background-color:var(--text-color-grad2);color:var(--bkg-color)}.gg-button:disabled{color:gray;cursor:not-allowed;background-color:#d3d3d3;border:none}.gg-input:disabled,.gg-select:disabled,.gg-textarea:disabled{color:gray;cursor:not-allowed;background-color:#d3d3d3}.gg-button>img{vertical-align:middle}.gg-icon-button{color:var(--text-color);cursor:pointer;background-color:#0000;border:none;flex-direction:column;justify-content:center;align-items:center;padding:0;display:flex}.gg-icon{justify-content:center;align-items:center;display:flex}.gg-big,.gg-big-withtext{min-width:var(--app-standard-height);min-height:var(--app-standard-height);max-height:var(--app-standard-height)}.gg-big img,.gg-big-withtext img{width:calc(var(--app-standard-height) - 1.5rem);margin:0}.gg-big-withtext span{font-variant:small-caps;padding:0 1rem;font-size:.9rem}.gg-medium,.gg-medium-withtext{min-width:calc(var(--app-standard-height) / 1.2);min-height:calc(var(--app-standard-height) / 1.2);max-height:calc(var(--app-standard-height) / 1.2);flex-direction:row}.gg-medium img{width:calc(var(--app-standard-height) / 2.4);margin:0}.gg-medium-withtext img{width:calc(var(--app-standard-height) / 2.4);margin-left:.5rem}.gg-medium-withtext span{padding:0 1rem 0 .5rem;font-size:.9rem}.gg-small,.gg-small-withtext{min-width:calc(var(--app-standard-height) / 2);min-height:calc(var(--app-standard-height) / 2);max-height:calc(var(--app-standard-height) / 2);flex-direction:row}.gg-small img{width:calc(var(--app-standard-height) / 3);margin:0}.gg-small-withtext img{width:calc(var(--app-standard-height) / 3);margin-left:.5rem}.gg-small-withtext span{padding:0 .5rem 0 .3rem;font-size:.9rem}.gg-button:hover,.gg-select:hover,.gg-input:hover,.gg-textarea:hover,.gg-icon-button:hover{background-color:var(--bkg-color-grad1)}.gg-opacity{opacity:.5}.gg-opacity:hover{opacity:1;background-color:#0000}.gg-tabs{cursor:pointer;grid-auto-flow:column;padding-bottom:1rem;font-size:1rem;display:grid}.gg-tab{border:none;border-bottom:var(--app-standard-border);cursor:pointer;color:var(--text-color);background:0 0;padding:.5rem}.gg-tab.active{border-bottom:solid 1px var(--text-color)}.girafe-button-big,.girafe-button-large,.girafe-button-small,.girafe-button-tiny{color:var(--text-color);background-color:#0000;border:none;flex-direction:column;display:flex}.girafe-button-big:hover,.girafe-button-large:hover,.girafe-button-small:hover,.girafe-button-tiny:hover{background-color:var(--bkg-color-grad1);cursor:pointer}.girafe-button-big.dark,.girafe-button-large.dark,.girafe-button-small.dark,.girafe-button-tiny.dark{background-color:var(--bkg-color);filter:invert()}.girafe-button-big{width:var(--app-standard-height);height:var(--app-standard-height);align-items:center;padding:1rem}.girafe-button-big img{overflow:hidden}.girafe-button-large{flex-direction:row}.girafe-button-large img{height:2rem;margin:.3rem}.girafe-button-large span{height:2rem;margin:.3rem;line-height:2rem}.girafe-button-small{min-width:calc(var(--app-standard-height) / 2);height:calc(var(--app-standard-height) / 2);align-items:center;padding:.5rem}.girafe-button-small img{overflow:hidden}.girafe-button-small span{text-align:left;text-overflow:ellipsis;width:100%;overflow:hidden}.girafe-button-tiny{align-items:center;width:1rem;height:1rem;padding:0}.girafe-button-tiny img{overflow:hidden}.girafe-onboarding-theme{background-color:var(--bkg-color)!important;color:var(--text-color)!important}.girafe-onboarding-theme button{background-color:var(--bkg-color)!important;color:var(--text-color)!important;text-shadow:none!important}.girafe-onboarding-theme button.driver-popover-close-btn{z-index:10000}
13
13
  </style>
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "name": "GeoGirafe PSC",
6
6
  "url": "https://doc.geomapfish.dev"
7
7
  },
8
- "version": "1.1.0-dev.2440886319",
8
+ "version": "1.1.0-dev.2450198337",
9
9
  "type": "module",
10
10
  "engines": {
11
11
  "node": ">=20.19.0"
@@ -1 +1 @@
1
- {"version":"1.1.0-dev.2440886319", "build":"2440886319", "date":"09/04/2026"}
1
+ {"version":"1.1.0-dev.2450198337", "build":"2450198337", "date":"13/04/2026"}
@@ -1,6 +1,17 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  // POC demo variables
3
3
  import ServerOgc from '../../models/serverogc.js';
4
+ const SITN_SERVER = new ServerOgc('gmf', {
5
+ url: 'https://sitn.ne.ch/mapserv_proxy/qgisserver/wfs3',
6
+ wfsSupport: false,
7
+ urlWfs: '',
8
+ oapifSupport: true,
9
+ urlOapif: 'https://sitn.ne.ch/mapserv_proxy/qgisserver/wfs3',
10
+ // @ts-expect-error Defining a new type of server here to be able to catch some miss-configuration
11
+ // of the GMF demo server, see ogcapifeaturesclientgmf.ts
12
+ type: 'gmf',
13
+ imageType: ''
14
+ });
4
15
  export const DEMO_LAYERS = {
5
16
  GEORAMA: {
6
17
  url: 'https://demo.georama.io/features/api',
@@ -39,5 +50,50 @@ export const DEMO_LAYERS = {
39
50
  type: 'gmf',
40
51
  imageType: ''
41
52
  })
53
+ },
54
+ SITN_Point: {
55
+ url: 'https://sitn.ne.ch/mapserv_proxy/qgisserver/wfs3',
56
+ displayName: 'SITN point',
57
+ collectionId: 'demo01_edit_point',
58
+ collectionTitle: null,
59
+ geometryType: 'Point',
60
+ serverType: 'gmf',
61
+ server: SITN_SERVER
62
+ },
63
+ SITN_LineString: {
64
+ url: 'https://sitn.ne.ch/mapserv_proxy/qgisserver/wfs3',
65
+ displayName: 'SITN line',
66
+ collectionId: 'demo02_edit_line',
67
+ collectionTitle: null,
68
+ geometryType: 'LineString',
69
+ serverType: 'gmf',
70
+ server: SITN_SERVER
71
+ },
72
+ SITN_Polygon: {
73
+ url: 'https://sitn.ne.ch/mapserv_proxy/qgisserver/wfs3',
74
+ displayName: 'SITN polygon',
75
+ collectionId: 'demo03_edit_polygon',
76
+ collectionTitle: null,
77
+ geometryType: 'Polygon',
78
+ serverType: 'gmf',
79
+ server: SITN_SERVER
80
+ },
81
+ SITN_MultiLineString: {
82
+ url: 'https://sitn.ne.ch/mapserv_proxy/qgisserver/wfs3',
83
+ displayName: 'SITN multiline',
84
+ collectionId: 'demo04_edit_multiline',
85
+ collectionTitle: null,
86
+ geometryType: 'MultiLineString',
87
+ serverType: 'gmf',
88
+ server: SITN_SERVER
89
+ },
90
+ SITN_MultiPolygon: {
91
+ url: 'https://sitn.ne.ch/mapserv_proxy/qgisserver/wfs3',
92
+ displayName: 'SITN multipolygon',
93
+ collectionId: 'demo05_edit_multipolygon',
94
+ collectionTitle: null,
95
+ geometryType: 'MultiPolygon',
96
+ serverType: 'gmf',
97
+ server: SITN_SERVER
42
98
  }
43
99
  };
@@ -11,16 +11,18 @@ export default class OgcApiFeaturesClientGmf extends OgcApiFeaturesClient {
11
11
  async getSchema(collectionId) {
12
12
  const items = await this.getItems(collectionId, undefined, undefined, 1);
13
13
  const item = items[0];
14
- const properties = Object.fromEntries(Object.entries(item.getProperties())
15
- .filter(([key, _value]) => ['fid', 'name', 'type'].includes(key))
16
- .map(([key, value]) => [key, { type: typeof value }]));
14
+ const properties = Object.fromEntries(Object.entries(item.getProperties()).map(([key, value]) => [key, { type: typeof value }]));
17
15
  // Add geometry information
18
16
  properties['geometry'] = {
19
17
  'format': `geometry-${item.getGeometry().getType().toLowerCase()}`,
20
18
  'x-ogc-role': 'primary-geometry'
21
19
  };
22
- // mark fid as primary key
23
- properties['fid']['x-ogc-role'] = 'id';
20
+ // mark fid or id as primary key
21
+ ['fid', 'id'].forEach((key) => {
22
+ if (properties[key]) {
23
+ properties[key]['x-ogc-role'] = 'id';
24
+ }
25
+ });
24
26
  return {
25
27
  properties: properties
26
28
  };