@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/hooks/useCreateMutation/useCreateMutation.ts"],"sourcesContent":["import { useMutation } from '@tanstack/react-query';\nimport type { ReactElement } from 'react';\nimport { useMemo } from 'react';\nimport { StringUtil } from '@gen-epix/ui-core/utils/StringUtil';\nimport { ObjectUtil } from '@gen-epix/ui-core/utils/ObjectUtil';\n\nimport { NotificationService } from '../../classes/services/NotificationService';\nimport type { GenericData } from '../../models/data';\nimport { NotificationUtil } from '../../utils/NotificationUtil';\nimport { QueryClientService } from '../../classes/services/QueryClientService';\n\n\nexport type MutationContextCreate<TData> = { notificationKey?: string; previousData?: TData[]; temporaryId?: string };\n\nexport type UseCreateMutationProps<TData extends GenericData | GenericData[], TVariables = TData> = {\n readonly associationQueryKeys?: string[][];\n readonly getErrorNotificationMessage: (data: TVariables, error: unknown) => ReactElement | string;\n readonly getProgressNotificationMessage: (data: TVariables) => ReactElement | string;\n readonly getSuccessNotificationMessage: (data: TData, context: MutationContextCreate<TData>) => ReactElement | string;\n readonly onError?: (error: unknown, variables: TVariables, context: MutationContextCreate<TData>) => Promise<void> | void;\n readonly onSuccess?: (item: TData, variables: TVariables, context: MutationContextCreate<TData>) => Promise<void> | void;\n readonly queryFn?: (item: TVariables) => Promise<TData>;\n readonly resourceQueryKey?: string[];\n};\n\nexport const useCreateMutation = <TData extends GenericData | GenericData[], TVariables = TData>({\n associationQueryKeys,\n getErrorNotificationMessage,\n getProgressNotificationMessage,\n getSuccessNotificationMessage,\n onError,\n onSuccess,\n queryFn,\n resourceQueryKey,\n}: UseCreateMutationProps<TData, TVariables>) => {\n const queryClient =
|
|
1
|
+
{"version":3,"file":"index.js","names":["rootContainer","QueryClientService","useCreateMutation","queryClient","container","createMutation","useMutation","queryFn","ObjectUtil","item","resourceQueryKey","oldItems","context","associationQueryKeys","onError","error","variables","NotificationService","NotificationUtil","getErrorNotificationMessage","notificationKey","getProgressNotificationMessage","previousData","temporaryId","StringUtil","x","onSuccess","getSuccessNotificationMessage","mutate","useMemo","isMutating"],"sources":["../../../src/hooks/useCreateMutation/useCreateMutation.ts"],"sourcesContent":["import { container as rootContainer } from 'tsyringe';\nimport { useMutation } from '@tanstack/react-query';\nimport type { ReactElement } from 'react';\nimport { useMemo } from 'react';\nimport { StringUtil } from '@gen-epix/ui-core/utils/StringUtil';\nimport { ObjectUtil } from '@gen-epix/ui-core/utils/ObjectUtil';\n\nimport { NotificationService } from '../../classes/services/NotificationService';\nimport type { GenericData } from '../../models/data.models';\nimport { NotificationUtil } from '../../utils/NotificationUtil';\nimport { QueryClientService } from '../../classes/services/QueryClientService';\n\n\nexport type MutationContextCreate<TData> = { notificationKey?: string; previousData?: TData[]; temporaryId?: string };\n\nexport type UseCreateMutationProps<TData extends GenericData | GenericData[], TVariables = TData> = {\n readonly associationQueryKeys?: string[][];\n readonly getErrorNotificationMessage: (data: TVariables, error: unknown) => ReactElement | string;\n readonly getProgressNotificationMessage: (data: TVariables) => ReactElement | string;\n readonly getSuccessNotificationMessage: (data: TData, context: MutationContextCreate<TData>) => ReactElement | string;\n readonly onError?: (error: unknown, variables: TVariables, context: MutationContextCreate<TData>) => Promise<void> | void;\n readonly onSuccess?: (item: TData, variables: TVariables, context: MutationContextCreate<TData>) => Promise<void> | void;\n readonly queryFn?: (item: TVariables) => Promise<TData>;\n readonly resourceQueryKey?: string[];\n};\n\nexport const useCreateMutation = <TData extends GenericData | GenericData[], TVariables = TData>({\n associationQueryKeys,\n getErrorNotificationMessage,\n getProgressNotificationMessage,\n getSuccessNotificationMessage,\n onError,\n onSuccess,\n queryFn,\n resourceQueryKey,\n}: UseCreateMutationProps<TData, TVariables>) => {\n const queryClient = rootContainer.resolve(QueryClientService).queryClient;\n\n const createMutation = useMutation<TData, Error, TVariables, MutationContextCreate<TData>>({\n mutationFn: async (item) => {\n return queryFn(ObjectUtil.deepNullifyEmptyStrings(item));\n },\n onError: async (error, variables, context) => {\n if (resourceQueryKey) {\n queryClient.setQueryData<TData[]>(resourceQueryKey, (oldItems: TData[]) => {\n if (!Array.isArray(oldItems)) {\n return oldItems;\n }\n return [...oldItems.filter(item => (item as GenericData)?.id !== context.temporaryId)];\n });\n }\n await rootContainer.resolve(QueryClientService).invalidateQueryKeys(associationQueryKeys);\n if (onError) {\n await onError(error, variables, context);\n }\n rootContainer.resolve(NotificationService).fulfillNotification(context.notificationKey, NotificationUtil.wrapErrorNotificationMessage(getErrorNotificationMessage(variables, error), error), 'error');\n },\n onMutate: async (variables) => {\n const notificationKey = rootContainer.resolve(NotificationService).showNotification({\n isLoading: true,\n message: getProgressNotificationMessage(variables),\n severity: 'info',\n });\n if (resourceQueryKey) {\n await queryClient.cancelQueries({ queryKey: resourceQueryKey });\n const previousData = queryClient.getQueryData<TData[]>(resourceQueryKey);\n if (Array.isArray(previousData)) {\n const temporaryId = StringUtil.createUuid();\n queryClient.setQueryData<TData[]>(resourceQueryKey, (oldItems: TData[]) => {\n return [\n {\n ...variables,\n id: temporaryId,\n },\n ...oldItems,\n ] as TData[];\n });\n return { notificationKey, previousData, temporaryId };\n }\n }\n return { notificationKey };\n },\n onSuccess: async (item, variables, context) => {\n if (resourceQueryKey && Array.isArray(context?.previousData) && !Array.isArray(item)) {\n queryClient.setQueryData<GenericData[]>(resourceQueryKey, (oldItems) => {\n return [\n item,\n ...oldItems.filter(x => x.id !== context.temporaryId),\n ];\n });\n }\n await rootContainer.resolve(QueryClientService).invalidateQueryKeys(associationQueryKeys);\n if (onSuccess) {\n await onSuccess(item, variables, context);\n }\n rootContainer.resolve(NotificationService).fulfillNotification(context.notificationKey, getSuccessNotificationMessage(item, context), 'success');\n },\n });\n\n // Note: must be done in useMemo to avoid render loops (useMutation returns a new object every time)\n const mutate = useMemo(() => createMutation.mutate, [createMutation.mutate]);\n const isMutating = useMemo(() => createMutation.isPending, [createMutation.isPending]);\n return useMemo(() => ({ isMutating, mutate }), [isMutating, mutate]);\n};\n"],"mappings":";;;;;;;;;AA0BA,IAAaE,KAAoF,EAC/F,yBACA,gCACA,mCACA,kCACA,YACA,cACA,YACA,0BAC+C;CAC/C,IAAMC,IAAcH,EAAc,QAAQC,CAAkB,CAAC,CAAC,aAExDI,IAAiBC,EAAoE;EACzF,YAAY,OAAO,MACVC,EAAQC,EAAW,wBAAwBC,CAAI,CAAC;EAEzD,SAAS,OAAO,GAAO,GAAW,MAAY;GAa5C,AAZIC,KACFP,EAAY,aAAsBO,IAAmB,MAC9C,MAAM,QAAQC,CAAQ,IAGpB,CAAC,GAAGA,EAAS,QAAO,MAASF,GAAsB,OAAOG,EAAQ,WAAW,CAAC,IAF5ED,CAGV,GAEH,MAAMX,EAAc,QAAQC,CAAkB,CAAC,CAAC,oBAAoBY,CAAoB,GACpFC,KACF,MAAMA,EAAQC,GAAOC,GAAWJ,CAAO,GAEzCR,EAAc,QAAQa,CAAmB,CAAC,CAAC,oBAAoBL,EAAQ,iBAAiBM,EAAiB,6BAA6BC,EAA4BH,GAAWD,CAAK,GAAGA,CAAK,GAAG,OAAO;EACtM;EACA,UAAU,OAAO,MAAc;GAC7B,IAAMK,IAAkBpB,EAAc,QAAQiB,CAAmB,CAAC,CAAC,iBAAiB;IAClF,WAAW;IACX,SAASI,EAA+BL,CAAS;IACjD,UAAU;GACZ,CAAC;GACD,IAAIN,GAAkB;IACpB,MAAMP,EAAY,cAAc,EAAE,UAAUO,EAAiB,CAAC;IAC9D,IAAMY,IAAenB,EAAY,aAAsBO,CAAgB;IACvE,IAAI,MAAM,QAAQY,CAAY,GAAG;KAC/B,IAAMC,IAAcC,EAAW,WAAW;KAU1C,OATArB,EAAY,aAAsBO,IAAmB,MAC5C,CACL;MACE,GAAGM;MACH,IAAIO;KACN,GACA,GAAGZ,CACL,CACD,GACM;MAAE;MAAiB;MAAc;KAAY;IACtD;GACF;GACA,OAAO,EAAE,mBAAgB;EAC3B;EACA,WAAW,OAAO,GAAM,GAAW,MAAY;GAa7C,AAZID,KAAoB,MAAM,QAAQE,GAAS,YAAY,KAAK,CAAC,MAAM,QAAQH,CAAI,KACjFN,EAAY,aAA4BO,IAAmB,MAClD,CACLD,GACA,GAAGE,EAAS,QAAO,MAAKc,EAAE,OAAOb,EAAQ,WAAW,CACtD,CACD,GAEH,MAAMZ,EAAc,QAAQC,CAAkB,CAAC,CAAC,oBAAoBY,CAAoB,GACpFa,KACF,MAAMA,EAAUjB,GAAMO,GAAWJ,CAAO,GAE1CR,EAAc,QAAQa,CAAmB,CAAC,CAAC,oBAAoBL,EAAQ,iBAAiBe,EAA8BlB,GAAMG,CAAO,GAAG,SAAS;EACjJ;CACF,CAAC,GAGKgB,IAASC,QAAcxB,EAAe,QAAQ,CAACA,EAAe,MAAM,CAAC,GACrEyB,IAAaD,QAAcxB,EAAe,WAAW,CAACA,EAAe,SAAS,CAAC;CACrF,OAAOwB,SAAe;EAAE;EAAY;CAAO,IAAI,CAACC,GAAYF,CAAM,CAAC;AACrE"}
|
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "../../_chunks/
|
|
3
|
-
import {
|
|
1
|
+
import { t as e } from "../../_chunks/QueryClientService.js";
|
|
2
|
+
import { t } from "../../_chunks/useMutation.js";
|
|
3
|
+
import { NotificationUtil as n } from "../../utils/NotificationUtil/index.js";
|
|
4
4
|
import { NotificationService as r } from "../../classes/services/NotificationService/index.js";
|
|
5
|
-
import {
|
|
5
|
+
import { container as i } from "tsyringe";
|
|
6
|
+
import { useMemo as a } from "react";
|
|
6
7
|
//#region src/hooks/useDeleteMutation/useDeleteMutation.ts
|
|
7
|
-
var
|
|
8
|
-
let
|
|
9
|
-
mutationFn: async (e) =>
|
|
10
|
-
onError: async (
|
|
11
|
-
|
|
8
|
+
var o = ({ associationQueryKeys: o, getErrorNotificationMessage: s, getProgressNotificationMessage: c, getSuccessNotificationMessage: l, onError: u, onSuccess: d, queryFn: f, resourceQueryKey: p }) => {
|
|
9
|
+
let m = i.resolve(e).queryClient, h = t({
|
|
10
|
+
mutationFn: async (e) => f(e),
|
|
11
|
+
onError: async (t, a, c) => {
|
|
12
|
+
p && m.setQueryData(p, (e) => Array.isArray(e) ? [...e, a] : e), o && await i.resolve(e).invalidateQueryKeys(o), u && await u(t, a, c), i.resolve(r).fulfillNotification(c.notificationKey, n.wrapErrorNotificationMessage(s(a, t), t), "error");
|
|
12
13
|
},
|
|
13
14
|
onMutate: async (e) => {
|
|
14
|
-
let t =
|
|
15
|
+
let t = i.resolve(r).showNotification({
|
|
15
16
|
isLoading: !0,
|
|
16
|
-
message:
|
|
17
|
+
message: c(e),
|
|
17
18
|
severity: "info"
|
|
18
19
|
});
|
|
19
|
-
if (
|
|
20
|
-
await
|
|
21
|
-
let n =
|
|
22
|
-
if (Array.isArray(n) && !Array.isArray(e)) return
|
|
20
|
+
if (p) {
|
|
21
|
+
await m.cancelQueries({ queryKey: p });
|
|
22
|
+
let n = m.getQueryData(p);
|
|
23
|
+
if (Array.isArray(n) && !Array.isArray(e)) return m.setQueryData(p, (t) => t.filter((t) => t.id !== e.id)), {
|
|
23
24
|
notificationKey: t,
|
|
24
25
|
previousData: n
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
28
|
return { notificationKey: t };
|
|
28
29
|
},
|
|
29
|
-
onSuccess: async (
|
|
30
|
-
|
|
30
|
+
onSuccess: async (t, n, a) => {
|
|
31
|
+
o && await i.resolve(e).invalidateQueryKeys(o), d && await d(n, a), i.resolve(r).fulfillNotification(a.notificationKey, l(n, a), "success");
|
|
31
32
|
}
|
|
32
|
-
}),
|
|
33
|
-
return
|
|
34
|
-
isMutating:
|
|
35
|
-
mutate:
|
|
36
|
-
}), [
|
|
33
|
+
}), g = a(() => h.mutate, [h.mutate]), _ = a(() => h.isPending, [h.isPending]);
|
|
34
|
+
return a(() => ({
|
|
35
|
+
isMutating: _,
|
|
36
|
+
mutate: g
|
|
37
|
+
}), [_, g]);
|
|
37
38
|
};
|
|
38
39
|
//#endregion
|
|
39
|
-
export {
|
|
40
|
+
export { o as useDeleteMutation };
|
|
40
41
|
|
|
41
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/hooks/useDeleteMutation/useDeleteMutation.ts"],"sourcesContent":["import { useMutation } from '@tanstack/react-query';\nimport type { ReactElement } from 'react';\nimport { useMemo } from 'react';\n\nimport { NotificationService } from '../../classes/services/NotificationService';\nimport type { GenericData } from '../../models/data';\nimport { NotificationUtil } from '../../utils/NotificationUtil';\nimport { QueryClientService } from '../../classes/services/QueryClientService';\n\n\nexport type MutationContextDelete<TData> = { notificationKey?: string; previousData?: TData[] };\n\nexport type UseDeleteMutationProps<TData> = {\n readonly associationQueryKeys?: string[][];\n readonly getErrorNotificationMessage?: (data: TData, error: unknown) => ReactElement | string;\n readonly getProgressNotificationMessage: (data: TData) => ReactElement | string;\n readonly getSuccessNotificationMessage?: (data: TData, context: MutationContextDelete<TData>) => ReactElement | string;\n readonly onError?: (error: unknown, item: TData, context: MutationContextDelete<TData>) => Promise<void> | void;\n readonly onSuccess?: (item: TData, context: MutationContextDelete<TData>) => Promise<void> | void;\n readonly queryFn?: (data: TData) => Promise<unknown>;\n readonly resourceQueryKey?: string[];\n};\n\nexport const useDeleteMutation = <TData extends GenericData | GenericData[]>({\n associationQueryKeys,\n getErrorNotificationMessage,\n getProgressNotificationMessage,\n getSuccessNotificationMessage,\n onError,\n onSuccess,\n queryFn,\n resourceQueryKey,\n}: UseDeleteMutationProps<TData>) => {\n const queryClient =
|
|
1
|
+
{"version":3,"file":"index.js","names":["rootContainer","QueryClientService","useDeleteMutation","queryClient","container","deleteMutation","useMutation","queryFn","item","resourceQueryKey","oldItems","associationQueryKeys","onError","error","context","NotificationService","NotificationUtil","getErrorNotificationMessage","notificationKey","getProgressNotificationMessage","previousData","i","onSuccess","getSuccessNotificationMessage","mutate","useMemo","isMutating"],"sources":["../../../src/hooks/useDeleteMutation/useDeleteMutation.ts"],"sourcesContent":["import { container as rootContainer } from 'tsyringe';\nimport { useMutation } from '@tanstack/react-query';\nimport type { ReactElement } from 'react';\nimport { useMemo } from 'react';\n\nimport { NotificationService } from '../../classes/services/NotificationService';\nimport type { GenericData } from '../../models/data.models';\nimport { NotificationUtil } from '../../utils/NotificationUtil';\nimport { QueryClientService } from '../../classes/services/QueryClientService';\n\n\nexport type MutationContextDelete<TData> = { notificationKey?: string; previousData?: TData[] };\n\nexport type UseDeleteMutationProps<TData> = {\n readonly associationQueryKeys?: string[][];\n readonly getErrorNotificationMessage?: (data: TData, error: unknown) => ReactElement | string;\n readonly getProgressNotificationMessage: (data: TData) => ReactElement | string;\n readonly getSuccessNotificationMessage?: (data: TData, context: MutationContextDelete<TData>) => ReactElement | string;\n readonly onError?: (error: unknown, item: TData, context: MutationContextDelete<TData>) => Promise<void> | void;\n readonly onSuccess?: (item: TData, context: MutationContextDelete<TData>) => Promise<void> | void;\n readonly queryFn?: (data: TData) => Promise<unknown>;\n readonly resourceQueryKey?: string[];\n};\n\nexport const useDeleteMutation = <TData extends GenericData | GenericData[]>({\n associationQueryKeys,\n getErrorNotificationMessage,\n getProgressNotificationMessage,\n getSuccessNotificationMessage,\n onError,\n onSuccess,\n queryFn,\n resourceQueryKey,\n}: UseDeleteMutationProps<TData>) => {\n const queryClient = rootContainer.resolve(QueryClientService).queryClient;\n\n const deleteMutation = useMutation<unknown, Error, TData, MutationContextDelete<TData>>({\n mutationFn: async (item) => {\n return queryFn(item);\n },\n onError: async (error, item, context) => {\n if (resourceQueryKey) {\n queryClient.setQueryData(resourceQueryKey, (oldItems: TData[]) => {\n if (!Array.isArray(oldItems)) {\n return oldItems;\n }\n return [...oldItems, item];\n });\n }\n if (associationQueryKeys) {\n await rootContainer.resolve(QueryClientService).invalidateQueryKeys(associationQueryKeys);\n }\n if (onError) {\n await onError(error, item, context);\n }\n rootContainer.resolve(NotificationService).fulfillNotification(context.notificationKey, NotificationUtil.wrapErrorNotificationMessage(getErrorNotificationMessage(item, error), error), 'error');\n },\n onMutate: async (item) => {\n const notificationKey = rootContainer.resolve(NotificationService).showNotification({\n isLoading: true,\n message: getProgressNotificationMessage(item),\n severity: 'info',\n });\n if (resourceQueryKey) {\n await queryClient.cancelQueries({ queryKey: resourceQueryKey });\n const previousData = queryClient.getQueryData<TData[]>(resourceQueryKey);\n\n if (Array.isArray(previousData) && !Array.isArray(item)) {\n queryClient.setQueryData<GenericData[]>(resourceQueryKey, (oldItems) => {\n return oldItems.filter(i => i.id !== item.id);\n });\n return { notificationKey, previousData };\n }\n }\n return { notificationKey };\n },\n onSuccess: async (_data, item, context) => {\n if (associationQueryKeys) {\n await rootContainer.resolve(QueryClientService).invalidateQueryKeys(associationQueryKeys);\n }\n if (onSuccess) {\n await onSuccess(item, context);\n }\n rootContainer.resolve(NotificationService).fulfillNotification(context.notificationKey, getSuccessNotificationMessage(item, context), 'success');\n },\n });\n\n // Note: must be done in useMemo to avoid render loops (useMutation returns a new object every time)\n const mutate = useMemo(() => deleteMutation.mutate, [deleteMutation.mutate]);\n const isMutating = useMemo(() => deleteMutation.isPending, [deleteMutation.isPending]);\n return useMemo(() => ({ isMutating, mutate }), [isMutating, mutate]);\n};\n"],"mappings":";;;;;;;AAwBA,IAAaE,KAAgE,EAC3E,yBACA,gCACA,mCACA,kCACA,YACA,cACA,YACA,0BACmC;CACnC,IAAMC,IAAcH,EAAc,QAAQC,CAAkB,CAAC,CAAC,aAExDI,IAAiBC,EAAiE;EACtF,YAAY,OAAO,MACVC,EAAQC,CAAI;EAErB,SAAS,OAAO,GAAO,GAAM,MAAY;GAevC,AAdIC,KACFN,EAAY,aAAaM,IAAmB,MACrC,MAAM,QAAQC,CAAQ,IAGpB,CAAC,GAAGA,GAAUF,CAAI,IAFhBE,CAGV,GAECC,KACF,MAAMX,EAAc,QAAQC,CAAkB,CAAC,CAAC,oBAAoBU,CAAoB,GAEtFC,KACF,MAAMA,EAAQC,GAAOL,GAAMM,CAAO,GAEpCV,EAAc,QAAQW,CAAmB,CAAC,CAAC,oBAAoBD,EAAQ,iBAAiBE,EAAiB,6BAA6BC,EAA4BT,GAAMK,CAAK,GAAGA,CAAK,GAAG,OAAO;EACjM;EACA,UAAU,OAAO,MAAS;GACxB,IAAMK,IAAkBlB,EAAc,QAAQe,CAAmB,CAAC,CAAC,iBAAiB;IAClF,WAAW;IACX,SAASI,EAA+BX,CAAI;IAC5C,UAAU;GACZ,CAAC;GACD,IAAIC,GAAkB;IACpB,MAAMN,EAAY,cAAc,EAAE,UAAUM,EAAiB,CAAC;IAC9D,IAAMW,IAAejB,EAAY,aAAsBM,CAAgB;IAEvE,IAAI,MAAM,QAAQW,CAAY,KAAK,CAAC,MAAM,QAAQZ,CAAI,GAIpD,OAHAL,EAAY,aAA4BM,IAAmB,MAClDC,EAAS,QAAO,MAAKW,EAAE,OAAOb,EAAK,EAAE,CAC7C,GACM;KAAE;KAAiB;IAAa;GAE3C;GACA,OAAO,EAAE,mBAAgB;EAC3B;EACA,WAAW,OAAO,GAAO,GAAM,MAAY;GAOzC,AANIG,KACF,MAAMX,EAAc,QAAQC,CAAkB,CAAC,CAAC,oBAAoBU,CAAoB,GAEtFW,KACF,MAAMA,EAAUd,GAAMM,CAAO,GAE/BV,EAAc,QAAQW,CAAmB,CAAC,CAAC,oBAAoBD,EAAQ,iBAAiBS,EAA8Bf,GAAMM,CAAO,GAAG,SAAS;EACjJ;CACF,CAAC,GAGKU,IAASC,QAAcpB,EAAe,QAAQ,CAACA,EAAe,MAAM,CAAC,GACrEqB,IAAaD,QAAcpB,EAAe,WAAW,CAACA,EAAe,SAAS,CAAC;CACrF,OAAOoB,SAAe;EAAE;EAAY;CAAO,IAAI,CAACC,GAAYF,CAAM,CAAC;AACrE"}
|
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "../../_chunks/
|
|
3
|
-
import {
|
|
1
|
+
import { t as e } from "../../_chunks/QueryClientService.js";
|
|
2
|
+
import { t } from "../../_chunks/useMutation.js";
|
|
3
|
+
import { NotificationUtil as n } from "../../utils/NotificationUtil/index.js";
|
|
4
4
|
import { NotificationService as r } from "../../classes/services/NotificationService/index.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { container as i } from "tsyringe";
|
|
6
|
+
import { useCallback as a, useMemo as o, useRef as s } from "react";
|
|
7
|
+
import { ObjectUtil as c } from "@gen-epix/ui-core/utils/ObjectUtil";
|
|
7
8
|
//#region src/hooks/useEditMutation/useEditMutation.ts
|
|
8
|
-
var
|
|
9
|
-
let
|
|
10
|
-
|
|
11
|
-
}, []),
|
|
12
|
-
mutationFn:
|
|
13
|
-
onError: async (
|
|
14
|
-
|
|
9
|
+
var l = ({ associationQueryKeys: l, getErrorNotificationMessage: u, getIntermediateItem: d, getProgressNotificationMessage: f, getSuccessNotificationMessage: p, onError: m, onSuccess: h, queryFn: g, resourceQueryKey: _ }) => {
|
|
10
|
+
let v = i.resolve(e).queryClient, y = s(void 0), b = a((e) => {
|
|
11
|
+
y.current = e;
|
|
12
|
+
}, []), x = a(async (e) => g(c.deepNullifyEmptyStrings(e), y.current), [y, g]), S = t({
|
|
13
|
+
mutationFn: x,
|
|
14
|
+
onError: async (t, a, o) => {
|
|
15
|
+
y.current = void 0, _ && Array.isArray(o.previousData) && v.setQueryData(_, (e) => Array.isArray(e) ? [...e.filter((e) => e.id !== o.item.id), o.item] : e), await i.resolve(e).invalidateQueryKeys(l), m && await m(t, a, o), i.resolve(r).fulfillNotification(o.notificationKey, n.wrapErrorNotificationMessage(u(o.item, a, t), t), "error");
|
|
15
16
|
},
|
|
16
17
|
onMutate: async (e) => {
|
|
17
|
-
let t =
|
|
18
|
+
let t = i.resolve(r).showNotification({
|
|
18
19
|
isLoading: !0,
|
|
19
|
-
message:
|
|
20
|
+
message: f(y.current, e),
|
|
20
21
|
severity: "info"
|
|
21
22
|
});
|
|
22
|
-
if (
|
|
23
|
-
if (!
|
|
24
|
-
await
|
|
25
|
-
let n =
|
|
23
|
+
if (_) {
|
|
24
|
+
if (!y.current) throw Error("previousItem is not set");
|
|
25
|
+
await v.cancelQueries({ queryKey: _ });
|
|
26
|
+
let n = v.getQueryData(_);
|
|
26
27
|
if (Array.isArray(n) && !Array.isArray(e)) {
|
|
27
|
-
let r =
|
|
28
|
+
let r = d ? d(e, y.current) : {
|
|
28
29
|
...e,
|
|
29
|
-
id:
|
|
30
|
+
id: y.current.id
|
|
30
31
|
};
|
|
31
|
-
return
|
|
32
|
-
item:
|
|
32
|
+
return v.setQueryData(_, (e) => [...e.filter((e) => e.id !== y.current.id), r]), {
|
|
33
|
+
item: y.current,
|
|
33
34
|
notificationKey: t,
|
|
34
35
|
previousData: n
|
|
35
36
|
};
|
|
@@ -37,21 +38,21 @@ var c = ({ associationQueryKeys: c, getErrorNotificationMessage: l, getIntermedi
|
|
|
37
38
|
}
|
|
38
39
|
return { notificationKey: t };
|
|
39
40
|
},
|
|
40
|
-
onSuccess: async (
|
|
41
|
-
|
|
41
|
+
onSuccess: async (t, n, a) => {
|
|
42
|
+
y.current = void 0, await i.resolve(e).invalidateQueryKeys(l), h && await h(t, n, a), i.resolve(r).fulfillNotification(a.notificationKey, p(t, a), "success");
|
|
42
43
|
}
|
|
43
|
-
}),
|
|
44
|
-
return
|
|
45
|
-
isMutating:
|
|
46
|
-
mutate:
|
|
47
|
-
setPreviousItem:
|
|
44
|
+
}), C = o(() => S.mutate, [S.mutate]), w = o(() => S.isPending, [S.isPending]);
|
|
45
|
+
return o(() => ({
|
|
46
|
+
isMutating: w,
|
|
47
|
+
mutate: C,
|
|
48
|
+
setPreviousItem: b
|
|
48
49
|
}), [
|
|
50
|
+
w,
|
|
49
51
|
C,
|
|
50
|
-
|
|
51
|
-
y
|
|
52
|
+
b
|
|
52
53
|
]);
|
|
53
54
|
};
|
|
54
55
|
//#endregion
|
|
55
|
-
export {
|
|
56
|
+
export { l as useEditMutation };
|
|
56
57
|
|
|
57
58
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/hooks/useEditMutation/useEditMutation.ts"],"sourcesContent":["import { useMutation } from '@tanstack/react-query';\nimport type { ReactElement } from 'react';\nimport {\n useCallback,\n useMemo,\n useRef,\n} from 'react';\nimport { ObjectUtil } from '@gen-epix/ui-core/utils/ObjectUtil';\n\nimport { NotificationService } from '../../classes/services/NotificationService';\nimport { QueryClientService } from '../../classes/services/QueryClientService';\nimport type { GenericData } from '../../models/data';\nimport { NotificationUtil } from '../../utils/NotificationUtil';\n\nexport type MutationContextEdit<TData> = { item?: TData; notificationKey?: string; previousData?: TData[] };\n\nexport type UseEditMutationProps<TData, TVariables = TData> = {\n readonly associationQueryKeys?: string[][];\n readonly getErrorNotificationMessage: (data: TData, variables: TVariables, error: unknown) => ReactElement | string;\n // Optional function to get an intermediate item to be set in the query cache before the mutation is completed.\n // This is useful for optimistic updates where you want to show a temporary state before the mutation is confirmed.\n // The function receives the variables and the previous item, and should return the intermediate item.\n // Only needed if the variables are different from the previous item.\n readonly getIntermediateItem?: (variables: TVariables, previousItem: TData) => TData;\n readonly getProgressNotificationMessage: (data: TData, variables: TVariables) => ReactElement | string;\n readonly getSuccessNotificationMessage: (data: TData, context: MutationContextEdit<TData>) => ReactElement | string;\n readonly onError?: (error: unknown, variables: TVariables, context: MutationContextEdit<TData>) => Promise<void> | void;\n readonly onSuccess?: (item: TData, variables: TVariables, context: MutationContextEdit<TData>) => Promise<void> | void;\n readonly queryFn?: (variables: TVariables, previousData: TData) => Promise<TData>;\n readonly resourceQueryKey?: string[];\n};\n\nexport const useEditMutation = <TData extends GenericData | GenericData[], TVariables = TData>({\n associationQueryKeys,\n getErrorNotificationMessage,\n getIntermediateItem,\n getProgressNotificationMessage,\n getSuccessNotificationMessage,\n onError,\n onSuccess,\n queryFn,\n resourceQueryKey,\n}: UseEditMutationProps<TData, TVariables>) => {\n const queryClient =
|
|
1
|
+
{"version":3,"file":"index.js","names":["rootContainer","QueryClientService","useEditMutation","queryClient","container","previousItemRef","useRef","setPreviousItem","useCallback","item","mutationFn","queryFn","ObjectUtil","variables","editMutation","useMutation","resourceQueryKey","context","oldItems","x","associationQueryKeys","onError","error","NotificationService","NotificationUtil","getErrorNotificationMessage","notificationKey","getProgressNotificationMessage","previousData","intermediateItem","getIntermediateItem","onSuccess","getSuccessNotificationMessage","mutate","useMemo","isMutating"],"sources":["../../../src/hooks/useEditMutation/useEditMutation.ts"],"sourcesContent":["import { container as rootContainer } from 'tsyringe';\nimport { useMutation } from '@tanstack/react-query';\nimport type { ReactElement } from 'react';\nimport {\n useCallback,\n useMemo,\n useRef,\n} from 'react';\nimport { ObjectUtil } from '@gen-epix/ui-core/utils/ObjectUtil';\n\nimport { NotificationService } from '../../classes/services/NotificationService';\nimport { QueryClientService } from '../../classes/services/QueryClientService';\nimport type { GenericData } from '../../models/data.models';\nimport { NotificationUtil } from '../../utils/NotificationUtil';\n\nexport type MutationContextEdit<TData> = { item?: TData; notificationKey?: string; previousData?: TData[] };\n\nexport type UseEditMutationProps<TData, TVariables = TData> = {\n readonly associationQueryKeys?: string[][];\n readonly getErrorNotificationMessage: (data: TData, variables: TVariables, error: unknown) => ReactElement | string;\n // Optional function to get an intermediate item to be set in the query cache before the mutation is completed.\n // This is useful for optimistic updates where you want to show a temporary state before the mutation is confirmed.\n // The function receives the variables and the previous item, and should return the intermediate item.\n // Only needed if the variables are different from the previous item.\n readonly getIntermediateItem?: (variables: TVariables, previousItem: TData) => TData;\n readonly getProgressNotificationMessage: (data: TData, variables: TVariables) => ReactElement | string;\n readonly getSuccessNotificationMessage: (data: TData, context: MutationContextEdit<TData>) => ReactElement | string;\n readonly onError?: (error: unknown, variables: TVariables, context: MutationContextEdit<TData>) => Promise<void> | void;\n readonly onSuccess?: (item: TData, variables: TVariables, context: MutationContextEdit<TData>) => Promise<void> | void;\n readonly queryFn?: (variables: TVariables, previousData: TData) => Promise<TData>;\n readonly resourceQueryKey?: string[];\n};\n\nexport const useEditMutation = <TData extends GenericData | GenericData[], TVariables = TData>({\n associationQueryKeys,\n getErrorNotificationMessage,\n getIntermediateItem,\n getProgressNotificationMessage,\n getSuccessNotificationMessage,\n onError,\n onSuccess,\n queryFn,\n resourceQueryKey,\n}: UseEditMutationProps<TData, TVariables>) => {\n const queryClient = rootContainer.resolve(QueryClientService).queryClient;\n const previousItemRef = useRef<TData>(undefined);\n\n const setPreviousItem = useCallback((item: TData) => {\n previousItemRef.current = item;\n }, []);\n\n const mutationFn = useCallback(async (variables: TVariables) => {\n return queryFn(ObjectUtil.deepNullifyEmptyStrings(variables), previousItemRef.current);\n }, [previousItemRef, queryFn]);\n\n const editMutation = useMutation<TData, Error, TVariables, MutationContextEdit<TData>>({\n mutationFn,\n onError: async (error, variables, context) => {\n previousItemRef.current = undefined;\n if (resourceQueryKey && Array.isArray(context.previousData)) {\n queryClient.setQueryData(resourceQueryKey, (oldItems: TData[]) => {\n if (!Array.isArray(oldItems)) {\n return oldItems;\n }\n return [...oldItems.filter(x => (x as GenericData).id !== (context.item as GenericData).id), context.item];\n });\n }\n await rootContainer.resolve(QueryClientService).invalidateQueryKeys(associationQueryKeys);\n if (onError) {\n await onError(error, variables, context);\n }\n rootContainer.resolve(NotificationService).fulfillNotification(context.notificationKey, NotificationUtil.wrapErrorNotificationMessage(getErrorNotificationMessage(context.item, variables, error), error), 'error');\n },\n onMutate: async (variables) => {\n const notificationKey = rootContainer.resolve(NotificationService).showNotification({\n isLoading: true,\n message: getProgressNotificationMessage(previousItemRef.current, variables),\n severity: 'info',\n });\n if (resourceQueryKey) {\n if (!previousItemRef.current) {\n throw new Error('previousItem is not set');\n }\n await queryClient.cancelQueries({ queryKey: resourceQueryKey });\n const previousData = queryClient.getQueryData<TData[]>(resourceQueryKey);\n if (Array.isArray(previousData) && !Array.isArray(variables)) {\n const intermediateItem = getIntermediateItem ? getIntermediateItem(variables, previousItemRef.current) : {\n ...variables,\n id: (previousItemRef.current as GenericData).id,\n } as GenericData;\n queryClient.setQueryData<GenericData[]>(resourceQueryKey, (oldItems) => {\n return [...oldItems.filter(x => x.id !== (previousItemRef.current as GenericData).id), intermediateItem] as GenericData[];\n });\n return { item: previousItemRef.current, notificationKey, previousData };\n }\n }\n return { notificationKey };\n },\n onSuccess: async (item, variables, context) => {\n previousItemRef.current = undefined;\n await rootContainer.resolve(QueryClientService).invalidateQueryKeys(associationQueryKeys);\n if (onSuccess) {\n await onSuccess(item, variables, context);\n }\n rootContainer.resolve(NotificationService).fulfillNotification(context.notificationKey, getSuccessNotificationMessage(item, context), 'success');\n },\n });\n\n // Note: must be done in useMemo to avoid render loops (useMutation returns a new object every time)\n const mutate = useMemo(() => editMutation.mutate, [editMutation.mutate]);\n const isMutating = useMemo(() => editMutation.isPending, [editMutation.isPending]);\n return useMemo(() => ({ isMutating, mutate, setPreviousItem }), [isMutating, mutate, setPreviousItem]);\n};\n"],"mappings":";;;;;;;;AAiCA,IAAaE,KAAkF,EAC7F,yBACA,gCACA,wBACA,mCACA,kCACA,YACA,cACA,YACA,0BAC6C;CAC7C,IAAMC,IAAcH,EAAc,QAAQC,CAAkB,CAAC,CAAC,aACxDI,IAAkBC,EAAc,KAAA,CAAS,GAEzCC,IAAkBC,GAAa,MAAgB;EACnD,EAAgB,UAAUC;CAC5B,GAAG,CAAC,CAAC,GAECC,IAAaF,EAAY,OAAO,MAC7BG,EAAQC,EAAW,wBAAwBC,CAAS,GAAGR,EAAgB,OAAO,GACpF,CAACA,GAAiBM,CAAO,CAAC,GAEvBG,IAAeC,EAAkE;EACrF;EACA,SAAS,OAAO,GAAO,GAAW,MAAY;GAc5C,AAbA,EAAgB,UAAU,KAAA,GACtBC,KAAoB,MAAM,QAAQC,EAAQ,YAAY,KACxDd,EAAY,aAAaa,IAAmB,MACrC,MAAM,QAAQE,CAAQ,IAGpB,CAAC,GAAGA,EAAS,QAAO,MAAMC,EAAkB,OAAQF,EAAQ,KAAqB,EAAE,GAAGA,EAAQ,IAAI,IAFhGC,CAGV,GAEH,MAAMlB,EAAc,QAAQC,CAAkB,CAAC,CAAC,oBAAoBmB,CAAoB,GACpFC,KACF,MAAMA,EAAQC,GAAOT,GAAWI,CAAO,GAEzCb,EAAc,QAAQmB,CAAmB,CAAC,CAAC,oBAAoBN,EAAQ,iBAAiBO,EAAiB,6BAA6BC,EAA4BR,EAAQ,MAAMJ,GAAWS,CAAK,GAAGA,CAAK,GAAG,OAAO;EACpN;EACA,UAAU,OAAO,MAAc;GAC7B,IAAMI,IAAkB1B,EAAc,QAAQuB,CAAmB,CAAC,CAAC,iBAAiB;IAClF,WAAW;IACX,SAASI,EAA+BtB,EAAgB,SAASQ,CAAS;IAC1E,UAAU;GACZ,CAAC;GACD,IAAIG,GAAkB;IACpB,IAAI,CAACX,EAAgB,SACnB,MAAU,MAAM,yBAAyB;IAE3C,MAAMF,EAAY,cAAc,EAAE,UAAUa,EAAiB,CAAC;IAC9D,IAAMY,IAAezB,EAAY,aAAsBa,CAAgB;IACvE,IAAI,MAAM,QAAQY,CAAY,KAAK,CAAC,MAAM,QAAQf,CAAS,GAAG;KAC5D,IAAMgB,IAAmBC,IAAsBA,EAAoBjB,GAAWR,EAAgB,OAAO,IAAI;MACvG,GAAGQ;MACH,IAAKR,EAAgB,QAAwB;KAC/C;KAIA,OAHAF,EAAY,aAA4Ba,IAAmB,MAClD,CAAC,GAAGE,EAAS,QAAO,MAAKC,EAAE,OAAQd,EAAgB,QAAwB,EAAE,GAAGwB,CAAgB,CACxG,GACM;MAAE,MAAMxB,EAAgB;MAAS;MAAiB;KAAa;IACxE;GACF;GACA,OAAO,EAAE,mBAAgB;EAC3B;EACA,WAAW,OAAO,GAAM,GAAW,MAAY;GAM7C,AALA,EAAgB,UAAU,KAAA,GAC1B,MAAML,EAAc,QAAQC,CAAkB,CAAC,CAAC,oBAAoBmB,CAAoB,GACpFW,KACF,MAAMA,EAAUtB,GAAMI,GAAWI,CAAO,GAE1Cb,EAAc,QAAQmB,CAAmB,CAAC,CAAC,oBAAoBN,EAAQ,iBAAiBe,EAA8BvB,GAAMQ,CAAO,GAAG,SAAS;EACjJ;CACF,CAAC,GAGKgB,IAASC,QAAcpB,EAAa,QAAQ,CAACA,EAAa,MAAM,CAAC,GACjEqB,IAAaD,QAAcpB,EAAa,WAAW,CAACA,EAAa,SAAS,CAAC;CACjF,OAAOoB,SAAe;EAAE;EAAY;EAAQ;CAAgB,IAAI;EAACC;EAAYF;EAAQ1B;CAAe,CAAC;AACvG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/hooks/useInitializeTableStore/useInitializeTableStore.ts"],"sourcesContent":["import { useStore } from 'zustand';\nimport type { StoreApi } from 'zustand';\nimport { useEffect } from 'react';\n\nimport { DEFAULT_FILTER_GROUP } from '../../classes/abstracts/FilterAbstract';\nimport type { TableColumn } from '../../models/table';\nimport type { TableStore } from '../../stores/tableStore';\nimport { TableUtil } from '../../utils/TableUtil';\n\nexport type UseInitializeTableStoreKWArgs<TData, TDataContext = null> = {\n readonly columns: TableColumn<TData, TDataContext>[];\n readonly context?: TDataContext;\n readonly createFiltersFromColumns?: boolean;\n readonly rows: TData[];\n readonly store: StoreApi<TableStore<TData, TDataContext>>;\n};\n\n\nexport const useInitializeTableStore = <TData, TDataContext = null>({ columns, context, createFiltersFromColumns, rows, store }: UseInitializeTableStoreKWArgs<TData, TDataContext>) => {\n const setColumns = useStore(store, (state) => state.setColumns);\n const setBaseData = useStore(store, (state) => state.setBaseData);\n const setFilters = useStore(store, (state) => state.setFilters);\n const initialize = useStore(store, (state) => state.initialize);\n\n useEffect(() => {\n if (!columns || !rows) {\n return;\n }\n const abortController = new AbortController();\n setColumns(columns);\n setBaseData(rows);\n if (createFiltersFromColumns) {\n setFilters(TableUtil.createFiltersFromColumns(columns, rows, context), [], [DEFAULT_FILTER_GROUP]);\n }\n\n void initialize(abortController.signal);\n return () => {\n abortController.abort();\n };\n }, [columns, initialize, setColumns, setFilters, setBaseData, createFiltersFromColumns, rows, context]);\n};\n"],"mappings":";;;;;AAkBA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["TableUtil","useStore","useInitializeTableStore","setColumns","store","state","setBaseData","setFilters","initialize","columns","rows","abortController","createFiltersFromColumns","context","DEFAULT_FILTER_GROUP"],"sources":["../../../src/hooks/useInitializeTableStore/useInitializeTableStore.ts"],"sourcesContent":["import { useStore } from 'zustand';\nimport type { StoreApi } from 'zustand';\nimport { useEffect } from 'react';\n\nimport { DEFAULT_FILTER_GROUP } from '../../classes/abstracts/FilterAbstract';\nimport type { TableColumn } from '../../models/table.models';\nimport type { TableStore } from '../../stores/tableStore';\nimport { TableUtil } from '../../utils/TableUtil';\n\nexport type UseInitializeTableStoreKWArgs<TData, TDataContext = null> = {\n readonly columns: TableColumn<TData, TDataContext>[];\n readonly context?: TDataContext;\n readonly createFiltersFromColumns?: boolean;\n readonly rows: TData[];\n readonly store: StoreApi<TableStore<TData, TDataContext>>;\n};\n\n\nexport const useInitializeTableStore = <TData, TDataContext = null>({ columns, context, createFiltersFromColumns, rows, store }: UseInitializeTableStoreKWArgs<TData, TDataContext>) => {\n const setColumns = useStore(store, (state) => state.setColumns);\n const setBaseData = useStore(store, (state) => state.setBaseData);\n const setFilters = useStore(store, (state) => state.setFilters);\n const initialize = useStore(store, (state) => state.initialize);\n\n useEffect(() => {\n if (!columns || !rows) {\n return;\n }\n const abortController = new AbortController();\n setColumns(columns);\n setBaseData(rows);\n if (createFiltersFromColumns) {\n setFilters(TableUtil.createFiltersFromColumns(columns, rows, context), [], [DEFAULT_FILTER_GROUP]);\n }\n\n void initialize(abortController.signal);\n return () => {\n abortController.abort();\n };\n }, [columns, initialize, setColumns, setFilters, setBaseData, createFiltersFromColumns, rows, context]);\n};\n"],"mappings":";;;;;AAkBA,IAAaE,KAAuD,EAAE,YAAS,YAAS,6BAA0B,SAAM,eAAgE;CACtL,IAAMC,IAAaF,EAASG,IAAQ,MAAUC,EAAM,UAAU,GACxDC,IAAcL,EAASG,IAAQ,MAAUC,EAAM,WAAW,GAC1DE,IAAaN,EAASG,IAAQ,MAAUC,EAAM,UAAU,GACxDG,IAAaP,EAASG,IAAQ,MAAUC,EAAM,UAAU;CAE9D,QAAgB;EACd,IAAI,CAACI,KAAW,CAACC,GACf;EAEF,IAAMC,IAAkB,IAAI,gBAAgB;EAQ5C,OAPAR,EAAWM,CAAO,GAClBH,EAAYI,CAAI,GACZE,KACFL,EAAWP,EAAU,yBAAyBS,GAASC,GAAMG,CAAO,GAAG,CAAC,GAAG,CAACC,CAAoB,CAAC,GAGnGN,EAAgBG,EAAgB,MAAM,SACzB;GACX,EAAgB,MAAM;EACxB;CACF,GAAG;EAACF;EAASD;EAAYL;EAAYI;EAAYD;EAAaM;EAA0BF;EAAMG;CAAO,CAAC;AACxG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StoreApi } from 'zustand';
|
|
2
|
-
import { TableColumn } from '../../models/table';
|
|
2
|
+
import { TableColumn } from '../../models/table.models';
|
|
3
3
|
import { TableStore } from '../../stores/tableStore';
|
|
4
4
|
export type UseInitializeTableStoreKWArgs<TData, TDataContext = null> = {
|
|
5
5
|
readonly columns: TableColumn<TData, TDataContext>[];
|
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
import { t as e } from "../../_chunks/
|
|
2
|
-
import { t } from "../../_chunks/
|
|
3
|
-
import {
|
|
1
|
+
import { t as e } from "../../_chunks/QueryClientService.js";
|
|
2
|
+
import { t } from "../../_chunks/useQueryMemo.js";
|
|
3
|
+
import { container as n } from "tsyringe";
|
|
4
|
+
import { useEffect as r, useMemo as i, useState as a } from "react";
|
|
4
5
|
//#region src/hooks/useItemQuery/useItemQuery.ts
|
|
5
|
-
var
|
|
6
|
+
var o = [
|
|
6
7
|
"added",
|
|
7
8
|
"removed",
|
|
8
9
|
"updated"
|
|
9
|
-
],
|
|
10
|
-
let { queryCache:
|
|
11
|
-
...
|
|
12
|
-
enabled: !
|
|
13
|
-
queryKey:
|
|
10
|
+
], s = ({ baseQueryKey: s, itemId: c, useQueryOptions: l }) => {
|
|
11
|
+
let { queryCache: u } = n.resolve(e), [d, f] = a(n.resolve(e).getItemFromCache(s, c)), p = t({
|
|
12
|
+
...l,
|
|
13
|
+
enabled: !d && l.enabled,
|
|
14
|
+
queryKey: n.resolve(e).getGenericKey(s, c)
|
|
14
15
|
});
|
|
15
|
-
return
|
|
16
|
-
let e =
|
|
17
|
-
if (Array.isArray(e.query.queryKey) && e.query.queryKey[0] ===
|
|
16
|
+
return r(() => {
|
|
17
|
+
let e = u.subscribe((e) => {
|
|
18
|
+
if (Array.isArray(e.query.queryKey) && e.query.queryKey[0] === s && o.includes(e.type)) {
|
|
18
19
|
if (e.query.queryKey.length === 1) {
|
|
19
20
|
let t = e.query.state.data;
|
|
20
21
|
if (e.type === "removed") {
|
|
21
|
-
|
|
22
|
+
f(void 0);
|
|
22
23
|
return;
|
|
23
24
|
}
|
|
24
25
|
if (!t) return;
|
|
25
|
-
let n = t?.find((e) => e.id ===
|
|
26
|
-
JSON.stringify(
|
|
27
|
-
} else if (e.query.queryKey.length === 2 && e.query.state.data?.id ===
|
|
26
|
+
let n = t?.find((e) => e.id === c);
|
|
27
|
+
JSON.stringify(d) !== JSON.stringify(n) && f(n);
|
|
28
|
+
} else if (e.query.queryKey.length === 2 && e.query.state.data?.id === c) {
|
|
28
29
|
let t = e.query.state.data;
|
|
29
|
-
JSON.stringify(
|
|
30
|
+
JSON.stringify(d) !== JSON.stringify(t) && f(t);
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
});
|
|
@@ -34,28 +35,28 @@ var a = [
|
|
|
34
35
|
e();
|
|
35
36
|
};
|
|
36
37
|
}, [
|
|
37
|
-
o,
|
|
38
38
|
s,
|
|
39
|
-
|
|
40
|
-
u
|
|
41
|
-
]), r(() => ({
|
|
42
|
-
data: u || f.data,
|
|
43
|
-
error: !u && f.error,
|
|
44
|
-
isEnabled: u ? !0 : f.isEnabled,
|
|
45
|
-
isFetching: !u && f.isFetching,
|
|
46
|
-
isLoading: !u && f.isLoading,
|
|
47
|
-
isPending: !u && f.isPending
|
|
48
|
-
}), [
|
|
39
|
+
c,
|
|
49
40
|
u,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
41
|
+
d
|
|
42
|
+
]), i(() => ({
|
|
43
|
+
data: d || p.data,
|
|
44
|
+
error: !d && p.error,
|
|
45
|
+
isEnabled: d ? !0 : p.isEnabled,
|
|
46
|
+
isFetching: !d && p.isFetching,
|
|
47
|
+
isLoading: !d && p.isLoading,
|
|
48
|
+
isPending: !d && p.isPending
|
|
49
|
+
}), [
|
|
50
|
+
d,
|
|
51
|
+
p.data,
|
|
52
|
+
p.isLoading,
|
|
53
|
+
p.isPending,
|
|
54
|
+
p.isFetching,
|
|
55
|
+
p.isEnabled,
|
|
56
|
+
p.error
|
|
56
57
|
]);
|
|
57
58
|
};
|
|
58
59
|
//#endregion
|
|
59
|
-
export {
|
|
60
|
+
export { s as useItemQuery };
|
|
60
61
|
|
|
61
62
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/hooks/useItemQuery/useItemQuery.ts"],"sourcesContent":["import {\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport type {\n QueryCacheNotifyEvent,\n UseQueryOptions,\n} from '@tanstack/react-query';\n\nimport type { GenericData } from '../../models/data';\nimport { useQueryMemo } from '../useQueryMemo';\nimport { QueryClientService } from '../../classes/services/QueryClientService';\n\nexport type UseItemQueryProps<T extends GenericData, TQueryKey extends string = string> = {\n readonly baseQueryKey: TQueryKey;\n readonly itemId: string;\n readonly useQueryOptions: Omit<UseQueryOptions<T>, 'queryKey'>;\n};\n\nconst eventTypes: QueryCacheNotifyEvent['type'][] = ['added', 'removed', 'updated'];\n\nexport const useItemQuery = <T extends GenericData>({\n baseQueryKey,\n itemId,\n useQueryOptions,\n}: UseItemQueryProps<T>) => {\n const { queryCache } =
|
|
1
|
+
{"version":3,"file":"index.js","names":["rootContainer","QueryClientService","eventTypes","useItemQuery","container","itemFromCache","setItemFromCache","useState","baseQueryKey","itemId","useQueryResult","useQueryMemo","useQueryOptions","useEffect","removeListener","queryCache","event","list","newValue","item","useMemo"],"sources":["../../../src/hooks/useItemQuery/useItemQuery.ts"],"sourcesContent":["import { container as rootContainer } from 'tsyringe';\nimport {\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport type {\n QueryCacheNotifyEvent,\n UseQueryOptions,\n} from '@tanstack/react-query';\n\nimport type { GenericData } from '../../models/data.models';\nimport { useQueryMemo } from '../useQueryMemo';\nimport { QueryClientService } from '../../classes/services/QueryClientService';\n\nexport type UseItemQueryProps<T extends GenericData, TQueryKey extends string = string> = {\n readonly baseQueryKey: TQueryKey;\n readonly itemId: string;\n readonly useQueryOptions: Omit<UseQueryOptions<T>, 'queryKey'>;\n};\n\nconst eventTypes: QueryCacheNotifyEvent['type'][] = ['added', 'removed', 'updated'];\n\nexport const useItemQuery = <T extends GenericData>({\n baseQueryKey,\n itemId,\n useQueryOptions,\n}: UseItemQueryProps<T>) => {\n const { queryCache } = rootContainer.resolve(QueryClientService);\n const [itemFromCache, setItemFromCache] = useState<T>(rootContainer.resolve(QueryClientService).getItemFromCache<T>(baseQueryKey, itemId));\n\n const useQueryResult = useQueryMemo({\n ...useQueryOptions,\n enabled: !itemFromCache && useQueryOptions.enabled,\n queryKey: rootContainer.resolve(QueryClientService).getGenericKey(baseQueryKey, itemId),\n });\n\n useEffect(() => {\n const handleQueryCacheEvent = (event: QueryCacheNotifyEvent) => {\n if (Array.isArray(event.query.queryKey) && event.query.queryKey[0] === baseQueryKey && eventTypes.includes(event.type)) {\n if (event.query.queryKey.length === 1) {\n const list = (event.query.state.data as T[]);\n if (event.type === 'removed') {\n setItemFromCache(undefined);\n return;\n }\n if (!list) {\n return;\n }\n const newValue = list?.find(item => item.id === itemId);\n if (JSON.stringify(itemFromCache) !== JSON.stringify(newValue)) {\n setItemFromCache(newValue);\n }\n } else if (event.query.queryKey.length === 2 && (event.query.state.data as T)?.id === itemId) {\n const newValue = event.query.state.data as T;\n if (JSON.stringify(itemFromCache) !== JSON.stringify(newValue)) {\n setItemFromCache(newValue);\n }\n }\n }\n };\n\n const removeListener = queryCache.subscribe(handleQueryCacheEvent);\n return () => {\n removeListener();\n };\n }, [baseQueryKey, itemId, queryCache, itemFromCache]);\n\n\n const result = useMemo(() => {\n return {\n data: itemFromCache || useQueryResult.data,\n error: itemFromCache ? false : useQueryResult.error,\n isEnabled: itemFromCache ? true : useQueryResult.isEnabled,\n isFetching: itemFromCache ? false : useQueryResult.isFetching,\n isLoading: itemFromCache ? false : useQueryResult.isLoading,\n isPending: itemFromCache ? false : useQueryResult.isPending,\n };\n }, [itemFromCache, useQueryResult.data, useQueryResult.isLoading, useQueryResult.isPending, useQueryResult.isFetching, useQueryResult.isEnabled, useQueryResult.error]);\n\n return result;\n};\n"],"mappings":";;;;;AAqBA,IAAME,IAA8C;CAAC;CAAS;CAAW;AAAS,GAErEC,KAAuC,EAClD,iBACA,WACA,yBAC0B;CAC1B,IAAM,EAAE,kBAAeH,EAAc,QAAQC,CAAkB,GACzD,CAACI,GAAeC,KAAoBC,EAAYP,EAAc,QAAQC,CAAkB,CAAC,CAAC,iBAAoBO,GAAcC,CAAM,CAAC,GAEnIC,IAAiBC,EAAa;EAClC,GAAGC;EACH,SAAS,CAACP,KAAiBO,EAAgB;EAC3C,UAAUZ,EAAc,QAAQC,CAAkB,CAAC,CAAC,cAAcO,GAAcC,CAAM;CACxF,CAAC;CA6CD,OA3CAI,QAAgB;EAyBd,IAAMC,IAAiBC,EAAW,WAxBH,MAAiC;GAC9D,IAAI,MAAM,QAAQC,EAAM,MAAM,QAAQ,KAAKA,EAAM,MAAM,SAAS,OAAOR,KAAgBN,EAAW,SAASc,EAAM,IAAI,GAAG;IACtH,IAAIA,EAAM,MAAM,SAAS,WAAW,GAAG;KACrC,IAAMC,IAAQD,EAAM,MAAM,MAAM;KAChC,IAAIA,EAAM,SAAS,WAAW;MAC5B,EAAiB,KAAA,CAAS;MAC1B;KACF;KACA,IAAI,CAACC,GACH;KAEF,IAAMC,IAAWD,GAAM,MAAK,MAAQE,EAAK,OAAOV,CAAM;KACtD,AAAI,KAAK,UAAUJ,CAAa,MAAM,KAAK,UAAUa,CAAQ,KAC3DZ,EAAiBY,CAAQ;IAE7B,OAAO,IAAIF,EAAM,MAAM,SAAS,WAAW,KAAMA,EAAM,MAAM,MAAM,MAAY,OAAOP,GAAQ;KAC5F,IAAMS,IAAWF,EAAM,MAAM,MAAM;KACnC,AAAI,KAAK,UAAUX,CAAa,MAAM,KAAK,UAAUa,CAAQ,KAC3DZ,EAAiBY,CAAQ;IAE7B;GACF;EACF,CAEiE;EACjE,aAAa;GACX,EAAe;EACjB;CACF,GAAG;EAACV;EAAcC;EAAQM;EAAYV;CAAa,CAAC,GAGrCe,SACN;EACL,MAAMf,KAAiBK,EAAe;EACtC,OAAO,MAAwBA,EAAe;EAC9C,WAAWL,IAAgB,KAAOK,EAAe;EACjD,YAAY,MAAwBA,EAAe;EACnD,WAAW,MAAwBA,EAAe;EAClD,WAAW,MAAwBA,EAAe;CACpD,IACC;EAACL;EAAeK,EAAe;EAAMA,EAAe;EAAWA,EAAe;EAAWA,EAAe;EAAYA,EAAe;EAAWA,EAAe;CAAK,CAE9J;AACT"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
-
import { GenericData } from '../../models/data';
|
|
2
|
+
import { GenericData } from '../../models/data.models';
|
|
3
3
|
export type UseItemQueryProps<T extends GenericData, TQueryKey extends string = string> = {
|
|
4
4
|
readonly baseQueryKey: TQueryKey;
|
|
5
5
|
readonly itemId: string;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as useQueryMemo };
|
|
1
|
+
export { t as useQueryMemo } from "../../_chunks/useQueryMemo.js";
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { BreadcrumbService as e } from "../../classes/services/BreadcrumbService/index.js";
|
|
2
|
-
import {
|
|
2
|
+
import { container as t } from "tsyringe";
|
|
3
|
+
import { useCallback as n, useEffect as r } from "react";
|
|
3
4
|
//#region src/hooks/useUpdateBreadcrumb/useUpdateBreadcrumb.ts
|
|
4
|
-
var
|
|
5
|
-
let
|
|
6
|
-
|
|
7
|
-
}, [
|
|
8
|
-
return
|
|
9
|
-
|
|
10
|
-
}, [
|
|
5
|
+
var i = (i) => {
|
|
6
|
+
let a = n((n) => {
|
|
7
|
+
t.resolve(e).update(i, n);
|
|
8
|
+
}, [i]);
|
|
9
|
+
return r(() => () => {
|
|
10
|
+
t.resolve(e).remove(i);
|
|
11
|
+
}, [i]), a;
|
|
11
12
|
};
|
|
12
13
|
//#endregion
|
|
13
|
-
export {
|
|
14
|
+
export { i as useUpdateBreadcrumb };
|
|
14
15
|
|
|
15
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/hooks/useUpdateBreadcrumb/useUpdateBreadcrumb.ts"],"sourcesContent":["import {\n useCallback,\n useEffect,\n} from 'react';\n\nimport { BreadcrumbService } from '../../classes/services/BreadcrumbService';\n\n\nexport const useUpdateBreadcrumb = (position: string) => {\n const update = useCallback((title: string) => {\n
|
|
1
|
+
{"version":3,"file":"index.js","names":["useUpdateBreadcrumb","update","useCallback","BreadcrumbService","position","title","useEffect"],"sources":["../../../src/hooks/useUpdateBreadcrumb/useUpdateBreadcrumb.ts"],"sourcesContent":["import { container as rootContainer } from 'tsyringe';\nimport {\n useCallback,\n useEffect,\n} from 'react';\n\nimport { BreadcrumbService } from '../../classes/services/BreadcrumbService';\n\n\nexport const useUpdateBreadcrumb = (position: string) => {\n const update = useCallback((title: string) => {\n rootContainer.resolve(BreadcrumbService).update(position, title);\n }, [position]);\n\n useEffect(() => {\n return () => {\n rootContainer.resolve(BreadcrumbService).remove(position);\n };\n }, [position]);\n\n return update;\n};\n"],"mappings":";;;;AASA,IAAaA,KAAuB,MAAqB;CACvD,IAAMC,IAASC,GAAa,MAAkB;EAC5C,EAAc,QAAQC,CAAiB,CAAC,CAAC,OAAOC,GAAUC,CAAK;CACjE,GAAG,CAACD,CAAQ,CAAC;CAQb,OANAE,cACe;EACX,EAAc,QAAQH,CAAiB,CAAC,CAAC,OAAOC,CAAQ;CAC1D,GACC,CAACA,CAAQ,CAAC,GAENH;AACT"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useConfig as e } from "../useConfig/index.js";
|
|
2
2
|
import { useEffect as t } from "react";
|
|
3
3
|
//#region src/hooks/useUpdateDocumentTitle/useUpdateDocumentTitle.ts
|
|
4
4
|
var n = (n) => {
|
|
5
|
+
let r = e();
|
|
5
6
|
t(() => {
|
|
6
|
-
document.title = `${
|
|
7
|
-
}, [n]);
|
|
7
|
+
document.title = `${r.applicationName} - ${n}`;
|
|
8
|
+
}, [r.applicationName, n]);
|
|
8
9
|
};
|
|
9
10
|
//#endregion
|
|
10
11
|
export { n as useUpdateDocumentTitle };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/hooks/useUpdateDocumentTitle/useUpdateDocumentTitle.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nimport {
|
|
1
|
+
{"version":3,"file":"index.js","names":["useUpdateDocumentTitle","config","useConfig","title"],"sources":["../../../src/hooks/useUpdateDocumentTitle/useUpdateDocumentTitle.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nimport { useConfig } from '../useConfig';\n\n\nexport const useUpdateDocumentTitle = (title: string) => {\n const config = useConfig();\n\n useEffect(() => {\n document.title = `${config.applicationName} - ${title}`;\n }, [config.applicationName, title]);\n};\n"],"mappings":";;;AAKA,IAAaA,KAA0B,MAAkB;CACvD,IAAMC,IAASC,EAAU;CAEzB,QAAgB;EACd,SAAS,QAAQ,GAAGD,EAAO,gBAAgB,KAAKE;CAClD,GAAG,CAACF,EAAO,iBAAiBE,CAAK,CAAC;AACpC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
//#region src/models/admin.ts
|
|
1
|
+
//#region src/models/admin.models.ts
|
|
2
2
|
var e = /* @__PURE__ */ function(e) {
|
|
3
3
|
return e.ACCESS_RIGHTS = "ACCESS_RIGHTS", e.HELPERS = "HELPERS", e.REFERENCE_DATA = "REFERENCE_DATA", e.SYSTEM = "SYSTEM", e.USERS_AND_ORGANIZATIONS = "USERS_AND_ORGANIZATIONS", e;
|
|
4
4
|
}({});
|
|
5
5
|
//#endregion
|
|
6
6
|
export { e as ADMIN_PAGE_CATEGORY };
|
|
7
7
|
|
|
8
|
-
//# sourceMappingURL=admin.js.map
|
|
8
|
+
//# sourceMappingURL=admin.models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin.models.js","names":["ADMIN_PAGE_CATEGORY","\"ACCESS_RIGHTS\"","\"HELPERS\"","\"REFERENCE_DATA\"","\"SYSTEM\"","\"USERS_AND_ORGANIZATIONS\""],"sources":["../../src/models/admin.models.ts"],"sourcesContent":["export enum ADMIN_PAGE_CATEGORY {\n ACCESS_RIGHTS = 'ACCESS_RIGHTS',\n HELPERS = 'HELPERS',\n REFERENCE_DATA = 'REFERENCE_DATA',\n SYSTEM = 'SYSTEM',\n USERS_AND_ORGANIZATIONS = 'USERS_AND_ORGANIZATIONS',\n}\n"],"mappings":";AAAA,IAAYA,IAAL,yBAAA,GAAA;QACL,EAAAC,gBAAA,iBACA,EAAAC,UAAA,WACA,EAAAC,iBAAA,kBACA,EAAAC,SAAA,UACA,EAAAC,0BAAA;AACF,EAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AxiosResponse, InternalAxiosRequestConfig } from 'axios';
|
|
2
|
+
import { CommonDbAbacApi, CommonDbAuthApi, CommonDbOrganizationApi, CommonDbSystemApi } from '@gen-epix/api-commondb';
|
|
3
|
+
import { InjectionToken } from 'tsyringe';
|
|
4
|
+
export interface BaseApi {
|
|
5
|
+
accessToken: string;
|
|
6
|
+
baseUrl: string;
|
|
7
|
+
defaultRequestTimeout: number;
|
|
8
|
+
onRequest: Array<(request: InternalAxiosRequestConfig) => InternalAxiosRequestConfig<unknown>>;
|
|
9
|
+
onResponseFulfilled: Array<(response: AxiosResponse) => AxiosResponse>;
|
|
10
|
+
onResponseRejected: Array<(error: unknown) => void>;
|
|
11
|
+
}
|
|
12
|
+
export declare const API_BASE_TOKEN: InjectionToken<BaseApi>;
|
|
13
|
+
export declare const API_ABAC_TOKEN: InjectionToken<CommonDbAbacApi>;
|
|
14
|
+
export declare const API_AUTH_TOKEN: InjectionToken<CommonDbAuthApi>;
|
|
15
|
+
export declare const API_ORGANIZATION_TOKEN: InjectionToken<CommonDbOrganizationApi>;
|
|
16
|
+
export declare const API_SYSTEM_TOKEN: InjectionToken<CommonDbSystemApi>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region src/models/api.models.ts
|
|
2
|
+
var e = Symbol("API_BASE_TOKEN"), t = Symbol("API_ABAC_TOKEN"), n = Symbol("API_AUTH_TOKEN"), r = Symbol("API_ORGANIZATION_TOKEN"), i = Symbol("API_SYSTEM_TOKEN");
|
|
3
|
+
//#endregion
|
|
4
|
+
export { t as API_ABAC_TOKEN, n as API_AUTH_TOKEN, e as API_BASE_TOKEN, r as API_ORGANIZATION_TOKEN, i as API_SYSTEM_TOKEN };
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=api.models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.models.js","names":["API_BASE_TOKEN","API_ABAC_TOKEN","API_AUTH_TOKEN","API_ORGANIZATION_TOKEN","API_SYSTEM_TOKEN"],"sources":["../../src/models/api.models.ts"],"sourcesContent":["import type {\n AxiosResponse,\n InternalAxiosRequestConfig,\n} from 'axios';\nimport type {\n CommonDbAbacApi,\n CommonDbAuthApi,\n CommonDbOrganizationApi,\n CommonDbSystemApi,\n} from '@gen-epix/api-commondb';\nimport type { InjectionToken } from 'tsyringe';\n\nexport interface BaseApi {\n accessToken: string;\n baseUrl: string;\n defaultRequestTimeout: number;\n onRequest: Array<(request: InternalAxiosRequestConfig) => InternalAxiosRequestConfig<unknown>>;\n onResponseFulfilled: Array<(response: AxiosResponse) => AxiosResponse>;\n onResponseRejected: Array<(error: unknown) => void>;\n}\n\nexport const API_BASE_TOKEN: InjectionToken<BaseApi> = Symbol('API_BASE_TOKEN');\nexport const API_ABAC_TOKEN: InjectionToken<CommonDbAbacApi> = Symbol('API_ABAC_TOKEN');\nexport const API_AUTH_TOKEN: InjectionToken<CommonDbAuthApi> = Symbol('API_AUTH_TOKEN');\nexport const API_ORGANIZATION_TOKEN: InjectionToken<CommonDbOrganizationApi> = Symbol('API_ORGANIZATION_TOKEN');\nexport const API_SYSTEM_TOKEN: InjectionToken<CommonDbSystemApi> = Symbol('API_SYSTEM_TOKEN');\n"],"mappings":";AAqBA,IAAaA,IAA0C,OAAO,gBAAgB,GACjEC,IAAkD,OAAO,gBAAgB,GACzEC,IAAkD,OAAO,gBAAgB,GACzEC,IAAkE,OAAO,wBAAwB,GACjGC,IAAsD,OAAO,kBAAkB"}
|