@evergis/react 4.0.109 → 4.0.111
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/constants/styling.d.ts +2 -3
- package/dist/core/classification/enrichStyleItemsWithIds.d.ts +2 -0
- package/dist/core/classification/enrichStyleModelsWithIds.d.ts +2 -0
- package/dist/core/classification/index.d.ts +2 -0
- package/dist/index.js +30 -23
- package/dist/index.js.map +1 -1
- package/dist/react.esm.js +28 -22
- package/dist/react.esm.js.map +1 -1
- package/dist/types/styling.d.ts +6 -24
- package/package.json +4 -4
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ClientStyle
|
|
2
|
-
export declare const NUMBER_CLASSIFICATION_TYPES: StyligClassificationTypes[];
|
|
1
|
+
import { ClientStyle } from '../types';
|
|
3
2
|
export declare const DEFAULT_COLOR = "#00ffff";
|
|
4
3
|
export declare const DEFAULT_BLUR = 0;
|
|
5
4
|
export declare const DEFAULT_OPACITY = 0.5;
|
|
6
|
-
export declare const
|
|
5
|
+
export declare const DEFAULT_CIRCLE_RADIUS = 4;
|
|
7
6
|
export declare const DEFAULT_LINE_WIDTH = 1;
|
|
8
7
|
export declare const DEFAULT_LINE_CAP = "butt";
|
|
9
8
|
export declare const DEFAULT_LINE_JOIN = "miter";
|
package/dist/index.js
CHANGED
|
@@ -22,6 +22,7 @@ var rehypeRaw = require('rehype-raw');
|
|
|
22
22
|
var rehypeSanitize = require('rehype-sanitize');
|
|
23
23
|
var remarkGfm = require('remark-gfm');
|
|
24
24
|
var MapGL = require('react-map-gl/maplibre');
|
|
25
|
+
var uuid = require('uuid');
|
|
25
26
|
require('@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css');
|
|
26
27
|
require('mapbox-gl/dist/mapbox-gl.css');
|
|
27
28
|
var jspdf = require('jspdf');
|
|
@@ -9431,20 +9432,6 @@ exports.EditGeometryType = void 0;
|
|
|
9431
9432
|
EditGeometryType["Raster"] = "raster";
|
|
9432
9433
|
})(exports.EditGeometryType || (exports.EditGeometryType = {}));
|
|
9433
9434
|
|
|
9434
|
-
exports.StyligClassificationTypes = void 0;
|
|
9435
|
-
(function (StyligClassificationTypes) {
|
|
9436
|
-
StyligClassificationTypes["FillColor"] = "fill-color";
|
|
9437
|
-
StyligClassificationTypes["FillExtrusionColor"] = "fill-extrusion-color";
|
|
9438
|
-
StyligClassificationTypes["CircleColor"] = "circle-color";
|
|
9439
|
-
StyligClassificationTypes["LineColor"] = "line-color";
|
|
9440
|
-
StyligClassificationTypes["CircleStrokeColor"] = "circle-stroke-color";
|
|
9441
|
-
StyligClassificationTypes["CircleRadius"] = "circle-radius";
|
|
9442
|
-
StyligClassificationTypes["CircleStrokeWidth"] = "circle-stroke-width";
|
|
9443
|
-
StyligClassificationTypes["LineWidth"] = "line-width";
|
|
9444
|
-
StyligClassificationTypes["CircleBlur"] = "circle-blur";
|
|
9445
|
-
StyligClassificationTypes["LineBlur"] = "line-blur";
|
|
9446
|
-
})(exports.StyligClassificationTypes || (exports.StyligClassificationTypes = {}));
|
|
9447
|
-
|
|
9448
9435
|
const StyledButton = styled(uilibGl.FlatButton).withConfig({ displayName: "StyledButton", componentId: "sc-13r9ztd" }) `
|
|
9449
9436
|
display: flex;
|
|
9450
9437
|
align-items: center;
|
|
@@ -14818,6 +14805,30 @@ const RasterLayer = ({ layer, tileUrl, visible, beforeId, }) => {
|
|
|
14818
14805
|
return (jsxRuntime.jsx(MapGL.Source, { id: layer.name, type: "raster", tiles: tiles, children: jsxRuntime.jsx(MapGL.Layer, { id: layer.name, type: "raster", "source-layer": "default", beforeId: beforeId, layout: { visibility: visible ? "visible" : "none" } }) }, `${layer.name}-${tileUrl}`));
|
|
14819
14806
|
};
|
|
14820
14807
|
|
|
14808
|
+
const enrichStyleItemsWithIds = (style) => {
|
|
14809
|
+
return {
|
|
14810
|
+
...style,
|
|
14811
|
+
items: style.items.map(item => {
|
|
14812
|
+
return {
|
|
14813
|
+
...item,
|
|
14814
|
+
id: item.id || uuid.v4(),
|
|
14815
|
+
};
|
|
14816
|
+
}),
|
|
14817
|
+
};
|
|
14818
|
+
};
|
|
14819
|
+
|
|
14820
|
+
const enrichStyleModelsWithIds = (style) => {
|
|
14821
|
+
return {
|
|
14822
|
+
...style,
|
|
14823
|
+
models: style.models.map(model => {
|
|
14824
|
+
return {
|
|
14825
|
+
...model,
|
|
14826
|
+
id: model.id || uuid.v4(),
|
|
14827
|
+
};
|
|
14828
|
+
}),
|
|
14829
|
+
};
|
|
14830
|
+
};
|
|
14831
|
+
|
|
14821
14832
|
const findAttributeInExpression = (expression) => {
|
|
14822
14833
|
if (Array.isArray(expression) && expression.length === 2 && expression[0] === "get") {
|
|
14823
14834
|
return [expression[1]];
|
|
@@ -14970,15 +14981,10 @@ const Map$1 = ({ zIndex, lowerSiblings, upperSiblings, onError, children, ...res
|
|
|
14970
14981
|
}, children: children }), upperSiblings] }));
|
|
14971
14982
|
};
|
|
14972
14983
|
|
|
14973
|
-
const NUMBER_CLASSIFICATION_TYPES = [
|
|
14974
|
-
exports.StyligClassificationTypes.CircleRadius,
|
|
14975
|
-
exports.StyligClassificationTypes.CircleStrokeWidth,
|
|
14976
|
-
exports.StyligClassificationTypes.LineWidth,
|
|
14977
|
-
];
|
|
14978
14984
|
const DEFAULT_COLOR = "#00ffff";
|
|
14979
14985
|
const DEFAULT_BLUR = 0;
|
|
14980
14986
|
const DEFAULT_OPACITY = 0.5;
|
|
14981
|
-
const
|
|
14987
|
+
const DEFAULT_CIRCLE_RADIUS = 4;
|
|
14982
14988
|
const DEFAULT_LINE_WIDTH = 1;
|
|
14983
14989
|
const DEFAULT_LINE_CAP = "butt";
|
|
14984
14990
|
const DEFAULT_LINE_JOIN = "miter";
|
|
@@ -15032,7 +15038,7 @@ const DEFAULT_CIRCLE_STYLE = {
|
|
|
15032
15038
|
type: "circle",
|
|
15033
15039
|
layout: {},
|
|
15034
15040
|
paint: {
|
|
15035
|
-
"circle-radius":
|
|
15041
|
+
"circle-radius": DEFAULT_CIRCLE_RADIUS,
|
|
15036
15042
|
"circle-color": DEFAULT_COLOR,
|
|
15037
15043
|
"circle-blur": DEFAULT_BLUR,
|
|
15038
15044
|
"circle-opacity": DEFAULT_OPACITY,
|
|
@@ -15074,6 +15080,7 @@ exports.DEFAULT_BLUR = DEFAULT_BLUR;
|
|
|
15074
15080
|
exports.DEFAULT_CHART_ANGLE = DEFAULT_CHART_ANGLE;
|
|
15075
15081
|
exports.DEFAULT_CHART_HEIGHT = DEFAULT_CHART_HEIGHT;
|
|
15076
15082
|
exports.DEFAULT_CHART_WIDTH = DEFAULT_CHART_WIDTH;
|
|
15083
|
+
exports.DEFAULT_CIRCLE_RADIUS = DEFAULT_CIRCLE_RADIUS;
|
|
15077
15084
|
exports.DEFAULT_CIRCLE_STYLE = DEFAULT_CIRCLE_STYLE;
|
|
15078
15085
|
exports.DEFAULT_COLOR = DEFAULT_COLOR;
|
|
15079
15086
|
exports.DEFAULT_DASHBOARD_CONFIG = DEFAULT_DASHBOARD_CONFIG;
|
|
@@ -15092,7 +15099,6 @@ exports.DEFAULT_LNG = DEFAULT_LNG;
|
|
|
15092
15099
|
exports.DEFAULT_OPACITY = DEFAULT_OPACITY;
|
|
15093
15100
|
exports.DEFAULT_PAGES_CONFIG = DEFAULT_PAGES_CONFIG;
|
|
15094
15101
|
exports.DEFAULT_PIECHART_RADIUS = DEFAULT_PIECHART_RADIUS;
|
|
15095
|
-
exports.DEFAULT_SIZE = DEFAULT_SIZE;
|
|
15096
15102
|
exports.DEFAULT_ZOOM = DEFAULT_ZOOM;
|
|
15097
15103
|
exports.Dashboard = Dashboard;
|
|
15098
15104
|
exports.DashboardCheckbox = DashboardCheckbox;
|
|
@@ -15176,7 +15182,6 @@ exports.Map = Map$1;
|
|
|
15176
15182
|
exports.MapContext = MapContext;
|
|
15177
15183
|
exports.MapProvider = MapProvider;
|
|
15178
15184
|
exports.NO_CONTENT_VALUE = NO_CONTENT_VALUE;
|
|
15179
|
-
exports.NUMBER_CLASSIFICATION_TYPES = NUMBER_CLASSIFICATION_TYPES;
|
|
15180
15185
|
exports.NUMERIC_ATTRIBUTE_TYPES = NUMERIC_ATTRIBUTE_TYPES;
|
|
15181
15186
|
exports.NoLiveSnapshotContainer = NoLiveSnapshotContainer;
|
|
15182
15187
|
exports.OBJECT_FITS = OBJECT_FITS;
|
|
@@ -15247,6 +15252,8 @@ exports.createSaveNotificationId = createSaveNotificationId;
|
|
|
15247
15252
|
exports.dateOptions = dateOptions;
|
|
15248
15253
|
exports.debounce = debounce;
|
|
15249
15254
|
exports.decimalOpacityToHex = decimalOpacityToHex;
|
|
15255
|
+
exports.enrichStyleItemsWithIds = enrichStyleItemsWithIds;
|
|
15256
|
+
exports.enrichStyleModelsWithIds = enrichStyleModelsWithIds;
|
|
15250
15257
|
exports.eqlParametersToPayload = eqlParametersToPayload;
|
|
15251
15258
|
exports.findAttributeInExpression = findAttributeInExpression;
|
|
15252
15259
|
exports.formatArea = formatArea;
|