@evergis/react 3.1.126-alpha.1 → 3.1.127

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.
Files changed (34) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +7 -7
  3. package/dist/components/Dashboard/components/AddFeatureButton/index.d.ts +2 -2
  4. package/dist/components/Dashboard/constants.d.ts +2 -0
  5. package/dist/components/Dashboard/containers/EditContainer/components/EditCheckboxContainer.d.ts +3 -0
  6. package/dist/components/Dashboard/containers/EditContainer/components/EditChipsContainer.d.ts +3 -0
  7. package/dist/components/Dashboard/containers/EditContainer/components/EditDateContainer.d.ts +3 -0
  8. package/dist/components/Dashboard/containers/EditContainer/components/EditNumberContainer.d.ts +3 -0
  9. package/dist/components/Dashboard/containers/EditContainer/styled.d.ts +10 -0
  10. package/dist/components/Dashboard/containers/registry.d.ts +4 -0
  11. package/dist/components/Dashboard/elements/ElementDialog/index.d.ts +3 -0
  12. package/dist/components/Dashboard/elements/ElementDialog/styled.d.ts +1 -0
  13. package/dist/components/Dashboard/elements/registry.d.ts +1 -0
  14. package/dist/components/Dashboard/hooks/index.d.ts +1 -0
  15. package/dist/components/Dashboard/hooks/useAutoCompleteControl.d.ts +8 -0
  16. package/dist/components/Dashboard/hooks/useDataSources.d.ts +2 -2
  17. package/dist/components/Dashboard/hooks/useEditControl.d.ts +4 -2
  18. package/dist/components/Dashboard/types.d.ts +26 -6
  19. package/dist/components/Dashboard/utils/getElementValue.d.ts +1 -1
  20. package/dist/components/Layer/types.d.ts +2 -2
  21. package/dist/components/Layer/utils/getClientStyleItemPrefixSuffix.d.ts +2 -2
  22. package/dist/core/feature/convertSpToTurfFeature.d.ts +3 -0
  23. package/dist/core/feature/index.d.ts +1 -0
  24. package/dist/core/index.d.ts +1 -0
  25. package/dist/hooks/map/useLayerParams.d.ts +2 -1
  26. package/dist/index.js +2654 -2493
  27. package/dist/index.js.map +1 -1
  28. package/dist/react.esm.js +2656 -2497
  29. package/dist/react.esm.js.map +1 -1
  30. package/dist/types/layer.d.ts +2 -2
  31. package/dist/utils/date.d.ts +1 -1
  32. package/dist/utils/index.d.ts +0 -1
  33. package/package.json +4 -4
  34. package/dist/utils/metersPerPixel.d.ts +0 -1
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,10 +1,10 @@
1
1
  import { FC } from 'react';
2
2
  import { IconTypesKeys } from '@evergis/uilib-gl';
3
- import { OgcGeometryType } from '@evergis/api';
3
+ import { GeometryType } from '@evergis/api';
4
4
  import { EditGeometryType } from '../../../../types';
5
5
  export declare const AddFeatureButton: FC<{
6
6
  title?: string;
7
7
  icon?: IconTypesKeys;
8
8
  layerName?: string;
9
- geometryType?: OgcGeometryType | EditGeometryType;
9
+ geometryType?: GeometryType | EditGeometryType;
10
10
  }>;
@@ -1,3 +1,4 @@
1
+ import { CSSProperties } from 'react';
1
2
  import { AttributeType } from '@evergis/api';
2
3
  import { ConfigContainer, ConfigContainerChild } from './types';
3
4
  export declare const CONFIG_PAGES_ID = "pages";
@@ -26,3 +27,4 @@ export declare const GEOMETRY_ATTRIBUTE = "geometry";
26
27
  export declare const DEFAULT_ID_ATTRIBUTE_NAME = "gid";
27
28
  export declare const DEFAULT_DROPDOWN_WIDTH = 312;
28
29
  export declare const DEFAULT_FILTER_PADDING = 12;
30
+ export declare const BASE_CONTAINER_STYLE: CSSProperties;
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { ContainerProps } from '../../../types';
3
+ export declare const EditCheckboxContainer: FC<ContainerProps>;
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { ContainerProps } from '../../../types';
3
+ export declare const EditChipsContainer: FC<ContainerProps>;
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { ContainerProps } from '../../../types';
3
+ export declare const EditDateContainer: FC<ContainerProps>;
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { ContainerProps } from '../../../types';
3
+ export declare const EditNumberContainer: FC<ContainerProps>;
@@ -0,0 +1,10 @@
1
+ export declare const CheckboxWrapper: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & {
2
+ fontColor?: string;
3
+ big?: boolean;
4
+ column?: boolean;
5
+ }, never>;
6
+ export declare const ChipsWrapper: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & {
7
+ fontColor?: string;
8
+ big?: boolean;
9
+ column?: boolean;
10
+ }, never>;
@@ -32,7 +32,11 @@ 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 EditNumber: import('react').FC<import('../types').ContainerProps>;
35
36
  readonly EditDropdown: import('react').FC<import('../types').ContainerProps>;
37
+ readonly EditChips: import('react').FC<import('../types').ContainerProps>;
38
+ readonly EditCheckbox: import('react').FC<import('../types').ContainerProps>;
39
+ readonly EditDate: import('react').FC<import('../types').ContainerProps>;
36
40
  readonly EditGroup: import('react').FC<import('../types').ContainerProps>;
37
41
  readonly default: import('react').FC<import('../types').ContainerProps>;
38
42
  };
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { ContainerProps } from '../../types';
3
+ export declare const ElementDialog: FC<ContainerProps>;
@@ -0,0 +1 @@
1
+ export declare const DialogIcon: import('styled-components').StyledComponent<"span", any, import('@evergis/uilib-gl').IIconProps, never>;
@@ -15,4 +15,5 @@ export declare const elementComponents: {
15
15
  }>;
16
16
  readonly markdown: import('react').FC<import('..').ContainerProps>;
17
17
  readonly uploader: import('react').FC<import('..').ContainerProps>;
18
+ readonly dialog: import('react').FC<import('..').ContainerProps>;
18
19
  };
@@ -1,3 +1,4 @@
1
+ export * from './useAutoCompleteControl';
1
2
  export * from './useChartChange';
2
3
  export * from './useChartData';
3
4
  export * from './useDashboardHeader';
@@ -0,0 +1,8 @@
1
+ import { IOption } from '@evergis/uilib-gl';
2
+ export declare const useAutoCompleteControl: (items?: (string | number | boolean | null | undefined)[]) => {
3
+ value: string;
4
+ setValue: import('react').Dispatch<import('react').SetStateAction<string>>;
5
+ onChange: (newValue: string) => void;
6
+ options: IOption<string>[];
7
+ setOptions: import('react').Dispatch<import('react').SetStateAction<IOption<string>[]>>;
8
+ };
@@ -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<{
@@ -1,6 +1,8 @@
1
- import { ConfigContainerChild, WidgetType } from '../types';
1
+ import { ConfigContainerChild, EditAttributeValue, WidgetType } from '../types';
2
2
  export declare const useEditControl: (type: WidgetType, elementConfig: ConfigContainerChild) => {
3
3
  control: import('../types').ConfigControl;
4
- value: Date | import('../../..').FeaturedDcExtendedGeometry | import('../../..').JSONAttributeValue[] | import('../types').EditAttributeValue;
4
+ value: Date | import('../../..').FeaturedDcExtendedGeometry | import('../../..').JSONAttributeValue[] | EditAttributeValue;
5
5
  dataSource: import('../types').WidgetDataSource;
6
+ items: any[];
7
+ onChange: (newValue: EditAttributeValue) => void;
6
8
  };
@@ -1,6 +1,6 @@
1
1
  import { CSSProperties, FC, ReactNode } from 'react';
2
2
  import { i18n } from 'i18next';
3
- import { AttributeDefinitionDc, AttributeFormatDefinitionDc, AttributeType, EqlRequestDc, FeatureDc, OgcGeometryType, PagedFeaturesListDc, PositionDc, RemoteTaskStatus, StringSubType } from '@evergis/api';
3
+ import { AttributeDefinitionDc, AttributeFormatDefinitionDc, AttributeType, EqlRequestDc, FeatureDc, GeometryType, PagedFeaturesListDc, PositionDc, RemoteTaskStatus, StringSubType } from '@evergis/api';
4
4
  import { PieChartData, BarChartMarker } from '@evergis/charts';
5
5
  import { IconTypesKeys, IOption } from '@evergis/uilib-gl';
6
6
  import { FeatureAttributeValue, EditGeometryType, LayerInfo, ThemeName } from '../../types';
@@ -33,11 +33,10 @@ export interface ConfigRelatedResource {
33
33
  fileName?: string;
34
34
  methodName?: string;
35
35
  }
36
- export interface ConfigControl {
37
- type: "dropdown" | "checkbox" | "chips" | "autocomplete";
38
- relatedDataSource?: string;
36
+ export interface ConfigControl extends Pick<ConfigOptions, "relatedDataSource" | "minValue" | "maxValue" | "step" | "label" | "placeholder" | "width"> {
37
+ type: "dropdown" | "checkbox" | "chips" | "string";
39
38
  attributeName?: string;
40
- targetAttributeName: string;
39
+ targetAttributeName?: string;
41
40
  defaultValue?: EditAttributeValue;
42
41
  }
43
42
  export interface BaseMapSettings {
@@ -57,7 +56,7 @@ export interface ConfigOptions {
57
56
  chartType?: "bar" | "line" | "pie" | "stack";
58
57
  layerNames?: string[];
59
58
  layerName?: string;
60
- geometryType?: OgcGeometryType | EditGeometryType;
59
+ geometryType?: GeometryType | EditGeometryType;
61
60
  fileExtensions?: string;
62
61
  parentResourceId?: string;
63
62
  srid?: string;
@@ -150,6 +149,7 @@ export interface ConfigOptions {
150
149
  baseMapName?: string;
151
150
  baseMapSettings?: Record<string, BaseMapSettings>;
152
151
  expandedLayers?: boolean;
152
+ dialogId?: string;
153
153
  }
154
154
  export interface ConfigDataSource {
155
155
  name: string;
@@ -226,6 +226,21 @@ export interface ConfigTask {
226
226
  updateDate?: string;
227
227
  id?: string;
228
228
  }
229
+ export interface ConfigDialogOptions {
230
+ title?: string;
231
+ maxWidth?: string;
232
+ minWidth?: string;
233
+ minHeight?: string;
234
+ }
235
+ export interface ConfigDialogContentRef {
236
+ containerId: string;
237
+ }
238
+ export type ConfigDialogContentItem = ConfigContainerChild | ConfigDialogContentRef;
239
+ export interface ConfigDialog {
240
+ id: string;
241
+ options?: ConfigDialogOptions;
242
+ content: ConfigDialogContentItem[];
243
+ }
229
244
  export interface ConfigContainerHeader {
230
245
  id?: string;
231
246
  templateName?: HeaderTemplate;
@@ -239,6 +254,7 @@ export interface ConfigContainer {
239
254
  dataSources?: ConfigDataSource[];
240
255
  filters?: ConfigFilter[];
241
256
  tasks?: ConfigTask[];
257
+ dialogs?: ConfigDialog[];
242
258
  options?: ConfigOptions;
243
259
  header?: ConfigContainerHeader;
244
260
  }
@@ -285,8 +301,12 @@ export declare enum ContainerTemplate {
285
301
  EditGroup = "EditGroup",
286
302
  Edit = "Edit",
287
303
  EditString = "EditString",
304
+ EditNumber = "EditNumber",
288
305
  EditBoolean = "EditBoolean",
289
306
  EditDropdown = "EditDropdown",
307
+ EditChips = "EditChips",
308
+ EditCheckbox = "EditCheckbox",
309
+ EditDate = "EditDate",
290
310
  Divider = "Divider"
291
311
  }
292
312
  export declare enum HeaderTemplate {
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ClientFeatureAttribute, ConfigContainerChild, ContainerProps, RenderElementValue } from '../types';
3
3
  import { LayerInfo } from '../../../types';
4
- export declare const getElementValue: ({ getDefaultContainer, ...props }: Pick<ContainerProps, "type" | "elementConfig" | "renderElement"> & {
4
+ export declare const getElementValue: ({ getDefaultContainer, ...props }: Pick<ContainerProps, "type" | "config" | "elementConfig" | "renderElement"> & {
5
5
  layerInfo: LayerInfo;
6
6
  attributes: ClientFeatureAttribute[];
7
7
  element: ConfigContainerChild;
@@ -1,9 +1,9 @@
1
1
  import { EffectCallback } from 'react';
2
- import { QueryLayerServiceInfoDc } from '@evergis/api';
2
+ import { FeatureLayerServiceInfoDc, QueryLayerServiceInfoDc } from '@evergis/api';
3
3
  import { ClientStyle, ClientStyleItem } from '../../types';
4
4
  export interface LayerProps {
5
5
  tileUrl: string;
6
- layer?: QueryLayerServiceInfoDc;
6
+ layer?: FeatureLayerServiceInfoDc | QueryLayerServiceInfoDc;
7
7
  layerType?: string;
8
8
  visible?: boolean;
9
9
  beforeId?: string;
@@ -1,3 +1,3 @@
1
- import { OgcGeometryType } from '@evergis/api';
1
+ import { GeometryType } from '@evergis/api';
2
2
  import { ClientStyleItem } from '../../../types';
3
- export declare const getClientStyleItemPrefixSuffix: (geometryType: OgcGeometryType, itemType: ClientStyleItem["type"]) => [string, string];
3
+ export declare const getClientStyleItemPrefixSuffix: (geometryType: GeometryType, itemType: ClientStyleItem["type"]) => [string, string];
@@ -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';
@@ -1,2 +1,3 @@
1
+ import { FeatureLayerServiceInfoDc } from '@evergis/api';
1
2
  import { LayerInfo } from '../../types';
2
- export declare const useLayerParams: (layer?: LayerInfo) => {};
3
+ export declare const useLayerParams: (layer?: LayerInfo | FeatureLayerServiceInfoDc) => {};