@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260429063933 → 0.8.1-dev.20260430100756
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/DateViewClient-UCGTXQNC.mjs +231 -0
- package/dist/index.js +264 -230
- package/dist/index.mjs +563 -772
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-MCGXO6OE.mjs";
|
|
11
11
|
|
|
12
12
|
// src/components/controls/view/ViewControl.tsx
|
|
13
|
-
import
|
|
13
|
+
import React9 from "react";
|
|
14
14
|
|
|
15
15
|
// src/components/controls/view/ViewControlTypes.tsx
|
|
16
16
|
var ViewControlTypes = {
|
|
@@ -43,231 +43,15 @@ var NumberView = (props) => {
|
|
|
43
43
|
var NumberView_default = NumberView;
|
|
44
44
|
|
|
45
45
|
// src/components/controls/view/DateView.tsx
|
|
46
|
-
import
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"Asia/Calcutta": "IST",
|
|
51
|
-
"Asia/Kolkata": "IST",
|
|
52
|
-
"America/New_York": "EST",
|
|
53
|
-
"America/Los_Angeles": "PST",
|
|
54
|
-
"Europe/London": "GMT",
|
|
55
|
-
"Europe/Paris": "CET",
|
|
56
|
-
"Asia/Tokyo": "JST",
|
|
57
|
-
"America/Chicago": "CST",
|
|
58
|
-
"America/Denver": "MST",
|
|
59
|
-
"Asia/Shanghai": "CST",
|
|
60
|
-
"Asia/Hong_Kong": "HKT",
|
|
61
|
-
"Australia/Sydney": "AEST",
|
|
62
|
-
"Australia/Melbourne": "AEST",
|
|
63
|
-
"Australia/Perth": "AWST",
|
|
64
|
-
"Pacific/Auckland": "NZST",
|
|
65
|
-
"Europe/Berlin": "CET",
|
|
66
|
-
"Europe/Madrid": "CET",
|
|
67
|
-
"Europe/Rome": "CET",
|
|
68
|
-
"Europe/Athens": "EET",
|
|
69
|
-
"Europe/Istanbul": "TRT",
|
|
70
|
-
"Africa/Cairo": "EET",
|
|
71
|
-
"Africa/Johannesburg": "SAST",
|
|
72
|
-
"Asia/Dubai": "GST",
|
|
73
|
-
"Asia/Singapore": "SGT",
|
|
74
|
-
"Asia/Seoul": "KST",
|
|
75
|
-
"America/Toronto": "EST",
|
|
76
|
-
"America/Vancouver": "PST",
|
|
77
|
-
"America/Sao_Paulo": "BRT",
|
|
78
|
-
"America/Mexico_City": "CST",
|
|
79
|
-
"Asia/Manila": "PHT",
|
|
80
|
-
"Asia/Jakarta": "WIB",
|
|
81
|
-
"Asia/Bangkok": "ICT",
|
|
82
|
-
"Asia/Karachi": "PKT",
|
|
83
|
-
"Asia/Tehran": "IRST",
|
|
84
|
-
"Asia/Baghdad": "AST",
|
|
85
|
-
"Europe/Moscow": "MSK",
|
|
86
|
-
"Europe/Amsterdam": "CET",
|
|
87
|
-
"Europe/Brussels": "CET",
|
|
88
|
-
"Europe/Zurich": "CET",
|
|
89
|
-
"America/Anchorage": "AKST",
|
|
90
|
-
"Pacific/Honolulu": "HST",
|
|
91
|
-
"Antarctica/McMurdo": "NZST",
|
|
92
|
-
"Atlantic/Reykjavik": "GMT",
|
|
93
|
-
"Asia/Riyadh": "AST",
|
|
94
|
-
"America/Argentina/Buenos_Aires": "ART",
|
|
95
|
-
"America/Bogota": "COT",
|
|
96
|
-
"Africa/Nairobi": "EAT",
|
|
97
|
-
"Asia/Kuala_Lumpur": "MYT",
|
|
98
|
-
"Asia/Ho_Chi_Minh": "ICT",
|
|
99
|
-
"Europe/Warsaw": "CET",
|
|
100
|
-
"Europe/Prague": "CET",
|
|
101
|
-
"America/Phoenix": "MST",
|
|
102
|
-
"America/Indianapolis": "EST",
|
|
103
|
-
"Pacific/Fiji": "FJT",
|
|
104
|
-
"Asia/Colombo": "IST",
|
|
105
|
-
"Africa/Lagos": "WAT",
|
|
106
|
-
"America/Caracas": "VET",
|
|
107
|
-
"America/Halifax": "AST",
|
|
108
|
-
"Pacific/Tahiti": "TAHT",
|
|
109
|
-
"America/St_Johns": "NST",
|
|
110
|
-
"Europe/Bucharest": "EET",
|
|
111
|
-
"Europe/Helsinki": "EET",
|
|
112
|
-
"Europe/Kiev": "EET",
|
|
113
|
-
"Europe/Oslo": "CET",
|
|
114
|
-
"Europe/Stockholm": "CET",
|
|
115
|
-
"Europe/Lisbon": "WET",
|
|
116
|
-
"Asia/Beirut": "EET",
|
|
117
|
-
"Asia/Damascus": "EET",
|
|
118
|
-
"Asia/Jerusalem": "IST",
|
|
119
|
-
"Asia/Amman": "EET",
|
|
120
|
-
"America/Santiago": "CLT",
|
|
121
|
-
"America/Lima": "PET",
|
|
122
|
-
"America/Montevideo": "UYT",
|
|
123
|
-
"Asia/Tashkent": "UZT",
|
|
124
|
-
"Asia/Yerevan": "AMT",
|
|
125
|
-
"Asia/Baku": "AZT",
|
|
126
|
-
"Europe/Vilnius": "EET",
|
|
127
|
-
"Europe/Riga": "EET",
|
|
128
|
-
"Europe/Tallinn": "EET",
|
|
129
|
-
"Europe/Sofia": "EET",
|
|
130
|
-
"Africa/Casablanca": "WET",
|
|
131
|
-
"America/Guatemala": "CST",
|
|
132
|
-
"America/Panama": "EST",
|
|
133
|
-
"America/Costa_Rica": "CST",
|
|
134
|
-
"Pacific/Port_Moresby": "PGT",
|
|
135
|
-
"Asia/Makassar": "WITA",
|
|
136
|
-
"Asia/Vladivostok": "VLAT",
|
|
137
|
-
"Asia/Krasnoyarsk": "KRAT",
|
|
138
|
-
"Asia/Novosibirsk": "NOVT",
|
|
139
|
-
"Asia/Yakutsk": "YAKT",
|
|
140
|
-
"Asia/Sakhalin": "SAKT",
|
|
141
|
-
"Asia/Ulaanbaatar": "ULAT",
|
|
142
|
-
"Asia/Choibalsan": "CHOT",
|
|
143
|
-
"Asia/Omsk": "OMST",
|
|
144
|
-
"Asia/Kamchatka": "PETT",
|
|
145
|
-
"Pacific/Pago_Pago": "SST",
|
|
146
|
-
"Pacific/Guam": "ChST",
|
|
147
|
-
"Pacific/Saipan": "ChST",
|
|
148
|
-
"Pacific/Palau": "PWT",
|
|
149
|
-
"Pacific/Efate": "VUT",
|
|
150
|
-
"Pacific/Kosrae": "KOST",
|
|
151
|
-
"Pacific/Nauru": "NRT",
|
|
152
|
-
"Pacific/Tarawa": "GILT",
|
|
153
|
-
"Pacific/Enderbury": "PHOT",
|
|
154
|
-
"Pacific/Fakaofo": "TKT",
|
|
155
|
-
"Pacific/Chatham": "CHAST",
|
|
156
|
-
"Pacific/Tongatapu": "TOT",
|
|
157
|
-
"Pacific/Funafuti": "TVT",
|
|
158
|
-
"Pacific/Majuro": "MHT",
|
|
159
|
-
"Pacific/Kwajalein": "MHT",
|
|
160
|
-
"Pacific/Wake": "WAKT",
|
|
161
|
-
"Pacific/Wallis": "WFT"
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
// src/components/controls/view/DateView.tsx
|
|
165
|
-
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
166
|
-
var DateView = (props) => {
|
|
167
|
-
const userTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
168
|
-
const getTimeZoneAbbreviation = (timeZone) => {
|
|
169
|
-
return timeZoneAbbreviations[timeZone] || timeZone;
|
|
170
|
-
};
|
|
171
|
-
const getRelativeTime = (dateString) => {
|
|
172
|
-
const now = /* @__PURE__ */ new Date();
|
|
173
|
-
const date = /* @__PURE__ */ new Date(dateString + "Z");
|
|
174
|
-
const diffMs = now.getTime() - date.getTime();
|
|
175
|
-
const diffSec = Math.floor(diffMs / 1e3);
|
|
176
|
-
const diffMin = Math.floor(diffSec / 60);
|
|
177
|
-
const diffHr = Math.floor(diffMin / 60);
|
|
178
|
-
const diffDay = Math.floor(diffHr / 24);
|
|
179
|
-
if (diffSec < 60) return "Just now";
|
|
180
|
-
if (diffMin < 60) return `${diffMin} minute${diffMin > 1 ? "s" : ""} ago`;
|
|
181
|
-
if (diffHr < 24) return `${diffHr} hour${diffHr > 1 ? "s" : ""} ago`;
|
|
182
|
-
if (diffDay < 7) return `${diffDay} day${diffDay > 1 ? "s" : ""} ago`;
|
|
183
|
-
return new Intl.DateTimeFormat("en", {
|
|
184
|
-
day: "2-digit",
|
|
185
|
-
month: "short",
|
|
186
|
-
year: "numeric",
|
|
187
|
-
timeZone: userTimeZone
|
|
188
|
-
}).format(date);
|
|
189
|
-
};
|
|
190
|
-
console.log("DateView props:", props);
|
|
191
|
-
const parseAndFormatDate = (dateString, format) => {
|
|
192
|
-
const parsedDate = /* @__PURE__ */ new Date(dateString + "Z");
|
|
193
|
-
if (format === "relative") {
|
|
194
|
-
return getRelativeTime(dateString);
|
|
195
|
-
}
|
|
196
|
-
switch (props.controlType) {
|
|
197
|
-
case "date":
|
|
198
|
-
return new Intl.DateTimeFormat("en", {
|
|
199
|
-
day: "2-digit",
|
|
200
|
-
month: "short",
|
|
201
|
-
year: "numeric",
|
|
202
|
-
timeZone: userTimeZone
|
|
203
|
-
}).format(parsedDate);
|
|
204
|
-
case "time":
|
|
205
|
-
return `${formatTime(parsedDate)} ${getTimeZoneAbbreviation(userTimeZone)} (${getTimePeriod(parsedDate)})`;
|
|
206
|
-
default:
|
|
207
|
-
return parsedDate.getSeconds() === 0 ? new Intl.DateTimeFormat("en", {
|
|
208
|
-
day: "2-digit",
|
|
209
|
-
month: "short",
|
|
210
|
-
year: "numeric",
|
|
211
|
-
hour: "2-digit",
|
|
212
|
-
minute: "2-digit",
|
|
213
|
-
timeZone: userTimeZone
|
|
214
|
-
}).format(parsedDate) : new Intl.DateTimeFormat("en", {
|
|
215
|
-
day: "2-digit",
|
|
216
|
-
month: "short",
|
|
217
|
-
year: "numeric",
|
|
218
|
-
hour: "2-digit",
|
|
219
|
-
minute: "2-digit",
|
|
220
|
-
second: "2-digit",
|
|
221
|
-
timeZone: userTimeZone
|
|
222
|
-
}).format(parsedDate);
|
|
223
|
-
}
|
|
224
|
-
};
|
|
225
|
-
const formatTime = (date) => {
|
|
226
|
-
return date.getSeconds() === 0 ? new Intl.DateTimeFormat("en", {
|
|
227
|
-
hour: "2-digit",
|
|
228
|
-
minute: "2-digit",
|
|
229
|
-
timeZone: userTimeZone
|
|
230
|
-
}).format(date) : new Intl.DateTimeFormat("en", {
|
|
231
|
-
hour: "2-digit",
|
|
232
|
-
minute: "2-digit",
|
|
233
|
-
second: "2-digit",
|
|
234
|
-
timeZone: userTimeZone
|
|
235
|
-
}).format(date);
|
|
236
|
-
};
|
|
237
|
-
const getTimePeriod = (date) => {
|
|
238
|
-
const localHours = Number(
|
|
239
|
-
new Intl.DateTimeFormat("en", {
|
|
240
|
-
hour: "numeric",
|
|
241
|
-
hour12: false,
|
|
242
|
-
timeZone: userTimeZone
|
|
243
|
-
}).format(date)
|
|
244
|
-
);
|
|
245
|
-
if (localHours >= 5 && localHours < 8) return "Early Morning";
|
|
246
|
-
if (localHours >= 8 && localHours < 12) return "Morning";
|
|
247
|
-
if (localHours >= 12 && localHours < 14) return "Noon";
|
|
248
|
-
if (localHours >= 14 && localHours < 17) return "Afternoon";
|
|
249
|
-
if (localHours >= 17 && localHours < 20) return "Evening";
|
|
250
|
-
if (localHours >= 20 && localHours < 22) return "Late Evening";
|
|
251
|
-
return "Night";
|
|
252
|
-
};
|
|
253
|
-
let localDateTime = "";
|
|
254
|
-
let timeZoneAbbreviation = "";
|
|
255
|
-
try {
|
|
256
|
-
localDateTime = parseAndFormatDate(props.value, props.format);
|
|
257
|
-
timeZoneAbbreviation = getTimeZoneAbbreviation(userTimeZone);
|
|
258
|
-
} catch (error) {
|
|
259
|
-
console.error("Error parsing date:", props.value, error);
|
|
260
|
-
}
|
|
261
|
-
return /* @__PURE__ */ jsx2(React2.Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "inline-flex flex-wrap gap-1", children: [
|
|
262
|
-
/* @__PURE__ */ jsx2("span", { children: localDateTime }),
|
|
263
|
-
!props.format && props.controlType != "date" && /* @__PURE__ */ jsx2("span", { children: timeZoneAbbreviation })
|
|
264
|
-
] }) });
|
|
265
|
-
};
|
|
46
|
+
import dynamic from "next/dynamic";
|
|
47
|
+
var DateView = dynamic(() => import("./DateViewClient-UCGTXQNC.mjs"), {
|
|
48
|
+
ssr: false
|
|
49
|
+
});
|
|
266
50
|
var DateView_default = DateView;
|
|
267
51
|
|
|
268
52
|
// src/components/controls/view/BooleanView.tsx
|
|
269
|
-
import
|
|
270
|
-
import { jsx as
|
|
53
|
+
import React2 from "react";
|
|
54
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
271
55
|
var BooleanView = (props) => {
|
|
272
56
|
const { value, customProps } = props;
|
|
273
57
|
const showOnlyTrueIcon = customProps?.showOnlyTrueIcon;
|
|
@@ -277,7 +61,7 @@ var BooleanView = (props) => {
|
|
|
277
61
|
customProps,
|
|
278
62
|
showOnlyTrueIcon
|
|
279
63
|
});
|
|
280
|
-
const booleanValue =
|
|
64
|
+
const booleanValue = React2.useMemo(() => {
|
|
281
65
|
if (typeof value === "boolean") return value;
|
|
282
66
|
if (typeof value === "string") {
|
|
283
67
|
return value.toLowerCase() === "true";
|
|
@@ -288,13 +72,13 @@ var BooleanView = (props) => {
|
|
|
288
72
|
return false;
|
|
289
73
|
}, [value]);
|
|
290
74
|
if (showOnlyTrueIcon) {
|
|
291
|
-
return /* @__PURE__ */
|
|
75
|
+
return /* @__PURE__ */ jsx2(React2.Fragment, { children: booleanValue === true && /* @__PURE__ */ jsx2(
|
|
292
76
|
"svg",
|
|
293
77
|
{
|
|
294
78
|
className: "w-15 h-8 text-green-600",
|
|
295
79
|
fill: "currentColor",
|
|
296
80
|
viewBox: "0 0 20 20",
|
|
297
|
-
children: /* @__PURE__ */
|
|
81
|
+
children: /* @__PURE__ */ jsx2(
|
|
298
82
|
"path",
|
|
299
83
|
{
|
|
300
84
|
fillRule: "evenodd",
|
|
@@ -305,54 +89,54 @@ var BooleanView = (props) => {
|
|
|
305
89
|
}
|
|
306
90
|
) });
|
|
307
91
|
}
|
|
308
|
-
return /* @__PURE__ */
|
|
92
|
+
return /* @__PURE__ */ jsx2(React2.Fragment, { children: booleanValue ? "true" : "false" });
|
|
309
93
|
};
|
|
310
94
|
var BooleanView_default = BooleanView;
|
|
311
95
|
|
|
312
96
|
// src/components/controls/view/LineTextView.tsx
|
|
313
|
-
import
|
|
314
|
-
import { jsx as
|
|
97
|
+
import React3 from "react";
|
|
98
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
315
99
|
var LineText = (props) => {
|
|
316
|
-
return /* @__PURE__ */
|
|
100
|
+
return /* @__PURE__ */ jsx3(React3.Fragment, { children: props.value });
|
|
317
101
|
};
|
|
318
102
|
var LineTextView_default = LineText;
|
|
319
103
|
|
|
320
104
|
// src/components/controls/view/MoneyView.tsx
|
|
321
|
-
import
|
|
322
|
-
import { jsx as
|
|
105
|
+
import React4 from "react";
|
|
106
|
+
import { jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
323
107
|
var Money = (props) => {
|
|
324
108
|
const parsedNumber = parseFloat(props.value);
|
|
325
|
-
return /* @__PURE__ */
|
|
326
|
-
/* @__PURE__ */
|
|
109
|
+
return /* @__PURE__ */ jsx4(React4.Fragment, { children: !Number.isNaN(parsedNumber) && /* @__PURE__ */ jsxs("span", { className: parsedNumber < 0 ? "text-alert" : "", children: [
|
|
110
|
+
/* @__PURE__ */ jsx4("span", { className: "mr-0.5", children: "\u20B9" }),
|
|
327
111
|
parsedNumber.toLocaleString()
|
|
328
112
|
] }) });
|
|
329
113
|
};
|
|
330
114
|
var MoneyView_default = Money;
|
|
331
115
|
|
|
332
116
|
// src/components/controls/view/MultilineTextBulletsView.tsx
|
|
333
|
-
import
|
|
334
|
-
import { jsx as
|
|
117
|
+
import React5 from "react";
|
|
118
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
335
119
|
var MultilineTextBullets = (props) => {
|
|
336
120
|
const lines = props.value?.split("\\n");
|
|
337
|
-
return /* @__PURE__ */
|
|
338
|
-
return /* @__PURE__ */
|
|
121
|
+
return /* @__PURE__ */ jsx5(React5.Fragment, { children: /* @__PURE__ */ jsx5("ul", { className: "list-disc", children: lines && lines.map((line, index) => {
|
|
122
|
+
return /* @__PURE__ */ jsx5("li", { children: line }, index);
|
|
339
123
|
}) }) });
|
|
340
124
|
};
|
|
341
125
|
var MultilineTextBulletsView_default = MultilineTextBullets;
|
|
342
126
|
|
|
343
127
|
// src/components/controls/view/MultilineTextView.tsx
|
|
344
|
-
import
|
|
345
|
-
import { jsx as
|
|
128
|
+
import React6 from "react";
|
|
129
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
346
130
|
var MultilineText = (props) => {
|
|
347
|
-
return /* @__PURE__ */
|
|
131
|
+
return /* @__PURE__ */ jsx6(React6.Fragment, { children: /* @__PURE__ */ jsx6("span", { className: "whitespace-pre-line", children: props.value }) });
|
|
348
132
|
};
|
|
349
133
|
var MultilineTextView_default = MultilineText;
|
|
350
134
|
|
|
351
135
|
// src/components/controls/view/PercentageView.tsx
|
|
352
|
-
import
|
|
353
|
-
import { jsxs as
|
|
136
|
+
import React7 from "react";
|
|
137
|
+
import { jsxs as jsxs2 } from "react/jsx-runtime";
|
|
354
138
|
var PercentageView = (props) => {
|
|
355
|
-
return /* @__PURE__ */
|
|
139
|
+
return /* @__PURE__ */ jsxs2(React7.Fragment, { children: [
|
|
356
140
|
props.value,
|
|
357
141
|
"%"
|
|
358
142
|
] });
|
|
@@ -360,16 +144,16 @@ var PercentageView = (props) => {
|
|
|
360
144
|
var PercentageView_default = PercentageView;
|
|
361
145
|
|
|
362
146
|
// src/components/controls/view/ProgressIndicator.tsx
|
|
363
|
-
import
|
|
364
|
-
import { jsx as
|
|
147
|
+
import React8 from "react";
|
|
148
|
+
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
365
149
|
var ProgressIndicator = (props) => {
|
|
366
150
|
const percentage = 100;
|
|
367
151
|
const circumference = Math.PI * 56;
|
|
368
152
|
const offset = circumference * (1 - percentage / 100);
|
|
369
|
-
return /* @__PURE__ */
|
|
370
|
-
/* @__PURE__ */
|
|
371
|
-
/* @__PURE__ */
|
|
372
|
-
/* @__PURE__ */
|
|
153
|
+
return /* @__PURE__ */ jsx7(React8.Fragment, { children: /* @__PURE__ */ jsxs3("div", { className: "relative w-48 h-48", children: [
|
|
154
|
+
/* @__PURE__ */ jsx7("div", { className: "absolute top-0 left-0 w-full h-full rounded-full border border-gray-200" }),
|
|
155
|
+
/* @__PURE__ */ jsx7("div", { className: "absolute top-0 left-0 w-full h-full rounded-full overflow-hidden", children: /* @__PURE__ */ jsx7("div", { className: "w-full h-full rounded-full border-t-8 border-green-500", style: { transform: `rotate(-90deg)`, clipPath: `inset(0px ${offset}px 0px 0px)` } }) }),
|
|
156
|
+
/* @__PURE__ */ jsx7("div", { className: "absolute top-0 left-0 w-full h-full flex items-center justify-center text-lg font-bold text-gray-800", children: /* @__PURE__ */ jsxs3("span", { children: [
|
|
373
157
|
percentage,
|
|
374
158
|
"%"
|
|
375
159
|
] }) })
|
|
@@ -378,24 +162,24 @@ var ProgressIndicator = (props) => {
|
|
|
378
162
|
var ProgressIndicator_default = ProgressIndicator;
|
|
379
163
|
|
|
380
164
|
// src/components/controls/view/AiGeneratedSummary.tsx
|
|
381
|
-
import { jsx as
|
|
165
|
+
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
382
166
|
var AiGeneratedSummary = (props) => {
|
|
383
167
|
const lines = props.value?.split("\n").filter((line) => line.trim() !== "") || [];
|
|
384
|
-
return /* @__PURE__ */
|
|
385
|
-
/* @__PURE__ */
|
|
386
|
-
/* @__PURE__ */
|
|
387
|
-
/* @__PURE__ */
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
/* @__PURE__ */
|
|
168
|
+
return /* @__PURE__ */ jsxs4("details", { className: "group rounded-xl border-2 bg-white shadow-sm border-p overflow-hidden", children: [
|
|
169
|
+
/* @__PURE__ */ jsx8("summary", { className: "flex items-start justify-between cursor-pointer list-none", children: /* @__PURE__ */ jsxs4("div", { className: "flex items-start gap-3 ", children: [
|
|
170
|
+
/* @__PURE__ */ jsx8("div", { className: "bg-primary-base bg-transparent rounded mt-1 p-1", children: /* @__PURE__ */ jsx8("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-5", children: /* @__PURE__ */ jsx8("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z" }) }) }),
|
|
171
|
+
/* @__PURE__ */ jsxs4("div", { children: [
|
|
172
|
+
/* @__PURE__ */ jsx8("h3", { className: "text-lg font-semibold ", children: "Quick Read" }),
|
|
173
|
+
/* @__PURE__ */ jsx8("p", { className: "text-sm text-gray-500 mb-0", children: "Summary is AI-generated, author-reviewed" })
|
|
390
174
|
] })
|
|
391
175
|
] }) }),
|
|
392
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ jsx8("div", { children: /* @__PURE__ */ jsx8("ul", { className: "list-disc pl-6 space-y-3 text-gray-700", children: lines.map((line, index) => /* @__PURE__ */ jsx8("li", { className: "m-0", children: line }, index)) }) })
|
|
393
177
|
] });
|
|
394
178
|
};
|
|
395
179
|
var AiGeneratedSummary_default = AiGeneratedSummary;
|
|
396
180
|
|
|
397
181
|
// src/components/controls/view/ViewControl.tsx
|
|
398
|
-
import { jsx as
|
|
182
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
399
183
|
var ViewControl = (props) => {
|
|
400
184
|
const ControlComponents = {
|
|
401
185
|
[ViewControlTypes_default.lineText]: LineTextView_default,
|
|
@@ -417,16 +201,16 @@ var ViewControl = (props) => {
|
|
|
417
201
|
[ViewControlTypes_default.aiGeneratedSummary]: AiGeneratedSummary_default
|
|
418
202
|
};
|
|
419
203
|
const SelectedControlComponent = props.controlType ? ControlComponents[props.controlType] : void 0;
|
|
420
|
-
return /* @__PURE__ */
|
|
204
|
+
return /* @__PURE__ */ jsx9(React9.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx9(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
421
205
|
};
|
|
422
206
|
var ViewControl_default = ViewControl;
|
|
423
207
|
|
|
424
208
|
// src/components/controls/edit/InputControl.tsx
|
|
425
|
-
import
|
|
209
|
+
import React27 from "react";
|
|
426
210
|
|
|
427
211
|
// src/components/controls/edit/MultilineTextInput.tsx
|
|
428
|
-
import
|
|
429
|
-
import { jsx as
|
|
212
|
+
import React10 from "react";
|
|
213
|
+
import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
430
214
|
var MultilineTextInput = (props) => {
|
|
431
215
|
const textChangeHandler = (event) => {
|
|
432
216
|
const text = event.target.value;
|
|
@@ -445,11 +229,11 @@ var MultilineTextInput = (props) => {
|
|
|
445
229
|
if (props.value !== void 0 && props.value !== null) {
|
|
446
230
|
value = props.value;
|
|
447
231
|
}
|
|
448
|
-
return /* @__PURE__ */
|
|
449
|
-
/* @__PURE__ */
|
|
232
|
+
return /* @__PURE__ */ jsx10(React10.Fragment, { children: /* @__PURE__ */ jsxs5("label", { className: "block mb-1", children: [
|
|
233
|
+
/* @__PURE__ */ jsx10("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
450
234
|
" ",
|
|
451
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
452
|
-
/* @__PURE__ */
|
|
235
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx10("span", { className: "bg-error-weak", children: "*" }),
|
|
236
|
+
/* @__PURE__ */ jsx10(
|
|
453
237
|
"textarea",
|
|
454
238
|
{
|
|
455
239
|
name: props.name,
|
|
@@ -466,14 +250,14 @@ var MultilineTextInput = (props) => {
|
|
|
466
250
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm input"
|
|
467
251
|
}
|
|
468
252
|
),
|
|
469
|
-
/* @__PURE__ */
|
|
253
|
+
/* @__PURE__ */ jsx10("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
470
254
|
] }) });
|
|
471
255
|
};
|
|
472
256
|
var MultilineTextInput_default = MultilineTextInput;
|
|
473
257
|
|
|
474
258
|
// src/components/controls/edit/LineTextInput.tsx
|
|
475
|
-
import
|
|
476
|
-
import { jsx as
|
|
259
|
+
import React11 from "react";
|
|
260
|
+
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
477
261
|
var LineTextInput = (props) => {
|
|
478
262
|
const textChangeHandler = (event) => {
|
|
479
263
|
const text = event.target.value;
|
|
@@ -492,11 +276,11 @@ var LineTextInput = (props) => {
|
|
|
492
276
|
if (props.value !== void 0 && props.value !== null) {
|
|
493
277
|
value = props.value;
|
|
494
278
|
}
|
|
495
|
-
return /* @__PURE__ */
|
|
496
|
-
props?.attributes?.label && /* @__PURE__ */
|
|
279
|
+
return /* @__PURE__ */ jsx11(React11.Fragment, { children: /* @__PURE__ */ jsxs6("label", { className: "block", children: [
|
|
280
|
+
props?.attributes?.label && /* @__PURE__ */ jsx11("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
497
281
|
" ",
|
|
498
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
499
|
-
/* @__PURE__ */
|
|
282
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx11("span", { className: "bg-error-weak", children: "*" }),
|
|
283
|
+
/* @__PURE__ */ jsx11(
|
|
500
284
|
"input",
|
|
501
285
|
{
|
|
502
286
|
type: "text",
|
|
@@ -516,14 +300,14 @@ var LineTextInput = (props) => {
|
|
|
516
300
|
`
|
|
517
301
|
}
|
|
518
302
|
),
|
|
519
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ jsx11("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
520
304
|
] }) });
|
|
521
305
|
};
|
|
522
306
|
var LineTextInput_default = LineTextInput;
|
|
523
307
|
|
|
524
308
|
// src/components/controls/edit/MoneyInput.tsx
|
|
525
|
-
import
|
|
526
|
-
import { jsx as
|
|
309
|
+
import React12 from "react";
|
|
310
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
527
311
|
var MoneyInput = (props) => {
|
|
528
312
|
const textChangeHandler = (event) => {
|
|
529
313
|
const rawValue = event.target.value;
|
|
@@ -552,11 +336,11 @@ var MoneyInput = (props) => {
|
|
|
552
336
|
e.preventDefault();
|
|
553
337
|
}
|
|
554
338
|
};
|
|
555
|
-
return /* @__PURE__ */
|
|
556
|
-
/* @__PURE__ */
|
|
339
|
+
return /* @__PURE__ */ jsx12(React12.Fragment, { children: /* @__PURE__ */ jsxs7("label", { className: "block mb-1", children: [
|
|
340
|
+
/* @__PURE__ */ jsx12("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
557
341
|
" ",
|
|
558
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
559
|
-
/* @__PURE__ */
|
|
342
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx12("span", { className: "bg-error-weak", children: "*" }),
|
|
343
|
+
/* @__PURE__ */ jsx12(
|
|
560
344
|
"input",
|
|
561
345
|
{
|
|
562
346
|
type: "number",
|
|
@@ -576,7 +360,7 @@ var MoneyInput = (props) => {
|
|
|
576
360
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm number-input"
|
|
577
361
|
}
|
|
578
362
|
),
|
|
579
|
-
/* @__PURE__ */
|
|
363
|
+
/* @__PURE__ */ jsx12("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
580
364
|
] }) });
|
|
581
365
|
};
|
|
582
366
|
var MoneyInput_default = MoneyInput;
|
|
@@ -608,7 +392,7 @@ var InputControlType_default = InputControlType;
|
|
|
608
392
|
|
|
609
393
|
// src/components/controls/edit/Select.tsx
|
|
610
394
|
import { useState, useEffect } from "react";
|
|
611
|
-
import { jsx as
|
|
395
|
+
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
612
396
|
var Select = (props) => {
|
|
613
397
|
const [list, setList] = useState([]);
|
|
614
398
|
const getSafeValue = (val) => {
|
|
@@ -666,11 +450,11 @@ var Select = (props) => {
|
|
|
666
450
|
props.dataSourceDependsOn
|
|
667
451
|
]);
|
|
668
452
|
const value = getSafeValue(props.value);
|
|
669
|
-
return /* @__PURE__ */
|
|
670
|
-
props.attributes?.label && /* @__PURE__ */
|
|
453
|
+
return /* @__PURE__ */ jsxs8("label", { className: "block", children: [
|
|
454
|
+
props.attributes?.label && /* @__PURE__ */ jsx13("span", { className: "text-sm font-medium inline-block pb-1", children: props.attributes?.label }),
|
|
671
455
|
" ",
|
|
672
|
-
props.attributes?.label && props.attributes?.required && /* @__PURE__ */
|
|
673
|
-
/* @__PURE__ */
|
|
456
|
+
props.attributes?.label && props.attributes?.required && /* @__PURE__ */ jsx13("span", { className: "bg-error-weak", children: "*" }),
|
|
457
|
+
/* @__PURE__ */ jsxs8(
|
|
674
458
|
"select",
|
|
675
459
|
{
|
|
676
460
|
name: props.name,
|
|
@@ -681,23 +465,23 @@ var Select = (props) => {
|
|
|
681
465
|
disabled: props.attributes?.readOnly,
|
|
682
466
|
className: "peer select py-1.5 block w-full text-black rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none",
|
|
683
467
|
children: [
|
|
684
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ jsx13("option", { value: "", children: props.attributes?.placeholder || "Select" }),
|
|
685
469
|
list.map((item, index) => {
|
|
686
470
|
const keyField = props.dataKeyFieldName;
|
|
687
471
|
const textField = props.dataTextFieldName;
|
|
688
|
-
return /* @__PURE__ */
|
|
472
|
+
return /* @__PURE__ */ jsx13("option", { value: item[keyField], children: item[textField] }, index);
|
|
689
473
|
})
|
|
690
474
|
]
|
|
691
475
|
}
|
|
692
476
|
),
|
|
693
|
-
/* @__PURE__ */
|
|
477
|
+
/* @__PURE__ */ jsx13("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props.attributes?.errorMessage || "" })
|
|
694
478
|
] });
|
|
695
479
|
};
|
|
696
480
|
var Select_default = Select;
|
|
697
481
|
|
|
698
482
|
// src/components/controls/edit/PercentageInput.tsx
|
|
699
|
-
import
|
|
700
|
-
import { jsx as
|
|
483
|
+
import React14 from "react";
|
|
484
|
+
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
701
485
|
var PercentageInput = (props) => {
|
|
702
486
|
const textChangeHandler = (event) => {
|
|
703
487
|
const rawValue = event.target.value;
|
|
@@ -726,11 +510,11 @@ var PercentageInput = (props) => {
|
|
|
726
510
|
e.preventDefault();
|
|
727
511
|
}
|
|
728
512
|
};
|
|
729
|
-
return /* @__PURE__ */
|
|
730
|
-
/* @__PURE__ */
|
|
513
|
+
return /* @__PURE__ */ jsx14(React14.Fragment, { children: /* @__PURE__ */ jsxs9("label", { className: "block mb-1", children: [
|
|
514
|
+
/* @__PURE__ */ jsx14("span", { className: "text-sm font-medium ", children: props?.attributes?.label ? props?.attributes?.label + " %" : "" }),
|
|
731
515
|
" ",
|
|
732
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
733
|
-
/* @__PURE__ */
|
|
516
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx14("span", { className: "bg-error-weak", children: "*" }),
|
|
517
|
+
/* @__PURE__ */ jsx14(
|
|
734
518
|
"input",
|
|
735
519
|
{
|
|
736
520
|
type: "number",
|
|
@@ -749,14 +533,14 @@ var PercentageInput = (props) => {
|
|
|
749
533
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm number-input"
|
|
750
534
|
}
|
|
751
535
|
),
|
|
752
|
-
/* @__PURE__ */
|
|
536
|
+
/* @__PURE__ */ jsx14("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
753
537
|
] }) });
|
|
754
538
|
};
|
|
755
539
|
var PercentageInput_default = PercentageInput;
|
|
756
540
|
|
|
757
541
|
// src/components/controls/edit/PhoneInput.tsx
|
|
758
|
-
import
|
|
759
|
-
import { jsx as
|
|
542
|
+
import React15 from "react";
|
|
543
|
+
import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
760
544
|
var PhoneInput = (props) => {
|
|
761
545
|
const textChangeHandler = (event) => {
|
|
762
546
|
const text = event.target.value;
|
|
@@ -775,13 +559,13 @@ var PhoneInput = (props) => {
|
|
|
775
559
|
if (props.value !== void 0 && props.value !== null) {
|
|
776
560
|
value = props.value;
|
|
777
561
|
}
|
|
778
|
-
return /* @__PURE__ */
|
|
779
|
-
/* @__PURE__ */
|
|
562
|
+
return /* @__PURE__ */ jsx15(React15.Fragment, { children: /* @__PURE__ */ jsxs10("label", { className: "block mb-1", children: [
|
|
563
|
+
/* @__PURE__ */ jsx15("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
780
564
|
" ",
|
|
781
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
782
|
-
/* @__PURE__ */
|
|
783
|
-
/* @__PURE__ */
|
|
784
|
-
/* @__PURE__ */
|
|
565
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx15("span", { className: "bg-error-weak", children: "*" }),
|
|
566
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex items-center rounded border ", children: [
|
|
567
|
+
/* @__PURE__ */ jsx15("span", { className: "px-3", children: props.prefix }),
|
|
568
|
+
/* @__PURE__ */ jsx15(
|
|
785
569
|
"input",
|
|
786
570
|
{
|
|
787
571
|
type: "text",
|
|
@@ -799,14 +583,14 @@ var PhoneInput = (props) => {
|
|
|
799
583
|
}
|
|
800
584
|
)
|
|
801
585
|
] }),
|
|
802
|
-
/* @__PURE__ */
|
|
586
|
+
/* @__PURE__ */ jsx15("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
803
587
|
] }) });
|
|
804
588
|
};
|
|
805
589
|
var PhoneInput_default = PhoneInput;
|
|
806
590
|
|
|
807
591
|
// src/components/controls/edit/NumberInput.tsx
|
|
808
|
-
import
|
|
809
|
-
import { jsx as
|
|
592
|
+
import React16 from "react";
|
|
593
|
+
import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
810
594
|
var NumberInput = (props) => {
|
|
811
595
|
const textChangeHandler = (event) => {
|
|
812
596
|
const text = event.target.value;
|
|
@@ -829,11 +613,11 @@ var NumberInput = (props) => {
|
|
|
829
613
|
if (props.value !== void 0 && props.value !== null) {
|
|
830
614
|
value = props.value;
|
|
831
615
|
}
|
|
832
|
-
return /* @__PURE__ */
|
|
833
|
-
props?.attributes?.label && /* @__PURE__ */
|
|
616
|
+
return /* @__PURE__ */ jsx16(React16.Fragment, { children: /* @__PURE__ */ jsxs11("label", { className: "block", children: [
|
|
617
|
+
props?.attributes?.label && /* @__PURE__ */ jsx16("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
834
618
|
" ",
|
|
835
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
836
|
-
/* @__PURE__ */
|
|
619
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx16("span", { className: "bg-error-weak", children: "*" }),
|
|
620
|
+
/* @__PURE__ */ jsx16(
|
|
837
621
|
"input",
|
|
838
622
|
{
|
|
839
623
|
type: "number",
|
|
@@ -852,14 +636,14 @@ var NumberInput = (props) => {
|
|
|
852
636
|
className: "peer py-1.5 block w-full rounded shadow-sm number-input input\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
853
637
|
}
|
|
854
638
|
),
|
|
855
|
-
/* @__PURE__ */
|
|
639
|
+
/* @__PURE__ */ jsx16("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
856
640
|
] }) });
|
|
857
641
|
};
|
|
858
642
|
var NumberInput_default = NumberInput;
|
|
859
643
|
|
|
860
644
|
// src/components/controls/edit/CheckboxInput.tsx
|
|
861
|
-
import
|
|
862
|
-
import { jsx as
|
|
645
|
+
import React17 from "react";
|
|
646
|
+
import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
863
647
|
var CheckboxInput = (props) => {
|
|
864
648
|
const textChangeHandler = (event) => {
|
|
865
649
|
let text = event.target.checked;
|
|
@@ -876,11 +660,11 @@ var CheckboxInput = (props) => {
|
|
|
876
660
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
877
661
|
value = true;
|
|
878
662
|
}
|
|
879
|
-
return /* @__PURE__ */
|
|
880
|
-
/* @__PURE__ */
|
|
663
|
+
return /* @__PURE__ */ jsx17(React17.Fragment, { children: /* @__PURE__ */ jsxs12("label", { className: "inline-block mb-1", children: [
|
|
664
|
+
/* @__PURE__ */ jsx17("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
881
665
|
" ",
|
|
882
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
883
|
-
/* @__PURE__ */
|
|
666
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx17("span", { className: "bg-error-weak", children: "*" }),
|
|
667
|
+
/* @__PURE__ */ jsx17(
|
|
884
668
|
"input",
|
|
885
669
|
{
|
|
886
670
|
type: "checkbox",
|
|
@@ -897,14 +681,14 @@ var CheckboxInput = (props) => {
|
|
|
897
681
|
className: "peer mt-1 py-1.5 block rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
898
682
|
}
|
|
899
683
|
),
|
|
900
|
-
/* @__PURE__ */
|
|
684
|
+
/* @__PURE__ */ jsx17("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
901
685
|
] }) });
|
|
902
686
|
};
|
|
903
687
|
var CheckboxInput_default = CheckboxInput;
|
|
904
688
|
|
|
905
689
|
// src/components/controls/edit/OtpInput.tsx
|
|
906
|
-
import
|
|
907
|
-
import { jsx as
|
|
690
|
+
import React18 from "react";
|
|
691
|
+
import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
908
692
|
var OtpInput = (props) => {
|
|
909
693
|
const textChangeHandler = (event) => {
|
|
910
694
|
const text = event.target.value;
|
|
@@ -926,11 +710,11 @@ var OtpInput = (props) => {
|
|
|
926
710
|
if (props.value !== void 0 && props.value !== null) {
|
|
927
711
|
value = props.value;
|
|
928
712
|
}
|
|
929
|
-
return /* @__PURE__ */
|
|
930
|
-
/* @__PURE__ */
|
|
713
|
+
return /* @__PURE__ */ jsx18(React18.Fragment, { children: /* @__PURE__ */ jsxs13("label", { htmlFor: props.name, className: "block mb-1 w-full", children: [
|
|
714
|
+
/* @__PURE__ */ jsx18("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
931
715
|
" ",
|
|
932
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
933
|
-
/* @__PURE__ */
|
|
716
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx18("span", { className: "bg-error-weak", children: "*" }),
|
|
717
|
+
/* @__PURE__ */ jsx18(
|
|
934
718
|
"input",
|
|
935
719
|
{
|
|
936
720
|
type: "text",
|
|
@@ -950,14 +734,14 @@ var OtpInput = (props) => {
|
|
|
950
734
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm tracking-[1.25em] text-center"
|
|
951
735
|
}
|
|
952
736
|
),
|
|
953
|
-
/* @__PURE__ */
|
|
737
|
+
/* @__PURE__ */ jsx18("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
954
738
|
] }) });
|
|
955
739
|
};
|
|
956
740
|
var OtpInput_default = OtpInput;
|
|
957
741
|
|
|
958
742
|
// src/components/controls/edit/DateTimeInput.tsx
|
|
959
|
-
import
|
|
960
|
-
import { jsx as
|
|
743
|
+
import React19 from "react";
|
|
744
|
+
import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
961
745
|
var DateTimeInput = (props) => {
|
|
962
746
|
const textChangeHandler = (event) => {
|
|
963
747
|
const localDate = new Date(event.target.value);
|
|
@@ -989,12 +773,12 @@ var DateTimeInput = (props) => {
|
|
|
989
773
|
e.preventDefault();
|
|
990
774
|
}
|
|
991
775
|
};
|
|
992
|
-
return /* @__PURE__ */
|
|
993
|
-
/* @__PURE__ */
|
|
776
|
+
return /* @__PURE__ */ jsx19(React19.Fragment, { children: /* @__PURE__ */ jsxs14("label", { className: "block mb-1", children: [
|
|
777
|
+
/* @__PURE__ */ jsx19("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
994
778
|
" ",
|
|
995
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
996
|
-
/* @__PURE__ */
|
|
997
|
-
/* @__PURE__ */
|
|
779
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx19("span", { className: "bg-error-weak", children: "*" }),
|
|
780
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-2", children: [
|
|
781
|
+
/* @__PURE__ */ jsx19(
|
|
998
782
|
"input",
|
|
999
783
|
{
|
|
1000
784
|
type: "datetime-local",
|
|
@@ -1012,18 +796,18 @@ var DateTimeInput = (props) => {
|
|
|
1012
796
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
1013
797
|
}
|
|
1014
798
|
),
|
|
1015
|
-
/* @__PURE__ */
|
|
799
|
+
/* @__PURE__ */ jsx19("span", { children: timeZoneAbbr })
|
|
1016
800
|
] }),
|
|
1017
|
-
/* @__PURE__ */
|
|
801
|
+
/* @__PURE__ */ jsx19("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1018
802
|
] }) });
|
|
1019
803
|
};
|
|
1020
804
|
var DateTimeInput_default = DateTimeInput;
|
|
1021
805
|
|
|
1022
806
|
// src/components/controls/edit/ColorInput.tsx
|
|
1023
|
-
import
|
|
1024
|
-
import { jsx as
|
|
807
|
+
import React20, { useEffect as useEffect2 } from "react";
|
|
808
|
+
import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1025
809
|
var ColorInput = (props) => {
|
|
1026
|
-
const [color, setColor] =
|
|
810
|
+
const [color, setColor] = React20.useState("#3b82f6");
|
|
1027
811
|
useEffect2(() => {
|
|
1028
812
|
if (props.value !== void 0 && props.value !== null) {
|
|
1029
813
|
if (typeof props.value === "string") {
|
|
@@ -1043,11 +827,11 @@ var ColorInput = (props) => {
|
|
|
1043
827
|
});
|
|
1044
828
|
}
|
|
1045
829
|
};
|
|
1046
|
-
return /* @__PURE__ */
|
|
1047
|
-
/* @__PURE__ */
|
|
830
|
+
return /* @__PURE__ */ jsxs15("label", { className: "block mb-1", children: [
|
|
831
|
+
/* @__PURE__ */ jsx20("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
1048
832
|
" ",
|
|
1049
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1050
|
-
/* @__PURE__ */
|
|
833
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx20("span", { className: "bg-error-weak", children: "*" }),
|
|
834
|
+
/* @__PURE__ */ jsx20(
|
|
1051
835
|
"input",
|
|
1052
836
|
{
|
|
1053
837
|
type: "color",
|
|
@@ -1060,14 +844,14 @@ var ColorInput = (props) => {
|
|
|
1060
844
|
className: `w-[78px] h-12 block cursor-pointer`
|
|
1061
845
|
}
|
|
1062
846
|
),
|
|
1063
|
-
props?.attributes?.errorMessage && /* @__PURE__ */
|
|
847
|
+
props?.attributes?.errorMessage && /* @__PURE__ */ jsx20("p", { className: "mt-1 bg-error-weak text-sm", children: props.attributes.errorMessage })
|
|
1064
848
|
] });
|
|
1065
849
|
};
|
|
1066
850
|
var ColorInput_default = ColorInput;
|
|
1067
851
|
|
|
1068
852
|
// src/components/controls/edit/SelectWithSearchInput.tsx
|
|
1069
853
|
import { useEffect as useEffect3, useRef, useState as useState2 } from "react";
|
|
1070
|
-
import { jsx as
|
|
854
|
+
import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1071
855
|
var SelectWithSearchInput = (props) => {
|
|
1072
856
|
const [isOpen, setIsOpen] = useState2(false);
|
|
1073
857
|
const [searchTerm, setSearchTerm] = useState2("");
|
|
@@ -1138,15 +922,15 @@ var SelectWithSearchInput = (props) => {
|
|
|
1138
922
|
});
|
|
1139
923
|
}
|
|
1140
924
|
}, [highlightedIndex]);
|
|
1141
|
-
return /* @__PURE__ */
|
|
1142
|
-
/* @__PURE__ */
|
|
925
|
+
return /* @__PURE__ */ jsxs16("div", { className: "relative", children: [
|
|
926
|
+
/* @__PURE__ */ jsxs16("label", { children: [
|
|
1143
927
|
props.attributes?.label,
|
|
1144
928
|
" ",
|
|
1145
929
|
" ",
|
|
1146
|
-
props?.attributes?.required && /* @__PURE__ */
|
|
930
|
+
props?.attributes?.required && /* @__PURE__ */ jsx21("span", { className: "bg-error-weak", children: "*" })
|
|
1147
931
|
] }),
|
|
1148
|
-
/* @__PURE__ */
|
|
1149
|
-
/* @__PURE__ */
|
|
932
|
+
/* @__PURE__ */ jsxs16("div", { className: "relative", children: [
|
|
933
|
+
/* @__PURE__ */ jsx21(
|
|
1150
934
|
"input",
|
|
1151
935
|
{
|
|
1152
936
|
type: "text",
|
|
@@ -1162,13 +946,13 @@ var SelectWithSearchInput = (props) => {
|
|
|
1162
946
|
className: "peer py-1.5 select block w-full text-black rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
1163
947
|
}
|
|
1164
948
|
),
|
|
1165
|
-
/* @__PURE__ */
|
|
949
|
+
/* @__PURE__ */ jsx21(
|
|
1166
950
|
"button",
|
|
1167
951
|
{
|
|
1168
952
|
type: "button",
|
|
1169
953
|
onClick: () => setIsOpen(!isOpen),
|
|
1170
954
|
className: "absolute right-2 top-3 h-5 w-5 text-gray-500 focus:outline-none",
|
|
1171
|
-
children: /* @__PURE__ */
|
|
955
|
+
children: /* @__PURE__ */ jsx21(
|
|
1172
956
|
"svg",
|
|
1173
957
|
{
|
|
1174
958
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1177,7 +961,7 @@ var SelectWithSearchInput = (props) => {
|
|
|
1177
961
|
strokeWidth: 1.5,
|
|
1178
962
|
stroke: "currentColor",
|
|
1179
963
|
className: "w-full h-full",
|
|
1180
|
-
children: /* @__PURE__ */
|
|
964
|
+
children: /* @__PURE__ */ jsx21(
|
|
1181
965
|
"path",
|
|
1182
966
|
{
|
|
1183
967
|
strokeLinecap: "round",
|
|
@@ -1190,12 +974,12 @@ var SelectWithSearchInput = (props) => {
|
|
|
1190
974
|
}
|
|
1191
975
|
)
|
|
1192
976
|
] }),
|
|
1193
|
-
isOpen && /* @__PURE__ */
|
|
977
|
+
isOpen && /* @__PURE__ */ jsx21(
|
|
1194
978
|
"div",
|
|
1195
979
|
{
|
|
1196
980
|
ref: dropdownRef,
|
|
1197
981
|
className: "absolute z-10 mt-2 w-full bg-white border border-gray-200 rounded-md shadow-lg max-h-48 overflow-y-auto",
|
|
1198
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */
|
|
982
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ jsx21(
|
|
1199
983
|
"button",
|
|
1200
984
|
{
|
|
1201
985
|
onClick: (e) => handleSelect(e, item),
|
|
@@ -1203,10 +987,10 @@ var SelectWithSearchInput = (props) => {
|
|
|
1203
987
|
role: "option",
|
|
1204
988
|
tabIndex: -1,
|
|
1205
989
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1206
|
-
children: /* @__PURE__ */
|
|
990
|
+
children: /* @__PURE__ */ jsx21("span", { children: item[props.dataTextFieldName] })
|
|
1207
991
|
},
|
|
1208
992
|
item[props.dataKeyFieldName]
|
|
1209
|
-
)) : /* @__PURE__ */
|
|
993
|
+
)) : /* @__PURE__ */ jsx21("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1210
994
|
}
|
|
1211
995
|
)
|
|
1212
996
|
] });
|
|
@@ -1214,13 +998,13 @@ var SelectWithSearchInput = (props) => {
|
|
|
1214
998
|
var SelectWithSearchInput_default = SelectWithSearchInput;
|
|
1215
999
|
|
|
1216
1000
|
// src/components/controls/edit/SelectWithSearchPanel.tsx
|
|
1217
|
-
import
|
|
1001
|
+
import React22, {
|
|
1218
1002
|
useEffect as useEffect4,
|
|
1219
1003
|
useRef as useRef2,
|
|
1220
1004
|
useState as useState3,
|
|
1221
1005
|
useCallback
|
|
1222
1006
|
} from "react";
|
|
1223
|
-
import { jsx as
|
|
1007
|
+
import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1224
1008
|
var SelectWithSearchPanel = (props) => {
|
|
1225
1009
|
const [isOpen, setIsOpen] = useState3(false);
|
|
1226
1010
|
const [searchTerm, setSearchTerm] = useState3("");
|
|
@@ -1356,14 +1140,14 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1356
1140
|
console.log("Form Data:", formData);
|
|
1357
1141
|
return formData;
|
|
1358
1142
|
}, []);
|
|
1359
|
-
return /* @__PURE__ */
|
|
1360
|
-
/* @__PURE__ */
|
|
1143
|
+
return /* @__PURE__ */ jsxs17("div", { className: "relative", children: [
|
|
1144
|
+
/* @__PURE__ */ jsxs17("label", { className: "text-sm mb-1 font-medium", children: [
|
|
1361
1145
|
props.attributes?.label,
|
|
1362
1146
|
" ",
|
|
1363
1147
|
" ",
|
|
1364
|
-
props?.attributes?.required && /* @__PURE__ */
|
|
1148
|
+
props?.attributes?.required && /* @__PURE__ */ jsx22("span", { className: "bg-error-weak", children: "*" })
|
|
1365
1149
|
] }),
|
|
1366
|
-
/* @__PURE__ */
|
|
1150
|
+
/* @__PURE__ */ jsx22("div", { children: /* @__PURE__ */ jsx22(
|
|
1367
1151
|
"input",
|
|
1368
1152
|
{
|
|
1369
1153
|
type: "text",
|
|
@@ -1377,14 +1161,14 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1377
1161
|
disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none`
|
|
1378
1162
|
}
|
|
1379
1163
|
) }),
|
|
1380
|
-
/* @__PURE__ */
|
|
1381
|
-
/* @__PURE__ */
|
|
1382
|
-
/* @__PURE__ */
|
|
1164
|
+
/* @__PURE__ */ jsx22("div", { ref: containerRef, children: isOpen && /* @__PURE__ */ jsxs17(React22.Fragment, { children: [
|
|
1165
|
+
/* @__PURE__ */ jsxs17("div", { className: "fixed z-50 right-0 bg-white top-[62px] w-1/4 border-l border-gray-200", children: [
|
|
1166
|
+
/* @__PURE__ */ jsx22("div", { className: "flex flex-col p-2 bg-accent-950 text-white", children: /* @__PURE__ */ jsxs17("h5", { className: "text-md text-white font-medium", children: [
|
|
1383
1167
|
"Select a",
|
|
1384
1168
|
" ",
|
|
1385
1169
|
props.attributes?.label || props.attributes?.heading
|
|
1386
1170
|
] }) }),
|
|
1387
|
-
/* @__PURE__ */
|
|
1171
|
+
/* @__PURE__ */ jsx22("div", { className: "flex justify-end px-4 border-b py-2 border-gray-200 h-10", children: props.createFields && props.createFields.length > 0 && /* @__PURE__ */ jsx22(
|
|
1388
1172
|
"button",
|
|
1389
1173
|
{
|
|
1390
1174
|
type: "button",
|
|
@@ -1397,12 +1181,12 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1397
1181
|
}
|
|
1398
1182
|
) })
|
|
1399
1183
|
] }),
|
|
1400
|
-
isCreateOpen && /* @__PURE__ */
|
|
1401
|
-
/* @__PURE__ */
|
|
1184
|
+
isCreateOpen && /* @__PURE__ */ jsxs17("div", { className: "fixed right-0 w-1/4 h-full top-[62px] bg-white shadow-lg border-l border-gray-200 z-50", children: [
|
|
1185
|
+
/* @__PURE__ */ jsx22("div", { className: "flex flex-col p-2 bg-accent-950", children: /* @__PURE__ */ jsxs17("h5", { className: "text-md font-medium text-white", children: [
|
|
1402
1186
|
"Create New ",
|
|
1403
1187
|
props.attributes?.label
|
|
1404
1188
|
] }) }),
|
|
1405
|
-
/* @__PURE__ */
|
|
1189
|
+
/* @__PURE__ */ jsx22("div", { className: "flex justify-end px-4 border-b py-2 border-gray-200", children: /* @__PURE__ */ jsx22(
|
|
1406
1190
|
"button",
|
|
1407
1191
|
{
|
|
1408
1192
|
type: "button",
|
|
@@ -1411,10 +1195,10 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1411
1195
|
children: "Close"
|
|
1412
1196
|
}
|
|
1413
1197
|
) }),
|
|
1414
|
-
/* @__PURE__ */
|
|
1415
|
-
props.createFields?.map((field) => /* @__PURE__ */
|
|
1416
|
-
/* @__PURE__ */
|
|
1417
|
-
/* @__PURE__ */
|
|
1198
|
+
/* @__PURE__ */ jsxs17("div", { className: "p-4", children: [
|
|
1199
|
+
props.createFields?.map((field) => /* @__PURE__ */ jsxs17("div", { className: "mb-4", children: [
|
|
1200
|
+
/* @__PURE__ */ jsx22("label", { className: "text-sm mb-1 font-medium block", children: field.label }),
|
|
1201
|
+
/* @__PURE__ */ jsx22(
|
|
1418
1202
|
"input",
|
|
1419
1203
|
{
|
|
1420
1204
|
type: field.type,
|
|
@@ -1430,7 +1214,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1430
1214
|
}
|
|
1431
1215
|
)
|
|
1432
1216
|
] }, field.name)),
|
|
1433
|
-
/* @__PURE__ */
|
|
1217
|
+
/* @__PURE__ */ jsxs17(Button_default, { onClick: async () => {
|
|
1434
1218
|
handleSaveModal();
|
|
1435
1219
|
return { isSuccessful: true };
|
|
1436
1220
|
}, className: "w-full", children: [
|
|
@@ -1439,13 +1223,13 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1439
1223
|
] })
|
|
1440
1224
|
] })
|
|
1441
1225
|
] }),
|
|
1442
|
-
/* @__PURE__ */
|
|
1226
|
+
/* @__PURE__ */ jsx22(
|
|
1443
1227
|
"div",
|
|
1444
1228
|
{
|
|
1445
1229
|
ref: listRef,
|
|
1446
1230
|
className: "fixed z-10 right-0 mt-[130px] top-0 w-1/4 bg-white border-l border-gray-200 shadow-lg overflow-y-auto",
|
|
1447
1231
|
style: { height: "calc(100vh - 130px)" },
|
|
1448
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */
|
|
1232
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ jsx22("div", { children: /* @__PURE__ */ jsx22(
|
|
1449
1233
|
"button",
|
|
1450
1234
|
{
|
|
1451
1235
|
onClick: (e) => {
|
|
@@ -1455,9 +1239,9 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1455
1239
|
role: "option",
|
|
1456
1240
|
tabIndex: -1,
|
|
1457
1241
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1458
|
-
children: /* @__PURE__ */
|
|
1242
|
+
children: /* @__PURE__ */ jsx22("span", { children: getNestedValue3(item, props.dataTextFieldName) })
|
|
1459
1243
|
}
|
|
1460
|
-
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */
|
|
1244
|
+
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ jsx22("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1461
1245
|
}
|
|
1462
1246
|
)
|
|
1463
1247
|
] }) })
|
|
@@ -1466,11 +1250,11 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1466
1250
|
var SelectWithSearchPanel_default = SelectWithSearchPanel;
|
|
1467
1251
|
|
|
1468
1252
|
// src/components/controls/edit/BooleanSelect.tsx
|
|
1469
|
-
import
|
|
1253
|
+
import React23, {
|
|
1470
1254
|
useState as useState4,
|
|
1471
1255
|
useEffect as useEffect5
|
|
1472
1256
|
} from "react";
|
|
1473
|
-
import { jsx as
|
|
1257
|
+
import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1474
1258
|
var BooleanSelect = (props) => {
|
|
1475
1259
|
const [list, setList] = useState4();
|
|
1476
1260
|
const textChangeHandler = (event) => {
|
|
@@ -1519,11 +1303,11 @@ var BooleanSelect = (props) => {
|
|
|
1519
1303
|
if (props.value !== void 0 && props.value !== null) {
|
|
1520
1304
|
value = props.value;
|
|
1521
1305
|
}
|
|
1522
|
-
return /* @__PURE__ */
|
|
1523
|
-
/* @__PURE__ */
|
|
1306
|
+
return /* @__PURE__ */ jsx23(React23.Fragment, { children: /* @__PURE__ */ jsxs18("label", { className: "block", children: [
|
|
1307
|
+
/* @__PURE__ */ jsx23("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1524
1308
|
" ",
|
|
1525
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1526
|
-
/* @__PURE__ */
|
|
1309
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx23("span", { className: "bg-error-weak", children: "*" }),
|
|
1310
|
+
/* @__PURE__ */ jsxs18(
|
|
1527
1311
|
"select",
|
|
1528
1312
|
{
|
|
1529
1313
|
name: props.name,
|
|
@@ -1535,9 +1319,9 @@ var BooleanSelect = (props) => {
|
|
|
1535
1319
|
disabled: props?.attributes?.readOnly,
|
|
1536
1320
|
className: "peer mt-1 py-1.5 block w-full text-black rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n ",
|
|
1537
1321
|
children: [
|
|
1538
|
-
/* @__PURE__ */
|
|
1322
|
+
/* @__PURE__ */ jsx23("option", { className: "", value: "", children: props.attributes?.placeholder || "Select" }),
|
|
1539
1323
|
list && list.map((item, i) => {
|
|
1540
|
-
return /* @__PURE__ */
|
|
1324
|
+
return /* @__PURE__ */ jsx23(
|
|
1541
1325
|
"option",
|
|
1542
1326
|
{
|
|
1543
1327
|
className: "fac-select-option",
|
|
@@ -1550,14 +1334,14 @@ var BooleanSelect = (props) => {
|
|
|
1550
1334
|
]
|
|
1551
1335
|
}
|
|
1552
1336
|
),
|
|
1553
|
-
/* @__PURE__ */
|
|
1337
|
+
/* @__PURE__ */ jsx23("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1554
1338
|
] }) });
|
|
1555
1339
|
};
|
|
1556
1340
|
var BooleanSelect_default = BooleanSelect;
|
|
1557
1341
|
|
|
1558
1342
|
// src/components/controls/edit/EmailInput.tsx
|
|
1559
|
-
import
|
|
1560
|
-
import { jsx as
|
|
1343
|
+
import React24 from "react";
|
|
1344
|
+
import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1561
1345
|
var EmailInput = (props) => {
|
|
1562
1346
|
const textChangeHandler = (event) => {
|
|
1563
1347
|
const text = event.target.value;
|
|
@@ -1582,11 +1366,11 @@ var EmailInput = (props) => {
|
|
|
1582
1366
|
if (props.value !== void 0 && props.value !== null) {
|
|
1583
1367
|
value = props.value;
|
|
1584
1368
|
}
|
|
1585
|
-
return /* @__PURE__ */
|
|
1586
|
-
/* @__PURE__ */
|
|
1369
|
+
return /* @__PURE__ */ jsx24(React24.Fragment, { children: /* @__PURE__ */ jsxs19("label", { className: "block mb-1", children: [
|
|
1370
|
+
/* @__PURE__ */ jsx24("span", { className: "text-sm font-medium text-slate-700", children: props?.attributes?.label }),
|
|
1587
1371
|
" ",
|
|
1588
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1589
|
-
/* @__PURE__ */
|
|
1372
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx24("span", { className: "bg-error-weak", children: "*" }),
|
|
1373
|
+
/* @__PURE__ */ jsx24(
|
|
1590
1374
|
"input",
|
|
1591
1375
|
{
|
|
1592
1376
|
type: "email",
|
|
@@ -1602,14 +1386,14 @@ var EmailInput = (props) => {
|
|
|
1602
1386
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n transition-all duration-500 ease-in-out"
|
|
1603
1387
|
}
|
|
1604
1388
|
),
|
|
1605
|
-
/* @__PURE__ */
|
|
1389
|
+
/* @__PURE__ */ jsx24("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 mb-0 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1606
1390
|
] }) });
|
|
1607
1391
|
};
|
|
1608
1392
|
var EmailInput_default = EmailInput;
|
|
1609
1393
|
|
|
1610
1394
|
// src/components/controls/edit/TimeInput.tsx
|
|
1611
|
-
import
|
|
1612
|
-
import { jsx as
|
|
1395
|
+
import React25 from "react";
|
|
1396
|
+
import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1613
1397
|
var TimeInput = (props) => {
|
|
1614
1398
|
const timeChangeHandler = (event) => {
|
|
1615
1399
|
const timeValue = event.target.value;
|
|
@@ -1622,11 +1406,11 @@ var TimeInput = (props) => {
|
|
|
1622
1406
|
});
|
|
1623
1407
|
}
|
|
1624
1408
|
};
|
|
1625
|
-
return /* @__PURE__ */
|
|
1626
|
-
/* @__PURE__ */
|
|
1409
|
+
return /* @__PURE__ */ jsx25(React25.Fragment, { children: /* @__PURE__ */ jsxs20("label", { className: "block mb-1", children: [
|
|
1410
|
+
/* @__PURE__ */ jsx25("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
1627
1411
|
" ",
|
|
1628
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1629
|
-
/* @__PURE__ */
|
|
1412
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx25("span", { className: "bg-error-weak", children: "*" }),
|
|
1413
|
+
/* @__PURE__ */ jsx25("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx25(
|
|
1630
1414
|
"input",
|
|
1631
1415
|
{
|
|
1632
1416
|
type: "time",
|
|
@@ -1639,13 +1423,13 @@ var TimeInput = (props) => {
|
|
|
1639
1423
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none"
|
|
1640
1424
|
}
|
|
1641
1425
|
) }),
|
|
1642
|
-
/* @__PURE__ */
|
|
1426
|
+
/* @__PURE__ */ jsx25("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ?? "" })
|
|
1643
1427
|
] }) });
|
|
1644
1428
|
};
|
|
1645
1429
|
var TimeInput_default = TimeInput;
|
|
1646
1430
|
|
|
1647
1431
|
// src/components/controls/edit/AssetUpload.tsx
|
|
1648
|
-
import
|
|
1432
|
+
import React26, { useEffect as useEffect6 } from "react";
|
|
1649
1433
|
|
|
1650
1434
|
// src/components/utilities/AssetUtility.tsx
|
|
1651
1435
|
var AssetUtility = class {
|
|
@@ -1670,7 +1454,7 @@ var AssetUtility_default = AssetUtility;
|
|
|
1670
1454
|
|
|
1671
1455
|
// src/components/dataForm/Hyperlink.tsx
|
|
1672
1456
|
import Link from "next/link";
|
|
1673
|
-
import { Fragment, jsx as
|
|
1457
|
+
import { Fragment, jsx as jsx26 } from "react/jsx-runtime";
|
|
1674
1458
|
function Hyperlink(props) {
|
|
1675
1459
|
let linkClass = props.linkType ? buttonClasses.get(props.linkType) : buttonClasses.get("Link" /* Link */);
|
|
1676
1460
|
const target = props?.href?.startsWith("http") ? "_blank" : "_self";
|
|
@@ -1678,7 +1462,7 @@ function Hyperlink(props) {
|
|
|
1678
1462
|
if (target == "_blank") {
|
|
1679
1463
|
additionalProps.rel = "noopener noreferrer";
|
|
1680
1464
|
}
|
|
1681
|
-
return /* @__PURE__ */
|
|
1465
|
+
return /* @__PURE__ */ jsx26(Fragment, { children: props.href ? /* @__PURE__ */ jsx26(
|
|
1682
1466
|
Link,
|
|
1683
1467
|
{
|
|
1684
1468
|
href: props.href,
|
|
@@ -1688,34 +1472,34 @@ function Hyperlink(props) {
|
|
|
1688
1472
|
target,
|
|
1689
1473
|
children: props.children
|
|
1690
1474
|
}
|
|
1691
|
-
) : props.isHeading ? /* @__PURE__ */
|
|
1475
|
+
) : props.isHeading ? /* @__PURE__ */ jsx26("h5", { className: props.className + "inline-block", children: props.children }) : /* @__PURE__ */ jsx26("span", { className: props.className, children: props.children }) });
|
|
1692
1476
|
}
|
|
1693
1477
|
|
|
1694
1478
|
// src/svg/chevron-updown.tsx
|
|
1695
|
-
import { jsx as
|
|
1479
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1696
1480
|
var ChevronUpDown = (props) => {
|
|
1697
|
-
return /* @__PURE__ */
|
|
1481
|
+
return /* @__PURE__ */ jsx27("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx27("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" }) });
|
|
1698
1482
|
};
|
|
1699
1483
|
var chevron_updown_default = ChevronUpDown;
|
|
1700
1484
|
|
|
1701
1485
|
// src/svg/chevron-down.tsx
|
|
1702
|
-
import { jsx as
|
|
1486
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1703
1487
|
var ChevronDown = (props) => {
|
|
1704
|
-
return /* @__PURE__ */
|
|
1488
|
+
return /* @__PURE__ */ jsx28("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx28("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) });
|
|
1705
1489
|
};
|
|
1706
1490
|
var chevron_down_default = ChevronDown;
|
|
1707
1491
|
|
|
1708
1492
|
// src/svg/chevron-up.tsx
|
|
1709
|
-
import { jsx as
|
|
1493
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1710
1494
|
var ChevronUp = (props) => {
|
|
1711
|
-
return /* @__PURE__ */
|
|
1495
|
+
return /* @__PURE__ */ jsx29("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx29("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 15.75l7.5-7.5 7.5 7.5" }) });
|
|
1712
1496
|
};
|
|
1713
1497
|
var chevron_up_default = ChevronUp;
|
|
1714
1498
|
|
|
1715
1499
|
// src/svg/plus.tsx
|
|
1716
|
-
import { jsx as
|
|
1500
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1717
1501
|
var Plus = (props) => {
|
|
1718
|
-
return /* @__PURE__ */
|
|
1502
|
+
return /* @__PURE__ */ jsx30("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx30("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) });
|
|
1719
1503
|
};
|
|
1720
1504
|
var plus_default = Plus;
|
|
1721
1505
|
|
|
@@ -1729,19 +1513,19 @@ var Icons = {
|
|
|
1729
1513
|
var Icons_default = Icons;
|
|
1730
1514
|
|
|
1731
1515
|
// src/svg/Icon.tsx
|
|
1732
|
-
import { jsx as
|
|
1516
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1733
1517
|
var Icon = ({ name, className, ...props }) => {
|
|
1734
1518
|
const IconComponent = Icons_default[name];
|
|
1735
1519
|
if (!IconComponent) {
|
|
1736
1520
|
console.error(`Icon "${name}" not found.`);
|
|
1737
1521
|
return null;
|
|
1738
1522
|
}
|
|
1739
|
-
return /* @__PURE__ */
|
|
1523
|
+
return /* @__PURE__ */ jsx31(IconComponent, { ...props, className });
|
|
1740
1524
|
};
|
|
1741
1525
|
var Icon_default = Icon;
|
|
1742
1526
|
|
|
1743
1527
|
// src/components/controls/edit/AssetUpload.tsx
|
|
1744
|
-
import { jsx as
|
|
1528
|
+
import { jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1745
1529
|
var AssetUpload = (props) => {
|
|
1746
1530
|
const isDisabled = props.attributes?.disable ?? false;
|
|
1747
1531
|
let allValues = [];
|
|
@@ -1762,7 +1546,7 @@ var AssetUpload = (props) => {
|
|
|
1762
1546
|
}
|
|
1763
1547
|
return "image";
|
|
1764
1548
|
};
|
|
1765
|
-
const [assetType, setAssetType] =
|
|
1549
|
+
const [assetType, setAssetType] = React26.useState(getInitialTab);
|
|
1766
1550
|
useEffect6(() => {
|
|
1767
1551
|
setAssetType(getInitialTab());
|
|
1768
1552
|
}, [props.value]);
|
|
@@ -1838,10 +1622,10 @@ var AssetUpload = (props) => {
|
|
|
1838
1622
|
}
|
|
1839
1623
|
return false;
|
|
1840
1624
|
};
|
|
1841
|
-
return /* @__PURE__ */
|
|
1842
|
-
/* @__PURE__ */
|
|
1843
|
-
/* @__PURE__ */
|
|
1844
|
-
/* @__PURE__ */
|
|
1625
|
+
return /* @__PURE__ */ jsxs21(React26.Fragment, { children: [
|
|
1626
|
+
/* @__PURE__ */ jsx32("label", { className: "block mb-1", children: /* @__PURE__ */ jsx32("span", { className: "text-sm font-medium", children: props?.attributes?.label }) }),
|
|
1627
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex gap-6 bg-neutral-100 rounded p-2", children: [
|
|
1628
|
+
/* @__PURE__ */ jsx32(
|
|
1845
1629
|
ClientButton_default,
|
|
1846
1630
|
{
|
|
1847
1631
|
className: assetType === "image" ? "px-2 py-1 rounded bg-body-200 scale-95" : "text-neutral-700",
|
|
@@ -1851,7 +1635,7 @@ var AssetUpload = (props) => {
|
|
|
1851
1635
|
children: "Image Upload"
|
|
1852
1636
|
}
|
|
1853
1637
|
),
|
|
1854
|
-
/* @__PURE__ */
|
|
1638
|
+
/* @__PURE__ */ jsx32(
|
|
1855
1639
|
ClientButton_default,
|
|
1856
1640
|
{
|
|
1857
1641
|
className: assetType === "video" ? "bg-body-200 px-2 py-1 rounded-md scale-95" : "text-neutral-700",
|
|
@@ -1862,13 +1646,13 @@ var AssetUpload = (props) => {
|
|
|
1862
1646
|
}
|
|
1863
1647
|
)
|
|
1864
1648
|
] }),
|
|
1865
|
-
shouldShowDetails() && /* @__PURE__ */
|
|
1866
|
-
/* @__PURE__ */
|
|
1867
|
-
/* @__PURE__ */
|
|
1868
|
-
/* @__PURE__ */
|
|
1869
|
-
/* @__PURE__ */
|
|
1870
|
-
/* @__PURE__ */
|
|
1871
|
-
/* @__PURE__ */
|
|
1649
|
+
shouldShowDetails() && /* @__PURE__ */ jsxs21("div", { className: "relative mt-4 rounded-md p-4 border-2 border-dotted border-gray-300 bg-gray-50", children: [
|
|
1650
|
+
/* @__PURE__ */ jsx32("span", { className: "absolute -top-2.5 left-3 bg-primary-600 text-white text-xs px-2 py-0.5 rounded-full", children: getAssetType(allValues[0]) === "video" ? "Video" : "Image" }),
|
|
1651
|
+
/* @__PURE__ */ jsx32("div", { className: "flex flex-col gap-3", children: allValues.map((digitalAsset, index) => /* @__PURE__ */ jsxs21("div", { className: "flex justify-between items-start gap-5", children: [
|
|
1652
|
+
/* @__PURE__ */ jsxs21("div", { className: "grid grid-cols-2 gap-x-8 gap-y-3 text-sm w-full", children: [
|
|
1653
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
1654
|
+
/* @__PURE__ */ jsx32("p", { className: "text-gray-500", children: "Title" }),
|
|
1655
|
+
/* @__PURE__ */ jsx32(
|
|
1872
1656
|
"input",
|
|
1873
1657
|
{
|
|
1874
1658
|
type: "text",
|
|
@@ -1880,18 +1664,18 @@ var AssetUpload = (props) => {
|
|
|
1880
1664
|
}
|
|
1881
1665
|
)
|
|
1882
1666
|
] }),
|
|
1883
|
-
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */
|
|
1884
|
-
/* @__PURE__ */
|
|
1885
|
-
/* @__PURE__ */
|
|
1667
|
+
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ jsxs21("div", { children: [
|
|
1668
|
+
/* @__PURE__ */ jsx32("p", { className: "text-gray-500", children: "Resolution" }),
|
|
1669
|
+
/* @__PURE__ */ jsxs21("p", { className: "font-medium text-gray-900 mt-3", children: [
|
|
1886
1670
|
digitalAsset.intrinsicWidth,
|
|
1887
1671
|
"\xD7",
|
|
1888
1672
|
digitalAsset.intrinsicHeight
|
|
1889
1673
|
] })
|
|
1890
1674
|
] }),
|
|
1891
|
-
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */
|
|
1892
|
-
/* @__PURE__ */
|
|
1893
|
-
/* @__PURE__ */
|
|
1894
|
-
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */
|
|
1675
|
+
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ jsxs21("div", { children: [
|
|
1676
|
+
/* @__PURE__ */ jsx32("p", { className: "text-gray-500", children: "Image / Poster" }),
|
|
1677
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex-shrink-0 flex flex-col gap-3 mt-1", children: [
|
|
1678
|
+
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ jsx32(
|
|
1895
1679
|
"img",
|
|
1896
1680
|
{
|
|
1897
1681
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.posterUrl),
|
|
@@ -1899,7 +1683,7 @@ var AssetUpload = (props) => {
|
|
|
1899
1683
|
className: "w-32 h-auto object-cover rounded border p-1"
|
|
1900
1684
|
}
|
|
1901
1685
|
),
|
|
1902
|
-
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */
|
|
1686
|
+
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ jsx32(
|
|
1903
1687
|
"img",
|
|
1904
1688
|
{
|
|
1905
1689
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.assetUrl),
|
|
@@ -1909,9 +1693,9 @@ var AssetUpload = (props) => {
|
|
|
1909
1693
|
)
|
|
1910
1694
|
] })
|
|
1911
1695
|
] }),
|
|
1912
|
-
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */
|
|
1913
|
-
/* @__PURE__ */
|
|
1914
|
-
/* @__PURE__ */
|
|
1696
|
+
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ jsxs21("div", { className: "col-span-2", children: [
|
|
1697
|
+
/* @__PURE__ */ jsx32("p", { className: "text-gray-500", children: "HLS Link" }),
|
|
1698
|
+
/* @__PURE__ */ jsx32(
|
|
1915
1699
|
Hyperlink,
|
|
1916
1700
|
{
|
|
1917
1701
|
href: digitalAsset.assetUrl,
|
|
@@ -1922,12 +1706,12 @@ var AssetUpload = (props) => {
|
|
|
1922
1706
|
)
|
|
1923
1707
|
] })
|
|
1924
1708
|
] }),
|
|
1925
|
-
/* @__PURE__ */
|
|
1709
|
+
/* @__PURE__ */ jsx32(
|
|
1926
1710
|
"span",
|
|
1927
1711
|
{
|
|
1928
1712
|
onClick: () => !isDisabled && deleteFile(index),
|
|
1929
1713
|
className: isDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
1930
|
-
children: /* @__PURE__ */
|
|
1714
|
+
children: /* @__PURE__ */ jsx32(Icon_default, { className: "w-4 h-4 text-primary", name: "delete" })
|
|
1931
1715
|
}
|
|
1932
1716
|
)
|
|
1933
1717
|
] }, index)) })
|
|
@@ -1937,8 +1721,8 @@ var AssetUpload = (props) => {
|
|
|
1937
1721
|
var AssetUpload_default = AssetUpload;
|
|
1938
1722
|
|
|
1939
1723
|
// src/components/controls/edit/InputControl.tsx
|
|
1940
|
-
import { jsx as
|
|
1941
|
-
var InputControl =
|
|
1724
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1725
|
+
var InputControl = React27.forwardRef(
|
|
1942
1726
|
(props, ref) => {
|
|
1943
1727
|
const ControlComponents = {
|
|
1944
1728
|
[InputControlType_default.lineTextInput]: LineTextInput_default,
|
|
@@ -1960,20 +1744,20 @@ var InputControl = React28.forwardRef(
|
|
|
1960
1744
|
[InputControlType_default.asset]: AssetUpload_default
|
|
1961
1745
|
};
|
|
1962
1746
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
1963
|
-
return /* @__PURE__ */
|
|
1747
|
+
return /* @__PURE__ */ jsx33(React27.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx33(SelectedControlComponent, { ...props }) : "Control not found" });
|
|
1964
1748
|
}
|
|
1965
1749
|
);
|
|
1966
1750
|
InputControl.displayName = "InputControl";
|
|
1967
1751
|
var InputControl_default = InputControl;
|
|
1968
1752
|
|
|
1969
1753
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
1970
|
-
import
|
|
1754
|
+
import React41 from "react";
|
|
1971
1755
|
|
|
1972
1756
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
1973
|
-
import
|
|
1757
|
+
import React30 from "react";
|
|
1974
1758
|
|
|
1975
1759
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
1976
|
-
import { jsx as
|
|
1760
|
+
import { jsx as jsx34, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1977
1761
|
var TextNode = (props) => {
|
|
1978
1762
|
function cssStringToJson(cssString) {
|
|
1979
1763
|
const styleObject = {};
|
|
@@ -2031,36 +1815,36 @@ var TextNode = (props) => {
|
|
|
2031
1815
|
});
|
|
2032
1816
|
}
|
|
2033
1817
|
function renderWithLineBreaks(text) {
|
|
2034
|
-
return text.split("\n").map((line, index, arr) => /* @__PURE__ */
|
|
1818
|
+
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ jsxs22("span", { children: [
|
|
2035
1819
|
line,
|
|
2036
|
-
index < arr.length - 1 && /* @__PURE__ */
|
|
1820
|
+
index < arr.length - 1 && /* @__PURE__ */ jsx34("br", {})
|
|
2037
1821
|
] }, index));
|
|
2038
1822
|
}
|
|
2039
1823
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
2040
1824
|
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
2041
1825
|
return (
|
|
2042
1826
|
// @ts-expect-error custom code
|
|
2043
|
-
/* @__PURE__ */
|
|
1827
|
+
/* @__PURE__ */ jsx34("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText })
|
|
2044
1828
|
);
|
|
2045
1829
|
};
|
|
2046
1830
|
var TextNode_default = TextNode;
|
|
2047
1831
|
|
|
2048
1832
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
2049
|
-
import { jsx as
|
|
1833
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
2050
1834
|
var LineBreakNode = () => {
|
|
2051
|
-
return /* @__PURE__ */
|
|
1835
|
+
return /* @__PURE__ */ jsx35("div", { className: "py-0.5 lg:py-1.5" });
|
|
2052
1836
|
};
|
|
2053
1837
|
var LineBreakNode_default = LineBreakNode;
|
|
2054
1838
|
|
|
2055
1839
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
2056
|
-
import
|
|
1840
|
+
import React29 from "react";
|
|
2057
1841
|
|
|
2058
1842
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
2059
|
-
import
|
|
2060
|
-
import
|
|
1843
|
+
import React28 from "react";
|
|
1844
|
+
import dynamic2 from "next/dynamic";
|
|
2061
1845
|
|
|
2062
1846
|
// src/components/DeviceAssetSelector.tsx
|
|
2063
|
-
import { jsx as
|
|
1847
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2064
1848
|
var DeviceAssetSelector = ({
|
|
2065
1849
|
assets,
|
|
2066
1850
|
assetBaseUrl,
|
|
@@ -2135,7 +1919,7 @@ var DeviceAssetSelector = ({
|
|
|
2135
1919
|
const formatClasses = FormatClass[nodeProps?.format || ""] || "";
|
|
2136
1920
|
const renderMedia = () => {
|
|
2137
1921
|
if (isHls) {
|
|
2138
|
-
return /* @__PURE__ */
|
|
1922
|
+
return /* @__PURE__ */ jsx36(
|
|
2139
1923
|
HlsPlayer_default,
|
|
2140
1924
|
{
|
|
2141
1925
|
assetUrl: resolvedAssetUrl,
|
|
@@ -2152,7 +1936,7 @@ var DeviceAssetSelector = ({
|
|
|
2152
1936
|
} else {
|
|
2153
1937
|
return (
|
|
2154
1938
|
/* eslint-disable-next-line @next/next/no-img-element */
|
|
2155
|
-
/* @__PURE__ */
|
|
1939
|
+
/* @__PURE__ */ jsx36(
|
|
2156
1940
|
"img",
|
|
2157
1941
|
{
|
|
2158
1942
|
style: styles,
|
|
@@ -2168,18 +1952,18 @@ var DeviceAssetSelector = ({
|
|
|
2168
1952
|
}
|
|
2169
1953
|
};
|
|
2170
1954
|
if (width) {
|
|
2171
|
-
return /* @__PURE__ */
|
|
1955
|
+
return /* @__PURE__ */ jsx36("div", { style: { width }, children: renderMedia() });
|
|
2172
1956
|
}
|
|
2173
1957
|
if (nodeProps?.format) {
|
|
2174
|
-
return /* @__PURE__ */
|
|
1958
|
+
return /* @__PURE__ */ jsx36("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
2175
1959
|
}
|
|
2176
1960
|
return renderMedia();
|
|
2177
1961
|
};
|
|
2178
1962
|
var DeviceAssetSelector_default = DeviceAssetSelector;
|
|
2179
1963
|
|
|
2180
1964
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
2181
|
-
import { Fragment as Fragment2, jsx as
|
|
2182
|
-
var HlsPlayer =
|
|
1965
|
+
import { Fragment as Fragment2, jsx as jsx37 } from "react/jsx-runtime";
|
|
1966
|
+
var HlsPlayer = dynamic2(() => import("./HlsPlayer-GV3FOPYT.mjs"), {
|
|
2183
1967
|
ssr: false
|
|
2184
1968
|
});
|
|
2185
1969
|
var getNestedValue = (obj, path) => {
|
|
@@ -2221,7 +2005,7 @@ var ImageNode = (props) => {
|
|
|
2221
2005
|
console.error("Error parsing assets in ImageNode:", error);
|
|
2222
2006
|
}
|
|
2223
2007
|
if (assets && assets.length > 0) {
|
|
2224
|
-
return /* @__PURE__ */
|
|
2008
|
+
return /* @__PURE__ */ jsx37(Fragment2, { children: /* @__PURE__ */ jsx37(
|
|
2225
2009
|
DeviceAssetSelector_default,
|
|
2226
2010
|
{
|
|
2227
2011
|
device: props.device,
|
|
@@ -2270,7 +2054,7 @@ var ImageNode = (props) => {
|
|
|
2270
2054
|
const isHls = imageUrl?.endsWith(".m3u8");
|
|
2271
2055
|
const renderMedia = () => {
|
|
2272
2056
|
if (isHls) {
|
|
2273
|
-
return /* @__PURE__ */
|
|
2057
|
+
return /* @__PURE__ */ jsx37(
|
|
2274
2058
|
HlsPlayer,
|
|
2275
2059
|
{
|
|
2276
2060
|
assetUrl: imageUrl,
|
|
@@ -2285,7 +2069,7 @@ var ImageNode = (props) => {
|
|
|
2285
2069
|
}
|
|
2286
2070
|
);
|
|
2287
2071
|
} else {
|
|
2288
|
-
return /* @__PURE__ */
|
|
2072
|
+
return /* @__PURE__ */ jsx37(React28.Fragment, { children: /* @__PURE__ */ jsx37(
|
|
2289
2073
|
"img",
|
|
2290
2074
|
{
|
|
2291
2075
|
style: styles,
|
|
@@ -2300,16 +2084,16 @@ var ImageNode = (props) => {
|
|
|
2300
2084
|
}
|
|
2301
2085
|
};
|
|
2302
2086
|
if (props.node.width) {
|
|
2303
|
-
return /* @__PURE__ */
|
|
2087
|
+
return /* @__PURE__ */ jsx37("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
2304
2088
|
}
|
|
2305
2089
|
return renderMedia();
|
|
2306
2090
|
};
|
|
2307
2091
|
var ImageNode_default = ImageNode;
|
|
2308
2092
|
|
|
2309
2093
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
2310
|
-
import
|
|
2311
|
-
import { Fragment as Fragment3, jsx as
|
|
2312
|
-
var LinkNodeButton =
|
|
2094
|
+
import dynamic3 from "next/dynamic";
|
|
2095
|
+
import { Fragment as Fragment3, jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2096
|
+
var LinkNodeButton = dynamic3(() => import("./LinkNodeButton-SSV4NINC.mjs"), {
|
|
2313
2097
|
ssr: false
|
|
2314
2098
|
});
|
|
2315
2099
|
var LinkNode = (props) => {
|
|
@@ -2355,13 +2139,13 @@ var LinkNode = (props) => {
|
|
|
2355
2139
|
const isButton = node.isButton === true;
|
|
2356
2140
|
const renderChildren = () => {
|
|
2357
2141
|
if (!node.children || node.children.length === 0) return null;
|
|
2358
|
-
return /* @__PURE__ */
|
|
2142
|
+
return /* @__PURE__ */ jsx38(Fragment3, { children: node.children.map((childNode, index) => {
|
|
2359
2143
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
2360
2144
|
if (!SelectedNode) {
|
|
2361
2145
|
console.warn("Unknown node type:", childNode.type);
|
|
2362
2146
|
return null;
|
|
2363
2147
|
}
|
|
2364
|
-
return /* @__PURE__ */
|
|
2148
|
+
return /* @__PURE__ */ jsx38(React29.Fragment, { children: /* @__PURE__ */ jsx38(
|
|
2365
2149
|
SelectedNode,
|
|
2366
2150
|
{
|
|
2367
2151
|
node: childNode,
|
|
@@ -2374,15 +2158,15 @@ var LinkNode = (props) => {
|
|
|
2374
2158
|
};
|
|
2375
2159
|
const renderFallback = () => {
|
|
2376
2160
|
if ((!node.children || node.children.length === 0) && linkText) {
|
|
2377
|
-
return /* @__PURE__ */
|
|
2161
|
+
return /* @__PURE__ */ jsx38("span", { children: linkText });
|
|
2378
2162
|
}
|
|
2379
2163
|
if ((!node.children || node.children.length === 0) && !linkText) {
|
|
2380
|
-
return /* @__PURE__ */
|
|
2164
|
+
return /* @__PURE__ */ jsx38("br", {});
|
|
2381
2165
|
}
|
|
2382
2166
|
return null;
|
|
2383
2167
|
};
|
|
2384
2168
|
if (isButton) {
|
|
2385
|
-
return /* @__PURE__ */
|
|
2169
|
+
return /* @__PURE__ */ jsxs23(
|
|
2386
2170
|
LinkNodeButton,
|
|
2387
2171
|
{
|
|
2388
2172
|
node,
|
|
@@ -2400,7 +2184,7 @@ var LinkNode = (props) => {
|
|
|
2400
2184
|
}
|
|
2401
2185
|
);
|
|
2402
2186
|
}
|
|
2403
|
-
return /* @__PURE__ */
|
|
2187
|
+
return /* @__PURE__ */ jsxs23(
|
|
2404
2188
|
Hyperlink,
|
|
2405
2189
|
{
|
|
2406
2190
|
href: linkUrl || "#",
|
|
@@ -2416,10 +2200,10 @@ var LinkNode = (props) => {
|
|
|
2416
2200
|
var LinkNode_default = LinkNode;
|
|
2417
2201
|
|
|
2418
2202
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
2419
|
-
import { jsx as
|
|
2203
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2420
2204
|
var SVGIconNode = ({ node }) => {
|
|
2421
2205
|
if (!node?.svgCode) return null;
|
|
2422
|
-
return /* @__PURE__ */
|
|
2206
|
+
return /* @__PURE__ */ jsx39(
|
|
2423
2207
|
"span",
|
|
2424
2208
|
{
|
|
2425
2209
|
style: {
|
|
@@ -2436,7 +2220,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
2436
2220
|
|
|
2437
2221
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
2438
2222
|
import katex from "katex";
|
|
2439
|
-
import { jsx as
|
|
2223
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
2440
2224
|
var EquationNode = ({ node }) => {
|
|
2441
2225
|
const { equation, inline } = node;
|
|
2442
2226
|
let html = "";
|
|
@@ -2451,7 +2235,7 @@ var EquationNode = ({ node }) => {
|
|
|
2451
2235
|
});
|
|
2452
2236
|
}
|
|
2453
2237
|
if (inline) {
|
|
2454
|
-
return /* @__PURE__ */
|
|
2238
|
+
return /* @__PURE__ */ jsx40(
|
|
2455
2239
|
"span",
|
|
2456
2240
|
{
|
|
2457
2241
|
className: "katex-inline",
|
|
@@ -2459,7 +2243,7 @@ var EquationNode = ({ node }) => {
|
|
|
2459
2243
|
}
|
|
2460
2244
|
);
|
|
2461
2245
|
}
|
|
2462
|
-
return /* @__PURE__ */
|
|
2246
|
+
return /* @__PURE__ */ jsx40(
|
|
2463
2247
|
"div",
|
|
2464
2248
|
{
|
|
2465
2249
|
className: "katex-block my-3 text-center",
|
|
@@ -2470,7 +2254,7 @@ var EquationNode = ({ node }) => {
|
|
|
2470
2254
|
var EquationNode_default = EquationNode;
|
|
2471
2255
|
|
|
2472
2256
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
2473
|
-
import { jsx as
|
|
2257
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
2474
2258
|
function getNestedProperty(obj, path) {
|
|
2475
2259
|
if (!obj || !path) return null;
|
|
2476
2260
|
if (path.includes(".")) {
|
|
@@ -2483,7 +2267,7 @@ function getNestedProperty(obj, path) {
|
|
|
2483
2267
|
}
|
|
2484
2268
|
const value = obj[path];
|
|
2485
2269
|
if (Array.isArray(value)) {
|
|
2486
|
-
return value.map((item, index) => /* @__PURE__ */
|
|
2270
|
+
return value.map((item, index) => /* @__PURE__ */ jsx41("div", { children: String(item) }, index));
|
|
2487
2271
|
}
|
|
2488
2272
|
return value;
|
|
2489
2273
|
}
|
|
@@ -2544,7 +2328,7 @@ var DatafieldNode = (props) => {
|
|
|
2544
2328
|
const dataType = props.node.dataType;
|
|
2545
2329
|
if (isEmptyValue) return null;
|
|
2546
2330
|
if (dataType === "rawContent") {
|
|
2547
|
-
return /* @__PURE__ */
|
|
2331
|
+
return /* @__PURE__ */ jsx41(
|
|
2548
2332
|
PageBodyRenderer_default,
|
|
2549
2333
|
{
|
|
2550
2334
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -2560,12 +2344,12 @@ var DatafieldNode = (props) => {
|
|
|
2560
2344
|
}
|
|
2561
2345
|
);
|
|
2562
2346
|
}
|
|
2563
|
-
return /* @__PURE__ */
|
|
2347
|
+
return /* @__PURE__ */ jsx41(
|
|
2564
2348
|
"span",
|
|
2565
2349
|
{
|
|
2566
2350
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
2567
2351
|
style: styles,
|
|
2568
|
-
children: /* @__PURE__ */
|
|
2352
|
+
children: /* @__PURE__ */ jsx41(
|
|
2569
2353
|
ViewControl_default,
|
|
2570
2354
|
{
|
|
2571
2355
|
controlType: dataType,
|
|
@@ -2578,7 +2362,7 @@ var DatafieldNode = (props) => {
|
|
|
2578
2362
|
var DatafieldNode_default = DatafieldNode;
|
|
2579
2363
|
|
|
2580
2364
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
2581
|
-
import { Fragment as Fragment4, jsx as
|
|
2365
|
+
import { Fragment as Fragment4, jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2582
2366
|
var ParagraphNode = (props) => {
|
|
2583
2367
|
const NodeTypes2 = {
|
|
2584
2368
|
["text"]: TextNode_default,
|
|
@@ -2598,9 +2382,9 @@ var ParagraphNode = (props) => {
|
|
|
2598
2382
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
2599
2383
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
2600
2384
|
if (isInlineOnlyParent) {
|
|
2601
|
-
return /* @__PURE__ */
|
|
2385
|
+
return /* @__PURE__ */ jsx42(Fragment4, { children: hasChildren && props.node.children.map((node, index) => {
|
|
2602
2386
|
const SelectedNode = NodeTypes2[node.type];
|
|
2603
|
-
return /* @__PURE__ */
|
|
2387
|
+
return /* @__PURE__ */ jsx42(React30.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx42(
|
|
2604
2388
|
SelectedNode,
|
|
2605
2389
|
{
|
|
2606
2390
|
node,
|
|
@@ -2612,10 +2396,10 @@ var ParagraphNode = (props) => {
|
|
|
2612
2396
|
) }, index);
|
|
2613
2397
|
}) });
|
|
2614
2398
|
}
|
|
2615
|
-
return /* @__PURE__ */
|
|
2399
|
+
return /* @__PURE__ */ jsxs24("div", { className: " " + formatClasses, children: [
|
|
2616
2400
|
hasChildren && props.node.children.map((node, index) => {
|
|
2617
2401
|
const SelectedNode = NodeTypes2[node.type];
|
|
2618
|
-
return /* @__PURE__ */
|
|
2402
|
+
return /* @__PURE__ */ jsx42(React30.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx42(
|
|
2619
2403
|
SelectedNode,
|
|
2620
2404
|
{
|
|
2621
2405
|
node,
|
|
@@ -2626,14 +2410,14 @@ var ParagraphNode = (props) => {
|
|
|
2626
2410
|
}
|
|
2627
2411
|
) }, index);
|
|
2628
2412
|
}),
|
|
2629
|
-
!hasChildren && /* @__PURE__ */
|
|
2413
|
+
!hasChildren && /* @__PURE__ */ jsx42("div", { className: "py-1.5 lg:py-2" })
|
|
2630
2414
|
] });
|
|
2631
2415
|
};
|
|
2632
2416
|
var ParagraphNode_default = ParagraphNode;
|
|
2633
2417
|
|
|
2634
2418
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
2635
|
-
import
|
|
2636
|
-
import { Fragment as Fragment5, jsx as
|
|
2419
|
+
import React31 from "react";
|
|
2420
|
+
import { Fragment as Fragment5, jsx as jsx43 } from "react/jsx-runtime";
|
|
2637
2421
|
var HeadingNode = (props) => {
|
|
2638
2422
|
const NodeTypes2 = {
|
|
2639
2423
|
["text"]: TextNode_default,
|
|
@@ -2649,23 +2433,23 @@ var HeadingNode = (props) => {
|
|
|
2649
2433
|
{
|
|
2650
2434
|
}
|
|
2651
2435
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
2652
|
-
return /* @__PURE__ */
|
|
2436
|
+
return /* @__PURE__ */ jsx43(Fragment5, { children: React31.createElement(
|
|
2653
2437
|
HeadingTag,
|
|
2654
2438
|
{ className: formatClasses },
|
|
2655
2439
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
2656
2440
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
2657
|
-
return /* @__PURE__ */
|
|
2441
|
+
return /* @__PURE__ */ jsx43(React31.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx43(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
2658
2442
|
})
|
|
2659
2443
|
) });
|
|
2660
2444
|
};
|
|
2661
2445
|
var HeadingNode_default = HeadingNode;
|
|
2662
2446
|
|
|
2663
2447
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
2664
|
-
import
|
|
2448
|
+
import React33 from "react";
|
|
2665
2449
|
|
|
2666
2450
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
2667
|
-
import
|
|
2668
|
-
import { jsx as
|
|
2451
|
+
import React32 from "react";
|
|
2452
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
2669
2453
|
var ListItemNode = (props) => {
|
|
2670
2454
|
const NodeTypes2 = {
|
|
2671
2455
|
text: TextNode_default,
|
|
@@ -2682,66 +2466,66 @@ var ListItemNode = (props) => {
|
|
|
2682
2466
|
liStyle.fontSize = match[1].trim();
|
|
2683
2467
|
}
|
|
2684
2468
|
}
|
|
2685
|
-
return /* @__PURE__ */
|
|
2469
|
+
return /* @__PURE__ */ jsx44("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
2686
2470
|
const SelectedNode = NodeTypes2[node.type];
|
|
2687
2471
|
if (node.type === "linebreak") {
|
|
2688
2472
|
if (!foundFirstBreak) {
|
|
2689
2473
|
foundFirstBreak = true;
|
|
2690
|
-
return /* @__PURE__ */
|
|
2474
|
+
return /* @__PURE__ */ jsx44("div", {}, index);
|
|
2691
2475
|
} else {
|
|
2692
|
-
return /* @__PURE__ */
|
|
2476
|
+
return /* @__PURE__ */ jsx44("div", { className: "py-1 lg:py-2" }, index);
|
|
2693
2477
|
}
|
|
2694
2478
|
} else {
|
|
2695
2479
|
foundFirstBreak = false;
|
|
2696
|
-
return /* @__PURE__ */
|
|
2480
|
+
return /* @__PURE__ */ jsx44(React32.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx44(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2697
2481
|
}
|
|
2698
2482
|
}) });
|
|
2699
2483
|
};
|
|
2700
2484
|
var ListItemNode_default = ListItemNode;
|
|
2701
2485
|
|
|
2702
2486
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
2703
|
-
import { jsx as
|
|
2487
|
+
import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2704
2488
|
var ListNode = (props) => {
|
|
2705
2489
|
const NodeTypes2 = {
|
|
2706
2490
|
listitem: ListItemNode_default
|
|
2707
2491
|
};
|
|
2708
|
-
return /* @__PURE__ */
|
|
2709
|
-
props.node.listType == "bullet" && /* @__PURE__ */
|
|
2492
|
+
return /* @__PURE__ */ jsxs25(React33.Fragment, { children: [
|
|
2493
|
+
props.node.listType == "bullet" && /* @__PURE__ */ jsx45("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2710
2494
|
const SelectedNode = NodeTypes2[node.type];
|
|
2711
|
-
return /* @__PURE__ */
|
|
2495
|
+
return /* @__PURE__ */ jsx45(React33.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx45(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2712
2496
|
}) }),
|
|
2713
|
-
props.node.listType == "number" && /* @__PURE__ */
|
|
2497
|
+
props.node.listType == "number" && /* @__PURE__ */ jsx45("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2714
2498
|
const SelectedNode = NodeTypes2[node.type];
|
|
2715
|
-
return /* @__PURE__ */
|
|
2499
|
+
return /* @__PURE__ */ jsx45(React33.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx45(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2716
2500
|
}) })
|
|
2717
2501
|
] });
|
|
2718
2502
|
};
|
|
2719
2503
|
var ListNode_default = ListNode;
|
|
2720
2504
|
|
|
2721
2505
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
2722
|
-
import
|
|
2723
|
-
import { jsx as
|
|
2506
|
+
import React34 from "react";
|
|
2507
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
2724
2508
|
var QuoteNode = (props) => {
|
|
2725
2509
|
const NodeTypes2 = {
|
|
2726
2510
|
["text"]: TextNode_default,
|
|
2727
2511
|
["linebreak"]: LineBreakNode_default,
|
|
2728
2512
|
["link"]: LinkNode_default
|
|
2729
2513
|
};
|
|
2730
|
-
return /* @__PURE__ */
|
|
2514
|
+
return /* @__PURE__ */ jsx46("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2731
2515
|
const SelectedNode = NodeTypes2[node.type];
|
|
2732
|
-
return /* @__PURE__ */
|
|
2516
|
+
return /* @__PURE__ */ jsx46(React34.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx46(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
2733
2517
|
}) });
|
|
2734
2518
|
};
|
|
2735
2519
|
var QuoteNode_default = QuoteNode;
|
|
2736
2520
|
|
|
2737
2521
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
2738
|
-
import
|
|
2739
|
-
import
|
|
2740
|
-
import { jsx as
|
|
2741
|
-
var CopyButton =
|
|
2522
|
+
import React35 from "react";
|
|
2523
|
+
import dynamic4 from "next/dynamic";
|
|
2524
|
+
import { jsx as jsx47, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2525
|
+
var CopyButton = dynamic4(() => import("./CopyButton-XONTQQW7.mjs"), {
|
|
2742
2526
|
ssr: false,
|
|
2743
2527
|
// optional: fallback UI while loading
|
|
2744
|
-
loading: () => /* @__PURE__ */
|
|
2528
|
+
loading: () => /* @__PURE__ */ jsx47("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
2745
2529
|
});
|
|
2746
2530
|
var CodeNode = (props) => {
|
|
2747
2531
|
const NodeTypes2 = {
|
|
@@ -2755,14 +2539,14 @@ var CodeNode = (props) => {
|
|
|
2755
2539
|
if (node.type === "link") return node.text || node.url || "";
|
|
2756
2540
|
return "";
|
|
2757
2541
|
}).join("") ?? "";
|
|
2758
|
-
return /* @__PURE__ */
|
|
2759
|
-
/* @__PURE__ */
|
|
2760
|
-
/* @__PURE__ */
|
|
2761
|
-
/* @__PURE__ */
|
|
2542
|
+
return /* @__PURE__ */ jsxs26("div", { children: [
|
|
2543
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
2544
|
+
/* @__PURE__ */ jsx47("span", { children: "Code Snippet" }),
|
|
2545
|
+
/* @__PURE__ */ jsx47(CopyButton, { text: textContent })
|
|
2762
2546
|
] }),
|
|
2763
|
-
/* @__PURE__ */
|
|
2547
|
+
/* @__PURE__ */ jsx47("code", { className: "bg-neutral-soft p-4 text-sm whitespace-pre-wrap border border-2 block", children: props.node.children && props.node.children.map((node, index) => {
|
|
2764
2548
|
const SelectedNode = NodeTypes2[node.type];
|
|
2765
|
-
return /* @__PURE__ */
|
|
2549
|
+
return /* @__PURE__ */ jsx47(React35.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx47(
|
|
2766
2550
|
SelectedNode,
|
|
2767
2551
|
{
|
|
2768
2552
|
node,
|
|
@@ -2777,15 +2561,15 @@ var CodeNode = (props) => {
|
|
|
2777
2561
|
var CodeNode_default = CodeNode;
|
|
2778
2562
|
|
|
2779
2563
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
2780
|
-
import { jsx as
|
|
2564
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
2781
2565
|
var HorizontalRuleNode = () => {
|
|
2782
|
-
return /* @__PURE__ */
|
|
2566
|
+
return /* @__PURE__ */ jsx48("hr", {});
|
|
2783
2567
|
};
|
|
2784
2568
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
2785
2569
|
|
|
2786
2570
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
2787
|
-
import
|
|
2788
|
-
import { Fragment as Fragment6, jsx as
|
|
2571
|
+
import React36 from "react";
|
|
2572
|
+
import { Fragment as Fragment6, jsx as jsx49 } from "react/jsx-runtime";
|
|
2789
2573
|
var WidgetNode = (props) => {
|
|
2790
2574
|
const getWidgetParameters = () => {
|
|
2791
2575
|
const widgetInputParameters = {
|
|
@@ -2808,6 +2592,13 @@ var WidgetNode = (props) => {
|
|
|
2808
2592
|
widgetParameters = rawWidgetParams;
|
|
2809
2593
|
}
|
|
2810
2594
|
}
|
|
2595
|
+
if (props.dataitem && typeof props.dataitem === "object") {
|
|
2596
|
+
Object.keys(widgetParameters).forEach((key) => {
|
|
2597
|
+
if (props.dataitem[key] !== void 0 && props.dataitem[key] !== null) {
|
|
2598
|
+
widgetParameters[key] = props.dataitem[key];
|
|
2599
|
+
}
|
|
2600
|
+
});
|
|
2601
|
+
}
|
|
2811
2602
|
const resolveValue = (val) => {
|
|
2812
2603
|
if (typeof val === "string") {
|
|
2813
2604
|
const m = /^\{(.+)\}$/.exec(val);
|
|
@@ -2842,7 +2633,7 @@ var WidgetNode = (props) => {
|
|
|
2842
2633
|
};
|
|
2843
2634
|
const widgetCode = props.node?.widgetCode;
|
|
2844
2635
|
if (!widgetCode) {
|
|
2845
|
-
return /* @__PURE__ */
|
|
2636
|
+
return /* @__PURE__ */ jsx49(Fragment6, { children: "Invalid widget" });
|
|
2846
2637
|
}
|
|
2847
2638
|
const widgetParams = getWidgetParameters();
|
|
2848
2639
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -2851,7 +2642,7 @@ var WidgetNode = (props) => {
|
|
|
2851
2642
|
}
|
|
2852
2643
|
return (
|
|
2853
2644
|
// eslint-disable-next-line react-hooks/static-components
|
|
2854
|
-
/* @__PURE__ */
|
|
2645
|
+
/* @__PURE__ */ jsx49(React36.Fragment, { children: /* @__PURE__ */ jsx49(
|
|
2855
2646
|
WidgetRenderer,
|
|
2856
2647
|
{
|
|
2857
2648
|
params: widgetParams,
|
|
@@ -2868,12 +2659,12 @@ var WidgetNode = (props) => {
|
|
|
2868
2659
|
var WidgetNode_default = WidgetNode;
|
|
2869
2660
|
|
|
2870
2661
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
2871
|
-
import
|
|
2662
|
+
import React37, { useRef as useRef3, useReducer, useCallback as useCallback2, useEffect as useEffect7 } from "react";
|
|
2872
2663
|
|
|
2873
2664
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
2874
|
-
import { jsx as
|
|
2665
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
2875
2666
|
var InputControlNode = (props) => {
|
|
2876
|
-
return /* @__PURE__ */
|
|
2667
|
+
return /* @__PURE__ */ jsx50("div", { children: /* @__PURE__ */ jsx50(
|
|
2877
2668
|
InputControl_default,
|
|
2878
2669
|
{
|
|
2879
2670
|
name: props.node.name,
|
|
@@ -2946,7 +2737,7 @@ function FormReducer(state, action) {
|
|
|
2946
2737
|
var FormReducer_default = FormReducer;
|
|
2947
2738
|
|
|
2948
2739
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
2949
|
-
import { jsx as
|
|
2740
|
+
import { jsx as jsx51, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2950
2741
|
var FormContainerNode = (props) => {
|
|
2951
2742
|
const NodeTypes2 = {
|
|
2952
2743
|
["input-control"]: InputControlNode_default
|
|
@@ -2976,12 +2767,12 @@ var FormContainerNode = (props) => {
|
|
|
2976
2767
|
};
|
|
2977
2768
|
fetchInitialData();
|
|
2978
2769
|
}, [props.apiBaseUrl, props.node, props.session, props.routeParameters]);
|
|
2979
|
-
return /* @__PURE__ */
|
|
2770
|
+
return /* @__PURE__ */ jsxs27("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
|
|
2980
2771
|
node.children && node.children.map((node2, index) => {
|
|
2981
2772
|
{
|
|
2982
2773
|
}
|
|
2983
2774
|
const SelectedNode = NodeTypes2[node2.type];
|
|
2984
|
-
return /* @__PURE__ */
|
|
2775
|
+
return /* @__PURE__ */ jsx51(React37.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ jsx51(
|
|
2985
2776
|
InputControlNode_default,
|
|
2986
2777
|
{
|
|
2987
2778
|
value: formState.inputValues[node2.name],
|
|
@@ -2990,18 +2781,18 @@ var FormContainerNode = (props) => {
|
|
|
2990
2781
|
}
|
|
2991
2782
|
) }, index);
|
|
2992
2783
|
}),
|
|
2993
|
-
node.children.length == 0 && /* @__PURE__ */
|
|
2784
|
+
node.children.length == 0 && /* @__PURE__ */ jsx51("div", { className: "py-0.5 lg:py-1.5" })
|
|
2994
2785
|
] });
|
|
2995
2786
|
};
|
|
2996
2787
|
var FormContainerNode_default = FormContainerNode;
|
|
2997
2788
|
|
|
2998
2789
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
2999
|
-
import
|
|
2790
|
+
import React40 from "react";
|
|
3000
2791
|
|
|
3001
2792
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
3002
|
-
import
|
|
3003
|
-
import { jsx as
|
|
3004
|
-
var IframeClient =
|
|
2793
|
+
import dynamic5 from "next/dynamic";
|
|
2794
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
2795
|
+
var IframeClient = dynamic5(() => import("./IframeClient-J22NMEVY.mjs"), {
|
|
3005
2796
|
ssr: false
|
|
3006
2797
|
});
|
|
3007
2798
|
var EmbedNode = (props) => {
|
|
@@ -3013,13 +2804,13 @@ var EmbedNode = (props) => {
|
|
|
3013
2804
|
} else {
|
|
3014
2805
|
src = props.node.embedSrc;
|
|
3015
2806
|
}
|
|
3016
|
-
return /* @__PURE__ */
|
|
2807
|
+
return /* @__PURE__ */ jsx52("div", { className: "aspect-video", children: src && /* @__PURE__ */ jsx52(IframeClient, { src }) });
|
|
3017
2808
|
};
|
|
3018
2809
|
var EmbedNode_default = EmbedNode;
|
|
3019
2810
|
|
|
3020
2811
|
// src/components/Slider.tsx
|
|
3021
|
-
import
|
|
3022
|
-
import { Fragment as Fragment7, jsx as
|
|
2812
|
+
import React38, { useState as useState5, useEffect as useEffect8, Children, cloneElement } from "react";
|
|
2813
|
+
import { Fragment as Fragment7, jsx as jsx53, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3023
2814
|
var Slider = ({
|
|
3024
2815
|
children,
|
|
3025
2816
|
slidesToShow = 4,
|
|
@@ -3113,10 +2904,10 @@ var Slider = ({
|
|
|
3113
2904
|
};
|
|
3114
2905
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
3115
2906
|
const slides = Children.map(children, (child, index) => {
|
|
3116
|
-
if (!
|
|
2907
|
+
if (!React38.isValidElement(child)) return null;
|
|
3117
2908
|
const childProps = child.props;
|
|
3118
2909
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
3119
|
-
return /* @__PURE__ */
|
|
2910
|
+
return /* @__PURE__ */ jsx53(
|
|
3120
2911
|
"div",
|
|
3121
2912
|
{
|
|
3122
2913
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
@@ -3139,14 +2930,14 @@ var Slider = ({
|
|
|
3139
2930
|
return "bottom-4";
|
|
3140
2931
|
}
|
|
3141
2932
|
};
|
|
3142
|
-
return /* @__PURE__ */
|
|
2933
|
+
return /* @__PURE__ */ jsxs28(
|
|
3143
2934
|
"div",
|
|
3144
2935
|
{
|
|
3145
2936
|
className: `relative w-full overflow-hidden ${className}`,
|
|
3146
2937
|
onMouseEnter: handleMouseEnter,
|
|
3147
2938
|
onMouseLeave: handleMouseLeave,
|
|
3148
2939
|
children: [
|
|
3149
|
-
/* @__PURE__ */
|
|
2940
|
+
/* @__PURE__ */ jsx53(
|
|
3150
2941
|
"div",
|
|
3151
2942
|
{
|
|
3152
2943
|
className: "flex h-full",
|
|
@@ -3157,18 +2948,18 @@ var Slider = ({
|
|
|
3157
2948
|
children: slides
|
|
3158
2949
|
}
|
|
3159
2950
|
),
|
|
3160
|
-
show_arrows && /* @__PURE__ */
|
|
3161
|
-
/* @__PURE__ */
|
|
2951
|
+
show_arrows && /* @__PURE__ */ jsxs28(Fragment7, { children: [
|
|
2952
|
+
/* @__PURE__ */ jsx53(
|
|
3162
2953
|
ArrowButton,
|
|
3163
2954
|
{
|
|
3164
2955
|
direction: "left",
|
|
3165
2956
|
onClick: prevSlide,
|
|
3166
2957
|
visible: infinite_scroll || currentSlide > 0,
|
|
3167
2958
|
className: arrowClassName,
|
|
3168
|
-
children: /* @__PURE__ */
|
|
2959
|
+
children: /* @__PURE__ */ jsx53("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ jsx53("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
3169
2960
|
}
|
|
3170
2961
|
),
|
|
3171
|
-
/* @__PURE__ */
|
|
2962
|
+
/* @__PURE__ */ jsxs28(
|
|
3172
2963
|
ArrowButton,
|
|
3173
2964
|
{
|
|
3174
2965
|
direction: "right",
|
|
@@ -3176,13 +2967,13 @@ var Slider = ({
|
|
|
3176
2967
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
3177
2968
|
className: arrowClassName,
|
|
3178
2969
|
children: [
|
|
3179
|
-
/* @__PURE__ */
|
|
2970
|
+
/* @__PURE__ */ jsx53("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ jsx53("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
|
|
3180
2971
|
" "
|
|
3181
2972
|
]
|
|
3182
2973
|
}
|
|
3183
2974
|
)
|
|
3184
2975
|
] }),
|
|
3185
|
-
show_dots && /* @__PURE__ */
|
|
2976
|
+
show_dots && /* @__PURE__ */ jsx53("div", { className: `absolute left-1/2 -translate-x-1/2 flex justify-center space-x-1.5 ${getProgressPositionClass()}`, children: Array.from({ length: totalSlides }).map((_, index) => /* @__PURE__ */ jsx53(
|
|
3186
2977
|
ProgressPill,
|
|
3187
2978
|
{
|
|
3188
2979
|
active: index === currentSlide,
|
|
@@ -3208,7 +2999,7 @@ var ArrowButton = ({
|
|
|
3208
2999
|
visible,
|
|
3209
3000
|
children,
|
|
3210
3001
|
className = ""
|
|
3211
|
-
}) => /* @__PURE__ */
|
|
3002
|
+
}) => /* @__PURE__ */ jsx53(
|
|
3212
3003
|
"button",
|
|
3213
3004
|
{
|
|
3214
3005
|
className: `
|
|
@@ -3295,7 +3086,7 @@ var ProgressPill = ({
|
|
|
3295
3086
|
const renderProgressBar = () => {
|
|
3296
3087
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
3297
3088
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
3298
|
-
return /* @__PURE__ */
|
|
3089
|
+
return /* @__PURE__ */ jsx53(
|
|
3299
3090
|
"div",
|
|
3300
3091
|
{
|
|
3301
3092
|
className: `absolute top-0 left-0 h-full rounded-full ${style === "cumulative" && isFilled ? activeClassName || "bg-white" : activeClassName || "bg-white"} transition-all duration-50 ease-linear`,
|
|
@@ -3307,7 +3098,7 @@ var ProgressPill = ({
|
|
|
3307
3098
|
};
|
|
3308
3099
|
const renderCumulativeFill = () => {
|
|
3309
3100
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
3310
|
-
return /* @__PURE__ */
|
|
3101
|
+
return /* @__PURE__ */ jsx53(
|
|
3311
3102
|
"div",
|
|
3312
3103
|
{
|
|
3313
3104
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -3317,7 +3108,7 @@ var ProgressPill = ({
|
|
|
3317
3108
|
}
|
|
3318
3109
|
return null;
|
|
3319
3110
|
};
|
|
3320
|
-
return /* @__PURE__ */
|
|
3111
|
+
return /* @__PURE__ */ jsxs28(
|
|
3321
3112
|
"button",
|
|
3322
3113
|
{
|
|
3323
3114
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -3655,10 +3446,10 @@ var PathUtility = class {
|
|
|
3655
3446
|
var PathUtility_default = new PathUtility();
|
|
3656
3447
|
|
|
3657
3448
|
// src/components/NoDataFound.tsx
|
|
3658
|
-
import { jsx as
|
|
3449
|
+
import { jsx as jsx54, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3659
3450
|
var NoDataFound = () => {
|
|
3660
|
-
return /* @__PURE__ */
|
|
3661
|
-
/* @__PURE__ */
|
|
3451
|
+
return /* @__PURE__ */ jsxs29("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
3452
|
+
/* @__PURE__ */ jsx54("div", { className: "mb-5", children: /* @__PURE__ */ jsx54("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx54(
|
|
3662
3453
|
"svg",
|
|
3663
3454
|
{
|
|
3664
3455
|
className: "w-10 h-10",
|
|
@@ -3666,7 +3457,7 @@ var NoDataFound = () => {
|
|
|
3666
3457
|
stroke: "currentColor",
|
|
3667
3458
|
viewBox: "0 0 24 24",
|
|
3668
3459
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3669
|
-
children: /* @__PURE__ */
|
|
3460
|
+
children: /* @__PURE__ */ jsx54(
|
|
3670
3461
|
"path",
|
|
3671
3462
|
{
|
|
3672
3463
|
strokeLinecap: "round",
|
|
@@ -3677,15 +3468,15 @@ var NoDataFound = () => {
|
|
|
3677
3468
|
)
|
|
3678
3469
|
}
|
|
3679
3470
|
) }) }),
|
|
3680
|
-
/* @__PURE__ */
|
|
3681
|
-
/* @__PURE__ */
|
|
3471
|
+
/* @__PURE__ */ jsx54("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
3472
|
+
/* @__PURE__ */ jsx54("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
3682
3473
|
] });
|
|
3683
3474
|
};
|
|
3684
3475
|
var NoDataFound_default = NoDataFound;
|
|
3685
3476
|
|
|
3686
3477
|
// src/components/Pagination.tsx
|
|
3687
3478
|
import { useMemo } from "react";
|
|
3688
|
-
import { jsx as
|
|
3479
|
+
import { jsx as jsx55, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3689
3480
|
var Pagination = (props) => {
|
|
3690
3481
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
3691
3482
|
const builder = useMemo(() => {
|
|
@@ -3729,7 +3520,7 @@ var Pagination = (props) => {
|
|
|
3729
3520
|
return range;
|
|
3730
3521
|
};
|
|
3731
3522
|
const paginationRange = getPaginationRange();
|
|
3732
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */
|
|
3523
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ jsx55(
|
|
3733
3524
|
Hyperlink,
|
|
3734
3525
|
{
|
|
3735
3526
|
linkType: "Link" /* Link */,
|
|
@@ -3744,9 +3535,9 @@ var Pagination = (props) => {
|
|
|
3744
3535
|
);
|
|
3745
3536
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
3746
3537
|
if (disabled) {
|
|
3747
|
-
return /* @__PURE__ */
|
|
3538
|
+
return /* @__PURE__ */ jsx55("span", { className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border bg-neutral-base cursor-not-allowed", children });
|
|
3748
3539
|
}
|
|
3749
|
-
return /* @__PURE__ */
|
|
3540
|
+
return /* @__PURE__ */ jsx55(
|
|
3750
3541
|
Hyperlink,
|
|
3751
3542
|
{
|
|
3752
3543
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border transition-colors duration-150",
|
|
@@ -3756,35 +3547,35 @@ var Pagination = (props) => {
|
|
|
3756
3547
|
);
|
|
3757
3548
|
};
|
|
3758
3549
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
3759
|
-
return /* @__PURE__ */
|
|
3760
|
-
/* @__PURE__ */
|
|
3761
|
-
/* @__PURE__ */
|
|
3550
|
+
return /* @__PURE__ */ jsxs30("div", { className: "py-6 border-t bg-default", children: [
|
|
3551
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
3552
|
+
/* @__PURE__ */ jsxs30("div", { className: "text-sm", children: [
|
|
3762
3553
|
"Showing ",
|
|
3763
|
-
/* @__PURE__ */
|
|
3554
|
+
/* @__PURE__ */ jsxs30("span", { className: "font-semibold", children: [
|
|
3764
3555
|
startItem,
|
|
3765
3556
|
"-",
|
|
3766
3557
|
endItem
|
|
3767
3558
|
] }),
|
|
3768
3559
|
" ",
|
|
3769
3560
|
"out of ",
|
|
3770
|
-
/* @__PURE__ */
|
|
3561
|
+
/* @__PURE__ */ jsx55("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
3771
3562
|
" results"
|
|
3772
3563
|
] }),
|
|
3773
|
-
totalPages > 1 && /* @__PURE__ */
|
|
3774
|
-
/* @__PURE__ */
|
|
3564
|
+
totalPages > 1 && /* @__PURE__ */ jsxs30("div", { className: "flex items-center space-x-1", children: [
|
|
3565
|
+
/* @__PURE__ */ jsxs30(
|
|
3775
3566
|
NavigationButton,
|
|
3776
3567
|
{
|
|
3777
3568
|
page: activePageNumber - 1,
|
|
3778
3569
|
disabled: activePageNumber === 1,
|
|
3779
3570
|
children: [
|
|
3780
|
-
/* @__PURE__ */
|
|
3781
|
-
/* @__PURE__ */
|
|
3571
|
+
/* @__PURE__ */ jsx55("span", { children: /* @__PURE__ */ jsx55(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
3572
|
+
/* @__PURE__ */ jsx55("span", { className: "text-sm", children: "Prev" })
|
|
3782
3573
|
]
|
|
3783
3574
|
}
|
|
3784
3575
|
),
|
|
3785
3576
|
paginationRange.map((item, index) => {
|
|
3786
3577
|
if (item === "...") {
|
|
3787
|
-
return /* @__PURE__ */
|
|
3578
|
+
return /* @__PURE__ */ jsx55(
|
|
3788
3579
|
"span",
|
|
3789
3580
|
{
|
|
3790
3581
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -3794,23 +3585,23 @@ var Pagination = (props) => {
|
|
|
3794
3585
|
);
|
|
3795
3586
|
}
|
|
3796
3587
|
const page = item;
|
|
3797
|
-
return /* @__PURE__ */
|
|
3588
|
+
return /* @__PURE__ */ jsx55(PageButton, { page, children: page }, page);
|
|
3798
3589
|
}),
|
|
3799
|
-
/* @__PURE__ */
|
|
3590
|
+
/* @__PURE__ */ jsxs30(
|
|
3800
3591
|
NavigationButton,
|
|
3801
3592
|
{
|
|
3802
3593
|
page: activePageNumber + 1,
|
|
3803
3594
|
disabled: activePageNumber === totalPages,
|
|
3804
3595
|
children: [
|
|
3805
|
-
/* @__PURE__ */
|
|
3806
|
-
/* @__PURE__ */
|
|
3596
|
+
/* @__PURE__ */ jsx55("span", { className: "text-sm", children: "Next" }),
|
|
3597
|
+
/* @__PURE__ */ jsx55("span", { children: /* @__PURE__ */ jsx55(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
3807
3598
|
]
|
|
3808
3599
|
}
|
|
3809
3600
|
)
|
|
3810
3601
|
] }),
|
|
3811
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */
|
|
3812
|
-
/* @__PURE__ */
|
|
3813
|
-
/* @__PURE__ */
|
|
3602
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs30("div", { className: "flex items-center space-x-2", children: [
|
|
3603
|
+
/* @__PURE__ */ jsx55("span", { className: "text-sm", children: "Go to:" }),
|
|
3604
|
+
/* @__PURE__ */ jsx55("div", { className: "relative", children: /* @__PURE__ */ jsx55(
|
|
3814
3605
|
"input",
|
|
3815
3606
|
{
|
|
3816
3607
|
type: "number",
|
|
@@ -3831,9 +3622,9 @@ var Pagination = (props) => {
|
|
|
3831
3622
|
) })
|
|
3832
3623
|
] })
|
|
3833
3624
|
] }),
|
|
3834
|
-
showPageSizeSelector && /* @__PURE__ */
|
|
3835
|
-
/* @__PURE__ */
|
|
3836
|
-
/* @__PURE__ */
|
|
3625
|
+
showPageSizeSelector && /* @__PURE__ */ jsx55("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
3626
|
+
/* @__PURE__ */ jsx55("span", { className: "text-sm", children: "Show:" }),
|
|
3627
|
+
/* @__PURE__ */ jsx55("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx55(
|
|
3837
3628
|
Hyperlink,
|
|
3838
3629
|
{
|
|
3839
3630
|
className: `
|
|
@@ -3845,16 +3636,16 @@ var Pagination = (props) => {
|
|
|
3845
3636
|
},
|
|
3846
3637
|
size
|
|
3847
3638
|
)) }),
|
|
3848
|
-
/* @__PURE__ */
|
|
3639
|
+
/* @__PURE__ */ jsx55("span", { className: "text-sm", children: "per page" })
|
|
3849
3640
|
] }) })
|
|
3850
3641
|
] });
|
|
3851
3642
|
};
|
|
3852
3643
|
var Pagination_default = Pagination;
|
|
3853
3644
|
|
|
3854
3645
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
3855
|
-
import
|
|
3856
|
-
import { Fragment as Fragment8, jsx as
|
|
3857
|
-
var HlsPlayer2 =
|
|
3646
|
+
import dynamic6 from "next/dynamic";
|
|
3647
|
+
import { Fragment as Fragment8, jsx as jsx56, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3648
|
+
var HlsPlayer2 = dynamic6(() => import("./HlsPlayer-GV3FOPYT.mjs"), { ssr: false });
|
|
3858
3649
|
var deviceToMediaQuery = (device) => {
|
|
3859
3650
|
switch (device) {
|
|
3860
3651
|
case "sm":
|
|
@@ -3922,8 +3713,8 @@ var ImageGalleryNode = (props) => {
|
|
|
3922
3713
|
right: "justify-end"
|
|
3923
3714
|
};
|
|
3924
3715
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
3925
|
-
return /* @__PURE__ */
|
|
3926
|
-
hlsSources.length > 0 && /* @__PURE__ */
|
|
3716
|
+
return /* @__PURE__ */ jsxs31(Fragment8, { children: [
|
|
3717
|
+
hlsSources.length > 0 && /* @__PURE__ */ jsx56(Fragment8, { children: /* @__PURE__ */ jsx56(
|
|
3927
3718
|
HlsPlayer2,
|
|
3928
3719
|
{
|
|
3929
3720
|
sources: hlsSources,
|
|
@@ -3937,14 +3728,14 @@ var ImageGalleryNode = (props) => {
|
|
|
3937
3728
|
session: props.session
|
|
3938
3729
|
}
|
|
3939
3730
|
) }),
|
|
3940
|
-
staticFallback && /* @__PURE__ */
|
|
3731
|
+
staticFallback && /* @__PURE__ */ jsx56(Fragment8, { children: /* @__PURE__ */ jsxs31("picture", { children: [
|
|
3941
3732
|
DEVICE_ORDER.map((deviceKey) => {
|
|
3942
3733
|
const match = staticSources.find((img) => img.device === deviceKey);
|
|
3943
3734
|
if (!match) return null;
|
|
3944
3735
|
const srcUrl = resolveImageUrl(match.imageUrl);
|
|
3945
3736
|
if (!srcUrl) return null;
|
|
3946
3737
|
const mediaQuery = deviceToMediaQuery(match.device);
|
|
3947
|
-
return /* @__PURE__ */
|
|
3738
|
+
return /* @__PURE__ */ jsx56(
|
|
3948
3739
|
"source",
|
|
3949
3740
|
{
|
|
3950
3741
|
media: mediaQuery,
|
|
@@ -3968,7 +3759,7 @@ var ImageGalleryNode = (props) => {
|
|
|
3968
3759
|
if (img.borderRadius) styles.borderRadius = img.borderRadius;
|
|
3969
3760
|
return (
|
|
3970
3761
|
// eslint-disable-next-line @next/next/no-img-element
|
|
3971
|
-
/* @__PURE__ */
|
|
3762
|
+
/* @__PURE__ */ jsx56(
|
|
3972
3763
|
"img",
|
|
3973
3764
|
{
|
|
3974
3765
|
loading: "lazy",
|
|
@@ -3989,7 +3780,7 @@ var ImageGalleryNode_default = ImageGalleryNode;
|
|
|
3989
3780
|
|
|
3990
3781
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
3991
3782
|
import Link2 from "next/link";
|
|
3992
|
-
import { jsx as
|
|
3783
|
+
import { jsx as jsx57, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3993
3784
|
function toCamelCase(str) {
|
|
3994
3785
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
3995
3786
|
}
|
|
@@ -4196,7 +3987,7 @@ var DivContainer = async (props) => {
|
|
|
4196
3987
|
response = await serviceClient.get(endpoint);
|
|
4197
3988
|
result = response?.result;
|
|
4198
3989
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
4199
|
-
return /* @__PURE__ */
|
|
3990
|
+
return /* @__PURE__ */ jsx57(NoDataFound_default, {});
|
|
4200
3991
|
}
|
|
4201
3992
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
4202
3993
|
childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
|
|
@@ -4213,7 +4004,7 @@ var DivContainer = async (props) => {
|
|
|
4213
4004
|
}
|
|
4214
4005
|
const SelectedNode = NodeTypes2[node.type];
|
|
4215
4006
|
if (!SelectedNode) return null;
|
|
4216
|
-
return /* @__PURE__ */
|
|
4007
|
+
return /* @__PURE__ */ jsx57(React40.Fragment, { children: /* @__PURE__ */ jsx57(
|
|
4217
4008
|
SelectedNode,
|
|
4218
4009
|
{
|
|
4219
4010
|
node,
|
|
@@ -4315,9 +4106,9 @@ var DivContainer = async (props) => {
|
|
|
4315
4106
|
props.node.autoFormat && "auto-format",
|
|
4316
4107
|
props.node.bgClass
|
|
4317
4108
|
].filter(Boolean).join(" ");
|
|
4318
|
-
return /* @__PURE__ */
|
|
4319
|
-
/* @__PURE__ */
|
|
4320
|
-
/* @__PURE__ */
|
|
4109
|
+
return /* @__PURE__ */ jsxs32(React40.Fragment, { children: [
|
|
4110
|
+
/* @__PURE__ */ jsx57("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
4111
|
+
/* @__PURE__ */ jsx57(React40.Fragment, { children: /* @__PURE__ */ jsx57(
|
|
4321
4112
|
Wrapper,
|
|
4322
4113
|
{
|
|
4323
4114
|
id: guid,
|
|
@@ -4326,18 +4117,18 @@ var DivContainer = async (props) => {
|
|
|
4326
4117
|
...wrapperProps,
|
|
4327
4118
|
children: dataToRender.map(
|
|
4328
4119
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
4329
|
-
(child, i) => /* @__PURE__ */
|
|
4120
|
+
(child, i) => /* @__PURE__ */ jsx57(React40.Fragment, { children: child }, i)
|
|
4330
4121
|
) : renderChildren(props.node.children, props, item, idx)
|
|
4331
4122
|
)
|
|
4332
4123
|
}
|
|
4333
4124
|
) }),
|
|
4334
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */
|
|
4125
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ jsx57("div", { children: /* @__PURE__ */ jsx57(Pagination_default, { path: props.path, query: props.query, dataset: response }) })
|
|
4335
4126
|
] });
|
|
4336
4127
|
};
|
|
4337
4128
|
var DivContainer_default = DivContainer;
|
|
4338
4129
|
|
|
4339
4130
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
4340
|
-
import { jsx as
|
|
4131
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
4341
4132
|
var NodeTypes = {
|
|
4342
4133
|
["paragraph"]: ParagraphNode_default,
|
|
4343
4134
|
["heading"]: HeadingNode_default,
|
|
@@ -4365,11 +4156,11 @@ var PageBodyRenderer = (props) => {
|
|
|
4365
4156
|
if (pageBodyTree && pageBodyTree.root) {
|
|
4366
4157
|
rootNode = pageBodyTree.root;
|
|
4367
4158
|
}
|
|
4368
|
-
return /* @__PURE__ */
|
|
4159
|
+
return /* @__PURE__ */ jsx58(React41.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
4369
4160
|
{
|
|
4370
4161
|
}
|
|
4371
4162
|
const SelectedNode = NodeTypes[node.type];
|
|
4372
|
-
return /* @__PURE__ */
|
|
4163
|
+
return /* @__PURE__ */ jsx58(React41.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx58(React41.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx58(React41.Fragment, { children: /* @__PURE__ */ jsx58(
|
|
4373
4164
|
SelectedNode,
|
|
4374
4165
|
{
|
|
4375
4166
|
node,
|
|
@@ -4385,7 +4176,7 @@ var PageBodyRenderer = (props) => {
|
|
|
4385
4176
|
device: props.device,
|
|
4386
4177
|
widgetRenderer: props.widgetRenderer
|
|
4387
4178
|
}
|
|
4388
|
-
) }) : /* @__PURE__ */
|
|
4179
|
+
) }) : /* @__PURE__ */ jsx58(React41.Fragment, { children: /* @__PURE__ */ jsx58(
|
|
4389
4180
|
SelectedNode,
|
|
4390
4181
|
{
|
|
4391
4182
|
node,
|
|
@@ -4407,7 +4198,7 @@ var PageBodyRenderer_default = PageBodyRenderer;
|
|
|
4407
4198
|
|
|
4408
4199
|
// src/components/Toast.tsx
|
|
4409
4200
|
import { useState as useState7 } from "react";
|
|
4410
|
-
import { Fragment as Fragment9, jsx as
|
|
4201
|
+
import { Fragment as Fragment9, jsx as jsx59, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4411
4202
|
var Toast = () => {
|
|
4412
4203
|
const [showToast, setShowToast] = useState7(false);
|
|
4413
4204
|
const [message, setMessage] = useState7("");
|
|
@@ -4450,8 +4241,8 @@ var Toast = () => {
|
|
|
4450
4241
|
const closeToast = () => {
|
|
4451
4242
|
setShowToast(false);
|
|
4452
4243
|
};
|
|
4453
|
-
return /* @__PURE__ */
|
|
4454
|
-
/* @__PURE__ */
|
|
4244
|
+
return /* @__PURE__ */ jsx59(Fragment9, { children: showToast && /* @__PURE__ */ jsx59("div", { className: "fixed top-2 flex justify-center w-1/2 max-w-xl left-1/2 -translate-x-1/2", style: { zIndex: 1e3 }, children: /* @__PURE__ */ jsxs33("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
4245
|
+
/* @__PURE__ */ jsx59(
|
|
4455
4246
|
"span",
|
|
4456
4247
|
{
|
|
4457
4248
|
className: "font-medium text-inherit text-sm",
|
|
@@ -4459,7 +4250,7 @@ var Toast = () => {
|
|
|
4459
4250
|
children: message
|
|
4460
4251
|
}
|
|
4461
4252
|
),
|
|
4462
|
-
/* @__PURE__ */
|
|
4253
|
+
/* @__PURE__ */ jsx59("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ jsx59(
|
|
4463
4254
|
"svg",
|
|
4464
4255
|
{
|
|
4465
4256
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4467,7 +4258,7 @@ var Toast = () => {
|
|
|
4467
4258
|
fill: "none",
|
|
4468
4259
|
viewBox: "0 0 24 24",
|
|
4469
4260
|
stroke: "currentColor",
|
|
4470
|
-
children: /* @__PURE__ */
|
|
4261
|
+
children: /* @__PURE__ */ jsx59("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
4471
4262
|
}
|
|
4472
4263
|
) })
|
|
4473
4264
|
] }) }) });
|
|
@@ -4477,7 +4268,7 @@ var Toast_default = Toast;
|
|
|
4477
4268
|
// src/components/NavigationTabsV2.tsx
|
|
4478
4269
|
import Link3 from "next/link";
|
|
4479
4270
|
import { usePathname } from "next/navigation";
|
|
4480
|
-
import { jsx as
|
|
4271
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
4481
4272
|
function resolveRoutePlaceholders(route, params) {
|
|
4482
4273
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
4483
4274
|
const value = params[key];
|
|
@@ -4502,8 +4293,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
4502
4293
|
isActive: tab.isActive
|
|
4503
4294
|
})) || [];
|
|
4504
4295
|
if (mappedTabs.length === 0) return null;
|
|
4505
|
-
return /* @__PURE__ */
|
|
4506
|
-
return /* @__PURE__ */
|
|
4296
|
+
return /* @__PURE__ */ jsx60("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
4297
|
+
return /* @__PURE__ */ jsx60(Link3, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ jsx60(
|
|
4507
4298
|
"div",
|
|
4508
4299
|
{
|
|
4509
4300
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -4516,51 +4307,51 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
4516
4307
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
4517
4308
|
|
|
4518
4309
|
// src/components/dataForm/DataList.tsx
|
|
4519
|
-
import
|
|
4310
|
+
import React45, { useEffect as useEffect9, useState as useState8, useCallback as useCallback3, useReducer as useReducer2 } from "react";
|
|
4520
4311
|
import { useRouter } from "next/navigation";
|
|
4521
4312
|
|
|
4522
4313
|
// src/components/dataForm/NoContentView.tsx
|
|
4523
|
-
import
|
|
4524
|
-
import { jsx as
|
|
4314
|
+
import React43 from "react";
|
|
4315
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
4525
4316
|
var NoContentView = (props) => {
|
|
4526
|
-
return /* @__PURE__ */
|
|
4317
|
+
return /* @__PURE__ */ jsx61(React43.Fragment, { children: props.isDataFound === false && props.children });
|
|
4527
4318
|
};
|
|
4528
4319
|
var NoContentView_default = NoContentView;
|
|
4529
4320
|
|
|
4530
4321
|
// src/components/dataForm/ContentView.tsx
|
|
4531
|
-
import
|
|
4532
|
-
import { jsx as
|
|
4322
|
+
import React44 from "react";
|
|
4323
|
+
import { jsx as jsx62, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4533
4324
|
var ContentView = (props) => {
|
|
4534
|
-
return /* @__PURE__ */
|
|
4535
|
-
props.isDataFound == null && /* @__PURE__ */
|
|
4536
|
-
/* @__PURE__ */
|
|
4537
|
-
/* @__PURE__ */
|
|
4538
|
-
/* @__PURE__ */
|
|
4539
|
-
/* @__PURE__ */
|
|
4540
|
-
/* @__PURE__ */
|
|
4325
|
+
return /* @__PURE__ */ jsxs34(React44.Fragment, { children: [
|
|
4326
|
+
props.isDataFound == null && /* @__PURE__ */ jsx62("div", { className: "", children: /* @__PURE__ */ jsxs34("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
4327
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center mb-4", children: [
|
|
4328
|
+
/* @__PURE__ */ jsx62("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
4329
|
+
/* @__PURE__ */ jsxs34("div", { className: "ml-2", children: [
|
|
4330
|
+
/* @__PURE__ */ jsx62("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
4331
|
+
/* @__PURE__ */ jsx62("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
4541
4332
|
] })
|
|
4542
4333
|
] }),
|
|
4543
|
-
/* @__PURE__ */
|
|
4544
|
-
/* @__PURE__ */
|
|
4545
|
-
/* @__PURE__ */
|
|
4546
|
-
/* @__PURE__ */
|
|
4547
|
-
/* @__PURE__ */
|
|
4548
|
-
/* @__PURE__ */
|
|
4549
|
-
/* @__PURE__ */
|
|
4334
|
+
/* @__PURE__ */ jsxs34("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
4335
|
+
/* @__PURE__ */ jsxs34("div", { className: "animate-pulse", children: [
|
|
4336
|
+
/* @__PURE__ */ jsx62("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
4337
|
+
/* @__PURE__ */ jsx62("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
4338
|
+
/* @__PURE__ */ jsx62("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
4339
|
+
/* @__PURE__ */ jsx62("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
4340
|
+
/* @__PURE__ */ jsx62("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
4550
4341
|
] }),
|
|
4551
|
-
/* @__PURE__ */
|
|
4552
|
-
/* @__PURE__ */
|
|
4553
|
-
/* @__PURE__ */
|
|
4554
|
-
/* @__PURE__ */
|
|
4555
|
-
/* @__PURE__ */
|
|
4556
|
-
/* @__PURE__ */
|
|
4342
|
+
/* @__PURE__ */ jsxs34("div", { className: "animate-pulse", children: [
|
|
4343
|
+
/* @__PURE__ */ jsx62("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
4344
|
+
/* @__PURE__ */ jsx62("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
4345
|
+
/* @__PURE__ */ jsx62("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
4346
|
+
/* @__PURE__ */ jsx62("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
4347
|
+
/* @__PURE__ */ jsx62("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
4557
4348
|
] }),
|
|
4558
|
-
/* @__PURE__ */
|
|
4559
|
-
/* @__PURE__ */
|
|
4560
|
-
/* @__PURE__ */
|
|
4561
|
-
/* @__PURE__ */
|
|
4562
|
-
/* @__PURE__ */
|
|
4563
|
-
/* @__PURE__ */
|
|
4349
|
+
/* @__PURE__ */ jsxs34("div", { className: "animate-pulse", children: [
|
|
4350
|
+
/* @__PURE__ */ jsx62("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
4351
|
+
/* @__PURE__ */ jsx62("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
4352
|
+
/* @__PURE__ */ jsx62("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
4353
|
+
/* @__PURE__ */ jsx62("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
4354
|
+
/* @__PURE__ */ jsx62("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
4564
4355
|
] })
|
|
4565
4356
|
] })
|
|
4566
4357
|
] }) }),
|
|
@@ -4570,7 +4361,7 @@ var ContentView = (props) => {
|
|
|
4570
4361
|
var ContentView_default = ContentView;
|
|
4571
4362
|
|
|
4572
4363
|
// src/components/dataForm/DataList.tsx
|
|
4573
|
-
import { Fragment as Fragment10, jsx as
|
|
4364
|
+
import { Fragment as Fragment10, jsx as jsx63, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4574
4365
|
var DataList = (props) => {
|
|
4575
4366
|
console.log(props.dataset, "datasetssssss");
|
|
4576
4367
|
const router = useRouter();
|
|
@@ -4593,7 +4384,7 @@ var DataList = (props) => {
|
|
|
4593
4384
|
if (path.includes(".")) {
|
|
4594
4385
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
4595
4386
|
} else if (Array.isArray(obj[path])) {
|
|
4596
|
-
return obj[path].map((item, index) => /* @__PURE__ */
|
|
4387
|
+
return obj[path].map((item, index) => /* @__PURE__ */ jsx63("div", { children: item }, index));
|
|
4597
4388
|
} else {
|
|
4598
4389
|
return obj[path];
|
|
4599
4390
|
}
|
|
@@ -4649,30 +4440,30 @@ var DataList = (props) => {
|
|
|
4649
4440
|
const renderPageNumbers = () => {
|
|
4650
4441
|
if (pages <= 10) {
|
|
4651
4442
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
4652
|
-
(page) => /* @__PURE__ */
|
|
4443
|
+
(page) => /* @__PURE__ */ jsx63(React45.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx63(
|
|
4653
4444
|
Hyperlink,
|
|
4654
4445
|
{
|
|
4655
4446
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
4656
4447
|
href: builder.getNewPageUrl(page),
|
|
4657
4448
|
children: page
|
|
4658
4449
|
}
|
|
4659
|
-
) : /* @__PURE__ */
|
|
4450
|
+
) : /* @__PURE__ */ jsx63("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)
|
|
4660
4451
|
);
|
|
4661
4452
|
} else {
|
|
4662
4453
|
const showFirstPages = activePageNumber <= 5;
|
|
4663
4454
|
const showLastPages = activePageNumber > pages - 5;
|
|
4664
4455
|
if (showFirstPages) {
|
|
4665
|
-
return /* @__PURE__ */
|
|
4666
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */
|
|
4456
|
+
return /* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
4457
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ jsx63(React45.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx63(
|
|
4667
4458
|
Hyperlink,
|
|
4668
4459
|
{
|
|
4669
4460
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
4670
4461
|
href: builder.getNewPageUrl(page),
|
|
4671
4462
|
children: page
|
|
4672
4463
|
}
|
|
4673
|
-
) : /* @__PURE__ */
|
|
4674
|
-
/* @__PURE__ */
|
|
4675
|
-
/* @__PURE__ */
|
|
4464
|
+
) : /* @__PURE__ */ jsx63("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)),
|
|
4465
|
+
/* @__PURE__ */ jsx63("span", { className: "px-2 py-1", children: "..." }),
|
|
4466
|
+
/* @__PURE__ */ jsx63(
|
|
4676
4467
|
Hyperlink,
|
|
4677
4468
|
{
|
|
4678
4469
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4680,7 +4471,7 @@ var DataList = (props) => {
|
|
|
4680
4471
|
children: pages - 1
|
|
4681
4472
|
}
|
|
4682
4473
|
),
|
|
4683
|
-
/* @__PURE__ */
|
|
4474
|
+
/* @__PURE__ */ jsx63(
|
|
4684
4475
|
Hyperlink,
|
|
4685
4476
|
{
|
|
4686
4477
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4688,7 +4479,7 @@ var DataList = (props) => {
|
|
|
4688
4479
|
children: pages
|
|
4689
4480
|
}
|
|
4690
4481
|
),
|
|
4691
|
-
/* @__PURE__ */
|
|
4482
|
+
/* @__PURE__ */ jsx63("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs35(
|
|
4692
4483
|
"select",
|
|
4693
4484
|
{
|
|
4694
4485
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -4700,18 +4491,18 @@ var DataList = (props) => {
|
|
|
4700
4491
|
}
|
|
4701
4492
|
},
|
|
4702
4493
|
children: [
|
|
4703
|
-
/* @__PURE__ */
|
|
4494
|
+
/* @__PURE__ */ jsx63("option", { className: "", value: "", children: "Jump to" }),
|
|
4704
4495
|
Array.from(
|
|
4705
4496
|
{ length: Math.max(0, pages - 10) },
|
|
4706
4497
|
(_, index) => index + 9
|
|
4707
|
-
).map((page) => /* @__PURE__ */
|
|
4498
|
+
).map((page) => /* @__PURE__ */ jsx63("option", { value: page, children: page }, page))
|
|
4708
4499
|
]
|
|
4709
4500
|
}
|
|
4710
4501
|
) })
|
|
4711
4502
|
] });
|
|
4712
4503
|
} else if (showLastPages) {
|
|
4713
|
-
return /* @__PURE__ */
|
|
4714
|
-
/* @__PURE__ */
|
|
4504
|
+
return /* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
4505
|
+
/* @__PURE__ */ jsx63(
|
|
4715
4506
|
Hyperlink,
|
|
4716
4507
|
{
|
|
4717
4508
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4719,7 +4510,7 @@ var DataList = (props) => {
|
|
|
4719
4510
|
children: "1"
|
|
4720
4511
|
}
|
|
4721
4512
|
),
|
|
4722
|
-
/* @__PURE__ */
|
|
4513
|
+
/* @__PURE__ */ jsx63(
|
|
4723
4514
|
Hyperlink,
|
|
4724
4515
|
{
|
|
4725
4516
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4727,21 +4518,21 @@ var DataList = (props) => {
|
|
|
4727
4518
|
children: "2"
|
|
4728
4519
|
}
|
|
4729
4520
|
),
|
|
4730
|
-
/* @__PURE__ */
|
|
4521
|
+
/* @__PURE__ */ jsx63("span", { className: "px-2 py-1", children: "..." }),
|
|
4731
4522
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
4732
|
-
(page) => /* @__PURE__ */
|
|
4523
|
+
(page) => /* @__PURE__ */ jsx63(React45.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx63(
|
|
4733
4524
|
Hyperlink,
|
|
4734
4525
|
{
|
|
4735
4526
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
4736
4527
|
href: builder.getNewPageUrl(page),
|
|
4737
4528
|
children: page
|
|
4738
4529
|
}
|
|
4739
|
-
) : /* @__PURE__ */
|
|
4530
|
+
) : /* @__PURE__ */ jsx63("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)
|
|
4740
4531
|
)
|
|
4741
4532
|
] });
|
|
4742
4533
|
} else {
|
|
4743
|
-
return /* @__PURE__ */
|
|
4744
|
-
/* @__PURE__ */
|
|
4534
|
+
return /* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
4535
|
+
/* @__PURE__ */ jsx63(
|
|
4745
4536
|
Hyperlink,
|
|
4746
4537
|
{
|
|
4747
4538
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4749,7 +4540,7 @@ var DataList = (props) => {
|
|
|
4749
4540
|
children: "1"
|
|
4750
4541
|
}
|
|
4751
4542
|
),
|
|
4752
|
-
/* @__PURE__ */
|
|
4543
|
+
/* @__PURE__ */ jsx63(
|
|
4753
4544
|
Hyperlink,
|
|
4754
4545
|
{
|
|
4755
4546
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4757,20 +4548,20 @@ var DataList = (props) => {
|
|
|
4757
4548
|
children: "2"
|
|
4758
4549
|
}
|
|
4759
4550
|
),
|
|
4760
|
-
/* @__PURE__ */
|
|
4551
|
+
/* @__PURE__ */ jsx63("span", { className: "px-2 py-1", children: "..." }),
|
|
4761
4552
|
Array.from(
|
|
4762
4553
|
{ length: 5 },
|
|
4763
4554
|
(_, index) => activePageNumber - 2 + index
|
|
4764
|
-
).map((page) => /* @__PURE__ */
|
|
4555
|
+
).map((page) => /* @__PURE__ */ jsx63(React45.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx63(
|
|
4765
4556
|
Hyperlink,
|
|
4766
4557
|
{
|
|
4767
4558
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
4768
4559
|
href: builder.getNewPageUrl(page),
|
|
4769
4560
|
children: page
|
|
4770
4561
|
}
|
|
4771
|
-
) : /* @__PURE__ */
|
|
4772
|
-
/* @__PURE__ */
|
|
4773
|
-
/* @__PURE__ */
|
|
4562
|
+
) : /* @__PURE__ */ jsx63("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)),
|
|
4563
|
+
/* @__PURE__ */ jsx63("span", { className: "px-2 py-1", children: "..." }),
|
|
4564
|
+
/* @__PURE__ */ jsx63(
|
|
4774
4565
|
Hyperlink,
|
|
4775
4566
|
{
|
|
4776
4567
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4778,7 +4569,7 @@ var DataList = (props) => {
|
|
|
4778
4569
|
children: pages - 1
|
|
4779
4570
|
}
|
|
4780
4571
|
),
|
|
4781
|
-
/* @__PURE__ */
|
|
4572
|
+
/* @__PURE__ */ jsx63(
|
|
4782
4573
|
Hyperlink,
|
|
4783
4574
|
{
|
|
4784
4575
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4786,7 +4577,7 @@ var DataList = (props) => {
|
|
|
4786
4577
|
children: pages
|
|
4787
4578
|
}
|
|
4788
4579
|
),
|
|
4789
|
-
/* @__PURE__ */
|
|
4580
|
+
/* @__PURE__ */ jsx63("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs35(
|
|
4790
4581
|
"select",
|
|
4791
4582
|
{
|
|
4792
4583
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -4798,8 +4589,8 @@ var DataList = (props) => {
|
|
|
4798
4589
|
}
|
|
4799
4590
|
},
|
|
4800
4591
|
children: [
|
|
4801
|
-
/* @__PURE__ */
|
|
4802
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */
|
|
4592
|
+
/* @__PURE__ */ jsx63("option", { value: "", children: "Jump to" }),
|
|
4593
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ jsx63("option", { value: page, children: page }, page))
|
|
4803
4594
|
]
|
|
4804
4595
|
}
|
|
4805
4596
|
) })
|
|
@@ -4807,16 +4598,16 @@ var DataList = (props) => {
|
|
|
4807
4598
|
}
|
|
4808
4599
|
}
|
|
4809
4600
|
};
|
|
4810
|
-
return /* @__PURE__ */
|
|
4811
|
-
/* @__PURE__ */
|
|
4812
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */
|
|
4601
|
+
return /* @__PURE__ */ jsxs35(React45.Fragment, { children: [
|
|
4602
|
+
/* @__PURE__ */ jsxs35(ContentView_default, { isDataFound, children: [
|
|
4603
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs35(
|
|
4813
4604
|
"div",
|
|
4814
4605
|
{
|
|
4815
4606
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md border-b border-neutral-200 sticky top-0`,
|
|
4816
4607
|
children: [
|
|
4817
|
-
props.title ? /* @__PURE__ */
|
|
4818
|
-
/* @__PURE__ */
|
|
4819
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
4608
|
+
props.title ? /* @__PURE__ */ jsx63("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx63("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ jsx63("div", {}),
|
|
4609
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-3", children: [
|
|
4610
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx63(
|
|
4820
4611
|
InputControl_default,
|
|
4821
4612
|
{
|
|
4822
4613
|
name: filter.name,
|
|
@@ -4831,15 +4622,15 @@ var DataList = (props) => {
|
|
|
4831
4622
|
},
|
|
4832
4623
|
filter.name
|
|
4833
4624
|
)),
|
|
4834
|
-
props.addLinkHref && /* @__PURE__ */
|
|
4625
|
+
props.addLinkHref && /* @__PURE__ */ jsxs35(
|
|
4835
4626
|
Hyperlink,
|
|
4836
4627
|
{
|
|
4837
4628
|
className: "gap-1",
|
|
4838
4629
|
linkType: "Primary" /* Solid */,
|
|
4839
4630
|
href: props.addLinkHref,
|
|
4840
4631
|
children: [
|
|
4841
|
-
/* @__PURE__ */
|
|
4842
|
-
/* @__PURE__ */
|
|
4632
|
+
/* @__PURE__ */ jsx63(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
4633
|
+
/* @__PURE__ */ jsx63("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
4843
4634
|
]
|
|
4844
4635
|
}
|
|
4845
4636
|
)
|
|
@@ -4847,8 +4638,8 @@ var DataList = (props) => {
|
|
|
4847
4638
|
]
|
|
4848
4639
|
}
|
|
4849
4640
|
),
|
|
4850
|
-
/* @__PURE__ */
|
|
4851
|
-
/* @__PURE__ */
|
|
4641
|
+
/* @__PURE__ */ jsx63("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ jsxs35("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
4642
|
+
/* @__PURE__ */ jsx63("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ jsx63("tr", { children: props?.columns?.map((column) => {
|
|
4852
4643
|
let url = builder.getNewOrderByUrl(column.name);
|
|
4853
4644
|
let icon = "chevronUpDown";
|
|
4854
4645
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -4858,36 +4649,36 @@ var DataList = (props) => {
|
|
|
4858
4649
|
icon = "chevronUp";
|
|
4859
4650
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
4860
4651
|
}
|
|
4861
|
-
return /* @__PURE__ */
|
|
4652
|
+
return /* @__PURE__ */ jsx63(
|
|
4862
4653
|
"th",
|
|
4863
4654
|
{
|
|
4864
4655
|
className: "px-6 py-3 text-left font-medium cursor-pointer bg-neutral-soft " + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
4865
|
-
children: /* @__PURE__ */
|
|
4866
|
-
/* @__PURE__ */
|
|
4867
|
-
column.enableSorting && /* @__PURE__ */
|
|
4656
|
+
children: /* @__PURE__ */ jsx63(Hyperlink, { href: url, className: "!text-neutral-contrast ", children: /* @__PURE__ */ jsxs35("span", { className: "flex items-center space-x-1", children: [
|
|
4657
|
+
/* @__PURE__ */ jsx63("span", { className: "text-black", children: column.label }),
|
|
4658
|
+
column.enableSorting && /* @__PURE__ */ jsx63(Icon_default, { className: "w-4 h-4", name: icon })
|
|
4868
4659
|
] }) })
|
|
4869
4660
|
},
|
|
4870
4661
|
column.name
|
|
4871
4662
|
);
|
|
4872
4663
|
}) }) }),
|
|
4873
|
-
/* @__PURE__ */
|
|
4664
|
+
/* @__PURE__ */ jsx63("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
4874
4665
|
let validityClass = "";
|
|
4875
4666
|
console.log("dataitem", dataitem);
|
|
4876
4667
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
4877
4668
|
validityClass = "bg-alert-200";
|
|
4878
4669
|
}
|
|
4879
|
-
return /* @__PURE__ */
|
|
4670
|
+
return /* @__PURE__ */ jsx63("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
4880
4671
|
console.log("column", column);
|
|
4881
|
-
return /* @__PURE__ */
|
|
4672
|
+
return /* @__PURE__ */ jsx63(React45.Fragment, { children: /* @__PURE__ */ jsx63(
|
|
4882
4673
|
"td",
|
|
4883
4674
|
{
|
|
4884
4675
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
4885
|
-
children: column.addhref === true ? /* @__PURE__ */
|
|
4676
|
+
children: column.addhref === true ? /* @__PURE__ */ jsx63(
|
|
4886
4677
|
Hyperlink,
|
|
4887
4678
|
{
|
|
4888
4679
|
className: "",
|
|
4889
4680
|
href: `https://${dataitem[column.name]}`,
|
|
4890
|
-
children: /* @__PURE__ */
|
|
4681
|
+
children: /* @__PURE__ */ jsx63(
|
|
4891
4682
|
ViewControl_default,
|
|
4892
4683
|
{
|
|
4893
4684
|
controlType: column.controlType,
|
|
@@ -4900,11 +4691,11 @@ var DataList = (props) => {
|
|
|
4900
4691
|
}
|
|
4901
4692
|
)
|
|
4902
4693
|
}
|
|
4903
|
-
) : column.showAsLink ? /* @__PURE__ */
|
|
4694
|
+
) : column.showAsLink ? /* @__PURE__ */ jsx63(
|
|
4904
4695
|
Hyperlink,
|
|
4905
4696
|
{
|
|
4906
4697
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
4907
|
-
children: /* @__PURE__ */
|
|
4698
|
+
children: /* @__PURE__ */ jsx63(
|
|
4908
4699
|
ViewControl_default,
|
|
4909
4700
|
{
|
|
4910
4701
|
controlType: column.controlType,
|
|
@@ -4914,7 +4705,7 @@ var DataList = (props) => {
|
|
|
4914
4705
|
}
|
|
4915
4706
|
)
|
|
4916
4707
|
}
|
|
4917
|
-
) : /* @__PURE__ */
|
|
4708
|
+
) : /* @__PURE__ */ jsx63(
|
|
4918
4709
|
ViewControl_default,
|
|
4919
4710
|
{
|
|
4920
4711
|
controlType: column.controlType,
|
|
@@ -4928,10 +4719,10 @@ var DataList = (props) => {
|
|
|
4928
4719
|
}) }, index);
|
|
4929
4720
|
}) })
|
|
4930
4721
|
] }) }),
|
|
4931
|
-
/* @__PURE__ */
|
|
4932
|
-
/* @__PURE__ */
|
|
4933
|
-
/* @__PURE__ */
|
|
4934
|
-
activePageNumber > 1 && /* @__PURE__ */
|
|
4722
|
+
/* @__PURE__ */ jsx63("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ jsxs35("div", { className: "flex items-center justify-between", children: [
|
|
4723
|
+
/* @__PURE__ */ jsx63("div", { className: "text-gray-700", children: label }),
|
|
4724
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex space-x-2 items-center", children: [
|
|
4725
|
+
activePageNumber > 1 && /* @__PURE__ */ jsx63(
|
|
4935
4726
|
Hyperlink,
|
|
4936
4727
|
{
|
|
4937
4728
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -4939,9 +4730,9 @@ var DataList = (props) => {
|
|
|
4939
4730
|
children: "Prev"
|
|
4940
4731
|
}
|
|
4941
4732
|
),
|
|
4942
|
-
activePageNumber <= 1 && /* @__PURE__ */
|
|
4733
|
+
activePageNumber <= 1 && /* @__PURE__ */ jsx63("div", { className: "px-3 py-1 rounded-l-md border border-gray-300 bg-gray-200 text-gray-500 hover:bg-gray-200", children: "Prev" }),
|
|
4943
4734
|
renderPageNumbers(),
|
|
4944
|
-
activePageNumber < pages && /* @__PURE__ */
|
|
4735
|
+
activePageNumber < pages && /* @__PURE__ */ jsx63(
|
|
4945
4736
|
Hyperlink,
|
|
4946
4737
|
{
|
|
4947
4738
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -4949,19 +4740,19 @@ var DataList = (props) => {
|
|
|
4949
4740
|
children: "Next"
|
|
4950
4741
|
}
|
|
4951
4742
|
),
|
|
4952
|
-
activePageNumber >= pages && /* @__PURE__ */
|
|
4743
|
+
activePageNumber >= pages && /* @__PURE__ */ jsx63("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
4953
4744
|
] })
|
|
4954
4745
|
] }) })
|
|
4955
4746
|
] }),
|
|
4956
|
-
/* @__PURE__ */
|
|
4957
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */
|
|
4747
|
+
/* @__PURE__ */ jsxs35(NoContentView_default, { isDataFound, children: [
|
|
4748
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs35(
|
|
4958
4749
|
"div",
|
|
4959
4750
|
{
|
|
4960
4751
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md border-b border-neutral-200`,
|
|
4961
4752
|
children: [
|
|
4962
|
-
props.title ? /* @__PURE__ */
|
|
4963
|
-
/* @__PURE__ */
|
|
4964
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
4753
|
+
props.title ? /* @__PURE__ */ jsx63("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx63("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ jsx63("div", {}),
|
|
4754
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-3", children: [
|
|
4755
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx63(
|
|
4965
4756
|
InputControl_default,
|
|
4966
4757
|
{
|
|
4967
4758
|
name: filter.name,
|
|
@@ -4976,15 +4767,15 @@ var DataList = (props) => {
|
|
|
4976
4767
|
},
|
|
4977
4768
|
filter.name
|
|
4978
4769
|
)),
|
|
4979
|
-
props.addLinkHref && /* @__PURE__ */
|
|
4770
|
+
props.addLinkHref && /* @__PURE__ */ jsxs35(
|
|
4980
4771
|
Hyperlink,
|
|
4981
4772
|
{
|
|
4982
4773
|
className: "gap-1",
|
|
4983
4774
|
linkType: "Primary" /* Solid */,
|
|
4984
4775
|
href: props.addLinkHref,
|
|
4985
4776
|
children: [
|
|
4986
|
-
/* @__PURE__ */
|
|
4987
|
-
/* @__PURE__ */
|
|
4777
|
+
/* @__PURE__ */ jsx63(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
4778
|
+
/* @__PURE__ */ jsx63("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
4988
4779
|
]
|
|
4989
4780
|
}
|
|
4990
4781
|
)
|
|
@@ -4992,8 +4783,8 @@ var DataList = (props) => {
|
|
|
4992
4783
|
]
|
|
4993
4784
|
}
|
|
4994
4785
|
),
|
|
4995
|
-
/* @__PURE__ */
|
|
4996
|
-
/* @__PURE__ */
|
|
4786
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
4787
|
+
/* @__PURE__ */ jsx63("div", { children: /* @__PURE__ */ jsx63("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ jsx63("thead", { className: "bg-gray-50", children: /* @__PURE__ */ jsx63("tr", { children: props?.columns?.map((column) => {
|
|
4997
4788
|
let url = builder.getNewOrderByUrl(column.name);
|
|
4998
4789
|
let icon = "chevronUpDown";
|
|
4999
4790
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -5003,19 +4794,19 @@ var DataList = (props) => {
|
|
|
5003
4794
|
icon = "chevronUp";
|
|
5004
4795
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
5005
4796
|
}
|
|
5006
|
-
return /* @__PURE__ */
|
|
4797
|
+
return /* @__PURE__ */ jsx63(
|
|
5007
4798
|
"th",
|
|
5008
4799
|
{
|
|
5009
4800
|
className: "px-6 py-3 text-left font-medium cursor-pointer bg-neutral-soft " + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
5010
|
-
children: /* @__PURE__ */
|
|
5011
|
-
/* @__PURE__ */
|
|
5012
|
-
column.enableSorting && /* @__PURE__ */
|
|
4801
|
+
children: /* @__PURE__ */ jsx63(Hyperlink, { href: url, className: "text-body-950", children: /* @__PURE__ */ jsxs35("span", { className: "flex items-center space-x-1", children: [
|
|
4802
|
+
/* @__PURE__ */ jsx63("span", { children: column.label }),
|
|
4803
|
+
column.enableSorting && /* @__PURE__ */ jsx63(Icon_default, { className: "w-4 h-4", name: icon })
|
|
5013
4804
|
] }) })
|
|
5014
4805
|
},
|
|
5015
4806
|
column.name
|
|
5016
4807
|
);
|
|
5017
4808
|
}) }) }) }) }),
|
|
5018
|
-
/* @__PURE__ */
|
|
4809
|
+
/* @__PURE__ */ jsx63("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
5019
4810
|
] })
|
|
5020
4811
|
] })
|
|
5021
4812
|
] });
|
|
@@ -5023,9 +4814,9 @@ var DataList = (props) => {
|
|
|
5023
4814
|
var DataList_default = DataList;
|
|
5024
4815
|
|
|
5025
4816
|
// src/components/dataForm/DataListRenderer.tsx
|
|
5026
|
-
import
|
|
4817
|
+
import React46, { useState as useState9, useEffect as useEffect10 } from "react";
|
|
5027
4818
|
import { usePathname as usePathname2 } from "next/navigation";
|
|
5028
|
-
import { jsx as
|
|
4819
|
+
import { jsx as jsx64, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
5029
4820
|
var viewControlMap = {
|
|
5030
4821
|
number: ViewControlTypes.number,
|
|
5031
4822
|
lineText: ViewControlTypes.lineText,
|
|
@@ -5114,9 +4905,9 @@ var DataListRenderer = ({
|
|
|
5114
4905
|
const [tabItem, setTabItem] = useState9();
|
|
5115
4906
|
const activeTab = tabItem?.find((tab) => tab.isActive);
|
|
5116
4907
|
const activeHref = activeTab ? resolveRoutePlaceholders2(activeTab.landingPageUrl, params) : pathname;
|
|
5117
|
-
return /* @__PURE__ */
|
|
5118
|
-
widgetProps && /* @__PURE__ */
|
|
5119
|
-
/* @__PURE__ */
|
|
4908
|
+
return /* @__PURE__ */ jsxs36(React46.Fragment, { children: [
|
|
4909
|
+
widgetProps && /* @__PURE__ */ jsx64(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
4910
|
+
/* @__PURE__ */ jsx64(
|
|
5120
4911
|
DataList_default,
|
|
5121
4912
|
{
|
|
5122
4913
|
addLinkHref,
|
|
@@ -5135,10 +4926,10 @@ var DataListRenderer = ({
|
|
|
5135
4926
|
var DataListRenderer_default = DataListRenderer;
|
|
5136
4927
|
|
|
5137
4928
|
// src/components/dataForm/DataForm.tsx
|
|
5138
|
-
import
|
|
4929
|
+
import React48, { useCallback as useCallback5, useEffect as useEffect11, useReducer as useReducer3, useRef as useRef4 } from "react";
|
|
5139
4930
|
|
|
5140
4931
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
5141
|
-
import
|
|
4932
|
+
import React47, { useCallback as useCallback4 } from "react";
|
|
5142
4933
|
|
|
5143
4934
|
// src/components/dataForm/StyleTypes.tsx
|
|
5144
4935
|
var StyleTypes2 = /* @__PURE__ */ ((StyleTypes3) => {
|
|
@@ -5161,7 +4952,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
5161
4952
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
5162
4953
|
|
|
5163
4954
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
5164
|
-
import { jsx as
|
|
4955
|
+
import { jsx as jsx65, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
5165
4956
|
var DataFormChildSection = (props) => {
|
|
5166
4957
|
const { section } = props;
|
|
5167
4958
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -5229,14 +5020,14 @@ var DataFormChildSection = (props) => {
|
|
|
5229
5020
|
childItemsToRender,
|
|
5230
5021
|
allChildItems: childItems
|
|
5231
5022
|
});
|
|
5232
|
-
return /* @__PURE__ */
|
|
5233
|
-
section.sectionTitle && /* @__PURE__ */
|
|
5234
|
-
/* @__PURE__ */
|
|
5235
|
-
/* @__PURE__ */
|
|
5236
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */
|
|
5237
|
-
return /* @__PURE__ */
|
|
5023
|
+
return /* @__PURE__ */ jsx65(React47.Fragment, { children: /* @__PURE__ */ jsxs37("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
5024
|
+
section.sectionTitle && /* @__PURE__ */ jsx65("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
5025
|
+
/* @__PURE__ */ jsx65("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ jsxs37("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
5026
|
+
/* @__PURE__ */ jsx65("div", { children: /* @__PURE__ */ jsxs37("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
5027
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ jsx65("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
5028
|
+
return /* @__PURE__ */ jsxs37("tr", { className: "", children: [
|
|
5238
5029
|
sectionRow.elements.map((field, index) => {
|
|
5239
|
-
return /* @__PURE__ */
|
|
5030
|
+
return /* @__PURE__ */ jsx65(
|
|
5240
5031
|
"th",
|
|
5241
5032
|
{
|
|
5242
5033
|
className: "py-3 font-normal text-left",
|
|
@@ -5245,21 +5036,21 @@ var DataFormChildSection = (props) => {
|
|
|
5245
5036
|
field.name
|
|
5246
5037
|
);
|
|
5247
5038
|
}),
|
|
5248
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
5039
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx65("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
5249
5040
|
] }, sectionRowIndex);
|
|
5250
5041
|
}) }),
|
|
5251
|
-
/* @__PURE__ */
|
|
5042
|
+
/* @__PURE__ */ jsx65("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
5252
5043
|
const { item, originalIndex } = visibleItem;
|
|
5253
5044
|
const rowKey = originalIndex;
|
|
5254
|
-
return /* @__PURE__ */
|
|
5045
|
+
return /* @__PURE__ */ jsx65(React47.Fragment, { children: section.sectionRows.map(
|
|
5255
5046
|
(sectionRow, sectionRowIndex) => {
|
|
5256
|
-
return /* @__PURE__ */
|
|
5047
|
+
return /* @__PURE__ */ jsxs37(
|
|
5257
5048
|
"tr",
|
|
5258
5049
|
{
|
|
5259
5050
|
className: "",
|
|
5260
5051
|
children: [
|
|
5261
5052
|
sectionRow.elements.map((field, index) => {
|
|
5262
|
-
return /* @__PURE__ */
|
|
5053
|
+
return /* @__PURE__ */ jsx65("td", { children: /* @__PURE__ */ jsx65("div", { className: "flex-1", children: /* @__PURE__ */ jsx65("div", { className: "w-11/12", children: /* @__PURE__ */ jsx65(
|
|
5263
5054
|
InputControl_default,
|
|
5264
5055
|
{
|
|
5265
5056
|
index: filteredIndex,
|
|
@@ -5279,7 +5070,7 @@ var DataFormChildSection = (props) => {
|
|
|
5279
5070
|
}
|
|
5280
5071
|
) }) }) }, field.name);
|
|
5281
5072
|
}),
|
|
5282
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
5073
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx65("td", { children: /* @__PURE__ */ jsx65(
|
|
5283
5074
|
ClientButton_default,
|
|
5284
5075
|
{
|
|
5285
5076
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -5288,7 +5079,7 @@ var DataFormChildSection = (props) => {
|
|
|
5288
5079
|
},
|
|
5289
5080
|
dataRole: "delete",
|
|
5290
5081
|
tabIndex: -1,
|
|
5291
|
-
children: /* @__PURE__ */
|
|
5082
|
+
children: /* @__PURE__ */ jsx65(
|
|
5292
5083
|
Icon_default,
|
|
5293
5084
|
{
|
|
5294
5085
|
className: "w-4 h-4",
|
|
@@ -5305,7 +5096,7 @@ var DataFormChildSection = (props) => {
|
|
|
5305
5096
|
) }, rowKey);
|
|
5306
5097
|
}) })
|
|
5307
5098
|
] }) }),
|
|
5308
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
5099
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx65("div", { className: "ml-1", children: /* @__PURE__ */ jsx65(
|
|
5309
5100
|
ClientButton_default,
|
|
5310
5101
|
{
|
|
5311
5102
|
ButtonType: "Link" /* Link */,
|
|
@@ -5320,7 +5111,7 @@ var DataFormChildSection = (props) => {
|
|
|
5320
5111
|
var DataFormChildSection_default = DataFormChildSection;
|
|
5321
5112
|
|
|
5322
5113
|
// src/components/dataForm/DataForm.tsx
|
|
5323
|
-
import { jsx as
|
|
5114
|
+
import { jsx as jsx66, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
5324
5115
|
var DataForm = (props) => {
|
|
5325
5116
|
const formRef = useRef4(null);
|
|
5326
5117
|
console.log(props.dataItem, "dssads");
|
|
@@ -5540,19 +5331,19 @@ var DataForm = (props) => {
|
|
|
5540
5331
|
return false;
|
|
5541
5332
|
}
|
|
5542
5333
|
}
|
|
5543
|
-
return /* @__PURE__ */
|
|
5544
|
-
props.title && /* @__PURE__ */
|
|
5334
|
+
return /* @__PURE__ */ jsx66(React48.Fragment, { children: /* @__PURE__ */ jsxs38("div", { className: "flex-grow flex flex-col", children: [
|
|
5335
|
+
props.title && /* @__PURE__ */ jsx66("div", { className: "inline-flex items-center gap-2 px-6 py-3 border border-neutral-200 bg-white shadow-sm rounded-t-md", children: /* @__PURE__ */ jsxs38(
|
|
5545
5336
|
"div",
|
|
5546
5337
|
{
|
|
5547
5338
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
5548
5339
|
onClick: () => window.history.back(),
|
|
5549
5340
|
children: [
|
|
5550
|
-
/* @__PURE__ */
|
|
5551
|
-
/* @__PURE__ */
|
|
5341
|
+
/* @__PURE__ */ jsx66(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
5342
|
+
/* @__PURE__ */ jsx66("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
5552
5343
|
]
|
|
5553
5344
|
}
|
|
5554
5345
|
) }),
|
|
5555
|
-
/* @__PURE__ */
|
|
5346
|
+
/* @__PURE__ */ jsx66(
|
|
5556
5347
|
"form",
|
|
5557
5348
|
{
|
|
5558
5349
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -5573,8 +5364,8 @@ var DataForm = (props) => {
|
|
|
5573
5364
|
}
|
|
5574
5365
|
}
|
|
5575
5366
|
},
|
|
5576
|
-
children: /* @__PURE__ */
|
|
5577
|
-
return /* @__PURE__ */
|
|
5367
|
+
children: /* @__PURE__ */ jsx66("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
5368
|
+
return /* @__PURE__ */ jsx66(React48.Fragment, { children: !section.isChildSection && /* @__PURE__ */ jsxs38("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
5578
5369
|
section.sectionRows?.map(
|
|
5579
5370
|
(sectionRow, sectionRowIndex) => {
|
|
5580
5371
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -5585,14 +5376,14 @@ var DataForm = (props) => {
|
|
|
5585
5376
|
sectionRow.visible
|
|
5586
5377
|
);
|
|
5587
5378
|
}
|
|
5588
|
-
return /* @__PURE__ */
|
|
5589
|
-
return /* @__PURE__ */
|
|
5379
|
+
return /* @__PURE__ */ jsx66(React48.Fragment, { children: isVisible && /* @__PURE__ */ jsx66("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
5380
|
+
return /* @__PURE__ */ jsxs38(
|
|
5590
5381
|
"div",
|
|
5591
5382
|
{
|
|
5592
5383
|
className: sectionRow.grow ? "grow" : "",
|
|
5593
5384
|
children: [
|
|
5594
|
-
/* @__PURE__ */
|
|
5595
|
-
/* @__PURE__ */
|
|
5385
|
+
/* @__PURE__ */ jsx66("div", { children: field.controlType }),
|
|
5386
|
+
/* @__PURE__ */ jsx66(
|
|
5596
5387
|
InputControl_default,
|
|
5597
5388
|
{
|
|
5598
5389
|
name: field.name,
|
|
@@ -5622,12 +5413,12 @@ var DataForm = (props) => {
|
|
|
5622
5413
|
}) }) }, sectionRowIndex);
|
|
5623
5414
|
}
|
|
5624
5415
|
),
|
|
5625
|
-
/* @__PURE__ */
|
|
5416
|
+
/* @__PURE__ */ jsx66("div", { children: section.childSections?.map(
|
|
5626
5417
|
(childSection, childSectionIndex) => {
|
|
5627
|
-
return /* @__PURE__ */
|
|
5418
|
+
return /* @__PURE__ */ jsx66("div", { children: childSection.name && evalutateCondition(
|
|
5628
5419
|
formState.inputValues,
|
|
5629
5420
|
childSection.visible
|
|
5630
|
-
) && /* @__PURE__ */
|
|
5421
|
+
) && /* @__PURE__ */ jsx66(
|
|
5631
5422
|
DataFormChildSection_default,
|
|
5632
5423
|
{
|
|
5633
5424
|
section: childSection,
|
|
@@ -5642,8 +5433,8 @@ var DataForm = (props) => {
|
|
|
5642
5433
|
}) })
|
|
5643
5434
|
}
|
|
5644
5435
|
),
|
|
5645
|
-
/* @__PURE__ */
|
|
5646
|
-
/* @__PURE__ */
|
|
5436
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
5437
|
+
/* @__PURE__ */ jsx66("div", { children: props.additionalActions && /* @__PURE__ */ jsx66(
|
|
5647
5438
|
Button_default,
|
|
5648
5439
|
{
|
|
5649
5440
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -5651,7 +5442,7 @@ var DataForm = (props) => {
|
|
|
5651
5442
|
children: props.additionalActions.title
|
|
5652
5443
|
}
|
|
5653
5444
|
) }),
|
|
5654
|
-
/* @__PURE__ */
|
|
5445
|
+
/* @__PURE__ */ jsx66("div", { children: props.onDelete && /* @__PURE__ */ jsx66(
|
|
5655
5446
|
Button_default,
|
|
5656
5447
|
{
|
|
5657
5448
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -5662,7 +5453,7 @@ var DataForm = (props) => {
|
|
|
5662
5453
|
children: "Delete"
|
|
5663
5454
|
}
|
|
5664
5455
|
) }),
|
|
5665
|
-
/* @__PURE__ */
|
|
5456
|
+
/* @__PURE__ */ jsx66("div", { children: props.onClick && /* @__PURE__ */ jsx66(
|
|
5666
5457
|
Button_default,
|
|
5667
5458
|
{
|
|
5668
5459
|
onValidate,
|
|
@@ -5679,7 +5470,7 @@ var DataForm = (props) => {
|
|
|
5679
5470
|
var DataForm_default = DataForm;
|
|
5680
5471
|
|
|
5681
5472
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
5682
|
-
import { jsx as
|
|
5473
|
+
import { jsx as jsx67, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
5683
5474
|
function getAction(actions, code) {
|
|
5684
5475
|
return actions?.find((a) => a.actionCode === code);
|
|
5685
5476
|
}
|
|
@@ -5705,9 +5496,9 @@ var DataFormRenderer = ({
|
|
|
5705
5496
|
"Delete"
|
|
5706
5497
|
);
|
|
5707
5498
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
5708
|
-
return /* @__PURE__ */
|
|
5709
|
-
widgetProps && /* @__PURE__ */
|
|
5710
|
-
/* @__PURE__ */
|
|
5499
|
+
return /* @__PURE__ */ jsxs39("div", { className: "flex-grow flex flex-col", children: [
|
|
5500
|
+
widgetProps && /* @__PURE__ */ jsx67(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
5501
|
+
/* @__PURE__ */ jsx67(
|
|
5711
5502
|
DataForm_default,
|
|
5712
5503
|
{
|
|
5713
5504
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|