@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260903063823 → 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 +377 -312
- package/dist/index.mjs +303 -349
- package/dist/server.js +290 -225
- package/dist/server.mjs +133 -179
- 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) {
|
|
@@ -8725,7 +8790,7 @@ var DivContainer = async (props) => {
|
|
|
8725
8790
|
}
|
|
8726
8791
|
const SelectedNode = NodeTypes2[node.type];
|
|
8727
8792
|
if (!SelectedNode) return null;
|
|
8728
|
-
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)(
|
|
8729
8794
|
SelectedNode,
|
|
8730
8795
|
{
|
|
8731
8796
|
node,
|
|
@@ -8817,7 +8882,7 @@ var DivContainer = async (props) => {
|
|
|
8817
8882
|
item,
|
|
8818
8883
|
idx,
|
|
8819
8884
|
props.href ? void 0 : item?.links?.view
|
|
8820
|
-
)?.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)
|
|
8821
8886
|
);
|
|
8822
8887
|
}
|
|
8823
8888
|
return props.node.children.flatMap((node, childIndex) => {
|
|
@@ -8949,14 +9014,14 @@ var DivContainer = async (props) => {
|
|
|
8949
9014
|
dataset: response
|
|
8950
9015
|
}
|
|
8951
9016
|
) : null;
|
|
8952
|
-
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
9017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_react61.default.Fragment, { children: [
|
|
8953
9018
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8954
9019
|
"style",
|
|
8955
9020
|
{
|
|
8956
9021
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
8957
9022
|
}
|
|
8958
9023
|
),
|
|
8959
|
-
showDataBindingControls ? /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
9024
|
+
showDataBindingControls ? /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_react61.default.Fragment, { children: [
|
|
8960
9025
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
8961
9026
|
DataBindingControls2,
|
|
8962
9027
|
{
|
|
@@ -8994,7 +9059,7 @@ var DivContainer = async (props) => {
|
|
|
8994
9059
|
]
|
|
8995
9060
|
}
|
|
8996
9061
|
)
|
|
8997
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
9062
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_react61.default.Fragment, { children: [
|
|
8998
9063
|
renderedContainer,
|
|
8999
9064
|
paginationControl && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { children: paginationControl })
|
|
9000
9065
|
] })
|
|
@@ -9041,14 +9106,14 @@ var PageBodyRenderer = (props) => {
|
|
|
9041
9106
|
}
|
|
9042
9107
|
return true;
|
|
9043
9108
|
};
|
|
9044
|
-
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) => {
|
|
9045
9110
|
{
|
|
9046
9111
|
}
|
|
9047
9112
|
const SelectedNode = NodeTypes[node.type];
|
|
9048
9113
|
if (!shouldRenderNode(node)) {
|
|
9049
9114
|
return null;
|
|
9050
9115
|
}
|
|
9051
|
-
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)(
|
|
9052
9117
|
SelectedNode,
|
|
9053
9118
|
{
|
|
9054
9119
|
node,
|
|
@@ -9064,7 +9129,7 @@ var PageBodyRenderer = (props) => {
|
|
|
9064
9129
|
device: props.device,
|
|
9065
9130
|
widgetRenderer: props.widgetRenderer
|
|
9066
9131
|
}
|
|
9067
|
-
) }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9132
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_react62.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9068
9133
|
SelectedNode,
|
|
9069
9134
|
{
|
|
9070
9135
|
node,
|
|
@@ -9085,10 +9150,10 @@ var PageBodyRenderer = (props) => {
|
|
|
9085
9150
|
var PageBodyRenderer_default = PageBodyRenderer;
|
|
9086
9151
|
|
|
9087
9152
|
// src/components/pageRenderingEngine/EnterAnimationHydrator.tsx
|
|
9088
|
-
var
|
|
9153
|
+
var import_react63 = require("react");
|
|
9089
9154
|
var ENTER_ANIMATION_SELECTOR = ".enter-animation";
|
|
9090
9155
|
function EnterAnimationHydrator() {
|
|
9091
|
-
(0,
|
|
9156
|
+
(0, import_react63.useEffect)(() => {
|
|
9092
9157
|
let observer;
|
|
9093
9158
|
const observedElements = /* @__PURE__ */ new WeakSet();
|
|
9094
9159
|
const revealAnimatedElements = () => {
|
|
@@ -9133,22 +9198,22 @@ function EnterAnimationHydrator() {
|
|
|
9133
9198
|
}
|
|
9134
9199
|
|
|
9135
9200
|
// src/components/Toast.tsx
|
|
9136
|
-
var
|
|
9201
|
+
var import_react64 = require("react");
|
|
9137
9202
|
init_ToastService();
|
|
9138
9203
|
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
9139
9204
|
var Toast = () => {
|
|
9140
|
-
const [showToast, setShowToast] = (0,
|
|
9141
|
-
const [message, setMessage] = (0,
|
|
9142
|
-
const [messageType, setMessageType] = (0,
|
|
9143
|
-
const timeoutRef = (0,
|
|
9144
|
-
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)(() => {
|
|
9145
9210
|
if (timeoutRef.current) {
|
|
9146
9211
|
clearTimeout(timeoutRef.current);
|
|
9147
9212
|
timeoutRef.current = null;
|
|
9148
9213
|
}
|
|
9149
9214
|
setShowToast(false);
|
|
9150
9215
|
}, []);
|
|
9151
|
-
const showMessage = (0,
|
|
9216
|
+
const showMessage = (0, import_react64.useCallback)((message2, messageType2) => {
|
|
9152
9217
|
if (timeoutRef.current) {
|
|
9153
9218
|
clearTimeout(timeoutRef.current);
|
|
9154
9219
|
}
|
|
@@ -9160,7 +9225,7 @@ var Toast = () => {
|
|
|
9160
9225
|
timeoutRef.current = null;
|
|
9161
9226
|
}, 4e3);
|
|
9162
9227
|
}, []);
|
|
9163
|
-
(0,
|
|
9228
|
+
(0, import_react64.useEffect)(() => {
|
|
9164
9229
|
ToastService_default.initialize(showMessage, closeToast);
|
|
9165
9230
|
return () => {
|
|
9166
9231
|
closeToast();
|
|
@@ -9254,15 +9319,15 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
9254
9319
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
9255
9320
|
|
|
9256
9321
|
// src/components/dataForm/DataList.tsx
|
|
9257
|
-
var
|
|
9322
|
+
var import_react67 = __toESM(require("react"));
|
|
9258
9323
|
init_InputControl();
|
|
9259
9324
|
var import_navigation3 = require("next/navigation");
|
|
9260
9325
|
|
|
9261
9326
|
// src/components/dataForm/NoContentView.tsx
|
|
9262
|
-
var
|
|
9327
|
+
var import_react65 = __toESM(require("react"));
|
|
9263
9328
|
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
9264
9329
|
var NoContentView = (props) => {
|
|
9265
|
-
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 });
|
|
9266
9331
|
};
|
|
9267
9332
|
var NoContentView_default = NoContentView;
|
|
9268
9333
|
|
|
@@ -9270,10 +9335,10 @@ var NoContentView_default = NoContentView;
|
|
|
9270
9335
|
init_InputControlType();
|
|
9271
9336
|
|
|
9272
9337
|
// src/components/dataForm/ContentView.tsx
|
|
9273
|
-
var
|
|
9338
|
+
var import_react66 = __toESM(require("react"));
|
|
9274
9339
|
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
9275
9340
|
var ContentView = (props) => {
|
|
9276
|
-
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
9341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_react66.default.Fragment, { children: [
|
|
9277
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: [
|
|
9278
9343
|
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
9279
9344
|
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
@@ -9370,12 +9435,12 @@ var DataList = (props) => {
|
|
|
9370
9435
|
let activePageNumber = 0;
|
|
9371
9436
|
let pages = 0;
|
|
9372
9437
|
console.log(props.addLinkText);
|
|
9373
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
9374
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
9375
|
-
(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)(() => {
|
|
9376
9441
|
setSearchTerm(props.query?.searchTerm ?? "");
|
|
9377
9442
|
}, [props.query?.searchTerm]);
|
|
9378
|
-
(0,
|
|
9443
|
+
(0, import_react67.useEffect)(() => {
|
|
9379
9444
|
if (props?.dataset) {
|
|
9380
9445
|
if (props?.dataset.result && props.dataset.result.length > 0) {
|
|
9381
9446
|
setIsDataFound(true);
|
|
@@ -9384,7 +9449,7 @@ var DataList = (props) => {
|
|
|
9384
9449
|
}
|
|
9385
9450
|
}
|
|
9386
9451
|
}, [props.dataset]);
|
|
9387
|
-
(0,
|
|
9452
|
+
(0, import_react67.useEffect)(() => {
|
|
9388
9453
|
if (!props.query?.["$filter"] || !props.filters) return;
|
|
9389
9454
|
const filterQuery = props.query["$filter"];
|
|
9390
9455
|
props.filters.forEach((filter) => {
|
|
@@ -9412,11 +9477,11 @@ var DataList = (props) => {
|
|
|
9412
9477
|
inputValues: {},
|
|
9413
9478
|
lastPropertyChanged: ""
|
|
9414
9479
|
};
|
|
9415
|
-
const [formState, dispatch] = (0,
|
|
9480
|
+
const [formState, dispatch] = (0, import_react67.useReducer)(FormReducer_default, initialState);
|
|
9416
9481
|
const getSearchableColumns = () => {
|
|
9417
9482
|
return props.columns?.filter((c) => c.isSearchable)?.map((c) => c.name)?.join(",");
|
|
9418
9483
|
};
|
|
9419
|
-
const handleFilterChange = (0,
|
|
9484
|
+
const handleFilterChange = (0, import_react67.useCallback)(
|
|
9420
9485
|
(updatedValues) => {
|
|
9421
9486
|
dispatch({
|
|
9422
9487
|
type: FORM_INPUT_UPDATE,
|
|
@@ -9447,7 +9512,7 @@ var DataList = (props) => {
|
|
|
9447
9512
|
},
|
|
9448
9513
|
[dispatch, props, router]
|
|
9449
9514
|
);
|
|
9450
|
-
(0,
|
|
9515
|
+
(0, import_react67.useEffect)(() => {
|
|
9451
9516
|
if (!props.columns.some((col) => col.isSearchable)) {
|
|
9452
9517
|
return;
|
|
9453
9518
|
}
|
|
@@ -9485,7 +9550,7 @@ var DataList = (props) => {
|
|
|
9485
9550
|
const renderPageNumbers = () => {
|
|
9486
9551
|
if (pages <= 10) {
|
|
9487
9552
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
9488
|
-
(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)(
|
|
9489
9554
|
Hyperlink,
|
|
9490
9555
|
{
|
|
9491
9556
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9499,7 +9564,7 @@ var DataList = (props) => {
|
|
|
9499
9564
|
const showLastPages = activePageNumber > pages - 5;
|
|
9500
9565
|
if (showFirstPages) {
|
|
9501
9566
|
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
|
|
9502
|
-
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)(
|
|
9503
9568
|
Hyperlink,
|
|
9504
9569
|
{
|
|
9505
9570
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9565,7 +9630,7 @@ var DataList = (props) => {
|
|
|
9565
9630
|
),
|
|
9566
9631
|
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
9567
9632
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
9568
|
-
(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)(
|
|
9569
9634
|
Hyperlink,
|
|
9570
9635
|
{
|
|
9571
9636
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9597,7 +9662,7 @@ var DataList = (props) => {
|
|
|
9597
9662
|
Array.from(
|
|
9598
9663
|
{ length: 5 },
|
|
9599
9664
|
(_, index) => activePageNumber - 2 + index
|
|
9600
|
-
).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)(
|
|
9601
9666
|
Hyperlink,
|
|
9602
9667
|
{
|
|
9603
9668
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -9643,7 +9708,7 @@ var DataList = (props) => {
|
|
|
9643
9708
|
}
|
|
9644
9709
|
}
|
|
9645
9710
|
};
|
|
9646
|
-
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
9711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_react67.default.Fragment, { children: [
|
|
9647
9712
|
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(ContentView_default, { isDataFound, children: [
|
|
9648
9713
|
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
9649
9714
|
"div",
|
|
@@ -9736,7 +9801,7 @@ var DataList = (props) => {
|
|
|
9736
9801
|
}
|
|
9737
9802
|
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("tr", { className: validityClass, children: [
|
|
9738
9803
|
props?.columns?.map((column, colindex) => {
|
|
9739
|
-
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)(
|
|
9740
9805
|
"td",
|
|
9741
9806
|
{
|
|
9742
9807
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
@@ -9932,7 +9997,7 @@ var DataList = (props) => {
|
|
|
9932
9997
|
var DataList_default = DataList;
|
|
9933
9998
|
|
|
9934
9999
|
// src/components/dataForm/DataListRenderer.tsx
|
|
9935
|
-
var
|
|
10000
|
+
var import_react68 = __toESM(require("react"));
|
|
9936
10001
|
init_ServiceClient();
|
|
9937
10002
|
init_OdataBuilder();
|
|
9938
10003
|
init_SelectWithSearchInput();
|
|
@@ -9992,14 +10057,14 @@ var DataListRenderer = ({
|
|
|
9992
10057
|
widgetProps
|
|
9993
10058
|
}) => {
|
|
9994
10059
|
const serviceClient = new ServiceClient_default(apiBaseUrl, session);
|
|
9995
|
-
const [columns, setColumns] = (0,
|
|
9996
|
-
const [dataset, setDataset] = (0,
|
|
9997
|
-
const [filter, setFilters] = (0,
|
|
9998
|
-
const [addLinkHref, setAddLinkHref] = (0,
|
|
9999
|
-
const [addLinkText, setAddLinkText] = (0,
|
|
10000
|
-
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)("");
|
|
10001
10066
|
const pathname = (0, import_navigation4.usePathname)();
|
|
10002
|
-
(0,
|
|
10067
|
+
(0, import_react68.useEffect)(() => {
|
|
10003
10068
|
if (!formDefinition) return;
|
|
10004
10069
|
setColumns(mapApiToColumns(formDefinition));
|
|
10005
10070
|
setFilters(mapApiToFilters(formDefinition));
|
|
@@ -10012,7 +10077,7 @@ var DataListRenderer = ({
|
|
|
10012
10077
|
setAddLinkHref(resolvedAddLinkHref);
|
|
10013
10078
|
setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
|
|
10014
10079
|
}, [formDefinition, params]);
|
|
10015
|
-
(0,
|
|
10080
|
+
(0, import_react68.useEffect)(() => {
|
|
10016
10081
|
const fetchData = async () => {
|
|
10017
10082
|
if (!serviceRoute) return;
|
|
10018
10083
|
const resolvedRoute = resolveRoutePlaceholders2(serviceRoute, params);
|
|
@@ -10032,7 +10097,7 @@ var DataListRenderer = ({
|
|
|
10032
10097
|
isActive: landingPageUrl === pathname
|
|
10033
10098
|
};
|
|
10034
10099
|
});
|
|
10035
|
-
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
10100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_react68.default.Fragment, { children: [
|
|
10036
10101
|
resolvedTabs.length > 0 && // <NavigationTabsV2
|
|
10037
10102
|
// tabs={resolvedTabs}
|
|
10038
10103
|
// params={(widgetProps?.params ?? params) as Record<string, any>}
|
|
@@ -10060,14 +10125,14 @@ var DataListRenderer_default = DataListRenderer;
|
|
|
10060
10125
|
init_InputControlType();
|
|
10061
10126
|
|
|
10062
10127
|
// src/components/dataForm/DataForm.tsx
|
|
10063
|
-
var
|
|
10128
|
+
var import_react70 = __toESM(require("react"));
|
|
10064
10129
|
init_InputControl();
|
|
10065
10130
|
init_Icon();
|
|
10066
10131
|
init_Button();
|
|
10067
10132
|
init_StyleTypes();
|
|
10068
10133
|
|
|
10069
10134
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
10070
|
-
var
|
|
10135
|
+
var import_react69 = __toESM(require("react"));
|
|
10071
10136
|
init_InputControl();
|
|
10072
10137
|
|
|
10073
10138
|
// src/components/dataForm/StyleTypes.tsx
|
|
@@ -10107,7 +10172,7 @@ var DataFormChildSection = (props) => {
|
|
|
10107
10172
|
return childItems.map((item, originalIndex) => ({ item, originalIndex })).filter((x) => !x.item.isDeleted) || [];
|
|
10108
10173
|
};
|
|
10109
10174
|
const childItemsToRender = getChildItemsForRendering();
|
|
10110
|
-
const handleChildInputChange = (0,
|
|
10175
|
+
const handleChildInputChange = (0, import_react69.useCallback)(
|
|
10111
10176
|
(updatedValues) => {
|
|
10112
10177
|
if (isOneToOne) {
|
|
10113
10178
|
props.callback({
|
|
@@ -10134,7 +10199,7 @@ var DataFormChildSection = (props) => {
|
|
|
10134
10199
|
},
|
|
10135
10200
|
[props, isOneToOne, childItemsToRender]
|
|
10136
10201
|
);
|
|
10137
|
-
const onAddRow = (0,
|
|
10202
|
+
const onAddRow = (0, import_react69.useCallback)(() => {
|
|
10138
10203
|
props.callback({
|
|
10139
10204
|
sectionName: props.section.name,
|
|
10140
10205
|
actionType: FORM_CHILD_ROW_ADD,
|
|
@@ -10143,7 +10208,7 @@ var DataFormChildSection = (props) => {
|
|
|
10143
10208
|
rowIndex: -1
|
|
10144
10209
|
});
|
|
10145
10210
|
}, [props]);
|
|
10146
|
-
const onDeleteRow = (0,
|
|
10211
|
+
const onDeleteRow = (0, import_react69.useCallback)(
|
|
10147
10212
|
(filteredIndex) => {
|
|
10148
10213
|
const visibleItem = childItemsToRender[filteredIndex];
|
|
10149
10214
|
if (visibleItem) {
|
|
@@ -10163,7 +10228,7 @@ var DataFormChildSection = (props) => {
|
|
|
10163
10228
|
childItemsToRender,
|
|
10164
10229
|
allChildItems: childItems
|
|
10165
10230
|
});
|
|
10166
|
-
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: [
|
|
10167
10232
|
section.sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
10168
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: [
|
|
10169
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: [
|
|
@@ -10185,7 +10250,7 @@ var DataFormChildSection = (props) => {
|
|
|
10185
10250
|
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
10186
10251
|
const { item, originalIndex } = visibleItem;
|
|
10187
10252
|
const rowKey = originalIndex;
|
|
10188
|
-
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react69.default.Fragment, { children: section.sectionRows.map(
|
|
10189
10254
|
(sectionRow, sectionRowIndex) => {
|
|
10190
10255
|
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
10191
10256
|
"tr",
|
|
@@ -10256,7 +10321,7 @@ var DataFormChildSection_default = DataFormChildSection;
|
|
|
10256
10321
|
// src/components/dataForm/DataForm.tsx
|
|
10257
10322
|
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
10258
10323
|
var DataForm = (props) => {
|
|
10259
|
-
const formRef = (0,
|
|
10324
|
+
const formRef = (0, import_react70.useRef)(null);
|
|
10260
10325
|
console.log(props.dataItem, "dssads");
|
|
10261
10326
|
const initialState = {
|
|
10262
10327
|
inputValues: {},
|
|
@@ -10265,9 +10330,9 @@ var DataForm = (props) => {
|
|
|
10265
10330
|
const childInitialState = {
|
|
10266
10331
|
inputValues: []
|
|
10267
10332
|
};
|
|
10268
|
-
const [formState, dispatch] = (0,
|
|
10333
|
+
const [formState, dispatch] = (0, import_react70.useReducer)(FormReducer_default, initialState);
|
|
10269
10334
|
console.log(props.sections, "sections");
|
|
10270
|
-
const clearHiddenChildSections = (0,
|
|
10335
|
+
const clearHiddenChildSections = (0, import_react70.useCallback)(
|
|
10271
10336
|
(changedProperty, newValues) => {
|
|
10272
10337
|
if (!props.sections) return;
|
|
10273
10338
|
const allChildSections = [];
|
|
@@ -10305,7 +10370,7 @@ var DataForm = (props) => {
|
|
|
10305
10370
|
},
|
|
10306
10371
|
[props.sections, formState.inputValues]
|
|
10307
10372
|
);
|
|
10308
|
-
const handleInputChange = (0,
|
|
10373
|
+
const handleInputChange = (0, import_react70.useCallback)(
|
|
10309
10374
|
async (updatedValues) => {
|
|
10310
10375
|
dispatch({
|
|
10311
10376
|
type: FORM_INPUT_UPDATE,
|
|
@@ -10320,7 +10385,7 @@ var DataForm = (props) => {
|
|
|
10320
10385
|
},
|
|
10321
10386
|
[dispatch, formState.inputValues, clearHiddenChildSections]
|
|
10322
10387
|
);
|
|
10323
|
-
const fetchData = (0,
|
|
10388
|
+
const fetchData = (0, import_react70.useCallback)(async () => {
|
|
10324
10389
|
if (!props.rules) return;
|
|
10325
10390
|
if (Object.keys(formState.inputValues).length === 0) {
|
|
10326
10391
|
return;
|
|
@@ -10351,7 +10416,7 @@ var DataForm = (props) => {
|
|
|
10351
10416
|
console.error("Error fetching data:", error);
|
|
10352
10417
|
}
|
|
10353
10418
|
}, [formState.lastPropertyChanged, formState.inputValues]);
|
|
10354
|
-
(0,
|
|
10419
|
+
(0, import_react70.useEffect)(() => {
|
|
10355
10420
|
fetchData();
|
|
10356
10421
|
}, [formState.inputValues, formState.lastPropertyChanged]);
|
|
10357
10422
|
function replacePlaceholders(template, context, params) {
|
|
@@ -10371,7 +10436,7 @@ var DataForm = (props) => {
|
|
|
10371
10436
|
}
|
|
10372
10437
|
);
|
|
10373
10438
|
}
|
|
10374
|
-
const handleChildSectionChangeCallback = (0,
|
|
10439
|
+
const handleChildSectionChangeCallback = (0, import_react70.useCallback)(
|
|
10375
10440
|
(params) => {
|
|
10376
10441
|
dispatch({
|
|
10377
10442
|
type: params.actionType,
|
|
@@ -10416,7 +10481,7 @@ var DataForm = (props) => {
|
|
|
10416
10481
|
});
|
|
10417
10482
|
return cloned;
|
|
10418
10483
|
}
|
|
10419
|
-
const onClick = (0,
|
|
10484
|
+
const onClick = (0, import_react70.useCallback)(async () => {
|
|
10420
10485
|
if (props.onClick) {
|
|
10421
10486
|
const isEdit = props.dataItem && Object.keys(props.dataItem).length > 0;
|
|
10422
10487
|
const normalizedValues = normalizeChildSections(
|
|
@@ -10432,21 +10497,21 @@ var DataForm = (props) => {
|
|
|
10432
10497
|
return { isSuccessful: true };
|
|
10433
10498
|
}
|
|
10434
10499
|
}, [formState, props]);
|
|
10435
|
-
const handleAdditionalOnClick = (0,
|
|
10500
|
+
const handleAdditionalOnClick = (0, import_react70.useCallback)(async () => {
|
|
10436
10501
|
if (props.additionalActions?.onClick) {
|
|
10437
10502
|
return await props.additionalActions.onClick(formState);
|
|
10438
10503
|
} else {
|
|
10439
10504
|
return { isSuccessful: true, message: "Action completed successfully" };
|
|
10440
10505
|
}
|
|
10441
10506
|
}, [formState, props]);
|
|
10442
|
-
const onDelete = (0,
|
|
10507
|
+
const onDelete = (0, import_react70.useCallback)(async () => {
|
|
10443
10508
|
if (props.onDelete) {
|
|
10444
10509
|
return await props.onDelete(formState);
|
|
10445
10510
|
} else {
|
|
10446
10511
|
return { isSuccessful: true };
|
|
10447
10512
|
}
|
|
10448
10513
|
}, [formState, props]);
|
|
10449
|
-
(0,
|
|
10514
|
+
(0, import_react70.useEffect)(() => {
|
|
10450
10515
|
if (props.dataItem) {
|
|
10451
10516
|
dispatch({
|
|
10452
10517
|
type: FORM_INITIAL_UPDATE,
|
|
@@ -10474,7 +10539,7 @@ var DataForm = (props) => {
|
|
|
10474
10539
|
return false;
|
|
10475
10540
|
}
|
|
10476
10541
|
}
|
|
10477
|
-
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: [
|
|
10478
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)(
|
|
10479
10544
|
"div",
|
|
10480
10545
|
{
|
|
@@ -10508,7 +10573,7 @@ var DataForm = (props) => {
|
|
|
10508
10573
|
}
|
|
10509
10574
|
},
|
|
10510
10575
|
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
10511
|
-
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: [
|
|
10512
10577
|
section.sectionRows?.map(
|
|
10513
10578
|
(sectionRow, sectionRowIndex) => {
|
|
10514
10579
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -10519,7 +10584,7 @@ var DataForm = (props) => {
|
|
|
10519
10584
|
sectionRow.visible
|
|
10520
10585
|
);
|
|
10521
10586
|
}
|
|
10522
|
-
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) => {
|
|
10523
10588
|
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
10524
10589
|
"div",
|
|
10525
10590
|
{
|