@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
package/dist/react.esm.js CHANGED
@@ -4,7 +4,7 @@ import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
4
4
  import { isValidElement, Fragment, createContext, memo, useRef, useState, useCallback, useEffect, useContext, useMemo, createElement, useLayoutEffect, forwardRef } from 'react';
5
5
  import { barChartClassNames, lineChartClassNames, BarChart as BarChart$1, LineChart, PieChart } from '@evergis/charts';
6
6
  import { AttributeType, AttributeIconType, generateId, STORAGE_TOKEN_KEY, parseJwt, STORAGE_REFRESH_TOKEN_KEY, RemoteTaskStatus, AttributeConfigurationType, LayerServiceType, OgcGeometryType, StringSubType } from '@evergis/api';
7
- import { isNil, isEqual, uniqueId, isEmpty, unescape } from 'lodash';
7
+ import { isNil, isEqual, uniqueId, uniqBy, isEmpty, unescape } from 'lodash';
8
8
  import { ColorScale, Color as Color$1 } from '@evergis/color';
9
9
  import { isValid, format, parseJSON, parseISO, toDate } from 'date-fns';
10
10
  import { ru, enUS } from 'date-fns/locale';
@@ -5594,12 +5594,22 @@ const ServerNotificationsProvider = ({ url, initialized, apiClient, children })
5594
5594
  }, children: children }));
5595
5595
  };
5596
5596
 
5597
+ const INTERPOLATION_PATTERN = /\{\{\s*(\w+)\s*\}\}/g;
5598
+ /**
5599
+ * Подставляет в строку перевода переменные вида `{{total}}` — так, как это делает i18next.
5600
+ *
5601
+ * Нужна запасному переводчику, когда хост не передал свой `t` (например, в Storybook): без неё
5602
+ * `defaultValue` с переменными уходит в интерфейс как есть. Переменная без значения остаётся
5603
+ * в тексте, чтобы пропуск был виден.
5604
+ */
5605
+ const interpolateTranslation = (text, values = {}) => text.replace(INTERPOLATION_PATTERN, (match, name) => values[name] === undefined || values[name] === null ? match : String(values[name]));
5606
+
5597
5607
  const useGlobalContext = () => {
5598
5608
  const { t, language, themeName, api, ewktGeometry, ewktExtent, zoomLevel, projectName, projectAlias, notification } = useContext(GlobalContext) || {};
5599
5609
  const translate = useCallback((value, options) => {
5600
5610
  if (t)
5601
5611
  return t(value, options);
5602
- return options?.defaultValue ?? value;
5612
+ return interpolateTranslation(options?.defaultValue ?? value, options);
5603
5613
  }, [t]);
5604
5614
  return useMemo(() => ({
5605
5615
  t: translate,
@@ -5740,8 +5750,8 @@ const useAttachmentDownload = (items) => {
5740
5750
  * {@link FeatureCardContext} на пересекающуюся базу и виджет-специфичные расширения.
5741
5751
  */
5742
5752
  const useWidgetContext = (type = WidgetType.Dashboard) => {
5743
- const { toggleLayersVisibility, visibleLayers, projectInfo, updateProject, layerInfos, geometryFilter, dashboardLayers, setDashboardLayer, components: dashboardComponents, selectAttachmentsFromCatalog, config: dashboardConfig, containerIds, pageIndex: projectPageIndex, selectedTabId: projectSelectedTabId, setSelectedTabId: setProjectSelectedTabId, dataSources: projectDataSources, loading: projectLoading, editMode: projectEditMode, onContainerChange: projectOnContainerChange, filters: projectFilters, changeFilters: projectChangeFilters, expandContainer: projectExpandContainer, expandedContainers: projectExpandedContainers, nextPage: projectNextPage, prevPage: projectPrevPage, changePage: projectChangePage, } = useContext(DashboardContext) || {};
5744
- const { layerInfo, attributes, feature, controls, changeControls, closeFeatureCard, config: featureConfig, pageIndex: featurePageIndex, selectedTabId: featureSelectedTabId, setSelectedTabId: setFeatureSelectedTabId, dataSources: featureDataSources, loading: featureLoading, editMode: featureEditMode, onContainerChange: featureOnContainerChange, filters: featureFilters, changeFilters: featureChangeFilters, expandContainer: featureExpandContainer, expandedContainers: featureExpandedContainers, nextPage: featureNextPage, prevPage: featurePrevPage, changePage: featureChangePage, } = useContext(FeatureCardContext) || {};
5753
+ const { toggleLayersVisibility, visibleLayers, projectInfo, updateProject, layerInfos, geometryFilter, dashboardLayers, setDashboardLayer, components: dashboardComponents, selectAttachmentsFromCatalog, config: dashboardConfig, containerIds, pageIndex: projectPageIndex, selectedTabId: projectSelectedTabId, setSelectedTabId: setProjectSelectedTabId, dataSources: projectDataSources, loading: projectLoading, editMode: projectEditMode, onContainerChange: projectOnContainerChange, onModalToggle: projectOnModalToggle, filters: projectFilters, changeFilters: projectChangeFilters, expandContainer: projectExpandContainer, expandedContainers: projectExpandedContainers, nextPage: projectNextPage, prevPage: projectPrevPage, changePage: projectChangePage, } = useContext(DashboardContext) || {};
5754
+ const { layerInfo, attributes, feature, controls, changeControls, closeFeatureCard, config: featureConfig, pageIndex: featurePageIndex, selectedTabId: featureSelectedTabId, setSelectedTabId: setFeatureSelectedTabId, dataSources: featureDataSources, loading: featureLoading, editMode: featureEditMode, onContainerChange: featureOnContainerChange, onModalToggle: featureOnModalToggle, filters: featureFilters, changeFilters: featureChangeFilters, expandContainer: featureExpandContainer, expandedContainers: featureExpandedContainers, nextPage: featureNextPage, prevPage: featurePrevPage, changePage: featureChangePage, } = useContext(FeatureCardContext) || {};
5745
5755
  return {
5746
5756
  toggleLayersVisibility,
5747
5757
  visibleLayers,
@@ -5763,6 +5773,7 @@ const useWidgetContext = (type = WidgetType.Dashboard) => {
5763
5773
  config: type === WidgetType.Dashboard ? dashboardConfig : featureConfig,
5764
5774
  isEditing: type === WidgetType.Dashboard ? projectEditMode : featureEditMode,
5765
5775
  onContainerChange: type === WidgetType.Dashboard ? projectOnContainerChange : featureOnContainerChange,
5776
+ onModalToggle: type === WidgetType.Dashboard ? projectOnModalToggle : featureOnModalToggle,
5766
5777
  isLoading: type === WidgetType.Dashboard ? projectLoading : featureLoading,
5767
5778
  pageIndex: type === WidgetType.Dashboard ? projectPageIndex || 1 : featurePageIndex || 1,
5768
5779
  filters: type === WidgetType.Dashboard ? projectFilters : featureFilters,
@@ -6025,6 +6036,30 @@ const useAttachmentPreviewImages = ({ items, active, }) => {
6025
6036
  }), [items, blobUrls, failedLinks]);
6026
6037
  };
6027
6038
 
6039
+ /**
6040
+ * Вид списка вложений: плитка или строки и сколько файлов из списка показано.
6041
+ *
6042
+ * Общий для контейнера вложений и колонки таблицы: список у них один и тот же, и считать
6043
+ * видимое дважды незачем. Предел приходит числом, а не опциями конфига, — у колонки опций
6044
+ * вида нет, он у неё зашит константой.
6045
+ */
6046
+ const useAttachmentsView = ({ items, limit, initialViewMode = "grid", }) => {
6047
+ const [viewMode, setViewMode] = useState(initialViewMode);
6048
+ const [showMore, setShowMore] = useState(false);
6049
+ const visibleItems = useMemo(() => (limit && !showMore ? items.slice(0, limit) : items), [items, limit, showMore]);
6050
+ const hiddenCount = items.length - visibleItems.length;
6051
+ const handleSetViewMode = useCallback((mode) => setViewMode(mode), []);
6052
+ return {
6053
+ visibleItems,
6054
+ hiddenCount,
6055
+ hasMore: hiddenCount > 0,
6056
+ showMore,
6057
+ setShowMore,
6058
+ viewMode,
6059
+ setViewMode: handleSetViewMode,
6060
+ };
6061
+ };
6062
+
6028
6063
  const useAutoCompleteControl = (items) => {
6029
6064
  const [value, setValue] = useState("");
6030
6065
  const [options, setOptions] = useState([]);
@@ -7191,6 +7226,14 @@ const useChartChange = ({ dataSources, chartId, width, height, relatedAttributes
7191
7226
  return [customize, onChange];
7192
7227
  };
7193
7228
 
7229
+ /**
7230
+ * Источники модалок конфига (`config.modals[].dataSources`) без дублей по имени — выигрывает первый.
7231
+ * Без `modalIds` — источники всех модалок, иначе только перечисленных.
7232
+ */
7233
+ const getModalsDataSources = (config, modalIds) => uniqBy((config?.modals ?? [])
7234
+ .filter(({ id }) => !modalIds || modalIds.includes(id))
7235
+ .flatMap(({ dataSources }) => dataSources ?? []), "name");
7236
+
7194
7237
  /**
7195
7238
  * Generic-параметр `T` сейчас идёт как намерение (под какой виджет). Дальнейшее сужение
7196
7239
  * `config` под конкретный виджет — отдельная задача.
@@ -7317,15 +7360,26 @@ const useWidgetPage = (type = WidgetType.Dashboard) => {
7317
7360
  };
7318
7361
  };
7319
7362
 
7363
+ /**
7364
+ * Конфиги всех источников, доступных контейнерам виджета: страница с корнем и все модалки.
7365
+ * Одноимённый источник модалки перекрывается страничным. Только для поиска по имени — в конфиг
7366
+ * страницы не пишется: `currentPage` сохраняется обратно целиком, и модальные источники осели бы в нём.
7367
+ */
7368
+ const useConfigDataSources = (type = WidgetType.Dashboard) => {
7369
+ const { config } = useWidgetConfig(type);
7370
+ const { currentPage } = useWidgetPage(type);
7371
+ return useMemo(() => uniqBy([...(currentPage?.dataSources ?? []), ...getModalsDataSources(config)], "name"), [config, currentPage?.dataSources]);
7372
+ };
7373
+
7320
7374
  const useChartData = ({ element, type }) => {
7321
7375
  const { t } = useGlobalContext();
7322
7376
  const { dataSources, layerInfos, attributes } = useWidgetContext(type);
7323
7377
  const { currentPage } = useWidgetPage(type);
7378
+ const configDataSources = useConfigDataSources(type);
7324
7379
  const relatedAttributes = useMemo(() => element?.options?.relatedDataSources || [], [element?.options?.relatedDataSources]);
7325
7380
  const loading = useMemo(() => !!relatedAttributes?.length &&
7326
7381
  !dataSources?.some(({ name }) => relatedAttributes.some(({ chartAxis, dataSourceName }) => chartAxis === "y" && dataSourceName === name)), [dataSources, relatedAttributes]);
7327
7382
  const fetchedData = useMemo(() => {
7328
- const configDataSources = currentPage?.dataSources || [];
7329
7383
  const isRelated = !!relatedAttributes?.length;
7330
7384
  const filteredAttributes = relatedAttributes.filter(({ chartAxis }) => chartAxis === "y");
7331
7385
  if (!element)
@@ -7376,7 +7430,7 @@ const useChartData = ({ element, type }) => {
7376
7430
  },
7377
7431
  ];
7378
7432
  }, [
7379
- currentPage?.dataSources,
7433
+ configDataSources,
7380
7434
  currentPage?.filters,
7381
7435
  relatedAttributes,
7382
7436
  element,
@@ -8245,11 +8299,11 @@ const useResizeDrag = ({ onStart, onMove, onEnd }) => {
8245
8299
 
8246
8300
  const useRelatedDataSourceAttributes = ({ type = WidgetType.Dashboard, elementConfig, dataSources, feature, }) => {
8247
8301
  const { layerInfos } = useWidgetContext(type);
8248
- const { currentPage } = useWidgetPage(type);
8302
+ const configDataSources = useConfigDataSources(type);
8249
8303
  const { options } = elementConfig || {};
8250
8304
  const { relatedDataSource } = options || {};
8251
8305
  const dataSource = useMemo(() => getDataSource(relatedDataSource, dataSources), [dataSources, relatedDataSource]);
8252
- const configDataSource = useMemo(() => currentPage?.dataSources?.find(({ name }) => name === relatedDataSource), [currentPage?.dataSources, relatedDataSource]);
8306
+ const configDataSource = useMemo(() => configDataSources.find(({ name }) => name === relatedDataSource), [configDataSources, relatedDataSource]);
8253
8307
  const layerInfo = useMemo(() => getDataSourceLayerInfo({ layerInfos, configDataSource, fetchedDataSource: dataSource }) ||
8254
8308
  EMPTY_DATA_SOURCE_LAYER_INFO, [configDataSource, dataSource, layerInfos]);
8255
8309
  const attributes = useMemo(() => getFeatureAttributes(feature, layerInfo, dataSource), [dataSource, feature, layerInfo]);
@@ -8565,9 +8619,23 @@ const AttachmentsViewControls = styled.div.withConfig({ displayName: "Attachment
8565
8619
  font-size: 1rem;
8566
8620
  }
8567
8621
  `;
8622
+ /**
8623
+ * Счётчик файлов у подписи — плоский чип в строку подписи.
8624
+ *
8625
+ * Шрифт ставится на текст чипа, а не на корень: текст задаёт себе шрифт шорткатом `font` из темы,
8626
+ * и размер с корня до цифры не доходит — чип выходил высоким, во весь шрифт описания.
8627
+ */
8568
8628
  const AttachmentsCountChip = styled(Chip).withConfig({ displayName: "AttachmentsCountChip", componentId: "sc-117ib6u" }) `
8569
- padding: 2px 6px;
8570
- font-size: 0.625rem;
8629
+ && {
8630
+ padding: 0.0625rem 0.25rem;
8631
+ border-radius: 0.75rem;
8632
+ }
8633
+
8634
+ span {
8635
+ font-size: 0.625rem;
8636
+ line-height: 0.75rem;
8637
+ font-weight: bold;
8638
+ }
8571
8639
  `;
8572
8640
  const AttachmentsContent = styled.div.withConfig({ displayName: "AttachmentsContent", componentId: "sc-1j2thff" }) `
8573
8641
  width: 100%;
@@ -8850,38 +8918,30 @@ const AttachmentsList = ({ items, isEdit, onPreview, onDelete, }) => {
8850
8918
  return (jsx(ListContainer, { children: items.map(item => (jsx(AttachmentItem, { item: item, viewMode: "list", isEdit: isEdit, onPreview: onPreview, onDelete: onDelete }, item.link))) }));
8851
8919
  };
8852
8920
 
8853
- const ShowMoreButton = ({ hiddenCount, onClick, }) => {
8921
+ const ShowMoreButton = ({ hiddenCount, iconKind = "arrow_down", onClick, }) => {
8854
8922
  const { t } = useGlobalContext();
8855
- return (jsxs(ShowMoreButton$1, { onClick: onClick, children: [t("showMore", { ns: "dashboard", defaultValue: "Показать ещё" }), " ", hiddenCount, jsx(Icon, { kind: "arrow_down" })] }));
8923
+ return (jsxs(ShowMoreButton$1, { onClick: onClick, children: [t("showMore", { ns: "dashboard", defaultValue: "Показать ещё" }), " ", hiddenCount, jsx(Icon, { kind: iconKind })] }));
8856
8924
  };
8857
8925
 
8926
+ /**
8927
+ * Сколько элементов показывать сразу. Заданы обе опции — выигрывает меньшая, не задана ни одна —
8928
+ * предела нет и список показывается целиком.
8929
+ */
8930
+ const getShownItemsLimit = ({ shownItems, otherItems } = {}) => shownItems && otherItems ? Math.min(shownItems, otherItems) : shownItems || otherItems;
8858
8931
  const sliceShownOtherItems = (data, options = {}, showMore) => {
8859
- const { shownItems, otherItems } = options || {};
8860
- const limit = shownItems && otherItems ? Math.min(shownItems, otherItems) : shownItems || otherItems;
8861
- return (shownItems || otherItems) && !showMore ? (data?.slice(0, limit) || []) : data;
8932
+ const limit = getShownItemsLimit(options);
8933
+ return limit && !showMore ? (data?.slice(0, limit) || []) : data;
8862
8934
  };
8863
8935
 
8864
8936
  const useAttachmentContainer = ({ type, elementConfig, valueOverride, }) => {
8865
8937
  const { items, attributeName } = useAttachmentItems({ type, elementConfig, valueOverride });
8866
8938
  const { options } = elementConfig || {};
8867
- const initialViewMode = options?.viewMode === "list" ? "list" : "grid";
8868
- const [viewMode, setViewMode] = useState(initialViewMode);
8869
- const [showMore, setShowMore] = useState(false);
8870
- const visibleItems = useMemo(() => sliceShownOtherItems(items, options, showMore), [items, options, showMore]);
8871
- const hiddenCount = items.length - visibleItems.length;
8872
- const hasMore = hiddenCount > 0;
8873
- const handleSetViewMode = useCallback((mode) => setViewMode(mode), []);
8874
- return {
8939
+ const view = useAttachmentsView({
8875
8940
  items,
8876
- visibleItems,
8877
- hiddenCount,
8878
- hasMore,
8879
- showMore,
8880
- setShowMore,
8881
- viewMode,
8882
- setViewMode: handleSetViewMode,
8883
- attributeName,
8884
- };
8941
+ limit: getShownItemsLimit(options),
8942
+ initialViewMode: options?.viewMode === "list" ? "list" : "grid",
8943
+ });
8944
+ return { ...view, items, attributeName };
8885
8945
  };
8886
8946
 
8887
8947
  const AttachmentContainer = memo(({ type, elementConfig, renderElement }) => {
@@ -11486,6 +11546,9 @@ const toSchemaAttribute = (params) => {
11486
11546
  multiline: description?.multiline,
11487
11547
  colorPicker: description?.colorPicker,
11488
11548
  style: description?.style,
11549
+ // Настройки загрузки файлов в колонку вложений: у источника их тоже нет.
11550
+ parentResourceId: description?.parentResourceId,
11551
+ fileExtensions: description?.fileExtensions,
11489
11552
  };
11490
11553
  };
11491
11554
  /**
@@ -13776,6 +13839,8 @@ const AddButton = ({ multiple = true, accept, onSelectFiles, onSelectFromCatalog
13776
13839
  value: AddAttachmentSource.Catalog,
13777
13840
  icon: "folder_outline",
13778
13841
  text: t("attachments.fromCatalog", { ns: "common", defaultValue: "Из каталога" }),
13842
+ // Диалог каталога выдаёт виджету приложение: не выдан — и выбирать нечем.
13843
+ disabled: !onSelectFromCatalog,
13779
13844
  },
13780
13845
  {
13781
13846
  value: AddAttachmentSource.Link,
@@ -13783,7 +13848,7 @@ const AddButton = ({ multiple = true, accept, onSelectFiles, onSelectFromCatalog
13783
13848
  text: t("attachments.fromLink", { ns: "common", defaultValue: "По ссылке" }),
13784
13849
  disabled: !onSelectFromLink,
13785
13850
  },
13786
- ], [t, onSelectFromLink]);
13851
+ ], [t, onSelectFromCatalog, onSelectFromLink]);
13787
13852
  const handleMenuSelect = useCallback(([{ value }]) => {
13788
13853
  if (value === AddAttachmentSource.Pc) {
13789
13854
  inputRef.current?.click();
@@ -15498,6 +15563,92 @@ const ElementSvg = memo(({ type, elementConfig, ...rest }) => {
15498
15563
  return (jsx(SvgImage, { url: getSvgUrl({ elementConfig, layerInfo, attributes }), width: width, height: height, fontColor: fontColor }));
15499
15564
  });
15500
15565
 
15566
+ /**
15567
+ * Вложения ячейки в поп-апе. Ширина своя, а не по ячейке: колонка таблицы бывает узкой,
15568
+ * а внутри стоит полный список вложений с плиткой и кнопкой добавления.
15569
+ *
15570
+ * Список взят у контейнера вложений карточки, а величины у поп-апа свои, с макета: имя файла
15571
+ * крупнее и ссылочного цвета, значок в строку имени, «Показать ещё» серое. Переопределены они
15572
+ * здесь, а не в самих компонентах, чтобы вложения в карточке объекта остались как были.
15573
+ */
15574
+ const AttachmentsPopupBox = styled.div.withConfig({ displayName: "AttachmentsPopupBox", componentId: "sc-1dv1wz6" }) `
15575
+ display: flex;
15576
+ flex-direction: column;
15577
+ box-sizing: border-box;
15578
+ width: 19.5rem;
15579
+ padding: 1.25rem;
15580
+
15581
+ ${AttachmentsLabel} {
15582
+ gap: 0 0.25rem;
15583
+ line-height: 0.875rem;
15584
+ }
15585
+
15586
+ ${AttachmentsViewControls} {
15587
+ gap: 0 0.5rem;
15588
+
15589
+ ${IconToggleButton}, ${Icon} {
15590
+ width: 0.875rem;
15591
+ height: 0.875rem;
15592
+ }
15593
+
15594
+ ${Icon}:after {
15595
+ font-size: 0.875rem;
15596
+ }
15597
+ }
15598
+
15599
+ ${ListItemMeta} {
15600
+ ${ListIcon}, ${ImagePreviewContainer}, ${GridImagePreview} {
15601
+ width: 1rem;
15602
+ height: 1rem;
15603
+ background-size: contain;
15604
+ }
15605
+ }
15606
+
15607
+ ${ListItemDescription} {
15608
+ gap: 0;
15609
+ }
15610
+
15611
+ ${ListItemName} {
15612
+ font-size: 1rem;
15613
+ line-height: 1.125rem;
15614
+ color: ${({ theme }) => theme.palette.primary};
15615
+ }
15616
+
15617
+ ${ListItemDate} {
15618
+ font-size: 0.75rem;
15619
+ line-height: 0.875rem;
15620
+ }
15621
+
15622
+ ${ShowMoreButton$1} {
15623
+ gap: 0 0.25rem;
15624
+ margin-top: 0.5rem;
15625
+ line-height: 0.875rem;
15626
+ color: ${({ theme }) => theme.palette.textSecondary};
15627
+
15628
+ ${Icon} {
15629
+ width: 0.875rem;
15630
+ height: 0.875rem;
15631
+ }
15632
+
15633
+ ${Icon}:after {
15634
+ font-size: 0.875rem;
15635
+ color: ${({ theme }) => theme.palette.textSecondary};
15636
+ }
15637
+ }
15638
+ `;
15639
+
15640
+ /**
15641
+ * Полный список вложений колонки — тот же набор, что у контейнера вложений в карточке объекта:
15642
+ * шапка с подписью, счётчиком и переключателем вида, сам список, «Показать ещё» и добавление.
15643
+ *
15644
+ * Кнопка добавления и корзины у файлов появляются только на правку: на чтение поп-ап нужен
15645
+ * ровно затем, чтобы развернуть свёрнутый счётчик.
15646
+ */
15647
+ const AttachmentsCellPopup = memo(({ alias, state }) => {
15648
+ const { items, visibleItems, editable, viewMode, setViewMode, hasMore, hiddenCount, onShowMore, accept, onPreview, onDelete, onUpload, onSelectFromCatalog, onOpenLinkDialog, } = state;
15649
+ return (jsxs(AttachmentsPopupBox, { children: [jsx(AttachmentsHeader, { alias: alias, count: items.length, viewMode: viewMode, onChangeViewMode: setViewMode }), jsx(AttachmentsContent, { children: viewMode === "grid" ? (jsx(AttachmentsGrid, { items: visibleItems, isEdit: editable, onPreview: onPreview, onDelete: onDelete })) : (jsx(AttachmentsList, { items: visibleItems, isEdit: editable, onPreview: onPreview, onDelete: onDelete })) }), hasMore && jsx(ShowMoreButton, { hiddenCount: hiddenCount, iconKind: "expand", onClick: onShowMore }), editable && (jsx(AddButton, { accept: accept, onSelectFiles: onUpload, onSelectFromCatalog: onSelectFromCatalog, onSelectFromLink: onOpenLinkDialog }))] }));
15650
+ });
15651
+
15501
15652
  /**
15502
15653
  * Насколько тело таблицы заехало под липкую шапку. Пишется на таблицу при прокрутке, читается
15503
15654
  * стилем тела: ровно на эту величину тело и отсекается.
@@ -15523,6 +15674,18 @@ const MIN_COLUMN_WIDTH = 48;
15523
15674
  * без валидной строки не собрать.
15524
15675
  */
15525
15676
  const DEFAULT_CELL_COLOR = "#000000";
15677
+ /**
15678
+ * Сколько вложений ячейка показывает сама. Больше — все схлопываются в одну строку со значком
15679
+ * ссылки и счётчиком: колонка в таблице узкая, и списком там помещается ровно один файл.
15680
+ */
15681
+ const ATTACHMENTS_INLINE_LIMIT = 1;
15682
+ /**
15683
+ * Сколько файлов видно в поп-апе вложений сразу, остальные прячутся за «Показать ещё N».
15684
+ * Величина с макета и опцией не выносится: поп-ап у колонки один на все таблицы.
15685
+ */
15686
+ const ATTACHMENTS_SHOWN_ITEMS = 3;
15687
+ /** Вид списка, с которого поп-ап вложений открывается. */
15688
+ const ATTACHMENTS_VIEW_MODE = "list";
15526
15689
 
15527
15690
  /**
15528
15691
  * Собственный бокс таблицы. Без размеров в `options` представления узел ничего не меняет:
@@ -15749,10 +15912,42 @@ const CellField = styled.div.withConfig({ displayName: "CellField", componentId:
15749
15912
  */
15750
15913
  const AttachmentsCellBox = styled.div.withConfig({ displayName: "AttachmentsCellBox", componentId: "sc-1ayq7sq" }) `
15751
15914
  display: flex;
15752
- flex-direction: column;
15753
- align-items: flex-start;
15754
- gap: 0.25rem;
15915
+ align-items: center;
15916
+ gap: 0.375rem;
15755
15917
  padding: 0.375rem 0.25rem;
15918
+ min-width: 0;
15919
+ line-height: 1.25rem;
15920
+ /* Пустая ячейка на чтении не делает по клику ничего — и на указатель ей меняться незачем. */
15921
+ cursor: ${({ $interactive }) => ($interactive ? "pointer" : "default")};
15922
+ `;
15923
+ /**
15924
+ * Значок файла в ячейке. Тот же, что в списке вложений, только с макетную величину строки
15925
+ * таблицы: в контейнере строка свободнее и значок там крупнее.
15926
+ */
15927
+ const AttachmentsCellIcon = styled(ListIcon).withConfig({ displayName: "AttachmentsCellIcon", componentId: "sc-wf195o" }) `
15928
+ width: 1rem;
15929
+ height: 1rem;
15930
+ background-size: contain;
15931
+ `;
15932
+ /**
15933
+ * Подпись файла или счётчика свёрнутых. Ссылочная: по ней и кликают — одиночный файл открывает
15934
+ * галерею, счётчик разворачивает список.
15935
+ */
15936
+ const AttachmentsCellLabel = styled.div.withConfig({ displayName: "AttachmentsCellLabel", componentId: "sc-11wbjsl" }) `
15937
+ color: ${({ theme }) => theme.palette.primary};
15938
+
15939
+ ${cellWrapMixin};
15940
+ `;
15941
+ /** Значок ссылки у счётчика свёрнутых файлов — в цвет подписи. */
15942
+ const AttachmentsCellLinkIcon = styled(Icon).withConfig({ displayName: "AttachmentsCellLinkIcon", componentId: "sc-oxcx2o" }) `
15943
+ flex-shrink: 0;
15944
+ width: 1rem;
15945
+ height: 1rem;
15946
+
15947
+ &:after {
15948
+ font-size: 1rem;
15949
+ color: ${({ theme }) => theme.palette.primary};
15950
+ }
15756
15951
  `;
15757
15952
  /**
15758
15953
  * Ячейка цвета: плашка или палитра слева, значение справа.
@@ -15760,7 +15955,7 @@ const AttachmentsCellBox = styled.div.withConfig({ displayName: "AttachmentsCell
15760
15955
  * Отступы те же, что у текстовой ячейки: в одном ряду с обычными колонками значения обязаны
15761
15956
  * стоять на одной линии.
15762
15957
  */
15763
- const ColorCellBox = styled.div.withConfig({ displayName: "ColorCellBox", componentId: "sc-n2zhg2" }) `
15958
+ const ColorCellBox = styled.div.withConfig({ displayName: "ColorCellBox", componentId: "sc-1x8c5gd" }) `
15764
15959
  display: flex;
15765
15960
  align-items: center;
15766
15961
  gap: 0.375rem;
@@ -15775,38 +15970,119 @@ const ColorCellBox = styled.div.withConfig({ displayName: "ColorCellBox", compon
15775
15970
  * Плашка цвета. Повторяет маркер легенды графика: цвет всюду обозначается одинаково, где бы он
15776
15971
  * ни показывался.
15777
15972
  */
15778
- const ColorSwatch = styled.div.withConfig({ displayName: "ColorSwatch", componentId: "sc-103e3cx" }) `
15973
+ const ColorSwatch = styled.div.withConfig({ displayName: "ColorSwatch", componentId: "sc-1h7m0yr" }) `
15779
15974
  flex-shrink: 0;
15780
15975
  width: 0.75rem;
15781
15976
  height: 0.75rem;
15782
15977
  background-color: ${({ $color }) => $color};
15783
15978
  border-radius: ${({ theme: { borderRadius } }) => borderRadius.tiny};
15784
15979
  `;
15785
- const TableEmpty = styled.div.withConfig({ displayName: "TableEmpty", componentId: "sc-zo5yrp" }) `
15980
+ const TableEmpty = styled.div.withConfig({ displayName: "TableEmpty", componentId: "sc-10hkdmv" }) `
15786
15981
  padding: 0.75rem 0.25rem;
15787
15982
  color: ${({ theme }) => theme.palette.textSecondary};
15788
15983
  `;
15789
15984
 
15790
15985
  /**
15791
- * Ячейка с вложениями: разбор значения, просмотр, скачивание и правка списка.
15986
+ * Добавление и удаление файлов в колонке вложений.
15987
+ *
15988
+ * Все три источника — диск, каталог ресурсов и ссылка — те же, что у контейнера вложений
15989
+ * в карточке объекта: файловое api берётся из глобального контекста, диалог каталога выдаёт
15990
+ * виджету приложение, а ссылка разбирается по адресу.
15991
+ *
15992
+ * Папку-приёмник загрузки задаёт сам атрибут: у колонки нет узла-элемента с опциями, зато
15993
+ * колонок вложений в таблице может быть несколько, и складывать их файлы в одно место незачем.
15994
+ */
15995
+ const useAttachmentsCellEdit = ({ attribute, items, persist }) => {
15996
+ const { api } = useGlobalContext();
15997
+ const { selectAttachmentsFromCatalog } = useWidgetContext();
15998
+ const [isLinkDialogOpen, , setLinkDialogOpen] = useToggle(false);
15999
+ const [uploading, setUploading] = useState(false);
16000
+ const { parentResourceId, fileExtensions } = attribute;
16001
+ const onDelete = useCallback((link) => persist(items.filter(item => item.link !== link)), [items, persist]);
16002
+ const onUpload = useCallback(async (files) => {
16003
+ if (!api?.file?.upload || uploading) {
16004
+ return;
16005
+ }
16006
+ setUploading(true);
16007
+ try {
16008
+ const uploaded = await Promise.all(files.map(file => api.file.upload(file, true, parentResourceId || "", file.name)));
16009
+ persist([
16010
+ ...items,
16011
+ ...uploaded.map((response, index) => ({
16012
+ link: response.resourceId,
16013
+ name: response.name ?? files[index].name,
16014
+ mimeType: files[index].type,
16015
+ date: new Date().toISOString(),
16016
+ isExternal: false,
16017
+ })),
16018
+ ]);
16019
+ }
16020
+ finally {
16021
+ setUploading(false);
16022
+ }
16023
+ }, [api, items, parentResourceId, persist, uploading]);
16024
+ const onAddFromCatalog = useCallback((resources) => persist([
16025
+ ...items,
16026
+ ...resources.map(({ resourceId, name, contentType }) => ({
16027
+ link: resourceId ?? "",
16028
+ name: name ?? "",
16029
+ mimeType: contentType ?? "",
16030
+ date: new Date().toISOString(),
16031
+ isExternal: false,
16032
+ })),
16033
+ ]), [items, persist]);
16034
+ const onSelectFromCatalog = useMemo(() => (selectAttachmentsFromCatalog ? () => selectAttachmentsFromCatalog(onAddFromCatalog) : undefined), [onAddFromCatalog, selectAttachmentsFromCatalog]);
16035
+ const onOpenLinkDialog = useCallback(() => setLinkDialogOpen(true), [setLinkDialogOpen]);
16036
+ const onCloseLinkDialog = useCallback(() => setLinkDialogOpen(false), [setLinkDialogOpen]);
16037
+ const onAddByLink = useCallback((url) => persist([
16038
+ ...items,
16039
+ {
16040
+ link: url,
16041
+ name: getFileNameFromUrl(url),
16042
+ mimeType: getMimeTypeFromUrl(url),
16043
+ date: new Date().toISOString(),
16044
+ isExternal: true,
16045
+ },
16046
+ ]), [items, persist]);
16047
+ return {
16048
+ accept: fileExtensions,
16049
+ isLinkDialogOpen,
16050
+ onDelete,
16051
+ onUpload,
16052
+ onSelectFromCatalog,
16053
+ onOpenLinkDialog,
16054
+ onCloseLinkDialog,
16055
+ onAddByLink,
16056
+ };
16057
+ };
16058
+
16059
+ /**
16060
+ * Колонка вложений: разбор значения, свёрнутый вид ячейки и полный список в поп-апе.
15792
16061
  *
15793
16062
  * Значение атрибута — строка: файлы приезжают в ней списком JSON, поэтому и обратно в черновик
15794
16063
  * кладём строку, а не массив — иначе тип ячейки менялся бы от самой правки.
15795
16064
  *
15796
- * Добавление здесь только по ссылке. Загрузка с диска требует ресурса-родителя и файлового
15797
- * api контейнера вложений, а у колонки таблицы ни того, ни другого нет.
16065
+ * Ячейка показывает один файл, а несколько схлопывает в счётчик, и весь список с добавлением
16066
+ * и удалением живёт в поп-апе тот же набор, что у контейнера вложений в карточке объекта.
15798
16067
  */
15799
- const useAttachmentsCell = ({ attribute, row, canEdit, onChange }) => {
16068
+ const useAttachmentsCell = ({ attribute, row, canEdit, onChange, }) => {
15800
16069
  const [previewIndex, setPreviewIndex] = useState(null);
15801
- const [isLinkDialogOpen, setLinkDialogOpen] = useState(false);
16070
+ const [isPopupOpen, , setPopupOpen] = useToggle(false);
15802
16071
  const { attributeName, isEditable } = attribute;
15803
16072
  const value = row.properties[attributeName];
15804
16073
  const items = useMemo(() => parseAttachments(value), [value]);
16074
+ const view = useAttachmentsView({
16075
+ items,
16076
+ limit: ATTACHMENTS_SHOWN_ITEMS,
16077
+ initialViewMode: ATTACHMENTS_VIEW_MODE,
16078
+ });
16079
+ const { setShowMore } = view;
15805
16080
  const previewImages = useAttachmentPreviewImages({ items, active: previewIndex !== null });
15806
16081
  const downloadByIndex = useAttachmentDownload(items);
15807
16082
  // Те же два условия, что и у обычной ячейки: режим таблицы и разрешение самого атрибута.
15808
16083
  const editable = canEdit && isEditable;
15809
16084
  const persist = useCallback((next) => onChange(row.key, attributeName, JSON.stringify(next)), [attributeName, onChange, row.key]);
16085
+ const edit = useAttachmentsCellEdit({ attribute, items, persist });
15810
16086
  const onPreview = useCallback((link) => {
15811
16087
  const index = items.findIndex(item => item.link === link);
15812
16088
  if (index >= 0) {
@@ -15815,48 +16091,78 @@ const useAttachmentsCell = ({ attribute, row, canEdit, onChange }) => {
15815
16091
  }, [items]);
15816
16092
  const onClosePreview = useCallback(() => setPreviewIndex(null), []);
15817
16093
  const onDownload = useCallback((_image, index) => downloadByIndex(index), [downloadByIndex]);
15818
- const onDelete = useCallback((link) => persist(items.filter(item => item.link !== link)), [items, persist]);
15819
- const onOpenLinkDialog = useCallback(() => setLinkDialogOpen(true), []);
15820
- const onCloseLinkDialog = useCallback(() => setLinkDialogOpen(false), []);
15821
- const onAddByLink = useCallback((url) => persist([
15822
- ...items,
15823
- {
15824
- link: url,
15825
- name: getFileNameFromUrl(url),
15826
- mimeType: getMimeTypeFromUrl(url),
15827
- date: new Date().toISOString(),
15828
- isExternal: true,
15829
- },
15830
- ]), [items, persist]);
16094
+ const onShowMore = useCallback(() => setShowMore(true), [setShowMore]);
16095
+ const onClosePopup = useCallback(() => setPopupOpen(false), [setPopupOpen]);
16096
+ /**
16097
+ * На правку поп-ап открывается всегда, даже у пустой ячейки: другого места, откуда добавить
16098
+ * первый файл, у колонки нет. На чтение единственный файл ведёт прямо в галерею, а свёрнутый
16099
+ * счётчик — в тот же поп-ап, только без кнопок.
16100
+ */
16101
+ const onCellClick = useCallback(() => {
16102
+ if (!editable && items.length === ATTACHMENTS_INLINE_LIMIT) {
16103
+ onPreview(items[0].link);
16104
+ return;
16105
+ }
16106
+ if (editable || items.length) {
16107
+ setPopupOpen(true);
16108
+ }
16109
+ }, [editable, items, onPreview, setPopupOpen]);
15831
16110
  return {
16111
+ ...view,
16112
+ ...edit,
15832
16113
  items,
15833
16114
  editable,
16115
+ onShowMore,
16116
+ isPopupOpen,
16117
+ onClosePopup,
16118
+ onCellClick,
15834
16119
  previewIndex,
15835
16120
  previewImages,
15836
- isLinkDialogOpen,
15837
16121
  onPreview,
15838
16122
  onClosePreview,
15839
16123
  onDownload,
15840
- onDelete,
15841
- onOpenLinkDialog,
15842
- onCloseLinkDialog,
15843
- onAddByLink,
15844
16124
  };
15845
16125
  };
15846
16126
 
15847
16127
  /**
15848
- * Колонка со вложениями: список файлов прямо в ячейке.
16128
+ * Колонка со вложениями.
15849
16129
  *
15850
16130
  * Тип у атрибута строковый, вложениями его делает `subType: "Attachments"` в схеме контейнера —
15851
16131
  * поэтому ветка стоит раньше разбора типа и обычных редакторов ячейки.
16132
+ *
16133
+ * Сама ячейка показывает один файл, а несколько схлопывает в строку со значком ссылки
16134
+ * и счётчиком: в ширину колонки список файлов не помещается. Весь список живёт в поп-апе.
15852
16135
  */
15853
16136
  const AttachmentsCell = memo(({ attribute, row, canEdit, onChange }) => {
15854
16137
  const { t } = useGlobalContext();
15855
- const { items, editable, previewIndex, previewImages, isLinkDialogOpen, onPreview, onClosePreview, onDownload, onDelete, onOpenLinkDialog, onCloseLinkDialog, onAddByLink, } = useAttachmentsCell({ attribute, row, canEdit, onChange });
15856
- return (jsxs(AttachmentsCellBox, { children: [!items.length && !editable && jsx(CellPlaceholder, { children: "\u2014" }), jsx(AttachmentsList, { items: items, isEdit: editable, onPreview: onPreview, onDelete: onDelete }), editable && (jsx(IconButton, { kind: "link", tabIndex: 0, title: t("attachments.fromLink", { ns: "common", defaultValue: "По ссылке" }), onClick: onOpenLinkDialog })), jsx(AttachmentLinkDialog, { isOpen: isLinkDialogOpen, onClose: onCloseLinkDialog, onSubmit: onAddByLink }), previewIndex !== null && (jsx(Preview, { images: previewImages, initialIndex: previewIndex, isOpen: true, onClose: onClosePreview, onDownload: onDownload, errorTitleText: t("attachments.resourceUnavailable", {
16138
+ const state = useAttachmentsCell({ attribute, row, canEdit, onChange });
16139
+ const { items, editable, isPopupOpen, onClosePopup, onCellClick } = state;
16140
+ const [single] = items;
16141
+ const isCollapsed = items.length > ATTACHMENTS_INLINE_LIMIT;
16142
+ const fileType = useMemo(() => (single ? getFileType(single.mimeType, single.name) : undefined), [single]);
16143
+ const isImage = useMemo(() => !!fileType && IMAGE_FILE_TYPES.includes(fileType), [fileType]);
16144
+ // Удаление единственного файла — действие самой ячейки, поп-ап ради него открывать незачем.
16145
+ const handleDelete = useCallback((event) => {
16146
+ event.stopPropagation();
16147
+ state.onDelete(single.link);
16148
+ }, [single, state]);
16149
+ const renderCell = () => {
16150
+ if (isCollapsed) {
16151
+ return (jsxs(Fragment$1, { children: [jsx(AttachmentsCellLinkIcon, { kind: "link" }), jsx(AttachmentsCellLabel, { children: t("attachments.objectsCount", {
16152
+ ns: "common",
16153
+ total: items.length,
16154
+ defaultValue: "Объектов: {{total}}",
16155
+ }) })] }));
16156
+ }
16157
+ if (!single) {
16158
+ return jsx(CellPlaceholder, { children: "\u2014" });
16159
+ }
16160
+ return (jsxs(Fragment$1, { children: [isImage ? (jsx(FileImagePreview, { size: "1rem", isExternal: single.isExternal, link: single.link })) : (jsx(AttachmentsCellIcon, { fileType: fileType })), jsx(AttachmentsCellLabel, { title: single.name, children: single.name }), editable && jsx(IconButton, { kind: "delete", tabIndex: 0, onClick: handleDelete })] }));
16161
+ };
16162
+ return (jsxs(Fragment$1, { children: [jsx(Popup, { zIndex: DASHBOARD_OVERLAY_Z_INDEX, isVisible: isPopupOpen, onRequestClose: onClosePopup, placement: "bottom-start", anchor: ref => (jsx(AttachmentsCellBox, { ref: ref, "$interactive": editable || !!items.length, onClick: onCellClick, children: renderCell() })), children: jsx(AttachmentsCellPopup, { alias: attribute.alias, state: state }) }), jsx(AttachmentLinkDialog, { isOpen: state.isLinkDialogOpen, onClose: state.onCloseLinkDialog, onSubmit: state.onAddByLink }), state.previewIndex !== null && (jsx(Preview, { images: state.previewImages, initialIndex: state.previewIndex, isOpen: true, onClose: state.onClosePreview, onDownload: state.onDownload, errorTitleText: t("attachments.resourceUnavailable", {
15857
16163
  ns: "common",
15858
16164
  defaultValue: "Ресурс недоступен",
15859
- }) }, previewIndex))] }));
16165
+ }) }, state.previewIndex))] }));
15860
16166
  });
15861
16167
 
15862
16168
  /**
@@ -16766,13 +17072,43 @@ const getRenderElement = ({ t, config, elementConfig, attributes = [], layerInfo
16766
17072
  });
16767
17073
  };
16768
17074
 
17075
+ /**
17076
+ * Видимость диалога модалки. Флаг локальный: у одного `modalId` бывает несколько кнопок (слот
17077
+ * `modal` в строках `DataSource`), и общий флаг открыл бы все диалоги сразу. Хост узнаёт об
17078
+ * открытии и закрытии через `onModalToggle` — чтобы грузить `dataSources` модалки только пока она открыта.
17079
+ */
17080
+ const useModalOpen = (type, modalId) => {
17081
+ const { onModalToggle } = useWidgetContext(type);
17082
+ const [isOpen, setIsOpen] = useState(false);
17083
+ const isOpenRef = useRef(false);
17084
+ const onModalToggleRef = useRef(onModalToggle);
17085
+ useEffect(() => {
17086
+ onModalToggleRef.current = onModalToggle;
17087
+ }, [onModalToggle]);
17088
+ const changeOpen = useCallback((nextIsOpen) => {
17089
+ isOpenRef.current = nextIsOpen;
17090
+ setIsOpen(nextIsOpen);
17091
+ if (modalId)
17092
+ onModalToggleRef.current?.(modalId, nextIsOpen);
17093
+ }, [modalId]);
17094
+ const handleOpen = useCallback(() => changeOpen(true), [changeOpen]);
17095
+ const handleClose = useCallback(() => changeOpen(false), [changeOpen]);
17096
+ // Размонтирование ОТКРЫТОГО экземпляра (смена страницы, закрытие карточки) — хост перестаёт
17097
+ // грузить модалку. Закрытый экземпляр молчит: иначе «закрыл» бы соседний открытый с тем же id.
17098
+ useEffect(() => () => {
17099
+ if (isOpenRef.current && modalId)
17100
+ onModalToggleRef.current?.(modalId, false);
17101
+ }, [modalId]);
17102
+ return { isOpen, handleOpen, handleClose };
17103
+ };
17104
+
16769
17105
  const ElementModal = memo(({ type = WidgetType.Dashboard, elementConfig }) => {
16770
17106
  const { config } = useWidgetConfig(type);
16771
17107
  const { expandedContainers, attributes } = useWidgetContext(type);
16772
17108
  const isDataSourceLoading = useDataSourceLoading(type);
16773
- const [isOpen, setIsOpen] = useState(false);
16774
17109
  const { options } = elementConfig || {};
16775
17110
  const { modalId, icon } = options || {};
17111
+ const { isOpen, handleOpen, handleClose } = useModalOpen(type, modalId);
16776
17112
  const modalConfig = useMemo(() => (config?.modals ?? []).find(({ id }) => id === modalId) ?? null, [config?.modals, modalId]);
16777
17113
  const modalContent = useMemo(() => (modalConfig?.children ?? []), [modalConfig]);
16778
17114
  const renderElementConfig = useMemo(() => ({ children: modalContent }), [modalContent]);
@@ -16783,8 +17119,6 @@ const ElementModal = memo(({ type = WidgetType.Dashboard, elementConfig }) => {
16783
17119
  attributes,
16784
17120
  expandedContainers,
16785
17121
  }), [type, config, renderElementConfig, attributes, expandedContainers]);
16786
- const handleOpen = useCallback(() => setIsOpen(true), []);
16787
- const handleClose = useCallback(() => setIsOpen(false), []);
16788
17122
  if (!modalConfig)
16789
17123
  return null;
16790
17124
  const { options: modalOptions } = modalConfig;
@@ -16949,6 +17283,7 @@ const RangeNumberFilter = ({ type, filter }) => {
16949
17283
  const TextFilter = ({ type, filter }) => {
16950
17284
  const { filters, changeFilters, dataSources } = useWidgetContext(type);
16951
17285
  const { currentPage } = useWidgetPage(type);
17286
+ const configDataSources = useConfigDataSources(type);
16952
17287
  const suggestRef = useRef(null);
16953
17288
  const [totalCount, setTotalCount] = useState(0);
16954
17289
  const { attributes, layerInfo } = useRelatedDataSourceAttributes({
@@ -16956,7 +17291,7 @@ const TextFilter = ({ type, filter }) => {
16956
17291
  elementConfig: filter,
16957
17292
  dataSources,
16958
17293
  });
16959
- const { filters: configFilters, dataSources: configDataSources } = currentPage || {};
17294
+ const { filters: configFilters } = currentPage || {};
16960
17295
  const { filterName, searchFilterName, placeholder, width, height, multiSelect, variants, } = filter.options;
16961
17296
  const { eqlParameters } = (layerInfo?.configuration ||
16962
17297
  {});
@@ -17848,10 +18183,11 @@ const assembleTree = (nodes) => {
17848
18183
  const useTreeFilterData = (type, filterName) => {
17849
18184
  const { api } = useGlobalContext();
17850
18185
  const { currentPage } = useWidgetPage(type);
18186
+ const configDataSources = useConfigDataSources(type);
17851
18187
  const configFilter = useMemo(() => getConfigFilter(filterName, currentPage?.filters), [filterName, currentPage?.filters]);
17852
18188
  const { relatedDataSource, attributeName = DEFAULT_ATTRIBUTE_NAME, attributeValue, attributeAlias = DEFAULT_ATTRIBUTE_NAME, attributeParentName, attributeLevel, attributeHasChildren, limit = DEFAULT_DATA_SOURCE_LIMIT, } = configFilter ?? {};
17853
18189
  const valueAttribute = attributeValue ?? attributeName;
17854
- const dataSource = useMemo(() => currentPage?.dataSources?.find(({ name }) => name === relatedDataSource), [currentPage?.dataSources, relatedDataSource]);
18190
+ const dataSource = useMemo(() => configDataSources.find(({ name }) => name === relatedDataSource), [configDataSources, relatedDataSource]);
17855
18191
  const { layerName, query: sourceQuery, ds } = dataSource ?? {};
17856
18192
  const mapNode = useCallback(({ properties }) => {
17857
18193
  const hasChildren = attributeHasChildren ? !!properties[attributeHasChildren] : false;
@@ -19628,5 +19964,5 @@ const DEFAULT_HEATMAP_STYLE = {
19628
19964
  ],
19629
19965
  };
19630
19966
 
19631
- export { ALIGNMENTS, ALIGN_ITEMS, ATTRIBUTE_ICON_ELEMENT_TYPES, AddButtonRow, AddFeatureButton, AddFeatureContainer, AlertIconContainer, AttachmentContainer, AttributeGalleryContainer, AttributeLabel, BASE_CONTAINER_STYLE, BG_IMAGE_SLOT_ID, BaseMapTheme, CHART_TYPES, COMPACT_FRACTION_DIGITS, CONFIG_PAGES_ID, CONFIG_PAGE_ID, CONTAINERS_GROUP_DEFAULTS, CONTAINER_BODY_ATTRIBUTE, CONTAINER_BODY_FILL_STYLE, CameraContainer, Chart, ChartContainer, ChartLegend, ChartLoading, Container, ContainerBackground, ContainerChildren, ContainerLoading, ContainerRoot, ContainerTemplate, ContainerWrapper, ContainersGroupContainer, DASHBOARD_OVERLAY_Z_INDEX, DEFAULT_ATTRIBUTE_NAME, DEFAULT_BARCHART_RADIUS, DEFAULT_BASE_MAP, DEFAULT_BLUR, DEFAULT_CHART_ANGLE, DEFAULT_CHART_HEIGHT, DEFAULT_CHART_WIDTH, DEFAULT_CIRCLE_RADIUS, DEFAULT_CIRCLE_STROKE_WIDTH, DEFAULT_CIRCLE_STYLE, DEFAULT_COLOR, DEFAULT_DASHBOARD_CONFIG, DEFAULT_DATA_SOURCE_LIMIT, DEFAULT_DROPDOWN_WIDTH, DEFAULT_FILL_EXTRUSION_BASE, DEFAULT_FILL_EXTRUSION_HEIGHT, DEFAULT_FILL_EXTRUSION_STYLE, DEFAULT_FILL_EXTRUSION_VERTICAL_GRADIENT, DEFAULT_FILL_STYLE, DEFAULT_FILTER_PADDING, DEFAULT_GRID_GAP, DEFAULT_HEATMAP_COLOR, DEFAULT_HEATMAP_INTENSITY, DEFAULT_HEATMAP_RADIUS, DEFAULT_HEATMAP_STYLE, DEFAULT_HEATMAP_WEIGHT, DEFAULT_ICON_ANCHOR, DEFAULT_ICON_OVERLAP, DEFAULT_ICON_PADDING, DEFAULT_ICON_ROTATE, DEFAULT_ICON_SIZE, DEFAULT_ID_ATTRIBUTE_NAME, DEFAULT_LAT, DEFAULT_LINE_CAP, DEFAULT_LINE_JOIN, DEFAULT_LINE_STYLE, DEFAULT_LINE_WIDTH, DEFAULT_LNG, DEFAULT_OPACITY, DEFAULT_PAGES_CONFIG, DEFAULT_PIECHART_RADIUS, DEFAULT_SYMBOL_COLOR, DEFAULT_SYMBOL_HALO_COLOR, DEFAULT_SYMBOL_PLACEMENT, DEFAULT_SYMBOL_SPACING, DEFAULT_SYMBOL_STYLE, DEFAULT_TEXT_ANCHOR, DEFAULT_TEXT_JUSTIFY, DEFAULT_TEXT_SIZE, DEFAULT_TEXT_TRANSFORM, DEFAULT_TRACK_FR, DEFAULT_TRANSLATE, DEFAULT_ZOOM, DRAG_THRESHOLD_PX, Dashboard, DashboardCheckbox, DashboardChip, DashboardContent, DashboardContext, DashboardDefaultHeader, DashboardHeader, DashboardLoading, DashboardPlaceholder, DashboardPlaceholderWrap, DashboardProvider, DashboardWrapper, DataSourceContainer, DataSourceError, DataSourceErrorContainer, DataSourceInnerContainer, DataSourceProgressContainer, DateFormat, DefaultAttributesContainer, DefaultHeaderContainer, DefaultHeaderWrapper, DividerContainer, EMPTY_DATA_SOURCE_LAYER_INFO, EXTENT_FILTER_NAME, EditGeometryType, ElementButton, ElementCamera, ElementChart, ElementChips, ElementControl, ElementIcon, ElementImage, ElementLegend, ElementLink, ElementMarkdown, ElementSlideshow, ElementSvg, ElementTable, ElementTooltip, ElementValueWrapper, ExpandableTitle, FEATURE_CARD_DEFAULT_COLORS, FEATURE_CARD_OTHER_COLOR, FILL_SIZE, FILTERED_VALUE_OPACITY, FILTER_PREFIX, FR_PRECISION, FeatureCardBackgroundHeader, FeatureCardButtons, FeatureCardContext, FeatureCardDefaultHeader, FeatureCardHeader, FeatureCardProvider, FeatureCardSlideshowHeader, FeatureCardTitle, FeatureControls, FeatureTitleContainer, FiltersContainer, GEOMETRY_ATTRIBUTE, GEOMETRY_FILTER_NAME, GRID_AUTO_FILL_DEFAULTS, GRID_CELL_ATTR, GRID_CELL_ID_PREFIX, GRID_DRAGGING_ATTR, GRID_DRAG_SOURCE_ATTR, GRID_DROP_TARGET_ATTR, GRID_FILL_DEFAULTS, GRID_ROW_ID_PREFIX, GlobalContext, GlobalProvider, GridRowContainer, HANDLE_BLEED_PX, Header, HeaderContainer, HeaderFontColorMixin, HeaderFrontView, HeaderTemplate, HeaderTitleContainer, HiddenTitleItems, IconContainer, ImageContainer, LEFT_PANEL_HEADER_HEIGHT, Layer, LayerDescription, LayerGroupList, LayerIcon, LayerIconContainer, LayerListContainer, LayerTree, LayersContainer, LayersListWrapper, LinearProgressContainer, LogTerminal, LogoContainer, MAP_VIEW_FILTER_NAMES, MAX_CHART_WIDTH, MAX_TRACKS, MIN_TRACK_PX, MIN_TRACK_RATIO, Map$1 as Map, MapContext, MapProvider, NON_TRACK_SLOT_IDS, NO_CELL_DRAG_SELECTOR, NO_CONTENT_VALUE, NUMERIC_ATTRIBUTE_TYPES, NoLiveSnapshotContainer, OBJECT_FITS, OVERFLOWS, OneColumnContainer, PIE_CHART_TOOLTIP_STYLE, POLL_SUBTASK_INTERVAL_MS, POLL_SUBTASK_TIMEOUT_MS, PROJECT_ALIAS_PROP, PROJECT_FILTER_NAME, PROJECT_NAME_PROP, PROJECT_PROPS, PROVIDER_PREFIX, PageNavigator, PageTitle, PageTitleContainer, PagesContainer, Pagination, PresentationHeader, PresentationHeaderButtons, PresentationHeaderTools, PresentationPanelContainer, PresentationPanelWrapper, PresentationWrapper, ProgressContainer, ProviderPrefix, QUERY_DESCRIPTION_CACHE_TTL, RESIZE_HANDLE_ATTR, ResizeHandle, RoundedBackgroundContainer, SAVE_HOOK_RESULT_DURATION, SERVER_NOTIFICATION_EVENT, STACK_BAR_TOTAL_HEIGHT, ScalingFactor, ServerNotificationsContext, ServerNotificationsProvider, SlideshowContainer, SmallPreviewContainer$1 as SmallPreviewContainer, SmallPreviewControl, SmallPreviewCounter, SmallPreviewImages, SmallPreviewLeft, SmallPreviewRight, StackBar, StructuredDataContainer, SvgImage, TILE_ALIGNMENTS, TIME_ZONE_FORMAT, TITLE_SLOT_IDS, TabsContainer, TextTrim, ThemeName, TitleContainer, TopContainer, TopContainerButtons, TwoColumnContainer, UploadContainer, VIEW_MODES, VoteContainer, WidgetType, ZOOM_FILTER_NAME, addDataSource, addDataSources, adjustColor, applyFiltersToCondition, applyQueryFilters, applyTreeFilterToCondition, applyVarsToCondition, asAttributeName, asChartId, asContainerId, asDataSourceName, asFilterName, asLayerName, asModalId, asResourceId, asTabId, buildGridTemplate, buildTrackTemplate, checkEqualOrIncludes, checkIsLoading, collectConfigIds, colorToHex, containsNodeId, createConfigLayer, createConfigPage, createGridCell, createGridIdFactory, createGridRow, createNewPageId, createSaveNotificationId, dateOptions, debounce, decimalOpacityToHex, enrichStyleItemsWithIds, enrichStyleModelsWithIds, eqlParametersToPayload, fetchQueryDescription, findAttributeInExpression, findCellContext, formatArea, formatAttributeValue, formatChartRelatedValue, formatConditionValue, formatDataSourceCondition, formatDate$1 as formatDate, formatElementValue, formatLength, formatNumber, formatPolygonMeasure, geometryToEwkt, getActualExtrusionHeight, getAttributeByName, getAttributeConfigurationByName, getAttributeIconElement, getAttributeIconUrl, getAttributeValue, getAttributesConfiguration, getAverageTrackSize, getChartAxes, getChartFilterName, getChartMarkers, getConfigFilter, getContainerComponent, getDashboardHeader, getDataFromAttributes, getDataFromRelatedFeatures, getDataSource, getDataSourceFilterValue, getDataSourceLayerInfo, getDate, getDefaultConfig, getDisplayTemplateNameFromAttribute, getElementValue, getFeatureAttributes, getFeatureCardHeader, getFilterComponent, getFilterSelectedItems, getFilterValue, getFormattedAttributes, getGradientColors, getImageUrl, getLayerClientStyle, getLayerInfo, getLayerInfoAttribute, getLayerInfoFromDataSources, getLayoutChildren, getMapViewDataSources, getPagesFromConfig, getPagesFromProjectInfo, getProjectValue, getProxyService, getRelatedAttribute, getRenderElement, getResourceUrl, getRootElementId, getSelectedFilterValue, getSlideshowImages, getStyleAttributes, getSvgUrl, getTemplateNameFromAttribute, getThemeByName, getTotalFromAttributes, getTotalFromRelatedFeatures, getTrackSize, getTrackSizeKey, getTrackSizes, getWrapperSizeStyle, hasContainerBgImage, hexToRgba, isCrossOriginUrl, isEmptyElementValue, isEmptyValue, isFeaturesFilterValue, isFillSize, isFrSize, isGridNode, isHiddenEmptyValue, isHookActive, isLayerService, isNotValidSelectedTab, isNumeric, isObject, isProxyService, isRootOwningContainer, isTreeFilterValue, isVisibleContainer, mapNodeById, mergeAttributeConfigurations, metersPerPixel, noMarginMixin, numberOptions, parseFrValue, parseIconNames, parseIconNamesFromClientStyle, pieChartTooltipFromAttributes, pieChartTooltipFromRelatedFeatures, pointOptions, removeDataSource, removeTracks, replaceNodesByIds, rgbToHex, roundFr, roundTotalSum, setLayoutChildren, sizeCssMixin, sliceShownOtherItems, stretchPalette, timeOptions, toConditionsArray, toCssSize, toFrSize, toPxNumber, toRenderableValue, tooltipNameFromAttributes, tooltipValueFromAttributes, tooltipValueFromRelatedFeatures, transparentizeColor, updateDataSource, useAfterSave, useAppHeight, useAttachmentDownload, useAttachmentItems, useAttachmentPreviewImages, useAutoCompleteControl, useBeforeSave, useBgImageHost, useChartChange, useChartData, useContainerAttributes, useContainerRoot, useCurrentPageLayers, useCustomFeatureSelect, useDashboardHeader, useDataSourceLoading, useDataSources, useDebouncedCallback, useDiffPage, useEditGroupAttributes, useEqualTileWidth, useExpandableContainers, useExportPdf, useFeatureSaveHooks, useFetchImageWithAuth, useFetchWithAuth, useGetConfigLayer, useGlobalContext, useHeaderRender, useHideIfEmptyDataSource, useLayerHiddenAttributes, useLayerParams, useMapContext, useMapDraw, useMapImages, useMaxZoomTo, useProjectDashboardInit, usePythonSandbox, usePythonTask, useRedrawLayer, useRelatedDataSourceAttributes, useRemoteTask, useRenderElement, useResizeBox, useResizeDrag, useSavePrototypeBuilder, useServerNotificationsContext, useShownOtherItems, useToggle, useUpdateDataSource, useVisibleProjectItems, useWidgetConfig, useWidgetContext, useWidgetFilters, useWidgetPage, useWindowResize, useWrapperSize, useZoomToFeatures, useZoomToPoint, withTrackSize };
19967
+ export { ALIGNMENTS, ALIGN_ITEMS, ATTRIBUTE_ICON_ELEMENT_TYPES, AddButtonRow, AddFeatureButton, AddFeatureContainer, AlertIconContainer, AttachmentContainer, AttributeGalleryContainer, AttributeLabel, BASE_CONTAINER_STYLE, BG_IMAGE_SLOT_ID, BaseMapTheme, CHART_TYPES, COMPACT_FRACTION_DIGITS, CONFIG_PAGES_ID, CONFIG_PAGE_ID, CONTAINERS_GROUP_DEFAULTS, CONTAINER_BODY_ATTRIBUTE, CONTAINER_BODY_FILL_STYLE, CameraContainer, Chart, ChartContainer, ChartLegend, ChartLoading, Container, ContainerBackground, ContainerChildren, ContainerLoading, ContainerRoot, ContainerTemplate, ContainerWrapper, ContainersGroupContainer, DASHBOARD_OVERLAY_Z_INDEX, DEFAULT_ATTRIBUTE_NAME, DEFAULT_BARCHART_RADIUS, DEFAULT_BASE_MAP, DEFAULT_BLUR, DEFAULT_CHART_ANGLE, DEFAULT_CHART_HEIGHT, DEFAULT_CHART_WIDTH, DEFAULT_CIRCLE_RADIUS, DEFAULT_CIRCLE_STROKE_WIDTH, DEFAULT_CIRCLE_STYLE, DEFAULT_COLOR, DEFAULT_DASHBOARD_CONFIG, DEFAULT_DATA_SOURCE_LIMIT, DEFAULT_DROPDOWN_WIDTH, DEFAULT_FILL_EXTRUSION_BASE, DEFAULT_FILL_EXTRUSION_HEIGHT, DEFAULT_FILL_EXTRUSION_STYLE, DEFAULT_FILL_EXTRUSION_VERTICAL_GRADIENT, DEFAULT_FILL_STYLE, DEFAULT_FILTER_PADDING, DEFAULT_GRID_GAP, DEFAULT_HEATMAP_COLOR, DEFAULT_HEATMAP_INTENSITY, DEFAULT_HEATMAP_RADIUS, DEFAULT_HEATMAP_STYLE, DEFAULT_HEATMAP_WEIGHT, DEFAULT_ICON_ANCHOR, DEFAULT_ICON_OVERLAP, DEFAULT_ICON_PADDING, DEFAULT_ICON_ROTATE, DEFAULT_ICON_SIZE, DEFAULT_ID_ATTRIBUTE_NAME, DEFAULT_LAT, DEFAULT_LINE_CAP, DEFAULT_LINE_JOIN, DEFAULT_LINE_STYLE, DEFAULT_LINE_WIDTH, DEFAULT_LNG, DEFAULT_OPACITY, DEFAULT_PAGES_CONFIG, DEFAULT_PIECHART_RADIUS, DEFAULT_SYMBOL_COLOR, DEFAULT_SYMBOL_HALO_COLOR, DEFAULT_SYMBOL_PLACEMENT, DEFAULT_SYMBOL_SPACING, DEFAULT_SYMBOL_STYLE, DEFAULT_TEXT_ANCHOR, DEFAULT_TEXT_JUSTIFY, DEFAULT_TEXT_SIZE, DEFAULT_TEXT_TRANSFORM, DEFAULT_TRACK_FR, DEFAULT_TRANSLATE, DEFAULT_ZOOM, DRAG_THRESHOLD_PX, Dashboard, DashboardCheckbox, DashboardChip, DashboardContent, DashboardContext, DashboardDefaultHeader, DashboardHeader, DashboardLoading, DashboardPlaceholder, DashboardPlaceholderWrap, DashboardProvider, DashboardWrapper, DataSourceContainer, DataSourceError, DataSourceErrorContainer, DataSourceInnerContainer, DataSourceProgressContainer, DateFormat, DefaultAttributesContainer, DefaultHeaderContainer, DefaultHeaderWrapper, DividerContainer, EMPTY_DATA_SOURCE_LAYER_INFO, EXTENT_FILTER_NAME, EditGeometryType, ElementButton, ElementCamera, ElementChart, ElementChips, ElementControl, ElementIcon, ElementImage, ElementLegend, ElementLink, ElementMarkdown, ElementSlideshow, ElementSvg, ElementTable, ElementTooltip, ElementValueWrapper, ExpandableTitle, FEATURE_CARD_DEFAULT_COLORS, FEATURE_CARD_OTHER_COLOR, FILL_SIZE, FILTERED_VALUE_OPACITY, FILTER_PREFIX, FR_PRECISION, FeatureCardBackgroundHeader, FeatureCardButtons, FeatureCardContext, FeatureCardDefaultHeader, FeatureCardHeader, FeatureCardProvider, FeatureCardSlideshowHeader, FeatureCardTitle, FeatureControls, FeatureTitleContainer, FiltersContainer, GEOMETRY_ATTRIBUTE, GEOMETRY_FILTER_NAME, GRID_AUTO_FILL_DEFAULTS, GRID_CELL_ATTR, GRID_CELL_ID_PREFIX, GRID_DRAGGING_ATTR, GRID_DRAG_SOURCE_ATTR, GRID_DROP_TARGET_ATTR, GRID_FILL_DEFAULTS, GRID_ROW_ID_PREFIX, GlobalContext, GlobalProvider, GridRowContainer, HANDLE_BLEED_PX, Header, HeaderContainer, HeaderFontColorMixin, HeaderFrontView, HeaderTemplate, HeaderTitleContainer, HiddenTitleItems, IconContainer, ImageContainer, LEFT_PANEL_HEADER_HEIGHT, Layer, LayerDescription, LayerGroupList, LayerIcon, LayerIconContainer, LayerListContainer, LayerTree, LayersContainer, LayersListWrapper, LinearProgressContainer, LogTerminal, LogoContainer, MAP_VIEW_FILTER_NAMES, MAX_CHART_WIDTH, MAX_TRACKS, MIN_TRACK_PX, MIN_TRACK_RATIO, Map$1 as Map, MapContext, MapProvider, NON_TRACK_SLOT_IDS, NO_CELL_DRAG_SELECTOR, NO_CONTENT_VALUE, NUMERIC_ATTRIBUTE_TYPES, NoLiveSnapshotContainer, OBJECT_FITS, OVERFLOWS, OneColumnContainer, PIE_CHART_TOOLTIP_STYLE, POLL_SUBTASK_INTERVAL_MS, POLL_SUBTASK_TIMEOUT_MS, PROJECT_ALIAS_PROP, PROJECT_FILTER_NAME, PROJECT_NAME_PROP, PROJECT_PROPS, PROVIDER_PREFIX, PageNavigator, PageTitle, PageTitleContainer, PagesContainer, Pagination, PresentationHeader, PresentationHeaderButtons, PresentationHeaderTools, PresentationPanelContainer, PresentationPanelWrapper, PresentationWrapper, ProgressContainer, ProviderPrefix, QUERY_DESCRIPTION_CACHE_TTL, RESIZE_HANDLE_ATTR, ResizeHandle, RoundedBackgroundContainer, SAVE_HOOK_RESULT_DURATION, SERVER_NOTIFICATION_EVENT, STACK_BAR_TOTAL_HEIGHT, ScalingFactor, ServerNotificationsContext, ServerNotificationsProvider, SlideshowContainer, SmallPreviewContainer$1 as SmallPreviewContainer, SmallPreviewControl, SmallPreviewCounter, SmallPreviewImages, SmallPreviewLeft, SmallPreviewRight, StackBar, StructuredDataContainer, SvgImage, TILE_ALIGNMENTS, TIME_ZONE_FORMAT, TITLE_SLOT_IDS, TabsContainer, TextTrim, ThemeName, TitleContainer, TopContainer, TopContainerButtons, TwoColumnContainer, UploadContainer, VIEW_MODES, VoteContainer, WidgetType, ZOOM_FILTER_NAME, addDataSource, addDataSources, adjustColor, applyFiltersToCondition, applyQueryFilters, applyTreeFilterToCondition, applyVarsToCondition, asAttributeName, asChartId, asContainerId, asDataSourceName, asFilterName, asLayerName, asModalId, asResourceId, asTabId, buildGridTemplate, buildTrackTemplate, checkEqualOrIncludes, checkIsLoading, collectConfigIds, colorToHex, containsNodeId, createConfigLayer, createConfigPage, createGridCell, createGridIdFactory, createGridRow, createNewPageId, createSaveNotificationId, dateOptions, debounce, decimalOpacityToHex, enrichStyleItemsWithIds, enrichStyleModelsWithIds, eqlParametersToPayload, fetchQueryDescription, findAttributeInExpression, findCellContext, formatArea, formatAttributeValue, formatChartRelatedValue, formatConditionValue, formatDataSourceCondition, formatDate$1 as formatDate, formatElementValue, formatLength, formatNumber, formatPolygonMeasure, geometryToEwkt, getActualExtrusionHeight, getAttributeByName, getAttributeConfigurationByName, getAttributeIconElement, getAttributeIconUrl, getAttributeValue, getAttributesConfiguration, getAverageTrackSize, getChartAxes, getChartFilterName, getChartMarkers, getConfigFilter, getContainerComponent, getDashboardHeader, getDataFromAttributes, getDataFromRelatedFeatures, getDataSource, getDataSourceFilterValue, getDataSourceLayerInfo, getDate, getDefaultConfig, getDisplayTemplateNameFromAttribute, getElementValue, getFeatureAttributes, getFeatureCardHeader, getFilterComponent, getFilterSelectedItems, getFilterValue, getFormattedAttributes, getGradientColors, getImageUrl, getLayerClientStyle, getLayerInfo, getLayerInfoAttribute, getLayerInfoFromDataSources, getLayoutChildren, getMapViewDataSources, getModalsDataSources, getPagesFromConfig, getPagesFromProjectInfo, getProjectValue, getProxyService, getRelatedAttribute, getRenderElement, getResourceUrl, getRootElementId, getSelectedFilterValue, getShownItemsLimit, getSlideshowImages, getStyleAttributes, getSvgUrl, getTemplateNameFromAttribute, getThemeByName, getTotalFromAttributes, getTotalFromRelatedFeatures, getTrackSize, getTrackSizeKey, getTrackSizes, getWrapperSizeStyle, hasContainerBgImage, hexToRgba, isCrossOriginUrl, isEmptyElementValue, isEmptyValue, isFeaturesFilterValue, isFillSize, isFrSize, isGridNode, isHiddenEmptyValue, isHookActive, isLayerService, isNotValidSelectedTab, isNumeric, isObject, isProxyService, isRootOwningContainer, isTreeFilterValue, isVisibleContainer, mapNodeById, mergeAttributeConfigurations, metersPerPixel, noMarginMixin, numberOptions, parseFrValue, parseIconNames, parseIconNamesFromClientStyle, pieChartTooltipFromAttributes, pieChartTooltipFromRelatedFeatures, pointOptions, removeDataSource, removeTracks, replaceNodesByIds, rgbToHex, roundFr, roundTotalSum, setLayoutChildren, sizeCssMixin, sliceShownOtherItems, stretchPalette, timeOptions, toConditionsArray, toCssSize, toFrSize, toPxNumber, toRenderableValue, tooltipNameFromAttributes, tooltipValueFromAttributes, tooltipValueFromRelatedFeatures, transparentizeColor, updateDataSource, useAfterSave, useAppHeight, useAttachmentDownload, useAttachmentItems, useAttachmentPreviewImages, useAttachmentsView, useAutoCompleteControl, useBeforeSave, useBgImageHost, useChartChange, useChartData, useConfigDataSources, useContainerAttributes, useContainerRoot, useCurrentPageLayers, useCustomFeatureSelect, useDashboardHeader, useDataSourceLoading, useDataSources, useDebouncedCallback, useDiffPage, useEditGroupAttributes, useEqualTileWidth, useExpandableContainers, useExportPdf, useFeatureSaveHooks, useFetchImageWithAuth, useFetchWithAuth, useGetConfigLayer, useGlobalContext, useHeaderRender, useHideIfEmptyDataSource, useLayerHiddenAttributes, useLayerParams, useMapContext, useMapDraw, useMapImages, useMaxZoomTo, useProjectDashboardInit, usePythonSandbox, usePythonTask, useRedrawLayer, useRelatedDataSourceAttributes, useRemoteTask, useRenderElement, useResizeBox, useResizeDrag, useSavePrototypeBuilder, useServerNotificationsContext, useShownOtherItems, useToggle, useUpdateDataSource, useVisibleProjectItems, useWidgetConfig, useWidgetContext, useWidgetFilters, useWidgetPage, useWindowResize, useWrapperSize, useZoomToFeatures, useZoomToPoint, withTrackSize };
19632
19968
  //# sourceMappingURL=react.esm.js.map