@evergis/react 4.0.149 → 4.0.151

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.
Files changed (30) hide show
  1. package/dist/components/Dashboard/containers/AttachmentContainer/components/ShowMoreButton.d.ts +3 -0
  2. package/dist/components/Dashboard/containers/AttachmentContainer/styled.d.ts +6 -0
  3. package/dist/components/Dashboard/containers/AttachmentContainer/useAttachmentContainer.d.ts +3 -9
  4. package/dist/components/Dashboard/containers/StructuredDataContainer/types.d.ts +4 -0
  5. package/dist/components/Dashboard/elements/ElementModal/hooks/useModalOpen.d.ts +11 -0
  6. package/dist/components/Dashboard/elements/ElementTable/components/AttachmentsCell.d.ts +4 -1
  7. package/dist/components/Dashboard/elements/ElementTable/components/AttachmentsCellPopup/index.d.ts +10 -0
  8. package/dist/components/Dashboard/elements/ElementTable/components/AttachmentsCellPopup/styled.d.ts +9 -0
  9. package/dist/components/Dashboard/elements/ElementTable/constants.d.ts +12 -0
  10. package/dist/components/Dashboard/elements/ElementTable/hooks/useAttachmentsCell.d.ts +5 -20
  11. package/dist/components/Dashboard/elements/ElementTable/hooks/useAttachmentsCellEdit.d.ts +28 -0
  12. package/dist/components/Dashboard/elements/ElementTable/styled.d.ts +17 -1
  13. package/dist/components/Dashboard/elements/ElementTable/types.d.ts +44 -0
  14. package/dist/components/Dashboard/hooks/index.d.ts +2 -0
  15. package/dist/components/Dashboard/hooks/useAttachmentsView.d.ts +25 -0
  16. package/dist/components/Dashboard/hooks/useConfigDataSources.d.ts +7 -0
  17. package/dist/components/Dashboard/hooks/useWidgetContext.d.ts +1 -0
  18. package/dist/components/Dashboard/types.d.ts +11 -0
  19. package/dist/components/Dashboard/utils/getModalsDataSources.d.ts +6 -0
  20. package/dist/components/Dashboard/utils/index.d.ts +1 -0
  21. package/dist/components/Dashboard/utils/interpolateTranslation.d.ts +8 -0
  22. package/dist/components/Dashboard/utils/sliceShownOtherItems.d.ts +5 -0
  23. package/dist/contexts/DashboardContext/types.d.ts +6 -0
  24. package/dist/contexts/FeatureCardContext/types.d.ts +2 -0
  25. package/dist/index.js +410 -70
  26. package/dist/index.js.map +1 -1
  27. package/dist/react.esm.js +408 -72
  28. package/dist/react.esm.js.map +1 -1
  29. package/package.json +2 -2
  30. package/dist/components/Dashboard/grid/components/GridResizer/styled.d.ts +0 -11
@@ -1,6 +1,9 @@
1
1
  import { FC } from 'react';
2
+ import { IconTypesKeys } from '@evergis/uilib-gl';
2
3
  export interface ShowMoreButtonProps {
3
4
  hiddenCount: number;
5
+ /** Значок после подписи. Поп-ап вложений колонки по макету ставит `expand`. */
6
+ iconKind?: IconTypesKeys;
4
7
  onClick: () => void;
5
8
  }
6
9
  export declare const ShowMoreButton: FC<ShowMoreButtonProps>;
@@ -4,6 +4,12 @@ export declare const AttachmentsContainer: import('styled-components').StyledCom
4
4
  export declare const AttachmentsHeaderRow: import('styled-components').StyledComponent<"div", any, {}, never>;
5
5
  export declare const AttachmentsLabel: import('styled-components').StyledComponent<"div", any, {}, never>;
6
6
  export declare const AttachmentsViewControls: import('styled-components').StyledComponent<"div", any, {}, never>;
7
+ /**
8
+ * Счётчик файлов у подписи — плоский чип в строку подписи.
9
+ *
10
+ * Шрифт ставится на текст чипа, а не на корень: текст задаёт себе шрифт шорткатом `font` из темы,
11
+ * и размер с корня до цифры не доходит — чип выходил высоким, во весь шрифт описания.
12
+ */
7
13
  export declare const AttachmentsCountChip: import('styled-components').StyledComponent<import('react').FC<import('@evergis/uilib-gl').IChipProps>, any, {}, never>;
8
14
  export declare const AttachmentsContent: import('styled-components').StyledComponent<"div", any, {}, never>;
9
15
  export declare const GridListWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,19 +1,13 @@
1
+ import { AttachmentsView } from '../../hooks/useAttachmentsView';
1
2
  import { ConfigContainerChild, WidgetType } from '../../types';
2
- import { Attachment, AttachmentViewMode } from './types';
3
+ import { Attachment } from './types';
3
4
  export interface UseAttachmentContainerProps {
4
5
  type?: WidgetType;
5
6
  elementConfig?: ConfigContainerChild;
6
7
  valueOverride?: unknown;
7
8
  }
8
- export interface UseAttachmentContainerResult {
9
+ export interface UseAttachmentContainerResult extends AttachmentsView {
9
10
  items: Attachment[];
10
- visibleItems: Attachment[];
11
- hiddenCount: number;
12
- hasMore: boolean;
13
- showMore: boolean;
14
- setShowMore: (value: boolean) => void;
15
- viewMode: AttachmentViewMode;
16
- setViewMode: (mode: AttachmentViewMode) => void;
17
11
  attributeName?: string;
18
12
  }
19
13
  export declare const useAttachmentContainer: ({ type, elementConfig, valueOverride, }: UseAttachmentContainerProps) => UseAttachmentContainerResult;
@@ -39,6 +39,10 @@ export interface StructuredDataAttribute {
39
39
  colorPicker?: boolean;
40
40
  /** Стиль значений колонки из конфига. */
41
41
  style?: CSSProperties;
42
+ /** Папка каталога, куда уходит файл, загруженный с диска в колонку вложений. */
43
+ parentResourceId?: string;
44
+ /** Что разрешено выбирать в диалоге файлов колонки вложений — значение `accept`. */
45
+ fileExtensions?: string;
42
46
  }
43
47
  /**
44
48
  * Значение {@link StructuredDataContext} — всё, что нужно представлению (`ElementTable`)
@@ -0,0 +1,11 @@
1
+ import { WidgetType } from '../../../types';
2
+ /**
3
+ * Видимость диалога модалки. Флаг локальный: у одного `modalId` бывает несколько кнопок (слот
4
+ * `modal` в строках `DataSource`), и общий флаг открыл бы все диалоги сразу. Хост узнаёт об
5
+ * открытии и закрытии через `onModalToggle` — чтобы грузить `dataSources` модалки только пока она открыта.
6
+ */
7
+ export declare const useModalOpen: (type: WidgetType, modalId?: string) => {
8
+ isOpen: boolean;
9
+ handleOpen: () => void;
10
+ handleClose: () => void;
11
+ };
@@ -1,9 +1,12 @@
1
1
  import { FC } from 'react';
2
2
  import { TableCellProps } from '../types';
3
3
  /**
4
- * Колонка со вложениями: список файлов прямо в ячейке.
4
+ * Колонка со вложениями.
5
5
  *
6
6
  * Тип у атрибута строковый, вложениями его делает `subType: "Attachments"` в схеме контейнера —
7
7
  * поэтому ветка стоит раньше разбора типа и обычных редакторов ячейки.
8
+ *
9
+ * Сама ячейка показывает один файл, а несколько схлопывает в строку со значком ссылки
10
+ * и счётчиком: в ширину колонки список файлов не помещается. Весь список живёт в поп-апе.
8
11
  */
9
12
  export declare const AttachmentsCell: FC<TableCellProps>;
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { AttachmentsCellPopupProps } from '../../types';
3
+ /**
4
+ * Полный список вложений колонки — тот же набор, что у контейнера вложений в карточке объекта:
5
+ * шапка с подписью, счётчиком и переключателем вида, сам список, «Показать ещё» и добавление.
6
+ *
7
+ * Кнопка добавления и корзины у файлов появляются только на правку: на чтение поп-ап нужен
8
+ * ровно затем, чтобы развернуть свёрнутый счётчик.
9
+ */
10
+ export declare const AttachmentsCellPopup: FC<AttachmentsCellPopupProps>;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Вложения ячейки в поп-апе. Ширина своя, а не по ячейке: колонка таблицы бывает узкой,
3
+ * а внутри стоит полный список вложений с плиткой и кнопкой добавления.
4
+ *
5
+ * Список взят у контейнера вложений карточки, а величины у поп-апа свои, с макета: имя файла
6
+ * крупнее и ссылочного цвета, значок в строку имени, «Показать ещё» серое. Переопределены они
7
+ * здесь, а не в самих компонентах, чтобы вложения в карточке объекта остались как были.
8
+ */
9
+ export declare const AttachmentsPopupBox: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -23,3 +23,15 @@ export declare const MIN_COLUMN_WIDTH = 48;
23
23
  * без валидной строки не собрать.
24
24
  */
25
25
  export declare const DEFAULT_CELL_COLOR = "#000000";
26
+ /**
27
+ * Сколько вложений ячейка показывает сама. Больше — все схлопываются в одну строку со значком
28
+ * ссылки и счётчиком: колонка в таблице узкая, и списком там помещается ровно один файл.
29
+ */
30
+ export declare const ATTACHMENTS_INLINE_LIMIT = 1;
31
+ /**
32
+ * Сколько файлов видно в поп-апе вложений сразу, остальные прячутся за «Показать ещё N».
33
+ * Величина с макета и опцией не выносится: поп-ап у колонки один на все таблицы.
34
+ */
35
+ export declare const ATTACHMENTS_SHOWN_ITEMS = 3;
36
+ /** Вид списка, с которого поп-ап вложений открывается. */
37
+ export declare const ATTACHMENTS_VIEW_MODE: "list";
@@ -1,26 +1,11 @@
1
- import { IPreviewImage } from '@evergis/uilib-gl';
2
- import { Attachment } from '../../../containers/AttachmentContainer/types';
3
- import { TableCellProps } from '../types';
1
+ import { AttachmentsCellState, TableCellProps } from '../types';
4
2
  /**
5
- * Ячейка с вложениями: разбор значения, просмотр, скачивание и правка списка.
3
+ * Колонка вложений: разбор значения, свёрнутый вид ячейки и полный список в поп-апе.
6
4
  *
7
5
  * Значение атрибута — строка: файлы приезжают в ней списком JSON, поэтому и обратно в черновик
8
6
  * кладём строку, а не массив — иначе тип ячейки менялся бы от самой правки.
9
7
  *
10
- * Добавление здесь только по ссылке. Загрузка с диска требует ресурса-родителя и файлового
11
- * api контейнера вложений, а у колонки таблицы ни того, ни другого нет.
8
+ * Ячейка показывает один файл, а несколько схлопывает в счётчик, и весь список с добавлением
9
+ * и удалением живёт в поп-апе тот же набор, что у контейнера вложений в карточке объекта.
12
10
  */
13
- export declare const useAttachmentsCell: ({ attribute, row, canEdit, onChange }: TableCellProps) => {
14
- items: Attachment[];
15
- editable: boolean;
16
- previewIndex: number;
17
- previewImages: IPreviewImage[];
18
- isLinkDialogOpen: boolean;
19
- onPreview: (link: string) => void;
20
- onClosePreview: () => void;
21
- onDownload: (_image: IPreviewImage, index: number) => void;
22
- onDelete: (link: string) => void;
23
- onOpenLinkDialog: () => void;
24
- onCloseLinkDialog: () => void;
25
- onAddByLink: (url: string) => void;
26
- };
11
+ export declare const useAttachmentsCell: ({ attribute, row, canEdit, onChange, }: TableCellProps) => AttachmentsCellState;
@@ -0,0 +1,28 @@
1
+ import { Attachment } from '../../../containers/AttachmentContainer/types';
2
+ import { StructuredDataAttribute } from '../../../containers/StructuredDataContainer/types';
3
+ export interface UseAttachmentsCellEditParams {
4
+ attribute: StructuredDataAttribute;
5
+ items: Attachment[];
6
+ /** Запись нового списка в черновик строки. */
7
+ persist: (next: Attachment[]) => void;
8
+ }
9
+ /**
10
+ * Добавление и удаление файлов в колонке вложений.
11
+ *
12
+ * Все три источника — диск, каталог ресурсов и ссылка — те же, что у контейнера вложений
13
+ * в карточке объекта: файловое api берётся из глобального контекста, диалог каталога выдаёт
14
+ * виджету приложение, а ссылка разбирается по адресу.
15
+ *
16
+ * Папку-приёмник загрузки задаёт сам атрибут: у колонки нет узла-элемента с опциями, зато
17
+ * колонок вложений в таблице может быть несколько, и складывать их файлы в одно место незачем.
18
+ */
19
+ export declare const useAttachmentsCellEdit: ({ attribute, items, persist }: UseAttachmentsCellEditParams) => {
20
+ accept: string;
21
+ isLinkDialogOpen: boolean;
22
+ onDelete: (link: string) => void;
23
+ onUpload: (files: File[]) => Promise<void>;
24
+ onSelectFromCatalog: () => void;
25
+ onOpenLinkDialog: () => void;
26
+ onCloseLinkDialog: () => void;
27
+ onAddByLink: (url: string) => void;
28
+ };
@@ -104,7 +104,23 @@ export declare const CellField: import('styled-components').StyledComponent<"div
104
104
  * Отступы те же, что у текстовой ячейки (`CellText`): в одном ряду с обычными колонками значения
105
105
  * обязаны стоять на одной линии.
106
106
  */
107
- export declare const AttachmentsCellBox: import('styled-components').StyledComponent<"div", any, {}, never>;
107
+ export declare const AttachmentsCellBox: import('styled-components').StyledComponent<"div", any, {
108
+ $interactive?: boolean;
109
+ }, never>;
110
+ /**
111
+ * Значок файла в ячейке. Тот же, что в списке вложений, только с макетную величину строки
112
+ * таблицы: в контейнере строка свободнее и значок там крупнее.
113
+ */
114
+ export declare const AttachmentsCellIcon: import('styled-components').StyledComponent<"div", any, {
115
+ fileType?: import('../../containers/AttachmentContainer/types').FileType;
116
+ }, never>;
117
+ /**
118
+ * Подпись файла или счётчика свёрнутых. Ссылочная: по ней и кликают — одиночный файл открывает
119
+ * галерею, счётчик разворачивает список.
120
+ */
121
+ export declare const AttachmentsCellLabel: import('styled-components').StyledComponent<"div", any, {}, never>;
122
+ /** Значок ссылки у счётчика свёрнутых файлов — в цвет подписи. */
123
+ export declare const AttachmentsCellLinkIcon: import('styled-components').StyledComponent<"span", any, import('@evergis/uilib-gl').IIconProps, never>;
108
124
  /**
109
125
  * Ячейка цвета: плашка или палитра слева, значение справа.
110
126
  *
@@ -1,4 +1,6 @@
1
+ import { IPreviewImage } from '@evergis/uilib-gl';
1
2
  import { FeatureAttributeValue } from '../../../../types';
3
+ import { Attachment, AttachmentViewMode } from '../../containers/AttachmentContainer/types';
2
4
  import { DraftRow, StructuredDataAttribute } from '../../containers/StructuredDataContainer/types';
3
5
  export type SortDirection = "asc" | "desc";
4
6
  /**
@@ -35,3 +37,45 @@ export interface TableHeadRowProps {
35
37
  onSortToggle: (attributeName: string) => void;
36
38
  onColumnResize: (widths: number[]) => void;
37
39
  }
40
+ /**
41
+ * Состояние колонки вложений: разобранный список файлов, вид поп-апа и все действия над ними.
42
+ *
43
+ * Собирается одним хуком и целиком уходит в поп-ап: ячейка показывает свёрнутый вид, а полный
44
+ * список с добавлением и удалением живёт в поп-апе, и оба обязаны смотреть на одни данные.
45
+ */
46
+ export interface AttachmentsCellState {
47
+ items: Attachment[];
48
+ /** Файлы, видимые в поп-апе сейчас: до «Показать ещё» — только первые. */
49
+ visibleItems: Attachment[];
50
+ /** Правка разрешена и режимом таблицы, и самим атрибутом. */
51
+ editable: boolean;
52
+ viewMode: AttachmentViewMode;
53
+ setViewMode: (mode: AttachmentViewMode) => void;
54
+ hasMore: boolean;
55
+ hiddenCount: number;
56
+ onShowMore: VoidFunction;
57
+ /** Что разрешено выбирать в диалоге файлов — из настроек атрибута. */
58
+ accept?: string;
59
+ isPopupOpen: boolean;
60
+ onClosePopup: VoidFunction;
61
+ /** Клик по самой ячейке: правка открывает поп-ап, чтение — галерею либо тот же поп-ап. */
62
+ onCellClick: VoidFunction;
63
+ previewIndex: number | null;
64
+ previewImages: IPreviewImage[];
65
+ isLinkDialogOpen: boolean;
66
+ onPreview: (link: string) => void;
67
+ onClosePreview: VoidFunction;
68
+ onDownload: (image: IPreviewImage, index: number) => void;
69
+ onDelete: (link: string) => void;
70
+ onUpload: (files: File[]) => void;
71
+ /** Нет — выбор из каталога виджету не выдан, и пункт меню недоступен. */
72
+ onSelectFromCatalog?: VoidFunction;
73
+ onOpenLinkDialog: VoidFunction;
74
+ onCloseLinkDialog: VoidFunction;
75
+ onAddByLink: (url: string) => void;
76
+ }
77
+ export interface AttachmentsCellPopupProps {
78
+ /** Подпись колонки: в шапке поп-апа она стоит там же, где подпись контейнера вложений. */
79
+ alias: string;
80
+ state: AttachmentsCellState;
81
+ }
@@ -1,6 +1,7 @@
1
1
  export * from './useAttachmentDownload';
2
2
  export * from './useAttachmentItems';
3
3
  export * from './useAttachmentPreviewImages';
4
+ export * from './useAttachmentsView';
4
5
  export * from './useAutoCompleteControl';
5
6
  export * from './useBgImageHost';
6
7
  export * from './useContainerAttributes';
@@ -10,6 +11,7 @@ export * from './useFetchImageWithAuth';
10
11
  export * from './useFetchWithAuth';
11
12
  export * from './useChartChange';
12
13
  export * from './useChartData';
14
+ export * from './useConfigDataSources';
13
15
  export * from './useDashboardHeader';
14
16
  export * from './useDataSourceLoading';
15
17
  export * from './useDataSources';
@@ -0,0 +1,25 @@
1
+ import { Attachment, AttachmentViewMode } from '../containers/AttachmentContainer/types';
2
+ export interface UseAttachmentsViewParams {
3
+ items: Attachment[];
4
+ /** Сколько файлов показывать сразу. Не задан — показываются все. */
5
+ limit?: number;
6
+ /** Вид списка при открытии. */
7
+ initialViewMode?: AttachmentViewMode;
8
+ }
9
+ export interface AttachmentsView {
10
+ visibleItems: Attachment[];
11
+ hiddenCount: number;
12
+ hasMore: boolean;
13
+ showMore: boolean;
14
+ setShowMore: (value: boolean) => void;
15
+ viewMode: AttachmentViewMode;
16
+ setViewMode: (mode: AttachmentViewMode) => void;
17
+ }
18
+ /**
19
+ * Вид списка вложений: плитка или строки и сколько файлов из списка показано.
20
+ *
21
+ * Общий для контейнера вложений и колонки таблицы: список у них один и тот же, и считать
22
+ * видимое дважды незачем. Предел приходит числом, а не опциями конфига, — у колонки опций
23
+ * вида нет, он у неё зашит константой.
24
+ */
25
+ export declare const useAttachmentsView: ({ items, limit, initialViewMode, }: UseAttachmentsViewParams) => AttachmentsView;
@@ -0,0 +1,7 @@
1
+ import { ConfigDataSource, WidgetType } from '../types';
2
+ /**
3
+ * Конфиги всех источников, доступных контейнерам виджета: страница с корнем и все модалки.
4
+ * Одноимённый источник модалки перекрывается страничным. Только для поиска по имени — в конфиг
5
+ * страницы не пишется: `currentPage` сохраняется обратно целиком, и модальные источники осели бы в нём.
6
+ */
7
+ export declare const useConfigDataSources: (type?: WidgetType) => ConfigDataSource[];
@@ -37,6 +37,7 @@ 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
+ onModalToggle: (modalId: string, isOpen: boolean) => void;
40
41
  isLoading: boolean;
41
42
  pageIndex: number;
42
43
  filters: import('../types').SelectedFilters;
@@ -528,6 +528,16 @@ export interface ConfigAttributeDescription {
528
528
  * у колонки нет, поэтому стиль живёт прямо у описания атрибута.
529
529
  */
530
530
  style?: CSSProperties;
531
+ /**
532
+ * Куда складывать файлы, загруженные с диска в колонку вложений (`subType: "Attachments"`) —
533
+ * id папки каталога. Не задан — файл уходит в корень.
534
+ */
535
+ parentResourceId?: string;
536
+ /**
537
+ * Что разрешено выбирать в диалоге файлов у колонки вложений — значение атрибута `accept`
538
+ * (`".pdf,.jpg"` либо `"image/*"`). Не задан — ограничений нет.
539
+ */
540
+ fileExtensions?: string;
531
541
  }
532
542
  export interface ConfigDataSource {
533
543
  name: string;
@@ -695,6 +705,7 @@ export type ConfigModalContentItem = ConfigContainerChild | ConfigModalContentRe
695
705
  export interface ConfigModal {
696
706
  id: string;
697
707
  options?: ConfigModalOptions;
708
+ dataSources?: ConfigDataSource[];
698
709
  children: ConfigModalContentItem[];
699
710
  }
700
711
  export interface ConfigContainerHeader {
@@ -0,0 +1,6 @@
1
+ import { ConfigContainer, ConfigDataSource } from '../types';
2
+ /**
3
+ * Источники модалок конфига (`config.modals[].dataSources`) без дублей по имени — выигрывает первый.
4
+ * Без `modalIds` — источники всех модалок, иначе только перечисленных.
5
+ */
6
+ export declare const getModalsDataSources: (config?: ConfigContainer, modalIds?: string[]) => ConfigDataSource[];
@@ -39,6 +39,7 @@ export * from './getFilterComponent';
39
39
  export * from './getFilterSelectedItems';
40
40
  export * from './getFilterValue';
41
41
  export * from './getMapViewDataSources';
42
+ export * from './getModalsDataSources';
42
43
  export * from './getFormattedAttributes';
43
44
  export * from './getImageUrl';
44
45
  export * from './getLayerInfo';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Подставляет в строку перевода переменные вида `{{total}}` — так, как это делает i18next.
3
+ *
4
+ * Нужна запасному переводчику, когда хост не передал свой `t` (например, в Storybook): без неё
5
+ * `defaultValue` с переменными уходит в интерфейс как есть. Переменная без значения остаётся
6
+ * в тексте, чтобы пропуск был виден.
7
+ */
8
+ export declare const interpolateTranslation: (text: string, values?: Record<string, unknown>) => string;
@@ -1,2 +1,7 @@
1
1
  import { ConfigOptions } from '../types';
2
+ /**
3
+ * Сколько элементов показывать сразу. Заданы обе опции — выигрывает меньшая, не задана ни одна —
4
+ * предела нет и список показывается целиком.
5
+ */
6
+ export declare const getShownItemsLimit: ({ shownItems, otherItems }?: ConfigOptions) => number | undefined;
2
7
  export declare const sliceShownOtherItems: <T extends unknown[]>(data: T, options?: ConfigOptions, showMore?: boolean) => T;
@@ -21,6 +21,12 @@ export type DashboardContextProps = PropsWithChildren<{
21
21
  * лежит внутри — применяется как `replaceObject(config, { id }, next)`.
22
22
  */
23
23
  onContainerChange?: (config: ConfigContainerChild) => void;
24
+ /**
25
+ * Модалка `config.modals[].id` открылась или закрылась — хост грузит её `dataSources`, пока она
26
+ * открыта. Видимостью диалога управляет сам `ElementModal`: у одного `modalId` бывает несколько
27
+ * кнопок (слот `modal` в строках `DataSource`), общий флаг открыл бы все диалоги сразу.
28
+ */
29
+ onModalToggle?: (modalId: string, isOpen: boolean) => void;
24
30
  filters?: SelectedFilters;
25
31
  dashboardLayers?: DashboardState["layers"];
26
32
  setDashboardLayer?: (props: DashboardLayerPayload) => void;
@@ -13,6 +13,8 @@ export type FeatureCardContextSettings = PropsWithChildren<{
13
13
  editMode?: boolean;
14
14
  /** Контейнер изменил собственный конфиг — см. одноимённый проп `DashboardProvider`. */
15
15
  onContainerChange?: (config: ConfigContainerChild) => void;
16
+ /** Модалка открылась или закрылась — см. одноимённый проп `DashboardProvider`. */
17
+ onModalToggle?: (modalId: string, isOpen: boolean) => void;
16
18
  isFeatureEditable?: boolean;
17
19
  hasCopyRights?: boolean;
18
20
  editOnly?: boolean;