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