@opengeoweb/sigmet-airmet 4.10.0 → 4.12.0

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.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from './lib/components/MapViewGeoJson';
4
4
  export * from './lib/components/ProductList';
5
5
  export * from './lib/components/MetInfoWrapper';
6
6
  export { createApi } from './lib/utils/api';
7
+ export * from './lib/types';
package/index.esm.js CHANGED
@@ -586,9 +586,16 @@ var Direction;
586
586
  Direction["NW"] = "NW";
587
587
  Direction["NNW"] = "NNW";
588
588
  })(Direction || (Direction = {}));
589
+
590
+ var isInstanceOfSigmet = function isInstanceOfSigmet(obj) {
591
+ return 'phenomenon' in obj;
592
+ };
589
593
  var isInstanceOfCancelSigmet = function isInstanceOfCancelSigmet(obj) {
590
594
  return 'cancelsSigmetSequenceId' in obj;
591
595
  };
596
+ var isInstanceOfAirmet = function isInstanceOfAirmet(obj) {
597
+ return 'phenomenon' in obj;
598
+ };
592
599
  var isInstanceOfCancelAirmet = function isInstanceOfCancelAirmet(obj) {
593
600
  return 'cancelsAirmetSequenceId' in obj;
594
601
  };
@@ -1620,99 +1627,6 @@ var getFieldLabel = function getFieldLabel(title, isDisabled) {
1620
1627
  return isDisabled ? title : "".concat(action, " ").concat(title.toLowerCase());
1621
1628
  };
1622
1629
 
1623
- var location_indicator_mwo$1 = "EHDB";
1624
- var firareas$1 = {
1625
- EHAA: {
1626
- firname: "AMSTERDAM FIR",
1627
- location_indicator_atsr: "EHAA",
1628
- location_indicator_atsu: "EHAA",
1629
- areapreset: "NL_FIR",
1630
- maxhoursofvalidity: 4,
1631
- hoursbeforevalidity: 4,
1632
- tc_maxhoursofvalidity: 6,
1633
- tc_hoursbeforevalidity: 12,
1634
- va_maxhoursofvalidity: 6,
1635
- va_hoursbeforevalidity: 12,
1636
- adjacent_firs: [
1637
- "EKDK",
1638
- "EDWW",
1639
- "EDGG",
1640
- "EBBU",
1641
- "EGTT",
1642
- "EGPX"
1643
- ],
1644
- units: [
1645
- {
1646
- unit_type: "level_unit",
1647
- allowed_units: [
1648
- "FT",
1649
- "FL"
1650
- ]
1651
- },
1652
- {
1653
- unit_type: "movement_unit",
1654
- allowed_units: [
1655
- "KT"
1656
- ]
1657
- }
1658
- ]
1659
- }
1660
- };
1661
- var active_firs$1 = [
1662
- "EHAA"
1663
- ];
1664
- var sigmetConfig = {
1665
- location_indicator_mwo: location_indicator_mwo$1,
1666
- firareas: firareas$1,
1667
- active_firs: active_firs$1
1668
- };
1669
-
1670
- var location_indicator_mwo = "EHDB";
1671
- var firareas = {
1672
- EHAA: {
1673
- firname: "AMSTERDAM FIR",
1674
- location_indicator_atsr: "EHAA",
1675
- location_indicator_atsu: "EHAA",
1676
- maxhoursofvalidity: 4,
1677
- hoursbeforevalidity: 4,
1678
- units: [
1679
- {
1680
- unit_type: "level_unit",
1681
- allowed_units: [
1682
- "FT",
1683
- "FL"
1684
- ]
1685
- },
1686
- {
1687
- unit_type: "movement_unit",
1688
- allowed_units: [
1689
- "KT"
1690
- ]
1691
- },
1692
- {
1693
- unit_type: "surfacewind_unit",
1694
- allowed_units: [
1695
- "KT"
1696
- ]
1697
- },
1698
- {
1699
- unit_type: "cloud_level_unit",
1700
- allowed_units: [
1701
- "FT"
1702
- ]
1703
- }
1704
- ]
1705
- }
1706
- };
1707
- var active_firs = [
1708
- "EHAA"
1709
- ];
1710
- var airmetConfig = {
1711
- location_indicator_mwo: location_indicator_mwo,
1712
- firareas: firareas,
1713
- active_firs: active_firs
1714
- };
1715
-
1716
1630
  var invalidLevelsTill4900FTStepsMessage = 'Levels must be rounded to the nearest 100ft';
1717
1631
  var invalidLevelsFrom50FLStepsMessage = 'Levels must be rounded to the nearest 5';
1718
1632
 
@@ -1751,7 +1665,8 @@ var Levels = function Levels(_ref) {
1751
1665
  isReadOnly = _ref.isReadOnly,
1752
1666
  _ref$onChange = _ref.onChange,
1753
1667
  _onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
1754
- productType = _ref.productType;
1668
+ productType = _ref.productType,
1669
+ productConfig = _ref.productConfig;
1755
1670
 
1756
1671
  var _useFormContext = useFormContext(),
1757
1672
  watch = _useFormContext.watch,
@@ -1765,9 +1680,8 @@ var Levels = function Levels(_ref) {
1765
1680
  isRequired = _useDraftFormHelpers.isRequired;
1766
1681
 
1767
1682
  var levelInfoMode = watch('levelInfoMode');
1768
- var config = productType === 'sigmet' ? sigmetConfig : airmetConfig;
1769
1683
 
1770
- var _useProductSettings = useProductSettings(config),
1684
+ var _useProductSettings = useProductSettings(productConfig),
1771
1685
  allowedUnits = _useProductSettings.allowedUnits;
1772
1686
 
1773
1687
  var selectedFIR = watch('locationIndicatorATSR'); // Get allowed level units based on selected FIR - if no FIR selected, allow all default units
@@ -2464,6 +2378,7 @@ var getMinMovementSpeedValue = function getMinMovementSpeedValue(unit) {
2464
2378
 
2465
2379
  var Progress = function Progress(_ref) {
2466
2380
  var productType = _ref.productType,
2381
+ productConfig = _ref.productConfig,
2467
2382
  drawMode = _ref.drawMode,
2468
2383
  _ref$isDisabled = _ref.isDisabled,
2469
2384
  isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
@@ -2485,9 +2400,7 @@ var Progress = function Progress(_ref) {
2485
2400
  isRequired = _useDraftFormHelpers.isRequired,
2486
2401
  isDraft = _useDraftFormHelpers.isDraft;
2487
2402
 
2488
- var config = productType === 'sigmet' ? sigmetConfig : airmetConfig;
2489
-
2490
- var _useProductSettings = useProductSettings(config),
2403
+ var _useProductSettings = useProductSettings(productConfig),
2491
2404
  allowedUnits = _useProductSettings.allowedUnits;
2492
2405
 
2493
2406
  var movementType = watch('movementType');
@@ -2698,7 +2611,7 @@ var Progress = function Progress(_ref) {
2698
2611
  * */
2699
2612
 
2700
2613
  var SelectFIR = function SelectFIR(_ref) {
2701
- var productType = _ref.productType,
2614
+ var productConfig = _ref.productConfig,
2702
2615
  isDisabled = _ref.isDisabled,
2703
2616
  isReadOnly = _ref.isReadOnly;
2704
2617
 
@@ -2708,9 +2621,7 @@ var SelectFIR = function SelectFIR(_ref) {
2708
2621
  var _useDraftFormHelpers = useDraftFormHelpers(),
2709
2622
  isRequired = _useDraftFormHelpers.isRequired;
2710
2623
 
2711
- var config = productType === 'sigmet' ? sigmetConfig : airmetConfig;
2712
-
2713
- var _useProductSettings = useProductSettings(config),
2624
+ var _useProductSettings = useProductSettings(productConfig),
2714
2625
  defaultATSR = _useProductSettings.defaultATSR,
2715
2626
  optionsFIR = _useProductSettings.optionsFIR,
2716
2627
  allFIRS = _useProductSettings.allFIRS;
@@ -2743,7 +2654,7 @@ var SelectFIR = function SelectFIR(_ref) {
2743
2654
  defaultValue: allFIRS[defaultATSR].location_indicator_atsu
2744
2655
  }), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
2745
2656
  name: "locationIndicatorMWO",
2746
- defaultValue: config.location_indicator_mwo
2657
+ defaultValue: productConfig.location_indicator_mwo
2747
2658
  }), /*#__PURE__*/React__default.createElement(ReactHookFormHiddenInput, {
2748
2659
  name: "firName",
2749
2660
  defaultValue: allFIRS[defaultATSR].firname
@@ -2834,7 +2745,7 @@ var getValidFromXHoursBeforeMessage = function getValidFromXHoursBeforeMessage(h
2834
2745
  };
2835
2746
 
2836
2747
  var ValidFrom = function ValidFrom(_ref) {
2837
- var productType = _ref.productType,
2748
+ var productConfig = _ref.productConfig,
2838
2749
  isDisabled = _ref.isDisabled,
2839
2750
  isReadOnly = _ref.isReadOnly,
2840
2751
  _ref$onChange = _ref.onChange,
@@ -2847,7 +2758,6 @@ var ValidFrom = function ValidFrom(_ref) {
2847
2758
  var _useDraftFormHelpers = useDraftFormHelpers(),
2848
2759
  isRequired = _useDraftFormHelpers.isRequired;
2849
2760
 
2850
- var config = productType === 'sigmet' ? sigmetConfig : airmetConfig;
2851
2761
  var label = getFieldLabel('Date and time', isReadOnly);
2852
2762
  return /*#__PURE__*/React__default.createElement(ProductFormFieldLayout, {
2853
2763
  title: "Valid from"
@@ -2866,7 +2776,7 @@ var ValidFrom = function ValidFrom(_ref) {
2866
2776
  },
2867
2777
  // The current time can be no more than 4 hours before the validity start (12 for VA/TC SIGMET)
2868
2778
  isCurrentTimeXHoursBeforeValue: function isCurrentTimeXHoursBeforeValue(value) {
2869
- return isXHoursBefore(moment.utc().format(), value, getHoursBeforeValidity(getValues('phenomenon'), getValues('locationIndicatorATSR'), config)) || getValidFromXHoursBeforeMessage(getHoursBeforeValidity(getValues('phenomenon'), getValues('locationIndicatorATSR'), config));
2779
+ return isXHoursBefore(moment.utc().format(), value, getHoursBeforeValidity(getValues('phenomenon'), getValues('locationIndicatorATSR'), productConfig)) || getValidFromXHoursBeforeMessage(getHoursBeforeValidity(getValues('phenomenon'), getValues('locationIndicatorATSR'), productConfig));
2870
2780
  }
2871
2781
  }
2872
2782
  },
@@ -2911,6 +2821,7 @@ var getDefaultHoursValid = function getDefaultHoursValid(productType) {
2911
2821
 
2912
2822
  var ValidUntil = function ValidUntil(_ref) {
2913
2823
  var productType = _ref.productType,
2824
+ productConfig = _ref.productConfig,
2914
2825
  isDisabled = _ref.isDisabled,
2915
2826
  isReadOnly = _ref.isReadOnly,
2916
2827
  _ref$onChange = _ref.onChange,
@@ -2924,7 +2835,6 @@ var ValidUntil = function ValidUntil(_ref) {
2924
2835
  isRequired = _useDraftFormHelpers.isRequired;
2925
2836
 
2926
2837
  var label = getFieldLabel('Date and time', isReadOnly);
2927
- var config = productType === 'sigmet' ? sigmetConfig : airmetConfig;
2928
2838
  var defaultHoursValid = getDefaultHoursValid(productType);
2929
2839
  return /*#__PURE__*/React__default.createElement(ProductFormFieldLayout, {
2930
2840
  title: "Valid until"
@@ -2943,7 +2853,7 @@ var ValidUntil = function ValidUntil(_ref) {
2943
2853
  },
2944
2854
  // Validity end can be no more than 4 hours after validity start (6 for VA/TC SIGMET)
2945
2855
  isXHoursAfter: function isXHoursAfter$1(value) {
2946
- return isXHoursAfter(value, getValues('validDateStart'), getMaxHoursOfValidity(getValues('phenomenon'), getValues('locationIndicatorATSR'), config)) || "Valid until time can be no more than ".concat(getMaxHoursOfValidity(getValues('phenomenon'), getValues('locationIndicatorATSR'), config), " hours after Valid from time");
2856
+ return isXHoursAfter(value, getValues('validDateStart'), getMaxHoursOfValidity(getValues('phenomenon'), getValues('locationIndicatorATSR'), productConfig)) || "Valid until time can be no more than ".concat(getMaxHoursOfValidity(getValues('phenomenon'), getValues('locationIndicatorATSR'), productConfig), " hours after Valid from time");
2947
2857
  }
2948
2858
  }
2949
2859
  },
@@ -3206,7 +3116,8 @@ var SurfaceWind = function SurfaceWind(_ref) {
3206
3116
  _ref$onChange = _ref.onChange,
3207
3117
  _onChange = _ref$onChange === void 0 ? function () {
3208
3118
  return null;
3209
- } : _ref$onChange;
3119
+ } : _ref$onChange,
3120
+ productConfig = _ref.productConfig;
3210
3121
 
3211
3122
  var _useFormContext = useFormContext(),
3212
3123
  trigger = _useFormContext.trigger,
@@ -3216,7 +3127,7 @@ var SurfaceWind = function SurfaceWind(_ref) {
3216
3127
  var _useDraftFormHelpers = useDraftFormHelpers(),
3217
3128
  isRequired = _useDraftFormHelpers.isRequired;
3218
3129
 
3219
- var _useProductSettings = useProductSettings(airmetConfig),
3130
+ var _useProductSettings = useProductSettings(productConfig),
3220
3131
  allowedUnits = _useProductSettings.allowedUnits;
3221
3132
 
3222
3133
  var selectedFIR = watch('locationIndicatorATSR'); // Get allowed speed units based on selected FIR - if no FIR selected, allow all units
@@ -3365,7 +3276,8 @@ var CloudLevels = function CloudLevels(_ref) {
3365
3276
  var isDisabled = _ref.isDisabled,
3366
3277
  isReadOnly = _ref.isReadOnly,
3367
3278
  _ref$onChange = _ref.onChange,
3368
- _onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange;
3279
+ _onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
3280
+ productConfig = _ref.productConfig;
3369
3281
 
3370
3282
  var _useFormContext = useFormContext(),
3371
3283
  watch = _useFormContext.watch,
@@ -3377,7 +3289,7 @@ var CloudLevels = function CloudLevels(_ref) {
3377
3289
  var _useDraftFormHelpers = useDraftFormHelpers(),
3378
3290
  isRequired = _useDraftFormHelpers.isRequired;
3379
3291
 
3380
- var _useProductSettings = useProductSettings(airmetConfig),
3292
+ var _useProductSettings = useProductSettings(productConfig),
3381
3293
  allowedUnits = _useProductSettings.allowedUnits;
3382
3294
 
3383
3295
  var selectedFIR = watch('locationIndicatorATSR');
@@ -4113,6 +4025,99 @@ var ProductFormLayout = function ProductFormLayout(_a) {
4113
4025
  }, children));
4114
4026
  };
4115
4027
 
4028
+ var location_indicator_mwo$1 = "EHDB";
4029
+ var firareas$1 = {
4030
+ EHAA: {
4031
+ firname: "AMSTERDAM FIR",
4032
+ location_indicator_atsr: "EHAA",
4033
+ location_indicator_atsu: "EHAA",
4034
+ areapreset: "NL_FIR",
4035
+ maxhoursofvalidity: 4,
4036
+ hoursbeforevalidity: 4,
4037
+ tc_maxhoursofvalidity: 6,
4038
+ tc_hoursbeforevalidity: 12,
4039
+ va_maxhoursofvalidity: 6,
4040
+ va_hoursbeforevalidity: 12,
4041
+ adjacent_firs: [
4042
+ "EKDK",
4043
+ "EDWW",
4044
+ "EDGG",
4045
+ "EBBU",
4046
+ "EGTT",
4047
+ "EGPX"
4048
+ ],
4049
+ units: [
4050
+ {
4051
+ unit_type: "level_unit",
4052
+ allowed_units: [
4053
+ "FT",
4054
+ "FL"
4055
+ ]
4056
+ },
4057
+ {
4058
+ unit_type: "movement_unit",
4059
+ allowed_units: [
4060
+ "KT"
4061
+ ]
4062
+ }
4063
+ ]
4064
+ }
4065
+ };
4066
+ var active_firs$1 = [
4067
+ "EHAA"
4068
+ ];
4069
+ var sigmetConfig = {
4070
+ location_indicator_mwo: location_indicator_mwo$1,
4071
+ firareas: firareas$1,
4072
+ active_firs: active_firs$1
4073
+ };
4074
+
4075
+ var location_indicator_mwo = "EHDB";
4076
+ var firareas = {
4077
+ EHAA: {
4078
+ firname: "AMSTERDAM FIR",
4079
+ location_indicator_atsr: "EHAA",
4080
+ location_indicator_atsu: "EHAA",
4081
+ maxhoursofvalidity: 4,
4082
+ hoursbeforevalidity: 4,
4083
+ units: [
4084
+ {
4085
+ unit_type: "level_unit",
4086
+ allowed_units: [
4087
+ "FT",
4088
+ "FL"
4089
+ ]
4090
+ },
4091
+ {
4092
+ unit_type: "movement_unit",
4093
+ allowed_units: [
4094
+ "KT"
4095
+ ]
4096
+ },
4097
+ {
4098
+ unit_type: "surfacewind_unit",
4099
+ allowed_units: [
4100
+ "KT"
4101
+ ]
4102
+ },
4103
+ {
4104
+ unit_type: "cloud_level_unit",
4105
+ allowed_units: [
4106
+ "FT"
4107
+ ]
4108
+ }
4109
+ ]
4110
+ }
4111
+ };
4112
+ var active_firs = [
4113
+ "EHAA"
4114
+ ];
4115
+ var airmetConfig = {
4116
+ location_indicator_mwo: location_indicator_mwo,
4117
+ firareas: firareas,
4118
+ active_firs: active_firs
4119
+ };
4120
+
4116
4121
  var useConditionalFields$1 = function useConditionalFields() {
4117
4122
  var _useFormContext = useFormContext(),
4118
4123
  watch = _useFormContext.watch,
@@ -4139,7 +4144,9 @@ var SigmetForm = function SigmetForm(_ref) {
4139
4144
  _ref$initialCancelSig = _ref.initialCancelSigmet,
4140
4145
  initialCancelSigmet = _ref$initialCancelSig === void 0 ? null : _ref$initialCancelSig,
4141
4146
  _ref$showMap = _ref.showMap,
4142
- showMap = _ref$showMap === void 0 ? true : _ref$showMap;
4147
+ showMap = _ref$showMap === void 0 ? true : _ref$showMap,
4148
+ _ref$productConfig = _ref.productConfig,
4149
+ productConfig = _ref$productConfig === void 0 ? sigmetConfig : _ref$productConfig;
4143
4150
 
4144
4151
  var _useApiContext = useApiContext(),
4145
4152
  api = _useApiContext.api;
@@ -4254,17 +4261,18 @@ var SigmetForm = function SigmetForm(_ref) {
4254
4261
  isReadOnly: isReadOnly,
4255
4262
  helperText: helperText
4256
4263
  }), /*#__PURE__*/React__default.createElement(ValidFrom, {
4257
- productType: "sigmet",
4264
+ productConfig: productConfig,
4258
4265
  isDisabled: isDisabled,
4259
4266
  isReadOnly: isReadOnly,
4260
4267
  onChange: onChangeForm
4261
4268
  }), /*#__PURE__*/React__default.createElement(ValidUntil, {
4262
4269
  productType: "sigmet",
4270
+ productConfig: productConfig,
4263
4271
  isDisabled: isDisabled,
4264
4272
  isReadOnly: isReadOnly,
4265
4273
  onChange: onChangeForm
4266
4274
  }), /*#__PURE__*/React__default.createElement(SelectFIR, {
4267
- productType: "sigmet",
4275
+ productConfig: productConfig,
4268
4276
  isDisabled: isDisabled,
4269
4277
  isReadOnly: isReadOnly
4270
4278
  }), /*#__PURE__*/React__default.createElement(StartGeometry, {
@@ -4278,9 +4286,11 @@ var SigmetForm = function SigmetForm(_ref) {
4278
4286
  isDisabled: isDisabled,
4279
4287
  isReadOnly: isReadOnly,
4280
4288
  onChange: onChangeForm,
4281
- productType: "sigmet"
4289
+ productType: "sigmet",
4290
+ productConfig: productConfig
4282
4291
  }), !isCancelSigmet && /*#__PURE__*/React__default.createElement(Progress, {
4283
4292
  productType: "sigmet",
4293
+ productConfig: productConfig,
4284
4294
  isDisabled: isDisabled,
4285
4295
  isReadOnly: isReadOnly,
4286
4296
  drawMode: drawMode,
@@ -4397,7 +4407,9 @@ var AirmetForm = function AirmetForm(_ref) {
4397
4407
  _ref$initialCancelAir = _ref.initialCancelAirmet,
4398
4408
  initialCancelAirmet = _ref$initialCancelAir === void 0 ? null : _ref$initialCancelAir,
4399
4409
  _ref$showMap = _ref.showMap,
4400
- showMap = _ref$showMap === void 0 ? true : _ref$showMap;
4410
+ showMap = _ref$showMap === void 0 ? true : _ref$showMap,
4411
+ _ref$productConfig = _ref.productConfig,
4412
+ productConfig = _ref$productConfig === void 0 ? airmetConfig : _ref$productConfig;
4401
4413
 
4402
4414
  var _useApiContext = useApiContext(),
4403
4415
  api = _useApiContext.api;
@@ -4487,7 +4499,8 @@ var AirmetForm = function AirmetForm(_ref) {
4487
4499
  }), !isCancelAirmet && hasSurfaceWind && /*#__PURE__*/React__default.createElement(SurfaceWind, {
4488
4500
  isReadOnly: isReadOnly,
4489
4501
  isDisabled: isDisabled,
4490
- onChange: onChangeForm
4502
+ onChange: onChangeForm,
4503
+ productConfig: productConfig
4491
4504
  }), !isCancelAirmet && /*#__PURE__*/React__default.createElement(ObservationForecast, {
4492
4505
  isDisabled: isDisabled,
4493
4506
  isReadOnly: isReadOnly
@@ -4497,19 +4510,20 @@ var AirmetForm = function AirmetForm(_ref) {
4497
4510
  helperText: helperText,
4498
4511
  onChange: onChangeForm
4499
4512
  }), /*#__PURE__*/React__default.createElement(ValidFrom, {
4500
- productType: "airmet",
4501
4513
  isReadOnly: isReadOnly,
4502
4514
  isDisabled: isDisabled,
4503
- onChange: onChangeForm
4515
+ onChange: onChangeForm,
4516
+ productConfig: productConfig
4504
4517
  }), /*#__PURE__*/React__default.createElement(ValidUntil, {
4505
4518
  productType: "airmet",
4506
4519
  isReadOnly: isReadOnly,
4507
4520
  isDisabled: isDisabled,
4508
- onChange: onChangeForm
4521
+ onChange: onChangeForm,
4522
+ productConfig: productConfig
4509
4523
  }), /*#__PURE__*/React__default.createElement(SelectFIR, {
4510
- productType: "airmet",
4511
4524
  isReadOnly: isReadOnly,
4512
- isDisabled: isDisabled
4525
+ isDisabled: isDisabled,
4526
+ productConfig: productConfig
4513
4527
  }), /*#__PURE__*/React__default.createElement(StartGeometry, {
4514
4528
  isReadOnly: isReadOnly,
4515
4529
  drawMode: drawMode,
@@ -4521,16 +4535,19 @@ var AirmetForm = function AirmetForm(_ref) {
4521
4535
  isDisabled: isDisabled,
4522
4536
  isReadOnly: isReadOnly,
4523
4537
  onChange: onChangeForm,
4524
- productType: "airmet"
4538
+ productType: "airmet",
4539
+ productConfig: productConfig
4525
4540
  }), !isCancelAirmet && hasCloudLevels && /*#__PURE__*/React__default.createElement(CloudLevels, {
4526
4541
  isDisabled: isDisabled,
4527
4542
  isReadOnly: isReadOnly,
4528
- onChange: onChangeForm
4543
+ onChange: onChangeForm,
4544
+ productConfig: productConfig
4529
4545
  }), !isCancelAirmet && /*#__PURE__*/React__default.createElement(Progress, {
4530
4546
  productType: "airmet",
4531
4547
  isDisabled: isDisabled,
4532
4548
  isReadOnly: isReadOnly,
4533
- onChange: onChangeForm
4549
+ onChange: onChangeForm,
4550
+ productConfig: productConfig
4534
4551
  }), !isCancelAirmet && /*#__PURE__*/React__default.createElement(Change, {
4535
4552
  isDisabled: isDisabled,
4536
4553
  isReadOnly: isReadOnly
@@ -5063,9 +5080,10 @@ var ProductList = function ProductList(_ref) {
5063
5080
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
5064
5081
  * */
5065
5082
  var CancelSigmetVolcanicMovements = function CancelSigmetVolcanicMovements(_ref) {
5066
- var sigmet = _ref.sigmet;
5083
+ var sigmet = _ref.sigmet,
5084
+ productConfig = _ref.productConfig;
5067
5085
 
5068
- var _useProductSettings = useProductSettings(sigmetConfig),
5086
+ var _useProductSettings = useProductSettings(productConfig),
5069
5087
  allFIRS = _useProductSettings.allFIRS;
5070
5088
 
5071
5089
  var _useDraftFormHelpers = useDraftFormHelpers(),
@@ -5117,6 +5135,7 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
5117
5135
  toggleDialogStatus = _ref.toggleDialogStatus,
5118
5136
  mode = _ref.mode,
5119
5137
  productType = _ref.productType,
5138
+ productConfig = _ref.productConfig,
5120
5139
  productCanBe = _ref.productCanBe,
5121
5140
  product = _ref.product;
5122
5141
 
@@ -5200,7 +5219,8 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
5200
5219
  cancelLabel: getConfirmationDialogCancelLabel(action),
5201
5220
  catchOnCancel: action === 'CLOSED',
5202
5221
  content: isVAPhenomenon(product, action) ? /*#__PURE__*/React.createElement(CancelSigmetVolcanicMovements, {
5203
- sigmet: product
5222
+ sigmet: product,
5223
+ productConfig: productConfig
5204
5224
  }) : null
5205
5225
  });
5206
5226
  };
@@ -5299,12 +5319,14 @@ var ProductFormDialogContent = function ProductFormDialogContent(_ref) {
5299
5319
  mode: mode,
5300
5320
  isCancelSigmet: product !== null && isInstanceOfCancelSigmet(product),
5301
5321
  initialSigmet: product !== null && !isInstanceOfCancelSigmet(product) ? product : null,
5302
- initialCancelSigmet: product !== null && isInstanceOfCancelSigmet(product) ? product : null
5322
+ initialCancelSigmet: product !== null && isInstanceOfCancelSigmet(product) ? product : null,
5323
+ productConfig: productConfig
5303
5324
  }) : /*#__PURE__*/React.createElement(AirmetForm, {
5304
5325
  mode: mode,
5305
5326
  isCancelAirmet: product !== null && isInstanceOfCancelAirmet(product),
5306
5327
  initialAirmet: product !== null && !isInstanceOfCancelAirmet(product) ? product : null,
5307
- initialCancelAirmet: product !== null && isInstanceOfCancelAirmet(product) ? product : null
5328
+ initialCancelAirmet: product !== null && isInstanceOfCancelAirmet(product) ? product : null,
5329
+ productConfig: productConfig
5308
5330
  }), /*#__PURE__*/React.createElement(DraftFieldHelper, null), /*#__PURE__*/React.createElement(Backdrop, {
5309
5331
  "data-testid": "loader",
5310
5332
  open: showLoader,
@@ -5350,7 +5372,8 @@ var ProductFormDialog = function ProductFormDialog(_ref) {
5350
5372
  productType = _ref.productType,
5351
5373
  toggleDialogStatus = _ref.toggleDialogStatus,
5352
5374
  _ref$productListItem = _ref.productListItem,
5353
- productListItem = _ref$productListItem === void 0 ? null : _ref$productListItem;
5375
+ productListItem = _ref$productListItem === void 0 ? null : _ref$productListItem,
5376
+ productConfig = _ref.productConfig;
5354
5377
  // Show the right options for a new sigmet/airmet not coming from the BE
5355
5378
  var productCanBe = productListItem !== null ? productListItem.canbe : ['DRAFTED', 'DISCARDED', 'PUBLISHED']; // Determine mode of form based on canbe properties
5356
5379
 
@@ -5372,7 +5395,8 @@ var ProductFormDialog = function ProductFormDialog(_ref) {
5372
5395
  mode: mode,
5373
5396
  productCanBe: productCanBe,
5374
5397
  product: product,
5375
- productType: productType
5398
+ productType: productType,
5399
+ productConfig: productConfig
5376
5400
  })));
5377
5401
  };
5378
5402
 
@@ -5387,7 +5411,8 @@ var ProductFormDialog = function ProductFormDialog(_ref) {
5387
5411
  */
5388
5412
 
5389
5413
  var MetInfoWrapper = function MetInfoWrapper(_ref) {
5390
- var productType = _ref.productType;
5414
+ var productType = _ref.productType,
5415
+ productConfig = _ref.productConfig;
5391
5416
 
5392
5417
  var _useApiContext = useApiContext(),
5393
5418
  api = _useApiContext.api;
@@ -5450,6 +5475,7 @@ var MetInfoWrapper = function MetInfoWrapper(_ref) {
5450
5475
  onClickNewProduct: handleNewProductClick
5451
5476
  }), /*#__PURE__*/React__default.createElement(ProductFormDialog, {
5452
5477
  productType: productType,
5478
+ productConfig: productConfig,
5453
5479
  isOpen: isFormDialogOpen,
5454
5480
  toggleDialogStatus: toggleDialogOpen,
5455
5481
  productListItem: selectedProduct
@@ -5501,4 +5527,4 @@ var createApi = function createApi(props) {
5501
5527
  return getApiRoutes(axiosInstance);
5502
5528
  };
5503
5529
 
5504
- export { AirmetForm, ContentDialog, MapViewGeoJson, MetInfoWrapper, ProductList, ProductListRow, SigmetForm, createApi };
5530
+ export { AirmetForm, AirmetPhenomena, CloudLevelUnits, ContentDialog, Direction, LevelUnits, MapDrawMode, MapViewGeoJson, MetInfoWrapper, MovementUnit, ProductList, ProductListRow, ProductStatusDescription, SigmetForm, SigmetPhenomena, StartOrEndDrawing, VisibilityCause, WindUnit, createApi, isInstanceOfAirmet, isInstanceOfCancelAirmet, isInstanceOfCancelSigmet, isInstanceOfCancelSigmetOrAirmet, isInstanceOfSigmet, isInstanceOfSigmetOrAirmet };