@opengeoweb/sigmet-airmet 4.3.0 → 4.5.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.esm.js +194 -82
- package/index.umd.js +211 -76
- package/lib/components/ProductForms/ProductFormFields/Change.d.ts +2 -5
- package/lib/components/ProductForms/ProductFormFields/CloudLevels.d.ts +2 -6
- package/lib/components/ProductForms/ProductFormFields/IssuedAt.d.ts +1 -0
- package/lib/components/ProductForms/ProductFormFields/Levels.d.ts +2 -8
- package/lib/components/ProductForms/ProductFormFields/ObservationForecast.d.ts +2 -5
- package/lib/components/ProductForms/ProductFormFields/ObservationForecastTime.d.ts +2 -4
- package/lib/components/ProductForms/ProductFormFields/Phenomenon.d.ts +2 -7
- package/lib/components/ProductForms/ProductFormFields/Progress.d.ts +2 -6
- package/lib/components/ProductForms/ProductFormFields/SelectFIR.d.ts +2 -6
- package/lib/components/ProductForms/ProductFormFields/SurfaceVisibility.d.ts +2 -5
- package/lib/components/ProductForms/ProductFormFields/SurfaceWind.d.ts +2 -5
- package/lib/components/ProductForms/ProductFormFields/Type.d.ts +2 -5
- package/lib/components/ProductForms/ProductFormFields/ValidFrom.d.ts +2 -7
- package/lib/components/ProductForms/ProductFormFields/ValidUntil.d.ts +2 -7
- package/lib/components/ProductForms/ProductFormFields/VolcanicFields.d.ts +2 -3
- package/lib/components/ProductForms/utils.d.ts +1 -0
- package/lib/components/ProductList/ProductList.stories.d.ts +2 -0
- package/lib/types.d.ts +6 -0
- package/lib/utils/store.d.ts +1 -1
- package/package.json +14 -12
package/index.umd.js
CHANGED
|
@@ -1011,7 +1011,6 @@
|
|
|
1011
1011
|
var Change = function Change(_a) {
|
|
1012
1012
|
var isDisabled = _a.isDisabled,
|
|
1013
1013
|
isReadOnly = _a.isReadOnly;
|
|
1014
|
-
var watch = reactHookForm.useFormContext().watch;
|
|
1015
1014
|
var isRequired = shared.useDraftFormHelpers().isRequired;
|
|
1016
1015
|
return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
1017
1016
|
title: "Change",
|
|
@@ -1026,18 +1025,19 @@
|
|
|
1026
1025
|
isRequired: isRequired
|
|
1027
1026
|
}
|
|
1028
1027
|
},
|
|
1029
|
-
disabled: isDisabled
|
|
1030
|
-
|
|
1028
|
+
disabled: isDisabled,
|
|
1029
|
+
isReadOnly: isReadOnly
|
|
1030
|
+
}, /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
1031
1031
|
value: "WKN",
|
|
1032
1032
|
label: "Weakening",
|
|
1033
1033
|
disabled: isDisabled,
|
|
1034
1034
|
"data-testid": "change-WKN"
|
|
1035
|
-
}),
|
|
1035
|
+
}), /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
1036
1036
|
value: "NC",
|
|
1037
1037
|
label: "No change",
|
|
1038
1038
|
disabled: isDisabled,
|
|
1039
1039
|
"data-testid": "change-NC"
|
|
1040
|
-
}),
|
|
1040
|
+
}), /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
1041
1041
|
value: "INTSF",
|
|
1042
1042
|
label: "Intensifying",
|
|
1043
1043
|
disabled: isDisabled,
|
|
@@ -1088,7 +1088,7 @@
|
|
|
1088
1088
|
spacing: 1
|
|
1089
1089
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
1090
1090
|
item: true
|
|
1091
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1091
|
+
}, /*#__PURE__*/React__default["default"].createElement(shared.CustomTooltip, {
|
|
1092
1092
|
title: "Drop a point as " + type + " position"
|
|
1093
1093
|
}, /*#__PURE__*/React__default["default"].createElement(material.Radio, {
|
|
1094
1094
|
icon: /*#__PURE__*/React__default["default"].createElement(theme.Location, null),
|
|
@@ -1102,7 +1102,7 @@
|
|
|
1102
1102
|
sx: styles$1.radioInput
|
|
1103
1103
|
}))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
1104
1104
|
item: true
|
|
1105
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1105
|
+
}, /*#__PURE__*/React__default["default"].createElement(shared.CustomTooltip, {
|
|
1106
1106
|
title: "Draw a box as " + type + " position"
|
|
1107
1107
|
}, /*#__PURE__*/React__default["default"].createElement(material.Radio, {
|
|
1108
1108
|
icon: /*#__PURE__*/React__default["default"].createElement(theme.DrawRegion, null),
|
|
@@ -1115,7 +1115,7 @@
|
|
|
1115
1115
|
sx: styles$1.radioInput
|
|
1116
1116
|
}))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
1117
1117
|
item: true
|
|
1118
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1118
|
+
}, /*#__PURE__*/React__default["default"].createElement(shared.CustomTooltip, {
|
|
1119
1119
|
title: "Draw a shape as " + type + " position"
|
|
1120
1120
|
}, /*#__PURE__*/React__default["default"].createElement(material.Radio, {
|
|
1121
1121
|
icon: /*#__PURE__*/React__default["default"].createElement(theme.DrawPolygon, null),
|
|
@@ -1128,7 +1128,7 @@
|
|
|
1128
1128
|
sx: styles$1.radioInput
|
|
1129
1129
|
}))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
1130
1130
|
item: true
|
|
1131
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1131
|
+
}, /*#__PURE__*/React__default["default"].createElement(shared.CustomTooltip, {
|
|
1132
1132
|
title: "Set FIR as " + type + " position"
|
|
1133
1133
|
}, /*#__PURE__*/React__default["default"].createElement(material.Radio, {
|
|
1134
1134
|
icon: /*#__PURE__*/React__default["default"].createElement(theme.DrawFIRLand, null),
|
|
@@ -1141,7 +1141,7 @@
|
|
|
1141
1141
|
sx: styles$1.radioInput
|
|
1142
1142
|
}))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
1143
1143
|
item: true
|
|
1144
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1144
|
+
}, /*#__PURE__*/React__default["default"].createElement(shared.CustomTooltip, {
|
|
1145
1145
|
title: "Remove geometry"
|
|
1146
1146
|
}, /*#__PURE__*/React__default["default"].createElement(material.Radio, {
|
|
1147
1147
|
icon: /*#__PURE__*/React__default["default"].createElement(theme.Delete, null),
|
|
@@ -1595,6 +1595,13 @@
|
|
|
1595
1595
|
}
|
|
1596
1596
|
});
|
|
1597
1597
|
};
|
|
1598
|
+
var getFieldLabel = function getFieldLabel(title, isDisabled, action) {
|
|
1599
|
+
if (action === void 0) {
|
|
1600
|
+
action = 'Select';
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
return isDisabled ? title : action + " " + title.toLowerCase();
|
|
1604
|
+
};
|
|
1598
1605
|
|
|
1599
1606
|
var location_indicator_mwo$1 = "EHDB";
|
|
1600
1607
|
var firareas$1 = {
|
|
@@ -1759,6 +1766,7 @@
|
|
|
1759
1766
|
}
|
|
1760
1767
|
},
|
|
1761
1768
|
disabled: isDisabled,
|
|
1769
|
+
isReadOnly: isReadOnly,
|
|
1762
1770
|
onChange: function onChange() {
|
|
1763
1771
|
// Reset default value for the level value to '' so when it rerenders it uses this empty default value
|
|
1764
1772
|
var currentValues = getValues();
|
|
@@ -1778,7 +1786,7 @@
|
|
|
1778
1786
|
|
|
1779
1787
|
clearErrors(['level', 'lowerLevel']);
|
|
1780
1788
|
}
|
|
1781
|
-
},
|
|
1789
|
+
}, /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
1782
1790
|
value: "AT",
|
|
1783
1791
|
label: "At",
|
|
1784
1792
|
checked: watch('levelInfoMode') === 'AT' || watch('levelInfoMode') === 'TOPS',
|
|
@@ -1795,7 +1803,7 @@
|
|
|
1795
1803
|
item: true,
|
|
1796
1804
|
xs: 12,
|
|
1797
1805
|
md: 3
|
|
1798
|
-
},
|
|
1806
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.FormControlLabel, {
|
|
1799
1807
|
control: /*#__PURE__*/React__default["default"].createElement(material.Checkbox, {
|
|
1800
1808
|
checked: watch('levelInfoMode') === 'TOPS',
|
|
1801
1809
|
onChange: function onChange() {
|
|
@@ -1822,6 +1830,7 @@
|
|
|
1822
1830
|
},
|
|
1823
1831
|
sx: styles$2.unit,
|
|
1824
1832
|
disabled: isDisabled,
|
|
1833
|
+
isReadOnly: isReadOnly,
|
|
1825
1834
|
defaultValue: 'FL',
|
|
1826
1835
|
onChange: function onChange() {
|
|
1827
1836
|
if (getValues('level.value') || getValues('level.value') === 0) {
|
|
@@ -1862,8 +1871,9 @@
|
|
|
1862
1871
|
}
|
|
1863
1872
|
},
|
|
1864
1873
|
disabled: isDisabled,
|
|
1874
|
+
isReadOnly: isReadOnly,
|
|
1865
1875
|
autoFocus: true
|
|
1866
|
-
}))) : null,
|
|
1876
|
+
}))) : null, /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
1867
1877
|
value: "BETW",
|
|
1868
1878
|
label: "Between",
|
|
1869
1879
|
checked: watch('levelInfoMode') === 'BETW' || watch('levelInfoMode') === 'BETW_SFC',
|
|
@@ -1896,6 +1906,7 @@
|
|
|
1896
1906
|
},
|
|
1897
1907
|
sx: styles$2.unit,
|
|
1898
1908
|
disabled: isDisabled,
|
|
1909
|
+
isReadOnly: isReadOnly,
|
|
1899
1910
|
defaultValue: 'FL',
|
|
1900
1911
|
onChange: function onChange() {
|
|
1901
1912
|
trigger(__spreadArray(__spreadArray(__spreadArray([], __read(getValues('level.value') || getValues('level.value') === 0 ? ['level.value'] : [])), __read(getValues('lowerLevel.value') || getValues('lowerLevel.value') === 0 ? ['lowerLevel.value'] : [])), ['lowerLevel.unit']));
|
|
@@ -1934,6 +1945,7 @@
|
|
|
1934
1945
|
}
|
|
1935
1946
|
},
|
|
1936
1947
|
disabled: isDisabled,
|
|
1948
|
+
isReadOnly: isReadOnly,
|
|
1937
1949
|
onChange: function onChange() {
|
|
1938
1950
|
return (getValues('lowerLevel.value') || getValues('lowerLevel.value') === 0) && trigger('lowerLevel.value');
|
|
1939
1951
|
},
|
|
@@ -1949,7 +1961,7 @@
|
|
|
1949
1961
|
item: true,
|
|
1950
1962
|
xs: 12,
|
|
1951
1963
|
md: 3
|
|
1952
|
-
},
|
|
1964
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.FormControlLabel, {
|
|
1953
1965
|
control: /*#__PURE__*/React__default["default"].createElement(material.Checkbox, {
|
|
1954
1966
|
checked: watch('levelInfoMode') === 'BETW_SFC',
|
|
1955
1967
|
onChange: function onChange() {
|
|
@@ -1982,6 +1994,7 @@
|
|
|
1982
1994
|
},
|
|
1983
1995
|
sx: styles$2.unit,
|
|
1984
1996
|
disabled: isDisabled,
|
|
1997
|
+
isReadOnly: isReadOnly,
|
|
1985
1998
|
defaultValue: getValues('level.unit') || 'FL',
|
|
1986
1999
|
onChange: function onChange() {
|
|
1987
2000
|
if (getValues('lowerLevel.value') || getValues('lowerLevel.value') === 0) {
|
|
@@ -2026,8 +2039,9 @@
|
|
|
2026
2039
|
}
|
|
2027
2040
|
}
|
|
2028
2041
|
},
|
|
2029
|
-
disabled: isDisabled
|
|
2030
|
-
|
|
2042
|
+
disabled: isDisabled,
|
|
2043
|
+
isReadOnly: isReadOnly
|
|
2044
|
+
}))))) : null, /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
2031
2045
|
value: "ABV",
|
|
2032
2046
|
label: "Above",
|
|
2033
2047
|
disabled: isDisabled,
|
|
@@ -2044,7 +2058,7 @@
|
|
|
2044
2058
|
item: true,
|
|
2045
2059
|
xs: 12,
|
|
2046
2060
|
md: 3
|
|
2047
|
-
},
|
|
2061
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.FormControlLabel, {
|
|
2048
2062
|
control: /*#__PURE__*/React__default["default"].createElement(material.Checkbox, {
|
|
2049
2063
|
checked: watch('levelInfoMode') === 'TOPS_ABV',
|
|
2050
2064
|
onChange: function onChange() {
|
|
@@ -2070,6 +2084,7 @@
|
|
|
2070
2084
|
},
|
|
2071
2085
|
sx: styles$2.unit,
|
|
2072
2086
|
disabled: isDisabled,
|
|
2087
|
+
isReadOnly: isReadOnly,
|
|
2073
2088
|
defaultValue: 'FL',
|
|
2074
2089
|
onChange: function onChange() {
|
|
2075
2090
|
if (getValues('level.value') || getValues('level.value') === 0) {
|
|
@@ -2109,6 +2124,7 @@
|
|
|
2109
2124
|
}
|
|
2110
2125
|
},
|
|
2111
2126
|
disabled: isDisabled,
|
|
2127
|
+
isReadOnly: isReadOnly,
|
|
2112
2128
|
autoFocus: true
|
|
2113
2129
|
}))) : null)));
|
|
2114
2130
|
};
|
|
@@ -2159,7 +2175,8 @@
|
|
|
2159
2175
|
if (getValues('observationOrForecastTime')) {
|
|
2160
2176
|
trigger('observationOrForecastTime');
|
|
2161
2177
|
}
|
|
2162
|
-
}
|
|
2178
|
+
},
|
|
2179
|
+
isReadOnly: isReadOnly
|
|
2163
2180
|
}, (!isReadOnly || watch('isObservationOrForecast') === 'OBS') && /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
2164
2181
|
value: "OBS",
|
|
2165
2182
|
label: "Observed",
|
|
@@ -2200,12 +2217,14 @@
|
|
|
2200
2217
|
return null;
|
|
2201
2218
|
} : _b;
|
|
2202
2219
|
var watch = reactHookForm.useFormContext().watch;
|
|
2220
|
+
var label = getFieldLabel('Date and time', isReadOnly);
|
|
2203
2221
|
return (!isReadOnly || watch('observationOrForecastTime') !== null) && /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
2204
2222
|
title: "At"
|
|
2205
2223
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormDateTime, {
|
|
2206
2224
|
disablePast: watch('isObservationOrForecast') === 'FCST',
|
|
2207
2225
|
disableFuture: watch('isObservationOrForecast') === 'OBS',
|
|
2208
2226
|
name: "observationOrForecastTime",
|
|
2227
|
+
label: label,
|
|
2209
2228
|
rules: {
|
|
2210
2229
|
validate: {
|
|
2211
2230
|
isValidDate: formFields.isValidDate,
|
|
@@ -2218,6 +2237,7 @@
|
|
|
2218
2237
|
}
|
|
2219
2238
|
},
|
|
2220
2239
|
disabled: isDisabled,
|
|
2240
|
+
isReadOnly: isReadOnly,
|
|
2221
2241
|
helperText: helperText,
|
|
2222
2242
|
onChange: onChange,
|
|
2223
2243
|
sx: styles$2.helperText
|
|
@@ -2227,6 +2247,7 @@
|
|
|
2227
2247
|
var Phenomenon = function Phenomenon(_a) {
|
|
2228
2248
|
var productType = _a.productType,
|
|
2229
2249
|
isDisabled = _a.isDisabled,
|
|
2250
|
+
isReadOnly = _a.isReadOnly,
|
|
2230
2251
|
_b = _a.onChange,
|
|
2231
2252
|
_onChange = _b === void 0 ? function () {
|
|
2232
2253
|
return null;
|
|
@@ -2238,15 +2259,17 @@
|
|
|
2238
2259
|
trigger = _c.trigger;
|
|
2239
2260
|
|
|
2240
2261
|
var phenomenaList = productType === 'sigmet' ? SigmetPhenomena : AirmetPhenomena;
|
|
2262
|
+
var label = getFieldLabel('Phenomenon', isReadOnly);
|
|
2241
2263
|
return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
2242
2264
|
title: "What"
|
|
2243
2265
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormSelect, {
|
|
2244
2266
|
name: "phenomenon",
|
|
2245
|
-
label:
|
|
2267
|
+
label: label,
|
|
2246
2268
|
rules: {
|
|
2247
2269
|
required: true
|
|
2248
2270
|
},
|
|
2249
2271
|
disabled: isDisabled,
|
|
2272
|
+
isReadOnly: isReadOnly,
|
|
2250
2273
|
"data-testid": "phenomenon",
|
|
2251
2274
|
onChange: function onChange() {
|
|
2252
2275
|
if (getValues('movementType') === 'NO_VA_EXP') {
|
|
@@ -2463,18 +2486,19 @@
|
|
|
2463
2486
|
},
|
|
2464
2487
|
onChange: function onChange() {
|
|
2465
2488
|
return setDrawModeType ? setDrawModeType(MapDrawMode.DELETE, StartOrEndDrawing.end) : null;
|
|
2466
|
-
}
|
|
2467
|
-
|
|
2489
|
+
},
|
|
2490
|
+
isReadOnly: isReadOnly
|
|
2491
|
+
}, watch('phenomenon') === 'VA_CLD' && /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
2468
2492
|
value: "NO_VA_EXP",
|
|
2469
2493
|
label: "No volcanic ash expected",
|
|
2470
2494
|
disabled: isDisabled,
|
|
2471
2495
|
"data-testid": "movementType-NO_VA_EXP"
|
|
2472
|
-
}),
|
|
2496
|
+
}), /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
2473
2497
|
value: "STATIONARY",
|
|
2474
2498
|
label: "Stationary",
|
|
2475
2499
|
disabled: isDisabled,
|
|
2476
2500
|
"data-testid": "movementType-STATIONARY"
|
|
2477
|
-
}),
|
|
2501
|
+
}), /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
2478
2502
|
value: "MOVEMENT",
|
|
2479
2503
|
label: "Movement",
|
|
2480
2504
|
disabled: isDisabled,
|
|
@@ -2490,6 +2514,7 @@
|
|
|
2490
2514
|
},
|
|
2491
2515
|
sx: styles$2.movement,
|
|
2492
2516
|
disabled: isDisabled,
|
|
2517
|
+
isReadOnly: isReadOnly,
|
|
2493
2518
|
"data-testid": "movement-movementDirection",
|
|
2494
2519
|
onChange: function onChange(event) {
|
|
2495
2520
|
event.stopPropagation();
|
|
@@ -2517,6 +2542,7 @@
|
|
|
2517
2542
|
},
|
|
2518
2543
|
sx: styles$2.unit,
|
|
2519
2544
|
disabled: isDisabled,
|
|
2545
|
+
isReadOnly: isReadOnly,
|
|
2520
2546
|
defaultValue: 'KT',
|
|
2521
2547
|
"data-testid": "movement-movementUnit",
|
|
2522
2548
|
onChange: function onChange(event) {
|
|
@@ -2558,11 +2584,12 @@
|
|
|
2558
2584
|
}
|
|
2559
2585
|
},
|
|
2560
2586
|
disabled: isDisabled,
|
|
2587
|
+
isReadOnly: isReadOnly,
|
|
2561
2588
|
"data-testid": "movement-movementSpeed",
|
|
2562
2589
|
onChange: function onChange(event) {
|
|
2563
2590
|
return event && event.stopPropagation();
|
|
2564
2591
|
}
|
|
2565
|
-
})))), productType === 'sigmet' &&
|
|
2592
|
+
})))), productType === 'sigmet' && /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
2566
2593
|
value: "FORECAST_POSITION",
|
|
2567
2594
|
label: "End position",
|
|
2568
2595
|
disabled: isDisabled,
|
|
@@ -2633,7 +2660,8 @@
|
|
|
2633
2660
|
|
|
2634
2661
|
var SelectFIR = function SelectFIR(_a) {
|
|
2635
2662
|
var productType = _a.productType,
|
|
2636
|
-
isDisabled = _a.isDisabled
|
|
2663
|
+
isDisabled = _a.isDisabled,
|
|
2664
|
+
isReadOnly = _a.isReadOnly;
|
|
2637
2665
|
var setValue = reactHookForm.useFormContext().setValue;
|
|
2638
2666
|
var isRequired = shared.useDraftFormHelpers().isRequired;
|
|
2639
2667
|
var config = productType === 'sigmet' ? sigmetConfig : airmetConfig;
|
|
@@ -2648,13 +2676,14 @@
|
|
|
2648
2676
|
sx: styles$2.containerItem
|
|
2649
2677
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormSelect, {
|
|
2650
2678
|
name: "locationIndicatorATSR",
|
|
2651
|
-
label:
|
|
2679
|
+
label: isReadOnly ? 'FIR' : 'Select FIR',
|
|
2652
2680
|
rules: {
|
|
2653
2681
|
validate: {
|
|
2654
2682
|
isRequired: isRequired
|
|
2655
2683
|
}
|
|
2656
2684
|
},
|
|
2657
2685
|
disabled: isDisabled,
|
|
2686
|
+
isReadOnly: isReadOnly,
|
|
2658
2687
|
defaultValue: defaultATSR,
|
|
2659
2688
|
onChange: function onChange(changeEvent) {
|
|
2660
2689
|
setValue('locationIndicatorATSU', allFIRS[changeEvent.target.value].location_indicator_atsu);
|
|
@@ -2700,7 +2729,6 @@
|
|
|
2700
2729
|
var Type = function Type(_a) {
|
|
2701
2730
|
var isReadOnly = _a.isReadOnly,
|
|
2702
2731
|
isDisabled = _a.isDisabled;
|
|
2703
|
-
var watch = reactHookForm.useFormContext().watch;
|
|
2704
2732
|
var isRequired = shared.useDraftFormHelpers().isRequired;
|
|
2705
2733
|
return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
2706
2734
|
title: "Type",
|
|
@@ -2716,18 +2744,19 @@
|
|
|
2716
2744
|
}
|
|
2717
2745
|
},
|
|
2718
2746
|
disabled: isDisabled,
|
|
2747
|
+
isReadOnly: isReadOnly,
|
|
2719
2748
|
defaultValue: "NORMAL"
|
|
2720
|
-
},
|
|
2749
|
+
}, /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
2721
2750
|
value: "NORMAL",
|
|
2722
2751
|
label: "Normal",
|
|
2723
2752
|
disabled: isDisabled,
|
|
2724
2753
|
"data-testid": "type-NORMAL"
|
|
2725
|
-
}),
|
|
2754
|
+
}), /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
2726
2755
|
value: "TEST",
|
|
2727
2756
|
label: "Test",
|
|
2728
2757
|
disabled: isDisabled,
|
|
2729
2758
|
"data-testid": "type-TEST"
|
|
2730
|
-
}),
|
|
2759
|
+
}), /*#__PURE__*/React__default["default"].createElement(RadioButtonAndLabel, {
|
|
2731
2760
|
value: "EXERCISE",
|
|
2732
2761
|
label: "Exercise",
|
|
2733
2762
|
disabled: isDisabled,
|
|
@@ -2760,6 +2789,7 @@
|
|
|
2760
2789
|
var ValidFrom = function ValidFrom(_a) {
|
|
2761
2790
|
var productType = _a.productType,
|
|
2762
2791
|
isDisabled = _a.isDisabled,
|
|
2792
|
+
isReadOnly = _a.isReadOnly,
|
|
2763
2793
|
_b = _a.onChange,
|
|
2764
2794
|
_onChange = _b === void 0 ? function () {
|
|
2765
2795
|
return null;
|
|
@@ -2771,11 +2801,13 @@
|
|
|
2771
2801
|
|
|
2772
2802
|
var isRequired = shared.useDraftFormHelpers().isRequired;
|
|
2773
2803
|
var config = productType === 'sigmet' ? sigmetConfig : airmetConfig;
|
|
2804
|
+
var label = getFieldLabel('Date and time', isReadOnly);
|
|
2774
2805
|
return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
2775
2806
|
title: "Valid from"
|
|
2776
2807
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormDateTime, {
|
|
2777
2808
|
disablePast: true,
|
|
2778
2809
|
name: "validDateStart",
|
|
2810
|
+
label: label,
|
|
2779
2811
|
defaultNullValue: moment__default["default"].utc().add(VALID_FROM_TIME_DELAY_IN_MINUTES, 'minutes').format('YYYY-MM-DDTHH:mm:ss[Z]'),
|
|
2780
2812
|
rules: {
|
|
2781
2813
|
validate: {
|
|
@@ -2803,6 +2835,7 @@
|
|
|
2803
2835
|
_onChange();
|
|
2804
2836
|
},
|
|
2805
2837
|
disabled: isDisabled,
|
|
2838
|
+
isReadOnly: isReadOnly,
|
|
2806
2839
|
"data-testid": "valid-from"
|
|
2807
2840
|
}));
|
|
2808
2841
|
};
|
|
@@ -2832,6 +2865,7 @@
|
|
|
2832
2865
|
var ValidUntil = function ValidUntil(_a) {
|
|
2833
2866
|
var productType = _a.productType,
|
|
2834
2867
|
isDisabled = _a.isDisabled,
|
|
2868
|
+
isReadOnly = _a.isReadOnly,
|
|
2835
2869
|
_b = _a.onChange,
|
|
2836
2870
|
_onChange = _b === void 0 ? function () {
|
|
2837
2871
|
return null;
|
|
@@ -2842,6 +2876,7 @@
|
|
|
2842
2876
|
trigger = _c.trigger;
|
|
2843
2877
|
|
|
2844
2878
|
var isRequired = shared.useDraftFormHelpers().isRequired;
|
|
2879
|
+
var label = getFieldLabel('Date and time', isReadOnly);
|
|
2845
2880
|
var config = productType === 'sigmet' ? sigmetConfig : airmetConfig;
|
|
2846
2881
|
var defaultHoursValid = getDefaultHoursValid(productType);
|
|
2847
2882
|
return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
@@ -2849,6 +2884,7 @@
|
|
|
2849
2884
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormDateTime, {
|
|
2850
2885
|
disablePast: true,
|
|
2851
2886
|
name: "validDateEnd",
|
|
2887
|
+
label: label,
|
|
2852
2888
|
defaultNullValue: moment__default["default"].utc().add(defaultHoursValid, 'hour').add(VALID_FROM_TIME_DELAY_IN_MINUTES, 'minutes').format('YYYY-MM-DDTHH:mm:ss[Z]'),
|
|
2853
2889
|
rules: {
|
|
2854
2890
|
validate: {
|
|
@@ -2865,6 +2901,7 @@
|
|
|
2865
2901
|
}
|
|
2866
2902
|
},
|
|
2867
2903
|
disabled: isDisabled,
|
|
2904
|
+
isReadOnly: isReadOnly,
|
|
2868
2905
|
onChange: function onChange() {
|
|
2869
2906
|
if (getValues('validDateStart')) {
|
|
2870
2907
|
trigger('validDateStart');
|
|
@@ -2915,7 +2952,8 @@
|
|
|
2915
2952
|
},
|
|
2916
2953
|
disabled: isDisabled,
|
|
2917
2954
|
helperText: helperText,
|
|
2918
|
-
upperCase: true
|
|
2955
|
+
upperCase: true,
|
|
2956
|
+
isReadOnly: isReadOnly
|
|
2919
2957
|
})), (!isReadOnly || !!watch('vaSigmetVolcanoCoordinates.latitude')) && /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
2920
2958
|
item: true,
|
|
2921
2959
|
xs: 6
|
|
@@ -2939,7 +2977,8 @@
|
|
|
2939
2977
|
helperText: helperText,
|
|
2940
2978
|
onChange: function onChange() {
|
|
2941
2979
|
return trigger('vaSigmetVolcanoCoordinates.longitude');
|
|
2942
|
-
}
|
|
2980
|
+
},
|
|
2981
|
+
isReadOnly: isReadOnly
|
|
2943
2982
|
})), (!isReadOnly || !!watch('vaSigmetVolcanoCoordinates.longitude')) && /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
2944
2983
|
item: true,
|
|
2945
2984
|
xs: 6
|
|
@@ -2963,7 +3002,8 @@
|
|
|
2963
3002
|
onChange: function onChange() {
|
|
2964
3003
|
return trigger('vaSigmetVolcanoCoordinates.latitude');
|
|
2965
3004
|
},
|
|
2966
|
-
sx: styles$2.helperText
|
|
3005
|
+
sx: styles$2.helperText,
|
|
3006
|
+
isReadOnly: isReadOnly
|
|
2967
3007
|
}))));
|
|
2968
3008
|
};
|
|
2969
3009
|
|
|
@@ -2999,12 +3039,15 @@
|
|
|
2999
3039
|
|
|
3000
3040
|
var SurfaceVisibility = function SurfaceVisibility(_a) {
|
|
3001
3041
|
var isDisabled = _a.isDisabled,
|
|
3042
|
+
isReadOnly = _a.isReadOnly,
|
|
3002
3043
|
_b = _a.onChange,
|
|
3003
3044
|
_onChange = _b === void 0 ? function () {
|
|
3004
3045
|
return null;
|
|
3005
3046
|
} : _b;
|
|
3006
3047
|
|
|
3007
3048
|
var isRequired = shared.useDraftFormHelpers().isRequired;
|
|
3049
|
+
var visibilityLabel = getFieldLabel('Visibility', isReadOnly);
|
|
3050
|
+
var visibilityCauseLabel = getFieldLabel('Cause', isReadOnly);
|
|
3008
3051
|
return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3009
3052
|
item: true,
|
|
3010
3053
|
container: true,
|
|
@@ -3026,7 +3069,7 @@
|
|
|
3026
3069
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormNumberField, {
|
|
3027
3070
|
name: "visibilityValue",
|
|
3028
3071
|
"data-testid": "surfaceVisibility-visibilityValue",
|
|
3029
|
-
label:
|
|
3072
|
+
label: visibilityLabel,
|
|
3030
3073
|
helperText: "Value in meters",
|
|
3031
3074
|
rules: {
|
|
3032
3075
|
min: {
|
|
@@ -3042,19 +3085,21 @@
|
|
|
3042
3085
|
validateSurfaceVisibility: validateSurfaceVisibility
|
|
3043
3086
|
}
|
|
3044
3087
|
},
|
|
3045
|
-
disabled: isDisabled
|
|
3088
|
+
disabled: isDisabled,
|
|
3089
|
+
isReadOnly: isReadOnly
|
|
3046
3090
|
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3047
3091
|
item: true,
|
|
3048
3092
|
xs: 12
|
|
3049
3093
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormSelect, {
|
|
3050
3094
|
name: "visibilityCause",
|
|
3051
|
-
label:
|
|
3095
|
+
label: visibilityCauseLabel,
|
|
3052
3096
|
rules: {
|
|
3053
3097
|
validate: {
|
|
3054
3098
|
isRequired: isRequired
|
|
3055
3099
|
}
|
|
3056
3100
|
},
|
|
3057
3101
|
disabled: isDisabled,
|
|
3102
|
+
isReadOnly: isReadOnly,
|
|
3058
3103
|
"data-testid": "surfaceVisibility-visibilityCause",
|
|
3059
3104
|
onChange: function onChange(event) {
|
|
3060
3105
|
event.stopPropagation();
|
|
@@ -3095,6 +3140,7 @@
|
|
|
3095
3140
|
|
|
3096
3141
|
var SurfaceWind = function SurfaceWind(_a) {
|
|
3097
3142
|
var isDisabled = _a.isDisabled,
|
|
3143
|
+
isReadOnly = _a.isReadOnly,
|
|
3098
3144
|
_b = _a.onChange,
|
|
3099
3145
|
_onChange = _b === void 0 ? function () {
|
|
3100
3146
|
return null;
|
|
@@ -3110,6 +3156,8 @@
|
|
|
3110
3156
|
var selectedFIR = watch('locationIndicatorATSR'); // Get allowed speed units based on selected FIR - if no FIR selected, allow all units
|
|
3111
3157
|
|
|
3112
3158
|
var allowedWindUnitsForFir = getAllowedUnits(selectedFIR, allowedUnits, 'surfacewind_unit', WindUnit);
|
|
3159
|
+
var windLabel = getFieldLabel('Wind direction', isReadOnly, 'Set');
|
|
3160
|
+
var speedLabel = getFieldLabel('Speed', isReadOnly, 'Set');
|
|
3113
3161
|
return /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3114
3162
|
item: true,
|
|
3115
3163
|
container: true,
|
|
@@ -3130,7 +3178,7 @@
|
|
|
3130
3178
|
sx: styles$2.surfaceWind
|
|
3131
3179
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormNumberField, {
|
|
3132
3180
|
name: "windDirection",
|
|
3133
|
-
label:
|
|
3181
|
+
label: windLabel,
|
|
3134
3182
|
helperText: "Value in degrees",
|
|
3135
3183
|
rules: {
|
|
3136
3184
|
min: {
|
|
@@ -3147,6 +3195,7 @@
|
|
|
3147
3195
|
}
|
|
3148
3196
|
},
|
|
3149
3197
|
disabled: isDisabled,
|
|
3198
|
+
isReadOnly: isReadOnly,
|
|
3150
3199
|
"data-testid": "surfaceWind-windDirection"
|
|
3151
3200
|
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3152
3201
|
item: true,
|
|
@@ -3165,6 +3214,7 @@
|
|
|
3165
3214
|
},
|
|
3166
3215
|
sx: styles$2.unit,
|
|
3167
3216
|
disabled: isDisabled,
|
|
3217
|
+
isReadOnly: isReadOnly,
|
|
3168
3218
|
defaultValue: 'KT',
|
|
3169
3219
|
"data-testid": "surfaceWind-windUnit",
|
|
3170
3220
|
onChange: function onChange() {
|
|
@@ -3184,7 +3234,7 @@
|
|
|
3184
3234
|
xs: 7
|
|
3185
3235
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormNumberField, {
|
|
3186
3236
|
name: "windSpeed",
|
|
3187
|
-
label:
|
|
3237
|
+
label: speedLabel,
|
|
3188
3238
|
rules: {
|
|
3189
3239
|
validate: {
|
|
3190
3240
|
isRequired: isRequired,
|
|
@@ -3200,6 +3250,7 @@
|
|
|
3200
3250
|
}
|
|
3201
3251
|
},
|
|
3202
3252
|
disabled: isDisabled,
|
|
3253
|
+
isReadOnly: isReadOnly,
|
|
3203
3254
|
"data-testid": "surfaceWind-windSpeed"
|
|
3204
3255
|
})))));
|
|
3205
3256
|
};
|
|
@@ -3292,7 +3343,10 @@
|
|
|
3292
3343
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3293
3344
|
item: true,
|
|
3294
3345
|
xs: 4
|
|
3295
|
-
}, (!isReadOnly || watch('cloudLevelInfoMode') === 'BETW_ABV' || watch('cloudLevelInfoMode') === 'BETW_SFC_ABV') && /*#__PURE__*/React__default["default"].createElement(
|
|
3346
|
+
}, (!isReadOnly || watch('cloudLevelInfoMode') === 'BETW_ABV' || watch('cloudLevelInfoMode') === 'BETW_SFC_ABV') && /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormFormControl, {
|
|
3347
|
+
disabled: isDisabled,
|
|
3348
|
+
isReadOnly: isReadOnly
|
|
3349
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.FormControlLabel, {
|
|
3296
3350
|
control: /*#__PURE__*/React__default["default"].createElement(material.Checkbox, {
|
|
3297
3351
|
checked: watch('cloudLevelInfoMode') === 'BETW_ABV' || watch('cloudLevelInfoMode') === 'BETW_SFC_ABV',
|
|
3298
3352
|
onChange: function onChange() {
|
|
@@ -3328,7 +3382,7 @@
|
|
|
3328
3382
|
}),
|
|
3329
3383
|
"data-testid": "cloudLevels-Above",
|
|
3330
3384
|
label: "Above"
|
|
3331
|
-
})), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3385
|
+
}))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3332
3386
|
item: true,
|
|
3333
3387
|
xs: 3
|
|
3334
3388
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormSelect, {
|
|
@@ -3342,6 +3396,7 @@
|
|
|
3342
3396
|
},
|
|
3343
3397
|
sx: styles$2.unit,
|
|
3344
3398
|
disabled: isDisabled,
|
|
3399
|
+
isReadOnly: isReadOnly,
|
|
3345
3400
|
defaultValue: 'FT',
|
|
3346
3401
|
onChange: function onChange() {
|
|
3347
3402
|
if (getValues('cloudLevel.value') || getValues('cloudLevel.value') === 0) {
|
|
@@ -3388,6 +3443,7 @@
|
|
|
3388
3443
|
}
|
|
3389
3444
|
},
|
|
3390
3445
|
disabled: isDisabled,
|
|
3446
|
+
isReadOnly: isReadOnly,
|
|
3391
3447
|
onChange: function onChange() {
|
|
3392
3448
|
return (getValues('cloudLowerLevel.value') || getValues('cloudLowerLevel.value') === 0) && trigger('cloudLowerLevel.value');
|
|
3393
3449
|
}
|
|
@@ -3398,7 +3454,10 @@
|
|
|
3398
3454
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3399
3455
|
item: true,
|
|
3400
3456
|
xs: 4
|
|
3401
|
-
}, (!isReadOnly || watch('cloudLevelInfoMode') === 'BETW_SFC' || watch('cloudLevelInfoMode') === 'BETW_SFC_ABV') && /*#__PURE__*/React__default["default"].createElement(
|
|
3457
|
+
}, (!isReadOnly || watch('cloudLevelInfoMode') === 'BETW_SFC' || watch('cloudLevelInfoMode') === 'BETW_SFC_ABV') && /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormFormControl, {
|
|
3458
|
+
disabled: isDisabled,
|
|
3459
|
+
isReadOnly: isReadOnly
|
|
3460
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.FormControlLabel, {
|
|
3402
3461
|
control: /*#__PURE__*/React__default["default"].createElement(material.Checkbox, {
|
|
3403
3462
|
checked: watch('cloudLevelInfoMode') === 'BETW_SFC' || watch('cloudLevelInfoMode') === 'BETW_SFC_ABV',
|
|
3404
3463
|
onChange: function onChange() {
|
|
@@ -3434,7 +3493,7 @@
|
|
|
3434
3493
|
}),
|
|
3435
3494
|
"data-testid": "cloudLevels-SFC",
|
|
3436
3495
|
label: "SFC"
|
|
3437
|
-
})), watch('cloudLevelInfoMode') !== 'BETW_SFC' && watch('cloudLevelInfoMode') !== 'BETW_SFC_ABV' && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3496
|
+
}))), watch('cloudLevelInfoMode') !== 'BETW_SFC' && watch('cloudLevelInfoMode') !== 'BETW_SFC_ABV' && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
3438
3497
|
item: true,
|
|
3439
3498
|
xs: 3
|
|
3440
3499
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormSelect, {
|
|
@@ -3448,6 +3507,7 @@
|
|
|
3448
3507
|
},
|
|
3449
3508
|
sx: styles$2.unit,
|
|
3450
3509
|
disabled: isDisabled,
|
|
3510
|
+
isReadOnly: isReadOnly,
|
|
3451
3511
|
defaultValue: getValues('cloudLevel.unit') ? getValues('cloudLevel.unit') : 'FT',
|
|
3452
3512
|
onChange: function onChange() {
|
|
3453
3513
|
if (getValues('cloudLowerLevel.value') || getValues('cloudLowerLevel.value') === 0) {
|
|
@@ -3496,7 +3556,8 @@
|
|
|
3496
3556
|
}
|
|
3497
3557
|
}
|
|
3498
3558
|
},
|
|
3499
|
-
disabled: isDisabled
|
|
3559
|
+
disabled: isDisabled,
|
|
3560
|
+
isReadOnly: isReadOnly
|
|
3500
3561
|
})))))));
|
|
3501
3562
|
};
|
|
3502
3563
|
|
|
@@ -3615,7 +3676,8 @@
|
|
|
3615
3676
|
};
|
|
3616
3677
|
|
|
3617
3678
|
var IssuedAt = function IssuedAt(_a) {
|
|
3618
|
-
var date = _a.date
|
|
3679
|
+
var date = _a.date,
|
|
3680
|
+
isReadOnly = _a.isReadOnly;
|
|
3619
3681
|
return /*#__PURE__*/React__default["default"].createElement(ProductFormFieldLayout, {
|
|
3620
3682
|
title: "Issued at"
|
|
3621
3683
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
@@ -3625,7 +3687,7 @@
|
|
|
3625
3687
|
variant: "body2",
|
|
3626
3688
|
sx: __assign(__assign({}, styles$2.body), {
|
|
3627
3689
|
fontSize: '1rem',
|
|
3628
|
-
color: 'geowebColors.buttons.primary.disabled.color'
|
|
3690
|
+
color: isReadOnly ? 'geowebColors.typographyAndIcons.text' : 'geowebColors.buttons.primary.disabled.color'
|
|
3629
3691
|
})
|
|
3630
3692
|
}, date)));
|
|
3631
3693
|
};
|
|
@@ -4036,6 +4098,7 @@
|
|
|
4036
4098
|
}, !isCancelSigmet && /*#__PURE__*/React__default["default"].createElement(Phenomenon, {
|
|
4037
4099
|
productType: "sigmet",
|
|
4038
4100
|
isDisabled: isDisabled,
|
|
4101
|
+
isReadOnly: isReadOnly,
|
|
4039
4102
|
onChange: onChangeForm
|
|
4040
4103
|
}), !isCancelSigmet && /*#__PURE__*/React__default["default"].createElement(ObservationForecast, {
|
|
4041
4104
|
isDisabled: isDisabled,
|
|
@@ -4052,14 +4115,17 @@
|
|
|
4052
4115
|
}), /*#__PURE__*/React__default["default"].createElement(ValidFrom, {
|
|
4053
4116
|
productType: "sigmet",
|
|
4054
4117
|
isDisabled: isDisabled,
|
|
4118
|
+
isReadOnly: isReadOnly,
|
|
4055
4119
|
onChange: onChangeForm
|
|
4056
4120
|
}), /*#__PURE__*/React__default["default"].createElement(ValidUntil, {
|
|
4057
4121
|
productType: "sigmet",
|
|
4058
4122
|
isDisabled: isDisabled,
|
|
4123
|
+
isReadOnly: isReadOnly,
|
|
4059
4124
|
onChange: onChangeForm
|
|
4060
4125
|
}), /*#__PURE__*/React__default["default"].createElement(SelectFIR, {
|
|
4061
4126
|
productType: "sigmet",
|
|
4062
|
-
isDisabled: isDisabled
|
|
4127
|
+
isDisabled: isDisabled,
|
|
4128
|
+
isReadOnly: isReadOnly
|
|
4063
4129
|
}), /*#__PURE__*/React__default["default"].createElement(StartGeometry, {
|
|
4064
4130
|
isReadOnly: isReadOnly,
|
|
4065
4131
|
drawMode: drawMode,
|
|
@@ -4093,7 +4159,8 @@
|
|
|
4093
4159
|
sx: styles$2.body,
|
|
4094
4160
|
"data-testid": "vaSigmetMoveToFIR"
|
|
4095
4161
|
}, "Volcanic Cloud is moving in the direction of:", ' ', /*#__PURE__*/React__default["default"].createElement("b", null, " ", watch('vaSigmetMoveToFIR'))))), /*#__PURE__*/React__default["default"].createElement(IssuedAt, {
|
|
4096
|
-
date: getProductIssueDate(initialSigmet, initialCancelSigmet)
|
|
4162
|
+
date: getProductIssueDate(initialSigmet, initialCancelSigmet),
|
|
4163
|
+
isReadOnly: isReadOnly
|
|
4097
4164
|
}), /*#__PURE__*/React__default["default"].createElement(Tac, {
|
|
4098
4165
|
tac: tac
|
|
4099
4166
|
}, /*#__PURE__*/React__default["default"].createElement(formFields.ReactHookFormHiddenInput, {
|
|
@@ -4221,11 +4288,14 @@
|
|
|
4221
4288
|
}, !isCancelAirmet && /*#__PURE__*/React__default["default"].createElement(Phenomenon, {
|
|
4222
4289
|
productType: "airmet",
|
|
4223
4290
|
isDisabled: isDisabled,
|
|
4291
|
+
isReadOnly: isReadOnly,
|
|
4224
4292
|
onChange: onChangeForm
|
|
4225
4293
|
}), !isCancelAirmet && phenomenon === 'SFC_VIS' && /*#__PURE__*/React__default["default"].createElement(SurfaceVisibility, {
|
|
4294
|
+
isReadOnly: isReadOnly,
|
|
4226
4295
|
isDisabled: isDisabled,
|
|
4227
4296
|
onChange: onChangeForm
|
|
4228
4297
|
}), !isCancelAirmet && phenomenon === 'SFC_WIND' && /*#__PURE__*/React__default["default"].createElement(SurfaceWind, {
|
|
4298
|
+
isReadOnly: isReadOnly,
|
|
4229
4299
|
isDisabled: isDisabled,
|
|
4230
4300
|
onChange: onChangeForm
|
|
4231
4301
|
}), !isCancelAirmet && /*#__PURE__*/React__default["default"].createElement(ObservationForecast, {
|
|
@@ -4238,14 +4308,17 @@
|
|
|
4238
4308
|
onChange: onChangeForm
|
|
4239
4309
|
}), /*#__PURE__*/React__default["default"].createElement(ValidFrom, {
|
|
4240
4310
|
productType: "airmet",
|
|
4311
|
+
isReadOnly: isReadOnly,
|
|
4241
4312
|
isDisabled: isDisabled,
|
|
4242
4313
|
onChange: onChangeForm
|
|
4243
4314
|
}), /*#__PURE__*/React__default["default"].createElement(ValidUntil, {
|
|
4244
4315
|
productType: "airmet",
|
|
4316
|
+
isReadOnly: isReadOnly,
|
|
4245
4317
|
isDisabled: isDisabled,
|
|
4246
4318
|
onChange: onChangeForm
|
|
4247
4319
|
}), /*#__PURE__*/React__default["default"].createElement(SelectFIR, {
|
|
4248
4320
|
productType: "airmet",
|
|
4321
|
+
isReadOnly: isReadOnly,
|
|
4249
4322
|
isDisabled: isDisabled
|
|
4250
4323
|
}), /*#__PURE__*/React__default["default"].createElement(StartGeometry, {
|
|
4251
4324
|
isReadOnly: isReadOnly,
|
|
@@ -4272,6 +4345,7 @@
|
|
|
4272
4345
|
isDisabled: isDisabled,
|
|
4273
4346
|
isReadOnly: isReadOnly
|
|
4274
4347
|
}), /*#__PURE__*/React__default["default"].createElement(IssuedAt, {
|
|
4348
|
+
isReadOnly: isReadOnly,
|
|
4275
4349
|
date: getProductIssueDate(initialAirmet, initialCancelAirmet)
|
|
4276
4350
|
}), /*#__PURE__*/React__default["default"].createElement(Tac, {
|
|
4277
4351
|
tac: tac
|
|
@@ -4414,11 +4488,26 @@
|
|
|
4414
4488
|
}, children));
|
|
4415
4489
|
};
|
|
4416
4490
|
|
|
4491
|
+
/* *
|
|
4492
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4493
|
+
* you may not use this file except in compliance with the License.
|
|
4494
|
+
* You may obtain a copy of the License at
|
|
4495
|
+
*
|
|
4496
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4497
|
+
*
|
|
4498
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4499
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4500
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4501
|
+
* See the License for the specific language governing permissions and
|
|
4502
|
+
* limitations under the License.
|
|
4503
|
+
*
|
|
4504
|
+
* Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
4505
|
+
* Copyright 2022 - Finnish Meteorological Institute (FMI)
|
|
4506
|
+
* */
|
|
4417
4507
|
var styles = {
|
|
4418
4508
|
activeStatus: {
|
|
4419
4509
|
color: '#72bb23',
|
|
4420
|
-
paddingLeft: '6px'
|
|
4421
|
-
paddingTop: '2px'
|
|
4510
|
+
paddingLeft: '6px'
|
|
4422
4511
|
},
|
|
4423
4512
|
font: {
|
|
4424
4513
|
fontWeight: 'normal'
|
|
@@ -4448,21 +4537,30 @@
|
|
|
4448
4537
|
if (cancelsSeqId !== null) {
|
|
4449
4538
|
return /*#__PURE__*/React__default["default"].createElement(shared.StatusTag, {
|
|
4450
4539
|
content: "cancels " + cancelsSeqId,
|
|
4451
|
-
color: "red"
|
|
4540
|
+
color: "red",
|
|
4541
|
+
sx: {
|
|
4542
|
+
width: '80px'
|
|
4543
|
+
}
|
|
4452
4544
|
});
|
|
4453
4545
|
}
|
|
4454
4546
|
|
|
4455
4547
|
if (product.status === 'CANCELLED') {
|
|
4456
4548
|
return /*#__PURE__*/React__default["default"].createElement(shared.StatusTag, {
|
|
4457
4549
|
content: "cancelled " + product.sequence,
|
|
4458
|
-
color: "red"
|
|
4550
|
+
color: "red",
|
|
4551
|
+
sx: {
|
|
4552
|
+
width: '80px'
|
|
4553
|
+
}
|
|
4459
4554
|
});
|
|
4460
4555
|
}
|
|
4461
4556
|
|
|
4462
4557
|
if (moment__default["default"](product.validDateEnd) < moment__default["default"].utc(new Date())) {
|
|
4463
4558
|
return /*#__PURE__*/React__default["default"].createElement(shared.StatusTag, {
|
|
4464
4559
|
content: "expired",
|
|
4465
|
-
color: "grey"
|
|
4560
|
+
color: "grey",
|
|
4561
|
+
sx: {
|
|
4562
|
+
width: '80px'
|
|
4563
|
+
}
|
|
4466
4564
|
});
|
|
4467
4565
|
}
|
|
4468
4566
|
|
|
@@ -4470,7 +4568,8 @@
|
|
|
4470
4568
|
content: product.status.toLowerCase(),
|
|
4471
4569
|
color: product.status === 'PUBLISHED' ? 'green' : 'grey',
|
|
4472
4570
|
sx: {
|
|
4473
|
-
marginRight: '0!important'
|
|
4571
|
+
marginRight: '0!important',
|
|
4572
|
+
width: '80px'
|
|
4474
4573
|
}
|
|
4475
4574
|
});
|
|
4476
4575
|
};
|
|
@@ -4547,36 +4646,67 @@
|
|
|
4547
4646
|
sx: function sx(theme) {
|
|
4548
4647
|
var _a;
|
|
4549
4648
|
|
|
4550
|
-
return
|
|
4649
|
+
return __assign({
|
|
4551
4650
|
width: '100%',
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4651
|
+
'.wrapper-container': (_a = {
|
|
4652
|
+
paddingLeft: 1,
|
|
4653
|
+
paddingRight: 1,
|
|
4654
|
+
paddingTop: 1.5,
|
|
4655
|
+
paddingBottom: 1.5,
|
|
4656
|
+
'&:last-child': {
|
|
4657
|
+
paddingBottom: 1.5
|
|
4658
|
+
}
|
|
4659
|
+
}, _a[theme.breakpoints.up('sm')] = {
|
|
4660
|
+
paddingLeft: 4,
|
|
4661
|
+
paddingRight: 4,
|
|
4662
|
+
paddingTop: 2,
|
|
4663
|
+
paddingBottom: 2,
|
|
4664
|
+
'&:last-child': {
|
|
4665
|
+
paddingBottom: 2
|
|
4666
|
+
}
|
|
4667
|
+
}, _a)
|
|
4668
|
+
}, !shared.IS_JEST && {
|
|
4669
|
+
'@container (max-width: 768px)': {
|
|
4670
|
+
'.wrapper-container:not(.container-query-polyfill)': {
|
|
4671
|
+
paddingLeft: 1,
|
|
4672
|
+
paddingRight: 1,
|
|
4673
|
+
paddingTop: 1.5,
|
|
4674
|
+
paddingBottom: 1.5
|
|
4675
|
+
},
|
|
4676
|
+
'.col-1:not(.container-query-polyfill)': {
|
|
4677
|
+
maxWidth: '25%',
|
|
4678
|
+
flexBasis: '25%'
|
|
4679
|
+
},
|
|
4680
|
+
'.col-2:not(.container-query-polyfill)': {
|
|
4681
|
+
maxWidth: '75%',
|
|
4682
|
+
flexBasis: '75%'
|
|
4683
|
+
},
|
|
4684
|
+
'.col-3:not(.container-query-polyfill)': {
|
|
4685
|
+
maxWidth: '100%',
|
|
4686
|
+
flexBasis: '100%'
|
|
4687
|
+
},
|
|
4688
|
+
'.col-4:not(.container-query-polyfill)': {
|
|
4689
|
+
maxWidth: '100%',
|
|
4690
|
+
flexBasis: '100%',
|
|
4691
|
+
justifyContent: 'center'
|
|
4692
|
+
}
|
|
4566
4693
|
}
|
|
4567
|
-
}
|
|
4694
|
+
});
|
|
4568
4695
|
}
|
|
4696
|
+
}, /*#__PURE__*/React__default["default"].createElement(material.Box, {
|
|
4697
|
+
className: "wrapper-container"
|
|
4569
4698
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
4570
4699
|
container: true,
|
|
4571
4700
|
alignItems: "center",
|
|
4572
4701
|
spacing: 2
|
|
4573
4702
|
}, /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
4703
|
+
className: "col-1",
|
|
4574
4704
|
item: true,
|
|
4575
4705
|
xs: 3,
|
|
4576
4706
|
sm: 1
|
|
4577
4707
|
}, phenomenon !== null && /*#__PURE__*/React__default["default"].createElement(ProductListRowHeader, {
|
|
4578
4708
|
title: productType.toUpperCase()
|
|
4579
|
-
}), /*#__PURE__*/React__default["default"].createElement(
|
|
4709
|
+
}), /*#__PURE__*/React__default["default"].createElement(shared.CustomTooltip, {
|
|
4580
4710
|
title: phenomenon !== null ? getPhenomenon(productType, phenomenon) : '',
|
|
4581
4711
|
placement: "bottom-start"
|
|
4582
4712
|
}, /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
@@ -4584,12 +4714,13 @@
|
|
|
4584
4714
|
noWrap: true,
|
|
4585
4715
|
sx: styles.font
|
|
4586
4716
|
}, phenomenon !== null ? phenomenon : 'Cancel'))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
4717
|
+
className: "col-2",
|
|
4587
4718
|
item: true,
|
|
4588
4719
|
xs: 9,
|
|
4589
4720
|
sm: 3
|
|
4590
4721
|
}, /*#__PURE__*/React__default["default"].createElement(ProductListRowHeader, {
|
|
4591
4722
|
title: "Issue time"
|
|
4592
|
-
}), /*#__PURE__*/React__default["default"].createElement(
|
|
4723
|
+
}), /*#__PURE__*/React__default["default"].createElement(shared.CustomTooltip, {
|
|
4593
4724
|
title: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(ProductListRowHeader, {
|
|
4594
4725
|
title: "TAC"
|
|
4595
4726
|
}), /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
@@ -4624,9 +4755,10 @@
|
|
|
4624
4755
|
sx: styles.font,
|
|
4625
4756
|
"data-testid": "issueTime"
|
|
4626
4757
|
}, product.issueDate ? moment__default["default"].utc(product.issueDate).format('DD MMM YYYY, HH:mm') + " UTC" : '(Not published)'))), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
4758
|
+
className: "col-3",
|
|
4627
4759
|
item: true,
|
|
4628
4760
|
xs: 12,
|
|
4629
|
-
sm:
|
|
4761
|
+
sm: 5
|
|
4630
4762
|
}, /*#__PURE__*/React__default["default"].createElement(ProductListRowHeader, {
|
|
4631
4763
|
title: "Valid time"
|
|
4632
4764
|
}), /*#__PURE__*/React__default["default"].createElement(material.Typography, {
|
|
@@ -4635,10 +4767,12 @@
|
|
|
4635
4767
|
"data-testid": "validTime"
|
|
4636
4768
|
}, validTime)), /*#__PURE__*/React__default["default"].createElement(material.Grid, {
|
|
4637
4769
|
item: true,
|
|
4770
|
+
className: "col-4",
|
|
4638
4771
|
xs: 12,
|
|
4639
|
-
sm:
|
|
4772
|
+
sm: 3,
|
|
4640
4773
|
container: true,
|
|
4641
4774
|
justifyContent: "center",
|
|
4775
|
+
alignItems: "center",
|
|
4642
4776
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
4643
4777
|
sx: function sx(theme) {
|
|
4644
4778
|
var _a;
|
|
@@ -4659,7 +4793,7 @@
|
|
|
4659
4793
|
},
|
|
4660
4794
|
variant: "flat",
|
|
4661
4795
|
startIcon: /*#__PURE__*/React__default["default"].createElement(theme.Edit, null)
|
|
4662
|
-
}, "DRAFT") : getStatusTagList(product, cancelsSeqId), product.status === 'PUBLISHED' && cancelsSeqId === null && getActiveStatus(product))));
|
|
4796
|
+
}, "DRAFT") : getStatusTagList(product, cancelsSeqId), product.status === 'PUBLISHED' && cancelsSeqId === null && getActiveStatus(product)))));
|
|
4663
4797
|
};
|
|
4664
4798
|
|
|
4665
4799
|
/* *
|
|
@@ -4714,7 +4848,8 @@
|
|
|
4714
4848
|
dataTestId: "productList-alert"
|
|
4715
4849
|
}), productList && /*#__PURE__*/React__default["default"].createElement(material.List, {
|
|
4716
4850
|
sx: {
|
|
4717
|
-
paddingTop: 4
|
|
4851
|
+
paddingTop: 4,
|
|
4852
|
+
containerType: 'inline-size'
|
|
4718
4853
|
}
|
|
4719
4854
|
}, productList.map(function (productListItem, index) {
|
|
4720
4855
|
var product = productListItem[productType];
|
|
@@ -4726,7 +4861,7 @@
|
|
|
4726
4861
|
},
|
|
4727
4862
|
key: product.sequence && product.issueDate ? product.sequence + "-" + product.issueDate : "draft-" + index,
|
|
4728
4863
|
sx: {
|
|
4729
|
-
padding:
|
|
4864
|
+
padding: 0.25
|
|
4730
4865
|
}
|
|
4731
4866
|
}, /*#__PURE__*/React__default["default"].createElement(ProductListRow, {
|
|
4732
4867
|
product: product,
|