udp-react-enterprise-component-library 26.0.0-beta.66 → 26.0.0-beta.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +2 -1
- package/dist/menuPage/MenuPage.mjs +1 -1
- package/dist/menuPage/MenuPage.mjs.map +1 -1
- package/dist/shell/ui/ShellDropdown.mjs +2 -1
- package/dist/shell/ui/ShellDropdown.mjs.map +1 -1
- package/dist/shell/ui/SiteHeader.mjs +1 -0
- package/dist/shell/ui/SiteHeader.mjs.map +1 -1
- package/dist/udp/pages/UdpTransactionsPage/components/transactionHistory/TransactionTimeline.mjs +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -134,6 +134,7 @@ import { DiffChecker } from "./diffChecker/DiffChecker.mjs";
|
|
|
134
134
|
import { PaymentMethodTypeEnum } from "./enums/paymentMethodTypeEnum.mjs";
|
|
135
135
|
import { PaymentTenderTypeEnum } from "./enums/paymentTenderTypeEnum.mjs";
|
|
136
136
|
import { PaymentVendorFactoryEnum } from "./enums/paymentVendorFactoryEnum.mjs";
|
|
137
|
+
import { HttpStatusCode } from "./enums/httpStatusCodesEnums.mjs";
|
|
137
138
|
import { useApiCatalog } from "./hooks/useApiCatalog.mjs";
|
|
138
139
|
import { useFluentIcon } from "./hooks/useFluentIcon.mjs";
|
|
139
140
|
import { QuickViewCard } from "./UI/surfaces/cards/QuickViewCard.mjs";
|
|
@@ -523,4 +524,4 @@ import { UdpAppProvider } from "./providers/UdpAppProvider.mjs";
|
|
|
523
524
|
import UdpMaintenanceConfigPage from "./udp/pages/UdpMaintenanceConfigPage/UdpMaintenanceConfigPage.mjs";
|
|
524
525
|
import { TransactionAttachmentPdfStitcher } from "./udp/pages/UdpTransactionsPage/components/transactionAttachment/TransactionAttachmentPdfStitcher.mjs";
|
|
525
526
|
import { ConfigService } from "udp-react-stencil-component-library";
|
|
526
|
-
export { ADUserTypeEnums, Accordion, AccountFlags, ActionContext, ActionDispatchContext, ActionForm, ActionModal, ActionPanelPlacement, ActionProvider, ActionSideSheet, ActionSpeedDial, ActionSplitScreen, ActionSummaryCard, ActionSummaryHeader, ActionSummaryListContainer, ActionSummaryListItem, ActionSummaryPopover, ActionWrapper, ActionsRenderer, AddUser, AddressListItem, Adornment, AgTable, AgTableButtons, AlertContainer, AlertFlag, AmChart, AmbientAlert, AmbientAutoComplete, AmbientCard, AmbientCardButton, AmbientCardTitle, AmbientDateRangeSelector, AmbientGridTemplate, AmbientList, AmbientListItem, AmbientPopoverMenuItem, AmbientProjectSwitcher, AmbientSingleDateSelector, AmbientSplitStatCard, AmbientStepper, AmbientSummaryListHeader, AmbientTextField, AmbientToast, AmbientToggleButton, AmbientToggleButtonGroup, AmbientTokenButton, AmbientVisualizationCard, AmbientVisualizer, ApiMethodInstanceUdpGrid, AppMenu, AppMenuItem, AppMenuItemComponent, ApprovalIcon, Attachments, AuthProvider, AuthProviderWrapper, AutoCompletePropertyWidget_exports as AutoCompletePropertyWidget, AvatarAlphabet, BackwardsCompatibleGrid, BarChartWidget_exports as BarChartWidget, BaseSideSheet, BioCard, Block, BooleanPropertyWidget_exports as BooleanPropertyWidget, Box, BreadCrumbMenu, BubbleWidget_exports as BubbleWidget, CardList, CardinalityTypeEnums, ChatContainer, ChatMessage, CheckboxGroup, CheckboxList, ChipAlphabet, CircleGaugeWidget, CircularProgress, CkRichEditor, ClickOpenEnums, ClientSideUdpGrid, ColorKey, CompactCard, CompactDataList, CompactDataListItem, ConfigService, ContainerTypeEnums, ContentContainer, Controls, CoreLayoutFloorplan, CrudForm, CustomMenuPage, DateField, DatePropertyWidget_exports as DatePropertyWidget, DateTimeField, DateTimePropertyWidget_exports as DateTimePropertyWidget, DateTrendWidget_exports as DateTrendWidget, DensePlotWidget_exports as DensePlotWidget, DeviceTypeEnums, DiffChecker, Directory, DirectoryListItem, Divider, DonutChartWidget_exports as DonutChartWidget, DragDropFileUpload, DraggableSidebarTemplate, DynamicContainerWithMenu, EMPTY_GUID, Ellipse, EmptyStateDisplay, EntityAttributeEnums, EntityHeader, ExecuteApiDialog, ExpandRenderer, ExportSidesheet, ExtenderToggle, Field, FieldArrayCard, FieldType, FileUpload, FileViewer, FilterOperators, FilterSearch, FlagBlock, FloatPropertyWidget_exports as FloatPropertyWidget, FluentActivity, FluentActivityRow, FluentButton, FluentCard, FluentCardActions, FluentCardContent, FluentCardHeader, FluentCardText, FluentCheckbox, FluentColorPicker, FluentCompoundButton, FluentDataTable, FluentDatePicker, FluentDateTimePicker, FluentDialog, FluentIcon, FluentIconButton, FluentImageMap, FluentLink, FluentListElement, FluentListItem, FluentMap, FluentMenuListButton, FluentMenuListItem, FluentProfileMenuCard, FluentRadio, FluentRadioGroup, FluentScrollLoadAutocompleteMenu, FluentSearchField, FluentSelectGroupMenu, FluentSelectMenu, FluentSideNav, FluentSimpleSelect, FluentSimpleTab, FluentSimpleTabs, FluentTabPanel, FluentTabUtility, FluentTagField, FluentTagFieldComponent, FluentTextField, FluentTextFieldAutoComplete, FluentTextFieldComponent, FluentTimePicker, FluentTimeline, FluentToggle, FluentUploadButton, FluentUploadIconButton, Form, FormButtons, FormControl, FormControlLabel, FormError, FormHeader, FormSpy, FormSubHeader, FullScreenControl, GaugeWidget, GeoMap, GraphCard, Grid, GridActionBar, GridEnums, GridExcelStyleEnums, GridGroup, GridGroupingHeader, GridGroupingSidebar, GridRow, GridSidebarContainer, GridStateTypeEnums, GridUnit, HeaderExpander, HeaderLayout, IconButtonWithTooltip, IconKey, IconRenderer, IframeContainer, ImageLayer, ImportDataFromFileMapping, IndicatorChip, InfoCard, InputAdornment, InputFieldType, Inquiry, InquiryAdvancedSearch, InquiryAdvancedSearchForm, InquiryContainer, InquiryDashboard, InquiryHeaderControl, InquiryHeaderControlTarget, InquiryHeaderSecondary, InquiryHeaderSecondaryAlert, InquiryHeaderSecondaryAlertTarget, InquiryHeaderSecondaryTarget, InquiryHeaderTitle, InquiryHeaderTitleTarget, InquiryNodeControls, InquirySearchContainer, InquirySearchDatasource, InquirySearchTable, InquiryTreeMenu, InquiryTreeMenuItem, InquiryWrapper, InsightRenderer, IntegerPropertyWidget_exports as IntegerPropertyWidget, ItemDescription, ItemsWidgetCard, JobStatusIdMapping, JobTypeIdMapping, KeyValueTextField, Layers, LayoutUnit, LicenseKey, LineAndSparklinesWidget_exports as LineAndSparklinesWidget, LineGraphWidget_exports as LineGraphWidget, LinearProgress, Link, ListCard, ListElement, ListSearch, LoadingIndicator, LogicalSearchOperatorEnums, LoginForm, LookupTypeEnums, LookupTypeIdEnums, MAX_FILE_SIZE_MB, Map, MapFilterBar, MapLayout, MapSheet, MenuItemEnums, MenuLoader, MenuProvider, MenuTypeEnums, MttMainTimeline, MttSummary, MttTimeline, MultilineTextPropertyWidget_exports as MultilineTextPropertyWidget, MyExportsPage, NavLink, NestParent, NestWrapper, NestedGrid, NewsCard, NodeActionEnums, NodeActionTriggerEnums, NodeColumnHeader, NodeDetails, NodeGroupOutlierEnums, NodeGroupTypeEnums, NodeList, NodeLoader, Note, Notes, NotesScreen, NotificationElement, NumericPropertyWidget_exports as NumericPropertyWidget, OpenPage, OutlookCallback, OutlookIntegrationBanner, OutlookIntegrationCallbackPage, OutlookIntegrationSideSheet, PAHAdditionalRightComponent, PAHAdditionalTitleComponent, PAHExport, PDFViewer, Page, PageContainer, PageContent, PageForbiddenRoute, PageHeader, PageLoading, PageNotFoundRoute, PageRenderer, PageSectionHeader, PageSectionSpacer, PageStatus, PageSubHeaderAction, PageSubHeaderActionsTarget, PanelPositionEnums, ParamsMappingForm, PasswordResetRedirect, PaymentForm, PaymentMethodTypeEnum, PaymentReversalForm, PaymentTenderTypeEnum, PaymentVendorFactoryEnum, PopoverCard, PowerBIReport, PrimaryActionButton, PrimaryActionHeader, PrivateRoute, ProductEnums, ProductNameEnums, ProgressBarWidget_exports as ProgressBarWidget, Prompt, PropertyField, PropertyFields, PropertyTypeEnum, PublicRoute, QuickViewCard, RecentlyLoadedNodesTable, RecentlyLoadedNodesWidget_exports as RecentlyLoadedNodesWidget, Redirect, RejectIcon, RemindersScreen, RemindersWidget_exports as RemindersWidget, RequiredFieldsMappingForm, RoleIdEnums, RoleNameEnums, RoleTypeEnums, Route, SapFlexibleTemplate, SearchGroupingType, SearchMethodUdpGrid, SearchOperators, SearchServiceDatasource, SearchSortDirection, SearchValueType, SelectGroupMenu, SelectPropertyWidget_exports as SelectPropertyWidget, ServerSideUdpGrid, SeverityTypeEnums, Shell, ShellDropdown, SideBarTemplate, SideSheet, SideSheetHeader, SiteHeaderRightComponent, SiteHeaderRightComponentTarget, SparklineWidget_exports as SparklineWidget, SparsePlotWidget_exports as SparsePlotWidget, SplitScreenTypeEnums, StandardTitle, Statistic, StatusCellRenderer, StatusChip, StatusLineItem, Sticky, StylizedTitle, SubHeaderAction, SubHeaderActionsTarget, SubmitButton, SummaryBlock, SupportCaseSideSheet, SvgIcon, Switch, TableColumnDefs, TableContainer, TeleportSource, TenantTypeEnums, TestFullStencilPage, TestStencilWrappedComponentsPage, TextPropertyWidget_exports as TextPropertyWidget, ThemeProvider, TicketCard, TileDisplay, TileLayer, TimeField, TimeLine, TimePropertyWidget_exports as TimePropertyWidget, TimelineCalendar, TimelinePreloaderNode, ToggleSection, Token, TokenGroupItem, ToolBarButton, TransactionActionTypeEnums, TransactionAttachmentPdfStitcher, TransactionEventTypeEnums, TransactionUiActionTypeEnums, TreeViewModeEnums, TrimForAvatar, Typography, UdpAccordion, UdpAdvancedSearchBuilder, UdpAppProvider, UdpAutocomplete, UdpAvatar, UdpBadge, UdpBarChart, UdpButton, UdpCalendar, UdpCalendarDayView, UdpCalendarMonthView, UdpCalendarWeekView, UdpCalendarYearView, UdpCard, UdpCheckbox, UdpChip, UdpCompoundButton, UdpContainerQuery, UdpContainerQueryGrid, UdpCounterBadge, UdpCrudFormFields, UdpDateInput, UdpDatePicker, UdpDateRangeSelector, UdpDateSelector, UdpDateTimeInput, UdpDetailList, UdpDetailListItem, UdpDialog, UdpDivider, UdpDonutChart, UdpDrawer, UdpDropdown, UdpDurationInput, UdpEnums, UdpFlexbox, UdpFormRenderer, UdpFormsBuilderPage, UdpFormsListPage, UdpFormsSubmissionGrid, UdpFormsSubmissionGridManagerPage, UdpFormsSubmissionGridResponderPage, UdpGridTemplate, UdpIcon, UdpIconButton, UdpIconGrid, UdpImage, UdpKeywordEnums, UdpKpiCard, UdpKpiCards, UdpLineChart, UdpLink, UdpList, UdpListItem, UdpMaintenanceConfigPage, UdpMaintenanceEnginePage, UdpMap, UdpMapComponent, UdpMapToolbar, UdpMenu, UdpMessageBar, UdpPageEnums, UdpPages, UdpPagesLazy, UdpPagesLoaders, UdpPopover, UdpPrimaryActionHeader, UdpPrivateForm, UdpProgressBar, UdpPublicForm, UdpRadioGroup, UdpReminderFiledForType, UdpRoutes, UdpSearchEnums, UdpSearchInput, UdpSlider, UdpSpinner, UdpStepper, UdpSwatchPicker, UdpSwitch, UdpTabPanel, UdpTabUtility, UdpTablist, UdpTabs, UdpText, UdpTextInput, UdpTextarea, UdpTimeInput, UdpTimeSelector, UdpTimeline, UdpTimelineConnector, UdpTimelineContent, UdpTimelineDot, UdpTimelineItem, UdpTimelineSeparator, UdpToggleButton, UdpTooltip, UdpTransactionActionEnums, UdpTransactionEmailForm, UdpTransactionTypesPage, UdpTransactionsPage, UdpTree, UdpTreeContext, UdpTreeItem, UdpVerticalSpacer, UnityFluentIcon, UnityIcon, UnityProducts, User, UserContext, UserDispatchContext, UserForm, UserFormFields, UtilityBar, UtilityBarInport, UtilityBarInportTarget, UtilityTabHeader, VectorLayer, VerticalEnums, VisibilityTypeEnums, WidgetCard, WorkOrderCard, WorkflowContainer, ZoomControl, acquireAccessToken, allowedExtensions, apiMutate, apiResponseArrayToOptions, arrayMutators, camelToPascalCaseWithSpace, checkAndAuthenticate, checkNodeIsHidden, clearGridState, clearStoredExternalPath, clearStoredPath, clearStoredTenant, collapseAllNodes, colors, constructBusinessObjectArrFromTree, constructDynamicNodeGroups, constructDynamicNodeGroups2, constructPreloadedTree, constructStaticNodeGroups, corporateColors, corporateColorsHint, createTimeline, createUser, createUserFromUserObject, csvStrToArray, csvStrToArrayOfObjects, defaultColumnActionsDef, deleteGridState, deleteNode, deleteNodeAndChildren, disconnect, ensureOutlookStatusLoaded, evaluateRule, exchangeAuthorizationCode, executeQueryAdHoc, executeQueryInstance, executeQueryInstanceWithApiMethodInstance, executeQueryWithParameters, expandAllNodes, findAllParentIds, findHomeRouteSlug, findLastNode, findNodeById, findNodeByIdAndLabel, findNodesByIdAndLabel, findTermByType, fluentLibraryIcons, formatBytes, mttFunctions_exports as formatDataWithTimelineCategoryNameOrderedByDate, formatDateToLocaleString, formatTreeLabel, formatTreeMenuItem, generatePath, getAccessToken, getAllChildrenNodesToDelete, getApiAccessScope, getApiMethodIdByPath, getAuthorizeUrl, getBaseMethod, getCommonEntityName, getDisplayDetails, getDisplayName, getEntityAttributes, getFieldValuesForProperties, getFullyQualifiedName, getGridState, getHeaderTitle, getI18nInstance, getIconFromName, getLazyLoadChildrenArr, getLoginRequest, getMenuItemsRecursively, getMergedConfig, getNodeIdForRightBorder, getOrderedDynamicGroups, getOutlookRedirectUri, getOutlookStatus, getPathObject, getPathParametersObj, getPrimaryKeyValues, getPropertiesForFieldValues, getPropertyMappingList, getPropertyMappingObj, getRatio, getRouteRolesMapAndMenuActiveMap, getSanitizedName, getSearchIdentifiers, getSearchObject, getSearchValueString, getSignInAuthProvider, getStatus, getStoredExternalPath, getStoredPath, getStoredTenant, getSuccessAction, getTokenRequest, getUnityIconFromName, greyScale, handleResponseErrors, initSignInAuthProvider, initializeUnityI18n, isOutlookConnected, loginRedirect, makeDynamicGroupStructures, makeDynamicTreeStructure, makeTreeStaticGroupStructure, makeTreeStructure, mapNodeGroupChildren, mapNodeObjValuesToSearchParameters, mapRule, mapRuleData, matchPath, onFirstDataRendered, parseSearchParamsIntoFilterObjects, pluralize, processCatalogObjectKeysInOrder, processItemForDynamicNodeGroups, processItemForStaticNodeGroup, processObjIndex, processObjectToTree, processOrderedTreeData, processReferences, productCategoryColors, refreshOutlookStatus, removeWhiteSpace, resetOutlookStatus, saveGridState, searchForMatchingNode, searchTree, sendMail, setOutlookDisconnected, storeCurrentPath, storeExternalPath, storeInitialPath, storeInitialTenant, storePath, storeRedirectPath, storeTenant, subscribeOutlookStatus, toLowerFirstChar, toTitleCase, toUpperFirstChar, toUtcDate, toggleHeader, transformMenuPageTree, trimStringAfter, unityIcons, updateTreeIds, useAccessToken, useActionState, useActions, useAgGridApi, useAllTeleporters, useApiCatalog, useAuthedUser, useAxiosGet, useAxiosGetQuery, useAxiosMutate, useCatalogStore, useControlZoom, useConvertFilterModelToSearchFilters, useCrudActions, useCurrentPageReturnTo, useDateLocale, useDefaultFormValues, useDynamicListCalculation, useExport, useField, useFieldChangeListener, useFluentIcon, useForm, useFormState, useGridClear, useGridFormat, useHandleAction, useHandleAxiosSnackbar, useHistory, useIsAuthed, useIsUnityAuthenticated, useItemSubCard, useLocation, useLoginAction, useLogoutAction, useLookupsStore, useMenuContext, useNoticeUpdate, useOutlook, usePageContext, useParams, usePosition, useProductVersion, useProductsStore, usePromotedLookupMethods, usePromotedMethodEntity, useQueryExecutors, useQuickFilter, useRouteMatch, useScreenControl, useSearchFilterParamsMap, useServerSideDatasource, useSetInitialShellVisibility, useSetLocationState, useShellStore, useSingleLogout, useStyles, useSystemColor, useTenant, useTenantStore, useTheme, useTypeScale, useUdpExport, useUdpWebSocket, useUser, useUserActions, useWorkflowStore, verticalPrimary, verticalSecondary, whitelistedPaths, withRouter };
|
|
527
|
+
export { ADUserTypeEnums, Accordion, AccountFlags, ActionContext, ActionDispatchContext, ActionForm, ActionModal, ActionPanelPlacement, ActionProvider, ActionSideSheet, ActionSpeedDial, ActionSplitScreen, ActionSummaryCard, ActionSummaryHeader, ActionSummaryListContainer, ActionSummaryListItem, ActionSummaryPopover, ActionWrapper, ActionsRenderer, AddUser, AddressListItem, Adornment, AgTable, AgTableButtons, AlertContainer, AlertFlag, AmChart, AmbientAlert, AmbientAutoComplete, AmbientCard, AmbientCardButton, AmbientCardTitle, AmbientDateRangeSelector, AmbientGridTemplate, AmbientList, AmbientListItem, AmbientPopoverMenuItem, AmbientProjectSwitcher, AmbientSingleDateSelector, AmbientSplitStatCard, AmbientStepper, AmbientSummaryListHeader, AmbientTextField, AmbientToast, AmbientToggleButton, AmbientToggleButtonGroup, AmbientTokenButton, AmbientVisualizationCard, AmbientVisualizer, ApiMethodInstanceUdpGrid, AppMenu, AppMenuItem, AppMenuItemComponent, ApprovalIcon, Attachments, AuthProvider, AuthProviderWrapper, AutoCompletePropertyWidget_exports as AutoCompletePropertyWidget, AvatarAlphabet, BackwardsCompatibleGrid, BarChartWidget_exports as BarChartWidget, BaseSideSheet, BioCard, Block, BooleanPropertyWidget_exports as BooleanPropertyWidget, Box, BreadCrumbMenu, BubbleWidget_exports as BubbleWidget, CardList, CardinalityTypeEnums, ChatContainer, ChatMessage, CheckboxGroup, CheckboxList, ChipAlphabet, CircleGaugeWidget, CircularProgress, CkRichEditor, ClickOpenEnums, ClientSideUdpGrid, ColorKey, CompactCard, CompactDataList, CompactDataListItem, ConfigService, ContainerTypeEnums, ContentContainer, Controls, CoreLayoutFloorplan, CrudForm, CustomMenuPage, DateField, DatePropertyWidget_exports as DatePropertyWidget, DateTimeField, DateTimePropertyWidget_exports as DateTimePropertyWidget, DateTrendWidget_exports as DateTrendWidget, DensePlotWidget_exports as DensePlotWidget, DeviceTypeEnums, DiffChecker, Directory, DirectoryListItem, Divider, DonutChartWidget_exports as DonutChartWidget, DragDropFileUpload, DraggableSidebarTemplate, DynamicContainerWithMenu, EMPTY_GUID, Ellipse, EmptyStateDisplay, EntityAttributeEnums, EntityHeader, ExecuteApiDialog, ExpandRenderer, ExportSidesheet, ExtenderToggle, Field, FieldArrayCard, FieldType, FileUpload, FileViewer, FilterOperators, FilterSearch, FlagBlock, FloatPropertyWidget_exports as FloatPropertyWidget, FluentActivity, FluentActivityRow, FluentButton, FluentCard, FluentCardActions, FluentCardContent, FluentCardHeader, FluentCardText, FluentCheckbox, FluentColorPicker, FluentCompoundButton, FluentDataTable, FluentDatePicker, FluentDateTimePicker, FluentDialog, FluentIcon, FluentIconButton, FluentImageMap, FluentLink, FluentListElement, FluentListItem, FluentMap, FluentMenuListButton, FluentMenuListItem, FluentProfileMenuCard, FluentRadio, FluentRadioGroup, FluentScrollLoadAutocompleteMenu, FluentSearchField, FluentSelectGroupMenu, FluentSelectMenu, FluentSideNav, FluentSimpleSelect, FluentSimpleTab, FluentSimpleTabs, FluentTabPanel, FluentTabUtility, FluentTagField, FluentTagFieldComponent, FluentTextField, FluentTextFieldAutoComplete, FluentTextFieldComponent, FluentTimePicker, FluentTimeline, FluentToggle, FluentUploadButton, FluentUploadIconButton, Form, FormButtons, FormControl, FormControlLabel, FormError, FormHeader, FormSpy, FormSubHeader, FullScreenControl, GaugeWidget, GeoMap, GraphCard, Grid, GridActionBar, GridEnums, GridExcelStyleEnums, GridGroup, GridGroupingHeader, GridGroupingSidebar, GridRow, GridSidebarContainer, GridStateTypeEnums, GridUnit, HeaderExpander, HeaderLayout, HttpStatusCode, IconButtonWithTooltip, IconKey, IconRenderer, IframeContainer, ImageLayer, ImportDataFromFileMapping, IndicatorChip, InfoCard, InputAdornment, InputFieldType, Inquiry, InquiryAdvancedSearch, InquiryAdvancedSearchForm, InquiryContainer, InquiryDashboard, InquiryHeaderControl, InquiryHeaderControlTarget, InquiryHeaderSecondary, InquiryHeaderSecondaryAlert, InquiryHeaderSecondaryAlertTarget, InquiryHeaderSecondaryTarget, InquiryHeaderTitle, InquiryHeaderTitleTarget, InquiryNodeControls, InquirySearchContainer, InquirySearchDatasource, InquirySearchTable, InquiryTreeMenu, InquiryTreeMenuItem, InquiryWrapper, InsightRenderer, IntegerPropertyWidget_exports as IntegerPropertyWidget, ItemDescription, ItemsWidgetCard, JobStatusIdMapping, JobTypeIdMapping, KeyValueTextField, Layers, LayoutUnit, LicenseKey, LineAndSparklinesWidget_exports as LineAndSparklinesWidget, LineGraphWidget_exports as LineGraphWidget, LinearProgress, Link, ListCard, ListElement, ListSearch, LoadingIndicator, LogicalSearchOperatorEnums, LoginForm, LookupTypeEnums, LookupTypeIdEnums, MAX_FILE_SIZE_MB, Map, MapFilterBar, MapLayout, MapSheet, MenuItemEnums, MenuLoader, MenuProvider, MenuTypeEnums, MttMainTimeline, MttSummary, MttTimeline, MultilineTextPropertyWidget_exports as MultilineTextPropertyWidget, MyExportsPage, NavLink, NestParent, NestWrapper, NestedGrid, NewsCard, NodeActionEnums, NodeActionTriggerEnums, NodeColumnHeader, NodeDetails, NodeGroupOutlierEnums, NodeGroupTypeEnums, NodeList, NodeLoader, Note, Notes, NotesScreen, NotificationElement, NumericPropertyWidget_exports as NumericPropertyWidget, OpenPage, OutlookCallback, OutlookIntegrationBanner, OutlookIntegrationCallbackPage, OutlookIntegrationSideSheet, PAHAdditionalRightComponent, PAHAdditionalTitleComponent, PAHExport, PDFViewer, Page, PageContainer, PageContent, PageForbiddenRoute, PageHeader, PageLoading, PageNotFoundRoute, PageRenderer, PageSectionHeader, PageSectionSpacer, PageStatus, PageSubHeaderAction, PageSubHeaderActionsTarget, PanelPositionEnums, ParamsMappingForm, PasswordResetRedirect, PaymentForm, PaymentMethodTypeEnum, PaymentReversalForm, PaymentTenderTypeEnum, PaymentVendorFactoryEnum, PopoverCard, PowerBIReport, PrimaryActionButton, PrimaryActionHeader, PrivateRoute, ProductEnums, ProductNameEnums, ProgressBarWidget_exports as ProgressBarWidget, Prompt, PropertyField, PropertyFields, PropertyTypeEnum, PublicRoute, QuickViewCard, RecentlyLoadedNodesTable, RecentlyLoadedNodesWidget_exports as RecentlyLoadedNodesWidget, Redirect, RejectIcon, RemindersScreen, RemindersWidget_exports as RemindersWidget, RequiredFieldsMappingForm, RoleIdEnums, RoleNameEnums, RoleTypeEnums, Route, SapFlexibleTemplate, SearchGroupingType, SearchMethodUdpGrid, SearchOperators, SearchServiceDatasource, SearchSortDirection, SearchValueType, SelectGroupMenu, SelectPropertyWidget_exports as SelectPropertyWidget, ServerSideUdpGrid, SeverityTypeEnums, Shell, ShellDropdown, SideBarTemplate, SideSheet, SideSheetHeader, SiteHeaderRightComponent, SiteHeaderRightComponentTarget, SparklineWidget_exports as SparklineWidget, SparsePlotWidget_exports as SparsePlotWidget, SplitScreenTypeEnums, StandardTitle, Statistic, StatusCellRenderer, StatusChip, StatusLineItem, Sticky, StylizedTitle, SubHeaderAction, SubHeaderActionsTarget, SubmitButton, SummaryBlock, SupportCaseSideSheet, SvgIcon, Switch, TableColumnDefs, TableContainer, TeleportSource, TenantTypeEnums, TestFullStencilPage, TestStencilWrappedComponentsPage, TextPropertyWidget_exports as TextPropertyWidget, ThemeProvider, TicketCard, TileDisplay, TileLayer, TimeField, TimeLine, TimePropertyWidget_exports as TimePropertyWidget, TimelineCalendar, TimelinePreloaderNode, ToggleSection, Token, TokenGroupItem, ToolBarButton, TransactionActionTypeEnums, TransactionAttachmentPdfStitcher, TransactionEventTypeEnums, TransactionUiActionTypeEnums, TreeViewModeEnums, TrimForAvatar, Typography, UdpAccordion, UdpAdvancedSearchBuilder, UdpAppProvider, UdpAutocomplete, UdpAvatar, UdpBadge, UdpBarChart, UdpButton, UdpCalendar, UdpCalendarDayView, UdpCalendarMonthView, UdpCalendarWeekView, UdpCalendarYearView, UdpCard, UdpCheckbox, UdpChip, UdpCompoundButton, UdpContainerQuery, UdpContainerQueryGrid, UdpCounterBadge, UdpCrudFormFields, UdpDateInput, UdpDatePicker, UdpDateRangeSelector, UdpDateSelector, UdpDateTimeInput, UdpDetailList, UdpDetailListItem, UdpDialog, UdpDivider, UdpDonutChart, UdpDrawer, UdpDropdown, UdpDurationInput, UdpEnums, UdpFlexbox, UdpFormRenderer, UdpFormsBuilderPage, UdpFormsListPage, UdpFormsSubmissionGrid, UdpFormsSubmissionGridManagerPage, UdpFormsSubmissionGridResponderPage, UdpGridTemplate, UdpIcon, UdpIconButton, UdpIconGrid, UdpImage, UdpKeywordEnums, UdpKpiCard, UdpKpiCards, UdpLineChart, UdpLink, UdpList, UdpListItem, UdpMaintenanceConfigPage, UdpMaintenanceEnginePage, UdpMap, UdpMapComponent, UdpMapToolbar, UdpMenu, UdpMessageBar, UdpPageEnums, UdpPages, UdpPagesLazy, UdpPagesLoaders, UdpPopover, UdpPrimaryActionHeader, UdpPrivateForm, UdpProgressBar, UdpPublicForm, UdpRadioGroup, UdpReminderFiledForType, UdpRoutes, UdpSearchEnums, UdpSearchInput, UdpSlider, UdpSpinner, UdpStepper, UdpSwatchPicker, UdpSwitch, UdpTabPanel, UdpTabUtility, UdpTablist, UdpTabs, UdpText, UdpTextInput, UdpTextarea, UdpTimeInput, UdpTimeSelector, UdpTimeline, UdpTimelineConnector, UdpTimelineContent, UdpTimelineDot, UdpTimelineItem, UdpTimelineSeparator, UdpToggleButton, UdpTooltip, UdpTransactionActionEnums, UdpTransactionEmailForm, UdpTransactionTypesPage, UdpTransactionsPage, UdpTree, UdpTreeContext, UdpTreeItem, UdpVerticalSpacer, UnityFluentIcon, UnityIcon, UnityProducts, User, UserContext, UserDispatchContext, UserForm, UserFormFields, UtilityBar, UtilityBarInport, UtilityBarInportTarget, UtilityTabHeader, VectorLayer, VerticalEnums, VisibilityTypeEnums, WidgetCard, WorkOrderCard, WorkflowContainer, ZoomControl, acquireAccessToken, allowedExtensions, apiMutate, apiResponseArrayToOptions, arrayMutators, camelToPascalCaseWithSpace, checkAndAuthenticate, checkNodeIsHidden, clearGridState, clearStoredExternalPath, clearStoredPath, clearStoredTenant, collapseAllNodes, colors, constructBusinessObjectArrFromTree, constructDynamicNodeGroups, constructDynamicNodeGroups2, constructPreloadedTree, constructStaticNodeGroups, corporateColors, corporateColorsHint, createTimeline, createUser, createUserFromUserObject, csvStrToArray, csvStrToArrayOfObjects, defaultColumnActionsDef, deleteGridState, deleteNode, deleteNodeAndChildren, disconnect, ensureOutlookStatusLoaded, evaluateRule, exchangeAuthorizationCode, executeQueryAdHoc, executeQueryInstance, executeQueryInstanceWithApiMethodInstance, executeQueryWithParameters, expandAllNodes, findAllParentIds, findHomeRouteSlug, findLastNode, findNodeById, findNodeByIdAndLabel, findNodesByIdAndLabel, findTermByType, fluentLibraryIcons, formatBytes, mttFunctions_exports as formatDataWithTimelineCategoryNameOrderedByDate, formatDateToLocaleString, formatTreeLabel, formatTreeMenuItem, generatePath, getAccessToken, getAllChildrenNodesToDelete, getApiAccessScope, getApiMethodIdByPath, getAuthorizeUrl, getBaseMethod, getCommonEntityName, getDisplayDetails, getDisplayName, getEntityAttributes, getFieldValuesForProperties, getFullyQualifiedName, getGridState, getHeaderTitle, getI18nInstance, getIconFromName, getLazyLoadChildrenArr, getLoginRequest, getMenuItemsRecursively, getMergedConfig, getNodeIdForRightBorder, getOrderedDynamicGroups, getOutlookRedirectUri, getOutlookStatus, getPathObject, getPathParametersObj, getPrimaryKeyValues, getPropertiesForFieldValues, getPropertyMappingList, getPropertyMappingObj, getRatio, getRouteRolesMapAndMenuActiveMap, getSanitizedName, getSearchIdentifiers, getSearchObject, getSearchValueString, getSignInAuthProvider, getStatus, getStoredExternalPath, getStoredPath, getStoredTenant, getSuccessAction, getTokenRequest, getUnityIconFromName, greyScale, handleResponseErrors, initSignInAuthProvider, initializeUnityI18n, isOutlookConnected, loginRedirect, makeDynamicGroupStructures, makeDynamicTreeStructure, makeTreeStaticGroupStructure, makeTreeStructure, mapNodeGroupChildren, mapNodeObjValuesToSearchParameters, mapRule, mapRuleData, matchPath, onFirstDataRendered, parseSearchParamsIntoFilterObjects, pluralize, processCatalogObjectKeysInOrder, processItemForDynamicNodeGroups, processItemForStaticNodeGroup, processObjIndex, processObjectToTree, processOrderedTreeData, processReferences, productCategoryColors, refreshOutlookStatus, removeWhiteSpace, resetOutlookStatus, saveGridState, searchForMatchingNode, searchTree, sendMail, setOutlookDisconnected, storeCurrentPath, storeExternalPath, storeInitialPath, storeInitialTenant, storePath, storeRedirectPath, storeTenant, subscribeOutlookStatus, toLowerFirstChar, toTitleCase, toUpperFirstChar, toUtcDate, toggleHeader, transformMenuPageTree, trimStringAfter, unityIcons, updateTreeIds, useAccessToken, useActionState, useActions, useAgGridApi, useAllTeleporters, useApiCatalog, useAuthedUser, useAxiosGet, useAxiosGetQuery, useAxiosMutate, useCatalogStore, useControlZoom, useConvertFilterModelToSearchFilters, useCrudActions, useCurrentPageReturnTo, useDateLocale, useDefaultFormValues, useDynamicListCalculation, useExport, useField, useFieldChangeListener, useFluentIcon, useForm, useFormState, useGridClear, useGridFormat, useHandleAction, useHandleAxiosSnackbar, useHistory, useIsAuthed, useIsUnityAuthenticated, useItemSubCard, useLocation, useLoginAction, useLogoutAction, useLookupsStore, useMenuContext, useNoticeUpdate, useOutlook, usePageContext, useParams, usePosition, useProductVersion, useProductsStore, usePromotedLookupMethods, usePromotedMethodEntity, useQueryExecutors, useQuickFilter, useRouteMatch, useScreenControl, useSearchFilterParamsMap, useServerSideDatasource, useSetInitialShellVisibility, useSetLocationState, useShellStore, useSingleLogout, useStyles, useSystemColor, useTenant, useTenantStore, useTheme, useTypeScale, useUdpExport, useUdpWebSocket, useUser, useUserActions, useWorkflowStore, verticalPrimary, verticalSecondary, whitelistedPaths, withRouter };
|
|
@@ -91,7 +91,7 @@ const MenuPage = (props) => {
|
|
|
91
91
|
const [hasUnsavedChanges, setHasUnsavedChanges] = useState(false);
|
|
92
92
|
const { setSubHeaderActionHasChildren, setNavigationExpanded } = useShellStore();
|
|
93
93
|
const innerMenuId = location.pathname.replace("/menupage/", "");
|
|
94
|
-
const [{ data: fetchedInnerMenu, loading: menuLoading }] = useAxiosGet(ConfigService.tenantV1ApiUrl, `menus/${innerMenuId}`, EMPTY_HEADERS, !innerMenuId, false);
|
|
94
|
+
const [{ data: fetchedInnerMenu, loading: menuLoading }] = useAxiosGet(ConfigService.tenantV1ApiUrl, `menus/${innerMenuId}`, EMPTY_HEADERS, !innerMenuId || innerMenuOverride, false);
|
|
95
95
|
const innerMenu = innerMenuOverride ?? fetchedInnerMenu;
|
|
96
96
|
const menuItemsList = useMemo(() => {
|
|
97
97
|
if (!innerMenu) return [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuPage.mjs","names":[],"sources":["../../src/menuPage/MenuPage.jsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useHistory, useLocation, Prompt } from 'react-router-dom';\nimport { useAxiosGet } from '../utilities/useAxiosGet';\nimport { UtilitySideBar } from '../UI/utilityDisplay/UtilitySideBar';\nimport { makeStyles } from '@material-ui/core';\nimport { PageContainer } from '../page/PageContainer';\nimport { transformMenuPageTree } from '../utilities/tree/TreeUtilities';\nimport { BaseTreeMenu } from '../treeMenu/BaseTreeMenu';\nimport { TreeViewModeEnums } from '../enums/unitySystemEnums';\nimport { DndProvider } from 'react-dnd';\nimport { HTML5Backend } from 'react-dnd-html5-backend';\nimport { useUser } from '../utilities/auth/useUser';\nimport { useShellStore } from '../stores/shellStore';\nimport { NodeLoader } from '../UI/feedback/NodeLoader';\nimport {\n APP_RIBBON_SPACE,\n useBuildEnvironment\n} from '../shell/ui/useBuildEnvironment';\nimport { useSetLocationState } from '../hooks/useSetLocationState';\nimport { useTranslation } from 'react-i18next';\nimport { ConfigService } from '../configService';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n flex: 1,\n height: '100%',\n minHeight: 0,\n display: 'grid',\n gridTemplateAreas: ['sidebar content'].map((line) => `\"${line}\"`).join(' '),\n gridTemplateColumns: 'auto 1fr',\n gridTemplateRows: 'auto 1fr'\n },\n sidebar: {\n gridArea: 'sidebar',\n marginRight: theme.spacing(1),\n display: 'flex',\n flexDirection: 'column',\n minHeight: 0\n },\n content: {\n gridArea: 'content',\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n zIndex: 1,\n height: `100%`,\n minHeight: 0,\n overflowY: 'auto'\n },\n menuContent: {\n marginTop: theme.spacing(1),\n flex: 1,\n minHeight: 0,\n overflowX: 'hidden',\n overflowY: 'auto'\n },\n loader: {\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(1)\n },\n loadingContent: {\n flex: 1,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center'\n }\n}));\n\n// Define a stable constant for empty headers to prevent useEffect loops\nconst EMPTY_HEADERS = {};\n\n// Helper to find a node deep in the tree (Moved outside to ensure stability)\nconst findNodeById = (nodes, id) => {\n if (!nodes || !id) return null;\n for (const node of nodes) {\n if (String(node.id) === String(id)) return node;\n if (node.children) {\n const found = findNodeById(node.children, id);\n if (found) return found;\n }\n }\n return null;\n};\n\nconst MenuPage = (props) => {\n const buildEnv = useBuildEnvironment();\n const classes = useStyles({\n ...props,\n appRibbonSpace: buildEnv ? APP_RIBBON_SPACE : 0\n });\n const history = useHistory();\n const location = useLocation();\n const user = useUser();\n const { t } = useTranslation();\n const setLocationState = useSetLocationState();\n\n const {\n innerMenuOverride,\n mainContent,\n menuTitle,\n allowMissingPageParam = false,\n searchParamsTransformer\n } = props;\n\n // --- STATE ---\n const [sidebarExpanded, setSidebarExpanded] = useState(true);\n const [hasUnsavedChanges, setHasUnsavedChanges] = useState(false);\n const { setSubHeaderActionHasChildren, setNavigationExpanded } =\n useShellStore();\n\n // --- DATA FETCHING ---\n const innerMenuId = location.pathname.replace('/menupage/', '');\n\n const [{ data: fetchedInnerMenu, loading: menuLoading }] = useAxiosGet(\n ConfigService.tenantV1ApiUrl,\n `menus/${innerMenuId}`,\n EMPTY_HEADERS,\n !innerMenuId,\n false\n );\n\n const innerMenu = innerMenuOverride ?? fetchedInnerMenu;\n\n // --- MEMOIZED DATA ---\n const menuItemsList = useMemo(() => {\n if (!innerMenu) return [];\n\n return (\n innerMenu.menuItemInstanceStructureViews?.reduce((acc, menuInstance) => {\n const updatedMenu = transformMenuPageTree(menuInstance);\n if (updatedMenu) acc.push(updatedMenu);\n return acc;\n }, []) ?? []\n );\n }, [innerMenu]);\n\n // --- CORE REFACTOR: DERIVE SELECTED NODE ---\n const pageId = new URLSearchParams(location.search).get('page');\n\n const selectedNode = useMemo(() => {\n if (!menuItemsList.length) return null;\n\n // 1. Try to find the node requested in URL\n const found = findNodeById(menuItemsList, pageId);\n if (found) return found;\n\n // 2. Default to first item\n // Even if allowMissingPageParam is true, we still want to RETURN the node for rendering,\n // we just don't want the Redirector useEffect to force it into the URL.\n return menuItemsList[0];\n }, [menuItemsList, pageId]);\n\n // Fetch Page Data based on the derived node\n const [{ data: pageData, loading: pageLoading }] = useAxiosGet(\n ConfigService.tenantV1ApiUrl,\n `page/${selectedNode?.properties?.page?.id}`,\n EMPTY_HEADERS,\n !selectedNode?.properties?.page?.id,\n false\n );\n\n // --- ACTIONS ---\n\n const buildSearchString = useCallback(\n (params, node, menuIndex) => {\n if (typeof searchParamsTransformer === 'function') {\n const result = searchParamsTransformer({\n searchParams: params,\n node,\n menuIndex,\n location\n });\n if (result === null) return '';\n if (result instanceof URLSearchParams) return result.toString();\n if (typeof result === 'string') return result;\n if (result !== undefined) return String(result);\n }\n return params.toString();\n },\n [location, searchParamsTransformer]\n );\n\n const handleSelectedNode = useCallback(\n (node, menuIndex) => {\n // 1. Check if we are \"selecting\" the current node to clear query params if needed\n if (allowMissingPageParam) {\n const firstNode = menuItemsList?.[0];\n if (firstNode && String(node?.id) === String(firstNode.id)) {\n if (location.search) {\n history.replace({ pathname: location.pathname, search: '' });\n }\n setHasUnsavedChanges(false);\n return;\n }\n }\n\n // 2. Build URL\n const searchParams = new URLSearchParams(location.search);\n searchParams.set('page', node.id);\n const searchString = buildSearchString(searchParams, node, menuIndex);\n\n // 3. Navigate (The URL change will trigger the re-render & selectedNode update)\n history.push({\n pathname: location.pathname,\n search: searchString\n });\n\n // Note: We don't set 'selectedNode' manually anymore. It is derived.\n },\n [history, location, allowMissingPageParam, menuItemsList, buildSearchString]\n );\n\n const handleSidebarExpandClick = useCallback(() => {\n setSidebarExpanded((expanded) => !expanded);\n }, []);\n\n const handleDropNode = useCallback(() => {\n // TODO: Implement if we need to for next Phase\n }, []);\n\n // --- EFFECTS ---\n\n // 1. URL SYNCHRONIZATION (The \"Redirector\")\n // Ensures URL matches the selected node (e.g. on initial load or default selection)\n useEffect(() => {\n if (selectedNode && !allowMissingPageParam) {\n const currentUrlId = new URLSearchParams(location.search).get('page');\n\n if (String(selectedNode.id) !== String(currentUrlId)) {\n const newParams = new URLSearchParams(location.search);\n newParams.set('page', selectedNode.id);\n\n history.replace({\n pathname: location.pathname,\n search: newParams.toString()\n });\n }\n }\n }, [selectedNode?.id, location.search, history, allowMissingPageParam]);\n\n // 2. UI CLEANUP (The \"Reactor\")\n // Runs only when the ACTUAL selected ID changes to reset UI state\n useEffect(() => {\n if (selectedNode?.id) {\n setNavigationExpanded(false);\n setHasUnsavedChanges(false);\n setSubHeaderActionHasChildren(false);\n }\n }, [selectedNode?.id, setNavigationExpanded, setSubHeaderActionHasChildren]);\n\n // 3. BREADCRUMB / LABEL SYNC\n useEffect(() => {\n if (innerMenu && location.state?.label !== t(innerMenu?.name)) {\n setLocationState({ label: t(innerMenu?.name) });\n }\n }, [setLocationState, t, innerMenu, location.state?.label]);\n\n // --- RENDER ---\n return (\n <DndProvider backend={HTML5Backend}>\n <Prompt\n when={hasUnsavedChanges}\n message='You have unsaved changes. Are you sure you want to leave this page?'\n />\n <div className={classes.root}>\n <div className={classes.sidebar}>\n <UtilitySideBar\n title={innerMenu?.name || menuTitle}\n isUsingChildren={true}\n resizable={true}\n removePadding={true}\n removeTopLayoutUnit={true}\n onUtilitySidebarToggleExpandClick={handleSidebarExpandClick}\n collapsedWidth={64}\n >\n <div className={classes.menuContent} key={innerMenuId}>\n {menuItemsList?.length > 0 &&\n !menuLoading &&\n menuItemsList.map((menuItems, index) => (\n <div key={menuItems.id} className={classes.nodeContainer}>\n <BaseTreeMenu\n menuItems={menuItems}\n onSelectNode={handleSelectedNode}\n onDropNode={handleDropNode}\n menuIndex={index}\n selectedNodeId={selectedNode?.id}\n selectedNodeParentId={selectedNode?.parentId}\n sidebarExpanded={sidebarExpanded}\n treeViewMode={TreeViewModeEnums.Classic}\n />\n </div>\n ))}\n {menuLoading && (\n <div className={classes.loader}>\n <NodeLoader loading={menuLoading} />\n </div>\n )}\n </div>\n </UtilitySideBar>\n </div>\n <div className={classes.content}>\n {mainContent\n ? typeof mainContent === 'function'\n ? mainContent({ selectedNode, menuItemsList })\n : mainContent\n : selectedNode?.properties?.page?.id && (\n <PageContainer\n user={user}\n key={selectedNode?.id}\n pageData={pageData}\n pageLoading={pageLoading}\n widgetParams={{\n pageId: pageData?.pageId,\n entityName:\n selectedNode?.properties?.page?.entity?.entityName,\n pbiReportCode:\n selectedNode?.properties?.page?.pbiReportCode,\n requiredFieldsMap:\n selectedNode?.properties?.page?.requiredFieldMapping,\n udpTagId: selectedNode?.properties?.page?.udpTagId,\n queryId: selectedNode?.properties?.page?.queryId,\n inquiryTreeId:\n selectedNode?.properties?.page?.inquiryTreeId,\n setHasUnsavedChanges: setHasUnsavedChanges\n }}\n disableMargins={true}\n fromMenu={true}\n />\n )}\n </div>\n </div>\n </DndProvider>\n );\n};\n\nexport default MenuPage;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAsBA,MAAM,YAAY,YAAY,WAAW;CACvC,MAAM;EACJ,MAAM;EACN,QAAQ;EACR,WAAW;EACX,SAAS;EACT,mBAAmB,CAAC,kBAAkB,CAAC,KAAK,SAAS,IAAI,KAAK,GAAG,CAAC,KAAK,IAAI;EAC3E,qBAAqB;EACrB,kBAAkB;EACnB;CACD,SAAS;EACP,UAAU;EACV,aAAa,MAAM,QAAQ,EAAE;EAC7B,SAAS;EACT,eAAe;EACf,WAAW;EACZ;CACD,SAAS;EACP,UAAU;EACV,SAAS;EACT,eAAe;EACf,UAAU;EACV,QAAQ;EACR,QAAQ;EACR,WAAW;EACX,WAAW;EACZ;CACD,aAAa;EACX,WAAW,MAAM,QAAQ,EAAE;EAC3B,MAAM;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACZ;CACD,QAAQ;EACN,aAAa,MAAM,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AiB;EACjB,WAAW;EACX,eAAe;EACf,qBAAqB;EACrB,mCAAmC;EACnC,gBAAgB;EAyBD,EAvBf,sBAAA,cAAC,OAAD;EAAK,WAAW,QAAQ;EAAa,KAAK;EAsBpC,EArBH,eAAe,SAAS,KACvB,CAAC,eACD,cAAc,KAAK,WAAW,UAC5B,sBAAA,cAAC,OAAD;EAAK,KAAK,UAAU;EAAI,WAAW,QAAQ;EAWrC,EAVJ,sBAAA,cAAC,cAAD;EACa;EACX,cAAc;EACd,YAAY;EACZ,WAAW;EACX,gBAAgB,cAAc;EAC9B,sBAAsB,cAAc;EACnB;EACjB,cAAc,kBAAkB;EAChC,CAAA,CACE,CACN,EACH,eACC,sBAAA,cAAC,OAAD,EAAK,WAAW,QAAQ,QAElB,EADJ,sBAAA,cAAC,YAAD,EAAY,SAAS,aAAe,CAAA,CAChC,CAEJ,CACS,CACb,EACN,sBAAA,cAAC,OAAD,EAAK,WAAW,QAAQ,SA6BlB,EA5BH,cACG,OAAO,gBAAgB,aACrB,YAAY;EAAE;EAAc;EAAe,CAAC,GAC5C,cACF,cAAc,YAAY,MAAM,MAC9B,sBAAA,cAAC,eAAD;EACQ;EACN,KAAK,cAAc;EACT;EACG;EACb,cAAc;GACZ,QAAQ,UAAU;GAClB,YACE,cAAc,YAAY,MAAM,QAAQ;GAC1C,eACE,cAAc,YAAY,MAAM;GAClC,mBACE,cAAc,YAAY,MAAM;GAClC,UAAU,cAAc,YAAY,MAAM;GAC1C,SAAS,cAAc,YAAY,MAAM;GACzC,eACE,cAAc,YAAY,MAAM;GACZ;GACvB;EACD,gBAAgB;EAChB,UAAU;EACV,CAAA,CAEJ,CACF,CACM"}
|
|
1
|
+
{"version":3,"file":"MenuPage.mjs","names":[],"sources":["../../src/menuPage/MenuPage.jsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useHistory, useLocation, Prompt } from 'react-router-dom';\nimport { useAxiosGet } from '../utilities/useAxiosGet';\nimport { UtilitySideBar } from '../UI/utilityDisplay/UtilitySideBar';\nimport { makeStyles } from '@material-ui/core';\nimport { PageContainer } from '../page/PageContainer';\nimport { transformMenuPageTree } from '../utilities/tree/TreeUtilities';\nimport { BaseTreeMenu } from '../treeMenu/BaseTreeMenu';\nimport { TreeViewModeEnums } from '../enums/unitySystemEnums';\nimport { DndProvider } from 'react-dnd';\nimport { HTML5Backend } from 'react-dnd-html5-backend';\nimport { useUser } from '../utilities/auth/useUser';\nimport { useShellStore } from '../stores/shellStore';\nimport { NodeLoader } from '../UI/feedback/NodeLoader';\nimport {\n APP_RIBBON_SPACE,\n useBuildEnvironment\n} from '../shell/ui/useBuildEnvironment';\nimport { useSetLocationState } from '../hooks/useSetLocationState';\nimport { useTranslation } from 'react-i18next';\nimport { ConfigService } from '../configService';\n\nconst useStyles = makeStyles((theme) => ({\n root: {\n flex: 1,\n height: '100%',\n minHeight: 0,\n display: 'grid',\n gridTemplateAreas: ['sidebar content'].map((line) => `\"${line}\"`).join(' '),\n gridTemplateColumns: 'auto 1fr',\n gridTemplateRows: 'auto 1fr'\n },\n sidebar: {\n gridArea: 'sidebar',\n marginRight: theme.spacing(1),\n display: 'flex',\n flexDirection: 'column',\n minHeight: 0\n },\n content: {\n gridArea: 'content',\n display: 'flex',\n flexDirection: 'column',\n position: 'relative',\n zIndex: 1,\n height: `100%`,\n minHeight: 0,\n overflowY: 'auto'\n },\n menuContent: {\n marginTop: theme.spacing(1),\n flex: 1,\n minHeight: 0,\n overflowX: 'hidden',\n overflowY: 'auto'\n },\n loader: {\n marginRight: theme.spacing(1),\n marginLeft: theme.spacing(1)\n },\n loadingContent: {\n flex: 1,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center'\n }\n}));\n\n// Define a stable constant for empty headers to prevent useEffect loops\nconst EMPTY_HEADERS = {};\n\n// Helper to find a node deep in the tree (Moved outside to ensure stability)\nconst findNodeById = (nodes, id) => {\n if (!nodes || !id) return null;\n for (const node of nodes) {\n if (String(node.id) === String(id)) return node;\n if (node.children) {\n const found = findNodeById(node.children, id);\n if (found) return found;\n }\n }\n return null;\n};\n\nconst MenuPage = (props) => {\n const buildEnv = useBuildEnvironment();\n const classes = useStyles({\n ...props,\n appRibbonSpace: buildEnv ? APP_RIBBON_SPACE : 0\n });\n const history = useHistory();\n const location = useLocation();\n const user = useUser();\n const { t } = useTranslation();\n const setLocationState = useSetLocationState();\n\n const {\n innerMenuOverride,\n mainContent,\n menuTitle,\n allowMissingPageParam = false,\n searchParamsTransformer\n } = props;\n\n // --- STATE ---\n const [sidebarExpanded, setSidebarExpanded] = useState(true);\n const [hasUnsavedChanges, setHasUnsavedChanges] = useState(false);\n const { setSubHeaderActionHasChildren, setNavigationExpanded } =\n useShellStore();\n\n // --- DATA FETCHING ---\n const innerMenuId = location.pathname.replace('/menupage/', '');\n\n const [{ data: fetchedInnerMenu, loading: menuLoading }] = useAxiosGet(\n ConfigService.tenantV1ApiUrl,\n `menus/${innerMenuId}`,\n EMPTY_HEADERS,\n !innerMenuId || innerMenuOverride, //If no innerMenuId or an override dont make api call\n false\n );\n\n const innerMenu = innerMenuOverride ?? fetchedInnerMenu;\n\n // --- MEMOIZED DATA ---\n const menuItemsList = useMemo(() => {\n if (!innerMenu) return [];\n\n return (\n innerMenu.menuItemInstanceStructureViews?.reduce((acc, menuInstance) => {\n const updatedMenu = transformMenuPageTree(menuInstance);\n if (updatedMenu) acc.push(updatedMenu);\n return acc;\n }, []) ?? []\n );\n }, [innerMenu]);\n\n // --- CORE REFACTOR: DERIVE SELECTED NODE ---\n const pageId = new URLSearchParams(location.search).get('page');\n\n const selectedNode = useMemo(() => {\n if (!menuItemsList.length) return null;\n\n // 1. Try to find the node requested in URL\n const found = findNodeById(menuItemsList, pageId);\n if (found) return found;\n\n // 2. Default to first item\n // Even if allowMissingPageParam is true, we still want to RETURN the node for rendering,\n // we just don't want the Redirector useEffect to force it into the URL.\n return menuItemsList[0];\n }, [menuItemsList, pageId]);\n\n // Fetch Page Data based on the derived node\n const [{ data: pageData, loading: pageLoading }] = useAxiosGet(\n ConfigService.tenantV1ApiUrl,\n `page/${selectedNode?.properties?.page?.id}`,\n EMPTY_HEADERS,\n !selectedNode?.properties?.page?.id,\n false\n );\n\n // --- ACTIONS ---\n\n const buildSearchString = useCallback(\n (params, node, menuIndex) => {\n if (typeof searchParamsTransformer === 'function') {\n const result = searchParamsTransformer({\n searchParams: params,\n node,\n menuIndex,\n location\n });\n if (result === null) return '';\n if (result instanceof URLSearchParams) return result.toString();\n if (typeof result === 'string') return result;\n if (result !== undefined) return String(result);\n }\n return params.toString();\n },\n [location, searchParamsTransformer]\n );\n\n const handleSelectedNode = useCallback(\n (node, menuIndex) => {\n // 1. Check if we are \"selecting\" the current node to clear query params if needed\n if (allowMissingPageParam) {\n const firstNode = menuItemsList?.[0];\n if (firstNode && String(node?.id) === String(firstNode.id)) {\n if (location.search) {\n history.replace({ pathname: location.pathname, search: '' });\n }\n setHasUnsavedChanges(false);\n return;\n }\n }\n\n // 2. Build URL\n const searchParams = new URLSearchParams(location.search);\n searchParams.set('page', node.id);\n const searchString = buildSearchString(searchParams, node, menuIndex);\n\n // 3. Navigate (The URL change will trigger the re-render & selectedNode update)\n history.push({\n pathname: location.pathname,\n search: searchString\n });\n\n // Note: We don't set 'selectedNode' manually anymore. It is derived.\n },\n [history, location, allowMissingPageParam, menuItemsList, buildSearchString]\n );\n\n const handleSidebarExpandClick = useCallback(() => {\n setSidebarExpanded((expanded) => !expanded);\n }, []);\n\n const handleDropNode = useCallback(() => {\n // TODO: Implement if we need to for next Phase\n }, []);\n\n // --- EFFECTS ---\n\n // 1. URL SYNCHRONIZATION (The \"Redirector\")\n // Ensures URL matches the selected node (e.g. on initial load or default selection)\n useEffect(() => {\n if (selectedNode && !allowMissingPageParam) {\n const currentUrlId = new URLSearchParams(location.search).get('page');\n\n if (String(selectedNode.id) !== String(currentUrlId)) {\n const newParams = new URLSearchParams(location.search);\n newParams.set('page', selectedNode.id);\n\n history.replace({\n pathname: location.pathname,\n search: newParams.toString()\n });\n }\n }\n }, [selectedNode?.id, location.search, history, allowMissingPageParam]);\n\n // 2. UI CLEANUP (The \"Reactor\")\n // Runs only when the ACTUAL selected ID changes to reset UI state\n useEffect(() => {\n if (selectedNode?.id) {\n setNavigationExpanded(false);\n setHasUnsavedChanges(false);\n setSubHeaderActionHasChildren(false);\n }\n }, [selectedNode?.id, setNavigationExpanded, setSubHeaderActionHasChildren]);\n\n // 3. BREADCRUMB / LABEL SYNC\n useEffect(() => {\n if (innerMenu && location.state?.label !== t(innerMenu?.name)) {\n setLocationState({ label: t(innerMenu?.name) });\n }\n }, [setLocationState, t, innerMenu, location.state?.label]);\n\n // --- RENDER ---\n return (\n <DndProvider backend={HTML5Backend}>\n <Prompt\n when={hasUnsavedChanges}\n message='You have unsaved changes. Are you sure you want to leave this page?'\n />\n <div className={classes.root}>\n <div className={classes.sidebar}>\n <UtilitySideBar\n title={innerMenu?.name || menuTitle}\n isUsingChildren={true}\n resizable={true}\n removePadding={true}\n removeTopLayoutUnit={true}\n onUtilitySidebarToggleExpandClick={handleSidebarExpandClick}\n collapsedWidth={64}\n >\n <div className={classes.menuContent} key={innerMenuId}>\n {menuItemsList?.length > 0 &&\n !menuLoading &&\n menuItemsList.map((menuItems, index) => (\n <div key={menuItems.id} className={classes.nodeContainer}>\n <BaseTreeMenu\n menuItems={menuItems}\n onSelectNode={handleSelectedNode}\n onDropNode={handleDropNode}\n menuIndex={index}\n selectedNodeId={selectedNode?.id}\n selectedNodeParentId={selectedNode?.parentId}\n sidebarExpanded={sidebarExpanded}\n treeViewMode={TreeViewModeEnums.Classic}\n />\n </div>\n ))}\n {menuLoading && (\n <div className={classes.loader}>\n <NodeLoader loading={menuLoading} />\n </div>\n )}\n </div>\n </UtilitySideBar>\n </div>\n <div className={classes.content}>\n {mainContent\n ? typeof mainContent === 'function'\n ? mainContent({ selectedNode, menuItemsList })\n : mainContent\n : selectedNode?.properties?.page?.id && (\n <PageContainer\n user={user}\n key={selectedNode?.id}\n pageData={pageData}\n pageLoading={pageLoading}\n widgetParams={{\n pageId: pageData?.pageId,\n entityName:\n selectedNode?.properties?.page?.entity?.entityName,\n pbiReportCode:\n selectedNode?.properties?.page?.pbiReportCode,\n requiredFieldsMap:\n selectedNode?.properties?.page?.requiredFieldMapping,\n udpTagId: selectedNode?.properties?.page?.udpTagId,\n queryId: selectedNode?.properties?.page?.queryId,\n inquiryTreeId:\n selectedNode?.properties?.page?.inquiryTreeId,\n setHasUnsavedChanges: setHasUnsavedChanges\n }}\n disableMargins={true}\n fromMenu={true}\n />\n )}\n </div>\n </div>\n </DndProvider>\n );\n};\n\nexport default MenuPage;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAsBA,MAAM,YAAY,YAAY,WAAW;CACvC,MAAM;EACJ,MAAM;EACN,QAAQ;EACR,WAAW;EACX,SAAS;EACT,mBAAmB,CAAC,kBAAkB,CAAC,KAAK,SAAS,IAAI,KAAK,GAAG,CAAC,KAAK,IAAI;EAC3E,qBAAqB;EACrB,kBAAkB;EACnB;CACD,SAAS;EACP,UAAU;EACV,aAAa,MAAM,QAAQ,EAAE;EAC7B,SAAS;EACT,eAAe;EACf,WAAW;EACZ;CACD,SAAS;EACP,UAAU;EACV,SAAS;EACT,eAAe;EACf,UAAU;EACV,QAAQ;EACR,QAAQ;EACR,WAAW;EACX,WAAW;EACZ;CACD,aAAa;EACX,WAAW,MAAM,QAAQ,EAAE;EAC3B,MAAM;EACN,WAAW;EACX,WAAW;EACX,WAAW;EACZ;CACD,QAAQ;EACN,aAAa,MAAM,QAAQ,EAAE;EAC7B,YAAY,MAAM,QAAQ,EAAE;EAC7B;CACD,gBAAgB;EACd,MAAM;EACN,SAAS;EACT,eAAe;EACf,YAAY;EACZ,gBAAgB;EACjB;CACF,EAAE;AAGH,MAAM,gBAAgB,EAAE;AAGxB,MAAM,gBAAgB,OAAO,OAAO;AAClC,KAAI,CAAC,SAAS,CAAC,GAAI,QAAO;AAC1B,M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AI,WAAW,QAAQ;EAWrC,EAVJ,sBAAA,cAAC,cAAD;EACa;EACX,cAAc;EACd,YAAY;EACZ,WAAW;EACX,gBAAgB,cAAc;EAC9B,sBAAsB,cAAc;EACnB;EACjB,cAAc,kBAAkB;EAChC,CAAA,CACE,CACN,EACH,eACC,sBAAA,cAAC,OAAD,EAAK,WAAW,QAAQ,QAElB,EADJ,sBAAA,cAAC,YAAD,EAAY,SAAS,aAAe,CAAA,CAChC,CAEJ,CACS,CACb,EACN,sBAAA,cAAC,OAAD,EAAK,WAAW,QAAQ,SA6BlB,EA5BH,cACG,OAAO,gBAAgB,aACrB,YAAY;EAAE;EAAc;EAAe,CAAC,GAC5C,cACF,cAAc,YAAY,MAAM,MAC9B,sBAAA,cAAC,eAAD;EACQ;EACN,KAAK,cAAc;EACT;EACG;EACb,cAAc;GACZ,QAAQ,UAAU;GAClB,YACE,cAAc,YAAY,MAAM,QAAQ;GAC1C,eACE,cAAc,YAAY,MAAM;GAClC,mBACE,cAAc,YAAY,MAAM;GAClC,UAAU,cAAc,YAAY,MAAM;GAC1C,SAAS,cAAc,YAAY,MAAM;GACzC,eACE,cAAc,YAAY,MAAM;GACZ;GACvB;EACD,gBAAgB;EAChB,UAAU;EACV,CAAA,CAEJ,CACF,CACM"}
|
|
@@ -48,7 +48,7 @@ function getDisplayName(item) {
|
|
|
48
48
|
}
|
|
49
49
|
const ShellDropdown = (props) => {
|
|
50
50
|
const classes = useStyles();
|
|
51
|
-
const { componentName = "Item", data = [], value = null, onChange, optionLabelDisplayFunction = getDisplayName, placeholder, className, classProps, ...other } = props;
|
|
51
|
+
const { componentName = "Item", data = [], value = null, onChange, optionLabelDisplayFunction = getDisplayName, groupBy, placeholder, className, classProps, ...other } = props;
|
|
52
52
|
const placeholderText = placeholder ?? (!value ? `All ${componentName}s` : void 0);
|
|
53
53
|
return /* @__PURE__ */ React.createElement("div", { className: `${classes.root} ${className || ""}` }, /* @__PURE__ */ React.createElement(FluentTextFieldAutoComplete, {
|
|
54
54
|
className: classes.field,
|
|
@@ -58,6 +58,7 @@ const ShellDropdown = (props) => {
|
|
|
58
58
|
},
|
|
59
59
|
options: data,
|
|
60
60
|
optionLabelDisplayFunction,
|
|
61
|
+
groupBy,
|
|
61
62
|
onChange,
|
|
62
63
|
value,
|
|
63
64
|
placeholder: placeholderText,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShellDropdown.mjs","names":[],"sources":["../../../src/shell/ui/ShellDropdown.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/core';\nimport { FluentTextFieldAutoComplete } from '../../UI/inputs/textField/FluentTextFieldAutoComplete';\n\nconst useStyles = makeStyles(theme => ({\n root: { display: 'flex', alignItems: 'center' },\n field: {\n minWidth: 300,\n maxWidth: 400,\n width: '100%',\n alignSelf: 'left',\n color: '#fff',\n '& .MuiOutlinedInput-root': {\n color: '#fff',\n backgroundColor: 'transparent',\n '& fieldset': {\n borderColor: 'rgba(255,255,255,0.6)',\n },\n '&:hover fieldset': {\n borderColor: 'rgba(255,255,255,0.85)',\n },\n '&.Mui-focused fieldset': {\n borderColor: '#fff',\n },\n '& input': {\n paddingTop: 4,\n paddingBottom: 4,\n height: 20,\n boxSizing: 'border-box',\n color: '#fff',\n },\n '& .MuiAutocomplete-input': {\n color: '#fff',\n },\n },\n '& .MuiInputBase-root': {\n color: '#fff',\n },\n '& .MuiAutocomplete-popupIndicator, & .MuiAutocomplete-clearIndicator': {\n color: '#fff',\n opacity: 0.95,\n },\n '& input::placeholder': {\n color: 'rgba(255,255,255,0.7)',\n },\n },\n}));\n\nfunction getDisplayName(item) {\n if (!item && item !== 0) return '';\n if (typeof item === 'string' || typeof item === 'number') return String(item);\n if (typeof item === 'object') {\n const name = item.name ?? item.label ?? item.title ?? item.displayName;\n return name !== undefined && name !== null ? String(name) : '';\n }\n return String(item);\n}\n\nexport const ShellDropdown = (props) => {\n const classes = useStyles();\n const {\n componentName = 'Item',\n data = [],\n value = null,\n onChange,\n optionLabelDisplayFunction = getDisplayName,\n placeholder,\n className,\n classProps,\n ...other\n } = props;\n\n const placeholderText = placeholder ?? (!value ? `All ${componentName}s` : undefined);\n\n return (\n <div className={`${classes.root} ${className || ''}`}>\n <FluentTextFieldAutoComplete\n className={classes.field}\n classProps={{ autocompleteRoot: classes.field, ...classProps }}\n options={data}\n optionLabelDisplayFunction={optionLabelDisplayFunction}\n onChange={onChange}\n value={value}\n placeholder={placeholderText}\n {...other}\n />\n </div>\n );\n};\n\nShellDropdown.propTypes = {\n componentName: PropTypes.string,\n data: PropTypes.array,\n value: PropTypes.any,\n onChange: PropTypes.func,\n optionLabelDisplayFunction: PropTypes.func,\n placeholder: PropTypes.string,\n className: PropTypes.string,\n classProps: PropTypes.object,\n};\n\nexport default ShellDropdown;\n"],"mappings":";;;;;AAKA,MAAM,YAAY,YAAW,WAAU;CACrC,MAAM;EAAE,SAAS;EAAQ,YAAY;EAAU;CAC/C,OAAO;EACL,UAAU;EACV,UAAU;EACV,OAAO;EACP,WAAW;EACX,OAAO;EACP,4BAA4B;GAC1B,OAAO;GACP,iBAAiB;GACjB,cAAc,EACZ,aAAa,yBACd;GACD,oBAAoB,EAClB,aAAa,0BACd;GACD,0BAA0B,EACxB,aAAa,QACd;GACD,WAAW;IACT,YAAY;IACZ,eAAe;IACf,QAAQ;IACR,WAAW;IACX,OAAO;IACR;GACD,4BAA4B,EAC1B,OAAO,QACR;GACF;EACD,wBAAwB,EACtB,OAAO,QACR;EACD,wEAAwE;GACtE,OAAO;GACP,SAAS;GACV;EACD,wBAAwB,EACtB,OAAO,yBACR;EACF;CACF,EAAE;AAEH,SAAS,eAAe,MAAM;AAC5B,KAAI,CAAC,QAAQ,SAAS,EAAG,QAAO;AAChC,KAAI,OAAO,SAAS,YAAY,OAAO,SAAS,SAAU,QAAO,OAAO,KAAK;AAC7E,KAAI,OAAO,SAAS,UAAU;EAC5B,MAAM,OAAO,KAAK,QAAQ,KAAK,SAAS,KAAK,SAAS,KAAK;AAC3D,SAAO,SAAS,KAAA,KAAa,SAAS,OAAO,OAAO,KAAK,GAAG;;AAE9D,QAAO,OAAO,KAAK;;AAGrB,MAAa,iBAAiB,UAAU;CACtC,MAAM,UAAU,WAAW;CAC3B,MAAM,EACJ,gBAAgB,QAChB,OAAO,EAAE,EACT,QAAQ,MACR,UACA,6BAA6B,gBAC7B,aACA,WACA,YACA,GAAG,UACD;CAEJ,MAAM,kBAAkB,gBAAgB,CAAC,QAAQ,OAAO,cAAc,KAAK,KAAA;AAE3E,QACE,sBAAA,cAAC,OAAD,EAAK,WAAW,GAAG,QAAQ,KAAK,GAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"ShellDropdown.mjs","names":[],"sources":["../../../src/shell/ui/ShellDropdown.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { makeStyles } from '@material-ui/core';\nimport { FluentTextFieldAutoComplete } from '../../UI/inputs/textField/FluentTextFieldAutoComplete';\n\nconst useStyles = makeStyles(theme => ({\n root: { display: 'flex', alignItems: 'center' },\n field: {\n minWidth: 300,\n maxWidth: 400,\n width: '100%',\n alignSelf: 'left',\n color: '#fff',\n '& .MuiOutlinedInput-root': {\n color: '#fff',\n backgroundColor: 'transparent',\n '& fieldset': {\n borderColor: 'rgba(255,255,255,0.6)',\n },\n '&:hover fieldset': {\n borderColor: 'rgba(255,255,255,0.85)',\n },\n '&.Mui-focused fieldset': {\n borderColor: '#fff',\n },\n '& input': {\n paddingTop: 4,\n paddingBottom: 4,\n height: 20,\n boxSizing: 'border-box',\n color: '#fff',\n },\n '& .MuiAutocomplete-input': {\n color: '#fff',\n },\n },\n '& .MuiInputBase-root': {\n color: '#fff',\n },\n '& .MuiAutocomplete-popupIndicator, & .MuiAutocomplete-clearIndicator': {\n color: '#fff',\n opacity: 0.95,\n },\n '& input::placeholder': {\n color: 'rgba(255,255,255,0.7)',\n },\n },\n}));\n\nfunction getDisplayName(item) {\n if (!item && item !== 0) return '';\n if (typeof item === 'string' || typeof item === 'number') return String(item);\n if (typeof item === 'object') {\n const name = item.name ?? item.label ?? item.title ?? item.displayName;\n return name !== undefined && name !== null ? String(name) : '';\n }\n return String(item);\n}\n\nexport const ShellDropdown = (props) => {\n const classes = useStyles();\n const {\n componentName = 'Item',\n data = [],\n value = null,\n onChange,\n optionLabelDisplayFunction = getDisplayName,\n groupBy,\n placeholder,\n className,\n classProps,\n ...other\n } = props;\n\n const placeholderText = placeholder ?? (!value ? `All ${componentName}s` : undefined);\n\n return (\n <div className={`${classes.root} ${className || ''}`}>\n <FluentTextFieldAutoComplete\n className={classes.field}\n classProps={{ autocompleteRoot: classes.field, ...classProps }}\n options={data}\n optionLabelDisplayFunction={optionLabelDisplayFunction}\n groupBy={groupBy}\n onChange={onChange}\n value={value}\n placeholder={placeholderText}\n {...other}\n />\n </div>\n );\n};\n\nShellDropdown.propTypes = {\n componentName: PropTypes.string,\n data: PropTypes.array,\n value: PropTypes.any,\n onChange: PropTypes.func,\n optionLabelDisplayFunction: PropTypes.func,\n placeholder: PropTypes.string,\n className: PropTypes.string,\n classProps: PropTypes.object,\n};\n\nexport default ShellDropdown;\n"],"mappings":";;;;;AAKA,MAAM,YAAY,YAAW,WAAU;CACrC,MAAM;EAAE,SAAS;EAAQ,YAAY;EAAU;CAC/C,OAAO;EACL,UAAU;EACV,UAAU;EACV,OAAO;EACP,WAAW;EACX,OAAO;EACP,4BAA4B;GAC1B,OAAO;GACP,iBAAiB;GACjB,cAAc,EACZ,aAAa,yBACd;GACD,oBAAoB,EAClB,aAAa,0BACd;GACD,0BAA0B,EACxB,aAAa,QACd;GACD,WAAW;IACT,YAAY;IACZ,eAAe;IACf,QAAQ;IACR,WAAW;IACX,OAAO;IACR;GACD,4BAA4B,EAC1B,OAAO,QACR;GACF;EACD,wBAAwB,EACtB,OAAO,QACR;EACD,wEAAwE;GACtE,OAAO;GACP,SAAS;GACV;EACD,wBAAwB,EACtB,OAAO,yBACR;EACF;CACF,EAAE;AAEH,SAAS,eAAe,MAAM;AAC5B,KAAI,CAAC,QAAQ,SAAS,EAAG,QAAO;AAChC,KAAI,OAAO,SAAS,YAAY,OAAO,SAAS,SAAU,QAAO,OAAO,KAAK;AAC7E,KAAI,OAAO,SAAS,UAAU;EAC5B,MAAM,OAAO,KAAK,QAAQ,KAAK,SAAS,KAAK,SAAS,KAAK;AAC3D,SAAO,SAAS,KAAA,KAAa,SAAS,OAAO,OAAO,KAAK,GAAG;;AAE9D,QAAO,OAAO,KAAK;;AAGrB,MAAa,iBAAiB,UAAU;CACtC,MAAM,UAAU,WAAW;CAC3B,MAAM,EACJ,gBAAgB,QAChB,OAAO,EAAE,EACT,QAAQ,MACR,UACA,6BAA6B,gBAC7B,SACA,aACA,WACA,YACA,GAAG,UACD;CAEJ,MAAM,kBAAkB,gBAAgB,CAAC,QAAQ,OAAO,cAAc,KAAK,KAAA;AAE3E,QACE,sBAAA,cAAC,OAAD,EAAK,WAAW,GAAG,QAAQ,KAAK,GAAG,aAAa,MAY1C,EAXJ,sBAAA,cAAC,6BAAD;EACE,WAAW,QAAQ;EACnB,YAAY;GAAE,kBAAkB,QAAQ;GAAO,GAAG;GAAY;EAC9D,SAAS;EACmB;EACnB;EACC;EACH;EACP,aAAa;EACb,GAAI;EACJ,CAAA,CACE;;AAIV,cAAc,YAAY;CACxB,eAAe,UAAU;CACzB,MAAM,UAAU;CAChB,OAAO,UAAU;CACjB,UAAU,UAAU;CACpB,4BAA4B,UAAU;CACtC,aAAa,UAAU;CACvB,WAAW,UAAU;CACrB,YAAY,UAAU;CACvB"}
|
|
@@ -81,6 +81,7 @@ const SiteHeader = (props) => {
|
|
|
81
81
|
value: breadCrumbRoot.value,
|
|
82
82
|
onChange: breadCrumbRoot.onChange,
|
|
83
83
|
optionLabelDisplayFunction: breadCrumbRoot.optionLabelDisplayFunction,
|
|
84
|
+
groupBy: breadCrumbRoot.groupBy,
|
|
84
85
|
placeholder: breadCrumbRoot.placeholder,
|
|
85
86
|
className: breadCrumbRoot.className,
|
|
86
87
|
classProps: breadCrumbRoot.classProps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SiteHeader.mjs","names":[],"sources":["../../../src/shell/ui/SiteHeader.jsx"],"sourcesContent":["import React from 'react';\nimport {\n AppBar,\n makeStyles,\n Toolbar,\n Typography,\n IconButton,\n useMediaQuery,\n useTheme\n} from '@material-ui/core';\nimport clsx from 'clsx';\nimport { WaffleIcon, CollapseMenuIcon } from '@fluentui/react-icons';\nimport { BreadCrumbMenu } from '../../UI/inputs/link/BreadCrumbMenu';\nimport { AmbientProjectSwitcher } from './AmbientProjectSwitcher';\nimport ShellDropdown from './ShellDropdown';\nimport { LanguageSwitcher } from './LanguageSwitcher';\nimport { HelpCenter } from './HelpCenter';\nimport { SiteHeaderRightComponentTarget } from './SiteHeaderRightComponent';\nimport PropTypes from 'prop-types';\nimport {\n useBuildEnvironment,\n APP_RIBBON_SPACE\n} from './useBuildEnvironment';\nimport { EnvironmentRibbon } from './EnvironmentRibbon';\nconst useStyles = makeStyles(\n (theme) => ({\n root: {\n color: theme?.palette?.appBar?.contrastText,\n zIndex: theme?.zIndex?.drawer + 1\n // Assume the drawer is always expanded unless the screen is too small for it and inset the left to account for it\n },\n spacer: {\n flex: 1\n },\n headerSpacer: {\n padding: 0,\n minHeight: ({ appRibbonSpace }) => 56 + appRibbonSpace\n },\n toolbar: {\n padding: 0,\n minHeight: theme.spacing(6)\n },\n appLaunch: {\n color: theme?.palette?.getContrastText(theme?.palette?.primary?.main)\n },\n avatar: {\n width: 25,\n height: 25,\n backgroundColor: theme?.palette?.secondary?.main\n },\n search: {\n marginLeft: theme.spacing(2),\n marginTop: theme.spacing(-1.35)\n },\n children: {\n flex: 1,\n minWidth: 5\n }\n }),\n { name: 'SiteHeader' }\n);\n\n/**\n * A spacing component with the same height as the SiteHeader\n */\nexport const SiteHeaderSpacer = (props) => {\n const buildEnv = useBuildEnvironment();\n const classes = useStyles({\n appRibbonSpace: buildEnv ? APP_RIBBON_SPACE : 0\n });\n const { className } = props;\n\n return <div className={clsx(className, classes.headerSpacer)} />;\n};\n\n/**\n * Site header including app bar\n */\nconst SiteHeader = (props) => {\n const classes = useStyles(props);\n const {\n className,\n returnTo,\n appContent,\n userAvatar,\n siteName,\n breadCrumbRoot = 'home',\n color = 'primary',\n setAppSwitcherOpen,\n breadCrumbAltLabelList,\n currentLocation,\n switcherData,\n selectedItem,\n switcherWidth,\n hideAppLaunch,\n languages,\n backgroundColor,\n hideLanguageSwitcher =false,\n hideHelpCenter = false,\n ...other\n } = props;\n\n const theme = useTheme();\n const mobile = useMediaQuery(theme.breakpoints.up('sm'));\n\n return (\n <>\n <AppBar\n elevation={0}\n position='fixed'\n color={color}\n {...other}\n className={className}\n classes={{ root: classes.root }}\n >\n <EnvironmentRibbon />\n <Toolbar className={classes.toolbar}>\n {mobile && !hideAppLaunch && (\n <IconButton\n className={classes.appLaunch}\n aria-label='App Launcher Menu'\n onClick={() => setAppSwitcherOpen('desktop', true)}\n >\n <WaffleIcon />\n </IconButton>\n )}\n {!mobile && (\n <IconButton\n className={classes.appLaunch}\n aria-label='App Launcher Menu'\n onClick={() => setAppSwitcherOpen('desktop', true)}\n >\n <CollapseMenuIcon />\n </IconButton>\n )}\n\n <Typography\n component='h1'\n variant='h6'\n style={{ marginLeft: hideAppLaunch && 16 }}\n >\n {siteName}\n </Typography>\n\n {mobile && (\n <div style={{ marginLeft: 70 }}>\n {React.isValidElement(breadCrumbRoot) ? (\n breadCrumbRoot\n ) : breadCrumbRoot && typeof breadCrumbRoot === 'object' && (breadCrumbRoot.data || breadCrumbRoot.componentName) ? (\n <ShellDropdown\n componentName={breadCrumbRoot.componentName}\n data={breadCrumbRoot.data}\n value={breadCrumbRoot.value}\n onChange={breadCrumbRoot.onChange}\n optionLabelDisplayFunction={breadCrumbRoot.optionLabelDisplayFunction}\n placeholder={breadCrumbRoot.placeholder}\n className={breadCrumbRoot.className}\n classProps={breadCrumbRoot.classProps}\n />\n ) : (\n <BreadCrumbMenu\n color='primary'\n root={breadCrumbRoot}\n breadCrumbAltLabelList={breadCrumbAltLabelList}\n />\n )}\n </div>\n )}\n <div className={classes.children}>{appContent}</div>\n {switcherData && (\n <AmbientProjectSwitcher\n data={switcherData}\n selectedItem={selectedItem}\n width={switcherWidth}\n backgroundColor={backgroundColor}\n />\n )}\n\n {!mobile && !hideAppLaunch && (\n <IconButton\n className={classes.appLaunch}\n aria-label='App Launcher Menu'\n onClick={() => setAppSwitcherOpen('mobile', true)}\n >\n <WaffleIcon />\n </IconButton>\n )}\n <div className={classes.additionalRightComponent}>\n <SiteHeaderRightComponentTarget />\n </div>\n {!hideHelpCenter && <HelpCenter />}\n {!hideLanguageSwitcher && <LanguageSwitcher languages={languages} />}\n <div>{userAvatar}</div>\n </Toolbar>\n </AppBar>\n <SiteHeaderSpacer className={className} />\n </>\n );\n};\n\nexport default SiteHeader;\n\nSiteHeader.propTypes = {\n breadCrumbRoot: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.element,\n PropTypes.node,\n PropTypes.object\n ]),\n /**\n * Passes the background color on the project switcher (default: theme secondary)\n */\n backgroundColor: PropTypes.string\n};\n"],"mappings":";;;;;;;;;;;;;;AAwBA,MAAM,YAAY,YACf,WAAW;CACV,MAAM;EACJ,OAAO,OAAO,SAAS,QAAQ;EAC/B,QAAQ,OAAO,QAAQ,SAAS;EAEjC;CACD,QAAQ,EACN,MAAM,GACP;CACD,cAAc;EACZ,SAAS;EACT,YAAY,EAAE,qBAAqB,KAAK;EACzC;CACD,SAAS;EACP,SAAS;EACT,WAAW,MAAM,QAAQ,EAAE;EAC5B;CACD,WAAW,EACT,OAAO,OAAO,SAAS,gBAAgB,OAAO,SAAS,SAAS,KAAK,EACtE;CACD,QAAQ;EACN,OAAO;EACP,QAAQ;EACR,iBAAiB,OAAO,SAAS,WAAW;EAC7C;CACD,QAAQ;EACN,YAAY,MAAM,QAAQ,EAAE;EAC5B,WAAW,MAAM,QAAQ,MAAM;EAChC;CACD,UAAU;EACR,MAAM;EACN,UAAU;EACX;CACF,GACD,EAAE,MAAM,cAAc,CACvB;;;;AAKD,MAAa,oBAAoB,UAAU;CAEzC,MAAM,UAAU,UAAU,EACxB,gBAFe,qBAAqB,GAAA,KAEU,GAC/C,CAAC;CACF,MAAM,EAAE,cAAc;AAEtB,QAAO,sBAAA,cAAC,OAAD,EAAK,WAAW,KAAK,WAAW,QAAQ,aAAa,EAAI,CAAA;;;;;AAMlE,MAAM,cAAc,UAAU;CAC5B,MAAM,UAAU,UAAU,MAAM;CAChC,MAAM,EACJ,WACA,UACA,YACA,YACA,UACA,iBAAiB,QACjB,QAAQ,WACR,oBACA,wBACA,iBACA,cACA,cACA,eACA,eACA,WACA,iBACA,uBAAsB,OACtB,iBAAiB,OACjB,GAAG,UACD;CAGJ,MAAM,SAAS,cADD,UAAU,CACW,YAAY,GAAG,KAAK,CAAC;AAExD,QACE,sBAAA,cAAA,MAAA,UAAA,MACE,sBAAA,cAAC,QAAD;EACE,WAAW;EACX,UAAS;EACF;EACP,GAAI;EACO;EACX,SAAS,EAAE,MAAM,QAAQ,MAAM;
|
|
1
|
+
{"version":3,"file":"SiteHeader.mjs","names":[],"sources":["../../../src/shell/ui/SiteHeader.jsx"],"sourcesContent":["import React from 'react';\nimport {\n AppBar,\n makeStyles,\n Toolbar,\n Typography,\n IconButton,\n useMediaQuery,\n useTheme\n} from '@material-ui/core';\nimport clsx from 'clsx';\nimport { WaffleIcon, CollapseMenuIcon } from '@fluentui/react-icons';\nimport { BreadCrumbMenu } from '../../UI/inputs/link/BreadCrumbMenu';\nimport { AmbientProjectSwitcher } from './AmbientProjectSwitcher';\nimport ShellDropdown from './ShellDropdown';\nimport { LanguageSwitcher } from './LanguageSwitcher';\nimport { HelpCenter } from './HelpCenter';\nimport { SiteHeaderRightComponentTarget } from './SiteHeaderRightComponent';\nimport PropTypes from 'prop-types';\nimport {\n useBuildEnvironment,\n APP_RIBBON_SPACE\n} from './useBuildEnvironment';\nimport { EnvironmentRibbon } from './EnvironmentRibbon';\nconst useStyles = makeStyles(\n (theme) => ({\n root: {\n color: theme?.palette?.appBar?.contrastText,\n zIndex: theme?.zIndex?.drawer + 1\n // Assume the drawer is always expanded unless the screen is too small for it and inset the left to account for it\n },\n spacer: {\n flex: 1\n },\n headerSpacer: {\n padding: 0,\n minHeight: ({ appRibbonSpace }) => 56 + appRibbonSpace\n },\n toolbar: {\n padding: 0,\n minHeight: theme.spacing(6)\n },\n appLaunch: {\n color: theme?.palette?.getContrastText(theme?.palette?.primary?.main)\n },\n avatar: {\n width: 25,\n height: 25,\n backgroundColor: theme?.palette?.secondary?.main\n },\n search: {\n marginLeft: theme.spacing(2),\n marginTop: theme.spacing(-1.35)\n },\n children: {\n flex: 1,\n minWidth: 5\n }\n }),\n { name: 'SiteHeader' }\n);\n\n/**\n * A spacing component with the same height as the SiteHeader\n */\nexport const SiteHeaderSpacer = (props) => {\n const buildEnv = useBuildEnvironment();\n const classes = useStyles({\n appRibbonSpace: buildEnv ? APP_RIBBON_SPACE : 0\n });\n const { className } = props;\n\n return <div className={clsx(className, classes.headerSpacer)} />;\n};\n\n/**\n * Site header including app bar\n */\nconst SiteHeader = (props) => {\n const classes = useStyles(props);\n const {\n className,\n returnTo,\n appContent,\n userAvatar,\n siteName,\n breadCrumbRoot = 'home',\n color = 'primary',\n setAppSwitcherOpen,\n breadCrumbAltLabelList,\n currentLocation,\n switcherData,\n selectedItem,\n switcherWidth,\n hideAppLaunch,\n languages,\n backgroundColor,\n hideLanguageSwitcher =false,\n hideHelpCenter = false,\n ...other\n } = props;\n\n const theme = useTheme();\n const mobile = useMediaQuery(theme.breakpoints.up('sm'));\n\n return (\n <>\n <AppBar\n elevation={0}\n position='fixed'\n color={color}\n {...other}\n className={className}\n classes={{ root: classes.root }}\n >\n <EnvironmentRibbon />\n <Toolbar className={classes.toolbar}>\n {mobile && !hideAppLaunch && (\n <IconButton\n className={classes.appLaunch}\n aria-label='App Launcher Menu'\n onClick={() => setAppSwitcherOpen('desktop', true)}\n >\n <WaffleIcon />\n </IconButton>\n )}\n {!mobile && (\n <IconButton\n className={classes.appLaunch}\n aria-label='App Launcher Menu'\n onClick={() => setAppSwitcherOpen('desktop', true)}\n >\n <CollapseMenuIcon />\n </IconButton>\n )}\n\n <Typography\n component='h1'\n variant='h6'\n style={{ marginLeft: hideAppLaunch && 16 }}\n >\n {siteName}\n </Typography>\n\n {mobile && (\n <div style={{ marginLeft: 70 }}>\n {React.isValidElement(breadCrumbRoot) ? (\n breadCrumbRoot\n ) : breadCrumbRoot && typeof breadCrumbRoot === 'object' && (breadCrumbRoot.data || breadCrumbRoot.componentName) ? (\n <ShellDropdown\n componentName={breadCrumbRoot.componentName}\n data={breadCrumbRoot.data}\n value={breadCrumbRoot.value}\n onChange={breadCrumbRoot.onChange}\n optionLabelDisplayFunction={breadCrumbRoot.optionLabelDisplayFunction}\n groupBy={breadCrumbRoot.groupBy}\n placeholder={breadCrumbRoot.placeholder}\n className={breadCrumbRoot.className}\n classProps={breadCrumbRoot.classProps}\n />\n ) : (\n <BreadCrumbMenu\n color='primary'\n root={breadCrumbRoot}\n breadCrumbAltLabelList={breadCrumbAltLabelList}\n />\n )}\n </div>\n )}\n <div className={classes.children}>{appContent}</div>\n {switcherData && (\n <AmbientProjectSwitcher\n data={switcherData}\n selectedItem={selectedItem}\n width={switcherWidth}\n backgroundColor={backgroundColor}\n />\n )}\n\n {!mobile && !hideAppLaunch && (\n <IconButton\n className={classes.appLaunch}\n aria-label='App Launcher Menu'\n onClick={() => setAppSwitcherOpen('mobile', true)}\n >\n <WaffleIcon />\n </IconButton>\n )}\n <div className={classes.additionalRightComponent}>\n <SiteHeaderRightComponentTarget />\n </div>\n {!hideHelpCenter && <HelpCenter />}\n {!hideLanguageSwitcher && <LanguageSwitcher languages={languages} />}\n <div>{userAvatar}</div>\n </Toolbar>\n </AppBar>\n <SiteHeaderSpacer className={className} />\n </>\n );\n};\n\nexport default SiteHeader;\n\nSiteHeader.propTypes = {\n breadCrumbRoot: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.element,\n PropTypes.node,\n PropTypes.object\n ]),\n /**\n * Passes the background color on the project switcher (default: theme secondary)\n */\n backgroundColor: PropTypes.string\n};\n"],"mappings":";;;;;;;;;;;;;;AAwBA,MAAM,YAAY,YACf,WAAW;CACV,MAAM;EACJ,OAAO,OAAO,SAAS,QAAQ;EAC/B,QAAQ,OAAO,QAAQ,SAAS;EAEjC;CACD,QAAQ,EACN,MAAM,GACP;CACD,cAAc;EACZ,SAAS;EACT,YAAY,EAAE,qBAAqB,KAAK;EACzC;CACD,SAAS;EACP,SAAS;EACT,WAAW,MAAM,QAAQ,EAAE;EAC5B;CACD,WAAW,EACT,OAAO,OAAO,SAAS,gBAAgB,OAAO,SAAS,SAAS,KAAK,EACtE;CACD,QAAQ;EACN,OAAO;EACP,QAAQ;EACR,iBAAiB,OAAO,SAAS,WAAW;EAC7C;CACD,QAAQ;EACN,YAAY,MAAM,QAAQ,EAAE;EAC5B,WAAW,MAAM,QAAQ,MAAM;EAChC;CACD,UAAU;EACR,MAAM;EACN,UAAU;EACX;CACF,GACD,EAAE,MAAM,cAAc,CACvB;;;;AAKD,MAAa,oBAAoB,UAAU;CAEzC,MAAM,UAAU,UAAU,EACxB,gBAFe,qBAAqB,GAAA,KAEU,GAC/C,CAAC;CACF,MAAM,EAAE,cAAc;AAEtB,QAAO,sBAAA,cAAC,OAAD,EAAK,WAAW,KAAK,WAAW,QAAQ,aAAa,EAAI,CAAA;;;;;AAMlE,MAAM,cAAc,UAAU;CAC5B,MAAM,UAAU,UAAU,MAAM;CAChC,MAAM,EACJ,WACA,UACA,YACA,YACA,UACA,iBAAiB,QACjB,QAAQ,WACR,oBACA,wBACA,iBACA,cACA,cACA,eACA,eACA,WACA,iBACA,uBAAsB,OACtB,iBAAiB,OACjB,GAAG,UACD;CAGJ,MAAM,SAAS,cADD,UAAU,CACW,YAAY,GAAG,KAAK,CAA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ACX,sBAAA,cAAC,YAAD;EACE,WAAW,QAAQ;EACnB,cAAW;EACX,eAAe,mBAAmB,UAAU,KAAK;EAGtC,EADX,sBAAA,cAAC,YAAA,KAAa,CACH,EAEf,sBAAA,cAAC,OAAD,EAAK,WAAW,QAAQ,0BAElB,EADJ,sBAAA,cAAC,gCAAA,KAAiC,CAC9B,EACL,CAAC,kBAAkB,sBAAA,cAAC,YAAA,KAAa,EACjC,CAAC,wBAAwB,sBAAA,cAAC,kBAAD,EAA6B,WAAa,CAAA,EACpE,sBAAA,cAAC,OAAA,MAAK,WAAiB,CACf,CACH,EACT,sBAAA,cAAC,kBAAD,EAA6B,WAAa,CAAA,CACzC;;AAMP,WAAW,YAAY;CACrB,gBAAgB,UAAU,UAAU;EAClC,UAAU;EACV,UAAU;EACV,UAAU;EACV,UAAU;EACX,CAAC;CAIF,iBAAiB,UAAU;CAC5B"}
|
package/dist/udp/pages/UdpTransactionsPage/components/transactionHistory/TransactionTimeline.mjs
CHANGED
|
@@ -3,10 +3,10 @@ import { apiMutate, useAxiosMutate } from "../../../../../utilities/useAxiosMuta
|
|
|
3
3
|
import { useCatalogStore } from "../../../../../stores/catalogStore.mjs";
|
|
4
4
|
import { SideSheet } from "../../../../../UI/surfaces/SideSheet.mjs";
|
|
5
5
|
import { AmbientCard } from "../../../../../UI/surfaces/cards/AmbientCard/AmbientCard.mjs";
|
|
6
|
+
import { HttpStatusCode } from "../../../../../enums/httpStatusCodesEnums.mjs";
|
|
6
7
|
import { EmptyStateDisplay } from "../../../../../UI/dataDisplay/EmptyStateDisplay.mjs";
|
|
7
8
|
import { UdpTimeline } from "../../../../../UI/timeline/UdpTimeline.mjs";
|
|
8
9
|
import { formatDate } from "../../../../../UI/widgets/utils/dateUtils.mjs";
|
|
9
|
-
import { HttpStatusCode } from "../../../../../enums/httpStatusCodesEnums.mjs";
|
|
10
10
|
import { TransactionTimelineItem } from "./TransactionTimelineItem.mjs";
|
|
11
11
|
import { TransactionChangeLog } from "./TransactionChangeLog.mjs";
|
|
12
12
|
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useState } from "react";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "udp-react-enterprise-component-library",
|
|
3
|
-
"version": "26.0.0-beta.
|
|
3
|
+
"version": "26.0.0-beta.67",
|
|
4
4
|
"description": "React-based UI component library implementing Fluent UI design for Univerus internal projects",
|
|
5
5
|
"author": "Univerus",
|
|
6
6
|
"license": "MIT",
|
|
@@ -960,7 +960,7 @@
|
|
|
960
960
|
"@material-ui/styles": "^4.11.5",
|
|
961
961
|
"@material-vega/core": "^0.1.0",
|
|
962
962
|
"@material-vega/material-ui": "^0.2.1",
|
|
963
|
-
"udp-react-stencil-component-library": "^26.0.0-beta.
|
|
963
|
+
"udp-react-stencil-component-library": "^26.0.0-beta.37",
|
|
964
964
|
"axios": "^0.27.2",
|
|
965
965
|
"axios-hooks": "^2.1.0",
|
|
966
966
|
"broadcast-channel": "^4.17.0",
|