@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260522043844 → 0.8.1-dev.20260523055026
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +219 -280
- package/dist/index.mjs +166 -227
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -116,117 +116,76 @@ var AssetUtility_default = AssetUtility;
|
|
|
116
116
|
|
|
117
117
|
// src/components/DeviceAssetSelector.tsx
|
|
118
118
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
119
|
+
var FORMAT_CLASSES = {
|
|
120
|
+
center: "justify-center",
|
|
121
|
+
left: "justify-start",
|
|
122
|
+
right: "justify-end"
|
|
123
|
+
};
|
|
119
124
|
var DeviceAssetSelector = ({
|
|
120
125
|
assets,
|
|
121
126
|
assetBaseUrl,
|
|
122
127
|
session,
|
|
123
|
-
// This should receive the session
|
|
124
128
|
width,
|
|
125
129
|
tag,
|
|
126
|
-
customProps,
|
|
127
130
|
nodeProps,
|
|
128
131
|
device
|
|
129
132
|
}) => {
|
|
130
|
-
console.log("\u{1F511} Session in DeviceAssetSelector:", session);
|
|
131
133
|
const targetTag = tag || nodeProps?.tag;
|
|
132
|
-
const selectAssetByDevice = (assets2, currentDevice) =>
|
|
133
|
-
if (!assets2 || assets2.length === 0) return void 0;
|
|
134
|
-
const exactMatch = assets2.find((asset) => asset.device === currentDevice);
|
|
135
|
-
if (exactMatch) return exactMatch;
|
|
136
|
-
const noDeviceMatch = assets2.find((asset) => !asset.device || asset.device === "");
|
|
137
|
-
if (noDeviceMatch) return noDeviceMatch;
|
|
138
|
-
return void 0;
|
|
139
|
-
};
|
|
140
|
-
const selectAssetByTagAndDevice = (assets2, currentDevice, targetTag2) => {
|
|
141
|
-
if (!assets2 || assets2.length === 0) return void 0;
|
|
142
|
-
if (!targetTag2) return selectAssetByDevice(assets2, currentDevice);
|
|
143
|
-
const taggedAssets = assets2.filter((asset) => asset.tag === targetTag2);
|
|
144
|
-
if (taggedAssets.length === 0) {
|
|
145
|
-
return selectAssetByDevice(assets2, currentDevice);
|
|
146
|
-
}
|
|
147
|
-
const exactTaggedMatch = taggedAssets.find((asset) => asset.device === currentDevice);
|
|
148
|
-
if (exactTaggedMatch) return exactTaggedMatch;
|
|
149
|
-
const noDeviceTaggedMatch = taggedAssets.find((asset) => !asset.device || asset.device === "");
|
|
150
|
-
if (noDeviceTaggedMatch) return noDeviceTaggedMatch;
|
|
151
|
-
return void 0;
|
|
152
|
-
};
|
|
134
|
+
const selectAssetByDevice = (assets2, currentDevice) => assets2.find((a) => a.device === currentDevice) ?? assets2.find((a) => !a.device || a.device === "");
|
|
153
135
|
const selectAsset = () => {
|
|
154
|
-
if (!assets
|
|
136
|
+
if (!assets?.length) return void 0;
|
|
155
137
|
if (targetTag) {
|
|
156
|
-
|
|
138
|
+
const tagged = assets.filter((a) => a.tag === targetTag);
|
|
139
|
+
if (tagged.length) {
|
|
140
|
+
return tagged.find((a) => a.device === device) ?? tagged.find((a) => !a.device || a.device === "");
|
|
141
|
+
}
|
|
157
142
|
}
|
|
158
143
|
return selectAssetByDevice(assets, device);
|
|
159
144
|
};
|
|
160
145
|
const selectedAsset = selectAsset();
|
|
161
|
-
if (!selectedAsset)
|
|
162
|
-
console.warn("No suitable asset found for device:", device, "and tag:", targetTag);
|
|
163
|
-
return null;
|
|
164
|
-
}
|
|
146
|
+
if (!selectedAsset) return null;
|
|
165
147
|
const resolvedAssetUrl = AssetUtility_default.resolveUrl(assetBaseUrl, selectedAsset.assetUrl);
|
|
166
148
|
const resolvedThumbnailUrl = selectedAsset.posterUrl ? AssetUtility_default.resolveUrl(assetBaseUrl, selectedAsset.posterUrl) : void 0;
|
|
167
|
-
console.log("Selected Asset:", resolvedThumbnailUrl);
|
|
168
149
|
const title = selectedAsset.title || nodeProps?.title;
|
|
169
|
-
const intrinsicWidth = selectedAsset.intrinsicWidth?.toString();
|
|
170
|
-
const intrinsicHeight = selectedAsset.intrinsicHeight?.toString();
|
|
171
150
|
const isHls = resolvedAssetUrl?.endsWith(".m3u8");
|
|
172
|
-
const showControls =
|
|
173
|
-
const loop =
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
if (nodeProps?.borderRadius) {
|
|
180
|
-
styles.borderRadius = nodeProps.borderRadius;
|
|
181
|
-
}
|
|
182
|
-
if (nodeProps?.width) {
|
|
183
|
-
styles.width = nodeProps.width;
|
|
184
|
-
}
|
|
185
|
-
const FormatClass = {
|
|
186
|
-
"center": "justify-center",
|
|
187
|
-
"left": "justify-start",
|
|
188
|
-
"right": "justify-end"
|
|
189
|
-
};
|
|
190
|
-
const formatClasses = FormatClass[nodeProps?.format || ""] || "";
|
|
191
|
-
const renderMedia = () => {
|
|
192
|
-
if (isHls) {
|
|
193
|
-
return /* @__PURE__ */ jsx3(
|
|
194
|
-
HlsPlayer_default,
|
|
195
|
-
{
|
|
196
|
-
assetUrl: resolvedAssetUrl,
|
|
197
|
-
posterUrl: resolvedThumbnailUrl,
|
|
198
|
-
intrinsicWidth,
|
|
199
|
-
intrinsicHeight,
|
|
200
|
-
showControls,
|
|
201
|
-
loop,
|
|
202
|
-
playOptions,
|
|
203
|
-
apiBaseUrl: assetBaseUrl,
|
|
204
|
-
session
|
|
205
|
-
}
|
|
206
|
-
);
|
|
207
|
-
} else {
|
|
208
|
-
return (
|
|
209
|
-
/* eslint-disable-next-line @next/next/no-img-element */
|
|
210
|
-
/* @__PURE__ */ jsx3(
|
|
211
|
-
"img",
|
|
212
|
-
{
|
|
213
|
-
style: styles,
|
|
214
|
-
loading: "lazy",
|
|
215
|
-
className: "object-cover w-full",
|
|
216
|
-
src: resolvedAssetUrl,
|
|
217
|
-
width: selectedAsset.intrinsicWidth,
|
|
218
|
-
alt: title || "Asset image",
|
|
219
|
-
height: selectedAsset.intrinsicHeight
|
|
220
|
-
}
|
|
221
|
-
)
|
|
222
|
-
);
|
|
223
|
-
}
|
|
151
|
+
const showControls = nodeProps?.showControls === "true";
|
|
152
|
+
const loop = nodeProps?.loop === "true";
|
|
153
|
+
const styles = {
|
|
154
|
+
...nodeProps?.borderRadius && { borderRadius: nodeProps.borderRadius },
|
|
155
|
+
...nodeProps?.width && { width: nodeProps.width },
|
|
156
|
+
...nodeProps?.height && { height: nodeProps.height }
|
|
224
157
|
};
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
158
|
+
const renderMedia = () => isHls ? /* @__PURE__ */ jsx3(
|
|
159
|
+
HlsPlayer_default,
|
|
160
|
+
{
|
|
161
|
+
assetUrl: resolvedAssetUrl,
|
|
162
|
+
posterUrl: resolvedThumbnailUrl,
|
|
163
|
+
intrinsicWidth: selectedAsset.intrinsicWidth?.toString(),
|
|
164
|
+
intrinsicHeight: selectedAsset.intrinsicHeight?.toString(),
|
|
165
|
+
showControls,
|
|
166
|
+
loop,
|
|
167
|
+
playOptions: nodeProps?.playOptions,
|
|
168
|
+
apiBaseUrl: assetBaseUrl,
|
|
169
|
+
session
|
|
170
|
+
}
|
|
171
|
+
) : (
|
|
172
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
173
|
+
/* @__PURE__ */ jsx3(
|
|
174
|
+
"img",
|
|
175
|
+
{
|
|
176
|
+
style: styles,
|
|
177
|
+
loading: "lazy",
|
|
178
|
+
className: "object-cover w-full",
|
|
179
|
+
src: resolvedAssetUrl,
|
|
180
|
+
width: selectedAsset.intrinsicWidth,
|
|
181
|
+
height: selectedAsset.intrinsicHeight,
|
|
182
|
+
alt: title || "Asset image"
|
|
183
|
+
}
|
|
184
|
+
)
|
|
185
|
+
);
|
|
186
|
+
if (width) return /* @__PURE__ */ jsx3("div", { style: { width }, children: renderMedia() });
|
|
228
187
|
if (nodeProps?.format) {
|
|
229
|
-
return /* @__PURE__ */ jsx3("div", { className: `flex ${
|
|
188
|
+
return /* @__PURE__ */ jsx3("div", { className: `flex ${FORMAT_CLASSES[nodeProps.format] ?? ""}`, children: renderMedia() });
|
|
230
189
|
}
|
|
231
190
|
return renderMedia();
|
|
232
191
|
};
|
|
@@ -247,12 +206,15 @@ var MediaAsset = (props) => {
|
|
|
247
206
|
if (!assets || assets.length === 0) {
|
|
248
207
|
return null;
|
|
249
208
|
}
|
|
209
|
+
const domainName = props.apiBaseUrl?.replace("https://", "");
|
|
210
|
+
const assetBaseUrl = `https://cdn.g-assets.com/${domainName}`;
|
|
250
211
|
console.log(props.customProps?.tag, "Tag in MediaAsset");
|
|
251
212
|
return /* @__PURE__ */ jsx4(
|
|
252
213
|
DeviceAssetSelector_default,
|
|
253
214
|
{
|
|
254
215
|
assets,
|
|
255
216
|
apiBaseUrl: props.apiBaseUrl,
|
|
217
|
+
assetBaseUrl,
|
|
256
218
|
session: props,
|
|
257
219
|
width: props.width,
|
|
258
220
|
customProps: props.customProps,
|
|
@@ -1926,10 +1888,10 @@ InputControl.displayName = "InputControl";
|
|
|
1926
1888
|
var InputControl_default = InputControl;
|
|
1927
1889
|
|
|
1928
1890
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
1929
|
-
import
|
|
1891
|
+
import React40 from "react";
|
|
1930
1892
|
|
|
1931
1893
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
1932
|
-
import
|
|
1894
|
+
import React29 from "react";
|
|
1933
1895
|
|
|
1934
1896
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
1935
1897
|
import { jsx as jsx36, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
@@ -2011,15 +1973,12 @@ var LineBreakNode = () => {
|
|
|
2011
1973
|
var LineBreakNode_default = LineBreakNode;
|
|
2012
1974
|
|
|
2013
1975
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
2014
|
-
import
|
|
1976
|
+
import React28 from "react";
|
|
2015
1977
|
|
|
2016
1978
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
2017
|
-
import React28 from "react";
|
|
2018
1979
|
import dynamic3 from "next/dynamic";
|
|
2019
|
-
import {
|
|
2020
|
-
var HlsPlayer = dynamic3(() => import("./HlsPlayer-GZR4QXJY.mjs"), {
|
|
2021
|
-
ssr: false
|
|
2022
|
-
});
|
|
1980
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
1981
|
+
var HlsPlayer = dynamic3(() => import("./HlsPlayer-GZR4QXJY.mjs"), { ssr: false });
|
|
2023
1982
|
var getNestedValue = (obj, path) => {
|
|
2024
1983
|
if (!obj || !path) return void 0;
|
|
2025
1984
|
return path.split(".").reduce((current, key) => {
|
|
@@ -2033,20 +1992,13 @@ var ImageNode = (props) => {
|
|
|
2033
1992
|
const currentDevice = props.device;
|
|
2034
1993
|
if (props.node.device) {
|
|
2035
1994
|
const nodeDevice = props.node.device;
|
|
2036
|
-
if (nodeDevice !== currentDevice)
|
|
2037
|
-
return null;
|
|
2038
|
-
}
|
|
1995
|
+
if (nodeDevice !== currentDevice) return null;
|
|
2039
1996
|
}
|
|
2040
|
-
console.log("ImageNode device / currentDevice:", props.node.device, currentDevice);
|
|
2041
1997
|
if (props.node.imageUrl.startsWith("http")) {
|
|
2042
1998
|
imageUrl = props.node.imageUrl;
|
|
2043
|
-
posterUrl = AssetUtility_default.resolveUrl(
|
|
2044
|
-
props.assetBaseUrl,
|
|
2045
|
-
props.node.posterUrl
|
|
2046
|
-
);
|
|
1999
|
+
posterUrl = AssetUtility_default.resolveUrl(props.assetBaseUrl, props.node.posterUrl);
|
|
2047
2000
|
} else if (props.dataitem && props.node.datafield) {
|
|
2048
2001
|
const image = getNestedValue(props.dataitem, props.node.datafield);
|
|
2049
|
-
console.log("ImageNode Datafield Image:", image);
|
|
2050
2002
|
try {
|
|
2051
2003
|
if (typeof image === "string") {
|
|
2052
2004
|
assets = JSON.parse(image);
|
|
@@ -2055,11 +2007,10 @@ var ImageNode = (props) => {
|
|
|
2055
2007
|
} else if (image && typeof image === "object") {
|
|
2056
2008
|
assets = [image];
|
|
2057
2009
|
}
|
|
2058
|
-
} catch
|
|
2059
|
-
console.error("Error parsing assets in ImageNode:", error);
|
|
2010
|
+
} catch {
|
|
2060
2011
|
}
|
|
2061
2012
|
if (assets && assets.length > 0) {
|
|
2062
|
-
return /* @__PURE__ */ jsx38(
|
|
2013
|
+
return /* @__PURE__ */ jsx38(
|
|
2063
2014
|
DeviceAssetSelector_default,
|
|
2064
2015
|
{
|
|
2065
2016
|
device: props.device,
|
|
@@ -2076,11 +2027,10 @@ var ImageNode = (props) => {
|
|
|
2076
2027
|
height: props.node.height,
|
|
2077
2028
|
format: props.node.format,
|
|
2078
2029
|
tag: props.node.tag,
|
|
2079
|
-
// Add tag to ImageNode if needed
|
|
2080
2030
|
placementCode: props.node.placementCode
|
|
2081
2031
|
}
|
|
2082
2032
|
}
|
|
2083
|
-
)
|
|
2033
|
+
);
|
|
2084
2034
|
} else {
|
|
2085
2035
|
imageUrl = AssetUtility_default.resolveUrl(props.assetBaseUrl, props.node.imageUrl);
|
|
2086
2036
|
posterUrl = AssetUtility_default.resolveUrl(props.assetBaseUrl, props.node.posterUrl);
|
|
@@ -2089,56 +2039,45 @@ var ImageNode = (props) => {
|
|
|
2089
2039
|
imageUrl = AssetUtility_default.resolveUrl(props.assetBaseUrl, props.node.imageUrl);
|
|
2090
2040
|
posterUrl = AssetUtility_default.resolveUrl(props.assetBaseUrl, props.node.posterUrl);
|
|
2091
2041
|
}
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
if (props.node.height) styles.height = props.node.height;
|
|
2098
|
-
if (props.node.borderRadius) styles.borderRadius = props.node.borderRadius;
|
|
2099
|
-
if (props.node.width) styles.width = props.node.width;
|
|
2100
|
-
const FormatClass = {
|
|
2101
|
-
"center": "justify-center",
|
|
2102
|
-
"left": "justify-start",
|
|
2103
|
-
"right": "justify-end"
|
|
2042
|
+
if (!imageUrl) return null;
|
|
2043
|
+
const styles = {
|
|
2044
|
+
...props.node.height && { height: props.node.height },
|
|
2045
|
+
...props.node.borderRadius && { borderRadius: props.node.borderRadius },
|
|
2046
|
+
...props.node.width && { width: props.node.width }
|
|
2104
2047
|
};
|
|
2105
|
-
{
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
const renderMedia = () => {
|
|
2110
|
-
if (isHls) {
|
|
2111
|
-
return /* @__PURE__ */ jsx38(
|
|
2112
|
-
HlsPlayer,
|
|
2113
|
-
{
|
|
2114
|
-
assetUrl: imageUrl,
|
|
2115
|
-
posterUrl,
|
|
2116
|
-
intrinsicWidth: props.node.intrinsicWidth,
|
|
2117
|
-
intrinsicHeight: props.node.intrinsicHeight,
|
|
2118
|
-
showControls: props.node.showControls === "true",
|
|
2119
|
-
loop: props.node.loop === "true",
|
|
2120
|
-
playOptions: props.node.playOptions,
|
|
2121
|
-
apiBaseUrl: props.apiBaseUrl,
|
|
2122
|
-
session: props.session
|
|
2123
|
-
}
|
|
2124
|
-
);
|
|
2125
|
-
} else {
|
|
2126
|
-
return /* @__PURE__ */ jsx38(React28.Fragment, { children: /* @__PURE__ */ jsx38(
|
|
2127
|
-
"img",
|
|
2128
|
-
{
|
|
2129
|
-
style: styles,
|
|
2130
|
-
loading: "lazy",
|
|
2131
|
-
className: "object-cover",
|
|
2132
|
-
src: imageUrl,
|
|
2133
|
-
width: props.node.intrinsicWidth,
|
|
2134
|
-
alt: props.node.title,
|
|
2135
|
-
height: props.node.intrinsicHeight
|
|
2136
|
-
}
|
|
2137
|
-
) });
|
|
2138
|
-
}
|
|
2048
|
+
const FORMAT_CLASSES2 = {
|
|
2049
|
+
center: "justify-center",
|
|
2050
|
+
left: "justify-start",
|
|
2051
|
+
right: "justify-end"
|
|
2139
2052
|
};
|
|
2053
|
+
const isHls = imageUrl.endsWith(".m3u8");
|
|
2054
|
+
const renderMedia = () => isHls ? /* @__PURE__ */ jsx38(
|
|
2055
|
+
HlsPlayer,
|
|
2056
|
+
{
|
|
2057
|
+
assetUrl: imageUrl,
|
|
2058
|
+
posterUrl,
|
|
2059
|
+
intrinsicWidth: props.node.intrinsicWidth,
|
|
2060
|
+
intrinsicHeight: props.node.intrinsicHeight,
|
|
2061
|
+
showControls: props.node.showControls === "true",
|
|
2062
|
+
loop: props.node.loop === "true",
|
|
2063
|
+
playOptions: props.node.playOptions,
|
|
2064
|
+
apiBaseUrl: props.apiBaseUrl,
|
|
2065
|
+
session: props.session
|
|
2066
|
+
}
|
|
2067
|
+
) : /* @__PURE__ */ jsx38(
|
|
2068
|
+
"img",
|
|
2069
|
+
{
|
|
2070
|
+
style: styles,
|
|
2071
|
+
loading: "lazy",
|
|
2072
|
+
className: "object-cover",
|
|
2073
|
+
src: imageUrl,
|
|
2074
|
+
width: props.node.intrinsicWidth,
|
|
2075
|
+
alt: props.node.title,
|
|
2076
|
+
height: props.node.intrinsicHeight
|
|
2077
|
+
}
|
|
2078
|
+
);
|
|
2140
2079
|
if (props.node.width) {
|
|
2141
|
-
return /* @__PURE__ */ jsx38("div", { className: `flex ${
|
|
2080
|
+
return /* @__PURE__ */ jsx38("div", { className: `flex ${FORMAT_CLASSES2[props.node.format] ?? ""}`, children: renderMedia() });
|
|
2142
2081
|
}
|
|
2143
2082
|
return renderMedia();
|
|
2144
2083
|
};
|
|
@@ -2146,7 +2085,7 @@ var ImageNode_default = ImageNode;
|
|
|
2146
2085
|
|
|
2147
2086
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
2148
2087
|
import dynamic4 from "next/dynamic";
|
|
2149
|
-
import { Fragment as
|
|
2088
|
+
import { Fragment as Fragment2, jsx as jsx39, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2150
2089
|
var LinkNodeButton = dynamic4(() => import("./LinkNodeButton-WDDPNYWI.mjs"), {
|
|
2151
2090
|
ssr: false
|
|
2152
2091
|
});
|
|
@@ -2193,13 +2132,13 @@ var LinkNode = (props) => {
|
|
|
2193
2132
|
const isButton = node.isButton === true;
|
|
2194
2133
|
const renderChildren = () => {
|
|
2195
2134
|
if (!node.children || node.children.length === 0) return null;
|
|
2196
|
-
return /* @__PURE__ */ jsx39(
|
|
2135
|
+
return /* @__PURE__ */ jsx39(Fragment2, { children: node.children.map((childNode, index) => {
|
|
2197
2136
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
2198
2137
|
if (!SelectedNode) {
|
|
2199
2138
|
console.warn("Unknown node type:", childNode.type);
|
|
2200
2139
|
return null;
|
|
2201
2140
|
}
|
|
2202
|
-
return /* @__PURE__ */ jsx39(
|
|
2141
|
+
return /* @__PURE__ */ jsx39(React28.Fragment, { children: /* @__PURE__ */ jsx39(
|
|
2203
2142
|
SelectedNode,
|
|
2204
2143
|
{
|
|
2205
2144
|
node: childNode,
|
|
@@ -2416,7 +2355,7 @@ var DatafieldNode = (props) => {
|
|
|
2416
2355
|
var DatafieldNode_default = DatafieldNode;
|
|
2417
2356
|
|
|
2418
2357
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
2419
|
-
import { Fragment as
|
|
2358
|
+
import { Fragment as Fragment3, jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2420
2359
|
var ParagraphNode = (props) => {
|
|
2421
2360
|
const NodeTypes2 = {
|
|
2422
2361
|
["text"]: TextNode_default,
|
|
@@ -2436,9 +2375,9 @@ var ParagraphNode = (props) => {
|
|
|
2436
2375
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
2437
2376
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
2438
2377
|
if (isInlineOnlyParent) {
|
|
2439
|
-
return /* @__PURE__ */ jsx43(
|
|
2378
|
+
return /* @__PURE__ */ jsx43(Fragment3, { children: hasChildren && props.node.children.map((node, index) => {
|
|
2440
2379
|
const SelectedNode = NodeTypes2[node.type];
|
|
2441
|
-
return /* @__PURE__ */ jsx43(
|
|
2380
|
+
return /* @__PURE__ */ jsx43(React29.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx43(
|
|
2442
2381
|
SelectedNode,
|
|
2443
2382
|
{
|
|
2444
2383
|
node,
|
|
@@ -2453,7 +2392,7 @@ var ParagraphNode = (props) => {
|
|
|
2453
2392
|
return /* @__PURE__ */ jsxs24("div", { className: " " + formatClasses, children: [
|
|
2454
2393
|
hasChildren && props.node.children.map((node, index) => {
|
|
2455
2394
|
const SelectedNode = NodeTypes2[node.type];
|
|
2456
|
-
return /* @__PURE__ */ jsx43(
|
|
2395
|
+
return /* @__PURE__ */ jsx43(React29.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx43(
|
|
2457
2396
|
SelectedNode,
|
|
2458
2397
|
{
|
|
2459
2398
|
node,
|
|
@@ -2470,8 +2409,8 @@ var ParagraphNode = (props) => {
|
|
|
2470
2409
|
var ParagraphNode_default = ParagraphNode;
|
|
2471
2410
|
|
|
2472
2411
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
2473
|
-
import
|
|
2474
|
-
import { Fragment as
|
|
2412
|
+
import React30 from "react";
|
|
2413
|
+
import { Fragment as Fragment4, jsx as jsx44 } from "react/jsx-runtime";
|
|
2475
2414
|
var HeadingNode = (props) => {
|
|
2476
2415
|
const NodeTypes2 = {
|
|
2477
2416
|
["text"]: TextNode_default,
|
|
@@ -2487,22 +2426,22 @@ var HeadingNode = (props) => {
|
|
|
2487
2426
|
{
|
|
2488
2427
|
}
|
|
2489
2428
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
2490
|
-
return /* @__PURE__ */ jsx44(
|
|
2429
|
+
return /* @__PURE__ */ jsx44(Fragment4, { children: React30.createElement(
|
|
2491
2430
|
HeadingTag,
|
|
2492
2431
|
{ className: formatClasses },
|
|
2493
2432
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
2494
2433
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
2495
|
-
return /* @__PURE__ */ jsx44(
|
|
2434
|
+
return /* @__PURE__ */ jsx44(React30.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx44(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
2496
2435
|
})
|
|
2497
2436
|
) });
|
|
2498
2437
|
};
|
|
2499
2438
|
var HeadingNode_default = HeadingNode;
|
|
2500
2439
|
|
|
2501
2440
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
2502
|
-
import
|
|
2441
|
+
import React32 from "react";
|
|
2503
2442
|
|
|
2504
2443
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
2505
|
-
import
|
|
2444
|
+
import React31 from "react";
|
|
2506
2445
|
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
2507
2446
|
var ListItemNode = (props) => {
|
|
2508
2447
|
const NodeTypes2 = {
|
|
@@ -2531,7 +2470,7 @@ var ListItemNode = (props) => {
|
|
|
2531
2470
|
}
|
|
2532
2471
|
} else {
|
|
2533
2472
|
foundFirstBreak = false;
|
|
2534
|
-
return /* @__PURE__ */ jsx45(
|
|
2473
|
+
return /* @__PURE__ */ jsx45(React31.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx45(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2535
2474
|
}
|
|
2536
2475
|
}) });
|
|
2537
2476
|
};
|
|
@@ -2543,21 +2482,21 @@ var ListNode = (props) => {
|
|
|
2543
2482
|
const NodeTypes2 = {
|
|
2544
2483
|
listitem: ListItemNode_default
|
|
2545
2484
|
};
|
|
2546
|
-
return /* @__PURE__ */ jsxs25(
|
|
2485
|
+
return /* @__PURE__ */ jsxs25(React32.Fragment, { children: [
|
|
2547
2486
|
props.node.listType == "bullet" && /* @__PURE__ */ jsx46("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2548
2487
|
const SelectedNode = NodeTypes2[node.type];
|
|
2549
|
-
return /* @__PURE__ */ jsx46(
|
|
2488
|
+
return /* @__PURE__ */ jsx46(React32.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx46(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2550
2489
|
}) }),
|
|
2551
2490
|
props.node.listType == "number" && /* @__PURE__ */ jsx46("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2552
2491
|
const SelectedNode = NodeTypes2[node.type];
|
|
2553
|
-
return /* @__PURE__ */ jsx46(
|
|
2492
|
+
return /* @__PURE__ */ jsx46(React32.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx46(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2554
2493
|
}) })
|
|
2555
2494
|
] });
|
|
2556
2495
|
};
|
|
2557
2496
|
var ListNode_default = ListNode;
|
|
2558
2497
|
|
|
2559
2498
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
2560
|
-
import
|
|
2499
|
+
import React33 from "react";
|
|
2561
2500
|
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
2562
2501
|
var QuoteNode = (props) => {
|
|
2563
2502
|
const NodeTypes2 = {
|
|
@@ -2567,13 +2506,13 @@ var QuoteNode = (props) => {
|
|
|
2567
2506
|
};
|
|
2568
2507
|
return /* @__PURE__ */ jsx47("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2569
2508
|
const SelectedNode = NodeTypes2[node.type];
|
|
2570
|
-
return /* @__PURE__ */ jsx47(
|
|
2509
|
+
return /* @__PURE__ */ jsx47(React33.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx47(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
2571
2510
|
}) });
|
|
2572
2511
|
};
|
|
2573
2512
|
var QuoteNode_default = QuoteNode;
|
|
2574
2513
|
|
|
2575
2514
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
2576
|
-
import
|
|
2515
|
+
import React34 from "react";
|
|
2577
2516
|
import dynamic5 from "next/dynamic";
|
|
2578
2517
|
import { jsx as jsx48, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2579
2518
|
var CopyButton = dynamic5(() => import("./CopyButton-XONTQQW7.mjs"), {
|
|
@@ -2600,7 +2539,7 @@ var CodeNode = (props) => {
|
|
|
2600
2539
|
] }),
|
|
2601
2540
|
/* @__PURE__ */ jsx48("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) => {
|
|
2602
2541
|
const SelectedNode = NodeTypes2[node.type];
|
|
2603
|
-
return /* @__PURE__ */ jsx48(
|
|
2542
|
+
return /* @__PURE__ */ jsx48(React34.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx48(
|
|
2604
2543
|
SelectedNode,
|
|
2605
2544
|
{
|
|
2606
2545
|
node,
|
|
@@ -2622,8 +2561,8 @@ var HorizontalRuleNode = () => {
|
|
|
2622
2561
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
2623
2562
|
|
|
2624
2563
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
2625
|
-
import
|
|
2626
|
-
import { Fragment as
|
|
2564
|
+
import React35 from "react";
|
|
2565
|
+
import { Fragment as Fragment5, jsx as jsx50 } from "react/jsx-runtime";
|
|
2627
2566
|
var WidgetNode = (props) => {
|
|
2628
2567
|
const getWidgetParameters = () => {
|
|
2629
2568
|
const widgetInputParameters = {
|
|
@@ -2687,7 +2626,7 @@ var WidgetNode = (props) => {
|
|
|
2687
2626
|
};
|
|
2688
2627
|
const widgetCode = props.node?.widgetCode;
|
|
2689
2628
|
if (!widgetCode) {
|
|
2690
|
-
return /* @__PURE__ */ jsx50(
|
|
2629
|
+
return /* @__PURE__ */ jsx50(Fragment5, { children: "Invalid widget" });
|
|
2691
2630
|
}
|
|
2692
2631
|
const widgetParams = getWidgetParameters();
|
|
2693
2632
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -2696,7 +2635,7 @@ var WidgetNode = (props) => {
|
|
|
2696
2635
|
}
|
|
2697
2636
|
return (
|
|
2698
2637
|
// eslint-disable-next-line react-hooks/static-components
|
|
2699
|
-
/* @__PURE__ */ jsx50(
|
|
2638
|
+
/* @__PURE__ */ jsx50(React35.Fragment, { children: /* @__PURE__ */ jsx50(
|
|
2700
2639
|
WidgetRenderer,
|
|
2701
2640
|
{
|
|
2702
2641
|
params: widgetParams,
|
|
@@ -2713,7 +2652,7 @@ var WidgetNode = (props) => {
|
|
|
2713
2652
|
var WidgetNode_default = WidgetNode;
|
|
2714
2653
|
|
|
2715
2654
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
2716
|
-
import
|
|
2655
|
+
import React36, { useRef as useRef3, useReducer, useCallback as useCallback2, useEffect as useEffect7 } from "react";
|
|
2717
2656
|
|
|
2718
2657
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
2719
2658
|
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
@@ -2826,7 +2765,7 @@ var FormContainerNode = (props) => {
|
|
|
2826
2765
|
{
|
|
2827
2766
|
}
|
|
2828
2767
|
const SelectedNode = NodeTypes2[node2.type];
|
|
2829
|
-
return /* @__PURE__ */ jsx52(
|
|
2768
|
+
return /* @__PURE__ */ jsx52(React36.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ jsx52(
|
|
2830
2769
|
InputControlNode_default,
|
|
2831
2770
|
{
|
|
2832
2771
|
value: formState.inputValues[node2.name],
|
|
@@ -2841,7 +2780,7 @@ var FormContainerNode = (props) => {
|
|
|
2841
2780
|
var FormContainerNode_default = FormContainerNode;
|
|
2842
2781
|
|
|
2843
2782
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
2844
|
-
import
|
|
2783
|
+
import React39 from "react";
|
|
2845
2784
|
|
|
2846
2785
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
2847
2786
|
import dynamic6 from "next/dynamic";
|
|
@@ -2863,8 +2802,8 @@ var EmbedNode = (props) => {
|
|
|
2863
2802
|
var EmbedNode_default = EmbedNode;
|
|
2864
2803
|
|
|
2865
2804
|
// src/components/Slider.tsx
|
|
2866
|
-
import
|
|
2867
|
-
import { Fragment as
|
|
2805
|
+
import React37, { useState as useState5, useEffect as useEffect8, Children, cloneElement } from "react";
|
|
2806
|
+
import { Fragment as Fragment6, jsx as jsx54, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2868
2807
|
var Slider = ({
|
|
2869
2808
|
children,
|
|
2870
2809
|
slidesToShow = 4,
|
|
@@ -2958,7 +2897,7 @@ var Slider = ({
|
|
|
2958
2897
|
};
|
|
2959
2898
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
2960
2899
|
const slides = Children.map(children, (child, index) => {
|
|
2961
|
-
if (!
|
|
2900
|
+
if (!React37.isValidElement(child)) return null;
|
|
2962
2901
|
const childProps = child.props;
|
|
2963
2902
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
2964
2903
|
return /* @__PURE__ */ jsx54(
|
|
@@ -3002,7 +2941,7 @@ var Slider = ({
|
|
|
3002
2941
|
children: slides
|
|
3003
2942
|
}
|
|
3004
2943
|
),
|
|
3005
|
-
show_arrows && /* @__PURE__ */ jsxs28(
|
|
2944
|
+
show_arrows && /* @__PURE__ */ jsxs28(Fragment6, { children: [
|
|
3006
2945
|
/* @__PURE__ */ jsx54(
|
|
3007
2946
|
ArrowButton,
|
|
3008
2947
|
{
|
|
@@ -3698,7 +3637,7 @@ var Pagination_default = Pagination;
|
|
|
3698
3637
|
|
|
3699
3638
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
3700
3639
|
import dynamic7 from "next/dynamic";
|
|
3701
|
-
import { Fragment as
|
|
3640
|
+
import { Fragment as Fragment7, jsx as jsx57, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3702
3641
|
var HlsPlayer2 = dynamic7(() => import("./HlsPlayer-GZR4QXJY.mjs"), { ssr: false });
|
|
3703
3642
|
var deviceToMediaQuery = (device) => {
|
|
3704
3643
|
switch (device) {
|
|
@@ -3767,8 +3706,8 @@ var ImageGalleryNode = (props) => {
|
|
|
3767
3706
|
right: "justify-end"
|
|
3768
3707
|
};
|
|
3769
3708
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
3770
|
-
return /* @__PURE__ */ jsxs31(
|
|
3771
|
-
hlsSources.length > 0 && /* @__PURE__ */ jsx57(
|
|
3709
|
+
return /* @__PURE__ */ jsxs31(Fragment7, { children: [
|
|
3710
|
+
hlsSources.length > 0 && /* @__PURE__ */ jsx57(Fragment7, { children: /* @__PURE__ */ jsx57(
|
|
3772
3711
|
HlsPlayer2,
|
|
3773
3712
|
{
|
|
3774
3713
|
sources: hlsSources,
|
|
@@ -3782,7 +3721,7 @@ var ImageGalleryNode = (props) => {
|
|
|
3782
3721
|
session: props.session
|
|
3783
3722
|
}
|
|
3784
3723
|
) }),
|
|
3785
|
-
staticFallback && /* @__PURE__ */ jsx57(
|
|
3724
|
+
staticFallback && /* @__PURE__ */ jsx57(Fragment7, { children: /* @__PURE__ */ jsxs31("picture", { children: [
|
|
3786
3725
|
DEVICE_ORDER.map((deviceKey) => {
|
|
3787
3726
|
const match = staticSources.find((img) => img.device === deviceKey);
|
|
3788
3727
|
if (!match) return null;
|
|
@@ -4058,7 +3997,7 @@ var DivContainer = async (props) => {
|
|
|
4058
3997
|
}
|
|
4059
3998
|
const SelectedNode = NodeTypes2[node.type];
|
|
4060
3999
|
if (!SelectedNode) return null;
|
|
4061
|
-
return /* @__PURE__ */ jsx58(
|
|
4000
|
+
return /* @__PURE__ */ jsx58(React39.Fragment, { children: /* @__PURE__ */ jsx58(
|
|
4062
4001
|
SelectedNode,
|
|
4063
4002
|
{
|
|
4064
4003
|
node,
|
|
@@ -4160,9 +4099,9 @@ var DivContainer = async (props) => {
|
|
|
4160
4099
|
props.node.autoFormat && "auto-format",
|
|
4161
4100
|
props.node.bgClass
|
|
4162
4101
|
].filter(Boolean).join(" ");
|
|
4163
|
-
return /* @__PURE__ */ jsxs32(
|
|
4102
|
+
return /* @__PURE__ */ jsxs32(React39.Fragment, { children: [
|
|
4164
4103
|
/* @__PURE__ */ jsx58("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
4165
|
-
/* @__PURE__ */ jsx58(
|
|
4104
|
+
/* @__PURE__ */ jsx58(React39.Fragment, { children: /* @__PURE__ */ jsx58(
|
|
4166
4105
|
Wrapper,
|
|
4167
4106
|
{
|
|
4168
4107
|
id: guid,
|
|
@@ -4171,7 +4110,7 @@ var DivContainer = async (props) => {
|
|
|
4171
4110
|
...wrapperProps,
|
|
4172
4111
|
children: dataToRender.map(
|
|
4173
4112
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
4174
|
-
(child, i) => /* @__PURE__ */ jsx58(
|
|
4113
|
+
(child, i) => /* @__PURE__ */ jsx58(React39.Fragment, { children: child }, i)
|
|
4175
4114
|
) : renderChildren(props.node.children, props, item, idx)
|
|
4176
4115
|
)
|
|
4177
4116
|
}
|
|
@@ -4210,11 +4149,11 @@ var PageBodyRenderer = (props) => {
|
|
|
4210
4149
|
if (pageBodyTree && pageBodyTree.root) {
|
|
4211
4150
|
rootNode = pageBodyTree.root;
|
|
4212
4151
|
}
|
|
4213
|
-
return /* @__PURE__ */ jsx59(
|
|
4152
|
+
return /* @__PURE__ */ jsx59(React40.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
4214
4153
|
{
|
|
4215
4154
|
}
|
|
4216
4155
|
const SelectedNode = NodeTypes[node.type];
|
|
4217
|
-
return /* @__PURE__ */ jsx59(
|
|
4156
|
+
return /* @__PURE__ */ jsx59(React40.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx59(React40.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx59(React40.Fragment, { children: /* @__PURE__ */ jsx59(
|
|
4218
4157
|
SelectedNode,
|
|
4219
4158
|
{
|
|
4220
4159
|
node,
|
|
@@ -4230,7 +4169,7 @@ var PageBodyRenderer = (props) => {
|
|
|
4230
4169
|
device: props.device,
|
|
4231
4170
|
widgetRenderer: props.widgetRenderer
|
|
4232
4171
|
}
|
|
4233
|
-
) }) : /* @__PURE__ */ jsx59(
|
|
4172
|
+
) }) : /* @__PURE__ */ jsx59(React40.Fragment, { children: /* @__PURE__ */ jsx59(
|
|
4234
4173
|
SelectedNode,
|
|
4235
4174
|
{
|
|
4236
4175
|
node,
|
|
@@ -4252,7 +4191,7 @@ var PageBodyRenderer_default = PageBodyRenderer;
|
|
|
4252
4191
|
|
|
4253
4192
|
// src/components/Toast.tsx
|
|
4254
4193
|
import { useState as useState7 } from "react";
|
|
4255
|
-
import { Fragment as
|
|
4194
|
+
import { Fragment as Fragment8, jsx as jsx60, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4256
4195
|
var Toast = () => {
|
|
4257
4196
|
const [showToast, setShowToast] = useState7(false);
|
|
4258
4197
|
const [message, setMessage] = useState7("");
|
|
@@ -4295,7 +4234,7 @@ var Toast = () => {
|
|
|
4295
4234
|
const closeToast = () => {
|
|
4296
4235
|
setShowToast(false);
|
|
4297
4236
|
};
|
|
4298
|
-
return /* @__PURE__ */ jsx60(
|
|
4237
|
+
return /* @__PURE__ */ jsx60(Fragment8, { children: showToast && /* @__PURE__ */ jsx60("div", { className: "fixed top-2 flex justify-center w-1/2 max-w-xl left-1/2 -translate-x-1/2", style: { zIndex: 1e3 }, children: /* @__PURE__ */ jsxs33("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
4299
4238
|
/* @__PURE__ */ jsx60(
|
|
4300
4239
|
"span",
|
|
4301
4240
|
{
|
|
@@ -4361,22 +4300,22 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
4361
4300
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
4362
4301
|
|
|
4363
4302
|
// src/components/dataForm/DataList.tsx
|
|
4364
|
-
import
|
|
4303
|
+
import React44, { useEffect as useEffect9, useState as useState8, useCallback as useCallback3, useReducer as useReducer2 } from "react";
|
|
4365
4304
|
import { useRouter } from "next/navigation";
|
|
4366
4305
|
|
|
4367
4306
|
// src/components/dataForm/NoContentView.tsx
|
|
4368
|
-
import
|
|
4307
|
+
import React42 from "react";
|
|
4369
4308
|
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
4370
4309
|
var NoContentView = (props) => {
|
|
4371
|
-
return /* @__PURE__ */ jsx62(
|
|
4310
|
+
return /* @__PURE__ */ jsx62(React42.Fragment, { children: props.isDataFound === false && props.children });
|
|
4372
4311
|
};
|
|
4373
4312
|
var NoContentView_default = NoContentView;
|
|
4374
4313
|
|
|
4375
4314
|
// src/components/dataForm/ContentView.tsx
|
|
4376
|
-
import
|
|
4315
|
+
import React43 from "react";
|
|
4377
4316
|
import { jsx as jsx63, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4378
4317
|
var ContentView = (props) => {
|
|
4379
|
-
return /* @__PURE__ */ jsxs34(
|
|
4318
|
+
return /* @__PURE__ */ jsxs34(React43.Fragment, { children: [
|
|
4380
4319
|
props.isDataFound == null && /* @__PURE__ */ jsx63("div", { className: "", children: /* @__PURE__ */ jsxs34("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
4381
4320
|
/* @__PURE__ */ jsxs34("div", { className: "flex items-center mb-4", children: [
|
|
4382
4321
|
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
@@ -4415,7 +4354,7 @@ var ContentView = (props) => {
|
|
|
4415
4354
|
var ContentView_default = ContentView;
|
|
4416
4355
|
|
|
4417
4356
|
// src/components/dataForm/DataList.tsx
|
|
4418
|
-
import { Fragment as
|
|
4357
|
+
import { Fragment as Fragment9, jsx as jsx64, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4419
4358
|
var DataList = (props) => {
|
|
4420
4359
|
console.log(props.dataset, "datasetssssss");
|
|
4421
4360
|
const router = useRouter();
|
|
@@ -4494,7 +4433,7 @@ var DataList = (props) => {
|
|
|
4494
4433
|
const renderPageNumbers = () => {
|
|
4495
4434
|
if (pages <= 10) {
|
|
4496
4435
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
4497
|
-
(page) => /* @__PURE__ */ jsx64(
|
|
4436
|
+
(page) => /* @__PURE__ */ jsx64(React44.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx64(
|
|
4498
4437
|
Hyperlink,
|
|
4499
4438
|
{
|
|
4500
4439
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4507,8 +4446,8 @@ var DataList = (props) => {
|
|
|
4507
4446
|
const showFirstPages = activePageNumber <= 5;
|
|
4508
4447
|
const showLastPages = activePageNumber > pages - 5;
|
|
4509
4448
|
if (showFirstPages) {
|
|
4510
|
-
return /* @__PURE__ */ jsxs35(
|
|
4511
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ jsx64(
|
|
4449
|
+
return /* @__PURE__ */ jsxs35(Fragment9, { children: [
|
|
4450
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ jsx64(React44.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx64(
|
|
4512
4451
|
Hyperlink,
|
|
4513
4452
|
{
|
|
4514
4453
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4555,7 +4494,7 @@ var DataList = (props) => {
|
|
|
4555
4494
|
) })
|
|
4556
4495
|
] });
|
|
4557
4496
|
} else if (showLastPages) {
|
|
4558
|
-
return /* @__PURE__ */ jsxs35(
|
|
4497
|
+
return /* @__PURE__ */ jsxs35(Fragment9, { children: [
|
|
4559
4498
|
/* @__PURE__ */ jsx64(
|
|
4560
4499
|
Hyperlink,
|
|
4561
4500
|
{
|
|
@@ -4574,7 +4513,7 @@ var DataList = (props) => {
|
|
|
4574
4513
|
),
|
|
4575
4514
|
/* @__PURE__ */ jsx64("span", { className: "px-2 py-1", children: "..." }),
|
|
4576
4515
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
4577
|
-
(page) => /* @__PURE__ */ jsx64(
|
|
4516
|
+
(page) => /* @__PURE__ */ jsx64(React44.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx64(
|
|
4578
4517
|
Hyperlink,
|
|
4579
4518
|
{
|
|
4580
4519
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4585,7 +4524,7 @@ var DataList = (props) => {
|
|
|
4585
4524
|
)
|
|
4586
4525
|
] });
|
|
4587
4526
|
} else {
|
|
4588
|
-
return /* @__PURE__ */ jsxs35(
|
|
4527
|
+
return /* @__PURE__ */ jsxs35(Fragment9, { children: [
|
|
4589
4528
|
/* @__PURE__ */ jsx64(
|
|
4590
4529
|
Hyperlink,
|
|
4591
4530
|
{
|
|
@@ -4606,7 +4545,7 @@ var DataList = (props) => {
|
|
|
4606
4545
|
Array.from(
|
|
4607
4546
|
{ length: 5 },
|
|
4608
4547
|
(_, index) => activePageNumber - 2 + index
|
|
4609
|
-
).map((page) => /* @__PURE__ */ jsx64(
|
|
4548
|
+
).map((page) => /* @__PURE__ */ jsx64(React44.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx64(
|
|
4610
4549
|
Hyperlink,
|
|
4611
4550
|
{
|
|
4612
4551
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4652,7 +4591,7 @@ var DataList = (props) => {
|
|
|
4652
4591
|
}
|
|
4653
4592
|
}
|
|
4654
4593
|
};
|
|
4655
|
-
return /* @__PURE__ */ jsxs35(
|
|
4594
|
+
return /* @__PURE__ */ jsxs35(React44.Fragment, { children: [
|
|
4656
4595
|
/* @__PURE__ */ jsxs35(ContentView_default, { isDataFound, children: [
|
|
4657
4596
|
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs35(
|
|
4658
4597
|
"div",
|
|
@@ -4730,7 +4669,7 @@ var DataList = (props) => {
|
|
|
4730
4669
|
}
|
|
4731
4670
|
return /* @__PURE__ */ jsx64("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
4732
4671
|
console.log("column", column);
|
|
4733
|
-
return /* @__PURE__ */ jsx64(
|
|
4672
|
+
return /* @__PURE__ */ jsx64(React44.Fragment, { children: /* @__PURE__ */ jsx64(
|
|
4734
4673
|
"td",
|
|
4735
4674
|
{
|
|
4736
4675
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
@@ -4882,7 +4821,7 @@ var DataList = (props) => {
|
|
|
4882
4821
|
var DataList_default = DataList;
|
|
4883
4822
|
|
|
4884
4823
|
// src/components/dataForm/DataListRenderer.tsx
|
|
4885
|
-
import
|
|
4824
|
+
import React45, { useState as useState9, useEffect as useEffect10 } from "react";
|
|
4886
4825
|
import { usePathname as usePathname2 } from "next/navigation";
|
|
4887
4826
|
import { jsx as jsx65, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4888
4827
|
var viewControlMap = {
|
|
@@ -4973,7 +4912,7 @@ var DataListRenderer = ({
|
|
|
4973
4912
|
const [tabItem, setTabItem] = useState9();
|
|
4974
4913
|
const activeTab = tabItem?.find((tab) => tab.isActive);
|
|
4975
4914
|
const activeHref = activeTab ? resolveRoutePlaceholders2(activeTab.landingPageUrl, params) : pathname;
|
|
4976
|
-
return /* @__PURE__ */ jsxs36(
|
|
4915
|
+
return /* @__PURE__ */ jsxs36(React45.Fragment, { children: [
|
|
4977
4916
|
widgetProps && /* @__PURE__ */ jsx65(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
4978
4917
|
/* @__PURE__ */ jsx65(
|
|
4979
4918
|
DataList_default,
|
|
@@ -4994,10 +4933,10 @@ var DataListRenderer = ({
|
|
|
4994
4933
|
var DataListRenderer_default = DataListRenderer;
|
|
4995
4934
|
|
|
4996
4935
|
// src/components/dataForm/DataForm.tsx
|
|
4997
|
-
import
|
|
4936
|
+
import React47, { useCallback as useCallback5, useEffect as useEffect11, useReducer as useReducer3, useRef as useRef4 } from "react";
|
|
4998
4937
|
|
|
4999
4938
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
5000
|
-
import
|
|
4939
|
+
import React46, { useCallback as useCallback4 } from "react";
|
|
5001
4940
|
|
|
5002
4941
|
// src/components/dataForm/StyleTypes.tsx
|
|
5003
4942
|
var StyleTypes2 = /* @__PURE__ */ ((StyleTypes3) => {
|
|
@@ -5088,7 +5027,7 @@ var DataFormChildSection = (props) => {
|
|
|
5088
5027
|
childItemsToRender,
|
|
5089
5028
|
allChildItems: childItems
|
|
5090
5029
|
});
|
|
5091
|
-
return /* @__PURE__ */ jsx66(
|
|
5030
|
+
return /* @__PURE__ */ jsx66(React46.Fragment, { children: /* @__PURE__ */ jsxs37("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
5092
5031
|
section.sectionTitle && /* @__PURE__ */ jsx66("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
5093
5032
|
/* @__PURE__ */ jsx66("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ jsxs37("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
5094
5033
|
/* @__PURE__ */ jsx66("div", { children: /* @__PURE__ */ jsxs37("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
@@ -5110,7 +5049,7 @@ var DataFormChildSection = (props) => {
|
|
|
5110
5049
|
/* @__PURE__ */ jsx66("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
5111
5050
|
const { item, originalIndex } = visibleItem;
|
|
5112
5051
|
const rowKey = originalIndex;
|
|
5113
|
-
return /* @__PURE__ */ jsx66(
|
|
5052
|
+
return /* @__PURE__ */ jsx66(React46.Fragment, { children: section.sectionRows.map(
|
|
5114
5053
|
(sectionRow, sectionRowIndex) => {
|
|
5115
5054
|
return /* @__PURE__ */ jsxs37(
|
|
5116
5055
|
"tr",
|
|
@@ -5399,7 +5338,7 @@ var DataForm = (props) => {
|
|
|
5399
5338
|
return false;
|
|
5400
5339
|
}
|
|
5401
5340
|
}
|
|
5402
|
-
return /* @__PURE__ */ jsx67(
|
|
5341
|
+
return /* @__PURE__ */ jsx67(React47.Fragment, { children: /* @__PURE__ */ jsxs38("div", { className: "flex-grow flex flex-col", children: [
|
|
5403
5342
|
props.title && /* @__PURE__ */ jsx67("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__ */ jsxs38(
|
|
5404
5343
|
"div",
|
|
5405
5344
|
{
|
|
@@ -5433,7 +5372,7 @@ var DataForm = (props) => {
|
|
|
5433
5372
|
}
|
|
5434
5373
|
},
|
|
5435
5374
|
children: /* @__PURE__ */ jsx67("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
5436
|
-
return /* @__PURE__ */ jsx67(
|
|
5375
|
+
return /* @__PURE__ */ jsx67(React47.Fragment, { children: !section.isChildSection && /* @__PURE__ */ jsxs38("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
5437
5376
|
section.sectionRows?.map(
|
|
5438
5377
|
(sectionRow, sectionRowIndex) => {
|
|
5439
5378
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -5444,7 +5383,7 @@ var DataForm = (props) => {
|
|
|
5444
5383
|
sectionRow.visible
|
|
5445
5384
|
);
|
|
5446
5385
|
}
|
|
5447
|
-
return /* @__PURE__ */ jsx67(
|
|
5386
|
+
return /* @__PURE__ */ jsx67(React47.Fragment, { children: isVisible && /* @__PURE__ */ jsx67("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
5448
5387
|
return /* @__PURE__ */ jsxs38(
|
|
5449
5388
|
"div",
|
|
5450
5389
|
{
|