@opengeoweb/layer-select 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 (79) hide show
  1. package/index.esm.js +185 -169
  2. package/package.json +1 -1
  3. package/src/index.d.ts +4 -4
  4. package/src/lib/components/KeywordFilterButton/KeywordFilterButtonConnect.d.ts +9 -9
  5. package/src/lib/components/KeywordFilterButton/KeywordFilterButtonConnect.spec.d.ts +1 -1
  6. package/src/lib/components/KeywordFilterButton/index.d.ts +1 -1
  7. package/src/lib/components/KeywordFilterResults/KeywordFilterResults.d.ts +13 -13
  8. package/src/lib/components/KeywordFilterResults/KeywordFilterResults.integration.spec.d.ts +1 -1
  9. package/src/lib/components/KeywordFilterResults/KeywordFilterResults.stories.d.ts +25 -25
  10. package/src/lib/components/KeywordFilterResults/KeywordFilterResultsConnect.d.ts +8 -8
  11. package/src/lib/components/KeywordFilterResults/KeywordFilterResultsListItemConnect.d.ts +6 -6
  12. package/src/lib/components/KeywordFilterResults/KeywordFilterSelectAllSwitchConnect.d.ts +2 -2
  13. package/src/lib/components/KeywordFilterResults/index.d.ts +4 -4
  14. package/src/lib/components/LayerList/LayerAddRemoveButton.d.ts +19 -19
  15. package/src/lib/components/LayerList/LayerAddRemoveButton.spec.d.ts +1 -1
  16. package/src/lib/components/LayerList/LayerList.d.ts +26 -26
  17. package/src/lib/components/LayerList/LayerList.spec.d.ts +3 -3
  18. package/src/lib/components/LayerList/LayerListConnect.d.ts +9 -9
  19. package/src/lib/components/LayerList/LayerListConnect.spec.d.ts +1 -1
  20. package/src/lib/components/LayerList/LayerListDimensions.d.ts +7 -7
  21. package/src/lib/components/LayerList/LayerListRow.d.ts +21 -21
  22. package/src/lib/components/LayerList/index.d.ts +5 -5
  23. package/src/lib/components/LayerSelect/LayerSelect.d.ts +20 -20
  24. package/src/lib/components/LayerSelect/LayerSelect.spec.d.ts +1 -1
  25. package/src/lib/components/LayerSelect/LayerSelect.stories.d.ts +33 -33
  26. package/src/lib/components/LayerSelect/LayerSelectButtonConnect.d.ts +11 -11
  27. package/src/lib/components/LayerSelect/LayerSelectButtonConnect.spec.d.ts +1 -1
  28. package/src/lib/components/LayerSelect/LayerSelectConnect.d.ts +16 -16
  29. package/src/lib/components/LayerSelect/LayerSelectConnect.integration.spec.d.ts +1 -1
  30. package/src/lib/components/LayerSelect/LayerSelectConnect.spec.d.ts +1 -1
  31. package/src/lib/components/LayerSelect/LayerSelectUtils.d.ts +77 -77
  32. package/src/lib/components/LayerSelect/LayerSelectUtils.spec.d.ts +1 -1
  33. package/src/lib/components/LayerSelect/index.d.ts +2 -2
  34. package/src/lib/components/Providers/Providers.d.ts +20 -20
  35. package/src/lib/components/Providers/index.d.ts +1 -1
  36. package/src/lib/components/SearchField/SearchFieldConnect.d.ts +2 -2
  37. package/src/lib/components/SearchField/SearchFieldConnect.spec.d.ts +1 -1
  38. package/src/lib/components/SearchField/index.d.ts +1 -1
  39. package/src/lib/components/ServiceList/ServiceChip.d.ts +11 -11
  40. package/src/lib/components/ServiceList/ServiceChip.spec.d.ts +1 -1
  41. package/src/lib/components/ServiceList/ServiceChipConnect.d.ts +10 -10
  42. package/src/lib/components/ServiceList/ServiceList.d.ts +8 -8
  43. package/src/lib/components/ServiceList/ServiceListConnect.d.ts +6 -6
  44. package/src/lib/components/ServiceList/ServiceListConnect.spec.d.ts +1 -1
  45. package/src/lib/components/ServiceList/index.d.ts +4 -4
  46. package/src/lib/components/ServiceOptionsButton/ServiceOptionsButton.d.ts +6 -6
  47. package/src/lib/components/ServiceOptionsButton/ServiceOptionsButton.spec.d.ts +1 -1
  48. package/src/lib/components/ServiceOptionsButton/ServiceOptionsButton.stories.d.ts +7 -7
  49. package/src/lib/components/ServiceOptionsButton/index.d.ts +1 -1
  50. package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialog.d.ts +19 -19
  51. package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialog.spec.d.ts +1 -1
  52. package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialog.stories.d.ts +25 -25
  53. package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialogConnect.d.ts +9 -8
  54. package/src/lib/components/ServiceOptionsDialog/ServiceOptionsDialogConnect.spec.d.ts +1 -1
  55. package/src/lib/components/ServiceOptionsDialog/index.d.ts +2 -2
  56. package/src/lib/components/ServicePopup/ServicePopup.d.ts +20 -19
  57. package/src/lib/components/ServicePopup/ServicePopup.spec.d.ts +1 -1
  58. package/src/lib/components/ServicePopup/ServicePopup.stories.d.ts +44 -43
  59. package/src/lib/components/ServicePopup/ServicePopupConnect.d.ts +2 -2
  60. package/src/lib/components/ServicePopup/ServicePopupConnect.spec.d.ts +1 -1
  61. package/src/lib/components/ServicePopup/ServicePopupConnect.stories.d.ts +6 -6
  62. package/src/lib/components/ServicePopup/ServicePopupDialogConnect.d.ts +11 -11
  63. package/src/lib/components/ServicePopup/index.d.ts +3 -3
  64. package/src/lib/components/ServicePopup/utils.d.ts +6 -6
  65. package/src/lib/components/ServicePopup/utils.spec.d.ts +1 -1
  66. package/src/lib/components/index.d.ts +9 -9
  67. package/src/lib/index.d.ts +2 -2
  68. package/src/lib/store/config.d.ts +4 -4
  69. package/src/lib/store/index.d.ts +6 -6
  70. package/src/lib/store/listeners.d.ts +2 -2
  71. package/src/lib/store/listeners.spec.d.ts +1 -1
  72. package/src/lib/store/reducer.d.ts +27 -27
  73. package/src/lib/store/reducer.spec.d.ts +1 -1
  74. package/src/lib/store/selectors.d.ts +97 -97
  75. package/src/lib/store/selectors.spec.d.ts +1 -1
  76. package/src/lib/store/types.d.ts +68 -68
  77. package/src/lib/store/utils.d.ts +8 -8
  78. package/src/lib/store/utils.spec.d.ts +1 -1
  79. package/src/lib/utils/i18n.d.ts +6 -6
package/index.esm.js CHANGED
@@ -7,13 +7,13 @@ import { Filter, LayersAdd, Add, Cached, Edit, Visibility, Delete, Close, Copy }
7
7
  import { uiTypes, serviceActions, selectorMemoizationOptions, serviceSelectors, uiActions, getUserAddedServices, setUserAddedServices, layerActions, uiSelectors, layerSelectors, useSetupDialog, mapSelectors, layerTypes } from '@opengeoweb/store';
8
8
  import { createEntityAdapter, createSlice, createSelector, createListenerMiddleware, isAnyOf } from '@reduxjs/toolkit';
9
9
  import { compact, countBy, partition } from 'lodash';
10
- import { Switch, Grid, List, Box, Typography, Backdrop, CircularProgress, Button, ListItem, ListItemText, ListItemSecondaryAction, Dialog, DialogTitle, LinearProgress, DialogContent, InputAdornment, DialogActions } from '@mui/material';
10
+ import { Switch, Grid2, List, Box, Typography, Backdrop, CircularProgress, Button, ListItem, ListItemText, Dialog, DialogTitle, LinearProgress, DialogContent, InputAdornment, DialogActions } from '@mui/material';
11
11
  import i18n from 'i18next';
12
12
  import { useTranslation } from 'react-i18next';
13
13
  import { FixedSizeList } from 'react-window';
14
14
  import { getDimensionsList, LayerInfoButton } from '@opengeoweb/webmap-react';
15
15
  import { webmapUtils, LayerType, getCapabilities, WMGetServiceFromStore, clearImageCacheForAllMaps } from '@opengeoweb/webmap';
16
- import { snackbarActions } from '@opengeoweb/snackbar';
16
+ import { snackbarTypes, snackbarActions } from '@opengeoweb/snackbar';
17
17
  import { ReactHookFormProvider, defaultFormOptions, ReactHookFormTextField } from '@opengeoweb/form-fields';
18
18
  import { useFormContext } from 'react-hook-form';
19
19
 
@@ -87,7 +87,7 @@ var fi = {
87
87
  "service-url-label": "Tämä palvelu viittaa tähän URL-osoitteeseen",
88
88
  "service-name-label": "Palvelun nimi",
89
89
  "service-abstracts-label": "Tiivistelmä",
90
- "service-successfully-updated": "Palvelu \"{{serviceName}}\" päivitetty onnistuunnesti",
90
+ "service-successfully-updated": "Palvelu \"{{serviceName}}\" päivitetty onnistuneesti",
91
91
  "unable-to-update-service": "Palvelun päivitys epäonnistui. Syy: \"{{message}}\"",
92
92
  "service-has-been-deleted": "Palvelu \"{{serviceName}}\" poistettu"
93
93
  };
@@ -1590,22 +1590,22 @@ $$5({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }
1590
1590
  }
1591
1591
  });
1592
1592
 
1593
- /* *
1594
- * Licensed under the Apache License, Version 2.0 (the "License");
1595
- * you may not use this file except in compliance with the License.
1596
- * You may obtain a copy of the License at
1597
- *
1598
- * http://www.apache.org/licenses/LICENSE-2.0
1599
- *
1600
- * Unless required by applicable law or agreed to in writing, software
1601
- * distributed under the License is distributed on an "AS IS" BASIS,
1602
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1603
- * See the License for the specific language governing permissions and
1604
- * limitations under the License.
1605
- *
1606
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1607
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
1608
- * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
1593
+ /* *
1594
+ * Licensed under the Apache License, Version 2.0 (the "License");
1595
+ * you may not use this file except in compliance with the License.
1596
+ * You may obtain a copy of the License at
1597
+ *
1598
+ * http://www.apache.org/licenses/LICENSE-2.0
1599
+ *
1600
+ * Unless required by applicable law or agreed to in writing, software
1601
+ * distributed under the License is distributed on an "AS IS" BASIS,
1602
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1603
+ * See the License for the specific language governing permissions and
1604
+ * limitations under the License.
1605
+ *
1606
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1607
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
1608
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
1609
1609
  * */
1610
1610
  const getFilterId = (filterType, filterName) => `${filterType}-${filterName}`;
1611
1611
  const produceFilters = (filterNames, filterType, draft, layerSelectFilterAdapter) => {
@@ -2616,23 +2616,23 @@ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
2616
2616
 
2617
2617
  const useAppSelector = useSelector;
2618
2618
  const layerSelectStore = store => store && store.layerSelect ? store.layerSelect : null;
2619
- /**
2620
- * Returns search filter string
2621
- *
2622
- * Example getSearchFilter(store);
2623
- * @param {object} store store: object - store object
2624
- * @returns {array} returnType: string
2619
+ /**
2620
+ * Returns search filter string
2621
+ *
2622
+ * Example getSearchFilter(store);
2623
+ * @param {object} store store: object - store object
2624
+ * @returns {array} returnType: string
2625
2625
  */
2626
2626
  const getSearchFilter = createSelector(layerSelectStore, store => {
2627
2627
  var _a;
2628
2628
  return ((_a = store === null || store === void 0 ? void 0 : store.filters) === null || _a === void 0 ? void 0 : _a.searchFilter) || '';
2629
2629
  });
2630
- /**
2631
- * Returns active services array
2632
- *
2633
- * Example getActiveServices(store);
2634
- * @param {object} store store: object - store object
2635
- * @returns {ActiveServiceObjectEntities} returnType: ActiveServiceObjectEntitiesobject of active services
2630
+ /**
2631
+ * Returns active services array
2632
+ *
2633
+ * Example getActiveServices(store);
2634
+ * @param {object} store store: object - store object
2635
+ * @returns {ActiveServiceObjectEntities} returnType: ActiveServiceObjectEntitiesobject of active services
2636
2636
  */
2637
2637
  // cast to usable type - selectEntities returns Dictionary<ActiveServiceObject> which is not usable inside of the code
2638
2638
  const getActiveServices = store => getActiveServicesDictionary(store);
@@ -2647,22 +2647,22 @@ const {
2647
2647
  ids: []
2648
2648
  };
2649
2649
  });
2650
- /**
2651
- * Returns all ids of enabled services
2652
- *
2653
- * Example getEnabledServiceIds(store);
2654
- * @param {object} store store: object - store object
2655
- * @returns {array} returnType: array of service ids that are enabled
2650
+ /**
2651
+ * Returns all ids of enabled services
2652
+ *
2653
+ * Example getEnabledServiceIds(store);
2654
+ * @param {object} store store: object - store object
2655
+ * @returns {array} returnType: array of service ids that are enabled
2656
2656
  */
2657
2657
  const getEnabledServiceIds = createSelector(getAllActiveServices, services => {
2658
2658
  return services.filter(service => service.enabled).map(service => service.serviceId);
2659
2659
  }, selectorMemoizationOptions);
2660
- /**
2661
- * Returns ids of all keywords
2662
- *
2663
- * Example getAllKeywordIds(store);
2664
- * @param {object} store store: object - store object
2665
- * @returns {array} returnType: array of all keyword ids
2660
+ /**
2661
+ * Returns ids of all keywords
2662
+ *
2663
+ * Example getAllKeywordIds(store);
2664
+ * @param {object} store store: object - store object
2665
+ * @returns {array} returnType: array of all keyword ids
2666
2666
  */
2667
2667
  // cast to usable type - selectIds returns EntityId[] which is not usable inside of the code
2668
2668
  const getAllFilterIds = store => getAllFilterIdsEntity(store);
@@ -2677,12 +2677,12 @@ const {
2677
2677
  ids: []
2678
2678
  };
2679
2679
  });
2680
- /**
2681
- * Returns all ids of checked keywords
2682
- *
2683
- * Example getCheckedKeywordIds(store);
2684
- * @param {object} store store: object - store object
2685
- * @returns {array} returnType: array of keyword ids that are checked
2680
+ /**
2681
+ * Returns all ids of checked keywords
2682
+ *
2683
+ * Example getCheckedKeywordIds(store);
2684
+ * @param {object} store store: object - store object
2685
+ * @returns {array} returnType: array of keyword ids that are checked
2686
2686
  */
2687
2687
  const getCheckedFilterIds = createSelector(getAllFilters, filters => {
2688
2688
  return filters.filter(filter => filter === null || filter === void 0 ? void 0 : filter.checked).map(filter => filter.id);
@@ -2712,12 +2712,12 @@ const getFilters = createSelector(getAllActiveServices, getAllFilters, (services
2712
2712
  keywords: keywordsSorted
2713
2713
  };
2714
2714
  });
2715
- /**
2716
- * Returns if all keywords are checked
2717
- *
2718
- * Example isAllKeywordsChecked(store);
2719
- * @param {object} store store: object - store object
2720
- * @returns {array} returnType: boolean if all keywords are checked
2715
+ /**
2716
+ * Returns if all keywords are checked
2717
+ *
2718
+ * Example isAllKeywordsChecked(store);
2719
+ * @param {object} store store: object - store object
2720
+ * @returns {array} returnType: boolean if all keywords are checked
2721
2721
  */
2722
2722
  const isAllFiltersChecked = createSelector(layerSelectStore, store => {
2723
2723
  var _a, _b;
@@ -2726,11 +2726,11 @@ const isAllFiltersChecked = createSelector(layerSelectStore, store => {
2726
2726
  return (_c = (_b = (_a = store === null || store === void 0 ? void 0 : store.filters) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.entities[filterId]) === null || _c === void 0 ? void 0 : _c.checked;
2727
2727
  });
2728
2728
  });
2729
- /**
2730
- * Returns a filtered active layer object based on the given filter settings
2731
- * Example: layerSelectSelectors.getFilteredLayers(store, filteredSettings);
2732
- * @param {object} store store: object - object from which the service state will be extracted
2733
- * @returns {array} returnType: LayerWithServiceName - an array of all filtered activelayers
2729
+ /**
2730
+ * Returns a filtered active layer object based on the given filter settings
2731
+ * Example: layerSelectSelectors.getFilteredLayers(store, filteredSettings);
2732
+ * @param {object} store store: object - object from which the service state will be extracted
2733
+ * @returns {array} returnType: LayerWithServiceName - an array of all filtered activelayers
2734
2734
  */
2735
2735
  const getFilteredLayers = createSelector([getEnabledServiceIds, serviceSelectors.getServices, getCheckedFilterIds, isAllFiltersChecked, getSearchFilter], (enabledServiceIds, servicesStore, checkedFilterIds, allFiltersActive, searchFilter) => {
2736
2736
  return enabledServiceIds.reduce((layerList, serviceId) => {
@@ -2739,12 +2739,12 @@ const getFilteredLayers = createSelector([getEnabledServiceIds, serviceSelectors
2739
2739
  })));
2740
2740
  }, []);
2741
2741
  }, selectorMemoizationOptions);
2742
- /**
2743
- * Returns service popup details
2744
- *
2745
- * Example getActiveServices(store, 'server-id');
2746
- * @param {object} store store: object - store object
2747
- * @returns {object} returnType: object of active service
2742
+ /**
2743
+ * Returns service popup details
2744
+ *
2745
+ * Example getActiveServices(store, 'server-id');
2746
+ * @param {object} store store: object - store object
2747
+ * @returns {object} returnType: object of active service
2748
2748
  */
2749
2749
  const getServicePopupDetails = store => {
2750
2750
  var _a;
@@ -2771,22 +2771,22 @@ var selectors = /*#__PURE__*/Object.freeze({
2771
2771
  useAppSelector: useAppSelector
2772
2772
  });
2773
2773
 
2774
- /* *
2775
- * Licensed under the Apache License, Version 2.0 (the "License");
2776
- * you may not use this file except in compliance with the License.
2777
- * You may obtain a copy of the License at
2778
- *
2779
- * http://www.apache.org/licenses/LICENSE-2.0
2780
- *
2781
- * Unless required by applicable law or agreed to in writing, software
2782
- * distributed under the License is distributed on an "AS IS" BASIS,
2783
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2784
- * See the License for the specific language governing permissions and
2785
- * limitations under the License.
2786
- *
2787
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2788
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
2789
- * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2774
+ /* *
2775
+ * Licensed under the Apache License, Version 2.0 (the "License");
2776
+ * you may not use this file except in compliance with the License.
2777
+ * You may obtain a copy of the License at
2778
+ *
2779
+ * http://www.apache.org/licenses/LICENSE-2.0
2780
+ *
2781
+ * Unless required by applicable law or agreed to in writing, software
2782
+ * distributed under the License is distributed on an "AS IS" BASIS,
2783
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2784
+ * See the License for the specific language governing permissions and
2785
+ * limitations under the License.
2786
+ *
2787
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
2788
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
2789
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2790
2790
  * */
2791
2791
 
2792
2792
  var types = /*#__PURE__*/Object.freeze({
@@ -3037,10 +3037,11 @@ const KeywordFilterResults = ({
3037
3037
  order: _order,
3038
3038
  source: _source
3039
3039
  }, {
3040
- children: [jsxs(Grid, Object.assign({
3040
+ children: [jsxs(Grid2, Object.assign({
3041
3041
  container: true,
3042
- item: true,
3043
- xs: 12,
3042
+ size: {
3043
+ xs: 12
3044
+ },
3044
3045
  justifyContent: "space-between",
3045
3046
  alignItems: "center",
3046
3047
  sx: {
@@ -3050,10 +3051,11 @@ const KeywordFilterResults = ({
3050
3051
  zIndex: 100
3051
3052
  }
3052
3053
  }, {
3053
- children: [jsx(Grid, Object.assign({
3054
+ children: [jsx(Grid2, Object.assign({
3054
3055
  container: true,
3055
- item: true,
3056
- xs: 6,
3056
+ size: {
3057
+ xs: 6
3058
+ },
3057
3059
  justifyContent: "flex-start",
3058
3060
  alignItems: "center",
3059
3061
  sx: {
@@ -3061,10 +3063,11 @@ const KeywordFilterResults = ({
3061
3063
  }
3062
3064
  }, {
3063
3065
  children: t('select-all')
3064
- })), jsx(Grid, Object.assign({
3066
+ })), jsx(Grid2, Object.assign({
3065
3067
  container: true,
3066
- item: true,
3067
- xs: 6,
3068
+ size: {
3069
+ xs: 6
3070
+ },
3068
3071
  justifyContent: "flex-end",
3069
3072
  alignContent: "center",
3070
3073
  sx: {
@@ -3184,22 +3187,22 @@ const LayerListDimensions = ({
3184
3187
  });
3185
3188
  };
3186
3189
 
3187
- /* *
3188
- * Licensed under the Apache License, Version 2.0 (the "License");
3189
- * you may not use this file except in compliance with the License.
3190
- * You may obtain a copy of the License at
3191
- *
3192
- * http://www.apache.org/licenses/LICENSE-2.0
3193
- *
3194
- * Unless required by applicable law or agreed to in writing, software
3195
- * distributed under the License is distributed on an "AS IS" BASIS,
3196
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3197
- * See the License for the specific language governing permissions and
3198
- * limitations under the License.
3199
- *
3200
- * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3201
- * Copyright 2022 - Finnish Meteorological Institute (FMI)
3202
- * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
3190
+ /* *
3191
+ * Licensed under the Apache License, Version 2.0 (the "License");
3192
+ * you may not use this file except in compliance with the License.
3193
+ * You may obtain a copy of the License at
3194
+ *
3195
+ * http://www.apache.org/licenses/LICENSE-2.0
3196
+ *
3197
+ * Unless required by applicable law or agreed to in writing, software
3198
+ * distributed under the License is distributed on an "AS IS" BASIS,
3199
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3200
+ * See the License for the specific language governing permissions and
3201
+ * limitations under the License.
3202
+ *
3203
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3204
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
3205
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
3203
3206
  * */
3204
3207
  const buttonLarge = 80;
3205
3208
  const buttonSmall = 60;
@@ -3319,7 +3322,7 @@ const LayerListRow = ({
3319
3322
  const rowHeight = widthToRowHeight(layerSelectWidth);
3320
3323
  const columns = widthToColumns(layerSelectWidth);
3321
3324
  const dimensions = getDimensionsList(layer.dimensions);
3322
- return jsxs(Grid, Object.assign({
3325
+ return jsxs(Grid2, Object.assign({
3323
3326
  "data-testid": "layerListLayerRow",
3324
3327
  container: true,
3325
3328
  justifyContent: "center",
@@ -3333,14 +3336,14 @@ const LayerListRow = ({
3333
3336
  borderColor: 'geowebColors.cards.cardContainerBorder'
3334
3337
  }
3335
3338
  }, {
3336
- children: [jsxs(Grid, Object.assign({
3339
+ children: [jsxs(Grid2, Object.assign({
3337
3340
  container: true,
3338
- item: true,
3339
3341
  sx: columns.column8
3340
3342
  }, {
3341
- children: [jsx(Grid, Object.assign({
3342
- item: true,
3343
- xs: 12
3343
+ children: [jsx(Grid2, Object.assign({
3344
+ size: {
3345
+ xs: 12
3346
+ }
3344
3347
  }, {
3345
3348
  children: jsx(Box, Object.assign({
3346
3349
  sx: {
@@ -3357,8 +3360,7 @@ const LayerListRow = ({
3357
3360
  search: searchFilter
3358
3361
  })
3359
3362
  }))
3360
- })), jsxs(Grid, Object.assign({
3361
- item: true,
3363
+ })), jsxs(Grid2, Object.assign({
3362
3364
  container: true,
3363
3365
  direction: "column",
3364
3366
  sx: columns.column1
@@ -3380,12 +3382,10 @@ const LayerListRow = ({
3380
3382
  isActive: _hasActiveLayer,
3381
3383
  onClick: onToggleActiveLayer
3382
3384
  })]
3383
- })), jsxs(Grid, Object.assign({
3384
- item: true,
3385
+ })), jsxs(Grid2, Object.assign({
3385
3386
  sx: columns.column2
3386
3387
  }, {
3387
- children: [jsx(Grid, Object.assign({
3388
- item: true,
3388
+ children: [jsx(Grid2, Object.assign({
3389
3389
  sx: columns.column3
3390
3390
  }, {
3391
3391
  children: layer.abstract && jsx(Typography, Object.assign({
@@ -3397,20 +3397,17 @@ const LayerListRow = ({
3397
3397
  search: searchFilter
3398
3398
  })
3399
3399
  }))
3400
- })), jsxs(Grid, Object.assign({
3401
- item: true,
3400
+ })), jsxs(Grid2, Object.assign({
3402
3401
  container: true,
3403
3402
  sx: columns.column4
3404
3403
  }, {
3405
- children: [jsx(Grid, Object.assign({
3406
- item: true,
3404
+ children: [jsx(Grid2, Object.assign({
3407
3405
  sx: columns.column5
3408
3406
  }, {
3409
3407
  children: jsx(LayerListDimensions, {
3410
3408
  dimensions: dimensions
3411
3409
  })
3412
- })), jsxs(Grid, Object.assign({
3413
- item: true,
3410
+ })), jsxs(Grid2, Object.assign({
3414
3411
  sx: columns.column6
3415
3412
  }, {
3416
3413
  children: [layer.path.length > 0 && jsxs(Typography, Object.assign({
@@ -3433,9 +3430,8 @@ const LayerListRow = ({
3433
3430
  }))]
3434
3431
  }))]
3435
3432
  }))]
3436
- })), jsx(Grid, Object.assign({
3433
+ })), jsx(Grid2, Object.assign({
3437
3434
  container: true,
3438
- item: true,
3439
3435
  sx: columns.column9,
3440
3436
  justifyContent: "flex-end",
3441
3437
  alignItems: "center"
@@ -3962,22 +3958,8 @@ const Rows = ({
3962
3958
  } = services[serviceId];
3963
3959
  const serviceHasActiveLayers = checkIfServiceHasActiveLayers(serviceUrl);
3964
3960
  const userAddedService = isUserAddedService(scope);
3965
- return jsxs(ListItem, {
3966
- children: [jsx(ListItemText, Object.assign({
3967
- style: {
3968
- fontSize: '16px'
3969
- }
3970
- }, {
3971
- children: jsx(Typography, Object.assign({
3972
- noWrap: true,
3973
- style: {
3974
- textOverflow: 'ellipsis',
3975
- paddingRight: '70px'
3976
- }
3977
- }, {
3978
- children: serviceName
3979
- }))
3980
- })), jsx(ListItemSecondaryAction, Object.assign({
3961
+ return jsx(ListItem, Object.assign({
3962
+ secondaryAction: jsx(Box, Object.assign({
3981
3963
  sx: {
3982
3964
  marginRight: '0px',
3983
3965
  width: 96,
@@ -3986,9 +3968,16 @@ const Rows = ({
3986
3968
  }
3987
3969
  }
3988
3970
  }, {
3989
- children: jsxs(Grid, Object.assign({
3971
+ children: jsxs(Grid2, Object.assign({
3990
3972
  container: true,
3991
- justifyContent: "left"
3973
+ justifyContent: "left",
3974
+ sx: {
3975
+ marginRight: '0px',
3976
+ width: 96,
3977
+ button: {
3978
+ marginLeft: 1
3979
+ }
3980
+ }
3992
3981
  }, {
3993
3982
  children: [jsx(CustomTooltip, Object.assign({
3994
3983
  "data-testid": "updateServiceTooltip",
@@ -4071,8 +4060,24 @@ const Rows = ({
4071
4060
  }))
4072
4061
  })]
4073
4062
  }))
4074
- }))]
4075
- }, serviceUrl);
4063
+ }))
4064
+ }, {
4065
+ children: jsx(ListItemText, Object.assign({
4066
+ style: {
4067
+ fontSize: '16px'
4068
+ }
4069
+ }, {
4070
+ children: jsx(Typography, Object.assign({
4071
+ noWrap: true,
4072
+ style: {
4073
+ textOverflow: 'ellipsis',
4074
+ paddingRight: '70px'
4075
+ }
4076
+ }, {
4077
+ children: serviceName
4078
+ }))
4079
+ }))
4080
+ }), serviceUrl);
4076
4081
  })
4077
4082
  }));
4078
4083
  };
@@ -4369,16 +4374,24 @@ const getService = (services, serviceUrl) => {
4369
4374
  }
4370
4375
  return services[serviceIds[serviceIndex]];
4371
4376
  };
4372
- const getServiceSuccesUpdateMessage = serviceName => translateKeyOutsideComponents('service-successfully-updated', {
4373
- serviceName
4377
+ const getServiceSuccesUpdateMessage = serviceName => ({
4378
+ type: snackbarTypes.SnackbarMessageType.TRANSLATABLE_MESSAGE,
4379
+ key: 'service-successfully-updated',
4380
+ params: {
4381
+ serviceName
4382
+ }
4374
4383
  });
4375
4384
  const getServiceFailedUpdateMessage = error => {
4376
4385
  const {
4377
4386
  message
4378
4387
  } = error;
4379
- return translateKeyOutsideComponents('unable-to-update-service', {
4380
- message
4381
- });
4388
+ return {
4389
+ type: snackbarTypes.SnackbarMessageType.TRANSLATABLE_MESSAGE,
4390
+ key: 'unable-to-update-service',
4391
+ params: {
4392
+ message
4393
+ }
4394
+ };
4382
4395
  };
4383
4396
  const ServiceOptionsDialogConnect = ({
4384
4397
  mapId
@@ -4394,16 +4407,18 @@ const ServiceOptionsDialogConnect = ({
4394
4407
  dispatch(layerSelectActions.toggleServicePopup(Object.assign({}, payload)));
4395
4408
  }, [dispatch]);
4396
4409
  const showSnackbar = React.useCallback(message => {
4397
- dispatch(snackbarActions.openSnackbar({
4398
- message
4399
- }));
4410
+ dispatch(snackbarActions.openSnackbar(message));
4400
4411
  }, [dispatch]);
4401
4412
  const services = useAppSelector(store => getActiveServices(store));
4402
4413
  const selectedLayers = useAppSelector(store => mapSelectors.getMapLayersWithoutDimensionCurrentValue(store, mapId));
4403
4414
  const layerSelectRemoveService = React.useCallback((serviceId, serviceUrl, serviceName) => {
4404
- const message = translateKeyOutsideComponents('service-has-been-deleted', {
4405
- serviceName
4406
- });
4415
+ const message = {
4416
+ type: snackbarTypes.SnackbarMessageType.TRANSLATABLE_MESSAGE,
4417
+ key: 'service-has-been-deleted',
4418
+ params: {
4419
+ serviceName
4420
+ }
4421
+ };
4407
4422
  showSnackbar(message);
4408
4423
  dispatch(layerSelectActions.layerSelectRemoveService({
4409
4424
  serviceId,
@@ -4581,7 +4596,7 @@ const style = {
4581
4596
  marginBottom: 2
4582
4597
  }
4583
4598
  };
4584
- const getSuccesMessage = serviceName => translateKeyOutsideComponents('get-success-message', {
4599
+ const getSuccesMessage = (serviceName, t) => t('get-success-message', {
4585
4600
  serviceName
4586
4601
  });
4587
4602
  const getTitleForVariant = variant => {
@@ -4684,7 +4699,7 @@ const ServicePopupUnwrapped = ({
4684
4699
  scope: 'user'
4685
4700
  });
4686
4701
  setIsLoading(false);
4687
- _showSnackbar(getSuccesMessage(formValues.serviceName));
4702
+ _showSnackbar(getSuccesMessage(formValues.serviceName, t));
4688
4703
  closePopup();
4689
4704
  } catch (error) {
4690
4705
  setIsLoading(false);
@@ -4825,7 +4840,7 @@ const ServicePopupUnwrapped = ({
4825
4840
  },
4826
4841
  disabled: isServiceUrlDisabled || isLoading,
4827
4842
  isReadOnly: isShowPopup,
4828
- InputProps: {
4843
+ inputSlotProps: {
4829
4844
  disableUnderline: isShowPopup,
4830
4845
  endAdornment: isShowPopup && jsx(InputAdornment, Object.assign({
4831
4846
  position: "end"
@@ -4856,7 +4871,7 @@ const ServicePopupUnwrapped = ({
4856
4871
  },
4857
4872
  disabled: isShowPopup || isLoading,
4858
4873
  isReadOnly: isShowPopup,
4859
- InputProps: {
4874
+ inputSlotProps: {
4860
4875
  disableUnderline: isShowPopup
4861
4876
  },
4862
4877
  sx: style.textField,
@@ -4868,7 +4883,7 @@ const ServicePopupUnwrapped = ({
4868
4883
  label: t('service-abstracts-label'),
4869
4884
  disabled: isShowPopup || isLoading,
4870
4885
  isReadOnly: isShowPopup,
4871
- InputProps: {
4886
+ inputSlotProps: {
4872
4887
  disableUnderline: isShowPopup
4873
4888
  },
4874
4889
  helperText: !isShowPopup ? t('service-popup-helper-text') : '',
@@ -4952,6 +4967,7 @@ const ServicePopupDialogConnect = ({
4952
4967
  }, [dispatch]);
4953
4968
  const showSnackbar = React__default.useCallback(message => {
4954
4969
  dispatch(snackbarActions.openSnackbar({
4970
+ type: snackbarTypes.SnackbarMessageType.VERBATIM_MESSAGE,
4955
4971
  message
4956
4972
  }));
4957
4973
  }, [dispatch]);
@@ -4992,12 +5008,12 @@ const ServicePopupConnect = () => {
4992
5008
  });
4993
5009
  };
4994
5010
 
4995
- /**
4996
- * LayerSelectConnect is a component that is opened from LayerManager
4997
- * It's used to add Services and Layers to the application
4998
- * It doesn't expect any props, its subcomponents only read and write to redux store
4999
- *
5000
- * ``` <LayerSelectConnect />```
5011
+ /**
5012
+ * LayerSelectConnect is a component that is opened from LayerManager
5013
+ * It's used to add Services and Layers to the application
5014
+ * It doesn't expect any props, its subcomponents only read and write to redux store
5015
+ *
5016
+ * ``` <LayerSelectConnect />```
5001
5017
  */
5002
5018
  const LayerSelectConnect = ({
5003
5019
  mapId: initialMapId = null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/layer-select",
3
- "version": "9.28.1",
3
+ "version": "9.29.1",
4
4
  "description": "GeoWeb layer select library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/src/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import layerSelectTranslations from '../locales/layer-select.json';
2
- export * from './lib';
3
- export { LAYER_SELECT_NAMESPACE } from './lib/utils/i18n';
4
- export { layerSelectTranslations };
1
+ import layerSelectTranslations from '../locales/layer-select.json';
2
+ export * from './lib';
3
+ export { LAYER_SELECT_NAMESPACE } from './lib/utils/i18n';
4
+ export { layerSelectTranslations };
@@ -1,9 +1,9 @@
1
- import * as React from 'react';
2
- import { uiTypes } from '@opengeoweb/store';
3
- interface KeywordFilterButtonConnectProps {
4
- mapId: string;
5
- source?: uiTypes.Source;
6
- isMultiMap?: boolean;
7
- }
8
- export declare const KeywordFilterButtonConnect: React.FC<KeywordFilterButtonConnectProps>;
9
- export {};
1
+ import * as React from 'react';
2
+ import { uiTypes } from '@opengeoweb/store';
3
+ interface KeywordFilterButtonConnectProps {
4
+ mapId: string;
5
+ source?: uiTypes.Source;
6
+ isMultiMap?: boolean;
7
+ }
8
+ export declare const KeywordFilterButtonConnect: React.FC<KeywordFilterButtonConnectProps>;
9
+ export {};
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1 +1 @@
1
- export * from './KeywordFilterButtonConnect';
1
+ export * from './KeywordFilterButtonConnect';