@opengeoweb/layer-select 9.3.1 → 9.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js
CHANGED
|
@@ -1106,19 +1106,64 @@ $$8({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }
|
|
|
1106
1106
|
assign: assign
|
|
1107
1107
|
});
|
|
1108
1108
|
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1109
|
+
/******************************************************************************
|
|
1110
|
+
Copyright (c) Microsoft Corporation.
|
|
1111
|
+
|
|
1112
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
1113
|
+
purpose with or without fee is hereby granted.
|
|
1114
|
+
|
|
1115
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1116
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1117
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1118
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1119
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1120
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1121
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
1122
|
+
***************************************************************************** */
|
|
1123
|
+
|
|
1124
|
+
function __rest(s, e) {
|
|
1125
|
+
var t = {};
|
|
1126
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1127
|
+
t[p] = s[p];
|
|
1128
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1129
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1130
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1131
|
+
t[p[i]] = s[p[i]];
|
|
1132
|
+
}
|
|
1133
|
+
return t;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
1137
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
1138
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1139
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
1140
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
1141
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
1142
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
1143
|
+
});
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
1147
|
+
var e = new Error(message);
|
|
1148
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
1149
|
+
};
|
|
1150
|
+
|
|
1151
|
+
const LayerInfoButton = _a => {
|
|
1152
|
+
var {
|
|
1153
|
+
isOpenInStore,
|
|
1154
|
+
isActive,
|
|
1155
|
+
onClick
|
|
1156
|
+
} = _a,
|
|
1157
|
+
props = __rest(_a, ["isOpenInStore", "isActive", "onClick"]);
|
|
1114
1158
|
return jsx(CustomIconButton, Object.assign({
|
|
1115
1159
|
variant: "flat",
|
|
1116
1160
|
isSelected: isActive && isOpenInStore,
|
|
1117
1161
|
onClick: onClick,
|
|
1118
1162
|
id: "layerInfoButton",
|
|
1163
|
+
"data-testid": "layerInfoButton",
|
|
1119
1164
|
"aria-label": "layer info",
|
|
1120
1165
|
className: "layerInfoButton"
|
|
1121
|
-
}, {
|
|
1166
|
+
}, props, {
|
|
1122
1167
|
children: jsx(Info, {})
|
|
1123
1168
|
}));
|
|
1124
1169
|
};
|
|
@@ -2872,6 +2917,7 @@ const layerSelectConfig = {
|
|
|
2872
2917
|
};
|
|
2873
2918
|
|
|
2874
2919
|
const LayerInfoButtonConnect = ({
|
|
2920
|
+
isLayerMissing,
|
|
2875
2921
|
layer,
|
|
2876
2922
|
mapId,
|
|
2877
2923
|
serviceName,
|
|
@@ -2913,6 +2959,7 @@ const LayerInfoButtonConnect = ({
|
|
|
2913
2959
|
}
|
|
2914
2960
|
};
|
|
2915
2961
|
return jsx(LayerInfoButton, {
|
|
2962
|
+
disabled: isLayerMissing,
|
|
2916
2963
|
isActive: isActive,
|
|
2917
2964
|
isOpenInStore: isOpenInStore,
|
|
2918
2965
|
onClick: onClick
|
|
@@ -3669,7 +3716,7 @@ const LayerInfoDialog = ({
|
|
|
3669
3716
|
source: _source = 'app',
|
|
3670
3717
|
dialogHeight
|
|
3671
3718
|
}) => {
|
|
3672
|
-
var _a, _b;
|
|
3719
|
+
var _a, _b, _c;
|
|
3673
3720
|
const styles = getLayerStyles(layer);
|
|
3674
3721
|
const bbox = getLayerBbox(layer);
|
|
3675
3722
|
const dimensions = getDimensionsList(layer.dimensions);
|
|
@@ -3717,15 +3764,15 @@ const LayerInfoDialog = ({
|
|
|
3717
3764
|
value: bbox
|
|
3718
3765
|
}), jsx(LayerInfoText, {
|
|
3719
3766
|
label: "Groups",
|
|
3720
|
-
value: layer.path.join('/') || '-'
|
|
3767
|
+
value: ((_a = layer.path) === null || _a === void 0 ? void 0 : _a.join('/')) || '-'
|
|
3721
3768
|
}), jsx(LayerInfoText, {
|
|
3722
3769
|
label: "Keywords",
|
|
3723
|
-
value: ((
|
|
3770
|
+
value: ((_b = layer.keywords) === null || _b === void 0 ? void 0 : _b.join(', ')) || '-'
|
|
3724
3771
|
}), jsx(LayerInfoLegend, {
|
|
3725
3772
|
title: layer.title,
|
|
3726
3773
|
name: layer.name,
|
|
3727
3774
|
dimensions: layer.dimensions,
|
|
3728
|
-
legendURL: ((
|
|
3775
|
+
legendURL: ((_c = layer.styles) === null || _c === void 0 ? void 0 : _c.length) ? layer.styles[0].legendURL : undefined
|
|
3729
3776
|
})]
|
|
3730
3777
|
}))
|
|
3731
3778
|
}));
|
|
@@ -4401,48 +4448,6 @@ const ServiceListConnect = ({
|
|
|
4401
4448
|
});
|
|
4402
4449
|
};
|
|
4403
4450
|
|
|
4404
|
-
/******************************************************************************
|
|
4405
|
-
Copyright (c) Microsoft Corporation.
|
|
4406
|
-
|
|
4407
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
4408
|
-
purpose with or without fee is hereby granted.
|
|
4409
|
-
|
|
4410
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
4411
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
4412
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
4413
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
4414
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
4415
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
4416
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
4417
|
-
***************************************************************************** */
|
|
4418
|
-
|
|
4419
|
-
function __rest(s, e) {
|
|
4420
|
-
var t = {};
|
|
4421
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4422
|
-
t[p] = s[p];
|
|
4423
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
4424
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
4425
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
4426
|
-
t[p[i]] = s[p[i]];
|
|
4427
|
-
}
|
|
4428
|
-
return t;
|
|
4429
|
-
}
|
|
4430
|
-
|
|
4431
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
4432
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4433
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4434
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
4435
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
4436
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
4437
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
4438
|
-
});
|
|
4439
|
-
}
|
|
4440
|
-
|
|
4441
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
4442
|
-
var e = new Error(message);
|
|
4443
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
4444
|
-
};
|
|
4445
|
-
|
|
4446
4451
|
const styles = {
|
|
4447
4452
|
servicesContainer: {
|
|
4448
4453
|
width: '360px',
|
|
@@ -4911,7 +4916,6 @@ const LayerSelect = ({
|
|
|
4911
4916
|
// don't propagate when clicking on layerInfoButton or addRemoveButton
|
|
4912
4917
|
if (isButtonInScrollableList) {
|
|
4913
4918
|
event.stopPropagation();
|
|
4914
|
-
event.preventDefault();
|
|
4915
4919
|
return;
|
|
4916
4920
|
}
|
|
4917
4921
|
_onMouseDown(event);
|
package/package.json
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import { CustomIconProps } from '@opengeoweb/shared';
|
|
3
|
+
interface LayerInfoButtonProps extends CustomIconProps {
|
|
4
|
+
disabled?: boolean;
|
|
3
5
|
isOpenInStore?: boolean;
|
|
4
6
|
isActive?: boolean;
|
|
5
7
|
onClick?: () => void;
|