qwc2 2025.11.5 → 2025.11.12
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/actions/layers.js +6 -29
- package/components/AttributeForm.js +106 -77
- package/components/AttributeTableWidget.js +89 -88
- package/components/IdentifyViewer.js +4 -2
- package/components/LinkFeatureForm.js +17 -9
- package/components/LocationRecorder.js +1 -1
- package/components/PickFeature.js +45 -33
- package/components/QtDesignerForm.js +20 -18
- package/components/StandardApp.js +4 -0
- package/components/ThemeList.js +9 -10
- package/package.json +2 -1
- package/plugins/Cyclomedia.js +1 -1
- package/plugins/Editing.js +307 -72
- package/plugins/FeatureForm.js +103 -111
- package/plugins/LayerTree.js +4 -1
- package/plugins/NewsPopup.js +2 -2
- package/plugins/Portal.js +3 -1
- package/plugins/Print.js +4 -4
- package/plugins/ThemeSwitcher.js +3 -0
- package/plugins/map/EditingSupport.js +2 -2
- package/plugins/map/RedliningSupport.js +1 -1
- package/plugins/style/Editing.css +34 -0
- package/reducers/editing.js +12 -7
- package/reducers/layers.js +27 -5
- package/static/translations/bg-BG.json +9 -0
- package/static/translations/ca-ES.json +9 -0
- package/static/translations/cs-CZ.json +9 -0
- package/static/translations/de-CH.json +9 -0
- package/static/translations/de-DE.json +9 -0
- package/static/translations/en-US.json +9 -0
- package/static/translations/es-ES.json +9 -0
- package/static/translations/fi-FI.json +9 -0
- package/static/translations/fr-FR.json +9 -0
- package/static/translations/hu-HU.json +9 -0
- package/static/translations/it-IT.json +9 -0
- package/static/translations/ja-JP.json +9 -0
- package/static/translations/nl-NL.json +9 -0
- package/static/translations/no-NO.json +9 -0
- package/static/translations/pl-PL.json +9 -0
- package/static/translations/pt-BR.json +9 -0
- package/static/translations/pt-PT.json +9 -0
- package/static/translations/ro-RO.json +9 -0
- package/static/translations/ru-RU.json +9 -0
- package/static/translations/sv-SE.json +9 -0
- package/static/translations/tr-TR.json +9 -0
- package/static/translations/tsconfig.json +9 -0
- package/static/translations/uk-UA.json +9 -0
- package/utils/EditingUtils.js +11 -9
- package/utils/ElevationInterface.js +1 -2
- package/utils/LayerUtils.js +5 -3
- package/utils/ServiceLayerUtils.js +53 -2
- package/utils/ThemeUtils.js +3 -1
|
@@ -34,6 +34,7 @@ import { LayerRole } from '../actions/layers';
|
|
|
34
34
|
import ConfigUtils from './ConfigUtils';
|
|
35
35
|
import CoordinatesUtils from './CoordinatesUtils';
|
|
36
36
|
import LayerUtils from './LayerUtils';
|
|
37
|
+
import LocaleUtils from './LocaleUtils';
|
|
37
38
|
import MiscUtils from './MiscUtils';
|
|
38
39
|
function strcmp(a, b) {
|
|
39
40
|
var al = a.toLowerCase();
|
|
@@ -298,6 +299,20 @@ var ServiceLayerUtils = {
|
|
|
298
299
|
} catch (e) {
|
|
299
300
|
/* pass */
|
|
300
301
|
}
|
|
302
|
+
var editConfigUrl = null;
|
|
303
|
+
var wmsName = null;
|
|
304
|
+
try {
|
|
305
|
+
editConfigUrl = layer.EditConfig.OnlineResource.href;
|
|
306
|
+
wmsName = layer.EditConfig.wms_name;
|
|
307
|
+
} catch (e) {
|
|
308
|
+
/* pass */
|
|
309
|
+
}
|
|
310
|
+
var translationsUrl = null;
|
|
311
|
+
try {
|
|
312
|
+
translationsUrl = layer.Traslations.OnlineResource.href;
|
|
313
|
+
} catch (e) {
|
|
314
|
+
/* pass */
|
|
315
|
+
}
|
|
301
316
|
var dimensions = [];
|
|
302
317
|
MiscUtils.ensureArray(layer.Dimension).forEach(function (dim) {
|
|
303
318
|
var _dim$fieldName, _dim$endFieldName;
|
|
@@ -327,6 +342,9 @@ var ServiceLayerUtils = {
|
|
|
327
342
|
url: getMapUrl,
|
|
328
343
|
featureInfoUrl: featureInfoUrl,
|
|
329
344
|
legendUrl: legendUrl,
|
|
345
|
+
editConfigUrl: editConfigUrl,
|
|
346
|
+
translationsUrl: translationsUrl,
|
|
347
|
+
wms_name: wmsName,
|
|
330
348
|
version: version,
|
|
331
349
|
infoFormats: infoFormats,
|
|
332
350
|
mapFormats: mapFormats,
|
|
@@ -341,7 +359,8 @@ var ServiceLayerUtils = {
|
|
|
341
359
|
maxScale: layer.MinScaleDenominator !== undefined ? Number(layer.MaxScaleDenominator) : undefined,
|
|
342
360
|
dimensions: dimensions,
|
|
343
361
|
styles: styles,
|
|
344
|
-
style: style
|
|
362
|
+
style: style,
|
|
363
|
+
serverType: translationsUrl ? 'qgis' : null // If there is a translationsUrl, assume it is the qwc-ogc-service
|
|
345
364
|
};
|
|
346
365
|
},
|
|
347
366
|
getWFSLayers: function getWFSLayers(capabilities, calledServiceUrl, mapCrs) {
|
|
@@ -606,7 +625,39 @@ var ServiceLayerUtils = {
|
|
|
606
625
|
LAYERS: layerConfig.name
|
|
607
626
|
};
|
|
608
627
|
}
|
|
609
|
-
|
|
628
|
+
var metadataRequests = [new Promise(function (resolve, reject) {
|
|
629
|
+
if (layer.editConfigUrl) {
|
|
630
|
+
axios.get(layer.editConfigUrl).then(function (response) {
|
|
631
|
+
layer.editConfig = response.data;
|
|
632
|
+
delete layer.editConfigUrl;
|
|
633
|
+
resolve();
|
|
634
|
+
})["catch"](function (e) {
|
|
635
|
+
delete layer.editConfigUrl;
|
|
636
|
+
resolve();
|
|
637
|
+
});
|
|
638
|
+
} else {
|
|
639
|
+
resolve();
|
|
640
|
+
}
|
|
641
|
+
}), new Promise(function (resolve, reject) {
|
|
642
|
+
if (layer.translationsUrl) {
|
|
643
|
+
axios.get(layer.translationsUrl.replace('{lang}', LocaleUtils.lang())).then(function (response) {
|
|
644
|
+
layer.translations = response.data;
|
|
645
|
+
delete layer.translationsUrl;
|
|
646
|
+
resolve();
|
|
647
|
+
})["catch"](function (e) {
|
|
648
|
+
delete layer.translationsUrl;
|
|
649
|
+
resolve();
|
|
650
|
+
});
|
|
651
|
+
} else {
|
|
652
|
+
resolve();
|
|
653
|
+
}
|
|
654
|
+
})];
|
|
655
|
+
Promise.all(metadataRequests).then(function () {
|
|
656
|
+
if (layer.translations) {
|
|
657
|
+
layer = LayerUtils.applyTranslations(layer, layer.translations);
|
|
658
|
+
}
|
|
659
|
+
callback(layerConfig.id, layer);
|
|
660
|
+
});
|
|
610
661
|
} else {
|
|
611
662
|
// eslint-disable-next-line
|
|
612
663
|
console.warn("Could not find layer " + layerConfig.name);
|
package/utils/ThemeUtils.js
CHANGED
|
@@ -173,7 +173,9 @@ var ThemeUtils = {
|
|
|
173
173
|
LayerUtils.completeExternalLayer(res[cur.internalLayer], LayerUtils.searchSubLayer(theme, 'name', cur.internalLayer));
|
|
174
174
|
return res;
|
|
175
175
|
}, {})),
|
|
176
|
-
translations: theme.translations
|
|
176
|
+
translations: theme.translations,
|
|
177
|
+
editConfig: theme.editConfig,
|
|
178
|
+
wms_name: theme.wms_name
|
|
177
179
|
};
|
|
178
180
|
layer = LayerUtils.recomputeLayerBBox(layer);
|
|
179
181
|
// Drawing order only makes sense if layer reordering is disabled
|