@opengeoweb/taf 9.28.1 → 9.29.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.
Files changed (122) hide show
  1. package/index.esm.js +188 -180
  2. package/package.json +1 -1
  3. package/src/index.d.ts +8 -8
  4. package/src/lib/TafDemo.stories.d.ts +23 -23
  5. package/src/lib/components/ComponentsLookUp/ComponentsLookUp.d.ts +32 -32
  6. package/src/lib/components/ComponentsLookUp/ComponentsLookUp.spec.d.ts +1 -1
  7. package/src/lib/components/ComponentsLookUp/index.d.ts +1 -1
  8. package/src/lib/components/IssuesPane/IssuesButton.d.ts +10 -10
  9. package/src/lib/components/IssuesPane/IssuesButton.spec.d.ts +1 -1
  10. package/src/lib/components/IssuesPane/IssuesPane.d.ts +14 -14
  11. package/src/lib/components/IssuesPane/IssuesPane.spec.d.ts +1 -1
  12. package/src/lib/components/IssuesPane/IssuesPane.stories.d.ts +17 -17
  13. package/src/lib/components/IssuesPane/IssuesPaneWrapper.d.ts +4 -4
  14. package/src/lib/components/IssuesPane/IssuesPaneWrapper.spec.d.ts +1 -1
  15. package/src/lib/components/IssuesPane/index.d.ts +2 -2
  16. package/src/lib/components/IssuesPane/types.d.ts +16 -16
  17. package/src/lib/components/IssuesPane/utils.d.ts +8 -8
  18. package/src/lib/components/IssuesPane/utils.spec.d.ts +1 -1
  19. package/src/lib/components/Providers/Providers.d.ts +19 -19
  20. package/src/lib/components/Providers/index.d.ts +1 -1
  21. package/src/lib/components/ResponsiveWrapper/ResponsiveWrapper.d.ts +4 -4
  22. package/src/lib/components/ResponsiveWrapper/ResponsiveWrapper.spec.d.ts +1 -1
  23. package/src/lib/components/Spinner/Spinner.d.ts +4 -4
  24. package/src/lib/components/Spinner/Spinner.spec.d.ts +1 -1
  25. package/src/lib/components/Spinner/Spinner.stories.d.ts +6 -6
  26. package/src/lib/components/StatusIcon/StatusIcon.d.ts +8 -8
  27. package/src/lib/components/StatusIcon/StatusIcon.spec.d.ts +1 -1
  28. package/src/lib/components/TabPanel/TabPanel.d.ts +8 -8
  29. package/src/lib/components/TabPanel/TabPanel.spec.d.ts +1 -1
  30. package/src/lib/components/TabPanel/index.d.ts +1 -1
  31. package/src/lib/components/TafAvatar/TafAvatar.d.ts +8 -8
  32. package/src/lib/components/TafAvatar/index.d.ts +1 -1
  33. package/src/lib/components/TafForm/TafForm.d.ts +16 -16
  34. package/src/lib/components/TafForm/TafForm.editor.spec.d.ts +1 -1
  35. package/src/lib/components/TafForm/TafForm.spec.d.ts +1 -1
  36. package/src/lib/components/TafForm/TafForm.statusChanges.spec.d.ts +1 -1
  37. package/src/lib/components/TafForm/TafForm.stories.d.ts +45 -45
  38. package/src/lib/components/TafForm/TafForm.validations.spec.d.ts +1 -1
  39. package/src/lib/components/TafForm/TafFormButtons/TafFormButtons.d.ts +12 -12
  40. package/src/lib/components/TafForm/TafFormButtons/TafFormButtons.spec.d.ts +1 -1
  41. package/src/lib/components/TafForm/TafFormButtons/TafFormOptionsButton.d.ts +11 -11
  42. package/src/lib/components/TafForm/TafFormButtons/TafFormOptionsButton.spec.d.ts +1 -1
  43. package/src/lib/components/TafForm/TafFormRow/DragHandle.d.ts +8 -8
  44. package/src/lib/components/TafForm/TafFormRow/DragHandle.spec.d.ts +1 -1
  45. package/src/lib/components/TafForm/TafFormRow/TafFormRow.d.ts +4 -4
  46. package/src/lib/components/TafForm/TafFormRow/TafFormRow.spec.d.ts +1 -1
  47. package/src/lib/components/TafForm/TafFormRow/TafFormTextField.d.ts +26 -26
  48. package/src/lib/components/TafForm/TafFormRow/TafFormTextField.spec.d.ts +1 -1
  49. package/src/lib/components/TafForm/TafFormRow/types.d.ts +32 -32
  50. package/src/lib/components/TafForm/TafFormRow/validations/change.d.ts +4 -4
  51. package/src/lib/components/TafForm/TafFormRow/validations/change.spec.d.ts +1 -1
  52. package/src/lib/components/TafForm/TafFormRow/validations/clouds.d.ts +34 -34
  53. package/src/lib/components/TafForm/TafFormRow/validations/clouds.spec.d.ts +1 -1
  54. package/src/lib/components/TafForm/TafFormRow/validations/probability.d.ts +2 -2
  55. package/src/lib/components/TafForm/TafFormRow/validations/probability.spec.d.ts +1 -1
  56. package/src/lib/components/TafForm/TafFormRow/validations/utils.d.ts +2 -2
  57. package/src/lib/components/TafForm/TafFormRow/validations/utils.spec.d.ts +1 -1
  58. package/src/lib/components/TafForm/TafFormRow/validations/validField.d.ts +21 -21
  59. package/src/lib/components/TafForm/TafFormRow/validations/validField.spec.d.ts +1 -1
  60. package/src/lib/components/TafForm/TafFormRow/validations/visibility.d.ts +12 -12
  61. package/src/lib/components/TafForm/TafFormRow/validations/visibility.spec.d.ts +1 -1
  62. package/src/lib/components/TafForm/TafFormRow/validations/weather.d.ts +15 -15
  63. package/src/lib/components/TafForm/TafFormRow/validations/weather.spec.d.ts +1 -1
  64. package/src/lib/components/TafForm/TafFormRow/validations/wind.d.ts +16 -16
  65. package/src/lib/components/TafForm/TafFormRow/validations/wind.spec.d.ts +1 -1
  66. package/src/lib/components/TafForm/index.d.ts +1 -1
  67. package/src/lib/components/TafForm/utils.d.ts +74 -74
  68. package/src/lib/components/TafForm/utils.spec.d.ts +1 -1
  69. package/src/lib/components/TafHeader/TafHeader.d.ts +8 -8
  70. package/src/lib/components/TafHeader/TafHeader.spec.d.ts +1 -1
  71. package/src/lib/components/TafLayout/LocationTabs/LocationTabs.d.ts +10 -10
  72. package/src/lib/components/TafLayout/LocationTabs/LocationTabs.spec.d.ts +1 -1
  73. package/src/lib/components/TafLayout/LocationTabs/LocationTabs.stories.d.ts +13 -13
  74. package/src/lib/components/TafLayout/LocationTabs/index.d.ts +1 -1
  75. package/src/lib/components/TafLayout/TacOverview/AdverseWeatherTacMessage.d.ts +8 -8
  76. package/src/lib/components/TafLayout/TacOverview/AdverseWeatherTacMessage.spec.d.ts +1 -1
  77. package/src/lib/components/TafLayout/TacOverview/AdverseWeatherTacMessage.stories.d.ts +25 -25
  78. package/src/lib/components/TafLayout/TacOverview/ExportButton.d.ts +7 -7
  79. package/src/lib/components/TafLayout/TacOverview/ExportButton.spec.d.ts +1 -1
  80. package/src/lib/components/TafLayout/TacOverview/TacContainer.d.ts +9 -9
  81. package/src/lib/components/TafLayout/TacOverview/TacContainer.spec.d.ts +1 -1
  82. package/src/lib/components/TafLayout/TacOverview/TacOverview.d.ts +12 -12
  83. package/src/lib/components/TafLayout/TacOverview/TacOverview.spec.d.ts +1 -1
  84. package/src/lib/components/TafLayout/TacOverview/TacOverview.stories.d.ts +23 -23
  85. package/src/lib/components/TafLayout/TacOverview/TacOverviewMobile.d.ts +11 -11
  86. package/src/lib/components/TafLayout/TacOverview/TacOverviewMobile.spec.d.ts +1 -1
  87. package/src/lib/components/TafLayout/TacOverview/TacOverviewMobile.stories.d.ts +23 -23
  88. package/src/lib/components/TafLayout/TacOverview/index.d.ts +2 -2
  89. package/src/lib/components/TafLayout/TafLayout.d.ts +16 -16
  90. package/src/lib/components/TafLayout/TafLayout.issuespane.spec.d.ts +1 -1
  91. package/src/lib/components/TafLayout/TafLayout.snackbar.spec.d.ts +1 -1
  92. package/src/lib/components/TafLayout/TafLayout.spec.d.ts +1 -1
  93. package/src/lib/components/TafLayout/TafLayout.stories.d.ts +15 -15
  94. package/src/lib/components/TafLayout/TafLayout.tacoverview.spec.d.ts +1 -1
  95. package/src/lib/components/TafLayout/TafPanel/TafPanel.d.ts +35 -35
  96. package/src/lib/components/TafLayout/TafPanel/TafPanel.spec.d.ts +1 -1
  97. package/src/lib/components/TafLayout/TafPanel/TafPanel.stories.d.ts +22 -22
  98. package/src/lib/components/TafLayout/TafPanel/index.d.ts +1 -1
  99. package/src/lib/components/TafLayout/TopTabs/TopTabs.d.ts +10 -10
  100. package/src/lib/components/TafLayout/TopTabs/TopTabs.spec.d.ts +1 -1
  101. package/src/lib/components/TafLayout/TopTabs/TopTabs.stories.d.ts +13 -13
  102. package/src/lib/components/TafLayout/TopTabs/index.d.ts +1 -1
  103. package/src/lib/components/TafLayout/utils.d.ts +23 -23
  104. package/src/lib/components/TafLayout/utils.spec.d.ts +1 -1
  105. package/src/lib/components/TafModule/TafModule.d.ts +5 -5
  106. package/src/lib/components/TafModule/TafModule.spec.d.ts +1 -1
  107. package/src/lib/components/TafModule/TafModule.stories.d.ts +28 -28
  108. package/src/lib/components/TafModule/TafModuleProvider.d.ts +23 -23
  109. package/src/lib/components/TafModule/index.d.ts +1 -1
  110. package/src/lib/components/TafWrapper/TafWrapper.d.ts +4 -4
  111. package/src/lib/components/TafWrapper/TafWrapper.spec.d.ts +1 -1
  112. package/src/lib/components/TafWrapper/index.d.ts +1 -1
  113. package/src/lib/types.d.ts +158 -158
  114. package/src/lib/utils/__mocks__/api.d.ts +15 -15
  115. package/src/lib/utils/api.d.ts +13 -13
  116. package/src/lib/utils/api.spec.d.ts +1 -1
  117. package/src/lib/utils/dateFormats.d.ts +2 -2
  118. package/src/lib/utils/fakeApi.d.ts +3 -3
  119. package/src/lib/utils/fakeApi.spec.d.ts +1 -1
  120. package/src/lib/utils/i18n.d.ts +6 -6
  121. package/src/lib/utils/mockdata/fakeTafList.d.ts +25 -25
  122. package/src/lib/utils/weatherPhenomena.d.ts +422 -422
package/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import React__default from 'react';
4
- import { Grid, Button, Chip, Box, Typography, TextField, Card, Tabs, Tab, Dialog, MenuList, MenuItem, Backdrop, CircularProgress } from '@mui/material';
4
+ import { Grid2, Button, Chip, Box, Typography, TextField, Card, Tabs, Tab, Dialog, MenuList, MenuItem, Backdrop, CircularProgress } from '@mui/material';
5
5
  import { useFormContext, useFieldArray, Controller } from 'react-hook-form';
6
6
  import { useDispatch } from 'react-redux';
7
7
  import { ReactSortable } from 'react-sortablejs';
@@ -9,7 +9,7 @@ import Sortable from 'sortablejs';
9
9
  import { useAuthenticationContext } from '@opengeoweb/authentication';
10
10
  import { HIDDEN_INPUT_HELPER_IS_DRAFT, getDeepProperty, useDraftFormHelpers, ReactHookFormHiddenInput, ReactHookFormProvider } from '@opengeoweb/form-fields';
11
11
  import { SHARED_NAMESPACE, dateUtils, useIsMounted, CustomIconButton, CustomTooltip, ToolContainerDraggable, Avatar, getInitials, ToggleMenu, useConfirmationDialog, usePreventBrowserClose, SwitchButton, ToolHeader, AlertBanner, getErrorMessage as getErrorMessage$1, getWarningMessage, LastUpdateTime, usePoller, ErrorBoundary } from '@opengeoweb/shared';
12
- import { snackbarActions } from '@opengeoweb/snackbar';
12
+ import { snackbarActions, snackbarTypes } from '@opengeoweb/snackbar';
13
13
  import 'i18next';
14
14
  import { useTranslation } from 'react-i18next';
15
15
  import { isEqual } from 'lodash';
@@ -3850,19 +3850,23 @@ const TafFormButtons = ({
3850
3850
  const {
3851
3851
  t
3852
3852
  } = useTafTranslation();
3853
- return jsxs(Grid, Object.assign({
3853
+ return jsxs(Grid2, Object.assign({
3854
3854
  container: true,
3855
- justifyContent: "flex-end",
3856
- sx: buttonsStyle,
3857
- columns: 24
3855
+ columns: 24,
3856
+ sx: [{
3857
+ justifyContent: 'flex-end'
3858
+ }, ...(Array.isArray(buttonsStyle) ? buttonsStyle : [buttonsStyle])]
3858
3859
  }, {
3859
- children: [jsx(Grid, Object.assign({
3860
- item: true,
3860
+ children: [jsx(Grid2, Object.assign({
3861
3861
  container: true,
3862
- justifyContent: "flex-end",
3863
3862
  columns: 24,
3864
- xs: 24,
3865
- sm: 23
3863
+ size: {
3864
+ xs: 24,
3865
+ sm: 23
3866
+ },
3867
+ sx: {
3868
+ justifyContent: 'flex-end'
3869
+ }
3866
3870
  }, {
3867
3871
  children: _isFormDisabled ? jsx(ViewModeButtons, {
3868
3872
  canBe: _canBe,
@@ -3881,12 +3885,12 @@ const TafFormButtons = ({
3881
3885
  "data-testid": "savedrafttaf",
3882
3886
  variant: "tertiary",
3883
3887
  onClick: () => {
3884
- /* Save the TAF as draft:
3885
- if action NEW or DRAFT - new status will be DRAFT -- default
3886
- if action AMEND - new status will be DRAFT_AMENDED
3887
- if action CORRECT - new status will be DRAFT_CORRECTED
3888
- if action DRAFT_AMEND - new status will be DRAFT_AMENDED
3889
- if action DRAFT_CORRECT - new status will be DRAFT_CORRECTED
3888
+ /* Save the TAF as draft:
3889
+ if action NEW or DRAFT - new status will be DRAFT -- default
3890
+ if action AMEND - new status will be DRAFT_AMENDED
3891
+ if action CORRECT - new status will be DRAFT_CORRECTED
3892
+ if action DRAFT_AMEND - new status will be DRAFT_AMENDED
3893
+ if action DRAFT_CORRECT - new status will be DRAFT_CORRECTED
3890
3894
  */
3891
3895
  onTafEditModeButtonPress(tafActionToDraftAction(tafAction));
3892
3896
  }
@@ -3896,12 +3900,12 @@ const TafFormButtons = ({
3896
3900
  "data-testid": "publishtaf",
3897
3901
  variant: "tertiary",
3898
3902
  onClick: () => {
3899
- /* Publish the TAF:
3900
- if action NEW or DRAFT - new status will be PUBLISHED -- default
3901
- if action AMEND - new status will be AMENDED
3902
- if action CORRECT - new status will be CORRECTED
3903
- if action DRAFT_AMEND - new status will be AMENDED
3904
- if action DRAFT_CORRECT - new status will be CORRECTED
3903
+ /* Publish the TAF:
3904
+ if action NEW or DRAFT - new status will be PUBLISHED -- default
3905
+ if action AMEND - new status will be AMENDED
3906
+ if action CORRECT - new status will be CORRECTED
3907
+ if action DRAFT_AMEND - new status will be AMENDED
3908
+ if action DRAFT_CORRECT - new status will be CORRECTED
3905
3909
  */
3906
3910
  onTafEditModeButtonPress(tafActionToPublishAction(tafAction));
3907
3911
  }
@@ -3909,10 +3913,11 @@ const TafFormButtons = ({
3909
3913
  children: t('button-publish')
3910
3914
  }))]
3911
3915
  })
3912
- })), jsx(Grid, {
3913
- item: true,
3916
+ })), jsx(Grid2, {
3914
3917
  columns: 24,
3915
- sm: 1
3918
+ size: {
3919
+ sm: 1
3920
+ }
3916
3921
  })]
3917
3922
  }));
3918
3923
  };
@@ -4261,22 +4266,22 @@ if (NOT_GENERIC || INCORRECT_NAME) {
4261
4266
  }, { unsafe: true });
4262
4267
  }
4263
4268
 
4264
- /* *
4265
- * Licensed under the Apache License, Version 2.0 (the "License");
4266
- * you may not use this file except in compliance with the License.
4267
- * You may obtain a copy of the License at
4268
- *
4269
- * http://www.apache.org/licenses/LICENSE-2.0
4270
- *
4271
- * Unless required by applicable law or agreed to in writing, software
4272
- * distributed under the License is distributed on an "AS IS" BASIS,
4273
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4274
- * See the License for the specific language governing permissions and
4275
- * limitations under the License.
4276
- *
4277
- * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4278
- * Copyright 2023 - Finnish Meteorological Institute (FMI)
4279
- * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4269
+ /* *
4270
+ * Licensed under the Apache License, Version 2.0 (the "License");
4271
+ * you may not use this file except in compliance with the License.
4272
+ * You may obtain a copy of the License at
4273
+ *
4274
+ * http://www.apache.org/licenses/LICENSE-2.0
4275
+ *
4276
+ * Unless required by applicable law or agreed to in writing, software
4277
+ * distributed under the License is distributed on an "AS IS" BASIS,
4278
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4279
+ * See the License for the specific language governing permissions and
4280
+ * limitations under the License.
4281
+ *
4282
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4283
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
4284
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4280
4285
  * */
4281
4286
  const prependZeroes = (value, totalDigits) => {
4282
4287
  const valueAsString = value.toString();
@@ -4653,22 +4658,22 @@ const validateVisibilityField = value => {
4653
4658
  return rangeValidation === true || rangeValidation;
4654
4659
  };
4655
4660
 
4656
- /* *
4657
- * Licensed under the Apache License, Version 2.0 (the "License");
4658
- * you may not use this file except in compliance with the License.
4659
- * You may obtain a copy of the License at
4660
- *
4661
- * http://www.apache.org/licenses/LICENSE-2.0
4662
- *
4663
- * Unless required by applicable law or agreed to in writing, software
4664
- * distributed under the License is distributed on an "AS IS" BASIS,
4665
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4666
- * See the License for the specific language governing permissions and
4667
- * limitations under the License.
4668
- *
4669
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4670
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
4671
- * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4661
+ /* *
4662
+ * Licensed under the Apache License, Version 2.0 (the "License");
4663
+ * you may not use this file except in compliance with the License.
4664
+ * You may obtain a copy of the License at
4665
+ *
4666
+ * http://www.apache.org/licenses/LICENSE-2.0
4667
+ *
4668
+ * Unless required by applicable law or agreed to in writing, software
4669
+ * distributed under the License is distributed on an "AS IS" BASIS,
4670
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4671
+ * See the License for the specific language governing permissions and
4672
+ * limitations under the License.
4673
+ *
4674
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4675
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
4676
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4672
4677
  * */
4673
4678
  // Source: http://codes.wmo.int/49-2/_AerodromePresentOrForecastWeather
4674
4679
  var WeatherPhenomena;
@@ -5970,22 +5975,22 @@ const validateFourthCloud = (firstCloudValue, secondCloudValue, thirdCloudValue,
5970
5975
  return true;
5971
5976
  };
5972
5977
 
5973
- /* *
5974
- * Licensed under the Apache License, Version 2.0 (the "License");
5975
- * you may not use this file except in compliance with the License.
5976
- * You may obtain a copy of the License at
5977
- *
5978
- * http://www.apache.org/licenses/LICENSE-2.0
5979
- *
5980
- * Unless required by applicable law or agreed to in writing, software
5981
- * distributed under the License is distributed on an "AS IS" BASIS,
5982
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5983
- * See the License for the specific language governing permissions and
5984
- * limitations under the License.
5985
- *
5986
- * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
5987
- * Copyright 2023 - Finnish Meteorological Institute (FMI)
5988
- * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
5978
+ /* *
5979
+ * Licensed under the Apache License, Version 2.0 (the "License");
5980
+ * you may not use this file except in compliance with the License.
5981
+ * You may obtain a copy of the License at
5982
+ *
5983
+ * http://www.apache.org/licenses/LICENSE-2.0
5984
+ *
5985
+ * Unless required by applicable law or agreed to in writing, software
5986
+ * distributed under the License is distributed on an "AS IS" BASIS,
5987
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5988
+ * See the License for the specific language governing permissions and
5989
+ * limitations under the License.
5990
+ *
5991
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
5992
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
5993
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
5989
5994
  * */
5990
5995
  const DATE_FORMAT_ISSUE_TIME = `ddHHmm'Z`;
5991
5996
  const DATE_FORMAT_BASE_TIME = 'HH:mm dd MMM';
@@ -6593,22 +6598,22 @@ const DragHandle = ({
6593
6598
  }));
6594
6599
  };
6595
6600
 
6596
- /* *
6597
- * Licensed under the Apache License, Version 2.0 (the "License");
6598
- * you may not use this file except in compliance with the License.
6599
- * You may obtain a copy of the License at
6600
- *
6601
- * http://www.apache.org/licenses/LICENSE-2.0
6602
- *
6603
- * Unless required by applicable law or agreed to in writing, software
6604
- * distributed under the License is distributed on an "AS IS" BASIS,
6605
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6606
- * See the License for the specific language governing permissions and
6607
- * limitations under the License.
6608
- *
6609
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6610
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
6611
- * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6601
+ /* *
6602
+ * Licensed under the Apache License, Version 2.0 (the "License");
6603
+ * you may not use this file except in compliance with the License.
6604
+ * You may obtain a copy of the License at
6605
+ *
6606
+ * http://www.apache.org/licenses/LICENSE-2.0
6607
+ *
6608
+ * Unless required by applicable law or agreed to in writing, software
6609
+ * distributed under the License is distributed on an "AS IS" BASIS,
6610
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6611
+ * See the License for the specific language governing permissions and
6612
+ * limitations under the License.
6613
+ *
6614
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6615
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
6616
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6612
6617
  * */
6613
6618
  const getCustomError = (error, isChangeGroup, rowIndex) => {
6614
6619
  return Object.assign(Object.assign({}, error), {
@@ -7068,8 +7073,7 @@ const TafFormTextField = ({
7068
7073
  _onBlur();
7069
7074
  }, [_onBlur, _name, setValue, _shouldPreventUppercase]);
7070
7075
  const hasError = !!fieldErrors;
7071
- return jsx(Grid, Object.assign({
7072
- item: true,
7076
+ return jsx(Grid2, Object.assign({
7073
7077
  sx: {
7074
7078
  width: `${100 / 13}%`,
7075
7079
  minWidth: 60
@@ -7107,22 +7111,22 @@ const TafFormTextField = ({
7107
7111
  }));
7108
7112
  };
7109
7113
 
7110
- /* *
7111
- * Licensed under the Apache License, Version 2.0 (the "License");
7112
- * you may not use this file except in compliance with the License.
7113
- * You may obtain a copy of the License at
7114
- *
7115
- * http://www.apache.org/licenses/LICENSE-2.0
7116
- *
7117
- * Unless required by applicable law or agreed to in writing, software
7118
- * distributed under the License is distributed on an "AS IS" BASIS,
7119
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7120
- * See the License for the specific language governing permissions and
7121
- * limitations under the License.
7122
- *
7123
- * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7124
- * Copyright 2023 - Finnish Meteorological Institute (FMI)
7125
- * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
7114
+ /* *
7115
+ * Licensed under the Apache License, Version 2.0 (the "License");
7116
+ * you may not use this file except in compliance with the License.
7117
+ * You may obtain a copy of the License at
7118
+ *
7119
+ * http://www.apache.org/licenses/LICENSE-2.0
7120
+ *
7121
+ * Unless required by applicable law or agreed to in writing, software
7122
+ * distributed under the License is distributed on an "AS IS" BASIS,
7123
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7124
+ * See the License for the specific language governing permissions and
7125
+ * limitations under the License.
7126
+ *
7127
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7128
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
7129
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
7126
7130
  * */
7127
7131
  // messages
7128
7132
  const invalidChangeMessage = 'Invalid Change input, only BECMG, TEMPO or FM are allowed';
@@ -7142,22 +7146,22 @@ const validateChangeFieldInterField = (value, valueProb) => {
7142
7146
  return true;
7143
7147
  };
7144
7148
 
7145
- /* *
7146
- * Licensed under the Apache License, Version 2.0 (the "License");
7147
- * you may not use this file except in compliance with the License.
7148
- * You may obtain a copy of the License at
7149
- *
7150
- * http://www.apache.org/licenses/LICENSE-2.0
7151
- *
7152
- * Unless required by applicable law or agreed to in writing, software
7153
- * distributed under the License is distributed on an "AS IS" BASIS,
7154
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7155
- * See the License for the specific language governing permissions and
7156
- * limitations under the License.
7157
- *
7158
- * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7159
- * Copyright 2023 - Finnish Meteorological Institute (FMI)
7160
- * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
7149
+ /* *
7150
+ * Licensed under the Apache License, Version 2.0 (the "License");
7151
+ * you may not use this file except in compliance with the License.
7152
+ * You may obtain a copy of the License at
7153
+ *
7154
+ * http://www.apache.org/licenses/LICENSE-2.0
7155
+ *
7156
+ * Unless required by applicable law or agreed to in writing, software
7157
+ * distributed under the License is distributed on an "AS IS" BASIS,
7158
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7159
+ * See the License for the specific language governing permissions and
7160
+ * limitations under the License.
7161
+ *
7162
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7163
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
7164
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
7161
7165
  * */
7162
7166
  // messages
7163
7167
  const invalidProbabilityMessage = 'Invalid Probability input, only PROB30 or PROB40 are allowed';
@@ -7329,8 +7333,14 @@ const TafFormRow = /*#__PURE__*/React__default.forwardRef((_a, ref) => {
7329
7333
  const clearRow = React__default.useCallback(() => {
7330
7334
  onClearRow(index);
7331
7335
  }, [onClearRow, index]);
7332
- return jsxs(Grid, Object.assign({
7333
- sx: {
7336
+ return jsxs(Grid2, Object.assign({
7337
+ "data-testid": `row-${namePrefix}`,
7338
+ container: true,
7339
+ ref: ref
7340
+ }, props, {
7341
+ className: "formRow",
7342
+ sx: [{
7343
+ justifyContent: 'flex-start',
7334
7344
  marginTop: '8px',
7335
7345
  backgroundColor: 'geowebColors.cards.cardContainer',
7336
7346
  position: 'relative',
@@ -7348,19 +7358,14 @@ const TafFormRow = /*#__PURE__*/React__default.forwardRef((_a, ref) => {
7348
7358
  '&.sortable-ghost': {
7349
7359
  opacity: 0.5
7350
7360
  }
7351
- },
7352
- justifyContent: "flex-start",
7353
- "data-testid": `row-${namePrefix}`,
7354
- container: true,
7355
- ref: ref
7356
- }, props, {
7357
- className: "formRow"
7361
+ }, ...(Array.isArray(props.sx) ? props.sx : [props.sx])]
7358
7362
  }, {
7359
- children: [jsxs(Grid, Object.assign({
7360
- item: true,
7363
+ children: [jsxs(Grid2, Object.assign({
7361
7364
  container: true,
7362
- justifyContent: "flex-end",
7363
- xs: true
7365
+ size: "grow",
7366
+ sx: {
7367
+ justifyContent: 'flex-end'
7368
+ }
7364
7369
  }, {
7365
7370
  children: [!isChangeGroup && jsxs(Fragment, {
7366
7371
  children: [jsx(TafFormTextField, {
@@ -7381,11 +7386,11 @@ const TafFormRow = /*#__PURE__*/React__default.forwardRef((_a, ref) => {
7381
7386
  }), isChangeGroup && jsxs(Fragment, {
7382
7387
  children: [jsx(Box, Object.assign({
7383
7388
  sx: {
7389
+ display: 'flex',
7390
+ justifyContent: 'center',
7384
7391
  marginRight: '2px',
7385
7392
  minWidth: 60
7386
- },
7387
- display: "flex",
7388
- justifyContent: "center"
7393
+ }
7389
7394
  }, {
7390
7395
  children: !disabled && dragHandle
7391
7396
  })), jsx(TafFormTextField, {
@@ -7598,12 +7603,11 @@ const TafFormRow = /*#__PURE__*/React__default.forwardRef((_a, ref) => {
7598
7603
  }
7599
7604
  }
7600
7605
  })]
7601
- })), !disabled && jsx(Grid, Object.assign({
7602
- item: true,
7606
+ })), !disabled && jsx(Grid2, Object.assign({
7603
7607
  container: true,
7604
- justifyContent: "flex-end",
7605
- alignItems: "flex-end",
7606
7608
  sx: {
7609
+ justifyContent: 'flex-end',
7610
+ alignItems: 'flex-end',
7607
7611
  width: '3.5%',
7608
7612
  marginBottom: '14px',
7609
7613
  minWidth: 28
@@ -7725,6 +7729,7 @@ const TafForm = /*#__PURE__*/React__default.memo(({
7725
7729
  };
7726
7730
  const showSnackbar = React__default.useCallback(message => {
7727
7731
  dispatch(snackbarActions.openSnackbar({
7732
+ type: snackbarTypes.SnackbarMessageType.VERBATIM_MESSAGE,
7728
7733
  message
7729
7734
  }));
7730
7735
  }, [dispatch]);
@@ -8032,24 +8037,22 @@ const TafForm = /*#__PURE__*/React__default.memo(({
8032
8037
  }),
8033
8038
  isNotRequiredForAction: isNotRequiredForAction
8034
8039
  }, item.id))
8035
- })), !_isDisabled && isEditor && jsx(Grid, Object.assign({
8040
+ })), !_isDisabled && isEditor && jsx(Grid2, Object.assign({
8036
8041
  container: true,
8037
- justifyContent: "space-between",
8038
- alignItems: "center",
8039
8042
  sx: {
8043
+ justifyContent: 'space-between',
8044
+ alignItems: 'center',
8040
8045
  marginLeft: 1.5,
8041
8046
  marginTop: 1
8042
8047
  }
8043
8048
  }, {
8044
- children: jsx(Grid, Object.assign({
8045
- item: true
8046
- }, {
8049
+ children: jsx(Grid2, {
8047
8050
  children: jsx(IssuesButton, {
8048
8051
  errors: errors,
8049
8052
  isIssuesPaneOpen: _isIssuesPaneOpen,
8050
8053
  setIsIssuesPaneOpen: _setIsIssuesPaneOpen
8051
8054
  })
8052
- }))
8055
+ })
8053
8056
  })), isEditor && jsx(TafFormButtons, {
8054
8057
  isFormDisabled: _isDisabled,
8055
8058
  tafAction: tafAction,
@@ -8614,6 +8617,7 @@ const TacContainer = ({
8614
8617
  } = useFieldArrayMethods;
8615
8618
  const showSnackbar = React__default.useCallback(message => {
8616
8619
  dispatch(snackbarActions.openSnackbar({
8620
+ type: snackbarTypes.SnackbarMessageType.VERBATIM_MESSAGE,
8617
8621
  message
8618
8622
  }));
8619
8623
  }, [dispatch]);
@@ -9321,6 +9325,7 @@ const TafLayout = ({
9321
9325
  const [error, setError] = React__default.useState();
9322
9326
  const showSnackbar = React__default.useCallback(message => {
9323
9327
  dispatch(snackbarActions.openSnackbar({
9328
+ type: snackbarTypes.SnackbarMessageType.VERBATIM_MESSAGE,
9324
9329
  message
9325
9330
  }));
9326
9331
  }, [dispatch]);
@@ -9443,7 +9448,7 @@ const TafLayout = ({
9443
9448
  flexDirection: 'column'
9444
9449
  }
9445
9450
  }, {
9446
- children: [jsxs(Grid, Object.assign({
9451
+ children: [jsxs(Grid2, Object.assign({
9447
9452
  container: true,
9448
9453
  spacing: 2,
9449
9454
  sx: {
@@ -9451,20 +9456,22 @@ const TafLayout = ({
9451
9456
  paddingRight: 1
9452
9457
  }
9453
9458
  }, {
9454
- children: [jsx(Grid, Object.assign({
9455
- item: true,
9456
- xs: 12,
9457
- sm: 9
9459
+ children: [jsx(Grid2, Object.assign({
9460
+ size: {
9461
+ xs: 12,
9462
+ sm: 9
9463
+ }
9458
9464
  }, {
9459
9465
  children: jsx(TopTabs, {
9460
9466
  tafFromBackend: lastCurrentTaf,
9461
9467
  timeSlot: timeSlot,
9462
9468
  onChangeTimeSlot: onChangeTimeSlot
9463
9469
  })
9464
- })), jsx(Grid, Object.assign({
9465
- item: true,
9466
- xs: 12,
9467
- sm: 3
9470
+ })), jsx(Grid2, Object.assign({
9471
+ size: {
9472
+ xs: 12,
9473
+ sm: 3
9474
+ }
9468
9475
  }, {
9469
9476
  children: lastUpdateTime && jsx(LastUpdateTime, {
9470
9477
  lastUpdateTime: lastUpdateTime,
@@ -9472,12 +9479,14 @@ const TafLayout = ({
9472
9479
  dataTestId: "lastupdated-time"
9473
9480
  })
9474
9481
  }))]
9475
- })), jsx(Grid, Object.assign({
9482
+ })), jsx(Grid2, Object.assign({
9476
9483
  container: true,
9477
- flexGrow: 1,
9478
- overflow: "hidden"
9484
+ sx: {
9485
+ flexGrow: 1,
9486
+ overflow: 'hidden'
9487
+ }
9479
9488
  }, {
9480
- children: jsxs(Grid, Object.assign({
9489
+ children: jsxs(Grid2, Object.assign({
9481
9490
  container: true,
9482
9491
  spacing: 2,
9483
9492
  sx: {
@@ -9488,10 +9497,11 @@ const TafLayout = ({
9488
9497
  overflow: 'auto'
9489
9498
  }
9490
9499
  }, {
9491
- children: [jsx(Grid, Object.assign({
9492
- item: true,
9493
- xs: 3,
9494
- sm: 1
9500
+ children: [jsx(Grid2, Object.assign({
9501
+ size: {
9502
+ xs: 3,
9503
+ sm: 1
9504
+ }
9495
9505
  }, {
9496
9506
  children: jsx(LocationTabs, {
9497
9507
  tafList: locations,
@@ -9499,9 +9509,8 @@ const TafLayout = ({
9499
9509
  onChangeTab: onChangeLocationTab,
9500
9510
  timeSlot: timeSlot
9501
9511
  })
9502
- })), jsx(Grid, Object.assign({
9503
- item: true,
9504
- xs: true
9512
+ })), jsx(Grid2, Object.assign({
9513
+ size: "grow"
9505
9514
  }, {
9506
9515
  children: jsxs(Card, Object.assign({
9507
9516
  variant: "outlined",
@@ -9533,17 +9542,16 @@ const TafLayout = ({
9533
9542
  tafAction: tafAction
9534
9543
  }, tafFromBackend.taf.uuid))]
9535
9544
  }))
9536
- })), jsx(Grid, Object.assign({
9537
- item: true,
9538
- xs: 0,
9539
- sm: 3,
9540
- height: {
9545
+ })), jsx(Grid2, Object.assign({
9546
+ size: {
9541
9547
  xs: 0,
9542
- sm: '100%'
9548
+ sm: 3
9543
9549
  },
9544
- width: {
9545
- xs: 0,
9546
- sm: '100%'
9550
+ sx: {
9551
+ height: {
9552
+ xs: 0,
9553
+ sm: '100%'
9554
+ }
9547
9555
  }
9548
9556
  }, {
9549
9557
  children: jsx(TacOverview, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/taf",
3
- "version": "9.28.1",
3
+ "version": "9.29.1",
4
4
  "description": "GeoWeb TAF library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/src/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import tafTranslations from '../locales/taf.json';
2
- export * from './lib/components/TafForm';
3
- export * from './lib/components/TafModule';
4
- export { createApi } from './lib/utils/api';
5
- export { createApi as createFakeApi } from './lib/utils/fakeApi';
6
- export * from './lib/components/ComponentsLookUp';
7
- export { TAF_NAMESPACE } from './lib/utils/i18n';
8
- export { tafTranslations };
1
+ import tafTranslations from '../locales/taf.json';
2
+ export * from './lib/components/TafForm';
3
+ export * from './lib/components/TafModule';
4
+ export { createApi } from './lib/utils/api';
5
+ export { createApi as createFakeApi } from './lib/utils/fakeApi';
6
+ export * from './lib/components/ComponentsLookUp';
7
+ export { TAF_NAMESPACE } from './lib/utils/i18n';
8
+ export { tafTranslations };
@@ -1,23 +1,23 @@
1
- import React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const TafModuleLightTheme: {
7
- (): React.ReactElement;
8
- parameters: {
9
- zeplinLink: {
10
- name: string;
11
- link: string;
12
- }[];
13
- };
14
- };
15
- export declare const TafModuleDarkTheme: {
16
- (): React.ReactElement;
17
- parameters: {
18
- zeplinLink: {
19
- name: string;
20
- link: string;
21
- }[];
22
- };
23
- };
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const TafModuleLightTheme: {
7
+ (): React.ReactElement;
8
+ parameters: {
9
+ zeplinLink: {
10
+ name: string;
11
+ link: string;
12
+ }[];
13
+ };
14
+ };
15
+ export declare const TafModuleDarkTheme: {
16
+ (): React.ReactElement;
17
+ parameters: {
18
+ zeplinLink: {
19
+ name: string;
20
+ link: string;
21
+ }[];
22
+ };
23
+ };