@argusoft/medplat-core 1.0.28 → 1.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AccessRights-xrday-L1.js +1023 -0
- package/dist/AccessRights-xrday-L1.js.map +1 -0
- package/dist/AddEditQueryBuilder-D-iQiVIe.js +365 -0
- package/dist/AddEditQueryBuilder-D-iQiVIe.js.map +1 -0
- package/dist/{AddFeatures-C0Z29oSd.js → AddFeatures-D1sU8RjY.js} +2 -2
- package/dist/{AddFeatures-C0Z29oSd.js.map → AddFeatures-D1sU8RjY.js.map} +1 -1
- package/dist/AddLabelModal-Bq-wRqv9.js +631 -0
- package/dist/AddLabelModal-Bq-wRqv9.js.map +1 -0
- package/dist/AddMenuConfiguration-e5BVXhmw.js +8547 -0
- package/dist/AddMenuConfiguration-e5BVXhmw.js.map +1 -0
- package/dist/{AddRoleDrawer-CQdzQZLb.js → AddRoleDrawer-0gqAK8N0.js} +62 -63
- package/dist/AddRoleDrawer-0gqAK8N0.js.map +1 -0
- package/dist/AppModal-CCtrQ5Tr.js +394 -0
- package/dist/AppModal-CCtrQ5Tr.js.map +1 -0
- package/dist/BrandsPage-DmRW5bhm-Bk1szrjI.js +387 -0
- package/dist/BrandsPage-DmRW5bhm-Bk1szrjI.js.map +1 -0
- package/dist/CategoriesPage-BsS5IQh3-B03lWRY5.js +391 -0
- package/dist/CategoriesPage-BsS5IQh3-B03lWRY5.js.map +1 -0
- package/dist/{ChangePasswordModalCore-CDxkeIIM.js → ChangePasswordModalCore-BPsJquTS.js} +1606 -1611
- package/dist/ChangePasswordModalCore-BPsJquTS.js.map +1 -0
- package/dist/{ConditionConfig-DSsgGEXS.js → ConditionConfig-Ddz9halE.js} +2 -2
- package/dist/ConditionConfig-Ddz9halE.js.map +1 -0
- package/dist/DashboardPage-C3bKc5na-sBd9Yqbi.js +435 -0
- package/dist/DashboardPage-C3bKc5na-sBd9Yqbi.js.map +1 -0
- package/dist/{EntityManagement-GaYsBTvf.js → EntityManagement-CPQL6qBj.js} +2 -2
- package/dist/{EntityManagement-GaYsBTvf.js.map → EntityManagement-CPQL6qBj.js.map} +1 -1
- package/dist/EventConfig-BmLemzX3.js +26 -0
- package/dist/EventConfig-BmLemzX3.js.map +1 -0
- package/dist/{EventConfigurations-kNtAj_WM.js → EventConfigurations-Bzh1qWXU.js} +31 -30
- package/dist/{EventConfigurations-kNtAj_WM.js.map → EventConfigurations-Bzh1qWXU.js.map} +1 -1
- package/dist/{EventsExceptionModal-D4Bf1ilS.js → EventsExceptionModal-B2SRrnB1.js} +2 -2
- package/dist/{EventsExceptionModal-D4Bf1ilS.js.map → EventsExceptionModal-B2SRrnB1.js.map} +1 -1
- package/dist/EventsSkeleton-BIcPks4T.js +61 -0
- package/dist/EventsSkeleton-BIcPks4T.js.map +1 -0
- package/dist/FacilityPicker-BiZeupmP-CyPHmj6b.js +79 -0
- package/dist/FacilityPicker-BiZeupmP-CyPHmj6b.js.map +1 -0
- package/dist/FeatureMenu-DYJmDt7q.js +521 -0
- package/dist/FeatureMenu-DYJmDt7q.js.map +1 -0
- package/dist/Features-Dne21RWu.js +14 -0
- package/dist/Features-Dne21RWu.js.map +1 -0
- package/dist/{FhirServerList-Dkq7Kbes.js → FhirServerList-DuTwnngN.js} +19 -19
- package/dist/{FhirServerList-Dkq7Kbes.js.map → FhirServerList-DuTwnngN.js.map} +1 -1
- package/dist/{FhirServerWizard-Db6Hm4bQ.js → FhirServerWizard-DZI8Olku.js} +15 -15
- package/dist/{FhirServerWizard-Db6Hm4bQ.js.map → FhirServerWizard-DZI8Olku.js.map} +1 -1
- package/dist/FlywayQuery-CQygj51V.js +179 -0
- package/dist/FlywayQuery-CQygj51V.js.map +1 -0
- package/dist/{ManageNotification-CaBAOhji.js → Google-DQxMfbaL.js} +1725 -2652
- package/dist/{ManageNotification-CaBAOhji.js.map → Google-DQxMfbaL.js.map} +1 -1
- package/dist/GrantPermissionModal-BDN66Atn.js +236 -0
- package/dist/GrantPermissionModal-BDN66Atn.js.map +1 -0
- package/dist/ImmunizationConfigurationBase-Di1KO3oW.js +7639 -0
- package/dist/ImmunizationConfigurationBase-Di1KO3oW.js.map +1 -0
- package/dist/ImmunizationConfigurationBase.css +1 -1
- package/dist/ImmunizationConfigurationsList-TZcLDEci.js +369 -0
- package/dist/ImmunizationConfigurationsList-TZcLDEci.js.map +1 -0
- package/dist/InventoryPage-C_AxSy7A-QLvlL4rE.js +665 -0
- package/dist/InventoryPage-C_AxSy7A-QLvlL4rE.js.map +1 -0
- package/dist/LanguagesModal-B3NTebYT.js +352 -0
- package/dist/LanguagesModal-B3NTebYT.js.map +1 -0
- package/dist/ManageDynamicFeature-BU0I45dd.js +4475 -0
- package/dist/ManageDynamicFeature-BU0I45dd.js.map +1 -0
- package/dist/{ManageEventConfiguration-DV3I5POA.js → ManageEventConfiguration-CoYcpjR9.js} +465 -397
- package/dist/ManageEventConfiguration-CoYcpjR9.js.map +1 -0
- package/dist/ManageNotification-C5MhV77Q.js +934 -0
- package/dist/ManageNotification-C5MhV77Q.js.map +1 -0
- package/dist/{ManageRole-CGYfglpo.js → ManageRole-CNZBRKGU.js} +32 -30
- package/dist/ManageRole-CNZBRKGU.js.map +1 -0
- package/dist/ManageTranslation-vRiptUAP.js +833 -0
- package/dist/ManageTranslation-vRiptUAP.js.map +1 -0
- package/dist/ManageTranslation.css +1 -1
- package/dist/{ManageUser-AY1EUDLI.js → ManageUser-DCFkUMV9.js} +1722 -1586
- package/dist/ManageUser-DCFkUMV9.js.map +1 -0
- package/dist/MemberProfileCard-BdUNgHRB-VywqQdFF.js +272 -0
- package/dist/MemberProfileCard-BdUNgHRB-VywqQdFF.js.map +1 -0
- package/dist/MobileAnalytics-pQoE8cG1.js +16888 -0
- package/dist/MobileAnalytics-pQoE8cG1.js.map +1 -0
- package/dist/MobileMenuManagement-Cf8IZlla.js +108 -0
- package/dist/MobileMenuManagement-Cf8IZlla.js.map +1 -0
- package/dist/{MobileTypeEventConfigModal-BxLympIO.js → MobileTypeEventConfigModal-BeveaX0C.js} +2 -2
- package/dist/MobileTypeEventConfigModal-BeveaX0C.js.map +1 -0
- package/dist/NotificationFlywayQuery-BAHVjf6N.js +247 -0
- package/dist/NotificationFlywayQuery-BAHVjf6N.js.map +1 -0
- package/dist/{NotificationList-C3Vb_jKU.js → NotificationList-DEyRZEuM.js} +109 -110
- package/dist/NotificationList-DEyRZEuM.js.map +1 -0
- package/dist/{OtherTypeEventConfigModal-BeG1GrUi.js → OtherTypeEventConfigModal-CM6VkdmY.js} +570 -478
- package/dist/OtherTypeEventConfigModal-CM6VkdmY.js.map +1 -0
- package/dist/PaymentCreatePage-CIVe0P0p-25BQVpOX.js +482 -0
- package/dist/PaymentCreatePage-CIVe0P0p-25BQVpOX.js.map +1 -0
- package/dist/PaymentsPage-BvPe5Q9F-D2gfziwW.js +157 -0
- package/dist/PaymentsPage-BvPe5Q9F-D2gfziwW.js.map +1 -0
- package/dist/PermissionsModal-CCYkcKlC.js +151 -0
- package/dist/PermissionsModal-CCYkcKlC.js.map +1 -0
- package/dist/PickupBatchLinesEditor-DHmcAG23-DL2p6IKJ.js +119 -0
- package/dist/PickupBatchLinesEditor-DHmcAG23-DL2p6IKJ.js.map +1 -0
- package/dist/PickupCreatePage-CB0Sl0Hb-Mmj7zESG.js +783 -0
- package/dist/PickupCreatePage-CB0Sl0Hb-Mmj7zESG.js.map +1 -0
- package/dist/PickupsPage-Ctpghavs-CUp4uIZq.js +818 -0
- package/dist/PickupsPage-Ctpghavs-CUp4uIZq.js.map +1 -0
- package/dist/PmGuard-b10TGXEi-G3N0G_Wg.js +599 -0
- package/dist/PmGuard-b10TGXEi-G3N0G_Wg.js.map +1 -0
- package/dist/ProductEditPage-C1thoKHu-URQaZ6st.js +1302 -0
- package/dist/ProductEditPage-C1thoKHu-URQaZ6st.js.map +1 -0
- package/dist/ProductsPage-CupVmOD4-D45a_hf-.js +252 -0
- package/dist/ProductsPage-CupVmOD4-D45a_hf-.js.map +1 -0
- package/dist/PurchaseCreatePage-YD3NmhPQ-2j4etSjM.js +648 -0
- package/dist/PurchaseCreatePage-YD3NmhPQ-2j4etSjM.js.map +1 -0
- package/dist/PurchaseRequestDetailPage-Dg_MRY_N-D1bgTEAn.js +1577 -0
- package/dist/PurchaseRequestDetailPage-Dg_MRY_N-D1bgTEAn.js.map +1 -0
- package/dist/PurchaseRequestsPage-DPAPzpmm-mDH2IrTl.js +279 -0
- package/dist/PurchaseRequestsPage-DPAPzpmm-mDH2IrTl.js.map +1 -0
- package/dist/PurchasesPage-It1GHiXl-eH4IsF_U.js +293 -0
- package/dist/PurchasesPage-It1GHiXl-eH4IsF_U.js.map +1 -0
- package/dist/QueryBuilder-CXaBe6sr.js +478 -0
- package/dist/QueryBuilder-CXaBe6sr.js.map +1 -0
- package/dist/{RoleManagement-BPl2cE27.js → RoleManagement-s8iNx2Mu.js} +131 -142
- package/dist/RoleManagement-s8iNx2Mu.js.map +1 -0
- package/dist/Roles-BIyiic67.js +14 -0
- package/dist/Roles-BIyiic67.js.map +1 -0
- package/dist/SaleCreatePage-C9kFmTvm-B3Y0o4CX.js +544 -0
- package/dist/SaleCreatePage-C9kFmTvm-B3Y0o4CX.js.map +1 -0
- package/dist/SalesPage-D18DCseD-BxktGDRQ.js +315 -0
- package/dist/SalesPage-D18DCseD-BxktGDRQ.js.map +1 -0
- package/dist/{ServerSyncModal-D_oFpv3C.js → ServerSyncModal-92U3xtqI.js} +84 -85
- package/dist/ServerSyncModal-92U3xtqI.js.map +1 -0
- package/dist/SettingsPage-VsxI-ano-DcmtUUEj.js +747 -0
- package/dist/SettingsPage-VsxI-ano-DcmtUUEj.js.map +1 -0
- package/dist/ShowFlywayQuery-D10Olk5Z.js +154 -0
- package/dist/ShowFlywayQuery-D10Olk5Z.js.map +1 -0
- package/dist/{ShowFlywayQuery-DVRCd384.js → ShowFlywayQuery-D1y_4A1u.js} +161 -121
- package/dist/ShowFlywayQuery-D1y_4A1u.js.map +1 -0
- package/dist/ShowQueryHistory-DRBKYDKk.js +313 -0
- package/dist/ShowQueryHistory-DRBKYDKk.js.map +1 -0
- package/dist/StorageUnitsPage-7EqwuMOI-BwUso1Th.js +721 -0
- package/dist/StorageUnitsPage-7EqwuMOI-BwUso1Th.js.map +1 -0
- package/dist/SubMenu-eEDhZUvh.js +317 -0
- package/dist/SubMenu-eEDhZUvh.js.map +1 -0
- package/dist/{TableDetails-Cf_YfnY2.js → TableDetails-BtafRxXb.js} +1069 -831
- package/dist/TableDetails-BtafRxXb.js.map +1 -0
- package/dist/{TableList-D6jnIbnz.js → TableList-Dpo6dO7S.js} +2 -2
- package/dist/{TableList-D6jnIbnz.js.map → TableList-Dpo6dO7S.js.map} +1 -1
- package/dist/TransactionsPage-DrH53pVS-BkhIGB6C.js +746 -0
- package/dist/TransactionsPage-DrH53pVS-BkhIGB6C.js.map +1 -0
- package/dist/TransferCreatePage-CuvoMrYH-DTTfHjz-.js +315 -0
- package/dist/TransferCreatePage-CuvoMrYH-DTTfHjz-.js.map +1 -0
- package/dist/TransfersPage-Cf701t8s-BBbN7cBf.js +476 -0
- package/dist/TransfersPage-Cf701t8s-BBbN7cBf.js.map +1 -0
- package/dist/{TypeConfiguration-37wp-gsl.js → TypeConfiguration-3O6ABrK-.js} +2 -2
- package/dist/{TypeConfiguration-37wp-gsl.js.map → TypeConfiguration-3O6ABrK-.js.map} +1 -1
- package/dist/{UserList-Bc8gYxRL.js → UserList-DgPxsnj2.js} +253 -236
- package/dist/{UserList-Bc8gYxRL.js.map → UserList-DgPxsnj2.js.map} +1 -1
- package/dist/Users-Bpc4Sazd.js +41 -0
- package/dist/Users-Bpc4Sazd.js.map +1 -0
- package/dist/VialsPage-8oAc1yFv-Cl3FUXBJ.js +321 -0
- package/dist/VialsPage-8oAc1yFv-Cl3FUXBJ.js.map +1 -0
- package/dist/{WidgetList-Dw_FmbbE.js → WidgetList-D7YuWfDD.js} +2 -2
- package/dist/{WidgetList-Dw_FmbbE.js.map → WidgetList-D7YuWfDD.js.map} +1 -1
- package/dist/constants-ClZJY2x1-MkSWn6TZ.js +434 -0
- package/dist/constants-ClZJY2x1-MkSWn6TZ.js.map +1 -0
- package/dist/dashboardLayoutUtils-D1xCAxp3.js +405 -0
- package/dist/dashboardLayoutUtils-D1xCAxp3.js.map +1 -0
- package/dist/format-UOyOu75i-D0GyylyQ.js +63 -0
- package/dist/format-UOyOu75i-D0GyylyQ.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +4 -752
- package/dist/index.js.map +1 -1
- package/dist/index.lib-Dn8PMkeD.js +862 -0
- package/dist/index.lib-Dn8PMkeD.js.map +1 -0
- package/dist/useFieldErrors-hDG8ox_x-DbSAzrGo.js +28 -0
- package/dist/useFieldErrors-hDG8ox_x-DbSAzrGo.js.map +1 -0
- package/dist/validation-BzlHnL-r-CCJm2utQ.js +125 -0
- package/dist/validation-BzlHnL-r-CCJm2utQ.js.map +1 -0
- package/package.json +5 -4
- package/dist/AccessRights-CHu27ZOw.js +0 -1262
- package/dist/AccessRights-CHu27ZOw.js.map +0 -1
- package/dist/AddEditQueryBuilder-Brdnm6rQ.js +0 -313
- package/dist/AddEditQueryBuilder-Brdnm6rQ.js.map +0 -1
- package/dist/AddLabelModal-DFllBVcd.js +0 -734
- package/dist/AddLabelModal-DFllBVcd.js.map +0 -1
- package/dist/AddMenuConfiguration-BSQLl88V.js +0 -6570
- package/dist/AddMenuConfiguration-BSQLl88V.js.map +0 -1
- package/dist/AddRoleDrawer-CQdzQZLb.js.map +0 -1
- package/dist/AppModal-CtG2GjD_.js +0 -428
- package/dist/AppModal-CtG2GjD_.js.map +0 -1
- package/dist/ChangePasswordModalCore-CDxkeIIM.js.map +0 -1
- package/dist/ConditionConfig-DSsgGEXS.js.map +0 -1
- package/dist/EventsSkeleton-8iiETGcf.js +0 -76
- package/dist/EventsSkeleton-8iiETGcf.js.map +0 -1
- package/dist/FeatureMenu-jl7-Tk6y.js +0 -265
- package/dist/FeatureMenu-jl7-Tk6y.js.map +0 -1
- package/dist/Features-CObdzJp_.js +0 -13
- package/dist/Features-CObdzJp_.js.map +0 -1
- package/dist/FlywayQuery-Cx2sly6g.js +0 -169
- package/dist/FlywayQuery-Cx2sly6g.js.map +0 -1
- package/dist/ImmunizationConfigurationBase-DZGqwda2.js +0 -5910
- package/dist/ImmunizationConfigurationBase-DZGqwda2.js.map +0 -1
- package/dist/ImmunizationConfigurationsList-DdSZicTP.js +0 -344
- package/dist/ImmunizationConfigurationsList-DdSZicTP.js.map +0 -1
- package/dist/LanguagesModal-D6VfaGrl.js +0 -394
- package/dist/LanguagesModal-D6VfaGrl.js.map +0 -1
- package/dist/ManageDynamicFeature-BhONvfC_.js +0 -4189
- package/dist/ManageDynamicFeature-BhONvfC_.js.map +0 -1
- package/dist/ManageEventConfiguration-DV3I5POA.js.map +0 -1
- package/dist/ManageRole-CGYfglpo.js.map +0 -1
- package/dist/ManageTranslation-B4C9-lWD.js +0 -625
- package/dist/ManageTranslation-B4C9-lWD.js.map +0 -1
- package/dist/ManageUser-AY1EUDLI.js.map +0 -1
- package/dist/MobileMenuManagement-CVAKyKDa.js +0 -112
- package/dist/MobileMenuManagement-CVAKyKDa.js.map +0 -1
- package/dist/MobileTypeEventConfigModal-BxLympIO.js.map +0 -1
- package/dist/NotificationFlywayQuery-BY8Zzml_.js +0 -244
- package/dist/NotificationFlywayQuery-BY8Zzml_.js.map +0 -1
- package/dist/NotificationList-C3Vb_jKU.js.map +0 -1
- package/dist/OtherTypeEventConfigModal-BeG1GrUi.js.map +0 -1
- package/dist/QueryBuilder-z7eqfd7D.js +0 -383
- package/dist/QueryBuilder-z7eqfd7D.js.map +0 -1
- package/dist/RoleManagement-BPl2cE27.js.map +0 -1
- package/dist/ServerSyncModal-D_oFpv3C.js.map +0 -1
- package/dist/ShowFlywayQuery-DVRCd384.js.map +0 -1
- package/dist/ShowFlywayQuery-tj42YQAS.js +0 -130
- package/dist/ShowFlywayQuery-tj42YQAS.js.map +0 -1
- package/dist/ShowQueryHistory-BDN0tzHg.js +0 -190
- package/dist/ShowQueryHistory-BDN0tzHg.js.map +0 -1
- package/dist/SubMenu-DYxAPH2Z.js +0 -191
- package/dist/SubMenu-DYxAPH2Z.js.map +0 -1
- package/dist/TableDetails-Cf_YfnY2.js.map +0 -1
- package/dist/Users-CsJ08Kjm.js +0 -40
- package/dist/Users-CsJ08Kjm.js.map +0 -1
- package/dist/dashboardLayoutUtils-Bt5HA96J.js +0 -265
- package/dist/dashboardLayoutUtils-Bt5HA96J.js.map +0 -1
|
@@ -0,0 +1,833 @@
|
|
|
1
|
+
import { jsxs as p, jsx as t, Fragment as Ne } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as _a, useState as i, useEffect as ea, useMemo as B, useCallback as za, Suspense as ta, lazy as sa } from "react";
|
|
3
|
+
import { api as h } from "@/common/interceptors/AxiosInterceptor";
|
|
4
|
+
import { execute as Me, executeQuery as P } from "@/common/services/GlobalApis";
|
|
5
|
+
import { showToast as b } from "@/common/toaster/toaster";
|
|
6
|
+
import C from "@mui/material/Grid2";
|
|
7
|
+
import { getAssignedFeatures as we } from "@/utils/feature";
|
|
8
|
+
import { Chip as Fa, Box as f, Typography as L, Paper as _e, Button as M, InputAdornment as Wa, IconButton as ze, FormControlLabel as Fe, ToggleButtonGroup as We, ToggleButton as Ea } from "@mui/material";
|
|
9
|
+
import { useForm as Ee, useWatch as Da } from "react-hook-form";
|
|
10
|
+
import De from "@/hooks/usePagination";
|
|
11
|
+
import je from "@/views/custom-components/CustomConfirmationModal";
|
|
12
|
+
import w from "@/common/services/util/GeneralUtil";
|
|
13
|
+
import { useTranslateProvider as Be } from "@/common/languageTranslator/TranslationContext";
|
|
14
|
+
import u from "prop-types";
|
|
15
|
+
import { useSelector as K } from "react-redux";
|
|
16
|
+
import { getUseSkeleton as $ } from "@/store/reducers/SkeletonReducer";
|
|
17
|
+
import Pe from "@/views/custom-components/CustomizedTable/VirtualCustomizedTableV2";
|
|
18
|
+
import ja from "@/views/custom-components/CustomDropdown";
|
|
19
|
+
import Ve from "@/views/custom-components/CustomSwitch";
|
|
20
|
+
import Ke from "@/views/custom-components/DebouncedSearchInput";
|
|
21
|
+
import x from "@/common/fontAwesomeIcons/FontAwesomeIcons";
|
|
22
|
+
import './ManageTranslation.css';const Ct = (e) => h.post("/translation/languages", e), Lt = (e) => h.put("/translation/languages", e), $e = () => h.get("/translation/languages"), St = (e) => h.post("/translation/apps", e), kt = (e) => h.post("/translation/apps", e), Oe = () => h.get("/translation/apps"), Tt = (e) => h.post("/translation/labels", e), It = (e) => h.post("/translation/map", e), Nt = (e) => h.post("/translation/mapUpdate", e), qe = (e, r, c) => {
|
|
23
|
+
const y = new URLSearchParams({
|
|
24
|
+
key: e,
|
|
25
|
+
isActive: r,
|
|
26
|
+
app: c
|
|
27
|
+
}).toString();
|
|
28
|
+
return h.put(`/translation/toggleActive?${y}`, { key: e, isActive: r, app: c });
|
|
29
|
+
}, Mt = (e, r) => h.get("/translation/translate", { params: { targetLangs: e, englishText: r } }), Ba = ({ children: e, isLoading: r }) => !K($) || !r ? e : /* @__PURE__ */ p("div", { className: "flex flex-col gap-6 w-full", children: [
|
|
30
|
+
/* @__PURE__ */ p("div", { className: "flex w-full flex-wrap items-start justify-between gap-4", children: [
|
|
31
|
+
/* @__PURE__ */ p("div", { className: "flex flex-col gap-2 w-full lg:w-2/5", children: [
|
|
32
|
+
/* @__PURE__ */ t("div", { className: "bg-gray-300 animate-pulse rounded-sm w-56 h-7" }),
|
|
33
|
+
/* @__PURE__ */ t("div", { className: "bg-gray-300 animate-pulse rounded-sm w-full max-w-140 h-4" })
|
|
34
|
+
] }),
|
|
35
|
+
/* @__PURE__ */ p("div", { className: "flex flex-wrap gap-2", children: [
|
|
36
|
+
/* @__PURE__ */ t("div", { className: "bg-gray-300 animate-pulse rounded-sm w-32 h-9" }),
|
|
37
|
+
/* @__PURE__ */ t("div", { className: "bg-gray-300 animate-pulse rounded-sm w-36 h-9" }),
|
|
38
|
+
/* @__PURE__ */ t("div", { className: "bg-gray-300 animate-pulse rounded-sm w-28 h-9" })
|
|
39
|
+
] })
|
|
40
|
+
] }),
|
|
41
|
+
/* @__PURE__ */ p("div", { className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-4 gap-4 w-full", children: [
|
|
42
|
+
/* @__PURE__ */ t("div", { className: "bg-gray-300 animate-pulse rounded-sm w-full h-10" }),
|
|
43
|
+
/* @__PURE__ */ t("div", { className: "bg-gray-300 animate-pulse rounded-sm w-full h-10" }),
|
|
44
|
+
/* @__PURE__ */ t("div", { className: "bg-gray-300 animate-pulse rounded-sm w-full h-10" }),
|
|
45
|
+
/* @__PURE__ */ t("div", { className: "bg-gray-300 animate-pulse rounded-sm w-full h-10" })
|
|
46
|
+
] }),
|
|
47
|
+
/* @__PURE__ */ t("div", { className: "bg-gray-300 animate-pulse rounded-sm w-full h-8" })
|
|
48
|
+
] });
|
|
49
|
+
Ba.propTypes = {
|
|
50
|
+
children: u.any,
|
|
51
|
+
isLoading: u.any
|
|
52
|
+
};
|
|
53
|
+
const Ge = ({ children: e, isLoading: r = !0 }) => !K($) || !r ? e : /* @__PURE__ */ t("div", { className: "flex flex-col gap-4 w-full", children: [1, 2, 3, 4].map((y) => /* @__PURE__ */ p(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
className: "flex flex-col sm:flex-row gap-2 sm:gap-4 w-full",
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ t("div", { className: "bg-gray-300 animate-pulse rounded-sm w-full sm:w-1/3 h-5" }),
|
|
59
|
+
/* @__PURE__ */ t("div", { className: "bg-gray-300 animate-pulse rounded-sm w-full h-10" })
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
y
|
|
63
|
+
)) });
|
|
64
|
+
Ge.propTypes = {
|
|
65
|
+
children: u.any,
|
|
66
|
+
isLoading: u.any
|
|
67
|
+
};
|
|
68
|
+
const He = ({ children: e, isLoading: r = !0 }) => !K($) || !r ? e : /* @__PURE__ */ t("div", { className: "bg-gray-300 animate-pulse rounded-sm h-[32px] w-[100px]" });
|
|
69
|
+
He.propTypes = {
|
|
70
|
+
children: u.any,
|
|
71
|
+
isLoading: u.any
|
|
72
|
+
};
|
|
73
|
+
const Ue = ({ children: e, isLoading: r = !0 }) => !K($) || !r ? e : /* @__PURE__ */ t("div", { className: "bg-gray-300 animate-pulse rounded-sm h-[32px] w-[120px]" });
|
|
74
|
+
Ue.propTypes = {
|
|
75
|
+
children: u.any,
|
|
76
|
+
isLoading: u.any
|
|
77
|
+
};
|
|
78
|
+
u.any, u.any;
|
|
79
|
+
const Xe = {
|
|
80
|
+
Active: { label: "Active", color: "success" },
|
|
81
|
+
Inactive: { label: "Inactive", color: "default" }
|
|
82
|
+
}, Pa = ({ state: e, translate: r = (c) => c }) => {
|
|
83
|
+
const c = Xe[e];
|
|
84
|
+
return c ? /* @__PURE__ */ t(
|
|
85
|
+
Fa,
|
|
86
|
+
{
|
|
87
|
+
size: "small",
|
|
88
|
+
label: r(c.label),
|
|
89
|
+
color: c.color,
|
|
90
|
+
variant: c.color === "default" ? "outlined" : "filled",
|
|
91
|
+
"data-testid": `translation-state-chip-${c.label.toLowerCase()}`
|
|
92
|
+
}
|
|
93
|
+
) : /* @__PURE__ */ t(Fa, { size: "small", variant: "outlined", label: "—" });
|
|
94
|
+
};
|
|
95
|
+
Pa.propTypes = {
|
|
96
|
+
state: u.string,
|
|
97
|
+
translate: u.func
|
|
98
|
+
};
|
|
99
|
+
const V = ({ icon: e, title: r, body: c, action: y, dataTestId: O }) => /* @__PURE__ */ p(
|
|
100
|
+
f,
|
|
101
|
+
{
|
|
102
|
+
"data-testid": O,
|
|
103
|
+
sx: {
|
|
104
|
+
display: "flex",
|
|
105
|
+
flexDirection: "column",
|
|
106
|
+
alignItems: "center",
|
|
107
|
+
justifyContent: "center",
|
|
108
|
+
textAlign: "center",
|
|
109
|
+
gap: 1,
|
|
110
|
+
px: 3,
|
|
111
|
+
py: 8
|
|
112
|
+
},
|
|
113
|
+
children: [
|
|
114
|
+
/* @__PURE__ */ t(f, { sx: { color: "text.disabled" }, children: /* @__PURE__ */ t(x, { iconName: e, size: "2x" }) }),
|
|
115
|
+
/* @__PURE__ */ t(L, { variant: "subtitle1", sx: { fontWeight: 700 }, children: r }),
|
|
116
|
+
c && /* @__PURE__ */ t(L, { variant: "body2", color: "text.secondary", sx: { maxWidth: 440 }, children: c }),
|
|
117
|
+
y
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
V.propTypes = {
|
|
122
|
+
icon: u.string,
|
|
123
|
+
title: u.node,
|
|
124
|
+
body: u.node,
|
|
125
|
+
action: u.node,
|
|
126
|
+
dataTestId: u.string
|
|
127
|
+
};
|
|
128
|
+
const Ye = ({ label: e, required: r = !1, hint: c, children: y }) => /* @__PURE__ */ p(
|
|
129
|
+
f,
|
|
130
|
+
{
|
|
131
|
+
sx: {
|
|
132
|
+
display: "flex",
|
|
133
|
+
flexDirection: { xs: "column", sm: "row" },
|
|
134
|
+
alignItems: { xs: "stretch", sm: "flex-start" },
|
|
135
|
+
gap: { xs: 0.5, sm: 2 },
|
|
136
|
+
width: "100%"
|
|
137
|
+
},
|
|
138
|
+
children: [
|
|
139
|
+
/* @__PURE__ */ p(
|
|
140
|
+
f,
|
|
141
|
+
{
|
|
142
|
+
sx: {
|
|
143
|
+
width: { xs: "100%", sm: "32%" },
|
|
144
|
+
flexShrink: 0,
|
|
145
|
+
pt: { xs: 0, sm: 1 }
|
|
146
|
+
},
|
|
147
|
+
children: [
|
|
148
|
+
/* @__PURE__ */ p(L, { variant: "body2", sx: { fontWeight: 600 }, component: "span", children: [
|
|
149
|
+
e,
|
|
150
|
+
r && /* @__PURE__ */ t(f, { component: "span", sx: { color: "error.main", ml: 0.5 }, children: "*" })
|
|
151
|
+
] }),
|
|
152
|
+
c && /* @__PURE__ */ t(L, { variant: "caption", color: "text.secondary", display: "block", children: c })
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
),
|
|
156
|
+
/* @__PURE__ */ t(f, { sx: { flexGrow: 1, minWidth: 0 }, children: y })
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
Ye.propTypes = {
|
|
161
|
+
label: u.node,
|
|
162
|
+
required: u.bool,
|
|
163
|
+
hint: u.node,
|
|
164
|
+
children: u.node
|
|
165
|
+
};
|
|
166
|
+
const Re = sa(() => import("./AppModal-CCtrQ5Tr.js")), Je = sa(() => import("./LanguagesModal-B3NTebYT.js")), Qe = sa(() => import("./AddLabelModal-Bq-wRqv9.js")), Ze = Array.from(
|
|
167
|
+
{ length: 26 },
|
|
168
|
+
(e, r) => String.fromCharCode(65 + r)
|
|
169
|
+
);
|
|
170
|
+
function at() {
|
|
171
|
+
const { translate: e } = Be(), r = _a(!1), [c, y] = i([]), [O, na] = i([]), [Va, la] = i(!1), [Ka, q] = i(null), [$a, G] = i(!1), [W, Oa] = i([]), [oa, ia] = i(!1), [ra, ca] = i(!1), [da, qa] = i(!0), [E, Ga] = i([]), [pa, _] = i(!1), [Ha, H] = i(null), [ua, ma] = i(""), [z, ga] = i(""), [S, fa] = i(""), [k, ha] = i(!1), [o, Ua] = i(null), Xa = _a(o);
|
|
172
|
+
ea(() => {
|
|
173
|
+
Xa.current = o;
|
|
174
|
+
}, [o]);
|
|
175
|
+
const [Ya, U] = i(!1), [d, Ra] = i({}), [Ja, ya] = i(!1), [Qa, ba] = i(null), [X, Y] = i(!1), [Za, xa] = i(!1), [T, ae] = i(!1), [ee, R] = i(!1), [te, se] = i([]), { control: D, reset: va } = Ee({
|
|
176
|
+
defaultValues: { appId: "", namespaces: [] }
|
|
177
|
+
}), I = Da({ control: D, name: "appId" }) || "", Aa = Da({
|
|
178
|
+
control: D,
|
|
179
|
+
name: "namespaces"
|
|
180
|
+
}), v = B(
|
|
181
|
+
() => Aa || [],
|
|
182
|
+
[Aa]
|
|
183
|
+
), ne = async () => {
|
|
184
|
+
var a;
|
|
185
|
+
try {
|
|
186
|
+
const s = await Me({
|
|
187
|
+
code: "get_distinct_namespce",
|
|
188
|
+
parameters: {}
|
|
189
|
+
});
|
|
190
|
+
se((a = s == null ? void 0 : s.data) == null ? void 0 : a.result);
|
|
191
|
+
} catch (s) {
|
|
192
|
+
console.error(s);
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
ea(() => {
|
|
196
|
+
le(), ne();
|
|
197
|
+
}, []);
|
|
198
|
+
const le = async () => {
|
|
199
|
+
try {
|
|
200
|
+
await J();
|
|
201
|
+
const { data: a } = await we(
|
|
202
|
+
"techo.manage.manageTranslation"
|
|
203
|
+
);
|
|
204
|
+
Ua(JSON.parse(a));
|
|
205
|
+
} catch (a) {
|
|
206
|
+
console.error(a), b({
|
|
207
|
+
message: "Could not load translations. Please try again.",
|
|
208
|
+
type: "error"
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
}, J = async () => {
|
|
212
|
+
var a, s;
|
|
213
|
+
try {
|
|
214
|
+
let l = await Oe();
|
|
215
|
+
const g = (a = l == null ? void 0 : l.data) == null ? void 0 : a.filter((m) => m.isActive === !0);
|
|
216
|
+
y(g), l = await $e();
|
|
217
|
+
const n = (s = l == null ? void 0 : l.data) == null ? void 0 : s.filter((m) => m.active === !0);
|
|
218
|
+
Ga(n);
|
|
219
|
+
} catch (l) {
|
|
220
|
+
console.error(l), b({
|
|
221
|
+
message: "Could not load apps and languages. Please try again.",
|
|
222
|
+
type: "error"
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
}, Ca = za((a) => {
|
|
226
|
+
ma(a);
|
|
227
|
+
const s = (a.match(/{/g) || []).length, l = (a.match(/}/g) || []).length;
|
|
228
|
+
s > l || ga(a);
|
|
229
|
+
}, []), oe = (a) => {
|
|
230
|
+
fa(a);
|
|
231
|
+
}, ie = B(
|
|
232
|
+
() => [
|
|
233
|
+
{ field: "Sr. No.", label: "Sr.No", align: "left", minWidth: 80 },
|
|
234
|
+
{ field: "Actions", label: e("Actions"), minWidth: 120 },
|
|
235
|
+
{ field: "key", label: e("Key"), align: "left", minWidth: 260 },
|
|
236
|
+
{ field: "app", label: e("App"), align: "left", minWidth: 130 },
|
|
237
|
+
{
|
|
238
|
+
field: "state",
|
|
239
|
+
label: e("State"),
|
|
240
|
+
align: "left",
|
|
241
|
+
minWidth: 110,
|
|
242
|
+
render: (a) => /* @__PURE__ */ t(Pa, { state: a == null ? void 0 : a.state, translate: e })
|
|
243
|
+
},
|
|
244
|
+
...(E || []).map((a) => {
|
|
245
|
+
var s;
|
|
246
|
+
return {
|
|
247
|
+
field: (s = a == null ? void 0 : a.languageValue) == null ? void 0 : s.toLowerCase(),
|
|
248
|
+
label: a == null ? void 0 : a.languageValue,
|
|
249
|
+
align: "left",
|
|
250
|
+
minWidth: 220
|
|
251
|
+
};
|
|
252
|
+
})
|
|
253
|
+
],
|
|
254
|
+
[E, e]
|
|
255
|
+
), La = (d == null ? void 0 : d.state) === "Active", re = La ? "Mark as Inactive" : "Mark as Active", ce = La ? `"${d == null ? void 0 : d.key}" will stop showing in ${d == null ? void 0 : d.app} for every language. You can turn it back on from this screen.` : `"${d == null ? void 0 : d.key}" will start showing in ${d == null ? void 0 : d.app} again for every language.`, de = (a) => {
|
|
256
|
+
a && Ra(a), U((s) => !s);
|
|
257
|
+
}, pe = async (a) => {
|
|
258
|
+
try {
|
|
259
|
+
q({ key: a == null ? void 0 : a.key }), xa(!0), _((s) => !s);
|
|
260
|
+
} catch (s) {
|
|
261
|
+
console.error(s), b({
|
|
262
|
+
message: "Could not open the namespace form. Please try again.",
|
|
263
|
+
type: "error"
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
}, ue = async (a) => {
|
|
267
|
+
var s, l, g, n;
|
|
268
|
+
try {
|
|
269
|
+
let Le = {
|
|
270
|
+
code: "labels_selected_apps_for_editing",
|
|
271
|
+
parameters: { key: (s = a == null ? void 0 : a.key) == null ? void 0 : s.replace(/'/g, "''") }
|
|
272
|
+
};
|
|
273
|
+
const N = await P(Le);
|
|
274
|
+
let Se = (l = N == null ? void 0 : N.data) == null ? void 0 : l.result;
|
|
275
|
+
H((g = N == null ? void 0 : N.data) == null ? void 0 : g.result);
|
|
276
|
+
let ke = {
|
|
277
|
+
code: "labels_app_data_for_prepopulating",
|
|
278
|
+
parameters: {
|
|
279
|
+
key: a == null ? void 0 : a.key,
|
|
280
|
+
appValue: a == null ? void 0 : a.app
|
|
281
|
+
}
|
|
282
|
+
}, Te = Se.map((A) => A.app), wa = c.filter((A) => Te.indexOf(A.id) === -1);
|
|
283
|
+
if (wa.length > 0) {
|
|
284
|
+
const A = await P(ke);
|
|
285
|
+
q((n = A == null ? void 0 : A.data) == null ? void 0 : n.result), na(wa), la(!0), _((Ie) => !Ie);
|
|
286
|
+
} else
|
|
287
|
+
b({
|
|
288
|
+
message: "This label is already in every app.",
|
|
289
|
+
type: "info"
|
|
290
|
+
});
|
|
291
|
+
} catch (m) {
|
|
292
|
+
console.error(m), b({
|
|
293
|
+
message: "Could not open the app form. Please try again.",
|
|
294
|
+
type: "error"
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
}, me = async () => {
|
|
298
|
+
try {
|
|
299
|
+
let a = (d == null ? void 0 : d.state) === "Active";
|
|
300
|
+
await qe(d == null ? void 0 : d.key, !a, d == null ? void 0 : d.appId), j(), U((s) => !s), b({
|
|
301
|
+
message: a ? "Label marked inactive" : "Label marked active",
|
|
302
|
+
type: "success"
|
|
303
|
+
});
|
|
304
|
+
} catch (a) {
|
|
305
|
+
console.error(a), b({
|
|
306
|
+
message: "Could not change the label state. Please try again.",
|
|
307
|
+
type: "error"
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
}, ge = async (a) => {
|
|
311
|
+
var s;
|
|
312
|
+
try {
|
|
313
|
+
G(!0), _((m) => !m), ya((m) => !m);
|
|
314
|
+
let l = a == null ? void 0 : a.key.replace(/'/g, "''");
|
|
315
|
+
ba(l);
|
|
316
|
+
const n = await P({
|
|
317
|
+
code: "labels_selected_apps_for_editing",
|
|
318
|
+
parameters: { key: l }
|
|
319
|
+
});
|
|
320
|
+
H((s = n == null ? void 0 : n.data) == null ? void 0 : s.result), G(!1);
|
|
321
|
+
} catch (l) {
|
|
322
|
+
console.error(l), b({
|
|
323
|
+
message: "Could not open this label for editing. Please try again.",
|
|
324
|
+
type: "error"
|
|
325
|
+
}), G(!1);
|
|
326
|
+
}
|
|
327
|
+
}, fe = (a) => (a == null ? void 0 : a.state) !== "Inactive", he = za(
|
|
328
|
+
(a) => {
|
|
329
|
+
const s = [];
|
|
330
|
+
w.hasCheckRights(o == null ? void 0 : o["update.manage.manageTranslation"]) && s.push({
|
|
331
|
+
label: "",
|
|
332
|
+
icon: /* @__PURE__ */ t(x, { iconName: "faPen" }),
|
|
333
|
+
onClick: ge,
|
|
334
|
+
condition: fe,
|
|
335
|
+
ariaLabel: e("Edit label"),
|
|
336
|
+
dataTestId: "manage-translation-edit-icon"
|
|
337
|
+
});
|
|
338
|
+
const l = [];
|
|
339
|
+
return w.hasCheckRights(o == null ? void 0 : o["update.manage.manageTranslation"]) && l.push({
|
|
340
|
+
label: e(
|
|
341
|
+
(a == null ? void 0 : a.state) === "Active" ? "Mark as Inactive" : "Mark as Active"
|
|
342
|
+
),
|
|
343
|
+
onClick: de
|
|
344
|
+
}), w.hasCheckRights(o == null ? void 0 : o["create.manage.manageTranslation"]) && (l.push({ label: e("Add app"), onClick: ue }), l.push({ label: e("Add Namespace"), onClick: pe })), l.length > 0 && s.push({
|
|
345
|
+
label: "",
|
|
346
|
+
icon: /* @__PURE__ */ t(x, { iconName: "faBars" }),
|
|
347
|
+
ariaLabel: e("More label actions"),
|
|
348
|
+
dataTestId: "manage-translation-menu-icon",
|
|
349
|
+
menuItems: l
|
|
350
|
+
}), s;
|
|
351
|
+
},
|
|
352
|
+
[o, e]
|
|
353
|
+
), ye = () => {
|
|
354
|
+
ia((a) => !a);
|
|
355
|
+
}, be = () => {
|
|
356
|
+
ca((a) => !a);
|
|
357
|
+
}, Sa = () => {
|
|
358
|
+
_((a) => !a), na(c);
|
|
359
|
+
}, Q = (a) => a == null ? a : a.replace(/'/g, "''"), xe = async (a, s) => {
|
|
360
|
+
var l;
|
|
361
|
+
try {
|
|
362
|
+
s && !T ? (r.current = !0, Y(!0)) : s && T && R(!0);
|
|
363
|
+
let g = {
|
|
364
|
+
code: "fetch_labels_translation_translation_master",
|
|
365
|
+
parameters: {
|
|
366
|
+
appId: I || null,
|
|
367
|
+
searchString: Q(z || ""),
|
|
368
|
+
startsWith: Q(S || ""),
|
|
369
|
+
namespaceArray: v.length > 0 ? v.map((m) => Q(m)).join(",") : "",
|
|
370
|
+
showInactive: k || !1,
|
|
371
|
+
limit: (a == null ? void 0 : a.limit) || 100,
|
|
372
|
+
offset: (a == null ? void 0 : a.offset) || 0
|
|
373
|
+
}
|
|
374
|
+
};
|
|
375
|
+
const n = await P(g);
|
|
376
|
+
return (l = n == null ? void 0 : n.data) == null ? void 0 : l.result;
|
|
377
|
+
} catch (g) {
|
|
378
|
+
r.current = !1, console.error(g), R(!1), Y(!1), b({
|
|
379
|
+
message: "Could not load labels. Please try again.",
|
|
380
|
+
type: "error"
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
}, ka = B(() => z === "" && S === "" && k === !1 && I === "" && v.length === 0, [z, S, k, I, v]), ve = B(
|
|
384
|
+
() => [
|
|
385
|
+
"translation",
|
|
386
|
+
I,
|
|
387
|
+
z,
|
|
388
|
+
S,
|
|
389
|
+
k,
|
|
390
|
+
v
|
|
391
|
+
],
|
|
392
|
+
[I, z, S, k, v]
|
|
393
|
+
), {
|
|
394
|
+
data: F,
|
|
395
|
+
fetchNextPage: Ae,
|
|
396
|
+
hasNextPage: Ce,
|
|
397
|
+
refetch: j
|
|
398
|
+
} = De({
|
|
399
|
+
key: ve,
|
|
400
|
+
queryFn: ({ pageParam: a }) => {
|
|
401
|
+
const s = !T, g = (!(a != null && a.offset) || (a == null ? void 0 : a.offset) === 0) && s;
|
|
402
|
+
return xe(a, g);
|
|
403
|
+
},
|
|
404
|
+
limit: 100
|
|
405
|
+
});
|
|
406
|
+
ea(() => {
|
|
407
|
+
var a;
|
|
408
|
+
if (F) {
|
|
409
|
+
let s = ((a = F == null ? void 0 : F.pages) == null ? void 0 : a.flat()) || [];
|
|
410
|
+
const l = Object.values(
|
|
411
|
+
s == null ? void 0 : s.reduce((g, n) => {
|
|
412
|
+
const m = (n == null ? void 0 : n.key) + "-" + (n == null ? void 0 : n.app);
|
|
413
|
+
return g[m] || (g[m] = {
|
|
414
|
+
rowKey: m,
|
|
415
|
+
appId: n == null ? void 0 : n.appid,
|
|
416
|
+
key: n == null ? void 0 : n.key,
|
|
417
|
+
app: n == null ? void 0 : n.app,
|
|
418
|
+
state: n != null && n.is_active ? "Active" : "Inactive"
|
|
419
|
+
}), g[m][n == null ? void 0 : n.language.toLowerCase()] = n == null ? void 0 : n.value, n != null && n.is_active && (g[m].state = "Active"), g;
|
|
420
|
+
}, {})
|
|
421
|
+
);
|
|
422
|
+
qa(Ce), Oa(l), r.current && (T ? R(!1) : (Y(!1), ae(!0)), r.current = !1);
|
|
423
|
+
}
|
|
424
|
+
}, [F]);
|
|
425
|
+
const Ta = () => {
|
|
426
|
+
ma(""), ga(""), fa(""), ha(!1), va({ appId: "", namespaces: [] });
|
|
427
|
+
}, Ia = w.hasCheckRights(
|
|
428
|
+
o == null ? void 0 : o["create.manage.manageTranslation"]
|
|
429
|
+
), Na = w.hasCheckRights(
|
|
430
|
+
o == null ? void 0 : o["create.manage.manageTranslation"],
|
|
431
|
+
o == null ? void 0 : o.canManage
|
|
432
|
+
), Z = !X && o !== null && !w.hasCheckRights(o == null ? void 0 : o["view.manage.manageTranslation"]), aa = X || ee, Ma = (W == null ? void 0 : W.length) > 0;
|
|
433
|
+
return /* @__PURE__ */ p(C, { container: !0, mt: 3, spacing: 2, children: [
|
|
434
|
+
/* @__PURE__ */ t(ta, { children: oa && /* @__PURE__ */ t(
|
|
435
|
+
Re,
|
|
436
|
+
{
|
|
437
|
+
open: oa,
|
|
438
|
+
handleClose: () => ia((a) => !a),
|
|
439
|
+
languages: E,
|
|
440
|
+
refresh: J,
|
|
441
|
+
refetch: j,
|
|
442
|
+
selectedApp: I,
|
|
443
|
+
setSelectedApp: () => va({ appId: "", namespaces: v })
|
|
444
|
+
}
|
|
445
|
+
) }),
|
|
446
|
+
/* @__PURE__ */ t(ta, { children: ra && /* @__PURE__ */ t(
|
|
447
|
+
Je,
|
|
448
|
+
{
|
|
449
|
+
open: ra,
|
|
450
|
+
handleClose: () => {
|
|
451
|
+
ca((a) => !a);
|
|
452
|
+
},
|
|
453
|
+
refresh: J,
|
|
454
|
+
refetch: j
|
|
455
|
+
}
|
|
456
|
+
) }),
|
|
457
|
+
/* @__PURE__ */ t(ta, { children: pa && /* @__PURE__ */ t(
|
|
458
|
+
Qe,
|
|
459
|
+
{
|
|
460
|
+
open: pa,
|
|
461
|
+
handleClose: () => {
|
|
462
|
+
_((a) => !a), la(!1), xa(!1), H(null), q(null), ya(!1), ba(null);
|
|
463
|
+
},
|
|
464
|
+
apps: O,
|
|
465
|
+
addAppFlag: Va,
|
|
466
|
+
addNameSpaceFlag: Za,
|
|
467
|
+
languageList: E,
|
|
468
|
+
editLabel: Ha,
|
|
469
|
+
fieldsData: Ka,
|
|
470
|
+
editLabelFlag: Ja,
|
|
471
|
+
labelKey: Qa,
|
|
472
|
+
refetch: j,
|
|
473
|
+
isLoading: $a
|
|
474
|
+
}
|
|
475
|
+
) }),
|
|
476
|
+
/* @__PURE__ */ t(
|
|
477
|
+
je,
|
|
478
|
+
{
|
|
479
|
+
description: ce,
|
|
480
|
+
title: e(re),
|
|
481
|
+
handleClick: me,
|
|
482
|
+
open: Ya,
|
|
483
|
+
handleClose: () => {
|
|
484
|
+
U((a) => !a);
|
|
485
|
+
},
|
|
486
|
+
"data-testid": "manageTranslation-modal-customconfirmation"
|
|
487
|
+
}
|
|
488
|
+
),
|
|
489
|
+
/* @__PURE__ */ t(C, { size: { xs: 12 }, children: /* @__PURE__ */ t(
|
|
490
|
+
_e,
|
|
491
|
+
{
|
|
492
|
+
elevation: 0,
|
|
493
|
+
sx: {
|
|
494
|
+
p: { xs: 2.5, md: 3 },
|
|
495
|
+
mb: 3,
|
|
496
|
+
border: "1px solid",
|
|
497
|
+
borderColor: "divider",
|
|
498
|
+
borderRadius: (a) => `${a.shape.cardRadius}px`,
|
|
499
|
+
backgroundColor: "background.paper"
|
|
500
|
+
},
|
|
501
|
+
children: /* @__PURE__ */ p(f, { sx: { display: "flex", flexDirection: "column", gap: 3 }, children: [
|
|
502
|
+
/* @__PURE__ */ p(Ba, { isLoading: X, children: [
|
|
503
|
+
/* @__PURE__ */ p(
|
|
504
|
+
f,
|
|
505
|
+
{
|
|
506
|
+
sx: {
|
|
507
|
+
display: "flex",
|
|
508
|
+
justifyContent: "space-between",
|
|
509
|
+
alignItems: "flex-start",
|
|
510
|
+
flexWrap: "wrap",
|
|
511
|
+
gap: 2
|
|
512
|
+
},
|
|
513
|
+
children: [
|
|
514
|
+
/* @__PURE__ */ p(f, { sx: { minWidth: { xs: "100%", lg: "40%" } }, children: [
|
|
515
|
+
/* @__PURE__ */ t(
|
|
516
|
+
L,
|
|
517
|
+
{
|
|
518
|
+
variant: "h5",
|
|
519
|
+
component: "h1",
|
|
520
|
+
sx: { fontWeight: 800, color: "text.primary", mb: 0.5 },
|
|
521
|
+
children: e("Translations")
|
|
522
|
+
}
|
|
523
|
+
),
|
|
524
|
+
/* @__PURE__ */ t(L, { variant: "body2", color: "text.secondary", children: e(
|
|
525
|
+
"Every label the apps display, in every language. Edit a translation here and the apps using that label pick it up."
|
|
526
|
+
) })
|
|
527
|
+
] }),
|
|
528
|
+
!Z && /* @__PURE__ */ p(
|
|
529
|
+
f,
|
|
530
|
+
{
|
|
531
|
+
sx: {
|
|
532
|
+
display: "flex",
|
|
533
|
+
alignItems: "center",
|
|
534
|
+
gap: 1.5,
|
|
535
|
+
flexWrap: "wrap"
|
|
536
|
+
},
|
|
537
|
+
children: [
|
|
538
|
+
Na && /* @__PURE__ */ t(
|
|
539
|
+
M,
|
|
540
|
+
{
|
|
541
|
+
size: "small",
|
|
542
|
+
variant: "outlined",
|
|
543
|
+
"data-testid": "manageTranslation-manage-apps-button",
|
|
544
|
+
color: "primary",
|
|
545
|
+
onClick: ye,
|
|
546
|
+
children: e("Manage Apps")
|
|
547
|
+
}
|
|
548
|
+
),
|
|
549
|
+
Na && /* @__PURE__ */ t(
|
|
550
|
+
M,
|
|
551
|
+
{
|
|
552
|
+
size: "small",
|
|
553
|
+
variant: "outlined",
|
|
554
|
+
color: "primary",
|
|
555
|
+
"data-testid": "managetranslation-manage-language-button",
|
|
556
|
+
onClick: be,
|
|
557
|
+
children: e("Manage Language")
|
|
558
|
+
}
|
|
559
|
+
),
|
|
560
|
+
Ia && /* @__PURE__ */ t(
|
|
561
|
+
M,
|
|
562
|
+
{
|
|
563
|
+
size: "small",
|
|
564
|
+
variant: "contained",
|
|
565
|
+
"data-testid": "manageTranalation-add-label-button",
|
|
566
|
+
startIcon: /* @__PURE__ */ t(x, { iconName: "faPlus" }),
|
|
567
|
+
onClick: Sa,
|
|
568
|
+
children: e("Add Label")
|
|
569
|
+
}
|
|
570
|
+
)
|
|
571
|
+
]
|
|
572
|
+
}
|
|
573
|
+
)
|
|
574
|
+
]
|
|
575
|
+
}
|
|
576
|
+
),
|
|
577
|
+
!Z && /* @__PURE__ */ p(Ne, { children: [
|
|
578
|
+
/* @__PURE__ */ p(C, { container: !0, spacing: 2, alignItems: "flex-start", children: [
|
|
579
|
+
/* @__PURE__ */ t(C, { size: { xs: 12, sm: 6, md: 3 }, children: /* @__PURE__ */ t(
|
|
580
|
+
ja,
|
|
581
|
+
{
|
|
582
|
+
control: D,
|
|
583
|
+
name: "appId",
|
|
584
|
+
label: e("App"),
|
|
585
|
+
options: c || [],
|
|
586
|
+
displayName: "appValue",
|
|
587
|
+
optionValue: "id",
|
|
588
|
+
isNullSelectDisabled: !1,
|
|
589
|
+
placeholder: e("All apps"),
|
|
590
|
+
dataTestId: "managetranslation-app-dropdown"
|
|
591
|
+
}
|
|
592
|
+
) }),
|
|
593
|
+
/* @__PURE__ */ t(C, { size: { xs: 12, sm: 6, md: 3 }, children: /* @__PURE__ */ t(
|
|
594
|
+
ja,
|
|
595
|
+
{
|
|
596
|
+
control: D,
|
|
597
|
+
name: "namespaces",
|
|
598
|
+
label: e("Name Spaces"),
|
|
599
|
+
options: te || [],
|
|
600
|
+
displayName: "label",
|
|
601
|
+
optionValue: "value",
|
|
602
|
+
multiple: !0,
|
|
603
|
+
dataTestId: "autocomplete-namespace"
|
|
604
|
+
}
|
|
605
|
+
) }),
|
|
606
|
+
/* @__PURE__ */ t(C, { size: { xs: 12, sm: 6, md: 3 }, children: /* @__PURE__ */ t(
|
|
607
|
+
Ke,
|
|
608
|
+
{
|
|
609
|
+
value: ua,
|
|
610
|
+
onChange: Ca,
|
|
611
|
+
placeholder: e("Search labels"),
|
|
612
|
+
label: e("Search For"),
|
|
613
|
+
autoFocus: !1,
|
|
614
|
+
fullWidth: !0,
|
|
615
|
+
size: "small",
|
|
616
|
+
"data-testid": "managetranslation-search-textfield",
|
|
617
|
+
slotProps: {
|
|
618
|
+
htmlInput: {
|
|
619
|
+
"aria-label": e("Search labels")
|
|
620
|
+
},
|
|
621
|
+
// The search icon adornment would otherwise sit
|
|
622
|
+
// under the resting label.
|
|
623
|
+
inputLabel: { shrink: !0 }
|
|
624
|
+
},
|
|
625
|
+
inputProps: {
|
|
626
|
+
startAdornment: /* @__PURE__ */ t(Wa, { position: "start", children: /* @__PURE__ */ t(
|
|
627
|
+
f,
|
|
628
|
+
{
|
|
629
|
+
sx: { color: "text.disabled", display: "flex" },
|
|
630
|
+
children: /* @__PURE__ */ t(
|
|
631
|
+
x,
|
|
632
|
+
{
|
|
633
|
+
iconName: "faMagnifyingGlass",
|
|
634
|
+
size: "sm"
|
|
635
|
+
}
|
|
636
|
+
)
|
|
637
|
+
}
|
|
638
|
+
) }),
|
|
639
|
+
endAdornment: ua ? /* @__PURE__ */ t(Wa, { position: "end", children: /* @__PURE__ */ t(
|
|
640
|
+
ze,
|
|
641
|
+
{
|
|
642
|
+
size: "small",
|
|
643
|
+
"aria-label": e("Clear search"),
|
|
644
|
+
onClick: () => Ca(""),
|
|
645
|
+
children: /* @__PURE__ */ t(x, { iconName: "faXmark", size: "sm" })
|
|
646
|
+
}
|
|
647
|
+
) }) : null
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
) }),
|
|
651
|
+
/* @__PURE__ */ p(
|
|
652
|
+
C,
|
|
653
|
+
{
|
|
654
|
+
size: { xs: 12, sm: 6, md: 3 },
|
|
655
|
+
sx: {
|
|
656
|
+
display: "flex",
|
|
657
|
+
alignItems: "center",
|
|
658
|
+
justifyContent: { xs: "flex-start", md: "flex-end" },
|
|
659
|
+
gap: 1,
|
|
660
|
+
flexWrap: "wrap",
|
|
661
|
+
minHeight: 40
|
|
662
|
+
},
|
|
663
|
+
children: [
|
|
664
|
+
/* @__PURE__ */ t(
|
|
665
|
+
Fe,
|
|
666
|
+
{
|
|
667
|
+
className: "translation-inactive",
|
|
668
|
+
control: /* @__PURE__ */ t(
|
|
669
|
+
Ve,
|
|
670
|
+
{
|
|
671
|
+
checked: k,
|
|
672
|
+
onChange: (a) => ha(a.target.checked),
|
|
673
|
+
inputProps: {
|
|
674
|
+
"aria-label": e("Show Inactive")
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
),
|
|
678
|
+
label: e("Show Inactive"),
|
|
679
|
+
labelPlacement: "end"
|
|
680
|
+
}
|
|
681
|
+
),
|
|
682
|
+
/* @__PURE__ */ t(
|
|
683
|
+
M,
|
|
684
|
+
{
|
|
685
|
+
size: "small",
|
|
686
|
+
variant: "text",
|
|
687
|
+
disabled: ka,
|
|
688
|
+
startIcon: /* @__PURE__ */ t(x, { iconName: "faXmark", size: "sm" }),
|
|
689
|
+
onClick: Ta,
|
|
690
|
+
"data-testid": "managetranslation-clear-filters",
|
|
691
|
+
children: e("Clear filters")
|
|
692
|
+
}
|
|
693
|
+
)
|
|
694
|
+
]
|
|
695
|
+
}
|
|
696
|
+
)
|
|
697
|
+
] }),
|
|
698
|
+
/* @__PURE__ */ p(f, { children: [
|
|
699
|
+
/* @__PURE__ */ t(
|
|
700
|
+
L,
|
|
701
|
+
{
|
|
702
|
+
variant: "caption",
|
|
703
|
+
color: "text.secondary",
|
|
704
|
+
sx: { display: "block", mb: 0.5 },
|
|
705
|
+
children: e("Starts With")
|
|
706
|
+
}
|
|
707
|
+
),
|
|
708
|
+
/* @__PURE__ */ t(f, { sx: { overflowX: "auto", pb: 0.5 }, children: /* @__PURE__ */ p(
|
|
709
|
+
We,
|
|
710
|
+
{
|
|
711
|
+
exclusive: !0,
|
|
712
|
+
size: "small",
|
|
713
|
+
value: S,
|
|
714
|
+
onChange: (a, s) => oe(s ?? ""),
|
|
715
|
+
"aria-label": e("Starts With"),
|
|
716
|
+
sx: { flexWrap: "nowrap" },
|
|
717
|
+
children: [
|
|
718
|
+
/* @__PURE__ */ t(
|
|
719
|
+
Ea,
|
|
720
|
+
{
|
|
721
|
+
value: "",
|
|
722
|
+
"aria-label": e("All letters"),
|
|
723
|
+
sx: { px: 1.5 },
|
|
724
|
+
children: e("All")
|
|
725
|
+
}
|
|
726
|
+
),
|
|
727
|
+
Ze.map((a) => /* @__PURE__ */ t(
|
|
728
|
+
Ea,
|
|
729
|
+
{
|
|
730
|
+
value: a,
|
|
731
|
+
"aria-label": a,
|
|
732
|
+
sx: { px: 1.25 },
|
|
733
|
+
children: a
|
|
734
|
+
},
|
|
735
|
+
a
|
|
736
|
+
))
|
|
737
|
+
]
|
|
738
|
+
}
|
|
739
|
+
) })
|
|
740
|
+
] })
|
|
741
|
+
] })
|
|
742
|
+
] }),
|
|
743
|
+
Z ? /* @__PURE__ */ t(
|
|
744
|
+
V,
|
|
745
|
+
{
|
|
746
|
+
icon: "faLock",
|
|
747
|
+
title: e("You don't have access to Translations"),
|
|
748
|
+
body: e(
|
|
749
|
+
"Your role doesn't include permission to view translations. Ask an administrator to grant the view right for this module."
|
|
750
|
+
),
|
|
751
|
+
dataTestId: "no-permission-message"
|
|
752
|
+
}
|
|
753
|
+
) : T && !aa && !Ma && !ka ? /* @__PURE__ */ t(
|
|
754
|
+
V,
|
|
755
|
+
{
|
|
756
|
+
icon: "faMagnifyingGlass",
|
|
757
|
+
title: e("No labels match these filters"),
|
|
758
|
+
body: e(
|
|
759
|
+
"Try a shorter search term, another app or namespace, or turn on Show Inactive to include labels that are switched off."
|
|
760
|
+
),
|
|
761
|
+
action: /* @__PURE__ */ t(M, { variant: "text", size: "small", onClick: Ta, children: e("Clear filters") }),
|
|
762
|
+
dataTestId: "managetranslation-no-results"
|
|
763
|
+
}
|
|
764
|
+
) : T && !aa && !Ma ? /* @__PURE__ */ t(
|
|
765
|
+
V,
|
|
766
|
+
{
|
|
767
|
+
icon: "faLanguage",
|
|
768
|
+
title: e("No labels yet"),
|
|
769
|
+
body: e(
|
|
770
|
+
"Add a label to give every app the text it displays, in each active language."
|
|
771
|
+
),
|
|
772
|
+
action: Ia ? /* @__PURE__ */ t(
|
|
773
|
+
M,
|
|
774
|
+
{
|
|
775
|
+
variant: "contained",
|
|
776
|
+
size: "small",
|
|
777
|
+
startIcon: /* @__PURE__ */ t(x, { iconName: "faPlus" }),
|
|
778
|
+
onClick: Sa,
|
|
779
|
+
children: e("Add Label")
|
|
780
|
+
}
|
|
781
|
+
) : null,
|
|
782
|
+
dataTestId: "managetranslation-no-labels"
|
|
783
|
+
}
|
|
784
|
+
) : /* @__PURE__ */ t(
|
|
785
|
+
Pe,
|
|
786
|
+
{
|
|
787
|
+
columns: ie,
|
|
788
|
+
tableData: W,
|
|
789
|
+
actions: he,
|
|
790
|
+
paginationConfig: {
|
|
791
|
+
pagination: !0,
|
|
792
|
+
paginationType: "infinite-scroll",
|
|
793
|
+
loadMore: () => da && Ae({ cancelRefetch: !1 }),
|
|
794
|
+
hasMore: da
|
|
795
|
+
},
|
|
796
|
+
dataTestId: "manageTranslation-table",
|
|
797
|
+
isLoading: aa,
|
|
798
|
+
showScrollArrows: !0,
|
|
799
|
+
rowUniqueKey: "rowKey",
|
|
800
|
+
disableHtml: !0,
|
|
801
|
+
showFullContent: !1,
|
|
802
|
+
styleConfig: { tableStyle: { maxHeight: 180 } }
|
|
803
|
+
}
|
|
804
|
+
)
|
|
805
|
+
] })
|
|
806
|
+
}
|
|
807
|
+
) })
|
|
808
|
+
] });
|
|
809
|
+
}
|
|
810
|
+
const wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
811
|
+
__proto__: null,
|
|
812
|
+
default: at
|
|
813
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
814
|
+
export {
|
|
815
|
+
He as A,
|
|
816
|
+
V as E,
|
|
817
|
+
Ue as L,
|
|
818
|
+
Ye as M,
|
|
819
|
+
Pa as S,
|
|
820
|
+
$e as a,
|
|
821
|
+
Lt as b,
|
|
822
|
+
St as c,
|
|
823
|
+
Ct as d,
|
|
824
|
+
Ge as e,
|
|
825
|
+
Tt as f,
|
|
826
|
+
Oe as g,
|
|
827
|
+
It as h,
|
|
828
|
+
Nt as i,
|
|
829
|
+
wt as j,
|
|
830
|
+
Mt as t,
|
|
831
|
+
kt as u
|
|
832
|
+
};
|
|
833
|
+
//# sourceMappingURL=ManageTranslation-vRiptUAP.js.map
|