@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/index.js
CHANGED
|
@@ -2070,12 +2070,123 @@ var init_CommentRendererClient = __esm({
|
|
|
2070
2070
|
}
|
|
2071
2071
|
});
|
|
2072
2072
|
|
|
2073
|
+
// src/components/controls/view/AvatarViewClient.tsx
|
|
2074
|
+
var AvatarViewClient_exports = {};
|
|
2075
|
+
__export(AvatarViewClient_exports, {
|
|
2076
|
+
default: () => AvatarViewClient_default
|
|
2077
|
+
});
|
|
2078
|
+
var import_react21, import_jsx_runtime28, AVATAR_COLORS, getAvatarColor, getInitials, getContactImageInfo, AvatarViewClient, AvatarViewClient_default;
|
|
2079
|
+
var init_AvatarViewClient = __esm({
|
|
2080
|
+
"src/components/controls/view/AvatarViewClient.tsx"() {
|
|
2081
|
+
"use strict";
|
|
2082
|
+
"use client";
|
|
2083
|
+
import_react21 = __toESM(require("react"));
|
|
2084
|
+
init_AssetUtility();
|
|
2085
|
+
import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2086
|
+
AVATAR_COLORS = [
|
|
2087
|
+
"bg-error-strong",
|
|
2088
|
+
"bg-accent-base",
|
|
2089
|
+
"bg-warning-base",
|
|
2090
|
+
"bg-success-base",
|
|
2091
|
+
"bg-info-base",
|
|
2092
|
+
"bg-primary-base",
|
|
2093
|
+
"bg-secondary-base"
|
|
2094
|
+
];
|
|
2095
|
+
getAvatarColor = (text) => {
|
|
2096
|
+
let hash = 0;
|
|
2097
|
+
for (let i = 0; i < text.length; i += 1) {
|
|
2098
|
+
hash = hash * 31 + text.charCodeAt(i) >>> 0;
|
|
2099
|
+
}
|
|
2100
|
+
return AVATAR_COLORS[hash % AVATAR_COLORS.length];
|
|
2101
|
+
};
|
|
2102
|
+
getInitials = (text) => {
|
|
2103
|
+
const words = text.trim().split(/\s+/).filter(Boolean);
|
|
2104
|
+
if (words.length === 0) {
|
|
2105
|
+
return "?";
|
|
2106
|
+
}
|
|
2107
|
+
if (words.length === 1) {
|
|
2108
|
+
return words[0].slice(0, 2).toUpperCase();
|
|
2109
|
+
}
|
|
2110
|
+
return `${words[0][0]}${words[words.length - 1][0]}`.toUpperCase();
|
|
2111
|
+
};
|
|
2112
|
+
getContactImageInfo = (text) => {
|
|
2113
|
+
if (!text.includes("-")) {
|
|
2114
|
+
return null;
|
|
2115
|
+
}
|
|
2116
|
+
const parts = text.split("-");
|
|
2117
|
+
if (parts.length <= 1) {
|
|
2118
|
+
return null;
|
|
2119
|
+
}
|
|
2120
|
+
const first = parts[0].trim();
|
|
2121
|
+
if (!/^\d+$/.test(first)) {
|
|
2122
|
+
return null;
|
|
2123
|
+
}
|
|
2124
|
+
return {
|
|
2125
|
+
contactId: first,
|
|
2126
|
+
name: parts.slice(1).join("-").trim() || text
|
|
2127
|
+
};
|
|
2128
|
+
};
|
|
2129
|
+
AvatarViewClient = (props) => {
|
|
2130
|
+
const text = props.value === null || props.value === void 0 ? "" : String(props.value).trim();
|
|
2131
|
+
const [imageFailed, setImageFailed] = import_react21.default.useState(false);
|
|
2132
|
+
import_react21.default.useEffect(() => {
|
|
2133
|
+
setImageFailed(false);
|
|
2134
|
+
}, [text, props.assetBaseUrl]);
|
|
2135
|
+
if (!text) {
|
|
2136
|
+
return null;
|
|
2137
|
+
}
|
|
2138
|
+
const size = props.width ?? "1.75rem";
|
|
2139
|
+
const contactInfo = getContactImageInfo(text);
|
|
2140
|
+
const imageUrl = contactInfo ? AssetUtility_default.resolveUrl(
|
|
2141
|
+
props.assetBaseUrl,
|
|
2142
|
+
`itemassets/contacts/contact-${contactInfo.contactId}`
|
|
2143
|
+
) : void 0;
|
|
2144
|
+
const displayName = contactInfo?.name ?? text;
|
|
2145
|
+
if (imageUrl && !imageFailed) {
|
|
2146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2147
|
+
"img",
|
|
2148
|
+
{
|
|
2149
|
+
className: "avatar-view inline-block flex-shrink-0 rounded-full object-cover select-none",
|
|
2150
|
+
src: imageUrl,
|
|
2151
|
+
alt: displayName,
|
|
2152
|
+
title: displayName,
|
|
2153
|
+
"aria-label": displayName,
|
|
2154
|
+
loading: "lazy",
|
|
2155
|
+
onError: () => setImageFailed(true),
|
|
2156
|
+
style: {
|
|
2157
|
+
width: size,
|
|
2158
|
+
height: size
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
);
|
|
2162
|
+
}
|
|
2163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2164
|
+
"span",
|
|
2165
|
+
{
|
|
2166
|
+
className: `avatar-view inline-flex flex-shrink-0 items-center justify-center rounded-full font-semibold uppercase select-none overflow-hidden ${getAvatarColor(displayName)}`,
|
|
2167
|
+
title: displayName,
|
|
2168
|
+
"aria-label": displayName,
|
|
2169
|
+
style: {
|
|
2170
|
+
width: size,
|
|
2171
|
+
height: size,
|
|
2172
|
+
fontSize: "0.6875rem",
|
|
2173
|
+
letterSpacing: "0.02em",
|
|
2174
|
+
lineHeight: 1
|
|
2175
|
+
},
|
|
2176
|
+
children: getInitials(displayName)
|
|
2177
|
+
}
|
|
2178
|
+
);
|
|
2179
|
+
};
|
|
2180
|
+
AvatarViewClient_default = AvatarViewClient;
|
|
2181
|
+
}
|
|
2182
|
+
});
|
|
2183
|
+
|
|
2073
2184
|
// src/components/controls/edit/MultilineTextInput.tsx
|
|
2074
|
-
var
|
|
2185
|
+
var import_react23, import_jsx_runtime30, MultilineTextInput, MultilineTextInput_default;
|
|
2075
2186
|
var init_MultilineTextInput = __esm({
|
|
2076
2187
|
"src/components/controls/edit/MultilineTextInput.tsx"() {
|
|
2077
2188
|
"use strict";
|
|
2078
|
-
|
|
2189
|
+
import_react23 = __toESM(require("react"));
|
|
2079
2190
|
import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2080
2191
|
MultilineTextInput = (props) => {
|
|
2081
2192
|
const textChangeHandler = (event) => {
|
|
@@ -2095,7 +2206,7 @@ var init_MultilineTextInput = __esm({
|
|
|
2095
2206
|
if (props.value !== void 0 && props.value !== null) {
|
|
2096
2207
|
value = props.value;
|
|
2097
2208
|
}
|
|
2098
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react23.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("label", { className: "block mb-1", children: [
|
|
2099
2210
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
2100
2211
|
" ",
|
|
2101
2212
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
@@ -2124,11 +2235,11 @@ var init_MultilineTextInput = __esm({
|
|
|
2124
2235
|
});
|
|
2125
2236
|
|
|
2126
2237
|
// src/components/controls/edit/LineTextInput.tsx
|
|
2127
|
-
var
|
|
2238
|
+
var import_react24, import_jsx_runtime31, LineTextInput, LineTextInput_default;
|
|
2128
2239
|
var init_LineTextInput = __esm({
|
|
2129
2240
|
"src/components/controls/edit/LineTextInput.tsx"() {
|
|
2130
2241
|
"use strict";
|
|
2131
|
-
|
|
2242
|
+
import_react24 = __toESM(require("react"));
|
|
2132
2243
|
import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2133
2244
|
LineTextInput = (props) => {
|
|
2134
2245
|
const textChangeHandler = (event) => {
|
|
@@ -2148,7 +2259,7 @@ var init_LineTextInput = __esm({
|
|
|
2148
2259
|
if (props.value !== void 0 && props.value !== null) {
|
|
2149
2260
|
value = props.value;
|
|
2150
2261
|
}
|
|
2151
|
-
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react24.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("label", { className: "block", children: [
|
|
2152
2263
|
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
2153
2264
|
" ",
|
|
2154
2265
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "bg-error-weak !bg-transparent", children: "*" }),
|
|
@@ -2181,11 +2292,11 @@ var init_LineTextInput = __esm({
|
|
|
2181
2292
|
});
|
|
2182
2293
|
|
|
2183
2294
|
// src/components/controls/edit/MoneyInput.tsx
|
|
2184
|
-
var
|
|
2295
|
+
var import_react25, import_jsx_runtime32, MoneyInput, MoneyInput_default;
|
|
2185
2296
|
var init_MoneyInput = __esm({
|
|
2186
2297
|
"src/components/controls/edit/MoneyInput.tsx"() {
|
|
2187
2298
|
"use strict";
|
|
2188
|
-
|
|
2299
|
+
import_react25 = __toESM(require("react"));
|
|
2189
2300
|
import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2190
2301
|
MoneyInput = (props) => {
|
|
2191
2302
|
const textChangeHandler = (event) => {
|
|
@@ -2215,7 +2326,7 @@ var init_MoneyInput = __esm({
|
|
|
2215
2326
|
e.preventDefault();
|
|
2216
2327
|
}
|
|
2217
2328
|
};
|
|
2218
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react25.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { className: "block mb-1", children: [
|
|
2219
2330
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
2220
2331
|
" ",
|
|
2221
2332
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
@@ -2282,14 +2393,14 @@ var init_InputControlType = __esm({
|
|
|
2282
2393
|
});
|
|
2283
2394
|
|
|
2284
2395
|
// src/components/controls/edit/Select.tsx
|
|
2285
|
-
var
|
|
2396
|
+
var import_react26, import_jsx_runtime33, Select, Select_default;
|
|
2286
2397
|
var init_Select = __esm({
|
|
2287
2398
|
"src/components/controls/edit/Select.tsx"() {
|
|
2288
2399
|
"use strict";
|
|
2289
|
-
|
|
2400
|
+
import_react26 = require("react");
|
|
2290
2401
|
import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2291
2402
|
Select = (props) => {
|
|
2292
|
-
const [list, setList] = (0,
|
|
2403
|
+
const [list, setList] = (0, import_react26.useState)();
|
|
2293
2404
|
const getSafeValue = (val) => {
|
|
2294
2405
|
if (val === null || val === void 0) return "";
|
|
2295
2406
|
if (typeof val === "boolean") return val ? "1" : "0";
|
|
@@ -2326,7 +2437,7 @@ var init_Select = __esm({
|
|
|
2326
2437
|
groupKey: props.groupKey
|
|
2327
2438
|
});
|
|
2328
2439
|
};
|
|
2329
|
-
(0,
|
|
2440
|
+
(0, import_react26.useEffect)(() => {
|
|
2330
2441
|
async function fetchData() {
|
|
2331
2442
|
if (props.dataset) {
|
|
2332
2443
|
setList(props.dataset);
|
|
@@ -2410,11 +2521,11 @@ var init_Select = __esm({
|
|
|
2410
2521
|
});
|
|
2411
2522
|
|
|
2412
2523
|
// src/components/controls/edit/PercentageInput.tsx
|
|
2413
|
-
var
|
|
2524
|
+
var import_react27, import_jsx_runtime34, PercentageInput, PercentageInput_default;
|
|
2414
2525
|
var init_PercentageInput = __esm({
|
|
2415
2526
|
"src/components/controls/edit/PercentageInput.tsx"() {
|
|
2416
2527
|
"use strict";
|
|
2417
|
-
|
|
2528
|
+
import_react27 = __toESM(require("react"));
|
|
2418
2529
|
import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2419
2530
|
PercentageInput = (props) => {
|
|
2420
2531
|
const textChangeHandler = (event) => {
|
|
@@ -2444,7 +2555,7 @@ var init_PercentageInput = __esm({
|
|
|
2444
2555
|
e.preventDefault();
|
|
2445
2556
|
}
|
|
2446
2557
|
};
|
|
2447
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react27.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("label", { className: "block mb-1", children: [
|
|
2448
2559
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label ? props?.attributes?.label + " %" : "" }),
|
|
2449
2560
|
" ",
|
|
2450
2561
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
@@ -2475,11 +2586,11 @@ var init_PercentageInput = __esm({
|
|
|
2475
2586
|
});
|
|
2476
2587
|
|
|
2477
2588
|
// src/components/controls/edit/PhoneInput.tsx
|
|
2478
|
-
var
|
|
2589
|
+
var import_react28, import_jsx_runtime35, PhoneInput, PhoneInput_default;
|
|
2479
2590
|
var init_PhoneInput = __esm({
|
|
2480
2591
|
"src/components/controls/edit/PhoneInput.tsx"() {
|
|
2481
2592
|
"use strict";
|
|
2482
|
-
|
|
2593
|
+
import_react28 = __toESM(require("react"));
|
|
2483
2594
|
import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2484
2595
|
PhoneInput = (props) => {
|
|
2485
2596
|
const textChangeHandler = (event) => {
|
|
@@ -2499,7 +2610,7 @@ var init_PhoneInput = __esm({
|
|
|
2499
2610
|
if (props.value !== void 0 && props.value !== null) {
|
|
2500
2611
|
value = props.value;
|
|
2501
2612
|
}
|
|
2502
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react28.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("label", { className: "block mb-1", children: [
|
|
2503
2614
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
2504
2615
|
" ",
|
|
2505
2616
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
@@ -2531,11 +2642,11 @@ var init_PhoneInput = __esm({
|
|
|
2531
2642
|
});
|
|
2532
2643
|
|
|
2533
2644
|
// src/components/controls/edit/NumberInput.tsx
|
|
2534
|
-
var
|
|
2645
|
+
var import_react29, import_jsx_runtime36, NumberInput, NumberInput_default;
|
|
2535
2646
|
var init_NumberInput = __esm({
|
|
2536
2647
|
"src/components/controls/edit/NumberInput.tsx"() {
|
|
2537
2648
|
"use strict";
|
|
2538
|
-
|
|
2649
|
+
import_react29 = __toESM(require("react"));
|
|
2539
2650
|
import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2540
2651
|
NumberInput = (props) => {
|
|
2541
2652
|
const textChangeHandler = (event) => {
|
|
@@ -2559,7 +2670,7 @@ var init_NumberInput = __esm({
|
|
|
2559
2670
|
if (props.value !== void 0 && props.value !== null) {
|
|
2560
2671
|
value = props.value;
|
|
2561
2672
|
}
|
|
2562
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react29.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("label", { className: "block", children: [
|
|
2563
2674
|
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
2564
2675
|
" ",
|
|
2565
2676
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
@@ -2590,11 +2701,11 @@ var init_NumberInput = __esm({
|
|
|
2590
2701
|
});
|
|
2591
2702
|
|
|
2592
2703
|
// src/components/controls/edit/CheckboxInput.tsx
|
|
2593
|
-
var
|
|
2704
|
+
var import_react30, import_jsx_runtime37, CheckboxInput, CheckboxInput_default;
|
|
2594
2705
|
var init_CheckboxInput = __esm({
|
|
2595
2706
|
"src/components/controls/edit/CheckboxInput.tsx"() {
|
|
2596
2707
|
"use strict";
|
|
2597
|
-
|
|
2708
|
+
import_react30 = __toESM(require("react"));
|
|
2598
2709
|
import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2599
2710
|
CheckboxInput = (props) => {
|
|
2600
2711
|
const textChangeHandler = (event) => {
|
|
@@ -2612,7 +2723,7 @@ var init_CheckboxInput = __esm({
|
|
|
2612
2723
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
2613
2724
|
value = true;
|
|
2614
2725
|
}
|
|
2615
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react30.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "mb-1", children: [
|
|
2616
2727
|
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
|
|
2617
2728
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2618
2729
|
"label",
|
|
@@ -2649,11 +2760,11 @@ var init_CheckboxInput = __esm({
|
|
|
2649
2760
|
});
|
|
2650
2761
|
|
|
2651
2762
|
// src/components/controls/edit/OtpInput.tsx
|
|
2652
|
-
var
|
|
2763
|
+
var import_react31, import_jsx_runtime38, OtpInput, OtpInput_default;
|
|
2653
2764
|
var init_OtpInput = __esm({
|
|
2654
2765
|
"src/components/controls/edit/OtpInput.tsx"() {
|
|
2655
2766
|
"use strict";
|
|
2656
|
-
|
|
2767
|
+
import_react31 = __toESM(require("react"));
|
|
2657
2768
|
import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2658
2769
|
OtpInput = (props) => {
|
|
2659
2770
|
const textChangeHandler = (event) => {
|
|
@@ -2676,7 +2787,7 @@ var init_OtpInput = __esm({
|
|
|
2676
2787
|
if (props.value !== void 0 && props.value !== null) {
|
|
2677
2788
|
value = props.value;
|
|
2678
2789
|
}
|
|
2679
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react31.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("label", { htmlFor: props.name, className: "block mb-1 w-full", children: [
|
|
2680
2791
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
2681
2792
|
" ",
|
|
2682
2793
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
@@ -2708,11 +2819,11 @@ var init_OtpInput = __esm({
|
|
|
2708
2819
|
});
|
|
2709
2820
|
|
|
2710
2821
|
// src/components/controls/edit/DateTimeInput.tsx
|
|
2711
|
-
var
|
|
2822
|
+
var import_react32, import_jsx_runtime39, DateTimeInput, DateTimeInput_default;
|
|
2712
2823
|
var init_DateTimeInput = __esm({
|
|
2713
2824
|
"src/components/controls/edit/DateTimeInput.tsx"() {
|
|
2714
2825
|
"use strict";
|
|
2715
|
-
|
|
2826
|
+
import_react32 = __toESM(require("react"));
|
|
2716
2827
|
import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2717
2828
|
DateTimeInput = (props) => {
|
|
2718
2829
|
const textChangeHandler = (event) => {
|
|
@@ -2745,7 +2856,7 @@ var init_DateTimeInput = __esm({
|
|
|
2745
2856
|
e.preventDefault();
|
|
2746
2857
|
}
|
|
2747
2858
|
};
|
|
2748
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react32.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("label", { className: "block mb-1", children: [
|
|
2749
2860
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
2750
2861
|
" ",
|
|
2751
2862
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
@@ -2778,15 +2889,15 @@ var init_DateTimeInput = __esm({
|
|
|
2778
2889
|
});
|
|
2779
2890
|
|
|
2780
2891
|
// src/components/controls/edit/ColorInput.tsx
|
|
2781
|
-
var
|
|
2892
|
+
var import_react33, import_jsx_runtime40, ColorInput, ColorInput_default;
|
|
2782
2893
|
var init_ColorInput = __esm({
|
|
2783
2894
|
"src/components/controls/edit/ColorInput.tsx"() {
|
|
2784
2895
|
"use strict";
|
|
2785
|
-
|
|
2896
|
+
import_react33 = __toESM(require("react"));
|
|
2786
2897
|
import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2787
2898
|
ColorInput = (props) => {
|
|
2788
|
-
const [color, setColor] =
|
|
2789
|
-
(0,
|
|
2899
|
+
const [color, setColor] = import_react33.default.useState("#3b82f6");
|
|
2900
|
+
(0, import_react33.useEffect)(() => {
|
|
2790
2901
|
if (props.value !== void 0 && props.value !== null) {
|
|
2791
2902
|
if (typeof props.value === "string") {
|
|
2792
2903
|
setColor(props.value);
|
|
@@ -2830,22 +2941,22 @@ var init_ColorInput = __esm({
|
|
|
2830
2941
|
});
|
|
2831
2942
|
|
|
2832
2943
|
// src/components/controls/edit/SelectWithSearchInput.tsx
|
|
2833
|
-
var
|
|
2944
|
+
var import_react34, import_jsx_runtime41, SelectWithSearchInput, SelectWithSearchInput_default;
|
|
2834
2945
|
var init_SelectWithSearchInput = __esm({
|
|
2835
2946
|
"src/components/controls/edit/SelectWithSearchInput.tsx"() {
|
|
2836
2947
|
"use strict";
|
|
2837
2948
|
"use client";
|
|
2838
|
-
|
|
2949
|
+
import_react34 = __toESM(require("react"));
|
|
2839
2950
|
import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2840
2951
|
SelectWithSearchInput = (props) => {
|
|
2841
|
-
const [isOpen, setIsOpen] = (0,
|
|
2842
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
2843
|
-
const [highlightedIndex, setHighlightedIndex] = (0,
|
|
2844
|
-
const [selectedItem, setSelectedItem] = (0,
|
|
2952
|
+
const [isOpen, setIsOpen] = (0, import_react34.useState)(false);
|
|
2953
|
+
const [searchTerm, setSearchTerm] = (0, import_react34.useState)("");
|
|
2954
|
+
const [highlightedIndex, setHighlightedIndex] = (0, import_react34.useState)(-1);
|
|
2955
|
+
const [selectedItem, setSelectedItem] = (0, import_react34.useState)(
|
|
2845
2956
|
null
|
|
2846
2957
|
);
|
|
2847
|
-
const [list, setList] = (0,
|
|
2848
|
-
const loadData =
|
|
2958
|
+
const [list, setList] = (0, import_react34.useState)([]);
|
|
2959
|
+
const loadData = import_react34.default.useCallback(async () => {
|
|
2849
2960
|
if (props.dataset) {
|
|
2850
2961
|
setList(props.dataset);
|
|
2851
2962
|
return;
|
|
@@ -2870,10 +2981,10 @@ var init_SelectWithSearchInput = __esm({
|
|
|
2870
2981
|
props.dataSourceDependsOn,
|
|
2871
2982
|
props.dependentValue
|
|
2872
2983
|
]);
|
|
2873
|
-
(0,
|
|
2984
|
+
(0, import_react34.useEffect)(() => {
|
|
2874
2985
|
loadData();
|
|
2875
2986
|
}, [loadData]);
|
|
2876
|
-
(0,
|
|
2987
|
+
(0, import_react34.useEffect)(() => {
|
|
2877
2988
|
if (props.value && list.length && props.dataKeyFieldName && props.dataTextFieldName) {
|
|
2878
2989
|
const selected = list.find(
|
|
2879
2990
|
(x) => x[props.dataKeyFieldName] == props.value
|
|
@@ -2920,8 +3031,8 @@ var init_SelectWithSearchInput = __esm({
|
|
|
2920
3031
|
handleSelect(e, filteredItems[highlightedIndex]);
|
|
2921
3032
|
}
|
|
2922
3033
|
};
|
|
2923
|
-
const dropdownRef = (0,
|
|
2924
|
-
(0,
|
|
3034
|
+
const dropdownRef = (0, import_react34.useRef)(null);
|
|
3035
|
+
(0, import_react34.useEffect)(() => {
|
|
2925
3036
|
if (highlightedIndex >= 0 && dropdownRef.current) {
|
|
2926
3037
|
const highlightedItem = dropdownRef.current.children[highlightedIndex];
|
|
2927
3038
|
highlightedItem?.scrollIntoView({
|
|
@@ -3097,12 +3208,12 @@ var init_StyleTypes = __esm({
|
|
|
3097
3208
|
});
|
|
3098
3209
|
|
|
3099
3210
|
// src/components/ClientButton.tsx
|
|
3100
|
-
var
|
|
3211
|
+
var import_react35, import_jsx_runtime42, ClientButton, ClientButton_default;
|
|
3101
3212
|
var init_ClientButton = __esm({
|
|
3102
3213
|
"src/components/ClientButton.tsx"() {
|
|
3103
3214
|
"use strict";
|
|
3104
3215
|
"use client";
|
|
3105
|
-
|
|
3216
|
+
import_react35 = __toESM(require("react"));
|
|
3106
3217
|
init_ToastService();
|
|
3107
3218
|
init_StyleTypes();
|
|
3108
3219
|
import_jsx_runtime42 = require("react/jsx-runtime");
|
|
@@ -3115,7 +3226,7 @@ var init_ClientButton = __esm({
|
|
|
3115
3226
|
}
|
|
3116
3227
|
};
|
|
3117
3228
|
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
3118
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react35.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3119
3230
|
"button",
|
|
3120
3231
|
{
|
|
3121
3232
|
type: "button",
|
|
@@ -3130,17 +3241,17 @@ var init_ClientButton = __esm({
|
|
|
3130
3241
|
});
|
|
3131
3242
|
|
|
3132
3243
|
// src/components/Confirm.tsx
|
|
3133
|
-
var
|
|
3244
|
+
var import_react36, import_jsx_runtime43, Confirm, Confirm_default;
|
|
3134
3245
|
var init_Confirm = __esm({
|
|
3135
3246
|
"src/components/Confirm.tsx"() {
|
|
3136
3247
|
"use strict";
|
|
3137
3248
|
"use client";
|
|
3138
|
-
|
|
3249
|
+
import_react36 = require("react");
|
|
3139
3250
|
init_ClientButton();
|
|
3140
3251
|
init_StyleTypes();
|
|
3141
3252
|
import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3142
3253
|
Confirm = ({ message, onConfirm, onCancel }) => {
|
|
3143
|
-
const [showModal, setShowModal] = (0,
|
|
3254
|
+
const [showModal, setShowModal] = (0, import_react36.useState)(true);
|
|
3144
3255
|
const handleConfirmAction = () => {
|
|
3145
3256
|
setShowModal(false);
|
|
3146
3257
|
if (onConfirm) {
|
|
@@ -3185,21 +3296,21 @@ var init_Confirm = __esm({
|
|
|
3185
3296
|
});
|
|
3186
3297
|
|
|
3187
3298
|
// src/components/Button.tsx
|
|
3188
|
-
var
|
|
3299
|
+
var import_react37, import_jsx_runtime44, Button, Button_default;
|
|
3189
3300
|
var init_Button = __esm({
|
|
3190
3301
|
"src/components/Button.tsx"() {
|
|
3191
3302
|
"use strict";
|
|
3192
3303
|
"use client";
|
|
3193
|
-
|
|
3304
|
+
import_react37 = __toESM(require("react"));
|
|
3194
3305
|
init_ToastService();
|
|
3195
3306
|
init_StyleTypes();
|
|
3196
3307
|
init_Confirm();
|
|
3197
3308
|
import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3198
3309
|
Button = (props) => {
|
|
3199
|
-
const [inProgress, setInProgress] = (0,
|
|
3200
|
-
const [isActionPerformed, setIsActionPerformed] = (0,
|
|
3201
|
-
const [responseMessage, setResponseMessage] = (0,
|
|
3202
|
-
const [showModal, setShowModal] = (0,
|
|
3310
|
+
const [inProgress, setInProgress] = (0, import_react37.useState)(false);
|
|
3311
|
+
const [isActionPerformed, setIsActionPerformed] = (0, import_react37.useState)(false);
|
|
3312
|
+
const [responseMessage, setResponseMessage] = (0, import_react37.useState)(null);
|
|
3313
|
+
const [showModal, setShowModal] = (0, import_react37.useState)(null);
|
|
3203
3314
|
const execute = async (event) => {
|
|
3204
3315
|
event.preventDefault();
|
|
3205
3316
|
event.stopPropagation();
|
|
@@ -3262,7 +3373,7 @@ var init_Button = __esm({
|
|
|
3262
3373
|
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
3263
3374
|
let progressClass = props.ButtonType ? progressClasses.get(props.ButtonType) : progressClasses.get("Primary" /* Solid */);
|
|
3264
3375
|
const isDisabled = inProgress || isActionPerformed && props.oneTimeAction;
|
|
3265
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3376
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react37.default.Fragment, { children: [
|
|
3266
3377
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3267
3378
|
"button",
|
|
3268
3379
|
{
|
|
@@ -3314,28 +3425,28 @@ var init_Button = __esm({
|
|
|
3314
3425
|
});
|
|
3315
3426
|
|
|
3316
3427
|
// src/components/controls/edit/SelectWithSearchPanel.tsx
|
|
3317
|
-
var
|
|
3428
|
+
var import_react38, import_jsx_runtime45, SelectWithSearchPanel, SelectWithSearchPanel_default;
|
|
3318
3429
|
var init_SelectWithSearchPanel = __esm({
|
|
3319
3430
|
"src/components/controls/edit/SelectWithSearchPanel.tsx"() {
|
|
3320
3431
|
"use strict";
|
|
3321
3432
|
"use client";
|
|
3322
3433
|
init_Button();
|
|
3323
|
-
|
|
3434
|
+
import_react38 = __toESM(require("react"));
|
|
3324
3435
|
import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3325
3436
|
SelectWithSearchPanel = (props) => {
|
|
3326
|
-
const [isOpen, setIsOpen] = (0,
|
|
3327
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
3328
|
-
const [highlightedIndex, setHighlightedIndex] = (0,
|
|
3329
|
-
const [list, setList] = (0,
|
|
3330
|
-
const listRef = (0,
|
|
3331
|
-
const [isError, setIsError] = (0,
|
|
3332
|
-
const containerRef = (0,
|
|
3333
|
-
const [isCreateOpen, setIsCreateOpen] = (0,
|
|
3334
|
-
const [formData, setFormData] = (0,
|
|
3437
|
+
const [isOpen, setIsOpen] = (0, import_react38.useState)(false);
|
|
3438
|
+
const [searchTerm, setSearchTerm] = (0, import_react38.useState)("");
|
|
3439
|
+
const [highlightedIndex, setHighlightedIndex] = (0, import_react38.useState)(0);
|
|
3440
|
+
const [list, setList] = (0, import_react38.useState)([]);
|
|
3441
|
+
const listRef = (0, import_react38.useRef)(null);
|
|
3442
|
+
const [isError, setIsError] = (0, import_react38.useState)(false);
|
|
3443
|
+
const containerRef = (0, import_react38.useRef)(null);
|
|
3444
|
+
const [isCreateOpen, setIsCreateOpen] = (0, import_react38.useState)(false);
|
|
3445
|
+
const [formData, setFormData] = (0, import_react38.useState)({});
|
|
3335
3446
|
const getNestedValue7 = (obj, path) => {
|
|
3336
3447
|
return path.split(".").reduce((acc, key) => acc?.[key], obj);
|
|
3337
3448
|
};
|
|
3338
|
-
(0,
|
|
3449
|
+
(0, import_react38.useEffect)(() => {
|
|
3339
3450
|
const handleClickOutside = (event) => {
|
|
3340
3451
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
3341
3452
|
setIsOpen(false);
|
|
@@ -3346,7 +3457,7 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
3346
3457
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
3347
3458
|
};
|
|
3348
3459
|
}, []);
|
|
3349
|
-
(0,
|
|
3460
|
+
(0, import_react38.useEffect)(() => {
|
|
3350
3461
|
async function fetchData() {
|
|
3351
3462
|
if (props.dataset) {
|
|
3352
3463
|
setList(props.dataset);
|
|
@@ -3388,7 +3499,7 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
3388
3499
|
audioCtx.close();
|
|
3389
3500
|
}, 250);
|
|
3390
3501
|
};
|
|
3391
|
-
(0,
|
|
3502
|
+
(0, import_react38.useEffect)(() => {
|
|
3392
3503
|
const filteredItems2 = list?.filter(
|
|
3393
3504
|
(item) => item[props?.dataTextFieldName]?.toLowerCase().includes(searchTerm?.toLowerCase())
|
|
3394
3505
|
);
|
|
@@ -3453,7 +3564,7 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
3453
3564
|
const handleInputChange = (event, field) => {
|
|
3454
3565
|
setFormData((prev) => ({ ...prev, [field]: event.target.value }));
|
|
3455
3566
|
};
|
|
3456
|
-
const handleSaveModal = (0,
|
|
3567
|
+
const handleSaveModal = (0, import_react38.useCallback)(async () => {
|
|
3457
3568
|
console.log("Form Data:", formData);
|
|
3458
3569
|
return formData;
|
|
3459
3570
|
}, []);
|
|
@@ -3478,7 +3589,7 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
3478
3589
|
disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none`
|
|
3479
3590
|
}
|
|
3480
3591
|
) }),
|
|
3481
|
-
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { ref: containerRef, children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
3592
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { ref: containerRef, children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react38.default.Fragment, { children: [
|
|
3482
3593
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "fixed z-50 right-0 bg-white top-[62px] w-1/4 border-l border-gray-200", children: [
|
|
3483
3594
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex flex-col p-2 bg-accent-950 text-white", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("h5", { className: "text-md text-white font-medium", children: [
|
|
3484
3595
|
"Select a",
|
|
@@ -3569,11 +3680,11 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
3569
3680
|
});
|
|
3570
3681
|
|
|
3571
3682
|
// src/components/controls/edit/EmailInput.tsx
|
|
3572
|
-
var
|
|
3683
|
+
var import_react39, import_jsx_runtime46, EmailInput, EmailInput_default;
|
|
3573
3684
|
var init_EmailInput = __esm({
|
|
3574
3685
|
"src/components/controls/edit/EmailInput.tsx"() {
|
|
3575
3686
|
"use strict";
|
|
3576
|
-
|
|
3687
|
+
import_react39 = __toESM(require("react"));
|
|
3577
3688
|
import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3578
3689
|
EmailInput = (props) => {
|
|
3579
3690
|
const textChangeHandler = (event) => {
|
|
@@ -3599,7 +3710,7 @@ var init_EmailInput = __esm({
|
|
|
3599
3710
|
if (props.value !== void 0 && props.value !== null) {
|
|
3600
3711
|
value = props.value;
|
|
3601
3712
|
}
|
|
3602
|
-
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react39.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("label", { className: "block mb-1", children: [
|
|
3603
3714
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm font-medium text-slate-700", children: props?.attributes?.label }),
|
|
3604
3715
|
" ",
|
|
3605
3716
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
@@ -3627,12 +3738,12 @@ var init_EmailInput = __esm({
|
|
|
3627
3738
|
});
|
|
3628
3739
|
|
|
3629
3740
|
// src/components/controls/edit/TimeInput.tsx
|
|
3630
|
-
var
|
|
3741
|
+
var import_react40, import_jsx_runtime47, TimeInput, TimeInput_default;
|
|
3631
3742
|
var init_TimeInput = __esm({
|
|
3632
3743
|
"src/components/controls/edit/TimeInput.tsx"() {
|
|
3633
3744
|
"use strict";
|
|
3634
3745
|
"use client";
|
|
3635
|
-
|
|
3746
|
+
import_react40 = __toESM(require("react"));
|
|
3636
3747
|
import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3637
3748
|
TimeInput = (props) => {
|
|
3638
3749
|
const timeChangeHandler = (event) => {
|
|
@@ -3646,7 +3757,7 @@ var init_TimeInput = __esm({
|
|
|
3646
3757
|
});
|
|
3647
3758
|
}
|
|
3648
3759
|
};
|
|
3649
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react40.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "block mb-1", children: [
|
|
3650
3761
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
3651
3762
|
" ",
|
|
3652
3763
|
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
@@ -3791,12 +3902,12 @@ var init_Icon = __esm({
|
|
|
3791
3902
|
});
|
|
3792
3903
|
|
|
3793
3904
|
// src/components/controls/edit/AssetUpload.tsx
|
|
3794
|
-
var
|
|
3905
|
+
var import_react41, import_jsx_runtime54, AssetUpload, AssetUpload_default;
|
|
3795
3906
|
var init_AssetUpload = __esm({
|
|
3796
3907
|
"src/components/controls/edit/AssetUpload.tsx"() {
|
|
3797
3908
|
"use strict";
|
|
3798
3909
|
"use client";
|
|
3799
|
-
|
|
3910
|
+
import_react41 = __toESM(require("react"));
|
|
3800
3911
|
init_ClientButton();
|
|
3801
3912
|
init_StyleTypes();
|
|
3802
3913
|
init_AssetUtility();
|
|
@@ -3823,8 +3934,8 @@ var init_AssetUpload = __esm({
|
|
|
3823
3934
|
}
|
|
3824
3935
|
return "image";
|
|
3825
3936
|
};
|
|
3826
|
-
const [assetType, setAssetType] =
|
|
3827
|
-
(0,
|
|
3937
|
+
const [assetType, setAssetType] = import_react41.default.useState(getInitialTab);
|
|
3938
|
+
(0, import_react41.useEffect)(() => {
|
|
3828
3939
|
setAssetType(getInitialTab());
|
|
3829
3940
|
}, [props.value]);
|
|
3830
3941
|
const assetUploadCallback = (newAsset) => {
|
|
@@ -3899,7 +4010,7 @@ var init_AssetUpload = __esm({
|
|
|
3899
4010
|
}
|
|
3900
4011
|
return false;
|
|
3901
4012
|
};
|
|
3902
|
-
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
4013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_react41.default.Fragment, { children: [
|
|
3903
4014
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("label", { className: "block mb-1", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }) }),
|
|
3904
4015
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex gap-6 bg-neutral-100 rounded p-2", children: [
|
|
3905
4016
|
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
@@ -4000,11 +4111,11 @@ var init_AssetUpload = __esm({
|
|
|
4000
4111
|
});
|
|
4001
4112
|
|
|
4002
4113
|
// src/components/controls/edit/SwitchInput.tsx
|
|
4003
|
-
var
|
|
4114
|
+
var import_react42, import_jsx_runtime55, SwitchInput, SwitchInput_default;
|
|
4004
4115
|
var init_SwitchInput = __esm({
|
|
4005
4116
|
"src/components/controls/edit/SwitchInput.tsx"() {
|
|
4006
4117
|
"use strict";
|
|
4007
|
-
|
|
4118
|
+
import_react42 = __toESM(require("react"));
|
|
4008
4119
|
import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4009
4120
|
SwitchInput = (props) => {
|
|
4010
4121
|
const textChangeHandler = (event) => {
|
|
@@ -4022,7 +4133,7 @@ var init_SwitchInput = __esm({
|
|
|
4022
4133
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
4023
4134
|
value = true;
|
|
4024
4135
|
}
|
|
4025
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
4136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react42.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-start justify-between gap-4 py-3", children: [
|
|
4026
4137
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "min-w-0", children: [
|
|
4027
4138
|
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
4028
4139
|
"label",
|
|
@@ -4160,15 +4271,15 @@ var init_DateTimeUtility = __esm({
|
|
|
4160
4271
|
});
|
|
4161
4272
|
|
|
4162
4273
|
// src/components/controls/edit/DateInput.tsx
|
|
4163
|
-
var
|
|
4274
|
+
var import_react43, import_jsx_runtime56, DateInput, DateInput_default;
|
|
4164
4275
|
var init_DateInput = __esm({
|
|
4165
4276
|
"src/components/controls/edit/DateInput.tsx"() {
|
|
4166
4277
|
"use strict";
|
|
4167
|
-
|
|
4278
|
+
import_react43 = require("react");
|
|
4168
4279
|
init_DateTimeUtility();
|
|
4169
4280
|
import_jsx_runtime56 = require("react/jsx-runtime");
|
|
4170
4281
|
DateInput = (props) => {
|
|
4171
|
-
const value = (0,
|
|
4282
|
+
const value = (0, import_react43.useMemo)(() => {
|
|
4172
4283
|
if (props.value === void 0 || props.value === null || props.value === "") {
|
|
4173
4284
|
return "";
|
|
4174
4285
|
}
|
|
@@ -4226,16 +4337,16 @@ var init_DateInput = __esm({
|
|
|
4226
4337
|
});
|
|
4227
4338
|
|
|
4228
4339
|
// src/components/controls/edit/RadioInput.tsx
|
|
4229
|
-
var
|
|
4340
|
+
var import_react44, import_jsx_runtime57, RadioInput, RadioInput_default;
|
|
4230
4341
|
var init_RadioInput = __esm({
|
|
4231
4342
|
"src/components/controls/edit/RadioInput.tsx"() {
|
|
4232
4343
|
"use strict";
|
|
4233
|
-
|
|
4344
|
+
import_react44 = require("react");
|
|
4234
4345
|
init_Icon();
|
|
4235
4346
|
import_jsx_runtime57 = require("react/jsx-runtime");
|
|
4236
4347
|
RadioInput = (props) => {
|
|
4237
|
-
const [list, setList] = (0,
|
|
4238
|
-
(0,
|
|
4348
|
+
const [list, setList] = (0, import_react44.useState)([]);
|
|
4349
|
+
(0, import_react44.useEffect)(() => {
|
|
4239
4350
|
async function loadData() {
|
|
4240
4351
|
if (props.dataset) {
|
|
4241
4352
|
setList(props.dataset);
|
|
@@ -4340,12 +4451,12 @@ var InputControlClient_exports = {};
|
|
|
4340
4451
|
__export(InputControlClient_exports, {
|
|
4341
4452
|
default: () => InputControlClient_default
|
|
4342
4453
|
});
|
|
4343
|
-
var
|
|
4454
|
+
var import_react45, import_jsx_runtime59, InputControl, InputControlClient_default;
|
|
4344
4455
|
var init_InputControlClient = __esm({
|
|
4345
4456
|
"src/components/controls/edit/InputControlClient.tsx"() {
|
|
4346
4457
|
"use strict";
|
|
4347
4458
|
"use client";
|
|
4348
|
-
|
|
4459
|
+
import_react45 = __toESM(require("react"));
|
|
4349
4460
|
init_MultilineTextInput();
|
|
4350
4461
|
init_LineTextInput();
|
|
4351
4462
|
init_MoneyInput();
|
|
@@ -4368,7 +4479,7 @@ var init_InputControlClient = __esm({
|
|
|
4368
4479
|
init_RadioInput();
|
|
4369
4480
|
init_ReferenceInput();
|
|
4370
4481
|
import_jsx_runtime59 = require("react/jsx-runtime");
|
|
4371
|
-
InputControl =
|
|
4482
|
+
InputControl = import_react45.default.forwardRef(
|
|
4372
4483
|
(props, ref) => {
|
|
4373
4484
|
const ControlComponents = {
|
|
4374
4485
|
[InputControlType_default.lineTextInput]: LineTextInput_default,
|
|
@@ -4393,7 +4504,7 @@ var init_InputControlClient = __esm({
|
|
|
4393
4504
|
[InputControlType_default.referenceInput]: ReferenceInput_default
|
|
4394
4505
|
};
|
|
4395
4506
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
4396
|
-
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react45.default.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
4397
4508
|
}
|
|
4398
4509
|
);
|
|
4399
4510
|
InputControl.displayName = "InputControl";
|
|
@@ -4402,12 +4513,12 @@ var init_InputControlClient = __esm({
|
|
|
4402
4513
|
});
|
|
4403
4514
|
|
|
4404
4515
|
// src/components/controls/edit/InputControl.tsx
|
|
4405
|
-
var
|
|
4516
|
+
var import_dynamic7, InputControl2, InputControl_default;
|
|
4406
4517
|
var init_InputControl = __esm({
|
|
4407
4518
|
"src/components/controls/edit/InputControl.tsx"() {
|
|
4408
4519
|
"use strict";
|
|
4409
|
-
|
|
4410
|
-
InputControl2 = (0,
|
|
4520
|
+
import_dynamic7 = __toESM(require("next/dynamic"));
|
|
4521
|
+
InputControl2 = (0, import_dynamic7.default)(() => Promise.resolve().then(() => (init_InputControlClient(), InputControlClient_exports)), {
|
|
4411
4522
|
ssr: false
|
|
4412
4523
|
});
|
|
4413
4524
|
InputControl_default = InputControl2;
|
|
@@ -4649,29 +4760,29 @@ var LinkNodeButton_exports = {};
|
|
|
4649
4760
|
__export(LinkNodeButton_exports, {
|
|
4650
4761
|
default: () => LinkNodeButton_default
|
|
4651
4762
|
});
|
|
4652
|
-
var
|
|
4763
|
+
var import_react46, import_jsx_runtime63, LinkNodeButton, LinkNodeButton_default;
|
|
4653
4764
|
var init_LinkNodeButton = __esm({
|
|
4654
4765
|
"src/components/pageRenderingEngine/nodes/LinkNodeButton.tsx"() {
|
|
4655
4766
|
"use strict";
|
|
4656
4767
|
"use client";
|
|
4657
|
-
|
|
4768
|
+
import_react46 = require("react");
|
|
4658
4769
|
init_Button();
|
|
4659
4770
|
init_ServiceClient();
|
|
4660
4771
|
init_ToastService();
|
|
4661
4772
|
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
4662
4773
|
LinkNodeButton = (props) => {
|
|
4663
4774
|
const { node, dataitem, children, linkText, linkType, linkUrl } = props;
|
|
4664
|
-
const [isLoading, setIsLoading] = (0,
|
|
4665
|
-
const [successMessage, setSuccessMessage] = (0,
|
|
4775
|
+
const [isLoading, setIsLoading] = (0, import_react46.useState)(false);
|
|
4776
|
+
const [successMessage, setSuccessMessage] = (0, import_react46.useState)(null);
|
|
4666
4777
|
console.log("LinkNodeButton props:", props);
|
|
4667
|
-
const extractFieldNames = (0,
|
|
4778
|
+
const extractFieldNames = (0, import_react46.useCallback)((template) => {
|
|
4668
4779
|
if (!template) return [];
|
|
4669
4780
|
const regex = /\{(\{\})?([a-zA-Z_$][a-zA-Z0-9_$]*)(?:\}\})?\}/g;
|
|
4670
4781
|
const matches = Array.from(template.matchAll(regex));
|
|
4671
4782
|
const fieldNames = matches.map((match) => match[2] || match[1]).filter((name, index, self) => self.indexOf(name) === index);
|
|
4672
4783
|
return fieldNames;
|
|
4673
4784
|
}, []);
|
|
4674
|
-
const replaceTemplateVariables = (0,
|
|
4785
|
+
const replaceTemplateVariables = (0, import_react46.useCallback)(
|
|
4675
4786
|
(template, responseData) => {
|
|
4676
4787
|
if (!template) return template;
|
|
4677
4788
|
let result = template;
|
|
@@ -4703,7 +4814,7 @@ var init_LinkNodeButton = __esm({
|
|
|
4703
4814
|
},
|
|
4704
4815
|
[props.routeParameters, dataitem, extractFieldNames]
|
|
4705
4816
|
);
|
|
4706
|
-
const getNestedValue7 = (0,
|
|
4817
|
+
const getNestedValue7 = (0, import_react46.useCallback)((obj, path) => {
|
|
4707
4818
|
if (!obj || !path) return void 0;
|
|
4708
4819
|
if (obj[path] !== void 0) {
|
|
4709
4820
|
return obj[path];
|
|
@@ -4718,7 +4829,7 @@ var init_LinkNodeButton = __esm({
|
|
|
4718
4829
|
}
|
|
4719
4830
|
return current;
|
|
4720
4831
|
}, []);
|
|
4721
|
-
const onClick = (0,
|
|
4832
|
+
const onClick = (0, import_react46.useCallback)(async () => {
|
|
4722
4833
|
if (!node.postUrl) {
|
|
4723
4834
|
return {
|
|
4724
4835
|
isSuccessful: false,
|
|
@@ -4884,9 +4995,9 @@ __export(CopyButton_exports, {
|
|
|
4884
4995
|
default: () => CopyButton
|
|
4885
4996
|
});
|
|
4886
4997
|
function CopyButton({ text }) {
|
|
4887
|
-
const [copied, setCopied] = (0,
|
|
4888
|
-
const timeoutRef = (0,
|
|
4889
|
-
(0,
|
|
4998
|
+
const [copied, setCopied] = (0, import_react53.useState)(false);
|
|
4999
|
+
const timeoutRef = (0, import_react53.useRef)(null);
|
|
5000
|
+
(0, import_react53.useEffect)(() => {
|
|
4890
5001
|
return () => {
|
|
4891
5002
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4892
5003
|
};
|
|
@@ -4930,25 +5041,25 @@ function CopyButton({ text }) {
|
|
|
4930
5041
|
}
|
|
4931
5042
|
);
|
|
4932
5043
|
}
|
|
4933
|
-
var
|
|
5044
|
+
var import_react53, import_jsx_runtime73;
|
|
4934
5045
|
var init_CopyButton = __esm({
|
|
4935
5046
|
"src/components/CopyButton.tsx"() {
|
|
4936
5047
|
"use strict";
|
|
4937
5048
|
"use client";
|
|
4938
|
-
|
|
5049
|
+
import_react53 = require("react");
|
|
4939
5050
|
import_jsx_runtime73 = require("react/jsx-runtime");
|
|
4940
5051
|
}
|
|
4941
5052
|
});
|
|
4942
5053
|
|
|
4943
5054
|
// src/components/IFrameLoaderView.tsx
|
|
4944
|
-
var
|
|
5055
|
+
var import_react56, import_jsx_runtime77, IFrameLoaderView, IFrameLoaderView_default;
|
|
4945
5056
|
var init_IFrameLoaderView = __esm({
|
|
4946
5057
|
"src/components/IFrameLoaderView.tsx"() {
|
|
4947
5058
|
"use strict";
|
|
4948
|
-
|
|
5059
|
+
import_react56 = __toESM(require("react"));
|
|
4949
5060
|
import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4950
5061
|
IFrameLoaderView = (props) => {
|
|
4951
|
-
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
5062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_react56.default.Fragment, { children: [
|
|
4952
5063
|
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
4953
5064
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
4954
5065
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
@@ -4993,12 +5104,12 @@ var IframeClient_exports = {};
|
|
|
4993
5104
|
__export(IframeClient_exports, {
|
|
4994
5105
|
default: () => IframeClient_default
|
|
4995
5106
|
});
|
|
4996
|
-
var
|
|
5107
|
+
var import_react57, import_jsx_runtime78, IframeClient, IframeClient_default;
|
|
4997
5108
|
var init_IframeClient = __esm({
|
|
4998
5109
|
"src/components/pageRenderingEngine/nodes/IframeClient.tsx"() {
|
|
4999
5110
|
"use strict";
|
|
5000
5111
|
"use client";
|
|
5001
|
-
|
|
5112
|
+
import_react57 = __toESM(require("react"));
|
|
5002
5113
|
init_IFrameLoaderView();
|
|
5003
5114
|
import_jsx_runtime78 = require("react/jsx-runtime");
|
|
5004
5115
|
IframeClient = ({
|
|
@@ -5006,10 +5117,10 @@ var init_IframeClient = __esm({
|
|
|
5006
5117
|
width,
|
|
5007
5118
|
height
|
|
5008
5119
|
}) => {
|
|
5009
|
-
const iframeRef = (0,
|
|
5010
|
-
const [iframeHeight, setIframeHeight] = (0,
|
|
5011
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
5012
|
-
(0,
|
|
5120
|
+
const iframeRef = (0, import_react57.useRef)(null);
|
|
5121
|
+
const [iframeHeight, setIframeHeight] = (0, import_react57.useState)("100%");
|
|
5122
|
+
const [isDataFound, setIsDataFound] = (0, import_react57.useState)(null);
|
|
5123
|
+
(0, import_react57.useEffect)(() => {
|
|
5013
5124
|
const handleReceiveMessage = (event) => {
|
|
5014
5125
|
const eventName = event?.data?.eventName;
|
|
5015
5126
|
const payload = event?.data?.payload;
|
|
@@ -5024,7 +5135,7 @@ var init_IframeClient = __esm({
|
|
|
5024
5135
|
window.addEventListener("message", handleReceiveMessage);
|
|
5025
5136
|
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
5026
5137
|
}, []);
|
|
5027
|
-
(0,
|
|
5138
|
+
(0, import_react57.useEffect)(() => {
|
|
5028
5139
|
const handleResize = () => {
|
|
5029
5140
|
if (iframeRef.current) {
|
|
5030
5141
|
iframeRef.current.contentWindow?.postMessage(
|
|
@@ -5039,7 +5150,7 @@ var init_IframeClient = __esm({
|
|
|
5039
5150
|
const handleIframeLoad = () => {
|
|
5040
5151
|
setIsDataFound(true);
|
|
5041
5152
|
};
|
|
5042
|
-
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
5153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react57.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
5043
5154
|
"iframe",
|
|
5044
5155
|
{
|
|
5045
5156
|
ref: iframeRef,
|
|
@@ -5298,12 +5409,12 @@ var Pagination_exports = {};
|
|
|
5298
5409
|
__export(Pagination_exports, {
|
|
5299
5410
|
default: () => Pagination_default
|
|
5300
5411
|
});
|
|
5301
|
-
var
|
|
5412
|
+
var import_react58, import_jsx_runtime84, Pagination, Pagination_default;
|
|
5302
5413
|
var init_Pagination = __esm({
|
|
5303
5414
|
"src/components/Pagination.tsx"() {
|
|
5304
5415
|
"use strict";
|
|
5305
5416
|
"use client";
|
|
5306
|
-
|
|
5417
|
+
import_react58 = require("react");
|
|
5307
5418
|
init_OdataBuilder();
|
|
5308
5419
|
init_Icon();
|
|
5309
5420
|
init_StyleTypes();
|
|
@@ -5312,7 +5423,7 @@ var init_Pagination = __esm({
|
|
|
5312
5423
|
import_jsx_runtime84 = require("react/jsx-runtime");
|
|
5313
5424
|
Pagination = (props) => {
|
|
5314
5425
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
5315
|
-
const builder = (0,
|
|
5426
|
+
const builder = (0, import_react58.useMemo)(() => {
|
|
5316
5427
|
const b = new OdataBuilder(path);
|
|
5317
5428
|
if (query) b.setQuery(query);
|
|
5318
5429
|
return b;
|
|
@@ -5482,12 +5593,12 @@ var DataBindingControls_exports = {};
|
|
|
5482
5593
|
__export(DataBindingControls_exports, {
|
|
5483
5594
|
default: () => DataBindingControls_default
|
|
5484
5595
|
});
|
|
5485
|
-
var
|
|
5596
|
+
var import_react59, import_navigation, import_jsx_runtime85, humanize, escapeODataString, parseFacetSelections, buildFacetFilter, parseODataSearch, normalizeSortOption, DUMMY_FACETS, DUMMY_SORT_OPTIONS, DataBindingControls, DataBindingControls_default;
|
|
5486
5597
|
var init_DataBindingControls = __esm({
|
|
5487
5598
|
"src/components/pageRenderingEngine/nodes/DataBindingControls.tsx"() {
|
|
5488
5599
|
"use strict";
|
|
5489
5600
|
"use client";
|
|
5490
|
-
|
|
5601
|
+
import_react59 = require("react");
|
|
5491
5602
|
import_navigation = require("next/navigation");
|
|
5492
5603
|
init_InputControl();
|
|
5493
5604
|
init_InputControlType();
|
|
@@ -5568,12 +5679,12 @@ var init_DataBindingControls = __esm({
|
|
|
5568
5679
|
const selectedFacetValues = parseFacetSelections(currentFilter);
|
|
5569
5680
|
const currentSort = query?.["$orderby"] ?? query?.orderBy ?? "";
|
|
5570
5681
|
const currentSearch = parseODataSearch(query?.["$search"]);
|
|
5571
|
-
const [searchText, setSearchText] = (0,
|
|
5572
|
-
const lastNavigationUrl = (0,
|
|
5573
|
-
(0,
|
|
5682
|
+
const [searchText, setSearchText] = (0, import_react59.useState)(currentSearch);
|
|
5683
|
+
const lastNavigationUrl = (0, import_react59.useRef)(null);
|
|
5684
|
+
(0, import_react59.useEffect)(() => {
|
|
5574
5685
|
setSearchText(currentSearch);
|
|
5575
5686
|
}, [currentSearch]);
|
|
5576
|
-
const getQueryUrl = (0,
|
|
5687
|
+
const getQueryUrl = (0, import_react59.useCallback)(
|
|
5577
5688
|
(updates) => {
|
|
5578
5689
|
const params = new URLSearchParams(query ?? {});
|
|
5579
5690
|
Object.entries(updates).forEach(([key, value]) => {
|
|
@@ -5603,7 +5714,7 @@ var init_DataBindingControls = __esm({
|
|
|
5603
5714
|
filter: void 0
|
|
5604
5715
|
});
|
|
5605
5716
|
};
|
|
5606
|
-
const navigateWithoutReload = (0,
|
|
5717
|
+
const navigateWithoutReload = (0, import_react59.useCallback)(
|
|
5607
5718
|
(url) => {
|
|
5608
5719
|
if (lastNavigationUrl.current === url) {
|
|
5609
5720
|
return;
|
|
@@ -5619,7 +5730,7 @@ var init_DataBindingControls = __esm({
|
|
|
5619
5730
|
},
|
|
5620
5731
|
[router]
|
|
5621
5732
|
);
|
|
5622
|
-
(0,
|
|
5733
|
+
(0, import_react59.useEffect)(() => {
|
|
5623
5734
|
const trimmedSearchText = searchText.trim();
|
|
5624
5735
|
if (trimmedSearchText === currentSearch.trim()) {
|
|
5625
5736
|
return;
|
|
@@ -5723,12 +5834,12 @@ var Slider_exports = {};
|
|
|
5723
5834
|
__export(Slider_exports, {
|
|
5724
5835
|
default: () => Slider_default
|
|
5725
5836
|
});
|
|
5726
|
-
var
|
|
5837
|
+
var import_react60, import_jsx_runtime86, Slider, ArrowButton, ProgressPill, Slider_default;
|
|
5727
5838
|
var init_Slider = __esm({
|
|
5728
5839
|
"src/components/Slider.tsx"() {
|
|
5729
5840
|
"use strict";
|
|
5730
5841
|
"use client";
|
|
5731
|
-
|
|
5842
|
+
import_react60 = __toESM(require("react"));
|
|
5732
5843
|
import_jsx_runtime86 = require("react/jsx-runtime");
|
|
5733
5844
|
Slider = ({
|
|
5734
5845
|
children,
|
|
@@ -5747,13 +5858,13 @@ var init_Slider = __esm({
|
|
|
5747
5858
|
pillStyle = "cumulative",
|
|
5748
5859
|
progressPosition = "bottom"
|
|
5749
5860
|
}) => {
|
|
5750
|
-
const [currentSlide, setCurrentSlide] = (0,
|
|
5751
|
-
const [transition, setTransition] = (0,
|
|
5752
|
-
const [slidesToShowState, setSlidesToShowState] = (0,
|
|
5861
|
+
const [currentSlide, setCurrentSlide] = (0, import_react60.useState)(0);
|
|
5862
|
+
const [transition, setTransition] = (0, import_react60.useState)(true);
|
|
5863
|
+
const [slidesToShowState, setSlidesToShowState] = (0, import_react60.useState)(
|
|
5753
5864
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
5754
5865
|
);
|
|
5755
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
5756
|
-
(0,
|
|
5866
|
+
const [isPlaying, setIsPlaying] = (0, import_react60.useState)(autoplay);
|
|
5867
|
+
(0, import_react60.useEffect)(() => {
|
|
5757
5868
|
if (typeof slidesToShow === "number") return;
|
|
5758
5869
|
const handleResize = () => {
|
|
5759
5870
|
if (window.innerWidth >= 1024) {
|
|
@@ -5768,7 +5879,7 @@ var init_Slider = __esm({
|
|
|
5768
5879
|
window.addEventListener("resize", handleResize);
|
|
5769
5880
|
return () => window.removeEventListener("resize", handleResize);
|
|
5770
5881
|
}, [slidesToShow]);
|
|
5771
|
-
(0,
|
|
5882
|
+
(0, import_react60.useEffect)(() => {
|
|
5772
5883
|
if (!autoplay) return;
|
|
5773
5884
|
const timer = setInterval(() => {
|
|
5774
5885
|
if (isPlaying) {
|
|
@@ -5777,7 +5888,7 @@ var init_Slider = __esm({
|
|
|
5777
5888
|
}, autoplay_speed);
|
|
5778
5889
|
return () => clearInterval(timer);
|
|
5779
5890
|
}, [autoplay, autoplay_speed, currentSlide, isPlaying]);
|
|
5780
|
-
const totalSlides =
|
|
5891
|
+
const totalSlides = import_react60.Children.count(children);
|
|
5781
5892
|
const maxSlide = totalSlides - slidesToShowState;
|
|
5782
5893
|
const nextSlide = () => {
|
|
5783
5894
|
if (currentSlide >= maxSlide) {
|
|
@@ -5822,8 +5933,8 @@ var init_Slider = __esm({
|
|
|
5822
5933
|
}
|
|
5823
5934
|
};
|
|
5824
5935
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
5825
|
-
const slides =
|
|
5826
|
-
if (!
|
|
5936
|
+
const slides = import_react60.Children.map(children, (child, index) => {
|
|
5937
|
+
if (!import_react60.default.isValidElement(child)) return null;
|
|
5827
5938
|
const childProps = child.props;
|
|
5828
5939
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
5829
5940
|
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
@@ -5831,7 +5942,7 @@ var init_Slider = __esm({
|
|
|
5831
5942
|
{
|
|
5832
5943
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
5833
5944
|
style: { width: `calc(${100 / slidesToShowState}%)`, paddingRight: gap },
|
|
5834
|
-
children: (0,
|
|
5945
|
+
children: (0, import_react60.cloneElement)(child, {
|
|
5835
5946
|
className: mergedClassName
|
|
5836
5947
|
})
|
|
5837
5948
|
},
|
|
@@ -5944,13 +6055,13 @@ var init_Slider = __esm({
|
|
|
5944
6055
|
currentSlide,
|
|
5945
6056
|
totalSlides
|
|
5946
6057
|
}) => {
|
|
5947
|
-
const [progress, setProgress] = (0,
|
|
5948
|
-
(0,
|
|
6058
|
+
const [progress, setProgress] = (0, import_react60.useState)(0);
|
|
6059
|
+
(0, import_react60.useEffect)(() => {
|
|
5949
6060
|
if (active) {
|
|
5950
6061
|
setProgress(0);
|
|
5951
6062
|
}
|
|
5952
6063
|
}, [active, index]);
|
|
5953
|
-
(0,
|
|
6064
|
+
(0, import_react60.useEffect)(() => {
|
|
5954
6065
|
if (!active || !isPlaying) {
|
|
5955
6066
|
if (!active) {
|
|
5956
6067
|
setProgress(0);
|
|
@@ -6080,7 +6191,7 @@ __export(index_exports, {
|
|
|
6080
6191
|
module.exports = __toCommonJS(index_exports);
|
|
6081
6192
|
|
|
6082
6193
|
// src/components/controls/view/ViewControl.tsx
|
|
6083
|
-
var
|
|
6194
|
+
var import_react22 = __toESM(require("react"));
|
|
6084
6195
|
|
|
6085
6196
|
// src/components/controls/view/ViewControlTypes.tsx
|
|
6086
6197
|
var ViewControlTypes = {
|
|
@@ -6451,56 +6562,10 @@ var CommentRenderer = (0, import_dynamic5.default)(() => Promise.resolve().then(
|
|
|
6451
6562
|
var Commentrenderer_default = CommentRenderer;
|
|
6452
6563
|
|
|
6453
6564
|
// src/components/controls/view/AvatarView.tsx
|
|
6454
|
-
var
|
|
6455
|
-
var
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
"bg-warning-base",
|
|
6459
|
-
"bg-success-base",
|
|
6460
|
-
"bg-info-base",
|
|
6461
|
-
"bg-primary-base",
|
|
6462
|
-
"bg-secondary-base"
|
|
6463
|
-
];
|
|
6464
|
-
var getAvatarColor = (text) => {
|
|
6465
|
-
let hash = 0;
|
|
6466
|
-
for (let i = 0; i < text.length; i += 1) {
|
|
6467
|
-
hash = hash * 31 + text.charCodeAt(i) >>> 0;
|
|
6468
|
-
}
|
|
6469
|
-
return AVATAR_COLORS[hash % AVATAR_COLORS.length];
|
|
6470
|
-
};
|
|
6471
|
-
var getInitials = (text) => {
|
|
6472
|
-
const words = text.trim().split(/\s+/).filter(Boolean);
|
|
6473
|
-
if (words.length === 0) {
|
|
6474
|
-
return "?";
|
|
6475
|
-
}
|
|
6476
|
-
if (words.length === 1) {
|
|
6477
|
-
return words[0].slice(0, 2).toUpperCase();
|
|
6478
|
-
}
|
|
6479
|
-
return `${words[0][0]}${words[words.length - 1][0]}`.toUpperCase();
|
|
6480
|
-
};
|
|
6481
|
-
var AvatarView = (props) => {
|
|
6482
|
-
const text = props.value === null || props.value === void 0 ? "" : String(props.value).trim();
|
|
6483
|
-
if (!text) {
|
|
6484
|
-
return null;
|
|
6485
|
-
}
|
|
6486
|
-
const size = props.width ?? "1.75rem";
|
|
6487
|
-
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
6488
|
-
"span",
|
|
6489
|
-
{
|
|
6490
|
-
className: `avatar-view inline-flex flex-shrink-0 items-center justify-center rounded-full font-semibold uppercase select-none overflow-hidden ${getAvatarColor(text)}`,
|
|
6491
|
-
title: text,
|
|
6492
|
-
"aria-label": text,
|
|
6493
|
-
style: {
|
|
6494
|
-
width: size,
|
|
6495
|
-
height: size,
|
|
6496
|
-
fontSize: "0.6875rem",
|
|
6497
|
-
letterSpacing: "0.02em",
|
|
6498
|
-
lineHeight: 1
|
|
6499
|
-
},
|
|
6500
|
-
children: getInitials(text)
|
|
6501
|
-
}
|
|
6502
|
-
);
|
|
6503
|
-
};
|
|
6565
|
+
var import_dynamic6 = __toESM(require("next/dynamic"));
|
|
6566
|
+
var AvatarView = (0, import_dynamic6.default)(() => Promise.resolve().then(() => (init_AvatarViewClient(), AvatarViewClient_exports)), {
|
|
6567
|
+
ssr: false
|
|
6568
|
+
});
|
|
6504
6569
|
var AvatarView_default = AvatarView;
|
|
6505
6570
|
|
|
6506
6571
|
// src/components/controls/view/ViewControl.tsx
|
|
@@ -6536,7 +6601,7 @@ var ViewControl = (props) => {
|
|
|
6536
6601
|
[ViewControlTypes_default.avatar]: AvatarView_default
|
|
6537
6602
|
};
|
|
6538
6603
|
const SelectedControlComponent = props.controlType ? ControlComponents[props.controlType] : void 0;
|
|
6539
|
-
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
6604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react22.default.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
6540
6605
|
};
|
|
6541
6606
|
var ViewControl_default = ViewControl;
|
|
6542
6607
|
|
|
@@ -6545,10 +6610,10 @@ init_InputControl();
|
|
|
6545
6610
|
init_InputControlType();
|
|
6546
6611
|
|
|
6547
6612
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
6548
|
-
var
|
|
6613
|
+
var import_react62 = __toESM(require("react"));
|
|
6549
6614
|
|
|
6550
6615
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
6551
|
-
var
|
|
6616
|
+
var import_react48 = __toESM(require("react"));
|
|
6552
6617
|
|
|
6553
6618
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
6554
6619
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
@@ -6630,13 +6695,13 @@ var LineBreakNode = () => {
|
|
|
6630
6695
|
var LineBreakNode_default = LineBreakNode;
|
|
6631
6696
|
|
|
6632
6697
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
6633
|
-
var
|
|
6698
|
+
var import_react47 = __toESM(require("react"));
|
|
6634
6699
|
|
|
6635
6700
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
6636
6701
|
init_AssetUtility();
|
|
6637
|
-
var
|
|
6702
|
+
var import_dynamic8 = __toESM(require("next/dynamic"));
|
|
6638
6703
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
6639
|
-
var HlsPlayer3 = (0,
|
|
6704
|
+
var HlsPlayer3 = (0, import_dynamic8.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
6640
6705
|
var getNestedValue = (obj, path) => {
|
|
6641
6706
|
if (!obj || !path) return void 0;
|
|
6642
6707
|
return path.split(".").reduce((current, key) => {
|
|
@@ -6744,9 +6809,9 @@ var ImageNode_default = ImageNode;
|
|
|
6744
6809
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
6745
6810
|
init_StyleTypes();
|
|
6746
6811
|
init_Hyperlink();
|
|
6747
|
-
var
|
|
6812
|
+
var import_dynamic9 = __toESM(require("next/dynamic"));
|
|
6748
6813
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
6749
|
-
var LinkNodeButton2 = (0,
|
|
6814
|
+
var LinkNodeButton2 = (0, import_dynamic9.default)(() => Promise.resolve().then(() => (init_LinkNodeButton(), LinkNodeButton_exports)), {
|
|
6750
6815
|
ssr: false
|
|
6751
6816
|
});
|
|
6752
6817
|
function getNestedValue2(obj, path) {
|
|
@@ -6804,7 +6869,7 @@ var LinkNode = (props) => {
|
|
|
6804
6869
|
console.warn("Unknown node type:", childNode.type);
|
|
6805
6870
|
return null;
|
|
6806
6871
|
}
|
|
6807
|
-
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
6872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react47.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
6808
6873
|
SelectedNode,
|
|
6809
6874
|
{
|
|
6810
6875
|
node: childNode,
|
|
@@ -7048,7 +7113,7 @@ var ParagraphNode = (props) => {
|
|
|
7048
7113
|
if (isInlineOnlyParent) {
|
|
7049
7114
|
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, { children: hasChildren && props.node.children.map((node, index) => {
|
|
7050
7115
|
const SelectedNode = NodeTypes2[node.type];
|
|
7051
|
-
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react48.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7052
7117
|
SelectedNode,
|
|
7053
7118
|
{
|
|
7054
7119
|
node,
|
|
@@ -7064,7 +7129,7 @@ var ParagraphNode = (props) => {
|
|
|
7064
7129
|
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: " " + formatClasses, children: [
|
|
7065
7130
|
hasChildren && props.node.children.map((node, index) => {
|
|
7066
7131
|
const SelectedNode = NodeTypes2[node.type];
|
|
7067
|
-
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react48.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7068
7133
|
SelectedNode,
|
|
7069
7134
|
{
|
|
7070
7135
|
node,
|
|
@@ -7082,7 +7147,7 @@ var ParagraphNode = (props) => {
|
|
|
7082
7147
|
var ParagraphNode_default = ParagraphNode;
|
|
7083
7148
|
|
|
7084
7149
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
7085
|
-
var
|
|
7150
|
+
var import_react49 = __toESM(require("react"));
|
|
7086
7151
|
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
7087
7152
|
var HeadingNode = (props) => {
|
|
7088
7153
|
const NodeTypes2 = {
|
|
@@ -7099,22 +7164,22 @@ var HeadingNode = (props) => {
|
|
|
7099
7164
|
{
|
|
7100
7165
|
}
|
|
7101
7166
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
7102
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_jsx_runtime69.Fragment, { children:
|
|
7167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_jsx_runtime69.Fragment, { children: import_react49.default.createElement(
|
|
7103
7168
|
HeadingTag,
|
|
7104
7169
|
{ className: formatClasses },
|
|
7105
7170
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
7106
7171
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
7107
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
7172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react49.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, assetBaseUrl: props.assetBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
7108
7173
|
})
|
|
7109
7174
|
) });
|
|
7110
7175
|
};
|
|
7111
7176
|
var HeadingNode_default = HeadingNode;
|
|
7112
7177
|
|
|
7113
7178
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
7114
|
-
var
|
|
7179
|
+
var import_react51 = __toESM(require("react"));
|
|
7115
7180
|
|
|
7116
7181
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
7117
|
-
var
|
|
7182
|
+
var import_react50 = __toESM(require("react"));
|
|
7118
7183
|
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
7119
7184
|
var ListItemNode = (props) => {
|
|
7120
7185
|
const NodeTypes2 = {
|
|
@@ -7143,7 +7208,7 @@ var ListItemNode = (props) => {
|
|
|
7143
7208
|
}
|
|
7144
7209
|
} else {
|
|
7145
7210
|
foundFirstBreak = false;
|
|
7146
|
-
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
7211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react50.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
7147
7212
|
}
|
|
7148
7213
|
}) });
|
|
7149
7214
|
};
|
|
@@ -7155,21 +7220,21 @@ var ListNode = (props) => {
|
|
|
7155
7220
|
const NodeTypes2 = {
|
|
7156
7221
|
listitem: ListItemNode_default
|
|
7157
7222
|
};
|
|
7158
|
-
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
7223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_react51.default.Fragment, { children: [
|
|
7159
7224
|
props.node.listType == "bullet" && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
7160
7225
|
const SelectedNode = NodeTypes2[node.type];
|
|
7161
|
-
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
7226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react51.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
7162
7227
|
}) }),
|
|
7163
7228
|
props.node.listType == "number" && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
7164
7229
|
const SelectedNode = NodeTypes2[node.type];
|
|
7165
|
-
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
7230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react51.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
7166
7231
|
}) })
|
|
7167
7232
|
] });
|
|
7168
7233
|
};
|
|
7169
7234
|
var ListNode_default = ListNode;
|
|
7170
7235
|
|
|
7171
7236
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
7172
|
-
var
|
|
7237
|
+
var import_react52 = __toESM(require("react"));
|
|
7173
7238
|
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
7174
7239
|
var QuoteNode = (props) => {
|
|
7175
7240
|
const NodeTypes2 = {
|
|
@@ -7179,16 +7244,16 @@ var QuoteNode = (props) => {
|
|
|
7179
7244
|
};
|
|
7180
7245
|
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
7181
7246
|
const SelectedNode = NodeTypes2[node.type];
|
|
7182
|
-
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
7247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react52.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
7183
7248
|
}) });
|
|
7184
7249
|
};
|
|
7185
7250
|
var QuoteNode_default = QuoteNode;
|
|
7186
7251
|
|
|
7187
7252
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
7188
|
-
var
|
|
7189
|
-
var
|
|
7253
|
+
var import_react54 = __toESM(require("react"));
|
|
7254
|
+
var import_dynamic10 = __toESM(require("next/dynamic"));
|
|
7190
7255
|
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
7191
|
-
var CopyButton2 = (0,
|
|
7256
|
+
var CopyButton2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_CopyButton(), CopyButton_exports)), {
|
|
7192
7257
|
ssr: false,
|
|
7193
7258
|
// optional: fallback UI while loading
|
|
7194
7259
|
loading: () => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
@@ -7212,7 +7277,7 @@ var CodeNode = (props) => {
|
|
|
7212
7277
|
] }),
|
|
7213
7278
|
/* @__PURE__ */ (0, import_jsx_runtime74.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) => {
|
|
7214
7279
|
const SelectedNode = NodeTypes2[node.type];
|
|
7215
|
-
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
7280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_react54.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
7216
7281
|
SelectedNode,
|
|
7217
7282
|
{
|
|
7218
7283
|
node,
|
|
@@ -7234,7 +7299,7 @@ var HorizontalRuleNode = () => {
|
|
|
7234
7299
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
7235
7300
|
|
|
7236
7301
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
7237
|
-
var
|
|
7302
|
+
var import_react55 = __toESM(require("react"));
|
|
7238
7303
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
7239
7304
|
var WidgetNode = (props) => {
|
|
7240
7305
|
const getWidgetParameters = () => {
|
|
@@ -7308,7 +7373,7 @@ var WidgetNode = (props) => {
|
|
|
7308
7373
|
}
|
|
7309
7374
|
return (
|
|
7310
7375
|
// eslint-disable-next-line react-hooks/static-components
|
|
7311
|
-
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
7376
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react55.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
7312
7377
|
WidgetRenderer,
|
|
7313
7378
|
{
|
|
7314
7379
|
params: widgetParams,
|
|
@@ -7325,13 +7390,13 @@ var WidgetNode = (props) => {
|
|
|
7325
7390
|
var WidgetNode_default = WidgetNode;
|
|
7326
7391
|
|
|
7327
7392
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
7328
|
-
var
|
|
7329
|
-
var
|
|
7393
|
+
var import_dynamic14 = __toESM(require("next/dynamic"));
|
|
7394
|
+
var import_react61 = __toESM(require("react"));
|
|
7330
7395
|
|
|
7331
7396
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
7332
|
-
var
|
|
7397
|
+
var import_dynamic11 = __toESM(require("next/dynamic"));
|
|
7333
7398
|
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
7334
|
-
var IframeClient2 = (0,
|
|
7399
|
+
var IframeClient2 = (0, import_dynamic11.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
7335
7400
|
ssr: false
|
|
7336
7401
|
});
|
|
7337
7402
|
var EmbedNode = (props) => {
|
|
@@ -7573,9 +7638,9 @@ var NoDataFound_default = NoDataFound;
|
|
|
7573
7638
|
|
|
7574
7639
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
7575
7640
|
init_AssetUtility();
|
|
7576
|
-
var
|
|
7641
|
+
var import_dynamic12 = __toESM(require("next/dynamic"));
|
|
7577
7642
|
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
7578
|
-
var HlsPlayer4 = (0,
|
|
7643
|
+
var HlsPlayer4 = (0, import_dynamic12.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
7579
7644
|
var deviceToMediaQuery = (device) => {
|
|
7580
7645
|
switch (device) {
|
|
7581
7646
|
case "lg":
|
|
@@ -8422,9 +8487,9 @@ var DocumentNode = (props) => {
|
|
|
8422
8487
|
var DocumentNode_default = DocumentNode;
|
|
8423
8488
|
|
|
8424
8489
|
// src/components/pageRenderingEngine/nodes/GoogleMapNode.tsx
|
|
8425
|
-
var
|
|
8490
|
+
var import_dynamic13 = __toESM(require("next/dynamic"));
|
|
8426
8491
|
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
8427
|
-
var IframeClient3 = (0,
|
|
8492
|
+
var IframeClient3 = (0, import_dynamic13.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
8428
8493
|
ssr: false
|
|
8429
8494
|
});
|
|
8430
8495
|
var GoogleMapNode = (props) => {
|
|
@@ -8442,11 +8507,11 @@ var GoogleMapNode_default = GoogleMapNode;
|
|
|
8442
8507
|
|
|
8443
8508
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
8444
8509
|
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
8445
|
-
var Pagination2 = (0,
|
|
8446
|
-
var DataBindingControls2 = (0,
|
|
8510
|
+
var Pagination2 = (0, import_dynamic14.default)(() => Promise.resolve().then(() => (init_Pagination(), Pagination_exports)), { ssr: true });
|
|
8511
|
+
var DataBindingControls2 = (0, import_dynamic14.default)(() => Promise.resolve().then(() => (init_DataBindingControls(), DataBindingControls_exports)), {
|
|
8447
8512
|
ssr: true
|
|
8448
8513
|
});
|
|
8449
|
-
var Slider2 = (0,
|
|
8514
|
+
var Slider2 = (0, import_dynamic14.default)(() => Promise.resolve().then(() => (init_Slider(), Slider_exports)), {
|
|
8450
8515
|
ssr: false
|
|
8451
8516
|
});
|
|
8452
8517
|
function toCamelCase(str) {
|
|
@@ -8684,9 +8749,10 @@ var DivContainer = async (props) => {
|
|
|
8684
8749
|
let response = null;
|
|
8685
8750
|
let childCollectionData = null;
|
|
8686
8751
|
let shouldShowNoDataMessage = props.forceNoDataMessage === true;
|
|
8687
|
-
|
|
8752
|
+
const dataSource = dataBindingProperties?.dataSource?.trim();
|
|
8753
|
+
if (dataSource && !shouldShowNoDataMessage) {
|
|
8688
8754
|
const serviceClient = new ServiceClient_default(props.apiBaseUrl, props.session);
|
|
8689
|
-
endpoint =
|
|
8755
|
+
endpoint = dataSource;
|
|
8690
8756
|
{
|
|
8691
8757
|
}
|
|
8692
8758
|
endpoint = endpoint.replace(/\{(\w+)\}/g, (_, key) => {
|
|
@@ -8724,7 +8790,7 @@ var DivContainer = async (props) => {
|
|
|
8724
8790
|
}
|
|
8725
8791
|
const SelectedNode = NodeTypes2[node.type];
|
|
8726
8792
|
if (!SelectedNode) return null;
|
|
8727
|
-
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react61.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8728
8794
|
SelectedNode,
|
|
8729
8795
|
{
|
|
8730
8796
|
node,
|
|
@@ -8816,7 +8882,7 @@ var DivContainer = async (props) => {
|
|
|
8816
8882
|
item,
|
|
8817
8883
|
idx,
|
|
8818
8884
|
props.href ? void 0 : item?.links?.view
|
|
8819
|
-
)?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8885
|
+
)?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_react61.default.Fragment, { children: child }, i)) : renderChildren2(props.node.children, props, item, idx)
|
|
8820
8886
|
);
|
|
8821
8887
|
}
|
|
8822
8888
|
return props.node.children.flatMap((node, childIndex) => {
|
|
@@ -8948,14 +9014,14 @@ var DivContainer = async (props) => {
|
|
|
8948
9014
|
dataset: response
|
|
8949
9015
|
}
|
|
8950
9016
|
) : null;
|
|
8951
|
-
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
9017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_react61.default.Fragment, { children: [
|
|
8952
9018
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8953
9019
|
"style",
|
|
8954
9020
|
{
|
|
8955
9021
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
8956
9022
|
}
|
|
8957
9023
|
),
|
|
8958
|
-
showDataBindingControls ? /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
9024
|
+
showDataBindingControls ? /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_react61.default.Fragment, { children: [
|
|
8959
9025
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8960
9026
|
DataBindingControls2,
|
|
8961
9027
|
{
|
|
@@ -8993,7 +9059,7 @@ var DivContainer = async (props) => {
|
|
|
8993
9059
|
]
|
|
8994
9060
|
}
|
|
8995
9061
|
)
|
|
8996
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
9062
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_react61.default.Fragment, { children: [
|
|
8997
9063
|
renderedContainer,
|
|
8998
9064
|
paginationControl && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { children: paginationControl })
|
|
8999
9065
|
] })
|
|
@@ -9040,14 +9106,14 @@ var PageBodyRenderer = (props) => {
|
|
|
9040
9106
|
}
|
|
9041
9107
|
return true;
|
|
9042
9108
|
};
|
|
9043
|
-
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react62.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
9044
9110
|
{
|
|
9045
9111
|
}
|
|
9046
9112
|
const SelectedNode = NodeTypes[node.type];
|
|
9047
9113
|
if (!shouldRenderNode(node)) {
|
|
9048
9114
|
return null;
|
|
9049
9115
|
}
|
|
9050
|
-
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9116
|
+
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)(
|
|
9051
9117
|
SelectedNode,
|
|
9052
9118
|
{
|
|
9053
9119
|
node,
|
|
@@ -9063,7 +9129,7 @@ var PageBodyRenderer = (props) => {
|
|
|
9063
9129
|
device: props.device,
|
|
9064
9130
|
widgetRenderer: props.widgetRenderer
|
|
9065
9131
|
}
|
|
9066
|
-
) }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9132
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react62.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9067
9133
|
SelectedNode,
|
|
9068
9134
|
{
|
|
9069
9135
|
node,
|
|
@@ -9084,10 +9150,10 @@ var PageBodyRenderer = (props) => {
|
|
|
9084
9150
|
var PageBodyRenderer_default = PageBodyRenderer;
|
|
9085
9151
|
|
|
9086
9152
|
// src/components/pageRenderingEngine/EnterAnimationHydrator.tsx
|
|
9087
|
-
var
|
|
9153
|
+
var import_react63 = require("react");
|
|
9088
9154
|
var ENTER_ANIMATION_SELECTOR = ".enter-animation";
|
|
9089
9155
|
function EnterAnimationHydrator() {
|
|
9090
|
-
(0,
|
|
9156
|
+
(0, import_react63.useEffect)(() => {
|
|
9091
9157
|
let observer;
|
|
9092
9158
|
const observedElements = /* @__PURE__ */ new WeakSet();
|
|
9093
9159
|
const revealAnimatedElements = () => {
|
|
@@ -9132,22 +9198,22 @@ function EnterAnimationHydrator() {
|
|
|
9132
9198
|
}
|
|
9133
9199
|
|
|
9134
9200
|
// src/components/Toast.tsx
|
|
9135
|
-
var
|
|
9201
|
+
var import_react64 = require("react");
|
|
9136
9202
|
init_ToastService();
|
|
9137
9203
|
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
9138
9204
|
var Toast = () => {
|
|
9139
|
-
const [showToast, setShowToast] = (0,
|
|
9140
|
-
const [message, setMessage] = (0,
|
|
9141
|
-
const [messageType, setMessageType] = (0,
|
|
9142
|
-
const timeoutRef = (0,
|
|
9143
|
-
const closeToast = (0,
|
|
9205
|
+
const [showToast, setShowToast] = (0, import_react64.useState)(false);
|
|
9206
|
+
const [message, setMessage] = (0, import_react64.useState)("");
|
|
9207
|
+
const [messageType, setMessageType] = (0, import_react64.useState)("error");
|
|
9208
|
+
const timeoutRef = (0, import_react64.useRef)(null);
|
|
9209
|
+
const closeToast = (0, import_react64.useCallback)(() => {
|
|
9144
9210
|
if (timeoutRef.current) {
|
|
9145
9211
|
clearTimeout(timeoutRef.current);
|
|
9146
9212
|
timeoutRef.current = null;
|
|
9147
9213
|
}
|
|
9148
9214
|
setShowToast(false);
|
|
9149
9215
|
}, []);
|
|
9150
|
-
const showMessage = (0,
|
|
9216
|
+
const showMessage = (0, import_react64.useCallback)((message2, messageType2) => {
|
|
9151
9217
|
if (timeoutRef.current) {
|
|
9152
9218
|
clearTimeout(timeoutRef.current);
|
|
9153
9219
|
}
|
|
@@ -9159,7 +9225,7 @@ var Toast = () => {
|
|
|
9159
9225
|
timeoutRef.current = null;
|
|
9160
9226
|
}, 4e3);
|
|
9161
9227
|
}, []);
|
|
9162
|
-
(0,
|
|
9228
|
+
(0, import_react64.useEffect)(() => {
|
|
9163
9229
|
ToastService_default.initialize(showMessage, closeToast);
|
|
9164
9230
|
return () => {
|
|
9165
9231
|
closeToast();
|
|
@@ -9253,15 +9319,15 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
9253
9319
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
9254
9320
|
|
|
9255
9321
|
// src/components/dataForm/DataList.tsx
|
|
9256
|
-
var
|
|
9322
|
+
var import_react67 = __toESM(require("react"));
|
|
9257
9323
|
init_InputControl();
|
|
9258
9324
|
var import_navigation3 = require("next/navigation");
|
|
9259
9325
|
|
|
9260
9326
|
// src/components/dataForm/NoContentView.tsx
|
|
9261
|
-
var
|
|
9327
|
+
var import_react65 = __toESM(require("react"));
|
|
9262
9328
|
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
9263
9329
|
var NoContentView = (props) => {
|
|
9264
|
-
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
9330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react65.default.Fragment, { children: props.isDataFound === false && props.children });
|
|
9265
9331
|
};
|
|
9266
9332
|
var NoContentView_default = NoContentView;
|
|
9267
9333
|
|
|
@@ -9269,10 +9335,10 @@ var NoContentView_default = NoContentView;
|
|
|
9269
9335
|
init_InputControlType();
|
|
9270
9336
|
|
|
9271
9337
|
// src/components/dataForm/ContentView.tsx
|
|
9272
|
-
var
|
|
9338
|
+
var import_react66 = __toESM(require("react"));
|
|
9273
9339
|
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
9274
9340
|
var ContentView = (props) => {
|
|
9275
|
-
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
9341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_react66.default.Fragment, { children: [
|
|
9276
9342
|
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
9277
9343
|
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
9278
9344
|
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
@@ -9369,12 +9435,12 @@ var DataList = (props) => {
|
|
|
9369
9435
|
let activePageNumber = 0;
|
|
9370
9436
|
let pages = 0;
|
|
9371
9437
|
console.log(props.addLinkText);
|
|
9372
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
9373
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
9374
|
-
(0,
|
|
9438
|
+
const [isDataFound, setIsDataFound] = (0, import_react67.useState)(null);
|
|
9439
|
+
const [searchTerm, setSearchTerm] = (0, import_react67.useState)(props.query?.searchTerm ?? "");
|
|
9440
|
+
(0, import_react67.useEffect)(() => {
|
|
9375
9441
|
setSearchTerm(props.query?.searchTerm ?? "");
|
|
9376
9442
|
}, [props.query?.searchTerm]);
|
|
9377
|
-
(0,
|
|
9443
|
+
(0, import_react67.useEffect)(() => {
|
|
9378
9444
|
if (props?.dataset) {
|
|
9379
9445
|
if (props?.dataset.result && props.dataset.result.length > 0) {
|
|
9380
9446
|
setIsDataFound(true);
|
|
@@ -9383,7 +9449,7 @@ var DataList = (props) => {
|
|
|
9383
9449
|
}
|
|
9384
9450
|
}
|
|
9385
9451
|
}, [props.dataset]);
|
|
9386
|
-
(0,
|
|
9452
|
+
(0, import_react67.useEffect)(() => {
|
|
9387
9453
|
if (!props.query?.["$filter"] || !props.filters) return;
|
|
9388
9454
|
const filterQuery = props.query["$filter"];
|
|
9389
9455
|
props.filters.forEach((filter) => {
|
|
@@ -9411,11 +9477,11 @@ var DataList = (props) => {
|
|
|
9411
9477
|
inputValues: {},
|
|
9412
9478
|
lastPropertyChanged: ""
|
|
9413
9479
|
};
|
|
9414
|
-
const [formState, dispatch] = (0,
|
|
9480
|
+
const [formState, dispatch] = (0, import_react67.useReducer)(FormReducer_default, initialState);
|
|
9415
9481
|
const getSearchableColumns = () => {
|
|
9416
9482
|
return props.columns?.filter((c) => c.isSearchable)?.map((c) => c.name)?.join(",");
|
|
9417
9483
|
};
|
|
9418
|
-
const handleFilterChange = (0,
|
|
9484
|
+
const handleFilterChange = (0, import_react67.useCallback)(
|
|
9419
9485
|
(updatedValues) => {
|
|
9420
9486
|
dispatch({
|
|
9421
9487
|
type: FORM_INPUT_UPDATE,
|
|
@@ -9446,7 +9512,7 @@ var DataList = (props) => {
|
|
|
9446
9512
|
},
|
|
9447
9513
|
[dispatch, props, router]
|
|
9448
9514
|
);
|
|
9449
|
-
(0,
|
|
9515
|
+
(0, import_react67.useEffect)(() => {
|
|
9450
9516
|
if (!props.columns.some((col) => col.isSearchable)) {
|
|
9451
9517
|
return;
|
|
9452
9518
|
}
|
|
@@ -9484,7 +9550,7 @@ var DataList = (props) => {
|
|
|
9484
9550
|
const renderPageNumbers = () => {
|
|
9485
9551
|
if (pages <= 10) {
|
|
9486
9552
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
9487
|
-
(page) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9553
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react67.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9488
9554
|
Hyperlink,
|
|
9489
9555
|
{
|
|
9490
9556
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9498,7 +9564,7 @@ var DataList = (props) => {
|
|
|
9498
9564
|
const showLastPages = activePageNumber > pages - 5;
|
|
9499
9565
|
if (showFirstPages) {
|
|
9500
9566
|
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
9501
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9567
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react67.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9502
9568
|
Hyperlink,
|
|
9503
9569
|
{
|
|
9504
9570
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9564,7 +9630,7 @@ var DataList = (props) => {
|
|
|
9564
9630
|
),
|
|
9565
9631
|
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
9566
9632
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
9567
|
-
(page) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9633
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react67.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9568
9634
|
Hyperlink,
|
|
9569
9635
|
{
|
|
9570
9636
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9596,7 +9662,7 @@ var DataList = (props) => {
|
|
|
9596
9662
|
Array.from(
|
|
9597
9663
|
{ length: 5 },
|
|
9598
9664
|
(_, index) => activePageNumber - 2 + index
|
|
9599
|
-
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9665
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react67.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9600
9666
|
Hyperlink,
|
|
9601
9667
|
{
|
|
9602
9668
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9642,7 +9708,7 @@ var DataList = (props) => {
|
|
|
9642
9708
|
}
|
|
9643
9709
|
}
|
|
9644
9710
|
};
|
|
9645
|
-
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
9711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_react67.default.Fragment, { children: [
|
|
9646
9712
|
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(ContentView_default, { isDataFound, children: [
|
|
9647
9713
|
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
9648
9714
|
"div",
|
|
@@ -9735,7 +9801,7 @@ var DataList = (props) => {
|
|
|
9735
9801
|
}
|
|
9736
9802
|
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("tr", { className: validityClass, children: [
|
|
9737
9803
|
props?.columns?.map((column, colindex) => {
|
|
9738
|
-
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react67.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
9739
9805
|
"td",
|
|
9740
9806
|
{
|
|
9741
9807
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
@@ -9931,7 +9997,7 @@ var DataList = (props) => {
|
|
|
9931
9997
|
var DataList_default = DataList;
|
|
9932
9998
|
|
|
9933
9999
|
// src/components/dataForm/DataListRenderer.tsx
|
|
9934
|
-
var
|
|
10000
|
+
var import_react68 = __toESM(require("react"));
|
|
9935
10001
|
init_ServiceClient();
|
|
9936
10002
|
init_OdataBuilder();
|
|
9937
10003
|
init_SelectWithSearchInput();
|
|
@@ -9991,14 +10057,14 @@ var DataListRenderer = ({
|
|
|
9991
10057
|
widgetProps
|
|
9992
10058
|
}) => {
|
|
9993
10059
|
const serviceClient = new ServiceClient_default(apiBaseUrl, session);
|
|
9994
|
-
const [columns, setColumns] = (0,
|
|
9995
|
-
const [dataset, setDataset] = (0,
|
|
9996
|
-
const [filter, setFilters] = (0,
|
|
9997
|
-
const [addLinkHref, setAddLinkHref] = (0,
|
|
9998
|
-
const [addLinkText, setAddLinkText] = (0,
|
|
9999
|
-
const [serviceRoute, setServiceRoute] = (0,
|
|
10060
|
+
const [columns, setColumns] = (0, import_react68.useState)([]);
|
|
10061
|
+
const [dataset, setDataset] = (0, import_react68.useState)();
|
|
10062
|
+
const [filter, setFilters] = (0, import_react68.useState)([]);
|
|
10063
|
+
const [addLinkHref, setAddLinkHref] = (0, import_react68.useState)("");
|
|
10064
|
+
const [addLinkText, setAddLinkText] = (0, import_react68.useState)("");
|
|
10065
|
+
const [serviceRoute, setServiceRoute] = (0, import_react68.useState)("");
|
|
10000
10066
|
const pathname = (0, import_navigation4.usePathname)();
|
|
10001
|
-
(0,
|
|
10067
|
+
(0, import_react68.useEffect)(() => {
|
|
10002
10068
|
if (!formDefinition) return;
|
|
10003
10069
|
setColumns(mapApiToColumns(formDefinition));
|
|
10004
10070
|
setFilters(mapApiToFilters(formDefinition));
|
|
@@ -10011,7 +10077,7 @@ var DataListRenderer = ({
|
|
|
10011
10077
|
setAddLinkHref(resolvedAddLinkHref);
|
|
10012
10078
|
setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
|
|
10013
10079
|
}, [formDefinition, params]);
|
|
10014
|
-
(0,
|
|
10080
|
+
(0, import_react68.useEffect)(() => {
|
|
10015
10081
|
const fetchData = async () => {
|
|
10016
10082
|
if (!serviceRoute) return;
|
|
10017
10083
|
const resolvedRoute = resolveRoutePlaceholders2(serviceRoute, params);
|
|
@@ -10031,7 +10097,7 @@ var DataListRenderer = ({
|
|
|
10031
10097
|
isActive: landingPageUrl === pathname
|
|
10032
10098
|
};
|
|
10033
10099
|
});
|
|
10034
|
-
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
10100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_react68.default.Fragment, { children: [
|
|
10035
10101
|
resolvedTabs.length > 0 && // <NavigationTabsV2
|
|
10036
10102
|
// tabs={resolvedTabs}
|
|
10037
10103
|
// params={(widgetProps?.params ?? params) as Record<string, any>}
|
|
@@ -10059,14 +10125,14 @@ var DataListRenderer_default = DataListRenderer;
|
|
|
10059
10125
|
init_InputControlType();
|
|
10060
10126
|
|
|
10061
10127
|
// src/components/dataForm/DataForm.tsx
|
|
10062
|
-
var
|
|
10128
|
+
var import_react70 = __toESM(require("react"));
|
|
10063
10129
|
init_InputControl();
|
|
10064
10130
|
init_Icon();
|
|
10065
10131
|
init_Button();
|
|
10066
10132
|
init_StyleTypes();
|
|
10067
10133
|
|
|
10068
10134
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
10069
|
-
var
|
|
10135
|
+
var import_react69 = __toESM(require("react"));
|
|
10070
10136
|
init_InputControl();
|
|
10071
10137
|
|
|
10072
10138
|
// src/components/dataForm/StyleTypes.tsx
|
|
@@ -10106,7 +10172,7 @@ var DataFormChildSection = (props) => {
|
|
|
10106
10172
|
return childItems.map((item, originalIndex) => ({ item, originalIndex })).filter((x) => !x.item.isDeleted) || [];
|
|
10107
10173
|
};
|
|
10108
10174
|
const childItemsToRender = getChildItemsForRendering();
|
|
10109
|
-
const handleChildInputChange = (0,
|
|
10175
|
+
const handleChildInputChange = (0, import_react69.useCallback)(
|
|
10110
10176
|
(updatedValues) => {
|
|
10111
10177
|
if (isOneToOne) {
|
|
10112
10178
|
props.callback({
|
|
@@ -10133,7 +10199,7 @@ var DataFormChildSection = (props) => {
|
|
|
10133
10199
|
},
|
|
10134
10200
|
[props, isOneToOne, childItemsToRender]
|
|
10135
10201
|
);
|
|
10136
|
-
const onAddRow = (0,
|
|
10202
|
+
const onAddRow = (0, import_react69.useCallback)(() => {
|
|
10137
10203
|
props.callback({
|
|
10138
10204
|
sectionName: props.section.name,
|
|
10139
10205
|
actionType: FORM_CHILD_ROW_ADD,
|
|
@@ -10142,7 +10208,7 @@ var DataFormChildSection = (props) => {
|
|
|
10142
10208
|
rowIndex: -1
|
|
10143
10209
|
});
|
|
10144
10210
|
}, [props]);
|
|
10145
|
-
const onDeleteRow = (0,
|
|
10211
|
+
const onDeleteRow = (0, import_react69.useCallback)(
|
|
10146
10212
|
(filteredIndex) => {
|
|
10147
10213
|
const visibleItem = childItemsToRender[filteredIndex];
|
|
10148
10214
|
if (visibleItem) {
|
|
@@ -10162,7 +10228,7 @@ var DataFormChildSection = (props) => {
|
|
|
10162
10228
|
childItemsToRender,
|
|
10163
10229
|
allChildItems: childItems
|
|
10164
10230
|
});
|
|
10165
|
-
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react69.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
10166
10232
|
section.sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
10167
10233
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
10168
10234
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
@@ -10184,7 +10250,7 @@ var DataFormChildSection = (props) => {
|
|
|
10184
10250
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
10185
10251
|
const { item, originalIndex } = visibleItem;
|
|
10186
10252
|
const rowKey = originalIndex;
|
|
10187
|
-
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react69.default.Fragment, { children: section.sectionRows.map(
|
|
10188
10254
|
(sectionRow, sectionRowIndex) => {
|
|
10189
10255
|
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
10190
10256
|
"tr",
|
|
@@ -10255,7 +10321,7 @@ var DataFormChildSection_default = DataFormChildSection;
|
|
|
10255
10321
|
// src/components/dataForm/DataForm.tsx
|
|
10256
10322
|
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
10257
10323
|
var DataForm = (props) => {
|
|
10258
|
-
const formRef = (0,
|
|
10324
|
+
const formRef = (0, import_react70.useRef)(null);
|
|
10259
10325
|
console.log(props.dataItem, "dssads");
|
|
10260
10326
|
const initialState = {
|
|
10261
10327
|
inputValues: {},
|
|
@@ -10264,9 +10330,9 @@ var DataForm = (props) => {
|
|
|
10264
10330
|
const childInitialState = {
|
|
10265
10331
|
inputValues: []
|
|
10266
10332
|
};
|
|
10267
|
-
const [formState, dispatch] = (0,
|
|
10333
|
+
const [formState, dispatch] = (0, import_react70.useReducer)(FormReducer_default, initialState);
|
|
10268
10334
|
console.log(props.sections, "sections");
|
|
10269
|
-
const clearHiddenChildSections = (0,
|
|
10335
|
+
const clearHiddenChildSections = (0, import_react70.useCallback)(
|
|
10270
10336
|
(changedProperty, newValues) => {
|
|
10271
10337
|
if (!props.sections) return;
|
|
10272
10338
|
const allChildSections = [];
|
|
@@ -10304,7 +10370,7 @@ var DataForm = (props) => {
|
|
|
10304
10370
|
},
|
|
10305
10371
|
[props.sections, formState.inputValues]
|
|
10306
10372
|
);
|
|
10307
|
-
const handleInputChange = (0,
|
|
10373
|
+
const handleInputChange = (0, import_react70.useCallback)(
|
|
10308
10374
|
async (updatedValues) => {
|
|
10309
10375
|
dispatch({
|
|
10310
10376
|
type: FORM_INPUT_UPDATE,
|
|
@@ -10319,7 +10385,7 @@ var DataForm = (props) => {
|
|
|
10319
10385
|
},
|
|
10320
10386
|
[dispatch, formState.inputValues, clearHiddenChildSections]
|
|
10321
10387
|
);
|
|
10322
|
-
const fetchData = (0,
|
|
10388
|
+
const fetchData = (0, import_react70.useCallback)(async () => {
|
|
10323
10389
|
if (!props.rules) return;
|
|
10324
10390
|
if (Object.keys(formState.inputValues).length === 0) {
|
|
10325
10391
|
return;
|
|
@@ -10350,7 +10416,7 @@ var DataForm = (props) => {
|
|
|
10350
10416
|
console.error("Error fetching data:", error);
|
|
10351
10417
|
}
|
|
10352
10418
|
}, [formState.lastPropertyChanged, formState.inputValues]);
|
|
10353
|
-
(0,
|
|
10419
|
+
(0, import_react70.useEffect)(() => {
|
|
10354
10420
|
fetchData();
|
|
10355
10421
|
}, [formState.inputValues, formState.lastPropertyChanged]);
|
|
10356
10422
|
function replacePlaceholders(template, context, params) {
|
|
@@ -10370,7 +10436,7 @@ var DataForm = (props) => {
|
|
|
10370
10436
|
}
|
|
10371
10437
|
);
|
|
10372
10438
|
}
|
|
10373
|
-
const handleChildSectionChangeCallback = (0,
|
|
10439
|
+
const handleChildSectionChangeCallback = (0, import_react70.useCallback)(
|
|
10374
10440
|
(params) => {
|
|
10375
10441
|
dispatch({
|
|
10376
10442
|
type: params.actionType,
|
|
@@ -10415,7 +10481,7 @@ var DataForm = (props) => {
|
|
|
10415
10481
|
});
|
|
10416
10482
|
return cloned;
|
|
10417
10483
|
}
|
|
10418
|
-
const onClick = (0,
|
|
10484
|
+
const onClick = (0, import_react70.useCallback)(async () => {
|
|
10419
10485
|
if (props.onClick) {
|
|
10420
10486
|
const isEdit = props.dataItem && Object.keys(props.dataItem).length > 0;
|
|
10421
10487
|
const normalizedValues = normalizeChildSections(
|
|
@@ -10431,21 +10497,21 @@ var DataForm = (props) => {
|
|
|
10431
10497
|
return { isSuccessful: true };
|
|
10432
10498
|
}
|
|
10433
10499
|
}, [formState, props]);
|
|
10434
|
-
const handleAdditionalOnClick = (0,
|
|
10500
|
+
const handleAdditionalOnClick = (0, import_react70.useCallback)(async () => {
|
|
10435
10501
|
if (props.additionalActions?.onClick) {
|
|
10436
10502
|
return await props.additionalActions.onClick(formState);
|
|
10437
10503
|
} else {
|
|
10438
10504
|
return { isSuccessful: true, message: "Action completed successfully" };
|
|
10439
10505
|
}
|
|
10440
10506
|
}, [formState, props]);
|
|
10441
|
-
const onDelete = (0,
|
|
10507
|
+
const onDelete = (0, import_react70.useCallback)(async () => {
|
|
10442
10508
|
if (props.onDelete) {
|
|
10443
10509
|
return await props.onDelete(formState);
|
|
10444
10510
|
} else {
|
|
10445
10511
|
return { isSuccessful: true };
|
|
10446
10512
|
}
|
|
10447
10513
|
}, [formState, props]);
|
|
10448
|
-
(0,
|
|
10514
|
+
(0, import_react70.useEffect)(() => {
|
|
10449
10515
|
if (props.dataItem) {
|
|
10450
10516
|
dispatch({
|
|
10451
10517
|
type: FORM_INITIAL_UPDATE,
|
|
@@ -10473,7 +10539,7 @@ var DataForm = (props) => {
|
|
|
10473
10539
|
return false;
|
|
10474
10540
|
}
|
|
10475
10541
|
}
|
|
10476
|
-
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
10542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react70.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
10477
10543
|
props.title && /* @__PURE__ */ (0, import_jsx_runtime96.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_runtime96.jsxs)(
|
|
10478
10544
|
"div",
|
|
10479
10545
|
{
|
|
@@ -10507,7 +10573,7 @@ var DataForm = (props) => {
|
|
|
10507
10573
|
}
|
|
10508
10574
|
},
|
|
10509
10575
|
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
10510
|
-
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
10576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react70.default.Fragment, { children: !section.isChildSection && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
10511
10577
|
section.sectionRows?.map(
|
|
10512
10578
|
(sectionRow, sectionRowIndex) => {
|
|
10513
10579
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -10518,7 +10584,7 @@ var DataForm = (props) => {
|
|
|
10518
10584
|
sectionRow.visible
|
|
10519
10585
|
);
|
|
10520
10586
|
}
|
|
10521
|
-
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
10587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react70.default.Fragment, { children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
10522
10588
|
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
10523
10589
|
"div",
|
|
10524
10590
|
{
|