@vention/machine-apps-components 0.6.27 → 1.0.1
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/index.esm.js +335 -303
- package/package.json +1 -1
- package/src/constants/z-index.d.ts +8 -0
- package/src/contexts/i18n-context.d.ts +12 -0
- package/src/contexts/i18n-provider.d.ts +13 -0
- package/src/hooks/use-auto-scroll-input.d.ts +6 -0
- package/src/hooks/use-i18n.d.ts +19 -0
- package/src/i18n/config.d.ts +8 -0
- package/src/i18n/locales/de.d.ts +141 -0
- package/src/i18n/locales/en.d.ts +141 -0
- package/src/i18n/locales/es.d.ts +141 -0
- package/src/i18n/locales/fr.d.ts +141 -0
- package/src/i18n/utils.d.ts +13 -0
- package/src/index.d.ts +28 -0
- package/src/lib/action-button/action-button.d.ts +18 -0
- package/src/lib/action-button/action-button.stories.d.ts +18 -0
- package/src/lib/file-upload-panel/file-upload-panel.d.ts +27 -0
- package/src/lib/file-upload-panel/file-upload-panel.stories.d.ts +14 -0
- package/src/lib/i18n-settings/i18n-settings.d.ts +10 -0
- package/src/lib/i18n-settings/i18n-settings.stories.d.ts +8 -0
- package/src/lib/logs/log-filter-form.d.ts +9 -0
- package/src/lib/logs/logs-pagination.d.ts +8 -0
- package/src/lib/logs/logs-panel.d.ts +61 -0
- package/src/lib/logs/logs-panel.stories.d.ts +7 -0
- package/src/lib/logs/logs-table.d.ts +15 -0
- package/src/lib/navigation-bar/navigation-bar-item.d.ts +17 -0
- package/src/lib/navigation-bar/navigation-bar.d.ts +20 -0
- package/src/lib/navigation-bar/navigation-bar.stories.d.ts +6 -0
- package/src/lib/navigation-bar/navigation-confirmation-modal.d.ts +7 -0
- package/src/lib/navigation-bar/password-protection-modal.d.ts +8 -0
- package/src/lib/navigation-bar/password-protection-modal.stories.d.ts +6 -0
- package/src/lib/navigation-bar/time-label.d.ts +6 -0
- package/src/lib/press-button/press-button.d.ts +18 -0
- package/src/lib/press-button/press-button.stories.d.ts +14 -0
- package/src/lib/product-form-list/product-form-list.d.ts +33 -0
- package/src/lib/product-form-list/product-form-list.stories.d.ts +20 -0
- package/src/lib/settings-page/settings-page.d.ts +11 -0
- package/src/lib/settings-page/settings-page.stories.d.ts +9 -0
- package/src/lib/sidebar/sidebar.d.ts +18 -0
- package/src/lib/sidebar/sidebar.stories.d.ts +8 -0
- package/src/lib/status-top-bar/status-top-bar-button.d.ts +17 -0
- package/src/lib/status-top-bar/status-top-bar.d.ts +27 -0
- package/src/lib/status-top-bar/status-top-bar.stories.d.ts +10 -0
- package/src/lib/step-progress-circle/step-progress-circle.d.ts +19 -0
- package/src/lib/step-progress-circle/step-progress-circle.stories.d.ts +18 -0
- package/src/lib/utils/api-config-utils.d.ts +34 -0
- package/src/lib/utils/device-utils.d.ts +14 -0
- package/src/test-setup.d.ts +1 -0
- package/src/test-utils.d.ts +13 -0
- package/src/types/user-level.d.ts +6 -0
package/index.esm.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
1
2
|
import React, { createContext, useState, useEffect, useCallback, useContext, useMemo, memo, useRef, forwardRef, useImperativeHandle } from 'react';
|
|
2
3
|
import i18n from 'i18next';
|
|
3
4
|
import { initReactI18next, useTranslation } from 'react-i18next';
|
|
@@ -9,7 +10,6 @@ import 'dayjs/locale/en';
|
|
|
9
10
|
import 'dayjs/locale/fr';
|
|
10
11
|
import 'dayjs/locale/de';
|
|
11
12
|
import 'dayjs/locale/es';
|
|
12
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
13
13
|
import { Box, useTheme, Typography, Button, InputAdornment, IconButton, TableContainer, Paper, Table, TableHead, TableRow, TableCell, TableBody, List, ListItem, Dialog, DialogTitle, DialogContent, DialogActions } from '@mui/material';
|
|
14
14
|
import { VentionSelect, VentionModalBase, VentionIcon, VentionTextInput, COLORS, VentionButton, VentionStatusIndicator, VentionSpinner, VentionAlert, VentionDropZone, VentionUploadFile, VentionIconButton } from '@vention/machine-ui';
|
|
15
15
|
import { tss } from 'tss-react/mui';
|
|
@@ -2284,7 +2284,7 @@ if (!i18n.isInitialized) {
|
|
|
2284
2284
|
try {
|
|
2285
2285
|
const stored = localStorage.getItem("machine-apps-components:timezone");
|
|
2286
2286
|
return stored || "auto";
|
|
2287
|
-
} catch (
|
|
2287
|
+
} catch (_a) {
|
|
2288
2288
|
return "auto";
|
|
2289
2289
|
}
|
|
2290
2290
|
};
|
|
@@ -2381,7 +2381,7 @@ const I18nProvider = function I18nProvider({
|
|
|
2381
2381
|
return normalizeLocale(stored, supportedLanguages);
|
|
2382
2382
|
}
|
|
2383
2383
|
return normalizeLocale(defaultLocale, supportedLanguages);
|
|
2384
|
-
} catch (
|
|
2384
|
+
} catch (_a) {
|
|
2385
2385
|
return normalizeLocale(defaultLocale, supportedLanguages);
|
|
2386
2386
|
}
|
|
2387
2387
|
});
|
|
@@ -2393,7 +2393,7 @@ const I18nProvider = function I18nProvider({
|
|
|
2393
2393
|
return stored;
|
|
2394
2394
|
}
|
|
2395
2395
|
return defaultUnitSystem;
|
|
2396
|
-
} catch (
|
|
2396
|
+
} catch (_a) {
|
|
2397
2397
|
return defaultUnitSystem;
|
|
2398
2398
|
}
|
|
2399
2399
|
});
|
|
@@ -2402,7 +2402,7 @@ const I18nProvider = function I18nProvider({
|
|
|
2402
2402
|
try {
|
|
2403
2403
|
const stored = localStorage.getItem(STORAGE_KEYS.timezone);
|
|
2404
2404
|
return stored || defaultTimezone;
|
|
2405
|
-
} catch (
|
|
2405
|
+
} catch (_a) {
|
|
2406
2406
|
return defaultTimezone;
|
|
2407
2407
|
}
|
|
2408
2408
|
});
|
|
@@ -2453,7 +2453,7 @@ const I18nProvider = function I18nProvider({
|
|
|
2453
2453
|
setUnitSystem,
|
|
2454
2454
|
setTimezone
|
|
2455
2455
|
};
|
|
2456
|
-
return
|
|
2456
|
+
return jsx(I18nContext.Provider, {
|
|
2457
2457
|
value: value,
|
|
2458
2458
|
children: children
|
|
2459
2459
|
});
|
|
@@ -2624,9 +2624,9 @@ function inchesToMm(inches) {
|
|
|
2624
2624
|
return inches * INCH_TO_MM;
|
|
2625
2625
|
}
|
|
2626
2626
|
function formatValueToDisplayUnit(value, unitSystem, options) {
|
|
2627
|
-
var
|
|
2628
|
-
const decimals = (
|
|
2629
|
-
const showUnit = (options
|
|
2627
|
+
var _a;
|
|
2628
|
+
const decimals = (_a = options === null || options === void 0 ? void 0 : options.decimals) !== null && _a !== void 0 ? _a : 2;
|
|
2629
|
+
const showUnit = (options === null || options === void 0 ? void 0 : options.showUnit) !== false;
|
|
2630
2630
|
if (unitSystem === "imperial") {
|
|
2631
2631
|
const inches = mmToInches(value);
|
|
2632
2632
|
return showUnit ? `${inches.toFixed(decimals)} in` : inches.toFixed(decimals);
|
|
@@ -3101,12 +3101,12 @@ const I18nSettings = function I18nSettings({
|
|
|
3101
3101
|
const handleLocaleChange = function handleLocaleChange(event) {
|
|
3102
3102
|
setLocale(event.target.value);
|
|
3103
3103
|
};
|
|
3104
|
-
return
|
|
3104
|
+
return jsxs(Box, {
|
|
3105
3105
|
className: cx(classes.container, className),
|
|
3106
3106
|
sx: sx,
|
|
3107
|
-
children: [
|
|
3107
|
+
children: [jsx(Box, {
|
|
3108
3108
|
className: classes.settingItem,
|
|
3109
|
-
children:
|
|
3109
|
+
children: jsx(VentionSelect, {
|
|
3110
3110
|
size: "xx-large",
|
|
3111
3111
|
variant: "outlined",
|
|
3112
3112
|
labelText: t("common.settings.unitSystem"),
|
|
@@ -3114,9 +3114,9 @@ const I18nSettings = function I18nSettings({
|
|
|
3114
3114
|
onChange: handleUnitSystemChange,
|
|
3115
3115
|
menuItems: unitSystemOptions
|
|
3116
3116
|
})
|
|
3117
|
-
}),
|
|
3117
|
+
}), jsx(Box, {
|
|
3118
3118
|
className: classes.settingItem,
|
|
3119
|
-
children:
|
|
3119
|
+
children: jsx(VentionSelect, {
|
|
3120
3120
|
size: "xx-large",
|
|
3121
3121
|
variant: "outlined",
|
|
3122
3122
|
labelText: t("common.settings.timezone"),
|
|
@@ -3124,9 +3124,9 @@ const I18nSettings = function I18nSettings({
|
|
|
3124
3124
|
onChange: handleTimezoneChange,
|
|
3125
3125
|
menuItems: timezoneOptions
|
|
3126
3126
|
})
|
|
3127
|
-
}), supportedLanguages.length > 1 &&
|
|
3127
|
+
}), supportedLanguages.length > 1 && jsx(Box, {
|
|
3128
3128
|
className: classes.settingItem,
|
|
3129
|
-
children:
|
|
3129
|
+
children: jsx(VentionSelect, {
|
|
3130
3130
|
size: "xx-large",
|
|
3131
3131
|
variant: "outlined",
|
|
3132
3132
|
labelText: t("common.settings.locale"),
|
|
@@ -5530,7 +5530,7 @@ function TimeLabel({
|
|
|
5530
5530
|
const [timeLabel, setTimeLabel] = useState(() => {
|
|
5531
5531
|
try {
|
|
5532
5532
|
return formatDate(Date.now(), "HH:mm");
|
|
5533
|
-
} catch (
|
|
5533
|
+
} catch (_a) {
|
|
5534
5534
|
return new Date().toLocaleTimeString([], {
|
|
5535
5535
|
hour: "numeric",
|
|
5536
5536
|
minute: "2-digit"
|
|
@@ -5541,7 +5541,7 @@ function TimeLabel({
|
|
|
5541
5541
|
try {
|
|
5542
5542
|
const formatted = formatDate(Date.now(), "HH:mm");
|
|
5543
5543
|
setTimeLabel(formatted);
|
|
5544
|
-
} catch (
|
|
5544
|
+
} catch (_a) {
|
|
5545
5545
|
setTimeLabel(new Date().toLocaleTimeString([], {
|
|
5546
5546
|
hour: "numeric",
|
|
5547
5547
|
minute: "2-digit"
|
|
@@ -5553,7 +5553,7 @@ function TimeLabel({
|
|
|
5553
5553
|
try {
|
|
5554
5554
|
const formatted = formatDate(Date.now(), "HH:mm");
|
|
5555
5555
|
setTimeLabel(formatted);
|
|
5556
|
-
} catch (
|
|
5556
|
+
} catch (_a) {
|
|
5557
5557
|
setTimeLabel(new Date().toLocaleTimeString([], {
|
|
5558
5558
|
hour: "numeric",
|
|
5559
5559
|
minute: "2-digit"
|
|
@@ -5562,9 +5562,9 @@ function TimeLabel({
|
|
|
5562
5562
|
}, 1000);
|
|
5563
5563
|
return () => clearInterval(intervalId);
|
|
5564
5564
|
}, [formatDate, timezone, locale]);
|
|
5565
|
-
return
|
|
5565
|
+
return jsx(Typography, {
|
|
5566
5566
|
className: className,
|
|
5567
|
-
color: color
|
|
5567
|
+
color: color !== null && color !== void 0 ? color : theme.palette.common.white,
|
|
5568
5568
|
children: timeLabel
|
|
5569
5569
|
});
|
|
5570
5570
|
}
|
|
@@ -5576,14 +5576,12 @@ function TimeLabel({
|
|
|
5576
5576
|
const isTouchScreenDevice = () => {
|
|
5577
5577
|
return "ontouchstart" in window || navigator.maxTouchPoints > 0;
|
|
5578
5578
|
};
|
|
5579
|
-
|
|
5580
5579
|
/**
|
|
5581
5580
|
* Closes the custom UI by sending a message to the parent window
|
|
5582
5581
|
*/
|
|
5583
5582
|
const closeCustomUi = () => {
|
|
5584
5583
|
window.parent.postMessage("closeCustomUi", "*");
|
|
5585
5584
|
};
|
|
5586
|
-
|
|
5587
5585
|
/**
|
|
5588
5586
|
* Navigates to a specific route in the Control Center
|
|
5589
5587
|
* @param route - The route to navigate to (remoteSupport or controlCenterHomepage)
|
|
@@ -5624,38 +5622,38 @@ const NavigationConfirmationModal = function NavigationConfirmationModal(props)
|
|
|
5624
5622
|
defaultValue: "Go to Remote Support"
|
|
5625
5623
|
});
|
|
5626
5624
|
};
|
|
5627
|
-
return
|
|
5625
|
+
return jsx(VentionModalBase, {
|
|
5628
5626
|
isOpen: isOpen,
|
|
5629
5627
|
onClose: onClose,
|
|
5630
5628
|
modalSize: "xx-large",
|
|
5631
5629
|
isTouchDevice: isTouchScreenDevice(),
|
|
5632
5630
|
width: "1312px",
|
|
5633
|
-
children:
|
|
5631
|
+
children: jsxs(Box, {
|
|
5634
5632
|
className: classes.modalContent,
|
|
5635
|
-
children: [
|
|
5633
|
+
children: [jsx(Box, {
|
|
5636
5634
|
className: classes.iconContainer,
|
|
5637
|
-
children:
|
|
5635
|
+
children: jsx(VentionIcon, {
|
|
5638
5636
|
type: "alert-triangle-filled",
|
|
5639
5637
|
size: 56,
|
|
5640
5638
|
color: "#F59E0B"
|
|
5641
5639
|
})
|
|
5642
|
-
}),
|
|
5640
|
+
}), jsx(Typography, {
|
|
5643
5641
|
className: classes.title,
|
|
5644
5642
|
children: t("navigation.modal.exit.title", {
|
|
5645
5643
|
defaultValue: "You are about to exit the application"
|
|
5646
5644
|
})
|
|
5647
|
-
}),
|
|
5645
|
+
}), jsx(Typography, {
|
|
5648
5646
|
className: classes.body,
|
|
5649
5647
|
children: t("navigation.modal.exit.message", {
|
|
5650
5648
|
defaultValue: "Please make sure your changes are saved before you leave the app."
|
|
5651
5649
|
})
|
|
5652
|
-
}),
|
|
5650
|
+
}), jsx(Button, {
|
|
5653
5651
|
onClick: handleConfirm,
|
|
5654
5652
|
className: classes.button,
|
|
5655
5653
|
disableRipple: true,
|
|
5656
|
-
children:
|
|
5654
|
+
children: jsx(Box, {
|
|
5657
5655
|
className: classes.buttonLabel,
|
|
5658
|
-
children:
|
|
5656
|
+
children: jsx(Typography, {
|
|
5659
5657
|
className: classes.buttonText,
|
|
5660
5658
|
children: getButtonText()
|
|
5661
5659
|
})
|
|
@@ -5678,11 +5676,11 @@ const useStyles$g = tss.create(({
|
|
|
5678
5676
|
iconContainer: {
|
|
5679
5677
|
marginBottom: theme.spacing(7)
|
|
5680
5678
|
},
|
|
5681
|
-
title: Object.assign({}, theme.typography.hmiText28SemiBold, {
|
|
5679
|
+
title: Object.assign(Object.assign({}, theme.typography.hmiText28SemiBold), {
|
|
5682
5680
|
textAlign: "center",
|
|
5683
5681
|
marginBottom: theme.spacing(6)
|
|
5684
5682
|
}),
|
|
5685
|
-
body: Object.assign({}, theme.typography.hmiText22Regular, {
|
|
5683
|
+
body: Object.assign(Object.assign({}, theme.typography.hmiText22Regular), {
|
|
5686
5684
|
textAlign: "center"
|
|
5687
5685
|
}),
|
|
5688
5686
|
button: {
|
|
@@ -5770,29 +5768,29 @@ const PasswordProtectionModal = function PasswordProtectionModal(props) {
|
|
|
5770
5768
|
setIsKeyboardVisible(false);
|
|
5771
5769
|
};
|
|
5772
5770
|
}, [isOpen]);
|
|
5773
|
-
return
|
|
5774
|
-
children: [
|
|
5771
|
+
return jsxs(Fragment, {
|
|
5772
|
+
children: [jsx("style", {
|
|
5775
5773
|
children: isKeyboardVisible && `
|
|
5776
5774
|
[data-testid="vention-modal-container"] {
|
|
5777
5775
|
transform: translateY(-22.5vh) !important;
|
|
5778
5776
|
transition: transform 0.3s ease-out;
|
|
5779
5777
|
}
|
|
5780
5778
|
`
|
|
5781
|
-
}),
|
|
5779
|
+
}), jsx(VentionModalBase, {
|
|
5782
5780
|
isOpen: isOpen,
|
|
5783
5781
|
onClose: handleClose,
|
|
5784
5782
|
modalSize: "x-large",
|
|
5785
5783
|
isTouchDevice: isTouchScreenDevice(),
|
|
5786
5784
|
width: "1120px",
|
|
5787
5785
|
backDropClickClosable: false,
|
|
5788
|
-
children:
|
|
5786
|
+
children: jsxs(Box, {
|
|
5789
5787
|
className: classes.modalContent,
|
|
5790
|
-
children: [
|
|
5788
|
+
children: [jsx(Typography, {
|
|
5791
5789
|
className: classes.title,
|
|
5792
5790
|
children: t("navigation.modal.password.title", {
|
|
5793
5791
|
defaultValue: "Administrator login required"
|
|
5794
5792
|
})
|
|
5795
|
-
}),
|
|
5793
|
+
}), jsx(Box, {
|
|
5796
5794
|
component: "form",
|
|
5797
5795
|
id: "password-form",
|
|
5798
5796
|
onSubmit: event => {
|
|
@@ -5800,7 +5798,7 @@ const PasswordProtectionModal = function PasswordProtectionModal(props) {
|
|
|
5800
5798
|
handleConfirm();
|
|
5801
5799
|
},
|
|
5802
5800
|
className: classes.inputContainer,
|
|
5803
|
-
children:
|
|
5801
|
+
children: jsx(VentionTextInput, {
|
|
5804
5802
|
label: t("navigation.modal.password.label", {
|
|
5805
5803
|
defaultValue: "Password"
|
|
5806
5804
|
}),
|
|
@@ -5817,14 +5815,14 @@ const PasswordProtectionModal = function PasswordProtectionModal(props) {
|
|
|
5817
5815
|
fullWidth: true,
|
|
5818
5816
|
size: "xx-large",
|
|
5819
5817
|
InputProps: {
|
|
5820
|
-
endAdornment:
|
|
5818
|
+
endAdornment: jsx(InputAdornment, {
|
|
5821
5819
|
position: "end",
|
|
5822
|
-
children:
|
|
5820
|
+
children: jsx(IconButton, {
|
|
5823
5821
|
onClick: () => setShowPassword(!showPassword),
|
|
5824
5822
|
edge: "end",
|
|
5825
5823
|
disableRipple: true,
|
|
5826
5824
|
type: "button",
|
|
5827
|
-
children:
|
|
5825
|
+
children: jsx(VentionIcon, {
|
|
5828
5826
|
type: showPassword ? "eye-closed" : "eye",
|
|
5829
5827
|
size: 28,
|
|
5830
5828
|
color: "#0f172a"
|
|
@@ -5833,14 +5831,14 @@ const PasswordProtectionModal = function PasswordProtectionModal(props) {
|
|
|
5833
5831
|
})
|
|
5834
5832
|
}
|
|
5835
5833
|
})
|
|
5836
|
-
}),
|
|
5834
|
+
}), jsx(Button, {
|
|
5837
5835
|
className: classes.button,
|
|
5838
5836
|
disableRipple: true,
|
|
5839
5837
|
type: "submit",
|
|
5840
5838
|
form: "password-form",
|
|
5841
|
-
children:
|
|
5839
|
+
children: jsx(Box, {
|
|
5842
5840
|
className: classes.buttonLabel,
|
|
5843
|
-
children:
|
|
5841
|
+
children: jsx(Typography, {
|
|
5844
5842
|
className: classes.buttonText,
|
|
5845
5843
|
children: t("navigation.modal.password.confirm", {
|
|
5846
5844
|
defaultValue: "Confirm"
|
|
@@ -5928,7 +5926,7 @@ const NavigationBarItem = function NavigationBarItem(props) {
|
|
|
5928
5926
|
const {
|
|
5929
5927
|
t
|
|
5930
5928
|
} = useI18n();
|
|
5931
|
-
const isActive = (location
|
|
5929
|
+
const isActive = (location === null || location === void 0 ? void 0 : location.pathname) === path;
|
|
5932
5930
|
const currentIcon = isDisabled && iconDisabled ? iconDisabled : icon;
|
|
5933
5931
|
const handleItemClick = function handleItemClick() {
|
|
5934
5932
|
if (isDisabled || !handleNavigate || !setPasswordProtectedItem) return;
|
|
@@ -5938,7 +5936,7 @@ const NavigationBarItem = function NavigationBarItem(props) {
|
|
|
5938
5936
|
}
|
|
5939
5937
|
onClick ? onClick() : handleNavigate(path);
|
|
5940
5938
|
};
|
|
5941
|
-
return
|
|
5939
|
+
return jsxs(Button, {
|
|
5942
5940
|
disableRipple: true,
|
|
5943
5941
|
disabled: isDisabled,
|
|
5944
5942
|
onClick: handleItemClick,
|
|
@@ -5946,10 +5944,10 @@ const NavigationBarItem = function NavigationBarItem(props) {
|
|
|
5946
5944
|
[classes.active]: isActive,
|
|
5947
5945
|
[classes.disabled]: isDisabled
|
|
5948
5946
|
}),
|
|
5949
|
-
children: [
|
|
5947
|
+
children: [jsx(Box, {
|
|
5950
5948
|
className: classes.navIcon,
|
|
5951
5949
|
children: currentIcon
|
|
5952
|
-
}),
|
|
5950
|
+
}), jsx(Typography, {
|
|
5953
5951
|
className: classes.navLabel,
|
|
5954
5952
|
children: t(label, {
|
|
5955
5953
|
defaultValue: label
|
|
@@ -6010,7 +6008,7 @@ const Z_INDEX = {
|
|
|
6010
6008
|
|
|
6011
6009
|
const iconSize = 32;
|
|
6012
6010
|
const NavigationBarRoot = function NavigationBarRoot(props) {
|
|
6013
|
-
var
|
|
6011
|
+
var _a;
|
|
6014
6012
|
const {
|
|
6015
6013
|
children,
|
|
6016
6014
|
showTimer = true,
|
|
@@ -6047,7 +6045,7 @@ const NavigationBarRoot = function NavigationBarRoot(props) {
|
|
|
6047
6045
|
useEffect(function updateCurrentPassword() {
|
|
6048
6046
|
const currentPage = React.Children.toArray(children).find(child => /*#__PURE__*/React.isValidElement(child) && child.type === NavigationBarItem && child.props.path === location.pathname);
|
|
6049
6047
|
const currentPagePassword = /*#__PURE__*/React.isValidElement(currentPage) ? currentPage.props.password : undefined;
|
|
6050
|
-
setCurrentPassword(currentPagePassword
|
|
6048
|
+
setCurrentPassword(currentPagePassword !== null && currentPagePassword !== void 0 ? currentPagePassword : null);
|
|
6051
6049
|
}, [location.pathname, children]);
|
|
6052
6050
|
const handleControlCenterClick = function handleControlCenterClick() {
|
|
6053
6051
|
if (isControlCenterDisabled) return;
|
|
@@ -6079,7 +6077,7 @@ const NavigationBarRoot = function NavigationBarRoot(props) {
|
|
|
6079
6077
|
if (child.type !== NavigationBarItem) return child;
|
|
6080
6078
|
const itemId = child.props.id;
|
|
6081
6079
|
const isDisabled = disabledSet.has(itemId);
|
|
6082
|
-
return /*#__PURE__*/React.cloneElement(child, Object.assign({}, child.props, {
|
|
6080
|
+
return /*#__PURE__*/React.cloneElement(child, Object.assign(Object.assign({}, child.props), {
|
|
6083
6081
|
isDisabled: isDisabled,
|
|
6084
6082
|
location: location,
|
|
6085
6083
|
handleNavigate: handleNavigate,
|
|
@@ -6093,23 +6091,23 @@ const NavigationBarRoot = function NavigationBarRoot(props) {
|
|
|
6093
6091
|
const handleClosePassword = function handleClosePassword() {
|
|
6094
6092
|
setPasswordProtectedItem(null);
|
|
6095
6093
|
};
|
|
6096
|
-
return
|
|
6097
|
-
children: [
|
|
6094
|
+
return jsxs(Fragment, {
|
|
6095
|
+
children: [jsx(NavigationConfirmationModal, {
|
|
6098
6096
|
isOpen: modalDestination !== null,
|
|
6099
6097
|
destination: modalDestination,
|
|
6100
6098
|
onClose: handleCloseConfirmation
|
|
6101
|
-
}),
|
|
6099
|
+
}), jsx(PasswordProtectionModal, {
|
|
6102
6100
|
isOpen: passwordProtectedItem !== null,
|
|
6103
6101
|
onClose: handleClosePassword,
|
|
6104
6102
|
onSuccess: handlePasswordSuccess,
|
|
6105
|
-
correctPassword: (
|
|
6106
|
-
}),
|
|
6103
|
+
correctPassword: (_a = passwordProtectedItem === null || passwordProtectedItem === void 0 ? void 0 : passwordProtectedItem.password) !== null && _a !== void 0 ? _a : ""
|
|
6104
|
+
}), jsx("footer", {
|
|
6107
6105
|
className: classes.root,
|
|
6108
|
-
children:
|
|
6106
|
+
children: jsxs(Box, {
|
|
6109
6107
|
className: classes.container,
|
|
6110
|
-
children: [
|
|
6108
|
+
children: [jsx(Box, {
|
|
6111
6109
|
className: classes.sideClusterLeft,
|
|
6112
|
-
children: showControlCenterButton &&
|
|
6110
|
+
children: showControlCenterButton && jsx(VentionButton, {
|
|
6113
6111
|
disableRipple: true,
|
|
6114
6112
|
onClick: handleControlCenterClick,
|
|
6115
6113
|
disabled: isControlCenterDisabled,
|
|
@@ -6120,7 +6118,7 @@ const NavigationBarRoot = function NavigationBarRoot(props) {
|
|
|
6120
6118
|
opacity: isControlCenterDisabled ? 0.5 : 1,
|
|
6121
6119
|
cursor: isControlCenterDisabled ? "not-allowed" : "pointer"
|
|
6122
6120
|
},
|
|
6123
|
-
children:
|
|
6121
|
+
children: jsx(Typography, {
|
|
6124
6122
|
className: classes.sideButtonLabel,
|
|
6125
6123
|
style: {
|
|
6126
6124
|
color: isControlCenterDisabled ? getFadedColor(theme.palette.common.white) : theme.palette.common.white
|
|
@@ -6130,12 +6128,12 @@ const NavigationBarRoot = function NavigationBarRoot(props) {
|
|
|
6130
6128
|
})
|
|
6131
6129
|
})
|
|
6132
6130
|
})
|
|
6133
|
-
}),
|
|
6131
|
+
}), jsx("nav", {
|
|
6134
6132
|
className: classes.tabBarButtonContainer,
|
|
6135
6133
|
children: processedChildren
|
|
6136
|
-
}),
|
|
6134
|
+
}), jsxs(Box, {
|
|
6137
6135
|
className: classes.sideClusterRight,
|
|
6138
|
-
children: [showSupportButton &&
|
|
6136
|
+
children: [showSupportButton && jsx(VentionButton, {
|
|
6139
6137
|
disableRipple: true,
|
|
6140
6138
|
onClick: handleSupportClick,
|
|
6141
6139
|
disabled: isSupportDisabled,
|
|
@@ -6146,12 +6144,12 @@ const NavigationBarRoot = function NavigationBarRoot(props) {
|
|
|
6146
6144
|
opacity: isSupportDisabled ? 0.5 : 1,
|
|
6147
6145
|
cursor: isSupportDisabled ? "not-allowed" : "pointer"
|
|
6148
6146
|
},
|
|
6149
|
-
iconLeft:
|
|
6147
|
+
iconLeft: jsx(VentionIcon, {
|
|
6150
6148
|
size: iconSize,
|
|
6151
6149
|
color: isSupportDisabled ? getFadedColor(theme.palette.common.white) : theme.palette.common.white,
|
|
6152
6150
|
type: "headset-filled"
|
|
6153
6151
|
}),
|
|
6154
|
-
children:
|
|
6152
|
+
children: jsx(Typography, {
|
|
6155
6153
|
className: classes.sideButtonLabel,
|
|
6156
6154
|
style: {
|
|
6157
6155
|
color: isSupportDisabled ? getFadedColor(theme.palette.common.white) : theme.palette.common.white
|
|
@@ -6160,7 +6158,7 @@ const NavigationBarRoot = function NavigationBarRoot(props) {
|
|
|
6160
6158
|
defaultValue: "Support"
|
|
6161
6159
|
})
|
|
6162
6160
|
})
|
|
6163
|
-
}), showTimer &&
|
|
6161
|
+
}), showTimer && jsx(TimeLabel, {
|
|
6164
6162
|
className: classes.timeLabel,
|
|
6165
6163
|
color: theme.palette.common.white
|
|
6166
6164
|
})]
|
|
@@ -6244,7 +6242,7 @@ const useStyles$d = tss.withParams().create(({
|
|
|
6244
6242
|
fontWeight: 600,
|
|
6245
6243
|
lineHeight: "32px"
|
|
6246
6244
|
},
|
|
6247
|
-
timeLabel: Object.assign({}, theme.typography.hmiText22Regular, {
|
|
6245
|
+
timeLabel: Object.assign(Object.assign({}, theme.typography.hmiText22Regular), {
|
|
6248
6246
|
fontWeight: 600
|
|
6249
6247
|
}),
|
|
6250
6248
|
tabBarButtonContainer: {
|
|
@@ -6346,7 +6344,7 @@ const StatusTopBarButton = function StatusTopBarButton(props) {
|
|
|
6346
6344
|
onClick();
|
|
6347
6345
|
}
|
|
6348
6346
|
};
|
|
6349
|
-
return
|
|
6347
|
+
return jsx(VentionButton, {
|
|
6350
6348
|
variant: variant,
|
|
6351
6349
|
onClick: handleClick,
|
|
6352
6350
|
disabled: disabled || !onClick,
|
|
@@ -6362,11 +6360,11 @@ const StatusTopBarButton = function StatusTopBarButton(props) {
|
|
|
6362
6360
|
backgroundColor: finalBackgroundColorHover || finalBackgroundColor
|
|
6363
6361
|
}
|
|
6364
6362
|
},
|
|
6365
|
-
iconLeft: finalIcon ?
|
|
6363
|
+
iconLeft: finalIcon ? jsx(Box, {
|
|
6366
6364
|
className: classes.iconWrapper,
|
|
6367
6365
|
children: finalIcon
|
|
6368
6366
|
}) : undefined,
|
|
6369
|
-
children:
|
|
6367
|
+
children: jsx(Typography, {
|
|
6370
6368
|
className: classes.actionLabel,
|
|
6371
6369
|
style: {
|
|
6372
6370
|
color: finalTextColor
|
|
@@ -6416,24 +6414,24 @@ const StatusTopBarRoot = function StatusTopBarRoot(props) {
|
|
|
6416
6414
|
});
|
|
6417
6415
|
const visibleButtons = buttonConfigs.filter(config => config.visible !== false);
|
|
6418
6416
|
const hasVisibleButtons = visibleButtons.length > 0;
|
|
6419
|
-
return
|
|
6417
|
+
return jsxs("header", {
|
|
6420
6418
|
className: classes.root,
|
|
6421
|
-
children: [
|
|
6419
|
+
children: [jsxs("div", {
|
|
6422
6420
|
className: classes.content,
|
|
6423
|
-
children: [
|
|
6421
|
+
children: [jsx("div", {
|
|
6424
6422
|
className: classes.leftArea,
|
|
6425
|
-
children: status &&
|
|
6423
|
+
children: status && jsx(VentionStatusIndicator, {
|
|
6426
6424
|
size: "xx-large",
|
|
6427
6425
|
dotColor: status.color,
|
|
6428
6426
|
label: status.label
|
|
6429
6427
|
})
|
|
6430
|
-
}), hasVisibleButtons &&
|
|
6428
|
+
}), hasVisibleButtons && jsx("div", {
|
|
6431
6429
|
className: classes.rightArea,
|
|
6432
|
-
children: visibleButtons.map(config =>
|
|
6430
|
+
children: visibleButtons.map(config => jsx(StatusTopBarButton, Object.assign({}, config, {
|
|
6433
6431
|
visible: true
|
|
6434
6432
|
}), config.id))
|
|
6435
6433
|
})]
|
|
6436
|
-
}),
|
|
6434
|
+
}), jsx("div", {
|
|
6437
6435
|
className: classes.bottomBorder
|
|
6438
6436
|
})]
|
|
6439
6437
|
});
|
|
@@ -6490,9 +6488,9 @@ const Sidebar = function Sidebar(props) {
|
|
|
6490
6488
|
} = useStyles$a({
|
|
6491
6489
|
variant
|
|
6492
6490
|
});
|
|
6493
|
-
return
|
|
6491
|
+
return jsx(Box, {
|
|
6494
6492
|
className: classes.container,
|
|
6495
|
-
children: items.map(item =>
|
|
6493
|
+
children: items.map(item => jsx(SidebarItemComponent, {
|
|
6496
6494
|
item: item,
|
|
6497
6495
|
variant: variant
|
|
6498
6496
|
}, item.id))
|
|
@@ -6511,7 +6509,7 @@ const SidebarItemComponent = function SidebarItemComponent(props) {
|
|
|
6511
6509
|
variant
|
|
6512
6510
|
});
|
|
6513
6511
|
const isDisabled = item.state === "disabled";
|
|
6514
|
-
return
|
|
6512
|
+
return jsx(Button, {
|
|
6515
6513
|
className: classes.button,
|
|
6516
6514
|
onClick: item.onClick,
|
|
6517
6515
|
disabled: isDisabled,
|
|
@@ -6519,30 +6517,30 @@ const SidebarItemComponent = function SidebarItemComponent(props) {
|
|
|
6519
6517
|
disableFocusRipple: true,
|
|
6520
6518
|
disableTouchRipple: true,
|
|
6521
6519
|
"data-testid": `sidebar-item-${item.id}`,
|
|
6522
|
-
children:
|
|
6520
|
+
children: jsxs(Box, {
|
|
6523
6521
|
className: classes.content,
|
|
6524
|
-
children: [
|
|
6522
|
+
children: [jsxs(Box, {
|
|
6525
6523
|
className: classes.leftSection,
|
|
6526
|
-
children: [item.icon ?
|
|
6524
|
+
children: [item.icon ? jsx(Box, {
|
|
6527
6525
|
className: classes.iconWrapper,
|
|
6528
6526
|
children: item.icon
|
|
6529
|
-
}) :
|
|
6527
|
+
}) : jsx(Box, {
|
|
6530
6528
|
className: classes.iconPlaceholder
|
|
6531
|
-
}),
|
|
6529
|
+
}), jsxs(Box, {
|
|
6532
6530
|
className: classes.textContainer,
|
|
6533
|
-
children: [
|
|
6531
|
+
children: [jsx(Typography, {
|
|
6534
6532
|
className: classes.title,
|
|
6535
6533
|
children: item.title
|
|
6536
|
-
}), item.subtitle &&
|
|
6534
|
+
}), item.subtitle && jsx(Typography, {
|
|
6537
6535
|
className: classes.subtitle,
|
|
6538
6536
|
children: item.subtitle
|
|
6539
6537
|
})]
|
|
6540
6538
|
})]
|
|
6541
|
-
}), item.iconType &&
|
|
6539
|
+
}), item.iconType && jsx(Box, {
|
|
6542
6540
|
className: classes.rightSection,
|
|
6543
|
-
children:
|
|
6541
|
+
children: jsx(Box, {
|
|
6544
6542
|
className: classes.rightIcon,
|
|
6545
|
-
children:
|
|
6543
|
+
children: jsx(VentionIcon, {
|
|
6546
6544
|
type: item.iconType,
|
|
6547
6545
|
size: ICON_SIZE
|
|
6548
6546
|
})
|
|
@@ -6588,7 +6586,7 @@ const useSidebarItemStyles = tss.withParams().create(function createSidebarItemS
|
|
|
6588
6586
|
transition: "all 0.2s ease"
|
|
6589
6587
|
};
|
|
6590
6588
|
if (isAccentVariant) {
|
|
6591
|
-
return Object.assign({}, baseStyles, {
|
|
6589
|
+
return Object.assign(Object.assign({}, baseStyles), {
|
|
6592
6590
|
borderRadius: 0,
|
|
6593
6591
|
backgroundColor: isActive ? theme.palette.background.surface1active : "transparent",
|
|
6594
6592
|
border: "none",
|
|
@@ -6598,7 +6596,7 @@ const useSidebarItemStyles = tss.withParams().create(function createSidebarItemS
|
|
|
6598
6596
|
}
|
|
6599
6597
|
});
|
|
6600
6598
|
}
|
|
6601
|
-
return Object.assign({}, baseStyles, {
|
|
6599
|
+
return Object.assign(Object.assign({}, baseStyles), {
|
|
6602
6600
|
borderRadius: theme.spacing(2),
|
|
6603
6601
|
backgroundColor: isActive ? theme.palette.background.surface1active : theme.palette.background.paper,
|
|
6604
6602
|
border: `1px solid ${isActive ? theme.palette.border.main : theme.palette.divider}`,
|
|
@@ -6640,10 +6638,10 @@ const useSidebarItemStyles = tss.withParams().create(function createSidebarItemS
|
|
|
6640
6638
|
flexDirection: "column",
|
|
6641
6639
|
gap: theme.spacing(1)
|
|
6642
6640
|
},
|
|
6643
|
-
title: Object.assign({}, theme.typography.heading24SemiBold, {
|
|
6641
|
+
title: Object.assign(Object.assign({}, theme.typography.heading24SemiBold), {
|
|
6644
6642
|
color: isDisabled ? theme.palette.text.disabled : theme.palette.text.primary
|
|
6645
6643
|
}),
|
|
6646
|
-
subtitle: Object.assign({}, theme.typography.hmiText20Regular, {
|
|
6644
|
+
subtitle: Object.assign(Object.assign({}, theme.typography.hmiText20Regular), {
|
|
6647
6645
|
color: isDisabled ? theme.palette.text.disabled : theme.palette.text.primary
|
|
6648
6646
|
}),
|
|
6649
6647
|
rightSection: {
|
|
@@ -6770,13 +6768,13 @@ const LogsTable = /*#__PURE__*/memo(({
|
|
|
6770
6768
|
};
|
|
6771
6769
|
}, [onLoadMoreLogs, hasMoreLogs]);
|
|
6772
6770
|
if (_isLoading) {
|
|
6773
|
-
return
|
|
6771
|
+
return jsx(Box, {
|
|
6774
6772
|
className: classes.tableSection,
|
|
6775
|
-
children:
|
|
6773
|
+
children: jsxs(Box, {
|
|
6776
6774
|
className: classes.centerState,
|
|
6777
|
-
children: [
|
|
6775
|
+
children: [jsx(VentionSpinner, {
|
|
6778
6776
|
size: "large"
|
|
6779
|
-
}),
|
|
6777
|
+
}), jsx(Typography, {
|
|
6780
6778
|
variant: "heading24Medium",
|
|
6781
6779
|
sx: {
|
|
6782
6780
|
marginTop: 2
|
|
@@ -6789,11 +6787,11 @@ const LogsTable = /*#__PURE__*/memo(({
|
|
|
6789
6787
|
});
|
|
6790
6788
|
}
|
|
6791
6789
|
if (_error) {
|
|
6792
|
-
return
|
|
6790
|
+
return jsx(Box, {
|
|
6793
6791
|
className: classes.tableSection,
|
|
6794
|
-
children:
|
|
6792
|
+
children: jsx(Box, {
|
|
6795
6793
|
className: classes.errorState,
|
|
6796
|
-
children:
|
|
6794
|
+
children: jsx(VentionAlert, {
|
|
6797
6795
|
severity: "error",
|
|
6798
6796
|
title: t("logs.error.loading", {
|
|
6799
6797
|
defaultValue: "Error loading logs"
|
|
@@ -6805,14 +6803,14 @@ const LogsTable = /*#__PURE__*/memo(({
|
|
|
6805
6803
|
});
|
|
6806
6804
|
}
|
|
6807
6805
|
if (!_logs || _logs.length === 0) {
|
|
6808
|
-
return
|
|
6806
|
+
return jsx(Box, {
|
|
6809
6807
|
className: classes.tableSection,
|
|
6810
|
-
children:
|
|
6808
|
+
children: jsxs(Box, {
|
|
6811
6809
|
className: classes.centerState,
|
|
6812
|
-
children: [emptyStateIcon &&
|
|
6810
|
+
children: [emptyStateIcon && jsx(Box, {
|
|
6813
6811
|
className: classes.emptyStateIcon,
|
|
6814
6812
|
children: emptyStateIcon
|
|
6815
|
-
}),
|
|
6813
|
+
}), jsx(Typography, {
|
|
6816
6814
|
variant: "heading24Medium",
|
|
6817
6815
|
children: emptyMessage
|
|
6818
6816
|
})]
|
|
@@ -6833,20 +6831,20 @@ const LogsTable = /*#__PURE__*/memo(({
|
|
|
6833
6831
|
};
|
|
6834
6832
|
const renderTypeIcon = level => {
|
|
6835
6833
|
if (level === "error") {
|
|
6836
|
-
return
|
|
6834
|
+
return jsx(VentionIcon, {
|
|
6837
6835
|
size: 20,
|
|
6838
6836
|
type: "alert-circle-filled",
|
|
6839
6837
|
color: theme.palette.error.main
|
|
6840
6838
|
});
|
|
6841
6839
|
}
|
|
6842
6840
|
if (level === "warning") {
|
|
6843
|
-
return
|
|
6841
|
+
return jsx(VentionIcon, {
|
|
6844
6842
|
size: 20,
|
|
6845
6843
|
type: "alert-triangle-filled",
|
|
6846
6844
|
color: theme.palette.warning.main
|
|
6847
6845
|
});
|
|
6848
6846
|
}
|
|
6849
|
-
return
|
|
6847
|
+
return jsx(VentionIcon, {
|
|
6850
6848
|
size: 20,
|
|
6851
6849
|
type: "info-circle-filled",
|
|
6852
6850
|
color: theme.palette.info.main
|
|
@@ -6859,7 +6857,7 @@ const LogsTable = /*#__PURE__*/memo(({
|
|
|
6859
6857
|
return dateStr;
|
|
6860
6858
|
}
|
|
6861
6859
|
return formatDate(timestamp, "YYYY-MM-DD h:mm:ssa");
|
|
6862
|
-
} catch (
|
|
6860
|
+
} catch (_a) {
|
|
6863
6861
|
try {
|
|
6864
6862
|
const date = new Date(dateStr);
|
|
6865
6863
|
if (isNaN(date.getTime())) return dateStr;
|
|
@@ -6872,63 +6870,63 @@ const LogsTable = /*#__PURE__*/memo(({
|
|
|
6872
6870
|
second: "2-digit",
|
|
6873
6871
|
hour12: true
|
|
6874
6872
|
});
|
|
6875
|
-
} catch (
|
|
6873
|
+
} catch (_b) {
|
|
6876
6874
|
return dateStr;
|
|
6877
6875
|
}
|
|
6878
6876
|
}
|
|
6879
6877
|
};
|
|
6880
|
-
return
|
|
6878
|
+
return jsxs(Box, {
|
|
6881
6879
|
className: classes.tableSection,
|
|
6882
|
-
children: [
|
|
6880
|
+
children: [jsx(TableContainer, {
|
|
6883
6881
|
component: Paper,
|
|
6884
6882
|
className: classes.tableContainer,
|
|
6885
|
-
children:
|
|
6883
|
+
children: jsxs(Table, {
|
|
6886
6884
|
stickyHeader: true,
|
|
6887
6885
|
className: classes.table,
|
|
6888
|
-
children: [
|
|
6886
|
+
children: [jsx(TableHead, {
|
|
6889
6887
|
className: classes.tableHead,
|
|
6890
|
-
children:
|
|
6891
|
-
children: [
|
|
6888
|
+
children: jsxs(TableRow, {
|
|
6889
|
+
children: [jsx(TableCell, {
|
|
6892
6890
|
className: classes.iconHeaderCell
|
|
6893
|
-
}),
|
|
6891
|
+
}), jsx(TableCell, {
|
|
6894
6892
|
className: cx(classes.tableHeaderCell, classes.dateColumn),
|
|
6895
|
-
children:
|
|
6893
|
+
children: jsx(Typography, {
|
|
6896
6894
|
variant: "heading24Medium",
|
|
6897
6895
|
className: classes.tableText,
|
|
6898
6896
|
children: t("logs.table.date", {
|
|
6899
6897
|
defaultValue: "Date"
|
|
6900
6898
|
})
|
|
6901
6899
|
})
|
|
6902
|
-
}),
|
|
6900
|
+
}), jsx(TableCell, {
|
|
6903
6901
|
className: cx(classes.tableHeaderCell, classes.typeColumn),
|
|
6904
|
-
children:
|
|
6902
|
+
children: jsx(Typography, {
|
|
6905
6903
|
variant: "heading24Medium",
|
|
6906
6904
|
className: classes.tableText,
|
|
6907
6905
|
children: t("logs.table.type", {
|
|
6908
6906
|
defaultValue: "Type"
|
|
6909
6907
|
})
|
|
6910
6908
|
})
|
|
6911
|
-
}),
|
|
6909
|
+
}), jsx(TableCell, {
|
|
6912
6910
|
className: cx(classes.tableHeaderCell, classes.codeColumn),
|
|
6913
|
-
children:
|
|
6911
|
+
children: jsx(Typography, {
|
|
6914
6912
|
variant: "heading24Medium",
|
|
6915
6913
|
className: classes.tableText,
|
|
6916
6914
|
children: t("logs.table.code", {
|
|
6917
6915
|
defaultValue: "Code"
|
|
6918
6916
|
})
|
|
6919
6917
|
})
|
|
6920
|
-
}),
|
|
6918
|
+
}), jsx(TableCell, {
|
|
6921
6919
|
className: cx(classes.tableHeaderCell, classes.messageColumn),
|
|
6922
|
-
children:
|
|
6920
|
+
children: jsx(Typography, {
|
|
6923
6921
|
variant: "heading24Medium",
|
|
6924
6922
|
className: classes.tableText,
|
|
6925
6923
|
children: t("logs.table.message", {
|
|
6926
6924
|
defaultValue: "Message"
|
|
6927
6925
|
})
|
|
6928
6926
|
})
|
|
6929
|
-
}),
|
|
6927
|
+
}), jsx(TableCell, {
|
|
6930
6928
|
className: cx(classes.tableHeaderCell, classes.descriptionColumn),
|
|
6931
|
-
children:
|
|
6929
|
+
children: jsx(Typography, {
|
|
6932
6930
|
variant: "heading24Medium",
|
|
6933
6931
|
className: classes.tableText,
|
|
6934
6932
|
children: t("logs.table.description", {
|
|
@@ -6937,52 +6935,52 @@ const LogsTable = /*#__PURE__*/memo(({
|
|
|
6937
6935
|
})
|
|
6938
6936
|
})]
|
|
6939
6937
|
})
|
|
6940
|
-
}),
|
|
6941
|
-
children: _logs.map(log =>
|
|
6938
|
+
}), jsx(TableBody, {
|
|
6939
|
+
children: _logs.map(log => jsxs(TableRow, {
|
|
6942
6940
|
hover: true,
|
|
6943
6941
|
onClick: onLogClick ? () => onLogClick(log) : undefined,
|
|
6944
6942
|
className: cx(classes.row, onLogClick ? classes.clickableRow : undefined),
|
|
6945
|
-
children: [
|
|
6943
|
+
children: [jsx(TableCell, {
|
|
6946
6944
|
className: classes.iconCell,
|
|
6947
|
-
children:
|
|
6945
|
+
children: jsx(Box, {
|
|
6948
6946
|
className: classes.iconWrapper,
|
|
6949
6947
|
children: renderTypeIcon(log.level)
|
|
6950
6948
|
})
|
|
6951
|
-
}),
|
|
6949
|
+
}), jsx(TableCell, {
|
|
6952
6950
|
className: classes.truncateCell,
|
|
6953
|
-
children:
|
|
6951
|
+
children: jsx(Typography, {
|
|
6954
6952
|
variant: "heading24Medium",
|
|
6955
6953
|
className: cx(classes.tableText, classes.truncateText),
|
|
6956
6954
|
children: formatLogDate(log.date)
|
|
6957
6955
|
})
|
|
6958
|
-
}),
|
|
6956
|
+
}), jsx(TableCell, {
|
|
6959
6957
|
className: cx(classes.typeCell, classes.truncateCell, getTypeClassName(log.level)),
|
|
6960
|
-
children:
|
|
6958
|
+
children: jsx(Typography, {
|
|
6961
6959
|
variant: "heading24Medium",
|
|
6962
6960
|
className: cx(classes.tableText, classes.truncateText),
|
|
6963
6961
|
children: t(`logs.type.${log.level}`, {
|
|
6964
6962
|
defaultValue: log.level
|
|
6965
6963
|
})
|
|
6966
6964
|
})
|
|
6967
|
-
}),
|
|
6965
|
+
}), jsx(TableCell, {
|
|
6968
6966
|
className: classes.truncateCell,
|
|
6969
|
-
children:
|
|
6967
|
+
children: jsx(Typography, {
|
|
6970
6968
|
variant: "heading24Medium",
|
|
6971
6969
|
className: cx(classes.tableText, classes.truncateText),
|
|
6972
6970
|
title: log.code,
|
|
6973
6971
|
children: log.code
|
|
6974
6972
|
})
|
|
6975
|
-
}),
|
|
6973
|
+
}), jsx(TableCell, {
|
|
6976
6974
|
className: classes.truncateCell,
|
|
6977
|
-
children:
|
|
6975
|
+
children: jsx(Typography, {
|
|
6978
6976
|
variant: "heading24Medium",
|
|
6979
6977
|
className: cx(classes.tableText, classes.truncateText),
|
|
6980
6978
|
title: log.message,
|
|
6981
6979
|
children: log.message
|
|
6982
6980
|
})
|
|
6983
|
-
}),
|
|
6981
|
+
}), jsx(TableCell, {
|
|
6984
6982
|
className: classes.truncateCell,
|
|
6985
|
-
children:
|
|
6983
|
+
children: jsx(Typography, {
|
|
6986
6984
|
variant: "heading24Medium",
|
|
6987
6985
|
className: cx(classes.tableText, classes.truncateText),
|
|
6988
6986
|
title: log.description,
|
|
@@ -6992,21 +6990,21 @@ const LogsTable = /*#__PURE__*/memo(({
|
|
|
6992
6990
|
}, log.id))
|
|
6993
6991
|
})]
|
|
6994
6992
|
})
|
|
6995
|
-
}), onLoadMoreLogs && hasMoreLogs &&
|
|
6993
|
+
}), onLoadMoreLogs && hasMoreLogs && jsxs(Box, {
|
|
6996
6994
|
ref: loadMoreRef,
|
|
6997
6995
|
className: classes.loadMoreTrigger,
|
|
6998
|
-
children: [
|
|
6996
|
+
children: [jsx(VentionSpinner, {
|
|
6999
6997
|
size: "medium"
|
|
7000
|
-
}),
|
|
6998
|
+
}), jsx(Typography, {
|
|
7001
6999
|
variant: "uiText14Regular",
|
|
7002
7000
|
className: classes.loadMoreText,
|
|
7003
7001
|
children: t("logs.loadingMore", {
|
|
7004
7002
|
defaultValue: "Loading more logs..."
|
|
7005
7003
|
})
|
|
7006
7004
|
})]
|
|
7007
|
-
}), onLoadMoreLogs && !hasMoreLogs && _logs.length > 0 &&
|
|
7005
|
+
}), onLoadMoreLogs && !hasMoreLogs && _logs.length > 0 && jsx(Box, {
|
|
7008
7006
|
className: classes.endMessage,
|
|
7009
|
-
children:
|
|
7007
|
+
children: jsx(Typography, {
|
|
7010
7008
|
variant: "uiText14Regular",
|
|
7011
7009
|
children: t("logs.noMoreLogs", {
|
|
7012
7010
|
defaultValue: "No more logs to load"
|
|
@@ -7156,7 +7154,7 @@ const LogFilterForm = /*#__PURE__*/memo(({
|
|
|
7156
7154
|
onReset,
|
|
7157
7155
|
initialFilters
|
|
7158
7156
|
}) => {
|
|
7159
|
-
var
|
|
7157
|
+
var _a, _b, _c, _d;
|
|
7160
7158
|
const {
|
|
7161
7159
|
classes
|
|
7162
7160
|
} = useStyles$8();
|
|
@@ -7167,10 +7165,10 @@ const LogFilterForm = /*#__PURE__*/memo(({
|
|
|
7167
7165
|
useEffect(function updateFilterChangeRef() {
|
|
7168
7166
|
handleFilterChangeRef.current = onFilterChange;
|
|
7169
7167
|
}, [onFilterChange]);
|
|
7170
|
-
const [fromDate, setFromDate] = useState((
|
|
7171
|
-
const [toDate, setToDate] = useState((
|
|
7172
|
-
const [logType, setLogType] = useState((
|
|
7173
|
-
const [sortOrder, setSortOrder] = useState((
|
|
7168
|
+
const [fromDate, setFromDate] = useState((_a = initialFilters === null || initialFilters === void 0 ? void 0 : initialFilters.fromDate) !== null && _a !== void 0 ? _a : "");
|
|
7169
|
+
const [toDate, setToDate] = useState((_b = initialFilters === null || initialFilters === void 0 ? void 0 : initialFilters.toDate) !== null && _b !== void 0 ? _b : "");
|
|
7170
|
+
const [logType, setLogType] = useState((_c = initialFilters === null || initialFilters === void 0 ? void 0 : initialFilters.logType) !== null && _c !== void 0 ? _c : null);
|
|
7171
|
+
const [sortOrder, setSortOrder] = useState((_d = initialFilters === null || initialFilters === void 0 ? void 0 : initialFilters.sortOrder) !== null && _d !== void 0 ? _d : "latest");
|
|
7174
7172
|
const prevInitialFiltersRef = useRef(initialFilters);
|
|
7175
7173
|
useEffect(function syncInitialFilters() {
|
|
7176
7174
|
if (prevInitialFiltersRef.current !== initialFilters) {
|
|
@@ -7220,21 +7218,22 @@ const LogFilterForm = /*#__PURE__*/memo(({
|
|
|
7220
7218
|
setToDate("");
|
|
7221
7219
|
setLogType(null);
|
|
7222
7220
|
setSortOrder("latest");
|
|
7223
|
-
onReset
|
|
7221
|
+
onReset === null || onReset === void 0 ? void 0 : onReset();
|
|
7224
7222
|
};
|
|
7225
7223
|
useEffect(function notifyFilterChange() {
|
|
7226
|
-
|
|
7224
|
+
var _a;
|
|
7225
|
+
(_a = handleFilterChangeRef.current) === null || _a === void 0 ? void 0 : _a.call(handleFilterChangeRef, {
|
|
7227
7226
|
fromDate,
|
|
7228
7227
|
toDate,
|
|
7229
7228
|
logType,
|
|
7230
7229
|
sortOrder
|
|
7231
7230
|
});
|
|
7232
7231
|
}, [fromDate, toDate, logType, sortOrder]);
|
|
7233
|
-
return
|
|
7232
|
+
return jsxs(Box, {
|
|
7234
7233
|
className: classes.filterSection,
|
|
7235
|
-
children: [
|
|
7234
|
+
children: [jsx(Box, {
|
|
7236
7235
|
className: classes.filterInput,
|
|
7237
|
-
children:
|
|
7236
|
+
children: jsx(VentionTextInput, {
|
|
7238
7237
|
size: "xx-large",
|
|
7239
7238
|
label: t("logs.filter.from", {
|
|
7240
7239
|
defaultValue: "From"
|
|
@@ -7243,9 +7242,9 @@ const LogFilterForm = /*#__PURE__*/memo(({
|
|
|
7243
7242
|
onChange: event => setFromDate(event.target.value),
|
|
7244
7243
|
type: "date"
|
|
7245
7244
|
})
|
|
7246
|
-
}),
|
|
7245
|
+
}), jsx(Box, {
|
|
7247
7246
|
className: classes.filterInput,
|
|
7248
|
-
children:
|
|
7247
|
+
children: jsx(VentionTextInput, {
|
|
7249
7248
|
size: "xx-large",
|
|
7250
7249
|
label: t("logs.filter.to", {
|
|
7251
7250
|
defaultValue: "To"
|
|
@@ -7254,15 +7253,15 @@ const LogFilterForm = /*#__PURE__*/memo(({
|
|
|
7254
7253
|
onChange: event => setToDate(event.target.value),
|
|
7255
7254
|
type: "date"
|
|
7256
7255
|
})
|
|
7257
|
-
}),
|
|
7256
|
+
}), jsx(Box, {
|
|
7258
7257
|
className: classes.filterInput,
|
|
7259
|
-
children:
|
|
7258
|
+
children: jsx(VentionSelect, {
|
|
7260
7259
|
size: "xx-large",
|
|
7261
7260
|
variant: "outlined",
|
|
7262
7261
|
labelText: t("logs.filter.type", {
|
|
7263
7262
|
defaultValue: "Type"
|
|
7264
7263
|
}),
|
|
7265
|
-
value: logType
|
|
7264
|
+
value: logType !== null && logType !== void 0 ? logType : "",
|
|
7266
7265
|
onChange: event => {
|
|
7267
7266
|
const value = event.target.value;
|
|
7268
7267
|
setLogType(value === "" ? null : value);
|
|
@@ -7272,9 +7271,9 @@ const LogFilterForm = /*#__PURE__*/memo(({
|
|
|
7272
7271
|
}),
|
|
7273
7272
|
menuItems: typeOptions
|
|
7274
7273
|
})
|
|
7275
|
-
}),
|
|
7274
|
+
}), jsx(Box, {
|
|
7276
7275
|
className: classes.filterInput,
|
|
7277
|
-
children:
|
|
7276
|
+
children: jsx(VentionSelect, {
|
|
7278
7277
|
size: "xx-large",
|
|
7279
7278
|
variant: "outlined",
|
|
7280
7279
|
labelText: t("logs.filter.sort", {
|
|
@@ -7284,7 +7283,7 @@ const LogFilterForm = /*#__PURE__*/memo(({
|
|
|
7284
7283
|
onChange: event => setSortOrder(event.target.value),
|
|
7285
7284
|
menuItems: sortOptions
|
|
7286
7285
|
})
|
|
7287
|
-
}),
|
|
7286
|
+
}), jsx(VentionButton, {
|
|
7288
7287
|
size: "x-large",
|
|
7289
7288
|
onClick: handleReset,
|
|
7290
7289
|
className: classes.resetButton,
|
|
@@ -7532,6 +7531,38 @@ exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
|
|
|
7532
7531
|
return function RuntimeError(message) { return apply(init, this, arguments); };
|
|
7533
7532
|
});
|
|
7534
7533
|
|
|
7534
|
+
/******************************************************************************
|
|
7535
|
+
Copyright (c) Microsoft Corporation.
|
|
7536
|
+
|
|
7537
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
7538
|
+
purpose with or without fee is hereby granted.
|
|
7539
|
+
|
|
7540
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
7541
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
7542
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
7543
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
7544
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
7545
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
7546
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
7547
|
+
***************************************************************************** */
|
|
7548
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
7549
|
+
|
|
7550
|
+
|
|
7551
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
7552
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7553
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7554
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
7555
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7556
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7557
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
7558
|
+
});
|
|
7559
|
+
}
|
|
7560
|
+
|
|
7561
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
7562
|
+
var e = new Error(message);
|
|
7563
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
7564
|
+
};
|
|
7565
|
+
|
|
7535
7566
|
const LogsPagination = /*#__PURE__*/memo(({
|
|
7536
7567
|
currentPage,
|
|
7537
7568
|
totalPages,
|
|
@@ -7553,22 +7584,22 @@ const LogsPagination = /*#__PURE__*/memo(({
|
|
|
7553
7584
|
onPageChange(currentPage + 1);
|
|
7554
7585
|
}
|
|
7555
7586
|
};
|
|
7556
|
-
return
|
|
7587
|
+
return jsxs(Box, {
|
|
7557
7588
|
className: classes.paginationSection,
|
|
7558
|
-
children: [
|
|
7589
|
+
children: [jsx(VentionButton, {
|
|
7559
7590
|
size: "x-large",
|
|
7560
7591
|
className: classes.paginationButton,
|
|
7561
7592
|
onClick: handlePrevious,
|
|
7562
7593
|
disabled: currentPage === 1,
|
|
7563
7594
|
children: "\u2190"
|
|
7564
|
-
}),
|
|
7595
|
+
}), jsxs(Typography, {
|
|
7565
7596
|
variant: "heading18SemiBold",
|
|
7566
7597
|
children: [t("pagination.page", {
|
|
7567
7598
|
defaultValue: "Page"
|
|
7568
7599
|
}), " ", currentPage, " ", t("pagination.of", {
|
|
7569
7600
|
defaultValue: "of"
|
|
7570
7601
|
}), " ", totalPages]
|
|
7571
|
-
}),
|
|
7602
|
+
}), jsx(VentionButton, {
|
|
7572
7603
|
size: "x-large",
|
|
7573
7604
|
className: classes.paginationButton,
|
|
7574
7605
|
onClick: handleNext,
|
|
@@ -7612,7 +7643,7 @@ const parseLogDate = dateStr => {
|
|
|
7612
7643
|
return parsed.isValid() ? parsed.valueOf() : 0;
|
|
7613
7644
|
};
|
|
7614
7645
|
const LogsPanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
7615
|
-
var
|
|
7646
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
7616
7647
|
const {
|
|
7617
7648
|
dataFetcher,
|
|
7618
7649
|
initialFilters,
|
|
@@ -7634,46 +7665,48 @@ const LogsPanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7634
7665
|
const [isLoading, setIsLoading] = useState(true);
|
|
7635
7666
|
const [error, setError] = useState(null);
|
|
7636
7667
|
const [filters, setFilters] = useState({
|
|
7637
|
-
fromDate: (
|
|
7638
|
-
toDate: (
|
|
7639
|
-
logType: (
|
|
7640
|
-
sortOrder: (
|
|
7668
|
+
fromDate: (_a = initialFilters === null || initialFilters === void 0 ? void 0 : initialFilters.fromDate) !== null && _a !== void 0 ? _a : null,
|
|
7669
|
+
toDate: (_b = initialFilters === null || initialFilters === void 0 ? void 0 : initialFilters.toDate) !== null && _b !== void 0 ? _b : null,
|
|
7670
|
+
logType: (_c = initialFilters === null || initialFilters === void 0 ? void 0 : initialFilters.logType) !== null && _c !== void 0 ? _c : null,
|
|
7671
|
+
sortOrder: (_d = initialFilters === null || initialFilters === void 0 ? void 0 : initialFilters.sortOrder) !== null && _d !== void 0 ? _d : "latest"
|
|
7641
7672
|
});
|
|
7642
|
-
const paginationMode = (
|
|
7643
|
-
const pageSize = (
|
|
7644
|
-
const [currentPage, setCurrentPage] = useState((
|
|
7673
|
+
const paginationMode = (_e = pagination === null || pagination === void 0 ? void 0 : pagination.mode) !== null && _e !== void 0 ? _e : "none";
|
|
7674
|
+
const pageSize = (_f = pagination === null || pagination === void 0 ? void 0 : pagination.pageSize) !== null && _f !== void 0 ? _f : 10;
|
|
7675
|
+
const [currentPage, setCurrentPage] = useState((_g = pagination === null || pagination === void 0 ? void 0 : pagination.initialPage) !== null && _g !== void 0 ? _g : 1);
|
|
7645
7676
|
const [totalPages, setTotalPages] = useState(1);
|
|
7646
7677
|
const [hasMorePages, setHasMorePages] = useState(false);
|
|
7647
|
-
const fetchData = useCallback(
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7654
|
-
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
if (
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
|
|
7678
|
+
const fetchData = useCallback(function fetchData(page, signal) {
|
|
7679
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
7680
|
+
setIsLoading(true);
|
|
7681
|
+
setError(null);
|
|
7682
|
+
try {
|
|
7683
|
+
const result = yield dataFetcher({
|
|
7684
|
+
filters,
|
|
7685
|
+
page,
|
|
7686
|
+
pageSize
|
|
7687
|
+
});
|
|
7688
|
+
if (!(signal === null || signal === void 0 ? void 0 : signal.aborted)) {
|
|
7689
|
+
if (paginationMode === "infinite-scroll" && page > 1) {
|
|
7690
|
+
setLogs(prev => [...prev, ...result.logs]);
|
|
7691
|
+
} else {
|
|
7692
|
+
setLogs(result.logs);
|
|
7693
|
+
}
|
|
7694
|
+
setTotalPages(result.totalPages);
|
|
7695
|
+
setHasMorePages(result.hasMorePages);
|
|
7696
|
+
setCurrentPage(result.currentPage);
|
|
7697
|
+
setIsLoading(false);
|
|
7661
7698
|
}
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
|
|
7669
|
-
|
|
7670
|
-
setError(errorMessage);
|
|
7671
|
-
setIsLoading(false);
|
|
7672
|
-
if (onError) {
|
|
7673
|
-
onError(error);
|
|
7699
|
+
} catch (error) {
|
|
7700
|
+
if (!(signal === null || signal === void 0 ? void 0 : signal.aborted)) {
|
|
7701
|
+
const errorMessage = error instanceof Error ? error.message : "Failed to load logs";
|
|
7702
|
+
setError(errorMessage);
|
|
7703
|
+
setIsLoading(false);
|
|
7704
|
+
if (onError) {
|
|
7705
|
+
onError(error);
|
|
7706
|
+
}
|
|
7674
7707
|
}
|
|
7675
7708
|
}
|
|
7676
|
-
}
|
|
7709
|
+
});
|
|
7677
7710
|
}, [dataFetcher, filters, pageSize, paginationMode, onError]);
|
|
7678
7711
|
useEffect(function fetchDataOnChange() {
|
|
7679
7712
|
const controller = new AbortController();
|
|
@@ -7716,14 +7749,14 @@ const LogsPanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7716
7749
|
onFilterChange(resetFilters);
|
|
7717
7750
|
}
|
|
7718
7751
|
}, [onFilterChange, paginationMode]);
|
|
7719
|
-
const refresh = useCallback(
|
|
7720
|
-
|
|
7721
|
-
}, [fetchData, currentPage]);
|
|
7752
|
+
const refresh = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
7753
|
+
yield fetchData(currentPage);
|
|
7754
|
+
}), [fetchData, currentPage]);
|
|
7722
7755
|
const resetFilters = useCallback(() => {
|
|
7723
7756
|
handleReset();
|
|
7724
7757
|
}, [handleReset]);
|
|
7725
7758
|
const applyFilters = useCallback(newFilters => {
|
|
7726
|
-
const updatedFilters = Object.assign({}, filters, newFilters);
|
|
7759
|
+
const updatedFilters = Object.assign(Object.assign({}, filters), newFilters);
|
|
7727
7760
|
setFilters(updatedFilters);
|
|
7728
7761
|
if (onFilterChange) {
|
|
7729
7762
|
onFilterChange(updatedFilters);
|
|
@@ -7738,14 +7771,14 @@ const LogsPanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7738
7771
|
getCurrentFilters,
|
|
7739
7772
|
exportLogs
|
|
7740
7773
|
}), [refresh, resetFilters, applyFilters, getCurrentFilters, exportLogs]);
|
|
7741
|
-
return
|
|
7774
|
+
return jsxs(Box, {
|
|
7742
7775
|
className: cx(classes.root, className),
|
|
7743
7776
|
sx: sx,
|
|
7744
|
-
children: [
|
|
7777
|
+
children: [jsx(LogFilterForm, {
|
|
7745
7778
|
onFilterChange: handleFilterChange,
|
|
7746
7779
|
onReset: handleReset,
|
|
7747
7780
|
initialFilters: filters
|
|
7748
|
-
}),
|
|
7781
|
+
}), jsx(LogsTable, {
|
|
7749
7782
|
logs: logs,
|
|
7750
7783
|
isLoading: isLoading,
|
|
7751
7784
|
error: error,
|
|
@@ -7755,7 +7788,7 @@ const LogsPanel = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
7755
7788
|
tableHeight: tableHeight,
|
|
7756
7789
|
emptyStateMessage: emptyStateMessage,
|
|
7757
7790
|
emptyStateIcon: emptyStateIcon
|
|
7758
|
-
}), paginationMode === "pagination" && !isLoading && !error && logs.length > 0 &&
|
|
7791
|
+
}), paginationMode === "pagination" && !isLoading && !error && logs.length > 0 && jsx(LogsPagination, {
|
|
7759
7792
|
currentPage: currentPage,
|
|
7760
7793
|
totalPages: totalPages,
|
|
7761
7794
|
onPageChange: handlePageChange
|
|
@@ -7784,14 +7817,14 @@ const SettingsPage = function SettingsPage({
|
|
|
7784
7817
|
} = useStyles$5({
|
|
7785
7818
|
sidebarWidth
|
|
7786
7819
|
});
|
|
7787
|
-
return
|
|
7820
|
+
return jsxs(Box, {
|
|
7788
7821
|
className: classes.root,
|
|
7789
|
-
children: [
|
|
7822
|
+
children: [jsx(Box, {
|
|
7790
7823
|
className: classes.sidebar,
|
|
7791
|
-
children:
|
|
7824
|
+
children: jsx(Sidebar, {
|
|
7792
7825
|
items: sidebarItems
|
|
7793
7826
|
})
|
|
7794
|
-
}),
|
|
7827
|
+
}), jsx(Box, {
|
|
7795
7828
|
className: classes.content,
|
|
7796
7829
|
children: children
|
|
7797
7830
|
})]
|
|
@@ -7850,9 +7883,9 @@ function FileUploadPanel({
|
|
|
7850
7883
|
const {
|
|
7851
7884
|
t
|
|
7852
7885
|
} = useTranslation();
|
|
7853
|
-
const displayTitle = title
|
|
7854
|
-
const displayDropzoneTitle = dropzoneTitle
|
|
7855
|
-
const displayFileCriteria = fileCriteriaDescription
|
|
7886
|
+
const displayTitle = title !== null && title !== void 0 ? title : t("fileUploadPanel.defaultTitle");
|
|
7887
|
+
const displayDropzoneTitle = dropzoneTitle !== null && dropzoneTitle !== void 0 ? dropzoneTitle : t("fileUploadPanel.dropzoneTitle");
|
|
7888
|
+
const displayFileCriteria = fileCriteriaDescription !== null && fileCriteriaDescription !== void 0 ? fileCriteriaDescription : t("fileUploadPanel.defaultFileCriteria");
|
|
7856
7889
|
function handleFileRemove(fileId) {
|
|
7857
7890
|
onFileRemove(fileId);
|
|
7858
7891
|
}
|
|
@@ -7866,23 +7899,23 @@ function FileUploadPanel({
|
|
|
7866
7899
|
onFileCancel(fileId);
|
|
7867
7900
|
}
|
|
7868
7901
|
}
|
|
7869
|
-
return
|
|
7902
|
+
return jsxs(Box, {
|
|
7870
7903
|
className: cx(classes.container, className),
|
|
7871
7904
|
sx: sx,
|
|
7872
|
-
children: [displayTitle &&
|
|
7905
|
+
children: [displayTitle && jsx(Typography, {
|
|
7873
7906
|
variant: titleVariant,
|
|
7874
7907
|
className: classes.title,
|
|
7875
7908
|
children: displayTitle
|
|
7876
|
-
}),
|
|
7909
|
+
}), jsx(VentionDropZone, {
|
|
7877
7910
|
style: "outline",
|
|
7878
7911
|
size: "large",
|
|
7879
7912
|
onFilesSelect: onFilesSelect,
|
|
7880
7913
|
fileCriteriaDescription: displayFileCriteria,
|
|
7881
7914
|
defaultTitle: displayDropzoneTitle,
|
|
7882
7915
|
disabled: disabled
|
|
7883
|
-
}), files.length > 0 &&
|
|
7916
|
+
}), files.length > 0 && jsx(Box, {
|
|
7884
7917
|
className: classes.fileList,
|
|
7885
|
-
children: files.map(file =>
|
|
7918
|
+
children: files.map(file => jsx(VentionUploadFile, {
|
|
7886
7919
|
fileName: file.name,
|
|
7887
7920
|
fileSize: formatFileSize(file.size),
|
|
7888
7921
|
state: file.state,
|
|
@@ -7914,7 +7947,7 @@ const useStyles$4 = tss.withParams().create(({
|
|
|
7914
7947
|
display: "flex",
|
|
7915
7948
|
flexDirection: "column",
|
|
7916
7949
|
gap: theme.spacing(1),
|
|
7917
|
-
maxHeight: maxHeight
|
|
7950
|
+
maxHeight: maxHeight !== null && maxHeight !== void 0 ? maxHeight : "auto",
|
|
7918
7951
|
overflowY: maxHeight ? "auto" : "visible",
|
|
7919
7952
|
"& .MuiGrid-container": {
|
|
7920
7953
|
width: "100%"
|
|
@@ -7941,7 +7974,7 @@ function StepProgressCircle({
|
|
|
7941
7974
|
className,
|
|
7942
7975
|
sx
|
|
7943
7976
|
}) {
|
|
7944
|
-
var
|
|
7977
|
+
var _a;
|
|
7945
7978
|
const {
|
|
7946
7979
|
t
|
|
7947
7980
|
} = useTranslation();
|
|
@@ -7953,9 +7986,9 @@ function StepProgressCircle({
|
|
|
7953
7986
|
strokeWidth,
|
|
7954
7987
|
variant
|
|
7955
7988
|
});
|
|
7956
|
-
const titleKey = (
|
|
7989
|
+
const titleKey = (_a = title === null || title === void 0 ? void 0 : title.toLowerCase().replace(/\s/g, "")) !== null && _a !== void 0 ? _a : "progress";
|
|
7957
7990
|
const displayTitle = t(`stepProgressCircle.title.${titleKey}`, {
|
|
7958
|
-
defaultValue: title
|
|
7991
|
+
defaultValue: title !== null && title !== void 0 ? title : "Progress"
|
|
7959
7992
|
});
|
|
7960
7993
|
const percentage = totalSteps > 0 ? Math.round(currentStep / totalSteps * 100) : 0;
|
|
7961
7994
|
const radius = (size - strokeWidth) / 2 - CIRCLE_PADDING;
|
|
@@ -7963,27 +7996,27 @@ function StepProgressCircle({
|
|
|
7963
7996
|
const strokeDashoffset = circumference - percentage / 100 * circumference;
|
|
7964
7997
|
const center = size / 2;
|
|
7965
7998
|
const progressText = totalSteps > 0 ? `${currentStep}/${totalSteps}` : "-/-";
|
|
7966
|
-
return
|
|
7999
|
+
return jsxs(Box, {
|
|
7967
8000
|
className: cx(classes.container, className),
|
|
7968
8001
|
sx: sx,
|
|
7969
|
-
children: [showTitle &&
|
|
8002
|
+
children: [showTitle && jsx(Typography, {
|
|
7970
8003
|
variant: titleVariant,
|
|
7971
8004
|
className: classes.title,
|
|
7972
8005
|
children: displayTitle
|
|
7973
|
-
}),
|
|
8006
|
+
}), jsxs(Box, {
|
|
7974
8007
|
className: classes.circleContainer,
|
|
7975
|
-
children: [
|
|
8008
|
+
children: [jsxs("svg", {
|
|
7976
8009
|
className: classes.svg,
|
|
7977
8010
|
width: size,
|
|
7978
8011
|
height: size,
|
|
7979
8012
|
viewBox: `0 0 ${size} ${size}`,
|
|
7980
|
-
children: [
|
|
8013
|
+
children: [jsx("circle", {
|
|
7981
8014
|
cx: center,
|
|
7982
8015
|
cy: center,
|
|
7983
8016
|
r: radius,
|
|
7984
8017
|
className: classes.backgroundCircle,
|
|
7985
8018
|
fill: "none"
|
|
7986
|
-
}),
|
|
8019
|
+
}), jsx("circle", {
|
|
7987
8020
|
cx: center,
|
|
7988
8021
|
cy: center,
|
|
7989
8022
|
r: radius,
|
|
@@ -7994,9 +8027,9 @@ function StepProgressCircle({
|
|
|
7994
8027
|
strokeDasharray: circumference,
|
|
7995
8028
|
strokeDashoffset: strokeDashoffset
|
|
7996
8029
|
})]
|
|
7997
|
-
}),
|
|
8030
|
+
}), jsx(Box, {
|
|
7998
8031
|
className: classes.textContainer,
|
|
7999
|
-
children:
|
|
8032
|
+
children: jsx(Typography, {
|
|
8000
8033
|
variant: progressVariant,
|
|
8001
8034
|
className: classes.progressText,
|
|
8002
8035
|
children: progressText
|
|
@@ -8086,7 +8119,7 @@ const ActionButton = function ActionButton({
|
|
|
8086
8119
|
const translatedLabel = t(`actionButton.${translationKey}`, {
|
|
8087
8120
|
defaultValue: label
|
|
8088
8121
|
});
|
|
8089
|
-
return
|
|
8122
|
+
return jsx(VentionIconButton, {
|
|
8090
8123
|
onClick: onClick,
|
|
8091
8124
|
disabled: disabled,
|
|
8092
8125
|
size: "x-large",
|
|
@@ -8094,12 +8127,12 @@ const ActionButton = function ActionButton({
|
|
|
8094
8127
|
className: cx(classes.button, className),
|
|
8095
8128
|
sx: sx,
|
|
8096
8129
|
"data-testid": "action-button",
|
|
8097
|
-
children:
|
|
8130
|
+
children: jsxs(Box, {
|
|
8098
8131
|
className: classes.content,
|
|
8099
|
-
children: [
|
|
8132
|
+
children: [jsx(Box, {
|
|
8100
8133
|
className: classes.iconContainer,
|
|
8101
8134
|
children: icon
|
|
8102
|
-
}),
|
|
8135
|
+
}), jsx(Typography, {
|
|
8103
8136
|
variant: labelVariant,
|
|
8104
8137
|
className: classes.label,
|
|
8105
8138
|
children: translatedLabel
|
|
@@ -8197,7 +8230,7 @@ const PressButton = function PressButton({
|
|
|
8197
8230
|
isTouchActive.current = false;
|
|
8198
8231
|
}, 400);
|
|
8199
8232
|
}
|
|
8200
|
-
return
|
|
8233
|
+
return jsx(VentionIconButton, {
|
|
8201
8234
|
disabled: disabled,
|
|
8202
8235
|
size: "x-large",
|
|
8203
8236
|
variant: "filled",
|
|
@@ -8210,12 +8243,12 @@ const PressButton = function PressButton({
|
|
|
8210
8243
|
onTouchStart: handleTouchStart,
|
|
8211
8244
|
onTouchEnd: handleTouchEnd,
|
|
8212
8245
|
onTouchCancel: handleTouchEnd,
|
|
8213
|
-
children:
|
|
8246
|
+
children: jsxs(Box, {
|
|
8214
8247
|
className: classes.content,
|
|
8215
|
-
children: [
|
|
8248
|
+
children: [jsx(Box, {
|
|
8216
8249
|
className: classes.iconContainer,
|
|
8217
8250
|
children: icon
|
|
8218
|
-
}),
|
|
8251
|
+
}), jsx(Typography, {
|
|
8219
8252
|
variant: labelVariant,
|
|
8220
8253
|
className: classes.label,
|
|
8221
8254
|
children: translatedLabel
|
|
@@ -8419,39 +8452,41 @@ function ProductFormListComponent({
|
|
|
8419
8452
|
setDeleteId(id);
|
|
8420
8453
|
setDeleteDialogOpen(true);
|
|
8421
8454
|
}
|
|
8422
|
-
|
|
8423
|
-
|
|
8424
|
-
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
|
|
8455
|
+
function handleDeleteConfirm() {
|
|
8456
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
8457
|
+
if (deleteId) {
|
|
8458
|
+
yield onDelete(deleteId);
|
|
8459
|
+
setDeleteDialogOpen(false);
|
|
8460
|
+
setDeleteId(null);
|
|
8461
|
+
}
|
|
8462
|
+
});
|
|
8428
8463
|
}
|
|
8429
8464
|
function handleDeleteCancel() {
|
|
8430
8465
|
setDeleteDialogOpen(false);
|
|
8431
8466
|
setDeleteId(null);
|
|
8432
8467
|
}
|
|
8433
8468
|
function handleFieldChange(name, value) {
|
|
8434
|
-
setFormData(prev => Object.assign({}, prev, {
|
|
8469
|
+
setFormData(prev => Object.assign(Object.assign({}, prev), {
|
|
8435
8470
|
[name]: value
|
|
8436
8471
|
}));
|
|
8437
8472
|
}
|
|
8438
8473
|
function getFieldDisplayValue(field, value) {
|
|
8474
|
+
var _a, _b;
|
|
8439
8475
|
if (field.type === "select") {
|
|
8440
|
-
|
|
8441
|
-
return ((_field$options = field.options) == null || (_field$options = _field$options.find(opt => opt.value === value)) == null ? void 0 : _field$options.label) || String(value);
|
|
8476
|
+
return ((_b = (_a = field.options) === null || _a === void 0 ? void 0 : _a.find(opt => opt.value === value)) === null || _b === void 0 ? void 0 : _b.label) || String(value);
|
|
8442
8477
|
}
|
|
8443
|
-
return (value
|
|
8478
|
+
return (value === null || value === void 0 ? void 0 : value.toString()) || "";
|
|
8444
8479
|
}
|
|
8445
8480
|
function renderItemContent(item) {
|
|
8446
8481
|
const mainField = fields[0];
|
|
8447
8482
|
const secondaryFields = fields.slice(1);
|
|
8448
|
-
return
|
|
8483
|
+
return jsxs(Box, {
|
|
8449
8484
|
className: classes.itemContent,
|
|
8450
|
-
children: [
|
|
8485
|
+
children: [jsx(Typography, {
|
|
8451
8486
|
variant: itemTitleVariant,
|
|
8452
8487
|
className: classes.itemTitle,
|
|
8453
8488
|
children: getFieldDisplayValue(mainField, item[mainField.name])
|
|
8454
|
-
}),
|
|
8489
|
+
}), jsx(Typography, {
|
|
8455
8490
|
variant: itemSubtitleVariant,
|
|
8456
8491
|
color: "textSecondary",
|
|
8457
8492
|
className: classes.itemSubtitle,
|
|
@@ -8460,14 +8495,14 @@ function ProductFormListComponent({
|
|
|
8460
8495
|
});
|
|
8461
8496
|
}
|
|
8462
8497
|
function renderField(field) {
|
|
8498
|
+
var _a;
|
|
8463
8499
|
const fieldValue = formData[field.name];
|
|
8464
8500
|
if (field.type === "select") {
|
|
8465
|
-
|
|
8466
|
-
const menuItems = ((_field$options2 = field.options) == null ? void 0 : _field$options2.map(opt => ({
|
|
8501
|
+
const menuItems = ((_a = field.options) === null || _a === void 0 ? void 0 : _a.map(opt => ({
|
|
8467
8502
|
value: opt.value,
|
|
8468
8503
|
displayText: opt.label
|
|
8469
8504
|
}))) || [];
|
|
8470
|
-
return
|
|
8505
|
+
return jsx(VentionSelect, {
|
|
8471
8506
|
labelText: field.label,
|
|
8472
8507
|
value: fieldValue || "",
|
|
8473
8508
|
onChange: event => {
|
|
@@ -8478,9 +8513,9 @@ function ProductFormListComponent({
|
|
|
8478
8513
|
variant: "outlined"
|
|
8479
8514
|
}, field.name);
|
|
8480
8515
|
}
|
|
8481
|
-
return
|
|
8516
|
+
return jsx(VentionTextInput, {
|
|
8482
8517
|
label: field.label,
|
|
8483
|
-
value: fieldValue
|
|
8518
|
+
value: fieldValue !== null && fieldValue !== void 0 ? fieldValue : "",
|
|
8484
8519
|
onChange: event => {
|
|
8485
8520
|
handleFieldChange(field.name, field.type === "number" ? Number(event.target.value) : event.target.value);
|
|
8486
8521
|
},
|
|
@@ -8494,55 +8529,55 @@ function ProductFormListComponent({
|
|
|
8494
8529
|
}, field.name);
|
|
8495
8530
|
}
|
|
8496
8531
|
const isEditing = Object.keys(formData).length > 0 && "id" in formData;
|
|
8497
|
-
return
|
|
8532
|
+
return jsxs(Box, {
|
|
8498
8533
|
className: cx(classes.container, className),
|
|
8499
8534
|
sx: sx,
|
|
8500
|
-
children: [
|
|
8535
|
+
children: [jsxs(Box, {
|
|
8501
8536
|
className: classes.header,
|
|
8502
|
-
children: [
|
|
8537
|
+
children: [jsx(Typography, {
|
|
8503
8538
|
variant: titleVariant,
|
|
8504
8539
|
children: title
|
|
8505
|
-
}),
|
|
8540
|
+
}), jsx(VentionButton, {
|
|
8506
8541
|
onClick: () => {
|
|
8507
8542
|
setFormData({});
|
|
8508
8543
|
setEditDialogOpen(true);
|
|
8509
8544
|
},
|
|
8510
8545
|
size: "large",
|
|
8511
8546
|
variant: "filled",
|
|
8512
|
-
startIcon:
|
|
8547
|
+
startIcon: jsx(VentionIcon, {
|
|
8513
8548
|
type: "plus",
|
|
8514
8549
|
size: 24,
|
|
8515
8550
|
color: "white"
|
|
8516
8551
|
}),
|
|
8517
8552
|
children: t("productFormList.add")
|
|
8518
8553
|
})]
|
|
8519
|
-
}),
|
|
8554
|
+
}), jsx(Box, {
|
|
8520
8555
|
className: classes.listContainer,
|
|
8521
|
-
children: items.length === 0 ?
|
|
8556
|
+
children: items.length === 0 ? jsx(Box, {
|
|
8522
8557
|
className: classes.emptyState,
|
|
8523
|
-
children:
|
|
8558
|
+
children: jsx(Typography, {
|
|
8524
8559
|
variant: "uiText14Regular",
|
|
8525
8560
|
color: "textSecondary",
|
|
8526
8561
|
children: t("productFormList.emptyState", {
|
|
8527
8562
|
defaultValue: "No items yet. Click Add to create one."
|
|
8528
8563
|
})
|
|
8529
8564
|
})
|
|
8530
|
-
}) :
|
|
8531
|
-
children: items.map(item =>
|
|
8565
|
+
}) : jsx(List, {
|
|
8566
|
+
children: items.map(item => jsxs(ListItem, {
|
|
8532
8567
|
className: classes.listItem,
|
|
8533
|
-
children: [renderItemContent(item),
|
|
8568
|
+
children: [renderItemContent(item), jsxs(Box, {
|
|
8534
8569
|
className: classes.actions,
|
|
8535
|
-
children: [
|
|
8570
|
+
children: [jsx(IconButton, {
|
|
8536
8571
|
onClick: () => handleEditClick(item),
|
|
8537
8572
|
size: "medium",
|
|
8538
|
-
children:
|
|
8573
|
+
children: jsx(VentionIcon, {
|
|
8539
8574
|
type: "edit",
|
|
8540
8575
|
size: 24
|
|
8541
8576
|
})
|
|
8542
|
-
}),
|
|
8577
|
+
}), jsx(IconButton, {
|
|
8543
8578
|
onClick: () => handleDeleteClick(getItemId(item)),
|
|
8544
8579
|
size: "medium",
|
|
8545
|
-
children:
|
|
8580
|
+
children: jsx(VentionIcon, {
|
|
8546
8581
|
type: "trash",
|
|
8547
8582
|
size: 24
|
|
8548
8583
|
})
|
|
@@ -8550,66 +8585,66 @@ function ProductFormListComponent({
|
|
|
8550
8585
|
})]
|
|
8551
8586
|
}, getItemId(item)))
|
|
8552
8587
|
})
|
|
8553
|
-
}),
|
|
8588
|
+
}), jsxs(Dialog, {
|
|
8554
8589
|
open: editDialogOpen,
|
|
8555
8590
|
onClose: handleEditClose,
|
|
8556
8591
|
maxWidth: "sm",
|
|
8557
8592
|
fullWidth: true,
|
|
8558
|
-
children: [
|
|
8559
|
-
children:
|
|
8593
|
+
children: [jsx(DialogTitle, {
|
|
8594
|
+
children: jsx(Typography, {
|
|
8560
8595
|
variant: "heading18SemiBold",
|
|
8561
8596
|
textAlign: "center",
|
|
8562
8597
|
children: isEditing ? t("productFormList.modify") : t("productFormList.new")
|
|
8563
8598
|
})
|
|
8564
|
-
}),
|
|
8599
|
+
}), jsx(DialogContent, {
|
|
8565
8600
|
className: classes.dialogContent,
|
|
8566
|
-
children:
|
|
8601
|
+
children: jsx(Box, {
|
|
8567
8602
|
className: classes.dialogForm,
|
|
8568
8603
|
children: fields.map(field => renderField(field))
|
|
8569
8604
|
})
|
|
8570
|
-
}),
|
|
8605
|
+
}), jsxs(DialogActions, {
|
|
8571
8606
|
className: classes.dialogActions,
|
|
8572
|
-
children: [
|
|
8607
|
+
children: [jsx(VentionButton, {
|
|
8573
8608
|
onClick: handleEditClose,
|
|
8574
8609
|
variant: "outline",
|
|
8575
8610
|
size: "large",
|
|
8576
8611
|
children: t("productFormList.cancel")
|
|
8577
|
-
}),
|
|
8578
|
-
onClick:
|
|
8579
|
-
if (
|
|
8612
|
+
}), jsx(VentionButton, {
|
|
8613
|
+
onClick: () => __awaiter(this, void 0, void 0, function* () {
|
|
8614
|
+
if (yield onSubmit(formData)) {
|
|
8580
8615
|
handleEditClose();
|
|
8581
8616
|
}
|
|
8582
|
-
},
|
|
8617
|
+
}),
|
|
8583
8618
|
variant: "filled",
|
|
8584
8619
|
size: "large",
|
|
8585
8620
|
children: isEditing ? t("productFormList.save") : t("productFormList.create")
|
|
8586
8621
|
})]
|
|
8587
8622
|
})]
|
|
8588
|
-
}),
|
|
8623
|
+
}), jsxs(Dialog, {
|
|
8589
8624
|
open: deleteDialogOpen,
|
|
8590
8625
|
onClose: handleDeleteCancel,
|
|
8591
8626
|
maxWidth: "xs",
|
|
8592
8627
|
fullWidth: true,
|
|
8593
|
-
children: [
|
|
8594
|
-
children:
|
|
8628
|
+
children: [jsx(DialogTitle, {
|
|
8629
|
+
children: jsx(Typography, {
|
|
8595
8630
|
variant: "heading18SemiBold",
|
|
8596
8631
|
textAlign: "center",
|
|
8597
8632
|
children: t("productFormList.delete")
|
|
8598
8633
|
})
|
|
8599
|
-
}),
|
|
8600
|
-
children:
|
|
8634
|
+
}), jsx(DialogContent, {
|
|
8635
|
+
children: jsx(Typography, {
|
|
8601
8636
|
variant: "uiText14Regular",
|
|
8602
8637
|
className: classes.deleteMessage,
|
|
8603
8638
|
children: t("productFormList.deleteConfirmation")
|
|
8604
8639
|
})
|
|
8605
|
-
}),
|
|
8640
|
+
}), jsxs(DialogActions, {
|
|
8606
8641
|
className: classes.dialogActions,
|
|
8607
|
-
children: [
|
|
8642
|
+
children: [jsx(VentionButton, {
|
|
8608
8643
|
onClick: handleDeleteCancel,
|
|
8609
8644
|
variant: "outline",
|
|
8610
8645
|
size: "large",
|
|
8611
8646
|
children: t("productFormList.cancel")
|
|
8612
|
-
}),
|
|
8647
|
+
}), jsx(VentionButton, {
|
|
8613
8648
|
onClick: handleDeleteConfirm,
|
|
8614
8649
|
variant: "destructive",
|
|
8615
8650
|
size: "large",
|
|
@@ -8703,12 +8738,12 @@ const useStyles = tss.withParams().create(({
|
|
|
8703
8738
|
}
|
|
8704
8739
|
}));
|
|
8705
8740
|
|
|
8706
|
-
|
|
8741
|
+
var UserLevel;
|
|
8742
|
+
(function (UserLevel) {
|
|
8707
8743
|
UserLevel[UserLevel["Operator"] = 1] = "Operator";
|
|
8708
8744
|
UserLevel[UserLevel["Maintenance"] = 2] = "Maintenance";
|
|
8709
8745
|
UserLevel[UserLevel["Admin"] = 3] = "Admin";
|
|
8710
|
-
|
|
8711
|
-
}({});
|
|
8746
|
+
})(UserLevel || (UserLevel = {}));
|
|
8712
8747
|
function hasSufficientLevel(requiredLevel, currentLevel) {
|
|
8713
8748
|
return currentLevel >= requiredLevel;
|
|
8714
8749
|
}
|
|
@@ -10911,7 +10946,6 @@ if (DESCRIPTORS && !('size' in URLSearchParamsPrototype)) {
|
|
|
10911
10946
|
* - Local/Edge: http://hostname:8000
|
|
10912
10947
|
* - Deployed: Uses passthrough URL for digital twin infrastructure
|
|
10913
10948
|
*/
|
|
10914
|
-
|
|
10915
10949
|
/**
|
|
10916
10950
|
* Gets the execution engine HTTP URL for deployed environments
|
|
10917
10951
|
* @param processName - The name of the process/service
|
|
@@ -10933,7 +10967,6 @@ function getExecutionEngineHttpUrl(processName) {
|
|
|
10933
10967
|
const baseOrigin = isDev ? "https://digital-twin.vention.foo" : origin;
|
|
10934
10968
|
return `${baseOrigin}${basePath}`;
|
|
10935
10969
|
}
|
|
10936
|
-
|
|
10937
10970
|
/**
|
|
10938
10971
|
* Checks if the current environment is running on edge (local controller)
|
|
10939
10972
|
* @returns true if running on edge, false otherwise
|
|
@@ -10944,7 +10977,6 @@ function isOnEdge() {
|
|
|
10944
10977
|
} = window.location;
|
|
10945
10978
|
return hostname.startsWith("192.168") || hostname.startsWith("10.") || hostname.startsWith("100.") || hostname === "localhost" || hostname === "127.0.0.1" || hostname.endsWith(".ts.net");
|
|
10946
10979
|
}
|
|
10947
|
-
|
|
10948
10980
|
/**
|
|
10949
10981
|
* Gets the API base URL for the specified process/service
|
|
10950
10982
|
* @param options - Configuration options including process name and optional edge port
|