@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/components/Dashboard/containers/styled.d.ts +0 -1
- package/dist/components/Dashboard/styled.d.ts +1 -1
- package/dist/index.js +247 -251
- package/dist/index.js.map +1 -1
- package/dist/react.esm.js +248 -252
- package/dist/react.esm.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const Container: any;
|
|
2
2
|
export declare const ContainerWrapper: any;
|
|
3
3
|
export declare const DashboardChip: import('styled-components').StyledComponent<any, any, any, any>;
|
|
4
4
|
export declare const DashboardPlaceholderWrap: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
|
package/dist/index.js
CHANGED
|
@@ -4507,183 +4507,74 @@ const DashboardChip$1 = styled(uilibGl.Chip) `
|
|
|
4507
4507
|
${({ $fontColor, $isDefault }) => !!$fontColor && !$isDefault && CustomChipColorMixin}
|
|
4508
4508
|
`;
|
|
4509
4509
|
|
|
4510
|
-
const
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
align-items: center;
|
|
4518
|
-
flex-wrap: nowrap;
|
|
4519
|
-
width: auto;
|
|
4520
|
-
margin-right: 0.375rem;
|
|
4521
|
-
margin-bottom: 0.25rem;
|
|
4522
|
-
line-height: 0.75rem;
|
|
4523
|
-
opacity: ${({ isFiltered, hasAnyFilter }) => (isFiltered ? 1 : hasAnyFilter ? FILTERED_VALUE_OPACITY / 100 : 1)};
|
|
4524
|
-
`;
|
|
4525
|
-
const ChartLegendColor = styled.div `
|
|
4526
|
-
width: 0.5rem;
|
|
4527
|
-
height: 0.5rem;
|
|
4528
|
-
margin-right: 0.375rem;
|
|
4529
|
-
background-color: ${({ color }) => color};
|
|
4530
|
-
border-radius: ${({ theme: { borderRadius } }) => borderRadius.tiny};
|
|
4531
|
-
`;
|
|
4532
|
-
const ChartLegendName = styled.div `
|
|
4533
|
-
flex: 1;
|
|
4534
|
-
font-size: ${({ $fontSize }) => $fontSize || "0.625rem"};
|
|
4535
|
-
color: ${({ theme: { palette }, $fontColor }) => $fontColor || palette.textPrimary};
|
|
4536
|
-
`;
|
|
4510
|
+
const getAttributeByName = (attributeName, attributes) => {
|
|
4511
|
+
return Array.isArray(attributeName)
|
|
4512
|
+
? null
|
|
4513
|
+
: attributeName
|
|
4514
|
+
? attributes?.find(({ name }) => name === attributeName)
|
|
4515
|
+
: null;
|
|
4516
|
+
};
|
|
4537
4517
|
|
|
4538
|
-
const
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
justify-content: center;
|
|
4599
|
-
width: 100%;
|
|
4600
|
-
}
|
|
4601
|
-
`;
|
|
4602
|
-
const ContainerLegend = styled(uilibGl.Flex) ``;
|
|
4603
|
-
const ContainerUnits = styled.div `
|
|
4604
|
-
margin-left: 0.5rem;
|
|
4605
|
-
white-space: nowrap;
|
|
4606
|
-
font-size: 0.75rem;
|
|
4607
|
-
`;
|
|
4608
|
-
const ContainerValue = styled(uilibGl.Flex) `
|
|
4609
|
-
justify-content: flex-end;
|
|
4610
|
-
align-items: center;
|
|
4611
|
-
flex-wrap: nowrap;
|
|
4612
|
-
width: 100%;
|
|
4613
|
-
font-size: ${({ big }) => (big ? 1.5 : 1)}rem;
|
|
4614
|
-
color: ${({ fontColor, theme: { palette } }) => fontColor || palette.textPrimary};
|
|
4615
|
-
|
|
4616
|
-
> * {
|
|
4617
|
-
width: ${({ column }) => (column ? "100%" : "auto")};
|
|
4618
|
-
}
|
|
4619
|
-
|
|
4620
|
-
${ContainerChart}, ${ContainerLegend} {
|
|
4621
|
-
width: ${({ column }) => (column ? "100%" : "50%")};
|
|
4622
|
-
}
|
|
4623
|
-
|
|
4624
|
-
${ContainerLegend} {
|
|
4625
|
-
margin-left: ${({ column }) => (column ? 0 : "1rem")};
|
|
4626
|
-
}
|
|
4627
|
-
|
|
4628
|
-
${ChartLegendContainer} {
|
|
4629
|
-
flex-direction: ${({ column }) => (column ? "row" : "column")};
|
|
4630
|
-
margin-top: ${({ column }) => (column ? "1rem" : 0)};
|
|
4631
|
-
}
|
|
4632
|
-
`;
|
|
4633
|
-
const ColorIconMixin = styled.css `
|
|
4634
|
-
:after {
|
|
4635
|
-
color: ${({ $fontColor }) => $fontColor} !important;
|
|
4636
|
-
}
|
|
4637
|
-
`;
|
|
4638
|
-
const SizeIconMixin = styled.css `
|
|
4639
|
-
:after {
|
|
4640
|
-
font-size: ${({ $fontSize }) => $fontSize}px !important;
|
|
4641
|
-
}
|
|
4642
|
-
`;
|
|
4643
|
-
const ContainerIcon = styled(uilibGl.Icon) `
|
|
4644
|
-
width: auto;
|
|
4645
|
-
height: auto;
|
|
4646
|
-
margin-bottom: 0.5rem;
|
|
4647
|
-
${({ $fontColor }) => !!$fontColor && ColorIconMixin};
|
|
4648
|
-
${({ $fontSize }) => !!$fontSize && SizeIconMixin};
|
|
4649
|
-
`;
|
|
4650
|
-
const SvgContainerColorMixin$1 = styled.css `
|
|
4651
|
-
path,
|
|
4652
|
-
line,
|
|
4653
|
-
circle {
|
|
4654
|
-
fill: ${({ $fontColor }) => $fontColor};
|
|
4655
|
-
}
|
|
4656
|
-
`;
|
|
4657
|
-
const SvgContainer$1 = styled.div `
|
|
4658
|
-
&&& {
|
|
4659
|
-
min-width: ${({ $width }) => ($width ? `${$width}px` : "1rem")};
|
|
4660
|
-
max-width: ${({ $width }) => ($width ? `${$width}px` : "1rem")};
|
|
4661
|
-
|
|
4662
|
-
${({ $fontColor }) => !!$fontColor && SvgContainerColorMixin$1};
|
|
4663
|
-
|
|
4664
|
-
> * {
|
|
4665
|
-
min-width: inherit;
|
|
4666
|
-
}
|
|
4667
|
-
}
|
|
4668
|
-
`;
|
|
4669
|
-
const TwoColumnContainerWrapper = styled(uilibGl.Flex) `
|
|
4670
|
-
width: 100%;
|
|
4671
|
-
flex-direction: row;
|
|
4672
|
-
flex-wrap: nowrap;
|
|
4673
|
-
align-items: center;
|
|
4674
|
-
|
|
4675
|
-
> * {
|
|
4676
|
-
flex: 1;
|
|
4677
|
-
}
|
|
4678
|
-
|
|
4679
|
-
> ${ContainerValue} {
|
|
4680
|
-
justify-content: flex-end;
|
|
4681
|
-
|
|
4682
|
-
> * {
|
|
4683
|
-
text-align: right;
|
|
4684
|
-
}
|
|
4685
|
-
}
|
|
4686
|
-
`;
|
|
4518
|
+
const formatElementValue = ({ t, value, elementConfig, attributes, wrap, }) => {
|
|
4519
|
+
const { id, type, defaultValue, options, style, attributeName, templateName } = elementConfig || {};
|
|
4520
|
+
const attribute = attributeName ? getAttributeByName(attributeName, attributes) : null;
|
|
4521
|
+
const { fontColor, fontSize, noUnits, tagView, bgColor, withDivider, radius } = options || {};
|
|
4522
|
+
const valueOrDefault = value || defaultValue;
|
|
4523
|
+
const resultValue = type === "attributeValue" && attribute?.type && attribute?.stringFormat
|
|
4524
|
+
? formatAttributeValue({
|
|
4525
|
+
t,
|
|
4526
|
+
type: attribute.type,
|
|
4527
|
+
value: valueOrDefault,
|
|
4528
|
+
stringFormat: attribute.stringFormat,
|
|
4529
|
+
noUnits,
|
|
4530
|
+
})
|
|
4531
|
+
: valueOrDefault;
|
|
4532
|
+
if (!wrap)
|
|
4533
|
+
return resultValue;
|
|
4534
|
+
return (jsxRuntime.jsxs(React.Fragment, { children: [tagView ? (jsxRuntime.jsx(DashboardChip$1, { text: resultValue, "$bgColor": bgColor, "$fontColor": fontColor, "$fontSize": fontSize, "$radius": radius, style: style })) : resultValue, withDivider && jsxRuntime.jsx(uilibGl.Divider, {})] }, id));
|
|
4535
|
+
};
|
|
4536
|
+
|
|
4537
|
+
const getAttributeValue = (element, attributes) => {
|
|
4538
|
+
const attribute = getAttributeByName(element?.attributeName, attributes);
|
|
4539
|
+
const { maxLength, separator, expandable, lineBreak } = element.options || {};
|
|
4540
|
+
let value = "";
|
|
4541
|
+
if (attribute?.type === api.AttributeType.Boolean && typeof attribute.value === "boolean") {
|
|
4542
|
+
return jsxRuntime.jsx(DashboardCheckbox, { title: attribute.alias || attribute.name, checked: attribute.value });
|
|
4543
|
+
}
|
|
4544
|
+
if (Array.isArray(element?.attributeName)) {
|
|
4545
|
+
const concatAttributes = element.attributeName.map((attributeName) => attributes?.find(({ name }) => name === attributeName)?.value || "");
|
|
4546
|
+
value = concatAttributes.join(separator || ", ");
|
|
4547
|
+
}
|
|
4548
|
+
else {
|
|
4549
|
+
value = attribute?.value?.toString() || "";
|
|
4550
|
+
}
|
|
4551
|
+
return maxLength && maxLength < value.length ? (jsxRuntime.jsx(TextTrim, { maxLength: maxLength, expandable: expandable, lineBreak: lineBreak, children: value })) : (value);
|
|
4552
|
+
};
|
|
4553
|
+
|
|
4554
|
+
const getChartAxes = (chartElement) => chartElement?.options?.relatedDataSources?.filter(({ chartAxis }) => chartAxis === "y");
|
|
4555
|
+
|
|
4556
|
+
const getChartFilterName = (relatedDataSources) => {
|
|
4557
|
+
const relatedAttributes = relatedDataSources || [];
|
|
4558
|
+
const axes = relatedAttributes.filter(({ chartAxis }) => chartAxis === "y");
|
|
4559
|
+
return axes?.[0]?.filterName;
|
|
4560
|
+
};
|
|
4561
|
+
|
|
4562
|
+
function getValueIndex(items, attributes) {
|
|
4563
|
+
return items?.findIndex(({ name }) => name.toString() === attributes.value?.toString());
|
|
4564
|
+
}
|
|
4565
|
+
const getChartMarkers = (items, markers, dataSources) => {
|
|
4566
|
+
if (typeof markers === "string") {
|
|
4567
|
+
const dataSource = getDataSource(markers, dataSources);
|
|
4568
|
+
return dataSource?.features?.map(({ attributes }) => ({
|
|
4569
|
+
...attributes,
|
|
4570
|
+
value: getValueIndex(items, attributes),
|
|
4571
|
+
})) || [];
|
|
4572
|
+
}
|
|
4573
|
+
return (markers?.map(marker => ({
|
|
4574
|
+
...marker,
|
|
4575
|
+
value: getValueIndex(items, marker),
|
|
4576
|
+
})) || []);
|
|
4577
|
+
};
|
|
4687
4578
|
|
|
4688
4579
|
const LayerGroupContainer = styled(uilibGl.Flex) `
|
|
4689
4580
|
display: flex;
|
|
@@ -5213,12 +5104,45 @@ const LayerListContainer = styled(uilibGl.Flex) `
|
|
|
5213
5104
|
box-sizing: border-box;
|
|
5214
5105
|
`;
|
|
5215
5106
|
|
|
5216
|
-
const
|
|
5217
|
-
|
|
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
|
+
`}
|
|
5218
5143
|
`;
|
|
5219
5144
|
const ContainerWrapper = styled(uilibGl.Flex) `
|
|
5220
5145
|
position: relative;
|
|
5221
|
-
min-height: 1rem;
|
|
5222
5146
|
box-sizing: border-box;
|
|
5223
5147
|
width: 100%;
|
|
5224
5148
|
background: ${({ theme: { palette } }) => palette.backgroundAlpha};
|
|
@@ -5230,7 +5154,7 @@ const ContainerWrapper = styled(uilibGl.Flex) `
|
|
|
5230
5154
|
z-index: ${({ $zIndex }) => $zIndex ?? 1};
|
|
5231
5155
|
transition: background-color ${uilibGl.transition.toggle};
|
|
5232
5156
|
|
|
5233
|
-
${Container} >
|
|
5157
|
+
${Container} > :not(:last-child) {
|
|
5234
5158
|
margin-bottom: 1.5rem;
|
|
5235
5159
|
}
|
|
5236
5160
|
`;
|
|
@@ -5483,75 +5407,6 @@ const FeatureControls = styled(uilibGl.Flex) `
|
|
|
5483
5407
|
}
|
|
5484
5408
|
`;
|
|
5485
5409
|
|
|
5486
|
-
const getAttributeByName = (attributeName, attributes) => {
|
|
5487
|
-
return Array.isArray(attributeName)
|
|
5488
|
-
? null
|
|
5489
|
-
: attributeName
|
|
5490
|
-
? attributes?.find(({ name }) => name === attributeName)
|
|
5491
|
-
: null;
|
|
5492
|
-
};
|
|
5493
|
-
|
|
5494
|
-
const formatElementValue = ({ t, value, elementConfig, attributes, wrap, }) => {
|
|
5495
|
-
const { id, type, defaultValue, options, style, attributeName, templateName } = elementConfig || {};
|
|
5496
|
-
const attribute = attributeName ? getAttributeByName(attributeName, attributes) : null;
|
|
5497
|
-
const { fontColor, fontSize, noUnits, tagView, bgColor, withDivider, radius } = options || {};
|
|
5498
|
-
const valueOrDefault = value || defaultValue;
|
|
5499
|
-
const resultValue = type === "attributeValue" && attribute?.type && attribute?.stringFormat
|
|
5500
|
-
? formatAttributeValue({
|
|
5501
|
-
t,
|
|
5502
|
-
type: attribute.type,
|
|
5503
|
-
value: valueOrDefault,
|
|
5504
|
-
stringFormat: attribute.stringFormat,
|
|
5505
|
-
noUnits,
|
|
5506
|
-
})
|
|
5507
|
-
: valueOrDefault;
|
|
5508
|
-
if (!wrap)
|
|
5509
|
-
return resultValue;
|
|
5510
|
-
return (jsxRuntime.jsxs(React.Fragment, { children: [tagView ? (jsxRuntime.jsx(DashboardChip$1, { text: resultValue, "$bgColor": bgColor, "$fontColor": fontColor, "$fontSize": fontSize, "$radius": radius, style: style })) : (jsxRuntime.jsx(ElementValueWrapper, { "data-id": id, "data-templatename": templateName, style: style, children: resultValue })), withDivider && jsxRuntime.jsx(uilibGl.Divider, {})] }, id));
|
|
5511
|
-
};
|
|
5512
|
-
|
|
5513
|
-
const getAttributeValue = (element, attributes) => {
|
|
5514
|
-
const attribute = getAttributeByName(element?.attributeName, attributes);
|
|
5515
|
-
const { maxLength, separator, expandable, lineBreak } = element.options || {};
|
|
5516
|
-
let value = "";
|
|
5517
|
-
if (attribute?.type === api.AttributeType.Boolean && typeof attribute.value === "boolean") {
|
|
5518
|
-
return jsxRuntime.jsx(DashboardCheckbox, { title: attribute.alias || attribute.name, checked: attribute.value });
|
|
5519
|
-
}
|
|
5520
|
-
if (Array.isArray(element?.attributeName)) {
|
|
5521
|
-
const concatAttributes = element.attributeName.map((attributeName) => attributes?.find(({ name }) => name === attributeName)?.value || "");
|
|
5522
|
-
value = concatAttributes.join(separator || ", ");
|
|
5523
|
-
}
|
|
5524
|
-
else {
|
|
5525
|
-
value = attribute?.value?.toString() || "";
|
|
5526
|
-
}
|
|
5527
|
-
return maxLength && maxLength < value.length ? (jsxRuntime.jsx(TextTrim, { maxLength: maxLength, expandable: expandable, lineBreak: lineBreak, children: value })) : (value);
|
|
5528
|
-
};
|
|
5529
|
-
|
|
5530
|
-
const getChartAxes = (chartElement) => chartElement?.options?.relatedDataSources?.filter(({ chartAxis }) => chartAxis === "y");
|
|
5531
|
-
|
|
5532
|
-
const getChartFilterName = (relatedDataSources) => {
|
|
5533
|
-
const relatedAttributes = relatedDataSources || [];
|
|
5534
|
-
const axes = relatedAttributes.filter(({ chartAxis }) => chartAxis === "y");
|
|
5535
|
-
return axes?.[0]?.filterName;
|
|
5536
|
-
};
|
|
5537
|
-
|
|
5538
|
-
function getValueIndex(items, attributes) {
|
|
5539
|
-
return items?.findIndex(({ name }) => name.toString() === attributes.value?.toString());
|
|
5540
|
-
}
|
|
5541
|
-
const getChartMarkers = (items, markers, dataSources) => {
|
|
5542
|
-
if (typeof markers === "string") {
|
|
5543
|
-
const dataSource = getDataSource(markers, dataSources);
|
|
5544
|
-
return dataSource?.features?.map(({ attributes }) => ({
|
|
5545
|
-
...attributes,
|
|
5546
|
-
value: getValueIndex(items, attributes),
|
|
5547
|
-
})) || [];
|
|
5548
|
-
}
|
|
5549
|
-
return (markers?.map(marker => ({
|
|
5550
|
-
...marker,
|
|
5551
|
-
value: getValueIndex(items, marker),
|
|
5552
|
-
})) || []);
|
|
5553
|
-
};
|
|
5554
|
-
|
|
5555
5410
|
const ContainersGroupContainer = React.memo(({ elementConfig, type, renderElement }) => {
|
|
5556
5411
|
const { expandedContainers } = useWidgetContext(type);
|
|
5557
5412
|
const { id, children, options, style } = elementConfig || {};
|
|
@@ -5561,6 +5416,147 @@ const ContainersGroupContainer = React.memo(({ elementConfig, type, renderElemen
|
|
|
5561
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 }) }))] }));
|
|
5562
5417
|
});
|
|
5563
5418
|
|
|
5419
|
+
const ChartLegendContainer = styled(uilibGl.Flex) `
|
|
5420
|
+
flex-direction: column;
|
|
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};
|
|
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
|
+
|
|
5447
|
+
const ContainerAlias = styled(uilibGl.Flex) `
|
|
5448
|
+
align-items: center;
|
|
5449
|
+
flex-wrap: nowrap;
|
|
5450
|
+
margin-bottom: ${({ hasBottomMargin }) => (hasBottomMargin ? 0.25 : 0)}rem;
|
|
5451
|
+
font-size: 0.75rem;
|
|
5452
|
+
color: ${({ theme: { palette } }) => palette.textSecondary};
|
|
5453
|
+
|
|
5454
|
+
span[kind] {
|
|
5455
|
+
margin-right: 0.5rem;
|
|
5456
|
+
|
|
5457
|
+
:after {
|
|
5458
|
+
color: ${({ theme: { palette } }) => palette.primary};
|
|
5459
|
+
}
|
|
5460
|
+
}
|
|
5461
|
+
`;
|
|
5462
|
+
const ContainerAliasIcon = styled.div `
|
|
5463
|
+
margin-right: 0.5rem;
|
|
5464
|
+
`;
|
|
5465
|
+
const ContainerChart = styled(uilibGl.Flex) `
|
|
5466
|
+
justify-content: flex-start;
|
|
5467
|
+
|
|
5468
|
+
> * {
|
|
5469
|
+
display: flex;
|
|
5470
|
+
justify-content: center;
|
|
5471
|
+
width: 100%;
|
|
5472
|
+
}
|
|
5473
|
+
`;
|
|
5474
|
+
const ContainerLegend = styled(uilibGl.Flex) ``;
|
|
5475
|
+
const ContainerUnits = styled.div `
|
|
5476
|
+
margin-left: 0.5rem;
|
|
5477
|
+
white-space: nowrap;
|
|
5478
|
+
font-size: 0.75rem;
|
|
5479
|
+
`;
|
|
5480
|
+
const ContainerValue = styled(uilibGl.Flex) `
|
|
5481
|
+
justify-content: flex-end;
|
|
5482
|
+
align-items: center;
|
|
5483
|
+
flex-wrap: nowrap;
|
|
5484
|
+
width: 100%;
|
|
5485
|
+
font-size: ${({ big }) => (big ? 1.5 : 1)}rem;
|
|
5486
|
+
color: ${({ fontColor, theme: { palette } }) => fontColor || palette.textPrimary};
|
|
5487
|
+
|
|
5488
|
+
> * {
|
|
5489
|
+
width: ${({ column }) => (column ? "100%" : "auto")};
|
|
5490
|
+
}
|
|
5491
|
+
|
|
5492
|
+
${ContainerChart}, ${ContainerLegend} {
|
|
5493
|
+
width: ${({ column }) => (column ? "100%" : "50%")};
|
|
5494
|
+
}
|
|
5495
|
+
|
|
5496
|
+
${ContainerLegend} {
|
|
5497
|
+
margin-left: ${({ column }) => (column ? 0 : "1rem")};
|
|
5498
|
+
}
|
|
5499
|
+
|
|
5500
|
+
${ChartLegendContainer} {
|
|
5501
|
+
flex-direction: ${({ column }) => (column ? "row" : "column")};
|
|
5502
|
+
margin-top: ${({ column }) => (column ? "1rem" : 0)};
|
|
5503
|
+
}
|
|
5504
|
+
`;
|
|
5505
|
+
const ColorIconMixin = styled.css `
|
|
5506
|
+
:after {
|
|
5507
|
+
color: ${({ $fontColor }) => $fontColor} !important;
|
|
5508
|
+
}
|
|
5509
|
+
`;
|
|
5510
|
+
const SizeIconMixin = styled.css `
|
|
5511
|
+
:after {
|
|
5512
|
+
font-size: ${({ $fontSize }) => $fontSize}px !important;
|
|
5513
|
+
}
|
|
5514
|
+
`;
|
|
5515
|
+
const ContainerIcon = styled(uilibGl.Icon) `
|
|
5516
|
+
width: auto;
|
|
5517
|
+
height: auto;
|
|
5518
|
+
margin-bottom: 0.5rem;
|
|
5519
|
+
${({ $fontColor }) => !!$fontColor && ColorIconMixin};
|
|
5520
|
+
${({ $fontSize }) => !!$fontSize && SizeIconMixin};
|
|
5521
|
+
`;
|
|
5522
|
+
const SvgContainerColorMixin$1 = styled.css `
|
|
5523
|
+
path,
|
|
5524
|
+
line,
|
|
5525
|
+
circle {
|
|
5526
|
+
fill: ${({ $fontColor }) => $fontColor};
|
|
5527
|
+
}
|
|
5528
|
+
`;
|
|
5529
|
+
const SvgContainer$1 = styled.div `
|
|
5530
|
+
&&& {
|
|
5531
|
+
min-width: ${({ $width }) => ($width ? `${$width}px` : "1rem")};
|
|
5532
|
+
max-width: ${({ $width }) => ($width ? `${$width}px` : "1rem")};
|
|
5533
|
+
|
|
5534
|
+
${({ $fontColor }) => !!$fontColor && SvgContainerColorMixin$1};
|
|
5535
|
+
|
|
5536
|
+
> * {
|
|
5537
|
+
min-width: inherit;
|
|
5538
|
+
}
|
|
5539
|
+
}
|
|
5540
|
+
`;
|
|
5541
|
+
const TwoColumnContainerWrapper = styled(uilibGl.Flex) `
|
|
5542
|
+
width: 100%;
|
|
5543
|
+
flex-direction: row;
|
|
5544
|
+
flex-wrap: nowrap;
|
|
5545
|
+
align-items: center;
|
|
5546
|
+
|
|
5547
|
+
> * {
|
|
5548
|
+
flex: 1;
|
|
5549
|
+
}
|
|
5550
|
+
|
|
5551
|
+
> ${ContainerValue} {
|
|
5552
|
+
justify-content: flex-end;
|
|
5553
|
+
|
|
5554
|
+
> * {
|
|
5555
|
+
text-align: right;
|
|
5556
|
+
}
|
|
5557
|
+
}
|
|
5558
|
+
`;
|
|
5559
|
+
|
|
5564
5560
|
const OneColumnContainer = React.memo(({ elementConfig, renderElement }) => {
|
|
5565
5561
|
const { id, options, style } = elementConfig || {};
|
|
5566
5562
|
const { innerTemplateStyle, hideEmpty } = options || {};
|
|
@@ -6767,7 +6763,7 @@ const UploadContainer = React.memo(({ type, elementConfig, renderElement }) => {
|
|
|
6767
6763
|
const onUpload = React.useCallback(async (input) => {
|
|
6768
6764
|
const files = Array.isArray(input) ? input : [input];
|
|
6769
6765
|
const response = await Promise.all(files.map(file => {
|
|
6770
|
-
return api.file.upload(file, true, parentResourceId);
|
|
6766
|
+
return api.file.upload(file, true, parentResourceId, file.name);
|
|
6771
6767
|
}));
|
|
6772
6768
|
const uploadedFiles = response.map(item => ({
|
|
6773
6769
|
name: item.name,
|
|
@@ -10762,6 +10758,7 @@ exports.Chart = Chart;
|
|
|
10762
10758
|
exports.ChartContainer = ChartContainer;
|
|
10763
10759
|
exports.ChartLegend = ChartLegend;
|
|
10764
10760
|
exports.ChartLoading = ChartLoading;
|
|
10761
|
+
exports.Container = Container;
|
|
10765
10762
|
exports.ContainerChildren = ContainerChildren;
|
|
10766
10763
|
exports.ContainerLoading = ContainerLoading;
|
|
10767
10764
|
exports.ContainerWrapper = ContainerWrapper;
|
|
@@ -10817,7 +10814,6 @@ exports.ElementMarkdown = ElementMarkdown;
|
|
|
10817
10814
|
exports.ElementSlideshow = ElementSlideshow;
|
|
10818
10815
|
exports.ElementSvg = ElementSvg;
|
|
10819
10816
|
exports.ElementTooltip = ElementTooltip;
|
|
10820
|
-
exports.ElementValueWrapper = ElementValueWrapper;
|
|
10821
10817
|
exports.ExpandableTitle = ExpandableTitle;
|
|
10822
10818
|
exports.FEATURE_CARD_DEFAULT_COLORS = FEATURE_CARD_DEFAULT_COLORS;
|
|
10823
10819
|
exports.FEATURE_CARD_OTHER_COLOR = FEATURE_CARD_OTHER_COLOR;
|