@redus/georedus-ui 0.20.1 → 0.20.3
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/CHANGELOG.md +12 -0
- package/dist/main.js +21 -14
- package/dist/viewSpecs/presets/vector_line/index.d.ts +11 -1
- package/dist/viewSpecs/presets/vector_point_continuous/index.d.ts +2 -0
- package/dist/viewSpecs/presets/vector_point_single/index.d.ts +2 -0
- package/dist/viewSpecs/presets/vector_polygon_categorical/index.d.ts +2 -0
- package/dist/viewSpecs/presets/vector_polygon_continuous/index.d.ts +2 -0
- package/dist/viewSpecs/presets/vector_polygon_single/index.d.ts +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/main.js
CHANGED
|
@@ -37,7 +37,7 @@ import Highlighter from 'react-highlight-words';
|
|
|
37
37
|
import { LinkedinShareButton, LinkedinIcon, EmailShareButton, EmailIcon, FacebookShareButton, FacebookIcon, TwitterShareButton, TwitterIcon, WhatsappShareButton, WhatsappIcon } from 'react-share';
|
|
38
38
|
import CopyToClipboard from 'react-copy-to-clipboard';
|
|
39
39
|
import { Legend } from '@orioro/react-chart-util';
|
|
40
|
-
import QRCode from 'react-qr-code';
|
|
40
|
+
import { QRCode } from 'react-qr-code';
|
|
41
41
|
import { useMap, useControl, AttributionControl, ScaleControl, GeolocateControl, FullscreenControl, NavigationControl } from 'react-map-gl/maplibre';
|
|
42
42
|
import { createPortal } from 'react-dom';
|
|
43
43
|
import { toBlob } from 'html-to-image';
|
|
@@ -7037,10 +7037,10 @@ function _main_fill_legends$2(props, viewSpec, allViewSpecs, context) {
|
|
|
7037
7037
|
return {
|
|
7038
7038
|
id: cat.value,
|
|
7039
7039
|
label: cat.label,
|
|
7040
|
-
color: cat.color,
|
|
7040
|
+
color: resolveColor(cat.color),
|
|
7041
7041
|
box: {
|
|
7042
7042
|
style: {
|
|
7043
|
-
backgroundColor: applyOpacity(cat.color, DEFAULT_FILL_OPACITY$1)
|
|
7043
|
+
backgroundColor: applyOpacity(resolveColor(cat.color), DEFAULT_FILL_OPACITY$1)
|
|
7044
7044
|
}
|
|
7045
7045
|
}
|
|
7046
7046
|
};
|
|
@@ -7057,7 +7057,7 @@ function _main_fill$2(props, viewSpec, allViewSpecs, context) {
|
|
|
7057
7057
|
var _ref3 = _slicedToArray(_ref2, 1),
|
|
7058
7058
|
resolvedFillPattern = _ref3[0];
|
|
7059
7059
|
var resolvedFillPatternStr = resolvedFillPattern && resolvedFillPattern !== FILL_PATTERN_SOLID ? ['match', ['get', viewSpec.style.categoryKey]].concat(_toConsumableArray(ctx.view.metadata.categories.map(function (cat) {
|
|
7060
|
-
return [cat.value, "".concat(resolvedFillPattern, "({ stroke: \"").concat(cat.color, "\", scale: 0.5 })")];
|
|
7060
|
+
return [cat.value, "".concat(resolvedFillPattern, "({ stroke: \"").concat(resolveColor(cat.color), "\", scale: 0.5 })")];
|
|
7061
7061
|
}).flat()), ['#CCCCCC']) : null;
|
|
7062
7062
|
return _objectSpread2({
|
|
7063
7063
|
'fill-color': _maplibreColorExp,
|
|
@@ -7084,7 +7084,7 @@ function layers$4(viewSpec, allViewSpecs, context) {
|
|
|
7084
7084
|
}
|
|
7085
7085
|
var _maplibreColorExp = resolve.fn(function (ctx) {
|
|
7086
7086
|
return ['match', ['get', viewSpec.style.categoryKey]].concat(_toConsumableArray(ctx.view.metadata.categories.map(function (cat) {
|
|
7087
|
-
return [cat.value, cat.color];
|
|
7087
|
+
return [cat.value, resolveColor(cat.color)];
|
|
7088
7088
|
}).flat()), ['#CCCCCC']);
|
|
7089
7089
|
});
|
|
7090
7090
|
var _fillPattern = resolve.fn(function (ctx) {
|
|
@@ -7125,7 +7125,7 @@ function vector_polygon_categorical(_ref, allViewSpecs, context) {
|
|
|
7125
7125
|
viewSpec = _objectSpread2(_objectSpread2({}, viewSpec), {}, {
|
|
7126
7126
|
style: parseStyleSpec$4(style)
|
|
7127
7127
|
});
|
|
7128
|
-
return _objectSpread2(_objectSpread2({}, pick(viewSpec, ['id', 'path', 'label', 'sourceLabel'])), {}, {
|
|
7128
|
+
return _objectSpread2(_objectSpread2({}, pick(viewSpec, ['id', 'path', 'label', 'sourceLabel', 'metodology', 'shortDescription'])), {}, {
|
|
7129
7129
|
confSchema: confSchema$3(),
|
|
7130
7130
|
metadata: metadata$4(viewSpec, allViewSpecs, context),
|
|
7131
7131
|
sources: sources$4(viewSpec, allViewSpecs, context),
|
|
@@ -7310,7 +7310,7 @@ function vector_polygon_single(_ref, allViewSpecs, context) {
|
|
|
7310
7310
|
viewSpec = _objectSpread2(_objectSpread2({}, viewSpec), {}, {
|
|
7311
7311
|
style: parseStyleSpec$3(style)
|
|
7312
7312
|
});
|
|
7313
|
-
return _objectSpread2(_objectSpread2({}, pick(viewSpec, ['id', 'path', 'label', 'sourceLabel'])), {}, {
|
|
7313
|
+
return _objectSpread2(_objectSpread2({}, pick(viewSpec, ['id', 'path', 'label', 'sourceLabel', 'metodology', 'shortDescription'])), {}, {
|
|
7314
7314
|
confSchema: confSchema$2(viewSpec),
|
|
7315
7315
|
metadata: metadata$3(viewSpec),
|
|
7316
7316
|
sources: sources$3(viewSpec, allViewSpecs, context),
|
|
@@ -7622,7 +7622,7 @@ function vector_polygon_continuous(_ref, allViewSpecs, context) {
|
|
|
7622
7622
|
viewSpec = _objectSpread2(_objectSpread2({}, viewSpec), {}, {
|
|
7623
7623
|
style: parseStyleSpec$2(style)
|
|
7624
7624
|
});
|
|
7625
|
-
return _objectSpread2(_objectSpread2({}, pick(viewSpec, ['id', 'path', 'label', 'sourceLabel'])), {}, {
|
|
7625
|
+
return _objectSpread2(_objectSpread2({}, pick(viewSpec, ['id', 'path', 'label', 'sourceLabel', 'metodology', 'shortDescription'])), {}, {
|
|
7626
7626
|
confSchema: confSchema$1(viewSpec),
|
|
7627
7627
|
metadata: metadata$2(viewSpec, allViewSpecs, context),
|
|
7628
7628
|
sources: sources$2(viewSpec, allViewSpecs, context),
|
|
@@ -7631,7 +7631,7 @@ function vector_polygon_continuous(_ref, allViewSpecs, context) {
|
|
|
7631
7631
|
});
|
|
7632
7632
|
}
|
|
7633
7633
|
|
|
7634
|
-
var _excluded$9 = ["label", "line", "color", "tiles", "source_layer", "sources", "layers", "tooltip"];
|
|
7634
|
+
var _excluded$9 = ["label", "line", "color", "tiles", "source_layer", "sources", "layers", "tooltip", "download_url"];
|
|
7635
7635
|
var LINE_PATTERN_OPTIONS = [{
|
|
7636
7636
|
label: 'Continua',
|
|
7637
7637
|
value: 'line'
|
|
@@ -7661,6 +7661,8 @@ function vector_line(_ref, allViewSpecs, context) {
|
|
|
7661
7661
|
layers = _ref$layers === void 0 ? {} : _ref$layers,
|
|
7662
7662
|
_ref$tooltip = _ref.tooltip,
|
|
7663
7663
|
tooltip = _ref$tooltip === void 0 ? {} : _ref$tooltip,
|
|
7664
|
+
_ref$download_url = _ref.download_url,
|
|
7665
|
+
download_url = _ref$download_url === void 0 ? "" : _ref$download_url,
|
|
7664
7666
|
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
7665
7667
|
if (!source_layer) {
|
|
7666
7668
|
throw new Error('source_layer must be defined');
|
|
@@ -7747,7 +7749,13 @@ function vector_line(_ref, allViewSpecs, context) {
|
|
|
7747
7749
|
paint: _linePattern,
|
|
7748
7750
|
legends: [_legend],
|
|
7749
7751
|
tooltip: basicTooltip(tooltip)
|
|
7750
|
-
})), layers)
|
|
7752
|
+
})), layers),
|
|
7753
|
+
download: basicDownload({
|
|
7754
|
+
fileName: slugify(label),
|
|
7755
|
+
downloadUrl: interpolate(download_url || '', {
|
|
7756
|
+
METADATA_API_ENDPOINT: context.METADATA_API_ENDPOINT
|
|
7757
|
+
})
|
|
7758
|
+
})
|
|
7751
7759
|
});
|
|
7752
7760
|
}
|
|
7753
7761
|
|
|
@@ -7953,7 +7961,7 @@ function vector_point_single(_ref, allViewSpecs, context) {
|
|
|
7953
7961
|
viewSpec = _objectSpread2(_objectSpread2({}, viewSpec), {}, {
|
|
7954
7962
|
style: parseStyleSpec$1(style)
|
|
7955
7963
|
});
|
|
7956
|
-
return _objectSpread2(_objectSpread2({}, pick(viewSpec, ['id', 'path', 'label', 'sourceLabel'])), {}, {
|
|
7964
|
+
return _objectSpread2(_objectSpread2({}, pick(viewSpec, ['id', 'path', 'label', 'sourceLabel', 'metodology', 'shortDescription'])), {}, {
|
|
7957
7965
|
confSchema: confSchema(viewSpec),
|
|
7958
7966
|
metadata: metadata$1(),
|
|
7959
7967
|
sources: sources$1(viewSpec, allViewSpecs, context),
|
|
@@ -8137,7 +8145,7 @@ function vector_point_continuous(_ref, allViewSpecs, context) {
|
|
|
8137
8145
|
viewSpec = _objectSpread2(_objectSpread2({}, viewSpec), {}, {
|
|
8138
8146
|
style: parseStyleSpec(style)
|
|
8139
8147
|
});
|
|
8140
|
-
return _objectSpread2(_objectSpread2({}, pick(viewSpec, ['id', 'path', 'label', 'sourceLabel'])), {}, {
|
|
8148
|
+
return _objectSpread2(_objectSpread2({}, pick(viewSpec, ['id', 'path', 'label', 'sourceLabel', 'metodology', 'shortDescription'])), {}, {
|
|
8141
8149
|
// confSchema: confSchema(viewSpec, allViewSpecs, context),
|
|
8142
8150
|
metadata: metadata(viewSpec, allViewSpecs, context),
|
|
8143
8151
|
sources: sources(viewSpec, allViewSpecs, context),
|
|
@@ -11438,7 +11446,7 @@ var _getPaperDimensions = getPaperDimensions(PREVIEW_WIDTH_PX),
|
|
|
11438
11446
|
MAP_HEIGHT = _getPaperDimensions.MAP_HEIGHT,
|
|
11439
11447
|
BOTTOM_HEIGHT = _getPaperDimensions.BOTTOM_HEIGHT,
|
|
11440
11448
|
DESCRIPTION_WIDTH = _getPaperDimensions.DESCRIPTION_WIDTH;
|
|
11441
|
-
var ExportImage = /*#__PURE__*/forwardRef(function
|
|
11449
|
+
var ExportImage = /*#__PURE__*/forwardRef(function ExportImageInner(_ref, ref) {
|
|
11442
11450
|
var _resolvedLayout$, _resolvedLayout$2, _layeredMapRef$curren, _resolvedLayout$3;
|
|
11443
11451
|
var resolvedLayout = _ref.resolvedLayout,
|
|
11444
11452
|
commitedViewState = _ref.commitedViewState,
|
|
@@ -11446,7 +11454,6 @@ var ExportImage = /*#__PURE__*/forwardRef(function ExportImage(_ref, ref) {
|
|
|
11446
11454
|
METADATA_API_ENDPOINT = _ref.METADATA_API_ENDPOINT,
|
|
11447
11455
|
baseMapStyle = _ref.baseMapStyle,
|
|
11448
11456
|
topViews = _ref.topViews;
|
|
11449
|
-
ExportImage.displayName = 'ExportImage';
|
|
11450
11457
|
var dialogs = useDialogs();
|
|
11451
11458
|
var rootRef = useRef(null);
|
|
11452
11459
|
var layeredMapRef = useRef(null);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function vector_line({ label, line, color, tiles, source_layer, sources, layers, tooltip, ...props }: {
|
|
1
|
+
export function vector_line({ label, line, color, tiles, source_layer, sources, layers, tooltip, download_url, ...props }: {
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
label: any;
|
|
4
4
|
line?: {} | undefined;
|
|
@@ -8,6 +8,7 @@ export function vector_line({ label, line, color, tiles, source_layer, sources,
|
|
|
8
8
|
sources?: {} | undefined;
|
|
9
9
|
layers?: {} | undefined;
|
|
10
10
|
tooltip?: {} | undefined;
|
|
11
|
+
download_url?: string | undefined;
|
|
11
12
|
}, allViewSpecs: any, context: any): {
|
|
12
13
|
label: any;
|
|
13
14
|
confSchema: {
|
|
@@ -137,4 +138,13 @@ export function vector_line({ label, line, color, tiles, source_layer, sources,
|
|
|
137
138
|
type: string;
|
|
138
139
|
};
|
|
139
140
|
};
|
|
141
|
+
download: {
|
|
142
|
+
[x: string]: any;
|
|
143
|
+
$$resolver: symbol;
|
|
144
|
+
$$unresolved?: Record<string | number, import("@orioro/resolve").ResolutionNode> | undefined;
|
|
145
|
+
dependencies: any;
|
|
146
|
+
value: (...args: any[]) => any;
|
|
147
|
+
defaultValue?: any;
|
|
148
|
+
context?: any;
|
|
149
|
+
};
|
|
140
150
|
};
|