@argusoft/medplat-core 1.0.29 → 1.0.31
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-DUgY6ewy.js +1031 -0
- package/dist/AccessRights-DUgY6ewy.js.map +1 -0
- package/dist/AddEditQueryBuilder-D-iQiVIe.js +365 -0
- package/dist/AddEditQueryBuilder-D-iQiVIe.js.map +1 -0
- package/dist/{AddFeatures-v3TmGQee.js → AddFeatures-D1sU8RjY.js} +2 -2
- package/dist/{AddFeatures-v3TmGQee.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-c6ZKiN0i.js +8898 -0
- package/dist/AddMenuConfiguration-c6ZKiN0i.js.map +1 -0
- package/dist/AppModal-CCtrQ5Tr.js +394 -0
- package/dist/AppModal-CCtrQ5Tr.js.map +1 -0
- package/dist/BrandsPage-DMw2vT0u-BVhvhc6J.js +387 -0
- package/dist/BrandsPage-DMw2vT0u-BVhvhc6J.js.map +1 -0
- package/dist/CategoriesPage-D3ihx9Gi-CT58g0ry.js +398 -0
- package/dist/CategoriesPage-D3ihx9Gi-CT58g0ry.js.map +1 -0
- package/dist/{ChangePasswordModalCore-DutQAZOx.js → ChangePasswordModalCore-lQ9GamH1.js} +1605 -1610
- package/dist/ChangePasswordModalCore-lQ9GamH1.js.map +1 -0
- package/dist/ConditionConfig-BQBmBHaM.js +408 -0
- package/dist/ConditionConfig-BQBmBHaM.js.map +1 -0
- package/dist/DashboardPage-asr2XDRu-uOOlX9Vq.js +435 -0
- package/dist/DashboardPage-asr2XDRu-uOOlX9Vq.js.map +1 -0
- package/dist/EventConfig-BY2cgGyx.js +27 -0
- package/dist/EventConfig-BY2cgGyx.js.map +1 -0
- package/dist/EventConfigurations-CUPEN5BV.js +544 -0
- package/dist/EventConfigurations-CUPEN5BV.js.map +1 -0
- package/dist/EventConfigurations.css +1 -1
- package/dist/EventsExceptionModal-BX-ArkBE.js +188 -0
- package/dist/EventsExceptionModal-BX-ArkBE.js.map +1 -0
- package/dist/EventsUi-D6O9S7BK.js +258 -0
- package/dist/EventsUi-D6O9S7BK.js.map +1 -0
- package/dist/FacilityPicker-DYl_PDyt-Cbwo2tAY.js +79 -0
- package/dist/FacilityPicker-DYl_PDyt-Cbwo2tAY.js.map +1 -0
- package/dist/FeatureMenu-CHsBbw3W.js +525 -0
- package/dist/FeatureMenu-CHsBbw3W.js.map +1 -0
- package/dist/{FhirServerList-Dkq7Kbes.js → FhirServerList-iXBPkRVF.js} +22 -22
- package/dist/{FhirServerList-Dkq7Kbes.js.map → FhirServerList-iXBPkRVF.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/GrantPermissionModal-D7iNZd0M.js +239 -0
- package/dist/GrantPermissionModal-D7iNZd0M.js.map +1 -0
- package/dist/ImmunizationConfigurationBase-aUtx0JEe.js +8019 -0
- package/dist/ImmunizationConfigurationBase-aUtx0JEe.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-DOotGZrj-CoPjOJEI.js +665 -0
- package/dist/InventoryPage-DOotGZrj-CoPjOJEI.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-DqW3krT6.js +1216 -0
- package/dist/ManageEventConfiguration-DqW3krT6.js.map +1 -0
- package/dist/ManageEventConfiguration.css +1 -1
- package/dist/{ManageNotification-CfhHlfxA.js → ManageNotification-C5MhV77Q.js} +2 -2
- package/dist/{ManageNotification-CfhHlfxA.js.map → ManageNotification-C5MhV77Q.js.map} +1 -1
- package/dist/{ManageRole-4Y2PP4dQ.js → ManageRole-CNZBRKGU.js} +2 -2
- package/dist/{ManageRole-4Y2PP4dQ.js.map → ManageRole-CNZBRKGU.js.map} +1 -1
- package/dist/ManageTranslation-vRiptUAP.js +833 -0
- package/dist/ManageTranslation-vRiptUAP.js.map +1 -0
- package/dist/ManageTranslation.css +1 -1
- package/dist/{ManageUser-DDzyd9jm.js → ManageUser-DZltBina.js} +224 -224
- package/dist/{ManageUser-DDzyd9jm.js.map → ManageUser-DZltBina.js.map} +1 -1
- package/dist/MemberProfileCard-D5CgkTdJ-D2NgDJl3.js +272 -0
- package/dist/MemberProfileCard-D5CgkTdJ-D2NgDJl3.js.map +1 -0
- package/dist/MobileAnalytics-BLOionG_.js +17301 -0
- package/dist/MobileAnalytics-BLOionG_.js.map +1 -0
- package/dist/MobileMenuManagement-68Wijb0X.js +220 -0
- package/dist/MobileMenuManagement-68Wijb0X.js.map +1 -0
- package/dist/MobileTypeEventConfigModal-CMcj7Ozp.js +752 -0
- package/dist/MobileTypeEventConfigModal-CMcj7Ozp.js.map +1 -0
- package/dist/NotificationFlywayQuery-BAHVjf6N.js +247 -0
- package/dist/NotificationFlywayQuery-BAHVjf6N.js.map +1 -0
- package/dist/{NotificationList-BMFpNUJG.js → NotificationList-DEyRZEuM.js} +2 -2
- package/dist/{NotificationList-BMFpNUJG.js.map → NotificationList-DEyRZEuM.js.map} +1 -1
- package/dist/OtherTypeEventConfigModal-stNmuSv_.js +1812 -0
- package/dist/OtherTypeEventConfigModal-stNmuSv_.js.map +1 -0
- package/dist/PaymentCreatePage-DfvSZ-kB-CckogYoe.js +482 -0
- package/dist/PaymentCreatePage-DfvSZ-kB-CckogYoe.js.map +1 -0
- package/dist/PaymentsPage-DMNjYWAJ-ChO9IXmk.js +157 -0
- package/dist/PaymentsPage-DMNjYWAJ-ChO9IXmk.js.map +1 -0
- package/dist/PermissionsModal-CCYkcKlC.js +151 -0
- package/dist/PermissionsModal-CCYkcKlC.js.map +1 -0
- package/dist/PickupBatchLinesEditor-CE2RuyJT-BPceiJr8.js +119 -0
- package/dist/PickupBatchLinesEditor-CE2RuyJT-BPceiJr8.js.map +1 -0
- package/dist/PickupCreatePage-B4O_-vE5-DoOo9nJO.js +783 -0
- package/dist/PickupCreatePage-B4O_-vE5-DoOo9nJO.js.map +1 -0
- package/dist/PickupsPage-D7zyioJB-bHKnARYw.js +818 -0
- package/dist/PickupsPage-D7zyioJB-bHKnARYw.js.map +1 -0
- package/dist/PmGuard-BZE-y4In-D_pUm5MP.js +599 -0
- package/dist/PmGuard-BZE-y4In-D_pUm5MP.js.map +1 -0
- package/dist/ProductEditPage-BVlVUCtD-BR-tJ5Wb.js +1305 -0
- package/dist/ProductEditPage-BVlVUCtD-BR-tJ5Wb.js.map +1 -0
- package/dist/ProductsPage-DvNHIeZt-BoOOJJtk.js +253 -0
- package/dist/ProductsPage-DvNHIeZt-BoOOJJtk.js.map +1 -0
- package/dist/PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js +675 -0
- package/dist/PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js.map +1 -0
- package/dist/PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js +1577 -0
- package/dist/PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js.map +1 -0
- package/dist/PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js +279 -0
- package/dist/PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js.map +1 -0
- package/dist/PurchasesPage-DgL5T6BY-DePUuE9l.js +293 -0
- package/dist/PurchasesPage-DgL5T6BY-DePUuE9l.js.map +1 -0
- package/dist/QueryBuilder-CXaBe6sr.js +478 -0
- package/dist/QueryBuilder-CXaBe6sr.js.map +1 -0
- package/dist/{RoleManagement-DEiBNfT8.js → RoleManagement-s8iNx2Mu.js} +145 -155
- 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-CZnIOydv-DKBw-qp7.js +544 -0
- package/dist/SaleCreatePage-CZnIOydv-DKBw-qp7.js.map +1 -0
- package/dist/SalesPage-DPIRrC_O-M8rqnK7z.js +315 -0
- package/dist/SalesPage-DPIRrC_O-M8rqnK7z.js.map +1 -0
- package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.js +676 -0
- package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.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-DIOUdYfG.js} +170 -123
- package/dist/ShowFlywayQuery-DIOUdYfG.js.map +1 -0
- package/dist/ShowQueryHistory-DRBKYDKk.js +313 -0
- package/dist/ShowQueryHistory-DRBKYDKk.js.map +1 -0
- package/dist/StorageUnitsPage-BDRkdCjW-UF64rf7q.js +728 -0
- package/dist/StorageUnitsPage-BDRkdCjW-UF64rf7q.js.map +1 -0
- package/dist/SubMenu-BdMTYtC1.js +319 -0
- package/dist/SubMenu-BdMTYtC1.js.map +1 -0
- package/dist/TransactionsPage-CqWTMNU8-Df6eGFDW.js +746 -0
- package/dist/TransactionsPage-CqWTMNU8-Df6eGFDW.js.map +1 -0
- package/dist/TransferCreatePage-DF7FZaTJ-CL79V3aR.js +315 -0
- package/dist/TransferCreatePage-DF7FZaTJ-CL79V3aR.js.map +1 -0
- package/dist/TransfersPage-CGrRFaBF-cTwBUv0o.js +476 -0
- package/dist/TransfersPage-CGrRFaBF-cTwBUv0o.js.map +1 -0
- package/dist/TypeConfiguration-JbRCN6GR.js +114 -0
- package/dist/TypeConfiguration-JbRCN6GR.js.map +1 -0
- package/dist/{UserList-Bc8gYxRL.js → UserList-L41Xw0Q6.js} +253 -236
- package/dist/{UserList-Bc8gYxRL.js.map → UserList-L41Xw0Q6.js.map} +1 -1
- package/dist/Users-CsJ08Kjm.js.map +1 -1
- package/dist/VialsPage-rvvXjgZG-Oqo1v6kQ.js +321 -0
- package/dist/VialsPage-rvvXjgZG-Oqo1v6kQ.js.map +1 -0
- package/dist/constants-DpXnLsAB-D6lN5cjK.js +445 -0
- package/dist/constants-DpXnLsAB-D6lN5cjK.js.map +1 -0
- package/dist/{dashboardLayoutUtils-D1xCAxp3.js → dashboardLayoutUtils-CJivzaU1.js} +95 -92
- package/dist/dashboardLayoutUtils-CJivzaU1.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 +1 -1
- package/dist/index.lib-ETRQOzvE.js +894 -0
- package/dist/index.lib-ETRQOzvE.js.map +1 -0
- package/dist/listValueStore-BFQtDYIR-Bj0yX145.js +36 -0
- package/dist/listValueStore-BFQtDYIR-Bj0yX145.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 +4 -3
- package/dist/AccessRights-Zm8Obm4N.js +0 -1284
- package/dist/AccessRights-Zm8Obm4N.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-Ce91MhnU.js +0 -8547
- package/dist/AddMenuConfiguration-Ce91MhnU.js.map +0 -1
- package/dist/AppModal-CtG2GjD_.js +0 -428
- package/dist/AppModal-CtG2GjD_.js.map +0 -1
- package/dist/ChangePasswordModalCore-DutQAZOx.js.map +0 -1
- package/dist/ConditionConfig-B4Ffpgj3.js +0 -395
- package/dist/ConditionConfig-B4Ffpgj3.js.map +0 -1
- package/dist/ConditionConfig.css +0 -1
- package/dist/EventConfigurations-BJcURufo.js +0 -449
- package/dist/EventConfigurations-BJcURufo.js.map +0 -1
- package/dist/EventsExceptionModal-BlZtBQoR.js +0 -200
- package/dist/EventsExceptionModal-BlZtBQoR.js.map +0 -1
- package/dist/EventsSkeleton-DK6JDKAK.js +0 -83
- package/dist/EventsSkeleton-DK6JDKAK.js.map +0 -1
- package/dist/FeatureMenu-C3503UIX.js +0 -265
- package/dist/FeatureMenu-C3503UIX.js.map +0 -1
- package/dist/FlywayQuery-Cx2sly6g.js +0 -169
- package/dist/FlywayQuery-Cx2sly6g.js.map +0 -1
- package/dist/ImmunizationConfigurationBase-DLQVSNnt.js +0 -5895
- package/dist/ImmunizationConfigurationBase-DLQVSNnt.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-dt096fyj.js +0 -4189
- package/dist/ManageDynamicFeature-dt096fyj.js.map +0 -1
- package/dist/ManageEventConfiguration-BpSJszSX.js +0 -1017
- package/dist/ManageEventConfiguration-BpSJszSX.js.map +0 -1
- package/dist/ManageTranslation-B4C9-lWD.js +0 -625
- package/dist/ManageTranslation-B4C9-lWD.js.map +0 -1
- package/dist/MobileMenuManagement-Cf8IZlla.js +0 -108
- package/dist/MobileMenuManagement-Cf8IZlla.js.map +0 -1
- package/dist/MobileTypeEventConfigModal-DUkUYACe.js +0 -783
- package/dist/MobileTypeEventConfigModal-DUkUYACe.js.map +0 -1
- package/dist/NotificationFlywayQuery-BY8Zzml_.js +0 -244
- package/dist/NotificationFlywayQuery-BY8Zzml_.js.map +0 -1
- package/dist/OtherTypeEventConfigModal-CYBfr2XE.js +0 -2046
- package/dist/OtherTypeEventConfigModal-CYBfr2XE.js.map +0 -1
- package/dist/QueryBuilder-z7eqfd7D.js +0 -383
- package/dist/QueryBuilder-z7eqfd7D.js.map +0 -1
- package/dist/RoleManagement-DEiBNfT8.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-B072oEGb.js +0 -191
- package/dist/SubMenu-B072oEGb.js.map +0 -1
- package/dist/TypeConfiguration-C3xoP2Nb.js +0 -117
- package/dist/TypeConfiguration-C3xoP2Nb.js.map +0 -1
- package/dist/dashboardLayoutUtils-D1xCAxp3.js.map +0 -1
- package/dist/index.lib-C3fwoM3y.js +0 -820
- package/dist/index.lib-C3fwoM3y.js.map +0 -1
|
@@ -0,0 +1,1812 @@
|
|
|
1
|
+
import { jsxs as c, jsx as s, Fragment as Ye } from "react/jsx-runtime";
|
|
2
|
+
import D, { memo as He, forwardRef as xe, useRef as U, useEffect as le, useState as V, useMemo as J } from "react";
|
|
3
|
+
import S from "prop-types";
|
|
4
|
+
import { useForm as Be, Controller as H } from "react-hook-form";
|
|
5
|
+
import { yupResolver as Qe } from "@hookform/resolvers/yup";
|
|
6
|
+
import y from "@mui/material/Grid2";
|
|
7
|
+
import * as F from "yup";
|
|
8
|
+
import { useTheme as Xe, Dialog as Ge, DialogTitle as Ze, Box as m, Typography as $, IconButton as ge, DialogContent as et, FormControlLabel as ae, Checkbox as se, Button as te, CircularProgress as tt, DialogActions as it, TextField as nt } from "@mui/material";
|
|
9
|
+
import ie from "@/views/custom-components/CustomTextArea";
|
|
10
|
+
import O from "@/views/custom-components/CustomTextField";
|
|
11
|
+
import z from "@/views/custom-components/CustomDropdown";
|
|
12
|
+
import ot from "@/views/custom-components/PostgresEditor";
|
|
13
|
+
import { retrieveAllConfigured as rt, execute as pe, getNotificationTypeList as at } from "@/common/services/GlobalApis";
|
|
14
|
+
import { f as st } from "./EventConfig-BY2cgGyx.js";
|
|
15
|
+
import { showToast as ne } from "@/common/toaster/toaster";
|
|
16
|
+
import lt from "@/hooks/useTrackEvent";
|
|
17
|
+
import "./ManageEventConfiguration-DqW3krT6.js";
|
|
18
|
+
import { useTranslateProvider as ct } from "@/common/languageTranslator/TranslationContext";
|
|
19
|
+
import oe from "@/common/fontAwesomeIcons/FontAwesomeIcons";
|
|
20
|
+
import dt from "@/views/custom-components/CkEditor/CkEditor";
|
|
21
|
+
import { l as ut, A as mt, I as ft, F as C, h as ht, e as j, f as gt, j as pt } from "./EventsUi-D6O9S7BK.js";
|
|
22
|
+
function bt() {
|
|
23
|
+
const n = {
|
|
24
|
+
resolve: null,
|
|
25
|
+
promise: null
|
|
26
|
+
};
|
|
27
|
+
return n.promise = new Promise((i) => {
|
|
28
|
+
n.resolve = i;
|
|
29
|
+
}), n;
|
|
30
|
+
}
|
|
31
|
+
function xt(n) {
|
|
32
|
+
let i = null;
|
|
33
|
+
return (...r) => (i || (i = {
|
|
34
|
+
current: n(...r)
|
|
35
|
+
}), i.current);
|
|
36
|
+
}
|
|
37
|
+
const _ = new Array(256).fill("").map((n, i) => ("0" + i.toString(16)).slice(-2));
|
|
38
|
+
function Ct() {
|
|
39
|
+
const [n, i, r, e] = crypto.getRandomValues(new Uint32Array(4));
|
|
40
|
+
return "e" + _[n >> 0 & 255] + _[n >> 8 & 255] + _[n >> 16 & 255] + _[n >> 24 & 255] + _[i >> 0 & 255] + _[i >> 8 & 255] + _[i >> 16 & 255] + _[i >> 24 & 255] + _[r >> 0 & 255] + _[r >> 8 & 255] + _[r >> 16 & 255] + _[r >> 24 & 255] + _[e >> 0 & 255] + _[e >> 8 & 255] + _[e >> 16 & 255] + _[e >> 24 & 255];
|
|
41
|
+
}
|
|
42
|
+
function Ce(n) {
|
|
43
|
+
return !!n && /^\d+\.\d+\.\d+/.test(n);
|
|
44
|
+
}
|
|
45
|
+
function It(n) {
|
|
46
|
+
if (!Ce(n))
|
|
47
|
+
throw new Error(`Invalid semantic version: ${n || "<blank>"}.`);
|
|
48
|
+
const [i, r, e] = n.split(".");
|
|
49
|
+
return {
|
|
50
|
+
major: Number.parseInt(i, 10),
|
|
51
|
+
minor: Number.parseInt(r, 10),
|
|
52
|
+
patch: Number.parseInt(e, 10)
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function Ie(n) {
|
|
56
|
+
return n ? ["nightly", "alpha", "internal", "nightly-", "staging"].some((i) => n.includes(i)) : !1;
|
|
57
|
+
}
|
|
58
|
+
function vt(n) {
|
|
59
|
+
return Ce(n) || Ie(n);
|
|
60
|
+
}
|
|
61
|
+
function Tt(n, i) {
|
|
62
|
+
const r = n.extraPlugins || [];
|
|
63
|
+
return {
|
|
64
|
+
...n,
|
|
65
|
+
extraPlugins: [
|
|
66
|
+
...r,
|
|
67
|
+
...i.filter((e) => !r.includes(e))
|
|
68
|
+
]
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function _t(n) {
|
|
72
|
+
if (Ie(n))
|
|
73
|
+
return 3;
|
|
74
|
+
const { major: i } = It(n);
|
|
75
|
+
switch (!0) {
|
|
76
|
+
case i >= 44:
|
|
77
|
+
return 3;
|
|
78
|
+
case i >= 38:
|
|
79
|
+
return 2;
|
|
80
|
+
default:
|
|
81
|
+
return 1;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function Nt() {
|
|
85
|
+
const { CKEDITOR_VERSION: n, CKEDITOR: i } = window;
|
|
86
|
+
return vt(n) ? {
|
|
87
|
+
source: i ? "cdn" : "npm",
|
|
88
|
+
version: n
|
|
89
|
+
} : null;
|
|
90
|
+
}
|
|
91
|
+
function Et() {
|
|
92
|
+
const n = Nt();
|
|
93
|
+
return n ? _t(n.version) : null;
|
|
94
|
+
}
|
|
95
|
+
function ve(n, i) {
|
|
96
|
+
switch (i || (i = Et() || void 0), i) {
|
|
97
|
+
case 1:
|
|
98
|
+
case 2:
|
|
99
|
+
return n === void 0;
|
|
100
|
+
case 3:
|
|
101
|
+
return n === "GPL";
|
|
102
|
+
default:
|
|
103
|
+
return !1;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function St(n, i) {
|
|
107
|
+
return function(e) {
|
|
108
|
+
ve(e.config.get("licenseKey")) || e.on("collectUsageData", (l, { setUsageData: p }) => {
|
|
109
|
+
p(`integration.${n}`, i);
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
var yt = Object.defineProperty, Ft = (n, i, r) => i in n ? yt(n, i, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[i] = r, E = (n, i, r) => Ft(n, typeof i != "symbol" ? i + "" : i, r);
|
|
114
|
+
/**
|
|
115
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
116
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
117
|
+
*/
|
|
118
|
+
const Te = class _e {
|
|
119
|
+
constructor(i, r) {
|
|
120
|
+
E(this, "_lifecycle"), E(this, "_element"), E(this, "_releaseLock", null), E(this, "_value", null), E(this, "_afterMountCallbacks", []), E(this, "_state", {
|
|
121
|
+
destroyedBeforeInitialization: !1,
|
|
122
|
+
mountingInProgress: null
|
|
123
|
+
}), E(this, "release", xt(() => {
|
|
124
|
+
const { _releaseLock: e, _state: l, _element: p, _lifecycle: h } = this;
|
|
125
|
+
l.mountingInProgress ? l.mountingInProgress.then(() => h.unmount({
|
|
126
|
+
element: p,
|
|
127
|
+
// Mount result might be overridden by watchdog during restart so use instance variable.
|
|
128
|
+
mountResult: this.value
|
|
129
|
+
})).catch((b) => {
|
|
130
|
+
console.error("Semaphore unmounting error:", b);
|
|
131
|
+
}).then(e.resolve).then(() => {
|
|
132
|
+
this._value = null;
|
|
133
|
+
}) : (l.destroyedBeforeInitialization = !0, e.resolve());
|
|
134
|
+
})), this._element = i, this._lifecycle = r, this._lock();
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Getter for {@link #_value}.
|
|
138
|
+
*/
|
|
139
|
+
get value() {
|
|
140
|
+
return this._value;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Occasionally, the Watchdog restarts the editor instance, resulting in a new instance being assigned to the semaphore.
|
|
144
|
+
* In terms of race conditions, it's generally safer to simply override the semaphore value rather than recreating it
|
|
145
|
+
* with a different one.
|
|
146
|
+
*/
|
|
147
|
+
unsafeSetValue(i) {
|
|
148
|
+
this._value = i, this._afterMountCallbacks.forEach((r) => r(i)), this._afterMountCallbacks = [];
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* This registers a callback that will be triggered after the editor has been successfully mounted.
|
|
152
|
+
*
|
|
153
|
+
* * If the editor is already mounted, the callback will be executed immediately.
|
|
154
|
+
* * If the editor is in the process of mounting, the callback will be executed upon successful mounting.
|
|
155
|
+
* * If the editor is never mounted, the passed callback will not be executed.
|
|
156
|
+
* * If an exception is thrown within the callback, it will be re-thrown in the semaphore.
|
|
157
|
+
*/
|
|
158
|
+
runAfterMount(i) {
|
|
159
|
+
const { _value: r, _afterMountCallbacks: e } = this;
|
|
160
|
+
r ? i(r) : e.push(i);
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* This method is used to inform other components that the {@link #_element} will be used by the editor,
|
|
164
|
+
* which is initialized by the {@link #_lifecycle} methods.
|
|
165
|
+
*
|
|
166
|
+
* * If an editor is already present on the provided element, the initialization of the current one
|
|
167
|
+
* will be postponed until the previous one is destroyed.
|
|
168
|
+
*
|
|
169
|
+
* * If the element is empty and does not have an editor attached to it, the currently locked editor will
|
|
170
|
+
* be mounted immediately.
|
|
171
|
+
*
|
|
172
|
+
* After the successful initialization of the editor and the assignment of the {@link #_value} member,
|
|
173
|
+
* the `onReady` lifecycle method is called.
|
|
174
|
+
*
|
|
175
|
+
* *Important note:*
|
|
176
|
+
*
|
|
177
|
+
* It’s really important to keep this method *sync*. If we make this method *async*, it won’t work well because
|
|
178
|
+
* it will cause problems when we’re trying to set up the {@link LifeCycleEditorElementSemaphore#_semaphores} map entries.
|
|
179
|
+
*/
|
|
180
|
+
_lock() {
|
|
181
|
+
const { _semaphores: i } = _e, { _state: r, _element: e, _lifecycle: l } = this, p = i.get(e) || Promise.resolve(null), h = bt();
|
|
182
|
+
this._releaseLock = h;
|
|
183
|
+
const b = p.then(() => r.destroyedBeforeInitialization ? Promise.resolve(void 0) : (r.mountingInProgress = l.mount().then((I) => (I && this.unsafeSetValue(I), I)), r.mountingInProgress)).then(async (I) => {
|
|
184
|
+
I && l.afterMount && await l.afterMount({
|
|
185
|
+
element: e,
|
|
186
|
+
mountResult: I
|
|
187
|
+
});
|
|
188
|
+
}).then(() => h.promise).catch((I) => {
|
|
189
|
+
console.error("Semaphore mounting error:", I);
|
|
190
|
+
}).then(() => {
|
|
191
|
+
i.get(e) === b && i.delete(e);
|
|
192
|
+
});
|
|
193
|
+
i.set(e, b);
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
E(Te, "_semaphores", /* @__PURE__ */ new Map());
|
|
197
|
+
let kt = Te;
|
|
198
|
+
/**
|
|
199
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
200
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
201
|
+
*/
|
|
202
|
+
const wt = "$__CKEditorReactContextMetadata";
|
|
203
|
+
function Pt(n, i) {
|
|
204
|
+
return {
|
|
205
|
+
...i,
|
|
206
|
+
[wt]: n
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
211
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
212
|
+
*/
|
|
213
|
+
const Ot = D.createContext(null), Rt = (n) => !!n && typeof n == "object" && "status" in n && ["initializing", "initialized", "error"].includes(n.status), Ne = (n) => (i) => Rt(i) && i.status === n, be = Ne("initializing"), At = (n) => Ne("initialized")(n) && n.watchdog.state === "ready";
|
|
214
|
+
/**
|
|
215
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
216
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
217
|
+
*/
|
|
218
|
+
const Mt = St(
|
|
219
|
+
"react",
|
|
220
|
+
{
|
|
221
|
+
version: "9.5.0",
|
|
222
|
+
frameworkVersion: D.version
|
|
223
|
+
}
|
|
224
|
+
);
|
|
225
|
+
/**
|
|
226
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
227
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
228
|
+
*/
|
|
229
|
+
function $t(n) {
|
|
230
|
+
return ve(n.licenseKey) ? n : Tt(n, [
|
|
231
|
+
/**
|
|
232
|
+
* This part of the code is not executed in open-source implementations using a GPL key.
|
|
233
|
+
* It only runs when a specific license key is provided. If you are uncertain whether
|
|
234
|
+
* this applies to your installation, please contact our support team.
|
|
235
|
+
*/
|
|
236
|
+
Mt
|
|
237
|
+
]);
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
241
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
242
|
+
*/
|
|
243
|
+
const re = "Lock from React integration (@ckeditor/ckeditor5-react)";
|
|
244
|
+
class Ee extends D.Component {
|
|
245
|
+
constructor(i) {
|
|
246
|
+
super(i), E(this, "domContainer", D.createRef()), E(this, "editorSemaphore", null), this._checkVersion();
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Checks if the CKEditor version used in the application is compatible with the component.
|
|
250
|
+
*/
|
|
251
|
+
_checkVersion() {
|
|
252
|
+
const { CKEDITOR_VERSION: i } = window;
|
|
253
|
+
if (!i)
|
|
254
|
+
return console.warn('Cannot find the "CKEDITOR_VERSION" in the "window" scope.');
|
|
255
|
+
const [r] = i.split(".").map(Number);
|
|
256
|
+
r >= 42 || i.startsWith("0.0.0") || console.warn("The <CKEditor> component requires using CKEditor 5 in version 42+ or nightly build.");
|
|
257
|
+
}
|
|
258
|
+
get _semaphoreValue() {
|
|
259
|
+
const { editorSemaphore: i } = this;
|
|
260
|
+
return i ? i.value : null;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* An watchdog instance.
|
|
264
|
+
*/
|
|
265
|
+
get watchdog() {
|
|
266
|
+
const { _semaphoreValue: i } = this;
|
|
267
|
+
return i ? i.watchdog : null;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* An editor instance.
|
|
271
|
+
*/
|
|
272
|
+
get editor() {
|
|
273
|
+
const { _semaphoreValue: i } = this;
|
|
274
|
+
return i ? i.instance : null;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* The CKEditor component should not be updated by React itself.
|
|
278
|
+
* However, if the component identifier changes, the whole structure should be created once again.
|
|
279
|
+
*/
|
|
280
|
+
shouldComponentUpdate(i) {
|
|
281
|
+
const { props: r, editorSemaphore: e } = this;
|
|
282
|
+
return i.id !== r.id || i.disableWatchdog !== r.disableWatchdog ? !0 : (e && (e.runAfterMount(({ instance: l }) => {
|
|
283
|
+
this._shouldUpdateEditorData(r, i, l) && l.data.set(i.data);
|
|
284
|
+
}), "disabled" in i && e.runAfterMount(({ instance: l }) => {
|
|
285
|
+
i.disabled ? l.enableReadOnlyMode(re) : l.disableReadOnlyMode(re);
|
|
286
|
+
})), !1);
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Initialize the editor when the component is mounted.
|
|
290
|
+
*/
|
|
291
|
+
componentDidMount() {
|
|
292
|
+
be(this.context) || this._initLifeCycleSemaphore();
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Re-render the entire component once again. The old editor will be destroyed and the new one will be created.
|
|
296
|
+
*/
|
|
297
|
+
componentDidUpdate() {
|
|
298
|
+
be(this.context) || this._initLifeCycleSemaphore();
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Destroy the editor before unmounting the component.
|
|
302
|
+
*/
|
|
303
|
+
componentWillUnmount() {
|
|
304
|
+
this._unlockLifeCycleSemaphore();
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Async destroy attached editor and unlock element semaphore.
|
|
308
|
+
*/
|
|
309
|
+
_unlockLifeCycleSemaphore() {
|
|
310
|
+
this.editorSemaphore && (this.editorSemaphore.release(), this.editorSemaphore = null);
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Unlocks previous editor semaphore and creates new one..
|
|
314
|
+
*/
|
|
315
|
+
_initLifeCycleSemaphore() {
|
|
316
|
+
this._unlockLifeCycleSemaphore(), this.editorSemaphore = new kt(this.domContainer.current, {
|
|
317
|
+
mount: async () => this._initializeEditor(),
|
|
318
|
+
afterMount: ({ mountResult: i }) => {
|
|
319
|
+
const { onReady: r } = this.props;
|
|
320
|
+
r && this.domContainer.current !== null && r(i.instance);
|
|
321
|
+
},
|
|
322
|
+
unmount: async ({ element: i, mountResult: r }) => {
|
|
323
|
+
const { onAfterDestroy: e } = this.props;
|
|
324
|
+
try {
|
|
325
|
+
await this._destroyEditor(r), i.innerHTML = "";
|
|
326
|
+
} finally {
|
|
327
|
+
e && e(r.instance);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Render a <div> element which will be replaced by CKEditor.
|
|
334
|
+
*/
|
|
335
|
+
render() {
|
|
336
|
+
return /* @__PURE__ */ D.createElement("div", { ref: this.domContainer });
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Initializes the editor by creating a proper watchdog and initializing it with the editor's configuration.
|
|
340
|
+
*/
|
|
341
|
+
async _initializeEditor() {
|
|
342
|
+
if (this.props.disableWatchdog)
|
|
343
|
+
return {
|
|
344
|
+
instance: await this._createEditor(this.domContainer.current, this._getConfig()),
|
|
345
|
+
watchdog: null
|
|
346
|
+
};
|
|
347
|
+
const i = At(this.context) ? new Dt(this.context.watchdog) : new this.props.editor.EditorWatchdog(this.props.editor, this.props.watchdogConfig), r = {
|
|
348
|
+
current: 0
|
|
349
|
+
};
|
|
350
|
+
return i.setCreator(async (e, l) => {
|
|
351
|
+
var p;
|
|
352
|
+
const { editorSemaphore: h } = this, { onAfterDestroy: b } = this.props;
|
|
353
|
+
r.current > 0 && b && ((p = h == null ? void 0 : h.value) != null && p.instance) && b(h.value.instance);
|
|
354
|
+
const I = await this._createEditor(e, l);
|
|
355
|
+
return h && r.current > 0 && (h.unsafeSetValue({
|
|
356
|
+
instance: I,
|
|
357
|
+
watchdog: i
|
|
358
|
+
}), setTimeout(() => {
|
|
359
|
+
this.props.onReady && this.props.onReady(i.editor);
|
|
360
|
+
})), r.current++, I;
|
|
361
|
+
}), i.on("error", (e, { error: l, causesRestart: p }) => {
|
|
362
|
+
(this.props.onError || console.error)(l, { phase: "runtime", willEditorRestart: p });
|
|
363
|
+
}), await i.create(this.domContainer.current, this._getConfig()).catch((e) => {
|
|
364
|
+
(this.props.onError || console.error)(e, { phase: "initialization", willEditorRestart: !1 });
|
|
365
|
+
}), {
|
|
366
|
+
watchdog: i,
|
|
367
|
+
instance: i.editor
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Creates an editor from the element and configuration.
|
|
372
|
+
*
|
|
373
|
+
* @param element The source element.
|
|
374
|
+
* @param config CKEditor 5 editor configuration.
|
|
375
|
+
*/
|
|
376
|
+
_createEditor(i, r) {
|
|
377
|
+
const { contextItemMetadata: e } = this.props;
|
|
378
|
+
return e && (r = Pt(e, r)), this.props.editor.create(
|
|
379
|
+
i,
|
|
380
|
+
$t(r)
|
|
381
|
+
).then((l) => {
|
|
382
|
+
if ("disabled" in this.props) {
|
|
383
|
+
/* istanbul ignore else -- @preserve */
|
|
384
|
+
this.props.disabled && l.enableReadOnlyMode(re);
|
|
385
|
+
}
|
|
386
|
+
const p = l.model.document, h = l.editing.view.document;
|
|
387
|
+
return p.on("change:data", (b) => {
|
|
388
|
+
/* istanbul ignore else -- @preserve */
|
|
389
|
+
this.props.onChange && this.props.onChange(b, l);
|
|
390
|
+
}), h.on("focus", (b) => {
|
|
391
|
+
/* istanbul ignore else -- @preserve */
|
|
392
|
+
this.props.onFocus && this.props.onFocus(b, l);
|
|
393
|
+
}), h.on("blur", (b) => {
|
|
394
|
+
/* istanbul ignore else -- @preserve */
|
|
395
|
+
this.props.onBlur && this.props.onBlur(b, l);
|
|
396
|
+
}), l;
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Destroys the editor by destroying the watchdog.
|
|
401
|
+
*/
|
|
402
|
+
async _destroyEditor(i) {
|
|
403
|
+
const { watchdog: r, instance: e } = i;
|
|
404
|
+
return new Promise((l, p) => {
|
|
405
|
+
/* istanbul ignore next -- @preserve */
|
|
406
|
+
setTimeout(async () => {
|
|
407
|
+
try {
|
|
408
|
+
if (r)
|
|
409
|
+
return await r.destroy(), l();
|
|
410
|
+
if (e)
|
|
411
|
+
return await e.destroy(), l();
|
|
412
|
+
l();
|
|
413
|
+
} catch (h) {
|
|
414
|
+
console.error(h), p(h);
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Returns true when the editor should be updated.
|
|
421
|
+
*
|
|
422
|
+
* @param prevProps Previous react's properties.
|
|
423
|
+
* @param nextProps React's properties.
|
|
424
|
+
* @param editor Current editor instance.
|
|
425
|
+
*/
|
|
426
|
+
_shouldUpdateEditorData(i, r, e) {
|
|
427
|
+
return !(i.data === r.data || e.data.get() === r.data);
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Returns the editor configuration.
|
|
431
|
+
*/
|
|
432
|
+
_getConfig() {
|
|
433
|
+
const i = this.props.config || {};
|
|
434
|
+
return this.props.data && i.initialData && console.warn(
|
|
435
|
+
"Editor data should be provided either using `config.initialData` or `content` property. The config value takes precedence over `content` property and will be used when both are specified."
|
|
436
|
+
), {
|
|
437
|
+
...i,
|
|
438
|
+
initialData: i.initialData || this.props.data || ""
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
E(Ee, "contextType", Ot);
|
|
443
|
+
class Dt {
|
|
444
|
+
/**
|
|
445
|
+
* @param contextWatchdog The context watchdog instance that will be wrapped into editor watchdog API.
|
|
446
|
+
*/
|
|
447
|
+
constructor(i) {
|
|
448
|
+
E(this, "_contextWatchdog"), E(this, "_id"), E(this, "_creator"), this._contextWatchdog = i, this._id = Ct();
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* @param creator A watchdog's editor creator function.
|
|
452
|
+
*/
|
|
453
|
+
setCreator(i) {
|
|
454
|
+
this._creator = i;
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* Adds an editor configuration to the context watchdog registry. Creates an instance of it.
|
|
458
|
+
*
|
|
459
|
+
* @param sourceElementOrData A source element or data for the new editor.
|
|
460
|
+
* @param config CKEditor 5 editor config.
|
|
461
|
+
*/
|
|
462
|
+
create(i, r) {
|
|
463
|
+
return this._contextWatchdog.add({
|
|
464
|
+
sourceElementOrData: i,
|
|
465
|
+
config: r,
|
|
466
|
+
creator: this._creator,
|
|
467
|
+
id: this._id,
|
|
468
|
+
type: "editor"
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* Creates a listener that is attached to context watchdog's item and run when the context watchdog fires.
|
|
473
|
+
* Currently works only for the `error` event.
|
|
474
|
+
*/
|
|
475
|
+
on(i, r) {
|
|
476
|
+
this._contextWatchdog.on("itemError", (e, { itemId: l, error: p }) => {
|
|
477
|
+
l === this._id && r(null, { error: p, causesRestart: void 0 });
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
destroy() {
|
|
481
|
+
return this._contextWatchdog.state === "ready" ? this._contextWatchdog.remove(this._id) : Promise.resolve();
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* An editor instance.
|
|
485
|
+
*/
|
|
486
|
+
get editor() {
|
|
487
|
+
return this._contextWatchdog.getItem(this._id);
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
492
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
493
|
+
*/
|
|
494
|
+
function Se(...n) {
|
|
495
|
+
return (i) => {
|
|
496
|
+
n.forEach((r) => {
|
|
497
|
+
typeof r == "function" ? r(i) : r != null && (r.current = i);
|
|
498
|
+
});
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
const Vt = He(xe(({ id: n, semaphore: i, rootName: r }, e) => {
|
|
502
|
+
const l = U(null);
|
|
503
|
+
return le(() => {
|
|
504
|
+
let p, h;
|
|
505
|
+
return i.runAfterMount(({ instance: b }) => {
|
|
506
|
+
if (!l.current)
|
|
507
|
+
return;
|
|
508
|
+
h = b;
|
|
509
|
+
const { ui: I, model: N } = h, k = N.document.getRoot(r);
|
|
510
|
+
k && h.ui.getEditableElement(r) && h.detachEditable(k), p = I.view.createEditable(r, l.current), I.addEditable(p), b.editing.view.forceRender();
|
|
511
|
+
}), () => {
|
|
512
|
+
if (h && h.state !== "destroyed" && l.current) {
|
|
513
|
+
const b = h.model.document.getRoot(r);
|
|
514
|
+
/* istanbul ignore else -- @preserve */
|
|
515
|
+
b && h.detachEditable(b);
|
|
516
|
+
}
|
|
517
|
+
};
|
|
518
|
+
}, [i.revision]), /* @__PURE__ */ D.createElement(
|
|
519
|
+
"div",
|
|
520
|
+
{
|
|
521
|
+
key: i.revision,
|
|
522
|
+
id: n,
|
|
523
|
+
ref: Se(e, l)
|
|
524
|
+
}
|
|
525
|
+
);
|
|
526
|
+
}));
|
|
527
|
+
Vt.displayName = "EditorEditable";
|
|
528
|
+
const zt = xe(({ editor: n }, i) => {
|
|
529
|
+
const r = U(null);
|
|
530
|
+
return le(() => {
|
|
531
|
+
const e = r.current;
|
|
532
|
+
if (!n || !e)
|
|
533
|
+
return;
|
|
534
|
+
const l = n.ui.view.toolbar.element;
|
|
535
|
+
return e.appendChild(l), () => {
|
|
536
|
+
e.contains(l) && e.removeChild(l);
|
|
537
|
+
};
|
|
538
|
+
}, [n && n.id]), /* @__PURE__ */ D.createElement("div", { ref: Se(r, i) });
|
|
539
|
+
});
|
|
540
|
+
zt.displayName = "EditorToolbarWrapper";
|
|
541
|
+
const Wt = 5 * 1024 * 1024, Y = ({
|
|
542
|
+
param: n,
|
|
543
|
+
index: i,
|
|
544
|
+
control: r,
|
|
545
|
+
translate: e,
|
|
546
|
+
setValue: l,
|
|
547
|
+
handleChange: p,
|
|
548
|
+
testIdPrefix: h,
|
|
549
|
+
valueTestIdSuffix: b,
|
|
550
|
+
checkboxTestId: I
|
|
551
|
+
}) => /* @__PURE__ */ c(
|
|
552
|
+
m,
|
|
553
|
+
{
|
|
554
|
+
sx: {
|
|
555
|
+
display: "flex",
|
|
556
|
+
flexDirection: "column",
|
|
557
|
+
gap: 0.5,
|
|
558
|
+
p: 1.5,
|
|
559
|
+
border: "1px solid",
|
|
560
|
+
borderColor: "divider",
|
|
561
|
+
borderRadius: (N) => `${N.shape.borderRadius}px`
|
|
562
|
+
},
|
|
563
|
+
children: [
|
|
564
|
+
/* @__PURE__ */ c(
|
|
565
|
+
m,
|
|
566
|
+
{
|
|
567
|
+
sx: {
|
|
568
|
+
display: "flex",
|
|
569
|
+
justifyContent: "space-between",
|
|
570
|
+
alignItems: "center",
|
|
571
|
+
gap: 2,
|
|
572
|
+
flexWrap: "wrap"
|
|
573
|
+
},
|
|
574
|
+
children: [
|
|
575
|
+
/* @__PURE__ */ s(
|
|
576
|
+
$,
|
|
577
|
+
{
|
|
578
|
+
variant: "body2",
|
|
579
|
+
sx: { fontWeight: 600, fontFamily: "monospace" },
|
|
580
|
+
children: n == null ? void 0 : n.parameterName
|
|
581
|
+
}
|
|
582
|
+
),
|
|
583
|
+
/* @__PURE__ */ s(
|
|
584
|
+
H,
|
|
585
|
+
{
|
|
586
|
+
control: r,
|
|
587
|
+
name: `${n == null ? void 0 : n.parameterName}${i}isFixed`,
|
|
588
|
+
defaultValue: (n == null ? void 0 : n.isFixed) || !1,
|
|
589
|
+
render: ({ field: N }) => /* @__PURE__ */ s(
|
|
590
|
+
ae,
|
|
591
|
+
{
|
|
592
|
+
sx: { mr: 0 },
|
|
593
|
+
control: /* @__PURE__ */ s(
|
|
594
|
+
se,
|
|
595
|
+
{
|
|
596
|
+
size: "small",
|
|
597
|
+
checked: !!N.value,
|
|
598
|
+
onChange: (k) => {
|
|
599
|
+
N.onChange(k.target.checked), p(i, "isFixed", k.target.checked);
|
|
600
|
+
},
|
|
601
|
+
"data-testid": I
|
|
602
|
+
}
|
|
603
|
+
),
|
|
604
|
+
label: /* @__PURE__ */ s($, { variant: "body2", children: e("Is Fixed Value") })
|
|
605
|
+
}
|
|
606
|
+
)
|
|
607
|
+
}
|
|
608
|
+
)
|
|
609
|
+
]
|
|
610
|
+
}
|
|
611
|
+
),
|
|
612
|
+
/* @__PURE__ */ s(
|
|
613
|
+
H,
|
|
614
|
+
{
|
|
615
|
+
control: r,
|
|
616
|
+
name: `${n == null ? void 0 : n.parameterName}${i}`,
|
|
617
|
+
defaultValue: (n == null ? void 0 : n.mappingValue) || "",
|
|
618
|
+
render: ({ field: N }) => /* @__PURE__ */ s(
|
|
619
|
+
nt,
|
|
620
|
+
{
|
|
621
|
+
variant: "outlined",
|
|
622
|
+
size: "small",
|
|
623
|
+
...N,
|
|
624
|
+
fullWidth: !0,
|
|
625
|
+
placeholder: e("Placeholder or fixed value"),
|
|
626
|
+
onChange: (k) => {
|
|
627
|
+
l(`${n == null ? void 0 : n.parameterName}${i}`, k.target.value), p(i, "mappingValue", k.target.value);
|
|
628
|
+
},
|
|
629
|
+
"data-testid": `${h}${n == null ? void 0 : n.parameterName}${i}${b}`
|
|
630
|
+
}
|
|
631
|
+
)
|
|
632
|
+
}
|
|
633
|
+
)
|
|
634
|
+
]
|
|
635
|
+
}
|
|
636
|
+
);
|
|
637
|
+
Y.propTypes = {
|
|
638
|
+
param: S.any,
|
|
639
|
+
index: S.number,
|
|
640
|
+
control: S.any,
|
|
641
|
+
translate: S.func,
|
|
642
|
+
setValue: S.func,
|
|
643
|
+
handleChange: S.func,
|
|
644
|
+
testIdPrefix: S.string,
|
|
645
|
+
valueTestIdSuffix: S.string,
|
|
646
|
+
checkboxTestId: S.string
|
|
647
|
+
};
|
|
648
|
+
const Ut = ({
|
|
649
|
+
open: n,
|
|
650
|
+
handleClose: i,
|
|
651
|
+
handleClick: r,
|
|
652
|
+
type: e
|
|
653
|
+
}) => {
|
|
654
|
+
const l = Xe(), p = l.palette.mode === "dark", h = U(null), b = U(!1), I = lt(), [N, k] = V([]), [B, ye] = V([]), [Q, Fe] = V([]), { translate: a } = ct(), [X, ke] = V([]), W = U(null), [G, ce] = V(!1), [de, q] = V(""), we = F.object().shape({
|
|
655
|
+
excetionTypes: F.string().test(
|
|
656
|
+
"is-required",
|
|
657
|
+
"Execution type is required",
|
|
658
|
+
function(t) {
|
|
659
|
+
return (e == null ? void 0 : e.type) === "EXCEPTION" ? !!t : !0;
|
|
660
|
+
}
|
|
661
|
+
),
|
|
662
|
+
mobileNumberFieldName: F.string().test(
|
|
663
|
+
"is-required",
|
|
664
|
+
"Enter Sms contact number field name",
|
|
665
|
+
function(t) {
|
|
666
|
+
return (e == null ? void 0 : e.type) === "SMS" ? !!t : !0;
|
|
667
|
+
}
|
|
668
|
+
),
|
|
669
|
+
smsTypeField: F.string().test(
|
|
670
|
+
"is-required",
|
|
671
|
+
"Enter Sms Type Field",
|
|
672
|
+
function(t) {
|
|
673
|
+
return (e == null ? void 0 : e.type) === "SMS" ? !!t : !0;
|
|
674
|
+
}
|
|
675
|
+
),
|
|
676
|
+
trigerWhen: F.string().test(
|
|
677
|
+
"is-required",
|
|
678
|
+
"trigerWhen is required",
|
|
679
|
+
function(t) {
|
|
680
|
+
return (e == null ? void 0 : e.type) != "EXCEPTION" && (e == null ? void 0 : e.type) != "SYSTEM_FUNCTION" ? !!t : !0;
|
|
681
|
+
}
|
|
682
|
+
),
|
|
683
|
+
baseDateFieldName: F.string().test(
|
|
684
|
+
"is-required",
|
|
685
|
+
"Enter Email Id field name",
|
|
686
|
+
function(t) {
|
|
687
|
+
return (e == null ? void 0 : e.type) === "EMAIL" ? !!t : !0;
|
|
688
|
+
}
|
|
689
|
+
),
|
|
690
|
+
emailSubject: F.string().test(
|
|
691
|
+
"is-required",
|
|
692
|
+
"Enter email subject",
|
|
693
|
+
function(t) {
|
|
694
|
+
return (e == null ? void 0 : e.type) === "EMAIL" ? !!t : !0;
|
|
695
|
+
}
|
|
696
|
+
),
|
|
697
|
+
notificationTypeId: F.string().test(
|
|
698
|
+
"is-required",
|
|
699
|
+
"Select type",
|
|
700
|
+
function(t) {
|
|
701
|
+
return (e == null ? void 0 : e.type) === "PUSH_NOTIFICATION" ? !!t : !0;
|
|
702
|
+
}
|
|
703
|
+
),
|
|
704
|
+
userFieldName: F.string().test(
|
|
705
|
+
"is-required",
|
|
706
|
+
"Enter User Id field name",
|
|
707
|
+
function(t) {
|
|
708
|
+
return (e == null ? void 0 : e.type) === "PUSH_NOTIFICATION" ? !!t : !0;
|
|
709
|
+
}
|
|
710
|
+
),
|
|
711
|
+
heading: F.string().test(
|
|
712
|
+
"is-required",
|
|
713
|
+
"Enter heading",
|
|
714
|
+
function(t) {
|
|
715
|
+
return (e == null ? void 0 : e.type) === "PUSH_NOTIFICATION" && Z ? !!t : !0;
|
|
716
|
+
}
|
|
717
|
+
),
|
|
718
|
+
template: F.string().test(
|
|
719
|
+
"is-required",
|
|
720
|
+
"Enter Template",
|
|
721
|
+
function(t) {
|
|
722
|
+
return (e == null ? void 0 : e.type) === "PUSH_NOTIFICATION" && Z ? !!t : !0;
|
|
723
|
+
}
|
|
724
|
+
)
|
|
725
|
+
}), {
|
|
726
|
+
control: x,
|
|
727
|
+
handleSubmit: Pe,
|
|
728
|
+
reset: L,
|
|
729
|
+
setValue: g,
|
|
730
|
+
unregister: ue,
|
|
731
|
+
getValues: me,
|
|
732
|
+
watch: P,
|
|
733
|
+
formState: { errors: T, isSubmitting: Oe }
|
|
734
|
+
} = Be({
|
|
735
|
+
defaultValues: {},
|
|
736
|
+
resolver: Qe(we),
|
|
737
|
+
mode: "onChange"
|
|
738
|
+
});
|
|
739
|
+
le(() => {
|
|
740
|
+
var t;
|
|
741
|
+
e && (We(), (t = Object.keys(e)) == null || t.forEach((o) => {
|
|
742
|
+
var d, u, f;
|
|
743
|
+
if (o === "index" && g(o, e[o]), o === "smsConfigJson" && e[o]) {
|
|
744
|
+
const v = e[o];
|
|
745
|
+
(d = Object.keys(v)) == null || d.forEach((w) => {
|
|
746
|
+
g(w, v[w]);
|
|
747
|
+
});
|
|
748
|
+
} else if (o === "pushNotificationConfigJson" && e[o]) {
|
|
749
|
+
const v = e[o];
|
|
750
|
+
(u = Object.keys(v)) == null || u.forEach((w) => {
|
|
751
|
+
g(w, v[w]);
|
|
752
|
+
});
|
|
753
|
+
} else if (o === "kafkaConfigJson" && e[o]) {
|
|
754
|
+
const v = e[o];
|
|
755
|
+
(f = Object.keys(v)) == null || f.forEach((w) => {
|
|
756
|
+
g(w, v[w]);
|
|
757
|
+
});
|
|
758
|
+
} else e[o] !== void 0 && e[o] !== null && (g(o, e[o]), o === "miniute" && g("minute", e[o]));
|
|
759
|
+
}), e != null && e.emailImageId && q(a("Attachment uploaded")));
|
|
760
|
+
}, [e]);
|
|
761
|
+
const R = P("queryMasterParamJson"), fe = P("queryCode"), Re = P("systemFunctionId"), A = P("functionParams"), Ae = P("trigerWhen"), Z = P("notificationTypeId"), M = P("kafkaParameterJson"), he = P("formType"), Me = P("template"), $e = async (t) => {
|
|
762
|
+
var u;
|
|
763
|
+
R && R.forEach((f, v) => {
|
|
764
|
+
g(`${f.parameterName}${v}`, ""), g(`${f.parameterName}${v}isFixed`, !1);
|
|
765
|
+
});
|
|
766
|
+
let o = [];
|
|
767
|
+
const d = N == null ? void 0 : N.find((f) => (f == null ? void 0 : f.code) === t);
|
|
768
|
+
if (d) {
|
|
769
|
+
const f = (u = d == null ? void 0 : d.params) == null ? void 0 : u.split(",");
|
|
770
|
+
Array.from(new Set(f)).forEach((w) => {
|
|
771
|
+
o.push({ parameterName: w });
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
g("queryMasterParamJson", o);
|
|
775
|
+
}, De = (t) => {
|
|
776
|
+
A && A.forEach((u, f) => {
|
|
777
|
+
g(`${u.parameterName}${f}`, ""), g(`${u.parameterName}${f}isFixed`, !1);
|
|
778
|
+
});
|
|
779
|
+
let o = [];
|
|
780
|
+
const d = B.find((u) => u.id === t);
|
|
781
|
+
d && Array.from(new Set(d.parameters)).forEach((f) => {
|
|
782
|
+
o.push(f);
|
|
783
|
+
}), g("functionParams", o);
|
|
784
|
+
}, Ve = (t) => {
|
|
785
|
+
const o = X.find(
|
|
786
|
+
(d) => d.id === t
|
|
787
|
+
);
|
|
788
|
+
o && (g("notificationType", o), g("template", o.message), g("heading", o.heading));
|
|
789
|
+
}, ee = (t, o, d) => {
|
|
790
|
+
if ((e == null ? void 0 : e.type) === "QUERY") {
|
|
791
|
+
const u = [...R];
|
|
792
|
+
u[t][o] = d, g("queryMasterParamJson", u);
|
|
793
|
+
}
|
|
794
|
+
if ((e == null ? void 0 : e.type) === "SYSTEM_FUNCTION") {
|
|
795
|
+
const u = [...A];
|
|
796
|
+
u[t][o] = d, g("functionParams", u);
|
|
797
|
+
}
|
|
798
|
+
if ((e == null ? void 0 : e.type) === "KAFKA_SYNC") {
|
|
799
|
+
const u = [...M];
|
|
800
|
+
u[t][o] = d, g("kafkaParameterJson", u);
|
|
801
|
+
}
|
|
802
|
+
}, ze = (t) => {
|
|
803
|
+
const o = me("kafkaParameterJson");
|
|
804
|
+
o && Array.isArray(o) && (o.forEach((u, f) => {
|
|
805
|
+
ue(`${u.parameterName}${f}`), ue(`${u.parameterName}${f}isFixed`);
|
|
806
|
+
}), g("kafkaParameterJson", [], { shouldValidate: !0 }));
|
|
807
|
+
const d = Q.find(
|
|
808
|
+
(u) => u.form_type === t
|
|
809
|
+
);
|
|
810
|
+
if (d && d.param_types) {
|
|
811
|
+
const u = JSON.parse(d.param_types), f = Object.keys(u).map((v) => ({
|
|
812
|
+
parameterName: v,
|
|
813
|
+
mappingValue: "",
|
|
814
|
+
isFixed: !1
|
|
815
|
+
}));
|
|
816
|
+
g("kafkaParameterJson", f, { shouldValidate: !0 });
|
|
817
|
+
} else
|
|
818
|
+
g("kafkaParameterJson", [], { shouldValidate: !0 });
|
|
819
|
+
}, We = async () => {
|
|
820
|
+
var t, o;
|
|
821
|
+
try {
|
|
822
|
+
if ((e == null ? void 0 : e.type) === "QUERY") {
|
|
823
|
+
const d = await rt(!0);
|
|
824
|
+
k(d == null ? void 0 : d.data);
|
|
825
|
+
}
|
|
826
|
+
if ((e == null ? void 0 : e.type) === "SYSTEM_FUNCTION") {
|
|
827
|
+
const u = await pe({
|
|
828
|
+
code: "system_function_retrieve_all",
|
|
829
|
+
parameters: {}
|
|
830
|
+
}), f = (t = u == null ? void 0 : u.data) == null ? void 0 : t.result.map((v) => (v.parameters = JSON.parse(v.parameters), v));
|
|
831
|
+
ye(f);
|
|
832
|
+
}
|
|
833
|
+
if ((e == null ? void 0 : e.type) === "PUSH_NOTIFICATION") {
|
|
834
|
+
const d = await at();
|
|
835
|
+
ke(d == null ? void 0 : d.data);
|
|
836
|
+
}
|
|
837
|
+
if ((e == null ? void 0 : e.type) === "KAFKA_SYNC") {
|
|
838
|
+
const d = await pe({
|
|
839
|
+
code: "retrieve_all_kafka_configs",
|
|
840
|
+
parameters: {}
|
|
841
|
+
});
|
|
842
|
+
Fe(((o = d == null ? void 0 : d.data) == null ? void 0 : o.result) || []);
|
|
843
|
+
}
|
|
844
|
+
} catch {
|
|
845
|
+
ne({
|
|
846
|
+
message: "Could not load the options for this action. Please try again.",
|
|
847
|
+
type: "error"
|
|
848
|
+
});
|
|
849
|
+
}
|
|
850
|
+
}, K = () => {
|
|
851
|
+
I("conversion_event", {
|
|
852
|
+
form: h.current,
|
|
853
|
+
form_name: "Add Other Type Configuration",
|
|
854
|
+
submit: b.current
|
|
855
|
+
}), i();
|
|
856
|
+
}, Ue = (t) => {
|
|
857
|
+
t = JSON.parse(JSON.stringify(t)), t.minute = Number(t.minute || 0), t.miniute = Number(t.minute || 0), t.type = e == null ? void 0 : e.type, e.type === "SMS" && (t.smsConfigJson = {
|
|
858
|
+
mobileNumberFieldName: t.mobileNumberFieldName,
|
|
859
|
+
isPriority: t.isPriority,
|
|
860
|
+
isSmsTypeFixed: t.isSmsTypeFixed,
|
|
861
|
+
smsTypeField: t.smsTypeField
|
|
862
|
+
}, delete t.mobileNumberFieldName, delete t.isPriority, delete t.isSmsTypeFixed, delete t.smsTypeField), e.type === "PUSH_NOTIFICATION" && (t.pushNotificationConfigJson = {
|
|
863
|
+
notificationTypeId: t.notificationTypeId,
|
|
864
|
+
userFieldName: t.userFieldName,
|
|
865
|
+
heading: t.heading,
|
|
866
|
+
template: t.template
|
|
867
|
+
}, delete t.notificationTypeId, delete t.userFieldName, delete t.heading, delete t.template), e.type === "KAFKA_SYNC" && (t.kafkaConfigJson = {
|
|
868
|
+
formType: t.formType,
|
|
869
|
+
kafkaParameterJson: t.kafkaParameterJson
|
|
870
|
+
}), R == null || R.forEach((o, d) => {
|
|
871
|
+
delete t[`${o == null ? void 0 : o.parameterName}${d}`], delete t[`${o == null ? void 0 : o.parameterName}${d}isFixed`];
|
|
872
|
+
}), A == null || A.forEach((o, d) => {
|
|
873
|
+
delete t[`${o == null ? void 0 : o.parameterName}${d}`], delete t[`${o == null ? void 0 : o.parameterName}${d}isFixed`];
|
|
874
|
+
}), M == null || M.forEach((o, d) => {
|
|
875
|
+
delete t[`${o == null ? void 0 : o.parameterName}${d}`], delete t[`${o == null ? void 0 : o.parameterName}${d}isFixed`];
|
|
876
|
+
}), r(t), b.current = !0, K(), q(""), L();
|
|
877
|
+
}, qe = J(
|
|
878
|
+
() => (N || []).map((t) => ({
|
|
879
|
+
value: t == null ? void 0 : t.code,
|
|
880
|
+
label: t == null ? void 0 : t.code
|
|
881
|
+
})),
|
|
882
|
+
[N]
|
|
883
|
+
), Le = J(
|
|
884
|
+
() => (B || []).map((t) => ({
|
|
885
|
+
value: t == null ? void 0 : t.id,
|
|
886
|
+
label: `${t == null ? void 0 : t.name} (${t == null ? void 0 : t.className})`
|
|
887
|
+
})),
|
|
888
|
+
[B]
|
|
889
|
+
), Ke = J(
|
|
890
|
+
() => (X || []).map((t) => ({
|
|
891
|
+
value: t == null ? void 0 : t.id,
|
|
892
|
+
label: t == null ? void 0 : t.type
|
|
893
|
+
})),
|
|
894
|
+
[X]
|
|
895
|
+
), Je = J(
|
|
896
|
+
() => (Q || []).map((t) => ({
|
|
897
|
+
value: t.form_type,
|
|
898
|
+
label: t.form_type
|
|
899
|
+
})),
|
|
900
|
+
[Q]
|
|
901
|
+
), je = a(ut(mt, e == null ? void 0 : e.type));
|
|
902
|
+
return /* @__PURE__ */ c(
|
|
903
|
+
Ge,
|
|
904
|
+
{
|
|
905
|
+
"data-testid": "othertypeeventconfigmodal-modal",
|
|
906
|
+
open: n,
|
|
907
|
+
fullWidth: !0,
|
|
908
|
+
maxWidth: "md",
|
|
909
|
+
onClose: () => {
|
|
910
|
+
K(), L();
|
|
911
|
+
},
|
|
912
|
+
children: [
|
|
913
|
+
/* @__PURE__ */ c(
|
|
914
|
+
Ze,
|
|
915
|
+
{
|
|
916
|
+
sx: {
|
|
917
|
+
display: "flex",
|
|
918
|
+
alignItems: "flex-start",
|
|
919
|
+
justifyContent: "space-between",
|
|
920
|
+
gap: 2,
|
|
921
|
+
pt: 2,
|
|
922
|
+
pb: 3,
|
|
923
|
+
borderBottom: "1px solid",
|
|
924
|
+
borderColor: "divider"
|
|
925
|
+
},
|
|
926
|
+
"data-testid": "othertypeeventconfigmodal-modal-header",
|
|
927
|
+
children: [
|
|
928
|
+
/* @__PURE__ */ c(m, { children: [
|
|
929
|
+
/* @__PURE__ */ c(
|
|
930
|
+
$,
|
|
931
|
+
{
|
|
932
|
+
variant: "subtitle1",
|
|
933
|
+
component: "span",
|
|
934
|
+
sx: { fontWeight: 700, display: "block" },
|
|
935
|
+
children: [
|
|
936
|
+
a("Add"),
|
|
937
|
+
" ",
|
|
938
|
+
je,
|
|
939
|
+
" ",
|
|
940
|
+
a("Configuration")
|
|
941
|
+
]
|
|
942
|
+
}
|
|
943
|
+
),
|
|
944
|
+
/* @__PURE__ */ s($, { variant: "body2", color: "text.secondary", children: a(
|
|
945
|
+
"This action runs for every row the query returns that matches the condition."
|
|
946
|
+
) })
|
|
947
|
+
] }),
|
|
948
|
+
/* @__PURE__ */ s(
|
|
949
|
+
ge,
|
|
950
|
+
{
|
|
951
|
+
size: "small",
|
|
952
|
+
onClick: () => {
|
|
953
|
+
K(), L();
|
|
954
|
+
},
|
|
955
|
+
"aria-label": a("Close"),
|
|
956
|
+
"data-testid": "othertypeeventconfigmodal-close-button",
|
|
957
|
+
children: /* @__PURE__ */ s(oe, { iconName: "faXmark" })
|
|
958
|
+
}
|
|
959
|
+
)
|
|
960
|
+
]
|
|
961
|
+
}
|
|
962
|
+
),
|
|
963
|
+
/* @__PURE__ */ c(
|
|
964
|
+
m,
|
|
965
|
+
{
|
|
966
|
+
component: "form",
|
|
967
|
+
onSubmit: Pe(Ue),
|
|
968
|
+
ref: h,
|
|
969
|
+
"data-testid": "othertypeeventconfigmodal-form",
|
|
970
|
+
sx: {
|
|
971
|
+
display: "flex",
|
|
972
|
+
flexDirection: "column",
|
|
973
|
+
minHeight: 0,
|
|
974
|
+
overflow: "hidden"
|
|
975
|
+
},
|
|
976
|
+
children: [
|
|
977
|
+
/* @__PURE__ */ s(
|
|
978
|
+
et,
|
|
979
|
+
{
|
|
980
|
+
sx: { "&.MuiDialogContent-root": { pt: 3 } },
|
|
981
|
+
children: /* @__PURE__ */ c(m, { sx: { display: "flex", flexDirection: "column", gap: 3 }, children: [
|
|
982
|
+
/* @__PURE__ */ s(
|
|
983
|
+
ft,
|
|
984
|
+
{
|
|
985
|
+
params: e == null ? void 0 : e.implicitParam,
|
|
986
|
+
translate: a,
|
|
987
|
+
label: a("Available Implicit Parameters")
|
|
988
|
+
}
|
|
989
|
+
),
|
|
990
|
+
(e == null ? void 0 : e.type) === "EXCEPTION" && /* @__PURE__ */ c(m, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
991
|
+
/* @__PURE__ */ c(m, { "data-testid": "othertypeeventconfigmodal-exceptionType", children: [
|
|
992
|
+
/* @__PURE__ */ c(C, { required: !0, children: [
|
|
993
|
+
a("Exception"),
|
|
994
|
+
" ",
|
|
995
|
+
a("Type")
|
|
996
|
+
] }),
|
|
997
|
+
/* @__PURE__ */ s(
|
|
998
|
+
z,
|
|
999
|
+
{
|
|
1000
|
+
control: x,
|
|
1001
|
+
name: "excetionTypes",
|
|
1002
|
+
options: ht.map((t) => ({
|
|
1003
|
+
value: t.value,
|
|
1004
|
+
label: a(t.label)
|
|
1005
|
+
})),
|
|
1006
|
+
displayName: "label",
|
|
1007
|
+
optionValue: "value",
|
|
1008
|
+
errors: T,
|
|
1009
|
+
dataTestId: "othertypeeventconfigmodal-excetionTypes-select"
|
|
1010
|
+
}
|
|
1011
|
+
)
|
|
1012
|
+
] }),
|
|
1013
|
+
/* @__PURE__ */ c(m, { "data-testid": "othertypeeventconfigmodal-exceptionMessage", children: [
|
|
1014
|
+
/* @__PURE__ */ s(
|
|
1015
|
+
C,
|
|
1016
|
+
{
|
|
1017
|
+
hint: a("Shown to whoever looks at the failed run"),
|
|
1018
|
+
children: a("Message")
|
|
1019
|
+
}
|
|
1020
|
+
),
|
|
1021
|
+
/* @__PURE__ */ s(
|
|
1022
|
+
ie,
|
|
1023
|
+
{
|
|
1024
|
+
control: x,
|
|
1025
|
+
id: "exceptionMessage",
|
|
1026
|
+
name: "exceptionMessage",
|
|
1027
|
+
errors: T,
|
|
1028
|
+
label: "",
|
|
1029
|
+
minRows: 4,
|
|
1030
|
+
"data-testid": "othertypeeventconfigmodal-exceptionMessage-customtextarea"
|
|
1031
|
+
}
|
|
1032
|
+
)
|
|
1033
|
+
] })
|
|
1034
|
+
] }),
|
|
1035
|
+
(e == null ? void 0 : e.type) === "SMS" && /* @__PURE__ */ c(m, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
1036
|
+
/* @__PURE__ */ c(m, { "data-testid": "othertypeeventconfigmodal-mobileNumberFieldName", children: [
|
|
1037
|
+
/* @__PURE__ */ c(C, { required: !0, children: [
|
|
1038
|
+
a("SMS"),
|
|
1039
|
+
" ",
|
|
1040
|
+
a("Phone number"),
|
|
1041
|
+
" ",
|
|
1042
|
+
a("Field"),
|
|
1043
|
+
" ",
|
|
1044
|
+
a("Name")
|
|
1045
|
+
] }),
|
|
1046
|
+
/* @__PURE__ */ s(
|
|
1047
|
+
O,
|
|
1048
|
+
{
|
|
1049
|
+
control: x,
|
|
1050
|
+
id: "mobileNumberFieldName",
|
|
1051
|
+
name: "mobileNumberFieldName",
|
|
1052
|
+
errors: T,
|
|
1053
|
+
label: "",
|
|
1054
|
+
size: "small",
|
|
1055
|
+
dataTestId: "othertypeeventconfigmodal-mobileNumberFieldName-textfield"
|
|
1056
|
+
}
|
|
1057
|
+
)
|
|
1058
|
+
] }),
|
|
1059
|
+
/* @__PURE__ */ c(m, { "data-testid": "othertypeeventconfigmodal-smsTypeField", children: [
|
|
1060
|
+
/* @__PURE__ */ c(
|
|
1061
|
+
m,
|
|
1062
|
+
{
|
|
1063
|
+
sx: {
|
|
1064
|
+
display: "flex",
|
|
1065
|
+
justifyContent: "space-between",
|
|
1066
|
+
alignItems: "center",
|
|
1067
|
+
gap: 2,
|
|
1068
|
+
flexWrap: "wrap"
|
|
1069
|
+
},
|
|
1070
|
+
children: [
|
|
1071
|
+
/* @__PURE__ */ c(C, { required: !0, children: [
|
|
1072
|
+
a("SMS"),
|
|
1073
|
+
" ",
|
|
1074
|
+
a("Type"),
|
|
1075
|
+
" ",
|
|
1076
|
+
a("Field"),
|
|
1077
|
+
" ",
|
|
1078
|
+
a("Value")
|
|
1079
|
+
] }),
|
|
1080
|
+
/* @__PURE__ */ c(m, { sx: { display: "flex", gap: 1, flexWrap: "wrap" }, children: [
|
|
1081
|
+
/* @__PURE__ */ s(
|
|
1082
|
+
H,
|
|
1083
|
+
{
|
|
1084
|
+
control: x,
|
|
1085
|
+
name: "isPriority",
|
|
1086
|
+
defaultValue: !1,
|
|
1087
|
+
render: ({ field: t }) => /* @__PURE__ */ s(
|
|
1088
|
+
ae,
|
|
1089
|
+
{
|
|
1090
|
+
sx: { mr: 0 },
|
|
1091
|
+
control: /* @__PURE__ */ s(
|
|
1092
|
+
se,
|
|
1093
|
+
{
|
|
1094
|
+
size: "small",
|
|
1095
|
+
checked: !!t.value,
|
|
1096
|
+
onChange: (o) => t.onChange(o.target.checked),
|
|
1097
|
+
"data-testid": "othertypeeventconfigmodal-isPriority-checkbox"
|
|
1098
|
+
}
|
|
1099
|
+
),
|
|
1100
|
+
label: /* @__PURE__ */ s($, { variant: "body2", children: a("Is Priority") })
|
|
1101
|
+
}
|
|
1102
|
+
)
|
|
1103
|
+
}
|
|
1104
|
+
),
|
|
1105
|
+
/* @__PURE__ */ s(
|
|
1106
|
+
H,
|
|
1107
|
+
{
|
|
1108
|
+
control: x,
|
|
1109
|
+
name: "isSmsTypeFixed",
|
|
1110
|
+
defaultValue: !1,
|
|
1111
|
+
render: ({ field: t }) => /* @__PURE__ */ s(
|
|
1112
|
+
ae,
|
|
1113
|
+
{
|
|
1114
|
+
sx: { mr: 0 },
|
|
1115
|
+
control: /* @__PURE__ */ s(
|
|
1116
|
+
se,
|
|
1117
|
+
{
|
|
1118
|
+
size: "small",
|
|
1119
|
+
checked: !!t.value,
|
|
1120
|
+
onChange: (o) => t.onChange(o.target.checked),
|
|
1121
|
+
"data-testid": "othertypeeventconfigmodal-isSmsTypeFixed-checkbox"
|
|
1122
|
+
}
|
|
1123
|
+
),
|
|
1124
|
+
label: /* @__PURE__ */ s($, { variant: "body2", children: a("Is Fixed Value") })
|
|
1125
|
+
}
|
|
1126
|
+
)
|
|
1127
|
+
}
|
|
1128
|
+
)
|
|
1129
|
+
] })
|
|
1130
|
+
]
|
|
1131
|
+
}
|
|
1132
|
+
),
|
|
1133
|
+
/* @__PURE__ */ s(
|
|
1134
|
+
O,
|
|
1135
|
+
{
|
|
1136
|
+
control: x,
|
|
1137
|
+
id: "smsTypeField",
|
|
1138
|
+
name: "smsTypeField",
|
|
1139
|
+
errors: T,
|
|
1140
|
+
label: "",
|
|
1141
|
+
size: "small",
|
|
1142
|
+
dataTestId: "othertypeeventconfigmodal-smsTypeField-textfield"
|
|
1143
|
+
}
|
|
1144
|
+
)
|
|
1145
|
+
] })
|
|
1146
|
+
] }),
|
|
1147
|
+
(e == null ? void 0 : e.type) === "EMAIL" && /* @__PURE__ */ c(m, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
1148
|
+
/* @__PURE__ */ c(y, { container: !0, spacing: 2, alignItems: "flex-start", children: [
|
|
1149
|
+
/* @__PURE__ */ c(
|
|
1150
|
+
y,
|
|
1151
|
+
{
|
|
1152
|
+
size: { xs: 12, md: 6 },
|
|
1153
|
+
"data-testid": "othertypeeventconfigmodal-emailIdField",
|
|
1154
|
+
children: [
|
|
1155
|
+
/* @__PURE__ */ c(C, { required: !0, children: [
|
|
1156
|
+
a("Email"),
|
|
1157
|
+
" ",
|
|
1158
|
+
a("Id"),
|
|
1159
|
+
" ",
|
|
1160
|
+
a("Field"),
|
|
1161
|
+
" ",
|
|
1162
|
+
a("Value")
|
|
1163
|
+
] }),
|
|
1164
|
+
/* @__PURE__ */ s(
|
|
1165
|
+
O,
|
|
1166
|
+
{
|
|
1167
|
+
control: x,
|
|
1168
|
+
id: "baseDateFieldName",
|
|
1169
|
+
name: "baseDateFieldName",
|
|
1170
|
+
errors: T,
|
|
1171
|
+
label: "",
|
|
1172
|
+
size: "small",
|
|
1173
|
+
dataTestId: "othertypeeventconfigmodal-baseDateFieldName-textfield"
|
|
1174
|
+
}
|
|
1175
|
+
)
|
|
1176
|
+
]
|
|
1177
|
+
}
|
|
1178
|
+
),
|
|
1179
|
+
/* @__PURE__ */ c(
|
|
1180
|
+
y,
|
|
1181
|
+
{
|
|
1182
|
+
size: { xs: 12, md: 6 },
|
|
1183
|
+
"data-testid": "othertypeeventconfigmodal-emailSubjectField",
|
|
1184
|
+
children: [
|
|
1185
|
+
/* @__PURE__ */ c(C, { required: !0, children: [
|
|
1186
|
+
a("Email"),
|
|
1187
|
+
" ",
|
|
1188
|
+
a("Subject")
|
|
1189
|
+
] }),
|
|
1190
|
+
/* @__PURE__ */ s(
|
|
1191
|
+
O,
|
|
1192
|
+
{
|
|
1193
|
+
control: x,
|
|
1194
|
+
id: "emailSubject",
|
|
1195
|
+
name: "emailSubject",
|
|
1196
|
+
errors: T,
|
|
1197
|
+
label: "",
|
|
1198
|
+
size: "small",
|
|
1199
|
+
dataTestId: "othertypeeventconfigmodal-emailSubject-textfield"
|
|
1200
|
+
}
|
|
1201
|
+
)
|
|
1202
|
+
]
|
|
1203
|
+
}
|
|
1204
|
+
)
|
|
1205
|
+
] }),
|
|
1206
|
+
/* @__PURE__ */ c(m, { "data-testid": "othertypeeventconfigmodal-emailImage", children: [
|
|
1207
|
+
/* @__PURE__ */ s(
|
|
1208
|
+
C,
|
|
1209
|
+
{
|
|
1210
|
+
hint: a("Image or PDF, max 5MB"),
|
|
1211
|
+
children: a("Email Attachment")
|
|
1212
|
+
}
|
|
1213
|
+
),
|
|
1214
|
+
/* @__PURE__ */ c(m, { sx: { display: "flex", alignItems: "center", gap: 1.5, flexWrap: "wrap" }, children: [
|
|
1215
|
+
/* @__PURE__ */ c(
|
|
1216
|
+
te,
|
|
1217
|
+
{
|
|
1218
|
+
component: "label",
|
|
1219
|
+
variant: "outlined",
|
|
1220
|
+
size: "small",
|
|
1221
|
+
startIcon: G ? /* @__PURE__ */ s(tt, { size: 14 }) : /* @__PURE__ */ s(oe, { iconName: "faCloudArrowUp" }),
|
|
1222
|
+
disabled: G,
|
|
1223
|
+
"data-testid": "othertypeeventconfigmodal-emailImage-upload-button",
|
|
1224
|
+
children: [
|
|
1225
|
+
a(
|
|
1226
|
+
G ? "Uploading..." : "Upload Attachment"
|
|
1227
|
+
),
|
|
1228
|
+
/* @__PURE__ */ s(
|
|
1229
|
+
"input",
|
|
1230
|
+
{
|
|
1231
|
+
ref: W,
|
|
1232
|
+
type: "file",
|
|
1233
|
+
hidden: !0,
|
|
1234
|
+
accept: "image/jpeg,image/png,image/gif,image/webp,application/pdf",
|
|
1235
|
+
onChange: async (t) => {
|
|
1236
|
+
var d, u;
|
|
1237
|
+
const o = (d = t.target.files) == null ? void 0 : d[0];
|
|
1238
|
+
if (o) {
|
|
1239
|
+
if (o.size > Wt) {
|
|
1240
|
+
ne({
|
|
1241
|
+
message: a(
|
|
1242
|
+
"File size must not exceed 5MB"
|
|
1243
|
+
),
|
|
1244
|
+
type: "error"
|
|
1245
|
+
}), W.current && (W.current.value = "");
|
|
1246
|
+
return;
|
|
1247
|
+
}
|
|
1248
|
+
try {
|
|
1249
|
+
ce(!0);
|
|
1250
|
+
const { data: f } = await st(
|
|
1251
|
+
o,
|
|
1252
|
+
"EVENTS"
|
|
1253
|
+
);
|
|
1254
|
+
g("emailImageId", f.id), q(
|
|
1255
|
+
f.actualFileName || f.fileName || o.name
|
|
1256
|
+
), W.current && (W.current.value = "");
|
|
1257
|
+
} catch (f) {
|
|
1258
|
+
console.error(
|
|
1259
|
+
"Error uploading email attachment",
|
|
1260
|
+
((u = f == null ? void 0 : f.response) == null ? void 0 : u.data) || f
|
|
1261
|
+
), ne({
|
|
1262
|
+
message: "Could not upload that attachment. Please try again.",
|
|
1263
|
+
type: "error"
|
|
1264
|
+
});
|
|
1265
|
+
} finally {
|
|
1266
|
+
ce(!1);
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
)
|
|
1272
|
+
]
|
|
1273
|
+
}
|
|
1274
|
+
),
|
|
1275
|
+
de && /* @__PURE__ */ c(m, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
1276
|
+
/* @__PURE__ */ s($, { variant: "caption", color: "text.secondary", children: de }),
|
|
1277
|
+
/* @__PURE__ */ s(
|
|
1278
|
+
ge,
|
|
1279
|
+
{
|
|
1280
|
+
size: "small",
|
|
1281
|
+
color: "error",
|
|
1282
|
+
"aria-label": a("Remove attachment"),
|
|
1283
|
+
onClick: () => {
|
|
1284
|
+
g("emailImageId", null), q("");
|
|
1285
|
+
},
|
|
1286
|
+
"data-testid": "othertypeeventconfigmodal-emailImage-remove-button",
|
|
1287
|
+
children: /* @__PURE__ */ s(oe, { iconName: "faTrash", size: "sm" })
|
|
1288
|
+
}
|
|
1289
|
+
)
|
|
1290
|
+
] })
|
|
1291
|
+
] })
|
|
1292
|
+
] }),
|
|
1293
|
+
/* @__PURE__ */ c(m, { "data-testid": "othertypeeventconfigmodal-template", children: [
|
|
1294
|
+
/* @__PURE__ */ s(
|
|
1295
|
+
C,
|
|
1296
|
+
{
|
|
1297
|
+
hint: a(
|
|
1298
|
+
"Use the </> Source button in the toolbar to view or edit the raw HTML of this email"
|
|
1299
|
+
),
|
|
1300
|
+
children: a("Template")
|
|
1301
|
+
}
|
|
1302
|
+
),
|
|
1303
|
+
/* @__PURE__ */ s(
|
|
1304
|
+
m,
|
|
1305
|
+
{
|
|
1306
|
+
sx: {
|
|
1307
|
+
borderRadius: (t) => `${t.shape.borderRadius}px`,
|
|
1308
|
+
overflow: "hidden",
|
|
1309
|
+
border: "1px solid",
|
|
1310
|
+
borderColor: "divider",
|
|
1311
|
+
// This targets the actual writing area
|
|
1312
|
+
"& .ck-editor__main > .ck-editor__editable": {
|
|
1313
|
+
backgroundColor: `${l.palette.background.paper} !important`,
|
|
1314
|
+
color: `${l.palette.text.primary} !important`,
|
|
1315
|
+
minHeight: "200px",
|
|
1316
|
+
"&.ck-focused": {
|
|
1317
|
+
borderColor: `${l.palette.primary.main} !important`
|
|
1318
|
+
}
|
|
1319
|
+
},
|
|
1320
|
+
// This targets the toolbar
|
|
1321
|
+
"& .ck.ck-toolbar": {
|
|
1322
|
+
backgroundColor: p ? `${l.palette.background.default} !important` : "var(--color-gray4) !important",
|
|
1323
|
+
borderColor: `${l.palette.divider} !important`
|
|
1324
|
+
},
|
|
1325
|
+
// This targets the buttons/icons inside the toolbar
|
|
1326
|
+
"& .ck.ck-toolbar .ck-button": {
|
|
1327
|
+
color: `${l.palette.text.primary} !important`,
|
|
1328
|
+
cursor: "pointer",
|
|
1329
|
+
"&:hover": {
|
|
1330
|
+
backgroundColor: `${l.palette.action.hover} !important`
|
|
1331
|
+
},
|
|
1332
|
+
"&.ck-on": {
|
|
1333
|
+
backgroundColor: `${l.palette.action.selected} !important`,
|
|
1334
|
+
color: `${l.palette.primary.main} !important`
|
|
1335
|
+
}
|
|
1336
|
+
},
|
|
1337
|
+
// This targets dropdowns and labels
|
|
1338
|
+
"& .ck.ck-label": {
|
|
1339
|
+
color: `${l.palette.text.secondary} !important`
|
|
1340
|
+
}
|
|
1341
|
+
},
|
|
1342
|
+
children: /* @__PURE__ */ s(
|
|
1343
|
+
Ee,
|
|
1344
|
+
{
|
|
1345
|
+
editor: dt,
|
|
1346
|
+
data: me("template") || "",
|
|
1347
|
+
config: {
|
|
1348
|
+
toolbar: [
|
|
1349
|
+
"heading",
|
|
1350
|
+
"|",
|
|
1351
|
+
"bold",
|
|
1352
|
+
"italic",
|
|
1353
|
+
"underline",
|
|
1354
|
+
"link",
|
|
1355
|
+
"|",
|
|
1356
|
+
"cut",
|
|
1357
|
+
"copy",
|
|
1358
|
+
"|",
|
|
1359
|
+
"bulletedList",
|
|
1360
|
+
"numberedList",
|
|
1361
|
+
"|",
|
|
1362
|
+
"blockQuote",
|
|
1363
|
+
"|",
|
|
1364
|
+
"undo",
|
|
1365
|
+
"redo",
|
|
1366
|
+
"|",
|
|
1367
|
+
"sourceEditing"
|
|
1368
|
+
]
|
|
1369
|
+
},
|
|
1370
|
+
onChange: (t, o) => {
|
|
1371
|
+
const d = o.getData();
|
|
1372
|
+
g("template", d);
|
|
1373
|
+
},
|
|
1374
|
+
"data-testid": "othertypeeventconfigmodal-template-ckeditor"
|
|
1375
|
+
}
|
|
1376
|
+
)
|
|
1377
|
+
}
|
|
1378
|
+
)
|
|
1379
|
+
] })
|
|
1380
|
+
] }),
|
|
1381
|
+
(e == null ? void 0 : e.type) === "QUERY" && /* @__PURE__ */ c(m, { "data-testid": "othertypeeventconfigmodal-querySelect", children: [
|
|
1382
|
+
/* @__PURE__ */ s(
|
|
1383
|
+
C,
|
|
1384
|
+
{
|
|
1385
|
+
hint: a(
|
|
1386
|
+
"Pick a configured query, or leave this empty to write one below."
|
|
1387
|
+
),
|
|
1388
|
+
children: a("Query")
|
|
1389
|
+
}
|
|
1390
|
+
),
|
|
1391
|
+
/* @__PURE__ */ s(
|
|
1392
|
+
z,
|
|
1393
|
+
{
|
|
1394
|
+
control: x,
|
|
1395
|
+
name: "queryCode",
|
|
1396
|
+
options: qe,
|
|
1397
|
+
displayName: "label",
|
|
1398
|
+
optionValue: "value",
|
|
1399
|
+
errors: T,
|
|
1400
|
+
isNullSelectDisabled: !1,
|
|
1401
|
+
placeholder: a("Select"),
|
|
1402
|
+
isSortedOptions: !0,
|
|
1403
|
+
onChange: (t) => {
|
|
1404
|
+
var o;
|
|
1405
|
+
return $e((o = t == null ? void 0 : t.target) == null ? void 0 : o.value);
|
|
1406
|
+
},
|
|
1407
|
+
dataTestId: "othertypeeventconfigmodal-queryCode-select"
|
|
1408
|
+
}
|
|
1409
|
+
)
|
|
1410
|
+
] }),
|
|
1411
|
+
R && (e == null ? void 0 : e.type) === "QUERY" && fe && /* @__PURE__ */ c(m, { sx: { display: "flex", flexDirection: "column", gap: 1.5 }, children: [
|
|
1412
|
+
/* @__PURE__ */ s(
|
|
1413
|
+
j,
|
|
1414
|
+
{
|
|
1415
|
+
hint: a(
|
|
1416
|
+
"Map each query parameter to a placeholder from the list above, or tick Is Fixed Value to type a constant."
|
|
1417
|
+
),
|
|
1418
|
+
children: a("Parameters")
|
|
1419
|
+
}
|
|
1420
|
+
),
|
|
1421
|
+
R.map((t, o) => /* @__PURE__ */ s(
|
|
1422
|
+
Y,
|
|
1423
|
+
{
|
|
1424
|
+
param: t,
|
|
1425
|
+
index: o,
|
|
1426
|
+
control: x,
|
|
1427
|
+
translate: a,
|
|
1428
|
+
setValue: g,
|
|
1429
|
+
handleChange: ee,
|
|
1430
|
+
testIdPrefix: "othertypeeventconfigmodal-",
|
|
1431
|
+
valueTestIdSuffix: "-textfiled",
|
|
1432
|
+
checkboxTestId: "othertypeeventconfigmodal-isFixed-checkbox"
|
|
1433
|
+
},
|
|
1434
|
+
o + 1
|
|
1435
|
+
))
|
|
1436
|
+
] }),
|
|
1437
|
+
(e == null ? void 0 : e.type) === "SYSTEM_FUNCTION" && /* @__PURE__ */ c(m, { "data-testid": "othertypeeventconfigmodal-systemFunction", children: [
|
|
1438
|
+
/* @__PURE__ */ s(C, { children: a("System Function") }),
|
|
1439
|
+
/* @__PURE__ */ s(
|
|
1440
|
+
z,
|
|
1441
|
+
{
|
|
1442
|
+
control: x,
|
|
1443
|
+
name: "systemFunctionId",
|
|
1444
|
+
options: Le,
|
|
1445
|
+
displayName: "label",
|
|
1446
|
+
optionValue: "value",
|
|
1447
|
+
errors: T,
|
|
1448
|
+
isSortedOptions: !0,
|
|
1449
|
+
onChange: (t) => {
|
|
1450
|
+
var o;
|
|
1451
|
+
return De((o = t == null ? void 0 : t.target) == null ? void 0 : o.value);
|
|
1452
|
+
},
|
|
1453
|
+
dataTestId: "othertypeeventconfigmodal-systemFunctionId-select"
|
|
1454
|
+
}
|
|
1455
|
+
)
|
|
1456
|
+
] }),
|
|
1457
|
+
A && (e == null ? void 0 : e.type) === "SYSTEM_FUNCTION" && Re && /* @__PURE__ */ c(m, { sx: { display: "flex", flexDirection: "column", gap: 1.5 }, children: [
|
|
1458
|
+
/* @__PURE__ */ s(j, { children: a("Parameters") }),
|
|
1459
|
+
A.map((t, o) => /* @__PURE__ */ s(
|
|
1460
|
+
Y,
|
|
1461
|
+
{
|
|
1462
|
+
param: t,
|
|
1463
|
+
index: o,
|
|
1464
|
+
control: x,
|
|
1465
|
+
translate: a,
|
|
1466
|
+
setValue: g,
|
|
1467
|
+
handleChange: ee,
|
|
1468
|
+
testIdPrefix: "othertypeeventconfigmodal-",
|
|
1469
|
+
valueTestIdSuffix: "-textfiled",
|
|
1470
|
+
checkboxTestId: "othertypeeventconfigmodal-systemFunctionId-checkbox"
|
|
1471
|
+
},
|
|
1472
|
+
o + 1
|
|
1473
|
+
))
|
|
1474
|
+
] }),
|
|
1475
|
+
(e == null ? void 0 : e.type) === "PUSH_NOTIFICATION" && /* @__PURE__ */ s(m, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: /* @__PURE__ */ c(y, { container: !0, spacing: 2, alignItems: "flex-start", children: [
|
|
1476
|
+
/* @__PURE__ */ c(
|
|
1477
|
+
y,
|
|
1478
|
+
{
|
|
1479
|
+
size: { xs: 12, md: 6 },
|
|
1480
|
+
"data-testid": "othertypeeventconfigmodal-userIdFieldName",
|
|
1481
|
+
children: [
|
|
1482
|
+
/* @__PURE__ */ c(C, { required: !0, children: [
|
|
1483
|
+
a("User"),
|
|
1484
|
+
" ",
|
|
1485
|
+
a("Id"),
|
|
1486
|
+
" ",
|
|
1487
|
+
a("Field"),
|
|
1488
|
+
" ",
|
|
1489
|
+
a("Name")
|
|
1490
|
+
] }),
|
|
1491
|
+
/* @__PURE__ */ s(
|
|
1492
|
+
O,
|
|
1493
|
+
{
|
|
1494
|
+
control: x,
|
|
1495
|
+
id: "userFieldName",
|
|
1496
|
+
name: "userFieldName",
|
|
1497
|
+
errors: T,
|
|
1498
|
+
label: "",
|
|
1499
|
+
size: "small",
|
|
1500
|
+
dataTestId: "othertypeeventconfigmodal-userFieldName-textfield"
|
|
1501
|
+
}
|
|
1502
|
+
)
|
|
1503
|
+
]
|
|
1504
|
+
}
|
|
1505
|
+
),
|
|
1506
|
+
/* @__PURE__ */ c(
|
|
1507
|
+
y,
|
|
1508
|
+
{
|
|
1509
|
+
size: { xs: 12, md: 6 },
|
|
1510
|
+
"data-testid": "othertypeeventconfigmodal-notificationType",
|
|
1511
|
+
children: [
|
|
1512
|
+
/* @__PURE__ */ c(C, { required: !0, children: [
|
|
1513
|
+
a("Notification"),
|
|
1514
|
+
" ",
|
|
1515
|
+
a("Type")
|
|
1516
|
+
] }),
|
|
1517
|
+
/* @__PURE__ */ s(
|
|
1518
|
+
z,
|
|
1519
|
+
{
|
|
1520
|
+
control: x,
|
|
1521
|
+
name: "notificationTypeId",
|
|
1522
|
+
options: Ke,
|
|
1523
|
+
displayName: "label",
|
|
1524
|
+
optionValue: "value",
|
|
1525
|
+
errors: T,
|
|
1526
|
+
onChange: (t) => {
|
|
1527
|
+
var o;
|
|
1528
|
+
return Ve((o = t == null ? void 0 : t.target) == null ? void 0 : o.value);
|
|
1529
|
+
},
|
|
1530
|
+
dataTestId: "othertypeeventconfigmodal-notificationtypeid-select"
|
|
1531
|
+
}
|
|
1532
|
+
)
|
|
1533
|
+
]
|
|
1534
|
+
}
|
|
1535
|
+
)
|
|
1536
|
+
] }) }),
|
|
1537
|
+
(e == null ? void 0 : e.type) === "PUSH_NOTIFICATION" && Z && /* @__PURE__ */ c(m, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
1538
|
+
/* @__PURE__ */ c(m, { children: [
|
|
1539
|
+
/* @__PURE__ */ c(C, { required: !0, children: [
|
|
1540
|
+
a("Notification"),
|
|
1541
|
+
" ",
|
|
1542
|
+
a("Heading")
|
|
1543
|
+
] }),
|
|
1544
|
+
/* @__PURE__ */ s(
|
|
1545
|
+
O,
|
|
1546
|
+
{
|
|
1547
|
+
control: x,
|
|
1548
|
+
id: "heading",
|
|
1549
|
+
name: "heading",
|
|
1550
|
+
errors: T,
|
|
1551
|
+
label: "",
|
|
1552
|
+
size: "small",
|
|
1553
|
+
dataTestId: "othertypeeventconfigmodal-heading-textfield"
|
|
1554
|
+
}
|
|
1555
|
+
)
|
|
1556
|
+
] }),
|
|
1557
|
+
/* @__PURE__ */ c(m, { children: [
|
|
1558
|
+
/* @__PURE__ */ s(C, { children: a("Template") }),
|
|
1559
|
+
/* @__PURE__ */ s(
|
|
1560
|
+
ie,
|
|
1561
|
+
{
|
|
1562
|
+
control: x,
|
|
1563
|
+
id: "template",
|
|
1564
|
+
name: "template",
|
|
1565
|
+
errors: T,
|
|
1566
|
+
label: "",
|
|
1567
|
+
minRows: 4,
|
|
1568
|
+
"data-testid": "othertypeeventconfigmodal-template-customtextarea"
|
|
1569
|
+
}
|
|
1570
|
+
)
|
|
1571
|
+
] })
|
|
1572
|
+
] }),
|
|
1573
|
+
(e == null ? void 0 : e.type) === "KAFKA_SYNC" && /* @__PURE__ */ c(m, { "data-testid": "othertypeeventconfigmodal-kafkaConfig", children: [
|
|
1574
|
+
/* @__PURE__ */ s(C, { required: !0, children: a("Kafka Config") }),
|
|
1575
|
+
/* @__PURE__ */ s(
|
|
1576
|
+
z,
|
|
1577
|
+
{
|
|
1578
|
+
control: x,
|
|
1579
|
+
name: "formType",
|
|
1580
|
+
options: Je,
|
|
1581
|
+
displayName: "label",
|
|
1582
|
+
optionValue: "value",
|
|
1583
|
+
errors: T,
|
|
1584
|
+
isNullSelectDisabled: !1,
|
|
1585
|
+
placeholder: a("Select"),
|
|
1586
|
+
onChange: (t) => {
|
|
1587
|
+
var o;
|
|
1588
|
+
return ze((o = t == null ? void 0 : t.target) == null ? void 0 : o.value);
|
|
1589
|
+
},
|
|
1590
|
+
dataTestId: "othertypeeventconfigmodal-kafkaConfig-select"
|
|
1591
|
+
}
|
|
1592
|
+
)
|
|
1593
|
+
] }),
|
|
1594
|
+
M && (e == null ? void 0 : e.type) === "KAFKA_SYNC" && he && M.length > 0 && /* @__PURE__ */ c(m, { sx: { display: "flex", flexDirection: "column", gap: 1.5 }, children: [
|
|
1595
|
+
/* @__PURE__ */ s(j, { children: a("Parameters") }),
|
|
1596
|
+
M.map((t, o) => /* @__PURE__ */ s(
|
|
1597
|
+
Y,
|
|
1598
|
+
{
|
|
1599
|
+
param: t,
|
|
1600
|
+
index: o,
|
|
1601
|
+
control: x,
|
|
1602
|
+
translate: a,
|
|
1603
|
+
setValue: g,
|
|
1604
|
+
handleChange: ee,
|
|
1605
|
+
testIdPrefix: "othertypeeventconfigmodal-kafka-",
|
|
1606
|
+
valueTestIdSuffix: "-textfield",
|
|
1607
|
+
checkboxTestId: "othertypeeventconfigmodal-kafka-isFixed-checkbox"
|
|
1608
|
+
},
|
|
1609
|
+
`${he}-${t == null ? void 0 : t.parameterName}-${o}`
|
|
1610
|
+
))
|
|
1611
|
+
] }),
|
|
1612
|
+
(e == null ? void 0 : e.type) == "QUERY" && !fe && /* @__PURE__ */ c(m, { "data-testid": "othertypeeventconfigmodal-queryArea", children: [
|
|
1613
|
+
/* @__PURE__ */ s(C, { children: a("Query") }),
|
|
1614
|
+
/* @__PURE__ */ s(
|
|
1615
|
+
m,
|
|
1616
|
+
{
|
|
1617
|
+
sx: {
|
|
1618
|
+
overflow: "hidden",
|
|
1619
|
+
borderRadius: (t) => `${t.shape.borderRadius}px`,
|
|
1620
|
+
border: "1px solid",
|
|
1621
|
+
borderColor: "divider"
|
|
1622
|
+
},
|
|
1623
|
+
"data-testid": "othertypeeventconfigmodal-template-customtextarea",
|
|
1624
|
+
children: /* @__PURE__ */ s(
|
|
1625
|
+
ot,
|
|
1626
|
+
{
|
|
1627
|
+
height: "30vh",
|
|
1628
|
+
autoFocus: !1,
|
|
1629
|
+
defaultValue: Me || "",
|
|
1630
|
+
onChange: (t) => g("template", t)
|
|
1631
|
+
}
|
|
1632
|
+
)
|
|
1633
|
+
}
|
|
1634
|
+
),
|
|
1635
|
+
/* @__PURE__ */ s(gt, { children: a(
|
|
1636
|
+
"Write the SQL this action runs. Placeholders from the list above are substituted before it executes."
|
|
1637
|
+
) })
|
|
1638
|
+
] }),
|
|
1639
|
+
(e == null ? void 0 : e.type) === "SMS" && /* @__PURE__ */ c(m, { "data-testid": "othertypeeventconfigmodal-template", children: [
|
|
1640
|
+
/* @__PURE__ */ s(C, { children: a("Template") }),
|
|
1641
|
+
/* @__PURE__ */ s(
|
|
1642
|
+
ie,
|
|
1643
|
+
{
|
|
1644
|
+
control: x,
|
|
1645
|
+
id: "template",
|
|
1646
|
+
name: "template",
|
|
1647
|
+
label: "",
|
|
1648
|
+
minRows: 4,
|
|
1649
|
+
"data-testid": "othertypeeventconfigmodal-template-customtextarea"
|
|
1650
|
+
}
|
|
1651
|
+
)
|
|
1652
|
+
] }),
|
|
1653
|
+
(e == null ? void 0 : e.type) != "EXCEPTION" && (e == null ? void 0 : e.type) != "SYSTEM_FUNCTION" && /* @__PURE__ */ c(m, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
1654
|
+
/* @__PURE__ */ s(j, { children: a("Timing") }),
|
|
1655
|
+
/* @__PURE__ */ c(y, { container: !0, spacing: 2, alignItems: "flex-start", children: [
|
|
1656
|
+
/* @__PURE__ */ c(
|
|
1657
|
+
y,
|
|
1658
|
+
{
|
|
1659
|
+
size: { xs: 12, md: 6 },
|
|
1660
|
+
"data-testid": "othertypeeventconfigmodal-triggerWhen",
|
|
1661
|
+
children: [
|
|
1662
|
+
/* @__PURE__ */ c(C, { required: !0, children: [
|
|
1663
|
+
a("Trigger"),
|
|
1664
|
+
" ",
|
|
1665
|
+
a("When")
|
|
1666
|
+
] }),
|
|
1667
|
+
/* @__PURE__ */ s(
|
|
1668
|
+
z,
|
|
1669
|
+
{
|
|
1670
|
+
control: x,
|
|
1671
|
+
name: "trigerWhen",
|
|
1672
|
+
options: pt.map((t) => ({
|
|
1673
|
+
value: t.value,
|
|
1674
|
+
label: a(t.label)
|
|
1675
|
+
})),
|
|
1676
|
+
displayName: "label",
|
|
1677
|
+
optionValue: "value",
|
|
1678
|
+
errors: T,
|
|
1679
|
+
isNullSelectDisabled: !1,
|
|
1680
|
+
placeholder: a("Select"),
|
|
1681
|
+
dataTestId: "othertypeeventconfigmodal-trigegrwhen-select"
|
|
1682
|
+
}
|
|
1683
|
+
)
|
|
1684
|
+
]
|
|
1685
|
+
}
|
|
1686
|
+
),
|
|
1687
|
+
Ae === "AFTER" && /* @__PURE__ */ c(Ye, { children: [
|
|
1688
|
+
/* @__PURE__ */ c(
|
|
1689
|
+
y,
|
|
1690
|
+
{
|
|
1691
|
+
size: { xs: 12, sm: 4, md: 2 },
|
|
1692
|
+
"data-testid": "othertypeeventconfigmodal-dayField",
|
|
1693
|
+
children: [
|
|
1694
|
+
/* @__PURE__ */ s(C, { children: a("Day") }),
|
|
1695
|
+
/* @__PURE__ */ s(
|
|
1696
|
+
O,
|
|
1697
|
+
{
|
|
1698
|
+
control: x,
|
|
1699
|
+
id: "day",
|
|
1700
|
+
name: "day",
|
|
1701
|
+
errors: T,
|
|
1702
|
+
label: "",
|
|
1703
|
+
type: "number",
|
|
1704
|
+
size: "small",
|
|
1705
|
+
dataTestId: "othertypeeventconfigmodal-type-textfield"
|
|
1706
|
+
}
|
|
1707
|
+
)
|
|
1708
|
+
]
|
|
1709
|
+
}
|
|
1710
|
+
),
|
|
1711
|
+
/* @__PURE__ */ c(
|
|
1712
|
+
y,
|
|
1713
|
+
{
|
|
1714
|
+
size: { xs: 12, sm: 4, md: 2 },
|
|
1715
|
+
"data-testid": "othertypeeventconfigmodal-hourField",
|
|
1716
|
+
children: [
|
|
1717
|
+
/* @__PURE__ */ s(C, { children: a("Hour") }),
|
|
1718
|
+
/* @__PURE__ */ s(
|
|
1719
|
+
O,
|
|
1720
|
+
{
|
|
1721
|
+
control: x,
|
|
1722
|
+
id: "hour",
|
|
1723
|
+
name: "hour",
|
|
1724
|
+
errors: T,
|
|
1725
|
+
label: "",
|
|
1726
|
+
type: "number",
|
|
1727
|
+
size: "small",
|
|
1728
|
+
dataTestId: "othertypeeventconfigmodal-type-textfield"
|
|
1729
|
+
}
|
|
1730
|
+
)
|
|
1731
|
+
]
|
|
1732
|
+
}
|
|
1733
|
+
),
|
|
1734
|
+
/* @__PURE__ */ c(
|
|
1735
|
+
y,
|
|
1736
|
+
{
|
|
1737
|
+
size: { xs: 12, sm: 4, md: 2 },
|
|
1738
|
+
"data-testid": "othertypeeventconfigmodal-minuteField",
|
|
1739
|
+
children: [
|
|
1740
|
+
/* @__PURE__ */ s(C, { children: a("Minute") }),
|
|
1741
|
+
/* @__PURE__ */ s(
|
|
1742
|
+
O,
|
|
1743
|
+
{
|
|
1744
|
+
control: x,
|
|
1745
|
+
id: "minute",
|
|
1746
|
+
name: "minute",
|
|
1747
|
+
type: "number",
|
|
1748
|
+
errors: T,
|
|
1749
|
+
label: "",
|
|
1750
|
+
size: "small",
|
|
1751
|
+
dataTestId: "othertypeeventconfigmodal-type-textfield"
|
|
1752
|
+
}
|
|
1753
|
+
)
|
|
1754
|
+
]
|
|
1755
|
+
}
|
|
1756
|
+
)
|
|
1757
|
+
] })
|
|
1758
|
+
] })
|
|
1759
|
+
] })
|
|
1760
|
+
] })
|
|
1761
|
+
}
|
|
1762
|
+
),
|
|
1763
|
+
/* @__PURE__ */ c(
|
|
1764
|
+
it,
|
|
1765
|
+
{
|
|
1766
|
+
sx: { px: 3, py: 2, borderTop: "1px solid", borderColor: "divider" },
|
|
1767
|
+
children: [
|
|
1768
|
+
/* @__PURE__ */ s(
|
|
1769
|
+
te,
|
|
1770
|
+
{
|
|
1771
|
+
variant: "outlined",
|
|
1772
|
+
color: "inherit",
|
|
1773
|
+
size: "small",
|
|
1774
|
+
onClick: () => {
|
|
1775
|
+
K(), L();
|
|
1776
|
+
},
|
|
1777
|
+
"data-testid": "othertypeeventconfigmodal-cancel-button",
|
|
1778
|
+
children: a("Cancel")
|
|
1779
|
+
}
|
|
1780
|
+
),
|
|
1781
|
+
/* @__PURE__ */ s(
|
|
1782
|
+
te,
|
|
1783
|
+
{
|
|
1784
|
+
size: "small",
|
|
1785
|
+
type: "submit",
|
|
1786
|
+
variant: "contained",
|
|
1787
|
+
color: "primary",
|
|
1788
|
+
disabled: Oe,
|
|
1789
|
+
"data-testid": "othertypeeventconfigmodal-submit-button",
|
|
1790
|
+
children: a("Submit")
|
|
1791
|
+
}
|
|
1792
|
+
)
|
|
1793
|
+
]
|
|
1794
|
+
}
|
|
1795
|
+
)
|
|
1796
|
+
]
|
|
1797
|
+
}
|
|
1798
|
+
)
|
|
1799
|
+
]
|
|
1800
|
+
}
|
|
1801
|
+
);
|
|
1802
|
+
};
|
|
1803
|
+
Ut.propTypes = {
|
|
1804
|
+
open: S.any,
|
|
1805
|
+
handleClose: S.any,
|
|
1806
|
+
handleClick: S.any,
|
|
1807
|
+
type: S.any
|
|
1808
|
+
};
|
|
1809
|
+
export {
|
|
1810
|
+
Ut as default
|
|
1811
|
+
};
|
|
1812
|
+
//# sourceMappingURL=OtherTypeEventConfigModal-stNmuSv_.js.map
|