@evergis/react 3.1.120-alpha.0 → 3.1.120

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 CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Everpoint
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Everpoint
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
- # @evergis/react
2
-
3
- В данном репозитории находятся специфичные (в отличии от `@evergis/uilib-gl`) для `Evergis Online`,
4
- но в целом переиспользуемые на других проектах, построенных на Evergis API, React-компоненты.
5
-
6
- ***ВАЖНО!!!***: Разрабатываемые компоненты не должны иметь зависимостей
7
- от системы поддержки мультиязычности `Evergis Online`!
1
+ # @evergis/react
2
+
3
+ В данном репозитории находятся специфичные (в отличии от `@evergis/uilib-gl`) для `Evergis Online`,
4
+ но в целом переиспользуемые на других проектах, построенных на Evergis API, React-компоненты.
5
+
6
+ ***ВАЖНО!!!***: Разрабатываемые компоненты не должны иметь зависимостей
7
+ от системы поддержки мультиязычности `Evergis Online`!
@@ -1,3 +1,3 @@
1
1
  import { FC } from 'react';
2
- import { ContainerProps } from '../../types';
2
+ import { ContainerProps } from '../../../types';
3
3
  export declare const EditBooleanContainer: FC<ContainerProps>;
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { ContainerProps } from '../../../types';
3
+ export declare const EditDropdownContainer: FC<ContainerProps>;
@@ -1,3 +1,3 @@
1
1
  import { FC } from 'react';
2
- import { ContainerProps } from '../../types';
2
+ import { ContainerProps } from '../../../types';
3
3
  export declare const EditGroupContainer: FC<ContainerProps>;
@@ -1,3 +1,3 @@
1
1
  import { FC } from 'react';
2
- import { ContainerProps } from '../../types';
2
+ import { ContainerProps } from '../../../types';
3
3
  export declare const EditStringContainer: FC<ContainerProps>;
@@ -32,6 +32,7 @@ export declare const containerComponents: {
32
32
  readonly Edit: import('react').FC<import('../types').ContainerProps>;
33
33
  readonly EditBoolean: import('react').FC<import('../types').ContainerProps>;
34
34
  readonly EditString: import('react').FC<import('../types').ContainerProps>;
35
+ readonly EditDropdown: import('react').FC<import('../types').ContainerProps>;
35
36
  readonly EditGroup: import('react').FC<import('../types').ContainerProps>;
36
37
  readonly default: import('react').FC<import('../types').ContainerProps>;
37
38
  };
@@ -1,4 +1,4 @@
1
- import { PagedFeaturesListDc, QueryLayerServiceConfigurationDc } from '@evergis/api';
1
+ import { QueryLayerServiceConfigurationDc } from '@evergis/api';
2
2
  import { ClientFeatureAttribute, ConfigContainerChild, ConfigDataSource, DataSourcePromise, EqlDataSource, FetchedDataSource, SelectedFilters, WidgetType } from '../types';
3
3
  export declare const useDataSources: ({ type: widgetType, config, attributes, filters, layerParams, eqlParameters, }: {
4
4
  type?: WidgetType;
@@ -8,7 +8,7 @@ export declare const useDataSources: ({ type: widgetType, config, attributes, fi
8
8
  layerParams?: Record<string, string>;
9
9
  eqlParameters?: QueryLayerServiceConfigurationDc["eqlParameters"];
10
10
  }) => {
11
- getDataSourcePromises: ({ ds, query, parameters, layerName, limit, condition, url, resourceId }: ConfigDataSource, newFilters?: SelectedFilters, offset?: number) => Promise<EqlDataSource | PagedFeaturesListDc>;
11
+ getDataSourcePromises: ({ ds, query, parameters, layerName, limit, condition, url, resourceId }: ConfigDataSource, newFilters?: SelectedFilters, offset?: number) => Promise<EqlDataSource | import('@evergis/api').PagedFeaturesListDc>;
12
12
  getUpdatingDataSources: () => ConfigDataSource[];
13
13
  getUpdatedDataSources: (responses: DataSourcePromise[], currentDataSources: ConfigDataSource[], otherDataSources: FetchedDataSource[]) => any;
14
14
  zoomToLayersExtent: (layers: Array<{
@@ -0,0 +1,6 @@
1
+ import { ConfigContainerChild, WidgetType } from '../types';
2
+ export declare const useEditAttribute: (type: WidgetType, elementConfig: ConfigContainerChild) => {
3
+ editAttribute: import('../types').EditAttribute;
4
+ attributeValue: Date | import('../../..').FeaturedDcExtendedGeometry | import('../../..').JSONAttributeValue[] | import('../types').EditAttributeValue;
5
+ dataSource: import('../types').WidgetDataSource;
6
+ };
@@ -15,8 +15,8 @@ export declare const useWidgetContext: (type?: WidgetType) => {
15
15
  feature: import('../../..').SelectedFeature;
16
16
  closeFeatureCard: VoidFunction;
17
17
  containerIds: string[];
18
- controls: Record<string, string>;
19
- changeControls: (controls: Record<string, string>) => void;
18
+ controls: Record<string, import('../types').EditAttributeValue>;
19
+ changeControls: (controls: Record<string, import('../types').EditAttributeValue>) => void;
20
20
  components: {
21
21
  LayerItem?: import('react').FC<import('../..').LayerItemProps>;
22
22
  ProjectPanelMenu?: import('react').FC;
@@ -42,6 +42,12 @@ export interface BaseMapSettings {
42
42
  opacity?: number;
43
43
  showBuildings?: boolean;
44
44
  }
45
+ export type EditAttributeValue = string | number | boolean;
46
+ export interface EditAttribute {
47
+ name: string;
48
+ defaultValue?: EditAttributeValue;
49
+ relatedDataSource?: string;
50
+ }
45
51
  export interface ConfigOptions {
46
52
  innerTemplateName?: ContainerTemplate;
47
53
  innerTemplateStyle?: CSSProperties;
@@ -101,6 +107,7 @@ export interface ConfigOptions {
101
107
  drawMinMax?: boolean;
102
108
  attributes?: string[];
103
109
  attributesExclude?: string[];
110
+ editAttributes?: EditAttribute[];
104
111
  colors?: string[];
105
112
  defaultColor?: string;
106
113
  primaryColor?: string;
@@ -282,6 +289,7 @@ export declare enum ContainerTemplate {
282
289
  Edit = "Edit",
283
290
  EditString = "EditString",
284
291
  EditBoolean = "EditBoolean",
292
+ EditDropdown = "EditDropdown",
285
293
  Divider = "Divider"
286
294
  }
287
295
  export declare enum HeaderTemplate {
@@ -1,6 +1,6 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  import { LayerReferenceConfigurationDc } from '@evergis/api';
3
- import { ClientFeatureAttribute, ConfigContainer, SelectedFilters, WidgetDataSource } from '../../components';
3
+ import { ClientFeatureAttribute, ConfigContainer, EditAttributeValue, SelectedFilters, WidgetDataSource } from '../../components';
4
4
  import { LayerInfo, SelectedFeature } from '../../types';
5
5
  export type FeatureCardContextSettings = PropsWithChildren<{
6
6
  config?: ConfigContainer;
@@ -20,8 +20,8 @@ export type FeatureCardContextSettings = PropsWithChildren<{
20
20
  loading?: boolean;
21
21
  filters?: SelectedFilters;
22
22
  changeFilters?: (filters: SelectedFilters) => void;
23
- controls?: Record<string, string>;
24
- changeControls?: (controls: Record<string, string>) => void;
23
+ controls?: Record<string, EditAttributeValue>;
24
+ changeControls?: (controls: Record<string, EditAttributeValue>) => void;
25
25
  expandContainer?: (id: string, expanded?: boolean) => void;
26
26
  setSelectedTabId?: (id: string) => void;
27
27
  setHandBookReference?: (reference: LayerReferenceConfigurationDc) => void;
@@ -0,0 +1,3 @@
1
+ import { Feature } from 'geojson';
2
+ import { FeatureDc } from '@evergis/api';
3
+ export declare const convertSpToTurfFeature: (geometry?: FeatureDc["geometry"]) => Feature<any> | undefined;
@@ -0,0 +1 @@
1
+ export * from './convertSpToTurfFeature';
@@ -1,2 +1,3 @@
1
1
  export * from './classification';
2
+ export * from './feature';
2
3
  export * from './icons';