@evergis/react 4.0.165 → 4.0.166
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 +21 -21
- package/README.md +7 -7
- package/dist/components/Dashboard/componentTypes.d.ts +29 -4
- package/dist/components/Dashboard/containers/TaskContainer/components/StatusWaitingButton/index.d.ts +2 -11
- package/dist/components/Dashboard/containers/TaskContainer/components/TaskButton/index.d.ts +4 -0
- package/dist/components/Dashboard/containers/TaskContainer/components/TaskButton/styled.d.ts +2 -0
- package/dist/components/Dashboard/containers/TaskContainer/hooks/useTaskButtonState.d.ts +13 -0
- package/dist/components/Dashboard/containers/TaskContainer/types.d.ts +16 -0
- package/dist/components/Dashboard/elements/ElementButton/constants.d.ts +6 -0
- package/dist/components/Dashboard/elements/ElementButton/utils/getElementButtonProps.d.ts +8 -0
- package/dist/components/Dashboard/types.d.ts +23 -2
- package/dist/index.js +3794 -3701
- package/dist/index.js.map +1 -1
- package/dist/react.esm.js +3794 -3701
- package/dist/react.esm.js.map +1 -1
- package/package.json +5 -5
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,11 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { QueryLayerServiceInfoDc } from '@evergis/api';
|
|
2
|
-
import { ClientFeatureAttribute, ConfigContainer, ConfigContainerChild, ConfigContainerHeader, ConfigOptions, ContainerProps, ContainerTemplate, FilterType, HeaderTemplate, NumericSizeOptions } from './types';
|
|
3
|
-
export type ElementButtonOptions =
|
|
3
|
+
import { ClientFeatureAttribute, ConfigButtonOptions, ConfigContainer, ConfigContainerChild, ConfigContainerHeader, ConfigOptions, ContainerProps, ContainerTemplate, FilterType, HeaderTemplate, NumericSizeOptions } from './types';
|
|
4
|
+
export type ElementButtonOptions = ConfigButtonOptions & Pick<ConfigOptions, "icon" | "radius">;
|
|
4
5
|
export interface ElementButtonConfig extends Omit<ConfigContainerChild, "options" | "type"> {
|
|
5
6
|
type?: "button";
|
|
6
7
|
options?: ElementButtonOptions;
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Поведение, которое передаёт контейнер-хозяин слота `button` (например, Task).
|
|
11
|
+
* С `onClick` кнопка рисуется и без ссылки в атрибуте.
|
|
12
|
+
*/
|
|
13
|
+
export interface ElementButtonOverrides {
|
|
14
|
+
title?: string;
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
color?: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
onClick?: VoidFunction;
|
|
19
|
+
}
|
|
20
|
+
export interface ElementButtonProps extends Omit<ContainerProps, "elementConfig" | "onClick">, ElementButtonOverrides {
|
|
9
21
|
elementConfig?: ElementButtonConfig;
|
|
10
22
|
}
|
|
11
23
|
export type ElementCameraOptions = Pick<ConfigOptions, "expandable" | "expanded">;
|
|
@@ -472,9 +484,22 @@ export interface TabsContainerProps extends Omit<ContainerProps, "elementConfig"
|
|
|
472
484
|
elementConfig?: TabsContainerConfig;
|
|
473
485
|
}
|
|
474
486
|
export type TaskContainerOptions = Pick<ConfigOptions, "title" | "relatedResources" | "center" | "icon" | "statusColors" | "responseFilters" | "useNotifications"> & ContainerBoxOptions;
|
|
475
|
-
export interface
|
|
487
|
+
export interface TaskButtonChild extends Omit<ElementButtonConfig, "id"> {
|
|
488
|
+
id: "button";
|
|
489
|
+
}
|
|
490
|
+
export interface TaskTitleChild extends Omit<ConfigContainerChild, "id" | "type"> {
|
|
491
|
+
id: "title";
|
|
492
|
+
type?: "text";
|
|
493
|
+
}
|
|
494
|
+
export interface TaskTitleIconChild extends Omit<ConfigContainerChild, "id" | "type"> {
|
|
495
|
+
id: "titleIcon";
|
|
496
|
+
type?: "icon";
|
|
497
|
+
}
|
|
498
|
+
export type TaskContainerChild = TaskButtonChild | TaskTitleChild | TaskTitleIconChild;
|
|
499
|
+
export interface TaskContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName" | "children"> {
|
|
476
500
|
templateName?: ContainerTemplate.Task;
|
|
477
501
|
options?: TaskContainerOptions;
|
|
502
|
+
children?: TaskContainerChild[];
|
|
478
503
|
}
|
|
479
504
|
export interface TaskContainerProps extends Omit<ContainerProps, "elementConfig"> {
|
|
480
505
|
elementConfig?: TaskContainerConfig;
|
package/dist/components/Dashboard/containers/TaskContainer/components/StatusWaitingButton/index.d.ts
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export declare const StatusWaitingButton: FC<{
|
|
5
|
-
title: string;
|
|
6
|
-
icon: IconTypesKeys;
|
|
7
|
-
status: RemoteTaskStatus;
|
|
8
|
-
statusColors: Record<RemoteTaskStatus, string>;
|
|
9
|
-
isWaiting: boolean;
|
|
10
|
-
isDisabled: boolean;
|
|
11
|
-
onClick: VoidFunction;
|
|
12
|
-
}>;
|
|
2
|
+
import { TaskButtonProps } from '../../types';
|
|
3
|
+
export declare const StatusWaitingButton: FC<TaskButtonProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RemoteTaskStatus } from '@evergis/api';
|
|
2
|
+
import { IconTypesKeys } from '@evergis/uilib-gl';
|
|
3
|
+
interface UseTaskButtonStateProps {
|
|
4
|
+
status: RemoteTaskStatus;
|
|
5
|
+
title?: string;
|
|
6
|
+
icon?: IconTypesKeys;
|
|
7
|
+
}
|
|
8
|
+
/** Текст и иконка кнопки запуска: в исходном состоянии — заданные, иначе — по статусу задачи. */
|
|
9
|
+
export declare const useTaskButtonState: ({ status, title, icon }: UseTaskButtonStateProps) => {
|
|
10
|
+
title: string;
|
|
11
|
+
iconKind: "symbol" | "function" | "auto" | "button" | "data" | "label" | "legend" | "link" | "map" | "menu" | "param" | "search" | "section" | "time" | "ellipse" | "filter" | "image" | "stop" | "text" | "id" | "cursor" | "points" | "restart" | "scale" | "key" | "download" | "list" | "error" | "next" | "alert" | "grid" | "heading" | "log" | "tree" | "bold" | "paint" | "layers" | "delete" | "save" | "menu_vertical" | "menu_horizontal" | "edit" | "tools" | "filter_apply" | "date" | "zoom_to" | "geom_raster" | "geom_point" | "geom_polygon" | "geom_multipolygon" | "geom_polyline" | "share" | "refresh" | "basemap" | "plus" | "minus" | "select_rect" | "select_circle" | "select_polygon" | "clear" | "measure_length" | "measure_area" | "home" | "bookmark" | "arrow_forward" | "arrow_back" | "message" | "location_pointer" | "close" | "maximize" | "minimize" | "maximize_solid" | "minimize_solid" | "to_last" | "play" | "prev" | "to_first" | "pause" | "upload" | "hide" | "expand" | "reduce" | "input_resizer" | "input_dropdown" | "classification" | "copy" | "phone" | "like" | "export_excel" | "location_coordinate" | "sorting_asc" | "sorting_des" | "password_show" | "password_hide" | "success" | "warning" | "star" | "social_vk" | "social_fb" | "social_google" | "social_github" | "social_vk_simple" | "social_fb_simple" | "social_google_simple" | "social_medium" | "geoprocessing" | "info" | "feedback" | "panel_hide" | "panel_show" | "feature_add" | "logo" | "lock" | "unlock" | "users" | "displayfield" | "textfile" | "image_paste" | "step_back" | "step_forward" | "pipette" | "calculation" | "geom_move" | "geom_poly_vertex" | "geom_poly_hole" | "geom_poly_slice" | "geom_poly_reshape" | "geom_poly_ungroup" | "geom_poly_autocomplete" | "geom_line_vertex" | "geom_line_addpart" | "geom_line_slice" | "geom_line_reshape" | "geom_line_ungroup" | "geom_undefined" | "icon_undefined" | "inverse" | "location_current" | "tools_buffer" | "tools_zones" | "tools_print" | "tools_spatial_selection" | "tools_aggregation" | "zip" | "catalog" | "catalog_variant" | "question" | "alpha" | "betta" | "dragdrop" | "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "greater_or_equal" | "less_than" | "less_or_equal" | "starts_with" | "not_starts_with" | "ends_with" | "not_ends_with" | "empty" | "filled" | "raster_visible" | "raster_invisible" | "editgeom_point_addpart" | "divide" | "filter_layer" | "filter_table" | "img_generate" | "finish" | "transparentize" | "textLeft" | "textRight" | "textCenter" | "textJustify" | "externalway" | "evergis" | "geometryUnite" | "geometryCrop" | "roles" | "icon_block" | "configurations" | "settings_table" | "set_edit" | "set_read" | "set_configure" | "set_time" | "snapping" | "snap_1" | "snap_2" | "snap_3" | "slide" | "tags" | "statistics" | "alphabet_sort_za" | "alphabet_sort_az" | "inside_range" | "outside_range" | "tms" | "arc_gis" | "date_outside" | "wms_link" | "object_size" | "stroke_width" | "point_select" | "select_line" | "apply_selection" | "report" | "refresh_circle" | "date_filter" | "layer_filter_applied" | "attribute_filter_applied" | "geometry_selection_applied" | "attribute_filter" | "layer_filter" | "layers_add" | "geo_location" | "geom_types" | "date_aggregation" | "public_group" | "social_tg" | "rounded_triangle" | "zoom_in" | "zoom_out" | "checkboxes" | "sum" | "datetime" | "double" | "int" | "local_tile_service" | "arcgis_service" | "wms_service" | "text_format" | "coordinates_actions" | "xy" | "group_features" | "ungroup_features" | "preview" | "triangle" | "rectangle" | "themed_symbol" | "selection" | "table_link" | "cell_size" | "symbol_library" | "globe" | "tree_folder_closed" | "tree_folder_opened" | "add_group" | "ungroup" | "feature_card" | "moon" | "sun" | "logout" | "search_selection" | "suggestions" | "social_dzen" | "social_youtube" | "query" | "table_empty" | "shared_group" | "text_frame" | "file_catalog" | "attachment" | "stats" | "loading_circle" | "layer_option" | "change_geom" | "settings_horizontal" | "text_editor" | "dashboard_loading" | "dashboard_placeholder" | "sort" | "postgresql" | "bigquery" | "amazon_s3" | "databricks" | "redshift" | "server_connection" | "service_connection" | "column_increment" | "column_unique" | "column_nullable" | "projection" | "card" | "zones_selection" | "walking" | "selection_route" | "pulse" | "tree_vertical" | "tool_settings" | "folder_outline" | "percent" | "run" | "table_view" | "text_view" | "in_map" | "tables" | "collapse" | "expand_all" | "quote" | "list_ordered" | "list_unordered" | "italic" | "filter_switcher" | "arrow_down" | "arrow_up" | "new_window" | "line_numbers" | "python" | "config" | "pc" | "social_yandex" | "tab_icon" | "disk" | "ram" | "cpu" | "select_point" | "page_add" | "page_menu" | "stack" | "calc_attribute" | "calc_attribute_attribute" | "calc_attribute_value" | "calc_geometry" | "camera" | "pdf" | "slideshow" | "edit_container" | "default_attributes" | "progress_bar" | "section_add" | "section_remove" | "connections" | "pie_chart" | "line_chart" | "stack_chart" | "datasource" | "tabs" | "check_toggle" | "cadastr" | "office" | "layer_eye" | "ai" | "bool" | "json" | "rollup" | "no_geom" | "symbol_text" | "text_circle" | "heatmap" | "cube" | "extrude" | "transition" | "stop_circle" | "token" | "star_symbol" | "text_plain" | "geom_shapes";
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RemoteTaskStatus } from '@evergis/api';
|
|
2
|
+
import { IconTypesKeys } from '@evergis/uilib-gl';
|
|
3
|
+
import { TaskButtonChild, WidgetType } from '../../types';
|
|
4
|
+
export interface TaskButtonProps {
|
|
5
|
+
title: string;
|
|
6
|
+
icon?: IconTypesKeys;
|
|
7
|
+
status: RemoteTaskStatus;
|
|
8
|
+
statusColors?: Record<RemoteTaskStatus, string>;
|
|
9
|
+
isWaiting: boolean;
|
|
10
|
+
isDisabled: boolean;
|
|
11
|
+
onClick: VoidFunction;
|
|
12
|
+
}
|
|
13
|
+
export interface TaskSlotButtonProps extends TaskButtonProps {
|
|
14
|
+
type?: WidgetType;
|
|
15
|
+
buttonConfig: TaskButtonChild;
|
|
16
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IconButtonVariant } from '@evergis/uilib-gl';
|
|
2
|
+
import { ElementButtonOptions } from '../../types';
|
|
3
|
+
/** Опции внешнего вида: хотя бы одна из них переводит кнопку-ссылку на IconButton. */
|
|
4
|
+
export declare const ELEMENT_BUTTON_APPEARANCE_KEYS: (keyof ElementButtonOptions)[];
|
|
5
|
+
export declare const ELEMENT_BUTTON_COLOR_FLAGS: readonly ["primary", "secondary", "error", "violet"];
|
|
6
|
+
export declare const DEFAULT_ELEMENT_BUTTON_VARIANT: IconButtonVariant;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IIconButtonProps } from '@evergis/uilib-gl';
|
|
2
|
+
import { ElementButtonOptions } from '../../../types';
|
|
3
|
+
export declare const hasButtonAppearance: (options?: ElementButtonOptions) => boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Пропсы IconButton из опций элемента. Без цвета и флагов цвета кнопка — primary;
|
|
6
|
+
* нейтральная задаётся явным `primary: false`. `color` контейнера перекрывает цвет из опций.
|
|
7
|
+
*/
|
|
8
|
+
export declare const getElementButtonProps: (options?: ElementButtonOptions, color?: string) => IIconButtonProps;
|
|
@@ -2,7 +2,7 @@ import { CSSProperties, FC, ReactNode } from 'react';
|
|
|
2
2
|
import { FeatureCollection, Geometry } from 'geojson';
|
|
3
3
|
import { i18n } from 'i18next';
|
|
4
4
|
import { PieChartData, BarChartMarker } from '@evergis/charts';
|
|
5
|
-
import { IconTypesKeys, IOption } from '@evergis/uilib-gl';
|
|
5
|
+
import { IconButtonShape, IconButtonSize, IconButtonVariant, IconTypesKeys, IOption } from '@evergis/uilib-gl';
|
|
6
6
|
import { CircleLayerSpecification, FillLayerSpecification, LineLayerSpecification } from 'maplibre-gl';
|
|
7
7
|
import { AttributeType, EqlRequestDc, FeatureDc, OgcGeometryType, PagedFeaturesListDc, PositionDc, QueryLayerServiceInfoDc, RemoteTaskStatus, StringSubType, AttributesConfigurationDc } from '@evergis/api';
|
|
8
8
|
import { FeatureAttributeValue, EditGeometryType, ThemeName } from '../../types';
|
|
@@ -413,6 +413,27 @@ export interface ConfigChartOptions {
|
|
|
413
413
|
/** Подписи осей и подпись оси X. Работает только у линейного графика. */
|
|
414
414
|
axis?: ConfigChartAxisOptions;
|
|
415
415
|
}
|
|
416
|
+
/**
|
|
417
|
+
* Внешний вид кнопки (`IconButton` из uilib-gl). Скругление вручную — `radius` (px)
|
|
418
|
+
* из {@link ConfigLayoutOptions}, иконка — `icon` из {@link ConfigVisualOptions}.
|
|
419
|
+
*/
|
|
420
|
+
export interface ConfigButtonOptions {
|
|
421
|
+
/** Заливка и обводка: `solid` | `soft` | `outline` | `ghost`. */
|
|
422
|
+
variant?: IconButtonVariant;
|
|
423
|
+
/** Произвольный CSS-цвет; перекрывает флаги цвета. Оттенки наведения и нажатия вычисляются. */
|
|
424
|
+
color?: string;
|
|
425
|
+
/** Флаги цвета, приоритет: primary → secondary → error → violet. Без флагов и `color` — нейтральный. */
|
|
426
|
+
primary?: boolean;
|
|
427
|
+
secondary?: boolean;
|
|
428
|
+
error?: boolean;
|
|
429
|
+
violet?: boolean;
|
|
430
|
+
/** Высота 24 / 32 / 40 / 48. */
|
|
431
|
+
size?: IconButtonSize;
|
|
432
|
+
/** `square` — скругление по размеру, `round` — пилюля/круг. */
|
|
433
|
+
shape?: IconButtonShape;
|
|
434
|
+
/** Иконка справа от текста. */
|
|
435
|
+
iconRight?: boolean;
|
|
436
|
+
}
|
|
416
437
|
/** Иконки/изображения. */
|
|
417
438
|
export interface ConfigVisualOptions {
|
|
418
439
|
icon?: IconTypesKeys;
|
|
@@ -561,7 +582,7 @@ export type ConfigNotifications = "all" | "my" | string[];
|
|
|
561
582
|
* `Pick<ConfigOptions, ...>`, продолжают работать. Для нового кода предпочтительно делать
|
|
562
583
|
* `Pick<Config<Domain>Options, ...>` — это лучше документирует, к какому домену относится опция.
|
|
563
584
|
*/
|
|
564
|
-
export interface ConfigOptions extends ConfigLayoutOptions, ConfigTypographyOptions, ConfigExpandableOptions, ConfigDataSourceBindingOptions, ConfigChartOptions, ConfigVisualOptions, ConfigTextDisplayOptions, ConfigCollectionOptions, ConfigMapLayerOptions, ConfigEditOptions, ConfigVoteOptions, ConfigMiscOptions {
|
|
585
|
+
export interface ConfigOptions extends ConfigLayoutOptions, ConfigTypographyOptions, ConfigExpandableOptions, ConfigDataSourceBindingOptions, ConfigChartOptions, ConfigButtonOptions, ConfigVisualOptions, ConfigTextDisplayOptions, ConfigCollectionOptions, ConfigMapLayerOptions, ConfigEditOptions, ConfigVoteOptions, ConfigMiscOptions {
|
|
565
586
|
}
|
|
566
587
|
/**
|
|
567
588
|
* Настройки атрибута источника данных, заданные в конфиге.
|