@gen-epix/ui-client-common 4.3.2 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/containers/UiClientCommonContainer/UiClientCommonContainer.d.ts +5 -0
- package/dist/classes/containers/UiClientCommonContainer/index.d.ts +1 -0
- package/dist/classes/containers/UiClientCommonContainer/index.js +17 -0
- package/dist/classes/containers/UiClientCommonContainer/index.js.map +1 -0
- 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/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/api.models.d.ts +16 -0
- package/dist/models/api.models.js +6 -0
- package/dist/models/api.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/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 +92 -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/api.d.ts +0 -9
- package/dist/models/table.js.map +0 -1
- package/dist/models/theme.js +0 -0
- /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/{auth.d.ts → auth.models.d.ts} +0 -0
- /package/dist/models/{api.js → auth.models.js} +0 -0
- /package/dist/models/{config.d.ts → config.models.d.ts} +0 -0
- /package/dist/models/{auth.js → config.models.js} +0 -0
- /package/dist/models/{config.js → data-hooks.models.js} +0 -0
- /package/dist/models/{data.d.ts → data.models.d.ts} +0 -0
- /package/dist/models/{data.js → data.models.js} +0 -0
- /package/dist/models/{filter.d.ts → filter.models.d.ts} +0 -0
- /package/dist/models/{dataHooks.js → filter.models.js} +0 -0
- /package/dist/models/{notification.d.ts → notification.models.d.ts} +0 -0
- /package/dist/models/{filter.js → notification.models.js} +0 -0
- /package/dist/models/{outage.d.ts → outage.models.d.ts} +0 -0
- /package/dist/models/{notification.js → outage.models.js} +0 -0
- /package/dist/models/{reactRouter.d.ts → react-router.models.d.ts} +0 -0
- /package/dist/models/{outage.js → react-router.models.js} +0 -0
- /package/dist/models/{theme.d.ts → theme.models.d.ts} +0 -0
- /package/dist/models/{reactRouter.js → theme.models.js} +0 -0
package/dist/_chunks/Table.js
CHANGED
|
@@ -2,13 +2,13 @@ import { n as e, t } from "./rolldown-runtime.js";
|
|
|
2
2
|
import { i as n, n as r, o as i, r as a, s as o, t as s } from "./TextFilter.js";
|
|
3
3
|
import { n as c, r as l, t as u } from "./TableUtil.js";
|
|
4
4
|
import { f as d } from "./isArrayLike.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { PageEventBusService as
|
|
10
|
-
import { t as
|
|
11
|
-
import {
|
|
5
|
+
import { n as f, r as p } from "./QueryClientService.js";
|
|
6
|
+
import { TABLE_COLUMN_FROZEN as m } from "../models/table.models.js";
|
|
7
|
+
import { t as h } from "./react.js";
|
|
8
|
+
import { t as g } from "./tableStore.js";
|
|
9
|
+
import { PageEventBusService as _ } from "../classes/services/PageEventBusService/index.js";
|
|
10
|
+
import { t as v } from "./omit.js";
|
|
11
|
+
import { useConfig as y } from "../hooks/useConfig/index.js";
|
|
12
12
|
import { n as b, t as x } from "./useColumnsMenu.js";
|
|
13
13
|
import { t as S } from "./GeoFilter.js";
|
|
14
14
|
import { BooleanFilterField as C } from "../components/filters/BooleanFilterField/index.js";
|
|
@@ -16,42 +16,43 @@ import { DateFilterField as w } from "../components/filters/DateFilterField/inde
|
|
|
16
16
|
import { GeoFilterField as T } from "../components/filters/GeoFilterField/index.js";
|
|
17
17
|
import { MultiSelectFilterField as E } from "../components/filters/MultiSelectFilterField/index.js";
|
|
18
18
|
import { NumberRangeFilterField as D } from "../components/filters/NumberRangeFilterField/index.js";
|
|
19
|
-
import { TextFilterField as
|
|
20
|
-
import { SidebarItem as
|
|
21
|
-
import { WindowService as
|
|
22
|
-
import { t as
|
|
23
|
-
import {
|
|
24
|
-
import * as
|
|
25
|
-
import
|
|
26
|
-
import { Fragment as
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
19
|
+
import { TextFilterField as ee } from "../components/filters/TextFilterField/index.js";
|
|
20
|
+
import { SidebarItem as O, SidebarMenu as te, SidebarMenuItem as k } from "../components/ui/Sidebar/index.js";
|
|
21
|
+
import { WindowService as ne } from "@gen-epix/ui-core/classes/services/WindowService";
|
|
22
|
+
import { t as A } from "i18next";
|
|
23
|
+
import { container as re } from "tsyringe";
|
|
24
|
+
import * as j from "react";
|
|
25
|
+
import ie, { Fragment as ae, createContext as oe, forwardRef as se, use as ce, useCallback as M, useEffect as N, useId as P, useImperativeHandle as le, useLayoutEffect as ue, useMemo as F, useRef as I, useState as L } from "react";
|
|
26
|
+
import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
|
|
27
|
+
import { Box as V, Button as de, Checkbox as fe, Divider as pe, FormControlLabel as H, FormGroup as me, IconButton as U, Menu as he, Paper as ge, Popover as _e, Tooltip as ve, Typography as ye, alpha as be, darken as xe, lighten as Se, styled as Ce, useTheme as we } from "@mui/material";
|
|
28
|
+
import { useTranslation as W } from "react-i18next";
|
|
29
|
+
import { TestIdUtil as G } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
30
|
+
import { TableVirtuoso as Te } from "react-virtuoso";
|
|
31
|
+
import { useScrollbarSize as Ee } from "@gen-epix/ui-core/hooks/useScrollbarSize";
|
|
32
|
+
import { visuallyHidden as De } from "@mui/utils";
|
|
33
|
+
import Oe from "@mui/icons-material/ArrowDownward";
|
|
34
|
+
import ke from "@mui/icons-material/FilterAlt";
|
|
35
|
+
import { FormProvider as Ae, useForm as K, useFormContext as je, useWatch as Me } from "react-hook-form";
|
|
36
|
+
import Ne from "@mui/icons-material/MoreVert";
|
|
37
|
+
import { withDialog as q } from "@gen-epix/ui-core-components/hoc/withDialog";
|
|
38
|
+
import { DndContext as Pe, DragOverlay as J, KeyboardSensor as Y, PointerSensor as Fe, defaultDropAnimationSideEffects as Ie, useSensor as Le, useSensors as Re } from "@dnd-kit/core";
|
|
39
|
+
import { SortableContext as X, arrayMove as ze, sortableKeyboardCoordinates as Be, useSortable as Ve } from "@dnd-kit/sortable";
|
|
40
|
+
import { CSS as He } from "@dnd-kit/utilities";
|
|
41
|
+
import Ue from "@mui/icons-material/DragIndicator";
|
|
42
|
+
import We from "@mui/icons-material/IndeterminateCheckBox";
|
|
43
|
+
import Ge from "@mui/icons-material/Check";
|
|
44
|
+
import Ke from "@mui/icons-material/RestartAlt";
|
|
45
|
+
import qe from "@mui/icons-material/Close";
|
|
46
|
+
import { NestedDropdown as Je } from "@gen-epix/ui-core-components/components/NestedMenu";
|
|
46
47
|
//#region ../../node_modules/.pnpm/use-debounce@10.1.1_react@19.3.0/node_modules/use-debounce/dist/index.module.js
|
|
47
|
-
var
|
|
48
|
-
function
|
|
49
|
-
var i = this, a =
|
|
48
|
+
var Ye = /* @__PURE__ */ e(c(), 1), Xe = /* @__PURE__ */ e(n(), 1), Ze = /* @__PURE__ */ e(p(), 1), Qe = /* @__PURE__ */ e(v(), 1);
|
|
49
|
+
function $e(e, t, n, r) {
|
|
50
|
+
var i = this, a = I(null), o = I(0), s = I(0), c = I(null), l = I([]), u = I(), d = I(), f = I(e), p = I(!0), m = I(), h = I();
|
|
50
51
|
f.current = e;
|
|
51
52
|
var g = typeof window < "u", _ = !t && t !== 0 && g;
|
|
52
53
|
if (typeof e != "function") throw TypeError("Expected a function");
|
|
53
54
|
t = +t || 0;
|
|
54
|
-
var v = !!(n ||= {}).leading, y = !("trailing" in n) || !!n.trailing, b = !!n.flushOnExit && y, x = "maxWait" in n, S = "debounceOnServer" in n && !!n.debounceOnServer, C = x ? Math.max(+n.maxWait || 0, t) : null, w =
|
|
55
|
+
var v = !!(n ||= {}).leading, y = !("trailing" in n) || !!n.trailing, b = !!n.flushOnExit && y, x = "maxWait" in n, S = "debounceOnServer" in n && !!n.debounceOnServer, C = x ? Math.max(+n.maxWait || 0, t) : null, w = F(function() {
|
|
55
56
|
var e = function(e) {
|
|
56
57
|
var t = l.current, n = u.current;
|
|
57
58
|
return l.current = u.current = null, o.current = e, s.current = s.current || e, d.current = f.current.apply(n, t);
|
|
@@ -72,7 +73,7 @@ function Ze(e, t, n, r) {
|
|
|
72
73
|
}
|
|
73
74
|
}, D = function() {
|
|
74
75
|
r && r({});
|
|
75
|
-
},
|
|
76
|
+
}, ee = function() {
|
|
76
77
|
if (g || S) {
|
|
77
78
|
var r, s = Date.now(), f = w(s);
|
|
78
79
|
if (l.current = [].slice.call(arguments), u.current = i, a.current = s, b && !m.current && (m.current = function() {
|
|
@@ -84,14 +85,14 @@ function Ze(e, t, n, r) {
|
|
|
84
85
|
return c.current || n(E, t), d.current;
|
|
85
86
|
}
|
|
86
87
|
};
|
|
87
|
-
return
|
|
88
|
+
return ee.cancel = function() {
|
|
88
89
|
var e = c.current;
|
|
89
90
|
e && (_ ? cancelAnimationFrame(c.current) : clearTimeout(c.current)), o.current = 0, l.current = a.current = u.current = c.current = null, e && r && r({});
|
|
90
|
-
},
|
|
91
|
+
}, ee.isPending = function() {
|
|
91
92
|
return !!c.current;
|
|
92
|
-
},
|
|
93
|
+
}, ee.flush = function() {
|
|
93
94
|
return c.current ? T(Date.now()) : d.current;
|
|
94
|
-
},
|
|
95
|
+
}, ee;
|
|
95
96
|
}, [
|
|
96
97
|
v,
|
|
97
98
|
x,
|
|
@@ -104,7 +105,7 @@ function Ze(e, t, n, r) {
|
|
|
104
105
|
S,
|
|
105
106
|
r
|
|
106
107
|
]);
|
|
107
|
-
return h.current = w,
|
|
108
|
+
return h.current = w, N(function() {
|
|
108
109
|
return p.current = !0, function() {
|
|
109
110
|
var e;
|
|
110
111
|
b && h.current.flush(), m.current &&= ((e = globalThis.document) == null || e.removeEventListener == null || e.removeEventListener("visibilitychange", m.current), null), p.current = !1;
|
|
@@ -113,61 +114,61 @@ function Ze(e, t, n, r) {
|
|
|
113
114
|
}
|
|
114
115
|
//#endregion
|
|
115
116
|
//#region src/components/ui/Table/TableCellAsyncContent.tsx
|
|
116
|
-
var
|
|
117
|
-
let [t, n] =
|
|
118
|
-
return
|
|
117
|
+
var et = ({ content: e }) => {
|
|
118
|
+
let [t, n] = L(null);
|
|
119
|
+
return N(() => {
|
|
119
120
|
(async () => {
|
|
120
121
|
e instanceof Promise ? n(await e) : n(e);
|
|
121
122
|
})();
|
|
122
|
-
}, [e]), /* @__PURE__ */
|
|
123
|
+
}, [e]), /* @__PURE__ */ z(R, { children: t });
|
|
123
124
|
};
|
|
124
125
|
//#endregion
|
|
125
126
|
//#region ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
126
|
-
function
|
|
127
|
+
function tt(e) {
|
|
127
128
|
var t, n, r = "";
|
|
128
129
|
if (typeof e == "string" || typeof e == "number") r += e;
|
|
129
130
|
else if (typeof e == "object") {
|
|
130
131
|
if (Array.isArray(e)) {
|
|
131
132
|
var i = e.length;
|
|
132
|
-
for (t = 0; t < i; t++) e[t] && (n =
|
|
133
|
+
for (t = 0; t < i; t++) e[t] && (n = tt(e[t])) && (r && (r += " "), r += n);
|
|
133
134
|
} else for (n in e) e[n] && (r && (r += " "), r += n);
|
|
134
135
|
}
|
|
135
136
|
return r;
|
|
136
137
|
}
|
|
137
|
-
function
|
|
138
|
-
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t =
|
|
138
|
+
function nt() {
|
|
139
|
+
for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = tt(e)) && (r && (r += " "), r += t);
|
|
139
140
|
return r;
|
|
140
141
|
}
|
|
141
142
|
//#endregion
|
|
142
143
|
//#region src/components/ui/Table/TableFilter.tsx
|
|
143
|
-
var
|
|
144
|
+
var rt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
144
145
|
var n = l(), r = d();
|
|
145
146
|
function i(e) {
|
|
146
147
|
return e && e.length ? n(e, r) : 0;
|
|
147
148
|
}
|
|
148
149
|
t.exports = i;
|
|
149
|
-
})))(), 1),
|
|
150
|
-
e instanceof s && /* @__PURE__ */
|
|
151
|
-
e instanceof o && /* @__PURE__ */
|
|
152
|
-
e instanceof r && /* @__PURE__ */
|
|
153
|
-
e instanceof a && /* @__PURE__ */
|
|
154
|
-
e instanceof S && /* @__PURE__ */
|
|
155
|
-
e instanceof i && /* @__PURE__ */
|
|
156
|
-
] }),
|
|
157
|
-
let n =
|
|
150
|
+
})))(), 1), it = ({ filter: e }) => /* @__PURE__ */ B(R, { children: [
|
|
151
|
+
e instanceof s && /* @__PURE__ */ z(ee, { filter: e }),
|
|
152
|
+
e instanceof o && /* @__PURE__ */ z(C, { filter: e }),
|
|
153
|
+
e instanceof r && /* @__PURE__ */ z(D, { filter: e }),
|
|
154
|
+
e instanceof a && /* @__PURE__ */ z(E, { filter: e }),
|
|
155
|
+
e instanceof S && /* @__PURE__ */ z(T, { filter: e }),
|
|
156
|
+
e instanceof i && /* @__PURE__ */ z(w, { filter: e })
|
|
157
|
+
] }), at = ({ filter: e, onFilterChange: t }) => {
|
|
158
|
+
let n = g(), { t: r } = W(), i = h(n, (e) => e.setFilterValue), a = F(() => ({ [e.id]: e.initialFilterValue }), [e.id, e.initialFilterValue]), o = F(() => ({ [e.id]: e.filterValue ?? e.initialFilterValue }), [
|
|
158
159
|
e.id,
|
|
159
160
|
e.filterValue,
|
|
160
161
|
e.initialFilterValue
|
|
161
|
-
]), s =
|
|
162
|
+
]), s = K({
|
|
162
163
|
defaultValues: a,
|
|
163
164
|
values: o
|
|
164
|
-
}), { formState: { isDirty: c }, handleSubmit: l } = s, u =
|
|
165
|
+
}), { formState: { isDirty: c }, handleSubmit: l } = s, u = M(async (n) => {
|
|
165
166
|
await i(e.id, n[e.id]), t();
|
|
166
167
|
}, [
|
|
167
168
|
e.id,
|
|
168
169
|
t,
|
|
169
170
|
i
|
|
170
|
-
]), d =
|
|
171
|
+
]), d = M(async () => {
|
|
171
172
|
await i(e.id, e.initialFilterValue), t();
|
|
172
173
|
}, [
|
|
173
174
|
e.id,
|
|
@@ -175,26 +176,26 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
175
176
|
t,
|
|
176
177
|
i
|
|
177
178
|
]);
|
|
178
|
-
return /* @__PURE__ */
|
|
179
|
+
return /* @__PURE__ */ z(Ae, {
|
|
179
180
|
...s,
|
|
180
|
-
children: /* @__PURE__ */
|
|
181
|
+
children: /* @__PURE__ */ B(V, {
|
|
181
182
|
autoComplete: "off",
|
|
182
183
|
component: "form",
|
|
183
184
|
id: "Filters",
|
|
184
185
|
onSubmit: l(u),
|
|
185
186
|
sx: { minWidth: "400px" },
|
|
186
|
-
children: [/* @__PURE__ */
|
|
187
|
+
children: [/* @__PURE__ */ z(it, { filter: e }), /* @__PURE__ */ B(V, {
|
|
187
188
|
sx: {
|
|
188
189
|
display: "flex",
|
|
189
190
|
gap: 1,
|
|
190
191
|
justifyContent: "flex-end"
|
|
191
192
|
},
|
|
192
|
-
children: [/* @__PURE__ */
|
|
193
|
+
children: [/* @__PURE__ */ z(de, {
|
|
193
194
|
disabled: e.isInitialFilterValue(),
|
|
194
195
|
onClick: d,
|
|
195
196
|
variant: "outlined",
|
|
196
197
|
children: r`Remove filter`
|
|
197
|
-
}), /* @__PURE__ */
|
|
198
|
+
}), /* @__PURE__ */ z(de, {
|
|
198
199
|
disabled: !c,
|
|
199
200
|
type: "submit",
|
|
200
201
|
variant: "contained",
|
|
@@ -203,8 +204,8 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
203
204
|
})]
|
|
204
205
|
})
|
|
205
206
|
});
|
|
206
|
-
},
|
|
207
|
-
let T =
|
|
207
|
+
}, ot = {}, st = ({ ariaSort: e, backgroundColor: t, canDrag: n, children: r, className: i, column: a, columnIndex: o, enabled: s, height: c, onClick: l, onCustomDrag: u, order: d, ref: f, role: p, row: _, rowIndex: v, sx: y, tabIndex: x, title: S, width: C, xOffset: w }) => {
|
|
208
|
+
let T = we(), E = g(), D = h(E, b((e) => e.dataContext)), ee = M((e) => {
|
|
208
209
|
l({
|
|
209
210
|
dataContext: D,
|
|
210
211
|
id: a.id,
|
|
@@ -217,14 +218,14 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
217
218
|
l,
|
|
218
219
|
_,
|
|
219
220
|
v
|
|
220
|
-
]),
|
|
221
|
+
]), O = I(null), te = M((e) => {
|
|
221
222
|
if (!u || n && !n(e)) return;
|
|
222
223
|
let t = e.currentTarget, r = t.getBoundingClientRect().width, i = {
|
|
223
224
|
elementOffsetX: e.clientX - t.getBoundingClientRect().left,
|
|
224
225
|
elementWidth: r,
|
|
225
226
|
target: t
|
|
226
227
|
}, o = (n) => {
|
|
227
|
-
|
|
228
|
+
O.current || (O.current = {
|
|
228
229
|
target: t,
|
|
229
230
|
x: e.clientX,
|
|
230
231
|
y: e.clientY
|
|
@@ -236,7 +237,7 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
236
237
|
type: "start",
|
|
237
238
|
...i
|
|
238
239
|
}, a));
|
|
239
|
-
let r = n.clientX -
|
|
240
|
+
let r = n.clientX - O.current.x, o = n.clientY - O.current.y;
|
|
240
241
|
u({
|
|
241
242
|
clientX: n.clientX,
|
|
242
243
|
clientY: n.clientY,
|
|
@@ -246,8 +247,8 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
246
247
|
...i
|
|
247
248
|
}, a);
|
|
248
249
|
}, s = (e) => {
|
|
249
|
-
if (e.preventDefault(),
|
|
250
|
-
let t = e.clientX -
|
|
250
|
+
if (e.preventDefault(), O.current) {
|
|
251
|
+
let t = e.clientX - O.current.x, n = e.clientY - O.current.y;
|
|
251
252
|
u({
|
|
252
253
|
clientX: e.clientX,
|
|
253
254
|
clientY: e.clientY,
|
|
@@ -257,16 +258,16 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
257
258
|
...i
|
|
258
259
|
}, a);
|
|
259
260
|
}
|
|
260
|
-
|
|
261
|
+
O.current = null, document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", s);
|
|
261
262
|
};
|
|
262
263
|
document.addEventListener("mouseup", s, { once: !0 }), document.addEventListener("mousemove", o);
|
|
263
264
|
}, [
|
|
264
265
|
u,
|
|
265
266
|
n,
|
|
266
267
|
a
|
|
267
|
-
]),
|
|
268
|
-
let e = a.frozen ===
|
|
269
|
-
return t && (
|
|
268
|
+
]), k = !a.frozen, ne = M(() => {
|
|
269
|
+
let e = a.frozen === m.LEFT, n = a.frozen === m.RIGHT, r = e || n, i;
|
|
270
|
+
return t && (ot[t] ? i = ot[t] : (i = T.palette.getContrastText(t), ot[t] = i)), {
|
|
270
271
|
"*": t ?? { color: i ? `${i} !important` : void 0 },
|
|
271
272
|
background: r ? T.palette.background.paper : t,
|
|
272
273
|
boxSizing: "border-box",
|
|
@@ -298,30 +299,30 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
298
299
|
C,
|
|
299
300
|
w
|
|
300
301
|
]);
|
|
301
|
-
return /* @__PURE__ */
|
|
302
|
+
return /* @__PURE__ */ z(V, {
|
|
302
303
|
"aria-sort": e,
|
|
303
304
|
className: i,
|
|
304
305
|
"data-column-index": o,
|
|
305
306
|
"data-frozen": +!!a.frozen,
|
|
306
307
|
"data-id": a.id,
|
|
307
308
|
"data-row-index": v ?? "",
|
|
308
|
-
onClick: l && s ?
|
|
309
|
-
onMouseDown:
|
|
310
|
-
ref:
|
|
311
|
-
role:
|
|
312
|
-
sx:
|
|
309
|
+
onClick: l && s ? ee : void 0,
|
|
310
|
+
onMouseDown: k && u ? te : void 0,
|
|
311
|
+
ref: f,
|
|
312
|
+
role: p ?? "cell",
|
|
313
|
+
sx: ne(),
|
|
313
314
|
tabIndex: x,
|
|
314
315
|
title: S,
|
|
315
316
|
children: r
|
|
316
317
|
});
|
|
317
|
-
},
|
|
318
|
+
}, Z = {
|
|
318
319
|
columnDivider: "GENEPIX-TableHeaderCell-columnDivider",
|
|
319
320
|
content: "GENEPIX-TableHeaderCell-content",
|
|
320
321
|
customHeaderIcon: "GENEPIX-TableHeaderCell-customHeaderIcon",
|
|
321
322
|
filterLabelIcon: "GENEPIX-TableHeaderCell-filterLabelIcon",
|
|
322
323
|
root: "GENEPIX-TableHeaderCell",
|
|
323
324
|
sortLabelIcon: "GENEPIX-TableHeaderCell-sortLabelIcon"
|
|
324
|
-
},
|
|
325
|
+
}, Q = 18, $ = `${Z.root}--focus`, ct = Ce(U, { name: "GENEPIX-TableSortLabelIcon" })(({ ownerState: e, theme: t }) => ({
|
|
325
326
|
"&:hover": {
|
|
326
327
|
color: t.palette.primary.main,
|
|
327
328
|
opacity: "1 !important"
|
|
@@ -332,103 +333,95 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
332
333
|
},
|
|
333
334
|
color: t.palette.text.primary,
|
|
334
335
|
display: "none",
|
|
335
|
-
fontSize:
|
|
336
|
-
height: `${
|
|
336
|
+
fontSize: Q,
|
|
337
|
+
height: `${Q}px`,
|
|
337
338
|
opacity: 0,
|
|
338
339
|
padding: 0,
|
|
339
340
|
userSelect: "none",
|
|
340
|
-
width: `${
|
|
341
|
-
})),
|
|
341
|
+
width: `${Q}px`
|
|
342
|
+
})), lt = Ce(U, { name: "GENEPIX-TableCustomHeaderIcon" })(({ theme: e }) => ({
|
|
342
343
|
"&:hover": {
|
|
343
344
|
color: e.palette.primary.main,
|
|
344
345
|
opacity: "1 !important"
|
|
345
346
|
},
|
|
346
347
|
display: "none",
|
|
347
|
-
fontSize:
|
|
348
|
-
height: `${
|
|
348
|
+
fontSize: Q,
|
|
349
|
+
height: `${Q}px`,
|
|
349
350
|
opacity: 0,
|
|
350
351
|
padding: 0,
|
|
351
352
|
userSelect: "none",
|
|
352
|
-
width: `${
|
|
353
|
-
})),
|
|
353
|
+
width: `${Q}px`
|
|
354
|
+
})), ut = Ce(U, { name: "GENEPIX-TableFilterLabelIcon" })(({ theme: e }) => ({
|
|
354
355
|
"&:hover": {
|
|
355
356
|
color: e.palette.primary.main,
|
|
356
357
|
opacity: "1 !important"
|
|
357
358
|
},
|
|
358
359
|
display: "none",
|
|
359
|
-
fontSize:
|
|
360
|
-
height: `${
|
|
360
|
+
fontSize: Q,
|
|
361
|
+
height: `${Q}px`,
|
|
361
362
|
opacity: 0,
|
|
362
363
|
padding: 0,
|
|
363
364
|
userSelect: "none",
|
|
364
|
-
width: `${
|
|
365
|
-
})),
|
|
366
|
-
let { t } =
|
|
365
|
+
width: `${Q}px`
|
|
366
|
+
})), dt = (e) => {
|
|
367
|
+
let { t } = W(), n = we(), r = g(), i = h(r, (e) => e.sortByField), a = h(r, (e) => e.dataContext), o = h(r, (e) => e.sortDirection), s = h(r, (e) => e.setSorting), c = h(r, (e) => e.filters), l = I(null), u = P(), [d, f] = L(), p = I(null), m = I(null), { column: _, columnIndex: v, dividerColor: y, height: b, onColumnDividerKeyDown: x, onColumnDividerMouseDown: S, onCustomDrag: C, order: w, width: T, xOffset: E } = e, D = I(!1), ee = M((e) => _.frozen || e.button !== 0 ? !1 : e.nativeEvent.target.classList.contains(Z.content), [_.frozen]), O = M((e, t) => {
|
|
367
368
|
C && (e.type === "start" && (D.current = !0), C(e, t));
|
|
368
|
-
}, [C]),
|
|
369
|
-
|
|
370
|
-
await s(_.id, o === "asc" ? "desc" : "asc");
|
|
371
|
-
return;
|
|
372
|
-
}
|
|
373
|
-
await s(_.id, "asc");
|
|
369
|
+
}, [C]), te = M(async () => {
|
|
370
|
+
i === _.id ? await s(_.id, o === "asc" ? "desc" : "asc") : await s(_.id, "asc");
|
|
374
371
|
}, [
|
|
375
372
|
_.id,
|
|
376
373
|
s,
|
|
377
374
|
i,
|
|
378
375
|
o
|
|
379
|
-
]),
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
_.comparatorFactory && await A();
|
|
385
|
-
}, [_.comparatorFactory, A]), ee = R(async (e) => {
|
|
386
|
-
await A();
|
|
387
|
-
}, [A]), M = R(() => {
|
|
376
|
+
]), k = M(async (e) => {
|
|
377
|
+
D.current ? (e.preventDefault(), e.stopPropagation(), D.current = !1) : _.comparatorFactory && await te();
|
|
378
|
+
}, [_.comparatorFactory, te]), ne = M(async (e) => {
|
|
379
|
+
await te();
|
|
380
|
+
}, [te]), A = M(() => {
|
|
388
381
|
f((e) => e ? null : p.current);
|
|
389
|
-
}, []),
|
|
382
|
+
}, []), re = M(() => {
|
|
390
383
|
f(null);
|
|
391
|
-
}, []),
|
|
384
|
+
}, []), j = M((e) => {
|
|
392
385
|
e.button === 0 && (e.preventDefault(), e.stopPropagation(), S(e, _));
|
|
393
|
-
}, [_, S]),
|
|
386
|
+
}, [_, S]), ie = M((e) => {
|
|
394
387
|
x(e, _);
|
|
395
|
-
}, [_, x]),
|
|
388
|
+
}, [_, x]), ae = F(() => c.find((e) => e.id === _.id), [_.id, c]), oe = F(() => !!ae && !ae.isInitialFilterValue(), [ae]), se = M(() => {
|
|
396
389
|
_.customHeaderIcon?.onClick({
|
|
397
390
|
column: _,
|
|
398
391
|
dataContext: a
|
|
399
392
|
});
|
|
400
|
-
}, [_, a]),
|
|
393
|
+
}, [_, a]), ce = M(() => {
|
|
401
394
|
f(null), setTimeout(() => {
|
|
402
|
-
p.current.classList.add(
|
|
395
|
+
p.current.classList.add($), p.current?.focus(), m.current?.focus();
|
|
403
396
|
});
|
|
404
|
-
}, []),
|
|
397
|
+
}, []), N = i === _.id, le = { direction: i === _.id ? o : "asc" }, ue = nt(Z.sortLabelIcon, { [`${Z.sortLabelIcon}--active`]: N }), de = nt(Z.filterLabelIcon, { [`${Z.filterLabelIcon}--active`]: oe }), fe = !!_.customHeaderIcon, pe = !!_.comparatorFactory, H = !!ae, me = pe || H || fe ? 0 : -1, U = +n.spacing(2).replace("px", ""), he = F(() => {
|
|
405
398
|
if (i === _.id) return o === "asc" ? "ascending" : "descending";
|
|
406
399
|
}, [
|
|
407
400
|
_.id,
|
|
408
401
|
i,
|
|
409
402
|
o
|
|
410
403
|
]);
|
|
411
|
-
return /* @__PURE__ */
|
|
412
|
-
ariaSort:
|
|
413
|
-
canDrag:
|
|
414
|
-
className:
|
|
404
|
+
return /* @__PURE__ */ B(st, {
|
|
405
|
+
ariaSort: he,
|
|
406
|
+
canDrag: ee,
|
|
407
|
+
className: nt(Z.root, { [$]: !!d }),
|
|
415
408
|
column: _,
|
|
416
409
|
columnIndex: v,
|
|
417
410
|
height: b,
|
|
418
|
-
onCustomDrag:
|
|
411
|
+
onCustomDrag: O,
|
|
419
412
|
order: w,
|
|
420
413
|
ref: p,
|
|
421
414
|
role: "columnheader",
|
|
422
415
|
sx: {
|
|
423
|
-
[`.${
|
|
424
|
-
[`.${
|
|
416
|
+
[`.${Z.filterLabelIcon}--active`]: { color: n.palette.secondary.main },
|
|
417
|
+
[`.${Z.sortLabelIcon}--active, .${Z.filterLabelIcon}--active`]: {
|
|
425
418
|
display: "inline-block",
|
|
426
419
|
opacity: "1 !important"
|
|
427
420
|
},
|
|
428
|
-
[`.${
|
|
429
|
-
[`&:hover, &:focus-visible, &:focus, &:focus-within, &.${
|
|
430
|
-
[`.${
|
|
431
|
-
[`.${
|
|
421
|
+
[`.${Z.sortLabelIcon}--active`]: { color: n.palette.text.secondary },
|
|
422
|
+
[`&:hover, &:focus-visible, &:focus, &:focus-within, &.${$}`]: {
|
|
423
|
+
[`.${Z.columnDivider}`]: { opacity: 1 },
|
|
424
|
+
[`.${Z.sortLabelIcon}, .${Z.filterLabelIcon}, .${Z.customHeaderIcon}`]: {
|
|
432
425
|
display: "inline-block",
|
|
433
426
|
opacity: .5
|
|
434
427
|
}
|
|
@@ -439,44 +432,44 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
439
432
|
justifyContent: "flex-start",
|
|
440
433
|
textAlign: "left"
|
|
441
434
|
},
|
|
442
|
-
tabIndex:
|
|
435
|
+
tabIndex: me,
|
|
443
436
|
width: T,
|
|
444
437
|
xOffset: E,
|
|
445
|
-
children: [_.type === "actions" && /* @__PURE__ */
|
|
446
|
-
className:
|
|
447
|
-
sx:
|
|
438
|
+
children: [_.type === "actions" && /* @__PURE__ */ z(V, {
|
|
439
|
+
className: Z.content,
|
|
440
|
+
sx: De,
|
|
448
441
|
children: t`Actions`
|
|
449
|
-
}), _.type !== "actions" && /* @__PURE__ */
|
|
442
|
+
}), _.type !== "actions" && /* @__PURE__ */ B(V, {
|
|
450
443
|
sx: {
|
|
451
|
-
[`&:hover .${
|
|
452
|
-
fe ?
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
444
|
+
[`&:hover .${Z.content}`]: { maxWidth: `calc(100% + 16px - ${(0, rt.default)([
|
|
445
|
+
fe ? U : 0,
|
|
446
|
+
H ? U : 0,
|
|
447
|
+
pe ? U : 0,
|
|
448
|
+
U
|
|
456
449
|
])}px)` },
|
|
457
450
|
alignItems: "center",
|
|
458
451
|
display: "inline-flex",
|
|
459
452
|
width: "100%"
|
|
460
453
|
},
|
|
461
454
|
children: [
|
|
462
|
-
_.renderHeader ? /* @__PURE__ */
|
|
455
|
+
_.renderHeader ? /* @__PURE__ */ z(R, { children: _.renderHeader({
|
|
463
456
|
column: _,
|
|
464
457
|
dataContext: a
|
|
465
|
-
}) }) : /* @__PURE__ */
|
|
458
|
+
}) }) : /* @__PURE__ */ z(ve, {
|
|
466
459
|
arrow: !0,
|
|
467
460
|
placement: "top",
|
|
468
461
|
title: _.headerTooltipContent,
|
|
469
|
-
children: /* @__PURE__ */
|
|
470
|
-
className:
|
|
471
|
-
onClick:
|
|
462
|
+
children: /* @__PURE__ */ z(V, {
|
|
463
|
+
className: Z.content,
|
|
464
|
+
onClick: k,
|
|
472
465
|
ref: l,
|
|
473
466
|
sx: {
|
|
474
467
|
cursor: "pointer",
|
|
475
468
|
flexGrow: 1,
|
|
476
|
-
maxWidth: `calc(100% + 16px - ${(0,
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
469
|
+
maxWidth: `calc(100% + 16px - ${(0, rt.default)([
|
|
470
|
+
N ? U : 0,
|
|
471
|
+
oe ? U : 0,
|
|
472
|
+
U
|
|
480
473
|
])}px)`,
|
|
481
474
|
overflow: "hidden",
|
|
482
475
|
textOverflow: "ellipsis",
|
|
@@ -488,57 +481,57 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
488
481
|
}) : _.headerName ?? ""
|
|
489
482
|
})
|
|
490
483
|
}),
|
|
491
|
-
fe && /* @__PURE__ */
|
|
492
|
-
className:
|
|
493
|
-
onClick:
|
|
484
|
+
fe && /* @__PURE__ */ z(lt, {
|
|
485
|
+
className: Z.customHeaderIcon,
|
|
486
|
+
onClick: se,
|
|
494
487
|
tabIndex: 0,
|
|
495
488
|
title: _.customHeaderIcon?.label,
|
|
496
489
|
children: _.customHeaderIcon?.iconElement
|
|
497
490
|
}),
|
|
498
|
-
|
|
491
|
+
H && /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(ut, {
|
|
499
492
|
className: de,
|
|
500
|
-
onClick:
|
|
501
|
-
ref:
|
|
493
|
+
onClick: A,
|
|
494
|
+
ref: m,
|
|
502
495
|
tabIndex: 0,
|
|
503
496
|
title: t("Show filter for {{name}}", { name: _.headerName || t("unknown") }),
|
|
504
|
-
children: /* @__PURE__ */
|
|
505
|
-
}), /* @__PURE__ */
|
|
497
|
+
children: /* @__PURE__ */ z(ke, { fontSize: "inherit" })
|
|
498
|
+
}), /* @__PURE__ */ z(_e, {
|
|
506
499
|
anchorEl: d,
|
|
507
500
|
anchorOrigin: {
|
|
508
501
|
horizontal: "center",
|
|
509
502
|
vertical: "bottom"
|
|
510
503
|
},
|
|
511
504
|
id: u,
|
|
512
|
-
onClose:
|
|
505
|
+
onClose: ce,
|
|
513
506
|
open: !!d,
|
|
514
507
|
sx: { zIndex: n.zIndex.appBar + 1 },
|
|
515
508
|
transformOrigin: {
|
|
516
509
|
horizontal: "center",
|
|
517
510
|
vertical: "top"
|
|
518
511
|
},
|
|
519
|
-
children: /* @__PURE__ */
|
|
512
|
+
children: /* @__PURE__ */ z(ge, {
|
|
520
513
|
elevation: 4,
|
|
521
514
|
square: !0,
|
|
522
515
|
sx: { padding: n.spacing(3) },
|
|
523
|
-
children: /* @__PURE__ */
|
|
524
|
-
filter:
|
|
525
|
-
onFilterChange:
|
|
516
|
+
children: /* @__PURE__ */ z(at, {
|
|
517
|
+
filter: ae,
|
|
518
|
+
onFilterChange: re
|
|
526
519
|
})
|
|
527
520
|
})
|
|
528
521
|
})] }),
|
|
529
|
-
|
|
522
|
+
pe && /* @__PURE__ */ z(R, { children: /* @__PURE__ */ z(ct, {
|
|
530
523
|
className: ue,
|
|
531
|
-
onClick:
|
|
524
|
+
onClick: ne,
|
|
532
525
|
ownerState: le,
|
|
533
526
|
tabIndex: 0,
|
|
534
527
|
title: t("Toggle sorting for {{name}}", { name: _.headerName || t("unknown") }),
|
|
535
|
-
children: /* @__PURE__ */
|
|
528
|
+
children: /* @__PURE__ */ z(Oe, { fontSize: "inherit" })
|
|
536
529
|
}) }),
|
|
537
|
-
_.resizable !== !1 && /* @__PURE__ */
|
|
530
|
+
_.resizable !== !1 && /* @__PURE__ */ z(V, {
|
|
538
531
|
"aria-label": t("Resize column {{name}}, use arrow keys to adjust the size.", { name: _.headerName || t("unknown") }),
|
|
539
|
-
className:
|
|
540
|
-
onKeyDown:
|
|
541
|
-
onMouseDown:
|
|
532
|
+
className: Z.columnDivider,
|
|
533
|
+
onKeyDown: ie,
|
|
534
|
+
onMouseDown: j,
|
|
542
535
|
role: "separator",
|
|
543
536
|
sx: {
|
|
544
537
|
"&:focus-visible, &:focus, &:focus-within": {
|
|
@@ -563,12 +556,12 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
563
556
|
]
|
|
564
557
|
})]
|
|
565
558
|
}, _.id);
|
|
566
|
-
},
|
|
567
|
-
let t =
|
|
559
|
+
}, ft = (e) => {
|
|
560
|
+
let t = g(), n = h(t, b((e) => e.dataContext)), [r, i] = L(null), { t: a } = W(), o = !!r, s = M((e) => {
|
|
568
561
|
i(e.currentTarget);
|
|
569
|
-
}, []), c =
|
|
562
|
+
}, []), c = M(() => {
|
|
570
563
|
i(null);
|
|
571
|
-
}, []), l =
|
|
564
|
+
}, []), l = F(() => e.column.getActions({
|
|
572
565
|
dataContext: n,
|
|
573
566
|
id: e.column.id,
|
|
574
567
|
row: e.row,
|
|
@@ -578,11 +571,11 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
578
571
|
e.column,
|
|
579
572
|
e.row,
|
|
580
573
|
e.rowIndex
|
|
581
|
-
]), u =
|
|
582
|
-
return /* @__PURE__ */
|
|
574
|
+
]), u = M(() => {}, []);
|
|
575
|
+
return /* @__PURE__ */ z(st, {
|
|
583
576
|
...e,
|
|
584
577
|
onClick: u,
|
|
585
|
-
children: l.length > 0 && /* @__PURE__ */
|
|
578
|
+
children: l.length > 0 && /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(U, {
|
|
586
579
|
"aria-label": a`Row actions`,
|
|
587
580
|
onClick: s,
|
|
588
581
|
sx: {
|
|
@@ -591,8 +584,8 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
591
584
|
top: "50%",
|
|
592
585
|
transform: "translateY(-50%)"
|
|
593
586
|
},
|
|
594
|
-
children: /* @__PURE__ */
|
|
595
|
-
}), /* @__PURE__ */
|
|
587
|
+
children: /* @__PURE__ */ z(Ne, {})
|
|
588
|
+
}), /* @__PURE__ */ z(he, {
|
|
596
589
|
anchorEl: r,
|
|
597
590
|
id: "basic-menu",
|
|
598
591
|
onClick: c,
|
|
@@ -602,26 +595,26 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
602
595
|
children: l
|
|
603
596
|
})] })
|
|
604
597
|
}, e.column.id);
|
|
605
|
-
},
|
|
606
|
-
let t =
|
|
607
|
-
return /* @__PURE__ */
|
|
608
|
-
...
|
|
598
|
+
}, pt = ({ children: e }) => {
|
|
599
|
+
let t = F(() => ({ sideEffects: Ie({ styles: { active: { opacity: "0.6" } } }) }), []);
|
|
600
|
+
return /* @__PURE__ */ z(J, {
|
|
601
|
+
...G.createAttributes("SortableOverlay"),
|
|
609
602
|
dropAnimation: t,
|
|
610
603
|
zIndex: 1e3,
|
|
611
604
|
children: e
|
|
612
605
|
});
|
|
613
|
-
},
|
|
606
|
+
}, mt = oe({
|
|
614
607
|
attributes: void 0,
|
|
615
608
|
listeners: void 0,
|
|
616
609
|
ref: void 0
|
|
617
|
-
}),
|
|
610
|
+
}), ht = (e) => {
|
|
618
611
|
let { children: t, value: n } = e;
|
|
619
|
-
return /* @__PURE__ */
|
|
612
|
+
return /* @__PURE__ */ z(mt, {
|
|
620
613
|
value: n,
|
|
621
614
|
children: t
|
|
622
615
|
});
|
|
623
|
-
},
|
|
624
|
-
let r =
|
|
616
|
+
}, gt = ({ children: e, id: t, sx: n }) => {
|
|
617
|
+
let r = we(), { attributes: i, isDragging: a, listeners: o, setActivatorNodeRef: s, setNodeRef: c, transform: l, transition: u } = Ve({ id: t }), d = F(() => ({
|
|
625
618
|
attributes: i,
|
|
626
619
|
listeners: o,
|
|
627
620
|
ref: s
|
|
@@ -631,13 +624,13 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
631
624
|
s
|
|
632
625
|
]), f = {
|
|
633
626
|
backgroundColor: a ? r.palette.secondary.main : r.palette.background.paper,
|
|
634
|
-
transform:
|
|
627
|
+
transform: He.Translate.toString(l),
|
|
635
628
|
transition: u
|
|
636
629
|
};
|
|
637
|
-
return /* @__PURE__ */
|
|
630
|
+
return /* @__PURE__ */ z(ht, {
|
|
638
631
|
value: d,
|
|
639
|
-
children: /* @__PURE__ */
|
|
640
|
-
...
|
|
632
|
+
children: /* @__PURE__ */ z(V, {
|
|
633
|
+
...G.createAttributes("SortableListItem", { id: t }),
|
|
641
634
|
component: "li",
|
|
642
635
|
ref: c,
|
|
643
636
|
style: f,
|
|
@@ -656,10 +649,10 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
656
649
|
children: e
|
|
657
650
|
})
|
|
658
651
|
});
|
|
659
|
-
},
|
|
660
|
-
let t =
|
|
661
|
-
return /* @__PURE__ */
|
|
662
|
-
...
|
|
652
|
+
}, _t = ({ name: e }) => {
|
|
653
|
+
let t = we(), { attributes: n, listeners: r, ref: i } = ce(mt);
|
|
654
|
+
return /* @__PURE__ */ z(V, {
|
|
655
|
+
...G.createAttributes("SortableListItemDragHandle"),
|
|
663
656
|
component: "button",
|
|
664
657
|
...n,
|
|
665
658
|
...r,
|
|
@@ -681,20 +674,20 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
681
674
|
outline: "none",
|
|
682
675
|
touchAction: "none"
|
|
683
676
|
},
|
|
684
|
-
children: /* @__PURE__ */
|
|
677
|
+
children: /* @__PURE__ */ z(Ue, {})
|
|
685
678
|
});
|
|
686
|
-
},
|
|
687
|
-
let r =
|
|
679
|
+
}, vt = ({ items: e, onChange: t, renderItemContent: n }) => {
|
|
680
|
+
let r = we(), { t: i } = W(), [a, o] = L(null), s = F(() => e.find((e) => e.id === a?.id), [a, e]), c = Re(Le(Fe), Le(Y, { coordinateGetter: Be })), l = M(() => {
|
|
688
681
|
o(null);
|
|
689
|
-
}, []), u =
|
|
682
|
+
}, []), u = M(({ active: n, over: r }) => {
|
|
690
683
|
if (r && n.id !== r?.id) {
|
|
691
684
|
let i = e.findIndex(({ id: e }) => e === n.id), a = e.findIndex(({ id: e }) => e === r.id);
|
|
692
|
-
t(
|
|
685
|
+
t(ze(e, i, a));
|
|
693
686
|
}
|
|
694
687
|
o(null);
|
|
695
|
-
}, [e, t]), d =
|
|
688
|
+
}, [e, t]), d = M(({ active: e }) => {
|
|
696
689
|
o(e);
|
|
697
|
-
}, []), f =
|
|
690
|
+
}, []), f = M((n) => {
|
|
698
691
|
let r = n.target.getAttribute("data-id");
|
|
699
692
|
if (!r) return;
|
|
700
693
|
let i = n.target.checked;
|
|
@@ -702,14 +695,14 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
702
695
|
...e,
|
|
703
696
|
isSelected: i
|
|
704
697
|
} : e));
|
|
705
|
-
}, [t, e]), p =
|
|
698
|
+
}, [t, e]), p = M((e) => /* @__PURE__ */ B(gt, {
|
|
706
699
|
id: e.id,
|
|
707
700
|
sx: {
|
|
708
701
|
"&:hover": { backgroundColor: r.palette.action.hover },
|
|
709
702
|
backgroundColor: r.palette.background.paper
|
|
710
703
|
},
|
|
711
|
-
children: [/* @__PURE__ */
|
|
712
|
-
control: /* @__PURE__ */
|
|
704
|
+
children: [/* @__PURE__ */ z(H, {
|
|
705
|
+
control: /* @__PURE__ */ z(fe, {
|
|
713
706
|
checked: e.isSelected,
|
|
714
707
|
onChange: f,
|
|
715
708
|
size: "small",
|
|
@@ -720,22 +713,22 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
720
713
|
flexGrow: 1,
|
|
721
714
|
paddingLeft: r.spacing(1)
|
|
722
715
|
}
|
|
723
|
-
}), /* @__PURE__ */
|
|
716
|
+
}), /* @__PURE__ */ z(_t, { name: i("Drag handle for {{label}}", { label: e.label }) })]
|
|
724
717
|
}, e.id), [
|
|
725
718
|
f,
|
|
726
719
|
n,
|
|
727
720
|
i,
|
|
728
721
|
r
|
|
729
722
|
]);
|
|
730
|
-
return /* @__PURE__ */
|
|
723
|
+
return /* @__PURE__ */ B(Pe, {
|
|
731
724
|
onDragCancel: l,
|
|
732
725
|
onDragEnd: u,
|
|
733
726
|
onDragStart: d,
|
|
734
727
|
sensors: c,
|
|
735
|
-
children: [/* @__PURE__ */
|
|
728
|
+
children: [/* @__PURE__ */ z(X, {
|
|
736
729
|
items: e,
|
|
737
|
-
children: /* @__PURE__ */
|
|
738
|
-
...
|
|
730
|
+
children: /* @__PURE__ */ z(me, { children: /* @__PURE__ */ z(V, {
|
|
731
|
+
...G.createAttributes("SortableList"),
|
|
739
732
|
component: "ul",
|
|
740
733
|
sx: {
|
|
741
734
|
display: "flex",
|
|
@@ -746,35 +739,35 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
746
739
|
},
|
|
747
740
|
children: e.map((e) => p(e))
|
|
748
741
|
}) })
|
|
749
|
-
}), /* @__PURE__ */
|
|
742
|
+
}), /* @__PURE__ */ z(pt, { children: s ? p(s) : null })]
|
|
750
743
|
});
|
|
751
|
-
},
|
|
752
|
-
let { t: i } =
|
|
744
|
+
}, yt = q(({ onActionsChange: e, onClose: t, onTitleChange: n, openProps: { hasCellData: r } }) => {
|
|
745
|
+
let { t: i } = W(), [a, o] = L([]), s = g(), c = h(s, b((e) => e.emitEvent)), l = h(s, b((e) => e.dataContext)), d = h(s, b((e) => e.getCurrentColumnVisualSettings())), f = h(s, b((e) => e.columns)), p = h(s, b((e) => e.sortedData)), m = F(() => {
|
|
753
746
|
let e = /* @__PURE__ */ new Map();
|
|
754
747
|
return f.forEach((t) => {
|
|
755
748
|
e.set(t.id, t);
|
|
756
749
|
}), e;
|
|
757
|
-
}, [f]), _ =
|
|
750
|
+
}, [f]), _ = M((e) => {
|
|
758
751
|
let t = [];
|
|
759
752
|
e.forEach((e) => {
|
|
760
|
-
let n =
|
|
753
|
+
let n = m.get(e.id);
|
|
761
754
|
n && !n.frozen && t.push({
|
|
762
755
|
id: n.id,
|
|
763
756
|
isSelected: e.isVisible,
|
|
764
757
|
label: n.headerName
|
|
765
758
|
});
|
|
766
759
|
}), o(t);
|
|
767
|
-
}, [
|
|
768
|
-
|
|
760
|
+
}, [m]);
|
|
761
|
+
N(() => {
|
|
769
762
|
_(d);
|
|
770
763
|
}, [d, _]);
|
|
771
|
-
let v =
|
|
764
|
+
let v = M(() => {
|
|
772
765
|
_(u.createInitialVisualColumnSettings(f));
|
|
773
766
|
}, [f, _]);
|
|
774
|
-
|
|
767
|
+
N(() => {
|
|
775
768
|
n(i`Change column order and visibility`);
|
|
776
769
|
}, [n, i]);
|
|
777
|
-
let y =
|
|
770
|
+
let y = M(() => {
|
|
778
771
|
c("columnVisibilityChange", [...f.filter((e) => e.frozen).map((e) => e.id), ...a.filter((e) => e.isSelected).map((e) => e.id.toString())]);
|
|
779
772
|
let e = f.findIndex((e) => !e.frozen), n = f.slice(0, e), r = f.slice(e + a.length);
|
|
780
773
|
c("columnOrderChange", [
|
|
@@ -787,7 +780,7 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
787
780
|
c,
|
|
788
781
|
a,
|
|
789
782
|
t
|
|
790
|
-
]), x =
|
|
783
|
+
]), x = M((e) => {
|
|
791
784
|
let t = u.getColumnIdsWithData({
|
|
792
785
|
dataContext: l,
|
|
793
786
|
hasCellData: r,
|
|
@@ -805,25 +798,25 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
805
798
|
a,
|
|
806
799
|
p,
|
|
807
800
|
f
|
|
808
|
-
]), S =
|
|
801
|
+
]), S = M(() => {
|
|
809
802
|
x(() => !0);
|
|
810
|
-
}, [x]), C =
|
|
803
|
+
}, [x]), C = M(() => {
|
|
811
804
|
x((e) => e.isSelected);
|
|
812
|
-
}, [x]), w =
|
|
805
|
+
}, [x]), w = M(() => {
|
|
813
806
|
o((e) => e.map((e) => ({
|
|
814
807
|
...e,
|
|
815
808
|
isSelected: !0
|
|
816
809
|
})));
|
|
817
|
-
}, []), T =
|
|
810
|
+
}, []), T = M(() => {
|
|
818
811
|
o((e) => e.map((e) => ({
|
|
819
812
|
...e,
|
|
820
813
|
isSelected: !1
|
|
821
814
|
})));
|
|
822
815
|
}, []);
|
|
823
|
-
|
|
816
|
+
N(() => {
|
|
824
817
|
e([
|
|
825
818
|
{
|
|
826
|
-
...
|
|
819
|
+
...G.createAttributes("TableColumnOrderDialog-enable-all"),
|
|
827
820
|
autoFocus: !0,
|
|
828
821
|
color: "secondary",
|
|
829
822
|
label: i`Enable all`,
|
|
@@ -831,7 +824,7 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
831
824
|
variant: "outlined"
|
|
832
825
|
},
|
|
833
826
|
{
|
|
834
|
-
...
|
|
827
|
+
...G.createAttributes("TableColumnOrderDialog-enable-all-with-data"),
|
|
835
828
|
autoFocus: !0,
|
|
836
829
|
color: "secondary",
|
|
837
830
|
label: i`Enable all with data`,
|
|
@@ -839,7 +832,7 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
839
832
|
variant: "outlined"
|
|
840
833
|
},
|
|
841
834
|
{
|
|
842
|
-
...
|
|
835
|
+
...G.createAttributes("TableColumnOrderDialog-disable-all"),
|
|
843
836
|
autoFocus: !0,
|
|
844
837
|
color: "secondary",
|
|
845
838
|
label: i`Disable all`,
|
|
@@ -847,7 +840,7 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
847
840
|
variant: "outlined"
|
|
848
841
|
},
|
|
849
842
|
{
|
|
850
|
-
...
|
|
843
|
+
...G.createAttributes("TableColumnOrderDialog-disable-all-without-data"),
|
|
851
844
|
autoFocus: !0,
|
|
852
845
|
color: "secondary",
|
|
853
846
|
label: i`Disable all without data`,
|
|
@@ -855,7 +848,7 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
855
848
|
variant: "outlined"
|
|
856
849
|
},
|
|
857
850
|
{
|
|
858
|
-
...
|
|
851
|
+
...G.createAttributes("TableColumnOrderDialog-reset"),
|
|
859
852
|
autoFocus: !0,
|
|
860
853
|
color: "secondary",
|
|
861
854
|
label: i`Reset to default`,
|
|
@@ -863,7 +856,7 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
863
856
|
variant: "outlined"
|
|
864
857
|
},
|
|
865
858
|
{
|
|
866
|
-
...
|
|
859
|
+
...G.createAttributes("TableColumnOrderDialog-close"),
|
|
867
860
|
autoFocus: !0,
|
|
868
861
|
color: "primary",
|
|
869
862
|
label: i`Close`,
|
|
@@ -871,7 +864,7 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
871
864
|
variant: "outlined"
|
|
872
865
|
},
|
|
873
866
|
{
|
|
874
|
-
...
|
|
867
|
+
...G.createAttributes("TableColumnOrderDialog-save"),
|
|
875
868
|
autoFocus: !0,
|
|
876
869
|
color: "secondary",
|
|
877
870
|
label: i`Apply`,
|
|
@@ -890,12 +883,12 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
890
883
|
i,
|
|
891
884
|
C
|
|
892
885
|
]);
|
|
893
|
-
let E =
|
|
886
|
+
let E = M((e) => {
|
|
894
887
|
o(e);
|
|
895
|
-
}, []), D =
|
|
896
|
-
return /* @__PURE__ */
|
|
888
|
+
}, []), D = M((e) => e.label, []);
|
|
889
|
+
return /* @__PURE__ */ z(V, {
|
|
897
890
|
sx: {},
|
|
898
|
-
children: /* @__PURE__ */
|
|
891
|
+
children: /* @__PURE__ */ z(vt, {
|
|
899
892
|
items: a,
|
|
900
893
|
onChange: E,
|
|
901
894
|
renderItemContent: D
|
|
@@ -908,14 +901,14 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
908
901
|
maxWidth: "md",
|
|
909
902
|
noCloseButton: !1,
|
|
910
903
|
testId: "TableColumnOrderDialog"
|
|
911
|
-
}),
|
|
912
|
-
let { t: r } =
|
|
904
|
+
}), bt = ({ cell: e, onCheckBoxClick: t, tableColumn: n }) => {
|
|
905
|
+
let { t: r } = W(), i = g(), a = h(i, b((e) => e.idSelectorCallback)), o = h(i, b((e) => e.selectedIds)), s = h(i, b((e) => e.setSelectedIds)), c = a(e.row), l = M((e) => {
|
|
913
906
|
e.stopPropagation(), e.shiftKey && e.preventDefault(), t(e, c);
|
|
914
|
-
}, [t, c]), u =
|
|
907
|
+
}, [t, c]), u = M((e, t) => {
|
|
915
908
|
let n = e.target.getAttribute("name");
|
|
916
909
|
t && !o.includes(n) ? s([...o, n]) : t || s(o.filter((e) => e !== n));
|
|
917
910
|
}, [o, s]);
|
|
918
|
-
return /* @__PURE__ */
|
|
911
|
+
return /* @__PURE__ */ z(fe, {
|
|
919
912
|
checked: o.includes(c),
|
|
920
913
|
disabled: n.isDisabled ? n.isDisabled(e) : !1,
|
|
921
914
|
name: a(e.row),
|
|
@@ -927,15 +920,15 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
927
920
|
padding: 0
|
|
928
921
|
}
|
|
929
922
|
});
|
|
930
|
-
},
|
|
931
|
-
let { t } =
|
|
923
|
+
}, xt = /* @__PURE__ */ e(f(), 1), St = ({ tableColumnParams: e }) => {
|
|
924
|
+
let { t } = W(), n = e.column, r = g(), i = h(r, b((e) => e.dataContext)), a = h(r, b((e) => e.idSelectorCallback)), o = h(r, b((e) => e.selectedIds)), s = h(r, b((e) => e.sortedData)), c = h(r, b((e) => e.setSelectedIds)), l = n.isDisabled ? s.filter((e) => n.isDisabled({
|
|
932
925
|
dataContext: i,
|
|
933
926
|
id: a(e),
|
|
934
927
|
row: e,
|
|
935
928
|
rowIndex: s.indexOf(e)
|
|
936
|
-
}) === !1) : s, u = l.every((e) => o.includes(a(e))), d = l.some((e) => o.includes(a(e))), f =
|
|
929
|
+
}) === !1) : s, u = l.every((e) => o.includes(a(e))), d = l.some((e) => o.includes(a(e))), f = M((e) => {
|
|
937
930
|
let t = l.map((e) => a(e));
|
|
938
|
-
c(u ? o.filter((e) => !t.includes(e)) : (0,
|
|
931
|
+
c(u ? o.filter((e) => !t.includes(e)) : (0, xt.default)([...o, ...t]));
|
|
939
932
|
}, [
|
|
940
933
|
l,
|
|
941
934
|
a,
|
|
@@ -943,9 +936,9 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
943
936
|
o,
|
|
944
937
|
c
|
|
945
938
|
]);
|
|
946
|
-
return /* @__PURE__ */
|
|
939
|
+
return /* @__PURE__ */ z(fe, {
|
|
947
940
|
checked: d,
|
|
948
|
-
checkedIcon: u ? void 0 : /* @__PURE__ */
|
|
941
|
+
checkedIcon: u ? void 0 : /* @__PURE__ */ z(We, {}),
|
|
949
942
|
name: "select-all",
|
|
950
943
|
onChange: f,
|
|
951
944
|
slotProps: { input: { "aria-label": t`Select all` } },
|
|
@@ -954,24 +947,25 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
954
947
|
padding: 0
|
|
955
948
|
}
|
|
956
949
|
});
|
|
957
|
-
},
|
|
958
|
-
let i =
|
|
950
|
+
}, Ct = ({ cell: e, getRowName: t, onReadableIndexClick: n, tableColumn: r }) => {
|
|
951
|
+
let i = y(), a = M((r) => {
|
|
959
952
|
if (n) {
|
|
960
953
|
if (!t) throw Error("getRowName is required when onReadableIndexClick is provided");
|
|
961
|
-
|
|
954
|
+
i.enablePageEvents && re.resolve(_).emit("click", {
|
|
962
955
|
label: t(e.row),
|
|
963
956
|
type: "table-row-index"
|
|
964
957
|
}), r.preventDefault(), r.stopPropagation(), n(e.row);
|
|
965
958
|
}
|
|
966
959
|
}, [
|
|
960
|
+
i.enablePageEvents,
|
|
967
961
|
t,
|
|
968
962
|
n,
|
|
969
963
|
e.row
|
|
970
964
|
]);
|
|
971
|
-
return n ? /* @__PURE__ */
|
|
965
|
+
return n ? /* @__PURE__ */ z(de, {
|
|
972
966
|
"aria-label": r.getAriaLabel(e),
|
|
973
967
|
color: "primary",
|
|
974
|
-
onClick:
|
|
968
|
+
onClick: a,
|
|
975
969
|
size: "small",
|
|
976
970
|
sx: {
|
|
977
971
|
height: "100%",
|
|
@@ -982,138 +976,142 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
982
976
|
variant: "text",
|
|
983
977
|
children: e.rowIndex + 1
|
|
984
978
|
}) : e.rowIndex + 1;
|
|
985
|
-
},
|
|
986
|
-
let w =
|
|
987
|
-
|
|
988
|
-
let
|
|
989
|
-
|
|
990
|
-
let
|
|
979
|
+
}, wt = ({ font: e, forceHorizontalOverflow: t, getRowName: n, headerHeight: r = 4, initialVisibleItemIndex: i, onRangeChanged: a = Ze.default, onReadableIndexClick: o, onRowClick: s, onRowMouseEnter: c = Ze.default, onRowMouseLeave: l = Ze.default, onVerticalScrollPositionChange: d, onVisibleItemIndexChange: f, overscanMain: p, overscanReverse: m, ref: v, rowHeight: x = 4, rowHighlightingSubject: S, sx: C }) => {
|
|
980
|
+
let w = we(), { t: T } = W(), E = y(), D = g(), { DEFAULT_OVERSCAN_MAIN: ee, DEFAULT_OVERSCAN_REVERSE: O } = E.table;
|
|
981
|
+
h(D, b((e) => e.getCurrentColumnVisualSettings().filter((e) => e.isVisible).map((e) => e.id)));
|
|
982
|
+
let te = h(D, b((e) => e.setCurrentColumnVisualSettings)), k = h(D, b((e) => e.sortedData)), A = h(D, b((e) => e.idSelectorCallback)), j = h(D, b((e) => e.columns)), ie = h(D, b((e) => e.isInitialized)), oe = h(D, b((e) => e.isRowEnabledCallback)), ce = h(D, b((e) => e.addEventListener)), P = h(D, b((e) => e.dataContext)), de = h(D, b((e) => e.isCondensed)), fe = h(D, b((e) => e.setSelectedIds)), pe = h(D, b((e) => e.columnDimensions)), H = I(null), me = I(Ze.default), [U, he] = L(!1), ge = F(() => Se(be(w.palette.divider, 1), .1), [w.palette.divider]), _e = F(() => xe(be(w.palette.divider, 1), .15), [w.palette.divider]), ve = Ee(), ye = I(null), Ce = I(0), De = I(null), Oe = I(/* @__PURE__ */ new Set()), ke = I(!1), Ae = I(null), [K, je] = L(), Me = I(null), Ne = I(null), q = I(null);
|
|
983
|
+
h(D, (e) => JSON.stringify(e.filters.map((e) => e.filterValue))), h(D, b((e) => e.sortByField)), h(D, b((e) => e.sortDirection));
|
|
984
|
+
let Pe = M((e, t) => {
|
|
991
985
|
if (s) {
|
|
992
986
|
if (!n) throw Error("getRowName is required when onRowClick is provided");
|
|
993
|
-
|
|
987
|
+
E.enablePageEvents && re.resolve(_).emit("click", {
|
|
994
988
|
label: n(e.row),
|
|
995
989
|
type: "table-row"
|
|
996
990
|
}), t.preventDefault(), t.stopPropagation(), s(e);
|
|
997
991
|
}
|
|
998
|
-
}, [
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
992
|
+
}, [
|
|
993
|
+
E.enablePageEvents,
|
|
994
|
+
n,
|
|
995
|
+
s
|
|
996
|
+
]), J = M(() => H?.current?.filter((e) => e.isVisible) ?? [], []), Y = M(() => {
|
|
997
|
+
if (!H?.current?.length || !K) return;
|
|
998
|
+
let e = (0, Ye.default)(J(), (e) => e.calculatedWidth), t = K.querySelector("[role=table]");
|
|
999
|
+
Ce.current = e, t && (t.style.width = `${e}px`);
|
|
1000
|
+
}, [K, J]);
|
|
1001
|
+
ue(() => {
|
|
1002
|
+
Y();
|
|
1003
|
+
}, [Y]);
|
|
1004
|
+
let Fe = M((e, t) => /* @__PURE__ */ z(Ct, {
|
|
1007
1005
|
cell: t,
|
|
1008
1006
|
getRowName: n,
|
|
1009
1007
|
onReadableIndexClick: o,
|
|
1010
1008
|
tableColumn: e
|
|
1011
|
-
}, t.id), [n, o]),
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
}, [
|
|
1015
|
-
let
|
|
1016
|
-
if (!e.shiftKey || !
|
|
1017
|
-
|
|
1009
|
+
}, t.id), [n, o]), Ie = M((e) => /* @__PURE__ */ z(St, { tableColumnParams: e }), []);
|
|
1010
|
+
N(() => {
|
|
1011
|
+
Ne.current = null;
|
|
1012
|
+
}, [k]);
|
|
1013
|
+
let Le = M((e, t) => {
|
|
1014
|
+
if (!e.shiftKey || !Ne.current) {
|
|
1015
|
+
Ne.current = t;
|
|
1018
1016
|
return;
|
|
1019
1017
|
}
|
|
1020
|
-
let n =
|
|
1018
|
+
let n = k.findIndex((e) => A(e) === Ne.current), r = k.findIndex((e) => A(e) === t);
|
|
1021
1019
|
if (n === -1 || r === -1) return;
|
|
1022
|
-
let [i, a] = n < r ? [n, r] : [r, n], o =
|
|
1023
|
-
|
|
1020
|
+
let [i, a] = n < r ? [n, r] : [r, n], o = k.slice(i, a + 1).map((e) => A(e)), s = D.getState().selectedIds, c = D.getState().selectedIds.includes(t) ? s.filter((e) => !o.includes(e)) : Array.from(/* @__PURE__ */ new Set([...s, ...o]));
|
|
1021
|
+
fe(c), Ne.current = t;
|
|
1024
1022
|
}, [
|
|
1025
|
-
j,
|
|
1026
|
-
ie,
|
|
1027
1023
|
A,
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1024
|
+
fe,
|
|
1025
|
+
k,
|
|
1026
|
+
D
|
|
1027
|
+
]), Re = M((e, t) => {
|
|
1028
|
+
let n = A(t.row);
|
|
1029
|
+
return /* @__PURE__ */ z(bt, {
|
|
1032
1030
|
cell: t,
|
|
1033
|
-
onCheckBoxClick:
|
|
1031
|
+
onCheckBoxClick: Le,
|
|
1034
1032
|
tableColumn: e
|
|
1035
1033
|
}, n);
|
|
1036
|
-
}, [
|
|
1037
|
-
if (!
|
|
1038
|
-
let e = u.updateColumnSizesInVisualSettings(
|
|
1039
|
-
|
|
1034
|
+
}, [A, Le]), X = M(() => {
|
|
1035
|
+
if (!j.length || !K) return;
|
|
1036
|
+
let e = u.updateColumnSizesInVisualSettings(K, ve, k, j, H.current);
|
|
1037
|
+
U && (K.querySelectorAll("[data-column-index]").forEach((t) => {
|
|
1040
1038
|
let n = t.getAttribute("data-id");
|
|
1041
1039
|
t.style.width = `${e.get(n).calculatedWidth}px`;
|
|
1042
|
-
}),
|
|
1040
|
+
}), Y());
|
|
1043
1041
|
}, [
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1042
|
+
j,
|
|
1043
|
+
K,
|
|
1044
|
+
ve,
|
|
1045
|
+
k,
|
|
1046
|
+
U,
|
|
1047
|
+
Y
|
|
1050
1048
|
]);
|
|
1051
|
-
|
|
1052
|
-
|
|
1049
|
+
N(() => {
|
|
1050
|
+
K && !U && ie && (H.current = D.getState().getCurrentColumnVisualSettings(), X(), Y(), he(!0));
|
|
1053
1051
|
}, [
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1052
|
+
K,
|
|
1053
|
+
U,
|
|
1054
|
+
ie,
|
|
1055
|
+
D,
|
|
1056
|
+
X,
|
|
1057
|
+
Y
|
|
1060
1058
|
]);
|
|
1061
|
-
let
|
|
1062
|
-
|
|
1063
|
-
}, [
|
|
1064
|
-
|
|
1065
|
-
}, 500, { trailing: !0 }),
|
|
1066
|
-
e.calculatedWidth = t, e.widthPx = t, e.hasResized = !0,
|
|
1067
|
-
}, [
|
|
1059
|
+
let ze = M(() => K?.querySelector("[data-virtuoso-scroller=true]"), [K]), Be = M(() => {
|
|
1060
|
+
te(H.current);
|
|
1061
|
+
}, [te]), Ve = $e(() => {
|
|
1062
|
+
Be();
|
|
1063
|
+
}, 500, { trailing: !0 }), He = M((e, t) => {
|
|
1064
|
+
e.calculatedWidth = t, e.widthPx = t, e.hasResized = !0, X(), Ve();
|
|
1065
|
+
}, [X, Ve]), Ue = M((e, t) => {
|
|
1068
1066
|
if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
1069
1067
|
e.preventDefault();
|
|
1070
|
-
let n =
|
|
1071
|
-
|
|
1072
|
-
}, [
|
|
1068
|
+
let n = H.current.find((e) => e.id === t.id), r = n.calculatedWidth, i = e.key === "ArrowLeft" ? Math.max(50, r - 10) : r + 10;
|
|
1069
|
+
He(n, i);
|
|
1070
|
+
}, [He]), We = M((e, t) => {
|
|
1073
1071
|
e.preventDefault();
|
|
1074
|
-
let n =
|
|
1072
|
+
let n = H.current.find((e) => e.id === t.id), r = e.clientX, i = n?.calculatedWidth, a = (e) => {
|
|
1075
1073
|
let t = e.clientX;
|
|
1076
1074
|
if (r === t) return;
|
|
1077
1075
|
let a = t - r, o = Math.max(50, i + a);
|
|
1078
|
-
i !== o &&
|
|
1076
|
+
i !== o && He(n, o);
|
|
1079
1077
|
}, o = (e) => {
|
|
1080
|
-
|
|
1078
|
+
me.current(), me.current = Ze.default;
|
|
1081
1079
|
};
|
|
1082
|
-
document.addEventListener("mousemove", a), document.addEventListener("mouseup", o),
|
|
1080
|
+
document.addEventListener("mousemove", a), document.addEventListener("mouseup", o), me.current = () => {
|
|
1083
1081
|
document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", o);
|
|
1084
1082
|
};
|
|
1085
|
-
}, [
|
|
1086
|
-
|
|
1087
|
-
|
|
1083
|
+
}, [He]);
|
|
1084
|
+
N(() => () => {
|
|
1085
|
+
me.current();
|
|
1088
1086
|
}, []);
|
|
1089
|
-
let
|
|
1090
|
-
|
|
1087
|
+
let Ge = M((e, t) => u.handleMoveColumn(pe, H.current, j, e, t), [pe, j]), Ke = M(() => {
|
|
1088
|
+
K.querySelectorAll("[data-column-index]").forEach((e) => {
|
|
1091
1089
|
let t = e.getAttribute("data-id");
|
|
1092
|
-
e.style.order =
|
|
1090
|
+
e.style.order = H.current.findIndex((e) => e.id === t).toString();
|
|
1093
1091
|
});
|
|
1094
|
-
}, [
|
|
1095
|
-
|
|
1092
|
+
}, [K]);
|
|
1093
|
+
N(() => {
|
|
1096
1094
|
let e = () => {
|
|
1097
|
-
|
|
1098
|
-
}, t =
|
|
1095
|
+
X(), Ke();
|
|
1096
|
+
}, t = ne.getInstance();
|
|
1099
1097
|
return t.window.addEventListener("resize", e), () => {
|
|
1100
1098
|
t.window.removeEventListener("resize", e);
|
|
1101
1099
|
};
|
|
1102
|
-
}, [
|
|
1103
|
-
let
|
|
1104
|
-
let t =
|
|
1100
|
+
}, [Ke, X]);
|
|
1101
|
+
let qe = M((e) => {
|
|
1102
|
+
let t = J();
|
|
1105
1103
|
return {
|
|
1106
1104
|
elementIndex: t.findIndex((t) => t.id === e.id),
|
|
1107
1105
|
visibleTableSettingsColumns: t,
|
|
1108
1106
|
widths: t.map((e) => e.calculatedWidth)
|
|
1109
1107
|
};
|
|
1110
|
-
}, [
|
|
1111
|
-
let n =
|
|
1112
|
-
if (e.type === "start" && (
|
|
1108
|
+
}, [J]), Je = M((e, t) => {
|
|
1109
|
+
let n = qe(t);
|
|
1110
|
+
if (e.type === "start" && (ne.getInstance().body.style.setProperty("overflow", "hidden"), K?.style.setProperty("--selection-background", "none"), e.target.style.setProperty("opacity", "0.3"), q.current = {
|
|
1113
1111
|
clonedElement: e.target.cloneNode(!0),
|
|
1114
1112
|
elementOffsetX: n.widths.slice(0, n.elementIndex).reduce((e, t) => e + t, 0) - 15,
|
|
1115
|
-
scrollPosition:
|
|
1116
|
-
},
|
|
1113
|
+
scrollPosition: ze().scrollLeft
|
|
1114
|
+
}, q.current.clonedElement.style.cssText = `
|
|
1117
1115
|
font-weight: bold;
|
|
1118
1116
|
position: absolute;
|
|
1119
1117
|
top: ${e.target.getBoundingClientRect().top}px;
|
|
@@ -1122,44 +1120,44 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1122
1120
|
pointer-events: none;
|
|
1123
1121
|
filter: blur(0.5px);
|
|
1124
1122
|
box-shadow: 1px 2px 3px 0px rgba(0,0,0,0.5);
|
|
1125
|
-
`,
|
|
1126
|
-
|
|
1127
|
-
let r =
|
|
1128
|
-
(r < i &&
|
|
1123
|
+
`, ne.getInstance().body.appendChild(q.current.clonedElement)), e.type === "end" && (ne.getInstance().body.style.removeProperty("overflow"), K?.style.setProperty("--selection-background", "highlight"), ne.getInstance().document.getSelection().empty(), q.current.clonedElement.remove(), e.target.style.setProperty("opacity", "1")), e.type === "move") {
|
|
1124
|
+
q.current.clonedElement.style.setProperty("left", `${e.clientX - e.elementOffsetX}px`), q.current.clonedElement.style.setProperty("top", `${e.clientY}px`);
|
|
1125
|
+
let r = q.current.elementOffsetX + e.deltaX + e.elementOffsetX + (ze().scrollLeft - q.current.scrollPosition), i = n.widths.slice(0, n.elementIndex - 1).reduce((e, t) => e + t, 0) + Math.min(16, n.widths?.[n.elementIndex - 1] ?? Infinity), a = n.widths.slice(0, n.elementIndex + 1).reduce((e, t) => e + t, 0) + Math.min(16, n.widths?.[n.elementIndex + 1] ?? Infinity);
|
|
1126
|
+
(r < i && Ge(t, -1) || r > a && Ge(t, 1)) && (Ke(), qe(t));
|
|
1129
1127
|
}
|
|
1130
1128
|
}, [
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1129
|
+
qe,
|
|
1130
|
+
K?.style,
|
|
1131
|
+
ze,
|
|
1132
|
+
Ge,
|
|
1135
1133
|
w.zIndex.modal,
|
|
1136
|
-
|
|
1137
|
-
]),
|
|
1134
|
+
Ke
|
|
1135
|
+
]), tt = M(() => /* @__PURE__ */ z(V, {
|
|
1138
1136
|
"aria-rowindex": 1,
|
|
1139
1137
|
role: "row",
|
|
1140
1138
|
sx: {
|
|
1141
|
-
[`&:hover .${
|
|
1139
|
+
[`&:hover .${Z.columnDivider}`]: { opacity: 1 },
|
|
1142
1140
|
background: w.palette.background.paper,
|
|
1143
|
-
borderBottom: `1px solid ${
|
|
1141
|
+
borderBottom: `1px solid ${_e}`,
|
|
1144
1142
|
display: "flex",
|
|
1145
1143
|
fontWeight: "bold",
|
|
1146
1144
|
height: w.spacing(r),
|
|
1147
1145
|
zIndex: 3
|
|
1148
1146
|
},
|
|
1149
|
-
children:
|
|
1150
|
-
let n =
|
|
1151
|
-
return n ? /* @__PURE__ */
|
|
1147
|
+
children: J().map((e, t) => {
|
|
1148
|
+
let n = j.find((t) => t.id === e.id);
|
|
1149
|
+
return n ? /* @__PURE__ */ z(dt, {
|
|
1152
1150
|
column: n.type === "selectable" ? {
|
|
1153
1151
|
...n,
|
|
1154
|
-
renderHeaderContent:
|
|
1152
|
+
renderHeaderContent: Ie
|
|
1155
1153
|
} : n,
|
|
1156
1154
|
columnIndex: t,
|
|
1157
|
-
dividerColor:
|
|
1155
|
+
dividerColor: _e,
|
|
1158
1156
|
height: w.spacing(r),
|
|
1159
|
-
onColumnDividerKeyDown:
|
|
1160
|
-
onColumnDividerMouseDown:
|
|
1161
|
-
onCustomDrag:
|
|
1162
|
-
order:
|
|
1157
|
+
onColumnDividerKeyDown: Ue,
|
|
1158
|
+
onColumnDividerMouseDown: We,
|
|
1159
|
+
onCustomDrag: Je,
|
|
1160
|
+
order: H.current.findIndex((t) => t.id === e.id),
|
|
1163
1161
|
role: "columnheader",
|
|
1164
1162
|
width: e.calculatedWidth,
|
|
1165
1163
|
xOffset: e.offsetX
|
|
@@ -1168,31 +1166,31 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1168
1166
|
}), [
|
|
1169
1167
|
w,
|
|
1170
1168
|
r,
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
]),
|
|
1179
|
-
let i =
|
|
1169
|
+
_e,
|
|
1170
|
+
J,
|
|
1171
|
+
j,
|
|
1172
|
+
Ie,
|
|
1173
|
+
We,
|
|
1174
|
+
Ue,
|
|
1175
|
+
Je
|
|
1176
|
+
]), nt = M((e, t) => /* @__PURE__ */ z(R, { children: J().map((n, r) => {
|
|
1177
|
+
let i = j.find((e) => e.id === n.id), a;
|
|
1180
1178
|
if (i.cellTitleGetter) a = i.cellTitleGetter({
|
|
1181
1179
|
column: i,
|
|
1182
|
-
dataContext:
|
|
1180
|
+
dataContext: P,
|
|
1183
1181
|
id: n.id,
|
|
1184
1182
|
row: t,
|
|
1185
1183
|
rowIndex: e
|
|
1186
1184
|
});
|
|
1187
1185
|
else if (i.type === "text") a = u.getTableTextCellValue({
|
|
1188
1186
|
column: i,
|
|
1189
|
-
dataContext:
|
|
1187
|
+
dataContext: P,
|
|
1190
1188
|
row: t,
|
|
1191
1189
|
rowIndex: e
|
|
1192
1190
|
});
|
|
1193
1191
|
else if (i.type === "boolean") a = u.getTableBooleanCellDisplayValue({
|
|
1194
1192
|
column: i,
|
|
1195
|
-
dataContext:
|
|
1193
|
+
dataContext: P,
|
|
1196
1194
|
row: t,
|
|
1197
1195
|
rowIndex: e,
|
|
1198
1196
|
t: T
|
|
@@ -1200,35 +1198,35 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1200
1198
|
else if (i.type === "number") {
|
|
1201
1199
|
let n = u.getTableNumberCellValue({
|
|
1202
1200
|
column: i,
|
|
1203
|
-
dataContext:
|
|
1201
|
+
dataContext: P,
|
|
1204
1202
|
row: t,
|
|
1205
1203
|
rowIndex: e
|
|
1206
1204
|
});
|
|
1207
|
-
a = (0,
|
|
1205
|
+
a = (0, Xe.default)(n) ? n.toString() : "";
|
|
1208
1206
|
} else i.type === "date" ? a = u.getTableDateCellValue({
|
|
1209
1207
|
column: i,
|
|
1210
|
-
dataContext:
|
|
1208
|
+
dataContext: P,
|
|
1211
1209
|
row: t,
|
|
1212
1210
|
rowIndex: e
|
|
1213
1211
|
}) : i.type === "options" && (a = u.getTableOptionsCellDisplayValue({
|
|
1214
1212
|
column: i,
|
|
1215
|
-
dataContext:
|
|
1213
|
+
dataContext: P,
|
|
1216
1214
|
row: t,
|
|
1217
1215
|
rowIndex: e
|
|
1218
1216
|
}));
|
|
1219
1217
|
let o = {
|
|
1220
|
-
backgroundColor:
|
|
1218
|
+
backgroundColor: de && i.cellColorGetter ? i.cellColorGetter({
|
|
1221
1219
|
column: i,
|
|
1222
|
-
dataContext:
|
|
1220
|
+
dataContext: P,
|
|
1223
1221
|
id: n.id,
|
|
1224
1222
|
row: t,
|
|
1225
1223
|
rowIndex: e
|
|
1226
1224
|
}) : void 0,
|
|
1227
1225
|
columnIndex: r,
|
|
1228
|
-
enabled: !
|
|
1226
|
+
enabled: !oe || oe(t, P),
|
|
1229
1227
|
height: w.spacing(x),
|
|
1230
|
-
onClick:
|
|
1231
|
-
order:
|
|
1228
|
+
onClick: Pe,
|
|
1229
|
+
order: H.current.findIndex((e) => e.id === n.id),
|
|
1232
1230
|
row: t,
|
|
1233
1231
|
rowIndex: e,
|
|
1234
1232
|
sx: i.sx,
|
|
@@ -1236,66 +1234,66 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1236
1234
|
width: n.calculatedWidth,
|
|
1237
1235
|
xOffset: n.offsetX
|
|
1238
1236
|
};
|
|
1239
|
-
return i.type === "actions" ? /* @__PURE__ */
|
|
1237
|
+
return i.type === "actions" ? /* @__PURE__ */ z(ft, {
|
|
1240
1238
|
...o,
|
|
1241
1239
|
column: i
|
|
1242
|
-
}, n.id) : /* @__PURE__ */
|
|
1240
|
+
}, n.id) : /* @__PURE__ */ B(st, {
|
|
1243
1241
|
...o,
|
|
1244
1242
|
column: i,
|
|
1245
1243
|
children: [
|
|
1246
|
-
!!i.renderCell && /* @__PURE__ */
|
|
1244
|
+
!!i.renderCell && /* @__PURE__ */ z(ae, { children: i.renderCell({
|
|
1247
1245
|
column: i,
|
|
1248
|
-
dataContext:
|
|
1246
|
+
dataContext: P,
|
|
1249
1247
|
id: n.id,
|
|
1250
1248
|
row: t,
|
|
1251
1249
|
rowIndex: e
|
|
1252
1250
|
}) }, i.id),
|
|
1253
|
-
!i.renderCell && !!i.displayValueGetter && /* @__PURE__ */
|
|
1251
|
+
!i.renderCell && !!i.displayValueGetter && /* @__PURE__ */ z(ae, { children: /* @__PURE__ */ z(et, { content: i.displayValueGetter({
|
|
1254
1252
|
column: i,
|
|
1255
|
-
dataContext:
|
|
1253
|
+
dataContext: P,
|
|
1256
1254
|
id: n.id,
|
|
1257
1255
|
row: t,
|
|
1258
1256
|
rowIndex: e
|
|
1259
1257
|
}) }) }, i.id),
|
|
1260
1258
|
!i.displayValueGetter && !i.renderCell && i.type === "text" && u.getTableTextCellValue({
|
|
1261
1259
|
column: i,
|
|
1262
|
-
dataContext:
|
|
1260
|
+
dataContext: P,
|
|
1263
1261
|
row: t,
|
|
1264
1262
|
rowIndex: e
|
|
1265
1263
|
}),
|
|
1266
1264
|
!i.displayValueGetter && !i.renderCell && i.type === "boolean" && u.getTableBooleanCellDisplayValue({
|
|
1267
1265
|
column: i,
|
|
1268
|
-
dataContext:
|
|
1266
|
+
dataContext: P,
|
|
1269
1267
|
row: t,
|
|
1270
1268
|
rowIndex: e,
|
|
1271
1269
|
t: T
|
|
1272
1270
|
}),
|
|
1273
1271
|
!i.displayValueGetter && !i.renderCell && i.type === "number" && u.getTableNumberCellValue({
|
|
1274
1272
|
column: i,
|
|
1275
|
-
dataContext:
|
|
1273
|
+
dataContext: P,
|
|
1276
1274
|
row: t,
|
|
1277
1275
|
rowIndex: e
|
|
1278
1276
|
}),
|
|
1279
1277
|
!i.displayValueGetter && !i.renderCell && i.type === "date" && u.getTableDateCellValue({
|
|
1280
1278
|
column: i,
|
|
1281
|
-
dataContext:
|
|
1279
|
+
dataContext: P,
|
|
1282
1280
|
row: t,
|
|
1283
1281
|
rowIndex: e
|
|
1284
1282
|
}),
|
|
1285
1283
|
!i.displayValueGetter && !i.renderCell && i.type === "options" && u.getTableOptionsCellDisplayValue({
|
|
1286
1284
|
column: i,
|
|
1287
|
-
dataContext:
|
|
1285
|
+
dataContext: P,
|
|
1288
1286
|
row: t,
|
|
1289
1287
|
rowIndex: e
|
|
1290
1288
|
}),
|
|
1291
|
-
!i.displayValueGetter && !i.renderCell && i.type === "readableIndex" &&
|
|
1292
|
-
dataContext:
|
|
1289
|
+
!i.displayValueGetter && !i.renderCell && i.type === "readableIndex" && Fe(i, {
|
|
1290
|
+
dataContext: P,
|
|
1293
1291
|
id: n.id,
|
|
1294
1292
|
row: t,
|
|
1295
1293
|
rowIndex: e
|
|
1296
1294
|
}),
|
|
1297
|
-
!i.displayValueGetter && !i.renderCell && i.type === "selectable" &&
|
|
1298
|
-
dataContext:
|
|
1295
|
+
!i.displayValueGetter && !i.renderCell && i.type === "selectable" && Re(i, {
|
|
1296
|
+
dataContext: P,
|
|
1299
1297
|
id: n.id,
|
|
1300
1298
|
row: t,
|
|
1301
1299
|
rowIndex: e
|
|
@@ -1303,31 +1301,31 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1303
1301
|
]
|
|
1304
1302
|
}, n.id);
|
|
1305
1303
|
}) }), [
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
Ae,
|
|
1304
|
+
J,
|
|
1305
|
+
oe,
|
|
1309
1306
|
Pe,
|
|
1310
|
-
|
|
1307
|
+
Re,
|
|
1308
|
+
Fe,
|
|
1311
1309
|
x,
|
|
1312
1310
|
T,
|
|
1313
|
-
|
|
1311
|
+
j,
|
|
1314
1312
|
w,
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
]),
|
|
1313
|
+
P,
|
|
1314
|
+
de
|
|
1315
|
+
]), rt = M((e) => {
|
|
1318
1316
|
c(e);
|
|
1319
|
-
}, [c]),
|
|
1317
|
+
}, [c]), it = M((e) => {
|
|
1320
1318
|
l(e);
|
|
1321
1319
|
}, [l]);
|
|
1322
|
-
|
|
1323
|
-
if (!S) return
|
|
1320
|
+
N(() => {
|
|
1321
|
+
if (!S) return Ze.default;
|
|
1324
1322
|
let e = S.subscribe((e, t) => {
|
|
1325
1323
|
t.forEach((e) => {
|
|
1326
|
-
|
|
1324
|
+
K.querySelectorAll(`[data-testid=virtuoso-item-list] [data-id='${e}']`).forEach((e) => {
|
|
1327
1325
|
e.classList.remove("highlighted");
|
|
1328
1326
|
});
|
|
1329
1327
|
}), e.forEach((e) => {
|
|
1330
|
-
|
|
1328
|
+
K.querySelectorAll(`[data-testid=virtuoso-item-list] [data-id='${e}']`).forEach((e) => {
|
|
1331
1329
|
e.classList.add("highlighted");
|
|
1332
1330
|
});
|
|
1333
1331
|
});
|
|
@@ -1337,85 +1335,85 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1337
1335
|
};
|
|
1338
1336
|
}, [
|
|
1339
1337
|
S,
|
|
1340
|
-
|
|
1338
|
+
K,
|
|
1341
1339
|
w.palette.action.hover,
|
|
1342
1340
|
w.palette.background.paper
|
|
1343
|
-
]),
|
|
1341
|
+
]), N(() => {
|
|
1344
1342
|
let e = () => {
|
|
1345
|
-
|
|
1343
|
+
X(), Ke(), Y(), Be();
|
|
1346
1344
|
}, t = [
|
|
1347
|
-
|
|
1348
|
-
|
|
1345
|
+
ce("condensedChange", (t) => {
|
|
1346
|
+
D.getState().setIsCondensed(t), H.current = D.getState().getCurrentColumnVisualSettings(), e();
|
|
1349
1347
|
}),
|
|
1350
|
-
|
|
1351
|
-
|
|
1348
|
+
ce("reset", () => {
|
|
1349
|
+
D.getState().resetColumns(), H.current = D.getState().getCurrentColumnVisualSettings(), e();
|
|
1352
1350
|
}),
|
|
1353
|
-
|
|
1354
|
-
|
|
1351
|
+
ce("columnVisibilityChange", (t) => {
|
|
1352
|
+
H.current.forEach((e) => {
|
|
1355
1353
|
e.isVisible = t.includes(e.id);
|
|
1356
1354
|
}), e();
|
|
1357
1355
|
}),
|
|
1358
|
-
|
|
1359
|
-
|
|
1356
|
+
ce("columnOrderChange", (t) => {
|
|
1357
|
+
H.current.sort((e, n) => t.indexOf(e.id) - t.indexOf(n.id)), e();
|
|
1360
1358
|
}),
|
|
1361
|
-
|
|
1362
|
-
|
|
1359
|
+
ce("openColumnsEditorDialog", (e) => {
|
|
1360
|
+
Me.current.open({ hasCellData: e });
|
|
1363
1361
|
})
|
|
1364
1362
|
];
|
|
1365
1363
|
return () => {
|
|
1366
1364
|
t.forEach((e) => e());
|
|
1367
1365
|
};
|
|
1368
1366
|
}, [
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1367
|
+
ce,
|
|
1368
|
+
Be,
|
|
1369
|
+
j,
|
|
1370
|
+
D,
|
|
1371
|
+
Ke,
|
|
1372
|
+
X,
|
|
1373
|
+
Y
|
|
1376
1374
|
]);
|
|
1377
|
-
let
|
|
1378
|
-
let e =
|
|
1379
|
-
if (e && d && d(e.scrollTop),
|
|
1375
|
+
let at = M(() => {
|
|
1376
|
+
let e = ze();
|
|
1377
|
+
if (e && d && d(e.scrollTop), ye.current && f) {
|
|
1380
1378
|
let t = e.scrollTop, n = +w.spacing(x).replace("px", "");
|
|
1381
1379
|
f(Math.floor(t / n));
|
|
1382
1380
|
}
|
|
1383
1381
|
}, [
|
|
1384
|
-
|
|
1382
|
+
ze,
|
|
1385
1383
|
d,
|
|
1386
1384
|
f,
|
|
1387
1385
|
w,
|
|
1388
1386
|
x
|
|
1389
|
-
]),
|
|
1390
|
-
let t =
|
|
1387
|
+
]), ot = M(() => +w.spacing(x).replace("px", ""), [x, w]), Q = M((e) => {
|
|
1388
|
+
let t = ze();
|
|
1391
1389
|
t && (t.scrollTop = e);
|
|
1392
|
-
}, [
|
|
1393
|
-
let e =
|
|
1394
|
-
e && !
|
|
1395
|
-
}, []),
|
|
1396
|
-
|
|
1397
|
-
hasRendered:
|
|
1390
|
+
}, [ze]), $ = M(() => {
|
|
1391
|
+
let e = Ae.current;
|
|
1392
|
+
e && !ke.current && e.hasRendered && (Ae.current = null, e.onScrolledToIndex());
|
|
1393
|
+
}, []), ct = M((e, t) => {
|
|
1394
|
+
Ae.current = t ? {
|
|
1395
|
+
hasRendered: Oe.current.has(e),
|
|
1398
1396
|
index: e,
|
|
1399
1397
|
onScrolledToIndex: t
|
|
1400
|
-
} : null,
|
|
1398
|
+
} : null, ye.current?.scrollToIndex(e), $();
|
|
1401
1399
|
}, [$]);
|
|
1402
|
-
|
|
1403
|
-
scrollToIndex:
|
|
1404
|
-
setVerticalScrollPosition:
|
|
1400
|
+
le(v, () => ({
|
|
1401
|
+
scrollToIndex: ct,
|
|
1402
|
+
setVerticalScrollPosition: Q
|
|
1405
1403
|
}));
|
|
1406
|
-
let
|
|
1407
|
-
|
|
1408
|
-
}, [a]),
|
|
1409
|
-
|
|
1410
|
-
let t =
|
|
1411
|
-
t &&
|
|
1412
|
-
}, [$]),
|
|
1413
|
-
|
|
1404
|
+
let lt = M((e) => {
|
|
1405
|
+
De.current = e, a(e);
|
|
1406
|
+
}, [a]), ut = M((e) => {
|
|
1407
|
+
Oe.current = new Set(e.map((e) => e.index));
|
|
1408
|
+
let t = Ae.current;
|
|
1409
|
+
t && Oe.current.has(t.index) && (t.hasRendered = !0), $();
|
|
1410
|
+
}, [$]), pt = M((e) => {
|
|
1411
|
+
ke.current = e, $();
|
|
1414
1412
|
}, [$]);
|
|
1415
|
-
return
|
|
1416
|
-
|
|
1417
|
-
}, [a,
|
|
1418
|
-
ref:
|
|
1413
|
+
return N(() => {
|
|
1414
|
+
De.current && a(De.current);
|
|
1415
|
+
}, [a, k]), /* @__PURE__ */ B(V, {
|
|
1416
|
+
ref: je,
|
|
1419
1417
|
style: { "--selection-background": "highlight" },
|
|
1420
1418
|
sx: {
|
|
1421
1419
|
"*::selection": { backgroundColor: "var(--selection-background) !important" },
|
|
@@ -1424,43 +1422,43 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1424
1422
|
width: "100%",
|
|
1425
1423
|
...C
|
|
1426
1424
|
},
|
|
1427
|
-
children: [
|
|
1428
|
-
...
|
|
1425
|
+
children: [U && /* @__PURE__ */ z(Te, {
|
|
1426
|
+
...G.createAttributes("Table"),
|
|
1429
1427
|
components: {
|
|
1430
|
-
EmptyPlaceholder:
|
|
1428
|
+
EmptyPlaceholder: se((e, t) => /* @__PURE__ */ z(V, {
|
|
1431
1429
|
...e,
|
|
1432
1430
|
ref: t
|
|
1433
1431
|
})),
|
|
1434
|
-
FillerRow:
|
|
1432
|
+
FillerRow: se((e, t) => /* @__PURE__ */ z(V, {
|
|
1435
1433
|
ref: t,
|
|
1436
1434
|
style: { height: e.height }
|
|
1437
1435
|
})),
|
|
1438
|
-
Table:
|
|
1436
|
+
Table: se((e, t) => /* @__PURE__ */ z(V, {
|
|
1439
1437
|
...e,
|
|
1440
|
-
"data-row-count":
|
|
1438
|
+
"data-row-count": k.length,
|
|
1441
1439
|
ref: t,
|
|
1442
1440
|
role: "table",
|
|
1443
1441
|
sx: {
|
|
1444
1442
|
minWidth: "100%",
|
|
1445
1443
|
position: "relative",
|
|
1446
|
-
width:
|
|
1444
|
+
width: Ce.current
|
|
1447
1445
|
}
|
|
1448
1446
|
})),
|
|
1449
|
-
TableBody:
|
|
1447
|
+
TableBody: se((t, n) => /* @__PURE__ */ z(V, {
|
|
1450
1448
|
...t,
|
|
1451
1449
|
ref: n,
|
|
1452
1450
|
sx: { font: e }
|
|
1453
1451
|
})),
|
|
1454
|
-
TableHead:
|
|
1452
|
+
TableHead: se((e, t) => /* @__PURE__ */ z(V, {
|
|
1455
1453
|
...e,
|
|
1456
1454
|
ref: t
|
|
1457
1455
|
})),
|
|
1458
|
-
TableRow:
|
|
1459
|
-
let n = !
|
|
1460
|
-
return /* @__PURE__ */
|
|
1461
|
-
"data-id":
|
|
1462
|
-
onMouseEnter: () =>
|
|
1463
|
-
onMouseLeave: () =>
|
|
1456
|
+
TableRow: se((e, t) => {
|
|
1457
|
+
let n = !oe || oe(e.item, P);
|
|
1458
|
+
return /* @__PURE__ */ z(V, {
|
|
1459
|
+
"data-id": A(e.item),
|
|
1460
|
+
onMouseEnter: () => rt(e.item),
|
|
1461
|
+
onMouseLeave: () => it(e.item),
|
|
1464
1462
|
ref: t,
|
|
1465
1463
|
role: "row",
|
|
1466
1464
|
sx: {
|
|
@@ -1474,44 +1472,44 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1474
1472
|
backgroundColor: w.palette.grey[100],
|
|
1475
1473
|
color: `${w.palette.text.primary} !important`
|
|
1476
1474
|
},
|
|
1477
|
-
borderBottom: `1px solid ${
|
|
1475
|
+
borderBottom: `1px solid ${ge}`,
|
|
1478
1476
|
color: n ? void 0 : "text.disabled",
|
|
1479
1477
|
cursor: n && s ? "pointer" : void 0,
|
|
1480
1478
|
display: "flex",
|
|
1481
1479
|
height: w.spacing(x)
|
|
1482
1480
|
},
|
|
1483
|
-
...(0,
|
|
1481
|
+
...(0, Qe.default)(e, "item")
|
|
1484
1482
|
});
|
|
1485
1483
|
})
|
|
1486
1484
|
},
|
|
1487
|
-
data:
|
|
1488
|
-
fixedHeaderContent:
|
|
1485
|
+
data: k,
|
|
1486
|
+
fixedHeaderContent: tt,
|
|
1489
1487
|
fixedItemHeight: +w.spacing(x).replace("px", ""),
|
|
1490
1488
|
initialTopMostItemIndex: i ?? 0,
|
|
1491
|
-
isScrolling:
|
|
1492
|
-
itemContent:
|
|
1493
|
-
itemSize:
|
|
1494
|
-
itemsRendered:
|
|
1495
|
-
onScroll:
|
|
1489
|
+
isScrolling: pt,
|
|
1490
|
+
itemContent: nt,
|
|
1491
|
+
itemSize: ot,
|
|
1492
|
+
itemsRendered: ut,
|
|
1493
|
+
onScroll: at,
|
|
1496
1494
|
overscan: {
|
|
1497
|
-
main:
|
|
1498
|
-
reverse:
|
|
1495
|
+
main: p ?? ee,
|
|
1496
|
+
reverse: m ?? O
|
|
1499
1497
|
},
|
|
1500
|
-
rangeChanged:
|
|
1501
|
-
ref:
|
|
1498
|
+
rangeChanged: lt,
|
|
1499
|
+
ref: ye,
|
|
1502
1500
|
style: {
|
|
1503
1501
|
height: "100%",
|
|
1504
1502
|
overflowX: t ? "scroll" : "auto"
|
|
1505
1503
|
},
|
|
1506
|
-
totalCount:
|
|
1507
|
-
}), /* @__PURE__ */
|
|
1504
|
+
totalCount: k.length
|
|
1505
|
+
}), /* @__PURE__ */ z(yt, { ref: Me })]
|
|
1508
1506
|
});
|
|
1509
|
-
},
|
|
1510
|
-
let { t: r } =
|
|
1511
|
-
return /* @__PURE__ */
|
|
1507
|
+
}, Tt = ({ caption: e, component: t = "h2", variant: n = "h2" }) => {
|
|
1508
|
+
let { t: r } = W(), i = g(), a = h(i, (e) => e.baseData.length), o = h(i, b((e) => e.sortedData.length));
|
|
1509
|
+
return /* @__PURE__ */ z(ye, {
|
|
1512
1510
|
component: t,
|
|
1513
1511
|
variant: n,
|
|
1514
|
-
children: /* @__PURE__ */
|
|
1512
|
+
children: /* @__PURE__ */ B(R, { children: [
|
|
1515
1513
|
o === 0 && (e ?? r("Items")),
|
|
1516
1514
|
o > 0 && o === a && r("{{items}} ({{count}})", {
|
|
1517
1515
|
count: o,
|
|
@@ -1525,10 +1523,10 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1525
1523
|
})
|
|
1526
1524
|
] })
|
|
1527
1525
|
});
|
|
1528
|
-
},
|
|
1529
|
-
t.exports = { ...
|
|
1530
|
-
})),
|
|
1531
|
-
var t =
|
|
1526
|
+
}, Et = /* @__PURE__ */ t(((e, t) => {
|
|
1527
|
+
t.exports = Object.prototype.hasOwnProperty.call(j, "module.exports") ? j["module.exports"] : { ...j };
|
|
1528
|
+
})), Dt = /* @__PURE__ */ t(((e) => {
|
|
1529
|
+
var t = Et();
|
|
1532
1530
|
function n(e, t) {
|
|
1533
1531
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
1534
1532
|
}
|
|
@@ -1565,7 +1563,7 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1565
1563
|
}
|
|
1566
1564
|
var d = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? u : c;
|
|
1567
1565
|
e.useSyncExternalStore = t.useSyncExternalStore === void 0 ? d : t.useSyncExternalStore;
|
|
1568
|
-
})),
|
|
1566
|
+
})), Ot = /* @__PURE__ */ t(((e) => {
|
|
1569
1567
|
process.env.NODE_ENV !== "production" && (function() {
|
|
1570
1568
|
function t(e, t) {
|
|
1571
1569
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
@@ -1608,13 +1606,13 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1608
1606
|
return t();
|
|
1609
1607
|
}
|
|
1610
1608
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1611
|
-
var a =
|
|
1609
|
+
var a = Et(), o = typeof Object.is == "function" ? Object.is : t, s = a.useState, c = a.useEffect, l = a.useLayoutEffect, u = a.useDebugValue, d = !1, f = !1, p = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? i : n;
|
|
1612
1610
|
e.useSyncExternalStore = a.useSyncExternalStore === void 0 ? p : a.useSyncExternalStore, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1613
1611
|
})();
|
|
1614
|
-
})),
|
|
1615
|
-
t.exports = process.env.NODE_ENV === "production" ?
|
|
1616
|
-
})),
|
|
1617
|
-
var t =
|
|
1612
|
+
})), kt = /* @__PURE__ */ t(((e, t) => {
|
|
1613
|
+
t.exports = process.env.NODE_ENV === "production" ? Dt() : Ot();
|
|
1614
|
+
})), At = /* @__PURE__ */ t(((e) => {
|
|
1615
|
+
var t = Et(), n = kt();
|
|
1618
1616
|
function r(e, t) {
|
|
1619
1617
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
1620
1618
|
}
|
|
@@ -1658,13 +1656,13 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1658
1656
|
f.hasValue = !0, f.value = p;
|
|
1659
1657
|
}, [p]), l(p), p;
|
|
1660
1658
|
};
|
|
1661
|
-
})),
|
|
1659
|
+
})), jt = /* @__PURE__ */ t(((e) => {
|
|
1662
1660
|
process.env.NODE_ENV !== "production" && (function() {
|
|
1663
1661
|
function t(e, t) {
|
|
1664
1662
|
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
|
|
1665
1663
|
}
|
|
1666
1664
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1667
|
-
var n =
|
|
1665
|
+
var n = Et(), r = kt(), i = typeof Object.is == "function" ? Object.is : t, a = r.useSyncExternalStore, o = n.useRef, s = n.useEffect, c = n.useMemo, l = n.useDebugValue;
|
|
1668
1666
|
e.useSyncExternalStoreWithSelector = function(e, t, n, r, u) {
|
|
1669
1667
|
var d = o(null);
|
|
1670
1668
|
if (d.current === null) {
|
|
@@ -1705,17 +1703,17 @@ var tt = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
1705
1703
|
}, [p]), l(p), p;
|
|
1706
1704
|
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1707
1705
|
})();
|
|
1708
|
-
})), { useSyncExternalStoreWithSelector:
|
|
1709
|
-
t.exports = process.env.NODE_ENV === "production" ?
|
|
1710
|
-
})))(), 1)).default,
|
|
1711
|
-
function
|
|
1712
|
-
let r =
|
|
1713
|
-
return
|
|
1706
|
+
})), { useSyncExternalStoreWithSelector: Mt } = (/* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
1707
|
+
t.exports = process.env.NODE_ENV === "production" ? At() : jt();
|
|
1708
|
+
})))(), 1)).default, Nt = (e) => e;
|
|
1709
|
+
function Pt(e, t = Nt, n) {
|
|
1710
|
+
let r = Mt(e.subscribe, e.getState, e.getInitialState, t, n);
|
|
1711
|
+
return ie.useDebugValue(r), r;
|
|
1714
1712
|
}
|
|
1715
1713
|
//#endregion
|
|
1716
1714
|
//#region src/components/ui/Table/TableFiltersSidebarItem.tsx
|
|
1717
|
-
var
|
|
1718
|
-
let r =
|
|
1715
|
+
var Ft = ke, It = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFilterWithinDimension: n }) => {
|
|
1716
|
+
let r = Pt(g(), (e) => e.filters, (e, t) => JSON.stringify(e.map((e) => e.filterValue)) === JSON.stringify(t.map((e) => e.filterValue))), i = e.filterIds.map((e) => r.find((t) => t.id === e)), { setValue: a } = je(), o = F(() => {
|
|
1719
1717
|
if (e.allowOnlyPreferredFilter || e.filterIds.length === 1) return [i.find((t) => t?.id && t.id === e.preferredFilterId)].filter((e) => !!e);
|
|
1720
1718
|
if (!e.allowMultipleVisibleFilters) {
|
|
1721
1719
|
let t = n ?? e.preferredFilterId;
|
|
@@ -1729,11 +1727,11 @@ var Pt = Ee, Ft = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
1729
1727
|
e.filterIds.length,
|
|
1730
1728
|
e.preferredFilterId,
|
|
1731
1729
|
n
|
|
1732
|
-
]), s =
|
|
1730
|
+
]), s = F(() => i.length > 1 && !e.allowOnlyPreferredFilter && !e.allowMultipleVisibleFilters, [
|
|
1733
1731
|
i.length,
|
|
1734
1732
|
e.allowMultipleVisibleFilters,
|
|
1735
1733
|
e.allowOnlyPreferredFilter
|
|
1736
|
-
]), c =
|
|
1734
|
+
]), c = F(() => !(i.length === 1 || e.allowOnlyPreferredFilter), [i.length, e.allowOnlyPreferredFilter]), l = F(() => s ? {
|
|
1737
1735
|
items: i.map((n) => ({
|
|
1738
1736
|
active: n === o[0],
|
|
1739
1737
|
callback: () => {
|
|
@@ -1754,23 +1752,23 @@ var Pt = Ee, Ft = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
1754
1752
|
t,
|
|
1755
1753
|
s
|
|
1756
1754
|
]);
|
|
1757
|
-
return o.length ? /* @__PURE__ */
|
|
1755
|
+
return o.length ? /* @__PURE__ */ B(V, {
|
|
1758
1756
|
sx: { mb: 2 },
|
|
1759
1757
|
children: [
|
|
1760
|
-
c && /* @__PURE__ */
|
|
1758
|
+
c && /* @__PURE__ */ B(V, {
|
|
1761
1759
|
sx: {
|
|
1762
1760
|
alignItems: "center",
|
|
1763
1761
|
display: "flex",
|
|
1764
1762
|
justifyContent: "space-between"
|
|
1765
1763
|
},
|
|
1766
|
-
children: [/* @__PURE__ */
|
|
1764
|
+
children: [/* @__PURE__ */ z(V, { children: /* @__PURE__ */ z(ye, {
|
|
1767
1765
|
sx: {
|
|
1768
1766
|
margin: 0,
|
|
1769
1767
|
padding: 0
|
|
1770
1768
|
},
|
|
1771
1769
|
variant: "h6",
|
|
1772
1770
|
children: e.label
|
|
1773
|
-
}) }), s && /* @__PURE__ */
|
|
1771
|
+
}) }), s && /* @__PURE__ */ z(V, { children: /* @__PURE__ */ z(Je, {
|
|
1774
1772
|
ButtonProps: {
|
|
1775
1773
|
color: "inherit",
|
|
1776
1774
|
size: "small",
|
|
@@ -1786,26 +1784,26 @@ var Pt = Ee, Ft = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
1786
1784
|
menuItemsData: l
|
|
1787
1785
|
}) })]
|
|
1788
1786
|
}),
|
|
1789
|
-
o.map((e) => /* @__PURE__ */
|
|
1787
|
+
o.map((e) => /* @__PURE__ */ z(V, {
|
|
1790
1788
|
sx: { my: 1 },
|
|
1791
|
-
children: /* @__PURE__ */
|
|
1789
|
+
children: /* @__PURE__ */ z(it, { filter: e })
|
|
1792
1790
|
}, e.id)),
|
|
1793
|
-
/* @__PURE__ */
|
|
1791
|
+
/* @__PURE__ */ z(pe, {})
|
|
1794
1792
|
]
|
|
1795
1793
|
}, e.id) : null;
|
|
1796
|
-
},
|
|
1797
|
-
let { t } =
|
|
1794
|
+
}, Lt = ({ onClose: e }) => {
|
|
1795
|
+
let { t } = W(), n = g(), r = h(n, (e) => e.setFilterValues), i = h(n, (e) => e.filterDimensions), a = Pt(n, (e) => e.filters, (e, t) => JSON.stringify(e.map((e) => e.filterValue)) === JSON.stringify(t.map((e) => e.filterValue))), o = h(n, (e) => e.filters.some((e) => !e.isInitialFilterValue(e.filterValue))), s = h(n, (e) => e.resetFilters), c = h(n, (e) => e.visibleFilterWithinDimensions), l = h(n, (e) => e.setVisibleFilterWithinDimensions), [u, d] = L(c), f = F(() => Object.fromEntries(a.map((e) => [e.id, e.initialFilterValue])), [a]), p = F(() => Object.fromEntries(a.map((e) => [e.id, e.filterValue ?? e.initialFilterValue])), [a]), m = K({
|
|
1798
1796
|
defaultValues: f,
|
|
1799
1797
|
values: p
|
|
1800
|
-
}), _ =
|
|
1798
|
+
}), _ = M((e, t) => {
|
|
1801
1799
|
d((n) => ({
|
|
1802
1800
|
...n,
|
|
1803
1801
|
[e]: t
|
|
1804
1802
|
}));
|
|
1805
|
-
}, []), { control: v, formState: { isDirty: y }, handleSubmit: b, reset: x, setValue: S } =
|
|
1803
|
+
}, []), { control: v, formState: { isDirty: y }, handleSubmit: b, reset: x, setValue: S } = m, C = Me({
|
|
1806
1804
|
control: v,
|
|
1807
1805
|
defaultValue: p
|
|
1808
|
-
}), w =
|
|
1806
|
+
}), w = F(() => Object.entries(C).some(([e, t]) => !a.find((t) => t.id === e).isInitialFilterValue(t)), [a, C]), T = M(async (t) => {
|
|
1809
1807
|
await r(t), x(t), l(u), e();
|
|
1810
1808
|
}, [
|
|
1811
1809
|
u,
|
|
@@ -1813,7 +1811,7 @@ var Pt = Ee, Ft = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
1813
1811
|
x,
|
|
1814
1812
|
r,
|
|
1815
1813
|
l
|
|
1816
|
-
]), E =
|
|
1814
|
+
]), E = M(async () => {
|
|
1817
1815
|
x(f), await s(), l(u), e();
|
|
1818
1816
|
}, [
|
|
1819
1817
|
f,
|
|
@@ -1822,13 +1820,13 @@ var Pt = Ee, Ft = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
1822
1820
|
x,
|
|
1823
1821
|
s,
|
|
1824
1822
|
l
|
|
1825
|
-
]), D =
|
|
1823
|
+
]), D = M((e) => {
|
|
1826
1824
|
let t = a.find((t) => t.id === e);
|
|
1827
1825
|
S(e, t.initialFilterValue, { shouldDirty: !0 });
|
|
1828
|
-
}, [a, S]),
|
|
1829
|
-
return /* @__PURE__ */
|
|
1830
|
-
...
|
|
1831
|
-
children: /* @__PURE__ */
|
|
1826
|
+
}, [a, S]), ee = F(() => a.filter((e) => e.showInSidebar), [a]);
|
|
1827
|
+
return /* @__PURE__ */ z(R, { children: !!a && !!p && !!f && /* @__PURE__ */ z(Ae, {
|
|
1828
|
+
...m,
|
|
1829
|
+
children: /* @__PURE__ */ B(V, {
|
|
1832
1830
|
autoComplete: "off",
|
|
1833
1831
|
component: "form",
|
|
1834
1832
|
id: "Filters",
|
|
@@ -1838,45 +1836,45 @@ var Pt = Ee, Ft = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
1838
1836
|
gridTemplateRows: "max-content auto",
|
|
1839
1837
|
height: "100%"
|
|
1840
1838
|
},
|
|
1841
|
-
children: [/* @__PURE__ */
|
|
1842
|
-
y && o && !w && /* @__PURE__ */
|
|
1839
|
+
children: [/* @__PURE__ */ B(V, { children: [
|
|
1840
|
+
y && o && !w && /* @__PURE__ */ z(V, {
|
|
1843
1841
|
sx: { my: 1 },
|
|
1844
1842
|
children: t`All filters have been removed, but have not yet been applied.`
|
|
1845
1843
|
}),
|
|
1846
|
-
/* @__PURE__ */
|
|
1844
|
+
/* @__PURE__ */ z(V, { children: Object.entries(C).map(([e, n]) => {
|
|
1847
1845
|
let r = a.find((t) => t.id === e);
|
|
1848
|
-
return r.isInitialFilterValue(C[e]) ? null : /* @__PURE__ */
|
|
1846
|
+
return r.isInitialFilterValue(C[e]) ? null : /* @__PURE__ */ B(V, {
|
|
1849
1847
|
sx: {
|
|
1850
1848
|
alignItems: "center",
|
|
1851
1849
|
display: "grid",
|
|
1852
1850
|
gap: 1,
|
|
1853
1851
|
gridTemplateColumns: "auto max-content"
|
|
1854
1852
|
},
|
|
1855
|
-
children: [/* @__PURE__ */
|
|
1856
|
-
/* @__PURE__ */
|
|
1853
|
+
children: [/* @__PURE__ */ B(V, { children: [
|
|
1854
|
+
/* @__PURE__ */ z(V, {
|
|
1857
1855
|
component: "span",
|
|
1858
1856
|
children: r.label
|
|
1859
1857
|
}),
|
|
1860
|
-
/* @__PURE__ */
|
|
1858
|
+
/* @__PURE__ */ z(V, {
|
|
1861
1859
|
component: "span",
|
|
1862
1860
|
children: ": "
|
|
1863
1861
|
}),
|
|
1864
|
-
/* @__PURE__ */
|
|
1862
|
+
/* @__PURE__ */ z(V, {
|
|
1865
1863
|
component: "strong",
|
|
1866
1864
|
children: r.getPresentationValue(n, t)
|
|
1867
1865
|
})
|
|
1868
|
-
] }), /* @__PURE__ */
|
|
1866
|
+
] }), /* @__PURE__ */ z(U, {
|
|
1869
1867
|
"aria-label": t("Remove filter with label {{filterLabel}} and value {{filterValue}}", {
|
|
1870
1868
|
filterLabel: r.label,
|
|
1871
1869
|
filterValue: r.getPresentationValue(n, t)
|
|
1872
1870
|
}),
|
|
1873
1871
|
onClick: () => D(e),
|
|
1874
1872
|
size: "small",
|
|
1875
|
-
children: /* @__PURE__ */
|
|
1873
|
+
children: /* @__PURE__ */ z(qe, {})
|
|
1876
1874
|
})]
|
|
1877
1875
|
}, e);
|
|
1878
1876
|
}) }),
|
|
1879
|
-
(o || y) && /* @__PURE__ */
|
|
1877
|
+
(o || y) && /* @__PURE__ */ B(V, {
|
|
1880
1878
|
sx: {
|
|
1881
1879
|
display: "flex",
|
|
1882
1880
|
gap: 1,
|
|
@@ -1884,55 +1882,55 @@ var Pt = Ee, Ft = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
1884
1882
|
marginRight: 1,
|
|
1885
1883
|
my: 1
|
|
1886
1884
|
},
|
|
1887
|
-
children: [/* @__PURE__ */
|
|
1888
|
-
...
|
|
1885
|
+
children: [/* @__PURE__ */ z(de, {
|
|
1886
|
+
...G.createAttributes("TableFiltersSidebarItem-reset"),
|
|
1889
1887
|
color: "primary",
|
|
1890
1888
|
onClick: E,
|
|
1891
|
-
startIcon: /* @__PURE__ */
|
|
1889
|
+
startIcon: /* @__PURE__ */ z(Ke, {}),
|
|
1892
1890
|
variant: "outlined",
|
|
1893
1891
|
children: t`Reset`
|
|
1894
|
-
}), /* @__PURE__ */
|
|
1895
|
-
...
|
|
1892
|
+
}), /* @__PURE__ */ z(de, {
|
|
1893
|
+
...G.createAttributes("TableFiltersSidebarItem-apply"),
|
|
1896
1894
|
color: "secondary",
|
|
1897
|
-
startIcon: /* @__PURE__ */
|
|
1895
|
+
startIcon: /* @__PURE__ */ z(Ge, {}),
|
|
1898
1896
|
type: "submit",
|
|
1899
1897
|
children: t`Apply`
|
|
1900
1898
|
})]
|
|
1901
1899
|
})
|
|
1902
|
-
] }), /* @__PURE__ */
|
|
1900
|
+
] }), /* @__PURE__ */ B(V, {
|
|
1903
1901
|
sx: {
|
|
1904
1902
|
overflowY: "auto",
|
|
1905
1903
|
paddingRight: 1
|
|
1906
1904
|
},
|
|
1907
|
-
children: [i.length > 0 && /* @__PURE__ */
|
|
1905
|
+
children: [i.length > 0 && /* @__PURE__ */ z(R, { children: i.filter((e) => e.filterIds.length).map((e) => /* @__PURE__ */ z(It, {
|
|
1908
1906
|
filterDimension: e,
|
|
1909
1907
|
onFilterVisibilityChange: _,
|
|
1910
1908
|
visibleFilterWithinDimension: u[e.id]
|
|
1911
|
-
}, e.id)) }), i.length === 0 && /* @__PURE__ */
|
|
1909
|
+
}, e.id)) }), i.length === 0 && /* @__PURE__ */ z(R, { children: ee.map((e) => /* @__PURE__ */ B(V, {
|
|
1912
1910
|
sx: { my: 2 },
|
|
1913
|
-
children: [/* @__PURE__ */
|
|
1911
|
+
children: [/* @__PURE__ */ z(V, {
|
|
1914
1912
|
sx: { my: 1 },
|
|
1915
|
-
children: /* @__PURE__ */
|
|
1916
|
-
}), /* @__PURE__ */
|
|
1913
|
+
children: /* @__PURE__ */ z(it, { filter: e })
|
|
1914
|
+
}), /* @__PURE__ */ z(pe, {})]
|
|
1917
1915
|
}, e.id)) })]
|
|
1918
1916
|
})]
|
|
1919
1917
|
})
|
|
1920
1918
|
}) });
|
|
1921
|
-
},
|
|
1922
|
-
let { t: n } =
|
|
1923
|
-
return /* @__PURE__ */
|
|
1924
|
-
closeIcon: /* @__PURE__ */
|
|
1919
|
+
}, Rt = ({ onClose: e, open: t }) => {
|
|
1920
|
+
let { t: n } = W();
|
|
1921
|
+
return /* @__PURE__ */ z(O, {
|
|
1922
|
+
closeIcon: /* @__PURE__ */ z(Ft, {}),
|
|
1925
1923
|
closeIconTooltipText: n`Close filters`,
|
|
1926
1924
|
onClose: e,
|
|
1927
1925
|
open: t,
|
|
1928
1926
|
testIdAttributes: { name: "tableFiltersSidebarItem" },
|
|
1929
1927
|
title: n`Filters`,
|
|
1930
1928
|
width: 60,
|
|
1931
|
-
children: t && /* @__PURE__ */
|
|
1929
|
+
children: t && /* @__PURE__ */ z(Lt, { onClose: e })
|
|
1932
1930
|
});
|
|
1933
|
-
},
|
|
1931
|
+
}, zt = ({ ContainerProps: e }) => {
|
|
1934
1932
|
let t = x({});
|
|
1935
|
-
return /* @__PURE__ */
|
|
1933
|
+
return /* @__PURE__ */ z(Je, {
|
|
1936
1934
|
ButtonProps: {
|
|
1937
1935
|
color: "primary",
|
|
1938
1936
|
size: "small",
|
|
@@ -1942,37 +1940,37 @@ var Pt = Ee, Ft = ({ filterDimension: e, onFilterVisibilityChange: t, visibleFil
|
|
|
1942
1940
|
menuItemsData: t,
|
|
1943
1941
|
MenuProps: { elevation: 3 }
|
|
1944
1942
|
});
|
|
1945
|
-
},
|
|
1943
|
+
}, Bt = ({ header: e, headerComponent: t = "h3", headerVariant: n = "h5", showTableMenu: r = !0 }) => /* @__PURE__ */ B(V, {
|
|
1946
1944
|
sx: {
|
|
1947
1945
|
alignItems: "center",
|
|
1948
1946
|
display: "flex",
|
|
1949
1947
|
justifyContent: e ? "space-between" : "flex-end"
|
|
1950
1948
|
},
|
|
1951
|
-
children: [e && /* @__PURE__ */
|
|
1949
|
+
children: [e && /* @__PURE__ */ z(V, { children: /* @__PURE__ */ z(Tt, {
|
|
1952
1950
|
caption: e,
|
|
1953
1951
|
component: t,
|
|
1954
1952
|
variant: n
|
|
1955
|
-
}) }), r && /* @__PURE__ */
|
|
1956
|
-
}),
|
|
1957
|
-
let t =
|
|
1953
|
+
}) }), r && /* @__PURE__ */ z(V, { children: /* @__PURE__ */ z(zt, {}) })]
|
|
1954
|
+
}), Vt = ({ extraSidebarMenuItems: e }) => {
|
|
1955
|
+
let t = g(), n = h(t, (e) => e.filters.filter((e) => !e.isInitialFilterValue()).length), [r, i] = L(!1), a = M(() => {
|
|
1958
1956
|
i(!1);
|
|
1959
|
-
}, []), o =
|
|
1957
|
+
}, []), o = M(() => {
|
|
1960
1958
|
i(!0);
|
|
1961
1959
|
}, []);
|
|
1962
|
-
return /* @__PURE__ */
|
|
1960
|
+
return /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ B(te, { children: [/* @__PURE__ */ z(k, {
|
|
1963
1961
|
badgeColor: "secondary",
|
|
1964
1962
|
badgeContent: n,
|
|
1965
1963
|
first: !0,
|
|
1966
|
-
icon: /* @__PURE__ */
|
|
1964
|
+
icon: /* @__PURE__ */ z(Ft, {}),
|
|
1967
1965
|
onClick: o,
|
|
1968
1966
|
testIdAttributes: { name: "filters" },
|
|
1969
|
-
title:
|
|
1970
|
-
}), e] }), /* @__PURE__ */
|
|
1967
|
+
title: A`Open filters`
|
|
1968
|
+
}), e] }), /* @__PURE__ */ z(Rt, {
|
|
1971
1969
|
onClose: a,
|
|
1972
1970
|
open: r
|
|
1973
1971
|
})] });
|
|
1974
1972
|
};
|
|
1975
1973
|
//#endregion
|
|
1976
|
-
export {
|
|
1974
|
+
export { Lt as a, wt as c, st as d, at as f, $e as h, Rt as i, ft as l, et as m, Bt as n, Ft as o, it as p, zt as r, Tt as s, Vt as t, dt as u };
|
|
1977
1975
|
|
|
1978
1976
|
//# sourceMappingURL=Table.js.map
|