@evergis/react 4.0.130 → 4.0.132
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/dist/components/Dashboard/components/Chart/styled.d.ts +7 -0
- package/dist/components/Dashboard/constants.d.ts +27 -0
- package/dist/components/Dashboard/hooks/index.d.ts +1 -0
- package/dist/components/Dashboard/hooks/useDataSourceLoading.d.ts +2 -0
- package/dist/components/Dashboard/hooks/useGlobalContext.d.ts +2 -0
- package/dist/components/Dashboard/types.d.ts +13 -0
- package/dist/components/Dashboard/utils/applyQueryFilters.d.ts +3 -1
- package/dist/components/Dashboard/utils/formatDataSourceCondition.d.ts +5 -1
- package/dist/components/Dashboard/utils/getMapViewDataSources.d.ts +7 -0
- package/dist/components/Dashboard/utils/index.d.ts +2 -0
- package/dist/components/Dashboard/utils/toConditionsArray.d.ts +2 -0
- package/dist/contexts/GlobalContext/types.d.ts +4 -0
- package/dist/index.js +376 -241
- package/dist/index.js.map +1 -1
- package/dist/react.esm.js +369 -243
- package/dist/react.esm.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/Dashboard/containers/StructuredDataContainer/useStructuredData.d.ts +0 -28
- package/dist/components/Dashboard/containers/StructuredDataContainer/useStructuredDataDraft.d.ts +0 -25
- package/dist/components/Dashboard/containers/StructuredDataContainer/useStructuredDataSave.d.ts +0 -17
- package/dist/components/Dashboard/containers/StructuredDataContainer/useStructuredDataSchema.d.ts +0 -11
- package/dist/components/Dashboard/containers/StructuredDataContainer/utils/viewScroll.d.ts +0 -17
- package/dist/components/Dashboard/elements/ElementTable/hooks/useSurfaceColor.d.ts +0 -16
- package/dist/components/Dashboard/elements/ElementTable/useCellEditing.d.ts +0 -15
- package/dist/components/Dashboard/elements/ElementTable/useTableView.d.ts +0 -16
- package/dist/components/Dashboard/elements/ElementTable/utils/surfaceColor.d.ts +0 -13
|
@@ -19,6 +19,13 @@ export declare const ChartFillMeasure: import('styled-components').StyledCompone
|
|
|
19
19
|
export declare const Tooltip: import('styled-components').StyledComponent<"div", any, {
|
|
20
20
|
transform?: CSSProperties["transform"];
|
|
21
21
|
}, never>;
|
|
22
|
+
/**
|
|
23
|
+
* Тултипы графиков рендерятся в `body` со своим z-index (100 у Bar и Line) — ниже модального окна
|
|
24
|
+
* `Dialog` из `@evergis/uilib-gl` (110), поэтому в модалке дашборда они уходили под окно. Класс
|
|
25
|
+
* дублируем, чтобы правило перебило стили `@evergis/charts` по специфичности, а не по порядку
|
|
26
|
+
* подключения.
|
|
27
|
+
*/
|
|
28
|
+
export declare const ChartTooltipStyles: import('styled-components').GlobalStyleComponent<{}, import('styled-components').DefaultTheme>;
|
|
22
29
|
export declare const LineChartStyles: import('styled-components').GlobalStyleComponent<{
|
|
23
30
|
[x: string]: any;
|
|
24
31
|
[x: number]: any;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
1
2
|
import { CSSObject } from 'styled-components';
|
|
2
3
|
import { AttributeIconType, AttributeType, QueryLayerServiceInfoDc } from '@evergis/api';
|
|
3
4
|
import { ConfigContainer, ConfigContainerChild, ConfigElementType } from './types';
|
|
@@ -22,6 +23,18 @@ export declare const DEFAULT_CHART_ANGLE = 4;
|
|
|
22
23
|
export declare const DEFAULT_CHART_HEIGHT = 90;
|
|
23
24
|
export declare const STACK_BAR_TOTAL_HEIGHT = 20;
|
|
24
25
|
export declare const FILTER_PREFIX = "%";
|
|
26
|
+
/** Имя системного геометрического фильтра — выделение, нарисованное пользователем на карте. */
|
|
27
|
+
export declare const GEOMETRY_FILTER_NAME = "geometry";
|
|
28
|
+
/** Имя системного фильтра «экстент видимой области карты» (EWKT, `SRID=3857`). */
|
|
29
|
+
export declare const EXTENT_FILTER_NAME = "extent";
|
|
30
|
+
/** Имя системного фильтра «уровень зума карты» (целое число). */
|
|
31
|
+
export declare const ZOOM_FILTER_NAME = "zoom";
|
|
32
|
+
/**
|
|
33
|
+
* Системные фильтры текущего вида карты. Их значения приходят не из `SelectedFilters`, а из
|
|
34
|
+
* `GlobalContext`, поэтому имена зарезервированы: одноимённый пользовательский фильтр будет
|
|
35
|
+
* перехвачен системной подстановкой — ровно как в случае `geometry`.
|
|
36
|
+
*/
|
|
37
|
+
export declare const MAP_VIEW_FILTER_NAMES: string[];
|
|
25
38
|
export declare const PROVIDER_PREFIX = "$";
|
|
26
39
|
export declare enum ProviderPrefix {
|
|
27
40
|
Card = "card",
|
|
@@ -46,6 +59,20 @@ export declare const DEFAULT_ID_ATTRIBUTE_NAME = "gid";
|
|
|
46
59
|
export declare const ATTRIBUTE_ICON_ELEMENT_TYPES: Partial<Record<AttributeIconType, ConfigElementType>>;
|
|
47
60
|
/** Заглушка для потребителей, ожидающих non-null layerInfo у источника без описания атрибутов. */
|
|
48
61
|
export declare const EMPTY_DATA_SOURCE_LAYER_INFO: QueryLayerServiceInfoDc;
|
|
62
|
+
/**
|
|
63
|
+
* z-index плавающих слоёв дашборда: тултипы графиков и выпадающие списки фильтров.
|
|
64
|
+
*
|
|
65
|
+
* Тултипы графиков (`@evergis/charts`) и поповеры дропдаунов рендерятся порталом в `body`, где
|
|
66
|
+
* их собственные z-index (100 у Bar/Line, 103 у Pie) ниже модального окна `Dialog` из
|
|
67
|
+
* `@evergis/uilib-gl` (110) — внутри модалки дашборда они уходили под окно.
|
|
68
|
+
*/
|
|
69
|
+
export declare const DASHBOARD_OVERLAY_Z_INDEX = 1000;
|
|
70
|
+
/**
|
|
71
|
+
* Стиль контейнера тултипа `PieChart`: там z-index проставляется инлайном (103), поэтому поднять
|
|
72
|
+
* его CSS-классом нельзя — только через `tooltipStyle`. Ключ пишем в CSS-нотации: значение уходит
|
|
73
|
+
* в `d3.selection.style()` → `setProperty`, а camelCase он не понимает.
|
|
74
|
+
*/
|
|
75
|
+
export declare const PIE_CHART_TOOLTIP_STYLE: CSSProperties;
|
|
49
76
|
export declare const DEFAULT_DROPDOWN_WIDTH = 312;
|
|
50
77
|
export declare const DEFAULT_FILTER_PADDING = 12;
|
|
51
78
|
/** Базовый отступ обёртки контейнера. Снимается, когда контейнер занимает ячейку целиком. */
|
|
@@ -9,6 +9,7 @@ export * from './useFetchWithAuth';
|
|
|
9
9
|
export * from './useChartChange';
|
|
10
10
|
export * from './useChartData';
|
|
11
11
|
export * from './useDashboardHeader';
|
|
12
|
+
export * from './useDataSourceLoading';
|
|
12
13
|
export * from './useDataSources';
|
|
13
14
|
export * from './useDiffPage';
|
|
14
15
|
export * from './useEqualTileWidth';
|
|
@@ -5,6 +5,8 @@ export declare const useGlobalContext: () => {
|
|
|
5
5
|
themeName: import('../../..').ThemeName;
|
|
6
6
|
api: import('@evergis/api').Api;
|
|
7
7
|
ewktGeometry: string;
|
|
8
|
+
ewktExtent: string;
|
|
9
|
+
zoomLevel: number;
|
|
8
10
|
notification: {
|
|
9
11
|
add: (item: import('@evergis/uilib-gl').INotificationItem) => void;
|
|
10
12
|
update: (patch: Partial<import('@evergis/uilib-gl').INotificationItem> & {
|
|
@@ -482,6 +482,14 @@ export interface ConfigDataSource {
|
|
|
482
482
|
url?: string;
|
|
483
483
|
type?: string;
|
|
484
484
|
autoSyncLayer?: boolean;
|
|
485
|
+
/**
|
|
486
|
+
* Задержка перед запросом источника, мс. `0` или отсутствие поля — запрос сразу.
|
|
487
|
+
*
|
|
488
|
+
* Дебаунсит ЛЮБОЙ перезапрос источника: смену фильтров, движение карты (`%extent` / `%zoom`),
|
|
489
|
+
* autoSync-уведомления, правку конфига и первичную загрузку. Нужна тяжёлым источникам, чтобы
|
|
490
|
+
* серия быстрых событий схлопывалась в один запрос.
|
|
491
|
+
*/
|
|
492
|
+
debounce?: number;
|
|
485
493
|
}
|
|
486
494
|
export interface EqlDataSource {
|
|
487
495
|
items: FeatureDc[];
|
|
@@ -500,6 +508,11 @@ export type ConfigFilterValueType = "single" | "range" | "array" | "tree" | "fea
|
|
|
500
508
|
export interface ConfigFilter {
|
|
501
509
|
name: string;
|
|
502
510
|
relatedDataSource?: string;
|
|
511
|
+
/**
|
|
512
|
+
* Значение по умолчанию — подставляется, пока пользователь не выбрал своё.
|
|
513
|
+
* Для `valueType: "range"` (включая фильтр дат) — пара `[from, to]`: начальный диапазон
|
|
514
|
+
* и точка сброса; границы шкалы (`minValue` / `maxValue` элемента) при этом не меняются.
|
|
515
|
+
*/
|
|
503
516
|
defaultValue?: SelectedFilter["value"];
|
|
504
517
|
attributeAlias?: string;
|
|
505
518
|
/**
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { ClientFeatureAttribute, ConfigFilter, SelectedFilters, WidgetDataSource } from '../types';
|
|
2
2
|
import { QueryLayerServiceInfoDc } from '@evergis/api';
|
|
3
|
-
export declare const applyQueryFilters: ({ parameters: configParameters, filters: configFilters, selectedFilters, geometry, attributes, layerInfo, dataSources, projectDataSources, }: {
|
|
3
|
+
export declare const applyQueryFilters: ({ parameters: configParameters, filters: configFilters, selectedFilters, geometry, extent, zoomLevel, attributes, layerInfo, dataSources, projectDataSources, }: {
|
|
4
4
|
parameters: Record<string, any>;
|
|
5
5
|
filters: ConfigFilter[];
|
|
6
6
|
selectedFilters?: SelectedFilters;
|
|
7
7
|
geometry?: string;
|
|
8
|
+
extent?: string;
|
|
9
|
+
zoomLevel?: number;
|
|
8
10
|
attributes?: ClientFeatureAttribute[];
|
|
9
11
|
layerInfo?: QueryLayerServiceInfoDc;
|
|
10
12
|
dataSources: WidgetDataSource[];
|
|
@@ -9,13 +9,15 @@ export declare const applyFiltersToCondition: ({ condition, name, defaultValue,
|
|
|
9
9
|
isSetParams?: boolean;
|
|
10
10
|
configFilter?: ConfigFilter;
|
|
11
11
|
}) => string | number;
|
|
12
|
-
export declare const applyVarsToCondition: <T extends string | string[]>({ section, configFilters, filters, attributes, layerParams, eqlParameters, geometry, isSetParams, }: Pick<QueryLayerServiceConfigurationDc, "eqlParameters"> & {
|
|
12
|
+
export declare const applyVarsToCondition: <T extends string | string[]>({ section, configFilters, filters, attributes, layerParams, eqlParameters, geometry, extent, zoomLevel, isSetParams, }: Pick<QueryLayerServiceConfigurationDc, "eqlParameters"> & {
|
|
13
13
|
section: T;
|
|
14
14
|
configFilters: ConfigFilter[];
|
|
15
15
|
filters: SelectedFilters;
|
|
16
16
|
attributes?: ClientFeatureAttribute[];
|
|
17
17
|
layerParams?: Record<string, string>;
|
|
18
18
|
geometry?: string;
|
|
19
|
+
extent?: string;
|
|
20
|
+
zoomLevel?: number;
|
|
19
21
|
isSetParams?: boolean;
|
|
20
22
|
}) => T;
|
|
21
23
|
type FormatDataSourceConditionParams = {
|
|
@@ -25,6 +27,8 @@ type FormatDataSourceConditionParams = {
|
|
|
25
27
|
eqlParameters?: QueryLayerServiceConfigurationDc["eqlParameters"];
|
|
26
28
|
layerParams?: Record<string, string>;
|
|
27
29
|
geometry?: string;
|
|
30
|
+
extent?: string;
|
|
31
|
+
zoomLevel?: number;
|
|
28
32
|
};
|
|
29
33
|
export declare const formatDataSourceCondition: ({ condition, ...rest }: FormatDataSourceConditionParams & {
|
|
30
34
|
condition?: string | string[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfigDataSource } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Источники, чей запрос зависит от текущего вида карты — в `parameters` или `condition` у них
|
|
4
|
+
* есть `%extent` / `%zoom`. Перезапрашивают при движении карты только их: иначе каждый пан
|
|
5
|
+
* дёргал бы все запросы страницы.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getMapViewDataSources: (dataSources?: ConfigDataSource[]) => ConfigDataSource[];
|
|
@@ -38,6 +38,7 @@ export * from './getFeatureCardHeader';
|
|
|
38
38
|
export * from './getFilterComponent';
|
|
39
39
|
export * from './getFilterSelectedItems';
|
|
40
40
|
export * from './getFilterValue';
|
|
41
|
+
export * from './getMapViewDataSources';
|
|
41
42
|
export * from './getFormattedAttributes';
|
|
42
43
|
export * from './getImageUrl';
|
|
43
44
|
export * from './getLayerInfo';
|
|
@@ -69,6 +70,7 @@ export * from './pieChartTooltipFromRelatedFeatures';
|
|
|
69
70
|
export * from './removeDataSource';
|
|
70
71
|
export * from './updateDataSource';
|
|
71
72
|
export * from './sliceShownOtherItems';
|
|
73
|
+
export * from './toConditionsArray';
|
|
72
74
|
export * from './toCssSize';
|
|
73
75
|
export * from './toRenderableValue';
|
|
74
76
|
export * from './tooltipNameFromAttributes';
|
|
@@ -7,6 +7,10 @@ export type GlobalContextProps = PropsWithChildren<{
|
|
|
7
7
|
t?: i18n["t"];
|
|
8
8
|
language?: string;
|
|
9
9
|
ewktGeometry?: string;
|
|
10
|
+
/** Экстент видимой области карты в EWKT (`SRID=3857;POLYGON((...))`) — плейсхолдер `%extent`. */
|
|
11
|
+
ewktExtent?: string;
|
|
12
|
+
/** Целый уровень зума карты — плейсхолдер `%zoom`. */
|
|
13
|
+
zoomLevel?: number;
|
|
10
14
|
themeName?: ThemeName;
|
|
11
15
|
api?: Api;
|
|
12
16
|
notification?: {
|