@geogirafe/lib-geoportal 1.0.2260326707 → 1.0.2263318691

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.
@@ -16,7 +16,7 @@ import { getDistance } from '../../../tools/utils/olutils.js';
16
16
  class CrossSectionSettingsComponent extends GirafeHTMLElement {
17
17
  template = () => {
18
18
  return uHtml `<style>
19
- #panel{min-width:25rem;height:100%;overflow:auto}#content{background:var(--bkg-color);margin:0;padding:1.5rem}#content .message{text-align:center;width:100%}#content .message *{margin:.25rem}#content div.option{justify-content:space-between;margin-top:.5rem;display:flex}h3,.text-label{color:var(--text-color)}.scrollable-table-container{width:100%;max-height:200px;display:block;overflow-y:auto}.scrollable-table{border-collapse:collapse;width:100%}.scrollable-table td{color:var(--text-color)}.table-cell{border:none;padding:4px 2px}.sticky-header{z-index:1;background-color:#f1f1f1;border:none;padding:5px 2px;position:sticky;top:0}.cell{flex:100px;min-width:100px;max-width:100%}input{background-color:var(--bkg-color);color:var(--text-color);border:solid 1px var(--text-color);border-radius:3px;outline:0}.btn-group{margin:5px 0}.btn-group-flex{flex-direction:row;gap:.5rem;margin:.5rem auto;display:flex}.btn-group-flex>button,.btn-group-flex>select,.btn-group-flex>input{width:50%}.btn-group-flex input.gg-checkbox{flex-grow:0;width:auto}.btn-group-flex>label{text-align:right;width:50%}.btn-group-flex label:after{content:" :"}.btn-group-inline{gap:5px;margin:10px auto;display:inline}.btn-group-grid{gap:5px;margin:10px auto;display:grid}.reset-btn{background-color:var(--bkg-color);width:22px;color:var(--text-color);border:none;border-radius:50%;justify-content:center;align-items:center;margin:2px;padding:0;display:flex}.reset-btn img{object-fit:contain}.reset-btn:hover{background-color:var(--bkg-color-grad1);cursor:pointer}.action-btn{color:#fff;background-color:none;border-radius:50%;margin:2px;padding:2px}.action-btn:hover{background-color:var(--bkg-color-grad1);cursor:pointer;border-radius:50%}.dataset-row{box-sizing:border-box;border-bottom:1px solid #eee;align-items:center;gap:.5rem;width:100%;padding:.25rem 0;font-size:.875rem;line-height:1.2;display:flex}.dataset-row:last-child{border-bottom:none}.dataset-row>*{flex-shrink:0}.dataset-name{white-space:nowrap;text-overflow:ellipsis;flex:auto;min-width:6rem;overflow:hidden}.icon-wrapper{justify-content:center;align-items:center;width:1.25rem;height:1.25rem;margin-right:.5rem;display:flex}.loader-progress{flex-direction:column;align-items:flex-start;width:100%}.progress-wrapper{width:100%;position:relative}.gg-progress{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#eee;width:100%;height:1.95rem}.gg-progress::-webkit-progress-bar{background-color:#eee;border-radius:0}.gg-progress::-webkit-progress-value{background-color:#929292;border-radius:0}.gg-progress::-moz-progress-bar{background-color:#929292;border-radius:0}.progress-label{justify-content:center;align-items:center;font-size:.875rem;display:flex;position:absolute;inset:0}.progress-icon{pointer-events:none;mix-blend-mode:difference;position:absolute;left:.5em}
19
+ #panel{min-width:25rem;height:100%;overflow:auto}#content{background:var(--bkg-color);margin:0;padding:1.5rem}#content .message{text-align:center;width:100%}#content .message *{margin:.25rem}#content div.option{justify-content:space-between;margin-top:.5rem;display:flex}h3,.text-label{color:var(--text-color)}.scrollable-table-container{width:100%;max-height:200px;display:block;overflow-y:auto}.scrollable-table{border-collapse:collapse;width:100%}.scrollable-table td{color:var(--text-color)}.table-cell{border:none;padding:4px 2px}.sticky-header{z-index:1;background-color:#f1f1f1;border:none;padding:5px 2px;position:sticky;top:0}.cell{flex:100px;min-width:100px;max-width:100%}input{background-color:var(--bkg-color);color:var(--text-color);border:solid 1px var(--text-color);border-radius:3px;outline:0}.btn-group{margin:5px 0}.btn-group-flex{flex-direction:row;gap:.5rem;margin:.5rem auto;display:flex}.btn-group-flex>button,.btn-group-flex>select,.btn-group-flex>input{width:50%}.btn-group-flex input.gg-checkbox{flex-grow:0;width:auto}.btn-group-flex>label{text-align:right;width:50%}.btn-group-flex label:after{content:" :"}.btn-group-inline{gap:5px;margin:10px auto;display:inline}.btn-group-grid{gap:5px;margin:10px auto;display:grid}.reset-btn{background-color:var(--bkg-color);width:22px;color:var(--text-color);border:none;border-radius:50%;justify-content:center;align-items:center;margin:2px;padding:0;display:flex}.reset-btn img{object-fit:contain}.reset-btn:hover{background-color:var(--bkg-color-grad1);cursor:pointer}.action-btn{color:#fff;background-color:none;border-radius:50%;margin:2px;padding:2px}.action-btn:hover{background-color:var(--bkg-color-grad1);cursor:pointer;border-radius:50%}.dataset-row{box-sizing:border-box;border-bottom:1px solid #eee;align-items:center;gap:.5rem;width:100%;padding:.25rem 0;font-size:.875rem;line-height:1.2;display:flex}.dataset-row:last-child{border-bottom:none}.dataset-row>*{flex-shrink:0}.dataset-name{white-space:nowrap;text-overflow:ellipsis;min-width:6rem;color:var(--text-color);flex:auto;overflow:hidden}.icon-wrapper{justify-content:center;align-items:center;width:1.25rem;height:1.25rem;margin-right:.5rem;display:flex}.loader-progress{flex-direction:column;align-items:flex-start;width:100%}.progress-wrapper{width:100%;position:relative}.gg-progress{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#eee;width:100%;height:1.95rem}.gg-progress::-webkit-progress-bar{background-color:#eee;border-radius:0}.gg-progress::-webkit-progress-value{background-color:#929292;border-radius:0}.gg-progress::-moz-progress-bar{background-color:#929292;border-radius:0}.progress-label{justify-content:center;align-items:center;font-size:.875rem;display:flex;position:absolute;inset:0}.progress-icon{pointer-events:none;mix-blend-mode:difference;position:absolute;left:.5em}
20
20
  </style><style>
21
21
  *{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}
22
22
  </style>
@@ -2,4 +2,5 @@ import DrawingComponent from './component.js';
2
2
  export default class DrawingComponentMobile extends DrawingComponent {
3
3
  template: () => import("uhtml").Hole;
4
4
  constructor();
5
+ protected connectedCallback(): void;
5
6
  }
@@ -15,4 +15,12 @@ button.selected{background-color:#daebff!important;border:1px solid #54a4ff!impo
15
15
  constructor() {
16
16
  super('drawing-mobile');
17
17
  }
18
+ connectedCallback() {
19
+ super.connectedCallback();
20
+ this.subscribe('interface.swipeupPanelContent', (_oldContent, newContent) => {
21
+ if (this.state.interface.swipeupPanelContent === 'drawing' || newContent === 'drawing') {
22
+ this.togglePanel(true);
23
+ }
24
+ });
25
+ }
18
26
  }
@@ -16,10 +16,10 @@ export default class DrawingContainerMobile extends GirafeHTMLElement {
16
16
  }
17
17
  connectedCallback() {
18
18
  super.connectedCallback();
19
- this.subscribe('interface.swipeupPanelContent', () => {
19
+ this.subscribe('interface.swipeupPanelContent', (_oldContent, newContent) => {
20
20
  // Disable the drawing mode if the swipeup panel were to host anything else than
21
21
  // the drawing toolbox
22
- if (this.state.interface.swipeupPanelContent !== 'drawing') {
22
+ if (this.state.interface.swipeupPanelContent !== 'drawing' && newContent !== 'drawing') {
23
23
  this.state.interface.drawingPanelVisible = false;
24
24
  }
25
25
  this.render();
@@ -10,14 +10,13 @@ export default class MenuMobileOfflineButton extends GirafeHTMLElement {
10
10
  icon = 'icons/offline.svg';
11
11
  label = 'Offline mode';
12
12
  constructor() {
13
- super('mobile-drawing-button');
13
+ super('mobile-offline-button');
14
14
  }
15
15
  onPointerUp() {
16
16
  // If not delaying, the releasing of the click is also fired
17
- // on the button of the drawing toolbox that's underneath
18
- // the pointer, resulting in selecting the polygon tool
17
+ // on the offline panel shown
19
18
  setTimeout(() => {
20
- this.state.interface.drawingPanelVisible = true;
19
+ this.state.interface.offlinePanelVisible = true;
21
20
  this.state.interface.swipeupPanelContent = 'offline';
22
21
  }, 50);
23
22
  }
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.0.2260326707",
8
+ "version": "1.0.2263318691",
9
9
  "type": "module",
10
10
  "engines": {
11
11
  "node": ">=20.19.0"
@@ -1 +1 @@
1
- {"version":"1.0.2260326707", "build":"2260326707", "date":"13/01/2026"}
1
+ {"version":"1.0.2263318691", "build":"2263318691", "date":"14/01/2026"}
@@ -21,7 +21,7 @@ function customDnsLookup(hostname, arg1, arg2) {
21
21
  const callback = typeof arg1 === 'function' ? arg1 : arg2;
22
22
  const options = typeof arg1 === 'function' ? undefined : arg1;
23
23
  if (hostname === 'app.localhost') {
24
- callback(null, '127.0.0.1', 4);
24
+ callback(null, '127.0.0.1', 4); // use '0.0.0.0' for being accessible from other devices on the network
25
25
  } else {
26
26
  originalDnsLookup(hostname, options, callback);
27
27
  }
@@ -3,6 +3,7 @@ export default class GraphicalInterface {
3
3
  isMobile: boolean;
4
4
  helpVisible: boolean;
5
5
  drawingPanelVisible: boolean;
6
+ offlinePanelVisible: boolean;
6
7
  printPanelVisible: boolean;
7
8
  extLayerPanelVisible: boolean;
8
9
  crossSectionPanelVisible: boolean;
@@ -3,6 +3,7 @@ export default class GraphicalInterface {
3
3
  isMobile = false;
4
4
  helpVisible = false;
5
5
  drawingPanelVisible = false;
6
+ offlinePanelVisible = false;
6
7
  printPanelVisible = false;
7
8
  extLayerPanelVisible = false;
8
9
  crossSectionPanelVisible = false;