@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260903053106 → 0.8.1-dev.20260903094942
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/AvatarViewClient-4GOKYZYT.mjs +108 -0
- package/dist/AvatarViewClient-S3GJZZZS.mjs +106 -0
- package/dist/{DataBindingControls-GWNAJ7PR.mjs → DataBindingControls-UUDERFAD.mjs} +1 -1
- package/dist/{chunk-Q3LFGHLM.mjs → chunk-7JWVEYJY.mjs} +1 -1
- package/dist/index.js +380 -314
- package/dist/index.mjs +306 -351
- package/dist/server.js +293 -227
- package/dist/server.mjs +136 -181
- package/package.json +1 -1
- package/dist/{InputControlClient-GRH7VSJR.mjs → InputControlClient-5NX4CEZB.mjs} +5 -5
- package/dist/{Pagination-PGAK7KDA.mjs → Pagination-CQKMBXXJ.mjs} +1 -1
package/dist/server.js
CHANGED
|
@@ -2857,15 +2857,126 @@ var init_CommentRendererClient = __esm({
|
|
|
2857
2857
|
}
|
|
2858
2858
|
});
|
|
2859
2859
|
|
|
2860
|
+
// src/components/controls/view/AvatarViewClient.tsx
|
|
2861
|
+
var AvatarViewClient_exports = {};
|
|
2862
|
+
__export(AvatarViewClient_exports, {
|
|
2863
|
+
default: () => AvatarViewClient_default
|
|
2864
|
+
});
|
|
2865
|
+
var import_react26, import_jsx_runtime39, AVATAR_COLORS, getAvatarColor, getInitials, getContactImageInfo, AvatarViewClient, AvatarViewClient_default;
|
|
2866
|
+
var init_AvatarViewClient = __esm({
|
|
2867
|
+
"src/components/controls/view/AvatarViewClient.tsx"() {
|
|
2868
|
+
"use strict";
|
|
2869
|
+
"use client";
|
|
2870
|
+
import_react26 = __toESM(require("react"));
|
|
2871
|
+
init_AssetUtility();
|
|
2872
|
+
import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2873
|
+
AVATAR_COLORS = [
|
|
2874
|
+
"bg-error-strong",
|
|
2875
|
+
"bg-accent-base",
|
|
2876
|
+
"bg-warning-base",
|
|
2877
|
+
"bg-success-base",
|
|
2878
|
+
"bg-info-base",
|
|
2879
|
+
"bg-primary-base",
|
|
2880
|
+
"bg-secondary-base"
|
|
2881
|
+
];
|
|
2882
|
+
getAvatarColor = (text) => {
|
|
2883
|
+
let hash = 0;
|
|
2884
|
+
for (let i = 0; i < text.length; i += 1) {
|
|
2885
|
+
hash = hash * 31 + text.charCodeAt(i) >>> 0;
|
|
2886
|
+
}
|
|
2887
|
+
return AVATAR_COLORS[hash % AVATAR_COLORS.length];
|
|
2888
|
+
};
|
|
2889
|
+
getInitials = (text) => {
|
|
2890
|
+
const words = text.trim().split(/\s+/).filter(Boolean);
|
|
2891
|
+
if (words.length === 0) {
|
|
2892
|
+
return "?";
|
|
2893
|
+
}
|
|
2894
|
+
if (words.length === 1) {
|
|
2895
|
+
return words[0].slice(0, 2).toUpperCase();
|
|
2896
|
+
}
|
|
2897
|
+
return `${words[0][0]}${words[words.length - 1][0]}`.toUpperCase();
|
|
2898
|
+
};
|
|
2899
|
+
getContactImageInfo = (text) => {
|
|
2900
|
+
if (!text.includes("-")) {
|
|
2901
|
+
return null;
|
|
2902
|
+
}
|
|
2903
|
+
const parts = text.split("-");
|
|
2904
|
+
if (parts.length <= 1) {
|
|
2905
|
+
return null;
|
|
2906
|
+
}
|
|
2907
|
+
const first = parts[0].trim();
|
|
2908
|
+
if (!/^\d+$/.test(first)) {
|
|
2909
|
+
return null;
|
|
2910
|
+
}
|
|
2911
|
+
return {
|
|
2912
|
+
contactId: first,
|
|
2913
|
+
name: parts.slice(1).join("-").trim() || text
|
|
2914
|
+
};
|
|
2915
|
+
};
|
|
2916
|
+
AvatarViewClient = (props) => {
|
|
2917
|
+
const text = props.value === null || props.value === void 0 ? "" : String(props.value).trim();
|
|
2918
|
+
const [imageFailed, setImageFailed] = import_react26.default.useState(false);
|
|
2919
|
+
import_react26.default.useEffect(() => {
|
|
2920
|
+
setImageFailed(false);
|
|
2921
|
+
}, [text, props.assetBaseUrl]);
|
|
2922
|
+
if (!text) {
|
|
2923
|
+
return null;
|
|
2924
|
+
}
|
|
2925
|
+
const size = props.width ?? "1.75rem";
|
|
2926
|
+
const contactInfo = getContactImageInfo(text);
|
|
2927
|
+
const imageUrl = contactInfo ? AssetUtility_default.resolveUrl(
|
|
2928
|
+
props.assetBaseUrl,
|
|
2929
|
+
`itemassets/contacts/contact-${contactInfo.contactId}`
|
|
2930
|
+
) : void 0;
|
|
2931
|
+
const displayName = contactInfo?.name ?? text;
|
|
2932
|
+
if (imageUrl && !imageFailed) {
|
|
2933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2934
|
+
"img",
|
|
2935
|
+
{
|
|
2936
|
+
className: "avatar-view inline-block flex-shrink-0 rounded-full object-cover select-none",
|
|
2937
|
+
src: imageUrl,
|
|
2938
|
+
alt: displayName,
|
|
2939
|
+
title: displayName,
|
|
2940
|
+
"aria-label": displayName,
|
|
2941
|
+
loading: "lazy",
|
|
2942
|
+
onError: () => setImageFailed(true),
|
|
2943
|
+
style: {
|
|
2944
|
+
width: size,
|
|
2945
|
+
height: size
|
|
2946
|
+
}
|
|
2947
|
+
}
|
|
2948
|
+
);
|
|
2949
|
+
}
|
|
2950
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2951
|
+
"span",
|
|
2952
|
+
{
|
|
2953
|
+
className: `avatar-view inline-flex flex-shrink-0 items-center justify-center rounded-full font-semibold uppercase select-none overflow-hidden ${getAvatarColor(displayName)}`,
|
|
2954
|
+
title: displayName,
|
|
2955
|
+
"aria-label": displayName,
|
|
2956
|
+
style: {
|
|
2957
|
+
width: size,
|
|
2958
|
+
height: size,
|
|
2959
|
+
fontSize: "0.6875rem",
|
|
2960
|
+
letterSpacing: "0.02em",
|
|
2961
|
+
lineHeight: 1
|
|
2962
|
+
},
|
|
2963
|
+
children: getInitials(displayName)
|
|
2964
|
+
}
|
|
2965
|
+
);
|
|
2966
|
+
};
|
|
2967
|
+
AvatarViewClient_default = AvatarViewClient;
|
|
2968
|
+
}
|
|
2969
|
+
});
|
|
2970
|
+
|
|
2860
2971
|
// src/components/CopyButton.tsx
|
|
2861
2972
|
var CopyButton_exports = {};
|
|
2862
2973
|
__export(CopyButton_exports, {
|
|
2863
2974
|
default: () => CopyButton
|
|
2864
2975
|
});
|
|
2865
2976
|
function CopyButton({ text }) {
|
|
2866
|
-
const [copied, setCopied] = (0,
|
|
2867
|
-
const timeoutRef = (0,
|
|
2868
|
-
(0,
|
|
2977
|
+
const [copied, setCopied] = (0, import_react33.useState)(false);
|
|
2978
|
+
const timeoutRef = (0, import_react33.useRef)(null);
|
|
2979
|
+
(0, import_react33.useEffect)(() => {
|
|
2869
2980
|
return () => {
|
|
2870
2981
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
2871
2982
|
};
|
|
@@ -2909,25 +3020,25 @@ function CopyButton({ text }) {
|
|
|
2909
3020
|
}
|
|
2910
3021
|
);
|
|
2911
3022
|
}
|
|
2912
|
-
var
|
|
3023
|
+
var import_react33, import_jsx_runtime47;
|
|
2913
3024
|
var init_CopyButton = __esm({
|
|
2914
3025
|
"src/components/CopyButton.tsx"() {
|
|
2915
3026
|
"use strict";
|
|
2916
3027
|
"use client";
|
|
2917
|
-
|
|
3028
|
+
import_react33 = require("react");
|
|
2918
3029
|
import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2919
3030
|
}
|
|
2920
3031
|
});
|
|
2921
3032
|
|
|
2922
3033
|
// src/components/IFrameLoaderView.tsx
|
|
2923
|
-
var
|
|
3034
|
+
var import_react36, import_jsx_runtime51, IFrameLoaderView, IFrameLoaderView_default;
|
|
2924
3035
|
var init_IFrameLoaderView = __esm({
|
|
2925
3036
|
"src/components/IFrameLoaderView.tsx"() {
|
|
2926
3037
|
"use strict";
|
|
2927
|
-
|
|
3038
|
+
import_react36 = __toESM(require("react"));
|
|
2928
3039
|
import_jsx_runtime51 = require("react/jsx-runtime");
|
|
2929
3040
|
IFrameLoaderView = (props) => {
|
|
2930
|
-
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
3041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_react36.default.Fragment, { children: [
|
|
2931
3042
|
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
2932
3043
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
2933
3044
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
@@ -2972,12 +3083,12 @@ var IframeClient_exports = {};
|
|
|
2972
3083
|
__export(IframeClient_exports, {
|
|
2973
3084
|
default: () => IframeClient_default
|
|
2974
3085
|
});
|
|
2975
|
-
var
|
|
3086
|
+
var import_react37, import_jsx_runtime52, IframeClient, IframeClient_default;
|
|
2976
3087
|
var init_IframeClient = __esm({
|
|
2977
3088
|
"src/components/pageRenderingEngine/nodes/IframeClient.tsx"() {
|
|
2978
3089
|
"use strict";
|
|
2979
3090
|
"use client";
|
|
2980
|
-
|
|
3091
|
+
import_react37 = __toESM(require("react"));
|
|
2981
3092
|
init_IFrameLoaderView();
|
|
2982
3093
|
import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2983
3094
|
IframeClient = ({
|
|
@@ -2985,10 +3096,10 @@ var init_IframeClient = __esm({
|
|
|
2985
3096
|
width,
|
|
2986
3097
|
height
|
|
2987
3098
|
}) => {
|
|
2988
|
-
const iframeRef = (0,
|
|
2989
|
-
const [iframeHeight, setIframeHeight] = (0,
|
|
2990
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
2991
|
-
(0,
|
|
3099
|
+
const iframeRef = (0, import_react37.useRef)(null);
|
|
3100
|
+
const [iframeHeight, setIframeHeight] = (0, import_react37.useState)("100%");
|
|
3101
|
+
const [isDataFound, setIsDataFound] = (0, import_react37.useState)(null);
|
|
3102
|
+
(0, import_react37.useEffect)(() => {
|
|
2992
3103
|
const handleReceiveMessage = (event) => {
|
|
2993
3104
|
const eventName = event?.data?.eventName;
|
|
2994
3105
|
const payload = event?.data?.payload;
|
|
@@ -3003,7 +3114,7 @@ var init_IframeClient = __esm({
|
|
|
3003
3114
|
window.addEventListener("message", handleReceiveMessage);
|
|
3004
3115
|
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
3005
3116
|
}, []);
|
|
3006
|
-
(0,
|
|
3117
|
+
(0, import_react37.useEffect)(() => {
|
|
3007
3118
|
const handleResize = () => {
|
|
3008
3119
|
if (iframeRef.current) {
|
|
3009
3120
|
iframeRef.current.contentWindow?.postMessage(
|
|
@@ -3018,7 +3129,7 @@ var init_IframeClient = __esm({
|
|
|
3018
3129
|
const handleIframeLoad = () => {
|
|
3019
3130
|
setIsDataFound(true);
|
|
3020
3131
|
};
|
|
3021
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react37.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3022
3133
|
"iframe",
|
|
3023
3134
|
{
|
|
3024
3135
|
ref: iframeRef,
|
|
@@ -3402,12 +3513,12 @@ var Pagination_exports = {};
|
|
|
3402
3513
|
__export(Pagination_exports, {
|
|
3403
3514
|
default: () => Pagination_default
|
|
3404
3515
|
});
|
|
3405
|
-
var
|
|
3516
|
+
var import_react38, import_jsx_runtime63, Pagination, Pagination_default;
|
|
3406
3517
|
var init_Pagination = __esm({
|
|
3407
3518
|
"src/components/Pagination.tsx"() {
|
|
3408
3519
|
"use strict";
|
|
3409
3520
|
"use client";
|
|
3410
|
-
|
|
3521
|
+
import_react38 = require("react");
|
|
3411
3522
|
init_OdataBuilder();
|
|
3412
3523
|
init_Icon();
|
|
3413
3524
|
init_StyleTypes();
|
|
@@ -3416,7 +3527,7 @@ var init_Pagination = __esm({
|
|
|
3416
3527
|
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
3417
3528
|
Pagination = (props) => {
|
|
3418
3529
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
3419
|
-
const builder = (0,
|
|
3530
|
+
const builder = (0, import_react38.useMemo)(() => {
|
|
3420
3531
|
const b = new OdataBuilder(path);
|
|
3421
3532
|
if (query) b.setQuery(query);
|
|
3422
3533
|
return b;
|
|
@@ -3582,11 +3693,11 @@ var init_Pagination = __esm({
|
|
|
3582
3693
|
});
|
|
3583
3694
|
|
|
3584
3695
|
// src/components/controls/edit/MultilineTextInput.tsx
|
|
3585
|
-
var
|
|
3696
|
+
var import_react39, import_jsx_runtime64, MultilineTextInput, MultilineTextInput_default;
|
|
3586
3697
|
var init_MultilineTextInput = __esm({
|
|
3587
3698
|
"src/components/controls/edit/MultilineTextInput.tsx"() {
|
|
3588
3699
|
"use strict";
|
|
3589
|
-
|
|
3700
|
+
import_react39 = __toESM(require("react"));
|
|
3590
3701
|
import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3591
3702
|
MultilineTextInput = (props) => {
|
|
3592
3703
|
const textChangeHandler = (event) => {
|
|
@@ -3606,7 +3717,7 @@ var init_MultilineTextInput = __esm({
|
|
|
3606
3717
|
if (props.value !== void 0 && props.value !== null) {
|
|
3607
3718
|
value = props.value;
|
|
3608
3719
|
}
|
|
3609
|
-
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react39.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("label", { className: "block mb-1", children: [
|
|
3610
3721
|
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
3611
3722
|
" ",
|
|
3612
3723
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
@@ -3635,11 +3746,11 @@ var init_MultilineTextInput = __esm({
|
|
|
3635
3746
|
});
|
|
3636
3747
|
|
|
3637
3748
|
// src/components/controls/edit/LineTextInput.tsx
|
|
3638
|
-
var
|
|
3749
|
+
var import_react40, import_jsx_runtime65, LineTextInput, LineTextInput_default;
|
|
3639
3750
|
var init_LineTextInput = __esm({
|
|
3640
3751
|
"src/components/controls/edit/LineTextInput.tsx"() {
|
|
3641
3752
|
"use strict";
|
|
3642
|
-
|
|
3753
|
+
import_react40 = __toESM(require("react"));
|
|
3643
3754
|
import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3644
3755
|
LineTextInput = (props) => {
|
|
3645
3756
|
const textChangeHandler = (event) => {
|
|
@@ -3659,7 +3770,7 @@ var init_LineTextInput = __esm({
|
|
|
3659
3770
|
if (props.value !== void 0 && props.value !== null) {
|
|
3660
3771
|
value = props.value;
|
|
3661
3772
|
}
|
|
3662
|
-
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react40.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("label", { className: "block", children: [
|
|
3663
3774
|
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
3664
3775
|
" ",
|
|
3665
3776
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "bg-error-weak !bg-transparent", children: "*" }),
|
|
@@ -3692,11 +3803,11 @@ var init_LineTextInput = __esm({
|
|
|
3692
3803
|
});
|
|
3693
3804
|
|
|
3694
3805
|
// src/components/controls/edit/MoneyInput.tsx
|
|
3695
|
-
var
|
|
3806
|
+
var import_react41, import_jsx_runtime66, MoneyInput, MoneyInput_default;
|
|
3696
3807
|
var init_MoneyInput = __esm({
|
|
3697
3808
|
"src/components/controls/edit/MoneyInput.tsx"() {
|
|
3698
3809
|
"use strict";
|
|
3699
|
-
|
|
3810
|
+
import_react41 = __toESM(require("react"));
|
|
3700
3811
|
import_jsx_runtime66 = require("react/jsx-runtime");
|
|
3701
3812
|
MoneyInput = (props) => {
|
|
3702
3813
|
const textChangeHandler = (event) => {
|
|
@@ -3726,7 +3837,7 @@ var init_MoneyInput = __esm({
|
|
|
3726
3837
|
e.preventDefault();
|
|
3727
3838
|
}
|
|
3728
3839
|
};
|
|
3729
|
-
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react41.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("label", { className: "block mb-1", children: [
|
|
3730
3841
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
3731
3842
|
" ",
|
|
3732
3843
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
@@ -3758,14 +3869,14 @@ var init_MoneyInput = __esm({
|
|
|
3758
3869
|
});
|
|
3759
3870
|
|
|
3760
3871
|
// src/components/controls/edit/Select.tsx
|
|
3761
|
-
var
|
|
3872
|
+
var import_react42, import_jsx_runtime67, Select, Select_default;
|
|
3762
3873
|
var init_Select = __esm({
|
|
3763
3874
|
"src/components/controls/edit/Select.tsx"() {
|
|
3764
3875
|
"use strict";
|
|
3765
|
-
|
|
3876
|
+
import_react42 = require("react");
|
|
3766
3877
|
import_jsx_runtime67 = require("react/jsx-runtime");
|
|
3767
3878
|
Select = (props) => {
|
|
3768
|
-
const [list, setList] = (0,
|
|
3879
|
+
const [list, setList] = (0, import_react42.useState)();
|
|
3769
3880
|
const getSafeValue = (val) => {
|
|
3770
3881
|
if (val === null || val === void 0) return "";
|
|
3771
3882
|
if (typeof val === "boolean") return val ? "1" : "0";
|
|
@@ -3802,7 +3913,7 @@ var init_Select = __esm({
|
|
|
3802
3913
|
groupKey: props.groupKey
|
|
3803
3914
|
});
|
|
3804
3915
|
};
|
|
3805
|
-
(0,
|
|
3916
|
+
(0, import_react42.useEffect)(() => {
|
|
3806
3917
|
async function fetchData() {
|
|
3807
3918
|
if (props.dataset) {
|
|
3808
3919
|
setList(props.dataset);
|
|
@@ -3886,11 +3997,11 @@ var init_Select = __esm({
|
|
|
3886
3997
|
});
|
|
3887
3998
|
|
|
3888
3999
|
// src/components/controls/edit/PercentageInput.tsx
|
|
3889
|
-
var
|
|
4000
|
+
var import_react43, import_jsx_runtime68, PercentageInput, PercentageInput_default;
|
|
3890
4001
|
var init_PercentageInput = __esm({
|
|
3891
4002
|
"src/components/controls/edit/PercentageInput.tsx"() {
|
|
3892
4003
|
"use strict";
|
|
3893
|
-
|
|
4004
|
+
import_react43 = __toESM(require("react"));
|
|
3894
4005
|
import_jsx_runtime68 = require("react/jsx-runtime");
|
|
3895
4006
|
PercentageInput = (props) => {
|
|
3896
4007
|
const textChangeHandler = (event) => {
|
|
@@ -3920,7 +4031,7 @@ var init_PercentageInput = __esm({
|
|
|
3920
4031
|
e.preventDefault();
|
|
3921
4032
|
}
|
|
3922
4033
|
};
|
|
3923
|
-
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
4034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react43.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("label", { className: "block mb-1", children: [
|
|
3924
4035
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label ? props?.attributes?.label + " %" : "" }),
|
|
3925
4036
|
" ",
|
|
3926
4037
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
@@ -3951,11 +4062,11 @@ var init_PercentageInput = __esm({
|
|
|
3951
4062
|
});
|
|
3952
4063
|
|
|
3953
4064
|
// src/components/controls/edit/PhoneInput.tsx
|
|
3954
|
-
var
|
|
4065
|
+
var import_react44, import_jsx_runtime69, PhoneInput, PhoneInput_default;
|
|
3955
4066
|
var init_PhoneInput = __esm({
|
|
3956
4067
|
"src/components/controls/edit/PhoneInput.tsx"() {
|
|
3957
4068
|
"use strict";
|
|
3958
|
-
|
|
4069
|
+
import_react44 = __toESM(require("react"));
|
|
3959
4070
|
import_jsx_runtime69 = require("react/jsx-runtime");
|
|
3960
4071
|
PhoneInput = (props) => {
|
|
3961
4072
|
const textChangeHandler = (event) => {
|
|
@@ -3975,7 +4086,7 @@ var init_PhoneInput = __esm({
|
|
|
3975
4086
|
if (props.value !== void 0 && props.value !== null) {
|
|
3976
4087
|
value = props.value;
|
|
3977
4088
|
}
|
|
3978
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
4089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react44.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("label", { className: "block mb-1", children: [
|
|
3979
4090
|
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
3980
4091
|
" ",
|
|
3981
4092
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
@@ -4007,11 +4118,11 @@ var init_PhoneInput = __esm({
|
|
|
4007
4118
|
});
|
|
4008
4119
|
|
|
4009
4120
|
// src/components/controls/edit/NumberInput.tsx
|
|
4010
|
-
var
|
|
4121
|
+
var import_react45, import_jsx_runtime70, NumberInput, NumberInput_default;
|
|
4011
4122
|
var init_NumberInput = __esm({
|
|
4012
4123
|
"src/components/controls/edit/NumberInput.tsx"() {
|
|
4013
4124
|
"use strict";
|
|
4014
|
-
|
|
4125
|
+
import_react45 = __toESM(require("react"));
|
|
4015
4126
|
import_jsx_runtime70 = require("react/jsx-runtime");
|
|
4016
4127
|
NumberInput = (props) => {
|
|
4017
4128
|
const textChangeHandler = (event) => {
|
|
@@ -4035,7 +4146,7 @@ var init_NumberInput = __esm({
|
|
|
4035
4146
|
if (props.value !== void 0 && props.value !== null) {
|
|
4036
4147
|
value = props.value;
|
|
4037
4148
|
}
|
|
4038
|
-
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4149
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react45.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("label", { className: "block", children: [
|
|
4039
4150
|
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
4040
4151
|
" ",
|
|
4041
4152
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
@@ -4066,11 +4177,11 @@ var init_NumberInput = __esm({
|
|
|
4066
4177
|
});
|
|
4067
4178
|
|
|
4068
4179
|
// src/components/controls/edit/CheckboxInput.tsx
|
|
4069
|
-
var
|
|
4180
|
+
var import_react46, import_jsx_runtime71, CheckboxInput, CheckboxInput_default;
|
|
4070
4181
|
var init_CheckboxInput = __esm({
|
|
4071
4182
|
"src/components/controls/edit/CheckboxInput.tsx"() {
|
|
4072
4183
|
"use strict";
|
|
4073
|
-
|
|
4184
|
+
import_react46 = __toESM(require("react"));
|
|
4074
4185
|
import_jsx_runtime71 = require("react/jsx-runtime");
|
|
4075
4186
|
CheckboxInput = (props) => {
|
|
4076
4187
|
const textChangeHandler = (event) => {
|
|
@@ -4088,7 +4199,7 @@ var init_CheckboxInput = __esm({
|
|
|
4088
4199
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
4089
4200
|
value = true;
|
|
4090
4201
|
}
|
|
4091
|
-
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
4202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react46.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "mb-1", children: [
|
|
4092
4203
|
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
|
|
4093
4204
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
4094
4205
|
"label",
|
|
@@ -4125,11 +4236,11 @@ var init_CheckboxInput = __esm({
|
|
|
4125
4236
|
});
|
|
4126
4237
|
|
|
4127
4238
|
// src/components/controls/edit/OtpInput.tsx
|
|
4128
|
-
var
|
|
4239
|
+
var import_react47, import_jsx_runtime72, OtpInput, OtpInput_default;
|
|
4129
4240
|
var init_OtpInput = __esm({
|
|
4130
4241
|
"src/components/controls/edit/OtpInput.tsx"() {
|
|
4131
4242
|
"use strict";
|
|
4132
|
-
|
|
4243
|
+
import_react47 = __toESM(require("react"));
|
|
4133
4244
|
import_jsx_runtime72 = require("react/jsx-runtime");
|
|
4134
4245
|
OtpInput = (props) => {
|
|
4135
4246
|
const textChangeHandler = (event) => {
|
|
@@ -4152,7 +4263,7 @@ var init_OtpInput = __esm({
|
|
|
4152
4263
|
if (props.value !== void 0 && props.value !== null) {
|
|
4153
4264
|
value = props.value;
|
|
4154
4265
|
}
|
|
4155
|
-
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
4266
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react47.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("label", { htmlFor: props.name, className: "block mb-1 w-full", children: [
|
|
4156
4267
|
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
4157
4268
|
" ",
|
|
4158
4269
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
@@ -4184,11 +4295,11 @@ var init_OtpInput = __esm({
|
|
|
4184
4295
|
});
|
|
4185
4296
|
|
|
4186
4297
|
// src/components/controls/edit/DateTimeInput.tsx
|
|
4187
|
-
var
|
|
4298
|
+
var import_react48, import_jsx_runtime73, DateTimeInput, DateTimeInput_default;
|
|
4188
4299
|
var init_DateTimeInput = __esm({
|
|
4189
4300
|
"src/components/controls/edit/DateTimeInput.tsx"() {
|
|
4190
4301
|
"use strict";
|
|
4191
|
-
|
|
4302
|
+
import_react48 = __toESM(require("react"));
|
|
4192
4303
|
import_jsx_runtime73 = require("react/jsx-runtime");
|
|
4193
4304
|
DateTimeInput = (props) => {
|
|
4194
4305
|
const textChangeHandler = (event) => {
|
|
@@ -4221,7 +4332,7 @@ var init_DateTimeInput = __esm({
|
|
|
4221
4332
|
e.preventDefault();
|
|
4222
4333
|
}
|
|
4223
4334
|
};
|
|
4224
|
-
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
4335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react48.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("label", { className: "block mb-1", children: [
|
|
4225
4336
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
4226
4337
|
" ",
|
|
4227
4338
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
@@ -4254,15 +4365,15 @@ var init_DateTimeInput = __esm({
|
|
|
4254
4365
|
});
|
|
4255
4366
|
|
|
4256
4367
|
// src/components/controls/edit/ColorInput.tsx
|
|
4257
|
-
var
|
|
4368
|
+
var import_react49, import_jsx_runtime74, ColorInput, ColorInput_default;
|
|
4258
4369
|
var init_ColorInput = __esm({
|
|
4259
4370
|
"src/components/controls/edit/ColorInput.tsx"() {
|
|
4260
4371
|
"use strict";
|
|
4261
|
-
|
|
4372
|
+
import_react49 = __toESM(require("react"));
|
|
4262
4373
|
import_jsx_runtime74 = require("react/jsx-runtime");
|
|
4263
4374
|
ColorInput = (props) => {
|
|
4264
|
-
const [color, setColor] =
|
|
4265
|
-
(0,
|
|
4375
|
+
const [color, setColor] = import_react49.default.useState("#3b82f6");
|
|
4376
|
+
(0, import_react49.useEffect)(() => {
|
|
4266
4377
|
if (props.value !== void 0 && props.value !== null) {
|
|
4267
4378
|
if (typeof props.value === "string") {
|
|
4268
4379
|
setColor(props.value);
|
|
@@ -4306,22 +4417,22 @@ var init_ColorInput = __esm({
|
|
|
4306
4417
|
});
|
|
4307
4418
|
|
|
4308
4419
|
// src/components/controls/edit/SelectWithSearchInput.tsx
|
|
4309
|
-
var
|
|
4420
|
+
var import_react50, import_jsx_runtime75, SelectWithSearchInput, SelectWithSearchInput_default;
|
|
4310
4421
|
var init_SelectWithSearchInput = __esm({
|
|
4311
4422
|
"src/components/controls/edit/SelectWithSearchInput.tsx"() {
|
|
4312
4423
|
"use strict";
|
|
4313
4424
|
"use client";
|
|
4314
|
-
|
|
4425
|
+
import_react50 = __toESM(require("react"));
|
|
4315
4426
|
import_jsx_runtime75 = require("react/jsx-runtime");
|
|
4316
4427
|
SelectWithSearchInput = (props) => {
|
|
4317
|
-
const [isOpen, setIsOpen] = (0,
|
|
4318
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
4319
|
-
const [highlightedIndex, setHighlightedIndex] = (0,
|
|
4320
|
-
const [selectedItem, setSelectedItem] = (0,
|
|
4428
|
+
const [isOpen, setIsOpen] = (0, import_react50.useState)(false);
|
|
4429
|
+
const [searchTerm, setSearchTerm] = (0, import_react50.useState)("");
|
|
4430
|
+
const [highlightedIndex, setHighlightedIndex] = (0, import_react50.useState)(-1);
|
|
4431
|
+
const [selectedItem, setSelectedItem] = (0, import_react50.useState)(
|
|
4321
4432
|
null
|
|
4322
4433
|
);
|
|
4323
|
-
const [list, setList] = (0,
|
|
4324
|
-
const loadData =
|
|
4434
|
+
const [list, setList] = (0, import_react50.useState)([]);
|
|
4435
|
+
const loadData = import_react50.default.useCallback(async () => {
|
|
4325
4436
|
if (props.dataset) {
|
|
4326
4437
|
setList(props.dataset);
|
|
4327
4438
|
return;
|
|
@@ -4346,10 +4457,10 @@ var init_SelectWithSearchInput = __esm({
|
|
|
4346
4457
|
props.dataSourceDependsOn,
|
|
4347
4458
|
props.dependentValue
|
|
4348
4459
|
]);
|
|
4349
|
-
(0,
|
|
4460
|
+
(0, import_react50.useEffect)(() => {
|
|
4350
4461
|
loadData();
|
|
4351
4462
|
}, [loadData]);
|
|
4352
|
-
(0,
|
|
4463
|
+
(0, import_react50.useEffect)(() => {
|
|
4353
4464
|
if (props.value && list.length && props.dataKeyFieldName && props.dataTextFieldName) {
|
|
4354
4465
|
const selected = list.find(
|
|
4355
4466
|
(x) => x[props.dataKeyFieldName] == props.value
|
|
@@ -4396,8 +4507,8 @@ var init_SelectWithSearchInput = __esm({
|
|
|
4396
4507
|
handleSelect(e, filteredItems[highlightedIndex]);
|
|
4397
4508
|
}
|
|
4398
4509
|
};
|
|
4399
|
-
const dropdownRef = (0,
|
|
4400
|
-
(0,
|
|
4510
|
+
const dropdownRef = (0, import_react50.useRef)(null);
|
|
4511
|
+
(0, import_react50.useEffect)(() => {
|
|
4401
4512
|
if (highlightedIndex >= 0 && dropdownRef.current) {
|
|
4402
4513
|
const highlightedItem = dropdownRef.current.children[highlightedIndex];
|
|
4403
4514
|
highlightedItem?.scrollIntoView({
|
|
@@ -4495,28 +4606,28 @@ var init_SelectWithSearchInput = __esm({
|
|
|
4495
4606
|
});
|
|
4496
4607
|
|
|
4497
4608
|
// src/components/controls/edit/SelectWithSearchPanel.tsx
|
|
4498
|
-
var
|
|
4609
|
+
var import_react51, import_jsx_runtime76, SelectWithSearchPanel, SelectWithSearchPanel_default;
|
|
4499
4610
|
var init_SelectWithSearchPanel = __esm({
|
|
4500
4611
|
"src/components/controls/edit/SelectWithSearchPanel.tsx"() {
|
|
4501
4612
|
"use strict";
|
|
4502
4613
|
"use client";
|
|
4503
4614
|
init_Button();
|
|
4504
|
-
|
|
4615
|
+
import_react51 = __toESM(require("react"));
|
|
4505
4616
|
import_jsx_runtime76 = require("react/jsx-runtime");
|
|
4506
4617
|
SelectWithSearchPanel = (props) => {
|
|
4507
|
-
const [isOpen, setIsOpen] = (0,
|
|
4508
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
4509
|
-
const [highlightedIndex, setHighlightedIndex] = (0,
|
|
4510
|
-
const [list, setList] = (0,
|
|
4511
|
-
const listRef = (0,
|
|
4512
|
-
const [isError, setIsError] = (0,
|
|
4513
|
-
const containerRef = (0,
|
|
4514
|
-
const [isCreateOpen, setIsCreateOpen] = (0,
|
|
4515
|
-
const [formData, setFormData] = (0,
|
|
4618
|
+
const [isOpen, setIsOpen] = (0, import_react51.useState)(false);
|
|
4619
|
+
const [searchTerm, setSearchTerm] = (0, import_react51.useState)("");
|
|
4620
|
+
const [highlightedIndex, setHighlightedIndex] = (0, import_react51.useState)(0);
|
|
4621
|
+
const [list, setList] = (0, import_react51.useState)([]);
|
|
4622
|
+
const listRef = (0, import_react51.useRef)(null);
|
|
4623
|
+
const [isError, setIsError] = (0, import_react51.useState)(false);
|
|
4624
|
+
const containerRef = (0, import_react51.useRef)(null);
|
|
4625
|
+
const [isCreateOpen, setIsCreateOpen] = (0, import_react51.useState)(false);
|
|
4626
|
+
const [formData, setFormData] = (0, import_react51.useState)({});
|
|
4516
4627
|
const getNestedValue7 = (obj, path) => {
|
|
4517
4628
|
return path.split(".").reduce((acc, key) => acc?.[key], obj);
|
|
4518
4629
|
};
|
|
4519
|
-
(0,
|
|
4630
|
+
(0, import_react51.useEffect)(() => {
|
|
4520
4631
|
const handleClickOutside = (event) => {
|
|
4521
4632
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
4522
4633
|
setIsOpen(false);
|
|
@@ -4527,7 +4638,7 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
4527
4638
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
4528
4639
|
};
|
|
4529
4640
|
}, []);
|
|
4530
|
-
(0,
|
|
4641
|
+
(0, import_react51.useEffect)(() => {
|
|
4531
4642
|
async function fetchData() {
|
|
4532
4643
|
if (props.dataset) {
|
|
4533
4644
|
setList(props.dataset);
|
|
@@ -4569,7 +4680,7 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
4569
4680
|
audioCtx.close();
|
|
4570
4681
|
}, 250);
|
|
4571
4682
|
};
|
|
4572
|
-
(0,
|
|
4683
|
+
(0, import_react51.useEffect)(() => {
|
|
4573
4684
|
const filteredItems2 = list?.filter(
|
|
4574
4685
|
(item) => item[props?.dataTextFieldName]?.toLowerCase().includes(searchTerm?.toLowerCase())
|
|
4575
4686
|
);
|
|
@@ -4634,7 +4745,7 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
4634
4745
|
const handleInputChange = (event, field) => {
|
|
4635
4746
|
setFormData((prev) => ({ ...prev, [field]: event.target.value }));
|
|
4636
4747
|
};
|
|
4637
|
-
const handleSaveModal = (0,
|
|
4748
|
+
const handleSaveModal = (0, import_react51.useCallback)(async () => {
|
|
4638
4749
|
console.log("Form Data:", formData);
|
|
4639
4750
|
return formData;
|
|
4640
4751
|
}, []);
|
|
@@ -4659,7 +4770,7 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
4659
4770
|
disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none`
|
|
4660
4771
|
}
|
|
4661
4772
|
) }),
|
|
4662
|
-
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { ref: containerRef, children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
4773
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { ref: containerRef, children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_react51.default.Fragment, { children: [
|
|
4663
4774
|
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "fixed z-50 right-0 bg-white top-[62px] w-1/4 border-l border-gray-200", children: [
|
|
4664
4775
|
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "flex flex-col p-2 bg-accent-950 text-white", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("h5", { className: "text-md text-white font-medium", children: [
|
|
4665
4776
|
"Select a",
|
|
@@ -4750,11 +4861,11 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
4750
4861
|
});
|
|
4751
4862
|
|
|
4752
4863
|
// src/components/controls/edit/EmailInput.tsx
|
|
4753
|
-
var
|
|
4864
|
+
var import_react52, import_jsx_runtime77, EmailInput, EmailInput_default;
|
|
4754
4865
|
var init_EmailInput = __esm({
|
|
4755
4866
|
"src/components/controls/edit/EmailInput.tsx"() {
|
|
4756
4867
|
"use strict";
|
|
4757
|
-
|
|
4868
|
+
import_react52 = __toESM(require("react"));
|
|
4758
4869
|
import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4759
4870
|
EmailInput = (props) => {
|
|
4760
4871
|
const textChangeHandler = (event) => {
|
|
@@ -4780,7 +4891,7 @@ var init_EmailInput = __esm({
|
|
|
4780
4891
|
if (props.value !== void 0 && props.value !== null) {
|
|
4781
4892
|
value = props.value;
|
|
4782
4893
|
}
|
|
4783
|
-
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react52.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("label", { className: "block mb-1", children: [
|
|
4784
4895
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "text-sm font-medium text-slate-700", children: props?.attributes?.label }),
|
|
4785
4896
|
" ",
|
|
4786
4897
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
@@ -4808,12 +4919,12 @@ var init_EmailInput = __esm({
|
|
|
4808
4919
|
});
|
|
4809
4920
|
|
|
4810
4921
|
// src/components/controls/edit/TimeInput.tsx
|
|
4811
|
-
var
|
|
4922
|
+
var import_react53, import_jsx_runtime78, TimeInput, TimeInput_default;
|
|
4812
4923
|
var init_TimeInput = __esm({
|
|
4813
4924
|
"src/components/controls/edit/TimeInput.tsx"() {
|
|
4814
4925
|
"use strict";
|
|
4815
4926
|
"use client";
|
|
4816
|
-
|
|
4927
|
+
import_react53 = __toESM(require("react"));
|
|
4817
4928
|
import_jsx_runtime78 = require("react/jsx-runtime");
|
|
4818
4929
|
TimeInput = (props) => {
|
|
4819
4930
|
const timeChangeHandler = (event) => {
|
|
@@ -4827,7 +4938,7 @@ var init_TimeInput = __esm({
|
|
|
4827
4938
|
});
|
|
4828
4939
|
}
|
|
4829
4940
|
};
|
|
4830
|
-
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react53.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("label", { className: "block mb-1", children: [
|
|
4831
4942
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
4832
4943
|
" ",
|
|
4833
4944
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
@@ -4852,12 +4963,12 @@ var init_TimeInput = __esm({
|
|
|
4852
4963
|
});
|
|
4853
4964
|
|
|
4854
4965
|
// src/components/controls/edit/AssetUpload.tsx
|
|
4855
|
-
var
|
|
4966
|
+
var import_react54, import_jsx_runtime79, AssetUpload, AssetUpload_default;
|
|
4856
4967
|
var init_AssetUpload = __esm({
|
|
4857
4968
|
"src/components/controls/edit/AssetUpload.tsx"() {
|
|
4858
4969
|
"use strict";
|
|
4859
4970
|
"use client";
|
|
4860
|
-
|
|
4971
|
+
import_react54 = __toESM(require("react"));
|
|
4861
4972
|
init_ClientButton();
|
|
4862
4973
|
init_StyleTypes();
|
|
4863
4974
|
init_AssetUtility();
|
|
@@ -4884,8 +4995,8 @@ var init_AssetUpload = __esm({
|
|
|
4884
4995
|
}
|
|
4885
4996
|
return "image";
|
|
4886
4997
|
};
|
|
4887
|
-
const [assetType, setAssetType] =
|
|
4888
|
-
(0,
|
|
4998
|
+
const [assetType, setAssetType] = import_react54.default.useState(getInitialTab);
|
|
4999
|
+
(0, import_react54.useEffect)(() => {
|
|
4889
5000
|
setAssetType(getInitialTab());
|
|
4890
5001
|
}, [props.value]);
|
|
4891
5002
|
const assetUploadCallback = (newAsset) => {
|
|
@@ -4960,7 +5071,7 @@ var init_AssetUpload = __esm({
|
|
|
4960
5071
|
}
|
|
4961
5072
|
return false;
|
|
4962
5073
|
};
|
|
4963
|
-
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
5074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_react54.default.Fragment, { children: [
|
|
4964
5075
|
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("label", { className: "block mb-1", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }) }),
|
|
4965
5076
|
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex gap-6 bg-neutral-100 rounded p-2", children: [
|
|
4966
5077
|
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
@@ -5061,11 +5172,11 @@ var init_AssetUpload = __esm({
|
|
|
5061
5172
|
});
|
|
5062
5173
|
|
|
5063
5174
|
// src/components/controls/edit/SwitchInput.tsx
|
|
5064
|
-
var
|
|
5175
|
+
var import_react55, import_jsx_runtime80, SwitchInput, SwitchInput_default;
|
|
5065
5176
|
var init_SwitchInput = __esm({
|
|
5066
5177
|
"src/components/controls/edit/SwitchInput.tsx"() {
|
|
5067
5178
|
"use strict";
|
|
5068
|
-
|
|
5179
|
+
import_react55 = __toESM(require("react"));
|
|
5069
5180
|
import_jsx_runtime80 = require("react/jsx-runtime");
|
|
5070
5181
|
SwitchInput = (props) => {
|
|
5071
5182
|
const textChangeHandler = (event) => {
|
|
@@ -5083,7 +5194,7 @@ var init_SwitchInput = __esm({
|
|
|
5083
5194
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
5084
5195
|
value = true;
|
|
5085
5196
|
}
|
|
5086
|
-
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
5197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react55.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex items-start justify-between gap-4 py-3", children: [
|
|
5087
5198
|
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "min-w-0", children: [
|
|
5088
5199
|
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
5089
5200
|
"label",
|
|
@@ -5221,15 +5332,15 @@ var init_DateTimeUtility = __esm({
|
|
|
5221
5332
|
});
|
|
5222
5333
|
|
|
5223
5334
|
// src/components/controls/edit/DateInput.tsx
|
|
5224
|
-
var
|
|
5335
|
+
var import_react56, import_jsx_runtime81, DateInput, DateInput_default;
|
|
5225
5336
|
var init_DateInput = __esm({
|
|
5226
5337
|
"src/components/controls/edit/DateInput.tsx"() {
|
|
5227
5338
|
"use strict";
|
|
5228
|
-
|
|
5339
|
+
import_react56 = require("react");
|
|
5229
5340
|
init_DateTimeUtility();
|
|
5230
5341
|
import_jsx_runtime81 = require("react/jsx-runtime");
|
|
5231
5342
|
DateInput = (props) => {
|
|
5232
|
-
const value = (0,
|
|
5343
|
+
const value = (0, import_react56.useMemo)(() => {
|
|
5233
5344
|
if (props.value === void 0 || props.value === null || props.value === "") {
|
|
5234
5345
|
return "";
|
|
5235
5346
|
}
|
|
@@ -5287,16 +5398,16 @@ var init_DateInput = __esm({
|
|
|
5287
5398
|
});
|
|
5288
5399
|
|
|
5289
5400
|
// src/components/controls/edit/RadioInput.tsx
|
|
5290
|
-
var
|
|
5401
|
+
var import_react57, import_jsx_runtime82, RadioInput, RadioInput_default;
|
|
5291
5402
|
var init_RadioInput = __esm({
|
|
5292
5403
|
"src/components/controls/edit/RadioInput.tsx"() {
|
|
5293
5404
|
"use strict";
|
|
5294
|
-
|
|
5405
|
+
import_react57 = require("react");
|
|
5295
5406
|
init_Icon();
|
|
5296
5407
|
import_jsx_runtime82 = require("react/jsx-runtime");
|
|
5297
5408
|
RadioInput = (props) => {
|
|
5298
|
-
const [list, setList] = (0,
|
|
5299
|
-
(0,
|
|
5409
|
+
const [list, setList] = (0, import_react57.useState)([]);
|
|
5410
|
+
(0, import_react57.useEffect)(() => {
|
|
5300
5411
|
async function loadData() {
|
|
5301
5412
|
if (props.dataset) {
|
|
5302
5413
|
setList(props.dataset);
|
|
@@ -5401,12 +5512,12 @@ var InputControlClient_exports = {};
|
|
|
5401
5512
|
__export(InputControlClient_exports, {
|
|
5402
5513
|
default: () => InputControlClient_default
|
|
5403
5514
|
});
|
|
5404
|
-
var
|
|
5515
|
+
var import_react58, import_jsx_runtime84, InputControl, InputControlClient_default;
|
|
5405
5516
|
var init_InputControlClient = __esm({
|
|
5406
5517
|
"src/components/controls/edit/InputControlClient.tsx"() {
|
|
5407
5518
|
"use strict";
|
|
5408
5519
|
"use client";
|
|
5409
|
-
|
|
5520
|
+
import_react58 = __toESM(require("react"));
|
|
5410
5521
|
init_MultilineTextInput();
|
|
5411
5522
|
init_LineTextInput();
|
|
5412
5523
|
init_MoneyInput();
|
|
@@ -5429,7 +5540,7 @@ var init_InputControlClient = __esm({
|
|
|
5429
5540
|
init_RadioInput();
|
|
5430
5541
|
init_ReferenceInput();
|
|
5431
5542
|
import_jsx_runtime84 = require("react/jsx-runtime");
|
|
5432
|
-
InputControl =
|
|
5543
|
+
InputControl = import_react58.default.forwardRef(
|
|
5433
5544
|
(props, ref) => {
|
|
5434
5545
|
const ControlComponents = {
|
|
5435
5546
|
[InputControlType_default.lineTextInput]: LineTextInput_default,
|
|
@@ -5454,7 +5565,7 @@ var init_InputControlClient = __esm({
|
|
|
5454
5565
|
[InputControlType_default.referenceInput]: ReferenceInput_default
|
|
5455
5566
|
};
|
|
5456
5567
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
5457
|
-
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
5568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react58.default.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
5458
5569
|
}
|
|
5459
5570
|
);
|
|
5460
5571
|
InputControl.displayName = "InputControl";
|
|
@@ -5463,12 +5574,12 @@ var init_InputControlClient = __esm({
|
|
|
5463
5574
|
});
|
|
5464
5575
|
|
|
5465
5576
|
// src/components/controls/edit/InputControl.tsx
|
|
5466
|
-
var
|
|
5577
|
+
var import_dynamic13, InputControl2, InputControl_default;
|
|
5467
5578
|
var init_InputControl = __esm({
|
|
5468
5579
|
"src/components/controls/edit/InputControl.tsx"() {
|
|
5469
5580
|
"use strict";
|
|
5470
|
-
|
|
5471
|
-
InputControl2 = (0,
|
|
5581
|
+
import_dynamic13 = __toESM(require("next/dynamic"));
|
|
5582
|
+
InputControl2 = (0, import_dynamic13.default)(() => Promise.resolve().then(() => (init_InputControlClient(), InputControlClient_exports)), {
|
|
5472
5583
|
ssr: false
|
|
5473
5584
|
});
|
|
5474
5585
|
InputControl_default = InputControl2;
|
|
@@ -5480,12 +5591,12 @@ var DataBindingControls_exports = {};
|
|
|
5480
5591
|
__export(DataBindingControls_exports, {
|
|
5481
5592
|
default: () => DataBindingControls_default
|
|
5482
5593
|
});
|
|
5483
|
-
var
|
|
5594
|
+
var import_react59, import_navigation, import_jsx_runtime85, humanize, escapeODataString, parseFacetSelections, buildFacetFilter, parseODataSearch, normalizeSortOption, DUMMY_FACETS, DUMMY_SORT_OPTIONS, DataBindingControls, DataBindingControls_default;
|
|
5484
5595
|
var init_DataBindingControls = __esm({
|
|
5485
5596
|
"src/components/pageRenderingEngine/nodes/DataBindingControls.tsx"() {
|
|
5486
5597
|
"use strict";
|
|
5487
5598
|
"use client";
|
|
5488
|
-
|
|
5599
|
+
import_react59 = require("react");
|
|
5489
5600
|
import_navigation = require("next/navigation");
|
|
5490
5601
|
init_InputControl();
|
|
5491
5602
|
init_InputControlType();
|
|
@@ -5566,12 +5677,12 @@ var init_DataBindingControls = __esm({
|
|
|
5566
5677
|
const selectedFacetValues = parseFacetSelections(currentFilter);
|
|
5567
5678
|
const currentSort = query?.["$orderby"] ?? query?.orderBy ?? "";
|
|
5568
5679
|
const currentSearch = parseODataSearch(query?.["$search"]);
|
|
5569
|
-
const [searchText, setSearchText] = (0,
|
|
5570
|
-
const lastNavigationUrl = (0,
|
|
5571
|
-
(0,
|
|
5680
|
+
const [searchText, setSearchText] = (0, import_react59.useState)(currentSearch);
|
|
5681
|
+
const lastNavigationUrl = (0, import_react59.useRef)(null);
|
|
5682
|
+
(0, import_react59.useEffect)(() => {
|
|
5572
5683
|
setSearchText(currentSearch);
|
|
5573
5684
|
}, [currentSearch]);
|
|
5574
|
-
const getQueryUrl = (0,
|
|
5685
|
+
const getQueryUrl = (0, import_react59.useCallback)(
|
|
5575
5686
|
(updates) => {
|
|
5576
5687
|
const params = new URLSearchParams(query ?? {});
|
|
5577
5688
|
Object.entries(updates).forEach(([key, value]) => {
|
|
@@ -5601,7 +5712,7 @@ var init_DataBindingControls = __esm({
|
|
|
5601
5712
|
filter: void 0
|
|
5602
5713
|
});
|
|
5603
5714
|
};
|
|
5604
|
-
const navigateWithoutReload = (0,
|
|
5715
|
+
const navigateWithoutReload = (0, import_react59.useCallback)(
|
|
5605
5716
|
(url) => {
|
|
5606
5717
|
if (lastNavigationUrl.current === url) {
|
|
5607
5718
|
return;
|
|
@@ -5617,7 +5728,7 @@ var init_DataBindingControls = __esm({
|
|
|
5617
5728
|
},
|
|
5618
5729
|
[router]
|
|
5619
5730
|
);
|
|
5620
|
-
(0,
|
|
5731
|
+
(0, import_react59.useEffect)(() => {
|
|
5621
5732
|
const trimmedSearchText = searchText.trim();
|
|
5622
5733
|
if (trimmedSearchText === currentSearch.trim()) {
|
|
5623
5734
|
return;
|
|
@@ -5721,12 +5832,12 @@ var Slider_exports = {};
|
|
|
5721
5832
|
__export(Slider_exports, {
|
|
5722
5833
|
default: () => Slider_default
|
|
5723
5834
|
});
|
|
5724
|
-
var
|
|
5835
|
+
var import_react60, import_jsx_runtime86, Slider, ArrowButton, ProgressPill, Slider_default;
|
|
5725
5836
|
var init_Slider = __esm({
|
|
5726
5837
|
"src/components/Slider.tsx"() {
|
|
5727
5838
|
"use strict";
|
|
5728
5839
|
"use client";
|
|
5729
|
-
|
|
5840
|
+
import_react60 = __toESM(require("react"));
|
|
5730
5841
|
import_jsx_runtime86 = require("react/jsx-runtime");
|
|
5731
5842
|
Slider = ({
|
|
5732
5843
|
children,
|
|
@@ -5745,13 +5856,13 @@ var init_Slider = __esm({
|
|
|
5745
5856
|
pillStyle = "cumulative",
|
|
5746
5857
|
progressPosition = "bottom"
|
|
5747
5858
|
}) => {
|
|
5748
|
-
const [currentSlide, setCurrentSlide] = (0,
|
|
5749
|
-
const [transition, setTransition] = (0,
|
|
5750
|
-
const [slidesToShowState, setSlidesToShowState] = (0,
|
|
5859
|
+
const [currentSlide, setCurrentSlide] = (0, import_react60.useState)(0);
|
|
5860
|
+
const [transition, setTransition] = (0, import_react60.useState)(true);
|
|
5861
|
+
const [slidesToShowState, setSlidesToShowState] = (0, import_react60.useState)(
|
|
5751
5862
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
5752
5863
|
);
|
|
5753
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
5754
|
-
(0,
|
|
5864
|
+
const [isPlaying, setIsPlaying] = (0, import_react60.useState)(autoplay);
|
|
5865
|
+
(0, import_react60.useEffect)(() => {
|
|
5755
5866
|
if (typeof slidesToShow === "number") return;
|
|
5756
5867
|
const handleResize = () => {
|
|
5757
5868
|
if (window.innerWidth >= 1024) {
|
|
@@ -5766,7 +5877,7 @@ var init_Slider = __esm({
|
|
|
5766
5877
|
window.addEventListener("resize", handleResize);
|
|
5767
5878
|
return () => window.removeEventListener("resize", handleResize);
|
|
5768
5879
|
}, [slidesToShow]);
|
|
5769
|
-
(0,
|
|
5880
|
+
(0, import_react60.useEffect)(() => {
|
|
5770
5881
|
if (!autoplay) return;
|
|
5771
5882
|
const timer = setInterval(() => {
|
|
5772
5883
|
if (isPlaying) {
|
|
@@ -5775,7 +5886,7 @@ var init_Slider = __esm({
|
|
|
5775
5886
|
}, autoplay_speed);
|
|
5776
5887
|
return () => clearInterval(timer);
|
|
5777
5888
|
}, [autoplay, autoplay_speed, currentSlide, isPlaying]);
|
|
5778
|
-
const totalSlides =
|
|
5889
|
+
const totalSlides = import_react60.Children.count(children);
|
|
5779
5890
|
const maxSlide = totalSlides - slidesToShowState;
|
|
5780
5891
|
const nextSlide = () => {
|
|
5781
5892
|
if (currentSlide >= maxSlide) {
|
|
@@ -5820,8 +5931,8 @@ var init_Slider = __esm({
|
|
|
5820
5931
|
}
|
|
5821
5932
|
};
|
|
5822
5933
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
5823
|
-
const slides =
|
|
5824
|
-
if (!
|
|
5934
|
+
const slides = import_react60.Children.map(children, (child, index) => {
|
|
5935
|
+
if (!import_react60.default.isValidElement(child)) return null;
|
|
5825
5936
|
const childProps = child.props;
|
|
5826
5937
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
5827
5938
|
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
@@ -5829,7 +5940,7 @@ var init_Slider = __esm({
|
|
|
5829
5940
|
{
|
|
5830
5941
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
5831
5942
|
style: { width: `calc(${100 / slidesToShowState}%)`, paddingRight: gap },
|
|
5832
|
-
children: (0,
|
|
5943
|
+
children: (0, import_react60.cloneElement)(child, {
|
|
5833
5944
|
className: mergedClassName
|
|
5834
5945
|
})
|
|
5835
5946
|
},
|
|
@@ -5942,13 +6053,13 @@ var init_Slider = __esm({
|
|
|
5942
6053
|
currentSlide,
|
|
5943
6054
|
totalSlides
|
|
5944
6055
|
}) => {
|
|
5945
|
-
const [progress, setProgress] = (0,
|
|
5946
|
-
(0,
|
|
6056
|
+
const [progress, setProgress] = (0, import_react60.useState)(0);
|
|
6057
|
+
(0, import_react60.useEffect)(() => {
|
|
5947
6058
|
if (active) {
|
|
5948
6059
|
setProgress(0);
|
|
5949
6060
|
}
|
|
5950
6061
|
}, [active, index]);
|
|
5951
|
-
(0,
|
|
6062
|
+
(0, import_react60.useEffect)(() => {
|
|
5952
6063
|
if (!active || !isPlaying) {
|
|
5953
6064
|
if (!active) {
|
|
5954
6065
|
setProgress(0);
|
|
@@ -6053,10 +6164,10 @@ __export(server_exports, {
|
|
|
6053
6164
|
module.exports = __toCommonJS(server_exports);
|
|
6054
6165
|
|
|
6055
6166
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
6056
|
-
var
|
|
6167
|
+
var import_react62 = __toESM(require("react"));
|
|
6057
6168
|
|
|
6058
6169
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
6059
|
-
var
|
|
6170
|
+
var import_react28 = __toESM(require("react"));
|
|
6060
6171
|
|
|
6061
6172
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
6062
6173
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -6500,7 +6611,7 @@ var EquationNode = ({ node }) => {
|
|
|
6500
6611
|
var EquationNode_default = EquationNode;
|
|
6501
6612
|
|
|
6502
6613
|
// src/components/controls/view/ViewControl.tsx
|
|
6503
|
-
var
|
|
6614
|
+
var import_react27 = __toESM(require("react"));
|
|
6504
6615
|
|
|
6505
6616
|
// src/components/controls/view/ViewControlTypes.tsx
|
|
6506
6617
|
var ViewControlTypes = {
|
|
@@ -6792,56 +6903,10 @@ var CommentRenderer = (0, import_dynamic7.default)(() => Promise.resolve().then(
|
|
|
6792
6903
|
var Commentrenderer_default = CommentRenderer;
|
|
6793
6904
|
|
|
6794
6905
|
// src/components/controls/view/AvatarView.tsx
|
|
6795
|
-
var
|
|
6796
|
-
var
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
"bg-warning-base",
|
|
6800
|
-
"bg-success-base",
|
|
6801
|
-
"bg-info-base",
|
|
6802
|
-
"bg-primary-base",
|
|
6803
|
-
"bg-secondary-base"
|
|
6804
|
-
];
|
|
6805
|
-
var getAvatarColor = (text) => {
|
|
6806
|
-
let hash = 0;
|
|
6807
|
-
for (let i = 0; i < text.length; i += 1) {
|
|
6808
|
-
hash = hash * 31 + text.charCodeAt(i) >>> 0;
|
|
6809
|
-
}
|
|
6810
|
-
return AVATAR_COLORS[hash % AVATAR_COLORS.length];
|
|
6811
|
-
};
|
|
6812
|
-
var getInitials = (text) => {
|
|
6813
|
-
const words = text.trim().split(/\s+/).filter(Boolean);
|
|
6814
|
-
if (words.length === 0) {
|
|
6815
|
-
return "?";
|
|
6816
|
-
}
|
|
6817
|
-
if (words.length === 1) {
|
|
6818
|
-
return words[0].slice(0, 2).toUpperCase();
|
|
6819
|
-
}
|
|
6820
|
-
return `${words[0][0]}${words[words.length - 1][0]}`.toUpperCase();
|
|
6821
|
-
};
|
|
6822
|
-
var AvatarView = (props) => {
|
|
6823
|
-
const text = props.value === null || props.value === void 0 ? "" : String(props.value).trim();
|
|
6824
|
-
if (!text) {
|
|
6825
|
-
return null;
|
|
6826
|
-
}
|
|
6827
|
-
const size = props.width ?? "1.75rem";
|
|
6828
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6829
|
-
"span",
|
|
6830
|
-
{
|
|
6831
|
-
className: `avatar-view inline-flex flex-shrink-0 items-center justify-center rounded-full font-semibold uppercase select-none overflow-hidden ${getAvatarColor(text)}`,
|
|
6832
|
-
title: text,
|
|
6833
|
-
"aria-label": text,
|
|
6834
|
-
style: {
|
|
6835
|
-
width: size,
|
|
6836
|
-
height: size,
|
|
6837
|
-
fontSize: "0.6875rem",
|
|
6838
|
-
letterSpacing: "0.02em",
|
|
6839
|
-
lineHeight: 1
|
|
6840
|
-
},
|
|
6841
|
-
children: getInitials(text)
|
|
6842
|
-
}
|
|
6843
|
-
);
|
|
6844
|
-
};
|
|
6906
|
+
var import_dynamic8 = __toESM(require("next/dynamic"));
|
|
6907
|
+
var AvatarView = (0, import_dynamic8.default)(() => Promise.resolve().then(() => (init_AvatarViewClient(), AvatarViewClient_exports)), {
|
|
6908
|
+
ssr: false
|
|
6909
|
+
});
|
|
6845
6910
|
var AvatarView_default = AvatarView;
|
|
6846
6911
|
|
|
6847
6912
|
// src/components/controls/view/ViewControl.tsx
|
|
@@ -6877,7 +6942,7 @@ var ViewControl = (props) => {
|
|
|
6877
6942
|
[ViewControlTypes_default.avatar]: AvatarView_default
|
|
6878
6943
|
};
|
|
6879
6944
|
const SelectedControlComponent = props.controlType ? ControlComponents[props.controlType] : void 0;
|
|
6880
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react27.default.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
6881
6946
|
};
|
|
6882
6947
|
var ViewControl_default = ViewControl;
|
|
6883
6948
|
|
|
@@ -7017,7 +7082,7 @@ var ParagraphNode = (props) => {
|
|
|
7017
7082
|
if (isInlineOnlyParent) {
|
|
7018
7083
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children: hasChildren && props.node.children.map((node, index) => {
|
|
7019
7084
|
const SelectedNode = NodeTypes2[node.type];
|
|
7020
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
7085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react28.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
7021
7086
|
SelectedNode,
|
|
7022
7087
|
{
|
|
7023
7088
|
node,
|
|
@@ -7033,7 +7098,7 @@ var ParagraphNode = (props) => {
|
|
|
7033
7098
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: " " + formatClasses, children: [
|
|
7034
7099
|
hasChildren && props.node.children.map((node, index) => {
|
|
7035
7100
|
const SelectedNode = NodeTypes2[node.type];
|
|
7036
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
7101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react28.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
7037
7102
|
SelectedNode,
|
|
7038
7103
|
{
|
|
7039
7104
|
node,
|
|
@@ -7051,7 +7116,7 @@ var ParagraphNode = (props) => {
|
|
|
7051
7116
|
var ParagraphNode_default = ParagraphNode;
|
|
7052
7117
|
|
|
7053
7118
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
7054
|
-
var
|
|
7119
|
+
var import_react29 = __toESM(require("react"));
|
|
7055
7120
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
7056
7121
|
var HeadingNode = (props) => {
|
|
7057
7122
|
const NodeTypes2 = {
|
|
@@ -7068,22 +7133,22 @@ var HeadingNode = (props) => {
|
|
|
7068
7133
|
{
|
|
7069
7134
|
}
|
|
7070
7135
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
7071
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_jsx_runtime43.Fragment, { children:
|
|
7136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_jsx_runtime43.Fragment, { children: import_react29.default.createElement(
|
|
7072
7137
|
HeadingTag,
|
|
7073
7138
|
{ className: formatClasses },
|
|
7074
7139
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
7075
7140
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
7076
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react29.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, assetBaseUrl: props.assetBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
7077
7142
|
})
|
|
7078
7143
|
) });
|
|
7079
7144
|
};
|
|
7080
7145
|
var HeadingNode_default = HeadingNode;
|
|
7081
7146
|
|
|
7082
7147
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
7083
|
-
var
|
|
7148
|
+
var import_react31 = __toESM(require("react"));
|
|
7084
7149
|
|
|
7085
7150
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
7086
|
-
var
|
|
7151
|
+
var import_react30 = __toESM(require("react"));
|
|
7087
7152
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
7088
7153
|
var ListItemNode = (props) => {
|
|
7089
7154
|
const NodeTypes2 = {
|
|
@@ -7112,7 +7177,7 @@ var ListItemNode = (props) => {
|
|
|
7112
7177
|
}
|
|
7113
7178
|
} else {
|
|
7114
7179
|
foundFirstBreak = false;
|
|
7115
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react30.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
7116
7181
|
}
|
|
7117
7182
|
}) });
|
|
7118
7183
|
};
|
|
@@ -7124,21 +7189,21 @@ var ListNode = (props) => {
|
|
|
7124
7189
|
const NodeTypes2 = {
|
|
7125
7190
|
listitem: ListItemNode_default
|
|
7126
7191
|
};
|
|
7127
|
-
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
7192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react31.default.Fragment, { children: [
|
|
7128
7193
|
props.node.listType == "bullet" && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
7129
7194
|
const SelectedNode = NodeTypes2[node.type];
|
|
7130
|
-
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
7195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react31.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
7131
7196
|
}) }),
|
|
7132
7197
|
props.node.listType == "number" && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
7133
7198
|
const SelectedNode = NodeTypes2[node.type];
|
|
7134
|
-
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
7199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react31.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
7135
7200
|
}) })
|
|
7136
7201
|
] });
|
|
7137
7202
|
};
|
|
7138
7203
|
var ListNode_default = ListNode;
|
|
7139
7204
|
|
|
7140
7205
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
7141
|
-
var
|
|
7206
|
+
var import_react32 = __toESM(require("react"));
|
|
7142
7207
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
7143
7208
|
var QuoteNode = (props) => {
|
|
7144
7209
|
const NodeTypes2 = {
|
|
@@ -7148,16 +7213,16 @@ var QuoteNode = (props) => {
|
|
|
7148
7213
|
};
|
|
7149
7214
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
7150
7215
|
const SelectedNode = NodeTypes2[node.type];
|
|
7151
|
-
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
7216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react32.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
7152
7217
|
}) });
|
|
7153
7218
|
};
|
|
7154
7219
|
var QuoteNode_default = QuoteNode;
|
|
7155
7220
|
|
|
7156
7221
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
7157
|
-
var
|
|
7158
|
-
var
|
|
7222
|
+
var import_react34 = __toESM(require("react"));
|
|
7223
|
+
var import_dynamic9 = __toESM(require("next/dynamic"));
|
|
7159
7224
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
7160
|
-
var CopyButton2 = (0,
|
|
7225
|
+
var CopyButton2 = (0, import_dynamic9.default)(() => Promise.resolve().then(() => (init_CopyButton(), CopyButton_exports)), {
|
|
7161
7226
|
ssr: false,
|
|
7162
7227
|
// optional: fallback UI while loading
|
|
7163
7228
|
loading: () => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
@@ -7181,7 +7246,7 @@ var CodeNode = (props) => {
|
|
|
7181
7246
|
] }),
|
|
7182
7247
|
/* @__PURE__ */ (0, import_jsx_runtime48.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) => {
|
|
7183
7248
|
const SelectedNode = NodeTypes2[node.type];
|
|
7184
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
7249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react34.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
7185
7250
|
SelectedNode,
|
|
7186
7251
|
{
|
|
7187
7252
|
node,
|
|
@@ -7203,7 +7268,7 @@ var HorizontalRuleNode = () => {
|
|
|
7203
7268
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
7204
7269
|
|
|
7205
7270
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
7206
|
-
var
|
|
7271
|
+
var import_react35 = __toESM(require("react"));
|
|
7207
7272
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
7208
7273
|
var WidgetNode = (props) => {
|
|
7209
7274
|
const getWidgetParameters = () => {
|
|
@@ -7277,7 +7342,7 @@ var WidgetNode = (props) => {
|
|
|
7277
7342
|
}
|
|
7278
7343
|
return (
|
|
7279
7344
|
// eslint-disable-next-line react-hooks/static-components
|
|
7280
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
7345
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react35.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
7281
7346
|
WidgetRenderer,
|
|
7282
7347
|
{
|
|
7283
7348
|
params: widgetParams,
|
|
@@ -7294,13 +7359,13 @@ var WidgetNode = (props) => {
|
|
|
7294
7359
|
var WidgetNode_default = WidgetNode;
|
|
7295
7360
|
|
|
7296
7361
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
7297
|
-
var
|
|
7298
|
-
var
|
|
7362
|
+
var import_dynamic14 = __toESM(require("next/dynamic"));
|
|
7363
|
+
var import_react61 = __toESM(require("react"));
|
|
7299
7364
|
|
|
7300
7365
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
7301
|
-
var
|
|
7366
|
+
var import_dynamic10 = __toESM(require("next/dynamic"));
|
|
7302
7367
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
7303
|
-
var IframeClient2 = (0,
|
|
7368
|
+
var IframeClient2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
7304
7369
|
ssr: false
|
|
7305
7370
|
});
|
|
7306
7371
|
var EmbedNode = (props) => {
|
|
@@ -7542,9 +7607,9 @@ var NoDataFound_default = NoDataFound;
|
|
|
7542
7607
|
|
|
7543
7608
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
7544
7609
|
init_AssetUtility();
|
|
7545
|
-
var
|
|
7610
|
+
var import_dynamic11 = __toESM(require("next/dynamic"));
|
|
7546
7611
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
7547
|
-
var HlsPlayer4 = (0,
|
|
7612
|
+
var HlsPlayer4 = (0, import_dynamic11.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
7548
7613
|
var deviceToMediaQuery = (device) => {
|
|
7549
7614
|
switch (device) {
|
|
7550
7615
|
case "lg":
|
|
@@ -8391,9 +8456,9 @@ var DocumentNode = (props) => {
|
|
|
8391
8456
|
var DocumentNode_default = DocumentNode;
|
|
8392
8457
|
|
|
8393
8458
|
// src/components/pageRenderingEngine/nodes/GoogleMapNode.tsx
|
|
8394
|
-
var
|
|
8459
|
+
var import_dynamic12 = __toESM(require("next/dynamic"));
|
|
8395
8460
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
8396
|
-
var IframeClient3 = (0,
|
|
8461
|
+
var IframeClient3 = (0, import_dynamic12.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
8397
8462
|
ssr: false
|
|
8398
8463
|
});
|
|
8399
8464
|
var GoogleMapNode = (props) => {
|
|
@@ -8411,11 +8476,11 @@ var GoogleMapNode_default = GoogleMapNode;
|
|
|
8411
8476
|
|
|
8412
8477
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
8413
8478
|
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
8414
|
-
var Pagination2 = (0,
|
|
8415
|
-
var DataBindingControls2 = (0,
|
|
8479
|
+
var Pagination2 = (0, import_dynamic14.default)(() => Promise.resolve().then(() => (init_Pagination(), Pagination_exports)), { ssr: true });
|
|
8480
|
+
var DataBindingControls2 = (0, import_dynamic14.default)(() => Promise.resolve().then(() => (init_DataBindingControls(), DataBindingControls_exports)), {
|
|
8416
8481
|
ssr: true
|
|
8417
8482
|
});
|
|
8418
|
-
var Slider2 = (0,
|
|
8483
|
+
var Slider2 = (0, import_dynamic14.default)(() => Promise.resolve().then(() => (init_Slider(), Slider_exports)), {
|
|
8419
8484
|
ssr: false
|
|
8420
8485
|
});
|
|
8421
8486
|
function toCamelCase(str) {
|
|
@@ -8653,9 +8718,10 @@ var DivContainer = async (props) => {
|
|
|
8653
8718
|
let response = null;
|
|
8654
8719
|
let childCollectionData = null;
|
|
8655
8720
|
let shouldShowNoDataMessage = props.forceNoDataMessage === true;
|
|
8656
|
-
|
|
8721
|
+
const dataSource = dataBindingProperties?.dataSource?.trim();
|
|
8722
|
+
if (dataSource && !shouldShowNoDataMessage) {
|
|
8657
8723
|
const serviceClient = new ServiceClient_default(props.apiBaseUrl, props.session);
|
|
8658
|
-
endpoint =
|
|
8724
|
+
endpoint = dataSource;
|
|
8659
8725
|
{
|
|
8660
8726
|
}
|
|
8661
8727
|
endpoint = endpoint.replace(/\{(\w+)\}/g, (_, key) => {
|
|
@@ -8693,7 +8759,7 @@ var DivContainer = async (props) => {
|
|
|
8693
8759
|
}
|
|
8694
8760
|
const SelectedNode = NodeTypes2[node.type];
|
|
8695
8761
|
if (!SelectedNode) return null;
|
|
8696
|
-
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react61.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8697
8763
|
SelectedNode,
|
|
8698
8764
|
{
|
|
8699
8765
|
node,
|
|
@@ -8785,7 +8851,7 @@ var DivContainer = async (props) => {
|
|
|
8785
8851
|
item,
|
|
8786
8852
|
idx,
|
|
8787
8853
|
props.href ? void 0 : item?.links?.view
|
|
8788
|
-
)?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8854
|
+
)?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react61.default.Fragment, { children: child }, i)) : renderChildren2(props.node.children, props, item, idx)
|
|
8789
8855
|
);
|
|
8790
8856
|
}
|
|
8791
8857
|
return props.node.children.flatMap((node, childIndex) => {
|
|
@@ -8917,14 +8983,14 @@ var DivContainer = async (props) => {
|
|
|
8917
8983
|
dataset: response
|
|
8918
8984
|
}
|
|
8919
8985
|
) : null;
|
|
8920
|
-
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
8986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_react61.default.Fragment, { children: [
|
|
8921
8987
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8922
8988
|
"style",
|
|
8923
8989
|
{
|
|
8924
8990
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
8925
8991
|
}
|
|
8926
8992
|
),
|
|
8927
|
-
showDataBindingControls ? /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
8993
|
+
showDataBindingControls ? /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_react61.default.Fragment, { children: [
|
|
8928
8994
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8929
8995
|
DataBindingControls2,
|
|
8930
8996
|
{
|
|
@@ -8962,7 +9028,7 @@ var DivContainer = async (props) => {
|
|
|
8962
9028
|
]
|
|
8963
9029
|
}
|
|
8964
9030
|
)
|
|
8965
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
9031
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_react61.default.Fragment, { children: [
|
|
8966
9032
|
renderedContainer,
|
|
8967
9033
|
paginationControl && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { children: paginationControl })
|
|
8968
9034
|
] })
|
|
@@ -9009,14 +9075,14 @@ var PageBodyRenderer = (props) => {
|
|
|
9009
9075
|
}
|
|
9010
9076
|
return true;
|
|
9011
9077
|
};
|
|
9012
|
-
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9078
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react62.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
9013
9079
|
{
|
|
9014
9080
|
}
|
|
9015
9081
|
const SelectedNode = NodeTypes[node.type];
|
|
9016
9082
|
if (!shouldRenderNode(node)) {
|
|
9017
9083
|
return null;
|
|
9018
9084
|
}
|
|
9019
|
-
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react62.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react62.default.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react62.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9020
9086
|
SelectedNode,
|
|
9021
9087
|
{
|
|
9022
9088
|
node,
|
|
@@ -9032,7 +9098,7 @@ var PageBodyRenderer = (props) => {
|
|
|
9032
9098
|
device: props.device,
|
|
9033
9099
|
widgetRenderer: props.widgetRenderer
|
|
9034
9100
|
}
|
|
9035
|
-
) }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9101
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react62.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9036
9102
|
SelectedNode,
|
|
9037
9103
|
{
|
|
9038
9104
|
node,
|