@opengeoweb/shared 21.2.0-nightly-20261126 → 21.3.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/dist/index.esm.js +99 -35
- package/dist/src/lib/components/PlotManager/ParameterSelect/ParameterSelect.d.ts +5 -1
- package/dist/src/lib/components/PlotManager/ParameterSelect/SelectServices.d.ts +3 -1
- package/dist/src/lib/types/edr-coverage-types.d.ts +31 -2
- package/dist/src/lib/utils/geoConstants.d.ts +1 -0
- package/dist/src/lib/utils/index.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -145,6 +145,7 @@ var en = {
|
|
|
145
145
|
"shared-add-service": "Add service",
|
|
146
146
|
"shared-add-service-title": "Add a new service",
|
|
147
147
|
"shared-delete-service": "Delete service",
|
|
148
|
+
"shared-cannot-delete-service": "Service has active layers. Cannot remove this service",
|
|
148
149
|
"shared-no-matching-parameters": "No matching parameters",
|
|
149
150
|
"shared-add": "Add",
|
|
150
151
|
"shared-service-options": "Services options",
|
|
@@ -289,6 +290,7 @@ var fi = {
|
|
|
289
290
|
"shared-add-service": "Lisää palvelu",
|
|
290
291
|
"shared-add-service-title": "Lisää uusi palvelu",
|
|
291
292
|
"shared-delete-service": "Poista palvelu",
|
|
293
|
+
"shared-cannot-delete-service": "Palvelun tarjoamia karttatasoja on aktiivisena. Tätä palvelua ei voida poistaa",
|
|
292
294
|
"shared-no-matching-parameters": "Ei vastaavia parametreja",
|
|
293
295
|
"shared-add": "Lisää",
|
|
294
296
|
"shared-service-options": "Palveluasetukset",
|
|
@@ -430,6 +432,7 @@ var no = {
|
|
|
430
432
|
"shared-add-service": "Legg til tjeneste",
|
|
431
433
|
"shared-add-service-title": "Legg til en ny tjeneste",
|
|
432
434
|
"shared-delete-service": "Slett tjeneste",
|
|
435
|
+
"shared-cannot-delete-service": "Tjenesten har aktive lag. Kan ikke fjerne",
|
|
433
436
|
"shared-no-matching-parameters": "Ingen samsvarende parametere",
|
|
434
437
|
"shared-add": "Legg til",
|
|
435
438
|
"shared-service-options": "Tjenesteinnstillinger",
|
|
@@ -573,6 +576,7 @@ var nl = {
|
|
|
573
576
|
"shared-add-service": "Service toevoegen",
|
|
574
577
|
"shared-add-service-title": "Een nieuwe service toevoegen",
|
|
575
578
|
"shared-delete-service": "Service verwijderen",
|
|
579
|
+
"shared-cannot-delete-service": "Service heeft actieve lagen. Deze service kan niet verwijderd worden.",
|
|
576
580
|
"shared-no-matching-parameters": "Geen overeenkomende parameters",
|
|
577
581
|
"shared-add": "Toevoegen",
|
|
578
582
|
"shared-service-options": "Serviceopties",
|
|
@@ -6641,6 +6645,25 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
6641
6645
|
sortInstancesNewestFirst: sortInstancesNewestFirst
|
|
6642
6646
|
});
|
|
6643
6647
|
|
|
6648
|
+
/* *
|
|
6649
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6650
|
+
* you may not use this file except in compliance with the License.
|
|
6651
|
+
* You may obtain a copy of the License at
|
|
6652
|
+
*
|
|
6653
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
6654
|
+
*
|
|
6655
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
6656
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
6657
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
6658
|
+
* See the License for the specific language governing permissions and
|
|
6659
|
+
* limitations under the License.
|
|
6660
|
+
*
|
|
6661
|
+
* Copyright 2026 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
6662
|
+
* Copyright 2026 - Finnish Meteorological Institute (FMI)
|
|
6663
|
+
* Copyright 2026 - The Norwegian Meteorological Institute (MET Norway)
|
|
6664
|
+
* */
|
|
6665
|
+
var EARTH_MEAN_RADIUS_KM = 6371;
|
|
6666
|
+
|
|
6644
6667
|
var URL_REGEX = /(https?:\/\/[^\s<>"')]+)/g;
|
|
6645
6668
|
// Splits text on URLs and turns them into links
|
|
6646
6669
|
var linkifyText = function linkifyText(text, keyPrefix) {
|
|
@@ -8471,15 +8494,14 @@ var usePlotManagerColumns = function usePlotManagerColumns(_ref) {
|
|
|
8471
8494
|
var parameter = _ref2.parameter,
|
|
8472
8495
|
compact = _ref2.compact,
|
|
8473
8496
|
disabled = _ref2.disabled;
|
|
8474
|
-
return
|
|
8475
|
-
sx: Object.assign({}, getRowTextStyles(!disabled), {
|
|
8497
|
+
return jsx(Box, {
|
|
8498
|
+
sx: Object.assign({}, compact && getRowTextStyles(!disabled), {
|
|
8476
8499
|
overflow: 'hidden',
|
|
8477
8500
|
textOverflow: 'ellipsis',
|
|
8478
8501
|
whiteSpace: 'nowrap'
|
|
8479
8502
|
}),
|
|
8480
|
-
title: parameter.collectionId,
|
|
8481
8503
|
children: parameter.collectionId
|
|
8482
|
-
})
|
|
8504
|
+
});
|
|
8483
8505
|
}
|
|
8484
8506
|
}, {
|
|
8485
8507
|
id: 'parameter',
|
|
@@ -8592,9 +8614,13 @@ var PlotTitle = function PlotTitle(_ref3) {
|
|
|
8592
8614
|
}
|
|
8593
8615
|
setDraft(undefined);
|
|
8594
8616
|
};
|
|
8595
|
-
return jsx(
|
|
8596
|
-
|
|
8597
|
-
|
|
8617
|
+
return draft === undefined ? jsx(CustomTooltip, {
|
|
8618
|
+
describeChild: true,
|
|
8619
|
+
placement: "top",
|
|
8620
|
+
title: onUpdateTitle ? jsx(Fragment, {
|
|
8621
|
+
children: label
|
|
8622
|
+
}) : '',
|
|
8623
|
+
children: jsx(Box, {
|
|
8598
8624
|
component: onUpdateTitle ? 'button' : 'span',
|
|
8599
8625
|
onClick: onUpdateTitle ? function () {
|
|
8600
8626
|
return setDraft(plot.title);
|
|
@@ -8607,14 +8633,17 @@ var PlotTitle = function PlotTitle(_ref3) {
|
|
|
8607
8633
|
background: 'none',
|
|
8608
8634
|
textAlign: 'left',
|
|
8609
8635
|
cursor: onUpdateTitle ? 'text' : 'default',
|
|
8610
|
-
|
|
8636
|
+
display: 'block',
|
|
8637
|
+
width: '100%',
|
|
8611
8638
|
textOverflow: 'ellipsis',
|
|
8612
8639
|
whiteSpace: 'nowrap',
|
|
8613
8640
|
overflow: 'hidden'
|
|
8614
8641
|
},
|
|
8615
|
-
title: onUpdateTitle ? label : undefined,
|
|
8616
8642
|
children: plot.title
|
|
8617
|
-
})
|
|
8643
|
+
})
|
|
8644
|
+
}) : jsx(ClickAwayListener, {
|
|
8645
|
+
onClickAway: commit,
|
|
8646
|
+
children: jsx(Input, {
|
|
8618
8647
|
autoFocus: true,
|
|
8619
8648
|
onBlur: commit,
|
|
8620
8649
|
onChange: function onChange(event) {
|
|
@@ -8639,6 +8668,7 @@ var PlotTitle = function PlotTitle(_ref3) {
|
|
|
8639
8668
|
sx: {
|
|
8640
8669
|
font: 'inherit',
|
|
8641
8670
|
color: 'inherit',
|
|
8671
|
+
maxWidth: '100%',
|
|
8642
8672
|
backgroundColor: 'geowebColors.textInputField.default.rgba'
|
|
8643
8673
|
},
|
|
8644
8674
|
value: draft
|
|
@@ -9049,8 +9079,19 @@ var PlotManager = function PlotManager(props) {
|
|
|
9049
9079
|
'.plot-manager-header > .plot-manager-column:not(.plot-manager-field-collection)': {
|
|
9050
9080
|
display: 'none'
|
|
9051
9081
|
},
|
|
9052
|
-
'.plot-manager-plot
|
|
9053
|
-
|
|
9082
|
+
'.plot-manager-plot': {
|
|
9083
|
+
flexWrap: 'nowrap',
|
|
9084
|
+
justifyContent: 'flex-start',
|
|
9085
|
+
'> .plot-manager-field-collection': {
|
|
9086
|
+
width: 'auto'
|
|
9087
|
+
},
|
|
9088
|
+
'> .plot-manager-field-parameter': {
|
|
9089
|
+
flex: 1
|
|
9090
|
+
},
|
|
9091
|
+
'> :last-child': {
|
|
9092
|
+
width: 'auto',
|
|
9093
|
+
flexShrink: 0
|
|
9094
|
+
}
|
|
9054
9095
|
},
|
|
9055
9096
|
'.plot-manager-plot > .plot-manager-column:not(.plot-manager-field-collection):not(.plot-manager-field-parameter)': {
|
|
9056
9097
|
display: 'none'
|
|
@@ -9435,7 +9476,7 @@ var isValidServiceUrl = function isValidServiceUrl(value) {
|
|
|
9435
9476
|
}
|
|
9436
9477
|
};
|
|
9437
9478
|
var SelectServices = function SelectServices(_ref) {
|
|
9438
|
-
var
|
|
9479
|
+
var _ref2, _ref3, _showService$type, _ref7, _showService$url2, _showService$name, _showService$descript;
|
|
9439
9480
|
var services = _ref.services,
|
|
9440
9481
|
usedServiceIds = _ref.usedServiceIds,
|
|
9441
9482
|
onAddService = _ref.onAddService,
|
|
@@ -9443,6 +9484,8 @@ var SelectServices = function SelectServices(_ref) {
|
|
|
9443
9484
|
onRemoveService = _ref.onRemoveService,
|
|
9444
9485
|
addServiceTitle = _ref.addServiceTitle,
|
|
9445
9486
|
newServiceUrl = _ref.newServiceUrl,
|
|
9487
|
+
serviceType = _ref.serviceType,
|
|
9488
|
+
onCopyServiceUrl = _ref.onCopyServiceUrl,
|
|
9446
9489
|
onCloseNewService = _ref.onCloseNewService,
|
|
9447
9490
|
loadServiceMetadata = _ref.loadServiceMetadata;
|
|
9448
9491
|
var _useSharedTranslation = useSharedTranslation(),
|
|
@@ -9496,6 +9539,7 @@ var SelectServices = function SelectServices(_ref) {
|
|
|
9496
9539
|
return service.id !== (editingService == null ? void 0 : editingService.id) && (service.name || service.id).toLowerCase() === name.trim().toLowerCase();
|
|
9497
9540
|
});
|
|
9498
9541
|
var canSave = !!name.trim() && !duplicateName && !saving && !metadataLoading && (editingService ? !!onEditService : validUrl && !duplicateUrl && !!onAddService);
|
|
9542
|
+
var displayedServiceType = (_ref2 = (_ref3 = (_showService$type = showService == null ? void 0 : showService.type) != null ? _showService$type : editingService == null ? void 0 : editingService.type) != null ? _ref3 : serviceType) != null ? _ref2 : 'EDR';
|
|
9499
9543
|
var editDialogTitle = editingService ? t('shared-edit-service') : undefined;
|
|
9500
9544
|
var dialogTitle = editDialogTitle != null ? editDialogTitle : showService ? t('shared-service') : addDialogTitle;
|
|
9501
9545
|
var urlError = adding && urlTouched && (!validUrl || duplicateUrl);
|
|
@@ -9518,7 +9562,7 @@ var SelectServices = function SelectServices(_ref) {
|
|
|
9518
9562
|
onCloseNewService();
|
|
9519
9563
|
};
|
|
9520
9564
|
var loadMetadata = /*#__PURE__*/function () {
|
|
9521
|
-
var
|
|
9565
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(value) {
|
|
9522
9566
|
var candidate, request, metadata, _metadata$description, _t;
|
|
9523
9567
|
return _regenerator().w(function (_context) {
|
|
9524
9568
|
while (1) switch (_context.p = _context.n) {
|
|
@@ -9568,7 +9612,7 @@ var SelectServices = function SelectServices(_ref) {
|
|
|
9568
9612
|
}, _callee, null, [[2, 4, 5, 6]]);
|
|
9569
9613
|
}));
|
|
9570
9614
|
return function loadMetadata(_x) {
|
|
9571
|
-
return
|
|
9615
|
+
return _ref4.apply(this, arguments);
|
|
9572
9616
|
};
|
|
9573
9617
|
}();
|
|
9574
9618
|
React.useEffect(function () {
|
|
@@ -9591,7 +9635,7 @@ var SelectServices = function SelectServices(_ref) {
|
|
|
9591
9635
|
};
|
|
9592
9636
|
}, []);
|
|
9593
9637
|
var submit = /*#__PURE__*/function () {
|
|
9594
|
-
var
|
|
9638
|
+
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
9595
9639
|
var session, details, _t2;
|
|
9596
9640
|
return _regenerator().w(function (_context2) {
|
|
9597
9641
|
while (1) switch (_context2.p = _context2.n) {
|
|
@@ -9651,7 +9695,7 @@ var SelectServices = function SelectServices(_ref) {
|
|
|
9651
9695
|
}, _callee2, null, [[2, 6, 7, 8]]);
|
|
9652
9696
|
}));
|
|
9653
9697
|
return function submit() {
|
|
9654
|
-
return
|
|
9698
|
+
return _ref5.apply(this, arguments);
|
|
9655
9699
|
};
|
|
9656
9700
|
}();
|
|
9657
9701
|
return jsxs(Fragment, {
|
|
@@ -9713,6 +9757,7 @@ var SelectServices = function SelectServices(_ref) {
|
|
|
9713
9757
|
children: [].concat(services).sort(function (first, second) {
|
|
9714
9758
|
return first.name.localeCompare(second.name);
|
|
9715
9759
|
}).map(function (service) {
|
|
9760
|
+
var isInUse = usedServiceIds.includes(service.id);
|
|
9716
9761
|
return jsx(ListItem, {
|
|
9717
9762
|
secondaryAction: jsxs(Grid, {
|
|
9718
9763
|
container: true,
|
|
@@ -9752,14 +9797,20 @@ var SelectServices = function SelectServices(_ref) {
|
|
|
9752
9797
|
},
|
|
9753
9798
|
tooltipTitle: t('shared-show-service'),
|
|
9754
9799
|
children: jsx(Visibility, {})
|
|
9755
|
-
}), onRemoveService && service.scope === 'user' ? jsx(
|
|
9756
|
-
|
|
9757
|
-
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
|
|
9761
|
-
|
|
9762
|
-
|
|
9800
|
+
}), onRemoveService && service.scope === 'user' ? jsx(CustomTooltip, {
|
|
9801
|
+
describeChild: true,
|
|
9802
|
+
placement: isInUse ? 'left' : 'top',
|
|
9803
|
+
title: t(isInUse ? 'shared-cannot-delete-service' : 'shared-delete-service'),
|
|
9804
|
+
children: jsx("span", {
|
|
9805
|
+
children: jsx(CustomIconButton, {
|
|
9806
|
+
"aria-label": t('shared-delete-service') + " " + service.name,
|
|
9807
|
+
disabled: isInUse,
|
|
9808
|
+
onClick: function onClick() {
|
|
9809
|
+
return onRemoveService(service.id);
|
|
9810
|
+
},
|
|
9811
|
+
children: jsx(Delete, {})
|
|
9812
|
+
})
|
|
9813
|
+
})
|
|
9763
9814
|
}) : null]
|
|
9764
9815
|
}),
|
|
9765
9816
|
children: jsx(ListItemText, {
|
|
@@ -9889,8 +9940,10 @@ var SelectServices = function SelectServices(_ref) {
|
|
|
9889
9940
|
position: "end",
|
|
9890
9941
|
children: jsx(CustomIconButton, {
|
|
9891
9942
|
onClick: function onClick() {
|
|
9892
|
-
var
|
|
9893
|
-
void navigator.clipboard.writeText((
|
|
9943
|
+
var _ref6, _showService$url;
|
|
9944
|
+
void navigator.clipboard.writeText((_ref6 = (_showService$url = showService == null ? void 0 : showService.url) != null ? _showService$url : editingService == null ? void 0 : editingService.url) != null ? _ref6 : url).then(function () {
|
|
9945
|
+
return onCopyServiceUrl == null ? void 0 : onCopyServiceUrl();
|
|
9946
|
+
}, function () {
|
|
9894
9947
|
return setSubmitError(t('shared-copy-failed'));
|
|
9895
9948
|
});
|
|
9896
9949
|
},
|
|
@@ -9903,7 +9956,7 @@ var SelectServices = function SelectServices(_ref) {
|
|
|
9903
9956
|
sx: {
|
|
9904
9957
|
marginBottom: 2
|
|
9905
9958
|
},
|
|
9906
|
-
value: (
|
|
9959
|
+
value: (_ref7 = (_showService$url2 = showService == null ? void 0 : showService.url) != null ? _showService$url2 : editingService == null ? void 0 : editingService.url) != null ? _ref7 : url,
|
|
9907
9960
|
variant: "filled"
|
|
9908
9961
|
}), jsx(TextField, {
|
|
9909
9962
|
disabled: !!showService || saving,
|
|
@@ -9937,10 +9990,10 @@ var SelectServices = function SelectServices(_ref) {
|
|
|
9937
9990
|
fullWidth: true,
|
|
9938
9991
|
label: t('shared-type'),
|
|
9939
9992
|
select: true,
|
|
9940
|
-
value:
|
|
9993
|
+
value: displayedServiceType,
|
|
9941
9994
|
children: jsx(MenuItem, {
|
|
9942
|
-
value:
|
|
9943
|
-
children:
|
|
9995
|
+
value: displayedServiceType,
|
|
9996
|
+
children: displayedServiceType
|
|
9944
9997
|
})
|
|
9945
9998
|
})]
|
|
9946
9999
|
})
|
|
@@ -9960,6 +10013,7 @@ var chipStyle = {
|
|
|
9960
10013
|
};
|
|
9961
10014
|
var ParameterSelect = function ParameterSelect(_ref) {
|
|
9962
10015
|
var title = _ref.title,
|
|
10016
|
+
testId = _ref['data-testid'],
|
|
9963
10017
|
isOpen = _ref.isOpen,
|
|
9964
10018
|
onClose = _ref.onClose,
|
|
9965
10019
|
services = _ref.services,
|
|
@@ -9983,7 +10037,9 @@ var ParameterSelect = function ParameterSelect(_ref) {
|
|
|
9983
10037
|
isLoading = _ref.isLoading,
|
|
9984
10038
|
error = _ref.error,
|
|
9985
10039
|
containerProps = _ref.containerProps,
|
|
9986
|
-
addServiceTitle = _ref.addServiceTitle
|
|
10040
|
+
addServiceTitle = _ref.addServiceTitle,
|
|
10041
|
+
serviceType = _ref.serviceType,
|
|
10042
|
+
onCopyServiceUrl = _ref.onCopyServiceUrl;
|
|
9987
10043
|
var _useSharedTranslation = useSharedTranslation(),
|
|
9988
10044
|
t = _useSharedTranslation.t;
|
|
9989
10045
|
var resultsLabel = function resultsLabel(count) {
|
|
@@ -10034,7 +10090,12 @@ var ParameterSelect = function ParameterSelect(_ref) {
|
|
|
10034
10090
|
var lastExpansionRequest = React.useRef(undefined);
|
|
10035
10091
|
var targetKey = collectionTarget ? JSON.stringify([collectionTarget.serviceId, collectionTarget.collectionId, collectionTarget.requestKey]) : undefined;
|
|
10036
10092
|
React.useEffect(function () {
|
|
10037
|
-
if (!isOpen || !collectionTarget
|
|
10093
|
+
if (!isOpen || !collectionTarget) {
|
|
10094
|
+
lastNavigation.current = undefined;
|
|
10095
|
+
lastExpansionRequest.current = undefined;
|
|
10096
|
+
return undefined;
|
|
10097
|
+
}
|
|
10098
|
+
if (targetKey === lastNavigation.current) {
|
|
10038
10099
|
return undefined;
|
|
10039
10100
|
}
|
|
10040
10101
|
var key = getCollectionKey({
|
|
@@ -10078,6 +10139,7 @@ var ParameterSelect = function ParameterSelect(_ref) {
|
|
|
10078
10139
|
return collection.serviceId;
|
|
10079
10140
|
});
|
|
10080
10141
|
return jsxs(DraggableComponent, Object.assign({
|
|
10142
|
+
"data-testid": testId,
|
|
10081
10143
|
minHeight: 200,
|
|
10082
10144
|
minWidth: 320,
|
|
10083
10145
|
order: 2,
|
|
@@ -10127,7 +10189,7 @@ var ParameterSelect = function ParameterSelect(_ref) {
|
|
|
10127
10189
|
serviceIds: serviceIds
|
|
10128
10190
|
});
|
|
10129
10191
|
}
|
|
10130
|
-
}), jsx(Box, {
|
|
10192
|
+
}, targetKey), jsx(Box, {
|
|
10131
10193
|
sx: {
|
|
10132
10194
|
position: 'absolute',
|
|
10133
10195
|
margin: '64px 0 0 calc(100% - 40px)',
|
|
@@ -10142,8 +10204,10 @@ var ParameterSelect = function ParameterSelect(_ref) {
|
|
|
10142
10204
|
onCloseNewService: function onCloseNewService() {
|
|
10143
10205
|
return setNewServiceUrl(undefined);
|
|
10144
10206
|
},
|
|
10207
|
+
onCopyServiceUrl: onCopyServiceUrl,
|
|
10145
10208
|
onEditService: onEditService,
|
|
10146
10209
|
onRemoveService: onRemoveService,
|
|
10210
|
+
serviceType: serviceType,
|
|
10147
10211
|
services: services,
|
|
10148
10212
|
usedServiceIds: [].concat(usedServiceIds, serviceIdsInUse)
|
|
10149
10213
|
})
|
|
@@ -10532,4 +10596,4 @@ var SystemScope = {
|
|
|
10532
10596
|
plugin: 'plugin'
|
|
10533
10597
|
};
|
|
10534
10598
|
|
|
10535
|
-
export { AlertBanner, AlertIcon, AppHeader, AppLayout, Avatar, CanvasComponent, ConfirmationButtons, ConfirmationDialog, ConfirmationServiceProvider, CustomAccordion, CustomDialog, CustomDialogHeader, CustomIconButton, CustomSlider, CustomToggleButton, CustomTooltip, DEBOUNCE_TIMEOUT, DEFAULT_ERROR_MESSAGE, DEFAULT_FILTER_HEIGHT, DateTimePicker, DraggableComponent$1 as Draggable, ErrorBoundary, Filter, FilterChip, FilterOption, LastUpdateTime, LegendToggleButton, NumberWithUnitField, PANEL_COLLAPSED_SIZE, PROJECTION, ParameterInfoDialog, ParameterSelect, PlotManager, ResizeComponent as Resizable, ResizablePanel, ResizablePanelStandalone, SHARED_NAMESPACE, SearchField$1 as SearchField, SearchFieldButton, SearchHighlight, SessionStorageKey, SortablePanels, StatusTag, StorybookDocsWrapper, StyledSelect, SwitchButton, SystemScope, ToggleMenu, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, TooltipSelect, UserMenu, UserMenuItemCheatSheet, MenuItemTheme as UserMenuItemTheme, adjustPosition, browserNavigation, calculateDialogSizeAndPosition, calculateStartSize, convertNumericInputValue, index$1 as dateUtils, defaultDelay, getAllowedKeys, getAxiosErrorMessage, getAxiosWarningMessage, getErrorMessage, getInitials, getLastUpdateTitle, getPosition, getWarningMessage, isAuthError, isAxiosAuthError, isAxiosError, isDialogFocused, isTargetInteractiveInput, linkifyText, loadAllTranslations, pickerDateToUTC, pollingIntervalTimeout, index as referenceTimeUtils, renderCounter, safelyInitI18nForTestsAndStories, sessionStorageProvider, sharedTranslations, showPrompt, sliderHeaderStyle, tooltipContainerStyles, useConfirmationDialog, useControlledTooltip, useDebounce, useDialogActions, useIsMounted, useMakeSureContainerStaysInsideWindow, usePoller, usePreventBrowserClose, usePrevious, useResizeObserver, useScrollingInIsolation, useUserMenu, useWheelStopPropagation, utcToPickerDate };
|
|
10599
|
+
export { AlertBanner, AlertIcon, AppHeader, AppLayout, Avatar, CanvasComponent, ConfirmationButtons, ConfirmationDialog, ConfirmationServiceProvider, CustomAccordion, CustomDialog, CustomDialogHeader, CustomIconButton, CustomSlider, CustomToggleButton, CustomTooltip, DEBOUNCE_TIMEOUT, DEFAULT_ERROR_MESSAGE, DEFAULT_FILTER_HEIGHT, DateTimePicker, DraggableComponent$1 as Draggable, EARTH_MEAN_RADIUS_KM, ErrorBoundary, Filter, FilterChip, FilterOption, LastUpdateTime, LegendToggleButton, NumberWithUnitField, PANEL_COLLAPSED_SIZE, PROJECTION, ParameterInfoDialog, ParameterSelect, PlotManager, ResizeComponent as Resizable, ResizablePanel, ResizablePanelStandalone, SHARED_NAMESPACE, SearchField$1 as SearchField, SearchFieldButton, SearchHighlight, SessionStorageKey, SortablePanels, StatusTag, StorybookDocsWrapper, StyledSelect, SwitchButton, SystemScope, ToggleMenu, ToolContainer, DraggableComponent as ToolContainerDraggable, ToolFooter, ToolHeader, TooltipSelect, UserMenu, UserMenuItemCheatSheet, MenuItemTheme as UserMenuItemTheme, adjustPosition, browserNavigation, calculateDialogSizeAndPosition, calculateStartSize, convertNumericInputValue, index$1 as dateUtils, defaultDelay, getAllowedKeys, getAxiosErrorMessage, getAxiosWarningMessage, getErrorMessage, getInitials, getLastUpdateTitle, getPosition, getWarningMessage, isAuthError, isAxiosAuthError, isAxiosError, isDialogFocused, isTargetInteractiveInput, linkifyText, loadAllTranslations, pickerDateToUTC, pollingIntervalTimeout, index as referenceTimeUtils, renderCounter, safelyInitI18nForTestsAndStories, sessionStorageProvider, sharedTranslations, showPrompt, sliderHeaderStyle, tooltipContainerStyles, useConfirmationDialog, useControlledTooltip, useDebounce, useDialogActions, useIsMounted, useMakeSureContainerStaysInsideWindow, usePoller, usePreventBrowserClose, usePrevious, useResizeObserver, useScrollingInIsolation, useUserMenu, useWheelStopPropagation, utcToPickerDate };
|
|
@@ -6,6 +6,7 @@ export interface PlotManagerService {
|
|
|
6
6
|
name: string;
|
|
7
7
|
url: string;
|
|
8
8
|
description?: string;
|
|
9
|
+
type?: string;
|
|
9
10
|
scope?: 'user' | 'system' | 'plugin';
|
|
10
11
|
isLoading?: boolean;
|
|
11
12
|
}
|
|
@@ -23,7 +24,10 @@ export interface ParameterSelectFilters {
|
|
|
23
24
|
}
|
|
24
25
|
export interface ParameterSelectProps<P> {
|
|
25
26
|
title?: string;
|
|
27
|
+
'data-testid'?: string;
|
|
26
28
|
addServiceTitle?: string;
|
|
29
|
+
serviceType?: string;
|
|
30
|
+
onCopyServiceUrl?: () => void;
|
|
27
31
|
isOpen: boolean;
|
|
28
32
|
onClose: () => void;
|
|
29
33
|
services: PlotManagerService[];
|
|
@@ -50,4 +54,4 @@ export interface ParameterSelectProps<P> {
|
|
|
50
54
|
error?: string;
|
|
51
55
|
containerProps?: Omit<React.ComponentProps<typeof ToolContainerDraggable>, 'children' | 'title' | 'isOpen' | 'onClose'>;
|
|
52
56
|
}
|
|
53
|
-
export declare const ParameterSelect: <P>({ title, isOpen, onClose, services, collections, getParameterId, getParameterLabel, getParameterSearchText, filters: controlledFilters, onFiltersChange, collectionTarget, loadServiceMetadata, selectedParameterIds, serviceIdsInUse, onToggleParameter, onAddService, onEditService, onRemoveService, renderParameterInfo, isLoading, error, containerProps, addServiceTitle, }: ParameterSelectProps<P>) => React.ReactElement;
|
|
57
|
+
export declare const ParameterSelect: <P>({ title, "data-testid": testId, isOpen, onClose, services, collections, getParameterId, getParameterLabel, getParameterSearchText, filters: controlledFilters, onFiltersChange, collectionTarget, loadServiceMetadata, selectedParameterIds, serviceIdsInUse, onToggleParameter, onAddService, onEditService, onRemoveService, renderParameterInfo, isLoading, error, containerProps, addServiceTitle, serviceType, onCopyServiceUrl, }: ParameterSelectProps<P>) => React.ReactElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ParameterSelectProps, PlotManagerService } from './ParameterSelect';
|
|
3
|
-
export declare const SelectServices: ({ services, usedServiceIds, onAddService, onEditService, onRemoveService, addServiceTitle, newServiceUrl, onCloseNewService, loadServiceMetadata, }: {
|
|
3
|
+
export declare const SelectServices: ({ services, usedServiceIds, onAddService, onEditService, onRemoveService, addServiceTitle, newServiceUrl, serviceType, onCopyServiceUrl, onCloseNewService, loadServiceMetadata, }: {
|
|
4
4
|
services: PlotManagerService[];
|
|
5
5
|
usedServiceIds: string[];
|
|
6
6
|
loadServiceMetadata?: ParameterSelectProps<unknown>["loadServiceMetadata"];
|
|
@@ -9,5 +9,7 @@ export declare const SelectServices: ({ services, usedServiceIds, onAddService,
|
|
|
9
9
|
onRemoveService?: (id: string) => void;
|
|
10
10
|
addServiceTitle?: string;
|
|
11
11
|
newServiceUrl?: string;
|
|
12
|
+
serviceType?: string;
|
|
13
|
+
onCopyServiceUrl?: () => void;
|
|
12
14
|
onCloseNewService: () => void;
|
|
13
15
|
}) => React.ReactElement;
|
|
@@ -67,7 +67,7 @@ interface NdArray {
|
|
|
67
67
|
type Ranges = Record<string, NdArray>;
|
|
68
68
|
type Description = Record<string, string>;
|
|
69
69
|
type Label = Record<string, string>;
|
|
70
|
-
interface
|
|
70
|
+
export interface CoverageParameter {
|
|
71
71
|
type: 'Parameter';
|
|
72
72
|
id?: string;
|
|
73
73
|
label?: Label;
|
|
@@ -90,9 +90,38 @@ export interface Coverage<T extends CoverageDomain> {
|
|
|
90
90
|
export interface CoverageCollection<T extends CoverageDomain> {
|
|
91
91
|
type: 'CoverageCollection';
|
|
92
92
|
domainType: string;
|
|
93
|
-
parameters: Record<string,
|
|
93
|
+
parameters: Record<string, CoverageParameter>;
|
|
94
94
|
ranges: Record<string, NdArray>;
|
|
95
95
|
coverages: Coverage<T>[];
|
|
96
96
|
referencing: Referencing[];
|
|
97
97
|
}
|
|
98
|
+
export type TrajectoryPosition = [t: string, x: number, y: number, z?: number];
|
|
99
|
+
interface TrajectoryAxes {
|
|
100
|
+
composite: {
|
|
101
|
+
dataType: 'tuple';
|
|
102
|
+
coordinates: string[];
|
|
103
|
+
values: TrajectoryPosition[];
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
export interface TrajectoryDomain {
|
|
107
|
+
type: 'Domain';
|
|
108
|
+
domainType?: 'Trajectory';
|
|
109
|
+
axes: TrajectoryAxes;
|
|
110
|
+
referencing?: Referencing[];
|
|
111
|
+
}
|
|
112
|
+
export interface TrajectoryNdArray extends Omit<NdArray, 'values'> {
|
|
113
|
+
values: (number | null)[];
|
|
114
|
+
}
|
|
115
|
+
export interface TrajectoryCoverage {
|
|
116
|
+
type: 'Coverage';
|
|
117
|
+
domain: TrajectoryDomain;
|
|
118
|
+
ranges: Partial<Record<string, TrajectoryNdArray>>;
|
|
119
|
+
}
|
|
120
|
+
export interface TrajectoryCoverageCollection {
|
|
121
|
+
type: 'CoverageCollection';
|
|
122
|
+
domainType: 'Trajectory';
|
|
123
|
+
parameters: Record<string, CoverageParameter>;
|
|
124
|
+
coverages: TrajectoryCoverage[];
|
|
125
|
+
referencing?: Referencing[];
|
|
126
|
+
}
|
|
98
127
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EARTH_MEAN_RADIUS_KM = 6371;
|
|
@@ -2,6 +2,7 @@ export * from './axiosErrorUtils';
|
|
|
2
2
|
export { browserNavigation } from './browserNavigation';
|
|
3
3
|
export * as dateUtils from './dateUtils';
|
|
4
4
|
export * as referenceTimeUtils from './referenceTimeUtils';
|
|
5
|
+
export * from './geoConstants';
|
|
5
6
|
export * from './linkify';
|
|
6
7
|
export * from './mapProjections';
|
|
7
8
|
export { renderCounter } from './renderCounter';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/shared",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.3.0",
|
|
4
4
|
"description": "GeoWeb shared library with shared components and utils for the opengeoweb project",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@opengeoweb/theme": "21.
|
|
23
|
+
"@opengeoweb/theme": "21.3.0",
|
|
24
24
|
"react-draggable": "^4.4.6",
|
|
25
25
|
"react-resizable-layout": "^0.7.3",
|
|
26
26
|
"react-sortablejs": "^6.1.4",
|