@opengeoweb/sigmet-airmet 12.3.0 → 12.4.1

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/index.esm.js CHANGED
@@ -43,6 +43,7 @@ var en = {
43
43
  close: "Close",
44
44
  "discard-non-capitalized": "Discard",
45
45
  "are-you-sure-you-want-to-discard": "Are you sure you would like to discard this {{product}}? Its properties will be lost",
46
+ "are-you-sure-amend": "Are you sure you want to amend this {{product}}?",
46
47
  "save-changes-made": "Do you want to save any changes made?",
47
48
  "publish-this-product": "Are you sure you want to publish this {{product}}?",
48
49
  "cancel-this-product": "Are you sure you want to cancel this {{product}}?",
@@ -55,6 +56,7 @@ var en = {
55
56
  "remove-geometry": "Remove geometry",
56
57
  "valid-until-time": "Valid until time has to be after Valid from time",
57
58
  "discard-product": "Discard {{product}}",
59
+ "amend-product": "Amend {{product}}",
58
60
  "issue-time": "Issue time",
59
61
  "type-title": "Type",
60
62
  "phenomenon-title": "What",
@@ -166,6 +168,7 @@ var fi = {
166
168
  close: "Sulje",
167
169
  "discard-non-capitalized": "Hylkää",
168
170
  "are-you-sure-you-want-to-discard": "Oletko varma, että haluat hylätä kyseisen {{product}}? Kaikki ilmoitetut tiedot menetetään",
171
+ "are-you-sure-amend": "Are you sure you want to amend this {{product}}?",
169
172
  "save-changes-made": "Haluatko tallentaa kaikki tehdyt muutokset?",
170
173
  "publish-this-product": "Oletko varma, että haluat julkaista tämän {{product}}:n?",
171
174
  "cancel-this-product": "Oletko varma, että haluat peruuttaa tämän {{product}}:n?",
@@ -178,6 +181,7 @@ var fi = {
178
181
  "remove-geometry": "Poista geometria",
179
182
  "valid-until-time": "Voimassaoloajan päättymishetken on oltava voimassaoloajan alkuhetken jälkeen",
180
183
  "discard-product": "Hylkää {{product}}",
184
+ "amend-product": "Amend {{product}}",
181
185
  "issue-time": "Julkaisuaika",
182
186
  "type-title": "Tyyppi",
183
187
  "phenomenon-title": "Mikä",
@@ -289,6 +293,7 @@ var no = {
289
293
  close: "Lukk",
290
294
  "discard-non-capitalized": "Forkast",
291
295
  "are-you-sure-you-want-to-discard": "Er du sikker på at du vil forkaste dette {{product}}?",
296
+ "are-you-sure-amend": "Are you sure you want to amend this {{product}}?",
292
297
  "save-changes-made": "Vil du lagre endringene dine?",
293
298
  "publish-this-product": "Er du sikker på at du vil endre dette {{product}}?",
294
299
  "cancel-this-product": "Er du sikker på at du vil avbryte dette {{product}}?",
@@ -301,6 +306,7 @@ var no = {
301
306
  "remove-geometry": "Fjern geometry",
302
307
  "valid-until-time": "Gyldig til tid må være etter Gyldig fra tid",
303
308
  "discard-product": "Forkast {{product}}",
309
+ "amend-product": "Amend {{product}}",
304
310
  "issue-time": "Utstedt tid",
305
311
  "type-title": "Type",
306
312
  "phenomenon-title": "Hva",
@@ -411,6 +417,7 @@ var nl = {
411
417
  close: "Sluit",
412
418
  "discard-non-capitalized": "Weggooien",
413
419
  "are-you-sure-you-want-to-discard": "Weet je zeker dat je dit {{product}} wilt weggooien? De eigenschappen ervan zullen verloren gaan",
420
+ "are-you-sure-amend": "Weet je zeker dat je deze {{product}} wil aanpassen?",
414
421
  "save-changes-made": "Wil je de aangebrachte wijzigingen opslaan?",
415
422
  "publish-this-product": "Weet je zeker dat je dit {{product}} wilt publiceren?",
416
423
  "cancel-this-product": "Weet je zeker dat je dit {{product}} wilt annuleren?",
@@ -423,6 +430,7 @@ var nl = {
423
430
  "remove-geometry": "Verwijder geometrie",
424
431
  "valid-until-time": "Eind tijd moet na tijd vanaf zijn",
425
432
  "discard-product": "Gooi {{product}} weg",
433
+ "amend-product": "Pas {{product}} aan",
426
434
  "issue-time": "Uitgiftetijd",
427
435
  "type-title": "Type",
428
436
  "phenomenon-title": "Wat",
@@ -624,6 +632,7 @@ var ProductAction;
624
632
  ProductAction["PUBLISH"] = "PUBLISH";
625
633
  ProductAction["CANCEL"] = "CANCEL";
626
634
  ProductAction["RENEW"] = "RENEW";
635
+ ProductAction["AMEND"] = "AMEND";
627
636
  ProductAction["SAVE"] = "SAVE";
628
637
  ProductAction["DISCARD"] = "DISCARD";
629
638
  ProductAction["DUPLICATE"] = "DUPLICATE";
@@ -4645,6 +4654,10 @@ var styles$2 = {
4645
4654
  '.MuiButtonBase-root.MuiIconButton-root': {
4646
4655
  padding: '2px',
4647
4656
  marginLeft: '-4px'
4657
+ },
4658
+ '.MuiPickersSectionList-root': {
4659
+ paddingTop: '15px',
4660
+ paddingBottom: '2px'
4648
4661
  }
4649
4662
  }
4650
4663
  };
@@ -5125,35 +5138,40 @@ var useDelayedFormValues = function useDelayedFormValues(getValues, register, de
5125
5138
  };
5126
5139
  var getConfirmationDialogTitle = function getConfirmationDialogTitle(t, action, productType) {
5127
5140
  var product = productType.toUpperCase();
5128
- if (action === ProductAction.CLOSE) {
5129
- return t('close') + " " + product;
5130
- }
5131
- if (action === ProductAction.DISCARD) {
5132
- return t('discard-non-capitalized') + " " + product;
5133
- }
5134
- if (action === ProductAction.PUBLISH) {
5135
- return t('publish');
5141
+ switch (action) {
5142
+ case ProductAction.CLOSE:
5143
+ return t('close') + " " + product;
5144
+ case ProductAction.DISCARD:
5145
+ return t('discard-non-capitalized') + " " + product;
5146
+ case ProductAction.PUBLISH:
5147
+ case ProductAction.AMEND:
5148
+ return t('publish');
5149
+ default:
5150
+ return t('cancel') + " " + product;
5136
5151
  }
5137
- return t('cancel') + " " + product;
5138
5152
  };
5139
5153
  var getConfirmationDialogContent = function getConfirmationDialogContent(t, action, productType) {
5140
5154
  var product = productType.toUpperCase();
5141
- if (action === ProductAction.DISCARD) {
5142
- return t('are-you-sure-you-want-to-discard', {
5143
- product: product
5144
- });
5145
- }
5146
- if (action === ProductAction.CLOSE) {
5147
- return t('save-changes-made');
5148
- }
5149
- if (action === ProductAction.PUBLISH) {
5150
- return t('publish-this-product', {
5151
- product: product
5152
- });
5155
+ switch (action) {
5156
+ case ProductAction.DISCARD:
5157
+ return t('are-you-sure-you-want-to-discard', {
5158
+ product: product
5159
+ });
5160
+ case ProductAction.AMEND:
5161
+ return t('are-you-sure-amend', {
5162
+ product: product
5163
+ });
5164
+ case ProductAction.CLOSE:
5165
+ return t('save-changes-made');
5166
+ case ProductAction.PUBLISH:
5167
+ return t('publish-this-product', {
5168
+ product: product
5169
+ });
5170
+ default:
5171
+ return t('cancel-this-product', {
5172
+ product: product
5173
+ });
5153
5174
  }
5154
- return t('cancel-this-product', {
5155
- product: product
5156
- });
5157
5175
  };
5158
5176
  var getConfirmationDialogButtonLabel = function getConfirmationDialogButtonLabel(t, action, productType) {
5159
5177
  var product = productType.toUpperCase();
@@ -5162,6 +5180,10 @@ var getConfirmationDialogButtonLabel = function getConfirmationDialogButtonLabel
5162
5180
  return "" + t('discard-product', {
5163
5181
  product: product
5164
5182
  });
5183
+ case ProductAction.AMEND:
5184
+ return "" + t('amend-product', {
5185
+ product: product
5186
+ });
5165
5187
  case ProductAction.PUBLISH:
5166
5188
  return t('publish');
5167
5189
  case ProductAction.CANCEL:
@@ -6166,7 +6188,9 @@ var Progress = function Progress(_ref) {
6166
6188
  _ref$onChangeTool = _ref.onChangeTool,
6167
6189
  onChangeTool = _ref$onChangeTool === void 0 ? function () {} : _ref$onChangeTool,
6168
6190
  geoJSON = _ref.geoJSON,
6169
- geoJSONIntersection = _ref.geoJSONIntersection;
6191
+ geoJSONIntersection = _ref.geoJSONIntersection,
6192
+ _ref$drawToolsDisable = _ref.drawToolsDisabled,
6193
+ drawToolsDisabled = _ref$drawToolsDisable === void 0 ? false : _ref$drawToolsDisable;
6170
6194
  var _useSigmetAirmetTrans = useSigmetAirmetTranslation(),
6171
6195
  t = _useSigmetAirmetTrans.t;
6172
6196
  var _useFormContext = useFormContext(),
@@ -6377,7 +6401,8 @@ var Progress = function Progress(_ref) {
6377
6401
  "data-testid": "endGeometry-drawTools",
6378
6402
  tools: tools,
6379
6403
  activeTool: activeTool,
6380
- onChangeTool: onChangeTool
6404
+ onChangeTool: onChangeTool,
6405
+ isDisabled: drawToolsDisabled
6381
6406
  }), activeTool && jsx(FormHelperText, {
6382
6407
  variant: "filled",
6383
6408
  sx: styles$2.quitDrawModeMessage,
@@ -6547,7 +6572,9 @@ var StartGeometry = function StartGeometry(_ref) {
6547
6572
  onChangeTool = _ref.onChangeTool,
6548
6573
  geoJSON = _ref.geoJSON,
6549
6574
  geoJSONIntersection = _ref.geoJSONIntersection,
6550
- productConfig = _ref.productConfig;
6575
+ productConfig = _ref.productConfig,
6576
+ _ref$isDisabled = _ref.isDisabled,
6577
+ isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled;
6551
6578
  var _useSigmetAirmetTrans = useSigmetAirmetTranslation(),
6552
6579
  t = _useSigmetAirmetTrans.t;
6553
6580
  var _useFormContext = useFormContext(),
@@ -6582,7 +6609,7 @@ var StartGeometry = function StartGeometry(_ref) {
6582
6609
  activeTool: activeTool,
6583
6610
  tools: tools,
6584
6611
  onChangeTool: onChangeTool,
6585
- isDisabled: isShortTest()
6612
+ isDisabled: isShortTest() || isDisabled
6586
6613
  }), activeTool && jsx(FormHelperText, {
6587
6614
  variant: "filled",
6588
6615
  sx: styles$2.quitDrawModeMessage,
@@ -8024,9 +8051,13 @@ var useGeoJSONHandling = function useGeoJSONHandling(_ref) {
8024
8051
  var sourcePanelId = useSelector(function (store) {
8025
8052
  return uiSelectors.getSourcePanelId(store, 'publicWarnings');
8026
8053
  });
8054
+ var warningsDialogOpen = useSelector(function (store) {
8055
+ return uiSelectors.getisDialogOpen(store, 'publicWarnings');
8056
+ });
8027
8057
  var linkedMaps = useSelector(function (store) {
8028
8058
  return genericSelectors.getLinkedMaps(store, sourcePanelId);
8029
8059
  });
8060
+ var drawToolsDisabled = warningsDialogOpen ? linkedMaps.length === 0 : false;
8030
8061
  var reduxActiveStart = useSelector(function (state) {
8031
8062
  var _state$drawingtools;
8032
8063
  return (_state$drawingtools = state.drawingtools) == null || (_state$drawingtools = _state$drawingtools.entities['sigmetStartGeometry']) == null ? void 0 : _state$drawingtools.activeDrawModeId;
@@ -8138,7 +8169,8 @@ var useGeoJSONHandling = function useGeoJSONHandling(_ref) {
8138
8169
  },
8139
8170
  onChangeEndTool: function onChangeEndTool(newTool) {
8140
8171
  return onChangeTool('end', newTool, deactivateStartTool, changeActiveEndTool || function () {}, endEditModes);
8141
- }
8172
+ },
8173
+ drawToolsDisabled: drawToolsDisabled
8142
8174
  };
8143
8175
  };
8144
8176
 
@@ -8293,7 +8325,8 @@ var SigmetForm = function SigmetForm(_ref) {
8293
8325
  currentEndDrawTool: activeEndTool
8294
8326
  }),
8295
8327
  onChangeStartTool = _useGeoJSONHandling.onChangeStartTool,
8296
- onChangeEndTool = _useGeoJSONHandling.onChangeEndTool;
8328
+ onChangeEndTool = _useGeoJSONHandling.onChangeEndTool,
8329
+ drawToolsDisabled = _useGeoJSONHandling.drawToolsDisabled;
8297
8330
  var layers = [getStartLayer('geoJSONIntersectionBounds', 'geojsonlayer-fir'), Object.assign({}, getEndLayer('geoJSON', 'geojsonlayer-end'), {
8298
8331
  exitDrawModeCallback: deactivateEndTool,
8299
8332
  updateGeojson: updateEndGeoJson
@@ -8394,7 +8427,8 @@ var SigmetForm = function SigmetForm(_ref) {
8394
8427
  tools: startEditModes,
8395
8428
  onChangeTool: onChangeStartTool,
8396
8429
  activeTool: activeStartTool,
8397
- productConfig: productConfig
8430
+ productConfig: productConfig,
8431
+ isDisabled: drawToolsDisabled
8398
8432
  }), !isCancelSigmet && jsx(Levels, {
8399
8433
  isDisabled: isDisabled,
8400
8434
  isReadOnly: isReadOnly,
@@ -8411,7 +8445,8 @@ var SigmetForm = function SigmetForm(_ref) {
8411
8445
  geoJSONIntersection: endGeoJSONIntersection,
8412
8446
  tools: endEditModes,
8413
8447
  onChangeTool: onChangeEndTool,
8414
- activeTool: activeEndTool
8448
+ activeTool: activeEndTool,
8449
+ drawToolsDisabled: drawToolsDisabled
8415
8450
  }), !isCancelSigmet && !omitChange && jsx(Change, {
8416
8451
  isDisabled: isDisabled,
8417
8452
  isReadOnly: isReadOnly
@@ -8593,7 +8628,8 @@ var AirmetForm = function AirmetForm(_ref) {
8593
8628
  startEditModes: startEditModes,
8594
8629
  currentStartDrawTool: activeStartTool
8595
8630
  }),
8596
- onChangeStartTool = _useGeoJSONHandling.onChangeStartTool;
8631
+ onChangeStartTool = _useGeoJSONHandling.onChangeStartTool,
8632
+ drawToolsDisabled = _useGeoJSONHandling.drawToolsDisabled;
8597
8633
  var layers = [getStartLayer('geoJSONIntersectionBounds', 'geojsonlayer-fir'), Object.assign({}, getStartLayer('geoJSON', 'geojsonlayer-start'), {
8598
8634
  exitDrawModeCallback: deactivateStartTool,
8599
8635
  updateGeojson: updateStartGeoJson
@@ -8694,7 +8730,8 @@ var AirmetForm = function AirmetForm(_ref) {
8694
8730
  tools: startEditModes,
8695
8731
  onChangeTool: onChangeStartTool,
8696
8732
  activeTool: activeStartTool,
8697
- productConfig: productConfig
8733
+ productConfig: productConfig,
8734
+ isDisabled: drawToolsDisabled
8698
8735
  }), !isCancelAirmet && hasLevels && jsx(Levels, {
8699
8736
  isDisabled: isDisabled,
8700
8737
  isReadOnly: isReadOnly,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/sigmet-airmet",
3
- "version": "12.3.0",
3
+ "version": "12.4.1",
4
4
  "description": "GeoWeb Sigmet/Airmet library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -8,22 +8,22 @@
8
8
  "url": "git@gitlab.com:opengeoweb/opengeoweb.git"
9
9
  },
10
10
  "dependencies": {
11
- "@opengeoweb/api": "12.3.0",
12
- "@opengeoweb/shared": "12.3.0",
13
- "@opengeoweb/theme": "12.3.0",
14
- "@opengeoweb/store": "12.3.0",
15
- "@opengeoweb/webmap": "12.3.0",
16
- "@opengeoweb/webmap-react": "12.3.0",
11
+ "@opengeoweb/api": "12.4.1",
12
+ "@opengeoweb/shared": "12.4.1",
13
+ "@opengeoweb/theme": "12.4.1",
14
+ "@opengeoweb/store": "12.4.1",
15
+ "@opengeoweb/webmap": "12.4.1",
16
+ "@opengeoweb/webmap-react": "12.4.1",
17
17
  "react-redux": "^9.2.0",
18
- "@opengeoweb/core": "12.3.0",
19
- "@opengeoweb/authentication": "12.3.0",
18
+ "@opengeoweb/core": "12.4.1",
19
+ "@opengeoweb/authentication": "12.4.1",
20
20
  "@mui/system": "^7.0.1",
21
- "@opengeoweb/form-fields": "12.3.0",
21
+ "@opengeoweb/form-fields": "12.4.1",
22
22
  "react-hook-form": "^7.50.1",
23
23
  "axios": "^1.7.7",
24
24
  "lodash": "^4.17.21",
25
25
  "@reduxjs/toolkit": "^2.6.1",
26
- "i18next": "^23.11.5",
26
+ "i18next": "^25.0.1",
27
27
  "@mui/material": "^7.0.1",
28
28
  "react-i18next": "^15.1.1",
29
29
  "@tanstack/react-query": "^5.69.2"
@@ -117,5 +117,9 @@ export declare const styles: {
117
117
  padding: string;
118
118
  marginLeft: string;
119
119
  };
120
+ '.MuiPickersSectionList-root': {
121
+ paddingTop: string;
122
+ paddingBottom: string;
123
+ };
120
124
  };
121
125
  };
@@ -13,6 +13,7 @@ interface ProgressProps extends ConfigurableFormFieldProps {
13
13
  activeTool?: string;
14
14
  tools?: DrawMode[];
15
15
  onChangeTool?: (newToolMode: DrawMode) => void;
16
+ drawToolsDisabled?: boolean;
16
17
  }
17
18
  declare const Progress: React.FC<ProgressProps>;
18
19
  export default Progress;
@@ -9,6 +9,7 @@ interface StartGeometryProps {
9
9
  tools: DrawMode[];
10
10
  onChangeTool: (newToolMode: DrawMode) => void;
11
11
  productConfig: ProductConfig;
12
+ isDisabled?: boolean;
12
13
  }
13
14
  declare const StartGeometry: React.FC<StartGeometryProps>;
14
15
  export default StartGeometry;
@@ -21,5 +21,6 @@ interface UseGeoJSONHandlingProps {
21
21
  export declare const useGeoJSONHandling: ({ storedGeoJSON, storedEndGeoJSON, startGeoJSON, endGeoJSON, updateStartGeoJson, updateEndGeoJson, deactivateStartTool, deactivateEndTool, changeActiveStartTool, changeActiveEndTool, startEditModes, endEditModes, currentStartDrawTool, currentEndDrawTool, }: UseGeoJSONHandlingProps) => {
22
22
  onChangeStartTool: (newTool: DrawMode) => void;
23
23
  onChangeEndTool: (newTool: DrawMode) => void;
24
+ drawToolsDisabled: boolean;
24
25
  };
25
26
  export {};
@@ -71,6 +71,7 @@ export declare enum ProductAction {
71
71
  PUBLISH = "PUBLISH",
72
72
  CANCEL = "CANCEL",
73
73
  RENEW = "RENEW",
74
+ AMEND = "AMEND",
74
75
  SAVE = "SAVE",
75
76
  DISCARD = "DISCARD",
76
77
  DUPLICATE = "DUPLICATE",