@argusoft/medplat-core 1.0.0

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