@evergis/react 4.0.132 → 4.0.134

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 (37) hide show
  1. package/dist/components/Dashboard/componentTypes.d.ts +1 -1
  2. package/dist/components/Dashboard/components/ContainerBackground/constants.d.ts +15 -0
  3. package/dist/components/Dashboard/components/ContainerBackground/index.d.ts +15 -0
  4. package/dist/components/Dashboard/components/ContainerBackground/styled.d.ts +42 -0
  5. package/dist/components/Dashboard/components/ContainerBackground/types.d.ts +2 -0
  6. package/dist/components/Dashboard/components/index.d.ts +1 -0
  7. package/dist/components/Dashboard/constants.d.ts +16 -0
  8. package/dist/components/Dashboard/containers/AttachmentContainer/styled.d.ts +2 -1
  9. package/dist/components/Dashboard/containers/IconContainer/styled.d.ts +2 -1
  10. package/dist/components/Dashboard/containers/ProgressContainer/styled.d.ts +2 -1
  11. package/dist/components/Dashboard/containers/RoundedBackgroundContainer/styled.d.ts +2 -1
  12. package/dist/components/Dashboard/containers/StructuredDataContainer/hooks/useStructuredData.d.ts +3 -1
  13. package/dist/components/Dashboard/containers/StructuredDataContainer/styled.d.ts +9 -7
  14. package/dist/components/Dashboard/containers/StructuredDataContainer/types.d.ts +7 -1
  15. package/dist/components/Dashboard/containers/TabsContainer/styled.d.ts +2 -1
  16. package/dist/components/Dashboard/grid/utils/gridTracks.d.ts +2 -2
  17. package/dist/components/Dashboard/grid/utils/gridTree.d.ts +2 -2
  18. package/dist/components/Dashboard/headers/FeatureCardSlideshowHeader/styled.d.ts +0 -1
  19. package/dist/components/Dashboard/hooks/index.d.ts +1 -0
  20. package/dist/components/Dashboard/hooks/useBgImageHost.d.ts +12 -0
  21. package/dist/components/Dashboard/hooks/useFetchImageWithAuth.d.ts +9 -0
  22. package/dist/components/Dashboard/hooks/useWrapperSize.d.ts +6 -1
  23. package/dist/components/Dashboard/styled/common.d.ts +7 -0
  24. package/dist/components/Dashboard/{styled.d.ts → styled/containers.d.ts} +3 -32
  25. package/dist/components/Dashboard/styled/dashboard.d.ts +11 -0
  26. package/dist/components/Dashboard/styled/index.d.ts +16 -0
  27. package/dist/components/Dashboard/styled/presentation.d.ts +15 -0
  28. package/dist/components/Dashboard/types.d.ts +28 -0
  29. package/dist/components/Dashboard/utils/getResourceUrl.d.ts +10 -0
  30. package/dist/components/Dashboard/utils/hasContainerBgImage.d.ts +8 -0
  31. package/dist/components/Dashboard/utils/index.d.ts +2 -0
  32. package/dist/components/Dashboard/utils/isCrossOriginUrl.d.ts +15 -0
  33. package/dist/index.js +2972 -2695
  34. package/dist/index.js.map +1 -1
  35. package/dist/react.esm.js +2967 -2696
  36. package/dist/react.esm.js.map +1 -1
  37. package/package.json +2 -2
@@ -109,7 +109,7 @@ export interface ElementSvgProps extends Omit<ContainerProps, "elementConfig"> {
109
109
  layerInfo?: QueryLayerServiceInfoDc;
110
110
  attributes?: ClientFeatureAttribute[];
111
111
  }
112
- export type ElementTableOptions = Pick<ConfigOptions, "sort" | "width" | "height">;
112
+ export type ElementTableOptions = Pick<ConfigOptions, "sort" | "editOnly" | "width" | "height">;
113
113
  export interface ElementTableConfig extends Omit<ConfigContainerChild, "options" | "type"> {
114
114
  type?: "table";
115
115
  options?: ElementTableOptions;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Внутренний отступ корня контейнера при `options.innerPadding`.
3
+ *
4
+ * Значение фиксировано намеренно: опция булева, автор конфига включает «отступ от краёв фона»,
5
+ * а не подбирает число — для произвольного отступа есть `options.padding`.
6
+ */
7
+ export declare const CONTAINER_INNER_PADDING = "1rem";
8
+ /**
9
+ * Вылет слоя `bgImage` за края контейнера при `options.outflow` — по бокам и вверх.
10
+ *
11
+ * Ровно `padding` карточки контейнера (`ContainerWrapper` в `Dashboard/styled/containers.ts`): картинка
12
+ * дотягивается до краёв колонки дашборда, а содержимое остаётся на месте. Вниз слой не
13
+ * вытекает — там начинается следующий контейнер.
14
+ */
15
+ export declare const BG_IMAGE_OUTFLOW = "1.5rem";
@@ -0,0 +1,15 @@
1
+ import { FC } from 'react';
2
+ import { ContainerBackgroundProps } from './types';
3
+ /**
4
+ * Фоновое изображение контейнера — универсальный слот `bgImage`.
5
+ *
6
+ * Ставится первым ребёнком корня контейнера; корень обязан быть хостом слоя
7
+ * (`bgImageHostMixin` + проп `$hasBgImage`, у контейнеров на `useContainerRoot` он приходит
8
+ * готовым в `root`).
9
+ *
10
+ * Слота нет в конфиге — в DOM не появляется ничего: ни обёртки, ни пустого слоя.
11
+ *
12
+ * `options.outflow` читает слой, а не хост: вылет за края — свойство картинки, а раскладка
13
+ * контейнера от него не меняется.
14
+ */
15
+ export declare const ContainerBackground: FC<ContainerBackgroundProps>;
@@ -0,0 +1,42 @@
1
+ /** Признак того, что узел несёт слот `bgImage` и его корень становится хостом фонового слоя. */
2
+ export interface BgImageHostProps {
3
+ $hasBgImage?: boolean;
4
+ /** `options.innerPadding`: фиксированный внутренний отступ корня — содержимое не липнет к краям фона. */
5
+ $innerPadding?: boolean;
6
+ }
7
+ /** Пропсы самого слоя фона — в отличие от хоста, `options.outflow` читает только он. */
8
+ export interface BgImageLayerProps {
9
+ $outflow?: boolean;
10
+ }
11
+ /**
12
+ * Слой фонового изображения контейнера: единственный ребёнок, который рисуется ПОД содержимым.
13
+ *
14
+ * `z-index: -1` работает только внутри собственного stacking-контекста хоста (`isolation: isolate`
15
+ * в `bgImageHostMixin`): там отрицательный слой ложится поверх фона хоста, но под его контентом.
16
+ * Без изоляции он ушёл бы под фон ближайшего предка-контекста и пропал.
17
+ *
18
+ * `border-radius: inherit` повторяет скругление хоста, `pointer-events: none` оставляет клики
19
+ * содержимому.
20
+ *
21
+ * `options.outflow` растягивает слой отрицательным `inset` — раскладка хоста при этом не
22
+ * меняется: слой абсолютный, содержимое остаётся в своих границах, вытекает только картинка.
23
+ * Вылет идёт по бокам и вверх, но НЕ вниз: снизу картинка обязана заканчиваться по краю
24
+ * контейнера, иначе она наползала бы на следующий контейнер колонки.
25
+ */
26
+ export declare const ContainerBackgroundLayer: import('styled-components').StyledComponent<"div", any, BgImageLayerProps, never>;
27
+ /**
28
+ * Хост фонового слоя: корень контейнера, у которого в конфиге есть слот `bgImage`.
29
+ *
30
+ * Гейт по `$hasBgImage` принципиален — `position: relative` меняет containing block для
31
+ * абсолютно позиционированных потомков (контролы слайдшоу, подписи прогресса), поэтому
32
+ * включается только там, где автор конфига действительно попросил фон.
33
+ *
34
+ * `$innerPadding` (`options.innerPadding`) — отдельный гейт: отступ содержимого нужен и без
35
+ * фона, поэтому он не привязан к `$hasBgImage`. `&&` поднимает специфичность до двух классов,
36
+ * чтобы перебить `padding` из `$sizeCss` и собственных `defaults` контейнера; авторский inline
37
+ * `style` по-прежнему сильнее — как и задумано.
38
+ *
39
+ * Модуль намеренно листовой: его импортирует `Dashboard/styled/containers.ts`, и обратная зависимость
40
+ * замкнула бы цикл, уронив миксин в TDZ на инициализации.
41
+ */
42
+ export declare const bgImageHostMixin: import('styled-components').FlattenInterpolation<import('styled-components').ThemedStyledProps<BgImageHostProps, any>>;
@@ -0,0 +1,2 @@
1
+ import { ContainerProps } from '../../types';
2
+ export type ContainerBackgroundProps = Pick<ContainerProps, "elementConfig" | "renderElement">;
@@ -2,6 +2,7 @@ export * from './AddButton/styled';
2
2
  export * from './AddFeatureButton';
3
3
  export * from './Chart';
4
4
  export * from './ChartLegend';
5
+ export * from './ContainerBackground';
5
6
  export * from './ContainerChildren';
6
7
  export * from './Dashboard';
7
8
  export * from './Dashboard/components/DashboardLoading';
@@ -11,6 +11,22 @@ export declare const CONFIG_PAGE_ID = "page";
11
11
  * `grid-template-*`, иначе слот заголовка съест трек и раскладка съедет.
12
12
  */
13
13
  export declare const TITLE_SLOT_IDS: string[];
14
+ /**
15
+ * Универсальный slot-id фонового изображения контейнера.
16
+ *
17
+ * Допустим у любого контейнера, кроме `Divider`, и поэтому не перечисляется в наборах слотов —
18
+ * ровно как слоты заголовка. Узел рисуется отдельным слоем `ContainerBackgroundLayer`
19
+ * (см. `ContainerBackground`), а не через общий рендер детей.
20
+ */
21
+ export declare const BG_IMAGE_SLOT_ID = "bgImage";
22
+ /**
23
+ * Slot-id, которые контейнер читает по `id` сам и не отдаёт ни в общий рендер тела
24
+ * (`ContainerChildren`), ни в треки сетки (`gridTracks`/`gridTree`).
25
+ *
26
+ * Без `bgImage` в этом наборе фон группы отрисовался бы дважды: слоем и обычным ребёнком —
27
+ * а в сетке ещё и съел бы трек.
28
+ */
29
+ export declare const NON_TRACK_SLOT_IDS: string[];
14
30
  export declare const DEFAULT_PAGES_CONFIG: ConfigContainerChild;
15
31
  export declare const DEFAULT_DASHBOARD_CONFIG: ConfigContainer;
16
32
  export declare const FEATURE_CARD_OTHER_COLOR = "#D4DADD";
@@ -1,5 +1,6 @@
1
+ import { ContainerRootProps } from '../../styled';
1
2
  import { FileType } from './types';
2
- export declare const AttachmentsContainer: import('styled-components').StyledComponent<"div", any, {}, never>;
3
+ export declare const AttachmentsContainer: import('styled-components').StyledComponent<"div", any, ContainerRootProps, never>;
3
4
  export declare const AttachmentsHeaderRow: import('styled-components').StyledComponent<"div", any, {}, never>;
4
5
  export declare const AttachmentsLabel: import('styled-components').StyledComponent<"div", any, {}, never>;
5
6
  export declare const AttachmentsViewControls: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,4 +1,5 @@
1
- export declare const IconContainerWrapper: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
1
+ import { ContainerRootProps } from '../../styled';
2
+ export declare const IconContainerWrapper: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & ContainerRootProps, never>;
2
3
  export declare const IconContainerHeaderWrapper: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
3
4
  export declare const IconContainerHeader: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
4
5
  export declare const IconContainerTitle: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
@@ -1,4 +1,5 @@
1
- export declare const ProgressContainerWrapper: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
1
+ import { ContainerRootProps } from '../../styled';
2
+ export declare const ProgressContainerWrapper: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & ContainerRootProps, never>;
2
3
  export declare const ProgressIcon: import('styled-components').StyledComponent<"div", any, {}, never>;
3
4
  export declare const ProgressContent: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
4
5
  export declare const ProgressAlias: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
@@ -1,10 +1,11 @@
1
+ import { ContainerRootProps } from '../../styled';
1
2
  export declare const ContainerIconValue: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
2
3
  /**
3
4
  * Обёртка иконки плитки. Собственный styled нужен, чтобы до иконки можно было дотянуться стилями:
4
5
  * сам элемент рисуют ElementIcon/ElementSvg своими компонентами, а обёртка принадлежит контейнеру.
5
6
  */
6
7
  export declare const ContainerIconWrapper: import('styled-components').StyledComponent<"span", any, import('@evergis/uilib-gl').FlexSpanProps, never>;
7
- export declare const RoundedBackgroundContainerWrapper: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & {
8
+ export declare const RoundedBackgroundContainerWrapper: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & ContainerRootProps & {
8
9
  $center?: boolean;
9
10
  $color?: string;
10
11
  $bgColor?: string;
@@ -4,7 +4,8 @@ import { StructuredDataContextValue } from '../types';
4
4
  * Оркестратор контейнера: собирает схему, черновик и запись в одно состояние экрана.
5
5
  *
6
6
  * Правку открывает `options.editMode`: не задан или `false` — таблица целиком на чтение, без
7
- * редакторов ячеек, добавления, удаления и кнопок сохранения.
7
+ * редакторов ячеек, добавления, удаления и кнопок сохранения. Состав строк закрывается отдельно:
8
+ * с `editOnly` у представления правка ячеек остаётся, а добавление и удаление уходят.
8
9
  *
9
10
  * Вид источника на права правки не влияет — от него зависит только адресат «Сохранить». Слой
10
11
  * принимает запись через features-API, источник без `layerName` (EQL, python-скрипт, внешний
@@ -21,6 +22,7 @@ export declare const useStructuredData: (type: WidgetType, elementConfig?: Struc
21
22
  loading: boolean;
22
23
  hasError: boolean;
23
24
  canEdit: boolean;
25
+ canAdd: boolean;
24
26
  isDeleteConfirmOpen: boolean;
25
27
  isDeletingSourceRow: boolean;
26
28
  onAddRow: () => void;
@@ -1,16 +1,18 @@
1
- /**
2
- * Панель действий: добавление строки слева, запись и откат — справа.
3
- *
4
- * Вторая группа прижимается к краю собственным `margin-left: auto`, а не раскладкой панели:
5
- * родительский `Container` в режиме колонки перебивает выравнивание своих детей
6
- * (`&&& > * { justify-content: flex-start }`), и `justify-content` здесь не сработал бы.
7
- */
1
+ /** Панель действий: добавление строки слева, запись и откат — справа. */
8
2
  export declare const StructuredDataToolbar: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
9
3
  /**
10
4
  * Группа кнопок панели. `width: auto` обязателен: базовый `Flex` растянут на 100%, и две
11
5
  * такие группы делили бы панель пополам — правая начиналась бы из середины вместо края.
12
6
  */
13
7
  export declare const StructuredDataActions: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
8
+ /**
9
+ * Откат и запись. К правому краю их прижимает собственный `margin-left: auto`, а не раскладка
10
+ * панели: родительский `Container` в режиме колонки перебивает выравнивание своих детей
11
+ * (`&&& > * { justify-content: flex-start }`), и `justify-content` здесь не сработал бы. Отступ
12
+ * на самой группе, а не на соседе слева, — тогда пара стоит справа и без кнопки добавления
13
+ * (`editOnly` у представления).
14
+ */
15
+ export declare const StructuredDataSaveActions: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
14
16
  /**
15
17
  * Область представления. Прокручивается внутри себя, чтобы длинная таблица не растягивала
16
18
  * контейнер за пределы отведённой ему ячейки; `min-height: 0` разрешает flex-ребёнку сжиматься.
@@ -38,9 +38,15 @@ export interface StructuredDataContextValue {
38
38
  loading: boolean;
39
39
  /**
40
40
  * Правка разрешена конфигом (`options.editMode`). Без неё представление показывает значения
41
- * только на чтение: редакторов в ячейках нет, как и удаления строк.
41
+ * только на чтение: редакторов в ячейках нет.
42
42
  */
43
43
  canEdit: boolean;
44
+ /**
45
+ * Удаление строк разрешено: правка открыта и представление не помечено `editOnly`. Опция
46
+ * объявлена у представления, но разбирает её контейнер — он же рисует парную ей кнопку
47
+ * добавления (см. `useStructuredData`).
48
+ */
49
+ canDelete: boolean;
44
50
  onCellChange: (key: string, attributeName: string, value: FeatureAttributeValue) => void;
45
51
  onRowDelete: (key: string) => void;
46
52
  }
@@ -1,3 +1,4 @@
1
+ import { ContainerRootProps } from '../../styled';
1
2
  export declare const TabAnchor: import('styled-components').StyledComponent<"div", any, {}, never>;
2
3
  export declare const TabValue: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
3
4
  export declare const TabContainer: import('styled-components').StyledComponent<"a", any, {
@@ -9,4 +10,4 @@ export declare const TabContainer: import('styled-components').StyledComponent<"
9
10
  column?: boolean;
10
11
  onlyIcon?: boolean;
11
12
  }, never>;
12
- export declare const SwiperContainer: import('styled-components').StyledComponent<"div", any, {}, never>;
13
+ export declare const SwiperContainer: import('styled-components').StyledComponent<"div", any, ContainerRootProps, never>;
@@ -3,8 +3,8 @@ import { GridAxis } from '../types';
3
3
  /**
4
4
  * Дети, которые реально становятся треками.
5
5
  *
6
- * `ContainerChildren` не рендерит слоты заголовка, поэтому и в `grid-template-*` их быть не
7
- * должно — иначе треков окажется больше, чем ячеек, и раскладка съедет.
6
+ * `ContainerChildren` не рендерит слоты заголовка и фон, поэтому и в `grid-template-*` их быть
7
+ * не должно — иначе треков окажется больше, чем ячеек, и раскладка съедет.
8
8
  */
9
9
  export declare const getLayoutChildren: (node?: ConfigContainerChild) => ConfigContainerChild[];
10
10
  /** Опция, в которой лежит доля трека: у строки это высота, у ячейки — ширина. */
@@ -4,10 +4,10 @@ import { GridIdFactory } from './createGridNodeId';
4
4
  /** Узел-сетка: `ContainersGroup`, у которого включена опция `grid`. */
5
5
  export declare const isGridNode: (node?: ConfigContainerChild) => boolean;
6
6
  /**
7
- * Подменяет «раскладочных» детей узла, сохраняя слоты заголовка.
7
+ * Подменяет «раскладочных» детей узла, сохраняя слоты заголовка и фона.
8
8
  *
9
9
  * Слоты кладутся первыми: их порядок относительно тела ни на что не влияет — тело их отфильтровывает,
10
- * а `ExpandableTitle` ищет по `id`.
10
+ * а `ExpandableTitle` и `ContainerBackground` ищут по `id`.
11
11
  */
12
12
  export declare const setLayoutChildren: (node: ConfigContainerChild, children: ConfigContainerChild[]) => ConfigContainerChild;
13
13
  /**
@@ -4,7 +4,6 @@ export declare const SlideshowHeaderWrapper: import('styled-components').StyledC
4
4
  big?: boolean;
5
5
  withPadding?: boolean;
6
6
  }, never>;
7
- export declare const ImageContainerBg: import('styled-components').StyledComponent<"div", any, {}, never>;
8
7
  export declare const HeaderSlideshow: import('styled-components').StyledComponent<"div", any, {
9
8
  height?: number;
10
9
  }, never>;
@@ -1,6 +1,7 @@
1
1
  export * from './useAttachmentItems';
2
2
  export * from './useAttachmentPreviewImages';
3
3
  export * from './useAutoCompleteControl';
4
+ export * from './useBgImageHost';
4
5
  export * from './useContainerAttributes';
5
6
  export * from './useContainerRoot';
6
7
  export * from './useEditGroupAttributes';
@@ -0,0 +1,12 @@
1
+ import { BgImageHostProps } from '../components/ContainerBackground/styled';
2
+ import { ConfigContainerChild } from '../types';
3
+ /** Узел, из которого хук читает признаки хоста: слот `bgImage` в детях и `options.innerPadding`. */
4
+ export type BgImageHostConfig = Pick<ConfigContainerChild, "children" | "options">;
5
+ /**
6
+ * Пропсы хоста фонового слоя для корней, которые не берут пропсы из `useWrapperSize`
7
+ * (ставят `id`/`style` руками — `Title`, `Icon`, `Tabs`, `AddFeature`, `ExportPdf`, …).
8
+ *
9
+ * Контейнеры на `useContainerRoot` этот хук напрямую не зовут: `useWrapperSize` вызывает его
10
+ * сам и кладёт результат в `root` — так признаки хоста считаются в одном месте.
11
+ */
12
+ export declare const useBgImageHost: (elementConfig?: BgImageHostConfig) => BgImageHostProps;
@@ -1 +1,10 @@
1
+ /**
2
+ * `src` для картинки: свой файл тянется fetch'ем с токеном и отдаётся blob-адресом, чужой
3
+ * возвращается как есть.
4
+ *
5
+ * Внешний адрес намеренно не фетчится: тег `img` грузит кросс-доменную картинку без всякого
6
+ * CORS, а `fetch` — только если чужой сервер отдал `Access-Control-Allow-Origin`. Заодно
7
+ * картинка остаётся в HTTP-кеше браузера, которого blob-адрес лишён. Ровно так же поступают
8
+ * вложения: `useAttachmentPreviewImages` отдаёт внешней ссылке `src: item.link`.
9
+ */
1
10
  export declare const useFetchImageWithAuth: (url: string | null) => string | null;
@@ -1,12 +1,13 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { CSSObject } from 'styled-components';
3
+ import { BgImageHostProps } from '../components/ContainerBackground/styled';
3
4
  import { ConfigContainerChild } from '../types';
4
5
  interface UseWrapperSizeParams {
5
6
  elementConfig?: ConfigContainerChild;
6
7
  /** Внутренние дефолты обёртки контейнера. Ссылка должна быть стабильной (константа или useMemo). */
7
8
  defaults?: CSSObject;
8
9
  }
9
- export interface WrapperRootProps {
10
+ export interface WrapperRootProps extends BgImageHostProps {
10
11
  id?: string;
11
12
  /** Дубль `id` для внешних селекторов: раньше его нёс `ElementValueWrapper` вокруг контейнера. */
12
13
  "data-id"?: string;
@@ -25,6 +26,10 @@ export interface WrapperRootProps {
25
26
  * `data-id` и `$noMargin` раньше жили на внешней обёртке `ElementValueWrapper`; она вешала их
26
27
  * на второй узел поверх этого корня, дублируя стили, и для таких контейнеров больше не создаётся
27
28
  * (см. `ROOT_OWNING_TEMPLATES`).
29
+ *
30
+ * Пропсы хоста фонового слоя (`$hasBgImage`, `$innerPadding`) подмешиваются здесь, а не в каждом
31
+ * контейнере: корень и так получает пропсы одним спредом, поэтому фон и внутренний отступ
32
+ * включаются без единой дополнительной строки на месте вызова.
28
33
  */
29
34
  export declare const useWrapperSize: ({ elementConfig, defaults }: UseWrapperSizeParams) => WrapperRootProps;
30
35
  export {};
@@ -0,0 +1,7 @@
1
+ /** Общее для нескольких разделов: ошибка источника данных, подпись атрибута, кнопки объекта. */
2
+ export declare const DataSourceErrorContainer: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
3
+ export declare const AttributeLabel: import('styled-components').StyledComponent<"div", any, {
4
+ isEdit?: boolean;
5
+ forCheckbox?: boolean;
6
+ }, never>;
7
+ export declare const FeatureControls: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
@@ -1,8 +1,9 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { CSSObject } from 'styled-components';
3
- import { AlignItems } from './types';
3
+ import { BgImageHostProps } from '../components/ContainerBackground/styled';
4
+ import { AlignItems } from '../types';
4
5
  /** Пропсы корневой обёртки контейнера — см. `useWrapperSize`. */
5
- export interface ContainerRootProps {
6
+ export interface ContainerRootProps extends BgImageHostProps {
6
7
  $sizeCss?: CSSObject;
7
8
  $noMargin?: boolean;
8
9
  "data-id"?: string;
@@ -59,33 +60,3 @@ export declare const ContainerWrapper: import('styled-components').StyledCompone
59
60
  $zIndex?: CSSProperties["zIndex"];
60
61
  $noMargin?: boolean;
61
62
  }, never>;
62
- export declare const DashboardChip: import('styled-components').StyledComponent<any, any, any, any>;
63
- export declare const DashboardPlaceholderWrap: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
64
- export declare const DashboardPlaceholder: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & {
65
- isLoading?: boolean;
66
- }, never>;
67
- export declare const DashboardWrapper: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & {
68
- hasImage?: boolean;
69
- isPresentationMode?: boolean;
70
- }, never>;
71
- export declare const DashboardContent: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
72
- export declare const PresentationWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
73
- export declare const PresentationPanelWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
74
- export declare const PresentationHeader: import('styled-components').StyledComponent<"div", any, {
75
- image?: string;
76
- }, never>;
77
- export declare const PresentationHeaderTools: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
78
- export declare const LayerGroupList: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & {
79
- $noScroll?: boolean;
80
- }, never>;
81
- export declare const PresentationHeaderButtons: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
82
- export declare const PresentationPanelContainer: import('styled-components').StyledComponent<"div", any, {
83
- left?: number;
84
- showLayers?: boolean;
85
- }, never>;
86
- export declare const DataSourceErrorContainer: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
87
- export declare const AttributeLabel: import('styled-components').StyledComponent<"div", any, {
88
- isEdit?: boolean;
89
- forCheckbox?: boolean;
90
- }, never>;
91
- export declare const FeatureControls: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
@@ -0,0 +1,11 @@
1
+ /** Каркас дашборда: обёртка страницы, область контента, плейсхолдеры и чип значения. */
2
+ export declare const DashboardChip: import('styled-components').StyledComponent<any, any, any, any>;
3
+ export declare const DashboardPlaceholderWrap: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
4
+ export declare const DashboardPlaceholder: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & {
5
+ isLoading?: boolean;
6
+ }, never>;
7
+ export declare const DashboardWrapper: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & {
8
+ hasImage?: boolean;
9
+ isPresentationMode?: boolean;
10
+ }, never>;
11
+ export declare const DashboardContent: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Стили дашборда. Раньше это был один `Dashboard/styled.ts`; путь импорта (`./styled`) не
3
+ * изменился — файл стал папкой, чтобы каждый раздел жил отдельным модулем и укладывался в
4
+ * `max-lines`.
5
+ *
6
+ * Подмодули импортируют друг друга НАПРЯМУЮ, а не через этот баррель: он реэкспортирует их
7
+ * всех, и обращение к нему изнутри замкнуло бы цикл — модуль ждал бы сам себя и попал в TDZ.
8
+ *
9
+ * Порядок реэкспортов повторяет порядок разделов в прежнем файле. styled-components раздаёт
10
+ * компонентам группы в порядке создания, а группы решают, чьё правило окажется в таблице
11
+ * стилей ниже при равной специфичности — так каскад остаётся ровно таким, каким был.
12
+ */
13
+ export * from './containers';
14
+ export * from './dashboard';
15
+ export * from './presentation';
16
+ export * from './common';
@@ -0,0 +1,15 @@
1
+ /** Презентационный режим: карточки-панели поверх дашборда и левая панель со списком слоёв. */
2
+ export declare const PresentationWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
3
+ export declare const PresentationPanelWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
4
+ export declare const PresentationHeader: import('styled-components').StyledComponent<"div", any, {
5
+ image?: string;
6
+ }, never>;
7
+ export declare const PresentationHeaderTools: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
8
+ export declare const LayerGroupList: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & {
9
+ $noScroll?: boolean;
10
+ }, never>;
11
+ export declare const PresentationHeaderButtons: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
12
+ export declare const PresentationPanelContainer: import('styled-components').StyledComponent<"div", any, {
13
+ left?: number;
14
+ showLayers?: boolean;
15
+ }, never>;
@@ -176,6 +176,25 @@ export interface ConfigLayoutOptions {
176
176
  */
177
177
  overflow?: Overflow;
178
178
  padding?: number;
179
+ /**
180
+ * Внутренний отступ 1rem по всем краям корня контейнера.
181
+ *
182
+ * Пара к слоту `bgImage`: без отступа содержимое прилипает к краям картинки. От `padding`
183
+ * отличается тем, что не требует числа и не участвует в расчёте размеров обёртки
184
+ * (`getWrapperSizeStyle`) — это фиксированный отступ содержимого внутри хоста фонового слоя.
185
+ */
186
+ innerPadding?: boolean;
187
+ /**
188
+ * Фоновое изображение (`bgImage`) вытекает за края контейнера на 1.5rem — по бокам и вверх.
189
+ *
190
+ * 1.5rem — ровно `padding` карточки контейнера (`ContainerWrapper`), поэтому картинка
191
+ * дотягивается до краёв дашборда, не растягивая при этом остальное содержимое контейнера.
192
+ * Вниз слой не вытекает: там начинается следующий контейнер колонки.
193
+ *
194
+ * Без слота `bgImage` не делает ничего: вытекать нечему. Обрезается любым предком
195
+ * с `overflow` кроме `visible` — в том числе собственным `options.overflow` контейнера.
196
+ */
197
+ outflow?: boolean;
179
198
  radius?: number;
180
199
  cornerRadius?: number;
181
200
  column?: boolean;
@@ -398,6 +417,15 @@ export interface ConfigEditOptions {
398
417
  maxValue?: number | Date;
399
418
  noEmptyOption?: boolean;
400
419
  fileExtensions?: string;
420
+ /**
421
+ * Таблице оставлена только правка существующих строк: кнопки «Добавить» и колонки удаления
422
+ * не будет. Читается у представления `table` контейнера `StructuredData` и работает поверх
423
+ * `editMode` — без него не добавляют и не удаляют и так.
424
+ *
425
+ * Нужен таблицам, состав строк которых задан не в дашборде: строки приходят из источника или
426
+ * из значения фильтра, а пользователь уточняет только их значения.
427
+ */
428
+ editOnly?: boolean;
401
429
  }
402
430
  /** Ссылки на сущности по id/name. */
403
431
  export interface ConfigEntityRefOptions {
@@ -1 +1,11 @@
1
+ /**
2
+ * Приводит значение конфига к адресу картинки, иконки или ссылки.
3
+ *
4
+ * Развилка одна: готовый адрес отдаётся как есть, всё остальное считается идентификатором
5
+ * ресурса и разворачивается в путь к файлу каталога.
6
+ *
7
+ * Проверка идёт по схеме, а не по префиксу `http`: иначе `data:`-URI, `blob:`, `mailto:` и
8
+ * `//cdn…` превращались бы в `/sp/resources/file/data:…` — путь к несуществующему файлу,
9
+ * который дальше по течению неотличим от обычного внутреннего адреса и молча даёт 404.
10
+ */
1
11
  export declare const getResourceUrl: (url?: string) => string;
@@ -0,0 +1,8 @@
1
+ import { ConfigContainerChild } from '../types';
2
+ /**
3
+ * Есть ли у узла конфига слот фонового изображения.
4
+ *
5
+ * Слой фона рисуется ТОЛЬКО по этому признаку: без узла `bgImage` в конфиге пустой
6
+ * абсолютно позиционированный `div` в DOM не появляется вовсе.
7
+ */
8
+ export declare const hasContainerBgImage: (elementConfig?: Pick<ConfigContainerChild, "children">) => boolean;
@@ -59,6 +59,8 @@ export * from './getDisplayTemplateNameFromAttribute';
59
59
  export * from './getTotalFromAttributes';
60
60
  export * from './getTotalFromRelatedFeatures';
61
61
  export * from './getRootElementId';
62
+ export * from './hasContainerBgImage';
63
+ export * from './isCrossOriginUrl';
62
64
  export * from './isEmptyElementValue';
63
65
  export * from './isEmptyValue';
64
66
  export * from './isHiddenEmptyValue';
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Ведёт ли адрес на ЧУЖОЙ origin — сервер, который ничего не знает ни про наш токен, ни про
3
+ * наши заголовки.
4
+ *
5
+ * Относительный адрес (`/sp/resources/file/<id>`) всегда свой. Абсолютный сравнивается с
6
+ * `location.origin`, поэтому `https://<наш хост>/sp/...` тоже считается своим: его файлы
7
+ * закрыты авторизацией ровно так же, как у относительного пути.
8
+ *
9
+ * Проверка НЕ сводится к `^https?://`, как `isExternal` у вложений: там достаточно отличить
10
+ * ссылку от файла каталога, а здесь решается, отправлять ли на адрес `Authorization`.
11
+ *
12
+ * Разобрать адрес не удалось — считаем его своим: пусть с ним разбирается обычный путь
13
+ * загрузки, а не эта проверка.
14
+ */
15
+ export declare const isCrossOriginUrl: (url?: string | null) => boolean;