@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,631 @@
|
|
|
1
|
+
import { jsxs as A, jsx as r, Fragment as Re } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as re, useState as q, useCallback as Be, useMemo as oe, useEffect as ae } from "react";
|
|
3
|
+
import g from "prop-types";
|
|
4
|
+
import { useForm as We } from "react-hook-form";
|
|
5
|
+
import { yupResolver as Ke } from "@hookform/resolvers/yup";
|
|
6
|
+
import * as f from "yup";
|
|
7
|
+
import { Dialog as Le, DialogTitle as Qe, Box as v, Typography as ie, IconButton as Ge, DialogContent as He, DialogActions as Ue, Button as ce } from "@mui/material";
|
|
8
|
+
import L from "@/views/custom-components/CustomTextField";
|
|
9
|
+
import { showToast as k } from "@/common/toaster/toaster";
|
|
10
|
+
import { t as Xe, e as Je, M as I, f as U, h as Ye, i as Ze } from "./ManageTranslation-vRiptUAP.js";
|
|
11
|
+
import { executeQuery as ue, execute as Q } from "@/common/services/GlobalApis";
|
|
12
|
+
import De from "@/views/custom-components/CustomAutoComplete";
|
|
13
|
+
import Fe from "@/hooks/useTrackEvent";
|
|
14
|
+
import { useTranslateProvider as et } from "@/common/languageTranslator/TranslationContext";
|
|
15
|
+
import tt from "@/views/custom-components/SegmentedTabs";
|
|
16
|
+
import st from "@/common/fontAwesomeIcons/FontAwesomeIcons";
|
|
17
|
+
import lt from "@/views/custom-components/CustomDropdown";
|
|
18
|
+
const de = "add-label-tabpanel", nt = ({
|
|
19
|
+
open: pe,
|
|
20
|
+
handleClose: me,
|
|
21
|
+
apps: he,
|
|
22
|
+
languageList: E = [],
|
|
23
|
+
addAppFlag: C = !1,
|
|
24
|
+
fieldsData: u,
|
|
25
|
+
refetch: M,
|
|
26
|
+
addNameSpaceFlag: T = !1,
|
|
27
|
+
editLabelFlag: _ = !1,
|
|
28
|
+
labelKey: X = null,
|
|
29
|
+
isLoading: be = !1
|
|
30
|
+
}) => {
|
|
31
|
+
var se, le;
|
|
32
|
+
const O = (se = E == null ? void 0 : E.find(
|
|
33
|
+
(e) => e.languageValue === "English"
|
|
34
|
+
)) == null ? void 0 : se.id, J = re(null), N = re(!1), G = Fe(), [j, Y] = q([]), [y, Z] = q([]), [fe, ye] = q([]), [P, ge] = q([]), [R, D] = q(null), [ve, xe] = q([]), { translate: p } = et(), ke = (e, t) => {
|
|
35
|
+
D(t);
|
|
36
|
+
};
|
|
37
|
+
let z;
|
|
38
|
+
if (C) {
|
|
39
|
+
const e = u == null ? void 0 : u.reduce((t, s) => (t[`${s.languagevalue}`] = f.string().required(
|
|
40
|
+
`Enter value for ${s.languagevalue}`
|
|
41
|
+
), t), {});
|
|
42
|
+
z = f.object().shape({
|
|
43
|
+
apps: f.array().min(1, "Select at least one App").required("Select App"),
|
|
44
|
+
...e
|
|
45
|
+
// Spread the dynamically created validations
|
|
46
|
+
});
|
|
47
|
+
} else if (T)
|
|
48
|
+
z = f.object().shape({
|
|
49
|
+
namespace: f.array().min(1, "Select at least one Namespace").required("Select Namespace")
|
|
50
|
+
});
|
|
51
|
+
else if (_) {
|
|
52
|
+
let e = P.reduce((t, s) => ((s == null ? void 0 : s.languagevalue) !== "English" && (s == null ? void 0 : s.appvalue) === R && (t[`${s.app}_${s.languagevalue}`] = f.string().required(`Enter value for ${s.languagevalue}`).test(
|
|
53
|
+
"placeholders-match",
|
|
54
|
+
"Placeholders do not match the original English text.",
|
|
55
|
+
function(l) {
|
|
56
|
+
const { path: n, createError: o, parent: h } = this, i = (h == null ? void 0 : h[`${s.app}_English`]) || "", a = W(i), d = W(l);
|
|
57
|
+
return Object.keys(a).length === Object.keys(d).length && Object.keys(a).every(
|
|
58
|
+
(x) => d[x] === a[x]
|
|
59
|
+
) || o({
|
|
60
|
+
path: n,
|
|
61
|
+
message: "Placeholders do not match the original English text."
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
)), t), {});
|
|
65
|
+
z = f.object().shape({
|
|
66
|
+
...e
|
|
67
|
+
});
|
|
68
|
+
} else {
|
|
69
|
+
const e = E.reduce((t, s) => ((s == null ? void 0 : s.language_value) !== "English" && (t[s.language_value] = f.string().required(`Enter value for ${s.language_value}`).test(
|
|
70
|
+
"placeholders-match",
|
|
71
|
+
"Placeholders do not match the original English text.",
|
|
72
|
+
function(l) {
|
|
73
|
+
const { path: n, createError: o, parent: h } = this, i = (h == null ? void 0 : h.englishValue) || "", a = W(i), d = W(l);
|
|
74
|
+
return Object.keys(a).length === Object.keys(d).length && Object.keys(a).every(
|
|
75
|
+
(x) => d[x] === a[x]
|
|
76
|
+
) || o({
|
|
77
|
+
path: n,
|
|
78
|
+
message: "Placeholders do not match the original English text."
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
)), t), {});
|
|
82
|
+
z = f.object().shape({
|
|
83
|
+
apps: f.array().min(1, "Select at least one App").required("Select App"),
|
|
84
|
+
namespace: f.array().min(1, "Select at least one Namespace").required("Select Namespace"),
|
|
85
|
+
englishValue: f.string().required("Enter Value for English"),
|
|
86
|
+
...e
|
|
87
|
+
// Spread the dynamically created validations
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
const F = Be(async (e) => {
|
|
91
|
+
try {
|
|
92
|
+
await Ne(e);
|
|
93
|
+
} catch (t) {
|
|
94
|
+
console.error(t);
|
|
95
|
+
}
|
|
96
|
+
}, []), _e = (e, t) => {
|
|
97
|
+
let s;
|
|
98
|
+
return (...l) => {
|
|
99
|
+
s && clearTimeout(s), s = setTimeout(() => {
|
|
100
|
+
e(...l);
|
|
101
|
+
}, t);
|
|
102
|
+
};
|
|
103
|
+
}, Ee = oe(
|
|
104
|
+
() => _e(F, 300),
|
|
105
|
+
[F]
|
|
106
|
+
), {
|
|
107
|
+
control: w,
|
|
108
|
+
handleSubmit: Ce,
|
|
109
|
+
reset: Ae,
|
|
110
|
+
setValue: B,
|
|
111
|
+
getValues: ee,
|
|
112
|
+
formState: { errors: $, isSubmitting: Se }
|
|
113
|
+
} = We({
|
|
114
|
+
defaultValues: {},
|
|
115
|
+
resolver: Ke(z),
|
|
116
|
+
mode: "onChange"
|
|
117
|
+
}), W = (e) => {
|
|
118
|
+
if (!e) return {};
|
|
119
|
+
const t = [...e.matchAll(/{(.*?)}/g)], s = {};
|
|
120
|
+
return t.forEach((l) => {
|
|
121
|
+
const n = l[1];
|
|
122
|
+
s[n] = (s[n] || 0) + 1;
|
|
123
|
+
}), s;
|
|
124
|
+
};
|
|
125
|
+
ae(() => {
|
|
126
|
+
if ($e(), u && C) {
|
|
127
|
+
let e = [];
|
|
128
|
+
u == null || u.forEach((t) => {
|
|
129
|
+
B(t == null ? void 0 : t.languagevalue, t == null ? void 0 : t.value), e.push({ id: t == null ? void 0 : t.language, value: t == null ? void 0 : t.value });
|
|
130
|
+
}), Z(e), Ve();
|
|
131
|
+
}
|
|
132
|
+
u && T && we(u.key);
|
|
133
|
+
}, [u]), ae(() => {
|
|
134
|
+
_ && Te();
|
|
135
|
+
}, [_]);
|
|
136
|
+
const Te = async () => {
|
|
137
|
+
var e, t, s, l;
|
|
138
|
+
try {
|
|
139
|
+
const o = await ue({
|
|
140
|
+
code: "labels_selected_apps_for_editing",
|
|
141
|
+
parameters: { key: X }
|
|
142
|
+
});
|
|
143
|
+
ge((e = o == null ? void 0 : o.data) == null ? void 0 : e.result);
|
|
144
|
+
let h = (s = (t = o == null ? void 0 : o.data) == null ? void 0 : t.result) == null ? void 0 : s.map((i) => i.appvalue).filter((i, a, d) => a === d.findIndex((b) => b === i));
|
|
145
|
+
(l = o == null ? void 0 : o.data) == null || l.result.forEach((i) => {
|
|
146
|
+
const a = `${i.app}_${i.languagevalue}`;
|
|
147
|
+
B(a, i.value || "");
|
|
148
|
+
}), Y(h), D(h[0]);
|
|
149
|
+
} catch (n) {
|
|
150
|
+
console.error(n), k({
|
|
151
|
+
message: "Could not open this label for editing. Please try again.",
|
|
152
|
+
type: "error"
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}, H = (e, t, s = null) => {
|
|
156
|
+
let l = [...y], n = !1;
|
|
157
|
+
l == null || l.forEach((o) => {
|
|
158
|
+
(o == null ? void 0 : o.id) === e && (o.value = t, n = !0);
|
|
159
|
+
}), n || (s ? l.push({ id: e, value: t, labelid: s }) : l.push({ id: e, value: t })), Z(l);
|
|
160
|
+
}, we = async (e) => {
|
|
161
|
+
var t, s;
|
|
162
|
+
try {
|
|
163
|
+
const l = await Q({
|
|
164
|
+
code: "get_namespaces_from_key",
|
|
165
|
+
parameters: { key: e }
|
|
166
|
+
});
|
|
167
|
+
let n = (s = (t = l == null ? void 0 : l.data) == null ? void 0 : t.result) == null ? void 0 : s.map((o) => o.value);
|
|
168
|
+
B("namespace", n || []);
|
|
169
|
+
} catch (l) {
|
|
170
|
+
console.error(l);
|
|
171
|
+
}
|
|
172
|
+
}, $e = async () => {
|
|
173
|
+
var e;
|
|
174
|
+
try {
|
|
175
|
+
const t = await Q({
|
|
176
|
+
code: "get_distinct_namespce",
|
|
177
|
+
parameters: {}
|
|
178
|
+
});
|
|
179
|
+
xe((e = t == null ? void 0 : t.data) == null ? void 0 : e.result);
|
|
180
|
+
} catch (t) {
|
|
181
|
+
console.error(t);
|
|
182
|
+
}
|
|
183
|
+
}, Ve = async () => {
|
|
184
|
+
var e, t, s;
|
|
185
|
+
try {
|
|
186
|
+
let n = {
|
|
187
|
+
code: "labels_selected_apps_for_editing",
|
|
188
|
+
parameters: { key: (e = u[0]) == null ? void 0 : e.key.replace(/'/g, "''") }
|
|
189
|
+
};
|
|
190
|
+
const o = await ue(n);
|
|
191
|
+
let h = (s = (t = o == null ? void 0 : o.data) == null ? void 0 : t.result) == null ? void 0 : s.map((i) => i.appvalue).filter((i, a, d) => a === d.findIndex((b) => b === i)).join(", ");
|
|
192
|
+
Y(h);
|
|
193
|
+
} catch (l) {
|
|
194
|
+
console.error(l), k({
|
|
195
|
+
message: "Could not load the apps for this label. Please try again.",
|
|
196
|
+
type: "error"
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}, qe = (e, t) => {
|
|
200
|
+
ye(t), B("apps", t);
|
|
201
|
+
}, Ie = (e) => (e == null ? void 0 : e.appValue) || "", S = () => {
|
|
202
|
+
G("conversion_event", {
|
|
203
|
+
form: J.current,
|
|
204
|
+
form_name: "Add Label Configuration",
|
|
205
|
+
submit: N.current
|
|
206
|
+
}), me();
|
|
207
|
+
}, Ne = async (e) => {
|
|
208
|
+
var t;
|
|
209
|
+
try {
|
|
210
|
+
let s;
|
|
211
|
+
if ((e == null ? void 0 : e.id) === O) {
|
|
212
|
+
let l;
|
|
213
|
+
C ? (s = y.filter((n) => n.id !== O).map((n) => n.id).join(","), y == null || y.forEach((n) => {
|
|
214
|
+
(n == null ? void 0 : n.id) === O && (l = n == null ? void 0 : n.value);
|
|
215
|
+
})) : (s = E.filter((n) => n.languageKey !== "en").map((n) => n.id).join(","), l = (t = ee()) == null ? void 0 : t.englishValue), l ? await Xe(s, l) : k({ message: "Enter english text", type: "info" });
|
|
216
|
+
}
|
|
217
|
+
} catch (s) {
|
|
218
|
+
console.error(s), k({
|
|
219
|
+
message: "Could not translate this text. Please try again.",
|
|
220
|
+
type: "error"
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
}, je = async (e) => {
|
|
224
|
+
var t, s, l, n, o, h;
|
|
225
|
+
try {
|
|
226
|
+
G("button_click", {
|
|
227
|
+
button_name: "add-label-add-button",
|
|
228
|
+
button_type: "submit",
|
|
229
|
+
button_id: "add-label-submit-button"
|
|
230
|
+
});
|
|
231
|
+
let i = [];
|
|
232
|
+
if (C)
|
|
233
|
+
(t = e == null ? void 0 : e.apps) == null || t.forEach((a) => {
|
|
234
|
+
y == null || y.forEach((d) => {
|
|
235
|
+
i.push({
|
|
236
|
+
language: d == null ? void 0 : d.id,
|
|
237
|
+
value: d == null ? void 0 : d.value,
|
|
238
|
+
app: a == null ? void 0 : a.id,
|
|
239
|
+
isActive: !0,
|
|
240
|
+
key: u[0].key
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
}), await U(i), N.current = !0, M(), k({ message: "App added successfully", type: "success" }), S();
|
|
244
|
+
else if (T) {
|
|
245
|
+
let a = (e == null ? void 0 : e.namespace) || [];
|
|
246
|
+
await Ye({
|
|
247
|
+
key: u.key,
|
|
248
|
+
namespace: a
|
|
249
|
+
}), N.current = !0, M(), k({
|
|
250
|
+
message: "Namespaces updated successfully",
|
|
251
|
+
type: "success"
|
|
252
|
+
}), S();
|
|
253
|
+
} else if (_) {
|
|
254
|
+
const a = ee(), d = Object.entries(a).reduce(
|
|
255
|
+
(b, [x, c]) => {
|
|
256
|
+
const [m, V] = x.split("_");
|
|
257
|
+
if (c === "") return b;
|
|
258
|
+
const K = P.find(
|
|
259
|
+
(ne) => ne.app === parseInt(m) && ne.languagevalue === V
|
|
260
|
+
);
|
|
261
|
+
return K && K.value !== c && b.push({
|
|
262
|
+
id: K.id || null,
|
|
263
|
+
language: K.language || V,
|
|
264
|
+
value: c,
|
|
265
|
+
app: parseInt(m),
|
|
266
|
+
isActive: !0,
|
|
267
|
+
key: X
|
|
268
|
+
}), b;
|
|
269
|
+
},
|
|
270
|
+
[]
|
|
271
|
+
);
|
|
272
|
+
await U(d), N.current = !0, M(), k({ message: "Label updated successfully", type: "success" }), S();
|
|
273
|
+
} else {
|
|
274
|
+
const a = e.englishValue.replace(/ /g, "");
|
|
275
|
+
(s = e == null ? void 0 : e.apps) == null || s.forEach((c) => {
|
|
276
|
+
i.push({
|
|
277
|
+
language: O,
|
|
278
|
+
value: e == null ? void 0 : e.englishValue,
|
|
279
|
+
app: c == null ? void 0 : c.id,
|
|
280
|
+
isActive: !0,
|
|
281
|
+
key: a
|
|
282
|
+
}), y == null || y.forEach((m) => {
|
|
283
|
+
i.push({
|
|
284
|
+
language: m == null ? void 0 : m.id,
|
|
285
|
+
value: m == null ? void 0 : m.value,
|
|
286
|
+
app: c == null ? void 0 : c.id,
|
|
287
|
+
isActive: !0,
|
|
288
|
+
key: a
|
|
289
|
+
});
|
|
290
|
+
});
|
|
291
|
+
});
|
|
292
|
+
let d = (e == null ? void 0 : e.namespace) || [], b = [];
|
|
293
|
+
for (const c of d)
|
|
294
|
+
try {
|
|
295
|
+
const m = await Q({
|
|
296
|
+
code: "check_key_namespace_exist",
|
|
297
|
+
parameters: {
|
|
298
|
+
key: a,
|
|
299
|
+
namespace: c
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
((n = (l = m == null ? void 0 : m.data) == null ? void 0 : l.result) == null ? void 0 : n.length) === 0 && b.push(c);
|
|
303
|
+
} catch (m) {
|
|
304
|
+
console.error("Error while checking namespace:", c, m);
|
|
305
|
+
}
|
|
306
|
+
await Ze({
|
|
307
|
+
key: a,
|
|
308
|
+
namespace: b
|
|
309
|
+
});
|
|
310
|
+
let x = !1;
|
|
311
|
+
for (const c of i) {
|
|
312
|
+
let m = {
|
|
313
|
+
code: "translation_label_app_language_key_check",
|
|
314
|
+
parameters: {
|
|
315
|
+
key: c == null ? void 0 : c.key,
|
|
316
|
+
language: c == null ? void 0 : c.language,
|
|
317
|
+
app: c == null ? void 0 : c.app
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
const V = await Q(m);
|
|
321
|
+
if (((h = (o = V == null ? void 0 : V.data) == null ? void 0 : o.result) == null ? void 0 : h.length) > 0) {
|
|
322
|
+
k({
|
|
323
|
+
message: "This label already exists with the same app, language and key.",
|
|
324
|
+
type: "error"
|
|
325
|
+
}), x = !0;
|
|
326
|
+
break;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
!x && i.length > 0 && (await U(i), N.current = !0, M(), k({
|
|
330
|
+
message: "Label added successfully",
|
|
331
|
+
type: "success"
|
|
332
|
+
}), S());
|
|
333
|
+
}
|
|
334
|
+
} catch (i) {
|
|
335
|
+
console.error(i), k({
|
|
336
|
+
message: "Could not save this label. Please try again.",
|
|
337
|
+
type: "error"
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
}, Pe = !C && !T && !_, te = oe(
|
|
341
|
+
() => (Array.isArray(j) ? j : []).map((e, t) => ({
|
|
342
|
+
value: e,
|
|
343
|
+
label: e,
|
|
344
|
+
id: `add-label-tab-${t}`,
|
|
345
|
+
dataTestId: `add-label-tab-${e}`
|
|
346
|
+
})),
|
|
347
|
+
[j]
|
|
348
|
+
), ze = () => T ? {
|
|
349
|
+
title: p("Add NameSpace"),
|
|
350
|
+
subtitle: `${p("Choose which namespaces load this label.")} ${u != null && u.key ? `(${u.key})` : ""}`
|
|
351
|
+
} : C ? {
|
|
352
|
+
title: p("Add App"),
|
|
353
|
+
subtitle: j ? `${p("This label already exists in")} ${j}. ${p("Pick the apps that should also use it.")}` : p("Pick the apps that should also use this label.")
|
|
354
|
+
} : _ ? {
|
|
355
|
+
title: p("Edit Label"),
|
|
356
|
+
subtitle: p(
|
|
357
|
+
"Update this label's translations. Each tab is one app that uses it."
|
|
358
|
+
)
|
|
359
|
+
} : {
|
|
360
|
+
title: p("Add Label"),
|
|
361
|
+
subtitle: p(
|
|
362
|
+
"Enter the English text, then its translation in each active language. The label is created for every app and namespace you pick."
|
|
363
|
+
)
|
|
364
|
+
}, { title: Me, subtitle: Oe } = ze();
|
|
365
|
+
return /* @__PURE__ */ A(
|
|
366
|
+
Le,
|
|
367
|
+
{
|
|
368
|
+
"data-testid": "add-label-modal",
|
|
369
|
+
open: pe,
|
|
370
|
+
onClose: () => {
|
|
371
|
+
S(), Ae();
|
|
372
|
+
},
|
|
373
|
+
fullWidth: !0,
|
|
374
|
+
maxWidth: "md",
|
|
375
|
+
className: "translation-modal",
|
|
376
|
+
children: [
|
|
377
|
+
/* @__PURE__ */ A(
|
|
378
|
+
Qe,
|
|
379
|
+
{
|
|
380
|
+
sx: {
|
|
381
|
+
display: "flex",
|
|
382
|
+
alignItems: "flex-start",
|
|
383
|
+
justifyContent: "space-between",
|
|
384
|
+
gap: 2,
|
|
385
|
+
pt: 2,
|
|
386
|
+
pb: 3,
|
|
387
|
+
borderBottom: "1px solid",
|
|
388
|
+
borderColor: "divider"
|
|
389
|
+
},
|
|
390
|
+
"data-testid": "add-label-header",
|
|
391
|
+
children: [
|
|
392
|
+
/* @__PURE__ */ A(v, { children: [
|
|
393
|
+
/* @__PURE__ */ r(
|
|
394
|
+
ie,
|
|
395
|
+
{
|
|
396
|
+
variant: "subtitle1",
|
|
397
|
+
component: "span",
|
|
398
|
+
sx: { fontWeight: 700, display: "block" },
|
|
399
|
+
children: Me
|
|
400
|
+
}
|
|
401
|
+
),
|
|
402
|
+
/* @__PURE__ */ r(ie, { variant: "body2", color: "text.secondary", children: Oe })
|
|
403
|
+
] }),
|
|
404
|
+
/* @__PURE__ */ r(
|
|
405
|
+
Ge,
|
|
406
|
+
{
|
|
407
|
+
size: "small",
|
|
408
|
+
onClick: () => {
|
|
409
|
+
S();
|
|
410
|
+
},
|
|
411
|
+
"aria-label": p("Close"),
|
|
412
|
+
"data-testid": "add-label-close-button",
|
|
413
|
+
children: /* @__PURE__ */ r(st, { iconName: "faXmark" })
|
|
414
|
+
}
|
|
415
|
+
)
|
|
416
|
+
]
|
|
417
|
+
}
|
|
418
|
+
),
|
|
419
|
+
/* @__PURE__ */ A(
|
|
420
|
+
v,
|
|
421
|
+
{
|
|
422
|
+
component: "form",
|
|
423
|
+
onSubmit: Ce(je),
|
|
424
|
+
ref: J,
|
|
425
|
+
sx: {
|
|
426
|
+
display: "flex",
|
|
427
|
+
flexDirection: "column",
|
|
428
|
+
minHeight: 0,
|
|
429
|
+
overflow: "hidden"
|
|
430
|
+
},
|
|
431
|
+
children: [
|
|
432
|
+
/* @__PURE__ */ r(
|
|
433
|
+
He,
|
|
434
|
+
{
|
|
435
|
+
sx: { "&.MuiDialogContent-root": { pt: 3 } },
|
|
436
|
+
children: /* @__PURE__ */ r(Je, { isLoading: be, children: /* @__PURE__ */ A(v, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
437
|
+
!T && !_ && /* @__PURE__ */ r(v, { "data-testid": "add-label-app-field", children: /* @__PURE__ */ r(I, { label: p("App"), required: !0, children: /* @__PURE__ */ r(
|
|
438
|
+
De,
|
|
439
|
+
{
|
|
440
|
+
control: w,
|
|
441
|
+
name: "apps",
|
|
442
|
+
size: "small",
|
|
443
|
+
options: he || [],
|
|
444
|
+
errors: $,
|
|
445
|
+
value: fe,
|
|
446
|
+
onChange: qe,
|
|
447
|
+
getOptionLabel: Ie
|
|
448
|
+
}
|
|
449
|
+
) }) }),
|
|
450
|
+
!C && !_ && /* @__PURE__ */ r(v, { "data-testid": "add-label-namespace-field", children: /* @__PURE__ */ r(
|
|
451
|
+
I,
|
|
452
|
+
{
|
|
453
|
+
label: p("Namespace"),
|
|
454
|
+
required: !0,
|
|
455
|
+
hint: p("Add to General if no specific namespace"),
|
|
456
|
+
children: /* @__PURE__ */ r(
|
|
457
|
+
lt,
|
|
458
|
+
{
|
|
459
|
+
control: w,
|
|
460
|
+
name: "namespace",
|
|
461
|
+
options: ve || [],
|
|
462
|
+
errors: $,
|
|
463
|
+
displayName: "label",
|
|
464
|
+
optionValue: "value",
|
|
465
|
+
multiple: !0
|
|
466
|
+
}
|
|
467
|
+
)
|
|
468
|
+
}
|
|
469
|
+
) }),
|
|
470
|
+
Pe && /* @__PURE__ */ A(Re, { children: [
|
|
471
|
+
/* @__PURE__ */ r(v, { "data-testid": "add-label-field", children: /* @__PURE__ */ r(I, { label: p("English"), required: !0, children: /* @__PURE__ */ r(
|
|
472
|
+
L,
|
|
473
|
+
{
|
|
474
|
+
control: w,
|
|
475
|
+
id: "englishValue",
|
|
476
|
+
name: "englishValue",
|
|
477
|
+
errors: $,
|
|
478
|
+
label: "",
|
|
479
|
+
size: "small",
|
|
480
|
+
className: "w-full",
|
|
481
|
+
"data-testid": "add-label-language-english"
|
|
482
|
+
}
|
|
483
|
+
) }) }),
|
|
484
|
+
E == null ? void 0 : E.map((e, t) => (e == null ? void 0 : e.language_value) === "English" ? null : /* @__PURE__ */ r(v, { "data-testid": "add-label-base-date-field", children: /* @__PURE__ */ r(I, { label: e == null ? void 0 : e.language_value, required: !0, children: /* @__PURE__ */ r(
|
|
485
|
+
L,
|
|
486
|
+
{
|
|
487
|
+
control: w,
|
|
488
|
+
id: e == null ? void 0 : e.language_value,
|
|
489
|
+
name: e == null ? void 0 : e.language_value,
|
|
490
|
+
errors: $,
|
|
491
|
+
onChange: (s) => {
|
|
492
|
+
var l;
|
|
493
|
+
H(e == null ? void 0 : e.id, (l = s == null ? void 0 : s.target) == null ? void 0 : l.value);
|
|
494
|
+
},
|
|
495
|
+
label: "",
|
|
496
|
+
size: "small",
|
|
497
|
+
className: "w-full",
|
|
498
|
+
"data-testid": "add-label-language"
|
|
499
|
+
}
|
|
500
|
+
) }) }, t + 1))
|
|
501
|
+
] }),
|
|
502
|
+
C && (u == null ? void 0 : u.map((e, t) => /* @__PURE__ */ r(v, { "data-testid": "add-label-base-date-field", children: /* @__PURE__ */ r(I, { label: e == null ? void 0 : e.languagevalue, required: !0, children: /* @__PURE__ */ r(
|
|
503
|
+
L,
|
|
504
|
+
{
|
|
505
|
+
control: w,
|
|
506
|
+
id: e == null ? void 0 : e.languagevalue,
|
|
507
|
+
name: e == null ? void 0 : e.languagevalue,
|
|
508
|
+
errors: $,
|
|
509
|
+
onChange: (s) => {
|
|
510
|
+
var l;
|
|
511
|
+
H(e == null ? void 0 : e.language, (l = s == null ? void 0 : s.target) == null ? void 0 : l.value), Ee({ id: e == null ? void 0 : e.language });
|
|
512
|
+
},
|
|
513
|
+
label: "",
|
|
514
|
+
size: "small",
|
|
515
|
+
className: "w-full",
|
|
516
|
+
"data-testid": "add-label-language"
|
|
517
|
+
}
|
|
518
|
+
) }) }, t + 1))),
|
|
519
|
+
_ && /* @__PURE__ */ A(
|
|
520
|
+
v,
|
|
521
|
+
{
|
|
522
|
+
sx: { display: "flex", flexDirection: "column", gap: 2 },
|
|
523
|
+
children: [
|
|
524
|
+
/* @__PURE__ */ r(
|
|
525
|
+
tt,
|
|
526
|
+
{
|
|
527
|
+
tabs: te,
|
|
528
|
+
value: R,
|
|
529
|
+
onChange: ke,
|
|
530
|
+
ariaLabel: p("Apps using this label"),
|
|
531
|
+
panelId: de,
|
|
532
|
+
dataTestId: "add-label-app-tabs"
|
|
533
|
+
}
|
|
534
|
+
),
|
|
535
|
+
/* @__PURE__ */ r(
|
|
536
|
+
v,
|
|
537
|
+
{
|
|
538
|
+
role: "tabpanel",
|
|
539
|
+
id: de,
|
|
540
|
+
"aria-labelledby": (le = te.find((e) => e.value === R)) == null ? void 0 : le.id,
|
|
541
|
+
sx: { display: "flex", flexDirection: "column", gap: 2 },
|
|
542
|
+
children: P == null ? void 0 : P.filter((e) => (e == null ? void 0 : e.appvalue) === R).map((e, t) => /* @__PURE__ */ r(v, { "data-testid": "label-edit-field", children: /* @__PURE__ */ r(I, { label: e == null ? void 0 : e.languagevalue, children: /* @__PURE__ */ r(
|
|
543
|
+
L,
|
|
544
|
+
{
|
|
545
|
+
control: w,
|
|
546
|
+
id: `${e == null ? void 0 : e.app}-${e.languagevalue}`,
|
|
547
|
+
name: `${e == null ? void 0 : e.app}_${e.languagevalue}`,
|
|
548
|
+
errors: $,
|
|
549
|
+
onChange: (s) => {
|
|
550
|
+
var l;
|
|
551
|
+
return H(
|
|
552
|
+
e == null ? void 0 : e.language,
|
|
553
|
+
(l = s == null ? void 0 : s.target) == null ? void 0 : l.value,
|
|
554
|
+
e == null ? void 0 : e.id
|
|
555
|
+
);
|
|
556
|
+
},
|
|
557
|
+
label: "",
|
|
558
|
+
size: "small",
|
|
559
|
+
className: "w-full",
|
|
560
|
+
"data-testid": "label-edit-input"
|
|
561
|
+
}
|
|
562
|
+
) }) }, t + 1))
|
|
563
|
+
}
|
|
564
|
+
)
|
|
565
|
+
]
|
|
566
|
+
}
|
|
567
|
+
)
|
|
568
|
+
] }) })
|
|
569
|
+
}
|
|
570
|
+
),
|
|
571
|
+
/* @__PURE__ */ A(
|
|
572
|
+
Ue,
|
|
573
|
+
{
|
|
574
|
+
sx: { px: 3, py: 2, borderTop: "1px solid", borderColor: "divider" },
|
|
575
|
+
children: [
|
|
576
|
+
/* @__PURE__ */ r(
|
|
577
|
+
ce,
|
|
578
|
+
{
|
|
579
|
+
size: "small",
|
|
580
|
+
variant: "outlined",
|
|
581
|
+
color: "inherit",
|
|
582
|
+
"data-testid": "add-label-back-button",
|
|
583
|
+
onClick: () => {
|
|
584
|
+
S(), G("button_click", {
|
|
585
|
+
button_name: "add-label-back-button",
|
|
586
|
+
button_type: "cancel",
|
|
587
|
+
button_id: "add-label-back-button"
|
|
588
|
+
});
|
|
589
|
+
},
|
|
590
|
+
children: p("Cancel")
|
|
591
|
+
}
|
|
592
|
+
),
|
|
593
|
+
/* @__PURE__ */ r(
|
|
594
|
+
ce,
|
|
595
|
+
{
|
|
596
|
+
type: "submit",
|
|
597
|
+
size: "small",
|
|
598
|
+
variant: "contained",
|
|
599
|
+
"data-testid": "add-label-save-button",
|
|
600
|
+
color: "primary",
|
|
601
|
+
disabled: Se,
|
|
602
|
+
children: p("Save")
|
|
603
|
+
}
|
|
604
|
+
)
|
|
605
|
+
]
|
|
606
|
+
}
|
|
607
|
+
)
|
|
608
|
+
]
|
|
609
|
+
}
|
|
610
|
+
)
|
|
611
|
+
]
|
|
612
|
+
}
|
|
613
|
+
);
|
|
614
|
+
};
|
|
615
|
+
nt.propTypes = {
|
|
616
|
+
open: g.any,
|
|
617
|
+
handleClose: g.any,
|
|
618
|
+
languageList: g.any,
|
|
619
|
+
apps: g.any,
|
|
620
|
+
addAppFlag: g.any,
|
|
621
|
+
fieldsData: g.any,
|
|
622
|
+
refetch: g.any,
|
|
623
|
+
addNameSpaceFlag: g.any,
|
|
624
|
+
editLabelFlag: g.any,
|
|
625
|
+
labelKey: g.any,
|
|
626
|
+
isLoading: g.any
|
|
627
|
+
};
|
|
628
|
+
export {
|
|
629
|
+
nt as default
|
|
630
|
+
};
|
|
631
|
+
//# sourceMappingURL=AddLabelModal-Bq-wRqv9.js.map
|