@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260519044944 → 0.8.1-dev.20260519071902
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -146,13 +146,32 @@ var init_DateViewClient = __esm({
|
|
|
146
146
|
}
|
|
147
147
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "inline-flex flex-wrap gap-1", children: [
|
|
148
148
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: localDateTime }),
|
|
149
|
-
!props.format && props.controlType !== "date" && timeZoneAbbr && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: timeZoneAbbr })
|
|
149
|
+
!props.format && props.controlType !== "date" && props.controlType !== "datetime" && timeZoneAbbr && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: timeZoneAbbr })
|
|
150
150
|
] });
|
|
151
151
|
};
|
|
152
152
|
DateViewClient_default = DateViewClient;
|
|
153
153
|
}
|
|
154
154
|
});
|
|
155
155
|
|
|
156
|
+
// src/components/controls/view/DateTimeViewClient.tsx
|
|
157
|
+
var DateTimeViewClient_exports = {};
|
|
158
|
+
__export(DateTimeViewClient_exports, {
|
|
159
|
+
default: () => DateTimeViewClient_default
|
|
160
|
+
});
|
|
161
|
+
var import_jsx_runtime11, DateTimeViewClient, DateTimeViewClient_default;
|
|
162
|
+
var init_DateTimeViewClient = __esm({
|
|
163
|
+
"src/components/controls/view/DateTimeViewClient.tsx"() {
|
|
164
|
+
"use strict";
|
|
165
|
+
"use client";
|
|
166
|
+
init_DateViewClient();
|
|
167
|
+
import_jsx_runtime11 = require("react/jsx-runtime");
|
|
168
|
+
DateTimeViewClient = (props) => {
|
|
169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DateViewClient_default, { ...props, controlType: "datetime" });
|
|
170
|
+
};
|
|
171
|
+
DateTimeViewClient_default = DateTimeViewClient;
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
|
|
156
175
|
// src/components/ToastService.tsx
|
|
157
176
|
var ToastService, ToastService_default;
|
|
158
177
|
var init_ToastService = __esm({
|
|
@@ -218,7 +237,7 @@ var init_StyleTypes = __esm({
|
|
|
218
237
|
});
|
|
219
238
|
|
|
220
239
|
// src/components/ClientButton.tsx
|
|
221
|
-
var import_react23,
|
|
240
|
+
var import_react23, import_jsx_runtime25, ClientButton, ClientButton_default;
|
|
222
241
|
var init_ClientButton = __esm({
|
|
223
242
|
"src/components/ClientButton.tsx"() {
|
|
224
243
|
"use strict";
|
|
@@ -226,7 +245,7 @@ var init_ClientButton = __esm({
|
|
|
226
245
|
import_react23 = __toESM(require("react"));
|
|
227
246
|
init_ToastService();
|
|
228
247
|
init_StyleTypes();
|
|
229
|
-
|
|
248
|
+
import_jsx_runtime25 = require("react/jsx-runtime");
|
|
230
249
|
ClientButton = (props) => {
|
|
231
250
|
const execute = async (event) => {
|
|
232
251
|
if (props.onClick !== void 0) {
|
|
@@ -236,7 +255,7 @@ var init_ClientButton = __esm({
|
|
|
236
255
|
}
|
|
237
256
|
};
|
|
238
257
|
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
239
|
-
return /* @__PURE__ */ (0,
|
|
258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react23.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
240
259
|
"button",
|
|
241
260
|
{
|
|
242
261
|
type: "button",
|
|
@@ -251,7 +270,7 @@ var init_ClientButton = __esm({
|
|
|
251
270
|
});
|
|
252
271
|
|
|
253
272
|
// src/components/Confirm.tsx
|
|
254
|
-
var import_react24,
|
|
273
|
+
var import_react24, import_jsx_runtime26, Confirm, Confirm_default;
|
|
255
274
|
var init_Confirm = __esm({
|
|
256
275
|
"src/components/Confirm.tsx"() {
|
|
257
276
|
"use strict";
|
|
@@ -259,7 +278,7 @@ var init_Confirm = __esm({
|
|
|
259
278
|
import_react24 = require("react");
|
|
260
279
|
init_ClientButton();
|
|
261
280
|
init_StyleTypes();
|
|
262
|
-
|
|
281
|
+
import_jsx_runtime26 = require("react/jsx-runtime");
|
|
263
282
|
Confirm = ({ message, onConfirm, onCancel }) => {
|
|
264
283
|
const [showModal, setShowModal] = (0, import_react24.useState)(true);
|
|
265
284
|
const handleConfirmAction = () => {
|
|
@@ -274,13 +293,13 @@ var init_Confirm = __esm({
|
|
|
274
293
|
onCancel();
|
|
275
294
|
}
|
|
276
295
|
};
|
|
277
|
-
return /* @__PURE__ */ (0,
|
|
278
|
-
/* @__PURE__ */ (0,
|
|
279
|
-
/* @__PURE__ */ (0,
|
|
280
|
-
/* @__PURE__ */ (0,
|
|
281
|
-
/* @__PURE__ */ (0,
|
|
282
|
-
/* @__PURE__ */ (0,
|
|
283
|
-
/* @__PURE__ */ (0,
|
|
296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: showModal && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "fixed inset-0 flex items-center justify-center z-50", children: [
|
|
297
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "absolute inset-0 bg-black opacity-70" }),
|
|
298
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "bg-white rounded-md p-6 w-2/6 shadow border z-50", children: [
|
|
299
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-xl font-medium mb-4", children: "Confirmation" }),
|
|
300
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "mb-4", children: message }),
|
|
301
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex justify-end gap-8", children: [
|
|
302
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
284
303
|
ClientButton_default,
|
|
285
304
|
{
|
|
286
305
|
onClick: handleCancelAction,
|
|
@@ -288,7 +307,7 @@ var init_Confirm = __esm({
|
|
|
288
307
|
children: "Cancel"
|
|
289
308
|
}
|
|
290
309
|
),
|
|
291
|
-
/* @__PURE__ */ (0,
|
|
310
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
292
311
|
ClientButton_default,
|
|
293
312
|
{
|
|
294
313
|
onClick: handleConfirmAction,
|
|
@@ -306,7 +325,7 @@ var init_Confirm = __esm({
|
|
|
306
325
|
});
|
|
307
326
|
|
|
308
327
|
// src/components/Button.tsx
|
|
309
|
-
var import_react25,
|
|
328
|
+
var import_react25, import_jsx_runtime27, Button, Button_default;
|
|
310
329
|
var init_Button = __esm({
|
|
311
330
|
"src/components/Button.tsx"() {
|
|
312
331
|
"use strict";
|
|
@@ -315,7 +334,7 @@ var init_Button = __esm({
|
|
|
315
334
|
init_ToastService();
|
|
316
335
|
init_StyleTypes();
|
|
317
336
|
init_Confirm();
|
|
318
|
-
|
|
337
|
+
import_jsx_runtime27 = require("react/jsx-runtime");
|
|
319
338
|
Button = (props) => {
|
|
320
339
|
const [inProgress, setInProgress] = (0, import_react25.useState)(false);
|
|
321
340
|
const [isActionPerformed, setIsActionPerformed] = (0, import_react25.useState)(false);
|
|
@@ -364,14 +383,14 @@ var init_Button = __esm({
|
|
|
364
383
|
return new Promise((resolve) => {
|
|
365
384
|
const onConfirm = () => resolve(true);
|
|
366
385
|
const onCancel = () => resolve(false);
|
|
367
|
-
setShowModal(/* @__PURE__ */ (0,
|
|
386
|
+
setShowModal(/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Confirm_default, { message: props.confirmationMessage, onConfirm, onCancel }));
|
|
368
387
|
});
|
|
369
388
|
};
|
|
370
389
|
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
371
390
|
let progressClass = props.ButtonType ? progressClasses.get(props.ButtonType) : progressClasses.get("Primary" /* Solid */);
|
|
372
391
|
const isDisabled = inProgress || isActionPerformed && props.oneTimeAction;
|
|
373
|
-
return /* @__PURE__ */ (0,
|
|
374
|
-
/* @__PURE__ */ (0,
|
|
392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react25.default.Fragment, { children: [
|
|
393
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
375
394
|
"button",
|
|
376
395
|
{
|
|
377
396
|
type: "submit",
|
|
@@ -381,9 +400,9 @@ var init_Button = __esm({
|
|
|
381
400
|
className: buttonClass + " relative " + props.className,
|
|
382
401
|
children: [
|
|
383
402
|
isActionPerformed && props.oneTimeAction && responseMessage ? responseMessage : props.children,
|
|
384
|
-
inProgress && /* @__PURE__ */ (0,
|
|
385
|
-
/* @__PURE__ */ (0,
|
|
386
|
-
/* @__PURE__ */ (0,
|
|
403
|
+
inProgress && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react25.default.Fragment, { children: props.hideProgressIndicator === true ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "absolute bottom-0 left-0 h-0.5 bg-gray-400 rounded animate-progress" }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("svg", { className: "animate-spin ml-2 mr-3 h-5 w-5 " + progressClass, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
|
|
404
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
405
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
|
|
387
406
|
] }) })
|
|
388
407
|
]
|
|
389
408
|
}
|
|
@@ -400,14 +419,14 @@ var HlsPlayer_exports = {};
|
|
|
400
419
|
__export(HlsPlayer_exports, {
|
|
401
420
|
default: () => HlsPlayer_default
|
|
402
421
|
});
|
|
403
|
-
var import_react32, import_hls,
|
|
422
|
+
var import_react32, import_hls, import_jsx_runtime42, pickSource, requestFullscreen, exitFullscreen, getFullscreenElement, HlsPlayer, HlsPlayer_default;
|
|
404
423
|
var init_HlsPlayer = __esm({
|
|
405
424
|
"src/components/HlsPlayer.tsx"() {
|
|
406
425
|
"use strict";
|
|
407
426
|
"use client";
|
|
408
427
|
import_react32 = __toESM(require("react"));
|
|
409
428
|
import_hls = __toESM(require("hls.js"));
|
|
410
|
-
|
|
429
|
+
import_jsx_runtime42 = require("react/jsx-runtime");
|
|
411
430
|
pickSource = (sources) => {
|
|
412
431
|
for (const { src, media } of sources) {
|
|
413
432
|
if (media && window.matchMedia(media).matches) return src;
|
|
@@ -633,7 +652,7 @@ var init_HlsPlayer = __esm({
|
|
|
633
652
|
if (resolvedSources.length === 0) return null;
|
|
634
653
|
const showMuteButton = !showControls && !isPlayOnHover;
|
|
635
654
|
const showExpandButton = !showControls && !isPlayOnHover;
|
|
636
|
-
return /* @__PURE__ */ (0,
|
|
655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
637
656
|
"div",
|
|
638
657
|
{
|
|
639
658
|
ref: containerRef,
|
|
@@ -642,7 +661,7 @@ var init_HlsPlayer = __esm({
|
|
|
642
661
|
onMouseLeave: handleMouseLeave,
|
|
643
662
|
onMouseMove: handleMouseMove,
|
|
644
663
|
children: [
|
|
645
|
-
/* @__PURE__ */ (0,
|
|
664
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
646
665
|
"video",
|
|
647
666
|
{
|
|
648
667
|
ref: videoRef,
|
|
@@ -655,7 +674,7 @@ var init_HlsPlayer = __esm({
|
|
|
655
674
|
playsInline: true,
|
|
656
675
|
onClick: handleVideoClick,
|
|
657
676
|
onDoubleClick: handleVideoDoubleClick,
|
|
658
|
-
children: resolvedSources.map(({ src, media }, i) => /* @__PURE__ */ (0,
|
|
677
|
+
children: resolvedSources.map(({ src, media }, i) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
659
678
|
"source",
|
|
660
679
|
{
|
|
661
680
|
src,
|
|
@@ -666,7 +685,7 @@ var init_HlsPlayer = __esm({
|
|
|
666
685
|
))
|
|
667
686
|
}
|
|
668
687
|
),
|
|
669
|
-
fallbackPoster && /* @__PURE__ */ (0,
|
|
688
|
+
fallbackPoster && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
670
689
|
"picture",
|
|
671
690
|
{
|
|
672
691
|
className: "absolute inset-0 pointer-events-none",
|
|
@@ -675,8 +694,8 @@ var init_HlsPlayer = __esm({
|
|
|
675
694
|
transition: "opacity 0.4s ease"
|
|
676
695
|
},
|
|
677
696
|
children: [
|
|
678
|
-
posterSources.map(({ media, posterUrl: src }, i) => /* @__PURE__ */ (0,
|
|
679
|
-
/* @__PURE__ */ (0,
|
|
697
|
+
posterSources.map(({ media, posterUrl: src }, i) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("source", { media, srcSet: src }, i)),
|
|
698
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
680
699
|
"img",
|
|
681
700
|
{
|
|
682
701
|
src: fallbackPoster,
|
|
@@ -690,7 +709,7 @@ var init_HlsPlayer = __esm({
|
|
|
690
709
|
]
|
|
691
710
|
}
|
|
692
711
|
),
|
|
693
|
-
/* @__PURE__ */ (0,
|
|
712
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("style", { children: `
|
|
694
713
|
.hls-play-btn {
|
|
695
714
|
will-change: transform;
|
|
696
715
|
transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
@@ -699,7 +718,7 @@ var init_HlsPlayer = __esm({
|
|
|
699
718
|
transform: scale(1.08);
|
|
700
719
|
}
|
|
701
720
|
` }),
|
|
702
|
-
!isPlayOnHover && /* @__PURE__ */ (0,
|
|
721
|
+
!isPlayOnHover && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
703
722
|
"div",
|
|
704
723
|
{
|
|
705
724
|
className: "absolute inset-0 flex items-center justify-center pointer-events-none",
|
|
@@ -707,7 +726,7 @@ var init_HlsPlayer = __esm({
|
|
|
707
726
|
opacity: isControlsVisible ? 1 : 0,
|
|
708
727
|
transition: "opacity 0.3s ease"
|
|
709
728
|
},
|
|
710
|
-
children: /* @__PURE__ */ (0,
|
|
729
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
711
730
|
"button",
|
|
712
731
|
{
|
|
713
732
|
type: "button",
|
|
@@ -733,7 +752,7 @@ var init_HlsPlayer = __esm({
|
|
|
733
752
|
overflow: "hidden"
|
|
734
753
|
},
|
|
735
754
|
children: [
|
|
736
|
-
/* @__PURE__ */ (0,
|
|
755
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
737
756
|
"div",
|
|
738
757
|
{
|
|
739
758
|
style: {
|
|
@@ -745,7 +764,7 @@ var init_HlsPlayer = __esm({
|
|
|
745
764
|
}
|
|
746
765
|
}
|
|
747
766
|
),
|
|
748
|
-
/* @__PURE__ */ (0,
|
|
767
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
749
768
|
"div",
|
|
750
769
|
{
|
|
751
770
|
style: {
|
|
@@ -759,7 +778,7 @@ var init_HlsPlayer = __esm({
|
|
|
759
778
|
),
|
|
760
779
|
isPlaying ? (
|
|
761
780
|
/* Pause — two rounded bars, sized to match play icon proportions */
|
|
762
|
-
/* @__PURE__ */ (0,
|
|
781
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
763
782
|
"svg",
|
|
764
783
|
{
|
|
765
784
|
width: playIconSize,
|
|
@@ -768,8 +787,8 @@ var init_HlsPlayer = __esm({
|
|
|
768
787
|
fill: "none",
|
|
769
788
|
xmlns: "http://www.w3.org/2000/svg",
|
|
770
789
|
children: [
|
|
771
|
-
/* @__PURE__ */ (0,
|
|
772
|
-
/* @__PURE__ */ (0,
|
|
790
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("rect", { x: "3.5", y: "2.5", width: "4.5", height: "15", rx: "1.5", fill: "white" }),
|
|
791
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("rect", { x: "12", y: "2.5", width: "4.5", height: "15", rx: "1.5", fill: "white" })
|
|
773
792
|
]
|
|
774
793
|
}
|
|
775
794
|
)
|
|
@@ -779,7 +798,7 @@ var init_HlsPlayer = __esm({
|
|
|
779
798
|
* Original viewBox is "0,0,240,250" (with a 5.33x scale group inside).
|
|
780
799
|
* We flatten the transform: effective drawing area is 240×250 units.
|
|
781
800
|
*/
|
|
782
|
-
/* @__PURE__ */ (0,
|
|
801
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
783
802
|
"svg",
|
|
784
803
|
{
|
|
785
804
|
width: playIconSize,
|
|
@@ -788,7 +807,7 @@ var init_HlsPlayer = __esm({
|
|
|
788
807
|
fill: "none",
|
|
789
808
|
xmlns: "http://www.w3.org/2000/svg",
|
|
790
809
|
style: { transform: "translateX(4%)" },
|
|
791
|
-
children: /* @__PURE__ */ (0,
|
|
810
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
792
811
|
"path",
|
|
793
812
|
{
|
|
794
813
|
d: "M60.78 21.93C48.57 22.41 37.33 32.78 37.33 45.87v164.26c0 17.92 19.96 29.67 35.64 20.99l148.31-82.17c16.12-8.93 16.12-33.04 0-41.97L72.97 24.81c-3.92-2.17-8.11-3.07-12.19-2.88z",
|
|
@@ -803,7 +822,7 @@ var init_HlsPlayer = __esm({
|
|
|
803
822
|
)
|
|
804
823
|
}
|
|
805
824
|
),
|
|
806
|
-
/* @__PURE__ */ (0,
|
|
825
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
807
826
|
"div",
|
|
808
827
|
{
|
|
809
828
|
className: "absolute bottom-4 right-4 pointer-events-none",
|
|
@@ -815,7 +834,7 @@ var init_HlsPlayer = __esm({
|
|
|
815
834
|
transition: "opacity 0.3s ease"
|
|
816
835
|
},
|
|
817
836
|
children: [
|
|
818
|
-
showMuteButton && /* @__PURE__ */ (0,
|
|
837
|
+
showMuteButton && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
819
838
|
"button",
|
|
820
839
|
{
|
|
821
840
|
type: "button",
|
|
@@ -825,18 +844,18 @@ var init_HlsPlayer = __esm({
|
|
|
825
844
|
handleMuteToggle();
|
|
826
845
|
},
|
|
827
846
|
style: iconButtonStyle,
|
|
828
|
-
children: isMuted ? /* @__PURE__ */ (0,
|
|
829
|
-
/* @__PURE__ */ (0,
|
|
830
|
-
/* @__PURE__ */ (0,
|
|
831
|
-
/* @__PURE__ */ (0,
|
|
832
|
-
] }) : /* @__PURE__ */ (0,
|
|
833
|
-
/* @__PURE__ */ (0,
|
|
834
|
-
/* @__PURE__ */ (0,
|
|
835
|
-
/* @__PURE__ */ (0,
|
|
847
|
+
children: isMuted ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("svg", { width: iconSvgSize, height: iconSvgSize, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
848
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("path", { d: "M11 5L6 9H2v6h4l5 4V5Z", fill: "white" }),
|
|
849
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("line", { x1: "23", y1: "9", x2: "17", y2: "15", stroke: "white", strokeWidth: "2", strokeLinecap: "round" }),
|
|
850
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("line", { x1: "17", y1: "9", x2: "23", y2: "15", stroke: "white", strokeWidth: "2", strokeLinecap: "round" })
|
|
851
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("svg", { width: iconSvgSize, height: iconSvgSize, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
852
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("path", { d: "M11 5L6 9H2v6h4l5 4V5Z", fill: "white" }),
|
|
853
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("path", { d: "M15.54 8.46a5 5 0 0 1 0 7.07", stroke: "white", strokeWidth: "2", strokeLinecap: "round" }),
|
|
854
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14", stroke: "white", strokeWidth: "2", strokeLinecap: "round" })
|
|
836
855
|
] })
|
|
837
856
|
}
|
|
838
857
|
),
|
|
839
|
-
showExpandButton && /* @__PURE__ */ (0,
|
|
858
|
+
showExpandButton && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
840
859
|
"button",
|
|
841
860
|
{
|
|
842
861
|
type: "button",
|
|
@@ -846,7 +865,7 @@ var init_HlsPlayer = __esm({
|
|
|
846
865
|
handleFullscreenToggle();
|
|
847
866
|
},
|
|
848
867
|
style: iconButtonStyle,
|
|
849
|
-
children: isFullscreen ? /* @__PURE__ */ (0,
|
|
868
|
+
children: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("svg", { width: iconSvgSize, height: iconSvgSize, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("path", { d: "M8 3v5H3M21 8h-5V3M3 16h5v5M16 21v-5h5", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("svg", { width: iconSvgSize, height: iconSvgSize, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("path", { d: "M3 8V3h5M16 3h5v5M21 16v5h-5M8 21H3v-5", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
850
869
|
}
|
|
851
870
|
)
|
|
852
871
|
]
|
|
@@ -1081,7 +1100,7 @@ var LinkNodeButton_exports = {};
|
|
|
1081
1100
|
__export(LinkNodeButton_exports, {
|
|
1082
1101
|
default: () => LinkNodeButton_default
|
|
1083
1102
|
});
|
|
1084
|
-
var import_react34,
|
|
1103
|
+
var import_react34, import_jsx_runtime45, LinkNodeButton, LinkNodeButton_default;
|
|
1085
1104
|
var init_LinkNodeButton = __esm({
|
|
1086
1105
|
"src/components/pageRenderingEngine/nodes/LinkNodeButton.tsx"() {
|
|
1087
1106
|
"use strict";
|
|
@@ -1090,7 +1109,7 @@ var init_LinkNodeButton = __esm({
|
|
|
1090
1109
|
init_Button();
|
|
1091
1110
|
init_ServiceClient();
|
|
1092
1111
|
init_ToastService();
|
|
1093
|
-
|
|
1112
|
+
import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1094
1113
|
LinkNodeButton = (props) => {
|
|
1095
1114
|
const { node, dataitem, children, linkText, linkType, linkUrl } = props;
|
|
1096
1115
|
const [isLoading, setIsLoading] = (0, import_react34.useState)(false);
|
|
@@ -1233,11 +1252,11 @@ var init_LinkNodeButton = __esm({
|
|
|
1233
1252
|
return children;
|
|
1234
1253
|
}
|
|
1235
1254
|
if (linkText) {
|
|
1236
|
-
return /* @__PURE__ */ (0,
|
|
1255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: linkText });
|
|
1237
1256
|
}
|
|
1238
1257
|
return node.title || "Button";
|
|
1239
1258
|
};
|
|
1240
|
-
return /* @__PURE__ */ (0,
|
|
1259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "link-button-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1241
1260
|
Button_default,
|
|
1242
1261
|
{
|
|
1243
1262
|
ButtonType: linkType,
|
|
@@ -1275,13 +1294,13 @@ function CopyButton({ text }) {
|
|
|
1275
1294
|
console.error("Failed to copy: ", err);
|
|
1276
1295
|
}
|
|
1277
1296
|
};
|
|
1278
|
-
return /* @__PURE__ */ (0,
|
|
1297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
1279
1298
|
"button",
|
|
1280
1299
|
{
|
|
1281
1300
|
onClick: handleCopy,
|
|
1282
1301
|
className: "flex gap-1 items-center hover:text-white transition",
|
|
1283
1302
|
children: [
|
|
1284
|
-
/* @__PURE__ */ (0,
|
|
1303
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
1285
1304
|
"svg",
|
|
1286
1305
|
{
|
|
1287
1306
|
width: "16",
|
|
@@ -1289,7 +1308,7 @@ function CopyButton({ text }) {
|
|
|
1289
1308
|
viewBox: "0 0 24 24",
|
|
1290
1309
|
className: "w-4 h-4",
|
|
1291
1310
|
fill: "currentColor",
|
|
1292
|
-
children: /* @__PURE__ */ (0,
|
|
1311
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
1293
1312
|
"path",
|
|
1294
1313
|
{
|
|
1295
1314
|
fillRule: "evenodd",
|
|
@@ -1304,54 +1323,54 @@ function CopyButton({ text }) {
|
|
|
1304
1323
|
}
|
|
1305
1324
|
);
|
|
1306
1325
|
}
|
|
1307
|
-
var import_react41,
|
|
1326
|
+
var import_react41, import_jsx_runtime55;
|
|
1308
1327
|
var init_CopyButton = __esm({
|
|
1309
1328
|
"src/components/CopyButton.tsx"() {
|
|
1310
1329
|
"use strict";
|
|
1311
1330
|
"use client";
|
|
1312
1331
|
import_react41 = require("react");
|
|
1313
|
-
|
|
1332
|
+
import_jsx_runtime55 = require("react/jsx-runtime");
|
|
1314
1333
|
}
|
|
1315
1334
|
});
|
|
1316
1335
|
|
|
1317
1336
|
// src/components/IFrameLoaderView.tsx
|
|
1318
|
-
var import_react45,
|
|
1337
|
+
var import_react45, import_jsx_runtime61, IFrameLoaderView, IFrameLoaderView_default;
|
|
1319
1338
|
var init_IFrameLoaderView = __esm({
|
|
1320
1339
|
"src/components/IFrameLoaderView.tsx"() {
|
|
1321
1340
|
"use strict";
|
|
1322
1341
|
import_react45 = __toESM(require("react"));
|
|
1323
|
-
|
|
1342
|
+
import_jsx_runtime61 = require("react/jsx-runtime");
|
|
1324
1343
|
IFrameLoaderView = (props) => {
|
|
1325
|
-
return /* @__PURE__ */ (0,
|
|
1326
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
1327
|
-
/* @__PURE__ */ (0,
|
|
1328
|
-
/* @__PURE__ */ (0,
|
|
1329
|
-
/* @__PURE__ */ (0,
|
|
1330
|
-
/* @__PURE__ */ (0,
|
|
1331
|
-
/* @__PURE__ */ (0,
|
|
1344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_react45.default.Fragment, { children: [
|
|
1345
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
1346
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
1347
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
1348
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "ml-2", children: [
|
|
1349
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
1350
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
1332
1351
|
] })
|
|
1333
1352
|
] }),
|
|
1334
|
-
/* @__PURE__ */ (0,
|
|
1335
|
-
/* @__PURE__ */ (0,
|
|
1336
|
-
/* @__PURE__ */ (0,
|
|
1337
|
-
/* @__PURE__ */ (0,
|
|
1338
|
-
/* @__PURE__ */ (0,
|
|
1339
|
-
/* @__PURE__ */ (0,
|
|
1340
|
-
/* @__PURE__ */ (0,
|
|
1353
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
1354
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "animate-pulse", children: [
|
|
1355
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
1356
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
1357
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
1358
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
1359
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
1341
1360
|
] }),
|
|
1342
|
-
/* @__PURE__ */ (0,
|
|
1343
|
-
/* @__PURE__ */ (0,
|
|
1344
|
-
/* @__PURE__ */ (0,
|
|
1345
|
-
/* @__PURE__ */ (0,
|
|
1346
|
-
/* @__PURE__ */ (0,
|
|
1347
|
-
/* @__PURE__ */ (0,
|
|
1361
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "animate-pulse", children: [
|
|
1362
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
1363
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
1364
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
1365
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
1366
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
1348
1367
|
] }),
|
|
1349
|
-
/* @__PURE__ */ (0,
|
|
1350
|
-
/* @__PURE__ */ (0,
|
|
1351
|
-
/* @__PURE__ */ (0,
|
|
1352
|
-
/* @__PURE__ */ (0,
|
|
1353
|
-
/* @__PURE__ */ (0,
|
|
1354
|
-
/* @__PURE__ */ (0,
|
|
1368
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "animate-pulse", children: [
|
|
1369
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
1370
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
1371
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
1372
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
1373
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
1355
1374
|
] })
|
|
1356
1375
|
] })
|
|
1357
1376
|
] }) }),
|
|
@@ -1367,14 +1386,14 @@ var IframeClient_exports = {};
|
|
|
1367
1386
|
__export(IframeClient_exports, {
|
|
1368
1387
|
default: () => IframeClient_default
|
|
1369
1388
|
});
|
|
1370
|
-
var import_react46,
|
|
1389
|
+
var import_react46, import_jsx_runtime62, IframeClient, IframeClient_default;
|
|
1371
1390
|
var init_IframeClient = __esm({
|
|
1372
1391
|
"src/components/pageRenderingEngine/nodes/IframeClient.tsx"() {
|
|
1373
1392
|
"use strict";
|
|
1374
1393
|
"use client";
|
|
1375
1394
|
import_react46 = __toESM(require("react"));
|
|
1376
1395
|
init_IFrameLoaderView();
|
|
1377
|
-
|
|
1396
|
+
import_jsx_runtime62 = require("react/jsx-runtime");
|
|
1378
1397
|
IframeClient = ({ src }) => {
|
|
1379
1398
|
const iframeRef = (0, import_react46.useRef)(null);
|
|
1380
1399
|
const [iframeHeight, setIframeHeight] = (0, import_react46.useState)("100%");
|
|
@@ -1406,7 +1425,7 @@ var init_IframeClient = __esm({
|
|
|
1406
1425
|
const handleIframeLoad = () => {
|
|
1407
1426
|
setIsDataFound(true);
|
|
1408
1427
|
};
|
|
1409
|
-
return /* @__PURE__ */ (0,
|
|
1428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react46.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
1410
1429
|
"iframe",
|
|
1411
1430
|
{
|
|
1412
1431
|
ref: iframeRef,
|
|
@@ -1622,8 +1641,15 @@ var AiGeneratedSummary = (props) => {
|
|
|
1622
1641
|
};
|
|
1623
1642
|
var AiGeneratedSummary_default = AiGeneratedSummary;
|
|
1624
1643
|
|
|
1644
|
+
// src/components/controls/view/DateTimeVew.tsx
|
|
1645
|
+
var import_dynamic2 = __toESM(require("next/dynamic"));
|
|
1646
|
+
var DateTimeView = (0, import_dynamic2.default)(() => Promise.resolve().then(() => (init_DateTimeViewClient(), DateTimeViewClient_exports)), {
|
|
1647
|
+
ssr: false
|
|
1648
|
+
});
|
|
1649
|
+
var DateTimeVew_default = DateTimeView;
|
|
1650
|
+
|
|
1625
1651
|
// src/components/controls/view/ViewControl.tsx
|
|
1626
|
-
var
|
|
1652
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1627
1653
|
var ViewControl = (props) => {
|
|
1628
1654
|
const ControlComponents = {
|
|
1629
1655
|
[ViewControlTypes_default.lineText]: LineTextView_default,
|
|
@@ -1633,7 +1659,7 @@ var ViewControl = (props) => {
|
|
|
1633
1659
|
[ViewControlTypes_default.money]: MoneyView_default,
|
|
1634
1660
|
[ViewControlTypes_default.date]: DateView_default,
|
|
1635
1661
|
[ViewControlTypes_default.time]: DateView_default,
|
|
1636
|
-
[ViewControlTypes_default.datetime]:
|
|
1662
|
+
[ViewControlTypes_default.datetime]: DateTimeVew_default,
|
|
1637
1663
|
[ViewControlTypes_default.number]: NumberView_default,
|
|
1638
1664
|
[ViewControlTypes_default.multilineText]: MultilineTextView_default,
|
|
1639
1665
|
[ViewControlTypes_default.moneyText]: MoneyView_default,
|
|
@@ -1645,7 +1671,7 @@ var ViewControl = (props) => {
|
|
|
1645
1671
|
[ViewControlTypes_default.aiGeneratedSummary]: AiGeneratedSummary_default
|
|
1646
1672
|
};
|
|
1647
1673
|
const SelectedControlComponent = props.controlType ? ControlComponents[props.controlType] : void 0;
|
|
1648
|
-
return /* @__PURE__ */ (0,
|
|
1674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react10.default.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
1649
1675
|
};
|
|
1650
1676
|
var ViewControl_default = ViewControl;
|
|
1651
1677
|
|
|
@@ -1654,7 +1680,7 @@ var import_react31 = __toESM(require("react"));
|
|
|
1654
1680
|
|
|
1655
1681
|
// src/components/controls/edit/MultilineTextInput.tsx
|
|
1656
1682
|
var import_react11 = __toESM(require("react"));
|
|
1657
|
-
var
|
|
1683
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1658
1684
|
var MultilineTextInput = (props) => {
|
|
1659
1685
|
const textChangeHandler = (event) => {
|
|
1660
1686
|
const text = event.target.value;
|
|
@@ -1673,11 +1699,11 @@ var MultilineTextInput = (props) => {
|
|
|
1673
1699
|
if (props.value !== void 0 && props.value !== null) {
|
|
1674
1700
|
value = props.value;
|
|
1675
1701
|
}
|
|
1676
|
-
return /* @__PURE__ */ (0,
|
|
1677
|
-
/* @__PURE__ */ (0,
|
|
1702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react11.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: "block mb-1", children: [
|
|
1703
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1678
1704
|
" ",
|
|
1679
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1680
|
-
/* @__PURE__ */ (0,
|
|
1705
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1706
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1681
1707
|
"textarea",
|
|
1682
1708
|
{
|
|
1683
1709
|
name: props.name,
|
|
@@ -1694,14 +1720,14 @@ var MultilineTextInput = (props) => {
|
|
|
1694
1720
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm input"
|
|
1695
1721
|
}
|
|
1696
1722
|
),
|
|
1697
|
-
/* @__PURE__ */ (0,
|
|
1723
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1698
1724
|
] }) });
|
|
1699
1725
|
};
|
|
1700
1726
|
var MultilineTextInput_default = MultilineTextInput;
|
|
1701
1727
|
|
|
1702
1728
|
// src/components/controls/edit/LineTextInput.tsx
|
|
1703
1729
|
var import_react12 = __toESM(require("react"));
|
|
1704
|
-
var
|
|
1730
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1705
1731
|
var LineTextInput = (props) => {
|
|
1706
1732
|
const textChangeHandler = (event) => {
|
|
1707
1733
|
const text = event.target.value;
|
|
@@ -1720,11 +1746,11 @@ var LineTextInput = (props) => {
|
|
|
1720
1746
|
if (props.value !== void 0 && props.value !== null) {
|
|
1721
1747
|
value = props.value;
|
|
1722
1748
|
}
|
|
1723
|
-
return /* @__PURE__ */ (0,
|
|
1724
|
-
props?.attributes?.label && /* @__PURE__ */ (0,
|
|
1749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react12.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("label", { className: "block", children: [
|
|
1750
|
+
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
1725
1751
|
" ",
|
|
1726
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1727
|
-
/* @__PURE__ */ (0,
|
|
1752
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1753
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1728
1754
|
"input",
|
|
1729
1755
|
{
|
|
1730
1756
|
type: "text",
|
|
@@ -1744,14 +1770,14 @@ var LineTextInput = (props) => {
|
|
|
1744
1770
|
`
|
|
1745
1771
|
}
|
|
1746
1772
|
),
|
|
1747
|
-
/* @__PURE__ */ (0,
|
|
1773
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1748
1774
|
] }) });
|
|
1749
1775
|
};
|
|
1750
1776
|
var LineTextInput_default = LineTextInput;
|
|
1751
1777
|
|
|
1752
1778
|
// src/components/controls/edit/MoneyInput.tsx
|
|
1753
1779
|
var import_react13 = __toESM(require("react"));
|
|
1754
|
-
var
|
|
1780
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1755
1781
|
var MoneyInput = (props) => {
|
|
1756
1782
|
const textChangeHandler = (event) => {
|
|
1757
1783
|
const rawValue = event.target.value;
|
|
@@ -1780,11 +1806,11 @@ var MoneyInput = (props) => {
|
|
|
1780
1806
|
e.preventDefault();
|
|
1781
1807
|
}
|
|
1782
1808
|
};
|
|
1783
|
-
return /* @__PURE__ */ (0,
|
|
1784
|
-
/* @__PURE__ */ (0,
|
|
1809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react13.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { className: "block mb-1", children: [
|
|
1810
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1785
1811
|
" ",
|
|
1786
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1787
|
-
/* @__PURE__ */ (0,
|
|
1812
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1813
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1788
1814
|
"input",
|
|
1789
1815
|
{
|
|
1790
1816
|
type: "number",
|
|
@@ -1804,7 +1830,7 @@ var MoneyInput = (props) => {
|
|
|
1804
1830
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm number-input"
|
|
1805
1831
|
}
|
|
1806
1832
|
),
|
|
1807
|
-
/* @__PURE__ */ (0,
|
|
1833
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1808
1834
|
] }) });
|
|
1809
1835
|
};
|
|
1810
1836
|
var MoneyInput_default = MoneyInput;
|
|
@@ -1836,7 +1862,7 @@ var InputControlType_default = InputControlType;
|
|
|
1836
1862
|
|
|
1837
1863
|
// src/components/controls/edit/Select.tsx
|
|
1838
1864
|
var import_react14 = require("react");
|
|
1839
|
-
var
|
|
1865
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1840
1866
|
var Select = (props) => {
|
|
1841
1867
|
const [list, setList] = (0, import_react14.useState)([]);
|
|
1842
1868
|
const getSafeValue = (val) => {
|
|
@@ -1894,11 +1920,11 @@ var Select = (props) => {
|
|
|
1894
1920
|
props.dataSourceDependsOn
|
|
1895
1921
|
]);
|
|
1896
1922
|
const value = getSafeValue(props.value);
|
|
1897
|
-
return /* @__PURE__ */ (0,
|
|
1898
|
-
props.attributes?.label && /* @__PURE__ */ (0,
|
|
1923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { className: "block", children: [
|
|
1924
|
+
props.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "text-sm font-medium inline-block pb-1", children: props.attributes?.label }),
|
|
1899
1925
|
" ",
|
|
1900
|
-
props.attributes?.label && props.attributes?.required && /* @__PURE__ */ (0,
|
|
1901
|
-
/* @__PURE__ */ (0,
|
|
1926
|
+
props.attributes?.label && props.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1927
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1902
1928
|
"select",
|
|
1903
1929
|
{
|
|
1904
1930
|
name: props.name,
|
|
@@ -1909,23 +1935,23 @@ var Select = (props) => {
|
|
|
1909
1935
|
disabled: props.attributes?.readOnly,
|
|
1910
1936
|
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",
|
|
1911
1937
|
children: [
|
|
1912
|
-
/* @__PURE__ */ (0,
|
|
1938
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "", children: props.attributes?.placeholder || "Select" }),
|
|
1913
1939
|
list.map((item, index) => {
|
|
1914
1940
|
const keyField = props.dataKeyFieldName;
|
|
1915
1941
|
const textField = props.dataTextFieldName;
|
|
1916
|
-
return /* @__PURE__ */ (0,
|
|
1942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: item[keyField], children: item[textField] }, index);
|
|
1917
1943
|
})
|
|
1918
1944
|
]
|
|
1919
1945
|
}
|
|
1920
1946
|
),
|
|
1921
|
-
/* @__PURE__ */ (0,
|
|
1947
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props.attributes?.errorMessage || "" })
|
|
1922
1948
|
] });
|
|
1923
1949
|
};
|
|
1924
1950
|
var Select_default = Select;
|
|
1925
1951
|
|
|
1926
1952
|
// src/components/controls/edit/PercentageInput.tsx
|
|
1927
1953
|
var import_react15 = __toESM(require("react"));
|
|
1928
|
-
var
|
|
1954
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1929
1955
|
var PercentageInput = (props) => {
|
|
1930
1956
|
const textChangeHandler = (event) => {
|
|
1931
1957
|
const rawValue = event.target.value;
|
|
@@ -1954,11 +1980,11 @@ var PercentageInput = (props) => {
|
|
|
1954
1980
|
e.preventDefault();
|
|
1955
1981
|
}
|
|
1956
1982
|
};
|
|
1957
|
-
return /* @__PURE__ */ (0,
|
|
1958
|
-
/* @__PURE__ */ (0,
|
|
1983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react15.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: "block mb-1", children: [
|
|
1984
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label ? props?.attributes?.label + " %" : "" }),
|
|
1959
1985
|
" ",
|
|
1960
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1961
|
-
/* @__PURE__ */ (0,
|
|
1986
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1987
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1962
1988
|
"input",
|
|
1963
1989
|
{
|
|
1964
1990
|
type: "number",
|
|
@@ -1977,14 +2003,14 @@ var PercentageInput = (props) => {
|
|
|
1977
2003
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm number-input"
|
|
1978
2004
|
}
|
|
1979
2005
|
),
|
|
1980
|
-
/* @__PURE__ */ (0,
|
|
2006
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1981
2007
|
] }) });
|
|
1982
2008
|
};
|
|
1983
2009
|
var PercentageInput_default = PercentageInput;
|
|
1984
2010
|
|
|
1985
2011
|
// src/components/controls/edit/PhoneInput.tsx
|
|
1986
2012
|
var import_react16 = __toESM(require("react"));
|
|
1987
|
-
var
|
|
2013
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1988
2014
|
var PhoneInput = (props) => {
|
|
1989
2015
|
const textChangeHandler = (event) => {
|
|
1990
2016
|
const text = event.target.value;
|
|
@@ -2003,13 +2029,13 @@ var PhoneInput = (props) => {
|
|
|
2003
2029
|
if (props.value !== void 0 && props.value !== null) {
|
|
2004
2030
|
value = props.value;
|
|
2005
2031
|
}
|
|
2006
|
-
return /* @__PURE__ */ (0,
|
|
2007
|
-
/* @__PURE__ */ (0,
|
|
2032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react16.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("label", { className: "block mb-1", children: [
|
|
2033
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
2008
2034
|
" ",
|
|
2009
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2010
|
-
/* @__PURE__ */ (0,
|
|
2011
|
-
/* @__PURE__ */ (0,
|
|
2012
|
-
/* @__PURE__ */ (0,
|
|
2035
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2036
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center rounded border ", children: [
|
|
2037
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "px-3", children: props.prefix }),
|
|
2038
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2013
2039
|
"input",
|
|
2014
2040
|
{
|
|
2015
2041
|
type: "text",
|
|
@@ -2027,14 +2053,14 @@ var PhoneInput = (props) => {
|
|
|
2027
2053
|
}
|
|
2028
2054
|
)
|
|
2029
2055
|
] }),
|
|
2030
|
-
/* @__PURE__ */ (0,
|
|
2056
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
2031
2057
|
] }) });
|
|
2032
2058
|
};
|
|
2033
2059
|
var PhoneInput_default = PhoneInput;
|
|
2034
2060
|
|
|
2035
2061
|
// src/components/controls/edit/NumberInput.tsx
|
|
2036
2062
|
var import_react17 = __toESM(require("react"));
|
|
2037
|
-
var
|
|
2063
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2038
2064
|
var NumberInput = (props) => {
|
|
2039
2065
|
const textChangeHandler = (event) => {
|
|
2040
2066
|
const text = event.target.value;
|
|
@@ -2057,11 +2083,11 @@ var NumberInput = (props) => {
|
|
|
2057
2083
|
if (props.value !== void 0 && props.value !== null) {
|
|
2058
2084
|
value = props.value;
|
|
2059
2085
|
}
|
|
2060
|
-
return /* @__PURE__ */ (0,
|
|
2061
|
-
props?.attributes?.label && /* @__PURE__ */ (0,
|
|
2086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react17.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { className: "block", children: [
|
|
2087
|
+
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
2062
2088
|
" ",
|
|
2063
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2064
|
-
/* @__PURE__ */ (0,
|
|
2089
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2090
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2065
2091
|
"input",
|
|
2066
2092
|
{
|
|
2067
2093
|
type: "number",
|
|
@@ -2080,14 +2106,14 @@ var NumberInput = (props) => {
|
|
|
2080
2106
|
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 "
|
|
2081
2107
|
}
|
|
2082
2108
|
),
|
|
2083
|
-
/* @__PURE__ */ (0,
|
|
2109
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
2084
2110
|
] }) });
|
|
2085
2111
|
};
|
|
2086
2112
|
var NumberInput_default = NumberInput;
|
|
2087
2113
|
|
|
2088
2114
|
// src/components/controls/edit/CheckboxInput.tsx
|
|
2089
2115
|
var import_react18 = __toESM(require("react"));
|
|
2090
|
-
var
|
|
2116
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2091
2117
|
var CheckboxInput = (props) => {
|
|
2092
2118
|
const textChangeHandler = (event) => {
|
|
2093
2119
|
let text = event.target.checked;
|
|
@@ -2104,11 +2130,11 @@ var CheckboxInput = (props) => {
|
|
|
2104
2130
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
2105
2131
|
value = true;
|
|
2106
2132
|
}
|
|
2107
|
-
return /* @__PURE__ */ (0,
|
|
2108
|
-
/* @__PURE__ */ (0,
|
|
2133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react18.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { className: "inline-block mb-1", children: [
|
|
2134
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
2109
2135
|
" ",
|
|
2110
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2111
|
-
/* @__PURE__ */ (0,
|
|
2136
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2137
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2112
2138
|
"input",
|
|
2113
2139
|
{
|
|
2114
2140
|
type: "checkbox",
|
|
@@ -2125,14 +2151,14 @@ var CheckboxInput = (props) => {
|
|
|
2125
2151
|
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 "
|
|
2126
2152
|
}
|
|
2127
2153
|
),
|
|
2128
|
-
/* @__PURE__ */ (0,
|
|
2154
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
2129
2155
|
] }) });
|
|
2130
2156
|
};
|
|
2131
2157
|
var CheckboxInput_default = CheckboxInput;
|
|
2132
2158
|
|
|
2133
2159
|
// src/components/controls/edit/OtpInput.tsx
|
|
2134
2160
|
var import_react19 = __toESM(require("react"));
|
|
2135
|
-
var
|
|
2161
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2136
2162
|
var OtpInput = (props) => {
|
|
2137
2163
|
const textChangeHandler = (event) => {
|
|
2138
2164
|
const text = event.target.value;
|
|
@@ -2154,11 +2180,11 @@ var OtpInput = (props) => {
|
|
|
2154
2180
|
if (props.value !== void 0 && props.value !== null) {
|
|
2155
2181
|
value = props.value;
|
|
2156
2182
|
}
|
|
2157
|
-
return /* @__PURE__ */ (0,
|
|
2158
|
-
/* @__PURE__ */ (0,
|
|
2183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react19.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("label", { htmlFor: props.name, className: "block mb-1 w-full", children: [
|
|
2184
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
2159
2185
|
" ",
|
|
2160
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2161
|
-
/* @__PURE__ */ (0,
|
|
2186
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2187
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2162
2188
|
"input",
|
|
2163
2189
|
{
|
|
2164
2190
|
type: "text",
|
|
@@ -2178,14 +2204,14 @@ var OtpInput = (props) => {
|
|
|
2178
2204
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm tracking-[1.25em] text-center"
|
|
2179
2205
|
}
|
|
2180
2206
|
),
|
|
2181
|
-
/* @__PURE__ */ (0,
|
|
2207
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
2182
2208
|
] }) });
|
|
2183
2209
|
};
|
|
2184
2210
|
var OtpInput_default = OtpInput;
|
|
2185
2211
|
|
|
2186
2212
|
// src/components/controls/edit/DateTimeInput.tsx
|
|
2187
2213
|
var import_react20 = __toESM(require("react"));
|
|
2188
|
-
var
|
|
2214
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2189
2215
|
var DateTimeInput = (props) => {
|
|
2190
2216
|
const textChangeHandler = (event) => {
|
|
2191
2217
|
const localDate = new Date(event.target.value);
|
|
@@ -2217,12 +2243,12 @@ var DateTimeInput = (props) => {
|
|
|
2217
2243
|
e.preventDefault();
|
|
2218
2244
|
}
|
|
2219
2245
|
};
|
|
2220
|
-
return /* @__PURE__ */ (0,
|
|
2221
|
-
/* @__PURE__ */ (0,
|
|
2246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react20.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { className: "block mb-1", children: [
|
|
2247
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
2222
2248
|
" ",
|
|
2223
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2224
|
-
/* @__PURE__ */ (0,
|
|
2225
|
-
/* @__PURE__ */ (0,
|
|
2249
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2250
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
2251
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2226
2252
|
"input",
|
|
2227
2253
|
{
|
|
2228
2254
|
type: "datetime-local",
|
|
@@ -2240,16 +2266,16 @@ var DateTimeInput = (props) => {
|
|
|
2240
2266
|
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 "
|
|
2241
2267
|
}
|
|
2242
2268
|
),
|
|
2243
|
-
/* @__PURE__ */ (0,
|
|
2269
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: timeZoneAbbr })
|
|
2244
2270
|
] }),
|
|
2245
|
-
/* @__PURE__ */ (0,
|
|
2271
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
2246
2272
|
] }) });
|
|
2247
2273
|
};
|
|
2248
2274
|
var DateTimeInput_default = DateTimeInput;
|
|
2249
2275
|
|
|
2250
2276
|
// src/components/controls/edit/ColorInput.tsx
|
|
2251
2277
|
var import_react21 = __toESM(require("react"));
|
|
2252
|
-
var
|
|
2278
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2253
2279
|
var ColorInput = (props) => {
|
|
2254
2280
|
const [color, setColor] = import_react21.default.useState("#3b82f6");
|
|
2255
2281
|
(0, import_react21.useEffect)(() => {
|
|
@@ -2271,11 +2297,11 @@ var ColorInput = (props) => {
|
|
|
2271
2297
|
});
|
|
2272
2298
|
}
|
|
2273
2299
|
};
|
|
2274
|
-
return /* @__PURE__ */ (0,
|
|
2275
|
-
/* @__PURE__ */ (0,
|
|
2300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { className: "block mb-1", children: [
|
|
2301
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
2276
2302
|
" ",
|
|
2277
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2278
|
-
/* @__PURE__ */ (0,
|
|
2303
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2304
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2279
2305
|
"input",
|
|
2280
2306
|
{
|
|
2281
2307
|
type: "color",
|
|
@@ -2288,14 +2314,14 @@ var ColorInput = (props) => {
|
|
|
2288
2314
|
className: `w-[78px] h-12 block cursor-pointer`
|
|
2289
2315
|
}
|
|
2290
2316
|
),
|
|
2291
|
-
props?.attributes?.errorMessage && /* @__PURE__ */ (0,
|
|
2317
|
+
props?.attributes?.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "mt-1 bg-error-weak text-sm", children: props.attributes.errorMessage })
|
|
2292
2318
|
] });
|
|
2293
2319
|
};
|
|
2294
2320
|
var ColorInput_default = ColorInput;
|
|
2295
2321
|
|
|
2296
2322
|
// src/components/controls/edit/SelectWithSearchInput.tsx
|
|
2297
2323
|
var import_react22 = require("react");
|
|
2298
|
-
var
|
|
2324
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2299
2325
|
var SelectWithSearchInput = (props) => {
|
|
2300
2326
|
const [isOpen, setIsOpen] = (0, import_react22.useState)(false);
|
|
2301
2327
|
const [searchTerm, setSearchTerm] = (0, import_react22.useState)("");
|
|
@@ -2366,15 +2392,15 @@ var SelectWithSearchInput = (props) => {
|
|
|
2366
2392
|
});
|
|
2367
2393
|
}
|
|
2368
2394
|
}, [highlightedIndex]);
|
|
2369
|
-
return /* @__PURE__ */ (0,
|
|
2370
|
-
/* @__PURE__ */ (0,
|
|
2395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "relative", children: [
|
|
2396
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { children: [
|
|
2371
2397
|
props.attributes?.label,
|
|
2372
2398
|
" ",
|
|
2373
2399
|
" ",
|
|
2374
|
-
props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2400
|
+
props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "bg-error-weak", children: "*" })
|
|
2375
2401
|
] }),
|
|
2376
|
-
/* @__PURE__ */ (0,
|
|
2377
|
-
/* @__PURE__ */ (0,
|
|
2402
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "relative", children: [
|
|
2403
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2378
2404
|
"input",
|
|
2379
2405
|
{
|
|
2380
2406
|
type: "text",
|
|
@@ -2390,13 +2416,13 @@ var SelectWithSearchInput = (props) => {
|
|
|
2390
2416
|
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 "
|
|
2391
2417
|
}
|
|
2392
2418
|
),
|
|
2393
|
-
/* @__PURE__ */ (0,
|
|
2419
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2394
2420
|
"button",
|
|
2395
2421
|
{
|
|
2396
2422
|
type: "button",
|
|
2397
2423
|
onClick: () => setIsOpen(!isOpen),
|
|
2398
2424
|
className: "absolute right-2 top-3 h-5 w-5 text-gray-500 focus:outline-none",
|
|
2399
|
-
children: /* @__PURE__ */ (0,
|
|
2425
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2400
2426
|
"svg",
|
|
2401
2427
|
{
|
|
2402
2428
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2405,7 +2431,7 @@ var SelectWithSearchInput = (props) => {
|
|
|
2405
2431
|
strokeWidth: 1.5,
|
|
2406
2432
|
stroke: "currentColor",
|
|
2407
2433
|
className: "w-full h-full",
|
|
2408
|
-
children: /* @__PURE__ */ (0,
|
|
2434
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2409
2435
|
"path",
|
|
2410
2436
|
{
|
|
2411
2437
|
strokeLinecap: "round",
|
|
@@ -2418,12 +2444,12 @@ var SelectWithSearchInput = (props) => {
|
|
|
2418
2444
|
}
|
|
2419
2445
|
)
|
|
2420
2446
|
] }),
|
|
2421
|
-
isOpen && /* @__PURE__ */ (0,
|
|
2447
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2422
2448
|
"div",
|
|
2423
2449
|
{
|
|
2424
2450
|
ref: dropdownRef,
|
|
2425
2451
|
className: "absolute z-10 mt-2 w-full bg-white border border-gray-200 rounded-md shadow-lg max-h-48 overflow-y-auto",
|
|
2426
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ (0,
|
|
2452
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2427
2453
|
"button",
|
|
2428
2454
|
{
|
|
2429
2455
|
onClick: (e) => handleSelect(e, item),
|
|
@@ -2431,10 +2457,10 @@ var SelectWithSearchInput = (props) => {
|
|
|
2431
2457
|
role: "option",
|
|
2432
2458
|
tabIndex: -1,
|
|
2433
2459
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
2434
|
-
children: /* @__PURE__ */ (0,
|
|
2460
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: item[props.dataTextFieldName] })
|
|
2435
2461
|
},
|
|
2436
2462
|
item[props.dataKeyFieldName]
|
|
2437
|
-
)) : /* @__PURE__ */ (0,
|
|
2463
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
2438
2464
|
}
|
|
2439
2465
|
)
|
|
2440
2466
|
] });
|
|
@@ -2444,7 +2470,7 @@ var SelectWithSearchInput_default = SelectWithSearchInput;
|
|
|
2444
2470
|
// src/components/controls/edit/SelectWithSearchPanel.tsx
|
|
2445
2471
|
init_Button();
|
|
2446
2472
|
var import_react26 = __toESM(require("react"));
|
|
2447
|
-
var
|
|
2473
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2448
2474
|
var SelectWithSearchPanel = (props) => {
|
|
2449
2475
|
const [isOpen, setIsOpen] = (0, import_react26.useState)(false);
|
|
2450
2476
|
const [searchTerm, setSearchTerm] = (0, import_react26.useState)("");
|
|
@@ -2580,14 +2606,14 @@ var SelectWithSearchPanel = (props) => {
|
|
|
2580
2606
|
console.log("Form Data:", formData);
|
|
2581
2607
|
return formData;
|
|
2582
2608
|
}, []);
|
|
2583
|
-
return /* @__PURE__ */ (0,
|
|
2584
|
-
/* @__PURE__ */ (0,
|
|
2609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "relative", children: [
|
|
2610
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("label", { className: "text-sm mb-1 font-medium", children: [
|
|
2585
2611
|
props.attributes?.label,
|
|
2586
2612
|
" ",
|
|
2587
2613
|
" ",
|
|
2588
|
-
props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2614
|
+
props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "bg-error-weak", children: "*" })
|
|
2589
2615
|
] }),
|
|
2590
|
-
/* @__PURE__ */ (0,
|
|
2616
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2591
2617
|
"input",
|
|
2592
2618
|
{
|
|
2593
2619
|
type: "text",
|
|
@@ -2601,14 +2627,14 @@ var SelectWithSearchPanel = (props) => {
|
|
|
2601
2627
|
disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none`
|
|
2602
2628
|
}
|
|
2603
2629
|
) }),
|
|
2604
|
-
/* @__PURE__ */ (0,
|
|
2605
|
-
/* @__PURE__ */ (0,
|
|
2606
|
-
/* @__PURE__ */ (0,
|
|
2630
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { ref: containerRef, children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react26.default.Fragment, { children: [
|
|
2631
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "fixed z-50 right-0 bg-white top-[62px] w-1/4 border-l border-gray-200", children: [
|
|
2632
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex flex-col p-2 bg-accent-950 text-white", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("h5", { className: "text-md text-white font-medium", children: [
|
|
2607
2633
|
"Select a",
|
|
2608
2634
|
" ",
|
|
2609
2635
|
props.attributes?.label || props.attributes?.heading
|
|
2610
2636
|
] }) }),
|
|
2611
|
-
/* @__PURE__ */ (0,
|
|
2637
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex justify-end px-4 border-b py-2 border-gray-200 h-10", children: props.createFields && props.createFields.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2612
2638
|
"button",
|
|
2613
2639
|
{
|
|
2614
2640
|
type: "button",
|
|
@@ -2621,12 +2647,12 @@ var SelectWithSearchPanel = (props) => {
|
|
|
2621
2647
|
}
|
|
2622
2648
|
) })
|
|
2623
2649
|
] }),
|
|
2624
|
-
isCreateOpen && /* @__PURE__ */ (0,
|
|
2625
|
-
/* @__PURE__ */ (0,
|
|
2650
|
+
isCreateOpen && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "fixed right-0 w-1/4 h-full top-[62px] bg-white shadow-lg border-l border-gray-200 z-50", children: [
|
|
2651
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex flex-col p-2 bg-accent-950", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("h5", { className: "text-md font-medium text-white", children: [
|
|
2626
2652
|
"Create New ",
|
|
2627
2653
|
props.attributes?.label
|
|
2628
2654
|
] }) }),
|
|
2629
|
-
/* @__PURE__ */ (0,
|
|
2655
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex justify-end px-4 border-b py-2 border-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2630
2656
|
"button",
|
|
2631
2657
|
{
|
|
2632
2658
|
type: "button",
|
|
@@ -2635,10 +2661,10 @@ var SelectWithSearchPanel = (props) => {
|
|
|
2635
2661
|
children: "Close"
|
|
2636
2662
|
}
|
|
2637
2663
|
) }),
|
|
2638
|
-
/* @__PURE__ */ (0,
|
|
2639
|
-
props.createFields?.map((field) => /* @__PURE__ */ (0,
|
|
2640
|
-
/* @__PURE__ */ (0,
|
|
2641
|
-
/* @__PURE__ */ (0,
|
|
2664
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "p-4", children: [
|
|
2665
|
+
props.createFields?.map((field) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "mb-4", children: [
|
|
2666
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("label", { className: "text-sm mb-1 font-medium block", children: field.label }),
|
|
2667
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2642
2668
|
"input",
|
|
2643
2669
|
{
|
|
2644
2670
|
type: field.type,
|
|
@@ -2654,7 +2680,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
2654
2680
|
}
|
|
2655
2681
|
)
|
|
2656
2682
|
] }, field.name)),
|
|
2657
|
-
/* @__PURE__ */ (0,
|
|
2683
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Button_default, { onClick: async () => {
|
|
2658
2684
|
handleSaveModal();
|
|
2659
2685
|
return { isSuccessful: true };
|
|
2660
2686
|
}, className: "w-full", children: [
|
|
@@ -2663,13 +2689,13 @@ var SelectWithSearchPanel = (props) => {
|
|
|
2663
2689
|
] })
|
|
2664
2690
|
] })
|
|
2665
2691
|
] }),
|
|
2666
|
-
/* @__PURE__ */ (0,
|
|
2692
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2667
2693
|
"div",
|
|
2668
2694
|
{
|
|
2669
2695
|
ref: listRef,
|
|
2670
2696
|
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",
|
|
2671
2697
|
style: { height: "calc(100vh - 130px)" },
|
|
2672
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ (0,
|
|
2698
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2673
2699
|
"button",
|
|
2674
2700
|
{
|
|
2675
2701
|
onClick: (e) => {
|
|
@@ -2679,9 +2705,9 @@ var SelectWithSearchPanel = (props) => {
|
|
|
2679
2705
|
role: "option",
|
|
2680
2706
|
tabIndex: -1,
|
|
2681
2707
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
2682
|
-
children: /* @__PURE__ */ (0,
|
|
2708
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: getNestedValue3(item, props.dataTextFieldName) })
|
|
2683
2709
|
}
|
|
2684
|
-
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ (0,
|
|
2710
|
+
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
2685
2711
|
}
|
|
2686
2712
|
)
|
|
2687
2713
|
] }) })
|
|
@@ -2691,7 +2717,7 @@ var SelectWithSearchPanel_default = SelectWithSearchPanel;
|
|
|
2691
2717
|
|
|
2692
2718
|
// src/components/controls/edit/BooleanSelect.tsx
|
|
2693
2719
|
var import_react27 = __toESM(require("react"));
|
|
2694
|
-
var
|
|
2720
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2695
2721
|
var BooleanSelect = (props) => {
|
|
2696
2722
|
const [list, setList] = (0, import_react27.useState)();
|
|
2697
2723
|
const textChangeHandler = (event) => {
|
|
@@ -2740,11 +2766,11 @@ var BooleanSelect = (props) => {
|
|
|
2740
2766
|
if (props.value !== void 0 && props.value !== null) {
|
|
2741
2767
|
value = props.value;
|
|
2742
2768
|
}
|
|
2743
|
-
return /* @__PURE__ */ (0,
|
|
2744
|
-
/* @__PURE__ */ (0,
|
|
2769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react27.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("label", { className: "block", children: [
|
|
2770
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
2745
2771
|
" ",
|
|
2746
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2747
|
-
/* @__PURE__ */ (0,
|
|
2772
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2773
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2748
2774
|
"select",
|
|
2749
2775
|
{
|
|
2750
2776
|
name: props.name,
|
|
@@ -2756,9 +2782,9 @@ var BooleanSelect = (props) => {
|
|
|
2756
2782
|
disabled: props?.attributes?.readOnly,
|
|
2757
2783
|
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 ",
|
|
2758
2784
|
children: [
|
|
2759
|
-
/* @__PURE__ */ (0,
|
|
2785
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("option", { className: "", value: "", children: props.attributes?.placeholder || "Select" }),
|
|
2760
2786
|
list && list.map((item, i) => {
|
|
2761
|
-
return /* @__PURE__ */ (0,
|
|
2787
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2762
2788
|
"option",
|
|
2763
2789
|
{
|
|
2764
2790
|
className: "fac-select-option",
|
|
@@ -2771,14 +2797,14 @@ var BooleanSelect = (props) => {
|
|
|
2771
2797
|
]
|
|
2772
2798
|
}
|
|
2773
2799
|
),
|
|
2774
|
-
/* @__PURE__ */ (0,
|
|
2800
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
2775
2801
|
] }) });
|
|
2776
2802
|
};
|
|
2777
2803
|
var BooleanSelect_default = BooleanSelect;
|
|
2778
2804
|
|
|
2779
2805
|
// src/components/controls/edit/EmailInput.tsx
|
|
2780
2806
|
var import_react28 = __toESM(require("react"));
|
|
2781
|
-
var
|
|
2807
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2782
2808
|
var EmailInput = (props) => {
|
|
2783
2809
|
const textChangeHandler = (event) => {
|
|
2784
2810
|
const text = event.target.value;
|
|
@@ -2803,11 +2829,11 @@ var EmailInput = (props) => {
|
|
|
2803
2829
|
if (props.value !== void 0 && props.value !== null) {
|
|
2804
2830
|
value = props.value;
|
|
2805
2831
|
}
|
|
2806
|
-
return /* @__PURE__ */ (0,
|
|
2807
|
-
/* @__PURE__ */ (0,
|
|
2832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react28.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("label", { className: "block mb-1", children: [
|
|
2833
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-sm font-medium text-slate-700", children: props?.attributes?.label }),
|
|
2808
2834
|
" ",
|
|
2809
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2810
|
-
/* @__PURE__ */ (0,
|
|
2835
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2836
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2811
2837
|
"input",
|
|
2812
2838
|
{
|
|
2813
2839
|
type: "email",
|
|
@@ -2823,14 +2849,14 @@ var EmailInput = (props) => {
|
|
|
2823
2849
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n transition-all duration-500 ease-in-out"
|
|
2824
2850
|
}
|
|
2825
2851
|
),
|
|
2826
|
-
/* @__PURE__ */ (0,
|
|
2852
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 mb-0 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
2827
2853
|
] }) });
|
|
2828
2854
|
};
|
|
2829
2855
|
var EmailInput_default = EmailInput;
|
|
2830
2856
|
|
|
2831
2857
|
// src/components/controls/edit/TimeInput.tsx
|
|
2832
2858
|
var import_react29 = __toESM(require("react"));
|
|
2833
|
-
var
|
|
2859
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2834
2860
|
var TimeInput = (props) => {
|
|
2835
2861
|
const timeChangeHandler = (event) => {
|
|
2836
2862
|
const timeValue = event.target.value;
|
|
@@ -2843,11 +2869,11 @@ var TimeInput = (props) => {
|
|
|
2843
2869
|
});
|
|
2844
2870
|
}
|
|
2845
2871
|
};
|
|
2846
|
-
return /* @__PURE__ */ (0,
|
|
2847
|
-
/* @__PURE__ */ (0,
|
|
2872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react29.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("label", { className: "block mb-1", children: [
|
|
2873
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
2848
2874
|
" ",
|
|
2849
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2850
|
-
/* @__PURE__ */ (0,
|
|
2875
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2876
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2851
2877
|
"input",
|
|
2852
2878
|
{
|
|
2853
2879
|
type: "time",
|
|
@@ -2860,7 +2886,7 @@ var TimeInput = (props) => {
|
|
|
2860
2886
|
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"
|
|
2861
2887
|
}
|
|
2862
2888
|
) }),
|
|
2863
|
-
/* @__PURE__ */ (0,
|
|
2889
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ?? "" })
|
|
2864
2890
|
] }) });
|
|
2865
2891
|
};
|
|
2866
2892
|
var TimeInput_default = TimeInput;
|
|
@@ -2894,7 +2920,7 @@ var AssetUtility_default = AssetUtility;
|
|
|
2894
2920
|
// src/components/dataForm/Hyperlink.tsx
|
|
2895
2921
|
var import_link = __toESM(require("next/link"));
|
|
2896
2922
|
init_StyleTypes();
|
|
2897
|
-
var
|
|
2923
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2898
2924
|
function Hyperlink(props) {
|
|
2899
2925
|
let linkClass = props.linkType ? buttonClasses.get(props.linkType) : buttonClasses.get("Link" /* Link */);
|
|
2900
2926
|
const target = props?.href?.startsWith("http") ? "_blank" : "_self";
|
|
@@ -2902,7 +2928,7 @@ function Hyperlink(props) {
|
|
|
2902
2928
|
if (target == "_blank") {
|
|
2903
2929
|
additionalProps.rel = "noopener noreferrer";
|
|
2904
2930
|
}
|
|
2905
|
-
return /* @__PURE__ */ (0,
|
|
2931
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_jsx_runtime32.Fragment, { children: props.href ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2906
2932
|
import_link.default,
|
|
2907
2933
|
{
|
|
2908
2934
|
href: props.href,
|
|
@@ -2912,34 +2938,34 @@ function Hyperlink(props) {
|
|
|
2912
2938
|
target,
|
|
2913
2939
|
children: props.children
|
|
2914
2940
|
}
|
|
2915
|
-
) : props.isHeading ? /* @__PURE__ */ (0,
|
|
2941
|
+
) : props.isHeading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h5", { className: props.className + "inline-block", children: props.children }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: props.className, children: props.children }) });
|
|
2916
2942
|
}
|
|
2917
2943
|
|
|
2918
2944
|
// src/svg/chevron-updown.tsx
|
|
2919
|
-
var
|
|
2945
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2920
2946
|
var ChevronUpDown = (props) => {
|
|
2921
|
-
return /* @__PURE__ */ (0,
|
|
2947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("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__ */ (0, import_jsx_runtime33.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" }) });
|
|
2922
2948
|
};
|
|
2923
2949
|
var chevron_updown_default = ChevronUpDown;
|
|
2924
2950
|
|
|
2925
2951
|
// src/svg/chevron-down.tsx
|
|
2926
|
-
var
|
|
2952
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2927
2953
|
var ChevronDown = (props) => {
|
|
2928
|
-
return /* @__PURE__ */ (0,
|
|
2954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("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__ */ (0, import_jsx_runtime34.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) });
|
|
2929
2955
|
};
|
|
2930
2956
|
var chevron_down_default = ChevronDown;
|
|
2931
2957
|
|
|
2932
2958
|
// src/svg/chevron-up.tsx
|
|
2933
|
-
var
|
|
2959
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2934
2960
|
var ChevronUp = (props) => {
|
|
2935
|
-
return /* @__PURE__ */ (0,
|
|
2961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("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__ */ (0, import_jsx_runtime35.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 15.75l7.5-7.5 7.5 7.5" }) });
|
|
2936
2962
|
};
|
|
2937
2963
|
var chevron_up_default = ChevronUp;
|
|
2938
2964
|
|
|
2939
2965
|
// src/svg/plus.tsx
|
|
2940
|
-
var
|
|
2966
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2941
2967
|
var Plus = (props) => {
|
|
2942
|
-
return /* @__PURE__ */ (0,
|
|
2968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("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__ */ (0, import_jsx_runtime36.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) });
|
|
2943
2969
|
};
|
|
2944
2970
|
var plus_default = Plus;
|
|
2945
2971
|
|
|
@@ -2953,19 +2979,19 @@ var Icons = {
|
|
|
2953
2979
|
var Icons_default = Icons;
|
|
2954
2980
|
|
|
2955
2981
|
// src/svg/Icon.tsx
|
|
2956
|
-
var
|
|
2982
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2957
2983
|
var Icon = ({ name, className, ...props }) => {
|
|
2958
2984
|
const IconComponent = Icons_default[name];
|
|
2959
2985
|
if (!IconComponent) {
|
|
2960
2986
|
console.error(`Icon "${name}" not found.`);
|
|
2961
2987
|
return null;
|
|
2962
2988
|
}
|
|
2963
|
-
return /* @__PURE__ */ (0,
|
|
2989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(IconComponent, { ...props, className });
|
|
2964
2990
|
};
|
|
2965
2991
|
var Icon_default = Icon;
|
|
2966
2992
|
|
|
2967
2993
|
// src/components/controls/edit/AssetUpload.tsx
|
|
2968
|
-
var
|
|
2994
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2969
2995
|
var AssetUpload = (props) => {
|
|
2970
2996
|
const isDisabled = props.attributes?.disable ?? false;
|
|
2971
2997
|
let allValues = [];
|
|
@@ -3062,10 +3088,10 @@ var AssetUpload = (props) => {
|
|
|
3062
3088
|
}
|
|
3063
3089
|
return false;
|
|
3064
3090
|
};
|
|
3065
|
-
return /* @__PURE__ */ (0,
|
|
3066
|
-
/* @__PURE__ */ (0,
|
|
3067
|
-
/* @__PURE__ */ (0,
|
|
3068
|
-
/* @__PURE__ */ (0,
|
|
3091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_react30.default.Fragment, { children: [
|
|
3092
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("label", { className: "block mb-1", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }) }),
|
|
3093
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex gap-6 bg-neutral-100 rounded p-2", children: [
|
|
3094
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3069
3095
|
ClientButton_default,
|
|
3070
3096
|
{
|
|
3071
3097
|
className: assetType === "image" ? "px-2 py-1 rounded bg-body-200 scale-95" : "text-neutral-700",
|
|
@@ -3075,7 +3101,7 @@ var AssetUpload = (props) => {
|
|
|
3075
3101
|
children: "Image Upload"
|
|
3076
3102
|
}
|
|
3077
3103
|
),
|
|
3078
|
-
/* @__PURE__ */ (0,
|
|
3104
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3079
3105
|
ClientButton_default,
|
|
3080
3106
|
{
|
|
3081
3107
|
className: assetType === "video" ? "bg-body-200 px-2 py-1 rounded-md scale-95" : "text-neutral-700",
|
|
@@ -3086,13 +3112,13 @@ var AssetUpload = (props) => {
|
|
|
3086
3112
|
}
|
|
3087
3113
|
)
|
|
3088
3114
|
] }),
|
|
3089
|
-
shouldShowDetails() && /* @__PURE__ */ (0,
|
|
3090
|
-
/* @__PURE__ */ (0,
|
|
3091
|
-
/* @__PURE__ */ (0,
|
|
3092
|
-
/* @__PURE__ */ (0,
|
|
3093
|
-
/* @__PURE__ */ (0,
|
|
3094
|
-
/* @__PURE__ */ (0,
|
|
3095
|
-
/* @__PURE__ */ (0,
|
|
3115
|
+
shouldShowDetails() && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "relative mt-4 rounded-md p-4 border-2 border-dotted border-gray-300 bg-gray-50", children: [
|
|
3116
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "absolute -top-2.5 left-3 bg-primary-600 text-white text-xs px-2 py-0.5 rounded-full", children: getAssetType(allValues[0]) === "video" ? "Video" : "Image" }),
|
|
3117
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex flex-col gap-3", children: allValues.map((digitalAsset, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex justify-between items-start gap-5", children: [
|
|
3118
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "grid grid-cols-2 gap-x-8 gap-y-3 text-sm w-full", children: [
|
|
3119
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { children: [
|
|
3120
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-gray-500", children: "Title" }),
|
|
3121
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3096
3122
|
"input",
|
|
3097
3123
|
{
|
|
3098
3124
|
type: "text",
|
|
@@ -3104,18 +3130,18 @@ var AssetUpload = (props) => {
|
|
|
3104
3130
|
}
|
|
3105
3131
|
)
|
|
3106
3132
|
] }),
|
|
3107
|
-
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ (0,
|
|
3108
|
-
/* @__PURE__ */ (0,
|
|
3109
|
-
/* @__PURE__ */ (0,
|
|
3133
|
+
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { children: [
|
|
3134
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-gray-500", children: "Resolution" }),
|
|
3135
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("p", { className: "font-medium text-gray-900 mt-3", children: [
|
|
3110
3136
|
digitalAsset.intrinsicWidth,
|
|
3111
3137
|
"\xD7",
|
|
3112
3138
|
digitalAsset.intrinsicHeight
|
|
3113
3139
|
] })
|
|
3114
3140
|
] }),
|
|
3115
|
-
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ (0,
|
|
3116
|
-
/* @__PURE__ */ (0,
|
|
3117
|
-
/* @__PURE__ */ (0,
|
|
3118
|
-
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ (0,
|
|
3141
|
+
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { children: [
|
|
3142
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-gray-500", children: "Image / Poster" }),
|
|
3143
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex-shrink-0 flex flex-col gap-3 mt-1", children: [
|
|
3144
|
+
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3119
3145
|
"img",
|
|
3120
3146
|
{
|
|
3121
3147
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.posterUrl),
|
|
@@ -3123,7 +3149,7 @@ var AssetUpload = (props) => {
|
|
|
3123
3149
|
className: "w-32 h-auto object-cover rounded border p-1"
|
|
3124
3150
|
}
|
|
3125
3151
|
),
|
|
3126
|
-
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ (0,
|
|
3152
|
+
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3127
3153
|
"img",
|
|
3128
3154
|
{
|
|
3129
3155
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.assetUrl),
|
|
@@ -3133,9 +3159,9 @@ var AssetUpload = (props) => {
|
|
|
3133
3159
|
)
|
|
3134
3160
|
] })
|
|
3135
3161
|
] }),
|
|
3136
|
-
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ (0,
|
|
3137
|
-
/* @__PURE__ */ (0,
|
|
3138
|
-
/* @__PURE__ */ (0,
|
|
3162
|
+
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "col-span-2", children: [
|
|
3163
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-gray-500", children: "HLS Link" }),
|
|
3164
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3139
3165
|
Hyperlink,
|
|
3140
3166
|
{
|
|
3141
3167
|
href: digitalAsset.assetUrl,
|
|
@@ -3146,12 +3172,12 @@ var AssetUpload = (props) => {
|
|
|
3146
3172
|
)
|
|
3147
3173
|
] })
|
|
3148
3174
|
] }),
|
|
3149
|
-
/* @__PURE__ */ (0,
|
|
3175
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3150
3176
|
"span",
|
|
3151
3177
|
{
|
|
3152
3178
|
onClick: () => !isDisabled && deleteFile(index),
|
|
3153
3179
|
className: isDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
3154
|
-
children: /* @__PURE__ */ (0,
|
|
3180
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon_default, { className: "w-4 h-4 text-primary", name: "delete" })
|
|
3155
3181
|
}
|
|
3156
3182
|
)
|
|
3157
3183
|
] }, index)) })
|
|
@@ -3161,7 +3187,7 @@ var AssetUpload = (props) => {
|
|
|
3161
3187
|
var AssetUpload_default = AssetUpload;
|
|
3162
3188
|
|
|
3163
3189
|
// src/components/controls/edit/InputControl.tsx
|
|
3164
|
-
var
|
|
3190
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3165
3191
|
var InputControl = import_react31.default.forwardRef(
|
|
3166
3192
|
(props, ref) => {
|
|
3167
3193
|
const ControlComponents = {
|
|
@@ -3184,7 +3210,7 @@ var InputControl = import_react31.default.forwardRef(
|
|
|
3184
3210
|
[InputControlType_default.asset]: AssetUpload_default
|
|
3185
3211
|
};
|
|
3186
3212
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
3187
|
-
return /* @__PURE__ */ (0,
|
|
3213
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react31.default.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectedControlComponent, { ...props }) : "Control not found" });
|
|
3188
3214
|
}
|
|
3189
3215
|
);
|
|
3190
3216
|
InputControl.displayName = "InputControl";
|
|
@@ -3197,7 +3223,7 @@ var import_react50 = __toESM(require("react"));
|
|
|
3197
3223
|
var import_react36 = __toESM(require("react"));
|
|
3198
3224
|
|
|
3199
3225
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
3200
|
-
var
|
|
3226
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3201
3227
|
var TextNode = (props) => {
|
|
3202
3228
|
function cssStringToJson(cssString) {
|
|
3203
3229
|
const styleObject = {};
|
|
@@ -3252,26 +3278,26 @@ var TextNode = (props) => {
|
|
|
3252
3278
|
});
|
|
3253
3279
|
}
|
|
3254
3280
|
function renderWithLineBreaks(text) {
|
|
3255
|
-
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0,
|
|
3281
|
+
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { children: [
|
|
3256
3282
|
line,
|
|
3257
|
-
index < arr.length - 1 && /* @__PURE__ */ (0,
|
|
3283
|
+
index < arr.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("br", {})
|
|
3258
3284
|
] }, index));
|
|
3259
3285
|
}
|
|
3260
3286
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
3261
3287
|
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
3262
3288
|
const content = typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText;
|
|
3263
|
-
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ (0,
|
|
3289
|
+
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("sup", { children: content }) : props.node.format & 32 ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("sub", { children: content }) : content;
|
|
3264
3290
|
return (
|
|
3265
3291
|
// @ts-expect-error custom code
|
|
3266
|
-
/* @__PURE__ */ (0,
|
|
3292
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: formattedContent })
|
|
3267
3293
|
);
|
|
3268
3294
|
};
|
|
3269
3295
|
var TextNode_default = TextNode;
|
|
3270
3296
|
|
|
3271
3297
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
3272
|
-
var
|
|
3298
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3273
3299
|
var LineBreakNode = () => {
|
|
3274
|
-
return /* @__PURE__ */ (0,
|
|
3300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "py-0.5 lg:py-1.5" });
|
|
3275
3301
|
};
|
|
3276
3302
|
var LineBreakNode_default = LineBreakNode;
|
|
3277
3303
|
|
|
@@ -3280,11 +3306,11 @@ var import_react35 = __toESM(require("react"));
|
|
|
3280
3306
|
|
|
3281
3307
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
3282
3308
|
var import_react33 = __toESM(require("react"));
|
|
3283
|
-
var
|
|
3309
|
+
var import_dynamic3 = __toESM(require("next/dynamic"));
|
|
3284
3310
|
|
|
3285
3311
|
// src/components/DeviceAssetSelector.tsx
|
|
3286
3312
|
init_HlsPlayer();
|
|
3287
|
-
var
|
|
3313
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3288
3314
|
var DeviceAssetSelector = ({
|
|
3289
3315
|
assets,
|
|
3290
3316
|
assetBaseUrl,
|
|
@@ -3359,7 +3385,7 @@ var DeviceAssetSelector = ({
|
|
|
3359
3385
|
const formatClasses = FormatClass[nodeProps?.format || ""] || "";
|
|
3360
3386
|
const renderMedia = () => {
|
|
3361
3387
|
if (isHls) {
|
|
3362
|
-
return /* @__PURE__ */ (0,
|
|
3388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3363
3389
|
HlsPlayer_default,
|
|
3364
3390
|
{
|
|
3365
3391
|
assetUrl: resolvedAssetUrl,
|
|
@@ -3376,7 +3402,7 @@ var DeviceAssetSelector = ({
|
|
|
3376
3402
|
} else {
|
|
3377
3403
|
return (
|
|
3378
3404
|
/* eslint-disable-next-line @next/next/no-img-element */
|
|
3379
|
-
/* @__PURE__ */ (0,
|
|
3405
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3380
3406
|
"img",
|
|
3381
3407
|
{
|
|
3382
3408
|
style: styles,
|
|
@@ -3392,18 +3418,18 @@ var DeviceAssetSelector = ({
|
|
|
3392
3418
|
}
|
|
3393
3419
|
};
|
|
3394
3420
|
if (width) {
|
|
3395
|
-
return /* @__PURE__ */ (0,
|
|
3421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { style: { width }, children: renderMedia() });
|
|
3396
3422
|
}
|
|
3397
3423
|
if (nodeProps?.format) {
|
|
3398
|
-
return /* @__PURE__ */ (0,
|
|
3424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
3399
3425
|
}
|
|
3400
3426
|
return renderMedia();
|
|
3401
3427
|
};
|
|
3402
3428
|
var DeviceAssetSelector_default = DeviceAssetSelector;
|
|
3403
3429
|
|
|
3404
3430
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
3405
|
-
var
|
|
3406
|
-
var HlsPlayer2 = (0,
|
|
3431
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3432
|
+
var HlsPlayer2 = (0, import_dynamic3.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), {
|
|
3407
3433
|
ssr: false
|
|
3408
3434
|
});
|
|
3409
3435
|
var getNestedValue = (obj, path) => {
|
|
@@ -3445,7 +3471,7 @@ var ImageNode = (props) => {
|
|
|
3445
3471
|
console.error("Error parsing assets in ImageNode:", error);
|
|
3446
3472
|
}
|
|
3447
3473
|
if (assets && assets.length > 0) {
|
|
3448
|
-
return /* @__PURE__ */ (0,
|
|
3474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_jsx_runtime44.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3449
3475
|
DeviceAssetSelector_default,
|
|
3450
3476
|
{
|
|
3451
3477
|
device: props.device,
|
|
@@ -3494,7 +3520,7 @@ var ImageNode = (props) => {
|
|
|
3494
3520
|
const isHls = imageUrl?.endsWith(".m3u8");
|
|
3495
3521
|
const renderMedia = () => {
|
|
3496
3522
|
if (isHls) {
|
|
3497
|
-
return /* @__PURE__ */ (0,
|
|
3523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3498
3524
|
HlsPlayer2,
|
|
3499
3525
|
{
|
|
3500
3526
|
assetUrl: imageUrl,
|
|
@@ -3509,7 +3535,7 @@ var ImageNode = (props) => {
|
|
|
3509
3535
|
}
|
|
3510
3536
|
);
|
|
3511
3537
|
} else {
|
|
3512
|
-
return /* @__PURE__ */ (0,
|
|
3538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react33.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3513
3539
|
"img",
|
|
3514
3540
|
{
|
|
3515
3541
|
style: styles,
|
|
@@ -3524,7 +3550,7 @@ var ImageNode = (props) => {
|
|
|
3524
3550
|
}
|
|
3525
3551
|
};
|
|
3526
3552
|
if (props.node.width) {
|
|
3527
|
-
return /* @__PURE__ */ (0,
|
|
3553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
3528
3554
|
}
|
|
3529
3555
|
return renderMedia();
|
|
3530
3556
|
};
|
|
@@ -3532,9 +3558,9 @@ var ImageNode_default = ImageNode;
|
|
|
3532
3558
|
|
|
3533
3559
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
3534
3560
|
init_StyleTypes();
|
|
3535
|
-
var
|
|
3536
|
-
var
|
|
3537
|
-
var LinkNodeButton2 = (0,
|
|
3561
|
+
var import_dynamic4 = __toESM(require("next/dynamic"));
|
|
3562
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3563
|
+
var LinkNodeButton2 = (0, import_dynamic4.default)(() => Promise.resolve().then(() => (init_LinkNodeButton(), LinkNodeButton_exports)), {
|
|
3538
3564
|
ssr: false
|
|
3539
3565
|
});
|
|
3540
3566
|
var LinkNode = (props) => {
|
|
@@ -3580,13 +3606,13 @@ var LinkNode = (props) => {
|
|
|
3580
3606
|
const isButton = node.isButton === true;
|
|
3581
3607
|
const renderChildren = () => {
|
|
3582
3608
|
if (!node.children || node.children.length === 0) return null;
|
|
3583
|
-
return /* @__PURE__ */ (0,
|
|
3609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, { children: node.children.map((childNode, index) => {
|
|
3584
3610
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
3585
3611
|
if (!SelectedNode) {
|
|
3586
3612
|
console.warn("Unknown node type:", childNode.type);
|
|
3587
3613
|
return null;
|
|
3588
3614
|
}
|
|
3589
|
-
return /* @__PURE__ */ (0,
|
|
3615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react35.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3590
3616
|
SelectedNode,
|
|
3591
3617
|
{
|
|
3592
3618
|
node: childNode,
|
|
@@ -3599,15 +3625,15 @@ var LinkNode = (props) => {
|
|
|
3599
3625
|
};
|
|
3600
3626
|
const renderFallback = () => {
|
|
3601
3627
|
if ((!node.children || node.children.length === 0) && linkText) {
|
|
3602
|
-
return /* @__PURE__ */ (0,
|
|
3628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: linkText });
|
|
3603
3629
|
}
|
|
3604
3630
|
if ((!node.children || node.children.length === 0) && !linkText) {
|
|
3605
|
-
return /* @__PURE__ */ (0,
|
|
3631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("br", {});
|
|
3606
3632
|
}
|
|
3607
3633
|
return null;
|
|
3608
3634
|
};
|
|
3609
3635
|
if (isButton) {
|
|
3610
|
-
return /* @__PURE__ */ (0,
|
|
3636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
3611
3637
|
LinkNodeButton2,
|
|
3612
3638
|
{
|
|
3613
3639
|
node,
|
|
@@ -3625,7 +3651,7 @@ var LinkNode = (props) => {
|
|
|
3625
3651
|
}
|
|
3626
3652
|
);
|
|
3627
3653
|
}
|
|
3628
|
-
return /* @__PURE__ */ (0,
|
|
3654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
3629
3655
|
Hyperlink,
|
|
3630
3656
|
{
|
|
3631
3657
|
href: linkUrl || "#",
|
|
@@ -3641,10 +3667,10 @@ var LinkNode = (props) => {
|
|
|
3641
3667
|
var LinkNode_default = LinkNode;
|
|
3642
3668
|
|
|
3643
3669
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
3644
|
-
var
|
|
3670
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3645
3671
|
var SVGIconNode = ({ node }) => {
|
|
3646
3672
|
if (!node?.svgCode) return null;
|
|
3647
|
-
return /* @__PURE__ */ (0,
|
|
3673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3648
3674
|
"span",
|
|
3649
3675
|
{
|
|
3650
3676
|
style: {
|
|
@@ -3661,7 +3687,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
3661
3687
|
|
|
3662
3688
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
3663
3689
|
var import_katex = __toESM(require("katex"));
|
|
3664
|
-
var
|
|
3690
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3665
3691
|
var EquationNode = ({ node }) => {
|
|
3666
3692
|
const { equation, inline } = node;
|
|
3667
3693
|
let html = "";
|
|
@@ -3676,7 +3702,7 @@ var EquationNode = ({ node }) => {
|
|
|
3676
3702
|
});
|
|
3677
3703
|
}
|
|
3678
3704
|
if (inline) {
|
|
3679
|
-
return /* @__PURE__ */ (0,
|
|
3705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3680
3706
|
"span",
|
|
3681
3707
|
{
|
|
3682
3708
|
className: "katex-inline",
|
|
@@ -3684,7 +3710,7 @@ var EquationNode = ({ node }) => {
|
|
|
3684
3710
|
}
|
|
3685
3711
|
);
|
|
3686
3712
|
}
|
|
3687
|
-
return /* @__PURE__ */ (0,
|
|
3713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3688
3714
|
"div",
|
|
3689
3715
|
{
|
|
3690
3716
|
className: "katex-block my-3 text-center",
|
|
@@ -3695,7 +3721,7 @@ var EquationNode = ({ node }) => {
|
|
|
3695
3721
|
var EquationNode_default = EquationNode;
|
|
3696
3722
|
|
|
3697
3723
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
3698
|
-
var
|
|
3724
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3699
3725
|
function getNestedProperty(obj, path) {
|
|
3700
3726
|
if (!obj || !path) return null;
|
|
3701
3727
|
if (path.includes(".")) {
|
|
@@ -3708,7 +3734,7 @@ function getNestedProperty(obj, path) {
|
|
|
3708
3734
|
}
|
|
3709
3735
|
const value = obj[path];
|
|
3710
3736
|
if (Array.isArray(value)) {
|
|
3711
|
-
return value.map((item, index) => /* @__PURE__ */ (0,
|
|
3737
|
+
return value.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { children: String(item) }, index));
|
|
3712
3738
|
}
|
|
3713
3739
|
return value;
|
|
3714
3740
|
}
|
|
@@ -3769,7 +3795,7 @@ var DatafieldNode = (props) => {
|
|
|
3769
3795
|
const dataType = props.node.dataType;
|
|
3770
3796
|
if (isEmptyValue) return null;
|
|
3771
3797
|
if (dataType === "rawContent") {
|
|
3772
|
-
return /* @__PURE__ */ (0,
|
|
3798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3773
3799
|
PageBodyRenderer_default,
|
|
3774
3800
|
{
|
|
3775
3801
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -3785,12 +3811,12 @@ var DatafieldNode = (props) => {
|
|
|
3785
3811
|
}
|
|
3786
3812
|
);
|
|
3787
3813
|
}
|
|
3788
|
-
return /* @__PURE__ */ (0,
|
|
3814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3789
3815
|
"span",
|
|
3790
3816
|
{
|
|
3791
3817
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
3792
3818
|
style: styles,
|
|
3793
|
-
children: /* @__PURE__ */ (0,
|
|
3819
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3794
3820
|
ViewControl_default,
|
|
3795
3821
|
{
|
|
3796
3822
|
controlType: dataType,
|
|
@@ -3803,7 +3829,7 @@ var DatafieldNode = (props) => {
|
|
|
3803
3829
|
var DatafieldNode_default = DatafieldNode;
|
|
3804
3830
|
|
|
3805
3831
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
3806
|
-
var
|
|
3832
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3807
3833
|
var ParagraphNode = (props) => {
|
|
3808
3834
|
const NodeTypes2 = {
|
|
3809
3835
|
["text"]: TextNode_default,
|
|
@@ -3823,9 +3849,9 @@ var ParagraphNode = (props) => {
|
|
|
3823
3849
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
3824
3850
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
3825
3851
|
if (isInlineOnlyParent) {
|
|
3826
|
-
return /* @__PURE__ */ (0,
|
|
3852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, { children: hasChildren && props.node.children.map((node, index) => {
|
|
3827
3853
|
const SelectedNode = NodeTypes2[node.type];
|
|
3828
|
-
return /* @__PURE__ */ (0,
|
|
3854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react36.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3829
3855
|
SelectedNode,
|
|
3830
3856
|
{
|
|
3831
3857
|
node,
|
|
@@ -3837,10 +3863,10 @@ var ParagraphNode = (props) => {
|
|
|
3837
3863
|
) }, index);
|
|
3838
3864
|
}) });
|
|
3839
3865
|
}
|
|
3840
|
-
return /* @__PURE__ */ (0,
|
|
3866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: " " + formatClasses, children: [
|
|
3841
3867
|
hasChildren && props.node.children.map((node, index) => {
|
|
3842
3868
|
const SelectedNode = NodeTypes2[node.type];
|
|
3843
|
-
return /* @__PURE__ */ (0,
|
|
3869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react36.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3844
3870
|
SelectedNode,
|
|
3845
3871
|
{
|
|
3846
3872
|
node,
|
|
@@ -3851,14 +3877,14 @@ var ParagraphNode = (props) => {
|
|
|
3851
3877
|
}
|
|
3852
3878
|
) }, index);
|
|
3853
3879
|
}),
|
|
3854
|
-
!hasChildren && /* @__PURE__ */ (0,
|
|
3880
|
+
!hasChildren && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "py-1.5 lg:py-2" })
|
|
3855
3881
|
] });
|
|
3856
3882
|
};
|
|
3857
3883
|
var ParagraphNode_default = ParagraphNode;
|
|
3858
3884
|
|
|
3859
3885
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
3860
3886
|
var import_react37 = __toESM(require("react"));
|
|
3861
|
-
var
|
|
3887
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3862
3888
|
var HeadingNode = (props) => {
|
|
3863
3889
|
const NodeTypes2 = {
|
|
3864
3890
|
["text"]: TextNode_default,
|
|
@@ -3874,12 +3900,12 @@ var HeadingNode = (props) => {
|
|
|
3874
3900
|
{
|
|
3875
3901
|
}
|
|
3876
3902
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
3877
|
-
return /* @__PURE__ */ (0,
|
|
3903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx_runtime51.Fragment, { children: import_react37.default.createElement(
|
|
3878
3904
|
HeadingTag,
|
|
3879
3905
|
{ className: formatClasses },
|
|
3880
3906
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
3881
3907
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
3882
|
-
return /* @__PURE__ */ (0,
|
|
3908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react37.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
3883
3909
|
})
|
|
3884
3910
|
) });
|
|
3885
3911
|
};
|
|
@@ -3890,7 +3916,7 @@ var import_react39 = __toESM(require("react"));
|
|
|
3890
3916
|
|
|
3891
3917
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
3892
3918
|
var import_react38 = __toESM(require("react"));
|
|
3893
|
-
var
|
|
3919
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3894
3920
|
var ListItemNode = (props) => {
|
|
3895
3921
|
const NodeTypes2 = {
|
|
3896
3922
|
text: TextNode_default,
|
|
@@ -3907,37 +3933,37 @@ var ListItemNode = (props) => {
|
|
|
3907
3933
|
liStyle.fontSize = match[1].trim();
|
|
3908
3934
|
}
|
|
3909
3935
|
}
|
|
3910
|
-
return /* @__PURE__ */ (0,
|
|
3936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
3911
3937
|
const SelectedNode = NodeTypes2[node.type];
|
|
3912
3938
|
if (node.type === "linebreak") {
|
|
3913
3939
|
if (!foundFirstBreak) {
|
|
3914
3940
|
foundFirstBreak = true;
|
|
3915
|
-
return /* @__PURE__ */ (0,
|
|
3941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", {}, index);
|
|
3916
3942
|
} else {
|
|
3917
|
-
return /* @__PURE__ */ (0,
|
|
3943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "py-1 lg:py-2" }, index);
|
|
3918
3944
|
}
|
|
3919
3945
|
} else {
|
|
3920
3946
|
foundFirstBreak = false;
|
|
3921
|
-
return /* @__PURE__ */ (0,
|
|
3947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react38.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
3922
3948
|
}
|
|
3923
3949
|
}) });
|
|
3924
3950
|
};
|
|
3925
3951
|
var ListItemNode_default = ListItemNode;
|
|
3926
3952
|
|
|
3927
3953
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
3928
|
-
var
|
|
3954
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3929
3955
|
var ListNode = (props) => {
|
|
3930
3956
|
const NodeTypes2 = {
|
|
3931
3957
|
listitem: ListItemNode_default
|
|
3932
3958
|
};
|
|
3933
|
-
return /* @__PURE__ */ (0,
|
|
3934
|
-
props.node.listType == "bullet" && /* @__PURE__ */ (0,
|
|
3959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_react39.default.Fragment, { children: [
|
|
3960
|
+
props.node.listType == "bullet" && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
3935
3961
|
const SelectedNode = NodeTypes2[node.type];
|
|
3936
|
-
return /* @__PURE__ */ (0,
|
|
3962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react39.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
3937
3963
|
}) }),
|
|
3938
|
-
props.node.listType == "number" && /* @__PURE__ */ (0,
|
|
3964
|
+
props.node.listType == "number" && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
3939
3965
|
const SelectedNode = NodeTypes2[node.type];
|
|
3940
|
-
return /* @__PURE__ */ (0,
|
|
3966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react39.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
3941
3967
|
}) })
|
|
3942
3968
|
] });
|
|
3943
3969
|
};
|
|
@@ -3945,28 +3971,28 @@ var ListNode_default = ListNode;
|
|
|
3945
3971
|
|
|
3946
3972
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
3947
3973
|
var import_react40 = __toESM(require("react"));
|
|
3948
|
-
var
|
|
3974
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3949
3975
|
var QuoteNode = (props) => {
|
|
3950
3976
|
const NodeTypes2 = {
|
|
3951
3977
|
["text"]: TextNode_default,
|
|
3952
3978
|
["linebreak"]: LineBreakNode_default,
|
|
3953
3979
|
["link"]: LinkNode_default
|
|
3954
3980
|
};
|
|
3955
|
-
return /* @__PURE__ */ (0,
|
|
3981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
3956
3982
|
const SelectedNode = NodeTypes2[node.type];
|
|
3957
|
-
return /* @__PURE__ */ (0,
|
|
3983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react40.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
3958
3984
|
}) });
|
|
3959
3985
|
};
|
|
3960
3986
|
var QuoteNode_default = QuoteNode;
|
|
3961
3987
|
|
|
3962
3988
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
3963
3989
|
var import_react42 = __toESM(require("react"));
|
|
3964
|
-
var
|
|
3965
|
-
var
|
|
3966
|
-
var CopyButton2 = (0,
|
|
3990
|
+
var import_dynamic5 = __toESM(require("next/dynamic"));
|
|
3991
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3992
|
+
var CopyButton2 = (0, import_dynamic5.default)(() => Promise.resolve().then(() => (init_CopyButton(), CopyButton_exports)), {
|
|
3967
3993
|
ssr: false,
|
|
3968
3994
|
// optional: fallback UI while loading
|
|
3969
|
-
loading: () => /* @__PURE__ */ (0,
|
|
3995
|
+
loading: () => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
3970
3996
|
});
|
|
3971
3997
|
var CodeNode = (props) => {
|
|
3972
3998
|
const NodeTypes2 = {
|
|
@@ -3980,14 +4006,14 @@ var CodeNode = (props) => {
|
|
|
3980
4006
|
if (node.type === "link") return node.text || node.url || "";
|
|
3981
4007
|
return "";
|
|
3982
4008
|
}).join("") ?? "";
|
|
3983
|
-
return /* @__PURE__ */ (0,
|
|
3984
|
-
/* @__PURE__ */ (0,
|
|
3985
|
-
/* @__PURE__ */ (0,
|
|
3986
|
-
/* @__PURE__ */ (0,
|
|
4009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { children: [
|
|
4010
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
4011
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { children: "Code Snippet" }),
|
|
4012
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(CopyButton2, { text: textContent })
|
|
3987
4013
|
] }),
|
|
3988
|
-
/* @__PURE__ */ (0,
|
|
4014
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("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) => {
|
|
3989
4015
|
const SelectedNode = NodeTypes2[node.type];
|
|
3990
|
-
return /* @__PURE__ */ (0,
|
|
4016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react42.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3991
4017
|
SelectedNode,
|
|
3992
4018
|
{
|
|
3993
4019
|
node,
|
|
@@ -4002,15 +4028,15 @@ var CodeNode = (props) => {
|
|
|
4002
4028
|
var CodeNode_default = CodeNode;
|
|
4003
4029
|
|
|
4004
4030
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
4005
|
-
var
|
|
4031
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
4006
4032
|
var HorizontalRuleNode = () => {
|
|
4007
|
-
return /* @__PURE__ */ (0,
|
|
4033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("hr", {});
|
|
4008
4034
|
};
|
|
4009
4035
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
4010
4036
|
|
|
4011
4037
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
4012
4038
|
var import_react43 = __toESM(require("react"));
|
|
4013
|
-
var
|
|
4039
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4014
4040
|
var WidgetNode = (props) => {
|
|
4015
4041
|
const getWidgetParameters = () => {
|
|
4016
4042
|
const widgetInputParameters = {
|
|
@@ -4074,7 +4100,7 @@ var WidgetNode = (props) => {
|
|
|
4074
4100
|
};
|
|
4075
4101
|
const widgetCode = props.node?.widgetCode;
|
|
4076
4102
|
if (!widgetCode) {
|
|
4077
|
-
return /* @__PURE__ */ (0,
|
|
4103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: "Invalid widget" });
|
|
4078
4104
|
}
|
|
4079
4105
|
const widgetParams = getWidgetParameters();
|
|
4080
4106
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -4083,7 +4109,7 @@ var WidgetNode = (props) => {
|
|
|
4083
4109
|
}
|
|
4084
4110
|
return (
|
|
4085
4111
|
// eslint-disable-next-line react-hooks/static-components
|
|
4086
|
-
/* @__PURE__ */ (0,
|
|
4112
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react43.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4087
4113
|
WidgetRenderer,
|
|
4088
4114
|
{
|
|
4089
4115
|
params: widgetParams,
|
|
@@ -4103,9 +4129,9 @@ var WidgetNode_default = WidgetNode;
|
|
|
4103
4129
|
var import_react44 = __toESM(require("react"));
|
|
4104
4130
|
|
|
4105
4131
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
4106
|
-
var
|
|
4132
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4107
4133
|
var InputControlNode = (props) => {
|
|
4108
|
-
return /* @__PURE__ */ (0,
|
|
4134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4109
4135
|
InputControl_default,
|
|
4110
4136
|
{
|
|
4111
4137
|
name: props.node.name,
|
|
@@ -4179,7 +4205,7 @@ var FormReducer_default = FormReducer;
|
|
|
4179
4205
|
|
|
4180
4206
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
4181
4207
|
init_ServiceClient();
|
|
4182
|
-
var
|
|
4208
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
4183
4209
|
var FormContainerNode = (props) => {
|
|
4184
4210
|
const NodeTypes2 = {
|
|
4185
4211
|
["input-control"]: InputControlNode_default
|
|
@@ -4209,12 +4235,12 @@ var FormContainerNode = (props) => {
|
|
|
4209
4235
|
};
|
|
4210
4236
|
fetchInitialData();
|
|
4211
4237
|
}, [props.apiBaseUrl, props.node, props.session, props.routeParameters]);
|
|
4212
|
-
return /* @__PURE__ */ (0,
|
|
4238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
|
|
4213
4239
|
node.children && node.children.map((node2, index) => {
|
|
4214
4240
|
{
|
|
4215
4241
|
}
|
|
4216
4242
|
const SelectedNode = NodeTypes2[node2.type];
|
|
4217
|
-
return /* @__PURE__ */ (0,
|
|
4243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react44.default.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
4218
4244
|
InputControlNode_default,
|
|
4219
4245
|
{
|
|
4220
4246
|
value: formState.inputValues[node2.name],
|
|
@@ -4223,7 +4249,7 @@ var FormContainerNode = (props) => {
|
|
|
4223
4249
|
}
|
|
4224
4250
|
) }, index);
|
|
4225
4251
|
}),
|
|
4226
|
-
node.children.length == 0 && /* @__PURE__ */ (0,
|
|
4252
|
+
node.children.length == 0 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "py-0.5 lg:py-1.5" })
|
|
4227
4253
|
] });
|
|
4228
4254
|
};
|
|
4229
4255
|
var FormContainerNode_default = FormContainerNode;
|
|
@@ -4232,9 +4258,9 @@ var FormContainerNode_default = FormContainerNode;
|
|
|
4232
4258
|
var import_react49 = __toESM(require("react"));
|
|
4233
4259
|
|
|
4234
4260
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
4235
|
-
var
|
|
4236
|
-
var
|
|
4237
|
-
var IframeClient2 = (0,
|
|
4261
|
+
var import_dynamic6 = __toESM(require("next/dynamic"));
|
|
4262
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4263
|
+
var IframeClient2 = (0, import_dynamic6.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
4238
4264
|
ssr: false
|
|
4239
4265
|
});
|
|
4240
4266
|
var EmbedNode = (props) => {
|
|
@@ -4246,7 +4272,7 @@ var EmbedNode = (props) => {
|
|
|
4246
4272
|
} else {
|
|
4247
4273
|
src = props.node.embedSrc;
|
|
4248
4274
|
}
|
|
4249
|
-
return /* @__PURE__ */ (0,
|
|
4275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "aspect-video", children: src && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(IframeClient2, { src }) });
|
|
4250
4276
|
};
|
|
4251
4277
|
var EmbedNode_default = EmbedNode;
|
|
4252
4278
|
|
|
@@ -4255,7 +4281,7 @@ init_ServiceClient();
|
|
|
4255
4281
|
|
|
4256
4282
|
// src/components/Slider.tsx
|
|
4257
4283
|
var import_react47 = __toESM(require("react"));
|
|
4258
|
-
var
|
|
4284
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
4259
4285
|
var Slider = ({
|
|
4260
4286
|
children,
|
|
4261
4287
|
slidesToShow = 4,
|
|
@@ -4352,7 +4378,7 @@ var Slider = ({
|
|
|
4352
4378
|
if (!import_react47.default.isValidElement(child)) return null;
|
|
4353
4379
|
const childProps = child.props;
|
|
4354
4380
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
4355
|
-
return /* @__PURE__ */ (0,
|
|
4381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
4356
4382
|
"div",
|
|
4357
4383
|
{
|
|
4358
4384
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
@@ -4375,14 +4401,14 @@ var Slider = ({
|
|
|
4375
4401
|
return "bottom-4";
|
|
4376
4402
|
}
|
|
4377
4403
|
};
|
|
4378
|
-
return /* @__PURE__ */ (0,
|
|
4404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
4379
4405
|
"div",
|
|
4380
4406
|
{
|
|
4381
4407
|
className: `relative w-full overflow-hidden ${className}`,
|
|
4382
4408
|
onMouseEnter: handleMouseEnter,
|
|
4383
4409
|
onMouseLeave: handleMouseLeave,
|
|
4384
4410
|
children: [
|
|
4385
|
-
/* @__PURE__ */ (0,
|
|
4411
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
4386
4412
|
"div",
|
|
4387
4413
|
{
|
|
4388
4414
|
className: "flex h-full",
|
|
@@ -4393,18 +4419,18 @@ var Slider = ({
|
|
|
4393
4419
|
children: slides
|
|
4394
4420
|
}
|
|
4395
4421
|
),
|
|
4396
|
-
show_arrows && /* @__PURE__ */ (0,
|
|
4397
|
-
/* @__PURE__ */ (0,
|
|
4422
|
+
show_arrows && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
|
|
4423
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
4398
4424
|
ArrowButton,
|
|
4399
4425
|
{
|
|
4400
4426
|
direction: "left",
|
|
4401
4427
|
onClick: prevSlide,
|
|
4402
4428
|
visible: infinite_scroll || currentSlide > 0,
|
|
4403
4429
|
className: arrowClassName,
|
|
4404
|
-
children: /* @__PURE__ */ (0,
|
|
4430
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("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__ */ (0, import_jsx_runtime64.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
4405
4431
|
}
|
|
4406
4432
|
),
|
|
4407
|
-
/* @__PURE__ */ (0,
|
|
4433
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
4408
4434
|
ArrowButton,
|
|
4409
4435
|
{
|
|
4410
4436
|
direction: "right",
|
|
@@ -4412,13 +4438,13 @@ var Slider = ({
|
|
|
4412
4438
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
4413
4439
|
className: arrowClassName,
|
|
4414
4440
|
children: [
|
|
4415
|
-
/* @__PURE__ */ (0,
|
|
4441
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("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__ */ (0, import_jsx_runtime64.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
|
|
4416
4442
|
" "
|
|
4417
4443
|
]
|
|
4418
4444
|
}
|
|
4419
4445
|
)
|
|
4420
4446
|
] }),
|
|
4421
|
-
show_dots && /* @__PURE__ */ (0,
|
|
4447
|
+
show_dots && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("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__ */ (0, import_jsx_runtime64.jsx)(
|
|
4422
4448
|
ProgressPill,
|
|
4423
4449
|
{
|
|
4424
4450
|
active: index === currentSlide,
|
|
@@ -4444,7 +4470,7 @@ var ArrowButton = ({
|
|
|
4444
4470
|
visible,
|
|
4445
4471
|
children,
|
|
4446
4472
|
className = ""
|
|
4447
|
-
}) => /* @__PURE__ */ (0,
|
|
4473
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
4448
4474
|
"button",
|
|
4449
4475
|
{
|
|
4450
4476
|
className: `
|
|
@@ -4531,7 +4557,7 @@ var ProgressPill = ({
|
|
|
4531
4557
|
const renderProgressBar = () => {
|
|
4532
4558
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
4533
4559
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
4534
|
-
return /* @__PURE__ */ (0,
|
|
4560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
4535
4561
|
"div",
|
|
4536
4562
|
{
|
|
4537
4563
|
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`,
|
|
@@ -4543,7 +4569,7 @@ var ProgressPill = ({
|
|
|
4543
4569
|
};
|
|
4544
4570
|
const renderCumulativeFill = () => {
|
|
4545
4571
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
4546
|
-
return /* @__PURE__ */ (0,
|
|
4572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
4547
4573
|
"div",
|
|
4548
4574
|
{
|
|
4549
4575
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -4553,7 +4579,7 @@ var ProgressPill = ({
|
|
|
4553
4579
|
}
|
|
4554
4580
|
return null;
|
|
4555
4581
|
};
|
|
4556
|
-
return /* @__PURE__ */ (0,
|
|
4582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
4557
4583
|
"button",
|
|
4558
4584
|
{
|
|
4559
4585
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -4891,10 +4917,10 @@ var PathUtility = class {
|
|
|
4891
4917
|
var PathUtility_default = new PathUtility();
|
|
4892
4918
|
|
|
4893
4919
|
// src/components/NoDataFound.tsx
|
|
4894
|
-
var
|
|
4920
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
4895
4921
|
var NoDataFound = () => {
|
|
4896
|
-
return /* @__PURE__ */ (0,
|
|
4897
|
-
/* @__PURE__ */ (0,
|
|
4922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
4923
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "mb-5", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
4898
4924
|
"svg",
|
|
4899
4925
|
{
|
|
4900
4926
|
className: "w-10 h-10",
|
|
@@ -4902,7 +4928,7 @@ var NoDataFound = () => {
|
|
|
4902
4928
|
stroke: "currentColor",
|
|
4903
4929
|
viewBox: "0 0 24 24",
|
|
4904
4930
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4905
|
-
children: /* @__PURE__ */ (0,
|
|
4931
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
4906
4932
|
"path",
|
|
4907
4933
|
{
|
|
4908
4934
|
strokeLinecap: "round",
|
|
@@ -4913,8 +4939,8 @@ var NoDataFound = () => {
|
|
|
4913
4939
|
)
|
|
4914
4940
|
}
|
|
4915
4941
|
) }) }),
|
|
4916
|
-
/* @__PURE__ */ (0,
|
|
4917
|
-
/* @__PURE__ */ (0,
|
|
4942
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
4943
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
4918
4944
|
] });
|
|
4919
4945
|
};
|
|
4920
4946
|
var NoDataFound_default = NoDataFound;
|
|
@@ -4922,7 +4948,7 @@ var NoDataFound_default = NoDataFound;
|
|
|
4922
4948
|
// src/components/Pagination.tsx
|
|
4923
4949
|
var import_react48 = require("react");
|
|
4924
4950
|
init_StyleTypes();
|
|
4925
|
-
var
|
|
4951
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4926
4952
|
var Pagination = (props) => {
|
|
4927
4953
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
4928
4954
|
const builder = (0, import_react48.useMemo)(() => {
|
|
@@ -4966,7 +4992,7 @@ var Pagination = (props) => {
|
|
|
4966
4992
|
return range;
|
|
4967
4993
|
};
|
|
4968
4994
|
const paginationRange = getPaginationRange();
|
|
4969
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */ (0,
|
|
4995
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4970
4996
|
Hyperlink,
|
|
4971
4997
|
{
|
|
4972
4998
|
linkType: "Link" /* Link */,
|
|
@@ -4981,9 +5007,9 @@ var Pagination = (props) => {
|
|
|
4981
5007
|
);
|
|
4982
5008
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
4983
5009
|
if (disabled) {
|
|
4984
|
-
return /* @__PURE__ */ (0,
|
|
5010
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("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 });
|
|
4985
5011
|
}
|
|
4986
|
-
return /* @__PURE__ */ (0,
|
|
5012
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4987
5013
|
Hyperlink,
|
|
4988
5014
|
{
|
|
4989
5015
|
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",
|
|
@@ -4993,35 +5019,35 @@ var Pagination = (props) => {
|
|
|
4993
5019
|
);
|
|
4994
5020
|
};
|
|
4995
5021
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
4996
|
-
return /* @__PURE__ */ (0,
|
|
4997
|
-
/* @__PURE__ */ (0,
|
|
4998
|
-
/* @__PURE__ */ (0,
|
|
5022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "py-6 border-t bg-default", children: [
|
|
5023
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
5024
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "text-sm", children: [
|
|
4999
5025
|
"Showing ",
|
|
5000
|
-
/* @__PURE__ */ (0,
|
|
5026
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("span", { className: "font-semibold", children: [
|
|
5001
5027
|
startItem,
|
|
5002
5028
|
"-",
|
|
5003
5029
|
endItem
|
|
5004
5030
|
] }),
|
|
5005
5031
|
" ",
|
|
5006
5032
|
"out of ",
|
|
5007
|
-
/* @__PURE__ */ (0,
|
|
5033
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
5008
5034
|
" results"
|
|
5009
5035
|
] }),
|
|
5010
|
-
totalPages > 1 && /* @__PURE__ */ (0,
|
|
5011
|
-
/* @__PURE__ */ (0,
|
|
5036
|
+
totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-center space-x-1", children: [
|
|
5037
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
5012
5038
|
NavigationButton,
|
|
5013
5039
|
{
|
|
5014
5040
|
page: activePageNumber - 1,
|
|
5015
5041
|
disabled: activePageNumber === 1,
|
|
5016
5042
|
children: [
|
|
5017
|
-
/* @__PURE__ */ (0,
|
|
5018
|
-
/* @__PURE__ */ (0,
|
|
5043
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
5044
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "text-sm", children: "Prev" })
|
|
5019
5045
|
]
|
|
5020
5046
|
}
|
|
5021
5047
|
),
|
|
5022
5048
|
paginationRange.map((item, index) => {
|
|
5023
5049
|
if (item === "...") {
|
|
5024
|
-
return /* @__PURE__ */ (0,
|
|
5050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5025
5051
|
"span",
|
|
5026
5052
|
{
|
|
5027
5053
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -5031,23 +5057,23 @@ var Pagination = (props) => {
|
|
|
5031
5057
|
);
|
|
5032
5058
|
}
|
|
5033
5059
|
const page = item;
|
|
5034
|
-
return /* @__PURE__ */ (0,
|
|
5060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(PageButton, { page, children: page }, page);
|
|
5035
5061
|
}),
|
|
5036
|
-
/* @__PURE__ */ (0,
|
|
5062
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
5037
5063
|
NavigationButton,
|
|
5038
5064
|
{
|
|
5039
5065
|
page: activePageNumber + 1,
|
|
5040
5066
|
disabled: activePageNumber === totalPages,
|
|
5041
5067
|
children: [
|
|
5042
|
-
/* @__PURE__ */ (0,
|
|
5043
|
-
/* @__PURE__ */ (0,
|
|
5068
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "text-sm", children: "Next" }),
|
|
5069
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
5044
5070
|
]
|
|
5045
5071
|
}
|
|
5046
5072
|
)
|
|
5047
5073
|
] }),
|
|
5048
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0,
|
|
5049
|
-
/* @__PURE__ */ (0,
|
|
5050
|
-
/* @__PURE__ */ (0,
|
|
5074
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
5075
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "text-sm", children: "Go to:" }),
|
|
5076
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5051
5077
|
"input",
|
|
5052
5078
|
{
|
|
5053
5079
|
type: "number",
|
|
@@ -5068,9 +5094,9 @@ var Pagination = (props) => {
|
|
|
5068
5094
|
) })
|
|
5069
5095
|
] })
|
|
5070
5096
|
] }),
|
|
5071
|
-
showPageSizeSelector && /* @__PURE__ */ (0,
|
|
5072
|
-
/* @__PURE__ */ (0,
|
|
5073
|
-
/* @__PURE__ */ (0,
|
|
5097
|
+
showPageSizeSelector && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
5098
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "text-sm", children: "Show:" }),
|
|
5099
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5074
5100
|
Hyperlink,
|
|
5075
5101
|
{
|
|
5076
5102
|
className: `
|
|
@@ -5082,16 +5108,16 @@ var Pagination = (props) => {
|
|
|
5082
5108
|
},
|
|
5083
5109
|
size
|
|
5084
5110
|
)) }),
|
|
5085
|
-
/* @__PURE__ */ (0,
|
|
5111
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "text-sm", children: "per page" })
|
|
5086
5112
|
] }) })
|
|
5087
5113
|
] });
|
|
5088
5114
|
};
|
|
5089
5115
|
var Pagination_default = Pagination;
|
|
5090
5116
|
|
|
5091
5117
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
5092
|
-
var
|
|
5093
|
-
var
|
|
5094
|
-
var HlsPlayer3 = (0,
|
|
5118
|
+
var import_dynamic7 = __toESM(require("next/dynamic"));
|
|
5119
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
5120
|
+
var HlsPlayer3 = (0, import_dynamic7.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
5095
5121
|
var deviceToMediaQuery = (device) => {
|
|
5096
5122
|
switch (device) {
|
|
5097
5123
|
case "sm":
|
|
@@ -5159,8 +5185,8 @@ var ImageGalleryNode = (props) => {
|
|
|
5159
5185
|
right: "justify-end"
|
|
5160
5186
|
};
|
|
5161
5187
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
5162
|
-
return /* @__PURE__ */ (0,
|
|
5163
|
-
hlsSources.length > 0 && /* @__PURE__ */ (0,
|
|
5188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
5189
|
+
hlsSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_jsx_runtime67.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5164
5190
|
HlsPlayer3,
|
|
5165
5191
|
{
|
|
5166
5192
|
sources: hlsSources,
|
|
@@ -5174,14 +5200,14 @@ var ImageGalleryNode = (props) => {
|
|
|
5174
5200
|
session: props.session
|
|
5175
5201
|
}
|
|
5176
5202
|
) }),
|
|
5177
|
-
staticFallback && /* @__PURE__ */ (0,
|
|
5203
|
+
staticFallback && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_jsx_runtime67.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("picture", { children: [
|
|
5178
5204
|
DEVICE_ORDER.map((deviceKey) => {
|
|
5179
5205
|
const match = staticSources.find((img) => img.device === deviceKey);
|
|
5180
5206
|
if (!match) return null;
|
|
5181
5207
|
const srcUrl = resolveImageUrl(match.imageUrl);
|
|
5182
5208
|
if (!srcUrl) return null;
|
|
5183
5209
|
const mediaQuery = deviceToMediaQuery(match.device);
|
|
5184
|
-
return /* @__PURE__ */ (0,
|
|
5210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5185
5211
|
"source",
|
|
5186
5212
|
{
|
|
5187
5213
|
media: mediaQuery,
|
|
@@ -5205,7 +5231,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5205
5231
|
if (img.borderRadius) styles.borderRadius = img.borderRadius;
|
|
5206
5232
|
return (
|
|
5207
5233
|
// eslint-disable-next-line @next/next/no-img-element
|
|
5208
|
-
/* @__PURE__ */ (0,
|
|
5234
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5209
5235
|
"img",
|
|
5210
5236
|
{
|
|
5211
5237
|
loading: "lazy",
|
|
@@ -5226,7 +5252,7 @@ var ImageGalleryNode_default = ImageGalleryNode;
|
|
|
5226
5252
|
|
|
5227
5253
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
5228
5254
|
var import_link2 = __toESM(require("next/link"));
|
|
5229
|
-
var
|
|
5255
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
5230
5256
|
function toCamelCase(str) {
|
|
5231
5257
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
5232
5258
|
}
|
|
@@ -5433,7 +5459,7 @@ var DivContainer = async (props) => {
|
|
|
5433
5459
|
response = await serviceClient.get(endpoint);
|
|
5434
5460
|
result = response?.result;
|
|
5435
5461
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
5436
|
-
return /* @__PURE__ */ (0,
|
|
5462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(NoDataFound_default, {});
|
|
5437
5463
|
}
|
|
5438
5464
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
5439
5465
|
childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
|
|
@@ -5450,7 +5476,7 @@ var DivContainer = async (props) => {
|
|
|
5450
5476
|
}
|
|
5451
5477
|
const SelectedNode = NodeTypes2[node.type];
|
|
5452
5478
|
if (!SelectedNode) return null;
|
|
5453
|
-
return /* @__PURE__ */ (0,
|
|
5479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react49.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5454
5480
|
SelectedNode,
|
|
5455
5481
|
{
|
|
5456
5482
|
node,
|
|
@@ -5552,9 +5578,9 @@ var DivContainer = async (props) => {
|
|
|
5552
5578
|
props.node.autoFormat && "auto-format",
|
|
5553
5579
|
props.node.bgClass
|
|
5554
5580
|
].filter(Boolean).join(" ");
|
|
5555
|
-
return /* @__PURE__ */ (0,
|
|
5556
|
-
/* @__PURE__ */ (0,
|
|
5557
|
-
/* @__PURE__ */ (0,
|
|
5581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_react49.default.Fragment, { children: [
|
|
5582
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
5583
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react49.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5558
5584
|
Wrapper,
|
|
5559
5585
|
{
|
|
5560
5586
|
id: guid,
|
|
@@ -5563,18 +5589,18 @@ var DivContainer = async (props) => {
|
|
|
5563
5589
|
...wrapperProps,
|
|
5564
5590
|
children: dataToRender.map(
|
|
5565
5591
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
5566
|
-
(child, i) => /* @__PURE__ */ (0,
|
|
5592
|
+
(child, i) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react49.default.Fragment, { children: child }, i)
|
|
5567
5593
|
) : renderChildren(props.node.children, props, item, idx)
|
|
5568
5594
|
)
|
|
5569
5595
|
}
|
|
5570
5596
|
) }),
|
|
5571
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0,
|
|
5597
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Pagination_default, { path: props.path, query: props.query, dataset: response }) })
|
|
5572
5598
|
] });
|
|
5573
5599
|
};
|
|
5574
5600
|
var DivContainer_default = DivContainer;
|
|
5575
5601
|
|
|
5576
5602
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
5577
|
-
var
|
|
5603
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
5578
5604
|
var NodeTypes = {
|
|
5579
5605
|
["paragraph"]: ParagraphNode_default,
|
|
5580
5606
|
["heading"]: HeadingNode_default,
|
|
@@ -5602,11 +5628,11 @@ var PageBodyRenderer = (props) => {
|
|
|
5602
5628
|
if (pageBodyTree && pageBodyTree.root) {
|
|
5603
5629
|
rootNode = pageBodyTree.root;
|
|
5604
5630
|
}
|
|
5605
|
-
return /* @__PURE__ */ (0,
|
|
5631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react50.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
5606
5632
|
{
|
|
5607
5633
|
}
|
|
5608
5634
|
const SelectedNode = NodeTypes[node.type];
|
|
5609
|
-
return /* @__PURE__ */ (0,
|
|
5635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react50.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react50.default.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react50.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5610
5636
|
SelectedNode,
|
|
5611
5637
|
{
|
|
5612
5638
|
node,
|
|
@@ -5622,7 +5648,7 @@ var PageBodyRenderer = (props) => {
|
|
|
5622
5648
|
device: props.device,
|
|
5623
5649
|
widgetRenderer: props.widgetRenderer
|
|
5624
5650
|
}
|
|
5625
|
-
) }) : /* @__PURE__ */ (0,
|
|
5651
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react50.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5626
5652
|
SelectedNode,
|
|
5627
5653
|
{
|
|
5628
5654
|
node,
|
|
@@ -5645,7 +5671,7 @@ var PageBodyRenderer_default = PageBodyRenderer;
|
|
|
5645
5671
|
// src/components/Toast.tsx
|
|
5646
5672
|
var import_react51 = require("react");
|
|
5647
5673
|
init_ToastService();
|
|
5648
|
-
var
|
|
5674
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
5649
5675
|
var Toast = () => {
|
|
5650
5676
|
const [showToast, setShowToast] = (0, import_react51.useState)(false);
|
|
5651
5677
|
const [message, setMessage] = (0, import_react51.useState)("");
|
|
@@ -5688,8 +5714,8 @@ var Toast = () => {
|
|
|
5688
5714
|
const closeToast = () => {
|
|
5689
5715
|
setShowToast(false);
|
|
5690
5716
|
};
|
|
5691
|
-
return /* @__PURE__ */ (0,
|
|
5692
|
-
/* @__PURE__ */ (0,
|
|
5717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_jsx_runtime70.Fragment, { children: showToast && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("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__ */ (0, import_jsx_runtime70.jsxs)("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
5718
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
5693
5719
|
"span",
|
|
5694
5720
|
{
|
|
5695
5721
|
className: "font-medium text-inherit text-sm",
|
|
@@ -5697,7 +5723,7 @@ var Toast = () => {
|
|
|
5697
5723
|
children: message
|
|
5698
5724
|
}
|
|
5699
5725
|
),
|
|
5700
|
-
/* @__PURE__ */ (0,
|
|
5726
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
5701
5727
|
"svg",
|
|
5702
5728
|
{
|
|
5703
5729
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5705,7 +5731,7 @@ var Toast = () => {
|
|
|
5705
5731
|
fill: "none",
|
|
5706
5732
|
viewBox: "0 0 24 24",
|
|
5707
5733
|
stroke: "currentColor",
|
|
5708
|
-
children: /* @__PURE__ */ (0,
|
|
5734
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
5709
5735
|
}
|
|
5710
5736
|
) })
|
|
5711
5737
|
] }) }) });
|
|
@@ -5718,7 +5744,7 @@ init_ToastService();
|
|
|
5718
5744
|
// src/components/NavigationTabsV2.tsx
|
|
5719
5745
|
var import_link3 = __toESM(require("next/link"));
|
|
5720
5746
|
var import_navigation = require("next/navigation");
|
|
5721
|
-
var
|
|
5747
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
5722
5748
|
function resolveRoutePlaceholders(route, params) {
|
|
5723
5749
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
5724
5750
|
const value = params[key];
|
|
@@ -5743,8 +5769,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
5743
5769
|
isActive: tab.isActive
|
|
5744
5770
|
})) || [];
|
|
5745
5771
|
if (mappedTabs.length === 0) return null;
|
|
5746
|
-
return /* @__PURE__ */ (0,
|
|
5747
|
-
return /* @__PURE__ */ (0,
|
|
5772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
5773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_link3.default, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
5748
5774
|
"div",
|
|
5749
5775
|
{
|
|
5750
5776
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -5762,46 +5788,46 @@ var import_navigation2 = require("next/navigation");
|
|
|
5762
5788
|
|
|
5763
5789
|
// src/components/dataForm/NoContentView.tsx
|
|
5764
5790
|
var import_react52 = __toESM(require("react"));
|
|
5765
|
-
var
|
|
5791
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
5766
5792
|
var NoContentView = (props) => {
|
|
5767
|
-
return /* @__PURE__ */ (0,
|
|
5793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react52.default.Fragment, { children: props.isDataFound === false && props.children });
|
|
5768
5794
|
};
|
|
5769
5795
|
var NoContentView_default = NoContentView;
|
|
5770
5796
|
|
|
5771
5797
|
// src/components/dataForm/ContentView.tsx
|
|
5772
5798
|
var import_react53 = __toESM(require("react"));
|
|
5773
|
-
var
|
|
5799
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
5774
5800
|
var ContentView = (props) => {
|
|
5775
|
-
return /* @__PURE__ */ (0,
|
|
5776
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
5777
|
-
/* @__PURE__ */ (0,
|
|
5778
|
-
/* @__PURE__ */ (0,
|
|
5779
|
-
/* @__PURE__ */ (0,
|
|
5780
|
-
/* @__PURE__ */ (0,
|
|
5781
|
-
/* @__PURE__ */ (0,
|
|
5801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_react53.default.Fragment, { children: [
|
|
5802
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
5803
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
5804
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
5805
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "ml-2", children: [
|
|
5806
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
5807
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
5782
5808
|
] })
|
|
5783
5809
|
] }),
|
|
5784
|
-
/* @__PURE__ */ (0,
|
|
5785
|
-
/* @__PURE__ */ (0,
|
|
5786
|
-
/* @__PURE__ */ (0,
|
|
5787
|
-
/* @__PURE__ */ (0,
|
|
5788
|
-
/* @__PURE__ */ (0,
|
|
5789
|
-
/* @__PURE__ */ (0,
|
|
5790
|
-
/* @__PURE__ */ (0,
|
|
5810
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
5811
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "animate-pulse", children: [
|
|
5812
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
5813
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
5814
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
5815
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
5816
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
5791
5817
|
] }),
|
|
5792
|
-
/* @__PURE__ */ (0,
|
|
5793
|
-
/* @__PURE__ */ (0,
|
|
5794
|
-
/* @__PURE__ */ (0,
|
|
5795
|
-
/* @__PURE__ */ (0,
|
|
5796
|
-
/* @__PURE__ */ (0,
|
|
5797
|
-
/* @__PURE__ */ (0,
|
|
5818
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "animate-pulse", children: [
|
|
5819
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
5820
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
5821
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
5822
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
5823
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
5798
5824
|
] }),
|
|
5799
|
-
/* @__PURE__ */ (0,
|
|
5800
|
-
/* @__PURE__ */ (0,
|
|
5801
|
-
/* @__PURE__ */ (0,
|
|
5802
|
-
/* @__PURE__ */ (0,
|
|
5803
|
-
/* @__PURE__ */ (0,
|
|
5804
|
-
/* @__PURE__ */ (0,
|
|
5825
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "animate-pulse", children: [
|
|
5826
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
5827
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
5828
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
5829
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
5830
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
5805
5831
|
] })
|
|
5806
5832
|
] })
|
|
5807
5833
|
] }) }),
|
|
@@ -5812,7 +5838,7 @@ var ContentView_default = ContentView;
|
|
|
5812
5838
|
|
|
5813
5839
|
// src/components/dataForm/DataList.tsx
|
|
5814
5840
|
init_StyleTypes();
|
|
5815
|
-
var
|
|
5841
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
5816
5842
|
var DataList = (props) => {
|
|
5817
5843
|
console.log(props.dataset, "datasetssssss");
|
|
5818
5844
|
const router = (0, import_navigation2.useRouter)();
|
|
@@ -5835,7 +5861,7 @@ var DataList = (props) => {
|
|
|
5835
5861
|
if (path.includes(".")) {
|
|
5836
5862
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
5837
5863
|
} else if (Array.isArray(obj[path])) {
|
|
5838
|
-
return obj[path].map((item, index) => /* @__PURE__ */ (0,
|
|
5864
|
+
return obj[path].map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { children: item }, index));
|
|
5839
5865
|
} else {
|
|
5840
5866
|
return obj[path];
|
|
5841
5867
|
}
|
|
@@ -5891,30 +5917,30 @@ var DataList = (props) => {
|
|
|
5891
5917
|
const renderPageNumbers = () => {
|
|
5892
5918
|
if (pages <= 10) {
|
|
5893
5919
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
5894
|
-
(page) => /* @__PURE__ */ (0,
|
|
5920
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_react54.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
5895
5921
|
Hyperlink,
|
|
5896
5922
|
{
|
|
5897
5923
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
5898
5924
|
href: builder.getNewPageUrl(page),
|
|
5899
5925
|
children: page
|
|
5900
5926
|
}
|
|
5901
|
-
) : /* @__PURE__ */ (0,
|
|
5927
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)
|
|
5902
5928
|
);
|
|
5903
5929
|
} else {
|
|
5904
5930
|
const showFirstPages = activePageNumber <= 5;
|
|
5905
5931
|
const showLastPages = activePageNumber > pages - 5;
|
|
5906
5932
|
if (showFirstPages) {
|
|
5907
|
-
return /* @__PURE__ */ (0,
|
|
5908
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0,
|
|
5933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
|
|
5934
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_react54.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
5909
5935
|
Hyperlink,
|
|
5910
5936
|
{
|
|
5911
5937
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
5912
5938
|
href: builder.getNewPageUrl(page),
|
|
5913
5939
|
children: page
|
|
5914
5940
|
}
|
|
5915
|
-
) : /* @__PURE__ */ (0,
|
|
5916
|
-
/* @__PURE__ */ (0,
|
|
5917
|
-
/* @__PURE__ */ (0,
|
|
5941
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)),
|
|
5942
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
5943
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
5918
5944
|
Hyperlink,
|
|
5919
5945
|
{
|
|
5920
5946
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5922,7 +5948,7 @@ var DataList = (props) => {
|
|
|
5922
5948
|
children: pages - 1
|
|
5923
5949
|
}
|
|
5924
5950
|
),
|
|
5925
|
-
/* @__PURE__ */ (0,
|
|
5951
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
5926
5952
|
Hyperlink,
|
|
5927
5953
|
{
|
|
5928
5954
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5930,7 +5956,7 @@ var DataList = (props) => {
|
|
|
5930
5956
|
children: pages
|
|
5931
5957
|
}
|
|
5932
5958
|
),
|
|
5933
|
-
/* @__PURE__ */ (0,
|
|
5959
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
5934
5960
|
"select",
|
|
5935
5961
|
{
|
|
5936
5962
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -5942,18 +5968,18 @@ var DataList = (props) => {
|
|
|
5942
5968
|
}
|
|
5943
5969
|
},
|
|
5944
5970
|
children: [
|
|
5945
|
-
/* @__PURE__ */ (0,
|
|
5971
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("option", { className: "", value: "", children: "Jump to" }),
|
|
5946
5972
|
Array.from(
|
|
5947
5973
|
{ length: Math.max(0, pages - 10) },
|
|
5948
5974
|
(_, index) => index + 9
|
|
5949
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
5975
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("option", { value: page, children: page }, page))
|
|
5950
5976
|
]
|
|
5951
5977
|
}
|
|
5952
5978
|
) })
|
|
5953
5979
|
] });
|
|
5954
5980
|
} else if (showLastPages) {
|
|
5955
|
-
return /* @__PURE__ */ (0,
|
|
5956
|
-
/* @__PURE__ */ (0,
|
|
5981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
|
|
5982
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
5957
5983
|
Hyperlink,
|
|
5958
5984
|
{
|
|
5959
5985
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5961,7 +5987,7 @@ var DataList = (props) => {
|
|
|
5961
5987
|
children: "1"
|
|
5962
5988
|
}
|
|
5963
5989
|
),
|
|
5964
|
-
/* @__PURE__ */ (0,
|
|
5990
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
5965
5991
|
Hyperlink,
|
|
5966
5992
|
{
|
|
5967
5993
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5969,21 +5995,21 @@ var DataList = (props) => {
|
|
|
5969
5995
|
children: "2"
|
|
5970
5996
|
}
|
|
5971
5997
|
),
|
|
5972
|
-
/* @__PURE__ */ (0,
|
|
5998
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
5973
5999
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
5974
|
-
(page) => /* @__PURE__ */ (0,
|
|
6000
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_react54.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
5975
6001
|
Hyperlink,
|
|
5976
6002
|
{
|
|
5977
6003
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
5978
6004
|
href: builder.getNewPageUrl(page),
|
|
5979
6005
|
children: page
|
|
5980
6006
|
}
|
|
5981
|
-
) : /* @__PURE__ */ (0,
|
|
6007
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)
|
|
5982
6008
|
)
|
|
5983
6009
|
] });
|
|
5984
6010
|
} else {
|
|
5985
|
-
return /* @__PURE__ */ (0,
|
|
5986
|
-
/* @__PURE__ */ (0,
|
|
6011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
|
|
6012
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
5987
6013
|
Hyperlink,
|
|
5988
6014
|
{
|
|
5989
6015
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5991,7 +6017,7 @@ var DataList = (props) => {
|
|
|
5991
6017
|
children: "1"
|
|
5992
6018
|
}
|
|
5993
6019
|
),
|
|
5994
|
-
/* @__PURE__ */ (0,
|
|
6020
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
5995
6021
|
Hyperlink,
|
|
5996
6022
|
{
|
|
5997
6023
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -5999,20 +6025,20 @@ var DataList = (props) => {
|
|
|
5999
6025
|
children: "2"
|
|
6000
6026
|
}
|
|
6001
6027
|
),
|
|
6002
|
-
/* @__PURE__ */ (0,
|
|
6028
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
6003
6029
|
Array.from(
|
|
6004
6030
|
{ length: 5 },
|
|
6005
6031
|
(_, index) => activePageNumber - 2 + index
|
|
6006
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
6032
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_react54.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6007
6033
|
Hyperlink,
|
|
6008
6034
|
{
|
|
6009
6035
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
6010
6036
|
href: builder.getNewPageUrl(page),
|
|
6011
6037
|
children: page
|
|
6012
6038
|
}
|
|
6013
|
-
) : /* @__PURE__ */ (0,
|
|
6014
|
-
/* @__PURE__ */ (0,
|
|
6015
|
-
/* @__PURE__ */ (0,
|
|
6039
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)),
|
|
6040
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
6041
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6016
6042
|
Hyperlink,
|
|
6017
6043
|
{
|
|
6018
6044
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -6020,7 +6046,7 @@ var DataList = (props) => {
|
|
|
6020
6046
|
children: pages - 1
|
|
6021
6047
|
}
|
|
6022
6048
|
),
|
|
6023
|
-
/* @__PURE__ */ (0,
|
|
6049
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6024
6050
|
Hyperlink,
|
|
6025
6051
|
{
|
|
6026
6052
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -6028,7 +6054,7 @@ var DataList = (props) => {
|
|
|
6028
6054
|
children: pages
|
|
6029
6055
|
}
|
|
6030
6056
|
),
|
|
6031
|
-
/* @__PURE__ */ (0,
|
|
6057
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6032
6058
|
"select",
|
|
6033
6059
|
{
|
|
6034
6060
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -6040,8 +6066,8 @@ var DataList = (props) => {
|
|
|
6040
6066
|
}
|
|
6041
6067
|
},
|
|
6042
6068
|
children: [
|
|
6043
|
-
/* @__PURE__ */ (0,
|
|
6044
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0,
|
|
6069
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("option", { value: "", children: "Jump to" }),
|
|
6070
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("option", { value: page, children: page }, page))
|
|
6045
6071
|
]
|
|
6046
6072
|
}
|
|
6047
6073
|
) })
|
|
@@ -6049,16 +6075,16 @@ var DataList = (props) => {
|
|
|
6049
6075
|
}
|
|
6050
6076
|
}
|
|
6051
6077
|
};
|
|
6052
|
-
return /* @__PURE__ */ (0,
|
|
6053
|
-
/* @__PURE__ */ (0,
|
|
6054
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
6078
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_react54.default.Fragment, { children: [
|
|
6079
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(ContentView_default, { isDataFound, children: [
|
|
6080
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6055
6081
|
"div",
|
|
6056
6082
|
{
|
|
6057
6083
|
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`,
|
|
6058
6084
|
children: [
|
|
6059
|
-
props.title ? /* @__PURE__ */ (0,
|
|
6060
|
-
/* @__PURE__ */ (0,
|
|
6061
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
6085
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", {}),
|
|
6086
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
6087
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6062
6088
|
InputControl_default,
|
|
6063
6089
|
{
|
|
6064
6090
|
name: filter.name,
|
|
@@ -6073,15 +6099,15 @@ var DataList = (props) => {
|
|
|
6073
6099
|
},
|
|
6074
6100
|
filter.name
|
|
6075
6101
|
)),
|
|
6076
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
6102
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6077
6103
|
Hyperlink,
|
|
6078
6104
|
{
|
|
6079
6105
|
className: "gap-1",
|
|
6080
6106
|
linkType: "Primary" /* Solid */,
|
|
6081
6107
|
href: props.addLinkHref,
|
|
6082
6108
|
children: [
|
|
6083
|
-
/* @__PURE__ */ (0,
|
|
6084
|
-
/* @__PURE__ */ (0,
|
|
6109
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
6110
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
6085
6111
|
]
|
|
6086
6112
|
}
|
|
6087
6113
|
)
|
|
@@ -6089,8 +6115,8 @@ var DataList = (props) => {
|
|
|
6089
6115
|
]
|
|
6090
6116
|
}
|
|
6091
6117
|
),
|
|
6092
|
-
/* @__PURE__ */ (0,
|
|
6093
|
-
/* @__PURE__ */ (0,
|
|
6118
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
6119
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
6094
6120
|
let url = builder.getNewOrderByUrl(column.name);
|
|
6095
6121
|
let icon = "chevronUpDown";
|
|
6096
6122
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -6100,18 +6126,18 @@ var DataList = (props) => {
|
|
|
6100
6126
|
icon = "chevronUp";
|
|
6101
6127
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
6102
6128
|
}
|
|
6103
|
-
return /* @__PURE__ */ (0,
|
|
6129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6104
6130
|
"th",
|
|
6105
6131
|
{
|
|
6106
6132
|
className: "px-6 py-3 text-left font-medium bg-neutral-soft " + (column.enableSorting ? "cursor-pointer " : "") + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
6107
|
-
children: /* @__PURE__ */ (0,
|
|
6133
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6108
6134
|
Hyperlink,
|
|
6109
6135
|
{
|
|
6110
6136
|
href: column.enableSorting ? url : void 0,
|
|
6111
6137
|
className: "!text-neutral-contrast ",
|
|
6112
|
-
children: /* @__PURE__ */ (0,
|
|
6113
|
-
/* @__PURE__ */ (0,
|
|
6114
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
6138
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
6139
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "text-black", children: column.label }),
|
|
6140
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
6115
6141
|
] })
|
|
6116
6142
|
}
|
|
6117
6143
|
)
|
|
@@ -6119,24 +6145,24 @@ var DataList = (props) => {
|
|
|
6119
6145
|
column.name
|
|
6120
6146
|
);
|
|
6121
6147
|
}) }) }),
|
|
6122
|
-
/* @__PURE__ */ (0,
|
|
6148
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
6123
6149
|
let validityClass = "";
|
|
6124
6150
|
console.log("dataitem", dataitem);
|
|
6125
6151
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
6126
6152
|
validityClass = "bg-alert-200";
|
|
6127
6153
|
}
|
|
6128
|
-
return /* @__PURE__ */ (0,
|
|
6154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
6129
6155
|
console.log("column", column);
|
|
6130
|
-
return /* @__PURE__ */ (0,
|
|
6156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_react54.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6131
6157
|
"td",
|
|
6132
6158
|
{
|
|
6133
6159
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
6134
|
-
children: column.addhref === true ? /* @__PURE__ */ (0,
|
|
6160
|
+
children: column.addhref === true ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6135
6161
|
Hyperlink,
|
|
6136
6162
|
{
|
|
6137
6163
|
className: "",
|
|
6138
6164
|
href: `https://${dataitem[column.name]}`,
|
|
6139
|
-
children: /* @__PURE__ */ (0,
|
|
6165
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6140
6166
|
ViewControl_default,
|
|
6141
6167
|
{
|
|
6142
6168
|
controlType: column.controlType,
|
|
@@ -6149,11 +6175,11 @@ var DataList = (props) => {
|
|
|
6149
6175
|
}
|
|
6150
6176
|
)
|
|
6151
6177
|
}
|
|
6152
|
-
) : column.showAsLink ? /* @__PURE__ */ (0,
|
|
6178
|
+
) : column.showAsLink ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6153
6179
|
Hyperlink,
|
|
6154
6180
|
{
|
|
6155
6181
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
6156
|
-
children: /* @__PURE__ */ (0,
|
|
6182
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6157
6183
|
ViewControl_default,
|
|
6158
6184
|
{
|
|
6159
6185
|
controlType: column.controlType,
|
|
@@ -6163,7 +6189,7 @@ var DataList = (props) => {
|
|
|
6163
6189
|
}
|
|
6164
6190
|
)
|
|
6165
6191
|
}
|
|
6166
|
-
) : /* @__PURE__ */ (0,
|
|
6192
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6167
6193
|
ViewControl_default,
|
|
6168
6194
|
{
|
|
6169
6195
|
controlType: column.controlType,
|
|
@@ -6177,10 +6203,10 @@ var DataList = (props) => {
|
|
|
6177
6203
|
}) }, index);
|
|
6178
6204
|
}) })
|
|
6179
6205
|
] }) }),
|
|
6180
|
-
/* @__PURE__ */ (0,
|
|
6181
|
-
/* @__PURE__ */ (0,
|
|
6182
|
-
/* @__PURE__ */ (0,
|
|
6183
|
-
activePageNumber > 1 && /* @__PURE__ */ (0,
|
|
6206
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
6207
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "text-gray-700", children: label }),
|
|
6208
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex space-x-2 items-center", children: [
|
|
6209
|
+
activePageNumber > 1 && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6184
6210
|
Hyperlink,
|
|
6185
6211
|
{
|
|
6186
6212
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -6188,9 +6214,9 @@ var DataList = (props) => {
|
|
|
6188
6214
|
children: "Prev"
|
|
6189
6215
|
}
|
|
6190
6216
|
),
|
|
6191
|
-
activePageNumber <= 1 && /* @__PURE__ */ (0,
|
|
6217
|
+
activePageNumber <= 1 && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("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" }),
|
|
6192
6218
|
renderPageNumbers(),
|
|
6193
|
-
activePageNumber < pages && /* @__PURE__ */ (0,
|
|
6219
|
+
activePageNumber < pages && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6194
6220
|
Hyperlink,
|
|
6195
6221
|
{
|
|
6196
6222
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -6198,19 +6224,19 @@ var DataList = (props) => {
|
|
|
6198
6224
|
children: "Next"
|
|
6199
6225
|
}
|
|
6200
6226
|
),
|
|
6201
|
-
activePageNumber >= pages && /* @__PURE__ */ (0,
|
|
6227
|
+
activePageNumber >= pages && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
6202
6228
|
] })
|
|
6203
6229
|
] }) })
|
|
6204
6230
|
] }),
|
|
6205
|
-
/* @__PURE__ */ (0,
|
|
6206
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
6231
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(NoContentView_default, { isDataFound, children: [
|
|
6232
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6207
6233
|
"div",
|
|
6208
6234
|
{
|
|
6209
6235
|
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`,
|
|
6210
6236
|
children: [
|
|
6211
|
-
props.title ? /* @__PURE__ */ (0,
|
|
6212
|
-
/* @__PURE__ */ (0,
|
|
6213
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
6237
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", {}),
|
|
6238
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
6239
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6214
6240
|
InputControl_default,
|
|
6215
6241
|
{
|
|
6216
6242
|
name: filter.name,
|
|
@@ -6225,15 +6251,15 @@ var DataList = (props) => {
|
|
|
6225
6251
|
},
|
|
6226
6252
|
filter.name
|
|
6227
6253
|
)),
|
|
6228
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
6254
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6229
6255
|
Hyperlink,
|
|
6230
6256
|
{
|
|
6231
6257
|
className: "gap-1",
|
|
6232
6258
|
linkType: "Primary" /* Solid */,
|
|
6233
6259
|
href: props.addLinkHref,
|
|
6234
6260
|
children: [
|
|
6235
|
-
/* @__PURE__ */ (0,
|
|
6236
|
-
/* @__PURE__ */ (0,
|
|
6261
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
6262
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
6237
6263
|
]
|
|
6238
6264
|
}
|
|
6239
6265
|
)
|
|
@@ -6241,8 +6267,8 @@ var DataList = (props) => {
|
|
|
6241
6267
|
]
|
|
6242
6268
|
}
|
|
6243
6269
|
),
|
|
6244
|
-
/* @__PURE__ */ (0,
|
|
6245
|
-
/* @__PURE__ */ (0,
|
|
6270
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
6271
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("thead", { className: "bg-gray-50", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
6246
6272
|
let url = builder.getNewOrderByUrl(column.name);
|
|
6247
6273
|
let icon = "chevronUpDown";
|
|
6248
6274
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -6252,18 +6278,18 @@ var DataList = (props) => {
|
|
|
6252
6278
|
icon = "chevronUp";
|
|
6253
6279
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
6254
6280
|
}
|
|
6255
|
-
return /* @__PURE__ */ (0,
|
|
6281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6256
6282
|
"th",
|
|
6257
6283
|
{
|
|
6258
6284
|
className: "px-6 py-3 text-left font-medium bg-neutral-soft " + (column.enableSorting ? "cursor-pointer " : "") + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
6259
|
-
children: /* @__PURE__ */ (0,
|
|
6285
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6260
6286
|
Hyperlink,
|
|
6261
6287
|
{
|
|
6262
6288
|
href: column.enableSorting ? url : void 0,
|
|
6263
6289
|
className: "text-body-950",
|
|
6264
|
-
children: /* @__PURE__ */ (0,
|
|
6265
|
-
/* @__PURE__ */ (0,
|
|
6266
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
6290
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
6291
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { children: column.label }),
|
|
6292
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
6267
6293
|
] })
|
|
6268
6294
|
}
|
|
6269
6295
|
)
|
|
@@ -6271,7 +6297,7 @@ var DataList = (props) => {
|
|
|
6271
6297
|
column.name
|
|
6272
6298
|
);
|
|
6273
6299
|
}) }) }) }) }),
|
|
6274
|
-
/* @__PURE__ */ (0,
|
|
6300
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
6275
6301
|
] })
|
|
6276
6302
|
] })
|
|
6277
6303
|
] });
|
|
@@ -6282,7 +6308,7 @@ var DataList_default = DataList;
|
|
|
6282
6308
|
var import_react55 = __toESM(require("react"));
|
|
6283
6309
|
init_ServiceClient();
|
|
6284
6310
|
var import_navigation3 = require("next/navigation");
|
|
6285
|
-
var
|
|
6311
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
6286
6312
|
var viewControlMap = {
|
|
6287
6313
|
number: ViewControlTypes.number,
|
|
6288
6314
|
lineText: ViewControlTypes.lineText,
|
|
@@ -6371,9 +6397,9 @@ var DataListRenderer = ({
|
|
|
6371
6397
|
const [tabItem, setTabItem] = (0, import_react55.useState)();
|
|
6372
6398
|
const activeTab = tabItem?.find((tab) => tab.isActive);
|
|
6373
6399
|
const activeHref = activeTab ? resolveRoutePlaceholders2(activeTab.landingPageUrl, params) : pathname;
|
|
6374
|
-
return /* @__PURE__ */ (0,
|
|
6375
|
-
widgetProps && /* @__PURE__ */ (0,
|
|
6376
|
-
/* @__PURE__ */ (0,
|
|
6400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_react55.default.Fragment, { children: [
|
|
6401
|
+
widgetProps && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
6402
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6377
6403
|
DataList_default,
|
|
6378
6404
|
{
|
|
6379
6405
|
addLinkHref,
|
|
@@ -6423,7 +6449,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
6423
6449
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
6424
6450
|
|
|
6425
6451
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
6426
|
-
var
|
|
6452
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
6427
6453
|
var DataFormChildSection = (props) => {
|
|
6428
6454
|
const { section } = props;
|
|
6429
6455
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -6491,14 +6517,14 @@ var DataFormChildSection = (props) => {
|
|
|
6491
6517
|
childItemsToRender,
|
|
6492
6518
|
allChildItems: childItems
|
|
6493
6519
|
});
|
|
6494
|
-
return /* @__PURE__ */ (0,
|
|
6495
|
-
section.sectionTitle && /* @__PURE__ */ (0,
|
|
6496
|
-
/* @__PURE__ */ (0,
|
|
6497
|
-
/* @__PURE__ */ (0,
|
|
6498
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0,
|
|
6499
|
-
return /* @__PURE__ */ (0,
|
|
6520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react56.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
6521
|
+
section.sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
6522
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
6523
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
6524
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
6525
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("tr", { className: "", children: [
|
|
6500
6526
|
sectionRow.elements.map((field, index) => {
|
|
6501
|
-
return /* @__PURE__ */ (0,
|
|
6527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6502
6528
|
"th",
|
|
6503
6529
|
{
|
|
6504
6530
|
className: "py-3 font-normal text-left",
|
|
@@ -6507,21 +6533,21 @@ var DataFormChildSection = (props) => {
|
|
|
6507
6533
|
field.name
|
|
6508
6534
|
);
|
|
6509
6535
|
}),
|
|
6510
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
6536
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
6511
6537
|
] }, sectionRowIndex);
|
|
6512
6538
|
}) }),
|
|
6513
|
-
/* @__PURE__ */ (0,
|
|
6539
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
6514
6540
|
const { item, originalIndex } = visibleItem;
|
|
6515
6541
|
const rowKey = originalIndex;
|
|
6516
|
-
return /* @__PURE__ */ (0,
|
|
6542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react56.default.Fragment, { children: section.sectionRows.map(
|
|
6517
6543
|
(sectionRow, sectionRowIndex) => {
|
|
6518
|
-
return /* @__PURE__ */ (0,
|
|
6544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
6519
6545
|
"tr",
|
|
6520
6546
|
{
|
|
6521
6547
|
className: "",
|
|
6522
6548
|
children: [
|
|
6523
6549
|
sectionRow.elements.map((field, index) => {
|
|
6524
|
-
return /* @__PURE__ */ (0,
|
|
6550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "w-11/12", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6525
6551
|
InputControl_default,
|
|
6526
6552
|
{
|
|
6527
6553
|
index: filteredIndex,
|
|
@@ -6541,7 +6567,7 @@ var DataFormChildSection = (props) => {
|
|
|
6541
6567
|
}
|
|
6542
6568
|
) }) }) }, field.name);
|
|
6543
6569
|
}),
|
|
6544
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
6570
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6545
6571
|
ClientButton_default,
|
|
6546
6572
|
{
|
|
6547
6573
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -6550,7 +6576,7 @@ var DataFormChildSection = (props) => {
|
|
|
6550
6576
|
},
|
|
6551
6577
|
dataRole: "delete",
|
|
6552
6578
|
tabIndex: -1,
|
|
6553
|
-
children: /* @__PURE__ */ (0,
|
|
6579
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6554
6580
|
Icon_default,
|
|
6555
6581
|
{
|
|
6556
6582
|
className: "w-4 h-4",
|
|
@@ -6567,7 +6593,7 @@ var DataFormChildSection = (props) => {
|
|
|
6567
6593
|
) }, rowKey);
|
|
6568
6594
|
}) })
|
|
6569
6595
|
] }) }),
|
|
6570
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
6596
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
6571
6597
|
ClientButton_default,
|
|
6572
6598
|
{
|
|
6573
6599
|
ButtonType: "Link" /* Link */,
|
|
@@ -6582,7 +6608,7 @@ var DataFormChildSection = (props) => {
|
|
|
6582
6608
|
var DataFormChildSection_default = DataFormChildSection;
|
|
6583
6609
|
|
|
6584
6610
|
// src/components/dataForm/DataForm.tsx
|
|
6585
|
-
var
|
|
6611
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
6586
6612
|
var DataForm = (props) => {
|
|
6587
6613
|
const formRef = (0, import_react57.useRef)(null);
|
|
6588
6614
|
console.log(props.dataItem, "dssads");
|
|
@@ -6802,19 +6828,19 @@ var DataForm = (props) => {
|
|
|
6802
6828
|
return false;
|
|
6803
6829
|
}
|
|
6804
6830
|
}
|
|
6805
|
-
return /* @__PURE__ */ (0,
|
|
6806
|
-
props.title && /* @__PURE__ */ (0,
|
|
6831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react57.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
6832
|
+
props.title && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "inline-flex items-center gap-2 px-6 py-3 border border-neutral-200 bg-white shadow-sm rounded-t-md", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
6807
6833
|
"div",
|
|
6808
6834
|
{
|
|
6809
6835
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
6810
6836
|
onClick: () => window.history.back(),
|
|
6811
6837
|
children: [
|
|
6812
|
-
/* @__PURE__ */ (0,
|
|
6813
|
-
/* @__PURE__ */ (0,
|
|
6838
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
6839
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
6814
6840
|
]
|
|
6815
6841
|
}
|
|
6816
6842
|
) }),
|
|
6817
|
-
/* @__PURE__ */ (0,
|
|
6843
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6818
6844
|
"form",
|
|
6819
6845
|
{
|
|
6820
6846
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -6835,8 +6861,8 @@ var DataForm = (props) => {
|
|
|
6835
6861
|
}
|
|
6836
6862
|
}
|
|
6837
6863
|
},
|
|
6838
|
-
children: /* @__PURE__ */ (0,
|
|
6839
|
-
return /* @__PURE__ */ (0,
|
|
6864
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
6865
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react57.default.Fragment, { children: !section.isChildSection && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
6840
6866
|
section.sectionRows?.map(
|
|
6841
6867
|
(sectionRow, sectionRowIndex) => {
|
|
6842
6868
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -6847,14 +6873,14 @@ var DataForm = (props) => {
|
|
|
6847
6873
|
sectionRow.visible
|
|
6848
6874
|
);
|
|
6849
6875
|
}
|
|
6850
|
-
return /* @__PURE__ */ (0,
|
|
6851
|
-
return /* @__PURE__ */ (0,
|
|
6876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react57.default.Fragment, { children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
6877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
6852
6878
|
"div",
|
|
6853
6879
|
{
|
|
6854
6880
|
className: sectionRow.grow ? "grow" : "",
|
|
6855
6881
|
children: [
|
|
6856
|
-
/* @__PURE__ */ (0,
|
|
6857
|
-
/* @__PURE__ */ (0,
|
|
6882
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { children: field.controlType }),
|
|
6883
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6858
6884
|
InputControl_default,
|
|
6859
6885
|
{
|
|
6860
6886
|
name: field.name,
|
|
@@ -6884,12 +6910,12 @@ var DataForm = (props) => {
|
|
|
6884
6910
|
}) }) }, sectionRowIndex);
|
|
6885
6911
|
}
|
|
6886
6912
|
),
|
|
6887
|
-
/* @__PURE__ */ (0,
|
|
6913
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { children: section.childSections?.map(
|
|
6888
6914
|
(childSection, childSectionIndex) => {
|
|
6889
|
-
return /* @__PURE__ */ (0,
|
|
6915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { children: childSection.name && evalutateCondition(
|
|
6890
6916
|
formState.inputValues,
|
|
6891
6917
|
childSection.visible
|
|
6892
|
-
) && /* @__PURE__ */ (0,
|
|
6918
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6893
6919
|
DataFormChildSection_default,
|
|
6894
6920
|
{
|
|
6895
6921
|
section: childSection,
|
|
@@ -6904,8 +6930,8 @@ var DataForm = (props) => {
|
|
|
6904
6930
|
}) })
|
|
6905
6931
|
}
|
|
6906
6932
|
),
|
|
6907
|
-
/* @__PURE__ */ (0,
|
|
6908
|
-
/* @__PURE__ */ (0,
|
|
6933
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
6934
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { children: props.additionalActions && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6909
6935
|
Button_default,
|
|
6910
6936
|
{
|
|
6911
6937
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -6913,7 +6939,7 @@ var DataForm = (props) => {
|
|
|
6913
6939
|
children: props.additionalActions.title
|
|
6914
6940
|
}
|
|
6915
6941
|
) }),
|
|
6916
|
-
/* @__PURE__ */ (0,
|
|
6942
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { children: props.onDelete && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6917
6943
|
Button_default,
|
|
6918
6944
|
{
|
|
6919
6945
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -6924,7 +6950,7 @@ var DataForm = (props) => {
|
|
|
6924
6950
|
children: "Delete"
|
|
6925
6951
|
}
|
|
6926
6952
|
) }),
|
|
6927
|
-
/* @__PURE__ */ (0,
|
|
6953
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { children: props.onClick && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
6928
6954
|
Button_default,
|
|
6929
6955
|
{
|
|
6930
6956
|
onValidate,
|
|
@@ -6942,7 +6968,7 @@ var DataForm_default = DataForm;
|
|
|
6942
6968
|
|
|
6943
6969
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
6944
6970
|
init_ServiceClient();
|
|
6945
|
-
var
|
|
6971
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
6946
6972
|
function getAction(actions, code) {
|
|
6947
6973
|
return actions?.find((a) => a.actionCode === code);
|
|
6948
6974
|
}
|
|
@@ -6968,9 +6994,9 @@ var DataFormRenderer = ({
|
|
|
6968
6994
|
"Delete"
|
|
6969
6995
|
);
|
|
6970
6996
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
6971
|
-
return /* @__PURE__ */ (0,
|
|
6972
|
-
widgetProps && /* @__PURE__ */ (0,
|
|
6973
|
-
/* @__PURE__ */ (0,
|
|
6997
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
6998
|
+
widgetProps && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
6999
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
6974
7000
|
DataForm_default,
|
|
6975
7001
|
{
|
|
6976
7002
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|