@evergis/react 4.0.104 → 4.0.105
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/componentTypes.d.ts +3 -3
- package/dist/components/Dashboard/components/TextTrim/index.d.ts +1 -0
- package/dist/components/Dashboard/components/TextTrim/styled.d.ts +4 -0
- package/dist/components/Dashboard/containers/DataSourceContainer/constants.d.ts +7 -0
- package/dist/components/Dashboard/containers/DataSourceContainer/styled.d.ts +7 -12
- package/dist/components/Dashboard/containers/FiltersContainer/components/ChipsFilter.styled.d.ts +2 -1
- package/dist/components/Dashboard/containers/RoundedBackgroundContainer/styled.d.ts +1 -0
- package/dist/components/Dashboard/containers/TitleContainer/styled.d.ts +2 -2
- package/dist/components/Dashboard/hooks/index.d.ts +1 -0
- package/dist/components/Dashboard/hooks/useEqualTileWidth.d.ts +13 -0
- package/dist/components/Dashboard/types.d.ts +17 -2
- package/dist/components/Layer/types.d.ts +2 -2
- package/dist/core/classification/getLayerClientStyle.d.ts +3 -0
- package/dist/core/classification/index.d.ts +1 -0
- package/dist/index.js +223 -188
- package/dist/index.js.map +1 -1
- package/dist/react.esm.js +221 -189
- package/dist/react.esm.js.map +1 -1
- package/dist/types/styling.d.ts +6 -20
- package/package.json +2 -3
|
@@ -16,7 +16,7 @@ export interface ElementCameraConfig extends Omit<ConfigContainerChild, "options
|
|
|
16
16
|
export interface ElementCameraProps extends Omit<ContainerProps, "elementConfig"> {
|
|
17
17
|
elementConfig?: ElementCameraConfig;
|
|
18
18
|
}
|
|
19
|
-
export type ElementChartOptions = Pick<ConfigOptions, "column" | "markers" | "showLabels" | "showMarkers" | "showTotal" | "totalWord" | "totalAttribute" | "expandable" | "expanded" | "chartType" | "relatedDataSources" | "defaultColor" | "dotSnapping" | "radius" | "padding" | "fontColor" | "angle" | "barWidth" | "cornerRadius"> & NumericSizeOptions;
|
|
19
|
+
export type ElementChartOptions = Pick<ConfigOptions, "column" | "markers" | "showLabels" | "showMarkers" | "showTotal" | "totalWord" | "totalAttribute" | "expandable" | "expanded" | "chartType" | "relatedDataSources" | "defaultColor" | "dotSnapping" | "radius" | "padding" | "fontColor" | "angle" | "barWidth" | "cornerRadius" | "shownItems" | "otherItems"> & NumericSizeOptions;
|
|
20
20
|
export interface ElementChartConfig extends Omit<ConfigContainerChild, "options" | "type"> {
|
|
21
21
|
type?: "chart";
|
|
22
22
|
options?: ElementChartOptions;
|
|
@@ -199,7 +199,7 @@ export interface ContainersGroupContainerConfig extends Omit<ConfigContainerChil
|
|
|
199
199
|
export interface ContainersGroupContainerProps extends Omit<ContainerProps, "elementConfig"> {
|
|
200
200
|
elementConfig?: ContainersGroupContainerConfig;
|
|
201
201
|
}
|
|
202
|
-
export type DataSourceContainerOptions = Pick<ConfigOptions, "column" | "relatedDataSource" | "innerTemplateName" | "expandable" | "expanded"> & ContainerBoxOptions;
|
|
202
|
+
export type DataSourceContainerOptions = Pick<ConfigOptions, "column" | "relatedDataSource" | "innerTemplateName" | "expandable" | "expanded" | "columns" | "gap" | "align" | "shownItems" | "otherItems"> & ContainerBoxOptions;
|
|
203
203
|
export interface DataSourceContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
|
|
204
204
|
templateName?: ContainerTemplate.DataSource;
|
|
205
205
|
options?: DataSourceContainerOptions;
|
|
@@ -398,7 +398,7 @@ export interface ProgressContainerConfig extends Omit<ConfigContainerChild, "opt
|
|
|
398
398
|
export interface ProgressContainerProps extends Omit<ContainerProps, "elementConfig"> {
|
|
399
399
|
elementConfig?: ProgressContainerConfig;
|
|
400
400
|
}
|
|
401
|
-
export type RoundedBackgroundContainerOptions = Pick<ConfigOptions, "maxLength" | "wordBreak" | "center" | "fontColor" | "innerTemplateStyle" | "inlineUnits" | "big" | "bigIcon" | "hideEmpty" | "colorAttribute">;
|
|
401
|
+
export type RoundedBackgroundContainerOptions = Pick<ConfigOptions, "maxLength" | "maxLines" | "wordBreak" | "center" | "fontColor" | "innerTemplateStyle" | "inlineUnits" | "big" | "bigIcon" | "hideEmpty" | "colorAttribute" | "align" | "columns" | "gap">;
|
|
402
402
|
export interface RoundedBackgroundContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
|
|
403
403
|
templateName?: ContainerTemplate.RoundedBackground;
|
|
404
404
|
options?: RoundedBackgroundContainerOptions;
|
|
@@ -2,3 +2,7 @@ import { ConfigTextDisplayOptions } from '../../types';
|
|
|
2
2
|
export declare const TextTrimValue: import('styled-components').StyledComponent<"div", any, {
|
|
3
3
|
wordBreak?: ConfigTextDisplayOptions["wordBreak"];
|
|
4
4
|
}, never>;
|
|
5
|
+
export declare const ClampedText: import('styled-components').StyledComponent<"div", any, {
|
|
6
|
+
$maxLines: number;
|
|
7
|
+
wordBreak?: ConfigTextDisplayOptions["wordBreak"];
|
|
8
|
+
}, never>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TileAlignment } from '../../types';
|
|
2
|
+
/** Дефолтный внутренний отступ между плитками, px (ТЗ §11). */
|
|
3
|
+
export declare const DEFAULT_TILE_GAP = 8;
|
|
4
|
+
/** Раскладка ряда плиток (grid `justify-content`) для не-`stretch` выравнивания. */
|
|
5
|
+
export declare const ROW_JUSTIFY: Record<TileAlignment, string>;
|
|
6
|
+
/** Горизонтальное положение плитки в режиме «В столбец» (CSS `align-items`). */
|
|
7
|
+
export declare const COLUMN_ALIGN_ITEMS: Record<TileAlignment, string>;
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
* Обёртка записей источника.
|
|
3
|
-
*
|
|
4
|
-
* В ряду (`column: false`) записи переносятся на новую строку. Без переноса они дрались бы за
|
|
5
|
-
* одну строку: обёртка каждой записи — flex-элемент и ужимается, а внутренний шаблон (плашка
|
|
6
|
-
* RoundedBackground имеет жёсткие 9rem) — нет, поэтому записи наезжали бы друг на друга.
|
|
7
|
-
*
|
|
8
|
-
* `flex-wrap` намеренно не вынесен в row-ветку самого `Container`: там дети — карточки
|
|
9
|
-
* контейнеров шириной 100%, и перенос уложил бы их по одной на строку, сломав ряд у
|
|
10
|
-
* ContainersGroup.
|
|
11
|
-
*/
|
|
1
|
+
import { TileAlignment } from '../../types';
|
|
12
2
|
export declare const DataSourceContainerWrapper: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & import('../../styled').ContainerRootProps & {
|
|
13
3
|
isTitle?: boolean;
|
|
14
4
|
isColumn?: boolean;
|
|
15
5
|
isMain?: boolean;
|
|
16
6
|
noBorders?: boolean;
|
|
17
|
-
$alignItems?: import('
|
|
7
|
+
$alignItems?: import('../../types').AlignItems;
|
|
18
8
|
} & {
|
|
19
9
|
$isRow?: boolean;
|
|
10
|
+
$columns?: number;
|
|
11
|
+
$gap?: number;
|
|
12
|
+
$align?: TileAlignment;
|
|
13
|
+
$stretch?: boolean;
|
|
14
|
+
$tileWidth?: number;
|
|
20
15
|
}, never>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TileAlignment } from '../../types';
|
|
2
2
|
export declare const ContainerIconTitle: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & {
|
|
3
3
|
fontColor?: string;
|
|
4
4
|
}, never>;
|
|
5
5
|
export declare const ContainerTitle: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & {
|
|
6
6
|
simple?: boolean;
|
|
7
|
-
$align?:
|
|
7
|
+
$align?: TileAlignment;
|
|
8
8
|
}, never>;
|
|
@@ -10,6 +10,7 @@ export * from './useChartData';
|
|
|
10
10
|
export * from './useDashboardHeader';
|
|
11
11
|
export * from './useDataSources';
|
|
12
12
|
export * from './useDiffPage';
|
|
13
|
+
export * from './useEqualTileWidth';
|
|
13
14
|
export * from './useAfterSave';
|
|
14
15
|
export * from './useBeforeSave';
|
|
15
16
|
export * from './useExpandableContainers';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Уравнивает ширину всех плиток контейнера по самой широкой.
|
|
4
|
+
*
|
|
5
|
+
* Натуральная ширина каждой плитки измеряется через временное inline `width: max-content`
|
|
6
|
+
* (снимает применённое ограничение `--tile-width`, поэтому замер устойчив к динамике данных и не
|
|
7
|
+
* зацикливает ResizeObserver — итоговый максимум совпадает с уже применённым). Возвращаемое число
|
|
8
|
+
* контейнер прокидывает в CSS-переменную `--tile-width`, которую читает каждая плитка.
|
|
9
|
+
*
|
|
10
|
+
* `enabled: false` (режим «Растянуть», «В столбец» или старые конфиги без `columns`) полностью
|
|
11
|
+
* отключает измерение — ширина берётся из grid-ячейки.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useEqualTileWidth: (enabled: boolean, itemsCount: number) => [RefObject<HTMLDivElement>, number | undefined];
|
|
@@ -15,6 +15,12 @@ export type ChartType = (typeof CHART_TYPES)[number];
|
|
|
15
15
|
/** Выравнивание текста/блоков. */
|
|
16
16
|
export declare const ALIGNMENTS: readonly ["left", "center", "right"];
|
|
17
17
|
export type Alignment = (typeof ALIGNMENTS)[number];
|
|
18
|
+
/**
|
|
19
|
+
* Выравнивание плиток контейнера DataSource+RoundedBackground: к базовым `left/center/right`
|
|
20
|
+
* добавлен режим `stretch` — плитки строки растягиваются на всю ширину (ТЗ 9.4/9.5).
|
|
21
|
+
*/
|
|
22
|
+
export declare const TILE_ALIGNMENTS: readonly ["left", "center", "right", "stretch"];
|
|
23
|
+
export type TileAlignment = (typeof TILE_ALIGNMENTS)[number];
|
|
18
24
|
/** Выравнивание детей контейнера по поперечной оси (CSS `align-items`). */
|
|
19
25
|
export declare const ALIGN_ITEMS: readonly ["flex-start", "center", "flex-end", "stretch", "baseline"];
|
|
20
26
|
export type AlignItems = (typeof ALIGN_ITEMS)[number];
|
|
@@ -175,8 +181,15 @@ export interface ConfigLayoutOptions {
|
|
|
175
181
|
twoColumns?: boolean;
|
|
176
182
|
/** Вписать график контейнера Chart в контейнер: по ширине всегда, по высоте — при заданной высоте (object-fit: contain). */
|
|
177
183
|
fill?: boolean;
|
|
178
|
-
/**
|
|
179
|
-
|
|
184
|
+
/**
|
|
185
|
+
* Горизонтальное выравнивание: содержимого заголовка контейнера, а для плиток
|
|
186
|
+
* (DataSource+RoundedBackground) — положение плиток в ряду/столбце, включая режим `stretch`.
|
|
187
|
+
*/
|
|
188
|
+
align?: TileAlignment;
|
|
189
|
+
/** Число плиток в строке ряда плиточного контейнера */
|
|
190
|
+
columns?: number;
|
|
191
|
+
/** Внутренний отступ между плитками, px */
|
|
192
|
+
gap?: number;
|
|
180
193
|
/** Выравнивание детей контейнера по поперечной оси. В ряду по умолчанию `center`. */
|
|
181
194
|
alignItems?: AlignItems;
|
|
182
195
|
/** Масштабирование изображения элемента `image`. */
|
|
@@ -272,6 +285,8 @@ export interface ConfigTextDisplayOptions {
|
|
|
272
285
|
hideTitle?: boolean;
|
|
273
286
|
simple?: boolean;
|
|
274
287
|
maxLength?: number;
|
|
288
|
+
/** Обрезка по числу строк (CSS line-clamp) — для описания плитки. */
|
|
289
|
+
maxLines?: number;
|
|
275
290
|
wordBreak?: "break-word" | "break-all";
|
|
276
291
|
separator?: string;
|
|
277
292
|
lineBreak?: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { EffectCallback } from 'react';
|
|
2
2
|
import { QueryLayerServiceInfoDc } from '@evergis/api';
|
|
3
|
-
import { ClientStyle
|
|
3
|
+
import { ClientStyle } from '../../types';
|
|
4
4
|
export interface LayerProps {
|
|
5
5
|
tileUrl: string;
|
|
6
6
|
layer?: QueryLayerServiceInfoDc;
|
|
7
7
|
layerType?: string;
|
|
8
8
|
visible?: boolean;
|
|
9
9
|
beforeId?: string;
|
|
10
|
-
getLayerTempStyle?: (
|
|
10
|
+
getLayerTempStyle?: (layerName: string) => ClientStyle;
|
|
11
11
|
onMount?: EffectCallback;
|
|
12
12
|
}
|