@dartcom/ui-kit 10.2.16 → 10.2.18

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":"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"}
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;AAsInB,eAAO,MAAM,aAAa,GAAI,QAAQ,kBAAkB,yBA0JvD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"leaflet.d.ts","sourceRoot":"","sources":["../../../../src/components/layers/leaflet/leaflet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,kBAAkB,EAAsB,MAAM,OAAO,CAAC;AAE/D,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,kBAAkB,EAAE,CAAC;CAC9B,CAAC;AAEF,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAgB7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"leaflet.d.ts","sourceRoot":"","sources":["../../../../src/components/layers/leaflet/leaflet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,kBAAkB,EAAsB,MAAM,OAAO,CAAC;AAE/D,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,kBAAkB,EAAE,CAAC;CAC9B,CAAC;AAEF,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAc7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,8 +1,10 @@
1
1
  import { Nullable } from '../../../../../lib/types';
2
2
  import { SourceLayerEventHandlers, TangramCustomLayer, TangramEventConfig, TangramLeafletLayer, TangramScene, TangramSourceConfig, TangramSourceNames } from '../types';
3
- export declare const useGetLeafletLayer: ({ eventHandlers, }: {
3
+ type UseGetLeafletLayerProps = {
4
4
  eventHandlers?: SourceLayerEventHandlers;
5
- }) => {
5
+ defaultLayers?: TangramCustomLayer[];
6
+ };
7
+ export declare const useGetLeafletLayer: ({ eventHandlers, defaultLayers, }: UseGetLeafletLayerProps) => {
6
8
  layer: Nullable<TangramLeafletLayer>;
7
9
  scene: TangramScene | null;
8
10
  config: Nullable<TangramEventConfig>;
@@ -25,4 +27,5 @@ export declare const useGetLeafletLayer: ({ eventHandlers, }: {
25
27
  getLayers: () => string[];
26
28
  removeLayers: () => void;
27
29
  };
30
+ export {};
28
31
  //# sourceMappingURL=useGetLeafletLayer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useGetLeafletLayer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layers/leaflet/lib/hooks/useGetLeafletLayer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAMvC,OAAO,EAEL,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAKlB,eAAO,MAAM,kBAAkB,GAAI,oBAEhC;IACD,aAAa,CAAC,EAAE,wBAAwB,CAAC;CAC1C;;;;4BAyGgB,kBAAkB;4BA0BlB,mBAAmB,CAAC,MAAM,CAAC;+BAa1B,mBAAmB,CAAC,MAAM,CAAC,UAC/B,mBAAmB,CAAC,KAAK,CAAC;+BAWvB,kBAAkB;sBASvB,kBAAkB;yBAyClB,kBAAkB;gCAaR;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;gCAWzC,kBAAkB;gDAgBL;QAAE,KAAK,EAAE,kBAAkB,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE;;;;CAqHvE,CAAC"}
1
+ {"version":3,"file":"useGetLeafletLayer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layers/leaflet/lib/hooks/useGetLeafletLayer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAMvC,OAAO,EAEL,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAKlB,KAAK,uBAAuB,GAAG;IAC7B,aAAa,CAAC,EAAE,wBAAwB,CAAC;IACzC,aAAa,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACtC,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,mCAGhC,uBAAuB;;;;4BAyGT,kBAAkB;4BA0BlB,mBAAmB,CAAC,MAAM,CAAC;+BAa1B,mBAAmB,CAAC,MAAM,CAAC,UAC/B,mBAAmB,CAAC,KAAK,CAAC;+BAWvB,kBAAkB;sBASvB,kBAAkB;yBAyClB,kBAAkB;gCAaR;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;gCAWzC,kBAAkB;gDAgBL;QAAE,KAAK,EAAE,kBAAkB,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE;;;;CA2HvE,CAAC"}
@@ -1,22 +1,21 @@
1
- import { ApiService } from '../../services/api';
1
+ import { ApiConfig, ApiService } from '../../services/api';
2
2
  import { BackendError, ResponseData } from './types';
3
3
  export interface ConfigOptions {
4
- apiKey: string;
5
- backendUrl: string;
4
+ private_key: string;
6
5
  onCheck?: (data: ResponseData) => void;
7
6
  onError?: (error: BackendError) => void;
7
+ apiConfig: ApiConfig;
8
8
  }
9
9
  export declare class GlobalConfig {
10
10
  private readonly configOptions;
11
- private _apiService;
12
- get apiService(): ApiService;
11
+ private readonly _private_key;
12
+ private readonly _apiService;
13
13
  private static _instance;
14
14
  static get instance(): GlobalConfig;
15
15
  static initialize(options: ConfigOptions): void;
16
16
  static deactivate(): void;
17
17
  constructor(configOptions: ConfigOptions);
18
- private _apiKey;
19
- get apiKey(): string;
18
+ get apiService(): ApiService;
20
19
  private _isValidApiKey;
21
20
  get isValidApiKey(): boolean;
22
21
  private _getCheckKeyData;
@@ -1 +1 @@
1
- {"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../src/configs/global/global.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAoB,MAAM,gBAAgB,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAErD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IAEf,UAAU,EAAE,MAAM,CAAC;IAEnB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;CACzC;AAED,qBAAa,YAAY;IAyBX,OAAO,CAAC,QAAQ,CAAC,aAAa;IAxB1C,OAAO,CAAC,WAAW,CAAa;IAChC,IAAW,UAAU,eAEpB;IAED,OAAO,CAAC,MAAM,CAAC,SAAS,CAAgC;IACxD,WAAkB,QAAQ,iBAQzB;WACa,UAAU,CAAC,OAAO,EAAE,aAAa;WAKjC,UAAU;gBAIK,aAAa,EAAE,aAAa;IAezD,OAAO,CAAC,OAAO,CAAM;IACrB,IAAW,MAAM,WAEhB;IAED,OAAO,CAAC,cAAc,CAAS;IAC/B,IAAW,aAAa,YAEvB;YAEa,gBAAgB;CAgC/B"}
1
+ {"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../src/configs/global/global.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAErD,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IAEpB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAExC,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,qBAAa,YAAY;IAuBX,OAAO,CAAC,QAAQ,CAAC,aAAa;IAtB1C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAa;IAEzC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAgC;IACxD,WAAkB,QAAQ,iBAQzB;WACa,UAAU,CAAC,OAAO,EAAE,aAAa;WAKjC,UAAU;gBAIK,aAAa,EAAE,aAAa;IAoBzD,IAAW,UAAU,eAEpB;IAED,OAAO,CAAC,cAAc,CAAS;IAC/B,IAAW,aAAa,YAEvB;YAEa,gBAAgB;CAgC/B"}
package/dist/index.cjs CHANGED
@@ -7492,10 +7492,13 @@ const DartcomMobxProvider = ({ children, }) => {
7492
7492
  };
7493
7493
 
7494
7494
  class ApiService {
7495
+ config;
7495
7496
  client;
7496
- constructor(baseURL) {
7497
+ constructor(config) {
7498
+ this.config = config;
7497
7499
  this.client = axios.create({
7498
- baseURL,
7500
+ baseURL: config?.baseURL,
7501
+ withCredentials: config?.withCredentials,
7499
7502
  timeout: 10000,
7500
7503
  headers: {
7501
7504
  'Content-Type': 'application/json',
@@ -7507,6 +7510,12 @@ class ApiService {
7507
7510
  // Interceptor для запросов
7508
7511
  this.client.interceptors.request.use((config) => {
7509
7512
  rootStore.authStore.isUnauthorized = false;
7513
+ const headers = this.config?.getHeaders?.();
7514
+ if (headers) {
7515
+ Object.entries(headers).forEach(([key, value]) => {
7516
+ config.headers[key] = value;
7517
+ });
7518
+ }
7510
7519
  return config;
7511
7520
  }, (error) => {
7512
7521
  showSnackbar({
@@ -7549,17 +7558,10 @@ class ApiService {
7549
7558
  }
7550
7559
  }
7551
7560
 
7552
- const createApiService = (baseURL) => {
7553
- const apiService = new ApiService(baseURL);
7554
- return apiService;
7555
- };
7556
-
7557
7561
  class GlobalConfig {
7558
7562
  configOptions;
7563
+ _private_key;
7559
7564
  _apiService;
7560
- get apiService() {
7561
- return this._apiService;
7562
- }
7563
7565
  static _instance = null;
7564
7566
  static get instance() {
7565
7567
  if (!GlobalConfig._instance) {
@@ -7577,8 +7579,10 @@ class GlobalConfig {
7577
7579
  }
7578
7580
  constructor(configOptions) {
7579
7581
  this.configOptions = configOptions;
7580
- this._apiKey = configOptions.apiKey;
7581
- this._apiService = createApiService(configOptions.backendUrl);
7582
+ const { private_key, apiConfig } = configOptions;
7583
+ this._private_key = private_key;
7584
+ const apiService = new ApiService(apiConfig);
7585
+ this._apiService = apiService;
7582
7586
  this._getCheckKeyData().then((data) => {
7583
7587
  if (data) {
7584
7588
  const { valid } = data;
@@ -7587,21 +7591,20 @@ class GlobalConfig {
7587
7591
  }
7588
7592
  });
7589
7593
  }
7590
- _apiKey = '';
7591
- get apiKey() {
7592
- return this._apiKey;
7594
+ get apiService() {
7595
+ return this._apiService;
7593
7596
  }
7594
7597
  _isValidApiKey = false;
7595
7598
  get isValidApiKey() {
7596
7599
  return this._isValidApiKey;
7597
7600
  }
7598
7601
  async _getCheckKeyData() {
7599
- const checkKeyData = await this._apiService
7602
+ const checkKeyData = await this.apiService
7600
7603
  .get({
7601
7604
  url: 'check_tile_token',
7602
7605
  config: {
7603
7606
  params: {
7604
- tile_token: this._apiKey,
7607
+ tile_token: this._private_key,
7605
7608
  },
7606
7609
  },
7607
7610
  })
@@ -25661,11 +25664,87 @@ const functionalClassAccessId32Config = {
25661
25664
  },
25662
25665
  };
25663
25666
 
25664
- const getFilter = (zLvl) => {
25667
+ const getFilters = ({ source, zLvl, functionClass, }) => {
25668
+ switch (source) {
25669
+ case exports.TangramSourceNames.MSK: {
25670
+ return {
25671
+ base: {
25672
+ default: `function() {
25673
+ const { functional_class, z_lvl = '0.0', tollway } = feature;
25674
+
25675
+ const isFilter = $zoom <= ${generalizationZoom} && z_lvl === '${zLvl}' && +functional_class === ${functionClass} && tollway === false;
25676
+
25677
+ return isFilter;
25678
+ }`,
25679
+ tollway: `function() {
25680
+ const { functional_class, z_lvl = '0.0', tollway } = feature;
25681
+
25682
+ const isFilter = $zoom <= ${generalizationZoom} && z_lvl === '${zLvl}' && +functional_class === ${functionClass} && tollway === true;
25683
+
25684
+ return isFilter;
25685
+ }`,
25686
+ },
25687
+ border: {
25688
+ default: `function() {
25689
+ const { functional_class, z_lvl = '0.0', tollway } = feature;
25690
+
25691
+ const isFilter = $zoom <= ${generalizationZoom} && tollway === false && z_lvl === '${zLvl}' && +functional_class === ${functionClass} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);
25692
+
25693
+ return isFilter;
25694
+ }`,
25695
+ tollway: `function() {
25696
+ const { functional_class, z_lvl = '0.0', tollway } = feature;
25697
+
25698
+ const isFilter = $zoom <= ${generalizationZoom} && tollway === true && z_lvl === '${zLvl}' && +functional_class === ${functionClass} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);
25699
+
25700
+ return isFilter;
25701
+ }`,
25702
+ },
25703
+ };
25704
+ }
25705
+ default: {
25706
+ return {
25707
+ base: {
25708
+ default: `function() {
25709
+ const { functional_class, z_lvl = '0.0', tollway } = feature;
25710
+
25711
+ const isFilter = z_lvl === '${zLvl}' && +functional_class === ${functionClass} && tollway === false;
25712
+
25713
+ return isFilter;
25714
+ }`,
25715
+ tollway: `function() {
25716
+ const { functional_class, z_lvl = '0.0', tollway } = feature;
25717
+
25718
+ const isFilter = z_lvl === '${zLvl}' && +functional_class === ${functionClass} && tollway === true;
25719
+
25720
+ return isFilter;
25721
+ }`,
25722
+ },
25723
+ border: {
25724
+ default: `function() {
25725
+ const { functional_class, z_lvl = '0.0', tollway } = feature;
25726
+
25727
+ const isFilter = tollway === false && z_lvl === '${zLvl}' && +functional_class === ${functionClass} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);
25728
+
25729
+ return isFilter;
25730
+ }`,
25731
+ tollway: `function() {
25732
+ const { functional_class, z_lvl = '0.0', tollway } = feature;
25733
+
25734
+ const isFilter = tollway === true && z_lvl === '${zLvl}' && +functional_class === ${functionClass} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);
25735
+
25736
+ return isFilter;
25737
+ }`,
25738
+ },
25739
+ };
25740
+ }
25741
+ }
25742
+ };
25743
+ const getGeneralizationFilter = ({ zLvl, functionClass, }) => {
25665
25744
  const filter = `function() {
25666
- const { z_lvl = '0.0' } = feature;
25745
+ const { functional_class, z_lvl = '0.0', tollway } = feature;
25667
25746
 
25668
- const isFilter = z_lvl === '${zLvl}' && $zoom <= ${generalizationZoom};
25747
+ const isFilter = $zoom > ${generalizationZoom} && z_lvl === '${zLvl}' && +functional_class === ${functionClass};
25669
25748
 
25670
25749
  return isFilter;
25671
25750
  }`;
@@ -25686,110 +25765,98 @@ const getLinkLayers = (source) => {
25686
25765
  zLvlOrders.forEach((zLvl) => {
25687
25766
  const baseLayers = [];
25688
25767
  const borderLayers = [];
25689
- switch (zLvl) {
25690
- case '0.0': {
25691
- functionInterval.forEach((functionClasses) => {
25692
- const classBaseLayers = [];
25693
- const classBorderLayers = [];
25694
- functionClasses.forEach((functionClass) => {
25695
- const baseLayer = {
25696
- id: getUniqueKey(),
25697
- data,
25698
- filter: `function() {
25699
- const { functional_class, z_lvl = '0.0' } = feature;
25700
-
25701
- const isFilter = z_lvl === '${zLvl}' && +functional_class === ${functionClass} && $zoom <= ${generalizationZoom};
25702
-
25703
- return isFilter;
25704
- }`,
25705
- draw: baseLayerDraw,
25706
- sublayers: {
25707
- construction: {
25708
- ...constructionConfig,
25709
- },
25710
- functionalClassAccessId32: {
25711
- ...functionalClassAccessId32Config,
25712
- },
25713
- lowMobility: {
25714
- ...lowMobilityConfig,
25715
- },
25716
- },
25717
- };
25718
- const generalizationLayer = {
25719
- id: getUniqueKey(),
25720
- data,
25721
- filter: `function() {
25722
- const { functional_class, z_lvl = '0.0' } = feature;
25723
-
25724
- const isFilter = z_lvl === '${zLvl}' && +functional_class === ${functionClass} && $zoom > ${generalizationZoom};
25725
-
25726
- return isFilter;
25727
- }`,
25728
- draw: generalizationBaseLayerDraw,
25729
- sublayers: {
25730
- functionalClassAccessId32: {
25731
- ...functionalClassAccessId32Config,
25732
- },
25733
- },
25734
- };
25735
- const borderLayer = {
25736
- id: getUniqueKey(),
25737
- data,
25738
- filter: `function() {
25739
- const { functional_class, z_lvl = '0.0' } = feature;
25740
-
25741
- const isFilter = z_lvl === '${zLvl}' && +functional_class === ${functionClass} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature) && $zoom <= ${generalizationZoom};
25742
-
25743
-
25744
- return isFilter;
25745
- }`,
25746
- draw: borderLayerDraw,
25747
- sublayers: {
25748
- lowMobility: {
25749
- ...lowMobilityConfig,
25750
- },
25751
- },
25752
- };
25753
- classBaseLayers.push(generalizationLayer);
25754
- classBaseLayers.push(baseLayer);
25755
- classBorderLayers.push(borderLayer);
25756
- });
25757
- baseLayers.push(...classBaseLayers);
25758
- borderLayers.push(...classBorderLayers);
25768
+ functionInterval.forEach((functionClasses) => {
25769
+ const classBaseLayers = [];
25770
+ const classBorderLayers = [];
25771
+ functionClasses.forEach((functionClass) => {
25772
+ const filters = getFilters({
25773
+ source,
25774
+ zLvl,
25775
+ functionClass,
25759
25776
  });
25760
- break;
25761
- }
25762
- default: {
25763
- const filter = getFilter(zLvl);
25764
- const baseLayer = {
25777
+ const generalizationFilter = getGeneralizationFilter({
25778
+ zLvl,
25779
+ functionClass,
25780
+ });
25781
+ const defaultBaseLayer = {
25782
+ id: getUniqueKey(),
25783
+ data,
25784
+ filter: filters.base.default,
25785
+ draw: baseLayerDraw,
25786
+ sublayers: {
25787
+ construction: {
25788
+ ...constructionConfig,
25789
+ },
25790
+ functionalClassAccessId32: {
25791
+ ...functionalClassAccessId32Config,
25792
+ },
25793
+ lowMobility: {
25794
+ ...lowMobilityConfig,
25795
+ },
25796
+ },
25797
+ };
25798
+ const toolBaseLayer = {
25765
25799
  id: getUniqueKey(),
25766
25800
  data,
25767
- filter,
25801
+ filter: filters.base.tollway,
25768
25802
  draw: baseLayerDraw,
25803
+ sublayers: {
25804
+ construction: {
25805
+ ...constructionConfig,
25806
+ },
25807
+ functionalClassAccessId32: {
25808
+ ...functionalClassAccessId32Config,
25809
+ },
25810
+ lowMobility: {
25811
+ ...lowMobilityConfig,
25812
+ },
25813
+ },
25769
25814
  };
25770
25815
  const generalizationLayer = {
25771
25816
  id: getUniqueKey(),
25772
25817
  data,
25773
- filter: `function() {
25774
- const { z_lvl = '0.0' } = feature;
25775
-
25776
- const isFilter = z_lvl === '${zLvl}' && $zoom > ${generalizationZoom};
25777
-
25778
- return isFilter;
25779
- }`,
25818
+ filter: generalizationFilter,
25780
25819
  draw: generalizationBaseLayerDraw,
25820
+ sublayers: {
25821
+ functionalClassAccessId32: {
25822
+ ...functionalClassAccessId32Config,
25823
+ },
25824
+ },
25781
25825
  };
25782
- const borderLayer = {
25826
+ const defaultBorderLayer = {
25783
25827
  id: getUniqueKey(),
25784
25828
  data,
25785
- filter,
25829
+ filter: filters.border.default,
25786
25830
  draw: borderLayerDraw,
25831
+ sublayers: {
25832
+ lowMobility: {
25833
+ ...lowMobilityConfig,
25834
+ },
25835
+ },
25787
25836
  };
25788
- baseLayers.push(baseLayer);
25789
- borderLayers.push(borderLayer);
25790
- baseLayers.push(generalizationLayer);
25791
- }
25792
- }
25837
+ const toolBorderLayer = {
25838
+ id: getUniqueKey(),
25839
+ data,
25840
+ filter: filters.border.tollway,
25841
+ draw: borderLayerDraw,
25842
+ sublayers: {
25843
+ lowMobility: {
25844
+ ...lowMobilityConfig,
25845
+ },
25846
+ },
25847
+ };
25848
+ switch (source) {
25849
+ case exports.TangramSourceNames.MSK: {
25850
+ classBaseLayers.push(generalizationLayer);
25851
+ break;
25852
+ }
25853
+ }
25854
+ classBaseLayers.push(defaultBaseLayer, toolBaseLayer);
25855
+ classBorderLayers.push(defaultBorderLayer, toolBorderLayer);
25856
+ });
25857
+ baseLayers.push(...classBaseLayers);
25858
+ borderLayers.push(...classBorderLayers);
25859
+ });
25793
25860
  layers.push(...borderLayers, ...baseLayers);
25794
25861
  });
25795
25862
  return layers;
@@ -28800,7 +28867,7 @@ const getLayerModalsNames = (layer) => {
28800
28867
  return layerModalsNames;
28801
28868
  };
28802
28869
 
28803
- const useGetLeafletLayer = ({ eventHandlers, }) => {
28870
+ const useGetLeafletLayer = ({ eventHandlers, defaultLayers, }) => {
28804
28871
  const [layer, setLayer] = React__namespace.useState(null);
28805
28872
  const [config, setConfig] = React__namespace.useState(null);
28806
28873
  const scene = React__namespace.useMemo(() => {
@@ -29038,6 +29105,11 @@ const useGetLeafletLayer = ({ eventHandlers, }) => {
29038
29105
  });
29039
29106
  Object.values(exports.TangramSourceNames).forEach(addSource);
29040
29107
  }, [addStyle, addSource]);
29108
+ React__namespace.useEffect(() => {
29109
+ if (defaultLayers) {
29110
+ defaultLayers.map(addLayer);
29111
+ }
29112
+ }, [defaultLayers, addLayer]);
29041
29113
  return {
29042
29114
  layer,
29043
29115
  scene,
@@ -29071,16 +29143,15 @@ function useMap() {
29071
29143
  }
29072
29144
 
29073
29145
  const LeafletLayer = ({ layers }) => {
29074
- const { layer, addLayer } = useGetLeafletLayer({});
29146
+ const { layer } = useGetLeafletLayer({
29147
+ defaultLayers: layers,
29148
+ });
29075
29149
  const map = useMap();
29076
29150
  React__namespace.useEffect(() => {
29077
29151
  if (layer) {
29078
29152
  map.addLayer(layer);
29079
29153
  }
29080
29154
  }, [layer]);
29081
- React__namespace.useEffect(() => {
29082
- layers.map(addLayer);
29083
- }, [addLayer, layers]);
29084
29155
  return null;
29085
29156
  };
29086
29157
 
@@ -31769,7 +31840,6 @@ exports.authStore = authStore;
31769
31840
  exports.cameraConfig = cameraConfig;
31770
31841
  exports.catIds = catIds;
31771
31842
  exports.copyInformation = copyInformation;
31772
- exports.createApiService = createApiService;
31773
31843
  exports.dateRequiredSchema = dateRequiredSchema;
31774
31844
  exports.dateSchema = dateSchema;
31775
31845
  exports.encodeString = encodeString;