@argusoft/medplat-core 1.0.9 → 1.0.11

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 (116) hide show
  1. package/dist/index-D6bNg8bx.js +66 -0
  2. package/dist/index-D6bNg8bx.js.map +1 -0
  3. package/dist/index.css +1 -1
  4. package/dist/index.js +99455 -445
  5. package/dist/index.js.map +1 -1
  6. package/package.json +4 -1
  7. package/dist/AccessRights-sgIhYR30.js +0 -1238
  8. package/dist/AccessRights-sgIhYR30.js.map +0 -1
  9. package/dist/AddEditQueryBuilder-BaZxS2Cm.js +0 -289
  10. package/dist/AddEditQueryBuilder-BaZxS2Cm.js.map +0 -1
  11. package/dist/AddEditQueryBuilder.css +0 -1
  12. package/dist/AddFeatures-DLbjDGei.js +0 -212
  13. package/dist/AddFeatures-DLbjDGei.js.map +0 -1
  14. package/dist/AddLabelModal-DE3ploGD.js +0 -734
  15. package/dist/AddLabelModal-DE3ploGD.js.map +0 -1
  16. package/dist/AddMenuConfiguration-QWfpcnuP.js +0 -2237
  17. package/dist/AddMenuConfiguration-QWfpcnuP.js.map +0 -1
  18. package/dist/AddMenuConfiguration.css +0 -1
  19. package/dist/AddRoleDrawer-ZK1eejxI.js +0 -453
  20. package/dist/AddRoleDrawer-ZK1eejxI.js.map +0 -1
  21. package/dist/AppModal-BgZyfrd-.js +0 -428
  22. package/dist/AppModal-BgZyfrd-.js.map +0 -1
  23. package/dist/ChangePasswordModal-MV7g8tkA.js +0 -176
  24. package/dist/ChangePasswordModal-MV7g8tkA.js.map +0 -1
  25. package/dist/ConditionConfig-GDCXIg3C.js +0 -395
  26. package/dist/ConditionConfig-GDCXIg3C.js.map +0 -1
  27. package/dist/ConditionConfig.css +0 -1
  28. package/dist/EntityManagement-D-x6Qzal.js +0 -50
  29. package/dist/EntityManagement-D-x6Qzal.js.map +0 -1
  30. package/dist/EventConfigurations-jGCJ4LqP.js +0 -384
  31. package/dist/EventConfigurations-jGCJ4LqP.js.map +0 -1
  32. package/dist/EventConfigurations.css +0 -1
  33. package/dist/EventsExceptionModal-BF6E1Np7.js +0 -200
  34. package/dist/EventsExceptionModal-BF6E1Np7.js.map +0 -1
  35. package/dist/EventsSkeleton-BN7_0IGs.js +0 -74
  36. package/dist/EventsSkeleton-BN7_0IGs.js.map +0 -1
  37. package/dist/FeatureMenu-BYSRoNm0.js +0 -249
  38. package/dist/FeatureMenu-BYSRoNm0.js.map +0 -1
  39. package/dist/Features-CKMmuqcs.js +0 -11
  40. package/dist/Features-CKMmuqcs.js.map +0 -1
  41. package/dist/FlywayQuery-Cx2sly6g.js +0 -169
  42. package/dist/FlywayQuery-Cx2sly6g.js.map +0 -1
  43. package/dist/ImmunizationConfigurationBase-DZ8EqXlF.js +0 -5166
  44. package/dist/ImmunizationConfigurationBase-DZ8EqXlF.js.map +0 -1
  45. package/dist/ImmunizationConfigurationBase.css +0 -1
  46. package/dist/ImmunizationConfigurationsList-CQnxWa09.js +0 -335
  47. package/dist/ImmunizationConfigurationsList-CQnxWa09.js.map +0 -1
  48. package/dist/ImmunizationSkeleton-D2tdv5k-.js +0 -186
  49. package/dist/ImmunizationSkeleton-D2tdv5k-.js.map +0 -1
  50. package/dist/LanguagesModal-rk6IGQwY.js +0 -394
  51. package/dist/LanguagesModal-rk6IGQwY.js.map +0 -1
  52. package/dist/ManageDynamicFeature-BKkCnQvF.js +0 -4189
  53. package/dist/ManageDynamicFeature-BKkCnQvF.js.map +0 -1
  54. package/dist/ManageEventConfiguration-BJxS2Su0.js +0 -1017
  55. package/dist/ManageEventConfiguration-BJxS2Su0.js.map +0 -1
  56. package/dist/ManageEventConfiguration.css +0 -1
  57. package/dist/ManageNotification-B4prX-9Z.js +0 -6819
  58. package/dist/ManageNotification-B4prX-9Z.js.map +0 -1
  59. package/dist/ManageRole-BjIIXAlK.js +0 -728
  60. package/dist/ManageRole-BjIIXAlK.js.map +0 -1
  61. package/dist/ManageTranslation-BTxvSYKb.js +0 -616
  62. package/dist/ManageTranslation-BTxvSYKb.js.map +0 -1
  63. package/dist/ManageTranslation.css +0 -1
  64. package/dist/ManageUser-PHiTNyF8.js +0 -2160
  65. package/dist/ManageUser-PHiTNyF8.js.map +0 -1
  66. package/dist/ManageUser.css +0 -1
  67. package/dist/MobileMenuManagement-DmQU5TTo.js +0 -108
  68. package/dist/MobileMenuManagement-DmQU5TTo.js.map +0 -1
  69. package/dist/MobileTypeEventConfigModal-ChhO_A4f.js +0 -783
  70. package/dist/MobileTypeEventConfigModal-ChhO_A4f.js.map +0 -1
  71. package/dist/NewServerManagement-5YcAtF-g.js +0 -1002
  72. package/dist/NewServerManagement-5YcAtF-g.js.map +0 -1
  73. package/dist/NotificationFlywayQuery-BY8Zzml_.js +0 -244
  74. package/dist/NotificationFlywayQuery-BY8Zzml_.js.map +0 -1
  75. package/dist/NotificationList-BkpOrCpM.js +0 -400
  76. package/dist/NotificationList-BkpOrCpM.js.map +0 -1
  77. package/dist/OtherTypeEventConfigModal-ZnCGWm9v.js +0 -1953
  78. package/dist/OtherTypeEventConfigModal-ZnCGWm9v.js.map +0 -1
  79. package/dist/QueryBuilder-Cus_mRwZ.js +0 -378
  80. package/dist/QueryBuilder-Cus_mRwZ.js.map +0 -1
  81. package/dist/QueryBuilder.css +0 -1
  82. package/dist/QueryManagement-DXA73N2j.js +0 -671
  83. package/dist/QueryManagement-DXA73N2j.js.map +0 -1
  84. package/dist/QueryManagement.css +0 -1
  85. package/dist/RoleManagement-v5Nyp1vr.js +0 -416
  86. package/dist/RoleManagement-v5Nyp1vr.js.map +0 -1
  87. package/dist/ServerSyncModal-uNjGCQJz.js +0 -869
  88. package/dist/ServerSyncModal-uNjGCQJz.js.map +0 -1
  89. package/dist/ShowFlywayQuery-DMsAbtOW.js +0 -130
  90. package/dist/ShowFlywayQuery-DMsAbtOW.js.map +0 -1
  91. package/dist/ShowFlywayQuery-DVRCd384.js +0 -259
  92. package/dist/ShowFlywayQuery-DVRCd384.js.map +0 -1
  93. package/dist/ShowQueryHistory-BDN0tzHg.js +0 -190
  94. package/dist/ShowQueryHistory-BDN0tzHg.js.map +0 -1
  95. package/dist/SubMenu-BHcSNSUF.js +0 -187
  96. package/dist/SubMenu-BHcSNSUF.js.map +0 -1
  97. package/dist/TableDetails-DzREeJkm.js +0 -1508
  98. package/dist/TableDetails-DzREeJkm.js.map +0 -1
  99. package/dist/TableList-B9hr05Hs.js +0 -428
  100. package/dist/TableList-B9hr05Hs.js.map +0 -1
  101. package/dist/TypeConfiguration-C-lk8Szs.js +0 -117
  102. package/dist/TypeConfiguration-C-lk8Szs.js.map +0 -1
  103. package/dist/UserList-BxB1tCwM.js +0 -13042
  104. package/dist/UserList-BxB1tCwM.js.map +0 -1
  105. package/dist/UserList.css +0 -1
  106. package/dist/UserListSkeleton-cglK2SaU.js +0 -184
  107. package/dist/UserListSkeleton-cglK2SaU.js.map +0 -1
  108. package/dist/WidgetList-BSApErov.js +0 -188
  109. package/dist/WidgetList-BSApErov.js.map +0 -1
  110. package/dist/_commonjsHelpers-BItOPCY9.js +0 -29
  111. package/dist/_commonjsHelpers-BItOPCY9.js.map +0 -1
  112. package/dist/i18next-CTOWN_jH.js +0 -1394
  113. package/dist/i18next-CTOWN_jH.js.map +0 -1
  114. package/dist/manageImmunization-B4swS745.js +0 -1204
  115. package/dist/manageImmunization-B4swS745.js.map +0 -1
  116. package/dist/manageImmunization.css +0 -1
@@ -1,1953 +0,0 @@
1
- import { jsx as i, 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-BJxS2Su0.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
- function Qe() {
20
- const o = {
21
- resolve: null,
22
- promise: null
23
- };
24
- return o.promise = new Promise((r) => {
25
- o.resolve = r;
26
- }), o;
27
- }
28
- function Xe(o) {
29
- let r = null;
30
- return (...l) => (r || (r = {
31
- current: o(...l)
32
- }), r.current);
33
- }
34
- const I = new Array(256).fill("").map((o, r) => ("0" + r.toString(16)).slice(-2));
35
- function Ge() {
36
- const [o, r, l, e] = crypto.getRandomValues(new Uint32Array(4));
37
- 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];
38
- }
39
- function he(o) {
40
- return !!o && /^\d+\.\d+\.\d+/.test(o);
41
- }
42
- function Ze(o) {
43
- if (!he(o))
44
- throw new Error(`Invalid semantic version: ${o || "<blank>"}.`);
45
- const [r, l, e] = o.split(".");
46
- return {
47
- major: Number.parseInt(r, 10),
48
- minor: Number.parseInt(l, 10),
49
- patch: Number.parseInt(e, 10)
50
- };
51
- }
52
- function fe(o) {
53
- return o ? ["nightly", "alpha", "internal", "nightly-", "staging"].some((r) => o.includes(r)) : !1;
54
- }
55
- function et(o) {
56
- return he(o) || fe(o);
57
- }
58
- function tt(o, r) {
59
- const l = o.extraPlugins || [];
60
- return {
61
- ...o,
62
- extraPlugins: [
63
- ...l,
64
- ...r.filter((e) => !l.includes(e))
65
- ]
66
- };
67
- }
68
- function it(o) {
69
- if (fe(o))
70
- return 3;
71
- const { major: r } = Ze(o);
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 nt() {
82
- const { CKEDITOR_VERSION: o, CKEDITOR: r } = window;
83
- return et(o) ? {
84
- source: r ? "cdn" : "npm",
85
- version: o
86
- } : null;
87
- }
88
- function rt() {
89
- const o = nt();
90
- return o ? it(o.version) : null;
91
- }
92
- function ge(o, r) {
93
- switch (r || (r = rt() || void 0), r) {
94
- case 1:
95
- case 2:
96
- return o === void 0;
97
- case 3:
98
- return o === "GPL";
99
- default:
100
- return !1;
101
- }
102
- }
103
- function ot(o, r) {
104
- return function(e) {
105
- ge(e.config.get("licenseKey")) || e.on("collectUsageData", (u, { setUsageData: b }) => {
106
- b(`integration.${o}`, r);
107
- });
108
- };
109
- }
110
- 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);
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 Ne = class ve {
116
- constructor(r, l) {
117
- S(this, "_lifecycle"), S(this, "_element"), S(this, "_releaseLock", null), S(this, "_value", null), S(this, "_afterMountCallbacks", []), S(this, "_state", {
118
- destroyedBeforeInitialization: !1,
119
- mountingInProgress: null
120
- }), S(this, "release", Xe(() => {
121
- const { _releaseLock: e, _state: u, _element: b, _lifecycle: g } = this;
122
- u.mountingInProgress ? u.mountingInProgress.then(() => g.unmount({
123
- element: b,
124
- // Mount result might be overridden by watchdog during restart so use instance variable.
125
- mountResult: this.value
126
- })).catch((E) => {
127
- console.error("Semaphore unmounting error:", E);
128
- }).then(e.resolve).then(() => {
129
- this._value = null;
130
- }) : (u.destroyedBeforeInitialization = !0, e.resolve());
131
- })), this._element = r, this._lifecycle = l, 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((l) => l(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: l, _afterMountCallbacks: e } = this;
157
- l ? r(l) : e.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 } = ve, { _state: l, _element: e, _lifecycle: u } = this, b = r.get(e) || Promise.resolve(null), g = Qe();
179
- this._releaseLock = g;
180
- const E = b.then(() => l.destroyedBeforeInitialization ? Promise.resolve(void 0) : (l.mountingInProgress = u.mount().then((_) => (_ && this.unsafeSetValue(_), _)), l.mountingInProgress)).then(async (_) => {
181
- _ && u.afterMount && await u.afterMount({
182
- element: e,
183
- mountResult: _
184
- });
185
- }).then(() => g.promise).catch((_) => {
186
- console.error("Semaphore mounting error:", _);
187
- }).then(() => {
188
- r.get(e) === E && r.delete(e);
189
- });
190
- r.set(e, E);
191
- }
192
- };
193
- S(Ne, "_semaphores", /* @__PURE__ */ new Map());
194
- let st = Ne;
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 ct = "$__CKEditorReactContextMetadata";
200
- function dt(o, r) {
201
- return {
202
- ...r,
203
- [ct]: o
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 = 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";
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 ft = ot(
216
- "react",
217
- {
218
- version: "9.5.0",
219
- frameworkVersion: O.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 gt(o) {
227
- return ge(o.licenseKey) ? o : tt(o, [
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
- ft
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 ee = "Lock from React integration (@ckeditor/ckeditor5-react)";
241
- class be extends O.Component {
242
- constructor(r) {
243
- super(r), S(this, "domContainer", O.createRef()), S(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 [l] = r.split(".").map(Number);
253
- l >= 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: l, editorSemaphore: e } = this;
279
- return r.id !== l.id || r.disableWatchdog !== l.disableWatchdog ? !0 : (e && (e.runAfterMount(({ instance: u }) => {
280
- this._shouldUpdateEditorData(l, r, u) && u.data.set(r.data);
281
- }), "disabled" in r && e.runAfterMount(({ instance: u }) => {
282
- r.disabled ? u.enableReadOnlyMode(ee) : u.disableReadOnlyMode(ee);
283
- })), !1);
284
- }
285
- /**
286
- * Initialize the editor when the component is mounted.
287
- */
288
- componentDidMount() {
289
- ue(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
- ue(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: l } = this.props;
317
- l && this.domContainer.current !== null && l(r.instance);
318
- },
319
- unmount: async ({ element: r, mountResult: l }) => {
320
- const { onAfterDestroy: e } = this.props;
321
- try {
322
- await this._destroyEditor(l), r.innerHTML = "";
323
- } finally {
324
- e && e(l.instance);
325
- }
326
- }
327
- });
328
- }
329
- /**
330
- * Render a <div> element which will be replaced by CKEditor.
331
- */
332
- render() {
333
- return /* @__PURE__ */ O.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 Nt(this.context.watchdog) : new this.props.editor.EditorWatchdog(this.props.editor, this.props.watchdogConfig), l = {
345
- current: 0
346
- };
347
- return r.setCreator(async (e, u) => {
348
- var b;
349
- const { editorSemaphore: g } = this, { onAfterDestroy: E } = this.props;
350
- l.current > 0 && E && ((b = g == null ? void 0 : g.value) != null && b.instance) && E(g.value.instance);
351
- const _ = await this._createEditor(e, u);
352
- return g && l.current > 0 && (g.unsafeSetValue({
353
- instance: _,
354
- watchdog: r
355
- }), setTimeout(() => {
356
- this.props.onReady && this.props.onReady(r.editor);
357
- })), l.current++, _;
358
- }), r.on("error", (e, { error: u, causesRestart: b }) => {
359
- (this.props.onError || console.error)(u, { phase: "runtime", willEditorRestart: b });
360
- }), await r.create(this.domContainer.current, this._getConfig()).catch((e) => {
361
- (this.props.onError || console.error)(e, { 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, l) {
374
- const { contextItemMetadata: e } = this.props;
375
- return e && (l = dt(e, l)), this.props.editor.create(
376
- r,
377
- gt(l)
378
- ).then((u) => {
379
- if ("disabled" in this.props) {
380
- /* istanbul ignore else -- @preserve */
381
- this.props.disabled && u.enableReadOnlyMode(ee);
382
- }
383
- const b = u.model.document, g = u.editing.view.document;
384
- return b.on("change:data", (E) => {
385
- /* istanbul ignore else -- @preserve */
386
- this.props.onChange && this.props.onChange(E, u);
387
- }), g.on("focus", (E) => {
388
- /* istanbul ignore else -- @preserve */
389
- this.props.onFocus && this.props.onFocus(E, u);
390
- }), g.on("blur", (E) => {
391
- /* istanbul ignore else -- @preserve */
392
- this.props.onBlur && this.props.onBlur(E, u);
393
- }), u;
394
- });
395
- }
396
- /**
397
- * Destroys the editor by destroying the watchdog.
398
- */
399
- async _destroyEditor(r) {
400
- const { watchdog: l, instance: e } = r;
401
- return new Promise((u, b) => {
402
- /* istanbul ignore next -- @preserve */
403
- setTimeout(async () => {
404
- try {
405
- if (l)
406
- return await l.destroy(), u();
407
- if (e)
408
- return await e.destroy(), u();
409
- u();
410
- } catch (g) {
411
- console.error(g), b(g);
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, l, e) {
424
- return !(r.data === l.data || e.data.get() === l.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
- S(be, "contextType", ut);
440
- class Nt {
441
- /**
442
- * @param contextWatchdog The context watchdog instance that will be wrapped into editor watchdog API.
443
- */
444
- constructor(r) {
445
- S(this, "_contextWatchdog"), S(this, "_id"), S(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, l) {
460
- return this._contextWatchdog.add({
461
- sourceElementOrData: r,
462
- config: l,
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, l) {
473
- this._contextWatchdog.on("itemError", (e, { itemId: u, error: b }) => {
474
- u === this._id && l(null, { error: b, 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 we(...o) {
492
- return (r) => {
493
- o.forEach((l) => {
494
- typeof l == "function" ? l(r) : l != null && (l.current = r);
495
- });
496
- };
497
- }
498
- const vt = Re(me(({ id: o, semaphore: r, rootName: l }, e) => {
499
- const u = Q(null);
500
- return te(() => {
501
- let b, g;
502
- return r.runAfterMount(({ instance: E }) => {
503
- if (!u.current)
504
- return;
505
- g = E;
506
- const { ui: _, model: R } = g, D = R.document.getRoot(l);
507
- D && g.ui.getEditableElement(l) && g.detachEditable(D), b = _.view.createEditable(l, u.current), _.addEditable(b), E.editing.view.forceRender();
508
- }), () => {
509
- if (g && g.state !== "destroyed" && u.current) {
510
- const E = g.model.document.getRoot(l);
511
- /* istanbul ignore else -- @preserve */
512
- E && g.detachEditable(E);
513
- }
514
- };
515
- }, [r.revision]), /* @__PURE__ */ O.createElement(
516
- "div",
517
- {
518
- key: r.revision,
519
- id: o,
520
- ref: we(e, u)
521
- }
522
- );
523
- }));
524
- vt.displayName = "EditorEditable";
525
- const pt = me(({ editor: o }, r) => {
526
- const l = Q(null);
527
- return te(() => {
528
- const e = l.current;
529
- if (!o || !e)
530
- return;
531
- const u = o.ui.view.toolbar.element;
532
- return e.appendChild(u), () => {
533
- e.contains(u) && e.removeChild(u);
534
- };
535
- }, [o && o.id]), /* @__PURE__ */ O.createElement("div", { ref: we(l, r) });
536
- });
537
- pt.displayName = "EditorToolbarWrapper";
538
- const bt = ({
539
- open: o,
540
- handleClose: r,
541
- handleClick: l,
542
- type: e
543
- }) => {
544
- var le, ae, se;
545
- 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({
546
- excetionTypes: F.string().test(
547
- "is-required",
548
- "Execution type is required",
549
- function(t) {
550
- return (e == null ? void 0 : e.type) === "EXCEPTION" ? !!t : !0;
551
- }
552
- ),
553
- mobileNumberFieldName: F.string().test(
554
- "is-required",
555
- "Enter Sms contact number field name",
556
- function(t) {
557
- return (e == null ? void 0 : e.type) === "SMS" ? !!t : !0;
558
- }
559
- ),
560
- smsTypeField: F.string().test(
561
- "is-required",
562
- "Enter Sms Type Field",
563
- function(t) {
564
- return (e == null ? void 0 : e.type) === "SMS" ? !!t : !0;
565
- }
566
- ),
567
- trigerWhen: F.string().test(
568
- "is-required",
569
- "trigerWhen is required",
570
- function(t) {
571
- return (e == null ? void 0 : e.type) != "EXCEPTION" && (e == null ? void 0 : e.type) != "SYSTEM_FUNCTION" ? !!t : !0;
572
- }
573
- ),
574
- baseDateFieldName: F.string().test(
575
- "is-required",
576
- "Enter Email Id field name",
577
- function(t) {
578
- return (e == null ? void 0 : e.type) === "EMAIL" ? !!t : !0;
579
- }
580
- ),
581
- emailSubject: F.string().test(
582
- "is-required",
583
- "Enter email subject",
584
- function(t) {
585
- return (e == null ? void 0 : e.type) === "EMAIL" ? !!t : !0;
586
- }
587
- ),
588
- notificationTypeId: F.string().test(
589
- "is-required",
590
- "Select type",
591
- function(t) {
592
- return (e == null ? void 0 : e.type) === "PUSH_NOTIFICATION" ? !!t : !0;
593
- }
594
- ),
595
- userFieldName: F.string().test(
596
- "is-required",
597
- "Enter User Id field name",
598
- function(t) {
599
- return (e == null ? void 0 : e.type) === "PUSH_NOTIFICATION" ? !!t : !0;
600
- }
601
- ),
602
- heading: F.string().test(
603
- "is-required",
604
- "Enter heading",
605
- function(t) {
606
- return (e == null ? void 0 : e.type) === "PUSH_NOTIFICATION" && X ? !!t : !0;
607
- }
608
- ),
609
- template: F.string().test(
610
- "is-required",
611
- "Enter Template",
612
- function(t) {
613
- return (e == null ? void 0 : e.type) === "PUSH_NOTIFICATION" && X ? !!t : !0;
614
- }
615
- )
616
- }), {
617
- control: v,
618
- handleSubmit: Ie,
619
- reset: Y,
620
- setValue: p,
621
- unregister: ie,
622
- getValues: ne,
623
- watch: V,
624
- formState: { errors: f }
625
- } = Ve({
626
- defaultValues: {},
627
- resolver: Oe(_e),
628
- mode: "onChange"
629
- });
630
- te(() => {
631
- var t;
632
- e && (Pe(), (t = Object.keys(e)) == null || t.forEach((n) => {
633
- var s, m, w;
634
- if (n === "index" && p(n, e[n]), n === "smsConfigJson" && e[n]) {
635
- const x = e[n];
636
- (s = Object.keys(x)) == null || s.forEach((P) => {
637
- p(P, x[P]);
638
- });
639
- } else if (n === "pushNotificationConfigJson" && e[n]) {
640
- const x = e[n];
641
- (m = Object.keys(x)) == null || m.forEach((P) => {
642
- p(P, x[P]);
643
- });
644
- } else if (n === "kafkaConfigJson" && e[n]) {
645
- const x = e[n];
646
- (w = Object.keys(x)) == null || w.forEach((P) => {
647
- p(P, x[P]);
648
- });
649
- } else e[n] !== void 0 && e[n] !== null && p(n, e[n]);
650
- }));
651
- }, [e]);
652
- 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) => {
653
- var m;
654
- k && k.forEach((w, x) => {
655
- p(`${w.parameterName}${x}`, ""), p(`${w.parameterName}${x}isFixed`, !1);
656
- });
657
- let n = [];
658
- const s = R == null ? void 0 : R.find((w) => (w == null ? void 0 : w.code) === t);
659
- if (s) {
660
- const w = (m = s == null ? void 0 : s.params) == null ? void 0 : m.split(",");
661
- Array.from(new Set(w)).forEach((P) => {
662
- n.push({ parameterName: P });
663
- });
664
- }
665
- p("queryMasterParamJson", n);
666
- }, Fe = (t) => {
667
- $ && $.forEach((m, w) => {
668
- p(`${m.parameterName}${w}`, ""), p(`${m.parameterName}${w}isFixed`, !1);
669
- });
670
- let n = [];
671
- const s = K.find((m) => m.id === t);
672
- s && Array.from(new Set(s.parameters)).forEach((w) => {
673
- n.push(w);
674
- }), p("functionParams", n);
675
- }, ke = (t) => {
676
- const n = q.find(
677
- (s) => s.id === t
678
- );
679
- n && (p("notificationType", n), p("template", n.message), p("heading", n.heading));
680
- }, A = (t, n, s) => {
681
- if ((e == null ? void 0 : e.type) === "QUERY") {
682
- const m = [...k];
683
- m[t][n] = s, p("queryMasterParamJson", m);
684
- }
685
- if ((e == null ? void 0 : e.type) === "SYSTEM_FUNCTION") {
686
- const m = [...$];
687
- m[t][n] = s, p("functionParams", m);
688
- }
689
- if ((e == null ? void 0 : e.type) === "KAFKA_SYNC") {
690
- const m = [...z];
691
- m[t][n] = s, p("kafkaParameterJson", m);
692
- }
693
- }, $e = (t) => {
694
- const n = ne("kafkaParameterJson");
695
- n && Array.isArray(n) && (n.forEach((m, w) => {
696
- ie(`${m.parameterName}${w}`), ie(`${m.parameterName}${w}isFixed`);
697
- }), p("kafkaParameterJson", [], { shouldValidate: !0 }));
698
- const s = j.find(
699
- (m) => m.form_type === t
700
- );
701
- if (s && s.param_types) {
702
- const m = JSON.parse(s.param_types), w = Object.keys(m).map((x) => ({
703
- parameterName: x,
704
- mappingValue: "",
705
- isFixed: !1
706
- }));
707
- p("kafkaParameterJson", w, { shouldValidate: !0 });
708
- } else
709
- p("kafkaParameterJson", [], { shouldValidate: !0 });
710
- }, Pe = async () => {
711
- var t, n;
712
- try {
713
- if ((e == null ? void 0 : e.type) === "QUERY") {
714
- const s = await De(!0);
715
- D(s == null ? void 0 : s.data);
716
- }
717
- if ((e == null ? void 0 : e.type) === "SYSTEM_FUNCTION") {
718
- const m = await de({
719
- code: "system_function_retrieve_all",
720
- parameters: {}
721
- }), w = (t = m == null ? void 0 : m.data) == null ? void 0 : t.result.map((x) => (x.parameters = JSON.parse(x.parameters), x));
722
- Ce(w);
723
- }
724
- if ((e == null ? void 0 : e.type) === "PUSH_NOTIFICATION") {
725
- const s = await Ke();
726
- xe(s == null ? void 0 : s.data);
727
- }
728
- if ((e == null ? void 0 : e.type) === "KAFKA_SYNC") {
729
- const s = await de({
730
- code: "retrieve_all_kafka_configs",
731
- parameters: {}
732
- });
733
- Ee(((n = s == null ? void 0 : s.data) == null ? void 0 : n.result) || []);
734
- }
735
- } catch {
736
- je({ message: "Error in loading", type: "error" });
737
- }
738
- }, J = () => {
739
- _("conversion_event", {
740
- form: g.current,
741
- form_name: "Add Other Type Configuration",
742
- submit: E.current
743
- }), r();
744
- }, ze = (t) => {
745
- 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 = {
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), e.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), e.type === "KAFKA_SYNC" && (t.kafkaConfigJson = {
756
- formType: t.formType,
757
- kafkaParameterJson: t.kafkaParameterJson
758
- }), k == null || k.forEach((n, s) => {
759
- delete t[`${n == null ? void 0 : n.parameterName}${s}`], delete t[`${n == null ? void 0 : n.parameterName}${s}isFixed`];
760
- }), $ == null || $.forEach((n, s) => {
761
- delete t[`${n == null ? void 0 : n.parameterName}${s}`], delete t[`${n == null ? void 0 : n.parameterName}${s}isFixed`];
762
- }), z == null || z.forEach((n, s) => {
763
- delete t[`${n == null ? void 0 : n.parameterName}${s}`], delete t[`${n == null ? void 0 : n.parameterName}${s}isFixed`];
764
- }), l(t), E.current = !0, J(), Y();
765
- };
766
- return /* @__PURE__ */ i(
767
- Le,
768
- {
769
- "data-testid": "othertypeeventconfigmodal-modal",
770
- open: o,
771
- className: "flex items-center justify-center",
772
- onClose: () => {
773
- J(), Y();
774
- },
775
- sx: {
776
- "& .MuiBackdrop-root": {
777
- backgroundColor: "rgba(0, 0, 0, 0.1)"
778
- }
779
- },
780
- children: /* @__PURE__ */ a(
781
- d,
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__ */ a(
800
- d,
801
- {
802
- className: "manageeventconfiguration-modal-header p-2.5 px-5 flex border-b",
803
- "data-testid": "othertypeeventconfigmodal-modal-header",
804
- children: [
805
- /* @__PURE__ */ a(
806
- h,
807
- {
808
- variant: "body1",
809
- className: "font-medium text-lg text-customBlue",
810
- children: [
811
- c("Add"),
812
- " ",
813
- c(e == null ? void 0 : e.type),
814
- " ",
815
- c("Configuration")
816
- ]
817
- }
818
- ),
819
- /* @__PURE__ */ i(
820
- Ue,
821
- {
822
- size: "small",
823
- onClick: () => {
824
- J(), Y();
825
- },
826
- "data-testid": "othertypeeventconfigmodal-close-button",
827
- children: /* @__PURE__ */ i(Be, { icon: Je })
828
- }
829
- )
830
- ]
831
- }
832
- ),
833
- /* @__PURE__ */ a(
834
- "form",
835
- {
836
- onSubmit: Ie(ze),
837
- ref: g,
838
- "data-testid": "othertypeeventconfigmodal-form",
839
- children: [
840
- /* @__PURE__ */ a(d, { container: !0, className: " max-h-[60vh] overflow-y-auto w-full", children: [
841
- /* @__PURE__ */ i(
842
- d,
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__ */ i(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: [
848
- c("Available Implicit Parameters"),
849
- ":",
850
- " ",
851
- e == null ? void 0 : e.implicitParam,
852
- " "
853
- ] }) })
854
- }
855
- ),
856
- /* @__PURE__ */ a(d, { item: !0, className: "p-2.5 w-full", children: [
857
- (e == null ? void 0 : e.type) === "EXCEPTION" && /* @__PURE__ */ a(d, { container: !0, spacing: 2, children: [
858
- /* @__PURE__ */ i(d, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ a(
859
- N,
860
- {
861
- variant: "outlined",
862
- className: " w-full",
863
- "data-testid": "othertypeeventconfigmodal-exceptionType",
864
- children: [
865
- /* @__PURE__ */ a(h, { variant: "body2", children: [
866
- c("Exception"),
867
- " ",
868
- c("Type"),
869
- /* @__PURE__ */ i("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
870
- ] }),
871
- /* @__PURE__ */ a(C, { className: " w-full", children: [
872
- /* @__PURE__ */ i(
873
- y,
874
- {
875
- name: "excetionTypes",
876
- control: v,
877
- defaultValue: "",
878
- className: " w-full",
879
- render: ({ field: t }) => /* @__PURE__ */ a(
880
- L,
881
- {
882
- className: " w-full",
883
- ...t,
884
- error: f.excetionTypes,
885
- size: "small",
886
- "data-testid": "othertypeeventconfigmodal-excetionTypes-select",
887
- children: [
888
- /* @__PURE__ */ i(T, { value: "", children: /* @__PURE__ */ i(h, { variant: "body2", children: c("Select") }) }),
889
- /* @__PURE__ */ i(T, { value: "ImtechoUserException", children: /* @__PURE__ */ i(h, { variant: "body2", children: c("Imtecho User Exception") }) }),
890
- /* @__PURE__ */ i(T, { value: "ImtechoSystemException", children: /* @__PURE__ */ a(h, { variant: "body2", children: [
891
- " ",
892
- c("Imtecho System Exception")
893
- ] }) }),
894
- /* @__PURE__ */ i(T, { value: "ImtechoMobileException", children: /* @__PURE__ */ i(h, { variant: "body2", children: c("Imtecho Mobile Exception") }) })
895
- ]
896
- }
897
- )
898
- }
899
- ),
900
- (f == null ? void 0 : f.excetionTypes) && /* @__PURE__ */ i(
901
- "p",
902
- {
903
- className: "error-helper",
904
- "data-testid": "custom-error-message",
905
- children: (le = f == null ? void 0 : f.excetionTypes) == null ? void 0 : le.message
906
- }
907
- )
908
- ] })
909
- ]
910
- }
911
- ) }),
912
- /* @__PURE__ */ a(d, { item: !0, size: { xs: 12 }, className: " w-full", children: [
913
- " ",
914
- /* @__PURE__ */ a(
915
- N,
916
- {
917
- variant: "outlined",
918
- className: " w-full",
919
- "data-testid": "othertypeeventconfigmodal-exceptionMessage",
920
- children: [
921
- /* @__PURE__ */ i(h, { variant: "body2", children: c("Message") }),
922
- /* @__PURE__ */ i(C, { className: " w-full", children: /* @__PURE__ */ i(
923
- Z,
924
- {
925
- control: v,
926
- id: "exceptionMessage",
927
- name: "exceptionMessage",
928
- errors: f,
929
- label: "",
930
- minRows: 5,
931
- "data-testid": "othertypeeventconfigmodal-exceptionMessage-customtextarea"
932
- }
933
- ) })
934
- ]
935
- }
936
- )
937
- ] })
938
- ] }),
939
- (e == null ? void 0 : e.type) === "SMS" && /* @__PURE__ */ a(d, { container: !0, spacing: 2, children: [
940
- /* @__PURE__ */ i(d, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ a(
941
- N,
942
- {
943
- variant: "outlined",
944
- className: " w-full",
945
- "data-testid": "othertypeeventconfigmodal-mobileNumberFieldName",
946
- children: [
947
- /* @__PURE__ */ a(h, { variant: "body2", children: [
948
- c("SMS"),
949
- " ",
950
- c("Phone number"),
951
- " ",
952
- c("Field"),
953
- " ",
954
- c("Name"),
955
- /* @__PURE__ */ i("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
956
- ] }),
957
- /* @__PURE__ */ i(C, { className: " w-full", children: /* @__PURE__ */ i(
958
- M,
959
- {
960
- control: v,
961
- id: "mobileNumberFieldName",
962
- name: "mobileNumberFieldName",
963
- errors: f,
964
- label: "",
965
- size: "small",
966
- dataTestId: "othertypeeventconfigmodal-mobileNumberFieldName-textfield"
967
- }
968
- ) })
969
- ]
970
- }
971
- ) }),
972
- /* @__PURE__ */ i(d, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ a(
973
- N,
974
- {
975
- variant: "outlined",
976
- className: " w-full",
977
- "data-testid": "othertypeeventconfigmodal-smsTypeField",
978
- children: [
979
- /* @__PURE__ */ a(
980
- d,
981
- {
982
- container: !0,
983
- justifyContent: "space-between",
984
- alignItems: "center",
985
- children: [
986
- /* @__PURE__ */ i(d, { item: !0, xs: !0, children: /* @__PURE__ */ a(h, { variant: "body2", children: [
987
- c("SMS"),
988
- " ",
989
- c("Type"),
990
- " ",
991
- c("Field"),
992
- " ",
993
- c("Value"),
994
- /* @__PURE__ */ i("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
995
- ] }) }),
996
- /* @__PURE__ */ a(d, { container: !0, children: [
997
- " ",
998
- /* @__PURE__ */ i(d, { item: !0, children: /* @__PURE__ */ i(N, { component: "fieldset", className: "mr-2", children: /* @__PURE__ */ i(
999
- y,
1000
- {
1001
- control: v,
1002
- name: "isPriority",
1003
- defaultValue: !1,
1004
- render: ({ field: t }) => /* @__PURE__ */ i(
1005
- U,
1006
- {
1007
- control: /* @__PURE__ */ i(
1008
- W,
1009
- {
1010
- checked: t.value,
1011
- onChange: (n) => t.onChange(n.target.checked),
1012
- "data-testid": "othertypeeventconfigmodal-isPriority-checkbox"
1013
- }
1014
- ),
1015
- label: "Is Priority"
1016
- }
1017
- )
1018
- }
1019
- ) }) }),
1020
- /* @__PURE__ */ i(d, { item: !0, children: /* @__PURE__ */ i(N, { component: "fieldset", className: "mr-2", children: /* @__PURE__ */ i(
1021
- y,
1022
- {
1023
- control: v,
1024
- name: "isSmsTypeFixed",
1025
- defaultValue: !1,
1026
- render: ({ field: t }) => /* @__PURE__ */ i(
1027
- U,
1028
- {
1029
- control: /* @__PURE__ */ i(
1030
- W,
1031
- {
1032
- checked: t.value,
1033
- onChange: (n) => t.onChange(n.target.checked),
1034
- "data-testid": "othertypeeventconfigmodal-isSmsTypeFixed-checkbox"
1035
- }
1036
- ),
1037
- label: c("Is Fixed Value")
1038
- }
1039
- )
1040
- }
1041
- ) }) })
1042
- ] })
1043
- ]
1044
- }
1045
- ),
1046
- /* @__PURE__ */ i(C, { className: " w-full", children: /* @__PURE__ */ i(
1047
- M,
1048
- {
1049
- control: v,
1050
- id: "smsTypeField",
1051
- name: "smsTypeField",
1052
- errors: f,
1053
- label: "",
1054
- size: "small",
1055
- dataTestId: "othertypeeventconfigmodal-smsTypeField-textfield"
1056
- }
1057
- ) })
1058
- ]
1059
- }
1060
- ) })
1061
- ] }),
1062
- (e == null ? void 0 : e.type) === "EMAIL" && /* @__PURE__ */ a(d, { container: !0, spacing: 2, className: " w-full", children: [
1063
- /* @__PURE__ */ i(d, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ a(
1064
- N,
1065
- {
1066
- variant: "outlined",
1067
- className: " w-full",
1068
- "data-testid": "othertypeeventconfigmodal-emailIdField",
1069
- children: [
1070
- /* @__PURE__ */ a(h, { variant: "body2", children: [
1071
- c("Email"),
1072
- " ",
1073
- c("Id"),
1074
- " ",
1075
- c("Field"),
1076
- " ",
1077
- c("Value"),
1078
- /* @__PURE__ */ i("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
1079
- ] }),
1080
- /* @__PURE__ */ i(C, { className: " w-full", children: /* @__PURE__ */ i(
1081
- M,
1082
- {
1083
- control: v,
1084
- id: "baseDateFieldName",
1085
- name: "baseDateFieldName",
1086
- errors: f,
1087
- label: "",
1088
- size: "small",
1089
- dataTestId: "othertypeeventconfigmodal-baseDateFieldName-textfield"
1090
- }
1091
- ) })
1092
- ]
1093
- }
1094
- ) }),
1095
- /* @__PURE__ */ i(d, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ a(
1096
- N,
1097
- {
1098
- variant: "outlined",
1099
- className: " w-full",
1100
- "data-testid": "othertypeeventconfigmodal-emailSubjectField",
1101
- children: [
1102
- /* @__PURE__ */ a(h, { variant: "body2", children: [
1103
- c("Email"),
1104
- " ",
1105
- c("Subject"),
1106
- /* @__PURE__ */ i("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
1107
- ] }),
1108
- /* @__PURE__ */ i(C, { className: " w-full", children: /* @__PURE__ */ i(
1109
- M,
1110
- {
1111
- control: v,
1112
- id: "emailSubject",
1113
- name: "emailSubject",
1114
- errors: f,
1115
- label: "",
1116
- size: "small",
1117
- dataTestId: "othertypeeventconfigmodal-emailSubject-textfield"
1118
- }
1119
- ) })
1120
- ]
1121
- }
1122
- ) }),
1123
- /* @__PURE__ */ i(d, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ a(
1124
- N,
1125
- {
1126
- variant: "outlined",
1127
- className: " w-[95%] md:w-full overflow-auto",
1128
- "data-testid": "othertypeeventconfigmodal-template",
1129
- children: [
1130
- /* @__PURE__ */ i(h, { variant: "body2", children: c("Template") }),
1131
- /* @__PURE__ */ i(
1132
- C,
1133
- {
1134
- className: " w-full",
1135
- sx: {
1136
- borderRadius: "8px",
1137
- overflow: "hidden",
1138
- border: `1px solid ${u.palette.divider}`,
1139
- // This targets the actual writing area
1140
- "& .ck-editor__main > .ck-editor__editable": {
1141
- backgroundColor: `${u.palette.background.paper} !important`,
1142
- color: `${u.palette.text.primary} !important`,
1143
- minHeight: "200px",
1144
- "&.ck-focused": {
1145
- borderColor: `${u.palette.primary.main} !important`
1146
- }
1147
- },
1148
- // This targets the toolbar
1149
- "& .ck.ck-toolbar": {
1150
- backgroundColor: b ? "#21262D !important" : "#f5f5f5 !important",
1151
- borderColor: `${u.palette.divider} !important`
1152
- },
1153
- // This targets the buttons/icons inside the toolbar
1154
- "& .ck.ck-toolbar .ck-button": {
1155
- color: `${u.palette.text.primary} !important`,
1156
- cursor: "pointer",
1157
- "&:hover": {
1158
- backgroundColor: b ? "#30363D !important" : "#e0e0e0 !important"
1159
- },
1160
- "&.ck-on": {
1161
- backgroundColor: b ? "#11B66633 !important" : "#d1d1d1 !important",
1162
- color: `${u.palette.primary.main} !important`
1163
- }
1164
- },
1165
- // This targets dropdowns and labels
1166
- "& .ck.ck-label": {
1167
- color: `${u.palette.text.secondary} !important`
1168
- }
1169
- },
1170
- children: /* @__PURE__ */ i(
1171
- be,
1172
- {
1173
- editor: He,
1174
- data: ne("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, n) => {
1197
- const s = n.getData();
1198
- p("template", s);
1199
- },
1200
- "data-testid": "othertypeeventconfigmodal-template-ckeditor"
1201
- }
1202
- )
1203
- }
1204
- )
1205
- ]
1206
- }
1207
- ) })
1208
- ] }),
1209
- (e == null ? void 0 : e.type) === "QUERY" && /* @__PURE__ */ i(d, { container: !0, children: /* @__PURE__ */ i(d, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ a(
1210
- N,
1211
- {
1212
- variant: "outlined",
1213
- className: " w-full",
1214
- "data-testid": "othertypeeventconfigmodal-querySelect",
1215
- children: [
1216
- /* @__PURE__ */ i(h, { variant: "body2", children: c("Query") }),
1217
- /* @__PURE__ */ i(C, { className: " w-full", children: /* @__PURE__ */ i(
1218
- y,
1219
- {
1220
- className: " w-full",
1221
- name: "queryCode",
1222
- control: v,
1223
- defaultValue: null,
1224
- render: ({ field: t }) => /* @__PURE__ */ a(
1225
- L,
1226
- {
1227
- ...t,
1228
- className: " w-full",
1229
- size: "small",
1230
- displayEmpty: !0,
1231
- onChange: (n) => {
1232
- t.onChange(n), Se(n.target.value);
1233
- },
1234
- "data-testid": "othertypeeventconfigmodal-queryCode-select",
1235
- children: [
1236
- /* @__PURE__ */ i(T, { value: null, children: /* @__PURE__ */ i(h, { variant: "body2", children: c("Select") }) }),
1237
- R == null ? void 0 : R.map((n, s) => /* @__PURE__ */ i(T, { value: n == null ? void 0 : n.code, children: /* @__PURE__ */ a(h, { variant: "body2", children: [
1238
- " ",
1239
- n == null ? void 0 : n.code
1240
- ] }) }, s + 1))
1241
- ]
1242
- }
1243
- )
1244
- }
1245
- ) })
1246
- ]
1247
- }
1248
- ) }) }),
1249
- k && (e == null ? void 0 : e.type) === "QUERY" && re && /* @__PURE__ */ i(d, { container: !0, className: " w-full", children: k == null ? void 0 : k.map((t, n) => /* @__PURE__ */ i(
1250
- d,
1251
- {
1252
- item: !0,
1253
- size: { xs: 12 },
1254
- className: " w-full",
1255
- children: /* @__PURE__ */ a(N, { variant: "outlined", className: " w-full", children: [
1256
- /* @__PURE__ */ a(
1257
- d,
1258
- {
1259
- container: !0,
1260
- justifyContent: "space-between",
1261
- alignItems: "center",
1262
- children: [
1263
- /* @__PURE__ */ i(d, { item: !0, children: /* @__PURE__ */ a(h, { variant: "body1", children: [
1264
- t == null ? void 0 : t.parameterName,
1265
- " ",
1266
- c("Mapping")
1267
- ] }) }),
1268
- /* @__PURE__ */ i(d, { item: !0, children: /* @__PURE__ */ i(N, { component: "fieldset", className: "mr-2", children: /* @__PURE__ */ i(
1269
- y,
1270
- {
1271
- control: v,
1272
- name: `${t == null ? void 0 : t.parameterName}${n}isFixed`,
1273
- defaultValue: (t == null ? void 0 : t.isFixed) || !1,
1274
- render: ({ field: s }) => /* @__PURE__ */ i(
1275
- U,
1276
- {
1277
- control: /* @__PURE__ */ i(
1278
- W,
1279
- {
1280
- checked: s.value,
1281
- onChange: (m) => {
1282
- s.onChange(m.target.checked), A(
1283
- n,
1284
- "isFixed",
1285
- m.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__ */ i(C, { className: " w-full", children: /* @__PURE__ */ i(
1300
- y,
1301
- {
1302
- control: v,
1303
- className: " w-full",
1304
- name: `${t == null ? void 0 : t.parameterName}${n}`,
1305
- defaultValue: t == null ? void 0 : t.mappingValue,
1306
- render: ({ field: s }) => /* @__PURE__ */ i(
1307
- G,
1308
- {
1309
- variant: "outlined",
1310
- size: "small",
1311
- className: " w-full",
1312
- ...s,
1313
- fullWidth: !0,
1314
- onChange: (m) => {
1315
- p(
1316
- `${t == null ? void 0 : t.parameterName}${n}`,
1317
- m.target.value
1318
- ), A(
1319
- n,
1320
- "mappingValue",
1321
- m.target.value
1322
- );
1323
- },
1324
- "data-testid": `othertypeeventconfigmodal-${t == null ? void 0 : t.parameterName}${n}-textfiled`
1325
- }
1326
- )
1327
- }
1328
- ) })
1329
- ] })
1330
- },
1331
- n + 1
1332
- )) }),
1333
- (e == null ? void 0 : e.type) === "SYSTEM_FUNCTION" && /* @__PURE__ */ i(d, { container: !0, children: /* @__PURE__ */ i(d, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ a(
1334
- N,
1335
- {
1336
- variant: "outlined",
1337
- className: " w-full",
1338
- "data-testid": "othertypeeventconfigmodal-systemFunction",
1339
- children: [
1340
- /* @__PURE__ */ i(h, { variant: "body2", children: c("System Function") }),
1341
- /* @__PURE__ */ i(C, { className: " w-full", children: /* @__PURE__ */ i(
1342
- y,
1343
- {
1344
- className: " w-full",
1345
- name: "systemFunctionId",
1346
- control: v,
1347
- defaultValue: "",
1348
- render: ({ field: t }) => /* @__PURE__ */ a(
1349
- L,
1350
- {
1351
- ...t,
1352
- className: " w-full",
1353
- size: "small",
1354
- onChange: (n) => {
1355
- t.onChange(n), Fe(n.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__ */ i(T, { value: "", children: /* @__PURE__ */ i(h, { variant: "body2", children: c("None") }) }),
1378
- K == null ? void 0 : K.map((n, s) => /* @__PURE__ */ i(T, { value: n == null ? void 0 : n.id, children: /* @__PURE__ */ a(h, { variant: "body2", children: [
1379
- " ",
1380
- n == null ? void 0 : n.name,
1381
- " (",
1382
- n == null ? void 0 : n.className,
1383
- ")"
1384
- ] }) }, s + 1))
1385
- ]
1386
- }
1387
- )
1388
- }
1389
- ) })
1390
- ]
1391
- }
1392
- ) }) }),
1393
- $ && (e == null ? void 0 : e.type) === "SYSTEM_FUNCTION" && Te && /* @__PURE__ */ i(d, { container: !0, children: $ == null ? void 0 : $.map((t, n) => /* @__PURE__ */ i(
1394
- d,
1395
- {
1396
- item: !0,
1397
- size: { xs: 12 },
1398
- className: " w-full",
1399
- children: /* @__PURE__ */ a(N, { variant: "outlined", className: " w-full", children: [
1400
- /* @__PURE__ */ a(
1401
- d,
1402
- {
1403
- container: !0,
1404
- justifyContent: "space-between",
1405
- alignItems: "center",
1406
- children: [
1407
- /* @__PURE__ */ i(d, { item: !0, xs: !0, children: /* @__PURE__ */ a(h, { variant: "body2", children: [
1408
- t == null ? void 0 : t.parameterName,
1409
- " ",
1410
- c("Mapping")
1411
- ] }) }),
1412
- /* @__PURE__ */ i(d, { item: !0, children: /* @__PURE__ */ i(
1413
- N,
1414
- {
1415
- component: "fieldset",
1416
- className: "mr-2",
1417
- children: /* @__PURE__ */ i(
1418
- y,
1419
- {
1420
- control: v,
1421
- name: `${t == null ? void 0 : t.parameterName}${n}isFixed`,
1422
- defaultValue: (t == null ? void 0 : t.isFixed) || !1,
1423
- render: ({ field: s }) => /* @__PURE__ */ i(
1424
- U,
1425
- {
1426
- control: /* @__PURE__ */ i(
1427
- W,
1428
- {
1429
- checked: s.value,
1430
- onChange: (m) => {
1431
- s.onChange(m.target.checked), A(
1432
- n,
1433
- "isFixed",
1434
- m.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__ */ i(C, { className: " w-full", children: /* @__PURE__ */ i(
1451
- y,
1452
- {
1453
- control: v,
1454
- className: " w-full",
1455
- name: `${t == null ? void 0 : t.parameterName}${n}`,
1456
- defaultValue: t == null ? void 0 : t.mappingValue,
1457
- render: ({ field: s }) => /* @__PURE__ */ i(
1458
- G,
1459
- {
1460
- variant: "outlined",
1461
- size: "small",
1462
- className: " w-full",
1463
- ...s,
1464
- fullWidth: !0,
1465
- onChange: (m) => {
1466
- p(
1467
- `${t == null ? void 0 : t.parameterName}${n}`,
1468
- m.target.value
1469
- ), A(
1470
- n,
1471
- "mappingValue",
1472
- m.target.value
1473
- );
1474
- },
1475
- "data-testid": `othertypeeventconfigmodal-${t == null ? void 0 : t.parameterName}${n}-textfiled`
1476
- }
1477
- )
1478
- }
1479
- ) })
1480
- ] })
1481
- },
1482
- n + 1
1483
- )) }),
1484
- (e == null ? void 0 : e.type) === "PUSH_NOTIFICATION" && /* @__PURE__ */ a(d, { container: !0, spacing: 2, children: [
1485
- /* @__PURE__ */ i(d, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ a(
1486
- N,
1487
- {
1488
- variant: "outlined",
1489
- className: " w-full",
1490
- "data-testid": "othertypeeventconfigmodal-userIdFieldName",
1491
- children: [
1492
- /* @__PURE__ */ a(h, { variant: "body2", children: [
1493
- c("User"),
1494
- " ",
1495
- c("Id"),
1496
- " ",
1497
- c("Field"),
1498
- " ",
1499
- c("Name"),
1500
- /* @__PURE__ */ i("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
1501
- ] }),
1502
- /* @__PURE__ */ i(C, { className: " w-full", children: /* @__PURE__ */ i(
1503
- M,
1504
- {
1505
- control: v,
1506
- id: "userFieldName",
1507
- name: "userFieldName",
1508
- errors: f,
1509
- label: "",
1510
- size: "small",
1511
- dataTestId: "othertypeeventconfigmodal-userFieldName-textfield"
1512
- }
1513
- ) })
1514
- ]
1515
- }
1516
- ) }),
1517
- /* @__PURE__ */ i(d, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ a(
1518
- N,
1519
- {
1520
- variant: "outlined",
1521
- className: " w-full",
1522
- "data-testid": "othertypeeventconfigmodal-notificationType",
1523
- children: [
1524
- /* @__PURE__ */ a(h, { variant: "body2", children: [
1525
- c("Notification"),
1526
- " ",
1527
- c("Type"),
1528
- /* @__PURE__ */ i("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
1529
- ] }),
1530
- /* @__PURE__ */ a(C, { className: " w-full", children: [
1531
- /* @__PURE__ */ i(
1532
- y,
1533
- {
1534
- className: " w-full",
1535
- name: "notificationTypeId",
1536
- control: v,
1537
- defaultValue: "",
1538
- render: ({ field: t }) => /* @__PURE__ */ a(
1539
- L,
1540
- {
1541
- ...t,
1542
- className: " w-full",
1543
- size: "small",
1544
- error: f == null ? void 0 : f.notificationTypeId,
1545
- onChange: (n) => {
1546
- t.onChange(n), ke(n.target.value);
1547
- },
1548
- "data-testid": "othertypeeventconfigmodal-notificationtypeid-select",
1549
- children: [
1550
- /* @__PURE__ */ i(T, { value: "", children: /* @__PURE__ */ i(h, { variant: "body2", children: c("None") }) }),
1551
- q == null ? void 0 : q.map((n, s) => /* @__PURE__ */ i(T, { value: n == null ? void 0 : n.id, children: /* @__PURE__ */ i(h, { variant: "body2", children: n == null ? void 0 : n.type }) }, s + 1))
1552
- ]
1553
- }
1554
- )
1555
- }
1556
- ),
1557
- (f == null ? void 0 : f.notificationTypeId) && /* @__PURE__ */ i(
1558
- "p",
1559
- {
1560
- className: "error-helper",
1561
- "data-testid": "custom-error-message",
1562
- children: (ae = f == null ? void 0 : f.notificationTypeId) == null ? void 0 : ae.message
1563
- }
1564
- )
1565
- ] })
1566
- ]
1567
- }
1568
- ) })
1569
- ] }),
1570
- (e == null ? void 0 : e.type) === "PUSH_NOTIFICATION" && X && /* @__PURE__ */ a(d, { container: !0, spacing: 2, children: [
1571
- /* @__PURE__ */ i(d, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ a(N, { variant: "outlined", className: " w-full", children: [
1572
- /* @__PURE__ */ a(h, { variant: "body2", children: [
1573
- c("Notification"),
1574
- " ",
1575
- c("Heading"),
1576
- /* @__PURE__ */ i("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
1577
- ] }),
1578
- /* @__PURE__ */ i(C, { className: " w-full", children: /* @__PURE__ */ i(
1579
- M,
1580
- {
1581
- control: v,
1582
- id: "heading",
1583
- name: "heading",
1584
- errors: f,
1585
- label: "",
1586
- size: "small",
1587
- dataTestId: "othertypeeventconfigmodal-heading-textfield"
1588
- }
1589
- ) })
1590
- ] }) }),
1591
- /* @__PURE__ */ a(d, { item: !0, size: { xs: 12 }, className: " w-full", children: [
1592
- " ",
1593
- /* @__PURE__ */ a(N, { variant: "outlined", className: " w-full", children: [
1594
- /* @__PURE__ */ i(h, { variant: "body2", children: c("Template") }),
1595
- /* @__PURE__ */ i(C, { className: " w-full", children: /* @__PURE__ */ i(
1596
- Z,
1597
- {
1598
- control: v,
1599
- id: "template",
1600
- name: "template",
1601
- errors: f,
1602
- label: "",
1603
- minRows: 5,
1604
- "data-testid": "othertypeeventconfigmodal-template-customtextarea"
1605
- }
1606
- ) })
1607
- ] })
1608
- ] })
1609
- ] }),
1610
- (e == null ? void 0 : e.type) === "KAFKA_SYNC" && /* @__PURE__ */ i(d, { container: !0, children: /* @__PURE__ */ i(d, { item: !0, size: { xs: 12 }, className: " w-full", children: /* @__PURE__ */ a(
1611
- N,
1612
- {
1613
- variant: "outlined",
1614
- className: " w-full",
1615
- "data-testid": "othertypeeventconfigmodal-kafkaConfig",
1616
- children: [
1617
- /* @__PURE__ */ a(h, { variant: "body2", children: [
1618
- c("Kafka Config"),
1619
- /* @__PURE__ */ i("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
1620
- ] }),
1621
- /* @__PURE__ */ i(C, { className: " w-full", children: /* @__PURE__ */ i(
1622
- y,
1623
- {
1624
- className: " w-full",
1625
- name: "formType",
1626
- control: v,
1627
- defaultValue: "",
1628
- error: f,
1629
- render: ({ field: t }) => /* @__PURE__ */ a(
1630
- L,
1631
- {
1632
- ...t,
1633
- className: " w-full",
1634
- size: "small",
1635
- displayEmpty: !0,
1636
- onChange: (n) => {
1637
- t.onChange(n), $e(n.target.value);
1638
- },
1639
- "data-testid": "othertypeeventconfigmodal-kafkaConfig-select",
1640
- children: [
1641
- /* @__PURE__ */ i(T, { value: "", children: /* @__PURE__ */ i(h, { variant: "body2", children: c("Select") }) }),
1642
- j == null ? void 0 : j.map((n, s) => /* @__PURE__ */ i(T, { value: n.form_type, children: /* @__PURE__ */ i(h, { variant: "body2", children: n.form_type }) }, s))
1643
- ]
1644
- }
1645
- )
1646
- }
1647
- ) })
1648
- ]
1649
- }
1650
- ) }) }),
1651
- z && (e == null ? void 0 : e.type) === "KAFKA_SYNC" && oe && z.length > 0 && /* @__PURE__ */ i(d, { container: !0, className: " w-full", children: z == null ? void 0 : z.map((t, n) => /* @__PURE__ */ i(
1652
- d,
1653
- {
1654
- item: !0,
1655
- size: { xs: 12 },
1656
- className: " w-full",
1657
- children: /* @__PURE__ */ a(N, { variant: "outlined", className: " w-full", children: [
1658
- /* @__PURE__ */ a(
1659
- d,
1660
- {
1661
- container: !0,
1662
- justifyContent: "space-between",
1663
- alignItems: "center",
1664
- children: [
1665
- /* @__PURE__ */ i(d, { item: !0, xs: !0, children: /* @__PURE__ */ a(h, { variant: "body2", children: [
1666
- t == null ? void 0 : t.parameterName,
1667
- " ",
1668
- c("Mapping")
1669
- ] }) }),
1670
- /* @__PURE__ */ i(d, { item: !0, children: /* @__PURE__ */ i(
1671
- N,
1672
- {
1673
- component: "fieldset",
1674
- className: "mr-2",
1675
- children: /* @__PURE__ */ i(
1676
- y,
1677
- {
1678
- control: v,
1679
- name: `${t == null ? void 0 : t.parameterName}${n}isFixed`,
1680
- defaultValue: (t == null ? void 0 : t.isFixed) || !1,
1681
- render: ({ field: s }) => /* @__PURE__ */ i(
1682
- U,
1683
- {
1684
- control: /* @__PURE__ */ i(
1685
- W,
1686
- {
1687
- checked: s.value,
1688
- onChange: (m) => {
1689
- s.onChange(m.target.checked), A(
1690
- n,
1691
- "isFixed",
1692
- m.target.checked
1693
- );
1694
- },
1695
- "data-testid": "othertypeeventconfigmodal-kafka-isFixed-checkbox"
1696
- }
1697
- ),
1698
- label: c("Is Fixed Value")
1699
- }
1700
- )
1701
- }
1702
- )
1703
- }
1704
- ) })
1705
- ]
1706
- }
1707
- ),
1708
- /* @__PURE__ */ i(C, { className: " w-full", children: /* @__PURE__ */ i(
1709
- y,
1710
- {
1711
- control: v,
1712
- className: " w-full",
1713
- name: `${t == null ? void 0 : t.parameterName}${n}`,
1714
- defaultValue: (t == null ? void 0 : t.mappingValue) || "",
1715
- render: ({ field: s }) => /* @__PURE__ */ i(
1716
- G,
1717
- {
1718
- variant: "outlined",
1719
- size: "small",
1720
- className: " w-full",
1721
- ...s,
1722
- fullWidth: !0,
1723
- onChange: (m) => {
1724
- p(
1725
- `${t == null ? void 0 : t.parameterName}${n}`,
1726
- m.target.value
1727
- ), A(
1728
- n,
1729
- "mappingValue",
1730
- m.target.value
1731
- );
1732
- },
1733
- "data-testid": `othertypeeventconfigmodal-kafka-${t == null ? void 0 : t.parameterName}${n}-textfield`
1734
- }
1735
- )
1736
- }
1737
- ) })
1738
- ] })
1739
- },
1740
- `${oe}-${t == null ? void 0 : t.parameterName}-${n}`
1741
- )) }),
1742
- ((e == null ? void 0 : e.type) === "SMS" || (e == null ? void 0 : e.type) == "QUERY" && !re) && /* @__PURE__ */ i(d, { container: !0, spacing: 2, children: /* @__PURE__ */ a(d, { item: !0, size: { xs: 12 }, className: " w-full", children: [
1743
- " ",
1744
- /* @__PURE__ */ a(
1745
- N,
1746
- {
1747
- variant: "outlined",
1748
- className: " w-full",
1749
- "data-testid": e.type === "QUERY" ? "othertypeeventconfigmodal-queryArea" : "othertypeeventconfigmodal-template",
1750
- children: [
1751
- /* @__PURE__ */ i(h, { variant: "body2", children: c(
1752
- e.type === "QUERY" ? "Query" : "Template"
1753
- ) }),
1754
- /* @__PURE__ */ i(C, { className: " w-full", children: /* @__PURE__ */ i(
1755
- Z,
1756
- {
1757
- control: v,
1758
- id: "template",
1759
- name: "template",
1760
- label: "",
1761
- minRows: 5,
1762
- "data-testid": "othertypeeventconfigmodal-template-customtextarea"
1763
- }
1764
- ) })
1765
- ]
1766
- }
1767
- )
1768
- ] }) }),
1769
- (e == null ? void 0 : e.type) != "EXCEPTION" && (e == null ? void 0 : e.type) != "SYSTEM_FUNCTION" && /* @__PURE__ */ i(d, { container: !0, spacing: 2, children: /* @__PURE__ */ a(d, { item: !0, size: { xs: 12 }, className: "mt-2 w-full", children: [
1770
- /* @__PURE__ */ a(
1771
- N,
1772
- {
1773
- variant: "outlined",
1774
- className: " w-full",
1775
- "data-testid": "othertypeeventconfigmodal-triggerWhen",
1776
- children: [
1777
- /* @__PURE__ */ a(h, { variant: "body2", children: [
1778
- c("Trigger"),
1779
- " ",
1780
- c("When"),
1781
- /* @__PURE__ */ i("span", { style: { color: "red", marginLeft: 4 }, children: "*" })
1782
- ] }),
1783
- /* @__PURE__ */ a(C, { className: " w-full", children: [
1784
- /* @__PURE__ */ i(
1785
- y,
1786
- {
1787
- name: "trigerWhen",
1788
- control: v,
1789
- defaultValue: "",
1790
- className: " w-full",
1791
- render: ({ field: t }) => /* @__PURE__ */ a(
1792
- L,
1793
- {
1794
- className: " w-full",
1795
- ...t,
1796
- error: f.trigerWhen,
1797
- size: "small",
1798
- displayEmpty: !0,
1799
- "data-testid": "othertypeeventconfigmodal-trigegrwhen-select",
1800
- children: [
1801
- /* @__PURE__ */ i(T, { value: "", children: /* @__PURE__ */ i(h, { variant: "body2", children: c("Select") }) }),
1802
- /* @__PURE__ */ i(T, { value: "IMMEDIATELY", children: /* @__PURE__ */ i(h, { variant: "body2", children: c("Immediately") }) }),
1803
- /* @__PURE__ */ i(T, { value: "AFTER", children: /* @__PURE__ */ i(h, { variant: "body2", children: c("After") }) })
1804
- ]
1805
- }
1806
- )
1807
- }
1808
- ),
1809
- (f == null ? void 0 : f.trigerWhen) && /* @__PURE__ */ i(
1810
- "p",
1811
- {
1812
- className: "error-helper",
1813
- "data-testid": "custom-error-message",
1814
- children: (se = f == null ? void 0 : f.trigerWhen) == null ? void 0 : se.message
1815
- }
1816
- )
1817
- ] })
1818
- ]
1819
- }
1820
- ),
1821
- ye === "AFTER" && /* @__PURE__ */ a(Me, { children: [
1822
- /* @__PURE__ */ i(d, { item: !0, size: { xs: 12 }, children: /* @__PURE__ */ a(
1823
- N,
1824
- {
1825
- variant: "outlined",
1826
- className: " w-full",
1827
- "data-testid": "othertypeeventconfigmodal-dayField",
1828
- children: [
1829
- /* @__PURE__ */ i(h, { variant: "body2", children: c("Day") }),
1830
- /* @__PURE__ */ i(C, { className: " w-full", children: /* @__PURE__ */ i(
1831
- M,
1832
- {
1833
- control: v,
1834
- id: "day",
1835
- name: "day",
1836
- errors: f,
1837
- label: "",
1838
- type: "number",
1839
- size: "small",
1840
- dataTestId: "othertypeeventconfigmodal-type-textfield"
1841
- }
1842
- ) })
1843
- ]
1844
- }
1845
- ) }),
1846
- /* @__PURE__ */ i(d, { item: !0, size: { xs: 12 }, children: /* @__PURE__ */ a(
1847
- N,
1848
- {
1849
- variant: "outlined",
1850
- className: " w-full",
1851
- "data-testid": "othertypeeventconfigmodal-hourField",
1852
- children: [
1853
- /* @__PURE__ */ i(h, { variant: "body2", children: c("Hour") }),
1854
- /* @__PURE__ */ i(C, { className: " w-full", children: /* @__PURE__ */ i(
1855
- M,
1856
- {
1857
- control: v,
1858
- id: "hour",
1859
- name: "hour",
1860
- errors: f,
1861
- label: "",
1862
- type: "number",
1863
- size: "small",
1864
- dataTestId: "othertypeeventconfigmodal-type-textfield"
1865
- }
1866
- ) })
1867
- ]
1868
- }
1869
- ) }),
1870
- /* @__PURE__ */ i(d, { item: !0, size: { xs: 12 }, children: /* @__PURE__ */ a(
1871
- N,
1872
- {
1873
- variant: "outlined",
1874
- className: " w-full",
1875
- "data-testid": "othertypeeventconfigmodal-minuteField",
1876
- children: [
1877
- /* @__PURE__ */ i(h, { variant: "body2", children: c("Minute") }),
1878
- /* @__PURE__ */ i(C, { className: " w-full", children: /* @__PURE__ */ i(
1879
- M,
1880
- {
1881
- control: v,
1882
- id: "minute",
1883
- name: "minute",
1884
- type: "number",
1885
- errors: f,
1886
- label: "",
1887
- size: "small",
1888
- dataTestId: "othertypeeventconfigmodal-type-textfield"
1889
- }
1890
- ) })
1891
- ]
1892
- }
1893
- ) })
1894
- ] })
1895
- ] }) })
1896
- ] })
1897
- ] }),
1898
- /* @__PURE__ */ a(
1899
- We,
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__ */ i(
1909
- ce,
1910
- {
1911
- variant: "contained",
1912
- size: "small",
1913
- color: "secondary",
1914
- onClick: () => {
1915
- J(), Y();
1916
- },
1917
- "data-testid": "othertypeeventconfigmodal-cancel-button",
1918
- children: /* @__PURE__ */ i(h, { variant: "body2", children: c("Cancel") })
1919
- }
1920
- ),
1921
- /* @__PURE__ */ i(
1922
- ce,
1923
- {
1924
- size: "small",
1925
- type: "submit",
1926
- variant: "contained",
1927
- color: "primary",
1928
- "data-testid": "othertypeeventconfigmodal-submit-button",
1929
- children: c("Submit")
1930
- }
1931
- )
1932
- ]
1933
- }
1934
- )
1935
- ]
1936
- }
1937
- )
1938
- ]
1939
- }
1940
- )
1941
- }
1942
- );
1943
- };
1944
- bt.propTypes = {
1945
- open: H.any,
1946
- handleClose: H.any,
1947
- handleClick: H.any,
1948
- type: H.any
1949
- };
1950
- export {
1951
- bt as default
1952
- };
1953
- //# sourceMappingURL=OtherTypeEventConfigModal-ZnCGWm9v.js.map