@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260423042903 → 0.8.1-dev.20260423063335
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/{HlsPlayer-IBPSMECZ.mjs → HlsPlayer-CTZICLSJ.mjs} +1 -1
- package/dist/{chunk-BV2VX3HP.mjs → chunk-VNSFFK3H.mjs} +38 -6
- package/dist/index.d.mts +112 -1
- package/dist/index.d.ts +112 -1
- package/dist/index.js +1014 -825
- package/dist/index.mjs +571 -416
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HlsPlayer_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VNSFFK3H.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Button_default,
|
|
6
6
|
ServiceClient_default,
|
|
@@ -9,13 +9,14 @@ import {
|
|
|
9
9
|
} from "./chunk-TYBRP6MP.mjs";
|
|
10
10
|
|
|
11
11
|
// src/components/controls/view/ViewControl.tsx
|
|
12
|
-
import
|
|
12
|
+
import React10 from "react";
|
|
13
13
|
|
|
14
14
|
// src/components/controls/view/ViewControlTypes.tsx
|
|
15
15
|
var ViewControlTypes = {
|
|
16
16
|
lineText: "lineText",
|
|
17
17
|
asset: "asset",
|
|
18
18
|
multilineTextBullets: "multilineTextBullets",
|
|
19
|
+
boolean: "boolean",
|
|
19
20
|
money: "money",
|
|
20
21
|
date: "date",
|
|
21
22
|
time: "time",
|
|
@@ -253,50 +254,94 @@ var DateView = (props) => {
|
|
|
253
254
|
};
|
|
254
255
|
var DateView_default = DateView;
|
|
255
256
|
|
|
256
|
-
// src/components/controls/view/
|
|
257
|
+
// src/components/controls/view/BooleanView.tsx
|
|
257
258
|
import React3 from "react";
|
|
258
259
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
260
|
+
var BooleanView = (props) => {
|
|
261
|
+
const { value, customProps } = props;
|
|
262
|
+
const showOnlyTrueIcon = customProps?.showOnlyTrueIcon;
|
|
263
|
+
console.log("BooleanView Debug:", {
|
|
264
|
+
value,
|
|
265
|
+
type: typeof value,
|
|
266
|
+
customProps,
|
|
267
|
+
showOnlyTrueIcon
|
|
268
|
+
});
|
|
269
|
+
const booleanValue = React3.useMemo(() => {
|
|
270
|
+
if (typeof value === "boolean") return value;
|
|
271
|
+
if (typeof value === "string") {
|
|
272
|
+
return value.toLowerCase() === "true";
|
|
273
|
+
}
|
|
274
|
+
if (typeof value === "number") {
|
|
275
|
+
return value === 1;
|
|
276
|
+
}
|
|
277
|
+
return false;
|
|
278
|
+
}, [value]);
|
|
279
|
+
if (showOnlyTrueIcon) {
|
|
280
|
+
return /* @__PURE__ */ jsx3(React3.Fragment, { children: booleanValue === true && /* @__PURE__ */ jsx3(
|
|
281
|
+
"svg",
|
|
282
|
+
{
|
|
283
|
+
className: "w-15 h-8 text-green-600",
|
|
284
|
+
fill: "currentColor",
|
|
285
|
+
viewBox: "0 0 20 20",
|
|
286
|
+
children: /* @__PURE__ */ jsx3(
|
|
287
|
+
"path",
|
|
288
|
+
{
|
|
289
|
+
fillRule: "evenodd",
|
|
290
|
+
d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
|
|
291
|
+
clipRule: "evenodd"
|
|
292
|
+
}
|
|
293
|
+
)
|
|
294
|
+
}
|
|
295
|
+
) });
|
|
296
|
+
}
|
|
297
|
+
return /* @__PURE__ */ jsx3(React3.Fragment, { children: booleanValue ? "true" : "false" });
|
|
298
|
+
};
|
|
299
|
+
var BooleanView_default = BooleanView;
|
|
300
|
+
|
|
301
|
+
// src/components/controls/view/LineTextView.tsx
|
|
302
|
+
import React4 from "react";
|
|
303
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
259
304
|
var LineText = (props) => {
|
|
260
|
-
return /* @__PURE__ */
|
|
305
|
+
return /* @__PURE__ */ jsx4(React4.Fragment, { children: props.value });
|
|
261
306
|
};
|
|
262
307
|
var LineTextView_default = LineText;
|
|
263
308
|
|
|
264
309
|
// src/components/controls/view/MoneyView.tsx
|
|
265
|
-
import
|
|
266
|
-
import { jsx as
|
|
310
|
+
import React5 from "react";
|
|
311
|
+
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
267
312
|
var Money = (props) => {
|
|
268
313
|
const parsedNumber = parseFloat(props.value);
|
|
269
|
-
return /* @__PURE__ */
|
|
270
|
-
/* @__PURE__ */
|
|
314
|
+
return /* @__PURE__ */ jsx5(React5.Fragment, { children: !Number.isNaN(parsedNumber) && /* @__PURE__ */ jsxs2("span", { className: parsedNumber < 0 ? "text-alert" : "", children: [
|
|
315
|
+
/* @__PURE__ */ jsx5("span", { className: "mr-0.5", children: "\u20B9" }),
|
|
271
316
|
parsedNumber.toLocaleString()
|
|
272
317
|
] }) });
|
|
273
318
|
};
|
|
274
319
|
var MoneyView_default = Money;
|
|
275
320
|
|
|
276
321
|
// src/components/controls/view/MultilineTextBulletsView.tsx
|
|
277
|
-
import
|
|
278
|
-
import { jsx as
|
|
322
|
+
import React6 from "react";
|
|
323
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
279
324
|
var MultilineTextBullets = (props) => {
|
|
280
325
|
const lines = props.value?.split("\\n");
|
|
281
|
-
return /* @__PURE__ */
|
|
282
|
-
return /* @__PURE__ */
|
|
326
|
+
return /* @__PURE__ */ jsx6(React6.Fragment, { children: /* @__PURE__ */ jsx6("ul", { className: "list-disc", children: lines && lines.map((line, index) => {
|
|
327
|
+
return /* @__PURE__ */ jsx6("li", { children: line }, index);
|
|
283
328
|
}) }) });
|
|
284
329
|
};
|
|
285
330
|
var MultilineTextBulletsView_default = MultilineTextBullets;
|
|
286
331
|
|
|
287
332
|
// src/components/controls/view/MultilineTextView.tsx
|
|
288
|
-
import
|
|
289
|
-
import { jsx as
|
|
333
|
+
import React7 from "react";
|
|
334
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
290
335
|
var MultilineText = (props) => {
|
|
291
|
-
return /* @__PURE__ */
|
|
336
|
+
return /* @__PURE__ */ jsx7(React7.Fragment, { children: /* @__PURE__ */ jsx7("span", { className: "whitespace-pre-line", children: props.value }) });
|
|
292
337
|
};
|
|
293
338
|
var MultilineTextView_default = MultilineText;
|
|
294
339
|
|
|
295
340
|
// src/components/controls/view/PercentageView.tsx
|
|
296
|
-
import
|
|
341
|
+
import React8 from "react";
|
|
297
342
|
import { jsxs as jsxs3 } from "react/jsx-runtime";
|
|
298
343
|
var PercentageView = (props) => {
|
|
299
|
-
return /* @__PURE__ */ jsxs3(
|
|
344
|
+
return /* @__PURE__ */ jsxs3(React8.Fragment, { children: [
|
|
300
345
|
props.value,
|
|
301
346
|
"%"
|
|
302
347
|
] });
|
|
@@ -304,16 +349,16 @@ var PercentageView = (props) => {
|
|
|
304
349
|
var PercentageView_default = PercentageView;
|
|
305
350
|
|
|
306
351
|
// src/components/controls/view/ProgressIndicator.tsx
|
|
307
|
-
import
|
|
308
|
-
import { jsx as
|
|
352
|
+
import React9 from "react";
|
|
353
|
+
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
309
354
|
var ProgressIndicator = (props) => {
|
|
310
355
|
const percentage = 100;
|
|
311
356
|
const circumference = Math.PI * 56;
|
|
312
357
|
const offset = circumference * (1 - percentage / 100);
|
|
313
|
-
return /* @__PURE__ */
|
|
314
|
-
/* @__PURE__ */
|
|
315
|
-
/* @__PURE__ */
|
|
316
|
-
/* @__PURE__ */
|
|
358
|
+
return /* @__PURE__ */ jsx8(React9.Fragment, { children: /* @__PURE__ */ jsxs4("div", { className: "relative w-48 h-48", children: [
|
|
359
|
+
/* @__PURE__ */ jsx8("div", { className: "absolute top-0 left-0 w-full h-full rounded-full border border-gray-200" }),
|
|
360
|
+
/* @__PURE__ */ jsx8("div", { className: "absolute top-0 left-0 w-full h-full rounded-full overflow-hidden", children: /* @__PURE__ */ jsx8("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)` } }) }),
|
|
361
|
+
/* @__PURE__ */ jsx8("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: [
|
|
317
362
|
percentage,
|
|
318
363
|
"%"
|
|
319
364
|
] }) })
|
|
@@ -322,29 +367,30 @@ var ProgressIndicator = (props) => {
|
|
|
322
367
|
var ProgressIndicator_default = ProgressIndicator;
|
|
323
368
|
|
|
324
369
|
// src/components/controls/view/AiGeneratedSummary.tsx
|
|
325
|
-
import { jsx as
|
|
370
|
+
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
326
371
|
var AiGeneratedSummary = (props) => {
|
|
327
372
|
const lines = props.value?.split("\n").filter((line) => line.trim() !== "") || [];
|
|
328
373
|
return /* @__PURE__ */ jsxs5("details", { className: "group rounded-xl border-2 bg-white shadow-sm border-p overflow-hidden", children: [
|
|
329
|
-
/* @__PURE__ */
|
|
330
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ jsx9("summary", { className: "flex items-start justify-between cursor-pointer list-none", children: /* @__PURE__ */ jsxs5("div", { className: "flex items-start gap-3 ", children: [
|
|
375
|
+
/* @__PURE__ */ jsx9("div", { className: "bg-primary-base bg-transparent rounded mt-1 p-1", children: /* @__PURE__ */ jsx9("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__ */ jsx9("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" }) }) }),
|
|
331
376
|
/* @__PURE__ */ jsxs5("div", { children: [
|
|
332
|
-
/* @__PURE__ */
|
|
333
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ jsx9("h3", { className: "text-lg font-semibold ", children: "Quick Read" }),
|
|
378
|
+
/* @__PURE__ */ jsx9("p", { className: "text-sm text-gray-500 mb-0", children: "Summary is AI-generated, author-reviewed" })
|
|
334
379
|
] })
|
|
335
380
|
] }) }),
|
|
336
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ jsx9("div", { children: /* @__PURE__ */ jsx9("ul", { className: "list-disc pl-6 space-y-3 text-gray-700", children: lines.map((line, index) => /* @__PURE__ */ jsx9("li", { className: "m-0", children: line }, index)) }) })
|
|
337
382
|
] });
|
|
338
383
|
};
|
|
339
384
|
var AiGeneratedSummary_default = AiGeneratedSummary;
|
|
340
385
|
|
|
341
386
|
// src/components/controls/view/ViewControl.tsx
|
|
342
|
-
import { jsx as
|
|
387
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
343
388
|
var ViewControl = (props) => {
|
|
344
389
|
const ControlComponents = {
|
|
345
390
|
[ViewControlTypes_default.lineText]: LineTextView_default,
|
|
346
391
|
// [ViewControlTypes.asset]: Asset,
|
|
347
392
|
[ViewControlTypes_default.multilineTextBullets]: MultilineTextBulletsView_default,
|
|
393
|
+
[ViewControlTypes_default.boolean]: BooleanView_default,
|
|
348
394
|
[ViewControlTypes_default.money]: MoneyView_default,
|
|
349
395
|
[ViewControlTypes_default.date]: DateView_default,
|
|
350
396
|
[ViewControlTypes_default.time]: DateView_default,
|
|
@@ -360,16 +406,16 @@ var ViewControl = (props) => {
|
|
|
360
406
|
[ViewControlTypes_default.aiGeneratedSummary]: AiGeneratedSummary_default
|
|
361
407
|
};
|
|
362
408
|
const SelectedControlComponent = props.controlType ? ControlComponents[props.controlType] : void 0;
|
|
363
|
-
return /* @__PURE__ */
|
|
409
|
+
return /* @__PURE__ */ jsx10(React10.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx10(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
364
410
|
};
|
|
365
411
|
var ViewControl_default = ViewControl;
|
|
366
412
|
|
|
367
413
|
// src/components/controls/edit/InputControl.tsx
|
|
368
|
-
import
|
|
414
|
+
import React27 from "react";
|
|
369
415
|
|
|
370
416
|
// src/components/controls/edit/MultilineTextInput.tsx
|
|
371
|
-
import
|
|
372
|
-
import { jsx as
|
|
417
|
+
import React11 from "react";
|
|
418
|
+
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
373
419
|
var MultilineTextInput = (props) => {
|
|
374
420
|
const textChangeHandler = (event) => {
|
|
375
421
|
const text = event.target.value;
|
|
@@ -388,11 +434,11 @@ var MultilineTextInput = (props) => {
|
|
|
388
434
|
if (props.value !== void 0 && props.value !== null) {
|
|
389
435
|
value = props.value;
|
|
390
436
|
}
|
|
391
|
-
return /* @__PURE__ */
|
|
392
|
-
/* @__PURE__ */
|
|
437
|
+
return /* @__PURE__ */ jsx11(React11.Fragment, { children: /* @__PURE__ */ jsxs6("label", { className: "block mb-1", children: [
|
|
438
|
+
/* @__PURE__ */ jsx11("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
393
439
|
" ",
|
|
394
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
395
|
-
/* @__PURE__ */
|
|
440
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx11("span", { className: "bg-error-weak", children: "*" }),
|
|
441
|
+
/* @__PURE__ */ jsx11(
|
|
396
442
|
"textarea",
|
|
397
443
|
{
|
|
398
444
|
name: props.name,
|
|
@@ -409,14 +455,14 @@ var MultilineTextInput = (props) => {
|
|
|
409
455
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm input"
|
|
410
456
|
}
|
|
411
457
|
),
|
|
412
|
-
/* @__PURE__ */
|
|
458
|
+
/* @__PURE__ */ jsx11("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
413
459
|
] }) });
|
|
414
460
|
};
|
|
415
461
|
var MultilineTextInput_default = MultilineTextInput;
|
|
416
462
|
|
|
417
463
|
// src/components/controls/edit/LineTextInput.tsx
|
|
418
|
-
import
|
|
419
|
-
import { jsx as
|
|
464
|
+
import React12 from "react";
|
|
465
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
420
466
|
var LineTextInput = (props) => {
|
|
421
467
|
const textChangeHandler = (event) => {
|
|
422
468
|
const text = event.target.value;
|
|
@@ -435,11 +481,11 @@ var LineTextInput = (props) => {
|
|
|
435
481
|
if (props.value !== void 0 && props.value !== null) {
|
|
436
482
|
value = props.value;
|
|
437
483
|
}
|
|
438
|
-
return /* @__PURE__ */
|
|
439
|
-
props?.attributes?.label && /* @__PURE__ */
|
|
484
|
+
return /* @__PURE__ */ jsx12(React12.Fragment, { children: /* @__PURE__ */ jsxs7("label", { className: "block", children: [
|
|
485
|
+
props?.attributes?.label && /* @__PURE__ */ jsx12("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
440
486
|
" ",
|
|
441
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
442
|
-
/* @__PURE__ */
|
|
487
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx12("span", { className: "bg-error-weak", children: "*" }),
|
|
488
|
+
/* @__PURE__ */ jsx12(
|
|
443
489
|
"input",
|
|
444
490
|
{
|
|
445
491
|
type: "text",
|
|
@@ -459,14 +505,14 @@ var LineTextInput = (props) => {
|
|
|
459
505
|
`
|
|
460
506
|
}
|
|
461
507
|
),
|
|
462
|
-
/* @__PURE__ */
|
|
508
|
+
/* @__PURE__ */ jsx12("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
463
509
|
] }) });
|
|
464
510
|
};
|
|
465
511
|
var LineTextInput_default = LineTextInput;
|
|
466
512
|
|
|
467
513
|
// src/components/controls/edit/MoneyInput.tsx
|
|
468
|
-
import
|
|
469
|
-
import { jsx as
|
|
514
|
+
import React13 from "react";
|
|
515
|
+
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
470
516
|
var MoneyInput = (props) => {
|
|
471
517
|
const textChangeHandler = (event) => {
|
|
472
518
|
const rawValue = event.target.value;
|
|
@@ -495,11 +541,11 @@ var MoneyInput = (props) => {
|
|
|
495
541
|
e.preventDefault();
|
|
496
542
|
}
|
|
497
543
|
};
|
|
498
|
-
return /* @__PURE__ */
|
|
499
|
-
/* @__PURE__ */
|
|
544
|
+
return /* @__PURE__ */ jsx13(React13.Fragment, { children: /* @__PURE__ */ jsxs8("label", { className: "block mb-1", children: [
|
|
545
|
+
/* @__PURE__ */ jsx13("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
500
546
|
" ",
|
|
501
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
502
|
-
/* @__PURE__ */
|
|
547
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx13("span", { className: "bg-error-weak", children: "*" }),
|
|
548
|
+
/* @__PURE__ */ jsx13(
|
|
503
549
|
"input",
|
|
504
550
|
{
|
|
505
551
|
type: "number",
|
|
@@ -519,7 +565,7 @@ var MoneyInput = (props) => {
|
|
|
519
565
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm number-input"
|
|
520
566
|
}
|
|
521
567
|
),
|
|
522
|
-
/* @__PURE__ */
|
|
568
|
+
/* @__PURE__ */ jsx13("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
523
569
|
] }) });
|
|
524
570
|
};
|
|
525
571
|
var MoneyInput_default = MoneyInput;
|
|
@@ -550,7 +596,7 @@ var InputControlType_default = InputControlType;
|
|
|
550
596
|
|
|
551
597
|
// src/components/controls/edit/Select.tsx
|
|
552
598
|
import { useState, useEffect } from "react";
|
|
553
|
-
import { jsx as
|
|
599
|
+
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
554
600
|
var Select = (props) => {
|
|
555
601
|
const [list, setList] = useState([]);
|
|
556
602
|
const getSafeValue = (val) => {
|
|
@@ -609,9 +655,9 @@ var Select = (props) => {
|
|
|
609
655
|
]);
|
|
610
656
|
const value = getSafeValue(props.value);
|
|
611
657
|
return /* @__PURE__ */ jsxs9("label", { className: "block", children: [
|
|
612
|
-
props.attributes?.label && /* @__PURE__ */
|
|
658
|
+
props.attributes?.label && /* @__PURE__ */ jsx14("span", { className: "text-sm font-medium inline-block pb-1", children: props.attributes?.label }),
|
|
613
659
|
" ",
|
|
614
|
-
props.attributes?.label && props.attributes?.required && /* @__PURE__ */
|
|
660
|
+
props.attributes?.label && props.attributes?.required && /* @__PURE__ */ jsx14("span", { className: "bg-error-weak", children: "*" }),
|
|
615
661
|
/* @__PURE__ */ jsxs9(
|
|
616
662
|
"select",
|
|
617
663
|
{
|
|
@@ -623,23 +669,23 @@ var Select = (props) => {
|
|
|
623
669
|
disabled: props.attributes?.readOnly,
|
|
624
670
|
className: "peer select py-1.5 block w-full text-black rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none",
|
|
625
671
|
children: [
|
|
626
|
-
/* @__PURE__ */
|
|
672
|
+
/* @__PURE__ */ jsx14("option", { value: "", children: props.attributes?.placeholder || "Select" }),
|
|
627
673
|
list.map((item, index) => {
|
|
628
674
|
const keyField = props.dataKeyFieldName;
|
|
629
675
|
const textField = props.dataTextFieldName;
|
|
630
|
-
return /* @__PURE__ */
|
|
676
|
+
return /* @__PURE__ */ jsx14("option", { value: item[keyField], children: item[textField] }, index);
|
|
631
677
|
})
|
|
632
678
|
]
|
|
633
679
|
}
|
|
634
680
|
),
|
|
635
|
-
/* @__PURE__ */
|
|
681
|
+
/* @__PURE__ */ jsx14("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props.attributes?.errorMessage || "" })
|
|
636
682
|
] });
|
|
637
683
|
};
|
|
638
684
|
var Select_default = Select;
|
|
639
685
|
|
|
640
686
|
// src/components/controls/edit/PercentageInput.tsx
|
|
641
|
-
import
|
|
642
|
-
import { jsx as
|
|
687
|
+
import React15 from "react";
|
|
688
|
+
import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
643
689
|
var PercentageInput = (props) => {
|
|
644
690
|
const textChangeHandler = (event) => {
|
|
645
691
|
const rawValue = event.target.value;
|
|
@@ -668,11 +714,11 @@ var PercentageInput = (props) => {
|
|
|
668
714
|
e.preventDefault();
|
|
669
715
|
}
|
|
670
716
|
};
|
|
671
|
-
return /* @__PURE__ */
|
|
672
|
-
/* @__PURE__ */
|
|
717
|
+
return /* @__PURE__ */ jsx15(React15.Fragment, { children: /* @__PURE__ */ jsxs10("label", { className: "block mb-1", children: [
|
|
718
|
+
/* @__PURE__ */ jsx15("span", { className: "text-sm font-medium ", children: props?.attributes?.label ? props?.attributes?.label + " %" : "" }),
|
|
673
719
|
" ",
|
|
674
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
675
|
-
/* @__PURE__ */
|
|
720
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx15("span", { className: "bg-error-weak", children: "*" }),
|
|
721
|
+
/* @__PURE__ */ jsx15(
|
|
676
722
|
"input",
|
|
677
723
|
{
|
|
678
724
|
type: "number",
|
|
@@ -691,14 +737,14 @@ var PercentageInput = (props) => {
|
|
|
691
737
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm number-input"
|
|
692
738
|
}
|
|
693
739
|
),
|
|
694
|
-
/* @__PURE__ */
|
|
740
|
+
/* @__PURE__ */ jsx15("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
695
741
|
] }) });
|
|
696
742
|
};
|
|
697
743
|
var PercentageInput_default = PercentageInput;
|
|
698
744
|
|
|
699
745
|
// src/components/controls/edit/PhoneInput.tsx
|
|
700
|
-
import
|
|
701
|
-
import { jsx as
|
|
746
|
+
import React16 from "react";
|
|
747
|
+
import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
702
748
|
var PhoneInput = (props) => {
|
|
703
749
|
const textChangeHandler = (event) => {
|
|
704
750
|
const text = event.target.value;
|
|
@@ -717,13 +763,13 @@ var PhoneInput = (props) => {
|
|
|
717
763
|
if (props.value !== void 0 && props.value !== null) {
|
|
718
764
|
value = props.value;
|
|
719
765
|
}
|
|
720
|
-
return /* @__PURE__ */
|
|
721
|
-
/* @__PURE__ */
|
|
766
|
+
return /* @__PURE__ */ jsx16(React16.Fragment, { children: /* @__PURE__ */ jsxs11("label", { className: "block mb-1", children: [
|
|
767
|
+
/* @__PURE__ */ jsx16("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
722
768
|
" ",
|
|
723
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
769
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx16("span", { className: "bg-error-weak", children: "*" }),
|
|
724
770
|
/* @__PURE__ */ jsxs11("div", { className: "flex items-center rounded border ", children: [
|
|
725
|
-
/* @__PURE__ */
|
|
726
|
-
/* @__PURE__ */
|
|
771
|
+
/* @__PURE__ */ jsx16("span", { className: "px-3", children: props.prefix }),
|
|
772
|
+
/* @__PURE__ */ jsx16(
|
|
727
773
|
"input",
|
|
728
774
|
{
|
|
729
775
|
type: "text",
|
|
@@ -741,14 +787,14 @@ var PhoneInput = (props) => {
|
|
|
741
787
|
}
|
|
742
788
|
)
|
|
743
789
|
] }),
|
|
744
|
-
/* @__PURE__ */
|
|
790
|
+
/* @__PURE__ */ jsx16("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
745
791
|
] }) });
|
|
746
792
|
};
|
|
747
793
|
var PhoneInput_default = PhoneInput;
|
|
748
794
|
|
|
749
795
|
// src/components/controls/edit/NumberInput.tsx
|
|
750
|
-
import
|
|
751
|
-
import { jsx as
|
|
796
|
+
import React17 from "react";
|
|
797
|
+
import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
752
798
|
var NumberInput = (props) => {
|
|
753
799
|
const textChangeHandler = (event) => {
|
|
754
800
|
const text = event.target.value;
|
|
@@ -771,11 +817,11 @@ var NumberInput = (props) => {
|
|
|
771
817
|
if (props.value !== void 0 && props.value !== null) {
|
|
772
818
|
value = props.value;
|
|
773
819
|
}
|
|
774
|
-
return /* @__PURE__ */
|
|
775
|
-
props?.attributes?.label && /* @__PURE__ */
|
|
820
|
+
return /* @__PURE__ */ jsx17(React17.Fragment, { children: /* @__PURE__ */ jsxs12("label", { className: "block", children: [
|
|
821
|
+
props?.attributes?.label && /* @__PURE__ */ jsx17("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
776
822
|
" ",
|
|
777
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
778
|
-
/* @__PURE__ */
|
|
823
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx17("span", { className: "bg-error-weak", children: "*" }),
|
|
824
|
+
/* @__PURE__ */ jsx17(
|
|
779
825
|
"input",
|
|
780
826
|
{
|
|
781
827
|
type: "number",
|
|
@@ -794,14 +840,14 @@ var NumberInput = (props) => {
|
|
|
794
840
|
className: "peer py-1.5 block w-full rounded shadow-sm number-input input\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
795
841
|
}
|
|
796
842
|
),
|
|
797
|
-
/* @__PURE__ */
|
|
843
|
+
/* @__PURE__ */ jsx17("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
798
844
|
] }) });
|
|
799
845
|
};
|
|
800
846
|
var NumberInput_default = NumberInput;
|
|
801
847
|
|
|
802
848
|
// src/components/controls/edit/CheckboxInput.tsx
|
|
803
|
-
import
|
|
804
|
-
import { jsx as
|
|
849
|
+
import React18 from "react";
|
|
850
|
+
import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
805
851
|
var CheckboxInput = (props) => {
|
|
806
852
|
const textChangeHandler = (event) => {
|
|
807
853
|
let text = event.target.checked;
|
|
@@ -818,11 +864,11 @@ var CheckboxInput = (props) => {
|
|
|
818
864
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
819
865
|
value = true;
|
|
820
866
|
}
|
|
821
|
-
return /* @__PURE__ */
|
|
822
|
-
/* @__PURE__ */
|
|
867
|
+
return /* @__PURE__ */ jsx18(React18.Fragment, { children: /* @__PURE__ */ jsxs13("label", { className: "inline-block mb-1", children: [
|
|
868
|
+
/* @__PURE__ */ jsx18("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
823
869
|
" ",
|
|
824
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
825
|
-
/* @__PURE__ */
|
|
870
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx18("span", { className: "bg-error-weak", children: "*" }),
|
|
871
|
+
/* @__PURE__ */ jsx18(
|
|
826
872
|
"input",
|
|
827
873
|
{
|
|
828
874
|
type: "checkbox",
|
|
@@ -839,14 +885,14 @@ var CheckboxInput = (props) => {
|
|
|
839
885
|
className: "peer mt-1 py-1.5 block rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
840
886
|
}
|
|
841
887
|
),
|
|
842
|
-
/* @__PURE__ */
|
|
888
|
+
/* @__PURE__ */ jsx18("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
843
889
|
] }) });
|
|
844
890
|
};
|
|
845
891
|
var CheckboxInput_default = CheckboxInput;
|
|
846
892
|
|
|
847
893
|
// src/components/controls/edit/OtpInput.tsx
|
|
848
|
-
import
|
|
849
|
-
import { jsx as
|
|
894
|
+
import React19 from "react";
|
|
895
|
+
import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
850
896
|
var OtpInput = (props) => {
|
|
851
897
|
const textChangeHandler = (event) => {
|
|
852
898
|
const text = event.target.value;
|
|
@@ -868,11 +914,11 @@ var OtpInput = (props) => {
|
|
|
868
914
|
if (props.value !== void 0 && props.value !== null) {
|
|
869
915
|
value = props.value;
|
|
870
916
|
}
|
|
871
|
-
return /* @__PURE__ */
|
|
872
|
-
/* @__PURE__ */
|
|
917
|
+
return /* @__PURE__ */ jsx19(React19.Fragment, { children: /* @__PURE__ */ jsxs14("label", { htmlFor: props.name, className: "block mb-1 w-full", children: [
|
|
918
|
+
/* @__PURE__ */ jsx19("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
873
919
|
" ",
|
|
874
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
875
|
-
/* @__PURE__ */
|
|
920
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx19("span", { className: "bg-error-weak", children: "*" }),
|
|
921
|
+
/* @__PURE__ */ jsx19(
|
|
876
922
|
"input",
|
|
877
923
|
{
|
|
878
924
|
type: "text",
|
|
@@ -892,14 +938,14 @@ var OtpInput = (props) => {
|
|
|
892
938
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm tracking-[1.25em] text-center"
|
|
893
939
|
}
|
|
894
940
|
),
|
|
895
|
-
/* @__PURE__ */
|
|
941
|
+
/* @__PURE__ */ jsx19("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
896
942
|
] }) });
|
|
897
943
|
};
|
|
898
944
|
var OtpInput_default = OtpInput;
|
|
899
945
|
|
|
900
946
|
// src/components/controls/edit/DateTimeInput.tsx
|
|
901
|
-
import
|
|
902
|
-
import { jsx as
|
|
947
|
+
import React20 from "react";
|
|
948
|
+
import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
903
949
|
var DateTimeInput = (props) => {
|
|
904
950
|
const textChangeHandler = (event) => {
|
|
905
951
|
const localDate = new Date(event.target.value);
|
|
@@ -931,12 +977,12 @@ var DateTimeInput = (props) => {
|
|
|
931
977
|
e.preventDefault();
|
|
932
978
|
}
|
|
933
979
|
};
|
|
934
|
-
return /* @__PURE__ */
|
|
935
|
-
/* @__PURE__ */
|
|
980
|
+
return /* @__PURE__ */ jsx20(React20.Fragment, { children: /* @__PURE__ */ jsxs15("label", { className: "block mb-1", children: [
|
|
981
|
+
/* @__PURE__ */ jsx20("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
936
982
|
" ",
|
|
937
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
983
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx20("span", { className: "bg-error-weak", children: "*" }),
|
|
938
984
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2", children: [
|
|
939
|
-
/* @__PURE__ */
|
|
985
|
+
/* @__PURE__ */ jsx20(
|
|
940
986
|
"input",
|
|
941
987
|
{
|
|
942
988
|
type: "datetime-local",
|
|
@@ -954,18 +1000,18 @@ var DateTimeInput = (props) => {
|
|
|
954
1000
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
955
1001
|
}
|
|
956
1002
|
),
|
|
957
|
-
/* @__PURE__ */
|
|
1003
|
+
/* @__PURE__ */ jsx20("span", { children: timeZoneAbbr })
|
|
958
1004
|
] }),
|
|
959
|
-
/* @__PURE__ */
|
|
1005
|
+
/* @__PURE__ */ jsx20("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
960
1006
|
] }) });
|
|
961
1007
|
};
|
|
962
1008
|
var DateTimeInput_default = DateTimeInput;
|
|
963
1009
|
|
|
964
1010
|
// src/components/controls/edit/ColorInput.tsx
|
|
965
|
-
import
|
|
966
|
-
import { jsx as
|
|
1011
|
+
import React21, { useEffect as useEffect2 } from "react";
|
|
1012
|
+
import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
967
1013
|
var ColorInput = (props) => {
|
|
968
|
-
const [color, setColor] =
|
|
1014
|
+
const [color, setColor] = React21.useState("#3b82f6");
|
|
969
1015
|
useEffect2(() => {
|
|
970
1016
|
if (props.value !== void 0 && props.value !== null) {
|
|
971
1017
|
if (typeof props.value === "string") {
|
|
@@ -986,10 +1032,10 @@ var ColorInput = (props) => {
|
|
|
986
1032
|
}
|
|
987
1033
|
};
|
|
988
1034
|
return /* @__PURE__ */ jsxs16("label", { className: "block mb-1", children: [
|
|
989
|
-
/* @__PURE__ */
|
|
1035
|
+
/* @__PURE__ */ jsx21("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
990
1036
|
" ",
|
|
991
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
992
|
-
/* @__PURE__ */
|
|
1037
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx21("span", { className: "bg-error-weak", children: "*" }),
|
|
1038
|
+
/* @__PURE__ */ jsx21(
|
|
993
1039
|
"input",
|
|
994
1040
|
{
|
|
995
1041
|
type: "color",
|
|
@@ -1002,14 +1048,14 @@ var ColorInput = (props) => {
|
|
|
1002
1048
|
className: `w-[78px] h-12 block cursor-pointer`
|
|
1003
1049
|
}
|
|
1004
1050
|
),
|
|
1005
|
-
props?.attributes?.errorMessage && /* @__PURE__ */
|
|
1051
|
+
props?.attributes?.errorMessage && /* @__PURE__ */ jsx21("p", { className: "mt-1 bg-error-weak text-sm", children: props.attributes.errorMessage })
|
|
1006
1052
|
] });
|
|
1007
1053
|
};
|
|
1008
1054
|
var ColorInput_default = ColorInput;
|
|
1009
1055
|
|
|
1010
1056
|
// src/components/controls/edit/SelectWithSearchInput.tsx
|
|
1011
1057
|
import { useEffect as useEffect3, useRef, useState as useState2 } from "react";
|
|
1012
|
-
import { jsx as
|
|
1058
|
+
import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1013
1059
|
var SelectWithSearchInput = (props) => {
|
|
1014
1060
|
const [isOpen, setIsOpen] = useState2(false);
|
|
1015
1061
|
const [searchTerm, setSearchTerm] = useState2("");
|
|
@@ -1085,10 +1131,10 @@ var SelectWithSearchInput = (props) => {
|
|
|
1085
1131
|
props.attributes?.label,
|
|
1086
1132
|
" ",
|
|
1087
1133
|
" ",
|
|
1088
|
-
props?.attributes?.required && /* @__PURE__ */
|
|
1134
|
+
props?.attributes?.required && /* @__PURE__ */ jsx22("span", { className: "bg-error-weak", children: "*" })
|
|
1089
1135
|
] }),
|
|
1090
1136
|
/* @__PURE__ */ jsxs17("div", { className: "relative", children: [
|
|
1091
|
-
/* @__PURE__ */
|
|
1137
|
+
/* @__PURE__ */ jsx22(
|
|
1092
1138
|
"input",
|
|
1093
1139
|
{
|
|
1094
1140
|
type: "text",
|
|
@@ -1104,13 +1150,13 @@ var SelectWithSearchInput = (props) => {
|
|
|
1104
1150
|
className: "peer py-1.5 select block w-full text-black rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
1105
1151
|
}
|
|
1106
1152
|
),
|
|
1107
|
-
/* @__PURE__ */
|
|
1153
|
+
/* @__PURE__ */ jsx22(
|
|
1108
1154
|
"button",
|
|
1109
1155
|
{
|
|
1110
1156
|
type: "button",
|
|
1111
1157
|
onClick: () => setIsOpen(!isOpen),
|
|
1112
1158
|
className: "absolute right-2 top-3 h-5 w-5 text-gray-500 focus:outline-none",
|
|
1113
|
-
children: /* @__PURE__ */
|
|
1159
|
+
children: /* @__PURE__ */ jsx22(
|
|
1114
1160
|
"svg",
|
|
1115
1161
|
{
|
|
1116
1162
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1119,7 +1165,7 @@ var SelectWithSearchInput = (props) => {
|
|
|
1119
1165
|
strokeWidth: 1.5,
|
|
1120
1166
|
stroke: "currentColor",
|
|
1121
1167
|
className: "w-full h-full",
|
|
1122
|
-
children: /* @__PURE__ */
|
|
1168
|
+
children: /* @__PURE__ */ jsx22(
|
|
1123
1169
|
"path",
|
|
1124
1170
|
{
|
|
1125
1171
|
strokeLinecap: "round",
|
|
@@ -1132,12 +1178,12 @@ var SelectWithSearchInput = (props) => {
|
|
|
1132
1178
|
}
|
|
1133
1179
|
)
|
|
1134
1180
|
] }),
|
|
1135
|
-
isOpen && /* @__PURE__ */
|
|
1181
|
+
isOpen && /* @__PURE__ */ jsx22(
|
|
1136
1182
|
"div",
|
|
1137
1183
|
{
|
|
1138
1184
|
ref: dropdownRef,
|
|
1139
1185
|
className: "absolute z-10 mt-2 w-full bg-white border border-gray-200 rounded-md shadow-lg max-h-48 overflow-y-auto",
|
|
1140
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */
|
|
1186
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ jsx22(
|
|
1141
1187
|
"button",
|
|
1142
1188
|
{
|
|
1143
1189
|
onClick: (e) => handleSelect(e, item),
|
|
@@ -1145,10 +1191,10 @@ var SelectWithSearchInput = (props) => {
|
|
|
1145
1191
|
role: "option",
|
|
1146
1192
|
tabIndex: -1,
|
|
1147
1193
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1148
|
-
children: /* @__PURE__ */
|
|
1194
|
+
children: /* @__PURE__ */ jsx22("span", { children: item[props.dataTextFieldName] })
|
|
1149
1195
|
},
|
|
1150
1196
|
item[props.dataKeyFieldName]
|
|
1151
|
-
)) : /* @__PURE__ */
|
|
1197
|
+
)) : /* @__PURE__ */ jsx22("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1152
1198
|
}
|
|
1153
1199
|
)
|
|
1154
1200
|
] });
|
|
@@ -1156,13 +1202,13 @@ var SelectWithSearchInput = (props) => {
|
|
|
1156
1202
|
var SelectWithSearchInput_default = SelectWithSearchInput;
|
|
1157
1203
|
|
|
1158
1204
|
// src/components/controls/edit/SelectWithSearchPanel.tsx
|
|
1159
|
-
import
|
|
1205
|
+
import React23, {
|
|
1160
1206
|
useEffect as useEffect4,
|
|
1161
1207
|
useRef as useRef2,
|
|
1162
1208
|
useState as useState3,
|
|
1163
1209
|
useCallback
|
|
1164
1210
|
} from "react";
|
|
1165
|
-
import { jsx as
|
|
1211
|
+
import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1166
1212
|
var SelectWithSearchPanel = (props) => {
|
|
1167
1213
|
const [isOpen, setIsOpen] = useState3(false);
|
|
1168
1214
|
const [searchTerm, setSearchTerm] = useState3("");
|
|
@@ -1303,9 +1349,9 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1303
1349
|
props.attributes?.label,
|
|
1304
1350
|
" ",
|
|
1305
1351
|
" ",
|
|
1306
|
-
props?.attributes?.required && /* @__PURE__ */
|
|
1352
|
+
props?.attributes?.required && /* @__PURE__ */ jsx23("span", { className: "bg-error-weak", children: "*" })
|
|
1307
1353
|
] }),
|
|
1308
|
-
/* @__PURE__ */
|
|
1354
|
+
/* @__PURE__ */ jsx23("div", { children: /* @__PURE__ */ jsx23(
|
|
1309
1355
|
"input",
|
|
1310
1356
|
{
|
|
1311
1357
|
type: "text",
|
|
@@ -1319,14 +1365,14 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1319
1365
|
disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none`
|
|
1320
1366
|
}
|
|
1321
1367
|
) }),
|
|
1322
|
-
/* @__PURE__ */
|
|
1368
|
+
/* @__PURE__ */ jsx23("div", { ref: containerRef, children: isOpen && /* @__PURE__ */ jsxs18(React23.Fragment, { children: [
|
|
1323
1369
|
/* @__PURE__ */ jsxs18("div", { className: "fixed z-50 right-0 bg-white top-[62px] w-1/4 border-l border-gray-200", children: [
|
|
1324
|
-
/* @__PURE__ */
|
|
1370
|
+
/* @__PURE__ */ jsx23("div", { className: "flex flex-col p-2 bg-accent-950 text-white", children: /* @__PURE__ */ jsxs18("h5", { className: "text-md text-white font-medium", children: [
|
|
1325
1371
|
"Select a",
|
|
1326
1372
|
" ",
|
|
1327
1373
|
props.attributes?.label || props.attributes?.heading
|
|
1328
1374
|
] }) }),
|
|
1329
|
-
/* @__PURE__ */
|
|
1375
|
+
/* @__PURE__ */ jsx23("div", { className: "flex justify-end px-4 border-b py-2 border-gray-200 h-10", children: props.createFields && props.createFields.length > 0 && /* @__PURE__ */ jsx23(
|
|
1330
1376
|
"button",
|
|
1331
1377
|
{
|
|
1332
1378
|
type: "button",
|
|
@@ -1340,11 +1386,11 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1340
1386
|
) })
|
|
1341
1387
|
] }),
|
|
1342
1388
|
isCreateOpen && /* @__PURE__ */ jsxs18("div", { className: "fixed right-0 w-1/4 h-full top-[62px] bg-white shadow-lg border-l border-gray-200 z-50", children: [
|
|
1343
|
-
/* @__PURE__ */
|
|
1389
|
+
/* @__PURE__ */ jsx23("div", { className: "flex flex-col p-2 bg-accent-950", children: /* @__PURE__ */ jsxs18("h5", { className: "text-md font-medium text-white", children: [
|
|
1344
1390
|
"Create New ",
|
|
1345
1391
|
props.attributes?.label
|
|
1346
1392
|
] }) }),
|
|
1347
|
-
/* @__PURE__ */
|
|
1393
|
+
/* @__PURE__ */ jsx23("div", { className: "flex justify-end px-4 border-b py-2 border-gray-200", children: /* @__PURE__ */ jsx23(
|
|
1348
1394
|
"button",
|
|
1349
1395
|
{
|
|
1350
1396
|
type: "button",
|
|
@@ -1355,8 +1401,8 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1355
1401
|
) }),
|
|
1356
1402
|
/* @__PURE__ */ jsxs18("div", { className: "p-4", children: [
|
|
1357
1403
|
props.createFields?.map((field) => /* @__PURE__ */ jsxs18("div", { className: "mb-4", children: [
|
|
1358
|
-
/* @__PURE__ */
|
|
1359
|
-
/* @__PURE__ */
|
|
1404
|
+
/* @__PURE__ */ jsx23("label", { className: "text-sm mb-1 font-medium block", children: field.label }),
|
|
1405
|
+
/* @__PURE__ */ jsx23(
|
|
1360
1406
|
"input",
|
|
1361
1407
|
{
|
|
1362
1408
|
type: field.type,
|
|
@@ -1381,13 +1427,13 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1381
1427
|
] })
|
|
1382
1428
|
] })
|
|
1383
1429
|
] }),
|
|
1384
|
-
/* @__PURE__ */
|
|
1430
|
+
/* @__PURE__ */ jsx23(
|
|
1385
1431
|
"div",
|
|
1386
1432
|
{
|
|
1387
1433
|
ref: listRef,
|
|
1388
1434
|
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",
|
|
1389
1435
|
style: { height: "calc(100vh - 130px)" },
|
|
1390
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */
|
|
1436
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ jsx23("div", { children: /* @__PURE__ */ jsx23(
|
|
1391
1437
|
"button",
|
|
1392
1438
|
{
|
|
1393
1439
|
onClick: (e) => {
|
|
@@ -1397,9 +1443,9 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1397
1443
|
role: "option",
|
|
1398
1444
|
tabIndex: -1,
|
|
1399
1445
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1400
|
-
children: /* @__PURE__ */
|
|
1446
|
+
children: /* @__PURE__ */ jsx23("span", { children: getNestedValue3(item, props.dataTextFieldName) })
|
|
1401
1447
|
}
|
|
1402
|
-
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */
|
|
1448
|
+
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ jsx23("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1403
1449
|
}
|
|
1404
1450
|
)
|
|
1405
1451
|
] }) })
|
|
@@ -1408,11 +1454,11 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1408
1454
|
var SelectWithSearchPanel_default = SelectWithSearchPanel;
|
|
1409
1455
|
|
|
1410
1456
|
// src/components/controls/edit/BooleanSelect.tsx
|
|
1411
|
-
import
|
|
1457
|
+
import React24, {
|
|
1412
1458
|
useState as useState4,
|
|
1413
1459
|
useEffect as useEffect5
|
|
1414
1460
|
} from "react";
|
|
1415
|
-
import { jsx as
|
|
1461
|
+
import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1416
1462
|
var BooleanSelect = (props) => {
|
|
1417
1463
|
const [list, setList] = useState4();
|
|
1418
1464
|
const textChangeHandler = (event) => {
|
|
@@ -1461,10 +1507,10 @@ var BooleanSelect = (props) => {
|
|
|
1461
1507
|
if (props.value !== void 0 && props.value !== null) {
|
|
1462
1508
|
value = props.value;
|
|
1463
1509
|
}
|
|
1464
|
-
return /* @__PURE__ */
|
|
1465
|
-
/* @__PURE__ */
|
|
1510
|
+
return /* @__PURE__ */ jsx24(React24.Fragment, { children: /* @__PURE__ */ jsxs19("label", { className: "block", children: [
|
|
1511
|
+
/* @__PURE__ */ jsx24("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1466
1512
|
" ",
|
|
1467
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1513
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx24("span", { className: "bg-error-weak", children: "*" }),
|
|
1468
1514
|
/* @__PURE__ */ jsxs19(
|
|
1469
1515
|
"select",
|
|
1470
1516
|
{
|
|
@@ -1477,9 +1523,9 @@ var BooleanSelect = (props) => {
|
|
|
1477
1523
|
disabled: props?.attributes?.readOnly,
|
|
1478
1524
|
className: "peer mt-1 py-1.5 block w-full text-black rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n ",
|
|
1479
1525
|
children: [
|
|
1480
|
-
/* @__PURE__ */
|
|
1526
|
+
/* @__PURE__ */ jsx24("option", { className: "", value: "", children: props.attributes?.placeholder || "Select" }),
|
|
1481
1527
|
list && list.map((item, i) => {
|
|
1482
|
-
return /* @__PURE__ */
|
|
1528
|
+
return /* @__PURE__ */ jsx24(
|
|
1483
1529
|
"option",
|
|
1484
1530
|
{
|
|
1485
1531
|
className: "fac-select-option",
|
|
@@ -1492,14 +1538,14 @@ var BooleanSelect = (props) => {
|
|
|
1492
1538
|
]
|
|
1493
1539
|
}
|
|
1494
1540
|
),
|
|
1495
|
-
/* @__PURE__ */
|
|
1541
|
+
/* @__PURE__ */ jsx24("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1496
1542
|
] }) });
|
|
1497
1543
|
};
|
|
1498
1544
|
var BooleanSelect_default = BooleanSelect;
|
|
1499
1545
|
|
|
1500
1546
|
// src/components/controls/edit/EmailInput.tsx
|
|
1501
|
-
import
|
|
1502
|
-
import { jsx as
|
|
1547
|
+
import React25 from "react";
|
|
1548
|
+
import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1503
1549
|
var EmailInput = (props) => {
|
|
1504
1550
|
const textChangeHandler = (event) => {
|
|
1505
1551
|
const text = event.target.value;
|
|
@@ -1524,11 +1570,11 @@ var EmailInput = (props) => {
|
|
|
1524
1570
|
if (props.value !== void 0 && props.value !== null) {
|
|
1525
1571
|
value = props.value;
|
|
1526
1572
|
}
|
|
1527
|
-
return /* @__PURE__ */
|
|
1528
|
-
/* @__PURE__ */
|
|
1573
|
+
return /* @__PURE__ */ jsx25(React25.Fragment, { children: /* @__PURE__ */ jsxs20("label", { className: "block mb-1", children: [
|
|
1574
|
+
/* @__PURE__ */ jsx25("span", { className: "text-sm font-medium text-slate-700", children: props?.attributes?.label }),
|
|
1529
1575
|
" ",
|
|
1530
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1531
|
-
/* @__PURE__ */
|
|
1576
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx25("span", { className: "bg-error-weak", children: "*" }),
|
|
1577
|
+
/* @__PURE__ */ jsx25(
|
|
1532
1578
|
"input",
|
|
1533
1579
|
{
|
|
1534
1580
|
type: "email",
|
|
@@ -1544,14 +1590,14 @@ var EmailInput = (props) => {
|
|
|
1544
1590
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n transition-all duration-500 ease-in-out"
|
|
1545
1591
|
}
|
|
1546
1592
|
),
|
|
1547
|
-
/* @__PURE__ */
|
|
1593
|
+
/* @__PURE__ */ jsx25("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 mb-0 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1548
1594
|
] }) });
|
|
1549
1595
|
};
|
|
1550
1596
|
var EmailInput_default = EmailInput;
|
|
1551
1597
|
|
|
1552
1598
|
// src/components/controls/edit/TimeInput.tsx
|
|
1553
|
-
import
|
|
1554
|
-
import { jsx as
|
|
1599
|
+
import React26 from "react";
|
|
1600
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1555
1601
|
var TimeInput = (props) => {
|
|
1556
1602
|
const timeChangeHandler = (event) => {
|
|
1557
1603
|
const timeValue = event.target.value;
|
|
@@ -1564,11 +1610,11 @@ var TimeInput = (props) => {
|
|
|
1564
1610
|
});
|
|
1565
1611
|
}
|
|
1566
1612
|
};
|
|
1567
|
-
return /* @__PURE__ */
|
|
1568
|
-
/* @__PURE__ */
|
|
1613
|
+
return /* @__PURE__ */ jsx26(React26.Fragment, { children: /* @__PURE__ */ jsxs21("label", { className: "block mb-1", children: [
|
|
1614
|
+
/* @__PURE__ */ jsx26("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
1569
1615
|
" ",
|
|
1570
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1571
|
-
/* @__PURE__ */
|
|
1616
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx26("span", { className: "bg-error-weak", children: "*" }),
|
|
1617
|
+
/* @__PURE__ */ jsx26("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx26(
|
|
1572
1618
|
"input",
|
|
1573
1619
|
{
|
|
1574
1620
|
type: "time",
|
|
@@ -1581,14 +1627,14 @@ var TimeInput = (props) => {
|
|
|
1581
1627
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none"
|
|
1582
1628
|
}
|
|
1583
1629
|
) }),
|
|
1584
|
-
/* @__PURE__ */
|
|
1630
|
+
/* @__PURE__ */ jsx26("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ?? "" })
|
|
1585
1631
|
] }) });
|
|
1586
1632
|
};
|
|
1587
1633
|
var TimeInput_default = TimeInput;
|
|
1588
1634
|
|
|
1589
1635
|
// src/components/controls/edit/InputControl.tsx
|
|
1590
|
-
import { jsx as
|
|
1591
|
-
var InputControl =
|
|
1636
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1637
|
+
var InputControl = React27.forwardRef(
|
|
1592
1638
|
(props, ref) => {
|
|
1593
1639
|
const ControlComponents = {
|
|
1594
1640
|
[InputControlType_default.lineTextInput]: LineTextInput_default,
|
|
@@ -1609,58 +1655,58 @@ var InputControl = React26.forwardRef(
|
|
|
1609
1655
|
[InputControlType_default.timeInput]: TimeInput_default
|
|
1610
1656
|
};
|
|
1611
1657
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
1612
|
-
return /* @__PURE__ */
|
|
1658
|
+
return /* @__PURE__ */ jsx27(React27.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx27(SelectedControlComponent, { ...props }) : "Control not found" });
|
|
1613
1659
|
}
|
|
1614
1660
|
);
|
|
1615
1661
|
InputControl.displayName = "InputControl";
|
|
1616
1662
|
var InputControl_default = InputControl;
|
|
1617
1663
|
|
|
1618
1664
|
// src/components/dataForm/DataList.tsx
|
|
1619
|
-
import
|
|
1665
|
+
import React30, { useEffect as useEffect6, useState as useState5, useCallback as useCallback2, useReducer } from "react";
|
|
1620
1666
|
import { useRouter } from "next/navigation";
|
|
1621
1667
|
|
|
1622
1668
|
// src/components/dataForm/NoContentView.tsx
|
|
1623
|
-
import
|
|
1624
|
-
import { jsx as
|
|
1669
|
+
import React28 from "react";
|
|
1670
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1625
1671
|
var NoContentView = (props) => {
|
|
1626
|
-
return /* @__PURE__ */
|
|
1672
|
+
return /* @__PURE__ */ jsx28(React28.Fragment, { children: props.isDataFound === false && props.children });
|
|
1627
1673
|
};
|
|
1628
1674
|
var NoContentView_default = NoContentView;
|
|
1629
1675
|
|
|
1630
1676
|
// src/components/dataForm/ContentView.tsx
|
|
1631
|
-
import
|
|
1632
|
-
import { jsx as
|
|
1677
|
+
import React29 from "react";
|
|
1678
|
+
import { jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1633
1679
|
var ContentView = (props) => {
|
|
1634
|
-
return /* @__PURE__ */ jsxs22(
|
|
1635
|
-
props.isDataFound == null && /* @__PURE__ */
|
|
1680
|
+
return /* @__PURE__ */ jsxs22(React29.Fragment, { children: [
|
|
1681
|
+
props.isDataFound == null && /* @__PURE__ */ jsx29("div", { className: "", children: /* @__PURE__ */ jsxs22("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
1636
1682
|
/* @__PURE__ */ jsxs22("div", { className: "flex items-center mb-4", children: [
|
|
1637
|
-
/* @__PURE__ */
|
|
1683
|
+
/* @__PURE__ */ jsx29("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
1638
1684
|
/* @__PURE__ */ jsxs22("div", { className: "ml-2", children: [
|
|
1639
|
-
/* @__PURE__ */
|
|
1640
|
-
/* @__PURE__ */
|
|
1685
|
+
/* @__PURE__ */ jsx29("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
1686
|
+
/* @__PURE__ */ jsx29("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
1641
1687
|
] })
|
|
1642
1688
|
] }),
|
|
1643
1689
|
/* @__PURE__ */ jsxs22("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
1644
1690
|
/* @__PURE__ */ jsxs22("div", { className: "animate-pulse", children: [
|
|
1645
|
-
/* @__PURE__ */
|
|
1646
|
-
/* @__PURE__ */
|
|
1647
|
-
/* @__PURE__ */
|
|
1648
|
-
/* @__PURE__ */
|
|
1649
|
-
/* @__PURE__ */
|
|
1691
|
+
/* @__PURE__ */ jsx29("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
1692
|
+
/* @__PURE__ */ jsx29("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
1693
|
+
/* @__PURE__ */ jsx29("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
1694
|
+
/* @__PURE__ */ jsx29("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
1695
|
+
/* @__PURE__ */ jsx29("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
1650
1696
|
] }),
|
|
1651
1697
|
/* @__PURE__ */ jsxs22("div", { className: "animate-pulse", children: [
|
|
1652
|
-
/* @__PURE__ */
|
|
1653
|
-
/* @__PURE__ */
|
|
1654
|
-
/* @__PURE__ */
|
|
1655
|
-
/* @__PURE__ */
|
|
1656
|
-
/* @__PURE__ */
|
|
1698
|
+
/* @__PURE__ */ jsx29("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
1699
|
+
/* @__PURE__ */ jsx29("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
1700
|
+
/* @__PURE__ */ jsx29("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
1701
|
+
/* @__PURE__ */ jsx29("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
1702
|
+
/* @__PURE__ */ jsx29("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
1657
1703
|
] }),
|
|
1658
1704
|
/* @__PURE__ */ jsxs22("div", { className: "animate-pulse", children: [
|
|
1659
|
-
/* @__PURE__ */
|
|
1660
|
-
/* @__PURE__ */
|
|
1661
|
-
/* @__PURE__ */
|
|
1662
|
-
/* @__PURE__ */
|
|
1663
|
-
/* @__PURE__ */
|
|
1705
|
+
/* @__PURE__ */ jsx29("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
1706
|
+
/* @__PURE__ */ jsx29("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
1707
|
+
/* @__PURE__ */ jsx29("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
1708
|
+
/* @__PURE__ */ jsx29("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
1709
|
+
/* @__PURE__ */ jsx29("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
1664
1710
|
] })
|
|
1665
1711
|
] })
|
|
1666
1712
|
] }) }),
|
|
@@ -1671,7 +1717,7 @@ var ContentView_default = ContentView;
|
|
|
1671
1717
|
|
|
1672
1718
|
// src/components/dataForm/Hyperlink.tsx
|
|
1673
1719
|
import Link from "next/link";
|
|
1674
|
-
import { Fragment, jsx as
|
|
1720
|
+
import { Fragment, jsx as jsx30 } from "react/jsx-runtime";
|
|
1675
1721
|
function Hyperlink(props) {
|
|
1676
1722
|
let linkClass = props.linkType ? buttonClasses.get(props.linkType) : "";
|
|
1677
1723
|
const target = props?.href?.startsWith("http") ? "_blank" : "_self";
|
|
@@ -1679,7 +1725,7 @@ function Hyperlink(props) {
|
|
|
1679
1725
|
if (target == "_blank") {
|
|
1680
1726
|
additionalProps.rel = "noopener noreferrer";
|
|
1681
1727
|
}
|
|
1682
|
-
return /* @__PURE__ */
|
|
1728
|
+
return /* @__PURE__ */ jsx30(Fragment, { children: props.href ? /* @__PURE__ */ jsx30(
|
|
1683
1729
|
Link,
|
|
1684
1730
|
{
|
|
1685
1731
|
href: props.href,
|
|
@@ -1689,7 +1735,7 @@ function Hyperlink(props) {
|
|
|
1689
1735
|
target,
|
|
1690
1736
|
children: props.children
|
|
1691
1737
|
}
|
|
1692
|
-
) : props.isHeading ? /* @__PURE__ */
|
|
1738
|
+
) : props.isHeading ? /* @__PURE__ */ jsx30("h5", { className: props.className + "inline-block", children: props.children }) : /* @__PURE__ */ jsx30("span", { className: props.className, children: props.children }) });
|
|
1693
1739
|
}
|
|
1694
1740
|
|
|
1695
1741
|
// src/clients/OdataBuilder.tsx
|
|
@@ -1847,30 +1893,30 @@ var OdataBuilder = class {
|
|
|
1847
1893
|
};
|
|
1848
1894
|
|
|
1849
1895
|
// src/svg/chevron-updown.tsx
|
|
1850
|
-
import { jsx as
|
|
1896
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1851
1897
|
var ChevronUpDown = (props) => {
|
|
1852
|
-
return /* @__PURE__ */
|
|
1898
|
+
return /* @__PURE__ */ jsx31("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__ */ jsx31("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" }) });
|
|
1853
1899
|
};
|
|
1854
1900
|
var chevron_updown_default = ChevronUpDown;
|
|
1855
1901
|
|
|
1856
1902
|
// src/svg/chevron-down.tsx
|
|
1857
|
-
import { jsx as
|
|
1903
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1858
1904
|
var ChevronDown = (props) => {
|
|
1859
|
-
return /* @__PURE__ */
|
|
1905
|
+
return /* @__PURE__ */ jsx32("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__ */ jsx32("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) });
|
|
1860
1906
|
};
|
|
1861
1907
|
var chevron_down_default = ChevronDown;
|
|
1862
1908
|
|
|
1863
1909
|
// src/svg/chevron-up.tsx
|
|
1864
|
-
import { jsx as
|
|
1910
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1865
1911
|
var ChevronUp = (props) => {
|
|
1866
|
-
return /* @__PURE__ */
|
|
1912
|
+
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: "M4.5 15.75l7.5-7.5 7.5 7.5" }) });
|
|
1867
1913
|
};
|
|
1868
1914
|
var chevron_up_default = ChevronUp;
|
|
1869
1915
|
|
|
1870
1916
|
// src/svg/plus.tsx
|
|
1871
|
-
import { jsx as
|
|
1917
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1872
1918
|
var Plus = (props) => {
|
|
1873
|
-
return /* @__PURE__ */
|
|
1919
|
+
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: "M12 4.5v15m7.5-7.5h-15" }) });
|
|
1874
1920
|
};
|
|
1875
1921
|
var plus_default = Plus;
|
|
1876
1922
|
|
|
@@ -1884,14 +1930,14 @@ var Icons = {
|
|
|
1884
1930
|
var Icons_default = Icons;
|
|
1885
1931
|
|
|
1886
1932
|
// src/svg/Icon.tsx
|
|
1887
|
-
import { jsx as
|
|
1933
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1888
1934
|
var Icon = ({ name, className, ...props }) => {
|
|
1889
1935
|
const IconComponent = Icons_default[name];
|
|
1890
1936
|
if (!IconComponent) {
|
|
1891
1937
|
console.error(`Icon "${name}" not found.`);
|
|
1892
1938
|
return null;
|
|
1893
1939
|
}
|
|
1894
|
-
return /* @__PURE__ */
|
|
1940
|
+
return /* @__PURE__ */ jsx35(IconComponent, { ...props, className });
|
|
1895
1941
|
};
|
|
1896
1942
|
var Icon_default = Icon;
|
|
1897
1943
|
|
|
@@ -1940,7 +1986,7 @@ function FormReducer(state, action) {
|
|
|
1940
1986
|
var FormReducer_default = FormReducer;
|
|
1941
1987
|
|
|
1942
1988
|
// src/components/dataForm/DataList.tsx
|
|
1943
|
-
import { Fragment as Fragment2, jsx as
|
|
1989
|
+
import { Fragment as Fragment2, jsx as jsx36, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1944
1990
|
var DataList = (props) => {
|
|
1945
1991
|
console.log(props.dataset, "datasetssssss");
|
|
1946
1992
|
const router = useRouter();
|
|
@@ -1963,7 +2009,7 @@ var DataList = (props) => {
|
|
|
1963
2009
|
if (path.includes(".")) {
|
|
1964
2010
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
1965
2011
|
} else if (Array.isArray(obj[path])) {
|
|
1966
|
-
return obj[path].map((item, index) => /* @__PURE__ */
|
|
2012
|
+
return obj[path].map((item, index) => /* @__PURE__ */ jsx36("div", { children: item }, index));
|
|
1967
2013
|
} else {
|
|
1968
2014
|
return obj[path];
|
|
1969
2015
|
}
|
|
@@ -2019,30 +2065,30 @@ var DataList = (props) => {
|
|
|
2019
2065
|
const renderPageNumbers = () => {
|
|
2020
2066
|
if (pages <= 10) {
|
|
2021
2067
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
2022
|
-
(page) => /* @__PURE__ */
|
|
2068
|
+
(page) => /* @__PURE__ */ jsx36(React30.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx36(
|
|
2023
2069
|
Hyperlink,
|
|
2024
2070
|
{
|
|
2025
2071
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
2026
2072
|
href: builder.getNewPageUrl(page),
|
|
2027
2073
|
children: page
|
|
2028
2074
|
}
|
|
2029
|
-
) : /* @__PURE__ */
|
|
2075
|
+
) : /* @__PURE__ */ jsx36("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)
|
|
2030
2076
|
);
|
|
2031
2077
|
} else {
|
|
2032
2078
|
const showFirstPages = activePageNumber <= 5;
|
|
2033
2079
|
const showLastPages = activePageNumber > pages - 5;
|
|
2034
2080
|
if (showFirstPages) {
|
|
2035
2081
|
return /* @__PURE__ */ jsxs23(Fragment2, { children: [
|
|
2036
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */
|
|
2082
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ jsx36(React30.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx36(
|
|
2037
2083
|
Hyperlink,
|
|
2038
2084
|
{
|
|
2039
2085
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
2040
2086
|
href: builder.getNewPageUrl(page),
|
|
2041
2087
|
children: page
|
|
2042
2088
|
}
|
|
2043
|
-
) : /* @__PURE__ */
|
|
2044
|
-
/* @__PURE__ */
|
|
2045
|
-
/* @__PURE__ */
|
|
2089
|
+
) : /* @__PURE__ */ jsx36("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)),
|
|
2090
|
+
/* @__PURE__ */ jsx36("span", { className: "px-2 py-1", children: "..." }),
|
|
2091
|
+
/* @__PURE__ */ jsx36(
|
|
2046
2092
|
Hyperlink,
|
|
2047
2093
|
{
|
|
2048
2094
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2050,7 +2096,7 @@ var DataList = (props) => {
|
|
|
2050
2096
|
children: pages - 1
|
|
2051
2097
|
}
|
|
2052
2098
|
),
|
|
2053
|
-
/* @__PURE__ */
|
|
2099
|
+
/* @__PURE__ */ jsx36(
|
|
2054
2100
|
Hyperlink,
|
|
2055
2101
|
{
|
|
2056
2102
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2058,7 +2104,7 @@ var DataList = (props) => {
|
|
|
2058
2104
|
children: pages
|
|
2059
2105
|
}
|
|
2060
2106
|
),
|
|
2061
|
-
/* @__PURE__ */
|
|
2107
|
+
/* @__PURE__ */ jsx36("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs23(
|
|
2062
2108
|
"select",
|
|
2063
2109
|
{
|
|
2064
2110
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -2070,18 +2116,18 @@ var DataList = (props) => {
|
|
|
2070
2116
|
}
|
|
2071
2117
|
},
|
|
2072
2118
|
children: [
|
|
2073
|
-
/* @__PURE__ */
|
|
2119
|
+
/* @__PURE__ */ jsx36("option", { className: "", value: "", children: "Jump to" }),
|
|
2074
2120
|
Array.from(
|
|
2075
2121
|
{ length: Math.max(0, pages - 10) },
|
|
2076
2122
|
(_, index) => index + 9
|
|
2077
|
-
).map((page) => /* @__PURE__ */
|
|
2123
|
+
).map((page) => /* @__PURE__ */ jsx36("option", { value: page, children: page }, page))
|
|
2078
2124
|
]
|
|
2079
2125
|
}
|
|
2080
2126
|
) })
|
|
2081
2127
|
] });
|
|
2082
2128
|
} else if (showLastPages) {
|
|
2083
2129
|
return /* @__PURE__ */ jsxs23(Fragment2, { children: [
|
|
2084
|
-
/* @__PURE__ */
|
|
2130
|
+
/* @__PURE__ */ jsx36(
|
|
2085
2131
|
Hyperlink,
|
|
2086
2132
|
{
|
|
2087
2133
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2089,7 +2135,7 @@ var DataList = (props) => {
|
|
|
2089
2135
|
children: "1"
|
|
2090
2136
|
}
|
|
2091
2137
|
),
|
|
2092
|
-
/* @__PURE__ */
|
|
2138
|
+
/* @__PURE__ */ jsx36(
|
|
2093
2139
|
Hyperlink,
|
|
2094
2140
|
{
|
|
2095
2141
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2097,21 +2143,21 @@ var DataList = (props) => {
|
|
|
2097
2143
|
children: "2"
|
|
2098
2144
|
}
|
|
2099
2145
|
),
|
|
2100
|
-
/* @__PURE__ */
|
|
2146
|
+
/* @__PURE__ */ jsx36("span", { className: "px-2 py-1", children: "..." }),
|
|
2101
2147
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
2102
|
-
(page) => /* @__PURE__ */
|
|
2148
|
+
(page) => /* @__PURE__ */ jsx36(React30.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx36(
|
|
2103
2149
|
Hyperlink,
|
|
2104
2150
|
{
|
|
2105
2151
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
2106
2152
|
href: builder.getNewPageUrl(page),
|
|
2107
2153
|
children: page
|
|
2108
2154
|
}
|
|
2109
|
-
) : /* @__PURE__ */
|
|
2155
|
+
) : /* @__PURE__ */ jsx36("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)
|
|
2110
2156
|
)
|
|
2111
2157
|
] });
|
|
2112
2158
|
} else {
|
|
2113
2159
|
return /* @__PURE__ */ jsxs23(Fragment2, { children: [
|
|
2114
|
-
/* @__PURE__ */
|
|
2160
|
+
/* @__PURE__ */ jsx36(
|
|
2115
2161
|
Hyperlink,
|
|
2116
2162
|
{
|
|
2117
2163
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2119,7 +2165,7 @@ var DataList = (props) => {
|
|
|
2119
2165
|
children: "1"
|
|
2120
2166
|
}
|
|
2121
2167
|
),
|
|
2122
|
-
/* @__PURE__ */
|
|
2168
|
+
/* @__PURE__ */ jsx36(
|
|
2123
2169
|
Hyperlink,
|
|
2124
2170
|
{
|
|
2125
2171
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2127,20 +2173,20 @@ var DataList = (props) => {
|
|
|
2127
2173
|
children: "2"
|
|
2128
2174
|
}
|
|
2129
2175
|
),
|
|
2130
|
-
/* @__PURE__ */
|
|
2176
|
+
/* @__PURE__ */ jsx36("span", { className: "px-2 py-1", children: "..." }),
|
|
2131
2177
|
Array.from(
|
|
2132
2178
|
{ length: 5 },
|
|
2133
2179
|
(_, index) => activePageNumber - 2 + index
|
|
2134
|
-
).map((page) => /* @__PURE__ */
|
|
2180
|
+
).map((page) => /* @__PURE__ */ jsx36(React30.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx36(
|
|
2135
2181
|
Hyperlink,
|
|
2136
2182
|
{
|
|
2137
2183
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
2138
2184
|
href: builder.getNewPageUrl(page),
|
|
2139
2185
|
children: page
|
|
2140
2186
|
}
|
|
2141
|
-
) : /* @__PURE__ */
|
|
2142
|
-
/* @__PURE__ */
|
|
2143
|
-
/* @__PURE__ */
|
|
2187
|
+
) : /* @__PURE__ */ jsx36("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)),
|
|
2188
|
+
/* @__PURE__ */ jsx36("span", { className: "px-2 py-1", children: "..." }),
|
|
2189
|
+
/* @__PURE__ */ jsx36(
|
|
2144
2190
|
Hyperlink,
|
|
2145
2191
|
{
|
|
2146
2192
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2148,7 +2194,7 @@ var DataList = (props) => {
|
|
|
2148
2194
|
children: pages - 1
|
|
2149
2195
|
}
|
|
2150
2196
|
),
|
|
2151
|
-
/* @__PURE__ */
|
|
2197
|
+
/* @__PURE__ */ jsx36(
|
|
2152
2198
|
Hyperlink,
|
|
2153
2199
|
{
|
|
2154
2200
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2156,7 +2202,7 @@ var DataList = (props) => {
|
|
|
2156
2202
|
children: pages
|
|
2157
2203
|
}
|
|
2158
2204
|
),
|
|
2159
|
-
/* @__PURE__ */
|
|
2205
|
+
/* @__PURE__ */ jsx36("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs23(
|
|
2160
2206
|
"select",
|
|
2161
2207
|
{
|
|
2162
2208
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -2168,8 +2214,8 @@ var DataList = (props) => {
|
|
|
2168
2214
|
}
|
|
2169
2215
|
},
|
|
2170
2216
|
children: [
|
|
2171
|
-
/* @__PURE__ */
|
|
2172
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */
|
|
2217
|
+
/* @__PURE__ */ jsx36("option", { value: "", children: "Jump to" }),
|
|
2218
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ jsx36("option", { value: page, children: page }, page))
|
|
2173
2219
|
]
|
|
2174
2220
|
}
|
|
2175
2221
|
) })
|
|
@@ -2177,16 +2223,16 @@ var DataList = (props) => {
|
|
|
2177
2223
|
}
|
|
2178
2224
|
}
|
|
2179
2225
|
};
|
|
2180
|
-
return /* @__PURE__ */ jsxs23(
|
|
2226
|
+
return /* @__PURE__ */ jsxs23(React30.Fragment, { children: [
|
|
2181
2227
|
/* @__PURE__ */ jsxs23(ContentView_default, { isDataFound, children: [
|
|
2182
2228
|
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs23(
|
|
2183
2229
|
"div",
|
|
2184
2230
|
{
|
|
2185
2231
|
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`,
|
|
2186
2232
|
children: [
|
|
2187
|
-
props.title ? /* @__PURE__ */
|
|
2233
|
+
props.title ? /* @__PURE__ */ jsx36("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx36("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ jsx36("div", {}),
|
|
2188
2234
|
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-3", children: [
|
|
2189
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
2235
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx36(
|
|
2190
2236
|
InputControl_default,
|
|
2191
2237
|
{
|
|
2192
2238
|
name: filter.name,
|
|
@@ -2208,8 +2254,8 @@ var DataList = (props) => {
|
|
|
2208
2254
|
linkType: "Primary" /* Solid */,
|
|
2209
2255
|
href: props.addLinkHref,
|
|
2210
2256
|
children: [
|
|
2211
|
-
/* @__PURE__ */
|
|
2212
|
-
/* @__PURE__ */
|
|
2257
|
+
/* @__PURE__ */ jsx36(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
2258
|
+
/* @__PURE__ */ jsx36("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
2213
2259
|
]
|
|
2214
2260
|
}
|
|
2215
2261
|
)
|
|
@@ -2217,8 +2263,8 @@ var DataList = (props) => {
|
|
|
2217
2263
|
]
|
|
2218
2264
|
}
|
|
2219
2265
|
),
|
|
2220
|
-
/* @__PURE__ */
|
|
2221
|
-
/* @__PURE__ */
|
|
2266
|
+
/* @__PURE__ */ jsx36("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ jsxs23("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
2267
|
+
/* @__PURE__ */ jsx36("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ jsx36("tr", { children: props?.columns?.map((column) => {
|
|
2222
2268
|
let url = builder.getNewOrderByUrl(column.name);
|
|
2223
2269
|
let icon = "chevronUpDown";
|
|
2224
2270
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -2228,36 +2274,36 @@ var DataList = (props) => {
|
|
|
2228
2274
|
icon = "chevronUp";
|
|
2229
2275
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
2230
2276
|
}
|
|
2231
|
-
return /* @__PURE__ */
|
|
2277
|
+
return /* @__PURE__ */ jsx36(
|
|
2232
2278
|
"th",
|
|
2233
2279
|
{
|
|
2234
2280
|
className: "px-6 py-3 text-left font-medium cursor-pointer bg-neutral-soft " + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
2235
|
-
children: /* @__PURE__ */
|
|
2236
|
-
/* @__PURE__ */
|
|
2237
|
-
column.enableSorting && /* @__PURE__ */
|
|
2281
|
+
children: /* @__PURE__ */ jsx36(Hyperlink, { href: url, className: "!text-neutral-contrast ", children: /* @__PURE__ */ jsxs23("span", { className: "flex items-center space-x-1", children: [
|
|
2282
|
+
/* @__PURE__ */ jsx36("span", { className: "text-black", children: column.label }),
|
|
2283
|
+
column.enableSorting && /* @__PURE__ */ jsx36(Icon_default, { className: "w-4 h-4", name: icon })
|
|
2238
2284
|
] }) })
|
|
2239
2285
|
},
|
|
2240
2286
|
column.name
|
|
2241
2287
|
);
|
|
2242
2288
|
}) }) }),
|
|
2243
|
-
/* @__PURE__ */
|
|
2289
|
+
/* @__PURE__ */ jsx36("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
2244
2290
|
let validityClass = "";
|
|
2245
2291
|
console.log("dataitem", dataitem);
|
|
2246
2292
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
2247
2293
|
validityClass = "bg-alert-200";
|
|
2248
2294
|
}
|
|
2249
|
-
return /* @__PURE__ */
|
|
2295
|
+
return /* @__PURE__ */ jsx36("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
2250
2296
|
console.log("column", column);
|
|
2251
|
-
return /* @__PURE__ */
|
|
2297
|
+
return /* @__PURE__ */ jsx36(React30.Fragment, { children: /* @__PURE__ */ jsx36(
|
|
2252
2298
|
"td",
|
|
2253
2299
|
{
|
|
2254
2300
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
2255
|
-
children: column.addhref === true ? /* @__PURE__ */
|
|
2301
|
+
children: column.addhref === true ? /* @__PURE__ */ jsx36(
|
|
2256
2302
|
Hyperlink,
|
|
2257
2303
|
{
|
|
2258
2304
|
className: "",
|
|
2259
2305
|
href: `https://${dataitem[column.name]}`,
|
|
2260
|
-
children: /* @__PURE__ */
|
|
2306
|
+
children: /* @__PURE__ */ jsx36(
|
|
2261
2307
|
ViewControl_default,
|
|
2262
2308
|
{
|
|
2263
2309
|
controlType: column.controlType,
|
|
@@ -2270,11 +2316,11 @@ var DataList = (props) => {
|
|
|
2270
2316
|
}
|
|
2271
2317
|
)
|
|
2272
2318
|
}
|
|
2273
|
-
) : column.showAsLink ? /* @__PURE__ */
|
|
2319
|
+
) : column.showAsLink ? /* @__PURE__ */ jsx36(
|
|
2274
2320
|
Hyperlink,
|
|
2275
2321
|
{
|
|
2276
2322
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
2277
|
-
children: /* @__PURE__ */
|
|
2323
|
+
children: /* @__PURE__ */ jsx36(
|
|
2278
2324
|
ViewControl_default,
|
|
2279
2325
|
{
|
|
2280
2326
|
controlType: column.controlType,
|
|
@@ -2284,7 +2330,7 @@ var DataList = (props) => {
|
|
|
2284
2330
|
}
|
|
2285
2331
|
)
|
|
2286
2332
|
}
|
|
2287
|
-
) : /* @__PURE__ */
|
|
2333
|
+
) : /* @__PURE__ */ jsx36(
|
|
2288
2334
|
ViewControl_default,
|
|
2289
2335
|
{
|
|
2290
2336
|
controlType: column.controlType,
|
|
@@ -2298,10 +2344,10 @@ var DataList = (props) => {
|
|
|
2298
2344
|
}) }, index);
|
|
2299
2345
|
}) })
|
|
2300
2346
|
] }) }),
|
|
2301
|
-
/* @__PURE__ */
|
|
2302
|
-
/* @__PURE__ */
|
|
2347
|
+
/* @__PURE__ */ jsx36("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ jsxs23("div", { className: "flex items-center justify-between", children: [
|
|
2348
|
+
/* @__PURE__ */ jsx36("div", { className: "text-gray-700", children: label }),
|
|
2303
2349
|
/* @__PURE__ */ jsxs23("div", { className: "flex space-x-2 items-center", children: [
|
|
2304
|
-
activePageNumber > 1 && /* @__PURE__ */
|
|
2350
|
+
activePageNumber > 1 && /* @__PURE__ */ jsx36(
|
|
2305
2351
|
Hyperlink,
|
|
2306
2352
|
{
|
|
2307
2353
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -2309,9 +2355,9 @@ var DataList = (props) => {
|
|
|
2309
2355
|
children: "Prev"
|
|
2310
2356
|
}
|
|
2311
2357
|
),
|
|
2312
|
-
activePageNumber <= 1 && /* @__PURE__ */
|
|
2358
|
+
activePageNumber <= 1 && /* @__PURE__ */ jsx36("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" }),
|
|
2313
2359
|
renderPageNumbers(),
|
|
2314
|
-
activePageNumber < pages && /* @__PURE__ */
|
|
2360
|
+
activePageNumber < pages && /* @__PURE__ */ jsx36(
|
|
2315
2361
|
Hyperlink,
|
|
2316
2362
|
{
|
|
2317
2363
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -2319,7 +2365,7 @@ var DataList = (props) => {
|
|
|
2319
2365
|
children: "Next"
|
|
2320
2366
|
}
|
|
2321
2367
|
),
|
|
2322
|
-
activePageNumber >= pages && /* @__PURE__ */
|
|
2368
|
+
activePageNumber >= pages && /* @__PURE__ */ jsx36("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
2323
2369
|
] })
|
|
2324
2370
|
] }) })
|
|
2325
2371
|
] }),
|
|
@@ -2329,9 +2375,9 @@ var DataList = (props) => {
|
|
|
2329
2375
|
{
|
|
2330
2376
|
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`,
|
|
2331
2377
|
children: [
|
|
2332
|
-
props.title ? /* @__PURE__ */
|
|
2378
|
+
props.title ? /* @__PURE__ */ jsx36("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx36("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ jsx36("div", {}),
|
|
2333
2379
|
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-3", children: [
|
|
2334
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
2380
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx36(
|
|
2335
2381
|
InputControl_default,
|
|
2336
2382
|
{
|
|
2337
2383
|
name: filter.name,
|
|
@@ -2353,8 +2399,8 @@ var DataList = (props) => {
|
|
|
2353
2399
|
linkType: "Primary" /* Solid */,
|
|
2354
2400
|
href: props.addLinkHref,
|
|
2355
2401
|
children: [
|
|
2356
|
-
/* @__PURE__ */
|
|
2357
|
-
/* @__PURE__ */
|
|
2402
|
+
/* @__PURE__ */ jsx36(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
2403
|
+
/* @__PURE__ */ jsx36("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
2358
2404
|
]
|
|
2359
2405
|
}
|
|
2360
2406
|
)
|
|
@@ -2363,7 +2409,7 @@ var DataList = (props) => {
|
|
|
2363
2409
|
}
|
|
2364
2410
|
),
|
|
2365
2411
|
/* @__PURE__ */ jsxs23("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
2366
|
-
/* @__PURE__ */
|
|
2412
|
+
/* @__PURE__ */ jsx36("div", { children: /* @__PURE__ */ jsx36("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ jsx36("thead", { className: "bg-gray-50", children: /* @__PURE__ */ jsx36("tr", { children: props?.columns?.map((column) => {
|
|
2367
2413
|
let url = builder.getNewOrderByUrl(column.name);
|
|
2368
2414
|
let icon = "chevronUpDown";
|
|
2369
2415
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -2373,33 +2419,141 @@ var DataList = (props) => {
|
|
|
2373
2419
|
icon = "chevronUp";
|
|
2374
2420
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
2375
2421
|
}
|
|
2376
|
-
return /* @__PURE__ */
|
|
2422
|
+
return /* @__PURE__ */ jsx36(
|
|
2377
2423
|
"th",
|
|
2378
2424
|
{
|
|
2379
2425
|
className: "px-6 py-3 text-left font-medium cursor-pointer bg-neutral-soft " + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
2380
|
-
children: /* @__PURE__ */
|
|
2381
|
-
/* @__PURE__ */
|
|
2382
|
-
column.enableSorting && /* @__PURE__ */
|
|
2426
|
+
children: /* @__PURE__ */ jsx36(Hyperlink, { href: url, className: "text-body-950", children: /* @__PURE__ */ jsxs23("span", { className: "flex items-center space-x-1", children: [
|
|
2427
|
+
/* @__PURE__ */ jsx36("span", { children: column.label }),
|
|
2428
|
+
column.enableSorting && /* @__PURE__ */ jsx36(Icon_default, { className: "w-4 h-4", name: icon })
|
|
2383
2429
|
] }) })
|
|
2384
2430
|
},
|
|
2385
2431
|
column.name
|
|
2386
2432
|
);
|
|
2387
2433
|
}) }) }) }) }),
|
|
2388
|
-
/* @__PURE__ */
|
|
2434
|
+
/* @__PURE__ */ jsx36("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
2389
2435
|
] })
|
|
2390
2436
|
] })
|
|
2391
2437
|
] });
|
|
2392
2438
|
};
|
|
2393
2439
|
var DataList_default = DataList;
|
|
2394
2440
|
|
|
2441
|
+
// src/components/dataForm/DataListRenderer.tsx
|
|
2442
|
+
import React31, { useState as useState6, useEffect as useEffect7 } from "react";
|
|
2443
|
+
import { usePathname } from "next/navigation";
|
|
2444
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
2445
|
+
var viewControlMap = {
|
|
2446
|
+
number: ViewControlTypes.number,
|
|
2447
|
+
lineText: ViewControlTypes.lineText,
|
|
2448
|
+
multilineText: ViewControlTypes.multilineText,
|
|
2449
|
+
date: ViewControlTypes.date,
|
|
2450
|
+
boolean: ViewControlTypes.boolean
|
|
2451
|
+
};
|
|
2452
|
+
function resolveRoutePlaceholders(route, params) {
|
|
2453
|
+
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
2454
|
+
const value = params[key];
|
|
2455
|
+
if (value === void 0 || value === null) {
|
|
2456
|
+
console.warn(`No value found for route param: ${key}`);
|
|
2457
|
+
return "";
|
|
2458
|
+
}
|
|
2459
|
+
return value;
|
|
2460
|
+
});
|
|
2461
|
+
}
|
|
2462
|
+
function mapApiToColumns(siteForm) {
|
|
2463
|
+
const cols = siteForm?.siteFormDataList?.siteFormDataListColumns ?? [];
|
|
2464
|
+
return cols.map((col) => ({
|
|
2465
|
+
label: col.label,
|
|
2466
|
+
name: col.columnName,
|
|
2467
|
+
controlType: viewControlMap[col.controlTypeCode] ?? ViewControlTypes.lineText,
|
|
2468
|
+
enableSorting: col.enableSorting ?? false,
|
|
2469
|
+
width: "w-2/12",
|
|
2470
|
+
showAsLink: col.showAsLink ?? false,
|
|
2471
|
+
linkUrlSegment: col.linkUrlSegment ?? void 0,
|
|
2472
|
+
emptyValueLabel: col.emptyValueLabel ?? void 0
|
|
2473
|
+
}));
|
|
2474
|
+
}
|
|
2475
|
+
function mapApiToFilters(siteForm) {
|
|
2476
|
+
const filter = siteForm?.siteFormDataList?.siteFormDataListFilters ?? [];
|
|
2477
|
+
return filter.map((fil) => ({
|
|
2478
|
+
placeholder: fil.placeholder,
|
|
2479
|
+
name: fil.columnName,
|
|
2480
|
+
servicePath: fil.serviceRoute,
|
|
2481
|
+
dataTextFieldName: fil.dataTextFieldName,
|
|
2482
|
+
controlType: SelectWithSearchInput_default,
|
|
2483
|
+
dataKeyFieldName: fil.dataKeyFieldName,
|
|
2484
|
+
dataTypeCode: fil.isKeyNumber ? "number" : "string"
|
|
2485
|
+
}));
|
|
2486
|
+
}
|
|
2487
|
+
var DataListRenderer = ({
|
|
2488
|
+
formDefinition,
|
|
2489
|
+
apiBaseUrl,
|
|
2490
|
+
session,
|
|
2491
|
+
params,
|
|
2492
|
+
query,
|
|
2493
|
+
path,
|
|
2494
|
+
widgetProps
|
|
2495
|
+
}) => {
|
|
2496
|
+
const serviceClient = new ServiceClient_default(apiBaseUrl, session);
|
|
2497
|
+
const [columns, setColumns] = useState6([]);
|
|
2498
|
+
const [dataset, setDataset] = useState6();
|
|
2499
|
+
const [filter, setFilters] = useState6([]);
|
|
2500
|
+
const [addLinkHref, setAddLinkHref] = useState6("");
|
|
2501
|
+
const [addLinkText, setAddLinkText] = useState6("");
|
|
2502
|
+
const [serviceRoute, setServiceRoute] = useState6("");
|
|
2503
|
+
const pathname = usePathname();
|
|
2504
|
+
useEffect7(() => {
|
|
2505
|
+
if (!formDefinition) return;
|
|
2506
|
+
setColumns(mapApiToColumns(formDefinition));
|
|
2507
|
+
setFilters(mapApiToFilters(formDefinition));
|
|
2508
|
+
setServiceRoute(formDefinition?.siteFormDataList?.serviceRoute ?? "/");
|
|
2509
|
+
const rawAddLinkHref = formDefinition?.siteFormDataList?.addLinkHref ?? "";
|
|
2510
|
+
const resolvedAddLinkHref = resolveRoutePlaceholders(
|
|
2511
|
+
rawAddLinkHref,
|
|
2512
|
+
params
|
|
2513
|
+
);
|
|
2514
|
+
setAddLinkHref(resolvedAddLinkHref);
|
|
2515
|
+
setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
|
|
2516
|
+
}, [formDefinition, params]);
|
|
2517
|
+
useEffect7(() => {
|
|
2518
|
+
const fetchData = async () => {
|
|
2519
|
+
if (!serviceRoute) return;
|
|
2520
|
+
let resolvedRoute = resolveRoutePlaceholders(serviceRoute, params);
|
|
2521
|
+
const queryString = OdataBuilder.getOdataQueryString(query);
|
|
2522
|
+
const separator = resolvedRoute.includes("?") ? "&" : "?";
|
|
2523
|
+
const finalUrl = resolvedRoute + (queryString ? separator + queryString : "");
|
|
2524
|
+
const result = await serviceClient.get(finalUrl);
|
|
2525
|
+
setDataset(result);
|
|
2526
|
+
};
|
|
2527
|
+
fetchData();
|
|
2528
|
+
}, [serviceRoute, query, params]);
|
|
2529
|
+
const [tabItem, setTabItem] = useState6();
|
|
2530
|
+
const activeTab = tabItem?.find((tab) => tab.isActive);
|
|
2531
|
+
const activeHref = activeTab ? resolveRoutePlaceholders(activeTab.landingPageUrl, params) : pathname;
|
|
2532
|
+
return /* @__PURE__ */ jsx37(React31.Fragment, { children: /* @__PURE__ */ jsx37(
|
|
2533
|
+
DataList_default,
|
|
2534
|
+
{
|
|
2535
|
+
addLinkHref,
|
|
2536
|
+
addLinkText,
|
|
2537
|
+
title: (formDefinition?.formTitle || "") + "-V2",
|
|
2538
|
+
path,
|
|
2539
|
+
columns,
|
|
2540
|
+
dataset,
|
|
2541
|
+
filters: filter,
|
|
2542
|
+
serviceClient,
|
|
2543
|
+
query
|
|
2544
|
+
}
|
|
2545
|
+
) });
|
|
2546
|
+
};
|
|
2547
|
+
var DataListRenderer_default = DataListRenderer;
|
|
2548
|
+
|
|
2395
2549
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
2396
|
-
import
|
|
2550
|
+
import React45 from "react";
|
|
2397
2551
|
|
|
2398
2552
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
2399
|
-
import
|
|
2553
|
+
import React34 from "react";
|
|
2400
2554
|
|
|
2401
2555
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
2402
|
-
import { jsx as
|
|
2556
|
+
import { jsx as jsx38, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2403
2557
|
var TextNode = (props) => {
|
|
2404
2558
|
function cssStringToJson(cssString) {
|
|
2405
2559
|
const styleObject = {};
|
|
@@ -2459,30 +2613,30 @@ var TextNode = (props) => {
|
|
|
2459
2613
|
function renderWithLineBreaks(text) {
|
|
2460
2614
|
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ jsxs24("span", { children: [
|
|
2461
2615
|
line,
|
|
2462
|
-
index < arr.length - 1 && /* @__PURE__ */
|
|
2616
|
+
index < arr.length - 1 && /* @__PURE__ */ jsx38("br", {})
|
|
2463
2617
|
] }, index));
|
|
2464
2618
|
}
|
|
2465
2619
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
2466
2620
|
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
2467
2621
|
return (
|
|
2468
2622
|
// @ts-expect-error custom code
|
|
2469
|
-
/* @__PURE__ */
|
|
2623
|
+
/* @__PURE__ */ jsx38("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText })
|
|
2470
2624
|
);
|
|
2471
2625
|
};
|
|
2472
2626
|
var TextNode_default = TextNode;
|
|
2473
2627
|
|
|
2474
2628
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
2475
|
-
import { jsx as
|
|
2629
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2476
2630
|
var LineBreakNode = () => {
|
|
2477
|
-
return /* @__PURE__ */
|
|
2631
|
+
return /* @__PURE__ */ jsx39("div", { className: "py-0.5 lg:py-1.5" });
|
|
2478
2632
|
};
|
|
2479
2633
|
var LineBreakNode_default = LineBreakNode;
|
|
2480
2634
|
|
|
2481
2635
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
2482
|
-
import
|
|
2636
|
+
import React33 from "react";
|
|
2483
2637
|
|
|
2484
2638
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
2485
|
-
import
|
|
2639
|
+
import React32 from "react";
|
|
2486
2640
|
|
|
2487
2641
|
// src/components/utilities/AssetUtility.tsx
|
|
2488
2642
|
var AssetUtility = class {
|
|
@@ -2509,7 +2663,7 @@ var AssetUtility_default = AssetUtility;
|
|
|
2509
2663
|
import dynamic from "next/dynamic";
|
|
2510
2664
|
|
|
2511
2665
|
// src/components/DeviceAssetSelector.tsx
|
|
2512
|
-
import { jsx as
|
|
2666
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
2513
2667
|
var DeviceAssetSelector = ({
|
|
2514
2668
|
assets,
|
|
2515
2669
|
assetBaseUrl,
|
|
@@ -2584,7 +2738,7 @@ var DeviceAssetSelector = ({
|
|
|
2584
2738
|
const formatClasses = FormatClass[nodeProps?.format || ""] || "";
|
|
2585
2739
|
const renderMedia = () => {
|
|
2586
2740
|
if (isHls) {
|
|
2587
|
-
return /* @__PURE__ */
|
|
2741
|
+
return /* @__PURE__ */ jsx40(
|
|
2588
2742
|
HlsPlayer_default,
|
|
2589
2743
|
{
|
|
2590
2744
|
assetUrl: resolvedAssetUrl,
|
|
@@ -2601,7 +2755,7 @@ var DeviceAssetSelector = ({
|
|
|
2601
2755
|
} else {
|
|
2602
2756
|
return (
|
|
2603
2757
|
/* eslint-disable-next-line @next/next/no-img-element */
|
|
2604
|
-
/* @__PURE__ */
|
|
2758
|
+
/* @__PURE__ */ jsx40(
|
|
2605
2759
|
"img",
|
|
2606
2760
|
{
|
|
2607
2761
|
style: styles,
|
|
@@ -2617,18 +2771,18 @@ var DeviceAssetSelector = ({
|
|
|
2617
2771
|
}
|
|
2618
2772
|
};
|
|
2619
2773
|
if (width) {
|
|
2620
|
-
return /* @__PURE__ */
|
|
2774
|
+
return /* @__PURE__ */ jsx40("div", { style: { width }, children: renderMedia() });
|
|
2621
2775
|
}
|
|
2622
2776
|
if (nodeProps?.format) {
|
|
2623
|
-
return /* @__PURE__ */
|
|
2777
|
+
return /* @__PURE__ */ jsx40("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
2624
2778
|
}
|
|
2625
2779
|
return renderMedia();
|
|
2626
2780
|
};
|
|
2627
2781
|
var DeviceAssetSelector_default = DeviceAssetSelector;
|
|
2628
2782
|
|
|
2629
2783
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
2630
|
-
import { Fragment as Fragment3, jsx as
|
|
2631
|
-
var HlsPlayer = dynamic(() => import("./HlsPlayer-
|
|
2784
|
+
import { Fragment as Fragment3, jsx as jsx41 } from "react/jsx-runtime";
|
|
2785
|
+
var HlsPlayer = dynamic(() => import("./HlsPlayer-CTZICLSJ.mjs"), {
|
|
2632
2786
|
ssr: false
|
|
2633
2787
|
});
|
|
2634
2788
|
var getNestedValue = (obj, path) => {
|
|
@@ -2670,7 +2824,7 @@ var ImageNode = (props) => {
|
|
|
2670
2824
|
console.error("Error parsing assets in ImageNode:", error);
|
|
2671
2825
|
}
|
|
2672
2826
|
if (assets && assets.length > 0) {
|
|
2673
|
-
return /* @__PURE__ */
|
|
2827
|
+
return /* @__PURE__ */ jsx41(Fragment3, { children: /* @__PURE__ */ jsx41(
|
|
2674
2828
|
DeviceAssetSelector_default,
|
|
2675
2829
|
{
|
|
2676
2830
|
device: props.device,
|
|
@@ -2719,7 +2873,7 @@ var ImageNode = (props) => {
|
|
|
2719
2873
|
const isHls = imageUrl?.endsWith(".m3u8");
|
|
2720
2874
|
const renderMedia = () => {
|
|
2721
2875
|
if (isHls) {
|
|
2722
|
-
return /* @__PURE__ */
|
|
2876
|
+
return /* @__PURE__ */ jsx41(
|
|
2723
2877
|
HlsPlayer,
|
|
2724
2878
|
{
|
|
2725
2879
|
assetUrl: imageUrl,
|
|
@@ -2734,7 +2888,7 @@ var ImageNode = (props) => {
|
|
|
2734
2888
|
}
|
|
2735
2889
|
);
|
|
2736
2890
|
} else {
|
|
2737
|
-
return /* @__PURE__ */
|
|
2891
|
+
return /* @__PURE__ */ jsx41(React32.Fragment, { children: /* @__PURE__ */ jsx41(
|
|
2738
2892
|
"img",
|
|
2739
2893
|
{
|
|
2740
2894
|
style: styles,
|
|
@@ -2749,7 +2903,7 @@ var ImageNode = (props) => {
|
|
|
2749
2903
|
}
|
|
2750
2904
|
};
|
|
2751
2905
|
if (props.node.width) {
|
|
2752
|
-
return /* @__PURE__ */
|
|
2906
|
+
return /* @__PURE__ */ jsx41("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
2753
2907
|
}
|
|
2754
2908
|
return renderMedia();
|
|
2755
2909
|
};
|
|
@@ -2757,7 +2911,7 @@ var ImageNode_default = ImageNode;
|
|
|
2757
2911
|
|
|
2758
2912
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
2759
2913
|
import dynamic2 from "next/dynamic";
|
|
2760
|
-
import { Fragment as Fragment4, jsx as
|
|
2914
|
+
import { Fragment as Fragment4, jsx as jsx42, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2761
2915
|
var LinkNodeButton = dynamic2(() => import("./LinkNodeButton-DFS25WUO.mjs"), {
|
|
2762
2916
|
ssr: false
|
|
2763
2917
|
});
|
|
@@ -2804,13 +2958,13 @@ var LinkNode = (props) => {
|
|
|
2804
2958
|
const isButton = node.isButton === true;
|
|
2805
2959
|
const renderChildren = () => {
|
|
2806
2960
|
if (!node.children || node.children.length === 0) return null;
|
|
2807
|
-
return /* @__PURE__ */
|
|
2961
|
+
return /* @__PURE__ */ jsx42(Fragment4, { children: node.children.map((childNode, index) => {
|
|
2808
2962
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
2809
2963
|
if (!SelectedNode) {
|
|
2810
2964
|
console.warn("Unknown node type:", childNode.type);
|
|
2811
2965
|
return null;
|
|
2812
2966
|
}
|
|
2813
|
-
return /* @__PURE__ */
|
|
2967
|
+
return /* @__PURE__ */ jsx42(React33.Fragment, { children: /* @__PURE__ */ jsx42(
|
|
2814
2968
|
SelectedNode,
|
|
2815
2969
|
{
|
|
2816
2970
|
node: childNode,
|
|
@@ -2823,10 +2977,10 @@ var LinkNode = (props) => {
|
|
|
2823
2977
|
};
|
|
2824
2978
|
const renderFallback = () => {
|
|
2825
2979
|
if ((!node.children || node.children.length === 0) && linkText) {
|
|
2826
|
-
return /* @__PURE__ */
|
|
2980
|
+
return /* @__PURE__ */ jsx42("span", { children: linkText });
|
|
2827
2981
|
}
|
|
2828
2982
|
if ((!node.children || node.children.length === 0) && !linkText) {
|
|
2829
|
-
return /* @__PURE__ */
|
|
2983
|
+
return /* @__PURE__ */ jsx42("br", {});
|
|
2830
2984
|
}
|
|
2831
2985
|
return null;
|
|
2832
2986
|
};
|
|
@@ -2865,10 +3019,10 @@ var LinkNode = (props) => {
|
|
|
2865
3019
|
var LinkNode_default = LinkNode;
|
|
2866
3020
|
|
|
2867
3021
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
2868
|
-
import { jsx as
|
|
3022
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
2869
3023
|
var SVGIconNode = ({ node }) => {
|
|
2870
3024
|
if (!node?.svgCode) return null;
|
|
2871
|
-
return /* @__PURE__ */
|
|
3025
|
+
return /* @__PURE__ */ jsx43(
|
|
2872
3026
|
"span",
|
|
2873
3027
|
{
|
|
2874
3028
|
style: {
|
|
@@ -2885,7 +3039,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
2885
3039
|
|
|
2886
3040
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
2887
3041
|
import katex from "katex";
|
|
2888
|
-
import { jsx as
|
|
3042
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
2889
3043
|
var EquationNode = ({ node }) => {
|
|
2890
3044
|
const { equation, inline } = node;
|
|
2891
3045
|
let html = "";
|
|
@@ -2900,7 +3054,7 @@ var EquationNode = ({ node }) => {
|
|
|
2900
3054
|
});
|
|
2901
3055
|
}
|
|
2902
3056
|
if (inline) {
|
|
2903
|
-
return /* @__PURE__ */
|
|
3057
|
+
return /* @__PURE__ */ jsx44(
|
|
2904
3058
|
"span",
|
|
2905
3059
|
{
|
|
2906
3060
|
className: "katex-inline",
|
|
@@ -2908,7 +3062,7 @@ var EquationNode = ({ node }) => {
|
|
|
2908
3062
|
}
|
|
2909
3063
|
);
|
|
2910
3064
|
}
|
|
2911
|
-
return /* @__PURE__ */
|
|
3065
|
+
return /* @__PURE__ */ jsx44(
|
|
2912
3066
|
"div",
|
|
2913
3067
|
{
|
|
2914
3068
|
className: "katex-block my-3 text-center",
|
|
@@ -2919,7 +3073,7 @@ var EquationNode = ({ node }) => {
|
|
|
2919
3073
|
var EquationNode_default = EquationNode;
|
|
2920
3074
|
|
|
2921
3075
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
2922
|
-
import { jsx as
|
|
3076
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
2923
3077
|
function getNestedProperty(obj, path) {
|
|
2924
3078
|
if (!obj || !path) return null;
|
|
2925
3079
|
if (path.includes(".")) {
|
|
@@ -2932,7 +3086,7 @@ function getNestedProperty(obj, path) {
|
|
|
2932
3086
|
}
|
|
2933
3087
|
const value = obj[path];
|
|
2934
3088
|
if (Array.isArray(value)) {
|
|
2935
|
-
return value.map((item, index) => /* @__PURE__ */
|
|
3089
|
+
return value.map((item, index) => /* @__PURE__ */ jsx45("div", { children: String(item) }, index));
|
|
2936
3090
|
}
|
|
2937
3091
|
return value;
|
|
2938
3092
|
}
|
|
@@ -2993,7 +3147,7 @@ var DatafieldNode = (props) => {
|
|
|
2993
3147
|
const dataType = props.node.dataType;
|
|
2994
3148
|
if (isEmptyValue) return null;
|
|
2995
3149
|
if (dataType === "rawContent") {
|
|
2996
|
-
return /* @__PURE__ */
|
|
3150
|
+
return /* @__PURE__ */ jsx45(
|
|
2997
3151
|
PageBodyRenderer_default,
|
|
2998
3152
|
{
|
|
2999
3153
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -3009,12 +3163,12 @@ var DatafieldNode = (props) => {
|
|
|
3009
3163
|
}
|
|
3010
3164
|
);
|
|
3011
3165
|
}
|
|
3012
|
-
return /* @__PURE__ */
|
|
3166
|
+
return /* @__PURE__ */ jsx45(
|
|
3013
3167
|
"span",
|
|
3014
3168
|
{
|
|
3015
3169
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
3016
3170
|
style: styles,
|
|
3017
|
-
children: /* @__PURE__ */
|
|
3171
|
+
children: /* @__PURE__ */ jsx45(
|
|
3018
3172
|
ViewControl_default,
|
|
3019
3173
|
{
|
|
3020
3174
|
controlType: dataType,
|
|
@@ -3027,7 +3181,7 @@ var DatafieldNode = (props) => {
|
|
|
3027
3181
|
var DatafieldNode_default = DatafieldNode;
|
|
3028
3182
|
|
|
3029
3183
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
3030
|
-
import { Fragment as Fragment5, jsx as
|
|
3184
|
+
import { Fragment as Fragment5, jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3031
3185
|
var ParagraphNode = (props) => {
|
|
3032
3186
|
const NodeTypes2 = {
|
|
3033
3187
|
["text"]: TextNode_default,
|
|
@@ -3047,9 +3201,9 @@ var ParagraphNode = (props) => {
|
|
|
3047
3201
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
3048
3202
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
3049
3203
|
if (isInlineOnlyParent) {
|
|
3050
|
-
return /* @__PURE__ */
|
|
3204
|
+
return /* @__PURE__ */ jsx46(Fragment5, { children: hasChildren && props.node.children.map((node, index) => {
|
|
3051
3205
|
const SelectedNode = NodeTypes2[node.type];
|
|
3052
|
-
return /* @__PURE__ */
|
|
3206
|
+
return /* @__PURE__ */ jsx46(React34.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx46(
|
|
3053
3207
|
SelectedNode,
|
|
3054
3208
|
{
|
|
3055
3209
|
node,
|
|
@@ -3064,7 +3218,7 @@ var ParagraphNode = (props) => {
|
|
|
3064
3218
|
return /* @__PURE__ */ jsxs26("div", { className: " " + formatClasses, children: [
|
|
3065
3219
|
hasChildren && props.node.children.map((node, index) => {
|
|
3066
3220
|
const SelectedNode = NodeTypes2[node.type];
|
|
3067
|
-
return /* @__PURE__ */
|
|
3221
|
+
return /* @__PURE__ */ jsx46(React34.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx46(
|
|
3068
3222
|
SelectedNode,
|
|
3069
3223
|
{
|
|
3070
3224
|
node,
|
|
@@ -3075,14 +3229,14 @@ var ParagraphNode = (props) => {
|
|
|
3075
3229
|
}
|
|
3076
3230
|
) }, index);
|
|
3077
3231
|
}),
|
|
3078
|
-
!hasChildren && /* @__PURE__ */
|
|
3232
|
+
!hasChildren && /* @__PURE__ */ jsx46("div", { className: "py-1.5 lg:py-2" })
|
|
3079
3233
|
] });
|
|
3080
3234
|
};
|
|
3081
3235
|
var ParagraphNode_default = ParagraphNode;
|
|
3082
3236
|
|
|
3083
3237
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
3084
|
-
import
|
|
3085
|
-
import { Fragment as Fragment6, jsx as
|
|
3238
|
+
import React35 from "react";
|
|
3239
|
+
import { Fragment as Fragment6, jsx as jsx47 } from "react/jsx-runtime";
|
|
3086
3240
|
var HeadingNode = (props) => {
|
|
3087
3241
|
const NodeTypes2 = {
|
|
3088
3242
|
["text"]: TextNode_default,
|
|
@@ -3098,23 +3252,23 @@ var HeadingNode = (props) => {
|
|
|
3098
3252
|
{
|
|
3099
3253
|
}
|
|
3100
3254
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
3101
|
-
return /* @__PURE__ */
|
|
3255
|
+
return /* @__PURE__ */ jsx47(Fragment6, { children: React35.createElement(
|
|
3102
3256
|
HeadingTag,
|
|
3103
3257
|
{ className: formatClasses },
|
|
3104
3258
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
3105
3259
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
3106
|
-
return /* @__PURE__ */
|
|
3260
|
+
return /* @__PURE__ */ jsx47(React35.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx47(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
3107
3261
|
})
|
|
3108
3262
|
) });
|
|
3109
3263
|
};
|
|
3110
3264
|
var HeadingNode_default = HeadingNode;
|
|
3111
3265
|
|
|
3112
3266
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
3113
|
-
import
|
|
3267
|
+
import React37 from "react";
|
|
3114
3268
|
|
|
3115
3269
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
3116
|
-
import
|
|
3117
|
-
import { jsx as
|
|
3270
|
+
import React36 from "react";
|
|
3271
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
3118
3272
|
var ListItemNode = (props) => {
|
|
3119
3273
|
const NodeTypes2 = {
|
|
3120
3274
|
text: TextNode_default,
|
|
@@ -3131,66 +3285,66 @@ var ListItemNode = (props) => {
|
|
|
3131
3285
|
liStyle.fontSize = match[1].trim();
|
|
3132
3286
|
}
|
|
3133
3287
|
}
|
|
3134
|
-
return /* @__PURE__ */
|
|
3288
|
+
return /* @__PURE__ */ jsx48("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
3135
3289
|
const SelectedNode = NodeTypes2[node.type];
|
|
3136
3290
|
if (node.type === "linebreak") {
|
|
3137
3291
|
if (!foundFirstBreak) {
|
|
3138
3292
|
foundFirstBreak = true;
|
|
3139
|
-
return /* @__PURE__ */
|
|
3293
|
+
return /* @__PURE__ */ jsx48("div", {}, index);
|
|
3140
3294
|
} else {
|
|
3141
|
-
return /* @__PURE__ */
|
|
3295
|
+
return /* @__PURE__ */ jsx48("div", { className: "py-1 lg:py-2" }, index);
|
|
3142
3296
|
}
|
|
3143
3297
|
} else {
|
|
3144
3298
|
foundFirstBreak = false;
|
|
3145
|
-
return /* @__PURE__ */
|
|
3299
|
+
return /* @__PURE__ */ jsx48(React36.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx48(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
3146
3300
|
}
|
|
3147
3301
|
}) });
|
|
3148
3302
|
};
|
|
3149
3303
|
var ListItemNode_default = ListItemNode;
|
|
3150
3304
|
|
|
3151
3305
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
3152
|
-
import { jsx as
|
|
3306
|
+
import { jsx as jsx49, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3153
3307
|
var ListNode = (props) => {
|
|
3154
3308
|
const NodeTypes2 = {
|
|
3155
3309
|
listitem: ListItemNode_default
|
|
3156
3310
|
};
|
|
3157
|
-
return /* @__PURE__ */ jsxs27(
|
|
3158
|
-
props.node.listType == "bullet" && /* @__PURE__ */
|
|
3311
|
+
return /* @__PURE__ */ jsxs27(React37.Fragment, { children: [
|
|
3312
|
+
props.node.listType == "bullet" && /* @__PURE__ */ jsx49("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
3159
3313
|
const SelectedNode = NodeTypes2[node.type];
|
|
3160
|
-
return /* @__PURE__ */
|
|
3314
|
+
return /* @__PURE__ */ jsx49(React37.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx49(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
3161
3315
|
}) }),
|
|
3162
|
-
props.node.listType == "number" && /* @__PURE__ */
|
|
3316
|
+
props.node.listType == "number" && /* @__PURE__ */ jsx49("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
3163
3317
|
const SelectedNode = NodeTypes2[node.type];
|
|
3164
|
-
return /* @__PURE__ */
|
|
3318
|
+
return /* @__PURE__ */ jsx49(React37.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx49(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
3165
3319
|
}) })
|
|
3166
3320
|
] });
|
|
3167
3321
|
};
|
|
3168
3322
|
var ListNode_default = ListNode;
|
|
3169
3323
|
|
|
3170
3324
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
3171
|
-
import
|
|
3172
|
-
import { jsx as
|
|
3325
|
+
import React38 from "react";
|
|
3326
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
3173
3327
|
var QuoteNode = (props) => {
|
|
3174
3328
|
const NodeTypes2 = {
|
|
3175
3329
|
["text"]: TextNode_default,
|
|
3176
3330
|
["linebreak"]: LineBreakNode_default,
|
|
3177
3331
|
["link"]: LinkNode_default
|
|
3178
3332
|
};
|
|
3179
|
-
return /* @__PURE__ */
|
|
3333
|
+
return /* @__PURE__ */ jsx50("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
3180
3334
|
const SelectedNode = NodeTypes2[node.type];
|
|
3181
|
-
return /* @__PURE__ */
|
|
3335
|
+
return /* @__PURE__ */ jsx50(React38.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx50(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
3182
3336
|
}) });
|
|
3183
3337
|
};
|
|
3184
3338
|
var QuoteNode_default = QuoteNode;
|
|
3185
3339
|
|
|
3186
3340
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
3187
|
-
import
|
|
3341
|
+
import React39 from "react";
|
|
3188
3342
|
import dynamic3 from "next/dynamic";
|
|
3189
|
-
import { jsx as
|
|
3343
|
+
import { jsx as jsx51, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3190
3344
|
var CopyButton = dynamic3(() => import("./CopyButton-XONTQQW7.mjs"), {
|
|
3191
3345
|
ssr: false,
|
|
3192
3346
|
// optional: fallback UI while loading
|
|
3193
|
-
loading: () => /* @__PURE__ */
|
|
3347
|
+
loading: () => /* @__PURE__ */ jsx51("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
3194
3348
|
});
|
|
3195
3349
|
var CodeNode = (props) => {
|
|
3196
3350
|
const NodeTypes2 = {
|
|
@@ -3206,12 +3360,12 @@ var CodeNode = (props) => {
|
|
|
3206
3360
|
}).join("") ?? "";
|
|
3207
3361
|
return /* @__PURE__ */ jsxs28("div", { children: [
|
|
3208
3362
|
/* @__PURE__ */ jsxs28("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
3209
|
-
/* @__PURE__ */
|
|
3210
|
-
/* @__PURE__ */
|
|
3363
|
+
/* @__PURE__ */ jsx51("span", { children: "Code Snippet" }),
|
|
3364
|
+
/* @__PURE__ */ jsx51(CopyButton, { text: textContent })
|
|
3211
3365
|
] }),
|
|
3212
|
-
/* @__PURE__ */
|
|
3366
|
+
/* @__PURE__ */ jsx51("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) => {
|
|
3213
3367
|
const SelectedNode = NodeTypes2[node.type];
|
|
3214
|
-
return /* @__PURE__ */
|
|
3368
|
+
return /* @__PURE__ */ jsx51(React39.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx51(
|
|
3215
3369
|
SelectedNode,
|
|
3216
3370
|
{
|
|
3217
3371
|
node,
|
|
@@ -3226,15 +3380,15 @@ var CodeNode = (props) => {
|
|
|
3226
3380
|
var CodeNode_default = CodeNode;
|
|
3227
3381
|
|
|
3228
3382
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
3229
|
-
import { jsx as
|
|
3383
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
3230
3384
|
var HorizontalRuleNode = () => {
|
|
3231
|
-
return /* @__PURE__ */
|
|
3385
|
+
return /* @__PURE__ */ jsx52("hr", {});
|
|
3232
3386
|
};
|
|
3233
3387
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
3234
3388
|
|
|
3235
3389
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
3236
|
-
import
|
|
3237
|
-
import { Fragment as Fragment7, jsx as
|
|
3390
|
+
import React40 from "react";
|
|
3391
|
+
import { Fragment as Fragment7, jsx as jsx53 } from "react/jsx-runtime";
|
|
3238
3392
|
var WidgetNode = (props) => {
|
|
3239
3393
|
const getWidgetParameters = () => {
|
|
3240
3394
|
const widgetInputParameters = {
|
|
@@ -3291,7 +3445,7 @@ var WidgetNode = (props) => {
|
|
|
3291
3445
|
};
|
|
3292
3446
|
const widgetCode = props.node?.widgetCode;
|
|
3293
3447
|
if (!widgetCode) {
|
|
3294
|
-
return /* @__PURE__ */
|
|
3448
|
+
return /* @__PURE__ */ jsx53(Fragment7, { children: "Invalid widget" });
|
|
3295
3449
|
}
|
|
3296
3450
|
const widgetParams = getWidgetParameters();
|
|
3297
3451
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -3300,7 +3454,7 @@ var WidgetNode = (props) => {
|
|
|
3300
3454
|
}
|
|
3301
3455
|
return (
|
|
3302
3456
|
// eslint-disable-next-line react-hooks/static-components
|
|
3303
|
-
/* @__PURE__ */
|
|
3457
|
+
/* @__PURE__ */ jsx53(React40.Fragment, { children: /* @__PURE__ */ jsx53(
|
|
3304
3458
|
WidgetRenderer,
|
|
3305
3459
|
{
|
|
3306
3460
|
params: widgetParams,
|
|
@@ -3317,12 +3471,12 @@ var WidgetNode = (props) => {
|
|
|
3317
3471
|
var WidgetNode_default = WidgetNode;
|
|
3318
3472
|
|
|
3319
3473
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3320
|
-
import
|
|
3474
|
+
import React41, { useRef as useRef3, useReducer as useReducer2, useCallback as useCallback3, useEffect as useEffect8 } from "react";
|
|
3321
3475
|
|
|
3322
3476
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
3323
|
-
import { jsx as
|
|
3477
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
3324
3478
|
var InputControlNode = (props) => {
|
|
3325
|
-
return /* @__PURE__ */
|
|
3479
|
+
return /* @__PURE__ */ jsx54("div", { children: /* @__PURE__ */ jsx54(
|
|
3326
3480
|
InputControl_default,
|
|
3327
3481
|
{
|
|
3328
3482
|
name: props.node.name,
|
|
@@ -3351,7 +3505,7 @@ var InputControlNode = (props) => {
|
|
|
3351
3505
|
var InputControlNode_default = InputControlNode;
|
|
3352
3506
|
|
|
3353
3507
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3354
|
-
import { jsx as
|
|
3508
|
+
import { jsx as jsx55, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3355
3509
|
var FormContainerNode = (props) => {
|
|
3356
3510
|
const NodeTypes2 = {
|
|
3357
3511
|
["input-control"]: InputControlNode_default
|
|
@@ -3366,7 +3520,7 @@ var FormContainerNode = (props) => {
|
|
|
3366
3520
|
const handleInputChange = useCallback3((updatedValues) => {
|
|
3367
3521
|
dispatch({ type: FORM_INPUT_UPDATE, name: updatedValues.name, value: updatedValues.value });
|
|
3368
3522
|
}, [dispatch]);
|
|
3369
|
-
|
|
3523
|
+
useEffect8(() => {
|
|
3370
3524
|
const fetchInitialData = async () => {
|
|
3371
3525
|
const client = new ServiceClient_default(props.apiBaseUrl, props.session);
|
|
3372
3526
|
const response = await client.getSingle(props.node.dataFetchApi, props.routeParameters);
|
|
@@ -3386,7 +3540,7 @@ var FormContainerNode = (props) => {
|
|
|
3386
3540
|
{
|
|
3387
3541
|
}
|
|
3388
3542
|
const SelectedNode = NodeTypes2[node2.type];
|
|
3389
|
-
return /* @__PURE__ */
|
|
3543
|
+
return /* @__PURE__ */ jsx55(React41.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ jsx55(
|
|
3390
3544
|
InputControlNode_default,
|
|
3391
3545
|
{
|
|
3392
3546
|
value: formState.inputValues[node2.name],
|
|
@@ -3395,17 +3549,17 @@ var FormContainerNode = (props) => {
|
|
|
3395
3549
|
}
|
|
3396
3550
|
) }, index);
|
|
3397
3551
|
}),
|
|
3398
|
-
node.children.length == 0 && /* @__PURE__ */
|
|
3552
|
+
node.children.length == 0 && /* @__PURE__ */ jsx55("div", { className: "py-0.5 lg:py-1.5" })
|
|
3399
3553
|
] });
|
|
3400
3554
|
};
|
|
3401
3555
|
var FormContainerNode_default = FormContainerNode;
|
|
3402
3556
|
|
|
3403
3557
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
3404
|
-
import
|
|
3558
|
+
import React44 from "react";
|
|
3405
3559
|
|
|
3406
3560
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
3407
3561
|
import dynamic4 from "next/dynamic";
|
|
3408
|
-
import { jsx as
|
|
3562
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
3409
3563
|
var IframeClient = dynamic4(() => import("./IframeClient-J22NMEVY.mjs"), {
|
|
3410
3564
|
ssr: false
|
|
3411
3565
|
});
|
|
@@ -3418,13 +3572,13 @@ var EmbedNode = (props) => {
|
|
|
3418
3572
|
} else {
|
|
3419
3573
|
src = props.node.embedSrc;
|
|
3420
3574
|
}
|
|
3421
|
-
return /* @__PURE__ */
|
|
3575
|
+
return /* @__PURE__ */ jsx56("div", { className: "aspect-video", children: src && /* @__PURE__ */ jsx56(IframeClient, { src }) });
|
|
3422
3576
|
};
|
|
3423
3577
|
var EmbedNode_default = EmbedNode;
|
|
3424
3578
|
|
|
3425
3579
|
// src/components/Slider.tsx
|
|
3426
|
-
import
|
|
3427
|
-
import { Fragment as Fragment8, jsx as
|
|
3580
|
+
import React42, { useState as useState7, useEffect as useEffect9, Children, cloneElement } from "react";
|
|
3581
|
+
import { Fragment as Fragment8, jsx as jsx57, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3428
3582
|
var Slider = ({
|
|
3429
3583
|
children,
|
|
3430
3584
|
slidesToShow = 4,
|
|
@@ -3442,13 +3596,13 @@ var Slider = ({
|
|
|
3442
3596
|
pillStyle = "cumulative",
|
|
3443
3597
|
progressPosition = "bottom"
|
|
3444
3598
|
}) => {
|
|
3445
|
-
const [currentSlide, setCurrentSlide] =
|
|
3446
|
-
const [transition, setTransition] =
|
|
3447
|
-
const [slidesToShowState, setSlidesToShowState] =
|
|
3599
|
+
const [currentSlide, setCurrentSlide] = useState7(0);
|
|
3600
|
+
const [transition, setTransition] = useState7(true);
|
|
3601
|
+
const [slidesToShowState, setSlidesToShowState] = useState7(
|
|
3448
3602
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
3449
3603
|
);
|
|
3450
|
-
const [isPlaying, setIsPlaying] =
|
|
3451
|
-
|
|
3604
|
+
const [isPlaying, setIsPlaying] = useState7(autoplay);
|
|
3605
|
+
useEffect9(() => {
|
|
3452
3606
|
if (typeof slidesToShow === "number") return;
|
|
3453
3607
|
const handleResize = () => {
|
|
3454
3608
|
if (window.innerWidth >= 1024) {
|
|
@@ -3463,7 +3617,7 @@ var Slider = ({
|
|
|
3463
3617
|
window.addEventListener("resize", handleResize);
|
|
3464
3618
|
return () => window.removeEventListener("resize", handleResize);
|
|
3465
3619
|
}, [slidesToShow]);
|
|
3466
|
-
|
|
3620
|
+
useEffect9(() => {
|
|
3467
3621
|
if (!autoplay) return;
|
|
3468
3622
|
const timer = setInterval(() => {
|
|
3469
3623
|
if (isPlaying) {
|
|
@@ -3518,10 +3672,10 @@ var Slider = ({
|
|
|
3518
3672
|
};
|
|
3519
3673
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
3520
3674
|
const slides = Children.map(children, (child, index) => {
|
|
3521
|
-
if (!
|
|
3675
|
+
if (!React42.isValidElement(child)) return null;
|
|
3522
3676
|
const childProps = child.props;
|
|
3523
3677
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
3524
|
-
return /* @__PURE__ */
|
|
3678
|
+
return /* @__PURE__ */ jsx57(
|
|
3525
3679
|
"div",
|
|
3526
3680
|
{
|
|
3527
3681
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
@@ -3551,7 +3705,7 @@ var Slider = ({
|
|
|
3551
3705
|
onMouseEnter: handleMouseEnter,
|
|
3552
3706
|
onMouseLeave: handleMouseLeave,
|
|
3553
3707
|
children: [
|
|
3554
|
-
/* @__PURE__ */
|
|
3708
|
+
/* @__PURE__ */ jsx57(
|
|
3555
3709
|
"div",
|
|
3556
3710
|
{
|
|
3557
3711
|
className: "flex h-full",
|
|
@@ -3563,14 +3717,14 @@ var Slider = ({
|
|
|
3563
3717
|
}
|
|
3564
3718
|
),
|
|
3565
3719
|
show_arrows && /* @__PURE__ */ jsxs30(Fragment8, { children: [
|
|
3566
|
-
/* @__PURE__ */
|
|
3720
|
+
/* @__PURE__ */ jsx57(
|
|
3567
3721
|
ArrowButton,
|
|
3568
3722
|
{
|
|
3569
3723
|
direction: "left",
|
|
3570
3724
|
onClick: prevSlide,
|
|
3571
3725
|
visible: infinite_scroll || currentSlide > 0,
|
|
3572
3726
|
className: arrowClassName,
|
|
3573
|
-
children: /* @__PURE__ */
|
|
3727
|
+
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" }) })
|
|
3574
3728
|
}
|
|
3575
3729
|
),
|
|
3576
3730
|
/* @__PURE__ */ jsxs30(
|
|
@@ -3581,13 +3735,13 @@ var Slider = ({
|
|
|
3581
3735
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
3582
3736
|
className: arrowClassName,
|
|
3583
3737
|
children: [
|
|
3584
|
-
/* @__PURE__ */
|
|
3738
|
+
/* @__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: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
|
|
3585
3739
|
" "
|
|
3586
3740
|
]
|
|
3587
3741
|
}
|
|
3588
3742
|
)
|
|
3589
3743
|
] }),
|
|
3590
|
-
show_dots && /* @__PURE__ */
|
|
3744
|
+
show_dots && /* @__PURE__ */ jsx57("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__ */ jsx57(
|
|
3591
3745
|
ProgressPill,
|
|
3592
3746
|
{
|
|
3593
3747
|
active: index === currentSlide,
|
|
@@ -3613,7 +3767,7 @@ var ArrowButton = ({
|
|
|
3613
3767
|
visible,
|
|
3614
3768
|
children,
|
|
3615
3769
|
className = ""
|
|
3616
|
-
}) => /* @__PURE__ */
|
|
3770
|
+
}) => /* @__PURE__ */ jsx57(
|
|
3617
3771
|
"button",
|
|
3618
3772
|
{
|
|
3619
3773
|
className: `
|
|
@@ -3639,13 +3793,13 @@ var ProgressPill = ({
|
|
|
3639
3793
|
currentSlide,
|
|
3640
3794
|
totalSlides
|
|
3641
3795
|
}) => {
|
|
3642
|
-
const [progress, setProgress] =
|
|
3643
|
-
|
|
3796
|
+
const [progress, setProgress] = useState7(0);
|
|
3797
|
+
useEffect9(() => {
|
|
3644
3798
|
if (active) {
|
|
3645
3799
|
setProgress(0);
|
|
3646
3800
|
}
|
|
3647
3801
|
}, [active, index]);
|
|
3648
|
-
|
|
3802
|
+
useEffect9(() => {
|
|
3649
3803
|
if (!active || !isPlaying) {
|
|
3650
3804
|
if (!active) {
|
|
3651
3805
|
setProgress(0);
|
|
@@ -3700,7 +3854,7 @@ var ProgressPill = ({
|
|
|
3700
3854
|
const renderProgressBar = () => {
|
|
3701
3855
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
3702
3856
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
3703
|
-
return /* @__PURE__ */
|
|
3857
|
+
return /* @__PURE__ */ jsx57(
|
|
3704
3858
|
"div",
|
|
3705
3859
|
{
|
|
3706
3860
|
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`,
|
|
@@ -3712,7 +3866,7 @@ var ProgressPill = ({
|
|
|
3712
3866
|
};
|
|
3713
3867
|
const renderCumulativeFill = () => {
|
|
3714
3868
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
3715
|
-
return /* @__PURE__ */
|
|
3869
|
+
return /* @__PURE__ */ jsx57(
|
|
3716
3870
|
"div",
|
|
3717
3871
|
{
|
|
3718
3872
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -3898,10 +4052,10 @@ var PathUtility = class {
|
|
|
3898
4052
|
var PathUtility_default = new PathUtility();
|
|
3899
4053
|
|
|
3900
4054
|
// src/components/NoDataFound.tsx
|
|
3901
|
-
import { jsx as
|
|
4055
|
+
import { jsx as jsx58, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3902
4056
|
var NoDataFound = () => {
|
|
3903
4057
|
return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
3904
|
-
/* @__PURE__ */
|
|
4058
|
+
/* @__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(
|
|
3905
4059
|
"svg",
|
|
3906
4060
|
{
|
|
3907
4061
|
className: "w-10 h-10",
|
|
@@ -3909,7 +4063,7 @@ var NoDataFound = () => {
|
|
|
3909
4063
|
stroke: "currentColor",
|
|
3910
4064
|
viewBox: "0 0 24 24",
|
|
3911
4065
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3912
|
-
children: /* @__PURE__ */
|
|
4066
|
+
children: /* @__PURE__ */ jsx58(
|
|
3913
4067
|
"path",
|
|
3914
4068
|
{
|
|
3915
4069
|
strokeLinecap: "round",
|
|
@@ -3920,15 +4074,15 @@ var NoDataFound = () => {
|
|
|
3920
4074
|
)
|
|
3921
4075
|
}
|
|
3922
4076
|
) }) }),
|
|
3923
|
-
/* @__PURE__ */
|
|
3924
|
-
/* @__PURE__ */
|
|
4077
|
+
/* @__PURE__ */ jsx58("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
4078
|
+
/* @__PURE__ */ jsx58("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
3925
4079
|
] });
|
|
3926
4080
|
};
|
|
3927
4081
|
var NoDataFound_default = NoDataFound;
|
|
3928
4082
|
|
|
3929
4083
|
// src/components/Pagination.tsx
|
|
3930
4084
|
import { useMemo } from "react";
|
|
3931
|
-
import { jsx as
|
|
4085
|
+
import { jsx as jsx59, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3932
4086
|
var Pagination = (props) => {
|
|
3933
4087
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
3934
4088
|
const builder = useMemo(() => {
|
|
@@ -3972,7 +4126,7 @@ var Pagination = (props) => {
|
|
|
3972
4126
|
return range;
|
|
3973
4127
|
};
|
|
3974
4128
|
const paginationRange = getPaginationRange();
|
|
3975
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */
|
|
4129
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ jsx59(
|
|
3976
4130
|
Hyperlink,
|
|
3977
4131
|
{
|
|
3978
4132
|
linkType: "Link" /* Link */,
|
|
@@ -3987,9 +4141,9 @@ var Pagination = (props) => {
|
|
|
3987
4141
|
);
|
|
3988
4142
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
3989
4143
|
if (disabled) {
|
|
3990
|
-
return /* @__PURE__ */
|
|
4144
|
+
return /* @__PURE__ */ jsx59("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 });
|
|
3991
4145
|
}
|
|
3992
|
-
return /* @__PURE__ */
|
|
4146
|
+
return /* @__PURE__ */ jsx59(
|
|
3993
4147
|
Hyperlink,
|
|
3994
4148
|
{
|
|
3995
4149
|
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",
|
|
@@ -4010,7 +4164,7 @@ var Pagination = (props) => {
|
|
|
4010
4164
|
] }),
|
|
4011
4165
|
" ",
|
|
4012
4166
|
"out of ",
|
|
4013
|
-
/* @__PURE__ */
|
|
4167
|
+
/* @__PURE__ */ jsx59("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
4014
4168
|
" results"
|
|
4015
4169
|
] }),
|
|
4016
4170
|
totalPages > 1 && /* @__PURE__ */ jsxs32("div", { className: "flex items-center space-x-1", children: [
|
|
@@ -4020,14 +4174,14 @@ var Pagination = (props) => {
|
|
|
4020
4174
|
page: activePageNumber - 1,
|
|
4021
4175
|
disabled: activePageNumber === 1,
|
|
4022
4176
|
children: [
|
|
4023
|
-
/* @__PURE__ */
|
|
4024
|
-
/* @__PURE__ */
|
|
4177
|
+
/* @__PURE__ */ jsx59("span", { children: /* @__PURE__ */ jsx59(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
4178
|
+
/* @__PURE__ */ jsx59("span", { className: "text-sm", children: "Prev" })
|
|
4025
4179
|
]
|
|
4026
4180
|
}
|
|
4027
4181
|
),
|
|
4028
4182
|
paginationRange.map((item, index) => {
|
|
4029
4183
|
if (item === "...") {
|
|
4030
|
-
return /* @__PURE__ */
|
|
4184
|
+
return /* @__PURE__ */ jsx59(
|
|
4031
4185
|
"span",
|
|
4032
4186
|
{
|
|
4033
4187
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -4037,7 +4191,7 @@ var Pagination = (props) => {
|
|
|
4037
4191
|
);
|
|
4038
4192
|
}
|
|
4039
4193
|
const page = item;
|
|
4040
|
-
return /* @__PURE__ */
|
|
4194
|
+
return /* @__PURE__ */ jsx59(PageButton, { page, children: page }, page);
|
|
4041
4195
|
}),
|
|
4042
4196
|
/* @__PURE__ */ jsxs32(
|
|
4043
4197
|
NavigationButton,
|
|
@@ -4045,15 +4199,15 @@ var Pagination = (props) => {
|
|
|
4045
4199
|
page: activePageNumber + 1,
|
|
4046
4200
|
disabled: activePageNumber === totalPages,
|
|
4047
4201
|
children: [
|
|
4048
|
-
/* @__PURE__ */
|
|
4049
|
-
/* @__PURE__ */
|
|
4202
|
+
/* @__PURE__ */ jsx59("span", { className: "text-sm", children: "Next" }),
|
|
4203
|
+
/* @__PURE__ */ jsx59("span", { children: /* @__PURE__ */ jsx59(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
4050
4204
|
]
|
|
4051
4205
|
}
|
|
4052
4206
|
)
|
|
4053
4207
|
] }),
|
|
4054
4208
|
showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs32("div", { className: "flex items-center space-x-2", children: [
|
|
4055
|
-
/* @__PURE__ */
|
|
4056
|
-
/* @__PURE__ */
|
|
4209
|
+
/* @__PURE__ */ jsx59("span", { className: "text-sm", children: "Go to:" }),
|
|
4210
|
+
/* @__PURE__ */ jsx59("div", { className: "relative", children: /* @__PURE__ */ jsx59(
|
|
4057
4211
|
"input",
|
|
4058
4212
|
{
|
|
4059
4213
|
type: "number",
|
|
@@ -4074,9 +4228,9 @@ var Pagination = (props) => {
|
|
|
4074
4228
|
) })
|
|
4075
4229
|
] })
|
|
4076
4230
|
] }),
|
|
4077
|
-
showPageSizeSelector && /* @__PURE__ */
|
|
4078
|
-
/* @__PURE__ */
|
|
4079
|
-
/* @__PURE__ */
|
|
4231
|
+
showPageSizeSelector && /* @__PURE__ */ jsx59("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs32("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
4232
|
+
/* @__PURE__ */ jsx59("span", { className: "text-sm", children: "Show:" }),
|
|
4233
|
+
/* @__PURE__ */ jsx59("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx59(
|
|
4080
4234
|
Hyperlink,
|
|
4081
4235
|
{
|
|
4082
4236
|
className: `
|
|
@@ -4088,7 +4242,7 @@ var Pagination = (props) => {
|
|
|
4088
4242
|
},
|
|
4089
4243
|
size
|
|
4090
4244
|
)) }),
|
|
4091
|
-
/* @__PURE__ */
|
|
4245
|
+
/* @__PURE__ */ jsx59("span", { className: "text-sm", children: "per page" })
|
|
4092
4246
|
] }) })
|
|
4093
4247
|
] });
|
|
4094
4248
|
};
|
|
@@ -4096,8 +4250,8 @@ var Pagination_default = Pagination;
|
|
|
4096
4250
|
|
|
4097
4251
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
4098
4252
|
import dynamic5 from "next/dynamic";
|
|
4099
|
-
import { Fragment as Fragment9, jsx as
|
|
4100
|
-
var HlsPlayer2 = dynamic5(() => import("./HlsPlayer-
|
|
4253
|
+
import { Fragment as Fragment9, jsx as jsx60, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4254
|
+
var HlsPlayer2 = dynamic5(() => import("./HlsPlayer-CTZICLSJ.mjs"), { ssr: false });
|
|
4101
4255
|
var deviceToMediaQuery = (device) => {
|
|
4102
4256
|
switch (device) {
|
|
4103
4257
|
case "sm":
|
|
@@ -4166,7 +4320,7 @@ var ImageGalleryNode = (props) => {
|
|
|
4166
4320
|
};
|
|
4167
4321
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
4168
4322
|
return /* @__PURE__ */ jsxs33(Fragment9, { children: [
|
|
4169
|
-
hlsSources.length > 0 && /* @__PURE__ */
|
|
4323
|
+
hlsSources.length > 0 && /* @__PURE__ */ jsx60(Fragment9, { children: /* @__PURE__ */ jsx60(
|
|
4170
4324
|
HlsPlayer2,
|
|
4171
4325
|
{
|
|
4172
4326
|
sources: hlsSources,
|
|
@@ -4180,14 +4334,14 @@ var ImageGalleryNode = (props) => {
|
|
|
4180
4334
|
session: props.session
|
|
4181
4335
|
}
|
|
4182
4336
|
) }),
|
|
4183
|
-
staticFallback && /* @__PURE__ */
|
|
4337
|
+
staticFallback && /* @__PURE__ */ jsx60(Fragment9, { children: /* @__PURE__ */ jsxs33("picture", { children: [
|
|
4184
4338
|
DEVICE_ORDER.map((deviceKey) => {
|
|
4185
4339
|
const match = staticSources.find((img) => img.device === deviceKey);
|
|
4186
4340
|
if (!match) return null;
|
|
4187
4341
|
const srcUrl = resolveImageUrl(match.imageUrl);
|
|
4188
4342
|
if (!srcUrl) return null;
|
|
4189
4343
|
const mediaQuery = deviceToMediaQuery(match.device);
|
|
4190
|
-
return /* @__PURE__ */
|
|
4344
|
+
return /* @__PURE__ */ jsx60(
|
|
4191
4345
|
"source",
|
|
4192
4346
|
{
|
|
4193
4347
|
media: mediaQuery,
|
|
@@ -4211,7 +4365,7 @@ var ImageGalleryNode = (props) => {
|
|
|
4211
4365
|
if (img.borderRadius) styles.borderRadius = img.borderRadius;
|
|
4212
4366
|
return (
|
|
4213
4367
|
// eslint-disable-next-line @next/next/no-img-element
|
|
4214
|
-
/* @__PURE__ */
|
|
4368
|
+
/* @__PURE__ */ jsx60(
|
|
4215
4369
|
"img",
|
|
4216
4370
|
{
|
|
4217
4371
|
loading: "lazy",
|
|
@@ -4232,7 +4386,7 @@ var ImageGalleryNode_default = ImageGalleryNode;
|
|
|
4232
4386
|
|
|
4233
4387
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
4234
4388
|
import Link2 from "next/link";
|
|
4235
|
-
import { jsx as
|
|
4389
|
+
import { jsx as jsx61, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4236
4390
|
function toCamelCase(str) {
|
|
4237
4391
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
4238
4392
|
}
|
|
@@ -4437,7 +4591,7 @@ var DivContainer = async (props) => {
|
|
|
4437
4591
|
response = await serviceClient.get(endpoint);
|
|
4438
4592
|
result = response?.result;
|
|
4439
4593
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
4440
|
-
return /* @__PURE__ */
|
|
4594
|
+
return /* @__PURE__ */ jsx61(NoDataFound_default, {});
|
|
4441
4595
|
}
|
|
4442
4596
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
4443
4597
|
childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
|
|
@@ -4454,7 +4608,7 @@ var DivContainer = async (props) => {
|
|
|
4454
4608
|
}
|
|
4455
4609
|
const SelectedNode = NodeTypes2[node.type];
|
|
4456
4610
|
if (!SelectedNode) return null;
|
|
4457
|
-
return /* @__PURE__ */
|
|
4611
|
+
return /* @__PURE__ */ jsx61(React44.Fragment, { children: /* @__PURE__ */ jsx61(
|
|
4458
4612
|
SelectedNode,
|
|
4459
4613
|
{
|
|
4460
4614
|
node,
|
|
@@ -4556,9 +4710,9 @@ var DivContainer = async (props) => {
|
|
|
4556
4710
|
props.node.autoFormat && "auto-format",
|
|
4557
4711
|
props.node.bgClass
|
|
4558
4712
|
].filter(Boolean).join(" ");
|
|
4559
|
-
return /* @__PURE__ */ jsxs34(
|
|
4560
|
-
/* @__PURE__ */
|
|
4561
|
-
/* @__PURE__ */
|
|
4713
|
+
return /* @__PURE__ */ jsxs34(React44.Fragment, { children: [
|
|
4714
|
+
/* @__PURE__ */ jsx61("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
4715
|
+
/* @__PURE__ */ jsx61(React44.Fragment, { children: /* @__PURE__ */ jsx61(
|
|
4562
4716
|
Wrapper,
|
|
4563
4717
|
{
|
|
4564
4718
|
id: guid,
|
|
@@ -4567,18 +4721,18 @@ var DivContainer = async (props) => {
|
|
|
4567
4721
|
...wrapperProps,
|
|
4568
4722
|
children: dataToRender.map(
|
|
4569
4723
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
4570
|
-
(child, i) => /* @__PURE__ */
|
|
4724
|
+
(child, i) => /* @__PURE__ */ jsx61(React44.Fragment, { children: child }, i)
|
|
4571
4725
|
) : renderChildren(props.node.children, props, item, idx)
|
|
4572
4726
|
)
|
|
4573
4727
|
}
|
|
4574
4728
|
) }),
|
|
4575
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */
|
|
4729
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ jsx61("div", { children: /* @__PURE__ */ jsx61(Pagination_default, { path: props.path, query: props.query, dataset: response }) })
|
|
4576
4730
|
] });
|
|
4577
4731
|
};
|
|
4578
4732
|
var DivContainer_default = DivContainer;
|
|
4579
4733
|
|
|
4580
4734
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
4581
|
-
import { jsx as
|
|
4735
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
4582
4736
|
var NodeTypes = {
|
|
4583
4737
|
["paragraph"]: ParagraphNode_default,
|
|
4584
4738
|
["heading"]: HeadingNode_default,
|
|
@@ -4606,11 +4760,11 @@ var PageBodyRenderer = (props) => {
|
|
|
4606
4760
|
if (pageBodyTree && pageBodyTree.root) {
|
|
4607
4761
|
rootNode = pageBodyTree.root;
|
|
4608
4762
|
}
|
|
4609
|
-
return /* @__PURE__ */
|
|
4763
|
+
return /* @__PURE__ */ jsx62(React45.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
4610
4764
|
{
|
|
4611
4765
|
}
|
|
4612
4766
|
const SelectedNode = NodeTypes[node.type];
|
|
4613
|
-
return /* @__PURE__ */
|
|
4767
|
+
return /* @__PURE__ */ jsx62(React45.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx62(React45.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx62(React45.Fragment, { children: /* @__PURE__ */ jsx62(
|
|
4614
4768
|
SelectedNode,
|
|
4615
4769
|
{
|
|
4616
4770
|
node,
|
|
@@ -4626,7 +4780,7 @@ var PageBodyRenderer = (props) => {
|
|
|
4626
4780
|
device: props.device,
|
|
4627
4781
|
widgetRenderer: props.widgetRenderer
|
|
4628
4782
|
}
|
|
4629
|
-
) }) : /* @__PURE__ */
|
|
4783
|
+
) }) : /* @__PURE__ */ jsx62(React45.Fragment, { children: /* @__PURE__ */ jsx62(
|
|
4630
4784
|
SelectedNode,
|
|
4631
4785
|
{
|
|
4632
4786
|
node,
|
|
@@ -4647,12 +4801,12 @@ var PageBodyRenderer = (props) => {
|
|
|
4647
4801
|
var PageBodyRenderer_default = PageBodyRenderer;
|
|
4648
4802
|
|
|
4649
4803
|
// src/components/Toast.tsx
|
|
4650
|
-
import { useState as
|
|
4651
|
-
import { Fragment as Fragment10, jsx as
|
|
4804
|
+
import { useState as useState9 } from "react";
|
|
4805
|
+
import { Fragment as Fragment10, jsx as jsx63, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4652
4806
|
var Toast = () => {
|
|
4653
|
-
const [showToast, setShowToast] =
|
|
4654
|
-
const [message, setMessage] =
|
|
4655
|
-
const [messageType, setMessageType] =
|
|
4807
|
+
const [showToast, setShowToast] = useState9(false);
|
|
4808
|
+
const [message, setMessage] = useState9("");
|
|
4809
|
+
const [messageType, setMessageType] = useState9("error");
|
|
4656
4810
|
ToastService_default.showError = function(message2) {
|
|
4657
4811
|
setShowToast(true);
|
|
4658
4812
|
setMessage(message2);
|
|
@@ -4691,8 +4845,8 @@ var Toast = () => {
|
|
|
4691
4845
|
const closeToast = () => {
|
|
4692
4846
|
setShowToast(false);
|
|
4693
4847
|
};
|
|
4694
|
-
return /* @__PURE__ */
|
|
4695
|
-
/* @__PURE__ */
|
|
4848
|
+
return /* @__PURE__ */ jsx63(Fragment10, { children: showToast && /* @__PURE__ */ jsx63("div", { className: "fixed top-2 flex justify-center w-1/2 max-w-xl left-1/2 -translate-x-1/2", style: { zIndex: 1e3 }, children: /* @__PURE__ */ jsxs35("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
4849
|
+
/* @__PURE__ */ jsx63(
|
|
4696
4850
|
"span",
|
|
4697
4851
|
{
|
|
4698
4852
|
className: "font-medium text-inherit text-sm",
|
|
@@ -4700,7 +4854,7 @@ var Toast = () => {
|
|
|
4700
4854
|
children: message
|
|
4701
4855
|
}
|
|
4702
4856
|
),
|
|
4703
|
-
/* @__PURE__ */
|
|
4857
|
+
/* @__PURE__ */ jsx63("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ jsx63(
|
|
4704
4858
|
"svg",
|
|
4705
4859
|
{
|
|
4706
4860
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4708,7 +4862,7 @@ var Toast = () => {
|
|
|
4708
4862
|
fill: "none",
|
|
4709
4863
|
viewBox: "0 0 24 24",
|
|
4710
4864
|
stroke: "currentColor",
|
|
4711
|
-
children: /* @__PURE__ */
|
|
4865
|
+
children: /* @__PURE__ */ jsx63("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
4712
4866
|
}
|
|
4713
4867
|
) })
|
|
4714
4868
|
] }) }) });
|
|
@@ -4719,6 +4873,7 @@ export {
|
|
|
4719
4873
|
CheckboxInput_default as CheckboxInput,
|
|
4720
4874
|
ColorInput_default as ColorInput,
|
|
4721
4875
|
DataList_default as DataList,
|
|
4876
|
+
DataListRenderer_default as DataListRenderer,
|
|
4722
4877
|
DateTimeInput_default as DateTimeInput,
|
|
4723
4878
|
EmailInput_default as EmailInput,
|
|
4724
4879
|
InputControl_default as InputControl,
|