@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260326061134 → 0.8.1-dev.20260326063413
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 +180 -35
- package/dist/index.mjs +305 -160
- 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
|
] }) })
|
|
@@ -158,7 +303,7 @@ var ProgressIndicator = (props) => {
|
|
|
158
303
|
var ProgressIndicator_default = ProgressIndicator;
|
|
159
304
|
|
|
160
305
|
// src/components/controls/view/ViewControl.tsx
|
|
161
|
-
import { jsx as jsx8, jsxs as
|
|
306
|
+
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
162
307
|
var ViewControl = React9.forwardRef(
|
|
163
308
|
(props, ref) => {
|
|
164
309
|
const ControlComponents = {
|
|
@@ -180,7 +325,7 @@ var ViewControl = React9.forwardRef(
|
|
|
180
325
|
// [ViewControlTypes.aiGeneratedSummary]: AiGeneratedSummary,
|
|
181
326
|
};
|
|
182
327
|
const SelectedControlComponent = props.controlType ? ControlComponents[props.controlType] : void 0;
|
|
183
|
-
return /* @__PURE__ */
|
|
328
|
+
return /* @__PURE__ */ jsxs5(React9.Fragment, { children: [
|
|
184
329
|
props.controlType,
|
|
185
330
|
SelectedControlComponent ? /* @__PURE__ */ jsx8(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType
|
|
186
331
|
] });
|
|
@@ -194,7 +339,7 @@ import React29 from "react";
|
|
|
194
339
|
|
|
195
340
|
// src/components/controls/edit/MultilineTextInput.tsx
|
|
196
341
|
import React10 from "react";
|
|
197
|
-
import { jsx as jsx9, jsxs as
|
|
342
|
+
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
198
343
|
var MultilineTextInput = (props) => {
|
|
199
344
|
const textChangeHandler = (event) => {
|
|
200
345
|
const text = event.target.value;
|
|
@@ -213,7 +358,7 @@ var MultilineTextInput = (props) => {
|
|
|
213
358
|
if (props.value !== void 0 && props.value !== null) {
|
|
214
359
|
value = props.value;
|
|
215
360
|
}
|
|
216
|
-
return /* @__PURE__ */ jsx9(React10.Fragment, { children: /* @__PURE__ */
|
|
361
|
+
return /* @__PURE__ */ jsx9(React10.Fragment, { children: /* @__PURE__ */ jsxs6("label", { className: "block mb-1", children: [
|
|
217
362
|
/* @__PURE__ */ jsx9("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
218
363
|
" ",
|
|
219
364
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx9("span", { className: "text-alert", children: "*" }),
|
|
@@ -241,7 +386,7 @@ var MultilineTextInput_default = MultilineTextInput;
|
|
|
241
386
|
|
|
242
387
|
// src/components/controls/edit/LineTextInput.tsx
|
|
243
388
|
import React11 from "react";
|
|
244
|
-
import { jsx as jsx10, jsxs as
|
|
389
|
+
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
245
390
|
var LineTextInput = (props) => {
|
|
246
391
|
const textChangeHandler = (event) => {
|
|
247
392
|
const text = event.target.value;
|
|
@@ -260,7 +405,7 @@ var LineTextInput = (props) => {
|
|
|
260
405
|
if (props.value !== void 0 && props.value !== null) {
|
|
261
406
|
value = props.value;
|
|
262
407
|
}
|
|
263
|
-
return /* @__PURE__ */ jsx10(React11.Fragment, { children: /* @__PURE__ */
|
|
408
|
+
return /* @__PURE__ */ jsx10(React11.Fragment, { children: /* @__PURE__ */ jsxs7("label", { className: "block", children: [
|
|
264
409
|
props?.attributes?.label && /* @__PURE__ */ jsx10("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
265
410
|
" ",
|
|
266
411
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx10("span", { className: "text-alert", children: "*" }),
|
|
@@ -293,7 +438,7 @@ var LineTextInput_default = LineTextInput;
|
|
|
293
438
|
|
|
294
439
|
// src/components/controls/edit/MoneyInput.tsx
|
|
295
440
|
import React12 from "react";
|
|
296
|
-
import { jsx as jsx11, jsxs as
|
|
441
|
+
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
297
442
|
var MoneyInput = (props) => {
|
|
298
443
|
const textChangeHandler = (event) => {
|
|
299
444
|
const rawValue = event.target.value;
|
|
@@ -322,7 +467,7 @@ var MoneyInput = (props) => {
|
|
|
322
467
|
e.preventDefault();
|
|
323
468
|
}
|
|
324
469
|
};
|
|
325
|
-
return /* @__PURE__ */ jsx11(React12.Fragment, { children: /* @__PURE__ */
|
|
470
|
+
return /* @__PURE__ */ jsx11(React12.Fragment, { children: /* @__PURE__ */ jsxs8("label", { className: "block mb-1", children: [
|
|
326
471
|
/* @__PURE__ */ jsx11("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
327
472
|
" ",
|
|
328
473
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx11("span", { className: "text-alert", children: "*" }),
|
|
@@ -377,7 +522,7 @@ var InputControlType_default = InputControlType;
|
|
|
377
522
|
|
|
378
523
|
// src/components/controls/edit/Select.tsx
|
|
379
524
|
import { useState, useEffect } from "react";
|
|
380
|
-
import { jsx as jsx12, jsxs as
|
|
525
|
+
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
381
526
|
var Select = (props) => {
|
|
382
527
|
const [list, setList] = useState([]);
|
|
383
528
|
const getSafeValue = (val) => {
|
|
@@ -435,10 +580,10 @@ var Select = (props) => {
|
|
|
435
580
|
props.dataSourceDependsOn
|
|
436
581
|
]);
|
|
437
582
|
const value = getSafeValue(props.value);
|
|
438
|
-
return /* @__PURE__ */
|
|
583
|
+
return /* @__PURE__ */ jsxs9("label", { className: "block", children: [
|
|
439
584
|
props.attributes?.label && /* @__PURE__ */ jsx12("span", { className: "text-sm font-medium inline-block pb-1", children: props.attributes?.label }),
|
|
440
585
|
props.attributes?.label && props.attributes?.required && /* @__PURE__ */ jsx12("span", { className: "text-alert", children: "*" }),
|
|
441
|
-
/* @__PURE__ */
|
|
586
|
+
/* @__PURE__ */ jsxs9(
|
|
442
587
|
"select",
|
|
443
588
|
{
|
|
444
589
|
name: props.name,
|
|
@@ -465,7 +610,7 @@ var Select_default = Select;
|
|
|
465
610
|
|
|
466
611
|
// src/components/controls/edit/PercentageInput.tsx
|
|
467
612
|
import React14 from "react";
|
|
468
|
-
import { jsx as jsx13, jsxs as
|
|
613
|
+
import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
469
614
|
var PercentageInput = (props) => {
|
|
470
615
|
const textChangeHandler = (event) => {
|
|
471
616
|
const rawValue = event.target.value;
|
|
@@ -494,7 +639,7 @@ var PercentageInput = (props) => {
|
|
|
494
639
|
e.preventDefault();
|
|
495
640
|
}
|
|
496
641
|
};
|
|
497
|
-
return /* @__PURE__ */ jsx13(React14.Fragment, { children: /* @__PURE__ */
|
|
642
|
+
return /* @__PURE__ */ jsx13(React14.Fragment, { children: /* @__PURE__ */ jsxs10("label", { className: "block mb-1", children: [
|
|
498
643
|
/* @__PURE__ */ jsx13("span", { className: "text-sm font-medium ", children: props?.attributes?.label ? props?.attributes?.label + " %" : "" }),
|
|
499
644
|
" ",
|
|
500
645
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx13("span", { className: "text-alert", children: "*" }),
|
|
@@ -524,7 +669,7 @@ var PercentageInput_default = PercentageInput;
|
|
|
524
669
|
|
|
525
670
|
// src/components/controls/edit/PhoneInput.tsx
|
|
526
671
|
import React15 from "react";
|
|
527
|
-
import { jsx as jsx14, jsxs as
|
|
672
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
528
673
|
var PhoneInput = (props) => {
|
|
529
674
|
const textChangeHandler = (event) => {
|
|
530
675
|
const text = event.target.value;
|
|
@@ -543,9 +688,9 @@ var PhoneInput = (props) => {
|
|
|
543
688
|
if (props.value !== void 0 && props.value !== null) {
|
|
544
689
|
value = props.value;
|
|
545
690
|
}
|
|
546
|
-
return /* @__PURE__ */ jsx14(React15.Fragment, { children: /* @__PURE__ */
|
|
691
|
+
return /* @__PURE__ */ jsx14(React15.Fragment, { children: /* @__PURE__ */ jsxs11("label", { className: "block mb-1", children: [
|
|
547
692
|
/* @__PURE__ */ jsx14("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
548
|
-
/* @__PURE__ */
|
|
693
|
+
/* @__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: [
|
|
549
694
|
/* @__PURE__ */ jsx14("span", { className: "px-3 text-gray-700", children: props.prefix }),
|
|
550
695
|
/* @__PURE__ */ jsx14(
|
|
551
696
|
"input",
|
|
@@ -572,7 +717,7 @@ var PhoneInput_default = PhoneInput;
|
|
|
572
717
|
|
|
573
718
|
// src/components/controls/edit/NumberInput.tsx
|
|
574
719
|
import React16 from "react";
|
|
575
|
-
import { jsx as jsx15, jsxs as
|
|
720
|
+
import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
576
721
|
var NumberInput = (props) => {
|
|
577
722
|
const textChangeHandler = (event) => {
|
|
578
723
|
const text = event.target.value;
|
|
@@ -595,7 +740,7 @@ var NumberInput = (props) => {
|
|
|
595
740
|
if (props.value !== void 0 && props.value !== null) {
|
|
596
741
|
value = props.value;
|
|
597
742
|
}
|
|
598
|
-
return /* @__PURE__ */ jsx15(React16.Fragment, { children: /* @__PURE__ */
|
|
743
|
+
return /* @__PURE__ */ jsx15(React16.Fragment, { children: /* @__PURE__ */ jsxs12("label", { className: "block", children: [
|
|
599
744
|
props?.attributes?.label && /* @__PURE__ */ jsx15("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
600
745
|
" ",
|
|
601
746
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx15("span", { className: "text-alert", children: "*" }),
|
|
@@ -625,7 +770,7 @@ var NumberInput_default = NumberInput;
|
|
|
625
770
|
|
|
626
771
|
// src/components/controls/edit/CheckboxInput.tsx
|
|
627
772
|
import React17 from "react";
|
|
628
|
-
import { jsx as jsx16, jsxs as
|
|
773
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
629
774
|
var CheckboxInput = (props) => {
|
|
630
775
|
const textChangeHandler = (event) => {
|
|
631
776
|
let text = event.target.checked;
|
|
@@ -644,7 +789,7 @@ var CheckboxInput = (props) => {
|
|
|
644
789
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
645
790
|
value = true;
|
|
646
791
|
}
|
|
647
|
-
return /* @__PURE__ */ jsx16(React17.Fragment, { children: /* @__PURE__ */
|
|
792
|
+
return /* @__PURE__ */ jsx16(React17.Fragment, { children: /* @__PURE__ */ jsxs13("label", { className: "block mb-1", children: [
|
|
648
793
|
/* @__PURE__ */ jsx16("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
649
794
|
" ",
|
|
650
795
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx16("span", { className: "text-alert", children: "*" }),
|
|
@@ -672,7 +817,7 @@ var CheckboxInput_default = CheckboxInput;
|
|
|
672
817
|
|
|
673
818
|
// src/components/controls/edit/OtpInput.tsx
|
|
674
819
|
import React18 from "react";
|
|
675
|
-
import { jsx as jsx17, jsxs as
|
|
820
|
+
import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
676
821
|
var OtpInput = (props) => {
|
|
677
822
|
const textChangeHandler = (event) => {
|
|
678
823
|
const text = event.target.value;
|
|
@@ -694,7 +839,7 @@ var OtpInput = (props) => {
|
|
|
694
839
|
if (props.value !== void 0 && props.value !== null) {
|
|
695
840
|
value = props.value;
|
|
696
841
|
}
|
|
697
|
-
return /* @__PURE__ */ jsx17(React18.Fragment, { children: /* @__PURE__ */
|
|
842
|
+
return /* @__PURE__ */ jsx17(React18.Fragment, { children: /* @__PURE__ */ jsxs14("label", { htmlFor: props.name, className: "block mb-1 w-full", children: [
|
|
698
843
|
/* @__PURE__ */ jsx17("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
699
844
|
/* @__PURE__ */ jsx17(
|
|
700
845
|
"input",
|
|
@@ -799,7 +944,7 @@ var DateTimeUtility_default = DateTimeUtility;
|
|
|
799
944
|
|
|
800
945
|
// src/components/controls/edit/DateTimeInput.tsx
|
|
801
946
|
import React19 from "react";
|
|
802
|
-
import { jsx as jsx18, jsxs as
|
|
947
|
+
import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
803
948
|
var DateTimeInput = (props) => {
|
|
804
949
|
const textChangeHandler = (event) => {
|
|
805
950
|
const localDate = new Date(event.target.value);
|
|
@@ -834,11 +979,11 @@ var DateTimeInput = (props) => {
|
|
|
834
979
|
timeZoneAbbr = now2.toLocaleTimeString("en", { timeZoneName: "short" }).split(" ")[2];
|
|
835
980
|
localvalue = localDate?.toISOString()?.slice(0, 16);
|
|
836
981
|
}
|
|
837
|
-
return /* @__PURE__ */ jsx18(React19.Fragment, { children: /* @__PURE__ */
|
|
982
|
+
return /* @__PURE__ */ jsx18(React19.Fragment, { children: /* @__PURE__ */ jsxs15("label", { className: "block mb-1", children: [
|
|
838
983
|
/* @__PURE__ */ jsx18("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
839
984
|
" ",
|
|
840
985
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx18("span", { className: "text-alert", children: "*" }),
|
|
841
|
-
/* @__PURE__ */
|
|
986
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2", children: [
|
|
842
987
|
/* @__PURE__ */ jsx18(
|
|
843
988
|
"input",
|
|
844
989
|
{
|
|
@@ -865,7 +1010,7 @@ var DateTimeInput_default = DateTimeInput;
|
|
|
865
1010
|
|
|
866
1011
|
// src/components/controls/edit/ColorInput.tsx
|
|
867
1012
|
import React20, { useEffect as useEffect2 } from "react";
|
|
868
|
-
import { jsx as jsx19, jsxs as
|
|
1013
|
+
import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
869
1014
|
var ColorInput = (props) => {
|
|
870
1015
|
const [color, setColor] = React20.useState("#3b82f6");
|
|
871
1016
|
useEffect2(() => {
|
|
@@ -887,7 +1032,7 @@ var ColorInput = (props) => {
|
|
|
887
1032
|
});
|
|
888
1033
|
}
|
|
889
1034
|
};
|
|
890
|
-
return /* @__PURE__ */
|
|
1035
|
+
return /* @__PURE__ */ jsxs16("label", { className: "block mb-1", children: [
|
|
891
1036
|
/* @__PURE__ */ jsx19("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
892
1037
|
" ",
|
|
893
1038
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx19("span", { className: "text-alert", children: "*" }),
|
|
@@ -911,7 +1056,7 @@ var ColorInput_default = ColorInput;
|
|
|
911
1056
|
|
|
912
1057
|
// src/components/controls/edit/SelectWithSearchInput.tsx
|
|
913
1058
|
import { useEffect as useEffect3, useRef, useState as useState2 } from "react";
|
|
914
|
-
import { jsx as jsx20, jsxs as
|
|
1059
|
+
import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
915
1060
|
var SelectWithSearchInput = (props) => {
|
|
916
1061
|
const [isOpen, setIsOpen] = useState2(false);
|
|
917
1062
|
const [searchTerm, setSearchTerm] = useState2("");
|
|
@@ -982,11 +1127,11 @@ var SelectWithSearchInput = (props) => {
|
|
|
982
1127
|
});
|
|
983
1128
|
}
|
|
984
1129
|
}, [highlightedIndex]);
|
|
985
|
-
return /* @__PURE__ */
|
|
1130
|
+
return /* @__PURE__ */ jsxs17("div", { className: "relative", children: [
|
|
986
1131
|
/* @__PURE__ */ jsx20("label", { children: props.attributes?.label }),
|
|
987
1132
|
" ",
|
|
988
1133
|
props?.attributes?.required && /* @__PURE__ */ jsx20("span", { className: "text-alert", children: "*" }),
|
|
989
|
-
/* @__PURE__ */
|
|
1134
|
+
/* @__PURE__ */ jsxs17("div", { className: "relative", children: [
|
|
990
1135
|
/* @__PURE__ */ jsx20(
|
|
991
1136
|
"input",
|
|
992
1137
|
{
|
|
@@ -1136,7 +1281,7 @@ var ClientButton = (props) => {
|
|
|
1136
1281
|
var ClientButton_default = ClientButton;
|
|
1137
1282
|
|
|
1138
1283
|
// src/components/Confirm.tsx
|
|
1139
|
-
import { Fragment, jsx as jsx22, jsxs as
|
|
1284
|
+
import { Fragment, jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1140
1285
|
var Confirm = ({ message, onConfirm, onCancel }) => {
|
|
1141
1286
|
const [showModal, setShowModal] = useState3(true);
|
|
1142
1287
|
const handleConfirmAction = () => {
|
|
@@ -1151,12 +1296,12 @@ var Confirm = ({ message, onConfirm, onCancel }) => {
|
|
|
1151
1296
|
onCancel();
|
|
1152
1297
|
}
|
|
1153
1298
|
};
|
|
1154
|
-
return /* @__PURE__ */ jsx22(Fragment, { children: showModal && /* @__PURE__ */
|
|
1299
|
+
return /* @__PURE__ */ jsx22(Fragment, { children: showModal && /* @__PURE__ */ jsxs18("div", { className: "fixed inset-0 flex items-center justify-center z-50", children: [
|
|
1155
1300
|
/* @__PURE__ */ jsx22("div", { className: "absolute inset-0 bg-black opacity-70" }),
|
|
1156
|
-
/* @__PURE__ */
|
|
1301
|
+
/* @__PURE__ */ jsxs18("div", { className: "bg-white rounded-md p-6 w-2/6 shadow border z-50", children: [
|
|
1157
1302
|
/* @__PURE__ */ jsx22("p", { className: "text-xl font-medium mb-4", children: "Confirmation" }),
|
|
1158
1303
|
/* @__PURE__ */ jsx22("p", { className: "mb-4", children: message }),
|
|
1159
|
-
/* @__PURE__ */
|
|
1304
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex justify-end gap-8", children: [
|
|
1160
1305
|
/* @__PURE__ */ jsx22(
|
|
1161
1306
|
ClientButton_default,
|
|
1162
1307
|
{
|
|
@@ -1181,7 +1326,7 @@ var Confirm_default = Confirm;
|
|
|
1181
1326
|
}
|
|
1182
1327
|
|
|
1183
1328
|
// src/components/Button.tsx
|
|
1184
|
-
import { jsx as jsx23, jsxs as
|
|
1329
|
+
import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1185
1330
|
var Button = (props) => {
|
|
1186
1331
|
const [inProgress, setInProgress] = useState4(false);
|
|
1187
1332
|
const [isActionPerformed, setIsActionPerformed] = useState4(false);
|
|
@@ -1236,8 +1381,8 @@ var Button = (props) => {
|
|
|
1236
1381
|
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
1237
1382
|
let progressClass = props.ButtonType ? progressClasses.get(props.ButtonType) : progressClasses.get("Primary" /* Solid */);
|
|
1238
1383
|
const isDisabled = inProgress || isActionPerformed && props.oneTimeAction;
|
|
1239
|
-
return /* @__PURE__ */
|
|
1240
|
-
/* @__PURE__ */
|
|
1384
|
+
return /* @__PURE__ */ jsxs19(React24.Fragment, { children: [
|
|
1385
|
+
/* @__PURE__ */ jsxs19(
|
|
1241
1386
|
"button",
|
|
1242
1387
|
{
|
|
1243
1388
|
type: "submit",
|
|
@@ -1247,7 +1392,7 @@ var Button = (props) => {
|
|
|
1247
1392
|
className: buttonClass + " relative " + props.className,
|
|
1248
1393
|
children: [
|
|
1249
1394
|
isActionPerformed && props.oneTimeAction && responseMessage ? responseMessage : props.children,
|
|
1250
|
-
inProgress && /* @__PURE__ */ jsx23(React24.Fragment, { children: props.hideProgressIndicator === true ? /* @__PURE__ */ jsx23("div", { className: "absolute bottom-0 left-0 h-0.5 bg-gray-400 rounded animate-progress" }) : /* @__PURE__ */
|
|
1395
|
+
inProgress && /* @__PURE__ */ jsx23(React24.Fragment, { children: props.hideProgressIndicator === true ? /* @__PURE__ */ jsx23("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: [
|
|
1251
1396
|
/* @__PURE__ */ jsx23("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
1252
1397
|
/* @__PURE__ */ jsx23("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
1398
|
] }) })
|
|
@@ -1266,7 +1411,7 @@ import React25, {
|
|
|
1266
1411
|
useState as useState5,
|
|
1267
1412
|
useCallback
|
|
1268
1413
|
} from "react";
|
|
1269
|
-
import { jsx as jsx24, jsxs as
|
|
1414
|
+
import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1270
1415
|
var SelectWithSearchPanel = (props) => {
|
|
1271
1416
|
const [isOpen, setIsOpen] = useState5(false);
|
|
1272
1417
|
const [searchTerm, setSearchTerm] = useState5("");
|
|
@@ -1402,7 +1547,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1402
1547
|
console.log("Form Data:", formData);
|
|
1403
1548
|
return formData;
|
|
1404
1549
|
}, []);
|
|
1405
|
-
return /* @__PURE__ */
|
|
1550
|
+
return /* @__PURE__ */ jsxs20("div", { className: "relative", children: [
|
|
1406
1551
|
/* @__PURE__ */ jsx24("label", { className: "text-sm mb-1 font-medium", children: props.attributes?.label }),
|
|
1407
1552
|
/* @__PURE__ */ jsx24("div", { children: /* @__PURE__ */ jsx24(
|
|
1408
1553
|
"input",
|
|
@@ -1418,9 +1563,9 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1418
1563
|
disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none`
|
|
1419
1564
|
}
|
|
1420
1565
|
) }),
|
|
1421
|
-
/* @__PURE__ */ jsx24("div", { ref: containerRef, children: isOpen && /* @__PURE__ */
|
|
1422
|
-
/* @__PURE__ */
|
|
1423
|
-
/* @__PURE__ */ jsx24("div", { className: "flex flex-col p-2 bg-accent-950 text-white", children: /* @__PURE__ */
|
|
1566
|
+
/* @__PURE__ */ jsx24("div", { ref: containerRef, children: isOpen && /* @__PURE__ */ jsxs20(React25.Fragment, { children: [
|
|
1567
|
+
/* @__PURE__ */ jsxs20("div", { className: "fixed z-50 right-0 bg-white top-[62px] w-1/4 border-l border-gray-200", children: [
|
|
1568
|
+
/* @__PURE__ */ jsx24("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
1569
|
"Select a",
|
|
1425
1570
|
" ",
|
|
1426
1571
|
props.attributes?.label || props.attributes?.heading
|
|
@@ -1438,8 +1583,8 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1438
1583
|
}
|
|
1439
1584
|
) })
|
|
1440
1585
|
] }),
|
|
1441
|
-
isCreateOpen && /* @__PURE__ */
|
|
1442
|
-
/* @__PURE__ */ jsx24("div", { className: "flex flex-col p-2 bg-accent-950", children: /* @__PURE__ */
|
|
1586
|
+
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: [
|
|
1587
|
+
/* @__PURE__ */ jsx24("div", { className: "flex flex-col p-2 bg-accent-950", children: /* @__PURE__ */ jsxs20("h5", { className: "text-md font-medium text-white", children: [
|
|
1443
1588
|
"Create New ",
|
|
1444
1589
|
props.attributes?.label
|
|
1445
1590
|
] }) }),
|
|
@@ -1452,8 +1597,8 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1452
1597
|
children: "Close"
|
|
1453
1598
|
}
|
|
1454
1599
|
) }),
|
|
1455
|
-
/* @__PURE__ */
|
|
1456
|
-
props.createFields?.map((field) => /* @__PURE__ */
|
|
1600
|
+
/* @__PURE__ */ jsxs20("div", { className: "p-4", children: [
|
|
1601
|
+
props.createFields?.map((field) => /* @__PURE__ */ jsxs20("div", { className: "mb-4", children: [
|
|
1457
1602
|
/* @__PURE__ */ jsx24("label", { className: "text-sm mb-1 font-medium block", children: field.label }),
|
|
1458
1603
|
/* @__PURE__ */ jsx24(
|
|
1459
1604
|
"input",
|
|
@@ -1471,7 +1616,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1471
1616
|
}
|
|
1472
1617
|
)
|
|
1473
1618
|
] }, field.name)),
|
|
1474
|
-
/* @__PURE__ */
|
|
1619
|
+
/* @__PURE__ */ jsxs20(Button_default, { onClick: async () => {
|
|
1475
1620
|
handleSaveModal();
|
|
1476
1621
|
return { isSuccessful: true };
|
|
1477
1622
|
}, className: "w-full", children: [
|
|
@@ -1511,7 +1656,7 @@ import React26, {
|
|
|
1511
1656
|
useState as useState6,
|
|
1512
1657
|
useEffect as useEffect5
|
|
1513
1658
|
} from "react";
|
|
1514
|
-
import { jsx as jsx25, jsxs as
|
|
1659
|
+
import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1515
1660
|
var BooleanSelect = (props) => {
|
|
1516
1661
|
const [list, setList] = useState6();
|
|
1517
1662
|
const textChangeHandler = (event) => {
|
|
@@ -1560,11 +1705,11 @@ var BooleanSelect = (props) => {
|
|
|
1560
1705
|
if (props.value !== void 0 && props.value !== null) {
|
|
1561
1706
|
value = props.value;
|
|
1562
1707
|
}
|
|
1563
|
-
return /* @__PURE__ */ jsx25(React26.Fragment, { children: /* @__PURE__ */
|
|
1708
|
+
return /* @__PURE__ */ jsx25(React26.Fragment, { children: /* @__PURE__ */ jsxs21("label", { className: "block", children: [
|
|
1564
1709
|
/* @__PURE__ */ jsx25("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1565
1710
|
" ",
|
|
1566
1711
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx25("span", { className: "text-alert", children: "*" }),
|
|
1567
|
-
/* @__PURE__ */
|
|
1712
|
+
/* @__PURE__ */ jsxs21(
|
|
1568
1713
|
"select",
|
|
1569
1714
|
{
|
|
1570
1715
|
name: props.name,
|
|
@@ -1598,7 +1743,7 @@ var BooleanSelect_default = BooleanSelect;
|
|
|
1598
1743
|
|
|
1599
1744
|
// src/components/controls/edit/EmailInput.tsx
|
|
1600
1745
|
import React27 from "react";
|
|
1601
|
-
import { jsx as jsx26, jsxs as
|
|
1746
|
+
import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1602
1747
|
var EmailInput = (props) => {
|
|
1603
1748
|
const textChangeHandler = (event) => {
|
|
1604
1749
|
const text = event.target.value;
|
|
@@ -1623,7 +1768,7 @@ var EmailInput = (props) => {
|
|
|
1623
1768
|
if (props.value !== void 0 && props.value !== null) {
|
|
1624
1769
|
value = props.value;
|
|
1625
1770
|
}
|
|
1626
|
-
return /* @__PURE__ */ jsx26(React27.Fragment, { children: /* @__PURE__ */
|
|
1771
|
+
return /* @__PURE__ */ jsx26(React27.Fragment, { children: /* @__PURE__ */ jsxs22("label", { className: "block mb-1", children: [
|
|
1627
1772
|
/* @__PURE__ */ jsx26("span", { className: "text-sm font-medium text-slate-700", children: props?.attributes?.label }),
|
|
1628
1773
|
" ",
|
|
1629
1774
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx26("span", { className: "text-alert", children: "*" }),
|
|
@@ -1650,7 +1795,7 @@ var EmailInput_default = EmailInput;
|
|
|
1650
1795
|
|
|
1651
1796
|
// src/components/controls/edit/TimeInput.tsx
|
|
1652
1797
|
import React28 from "react";
|
|
1653
|
-
import { jsx as jsx27, jsxs as
|
|
1798
|
+
import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1654
1799
|
var TimeInput = (props) => {
|
|
1655
1800
|
const timeChangeHandler = (event) => {
|
|
1656
1801
|
const timeValue = event.target.value;
|
|
@@ -1663,7 +1808,7 @@ var TimeInput = (props) => {
|
|
|
1663
1808
|
});
|
|
1664
1809
|
}
|
|
1665
1810
|
};
|
|
1666
|
-
return /* @__PURE__ */ jsx27(React28.Fragment, { children: /* @__PURE__ */
|
|
1811
|
+
return /* @__PURE__ */ jsx27(React28.Fragment, { children: /* @__PURE__ */ jsxs23("label", { className: "block mb-1", children: [
|
|
1667
1812
|
/* @__PURE__ */ jsx27("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
1668
1813
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx27("span", { className: "text-alert", children: "*" }),
|
|
1669
1814
|
/* @__PURE__ */ jsx27("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx27(
|
|
@@ -1727,33 +1872,33 @@ var NoContentView_default = NoContentView;
|
|
|
1727
1872
|
|
|
1728
1873
|
// src/components/dataForm/ContentView.tsx
|
|
1729
1874
|
import React31 from "react";
|
|
1730
|
-
import { jsx as jsx30, jsxs as
|
|
1875
|
+
import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1731
1876
|
var ContentView = (props) => {
|
|
1732
|
-
return /* @__PURE__ */
|
|
1733
|
-
props.isDataFound == null && /* @__PURE__ */ jsx30("div", { className: "", children: /* @__PURE__ */
|
|
1734
|
-
/* @__PURE__ */
|
|
1877
|
+
return /* @__PURE__ */ jsxs24(React31.Fragment, { children: [
|
|
1878
|
+
props.isDataFound == null && /* @__PURE__ */ jsx30("div", { className: "", children: /* @__PURE__ */ jsxs24("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
1879
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex items-center mb-4", children: [
|
|
1735
1880
|
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
1736
|
-
/* @__PURE__ */
|
|
1881
|
+
/* @__PURE__ */ jsxs24("div", { className: "ml-2", children: [
|
|
1737
1882
|
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
1738
1883
|
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
1739
1884
|
] })
|
|
1740
1885
|
] }),
|
|
1741
|
-
/* @__PURE__ */
|
|
1742
|
-
/* @__PURE__ */
|
|
1886
|
+
/* @__PURE__ */ jsxs24("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
1887
|
+
/* @__PURE__ */ jsxs24("div", { className: "animate-pulse", children: [
|
|
1743
1888
|
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
1744
1889
|
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
1745
1890
|
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
1746
1891
|
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
1747
1892
|
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
1748
1893
|
] }),
|
|
1749
|
-
/* @__PURE__ */
|
|
1894
|
+
/* @__PURE__ */ jsxs24("div", { className: "animate-pulse", children: [
|
|
1750
1895
|
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
1751
1896
|
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
1752
1897
|
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
1753
1898
|
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
1754
1899
|
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
1755
1900
|
] }),
|
|
1756
|
-
/* @__PURE__ */
|
|
1901
|
+
/* @__PURE__ */ jsxs24("div", { className: "animate-pulse", children: [
|
|
1757
1902
|
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
1758
1903
|
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
1759
1904
|
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
@@ -2038,7 +2183,7 @@ function FormReducer(state, action) {
|
|
|
2038
2183
|
var FormReducer_default = FormReducer;
|
|
2039
2184
|
|
|
2040
2185
|
// src/components/dataForm/DataList.tsx
|
|
2041
|
-
import { Fragment as Fragment3, jsx as jsx37, jsxs as
|
|
2186
|
+
import { Fragment as Fragment3, jsx as jsx37, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2042
2187
|
var DataList = (props) => {
|
|
2043
2188
|
console.log(props.dataset, "datasetssssss");
|
|
2044
2189
|
const router = useRouter();
|
|
@@ -2130,7 +2275,7 @@ var DataList = (props) => {
|
|
|
2130
2275
|
const showFirstPages = activePageNumber <= 5;
|
|
2131
2276
|
const showLastPages = activePageNumber > pages - 5;
|
|
2132
2277
|
if (showFirstPages) {
|
|
2133
|
-
return /* @__PURE__ */
|
|
2278
|
+
return /* @__PURE__ */ jsxs25(Fragment3, { children: [
|
|
2134
2279
|
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ jsx37(React32.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx37(
|
|
2135
2280
|
Hyperlink,
|
|
2136
2281
|
{
|
|
@@ -2156,7 +2301,7 @@ var DataList = (props) => {
|
|
|
2156
2301
|
children: pages
|
|
2157
2302
|
}
|
|
2158
2303
|
),
|
|
2159
|
-
/* @__PURE__ */ jsx37("div", { className: "relative inline-block", children: /* @__PURE__ */
|
|
2304
|
+
/* @__PURE__ */ jsx37("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs25(
|
|
2160
2305
|
"select",
|
|
2161
2306
|
{
|
|
2162
2307
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -2178,7 +2323,7 @@ var DataList = (props) => {
|
|
|
2178
2323
|
) })
|
|
2179
2324
|
] });
|
|
2180
2325
|
} else if (showLastPages) {
|
|
2181
|
-
return /* @__PURE__ */
|
|
2326
|
+
return /* @__PURE__ */ jsxs25(Fragment3, { children: [
|
|
2182
2327
|
/* @__PURE__ */ jsx37(
|
|
2183
2328
|
Hyperlink,
|
|
2184
2329
|
{
|
|
@@ -2208,7 +2353,7 @@ var DataList = (props) => {
|
|
|
2208
2353
|
)
|
|
2209
2354
|
] });
|
|
2210
2355
|
} else {
|
|
2211
|
-
return /* @__PURE__ */
|
|
2356
|
+
return /* @__PURE__ */ jsxs25(Fragment3, { children: [
|
|
2212
2357
|
/* @__PURE__ */ jsx37(
|
|
2213
2358
|
Hyperlink,
|
|
2214
2359
|
{
|
|
@@ -2254,7 +2399,7 @@ var DataList = (props) => {
|
|
|
2254
2399
|
children: pages
|
|
2255
2400
|
}
|
|
2256
2401
|
),
|
|
2257
|
-
/* @__PURE__ */ jsx37("div", { className: "relative inline-block", children: /* @__PURE__ */
|
|
2402
|
+
/* @__PURE__ */ jsx37("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs25(
|
|
2258
2403
|
"select",
|
|
2259
2404
|
{
|
|
2260
2405
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -2275,15 +2420,15 @@ var DataList = (props) => {
|
|
|
2275
2420
|
}
|
|
2276
2421
|
}
|
|
2277
2422
|
};
|
|
2278
|
-
return /* @__PURE__ */
|
|
2279
|
-
/* @__PURE__ */
|
|
2280
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */
|
|
2423
|
+
return /* @__PURE__ */ jsxs25(React32.Fragment, { children: [
|
|
2424
|
+
/* @__PURE__ */ jsxs25(ContentView_default, { isDataFound, children: [
|
|
2425
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs25(
|
|
2281
2426
|
"div",
|
|
2282
2427
|
{
|
|
2283
2428
|
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
2429
|
children: [
|
|
2285
2430
|
props.title ? /* @__PURE__ */ jsx37("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx37("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ jsx37("div", {}),
|
|
2286
|
-
/* @__PURE__ */
|
|
2431
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-3", children: [
|
|
2287
2432
|
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx37(
|
|
2288
2433
|
InputControl_default,
|
|
2289
2434
|
{
|
|
@@ -2299,7 +2444,7 @@ var DataList = (props) => {
|
|
|
2299
2444
|
},
|
|
2300
2445
|
filter.name
|
|
2301
2446
|
)),
|
|
2302
|
-
props.addLinkHref && /* @__PURE__ */
|
|
2447
|
+
props.addLinkHref && /* @__PURE__ */ jsxs25(
|
|
2303
2448
|
Hyperlink,
|
|
2304
2449
|
{
|
|
2305
2450
|
className: "gap-1",
|
|
@@ -2315,7 +2460,7 @@ var DataList = (props) => {
|
|
|
2315
2460
|
]
|
|
2316
2461
|
}
|
|
2317
2462
|
),
|
|
2318
|
-
/* @__PURE__ */ jsx37("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */
|
|
2463
|
+
/* @__PURE__ */ jsx37("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: [
|
|
2319
2464
|
/* @__PURE__ */ jsx37("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ jsx37("tr", { children: props?.columns?.map((column) => {
|
|
2320
2465
|
let url = builder.getNewOrderByUrl(column.name);
|
|
2321
2466
|
let icon = "chevronUpDown";
|
|
@@ -2330,7 +2475,7 @@ var DataList = (props) => {
|
|
|
2330
2475
|
"th",
|
|
2331
2476
|
{
|
|
2332
2477
|
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__ */ jsx37(Hyperlink, { href: url, className: "!text-neutral-contrast ", children: /* @__PURE__ */
|
|
2478
|
+
children: /* @__PURE__ */ jsx37(Hyperlink, { href: url, className: "!text-neutral-contrast ", children: /* @__PURE__ */ jsxs25("span", { className: "flex items-center space-x-1", children: [
|
|
2334
2479
|
/* @__PURE__ */ jsx37("span", { className: "text-black", children: column.label }),
|
|
2335
2480
|
column.enableSorting && /* @__PURE__ */ jsx37(Icon_default, { className: "w-4 h-4", name: icon })
|
|
2336
2481
|
] }) })
|
|
@@ -2396,9 +2541,9 @@ var DataList = (props) => {
|
|
|
2396
2541
|
}) }, index);
|
|
2397
2542
|
}) })
|
|
2398
2543
|
] }) }),
|
|
2399
|
-
/* @__PURE__ */ jsx37("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */
|
|
2544
|
+
/* @__PURE__ */ jsx37("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: [
|
|
2400
2545
|
/* @__PURE__ */ jsx37("div", { className: "text-gray-700", children: label }),
|
|
2401
|
-
/* @__PURE__ */
|
|
2546
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex space-x-2 items-center", children: [
|
|
2402
2547
|
activePageNumber > 1 && /* @__PURE__ */ jsx37(
|
|
2403
2548
|
Hyperlink,
|
|
2404
2549
|
{
|
|
@@ -2421,14 +2566,14 @@ var DataList = (props) => {
|
|
|
2421
2566
|
] })
|
|
2422
2567
|
] }) })
|
|
2423
2568
|
] }),
|
|
2424
|
-
/* @__PURE__ */
|
|
2425
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */
|
|
2569
|
+
/* @__PURE__ */ jsxs25(NoContentView_default, { isDataFound, children: [
|
|
2570
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs25(
|
|
2426
2571
|
"div",
|
|
2427
2572
|
{
|
|
2428
2573
|
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
2574
|
children: [
|
|
2430
2575
|
props.title ? /* @__PURE__ */ jsx37("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx37("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ jsx37("div", {}),
|
|
2431
|
-
/* @__PURE__ */
|
|
2576
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-3", children: [
|
|
2432
2577
|
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx37(
|
|
2433
2578
|
InputControl_default,
|
|
2434
2579
|
{
|
|
@@ -2444,7 +2589,7 @@ var DataList = (props) => {
|
|
|
2444
2589
|
},
|
|
2445
2590
|
filter.name
|
|
2446
2591
|
)),
|
|
2447
|
-
props.addLinkHref && /* @__PURE__ */
|
|
2592
|
+
props.addLinkHref && /* @__PURE__ */ jsxs25(
|
|
2448
2593
|
Hyperlink,
|
|
2449
2594
|
{
|
|
2450
2595
|
className: "gap-1",
|
|
@@ -2460,7 +2605,7 @@ var DataList = (props) => {
|
|
|
2460
2605
|
]
|
|
2461
2606
|
}
|
|
2462
2607
|
),
|
|
2463
|
-
/* @__PURE__ */
|
|
2608
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
2464
2609
|
/* @__PURE__ */ jsx37("div", { children: /* @__PURE__ */ jsx37("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ jsx37("thead", { className: "bg-gray-50", children: /* @__PURE__ */ jsx37("tr", { children: props?.columns?.map((column) => {
|
|
2465
2610
|
let url = builder.getNewOrderByUrl(column.name);
|
|
2466
2611
|
let icon = "chevronUpDown";
|
|
@@ -2475,7 +2620,7 @@ var DataList = (props) => {
|
|
|
2475
2620
|
"th",
|
|
2476
2621
|
{
|
|
2477
2622
|
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__ */ jsx37(Hyperlink, { href: url, className: "text-body-950", children: /* @__PURE__ */
|
|
2623
|
+
children: /* @__PURE__ */ jsx37(Hyperlink, { href: url, className: "text-body-950", children: /* @__PURE__ */ jsxs25("span", { className: "flex items-center space-x-1", children: [
|
|
2479
2624
|
/* @__PURE__ */ jsx37("span", { children: column.label }),
|
|
2480
2625
|
column.enableSorting && /* @__PURE__ */ jsx37(Icon_default, { className: "w-4 h-4", name: icon })
|
|
2481
2626
|
] }) })
|
|
@@ -2572,7 +2717,7 @@ var LineBreakNode_default = LineBreakNode;
|
|
|
2572
2717
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
2573
2718
|
import React33 from "react";
|
|
2574
2719
|
import Link2 from "next/link";
|
|
2575
|
-
import { jsx as jsx40, jsxs as
|
|
2720
|
+
import { jsx as jsx40, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2576
2721
|
var LinkNode = (props) => {
|
|
2577
2722
|
const NodeTypes2 = {
|
|
2578
2723
|
["text"]: TextNode_default
|
|
@@ -2580,7 +2725,7 @@ var LinkNode = (props) => {
|
|
|
2580
2725
|
{
|
|
2581
2726
|
}
|
|
2582
2727
|
let formatClasses = props.node.cssClass || "";
|
|
2583
|
-
return /* @__PURE__ */
|
|
2728
|
+
return /* @__PURE__ */ jsxs26(Link2, { className: formatClasses, href: props.node.url, title: props.node.title, children: [
|
|
2584
2729
|
props.node.children && props.node.children.map((node, index) => {
|
|
2585
2730
|
const SelectedNode = NodeTypes2[node.type];
|
|
2586
2731
|
return /* @__PURE__ */ jsx40(React33.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx40(SelectedNode, { node }) }, index);
|
|
@@ -2752,7 +2897,7 @@ var DatafieldNode = (props) => {
|
|
|
2752
2897
|
var DatafieldNode_default = DatafieldNode;
|
|
2753
2898
|
|
|
2754
2899
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
2755
|
-
import { Fragment as Fragment4, jsx as jsx44, jsxs as
|
|
2900
|
+
import { Fragment as Fragment4, jsx as jsx44, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2756
2901
|
var ParagraphNode = (props) => {
|
|
2757
2902
|
const NodeTypes2 = {
|
|
2758
2903
|
["text"]: TextNode_default,
|
|
@@ -2786,7 +2931,7 @@ var ParagraphNode = (props) => {
|
|
|
2786
2931
|
) }, index);
|
|
2787
2932
|
}) });
|
|
2788
2933
|
}
|
|
2789
|
-
return /* @__PURE__ */
|
|
2934
|
+
return /* @__PURE__ */ jsxs27("div", { className: " " + formatClasses, children: [
|
|
2790
2935
|
hasChildren && props.node.children.map((node, index) => {
|
|
2791
2936
|
const SelectedNode = NodeTypes2[node.type];
|
|
2792
2937
|
return /* @__PURE__ */ jsx44(React34.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx44(
|
|
@@ -2874,12 +3019,12 @@ var ListItemNode = (props) => {
|
|
|
2874
3019
|
var ListItemNode_default = ListItemNode;
|
|
2875
3020
|
|
|
2876
3021
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
2877
|
-
import { jsx as jsx47, jsxs as
|
|
3022
|
+
import { jsx as jsx47, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2878
3023
|
var ListNode = (props) => {
|
|
2879
3024
|
const NodeTypes2 = {
|
|
2880
3025
|
listitem: ListItemNode_default
|
|
2881
3026
|
};
|
|
2882
|
-
return /* @__PURE__ */
|
|
3027
|
+
return /* @__PURE__ */ jsxs28(React37.Fragment, { children: [
|
|
2883
3028
|
props.node.listType == "bullet" && /* @__PURE__ */ jsx47("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2884
3029
|
const SelectedNode = NodeTypes2[node.type];
|
|
2885
3030
|
return /* @__PURE__ */ jsx47(React37.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx47(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
@@ -2911,7 +3056,7 @@ var QuoteNode_default = QuoteNode;
|
|
|
2911
3056
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
2912
3057
|
import React39 from "react";
|
|
2913
3058
|
import dynamic from "next/dynamic";
|
|
2914
|
-
import { jsx as jsx49, jsxs as
|
|
3059
|
+
import { jsx as jsx49, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2915
3060
|
var CopyButton = dynamic(() => import("./CopyButton-XONTQQW7.mjs"), {
|
|
2916
3061
|
ssr: false,
|
|
2917
3062
|
// optional: fallback UI while loading
|
|
@@ -2929,8 +3074,8 @@ var CodeNode = (props) => {
|
|
|
2929
3074
|
if (node.type === "link") return node.text || node.url || "";
|
|
2930
3075
|
return "";
|
|
2931
3076
|
}).join("") ?? "";
|
|
2932
|
-
return /* @__PURE__ */
|
|
2933
|
-
/* @__PURE__ */
|
|
3077
|
+
return /* @__PURE__ */ jsxs29("div", { children: [
|
|
3078
|
+
/* @__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: [
|
|
2934
3079
|
/* @__PURE__ */ jsx49("span", { children: "Code Snippet" }),
|
|
2935
3080
|
/* @__PURE__ */ jsx49(CopyButton, { text: textContent })
|
|
2936
3081
|
] }),
|
|
@@ -3232,7 +3377,7 @@ var ImageNode = (props) => {
|
|
|
3232
3377
|
var ImageNode_default = ImageNode;
|
|
3233
3378
|
|
|
3234
3379
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
3235
|
-
import { Fragment as Fragment7, jsx as jsx53, jsxs as
|
|
3380
|
+
import { Fragment as Fragment7, jsx as jsx53, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3236
3381
|
var WidgetNode = (props) => {
|
|
3237
3382
|
const getWidgetParameters = () => {
|
|
3238
3383
|
const widgetInputParameters = {
|
|
@@ -3296,7 +3441,7 @@ var WidgetNode = (props) => {
|
|
|
3296
3441
|
if (process.env.NODE_ENV !== "production") {
|
|
3297
3442
|
console.warn("Widget not found:", widgetCode);
|
|
3298
3443
|
}
|
|
3299
|
-
return /* @__PURE__ */
|
|
3444
|
+
return /* @__PURE__ */ jsxs30(Fragment7, { children: [
|
|
3300
3445
|
"Widget not found: ",
|
|
3301
3446
|
widgetCode
|
|
3302
3447
|
] });
|
|
@@ -3559,7 +3704,7 @@ var ServiceClient = class {
|
|
|
3559
3704
|
var ServiceClient_default = ServiceClient;
|
|
3560
3705
|
|
|
3561
3706
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3562
|
-
import { jsx as jsx55, jsxs as
|
|
3707
|
+
import { jsx as jsx55, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3563
3708
|
var FormContainerNode = (props) => {
|
|
3564
3709
|
const NodeTypes2 = {
|
|
3565
3710
|
["input-control"]: InputControlNode_default
|
|
@@ -3589,7 +3734,7 @@ var FormContainerNode = (props) => {
|
|
|
3589
3734
|
};
|
|
3590
3735
|
fetchInitialData();
|
|
3591
3736
|
}, [props.apiBaseUrl, props.node, props.session, props.routeParameters]);
|
|
3592
|
-
return /* @__PURE__ */
|
|
3737
|
+
return /* @__PURE__ */ jsxs31("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
|
|
3593
3738
|
node.children && node.children.map((node2, index) => {
|
|
3594
3739
|
{
|
|
3595
3740
|
}
|
|
@@ -3632,7 +3777,7 @@ var EmbedNode_default = EmbedNode;
|
|
|
3632
3777
|
|
|
3633
3778
|
// src/components/Slider.tsx
|
|
3634
3779
|
import React42, { useState as useState8, useEffect as useEffect8, Children, cloneElement } from "react";
|
|
3635
|
-
import { Fragment as Fragment8, jsx as jsx57, jsxs as
|
|
3780
|
+
import { Fragment as Fragment8, jsx as jsx57, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3636
3781
|
var Slider = ({
|
|
3637
3782
|
children,
|
|
3638
3783
|
slidesToShow = 4,
|
|
@@ -3752,7 +3897,7 @@ var Slider = ({
|
|
|
3752
3897
|
return "bottom-4";
|
|
3753
3898
|
}
|
|
3754
3899
|
};
|
|
3755
|
-
return /* @__PURE__ */
|
|
3900
|
+
return /* @__PURE__ */ jsxs32(
|
|
3756
3901
|
"div",
|
|
3757
3902
|
{
|
|
3758
3903
|
className: `relative w-full overflow-hidden ${className}`,
|
|
@@ -3770,7 +3915,7 @@ var Slider = ({
|
|
|
3770
3915
|
children: slides
|
|
3771
3916
|
}
|
|
3772
3917
|
),
|
|
3773
|
-
show_arrows && /* @__PURE__ */
|
|
3918
|
+
show_arrows && /* @__PURE__ */ jsxs32(Fragment8, { children: [
|
|
3774
3919
|
/* @__PURE__ */ jsx57(
|
|
3775
3920
|
ArrowButton,
|
|
3776
3921
|
{
|
|
@@ -3781,7 +3926,7 @@ var Slider = ({
|
|
|
3781
3926
|
children: /* @__PURE__ */ jsx57("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__ */ jsx57("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
3782
3927
|
}
|
|
3783
3928
|
),
|
|
3784
|
-
/* @__PURE__ */
|
|
3929
|
+
/* @__PURE__ */ jsxs32(
|
|
3785
3930
|
ArrowButton,
|
|
3786
3931
|
{
|
|
3787
3932
|
direction: "right",
|
|
@@ -3930,7 +4075,7 @@ var ProgressPill = ({
|
|
|
3930
4075
|
}
|
|
3931
4076
|
return null;
|
|
3932
4077
|
};
|
|
3933
|
-
return /* @__PURE__ */
|
|
4078
|
+
return /* @__PURE__ */ jsxs32(
|
|
3934
4079
|
"button",
|
|
3935
4080
|
{
|
|
3936
4081
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -4106,9 +4251,9 @@ var PathUtility = class {
|
|
|
4106
4251
|
var PathUtility_default = new PathUtility();
|
|
4107
4252
|
|
|
4108
4253
|
// src/components/NoDataFound.tsx
|
|
4109
|
-
import { jsx as jsx58, jsxs as
|
|
4254
|
+
import { jsx as jsx58, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4110
4255
|
var NoDataFound = () => {
|
|
4111
|
-
return /* @__PURE__ */
|
|
4256
|
+
return /* @__PURE__ */ jsxs33("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
4112
4257
|
/* @__PURE__ */ jsx58("div", { className: "mb-5", children: /* @__PURE__ */ jsx58("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx58(
|
|
4113
4258
|
"svg",
|
|
4114
4259
|
{
|
|
@@ -4136,7 +4281,7 @@ var NoDataFound_default = NoDataFound;
|
|
|
4136
4281
|
|
|
4137
4282
|
// src/components/Pagination.tsx
|
|
4138
4283
|
import { useMemo } from "react";
|
|
4139
|
-
import { jsx as jsx59, jsxs as
|
|
4284
|
+
import { jsx as jsx59, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4140
4285
|
var Pagination = (props) => {
|
|
4141
4286
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
4142
4287
|
const builder = useMemo(() => {
|
|
@@ -4207,11 +4352,11 @@ var Pagination = (props) => {
|
|
|
4207
4352
|
);
|
|
4208
4353
|
};
|
|
4209
4354
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
4210
|
-
return /* @__PURE__ */
|
|
4211
|
-
/* @__PURE__ */
|
|
4212
|
-
/* @__PURE__ */
|
|
4355
|
+
return /* @__PURE__ */ jsxs34("div", { className: "py-6 border-t bg-default", children: [
|
|
4356
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
4357
|
+
/* @__PURE__ */ jsxs34("div", { className: "text-sm", children: [
|
|
4213
4358
|
"Showing ",
|
|
4214
|
-
/* @__PURE__ */
|
|
4359
|
+
/* @__PURE__ */ jsxs34("span", { className: "font-semibold", children: [
|
|
4215
4360
|
startItem,
|
|
4216
4361
|
"-",
|
|
4217
4362
|
endItem
|
|
@@ -4221,8 +4366,8 @@ var Pagination = (props) => {
|
|
|
4221
4366
|
/* @__PURE__ */ jsx59("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
4222
4367
|
" results"
|
|
4223
4368
|
] }),
|
|
4224
|
-
totalPages > 1 && /* @__PURE__ */
|
|
4225
|
-
/* @__PURE__ */
|
|
4369
|
+
totalPages > 1 && /* @__PURE__ */ jsxs34("div", { className: "flex items-center space-x-1", children: [
|
|
4370
|
+
/* @__PURE__ */ jsxs34(
|
|
4226
4371
|
NavigationButton,
|
|
4227
4372
|
{
|
|
4228
4373
|
page: activePageNumber - 1,
|
|
@@ -4247,7 +4392,7 @@ var Pagination = (props) => {
|
|
|
4247
4392
|
const page = item;
|
|
4248
4393
|
return /* @__PURE__ */ jsx59(PageButton, { page, children: page }, page);
|
|
4249
4394
|
}),
|
|
4250
|
-
/* @__PURE__ */
|
|
4395
|
+
/* @__PURE__ */ jsxs34(
|
|
4251
4396
|
NavigationButton,
|
|
4252
4397
|
{
|
|
4253
4398
|
page: activePageNumber + 1,
|
|
@@ -4259,7 +4404,7 @@ var Pagination = (props) => {
|
|
|
4259
4404
|
}
|
|
4260
4405
|
)
|
|
4261
4406
|
] }),
|
|
4262
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */
|
|
4407
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs34("div", { className: "flex items-center space-x-2", children: [
|
|
4263
4408
|
/* @__PURE__ */ jsx59("span", { className: "text-sm", children: "Go to:" }),
|
|
4264
4409
|
/* @__PURE__ */ jsx59("div", { className: "relative", children: /* @__PURE__ */ jsx59(
|
|
4265
4410
|
"input",
|
|
@@ -4282,7 +4427,7 @@ var Pagination = (props) => {
|
|
|
4282
4427
|
) })
|
|
4283
4428
|
] })
|
|
4284
4429
|
] }),
|
|
4285
|
-
showPageSizeSelector && /* @__PURE__ */ jsx59("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */
|
|
4430
|
+
showPageSizeSelector && /* @__PURE__ */ jsx59("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
4286
4431
|
/* @__PURE__ */ jsx59("span", { className: "text-sm", children: "Show:" }),
|
|
4287
4432
|
/* @__PURE__ */ jsx59("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx59(
|
|
4288
4433
|
Hyperlink,
|
|
@@ -4381,7 +4526,7 @@ var ImageGalleryNode = (props) => {
|
|
|
4381
4526
|
var ImageGalleryNode_default = ImageGalleryNode;
|
|
4382
4527
|
|
|
4383
4528
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
4384
|
-
import { jsx as jsx61, jsxs as
|
|
4529
|
+
import { jsx as jsx61, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4385
4530
|
function toCamelCase(str) {
|
|
4386
4531
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
4387
4532
|
}
|
|
@@ -4676,7 +4821,7 @@ var DivContainer = async (props) => {
|
|
|
4676
4821
|
props.node.autoFormat && "auto-format",
|
|
4677
4822
|
props.node.bgClass
|
|
4678
4823
|
].filter(Boolean).join(" ");
|
|
4679
|
-
return /* @__PURE__ */
|
|
4824
|
+
return /* @__PURE__ */ jsxs35(React44.Fragment, { children: [
|
|
4680
4825
|
/* @__PURE__ */ jsx61("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
4681
4826
|
/* @__PURE__ */ jsx61(React44.Fragment, { children: /* @__PURE__ */ jsx61(
|
|
4682
4827
|
Wrapper,
|