@evergis/react 3.1.52 → 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.
@@ -1,4 +1,3 @@
1
- export declare const Container: any;
2
1
  export declare const ContainerAlias: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & {
3
2
  hasBottomMargin?: boolean;
4
3
  }, never>;
@@ -1,3 +1,4 @@
1
+ export declare const Container: any;
1
2
  export declare const ContainerWrapper: any;
2
3
  export declare const DashboardChip: import('styled-components').StyledComponent<any, any, any, any>;
3
4
  export declare const DashboardPlaceholderWrap: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
package/dist/index.js CHANGED
@@ -4576,34 +4576,6 @@ const getChartMarkers = (items, markers, dataSources) => {
4576
4576
  })) || []);
4577
4577
  };
4578
4578
 
4579
- const ChartLegendContainer = styled(uilibGl.Flex) `
4580
- flex-direction: column;
4581
- flex-wrap: wrap;
4582
- justify-content: ${({ twoColumns }) => (twoColumns ? "flex-start" : "center")};
4583
- `;
4584
- const ChartLegendItem = styled(uilibGl.Flex) `
4585
- cursor: ${({ onClick }) => (onClick ? "pointer" : "default")};
4586
- align-items: center;
4587
- flex-wrap: nowrap;
4588
- width: auto;
4589
- margin-right: 0.375rem;
4590
- margin-bottom: 0.25rem;
4591
- line-height: 0.75rem;
4592
- opacity: ${({ isFiltered, hasAnyFilter }) => (isFiltered ? 1 : hasAnyFilter ? FILTERED_VALUE_OPACITY / 100 : 1)};
4593
- `;
4594
- const ChartLegendColor = styled.div `
4595
- width: 0.5rem;
4596
- height: 0.5rem;
4597
- margin-right: 0.375rem;
4598
- background-color: ${({ color }) => color};
4599
- border-radius: ${({ theme: { borderRadius } }) => borderRadius.tiny};
4600
- `;
4601
- const ChartLegendName = styled.div `
4602
- flex: 1;
4603
- font-size: ${({ $fontSize }) => $fontSize || "0.625rem"};
4604
- color: ${({ theme: { palette }, $fontColor }) => $fontColor || palette.textPrimary};
4605
- `;
4606
-
4607
4579
  const LayerGroupContainer = styled(uilibGl.Flex) `
4608
4580
  display: flex;
4609
4581
  justify-content: center;
@@ -5132,6 +5104,43 @@ const LayerListContainer = styled(uilibGl.Flex) `
5132
5104
  box-sizing: border-box;
5133
5105
  `;
5134
5106
 
5107
+ const Container = styled(uilibGl.Flex) `
5108
+ flex-direction: column;
5109
+ width: 100%;
5110
+
5111
+ ${({ isColumn }) => isColumn
5112
+ ? styled.css `
5113
+ > * {
5114
+ width: 100%;
5115
+ }
5116
+ `
5117
+ : styled.css `
5118
+ flex-direction: row;
5119
+ justify-content: space-between;
5120
+ align-items: center;
5121
+ `}
5122
+
5123
+ ${({ isMain, isColumn }) => (isMain || isColumn) &&
5124
+ styled.css `
5125
+ > :not(:last-child) {
5126
+ margin-bottom: 1.5rem;
5127
+ }
5128
+ `}
5129
+
5130
+ ${({ isTitle }) => isTitle &&
5131
+ styled.css `
5132
+ &&&& {
5133
+ margin-bottom: 0.75rem;
5134
+ }
5135
+ `}
5136
+
5137
+ ${({ noBorders }) => noBorders && styled.css `
5138
+ ${ContainerWrapper} {
5139
+ box-shadow: none;
5140
+ padding: 0;
5141
+ }
5142
+ `}
5143
+ `;
5135
5144
  const ContainerWrapper = styled(uilibGl.Flex) `
5136
5145
  position: relative;
5137
5146
  box-sizing: border-box;
@@ -5398,43 +5407,43 @@ const FeatureControls = styled(uilibGl.Flex) `
5398
5407
  }
5399
5408
  `;
5400
5409
 
5401
- const Container = styled(uilibGl.Flex) `
5410
+ const ContainersGroupContainer = React.memo(({ elementConfig, type, renderElement }) => {
5411
+ const { expandedContainers } = useWidgetContext(type);
5412
+ const { id, children, options, style } = elementConfig || {};
5413
+ const { column, expandable, expanded } = options || {};
5414
+ const isColumn = column === undefined || column;
5415
+ const isVisible = isVisibleContainer(id, expandable, expanded, expandedContainers);
5416
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), isVisible && (jsxRuntime.jsx(Container, { id: id, isColumn: isColumn, children: jsxRuntime.jsx(ContainerChildren, { items: children, elementConfig: elementConfig, isColumn: isColumn, isMain: id?.startsWith(CONFIG_PAGE_ID), renderElement: renderElement }) }))] }));
5417
+ });
5418
+
5419
+ const ChartLegendContainer = styled(uilibGl.Flex) `
5402
5420
  flex-direction: column;
5403
- width: 100%;
5404
-
5405
- ${({ isColumn }) => isColumn
5406
- ? styled.css `
5407
- > * {
5408
- width: 100%;
5409
- }
5410
- `
5411
- : styled.css `
5412
- flex-direction: row;
5413
- justify-content: space-between;
5414
- align-items: center;
5415
- `}
5416
-
5417
- ${({ isMain, isColumn }) => (isMain || isColumn) &&
5418
- styled.css `
5419
- > :not(:last-child) {
5420
- margin-bottom: 1.5rem;
5421
- }
5422
- `}
5423
-
5424
- ${({ isTitle }) => isTitle &&
5425
- styled.css `
5426
- &&&& {
5427
- margin-bottom: 0.75rem;
5428
- }
5429
- `}
5430
-
5431
- ${({ noBorders }) => noBorders && styled.css `
5432
- ${ContainerWrapper} {
5433
- box-shadow: none;
5434
- padding: 0;
5435
- }
5436
- `}
5421
+ flex-wrap: wrap;
5422
+ justify-content: ${({ twoColumns }) => (twoColumns ? "flex-start" : "center")};
5423
+ `;
5424
+ const ChartLegendItem = styled(uilibGl.Flex) `
5425
+ cursor: ${({ onClick }) => (onClick ? "pointer" : "default")};
5426
+ align-items: center;
5427
+ flex-wrap: nowrap;
5428
+ width: auto;
5429
+ margin-right: 0.375rem;
5430
+ margin-bottom: 0.25rem;
5431
+ line-height: 0.75rem;
5432
+ opacity: ${({ isFiltered, hasAnyFilter }) => (isFiltered ? 1 : hasAnyFilter ? FILTERED_VALUE_OPACITY / 100 : 1)};
5433
+ `;
5434
+ const ChartLegendColor = styled.div `
5435
+ width: 0.5rem;
5436
+ height: 0.5rem;
5437
+ margin-right: 0.375rem;
5438
+ background-color: ${({ color }) => color};
5439
+ border-radius: ${({ theme: { borderRadius } }) => borderRadius.tiny};
5437
5440
  `;
5441
+ const ChartLegendName = styled.div `
5442
+ flex: 1;
5443
+ font-size: ${({ $fontSize }) => $fontSize || "0.625rem"};
5444
+ color: ${({ theme: { palette }, $fontColor }) => $fontColor || palette.textPrimary};
5445
+ `;
5446
+
5438
5447
  const ContainerAlias = styled(uilibGl.Flex) `
5439
5448
  align-items: center;
5440
5449
  flex-wrap: nowrap;
@@ -5548,15 +5557,6 @@ const TwoColumnContainerWrapper = styled(uilibGl.Flex) `
5548
5557
  }
5549
5558
  `;
5550
5559
 
5551
- const ContainersGroupContainer = React.memo(({ elementConfig, type, renderElement }) => {
5552
- const { expandedContainers } = useWidgetContext(type);
5553
- const { id, children, options, style } = elementConfig || {};
5554
- const { column, expandable, expanded } = options || {};
5555
- const isColumn = column === undefined || column;
5556
- const isVisible = isVisibleContainer(id, expandable, expanded, expandedContainers);
5557
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), isVisible && (jsxRuntime.jsx(Container, { id: id, isColumn: isColumn, children: jsxRuntime.jsx(ContainerChildren, { items: children, elementConfig: elementConfig, isColumn: isColumn, isMain: id?.startsWith(CONFIG_PAGE_ID), renderElement: renderElement }) }))] }));
5558
- });
5559
-
5560
5560
  const OneColumnContainer = React.memo(({ elementConfig, renderElement }) => {
5561
5561
  const { id, options, style } = elementConfig || {};
5562
5562
  const { innerTemplateStyle, hideEmpty } = options || {};
@@ -10758,6 +10758,7 @@ exports.Chart = Chart;
10758
10758
  exports.ChartContainer = ChartContainer;
10759
10759
  exports.ChartLegend = ChartLegend;
10760
10760
  exports.ChartLoading = ChartLoading;
10761
+ exports.Container = Container;
10761
10762
  exports.ContainerChildren = ContainerChildren;
10762
10763
  exports.ContainerLoading = ContainerLoading;
10763
10764
  exports.ContainerWrapper = ContainerWrapper;