@vention/machine-apps-components 1.30.27 → 1.31.0

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 CHANGED
@@ -10,8 +10,8 @@ import 'dayjs/locale/en';
10
10
  import 'dayjs/locale/fr';
11
11
  import 'dayjs/locale/de';
12
12
  import 'dayjs/locale/es';
13
- import { Box, useTheme, Typography, Button, InputAdornment, IconButton, TableContainer, Paper, Table, TableHead, TableRow, TableCell, TableBody, List, ListItem, Dialog, DialogTitle, DialogContent, DialogActions, CircularProgress, Alert, LinearProgress } from '@mui/material';
14
- import { VentionSelect, VentionModalBase, VentionIcon, VentionTextInput, COLORS, VentionButton, VentionStatusIndicator, VentionSpinner, VentionAlert, VentionDropZone, VentionUploadFile, VentionIconButton } from '@vention/machine-ui';
13
+ import { Box, useTheme, Typography, Button, InputAdornment, IconButton, Stack, TableContainer, Paper, Table, TableHead, TableRow, TableCell, TableBody, List, ListItem, Dialog, DialogTitle, DialogContent, DialogActions, CircularProgress, Alert, LinearProgress } from '@mui/material';
14
+ import { VentionSelect, VentionModalBase, VentionIcon, VentionTextInput, COLORS, VentionButton, VentionStatusIndicator, VentionIconButton, VentionCounter, VentionStatusDot, VentionSpinner, VentionAlert, VentionDropZone, VentionUploadFile } from '@vention/machine-ui';
15
15
  import { tss } from 'tss-react/mui';
16
16
  import { useLocation, useNavigate } from 'react-router-dom';
17
17
  import { useMqttSubscription } from '@vention/machine-logic-ui-sdk';
@@ -1789,7 +1789,9 @@ var enTranslations = {
1789
1789
  },
1790
1790
  bar: {
1791
1791
  controlCenter: "Control Center",
1792
- support: "Support"
1792
+ support: "Support",
1793
+ settings: "Settings",
1794
+ notifications: "Notifications"
1793
1795
  },
1794
1796
  modal: {
1795
1797
  exit: {
@@ -1966,7 +1968,9 @@ var frTranslations = {
1966
1968
  },
1967
1969
  bar: {
1968
1970
  controlCenter: "Centre de contrôle",
1969
- support: "Support"
1971
+ support: "Support",
1972
+ settings: "Paramètres",
1973
+ notifications: "Notifications"
1970
1974
  },
1971
1975
  modal: {
1972
1976
  exit: {
@@ -2143,7 +2147,9 @@ var deTranslations = {
2143
2147
  },
2144
2148
  bar: {
2145
2149
  controlCenter: "Kontrollzentrum",
2146
- support: "Support"
2150
+ support: "Support",
2151
+ settings: "Einstellungen",
2152
+ notifications: "Benachrichtigungen"
2147
2153
  },
2148
2154
  modal: {
2149
2155
  exit: {
@@ -2320,7 +2326,9 @@ var esTranslations = {
2320
2326
  },
2321
2327
  bar: {
2322
2328
  controlCenter: "Centro de control",
2323
- support: "Soporte"
2329
+ support: "Soporte",
2330
+ settings: "Configuración",
2331
+ notifications: "Notificaciones"
2324
2332
  },
2325
2333
  modal: {
2326
2334
  exit: {
@@ -3193,7 +3201,7 @@ const I18nSettings = function I18nSettings({
3193
3201
  const {
3194
3202
  classes,
3195
3203
  cx
3196
- } = useStyles$k({
3204
+ } = useStyles$m({
3197
3205
  layout
3198
3206
  });
3199
3207
  const {
@@ -3283,7 +3291,7 @@ const I18nSettings = function I18nSettings({
3283
3291
  });
3284
3292
  };
3285
3293
  I18nSettings.displayName = "I18nSettings";
3286
- const useStyles$k = tss.withParams().create(({
3294
+ const useStyles$m = tss.withParams().create(({
3287
3295
  theme,
3288
3296
  layout
3289
3297
  }) => ({
@@ -5744,7 +5752,7 @@ const NavigationConfirmationModal = function NavigationConfirmationModal(props)
5744
5752
  } = props;
5745
5753
  const {
5746
5754
  classes
5747
- } = useStyles$j();
5755
+ } = useStyles$l();
5748
5756
  const {
5749
5757
  t
5750
5758
  } = useI18n();
@@ -5807,7 +5815,7 @@ const NavigationConfirmationModal = function NavigationConfirmationModal(props)
5807
5815
  })
5808
5816
  });
5809
5817
  };
5810
- const useStyles$j = tss.create(({
5818
+ const useStyles$l = tss.create(({
5811
5819
  theme
5812
5820
  }) => ({
5813
5821
  modalContent: {
@@ -5871,7 +5879,7 @@ const PasswordProtectionModal = function PasswordProtectionModal(props) {
5871
5879
  const [isKeyboardVisible, setIsKeyboardVisible] = useState(false);
5872
5880
  const {
5873
5881
  classes
5874
- } = useStyles$i();
5882
+ } = useStyles$k();
5875
5883
  const {
5876
5884
  t
5877
5885
  } = useI18n();
@@ -5995,7 +6003,7 @@ const PasswordProtectionModal = function PasswordProtectionModal(props) {
5995
6003
  })]
5996
6004
  });
5997
6005
  };
5998
- const useStyles$i = tss.create(({
6006
+ const useStyles$k = tss.create(({
5999
6007
  theme
6000
6008
  }) => ({
6001
6009
  modalContent: {
@@ -6067,7 +6075,7 @@ const NavigationBarItem = function NavigationBarItem(props) {
6067
6075
  const {
6068
6076
  classes,
6069
6077
  cx
6070
- } = useStyles$h();
6078
+ } = useStyles$j();
6071
6079
  const {
6072
6080
  t
6073
6081
  } = useI18n();
@@ -6100,7 +6108,7 @@ const NavigationBarItem = function NavigationBarItem(props) {
6100
6108
  })]
6101
6109
  });
6102
6110
  };
6103
- const useStyles$h = tss.create(({
6111
+ const useStyles$j = tss.create(({
6104
6112
  theme
6105
6113
  }) => ({
6106
6114
  tabButton: {
@@ -6171,7 +6179,7 @@ const NavigationBarRoot = function NavigationBarRoot(props) {
6171
6179
  const theme = useTheme();
6172
6180
  const {
6173
6181
  classes
6174
- } = useStyles$g({
6182
+ } = useStyles$i({
6175
6183
  variant
6176
6184
  });
6177
6185
  const {
@@ -6312,7 +6320,7 @@ const NavigationBarRoot = function NavigationBarRoot(props) {
6312
6320
  })]
6313
6321
  });
6314
6322
  };
6315
- const useStyles$g = tss.withParams().create(({
6323
+ const useStyles$i = tss.withParams().create(({
6316
6324
  theme,
6317
6325
  variant
6318
6326
  }) => ({
@@ -6467,7 +6475,7 @@ const StatusTopBarButton = function StatusTopBarButton(props) {
6467
6475
  } = props;
6468
6476
  const {
6469
6477
  classes
6470
- } = useStyles$f();
6478
+ } = useStyles$h();
6471
6479
  if (!visible) return null;
6472
6480
  const getFadedColor = function getFadedColor(color, opacity = 1) {
6473
6481
  return `${color}${Math.round(opacity * 255).toString(16).padStart(2, "0")}`;
@@ -6513,7 +6521,7 @@ const StatusTopBarButton = function StatusTopBarButton(props) {
6513
6521
  })
6514
6522
  });
6515
6523
  };
6516
- const useStyles$f = tss.create(({
6524
+ const useStyles$h = tss.create(({
6517
6525
  theme
6518
6526
  }) => ({
6519
6527
  actionButton: {
@@ -6549,7 +6557,7 @@ const StatusTopBarRoot = function StatusTopBarRoot(props) {
6549
6557
  } = props;
6550
6558
  const {
6551
6559
  classes
6552
- } = useStyles$e({
6560
+ } = useStyles$g({
6553
6561
  variant
6554
6562
  });
6555
6563
  const visibleButtons = buttonConfigs.filter(config => config.visible !== false);
@@ -6576,7 +6584,7 @@ const StatusTopBarRoot = function StatusTopBarRoot(props) {
6576
6584
  })]
6577
6585
  });
6578
6586
  };
6579
- const useStyles$e = tss.withParams().create(({
6587
+ const useStyles$g = tss.withParams().create(({
6580
6588
  theme,
6581
6589
  variant
6582
6590
  }) => ({
@@ -6619,6 +6627,297 @@ const useStyles$e = tss.withParams().create(({
6619
6627
  }));
6620
6628
  const StatusTopBar = StatusTopBarRoot;
6621
6629
 
6630
+ /******************************************************************************
6631
+ Copyright (c) Microsoft Corporation.
6632
+
6633
+ Permission to use, copy, modify, and/or distribute this software for any
6634
+ purpose with or without fee is hereby granted.
6635
+
6636
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
6637
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
6638
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
6639
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
6640
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
6641
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
6642
+ PERFORMANCE OF THIS SOFTWARE.
6643
+ ***************************************************************************** */
6644
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
6645
+
6646
+
6647
+ function __rest(s, e) {
6648
+ var t = {};
6649
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
6650
+ t[p] = s[p];
6651
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6652
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
6653
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
6654
+ t[p[i]] = s[p[i]];
6655
+ }
6656
+ return t;
6657
+ }
6658
+
6659
+ function __awaiter(thisArg, _arguments, P, generator) {
6660
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6661
+ return new (P || (P = Promise))(function (resolve, reject) {
6662
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6663
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6664
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
6665
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
6666
+ });
6667
+ }
6668
+
6669
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
6670
+ var e = new Error(message);
6671
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
6672
+ };
6673
+
6674
+ /**
6675
+ * A Stack whose padding tuple means [vertical, horizontal]. Use it for layout and keep colors in styles.
6676
+ */
6677
+ const FlexContainer = function FlexContainer(props) {
6678
+ const {
6679
+ padding = 0
6680
+ } = props,
6681
+ stackProps = __rest(props, ["padding"]);
6682
+ const [paddingY, paddingX] = Array.isArray(padding) ? padding : [padding, padding];
6683
+ return jsx(Stack, Object.assign({
6684
+ paddingY: paddingY,
6685
+ paddingX: paddingX
6686
+ }, stackProps));
6687
+ };
6688
+
6689
+ const BottomNavBarItem = function BottomNavBarItem(props) {
6690
+ const {
6691
+ icon,
6692
+ label,
6693
+ onClick,
6694
+ selected = false,
6695
+ disabled = false
6696
+ } = props;
6697
+ const {
6698
+ classes,
6699
+ cx
6700
+ } = useStyles$f();
6701
+ const {
6702
+ t
6703
+ } = useI18n();
6704
+ return jsxs(Button, {
6705
+ disableRipple: true,
6706
+ disabled: disabled,
6707
+ onClick: onClick,
6708
+ "aria-current": selected ? "page" : undefined,
6709
+ className: cx(classes.tab, {
6710
+ [classes.selected]: selected,
6711
+ [classes.disabled]: disabled
6712
+ }),
6713
+ children: [jsx(FlexContainer, {
6714
+ alignItems: "center",
6715
+ justifyContent: "center",
6716
+ width: 28,
6717
+ height: 28,
6718
+ children: icon
6719
+ }), jsx(Typography, {
6720
+ variant: "hmiText20SemiBold",
6721
+ fontWeight: selected ? 600 : 500,
6722
+ noWrap: true,
6723
+ children: t(label, {
6724
+ defaultValue: label
6725
+ })
6726
+ })]
6727
+ });
6728
+ };
6729
+ const useStyles$f = tss.create(({
6730
+ theme
6731
+ }) => ({
6732
+ tab: {
6733
+ gap: theme.spacing(2),
6734
+ height: "100%",
6735
+ padding: theme.spacing(0, 8),
6736
+ borderRadius: 3,
6737
+ color: theme.palette.text.primary,
6738
+ textTransform: "none",
6739
+ transition: "background-color 0.2s",
6740
+ "&:hover": {
6741
+ backgroundColor: theme.palette.background.surface2active
6742
+ },
6743
+ "&.Mui-disabled": {
6744
+ color: theme.palette.text.primary
6745
+ }
6746
+ },
6747
+ selected: {
6748
+ backgroundColor: theme.palette.background.default,
6749
+ boxShadow: "0px 1px 2px rgba(2, 6, 23, 0.05)",
6750
+ "&:hover": {
6751
+ backgroundColor: theme.palette.background.default
6752
+ }
6753
+ },
6754
+ disabled: {
6755
+ opacity: 0.5,
6756
+ cursor: "not-allowed"
6757
+ }
6758
+ }));
6759
+
6760
+ const IconBadgeButton = function IconBadgeButton(props) {
6761
+ const {
6762
+ icon,
6763
+ ariaLabel,
6764
+ onClick,
6765
+ count = 0,
6766
+ disabled = false,
6767
+ className,
6768
+ "data-testid": dataTestId
6769
+ } = props;
6770
+ return jsxs(FlexContainer, {
6771
+ position: "relative",
6772
+ flexShrink: 0,
6773
+ className: className,
6774
+ children: [jsx(VentionIconButton, {
6775
+ variant: "outline",
6776
+ size: "xx-large",
6777
+ "aria-label": ariaLabel,
6778
+ onClick: onClick,
6779
+ disabled: disabled,
6780
+ "data-testid": dataTestId,
6781
+ children: icon
6782
+ }), count > 0 && jsx(Box, {
6783
+ position: "absolute",
6784
+ top: 16,
6785
+ left: 48,
6786
+ sx: {
6787
+ pointerEvents: "none"
6788
+ },
6789
+ children: jsx(VentionCounter, {
6790
+ color: "red",
6791
+ variant: "filled",
6792
+ size: "small",
6793
+ value: count,
6794
+ "data-testid": dataTestId && `${dataTestId}-counter`
6795
+ })
6796
+ })]
6797
+ });
6798
+ };
6799
+
6800
+ const actionIconSize = 40;
6801
+ const BottomNavBarRoot = function BottomNavBarRoot(props) {
6802
+ const {
6803
+ children,
6804
+ status,
6805
+ onSettingsClick,
6806
+ onNotificationsClick,
6807
+ notificationCount = 0,
6808
+ settingsIcon,
6809
+ notificationsIcon,
6810
+ actions,
6811
+ showSettingsButton = true,
6812
+ showNotificationsButton = true,
6813
+ settingsDisabled = false,
6814
+ notificationsDisabled = false,
6815
+ className
6816
+ } = props;
6817
+ const {
6818
+ classes,
6819
+ theme
6820
+ } = useStyles$e();
6821
+ const {
6822
+ t
6823
+ } = useI18n();
6824
+ return (
6825
+ // Transparent so the bar can sit on different surface colors
6826
+ jsxs(FlexContainer, {
6827
+ component: "footer",
6828
+ direction: "row",
6829
+ alignItems: "center",
6830
+ gap: 11,
6831
+ padding: [3, 5],
6832
+ width: "100%",
6833
+ flexShrink: 0,
6834
+ boxSizing: "border-box",
6835
+ className: className,
6836
+ children: [jsxs(FlexContainer, {
6837
+ direction: "row",
6838
+ alignItems: "center",
6839
+ gap: 4,
6840
+ flex: "1 0 0",
6841
+ minWidth: 0,
6842
+ children: [showSettingsButton && jsx(IconBadgeButton, {
6843
+ ariaLabel: t("navigation.bar.settings", {
6844
+ defaultValue: "Settings"
6845
+ }),
6846
+ icon: settingsIcon !== null && settingsIcon !== void 0 ? settingsIcon : jsx(VentionIcon, {
6847
+ type: "settings",
6848
+ size: actionIconSize,
6849
+ color: theme.palette.text.primary
6850
+ }),
6851
+ onClick: onSettingsClick,
6852
+ disabled: settingsDisabled,
6853
+ "data-testid": "bottom-nav-bar-settings"
6854
+ }), showNotificationsButton && jsx(IconBadgeButton, {
6855
+ ariaLabel: t("navigation.bar.notifications", {
6856
+ defaultValue: "Notifications"
6857
+ }),
6858
+ icon: notificationsIcon !== null && notificationsIcon !== void 0 ? notificationsIcon : jsx(VentionIcon, {
6859
+ type: "file-description",
6860
+ size: actionIconSize,
6861
+ color: theme.palette.text.primary
6862
+ }),
6863
+ onClick: onNotificationsClick,
6864
+ count: notificationCount,
6865
+ disabled: notificationsDisabled,
6866
+ "data-testid": "bottom-nav-bar-notifications"
6867
+ }), actions]
6868
+ }), jsx(Box, {
6869
+ component: "nav",
6870
+ display: "grid",
6871
+ gridAutoFlow: "column",
6872
+ gridAutoColumns: "1fr",
6873
+ gap: "1px",
6874
+ flexShrink: 0,
6875
+ className: classes.tabs,
6876
+ children: children
6877
+ }), jsx(FlexContainer, {
6878
+ direction: "row",
6879
+ alignItems: "center",
6880
+ justifyContent: "flex-end",
6881
+ flex: "1 0 0",
6882
+ minWidth: 0,
6883
+ children: status &&
6884
+ // The medium status dot has 6px of padding around the dot, so 10px + 6px gives the 16px design gap
6885
+ jsxs(FlexContainer, {
6886
+ direction: "row",
6887
+ alignItems: "center",
6888
+ gap: "10px",
6889
+ padding: [0, 5],
6890
+ height: theme.spacing(10),
6891
+ "data-testid": "bottom-nav-bar-status",
6892
+ children: [jsx(VentionStatusDot, {
6893
+ dotColor: status.dotColor,
6894
+ size: "medium"
6895
+ }), jsx(Typography, {
6896
+ variant: "heading18SemiBold",
6897
+ color: "text.primary",
6898
+ noWrap: true,
6899
+ children: status.label
6900
+ })]
6901
+ })
6902
+ })]
6903
+ })
6904
+ );
6905
+ };
6906
+ const useStyles$e = tss.create(({
6907
+ theme
6908
+ }) => ({
6909
+ tabs: {
6910
+ height: theme.spacing(12),
6911
+ padding: 2,
6912
+ boxSizing: "border-box",
6913
+ borderRadius: 6,
6914
+ backgroundColor: theme.palette.background.surface2
6915
+ }
6916
+ }));
6917
+ const BottomNavBar = Object.assign(BottomNavBarRoot, {
6918
+ Item: BottomNavBarItem
6919
+ });
6920
+
6622
6921
  const Sidebar = function Sidebar(props) {
6623
6922
  const {
6624
6923
  items,
@@ -7674,38 +7973,6 @@ exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
7674
7973
  return function RuntimeError(message) { return apply(init, this, arguments); };
7675
7974
  });
7676
7975
 
7677
- /******************************************************************************
7678
- Copyright (c) Microsoft Corporation.
7679
-
7680
- Permission to use, copy, modify, and/or distribute this software for any
7681
- purpose with or without fee is hereby granted.
7682
-
7683
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
7684
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
7685
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
7686
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
7687
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
7688
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
7689
- PERFORMANCE OF THIS SOFTWARE.
7690
- ***************************************************************************** */
7691
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
7692
-
7693
-
7694
- function __awaiter(thisArg, _arguments, P, generator) {
7695
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7696
- return new (P || (P = Promise))(function (resolve, reject) {
7697
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7698
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7699
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7700
- step((generator = generator.apply(thisArg, _arguments || [])).next());
7701
- });
7702
- }
7703
-
7704
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
7705
- var e = new Error(message);
7706
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
7707
- };
7708
-
7709
7976
  const LogsPagination = /*#__PURE__*/memo(({
7710
7977
  currentPage,
7711
7978
  totalPages,
@@ -11811,4 +12078,4 @@ function getApiBaseUrl(options) {
11811
12078
  return getExecutionEngineHttpUrl(processName);
11812
12079
  }
11813
12080
 
11814
- export { ActionButton, CalibrationEnvironmentPage, CalibrationFooter, CalibrationHandEyePage, ENVIRONMENT_PROGRESS_TOPIC, FileUploadPanel, HAND_EYE_PROGRESS_TOPIC, I18nProvider, I18nSettings, LogFilterForm, LogsPagination, LogsPanel, LogsTable, NavigationBar, NavigationConfirmationModal, PasswordProtectionModal, PressButton, ProductFormList, SettingsPage, Sidebar, StatusTopBar, StepProgressCircle, TimeLabel, UserLevel, Z_INDEX, closeCustomUi, formatDateToInput, getApiBaseUrl, getAvailableTimezones, getLanguageDisplayName, getSupportedLanguages, hasSufficientLevel, isOnEdge, isTouchScreenDevice, navigateControlCenter, parseLogDate, useAutoScrollInput, useI18n };
12081
+ export { ActionButton, BottomNavBar, CalibrationEnvironmentPage, CalibrationFooter, CalibrationHandEyePage, ENVIRONMENT_PROGRESS_TOPIC, FileUploadPanel, FlexContainer, HAND_EYE_PROGRESS_TOPIC, I18nProvider, I18nSettings, IconBadgeButton, LogFilterForm, LogsPagination, LogsPanel, LogsTable, NavigationBar, NavigationConfirmationModal, PasswordProtectionModal, PressButton, ProductFormList, SettingsPage, Sidebar, StatusTopBar, StepProgressCircle, TimeLabel, UserLevel, Z_INDEX, closeCustomUi, formatDateToInput, getApiBaseUrl, getAvailableTimezones, getLanguageDisplayName, getSupportedLanguages, hasSufficientLevel, isOnEdge, isTouchScreenDevice, navigateControlCenter, parseLogDate, useAutoScrollInput, useI18n };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vention/machine-apps-components",
3
- "version": "1.30.27",
3
+ "version": "1.31.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/VentionCo/machine-cloud.git"
@@ -75,6 +75,8 @@ declare const _default: {
75
75
  bar: {
76
76
  controlCenter: string;
77
77
  support: string;
78
+ settings: string;
79
+ notifications: string;
78
80
  };
79
81
  modal: {
80
82
  exit: {
@@ -75,6 +75,8 @@ declare const _default: {
75
75
  bar: {
76
76
  controlCenter: string;
77
77
  support: string;
78
+ settings: string;
79
+ notifications: string;
78
80
  };
79
81
  modal: {
80
82
  exit: {
@@ -75,6 +75,8 @@ declare const _default: {
75
75
  bar: {
76
76
  controlCenter: string;
77
77
  support: string;
78
+ settings: string;
79
+ notifications: string;
78
80
  };
79
81
  modal: {
80
82
  exit: {
@@ -75,6 +75,8 @@ declare const _default: {
75
75
  bar: {
76
76
  controlCenter: string;
77
77
  support: string;
78
+ settings: string;
79
+ notifications: string;
78
80
  };
79
81
  modal: {
80
82
  exit: {
package/src/index.d.ts CHANGED
@@ -8,6 +8,10 @@ export * from "./lib/navigation-bar/navigation-confirmation-modal";
8
8
  export * from "./lib/navigation-bar/password-protection-modal";
9
9
  export * from "./lib/navigation-bar/time-label";
10
10
  export * from "./lib/status-top-bar/status-top-bar";
11
+ export * from "./lib/bottom-nav-bar/bottom-nav-bar";
12
+ export type { BottomNavBarItemProps } from "./lib/bottom-nav-bar/bottom-nav-bar-item";
13
+ export * from "./lib/bottom-nav-bar/icon-badge-button";
14
+ export * from "./lib/flex-container/flex-container";
11
15
  export * from "./lib/sidebar/sidebar";
12
16
  export type { SidebarItem, SidebarProps, SidebarVariant } from "./lib/sidebar/sidebar";
13
17
  export * from "./lib/logs/logs-table";
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from "react";
2
+ export interface BottomNavBarItemProps {
3
+ label: string;
4
+ icon: ReactNode;
5
+ onClick: () => void;
6
+ /** Marks the item as the current page */
7
+ selected?: boolean;
8
+ disabled?: boolean;
9
+ }
10
+ export declare const BottomNavBarItem: (props: BottomNavBarItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,29 @@
1
+ import { VentionStatusDotColors } from "@vention/machine-ui";
2
+ import { ReactNode } from "react";
3
+ export interface BottomNavBarStatus {
4
+ label: string;
5
+ dotColor: VentionStatusDotColors;
6
+ }
7
+ export interface BottomNavBarProps {
8
+ /** BottomNavBar.Item elements rendered as tabs in the center section */
9
+ children: ReactNode;
10
+ status?: BottomNavBarStatus;
11
+ onSettingsClick?: () => void;
12
+ onNotificationsClick?: () => void;
13
+ notificationCount?: number;
14
+ /** Replaces the default settings icon */
15
+ settingsIcon?: ReactNode;
16
+ /** Replaces the default notifications icon */
17
+ notificationsIcon?: ReactNode;
18
+ /** Extra buttons rendered after the settings and notifications buttons, e.g. IconBadgeButton elements */
19
+ actions?: ReactNode;
20
+ showSettingsButton?: boolean;
21
+ showNotificationsButton?: boolean;
22
+ settingsDisabled?: boolean;
23
+ notificationsDisabled?: boolean;
24
+ className?: string;
25
+ }
26
+ export declare const BottomNavBar: ((props: BottomNavBarProps) => import("react/jsx-runtime").JSX.Element) & {
27
+ Item: (props: import("./bottom-nav-bar-item").BottomNavBarItemProps) => import("react/jsx-runtime").JSX.Element;
28
+ };
29
+ export default BottomNavBar;
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from "react";
2
+ export interface IconBadgeButtonProps {
3
+ icon: ReactNode;
4
+ ariaLabel: string;
5
+ onClick?: () => void;
6
+ /** Shows a red counter on the icon when greater than 0 */
7
+ count?: number;
8
+ disabled?: boolean;
9
+ className?: string;
10
+ "data-testid"?: string;
11
+ }
12
+ export declare const IconBadgeButton: (props: IconBadgeButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { StackProps } from "@mui/material";
2
+ export type FlexContainerProps = Omit<StackProps, "padding" | "bgcolor" | "backgroundColor"> & {
3
+ /** Theme spacing index, or [vertical, horizontal] like the CSS shorthand */
4
+ padding?: number | [number, number];
5
+ };
6
+ /**
7
+ * A Stack whose padding tuple means [vertical, horizontal]. Use it for layout and keep colors in styles.
8
+ */
9
+ export declare const FlexContainer: (props: FlexContainerProps) => import("react/jsx-runtime").JSX.Element;