@plannco-ppe/ppe-core 1.0.20 → 1.0.21

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/dist/index.js CHANGED
@@ -23597,8 +23597,8 @@ const bg = {
23597
23597
  layers: [t],
23598
23598
  condition: Cf,
23599
23599
  style: (l) => {
23600
- const h = l.getProperties();
23601
- return $g(h);
23600
+ const h = l.getProperties(), c = (n == null ? void 0 : n._zoneFillVisible) ?? !0;
23601
+ return $g(h, c);
23602
23602
  }
23603
23603
  }), o = new kf({
23604
23604
  source: e,
@@ -23622,6 +23622,8 @@ const bg = {
23622
23622
  _currentAction: "none",
23623
23623
  _currentDrawingZone: null,
23624
23624
  _zoneFilter: void 0,
23625
+ _zoneFillVisible: !0,
23626
+ _zonePopupVisible: !0,
23625
23627
  ...n
23626
23628
  };
23627
23629
  },
@@ -23630,10 +23632,14 @@ const bg = {
23630
23632
  const t = n.initialState, { _zoneLayer: e, _zoneLabelLayer: i } = t;
23631
23633
  e && n.addLayer(e), i && n.addLayer(i), e.setStyle((o) => {
23632
23634
  const a = o.getProperties();
23633
- return t._zoneFilter && !t._zoneFilter(a) ? [] : us(a);
23635
+ return t._zoneFilter && !t._zoneFilter(a) ? [] : us(a, t._zoneFillVisible);
23634
23636
  }), Dg(n), se(n), Ug(n), kg(n);
23635
23637
  const s = ((r = n.options.zoningConfig) == null ? void 0 : r.editMode) || "editing";
23636
- t._editMode = s, _h(n, s), n.drawZone = (o) => mh(n, o), n.deleteZone = (o) => yh(n, o), n.updateZone = (o) => jg(n, o), n.setZoningMode = (o) => Yg(n, o), n.setEditMode = (o) => Ng(n, o), n.selectZone = (o) => Gg(n, o), n.deselectZone = () => ko(n), n.getSelectedZone = () => zg(n), n.startDrawingZone = (o) => Vg(n, o), n.cancelCurrentAction = () => Ls(n), n.deleteSelectedZone = () => ph(n), n.updateZoneOccupationColors = () => Zg(n), n.filterZones = (o) => Kg(n, o), n.setZoneLayerVisible = (o) => t._zoneLayer.setVisible(o), n.setZoneLabelLayerVisible = (o) => t._zoneLabelLayer.setVisible(o), n.isZoneLayerVisible = () => t._zoneLayer.getVisible(), n.isZoneLabelLayerVisible = () => t._zoneLabelLayer.getVisible(), n.restoreZones = (o) => Og(n, o);
23638
+ t._editMode = s, _h(n, s), n.drawZone = (o) => mh(n, o), n.deleteZone = (o) => yh(n, o), n.updateZone = (o) => jg(n, o), n.setZoningMode = (o) => Yg(n, o), n.setEditMode = (o) => Ng(n, o), n.selectZone = (o) => Gg(n, o), n.deselectZone = () => ko(n), n.getSelectedZone = () => zg(n), n.startDrawingZone = (o) => Vg(n, o), n.cancelCurrentAction = () => Ls(n), n.deleteSelectedZone = () => ph(n), n.updateZoneOccupationColors = () => Zg(n), n.filterZones = (o) => Kg(n, o), n.setZoneLayerVisible = (o) => t._zoneLayer.setVisible(o), n.setZoneLabelLayerVisible = (o) => t._zoneLabelLayer.setVisible(o), n.setZoneFillVisible = (o) => {
23639
+ t._zoneFillVisible = o, t._zoneLayer.changed();
23640
+ }, n.setZonePopupVisible = (o) => {
23641
+ t._zonePopupVisible = o;
23642
+ }, n.isZoneLayerVisible = () => t._zoneLayer.getVisible(), n.isZoneLabelLayerVisible = () => t._zoneLabelLayer.getVisible(), n.isZoneFillVisible = () => t._zoneFillVisible, n.isZonePopupVisible = () => t._zonePopupVisible, n.restoreZones = (o) => Og(n, o);
23637
23643
  }
23638
23644
  };
23639
23645
  function Dg(n) {
@@ -23801,12 +23807,12 @@ function Yg(n, t) {
23801
23807
  ];
23802
23808
  const a = o.length ? o : [r.color];
23803
23809
  return [
23804
- ...us(s.getProperties()),
23810
+ ...us(s.getProperties(), e._zoneFillVisible),
23805
23811
  Fg({ colors: a })
23806
23812
  ];
23807
23813
  }), se(n)) : (i.setStyle((s) => {
23808
23814
  const r = s.getProperties();
23809
- return e._zoneFilter && !e._zoneFilter(r) ? [] : us(r);
23815
+ return e._zoneFilter && !e._zoneFilter(r) ? [] : us(r, e._zoneFillVisible);
23810
23816
  }), se(n));
23811
23817
  }
23812
23818
  function Zg(n) {
@@ -23926,7 +23932,8 @@ function Kg(n, t) {
23926
23932
  function Ug(n) {
23927
23933
  n.on("pointermove", (t) => {
23928
23934
  var s;
23929
- if (n.initialState._currentAction === "drawing") {
23935
+ const e = n.initialState;
23936
+ if (e._currentAction === "drawing" || !e._zonePopupVisible) {
23930
23937
  n._hidePopup();
23931
23938
  return;
23932
23939
  }
@@ -23954,19 +23961,19 @@ function qg(n) {
23954
23961
  });
23955
23962
  return n && e.setExtent(n), { layer: e, source: t };
23956
23963
  }
23957
- function us({ color: n }) {
23964
+ function us({ color: n }, t = !0) {
23958
23965
  return [
23959
23966
  new rt({
23960
23967
  stroke: new ie({ color: n, width: 3 }),
23961
- fill: new lt({ color: n + "80" })
23968
+ fill: new lt({ color: t ? n + "80" : "rgba(0,0,0,0)" })
23962
23969
  })
23963
23970
  ];
23964
23971
  }
23965
- function $g({ color: n }) {
23972
+ function $g({ color: n }, t = !0) {
23966
23973
  return [
23967
23974
  new rt({
23968
23975
  stroke: new ie({ color: n, width: 5 }),
23969
- fill: new lt({ color: n + "A0" })
23976
+ fill: new lt({ color: t ? n + "A0" : "rgba(0,0,0,0)" })
23970
23977
  })
23971
23978
  ];
23972
23979
  }