@gen-epix/ui-client-common 4.3.2 → 4.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -10
- package/dist/@types/mui.d.ts +1 -1
- package/dist/_chunks/ApplicationFooter.js +49 -49
- package/dist/_chunks/ApplicationFooter.js.map +1 -1
- package/dist/_chunks/Breadcrumbs.js +23 -22
- package/dist/_chunks/Breadcrumbs.js.map +1 -1
- package/dist/_chunks/CrudPage.js +211 -210
- package/dist/_chunks/CrudPage.js.map +1 -1
- package/dist/_chunks/GeoFilter.js.map +1 -1
- package/dist/_chunks/Notifications.js +67 -66
- package/dist/_chunks/Notifications.js.map +1 -1
- package/dist/_chunks/OutageList.js +30 -30
- package/dist/_chunks/OutageList.js.map +1 -1
- package/dist/_chunks/OutageUtil.js +2 -2
- package/dist/_chunks/OutageUtil.js.map +1 -1
- package/dist/_chunks/QueryClientProvider.js +1 -1
- package/dist/_chunks/QueryClientProvider.js.map +1 -1
- package/dist/_chunks/QueryClientService.js +405 -115
- package/dist/_chunks/QueryClientService.js.map +1 -1
- package/dist/_chunks/Reflect.js +642 -0
- package/dist/_chunks/Reflect.js.map +1 -0
- package/dist/_chunks/Table.js +572 -574
- package/dist/_chunks/Table.js.map +1 -1
- package/dist/_chunks/TableUtil.js +5 -5
- package/dist/_chunks/TableUtil.js.map +1 -1
- package/dist/_chunks/TextFilter.js +1 -1
- package/dist/_chunks/TextFilter.js.map +1 -1
- package/dist/_chunks/UserInvitationsAdminPage.js +109 -107
- package/dist/_chunks/UserInvitationsAdminPage.js.map +1 -1
- package/dist/_chunks/UserManagerUtil.js +7 -15
- package/dist/_chunks/UserManagerUtil.js.map +1 -1
- package/dist/_chunks/_baseAssignValue.js.map +1 -1
- package/dist/_chunks/_baseFlatten.js +8 -8
- package/dist/_chunks/_baseFlatten.js.map +1 -1
- package/dist/_chunks/_baseUnset.js +299 -22
- package/dist/_chunks/_baseUnset.js.map +1 -1
- package/dist/_chunks/_cacheHas.js.map +1 -1
- package/dist/_chunks/_setToString.js.map +1 -1
- package/dist/_chunks/decorate.js +9 -0
- package/dist/_chunks/decorateParam.js +8 -0
- package/dist/_chunks/format.js.map +1 -1
- package/dist/_chunks/isArrayLike.js.map +1 -1
- package/dist/_chunks/isObject.js.map +1 -1
- package/dist/_chunks/isSymbol.js.map +1 -1
- package/dist/_chunks/middleware.js +1 -1
- package/dist/_chunks/middleware.js.map +1 -1
- package/dist/_chunks/omit.js +39 -40
- package/dist/_chunks/omit.js.map +1 -1
- package/dist/_chunks/query.js +13 -17
- package/dist/_chunks/query.js.map +1 -1
- package/dist/_chunks/react.js +1 -1
- package/dist/_chunks/react.js.map +1 -1
- package/dist/_chunks/tableStore.js +40 -54
- package/dist/_chunks/tableStore.js.map +1 -1
- package/dist/_chunks/toDate.js.map +1 -1
- package/dist/_chunks/useColumnsMenu.js +2 -2
- package/dist/_chunks/useColumnsMenu.js.map +1 -1
- package/dist/_chunks/useMutation.js +31 -30
- package/dist/_chunks/useMutation.js.map +1 -1
- package/dist/_chunks/useQueryMemo.js +5 -5
- package/dist/_chunks/useQueryMemo.js.map +1 -1
- package/dist/_chunks/vanilla.js +1 -1
- package/dist/_chunks/vanilla.js.map +1 -1
- package/dist/_chunks/yup.js +2 -2
- package/dist/_chunks/yup.js.map +1 -1
- package/dist/classes/TableEventBus/TableEventBus.d.ts +1 -1
- package/dist/classes/TableEventBus/index.js.map +1 -1
- package/dist/classes/abstracts/FilterAbstract/index.js.map +1 -1
- package/dist/classes/filters/BooleanFilter.d.ts +1 -1
- package/dist/classes/filters/DateFilter.d.ts +2 -2
- package/dist/classes/filters/GeoFilter.d.ts +2 -2
- package/dist/classes/filters/MultiSelectFilter.d.ts +2 -2
- package/dist/classes/filters/NumberRangeFilter.d.ts +1 -1
- package/dist/classes/filters/TextFilter.d.ts +1 -1
- package/dist/classes/services/AuthenticationService/AuthenticationService.d.ts +5 -3
- package/dist/classes/services/AuthenticationService/index.js +34 -661
- package/dist/classes/services/AuthenticationService/index.js.map +1 -1
- package/dist/classes/services/AuthorizationService/AuthorizationService.d.ts +4 -4
- package/dist/classes/services/AuthorizationService/index.js +12 -10
- package/dist/classes/services/AuthorizationService/index.js.map +1 -1
- package/dist/classes/services/BackendVersionService/BackendVersionService.d.ts +0 -3
- package/dist/classes/services/BackendVersionService/index.js +5 -8
- package/dist/classes/services/BackendVersionService/index.js.map +1 -1
- package/dist/classes/services/BreadcrumbService/BreadcrumbService.d.ts +1 -3
- package/dist/classes/services/BreadcrumbService/index.js +19 -21
- package/dist/classes/services/BreadcrumbService/index.js.map +1 -1
- package/dist/classes/services/EmotionCacheService/EmotionCacheService.d.ts +4 -4
- package/dist/classes/services/EmotionCacheService/index.js +17 -14
- package/dist/classes/services/EmotionCacheService/index.js.map +1 -1
- package/dist/classes/services/FeatureFlagsService/FeatureFlagsService.d.ts +0 -3
- package/dist/classes/services/FeatureFlagsService/index.js +5 -8
- package/dist/classes/services/FeatureFlagsService/index.js.map +1 -1
- package/dist/classes/services/I18nService/I18nService.d.ts +3 -3
- package/dist/classes/services/I18nService/index.js +25 -29
- package/dist/classes/services/I18nService/index.js.map +1 -1
- package/dist/classes/services/InactivityService/InactivityService.d.ts +6 -3
- package/dist/classes/services/InactivityService/index.js +42 -36
- package/dist/classes/services/InactivityService/index.js.map +1 -1
- package/dist/classes/services/LogService/LogService.d.ts +7 -4
- package/dist/classes/services/LogService/index.js +39 -32
- package/dist/classes/services/LogService/index.js.map +1 -1
- package/dist/classes/services/NavigationHistoryService/NavigationHistoryService.d.ts +0 -3
- package/dist/classes/services/NavigationHistoryService/index.js +5 -8
- package/dist/classes/services/NavigationHistoryService/index.js.map +1 -1
- package/dist/classes/services/NotificationService/NotificationService.d.ts +4 -4
- package/dist/classes/services/NotificationService/index.js +21 -21
- package/dist/classes/services/NotificationService/index.js.map +1 -1
- package/dist/classes/services/PageEventBusService/PageEventBusService.d.ts +4 -3
- package/dist/classes/services/PageEventBusService/index.js +18 -15
- package/dist/classes/services/PageEventBusService/index.js.map +1 -1
- package/dist/classes/services/QueryClientService/QueryClientService.d.ts +6 -7
- package/dist/classes/services/QueryClientService/index.js +1 -2
- package/dist/classes/services/RouterService/RouterService.d.ts +6 -9
- package/dist/classes/services/RouterService/index.js +8 -12
- package/dist/classes/services/RouterService/index.js.map +1 -1
- package/dist/classes/services/UserSettingsService/UserSettingsService.d.ts +0 -3
- package/dist/classes/services/UserSettingsService/index.js +5 -8
- package/dist/classes/services/UserSettingsService/index.js.map +1 -1
- package/dist/components/app/App/App.d.ts +5 -1
- package/dist/components/app/App/index.js +31 -37
- package/dist/components/app/App/index.js.map +1 -1
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js +50 -49
- package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js.map +1 -1
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js +42 -41
- package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js.map +1 -1
- package/dist/components/app/AuthenticationWrapper/index.js +68 -67
- package/dist/components/app/AuthenticationWrapper/index.js.map +1 -1
- package/dist/components/app/AuthorizationWrapper/index.js +33 -32
- package/dist/components/app/AuthorizationWrapper/index.js.map +1 -1
- package/dist/components/app/RouterRoot/index.js +62 -61
- package/dist/components/app/RouterRoot/index.js.map +1 -1
- package/dist/components/epi/EpiContactDetailsDialog/index.js +38 -37
- package/dist/components/epi/EpiContactDetailsDialog/index.js.map +1 -1
- package/dist/components/filters/BooleanFilterField/index.js +5 -5
- package/dist/components/filters/BooleanFilterField/index.js.map +1 -1
- package/dist/components/filters/DateFilterField/index.js +3 -3
- package/dist/components/filters/DateFilterField/index.js.map +1 -1
- package/dist/components/filters/GeoFilterField/index.js +4 -4
- package/dist/components/filters/GeoFilterField/index.js.map +1 -1
- package/dist/components/filters/MultiSelectFilterField/index.js +4 -4
- package/dist/components/filters/MultiSelectFilterField/index.js.map +1 -1
- package/dist/components/filters/NumberRangeFilterField/index.js +3 -3
- package/dist/components/filters/NumberRangeFilterField/index.js.map +1 -1
- package/dist/components/filters/TextFilterField/index.js +3 -3
- package/dist/components/filters/TextFilterField/index.js.map +1 -1
- package/dist/components/ui/ApplicationBar/index.js +242 -241
- package/dist/components/ui/ApplicationBar/index.js.map +1 -1
- package/dist/components/ui/ApplicationFooter/index.js +1 -2
- package/dist/components/ui/Breadcrumbs/Breadcrumb.d.ts +1 -1
- package/dist/components/ui/Breadcrumbs/index.js +1 -2
- package/dist/components/ui/ConsentDialog/index.js +11 -6
- package/dist/components/ui/ConsentDialog/index.js.map +1 -1
- package/dist/components/ui/GenericErrorMessage/index.js +51 -50
- package/dist/components/ui/GenericErrorMessage/index.js.map +1 -1
- package/dist/components/ui/LicensesDialog/index.js +66 -69
- package/dist/components/ui/LicensesDialog/index.js.map +1 -1
- package/dist/components/ui/MyPermissionsDialog/index.js +26 -25
- package/dist/components/ui/MyPermissionsDialog/index.js.map +1 -1
- package/dist/components/ui/NavLink/index.js +6 -6
- package/dist/components/ui/NavLink/index.js.map +1 -1
- package/dist/components/ui/Notifications/NotificationItem.d.ts +1 -1
- package/dist/components/ui/Notifications/index.js +1 -2
- package/dist/components/ui/OrganizationSwitcherDialog/index.js +69 -76
- package/dist/components/ui/OrganizationSwitcherDialog/index.js.map +1 -1
- package/dist/components/ui/OutageList/index.js +1 -2
- package/dist/components/ui/OutagesDialog/index.js.map +1 -1
- package/dist/components/ui/PageContainer/PageContainer.d.ts +1 -1
- package/dist/components/ui/PageContainer/index.js +57 -52
- package/dist/components/ui/PageContainer/index.js.map +1 -1
- package/dist/components/ui/ResponseHandler/ResponseHandler.d.ts +1 -1
- package/dist/components/ui/ResponseHandler/index.js.map +1 -1
- package/dist/components/ui/Sidebar/SidebarItem.d.ts +1 -1
- package/dist/components/ui/Sidebar/SidebarMenuItem.d.ts +1 -1
- package/dist/components/ui/Sidebar/index.js +45 -45
- package/dist/components/ui/Sidebar/index.js.map +1 -1
- package/dist/components/ui/Table/Table.d.ts +1 -1
- package/dist/components/ui/Table/TableActionsCell.d.ts +1 -1
- package/dist/components/ui/Table/TableCell.d.ts +1 -1
- package/dist/components/ui/Table/TableCheckboxCell.d.ts +1 -1
- package/dist/components/ui/Table/TableCheckboxHeader.d.ts +1 -1
- package/dist/components/ui/Table/TableColumnsEditorDialog.d.ts +1 -1
- package/dist/components/ui/Table/TableFilter.d.ts +2 -2
- package/dist/components/ui/Table/TableHeaderCell.d.ts +1 -1
- package/dist/components/ui/Table/TableHeaderFilter.d.ts +2 -2
- package/dist/components/ui/Table/TableReadableIndexCell.d.ts +1 -1
- package/dist/components/ui/Table/index.js +1 -2
- package/dist/components/ui/UserFeedbackDialog/index.js +65 -64
- package/dist/components/ui/UserFeedbackDialog/index.js.map +1 -1
- package/dist/components/ui/UserInactivityConfirmation/index.js +26 -25
- package/dist/components/ui/UserInactivityConfirmation/index.js.map +1 -1
- package/dist/constants/api.constants.d.ts +8 -0
- package/dist/constants/api.constants.js +6 -0
- package/dist/constants/api.constants.js.map +1 -0
- package/dist/constants/config.constants.d.ts +5 -0
- package/dist/constants/config.constants.js +6 -0
- package/dist/constants/config.constants.js.map +1 -0
- package/dist/constants/{query.js → query.constants.js} +2 -2
- package/dist/constants/query.constants.js.map +1 -0
- package/dist/context/uiClientCommonConfigContext/UiClientCommonConfigContext.d.ts +6 -2
- package/dist/context/uiClientCommonConfigContext/UiClientCommonConfigContextProvider.d.ts +2 -2
- package/dist/context/uiClientCommonConfigContext/index.js +28 -12
- package/dist/context/uiClientCommonConfigContext/index.js.map +1 -1
- package/dist/context/uiClientCommonConfigContext/useUiClientCommonConfigContext.d.ts +2 -1
- package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js +17 -16
- package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js.map +1 -1
- package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/useIdentifierIssuerOwnOrganizationQuery.d.ts +1 -1
- package/dist/dataHooks/useIdentifierIssuerQuery/index.js +18 -17
- package/dist/dataHooks/useIdentifierIssuerQuery/index.js.map +1 -1
- package/dist/dataHooks/useIdentifierIssuerQuery/useIdentifierIssuerQuery.d.ts +1 -1
- package/dist/dataHooks/useInviteUserConstraintsQuery/index.js +11 -10
- package/dist/dataHooks/useInviteUserConstraintsQuery/index.js.map +1 -1
- package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js +22 -21
- package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js.map +1 -1
- package/dist/dataHooks/useOrganizationAdminPoliciesQuery/useOrganizationAdminPoliciesQuery.d.ts +1 -1
- package/dist/dataHooks/useOrganizationIdentifierIssuerLinksQuery/index.js +8 -7
- package/dist/dataHooks/useOrganizationIdentifierIssuerLinksQuery/index.js.map +1 -1
- package/dist/dataHooks/useOrganizationsQuery/index.js +17 -16
- package/dist/dataHooks/useOrganizationsQuery/index.js.map +1 -1
- package/dist/dataHooks/useOrganizationsQuery/useOrganizationsQuery.d.ts +1 -1
- package/dist/dataHooks/useUsersQuery/index.js +18 -17
- package/dist/dataHooks/useUsersQuery/index.js.map +1 -1
- package/dist/dataHooks/useUsersQuery/useUsersQuery.d.ts +1 -1
- package/dist/hoc/withPermissions/index.js +12 -11
- package/dist/hoc/withPermissions/index.js.map +1 -1
- package/dist/hooks/useColumnsMenu/index.js +1 -2
- package/dist/hooks/useColumnsMenu/useColumnsMenu.d.ts +2 -2
- package/dist/hooks/useConfig/index.d.ts +1 -0
- package/dist/hooks/useConfig/index.js +7 -0
- package/dist/hooks/useConfig/index.js.map +1 -0
- package/dist/hooks/useConfig/useConfig.d.ts +2 -0
- package/dist/hooks/useCreateMutation/index.js +25 -24
- package/dist/hooks/useCreateMutation/index.js.map +1 -1
- package/dist/hooks/useCreateMutation/useCreateMutation.d.ts +1 -1
- package/dist/hooks/useDeleteMutation/index.js +24 -23
- package/dist/hooks/useDeleteMutation/index.js.map +1 -1
- package/dist/hooks/useDeleteMutation/useDeleteMutation.d.ts +1 -1
- package/dist/hooks/useEditMutation/index.js +33 -32
- package/dist/hooks/useEditMutation/index.js.map +1 -1
- package/dist/hooks/useEditMutation/useEditMutation.d.ts +1 -1
- package/dist/hooks/useInitializeTableStore/index.js.map +1 -1
- package/dist/hooks/useInitializeTableStore/useInitializeTableStore.d.ts +1 -1
- package/dist/hooks/useItemQuery/index.js +36 -35
- package/dist/hooks/useItemQuery/index.js.map +1 -1
- package/dist/hooks/useItemQuery/useItemQuery.d.ts +1 -1
- package/dist/hooks/useQueryMemo/index.js +1 -2
- package/dist/hooks/useUpdateBreadcrumb/index.js +10 -9
- package/dist/hooks/useUpdateBreadcrumb/index.js.map +1 -1
- package/dist/hooks/useUpdateDocumentTitle/index.js +4 -3
- package/dist/hooks/useUpdateDocumentTitle/index.js.map +1 -1
- package/dist/models/{admin.js → admin.models.js} +2 -2
- package/dist/models/admin.models.js.map +1 -0
- package/dist/models/{dataHooks.d.ts → data-hooks.models.d.ts} +1 -1
- package/dist/models/{table.d.ts → table.models.d.ts} +2 -2
- package/dist/models/{table.js → table.models.js} +2 -2
- package/dist/models/table.models.js.map +1 -0
- package/dist/pages/AcceptInvitationPage/index.js +40 -39
- package/dist/pages/AcceptInvitationPage/index.js.map +1 -1
- package/dist/pages/AdminPage/index.js +39 -38
- package/dist/pages/AdminPage/index.js.map +1 -1
- package/dist/pages/ChooseIdentityProviderPage/ChooseIdentityProviderPage.d.ts +1 -1
- package/dist/pages/ChooseIdentityProviderPage/index.js +38 -37
- package/dist/pages/ChooseIdentityProviderPage/index.js.map +1 -1
- package/dist/pages/CrudPage/CrudPage.d.ts +6 -6
- package/dist/pages/CrudPage/CrudPageDeleteDialog.d.ts +1 -1
- package/dist/pages/CrudPage/CrudPageEditDialog.d.ts +2 -2
- package/dist/pages/CrudPage/index.js +1 -2
- package/dist/pages/ErrorPage/index.js.map +1 -1
- package/dist/pages/IdentifierIssuersAdminPage/index.js +41 -40
- package/dist/pages/IdentifierIssuersAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js +58 -57
- package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationContactsAdminPage/index.js +49 -48
- package/dist/pages/OrganizationContactsAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationSitesAdminPage/index.js +44 -43
- package/dist/pages/OrganizationSitesAdminPage/index.js.map +1 -1
- package/dist/pages/OrganizationsAdminPage/index.js +57 -56
- package/dist/pages/OrganizationsAdminPage/index.js.map +1 -1
- package/dist/pages/OutagesAdminPage/index.js +63 -62
- package/dist/pages/OutagesAdminPage/index.js.map +1 -1
- package/dist/pages/PostLoginPage/index.js +14 -13
- package/dist/pages/PostLoginPage/index.js.map +1 -1
- package/dist/pages/PostLogoutPage/index.js +19 -18
- package/dist/pages/PostLogoutPage/index.js.map +1 -1
- package/dist/pages/RouterErrorPage/index.js.map +1 -1
- package/dist/pages/UserInvitationsAdminPage/index.js +1 -2
- package/dist/pages/UsersAdminPage/UsersAdminPage.d.ts +1 -1
- package/dist/pages/UsersAdminPage/index.js +110 -109
- package/dist/pages/UsersAdminPage/index.js.map +1 -1
- package/dist/routes/adminRoutes.d.ts +1 -1
- package/dist/routes/index.js +1 -1
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/routes.d.ts +1 -1
- package/dist/setup/setup.js.map +1 -1
- package/dist/stores/oidcStore/index.js.map +1 -1
- package/dist/stores/outagesStore/index.js.map +1 -1
- package/dist/stores/outagesStore/outagesStore.d.ts +1 -1
- package/dist/stores/tableStore/index.js +1 -2
- package/dist/stores/tableStore/tableStore.d.ts +2 -2
- package/dist/theme/demoTheme/index.js.map +1 -1
- package/dist/utils/AxiosUtil/index.js.map +1 -1
- package/dist/utils/DataHookUtil/DataHookUtil.d.ts +1 -1
- package/dist/utils/DataHookUtil/index.js.map +1 -1
- package/dist/utils/DependencyContainerUtil/DependencyContainerUtil.d.ts +6 -0
- package/dist/utils/DependencyContainerUtil/index.d.ts +1 -0
- package/dist/utils/DependencyContainerUtil/index.js +22 -0
- package/dist/utils/DependencyContainerUtil/index.js.map +1 -0
- package/dist/utils/LoadableUtil/LoadableUtil.d.ts +1 -1
- package/dist/utils/LoadableUtil/index.js.map +1 -1
- package/dist/utils/MenuDataUtil/MenuDataUtil.d.ts +1 -1
- package/dist/utils/MenuDataUtil/index.js.map +1 -1
- package/dist/utils/NotificationUtil/index.js.map +1 -1
- package/dist/utils/OutageUtil/OutageUtil.d.ts +1 -1
- package/dist/utils/OutageUtil/index.js +1 -2
- package/dist/utils/StandardConfigUtil/StandardConfigUtil.d.ts +1 -1
- package/dist/utils/StandardConfigUtil/index.js.map +1 -1
- package/dist/utils/TableUtil/TableUtil.d.ts +4 -4
- package/dist/utils/TableUtil/index.js +1 -2
- package/dist/utils/TimeUtil/index.js.map +1 -1
- package/dist/utils/UserManagerUtil/index.js +1 -2
- package/dist/utils/UserUtil/index.js.map +1 -1
- package/package.json +96 -86
- package/dist/_chunks/_baseGet.js +0 -280
- package/dist/_chunks/_baseGet.js.map +0 -1
- package/dist/_chunks/_baseIteratee.js +0 -274
- package/dist/_chunks/_baseIteratee.js.map +0 -1
- package/dist/_chunks/last.js +0 -13
- package/dist/_chunks/last.js.map +0 -1
- package/dist/_chunks/uniq.js +0 -44
- package/dist/_chunks/uniq.js.map +0 -1
- package/dist/classes/services/ApiService/ApiService.d.ts +0 -19
- package/dist/classes/services/ApiService/index.d.ts +0 -1
- package/dist/classes/services/ApiService/index.js +0 -21
- package/dist/classes/services/ApiService/index.js.map +0 -1
- package/dist/classes/services/ConfigService/ConfigService.d.ts +0 -9
- package/dist/classes/services/ConfigService/index.d.ts +0 -1
- package/dist/classes/services/ConfigService/index.js +0 -21
- package/dist/classes/services/ConfigService/index.js.map +0 -1
- package/dist/constants/query.js.map +0 -1
- package/dist/models/admin.js.map +0 -1
- package/dist/models/table.js.map +0 -1
- /package/dist/constants/{query.d.ts → query.constants.d.ts} +0 -0
- /package/dist/models/{admin.d.ts → admin.models.d.ts} +0 -0
- /package/dist/models/{api.d.ts → api.models.d.ts} +0 -0
- /package/dist/models/{api.js → api.models.js} +0 -0
- /package/dist/models/{auth.d.ts → auth.models.d.ts} +0 -0
- /package/dist/models/{auth.js → auth.models.js} +0 -0
- /package/dist/models/{config.d.ts → config.models.d.ts} +0 -0
- /package/dist/models/{config.js → config.models.js} +0 -0
- /package/dist/models/{data.js → data-hooks.models.js} +0 -0
- /package/dist/models/{data.d.ts → data.models.d.ts} +0 -0
- /package/dist/models/{dataHooks.js → data.models.js} +0 -0
- /package/dist/models/{filter.d.ts → filter.models.d.ts} +0 -0
- /package/dist/models/{filter.js → filter.models.js} +0 -0
- /package/dist/models/{notification.d.ts → notification.models.d.ts} +0 -0
- /package/dist/models/{notification.js → notification.models.js} +0 -0
- /package/dist/models/{outage.d.ts → outage.models.d.ts} +0 -0
- /package/dist/models/{outage.js → outage.models.js} +0 -0
- /package/dist/models/{reactRouter.d.ts → react-router.models.d.ts} +0 -0
- /package/dist/models/{reactRouter.js → react-router.models.js} +0 -0
- /package/dist/models/{theme.d.ts → theme.models.d.ts} +0 -0
- /package/dist/models/{theme.js → theme.models.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.models.js","names":["FIXED_COLUMN_ID","\"ACTIONS\"","\"READABLE_INDEX\"","\"ROW_SELECT\"","TABLE_COLUMN_FROZEN","\"LEFT\"","\"RIGHT\""],"sources":["../../src/models/table.models.ts"],"sourcesContent":["import type {\n SxProps,\n Theme,\n} from '@mui/material';\nimport type { ReactElement } from 'react';\nimport type { TFunction } from 'i18next';\nimport type { DATE_FORMAT } from '@gen-epix/ui-core/constants/date.constants';\nimport type { OptionBase } from '@gen-epix/ui-core-form/models/form.models';\n\nexport enum FIXED_COLUMN_ID {\n ACTIONS = 'ACTIONS',\n READABLE_INDEX = 'READABLE_INDEX',\n ROW_SELECT = 'ROW_SELECT',\n}\n\nexport enum TABLE_COLUMN_FROZEN {\n LEFT = 'left',\n RIGHT = 'right',\n}\n\nexport interface GetTableCellRowComparatorProps<TColumn, TDataContext = null> {\n readonly column: TColumn;\n readonly dataContext: TDataContext;\n readonly direction: TableSortDirection;\n}\n\nexport interface GetTableCellValueProps<TRowData, TColumn, TDataContext = null> {\n readonly column: TColumn;\n readonly dataContext: TDataContext;\n readonly row: TRowData;\n readonly rowIndex: number;\n readonly t?: TFunction<'translation', undefined>;\n}\n\nexport type HasCellDataFn<TRowData, TDataContext = null> = (row: TRowData, column: TableColumn<TRowData, TDataContext>, rowIndex: number, dataContext: TDataContext) => boolean;\n\nexport type TableCellRowComparatorArgument<TRowData> = {\n row: TRowData;\n rowIndex: number;\n};\n\nexport type TableColumn<TRowData, TDataContext = null, TColumnContext = null> =\n TableColumnActions<TRowData, TDataContext, TColumnContext> |\n TableColumnBoolean<TRowData, TDataContext, TColumnContext> |\n TableColumnDate<TRowData, TDataContext, TColumnContext> |\n TableColumnNumber<TRowData, TDataContext, TColumnContext> |\n TableColumnOptions<TRowData, TDataContext, TColumnContext> |\n TableColumnReadableIndex<TRowData, TDataContext, TColumnContext> |\n TableColumnSelectable<TRowData, TDataContext, TColumnContext> |\n TableColumnText<TRowData, TDataContext, TColumnContext>;\n\nexport interface TableColumnActions<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, string, TDataContext, TColumnContext> {\n comparatorFactory?: (params: GetTableCellRowComparatorProps<TableColumnActions<TRowData, TDataContext, TColumnContext>, TDataContext>) => (a: TRowData, b: TRowData) => number;\n frozen: TABLE_COLUMN_FROZEN.RIGHT;\n getActions: (params: TableRowParams<TRowData, TDataContext>) => ReactElement[];\n id: FIXED_COLUMN_ID.ACTIONS;\n isInitiallyVisible: true;\n resizable: false;\n type: 'actions';\n}\n\nexport interface TableColumnBoolean<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, boolean, TDataContext, TColumnContext> {\n comparatorFactory?: (params: GetTableCellRowComparatorProps<TableColumnBoolean<TRowData, TDataContext, TColumnContext>, TDataContext>) => (a: TRowData, b: TRowData) => number;\n type: 'boolean';\n}\n\nexport interface TableColumnDate<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, string, TDataContext, TColumnContext> {\n comparatorFactory?: (params: GetTableCellRowComparatorProps<TableColumnDate<TRowData, TDataContext, TColumnContext>, TDataContext>) => (a: TRowData, b: TRowData) => number;\n dateFormat: typeof DATE_FORMAT[keyof typeof DATE_FORMAT];\n type: 'date';\n}\n\nexport type TableColumnDimension = {\n columnIds: string[];\n id: string;\n label: string;\n};\n\nexport interface TableColumnNumber<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, number, TDataContext, TColumnContext> {\n comparatorFactory?: (params: GetTableCellRowComparatorProps<TableColumnNumber<TRowData, TDataContext, TColumnContext>, TDataContext>) => (a: TRowData, b: TRowData) => number;\n type: 'number';\n}\n\nexport interface TableColumnOptions<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, string | string[], TDataContext, TColumnContext> {\n comparatorFactory?: (params: GetTableCellRowComparatorProps<TableColumnOptions<TRowData, TDataContext, TColumnContext>, TDataContext>) => (a: TRowData, b: TRowData) => number;\n maxNumOptionsExpanded?: number;\n options: OptionBase<string>[];\n shouldFilterOptions?: boolean;\n type: 'options';\n}\n\nexport interface TableColumnParams<TRowData, TDataContext = null> {\n column: TableColumn<TRowData, TDataContext>;\n dataContext: TDataContext;\n}\n\nexport interface TableColumnReadableIndex<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, never, TDataContext, TColumnContext> {\n comparatorFactory?: never;\n disableEllipsis: true;\n frozen: TABLE_COLUMN_FROZEN.LEFT;\n getAriaLabel: (params: TableRowParams<TRowData, TDataContext>) => string;\n id: FIXED_COLUMN_ID.READABLE_INDEX;\n resizable: false;\n type: 'readableIndex';\n}\n\nexport interface TableColumnSelectable<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, never, TDataContext, TColumnContext> {\n comparatorFactory?: never;\n disableEllipsis: true;\n frozen: TABLE_COLUMN_FROZEN.LEFT;\n id: FIXED_COLUMN_ID.ROW_SELECT;\n isDisabled?: (params: TableRowParams<TRowData, TDataContext>) => boolean;\n resizable: false;\n type: 'selectable';\n}\n\nexport interface TableColumnText<TRowData, TDataContext = null, TColumnContext = null> extends TableColumnBase<TRowData, string, TDataContext, TColumnContext> {\n comparatorFactory?: (params: GetTableCellRowComparatorProps<TableColumnText<TRowData, TDataContext>, TDataContext>) => (a: TRowData, b: TRowData) => number;\n type: 'text';\n}\n\nexport type TableColumnVisualSettings = {\n calculatedWidth?: number;\n hasResized?: boolean;\n id: string;\n isVisible: boolean;\n offsetX?: number;\n widthFlex: number;\n widthPx: number;\n};\n\n\nexport type TableDragEvent = {\n clientX: number;\n clientY: number;\n deltaX: number;\n deltaY: number;\n elementOffsetX: number;\n elementWidth: number;\n target: HTMLDivElement;\n type: 'end' | 'move' | 'start';\n};\n\nexport type TableRowAndColumnParams<TRowData, TDataContext = null> = TableColumnParams<TRowData, TDataContext> & TableRowParams<TRowData, TDataContext>;\n\nexport interface TableRowParams<TRowData, TDataContext = null> {\n dataContext: TDataContext;\n id: string;\n row: TRowData;\n rowIndex: number;\n}\n\nexport type TableSortDirection = 'asc' | 'desc';\n\ninterface TableColumnBase<TRowData, TValue, TDataContext = null, TColumnContext = null> {\n cellColorGetter?: (params: TableRowAndColumnParams<TRowData, TDataContext>) => string;\n cellTitleGetter?: (params: TableRowAndColumnParams<TRowData, TDataContext>) => string;\n columnContext?: TColumnContext;\n customHeaderIcon?: {\n iconElement: ReactElement;\n label: string;\n onClick: (params: TableColumnParams<TRowData, TDataContext>) => void;\n };\n disableEllipsis?: boolean;\n displayValueGetter?: (params: TableRowAndColumnParams<TRowData, TDataContext>) => string;\n filterLabel?: string;\n frozen?: TABLE_COLUMN_FROZEN;\n headerName?: string;\n headerTooltipContent?: string;\n hideInFilter?: boolean;\n id?: string;\n isInitiallyVisible: boolean;\n renderCell?: (params: TableRowAndColumnParams<TRowData, TDataContext>) => ReactElement;\n renderHeader?: (params: TableColumnParams<TRowData, TDataContext>) => ReactElement;\n renderHeaderContent?: (params: TableColumnParams<TRowData, TDataContext>) => ReactElement;\n resizable?: boolean;\n sx?: SxProps<Theme>;\n textAlign?: 'left' | 'right';\n valueGetter?: (params: TableRowAndColumnParams<TRowData, TDataContext>) => TValue;\n widthFlex?: number;\n widthPx?: number;\n widthPxFn?: (dataLength: number) => number;\n}\n"],"mappings":";AASA,IAAYA,IAAL,yBAAA,GAAA;QACL,EAAAC,UAAA,WACA,EAAAC,iBAAA,kBACA,EAAAC,aAAA;AACF,EAAA,CAAA,CAAA,GAEYC,IAAL,yBAAA,GAAA;QACL,EAAAC,OAAA,QACA,EAAAC,QAAA;AACF,EAAA,CAAA,CAAA"}
|
|
@@ -1,61 +1,62 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { COMMON_QUERY_KEY as o } from "../../constants/query.js";
|
|
1
|
+
import { t as e } from "../../_chunks/QueryClientService.js";
|
|
2
|
+
import { t } from "../../_chunks/useQueryMemo.js";
|
|
3
|
+
import { API_ORGANIZATION_TOKEN as n } from "../../constants/api.constants.js";
|
|
4
|
+
import { useConfig as r } from "../../hooks/useConfig/index.js";
|
|
5
|
+
import { PageContainer as i } from "../../components/ui/PageContainer/index.js";
|
|
6
|
+
import { ResponseHandler as a } from "../../components/ui/ResponseHandler/index.js";
|
|
7
|
+
import { COMMON_QUERY_KEY as o } from "../../constants/query.constants.js";
|
|
8
8
|
import { WindowService as s } from "@gen-epix/ui-core/classes/services/WindowService";
|
|
9
|
-
import {
|
|
10
|
-
import { useCallback as
|
|
11
|
-
import { Fragment as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
9
|
+
import { container as c } from "tsyringe";
|
|
10
|
+
import { useCallback as l, useState as u } from "react";
|
|
11
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
12
|
+
import { Box as m, Button as h, Typography as g } from "@mui/material";
|
|
13
|
+
import { useTranslation as _ } from "react-i18next";
|
|
14
|
+
import { TestIdUtil as v } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
15
|
+
import { useParams as y } from "react-router-dom";
|
|
15
16
|
//#region src/pages/AcceptInvitationPage/AcceptInvitationPage.tsx
|
|
16
|
-
var
|
|
17
|
-
let { token:
|
|
18
|
-
enabled:
|
|
17
|
+
var b = () => {
|
|
18
|
+
let { token: b } = y(), x = r(), [S, C] = u(!1), { data: w, error: T, isLoading: E } = t({
|
|
19
|
+
enabled: S,
|
|
19
20
|
gcTime: 0,
|
|
20
|
-
queryFn: async ({ signal: e }) => (await
|
|
21
|
-
queryKey:
|
|
21
|
+
queryFn: async ({ signal: e }) => (await c.resolve(n).userRegistrationsPostOne(b, { signal: e })).data,
|
|
22
|
+
queryKey: c.resolve(e).getGenericKey(o.USER_INVITATIONS, b),
|
|
22
23
|
staleTime: 0
|
|
23
|
-
}), { t:
|
|
24
|
+
}), { t: D } = _(), O = l(() => {
|
|
24
25
|
s.getInstance().window.location.href = "/";
|
|
25
|
-
}, []),
|
|
26
|
-
|
|
26
|
+
}, []), k = l(() => {
|
|
27
|
+
C(!0);
|
|
27
28
|
}, []);
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ f(i, {
|
|
29
30
|
singleAction: !0,
|
|
30
|
-
testIdAttributes:
|
|
31
|
-
title:
|
|
32
|
-
children: /* @__PURE__ */
|
|
33
|
-
enabled:
|
|
34
|
-
error:
|
|
35
|
-
isLoading:
|
|
36
|
-
children: [!
|
|
31
|
+
testIdAttributes: v.createAttributes("AcceptInvitationPage"),
|
|
32
|
+
title: D`Invitation`,
|
|
33
|
+
children: /* @__PURE__ */ p(a, {
|
|
34
|
+
enabled: S,
|
|
35
|
+
error: T,
|
|
36
|
+
isLoading: E,
|
|
37
|
+
children: [!w && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(m, {
|
|
37
38
|
sx: { marginY: 2 },
|
|
38
|
-
children: /* @__PURE__ */
|
|
39
|
-
}), /* @__PURE__ */ m
|
|
39
|
+
children: /* @__PURE__ */ f(g, { children: D("You have been invited to join {{applicationName}}.", { applicationName: x.applicationName }) })
|
|
40
|
+
}), /* @__PURE__ */ f(m, {
|
|
40
41
|
sx: { marginY: 2 },
|
|
41
|
-
children: /* @__PURE__ */
|
|
42
|
+
children: /* @__PURE__ */ f(h, {
|
|
42
43
|
color: "primary",
|
|
43
|
-
onClick:
|
|
44
|
+
onClick: k,
|
|
44
45
|
type: "submit",
|
|
45
|
-
children:
|
|
46
|
+
children: D`Complete registration`
|
|
46
47
|
})
|
|
47
|
-
})] }),
|
|
48
|
+
})] }), w && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(m, { children: /* @__PURE__ */ f(g, { children: D("You have been successfully registered to {{applicationName}}.", { applicationName: x.applicationName }) }) }), /* @__PURE__ */ f(m, {
|
|
48
49
|
sx: { marginY: 2 },
|
|
49
|
-
children: /* @__PURE__ */
|
|
50
|
+
children: /* @__PURE__ */ f(h, {
|
|
50
51
|
color: "primary",
|
|
51
|
-
onClick:
|
|
52
|
-
children:
|
|
52
|
+
onClick: O,
|
|
53
|
+
children: D`Click here to visit the home page`
|
|
53
54
|
})
|
|
54
55
|
})] })]
|
|
55
56
|
})
|
|
56
57
|
});
|
|
57
58
|
};
|
|
58
59
|
//#endregion
|
|
59
|
-
export {
|
|
60
|
+
export { b as AcceptInvitationPage };
|
|
60
61
|
|
|
61
62
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/pages/AcceptInvitationPage/AcceptInvitationPage.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next';\nimport { useParams } from 'react-router-dom';\nimport {\n Box,\n Button,\n Typography,\n} from '@mui/material';\nimport {\n useCallback,\n useState,\n} from 'react';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\nimport { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\n\nimport {
|
|
1
|
+
{"version":3,"file":"index.js","names":["rootContainer","_Fragment","QueryClientService","Fragment$1","AcceptInvitationPage","useParams","config","useConfig","shouldRegister","setShouldRegister","useState","useQueryMemo","container","API_ORGANIZATION_TOKEN","token","COMMON_QUERY_KEY","useTranslation","onGoToHomePageButtonClick","useCallback","onCompleteRegistrationButtonClick","PageContainer","TestIdUtil","ResponseHandler","data","Box","Typography","t","Button"],"sources":["../../../src/pages/AcceptInvitationPage/AcceptInvitationPage.tsx"],"sourcesContent":["import { container as rootContainer } from 'tsyringe';\nimport { useTranslation } from 'react-i18next';\nimport { useParams } from 'react-router-dom';\nimport {\n Box,\n Button,\n Typography,\n} from '@mui/material';\nimport {\n useCallback,\n useState,\n} from 'react';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\nimport { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\n\nimport { API_ORGANIZATION_TOKEN } from '../../constants/api.constants';\nimport { PageContainer } from '../../components/ui/PageContainer';\nimport { ResponseHandler } from '../../components/ui/ResponseHandler';\nimport { useQueryMemo } from '../../hooks/useQueryMemo';\nimport { QueryClientService } from '../../classes/services/QueryClientService';\nimport { COMMON_QUERY_KEY } from '../../constants/query.constants';\nimport { useConfig } from '../../hooks/useConfig';\n\nexport const AcceptInvitationPage = () => {\n const { token } = useParams();\n const config = useConfig();\n const [shouldRegister, setShouldRegister] = useState(false);\n\n const { data, error, isLoading } = useQueryMemo({\n enabled: shouldRegister,\n gcTime: 0,\n queryFn: async ({ signal }) => {\n const response = await rootContainer.resolve(API_ORGANIZATION_TOKEN).userRegistrationsPostOne(token, { signal });\n return response.data;\n },\n queryKey: rootContainer.resolve(QueryClientService).getGenericKey(COMMON_QUERY_KEY.USER_INVITATIONS, token),\n staleTime: 0,\n });\n\n const { t } = useTranslation();\n\n const onGoToHomePageButtonClick = useCallback(() => {\n WindowService.getInstance().window.location.href = '/';\n }, []);\n\n const onCompleteRegistrationButtonClick = useCallback(() => {\n setShouldRegister(true);\n }, []);\n\n return (\n <PageContainer\n singleAction\n testIdAttributes={TestIdUtil.createAttributes('AcceptInvitationPage')}\n title={t`Invitation`}\n >\n <ResponseHandler\n enabled={shouldRegister}\n error={error}\n isLoading={isLoading}\n >\n {!data && (\n <>\n <Box\n sx={{\n marginY: 2,\n }}\n >\n <Typography>\n {t('You have been invited to join {{applicationName}}.', { applicationName: config.applicationName })}\n </Typography>\n </Box>\n <Box\n sx={{\n marginY: 2,\n }}\n >\n <Button\n color={'primary'}\n onClick={onCompleteRegistrationButtonClick}\n type={'submit'}\n >\n {t`Complete registration`}\n </Button>\n </Box>\n </>\n )}\n {data && (\n <>\n <Box>\n <Typography>\n {t('You have been successfully registered to {{applicationName}}.', { applicationName: config.applicationName })}\n </Typography>\n </Box>\n <Box\n sx={{\n marginY: 2,\n }}\n >\n <Button\n color={'primary'}\n onClick={onGoToHomePageButtonClick}\n >\n {t`Click here to visit the home page`}\n </Button>\n </Box>\n </>\n )}\n </ResponseHandler>\n </PageContainer>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAuBA,IAAaI,UAA6B;CACxC,IAAM,EAAE,aAAUC,EAAU,GACtBC,IAASC,EAAU,GACnB,CAACC,GAAgBC,KAAqBC,EAAS,EAAK,GAEpD,EAAE,SAAM,UAAO,iBAAcC,EAAa;EAC9C,SAASH;EACT,QAAQ;EACR,SAAS,OAAO,EAAE,iBAET,MADgBR,EAAc,QAAQa,CAAsB,CAAC,CAAC,yBAAyBC,GAAO,EAAE,UAAO,CAAC,EAAA,CAC/F;EAElB,UAAUd,EAAc,QAAQE,CAAkB,CAAC,CAAC,cAAca,EAAiB,kBAAkBD,CAAK;EAC1G,WAAW;CACb,CAAC,GAEK,EAAE,SAAME,EAAe,GAEvBC,IAA4BC,QAAkB;EAClD,EAAc,YAAY,CAAC,CAAC,OAAO,SAAS,OAAO;CACrD,GAAG,CAAC,CAAC,GAECC,IAAoCD,QAAkB;EAC1D,EAAkB,EAAI;CACxB,GAAG,CAAC,CAAC;CAEL,OACE,kBAACE,GAAD;EACE,cAAA;EACA,kBAAkBC,EAAW,iBAAiB,sBAAsB;EACpE,OAAO,CAAC;EAER,UAAA,kBAACC,GAAD;GACE,SAASd;GACF;GACI;GAHb,UAAA,CAKG,CAACe,KACA,kBAAAtB,GAAA,EAAA,UAAA,CACE,kBAACuB,GAAD;IACE,IAAI,EACF,SAAS,EACX;IAEA,UAAA,kBAACC,GAAD,EAAA,UACGC,EAAE,sDAAsD,EAAE,iBAAiBpB,EAAO,gBAAgB,CAAC,EAC1F,CAAA;GACT,CAAA,GACL,kBAACkB,GAAD;IACE,IAAI,EACF,SAAS,EACX;IAEA,UAAA,kBAACG,GAAD;KACE,OAAO;KACP,SAASR;KACT,MAAM;KAEL,UAAA,CAAC;IACI,CAAA;GACL,CAAA,CACL,EAAA,CAAA,GAEHI,KACC,kBAAAtB,GAAA,EAAA,UAAA,CACE,kBAACuB,GAAD,EAAA,UACE,kBAACC,GAAD,EAAA,UACGC,EAAE,iEAAiE,EAAE,iBAAiBpB,EAAO,gBAAgB,CAAC,EACrG,CAAA,EACT,CAAA,GACL,kBAACkB,GAAD;IACE,IAAI,EACF,SAAS,EACX;IAEA,UAAA,kBAACG,GAAD;KACE,OAAO;KACP,SAASV;KAER,UAAA,CAAC;IACI,CAAA;GACL,CAAA,CACL,EAAA,CAAA,CAEW;;CACJ,CAAA;AAEnB"}
|
|
@@ -1,83 +1,84 @@
|
|
|
1
|
-
import { ADMIN_PAGE_CATEGORY as e } from "../../models/admin.js";
|
|
1
|
+
import { ADMIN_PAGE_CATEGORY as e } from "../../models/admin.models.js";
|
|
2
2
|
import { AuthorizationService as t } from "../../classes/services/AuthorizationService/index.js";
|
|
3
3
|
import { RouterService as n } from "../../classes/services/RouterService/index.js";
|
|
4
4
|
import { PageContainer as r } from "../../components/ui/PageContainer/index.js";
|
|
5
|
-
import {
|
|
6
|
-
import { useCallback as
|
|
7
|
-
import { jsx as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import { container as i } from "tsyringe";
|
|
6
|
+
import { useCallback as a, useMemo as o } from "react";
|
|
7
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
import { Box as l, Card as u, CardActionArea as d, CardContent as f, CardHeader as p, Divider as m, Typography as h, useTheme as g } from "@mui/material";
|
|
9
|
+
import { useTranslation as _ } from "react-i18next";
|
|
10
|
+
import { TestIdUtil as v } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
11
|
+
import { Outlet as y, useLocation as b } from "react-router-dom";
|
|
11
12
|
//#region src/pages/AdminPage/AdminPage.tsx
|
|
12
|
-
var
|
|
13
|
-
let { t:
|
|
14
|
-
let n =
|
|
13
|
+
var x = () => {
|
|
14
|
+
let { t: x } = _(), S = b(), C = g(), w = o(() => i.resolve(n).adminRoutes.map((e) => e.children?.length ? e.children.find((e) => e.index) : e).filter((e) => {
|
|
15
|
+
let n = i.resolve(t).doesUserHavePermission(e.handle.requiredPermissions);
|
|
15
16
|
return !e.handle?.hidden && n;
|
|
16
|
-
}), []),
|
|
17
|
-
[e.ACCESS_RIGHTS]:
|
|
18
|
-
[e.HELPERS]:
|
|
19
|
-
[e.REFERENCE_DATA]:
|
|
20
|
-
[e.SYSTEM]:
|
|
21
|
-
[e.USERS_AND_ORGANIZATIONS]:
|
|
22
|
-
}), [
|
|
17
|
+
}), []), T = o(() => ({
|
|
18
|
+
[e.ACCESS_RIGHTS]: x`Access rights`,
|
|
19
|
+
[e.HELPERS]: x`Helpers`,
|
|
20
|
+
[e.REFERENCE_DATA]: x`Reference data`,
|
|
21
|
+
[e.SYSTEM]: x`System`,
|
|
22
|
+
[e.USERS_AND_ORGANIZATIONS]: x`Users and organizations`
|
|
23
|
+
}), [x]), E = o(() => [
|
|
23
24
|
e.USERS_AND_ORGANIZATIONS,
|
|
24
25
|
e.ACCESS_RIGHTS,
|
|
25
26
|
e.SYSTEM,
|
|
26
27
|
e.REFERENCE_DATA,
|
|
27
28
|
e.HELPERS
|
|
28
29
|
].map((e) => ({
|
|
29
|
-
items:
|
|
30
|
-
label:
|
|
30
|
+
items: w.filter((t) => t.handle.category === e),
|
|
31
|
+
label: T[e],
|
|
31
32
|
name: e
|
|
32
|
-
})).filter((e) => e.items.length), [
|
|
33
|
-
await
|
|
33
|
+
})).filter((e) => e.items.length), [T, w]), D = a(async (e) => {
|
|
34
|
+
await i.resolve(n).router.navigate(e);
|
|
34
35
|
}, []);
|
|
35
|
-
return
|
|
36
|
+
return S?.pathname === "/management" ? /* @__PURE__ */ s(r, {
|
|
36
37
|
showBreadcrumbs: !0,
|
|
37
|
-
testIdAttributes:
|
|
38
|
-
title:
|
|
39
|
-
children: /* @__PURE__ */
|
|
38
|
+
testIdAttributes: v.createAttributes("AdminPage"),
|
|
39
|
+
title: x`Management`,
|
|
40
|
+
children: /* @__PURE__ */ s(l, { children: E.map((e) => /* @__PURE__ */ c(l, {
|
|
40
41
|
sx: {
|
|
41
42
|
marginBottom: 3,
|
|
42
43
|
marginTop: 1
|
|
43
44
|
},
|
|
44
45
|
children: [
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ s(h, {
|
|
46
47
|
component: "h2",
|
|
47
48
|
sx: { marginBottom: 1 },
|
|
48
49
|
variant: "h3",
|
|
49
50
|
children: e.label
|
|
50
51
|
}),
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ s(l, {
|
|
52
53
|
sx: {
|
|
53
54
|
display: "grid",
|
|
54
|
-
gap:
|
|
55
|
+
gap: C.spacing(1),
|
|
55
56
|
gridTemplateColumns: "repeat(1, 1fr)",
|
|
56
|
-
[
|
|
57
|
-
[
|
|
58
|
-
[
|
|
57
|
+
[C.breakpoints.up("lg")]: { gridTemplateColumns: "repeat(3, 1fr)" },
|
|
58
|
+
[C.breakpoints.up("md")]: { gridTemplateColumns: "repeat(2, 1fr)" },
|
|
59
|
+
[C.breakpoints.up("xl")]: { gridTemplateColumns: "repeat(4, 1fr)" }
|
|
59
60
|
},
|
|
60
|
-
children: e.items.map((e) => /* @__PURE__ */
|
|
61
|
+
children: e.items.map((e) => /* @__PURE__ */ s(u, {
|
|
61
62
|
square: !0,
|
|
62
63
|
sx: {
|
|
63
64
|
flexDirection: "column",
|
|
64
65
|
justifyContent: "space-between"
|
|
65
66
|
},
|
|
66
|
-
children: /* @__PURE__ */
|
|
67
|
-
onClick: async () =>
|
|
68
|
-
children: [/* @__PURE__ */
|
|
67
|
+
children: /* @__PURE__ */ c(d, {
|
|
68
|
+
onClick: async () => D(e.path),
|
|
69
|
+
children: [/* @__PURE__ */ s(p, { title: e.handle.title }), /* @__PURE__ */ s(f, { children: e.handle.subTitle })]
|
|
69
70
|
})
|
|
70
71
|
}, e.path))
|
|
71
72
|
}),
|
|
72
|
-
/* @__PURE__ */ m
|
|
73
|
+
/* @__PURE__ */ s(m, { sx: {
|
|
73
74
|
marginBottom: 2,
|
|
74
75
|
marginTop: 2
|
|
75
76
|
} })
|
|
76
77
|
]
|
|
77
78
|
}, e.name)) })
|
|
78
|
-
}) : /* @__PURE__ */
|
|
79
|
+
}) : /* @__PURE__ */ s(y, {});
|
|
79
80
|
};
|
|
80
81
|
//#endregion
|
|
81
|
-
export {
|
|
82
|
+
export { x as AdminPage };
|
|
82
83
|
|
|
83
84
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/pages/AdminPage/AdminPage.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next';\nimport {\n Outlet,\n useLocation,\n} from 'react-router-dom';\nimport {\n Box,\n Card,\n CardActionArea,\n CardContent,\n CardHeader,\n Divider,\n Typography,\n useTheme,\n} from '@mui/material';\nimport {\n useCallback,\n useMemo,\n} from 'react';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\n\nimport { AuthorizationService } from '../../classes/services/AuthorizationService';\nimport { RouterService } from '../../classes/services/RouterService';\nimport { PageContainer } from '../../components/ui/PageContainer';\nimport { ADMIN_PAGE_CATEGORY } from '../../models/admin';\nimport type { MyNonIndexRouteObject } from '../../models/
|
|
1
|
+
{"version":3,"file":"index.js","names":["rootContainer","AdminPage","useTranslation","location","useLocation","theme","useTheme","menuItems","useMemo","container","RouterService","r","child","hasPermission","AuthorizationService","categoryToLabelMap","ADMIN_PAGE_CATEGORY","t","categories","category","c","onCardClick","useCallback","path","PageContainer","TestIdUtil","Box","Typography","Card","CardActionArea","item","CardHeader","CardContent","Divider","Outlet"],"sources":["../../../src/pages/AdminPage/AdminPage.tsx"],"sourcesContent":["import { container as rootContainer } from 'tsyringe';\nimport { useTranslation } from 'react-i18next';\nimport {\n Outlet,\n useLocation,\n} from 'react-router-dom';\nimport {\n Box,\n Card,\n CardActionArea,\n CardContent,\n CardHeader,\n Divider,\n Typography,\n useTheme,\n} from '@mui/material';\nimport {\n useCallback,\n useMemo,\n} from 'react';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\n\nimport { AuthorizationService } from '../../classes/services/AuthorizationService';\nimport { RouterService } from '../../classes/services/RouterService';\nimport { PageContainer } from '../../components/ui/PageContainer';\nimport { ADMIN_PAGE_CATEGORY } from '../../models/admin.models';\nimport type { MyNonIndexRouteObject } from '../../models/react-router.models';\n\n\ntype Category = {\n items: MyNonIndexRouteObject[];\n label: string;\n name: string;\n};\n\nexport const AdminPage = () => {\n const { t } = useTranslation();\n const location = useLocation();\n const theme = useTheme();\n\n const menuItems = useMemo(() => {\n const items = rootContainer.resolve(RouterService).adminRoutes\n .map(r => r.children?.length ? r.children.find(child => child.index) as MyNonIndexRouteObject : r)\n .filter(r => {\n const hasPermission = rootContainer.resolve(AuthorizationService).doesUserHavePermission(r.handle.requiredPermissions);\n return !r.handle?.hidden && hasPermission;\n });\n return items;\n }, []);\n\n const categoryToLabelMap = useMemo<Record<ADMIN_PAGE_CATEGORY, string>>(() => {\n return {\n [ADMIN_PAGE_CATEGORY.ACCESS_RIGHTS]: t`Access rights`,\n [ADMIN_PAGE_CATEGORY.HELPERS]: t`Helpers`,\n [ADMIN_PAGE_CATEGORY.REFERENCE_DATA]: t`Reference data`,\n [ADMIN_PAGE_CATEGORY.SYSTEM]: t`System`,\n [ADMIN_PAGE_CATEGORY.USERS_AND_ORGANIZATIONS]: t`Users and organizations`,\n };\n }, [t]);\n\n\n const categories = useMemo<Category[]>(() => {\n return [\n ADMIN_PAGE_CATEGORY.USERS_AND_ORGANIZATIONS,\n ADMIN_PAGE_CATEGORY.ACCESS_RIGHTS,\n ADMIN_PAGE_CATEGORY.SYSTEM,\n ADMIN_PAGE_CATEGORY.REFERENCE_DATA,\n ADMIN_PAGE_CATEGORY.HELPERS,\n ].map(category => {\n return {\n items: menuItems.filter(r => r.handle.category as ADMIN_PAGE_CATEGORY === category),\n label: categoryToLabelMap[category],\n name: category,\n };\n }).filter(c => c.items.length);\n }, [categoryToLabelMap, menuItems]);\n\n const onCardClick = useCallback(async (path: string) => {\n await rootContainer.resolve(RouterService).router.navigate(path);\n }, []);\n\n if (location?.pathname !== '/management') {\n return (\n <Outlet />\n );\n }\n\n return (\n <PageContainer\n showBreadcrumbs\n testIdAttributes={TestIdUtil.createAttributes('AdminPage')}\n title={t`Management`}\n >\n <Box>\n {categories.map(category => (\n <Box\n key={category.name}\n sx={{\n marginBottom: 3,\n marginTop: 1,\n }}\n >\n <Typography\n component={'h2'}\n sx={{\n marginBottom: 1,\n }}\n variant={'h3'}\n >\n {category.label}\n </Typography>\n <Box\n sx={{\n display: 'grid',\n gap: theme.spacing(1),\n gridTemplateColumns: 'repeat(1, 1fr)',\n [theme.breakpoints.up('lg')]: {\n gridTemplateColumns: 'repeat(3, 1fr)',\n },\n [theme.breakpoints.up('md')]: {\n gridTemplateColumns: 'repeat(2, 1fr)',\n },\n [theme.breakpoints.up('xl')]: {\n gridTemplateColumns: 'repeat(4, 1fr)',\n },\n }}\n >\n {category.items.map(item => (\n <Card\n key={item.path}\n square\n sx={{\n flexDirection: 'column',\n justifyContent: 'space-between',\n }}\n >\n <CardActionArea\n // eslint-disable-next-line @eslint-react/kit/jsx-no-bind\n onClick={async () => onCardClick(item.path)}\n >\n <CardHeader title={item.handle.title} />\n <CardContent>\n {item.handle.subTitle}\n </CardContent>\n </CardActionArea>\n </Card>\n ))}\n </Box>\n <Divider\n sx={{\n marginBottom: 2,\n marginTop: 2,\n }}\n />\n </Box>\n ))}\n </Box>\n </PageContainer>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAmCA,IAAaC,UAAkB;CAC7B,IAAM,EAAE,SAAMC,EAAe,GACvBC,IAAWC,EAAY,GACvBC,IAAQC,EAAS,GAEjBC,IAAYC,QACFR,EAAc,QAAQU,CAAa,CAAC,CAAC,YAChD,KAAI,MAAKC,EAAE,UAAU,SAASA,EAAE,SAAS,MAAK,MAASC,EAAM,KAAK,IAA6BD,CAAC,CAAC,CACjG,QAAO,MAAK;EACX,IAAME,IAAgBb,EAAc,QAAQc,CAAoB,CAAC,CAAC,uBAAuBH,EAAE,OAAO,mBAAmB;EACrH,OAAO,CAACA,EAAE,QAAQ,UAAUE;CAC9B,CACK,GACN,CAAC,CAAC,GAECE,IAAqBP,SAClB;GACJQ,EAAoB,gBAAgB,CAAC;GACrCA,EAAoB,UAAU,CAAC;GAC/BA,EAAoB,iBAAiB,CAAC;GACtCA,EAAoB,SAAS,CAAC;GAC9BA,EAAoB,0BAA0B,CAAC;CAClD,IACC,CAACC,CAAC,CAAC,GAGAC,IAAaV,QACV;EACLQ,EAAoB;EACpBA,EAAoB;EACpBA,EAAoB;EACpBA,EAAoB;EACpBA,EAAoB;CACtB,CAAC,CAAC,KAAI,OACG;EACL,OAAOT,EAAU,QAAO,MAAKI,EAAE,OAAO,aAAoCQ,CAAQ;EAClF,OAAOJ,EAAmBI;EAC1B,MAAMA;CACR,EACD,CAAC,CAAC,QAAO,MAAKC,EAAE,MAAM,MAAM,GAC5B,CAACL,GAAoBR,CAAS,CAAC,GAE5Bc,IAAcC,EAAY,OAAO,MAAiB;EACtD,MAAMtB,EAAc,QAAQU,CAAa,CAAC,CAAC,OAAO,SAASa,CAAI;CACjE,GAAG,CAAC,CAAC;CAQL,OANIpB,GAAU,aAAa,gBAOzB,kBAACqB,GAAD;EACE,iBAAA;EACA,kBAAkBC,EAAW,iBAAiB,WAAW;EACzD,OAAO,CAAC;EAER,UAAA,kBAACC,GAAD,EAAA,UACGR,EAAW,KAAI,MACd,kBAACQ,GAAD;GAEE,IAAI;IACF,cAAc;IACd,WAAW;GACb;GALF,UAAA;IAOE,kBAACC,GAAD;KACE,WAAW;KACX,IAAI,EACF,cAAc,EAChB;KACA,SAAS;KAER,UAAAR,EAAS;IACA,CAAA;IACZ,kBAACO,GAAD;KACE,IAAI;MACF,SAAS;MACT,KAAKrB,EAAM,QAAQ,CAAC;MACpB,qBAAqB;OACpBA,EAAM,YAAY,GAAG,IAAI,IAAI,EAC5B,qBAAqB,iBACvB;OACCA,EAAM,YAAY,GAAG,IAAI,IAAI,EAC5B,qBAAqB,iBACvB;OACCA,EAAM,YAAY,GAAG,IAAI,IAAI,EAC5B,qBAAqB,iBACvB;KACF;KAEC,UAAAc,EAAS,MAAM,KAAI,MAClB,kBAACS,GAAD;MAEE,QAAA;MACA,IAAI;OACF,eAAe;OACf,gBAAgB;MAClB;MAEA,UAAA,kBAACC,GAAD;OAEE,SAAS,YAAYR,EAAYS,EAAK,IAAI;OAF5C,UAAA,CAIE,kBAACC,GAAD,EAAY,OAAOD,EAAK,OAAO,MAAQ,CAAA,GACvC,kBAACE,GAAD,EAAA,UACGF,EAAK,OAAO,SACF,CAAA,CACC;;KACZ,GAhBCA,EAAK,IAgBN,CACP;IACE,CAAA;IACL,kBAACG,GAAD,EACE,IAAI;KACF,cAAc;KACd,WAAW;IACb,EACD,CAAA;GACE;EA1DE,GAAAd,EAAS,IA0DX,CACN,EACE,CAAA;CACQ,CAAA,IA1Eb,kBAACe,GAAD,CAAS,CAAA;AA4Ef"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IdentityProviderWithAvailability } from '../../models/auth';
|
|
1
|
+
import { IdentityProviderWithAvailability } from '../../models/auth.models';
|
|
2
2
|
export type ChooseIdentityProviderPageProps = {
|
|
3
3
|
readonly identityProvidersWithAvailability: IdentityProviderWithAvailability[];
|
|
4
4
|
};
|
|
@@ -1,85 +1,86 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useConfig as e } from "../../hooks/useConfig/index.js";
|
|
2
2
|
import { PageContainer as t } from "../../components/ui/PageContainer/index.js";
|
|
3
3
|
import { AuthenticationService as n } from "../../classes/services/AuthenticationService/index.js";
|
|
4
|
-
import {
|
|
5
|
-
import { useCallback as
|
|
6
|
-
import { jsx as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { container as r } from "tsyringe";
|
|
5
|
+
import { useCallback as i, useMemo as a } from "react";
|
|
6
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
+
import { Alert as c, AlertTitle as l, Box as u, Button as d, Tooltip as f, Typography as p } from "@mui/material";
|
|
8
|
+
import { useTranslation as m } from "react-i18next";
|
|
9
|
+
import { TestIdUtil as h } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
9
10
|
//#region src/pages/ChooseIdentityProviderPage/ChooseIdentityProviderPage.tsx
|
|
10
|
-
var
|
|
11
|
-
let { t:
|
|
11
|
+
var g = ({ identityProvidersWithAvailability: g }) => {
|
|
12
|
+
let { t: _ } = m(), v = e(), y = v.login?.AfterIdentityProviderSelection, b = i((e) => {
|
|
12
13
|
let t = e.target.getAttribute("data-name");
|
|
13
|
-
|
|
14
|
-
}, [
|
|
14
|
+
r.resolve(n).next(g.find((e) => e.provider.name === t).provider);
|
|
15
|
+
}, [g]), x = a(() => g?.filter((e) => e.isAvailable) ?? [], [g]), S = i(() => {
|
|
15
16
|
window.location.reload();
|
|
16
|
-
}, []),
|
|
17
|
+
}, []), C = a(() => /* @__PURE__ */ o(d, {
|
|
17
18
|
color: "inherit",
|
|
18
|
-
onClick:
|
|
19
|
+
onClick: S,
|
|
19
20
|
sx: { marginTop: 2 },
|
|
20
21
|
variant: "outlined",
|
|
21
|
-
children:
|
|
22
|
-
}), [
|
|
23
|
-
return /* @__PURE__ */
|
|
22
|
+
children: _("Refresh")
|
|
23
|
+
}), [S, _]);
|
|
24
|
+
return /* @__PURE__ */ s(t, {
|
|
24
25
|
singleAction: !0,
|
|
25
|
-
testIdAttributes:
|
|
26
|
-
title:
|
|
26
|
+
testIdAttributes: h.createAttributes("ChooseIdentityProviderPage"),
|
|
27
|
+
title: _`Choose identity provider`,
|
|
27
28
|
children: [
|
|
28
|
-
|
|
29
|
+
x.length === 0 && /* @__PURE__ */ o(u, {
|
|
29
30
|
sx: {
|
|
30
31
|
marginBottom: 4,
|
|
31
32
|
marginTop: 1
|
|
32
33
|
},
|
|
33
|
-
children: /* @__PURE__ */
|
|
34
|
+
children: /* @__PURE__ */ s(c, {
|
|
34
35
|
severity: "error",
|
|
35
|
-
children: [/* @__PURE__ */
|
|
36
|
+
children: [/* @__PURE__ */ o(l, { children: _("No identity providers are currently available. Please try again later.") }), C]
|
|
36
37
|
})
|
|
37
38
|
}),
|
|
38
|
-
|
|
39
|
+
x.length > 0 && x.length !== g.length && /* @__PURE__ */ o(u, {
|
|
39
40
|
sx: {
|
|
40
41
|
marginBottom: 4,
|
|
41
42
|
marginTop: 1
|
|
42
43
|
},
|
|
43
|
-
children: /* @__PURE__ */
|
|
44
|
+
children: /* @__PURE__ */ s(c, {
|
|
44
45
|
severity: "info",
|
|
45
|
-
children: [/* @__PURE__ */
|
|
46
|
+
children: [/* @__PURE__ */ o(l, { children: _("Some identity providers are currently unavailable.") }), C]
|
|
46
47
|
})
|
|
47
48
|
}),
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ s(u, {
|
|
49
50
|
sx: { textAlign: "center" },
|
|
50
51
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ o(p, {
|
|
52
53
|
sx: { marginBottom: 2 },
|
|
53
54
|
variant: "h1",
|
|
54
|
-
children:
|
|
55
|
+
children: _("Welcome to {{applicationName}}", { applicationName: v.applicationName })
|
|
55
56
|
}),
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ o(p, {
|
|
57
58
|
sx: { marginBottom: 2 },
|
|
58
|
-
children:
|
|
59
|
+
children: _`Please login with one of the following identity providers:`
|
|
59
60
|
}),
|
|
60
|
-
|
|
61
|
-
let t = /* @__PURE__ */ d
|
|
61
|
+
g.map((e) => {
|
|
62
|
+
let t = /* @__PURE__ */ o(d, {
|
|
62
63
|
"data-name": e.provider.name,
|
|
63
64
|
disabled: !e.isAvailable,
|
|
64
|
-
onClick:
|
|
65
|
+
onClick: b,
|
|
65
66
|
children: e.provider.label
|
|
66
67
|
});
|
|
67
|
-
return /* @__PURE__ */
|
|
68
|
+
return /* @__PURE__ */ s(u, {
|
|
68
69
|
sx: { marginY: 2 },
|
|
69
|
-
children: [e.isAvailable && t, !e.isAvailable && /* @__PURE__ */
|
|
70
|
+
children: [e.isAvailable && t, !e.isAvailable && /* @__PURE__ */ o(f, {
|
|
70
71
|
arrow: !0,
|
|
71
|
-
title: e.isAvailable ? "" :
|
|
72
|
-
children: /* @__PURE__ */
|
|
72
|
+
title: e.isAvailable ? "" : _("This identity provider is currently unavailable. Please try again later."),
|
|
73
|
+
children: /* @__PURE__ */ o("span", { children: t })
|
|
73
74
|
})]
|
|
74
75
|
}, e.provider.name);
|
|
75
76
|
}),
|
|
76
|
-
|
|
77
|
+
y && /* @__PURE__ */ o(y, {})
|
|
77
78
|
]
|
|
78
79
|
})
|
|
79
80
|
]
|
|
80
81
|
});
|
|
81
82
|
};
|
|
82
83
|
//#endregion
|
|
83
|
-
export {
|
|
84
|
+
export { g as ChooseIdentityProviderPage };
|
|
84
85
|
|
|
85
86
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/pages/ChooseIdentityProviderPage/ChooseIdentityProviderPage.tsx"],"sourcesContent":["import {\n Alert,\n AlertTitle,\n Box,\n Button,\n Tooltip,\n Typography,\n} from '@mui/material';\nimport type { MouseEvent } from 'react';\nimport {\n useCallback,\n useMemo,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\n\nimport { AuthenticationService } from '../../classes/services/AuthenticationService';\nimport {
|
|
1
|
+
{"version":3,"file":"index.js","names":["ChooseIdentityProviderPage","useTranslation","config","useConfig","AfterIdentityProviderSelection","onIdentityProviderButtonClick","useCallback","name","event","AuthenticationService","identityProvidersWithAvailability","identityProviderWithAvailability","availableIdentityProviders","useMemo","x","onRefreshButtonClick","refreshButton","Button","t","PageContainer","TestIdUtil","Box","Alert","AlertTitle","Typography","button","Tooltip"],"sources":["../../../src/pages/ChooseIdentityProviderPage/ChooseIdentityProviderPage.tsx"],"sourcesContent":["import { container as rootContainer } from 'tsyringe';\nimport {\n Alert,\n AlertTitle,\n Box,\n Button,\n Tooltip,\n Typography,\n} from '@mui/material';\nimport type { MouseEvent } from 'react';\nimport {\n useCallback,\n useMemo,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\n\nimport { AuthenticationService } from '../../classes/services/AuthenticationService';\nimport { PageContainer } from '../../components/ui/PageContainer';\nimport type { IdentityProviderWithAvailability } from '../../models/auth.models';\nimport { useConfig } from '../../hooks/useConfig';\n\nexport type ChooseIdentityProviderPageProps = {\n readonly identityProvidersWithAvailability: IdentityProviderWithAvailability[];\n};\n\nexport const ChooseIdentityProviderPage = ({\n identityProvidersWithAvailability,\n}: ChooseIdentityProviderPageProps) => {\n const { t } = useTranslation();\n const config = useConfig();\n\n const AfterIdentityProviderSelection = config.login?.AfterIdentityProviderSelection;\n\n const onIdentityProviderButtonClick = useCallback(\n (event: MouseEvent<HTMLButtonElement>) => {\n const name = (event.target as HTMLButtonElement).getAttribute(\n 'data-name',\n );\n\n rootContainer.resolve(AuthenticationService).next(\n identityProvidersWithAvailability.find(\n (identityProviderWithAvailability) =>\n identityProviderWithAvailability.provider.name === name,\n ).provider,\n );\n },\n [identityProvidersWithAvailability],\n );\n\n const availableIdentityProviders = useMemo<\n IdentityProviderWithAvailability[]\n >(() => {\n return (\n identityProvidersWithAvailability?.filter((x) => x.isAvailable) ?? []\n );\n }, [identityProvidersWithAvailability]);\n\n const onRefreshButtonClick = useCallback(() => {\n window.location.reload();\n }, []);\n\n const refreshButton = useMemo(\n () => (\n <Button\n color={'inherit'}\n onClick={onRefreshButtonClick}\n sx={{ marginTop: 2 }}\n variant={'outlined'}\n >\n {t('Refresh')}\n </Button>\n ),\n [onRefreshButtonClick, t],\n );\n\n return (\n <PageContainer\n singleAction\n testIdAttributes={TestIdUtil.createAttributes(\n 'ChooseIdentityProviderPage',\n )}\n title={t`Choose identity provider`}\n >\n {availableIdentityProviders.length === 0 && (\n <Box\n sx={{\n marginBottom: 4,\n marginTop: 1,\n }}\n >\n <Alert severity={'error'}>\n <AlertTitle>\n {t(\n 'No identity providers are currently available. Please try again later.',\n )}\n </AlertTitle>\n {refreshButton}\n </Alert>\n </Box>\n )}\n {availableIdentityProviders.length > 0 && availableIdentityProviders.length !==\n identityProvidersWithAvailability.length && (\n <Box\n sx={{\n marginBottom: 4,\n marginTop: 1,\n }}\n >\n <Alert severity={'info'}>\n <AlertTitle>\n {t('Some identity providers are currently unavailable.')}\n </AlertTitle>\n {refreshButton}\n </Alert>\n </Box>\n )}\n <Box sx={{ textAlign: 'center' }}>\n <Typography\n sx={{\n marginBottom: 2,\n }}\n variant={'h1'}\n >\n {t('Welcome to {{applicationName}}', {\n applicationName: config.applicationName,\n })}\n </Typography>\n <Typography\n sx={{\n marginBottom: 2,\n }}\n >\n {t`Please login with one of the following identity providers:`}\n </Typography>\n {identityProvidersWithAvailability.map(\n (identityProviderWithAvailability) => {\n const button = (\n <Button\n data-name={identityProviderWithAvailability.provider.name}\n disabled={!identityProviderWithAvailability.isAvailable}\n onClick={onIdentityProviderButtonClick}\n >\n {identityProviderWithAvailability.provider.label}\n </Button>\n );\n return (\n <Box\n key={identityProviderWithAvailability.provider.name}\n sx={{\n marginY: 2,\n }}\n >\n {identityProviderWithAvailability.isAvailable && button}\n {!identityProviderWithAvailability.isAvailable && (\n <Tooltip\n arrow\n title={\n identityProviderWithAvailability.isAvailable\n ? ''\n : t(\n 'This identity provider is currently unavailable. Please try again later.',\n )\n }\n >\n <span>\n {button}\n </span>\n </Tooltip>\n )}\n </Box>\n );\n },\n )}\n {AfterIdentityProviderSelection && <AfterIdentityProviderSelection />}\n </Box>\n </PageContainer>\n );\n};\n"],"mappings":";;;;;;;;;;AA0BA,IAAaA,KAA8B,EACzC,2CACqC;CACrC,IAAM,EAAE,SAAMC,EAAe,GACvBC,IAASC,EAAU,GAEnBC,IAAiCF,EAAO,OAAO,gCAE/CG,IAAgCC,GACnC,MAAyC;EACxC,IAAMC,IAAQC,EAAM,OAA6B,aAC/C,WACF;EAEA,EAAc,QAAQC,CAAqB,CAAC,CAAC,KAC3CC,EAAkC,MAC/B,MACCC,EAAiC,SAAS,SAASJ,CACvD,CAAC,CAAC,QACJ;CACF,GACA,CAACG,CAAiC,CACpC,GAEME,IAA6BC,QAI/BH,GAAmC,QAAQ,MAAMI,EAAE,WAAW,KAAK,CAAC,GAErE,CAACJ,CAAiC,CAAC,GAEhCK,IAAuBT,QAAkB;EAC7C,OAAO,SAAS,OAAO;CACzB,GAAG,CAAC,CAAC,GAECU,IAAgBH,QAElB,kBAACI,GAAD;EACE,OAAO;EACP,SAASF;EACT,IAAI,EAAE,WAAW,EAAE;EACnB,SAAS;EAER,UAAAG,EAAE,SAAS;CACN,CAAA,GAEV,CAACH,GAAsBG,CAAC,CAC1B;CAEA,OACE,kBAACC,GAAD;EACE,cAAA;EACA,kBAAkBC,EAAW,iBAC3B,4BACF;EACA,OAAO,CAAC;EALV,UAAA;GAOGR,EAA2B,WAAW,KACrC,kBAACS,GAAD;IACE,IAAI;KACF,cAAc;KACd,WAAW;IACb;IAEA,UAAA,kBAACC,GAAD;KAAO,UAAU;KAAjB,UAAA,CACE,kBAACC,GAAD,EAAA,UACGL,EACC,wEACF,EACU,CAAA,GACXF,CACI;;GACJ,CAAA;GAENJ,EAA2B,SAAS,KAAKA,EAA2B,WACnEF,EAAkC,UAClC,kBAACW,GAAD;IACE,IAAI;KACF,cAAc;KACd,WAAW;IACb;IAEA,UAAA,kBAACC,GAAD;KAAO,UAAU;KAAjB,UAAA,CACE,kBAACC,GAAD,EAAA,UACGL,EAAE,oDAAoD,EAC7C,CAAA,GACXF,CACI;;GACJ,CAAA;GAEP,kBAACK,GAAD;IAAK,IAAI,EAAE,WAAW,SAAS;IAA/B,UAAA;KACE,kBAACG,GAAD;MACE,IAAI,EACF,cAAc,EAChB;MACA,SAAS;MAER,UAAAN,EAAE,kCAAkC,EACnC,iBAAiBhB,EAAO,gBAC1B,CAAC;KACS,CAAA;KACZ,kBAACsB,GAAD;MACE,IAAI,EACF,cAAc,EAChB;MAEC,UAAA,CAAC;KACQ,CAAA;KACXd,EAAkC,KAChC,MAAqC;MACpC,IAAMe,IACJ,kBAACR,GAAD;OACE,aAAWN,EAAiC,SAAS;OACrD,UAAU,CAACA,EAAiC;OAC5C,SAASN;OAER,UAAAM,EAAiC,SAAS;MACrC,CAAA;MAEV,OACE,kBAACU,GAAD;OAEE,IAAI,EACF,SAAS,EACX;OAJF,UAAA,CAMGV,EAAiC,eAAec,GAChD,CAACd,EAAiC,eACjC,kBAACe,GAAD;QACE,OAAA;QACA,OACEf,EAAiC,cAC7B,KACAO,EACA,0EACF;QAGJ,UAAA,kBAAC,QAAD,EAAA,UACGO,EACG,CAAA;OACC,CAAA,CAER;MAtBE,GAAAd,EAAiC,SAAS,IAsB5C;KAET,CACF;KACCP,KAAkC,kBAACA,GAAD,CAAiC,CAAA;IACjE;;EACQ;;AAEnB"}
|
|
@@ -2,16 +2,16 @@ import { ReactElement } from 'react';
|
|
|
2
2
|
import { ObjectSchema } from 'yup';
|
|
3
3
|
import { FieldValues, UseFormReturn } from 'react-hook-form';
|
|
4
4
|
import { CommonDbApiPermission } from '@gen-epix/api-commondb';
|
|
5
|
-
import { PropsWithTestIdAttributes } from '@gen-epix/ui-core/models/
|
|
6
|
-
import { FormFieldDefinition } from '@gen-epix/ui-core-form/models/form';
|
|
5
|
+
import { PropsWithTestIdAttributes } from '@gen-epix/ui-core/models/test-id.models';
|
|
6
|
+
import { FormFieldDefinition } from '@gen-epix/ui-core-form/models/form.models';
|
|
7
7
|
import { DialogAction } from '@gen-epix/ui-core-components/components/Dialog';
|
|
8
8
|
import { MutationContextCreate } from '../../hooks/useCreateMutation';
|
|
9
9
|
import { MutationContextDelete } from '../../hooks/useDeleteMutation';
|
|
10
10
|
import { MutationContextEdit } from '../../hooks/useEditMutation';
|
|
11
|
-
import { GenericData } from '../../models/data';
|
|
12
|
-
import { Loadable } from '../../models/
|
|
13
|
-
import { TableColumn, TableRowParams, TableSortDirection } from '../../models/table';
|
|
14
|
-
import { COMMON_QUERY_KEY } from '../../constants/query';
|
|
11
|
+
import { GenericData } from '../../models/data.models';
|
|
12
|
+
import { Loadable } from '../../models/data-hooks.models';
|
|
13
|
+
import { TableColumn, TableRowParams, TableSortDirection } from '../../models/table.models';
|
|
14
|
+
import { COMMON_QUERY_KEY } from '../../constants/query.constants';
|
|
15
15
|
export type CrudPageProps<TFormFields extends FieldValues, TData extends GenericData, TTableData extends TData = TData, TQueryKey extends string = COMMON_QUERY_KEY, TApiPermission extends {
|
|
16
16
|
command_name: string;
|
|
17
17
|
permission_type: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WithDialogRefMethods, WithDialogRenderProps } from '@gen-epix/ui-core-components/hoc/withDialog';
|
|
2
|
-
import { GenericData } from '../../models/data';
|
|
2
|
+
import { GenericData } from '../../models/data.models';
|
|
3
3
|
export interface CrudPageDeleteDialogOpenProps<TData extends GenericData> {
|
|
4
4
|
readonly item: TData;
|
|
5
5
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AnyObject, ObjectSchema } from 'yup';
|
|
2
2
|
import { UseFormReturn } from 'react-hook-form';
|
|
3
|
-
import { FormFieldDefinition } from '@gen-epix/ui-core-form/models/form';
|
|
3
|
+
import { FormFieldDefinition } from '@gen-epix/ui-core-form/models/form.models';
|
|
4
4
|
import { DialogAction } from '@gen-epix/ui-core-components/components/Dialog';
|
|
5
5
|
import { WithDialogRefMethods, WithDialogRenderProps } from '@gen-epix/ui-core-components/hoc/withDialog';
|
|
6
|
-
import { GenericData } from '../../models/data';
|
|
6
|
+
import { GenericData } from '../../models/data.models';
|
|
7
7
|
export interface CrudPageEditDialogOpenProps<TData extends GenericData> {
|
|
8
8
|
readonly canSave: boolean;
|
|
9
9
|
readonly extraActionsFactory?: (item: TData) => DialogAction[];
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as CrudPage };
|
|
1
|
+
export { t as CrudPage } from "../../_chunks/CrudPage.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/pages/ErrorPage/ErrorPage.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\n\nimport { GenericErrorMessage } from '../../components/ui/GenericErrorMessage';\nimport { PageContainer } from '../../components/ui/PageContainer';\n\nexport type ErrorPageProps = {\n readonly error?: unknown;\n};\n\nexport const ErrorPage = ({ error }: ErrorPageProps) => {\n const { t } = useTranslation();\n\n return (\n <PageContainer\n singleAction\n testIdAttributes={TestIdUtil.createAttributes('ErrorPage')}\n title={t`Error`}\n >\n <GenericErrorMessage\n error={error}\n />\n </PageContainer>\n );\n};\n"],"mappings":";;;;;;AAUA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["ErrorPage","useTranslation","PageContainer","TestIdUtil","GenericErrorMessage"],"sources":["../../../src/pages/ErrorPage/ErrorPage.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\n\nimport { GenericErrorMessage } from '../../components/ui/GenericErrorMessage';\nimport { PageContainer } from '../../components/ui/PageContainer';\n\nexport type ErrorPageProps = {\n readonly error?: unknown;\n};\n\nexport const ErrorPage = ({ error }: ErrorPageProps) => {\n const { t } = useTranslation();\n\n return (\n <PageContainer\n singleAction\n testIdAttributes={TestIdUtil.createAttributes('ErrorPage')}\n title={t`Error`}\n >\n <GenericErrorMessage\n error={error}\n />\n </PageContainer>\n );\n};\n"],"mappings":";;;;;;AAUA,IAAaA,KAAa,EAAE,eAA4B;CACtD,IAAM,EAAE,SAAMC,EAAe;CAE7B,OACE,kBAACC,GAAD;EACE,cAAA;EACA,kBAAkBC,EAAW,iBAAiB,WAAW;EACzD,OAAO,CAAC;EAER,UAAA,kBAACC,GAAD,EACS,SACR,CAAA;CACY,CAAA;AAEnB"}
|