@evergis/react 3.1.76 → 3.1.77
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,5 +1 @@
|
|
|
1
1
|
export declare const MarkdownWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
2
|
-
export declare const SocialIconsWrapper: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
|
|
3
|
-
export declare const SocialIconLabel: import('styled-components').StyledComponent<"span", any, {}, never>;
|
|
4
|
-
export declare const SocialIcon: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
5
|
-
export declare const ExpandButton: import('styled-components').StyledComponent<import('react').FC<import('@evergis/uilib-gl').IIconButtonProps>, any, {}, never>;
|
package/dist/index.js
CHANGED
|
@@ -5163,7 +5163,8 @@ const Container = styled(uilibGl.Flex) `
|
|
|
5163
5163
|
|
|
5164
5164
|
${({ isColumn }) => isColumn
|
|
5165
5165
|
? styled.css `
|
|
5166
|
-
> * {
|
|
5166
|
+
&&& > * {
|
|
5167
|
+
justify-content: flex-start;
|
|
5167
5168
|
width: 100%;
|
|
5168
5169
|
|
|
5169
5170
|
:not(:last-child) {
|
|
@@ -5681,7 +5682,7 @@ const OneColumnContainer = React.memo(({ elementConfig, renderElement }) => {
|
|
|
5681
5682
|
const hasUnits = elementConfig?.children?.some(({ id }) => id === "units");
|
|
5682
5683
|
if (!value && hideEmpty)
|
|
5683
5684
|
return null;
|
|
5684
|
-
return (jsxRuntime.jsxs(Container, { id: id, style: innerTemplateStyle || style, children: [jsxRuntime.jsxs(ContainerAlias, { hasBottomMargin: true, children: [renderElement({ id: "alias" }), renderElement({ id: "tooltip" })] }), jsxRuntime.jsxs(ContainerValue, { children: [value, hasUnits && jsxRuntime.jsx(ContainerUnits, { children: renderElement({ id: "units" }) })] })] }));
|
|
5685
|
+
return (jsxRuntime.jsxs(Container, { id: id, isColumn: true, style: innerTemplateStyle || style, children: [jsxRuntime.jsxs(ContainerAlias, { hasBottomMargin: true, children: [renderElement({ id: "alias" }), renderElement({ id: "tooltip" })] }), jsxRuntime.jsxs(ContainerValue, { children: [value, hasUnits && jsxRuntime.jsx(ContainerUnits, { children: renderElement({ id: "units" }) })] })] }));
|
|
5685
5686
|
});
|
|
5686
5687
|
|
|
5687
5688
|
const TwoColumnContainer = React.memo(({ config, elementConfig, type, renderElement }) => {
|
|
@@ -8013,37 +8014,6 @@ const MarkdownWrapper = styled.div `
|
|
|
8013
8014
|
display: none;
|
|
8014
8015
|
}
|
|
8015
8016
|
`;
|
|
8016
|
-
styled(uilibGl.Flex) `
|
|
8017
|
-
align-items: center;
|
|
8018
|
-
gap: 1rem;
|
|
8019
|
-
margin-top: 1rem;
|
|
8020
|
-
`;
|
|
8021
|
-
styled.span `
|
|
8022
|
-
display: block;
|
|
8023
|
-
font-size: 0.75rem;
|
|
8024
|
-
line-height: 0.875rem;
|
|
8025
|
-
opacity: 0.36;
|
|
8026
|
-
margin: 0 0 0.5rem 0;
|
|
8027
|
-
`;
|
|
8028
|
-
styled.div `
|
|
8029
|
-
width: 1.25rem;
|
|
8030
|
-
height: 1.25rem;
|
|
8031
|
-
cursor: pointer;
|
|
8032
|
-
transition: opacity 0.2s;
|
|
8033
|
-
|
|
8034
|
-
&:hover {
|
|
8035
|
-
opacity: 0.7;
|
|
8036
|
-
}
|
|
8037
|
-
|
|
8038
|
-
img, svg {
|
|
8039
|
-
width: 100%;
|
|
8040
|
-
height: 100%;
|
|
8041
|
-
display: block;
|
|
8042
|
-
}
|
|
8043
|
-
`;
|
|
8044
|
-
const ExpandButton = styled(uilibGl.IconButton) `
|
|
8045
|
-
margin-bottom: 1rem;
|
|
8046
|
-
`;
|
|
8047
8017
|
|
|
8048
8018
|
const ElementMarkdown = React.memo(({ elementConfig, type }) => {
|
|
8049
8019
|
const { attributes } = useWidgetContext(type);
|
|
@@ -8067,14 +8037,14 @@ const ElementMarkdown = React.memo(({ elementConfig, type }) => {
|
|
|
8067
8037
|
if (!shouldShowExpand) {
|
|
8068
8038
|
return (jsxRuntime.jsx(MarkdownWrapper, { children: jsxRuntime.jsx(ReactMarkdown, { remarkPlugins: [remarkGfm], children: markdownString }) }));
|
|
8069
8039
|
}
|
|
8070
|
-
// Truncated content for collapsed state
|
|
8071
|
-
const truncatedContent = markdownString.substring(0, expandLength);
|
|
8072
8040
|
// Collapsed state
|
|
8073
8041
|
if (!expanded) {
|
|
8074
|
-
|
|
8042
|
+
// Truncated content for collapsed state
|
|
8043
|
+
const truncatedContent = markdownString.substring(0, expandLength);
|
|
8044
|
+
return (jsxRuntime.jsxs(MarkdownWrapper, { children: [jsxRuntime.jsx(ReactMarkdown, { remarkPlugins: [remarkGfm], children: truncatedContent }), jsxRuntime.jsx(uilibGl.LegendToggler, { onClick: () => setExpanded(true), children: t("more", { ns: "dashboard", defaultValue: "Подробнее" }) })] }));
|
|
8075
8045
|
}
|
|
8076
8046
|
// Expanded state
|
|
8077
|
-
return (jsxRuntime.jsxs(MarkdownWrapper, { children: [jsxRuntime.jsx(
|
|
8047
|
+
return (jsxRuntime.jsxs(MarkdownWrapper, { children: [jsxRuntime.jsx(ReactMarkdown, { remarkPlugins: [remarkGfm], children: markdownString }), jsxRuntime.jsx(uilibGl.LegendToggler, { toggled: true, onClick: () => setExpanded(false), children: t("hide", { ns: "dashboard", defaultValue: "Свернуть" }) })] }));
|
|
8078
8048
|
});
|
|
8079
8049
|
|
|
8080
8050
|
const SmallPreviewContainer = styled.div `
|