@evergis/react 4.0.86 → 4.0.88
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/index.js +20 -7
- package/dist/index.js.map +1 -1
- package/dist/react.esm.js +20 -7
- package/dist/react.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/react.esm.js
CHANGED
|
@@ -7622,13 +7622,14 @@ const RoundedBackgroundContainerWrapper = styled(Flex) `
|
|
|
7622
7622
|
const ALIAS_DEFAULT_MAX_LENGTH = 28;
|
|
7623
7623
|
const RoundedBackgroundContainer = memo(({ type, elementConfig, feature, renderElement, }) => {
|
|
7624
7624
|
const { t } = useGlobalContext();
|
|
7625
|
-
const { dataSources } = useWidgetContext(type);
|
|
7626
|
-
const { attributes } = useRelatedDataSourceAttributes({
|
|
7625
|
+
const { dataSources, attributes: ctxAttributes } = useWidgetContext(type);
|
|
7626
|
+
const { attributes: dsAttributes } = useRelatedDataSourceAttributes({
|
|
7627
7627
|
type,
|
|
7628
7628
|
elementConfig,
|
|
7629
7629
|
dataSources,
|
|
7630
7630
|
feature,
|
|
7631
7631
|
});
|
|
7632
|
+
const attributes = isEmpty(dsAttributes) ? ctxAttributes : dsAttributes;
|
|
7632
7633
|
const { id, options, style, children } = elementConfig || {};
|
|
7633
7634
|
const { maxLength, wordBreak, center, fontColor, innerTemplateStyle, inlineUnits, big, bigIcon, hideEmpty, colorAttribute } = options || {};
|
|
7634
7635
|
const iconElement = children?.find(item => item.id === "icon");
|
|
@@ -9168,11 +9169,12 @@ const HeaderLayerIcon = ({ noFeature }) => {
|
|
|
9168
9169
|
};
|
|
9169
9170
|
|
|
9170
9171
|
const FeatureCardDefaultHeader = ({ noFeature }) => {
|
|
9172
|
+
const { themeName: pageThemeName } = useGlobalContext();
|
|
9171
9173
|
const { config } = useWidgetConfig(WidgetType.FeatureCard);
|
|
9172
9174
|
const { header } = config || {};
|
|
9173
9175
|
const { options } = header || {};
|
|
9174
9176
|
const { themeName, withPadding, column, height, overlay } = options || {};
|
|
9175
|
-
return (jsx(DefaultHeaderWrapper, { withPadding: withPadding, height: height, "$noFeature": noFeature, children: jsx(
|
|
9177
|
+
return (jsx(ThemeProvider, { theme: getThemeByName(themeName ?? pageThemeName), children: jsx(DefaultHeaderWrapper, { withPadding: withPadding, height: height, "$noFeature": noFeature, children: jsx(Header, { "$overlay": overlay, "$isRow": !column, "$noFeature": noFeature, children: jsxs(HeaderFrontView, { isDefault: !column, children: [jsxs(HeaderContainer, { children: [jsx(HeaderLayerIcon, { noFeature: noFeature }), jsx(HeaderTitle, { noFeature: noFeature })] }), jsx(FeatureCardButtons, {})] }) }) }) }));
|
|
9176
9178
|
};
|
|
9177
9179
|
|
|
9178
9180
|
const ImageContainerButton = styled(FlatButton) `
|
|
@@ -10193,7 +10195,7 @@ const BackgroundHeaderWrapper = styled.div `
|
|
|
10193
10195
|
content: "";
|
|
10194
10196
|
position: absolute;
|
|
10195
10197
|
inset: 0;
|
|
10196
|
-
z-index:
|
|
10198
|
+
z-index: 100;
|
|
10197
10199
|
pointer-events: none;
|
|
10198
10200
|
background: ${({ $bgColor }) => $bgColor || "linear-gradient(96.55deg, #FFFCD3 0%, #B4DC47 100%)"};
|
|
10199
10201
|
}
|
|
@@ -10215,7 +10217,7 @@ const FeatureCardBackgroundHeader = () => {
|
|
|
10215
10217
|
const { options } = header || {};
|
|
10216
10218
|
const { fontColor, bgColor, height, overlay, bigIcon, withPadding, bottomBlur, themeName, column } = options || {};
|
|
10217
10219
|
const renderElement = useHeaderRender(header);
|
|
10218
|
-
return (jsx(BackgroundHeaderWrapper, { "$fontColor": fontColor, "$bgColor": bgColor, "$height": height, "$bigIcon": bigIcon, "$withPadding": withPadding, "$bottomBlur": bottomBlur, children:
|
|
10220
|
+
return (jsx(ThemeProvider, { theme: getThemeByName(themeName ?? pageThemeName), children: jsx(BackgroundHeaderWrapper, { "$fontColor": fontColor, "$bgColor": bgColor, "$height": height, "$bigIcon": bigIcon, "$withPadding": withPadding, "$bottomBlur": bottomBlur, children: jsxs(Header, { "$overlay": overlay, "$isRow": !column, children: [jsxs(HeaderFrontView, { children: [jsxs(HeaderContainer, { column: column, children: [jsx(HeaderLayerIcon, {}), jsx(FeatureCardTitle, { title: renderElement({
|
|
10219
10221
|
id: "title",
|
|
10220
10222
|
wrap: false,
|
|
10221
10223
|
}), description: renderElement({
|
|
@@ -10236,7 +10238,7 @@ const FeatureCardSlideshowHeader = () => {
|
|
|
10236
10238
|
const { options } = header || {};
|
|
10237
10239
|
const { height, fontColor, withPadding, themeName, column, overlay } = options || {};
|
|
10238
10240
|
const renderElement = useHeaderRender(header);
|
|
10239
|
-
return (jsx(SlideshowHeaderWrapper, { fontColor: fontColor, withPadding: withPadding, height: height, big: true, children:
|
|
10241
|
+
return (jsx(ThemeProvider, { theme: getThemeByName(themeName), children: jsx(SlideshowHeaderWrapper, { fontColor: fontColor, withPadding: withPadding, height: height, big: true, children: jsxs(Header, { "$overlay": overlay, "$isRow": !column, children: [jsxs(HeaderFrontView, { children: [jsxs(HeaderContainer, { column: column, children: [jsx(HeaderLayerIcon, {}), jsx(FeatureCardTitle, { title: renderElement({
|
|
10240
10242
|
id: "title",
|
|
10241
10243
|
wrap: false,
|
|
10242
10244
|
}), description: renderElement({
|
|
@@ -12851,7 +12853,18 @@ const useDataSources = ({ type: widgetType, config, attributes, filters, layerPa
|
|
|
12851
12853
|
if (!diffFilterNames.length)
|
|
12852
12854
|
return;
|
|
12853
12855
|
const filteredDataSources = configDataSources?.filter(({ parameters = {}, query }) => isNil(query) ||
|
|
12854
|
-
diffFilterNames.some(diffFilterName =>
|
|
12856
|
+
diffFilterNames.some(diffFilterName => {
|
|
12857
|
+
// Плейсхолдер параметра может ссылаться на фильтр целиком (`%name`)
|
|
12858
|
+
// либо на его свойство — уровень tree-фильтра или границу range
|
|
12859
|
+
// (`%name.lN`, `%name.min`, `%name.max`). Граница `.` обязательна,
|
|
12860
|
+
// иначе `%name` ложно матчит `%name2.l1`.
|
|
12861
|
+
const placeholder = `${FILTER_PREFIX}${diffFilterName}`;
|
|
12862
|
+
return Object.keys(parameters).some(paramName => {
|
|
12863
|
+
const paramValue = parameters[paramName];
|
|
12864
|
+
return (typeof paramValue === "string" &&
|
|
12865
|
+
(paramValue === placeholder || paramValue.startsWith(`${placeholder}.`)));
|
|
12866
|
+
});
|
|
12867
|
+
}));
|
|
12855
12868
|
if (!filteredDataSources?.length) {
|
|
12856
12869
|
return;
|
|
12857
12870
|
}
|