@evergis/common 0.0.113 → 1.0.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/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/classification/ClientStyleValidator/ClientStyleValidator.d.ts +26 -0
- package/dist/classification/ClientStyleValidator/constants.d.ts +2 -0
- package/dist/classification/ClientStyleValidator/index.d.ts +2 -0
- package/dist/classification/ClientStyleValidator/types.d.ts +10 -0
- package/dist/classification/enrichStyleItemsWithIds.d.ts +2 -0
- package/dist/classification/enrichStyleModelsWithIds.d.ts +2 -0
- package/dist/classification/findAttributeInExpression.d.ts +2 -0
- package/dist/classification/getActualExtrusionHeight.d.ts +2 -0
- package/dist/classification/getClientStyleItemId.d.ts +3 -0
- package/dist/classification/getLayerClientStyle.d.ts +3 -0
- package/dist/classification/getStyleAttributes.d.ts +2 -0
- package/dist/classification/index.d.ts +8 -0
- package/dist/common.esm.js +2526 -0
- package/dist/common.esm.js.map +1 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/styling.d.ts +36 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/parseIconNames.d.ts +27 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +2609 -5
- package/dist/index.js.map +1 -0
- package/dist/map/constants.d.ts +4 -0
- package/dist/map/getMapView.d.ts +10 -0
- package/dist/map/index.d.ts +4 -0
- package/dist/map/parseMapStyle.d.ts +19 -0
- package/dist/map/types.d.ts +7 -0
- package/dist/taskParameters/SchemaResolver.d.ts +14 -0
- package/dist/taskParameters/buildDefaultForSchema.d.ts +23 -0
- package/dist/taskParameters/getPrimaryType.d.ts +2 -0
- package/dist/taskParameters/index.d.ts +6 -0
- package/dist/taskParameters/mergeHiddenFieldDefaults.d.ts +2 -0
- package/dist/taskParameters/orderPropertyKeys.d.ts +2 -0
- package/dist/taskParameters/types.d.ts +36 -0
- package/dist/types/attribute.d.ts +18 -0
- package/dist/types/feature.d.ts +11 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/layer.d.ts +5 -0
- package/dist/types/project.d.ts +4 -0
- package/dist/types/styling.d.ts +36 -0
- package/dist/types/theme.d.ts +4 -0
- package/dist/utils/color.d.ts +28 -0
- package/dist/utils/date.d.ts +16 -0
- package/dist/utils/debounce.d.ts +1 -0
- package/dist/utils/format.d.ts +47 -0
- package/dist/utils/geometryToEwkt.d.ts +2 -0
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/isLayerService.d.ts +2 -0
- package/dist/utils/isNumeric.d.ts +1 -0
- package/dist/utils/isObject.d.ts +1 -0
- package/dist/utils/metersPerPixel.d.ts +1 -0
- package/dist/utils/roundTotalSum.d.ts +2 -0
- package/package.json +35 -54
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../node_modules/@evergis/color/es/utils.js","../../../node_modules/@evergis/color/es/Color.js","../../../node_modules/@evergis/color/es/ColorScale.js"],"sourcesContent":["/**\n * Returns true if n is a finite number, otherwise false\n * @param n\n */\nexport const isNumber = function (n) {\n return typeof n === 'number' && isFinite(n);\n};\n/**\n * Returns true if s is a string, otherwise false\n * @param s\n */\nexport const isString = function (s) {\n return typeof s === 'string';\n};\n//# sourceMappingURL=utils.js.map","import { isString, isNumber } from \"./utils\";\n/**\n * Utility class for working with different representations of colors in browsers\n * @alias sGis.utils.Color\n */\nexport class Color {\n /**\n * @param string - any valid css color string\n */\n constructor(string) {\n this._original = string;\n if (!isString(string))\n string = string.toString();\n this._color = string && string.trim() || 'transparent';\n this._setChannels();\n }\n _setChannels() {\n let format = this.format;\n if (format && formats[format]) {\n this._channels = formats[format](this._color);\n }\n else {\n this._channels = { r: NaN, g: NaN, b: NaN, a: NaN };\n }\n }\n get _min() { return Math.min(this._channels.r, this._channels.g, this._channels.b); }\n get _max() { return Math.max(this._channels.r, this._channels.g, this._channels.b); }\n get _delta() { return this._max - this._min; }\n /**\n * Returns the color as a string in the requested format\n * @param format - target format. Available values: \"hex\" - #AARRGGBB, \"rgb\" - \"rgb(r, g, b)\", \"rgba\" - \"rgba(r, g, b, a)\"\n */\n toString(format) {\n if (format === 'hex') {\n return '#' + decToHex(this.r) + decToHex(this.g) + decToHex(this.b) + decToHex(this.a);\n }\n else if (format === 'rgb') {\n return 'rgb(' + this.r + ',' + this.g + ',' + this.b + ')';\n }\n else {\n return 'rgba(' + this.r + ',' + this.g + ',' + this.b + ',' + (this.a / 255).toFixed(2).replace(/\\.*0+$/, '') + ')';\n }\n }\n /**\n * Returns the string given to the constructor of the instance\n * @type {String}\n */\n get original() { return this._original; }\n /**\n * Returns true if the instance represents a valid color, i.e. that after parsing of the string given to the constructor,\n * the format is recognized and values of all channels are resolved to valid numbers.\n * @returns {Boolean}\n */\n get isValid() { return isNumber(this._channels.a) && isNumber(this._channels.r) && isNumber(this._channels.g) && isNumber(this._channels.b); }\n /**\n * Converts HSV color value into RGB\n * @param h - hue value\n * @param s - saturation value\n * @param v - 'value' value\n */\n setHsv(h, s, v) {\n let rgbColors = [];\n h /= 60;\n s /= 100;\n v /= 100;\n let floor = Math.floor(h);\n let mod = floor % 6;\n let f = h - floor;\n let p = Math.round(255 * v * (1 - s));\n let q = Math.round(255 * v * (1 - s * f));\n let t = Math.round(255 * v * (1 - s * (1 - f)));\n v = Math.round(255 * v);\n switch (mod) {\n case 0:\n rgbColors = [v, t, p];\n break;\n case 1:\n rgbColors = [q, v, p];\n break;\n case 2:\n rgbColors = [p, v, t];\n break;\n case 3:\n rgbColors = [p, q, v];\n break;\n case 4:\n rgbColors = [t, p, v];\n break;\n case 5:\n rgbColors = [v, p, q];\n break;\n }\n this._channels.r = rgbColors[0];\n this._channels.g = rgbColors[1];\n this._channels.b = rgbColors[2];\n return this;\n }\n /**\n * Returns the format of the input color sting. Possible values: hex3, hex6, hex4, hex8, rgb, rgba, name.\n * (name is the named css color values like \"white\")\n */\n get format() {\n if (this._color.substr(0, 1) === '#' && this._color.search(/[^#0-9a-fA-F]/) === -1) {\n if (this._color.length === 4) {\n return 'hex3';\n }\n else if (this._color.length === 7) {\n return 'hex6';\n }\n else if (this._color.length === 5) {\n return 'hex4';\n }\n else if (this._color.length === 9) {\n return 'hex8';\n }\n }\n else if (this._color.substr(0, 4) === 'rgb(') {\n return 'rgb';\n }\n else if (this._color.substr(0, 5) === 'rgba(') {\n return 'rgba';\n }\n else if (this._color.substr(0, 4) === 'hsv(') {\n return 'hsv';\n }\n else if (this._color in Color.names) {\n return 'name';\n }\n }\n /**\n * Returns red channel value as integer from 0 to 255.\n */\n get r() { return this._channels.r; }\n set r(v) { this._channels.r = v; }\n /**\n * Returns green channel value as integer from 0 to 255.\n */\n get g() { return this._channels.g; }\n set g(v) { this._channels.g = v; }\n /**\n * Returns blue channel value as integer from 0 to 255.\n */\n get b() { return this._channels.b; }\n set b(v) { this._channels.b = v; }\n /**\n * Returns opacity channel value as integer from 0 to 255.\n */\n get a() { return this._channels.a; }\n set a(v) { this._channels.a = v; }\n /**\n * Returns hue channel value as integer from 0 to 360.\n */\n get h() {\n let max = this._max;\n let min = this._min;\n let delta = this._delta;\n let h;\n let { r, g, b } = this._channels;\n if (max === min)\n h = 0;\n else if (r === max)\n h = (g - b) / delta;\n else if (g === max)\n h = 2 + (b - r) / delta;\n else if (b === max)\n h = 4 + (r - g) / delta;\n h = Math.min(h * 60, 360);\n if (h < 0)\n h += 360;\n h = Math.round(h);\n return h;\n }\n /**\n * Returns saturation channel value as integer from 0 to 100.\n */\n get s() {\n let s;\n let max = this._max;\n if (max === 0)\n s = 0;\n else\n s = this._delta / max * 1000 / 10;\n s = Math.round(s);\n return s;\n }\n /**\n * Returns 'value' channel of hsv space as integer from 0 to 100.\n */\n get v() { return Math.round(this._max / 255 * 1000 / 10); }\n /**\n * Returns values of the channels as integers from 0 to 255. Format is { r: r, g: g, b: b, a: a }.\n */\n get channels() { return Object.assign({}, this._channels); }\n}\n// Big List of Colors\n// ------------------\n// <http://www.w3.org/TR/css3-color/#svg-color>\n//noinspection SpellCheckingInspection\nColor.names = {\n aliceblue: \"f0f8ff\",\n antiquewhite: \"faebd7\",\n aqua: \"0ff\",\n aquamarine: \"7fffd4\",\n azure: \"f0ffff\",\n beige: \"f5f5dc\",\n bisque: \"ffe4c4\",\n black: \"000\",\n blanchedalmond: \"ffebcd\",\n blue: \"00f\",\n blueviolet: \"8a2be2\",\n brown: \"a52a2a\",\n burlywood: \"deb887\",\n burntsienna: \"ea7e5d\",\n cadetblue: \"5f9ea0\",\n chartreuse: \"7fff00\",\n chocolate: \"d2691e\",\n coral: \"ff7f50\",\n cornflowerblue: \"6495ed\",\n cornsilk: \"fff8dc\",\n crimson: \"dc143c\",\n cyan: \"0ff\",\n darkblue: \"00008b\",\n darkcyan: \"008b8b\",\n darkgoldenrod: \"b8860b\",\n darkgray: \"a9a9a9\",\n darkgreen: \"006400\",\n darkgrey: \"a9a9a9\",\n darkkhaki: \"bdb76b\",\n darkmagenta: \"8b008b\",\n darkolivegreen: \"556b2f\",\n darkorange: \"ff8c00\",\n darkorchid: \"9932cc\",\n darkred: \"8b0000\",\n darksalmon: \"e9967a\",\n darkseagreen: \"8fbc8f\",\n darkslateblue: \"483d8b\",\n darkslategray: \"2f4f4f\",\n darkslategrey: \"2f4f4f\",\n darkturquoise: \"00ced1\",\n darkviolet: \"9400d3\",\n deeppink: \"ff1493\",\n deepskyblue: \"00bfff\",\n dimgray: \"696969\",\n dimgrey: \"696969\",\n dodgerblue: \"1e90ff\",\n firebrick: \"b22222\",\n floralwhite: \"fffaf0\",\n forestgreen: \"228b22\",\n fuchsia: \"f0f\",\n gainsboro: \"dcdcdc\",\n ghostwhite: \"f8f8ff\",\n gold: \"ffd700\",\n goldenrod: \"daa520\",\n gray: \"808080\",\n green: \"008000\",\n greenyellow: \"adff2f\",\n grey: \"808080\",\n honeydew: \"f0fff0\",\n hotpink: \"ff69b4\",\n indianred: \"cd5c5c\",\n indigo: \"4b0082\",\n ivory: \"fffff0\",\n khaki: \"f0e68c\",\n lavender: \"e6e6fa\",\n lavenderblush: \"fff0f5\",\n lawngreen: \"7cfc00\",\n lemonchiffon: \"fffacd\",\n lightblue: \"add8e6\",\n lightcoral: \"f08080\",\n lightcyan: \"e0ffff\",\n lightgoldenrodyellow: \"fafad2\",\n lightgray: \"d3d3d3\",\n lightgreen: \"90ee90\",\n lightgrey: \"d3d3d3\",\n lightpink: \"ffb6c1\",\n lightsalmon: \"ffa07a\",\n lightseagreen: \"20b2aa\",\n lightskyblue: \"87cefa\",\n lightslategray: \"789\",\n lightslategrey: \"789\",\n lightsteelblue: \"b0c4de\",\n lightyellow: \"ffffe0\",\n lime: \"0f0\",\n limegreen: \"32cd32\",\n linen: \"faf0e6\",\n magenta: \"f0f\",\n maroon: \"800000\",\n mediumaquamarine: \"66cdaa\",\n mediumblue: \"0000cd\",\n mediumorchid: \"ba55d3\",\n mediumpurple: \"9370db\",\n mediumseagreen: \"3cb371\",\n mediumslateblue: \"7b68ee\",\n mediumspringgreen: \"00fa9a\",\n mediumturquoise: \"48d1cc\",\n mediumvioletred: \"c71585\",\n midnightblue: \"191970\",\n mintcream: \"f5fffa\",\n mistyrose: \"ffe4e1\",\n moccasin: \"ffe4b5\",\n navajowhite: \"ffdead\",\n navy: \"000080\",\n oldlace: \"fdf5e6\",\n olive: \"808000\",\n olivedrab: \"6b8e23\",\n orange: \"ffa500\",\n orangered: \"ff4500\",\n orchid: \"da70d6\",\n palegoldenrod: \"eee8aa\",\n palegreen: \"98fb98\",\n paleturquoise: \"afeeee\",\n palevioletred: \"db7093\",\n papayawhip: \"ffefd5\",\n peachpuff: \"ffdab9\",\n peru: \"cd853f\",\n pink: \"ffc0cb\",\n plum: \"dda0dd\",\n powderblue: \"b0e0e6\",\n purple: \"800080\",\n rebeccapurple: \"663399\",\n red: \"f00\",\n rosybrown: \"bc8f8f\",\n royalblue: \"4169e1\",\n saddlebrown: \"8b4513\",\n salmon: \"fa8072\",\n sandybrown: \"f4a460\",\n seagreen: \"2e8b57\",\n seashell: \"fff5ee\",\n sienna: \"a0522d\",\n silver: \"c0c0c0\",\n skyblue: \"87ceeb\",\n slateblue: \"6a5acd\",\n slategray: \"708090\",\n slategrey: \"708090\",\n snow: \"fffafa\",\n springgreen: \"00ff7f\",\n steelblue: \"4682b4\",\n tan: \"d2b48c\",\n teal: \"008080\",\n thistle: \"d8bfd8\",\n tomato: \"ff6347\",\n turquoise: \"40e0d0\",\n violet: \"ee82ee\",\n wheat: \"f5deb3\",\n white: \"fff\",\n whitesmoke: \"f5f5f5\",\n yellow: \"ff0\",\n yellowgreen: \"9acd32\",\n transparent: '0000'\n};\nfunction decToHex(dec) {\n let hex = Math.floor(dec).toString(16);\n return hex.length === 1 ? '0' + hex : hex;\n}\nlet formats = {\n hex3: function (string) {\n return {\n r: parseInt(string.substr(1, 1) + string.substr(1, 1), 16),\n g: parseInt(string.substr(2, 1) + string.substr(2, 1), 16),\n b: parseInt(string.substr(3, 1) + string.substr(3, 1), 16),\n a: 255\n };\n },\n hex6: function (string) {\n return {\n r: parseInt(string.substr(1, 2), 16),\n g: parseInt(string.substr(3, 2), 16),\n b: parseInt(string.substr(5, 2), 16),\n a: 255\n };\n },\n hex4: function (string) {\n return {\n r: parseInt(string.substr(1, 1) + string.substr(1, 1), 16),\n g: parseInt(string.substr(2, 1) + string.substr(2, 1), 16),\n b: parseInt(string.substr(3, 1) + string.substr(3, 1), 16),\n a: parseInt(string.substr(4, 1) + string.substr(4, 1), 16)\n };\n },\n hex8: function (string) {\n return {\n r: parseInt(string.substr(1, 2), 16),\n g: parseInt(string.substr(3, 2), 16),\n b: parseInt(string.substr(5, 2), 16),\n a: parseInt(string.substr(7, 2), 16)\n };\n },\n rgb: function (string) {\n let percents = string.match(/%/g);\n if (!percents || percents.length === 3) {\n var channels = string.substring(string.search(/\\(/) + 1, string.length - 1).split(',');\n for (var i = 0; i < 3; i++) {\n if (channels[i]) {\n channels[i] = channels[i].trim();\n var percent = channels[i].match(/[.\\d\\-]+%/);\n if (percent) {\n var points = channels[i].match(/\\./g);\n channels[i] = channels[i].search(/[^\\d.\\-%]/) === -1 && (!points || points.length < 2) ? parseFloat(percent[0]) : NaN;\n if (channels[i] < 0) {\n channels[i] = 0;\n }\n else if (channels[i] > 100) {\n channels[i] = 100;\n }\n channels[i] = Math.floor(channels[i] * 255 / 100);\n }\n else {\n channels[i] = channels[i] && (channels[i].match(/[^ \\-0-9]/) === null) && channels[i].match(/[0-9]+/g).length === 1 ? parseInt(channels[i]) : NaN;\n if (channels[i] < 0) {\n channels[i] = 0;\n }\n else if (channels[i] > 255) {\n channels[i] = 255;\n }\n }\n }\n }\n }\n else {\n channels = [];\n }\n return {\n r: channels[0],\n g: channels[1],\n b: channels[2],\n a: 255\n };\n },\n rgba: function (string) {\n let channels = formats.rgb(string);\n channels.a = undefined;\n let match = string.match(/[\\-0-9\\.]+/g);\n if (match && match[3]) {\n let points = match[3].match(/\\./g);\n if (!points || points.length === 1) {\n channels.a = parseFloat(match[3]);\n if (channels.a < 0) {\n channels.a = 0;\n }\n else if (channels.a > 1) {\n channels.a = 1;\n }\n channels.a = Math.round(channels.a * 255);\n }\n }\n return channels;\n },\n name: function (string) {\n let color = new Color('#' + Color.names[string]);\n return color.channels;\n }\n};\n//# sourceMappingURL=Color.js.map","import { Color } from \"./Color\";\nexport class ColorScale {\n constructor(palette) {\n this.palette = palette;\n }\n getColor(p) {\n const palette = this.palette.slice();\n palette[0][0] = 0;\n palette[palette.length - 1][0] = 1;\n let colors = palette.map(item => { return new Color(item[1]); });\n if (p >= 1) {\n let color = new Color(palette[palette.length - 1][1]);\n color.a = 255;\n return color.toString();\n }\n for (let i = 0; i < palette.length; i++) {\n if (palette[i][0] > p) {\n let width = palette[i][0] - palette[i - 1][0];\n let color1 = colors[i - 1];\n let color2 = colors[i];\n let k = (p - palette[i - 1][0]) / width;\n let channels = ['r', 'g', 'b', 'a'].map(function (ch) { return Math.round(color1[ch] + (color2[ch] - color1[ch]) * k); });\n channels[3] = 1;\n return 'rgba(' + channels.join(',') + ')';\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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Предел широты сферического меркатора (EPSG:3857): дальше проекция уходит в бесконечность. */
|
|
2
|
+
export declare const MERCATOR_MAX_LATITUDE = 85.05112878;
|
|
3
|
+
/** Предел долготы: карта рендерит копии мира, но экстент за пределами ±180° бэкенду не нужен. */
|
|
4
|
+
export declare const MERCATOR_MAX_LONGITUDE = 180;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Map as MaplibreGLMap } from 'maplibre-gl';
|
|
2
|
+
import { MapView } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Снимок текущего вида карты. `getBounds()` отдаёт градусы WGS84, `geometryToEwkt` переводит их
|
|
5
|
+
* в меркатор и ставит префикс `SRID=3857;` — тот же формат, что у геометрического фильтра.
|
|
6
|
+
*
|
|
7
|
+
* Клампинг обязателен: на полностью отдалённой или наклонённой карте bounds выходят за пределы
|
|
8
|
+
* проекции, и меркатор возвращает `Infinity` — такой WKT бэкенд не примет.
|
|
9
|
+
*/
|
|
10
|
+
export declare const getMapView: (map?: MaplibreGLMap) => MapView;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { StyleSpecification } from '@maplibre/maplibre-gl-style-spec';
|
|
2
|
+
export interface ExtendedStyleSpecification extends StyleSpecification {
|
|
3
|
+
metadata?: {
|
|
4
|
+
"basemap:alias"?: string;
|
|
5
|
+
"basemap:buildings3d"?: {
|
|
6
|
+
enabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
"basemap:hillshade"?: {
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
};
|
|
11
|
+
"basemap:sky"?: {
|
|
12
|
+
enabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
"basemap:terrain"?: {
|
|
15
|
+
enabled?: boolean;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export declare const parseMapStyle: (style: string | ExtendedStyleSpecification) => string | ExtendedStyleSpecification;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Текущий вид карты, который уходит в фильтры дашборда плейсхолдерами `%extent` и `%zoom`. */
|
|
2
|
+
export interface MapView {
|
|
3
|
+
/** Экстент видимой области в EWKT (`SRID=3857;POLYGON((...))`) — как и `%geometry`. */
|
|
4
|
+
ewktExtent?: string;
|
|
5
|
+
/** Целый уровень зума. */
|
|
6
|
+
zoomLevel?: number;
|
|
7
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ArrayItemDetection, JsonSchemaNode } from './types';
|
|
2
|
+
export declare class SchemaResolver {
|
|
3
|
+
private readonly root;
|
|
4
|
+
constructor(rootSchema: JsonSchemaNode);
|
|
5
|
+
get rootSchema(): JsonSchemaNode;
|
|
6
|
+
resolve(schema?: JsonSchemaNode): JsonSchemaNode | undefined;
|
|
7
|
+
oneOfBranches(schema?: JsonSchemaNode): JsonSchemaNode[];
|
|
8
|
+
schemaAtScope(scope: string): JsonSchemaNode | undefined;
|
|
9
|
+
isScopeRequired(scope: string): boolean;
|
|
10
|
+
arrayItemSchema(itemsSchema?: JsonSchemaNode): JsonSchemaNode | undefined;
|
|
11
|
+
arrayItemKind(arraySchema: JsonSchemaNode): ArrayItemDetection | null;
|
|
12
|
+
private resolveRef;
|
|
13
|
+
private mergeAllOf;
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SchemaResolver } from './SchemaResolver';
|
|
2
|
+
import { JsonSchemaNode } from './types';
|
|
3
|
+
type ObjectDepth = "recursive" | "shallow";
|
|
4
|
+
type PropertyKeysOrder = "default" | "ordered";
|
|
5
|
+
type EmptyObjectResult = "undefined" | "empty";
|
|
6
|
+
export type BuildDefaultForSchemaOptions = {
|
|
7
|
+
stringDefault?: string;
|
|
8
|
+
objectDepth?: ObjectDepth;
|
|
9
|
+
propertyKeys?: PropertyKeysOrder;
|
|
10
|
+
emptyObject?: EmptyObjectResult;
|
|
11
|
+
ignoreSchemaDefault?: boolean;
|
|
12
|
+
};
|
|
13
|
+
type ResolvedBuildDefaultOptions = {
|
|
14
|
+
stringDefault: string | undefined;
|
|
15
|
+
objectDepth: ObjectDepth;
|
|
16
|
+
propertyKeys: PropertyKeysOrder;
|
|
17
|
+
emptyObject: EmptyObjectResult;
|
|
18
|
+
ignoreSchemaDefault: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare const FORM_DEFAULT_OPTIONS: ResolvedBuildDefaultOptions;
|
|
21
|
+
export declare const ARRAY_ITEM_OBJECT_OPTIONS: ResolvedBuildDefaultOptions;
|
|
22
|
+
export declare const buildDefaultForSchema: (resolver: SchemaResolver, schema?: JsonSchemaNode, options?: BuildDefaultForSchemaOptions) => unknown;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface JsonSchemaNode {
|
|
2
|
+
$schema?: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
type?: string | string[];
|
|
5
|
+
description?: string;
|
|
6
|
+
properties?: Record<string, JsonSchemaNode>;
|
|
7
|
+
items?: JsonSchemaNode;
|
|
8
|
+
required?: string[];
|
|
9
|
+
enum?: unknown[];
|
|
10
|
+
default?: unknown;
|
|
11
|
+
format?: string;
|
|
12
|
+
oneOf?: JsonSchemaNode[];
|
|
13
|
+
allOf?: JsonSchemaNode[];
|
|
14
|
+
anyOf?: JsonSchemaNode[];
|
|
15
|
+
$ref?: string;
|
|
16
|
+
definitions?: Record<string, JsonSchemaNode>;
|
|
17
|
+
additionalProperties?: boolean | JsonSchemaNode;
|
|
18
|
+
"x-evergis-type"?: string;
|
|
19
|
+
"x-source"?: string;
|
|
20
|
+
"x-order"?: number;
|
|
21
|
+
"x-abstract"?: boolean;
|
|
22
|
+
"x-hide"?: boolean;
|
|
23
|
+
minItems?: number;
|
|
24
|
+
maxItems?: number;
|
|
25
|
+
nullable?: boolean;
|
|
26
|
+
minimum?: number;
|
|
27
|
+
maximum?: number;
|
|
28
|
+
minLength?: number;
|
|
29
|
+
methodName?: string;
|
|
30
|
+
fileName?: string;
|
|
31
|
+
}
|
|
32
|
+
export type ArrayItemKind = "string" | "attribute" | "composite";
|
|
33
|
+
export interface ArrayItemDetection {
|
|
34
|
+
kind: ArrayItemKind;
|
|
35
|
+
itemSchema: JsonSchemaNode;
|
|
36
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AttributeConfigurationDc } from '@evergis/api';
|
|
3
|
+
import { FeaturedDcExtendedGeometry } from './feature';
|
|
4
|
+
export type FeatureAttributeValue = FeaturedDcExtendedGeometry | string | number | boolean | Date | null | JSONAttributeValue[];
|
|
5
|
+
export type LayerAttribute = {
|
|
6
|
+
name?: string;
|
|
7
|
+
} & AttributeConfigurationDc;
|
|
8
|
+
export type FeatureAttribute = {
|
|
9
|
+
value?: FeatureAttributeValue;
|
|
10
|
+
render?: ReactNode;
|
|
11
|
+
} & LayerAttribute;
|
|
12
|
+
export interface JSONAttributeValue {
|
|
13
|
+
link: string;
|
|
14
|
+
isExternal: boolean;
|
|
15
|
+
name: string;
|
|
16
|
+
mimeType: string;
|
|
17
|
+
date?: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AttributesConfigurationDc, FeatureDc, LineStringDc, MultiLineStringDc, MultiPointDc, MultiPolygonDc, PointDc, PolygonDc } from '@evergis/api';
|
|
2
|
+
import { ClientStyle } from './styling';
|
|
3
|
+
export type FeaturedDcExtendedGeometry = LineStringDc | MultiPointDc | MultiPolygonDc | PointDc | PolygonDc | MultiLineStringDc;
|
|
4
|
+
export interface FeatureDcExtended extends Omit<FeatureDc, "geometry"> {
|
|
5
|
+
geometry: FeaturedDcExtendedGeometry;
|
|
6
|
+
layer: string;
|
|
7
|
+
}
|
|
8
|
+
export interface SelectedFeature extends FeatureDcExtended {
|
|
9
|
+
attributesConfiguration: AttributesConfigurationDc;
|
|
10
|
+
clientStyle?: ClientStyle;
|
|
11
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CircleLayerSpecification, FillExtrusionLayerSpecification, FillLayerSpecification, HeatmapLayerSpecification, LineLayerSpecification, SymbolLayerSpecification } from 'maplibre-gl';
|
|
2
|
+
export type ExpressionType = "match" | "case" | "step" | "interpolate";
|
|
3
|
+
export type ClientStyleLayer = CircleLayerSpecification | LineLayerSpecification | FillLayerSpecification | FillExtrusionLayerSpecification | SymbolLayerSpecification | HeatmapLayerSpecification;
|
|
4
|
+
export type ClientStyleItem = Omit<ClientStyleLayer, "id" | "source"> & {
|
|
5
|
+
id?: string;
|
|
6
|
+
};
|
|
7
|
+
export interface ClientStyleIcon {
|
|
8
|
+
/** Уникальное имя иконки для использования в icon-image */
|
|
9
|
+
name: string;
|
|
10
|
+
/** URL иконки (PNG, SVG или data URL) */
|
|
11
|
+
url: string;
|
|
12
|
+
/** SDF режим для перекрашивания иконки через icon-color */
|
|
13
|
+
sdf?: boolean;
|
|
14
|
+
/** Размер иконки в пикселях (для SVG растеризации) */
|
|
15
|
+
size?: number;
|
|
16
|
+
/** Pixel ratio для retina экранов (1 или 2) */
|
|
17
|
+
pixelRatio?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface ClientStyleModelRotation {
|
|
20
|
+
x?: string | number;
|
|
21
|
+
y?: string | number;
|
|
22
|
+
z?: string | number;
|
|
23
|
+
}
|
|
24
|
+
export interface ClientStyleModel {
|
|
25
|
+
id?: string;
|
|
26
|
+
path?: string;
|
|
27
|
+
size?: string | number;
|
|
28
|
+
rotation?: ClientStyleModelRotation;
|
|
29
|
+
}
|
|
30
|
+
export interface ClientStyle {
|
|
31
|
+
items: ClientStyleItem[];
|
|
32
|
+
icons?: ClientStyleIcon[];
|
|
33
|
+
models?: ClientStyleModel[];
|
|
34
|
+
minzoom?: number;
|
|
35
|
+
maxzoom?: number;
|
|
36
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Color } from '@evergis/color';
|
|
2
|
+
export declare const transparentizeColor: (originalColor: string, percent: number) => string;
|
|
3
|
+
export declare const hexToRgba: (hexCode: string, opacity?: number) => string;
|
|
4
|
+
export declare const rgbToHex: (r: number, g: number, b: number) => string;
|
|
5
|
+
export declare const decimalOpacityToHex: (opacity: number) => string;
|
|
6
|
+
/**
|
|
7
|
+
* Растягивает палитру на нужное количество цветов: опорные цвета равномерно
|
|
8
|
+
* раскладываются по шкале, недостающие интерполируются между ними.
|
|
9
|
+
* @param colors - опорные цвета палитры в hex
|
|
10
|
+
* @param count - требуемое количество цветов
|
|
11
|
+
* @returns массив ровно из count цветов
|
|
12
|
+
*/
|
|
13
|
+
export declare const stretchPalette: (colors: readonly string[], count: number) => string[];
|
|
14
|
+
export declare const getGradientColors: (colorsCount?: number) => string[];
|
|
15
|
+
/**
|
|
16
|
+
* Adjusts color brightness
|
|
17
|
+
* @param color - hex color string (e.g., "#2196f3")
|
|
18
|
+
* @param lightnessAdjustment - lightness adjustment in HSL units (e.g., 5 or -5)
|
|
19
|
+
* @returns adjusted color in hex format
|
|
20
|
+
*/
|
|
21
|
+
export declare const adjustColor: (color: string, lightnessAdjustment?: number) => string;
|
|
22
|
+
/**
|
|
23
|
+
* Цвет в hex: `#rrggbb`, а при неполной непрозрачности — `#rrggbbaa`.
|
|
24
|
+
*
|
|
25
|
+
* Полностью непрозрачная альфа отбрасывается: в значении она ничего не уточняет, а строку
|
|
26
|
+
* удлиняет — и в конфиге, и в данных удобнее короткая запись.
|
|
27
|
+
*/
|
|
28
|
+
export declare const colorToHex: (color: Partial<Color>) => string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const NO_CONTENT_VALUE = "\u2014";
|
|
2
|
+
export type DateType = number | Date;
|
|
3
|
+
export type RawDateType = string | DateType;
|
|
4
|
+
export declare enum DateFormat {
|
|
5
|
+
ClientDefaultFormat = "dd.MM.yyyy HH:mm",
|
|
6
|
+
DateTime = "dd.MM.yyyy HH:mm:ss",
|
|
7
|
+
UTC = "yyyy-MM-dd'T'HH:mm:ss.sssxxx",
|
|
8
|
+
AxisTooltip = "d MMMM yyyy"
|
|
9
|
+
}
|
|
10
|
+
interface FormatDateOptions {
|
|
11
|
+
dateFormat?: DateFormat | string;
|
|
12
|
+
defaultValue?: RawDateType;
|
|
13
|
+
}
|
|
14
|
+
export declare const getDate: (rawDate?: RawDateType | null) => Date | null;
|
|
15
|
+
export declare const formatDate: (date?: RawDateType, { dateFormat, defaultValue }?: FormatDateOptions) => string;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const debounce: (callback: any, delay: number) => ((...args: any) => void);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { i18n } from 'i18next';
|
|
2
|
+
import { AttributeFormatConfigurationDc, AttributeType } from '@evergis/api';
|
|
3
|
+
import { FeatureAttributeValue } from '../types';
|
|
4
|
+
export type Coordinates = [number, number];
|
|
5
|
+
/**
|
|
6
|
+
* Настройки формата атрибута. Расширяют серверный контракт полями, которых нет в swagger:
|
|
7
|
+
* контракт генерируется, править его нельзя.
|
|
8
|
+
*/
|
|
9
|
+
export type AttributeFormatConfiguration = AttributeFormatConfigurationDc & {
|
|
10
|
+
/** Компактное округление больших чисел: 1 234 578 → «1.2M», 15 000 → «15.0K». */
|
|
11
|
+
roundDigitGroup?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const TIME_ZONE_FORMAT = " \"GMT\"z";
|
|
14
|
+
export declare enum ScalingFactor {
|
|
15
|
+
Default = 1,
|
|
16
|
+
Thousands = 0.001,
|
|
17
|
+
Millions = 0.000001,
|
|
18
|
+
Acres = 0.01,
|
|
19
|
+
Hectares = 0.0001
|
|
20
|
+
}
|
|
21
|
+
export declare const timeOptions: {
|
|
22
|
+
text: string;
|
|
23
|
+
value: string;
|
|
24
|
+
}[];
|
|
25
|
+
export declare const dateOptions: {
|
|
26
|
+
text: string;
|
|
27
|
+
value: string;
|
|
28
|
+
}[];
|
|
29
|
+
export declare const pointOptions: {
|
|
30
|
+
value: string;
|
|
31
|
+
localizationKey: string;
|
|
32
|
+
}[];
|
|
33
|
+
export declare const numberOptions: {
|
|
34
|
+
value: string;
|
|
35
|
+
localizationKey: string;
|
|
36
|
+
}[];
|
|
37
|
+
export declare const formatAttributeValue: ({ t, type, value, stringFormat, noUnits }: {
|
|
38
|
+
t: i18n["t"];
|
|
39
|
+
type: AttributeType;
|
|
40
|
+
value: FeatureAttributeValue;
|
|
41
|
+
stringFormat: AttributeFormatConfiguration;
|
|
42
|
+
noUnits?: boolean;
|
|
43
|
+
}) => string;
|
|
44
|
+
export declare const formatNumber: (number: number) => string;
|
|
45
|
+
export declare const formatArea: (t: i18n["t"], num: number) => string;
|
|
46
|
+
export declare const formatLength: (t: i18n["t"], num: number) => string;
|
|
47
|
+
export declare const formatPolygonMeasure: (t: i18n["t"], area: number, perimiter: number) => string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './color';
|
|
2
|
+
export * from './date';
|
|
3
|
+
export * from './debounce';
|
|
4
|
+
export * from './format';
|
|
5
|
+
export * from './geometryToEwkt';
|
|
6
|
+
export * from './isLayerService';
|
|
7
|
+
export * from './isNumeric';
|
|
8
|
+
export * from './isObject';
|
|
9
|
+
export * from './metersPerPixel';
|
|
10
|
+
export * from './roundTotalSum';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isNumeric: (number: string | number) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isObject<T>(value: T | object): value is T & object & Record<string, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const metersPerPixel: (zoom: number, lat: number) => number;
|
package/package.json
CHANGED
|
@@ -1,68 +1,49 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.0
|
|
2
|
+
"version": "1.0.0",
|
|
3
|
+
"name": "@evergis/common",
|
|
4
|
+
"author": "Everpoint",
|
|
3
5
|
"license": "MIT",
|
|
4
6
|
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/common.esm.js",
|
|
5
8
|
"typings": "dist/index.d.ts",
|
|
9
|
+
"type": "module",
|
|
6
10
|
"files": [
|
|
7
11
|
"dist"
|
|
8
12
|
],
|
|
9
13
|
"engines": {
|
|
10
|
-
"node": ">=
|
|
14
|
+
"node": ">=20"
|
|
11
15
|
},
|
|
12
16
|
"scripts": {
|
|
13
|
-
"
|
|
14
|
-
"build": "
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"lint:fix": "tsdx lint --fix",
|
|
18
|
-
"prepare": "tsdx build"
|
|
19
|
-
},
|
|
20
|
-
"peerDependencies": {
|
|
21
|
-
"@evergis/api": ">=3.0.104",
|
|
22
|
-
"@evergis/react-fetching": ">=0.1.8",
|
|
23
|
-
"@evergis/sgis": ">=0.5.0-alpha.60",
|
|
24
|
-
"@evergis/ui": ">=2.0.116",
|
|
25
|
-
"react": ">=17",
|
|
26
|
-
"react-dom": ">=17",
|
|
27
|
-
"react-i18next": ">=11"
|
|
28
|
-
},
|
|
29
|
-
"husky": {
|
|
30
|
-
"hooks": {
|
|
31
|
-
"pre-push": "tsdx lint"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"prettier": {
|
|
35
|
-
"printWidth": 80,
|
|
36
|
-
"semi": true,
|
|
37
|
-
"singleQuote": true,
|
|
38
|
-
"trailingComma": "es5"
|
|
39
|
-
},
|
|
40
|
-
"name": "@evergis/common",
|
|
41
|
-
"author": "Everpoint",
|
|
42
|
-
"module": "dist/common.esm.js",
|
|
43
|
-
"publishConfig": {
|
|
44
|
-
"access": "public"
|
|
17
|
+
"clean": "../../node_modules/.bin/rimraf dist",
|
|
18
|
+
"build": "yarn clean && rollup -c",
|
|
19
|
+
"prepare": "rollup -c",
|
|
20
|
+
"test": "jest --maxWorkers=2"
|
|
45
21
|
},
|
|
46
22
|
"devDependencies": {
|
|
47
|
-
"@babel/
|
|
48
|
-
"@babel/
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
52
|
-
"@
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
23
|
+
"@babel/preset-env": "^7.26.0",
|
|
24
|
+
"@babel/preset-typescript": "^7.26.0",
|
|
25
|
+
"@types/jest": "^29.5.14",
|
|
26
|
+
"@types/lodash": "^4.17.15",
|
|
27
|
+
"@types/mapbox__mapbox-gl-draw": "^1.4.9",
|
|
28
|
+
"@types/mapbox__mapbox-gl-geocoder": "^5.1.1",
|
|
29
|
+
"babel-jest": "^29.7.0",
|
|
30
|
+
"jest": "^29.7.0",
|
|
31
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
32
|
+
"ts-jest": "^29.2.5"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@evergis/api": "^5.0.60",
|
|
36
|
+
"@mapbox/mapbox-gl-draw": "^1.5.1",
|
|
37
|
+
"@mapbox/mapbox-gl-style-spec": "^14.29.1",
|
|
38
|
+
"@turf/turf": "^7.2.0",
|
|
39
|
+
"date-fns": "^4.1.0",
|
|
40
|
+
"find-and": "^1.3.1",
|
|
41
|
+
"lodash": "^4.17.23",
|
|
42
|
+
"mapbox-gl": "^3.26.0",
|
|
43
|
+
"mapbox-gl-draw": "^0.16.0",
|
|
44
|
+
"maplibre-gl": "^5.24.0",
|
|
45
|
+
"uuid": "^13.0.0",
|
|
46
|
+
"wkt": "^0.1.1"
|
|
66
47
|
},
|
|
67
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "16d46a0a55ef91ccd7dcb1b9fa44b02c5d174cc2"
|
|
68
49
|
}
|