@argusoft/medplat-form-engine 1.0.15 → 1.0.16

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.
Files changed (134) hide show
  1. package/dist/AccessRights-BMRM1u9S-D1Gc0rKI.js +1228 -0
  2. package/dist/AccessRights-BMRM1u9S-D1Gc0rKI.js.map +1 -0
  3. package/dist/AddEditQueryBuilder-7JRplV5J-DHgS6TYG.js +313 -0
  4. package/dist/AddEditQueryBuilder-7JRplV5J-DHgS6TYG.js.map +1 -0
  5. package/dist/AddEditQueryBuilder-7JRplV5J.css +1 -0
  6. package/dist/AddFeatures-CkTu7sOI-BGplSFp6.js +212 -0
  7. package/dist/AddFeatures-CkTu7sOI-BGplSFp6.js.map +1 -0
  8. package/dist/AddLabelModal-DE3ploGD-OOyaGC02.js +734 -0
  9. package/dist/AddLabelModal-DE3ploGD-OOyaGC02.js.map +1 -0
  10. package/dist/AddMenuConfiguration-QWfpcnuP-TAM2c68S.js +5389 -0
  11. package/dist/AddMenuConfiguration-QWfpcnuP-TAM2c68S.js.map +1 -0
  12. package/dist/AddMenuConfiguration-QWfpcnuP.css +1 -0
  13. package/dist/AddRoleDrawer-ZK1eejxI-BM6rfhh5.js +453 -0
  14. package/dist/AddRoleDrawer-ZK1eejxI-BM6rfhh5.js.map +1 -0
  15. package/dist/AppModal-BgZyfrd--BO3wW4ma.js +428 -0
  16. package/dist/AppModal-BgZyfrd--BO3wW4ma.js.map +1 -0
  17. package/dist/ChangePasswordModalCore-DIe4rzW--CSDVIGsb.js +176 -0
  18. package/dist/ChangePasswordModalCore-DIe4rzW--CSDVIGsb.js.map +1 -0
  19. package/dist/ConditionConfig-GDCXIg3C-DuEy85LD.js +395 -0
  20. package/dist/ConditionConfig-GDCXIg3C-DuEy85LD.js.map +1 -0
  21. package/dist/ConditionConfig-GDCXIg3C.css +1 -0
  22. package/dist/EntityManagement-D-x6Qzal-BE01iKNR.js +50 -0
  23. package/dist/EntityManagement-D-x6Qzal-BE01iKNR.js.map +1 -0
  24. package/dist/EventConfigurations-jGCJ4LqP-CJBCGp6J.js +384 -0
  25. package/dist/EventConfigurations-jGCJ4LqP-CJBCGp6J.js.map +1 -0
  26. package/dist/EventConfigurations-jGCJ4LqP.css +1 -0
  27. package/dist/EventsExceptionModal-BF6E1Np7-DHT7pQsx.js +200 -0
  28. package/dist/EventsExceptionModal-BF6E1Np7-DHT7pQsx.js.map +1 -0
  29. package/dist/EventsSkeleton-BN7_0IGs-BAnd1Vug.js +74 -0
  30. package/dist/EventsSkeleton-BN7_0IGs-BAnd1Vug.js.map +1 -0
  31. package/dist/FeatureMenu-Ds6lFg4w-ShGx4okQ.js +249 -0
  32. package/dist/FeatureMenu-Ds6lFg4w-ShGx4okQ.js.map +1 -0
  33. package/dist/Features-Cshdl06N-CZ02Tt89.js +12 -0
  34. package/dist/Features-Cshdl06N-CZ02Tt89.js.map +1 -0
  35. package/dist/FileSaver.min-CN9EpL2h-N-3OFAd7.js +77 -0
  36. package/dist/FileSaver.min-CN9EpL2h-N-3OFAd7.js.map +1 -0
  37. package/dist/FlywayQuery-Cx2sly6g-DdhUw6bN.js +169 -0
  38. package/dist/FlywayQuery-Cx2sly6g-DdhUw6bN.js.map +1 -0
  39. package/dist/ImmunizationConfigurationBase-DZ8EqXlF-B2XcYTYJ.js +5162 -0
  40. package/dist/ImmunizationConfigurationBase-DZ8EqXlF-B2XcYTYJ.js.map +1 -0
  41. package/dist/ImmunizationConfigurationBase-DZ8EqXlF.css +1 -0
  42. package/dist/ImmunizationConfigurationsList-CQnxWa09-Bbr0iyGy.js +335 -0
  43. package/dist/ImmunizationConfigurationsList-CQnxWa09-Bbr0iyGy.js.map +1 -0
  44. package/dist/ImmunizationSkeleton-D2tdv5k--B7SY-gnr.js +186 -0
  45. package/dist/ImmunizationSkeleton-D2tdv5k--B7SY-gnr.js.map +1 -0
  46. package/dist/LanguagesModal-rk6IGQwY-B0Jtpivu.js +394 -0
  47. package/dist/LanguagesModal-rk6IGQwY-B0Jtpivu.js.map +1 -0
  48. package/dist/ManageDynamicFeature-C2I7Ho7i-Bbxkpw0S.js +4189 -0
  49. package/dist/ManageDynamicFeature-C2I7Ho7i-Bbxkpw0S.js.map +1 -0
  50. package/dist/ManageEventConfiguration-BJxS2Su0-CRATBMym.js +1017 -0
  51. package/dist/ManageEventConfiguration-BJxS2Su0-CRATBMym.js.map +1 -0
  52. package/dist/ManageEventConfiguration-BJxS2Su0.css +1 -0
  53. package/dist/ManageNotification-DMN2szWy-DQvdrfwC.js +6819 -0
  54. package/dist/ManageNotification-DMN2szWy-DQvdrfwC.js.map +1 -0
  55. package/dist/ManageRole-CuXmWQyp-Cy15Mlax.js +728 -0
  56. package/dist/ManageRole-CuXmWQyp-Cy15Mlax.js.map +1 -0
  57. package/dist/ManageTranslation-BTxvSYKb-CdO4Fk7f.js +616 -0
  58. package/dist/ManageTranslation-BTxvSYKb-CdO4Fk7f.js.map +1 -0
  59. package/dist/ManageTranslation-BTxvSYKb.css +1 -0
  60. package/dist/ManageUser-Dr3ptCYp-CJBp0yVr.js +2179 -0
  61. package/dist/ManageUser-Dr3ptCYp-CJBp0yVr.js.map +1 -0
  62. package/dist/ManageUser-Dr3ptCYp.css +1 -0
  63. package/dist/MedplatFormWrapper-SwW0rdxN.js +52363 -0
  64. package/dist/MedplatFormWrapper-SwW0rdxN.js.map +1 -0
  65. package/dist/MedplatFormWrapper.css +1 -0
  66. package/dist/MobileMenuManagement-BmrO-7MN-xFkU87j6.js +111 -0
  67. package/dist/MobileMenuManagement-BmrO-7MN-xFkU87j6.js.map +1 -0
  68. package/dist/MobileTypeEventConfigModal-ChhO_A4f-DfJDqFB9.js +783 -0
  69. package/dist/MobileTypeEventConfigModal-ChhO_A4f-DfJDqFB9.js.map +1 -0
  70. package/dist/NewServerManagement-5YcAtF-g-DHV6PFTR.js +1002 -0
  71. package/dist/NewServerManagement-5YcAtF-g-DHV6PFTR.js.map +1 -0
  72. package/dist/NotificationFlywayQuery-BY8Zzml_-C7G-28dx.js +244 -0
  73. package/dist/NotificationFlywayQuery-BY8Zzml_-C7G-28dx.js.map +1 -0
  74. package/dist/NotificationList-BqibwMaM-D4mMbj4h.js +400 -0
  75. package/dist/NotificationList-BqibwMaM-D4mMbj4h.js.map +1 -0
  76. package/dist/OtherTypeEventConfigModal-ZnCGWm9v-D7x0QObl.js +1953 -0
  77. package/dist/OtherTypeEventConfigModal-ZnCGWm9v-D7x0QObl.js.map +1 -0
  78. package/dist/QueryBuilder-BPfavHH9-M3wgeHB3.js +378 -0
  79. package/dist/QueryBuilder-BPfavHH9-M3wgeHB3.js.map +1 -0
  80. package/dist/QueryBuilder-BPfavHH9.css +1 -0
  81. package/dist/QueryManagement-DXA73N2j-De9XnBKC.js +671 -0
  82. package/dist/QueryManagement-DXA73N2j-De9XnBKC.js.map +1 -0
  83. package/dist/QueryManagement-DXA73N2j.css +1 -0
  84. package/dist/RoleManagement-C0feJCuq-DIGwGqOD.js +410 -0
  85. package/dist/RoleManagement-C0feJCuq-DIGwGqOD.js.map +1 -0
  86. package/dist/SecurityAuditLogList-DHTcOtbx-BSjPID73.js +746 -0
  87. package/dist/SecurityAuditLogList-DHTcOtbx-BSjPID73.js.map +1 -0
  88. package/dist/ServerSyncModal-D_oFpv3C-C6c3_3lx.js +836 -0
  89. package/dist/ServerSyncModal-D_oFpv3C-C6c3_3lx.js.map +1 -0
  90. package/dist/ShowFlywayQuery-BkyA6QaA-2t9pZjcx.js +130 -0
  91. package/dist/ShowFlywayQuery-BkyA6QaA-2t9pZjcx.js.map +1 -0
  92. package/dist/ShowFlywayQuery-DVRCd384-BypXcNWX.js +259 -0
  93. package/dist/ShowFlywayQuery-DVRCd384-BypXcNWX.js.map +1 -0
  94. package/dist/ShowQueryHistory-BDN0tzHg-17BxK88Z.js +190 -0
  95. package/dist/ShowQueryHistory-BDN0tzHg-17BxK88Z.js.map +1 -0
  96. package/dist/SubMenu-DAfZC9Xi-B0BQYLdI.js +188 -0
  97. package/dist/SubMenu-DAfZC9Xi-B0BQYLdI.js.map +1 -0
  98. package/dist/TableDetails-DzREeJkm-B-WEBbQz.js +1508 -0
  99. package/dist/TableDetails-DzREeJkm-B-WEBbQz.js.map +1 -0
  100. package/dist/TableList-B9hr05Hs-BIsMbnIV.js +428 -0
  101. package/dist/TableList-B9hr05Hs-BIsMbnIV.js.map +1 -0
  102. package/dist/TypeConfiguration-C-lk8Szs-DkvHWHhr.js +117 -0
  103. package/dist/TypeConfiguration-C-lk8Szs-DkvHWHhr.js.map +1 -0
  104. package/dist/UserList-S5Q76wO7-Cj5u_K4_.js +1104 -0
  105. package/dist/UserList-S5Q76wO7-Cj5u_K4_.js.map +1 -0
  106. package/dist/UserList-S5Q76wO7.css +1 -0
  107. package/dist/UserListSkeleton-cglK2SaU-B_Tj5gUp.js +184 -0
  108. package/dist/UserListSkeleton-cglK2SaU-B_Tj5gUp.js.map +1 -0
  109. package/dist/WidgetList-BSApErov-Z61Kpq4T.js +188 -0
  110. package/dist/WidgetList-BSApErov-Z61Kpq4T.js.map +1 -0
  111. package/dist/_commonjsHelpers-B4e78b8K-B9tZyK9c.js +29 -0
  112. package/dist/_commonjsHelpers-B4e78b8K-B9tZyK9c.js.map +1 -0
  113. package/dist/dayjs.min-BiUMMz0V.js +285 -0
  114. package/dist/dayjs.min-BiUMMz0V.js.map +1 -0
  115. package/dist/default-B6sHblIG.js +11341 -0
  116. package/dist/default-B6sHblIG.js.map +1 -0
  117. package/dist/default.css +1 -0
  118. package/dist/i18next-CTOWN_jH-BKKbdDel.js +1389 -0
  119. package/dist/i18next-CTOWN_jH-BKKbdDel.js.map +1 -0
  120. package/dist/index-B4r0wjBD.js +563 -0
  121. package/dist/index-B4r0wjBD.js.map +1 -0
  122. package/dist/index-BFznsakV-BsOSEQZI.js +42638 -0
  123. package/dist/index-BFznsakV-BsOSEQZI.js.map +1 -0
  124. package/dist/index-DNrIMQFT.js +567 -0
  125. package/dist/index-DNrIMQFT.js.map +1 -0
  126. package/dist/index.css +1 -1
  127. package/dist/index.js +3 -52390
  128. package/dist/index.js.map +1 -1
  129. package/dist/manageImmunization-B4swS745-JldexHrO.js +1204 -0
  130. package/dist/manageImmunization-B4swS745-JldexHrO.js.map +1 -0
  131. package/dist/manageImmunization-B4swS745.css +1 -0
  132. package/dist/xlsx.min-D1LFqt_b-BGwkpd8r.js +11869 -0
  133. package/dist/xlsx.min-D1LFqt_b-BGwkpd8r.js.map +1 -0
  134. package/package.json +1 -4
@@ -0,0 +1,1953 @@
1
+ import { jsx as e, jsxs as o, Fragment as Pe } from "react/jsx-runtime";
2
+ import R, { useRef as H, useState as K, useEffect as ae, memo as Oe, forwardRef as ce } from "react";
3
+ import Y from "prop-types";
4
+ import { useForm as Re, Controller as T } from "react-hook-form";
5
+ import { yupResolver as Ve } from "@hookform/resolvers/yup";
6
+ import c from "@mui/material/Grid2";
7
+ import * as S from "yup";
8
+ import { useTheme as Ae, Modal as Ue, Typography as h, IconButton as Le, Box as b, FormControl as v, Select as A, MenuItem as E, FormControlLabel as L, Checkbox as D, TextField as Z, Stack as De, Button as oe } from "@mui/material";
9
+ import ee from "@/views/custom-components/CustomTextArea";
10
+ import F from "@/views/custom-components/CustomTextField";
11
+ import { retrieveAllConfigured as We, execute as se, getNotificationTypeList as je } from "@/common/services/GlobalApis";
12
+ import { showToast as qe } from "@/common/toaster/toaster";
13
+ import Je from "@/hooks/useTrackEvent";
14
+ import "./ManageEventConfiguration-BJxS2Su0-CRATBMym.js";
15
+ import { useTranslateProvider as Ke } from "@/common/languageTranslator/TranslationContext";
16
+ import { faXmark as Ye } from "@fortawesome/free-solid-svg-icons";
17
+ import { FontAwesomeIcon as He } from "@fortawesome/react-fontawesome";
18
+ import Be from "@/views/custom-components/CkEditor/CkEditor";
19
+ function Qe() {
20
+ const l = {
21
+ resolve: null,
22
+ promise: null
23
+ };
24
+ return l.promise = new Promise((r) => {
25
+ l.resolve = r;
26
+ }), l;
27
+ }
28
+ function Xe(l) {
29
+ let r = null;
30
+ return (...n) => (r || (r = {
31
+ current: l(...n)
32
+ }), r.current);
33
+ }
34
+ const k = new Array(256).fill("").map((l, r) => ("0" + r.toString(16)).slice(-2));
35
+ function Ge() {
36
+ const [l, r, n, a] = crypto.getRandomValues(new Uint32Array(4));
37
+ return "e" + k[l >> 0 & 255] + k[l >> 8 & 255] + k[l >> 16 & 255] + k[l >> 24 & 255] + k[r >> 0 & 255] + k[r >> 8 & 255] + k[r >> 16 & 255] + k[r >> 24 & 255] + k[n >> 0 & 255] + k[n >> 8 & 255] + k[n >> 16 & 255] + k[n >> 24 & 255] + k[a >> 0 & 255] + k[a >> 8 & 255] + k[a >> 16 & 255] + k[a >> 24 & 255];
38
+ }
39
+ function ue(l) {
40
+ return !!l && /^\d+\.\d+\.\d+/.test(l);
41
+ }
42
+ function Ze(l) {
43
+ if (!ue(l))
44
+ throw new Error(`Invalid semantic version: ${l || "<blank>"}.`);
45
+ const [r, n, a] = l.split(".");
46
+ return {
47
+ major: Number.parseInt(r, 10),
48
+ minor: Number.parseInt(n, 10),
49
+ patch: Number.parseInt(a, 10)
50
+ };
51
+ }
52
+ function me(l) {
53
+ return l ? ["nightly", "alpha", "internal", "nightly-", "staging"].some((r) => l.includes(r)) : !1;
54
+ }
55
+ function et(l) {
56
+ return ue(l) || me(l);
57
+ }
58
+ function tt(l, r) {
59
+ const n = l.extraPlugins || [];
60
+ return {
61
+ ...l,
62
+ extraPlugins: [
63
+ ...n,
64
+ ...r.filter((a) => !n.includes(a))
65
+ ]
66
+ };
67
+ }
68
+ function at(l) {
69
+ if (me(l))
70
+ return 3;
71
+ const { major: r } = Ze(l);
72
+ switch (!0) {
73
+ case r >= 44:
74
+ return 3;
75
+ case r >= 38:
76
+ return 2;
77
+ default:
78
+ return 1;
79
+ }
80
+ }
81
+ function rt() {
82
+ const { CKEDITOR_VERSION: l, CKEDITOR: r } = window;
83
+ return et(l) ? {
84
+ source: r ? "cdn" : "npm",
85
+ version: l
86
+ } : null;
87
+ }
88
+ function it() {
89
+ const l = rt();
90
+ return l ? at(l.version) : null;
91
+ }
92
+ function he(l, r) {
93
+ switch (r || (r = it() || void 0), r) {
94
+ case 1:
95
+ case 2:
96
+ return l === void 0;
97
+ case 3:
98
+ return l === "GPL";
99
+ default:
100
+ return !1;
101
+ }
102
+ }
103
+ function lt(l, r) {
104
+ return function(n) {
105
+ he(n.config.get("licenseKey")) || n.on("collectUsageData", (a, { setUsageData: m }) => {
106
+ m(`integration.${l}`, r);
107
+ });
108
+ };
109
+ }
110
+ var nt = Object.defineProperty, ot = (l, r, n) => r in l ? nt(l, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : l[r] = n, _ = (l, r, n) => ot(l, typeof r != "symbol" ? r + "" : r, n);
111
+ /**
112
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
113
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
114
+ */
115
+ const pe = class fe {
116
+ constructor(r, n) {
117
+ _(this, "_lifecycle"), _(this, "_element"), _(this, "_releaseLock", null), _(this, "_value", null), _(this, "_afterMountCallbacks", []), _(this, "_state", {
118
+ destroyedBeforeInitialization: !1,
119
+ mountingInProgress: null
120
+ }), _(this, "release", Xe(() => {
121
+ const { _releaseLock: a, _state: m, _element: x, _lifecycle: f } = this;
122
+ m.mountingInProgress ? m.mountingInProgress.then(() => f.unmount({
123
+ element: x,
124
+ // Mount result might be overridden by watchdog during restart so use instance variable.
125
+ mountResult: this.value
126
+ })).catch((p) => {
127
+ console.error("Semaphore unmounting error:", p);
128
+ }).then(a.resolve).then(() => {
129
+ this._value = null;
130
+ }) : (m.destroyedBeforeInitialization = !0, a.resolve());
131
+ })), this._element = r, this._lifecycle = n, this._lock();
132
+ }
133
+ /**
134
+ * Getter for {@link #_value}.
135
+ */
136
+ get value() {
137
+ return this._value;
138
+ }
139
+ /**
140
+ * Occasionally, the Watchdog restarts the editor instance, resulting in a new instance being assigned to the semaphore.
141
+ * In terms of race conditions, it's generally safer to simply override the semaphore value rather than recreating it
142
+ * with a different one.
143
+ */
144
+ unsafeSetValue(r) {
145
+ this._value = r, this._afterMountCallbacks.forEach((n) => n(r)), this._afterMountCallbacks = [];
146
+ }
147
+ /**
148
+ * This registers a callback that will be triggered after the editor has been successfully mounted.
149
+ *
150
+ * * If the editor is already mounted, the callback will be executed immediately.
151
+ * * If the editor is in the process of mounting, the callback will be executed upon successful mounting.
152
+ * * If the editor is never mounted, the passed callback will not be executed.
153
+ * * If an exception is thrown within the callback, it will be re-thrown in the semaphore.
154
+ */
155
+ runAfterMount(r) {
156
+ const { _value: n, _afterMountCallbacks: a } = this;
157
+ n ? r(n) : a.push(r);
158
+ }
159
+ /**
160
+ * This method is used to inform other components that the {@link #_element} will be used by the editor,
161
+ * which is initialized by the {@link #_lifecycle} methods.
162
+ *
163
+ * * If an editor is already present on the provided element, the initialization of the current one
164
+ * will be postponed until the previous one is destroyed.
165
+ *
166
+ * * If the element is empty and does not have an editor attached to it, the currently locked editor will
167
+ * be mounted immediately.
168
+ *
169
+ * After the successful initialization of the editor and the assignment of the {@link #_value} member,
170
+ * the `onReady` lifecycle method is called.
171
+ *
172
+ * *Important note:*
173
+ *
174
+ * It’s really important to keep this method *sync*. If we make this method *async*, it won’t work well because
175
+ * it will cause problems when we’re trying to set up the {@link LifeCycleEditorElementSemaphore#_semaphores} map entries.
176
+ */
177
+ _lock() {
178
+ const { _semaphores: r } = fe, { _state: n, _element: a, _lifecycle: m } = this, x = r.get(a) || Promise.resolve(null), f = Qe();
179
+ this._releaseLock = f;
180
+ const p = x.then(() => n.destroyedBeforeInitialization ? Promise.resolve(void 0) : (n.mountingInProgress = m.mount().then((C) => (C && this.unsafeSetValue(C), C)), n.mountingInProgress)).then(async (C) => {
181
+ C && m.afterMount && await m.afterMount({
182
+ element: a,
183
+ mountResult: C
184
+ });
185
+ }).then(() => f.promise).catch((C) => {
186
+ console.error("Semaphore mounting error:", C);
187
+ }).then(() => {
188
+ r.get(a) === p && r.delete(a);
189
+ });
190
+ r.set(a, p);
191
+ }
192
+ };
193
+ _(pe, "_semaphores", /* @__PURE__ */ new Map());
194
+ let st = pe;
195
+ /**
196
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
197
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
198
+ */
199
+ const dt = "$__CKEditorReactContextMetadata";
200
+ function ct(l, r) {
201
+ return {
202
+ ...r,
203
+ [dt]: l
204
+ };
205
+ }
206
+ /**
207
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
208
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
209
+ */
210
+ const ut = R.createContext(null), mt = (l) => !!l && typeof l == "object" && "status" in l && ["initializing", "initialized", "error"].includes(l.status), ye = (l) => (r) => mt(r) && r.status === l, de = ye("initializing"), ht = (l) => ye("initialized")(l) && l.watchdog.state === "ready";
211
+ /**
212
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
213
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
214
+ */
215
+ const pt = lt(
216
+ "react",
217
+ {
218
+ version: "9.5.0",
219
+ frameworkVersion: R.version
220
+ }
221
+ );
222
+ /**
223
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
224
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
225
+ */
226
+ function ft(l) {
227
+ return he(l.licenseKey) ? l : tt(l, [
228
+ /**
229
+ * This part of the code is not executed in open-source implementations using a GPL key.
230
+ * It only runs when a specific license key is provided. If you are uncertain whether
231
+ * this applies to your installation, please contact our support team.
232
+ */
233
+ pt
234
+ ]);
235
+ }
236
+ /**
237
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
238
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
239
+ */
240
+ const te = "Lock from React integration (@ckeditor/ckeditor5-react)";
241
+ class ve extends R.Component {
242
+ constructor(r) {
243
+ super(r), _(this, "domContainer", R.createRef()), _(this, "editorSemaphore", null), this._checkVersion();
244
+ }
245
+ /**
246
+ * Checks if the CKEditor version used in the application is compatible with the component.
247
+ */
248
+ _checkVersion() {
249
+ const { CKEDITOR_VERSION: r } = window;
250
+ if (!r)
251
+ return console.warn('Cannot find the "CKEDITOR_VERSION" in the "window" scope.');
252
+ const [n] = r.split(".").map(Number);
253
+ n >= 42 || r.startsWith("0.0.0") || console.warn("The <CKEditor> component requires using CKEditor 5 in version 42+ or nightly build.");
254
+ }
255
+ get _semaphoreValue() {
256
+ const { editorSemaphore: r } = this;
257
+ return r ? r.value : null;
258
+ }
259
+ /**
260
+ * An watchdog instance.
261
+ */
262
+ get watchdog() {
263
+ const { _semaphoreValue: r } = this;
264
+ return r ? r.watchdog : null;
265
+ }
266
+ /**
267
+ * An editor instance.
268
+ */
269
+ get editor() {
270
+ const { _semaphoreValue: r } = this;
271
+ return r ? r.instance : null;
272
+ }
273
+ /**
274
+ * The CKEditor component should not be updated by React itself.
275
+ * However, if the component identifier changes, the whole structure should be created once again.
276
+ */
277
+ shouldComponentUpdate(r) {
278
+ const { props: n, editorSemaphore: a } = this;
279
+ return r.id !== n.id || r.disableWatchdog !== n.disableWatchdog ? !0 : (a && (a.runAfterMount(({ instance: m }) => {
280
+ this._shouldUpdateEditorData(n, r, m) && m.data.set(r.data);
281
+ }), "disabled" in r && a.runAfterMount(({ instance: m }) => {
282
+ r.disabled ? m.enableReadOnlyMode(te) : m.disableReadOnlyMode(te);
283
+ })), !1);
284
+ }
285
+ /**
286
+ * Initialize the editor when the component is mounted.
287
+ */
288
+ componentDidMount() {
289
+ de(this.context) || this._initLifeCycleSemaphore();
290
+ }
291
+ /**
292
+ * Re-render the entire component once again. The old editor will be destroyed and the new one will be created.
293
+ */
294
+ componentDidUpdate() {
295
+ de(this.context) || this._initLifeCycleSemaphore();
296
+ }
297
+ /**
298
+ * Destroy the editor before unmounting the component.
299
+ */
300
+ componentWillUnmount() {
301
+ this._unlockLifeCycleSemaphore();
302
+ }
303
+ /**
304
+ * Async destroy attached editor and unlock element semaphore.
305
+ */
306
+ _unlockLifeCycleSemaphore() {
307
+ this.editorSemaphore && (this.editorSemaphore.release(), this.editorSemaphore = null);
308
+ }
309
+ /**
310
+ * Unlocks previous editor semaphore and creates new one..
311
+ */
312
+ _initLifeCycleSemaphore() {
313
+ this._unlockLifeCycleSemaphore(), this.editorSemaphore = new st(this.domContainer.current, {
314
+ mount: async () => this._initializeEditor(),
315
+ afterMount: ({ mountResult: r }) => {
316
+ const { onReady: n } = this.props;
317
+ n && this.domContainer.current !== null && n(r.instance);
318
+ },
319
+ unmount: async ({ element: r, mountResult: n }) => {
320
+ const { onAfterDestroy: a } = this.props;
321
+ try {
322
+ await this._destroyEditor(n), r.innerHTML = "";
323
+ } finally {
324
+ a && a(n.instance);
325
+ }
326
+ }
327
+ });
328
+ }
329
+ /**
330
+ * Render a <div> element which will be replaced by CKEditor.
331
+ */
332
+ render() {
333
+ return /* @__PURE__ */ R.createElement("div", { ref: this.domContainer });
334
+ }
335
+ /**
336
+ * Initializes the editor by creating a proper watchdog and initializing it with the editor's configuration.
337
+ */
338
+ async _initializeEditor() {
339
+ if (this.props.disableWatchdog)
340
+ return {
341
+ instance: await this._createEditor(this.domContainer.current, this._getConfig()),
342
+ watchdog: null
343
+ };
344
+ const r = ht(this.context) ? new yt(this.context.watchdog) : new this.props.editor.EditorWatchdog(this.props.editor, this.props.watchdogConfig), n = {
345
+ current: 0
346
+ };
347
+ return r.setCreator(async (a, m) => {
348
+ var x;
349
+ const { editorSemaphore: f } = this, { onAfterDestroy: p } = this.props;
350
+ n.current > 0 && p && (x = f == null ? void 0 : f.value) != null && x.instance && p(f.value.instance);
351
+ const C = await this._createEditor(a, m);
352
+ return f && n.current > 0 && (f.unsafeSetValue({
353
+ instance: C,
354
+ watchdog: r
355
+ }), setTimeout(() => {
356
+ this.props.onReady && this.props.onReady(r.editor);
357
+ })), n.current++, C;
358
+ }), r.on("error", (a, { error: m, causesRestart: x }) => {
359
+ (this.props.onError || console.error)(m, { phase: "runtime", willEditorRestart: x });
360
+ }), await r.create(this.domContainer.current, this._getConfig()).catch((a) => {
361
+ (this.props.onError || console.error)(a, { phase: "initialization", willEditorRestart: !1 });
362
+ }), {
363
+ watchdog: r,
364
+ instance: r.editor
365
+ };
366
+ }
367
+ /**
368
+ * Creates an editor from the element and configuration.
369
+ *
370
+ * @param element The source element.
371
+ * @param config CKEditor 5 editor configuration.
372
+ */
373
+ _createEditor(r, n) {
374
+ const { contextItemMetadata: a } = this.props;
375
+ return a && (n = ct(a, n)), this.props.editor.create(
376
+ r,
377
+ ft(n)
378
+ ).then((m) => {
379
+ if ("disabled" in this.props) {
380
+ /* istanbul ignore else -- @preserve */
381
+ this.props.disabled && m.enableReadOnlyMode(te);
382
+ }
383
+ const x = m.model.document, f = m.editing.view.document;
384
+ return x.on("change:data", (p) => {
385
+ /* istanbul ignore else -- @preserve */
386
+ this.props.onChange && this.props.onChange(p, m);
387
+ }), f.on("focus", (p) => {
388
+ /* istanbul ignore else -- @preserve */
389
+ this.props.onFocus && this.props.onFocus(p, m);
390
+ }), f.on("blur", (p) => {
391
+ /* istanbul ignore else -- @preserve */
392
+ this.props.onBlur && this.props.onBlur(p, m);
393
+ }), m;
394
+ });
395
+ }
396
+ /**
397
+ * Destroys the editor by destroying the watchdog.
398
+ */
399
+ async _destroyEditor(r) {
400
+ const { watchdog: n, instance: a } = r;
401
+ return new Promise((m, x) => {
402
+ /* istanbul ignore next -- @preserve */
403
+ setTimeout(async () => {
404
+ try {
405
+ if (n)
406
+ return await n.destroy(), m();
407
+ if (a)
408
+ return await a.destroy(), m();
409
+ m();
410
+ } catch (f) {
411
+ console.error(f), x(f);
412
+ }
413
+ });
414
+ });
415
+ }
416
+ /**
417
+ * Returns true when the editor should be updated.
418
+ *
419
+ * @param prevProps Previous react's properties.
420
+ * @param nextProps React's properties.
421
+ * @param editor Current editor instance.
422
+ */
423
+ _shouldUpdateEditorData(r, n, a) {
424
+ return !(r.data === n.data || a.data.get() === n.data);
425
+ }
426
+ /**
427
+ * Returns the editor configuration.
428
+ */
429
+ _getConfig() {
430
+ const r = this.props.config || {};
431
+ return this.props.data && r.initialData && console.warn(
432
+ "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."
433
+ ), {
434
+ ...r,
435
+ initialData: r.initialData || this.props.data || ""
436
+ };
437
+ }
438
+ }
439
+ _(ve, "contextType", ut);
440
+ class yt {
441
+ /**
442
+ * @param contextWatchdog The context watchdog instance that will be wrapped into editor watchdog API.
443
+ */
444
+ constructor(r) {
445
+ _(this, "_contextWatchdog"), _(this, "_id"), _(this, "_creator"), this._contextWatchdog = r, this._id = Ge();
446
+ }
447
+ /**
448
+ * @param creator A watchdog's editor creator function.
449
+ */
450
+ setCreator(r) {
451
+ this._creator = r;
452
+ }
453
+ /**
454
+ * Adds an editor configuration to the context watchdog registry. Creates an instance of it.
455
+ *
456
+ * @param sourceElementOrData A source element or data for the new editor.
457
+ * @param config CKEditor 5 editor config.
458
+ */
459
+ create(r, n) {
460
+ return this._contextWatchdog.add({
461
+ sourceElementOrData: r,
462
+ config: n,
463
+ creator: this._creator,
464
+ id: this._id,
465
+ type: "editor"
466
+ });
467
+ }
468
+ /**
469
+ * Creates a listener that is attached to context watchdog's item and run when the context watchdog fires.
470
+ * Currently works only for the `error` event.
471
+ */
472
+ on(r, n) {
473
+ this._contextWatchdog.on("itemError", (a, { itemId: m, error: x }) => {
474
+ m === this._id && n(null, { error: x, causesRestart: void 0 });
475
+ });
476
+ }
477
+ destroy() {
478
+ return this._contextWatchdog.state === "ready" ? this._contextWatchdog.remove(this._id) : Promise.resolve();
479
+ }
480
+ /**
481
+ * An editor instance.
482
+ */
483
+ get editor() {
484
+ return this._contextWatchdog.getItem(this._id);
485
+ }
486
+ }
487
+ /**
488
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
489
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
490
+ */
491
+ function ge(...l) {
492
+ return (r) => {
493
+ l.forEach((n) => {
494
+ typeof n == "function" ? n(r) : n != null && (n.current = r);
495
+ });
496
+ };
497
+ }
498
+ const vt = Oe(ce(({ id: l, semaphore: r, rootName: n }, a) => {
499
+ const m = H(null);
500
+ return ae(() => {
501
+ let x, f;
502
+ return r.runAfterMount(({ instance: p }) => {
503
+ if (!m.current)
504
+ return;
505
+ f = p;
506
+ const { ui: C, model: W } = f, U = W.document.getRoot(n);
507
+ U && f.ui.getEditableElement(n) && f.detachEditable(U), x = C.view.createEditable(n, m.current), C.addEditable(x), p.editing.view.forceRender();
508
+ }), () => {
509
+ if (f && f.state !== "destroyed" && m.current) {
510
+ const p = f.model.document.getRoot(n);
511
+ /* istanbul ignore else -- @preserve */
512
+ p && f.detachEditable(p);
513
+ }
514
+ };
515
+ }, [r.revision]), /* @__PURE__ */ R.createElement(
516
+ "div",
517
+ {
518
+ key: r.revision,
519
+ id: l,
520
+ ref: ge(a, m)
521
+ }
522
+ );
523
+ }));
524
+ vt.displayName = "EditorEditable";
525
+ const gt = ce(({ editor: l }, r) => {
526
+ const n = H(null);
527
+ return ae(() => {
528
+ const a = n.current;
529
+ if (!l || !a)
530
+ return;
531
+ const m = l.ui.view.toolbar.element;
532
+ return a.appendChild(m), () => {
533
+ a.contains(m) && a.removeChild(m);
534
+ };
535
+ }, [l && l.id]), /* @__PURE__ */ R.createElement("div", { ref: ge(n, r) });
536
+ });
537
+ gt.displayName = "EditorToolbarWrapper";
538
+ const Nt = ({
539
+ open: l,
540
+ handleClose: r,
541
+ handleClick: n,
542
+ type: a
543
+ }) => {
544
+ var m, x, f;
545
+ const p = Ae(), C = p.palette.mode === "dark", W = H(null), U = H(!1), Ne = Je(), [j, be] = K([]), [B, we] = K([]), [Q, xe] = K([]), { translate: d } = Ke(), [X, Ce] = K([]), ke = S.object().shape({
546
+ excetionTypes: S.string().test(
547
+ "is-required",
548
+ "Execution type is required",
549
+ function(t) {
550
+ return (a == null ? void 0 : a.type) === "EXCEPTION" ? !!t : !0;
551
+ }
552
+ ),
553
+ mobileNumberFieldName: S.string().test(
554
+ "is-required",
555
+ "Enter Sms contact number field name",
556
+ function(t) {
557
+ return (a == null ? void 0 : a.type) === "SMS" ? !!t : !0;
558
+ }
559
+ ),
560
+ smsTypeField: S.string().test(
561
+ "is-required",
562
+ "Enter Sms Type Field",
563
+ function(t) {
564
+ return (a == null ? void 0 : a.type) === "SMS" ? !!t : !0;
565
+ }
566
+ ),
567
+ trigerWhen: S.string().test(
568
+ "is-required",
569
+ "trigerWhen is required",
570
+ function(t) {
571
+ return (a == null ? void 0 : a.type) != "EXCEPTION" && (a == null ? void 0 : a.type) != "SYSTEM_FUNCTION" ? !!t : !0;
572
+ }
573
+ ),
574
+ baseDateFieldName: S.string().test(
575
+ "is-required",
576
+ "Enter Email Id field name",
577
+ function(t) {
578
+ return (a == null ? void 0 : a.type) === "EMAIL" ? !!t : !0;
579
+ }
580
+ ),
581
+ emailSubject: S.string().test(
582
+ "is-required",
583
+ "Enter email subject",
584
+ function(t) {
585
+ return (a == null ? void 0 : a.type) === "EMAIL" ? !!t : !0;
586
+ }
587
+ ),
588
+ notificationTypeId: S.string().test(
589
+ "is-required",
590
+ "Select type",
591
+ function(t) {
592
+ return (a == null ? void 0 : a.type) === "PUSH_NOTIFICATION" ? !!t : !0;
593
+ }
594
+ ),
595
+ userFieldName: S.string().test(
596
+ "is-required",
597
+ "Enter User Id field name",
598
+ function(t) {
599
+ return (a == null ? void 0 : a.type) === "PUSH_NOTIFICATION" ? !!t : !0;
600
+ }
601
+ ),
602
+ heading: S.string().test(
603
+ "is-required",
604
+ "Enter heading",
605
+ function(t) {
606
+ return (a == null ? void 0 : a.type) === "PUSH_NOTIFICATION" && G ? !!t : !0;
607
+ }
608
+ ),
609
+ template: S.string().test(
610
+ "is-required",
611
+ "Enter Template",
612
+ function(t) {
613
+ return (a == null ? void 0 : a.type) === "PUSH_NOTIFICATION" && G ? !!t : !0;
614
+ }
615
+ )
616
+ }), {
617
+ control: g,
618
+ handleSubmit: Ie,
619
+ reset: q,
620
+ setValue: N,
621
+ unregister: re,
622
+ getValues: ie,
623
+ watch: $,
624
+ formState: { errors: y }
625
+ } = Re({
626
+ defaultValues: {},
627
+ resolver: Ve(ke),
628
+ mode: "onChange"
629
+ });
630
+ ae(() => {
631
+ var t;
632
+ a && (ze(), (t = Object.keys(a)) == null || t.forEach((i) => {
633
+ var s, u, w;
634
+ if (i === "index" && N(i, a[i]), i === "smsConfigJson" && a[i]) {
635
+ const I = a[i];
636
+ (s = Object.keys(I)) == null || s.forEach((P) => {
637
+ N(P, I[P]);
638
+ });
639
+ } else if (i === "pushNotificationConfigJson" && a[i]) {
640
+ const I = a[i];
641
+ (u = Object.keys(I)) == null || u.forEach((P) => {
642
+ N(P, I[P]);
643
+ });
644
+ } else if (i === "kafkaConfigJson" && a[i]) {
645
+ const I = a[i];
646
+ (w = Object.keys(I)) == null || w.forEach((P) => {
647
+ N(P, I[P]);
648
+ });
649
+ } else a[i] !== void 0 && a[i] !== null && N(i, a[i]);
650
+ }));
651
+ }, [a]);
652
+ const z = $("queryMasterParamJson"), le = $("queryCode"), Ee = $("systemFunctionId"), M = $("functionParams"), Te = $("trigerWhen"), G = $("notificationTypeId"), O = $("kafkaParameterJson"), ne = $("formType"), _e = async (t) => {
653
+ var i;
654
+ z && z.forEach((w, I) => {
655
+ N(`${w.parameterName}${I}`, ""), N(`${w.parameterName}${I}isFixed`, !1);
656
+ });
657
+ let s = [];
658
+ const u = j == null ? void 0 : j.find((w) => (w == null ? void 0 : w.code) === t);
659
+ if (u) {
660
+ const w = (i = u == null ? void 0 : u.params) == null ? void 0 : i.split(",");
661
+ Array.from(new Set(w)).forEach((I) => {
662
+ s.push({ parameterName: I });
663
+ });
664
+ }
665
+ N("queryMasterParamJson", s);
666
+ }, Se = (t) => {
667
+ M && M.forEach((u, w) => {
668
+ N(`${u.parameterName}${w}`, ""), N(`${u.parameterName}${w}isFixed`, !1);
669
+ });
670
+ let i = [];
671
+ const s = B.find((u) => u.id === t);
672
+ s && Array.from(new Set(s.parameters)).forEach((u) => {
673
+ i.push(u);
674
+ }), N("functionParams", i);
675
+ }, Fe = (t) => {
676
+ const i = X.find(
677
+ (s) => s.id === t
678
+ );
679
+ i && (N("notificationType", i), N("template", i.message), N("heading", i.heading));
680
+ }, V = (t, i, s) => {
681
+ if ((a == null ? void 0 : a.type) === "QUERY") {
682
+ const u = [...z];
683
+ u[t][i] = s, N("queryMasterParamJson", u);
684
+ }
685
+ if ((a == null ? void 0 : a.type) === "SYSTEM_FUNCTION") {
686
+ const u = [...M];
687
+ u[t][i] = s, N("functionParams", u);
688
+ }
689
+ if ((a == null ? void 0 : a.type) === "KAFKA_SYNC") {
690
+ const u = [...O];
691
+ u[t][i] = s, N("kafkaParameterJson", u);
692
+ }
693
+ }, $e = (t) => {
694
+ const i = ie("kafkaParameterJson");
695
+ i && Array.isArray(i) && (i.forEach((u, w) => {
696
+ re(`${u.parameterName}${w}`), re(`${u.parameterName}${w}isFixed`);
697
+ }), N("kafkaParameterJson", [], { shouldValidate: !0 }));
698
+ const s = Q.find(
699
+ (u) => u.form_type === t
700
+ );
701
+ if (s && s.param_types) {
702
+ const u = JSON.parse(s.param_types), w = Object.keys(u).map((I) => ({
703
+ parameterName: I,
704
+ mappingValue: "",
705
+ isFixed: !1
706
+ }));
707
+ N("kafkaParameterJson", w, { shouldValidate: !0 });
708
+ } else
709
+ N("kafkaParameterJson", [], { shouldValidate: !0 });
710
+ }, ze = async () => {
711
+ var t, i;
712
+ try {
713
+ if ((a == null ? void 0 : a.type) === "QUERY") {
714
+ const s = await We(!0);
715
+ be(s == null ? void 0 : s.data);
716
+ }
717
+ if ((a == null ? void 0 : a.type) === "SYSTEM_FUNCTION") {
718
+ const s = await se({
719
+ code: "system_function_retrieve_all",
720
+ parameters: {}
721
+ }), u = (t = s == null ? void 0 : s.data) == null ? void 0 : t.result.map((w) => (w.parameters = JSON.parse(w.parameters), w));
722
+ we(u);
723
+ }
724
+ if ((a == null ? void 0 : a.type) === "PUSH_NOTIFICATION") {
725
+ const s = await je();
726
+ Ce(s == null ? void 0 : s.data);
727
+ }
728
+ if ((a == null ? void 0 : a.type) === "KAFKA_SYNC") {
729
+ const s = await se({
730
+ code: "retrieve_all_kafka_configs",
731
+ parameters: {}
732
+ });
733
+ xe(((i = s == null ? void 0 : s.data) == null ? void 0 : i.result) || []);
734
+ }
735
+ } catch {
736
+ qe({ message: "Error in loading", type: "error" });
737
+ }
738
+ }, J = () => {
739
+ Ne("conversion_event", {
740
+ form: W.current,
741
+ form_name: "Add Other Type Configuration",
742
+ submit: U.current
743
+ }), r();
744
+ }, Me = (t) => {
745
+ t = JSON.parse(JSON.stringify(t)), t.minute = Number(t.minute || 0), t.type = a == null ? void 0 : a.type, a.type === "SMS" && (t.smsConfigJson = {
746
+ mobileNumberFieldName: t.mobileNumberFieldName,
747
+ isPriority: t.isPriority,
748
+ isSmsTypeFixed: t.isSmsTypeFixed,
749
+ smsTypeField: t.smsTypeField
750
+ }, delete t.mobileNumberFieldName, delete t.isPriority, delete t.isSmsTypeFixed, delete t.smsTypeField), a.type === "PUSH_NOTIFICATION" && (t.pushNotificationConfigJson = {
751
+ notificationTypeId: t.notificationTypeId,
752
+ userFieldName: t.userFieldName,
753
+ heading: t.heading,
754
+ template: t.template
755
+ }, delete t.notificationTypeId, delete t.userFieldName, delete t.heading, delete t.template), a.type === "KAFKA_SYNC" && (t.kafkaConfigJson = {
756
+ formType: t.formType,
757
+ kafkaParameterJson: t.kafkaParameterJson
758
+ }), z == null || z.forEach((i, s) => {
759
+ delete t[`${i == null ? void 0 : i.parameterName}${s}`], delete t[`${i == null ? void 0 : i.parameterName}${s}isFixed`];
760
+ }), M == null || M.forEach((i, s) => {
761
+ delete t[`${i == null ? void 0 : i.parameterName}${s}`], delete t[`${i == null ? void 0 : i.parameterName}${s}isFixed`];
762
+ }), O == null || O.forEach((i, s) => {
763
+ delete t[`${i == null ? void 0 : i.parameterName}${s}`], delete t[`${i == null ? void 0 : i.parameterName}${s}isFixed`];
764
+ }), n(t), U.current = !0, J(), q();
765
+ };
766
+ return /* @__PURE__ */ e(
767
+ Ue,
768
+ {
769
+ "data-testid": "othertypeeventconfigmodal-modal",
770
+ open: l,
771
+ className: "flex items-center justify-center",
772
+ onClose: () => {
773
+ J(), q();
774
+ },
775
+ sx: {
776
+ "& .MuiBackdrop-root": {
777
+ backgroundColor: "rgba(0, 0, 0, 0.1)"
778
+ }
779
+ },
780
+ children: /* @__PURE__ */ o(
781
+ c,
782
+ {
783
+ container: !0,
784
+ className: "w-[90%] md:w-[80%] flex flex-col",
785
+ sx: {
786
+ // 1. Theme-aware background
787
+ backgroundColor: (t) => t.palette.background.paper,
788
+ // 2. Dynamic Border/Shadow for Dark Mode
789
+ border: (t) => t.palette.mode === "dark" ? `1px solid ${t.palette.divider}` : "none",
790
+ // 3. GitHub-style shadow (Soft in light, Deep in dark)
791
+ boxShadow: (t) => t.palette.mode === "dark" ? "0 8px 24px rgba(0,0,0,0.4)" : t.shadows[2],
792
+ // Standard MUI shadow for light mode
793
+ borderRadius: "12px",
794
+ // Matches your MuiCard configuration
795
+ transition: "all 0.3s ease-in-out"
796
+ // Keeps children inside the rounded corners
797
+ },
798
+ children: [
799
+ /* @__PURE__ */ o(
800
+ c,
801
+ {
802
+ className: "manageeventconfiguration-modal-header p-2.5 px-5 flex border-b",
803
+ "data-testid": "othertypeeventconfigmodal-modal-header",
804
+ children: [
805
+ /* @__PURE__ */ o(
806
+ h,
807
+ {
808
+ variant: "body1",
809
+ className: "font-medium text-lg text-customBlue",
810
+ children: [
811
+ d("Add"),
812
+ " ",
813
+ d(a == null ? void 0 : a.type),
814
+ " ",
815
+ d("Configuration")
816
+ ]
817
+ }
818
+ ),
819
+ /* @__PURE__ */ e(
820
+ Le,
821
+ {
822
+ size: "small",
823
+ onClick: () => {
824
+ J(), q();
825
+ },
826
+ "data-testid": "othertypeeventconfigmodal-close-button",
827
+ children: /* @__PURE__ */ e(He, { icon: Ye })
828
+ }
829
+ )
830
+ ]
831
+ }
832
+ ),
833
+ /* @__PURE__ */ o(
834
+ "form",
835
+ {
836
+ onSubmit: Ie(Me),
837
+ ref: W,
838
+ "data-testid": "othertypeeventconfigmodal-form",
839
+ children: [
840
+ /* @__PURE__ */ o(c, { container: !0, className: " max-h-[60vh] overflow-y-auto w-full", children: [
841
+ /* @__PURE__ */ e(
842
+ c,
843
+ {
844
+ item: !0,
845
+ className: "border-b border-gray-300 p-2.5 flex flex-col items-start",
846
+ size: { xs: 12 },
847
+ children: /* @__PURE__ */ e(b, { className: "whitespace-normal w-full break-all p-2.5 flex flex-col items-start", children: /* @__PURE__ */ o(h, { variant: "body2", className: "font-bold", children: [
848
+ d("Available Implicit Parameters"),
849
+ ":",
850
+ " ",
851
+ a == null ? void 0 : a.implicitParam,
852
+ " "
853
+ ] }) })
854
+ }
855
+ ),
856
+ /* @__PURE__ */ o(c, { item: !0, className: "p-2.5 w-full", children: [
857
+ (a == null ? void 0 : a.type) === "EXCEPTION" && /* @__PURE__ */ o(c, { container: !0, spacing: 2, children: [
858
+ /* @__PURE__ */ e(c, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ o(
859
+ v,
860
+ {
861
+ variant: "outlined",
862
+ className: " w-full",
863
+ "data-testid": "othertypeeventconfigmodal-exceptionType",
864
+ children: [
865
+ /* @__PURE__ */ o(h, { variant: "body2", children: [
866
+ d("Exception"),
867
+ " ",
868
+ d("Type"),
869
+ /* @__PURE__ */ e("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
870
+ ] }),
871
+ /* @__PURE__ */ o(b, { className: " w-full", children: [
872
+ /* @__PURE__ */ e(
873
+ T,
874
+ {
875
+ name: "excetionTypes",
876
+ control: g,
877
+ defaultValue: "",
878
+ className: " w-full",
879
+ render: ({ field: t }) => /* @__PURE__ */ o(
880
+ A,
881
+ {
882
+ className: " w-full",
883
+ ...t,
884
+ error: y.excetionTypes,
885
+ size: "small",
886
+ "data-testid": "othertypeeventconfigmodal-excetionTypes-select",
887
+ children: [
888
+ /* @__PURE__ */ e(E, { value: "", children: /* @__PURE__ */ e(h, { variant: "body2", children: d("Select") }) }),
889
+ /* @__PURE__ */ e(E, { value: "ImtechoUserException", children: /* @__PURE__ */ e(h, { variant: "body2", children: d("Imtecho User Exception") }) }),
890
+ /* @__PURE__ */ e(E, { value: "ImtechoSystemException", children: /* @__PURE__ */ o(h, { variant: "body2", children: [
891
+ " ",
892
+ d("Imtecho System Exception")
893
+ ] }) }),
894
+ /* @__PURE__ */ e(E, { value: "ImtechoMobileException", children: /* @__PURE__ */ e(h, { variant: "body2", children: d("Imtecho Mobile Exception") }) })
895
+ ]
896
+ }
897
+ )
898
+ }
899
+ ),
900
+ (y == null ? void 0 : y.excetionTypes) && /* @__PURE__ */ e(
901
+ "p",
902
+ {
903
+ className: "error-helper",
904
+ "data-testid": "custom-error-message",
905
+ children: (m = y == null ? void 0 : y.excetionTypes) == null ? void 0 : m.message
906
+ }
907
+ )
908
+ ] })
909
+ ]
910
+ }
911
+ ) }),
912
+ /* @__PURE__ */ o(c, { item: !0, size: { xs: 12 }, className: " w-full", children: [
913
+ " ",
914
+ /* @__PURE__ */ o(
915
+ v,
916
+ {
917
+ variant: "outlined",
918
+ className: " w-full",
919
+ "data-testid": "othertypeeventconfigmodal-exceptionMessage",
920
+ children: [
921
+ /* @__PURE__ */ e(h, { variant: "body2", children: d("Message") }),
922
+ /* @__PURE__ */ e(b, { className: " w-full", children: /* @__PURE__ */ e(
923
+ ee,
924
+ {
925
+ control: g,
926
+ id: "exceptionMessage",
927
+ name: "exceptionMessage",
928
+ errors: y,
929
+ label: "",
930
+ minRows: 5,
931
+ "data-testid": "othertypeeventconfigmodal-exceptionMessage-customtextarea"
932
+ }
933
+ ) })
934
+ ]
935
+ }
936
+ )
937
+ ] })
938
+ ] }),
939
+ (a == null ? void 0 : a.type) === "SMS" && /* @__PURE__ */ o(c, { container: !0, spacing: 2, children: [
940
+ /* @__PURE__ */ e(c, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ o(
941
+ v,
942
+ {
943
+ variant: "outlined",
944
+ className: " w-full",
945
+ "data-testid": "othertypeeventconfigmodal-mobileNumberFieldName",
946
+ children: [
947
+ /* @__PURE__ */ o(h, { variant: "body2", children: [
948
+ d("SMS"),
949
+ " ",
950
+ d("Phone number"),
951
+ " ",
952
+ d("Field"),
953
+ " ",
954
+ d("Name"),
955
+ /* @__PURE__ */ e("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
956
+ ] }),
957
+ /* @__PURE__ */ e(b, { className: " w-full", children: /* @__PURE__ */ e(
958
+ F,
959
+ {
960
+ control: g,
961
+ id: "mobileNumberFieldName",
962
+ name: "mobileNumberFieldName",
963
+ errors: y,
964
+ label: "",
965
+ size: "small",
966
+ dataTestId: "othertypeeventconfigmodal-mobileNumberFieldName-textfield"
967
+ }
968
+ ) })
969
+ ]
970
+ }
971
+ ) }),
972
+ /* @__PURE__ */ e(c, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ o(
973
+ v,
974
+ {
975
+ variant: "outlined",
976
+ className: " w-full",
977
+ "data-testid": "othertypeeventconfigmodal-smsTypeField",
978
+ children: [
979
+ /* @__PURE__ */ o(
980
+ c,
981
+ {
982
+ container: !0,
983
+ justifyContent: "space-between",
984
+ alignItems: "center",
985
+ children: [
986
+ /* @__PURE__ */ e(c, { item: !0, xs: !0, children: /* @__PURE__ */ o(h, { variant: "body2", children: [
987
+ d("SMS"),
988
+ " ",
989
+ d("Type"),
990
+ " ",
991
+ d("Field"),
992
+ " ",
993
+ d("Value"),
994
+ /* @__PURE__ */ e("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
995
+ ] }) }),
996
+ /* @__PURE__ */ o(c, { container: !0, children: [
997
+ " ",
998
+ /* @__PURE__ */ e(c, { item: !0, children: /* @__PURE__ */ e(v, { component: "fieldset", className: "mr-2", children: /* @__PURE__ */ e(
999
+ T,
1000
+ {
1001
+ control: g,
1002
+ name: "isPriority",
1003
+ defaultValue: !1,
1004
+ render: ({ field: t }) => /* @__PURE__ */ e(
1005
+ L,
1006
+ {
1007
+ control: /* @__PURE__ */ e(
1008
+ D,
1009
+ {
1010
+ checked: t.value,
1011
+ onChange: (i) => t.onChange(i.target.checked),
1012
+ "data-testid": "othertypeeventconfigmodal-isPriority-checkbox"
1013
+ }
1014
+ ),
1015
+ label: "Is Priority"
1016
+ }
1017
+ )
1018
+ }
1019
+ ) }) }),
1020
+ /* @__PURE__ */ e(c, { item: !0, children: /* @__PURE__ */ e(v, { component: "fieldset", className: "mr-2", children: /* @__PURE__ */ e(
1021
+ T,
1022
+ {
1023
+ control: g,
1024
+ name: "isSmsTypeFixed",
1025
+ defaultValue: !1,
1026
+ render: ({ field: t }) => /* @__PURE__ */ e(
1027
+ L,
1028
+ {
1029
+ control: /* @__PURE__ */ e(
1030
+ D,
1031
+ {
1032
+ checked: t.value,
1033
+ onChange: (i) => t.onChange(i.target.checked),
1034
+ "data-testid": "othertypeeventconfigmodal-isSmsTypeFixed-checkbox"
1035
+ }
1036
+ ),
1037
+ label: d("Is Fixed Value")
1038
+ }
1039
+ )
1040
+ }
1041
+ ) }) })
1042
+ ] })
1043
+ ]
1044
+ }
1045
+ ),
1046
+ /* @__PURE__ */ e(b, { className: " w-full", children: /* @__PURE__ */ e(
1047
+ F,
1048
+ {
1049
+ control: g,
1050
+ id: "smsTypeField",
1051
+ name: "smsTypeField",
1052
+ errors: y,
1053
+ label: "",
1054
+ size: "small",
1055
+ dataTestId: "othertypeeventconfigmodal-smsTypeField-textfield"
1056
+ }
1057
+ ) })
1058
+ ]
1059
+ }
1060
+ ) })
1061
+ ] }),
1062
+ (a == null ? void 0 : a.type) === "EMAIL" && /* @__PURE__ */ o(c, { container: !0, spacing: 2, className: " w-full", children: [
1063
+ /* @__PURE__ */ e(c, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ o(
1064
+ v,
1065
+ {
1066
+ variant: "outlined",
1067
+ className: " w-full",
1068
+ "data-testid": "othertypeeventconfigmodal-emailIdField",
1069
+ children: [
1070
+ /* @__PURE__ */ o(h, { variant: "body2", children: [
1071
+ d("Email"),
1072
+ " ",
1073
+ d("Id"),
1074
+ " ",
1075
+ d("Field"),
1076
+ " ",
1077
+ d("Value"),
1078
+ /* @__PURE__ */ e("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
1079
+ ] }),
1080
+ /* @__PURE__ */ e(b, { className: " w-full", children: /* @__PURE__ */ e(
1081
+ F,
1082
+ {
1083
+ control: g,
1084
+ id: "baseDateFieldName",
1085
+ name: "baseDateFieldName",
1086
+ errors: y,
1087
+ label: "",
1088
+ size: "small",
1089
+ dataTestId: "othertypeeventconfigmodal-baseDateFieldName-textfield"
1090
+ }
1091
+ ) })
1092
+ ]
1093
+ }
1094
+ ) }),
1095
+ /* @__PURE__ */ e(c, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ o(
1096
+ v,
1097
+ {
1098
+ variant: "outlined",
1099
+ className: " w-full",
1100
+ "data-testid": "othertypeeventconfigmodal-emailSubjectField",
1101
+ children: [
1102
+ /* @__PURE__ */ o(h, { variant: "body2", children: [
1103
+ d("Email"),
1104
+ " ",
1105
+ d("Subject"),
1106
+ /* @__PURE__ */ e("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
1107
+ ] }),
1108
+ /* @__PURE__ */ e(b, { className: " w-full", children: /* @__PURE__ */ e(
1109
+ F,
1110
+ {
1111
+ control: g,
1112
+ id: "emailSubject",
1113
+ name: "emailSubject",
1114
+ errors: y,
1115
+ label: "",
1116
+ size: "small",
1117
+ dataTestId: "othertypeeventconfigmodal-emailSubject-textfield"
1118
+ }
1119
+ ) })
1120
+ ]
1121
+ }
1122
+ ) }),
1123
+ /* @__PURE__ */ e(c, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ o(
1124
+ v,
1125
+ {
1126
+ variant: "outlined",
1127
+ className: " w-[95%] md:w-full overflow-auto",
1128
+ "data-testid": "othertypeeventconfigmodal-template",
1129
+ children: [
1130
+ /* @__PURE__ */ e(h, { variant: "body2", children: d("Template") }),
1131
+ /* @__PURE__ */ e(
1132
+ b,
1133
+ {
1134
+ className: " w-full",
1135
+ sx: {
1136
+ borderRadius: "8px",
1137
+ overflow: "hidden",
1138
+ border: `1px solid ${p.palette.divider}`,
1139
+ // This targets the actual writing area
1140
+ "& .ck-editor__main > .ck-editor__editable": {
1141
+ backgroundColor: `${p.palette.background.paper} !important`,
1142
+ color: `${p.palette.text.primary} !important`,
1143
+ minHeight: "200px",
1144
+ "&.ck-focused": {
1145
+ borderColor: `${p.palette.primary.main} !important`
1146
+ }
1147
+ },
1148
+ // This targets the toolbar
1149
+ "& .ck.ck-toolbar": {
1150
+ backgroundColor: C ? "#21262D !important" : "#f5f5f5 !important",
1151
+ borderColor: `${p.palette.divider} !important`
1152
+ },
1153
+ // This targets the buttons/icons inside the toolbar
1154
+ "& .ck.ck-toolbar .ck-button": {
1155
+ color: `${p.palette.text.primary} !important`,
1156
+ cursor: "pointer",
1157
+ "&:hover": {
1158
+ backgroundColor: C ? "#30363D !important" : "#e0e0e0 !important"
1159
+ },
1160
+ "&.ck-on": {
1161
+ backgroundColor: C ? "#11B66633 !important" : "#d1d1d1 !important",
1162
+ color: `${p.palette.primary.main} !important`
1163
+ }
1164
+ },
1165
+ // This targets dropdowns and labels
1166
+ "& .ck.ck-label": {
1167
+ color: `${p.palette.text.secondary} !important`
1168
+ }
1169
+ },
1170
+ children: /* @__PURE__ */ e(
1171
+ ve,
1172
+ {
1173
+ editor: Be,
1174
+ data: ie("template") || "",
1175
+ config: {
1176
+ toolbar: [
1177
+ "heading",
1178
+ "|",
1179
+ "bold",
1180
+ "italic",
1181
+ "underline",
1182
+ "|",
1183
+ "cut",
1184
+ "copy",
1185
+ "|",
1186
+ // Added cut and copy
1187
+ "bulletedList",
1188
+ "numberedList",
1189
+ "|",
1190
+ "blockQuote",
1191
+ "|",
1192
+ "undo",
1193
+ "redo"
1194
+ ]
1195
+ },
1196
+ onChange: (t, i) => {
1197
+ const s = i.getData();
1198
+ N("template", s);
1199
+ },
1200
+ "data-testid": "othertypeeventconfigmodal-template-ckeditor"
1201
+ }
1202
+ )
1203
+ }
1204
+ )
1205
+ ]
1206
+ }
1207
+ ) })
1208
+ ] }),
1209
+ (a == null ? void 0 : a.type) === "QUERY" && /* @__PURE__ */ e(c, { container: !0, children: /* @__PURE__ */ e(c, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ o(
1210
+ v,
1211
+ {
1212
+ variant: "outlined",
1213
+ className: " w-full",
1214
+ "data-testid": "othertypeeventconfigmodal-querySelect",
1215
+ children: [
1216
+ /* @__PURE__ */ e(h, { variant: "body2", children: d("Query") }),
1217
+ /* @__PURE__ */ e(b, { className: " w-full", children: /* @__PURE__ */ e(
1218
+ T,
1219
+ {
1220
+ className: " w-full",
1221
+ name: "queryCode",
1222
+ control: g,
1223
+ defaultValue: null,
1224
+ render: ({ field: t }) => /* @__PURE__ */ o(
1225
+ A,
1226
+ {
1227
+ ...t,
1228
+ className: " w-full",
1229
+ size: "small",
1230
+ displayEmpty: !0,
1231
+ onChange: (i) => {
1232
+ t.onChange(i), _e(i.target.value);
1233
+ },
1234
+ "data-testid": "othertypeeventconfigmodal-queryCode-select",
1235
+ children: [
1236
+ /* @__PURE__ */ e(E, { value: null, children: /* @__PURE__ */ e(h, { variant: "body2", children: d("Select") }) }),
1237
+ j == null ? void 0 : j.map((i, s) => /* @__PURE__ */ e(E, { value: i == null ? void 0 : i.code, children: /* @__PURE__ */ o(h, { variant: "body2", children: [
1238
+ " ",
1239
+ i == null ? void 0 : i.code
1240
+ ] }) }, s + 1))
1241
+ ]
1242
+ }
1243
+ )
1244
+ }
1245
+ ) })
1246
+ ]
1247
+ }
1248
+ ) }) }),
1249
+ z && (a == null ? void 0 : a.type) === "QUERY" && le && /* @__PURE__ */ e(c, { container: !0, className: " w-full", children: z == null ? void 0 : z.map((t, i) => /* @__PURE__ */ e(
1250
+ c,
1251
+ {
1252
+ item: !0,
1253
+ size: { xs: 12 },
1254
+ className: " w-full",
1255
+ children: /* @__PURE__ */ o(v, { variant: "outlined", className: " w-full", children: [
1256
+ /* @__PURE__ */ o(
1257
+ c,
1258
+ {
1259
+ container: !0,
1260
+ justifyContent: "space-between",
1261
+ alignItems: "center",
1262
+ children: [
1263
+ /* @__PURE__ */ e(c, { item: !0, children: /* @__PURE__ */ o(h, { variant: "body1", children: [
1264
+ t == null ? void 0 : t.parameterName,
1265
+ " ",
1266
+ d("Mapping")
1267
+ ] }) }),
1268
+ /* @__PURE__ */ e(c, { item: !0, children: /* @__PURE__ */ e(v, { component: "fieldset", className: "mr-2", children: /* @__PURE__ */ e(
1269
+ T,
1270
+ {
1271
+ control: g,
1272
+ name: `${t == null ? void 0 : t.parameterName}${i}isFixed`,
1273
+ defaultValue: (t == null ? void 0 : t.isFixed) || !1,
1274
+ render: ({ field: s }) => /* @__PURE__ */ e(
1275
+ L,
1276
+ {
1277
+ control: /* @__PURE__ */ e(
1278
+ D,
1279
+ {
1280
+ checked: s.value,
1281
+ onChange: (u) => {
1282
+ s.onChange(u.target.checked), V(
1283
+ i,
1284
+ "isFixed",
1285
+ u.target.checked
1286
+ );
1287
+ },
1288
+ "data-testid": "othertypeeventconfigmodal-isFixed-checkbox"
1289
+ }
1290
+ ),
1291
+ label: "Is Fixed Value"
1292
+ }
1293
+ )
1294
+ }
1295
+ ) }) })
1296
+ ]
1297
+ }
1298
+ ),
1299
+ /* @__PURE__ */ e(b, { className: " w-full", children: /* @__PURE__ */ e(
1300
+ T,
1301
+ {
1302
+ control: g,
1303
+ className: " w-full",
1304
+ name: `${t == null ? void 0 : t.parameterName}${i}`,
1305
+ defaultValue: t == null ? void 0 : t.mappingValue,
1306
+ render: ({ field: s }) => /* @__PURE__ */ e(
1307
+ Z,
1308
+ {
1309
+ variant: "outlined",
1310
+ size: "small",
1311
+ className: " w-full",
1312
+ ...s,
1313
+ fullWidth: !0,
1314
+ onChange: (u) => {
1315
+ N(
1316
+ `${t == null ? void 0 : t.parameterName}${i}`,
1317
+ u.target.value
1318
+ ), V(
1319
+ i,
1320
+ "mappingValue",
1321
+ u.target.value
1322
+ );
1323
+ },
1324
+ "data-testid": `othertypeeventconfigmodal-${t == null ? void 0 : t.parameterName}${i}-textfiled`
1325
+ }
1326
+ )
1327
+ }
1328
+ ) })
1329
+ ] })
1330
+ },
1331
+ i + 1
1332
+ )) }),
1333
+ (a == null ? void 0 : a.type) === "SYSTEM_FUNCTION" && /* @__PURE__ */ e(c, { container: !0, children: /* @__PURE__ */ e(c, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ o(
1334
+ v,
1335
+ {
1336
+ variant: "outlined",
1337
+ className: " w-full",
1338
+ "data-testid": "othertypeeventconfigmodal-systemFunction",
1339
+ children: [
1340
+ /* @__PURE__ */ e(h, { variant: "body2", children: d("System Function") }),
1341
+ /* @__PURE__ */ e(b, { className: " w-full", children: /* @__PURE__ */ e(
1342
+ T,
1343
+ {
1344
+ className: " w-full",
1345
+ name: "systemFunctionId",
1346
+ control: g,
1347
+ defaultValue: "",
1348
+ render: ({ field: t }) => /* @__PURE__ */ o(
1349
+ A,
1350
+ {
1351
+ ...t,
1352
+ className: " w-full",
1353
+ size: "small",
1354
+ onChange: (i) => {
1355
+ t.onChange(i), Se(i.target.value);
1356
+ },
1357
+ "data-testid": "othertypeeventconfigmodal-systemFunctionId-select",
1358
+ sx: {
1359
+ ".MuiSelect-select": {
1360
+ whiteSpace: "pre-wrap",
1361
+ // Allows line breaks
1362
+ wordBreak: "break-word",
1363
+ height: "auto",
1364
+ minHeight: "1.4375em"
1365
+ }
1366
+ },
1367
+ MenuProps: {
1368
+ PaperProps: {
1369
+ sx: {
1370
+ maxHeight: 300,
1371
+ overflow: "auto",
1372
+ maxWidth: 410
1373
+ }
1374
+ }
1375
+ },
1376
+ children: [
1377
+ /* @__PURE__ */ e(E, { value: "", children: /* @__PURE__ */ e(h, { variant: "body2", children: d("None") }) }),
1378
+ B == null ? void 0 : B.map((i, s) => /* @__PURE__ */ e(E, { value: i == null ? void 0 : i.id, children: /* @__PURE__ */ o(h, { variant: "body2", children: [
1379
+ " ",
1380
+ i == null ? void 0 : i.name,
1381
+ " (",
1382
+ i == null ? void 0 : i.className,
1383
+ ")"
1384
+ ] }) }, s + 1))
1385
+ ]
1386
+ }
1387
+ )
1388
+ }
1389
+ ) })
1390
+ ]
1391
+ }
1392
+ ) }) }),
1393
+ M && (a == null ? void 0 : a.type) === "SYSTEM_FUNCTION" && Ee && /* @__PURE__ */ e(c, { container: !0, children: M == null ? void 0 : M.map((t, i) => /* @__PURE__ */ e(
1394
+ c,
1395
+ {
1396
+ item: !0,
1397
+ size: { xs: 12 },
1398
+ className: " w-full",
1399
+ children: /* @__PURE__ */ o(v, { variant: "outlined", className: " w-full", children: [
1400
+ /* @__PURE__ */ o(
1401
+ c,
1402
+ {
1403
+ container: !0,
1404
+ justifyContent: "space-between",
1405
+ alignItems: "center",
1406
+ children: [
1407
+ /* @__PURE__ */ e(c, { item: !0, xs: !0, children: /* @__PURE__ */ o(h, { variant: "body2", children: [
1408
+ t == null ? void 0 : t.parameterName,
1409
+ " ",
1410
+ d("Mapping")
1411
+ ] }) }),
1412
+ /* @__PURE__ */ e(c, { item: !0, children: /* @__PURE__ */ e(
1413
+ v,
1414
+ {
1415
+ component: "fieldset",
1416
+ className: "mr-2",
1417
+ children: /* @__PURE__ */ e(
1418
+ T,
1419
+ {
1420
+ control: g,
1421
+ name: `${t == null ? void 0 : t.parameterName}${i}isFixed`,
1422
+ defaultValue: (t == null ? void 0 : t.isFixed) || !1,
1423
+ render: ({ field: s }) => /* @__PURE__ */ e(
1424
+ L,
1425
+ {
1426
+ control: /* @__PURE__ */ e(
1427
+ D,
1428
+ {
1429
+ checked: s.value,
1430
+ onChange: (u) => {
1431
+ s.onChange(u.target.checked), V(
1432
+ i,
1433
+ "isFixed",
1434
+ u.target.checked
1435
+ );
1436
+ },
1437
+ "data-testid": "othertypeeventconfigmodal-systemFunctionId-checkbox"
1438
+ }
1439
+ ),
1440
+ label: "Is Fixed Value"
1441
+ }
1442
+ )
1443
+ }
1444
+ )
1445
+ }
1446
+ ) })
1447
+ ]
1448
+ }
1449
+ ),
1450
+ /* @__PURE__ */ e(b, { className: " w-full", children: /* @__PURE__ */ e(
1451
+ T,
1452
+ {
1453
+ control: g,
1454
+ className: " w-full",
1455
+ name: `${t == null ? void 0 : t.parameterName}${i}`,
1456
+ defaultValue: t == null ? void 0 : t.mappingValue,
1457
+ render: ({ field: s }) => /* @__PURE__ */ e(
1458
+ Z,
1459
+ {
1460
+ variant: "outlined",
1461
+ size: "small",
1462
+ className: " w-full",
1463
+ ...s,
1464
+ fullWidth: !0,
1465
+ onChange: (u) => {
1466
+ N(
1467
+ `${t == null ? void 0 : t.parameterName}${i}`,
1468
+ u.target.value
1469
+ ), V(
1470
+ i,
1471
+ "mappingValue",
1472
+ u.target.value
1473
+ );
1474
+ },
1475
+ "data-testid": `othertypeeventconfigmodal-${t == null ? void 0 : t.parameterName}${i}-textfiled`
1476
+ }
1477
+ )
1478
+ }
1479
+ ) })
1480
+ ] })
1481
+ },
1482
+ i + 1
1483
+ )) }),
1484
+ (a == null ? void 0 : a.type) === "PUSH_NOTIFICATION" && /* @__PURE__ */ o(c, { container: !0, spacing: 2, children: [
1485
+ /* @__PURE__ */ e(c, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ o(
1486
+ v,
1487
+ {
1488
+ variant: "outlined",
1489
+ className: " w-full",
1490
+ "data-testid": "othertypeeventconfigmodal-userIdFieldName",
1491
+ children: [
1492
+ /* @__PURE__ */ o(h, { variant: "body2", children: [
1493
+ d("User"),
1494
+ " ",
1495
+ d("Id"),
1496
+ " ",
1497
+ d("Field"),
1498
+ " ",
1499
+ d("Name"),
1500
+ /* @__PURE__ */ e("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
1501
+ ] }),
1502
+ /* @__PURE__ */ e(b, { className: " w-full", children: /* @__PURE__ */ e(
1503
+ F,
1504
+ {
1505
+ control: g,
1506
+ id: "userFieldName",
1507
+ name: "userFieldName",
1508
+ errors: y,
1509
+ label: "",
1510
+ size: "small",
1511
+ dataTestId: "othertypeeventconfigmodal-userFieldName-textfield"
1512
+ }
1513
+ ) })
1514
+ ]
1515
+ }
1516
+ ) }),
1517
+ /* @__PURE__ */ e(c, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ o(
1518
+ v,
1519
+ {
1520
+ variant: "outlined",
1521
+ className: " w-full",
1522
+ "data-testid": "othertypeeventconfigmodal-notificationType",
1523
+ children: [
1524
+ /* @__PURE__ */ o(h, { variant: "body2", children: [
1525
+ d("Notification"),
1526
+ " ",
1527
+ d("Type"),
1528
+ /* @__PURE__ */ e("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
1529
+ ] }),
1530
+ /* @__PURE__ */ o(b, { className: " w-full", children: [
1531
+ /* @__PURE__ */ e(
1532
+ T,
1533
+ {
1534
+ className: " w-full",
1535
+ name: "notificationTypeId",
1536
+ control: g,
1537
+ defaultValue: "",
1538
+ render: ({ field: t }) => /* @__PURE__ */ o(
1539
+ A,
1540
+ {
1541
+ ...t,
1542
+ className: " w-full",
1543
+ size: "small",
1544
+ error: y == null ? void 0 : y.notificationTypeId,
1545
+ onChange: (i) => {
1546
+ t.onChange(i), Fe(i.target.value);
1547
+ },
1548
+ "data-testid": "othertypeeventconfigmodal-notificationtypeid-select",
1549
+ children: [
1550
+ /* @__PURE__ */ e(E, { value: "", children: /* @__PURE__ */ e(h, { variant: "body2", children: d("None") }) }),
1551
+ X == null ? void 0 : X.map((i, s) => /* @__PURE__ */ e(E, { value: i == null ? void 0 : i.id, children: /* @__PURE__ */ e(h, { variant: "body2", children: i == null ? void 0 : i.type }) }, s + 1))
1552
+ ]
1553
+ }
1554
+ )
1555
+ }
1556
+ ),
1557
+ (y == null ? void 0 : y.notificationTypeId) && /* @__PURE__ */ e(
1558
+ "p",
1559
+ {
1560
+ className: "error-helper",
1561
+ "data-testid": "custom-error-message",
1562
+ children: (x = y == null ? void 0 : y.notificationTypeId) == null ? void 0 : x.message
1563
+ }
1564
+ )
1565
+ ] })
1566
+ ]
1567
+ }
1568
+ ) })
1569
+ ] }),
1570
+ (a == null ? void 0 : a.type) === "PUSH_NOTIFICATION" && G && /* @__PURE__ */ o(c, { container: !0, spacing: 2, children: [
1571
+ /* @__PURE__ */ e(c, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ o(v, { variant: "outlined", className: " w-full", children: [
1572
+ /* @__PURE__ */ o(h, { variant: "body2", children: [
1573
+ d("Notification"),
1574
+ " ",
1575
+ d("Heading"),
1576
+ /* @__PURE__ */ e("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
1577
+ ] }),
1578
+ /* @__PURE__ */ e(b, { className: " w-full", children: /* @__PURE__ */ e(
1579
+ F,
1580
+ {
1581
+ control: g,
1582
+ id: "heading",
1583
+ name: "heading",
1584
+ errors: y,
1585
+ label: "",
1586
+ size: "small",
1587
+ dataTestId: "othertypeeventconfigmodal-heading-textfield"
1588
+ }
1589
+ ) })
1590
+ ] }) }),
1591
+ /* @__PURE__ */ o(c, { item: !0, size: { xs: 12 }, className: " w-full", children: [
1592
+ " ",
1593
+ /* @__PURE__ */ o(v, { variant: "outlined", className: " w-full", children: [
1594
+ /* @__PURE__ */ e(h, { variant: "body2", children: d("Template") }),
1595
+ /* @__PURE__ */ e(b, { className: " w-full", children: /* @__PURE__ */ e(
1596
+ ee,
1597
+ {
1598
+ control: g,
1599
+ id: "template",
1600
+ name: "template",
1601
+ errors: y,
1602
+ label: "",
1603
+ minRows: 5,
1604
+ "data-testid": "othertypeeventconfigmodal-template-customtextarea"
1605
+ }
1606
+ ) })
1607
+ ] })
1608
+ ] })
1609
+ ] }),
1610
+ (a == null ? void 0 : a.type) === "KAFKA_SYNC" && /* @__PURE__ */ e(c, { container: !0, children: /* @__PURE__ */ e(c, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ o(
1611
+ v,
1612
+ {
1613
+ variant: "outlined",
1614
+ className: " w-full",
1615
+ "data-testid": "othertypeeventconfigmodal-kafkaConfig",
1616
+ children: [
1617
+ /* @__PURE__ */ o(h, { variant: "body2", children: [
1618
+ d("Kafka Config"),
1619
+ /* @__PURE__ */ e("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
1620
+ ] }),
1621
+ /* @__PURE__ */ e(b, { className: " w-full", children: /* @__PURE__ */ e(
1622
+ T,
1623
+ {
1624
+ className: " w-full",
1625
+ name: "formType",
1626
+ control: g,
1627
+ defaultValue: "",
1628
+ error: y,
1629
+ render: ({ field: t }) => /* @__PURE__ */ o(
1630
+ A,
1631
+ {
1632
+ ...t,
1633
+ className: " w-full",
1634
+ size: "small",
1635
+ displayEmpty: !0,
1636
+ onChange: (i) => {
1637
+ t.onChange(i), $e(i.target.value);
1638
+ },
1639
+ "data-testid": "othertypeeventconfigmodal-kafkaConfig-select",
1640
+ children: [
1641
+ /* @__PURE__ */ e(E, { value: "", children: /* @__PURE__ */ e(h, { variant: "body2", children: d("Select") }) }),
1642
+ Q == null ? void 0 : Q.map((i, s) => /* @__PURE__ */ e(E, { value: i.form_type, children: /* @__PURE__ */ e(h, { variant: "body2", children: i.form_type }) }, s))
1643
+ ]
1644
+ }
1645
+ )
1646
+ }
1647
+ ) })
1648
+ ]
1649
+ }
1650
+ ) }) }),
1651
+ O && (a == null ? void 0 : a.type) === "KAFKA_SYNC" && ne && O.length > 0 && /* @__PURE__ */ e(c, { container: !0, className: " w-full", children: O == null ? void 0 : O.map((t, i) => /* @__PURE__ */ e(
1652
+ c,
1653
+ {
1654
+ item: !0,
1655
+ size: { xs: 12 },
1656
+ className: " w-full",
1657
+ children: /* @__PURE__ */ o(v, { variant: "outlined", className: " w-full", children: [
1658
+ /* @__PURE__ */ o(
1659
+ c,
1660
+ {
1661
+ container: !0,
1662
+ justifyContent: "space-between",
1663
+ alignItems: "center",
1664
+ children: [
1665
+ /* @__PURE__ */ e(c, { item: !0, xs: !0, children: /* @__PURE__ */ o(h, { variant: "body2", children: [
1666
+ t == null ? void 0 : t.parameterName,
1667
+ " ",
1668
+ d("Mapping")
1669
+ ] }) }),
1670
+ /* @__PURE__ */ e(c, { item: !0, children: /* @__PURE__ */ e(
1671
+ v,
1672
+ {
1673
+ component: "fieldset",
1674
+ className: "mr-2",
1675
+ children: /* @__PURE__ */ e(
1676
+ T,
1677
+ {
1678
+ control: g,
1679
+ name: `${t == null ? void 0 : t.parameterName}${i}isFixed`,
1680
+ defaultValue: (t == null ? void 0 : t.isFixed) || !1,
1681
+ render: ({ field: s }) => /* @__PURE__ */ e(
1682
+ L,
1683
+ {
1684
+ control: /* @__PURE__ */ e(
1685
+ D,
1686
+ {
1687
+ checked: s.value,
1688
+ onChange: (u) => {
1689
+ s.onChange(u.target.checked), V(
1690
+ i,
1691
+ "isFixed",
1692
+ u.target.checked
1693
+ );
1694
+ },
1695
+ "data-testid": "othertypeeventconfigmodal-kafka-isFixed-checkbox"
1696
+ }
1697
+ ),
1698
+ label: d("Is Fixed Value")
1699
+ }
1700
+ )
1701
+ }
1702
+ )
1703
+ }
1704
+ ) })
1705
+ ]
1706
+ }
1707
+ ),
1708
+ /* @__PURE__ */ e(b, { className: " w-full", children: /* @__PURE__ */ e(
1709
+ T,
1710
+ {
1711
+ control: g,
1712
+ className: " w-full",
1713
+ name: `${t == null ? void 0 : t.parameterName}${i}`,
1714
+ defaultValue: (t == null ? void 0 : t.mappingValue) || "",
1715
+ render: ({ field: s }) => /* @__PURE__ */ e(
1716
+ Z,
1717
+ {
1718
+ variant: "outlined",
1719
+ size: "small",
1720
+ className: " w-full",
1721
+ ...s,
1722
+ fullWidth: !0,
1723
+ onChange: (u) => {
1724
+ N(
1725
+ `${t == null ? void 0 : t.parameterName}${i}`,
1726
+ u.target.value
1727
+ ), V(
1728
+ i,
1729
+ "mappingValue",
1730
+ u.target.value
1731
+ );
1732
+ },
1733
+ "data-testid": `othertypeeventconfigmodal-kafka-${t == null ? void 0 : t.parameterName}${i}-textfield`
1734
+ }
1735
+ )
1736
+ }
1737
+ ) })
1738
+ ] })
1739
+ },
1740
+ `${ne}-${t == null ? void 0 : t.parameterName}-${i}`
1741
+ )) }),
1742
+ ((a == null ? void 0 : a.type) === "SMS" || (a == null ? void 0 : a.type) == "QUERY" && !le) && /* @__PURE__ */ e(c, { container: !0, spacing: 2, children: /* @__PURE__ */ o(c, { item: !0, size: { xs: 12 }, className: " w-full", children: [
1743
+ " ",
1744
+ /* @__PURE__ */ o(
1745
+ v,
1746
+ {
1747
+ variant: "outlined",
1748
+ className: " w-full",
1749
+ "data-testid": a.type === "QUERY" ? "othertypeeventconfigmodal-queryArea" : "othertypeeventconfigmodal-template",
1750
+ children: [
1751
+ /* @__PURE__ */ e(h, { variant: "body2", children: d(
1752
+ a.type === "QUERY" ? "Query" : "Template"
1753
+ ) }),
1754
+ /* @__PURE__ */ e(b, { className: " w-full", children: /* @__PURE__ */ e(
1755
+ ee,
1756
+ {
1757
+ control: g,
1758
+ id: "template",
1759
+ name: "template",
1760
+ label: "",
1761
+ minRows: 5,
1762
+ "data-testid": "othertypeeventconfigmodal-template-customtextarea"
1763
+ }
1764
+ ) })
1765
+ ]
1766
+ }
1767
+ )
1768
+ ] }) }),
1769
+ (a == null ? void 0 : a.type) != "EXCEPTION" && (a == null ? void 0 : a.type) != "SYSTEM_FUNCTION" && /* @__PURE__ */ e(c, { container: !0, spacing: 2, children: /* @__PURE__ */ o(c, { item: !0, size: { xs: 12 }, className: "mt-2 w-full", children: [
1770
+ /* @__PURE__ */ o(
1771
+ v,
1772
+ {
1773
+ variant: "outlined",
1774
+ className: " w-full",
1775
+ "data-testid": "othertypeeventconfigmodal-triggerWhen",
1776
+ children: [
1777
+ /* @__PURE__ */ o(h, { variant: "body2", children: [
1778
+ d("Trigger"),
1779
+ " ",
1780
+ d("When"),
1781
+ /* @__PURE__ */ e("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
1782
+ ] }),
1783
+ /* @__PURE__ */ o(b, { className: " w-full", children: [
1784
+ /* @__PURE__ */ e(
1785
+ T,
1786
+ {
1787
+ name: "trigerWhen",
1788
+ control: g,
1789
+ defaultValue: "",
1790
+ className: " w-full",
1791
+ render: ({ field: t }) => /* @__PURE__ */ o(
1792
+ A,
1793
+ {
1794
+ className: " w-full",
1795
+ ...t,
1796
+ error: y.trigerWhen,
1797
+ size: "small",
1798
+ displayEmpty: !0,
1799
+ "data-testid": "othertypeeventconfigmodal-trigegrwhen-select",
1800
+ children: [
1801
+ /* @__PURE__ */ e(E, { value: "", children: /* @__PURE__ */ e(h, { variant: "body2", children: d("Select") }) }),
1802
+ /* @__PURE__ */ e(E, { value: "IMMEDIATELY", children: /* @__PURE__ */ e(h, { variant: "body2", children: d("Immediately") }) }),
1803
+ /* @__PURE__ */ e(E, { value: "AFTER", children: /* @__PURE__ */ e(h, { variant: "body2", children: d("After") }) })
1804
+ ]
1805
+ }
1806
+ )
1807
+ }
1808
+ ),
1809
+ (y == null ? void 0 : y.trigerWhen) && /* @__PURE__ */ e(
1810
+ "p",
1811
+ {
1812
+ className: "error-helper",
1813
+ "data-testid": "custom-error-message",
1814
+ children: (f = y == null ? void 0 : y.trigerWhen) == null ? void 0 : f.message
1815
+ }
1816
+ )
1817
+ ] })
1818
+ ]
1819
+ }
1820
+ ),
1821
+ Te === "AFTER" && /* @__PURE__ */ o(Pe, { children: [
1822
+ /* @__PURE__ */ e(c, { item: !0, size: { xs: 12 }, children: /* @__PURE__ */ o(
1823
+ v,
1824
+ {
1825
+ variant: "outlined",
1826
+ className: " w-full",
1827
+ "data-testid": "othertypeeventconfigmodal-dayField",
1828
+ children: [
1829
+ /* @__PURE__ */ e(h, { variant: "body2", children: d("Day") }),
1830
+ /* @__PURE__ */ e(b, { className: " w-full", children: /* @__PURE__ */ e(
1831
+ F,
1832
+ {
1833
+ control: g,
1834
+ id: "day",
1835
+ name: "day",
1836
+ errors: y,
1837
+ label: "",
1838
+ type: "number",
1839
+ size: "small",
1840
+ dataTestId: "othertypeeventconfigmodal-type-textfield"
1841
+ }
1842
+ ) })
1843
+ ]
1844
+ }
1845
+ ) }),
1846
+ /* @__PURE__ */ e(c, { item: !0, size: { xs: 12 }, children: /* @__PURE__ */ o(
1847
+ v,
1848
+ {
1849
+ variant: "outlined",
1850
+ className: " w-full",
1851
+ "data-testid": "othertypeeventconfigmodal-hourField",
1852
+ children: [
1853
+ /* @__PURE__ */ e(h, { variant: "body2", children: d("Hour") }),
1854
+ /* @__PURE__ */ e(b, { className: " w-full", children: /* @__PURE__ */ e(
1855
+ F,
1856
+ {
1857
+ control: g,
1858
+ id: "hour",
1859
+ name: "hour",
1860
+ errors: y,
1861
+ label: "",
1862
+ type: "number",
1863
+ size: "small",
1864
+ dataTestId: "othertypeeventconfigmodal-type-textfield"
1865
+ }
1866
+ ) })
1867
+ ]
1868
+ }
1869
+ ) }),
1870
+ /* @__PURE__ */ e(c, { item: !0, size: { xs: 12 }, children: /* @__PURE__ */ o(
1871
+ v,
1872
+ {
1873
+ variant: "outlined",
1874
+ className: " w-full",
1875
+ "data-testid": "othertypeeventconfigmodal-minuteField",
1876
+ children: [
1877
+ /* @__PURE__ */ e(h, { variant: "body2", children: d("Minute") }),
1878
+ /* @__PURE__ */ e(b, { className: " w-full", children: /* @__PURE__ */ e(
1879
+ F,
1880
+ {
1881
+ control: g,
1882
+ id: "minute",
1883
+ name: "minute",
1884
+ type: "number",
1885
+ errors: y,
1886
+ label: "",
1887
+ size: "small",
1888
+ dataTestId: "othertypeeventconfigmodal-type-textfield"
1889
+ }
1890
+ ) })
1891
+ ]
1892
+ }
1893
+ ) })
1894
+ ] })
1895
+ ] }) })
1896
+ ] })
1897
+ ] }),
1898
+ /* @__PURE__ */ o(
1899
+ De,
1900
+ {
1901
+ direction: "row",
1902
+ className: "mr-5",
1903
+ spacing: 2,
1904
+ justifyContent: "flex-end",
1905
+ mt: 1,
1906
+ mb: 1,
1907
+ children: [
1908
+ /* @__PURE__ */ e(
1909
+ oe,
1910
+ {
1911
+ variant: "contained",
1912
+ size: "small",
1913
+ color: "secondary",
1914
+ onClick: () => {
1915
+ J(), q();
1916
+ },
1917
+ "data-testid": "othertypeeventconfigmodal-cancel-button",
1918
+ children: /* @__PURE__ */ e(h, { variant: "body2", children: d("Cancel") })
1919
+ }
1920
+ ),
1921
+ /* @__PURE__ */ e(
1922
+ oe,
1923
+ {
1924
+ size: "small",
1925
+ type: "submit",
1926
+ variant: "contained",
1927
+ color: "primary",
1928
+ "data-testid": "othertypeeventconfigmodal-submit-button",
1929
+ children: d("Submit")
1930
+ }
1931
+ )
1932
+ ]
1933
+ }
1934
+ )
1935
+ ]
1936
+ }
1937
+ )
1938
+ ]
1939
+ }
1940
+ )
1941
+ }
1942
+ );
1943
+ };
1944
+ Nt.propTypes = {
1945
+ open: Y.any,
1946
+ handleClose: Y.any,
1947
+ handleClick: Y.any,
1948
+ type: Y.any
1949
+ };
1950
+ export {
1951
+ Nt as default
1952
+ };
1953
+ //# sourceMappingURL=OtherTypeEventConfigModal-ZnCGWm9v-D7x0QObl.js.map