@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260326061134 → 0.8.1-dev.20260326064410
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/index.js +638 -479
- package/dist/index.mjs +604 -445
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -45,47 +45,192 @@ var NumberView_default = NumberView;
|
|
|
45
45
|
|
|
46
46
|
// src/components/controls/view/DateView.tsx
|
|
47
47
|
import React2 from "react";
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
|
|
49
|
+
// src/components/controls/view/TimeZoneAbbrevations.tsx
|
|
50
|
+
var timeZoneAbbreviations = {
|
|
51
|
+
"Asia/Calcutta": "IST",
|
|
52
|
+
"Asia/Kolkata": "IST",
|
|
53
|
+
"America/New_York": "EST",
|
|
54
|
+
"America/Los_Angeles": "PST",
|
|
55
|
+
"Europe/London": "GMT",
|
|
56
|
+
"Europe/Paris": "CET",
|
|
57
|
+
"Asia/Tokyo": "JST",
|
|
58
|
+
"America/Chicago": "CST",
|
|
59
|
+
"America/Denver": "MST",
|
|
60
|
+
"Asia/Shanghai": "CST",
|
|
61
|
+
"Asia/Hong_Kong": "HKT",
|
|
62
|
+
"Australia/Sydney": "AEST",
|
|
63
|
+
"Australia/Melbourne": "AEST",
|
|
64
|
+
"Australia/Perth": "AWST",
|
|
65
|
+
"Pacific/Auckland": "NZST",
|
|
66
|
+
"Europe/Berlin": "CET",
|
|
67
|
+
"Europe/Madrid": "CET",
|
|
68
|
+
"Europe/Rome": "CET",
|
|
69
|
+
"Europe/Athens": "EET",
|
|
70
|
+
"Europe/Istanbul": "TRT",
|
|
71
|
+
"Africa/Cairo": "EET",
|
|
72
|
+
"Africa/Johannesburg": "SAST",
|
|
73
|
+
"Asia/Dubai": "GST",
|
|
74
|
+
"Asia/Singapore": "SGT",
|
|
75
|
+
"Asia/Seoul": "KST",
|
|
76
|
+
"America/Toronto": "EST",
|
|
77
|
+
"America/Vancouver": "PST",
|
|
78
|
+
"America/Sao_Paulo": "BRT",
|
|
79
|
+
"America/Mexico_City": "CST",
|
|
80
|
+
"Asia/Manila": "PHT",
|
|
81
|
+
"Asia/Jakarta": "WIB",
|
|
82
|
+
"Asia/Bangkok": "ICT",
|
|
83
|
+
"Asia/Karachi": "PKT",
|
|
84
|
+
"Asia/Tehran": "IRST",
|
|
85
|
+
"Asia/Baghdad": "AST",
|
|
86
|
+
"Europe/Moscow": "MSK",
|
|
87
|
+
"Europe/Amsterdam": "CET",
|
|
88
|
+
"Europe/Brussels": "CET",
|
|
89
|
+
"Europe/Zurich": "CET",
|
|
90
|
+
"America/Anchorage": "AKST",
|
|
91
|
+
"Pacific/Honolulu": "HST",
|
|
92
|
+
"Antarctica/McMurdo": "NZST",
|
|
93
|
+
"Atlantic/Reykjavik": "GMT",
|
|
94
|
+
"Asia/Riyadh": "AST",
|
|
95
|
+
"America/Argentina/Buenos_Aires": "ART",
|
|
96
|
+
"America/Bogota": "COT",
|
|
97
|
+
"Africa/Nairobi": "EAT",
|
|
98
|
+
"Asia/Kuala_Lumpur": "MYT",
|
|
99
|
+
"Asia/Ho_Chi_Minh": "ICT",
|
|
100
|
+
"Europe/Warsaw": "CET",
|
|
101
|
+
"Europe/Prague": "CET",
|
|
102
|
+
"America/Phoenix": "MST",
|
|
103
|
+
"America/Indianapolis": "EST",
|
|
104
|
+
"Pacific/Fiji": "FJT",
|
|
105
|
+
"Asia/Colombo": "IST",
|
|
106
|
+
"Africa/Lagos": "WAT",
|
|
107
|
+
"America/Caracas": "VET",
|
|
108
|
+
"America/Halifax": "AST",
|
|
109
|
+
"Pacific/Tahiti": "TAHT",
|
|
110
|
+
"America/St_Johns": "NST",
|
|
111
|
+
"Europe/Bucharest": "EET",
|
|
112
|
+
"Europe/Helsinki": "EET",
|
|
113
|
+
"Europe/Kiev": "EET",
|
|
114
|
+
"Europe/Oslo": "CET",
|
|
115
|
+
"Europe/Stockholm": "CET",
|
|
116
|
+
"Europe/Lisbon": "WET",
|
|
117
|
+
"Asia/Beirut": "EET",
|
|
118
|
+
"Asia/Damascus": "EET",
|
|
119
|
+
"Asia/Jerusalem": "IST",
|
|
120
|
+
"Asia/Amman": "EET",
|
|
121
|
+
"America/Santiago": "CLT",
|
|
122
|
+
"America/Lima": "PET",
|
|
123
|
+
"America/Montevideo": "UYT",
|
|
124
|
+
"Asia/Tashkent": "UZT",
|
|
125
|
+
"Asia/Yerevan": "AMT",
|
|
126
|
+
"Asia/Baku": "AZT",
|
|
127
|
+
"Europe/Vilnius": "EET",
|
|
128
|
+
"Europe/Riga": "EET",
|
|
129
|
+
"Europe/Tallinn": "EET",
|
|
130
|
+
"Europe/Sofia": "EET",
|
|
131
|
+
"Africa/Casablanca": "WET",
|
|
132
|
+
"America/Guatemala": "CST",
|
|
133
|
+
"America/Panama": "EST",
|
|
134
|
+
"America/Costa_Rica": "CST",
|
|
135
|
+
"Pacific/Port_Moresby": "PGT",
|
|
136
|
+
"Asia/Makassar": "WITA",
|
|
137
|
+
"Asia/Vladivostok": "VLAT",
|
|
138
|
+
"Asia/Krasnoyarsk": "KRAT",
|
|
139
|
+
"Asia/Novosibirsk": "NOVT",
|
|
140
|
+
"Asia/Yakutsk": "YAKT",
|
|
141
|
+
"Asia/Sakhalin": "SAKT",
|
|
142
|
+
"Asia/Ulaanbaatar": "ULAT",
|
|
143
|
+
"Asia/Choibalsan": "CHOT",
|
|
144
|
+
"Asia/Omsk": "OMST",
|
|
145
|
+
"Asia/Kamchatka": "PETT",
|
|
146
|
+
"Pacific/Pago_Pago": "SST",
|
|
147
|
+
"Pacific/Guam": "ChST",
|
|
148
|
+
"Pacific/Saipan": "ChST",
|
|
149
|
+
"Pacific/Palau": "PWT",
|
|
150
|
+
"Pacific/Efate": "VUT",
|
|
151
|
+
"Pacific/Kosrae": "KOST",
|
|
152
|
+
"Pacific/Nauru": "NRT",
|
|
153
|
+
"Pacific/Tarawa": "GILT",
|
|
154
|
+
"Pacific/Enderbury": "PHOT",
|
|
155
|
+
"Pacific/Fakaofo": "TKT",
|
|
156
|
+
"Pacific/Chatham": "CHAST",
|
|
157
|
+
"Pacific/Tongatapu": "TOT",
|
|
158
|
+
"Pacific/Funafuti": "TVT",
|
|
159
|
+
"Pacific/Majuro": "MHT",
|
|
160
|
+
"Pacific/Kwajalein": "MHT",
|
|
161
|
+
"Pacific/Wake": "WAKT",
|
|
162
|
+
"Pacific/Wallis": "WFT"
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
// src/components/controls/view/DateView.tsx
|
|
166
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
50
167
|
var DateView = (props) => {
|
|
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
|
+
}).format(date);
|
|
188
|
+
};
|
|
189
|
+
console.log("DateView props:", props);
|
|
190
|
+
const parseAndFormatDate = (dateString, format) => {
|
|
191
|
+
const parsedDate = /* @__PURE__ */ new Date(dateString + "Z");
|
|
192
|
+
if (format === "relative") {
|
|
193
|
+
return getRelativeTime(dateString);
|
|
194
|
+
}
|
|
195
|
+
switch (props.controlType) {
|
|
196
|
+
case "date":
|
|
197
|
+
return new Intl.DateTimeFormat("en", {
|
|
198
|
+
day: "2-digit",
|
|
199
|
+
month: "short",
|
|
200
|
+
year: "numeric"
|
|
201
|
+
}).format(parsedDate);
|
|
202
|
+
case "time":
|
|
203
|
+
return `${formatTime(parsedDate)} ${getTimeZoneAbbreviation(Intl.DateTimeFormat().resolvedOptions().timeZone)} (${getTimePeriod(parsedDate)})`;
|
|
204
|
+
default:
|
|
205
|
+
return parsedDate.getSeconds() === 0 ? new Intl.DateTimeFormat("en", { day: "2-digit", month: "short", year: "numeric", hour: "2-digit", minute: "2-digit" }).format(parsedDate) : new Intl.DateTimeFormat("en", { day: "2-digit", month: "short", year: "numeric", hour: "2-digit", minute: "2-digit", second: "2-digit" }).format(parsedDate);
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
const formatTime = (date) => {
|
|
209
|
+
return date.getSeconds() === 0 ? new Intl.DateTimeFormat("en", { hour: "2-digit", minute: "2-digit" }).format(date) : new Intl.DateTimeFormat("en", { hour: "2-digit", minute: "2-digit", second: "2-digit" }).format(date);
|
|
210
|
+
};
|
|
211
|
+
const getTimePeriod = (date) => {
|
|
212
|
+
const hours = date.getHours();
|
|
213
|
+
if (hours >= 5 && hours < 8) return "Early Morning";
|
|
214
|
+
if (hours >= 8 && hours < 12) return "Morning";
|
|
215
|
+
if (hours >= 12 && hours < 14) return "Noon";
|
|
216
|
+
if (hours >= 14 && hours < 17) return "Afternoon";
|
|
217
|
+
if (hours >= 17 && hours < 20) return "Evening";
|
|
218
|
+
if (hours >= 20 && hours < 22) return "Late Evening";
|
|
219
|
+
if (hours >= 22 || hours < 5) return "Night";
|
|
220
|
+
return "Late Night";
|
|
221
|
+
};
|
|
51
222
|
let localDateTime = "";
|
|
52
|
-
let
|
|
223
|
+
let timeZoneAbbreviation = "";
|
|
53
224
|
try {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const timezoneOffset = parsedDate.getTimezoneOffset();
|
|
57
|
-
timezone = moment.tz.zone(moment.tz.guess())?.abbr(timezoneOffset);
|
|
58
|
-
if (props.format && props.format == "timeago") {
|
|
59
|
-
localDateTime = formatTimeAgo(parsedDate);
|
|
60
|
-
} else {
|
|
61
|
-
localDateTime = parsedDate.toLocaleString() + " " + timezone;
|
|
62
|
-
}
|
|
225
|
+
localDateTime = parseAndFormatDate(props.value, props.format);
|
|
226
|
+
timeZoneAbbreviation = getTimeZoneAbbreviation(Intl.DateTimeFormat().resolvedOptions().timeZone);
|
|
63
227
|
} catch (error) {
|
|
64
|
-
console.error("Error parsing date:", props.value);
|
|
65
|
-
}
|
|
66
|
-
function formatTimeAgo(inputDate) {
|
|
67
|
-
const currentDate = /* @__PURE__ */ new Date();
|
|
68
|
-
const timeDifference = Math.floor((currentDate.getTime() - inputDate.getTime()) / 1e3);
|
|
69
|
-
if (timeDifference < 10) {
|
|
70
|
-
return "few secs ago";
|
|
71
|
-
} else if (timeDifference < 60) {
|
|
72
|
-
return `${timeDifference} secs ago`;
|
|
73
|
-
} else if (timeDifference < 3600) {
|
|
74
|
-
const minutes = Math.floor(timeDifference / 60);
|
|
75
|
-
return `${minutes} min${minutes > 1 ? "s" : ""} ago`;
|
|
76
|
-
} else if (timeDifference < 86400) {
|
|
77
|
-
const hours = Math.floor(timeDifference / 3600);
|
|
78
|
-
const remainingMinutes = Math.floor(timeDifference % 3600 / 60);
|
|
79
|
-
return `${hours} hour${hours > 1 ? "s" : ""}, ${remainingMinutes} min${remainingMinutes > 1 ? "s" : ""} ago`;
|
|
80
|
-
} else if (timeDifference < 14 * 3600) {
|
|
81
|
-
const daysAgo = Math.floor(timeDifference / 86400);
|
|
82
|
-
return `${daysAgo} day${daysAgo > 1 ? "s" : ""} ago`;
|
|
83
|
-
} else {
|
|
84
|
-
const formattedDate = inputDate.toLocaleString();
|
|
85
|
-
return formattedDate;
|
|
86
|
-
}
|
|
228
|
+
console.error("Error parsing date:", props.value, error);
|
|
87
229
|
}
|
|
88
|
-
return /* @__PURE__ */ jsx2(React2.Fragment, { children: /* @__PURE__ */
|
|
230
|
+
return /* @__PURE__ */ jsx2(React2.Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "inline-flex flex-wrap gap-1", children: [
|
|
231
|
+
/* @__PURE__ */ jsx2("span", { children: localDateTime }),
|
|
232
|
+
!props.format && props.controlType != "date" && /* @__PURE__ */ jsx2("span", { children: timeZoneAbbreviation })
|
|
233
|
+
] }) });
|
|
89
234
|
};
|
|
90
235
|
var DateView_default = DateView;
|
|
91
236
|
|
|
@@ -99,10 +244,10 @@ var LineTextView_default = LineText;
|
|
|
99
244
|
|
|
100
245
|
// src/components/controls/view/MoneyView.tsx
|
|
101
246
|
import React4 from "react";
|
|
102
|
-
import { jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
247
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
103
248
|
var Money = (props) => {
|
|
104
249
|
const parsedNumber = parseFloat(props.value);
|
|
105
|
-
return /* @__PURE__ */ jsx4(React4.Fragment, { children: !Number.isNaN(parsedNumber) && /* @__PURE__ */
|
|
250
|
+
return /* @__PURE__ */ jsx4(React4.Fragment, { children: !Number.isNaN(parsedNumber) && /* @__PURE__ */ jsxs2("span", { className: parsedNumber < 0 ? "text-alert" : "", children: [
|
|
106
251
|
/* @__PURE__ */ jsx4("span", { className: "mr-0.5", children: "\u20B9" }),
|
|
107
252
|
parsedNumber.toLocaleString()
|
|
108
253
|
] }) });
|
|
@@ -130,9 +275,9 @@ var MultilineTextView_default = MultilineText;
|
|
|
130
275
|
|
|
131
276
|
// src/components/controls/view/PercentageView.tsx
|
|
132
277
|
import React7 from "react";
|
|
133
|
-
import { jsxs as
|
|
278
|
+
import { jsxs as jsxs3 } from "react/jsx-runtime";
|
|
134
279
|
var PercentageView = (props) => {
|
|
135
|
-
return /* @__PURE__ */
|
|
280
|
+
return /* @__PURE__ */ jsxs3(React7.Fragment, { children: [
|
|
136
281
|
props.value,
|
|
137
282
|
"%"
|
|
138
283
|
] });
|
|
@@ -141,15 +286,15 @@ var PercentageView_default = PercentageView;
|
|
|
141
286
|
|
|
142
287
|
// src/components/controls/view/ProgressIndicator.tsx
|
|
143
288
|
import React8 from "react";
|
|
144
|
-
import { jsx as jsx7, jsxs as
|
|
289
|
+
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
145
290
|
var ProgressIndicator = (props) => {
|
|
146
291
|
const percentage = 100;
|
|
147
292
|
const circumference = Math.PI * 56;
|
|
148
293
|
const offset = circumference * (1 - percentage / 100);
|
|
149
|
-
return /* @__PURE__ */ jsx7(React8.Fragment, { children: /* @__PURE__ */
|
|
294
|
+
return /* @__PURE__ */ jsx7(React8.Fragment, { children: /* @__PURE__ */ jsxs4("div", { className: "relative w-48 h-48", children: [
|
|
150
295
|
/* @__PURE__ */ jsx7("div", { className: "absolute top-0 left-0 w-full h-full rounded-full border border-gray-200" }),
|
|
151
296
|
/* @__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)` } }) }),
|
|
152
|
-
/* @__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__ */
|
|
297
|
+
/* @__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__ */ jsxs4("span", { children: [
|
|
153
298
|
percentage,
|
|
154
299
|
"%"
|
|
155
300
|
] }) })
|
|
@@ -157,8 +302,25 @@ var ProgressIndicator = (props) => {
|
|
|
157
302
|
};
|
|
158
303
|
var ProgressIndicator_default = ProgressIndicator;
|
|
159
304
|
|
|
305
|
+
// src/components/controls/view/AiGeneratedSummary.tsx
|
|
306
|
+
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
307
|
+
var AiGeneratedSummary = (props) => {
|
|
308
|
+
const lines = props.value?.split("\n").filter((line) => line.trim() !== "") || [];
|
|
309
|
+
return /* @__PURE__ */ jsxs5("details", { className: "group rounded-xl border-2 bg-white shadow-sm border-p overflow-hidden", children: [
|
|
310
|
+
/* @__PURE__ */ jsx8("summary", { className: "flex items-start justify-between cursor-pointer list-none", children: /* @__PURE__ */ jsxs5("div", { className: "flex items-start gap-3 ", children: [
|
|
311
|
+
/* @__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" }) }) }),
|
|
312
|
+
/* @__PURE__ */ jsxs5("div", { children: [
|
|
313
|
+
/* @__PURE__ */ jsx8("h3", { className: "text-lg font-semibold ", children: "Quick Read" }),
|
|
314
|
+
/* @__PURE__ */ jsx8("p", { className: "text-sm text-gray-500 mb-0", children: "Summary is AI-generated, author-reviewed" })
|
|
315
|
+
] })
|
|
316
|
+
] }) }),
|
|
317
|
+
/* @__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)) }) })
|
|
318
|
+
] });
|
|
319
|
+
};
|
|
320
|
+
var AiGeneratedSummary_default = AiGeneratedSummary;
|
|
321
|
+
|
|
160
322
|
// src/components/controls/view/ViewControl.tsx
|
|
161
|
-
import { jsx as
|
|
323
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
162
324
|
var ViewControl = React9.forwardRef(
|
|
163
325
|
(props, ref) => {
|
|
164
326
|
const ControlComponents = {
|
|
@@ -174,16 +336,13 @@ var ViewControl = React9.forwardRef(
|
|
|
174
336
|
[ViewControlTypes_default.moneyText]: MoneyView_default,
|
|
175
337
|
[ViewControlTypes_default.percentage]: PercentageView_default,
|
|
176
338
|
// [ViewControlTypes.statusBg]: StatusBg,
|
|
177
|
-
[ViewControlTypes_default.progressIndicator]: ProgressIndicator_default
|
|
339
|
+
[ViewControlTypes_default.progressIndicator]: ProgressIndicator_default,
|
|
178
340
|
// [ViewControlTypes.timeUntilStarts]: TimeUntilStarts,
|
|
179
341
|
// [ViewControlTypes.timeUntilStartsStyled]: TimeUntilStartsStyled,
|
|
180
|
-
|
|
342
|
+
[ViewControlTypes_default.aiGeneratedSummary]: AiGeneratedSummary_default
|
|
181
343
|
};
|
|
182
344
|
const SelectedControlComponent = props.controlType ? ControlComponents[props.controlType] : void 0;
|
|
183
|
-
return /* @__PURE__ */
|
|
184
|
-
props.controlType,
|
|
185
|
-
SelectedControlComponent ? /* @__PURE__ */ jsx8(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType
|
|
186
|
-
] });
|
|
345
|
+
return /* @__PURE__ */ jsx9(React9.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx9(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
187
346
|
}
|
|
188
347
|
);
|
|
189
348
|
ViewControl.displayName = "ViewControl";
|
|
@@ -194,7 +353,7 @@ import React29 from "react";
|
|
|
194
353
|
|
|
195
354
|
// src/components/controls/edit/MultilineTextInput.tsx
|
|
196
355
|
import React10 from "react";
|
|
197
|
-
import { jsx as
|
|
356
|
+
import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
198
357
|
var MultilineTextInput = (props) => {
|
|
199
358
|
const textChangeHandler = (event) => {
|
|
200
359
|
const text = event.target.value;
|
|
@@ -213,11 +372,11 @@ var MultilineTextInput = (props) => {
|
|
|
213
372
|
if (props.value !== void 0 && props.value !== null) {
|
|
214
373
|
value = props.value;
|
|
215
374
|
}
|
|
216
|
-
return /* @__PURE__ */
|
|
217
|
-
/* @__PURE__ */
|
|
375
|
+
return /* @__PURE__ */ jsx10(React10.Fragment, { children: /* @__PURE__ */ jsxs6("label", { className: "block mb-1", children: [
|
|
376
|
+
/* @__PURE__ */ jsx10("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
218
377
|
" ",
|
|
219
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
220
|
-
/* @__PURE__ */
|
|
378
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx10("span", { className: "text-alert", children: "*" }),
|
|
379
|
+
/* @__PURE__ */ jsx10(
|
|
221
380
|
"textarea",
|
|
222
381
|
{
|
|
223
382
|
name: props.name,
|
|
@@ -234,14 +393,14 @@ var MultilineTextInput = (props) => {
|
|
|
234
393
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
|
|
235
394
|
}
|
|
236
395
|
),
|
|
237
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ jsx10("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
238
397
|
] }) });
|
|
239
398
|
};
|
|
240
399
|
var MultilineTextInput_default = MultilineTextInput;
|
|
241
400
|
|
|
242
401
|
// src/components/controls/edit/LineTextInput.tsx
|
|
243
402
|
import React11 from "react";
|
|
244
|
-
import { jsx as
|
|
403
|
+
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
245
404
|
var LineTextInput = (props) => {
|
|
246
405
|
const textChangeHandler = (event) => {
|
|
247
406
|
const text = event.target.value;
|
|
@@ -260,11 +419,11 @@ var LineTextInput = (props) => {
|
|
|
260
419
|
if (props.value !== void 0 && props.value !== null) {
|
|
261
420
|
value = props.value;
|
|
262
421
|
}
|
|
263
|
-
return /* @__PURE__ */
|
|
264
|
-
props?.attributes?.label && /* @__PURE__ */
|
|
422
|
+
return /* @__PURE__ */ jsx11(React11.Fragment, { children: /* @__PURE__ */ jsxs7("label", { className: "block", children: [
|
|
423
|
+
props?.attributes?.label && /* @__PURE__ */ jsx11("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
265
424
|
" ",
|
|
266
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
267
|
-
/* @__PURE__ */
|
|
425
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx11("span", { className: "text-alert", children: "*" }),
|
|
426
|
+
/* @__PURE__ */ jsx11(
|
|
268
427
|
"input",
|
|
269
428
|
{
|
|
270
429
|
type: "text",
|
|
@@ -286,14 +445,14 @@ var LineTextInput = (props) => {
|
|
|
286
445
|
`
|
|
287
446
|
}
|
|
288
447
|
),
|
|
289
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ jsx11("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
290
449
|
] }) });
|
|
291
450
|
};
|
|
292
451
|
var LineTextInput_default = LineTextInput;
|
|
293
452
|
|
|
294
453
|
// src/components/controls/edit/MoneyInput.tsx
|
|
295
454
|
import React12 from "react";
|
|
296
|
-
import { jsx as
|
|
455
|
+
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
297
456
|
var MoneyInput = (props) => {
|
|
298
457
|
const textChangeHandler = (event) => {
|
|
299
458
|
const rawValue = event.target.value;
|
|
@@ -322,11 +481,11 @@ var MoneyInput = (props) => {
|
|
|
322
481
|
e.preventDefault();
|
|
323
482
|
}
|
|
324
483
|
};
|
|
325
|
-
return /* @__PURE__ */
|
|
326
|
-
/* @__PURE__ */
|
|
484
|
+
return /* @__PURE__ */ jsx12(React12.Fragment, { children: /* @__PURE__ */ jsxs8("label", { className: "block mb-1", children: [
|
|
485
|
+
/* @__PURE__ */ jsx12("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
327
486
|
" ",
|
|
328
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
329
|
-
/* @__PURE__ */
|
|
487
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx12("span", { className: "text-alert", children: "*" }),
|
|
488
|
+
/* @__PURE__ */ jsx12(
|
|
330
489
|
"input",
|
|
331
490
|
{
|
|
332
491
|
type: "number",
|
|
@@ -346,7 +505,7 @@ var MoneyInput = (props) => {
|
|
|
346
505
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 number-input"
|
|
347
506
|
}
|
|
348
507
|
),
|
|
349
|
-
/* @__PURE__ */
|
|
508
|
+
/* @__PURE__ */ jsx12("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
350
509
|
] }) });
|
|
351
510
|
};
|
|
352
511
|
var MoneyInput_default = MoneyInput;
|
|
@@ -377,7 +536,7 @@ var InputControlType_default = InputControlType;
|
|
|
377
536
|
|
|
378
537
|
// src/components/controls/edit/Select.tsx
|
|
379
538
|
import { useState, useEffect } from "react";
|
|
380
|
-
import { jsx as
|
|
539
|
+
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
381
540
|
var Select = (props) => {
|
|
382
541
|
const [list, setList] = useState([]);
|
|
383
542
|
const getSafeValue = (val) => {
|
|
@@ -435,10 +594,10 @@ var Select = (props) => {
|
|
|
435
594
|
props.dataSourceDependsOn
|
|
436
595
|
]);
|
|
437
596
|
const value = getSafeValue(props.value);
|
|
438
|
-
return /* @__PURE__ */
|
|
439
|
-
props.attributes?.label && /* @__PURE__ */
|
|
440
|
-
props.attributes?.label && props.attributes?.required && /* @__PURE__ */
|
|
441
|
-
/* @__PURE__ */
|
|
597
|
+
return /* @__PURE__ */ jsxs9("label", { className: "block", children: [
|
|
598
|
+
props.attributes?.label && /* @__PURE__ */ jsx13("span", { className: "text-sm font-medium inline-block pb-1", children: props.attributes?.label }),
|
|
599
|
+
props.attributes?.label && props.attributes?.required && /* @__PURE__ */ jsx13("span", { className: "text-alert", children: "*" }),
|
|
600
|
+
/* @__PURE__ */ jsxs9(
|
|
442
601
|
"select",
|
|
443
602
|
{
|
|
444
603
|
name: props.name,
|
|
@@ -449,23 +608,23 @@ var Select = (props) => {
|
|
|
449
608
|
disabled: props.attributes?.readOnly,
|
|
450
609
|
className: "peer 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",
|
|
451
610
|
children: [
|
|
452
|
-
/* @__PURE__ */
|
|
611
|
+
/* @__PURE__ */ jsx13("option", { value: "", children: props.attributes?.placeholder || "Select" }),
|
|
453
612
|
list.map((item, index) => {
|
|
454
613
|
const keyField = props.dataKeyFieldName;
|
|
455
614
|
const textField = props.dataTextFieldName;
|
|
456
|
-
return /* @__PURE__ */
|
|
615
|
+
return /* @__PURE__ */ jsx13("option", { value: item[keyField], children: item[textField] }, index);
|
|
457
616
|
})
|
|
458
617
|
]
|
|
459
618
|
}
|
|
460
619
|
),
|
|
461
|
-
/* @__PURE__ */
|
|
620
|
+
/* @__PURE__ */ jsx13("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props.attributes?.errorMessage || "" })
|
|
462
621
|
] });
|
|
463
622
|
};
|
|
464
623
|
var Select_default = Select;
|
|
465
624
|
|
|
466
625
|
// src/components/controls/edit/PercentageInput.tsx
|
|
467
626
|
import React14 from "react";
|
|
468
|
-
import { jsx as
|
|
627
|
+
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
469
628
|
var PercentageInput = (props) => {
|
|
470
629
|
const textChangeHandler = (event) => {
|
|
471
630
|
const rawValue = event.target.value;
|
|
@@ -494,11 +653,11 @@ var PercentageInput = (props) => {
|
|
|
494
653
|
e.preventDefault();
|
|
495
654
|
}
|
|
496
655
|
};
|
|
497
|
-
return /* @__PURE__ */
|
|
498
|
-
/* @__PURE__ */
|
|
656
|
+
return /* @__PURE__ */ jsx14(React14.Fragment, { children: /* @__PURE__ */ jsxs10("label", { className: "block mb-1", children: [
|
|
657
|
+
/* @__PURE__ */ jsx14("span", { className: "text-sm font-medium ", children: props?.attributes?.label ? props?.attributes?.label + " %" : "" }),
|
|
499
658
|
" ",
|
|
500
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
501
|
-
/* @__PURE__ */
|
|
659
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx14("span", { className: "text-alert", children: "*" }),
|
|
660
|
+
/* @__PURE__ */ jsx14(
|
|
502
661
|
"input",
|
|
503
662
|
{
|
|
504
663
|
type: "number",
|
|
@@ -517,14 +676,14 @@ var PercentageInput = (props) => {
|
|
|
517
676
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 number-input"
|
|
518
677
|
}
|
|
519
678
|
),
|
|
520
|
-
/* @__PURE__ */
|
|
679
|
+
/* @__PURE__ */ jsx14("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
521
680
|
] }) });
|
|
522
681
|
};
|
|
523
682
|
var PercentageInput_default = PercentageInput;
|
|
524
683
|
|
|
525
684
|
// src/components/controls/edit/PhoneInput.tsx
|
|
526
685
|
import React15 from "react";
|
|
527
|
-
import { jsx as
|
|
686
|
+
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
528
687
|
var PhoneInput = (props) => {
|
|
529
688
|
const textChangeHandler = (event) => {
|
|
530
689
|
const text = event.target.value;
|
|
@@ -543,11 +702,11 @@ var PhoneInput = (props) => {
|
|
|
543
702
|
if (props.value !== void 0 && props.value !== null) {
|
|
544
703
|
value = props.value;
|
|
545
704
|
}
|
|
546
|
-
return /* @__PURE__ */
|
|
547
|
-
/* @__PURE__ */
|
|
548
|
-
/* @__PURE__ */
|
|
549
|
-
/* @__PURE__ */
|
|
550
|
-
/* @__PURE__ */
|
|
705
|
+
return /* @__PURE__ */ jsx15(React15.Fragment, { children: /* @__PURE__ */ jsxs11("label", { className: "block mb-1", children: [
|
|
706
|
+
/* @__PURE__ */ jsx15("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
707
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex items-center bg-gray-100 rounded border border-gray-300 \n focus-within:border-indigo-300 focus-within:ring focus-within:ring-indigo-200 focus-within:ring-opacity-50", children: [
|
|
708
|
+
/* @__PURE__ */ jsx15("span", { className: "px-3 text-gray-700", children: props.prefix }),
|
|
709
|
+
/* @__PURE__ */ jsx15(
|
|
551
710
|
"input",
|
|
552
711
|
{
|
|
553
712
|
type: "text",
|
|
@@ -565,14 +724,14 @@ var PhoneInput = (props) => {
|
|
|
565
724
|
}
|
|
566
725
|
)
|
|
567
726
|
] }),
|
|
568
|
-
/* @__PURE__ */
|
|
727
|
+
/* @__PURE__ */ jsx15("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
569
728
|
] }) });
|
|
570
729
|
};
|
|
571
730
|
var PhoneInput_default = PhoneInput;
|
|
572
731
|
|
|
573
732
|
// src/components/controls/edit/NumberInput.tsx
|
|
574
733
|
import React16 from "react";
|
|
575
|
-
import { jsx as
|
|
734
|
+
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
576
735
|
var NumberInput = (props) => {
|
|
577
736
|
const textChangeHandler = (event) => {
|
|
578
737
|
const text = event.target.value;
|
|
@@ -595,11 +754,11 @@ var NumberInput = (props) => {
|
|
|
595
754
|
if (props.value !== void 0 && props.value !== null) {
|
|
596
755
|
value = props.value;
|
|
597
756
|
}
|
|
598
|
-
return /* @__PURE__ */
|
|
599
|
-
props?.attributes?.label && /* @__PURE__ */
|
|
757
|
+
return /* @__PURE__ */ jsx16(React16.Fragment, { children: /* @__PURE__ */ jsxs12("label", { className: "block", children: [
|
|
758
|
+
props?.attributes?.label && /* @__PURE__ */ jsx16("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
600
759
|
" ",
|
|
601
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
602
|
-
/* @__PURE__ */
|
|
760
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx16("span", { className: "text-alert", children: "*" }),
|
|
761
|
+
/* @__PURE__ */ jsx16(
|
|
603
762
|
"input",
|
|
604
763
|
{
|
|
605
764
|
type: "number",
|
|
@@ -618,14 +777,14 @@ var NumberInput = (props) => {
|
|
|
618
777
|
className: "peer py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 number-input\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
619
778
|
}
|
|
620
779
|
),
|
|
621
|
-
/* @__PURE__ */
|
|
780
|
+
/* @__PURE__ */ jsx16("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
622
781
|
] }) });
|
|
623
782
|
};
|
|
624
783
|
var NumberInput_default = NumberInput;
|
|
625
784
|
|
|
626
785
|
// src/components/controls/edit/CheckboxInput.tsx
|
|
627
786
|
import React17 from "react";
|
|
628
|
-
import { jsx as
|
|
787
|
+
import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
629
788
|
var CheckboxInput = (props) => {
|
|
630
789
|
const textChangeHandler = (event) => {
|
|
631
790
|
let text = event.target.checked;
|
|
@@ -644,11 +803,11 @@ var CheckboxInput = (props) => {
|
|
|
644
803
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
645
804
|
value = true;
|
|
646
805
|
}
|
|
647
|
-
return /* @__PURE__ */
|
|
648
|
-
/* @__PURE__ */
|
|
806
|
+
return /* @__PURE__ */ jsx17(React17.Fragment, { children: /* @__PURE__ */ jsxs13("label", { className: "block mb-1", children: [
|
|
807
|
+
/* @__PURE__ */ jsx17("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
649
808
|
" ",
|
|
650
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
651
|
-
/* @__PURE__ */
|
|
809
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx17("span", { className: "text-alert", children: "*" }),
|
|
810
|
+
/* @__PURE__ */ jsx17(
|
|
652
811
|
"input",
|
|
653
812
|
{
|
|
654
813
|
type: "checkbox",
|
|
@@ -665,14 +824,14 @@ var CheckboxInput = (props) => {
|
|
|
665
824
|
className: "peer mt-1 py-1.5 block 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 "
|
|
666
825
|
}
|
|
667
826
|
),
|
|
668
|
-
/* @__PURE__ */
|
|
827
|
+
/* @__PURE__ */ jsx17("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
669
828
|
] }) });
|
|
670
829
|
};
|
|
671
830
|
var CheckboxInput_default = CheckboxInput;
|
|
672
831
|
|
|
673
832
|
// src/components/controls/edit/OtpInput.tsx
|
|
674
833
|
import React18 from "react";
|
|
675
|
-
import { jsx as
|
|
834
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
676
835
|
var OtpInput = (props) => {
|
|
677
836
|
const textChangeHandler = (event) => {
|
|
678
837
|
const text = event.target.value;
|
|
@@ -694,9 +853,9 @@ var OtpInput = (props) => {
|
|
|
694
853
|
if (props.value !== void 0 && props.value !== null) {
|
|
695
854
|
value = props.value;
|
|
696
855
|
}
|
|
697
|
-
return /* @__PURE__ */
|
|
698
|
-
/* @__PURE__ */
|
|
699
|
-
/* @__PURE__ */
|
|
856
|
+
return /* @__PURE__ */ jsx18(React18.Fragment, { children: /* @__PURE__ */ jsxs14("label", { htmlFor: props.name, className: "block mb-1 w-full", children: [
|
|
857
|
+
/* @__PURE__ */ jsx18("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
858
|
+
/* @__PURE__ */ jsx18(
|
|
700
859
|
"input",
|
|
701
860
|
{
|
|
702
861
|
type: "text",
|
|
@@ -716,7 +875,7 @@ var OtpInput = (props) => {
|
|
|
716
875
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm tracking-[1.25em] text-center\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
|
|
717
876
|
}
|
|
718
877
|
),
|
|
719
|
-
/* @__PURE__ */
|
|
878
|
+
/* @__PURE__ */ jsx18("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
720
879
|
] }) });
|
|
721
880
|
};
|
|
722
881
|
var OtpInput_default = OtpInput;
|
|
@@ -799,7 +958,7 @@ var DateTimeUtility_default = DateTimeUtility;
|
|
|
799
958
|
|
|
800
959
|
// src/components/controls/edit/DateTimeInput.tsx
|
|
801
960
|
import React19 from "react";
|
|
802
|
-
import { jsx as
|
|
961
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
803
962
|
var DateTimeInput = (props) => {
|
|
804
963
|
const textChangeHandler = (event) => {
|
|
805
964
|
const localDate = new Date(event.target.value);
|
|
@@ -834,12 +993,12 @@ var DateTimeInput = (props) => {
|
|
|
834
993
|
timeZoneAbbr = now2.toLocaleTimeString("en", { timeZoneName: "short" }).split(" ")[2];
|
|
835
994
|
localvalue = localDate?.toISOString()?.slice(0, 16);
|
|
836
995
|
}
|
|
837
|
-
return /* @__PURE__ */
|
|
838
|
-
/* @__PURE__ */
|
|
996
|
+
return /* @__PURE__ */ jsx19(React19.Fragment, { children: /* @__PURE__ */ jsxs15("label", { className: "block mb-1", children: [
|
|
997
|
+
/* @__PURE__ */ jsx19("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
839
998
|
" ",
|
|
840
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
841
|
-
/* @__PURE__ */
|
|
842
|
-
/* @__PURE__ */
|
|
999
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx19("span", { className: "text-alert", children: "*" }),
|
|
1000
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2", children: [
|
|
1001
|
+
/* @__PURE__ */ jsx19(
|
|
843
1002
|
"input",
|
|
844
1003
|
{
|
|
845
1004
|
type: "datetime-local",
|
|
@@ -856,16 +1015,16 @@ var DateTimeInput = (props) => {
|
|
|
856
1015
|
className: "peer mt-1 py-1.5 block w-full 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 "
|
|
857
1016
|
}
|
|
858
1017
|
),
|
|
859
|
-
/* @__PURE__ */
|
|
1018
|
+
/* @__PURE__ */ jsx19("span", { children: timeZoneAbbr })
|
|
860
1019
|
] }),
|
|
861
|
-
/* @__PURE__ */
|
|
1020
|
+
/* @__PURE__ */ jsx19("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
862
1021
|
] }) });
|
|
863
1022
|
};
|
|
864
1023
|
var DateTimeInput_default = DateTimeInput;
|
|
865
1024
|
|
|
866
1025
|
// src/components/controls/edit/ColorInput.tsx
|
|
867
1026
|
import React20, { useEffect as useEffect2 } from "react";
|
|
868
|
-
import { jsx as
|
|
1027
|
+
import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
869
1028
|
var ColorInput = (props) => {
|
|
870
1029
|
const [color, setColor] = React20.useState("#3b82f6");
|
|
871
1030
|
useEffect2(() => {
|
|
@@ -887,11 +1046,11 @@ var ColorInput = (props) => {
|
|
|
887
1046
|
});
|
|
888
1047
|
}
|
|
889
1048
|
};
|
|
890
|
-
return /* @__PURE__ */
|
|
891
|
-
/* @__PURE__ */
|
|
1049
|
+
return /* @__PURE__ */ jsxs16("label", { className: "block mb-1", children: [
|
|
1050
|
+
/* @__PURE__ */ jsx20("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
892
1051
|
" ",
|
|
893
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
894
|
-
/* @__PURE__ */
|
|
1052
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx20("span", { className: "text-alert", children: "*" }),
|
|
1053
|
+
/* @__PURE__ */ jsx20(
|
|
895
1054
|
"input",
|
|
896
1055
|
{
|
|
897
1056
|
type: "color",
|
|
@@ -904,14 +1063,14 @@ var ColorInput = (props) => {
|
|
|
904
1063
|
className: `w-[88px] h-12 block cursor-pointer focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50`
|
|
905
1064
|
}
|
|
906
1065
|
),
|
|
907
|
-
props?.attributes?.errorMessage && /* @__PURE__ */
|
|
1066
|
+
props?.attributes?.errorMessage && /* @__PURE__ */ jsx20("p", { className: "mt-1 text-alert text-sm", children: props.attributes.errorMessage })
|
|
908
1067
|
] });
|
|
909
1068
|
};
|
|
910
1069
|
var ColorInput_default = ColorInput;
|
|
911
1070
|
|
|
912
1071
|
// src/components/controls/edit/SelectWithSearchInput.tsx
|
|
913
1072
|
import { useEffect as useEffect3, useRef, useState as useState2 } from "react";
|
|
914
|
-
import { jsx as
|
|
1073
|
+
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
915
1074
|
var SelectWithSearchInput = (props) => {
|
|
916
1075
|
const [isOpen, setIsOpen] = useState2(false);
|
|
917
1076
|
const [searchTerm, setSearchTerm] = useState2("");
|
|
@@ -982,12 +1141,12 @@ var SelectWithSearchInput = (props) => {
|
|
|
982
1141
|
});
|
|
983
1142
|
}
|
|
984
1143
|
}, [highlightedIndex]);
|
|
985
|
-
return /* @__PURE__ */
|
|
986
|
-
/* @__PURE__ */
|
|
1144
|
+
return /* @__PURE__ */ jsxs17("div", { className: "relative", children: [
|
|
1145
|
+
/* @__PURE__ */ jsx21("label", { children: props.attributes?.label }),
|
|
987
1146
|
" ",
|
|
988
|
-
props?.attributes?.required && /* @__PURE__ */
|
|
989
|
-
/* @__PURE__ */
|
|
990
|
-
/* @__PURE__ */
|
|
1147
|
+
props?.attributes?.required && /* @__PURE__ */ jsx21("span", { className: "text-alert", children: "*" }),
|
|
1148
|
+
/* @__PURE__ */ jsxs17("div", { className: "relative", children: [
|
|
1149
|
+
/* @__PURE__ */ jsx21(
|
|
991
1150
|
"input",
|
|
992
1151
|
{
|
|
993
1152
|
type: "text",
|
|
@@ -1003,13 +1162,13 @@ var SelectWithSearchInput = (props) => {
|
|
|
1003
1162
|
className: "peer 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\n "
|
|
1004
1163
|
}
|
|
1005
1164
|
),
|
|
1006
|
-
/* @__PURE__ */
|
|
1165
|
+
/* @__PURE__ */ jsx21(
|
|
1007
1166
|
"button",
|
|
1008
1167
|
{
|
|
1009
1168
|
type: "button",
|
|
1010
1169
|
onClick: () => setIsOpen(!isOpen),
|
|
1011
1170
|
className: "absolute right-2 top-3 h-5 w-5 text-gray-500 focus:outline-none",
|
|
1012
|
-
children: /* @__PURE__ */
|
|
1171
|
+
children: /* @__PURE__ */ jsx21(
|
|
1013
1172
|
"svg",
|
|
1014
1173
|
{
|
|
1015
1174
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1018,7 +1177,7 @@ var SelectWithSearchInput = (props) => {
|
|
|
1018
1177
|
strokeWidth: 1.5,
|
|
1019
1178
|
stroke: "currentColor",
|
|
1020
1179
|
className: "w-full h-full",
|
|
1021
|
-
children: /* @__PURE__ */
|
|
1180
|
+
children: /* @__PURE__ */ jsx21(
|
|
1022
1181
|
"path",
|
|
1023
1182
|
{
|
|
1024
1183
|
strokeLinecap: "round",
|
|
@@ -1031,12 +1190,12 @@ var SelectWithSearchInput = (props) => {
|
|
|
1031
1190
|
}
|
|
1032
1191
|
)
|
|
1033
1192
|
] }),
|
|
1034
|
-
isOpen && /* @__PURE__ */
|
|
1193
|
+
isOpen && /* @__PURE__ */ jsx21(
|
|
1035
1194
|
"div",
|
|
1036
1195
|
{
|
|
1037
1196
|
ref: dropdownRef,
|
|
1038
1197
|
className: "absolute z-10 mt-2 w-full bg-white border border-gray-200 rounded-md shadow-lg max-h-48 overflow-y-auto",
|
|
1039
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */
|
|
1198
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ jsx21(
|
|
1040
1199
|
"button",
|
|
1041
1200
|
{
|
|
1042
1201
|
onClick: (e) => handleSelect(e, item),
|
|
@@ -1044,10 +1203,10 @@ var SelectWithSearchInput = (props) => {
|
|
|
1044
1203
|
role: "option",
|
|
1045
1204
|
tabIndex: -1,
|
|
1046
1205
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1047
|
-
children: /* @__PURE__ */
|
|
1206
|
+
children: /* @__PURE__ */ jsx21("span", { children: item[props.dataTextFieldName] })
|
|
1048
1207
|
},
|
|
1049
1208
|
item[props.dataKeyFieldName]
|
|
1050
|
-
)) : /* @__PURE__ */
|
|
1209
|
+
)) : /* @__PURE__ */ jsx21("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1051
1210
|
}
|
|
1052
1211
|
)
|
|
1053
1212
|
] });
|
|
@@ -1113,7 +1272,7 @@ import { useState as useState3 } from "react";
|
|
|
1113
1272
|
|
|
1114
1273
|
// src/components/ClientButton.tsx
|
|
1115
1274
|
import React22 from "react";
|
|
1116
|
-
import { jsx as
|
|
1275
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1117
1276
|
var ClientButton = (props) => {
|
|
1118
1277
|
const execute = async (event) => {
|
|
1119
1278
|
if (props.onClick !== void 0) {
|
|
@@ -1123,7 +1282,7 @@ var ClientButton = (props) => {
|
|
|
1123
1282
|
}
|
|
1124
1283
|
};
|
|
1125
1284
|
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
1126
|
-
return /* @__PURE__ */
|
|
1285
|
+
return /* @__PURE__ */ jsx22(React22.Fragment, { children: /* @__PURE__ */ jsx22(
|
|
1127
1286
|
"button",
|
|
1128
1287
|
{
|
|
1129
1288
|
type: "button",
|
|
@@ -1136,7 +1295,7 @@ var ClientButton = (props) => {
|
|
|
1136
1295
|
var ClientButton_default = ClientButton;
|
|
1137
1296
|
|
|
1138
1297
|
// src/components/Confirm.tsx
|
|
1139
|
-
import { Fragment, jsx as
|
|
1298
|
+
import { Fragment, jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1140
1299
|
var Confirm = ({ message, onConfirm, onCancel }) => {
|
|
1141
1300
|
const [showModal, setShowModal] = useState3(true);
|
|
1142
1301
|
const handleConfirmAction = () => {
|
|
@@ -1151,13 +1310,13 @@ var Confirm = ({ message, onConfirm, onCancel }) => {
|
|
|
1151
1310
|
onCancel();
|
|
1152
1311
|
}
|
|
1153
1312
|
};
|
|
1154
|
-
return /* @__PURE__ */
|
|
1155
|
-
/* @__PURE__ */
|
|
1156
|
-
/* @__PURE__ */
|
|
1157
|
-
/* @__PURE__ */
|
|
1158
|
-
/* @__PURE__ */
|
|
1159
|
-
/* @__PURE__ */
|
|
1160
|
-
/* @__PURE__ */
|
|
1313
|
+
return /* @__PURE__ */ jsx23(Fragment, { children: showModal && /* @__PURE__ */ jsxs18("div", { className: "fixed inset-0 flex items-center justify-center z-50", children: [
|
|
1314
|
+
/* @__PURE__ */ jsx23("div", { className: "absolute inset-0 bg-black opacity-70" }),
|
|
1315
|
+
/* @__PURE__ */ jsxs18("div", { className: "bg-white rounded-md p-6 w-2/6 shadow border z-50", children: [
|
|
1316
|
+
/* @__PURE__ */ jsx23("p", { className: "text-xl font-medium mb-4", children: "Confirmation" }),
|
|
1317
|
+
/* @__PURE__ */ jsx23("p", { className: "mb-4", children: message }),
|
|
1318
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex justify-end gap-8", children: [
|
|
1319
|
+
/* @__PURE__ */ jsx23(
|
|
1161
1320
|
ClientButton_default,
|
|
1162
1321
|
{
|
|
1163
1322
|
onClick: handleCancelAction,
|
|
@@ -1165,7 +1324,7 @@ var Confirm = ({ message, onConfirm, onCancel }) => {
|
|
|
1165
1324
|
children: "Cancel"
|
|
1166
1325
|
}
|
|
1167
1326
|
),
|
|
1168
|
-
/* @__PURE__ */
|
|
1327
|
+
/* @__PURE__ */ jsx23(
|
|
1169
1328
|
ClientButton_default,
|
|
1170
1329
|
{
|
|
1171
1330
|
onClick: handleConfirmAction,
|
|
@@ -1181,7 +1340,7 @@ var Confirm_default = Confirm;
|
|
|
1181
1340
|
}
|
|
1182
1341
|
|
|
1183
1342
|
// src/components/Button.tsx
|
|
1184
|
-
import { jsx as
|
|
1343
|
+
import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1185
1344
|
var Button = (props) => {
|
|
1186
1345
|
const [inProgress, setInProgress] = useState4(false);
|
|
1187
1346
|
const [isActionPerformed, setIsActionPerformed] = useState4(false);
|
|
@@ -1230,14 +1389,14 @@ var Button = (props) => {
|
|
|
1230
1389
|
return new Promise((resolve) => {
|
|
1231
1390
|
const onConfirm = () => resolve(true);
|
|
1232
1391
|
const onCancel = () => resolve(false);
|
|
1233
|
-
setShowModal(/* @__PURE__ */
|
|
1392
|
+
setShowModal(/* @__PURE__ */ jsx24(Confirm_default, { message: props.confirmationMessage, onConfirm, onCancel }));
|
|
1234
1393
|
});
|
|
1235
1394
|
};
|
|
1236
1395
|
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
1237
1396
|
let progressClass = props.ButtonType ? progressClasses.get(props.ButtonType) : progressClasses.get("Primary" /* Solid */);
|
|
1238
1397
|
const isDisabled = inProgress || isActionPerformed && props.oneTimeAction;
|
|
1239
|
-
return /* @__PURE__ */
|
|
1240
|
-
/* @__PURE__ */
|
|
1398
|
+
return /* @__PURE__ */ jsxs19(React24.Fragment, { children: [
|
|
1399
|
+
/* @__PURE__ */ jsxs19(
|
|
1241
1400
|
"button",
|
|
1242
1401
|
{
|
|
1243
1402
|
type: "submit",
|
|
@@ -1247,9 +1406,9 @@ var Button = (props) => {
|
|
|
1247
1406
|
className: buttonClass + " relative " + props.className,
|
|
1248
1407
|
children: [
|
|
1249
1408
|
isActionPerformed && props.oneTimeAction && responseMessage ? responseMessage : props.children,
|
|
1250
|
-
inProgress && /* @__PURE__ */
|
|
1251
|
-
/* @__PURE__ */
|
|
1252
|
-
/* @__PURE__ */
|
|
1409
|
+
inProgress && /* @__PURE__ */ jsx24(React24.Fragment, { children: props.hideProgressIndicator === true ? /* @__PURE__ */ jsx24("div", { className: "absolute bottom-0 left-0 h-0.5 bg-gray-400 rounded animate-progress" }) : /* @__PURE__ */ jsxs19("svg", { className: "animate-spin ml-2 mr-3 h-5 w-5 " + progressClass, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
|
|
1410
|
+
/* @__PURE__ */ jsx24("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
1411
|
+
/* @__PURE__ */ jsx24("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
|
|
1253
1412
|
] }) })
|
|
1254
1413
|
]
|
|
1255
1414
|
}
|
|
@@ -1266,7 +1425,7 @@ import React25, {
|
|
|
1266
1425
|
useState as useState5,
|
|
1267
1426
|
useCallback
|
|
1268
1427
|
} from "react";
|
|
1269
|
-
import { jsx as
|
|
1428
|
+
import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1270
1429
|
var SelectWithSearchPanel = (props) => {
|
|
1271
1430
|
const [isOpen, setIsOpen] = useState5(false);
|
|
1272
1431
|
const [searchTerm, setSearchTerm] = useState5("");
|
|
@@ -1402,9 +1561,9 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1402
1561
|
console.log("Form Data:", formData);
|
|
1403
1562
|
return formData;
|
|
1404
1563
|
}, []);
|
|
1405
|
-
return /* @__PURE__ */
|
|
1406
|
-
/* @__PURE__ */
|
|
1407
|
-
/* @__PURE__ */
|
|
1564
|
+
return /* @__PURE__ */ jsxs20("div", { className: "relative", children: [
|
|
1565
|
+
/* @__PURE__ */ jsx25("label", { className: "text-sm mb-1 font-medium", children: props.attributes?.label }),
|
|
1566
|
+
/* @__PURE__ */ jsx25("div", { children: /* @__PURE__ */ jsx25(
|
|
1408
1567
|
"input",
|
|
1409
1568
|
{
|
|
1410
1569
|
type: "text",
|
|
@@ -1418,14 +1577,14 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1418
1577
|
disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none`
|
|
1419
1578
|
}
|
|
1420
1579
|
) }),
|
|
1421
|
-
/* @__PURE__ */
|
|
1422
|
-
/* @__PURE__ */
|
|
1423
|
-
/* @__PURE__ */
|
|
1580
|
+
/* @__PURE__ */ jsx25("div", { ref: containerRef, children: isOpen && /* @__PURE__ */ jsxs20(React25.Fragment, { children: [
|
|
1581
|
+
/* @__PURE__ */ jsxs20("div", { className: "fixed z-50 right-0 bg-white top-[62px] w-1/4 border-l border-gray-200", children: [
|
|
1582
|
+
/* @__PURE__ */ jsx25("div", { className: "flex flex-col p-2 bg-accent-950 text-white", children: /* @__PURE__ */ jsxs20("h5", { className: "text-md text-white font-medium", children: [
|
|
1424
1583
|
"Select a",
|
|
1425
1584
|
" ",
|
|
1426
1585
|
props.attributes?.label || props.attributes?.heading
|
|
1427
1586
|
] }) }),
|
|
1428
|
-
/* @__PURE__ */
|
|
1587
|
+
/* @__PURE__ */ jsx25("div", { className: "flex justify-end px-4 border-b py-2 border-gray-200 h-10", children: props.createFields && props.createFields.length > 0 && /* @__PURE__ */ jsx25(
|
|
1429
1588
|
"button",
|
|
1430
1589
|
{
|
|
1431
1590
|
type: "button",
|
|
@@ -1438,12 +1597,12 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1438
1597
|
}
|
|
1439
1598
|
) })
|
|
1440
1599
|
] }),
|
|
1441
|
-
isCreateOpen && /* @__PURE__ */
|
|
1442
|
-
/* @__PURE__ */
|
|
1600
|
+
isCreateOpen && /* @__PURE__ */ jsxs20("div", { className: "fixed right-0 w-1/4 h-full top-[62px] bg-white shadow-lg border-l border-gray-200 z-50", children: [
|
|
1601
|
+
/* @__PURE__ */ jsx25("div", { className: "flex flex-col p-2 bg-accent-950", children: /* @__PURE__ */ jsxs20("h5", { className: "text-md font-medium text-white", children: [
|
|
1443
1602
|
"Create New ",
|
|
1444
1603
|
props.attributes?.label
|
|
1445
1604
|
] }) }),
|
|
1446
|
-
/* @__PURE__ */
|
|
1605
|
+
/* @__PURE__ */ jsx25("div", { className: "flex justify-end px-4 border-b py-2 border-gray-200", children: /* @__PURE__ */ jsx25(
|
|
1447
1606
|
"button",
|
|
1448
1607
|
{
|
|
1449
1608
|
type: "button",
|
|
@@ -1452,10 +1611,10 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1452
1611
|
children: "Close"
|
|
1453
1612
|
}
|
|
1454
1613
|
) }),
|
|
1455
|
-
/* @__PURE__ */
|
|
1456
|
-
props.createFields?.map((field) => /* @__PURE__ */
|
|
1457
|
-
/* @__PURE__ */
|
|
1458
|
-
/* @__PURE__ */
|
|
1614
|
+
/* @__PURE__ */ jsxs20("div", { className: "p-4", children: [
|
|
1615
|
+
props.createFields?.map((field) => /* @__PURE__ */ jsxs20("div", { className: "mb-4", children: [
|
|
1616
|
+
/* @__PURE__ */ jsx25("label", { className: "text-sm mb-1 font-medium block", children: field.label }),
|
|
1617
|
+
/* @__PURE__ */ jsx25(
|
|
1459
1618
|
"input",
|
|
1460
1619
|
{
|
|
1461
1620
|
type: field.type,
|
|
@@ -1471,7 +1630,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1471
1630
|
}
|
|
1472
1631
|
)
|
|
1473
1632
|
] }, field.name)),
|
|
1474
|
-
/* @__PURE__ */
|
|
1633
|
+
/* @__PURE__ */ jsxs20(Button_default, { onClick: async () => {
|
|
1475
1634
|
handleSaveModal();
|
|
1476
1635
|
return { isSuccessful: true };
|
|
1477
1636
|
}, className: "w-full", children: [
|
|
@@ -1480,13 +1639,13 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1480
1639
|
] })
|
|
1481
1640
|
] })
|
|
1482
1641
|
] }),
|
|
1483
|
-
/* @__PURE__ */
|
|
1642
|
+
/* @__PURE__ */ jsx25(
|
|
1484
1643
|
"div",
|
|
1485
1644
|
{
|
|
1486
1645
|
ref: listRef,
|
|
1487
1646
|
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",
|
|
1488
1647
|
style: { height: "calc(100vh - 130px)" },
|
|
1489
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */
|
|
1648
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ jsx25("div", { children: /* @__PURE__ */ jsx25(
|
|
1490
1649
|
"button",
|
|
1491
1650
|
{
|
|
1492
1651
|
onClick: (e) => {
|
|
@@ -1496,9 +1655,9 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1496
1655
|
role: "option",
|
|
1497
1656
|
tabIndex: -1,
|
|
1498
1657
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1499
|
-
children: /* @__PURE__ */
|
|
1658
|
+
children: /* @__PURE__ */ jsx25("span", { children: getNestedValue3(item, props.dataTextFieldName) })
|
|
1500
1659
|
}
|
|
1501
|
-
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */
|
|
1660
|
+
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ jsx25("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1502
1661
|
}
|
|
1503
1662
|
)
|
|
1504
1663
|
] }) })
|
|
@@ -1511,7 +1670,7 @@ import React26, {
|
|
|
1511
1670
|
useState as useState6,
|
|
1512
1671
|
useEffect as useEffect5
|
|
1513
1672
|
} from "react";
|
|
1514
|
-
import { jsx as
|
|
1673
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1515
1674
|
var BooleanSelect = (props) => {
|
|
1516
1675
|
const [list, setList] = useState6();
|
|
1517
1676
|
const textChangeHandler = (event) => {
|
|
@@ -1560,11 +1719,11 @@ var BooleanSelect = (props) => {
|
|
|
1560
1719
|
if (props.value !== void 0 && props.value !== null) {
|
|
1561
1720
|
value = props.value;
|
|
1562
1721
|
}
|
|
1563
|
-
return /* @__PURE__ */
|
|
1564
|
-
/* @__PURE__ */
|
|
1722
|
+
return /* @__PURE__ */ jsx26(React26.Fragment, { children: /* @__PURE__ */ jsxs21("label", { className: "block", children: [
|
|
1723
|
+
/* @__PURE__ */ jsx26("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1565
1724
|
" ",
|
|
1566
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1567
|
-
/* @__PURE__ */
|
|
1725
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx26("span", { className: "text-alert", children: "*" }),
|
|
1726
|
+
/* @__PURE__ */ jsxs21(
|
|
1568
1727
|
"select",
|
|
1569
1728
|
{
|
|
1570
1729
|
name: props.name,
|
|
@@ -1576,9 +1735,9 @@ var BooleanSelect = (props) => {
|
|
|
1576
1735
|
disabled: props?.attributes?.readOnly,
|
|
1577
1736
|
className: "peer mt-1 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\n ",
|
|
1578
1737
|
children: [
|
|
1579
|
-
/* @__PURE__ */
|
|
1738
|
+
/* @__PURE__ */ jsx26("option", { className: "", value: "", children: props.attributes?.placeholder || "Select" }),
|
|
1580
1739
|
list && list.map((item, i) => {
|
|
1581
|
-
return /* @__PURE__ */
|
|
1740
|
+
return /* @__PURE__ */ jsx26(
|
|
1582
1741
|
"option",
|
|
1583
1742
|
{
|
|
1584
1743
|
className: "fac-select-option",
|
|
@@ -1591,14 +1750,14 @@ var BooleanSelect = (props) => {
|
|
|
1591
1750
|
]
|
|
1592
1751
|
}
|
|
1593
1752
|
),
|
|
1594
|
-
/* @__PURE__ */
|
|
1753
|
+
/* @__PURE__ */ jsx26("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1595
1754
|
] }) });
|
|
1596
1755
|
};
|
|
1597
1756
|
var BooleanSelect_default = BooleanSelect;
|
|
1598
1757
|
|
|
1599
1758
|
// src/components/controls/edit/EmailInput.tsx
|
|
1600
1759
|
import React27 from "react";
|
|
1601
|
-
import { jsx as
|
|
1760
|
+
import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1602
1761
|
var EmailInput = (props) => {
|
|
1603
1762
|
const textChangeHandler = (event) => {
|
|
1604
1763
|
const text = event.target.value;
|
|
@@ -1623,11 +1782,11 @@ var EmailInput = (props) => {
|
|
|
1623
1782
|
if (props.value !== void 0 && props.value !== null) {
|
|
1624
1783
|
value = props.value;
|
|
1625
1784
|
}
|
|
1626
|
-
return /* @__PURE__ */
|
|
1627
|
-
/* @__PURE__ */
|
|
1785
|
+
return /* @__PURE__ */ jsx27(React27.Fragment, { children: /* @__PURE__ */ jsxs22("label", { className: "block mb-1", children: [
|
|
1786
|
+
/* @__PURE__ */ jsx27("span", { className: "text-sm font-medium text-slate-700", children: props?.attributes?.label }),
|
|
1628
1787
|
" ",
|
|
1629
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1630
|
-
/* @__PURE__ */
|
|
1788
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx27("span", { className: "text-alert", children: "*" }),
|
|
1789
|
+
/* @__PURE__ */ jsx27(
|
|
1631
1790
|
"input",
|
|
1632
1791
|
{
|
|
1633
1792
|
type: "email",
|
|
@@ -1643,14 +1802,14 @@ var EmailInput = (props) => {
|
|
|
1643
1802
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus-within:border-neutral-300 focus-within:ring focus-within:ring-neutral-300 focus-within:ring-opacity-50 transition-all duration-500 ease-in-out"
|
|
1644
1803
|
}
|
|
1645
1804
|
),
|
|
1646
|
-
/* @__PURE__ */
|
|
1805
|
+
/* @__PURE__ */ jsx27("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 mb-0 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1647
1806
|
] }) });
|
|
1648
1807
|
};
|
|
1649
1808
|
var EmailInput_default = EmailInput;
|
|
1650
1809
|
|
|
1651
1810
|
// src/components/controls/edit/TimeInput.tsx
|
|
1652
1811
|
import React28 from "react";
|
|
1653
|
-
import { jsx as
|
|
1812
|
+
import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1654
1813
|
var TimeInput = (props) => {
|
|
1655
1814
|
const timeChangeHandler = (event) => {
|
|
1656
1815
|
const timeValue = event.target.value;
|
|
@@ -1663,10 +1822,10 @@ var TimeInput = (props) => {
|
|
|
1663
1822
|
});
|
|
1664
1823
|
}
|
|
1665
1824
|
};
|
|
1666
|
-
return /* @__PURE__ */
|
|
1667
|
-
/* @__PURE__ */
|
|
1668
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1669
|
-
/* @__PURE__ */
|
|
1825
|
+
return /* @__PURE__ */ jsx28(React28.Fragment, { children: /* @__PURE__ */ jsxs23("label", { className: "block mb-1", children: [
|
|
1826
|
+
/* @__PURE__ */ jsx28("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
1827
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx28("span", { className: "text-alert", children: "*" }),
|
|
1828
|
+
/* @__PURE__ */ jsx28("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx28(
|
|
1670
1829
|
"input",
|
|
1671
1830
|
{
|
|
1672
1831
|
type: "time",
|
|
@@ -1679,13 +1838,13 @@ var TimeInput = (props) => {
|
|
|
1679
1838
|
className: "peer mt-1 py-1.5 block w-full 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"
|
|
1680
1839
|
}
|
|
1681
1840
|
) }),
|
|
1682
|
-
/* @__PURE__ */
|
|
1841
|
+
/* @__PURE__ */ jsx28("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ?? "" })
|
|
1683
1842
|
] }) });
|
|
1684
1843
|
};
|
|
1685
1844
|
var TimeInput_default = TimeInput;
|
|
1686
1845
|
|
|
1687
1846
|
// src/components/controls/edit/InputControl.tsx
|
|
1688
|
-
import { jsx as
|
|
1847
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1689
1848
|
var InputControl = React29.forwardRef(
|
|
1690
1849
|
(props, ref) => {
|
|
1691
1850
|
const ControlComponents = {
|
|
@@ -1707,7 +1866,7 @@ var InputControl = React29.forwardRef(
|
|
|
1707
1866
|
[InputControlType_default.timeInput]: TimeInput_default
|
|
1708
1867
|
};
|
|
1709
1868
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
1710
|
-
return /* @__PURE__ */
|
|
1869
|
+
return /* @__PURE__ */ jsx29(React29.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx29(SelectedControlComponent, { ...props }) : "Control not found" });
|
|
1711
1870
|
}
|
|
1712
1871
|
);
|
|
1713
1872
|
InputControl.displayName = "InputControl";
|
|
@@ -1719,46 +1878,46 @@ import { useRouter } from "next/navigation";
|
|
|
1719
1878
|
|
|
1720
1879
|
// src/components/dataForm/NoContentView.tsx
|
|
1721
1880
|
import React30 from "react";
|
|
1722
|
-
import { jsx as
|
|
1881
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1723
1882
|
var NoContentView = (props) => {
|
|
1724
|
-
return /* @__PURE__ */
|
|
1883
|
+
return /* @__PURE__ */ jsx30(React30.Fragment, { children: props.isDataFound === false && props.children });
|
|
1725
1884
|
};
|
|
1726
1885
|
var NoContentView_default = NoContentView;
|
|
1727
1886
|
|
|
1728
1887
|
// src/components/dataForm/ContentView.tsx
|
|
1729
1888
|
import React31 from "react";
|
|
1730
|
-
import { jsx as
|
|
1889
|
+
import { jsx as jsx31, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1731
1890
|
var ContentView = (props) => {
|
|
1732
|
-
return /* @__PURE__ */
|
|
1733
|
-
props.isDataFound == null && /* @__PURE__ */
|
|
1734
|
-
/* @__PURE__ */
|
|
1735
|
-
/* @__PURE__ */
|
|
1736
|
-
/* @__PURE__ */
|
|
1737
|
-
/* @__PURE__ */
|
|
1738
|
-
/* @__PURE__ */
|
|
1891
|
+
return /* @__PURE__ */ jsxs24(React31.Fragment, { children: [
|
|
1892
|
+
props.isDataFound == null && /* @__PURE__ */ jsx31("div", { className: "", children: /* @__PURE__ */ jsxs24("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
1893
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex items-center mb-4", children: [
|
|
1894
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
1895
|
+
/* @__PURE__ */ jsxs24("div", { className: "ml-2", children: [
|
|
1896
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
1897
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
1739
1898
|
] })
|
|
1740
1899
|
] }),
|
|
1741
|
-
/* @__PURE__ */
|
|
1742
|
-
/* @__PURE__ */
|
|
1743
|
-
/* @__PURE__ */
|
|
1744
|
-
/* @__PURE__ */
|
|
1745
|
-
/* @__PURE__ */
|
|
1746
|
-
/* @__PURE__ */
|
|
1747
|
-
/* @__PURE__ */
|
|
1900
|
+
/* @__PURE__ */ jsxs24("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
1901
|
+
/* @__PURE__ */ jsxs24("div", { className: "animate-pulse", children: [
|
|
1902
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
1903
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
1904
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
1905
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
1906
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
1748
1907
|
] }),
|
|
1749
|
-
/* @__PURE__ */
|
|
1750
|
-
/* @__PURE__ */
|
|
1751
|
-
/* @__PURE__ */
|
|
1752
|
-
/* @__PURE__ */
|
|
1753
|
-
/* @__PURE__ */
|
|
1754
|
-
/* @__PURE__ */
|
|
1908
|
+
/* @__PURE__ */ jsxs24("div", { className: "animate-pulse", children: [
|
|
1909
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
1910
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
1911
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
1912
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
1913
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
1755
1914
|
] }),
|
|
1756
|
-
/* @__PURE__ */
|
|
1757
|
-
/* @__PURE__ */
|
|
1758
|
-
/* @__PURE__ */
|
|
1759
|
-
/* @__PURE__ */
|
|
1760
|
-
/* @__PURE__ */
|
|
1761
|
-
/* @__PURE__ */
|
|
1915
|
+
/* @__PURE__ */ jsxs24("div", { className: "animate-pulse", children: [
|
|
1916
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
1917
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
1918
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
1919
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
1920
|
+
/* @__PURE__ */ jsx31("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
1762
1921
|
] })
|
|
1763
1922
|
] })
|
|
1764
1923
|
] }) }),
|
|
@@ -1769,7 +1928,7 @@ var ContentView_default = ContentView;
|
|
|
1769
1928
|
|
|
1770
1929
|
// src/components/dataForm/Hyperlink.tsx
|
|
1771
1930
|
import Link from "next/link";
|
|
1772
|
-
import { Fragment as Fragment2, jsx as
|
|
1931
|
+
import { Fragment as Fragment2, jsx as jsx32 } from "react/jsx-runtime";
|
|
1773
1932
|
function Hyperlink(props) {
|
|
1774
1933
|
let linkClass = props.linkType ? buttonClasses.get(props.linkType) : "";
|
|
1775
1934
|
const target = props?.href?.startsWith("http") ? "_blank" : "_self";
|
|
@@ -1777,7 +1936,7 @@ function Hyperlink(props) {
|
|
|
1777
1936
|
if (target == "_blank") {
|
|
1778
1937
|
additionalProps.rel = "noopener noreferrer";
|
|
1779
1938
|
}
|
|
1780
|
-
return /* @__PURE__ */
|
|
1939
|
+
return /* @__PURE__ */ jsx32(Fragment2, { children: props.href ? /* @__PURE__ */ jsx32(
|
|
1781
1940
|
Link,
|
|
1782
1941
|
{
|
|
1783
1942
|
href: props.href,
|
|
@@ -1787,7 +1946,7 @@ function Hyperlink(props) {
|
|
|
1787
1946
|
target,
|
|
1788
1947
|
children: props.children
|
|
1789
1948
|
}
|
|
1790
|
-
) : props.isHeading ? /* @__PURE__ */
|
|
1949
|
+
) : props.isHeading ? /* @__PURE__ */ jsx32("h5", { className: props.className + "inline-block", children: props.children }) : /* @__PURE__ */ jsx32("span", { className: props.className, children: props.children }) });
|
|
1791
1950
|
}
|
|
1792
1951
|
|
|
1793
1952
|
// src/clients/OdataBuilder.tsx
|
|
@@ -1945,30 +2104,30 @@ var OdataBuilder = class {
|
|
|
1945
2104
|
};
|
|
1946
2105
|
|
|
1947
2106
|
// src/svg/chevron-updown.tsx
|
|
1948
|
-
import { jsx as
|
|
2107
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1949
2108
|
var ChevronUpDown = (props) => {
|
|
1950
|
-
return /* @__PURE__ */
|
|
2109
|
+
return /* @__PURE__ */ jsx33("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__ */ jsx33("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" }) });
|
|
1951
2110
|
};
|
|
1952
2111
|
var chevron_updown_default = ChevronUpDown;
|
|
1953
2112
|
|
|
1954
2113
|
// src/svg/chevron-down.tsx
|
|
1955
|
-
import { jsx as
|
|
2114
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1956
2115
|
var ChevronDown = (props) => {
|
|
1957
|
-
return /* @__PURE__ */
|
|
2116
|
+
return /* @__PURE__ */ jsx34("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__ */ jsx34("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) });
|
|
1958
2117
|
};
|
|
1959
2118
|
var chevron_down_default = ChevronDown;
|
|
1960
2119
|
|
|
1961
2120
|
// src/svg/chevron-up.tsx
|
|
1962
|
-
import { jsx as
|
|
2121
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1963
2122
|
var ChevronUp = (props) => {
|
|
1964
|
-
return /* @__PURE__ */
|
|
2123
|
+
return /* @__PURE__ */ jsx35("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__ */ jsx35("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 15.75l7.5-7.5 7.5 7.5" }) });
|
|
1965
2124
|
};
|
|
1966
2125
|
var chevron_up_default = ChevronUp;
|
|
1967
2126
|
|
|
1968
2127
|
// src/svg/plus.tsx
|
|
1969
|
-
import { jsx as
|
|
2128
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1970
2129
|
var Plus = (props) => {
|
|
1971
|
-
return /* @__PURE__ */
|
|
2130
|
+
return /* @__PURE__ */ jsx36("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__ */ jsx36("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) });
|
|
1972
2131
|
};
|
|
1973
2132
|
var plus_default = Plus;
|
|
1974
2133
|
|
|
@@ -1982,14 +2141,14 @@ var Icons = {
|
|
|
1982
2141
|
var Icons_default = Icons;
|
|
1983
2142
|
|
|
1984
2143
|
// src/svg/Icon.tsx
|
|
1985
|
-
import { jsx as
|
|
2144
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1986
2145
|
var Icon = ({ name, className, ...props }) => {
|
|
1987
2146
|
const IconComponent = Icons_default[name];
|
|
1988
2147
|
if (!IconComponent) {
|
|
1989
2148
|
console.error(`Icon "${name}" not found.`);
|
|
1990
2149
|
return null;
|
|
1991
2150
|
}
|
|
1992
|
-
return /* @__PURE__ */
|
|
2151
|
+
return /* @__PURE__ */ jsx37(IconComponent, { ...props, className });
|
|
1993
2152
|
};
|
|
1994
2153
|
var Icon_default = Icon;
|
|
1995
2154
|
|
|
@@ -2038,7 +2197,7 @@ function FormReducer(state, action) {
|
|
|
2038
2197
|
var FormReducer_default = FormReducer;
|
|
2039
2198
|
|
|
2040
2199
|
// src/components/dataForm/DataList.tsx
|
|
2041
|
-
import { Fragment as Fragment3, jsx as
|
|
2200
|
+
import { Fragment as Fragment3, jsx as jsx38, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2042
2201
|
var DataList = (props) => {
|
|
2043
2202
|
console.log(props.dataset, "datasetssssss");
|
|
2044
2203
|
const router = useRouter();
|
|
@@ -2061,7 +2220,7 @@ var DataList = (props) => {
|
|
|
2061
2220
|
if (path.includes(".")) {
|
|
2062
2221
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
2063
2222
|
} else if (Array.isArray(obj[path])) {
|
|
2064
|
-
return obj[path].map((item, index) => /* @__PURE__ */
|
|
2223
|
+
return obj[path].map((item, index) => /* @__PURE__ */ jsx38("div", { children: item }, index));
|
|
2065
2224
|
} else {
|
|
2066
2225
|
return obj[path];
|
|
2067
2226
|
}
|
|
@@ -2117,30 +2276,30 @@ var DataList = (props) => {
|
|
|
2117
2276
|
const renderPageNumbers = () => {
|
|
2118
2277
|
if (pages <= 10) {
|
|
2119
2278
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
2120
|
-
(page) => /* @__PURE__ */
|
|
2279
|
+
(page) => /* @__PURE__ */ jsx38(React32.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx38(
|
|
2121
2280
|
Hyperlink,
|
|
2122
2281
|
{
|
|
2123
2282
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
2124
2283
|
href: builder.getNewPageUrl(page),
|
|
2125
2284
|
children: page
|
|
2126
2285
|
}
|
|
2127
|
-
) : /* @__PURE__ */
|
|
2286
|
+
) : /* @__PURE__ */ jsx38("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)
|
|
2128
2287
|
);
|
|
2129
2288
|
} else {
|
|
2130
2289
|
const showFirstPages = activePageNumber <= 5;
|
|
2131
2290
|
const showLastPages = activePageNumber > pages - 5;
|
|
2132
2291
|
if (showFirstPages) {
|
|
2133
|
-
return /* @__PURE__ */
|
|
2134
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */
|
|
2292
|
+
return /* @__PURE__ */ jsxs25(Fragment3, { children: [
|
|
2293
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ jsx38(React32.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx38(
|
|
2135
2294
|
Hyperlink,
|
|
2136
2295
|
{
|
|
2137
2296
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
2138
2297
|
href: builder.getNewPageUrl(page),
|
|
2139
2298
|
children: page
|
|
2140
2299
|
}
|
|
2141
|
-
) : /* @__PURE__ */
|
|
2142
|
-
/* @__PURE__ */
|
|
2143
|
-
/* @__PURE__ */
|
|
2300
|
+
) : /* @__PURE__ */ jsx38("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)),
|
|
2301
|
+
/* @__PURE__ */ jsx38("span", { className: "px-2 py-1", children: "..." }),
|
|
2302
|
+
/* @__PURE__ */ jsx38(
|
|
2144
2303
|
Hyperlink,
|
|
2145
2304
|
{
|
|
2146
2305
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2148,7 +2307,7 @@ var DataList = (props) => {
|
|
|
2148
2307
|
children: pages - 1
|
|
2149
2308
|
}
|
|
2150
2309
|
),
|
|
2151
|
-
/* @__PURE__ */
|
|
2310
|
+
/* @__PURE__ */ jsx38(
|
|
2152
2311
|
Hyperlink,
|
|
2153
2312
|
{
|
|
2154
2313
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2156,7 +2315,7 @@ var DataList = (props) => {
|
|
|
2156
2315
|
children: pages
|
|
2157
2316
|
}
|
|
2158
2317
|
),
|
|
2159
|
-
/* @__PURE__ */
|
|
2318
|
+
/* @__PURE__ */ jsx38("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs25(
|
|
2160
2319
|
"select",
|
|
2161
2320
|
{
|
|
2162
2321
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -2168,18 +2327,18 @@ var DataList = (props) => {
|
|
|
2168
2327
|
}
|
|
2169
2328
|
},
|
|
2170
2329
|
children: [
|
|
2171
|
-
/* @__PURE__ */
|
|
2330
|
+
/* @__PURE__ */ jsx38("option", { className: "", value: "", children: "Jump to" }),
|
|
2172
2331
|
Array.from(
|
|
2173
2332
|
{ length: Math.max(0, pages - 10) },
|
|
2174
2333
|
(_, index) => index + 9
|
|
2175
|
-
).map((page) => /* @__PURE__ */
|
|
2334
|
+
).map((page) => /* @__PURE__ */ jsx38("option", { value: page, children: page }, page))
|
|
2176
2335
|
]
|
|
2177
2336
|
}
|
|
2178
2337
|
) })
|
|
2179
2338
|
] });
|
|
2180
2339
|
} else if (showLastPages) {
|
|
2181
|
-
return /* @__PURE__ */
|
|
2182
|
-
/* @__PURE__ */
|
|
2340
|
+
return /* @__PURE__ */ jsxs25(Fragment3, { children: [
|
|
2341
|
+
/* @__PURE__ */ jsx38(
|
|
2183
2342
|
Hyperlink,
|
|
2184
2343
|
{
|
|
2185
2344
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2187,7 +2346,7 @@ var DataList = (props) => {
|
|
|
2187
2346
|
children: "1"
|
|
2188
2347
|
}
|
|
2189
2348
|
),
|
|
2190
|
-
/* @__PURE__ */
|
|
2349
|
+
/* @__PURE__ */ jsx38(
|
|
2191
2350
|
Hyperlink,
|
|
2192
2351
|
{
|
|
2193
2352
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2195,21 +2354,21 @@ var DataList = (props) => {
|
|
|
2195
2354
|
children: "2"
|
|
2196
2355
|
}
|
|
2197
2356
|
),
|
|
2198
|
-
/* @__PURE__ */
|
|
2357
|
+
/* @__PURE__ */ jsx38("span", { className: "px-2 py-1", children: "..." }),
|
|
2199
2358
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
2200
|
-
(page) => /* @__PURE__ */
|
|
2359
|
+
(page) => /* @__PURE__ */ jsx38(React32.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx38(
|
|
2201
2360
|
Hyperlink,
|
|
2202
2361
|
{
|
|
2203
2362
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
2204
2363
|
href: builder.getNewPageUrl(page),
|
|
2205
2364
|
children: page
|
|
2206
2365
|
}
|
|
2207
|
-
) : /* @__PURE__ */
|
|
2366
|
+
) : /* @__PURE__ */ jsx38("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)
|
|
2208
2367
|
)
|
|
2209
2368
|
] });
|
|
2210
2369
|
} else {
|
|
2211
|
-
return /* @__PURE__ */
|
|
2212
|
-
/* @__PURE__ */
|
|
2370
|
+
return /* @__PURE__ */ jsxs25(Fragment3, { children: [
|
|
2371
|
+
/* @__PURE__ */ jsx38(
|
|
2213
2372
|
Hyperlink,
|
|
2214
2373
|
{
|
|
2215
2374
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2217,7 +2376,7 @@ var DataList = (props) => {
|
|
|
2217
2376
|
children: "1"
|
|
2218
2377
|
}
|
|
2219
2378
|
),
|
|
2220
|
-
/* @__PURE__ */
|
|
2379
|
+
/* @__PURE__ */ jsx38(
|
|
2221
2380
|
Hyperlink,
|
|
2222
2381
|
{
|
|
2223
2382
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2225,20 +2384,20 @@ var DataList = (props) => {
|
|
|
2225
2384
|
children: "2"
|
|
2226
2385
|
}
|
|
2227
2386
|
),
|
|
2228
|
-
/* @__PURE__ */
|
|
2387
|
+
/* @__PURE__ */ jsx38("span", { className: "px-2 py-1", children: "..." }),
|
|
2229
2388
|
Array.from(
|
|
2230
2389
|
{ length: 5 },
|
|
2231
2390
|
(_, index) => activePageNumber - 2 + index
|
|
2232
|
-
).map((page) => /* @__PURE__ */
|
|
2391
|
+
).map((page) => /* @__PURE__ */ jsx38(React32.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx38(
|
|
2233
2392
|
Hyperlink,
|
|
2234
2393
|
{
|
|
2235
2394
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
2236
2395
|
href: builder.getNewPageUrl(page),
|
|
2237
2396
|
children: page
|
|
2238
2397
|
}
|
|
2239
|
-
) : /* @__PURE__ */
|
|
2240
|
-
/* @__PURE__ */
|
|
2241
|
-
/* @__PURE__ */
|
|
2398
|
+
) : /* @__PURE__ */ jsx38("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)),
|
|
2399
|
+
/* @__PURE__ */ jsx38("span", { className: "px-2 py-1", children: "..." }),
|
|
2400
|
+
/* @__PURE__ */ jsx38(
|
|
2242
2401
|
Hyperlink,
|
|
2243
2402
|
{
|
|
2244
2403
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2246,7 +2405,7 @@ var DataList = (props) => {
|
|
|
2246
2405
|
children: pages - 1
|
|
2247
2406
|
}
|
|
2248
2407
|
),
|
|
2249
|
-
/* @__PURE__ */
|
|
2408
|
+
/* @__PURE__ */ jsx38(
|
|
2250
2409
|
Hyperlink,
|
|
2251
2410
|
{
|
|
2252
2411
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2254,7 +2413,7 @@ var DataList = (props) => {
|
|
|
2254
2413
|
children: pages
|
|
2255
2414
|
}
|
|
2256
2415
|
),
|
|
2257
|
-
/* @__PURE__ */
|
|
2416
|
+
/* @__PURE__ */ jsx38("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs25(
|
|
2258
2417
|
"select",
|
|
2259
2418
|
{
|
|
2260
2419
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -2266,8 +2425,8 @@ var DataList = (props) => {
|
|
|
2266
2425
|
}
|
|
2267
2426
|
},
|
|
2268
2427
|
children: [
|
|
2269
|
-
/* @__PURE__ */
|
|
2270
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */
|
|
2428
|
+
/* @__PURE__ */ jsx38("option", { value: "", children: "Jump to" }),
|
|
2429
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ jsx38("option", { value: page, children: page }, page))
|
|
2271
2430
|
]
|
|
2272
2431
|
}
|
|
2273
2432
|
) })
|
|
@@ -2275,16 +2434,16 @@ var DataList = (props) => {
|
|
|
2275
2434
|
}
|
|
2276
2435
|
}
|
|
2277
2436
|
};
|
|
2278
|
-
return /* @__PURE__ */
|
|
2279
|
-
/* @__PURE__ */
|
|
2280
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */
|
|
2437
|
+
return /* @__PURE__ */ jsxs25(React32.Fragment, { children: [
|
|
2438
|
+
/* @__PURE__ */ jsxs25(ContentView_default, { isDataFound, children: [
|
|
2439
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs25(
|
|
2281
2440
|
"div",
|
|
2282
2441
|
{
|
|
2283
2442
|
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`,
|
|
2284
2443
|
children: [
|
|
2285
|
-
props.title ? /* @__PURE__ */
|
|
2286
|
-
/* @__PURE__ */
|
|
2287
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
2444
|
+
props.title ? /* @__PURE__ */ jsx38("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx38("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ jsx38("div", {}),
|
|
2445
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-3", children: [
|
|
2446
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx38(
|
|
2288
2447
|
InputControl_default,
|
|
2289
2448
|
{
|
|
2290
2449
|
name: filter.name,
|
|
@@ -2299,15 +2458,15 @@ var DataList = (props) => {
|
|
|
2299
2458
|
},
|
|
2300
2459
|
filter.name
|
|
2301
2460
|
)),
|
|
2302
|
-
props.addLinkHref && /* @__PURE__ */
|
|
2461
|
+
props.addLinkHref && /* @__PURE__ */ jsxs25(
|
|
2303
2462
|
Hyperlink,
|
|
2304
2463
|
{
|
|
2305
2464
|
className: "gap-1",
|
|
2306
2465
|
linkType: "Primary" /* Solid */,
|
|
2307
2466
|
href: props.addLinkHref,
|
|
2308
2467
|
children: [
|
|
2309
|
-
/* @__PURE__ */
|
|
2310
|
-
/* @__PURE__ */
|
|
2468
|
+
/* @__PURE__ */ jsx38(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
2469
|
+
/* @__PURE__ */ jsx38("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
2311
2470
|
]
|
|
2312
2471
|
}
|
|
2313
2472
|
)
|
|
@@ -2315,8 +2474,8 @@ var DataList = (props) => {
|
|
|
2315
2474
|
]
|
|
2316
2475
|
}
|
|
2317
2476
|
),
|
|
2318
|
-
/* @__PURE__ */
|
|
2319
|
-
/* @__PURE__ */
|
|
2477
|
+
/* @__PURE__ */ jsx38("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ jsxs25("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
2478
|
+
/* @__PURE__ */ jsx38("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ jsx38("tr", { children: props?.columns?.map((column) => {
|
|
2320
2479
|
let url = builder.getNewOrderByUrl(column.name);
|
|
2321
2480
|
let icon = "chevronUpDown";
|
|
2322
2481
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -2326,36 +2485,36 @@ var DataList = (props) => {
|
|
|
2326
2485
|
icon = "chevronUp";
|
|
2327
2486
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
2328
2487
|
}
|
|
2329
|
-
return /* @__PURE__ */
|
|
2488
|
+
return /* @__PURE__ */ jsx38(
|
|
2330
2489
|
"th",
|
|
2331
2490
|
{
|
|
2332
2491
|
className: "px-6 py-3 text-left font-medium cursor-pointer bg-neutral-soft " + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
2333
|
-
children: /* @__PURE__ */
|
|
2334
|
-
/* @__PURE__ */
|
|
2335
|
-
column.enableSorting && /* @__PURE__ */
|
|
2492
|
+
children: /* @__PURE__ */ jsx38(Hyperlink, { href: url, className: "!text-neutral-contrast ", children: /* @__PURE__ */ jsxs25("span", { className: "flex items-center space-x-1", children: [
|
|
2493
|
+
/* @__PURE__ */ jsx38("span", { className: "text-black", children: column.label }),
|
|
2494
|
+
column.enableSorting && /* @__PURE__ */ jsx38(Icon_default, { className: "w-4 h-4", name: icon })
|
|
2336
2495
|
] }) })
|
|
2337
2496
|
},
|
|
2338
2497
|
column.name
|
|
2339
2498
|
);
|
|
2340
2499
|
}) }) }),
|
|
2341
|
-
/* @__PURE__ */
|
|
2500
|
+
/* @__PURE__ */ jsx38("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
2342
2501
|
let validityClass = "";
|
|
2343
2502
|
console.log("dataitem", dataitem);
|
|
2344
2503
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
2345
2504
|
validityClass = "bg-alert-200";
|
|
2346
2505
|
}
|
|
2347
|
-
return /* @__PURE__ */
|
|
2506
|
+
return /* @__PURE__ */ jsx38("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
2348
2507
|
console.log("column", column);
|
|
2349
|
-
return /* @__PURE__ */
|
|
2508
|
+
return /* @__PURE__ */ jsx38(React32.Fragment, { children: /* @__PURE__ */ jsx38(
|
|
2350
2509
|
"td",
|
|
2351
2510
|
{
|
|
2352
2511
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
2353
|
-
children: column.addhref === true ? /* @__PURE__ */
|
|
2512
|
+
children: column.addhref === true ? /* @__PURE__ */ jsx38(
|
|
2354
2513
|
Hyperlink,
|
|
2355
2514
|
{
|
|
2356
2515
|
className: "",
|
|
2357
2516
|
href: `https://${dataitem[column.name]}`,
|
|
2358
|
-
children: /* @__PURE__ */
|
|
2517
|
+
children: /* @__PURE__ */ jsx38(
|
|
2359
2518
|
ViewControl_default,
|
|
2360
2519
|
{
|
|
2361
2520
|
controlType: column.controlType,
|
|
@@ -2368,11 +2527,11 @@ var DataList = (props) => {
|
|
|
2368
2527
|
}
|
|
2369
2528
|
)
|
|
2370
2529
|
}
|
|
2371
|
-
) : column.showAsLink ? /* @__PURE__ */
|
|
2530
|
+
) : column.showAsLink ? /* @__PURE__ */ jsx38(
|
|
2372
2531
|
Hyperlink,
|
|
2373
2532
|
{
|
|
2374
2533
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
2375
|
-
children: /* @__PURE__ */
|
|
2534
|
+
children: /* @__PURE__ */ jsx38(
|
|
2376
2535
|
ViewControl_default,
|
|
2377
2536
|
{
|
|
2378
2537
|
controlType: column.controlType,
|
|
@@ -2382,7 +2541,7 @@ var DataList = (props) => {
|
|
|
2382
2541
|
}
|
|
2383
2542
|
)
|
|
2384
2543
|
}
|
|
2385
|
-
) : /* @__PURE__ */
|
|
2544
|
+
) : /* @__PURE__ */ jsx38(
|
|
2386
2545
|
ViewControl_default,
|
|
2387
2546
|
{
|
|
2388
2547
|
controlType: column.controlType,
|
|
@@ -2396,10 +2555,10 @@ var DataList = (props) => {
|
|
|
2396
2555
|
}) }, index);
|
|
2397
2556
|
}) })
|
|
2398
2557
|
] }) }),
|
|
2399
|
-
/* @__PURE__ */
|
|
2400
|
-
/* @__PURE__ */
|
|
2401
|
-
/* @__PURE__ */
|
|
2402
|
-
activePageNumber > 1 && /* @__PURE__ */
|
|
2558
|
+
/* @__PURE__ */ jsx38("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between", children: [
|
|
2559
|
+
/* @__PURE__ */ jsx38("div", { className: "text-gray-700", children: label }),
|
|
2560
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex space-x-2 items-center", children: [
|
|
2561
|
+
activePageNumber > 1 && /* @__PURE__ */ jsx38(
|
|
2403
2562
|
Hyperlink,
|
|
2404
2563
|
{
|
|
2405
2564
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -2407,9 +2566,9 @@ var DataList = (props) => {
|
|
|
2407
2566
|
children: "Prev"
|
|
2408
2567
|
}
|
|
2409
2568
|
),
|
|
2410
|
-
activePageNumber <= 1 && /* @__PURE__ */
|
|
2569
|
+
activePageNumber <= 1 && /* @__PURE__ */ jsx38("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" }),
|
|
2411
2570
|
renderPageNumbers(),
|
|
2412
|
-
activePageNumber < pages && /* @__PURE__ */
|
|
2571
|
+
activePageNumber < pages && /* @__PURE__ */ jsx38(
|
|
2413
2572
|
Hyperlink,
|
|
2414
2573
|
{
|
|
2415
2574
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -2417,19 +2576,19 @@ var DataList = (props) => {
|
|
|
2417
2576
|
children: "Next"
|
|
2418
2577
|
}
|
|
2419
2578
|
),
|
|
2420
|
-
activePageNumber >= pages && /* @__PURE__ */
|
|
2579
|
+
activePageNumber >= pages && /* @__PURE__ */ jsx38("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
2421
2580
|
] })
|
|
2422
2581
|
] }) })
|
|
2423
2582
|
] }),
|
|
2424
|
-
/* @__PURE__ */
|
|
2425
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */
|
|
2583
|
+
/* @__PURE__ */ jsxs25(NoContentView_default, { isDataFound, children: [
|
|
2584
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs25(
|
|
2426
2585
|
"div",
|
|
2427
2586
|
{
|
|
2428
2587
|
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`,
|
|
2429
2588
|
children: [
|
|
2430
|
-
props.title ? /* @__PURE__ */
|
|
2431
|
-
/* @__PURE__ */
|
|
2432
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
2589
|
+
props.title ? /* @__PURE__ */ jsx38("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx38("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ jsx38("div", {}),
|
|
2590
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-3", children: [
|
|
2591
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx38(
|
|
2433
2592
|
InputControl_default,
|
|
2434
2593
|
{
|
|
2435
2594
|
name: filter.name,
|
|
@@ -2444,15 +2603,15 @@ var DataList = (props) => {
|
|
|
2444
2603
|
},
|
|
2445
2604
|
filter.name
|
|
2446
2605
|
)),
|
|
2447
|
-
props.addLinkHref && /* @__PURE__ */
|
|
2606
|
+
props.addLinkHref && /* @__PURE__ */ jsxs25(
|
|
2448
2607
|
Hyperlink,
|
|
2449
2608
|
{
|
|
2450
2609
|
className: "gap-1",
|
|
2451
2610
|
linkType: "Primary" /* Solid */,
|
|
2452
2611
|
href: props.addLinkHref,
|
|
2453
2612
|
children: [
|
|
2454
|
-
/* @__PURE__ */
|
|
2455
|
-
/* @__PURE__ */
|
|
2613
|
+
/* @__PURE__ */ jsx38(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
2614
|
+
/* @__PURE__ */ jsx38("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
2456
2615
|
]
|
|
2457
2616
|
}
|
|
2458
2617
|
)
|
|
@@ -2460,8 +2619,8 @@ var DataList = (props) => {
|
|
|
2460
2619
|
]
|
|
2461
2620
|
}
|
|
2462
2621
|
),
|
|
2463
|
-
/* @__PURE__ */
|
|
2464
|
-
/* @__PURE__ */
|
|
2622
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
2623
|
+
/* @__PURE__ */ jsx38("div", { children: /* @__PURE__ */ jsx38("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ jsx38("thead", { className: "bg-gray-50", children: /* @__PURE__ */ jsx38("tr", { children: props?.columns?.map((column) => {
|
|
2465
2624
|
let url = builder.getNewOrderByUrl(column.name);
|
|
2466
2625
|
let icon = "chevronUpDown";
|
|
2467
2626
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -2471,19 +2630,19 @@ var DataList = (props) => {
|
|
|
2471
2630
|
icon = "chevronUp";
|
|
2472
2631
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
2473
2632
|
}
|
|
2474
|
-
return /* @__PURE__ */
|
|
2633
|
+
return /* @__PURE__ */ jsx38(
|
|
2475
2634
|
"th",
|
|
2476
2635
|
{
|
|
2477
2636
|
className: "px-6 py-3 text-left font-medium cursor-pointer bg-neutral-soft " + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
2478
|
-
children: /* @__PURE__ */
|
|
2479
|
-
/* @__PURE__ */
|
|
2480
|
-
column.enableSorting && /* @__PURE__ */
|
|
2637
|
+
children: /* @__PURE__ */ jsx38(Hyperlink, { href: url, className: "text-body-950", children: /* @__PURE__ */ jsxs25("span", { className: "flex items-center space-x-1", children: [
|
|
2638
|
+
/* @__PURE__ */ jsx38("span", { children: column.label }),
|
|
2639
|
+
column.enableSorting && /* @__PURE__ */ jsx38(Icon_default, { className: "w-4 h-4", name: icon })
|
|
2481
2640
|
] }) })
|
|
2482
2641
|
},
|
|
2483
2642
|
column.name
|
|
2484
2643
|
);
|
|
2485
2644
|
}) }) }) }) }),
|
|
2486
|
-
/* @__PURE__ */
|
|
2645
|
+
/* @__PURE__ */ jsx38("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
2487
2646
|
] })
|
|
2488
2647
|
] })
|
|
2489
2648
|
] });
|
|
@@ -2497,7 +2656,7 @@ import React45 from "react";
|
|
|
2497
2656
|
import React34 from "react";
|
|
2498
2657
|
|
|
2499
2658
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
2500
|
-
import { jsx as
|
|
2659
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2501
2660
|
var TextNode = (props) => {
|
|
2502
2661
|
function cssStringToJson(cssString) {
|
|
2503
2662
|
const styleObject = {};
|
|
@@ -2557,22 +2716,22 @@ var TextNode = (props) => {
|
|
|
2557
2716
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
2558
2717
|
return (
|
|
2559
2718
|
// @ts-expect-error custom code
|
|
2560
|
-
/* @__PURE__ */
|
|
2719
|
+
/* @__PURE__ */ jsx39("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text })
|
|
2561
2720
|
);
|
|
2562
2721
|
};
|
|
2563
2722
|
var TextNode_default = TextNode;
|
|
2564
2723
|
|
|
2565
2724
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
2566
|
-
import { jsx as
|
|
2725
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
2567
2726
|
var LineBreakNode = () => {
|
|
2568
|
-
return /* @__PURE__ */
|
|
2727
|
+
return /* @__PURE__ */ jsx40("div", { className: "py-0.5 lg:py-1.5" });
|
|
2569
2728
|
};
|
|
2570
2729
|
var LineBreakNode_default = LineBreakNode;
|
|
2571
2730
|
|
|
2572
2731
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
2573
2732
|
import React33 from "react";
|
|
2574
2733
|
import Link2 from "next/link";
|
|
2575
|
-
import { jsx as
|
|
2734
|
+
import { jsx as jsx41, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2576
2735
|
var LinkNode = (props) => {
|
|
2577
2736
|
const NodeTypes2 = {
|
|
2578
2737
|
["text"]: TextNode_default
|
|
@@ -2580,21 +2739,21 @@ var LinkNode = (props) => {
|
|
|
2580
2739
|
{
|
|
2581
2740
|
}
|
|
2582
2741
|
let formatClasses = props.node.cssClass || "";
|
|
2583
|
-
return /* @__PURE__ */
|
|
2742
|
+
return /* @__PURE__ */ jsxs26(Link2, { className: formatClasses, href: props.node.url, title: props.node.title, children: [
|
|
2584
2743
|
props.node.children && props.node.children.map((node, index) => {
|
|
2585
2744
|
const SelectedNode = NodeTypes2[node.type];
|
|
2586
|
-
return /* @__PURE__ */
|
|
2745
|
+
return /* @__PURE__ */ jsx41(React33.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx41(SelectedNode, { node }) }, index);
|
|
2587
2746
|
}),
|
|
2588
|
-
props.node.children.length == 0 && /* @__PURE__ */
|
|
2747
|
+
props.node.children.length == 0 && /* @__PURE__ */ jsx41("br", {})
|
|
2589
2748
|
] });
|
|
2590
2749
|
};
|
|
2591
2750
|
var LinkNode_default = LinkNode;
|
|
2592
2751
|
|
|
2593
2752
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
2594
|
-
import { jsx as
|
|
2753
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
2595
2754
|
var SVGIconNode = ({ node }) => {
|
|
2596
2755
|
if (!node?.svgCode) return null;
|
|
2597
|
-
return /* @__PURE__ */
|
|
2756
|
+
return /* @__PURE__ */ jsx42(
|
|
2598
2757
|
"span",
|
|
2599
2758
|
{
|
|
2600
2759
|
style: {
|
|
@@ -2611,7 +2770,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
2611
2770
|
|
|
2612
2771
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
2613
2772
|
import katex from "katex";
|
|
2614
|
-
import { jsx as
|
|
2773
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
2615
2774
|
var EquationNode = ({ node }) => {
|
|
2616
2775
|
const { equation, inline } = node;
|
|
2617
2776
|
let html = "";
|
|
@@ -2626,7 +2785,7 @@ var EquationNode = ({ node }) => {
|
|
|
2626
2785
|
});
|
|
2627
2786
|
}
|
|
2628
2787
|
if (inline) {
|
|
2629
|
-
return /* @__PURE__ */
|
|
2788
|
+
return /* @__PURE__ */ jsx43(
|
|
2630
2789
|
"span",
|
|
2631
2790
|
{
|
|
2632
2791
|
className: "katex-inline",
|
|
@@ -2634,7 +2793,7 @@ var EquationNode = ({ node }) => {
|
|
|
2634
2793
|
}
|
|
2635
2794
|
);
|
|
2636
2795
|
}
|
|
2637
|
-
return /* @__PURE__ */
|
|
2796
|
+
return /* @__PURE__ */ jsx43(
|
|
2638
2797
|
"div",
|
|
2639
2798
|
{
|
|
2640
2799
|
className: "katex-block my-3 text-center",
|
|
@@ -2645,7 +2804,7 @@ var EquationNode = ({ node }) => {
|
|
|
2645
2804
|
var EquationNode_default = EquationNode;
|
|
2646
2805
|
|
|
2647
2806
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
2648
|
-
import { jsx as
|
|
2807
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
2649
2808
|
function getNestedProperty(obj, path) {
|
|
2650
2809
|
if (!obj || !path) return null;
|
|
2651
2810
|
if (path.includes(".")) {
|
|
@@ -2658,7 +2817,7 @@ function getNestedProperty(obj, path) {
|
|
|
2658
2817
|
}
|
|
2659
2818
|
const value = obj[path];
|
|
2660
2819
|
if (Array.isArray(value)) {
|
|
2661
|
-
return value.map((item, index) => /* @__PURE__ */
|
|
2820
|
+
return value.map((item, index) => /* @__PURE__ */ jsx44("div", { children: String(item) }, index));
|
|
2662
2821
|
}
|
|
2663
2822
|
return value;
|
|
2664
2823
|
}
|
|
@@ -2719,7 +2878,7 @@ var DatafieldNode = (props) => {
|
|
|
2719
2878
|
const dataType = props.node.dataType;
|
|
2720
2879
|
if (isEmptyValue) return null;
|
|
2721
2880
|
if (dataType === "rawContent") {
|
|
2722
|
-
return /* @__PURE__ */
|
|
2881
|
+
return /* @__PURE__ */ jsx44(
|
|
2723
2882
|
PageBodyRenderer_default,
|
|
2724
2883
|
{
|
|
2725
2884
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -2734,12 +2893,12 @@ var DatafieldNode = (props) => {
|
|
|
2734
2893
|
}
|
|
2735
2894
|
);
|
|
2736
2895
|
}
|
|
2737
|
-
return /* @__PURE__ */
|
|
2896
|
+
return /* @__PURE__ */ jsx44(
|
|
2738
2897
|
"span",
|
|
2739
2898
|
{
|
|
2740
2899
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
2741
2900
|
style: styles,
|
|
2742
|
-
children: /* @__PURE__ */
|
|
2901
|
+
children: /* @__PURE__ */ jsx44(
|
|
2743
2902
|
ViewControl_default,
|
|
2744
2903
|
{
|
|
2745
2904
|
controlType: dataType,
|
|
@@ -2752,7 +2911,7 @@ var DatafieldNode = (props) => {
|
|
|
2752
2911
|
var DatafieldNode_default = DatafieldNode;
|
|
2753
2912
|
|
|
2754
2913
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
2755
|
-
import { Fragment as Fragment4, jsx as
|
|
2914
|
+
import { Fragment as Fragment4, jsx as jsx45, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2756
2915
|
var ParagraphNode = (props) => {
|
|
2757
2916
|
const NodeTypes2 = {
|
|
2758
2917
|
["text"]: TextNode_default,
|
|
@@ -2772,9 +2931,9 @@ var ParagraphNode = (props) => {
|
|
|
2772
2931
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
2773
2932
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
2774
2933
|
if (isInlineOnlyParent) {
|
|
2775
|
-
return /* @__PURE__ */
|
|
2934
|
+
return /* @__PURE__ */ jsx45(Fragment4, { children: hasChildren && props.node.children.map((node, index) => {
|
|
2776
2935
|
const SelectedNode = NodeTypes2[node.type];
|
|
2777
|
-
return /* @__PURE__ */
|
|
2936
|
+
return /* @__PURE__ */ jsx45(React34.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx45(
|
|
2778
2937
|
SelectedNode,
|
|
2779
2938
|
{
|
|
2780
2939
|
node,
|
|
@@ -2786,10 +2945,10 @@ var ParagraphNode = (props) => {
|
|
|
2786
2945
|
) }, index);
|
|
2787
2946
|
}) });
|
|
2788
2947
|
}
|
|
2789
|
-
return /* @__PURE__ */
|
|
2948
|
+
return /* @__PURE__ */ jsxs27("div", { className: " " + formatClasses, children: [
|
|
2790
2949
|
hasChildren && props.node.children.map((node, index) => {
|
|
2791
2950
|
const SelectedNode = NodeTypes2[node.type];
|
|
2792
|
-
return /* @__PURE__ */
|
|
2951
|
+
return /* @__PURE__ */ jsx45(React34.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx45(
|
|
2793
2952
|
SelectedNode,
|
|
2794
2953
|
{
|
|
2795
2954
|
node,
|
|
@@ -2800,14 +2959,14 @@ var ParagraphNode = (props) => {
|
|
|
2800
2959
|
}
|
|
2801
2960
|
) }, index);
|
|
2802
2961
|
}),
|
|
2803
|
-
!hasChildren && /* @__PURE__ */
|
|
2962
|
+
!hasChildren && /* @__PURE__ */ jsx45("div", { className: "py-1.5 lg:py-2" })
|
|
2804
2963
|
] });
|
|
2805
2964
|
};
|
|
2806
2965
|
var ParagraphNode_default = ParagraphNode;
|
|
2807
2966
|
|
|
2808
2967
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
2809
2968
|
import React35 from "react";
|
|
2810
|
-
import { Fragment as Fragment5, jsx as
|
|
2969
|
+
import { Fragment as Fragment5, jsx as jsx46 } from "react/jsx-runtime";
|
|
2811
2970
|
var HeadingNode = (props) => {
|
|
2812
2971
|
const NodeTypes2 = {
|
|
2813
2972
|
["text"]: TextNode_default,
|
|
@@ -2823,12 +2982,12 @@ var HeadingNode = (props) => {
|
|
|
2823
2982
|
{
|
|
2824
2983
|
}
|
|
2825
2984
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
2826
|
-
return /* @__PURE__ */
|
|
2985
|
+
return /* @__PURE__ */ jsx46(Fragment5, { children: React35.createElement(
|
|
2827
2986
|
HeadingTag,
|
|
2828
2987
|
{ className: formatClasses },
|
|
2829
2988
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
2830
2989
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
2831
|
-
return /* @__PURE__ */
|
|
2990
|
+
return /* @__PURE__ */ jsx46(React35.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx46(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
2832
2991
|
})
|
|
2833
2992
|
) });
|
|
2834
2993
|
};
|
|
@@ -2839,7 +2998,7 @@ import React37 from "react";
|
|
|
2839
2998
|
|
|
2840
2999
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
2841
3000
|
import React36 from "react";
|
|
2842
|
-
import { jsx as
|
|
3001
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
2843
3002
|
var ListItemNode = (props) => {
|
|
2844
3003
|
const NodeTypes2 = {
|
|
2845
3004
|
text: TextNode_default,
|
|
@@ -2856,37 +3015,37 @@ var ListItemNode = (props) => {
|
|
|
2856
3015
|
liStyle.fontSize = match[1].trim();
|
|
2857
3016
|
}
|
|
2858
3017
|
}
|
|
2859
|
-
return /* @__PURE__ */
|
|
3018
|
+
return /* @__PURE__ */ jsx47("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
2860
3019
|
const SelectedNode = NodeTypes2[node.type];
|
|
2861
3020
|
if (node.type === "linebreak") {
|
|
2862
3021
|
if (!foundFirstBreak) {
|
|
2863
3022
|
foundFirstBreak = true;
|
|
2864
|
-
return /* @__PURE__ */
|
|
3023
|
+
return /* @__PURE__ */ jsx47("div", {}, index);
|
|
2865
3024
|
} else {
|
|
2866
|
-
return /* @__PURE__ */
|
|
3025
|
+
return /* @__PURE__ */ jsx47("div", { className: "py-1 lg:py-2" }, index);
|
|
2867
3026
|
}
|
|
2868
3027
|
} else {
|
|
2869
3028
|
foundFirstBreak = false;
|
|
2870
|
-
return /* @__PURE__ */
|
|
3029
|
+
return /* @__PURE__ */ jsx47(React36.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx47(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2871
3030
|
}
|
|
2872
3031
|
}) });
|
|
2873
3032
|
};
|
|
2874
3033
|
var ListItemNode_default = ListItemNode;
|
|
2875
3034
|
|
|
2876
3035
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
2877
|
-
import { jsx as
|
|
3036
|
+
import { jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2878
3037
|
var ListNode = (props) => {
|
|
2879
3038
|
const NodeTypes2 = {
|
|
2880
3039
|
listitem: ListItemNode_default
|
|
2881
3040
|
};
|
|
2882
|
-
return /* @__PURE__ */
|
|
2883
|
-
props.node.listType == "bullet" && /* @__PURE__ */
|
|
3041
|
+
return /* @__PURE__ */ jsxs28(React37.Fragment, { children: [
|
|
3042
|
+
props.node.listType == "bullet" && /* @__PURE__ */ jsx48("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2884
3043
|
const SelectedNode = NodeTypes2[node.type];
|
|
2885
|
-
return /* @__PURE__ */
|
|
3044
|
+
return /* @__PURE__ */ jsx48(React37.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx48(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2886
3045
|
}) }),
|
|
2887
|
-
props.node.listType == "number" && /* @__PURE__ */
|
|
3046
|
+
props.node.listType == "number" && /* @__PURE__ */ jsx48("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2888
3047
|
const SelectedNode = NodeTypes2[node.type];
|
|
2889
|
-
return /* @__PURE__ */
|
|
3048
|
+
return /* @__PURE__ */ jsx48(React37.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx48(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2890
3049
|
}) })
|
|
2891
3050
|
] });
|
|
2892
3051
|
};
|
|
@@ -2894,16 +3053,16 @@ var ListNode_default = ListNode;
|
|
|
2894
3053
|
|
|
2895
3054
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
2896
3055
|
import React38 from "react";
|
|
2897
|
-
import { jsx as
|
|
3056
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
2898
3057
|
var QuoteNode = (props) => {
|
|
2899
3058
|
const NodeTypes2 = {
|
|
2900
3059
|
["text"]: TextNode_default,
|
|
2901
3060
|
["linebreak"]: LineBreakNode_default,
|
|
2902
3061
|
["link"]: LinkNode_default
|
|
2903
3062
|
};
|
|
2904
|
-
return /* @__PURE__ */
|
|
3063
|
+
return /* @__PURE__ */ jsx49("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2905
3064
|
const SelectedNode = NodeTypes2[node.type];
|
|
2906
|
-
return /* @__PURE__ */
|
|
3065
|
+
return /* @__PURE__ */ jsx49(React38.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx49(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
2907
3066
|
}) });
|
|
2908
3067
|
};
|
|
2909
3068
|
var QuoteNode_default = QuoteNode;
|
|
@@ -2911,11 +3070,11 @@ var QuoteNode_default = QuoteNode;
|
|
|
2911
3070
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
2912
3071
|
import React39 from "react";
|
|
2913
3072
|
import dynamic from "next/dynamic";
|
|
2914
|
-
import { jsx as
|
|
3073
|
+
import { jsx as jsx50, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2915
3074
|
var CopyButton = dynamic(() => import("./CopyButton-XONTQQW7.mjs"), {
|
|
2916
3075
|
ssr: false,
|
|
2917
3076
|
// optional: fallback UI while loading
|
|
2918
|
-
loading: () => /* @__PURE__ */
|
|
3077
|
+
loading: () => /* @__PURE__ */ jsx50("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
2919
3078
|
});
|
|
2920
3079
|
var CodeNode = (props) => {
|
|
2921
3080
|
const NodeTypes2 = {
|
|
@@ -2929,14 +3088,14 @@ var CodeNode = (props) => {
|
|
|
2929
3088
|
if (node.type === "link") return node.text || node.url || "";
|
|
2930
3089
|
return "";
|
|
2931
3090
|
}).join("") ?? "";
|
|
2932
|
-
return /* @__PURE__ */
|
|
2933
|
-
/* @__PURE__ */
|
|
2934
|
-
/* @__PURE__ */
|
|
2935
|
-
/* @__PURE__ */
|
|
3091
|
+
return /* @__PURE__ */ jsxs29("div", { children: [
|
|
3092
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
3093
|
+
/* @__PURE__ */ jsx50("span", { children: "Code Snippet" }),
|
|
3094
|
+
/* @__PURE__ */ jsx50(CopyButton, { text: textContent })
|
|
2936
3095
|
] }),
|
|
2937
|
-
/* @__PURE__ */
|
|
3096
|
+
/* @__PURE__ */ jsx50("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) => {
|
|
2938
3097
|
const SelectedNode = NodeTypes2[node.type];
|
|
2939
|
-
return /* @__PURE__ */
|
|
3098
|
+
return /* @__PURE__ */ jsx50(React39.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx50(
|
|
2940
3099
|
SelectedNode,
|
|
2941
3100
|
{
|
|
2942
3101
|
node,
|
|
@@ -2951,9 +3110,9 @@ var CodeNode = (props) => {
|
|
|
2951
3110
|
var CodeNode_default = CodeNode;
|
|
2952
3111
|
|
|
2953
3112
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
2954
|
-
import { jsx as
|
|
3113
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
2955
3114
|
var HorizontalRuleNode = () => {
|
|
2956
|
-
return /* @__PURE__ */
|
|
3115
|
+
return /* @__PURE__ */ jsx51("hr", {});
|
|
2957
3116
|
};
|
|
2958
3117
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
2959
3118
|
|
|
@@ -2985,7 +3144,7 @@ var AssetUtility_default = AssetUtility;
|
|
|
2985
3144
|
import dynamic2 from "next/dynamic";
|
|
2986
3145
|
|
|
2987
3146
|
// src/components/DeviceAssetSelector.tsx
|
|
2988
|
-
import { jsx as
|
|
3147
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
2989
3148
|
var DeviceAssetSelector = ({
|
|
2990
3149
|
assets,
|
|
2991
3150
|
assetBaseUrl,
|
|
@@ -3060,7 +3219,7 @@ var DeviceAssetSelector = ({
|
|
|
3060
3219
|
const formatClasses = FormatClass[nodeProps?.format || ""] || "";
|
|
3061
3220
|
const renderMedia = () => {
|
|
3062
3221
|
if (isHls) {
|
|
3063
|
-
return /* @__PURE__ */
|
|
3222
|
+
return /* @__PURE__ */ jsx52(
|
|
3064
3223
|
HlsPlayer_default,
|
|
3065
3224
|
{
|
|
3066
3225
|
assetUrl: resolvedAssetUrl,
|
|
@@ -3077,7 +3236,7 @@ var DeviceAssetSelector = ({
|
|
|
3077
3236
|
} else {
|
|
3078
3237
|
return (
|
|
3079
3238
|
/* eslint-disable-next-line @next/next/no-img-element */
|
|
3080
|
-
/* @__PURE__ */
|
|
3239
|
+
/* @__PURE__ */ jsx52(
|
|
3081
3240
|
"img",
|
|
3082
3241
|
{
|
|
3083
3242
|
style: styles,
|
|
@@ -3093,17 +3252,17 @@ var DeviceAssetSelector = ({
|
|
|
3093
3252
|
}
|
|
3094
3253
|
};
|
|
3095
3254
|
if (width) {
|
|
3096
|
-
return /* @__PURE__ */
|
|
3255
|
+
return /* @__PURE__ */ jsx52("div", { style: { width }, children: renderMedia() });
|
|
3097
3256
|
}
|
|
3098
3257
|
if (nodeProps?.format) {
|
|
3099
|
-
return /* @__PURE__ */
|
|
3258
|
+
return /* @__PURE__ */ jsx52("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
3100
3259
|
}
|
|
3101
3260
|
return renderMedia();
|
|
3102
3261
|
};
|
|
3103
3262
|
var DeviceAssetSelector_default = DeviceAssetSelector;
|
|
3104
3263
|
|
|
3105
3264
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
3106
|
-
import { Fragment as Fragment6, jsx as
|
|
3265
|
+
import { Fragment as Fragment6, jsx as jsx53 } from "react/jsx-runtime";
|
|
3107
3266
|
var HlsPlayer = dynamic2(() => import("./HlsPlayer-FFEIK6FG.mjs"), {
|
|
3108
3267
|
ssr: false
|
|
3109
3268
|
});
|
|
@@ -3146,7 +3305,7 @@ var ImageNode = (props) => {
|
|
|
3146
3305
|
console.error("Error parsing assets in ImageNode:", error);
|
|
3147
3306
|
}
|
|
3148
3307
|
if (assets && assets.length > 0) {
|
|
3149
|
-
return /* @__PURE__ */
|
|
3308
|
+
return /* @__PURE__ */ jsx53(Fragment6, { children: /* @__PURE__ */ jsx53(
|
|
3150
3309
|
DeviceAssetSelector_default,
|
|
3151
3310
|
{
|
|
3152
3311
|
device: props.device,
|
|
@@ -3195,7 +3354,7 @@ var ImageNode = (props) => {
|
|
|
3195
3354
|
const isHls = imageUrl?.endsWith(".m3u8");
|
|
3196
3355
|
const renderMedia = () => {
|
|
3197
3356
|
if (isHls) {
|
|
3198
|
-
return /* @__PURE__ */
|
|
3357
|
+
return /* @__PURE__ */ jsx53(
|
|
3199
3358
|
HlsPlayer,
|
|
3200
3359
|
{
|
|
3201
3360
|
assetUrl: imageUrl,
|
|
@@ -3210,7 +3369,7 @@ var ImageNode = (props) => {
|
|
|
3210
3369
|
}
|
|
3211
3370
|
);
|
|
3212
3371
|
} else {
|
|
3213
|
-
return /* @__PURE__ */
|
|
3372
|
+
return /* @__PURE__ */ jsx53(React40.Fragment, { children: /* @__PURE__ */ jsx53(
|
|
3214
3373
|
"img",
|
|
3215
3374
|
{
|
|
3216
3375
|
style: styles,
|
|
@@ -3225,14 +3384,14 @@ var ImageNode = (props) => {
|
|
|
3225
3384
|
}
|
|
3226
3385
|
};
|
|
3227
3386
|
if (props.node.width) {
|
|
3228
|
-
return /* @__PURE__ */
|
|
3387
|
+
return /* @__PURE__ */ jsx53("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
3229
3388
|
}
|
|
3230
3389
|
return renderMedia();
|
|
3231
3390
|
};
|
|
3232
3391
|
var ImageNode_default = ImageNode;
|
|
3233
3392
|
|
|
3234
3393
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
3235
|
-
import { Fragment as Fragment7, jsx as
|
|
3394
|
+
import { Fragment as Fragment7, jsx as jsx54, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3236
3395
|
var WidgetNode = (props) => {
|
|
3237
3396
|
const getWidgetParameters = () => {
|
|
3238
3397
|
const widgetInputParameters = {
|
|
@@ -3289,14 +3448,14 @@ var WidgetNode = (props) => {
|
|
|
3289
3448
|
};
|
|
3290
3449
|
const widgetCode = props.node?.widgetCode;
|
|
3291
3450
|
if (!widgetCode) {
|
|
3292
|
-
return /* @__PURE__ */
|
|
3451
|
+
return /* @__PURE__ */ jsx54(Fragment7, { children: "Invalid widget" });
|
|
3293
3452
|
}
|
|
3294
3453
|
const SelectedWidget = getWidget(widgetCode);
|
|
3295
3454
|
if (!SelectedWidget) {
|
|
3296
3455
|
if (process.env.NODE_ENV !== "production") {
|
|
3297
3456
|
console.warn("Widget not found:", widgetCode);
|
|
3298
3457
|
}
|
|
3299
|
-
return /* @__PURE__ */
|
|
3458
|
+
return /* @__PURE__ */ jsxs30(Fragment7, { children: [
|
|
3300
3459
|
"Widget not found: ",
|
|
3301
3460
|
widgetCode
|
|
3302
3461
|
] });
|
|
@@ -3304,7 +3463,7 @@ var WidgetNode = (props) => {
|
|
|
3304
3463
|
const widgetParams = getWidgetParameters();
|
|
3305
3464
|
return (
|
|
3306
3465
|
// eslint-disable-next-line react-hooks/static-components
|
|
3307
|
-
/* @__PURE__ */
|
|
3466
|
+
/* @__PURE__ */ jsx54(
|
|
3308
3467
|
SelectedWidget,
|
|
3309
3468
|
{
|
|
3310
3469
|
params: widgetParams,
|
|
@@ -3323,9 +3482,9 @@ var WidgetNode_default = WidgetNode;
|
|
|
3323
3482
|
import React41, { useRef as useRef3, useReducer as useReducer2, useCallback as useCallback3, useEffect as useEffect7 } from "react";
|
|
3324
3483
|
|
|
3325
3484
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
3326
|
-
import { jsx as
|
|
3485
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
3327
3486
|
var InputControlNode = (props) => {
|
|
3328
|
-
return /* @__PURE__ */
|
|
3487
|
+
return /* @__PURE__ */ jsx55("div", { children: /* @__PURE__ */ jsx55(
|
|
3329
3488
|
InputControl_default,
|
|
3330
3489
|
{
|
|
3331
3490
|
name: props.node.name,
|
|
@@ -3559,7 +3718,7 @@ var ServiceClient = class {
|
|
|
3559
3718
|
var ServiceClient_default = ServiceClient;
|
|
3560
3719
|
|
|
3561
3720
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3562
|
-
import { jsx as
|
|
3721
|
+
import { jsx as jsx56, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3563
3722
|
var FormContainerNode = (props) => {
|
|
3564
3723
|
const NodeTypes2 = {
|
|
3565
3724
|
["input-control"]: InputControlNode_default
|
|
@@ -3589,12 +3748,12 @@ var FormContainerNode = (props) => {
|
|
|
3589
3748
|
};
|
|
3590
3749
|
fetchInitialData();
|
|
3591
3750
|
}, [props.apiBaseUrl, props.node, props.session, props.routeParameters]);
|
|
3592
|
-
return /* @__PURE__ */
|
|
3751
|
+
return /* @__PURE__ */ jsxs31("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
|
|
3593
3752
|
node.children && node.children.map((node2, index) => {
|
|
3594
3753
|
{
|
|
3595
3754
|
}
|
|
3596
3755
|
const SelectedNode = NodeTypes2[node2.type];
|
|
3597
|
-
return /* @__PURE__ */
|
|
3756
|
+
return /* @__PURE__ */ jsx56(React41.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ jsx56(
|
|
3598
3757
|
InputControlNode_default,
|
|
3599
3758
|
{
|
|
3600
3759
|
value: formState.inputValues[node2.name],
|
|
@@ -3603,7 +3762,7 @@ var FormContainerNode = (props) => {
|
|
|
3603
3762
|
}
|
|
3604
3763
|
) }, index);
|
|
3605
3764
|
}),
|
|
3606
|
-
node.children.length == 0 && /* @__PURE__ */
|
|
3765
|
+
node.children.length == 0 && /* @__PURE__ */ jsx56("div", { className: "py-0.5 lg:py-1.5" })
|
|
3607
3766
|
] });
|
|
3608
3767
|
};
|
|
3609
3768
|
var FormContainerNode_default = FormContainerNode;
|
|
@@ -3613,7 +3772,7 @@ import React44 from "react";
|
|
|
3613
3772
|
|
|
3614
3773
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
3615
3774
|
import dynamic3 from "next/dynamic";
|
|
3616
|
-
import { jsx as
|
|
3775
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
3617
3776
|
var IframeClient = dynamic3(() => import("./IframeClient-J22NMEVY.mjs"), {
|
|
3618
3777
|
ssr: false
|
|
3619
3778
|
});
|
|
@@ -3626,13 +3785,13 @@ var EmbedNode = (props) => {
|
|
|
3626
3785
|
} else {
|
|
3627
3786
|
src = props.node.embedSrc;
|
|
3628
3787
|
}
|
|
3629
|
-
return /* @__PURE__ */
|
|
3788
|
+
return /* @__PURE__ */ jsx57("div", { className: "aspect-video", children: src && /* @__PURE__ */ jsx57(IframeClient, { src }) });
|
|
3630
3789
|
};
|
|
3631
3790
|
var EmbedNode_default = EmbedNode;
|
|
3632
3791
|
|
|
3633
3792
|
// src/components/Slider.tsx
|
|
3634
3793
|
import React42, { useState as useState8, useEffect as useEffect8, Children, cloneElement } from "react";
|
|
3635
|
-
import { Fragment as Fragment8, jsx as
|
|
3794
|
+
import { Fragment as Fragment8, jsx as jsx58, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3636
3795
|
var Slider = ({
|
|
3637
3796
|
children,
|
|
3638
3797
|
slidesToShow = 4,
|
|
@@ -3729,7 +3888,7 @@ var Slider = ({
|
|
|
3729
3888
|
if (!React42.isValidElement(child)) return null;
|
|
3730
3889
|
const childProps = child.props;
|
|
3731
3890
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
3732
|
-
return /* @__PURE__ */
|
|
3891
|
+
return /* @__PURE__ */ jsx58(
|
|
3733
3892
|
"div",
|
|
3734
3893
|
{
|
|
3735
3894
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
@@ -3752,14 +3911,14 @@ var Slider = ({
|
|
|
3752
3911
|
return "bottom-4";
|
|
3753
3912
|
}
|
|
3754
3913
|
};
|
|
3755
|
-
return /* @__PURE__ */
|
|
3914
|
+
return /* @__PURE__ */ jsxs32(
|
|
3756
3915
|
"div",
|
|
3757
3916
|
{
|
|
3758
3917
|
className: `relative w-full overflow-hidden ${className}`,
|
|
3759
3918
|
onMouseEnter: handleMouseEnter,
|
|
3760
3919
|
onMouseLeave: handleMouseLeave,
|
|
3761
3920
|
children: [
|
|
3762
|
-
/* @__PURE__ */
|
|
3921
|
+
/* @__PURE__ */ jsx58(
|
|
3763
3922
|
"div",
|
|
3764
3923
|
{
|
|
3765
3924
|
className: "flex h-full",
|
|
@@ -3770,18 +3929,18 @@ var Slider = ({
|
|
|
3770
3929
|
children: slides
|
|
3771
3930
|
}
|
|
3772
3931
|
),
|
|
3773
|
-
show_arrows && /* @__PURE__ */
|
|
3774
|
-
/* @__PURE__ */
|
|
3932
|
+
show_arrows && /* @__PURE__ */ jsxs32(Fragment8, { children: [
|
|
3933
|
+
/* @__PURE__ */ jsx58(
|
|
3775
3934
|
ArrowButton,
|
|
3776
3935
|
{
|
|
3777
3936
|
direction: "left",
|
|
3778
3937
|
onClick: prevSlide,
|
|
3779
3938
|
visible: infinite_scroll || currentSlide > 0,
|
|
3780
3939
|
className: arrowClassName,
|
|
3781
|
-
children: /* @__PURE__ */
|
|
3940
|
+
children: /* @__PURE__ */ jsx58("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__ */ jsx58("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
3782
3941
|
}
|
|
3783
3942
|
),
|
|
3784
|
-
/* @__PURE__ */
|
|
3943
|
+
/* @__PURE__ */ jsxs32(
|
|
3785
3944
|
ArrowButton,
|
|
3786
3945
|
{
|
|
3787
3946
|
direction: "right",
|
|
@@ -3789,13 +3948,13 @@ var Slider = ({
|
|
|
3789
3948
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
3790
3949
|
className: arrowClassName,
|
|
3791
3950
|
children: [
|
|
3792
|
-
/* @__PURE__ */
|
|
3951
|
+
/* @__PURE__ */ jsx58("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__ */ jsx58("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
|
|
3793
3952
|
" "
|
|
3794
3953
|
]
|
|
3795
3954
|
}
|
|
3796
3955
|
)
|
|
3797
3956
|
] }),
|
|
3798
|
-
show_dots && /* @__PURE__ */
|
|
3957
|
+
show_dots && /* @__PURE__ */ jsx58("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__ */ jsx58(
|
|
3799
3958
|
ProgressPill,
|
|
3800
3959
|
{
|
|
3801
3960
|
active: index === currentSlide,
|
|
@@ -3821,7 +3980,7 @@ var ArrowButton = ({
|
|
|
3821
3980
|
visible,
|
|
3822
3981
|
children,
|
|
3823
3982
|
className = ""
|
|
3824
|
-
}) => /* @__PURE__ */
|
|
3983
|
+
}) => /* @__PURE__ */ jsx58(
|
|
3825
3984
|
"button",
|
|
3826
3985
|
{
|
|
3827
3986
|
className: `
|
|
@@ -3908,7 +4067,7 @@ var ProgressPill = ({
|
|
|
3908
4067
|
const renderProgressBar = () => {
|
|
3909
4068
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
3910
4069
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
3911
|
-
return /* @__PURE__ */
|
|
4070
|
+
return /* @__PURE__ */ jsx58(
|
|
3912
4071
|
"div",
|
|
3913
4072
|
{
|
|
3914
4073
|
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`,
|
|
@@ -3920,7 +4079,7 @@ var ProgressPill = ({
|
|
|
3920
4079
|
};
|
|
3921
4080
|
const renderCumulativeFill = () => {
|
|
3922
4081
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
3923
|
-
return /* @__PURE__ */
|
|
4082
|
+
return /* @__PURE__ */ jsx58(
|
|
3924
4083
|
"div",
|
|
3925
4084
|
{
|
|
3926
4085
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -3930,7 +4089,7 @@ var ProgressPill = ({
|
|
|
3930
4089
|
}
|
|
3931
4090
|
return null;
|
|
3932
4091
|
};
|
|
3933
|
-
return /* @__PURE__ */
|
|
4092
|
+
return /* @__PURE__ */ jsxs32(
|
|
3934
4093
|
"button",
|
|
3935
4094
|
{
|
|
3936
4095
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -4106,10 +4265,10 @@ var PathUtility = class {
|
|
|
4106
4265
|
var PathUtility_default = new PathUtility();
|
|
4107
4266
|
|
|
4108
4267
|
// src/components/NoDataFound.tsx
|
|
4109
|
-
import { jsx as
|
|
4268
|
+
import { jsx as jsx59, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4110
4269
|
var NoDataFound = () => {
|
|
4111
|
-
return /* @__PURE__ */
|
|
4112
|
-
/* @__PURE__ */
|
|
4270
|
+
return /* @__PURE__ */ jsxs33("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
4271
|
+
/* @__PURE__ */ jsx59("div", { className: "mb-5", children: /* @__PURE__ */ jsx59("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx59(
|
|
4113
4272
|
"svg",
|
|
4114
4273
|
{
|
|
4115
4274
|
className: "w-10 h-10",
|
|
@@ -4117,7 +4276,7 @@ var NoDataFound = () => {
|
|
|
4117
4276
|
stroke: "currentColor",
|
|
4118
4277
|
viewBox: "0 0 24 24",
|
|
4119
4278
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4120
|
-
children: /* @__PURE__ */
|
|
4279
|
+
children: /* @__PURE__ */ jsx59(
|
|
4121
4280
|
"path",
|
|
4122
4281
|
{
|
|
4123
4282
|
strokeLinecap: "round",
|
|
@@ -4128,15 +4287,15 @@ var NoDataFound = () => {
|
|
|
4128
4287
|
)
|
|
4129
4288
|
}
|
|
4130
4289
|
) }) }),
|
|
4131
|
-
/* @__PURE__ */
|
|
4132
|
-
/* @__PURE__ */
|
|
4290
|
+
/* @__PURE__ */ jsx59("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
4291
|
+
/* @__PURE__ */ jsx59("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
4133
4292
|
] });
|
|
4134
4293
|
};
|
|
4135
4294
|
var NoDataFound_default = NoDataFound;
|
|
4136
4295
|
|
|
4137
4296
|
// src/components/Pagination.tsx
|
|
4138
4297
|
import { useMemo } from "react";
|
|
4139
|
-
import { jsx as
|
|
4298
|
+
import { jsx as jsx60, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4140
4299
|
var Pagination = (props) => {
|
|
4141
4300
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
4142
4301
|
const builder = useMemo(() => {
|
|
@@ -4180,7 +4339,7 @@ var Pagination = (props) => {
|
|
|
4180
4339
|
return range;
|
|
4181
4340
|
};
|
|
4182
4341
|
const paginationRange = getPaginationRange();
|
|
4183
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */
|
|
4342
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ jsx60(
|
|
4184
4343
|
Hyperlink,
|
|
4185
4344
|
{
|
|
4186
4345
|
linkType: "Link" /* Link */,
|
|
@@ -4195,9 +4354,9 @@ var Pagination = (props) => {
|
|
|
4195
4354
|
);
|
|
4196
4355
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
4197
4356
|
if (disabled) {
|
|
4198
|
-
return /* @__PURE__ */
|
|
4357
|
+
return /* @__PURE__ */ jsx60("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 });
|
|
4199
4358
|
}
|
|
4200
|
-
return /* @__PURE__ */
|
|
4359
|
+
return /* @__PURE__ */ jsx60(
|
|
4201
4360
|
Hyperlink,
|
|
4202
4361
|
{
|
|
4203
4362
|
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",
|
|
@@ -4207,35 +4366,35 @@ var Pagination = (props) => {
|
|
|
4207
4366
|
);
|
|
4208
4367
|
};
|
|
4209
4368
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
4210
|
-
return /* @__PURE__ */
|
|
4211
|
-
/* @__PURE__ */
|
|
4212
|
-
/* @__PURE__ */
|
|
4369
|
+
return /* @__PURE__ */ jsxs34("div", { className: "py-6 border-t bg-default", children: [
|
|
4370
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
4371
|
+
/* @__PURE__ */ jsxs34("div", { className: "text-sm", children: [
|
|
4213
4372
|
"Showing ",
|
|
4214
|
-
/* @__PURE__ */
|
|
4373
|
+
/* @__PURE__ */ jsxs34("span", { className: "font-semibold", children: [
|
|
4215
4374
|
startItem,
|
|
4216
4375
|
"-",
|
|
4217
4376
|
endItem
|
|
4218
4377
|
] }),
|
|
4219
4378
|
" ",
|
|
4220
4379
|
"out of ",
|
|
4221
|
-
/* @__PURE__ */
|
|
4380
|
+
/* @__PURE__ */ jsx60("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
4222
4381
|
" results"
|
|
4223
4382
|
] }),
|
|
4224
|
-
totalPages > 1 && /* @__PURE__ */
|
|
4225
|
-
/* @__PURE__ */
|
|
4383
|
+
totalPages > 1 && /* @__PURE__ */ jsxs34("div", { className: "flex items-center space-x-1", children: [
|
|
4384
|
+
/* @__PURE__ */ jsxs34(
|
|
4226
4385
|
NavigationButton,
|
|
4227
4386
|
{
|
|
4228
4387
|
page: activePageNumber - 1,
|
|
4229
4388
|
disabled: activePageNumber === 1,
|
|
4230
4389
|
children: [
|
|
4231
|
-
/* @__PURE__ */
|
|
4232
|
-
/* @__PURE__ */
|
|
4390
|
+
/* @__PURE__ */ jsx60("span", { children: /* @__PURE__ */ jsx60(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
4391
|
+
/* @__PURE__ */ jsx60("span", { className: "text-sm", children: "Prev" })
|
|
4233
4392
|
]
|
|
4234
4393
|
}
|
|
4235
4394
|
),
|
|
4236
4395
|
paginationRange.map((item, index) => {
|
|
4237
4396
|
if (item === "...") {
|
|
4238
|
-
return /* @__PURE__ */
|
|
4397
|
+
return /* @__PURE__ */ jsx60(
|
|
4239
4398
|
"span",
|
|
4240
4399
|
{
|
|
4241
4400
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -4245,23 +4404,23 @@ var Pagination = (props) => {
|
|
|
4245
4404
|
);
|
|
4246
4405
|
}
|
|
4247
4406
|
const page = item;
|
|
4248
|
-
return /* @__PURE__ */
|
|
4407
|
+
return /* @__PURE__ */ jsx60(PageButton, { page, children: page }, page);
|
|
4249
4408
|
}),
|
|
4250
|
-
/* @__PURE__ */
|
|
4409
|
+
/* @__PURE__ */ jsxs34(
|
|
4251
4410
|
NavigationButton,
|
|
4252
4411
|
{
|
|
4253
4412
|
page: activePageNumber + 1,
|
|
4254
4413
|
disabled: activePageNumber === totalPages,
|
|
4255
4414
|
children: [
|
|
4256
|
-
/* @__PURE__ */
|
|
4257
|
-
/* @__PURE__ */
|
|
4415
|
+
/* @__PURE__ */ jsx60("span", { className: "text-sm", children: "Next" }),
|
|
4416
|
+
/* @__PURE__ */ jsx60("span", { children: /* @__PURE__ */ jsx60(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
4258
4417
|
]
|
|
4259
4418
|
}
|
|
4260
4419
|
)
|
|
4261
4420
|
] }),
|
|
4262
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */
|
|
4263
|
-
/* @__PURE__ */
|
|
4264
|
-
/* @__PURE__ */
|
|
4421
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs34("div", { className: "flex items-center space-x-2", children: [
|
|
4422
|
+
/* @__PURE__ */ jsx60("span", { className: "text-sm", children: "Go to:" }),
|
|
4423
|
+
/* @__PURE__ */ jsx60("div", { className: "relative", children: /* @__PURE__ */ jsx60(
|
|
4265
4424
|
"input",
|
|
4266
4425
|
{
|
|
4267
4426
|
type: "number",
|
|
@@ -4282,9 +4441,9 @@ var Pagination = (props) => {
|
|
|
4282
4441
|
) })
|
|
4283
4442
|
] })
|
|
4284
4443
|
] }),
|
|
4285
|
-
showPageSizeSelector && /* @__PURE__ */
|
|
4286
|
-
/* @__PURE__ */
|
|
4287
|
-
/* @__PURE__ */
|
|
4444
|
+
showPageSizeSelector && /* @__PURE__ */ jsx60("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
4445
|
+
/* @__PURE__ */ jsx60("span", { className: "text-sm", children: "Show:" }),
|
|
4446
|
+
/* @__PURE__ */ jsx60("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx60(
|
|
4288
4447
|
Hyperlink,
|
|
4289
4448
|
{
|
|
4290
4449
|
className: `
|
|
@@ -4296,7 +4455,7 @@ var Pagination = (props) => {
|
|
|
4296
4455
|
},
|
|
4297
4456
|
size
|
|
4298
4457
|
)) }),
|
|
4299
|
-
/* @__PURE__ */
|
|
4458
|
+
/* @__PURE__ */ jsx60("span", { className: "text-sm", children: "per page" })
|
|
4300
4459
|
] }) })
|
|
4301
4460
|
] });
|
|
4302
4461
|
};
|
|
@@ -4304,7 +4463,7 @@ var Pagination_default = Pagination;
|
|
|
4304
4463
|
|
|
4305
4464
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
4306
4465
|
import dynamic4 from "next/dynamic";
|
|
4307
|
-
import { jsx as
|
|
4466
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
4308
4467
|
var HlsPlayer1 = dynamic4(() => import("./HlsPlayer-FFEIK6FG.mjs"), {
|
|
4309
4468
|
ssr: false
|
|
4310
4469
|
});
|
|
@@ -4341,7 +4500,7 @@ var ImageGalleryNode = (props) => {
|
|
|
4341
4500
|
right: "justify-end"
|
|
4342
4501
|
};
|
|
4343
4502
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
4344
|
-
return /* @__PURE__ */
|
|
4503
|
+
return /* @__PURE__ */ jsx61("div", { className: `flex flex-wrap gap-4 ${formatClasses}`, children: visibleImages.map((img, idx) => {
|
|
4345
4504
|
const imageUrl = resolveImageUrl(img.imageUrl);
|
|
4346
4505
|
if (!imageUrl) return null;
|
|
4347
4506
|
const posterUrl = resolvePosterUrl(img.posterUrl);
|
|
@@ -4349,7 +4508,7 @@ var ImageGalleryNode = (props) => {
|
|
|
4349
4508
|
const intrinsicHeight = parseMaybeNumber(img.intrinsicHeight);
|
|
4350
4509
|
const isHls = imageUrl.endsWith(".m3u8");
|
|
4351
4510
|
const alt = img.title || "Gallery image";
|
|
4352
|
-
return /* @__PURE__ */
|
|
4511
|
+
return /* @__PURE__ */ jsx61("div", { className: "max-w-full", children: isHls ? /* @__PURE__ */ jsx61(
|
|
4353
4512
|
HlsPlayer1,
|
|
4354
4513
|
{
|
|
4355
4514
|
assetUrl: imageUrl,
|
|
@@ -4364,7 +4523,7 @@ var ImageGalleryNode = (props) => {
|
|
|
4364
4523
|
}
|
|
4365
4524
|
) : (
|
|
4366
4525
|
/* eslint-disable-next-line @next/next/no-img-element */
|
|
4367
|
-
/* @__PURE__ */
|
|
4526
|
+
/* @__PURE__ */ jsx61(
|
|
4368
4527
|
"img",
|
|
4369
4528
|
{
|
|
4370
4529
|
loading: "lazy",
|
|
@@ -4381,7 +4540,7 @@ var ImageGalleryNode = (props) => {
|
|
|
4381
4540
|
var ImageGalleryNode_default = ImageGalleryNode;
|
|
4382
4541
|
|
|
4383
4542
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
4384
|
-
import { jsx as
|
|
4543
|
+
import { jsx as jsx62, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4385
4544
|
function toCamelCase(str) {
|
|
4386
4545
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
4387
4546
|
}
|
|
@@ -4564,7 +4723,7 @@ var DivContainer = async (props) => {
|
|
|
4564
4723
|
response = await serviceClient.get(endpoint);
|
|
4565
4724
|
result = response?.result;
|
|
4566
4725
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
4567
|
-
return /* @__PURE__ */
|
|
4726
|
+
return /* @__PURE__ */ jsx62(NoDataFound_default, {});
|
|
4568
4727
|
}
|
|
4569
4728
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
4570
4729
|
childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
|
|
@@ -4576,7 +4735,7 @@ var DivContainer = async (props) => {
|
|
|
4576
4735
|
}
|
|
4577
4736
|
const SelectedNode = NodeTypes2[node.type];
|
|
4578
4737
|
if (!SelectedNode) return null;
|
|
4579
|
-
return /* @__PURE__ */
|
|
4738
|
+
return /* @__PURE__ */ jsx62(React44.Fragment, { children: /* @__PURE__ */ jsx62(
|
|
4580
4739
|
SelectedNode,
|
|
4581
4740
|
{
|
|
4582
4741
|
node,
|
|
@@ -4676,9 +4835,9 @@ var DivContainer = async (props) => {
|
|
|
4676
4835
|
props.node.autoFormat && "auto-format",
|
|
4677
4836
|
props.node.bgClass
|
|
4678
4837
|
].filter(Boolean).join(" ");
|
|
4679
|
-
return /* @__PURE__ */
|
|
4680
|
-
/* @__PURE__ */
|
|
4681
|
-
/* @__PURE__ */
|
|
4838
|
+
return /* @__PURE__ */ jsxs35(React44.Fragment, { children: [
|
|
4839
|
+
/* @__PURE__ */ jsx62("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
4840
|
+
/* @__PURE__ */ jsx62(React44.Fragment, { children: /* @__PURE__ */ jsx62(
|
|
4682
4841
|
Wrapper,
|
|
4683
4842
|
{
|
|
4684
4843
|
id: guid,
|
|
@@ -4687,18 +4846,18 @@ var DivContainer = async (props) => {
|
|
|
4687
4846
|
...wrapperProps,
|
|
4688
4847
|
children: dataToRender.map(
|
|
4689
4848
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
4690
|
-
(child, i) => /* @__PURE__ */
|
|
4849
|
+
(child, i) => /* @__PURE__ */ jsx62(React44.Fragment, { children: child }, i)
|
|
4691
4850
|
) : renderChildren(props.node.children, props, item, idx)
|
|
4692
4851
|
)
|
|
4693
4852
|
}
|
|
4694
4853
|
) }),
|
|
4695
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */
|
|
4854
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ jsx62("div", { children: /* @__PURE__ */ jsx62(Pagination_default, { path: props.path, query: props.query, dataset: response }) })
|
|
4696
4855
|
] });
|
|
4697
4856
|
};
|
|
4698
4857
|
var DivContainer_default = DivContainer;
|
|
4699
4858
|
|
|
4700
4859
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
4701
|
-
import { jsx as
|
|
4860
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
4702
4861
|
var NodeTypes = {
|
|
4703
4862
|
["paragraph"]: ParagraphNode_default,
|
|
4704
4863
|
["heading"]: HeadingNode_default,
|
|
@@ -4726,11 +4885,11 @@ var PageBodyRenderer = (props) => {
|
|
|
4726
4885
|
if (pageBodyTree && pageBodyTree.root) {
|
|
4727
4886
|
rootNode = pageBodyTree.root;
|
|
4728
4887
|
}
|
|
4729
|
-
return /* @__PURE__ */
|
|
4888
|
+
return /* @__PURE__ */ jsx63(React45.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
4730
4889
|
{
|
|
4731
4890
|
}
|
|
4732
4891
|
const SelectedNode = NodeTypes[node.type];
|
|
4733
|
-
return /* @__PURE__ */
|
|
4892
|
+
return /* @__PURE__ */ jsx63(React45.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx63(React45.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx63(React45.Fragment, { children: /* @__PURE__ */ jsx63(
|
|
4734
4893
|
SelectedNode,
|
|
4735
4894
|
{
|
|
4736
4895
|
node,
|
|
@@ -4745,7 +4904,7 @@ var PageBodyRenderer = (props) => {
|
|
|
4745
4904
|
assetBaseUrl: props.assetBaseUrl,
|
|
4746
4905
|
device: props.device
|
|
4747
4906
|
}
|
|
4748
|
-
) }) : /* @__PURE__ */
|
|
4907
|
+
) }) : /* @__PURE__ */ jsx63(React45.Fragment, { children: /* @__PURE__ */ jsx63(
|
|
4749
4908
|
SelectedNode,
|
|
4750
4909
|
{
|
|
4751
4910
|
node,
|