@opengeoweb/core 4.19.0 → 4.19.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 (22) hide show
  1. package/index.esm.js +257 -161
  2. package/index.umd.js +271 -174
  3. package/lib/components/LayerManager/LayerContainerRow/LayerContainerRow.d.ts +2 -0
  4. package/lib/components/LayerManager/LayerContainerRow/LayerRow/DeleteLayer/DeleteLayerConnect.d.ts +2 -0
  5. package/lib/components/LayerManager/LayerContainerRow/LayerRow/DragHandle/DragHandle.d.ts +3 -1
  6. package/lib/components/LayerManager/LayerContainerRow/LayerRow/EnableLayer/EnableLayerConnect.d.ts +2 -0
  7. package/lib/components/LayerManager/LayerContainerRow/LayerRow/LayerRowConnect.d.ts +2 -0
  8. package/lib/components/LayerManager/LayerContainerRow/LayerRow/Menubutton/MenuButton.d.ts +2 -0
  9. package/lib/components/LayerManager/LayerContainerRow/LayerRow/Menubutton/MenuButtonConnect.d.ts +2 -0
  10. package/lib/components/LayerManager/LayerContainerRow/LayerRow/OpacitySelect/OpacitySelect.d.ts +1 -0
  11. package/lib/components/LayerManager/LayerContainerRow/LayerRow/OpacitySelect/OpacitySelectConnect.d.ts +1 -0
  12. package/lib/components/LayerManager/LayerContainerRow/LayerRow/RenderLayers/RenderLayers.d.ts +1 -0
  13. package/lib/components/LayerManager/LayerContainerRow/LayerRow/RenderLayers/RenderLayersConnect.d.ts +1 -0
  14. package/lib/components/LayerManager/LayerContainerRow/LayerRow/RenderStyles/RenderStyles.d.ts +2 -0
  15. package/lib/components/LayerManager/LayerContainerRow/LayerRow/RenderStyles/RenderStylesConnect.d.ts +2 -0
  16. package/lib/components/LayerManager/LayerManagerUtils.d.ts +30 -0
  17. package/lib/index.d.ts +2 -2
  18. package/lib/store/generic/index.d.ts +2 -0
  19. package/lib/store/generic/synchronizationGroups/index.d.ts +1 -0
  20. package/lib/store/generic/synchronizationGroups/selectors.d.ts +1 -0
  21. package/lib/store/generic/synchronizationGroups/types.d.ts +5 -1
  22. package/package.json +6 -6
package/index.esm.js CHANGED
@@ -3451,7 +3451,7 @@ var getDimensionLayerIds = createSelector(getLayersIds, getLayersById, function
3451
3451
  }, []);
3452
3452
  }, selectorMemoizationOptions);
3453
3453
 
3454
- var selectors$3 = /*#__PURE__*/Object.freeze({
3454
+ var selectors$4 = /*#__PURE__*/Object.freeze({
3455
3455
  __proto__: null,
3456
3456
  getLayerById: getLayerById,
3457
3457
  getLayersById: getLayersById,
@@ -3619,7 +3619,7 @@ var getDialogFocused = createSelector(getDialogDetailsByType, function (details)
3619
3619
  return details && details.focused || false;
3620
3620
  });
3621
3621
 
3622
- var selectors$2 = /*#__PURE__*/Object.freeze({
3622
+ var selectors$3 = /*#__PURE__*/Object.freeze({
3623
3623
  __proto__: null,
3624
3624
  getUiStore: getUiStore,
3625
3625
  getDialogDetailsByType: getDialogDetailsByType,
@@ -4016,6 +4016,154 @@ var types$1 = /*#__PURE__*/Object.freeze({
4016
4016
  get SyncGroupActionOrigin () { return SyncGroupActionOrigin; }
4017
4017
  });
4018
4018
 
4019
+ /* *
4020
+ * Licensed under the Apache License, Version 2.0 (the "License");
4021
+ * you may not use this file except in compliance with the License.
4022
+ * You may obtain a copy of the License at
4023
+ *
4024
+ * http://www.apache.org/licenses/LICENSE-2.0
4025
+ *
4026
+ * Unless required by applicable law or agreed to in writing, software
4027
+ * distributed under the License is distributed on an "AS IS" BASIS,
4028
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4029
+ * See the License for the specific language governing permissions and
4030
+ * limitations under the License.
4031
+ *
4032
+ * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4033
+ * Copyright 2020 - Finnish Meteorological Institute (FMI)
4034
+ * */
4035
+ var syncGroupStore = function syncGroupStore(store) {
4036
+ return store.syncronizationGroupStore || null;
4037
+ };
4038
+ /**
4039
+ * Gets synchronization group state
4040
+ *
4041
+ * Example: synchronizationGroupState = getSynchronizationGroupState(store)
4042
+ * @param {object} store store: object - Store object
4043
+ * @returns {object} returnType: SynchronizationGroupState
4044
+ */
4045
+
4046
+ var getSynchronizationGroupState = createSelector(syncGroupStore, function (store) {
4047
+ return store || null;
4048
+ });
4049
+ var getSynchronizationGroup = function getSynchronizationGroup(state, id) {
4050
+ return syncGroupStore(state).groups.byId[id];
4051
+ };
4052
+ var getSynchronizationGroupSource = function getSynchronizationGroupSource(state, id) {
4053
+ return syncGroupStore(state).sources.byId[id];
4054
+ };
4055
+ var getTargets = function getTargets(state, payload, actionType) {
4056
+ var actionPayloads = [];
4057
+ var targetsInActionPayload = {};
4058
+ var syncronizationGroupStore = syncGroupStore(state);
4059
+ /* All the groups the source is member of */
4060
+
4061
+ if (syncronizationGroupStore && payload) {
4062
+ /* Backwards compatibility, if there are no groups, connect everything */
4063
+ if (syncronizationGroupStore.groups.allIds.length === 0) {
4064
+ syncronizationGroupStore.sources.allIds.forEach(function (targetId) {
4065
+ // Only add if should react to this action
4066
+ if (syncronizationGroupStore.sources.byId[targetId].types.includes(actionType)) {
4067
+ /* Remember that we have already added this target in the action payloads, prevents adding it twice */
4068
+ targetsInActionPayload[targetId] = true;
4069
+ /* Compose the payload */
4070
+
4071
+ var newPayload = Object.assign({
4072
+ targetId: targetId
4073
+ }, payload);
4074
+ actionPayloads.push(newPayload);
4075
+ }
4076
+ });
4077
+ }
4078
+
4079
+ syncronizationGroupStore.groups.allIds.forEach(function (id) {
4080
+ var syncronizationGroup = syncronizationGroupStore.groups.byId[id];
4081
+
4082
+ if (actionType === syncronizationGroup.type) {
4083
+ /* Check if the source is in the target list of the synchonizationGroup */
4084
+ var source = syncronizationGroup.targets.byId[payload.sourceId];
4085
+ /* If the source is part of the target list, and is linked, continue syncing the other targets */
4086
+
4087
+ if (source && source.linked) {
4088
+ syncronizationGroup.targets.allIds.forEach(function (targetId) {
4089
+ var target = syncronizationGroup.targets.byId[targetId];
4090
+
4091
+ if (target.linked && !targetsInActionPayload[targetId]) {
4092
+ /* Remember that we have already added this target in the action payloads, prevents adding it twice */
4093
+ targetsInActionPayload[targetId] = true;
4094
+ /* Compose the payload */
4095
+
4096
+ var newPayload = Object.assign({
4097
+ targetId: targetId
4098
+ }, payload);
4099
+ actionPayloads.push(newPayload);
4100
+ }
4101
+ });
4102
+ }
4103
+ }
4104
+ });
4105
+ }
4106
+
4107
+ return actionPayloads;
4108
+ };
4109
+ var getTargetGroups = function getTargetGroups(state, payload, actionType) {
4110
+ var syncronizationGroupStore = syncGroupStore(state);
4111
+ var groups = syncronizationGroupStore.groups.allIds.reduce(function (list, groupId) {
4112
+ var syncronizationGroup = syncronizationGroupStore.groups.byId[groupId];
4113
+
4114
+ if (actionType === syncronizationGroup.type) {
4115
+ /* Check if the source is in the target list of the synchronizationGroup */
4116
+ var source = syncronizationGroup.targets.byId[payload.sourceId];
4117
+ /* If the source is part of the target list, and is linked, continue syncin the other targets */
4118
+
4119
+ if (source && source.linked) {
4120
+ return list.concat(groupId);
4121
+ }
4122
+ }
4123
+
4124
+ return list;
4125
+ }, []);
4126
+ return groups;
4127
+ };
4128
+ var getAllTargetGroupsForSource = function getAllTargetGroupsForSource(state, sourceId) {
4129
+ var syncronizationGroupStore = syncGroupStore(state);
4130
+
4131
+ if (syncronizationGroupStore === null || syncronizationGroupStore === void 0 ? void 0 : syncronizationGroupStore.groups) {
4132
+ return syncronizationGroupStore.groups.allIds.reduce(function (linkedSyncGroupIds, groupId) {
4133
+ var syncronizationGroup = syncronizationGroupStore.groups.byId[groupId];
4134
+ var source = syncronizationGroup.targets.byId[sourceId];
4135
+ /* If the source is part of the target list, and is linked, continue syncin the other targets */
4136
+
4137
+ if (source && source.linked) {
4138
+ return linkedSyncGroupIds.concat(groupId);
4139
+ }
4140
+
4141
+ return linkedSyncGroupIds;
4142
+ }, []);
4143
+ }
4144
+
4145
+ return [];
4146
+ };
4147
+ var syncGroupGetViewState = createSelector(syncGroupStore, function (store) {
4148
+ return store.viewState;
4149
+ });
4150
+ var getSyncedMapIdsForTimeslider = createSelector(syncGroupStore, function (store) {
4151
+ return store.viewState.timeslider.groups[0].selected;
4152
+ }, selectorMemoizationOptions);
4153
+
4154
+ var selectors$2 = /*#__PURE__*/Object.freeze({
4155
+ __proto__: null,
4156
+ syncGroupStore: syncGroupStore,
4157
+ getSynchronizationGroupState: getSynchronizationGroupState,
4158
+ getSynchronizationGroup: getSynchronizationGroup,
4159
+ getSynchronizationGroupSource: getSynchronizationGroupSource,
4160
+ getTargets: getTargets,
4161
+ getTargetGroups: getTargetGroups,
4162
+ getAllTargetGroupsForSource: getAllTargetGroupsForSource,
4163
+ syncGroupGetViewState: syncGroupGetViewState,
4164
+ getSyncedMapIdsForTimeslider: getSyncedMapIdsForTimeslider
4165
+ });
4166
+
4019
4167
  /* *
4020
4168
  * Licensed under the Apache License, Version 2.0 (the "License");
4021
4169
  * you may not use this file except in compliance with the License.
@@ -4038,7 +4186,8 @@ var index = /*#__PURE__*/Object.freeze({
4038
4186
  actions: actions,
4039
4187
  constants: constants,
4040
4188
  types: types$1,
4041
- initialState: initialState$4
4189
+ initialState: initialState$4,
4190
+ syncGroupsSelectors: selectors$2
4042
4191
  });
4043
4192
 
4044
4193
  /* *
@@ -5609,119 +5758,6 @@ var slice = createSlice({
5609
5758
  var reducer = slice.reducer;
5610
5759
  var appActions = slice.actions;
5611
5760
 
5612
- /* *
5613
- * Licensed under the Apache License, Version 2.0 (the "License");
5614
- * you may not use this file except in compliance with the License.
5615
- * You may obtain a copy of the License at
5616
- *
5617
- * http://www.apache.org/licenses/LICENSE-2.0
5618
- *
5619
- * Unless required by applicable law or agreed to in writing, software
5620
- * distributed under the License is distributed on an "AS IS" BASIS,
5621
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5622
- * See the License for the specific language governing permissions and
5623
- * limitations under the License.
5624
- *
5625
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
5626
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
5627
- * */
5628
- var syncGroupStore = function syncGroupStore(store) {
5629
- return store.syncronizationGroupStore || null;
5630
- };
5631
- /**
5632
- * Gets synchronization group state
5633
- *
5634
- * Example: synchronizationGroupState = getSynchronizationGroupState(store)
5635
- * @param {object} store store: object - Store object
5636
- * @returns {object} returnType: SynchronizationGroupState
5637
- */
5638
-
5639
- var getSynchronizationGroupState = createSelector(syncGroupStore, function (store) {
5640
- return store || null;
5641
- });
5642
- var getSynchronizationGroup = function getSynchronizationGroup(state, id) {
5643
- return syncGroupStore(state).groups.byId[id];
5644
- };
5645
- var getTargets = function getTargets(state, payload, actionType) {
5646
- var actionPayloads = [];
5647
- var targetsInActionPayload = {};
5648
- var syncronizationGroupStore = syncGroupStore(state);
5649
- /* All the groups the source is member of */
5650
-
5651
- if (syncronizationGroupStore && payload) {
5652
- /* Backwards compatibility, if there are no groups, connect everything */
5653
- if (syncronizationGroupStore.groups.allIds.length === 0) {
5654
- syncronizationGroupStore.sources.allIds.forEach(function (targetId) {
5655
- // Only add if should react to this action
5656
- if (syncronizationGroupStore.sources.byId[targetId].types.includes(actionType)) {
5657
- /* Remember that we have already added this target in the action payloads, prevents adding it twice */
5658
- targetsInActionPayload[targetId] = true;
5659
- /* Compose the payload */
5660
-
5661
- var newPayload = Object.assign({
5662
- targetId: targetId
5663
- }, payload);
5664
- actionPayloads.push(newPayload);
5665
- }
5666
- });
5667
- }
5668
-
5669
- syncronizationGroupStore.groups.allIds.forEach(function (id) {
5670
- var syncronizationGroup = syncronizationGroupStore.groups.byId[id];
5671
-
5672
- if (actionType === syncronizationGroup.type) {
5673
- /* Check if the source is in the target list of the synchonizationGroup */
5674
- var source = syncronizationGroup.targets.byId[payload.sourceId];
5675
- /* If the source is part of the target list, and is linked, continue syncing the other targets */
5676
-
5677
- if (source && source.linked) {
5678
- syncronizationGroup.targets.allIds.forEach(function (targetId) {
5679
- var target = syncronizationGroup.targets.byId[targetId];
5680
-
5681
- if (target.linked && !targetsInActionPayload[targetId]) {
5682
- /* Remember that we have already added this target in the action payloads, prevents adding it twice */
5683
- targetsInActionPayload[targetId] = true;
5684
- /* Compose the payload */
5685
-
5686
- var newPayload = Object.assign({
5687
- targetId: targetId
5688
- }, payload);
5689
- actionPayloads.push(newPayload);
5690
- }
5691
- });
5692
- }
5693
- }
5694
- });
5695
- }
5696
-
5697
- return actionPayloads;
5698
- };
5699
- var getTargetGroups = function getTargetGroups(state, payload, actionType) {
5700
- var syncronizationGroupStore = syncGroupStore(state);
5701
- var groups = syncronizationGroupStore.groups.allIds.reduce(function (list, groupId) {
5702
- var syncronizationGroup = syncronizationGroupStore.groups.byId[groupId];
5703
-
5704
- if (actionType === syncronizationGroup.type) {
5705
- /* Check if the source is in the target list of the synchronizationGroup */
5706
- var source = syncronizationGroup.targets.byId[payload.sourceId];
5707
- /* If the source is part of the target list, and it linked, continue syncin the other targets */
5708
-
5709
- if (source && source.linked) {
5710
- return list.concat(groupId);
5711
- }
5712
- }
5713
-
5714
- return list;
5715
- }, []);
5716
- return groups;
5717
- };
5718
- var syncGroupGetViewState = createSelector(syncGroupStore, function (store) {
5719
- return store.viewState;
5720
- });
5721
- var getSyncedMapIdsForTimeslider = createSelector(syncGroupStore, function (store) {
5722
- return store.viewState.timeslider.groups[0].selected;
5723
- }, selectorMemoizationOptions);
5724
-
5725
5761
  /* *
5726
5762
  * Licensed under the Apache License, Version 2.0 (the "License");
5727
5763
  * you may not use this file except in compliance with the License.
@@ -10523,7 +10559,9 @@ var RenderLayers = function RenderLayers(_ref) {
10523
10559
  _ref$layers = _ref.layers,
10524
10560
  layers = _ref$layers === void 0 ? [] : _ref$layers,
10525
10561
  _ref$isEnabled = _ref.isEnabled,
10526
- isEnabled = _ref$isEnabled === void 0 ? true : _ref$isEnabled;
10562
+ isEnabled = _ref$isEnabled === void 0 ? true : _ref$isEnabled,
10563
+ _ref$tooltipPrefix = _ref.tooltipPrefix,
10564
+ tooltipPrefix = _ref$tooltipPrefix === void 0 ? 'Layer: ' : _ref$tooltipPrefix;
10527
10565
 
10528
10566
  var _a;
10529
10567
 
@@ -10564,7 +10602,7 @@ var RenderLayers = function RenderLayers(_ref) {
10564
10602
  });
10565
10603
  return /*#__PURE__*/React.createElement(TooltipSelect, {
10566
10604
  disableUnderline: true,
10567
- tooltip: "Layer: ".concat((_a = extendedLayers[currentIndex]) === null || _a === void 0 ? void 0 : _a.title),
10605
+ tooltip: "".concat(tooltipPrefix).concat((_a = extendedLayers[currentIndex]) === null || _a === void 0 ? void 0 : _a.title),
10568
10606
  inputProps: {
10569
10607
  SelectDisplayProps: {
10570
10608
  'data-testid': 'selectLayer'
@@ -10633,7 +10671,9 @@ var OpacitySelect = function OpacitySelect(_ref) {
10633
10671
  var currentOpacity = _ref.currentOpacity,
10634
10672
  onLayerChangeOpacity = _ref.onLayerChangeOpacity,
10635
10673
  _ref$isEnabled = _ref.isEnabled,
10636
- isEnabled = _ref$isEnabled === void 0 ? true : _ref$isEnabled;
10674
+ isEnabled = _ref$isEnabled === void 0 ? true : _ref$isEnabled,
10675
+ _ref$tooltipPrefix = _ref.tooltipPrefix,
10676
+ tooltipPrefix = _ref$tooltipPrefix === void 0 ? 'Opacity: ' : _ref$tooltipPrefix;
10637
10677
 
10638
10678
  var _useControlledTooltip = useControlledTooltip(),
10639
10679
  _useControlledTooltip2 = _slicedToArray(_useControlledTooltip, 2),
@@ -10698,7 +10738,7 @@ var OpacitySelect = function OpacitySelect(_ref) {
10698
10738
  height: 32
10699
10739
  }
10700
10740
  }, /*#__PURE__*/React.createElement(CustomTooltip, {
10701
- title: "Opacity: ".concat(currentOpacityText),
10741
+ title: "".concat(tooltipPrefix).concat(currentOpacityText),
10702
10742
  sx: tooltipContainerStyles(isEnabled),
10703
10743
  placement: "top",
10704
10744
  open: tooltipOpen
@@ -10781,7 +10821,10 @@ var OpacitySelect = function OpacitySelect(_ref) {
10781
10821
  var LayerManagerMenuButton = function LayerManagerMenuButton(_ref) {
10782
10822
  var mapId = _ref.mapId,
10783
10823
  layerId = _ref.layerId,
10784
- onLayerDuplicate = _ref.onLayerDuplicate;
10824
+ onLayerDuplicate = _ref.onLayerDuplicate,
10825
+ _ref$tooltipTitle = _ref.tooltipTitle,
10826
+ tooltipTitle = _ref$tooltipTitle === void 0 ? 'Options' : _ref$tooltipTitle,
10827
+ icon = _ref.icon;
10785
10828
 
10786
10829
  var onClickDuplicate = function onClickDuplicate() {
10787
10830
  onLayerDuplicate({
@@ -10805,7 +10848,8 @@ var LayerManagerMenuButton = function LayerManagerMenuButton(_ref) {
10805
10848
  action: onClickDuplicate,
10806
10849
  icon: /*#__PURE__*/React.createElement(Copy, null)
10807
10850
  }],
10808
- tooltipTitle: "Options"
10851
+ tooltipTitle: tooltipTitle,
10852
+ buttonIcon: icon
10809
10853
  });
10810
10854
  };
10811
10855
 
@@ -10814,7 +10858,10 @@ var RenderStyles = function RenderStyles(_ref) {
10814
10858
  currentLayerStyle = _ref.currentLayerStyle,
10815
10859
  onChangeLayerStyle = _ref.onChangeLayerStyle,
10816
10860
  _ref$isEnabled = _ref.isEnabled,
10817
- isEnabled = _ref$isEnabled === void 0 ? true : _ref$isEnabled;
10861
+ isEnabled = _ref$isEnabled === void 0 ? true : _ref$isEnabled,
10862
+ icon = _ref.icon,
10863
+ _ref$tooltipPrefix = _ref.tooltipPrefix,
10864
+ tooltipPrefix = _ref$tooltipPrefix === void 0 ? 'Style: ' : _ref$tooltipPrefix;
10818
10865
 
10819
10866
  var _a;
10820
10867
 
@@ -10845,7 +10892,7 @@ var RenderStyles = function RenderStyles(_ref) {
10845
10892
  return currentStyle === style.name;
10846
10893
  });
10847
10894
  return /*#__PURE__*/React.createElement(TooltipSelect, {
10848
- tooltip: "Style: ".concat((_a = styles[currentIndex]) === null || _a === void 0 ? void 0 : _a.title),
10895
+ tooltip: "".concat(tooltipPrefix).concat((_a = styles[currentIndex]) === null || _a === void 0 ? void 0 : _a.title),
10849
10896
  inputProps: {
10850
10897
  SelectDisplayProps: {
10851
10898
  'data-testid': 'selectStyle'
@@ -10859,7 +10906,8 @@ var RenderStyles = function RenderStyles(_ref) {
10859
10906
  onChangeMouseWheel: function onChangeMouseWheel(e) {
10860
10907
  return onChangeLayerStyle(e.value);
10861
10908
  },
10862
- requiresCtrlToChange: true
10909
+ requiresCtrlToChange: true,
10910
+ IconComponent: icon
10863
10911
  }, /*#__PURE__*/React.createElement(MenuItem, {
10864
10912
  disabled: true
10865
10913
  }, "Style"), styles.map(function (styleFromlayer) {
@@ -11312,7 +11360,11 @@ var LayerRow = function LayerRow(_ref) {
11312
11360
  var DeleteLayerConnect = function DeleteLayerConnect(_ref) {
11313
11361
  var layerId = _ref.layerId,
11314
11362
  mapId = _ref.mapId,
11315
- layerIndex = _ref.layerIndex;
11363
+ layerIndex = _ref.layerIndex,
11364
+ _ref$tooltipTitle = _ref.tooltipTitle,
11365
+ tooltipTitle = _ref$tooltipTitle === void 0 ? 'Delete' : _ref$tooltipTitle,
11366
+ _ref$icon = _ref.icon,
11367
+ icon = _ref$icon === void 0 ? /*#__PURE__*/React.createElement(Delete, null) : _ref$icon;
11316
11368
  var dispatch = useDispatch();
11317
11369
  var layerDelete = React.useCallback(function (_ref2) {
11318
11370
  var mapId = _ref2.mapId,
@@ -11329,7 +11381,7 @@ var DeleteLayerConnect = function DeleteLayerConnect(_ref) {
11329
11381
  return getLayerEnabled(store, layerId);
11330
11382
  });
11331
11383
  return /*#__PURE__*/React.createElement(CustomIconButton, {
11332
- tooltipTitle: "Delete",
11384
+ tooltipTitle: tooltipTitle,
11333
11385
  onClick: function onClick() {
11334
11386
  layerDelete({
11335
11387
  mapId: mapId,
@@ -11339,7 +11391,7 @@ var DeleteLayerConnect = function DeleteLayerConnect(_ref) {
11339
11391
  },
11340
11392
  shouldShowAsDisabled: !isLayerEnabled,
11341
11393
  "data-testid": "deleteButton"
11342
- }, /*#__PURE__*/React.createElement(Delete, null));
11394
+ }, icon);
11343
11395
  };
11344
11396
 
11345
11397
  /* *
@@ -11365,7 +11417,10 @@ var EnableLayerConnect = function EnableLayerConnect(_ref) {
11365
11417
  _ref$isEnabled = _ref.isEnabled,
11366
11418
  isEnabled = _ref$isEnabled === void 0 ? false : _ref$isEnabled,
11367
11419
  _ref$layerName = _ref.layerName,
11368
- layerName = _ref$layerName === void 0 ? '' : _ref$layerName;
11420
+ layerName = _ref$layerName === void 0 ? '' : _ref$layerName,
11421
+ _ref$icon = _ref.icon,
11422
+ icon = _ref$icon === void 0 ? isEnabled ? /*#__PURE__*/React.createElement(Visibility, null) : /*#__PURE__*/React.createElement(VisibilityOff, null) : _ref$icon,
11423
+ tooltipTitle = _ref.tooltipTitle;
11369
11424
  var dispatch = useDispatch();
11370
11425
  var layerChangeEnabled = React.useCallback(function (_ref2) {
11371
11426
  var layerId = _ref2.layerId,
@@ -11377,9 +11432,11 @@ var EnableLayerConnect = function EnableLayerConnect(_ref) {
11377
11432
  origin: LayerActionOrigin.layerManager
11378
11433
  }));
11379
11434
  }, [dispatch, mapId]);
11435
+ var normalTooltip = tooltipTitle !== null && tooltipTitle !== void 0 ? tooltipTitle : 'Toggle visibility';
11436
+ var miniTooltip = tooltipTitle !== null && tooltipTitle !== void 0 ? tooltipTitle : layerName;
11380
11437
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CustomIconButton, {
11381
11438
  shouldShowAsDisabled: !isEnabled,
11382
- tooltipTitle: "Toggle visibility",
11439
+ tooltipTitle: normalTooltip,
11383
11440
  onClick: function onClick(event) {
11384
11441
  event.stopPropagation();
11385
11442
  layerChangeEnabled({
@@ -11392,9 +11449,9 @@ var EnableLayerConnect = function EnableLayerConnect(_ref) {
11392
11449
  sx: {
11393
11450
  margin: 'auto 0px'
11394
11451
  }
11395
- }, isEnabled ? /*#__PURE__*/React.createElement(Visibility, null) : /*#__PURE__*/React.createElement(VisibilityOff, null)), /*#__PURE__*/React.createElement(CustomIconButton, {
11452
+ }, icon), /*#__PURE__*/React.createElement(CustomIconButton, {
11396
11453
  shouldShowAsDisabled: !isEnabled,
11397
- tooltipTitle: layerName,
11454
+ tooltipTitle: miniTooltip,
11398
11455
  onClick: function onClick(event) {
11399
11456
  event.stopPropagation();
11400
11457
  layerChangeEnabled({
@@ -11407,7 +11464,7 @@ var EnableLayerConnect = function EnableLayerConnect(_ref) {
11407
11464
  sx: {
11408
11465
  margin: 'auto 0px'
11409
11466
  }
11410
- }, isEnabled ? /*#__PURE__*/React.createElement(Visibility, null) : /*#__PURE__*/React.createElement(VisibilityOff, null)));
11467
+ }, icon));
11411
11468
  };
11412
11469
 
11413
11470
  /* *
@@ -11429,7 +11486,8 @@ var EnableLayerConnect = function EnableLayerConnect(_ref) {
11429
11486
 
11430
11487
  var OpacitySelectConnect = function OpacitySelectConnect(_ref) {
11431
11488
  var layerId = _ref.layerId,
11432
- mapId = _ref.mapId;
11489
+ mapId = _ref.mapId,
11490
+ tooltipPrefix = _ref.tooltipPrefix;
11433
11491
  var dispatch = useDispatch();
11434
11492
  var opacity = useSelector(function (store) {
11435
11493
  return getLayerOpacity(store, layerId);
@@ -11447,7 +11505,8 @@ var OpacitySelectConnect = function OpacitySelectConnect(_ref) {
11447
11505
  origin: LayerActionOrigin.layerManager
11448
11506
  }));
11449
11507
  },
11450
- isEnabled: isLayerEnabled
11508
+ isEnabled: isLayerEnabled,
11509
+ tooltipPrefix: tooltipPrefix
11451
11510
  });
11452
11511
  };
11453
11512
 
@@ -11524,7 +11583,9 @@ var DimensionSelectConnect = function DimensionSelectConnect(_ref) {
11524
11583
 
11525
11584
  var RenderStylesConnect = function RenderStylesConnect(_ref) {
11526
11585
  var layerId = _ref.layerId,
11527
- mapId = _ref.mapId;
11586
+ mapId = _ref.mapId,
11587
+ icon = _ref.icon,
11588
+ tooltipPrefix = _ref.tooltipPrefix;
11528
11589
  var dispatch = useDispatch();
11529
11590
  var layerService = useSelector(function (store) {
11530
11591
  return getLayerService(store, layerId);
@@ -11553,7 +11614,9 @@ var RenderStylesConnect = function RenderStylesConnect(_ref) {
11553
11614
  layerStyles: layerStyles,
11554
11615
  currentLayerStyle: currentLayerStyle,
11555
11616
  onChangeLayerStyle: layerChangeStyle,
11556
- isEnabled: isLayerEnabled
11617
+ isEnabled: isLayerEnabled,
11618
+ icon: icon,
11619
+ tooltipPrefix: tooltipPrefix
11557
11620
  });
11558
11621
  };
11559
11622
 
@@ -11576,7 +11639,8 @@ var RenderStylesConnect = function RenderStylesConnect(_ref) {
11576
11639
 
11577
11640
  var RenderLayersConnect = function RenderLayersConnect(_ref) {
11578
11641
  var layerId = _ref.layerId,
11579
- mapId = _ref.mapId;
11642
+ mapId = _ref.mapId,
11643
+ tooltipPrefix = _ref.tooltipPrefix;
11580
11644
  var dispatch = useDispatch();
11581
11645
  var layerName = useSelector(function (store) {
11582
11646
  return getLayerName(store, layerId);
@@ -11660,7 +11724,8 @@ var RenderLayersConnect = function RenderLayersConnect(_ref) {
11660
11724
  name: name
11661
11725
  });
11662
11726
  },
11663
- isEnabled: isLayerEnabled
11727
+ isEnabled: isLayerEnabled,
11728
+ tooltipPrefix: tooltipPrefix
11664
11729
  });
11665
11730
  };
11666
11731
 
@@ -11683,7 +11748,9 @@ var RenderLayersConnect = function RenderLayersConnect(_ref) {
11683
11748
 
11684
11749
  var LayerManagerMenuButtonConnect = function LayerManagerMenuButtonConnect(_ref) {
11685
11750
  var layerId = _ref.layerId,
11686
- mapId = _ref.mapId;
11751
+ mapId = _ref.mapId,
11752
+ tooltipTitle = _ref.tooltipTitle,
11753
+ icon = _ref.icon;
11687
11754
  var dispatch = useDispatch();
11688
11755
  var layer = useSelector(function (store) {
11689
11756
  return getLayerById(store, layerId);
@@ -11708,7 +11775,9 @@ var LayerManagerMenuButtonConnect = function LayerManagerMenuButtonConnect(_ref)
11708
11775
  mapId: mapId,
11709
11776
  layer: layer
11710
11777
  });
11711
- }
11778
+ },
11779
+ tooltipTitle: tooltipTitle,
11780
+ icon: icon
11712
11781
  });
11713
11782
  };
11714
11783
 
@@ -11875,9 +11944,10 @@ var LayerRowConnect = function LayerRowConnect(_ref) {
11875
11944
  var layerId = _ref.layerId,
11876
11945
  mapId = _ref.mapId,
11877
11946
  dragHandle = _ref.dragHandle,
11878
- layerIndex = _ref.layerIndex;
11947
+ layerIndex = _ref.layerIndex,
11948
+ settings = _ref.settings;
11879
11949
 
11880
- var _a;
11950
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
11881
11951
 
11882
11952
  var isEnabled = useSelector(function (store) {
11883
11953
  return getLayerEnabled(store, layerId);
@@ -11907,15 +11977,19 @@ var LayerRowConnect = function LayerRowConnect(_ref) {
11907
11977
  layerId: layerId,
11908
11978
  mapId: mapId,
11909
11979
  isEnabled: isEnabled,
11910
- layerName: fullLayerName || layerName
11980
+ layerName: fullLayerName || layerName,
11981
+ icon: isEnabled ? (_b = settings === null || settings === void 0 ? void 0 : settings.enableLayer) === null || _b === void 0 ? void 0 : _b.enabledIcon : (_c = settings === null || settings === void 0 ? void 0 : settings.enableLayer) === null || _c === void 0 ? void 0 : _c.disabledIcon,
11982
+ tooltipTitle: isEnabled ? (_d = settings === null || settings === void 0 ? void 0 : settings.enableLayer) === null || _d === void 0 ? void 0 : _d.enabledTooltipTitle : (_e = settings === null || settings === void 0 ? void 0 : settings.enableLayer) === null || _e === void 0 ? void 0 : _e.disabledTooltipTitle
11911
11983
  }),
11912
11984
  layerOpacityLayout: /*#__PURE__*/React.createElement(OpacitySelectConnect, {
11913
11985
  layerId: layerId,
11914
- mapId: mapId
11986
+ mapId: mapId,
11987
+ tooltipPrefix: (_f = settings === null || settings === void 0 ? void 0 : settings.opacity) === null || _f === void 0 ? void 0 : _f.tooltipPrefix
11915
11988
  }),
11916
11989
  layerServicesLayout: /*#__PURE__*/React.createElement(RenderLayersConnect, {
11917
11990
  layerId: layerId,
11918
- mapId: mapId
11991
+ mapId: mapId,
11992
+ tooltipPrefix: (_g = settings === null || settings === void 0 ? void 0 : settings.renderLayer) === null || _g === void 0 ? void 0 : _g.tooltipPrefix
11919
11993
  }),
11920
11994
  layerDimensionLayout: /*#__PURE__*/React.createElement(DimensionSelectConnect, {
11921
11995
  layerId: layerId,
@@ -11923,16 +11997,22 @@ var LayerRowConnect = function LayerRowConnect(_ref) {
11923
11997
  }),
11924
11998
  layerStylesLayout: /*#__PURE__*/React.createElement(RenderStylesConnect, {
11925
11999
  layerId: layerId,
11926
- mapId: mapId
12000
+ mapId: mapId,
12001
+ tooltipPrefix: (_h = settings === null || settings === void 0 ? void 0 : settings.layerStyle) === null || _h === void 0 ? void 0 : _h.tooltipPrefix,
12002
+ icon: (_j = settings === null || settings === void 0 ? void 0 : settings.layerStyle) === null || _j === void 0 ? void 0 : _j.icon
11927
12003
  }),
11928
12004
  layerDeleteLayout: /*#__PURE__*/React.createElement(DeleteLayerConnect, {
11929
12005
  mapId: mapId,
11930
12006
  layerId: layerId,
11931
- layerIndex: layerIndex
12007
+ layerIndex: layerIndex,
12008
+ tooltipTitle: (_k = settings === null || settings === void 0 ? void 0 : settings.deleteLayer) === null || _k === void 0 ? void 0 : _k.tooltipTitle,
12009
+ icon: (_l = settings === null || settings === void 0 ? void 0 : settings.deleteLayer) === null || _l === void 0 ? void 0 : _l.icon
11932
12010
  }),
11933
12011
  layerMenuLayout: /*#__PURE__*/React.createElement(LayerManagerMenuButtonConnect, {
11934
12012
  mapId: mapId,
11935
- layerId: layerId
12013
+ layerId: layerId,
12014
+ tooltipTitle: (_m = settings === null || settings === void 0 ? void 0 : settings.menu) === null || _m === void 0 ? void 0 : _m.tooltipTitle,
12015
+ icon: (_o = settings === null || settings === void 0 ? void 0 : settings.menu) === null || _o === void 0 ? void 0 : _o.icon
11936
12016
  }),
11937
12017
  layerActiveLayout: /*#__PURE__*/React.createElement(ActivateLayerConnect, {
11938
12018
  mapId: mapId,
@@ -11968,10 +12048,16 @@ var DragHandle = function DragHandle(_ref) {
11968
12048
  _ref$hideTooltip = _ref.hideTooltip,
11969
12049
  hideTooltip = _ref$hideTooltip === void 0 ? true : _ref$hideTooltip,
11970
12050
  _ref$isSorting = _ref.isSorting,
11971
- isSorting = _ref$isSorting === void 0 ? false : _ref$isSorting;
11972
- var tooltipTitle = hideTooltip ? '' : TOOLTIP_TITLE;
12051
+ isSorting = _ref$isSorting === void 0 ? false : _ref$isSorting,
12052
+ _ref$icon = _ref.icon,
12053
+ icon = _ref$icon === void 0 ? /*#__PURE__*/React__default.createElement(DragHandle$1, {
12054
+ "data-testid": "dragHandleIcon"
12055
+ }) : _ref$icon,
12056
+ _ref$tooltipTitle = _ref.tooltipTitle,
12057
+ tooltipTitle = _ref$tooltipTitle === void 0 ? TOOLTIP_TITLE : _ref$tooltipTitle;
12058
+ var usedTooltipTitle = hideTooltip ? '' : tooltipTitle;
11973
12059
  return /*#__PURE__*/React__default.createElement(CustomIconButton, {
11974
- tooltipTitle: tooltipTitle,
12060
+ tooltipTitle: usedTooltipTitle,
11975
12061
  "data-testid": "dragHandle".concat(index !== undefined ? "-".concat(index) : ''),
11976
12062
  className: "handle",
11977
12063
  tabIndex: -1,
@@ -11990,11 +12076,12 @@ var DragHandle = function DragHandle(_ref) {
11990
12076
  color: 'geowebColors.greys.accessible'
11991
12077
  }
11992
12078
  }
11993
- }, /*#__PURE__*/React__default.createElement(DragHandle$1, null));
12079
+ }, icon);
11994
12080
  };
11995
12081
 
11996
12082
  var LayerContainerRow = function LayerContainerRow(_ref) {
11997
- var mapId = _ref.mapId;
12083
+ var mapId = _ref.mapId,
12084
+ settings = _ref.settings;
11998
12085
  var dispatch = useDispatch();
11999
12086
 
12000
12087
  var _React$useState = React.useState(false),
@@ -12118,6 +12205,8 @@ var LayerContainerRow = function LayerContainerRow(_ref) {
12118
12205
  width: '100%'
12119
12206
  }
12120
12207
  }, layerIds.map(function (layerId, index) {
12208
+ var _a, _b;
12209
+
12121
12210
  return /*#__PURE__*/React.createElement(LayerRowConnect, {
12122
12211
  mapId: mapId,
12123
12212
  layerId: layerId,
@@ -12127,8 +12216,11 @@ var LayerContainerRow = function LayerContainerRow(_ref) {
12127
12216
  isDisabled: isDragDisabled,
12128
12217
  index: index,
12129
12218
  hideTooltip: isSorting || isDragDisabled,
12130
- isSorting: isSorting
12131
- })
12219
+ isSorting: isSorting,
12220
+ icon: (_a = settings === null || settings === void 0 ? void 0 : settings.dragHandle) === null || _a === void 0 ? void 0 : _a.icon,
12221
+ tooltipTitle: (_b = settings === null || settings === void 0 ? void 0 : settings.dragHandle) === null || _b === void 0 ? void 0 : _b.tooltipTitle
12222
+ }),
12223
+ settings: settings
12132
12224
  });
12133
12225
  })));
12134
12226
  };
@@ -13262,7 +13354,8 @@ var LayerManager = function LayerManager(_ref) {
13262
13354
  source: source,
13263
13355
  settings: settings === null || settings === void 0 ? void 0 : settings.header
13264
13356
  }), /*#__PURE__*/React.createElement(LayerContainerRow, {
13265
- mapId: mapId
13357
+ mapId: mapId,
13358
+ settings: settings === null || settings === void 0 ? void 0 : settings.content
13266
13359
  }), /*#__PURE__*/React.createElement(BaseLayerRow, {
13267
13360
  mapId: mapId,
13268
13361
  tooltip: "Add base layers",
@@ -26989,7 +27082,8 @@ var SyncGroupViewer = function SyncGroupViewer(_ref) {
26989
27082
  if (isChecked) {
26990
27083
  syncGroupRemoveTarget({
26991
27084
  groupId: String(groupId),
26992
- targetId: String(sourceId)
27085
+ targetId: String(sourceId),
27086
+ origin: 'user'
26993
27087
  });
26994
27088
  } else {
26995
27089
  var groups = syncGroupViewState[groupCategory].groups; // Check all other groups and if checkmark is found -> uncheck it
@@ -27004,7 +27098,8 @@ var SyncGroupViewer = function SyncGroupViewer(_ref) {
27004
27098
  if (group.id !== groupId && group.selected.includes(sourceId)) {
27005
27099
  syncGroupRemoveTarget({
27006
27100
  groupId: String(group.id),
27007
- targetId: String(sourceId)
27101
+ targetId: String(sourceId),
27102
+ origin: 'user'
27008
27103
  });
27009
27104
  }
27010
27105
  } // Add new checkmark
@@ -27017,7 +27112,8 @@ var SyncGroupViewer = function SyncGroupViewer(_ref) {
27017
27112
 
27018
27113
  syncGroupAddTarget({
27019
27114
  groupId: String(groupId),
27020
- targetId: String(sourceId)
27115
+ targetId: String(sourceId),
27116
+ origin: 'user'
27021
27117
  });
27022
27118
  }
27023
27119
  };
@@ -27695,4 +27791,4 @@ var MapWarningProperties = function MapWarningProperties(_ref) {
27695
27791
  * */
27696
27792
  var mapActions = Object.assign(Object.assign(Object.assign({}, layerActions), mapActions$1), serviceActions);
27697
27793
 
27698
- export { AppWrapperConnect, ConfigurableMapConnect, CoreThemeProvider, CoreThemeStoreProvider, DockedLayerManagerConnect, HarmonieTempAndPrecipPreset, LayerManager, BaseLayerRow as LayerManagerBaseLayerRow, LayerManagerConnect, DescriptionRow as LayerManagerDescriptionRow, HeaderOptions as LayerManagerHeaderOptions, LayerContainerRow as LayerManagerLayerContainerRow, LayerManagerMapButtonConnect, LayerSelectConnect, Legend, LegendConnect, LegendMapButtonConnect, MapControls, MapView, MapViewConnect, MapViewLayer, MapWarningProperties, MultiDimensionSelectMapButtonsConnect, MultiMapMultiDimensionSelectConnect as MultiMapDimensionSelectConnect, MultiMapViewConnect, ReactMapView, ReactMapViewLayer, RouterWrapperConnect, SnackbarWrapperConnect, SyncGroupViewerConnect, index as SyncGroups, TimeSlider, BackwardForwardStepButtonConnect as TimeSliderBackwardForwardStepButtonConnect, TimeSliderButtonsConnect, TimeSliderConnect, OptionsMenuButtonConnect as TimeSliderOptionsMenuButtonConnect, PlayButtonConnect as TimeSliderPlayButtonConnect, ZoomControlConnect, ZoomControls, appActions, componentsLookUp, coreModuleConfig, dateFormat, defaultBbox, defaultConfigurations, filterLayers, filterMapPresets, filterNonTimeDimensions, filterServices, generateLayerId, generateMapId, generateTimesliderId, selectors$1 as genericSelectors, getDrawFunctionFromStore, getFirstTimeStepForLayerId, getInitialAppPresets, getLastTimeStepForLayerId, getNextTimeStepForLayerId, getPreviousTimeStepForLayerId, getWMJSDimensionForLayerAndDimension, getWMJSMapById, getWMJSTimeDimensionForLayerId, getWMLayerById, layerActions, reducer$8 as layerReducer, selectors$3 as layerSelectors, types$3 as layerTypes, mapActions, moduleConfig as mapModuleConfig, selectors as mapSelectors, types$2 as mapTypes, utils as mapUtils, parseBoolean, parseLayer, publicLayers, publicServices, registerDrawFunction, registerWMJSMap, registerWMLayer, routerActions, snackbarActions, store, genericActions as syncGroupActions, synchronizationGroupConfig as synchronizationGroupModuleConfig, synchronizationGroupConfig as synchronizationGroupsConfig, testLayers, timeSliderUtils, uiActions, uiModuleConfig, selectors$2 as uiSelectors, types as uiTypes, unRegisterWMJSLayer, unRegisterWMJSMap, useSetupDialog };
27794
+ export { AppWrapperConnect, ConfigurableMapConnect, CoreThemeProvider, CoreThemeStoreProvider, DockedLayerManagerConnect, HarmonieTempAndPrecipPreset, LayerManager, BaseLayerRow as LayerManagerBaseLayerRow, LayerManagerConnect, DescriptionRow as LayerManagerDescriptionRow, HeaderOptions as LayerManagerHeaderOptions, LayerContainerRow as LayerManagerLayerContainerRow, LayerManagerMapButtonConnect, LayerSelectConnect, Legend, LegendConnect, LegendMapButtonConnect, MapControls, MapView, MapViewConnect, MapViewLayer, MapWarningProperties, MultiDimensionSelectMapButtonsConnect, MultiMapMultiDimensionSelectConnect as MultiMapDimensionSelectConnect, MultiMapViewConnect, ReactMapView, ReactMapViewLayer, RouterWrapperConnect, SnackbarWrapperConnect, SyncGroupViewerConnect, index as SyncGroups, TimeSlider, BackwardForwardStepButtonConnect as TimeSliderBackwardForwardStepButtonConnect, TimeSliderButtonsConnect, TimeSliderConnect, OptionsMenuButtonConnect as TimeSliderOptionsMenuButtonConnect, PlayButtonConnect as TimeSliderPlayButtonConnect, ZoomControlConnect, ZoomControls, appActions, componentsLookUp, coreModuleConfig, dateFormat, defaultBbox, defaultConfigurations, filterLayers, filterMapPresets, filterNonTimeDimensions, filterServices, generateLayerId, generateMapId, generateTimesliderId, selectors$1 as genericSelectors, getDrawFunctionFromStore, getFirstTimeStepForLayerId, getInitialAppPresets, getLastTimeStepForLayerId, getNextTimeStepForLayerId, getPreviousTimeStepForLayerId, getWMJSDimensionForLayerAndDimension, getWMJSMapById, getWMJSTimeDimensionForLayerId, getWMLayerById, layerActions, reducer$8 as layerReducer, selectors$4 as layerSelectors, types$3 as layerTypes, mapActions, moduleConfig as mapModuleConfig, selectors as mapSelectors, types$2 as mapTypes, utils as mapUtils, parseBoolean, parseLayer, publicLayers, publicServices, registerDrawFunction, registerWMJSMap, registerWMLayer, routerActions, snackbarActions, store, genericActions as syncGroupActions, selectors$2 as syncGroupsSelectors, synchronizationGroupConfig as synchronizationGroupModuleConfig, synchronizationGroupConfig as synchronizationGroupsConfig, testLayers, timeSliderUtils, uiActions, uiModuleConfig, selectors$3 as uiSelectors, types as uiTypes, unRegisterWMJSLayer, unRegisterWMJSMap, useSetupDialog };