@evergis/react 3.1.51 → 3.1.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
2
- import { IconButton, Flex, transition, Chip, Icon, Description, FlexSpan, IconToggle, Popup, Menu, DraggableTree, shadows, Divider, LegendToggler, Tooltip as Tooltip$1, DropdownField, MultiSelectContainer, IconButtonButton, FlatButton, DraggableTreeContainer, UploaderItemArea, UploaderTitleWrapper, Uploader, WaitingButton, LinearProgress, H2, ThemeProvider, defaultTheme, Preview, Blank, Popover, Expander, darkTheme, NumberRangeSlider, useAsyncAutocomplete, AutoComplete, Dropdown, Checkbox, CircularProgress, RangeNumberInput, dateFormat } from '@evergis/uilib-gl';
2
+ import { IconButton, Flex, transition, Chip, Divider, Icon, Description, FlexSpan, IconToggle, Popup, Menu, DraggableTree, shadows, LegendToggler, Tooltip as Tooltip$1, DropdownField, MultiSelectContainer, IconButtonButton, FlatButton, DraggableTreeContainer, UploaderItemArea, UploaderTitleWrapper, Uploader, WaitingButton, LinearProgress, H2, ThemeProvider, defaultTheme, Preview, Blank, Popover, Expander, darkTheme, NumberRangeSlider, useAsyncAutocomplete, AutoComplete, Dropdown, Checkbox, CircularProgress, RangeNumberInput, dateFormat } from '@evergis/uilib-gl';
3
3
  import { createContext, memo, useRef, useState, useEffect, useCallback, useContext, useMemo, Fragment } from 'react';
4
4
  import styled, { createGlobalStyle, css, useTheme } from 'styled-components';
5
5
  import { lineChartClassNames, BarChart as BarChart$1, barChartClassNames, LineChart, PieChart } from '@evergis/charts';
@@ -4505,183 +4505,74 @@ const DashboardChip$1 = styled(Chip) `
4505
4505
  ${({ $fontColor, $isDefault }) => !!$fontColor && !$isDefault && CustomChipColorMixin}
4506
4506
  `;
4507
4507
 
4508
- const ChartLegendContainer = styled(Flex) `
4509
- flex-direction: column;
4510
- flex-wrap: wrap;
4511
- justify-content: ${({ twoColumns }) => (twoColumns ? "flex-start" : "center")};
4512
- `;
4513
- const ChartLegendItem = styled(Flex) `
4514
- cursor: ${({ onClick }) => (onClick ? "pointer" : "default")};
4515
- align-items: center;
4516
- flex-wrap: nowrap;
4517
- width: auto;
4518
- margin-right: 0.375rem;
4519
- margin-bottom: 0.25rem;
4520
- line-height: 0.75rem;
4521
- opacity: ${({ isFiltered, hasAnyFilter }) => (isFiltered ? 1 : hasAnyFilter ? FILTERED_VALUE_OPACITY / 100 : 1)};
4522
- `;
4523
- const ChartLegendColor = styled.div `
4524
- width: 0.5rem;
4525
- height: 0.5rem;
4526
- margin-right: 0.375rem;
4527
- background-color: ${({ color }) => color};
4528
- border-radius: ${({ theme: { borderRadius } }) => borderRadius.tiny};
4529
- `;
4530
- const ChartLegendName = styled.div `
4531
- flex: 1;
4532
- font-size: ${({ $fontSize }) => $fontSize || "0.625rem"};
4533
- color: ${({ theme: { palette }, $fontColor }) => $fontColor || palette.textPrimary};
4534
- `;
4508
+ const getAttributeByName = (attributeName, attributes) => {
4509
+ return Array.isArray(attributeName)
4510
+ ? null
4511
+ : attributeName
4512
+ ? attributes?.find(({ name }) => name === attributeName)
4513
+ : null;
4514
+ };
4535
4515
 
4536
- const Container = styled(Flex) `
4537
- flex-direction: column;
4538
- width: 100%;
4539
-
4540
- ${({ isColumn }) => isColumn
4541
- ? css `
4542
- > * {
4543
- width: 100%;
4544
- }
4545
- `
4546
- : css `
4547
- flex-direction: row;
4548
- justify-content: space-between;
4549
- align-items: center;
4550
- `}
4551
-
4552
- ${({ isMain, isColumn }) => (isMain || isColumn) &&
4553
- css `
4554
- > :not(:last-child) {
4555
- margin-bottom: 1.5rem;
4556
- }
4557
- `}
4558
-
4559
- ${({ isTitle }) => isTitle &&
4560
- css `
4561
- &&&& {
4562
- margin-bottom: 0.75rem;
4563
- }
4564
- `}
4565
-
4566
- ${({ noBorders }) => noBorders && css `
4567
- ${ContainerWrapper} {
4568
- box-shadow: none;
4569
- padding: 0;
4570
- }
4571
- `}
4572
- `;
4573
- const ContainerAlias = styled(Flex) `
4574
- align-items: center;
4575
- flex-wrap: nowrap;
4576
- margin-bottom: ${({ hasBottomMargin }) => (hasBottomMargin ? 0.25 : 0)}rem;
4577
- font-size: 0.75rem;
4578
- color: ${({ theme: { palette } }) => palette.textSecondary};
4579
-
4580
- span[kind] {
4581
- margin-right: 0.5rem;
4582
-
4583
- :after {
4584
- color: ${({ theme: { palette } }) => palette.primary};
4585
- }
4586
- }
4587
- `;
4588
- const ContainerAliasIcon = styled.div `
4589
- margin-right: 0.5rem;
4590
- `;
4591
- const ContainerChart = styled(Flex) `
4592
- justify-content: flex-start;
4593
-
4594
- > * {
4595
- display: flex;
4596
- justify-content: center;
4597
- width: 100%;
4598
- }
4599
- `;
4600
- const ContainerLegend = styled(Flex) ``;
4601
- const ContainerUnits = styled.div `
4602
- margin-left: 0.5rem;
4603
- white-space: nowrap;
4604
- font-size: 0.75rem;
4605
- `;
4606
- const ContainerValue = styled(Flex) `
4607
- justify-content: flex-end;
4608
- align-items: center;
4609
- flex-wrap: nowrap;
4610
- width: 100%;
4611
- font-size: ${({ big }) => (big ? 1.5 : 1)}rem;
4612
- color: ${({ fontColor, theme: { palette } }) => fontColor || palette.textPrimary};
4613
-
4614
- > * {
4615
- width: ${({ column }) => (column ? "100%" : "auto")};
4616
- }
4617
-
4618
- ${ContainerChart}, ${ContainerLegend} {
4619
- width: ${({ column }) => (column ? "100%" : "50%")};
4620
- }
4621
-
4622
- ${ContainerLegend} {
4623
- margin-left: ${({ column }) => (column ? 0 : "1rem")};
4624
- }
4625
-
4626
- ${ChartLegendContainer} {
4627
- flex-direction: ${({ column }) => (column ? "row" : "column")};
4628
- margin-top: ${({ column }) => (column ? "1rem" : 0)};
4629
- }
4630
- `;
4631
- const ColorIconMixin = css `
4632
- :after {
4633
- color: ${({ $fontColor }) => $fontColor} !important;
4634
- }
4635
- `;
4636
- const SizeIconMixin = css `
4637
- :after {
4638
- font-size: ${({ $fontSize }) => $fontSize}px !important;
4639
- }
4640
- `;
4641
- const ContainerIcon = styled(Icon) `
4642
- width: auto;
4643
- height: auto;
4644
- margin-bottom: 0.5rem;
4645
- ${({ $fontColor }) => !!$fontColor && ColorIconMixin};
4646
- ${({ $fontSize }) => !!$fontSize && SizeIconMixin};
4647
- `;
4648
- const SvgContainerColorMixin$1 = css `
4649
- path,
4650
- line,
4651
- circle {
4652
- fill: ${({ $fontColor }) => $fontColor};
4653
- }
4654
- `;
4655
- const SvgContainer$1 = styled.div `
4656
- &&& {
4657
- min-width: ${({ $width }) => ($width ? `${$width}px` : "1rem")};
4658
- max-width: ${({ $width }) => ($width ? `${$width}px` : "1rem")};
4659
-
4660
- ${({ $fontColor }) => !!$fontColor && SvgContainerColorMixin$1};
4661
-
4662
- > * {
4663
- min-width: inherit;
4664
- }
4665
- }
4666
- `;
4667
- const TwoColumnContainerWrapper = styled(Flex) `
4668
- width: 100%;
4669
- flex-direction: row;
4670
- flex-wrap: nowrap;
4671
- align-items: center;
4672
-
4673
- > * {
4674
- flex: 1;
4675
- }
4676
-
4677
- > ${ContainerValue} {
4678
- justify-content: flex-end;
4679
-
4680
- > * {
4681
- text-align: right;
4682
- }
4683
- }
4684
- `;
4516
+ const formatElementValue = ({ t, value, elementConfig, attributes, wrap, }) => {
4517
+ const { id, type, defaultValue, options, style, attributeName, templateName } = elementConfig || {};
4518
+ const attribute = attributeName ? getAttributeByName(attributeName, attributes) : null;
4519
+ const { fontColor, fontSize, noUnits, tagView, bgColor, withDivider, radius } = options || {};
4520
+ const valueOrDefault = value || defaultValue;
4521
+ const resultValue = type === "attributeValue" && attribute?.type && attribute?.stringFormat
4522
+ ? formatAttributeValue({
4523
+ t,
4524
+ type: attribute.type,
4525
+ value: valueOrDefault,
4526
+ stringFormat: attribute.stringFormat,
4527
+ noUnits,
4528
+ })
4529
+ : valueOrDefault;
4530
+ if (!wrap)
4531
+ return resultValue;
4532
+ return (jsxs(Fragment, { children: [tagView ? (jsx(DashboardChip$1, { text: resultValue, "$bgColor": bgColor, "$fontColor": fontColor, "$fontSize": fontSize, "$radius": radius, style: style })) : resultValue, withDivider && jsx(Divider, {})] }, id));
4533
+ };
4534
+
4535
+ const getAttributeValue = (element, attributes) => {
4536
+ const attribute = getAttributeByName(element?.attributeName, attributes);
4537
+ const { maxLength, separator, expandable, lineBreak } = element.options || {};
4538
+ let value = "";
4539
+ if (attribute?.type === AttributeType.Boolean && typeof attribute.value === "boolean") {
4540
+ return jsx(DashboardCheckbox, { title: attribute.alias || attribute.name, checked: attribute.value });
4541
+ }
4542
+ if (Array.isArray(element?.attributeName)) {
4543
+ const concatAttributes = element.attributeName.map((attributeName) => attributes?.find(({ name }) => name === attributeName)?.value || "");
4544
+ value = concatAttributes.join(separator || ", ");
4545
+ }
4546
+ else {
4547
+ value = attribute?.value?.toString() || "";
4548
+ }
4549
+ return maxLength && maxLength < value.length ? (jsx(TextTrim, { maxLength: maxLength, expandable: expandable, lineBreak: lineBreak, children: value })) : (value);
4550
+ };
4551
+
4552
+ const getChartAxes = (chartElement) => chartElement?.options?.relatedDataSources?.filter(({ chartAxis }) => chartAxis === "y");
4553
+
4554
+ const getChartFilterName = (relatedDataSources) => {
4555
+ const relatedAttributes = relatedDataSources || [];
4556
+ const axes = relatedAttributes.filter(({ chartAxis }) => chartAxis === "y");
4557
+ return axes?.[0]?.filterName;
4558
+ };
4559
+
4560
+ function getValueIndex(items, attributes) {
4561
+ return items?.findIndex(({ name }) => name.toString() === attributes.value?.toString());
4562
+ }
4563
+ const getChartMarkers = (items, markers, dataSources) => {
4564
+ if (typeof markers === "string") {
4565
+ const dataSource = getDataSource(markers, dataSources);
4566
+ return dataSource?.features?.map(({ attributes }) => ({
4567
+ ...attributes,
4568
+ value: getValueIndex(items, attributes),
4569
+ })) || [];
4570
+ }
4571
+ return (markers?.map(marker => ({
4572
+ ...marker,
4573
+ value: getValueIndex(items, marker),
4574
+ })) || []);
4575
+ };
4685
4576
 
4686
4577
  const LayerGroupContainer = styled(Flex) `
4687
4578
  display: flex;
@@ -5211,12 +5102,45 @@ const LayerListContainer = styled(Flex) `
5211
5102
  box-sizing: border-box;
5212
5103
  `;
5213
5104
 
5214
- const ElementValueWrapper = styled.div `
5215
- transition: background-color ${transition.toggle};
5105
+ const Container = styled(Flex) `
5106
+ flex-direction: column;
5107
+ width: 100%;
5108
+
5109
+ ${({ isColumn }) => isColumn
5110
+ ? css `
5111
+ > * {
5112
+ width: 100%;
5113
+ }
5114
+ `
5115
+ : css `
5116
+ flex-direction: row;
5117
+ justify-content: space-between;
5118
+ align-items: center;
5119
+ `}
5120
+
5121
+ ${({ isMain, isColumn }) => (isMain || isColumn) &&
5122
+ css `
5123
+ > :not(:last-child) {
5124
+ margin-bottom: 1.5rem;
5125
+ }
5126
+ `}
5127
+
5128
+ ${({ isTitle }) => isTitle &&
5129
+ css `
5130
+ &&&& {
5131
+ margin-bottom: 0.75rem;
5132
+ }
5133
+ `}
5134
+
5135
+ ${({ noBorders }) => noBorders && css `
5136
+ ${ContainerWrapper} {
5137
+ box-shadow: none;
5138
+ padding: 0;
5139
+ }
5140
+ `}
5216
5141
  `;
5217
5142
  const ContainerWrapper = styled(Flex) `
5218
5143
  position: relative;
5219
- min-height: 1rem;
5220
5144
  box-sizing: border-box;
5221
5145
  width: 100%;
5222
5146
  background: ${({ theme: { palette } }) => palette.backgroundAlpha};
@@ -5228,7 +5152,7 @@ const ContainerWrapper = styled(Flex) `
5228
5152
  z-index: ${({ $zIndex }) => $zIndex ?? 1};
5229
5153
  transition: background-color ${transition.toggle};
5230
5154
 
5231
- ${Container} > ${ElementValueWrapper}:not(:last-child) {
5155
+ ${Container} > :not(:last-child) {
5232
5156
  margin-bottom: 1.5rem;
5233
5157
  }
5234
5158
  `;
@@ -5481,75 +5405,6 @@ const FeatureControls = styled(Flex) `
5481
5405
  }
5482
5406
  `;
5483
5407
 
5484
- const getAttributeByName = (attributeName, attributes) => {
5485
- return Array.isArray(attributeName)
5486
- ? null
5487
- : attributeName
5488
- ? attributes?.find(({ name }) => name === attributeName)
5489
- : null;
5490
- };
5491
-
5492
- const formatElementValue = ({ t, value, elementConfig, attributes, wrap, }) => {
5493
- const { id, type, defaultValue, options, style, attributeName, templateName } = elementConfig || {};
5494
- const attribute = attributeName ? getAttributeByName(attributeName, attributes) : null;
5495
- const { fontColor, fontSize, noUnits, tagView, bgColor, withDivider, radius } = options || {};
5496
- const valueOrDefault = value || defaultValue;
5497
- const resultValue = type === "attributeValue" && attribute?.type && attribute?.stringFormat
5498
- ? formatAttributeValue({
5499
- t,
5500
- type: attribute.type,
5501
- value: valueOrDefault,
5502
- stringFormat: attribute.stringFormat,
5503
- noUnits,
5504
- })
5505
- : valueOrDefault;
5506
- if (!wrap)
5507
- return resultValue;
5508
- return (jsxs(Fragment, { children: [tagView ? (jsx(DashboardChip$1, { text: resultValue, "$bgColor": bgColor, "$fontColor": fontColor, "$fontSize": fontSize, "$radius": radius, style: style })) : (jsx(ElementValueWrapper, { "data-id": id, "data-templatename": templateName, style: style, children: resultValue })), withDivider && jsx(Divider, {})] }, id));
5509
- };
5510
-
5511
- const getAttributeValue = (element, attributes) => {
5512
- const attribute = getAttributeByName(element?.attributeName, attributes);
5513
- const { maxLength, separator, expandable, lineBreak } = element.options || {};
5514
- let value = "";
5515
- if (attribute?.type === AttributeType.Boolean && typeof attribute.value === "boolean") {
5516
- return jsx(DashboardCheckbox, { title: attribute.alias || attribute.name, checked: attribute.value });
5517
- }
5518
- if (Array.isArray(element?.attributeName)) {
5519
- const concatAttributes = element.attributeName.map((attributeName) => attributes?.find(({ name }) => name === attributeName)?.value || "");
5520
- value = concatAttributes.join(separator || ", ");
5521
- }
5522
- else {
5523
- value = attribute?.value?.toString() || "";
5524
- }
5525
- return maxLength && maxLength < value.length ? (jsx(TextTrim, { maxLength: maxLength, expandable: expandable, lineBreak: lineBreak, children: value })) : (value);
5526
- };
5527
-
5528
- const getChartAxes = (chartElement) => chartElement?.options?.relatedDataSources?.filter(({ chartAxis }) => chartAxis === "y");
5529
-
5530
- const getChartFilterName = (relatedDataSources) => {
5531
- const relatedAttributes = relatedDataSources || [];
5532
- const axes = relatedAttributes.filter(({ chartAxis }) => chartAxis === "y");
5533
- return axes?.[0]?.filterName;
5534
- };
5535
-
5536
- function getValueIndex(items, attributes) {
5537
- return items?.findIndex(({ name }) => name.toString() === attributes.value?.toString());
5538
- }
5539
- const getChartMarkers = (items, markers, dataSources) => {
5540
- if (typeof markers === "string") {
5541
- const dataSource = getDataSource(markers, dataSources);
5542
- return dataSource?.features?.map(({ attributes }) => ({
5543
- ...attributes,
5544
- value: getValueIndex(items, attributes),
5545
- })) || [];
5546
- }
5547
- return (markers?.map(marker => ({
5548
- ...marker,
5549
- value: getValueIndex(items, marker),
5550
- })) || []);
5551
- };
5552
-
5553
5408
  const ContainersGroupContainer = memo(({ elementConfig, type, renderElement }) => {
5554
5409
  const { expandedContainers } = useWidgetContext(type);
5555
5410
  const { id, children, options, style } = elementConfig || {};
@@ -5559,6 +5414,147 @@ const ContainersGroupContainer = memo(({ elementConfig, type, renderElement }) =
5559
5414
  return (jsxs(Fragment$1, { children: [jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), isVisible && (jsx(Container, { id: id, isColumn: isColumn, children: jsx(ContainerChildren, { items: children, elementConfig: elementConfig, isColumn: isColumn, isMain: id?.startsWith(CONFIG_PAGE_ID), renderElement: renderElement }) }))] }));
5560
5415
  });
5561
5416
 
5417
+ const ChartLegendContainer = styled(Flex) `
5418
+ flex-direction: column;
5419
+ flex-wrap: wrap;
5420
+ justify-content: ${({ twoColumns }) => (twoColumns ? "flex-start" : "center")};
5421
+ `;
5422
+ const ChartLegendItem = styled(Flex) `
5423
+ cursor: ${({ onClick }) => (onClick ? "pointer" : "default")};
5424
+ align-items: center;
5425
+ flex-wrap: nowrap;
5426
+ width: auto;
5427
+ margin-right: 0.375rem;
5428
+ margin-bottom: 0.25rem;
5429
+ line-height: 0.75rem;
5430
+ opacity: ${({ isFiltered, hasAnyFilter }) => (isFiltered ? 1 : hasAnyFilter ? FILTERED_VALUE_OPACITY / 100 : 1)};
5431
+ `;
5432
+ const ChartLegendColor = styled.div `
5433
+ width: 0.5rem;
5434
+ height: 0.5rem;
5435
+ margin-right: 0.375rem;
5436
+ background-color: ${({ color }) => color};
5437
+ border-radius: ${({ theme: { borderRadius } }) => borderRadius.tiny};
5438
+ `;
5439
+ const ChartLegendName = styled.div `
5440
+ flex: 1;
5441
+ font-size: ${({ $fontSize }) => $fontSize || "0.625rem"};
5442
+ color: ${({ theme: { palette }, $fontColor }) => $fontColor || palette.textPrimary};
5443
+ `;
5444
+
5445
+ const ContainerAlias = styled(Flex) `
5446
+ align-items: center;
5447
+ flex-wrap: nowrap;
5448
+ margin-bottom: ${({ hasBottomMargin }) => (hasBottomMargin ? 0.25 : 0)}rem;
5449
+ font-size: 0.75rem;
5450
+ color: ${({ theme: { palette } }) => palette.textSecondary};
5451
+
5452
+ span[kind] {
5453
+ margin-right: 0.5rem;
5454
+
5455
+ :after {
5456
+ color: ${({ theme: { palette } }) => palette.primary};
5457
+ }
5458
+ }
5459
+ `;
5460
+ const ContainerAliasIcon = styled.div `
5461
+ margin-right: 0.5rem;
5462
+ `;
5463
+ const ContainerChart = styled(Flex) `
5464
+ justify-content: flex-start;
5465
+
5466
+ > * {
5467
+ display: flex;
5468
+ justify-content: center;
5469
+ width: 100%;
5470
+ }
5471
+ `;
5472
+ const ContainerLegend = styled(Flex) ``;
5473
+ const ContainerUnits = styled.div `
5474
+ margin-left: 0.5rem;
5475
+ white-space: nowrap;
5476
+ font-size: 0.75rem;
5477
+ `;
5478
+ const ContainerValue = styled(Flex) `
5479
+ justify-content: flex-end;
5480
+ align-items: center;
5481
+ flex-wrap: nowrap;
5482
+ width: 100%;
5483
+ font-size: ${({ big }) => (big ? 1.5 : 1)}rem;
5484
+ color: ${({ fontColor, theme: { palette } }) => fontColor || palette.textPrimary};
5485
+
5486
+ > * {
5487
+ width: ${({ column }) => (column ? "100%" : "auto")};
5488
+ }
5489
+
5490
+ ${ContainerChart}, ${ContainerLegend} {
5491
+ width: ${({ column }) => (column ? "100%" : "50%")};
5492
+ }
5493
+
5494
+ ${ContainerLegend} {
5495
+ margin-left: ${({ column }) => (column ? 0 : "1rem")};
5496
+ }
5497
+
5498
+ ${ChartLegendContainer} {
5499
+ flex-direction: ${({ column }) => (column ? "row" : "column")};
5500
+ margin-top: ${({ column }) => (column ? "1rem" : 0)};
5501
+ }
5502
+ `;
5503
+ const ColorIconMixin = css `
5504
+ :after {
5505
+ color: ${({ $fontColor }) => $fontColor} !important;
5506
+ }
5507
+ `;
5508
+ const SizeIconMixin = css `
5509
+ :after {
5510
+ font-size: ${({ $fontSize }) => $fontSize}px !important;
5511
+ }
5512
+ `;
5513
+ const ContainerIcon = styled(Icon) `
5514
+ width: auto;
5515
+ height: auto;
5516
+ margin-bottom: 0.5rem;
5517
+ ${({ $fontColor }) => !!$fontColor && ColorIconMixin};
5518
+ ${({ $fontSize }) => !!$fontSize && SizeIconMixin};
5519
+ `;
5520
+ const SvgContainerColorMixin$1 = css `
5521
+ path,
5522
+ line,
5523
+ circle {
5524
+ fill: ${({ $fontColor }) => $fontColor};
5525
+ }
5526
+ `;
5527
+ const SvgContainer$1 = styled.div `
5528
+ &&& {
5529
+ min-width: ${({ $width }) => ($width ? `${$width}px` : "1rem")};
5530
+ max-width: ${({ $width }) => ($width ? `${$width}px` : "1rem")};
5531
+
5532
+ ${({ $fontColor }) => !!$fontColor && SvgContainerColorMixin$1};
5533
+
5534
+ > * {
5535
+ min-width: inherit;
5536
+ }
5537
+ }
5538
+ `;
5539
+ const TwoColumnContainerWrapper = styled(Flex) `
5540
+ width: 100%;
5541
+ flex-direction: row;
5542
+ flex-wrap: nowrap;
5543
+ align-items: center;
5544
+
5545
+ > * {
5546
+ flex: 1;
5547
+ }
5548
+
5549
+ > ${ContainerValue} {
5550
+ justify-content: flex-end;
5551
+
5552
+ > * {
5553
+ text-align: right;
5554
+ }
5555
+ }
5556
+ `;
5557
+
5562
5558
  const OneColumnContainer = memo(({ elementConfig, renderElement }) => {
5563
5559
  const { id, options, style } = elementConfig || {};
5564
5560
  const { innerTemplateStyle, hideEmpty } = options || {};
@@ -6765,7 +6761,7 @@ const UploadContainer = memo(({ type, elementConfig, renderElement }) => {
6765
6761
  const onUpload = useCallback(async (input) => {
6766
6762
  const files = Array.isArray(input) ? input : [input];
6767
6763
  const response = await Promise.all(files.map(file => {
6768
- return api.file.upload(file, true, parentResourceId);
6764
+ return api.file.upload(file, true, parentResourceId, file.name);
6769
6765
  }));
6770
6766
  const uploadedFiles = response.map(item => ({
6771
6767
  name: item.name,
@@ -10749,5 +10745,5 @@ const Map$1 = ({ zIndex, lowerSiblings, upperSiblings, onError, children, ...res
10749
10745
  }, children: children }), upperSiblings] }));
10750
10746
  };
10751
10747
 
10752
- export { AddFeatureButton, AddFeatureContainer, AttributeGalleryContainer, AttributeLabel, BaseMapTheme, CONFIG_PAGES_ID, CONFIG_PAGE_ID, CameraContainer, Chart, ChartContainer, ChartLegend, ChartLoading, ContainerChildren, ContainerLoading, ContainerTemplate, ContainerWrapper, ContainersGroupContainer, DEFAULT_ATTRIBUTE_NAME, DEFAULT_BARCHART_RADIUS, DEFAULT_BASE_MAP, DEFAULT_CHART_ANGLE, DEFAULT_CHART_HEIGHT, DEFAULT_CHART_WIDTH, DEFAULT_CIRCLE_PAINT, DEFAULT_DASHBOARD_CONFIG, DEFAULT_DATA_SOURCE_LIMIT, DEFAULT_FILL_EXTRUSION_PAINT, DEFAULT_FILL_PAINT, DEFAULT_ID_ATTRIBUTE_NAME, DEFAULT_LAT, DEFAULT_LINE_PAINT, DEFAULT_LNG, DEFAULT_PAGES_CONFIG, DEFAULT_PIECHART_RADIUS, DEFAULT_ZOOM, Dashboard, DashboardCheckbox, DashboardChip, DashboardContent, DashboardContext, DashboardDefaultHeader, DashboardHeader, DashboardLoading, DashboardPlaceholder, DashboardPlaceholderWrap, DashboardProvider, DashboardWrapper, DataSourceContainer, DataSourceError, DataSourceErrorContainer, DataSourceInnerContainer, DataSourceProgressContainer, DateFormat, DefaultAttributesContainer, DefaultHeaderContainer, DefaultHeaderWrapper, DividerContainer, EditGeometryType, ElementButton, ElementCamera, ElementChart, ElementChips, ElementIcon, ElementImage, ElementLegend, ElementLink, ElementMarkdown, ElementSlideshow, ElementSvg, ElementTooltip, ElementValueWrapper, ExpandableTitle, FEATURE_CARD_DEFAULT_COLORS, FEATURE_CARD_OTHER_COLOR, FILTERED_VALUE_OPACITY, FILTER_PREFIX, FeatureCardButtons, FeatureCardContext, FeatureCardDefaultHeader, FeatureCardGradientHeader, FeatureCardHeader, FeatureCardIconHeader, FeatureCardProvider, FeatureCardSlideshowHeader, FeatureCardTitle, FeatureControls, FeatureTitleContainer, FiltersContainer, GEOMETRY_ATTRIBUTE, GlobalContext, GlobalProvider, Header, HeaderContainer, HeaderFrontView, HeaderTemplate, HeaderTitleContainer, HiddenTitleItems, IconContainer, ImageContainer, LEFT_PANEL_HEADER_HEIGHT, Layer, LayerDescription, LayerGroup, LayerGroupList, LayerIcon, LayerListContainer, LayerTree, LayersContainer, LayersListWrapper, LinearProgressContainer, LogoContainer, MAX_CHART_WIDTH, Map$1 as Map, MapContext, MapProvider, NO_CONTENT_VALUE, NUMERIC_ATTRIBUTE_TYPES, NoLiveSnapshotContainer, OneColumnContainer, PageNavigator, PageTitle, PagesContainer, Pagination, PresentationHeader, PresentationHeaderButtons, PresentationHeaderTools, PresentationPanelContainer, PresentationPanelWrapper, PresentationWrapper, ProgressContainer, RoundedBackgroundContainer, SERVER_NOTIFICATION_EVENT, ScalingFactor, ServerNotificationsContext, ServerNotificationsProvider, SlideshowContainer, SmallPreviewContainer$1 as SmallPreviewContainer, SmallPreviewControl, SmallPreviewCounter, SmallPreviewImages, SmallPreviewLeft, SmallPreviewRight, StackBar, SvgImage, TIME_ZONE_FORMAT, TabsContainer, TextTrim, ThemeName, TitleContainer, TmsType, TopContainer, TopContainerButtons, TwoColumnContainer, UploadContainer, WidgetType, addDataSource, addDataSources, applyFiltersToCondition, applyQueryFilters, applyVarsToCondition, checkEqualOrIncludes, checkIsLoading, convertSpToTurfFeature, createConfigLayer, createConfigPage, createNewPageId, createTreeNode, dateOptions, debounce, decimalOpacityToHex, eqlParametersToPayload, findAttributeInExpression, formatArea, formatAttributeValue, formatChartRelatedValue, formatConditionValue, formatDataSourceCondition, formatDate$1 as formatDate, formatElementValue, formatLength, formatNumber, formatPolygonMeasure, getActualExtrusionHeight, getAttributeByName, getAttributeValue, getAttributesConfiguration, getChartAxes, getChartFilterName, getChartMarkers, getConfigFilter, getContainerComponent, getDashboardHeader, getDataFromAttributes, getDataFromRelatedFeatures, getDataSource, getDataSourceFilterValue, getDate, getDefaultConfig, getElementValue, getFeatureAttributes, getFeatureCardHeader, getFilterComponent, getFilterSelectedItems, getFilterValue, getFormattedAttributes, getGradientColors, getLayerDefinition, getLayerInfo, getLayerInfoFromDataSources, getPagesFromConfig, getPagesFromProjectInfo, getProxyService, getRelatedAttribute, getRenderElement, getResourceUrl, getRootElementId, getSelectedFilterValue, getSlideshowImages, getSvgUrl, getTotalFromAttributes, getTotalFromRelatedFeatures, hexToRgba, isCompositeLayerConfiguration, isEmptyElementValue, isEmptyValue, isHiddenEmptyValue, isLayerService, isNotValidSelectedTab, isNumeric, isObject, isProxyService, isVisibleContainer, numberOptions, parseClientStyle, pieChartTooltipFromAttributes, pieChartTooltipFromRelatedFeatures, pointOptions, removeDataSource, rgbToHex, roundTotalSum, sliceShownOtherItems, timeOptions, tooltipNameFromAttributes, tooltipValueFromAttributes, tooltipValueFromRelatedFeatures, transparentizeColor, treeNodesToProjectItems, useAppHeight, useChartChange, useChartData, useDashboardHeader, useDataSources, useDebouncedCallback, useDiffPage, useExpandableContainers, useExportPdf, useGetConfigLayer, useGlobalContext, useHeaderRender, useLayerParams, useMapContext, useMapDraw, useProjectDashboardInit, usePythonTask, useRedrawLayer, useRelatedDataSourceAttributes, useRenderElement, useServerNotificationsContext, useShownOtherItems, useToggle, useUpdateDataSource, useWidgetConfig, useWidgetContext, useWidgetFilters, useWidgetPage, useWindowResize, useZoomToFeatures, useZoomToPoint };
10748
+ export { AddFeatureButton, AddFeatureContainer, AttributeGalleryContainer, AttributeLabel, BaseMapTheme, CONFIG_PAGES_ID, CONFIG_PAGE_ID, CameraContainer, Chart, ChartContainer, ChartLegend, ChartLoading, Container, ContainerChildren, ContainerLoading, ContainerTemplate, ContainerWrapper, ContainersGroupContainer, DEFAULT_ATTRIBUTE_NAME, DEFAULT_BARCHART_RADIUS, DEFAULT_BASE_MAP, DEFAULT_CHART_ANGLE, DEFAULT_CHART_HEIGHT, DEFAULT_CHART_WIDTH, DEFAULT_CIRCLE_PAINT, DEFAULT_DASHBOARD_CONFIG, DEFAULT_DATA_SOURCE_LIMIT, DEFAULT_FILL_EXTRUSION_PAINT, DEFAULT_FILL_PAINT, DEFAULT_ID_ATTRIBUTE_NAME, DEFAULT_LAT, DEFAULT_LINE_PAINT, DEFAULT_LNG, DEFAULT_PAGES_CONFIG, DEFAULT_PIECHART_RADIUS, DEFAULT_ZOOM, Dashboard, DashboardCheckbox, DashboardChip, DashboardContent, DashboardContext, DashboardDefaultHeader, DashboardHeader, DashboardLoading, DashboardPlaceholder, DashboardPlaceholderWrap, DashboardProvider, DashboardWrapper, DataSourceContainer, DataSourceError, DataSourceErrorContainer, DataSourceInnerContainer, DataSourceProgressContainer, DateFormat, DefaultAttributesContainer, DefaultHeaderContainer, DefaultHeaderWrapper, DividerContainer, EditGeometryType, ElementButton, ElementCamera, ElementChart, ElementChips, ElementIcon, ElementImage, ElementLegend, ElementLink, ElementMarkdown, ElementSlideshow, ElementSvg, ElementTooltip, ExpandableTitle, FEATURE_CARD_DEFAULT_COLORS, FEATURE_CARD_OTHER_COLOR, FILTERED_VALUE_OPACITY, FILTER_PREFIX, FeatureCardButtons, FeatureCardContext, FeatureCardDefaultHeader, FeatureCardGradientHeader, FeatureCardHeader, FeatureCardIconHeader, FeatureCardProvider, FeatureCardSlideshowHeader, FeatureCardTitle, FeatureControls, FeatureTitleContainer, FiltersContainer, GEOMETRY_ATTRIBUTE, GlobalContext, GlobalProvider, Header, HeaderContainer, HeaderFrontView, HeaderTemplate, HeaderTitleContainer, HiddenTitleItems, IconContainer, ImageContainer, LEFT_PANEL_HEADER_HEIGHT, Layer, LayerDescription, LayerGroup, LayerGroupList, LayerIcon, LayerListContainer, LayerTree, LayersContainer, LayersListWrapper, LinearProgressContainer, LogoContainer, MAX_CHART_WIDTH, Map$1 as Map, MapContext, MapProvider, NO_CONTENT_VALUE, NUMERIC_ATTRIBUTE_TYPES, NoLiveSnapshotContainer, OneColumnContainer, PageNavigator, PageTitle, PagesContainer, Pagination, PresentationHeader, PresentationHeaderButtons, PresentationHeaderTools, PresentationPanelContainer, PresentationPanelWrapper, PresentationWrapper, ProgressContainer, RoundedBackgroundContainer, SERVER_NOTIFICATION_EVENT, ScalingFactor, ServerNotificationsContext, ServerNotificationsProvider, SlideshowContainer, SmallPreviewContainer$1 as SmallPreviewContainer, SmallPreviewControl, SmallPreviewCounter, SmallPreviewImages, SmallPreviewLeft, SmallPreviewRight, StackBar, SvgImage, TIME_ZONE_FORMAT, TabsContainer, TextTrim, ThemeName, TitleContainer, TmsType, TopContainer, TopContainerButtons, TwoColumnContainer, UploadContainer, WidgetType, addDataSource, addDataSources, applyFiltersToCondition, applyQueryFilters, applyVarsToCondition, checkEqualOrIncludes, checkIsLoading, convertSpToTurfFeature, createConfigLayer, createConfigPage, createNewPageId, createTreeNode, dateOptions, debounce, decimalOpacityToHex, eqlParametersToPayload, findAttributeInExpression, formatArea, formatAttributeValue, formatChartRelatedValue, formatConditionValue, formatDataSourceCondition, formatDate$1 as formatDate, formatElementValue, formatLength, formatNumber, formatPolygonMeasure, getActualExtrusionHeight, getAttributeByName, getAttributeValue, getAttributesConfiguration, getChartAxes, getChartFilterName, getChartMarkers, getConfigFilter, getContainerComponent, getDashboardHeader, getDataFromAttributes, getDataFromRelatedFeatures, getDataSource, getDataSourceFilterValue, getDate, getDefaultConfig, getElementValue, getFeatureAttributes, getFeatureCardHeader, getFilterComponent, getFilterSelectedItems, getFilterValue, getFormattedAttributes, getGradientColors, getLayerDefinition, getLayerInfo, getLayerInfoFromDataSources, getPagesFromConfig, getPagesFromProjectInfo, getProxyService, getRelatedAttribute, getRenderElement, getResourceUrl, getRootElementId, getSelectedFilterValue, getSlideshowImages, getSvgUrl, getTotalFromAttributes, getTotalFromRelatedFeatures, hexToRgba, isCompositeLayerConfiguration, isEmptyElementValue, isEmptyValue, isHiddenEmptyValue, isLayerService, isNotValidSelectedTab, isNumeric, isObject, isProxyService, isVisibleContainer, numberOptions, parseClientStyle, pieChartTooltipFromAttributes, pieChartTooltipFromRelatedFeatures, pointOptions, removeDataSource, rgbToHex, roundTotalSum, sliceShownOtherItems, timeOptions, tooltipNameFromAttributes, tooltipValueFromAttributes, tooltipValueFromRelatedFeatures, transparentizeColor, treeNodesToProjectItems, useAppHeight, useChartChange, useChartData, useDashboardHeader, useDataSources, useDebouncedCallback, useDiffPage, useExpandableContainers, useExportPdf, useGetConfigLayer, useGlobalContext, useHeaderRender, useLayerParams, useMapContext, useMapDraw, useProjectDashboardInit, usePythonTask, useRedrawLayer, useRelatedDataSourceAttributes, useRenderElement, useServerNotificationsContext, useShownOtherItems, useToggle, useUpdateDataSource, useWidgetConfig, useWidgetContext, useWidgetFilters, useWidgetPage, useWindowResize, useZoomToFeatures, useZoomToPoint };
10753
10749
  //# sourceMappingURL=react.esm.js.map