@evergis/react 4.0.166 → 4.0.168
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/actions/components/TaskExecutionHost/index.d.ts +2 -0
- package/dist/components/Dashboard/actions/conditions/constants.d.ts +4 -0
- package/dist/components/Dashboard/actions/conditions/evaluateActionCondition.d.ts +6 -0
- package/dist/components/Dashboard/actions/conditions/operators.d.ts +4 -0
- package/dist/components/Dashboard/actions/conditions/parseActionCondition.d.ts +6 -0
- package/dist/components/Dashboard/actions/conditions/tokenizeActionCondition.d.ts +2 -0
- package/dist/components/Dashboard/actions/conditions/types.d.ts +43 -0
- package/dist/components/Dashboard/actions/constants.d.ts +4 -0
- package/dist/components/Dashboard/actions/context/ActionContextProvider.d.ts +8 -0
- package/dist/components/Dashboard/actions/context/ActionNodeProvider.d.ts +3 -0
- package/dist/components/Dashboard/actions/context/ActionScopeProvider.d.ts +5 -0
- package/dist/components/Dashboard/actions/context/WidgetActionsProvider/hooks/useActionExecutors.d.ts +3 -0
- package/dist/components/Dashboard/actions/context/WidgetActionsProvider/hooks/useActionFilters.d.ts +6 -0
- package/dist/components/Dashboard/actions/context/WidgetActionsProvider/index.d.ts +2 -0
- package/dist/components/Dashboard/actions/context/WidgetActionsProvider/types.d.ts +14 -0
- package/dist/components/Dashboard/actions/context/bindingTypes.d.ts +46 -0
- package/dist/components/Dashboard/actions/executors/ActionNavigationError.d.ts +4 -0
- package/dist/components/Dashboard/actions/executors/createActionNavigation.d.ts +5 -0
- package/dist/components/Dashboard/actions/executors/needsNavigationWindow.d.ts +2 -0
- package/dist/components/Dashboard/actions/hooks/useActionBindings.d.ts +2 -0
- package/dist/components/Dashboard/actions/hooks/useChartActions.d.ts +10 -0
- package/dist/components/Dashboard/actions/index.d.ts +20 -0
- package/dist/components/Dashboard/actions/modals/WidgetModalHost/ModalWindow.d.ts +2 -0
- package/dist/components/Dashboard/actions/modals/WidgetModalHost/index.d.ts +2 -0
- package/dist/components/Dashboard/actions/modals/WidgetModalHost/types.d.ts +6 -0
- package/dist/components/Dashboard/actions/modals/WidgetModalsProvider/index.d.ts +2 -0
- package/dist/components/Dashboard/actions/modals/hooks/useAvailableModals.d.ts +2 -0
- package/dist/components/Dashboard/actions/modals/hooks/useModalAutoSync.d.ts +2 -0
- package/dist/components/Dashboard/actions/modals/hooks/useModalSources.d.ts +8 -0
- package/dist/components/Dashboard/actions/modals/hooks/useWidgetModals.d.ts +2 -0
- package/dist/components/Dashboard/actions/modals/types.d.ts +26 -0
- package/dist/components/Dashboard/actions/modals/utils/createModalStore.d.ts +16 -0
- package/dist/components/Dashboard/actions/modals/utils/modalRequestKey.d.ts +4 -0
- package/dist/components/Dashboard/actions/parameters/resolveActionParameters.d.ts +3 -0
- package/dist/components/Dashboard/actions/registry/mergeActionParameters.d.ts +1 -0
- package/dist/components/Dashboard/actions/registry/resolveActionInvocation.d.ts +2 -0
- package/dist/components/Dashboard/actions/runtime/awaitActionStep.d.ts +2 -0
- package/dist/components/Dashboard/actions/runtime/createActionRuntime.d.ts +3 -0
- package/dist/components/Dashboard/actions/runtime/executeActionSequence.d.ts +3 -0
- package/dist/components/Dashboard/actions/runtime/types.d.ts +36 -0
- package/dist/components/Dashboard/actions/types.d.ts +81 -0
- package/dist/components/Dashboard/actions/validation/actionShape.d.ts +2 -0
- package/dist/components/Dashboard/actions/validation/isActionSelectedFilter.d.ts +1 -0
- package/dist/components/Dashboard/actions/validation/types.d.ts +15 -0
- package/dist/components/Dashboard/actions/validation/validateActionTree.d.ts +5 -0
- package/dist/components/Dashboard/actions/validation/validateDashboardActions.d.ts +3 -0
- package/dist/components/Dashboard/componentTypes.d.ts +27 -9
- package/dist/components/Dashboard/components/Chart/components/BarChartView.d.ts +2 -0
- package/dist/components/Dashboard/components/Chart/components/LineChartView.d.ts +2 -0
- package/dist/components/Dashboard/components/Chart/components/PieChartView.d.ts +2 -0
- package/dist/components/Dashboard/components/Chart/components/StackChartView.d.ts +2 -0
- package/dist/components/Dashboard/components/Chart/constants.d.ts +2 -0
- package/dist/components/Dashboard/components/Chart/hooks/index.d.ts +2 -0
- package/dist/components/Dashboard/components/Chart/hooks/useChartLayout.d.ts +71 -0
- package/dist/components/Dashboard/components/Chart/hooks/useChartPresentation.d.ts +30 -0
- package/dist/components/Dashboard/components/Chart/types.d.ts +6 -1
- package/dist/components/Dashboard/components/ContainerButton/index.d.ts +4 -0
- package/dist/components/Dashboard/components/StackBar/index.d.ts +2 -1
- package/dist/components/Dashboard/components/SvgImage/index.d.ts +2 -2
- package/dist/components/Dashboard/constants.d.ts +2 -19
- package/dist/components/Dashboard/containers/DataSourceInnerContainer/styled.d.ts +0 -1
- package/dist/components/Dashboard/containers/StructuredDataContainer/types.d.ts +3 -1
- package/dist/components/Dashboard/containers/TaskContainer/components/LogDialog/types.d.ts +1 -0
- package/dist/components/Dashboard/containers/TaskContainer/components/TaskLogButton.d.ts +5 -0
- package/dist/components/Dashboard/containers/TaskContainer/hooks/useTaskButtonState.d.ts +1 -1
- package/dist/components/Dashboard/containers/VoteContainer/components/VoteScreen.d.ts +2 -2
- package/dist/components/Dashboard/containers/VoteContainer/types.d.ts +10 -3
- package/dist/components/Dashboard/containers/styled.d.ts +1 -1
- package/dist/components/Dashboard/elements/ElementIcon/components/AttachmentIcon/types.d.ts +2 -2
- package/dist/components/Dashboard/elements/ElementImage/useElementImage.d.ts +3 -2
- package/dist/components/Dashboard/elements/ElementModal/hooks/useModalOpen.d.ts +2 -7
- package/dist/components/Dashboard/elements/ElementSvg/index.d.ts +0 -1
- package/dist/components/Dashboard/elements/ElementTable/components/ActionTableRow.d.ts +6 -0
- package/dist/components/Dashboard/elements/registry.d.ts +1 -1
- package/dist/components/Dashboard/hooks/dataSourceTypes.d.ts +15 -0
- package/dist/components/Dashboard/hooks/useDataSourceRequests.d.ts +4 -0
- package/dist/components/Dashboard/hooks/useDataSources.d.ts +6 -13
- package/dist/components/Dashboard/hooks/useWidgetContext.d.ts +7 -1
- package/dist/components/Dashboard/index.d.ts +1 -0
- package/dist/components/Dashboard/types.d.ts +18 -6
- package/dist/components/Dashboard/utils/applyQueryFilters.d.ts +5 -4
- package/dist/components/Dashboard/utils/checkEqualOrIncludes.d.ts +1 -1
- package/dist/components/Dashboard/utils/configString/constants.d.ts +19 -0
- package/dist/components/Dashboard/utils/configString/resolveActionToken.d.ts +3 -0
- package/dist/components/Dashboard/utils/configString/types.d.ts +10 -1
- package/dist/components/Dashboard/utils/findDashboardNode.d.ts +3 -0
- package/dist/components/Dashboard/utils/formatDataSourceCondition.d.ts +2 -1
- package/dist/components/Dashboard/utils/getButtonSlot.d.ts +4 -0
- package/dist/components/Dashboard/utils/getDataFromAttributes.d.ts +2 -2
- package/dist/components/Dashboard/utils/getSelectedFilterValue.d.ts +1 -1
- package/dist/components/Dashboard/utils/getUpdatedDataSources.d.ts +2 -0
- package/dist/components/Dashboard/utils/index.d.ts +1 -0
- package/dist/contexts/ActionContext/index.d.ts +3 -0
- package/dist/contexts/ActionNodeContext/index.d.ts +2 -0
- package/dist/contexts/ActionScopeContext/index.d.ts +3 -0
- package/dist/contexts/ChartActionsContext/index.d.ts +2 -0
- package/dist/contexts/DashboardContext/types.d.ts +15 -6
- package/dist/contexts/FeatureCardContext/types.d.ts +14 -1
- package/dist/{components/Dashboard/grid → contexts}/GridEditContext/index.d.ts +1 -1
- package/dist/contexts/ModalDataContext/index.d.ts +2 -0
- package/dist/{components/Dashboard/containers/StructuredDataContainer/StructuredDataContext.d.ts → contexts/StructuredDataContext/index.d.ts} +1 -1
- package/dist/contexts/TaskExecutionContext/TaskExecutionProvider.d.ts +2 -0
- package/dist/contexts/TaskExecutionContext/context.d.ts +2 -0
- package/dist/contexts/TaskExecutionContext/hooks/useTaskExecution.d.ts +17 -0
- package/dist/contexts/TaskExecutionContext/index.d.ts +4 -0
- package/dist/contexts/TaskExecutionContext/types.d.ts +14 -0
- package/dist/contexts/TaskExecutionContext/utils/createTaskNotification.d.ts +4 -0
- package/dist/contexts/WidgetActionsContext/index.d.ts +4 -0
- package/dist/contexts/WidgetModalsContext/index.d.ts +3 -0
- package/dist/contexts/index.d.ts +12 -0
- package/dist/dashboardActions/index.js +577 -0
- package/dist/dashboardActions/index.js.map +1 -0
- package/dist/dashboardActions/package.json +1 -0
- package/dist/dashboardActions.d.ts +3 -0
- package/dist/hooks/task/index.d.ts +2 -0
- package/dist/hooks/task/runtime/PythonExecutionError.d.ts +9 -0
- package/dist/hooks/task/runtime/constants.d.ts +2 -0
- package/dist/hooks/task/runtime/resolvePythonTaskDefinition.d.ts +2 -0
- package/dist/hooks/task/runtime/startPythonExecution.d.ts +2 -0
- package/dist/hooks/task/runtime/types.d.ts +53 -0
- package/dist/hooks/task/types.d.ts +7 -1
- package/dist/hooks/task/usePythonTask.d.ts +12 -14
- package/dist/hooks/task/utils/pollSubtaskCompletion.d.ts +4 -1
- package/dist/hooks/task/utils/startRemoteTask.d.ts +2 -0
- package/dist/index.js +15164 -13214
- package/dist/index.js.map +1 -1
- package/dist/react.esm.js +14860 -12954
- package/dist/react.esm.js.map +1 -1
- package/dist/taskParameters/index.js +329 -0
- package/dist/taskParameters/index.js.map +1 -0
- package/dist/taskParameters/package.json +1 -0
- package/dist/taskParameters.d.ts +2 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/isObject.d.ts +1 -1
- package/dist/utils/taskParameters/SchemaResolver.d.ts +14 -0
- package/dist/utils/taskParameters/buildDefaultForSchema.d.ts +23 -0
- package/dist/utils/taskParameters/getPrimaryType.d.ts +2 -0
- package/dist/utils/taskParameters/index.d.ts +6 -0
- package/dist/utils/taskParameters/mergeHiddenFieldDefaults.d.ts +2 -0
- package/dist/utils/taskParameters/orderPropertyKeys.d.ts +2 -0
- package/dist/utils/taskParameters/types.d.ts +36 -0
- package/package.json +2 -2
- package/dist/components/Dashboard/containers/TaskContainer/useTaskNotifications.d.ts +0 -12
- /package/dist/{components/Dashboard/components/Chart/ChartPlotContext.d.ts → contexts/ChartPlotContext/index.d.ts} +0 -0
- /package/dist/{components/Dashboard/components/Chart/FillContext.d.ts → contexts/FillContext/index.d.ts} +0 -0
- /package/dist/{components/Dashboard/containers/TaskContainer → contexts/TaskExecutionContext}/utils/clampDescription.d.ts +0 -0
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export declare const useDataSources: (
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
filters: SelectedFilters;
|
|
8
|
-
layerParams?: Record<string, string>;
|
|
9
|
-
eqlParameters?: QueryLayerServiceConfigurationDc["eqlParameters"];
|
|
10
|
-
}) => {
|
|
11
|
-
getDataSourcePromises: ({ ds, query, parameters, layerName, limit, condition, url, resourceId, fileName, methodName, }: ConfigDataSource, newFilters?: SelectedFilters, offset?: number) => Promise<EqlDataSource | PagedFeaturesListDc>;
|
|
12
|
-
getUpdatingDataSources: () => ConfigDataSource[];
|
|
13
|
-
getUpdatedDataSources: (responses: DataSourcePromise[], currentDataSources: ConfigDataSource[], otherDataSources: FetchedDataSource[]) => any;
|
|
1
|
+
import { SelectedFilters } from '../types';
|
|
2
|
+
import { DataSourceRequestOptions } from './dataSourceTypes';
|
|
3
|
+
export declare const useDataSources: (options: DataSourceRequestOptions) => {
|
|
4
|
+
getDataSourcePromises: ({ ds, query, parameters, layerName, limit, condition, url, resourceId, fileName, methodName, }: import('../types').ConfigDataSource, newFilters?: SelectedFilters, offset?: number) => Promise<import('../types').EqlDataSource | import('@evergis/api').PagedFeaturesListDc>;
|
|
5
|
+
getUpdatingDataSources: () => import('../types').ConfigDataSource[];
|
|
6
|
+
getUpdatedDataSources: (responses: import('../types').DataSourcePromise[], currentDataSources: import('../types').ConfigDataSource[], otherDataSources: import('../types').FetchedDataSource[]) => any;
|
|
14
7
|
};
|
|
@@ -37,7 +37,13 @@ export declare const useWidgetContext: <T extends WidgetType = WidgetType.Dashbo
|
|
|
37
37
|
config: import('../types').ConfigContainer;
|
|
38
38
|
isEditing: boolean;
|
|
39
39
|
onContainerChange: (config: import('../types').ConfigContainerChild) => void;
|
|
40
|
-
|
|
40
|
+
isModalNotificationAllowed: (senderName: string | undefined, source: import('../types').ConfigDataSource, layerName: string) => boolean;
|
|
41
|
+
actionContextKey: string;
|
|
42
|
+
actionsActive: boolean;
|
|
43
|
+
onModalContextChange: (modalId: string, snapshot: import('..').WidgetModalSnapshot | null) => void;
|
|
44
|
+
onModalToggle: (modalId: string, isOpen: boolean, metadata?: {
|
|
45
|
+
managed: boolean;
|
|
46
|
+
}) => void;
|
|
41
47
|
isLoading: boolean;
|
|
42
48
|
pageIndex: number;
|
|
43
49
|
filters: import('../types').SelectedFilters;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ActionEventData, ConfigActionDefinition, ConfigActionInvocation } from './actions/types';
|
|
1
2
|
import { CSSProperties, FC, ReactNode } from 'react';
|
|
2
3
|
import { FeatureCollection, Geometry } from 'geojson';
|
|
3
4
|
import { i18n } from 'i18next';
|
|
@@ -301,7 +302,9 @@ export interface ConfigLayoutOptions {
|
|
|
301
302
|
* Игнорируется при `twoColumns` (легенда справа) и при отсутствии подписи оси X.
|
|
302
303
|
*/
|
|
303
304
|
legendInline?: boolean;
|
|
304
|
-
/**
|
|
305
|
+
/**
|
|
306
|
+
* Вписать график Chart в контейнер: по ширине всегда, по высоте — при заданной высоте (object-fit: contain).
|
|
307
|
+
*/
|
|
305
308
|
fill?: boolean;
|
|
306
309
|
/**
|
|
307
310
|
* Горизонтальное выравнивание: содержимого заголовка контейнера, а для плиток
|
|
@@ -760,6 +763,9 @@ export interface ConfigFilter {
|
|
|
760
763
|
resetFilters?: string[];
|
|
761
764
|
}
|
|
762
765
|
export interface FilterItem {
|
|
766
|
+
eventData?: ActionEventData;
|
|
767
|
+
syntheticOther?: boolean;
|
|
768
|
+
rawName?: string;
|
|
763
769
|
name: string;
|
|
764
770
|
value: string | number;
|
|
765
771
|
color: string;
|
|
@@ -788,7 +794,7 @@ export type TreeFilterValue = Record<string, Array<string | number>>;
|
|
|
788
794
|
*/
|
|
789
795
|
export type FeaturesFilterValue = FeatureCollection<null, Record<string, FeatureAttributeValue>>;
|
|
790
796
|
export interface SelectedFilter {
|
|
791
|
-
value: string | number | string[] | number[] | Date | Date[] | TreeFilterValue | FeaturesFilterValue;
|
|
797
|
+
value: string | number | boolean | string[] | number[] | Date | Date[] | TreeFilterValue | FeaturesFilterValue;
|
|
792
798
|
min?: string | number | Date;
|
|
793
799
|
max?: string | number | Date;
|
|
794
800
|
}
|
|
@@ -800,8 +806,8 @@ export interface ConfigLayer {
|
|
|
800
806
|
opacity?: number;
|
|
801
807
|
condition?: string | string[];
|
|
802
808
|
query?: string;
|
|
803
|
-
parameters?: Record<string,
|
|
804
|
-
geometries?:
|
|
809
|
+
parameters?: Record<string, unknown>;
|
|
810
|
+
geometries?: unknown[];
|
|
805
811
|
isVisible?: boolean;
|
|
806
812
|
selectable?: boolean;
|
|
807
813
|
filterZoomTo?: boolean;
|
|
@@ -824,7 +830,7 @@ export interface ConfigTask {
|
|
|
824
830
|
alias?: string;
|
|
825
831
|
description?: string;
|
|
826
832
|
icon?: string;
|
|
827
|
-
params?: Record<string,
|
|
833
|
+
params?: Record<string, unknown>;
|
|
828
834
|
subType?: string;
|
|
829
835
|
resourceId?: string;
|
|
830
836
|
owner?: string;
|
|
@@ -870,6 +876,7 @@ export interface ConfigModal {
|
|
|
870
876
|
id: string;
|
|
871
877
|
options?: ConfigModalOptions;
|
|
872
878
|
dataSources?: ConfigDataSource[];
|
|
879
|
+
actions?: ConfigActionDefinition[];
|
|
873
880
|
children: ConfigModalContentItem[];
|
|
874
881
|
}
|
|
875
882
|
export interface ConfigContainerHeader {
|
|
@@ -880,6 +887,7 @@ export interface ConfigContainerHeader {
|
|
|
880
887
|
options?: ConfigOptions;
|
|
881
888
|
}
|
|
882
889
|
export interface ConfigContainer {
|
|
890
|
+
actions?: ConfigActionDefinition[];
|
|
883
891
|
layers?: ConfigLayer[];
|
|
884
892
|
children: ConfigContainerChild[];
|
|
885
893
|
dataSources?: ConfigDataSource[];
|
|
@@ -904,7 +912,8 @@ export type FilterType = "checkbox" | "rangeNumber" | "rangeDate" | "text" | "dr
|
|
|
904
912
|
* `id`, см. parent-specific child-типы.
|
|
905
913
|
*/
|
|
906
914
|
export type ConfigElementType = "text" | "attributeAlias" | "attributeValue" | "attributeUnits" | "attributeDescription" | "layerName" | "control" | "image" | "slideshow" | "svg" | "icon" | "tooltip" | "tags" | "link" | "button" | "camera" | "chart" | "legend" | "markdown" | "uploader" | "modal" | "table";
|
|
907
|
-
export interface ConfigContainerChild extends Partial<ConfigContainer> {
|
|
915
|
+
export interface ConfigContainerChild extends Omit<Partial<ConfigContainer>, "actions"> {
|
|
916
|
+
actions?: (ConfigActionDefinition | ConfigActionInvocation)[];
|
|
908
917
|
id?: string;
|
|
909
918
|
/**
|
|
910
919
|
* Узел-лист. Кроме элементов сюда попадают фильтры — дети FiltersContainer тоже узлы конфига,
|
|
@@ -1021,6 +1030,9 @@ export interface ContainerProps {
|
|
|
1021
1030
|
}
|
|
1022
1031
|
export type PieChartDisplayedData = Array<Omit<PieChartData, "value"> & {
|
|
1023
1032
|
value: string | number;
|
|
1033
|
+
eventData?: ActionEventData;
|
|
1034
|
+
syntheticOther?: boolean;
|
|
1035
|
+
rawName?: string;
|
|
1024
1036
|
}>;
|
|
1025
1037
|
export type DataSourcePromise = PromiseSettledResult<EqlDataSource | PagedFeaturesListDc>;
|
|
1026
1038
|
export interface FetchedDataSource {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { QueryLayerServiceInfoDc } from '@evergis/api';
|
|
2
2
|
import { ClientFeatureAttribute, ConfigFilter, SelectedFilters, WidgetDataSource } from '../types';
|
|
3
|
-
import { ConfigFilterStore } from './configString/types';
|
|
4
|
-
export declare const applyQueryFilters: ({ parameters: configParameters, filters: configFilters, selectedFilters, dashboard, geometry, extent, zoomLevel, projectName, projectAlias, attributes, layerInfo, dataSources, }: {
|
|
5
|
-
|
|
3
|
+
import { ConfigFilterStore, ConfigStringSources } from './configString/types';
|
|
4
|
+
export declare const applyQueryFilters: ({ contextSources, parameters: configParameters, filters: configFilters, selectedFilters, dashboard, geometry, extent, zoomLevel, projectName, projectAlias, attributes, layerInfo, dataSources, }: {
|
|
5
|
+
contextSources?: ConfigStringSources;
|
|
6
|
+
parameters: Record<string, unknown>;
|
|
6
7
|
filters: ConfigFilter[];
|
|
7
8
|
selectedFilters?: SelectedFilters;
|
|
8
9
|
dashboard?: ConfigFilterStore;
|
|
@@ -14,4 +15,4 @@ export declare const applyQueryFilters: ({ parameters: configParameters, filters
|
|
|
14
15
|
attributes?: ClientFeatureAttribute[];
|
|
15
16
|
layerInfo?: QueryLayerServiceInfoDc;
|
|
16
17
|
dataSources: WidgetDataSource[];
|
|
17
|
-
}) => Record<string,
|
|
18
|
+
}) => Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const checkEqualOrIncludes: <T extends string | number | Date>(arrayOrSingle: T | T[], value: T) => boolean;
|
|
1
|
+
export declare const checkEqualOrIncludes: <T extends string | number | boolean | Date>(arrayOrSingle: T | T[], value: T) => boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const FILTER_PREFIX = "%";
|
|
2
|
+
export declare const PROVIDER_PREFIX = "$";
|
|
3
|
+
export declare enum ProviderPrefix {
|
|
4
|
+
/** `$card:<слой>:<поле>` — атрибут объекта карточки. */
|
|
5
|
+
Card = "card",
|
|
6
|
+
/**
|
|
7
|
+
* Ближайший дашборд, в ряд к `%` своего виджета: `$dashboard:<фильтр>[.свойство]` — его фильтр,
|
|
8
|
+
* `$dashboard:<датасорс>:<поле>` — поле первой строки его датасорса.
|
|
9
|
+
*/
|
|
10
|
+
Dashboard = "dashboard"
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Все подстановки строки конфига одной грамматикой, по группам:
|
|
14
|
+
* 1–2 `$dashboard:<датасорс>:<поле>`, 3–4 `$dashboard:<фильтр>[.свойство]`, 5–6 `$card:<слой>:<поле>`,
|
|
15
|
+
* 7–8 `%<фильтр>[.свойство]`, 9 `{<атрибут>}`. Форма датасорса проверяется раньше формы фильтра:
|
|
16
|
+
* их различает второе двоеточие. Имя фильтра — `\w+` целиком, поэтому `%name` не цепляет начало
|
|
17
|
+
* `%name2`, а точка в конце предложения («за %year.») не считается свойством.
|
|
18
|
+
*/
|
|
19
|
+
export declare const CONFIG_TOKEN_REGEXP: RegExp;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ConfigActionToken, ConfigStringSources, ResolvedConfigToken } from './types';
|
|
2
|
+
/** #field берётся из первой feature ответа задачи; $event/$params — из локального контекста цепочки. */
|
|
3
|
+
export declare const resolveActionToken: (token: ConfigActionToken, sources: ConfigStringSources) => ResolvedConfigToken;
|
|
@@ -8,6 +8,9 @@ export type ConfigFilterStore = {
|
|
|
8
8
|
};
|
|
9
9
|
/** Всё, откуда строка конфига может взять значение. Префикс токена выбирает стор. */
|
|
10
10
|
export type ConfigStringSources = {
|
|
11
|
+
taskResponse?: unknown;
|
|
12
|
+
event?: Record<string, unknown>;
|
|
13
|
+
parameters?: Record<string, unknown>;
|
|
11
14
|
/** `%name` — фильтры своего виджета (в карточке — фильтры карточки). */
|
|
12
15
|
widget?: ConfigFilterStore;
|
|
13
16
|
/**
|
|
@@ -54,7 +57,13 @@ export type ConfigAttributeToken = {
|
|
|
54
57
|
name: string;
|
|
55
58
|
raw: string;
|
|
56
59
|
};
|
|
57
|
-
export type
|
|
60
|
+
export type ConfigActionToken = {
|
|
61
|
+
kind: "action";
|
|
62
|
+
scope: "result" | "event" | "parameters";
|
|
63
|
+
path: string;
|
|
64
|
+
raw: string;
|
|
65
|
+
};
|
|
66
|
+
export type ConfigToken = ConfigActionToken | ConfigFilterToken | ConfigCardToken | ConfigDataSourceToken | ConfigAttributeToken;
|
|
58
67
|
/** Строка конфига, разобранная на литералы и токены. */
|
|
59
68
|
export type ConfigStringSegment = string | ConfigToken;
|
|
60
69
|
/**
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { QueryLayerServiceConfigurationDc } from '@evergis/api';
|
|
2
2
|
import { ClientFeatureAttribute, ConfigFilter, SelectedFilters, WidgetDataSource } from '../types';
|
|
3
|
-
import { ConfigFilterStore } from './configString/types';
|
|
3
|
+
import { ConfigFilterStore, ConfigStringSources } from './configString/types';
|
|
4
4
|
type FormatDataSourceConditionParams = {
|
|
5
|
+
contextSources?: ConfigStringSources;
|
|
5
6
|
configFilters?: ConfigFilter[];
|
|
6
7
|
filters: SelectedFilters;
|
|
7
8
|
/** Датасорсы виджета — для `%name.prop` через `relatedDataSource` фильтра. */
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ElementButtonConfig } from '../componentTypes';
|
|
2
|
+
import { ConfigContainerChild } from '../types';
|
|
3
|
+
/** Слот кнопки существует только при совпадении id и явном type: "button". */
|
|
4
|
+
export declare const getButtonSlot: (children: ConfigContainerChild[] | undefined, id: string) => ElementButtonConfig | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { i18n } from 'i18next';
|
|
2
2
|
import { PieChartData } from '@evergis/charts';
|
|
3
|
-
import { ClientFeatureAttribute, ConfigContainerChild } from '../types';
|
|
4
|
-
export declare const getDataFromAttributes: (t: i18n["t"], config: ConfigContainerChild, attributes?: ClientFeatureAttribute[]) => PieChartData[];
|
|
3
|
+
import { ClientFeatureAttribute, ConfigContainerChild, FilterItem } from '../types';
|
|
4
|
+
export declare const getDataFromAttributes: (t: i18n["t"], config: ConfigContainerChild, attributes?: ClientFeatureAttribute[]) => (PieChartData & Partial<FilterItem>)[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SelectedFilter, SelectedFilters } from '../types';
|
|
2
|
-
export declare const getSelectedFilterValue: (filterName: string, selectedFilters: SelectedFilters, defaultValue: SelectedFilter["value"]) => string | number | Date | import('../types').TreeFilterValue | import('../types').FeaturesFilterValue | (string | number | Date | import('../types').TreeFilterValue | import('../types').FeaturesFilterValue)[];
|
|
2
|
+
export declare const getSelectedFilterValue: (filterName: string, selectedFilters: SelectedFilters, defaultValue: SelectedFilter["value"]) => string | number | boolean | Date | import('../types').TreeFilterValue | import('../types').FeaturesFilterValue | (string | number | boolean | Date | import('../types').TreeFilterValue | import('../types').FeaturesFilterValue)[];
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { ActionNavigationFactory } from '../../components/Dashboard/actions/context/WidgetActionsProvider/types';
|
|
2
|
+
import { ConfigDataSource } from '../../components/Dashboard/types';
|
|
3
|
+
import { WidgetModalSnapshot } from '../../components/Dashboard/actions/modals/types';
|
|
1
4
|
import { FC, PropsWithChildren } from 'react';
|
|
2
5
|
import { CatalogResourceDc, ExtendedProjectInfoDc, QueryLayerServiceInfoDc } from '@evergis/api';
|
|
3
6
|
import { ConfigContainer, ConfigContainerChild, DashboardLayerPayload, DashboardState, LayerItemProps, SelectedFilters, WidgetDataSource } from '../../components';
|
|
@@ -21,13 +24,19 @@ export type DashboardContextProps = PropsWithChildren<{
|
|
|
21
24
|
* лежит внутри — применяется как `replaceObject(config, { id }, next)`.
|
|
22
25
|
*/
|
|
23
26
|
onContainerChange?: (config: ConfigContainerChild) => void;
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
/** События жизненного цикла модалок. Управляемые окна используют общий хост и отдельную область данных. */
|
|
28
|
+
isModalNotificationAllowed?: (senderName: string | undefined, source: ConfigDataSource, layerName: string) => boolean;
|
|
29
|
+
onModalContextChange?: (modalId: string, snapshot: WidgetModalSnapshot | null) => void;
|
|
30
|
+
onModalToggle?: (modalId: string, isOpen: boolean, metadata?: {
|
|
31
|
+
managed: boolean;
|
|
32
|
+
}) => void;
|
|
30
33
|
filters?: SelectedFilters;
|
|
34
|
+
/** Синхронный снимок фильтров для последовательных действий. */
|
|
35
|
+
actionNavigation?: ActionNavigationFactory;
|
|
36
|
+
getActionFilters?: () => SelectedFilters;
|
|
37
|
+
/** Меняется при переходе на другую страницу, проект или карточку. */
|
|
38
|
+
actionContextKey?: string;
|
|
39
|
+
actionsActive?: boolean;
|
|
31
40
|
dashboardLayers?: DashboardState["layers"];
|
|
32
41
|
setDashboardLayer?: (props: DashboardLayerPayload) => void;
|
|
33
42
|
selectedTabId?: string;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { ActionNavigationFactory } from '../../components/Dashboard/actions/context/WidgetActionsProvider/types';
|
|
2
|
+
import { ConfigDataSource } from '../../components/Dashboard/types';
|
|
3
|
+
import { WidgetModalSnapshot } from '../../components/Dashboard/actions/modals/types';
|
|
1
4
|
import { PropsWithChildren } from 'react';
|
|
2
5
|
import { QueryLayerServiceInfoDc } from '@evergis/api';
|
|
3
6
|
import { ClientFeatureAttribute, ConfigContainer, ConfigContainerChild, EditAttributeValue, SelectedFilters, WidgetDataSource } from '../../components';
|
|
@@ -14,7 +17,11 @@ export type FeatureCardContextSettings = PropsWithChildren<{
|
|
|
14
17
|
/** Контейнер изменил собственный конфиг — см. одноимённый проп `DashboardProvider`. */
|
|
15
18
|
onContainerChange?: (config: ConfigContainerChild) => void;
|
|
16
19
|
/** Модалка открылась или закрылась — см. одноимённый проп `DashboardProvider`. */
|
|
17
|
-
|
|
20
|
+
isModalNotificationAllowed?: (senderName: string | undefined, source: ConfigDataSource, layerName: string) => boolean;
|
|
21
|
+
onModalContextChange?: (modalId: string, snapshot: WidgetModalSnapshot | null) => void;
|
|
22
|
+
onModalToggle?: (modalId: string, isOpen: boolean, metadata?: {
|
|
23
|
+
managed: boolean;
|
|
24
|
+
}) => void;
|
|
18
25
|
isFeatureEditable?: boolean;
|
|
19
26
|
hasCopyRights?: boolean;
|
|
20
27
|
editOnly?: boolean;
|
|
@@ -23,6 +30,12 @@ export type FeatureCardContextSettings = PropsWithChildren<{
|
|
|
23
30
|
dataSources?: WidgetDataSource[];
|
|
24
31
|
loading?: boolean;
|
|
25
32
|
filters?: SelectedFilters;
|
|
33
|
+
/** Синхронный снимок фильтров для последовательных действий. */
|
|
34
|
+
actionNavigation?: ActionNavigationFactory;
|
|
35
|
+
getActionFilters?: () => SelectedFilters;
|
|
36
|
+
/** Меняется при переходе на другую страницу, проект или карточку. */
|
|
37
|
+
actionContextKey?: string;
|
|
38
|
+
actionsActive?: boolean;
|
|
26
39
|
changeFilters?: (filters: SelectedFilters) => void;
|
|
27
40
|
controls?: Record<string, EditAttributeValue>;
|
|
28
41
|
changeControls?: (controls: Record<string, EditAttributeValue>) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GridEditSessionValue } from '
|
|
1
|
+
import { GridEditSessionValue } from '../../components/Dashboard/grid/types';
|
|
2
2
|
/**
|
|
3
3
|
* Сессия редактирования раскладки. Создаётся ВНЕШНИМ grid-узлом с `options.editMode`;
|
|
4
4
|
* вложенные сетки её только читают, собственный `editMode` у них игнорируется.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StructuredDataContextValue } from '
|
|
1
|
+
import { StructuredDataContextValue } from '../../components/Dashboard/containers/StructuredDataContainer/types';
|
|
2
2
|
/**
|
|
3
3
|
* Канал «контейнер → представление». Схему, строки и колбэки правки держит
|
|
4
4
|
* `StructuredDataContainer`, а рендерит их элемент-представление (`ElementTable`),
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PythonExecutionRequest } from '../../../hooks/task/runtime/types';
|
|
2
|
+
export declare const useOptionalTaskExecution: () => {
|
|
3
|
+
runTask: (request: PythonExecutionRequest) => import('../../../hooks/task/runtime/types').PythonExecutionHandle;
|
|
4
|
+
entries: import('..').TaskExecutionEntry[];
|
|
5
|
+
openLog: (runId: string) => void;
|
|
6
|
+
closeLog: () => void;
|
|
7
|
+
dismissTask: (runId: string) => void;
|
|
8
|
+
logRunId: string | null;
|
|
9
|
+
};
|
|
10
|
+
export declare const useTaskExecution: () => {
|
|
11
|
+
runTask: (request: PythonExecutionRequest) => import('../../../hooks/task/runtime/types').PythonExecutionHandle;
|
|
12
|
+
entries: import('..').TaskExecutionEntry[];
|
|
13
|
+
openLog: (runId: string) => void;
|
|
14
|
+
closeLog: () => void;
|
|
15
|
+
dismissTask: (runId: string) => void;
|
|
16
|
+
logRunId: string | null;
|
|
17
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PythonExecutionHandle, PythonExecutionRequest } from '../../hooks/task/runtime/types';
|
|
2
|
+
import { ServerNotificationsContextProps } from '../ServerNotificationsContext/types';
|
|
3
|
+
export interface TaskExecutionEntry {
|
|
4
|
+
handle: PythonExecutionHandle;
|
|
5
|
+
request: PythonExecutionRequest;
|
|
6
|
+
}
|
|
7
|
+
export interface TaskExecutionContextValue {
|
|
8
|
+
runTask: (request: PythonExecutionRequest, transport?: ServerNotificationsContextProps) => PythonExecutionHandle;
|
|
9
|
+
entries: TaskExecutionEntry[];
|
|
10
|
+
openLog: (runId: string) => void;
|
|
11
|
+
closeLog: () => void;
|
|
12
|
+
dismissTask: (runId: string) => void;
|
|
13
|
+
logRunId: string | null;
|
|
14
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { INotificationItem } from '@evergis/uilib-gl';
|
|
2
|
+
import { TaskExecutionEntry } from '../types';
|
|
3
|
+
import { GlobalContextProps } from '../../GlobalContext/types';
|
|
4
|
+
export declare const createTaskNotification: ({ handle, request }: TaskExecutionEntry, translate: GlobalContextProps["t"], open: () => void, dismiss: () => void) => INotificationItem;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { WidgetActionsValue } from '../../components/Dashboard/actions/context/bindingTypes';
|
|
2
|
+
import { WidgetType } from '../../components/Dashboard/types';
|
|
3
|
+
export declare const WidgetActionsContext: import('react').Context<Partial<Record<WidgetType, WidgetActionsValue>>>;
|
|
4
|
+
export declare const useWidgetActions: (type: WidgetType) => WidgetActionsValue;
|
package/dist/contexts/index.d.ts
CHANGED
|
@@ -3,3 +3,15 @@ export * from './FeatureCardContext';
|
|
|
3
3
|
export * from './GlobalContext';
|
|
4
4
|
export * from './MapContext';
|
|
5
5
|
export * from './ServerNotificationsContext';
|
|
6
|
+
export * from './TaskExecutionContext';
|
|
7
|
+
export * from './WidgetModalsContext';
|
|
8
|
+
export * from './ModalDataContext';
|
|
9
|
+
export * from './ChartActionsContext';
|
|
10
|
+
export * from './WidgetActionsContext';
|
|
11
|
+
export * from './FillContext';
|
|
12
|
+
export * from './ChartPlotContext';
|
|
13
|
+
export * from './StructuredDataContext';
|
|
14
|
+
export * from './GridEditContext';
|
|
15
|
+
export * from './ActionContext';
|
|
16
|
+
export * from './ActionNodeContext';
|
|
17
|
+
export * from './ActionScopeContext';
|