@dartcom/ui-kit 10.2.8 → 10.2.10

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.
@@ -1 +1 @@
1
- {"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/alert-dialog/alert-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;;AAiF3C,wBAAqC"}
1
+ {"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/alert-dialog/alert-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;;AAqG3C,wBAAqC"}
@@ -3,7 +3,11 @@ import type { Meta, StoryObj } from '@storybook/react-vite';
3
3
  type FormType = typeof AlertDialog;
4
4
  declare const meta: Meta<FormType>;
5
5
  type Story = StoryObj<FormType>;
6
- export declare const Base: Story;
6
+ export declare const Info: Story;
7
7
  export declare const Delete: Story;
8
+ export declare const Warning: Story;
9
+ export declare const WithContent: Story;
10
+ export declare const DisabledAgreeButton: Story;
11
+ export declare const DisabledDisagreeButton: Story;
8
12
  export default meta;
9
13
  //# sourceMappingURL=alert-dialog.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert-dialog.stories.d.ts","sourceRoot":"","sources":["../../../src/components/alert-dialog/alert-dialog.stories.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC;AAEhC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG5D,KAAK,QAAQ,GAAG,OAAO,WAAW,CAAC;AAInC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,QAAQ,CAgCxB,CAAC;AAEF,KAAK,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAEhC,eAAO,MAAM,IAAI,EAAE,KAAU,CAAC;AAE9B,eAAO,MAAM,MAAM,EAAE,KAIpB,CAAC;AAEF,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"alert-dialog.stories.d.ts","sourceRoot":"","sources":["../../../src/components/alert-dialog/alert-dialog.stories.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC;AAEhC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG5D,KAAK,QAAQ,GAAG,OAAO,WAAW,CAAC;AAInC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,QAAQ,CAgCxB,CAAC;AAEF,KAAK,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAEhC,eAAO,MAAM,IAAI,EAAE,KAAU,CAAC;AAE9B,eAAO,MAAM,MAAM,EAAE,KAIpB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAUzB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAMjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAMpC,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -6,9 +6,14 @@ export type AlertDialogProps = {
6
6
  onSuccess: () => void;
7
7
  onOpen?: () => void;
8
8
  onClose?: () => void;
9
- buttonsText?: {
10
- agree?: string;
11
- disagree?: string;
9
+ content?: React.JSX.Element;
10
+ agreeButton?: {
11
+ text?: string;
12
+ disabled?: boolean;
13
+ };
14
+ disagreeButton?: {
15
+ text?: string;
16
+ disabled?: boolean;
12
17
  };
13
18
  };
14
19
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/alert-dialog/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IAEpB,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAErC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,WAAW,CAAC,EAAE;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACH,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/alert-dialog/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IAEpB,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAErC,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IAE5B,WAAW,CAAC,EAAE;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC;IAEF,cAAc,CAAC,EAAE;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC;CACH,CAAC"}
@@ -1,7 +1,17 @@
1
- export declare const zLvlOrders: number[];
1
+ import { TangramLayerDraw } from '../../lib';
2
+ import { SublayerConfig } from './types';
3
+ export declare const zLvlOrders: string[];
2
4
  export declare const functionInterval: number[][];
5
+ export declare const generalizationZoom = 16;
3
6
  export declare const colorFunction = "function() {\n const { functional_class, tunnel, tollway } = feature;\n\n const alpha = tunnel ? 0.89 : 1;\n\n const getRGB = (hex, alpha) => {\n const r = +(parseInt(hex.slice(1, 3), 16) / 255).toFixed(2);\n const g = +(parseInt(hex.slice(3, 5), 16) / 255).toFixed(2);\n const b = +(parseInt(hex.slice(5, 7), 16) / 255).toFixed(2);\n\n return [r, g, b, alpha];\n }\n\n if (tollway) {\n return '#D72740';\n }\n\n switch (functional_class) {\n case 1:\n case 2: {\n const color = getRGB('#D1747F', alpha);\n\n return color;\n }\n\n case 3:\n case 4: {\n const color = getRGB('#B1A7AA', alpha);\n\n return color;\n }\n\n case 5: {\n const color = getRGB('#D5CEC3', alpha);\n\n return color;\n }\n }\n}";
4
7
  export declare const widthFunction = "function() {\n const { functional_class, road_number } = feature;\n\n const getScale = () => {\n if ($zoom <= 15 && $zoom >= 14) { return 7; }\n\n if ($zoom <= 13 && $zoom >= 12) { return 9; }\n\n if ($zoom <= 5) { return 400; }\n\n if ($zoom <= 7) { return 200; }\n\n if ($zoom < 12) { return 50; }\n\n return 1;\n }\n\n const scale = getScale();\n\n switch(functional_class) {\n case 1:\n case 2: {\n return 8 * scale;\n }\n\n case 3:\n case 4: {\n return 7 * scale;\n }\n\n case 5: {\n if (Boolean(road_number)) {\n return 7 * scale;\n }\n\n return 6;\n }\n }\n}";
5
8
  export declare const outlineColorFunction = "function() {\n const { functional_class, access_id, tollway } = feature;\n\n if (tollway) {\n return '#B9263B';\n }\n\n switch(functional_class) {\n case 5: {\n return '#989898';\n }\n\n case 3:\n case 4: {\n return '#8F6E78';\n }\n\n case 1:\n case 2: {\n return '#9A414B';\n }\n }\n}";
6
9
  export declare const outlineWidthFunction = "function() {\n const { functional_class, access_id } = feature;\n\n switch(functional_class) {\n case 5: {\n switch (access_id) {\n case 32: {\n return 0;\n }\n\n default: {\n return 1;\n }\n }\n }\n\n default: {\n return 1;\n }\n }\n}";
10
+ export declare const roadNumberLayerDraw: TangramLayerDraw;
11
+ export declare const baseLayerDraw: TangramLayerDraw;
12
+ export declare const borderLayerDraw: TangramLayerDraw;
13
+ export declare const generalizationBaseLayerDraw: TangramLayerDraw;
14
+ export declare const lowMobilityConfig: SublayerConfig;
15
+ export declare const constructionConfig: SublayerConfig;
16
+ export declare const functionalClassAccessId32Config: SublayerConfig;
7
17
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layers/leaflet/layers/link/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,UAAwD,CAAC;AAEhF,eAAO,MAAM,gBAAgB,YAAwB,CAAC;AAEtD,eAAO,MAAM,aAAa,6wBAsCxB,CAAC;AAEH,eAAO,MAAM,aAAa,0oBAsCxB,CAAC;AAEH,eAAO,MAAM,oBAAoB,iVAsB/B,CAAC;AAEH,eAAO,MAAM,oBAAoB,4TAoB/B,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layers/leaflet/layers/link/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,eAAO,MAAM,UAAU,UAWtB,CAAC;AAEF,eAAO,MAAM,gBAAgB,YAAwB,CAAC;AAEtD,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,eAAO,MAAM,aAAa,6wBAsCxB,CAAC;AAEH,eAAO,MAAM,aAAa,0oBAsCxB,CAAC;AAEH,eAAO,MAAM,oBAAoB,iVAsB/B,CAAC;AAEH,eAAO,MAAM,oBAAoB,4TAoB/B,CAAC;AAcH,eAAO,MAAM,mBAAmB,EAAE,gBAejC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,gBAU3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,gBAU7B,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,gBASzC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,cAU/B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,cAYhC,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE,cAY7C,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { TangramLayerDraw } from '../../lib';
2
+ export type SublayerConfig = {
3
+ filter: string;
4
+ draw: TangramLayerDraw;
5
+ };
6
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layers/leaflet/layers/link/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,gBAAgB,CAAC;CACxB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layers/leaflet/layers/link/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,kBAAkB,EAElB,kBAAkB,EACnB,MAAM,WAAW,CAAC;AAWnB,eAAO,MAAM,aAAa,GAAI,QAAQ,kBAAkB,yBAgOvD,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layers/leaflet/layers/link/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,WAAW,CAAC;AA2BnB,eAAO,MAAM,aAAa,GAAI,QAAQ,kBAAkB,yBAqKvD,CAAC"}
package/dist/index.cjs CHANGED
@@ -14854,7 +14854,7 @@ const UploadButton = ({ children, accept, onFilesLoad, ...props }) => {
14854
14854
  }, multiple: true })] }));
14855
14855
  };
14856
14856
 
14857
- const AlertDialog = ({ name, title, description, onSuccess, onOpen, onClose, theme = 'info', buttonsText, }) => {
14857
+ const AlertDialog = ({ name, title, description, onSuccess, onOpen, onClose, theme = 'info', agreeButton, disagreeButton, content, }) => {
14858
14858
  const dialogId = React__namespace.useId();
14859
14859
  const titleId = React__namespace.useId();
14860
14860
  const descriptionId = React__namespace.useId();
@@ -14877,10 +14877,13 @@ const AlertDialog = ({ name, title, description, onSuccess, onOpen, onClose, the
14877
14877
  background,
14878
14878
  color,
14879
14879
  };
14880
- }, children: title }), jsxRuntime.jsx(material.Divider, {}), jsxRuntime.jsx(material.DialogContent, { children: jsxRuntime.jsx(material.DialogContentText, { id: descriptionId, children: description }) }), jsxRuntime.jsx(material.Divider, {}), jsxRuntime.jsxs(material.DialogActions, { children: [jsxRuntime.jsx(Button, { color: "error", onClick: handleClose, children: buttonsText?.disagree ?? 'Закрыть' }), jsxRuntime.jsx(Button, { color: "success", onClick: () => {
14880
+ }, children: title }), jsxRuntime.jsx(material.Divider, {}), jsxRuntime.jsxs(material.DialogContent, { sx: ({ spacing }) => ({
14881
+ display: 'grid',
14882
+ gap: spacing(2),
14883
+ }), children: [jsxRuntime.jsx(material.DialogContentText, { id: descriptionId, children: description }), content ? (jsxRuntime.jsxs(React__namespace.Fragment, { children: [jsxRuntime.jsx(material.Divider, {}), content] })) : null] }), jsxRuntime.jsx(material.Divider, {}), jsxRuntime.jsxs(material.DialogActions, { children: [jsxRuntime.jsx(Button, { color: "error", onClick: handleClose, disabled: disagreeButton?.disabled, children: disagreeButton?.text ?? 'Закрыть' }), jsxRuntime.jsx(Button, { color: "success", onClick: () => {
14881
14884
  onSuccess();
14882
14885
  handleClose();
14883
- }, children: buttonsText?.agree ?? 'Подтвердить' })] })] }));
14886
+ }, disabled: agreeButton?.disabled, children: agreeButton?.text ?? 'Подтвердить' })] })] }));
14884
14887
  };
14885
14888
  var alertDialog = observer(AlertDialog);
14886
14889
 
@@ -25874,8 +25877,20 @@ const getLanduseAreaLayers = (source) => {
25874
25877
  return layers;
25875
25878
  };
25876
25879
 
25877
- const zLvlOrders = [-1, -0.5, -0.3, 0.0, 0.3, 0.5, 0.7, 1.0, 1.5, 2.0];
25880
+ const zLvlOrders = [
25881
+ '-1.0',
25882
+ '-0.5',
25883
+ '-0.3',
25884
+ '0.0',
25885
+ '0.3',
25886
+ '0.5',
25887
+ '0.7',
25888
+ '1.0',
25889
+ '1.5',
25890
+ '2.0',
25891
+ ];
25878
25892
  const functionInterval = [[5], [4, 3], [2, 1]];
25893
+ const generalizationZoom = 16;
25879
25894
  const colorFunction = `function() {
25880
25895
  const { functional_class, tunnel, tollway } = feature;
25881
25896
 
@@ -25998,7 +26013,101 @@ const outlineWidthFunction = `function() {
25998
26013
  }
25999
26014
  }
26000
26015
  }`;
26016
+ const text = {
26017
+ text_source: 'street_name',
26018
+ font: {
26019
+ fill: 'black',
26020
+ size: '14px',
26021
+ stroke: { color: 'white', width: '3px' },
26022
+ },
26023
+ };
26024
+ const roadNumberLayerDraw = {
26025
+ text: {
26026
+ text_source: 'road_number',
26027
+ font: {
26028
+ fill: '#181bff',
26029
+ size: '16px',
26030
+ weight: 'bold',
26031
+ underline: true,
26032
+ background: {
26033
+ color: 'black',
26034
+ },
26035
+ },
26036
+ },
26037
+ };
26038
+ const baseLayerDraw = {
26039
+ text,
26040
+ lines: {
26041
+ color: colorFunction,
26042
+ width: widthFunction,
26043
+ cap: 'round',
26044
+ join: 'round',
26045
+ },
26046
+ };
26047
+ const borderLayerDraw = {
26048
+ lines: {
26049
+ color: colorFunction,
26050
+ width: widthFunction,
26051
+ outline: {
26052
+ color: outlineColorFunction,
26053
+ width: outlineWidthFunction,
26054
+ },
26055
+ },
26056
+ };
26057
+ const generalizationBaseLayerDraw = {
26058
+ text,
26059
+ lines: {
26060
+ color: '#BABCC2',
26061
+ width: 30,
26062
+ cap: 'round',
26063
+ join: 'round',
26064
+ },
26065
+ };
26066
+ const lowMobilityConfig = {
26067
+ filter: `function() {
26068
+ return global.links.getIsLowMobility(feature);
26069
+ }`,
26070
+ draw: {
26071
+ lines: {
26072
+ width: 4,
26073
+ },
26074
+ },
26075
+ };
26076
+ const constructionConfig = {
26077
+ filter: `function() {
26078
+ return global.links.getIsConstruction(feature);
26079
+ }`,
26080
+ draw: {
26081
+ lines: {
26082
+ width: 3,
26083
+ color: '#9AA096',
26084
+ dash: [2, 1],
26085
+ },
26086
+ },
26087
+ };
26088
+ const functionalClassAccessId32Config = {
26089
+ filter: `function() {
26090
+ return global.links.getIsFunctionalClass(feature);
26091
+ }`,
26092
+ draw: {
26093
+ lines: {
26094
+ width: 2,
26095
+ color: '#9AA096',
26096
+ dash: [2, 1],
26097
+ },
26098
+ },
26099
+ };
26001
26100
 
26101
+ const getFilter = (zLvl) => {
26102
+ const filter = `function() {
26103
+ const { z_lvl = '0.0' } = feature;
26104
+
26105
+ const isFilter = z_lvl === '${zLvl}' && $zoom > ${generalizationZoom};
26106
+
26107
+ return isFilter;
26108
+ }`;
26109
+ return filter;
26110
+ };
26002
26111
  const getLinkLayers = (source) => {
26003
26112
  const layers = [];
26004
26113
  const data = {
@@ -26008,64 +26117,14 @@ const getLinkLayers = (source) => {
26008
26117
  const roadNumberLayer = {
26009
26118
  id: getUniqueKey(),
26010
26119
  data,
26011
- draw: {
26012
- text: {
26013
- text_source: 'road_number',
26014
- font: {
26015
- fill: '#181bff',
26016
- size: '16px',
26017
- weight: 'bold',
26018
- underline: true,
26019
- background: {
26020
- color: 'black',
26021
- },
26022
- },
26023
- },
26024
- },
26120
+ draw: roadNumberLayerDraw,
26025
26121
  };
26026
26122
  layers.push(roadNumberLayer);
26027
- const text = {
26028
- text_source: 'street_name',
26029
- font: {
26030
- fill: 'black',
26031
- size: '14px',
26032
- stroke: { color: 'white', width: '3px' },
26033
- },
26034
- };
26035
- const getBaseLayerDraw = () => ({
26036
- text,
26037
- lines: {
26038
- color: colorFunction,
26039
- width: widthFunction,
26040
- cap: 'round',
26041
- join: 'round',
26042
- },
26043
- });
26044
- const getBorderLayerDraw = () => ({
26045
- lines: {
26046
- color: colorFunction,
26047
- width: widthFunction,
26048
- outline: {
26049
- color: outlineColorFunction,
26050
- width: outlineWidthFunction,
26051
- },
26052
- },
26053
- });
26054
- const getFilter = (zLvl) => {
26055
- const filter = `function() {
26056
- const { z_lvl = 0.0 } = feature;
26057
-
26058
- const isFilter = +z_lvl === ${zLvl};
26059
-
26060
- return isFilter;
26061
- }`;
26062
- return filter;
26063
- };
26064
26123
  zLvlOrders.forEach((zLvl) => {
26065
26124
  const baseLayers = [];
26066
26125
  const borderLayers = [];
26067
26126
  switch (zLvl) {
26068
- case 0.0: {
26127
+ case '0.0': {
26069
26128
  functionInterval.forEach((functionClasses) => {
26070
26129
  const classBaseLayers = [];
26071
26130
  const classBorderLayers = [];
@@ -26074,47 +26133,39 @@ const getLinkLayers = (source) => {
26074
26133
  id: getUniqueKey(),
26075
26134
  data,
26076
26135
  filter: `function() {
26077
- const { functional_class, z_lvl = 0.0 } = feature;
26136
+ const { functional_class, z_lvl = '0.0' } = feature;
26078
26137
 
26079
- const isFilter = +z_lvl === ${zLvl} && +functional_class === ${functionClass};
26138
+ const isFilter = z_lvl === '${zLvl}' && +functional_class === ${functionClass} && $zoom > ${generalizationZoom};
26080
26139
 
26081
26140
  return isFilter;
26082
26141
  }`,
26083
- draw: getBaseLayerDraw(),
26142
+ draw: baseLayerDraw,
26084
26143
  sublayers: {
26085
26144
  construction: {
26086
- filter: `function() {
26087
- return global.links.getIsConstruction(feature);
26088
- }`,
26089
- draw: {
26090
- lines: {
26091
- width: 3,
26092
- color: '#9AA096',
26093
- dash: [2, 1],
26094
- },
26095
- },
26145
+ ...constructionConfig,
26096
26146
  },
26097
26147
  functionalClassAccessId32: {
26098
- filter: `function() {
26099
- return global.links.getIsFunctionalClass(feature);
26100
- }`,
26101
- draw: {
26102
- lines: {
26103
- width: 2,
26104
- color: '#9AA096',
26105
- dash: [2, 1],
26106
- },
26107
- },
26148
+ ...functionalClassAccessId32Config,
26108
26149
  },
26109
26150
  lowMobility: {
26110
- filter: `function() {
26111
- return global.links.getIsLowMobility(feature);
26112
- }`,
26113
- draw: {
26114
- lines: {
26115
- width: 4,
26116
- },
26117
- },
26151
+ ...lowMobilityConfig,
26152
+ },
26153
+ },
26154
+ };
26155
+ const generalizationLayer = {
26156
+ id: getUniqueKey(),
26157
+ data,
26158
+ filter: `function() {
26159
+ const { functional_class, z_lvl = '0.0' } = feature;
26160
+
26161
+ const isFilter = z_lvl === '${zLvl}' && +functional_class === ${functionClass} && $zoom <= ${generalizationZoom};
26162
+
26163
+ return isFilter;
26164
+ }`,
26165
+ draw: generalizationBaseLayerDraw,
26166
+ sublayers: {
26167
+ functionalClassAccessId32: {
26168
+ ...functionalClassAccessId32Config,
26118
26169
  },
26119
26170
  },
26120
26171
  };
@@ -26122,27 +26173,21 @@ const getLinkLayers = (source) => {
26122
26173
  id: getUniqueKey(),
26123
26174
  data,
26124
26175
  filter: `function() {
26125
- const { functional_class, z_lvl = 0.0 } = feature;
26176
+ const { functional_class, z_lvl = '0.0' } = feature;
26126
26177
 
26127
- const isFilter = +z_lvl === ${zLvl} && +functional_class === ${functionClass} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);
26178
+ const isFilter = z_lvl === '${zLvl}' && +functional_class === ${functionClass} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature) && $zoom > ${generalizationZoom};
26128
26179
 
26129
26180
 
26130
26181
  return isFilter;
26131
26182
  }`,
26132
- draw: getBorderLayerDraw(),
26183
+ draw: borderLayerDraw,
26133
26184
  sublayers: {
26134
26185
  lowMobility: {
26135
- filter: `function() {
26136
- return global.links.getIsLowMobility(feature);
26137
- }`,
26138
- draw: {
26139
- lines: {
26140
- width: 4,
26141
- },
26142
- },
26186
+ ...lowMobilityConfig,
26143
26187
  },
26144
26188
  },
26145
26189
  };
26190
+ classBaseLayers.push(generalizationLayer);
26146
26191
  classBaseLayers.push(baseLayer);
26147
26192
  classBorderLayers.push(borderLayer);
26148
26193
  });
@@ -26157,16 +26202,29 @@ const getLinkLayers = (source) => {
26157
26202
  id: getUniqueKey(),
26158
26203
  data,
26159
26204
  filter,
26160
- draw: getBaseLayerDraw(),
26205
+ draw: baseLayerDraw,
26206
+ };
26207
+ const generalizationLayer = {
26208
+ id: getUniqueKey(),
26209
+ data,
26210
+ filter: `function() {
26211
+ const { z_lvl = '0.0' } = feature;
26212
+
26213
+ const isFilter = z_lvl === '${zLvl}' && $zoom <= ${generalizationZoom};
26214
+
26215
+ return isFilter;
26216
+ }`,
26217
+ draw: generalizationBaseLayerDraw,
26161
26218
  };
26162
26219
  const borderLayer = {
26163
26220
  id: getUniqueKey(),
26164
26221
  data,
26165
26222
  filter,
26166
- draw: getBorderLayerDraw(),
26223
+ draw: borderLayerDraw,
26167
26224
  };
26168
26225
  baseLayers.push(baseLayer);
26169
26226
  borderLayers.push(borderLayer);
26227
+ baseLayers.push(generalizationLayer);
26170
26228
  }
26171
26229
  }
26172
26230
  layers.push(...borderLayers, ...baseLayers);