@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.umd.js CHANGED
@@ -3344,7 +3344,7 @@
3344
3344
  }, []);
3345
3345
  }, selectorMemoizationOptions);
3346
3346
 
3347
- var selectors$3 = /*#__PURE__*/Object.freeze({
3347
+ var selectors$4 = /*#__PURE__*/Object.freeze({
3348
3348
  __proto__: null,
3349
3349
  getLayerById: getLayerById,
3350
3350
  getLayersById: getLayersById,
@@ -3512,7 +3512,7 @@
3512
3512
  return details && details.focused || false;
3513
3513
  });
3514
3514
 
3515
- var selectors$2 = /*#__PURE__*/Object.freeze({
3515
+ var selectors$3 = /*#__PURE__*/Object.freeze({
3516
3516
  __proto__: null,
3517
3517
  getUiStore: getUiStore,
3518
3518
  getDialogDetailsByType: getDialogDetailsByType,
@@ -3909,6 +3909,156 @@
3909
3909
  get SyncGroupActionOrigin () { return SyncGroupActionOrigin; }
3910
3910
  });
3911
3911
 
3912
+ /* *
3913
+ * Licensed under the Apache License, Version 2.0 (the "License");
3914
+ * you may not use this file except in compliance with the License.
3915
+ * You may obtain a copy of the License at
3916
+ *
3917
+ * http://www.apache.org/licenses/LICENSE-2.0
3918
+ *
3919
+ * Unless required by applicable law or agreed to in writing, software
3920
+ * distributed under the License is distributed on an "AS IS" BASIS,
3921
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3922
+ * See the License for the specific language governing permissions and
3923
+ * limitations under the License.
3924
+ *
3925
+ * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
3926
+ * Copyright 2020 - Finnish Meteorological Institute (FMI)
3927
+ * */
3928
+ var syncGroupStore = function syncGroupStore(store) {
3929
+ return store.syncronizationGroupStore || null;
3930
+ };
3931
+ /**
3932
+ * Gets synchronization group state
3933
+ *
3934
+ * Example: synchronizationGroupState = getSynchronizationGroupState(store)
3935
+ * @param {object} store store: object - Store object
3936
+ * @returns {object} returnType: SynchronizationGroupState
3937
+ */
3938
+
3939
+ var getSynchronizationGroupState = toolkit.createSelector(syncGroupStore, function (store) {
3940
+ return store || null;
3941
+ });
3942
+ var getSynchronizationGroup = function getSynchronizationGroup(state, id) {
3943
+ return syncGroupStore(state).groups.byId[id];
3944
+ };
3945
+ var getSynchronizationGroupSource = function getSynchronizationGroupSource(state, id) {
3946
+ return syncGroupStore(state).sources.byId[id];
3947
+ };
3948
+ var getTargets = function getTargets(state, payload, actionType) {
3949
+ var actionPayloads = [];
3950
+ var targetsInActionPayload = {};
3951
+ var syncronizationGroupStore = syncGroupStore(state);
3952
+ /* All the groups the source is member of */
3953
+
3954
+ if (syncronizationGroupStore && payload) {
3955
+ /* Backwards compatibility, if there are no groups, connect everything */
3956
+ if (syncronizationGroupStore.groups.allIds.length === 0) {
3957
+ syncronizationGroupStore.sources.allIds.forEach(function (targetId) {
3958
+ // Only add if should react to this action
3959
+ if (syncronizationGroupStore.sources.byId[targetId].types.includes(actionType)) {
3960
+ /* Remember that we have already added this target in the action payloads, prevents adding it twice */
3961
+ targetsInActionPayload[targetId] = true;
3962
+ /* Compose the payload */
3963
+
3964
+ var newPayload = __assign({
3965
+ targetId: targetId
3966
+ }, payload);
3967
+
3968
+ actionPayloads.push(newPayload);
3969
+ }
3970
+ });
3971
+ }
3972
+
3973
+ syncronizationGroupStore.groups.allIds.forEach(function (id) {
3974
+ var syncronizationGroup = syncronizationGroupStore.groups.byId[id];
3975
+
3976
+ if (actionType === syncronizationGroup.type) {
3977
+ /* Check if the source is in the target list of the synchonizationGroup */
3978
+ var source = syncronizationGroup.targets.byId[payload.sourceId];
3979
+ /* If the source is part of the target list, and is linked, continue syncing the other targets */
3980
+
3981
+ if (source && source.linked) {
3982
+ syncronizationGroup.targets.allIds.forEach(function (targetId) {
3983
+ var target = syncronizationGroup.targets.byId[targetId];
3984
+
3985
+ if (target.linked && !targetsInActionPayload[targetId]) {
3986
+ /* Remember that we have already added this target in the action payloads, prevents adding it twice */
3987
+ targetsInActionPayload[targetId] = true;
3988
+ /* Compose the payload */
3989
+
3990
+ var newPayload = __assign({
3991
+ targetId: targetId
3992
+ }, payload);
3993
+
3994
+ actionPayloads.push(newPayload);
3995
+ }
3996
+ });
3997
+ }
3998
+ }
3999
+ });
4000
+ }
4001
+
4002
+ return actionPayloads;
4003
+ };
4004
+ var getTargetGroups = function getTargetGroups(state, payload, actionType) {
4005
+ var syncronizationGroupStore = syncGroupStore(state);
4006
+ var groups = syncronizationGroupStore.groups.allIds.reduce(function (list, groupId) {
4007
+ var syncronizationGroup = syncronizationGroupStore.groups.byId[groupId];
4008
+
4009
+ if (actionType === syncronizationGroup.type) {
4010
+ /* Check if the source is in the target list of the synchronizationGroup */
4011
+ var source = syncronizationGroup.targets.byId[payload.sourceId];
4012
+ /* If the source is part of the target list, and is linked, continue syncin the other targets */
4013
+
4014
+ if (source && source.linked) {
4015
+ return list.concat(groupId);
4016
+ }
4017
+ }
4018
+
4019
+ return list;
4020
+ }, []);
4021
+ return groups;
4022
+ };
4023
+ var getAllTargetGroupsForSource = function getAllTargetGroupsForSource(state, sourceId) {
4024
+ var syncronizationGroupStore = syncGroupStore(state);
4025
+
4026
+ if (syncronizationGroupStore === null || syncronizationGroupStore === void 0 ? void 0 : syncronizationGroupStore.groups) {
4027
+ return syncronizationGroupStore.groups.allIds.reduce(function (linkedSyncGroupIds, groupId) {
4028
+ var syncronizationGroup = syncronizationGroupStore.groups.byId[groupId];
4029
+ var source = syncronizationGroup.targets.byId[sourceId];
4030
+ /* If the source is part of the target list, and is linked, continue syncin the other targets */
4031
+
4032
+ if (source && source.linked) {
4033
+ return linkedSyncGroupIds.concat(groupId);
4034
+ }
4035
+
4036
+ return linkedSyncGroupIds;
4037
+ }, []);
4038
+ }
4039
+
4040
+ return [];
4041
+ };
4042
+ var syncGroupGetViewState = toolkit.createSelector(syncGroupStore, function (store) {
4043
+ return store.viewState;
4044
+ });
4045
+ var getSyncedMapIdsForTimeslider = toolkit.createSelector(syncGroupStore, function (store) {
4046
+ return store.viewState.timeslider.groups[0].selected;
4047
+ }, selectorMemoizationOptions);
4048
+
4049
+ var selectors$2 = /*#__PURE__*/Object.freeze({
4050
+ __proto__: null,
4051
+ syncGroupStore: syncGroupStore,
4052
+ getSynchronizationGroupState: getSynchronizationGroupState,
4053
+ getSynchronizationGroup: getSynchronizationGroup,
4054
+ getSynchronizationGroupSource: getSynchronizationGroupSource,
4055
+ getTargets: getTargets,
4056
+ getTargetGroups: getTargetGroups,
4057
+ getAllTargetGroupsForSource: getAllTargetGroupsForSource,
4058
+ syncGroupGetViewState: syncGroupGetViewState,
4059
+ getSyncedMapIdsForTimeslider: getSyncedMapIdsForTimeslider
4060
+ });
4061
+
3912
4062
  /* *
3913
4063
  * Licensed under the Apache License, Version 2.0 (the "License");
3914
4064
  * you may not use this file except in compliance with the License.
@@ -3931,7 +4081,8 @@
3931
4081
  actions: actions,
3932
4082
  constants: constants,
3933
4083
  types: types$1,
3934
- initialState: initialState$4
4084
+ initialState: initialState$4,
4085
+ syncGroupsSelectors: selectors$2
3935
4086
  });
3936
4087
 
3937
4088
  /* *
@@ -5551,121 +5702,6 @@
5551
5702
  var reducer = slice.reducer;
5552
5703
  var appActions = slice.actions;
5553
5704
 
5554
- /* *
5555
- * Licensed under the Apache License, Version 2.0 (the "License");
5556
- * you may not use this file except in compliance with the License.
5557
- * You may obtain a copy of the License at
5558
- *
5559
- * http://www.apache.org/licenses/LICENSE-2.0
5560
- *
5561
- * Unless required by applicable law or agreed to in writing, software
5562
- * distributed under the License is distributed on an "AS IS" BASIS,
5563
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5564
- * See the License for the specific language governing permissions and
5565
- * limitations under the License.
5566
- *
5567
- * Copyright 2020 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
5568
- * Copyright 2020 - Finnish Meteorological Institute (FMI)
5569
- * */
5570
- var syncGroupStore = function syncGroupStore(store) {
5571
- return store.syncronizationGroupStore || null;
5572
- };
5573
- /**
5574
- * Gets synchronization group state
5575
- *
5576
- * Example: synchronizationGroupState = getSynchronizationGroupState(store)
5577
- * @param {object} store store: object - Store object
5578
- * @returns {object} returnType: SynchronizationGroupState
5579
- */
5580
-
5581
- var getSynchronizationGroupState = toolkit.createSelector(syncGroupStore, function (store) {
5582
- return store || null;
5583
- });
5584
- var getSynchronizationGroup = function getSynchronizationGroup(state, id) {
5585
- return syncGroupStore(state).groups.byId[id];
5586
- };
5587
- var getTargets = function getTargets(state, payload, actionType) {
5588
- var actionPayloads = [];
5589
- var targetsInActionPayload = {};
5590
- var syncronizationGroupStore = syncGroupStore(state);
5591
- /* All the groups the source is member of */
5592
-
5593
- if (syncronizationGroupStore && payload) {
5594
- /* Backwards compatibility, if there are no groups, connect everything */
5595
- if (syncronizationGroupStore.groups.allIds.length === 0) {
5596
- syncronizationGroupStore.sources.allIds.forEach(function (targetId) {
5597
- // Only add if should react to this action
5598
- if (syncronizationGroupStore.sources.byId[targetId].types.includes(actionType)) {
5599
- /* Remember that we have already added this target in the action payloads, prevents adding it twice */
5600
- targetsInActionPayload[targetId] = true;
5601
- /* Compose the payload */
5602
-
5603
- var newPayload = __assign({
5604
- targetId: targetId
5605
- }, payload);
5606
-
5607
- actionPayloads.push(newPayload);
5608
- }
5609
- });
5610
- }
5611
-
5612
- syncronizationGroupStore.groups.allIds.forEach(function (id) {
5613
- var syncronizationGroup = syncronizationGroupStore.groups.byId[id];
5614
-
5615
- if (actionType === syncronizationGroup.type) {
5616
- /* Check if the source is in the target list of the synchonizationGroup */
5617
- var source = syncronizationGroup.targets.byId[payload.sourceId];
5618
- /* If the source is part of the target list, and is linked, continue syncing the other targets */
5619
-
5620
- if (source && source.linked) {
5621
- syncronizationGroup.targets.allIds.forEach(function (targetId) {
5622
- var target = syncronizationGroup.targets.byId[targetId];
5623
-
5624
- if (target.linked && !targetsInActionPayload[targetId]) {
5625
- /* Remember that we have already added this target in the action payloads, prevents adding it twice */
5626
- targetsInActionPayload[targetId] = true;
5627
- /* Compose the payload */
5628
-
5629
- var newPayload = __assign({
5630
- targetId: targetId
5631
- }, payload);
5632
-
5633
- actionPayloads.push(newPayload);
5634
- }
5635
- });
5636
- }
5637
- }
5638
- });
5639
- }
5640
-
5641
- return actionPayloads;
5642
- };
5643
- var getTargetGroups = function getTargetGroups(state, payload, actionType) {
5644
- var syncronizationGroupStore = syncGroupStore(state);
5645
- var groups = syncronizationGroupStore.groups.allIds.reduce(function (list, groupId) {
5646
- var syncronizationGroup = syncronizationGroupStore.groups.byId[groupId];
5647
-
5648
- if (actionType === syncronizationGroup.type) {
5649
- /* Check if the source is in the target list of the synchronizationGroup */
5650
- var source = syncronizationGroup.targets.byId[payload.sourceId];
5651
- /* If the source is part of the target list, and it linked, continue syncin the other targets */
5652
-
5653
- if (source && source.linked) {
5654
- return list.concat(groupId);
5655
- }
5656
- }
5657
-
5658
- return list;
5659
- }, []);
5660
- return groups;
5661
- };
5662
- var syncGroupGetViewState = toolkit.createSelector(syncGroupStore, function (store) {
5663
- return store.viewState;
5664
- });
5665
- var getSyncedMapIdsForTimeslider = toolkit.createSelector(syncGroupStore, function (store) {
5666
- return store.viewState.timeslider.groups[0].selected;
5667
- }, selectorMemoizationOptions);
5668
-
5669
5705
  /* *
5670
5706
  * Licensed under the Apache License, Version 2.0 (the "License");
5671
5707
  * you may not use this file except in compliance with the License.
@@ -10998,7 +11034,9 @@
10998
11034
  _c = _a.layers,
10999
11035
  layers = _c === void 0 ? [] : _c,
11000
11036
  _d = _a.isEnabled,
11001
- isEnabled = _d === void 0 ? true : _d;
11037
+ isEnabled = _d === void 0 ? true : _d,
11038
+ _e = _a.tooltipPrefix,
11039
+ tooltipPrefix = _e === void 0 ? 'Layer: ' : _e;
11002
11040
 
11003
11041
  if (!layers || !layers.length) {
11004
11042
  return /*#__PURE__*/React__namespace.createElement(material.Box, {
@@ -11025,10 +11063,10 @@
11025
11063
  onChangeLayerName(event.target.value);
11026
11064
  };
11027
11065
 
11028
- var _e = getRenderLayersValues(layerName, layers),
11029
- currentIndex = _e.currentIndex,
11030
- currentValue = _e.currentValue,
11031
- extendedLayers = _e.extendedLayers;
11066
+ var _f = getRenderLayersValues(layerName, layers),
11067
+ currentIndex = _f.currentIndex,
11068
+ currentValue = _f.currentValue,
11069
+ extendedLayers = _f.extendedLayers;
11032
11070
 
11033
11071
  var list = extendedLayers.map(function (layer) {
11034
11072
  return {
@@ -11037,7 +11075,7 @@
11037
11075
  });
11038
11076
  return /*#__PURE__*/React__namespace.createElement(shared.TooltipSelect, {
11039
11077
  disableUnderline: true,
11040
- tooltip: "Layer: " + ((_b = extendedLayers[currentIndex]) === null || _b === void 0 ? void 0 : _b.title),
11078
+ tooltip: "" + tooltipPrefix + ((_b = extendedLayers[currentIndex]) === null || _b === void 0 ? void 0 : _b.title),
11041
11079
  inputProps: {
11042
11080
  SelectDisplayProps: {
11043
11081
  'data-testid': 'selectLayer'
@@ -11122,15 +11160,17 @@
11122
11160
  var currentOpacity = _a.currentOpacity,
11123
11161
  onLayerChangeOpacity = _a.onLayerChangeOpacity,
11124
11162
  _b = _a.isEnabled,
11125
- isEnabled = _b === void 0 ? true : _b;
11163
+ isEnabled = _b === void 0 ? true : _b,
11164
+ _c = _a.tooltipPrefix,
11165
+ tooltipPrefix = _c === void 0 ? 'Opacity: ' : _c;
11126
11166
 
11127
- var _c = __read(shared.useControlledTooltip(), 2),
11128
- tooltipOpen = _c[0],
11129
- setTooltipOpen = _c[1];
11167
+ var _d = __read(shared.useControlledTooltip(), 2),
11168
+ tooltipOpen = _d[0],
11169
+ setTooltipOpen = _d[1];
11130
11170
 
11131
- var _d = __read(React__namespace.useState(null), 2),
11132
- anchorEl = _d[0],
11133
- setAnchorEl = _d[1];
11171
+ var _e = __read(React__namespace.useState(null), 2),
11172
+ anchorEl = _e[0],
11173
+ setAnchorEl = _e[1];
11134
11174
 
11135
11175
  var isOpen = Boolean(anchorEl);
11136
11176
 
@@ -11185,7 +11225,7 @@
11185
11225
  height: 32
11186
11226
  }
11187
11227
  }, /*#__PURE__*/React__namespace.createElement(shared.CustomTooltip, {
11188
- title: "Opacity: " + currentOpacityText,
11228
+ title: "" + tooltipPrefix + currentOpacityText,
11189
11229
  sx: shared.tooltipContainerStyles(isEnabled),
11190
11230
  placement: "top",
11191
11231
  open: tooltipOpen
@@ -11268,7 +11308,10 @@
11268
11308
  var LayerManagerMenuButton = function LayerManagerMenuButton(_a) {
11269
11309
  var mapId = _a.mapId,
11270
11310
  layerId = _a.layerId,
11271
- onLayerDuplicate = _a.onLayerDuplicate;
11311
+ onLayerDuplicate = _a.onLayerDuplicate,
11312
+ _b = _a.tooltipTitle,
11313
+ tooltipTitle = _b === void 0 ? 'Options' : _b,
11314
+ icon = _a.icon;
11272
11315
 
11273
11316
  var onClickDuplicate = function onClickDuplicate() {
11274
11317
  onLayerDuplicate({
@@ -11292,7 +11335,8 @@
11292
11335
  action: onClickDuplicate,
11293
11336
  icon: /*#__PURE__*/React__namespace.createElement(theme.Copy, null)
11294
11337
  }],
11295
- tooltipTitle: "Options"
11338
+ tooltipTitle: tooltipTitle,
11339
+ buttonIcon: icon
11296
11340
  });
11297
11341
  };
11298
11342
 
@@ -11303,7 +11347,10 @@
11303
11347
  currentLayerStyle = _a.currentLayerStyle,
11304
11348
  onChangeLayerStyle = _a.onChangeLayerStyle,
11305
11349
  _c = _a.isEnabled,
11306
- isEnabled = _c === void 0 ? true : _c;
11350
+ isEnabled = _c === void 0 ? true : _c,
11351
+ icon = _a.icon,
11352
+ _d = _a.tooltipPrefix,
11353
+ tooltipPrefix = _d === void 0 ? 'Style: ' : _d;
11307
11354
  var styles = [{
11308
11355
  title: 'default',
11309
11356
  name: 'default',
@@ -11331,7 +11378,7 @@
11331
11378
  return currentStyle === style.name;
11332
11379
  });
11333
11380
  return /*#__PURE__*/React__namespace.createElement(shared.TooltipSelect, {
11334
- tooltip: "Style: " + ((_b = styles[currentIndex]) === null || _b === void 0 ? void 0 : _b.title),
11381
+ tooltip: "" + tooltipPrefix + ((_b = styles[currentIndex]) === null || _b === void 0 ? void 0 : _b.title),
11335
11382
  inputProps: {
11336
11383
  SelectDisplayProps: {
11337
11384
  'data-testid': 'selectStyle'
@@ -11345,7 +11392,8 @@
11345
11392
  onChangeMouseWheel: function onChangeMouseWheel(e) {
11346
11393
  return onChangeLayerStyle(e.value);
11347
11394
  },
11348
- requiresCtrlToChange: true
11395
+ requiresCtrlToChange: true,
11396
+ IconComponent: icon
11349
11397
  }, /*#__PURE__*/React__namespace.createElement(material.MenuItem, {
11350
11398
  disabled: true
11351
11399
  }, "Style"), styles.map(function (styleFromlayer) {
@@ -11799,7 +11847,11 @@
11799
11847
  var DeleteLayerConnect = function DeleteLayerConnect(_a) {
11800
11848
  var layerId = _a.layerId,
11801
11849
  mapId = _a.mapId,
11802
- layerIndex = _a.layerIndex;
11850
+ layerIndex = _a.layerIndex,
11851
+ _b = _a.tooltipTitle,
11852
+ tooltipTitle = _b === void 0 ? 'Delete' : _b,
11853
+ _c = _a.icon,
11854
+ icon = _c === void 0 ? /*#__PURE__*/React__namespace.createElement(theme.Delete, null) : _c;
11803
11855
  var dispatch = reactRedux.useDispatch();
11804
11856
  var layerDelete = React__namespace.useCallback(function (_a) {
11805
11857
  var mapId = _a.mapId,
@@ -11816,7 +11868,7 @@
11816
11868
  return getLayerEnabled(store, layerId);
11817
11869
  });
11818
11870
  return /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
11819
- tooltipTitle: "Delete",
11871
+ tooltipTitle: tooltipTitle,
11820
11872
  onClick: function onClick() {
11821
11873
  layerDelete({
11822
11874
  mapId: mapId,
@@ -11826,7 +11878,7 @@
11826
11878
  },
11827
11879
  shouldShowAsDisabled: !isLayerEnabled,
11828
11880
  "data-testid": "deleteButton"
11829
- }, /*#__PURE__*/React__namespace.createElement(theme.Delete, null));
11881
+ }, icon);
11830
11882
  };
11831
11883
 
11832
11884
  /* *
@@ -11852,7 +11904,10 @@
11852
11904
  _b = _a.isEnabled,
11853
11905
  isEnabled = _b === void 0 ? false : _b,
11854
11906
  _c = _a.layerName,
11855
- layerName = _c === void 0 ? '' : _c;
11907
+ layerName = _c === void 0 ? '' : _c,
11908
+ _d = _a.icon,
11909
+ icon = _d === void 0 ? isEnabled ? /*#__PURE__*/React__namespace.createElement(theme.Visibility, null) : /*#__PURE__*/React__namespace.createElement(theme.VisibilityOff, null) : _d,
11910
+ tooltipTitle = _a.tooltipTitle;
11856
11911
  var dispatch = reactRedux.useDispatch();
11857
11912
  var layerChangeEnabled = React__namespace.useCallback(function (_a) {
11858
11913
  var layerId = _a.layerId,
@@ -11864,9 +11919,11 @@
11864
11919
  origin: LayerActionOrigin.layerManager
11865
11920
  }));
11866
11921
  }, [dispatch, mapId]);
11922
+ var normalTooltip = tooltipTitle !== null && tooltipTitle !== void 0 ? tooltipTitle : 'Toggle visibility';
11923
+ var miniTooltip = tooltipTitle !== null && tooltipTitle !== void 0 ? tooltipTitle : layerName;
11867
11924
  return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
11868
11925
  shouldShowAsDisabled: !isEnabled,
11869
- tooltipTitle: "Toggle visibility",
11926
+ tooltipTitle: normalTooltip,
11870
11927
  onClick: function onClick(event) {
11871
11928
  event.stopPropagation();
11872
11929
  layerChangeEnabled({
@@ -11879,9 +11936,9 @@
11879
11936
  sx: {
11880
11937
  margin: 'auto 0px'
11881
11938
  }
11882
- }, isEnabled ? /*#__PURE__*/React__namespace.createElement(theme.Visibility, null) : /*#__PURE__*/React__namespace.createElement(theme.VisibilityOff, null)), /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
11939
+ }, icon), /*#__PURE__*/React__namespace.createElement(shared.CustomIconButton, {
11883
11940
  shouldShowAsDisabled: !isEnabled,
11884
- tooltipTitle: layerName,
11941
+ tooltipTitle: miniTooltip,
11885
11942
  onClick: function onClick(event) {
11886
11943
  event.stopPropagation();
11887
11944
  layerChangeEnabled({
@@ -11894,7 +11951,7 @@
11894
11951
  sx: {
11895
11952
  margin: 'auto 0px'
11896
11953
  }
11897
- }, isEnabled ? /*#__PURE__*/React__namespace.createElement(theme.Visibility, null) : /*#__PURE__*/React__namespace.createElement(theme.VisibilityOff, null)));
11954
+ }, icon));
11898
11955
  };
11899
11956
 
11900
11957
  /* *
@@ -11916,7 +11973,8 @@
11916
11973
 
11917
11974
  var OpacitySelectConnect = function OpacitySelectConnect(_a) {
11918
11975
  var layerId = _a.layerId,
11919
- mapId = _a.mapId;
11976
+ mapId = _a.mapId,
11977
+ tooltipPrefix = _a.tooltipPrefix;
11920
11978
  var dispatch = reactRedux.useDispatch();
11921
11979
  var opacity = reactRedux.useSelector(function (store) {
11922
11980
  return getLayerOpacity(store, layerId);
@@ -11934,7 +11992,8 @@
11934
11992
  origin: LayerActionOrigin.layerManager
11935
11993
  }));
11936
11994
  },
11937
- isEnabled: isLayerEnabled
11995
+ isEnabled: isLayerEnabled,
11996
+ tooltipPrefix: tooltipPrefix
11938
11997
  });
11939
11998
  };
11940
11999
 
@@ -12011,7 +12070,9 @@
12011
12070
 
12012
12071
  var RenderStylesConnect = function RenderStylesConnect(_a) {
12013
12072
  var layerId = _a.layerId,
12014
- mapId = _a.mapId;
12073
+ mapId = _a.mapId,
12074
+ icon = _a.icon,
12075
+ tooltipPrefix = _a.tooltipPrefix;
12015
12076
  var dispatch = reactRedux.useDispatch();
12016
12077
  var layerService = reactRedux.useSelector(function (store) {
12017
12078
  return getLayerService(store, layerId);
@@ -12040,7 +12101,9 @@
12040
12101
  layerStyles: layerStyles,
12041
12102
  currentLayerStyle: currentLayerStyle,
12042
12103
  onChangeLayerStyle: layerChangeStyle,
12043
- isEnabled: isLayerEnabled
12104
+ isEnabled: isLayerEnabled,
12105
+ icon: icon,
12106
+ tooltipPrefix: tooltipPrefix
12044
12107
  });
12045
12108
  };
12046
12109
 
@@ -12063,7 +12126,8 @@
12063
12126
 
12064
12127
  var RenderLayersConnect = function RenderLayersConnect(_a) {
12065
12128
  var layerId = _a.layerId,
12066
- mapId = _a.mapId;
12129
+ mapId = _a.mapId,
12130
+ tooltipPrefix = _a.tooltipPrefix;
12067
12131
  var dispatch = reactRedux.useDispatch();
12068
12132
  var layerName = reactRedux.useSelector(function (store) {
12069
12133
  return getLayerName(store, layerId);
@@ -12150,7 +12214,8 @@
12150
12214
  name: name
12151
12215
  });
12152
12216
  },
12153
- isEnabled: isLayerEnabled
12217
+ isEnabled: isLayerEnabled,
12218
+ tooltipPrefix: tooltipPrefix
12154
12219
  });
12155
12220
  };
12156
12221
 
@@ -12173,7 +12238,9 @@
12173
12238
 
12174
12239
  var LayerManagerMenuButtonConnect = function LayerManagerMenuButtonConnect(_a) {
12175
12240
  var layerId = _a.layerId,
12176
- mapId = _a.mapId;
12241
+ mapId = _a.mapId,
12242
+ tooltipTitle = _a.tooltipTitle,
12243
+ icon = _a.icon;
12177
12244
  var dispatch = reactRedux.useDispatch();
12178
12245
  var layer = reactRedux.useSelector(function (store) {
12179
12246
  return getLayerById(store, layerId);
@@ -12198,7 +12265,9 @@
12198
12265
  mapId: mapId,
12199
12266
  layer: layer
12200
12267
  });
12201
- }
12268
+ },
12269
+ tooltipTitle: tooltipTitle,
12270
+ icon: icon
12202
12271
  });
12203
12272
  };
12204
12273
 
@@ -12362,12 +12431,13 @@
12362
12431
  * */
12363
12432
 
12364
12433
  var LayerRowConnect = function LayerRowConnect(_a) {
12365
- var _b;
12434
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
12366
12435
 
12367
12436
  var layerId = _a.layerId,
12368
12437
  mapId = _a.mapId,
12369
12438
  dragHandle = _a.dragHandle,
12370
- layerIndex = _a.layerIndex;
12439
+ layerIndex = _a.layerIndex,
12440
+ settings = _a.settings;
12371
12441
  var isEnabled = reactRedux.useSelector(function (store) {
12372
12442
  return getLayerEnabled(store, layerId);
12373
12443
  });
@@ -12396,15 +12466,19 @@
12396
12466
  layerId: layerId,
12397
12467
  mapId: mapId,
12398
12468
  isEnabled: isEnabled,
12399
- layerName: fullLayerName || layerName
12469
+ layerName: fullLayerName || layerName,
12470
+ icon: isEnabled ? (_c = settings === null || settings === void 0 ? void 0 : settings.enableLayer) === null || _c === void 0 ? void 0 : _c.enabledIcon : (_d = settings === null || settings === void 0 ? void 0 : settings.enableLayer) === null || _d === void 0 ? void 0 : _d.disabledIcon,
12471
+ tooltipTitle: isEnabled ? (_e = settings === null || settings === void 0 ? void 0 : settings.enableLayer) === null || _e === void 0 ? void 0 : _e.enabledTooltipTitle : (_f = settings === null || settings === void 0 ? void 0 : settings.enableLayer) === null || _f === void 0 ? void 0 : _f.disabledTooltipTitle
12400
12472
  }),
12401
12473
  layerOpacityLayout: /*#__PURE__*/React__namespace.createElement(OpacitySelectConnect, {
12402
12474
  layerId: layerId,
12403
- mapId: mapId
12475
+ mapId: mapId,
12476
+ tooltipPrefix: (_g = settings === null || settings === void 0 ? void 0 : settings.opacity) === null || _g === void 0 ? void 0 : _g.tooltipPrefix
12404
12477
  }),
12405
12478
  layerServicesLayout: /*#__PURE__*/React__namespace.createElement(RenderLayersConnect, {
12406
12479
  layerId: layerId,
12407
- mapId: mapId
12480
+ mapId: mapId,
12481
+ tooltipPrefix: (_h = settings === null || settings === void 0 ? void 0 : settings.renderLayer) === null || _h === void 0 ? void 0 : _h.tooltipPrefix
12408
12482
  }),
12409
12483
  layerDimensionLayout: /*#__PURE__*/React__namespace.createElement(DimensionSelectConnect, {
12410
12484
  layerId: layerId,
@@ -12412,16 +12486,22 @@
12412
12486
  }),
12413
12487
  layerStylesLayout: /*#__PURE__*/React__namespace.createElement(RenderStylesConnect, {
12414
12488
  layerId: layerId,
12415
- mapId: mapId
12489
+ mapId: mapId,
12490
+ tooltipPrefix: (_j = settings === null || settings === void 0 ? void 0 : settings.layerStyle) === null || _j === void 0 ? void 0 : _j.tooltipPrefix,
12491
+ icon: (_k = settings === null || settings === void 0 ? void 0 : settings.layerStyle) === null || _k === void 0 ? void 0 : _k.icon
12416
12492
  }),
12417
12493
  layerDeleteLayout: /*#__PURE__*/React__namespace.createElement(DeleteLayerConnect, {
12418
12494
  mapId: mapId,
12419
12495
  layerId: layerId,
12420
- layerIndex: layerIndex
12496
+ layerIndex: layerIndex,
12497
+ tooltipTitle: (_l = settings === null || settings === void 0 ? void 0 : settings.deleteLayer) === null || _l === void 0 ? void 0 : _l.tooltipTitle,
12498
+ icon: (_m = settings === null || settings === void 0 ? void 0 : settings.deleteLayer) === null || _m === void 0 ? void 0 : _m.icon
12421
12499
  }),
12422
12500
  layerMenuLayout: /*#__PURE__*/React__namespace.createElement(LayerManagerMenuButtonConnect, {
12423
12501
  mapId: mapId,
12424
- layerId: layerId
12502
+ layerId: layerId,
12503
+ tooltipTitle: (_o = settings === null || settings === void 0 ? void 0 : settings.menu) === null || _o === void 0 ? void 0 : _o.tooltipTitle,
12504
+ icon: (_p = settings === null || settings === void 0 ? void 0 : settings.menu) === null || _p === void 0 ? void 0 : _p.icon
12425
12505
  }),
12426
12506
  layerActiveLayout: /*#__PURE__*/React__namespace.createElement(ActivateLayerConnect, {
12427
12507
  mapId: mapId,
@@ -12457,10 +12537,16 @@
12457
12537
  _d = _a.hideTooltip,
12458
12538
  hideTooltip = _d === void 0 ? true : _d,
12459
12539
  _e = _a.isSorting,
12460
- isSorting = _e === void 0 ? false : _e;
12461
- var tooltipTitle = hideTooltip ? '' : TOOLTIP_TITLE;
12540
+ isSorting = _e === void 0 ? false : _e,
12541
+ _f = _a.icon,
12542
+ icon = _f === void 0 ? /*#__PURE__*/React__default["default"].createElement(theme.DragHandle, {
12543
+ "data-testid": "dragHandleIcon"
12544
+ }) : _f,
12545
+ _g = _a.tooltipTitle,
12546
+ tooltipTitle = _g === void 0 ? TOOLTIP_TITLE : _g;
12547
+ var usedTooltipTitle = hideTooltip ? '' : tooltipTitle;
12462
12548
  return /*#__PURE__*/React__default["default"].createElement(shared.CustomIconButton, {
12463
- tooltipTitle: tooltipTitle,
12549
+ tooltipTitle: usedTooltipTitle,
12464
12550
  "data-testid": "dragHandle" + (index !== undefined ? "-" + index : ''),
12465
12551
  className: "handle",
12466
12552
  tabIndex: -1,
@@ -12479,7 +12565,7 @@
12479
12565
  color: 'geowebColors.greys.accessible'
12480
12566
  }
12481
12567
  }
12482
- }, /*#__PURE__*/React__default["default"].createElement(theme.DragHandle, null));
12568
+ }, icon);
12483
12569
  };
12484
12570
 
12485
12571
  /* *
@@ -12500,7 +12586,8 @@
12500
12586
  * */
12501
12587
 
12502
12588
  var LayerContainerRow = function LayerContainerRow(_a) {
12503
- var mapId = _a.mapId;
12589
+ var mapId = _a.mapId,
12590
+ settings = _a.settings;
12504
12591
  var dispatch = reactRedux.useDispatch();
12505
12592
 
12506
12593
  var _b = __read(React__namespace.useState(false), 2),
@@ -12622,6 +12709,8 @@
12622
12709
  width: '100%'
12623
12710
  }
12624
12711
  }, layerIds.map(function (layerId, index) {
12712
+ var _a, _b;
12713
+
12625
12714
  return /*#__PURE__*/React__namespace.createElement(LayerRowConnect, {
12626
12715
  mapId: mapId,
12627
12716
  layerId: layerId,
@@ -12631,8 +12720,11 @@
12631
12720
  isDisabled: isDragDisabled,
12632
12721
  index: index,
12633
12722
  hideTooltip: isSorting || isDragDisabled,
12634
- isSorting: isSorting
12635
- })
12723
+ isSorting: isSorting,
12724
+ icon: (_a = settings === null || settings === void 0 ? void 0 : settings.dragHandle) === null || _a === void 0 ? void 0 : _a.icon,
12725
+ tooltipTitle: (_b = settings === null || settings === void 0 ? void 0 : settings.dragHandle) === null || _b === void 0 ? void 0 : _b.tooltipTitle
12726
+ }),
12727
+ settings: settings
12636
12728
  });
12637
12729
  })));
12638
12730
  };
@@ -13837,7 +13929,8 @@
13837
13929
  source: source,
13838
13930
  settings: settings === null || settings === void 0 ? void 0 : settings.header
13839
13931
  }), /*#__PURE__*/React__namespace.createElement(LayerContainerRow, {
13840
- mapId: mapId
13932
+ mapId: mapId,
13933
+ settings: settings === null || settings === void 0 ? void 0 : settings.content
13841
13934
  }), /*#__PURE__*/React__namespace.createElement(BaseLayerRow, {
13842
13935
  mapId: mapId,
13843
13936
  tooltip: "Add base layers",
@@ -28012,7 +28105,8 @@
28012
28105
  if (isChecked) {
28013
28106
  syncGroupRemoveTarget({
28014
28107
  groupId: String(groupId),
28015
- targetId: String(sourceId)
28108
+ targetId: String(sourceId),
28109
+ origin: 'user'
28016
28110
  });
28017
28111
  } else {
28018
28112
  var groups = syncGroupViewState[groupCategory].groups;
@@ -28025,7 +28119,8 @@
28025
28119
  if (group.id !== groupId && group.selected.includes(sourceId)) {
28026
28120
  syncGroupRemoveTarget({
28027
28121
  groupId: String(group.id),
28028
- targetId: String(sourceId)
28122
+ targetId: String(sourceId),
28123
+ origin: 'user'
28029
28124
  });
28030
28125
  }
28031
28126
  }
@@ -28044,7 +28139,8 @@
28044
28139
 
28045
28140
  syncGroupAddTarget({
28046
28141
  groupId: String(groupId),
28047
- targetId: String(sourceId)
28142
+ targetId: String(sourceId),
28143
+ origin: 'user'
28048
28144
  });
28049
28145
  }
28050
28146
  };
@@ -28805,7 +28901,7 @@
28805
28901
  exports.getWMLayerById = getWMLayerById;
28806
28902
  exports.layerActions = layerActions;
28807
28903
  exports.layerReducer = reducer$8;
28808
- exports.layerSelectors = selectors$3;
28904
+ exports.layerSelectors = selectors$4;
28809
28905
  exports.layerTypes = types$3;
28810
28906
  exports.mapActions = mapActions;
28811
28907
  exports.mapModuleConfig = moduleConfig;
@@ -28823,13 +28919,14 @@
28823
28919
  exports.snackbarActions = snackbarActions;
28824
28920
  exports.store = store;
28825
28921
  exports.syncGroupActions = genericActions;
28922
+ exports.syncGroupsSelectors = selectors$2;
28826
28923
  exports.synchronizationGroupModuleConfig = synchronizationGroupConfig;
28827
28924
  exports.synchronizationGroupsConfig = synchronizationGroupConfig;
28828
28925
  exports.testLayers = testLayers;
28829
28926
  exports.timeSliderUtils = timeSliderUtils;
28830
28927
  exports.uiActions = uiActions;
28831
28928
  exports.uiModuleConfig = uiModuleConfig;
28832
- exports.uiSelectors = selectors$2;
28929
+ exports.uiSelectors = selectors$3;
28833
28930
  exports.uiTypes = types;
28834
28931
  exports.unRegisterWMJSLayer = unRegisterWMJSLayer;
28835
28932
  exports.unRegisterWMJSMap = unRegisterWMJSMap;