@evergis/react 4.0.63 → 4.0.65
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/TaskContainer/components/LogDialog/types.d.ts +1 -0
- package/dist/components/Dashboard/containers/TaskContainer/useTaskNotifications.d.ts +4 -1
- package/dist/components/Dashboard/containers/TaskContainer/utils/clampDescription.d.ts +2 -0
- package/dist/index.js +189 -149
- package/dist/index.js.map +1 -1
- package/dist/react.esm.js +190 -150
- package/dist/react.esm.js.map +1 -1
- package/package.json +3 -3
package/dist/react.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
2
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, Dialog, DialogTitle, ThemeProvider, darkTheme, DialogContent, CircularProgress, Switch, AutoComplete, Input, Slider, Dropdown, Checkbox, DatePicker, getLocale, IconToggleButton, LinearProgress, ActionsGroup, DialogActions, RaisedButton, Preview, H2, Blank, Popover, UploaderItemArea, UploaderTitleWrapper, Uploader, NumberRangeSlider, useAsyncAutocomplete, RangeNumberInput, defaultTheme, dateFormat } from '@evergis/uilib-gl';
|
|
3
|
-
import { createContext, memo, useRef, useState, useCallback, useEffect, useContext, useMemo, isValidElement, Fragment } from 'react';
|
|
3
|
+
import { createContext, memo, useRef, useState, useCallback, useEffect, useContext, useMemo, isValidElement, Fragment, createElement } 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';
|
|
6
6
|
import { AttributeType, generateId, STORAGE_TOKEN_KEY, parseJwt, STORAGE_REFRESH_TOKEN_KEY, RemoteTaskStatus, LayerServiceType, OgcGeometryType, StringSubType, AttributeConfigurationType } from '@evergis/api';
|
|
@@ -5629,7 +5629,6 @@ const usePythonTask = () => {
|
|
|
5629
5629
|
const [subscriptionId, setSubscriptionId] = useState(null);
|
|
5630
5630
|
const [isLogDialogOpen, setIsLogDialogOpen] = useState(false);
|
|
5631
5631
|
const [result, setResult] = useState(null);
|
|
5632
|
-
const logRef = useRef(null);
|
|
5633
5632
|
const reset = useCallback(() => {
|
|
5634
5633
|
setStatus(RemoteTaskStatus.Unknown);
|
|
5635
5634
|
setError(null);
|
|
@@ -5683,7 +5682,7 @@ const usePythonTask = () => {
|
|
|
5683
5682
|
if (data?.taskId === newTaskId) {
|
|
5684
5683
|
const isFinished = [RemoteTaskStatus.Completed, RemoteTaskStatus.Error].includes(data.status);
|
|
5685
5684
|
setStatus(data.status);
|
|
5686
|
-
setLog([
|
|
5685
|
+
setLog(prev => [prev, data.log].filter(Boolean).join(""));
|
|
5687
5686
|
if (data.log)
|
|
5688
5687
|
setLastMessage(data.log);
|
|
5689
5688
|
setExecutionTime(Date.now() - start);
|
|
@@ -5729,9 +5728,6 @@ const usePythonTask = () => {
|
|
|
5729
5728
|
const closeLog = useCallback(() => {
|
|
5730
5729
|
setIsLogDialogOpen(false);
|
|
5731
5730
|
}, []);
|
|
5732
|
-
useEffect(() => {
|
|
5733
|
-
logRef.current = log;
|
|
5734
|
-
}, [log]);
|
|
5735
5731
|
return {
|
|
5736
5732
|
taskId,
|
|
5737
5733
|
runTask,
|
|
@@ -6216,6 +6212,8 @@ const getAttributeByName = (name, attributes) => {
|
|
|
6216
6212
|
: null;
|
|
6217
6213
|
};
|
|
6218
6214
|
|
|
6215
|
+
const isEmptyElementValue = (value) => value === "" || value === null || value === undefined;
|
|
6216
|
+
|
|
6219
6217
|
/**
|
|
6220
6218
|
* Returns a value safe to render as a React child.
|
|
6221
6219
|
*
|
|
@@ -6240,7 +6238,7 @@ const formatElementValue = ({ t, value, elementConfig, attributes, wrap, }) => {
|
|
|
6240
6238
|
? getAttributeByName(attributeName, attributes)
|
|
6241
6239
|
: null;
|
|
6242
6240
|
const { fontColor, fontSize, noUnits, tagView, bgColor, withDivider, radius, noMargin, } = options || {};
|
|
6243
|
-
const valueOrDefault = value
|
|
6241
|
+
const valueOrDefault = isEmptyElementValue(value) ? defaultValue : value;
|
|
6244
6242
|
const resultValue = type === "attributeValue" && attribute?.type && attribute?.stringFormat
|
|
6245
6243
|
? formatAttributeValue({
|
|
6246
6244
|
t,
|
|
@@ -6264,14 +6262,14 @@ const getAttributeValue = (element, attributes) => {
|
|
|
6264
6262
|
return jsx(DashboardCheckbox, { title: attribute.alias || attribute.attributeName, checked: attribute.value });
|
|
6265
6263
|
}
|
|
6266
6264
|
if (Array.isArray(element?.attributeName)) {
|
|
6267
|
-
const concatAttributes = element.attributeName.map((name) => attributes?.find(({ attributeName }) => attributeName === name)?.value
|
|
6265
|
+
const concatAttributes = element.attributeName.map((name) => attributes?.find(({ attributeName }) => attributeName === name)?.value ?? "");
|
|
6268
6266
|
value = concatAttributes.join(separator || ", ");
|
|
6269
6267
|
}
|
|
6270
6268
|
else {
|
|
6271
6269
|
const rawValue = attribute?.value;
|
|
6272
|
-
value = rawValue && typeof rawValue === "object"
|
|
6270
|
+
value = rawValue !== null && rawValue !== undefined && typeof rawValue === "object"
|
|
6273
6271
|
? JSON.stringify(rawValue)
|
|
6274
|
-
: (rawValue
|
|
6272
|
+
: (rawValue ?? "");
|
|
6275
6273
|
}
|
|
6276
6274
|
return typeof value === "string" && maxLength && maxLength < value.length ? (jsx(TextTrim, { maxLength: maxLength, wordBreak: wordBreak, expandable: expandable, lineBreak: lineBreak, children: value })) : (value);
|
|
6277
6275
|
};
|
|
@@ -6480,7 +6478,7 @@ const useRenderContainer = ({ elementConfig, type, renderElement, renderBody, })
|
|
|
6480
6478
|
return (jsx(OverrideContainer, { type: type, elementConfig: itemConfig, renderElement: item.render }, attribute));
|
|
6481
6479
|
}
|
|
6482
6480
|
}
|
|
6483
|
-
if (
|
|
6481
|
+
if (isEmptyElementValue(item.value) && item.hideEmpty)
|
|
6484
6482
|
return null;
|
|
6485
6483
|
return renderBody(item, attribute);
|
|
6486
6484
|
}, [getRenderContainerItem, elementConfig, attributes, type, renderBody]);
|
|
@@ -7639,17 +7637,17 @@ const STATUS_ICONS = {
|
|
|
7639
7637
|
[RemoteTaskStatus.Unknown]: "play",
|
|
7640
7638
|
};
|
|
7641
7639
|
|
|
7642
|
-
const LogDialog = ({ isOpen, onClose, logs, status, statusColors }) => {
|
|
7640
|
+
const LogDialog = ({ isOpen, onClose, onMinimize, logs, status, statusColors }) => {
|
|
7643
7641
|
const { t } = useGlobalContext();
|
|
7644
|
-
const getStatusTitle = useCallback((
|
|
7645
|
-
const translationKey = STATUS_TRANSLATION_KEYS[
|
|
7646
|
-
const defaultValue = STATUS_TITLES[
|
|
7642
|
+
const getStatusTitle = useCallback((currentStatus) => {
|
|
7643
|
+
const translationKey = STATUS_TRANSLATION_KEYS[currentStatus] || STATUS_TRANSLATION_KEYS[RemoteTaskStatus.Unknown];
|
|
7644
|
+
const defaultValue = STATUS_TITLES[currentStatus] || STATUS_TITLES[RemoteTaskStatus.Unknown];
|
|
7647
7645
|
return t(translationKey, { ns: "dashboard", defaultValue });
|
|
7648
7646
|
}, [t]);
|
|
7649
|
-
const getStatusColor = useCallback((
|
|
7650
|
-
return statusColors?.[
|
|
7647
|
+
const getStatusColor = useCallback((currentStatus) => {
|
|
7648
|
+
return statusColors?.[currentStatus] || STATUS_COLORS[currentStatus] || STATUS_COLORS[RemoteTaskStatus.Unknown];
|
|
7651
7649
|
}, [statusColors]);
|
|
7652
|
-
return (jsxs(Dialog, { isOpen: isOpen, onCloseRequest: onClose, modal: true, maxWidth: "800px", minWidth: "600px", minHeight: "600px", children: [jsx(DialogTitle, { children: jsxs(Flex, { justifyContent: "space-between", alignItems: "center", children: [jsxs(Flex, { alignItems: "center", children: [jsx(FlexSpan, { marginRight: "1rem", children: t("taskLogs", { ns: "dashboard", defaultValue: "Логи выполнения задачи" }) }), jsx(ThemeProvider, { theme: darkTheme, children: jsx(StatusBadge, { text: getStatusTitle(status), bgColor: getStatusColor(status) }) })] }), jsx(IconButton, { kind: "close", onClick: onClose })] }) }), jsx(DialogContent, { children: jsx(Flex, { flexDirection: "column", height: "100%", marginBottom: "2rem", children: jsx(LogTerminal, { log: logs || t("taskLogsEmpty", { ns: "dashboard", defaultValue: "Логи отсутствуют" }) }) }) })] }));
|
|
7650
|
+
return (jsxs(Dialog, { isOpen: isOpen, onCloseRequest: onClose, modal: true, maxWidth: "800px", minWidth: "600px", minHeight: "600px", children: [jsx(DialogTitle, { children: jsxs(Flex, { justifyContent: "space-between", alignItems: "center", children: [jsxs(Flex, { alignItems: "center", children: [jsx(FlexSpan, { marginRight: "1rem", children: t("taskLogs", { ns: "dashboard", defaultValue: "Логи выполнения задачи" }) }), jsx(ThemeProvider, { theme: darkTheme, children: jsx(StatusBadge, { text: getStatusTitle(status), bgColor: getStatusColor(status) }) })] }), jsxs(Flex, { alignItems: "center", width: "auto", children: [onMinimize && jsx(IconButton, { kind: "rollup", onClick: onMinimize }), jsx(IconButton, { kind: "close", onClick: onClose })] })] }) }), jsx(DialogContent, { children: jsx(Flex, { flexDirection: "column", height: "100%", marginBottom: "2rem", children: jsx(LogTerminal, { log: logs || t("taskLogsEmpty", { ns: "dashboard", defaultValue: "Логи отсутствуют" }) }) }) })] }));
|
|
7653
7651
|
};
|
|
7654
7652
|
|
|
7655
7653
|
var ThemeName;
|
|
@@ -7712,19 +7710,32 @@ const buildFiltersFromResponse = (responseFilters, result) => {
|
|
|
7712
7710
|
return Object.keys(filters).length ? filters : null;
|
|
7713
7711
|
};
|
|
7714
7712
|
|
|
7713
|
+
const ClampedText = styled.div `
|
|
7714
|
+
display: -webkit-box;
|
|
7715
|
+
-webkit-line-clamp: 2;
|
|
7716
|
+
-webkit-box-orient: vertical;
|
|
7717
|
+
overflow: hidden;
|
|
7718
|
+
text-overflow: ellipsis;
|
|
7719
|
+
word-break: break-word;
|
|
7720
|
+
`;
|
|
7721
|
+
const clampDescription = (text) => createElement(ClampedText, null, text);
|
|
7722
|
+
|
|
7715
7723
|
const RUN_ID_RADIX = 36;
|
|
7716
7724
|
const RUN_ID_LENGTH = 8;
|
|
7717
7725
|
const generateRunId = () => `task-${Date.now()}-${Math.random().toString(RUN_ID_RADIX).slice(2, RUN_ID_LENGTH)}`;
|
|
7718
|
-
const useTaskNotifications = ({ enabled, status, lastMessage, openLog, }) => {
|
|
7726
|
+
const useTaskNotifications = ({ enabled, suppressed, status, lastMessage, openLog, }) => {
|
|
7719
7727
|
const { t, notification } = useGlobalContext();
|
|
7720
7728
|
const runIdRef = useRef(null);
|
|
7721
7729
|
const prevStatusRef = useRef(RemoteTaskStatus.Unknown);
|
|
7730
|
+
const isVisibleRef = useRef(false);
|
|
7731
|
+
const [dismissed, setDismissed] = useState(false);
|
|
7722
7732
|
useEffect(() => {
|
|
7723
7733
|
if (!enabled) {
|
|
7724
7734
|
if (runIdRef.current) {
|
|
7725
7735
|
notification?.close(runIdRef.current);
|
|
7726
7736
|
runIdRef.current = null;
|
|
7727
7737
|
}
|
|
7738
|
+
isVisibleRef.current = false;
|
|
7728
7739
|
prevStatusRef.current = status;
|
|
7729
7740
|
return;
|
|
7730
7741
|
}
|
|
@@ -7735,54 +7746,70 @@ const useTaskNotifications = ({ enabled, status, lastMessage, openLog, }) => {
|
|
|
7735
7746
|
const isFreshRun = status === RemoteTaskStatus.Process && prevStatusRef.current !== RemoteTaskStatus.Process;
|
|
7736
7747
|
if (isFreshRun) {
|
|
7737
7748
|
runIdRef.current = generateRunId();
|
|
7749
|
+
isVisibleRef.current = false;
|
|
7750
|
+
setDismissed(false);
|
|
7738
7751
|
}
|
|
7739
7752
|
if (!runIdRef.current) {
|
|
7740
7753
|
runIdRef.current = generateRunId();
|
|
7741
7754
|
}
|
|
7742
7755
|
const id = runIdRef.current;
|
|
7743
|
-
const description = lastMessage || t("taskStarted", { ns: "dashboard", defaultValue: "Запуск задачи…" });
|
|
7744
|
-
const button = t("details", { ns: "dashboard", defaultValue: "Подробнее" });
|
|
7756
|
+
const description = clampDescription(lastMessage || t("taskStarted", { ns: "dashboard", defaultValue: "Запуск задачи…" }));
|
|
7745
7757
|
const base = {
|
|
7746
7758
|
id,
|
|
7747
7759
|
title: "",
|
|
7748
7760
|
description,
|
|
7749
7761
|
duration: Number.MAX_SAFE_INTEGER,
|
|
7750
|
-
|
|
7751
|
-
|
|
7752
|
-
|
|
7753
|
-
|
|
7762
|
+
...(lastMessage ? {
|
|
7763
|
+
button: t("details", { ns: "dashboard", defaultValue: "Подробнее" }),
|
|
7764
|
+
buttonIcon: "info",
|
|
7765
|
+
buttonColor: "primary",
|
|
7766
|
+
onButtonClick: openLog,
|
|
7767
|
+
} : {}),
|
|
7754
7768
|
};
|
|
7769
|
+
let item = null;
|
|
7755
7770
|
if (status === RemoteTaskStatus.Process) {
|
|
7756
|
-
|
|
7771
|
+
item = {
|
|
7757
7772
|
...base,
|
|
7758
7773
|
title: t("taskInProgress", { ns: "dashboard", defaultValue: "Выполняется" }),
|
|
7759
7774
|
progress: true,
|
|
7760
7775
|
};
|
|
7761
|
-
if (isFreshRun) {
|
|
7762
|
-
notification?.add(item);
|
|
7763
|
-
}
|
|
7764
|
-
else {
|
|
7765
|
-
notification?.update(item);
|
|
7766
|
-
}
|
|
7767
7776
|
}
|
|
7768
7777
|
else if (status === RemoteTaskStatus.Completed) {
|
|
7769
|
-
|
|
7778
|
+
item = {
|
|
7770
7779
|
...base,
|
|
7771
7780
|
title: t("taskCompleted", { ns: "dashboard", defaultValue: "Выполнено" }),
|
|
7772
7781
|
success: true,
|
|
7773
7782
|
progress: false,
|
|
7774
|
-
}
|
|
7783
|
+
};
|
|
7775
7784
|
}
|
|
7776
7785
|
else if (status === RemoteTaskStatus.Error) {
|
|
7777
|
-
|
|
7786
|
+
item = {
|
|
7778
7787
|
...base,
|
|
7779
7788
|
title: t("taskError", { ns: "dashboard", defaultValue: "Ошибка" }),
|
|
7780
7789
|
error: true,
|
|
7781
7790
|
progress: false,
|
|
7782
|
-
}
|
|
7791
|
+
};
|
|
7792
|
+
}
|
|
7793
|
+
if (!item) {
|
|
7794
|
+
prevStatusRef.current = status;
|
|
7795
|
+
return;
|
|
7796
|
+
}
|
|
7797
|
+
if (suppressed || dismissed) {
|
|
7798
|
+
if (isVisibleRef.current) {
|
|
7799
|
+
notification?.close(id);
|
|
7800
|
+
isVisibleRef.current = false;
|
|
7801
|
+
}
|
|
7802
|
+
}
|
|
7803
|
+
else if (isVisibleRef.current) {
|
|
7804
|
+
notification?.update(item);
|
|
7805
|
+
}
|
|
7806
|
+
else {
|
|
7807
|
+
notification?.add(item);
|
|
7808
|
+
isVisibleRef.current = true;
|
|
7783
7809
|
}
|
|
7784
7810
|
prevStatusRef.current = status;
|
|
7785
|
-
}, [enabled, status, lastMessage, openLog, t, notification]);
|
|
7811
|
+
}, [enabled, suppressed, dismissed, status, lastMessage, openLog, t, notification]);
|
|
7812
|
+
return { setNotificationDismissed: setDismissed };
|
|
7786
7813
|
};
|
|
7787
7814
|
|
|
7788
7815
|
const TaskContainer = memo(({ type, elementConfig, renderElement }) => {
|
|
@@ -7793,12 +7820,21 @@ const TaskContainer = memo(({ type, elementConfig, renderElement }) => {
|
|
|
7793
7820
|
const { taskId, runTask, stopTask, status, openLog, loading, isLogDialogOpen, closeLog, log, lastMessage, result, } = usePythonTask();
|
|
7794
7821
|
const { options } = elementConfig || {};
|
|
7795
7822
|
const { title, relatedResources, center, icon, statusColors, responseFilters, useNotifications, } = options || {};
|
|
7796
|
-
useTaskNotifications({
|
|
7823
|
+
const { setNotificationDismissed } = useTaskNotifications({
|
|
7797
7824
|
enabled: !!useNotifications,
|
|
7825
|
+
suppressed: isLogDialogOpen,
|
|
7798
7826
|
status,
|
|
7799
7827
|
lastMessage,
|
|
7800
7828
|
openLog,
|
|
7801
7829
|
});
|
|
7830
|
+
const onCloseLog = useCallback(() => {
|
|
7831
|
+
setNotificationDismissed(true);
|
|
7832
|
+
closeLog();
|
|
7833
|
+
}, [closeLog, setNotificationDismissed]);
|
|
7834
|
+
const onMinimizeLog = useCallback(() => {
|
|
7835
|
+
setNotificationDismissed(false);
|
|
7836
|
+
closeLog();
|
|
7837
|
+
}, [closeLog, setNotificationDismissed]);
|
|
7802
7838
|
useEffect(() => {
|
|
7803
7839
|
const filtersToApply = buildFiltersFromResponse(responseFilters, result);
|
|
7804
7840
|
if (filtersToApply)
|
|
@@ -7823,7 +7859,7 @@ const TaskContainer = memo(({ type, elementConfig, renderElement }) => {
|
|
|
7823
7859
|
return runTask({ resourceId, parameters: newParams, script, fileName, methodName });
|
|
7824
7860
|
}));
|
|
7825
7861
|
}, [attributes, currentPage.filters, dataSources, ewktGeometry, layerInfo, projectDataSources, relatedResources, runTask, selectedFilters, stopTask, taskId]);
|
|
7826
|
-
return (jsxs(Fragment$1, { children: [jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), jsxs(Flex, { justifyContent: center ? "center" : "flex-start", children: [jsx(StatusWaitingButton, { title: title || t("run", { ns: "dashboard", defaultValue: "Запуск" }), icon: icon, status: status, statusColors: statusColors, isWaiting: loading || !!taskId, isDisabled: !relatedResources?.length, onClick: onClick }), !!(log || taskId) && (jsxs(Fragment$1, { children: [jsx(IconButton, { kind: "info", onClick: openLog }), jsx(LogDialog, { logs: log, status: status, statusColors: statusColors, isOpen: isLogDialogOpen, onClose:
|
|
7862
|
+
return (jsxs(Fragment$1, { children: [jsx(ExpandableTitle, { elementConfig: elementConfig, type: type, renderElement: renderElement }), jsxs(Flex, { justifyContent: center ? "center" : "flex-start", children: [jsx(StatusWaitingButton, { title: title || t("run", { ns: "dashboard", defaultValue: "Запуск" }), icon: icon, status: status, statusColors: statusColors, isWaiting: loading || !!taskId, isDisabled: !relatedResources?.length, onClick: onClick }), !!(log || taskId) && (jsxs(Fragment$1, { children: [jsx(IconButton, { kind: "info", onClick: openLog }), jsx(LogDialog, { logs: log, status: status, statusColors: statusColors, isOpen: isLogDialogOpen, onClose: onCloseLog, onMinimize: useNotifications ? onMinimizeLog : undefined })] }))] })] }));
|
|
7827
7863
|
});
|
|
7828
7864
|
|
|
7829
7865
|
const EditContainer = ({ type, elementConfig, renderElement }) => {
|
|
@@ -9002,115 +9038,6 @@ const FeatureCardDefaultHeader = ({ noFeature }) => {
|
|
|
9002
9038
|
return (jsx(DefaultHeaderWrapper, { withPadding: withPadding, height: height, children: jsx(ThemeProvider, { theme: getThemeByName(themeName), children: jsx(Header, { "$overlay": overlay, "$isRow": !column, children: jsxs(HeaderFrontView, { isDefault: !column, children: [jsxs(HeaderContainer, { children: [jsx(HeaderLayerIcon, {}), jsx(HeaderTitle, { noFeature: noFeature })] }), jsx(FeatureCardButtons, {})] }) }) }) }));
|
|
9003
9039
|
};
|
|
9004
9040
|
|
|
9005
|
-
const HeaderWrapperMixin = css `
|
|
9006
|
-
${Header} {
|
|
9007
|
-
min-height: 5.25rem;
|
|
9008
|
-
}
|
|
9009
|
-
|
|
9010
|
-
${HeaderContainer} {
|
|
9011
|
-
max-width: 100%;
|
|
9012
|
-
width: 100%;
|
|
9013
|
-
}
|
|
9014
|
-
|
|
9015
|
-
${FeatureControls} {
|
|
9016
|
-
max-width: calc(100% - 2rem);
|
|
9017
|
-
width: calc(100% - 2rem);
|
|
9018
|
-
margin-top: -0.5rem;
|
|
9019
|
-
padding-top: 1rem;
|
|
9020
|
-
border-radius: ${({ theme: { borderRadius } }) => borderRadius.medium};
|
|
9021
|
-
}
|
|
9022
|
-
|
|
9023
|
-
${({ $fontColor }) => !!$fontColor && HeaderFontColorMixin};
|
|
9024
|
-
`;
|
|
9025
|
-
const HeaderIcon = styled(Flex) `
|
|
9026
|
-
position: absolute;
|
|
9027
|
-
top: 0;
|
|
9028
|
-
right: 0;
|
|
9029
|
-
align-items: center;
|
|
9030
|
-
justify-content: center;
|
|
9031
|
-
width: 7.625rem;
|
|
9032
|
-
height: 100%;
|
|
9033
|
-
|
|
9034
|
-
span[kind] {
|
|
9035
|
-
width: 4rem;
|
|
9036
|
-
|
|
9037
|
-
:after {
|
|
9038
|
-
font-size: 4rem;
|
|
9039
|
-
color: rgba(255, 255, 255, 0.36);
|
|
9040
|
-
}
|
|
9041
|
-
}
|
|
9042
|
-
|
|
9043
|
-
span[kind]:after,
|
|
9044
|
-
path,
|
|
9045
|
-
line,
|
|
9046
|
-
circle {
|
|
9047
|
-
fill: rgba(255, 255, 255, 0.36);
|
|
9048
|
-
}
|
|
9049
|
-
|
|
9050
|
-
&& > * {
|
|
9051
|
-
display: flex;
|
|
9052
|
-
align-items: center;
|
|
9053
|
-
height: 100%;
|
|
9054
|
-
}
|
|
9055
|
-
`;
|
|
9056
|
-
const BigIconHeaderMixin = css `
|
|
9057
|
-
${HeaderIcon} {
|
|
9058
|
-
min-width: 14rem;
|
|
9059
|
-
right: -3rem;
|
|
9060
|
-
|
|
9061
|
-
span[kind]:after {
|
|
9062
|
-
font-size: 14rem;
|
|
9063
|
-
}
|
|
9064
|
-
}
|
|
9065
|
-
`;
|
|
9066
|
-
const WithPaddingHeaderMixin = css `
|
|
9067
|
-
${Header} {
|
|
9068
|
-
width: 100%;
|
|
9069
|
-
margin: -0.5rem -0.5rem 0.5rem -0.5rem;
|
|
9070
|
-
}
|
|
9071
|
-
`;
|
|
9072
|
-
const BottomBlurHeaderMixin = css `
|
|
9073
|
-
${Header} {
|
|
9074
|
-
margin-bottom: 0;
|
|
9075
|
-
|
|
9076
|
-
&::after {
|
|
9077
|
-
content: "";
|
|
9078
|
-
position: absolute;
|
|
9079
|
-
top: 0;
|
|
9080
|
-
right: 0;
|
|
9081
|
-
bottom: 0;
|
|
9082
|
-
left: 0;
|
|
9083
|
-
z-index: 11;
|
|
9084
|
-
pointer-events: none;
|
|
9085
|
-
background: ${({ theme: { palette } }) => palette.background};
|
|
9086
|
-
mask-image: linear-gradient(to top, #000 0%, transparent 100%);
|
|
9087
|
-
-webkit-mask-image: linear-gradient(to top, #000 0%, transparent 100%);
|
|
9088
|
-
}
|
|
9089
|
-
}
|
|
9090
|
-
|
|
9091
|
-
${HeaderFrontView} {
|
|
9092
|
-
z-index: 12;
|
|
9093
|
-
}
|
|
9094
|
-
`;
|
|
9095
|
-
const BackgroundHeaderWrapper = styled.div `
|
|
9096
|
-
${Header} {
|
|
9097
|
-
width: calc(100% + 1rem);
|
|
9098
|
-
height: ${({ $height }) => $height ? `${$height}px` : "auto"};
|
|
9099
|
-
margin: -1rem -1rem 1rem -1rem;
|
|
9100
|
-
border-radius: 0.5rem;
|
|
9101
|
-
background: ${({ $bgColor }) => $bgColor || "linear-gradient(96.55deg, #FFFCD3 0%, #B4DC47 100%)"};
|
|
9102
|
-
overflow: hidden;
|
|
9103
|
-
}
|
|
9104
|
-
|
|
9105
|
-
${HeaderWrapperMixin};
|
|
9106
|
-
|
|
9107
|
-
${({ $bigIcon }) => $bigIcon && BigIconHeaderMixin};
|
|
9108
|
-
|
|
9109
|
-
${({ $withPadding }) => $withPadding && WithPaddingHeaderMixin};
|
|
9110
|
-
|
|
9111
|
-
${({ $bottomBlur }) => $bottomBlur && BottomBlurHeaderMixin};
|
|
9112
|
-
`;
|
|
9113
|
-
|
|
9114
9041
|
const ImageContainerButton = styled(FlatButton) `
|
|
9115
9042
|
min-height: 1.5rem;
|
|
9116
9043
|
border-radius: ${({ theme: { borderRadius } }) => borderRadius.large};
|
|
@@ -10029,6 +9956,121 @@ const HeaderSlideshow = styled.div `
|
|
|
10029
9956
|
}
|
|
10030
9957
|
`;
|
|
10031
9958
|
|
|
9959
|
+
const HeaderWrapperMixin = css `
|
|
9960
|
+
${Header} {
|
|
9961
|
+
min-height: 5.25rem;
|
|
9962
|
+
}
|
|
9963
|
+
|
|
9964
|
+
${HeaderContainer} {
|
|
9965
|
+
max-width: 100%;
|
|
9966
|
+
width: 100%;
|
|
9967
|
+
}
|
|
9968
|
+
|
|
9969
|
+
${FeatureControls} {
|
|
9970
|
+
max-width: calc(100% - 2rem);
|
|
9971
|
+
width: calc(100% - 2rem);
|
|
9972
|
+
margin-top: -0.5rem;
|
|
9973
|
+
padding-top: 1rem;
|
|
9974
|
+
border-radius: ${({ theme: { borderRadius } }) => borderRadius.medium};
|
|
9975
|
+
}
|
|
9976
|
+
|
|
9977
|
+
${({ $fontColor }) => !!$fontColor && HeaderFontColorMixin};
|
|
9978
|
+
`;
|
|
9979
|
+
const HeaderIcon = styled(Flex) `
|
|
9980
|
+
position: absolute;
|
|
9981
|
+
top: 0;
|
|
9982
|
+
right: 0;
|
|
9983
|
+
align-items: center;
|
|
9984
|
+
justify-content: center;
|
|
9985
|
+
width: 7.625rem;
|
|
9986
|
+
height: 100%;
|
|
9987
|
+
|
|
9988
|
+
span[kind] {
|
|
9989
|
+
width: 4rem;
|
|
9990
|
+
|
|
9991
|
+
:after {
|
|
9992
|
+
font-size: 4rem;
|
|
9993
|
+
color: rgba(255, 255, 255, 0.36);
|
|
9994
|
+
}
|
|
9995
|
+
}
|
|
9996
|
+
|
|
9997
|
+
span[kind]:after,
|
|
9998
|
+
path,
|
|
9999
|
+
line,
|
|
10000
|
+
circle {
|
|
10001
|
+
fill: rgba(255, 255, 255, 0.36);
|
|
10002
|
+
}
|
|
10003
|
+
|
|
10004
|
+
&& > * {
|
|
10005
|
+
display: flex;
|
|
10006
|
+
align-items: center;
|
|
10007
|
+
height: 100%;
|
|
10008
|
+
}
|
|
10009
|
+
`;
|
|
10010
|
+
const BigIconHeaderMixin = css `
|
|
10011
|
+
${HeaderIcon} {
|
|
10012
|
+
min-width: 14rem;
|
|
10013
|
+
right: -3rem;
|
|
10014
|
+
|
|
10015
|
+
span[kind]:after {
|
|
10016
|
+
font-size: 14rem;
|
|
10017
|
+
}
|
|
10018
|
+
}
|
|
10019
|
+
`;
|
|
10020
|
+
const WithPaddingHeaderMixin = css `
|
|
10021
|
+
${Header} {
|
|
10022
|
+
width: 100%;
|
|
10023
|
+
margin: -0.5rem -0.5rem 0.5rem -0.5rem;
|
|
10024
|
+
}
|
|
10025
|
+
`;
|
|
10026
|
+
const BottomBlurHeaderMixin = css `
|
|
10027
|
+
${Header} {
|
|
10028
|
+
margin-bottom: 0;
|
|
10029
|
+
|
|
10030
|
+
&::before {
|
|
10031
|
+
-webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
|
|
10032
|
+
mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
|
|
10033
|
+
}
|
|
10034
|
+
}
|
|
10035
|
+
|
|
10036
|
+
${ImageContainerBg} {
|
|
10037
|
+
-webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
|
|
10038
|
+
mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
|
|
10039
|
+
}
|
|
10040
|
+
|
|
10041
|
+
${HeaderFrontView} {
|
|
10042
|
+
z-index: 12;
|
|
10043
|
+
}
|
|
10044
|
+
`;
|
|
10045
|
+
const BackgroundHeaderWrapper = styled.div `
|
|
10046
|
+
${Header} {
|
|
10047
|
+
position: relative;
|
|
10048
|
+
width: calc(100% + 1rem);
|
|
10049
|
+
height: ${({ $height }) => $height ? `${$height}px` : "auto"};
|
|
10050
|
+
margin: -1rem -1rem 1rem -1rem;
|
|
10051
|
+
border-radius: 0.5rem;
|
|
10052
|
+
background: transparent;
|
|
10053
|
+
overflow: hidden;
|
|
10054
|
+
|
|
10055
|
+
&::before {
|
|
10056
|
+
content: "";
|
|
10057
|
+
position: absolute;
|
|
10058
|
+
inset: 0;
|
|
10059
|
+
z-index: 0;
|
|
10060
|
+
pointer-events: none;
|
|
10061
|
+
background: ${({ $bgColor }) => $bgColor || "linear-gradient(96.55deg, #FFFCD3 0%, #B4DC47 100%)"};
|
|
10062
|
+
}
|
|
10063
|
+
}
|
|
10064
|
+
|
|
10065
|
+
${HeaderWrapperMixin};
|
|
10066
|
+
|
|
10067
|
+
${({ $bigIcon }) => $bigIcon && BigIconHeaderMixin};
|
|
10068
|
+
|
|
10069
|
+
${({ $withPadding }) => $withPadding && WithPaddingHeaderMixin};
|
|
10070
|
+
|
|
10071
|
+
${({ $bottomBlur }) => $bottomBlur && BottomBlurHeaderMixin};
|
|
10072
|
+
`;
|
|
10073
|
+
|
|
10032
10074
|
const FeatureCardBackgroundHeader = () => {
|
|
10033
10075
|
const { themeName: pageThemeName } = useGlobalContext();
|
|
10034
10076
|
const { config } = useWidgetConfig(WidgetType.FeatureCard);
|
|
@@ -10284,8 +10326,6 @@ const ModalIcon = styled(IconButton) `
|
|
|
10284
10326
|
}
|
|
10285
10327
|
`;
|
|
10286
10328
|
|
|
10287
|
-
const isEmptyElementValue = (value) => value === "" || value === null || value === undefined;
|
|
10288
|
-
|
|
10289
10329
|
const isHiddenEmptyValue = ({ value, children, hideEmpty, renderElement, }) => {
|
|
10290
10330
|
const valueElement = children?.find(item => item.id === "value");
|
|
10291
10331
|
const renderedValue = valueElement ? renderElement({ id: "value" }) : null;
|