@evergis/react 4.0.102 → 4.0.104

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 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`!
@@ -124,6 +124,12 @@ export interface ElementUploaderConfig extends Omit<ConfigContainerChild, "optio
124
124
  export interface ElementUploaderProps extends Omit<ContainerProps, "elementConfig"> {
125
125
  elementConfig?: ElementUploaderConfig;
126
126
  }
127
+ /**
128
+ * Опции размерной модели корневой обёртки — общие для всех контейнеров, которые проходят через
129
+ * `getWrapperSizeStyle`. Подмешивается к `<Name>ContainerOptions` вместо перечисления полей в
130
+ * каждом `Pick`, чтобы следующее размерное свойство не пришлось разносить по полутора десяткам мест.
131
+ */
132
+ export type ContainerBoxOptions = Pick<ConfigOptions, "width" | "height" | "overflow">;
127
133
  export type AddFeatureContainerOptions = Record<string, never>;
128
134
  export type AddFeatureButtonOptions = Pick<ConfigOptions, "icon" | "title" | "layerName" | "geometryType">;
129
135
  export interface AddFeatureButtonChild extends Omit<ConfigContainerChild, "options" | "type"> {
@@ -138,7 +144,7 @@ export interface AddFeatureContainerConfig extends Omit<ConfigContainerChild, "o
138
144
  export interface AddFeatureContainerProps extends Omit<ContainerProps, "elementConfig"> {
139
145
  elementConfig?: AddFeatureContainerConfig;
140
146
  }
141
- export type AttachmentContainerOptions = Pick<ConfigOptions, "expandable" | "expanded" | "viewMode" | "shownItems" | "otherItems" | "relatedDataSource" | "controls" | "width" | "height">;
147
+ export type AttachmentContainerOptions = Pick<ConfigOptions, "expandable" | "expanded" | "viewMode" | "shownItems" | "otherItems" | "relatedDataSource" | "controls"> & ContainerBoxOptions;
142
148
  export interface AttachmentContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
143
149
  templateName?: ContainerTemplate.Attachment;
144
150
  options?: AttachmentContainerOptions;
@@ -146,7 +152,7 @@ export interface AttachmentContainerConfig extends Omit<ConfigContainerChild, "o
146
152
  export interface AttachmentContainerProps extends Omit<ContainerProps, "elementConfig"> {
147
153
  elementConfig?: AttachmentContainerConfig;
148
154
  }
149
- export type CameraContainerOptions = Pick<ConfigOptions, "expandable" | "expanded" | "width" | "height">;
155
+ export type CameraContainerOptions = Pick<ConfigOptions, "expandable" | "expanded"> & ContainerBoxOptions;
150
156
  export interface CameraContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
151
157
  templateName?: ContainerTemplate.Camera;
152
158
  options?: CameraContainerOptions;
@@ -154,7 +160,7 @@ export interface CameraContainerConfig extends Omit<ConfigContainerChild, "optio
154
160
  export interface CameraContainerProps extends Omit<ContainerProps, "elementConfig"> {
155
161
  elementConfig?: CameraContainerConfig;
156
162
  }
157
- export type ChartContainerOptions = Pick<ConfigOptions, "twoColumns" | "hideEmpty" | "width" | "height" | "fill">;
163
+ export type ChartContainerOptions = Pick<ConfigOptions, "twoColumns" | "hideEmpty" | "fill"> & ContainerBoxOptions;
158
164
  export interface ChartAliasChild extends Omit<ConfigContainerChild, "id"> {
159
165
  id: "alias";
160
166
  }
@@ -185,7 +191,7 @@ export interface ChartContainerConfig extends Omit<ConfigContainerChild, "option
185
191
  export interface ChartContainerProps extends Omit<ContainerProps, "elementConfig"> {
186
192
  elementConfig?: ChartContainerConfig;
187
193
  }
188
- export type ContainersGroupContainerOptions = Pick<ConfigOptions, "column" | "expandable" | "expanded" | "width" | "height" | "alignItems">;
194
+ export type ContainersGroupContainerOptions = Pick<ConfigOptions, "column" | "expandable" | "expanded" | "alignItems"> & ContainerBoxOptions;
189
195
  export interface ContainersGroupContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
190
196
  templateName?: ContainerTemplate.ContainersGroup;
191
197
  options?: ContainersGroupContainerOptions;
@@ -193,7 +199,7 @@ export interface ContainersGroupContainerConfig extends Omit<ConfigContainerChil
193
199
  export interface ContainersGroupContainerProps extends Omit<ContainerProps, "elementConfig"> {
194
200
  elementConfig?: ContainersGroupContainerConfig;
195
201
  }
196
- export type DataSourceContainerOptions = Pick<ConfigOptions, "column" | "relatedDataSource" | "innerTemplateName" | "expandable" | "expanded" | "width" | "height">;
202
+ export type DataSourceContainerOptions = Pick<ConfigOptions, "column" | "relatedDataSource" | "innerTemplateName" | "expandable" | "expanded"> & ContainerBoxOptions;
197
203
  export interface DataSourceContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
198
204
  templateName?: ContainerTemplate.DataSource;
199
205
  options?: DataSourceContainerOptions;
@@ -205,7 +211,7 @@ export type DataSourceInnerContainerOptions = Pick<ConfigOptions, "relatedDataSo
205
211
  export interface DataSourceInnerContainerConfig extends Omit<ConfigContainerChild, "options"> {
206
212
  options?: DataSourceInnerContainerOptions;
207
213
  }
208
- export type DataSourceProgressContainerOptions = Pick<ConfigOptions, "maxValue" | "showTotal" | "relatedDataSource" | "innerTemplateName" | "expandable" | "expanded" | "shownItems" | "otherItems" | "width" | "height">;
214
+ export type DataSourceProgressContainerOptions = Pick<ConfigOptions, "maxValue" | "showTotal" | "relatedDataSource" | "innerTemplateName" | "expandable" | "expanded" | "shownItems" | "otherItems"> & ContainerBoxOptions;
209
215
  export interface DataSourceProgressContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
210
216
  templateName?: ContainerTemplate.DataSourceProgress;
211
217
  options?: DataSourceProgressContainerOptions;
@@ -321,7 +327,7 @@ export interface ExportPdfContainerConfig extends Omit<ConfigContainerChild, "op
321
327
  export interface ExportPdfContainerProps extends Omit<ContainerProps, "elementConfig"> {
322
328
  elementConfig?: ExportPdfContainerConfig;
323
329
  }
324
- export type FiltersContainerOptions = Pick<ConfigOptions, "padding" | "bgColor" | "fontColor" | "fontSize" | "expandable" | "expanded" | "width" | "height">;
330
+ export type FiltersContainerOptions = Pick<ConfigOptions, "padding" | "bgColor" | "fontColor" | "fontSize" | "expandable" | "expanded"> & ContainerBoxOptions;
325
331
  /**
326
332
  * Опции ребёнка FiltersContainer. Набор — объединение того, что реально читают все восемь
327
333
  * реализаций фильтра: dropdown берёт `variants`/`noEmptyOption`, text — `searchFilterName`
@@ -349,7 +355,7 @@ export interface IconContainerConfig extends Omit<ConfigContainerChild, "options
349
355
  export interface IconContainerProps extends Omit<ContainerProps, "elementConfig"> {
350
356
  elementConfig?: IconContainerConfig;
351
357
  }
352
- export type ImageContainerOptions = Pick<ConfigOptions, "width" | "height">;
358
+ export type ImageContainerOptions = ContainerBoxOptions;
353
359
  export interface ImageContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
354
360
  templateName?: ContainerTemplate.Image;
355
361
  options?: ImageContainerOptions;
@@ -357,7 +363,7 @@ export interface ImageContainerConfig extends Omit<ConfigContainerChild, "option
357
363
  export interface ImageContainerProps extends Omit<ContainerProps, "elementConfig"> {
358
364
  elementConfig?: ImageContainerConfig;
359
365
  }
360
- export type LayersContainerOptions = Pick<ConfigOptions, "layerNames" | "expandable" | "expanded" | "width" | "height">;
366
+ export type LayersContainerOptions = Pick<ConfigOptions, "layerNames" | "expandable" | "expanded"> & ContainerBoxOptions;
361
367
  export interface LayersContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
362
368
  templateName?: ContainerTemplate.Layers;
363
369
  options?: LayersContainerOptions;
@@ -365,7 +371,7 @@ export interface LayersContainerConfig extends Omit<ConfigContainerChild, "optio
365
371
  export interface LayersContainerProps extends Omit<ContainerProps, "elementConfig"> {
366
372
  elementConfig?: LayersContainerConfig;
367
373
  }
368
- export type OneColumnContainerOptions = Pick<ConfigOptions, "attributes" | "useProjectHiddenAttributes" | "hideEmpty" | "innerTemplateStyle" | "width" | "height">;
374
+ export type OneColumnContainerOptions = Pick<ConfigOptions, "attributes" | "useProjectHiddenAttributes" | "hideEmpty" | "innerTemplateStyle"> & ContainerBoxOptions;
369
375
  export interface OneColumnContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
370
376
  templateName?: ContainerTemplate.OneColumn;
371
377
  options?: OneColumnContainerOptions;
@@ -400,7 +406,7 @@ export interface RoundedBackgroundContainerConfig extends Omit<ConfigContainerCh
400
406
  export interface RoundedBackgroundContainerProps extends Omit<ContainerProps, "elementConfig"> {
401
407
  elementConfig?: RoundedBackgroundContainerConfig;
402
408
  }
403
- export type SlideshowContainerOptions = Pick<ConfigOptions, "expandable" | "expanded" | "width" | "height">;
409
+ export type SlideshowContainerOptions = Pick<ConfigOptions, "expandable" | "expanded"> & ContainerBoxOptions;
404
410
  export interface SlideshowContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
405
411
  templateName?: ContainerTemplate.Slideshow;
406
412
  options?: SlideshowContainerOptions;
@@ -421,7 +427,7 @@ export interface TabsContainerConfig extends Omit<ConfigContainerChild, "options
421
427
  export interface TabsContainerProps extends Omit<ContainerProps, "elementConfig"> {
422
428
  elementConfig?: TabsContainerConfig;
423
429
  }
424
- export type TaskContainerOptions = Pick<ConfigOptions, "title" | "relatedResources" | "center" | "icon" | "statusColors" | "responseFilters" | "useNotifications" | "width" | "height">;
430
+ export type TaskContainerOptions = Pick<ConfigOptions, "title" | "relatedResources" | "center" | "icon" | "statusColors" | "responseFilters" | "useNotifications"> & ContainerBoxOptions;
425
431
  export interface TaskContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
426
432
  templateName?: ContainerTemplate.Task;
427
433
  options?: TaskContainerOptions;
@@ -437,7 +443,7 @@ export interface TitleContainerConfig extends Omit<ConfigContainerChild, "option
437
443
  export interface TitleContainerProps extends Omit<ContainerProps, "elementConfig"> {
438
444
  elementConfig?: TitleContainerConfig;
439
445
  }
440
- export type TwoColumnContainerOptions = Pick<ConfigOptions, "attributes" | "useProjectHiddenAttributes" | "hideEmpty" | "innerTemplateStyle" | "width" | "height">;
446
+ export type TwoColumnContainerOptions = Pick<ConfigOptions, "attributes" | "useProjectHiddenAttributes" | "hideEmpty" | "innerTemplateStyle"> & ContainerBoxOptions;
441
447
  export interface TwoColumnContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
442
448
  templateName?: ContainerTemplate.TwoColumn;
443
449
  options?: TwoColumnContainerOptions;
@@ -445,7 +451,7 @@ export interface TwoColumnContainerConfig extends Omit<ConfigContainerChild, "op
445
451
  export interface TwoColumnContainerProps extends Omit<ContainerProps, "elementConfig"> {
446
452
  elementConfig?: TwoColumnContainerConfig;
447
453
  }
448
- export type UploadContainerOptions = Pick<ConfigOptions, "expandable" | "expanded" | "width" | "height">;
454
+ export type UploadContainerOptions = Pick<ConfigOptions, "expandable" | "expanded"> & ContainerBoxOptions;
449
455
  export interface UploadContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
450
456
  templateName?: ContainerTemplate.Upload;
451
457
  options?: UploadContainerOptions;
@@ -8,6 +8,8 @@ export declare const StackBar: FC<{
8
8
  type: WidgetType;
9
9
  alias: ConfigContainerChild;
10
10
  options: ConfigOptions;
11
+ /** fill контейнера: полоса тянется на всю доступную высоту вместо толщины из options.height. */
12
+ fill?: boolean;
11
13
  renderElement: ContainerProps["renderElement"];
12
14
  renderTooltip: (data: PieChartData[]) => ReactElement | string;
13
15
  }>;
@@ -1,8 +1,11 @@
1
- export declare const StackBarContainer: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
1
+ export declare const StackBarContainer: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & {
2
+ $fill?: boolean;
3
+ }, never>;
2
4
  export declare const StackBarHeader: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
3
5
  export declare const StackBarSection: import('styled-components').StyledComponent<"div", any, {
4
6
  $width: string;
5
7
  $height?: string | number;
8
+ $fill?: boolean;
6
9
  $color: string;
7
10
  cornerRadius: number;
8
11
  hasAnyFilter?: boolean;
@@ -21,9 +21,11 @@ export declare const BarChartContainer: import('styled-components').StyledCompon
21
21
  }, never>;
22
22
  export declare const AnyChartWrapper: import('styled-components').StyledComponent<"div", any, {
23
23
  height?: number;
24
+ $fill?: boolean;
24
25
  }, never>;
25
26
  export declare const BarChartWrapper: import('styled-components').StyledComponent<"div", any, {
26
27
  height?: number;
28
+ $fill?: boolean;
27
29
  }, never>;
28
30
  export declare const BarChartFilterHeader: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & {
29
31
  height?: string | number;
@@ -21,6 +21,9 @@ export type AlignItems = (typeof ALIGN_ITEMS)[number];
21
21
  /** Масштабирование изображения внутри своего бокса (CSS `object-fit`). */
22
22
  export declare const OBJECT_FITS: readonly ["cover", "contain", "fill", "none", "scale-down"];
23
23
  export type ObjectFit = (typeof OBJECT_FITS)[number];
24
+ /** Поведение контента, выходящего за бокс контейнера (CSS `overflow`). */
25
+ export declare const OVERFLOWS: readonly ["visible", "hidden", "scroll", "auto"];
26
+ export type Overflow = (typeof OVERFLOWS)[number];
24
27
  /**
25
28
  * CSS-размер контейнера: число — пиксели, строка — любое CSS-значение (`"100%"`, `"24rem"`,
26
29
  * `"calc(100% - 1rem)"`). Значение `"100%"` включает fill-режим — контейнер занимает всю ячейку
@@ -157,6 +160,14 @@ export interface ConfigLayoutOptions {
157
160
  width?: CssSize;
158
161
  /** Высота корневой обёртки контейнера. `"100%"` — заполнить ячейку родителя. */
159
162
  height?: CssSize;
163
+ /**
164
+ * Что делать с контентом, вылезающим за бокс контейнера (CSS `overflow`). Не задана — браузерный
165
+ * дефолт `visible`: контент вытекает и залезает на соседние слоты.
166
+ *
167
+ * Значения кроме `"visible"` обрезают и абсолютно спозиционированных потомков — у контейнера
168
+ * Filters с заданной высотой открытый список фильтра будет обрезан по боксу.
169
+ */
170
+ overflow?: Overflow;
160
171
  padding?: number;
161
172
  radius?: number;
162
173
  cornerRadius?: number;
@@ -1,6 +1,6 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { CSSObject } from 'styled-components';
3
- import { CssSize } from '../types';
3
+ import { CssSize, Overflow } from '../types';
4
4
  /** Размер, при котором контейнер занимает всю ячейку родителя. */
5
5
  export declare const FILL_SIZE = "100%";
6
6
  export interface WrapperSizeParams {
@@ -10,6 +10,8 @@ export interface WrapperSizeParams {
10
10
  width?: CssSize;
11
11
  /** `options.height` контейнера. */
12
12
  height?: CssSize;
13
+ /** `options.overflow` контейнера — что делать с контентом, вылезающим за бокс. */
14
+ overflow?: Overflow;
13
15
  /** Внутренние дефолты обёртки контейнера: отступы, собственная высота и т.п. */
14
16
  defaults?: CSSObject;
15
17
  /** Ширина по умолчанию, если `options.width` не задан. Контейнеры передают `FILL_SIZE`, элементы — нет. */
@@ -26,5 +28,8 @@ export declare const isFillSize: (size?: CssSize) => boolean;
26
28
  * конфликтующие внутренние дефолты обёртки, а контент лишается возможности её распирать
27
29
  * (`min-width`/`min-height: 0`). Для fill-высоты добавляется `flex: 1 1 auto` — в колонке
28
30
  * контейнер забирает остаток ячейки под заголовком, а не переполняет её на его высоту.
31
+ *
32
+ * `overflow` уходит в CSS как есть и ничем не подменяется: не задан — работает браузерный
33
+ * `visible`, то есть контент крупнее бокса вытекает на соседние слоты.
29
34
  */
30
- export declare const getWrapperSizeStyle: ({ style, width: widthOption, height, defaults, defaultWidth, }: WrapperSizeParams) => CSSObject | undefined;
35
+ export declare const getWrapperSizeStyle: ({ style, width: widthOption, height, overflow, defaults, defaultWidth, }: WrapperSizeParams) => CSSObject | undefined;