@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260521120239 → 0.8.1-dev.20260522061527
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 +1085 -1054
- package/dist/index.mjs +579 -548
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -93,11 +93,183 @@ var BooleanView = (props) => {
|
|
|
93
93
|
};
|
|
94
94
|
var BooleanView_default = BooleanView;
|
|
95
95
|
|
|
96
|
+
// src/components/utilities/AssetUtility.tsx
|
|
97
|
+
var AssetUtility = class {
|
|
98
|
+
constructor() {
|
|
99
|
+
}
|
|
100
|
+
static resolveUrl(assetBaseUrl, url) {
|
|
101
|
+
if (!url) return void 0;
|
|
102
|
+
if (url.startsWith("http")) return url;
|
|
103
|
+
if (!assetBaseUrl) return url;
|
|
104
|
+
return `${assetBaseUrl}/${url}`;
|
|
105
|
+
}
|
|
106
|
+
// static getAssetUrl(apiBaseUrl: string) {
|
|
107
|
+
// let domainName = apiBaseUrl.replace("https://", "");
|
|
108
|
+
// return `https://cdn.g-assets.com/${domainName}`;
|
|
109
|
+
// }
|
|
110
|
+
static getAssetFullPath(apiBaseUrl, relativePath) {
|
|
111
|
+
const domainName = apiBaseUrl.replace("https://", "");
|
|
112
|
+
return `https://cdn.g-assets.com/${domainName}/${relativePath}`;
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
var AssetUtility_default = AssetUtility;
|
|
116
|
+
|
|
117
|
+
// src/components/DeviceAssetSelector.tsx
|
|
118
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
119
|
+
var DeviceAssetSelector = ({
|
|
120
|
+
assets,
|
|
121
|
+
assetBaseUrl,
|
|
122
|
+
session,
|
|
123
|
+
// This should receive the session
|
|
124
|
+
width,
|
|
125
|
+
tag,
|
|
126
|
+
customProps,
|
|
127
|
+
nodeProps,
|
|
128
|
+
device
|
|
129
|
+
}) => {
|
|
130
|
+
console.log("\u{1F511} Session in DeviceAssetSelector:", session);
|
|
131
|
+
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
|
+
};
|
|
153
|
+
const selectAsset = () => {
|
|
154
|
+
if (!assets || assets.length === 0) return void 0;
|
|
155
|
+
if (targetTag) {
|
|
156
|
+
return selectAssetByTagAndDevice(assets, device, targetTag);
|
|
157
|
+
}
|
|
158
|
+
return selectAssetByDevice(assets, device);
|
|
159
|
+
};
|
|
160
|
+
const selectedAsset = selectAsset();
|
|
161
|
+
if (!selectedAsset) {
|
|
162
|
+
console.warn("No suitable asset found for device:", device, "and tag:", targetTag);
|
|
163
|
+
return null;
|
|
164
|
+
}
|
|
165
|
+
const resolvedAssetUrl = AssetUtility_default.resolveUrl(assetBaseUrl, selectedAsset.assetUrl);
|
|
166
|
+
const resolvedThumbnailUrl = selectedAsset.posterUrl ? AssetUtility_default.resolveUrl(assetBaseUrl, selectedAsset.posterUrl) : void 0;
|
|
167
|
+
console.log("Selected Asset:", resolvedThumbnailUrl);
|
|
168
|
+
const title = selectedAsset.title || nodeProps?.title;
|
|
169
|
+
const intrinsicWidth = selectedAsset.intrinsicWidth?.toString();
|
|
170
|
+
const intrinsicHeight = selectedAsset.intrinsicHeight?.toString();
|
|
171
|
+
const isHls = resolvedAssetUrl?.endsWith(".m3u8");
|
|
172
|
+
const showControls = customProps?.showControls ?? nodeProps?.showControls === "true";
|
|
173
|
+
const loop = customProps?.loop ?? nodeProps?.loop === "true";
|
|
174
|
+
const playOptions = customProps?.playOptions ?? nodeProps?.playOptions;
|
|
175
|
+
const styles = {};
|
|
176
|
+
if (nodeProps?.height) {
|
|
177
|
+
styles.height = nodeProps.height;
|
|
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
|
+
}
|
|
224
|
+
};
|
|
225
|
+
if (width) {
|
|
226
|
+
return /* @__PURE__ */ jsx3("div", { style: { width }, children: renderMedia() });
|
|
227
|
+
}
|
|
228
|
+
if (nodeProps?.format) {
|
|
229
|
+
return /* @__PURE__ */ jsx3("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
230
|
+
}
|
|
231
|
+
return renderMedia();
|
|
232
|
+
};
|
|
233
|
+
var DeviceAssetSelector_default = DeviceAssetSelector;
|
|
234
|
+
|
|
235
|
+
// src/components/controls/view/Asset.tsx
|
|
236
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
237
|
+
var MediaAsset = (props) => {
|
|
238
|
+
let assets;
|
|
239
|
+
if (props.value != void 0 && props.value != null && props.value != "") {
|
|
240
|
+
try {
|
|
241
|
+
assets = JSON.parse(props.value);
|
|
242
|
+
console.log("Parsed Assets: ", assets);
|
|
243
|
+
} catch (error) {
|
|
244
|
+
console.error("Error parsing assets:", error);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
if (!assets || assets.length === 0) {
|
|
248
|
+
return null;
|
|
249
|
+
}
|
|
250
|
+
const domainName = props.apiBaseUrl?.replace("https://", "");
|
|
251
|
+
const assetBaseUrl = `https://cdn.g-assets.com/${domainName}`;
|
|
252
|
+
console.log(props.customProps?.tag, "Tag in MediaAsset");
|
|
253
|
+
return /* @__PURE__ */ jsx4(
|
|
254
|
+
DeviceAssetSelector_default,
|
|
255
|
+
{
|
|
256
|
+
assets,
|
|
257
|
+
apiBaseUrl: props.apiBaseUrl,
|
|
258
|
+
assetBaseUrl,
|
|
259
|
+
session: props,
|
|
260
|
+
width: props.width,
|
|
261
|
+
customProps: props.customProps,
|
|
262
|
+
tag: props.customProps?.tag
|
|
263
|
+
}
|
|
264
|
+
);
|
|
265
|
+
};
|
|
266
|
+
var Asset_default = MediaAsset;
|
|
267
|
+
|
|
96
268
|
// src/components/controls/view/LineTextView.tsx
|
|
97
269
|
import React3 from "react";
|
|
98
|
-
import { jsx as
|
|
270
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
99
271
|
var LineText = (props) => {
|
|
100
|
-
return /* @__PURE__ */
|
|
272
|
+
return /* @__PURE__ */ jsx5(React3.Fragment, { children: props.value });
|
|
101
273
|
};
|
|
102
274
|
var LineTextView_default = LineText;
|
|
103
275
|
|
|
@@ -123,11 +295,11 @@ var CurrencyUtility = class {
|
|
|
123
295
|
var CurrencyUtility_default = CurrencyUtility;
|
|
124
296
|
|
|
125
297
|
// src/components/controls/view/MoneyView.tsx
|
|
126
|
-
import { jsx as
|
|
298
|
+
import { jsx as jsx6, jsxs } from "react/jsx-runtime";
|
|
127
299
|
var Money = (props) => {
|
|
128
300
|
const parsedNumber = parseFloat(props.value);
|
|
129
|
-
return /* @__PURE__ */
|
|
130
|
-
/* @__PURE__ */
|
|
301
|
+
return /* @__PURE__ */ jsx6(React4.Fragment, { children: !Number.isNaN(parsedNumber) && /* @__PURE__ */ jsxs(React4.Fragment, { children: [
|
|
302
|
+
/* @__PURE__ */ jsx6("span", { className: "mr-0.5", children: CurrencyUtility_default.getCurrencySymbol(props.unit) }),
|
|
131
303
|
parsedNumber.toLocaleString()
|
|
132
304
|
] }) });
|
|
133
305
|
};
|
|
@@ -135,20 +307,20 @@ var MoneyView_default = Money;
|
|
|
135
307
|
|
|
136
308
|
// src/components/controls/view/MultilineTextBulletsView.tsx
|
|
137
309
|
import React5 from "react";
|
|
138
|
-
import { jsx as
|
|
310
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
139
311
|
var MultilineTextBullets = (props) => {
|
|
140
312
|
const lines = props.value?.split("\\n");
|
|
141
|
-
return /* @__PURE__ */
|
|
142
|
-
return /* @__PURE__ */
|
|
313
|
+
return /* @__PURE__ */ jsx7(React5.Fragment, { children: /* @__PURE__ */ jsx7("ul", { className: "list-disc", children: lines && lines.map((line, index) => {
|
|
314
|
+
return /* @__PURE__ */ jsx7("li", { children: line }, index);
|
|
143
315
|
}) }) });
|
|
144
316
|
};
|
|
145
317
|
var MultilineTextBulletsView_default = MultilineTextBullets;
|
|
146
318
|
|
|
147
319
|
// src/components/controls/view/MultilineTextView.tsx
|
|
148
320
|
import React6 from "react";
|
|
149
|
-
import { jsx as
|
|
321
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
150
322
|
var MultilineText = (props) => {
|
|
151
|
-
return /* @__PURE__ */
|
|
323
|
+
return /* @__PURE__ */ jsx8(React6.Fragment, { children: /* @__PURE__ */ jsx8("span", { className: "whitespace-pre-line", children: props.value }) });
|
|
152
324
|
};
|
|
153
325
|
var MultilineTextView_default = MultilineText;
|
|
154
326
|
|
|
@@ -165,15 +337,15 @@ var PercentageView_default = PercentageView;
|
|
|
165
337
|
|
|
166
338
|
// src/components/controls/view/ProgressIndicator.tsx
|
|
167
339
|
import React8 from "react";
|
|
168
|
-
import { jsx as
|
|
340
|
+
import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
169
341
|
var ProgressIndicator = (props) => {
|
|
170
342
|
const percentage = 100;
|
|
171
343
|
const circumference = Math.PI * 56;
|
|
172
344
|
const offset = circumference * (1 - percentage / 100);
|
|
173
|
-
return /* @__PURE__ */
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
-
/* @__PURE__ */
|
|
345
|
+
return /* @__PURE__ */ jsx9(React8.Fragment, { children: /* @__PURE__ */ jsxs3("div", { className: "relative w-48 h-48", children: [
|
|
346
|
+
/* @__PURE__ */ jsx9("div", { className: "absolute top-0 left-0 w-full h-full rounded-full border border-gray-200" }),
|
|
347
|
+
/* @__PURE__ */ jsx9("div", { className: "absolute top-0 left-0 w-full h-full rounded-full overflow-hidden", children: /* @__PURE__ */ jsx9("div", { className: "w-full h-full rounded-full border-t-8 border-green-500", style: { transform: `rotate(-90deg)`, clipPath: `inset(0px ${offset}px 0px 0px)` } }) }),
|
|
348
|
+
/* @__PURE__ */ jsx9("div", { className: "absolute top-0 left-0 w-full h-full flex items-center justify-center text-lg font-bold text-gray-800", children: /* @__PURE__ */ jsxs3("span", { children: [
|
|
177
349
|
percentage,
|
|
178
350
|
"%"
|
|
179
351
|
] }) })
|
|
@@ -182,18 +354,18 @@ var ProgressIndicator = (props) => {
|
|
|
182
354
|
var ProgressIndicator_default = ProgressIndicator;
|
|
183
355
|
|
|
184
356
|
// src/components/controls/view/AiGeneratedSummary.tsx
|
|
185
|
-
import { jsx as
|
|
357
|
+
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
186
358
|
var AiGeneratedSummary = (props) => {
|
|
187
359
|
const lines = props.value?.split("\n").filter((line) => line.trim() !== "") || [];
|
|
188
360
|
return /* @__PURE__ */ jsxs4("details", { className: "group rounded-xl border-2 bg-white shadow-sm border-p overflow-hidden", children: [
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ jsx10("summary", { className: "flex items-start justify-between cursor-pointer list-none", children: /* @__PURE__ */ jsxs4("div", { className: "flex items-start gap-3 ", children: [
|
|
362
|
+
/* @__PURE__ */ jsx10("div", { className: "bg-primary-base bg-transparent rounded mt-1 p-1", children: /* @__PURE__ */ jsx10("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-5", children: /* @__PURE__ */ jsx10("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z" }) }) }),
|
|
191
363
|
/* @__PURE__ */ jsxs4("div", { children: [
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ jsx10("h3", { className: "text-lg font-semibold ", children: "Quick Read" }),
|
|
365
|
+
/* @__PURE__ */ jsx10("p", { className: "text-sm text-gray-500 mb-0", children: "Summary is AI-generated, author-reviewed" })
|
|
194
366
|
] })
|
|
195
367
|
] }) }),
|
|
196
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ jsx10("div", { children: /* @__PURE__ */ jsx10("ul", { className: "list-disc pl-6 space-y-3 text-gray-700", children: lines.map((line, index) => /* @__PURE__ */ jsx10("li", { className: "m-0", children: line }, index)) }) })
|
|
197
369
|
] });
|
|
198
370
|
};
|
|
199
371
|
var AiGeneratedSummary_default = AiGeneratedSummary;
|
|
@@ -206,11 +378,11 @@ var DateTimeView = dynamic2(() => import("./DateTimeViewClient-22GW4AD7.mjs"), {
|
|
|
206
378
|
var DateTimeVew_default = DateTimeView;
|
|
207
379
|
|
|
208
380
|
// src/components/controls/view/ViewControl.tsx
|
|
209
|
-
import { jsx as
|
|
381
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
210
382
|
var ViewControl = (props) => {
|
|
211
383
|
const ControlComponents = {
|
|
212
384
|
[ViewControlTypes_default.lineText]: LineTextView_default,
|
|
213
|
-
|
|
385
|
+
[ViewControlTypes_default.asset]: Asset_default,
|
|
214
386
|
[ViewControlTypes_default.multilineTextBullets]: MultilineTextBulletsView_default,
|
|
215
387
|
[ViewControlTypes_default.boolean]: BooleanView_default,
|
|
216
388
|
[ViewControlTypes_default.money]: MoneyView_default,
|
|
@@ -228,7 +400,7 @@ var ViewControl = (props) => {
|
|
|
228
400
|
[ViewControlTypes_default.aiGeneratedSummary]: AiGeneratedSummary_default
|
|
229
401
|
};
|
|
230
402
|
const SelectedControlComponent = props.controlType ? ControlComponents[props.controlType] : void 0;
|
|
231
|
-
return /* @__PURE__ */
|
|
403
|
+
return /* @__PURE__ */ jsx11(React9.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx11(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
232
404
|
};
|
|
233
405
|
var ViewControl_default = ViewControl;
|
|
234
406
|
|
|
@@ -237,7 +409,7 @@ import React27 from "react";
|
|
|
237
409
|
|
|
238
410
|
// src/components/controls/edit/MultilineTextInput.tsx
|
|
239
411
|
import React10 from "react";
|
|
240
|
-
import { jsx as
|
|
412
|
+
import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
241
413
|
var MultilineTextInput = (props) => {
|
|
242
414
|
const textChangeHandler = (event) => {
|
|
243
415
|
const text = event.target.value;
|
|
@@ -256,11 +428,11 @@ var MultilineTextInput = (props) => {
|
|
|
256
428
|
if (props.value !== void 0 && props.value !== null) {
|
|
257
429
|
value = props.value;
|
|
258
430
|
}
|
|
259
|
-
return /* @__PURE__ */
|
|
260
|
-
/* @__PURE__ */
|
|
431
|
+
return /* @__PURE__ */ jsx12(React10.Fragment, { children: /* @__PURE__ */ jsxs5("label", { className: "block mb-1", children: [
|
|
432
|
+
/* @__PURE__ */ jsx12("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
261
433
|
" ",
|
|
262
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
263
|
-
/* @__PURE__ */
|
|
434
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx12("span", { className: "bg-error-weak", children: "*" }),
|
|
435
|
+
/* @__PURE__ */ jsx12(
|
|
264
436
|
"textarea",
|
|
265
437
|
{
|
|
266
438
|
name: props.name,
|
|
@@ -277,14 +449,14 @@ var MultilineTextInput = (props) => {
|
|
|
277
449
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm input"
|
|
278
450
|
}
|
|
279
451
|
),
|
|
280
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ jsx12("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
281
453
|
] }) });
|
|
282
454
|
};
|
|
283
455
|
var MultilineTextInput_default = MultilineTextInput;
|
|
284
456
|
|
|
285
457
|
// src/components/controls/edit/LineTextInput.tsx
|
|
286
458
|
import React11 from "react";
|
|
287
|
-
import { jsx as
|
|
459
|
+
import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
288
460
|
var LineTextInput = (props) => {
|
|
289
461
|
const textChangeHandler = (event) => {
|
|
290
462
|
const text = event.target.value;
|
|
@@ -303,11 +475,11 @@ var LineTextInput = (props) => {
|
|
|
303
475
|
if (props.value !== void 0 && props.value !== null) {
|
|
304
476
|
value = props.value;
|
|
305
477
|
}
|
|
306
|
-
return /* @__PURE__ */
|
|
307
|
-
props?.attributes?.label && /* @__PURE__ */
|
|
478
|
+
return /* @__PURE__ */ jsx13(React11.Fragment, { children: /* @__PURE__ */ jsxs6("label", { className: "block", children: [
|
|
479
|
+
props?.attributes?.label && /* @__PURE__ */ jsx13("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
308
480
|
" ",
|
|
309
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
310
|
-
/* @__PURE__ */
|
|
481
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx13("span", { className: "bg-error-weak", children: "*" }),
|
|
482
|
+
/* @__PURE__ */ jsx13(
|
|
311
483
|
"input",
|
|
312
484
|
{
|
|
313
485
|
type: "text",
|
|
@@ -327,14 +499,14 @@ var LineTextInput = (props) => {
|
|
|
327
499
|
`
|
|
328
500
|
}
|
|
329
501
|
),
|
|
330
|
-
/* @__PURE__ */
|
|
502
|
+
/* @__PURE__ */ jsx13("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
331
503
|
] }) });
|
|
332
504
|
};
|
|
333
505
|
var LineTextInput_default = LineTextInput;
|
|
334
506
|
|
|
335
507
|
// src/components/controls/edit/MoneyInput.tsx
|
|
336
508
|
import React12 from "react";
|
|
337
|
-
import { jsx as
|
|
509
|
+
import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
338
510
|
var MoneyInput = (props) => {
|
|
339
511
|
const textChangeHandler = (event) => {
|
|
340
512
|
const rawValue = event.target.value;
|
|
@@ -363,11 +535,11 @@ var MoneyInput = (props) => {
|
|
|
363
535
|
e.preventDefault();
|
|
364
536
|
}
|
|
365
537
|
};
|
|
366
|
-
return /* @__PURE__ */
|
|
367
|
-
/* @__PURE__ */
|
|
538
|
+
return /* @__PURE__ */ jsx14(React12.Fragment, { children: /* @__PURE__ */ jsxs7("label", { className: "block mb-1", children: [
|
|
539
|
+
/* @__PURE__ */ jsx14("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
368
540
|
" ",
|
|
369
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
370
|
-
/* @__PURE__ */
|
|
541
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx14("span", { className: "bg-error-weak", children: "*" }),
|
|
542
|
+
/* @__PURE__ */ jsx14(
|
|
371
543
|
"input",
|
|
372
544
|
{
|
|
373
545
|
type: "number",
|
|
@@ -387,7 +559,7 @@ var MoneyInput = (props) => {
|
|
|
387
559
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm number-input"
|
|
388
560
|
}
|
|
389
561
|
),
|
|
390
|
-
/* @__PURE__ */
|
|
562
|
+
/* @__PURE__ */ jsx14("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
391
563
|
] }) });
|
|
392
564
|
};
|
|
393
565
|
var MoneyInput_default = MoneyInput;
|
|
@@ -419,7 +591,7 @@ var InputControlType_default = InputControlType;
|
|
|
419
591
|
|
|
420
592
|
// src/components/controls/edit/Select.tsx
|
|
421
593
|
import { useState, useEffect } from "react";
|
|
422
|
-
import { jsx as
|
|
594
|
+
import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
423
595
|
var Select = (props) => {
|
|
424
596
|
const [list, setList] = useState([]);
|
|
425
597
|
const getSafeValue = (val) => {
|
|
@@ -478,9 +650,9 @@ var Select = (props) => {
|
|
|
478
650
|
]);
|
|
479
651
|
const value = getSafeValue(props.value);
|
|
480
652
|
return /* @__PURE__ */ jsxs8("label", { className: "block", children: [
|
|
481
|
-
props.attributes?.label && /* @__PURE__ */
|
|
653
|
+
props.attributes?.label && /* @__PURE__ */ jsx15("span", { className: "text-sm font-medium inline-block pb-1", children: props.attributes?.label }),
|
|
482
654
|
" ",
|
|
483
|
-
props.attributes?.label && props.attributes?.required && /* @__PURE__ */
|
|
655
|
+
props.attributes?.label && props.attributes?.required && /* @__PURE__ */ jsx15("span", { className: "bg-error-weak", children: "*" }),
|
|
484
656
|
/* @__PURE__ */ jsxs8(
|
|
485
657
|
"select",
|
|
486
658
|
{
|
|
@@ -492,23 +664,23 @@ var Select = (props) => {
|
|
|
492
664
|
disabled: props.attributes?.readOnly,
|
|
493
665
|
className: "peer select py-1.5 block w-full text-black rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none",
|
|
494
666
|
children: [
|
|
495
|
-
/* @__PURE__ */
|
|
667
|
+
/* @__PURE__ */ jsx15("option", { value: "", children: props.attributes?.placeholder || "Select" }),
|
|
496
668
|
list.map((item, index) => {
|
|
497
669
|
const keyField = props.dataKeyFieldName;
|
|
498
670
|
const textField = props.dataTextFieldName;
|
|
499
|
-
return /* @__PURE__ */
|
|
671
|
+
return /* @__PURE__ */ jsx15("option", { value: item[keyField], children: item[textField] }, index);
|
|
500
672
|
})
|
|
501
673
|
]
|
|
502
674
|
}
|
|
503
675
|
),
|
|
504
|
-
/* @__PURE__ */
|
|
676
|
+
/* @__PURE__ */ jsx15("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props.attributes?.errorMessage || "" })
|
|
505
677
|
] });
|
|
506
678
|
};
|
|
507
679
|
var Select_default = Select;
|
|
508
680
|
|
|
509
681
|
// src/components/controls/edit/PercentageInput.tsx
|
|
510
682
|
import React14 from "react";
|
|
511
|
-
import { jsx as
|
|
683
|
+
import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
512
684
|
var PercentageInput = (props) => {
|
|
513
685
|
const textChangeHandler = (event) => {
|
|
514
686
|
const rawValue = event.target.value;
|
|
@@ -537,11 +709,11 @@ var PercentageInput = (props) => {
|
|
|
537
709
|
e.preventDefault();
|
|
538
710
|
}
|
|
539
711
|
};
|
|
540
|
-
return /* @__PURE__ */
|
|
541
|
-
/* @__PURE__ */
|
|
712
|
+
return /* @__PURE__ */ jsx16(React14.Fragment, { children: /* @__PURE__ */ jsxs9("label", { className: "block mb-1", children: [
|
|
713
|
+
/* @__PURE__ */ jsx16("span", { className: "text-sm font-medium ", children: props?.attributes?.label ? props?.attributes?.label + " %" : "" }),
|
|
542
714
|
" ",
|
|
543
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
544
|
-
/* @__PURE__ */
|
|
715
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx16("span", { className: "bg-error-weak", children: "*" }),
|
|
716
|
+
/* @__PURE__ */ jsx16(
|
|
545
717
|
"input",
|
|
546
718
|
{
|
|
547
719
|
type: "number",
|
|
@@ -560,14 +732,14 @@ var PercentageInput = (props) => {
|
|
|
560
732
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm number-input"
|
|
561
733
|
}
|
|
562
734
|
),
|
|
563
|
-
/* @__PURE__ */
|
|
735
|
+
/* @__PURE__ */ jsx16("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
564
736
|
] }) });
|
|
565
737
|
};
|
|
566
738
|
var PercentageInput_default = PercentageInput;
|
|
567
739
|
|
|
568
740
|
// src/components/controls/edit/PhoneInput.tsx
|
|
569
741
|
import React15 from "react";
|
|
570
|
-
import { jsx as
|
|
742
|
+
import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
571
743
|
var PhoneInput = (props) => {
|
|
572
744
|
const textChangeHandler = (event) => {
|
|
573
745
|
const text = event.target.value;
|
|
@@ -586,13 +758,13 @@ var PhoneInput = (props) => {
|
|
|
586
758
|
if (props.value !== void 0 && props.value !== null) {
|
|
587
759
|
value = props.value;
|
|
588
760
|
}
|
|
589
|
-
return /* @__PURE__ */
|
|
590
|
-
/* @__PURE__ */
|
|
761
|
+
return /* @__PURE__ */ jsx17(React15.Fragment, { children: /* @__PURE__ */ jsxs10("label", { className: "block mb-1", children: [
|
|
762
|
+
/* @__PURE__ */ jsx17("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
591
763
|
" ",
|
|
592
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
764
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx17("span", { className: "bg-error-weak", children: "*" }),
|
|
593
765
|
/* @__PURE__ */ jsxs10("div", { className: "flex items-center rounded border ", children: [
|
|
594
|
-
/* @__PURE__ */
|
|
595
|
-
/* @__PURE__ */
|
|
766
|
+
/* @__PURE__ */ jsx17("span", { className: "px-3", children: props.prefix }),
|
|
767
|
+
/* @__PURE__ */ jsx17(
|
|
596
768
|
"input",
|
|
597
769
|
{
|
|
598
770
|
type: "text",
|
|
@@ -610,14 +782,14 @@ var PhoneInput = (props) => {
|
|
|
610
782
|
}
|
|
611
783
|
)
|
|
612
784
|
] }),
|
|
613
|
-
/* @__PURE__ */
|
|
785
|
+
/* @__PURE__ */ jsx17("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
614
786
|
] }) });
|
|
615
787
|
};
|
|
616
788
|
var PhoneInput_default = PhoneInput;
|
|
617
789
|
|
|
618
790
|
// src/components/controls/edit/NumberInput.tsx
|
|
619
791
|
import React16 from "react";
|
|
620
|
-
import { jsx as
|
|
792
|
+
import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
621
793
|
var NumberInput = (props) => {
|
|
622
794
|
const textChangeHandler = (event) => {
|
|
623
795
|
const text = event.target.value;
|
|
@@ -640,11 +812,11 @@ var NumberInput = (props) => {
|
|
|
640
812
|
if (props.value !== void 0 && props.value !== null) {
|
|
641
813
|
value = props.value;
|
|
642
814
|
}
|
|
643
|
-
return /* @__PURE__ */
|
|
644
|
-
props?.attributes?.label && /* @__PURE__ */
|
|
815
|
+
return /* @__PURE__ */ jsx18(React16.Fragment, { children: /* @__PURE__ */ jsxs11("label", { className: "block", children: [
|
|
816
|
+
props?.attributes?.label && /* @__PURE__ */ jsx18("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
645
817
|
" ",
|
|
646
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
647
|
-
/* @__PURE__ */
|
|
818
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx18("span", { className: "bg-error-weak", children: "*" }),
|
|
819
|
+
/* @__PURE__ */ jsx18(
|
|
648
820
|
"input",
|
|
649
821
|
{
|
|
650
822
|
type: "number",
|
|
@@ -663,14 +835,14 @@ var NumberInput = (props) => {
|
|
|
663
835
|
className: "peer py-1.5 block w-full rounded shadow-sm number-input input\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
664
836
|
}
|
|
665
837
|
),
|
|
666
|
-
/* @__PURE__ */
|
|
838
|
+
/* @__PURE__ */ jsx18("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
667
839
|
] }) });
|
|
668
840
|
};
|
|
669
841
|
var NumberInput_default = NumberInput;
|
|
670
842
|
|
|
671
843
|
// src/components/controls/edit/CheckboxInput.tsx
|
|
672
844
|
import React17 from "react";
|
|
673
|
-
import { jsx as
|
|
845
|
+
import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
674
846
|
var CheckboxInput = (props) => {
|
|
675
847
|
const textChangeHandler = (event) => {
|
|
676
848
|
let text = event.target.checked;
|
|
@@ -687,11 +859,11 @@ var CheckboxInput = (props) => {
|
|
|
687
859
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
688
860
|
value = true;
|
|
689
861
|
}
|
|
690
|
-
return /* @__PURE__ */
|
|
691
|
-
/* @__PURE__ */
|
|
862
|
+
return /* @__PURE__ */ jsx19(React17.Fragment, { children: /* @__PURE__ */ jsxs12("label", { className: "inline-block mb-1", children: [
|
|
863
|
+
/* @__PURE__ */ jsx19("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
692
864
|
" ",
|
|
693
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
694
|
-
/* @__PURE__ */
|
|
865
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx19("span", { className: "bg-error-weak", children: "*" }),
|
|
866
|
+
/* @__PURE__ */ jsx19(
|
|
695
867
|
"input",
|
|
696
868
|
{
|
|
697
869
|
type: "checkbox",
|
|
@@ -708,14 +880,14 @@ var CheckboxInput = (props) => {
|
|
|
708
880
|
className: "peer mt-1 py-1.5 block rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
709
881
|
}
|
|
710
882
|
),
|
|
711
|
-
/* @__PURE__ */
|
|
883
|
+
/* @__PURE__ */ jsx19("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
712
884
|
] }) });
|
|
713
885
|
};
|
|
714
886
|
var CheckboxInput_default = CheckboxInput;
|
|
715
887
|
|
|
716
888
|
// src/components/controls/edit/OtpInput.tsx
|
|
717
889
|
import React18 from "react";
|
|
718
|
-
import { jsx as
|
|
890
|
+
import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
719
891
|
var OtpInput = (props) => {
|
|
720
892
|
const textChangeHandler = (event) => {
|
|
721
893
|
const text = event.target.value;
|
|
@@ -737,11 +909,11 @@ var OtpInput = (props) => {
|
|
|
737
909
|
if (props.value !== void 0 && props.value !== null) {
|
|
738
910
|
value = props.value;
|
|
739
911
|
}
|
|
740
|
-
return /* @__PURE__ */
|
|
741
|
-
/* @__PURE__ */
|
|
912
|
+
return /* @__PURE__ */ jsx20(React18.Fragment, { children: /* @__PURE__ */ jsxs13("label", { htmlFor: props.name, className: "block mb-1 w-full", children: [
|
|
913
|
+
/* @__PURE__ */ jsx20("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
742
914
|
" ",
|
|
743
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
744
|
-
/* @__PURE__ */
|
|
915
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx20("span", { className: "bg-error-weak", children: "*" }),
|
|
916
|
+
/* @__PURE__ */ jsx20(
|
|
745
917
|
"input",
|
|
746
918
|
{
|
|
747
919
|
type: "text",
|
|
@@ -761,14 +933,14 @@ var OtpInput = (props) => {
|
|
|
761
933
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm tracking-[1.25em] text-center"
|
|
762
934
|
}
|
|
763
935
|
),
|
|
764
|
-
/* @__PURE__ */
|
|
936
|
+
/* @__PURE__ */ jsx20("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
765
937
|
] }) });
|
|
766
938
|
};
|
|
767
939
|
var OtpInput_default = OtpInput;
|
|
768
940
|
|
|
769
941
|
// src/components/controls/edit/DateTimeInput.tsx
|
|
770
942
|
import React19 from "react";
|
|
771
|
-
import { jsx as
|
|
943
|
+
import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
772
944
|
var DateTimeInput = (props) => {
|
|
773
945
|
const textChangeHandler = (event) => {
|
|
774
946
|
const localDate = new Date(event.target.value);
|
|
@@ -800,12 +972,12 @@ var DateTimeInput = (props) => {
|
|
|
800
972
|
e.preventDefault();
|
|
801
973
|
}
|
|
802
974
|
};
|
|
803
|
-
return /* @__PURE__ */
|
|
804
|
-
/* @__PURE__ */
|
|
975
|
+
return /* @__PURE__ */ jsx21(React19.Fragment, { children: /* @__PURE__ */ jsxs14("label", { className: "block mb-1", children: [
|
|
976
|
+
/* @__PURE__ */ jsx21("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
805
977
|
" ",
|
|
806
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
978
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx21("span", { className: "bg-error-weak", children: "*" }),
|
|
807
979
|
/* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-2", children: [
|
|
808
|
-
/* @__PURE__ */
|
|
980
|
+
/* @__PURE__ */ jsx21(
|
|
809
981
|
"input",
|
|
810
982
|
{
|
|
811
983
|
type: "datetime-local",
|
|
@@ -823,16 +995,16 @@ var DateTimeInput = (props) => {
|
|
|
823
995
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
824
996
|
}
|
|
825
997
|
),
|
|
826
|
-
/* @__PURE__ */
|
|
998
|
+
/* @__PURE__ */ jsx21("span", { children: timeZoneAbbr })
|
|
827
999
|
] }),
|
|
828
|
-
/* @__PURE__ */
|
|
1000
|
+
/* @__PURE__ */ jsx21("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
829
1001
|
] }) });
|
|
830
1002
|
};
|
|
831
1003
|
var DateTimeInput_default = DateTimeInput;
|
|
832
1004
|
|
|
833
1005
|
// src/components/controls/edit/ColorInput.tsx
|
|
834
1006
|
import React20, { useEffect as useEffect2 } from "react";
|
|
835
|
-
import { jsx as
|
|
1007
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
836
1008
|
var ColorInput = (props) => {
|
|
837
1009
|
const [color, setColor] = React20.useState("#3b82f6");
|
|
838
1010
|
useEffect2(() => {
|
|
@@ -855,10 +1027,10 @@ var ColorInput = (props) => {
|
|
|
855
1027
|
}
|
|
856
1028
|
};
|
|
857
1029
|
return /* @__PURE__ */ jsxs15("label", { className: "block mb-1", children: [
|
|
858
|
-
/* @__PURE__ */
|
|
1030
|
+
/* @__PURE__ */ jsx22("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
859
1031
|
" ",
|
|
860
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
861
|
-
/* @__PURE__ */
|
|
1032
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx22("span", { className: "bg-error-weak", children: "*" }),
|
|
1033
|
+
/* @__PURE__ */ jsx22(
|
|
862
1034
|
"input",
|
|
863
1035
|
{
|
|
864
1036
|
type: "color",
|
|
@@ -871,14 +1043,14 @@ var ColorInput = (props) => {
|
|
|
871
1043
|
className: `w-[78px] h-12 block cursor-pointer`
|
|
872
1044
|
}
|
|
873
1045
|
),
|
|
874
|
-
props?.attributes?.errorMessage && /* @__PURE__ */
|
|
1046
|
+
props?.attributes?.errorMessage && /* @__PURE__ */ jsx22("p", { className: "mt-1 bg-error-weak text-sm", children: props.attributes.errorMessage })
|
|
875
1047
|
] });
|
|
876
1048
|
};
|
|
877
1049
|
var ColorInput_default = ColorInput;
|
|
878
1050
|
|
|
879
1051
|
// src/components/controls/edit/SelectWithSearchInput.tsx
|
|
880
1052
|
import { useEffect as useEffect3, useRef, useState as useState2 } from "react";
|
|
881
|
-
import { jsx as
|
|
1053
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
882
1054
|
var SelectWithSearchInput = (props) => {
|
|
883
1055
|
const [isOpen, setIsOpen] = useState2(false);
|
|
884
1056
|
const [searchTerm, setSearchTerm] = useState2("");
|
|
@@ -954,10 +1126,10 @@ var SelectWithSearchInput = (props) => {
|
|
|
954
1126
|
props.attributes?.label,
|
|
955
1127
|
" ",
|
|
956
1128
|
" ",
|
|
957
|
-
props?.attributes?.required && /* @__PURE__ */
|
|
1129
|
+
props?.attributes?.required && /* @__PURE__ */ jsx23("span", { className: "bg-error-weak", children: "*" })
|
|
958
1130
|
] }),
|
|
959
1131
|
/* @__PURE__ */ jsxs16("div", { className: "relative", children: [
|
|
960
|
-
/* @__PURE__ */
|
|
1132
|
+
/* @__PURE__ */ jsx23(
|
|
961
1133
|
"input",
|
|
962
1134
|
{
|
|
963
1135
|
type: "text",
|
|
@@ -973,13 +1145,13 @@ var SelectWithSearchInput = (props) => {
|
|
|
973
1145
|
className: "peer py-1.5 select block w-full text-black rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
974
1146
|
}
|
|
975
1147
|
),
|
|
976
|
-
/* @__PURE__ */
|
|
1148
|
+
/* @__PURE__ */ jsx23(
|
|
977
1149
|
"button",
|
|
978
1150
|
{
|
|
979
1151
|
type: "button",
|
|
980
1152
|
onClick: () => setIsOpen(!isOpen),
|
|
981
1153
|
className: "absolute right-2 top-3 h-5 w-5 text-gray-500 focus:outline-none",
|
|
982
|
-
children: /* @__PURE__ */
|
|
1154
|
+
children: /* @__PURE__ */ jsx23(
|
|
983
1155
|
"svg",
|
|
984
1156
|
{
|
|
985
1157
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -988,7 +1160,7 @@ var SelectWithSearchInput = (props) => {
|
|
|
988
1160
|
strokeWidth: 1.5,
|
|
989
1161
|
stroke: "currentColor",
|
|
990
1162
|
className: "w-full h-full",
|
|
991
|
-
children: /* @__PURE__ */
|
|
1163
|
+
children: /* @__PURE__ */ jsx23(
|
|
992
1164
|
"path",
|
|
993
1165
|
{
|
|
994
1166
|
strokeLinecap: "round",
|
|
@@ -1001,12 +1173,12 @@ var SelectWithSearchInput = (props) => {
|
|
|
1001
1173
|
}
|
|
1002
1174
|
)
|
|
1003
1175
|
] }),
|
|
1004
|
-
isOpen && /* @__PURE__ */
|
|
1176
|
+
isOpen && /* @__PURE__ */ jsx23(
|
|
1005
1177
|
"div",
|
|
1006
1178
|
{
|
|
1007
1179
|
ref: dropdownRef,
|
|
1008
1180
|
className: "absolute z-10 mt-2 w-full bg-white border border-gray-200 rounded-md shadow-lg max-h-48 overflow-y-auto",
|
|
1009
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */
|
|
1181
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ jsx23(
|
|
1010
1182
|
"button",
|
|
1011
1183
|
{
|
|
1012
1184
|
onClick: (e) => handleSelect(e, item),
|
|
@@ -1014,10 +1186,10 @@ var SelectWithSearchInput = (props) => {
|
|
|
1014
1186
|
role: "option",
|
|
1015
1187
|
tabIndex: -1,
|
|
1016
1188
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1017
|
-
children: /* @__PURE__ */
|
|
1189
|
+
children: /* @__PURE__ */ jsx23("span", { children: item[props.dataTextFieldName] })
|
|
1018
1190
|
},
|
|
1019
1191
|
item[props.dataKeyFieldName]
|
|
1020
|
-
)) : /* @__PURE__ */
|
|
1192
|
+
)) : /* @__PURE__ */ jsx23("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1021
1193
|
}
|
|
1022
1194
|
)
|
|
1023
1195
|
] });
|
|
@@ -1031,7 +1203,7 @@ import React22, {
|
|
|
1031
1203
|
useState as useState3,
|
|
1032
1204
|
useCallback
|
|
1033
1205
|
} from "react";
|
|
1034
|
-
import { jsx as
|
|
1206
|
+
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1035
1207
|
var SelectWithSearchPanel = (props) => {
|
|
1036
1208
|
const [isOpen, setIsOpen] = useState3(false);
|
|
1037
1209
|
const [searchTerm, setSearchTerm] = useState3("");
|
|
@@ -1172,9 +1344,9 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1172
1344
|
props.attributes?.label,
|
|
1173
1345
|
" ",
|
|
1174
1346
|
" ",
|
|
1175
|
-
props?.attributes?.required && /* @__PURE__ */
|
|
1347
|
+
props?.attributes?.required && /* @__PURE__ */ jsx24("span", { className: "bg-error-weak", children: "*" })
|
|
1176
1348
|
] }),
|
|
1177
|
-
/* @__PURE__ */
|
|
1349
|
+
/* @__PURE__ */ jsx24("div", { children: /* @__PURE__ */ jsx24(
|
|
1178
1350
|
"input",
|
|
1179
1351
|
{
|
|
1180
1352
|
type: "text",
|
|
@@ -1188,14 +1360,14 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1188
1360
|
disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none`
|
|
1189
1361
|
}
|
|
1190
1362
|
) }),
|
|
1191
|
-
/* @__PURE__ */
|
|
1363
|
+
/* @__PURE__ */ jsx24("div", { ref: containerRef, children: isOpen && /* @__PURE__ */ jsxs17(React22.Fragment, { children: [
|
|
1192
1364
|
/* @__PURE__ */ jsxs17("div", { className: "fixed z-50 right-0 bg-white top-[62px] w-1/4 border-l border-gray-200", children: [
|
|
1193
|
-
/* @__PURE__ */
|
|
1365
|
+
/* @__PURE__ */ jsx24("div", { className: "flex flex-col p-2 bg-accent-950 text-white", children: /* @__PURE__ */ jsxs17("h5", { className: "text-md text-white font-medium", children: [
|
|
1194
1366
|
"Select a",
|
|
1195
1367
|
" ",
|
|
1196
1368
|
props.attributes?.label || props.attributes?.heading
|
|
1197
1369
|
] }) }),
|
|
1198
|
-
/* @__PURE__ */
|
|
1370
|
+
/* @__PURE__ */ jsx24("div", { className: "flex justify-end px-4 border-b py-2 border-gray-200 h-10", children: props.createFields && props.createFields.length > 0 && /* @__PURE__ */ jsx24(
|
|
1199
1371
|
"button",
|
|
1200
1372
|
{
|
|
1201
1373
|
type: "button",
|
|
@@ -1209,11 +1381,11 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1209
1381
|
) })
|
|
1210
1382
|
] }),
|
|
1211
1383
|
isCreateOpen && /* @__PURE__ */ jsxs17("div", { className: "fixed right-0 w-1/4 h-full top-[62px] bg-white shadow-lg border-l border-gray-200 z-50", children: [
|
|
1212
|
-
/* @__PURE__ */
|
|
1384
|
+
/* @__PURE__ */ jsx24("div", { className: "flex flex-col p-2 bg-accent-950", children: /* @__PURE__ */ jsxs17("h5", { className: "text-md font-medium text-white", children: [
|
|
1213
1385
|
"Create New ",
|
|
1214
1386
|
props.attributes?.label
|
|
1215
1387
|
] }) }),
|
|
1216
|
-
/* @__PURE__ */
|
|
1388
|
+
/* @__PURE__ */ jsx24("div", { className: "flex justify-end px-4 border-b py-2 border-gray-200", children: /* @__PURE__ */ jsx24(
|
|
1217
1389
|
"button",
|
|
1218
1390
|
{
|
|
1219
1391
|
type: "button",
|
|
@@ -1224,8 +1396,8 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1224
1396
|
) }),
|
|
1225
1397
|
/* @__PURE__ */ jsxs17("div", { className: "p-4", children: [
|
|
1226
1398
|
props.createFields?.map((field) => /* @__PURE__ */ jsxs17("div", { className: "mb-4", children: [
|
|
1227
|
-
/* @__PURE__ */
|
|
1228
|
-
/* @__PURE__ */
|
|
1399
|
+
/* @__PURE__ */ jsx24("label", { className: "text-sm mb-1 font-medium block", children: field.label }),
|
|
1400
|
+
/* @__PURE__ */ jsx24(
|
|
1229
1401
|
"input",
|
|
1230
1402
|
{
|
|
1231
1403
|
type: field.type,
|
|
@@ -1250,13 +1422,13 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1250
1422
|
] })
|
|
1251
1423
|
] })
|
|
1252
1424
|
] }),
|
|
1253
|
-
/* @__PURE__ */
|
|
1425
|
+
/* @__PURE__ */ jsx24(
|
|
1254
1426
|
"div",
|
|
1255
1427
|
{
|
|
1256
1428
|
ref: listRef,
|
|
1257
1429
|
className: "fixed z-10 right-0 mt-[130px] top-0 w-1/4 bg-white border-l border-gray-200 shadow-lg overflow-y-auto",
|
|
1258
1430
|
style: { height: "calc(100vh - 130px)" },
|
|
1259
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */
|
|
1431
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ jsx24("div", { children: /* @__PURE__ */ jsx24(
|
|
1260
1432
|
"button",
|
|
1261
1433
|
{
|
|
1262
1434
|
onClick: (e) => {
|
|
@@ -1266,9 +1438,9 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1266
1438
|
role: "option",
|
|
1267
1439
|
tabIndex: -1,
|
|
1268
1440
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1269
|
-
children: /* @__PURE__ */
|
|
1441
|
+
children: /* @__PURE__ */ jsx24("span", { children: getNestedValue3(item, props.dataTextFieldName) })
|
|
1270
1442
|
}
|
|
1271
|
-
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */
|
|
1443
|
+
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ jsx24("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1272
1444
|
}
|
|
1273
1445
|
)
|
|
1274
1446
|
] }) })
|
|
@@ -1281,7 +1453,7 @@ import React23, {
|
|
|
1281
1453
|
useState as useState4,
|
|
1282
1454
|
useEffect as useEffect5
|
|
1283
1455
|
} from "react";
|
|
1284
|
-
import { jsx as
|
|
1456
|
+
import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1285
1457
|
var BooleanSelect = (props) => {
|
|
1286
1458
|
const [list, setList] = useState4();
|
|
1287
1459
|
const textChangeHandler = (event) => {
|
|
@@ -1330,10 +1502,10 @@ var BooleanSelect = (props) => {
|
|
|
1330
1502
|
if (props.value !== void 0 && props.value !== null) {
|
|
1331
1503
|
value = props.value;
|
|
1332
1504
|
}
|
|
1333
|
-
return /* @__PURE__ */
|
|
1334
|
-
/* @__PURE__ */
|
|
1505
|
+
return /* @__PURE__ */ jsx25(React23.Fragment, { children: /* @__PURE__ */ jsxs18("label", { className: "block", children: [
|
|
1506
|
+
/* @__PURE__ */ jsx25("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1335
1507
|
" ",
|
|
1336
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1508
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx25("span", { className: "bg-error-weak", children: "*" }),
|
|
1337
1509
|
/* @__PURE__ */ jsxs18(
|
|
1338
1510
|
"select",
|
|
1339
1511
|
{
|
|
@@ -1346,9 +1518,9 @@ var BooleanSelect = (props) => {
|
|
|
1346
1518
|
disabled: props?.attributes?.readOnly,
|
|
1347
1519
|
className: "peer mt-1 py-1.5 block w-full text-black rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n ",
|
|
1348
1520
|
children: [
|
|
1349
|
-
/* @__PURE__ */
|
|
1521
|
+
/* @__PURE__ */ jsx25("option", { className: "", value: "", children: props.attributes?.placeholder || "Select" }),
|
|
1350
1522
|
list && list.map((item, i) => {
|
|
1351
|
-
return /* @__PURE__ */
|
|
1523
|
+
return /* @__PURE__ */ jsx25(
|
|
1352
1524
|
"option",
|
|
1353
1525
|
{
|
|
1354
1526
|
className: "fac-select-option",
|
|
@@ -1361,14 +1533,14 @@ var BooleanSelect = (props) => {
|
|
|
1361
1533
|
]
|
|
1362
1534
|
}
|
|
1363
1535
|
),
|
|
1364
|
-
/* @__PURE__ */
|
|
1536
|
+
/* @__PURE__ */ jsx25("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1365
1537
|
] }) });
|
|
1366
1538
|
};
|
|
1367
1539
|
var BooleanSelect_default = BooleanSelect;
|
|
1368
1540
|
|
|
1369
1541
|
// src/components/controls/edit/EmailInput.tsx
|
|
1370
1542
|
import React24 from "react";
|
|
1371
|
-
import { jsx as
|
|
1543
|
+
import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1372
1544
|
var EmailInput = (props) => {
|
|
1373
1545
|
const textChangeHandler = (event) => {
|
|
1374
1546
|
const text = event.target.value;
|
|
@@ -1393,11 +1565,11 @@ var EmailInput = (props) => {
|
|
|
1393
1565
|
if (props.value !== void 0 && props.value !== null) {
|
|
1394
1566
|
value = props.value;
|
|
1395
1567
|
}
|
|
1396
|
-
return /* @__PURE__ */
|
|
1397
|
-
/* @__PURE__ */
|
|
1568
|
+
return /* @__PURE__ */ jsx26(React24.Fragment, { children: /* @__PURE__ */ jsxs19("label", { className: "block mb-1", children: [
|
|
1569
|
+
/* @__PURE__ */ jsx26("span", { className: "text-sm font-medium text-slate-700", children: props?.attributes?.label }),
|
|
1398
1570
|
" ",
|
|
1399
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1400
|
-
/* @__PURE__ */
|
|
1571
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx26("span", { className: "bg-error-weak", children: "*" }),
|
|
1572
|
+
/* @__PURE__ */ jsx26(
|
|
1401
1573
|
"input",
|
|
1402
1574
|
{
|
|
1403
1575
|
type: "email",
|
|
@@ -1413,14 +1585,14 @@ var EmailInput = (props) => {
|
|
|
1413
1585
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n transition-all duration-500 ease-in-out"
|
|
1414
1586
|
}
|
|
1415
1587
|
),
|
|
1416
|
-
/* @__PURE__ */
|
|
1588
|
+
/* @__PURE__ */ jsx26("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 mb-0 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1417
1589
|
] }) });
|
|
1418
1590
|
};
|
|
1419
1591
|
var EmailInput_default = EmailInput;
|
|
1420
1592
|
|
|
1421
1593
|
// src/components/controls/edit/TimeInput.tsx
|
|
1422
1594
|
import React25 from "react";
|
|
1423
|
-
import { jsx as
|
|
1595
|
+
import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1424
1596
|
var TimeInput = (props) => {
|
|
1425
1597
|
const timeChangeHandler = (event) => {
|
|
1426
1598
|
const timeValue = event.target.value;
|
|
@@ -1433,11 +1605,11 @@ var TimeInput = (props) => {
|
|
|
1433
1605
|
});
|
|
1434
1606
|
}
|
|
1435
1607
|
};
|
|
1436
|
-
return /* @__PURE__ */
|
|
1437
|
-
/* @__PURE__ */
|
|
1608
|
+
return /* @__PURE__ */ jsx27(React25.Fragment, { children: /* @__PURE__ */ jsxs20("label", { className: "block mb-1", children: [
|
|
1609
|
+
/* @__PURE__ */ jsx27("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
1438
1610
|
" ",
|
|
1439
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1440
|
-
/* @__PURE__ */
|
|
1611
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx27("span", { className: "bg-error-weak", children: "*" }),
|
|
1612
|
+
/* @__PURE__ */ jsx27("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx27(
|
|
1441
1613
|
"input",
|
|
1442
1614
|
{
|
|
1443
1615
|
type: "time",
|
|
@@ -1450,7 +1622,7 @@ var TimeInput = (props) => {
|
|
|
1450
1622
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none"
|
|
1451
1623
|
}
|
|
1452
1624
|
) }),
|
|
1453
|
-
/* @__PURE__ */
|
|
1625
|
+
/* @__PURE__ */ jsx27("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ?? "" })
|
|
1454
1626
|
] }) });
|
|
1455
1627
|
};
|
|
1456
1628
|
var TimeInput_default = TimeInput;
|
|
@@ -1458,30 +1630,9 @@ var TimeInput_default = TimeInput;
|
|
|
1458
1630
|
// src/components/controls/edit/AssetUpload.tsx
|
|
1459
1631
|
import React26, { useEffect as useEffect6 } from "react";
|
|
1460
1632
|
|
|
1461
|
-
// src/components/utilities/AssetUtility.tsx
|
|
1462
|
-
var AssetUtility = class {
|
|
1463
|
-
constructor() {
|
|
1464
|
-
}
|
|
1465
|
-
static resolveUrl(assetBaseUrl, url) {
|
|
1466
|
-
if (!url) return void 0;
|
|
1467
|
-
if (url.startsWith("http")) return url;
|
|
1468
|
-
if (!assetBaseUrl) return url;
|
|
1469
|
-
return `${assetBaseUrl}/${url}`;
|
|
1470
|
-
}
|
|
1471
|
-
// static getAssetUrl(apiBaseUrl: string) {
|
|
1472
|
-
// let domainName = apiBaseUrl.replace("https://", "");
|
|
1473
|
-
// return `https://cdn.g-assets.com/${domainName}`;
|
|
1474
|
-
// }
|
|
1475
|
-
static getAssetFullPath(apiBaseUrl, relativePath) {
|
|
1476
|
-
const domainName = apiBaseUrl.replace("https://", "");
|
|
1477
|
-
return `https://cdn.g-assets.com/${domainName}/${relativePath}`;
|
|
1478
|
-
}
|
|
1479
|
-
};
|
|
1480
|
-
var AssetUtility_default = AssetUtility;
|
|
1481
|
-
|
|
1482
1633
|
// src/components/dataForm/Hyperlink.tsx
|
|
1483
1634
|
import Link from "next/link";
|
|
1484
|
-
import { Fragment, jsx as
|
|
1635
|
+
import { Fragment, jsx as jsx28 } from "react/jsx-runtime";
|
|
1485
1636
|
function Hyperlink(props) {
|
|
1486
1637
|
let linkClass = props.linkType ? buttonClasses.get(props.linkType) : buttonClasses.get("Link" /* Link */);
|
|
1487
1638
|
const target = props?.href?.startsWith("http") ? "_blank" : "_self";
|
|
@@ -1489,7 +1640,7 @@ function Hyperlink(props) {
|
|
|
1489
1640
|
if (target == "_blank") {
|
|
1490
1641
|
additionalProps.rel = "noopener noreferrer";
|
|
1491
1642
|
}
|
|
1492
|
-
return /* @__PURE__ */
|
|
1643
|
+
return /* @__PURE__ */ jsx28(Fragment, { children: props.href ? /* @__PURE__ */ jsx28(
|
|
1493
1644
|
Link,
|
|
1494
1645
|
{
|
|
1495
1646
|
href: props.href,
|
|
@@ -1499,34 +1650,34 @@ function Hyperlink(props) {
|
|
|
1499
1650
|
target,
|
|
1500
1651
|
children: props.children
|
|
1501
1652
|
}
|
|
1502
|
-
) : props.isHeading ? /* @__PURE__ */
|
|
1653
|
+
) : props.isHeading ? /* @__PURE__ */ jsx28("h5", { className: props.className + "inline-block", children: props.children }) : /* @__PURE__ */ jsx28("span", { className: props.className, children: props.children }) });
|
|
1503
1654
|
}
|
|
1504
1655
|
|
|
1505
1656
|
// src/svg/chevron-updown.tsx
|
|
1506
|
-
import { jsx as
|
|
1657
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1507
1658
|
var ChevronUpDown = (props) => {
|
|
1508
|
-
return /* @__PURE__ */
|
|
1659
|
+
return /* @__PURE__ */ jsx29("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx29("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" }) });
|
|
1509
1660
|
};
|
|
1510
1661
|
var chevron_updown_default = ChevronUpDown;
|
|
1511
1662
|
|
|
1512
1663
|
// src/svg/chevron-down.tsx
|
|
1513
|
-
import { jsx as
|
|
1664
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1514
1665
|
var ChevronDown = (props) => {
|
|
1515
|
-
return /* @__PURE__ */
|
|
1666
|
+
return /* @__PURE__ */ jsx30("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx30("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) });
|
|
1516
1667
|
};
|
|
1517
1668
|
var chevron_down_default = ChevronDown;
|
|
1518
1669
|
|
|
1519
1670
|
// src/svg/chevron-up.tsx
|
|
1520
|
-
import { jsx as
|
|
1671
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1521
1672
|
var ChevronUp = (props) => {
|
|
1522
|
-
return /* @__PURE__ */
|
|
1673
|
+
return /* @__PURE__ */ jsx31("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx31("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 15.75l7.5-7.5 7.5 7.5" }) });
|
|
1523
1674
|
};
|
|
1524
1675
|
var chevron_up_default = ChevronUp;
|
|
1525
1676
|
|
|
1526
1677
|
// src/svg/plus.tsx
|
|
1527
|
-
import { jsx as
|
|
1678
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1528
1679
|
var Plus = (props) => {
|
|
1529
|
-
return /* @__PURE__ */
|
|
1680
|
+
return /* @__PURE__ */ jsx32("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: props.className, children: /* @__PURE__ */ jsx32("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) });
|
|
1530
1681
|
};
|
|
1531
1682
|
var plus_default = Plus;
|
|
1532
1683
|
|
|
@@ -1540,19 +1691,19 @@ var Icons = {
|
|
|
1540
1691
|
var Icons_default = Icons;
|
|
1541
1692
|
|
|
1542
1693
|
// src/svg/Icon.tsx
|
|
1543
|
-
import { jsx as
|
|
1694
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1544
1695
|
var Icon = ({ name, className, ...props }) => {
|
|
1545
1696
|
const IconComponent = Icons_default[name];
|
|
1546
1697
|
if (!IconComponent) {
|
|
1547
1698
|
console.error(`Icon "${name}" not found.`);
|
|
1548
1699
|
return null;
|
|
1549
1700
|
}
|
|
1550
|
-
return /* @__PURE__ */
|
|
1701
|
+
return /* @__PURE__ */ jsx33(IconComponent, { ...props, className });
|
|
1551
1702
|
};
|
|
1552
1703
|
var Icon_default = Icon;
|
|
1553
1704
|
|
|
1554
1705
|
// src/components/controls/edit/AssetUpload.tsx
|
|
1555
|
-
import { jsx as
|
|
1706
|
+
import { jsx as jsx34, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1556
1707
|
var AssetUpload = (props) => {
|
|
1557
1708
|
const isDisabled = props.attributes?.disable ?? false;
|
|
1558
1709
|
let allValues = [];
|
|
@@ -1650,9 +1801,9 @@ var AssetUpload = (props) => {
|
|
|
1650
1801
|
return false;
|
|
1651
1802
|
};
|
|
1652
1803
|
return /* @__PURE__ */ jsxs21(React26.Fragment, { children: [
|
|
1653
|
-
/* @__PURE__ */
|
|
1804
|
+
/* @__PURE__ */ jsx34("label", { className: "block mb-1", children: /* @__PURE__ */ jsx34("span", { className: "text-sm font-medium", children: props?.attributes?.label }) }),
|
|
1654
1805
|
/* @__PURE__ */ jsxs21("div", { className: "flex gap-6 bg-neutral-100 rounded p-2", children: [
|
|
1655
|
-
/* @__PURE__ */
|
|
1806
|
+
/* @__PURE__ */ jsx34(
|
|
1656
1807
|
ClientButton_default,
|
|
1657
1808
|
{
|
|
1658
1809
|
className: assetType === "image" ? "px-2 py-1 rounded bg-body-200 scale-95" : "text-neutral-700",
|
|
@@ -1662,7 +1813,7 @@ var AssetUpload = (props) => {
|
|
|
1662
1813
|
children: "Image Upload"
|
|
1663
1814
|
}
|
|
1664
1815
|
),
|
|
1665
|
-
/* @__PURE__ */
|
|
1816
|
+
/* @__PURE__ */ jsx34(
|
|
1666
1817
|
ClientButton_default,
|
|
1667
1818
|
{
|
|
1668
1819
|
className: assetType === "video" ? "bg-body-200 px-2 py-1 rounded-md scale-95" : "text-neutral-700",
|
|
@@ -1674,12 +1825,12 @@ var AssetUpload = (props) => {
|
|
|
1674
1825
|
)
|
|
1675
1826
|
] }),
|
|
1676
1827
|
shouldShowDetails() && /* @__PURE__ */ jsxs21("div", { className: "relative mt-4 rounded-md p-4 border-2 border-dotted border-gray-300 bg-gray-50", children: [
|
|
1677
|
-
/* @__PURE__ */
|
|
1678
|
-
/* @__PURE__ */
|
|
1828
|
+
/* @__PURE__ */ jsx34("span", { className: "absolute -top-2.5 left-3 bg-primary-600 text-white text-xs px-2 py-0.5 rounded-full", children: getAssetType(allValues[0]) === "video" ? "Video" : "Image" }),
|
|
1829
|
+
/* @__PURE__ */ jsx34("div", { className: "flex flex-col gap-3", children: allValues.map((digitalAsset, index) => /* @__PURE__ */ jsxs21("div", { className: "flex justify-between items-start gap-5", children: [
|
|
1679
1830
|
/* @__PURE__ */ jsxs21("div", { className: "grid grid-cols-2 gap-x-8 gap-y-3 text-sm w-full", children: [
|
|
1680
1831
|
/* @__PURE__ */ jsxs21("div", { children: [
|
|
1681
|
-
/* @__PURE__ */
|
|
1682
|
-
/* @__PURE__ */
|
|
1832
|
+
/* @__PURE__ */ jsx34("p", { className: "text-gray-500", children: "Title" }),
|
|
1833
|
+
/* @__PURE__ */ jsx34(
|
|
1683
1834
|
"input",
|
|
1684
1835
|
{
|
|
1685
1836
|
type: "text",
|
|
@@ -1692,7 +1843,7 @@ var AssetUpload = (props) => {
|
|
|
1692
1843
|
)
|
|
1693
1844
|
] }),
|
|
1694
1845
|
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ jsxs21("div", { children: [
|
|
1695
|
-
/* @__PURE__ */
|
|
1846
|
+
/* @__PURE__ */ jsx34("p", { className: "text-gray-500", children: "Resolution" }),
|
|
1696
1847
|
/* @__PURE__ */ jsxs21("p", { className: "font-medium text-gray-900 mt-3", children: [
|
|
1697
1848
|
digitalAsset.intrinsicWidth,
|
|
1698
1849
|
"\xD7",
|
|
@@ -1700,9 +1851,9 @@ var AssetUpload = (props) => {
|
|
|
1700
1851
|
] })
|
|
1701
1852
|
] }),
|
|
1702
1853
|
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ jsxs21("div", { children: [
|
|
1703
|
-
/* @__PURE__ */
|
|
1854
|
+
/* @__PURE__ */ jsx34("p", { className: "text-gray-500", children: "Image / Poster" }),
|
|
1704
1855
|
/* @__PURE__ */ jsxs21("div", { className: "flex-shrink-0 flex flex-col gap-3 mt-1", children: [
|
|
1705
|
-
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */
|
|
1856
|
+
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ jsx34(
|
|
1706
1857
|
"img",
|
|
1707
1858
|
{
|
|
1708
1859
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.posterUrl),
|
|
@@ -1710,7 +1861,7 @@ var AssetUpload = (props) => {
|
|
|
1710
1861
|
className: "w-32 h-auto object-cover rounded border p-1"
|
|
1711
1862
|
}
|
|
1712
1863
|
),
|
|
1713
|
-
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */
|
|
1864
|
+
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ jsx34(
|
|
1714
1865
|
"img",
|
|
1715
1866
|
{
|
|
1716
1867
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.assetUrl),
|
|
@@ -1721,8 +1872,8 @@ var AssetUpload = (props) => {
|
|
|
1721
1872
|
] })
|
|
1722
1873
|
] }),
|
|
1723
1874
|
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ jsxs21("div", { className: "col-span-2", children: [
|
|
1724
|
-
/* @__PURE__ */
|
|
1725
|
-
/* @__PURE__ */
|
|
1875
|
+
/* @__PURE__ */ jsx34("p", { className: "text-gray-500", children: "HLS Link" }),
|
|
1876
|
+
/* @__PURE__ */ jsx34(
|
|
1726
1877
|
Hyperlink,
|
|
1727
1878
|
{
|
|
1728
1879
|
href: digitalAsset.assetUrl,
|
|
@@ -1733,12 +1884,12 @@ var AssetUpload = (props) => {
|
|
|
1733
1884
|
)
|
|
1734
1885
|
] })
|
|
1735
1886
|
] }),
|
|
1736
|
-
/* @__PURE__ */
|
|
1887
|
+
/* @__PURE__ */ jsx34(
|
|
1737
1888
|
"span",
|
|
1738
1889
|
{
|
|
1739
1890
|
onClick: () => !isDisabled && deleteFile(index),
|
|
1740
1891
|
className: isDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
1741
|
-
children: /* @__PURE__ */
|
|
1892
|
+
children: /* @__PURE__ */ jsx34(Icon_default, { className: "w-4 h-4 text-primary", name: "delete" })
|
|
1742
1893
|
}
|
|
1743
1894
|
)
|
|
1744
1895
|
] }, index)) })
|
|
@@ -1748,7 +1899,7 @@ var AssetUpload = (props) => {
|
|
|
1748
1899
|
var AssetUpload_default = AssetUpload;
|
|
1749
1900
|
|
|
1750
1901
|
// src/components/controls/edit/InputControl.tsx
|
|
1751
|
-
import { jsx as
|
|
1902
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
1752
1903
|
var InputControl = React27.forwardRef(
|
|
1753
1904
|
(props, ref) => {
|
|
1754
1905
|
const ControlComponents = {
|
|
@@ -1771,7 +1922,7 @@ var InputControl = React27.forwardRef(
|
|
|
1771
1922
|
[InputControlType_default.asset]: AssetUpload_default
|
|
1772
1923
|
};
|
|
1773
1924
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
1774
|
-
return /* @__PURE__ */
|
|
1925
|
+
return /* @__PURE__ */ jsx35(React27.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx35(SelectedControlComponent, { ...props }) : "Control not found" });
|
|
1775
1926
|
}
|
|
1776
1927
|
);
|
|
1777
1928
|
InputControl.displayName = "InputControl";
|
|
@@ -1784,7 +1935,7 @@ import React41 from "react";
|
|
|
1784
1935
|
import React30 from "react";
|
|
1785
1936
|
|
|
1786
1937
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
1787
|
-
import { jsx as
|
|
1938
|
+
import { jsx as jsx36, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1788
1939
|
var TextNode = (props) => {
|
|
1789
1940
|
function cssStringToJson(cssString) {
|
|
1790
1941
|
const styleObject = {};
|
|
@@ -1841,24 +1992,24 @@ var TextNode = (props) => {
|
|
|
1841
1992
|
function renderWithLineBreaks(text) {
|
|
1842
1993
|
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ jsxs22("span", { children: [
|
|
1843
1994
|
line,
|
|
1844
|
-
index < arr.length - 1 && /* @__PURE__ */
|
|
1995
|
+
index < arr.length - 1 && /* @__PURE__ */ jsx36("br", {})
|
|
1845
1996
|
] }, index));
|
|
1846
1997
|
}
|
|
1847
1998
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
1848
1999
|
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
1849
2000
|
const content = typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText;
|
|
1850
|
-
const formattedContent = props.node.format & 64 ? /* @__PURE__ */
|
|
2001
|
+
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ jsx36("sup", { children: content }) : props.node.format & 32 ? /* @__PURE__ */ jsx36("sub", { children: content }) : content;
|
|
1851
2002
|
return (
|
|
1852
2003
|
// @ts-expect-error custom code
|
|
1853
|
-
/* @__PURE__ */
|
|
2004
|
+
/* @__PURE__ */ jsx36("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: formattedContent })
|
|
1854
2005
|
);
|
|
1855
2006
|
};
|
|
1856
2007
|
var TextNode_default = TextNode;
|
|
1857
2008
|
|
|
1858
2009
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
1859
|
-
import { jsx as
|
|
2010
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1860
2011
|
var LineBreakNode = () => {
|
|
1861
|
-
return /* @__PURE__ */
|
|
2012
|
+
return /* @__PURE__ */ jsx37("div", { className: "py-0.5 lg:py-1.5" });
|
|
1862
2013
|
};
|
|
1863
2014
|
var LineBreakNode_default = LineBreakNode;
|
|
1864
2015
|
|
|
@@ -1868,127 +2019,7 @@ import React29 from "react";
|
|
|
1868
2019
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
1869
2020
|
import React28 from "react";
|
|
1870
2021
|
import dynamic3 from "next/dynamic";
|
|
1871
|
-
|
|
1872
|
-
// src/components/DeviceAssetSelector.tsx
|
|
1873
|
-
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1874
|
-
var DeviceAssetSelector = ({
|
|
1875
|
-
assets,
|
|
1876
|
-
assetBaseUrl,
|
|
1877
|
-
session,
|
|
1878
|
-
// This should receive the session
|
|
1879
|
-
width,
|
|
1880
|
-
tag,
|
|
1881
|
-
customProps,
|
|
1882
|
-
nodeProps,
|
|
1883
|
-
device
|
|
1884
|
-
}) => {
|
|
1885
|
-
console.log("\u{1F511} Session in DeviceAssetSelector:", session);
|
|
1886
|
-
const targetTag = tag || nodeProps?.tag;
|
|
1887
|
-
const selectAssetByDevice = (assets2, currentDevice) => {
|
|
1888
|
-
if (!assets2 || assets2.length === 0) return void 0;
|
|
1889
|
-
const exactMatch = assets2.find((asset) => asset.device === currentDevice);
|
|
1890
|
-
if (exactMatch) return exactMatch;
|
|
1891
|
-
const noDeviceMatch = assets2.find((asset) => !asset.device || asset.device === "");
|
|
1892
|
-
if (noDeviceMatch) return noDeviceMatch;
|
|
1893
|
-
return void 0;
|
|
1894
|
-
};
|
|
1895
|
-
const selectAssetByTagAndDevice = (assets2, currentDevice, targetTag2) => {
|
|
1896
|
-
if (!assets2 || assets2.length === 0) return void 0;
|
|
1897
|
-
if (!targetTag2) return selectAssetByDevice(assets2, currentDevice);
|
|
1898
|
-
const taggedAssets = assets2.filter((asset) => asset.tag === targetTag2);
|
|
1899
|
-
if (taggedAssets.length === 0) {
|
|
1900
|
-
return selectAssetByDevice(assets2, currentDevice);
|
|
1901
|
-
}
|
|
1902
|
-
const exactTaggedMatch = taggedAssets.find((asset) => asset.device === currentDevice);
|
|
1903
|
-
if (exactTaggedMatch) return exactTaggedMatch;
|
|
1904
|
-
const noDeviceTaggedMatch = taggedAssets.find((asset) => !asset.device || asset.device === "");
|
|
1905
|
-
if (noDeviceTaggedMatch) return noDeviceTaggedMatch;
|
|
1906
|
-
return void 0;
|
|
1907
|
-
};
|
|
1908
|
-
const selectAsset = () => {
|
|
1909
|
-
if (!assets || assets.length === 0) return void 0;
|
|
1910
|
-
if (targetTag) {
|
|
1911
|
-
return selectAssetByTagAndDevice(assets, device, targetTag);
|
|
1912
|
-
}
|
|
1913
|
-
return selectAssetByDevice(assets, device);
|
|
1914
|
-
};
|
|
1915
|
-
const selectedAsset = selectAsset();
|
|
1916
|
-
if (!selectedAsset) {
|
|
1917
|
-
console.warn("No suitable asset found for device:", device, "and tag:", targetTag);
|
|
1918
|
-
return null;
|
|
1919
|
-
}
|
|
1920
|
-
const resolvedAssetUrl = AssetUtility_default.resolveUrl(assetBaseUrl, selectedAsset.assetUrl);
|
|
1921
|
-
const resolvedThumbnailUrl = selectedAsset.posterUrl ? AssetUtility_default.resolveUrl(assetBaseUrl, selectedAsset.posterUrl) : void 0;
|
|
1922
|
-
console.log("Selected Asset:", resolvedThumbnailUrl);
|
|
1923
|
-
const title = selectedAsset.title || nodeProps?.title;
|
|
1924
|
-
const intrinsicWidth = selectedAsset.intrinsicWidth?.toString();
|
|
1925
|
-
const intrinsicHeight = selectedAsset.intrinsicHeight?.toString();
|
|
1926
|
-
const isHls = resolvedAssetUrl?.endsWith(".m3u8");
|
|
1927
|
-
const showControls = customProps?.showControls ?? nodeProps?.showControls === "true";
|
|
1928
|
-
const loop = customProps?.loop ?? nodeProps?.loop === "true";
|
|
1929
|
-
const playOptions = customProps?.playOptions ?? nodeProps?.playOptions;
|
|
1930
|
-
const styles = {};
|
|
1931
|
-
if (nodeProps?.height) {
|
|
1932
|
-
styles.height = nodeProps.height;
|
|
1933
|
-
}
|
|
1934
|
-
if (nodeProps?.borderRadius) {
|
|
1935
|
-
styles.borderRadius = nodeProps.borderRadius;
|
|
1936
|
-
}
|
|
1937
|
-
if (nodeProps?.width) {
|
|
1938
|
-
styles.width = nodeProps.width;
|
|
1939
|
-
}
|
|
1940
|
-
const FormatClass = {
|
|
1941
|
-
"center": "justify-center",
|
|
1942
|
-
"left": "justify-start",
|
|
1943
|
-
"right": "justify-end"
|
|
1944
|
-
};
|
|
1945
|
-
const formatClasses = FormatClass[nodeProps?.format || ""] || "";
|
|
1946
|
-
const renderMedia = () => {
|
|
1947
|
-
if (isHls) {
|
|
1948
|
-
return /* @__PURE__ */ jsx36(
|
|
1949
|
-
HlsPlayer_default,
|
|
1950
|
-
{
|
|
1951
|
-
assetUrl: resolvedAssetUrl,
|
|
1952
|
-
posterUrl: resolvedThumbnailUrl,
|
|
1953
|
-
intrinsicWidth,
|
|
1954
|
-
intrinsicHeight,
|
|
1955
|
-
showControls,
|
|
1956
|
-
loop,
|
|
1957
|
-
playOptions,
|
|
1958
|
-
apiBaseUrl: assetBaseUrl,
|
|
1959
|
-
session
|
|
1960
|
-
}
|
|
1961
|
-
);
|
|
1962
|
-
} else {
|
|
1963
|
-
return (
|
|
1964
|
-
/* eslint-disable-next-line @next/next/no-img-element */
|
|
1965
|
-
/* @__PURE__ */ jsx36(
|
|
1966
|
-
"img",
|
|
1967
|
-
{
|
|
1968
|
-
style: styles,
|
|
1969
|
-
loading: "lazy",
|
|
1970
|
-
className: "object-cover w-full",
|
|
1971
|
-
src: resolvedAssetUrl,
|
|
1972
|
-
width: selectedAsset.intrinsicWidth,
|
|
1973
|
-
alt: title || "Asset image",
|
|
1974
|
-
height: selectedAsset.intrinsicHeight
|
|
1975
|
-
}
|
|
1976
|
-
)
|
|
1977
|
-
);
|
|
1978
|
-
}
|
|
1979
|
-
};
|
|
1980
|
-
if (width) {
|
|
1981
|
-
return /* @__PURE__ */ jsx36("div", { style: { width }, children: renderMedia() });
|
|
1982
|
-
}
|
|
1983
|
-
if (nodeProps?.format) {
|
|
1984
|
-
return /* @__PURE__ */ jsx36("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
1985
|
-
}
|
|
1986
|
-
return renderMedia();
|
|
1987
|
-
};
|
|
1988
|
-
var DeviceAssetSelector_default = DeviceAssetSelector;
|
|
1989
|
-
|
|
1990
|
-
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
1991
|
-
import { Fragment as Fragment2, jsx as jsx37 } from "react/jsx-runtime";
|
|
2022
|
+
import { Fragment as Fragment2, jsx as jsx38 } from "react/jsx-runtime";
|
|
1992
2023
|
var HlsPlayer = dynamic3(() => import("./HlsPlayer-GZR4QXJY.mjs"), {
|
|
1993
2024
|
ssr: false
|
|
1994
2025
|
});
|
|
@@ -2031,7 +2062,7 @@ var ImageNode = (props) => {
|
|
|
2031
2062
|
console.error("Error parsing assets in ImageNode:", error);
|
|
2032
2063
|
}
|
|
2033
2064
|
if (assets && assets.length > 0) {
|
|
2034
|
-
return /* @__PURE__ */
|
|
2065
|
+
return /* @__PURE__ */ jsx38(Fragment2, { children: /* @__PURE__ */ jsx38(
|
|
2035
2066
|
DeviceAssetSelector_default,
|
|
2036
2067
|
{
|
|
2037
2068
|
device: props.device,
|
|
@@ -2080,7 +2111,7 @@ var ImageNode = (props) => {
|
|
|
2080
2111
|
const isHls = imageUrl?.endsWith(".m3u8");
|
|
2081
2112
|
const renderMedia = () => {
|
|
2082
2113
|
if (isHls) {
|
|
2083
|
-
return /* @__PURE__ */
|
|
2114
|
+
return /* @__PURE__ */ jsx38(
|
|
2084
2115
|
HlsPlayer,
|
|
2085
2116
|
{
|
|
2086
2117
|
assetUrl: imageUrl,
|
|
@@ -2095,7 +2126,7 @@ var ImageNode = (props) => {
|
|
|
2095
2126
|
}
|
|
2096
2127
|
);
|
|
2097
2128
|
} else {
|
|
2098
|
-
return /* @__PURE__ */
|
|
2129
|
+
return /* @__PURE__ */ jsx38(React28.Fragment, { children: /* @__PURE__ */ jsx38(
|
|
2099
2130
|
"img",
|
|
2100
2131
|
{
|
|
2101
2132
|
style: styles,
|
|
@@ -2110,7 +2141,7 @@ var ImageNode = (props) => {
|
|
|
2110
2141
|
}
|
|
2111
2142
|
};
|
|
2112
2143
|
if (props.node.width) {
|
|
2113
|
-
return /* @__PURE__ */
|
|
2144
|
+
return /* @__PURE__ */ jsx38("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
2114
2145
|
}
|
|
2115
2146
|
return renderMedia();
|
|
2116
2147
|
};
|
|
@@ -2118,7 +2149,7 @@ var ImageNode_default = ImageNode;
|
|
|
2118
2149
|
|
|
2119
2150
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
2120
2151
|
import dynamic4 from "next/dynamic";
|
|
2121
|
-
import { Fragment as Fragment3, jsx as
|
|
2152
|
+
import { Fragment as Fragment3, jsx as jsx39, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2122
2153
|
var LinkNodeButton = dynamic4(() => import("./LinkNodeButton-WDDPNYWI.mjs"), {
|
|
2123
2154
|
ssr: false
|
|
2124
2155
|
});
|
|
@@ -2165,13 +2196,13 @@ var LinkNode = (props) => {
|
|
|
2165
2196
|
const isButton = node.isButton === true;
|
|
2166
2197
|
const renderChildren = () => {
|
|
2167
2198
|
if (!node.children || node.children.length === 0) return null;
|
|
2168
|
-
return /* @__PURE__ */
|
|
2199
|
+
return /* @__PURE__ */ jsx39(Fragment3, { children: node.children.map((childNode, index) => {
|
|
2169
2200
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
2170
2201
|
if (!SelectedNode) {
|
|
2171
2202
|
console.warn("Unknown node type:", childNode.type);
|
|
2172
2203
|
return null;
|
|
2173
2204
|
}
|
|
2174
|
-
return /* @__PURE__ */
|
|
2205
|
+
return /* @__PURE__ */ jsx39(React29.Fragment, { children: /* @__PURE__ */ jsx39(
|
|
2175
2206
|
SelectedNode,
|
|
2176
2207
|
{
|
|
2177
2208
|
node: childNode,
|
|
@@ -2184,10 +2215,10 @@ var LinkNode = (props) => {
|
|
|
2184
2215
|
};
|
|
2185
2216
|
const renderFallback = () => {
|
|
2186
2217
|
if ((!node.children || node.children.length === 0) && linkText) {
|
|
2187
|
-
return /* @__PURE__ */
|
|
2218
|
+
return /* @__PURE__ */ jsx39("span", { children: linkText });
|
|
2188
2219
|
}
|
|
2189
2220
|
if ((!node.children || node.children.length === 0) && !linkText) {
|
|
2190
|
-
return /* @__PURE__ */
|
|
2221
|
+
return /* @__PURE__ */ jsx39("br", {});
|
|
2191
2222
|
}
|
|
2192
2223
|
return null;
|
|
2193
2224
|
};
|
|
@@ -2226,10 +2257,10 @@ var LinkNode = (props) => {
|
|
|
2226
2257
|
var LinkNode_default = LinkNode;
|
|
2227
2258
|
|
|
2228
2259
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
2229
|
-
import { jsx as
|
|
2260
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
2230
2261
|
var SVGIconNode = ({ node }) => {
|
|
2231
2262
|
if (!node?.svgCode) return null;
|
|
2232
|
-
return /* @__PURE__ */
|
|
2263
|
+
return /* @__PURE__ */ jsx40(
|
|
2233
2264
|
"span",
|
|
2234
2265
|
{
|
|
2235
2266
|
style: {
|
|
@@ -2246,7 +2277,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
2246
2277
|
|
|
2247
2278
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
2248
2279
|
import katex from "katex";
|
|
2249
|
-
import { jsx as
|
|
2280
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
2250
2281
|
var EquationNode = ({ node }) => {
|
|
2251
2282
|
const { equation, inline } = node;
|
|
2252
2283
|
let html = "";
|
|
@@ -2261,7 +2292,7 @@ var EquationNode = ({ node }) => {
|
|
|
2261
2292
|
});
|
|
2262
2293
|
}
|
|
2263
2294
|
if (inline) {
|
|
2264
|
-
return /* @__PURE__ */
|
|
2295
|
+
return /* @__PURE__ */ jsx41(
|
|
2265
2296
|
"span",
|
|
2266
2297
|
{
|
|
2267
2298
|
className: "katex-inline",
|
|
@@ -2269,7 +2300,7 @@ var EquationNode = ({ node }) => {
|
|
|
2269
2300
|
}
|
|
2270
2301
|
);
|
|
2271
2302
|
}
|
|
2272
|
-
return /* @__PURE__ */
|
|
2303
|
+
return /* @__PURE__ */ jsx41(
|
|
2273
2304
|
"div",
|
|
2274
2305
|
{
|
|
2275
2306
|
className: "katex-block my-3 text-center",
|
|
@@ -2280,7 +2311,7 @@ var EquationNode = ({ node }) => {
|
|
|
2280
2311
|
var EquationNode_default = EquationNode;
|
|
2281
2312
|
|
|
2282
2313
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
2283
|
-
import { jsx as
|
|
2314
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
2284
2315
|
function getNestedProperty(obj, path) {
|
|
2285
2316
|
if (!obj || !path) return null;
|
|
2286
2317
|
if (path.includes(".")) {
|
|
@@ -2293,7 +2324,7 @@ function getNestedProperty(obj, path) {
|
|
|
2293
2324
|
}
|
|
2294
2325
|
const value = obj[path];
|
|
2295
2326
|
if (Array.isArray(value)) {
|
|
2296
|
-
return value.map((item, index) => /* @__PURE__ */
|
|
2327
|
+
return value.map((item, index) => /* @__PURE__ */ jsx42("div", { children: String(item) }, index));
|
|
2297
2328
|
}
|
|
2298
2329
|
return value;
|
|
2299
2330
|
}
|
|
@@ -2354,7 +2385,7 @@ var DatafieldNode = (props) => {
|
|
|
2354
2385
|
const dataType = props.node.dataType;
|
|
2355
2386
|
if (isEmptyValue) return null;
|
|
2356
2387
|
if (dataType === "rawContent") {
|
|
2357
|
-
return /* @__PURE__ */
|
|
2388
|
+
return /* @__PURE__ */ jsx42(
|
|
2358
2389
|
PageBodyRenderer_default,
|
|
2359
2390
|
{
|
|
2360
2391
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -2370,12 +2401,12 @@ var DatafieldNode = (props) => {
|
|
|
2370
2401
|
}
|
|
2371
2402
|
);
|
|
2372
2403
|
}
|
|
2373
|
-
return /* @__PURE__ */
|
|
2404
|
+
return /* @__PURE__ */ jsx42(
|
|
2374
2405
|
"span",
|
|
2375
2406
|
{
|
|
2376
2407
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
2377
2408
|
style: styles,
|
|
2378
|
-
children: /* @__PURE__ */
|
|
2409
|
+
children: /* @__PURE__ */ jsx42(
|
|
2379
2410
|
ViewControl_default,
|
|
2380
2411
|
{
|
|
2381
2412
|
controlType: dataType,
|
|
@@ -2388,7 +2419,7 @@ var DatafieldNode = (props) => {
|
|
|
2388
2419
|
var DatafieldNode_default = DatafieldNode;
|
|
2389
2420
|
|
|
2390
2421
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
2391
|
-
import { Fragment as Fragment4, jsx as
|
|
2422
|
+
import { Fragment as Fragment4, jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2392
2423
|
var ParagraphNode = (props) => {
|
|
2393
2424
|
const NodeTypes2 = {
|
|
2394
2425
|
["text"]: TextNode_default,
|
|
@@ -2408,9 +2439,9 @@ var ParagraphNode = (props) => {
|
|
|
2408
2439
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
2409
2440
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
2410
2441
|
if (isInlineOnlyParent) {
|
|
2411
|
-
return /* @__PURE__ */
|
|
2442
|
+
return /* @__PURE__ */ jsx43(Fragment4, { children: hasChildren && props.node.children.map((node, index) => {
|
|
2412
2443
|
const SelectedNode = NodeTypes2[node.type];
|
|
2413
|
-
return /* @__PURE__ */
|
|
2444
|
+
return /* @__PURE__ */ jsx43(React30.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx43(
|
|
2414
2445
|
SelectedNode,
|
|
2415
2446
|
{
|
|
2416
2447
|
node,
|
|
@@ -2425,7 +2456,7 @@ var ParagraphNode = (props) => {
|
|
|
2425
2456
|
return /* @__PURE__ */ jsxs24("div", { className: " " + formatClasses, children: [
|
|
2426
2457
|
hasChildren && props.node.children.map((node, index) => {
|
|
2427
2458
|
const SelectedNode = NodeTypes2[node.type];
|
|
2428
|
-
return /* @__PURE__ */
|
|
2459
|
+
return /* @__PURE__ */ jsx43(React30.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx43(
|
|
2429
2460
|
SelectedNode,
|
|
2430
2461
|
{
|
|
2431
2462
|
node,
|
|
@@ -2436,14 +2467,14 @@ var ParagraphNode = (props) => {
|
|
|
2436
2467
|
}
|
|
2437
2468
|
) }, index);
|
|
2438
2469
|
}),
|
|
2439
|
-
!hasChildren && /* @__PURE__ */
|
|
2470
|
+
!hasChildren && /* @__PURE__ */ jsx43("div", { className: "py-1.5 lg:py-2" })
|
|
2440
2471
|
] });
|
|
2441
2472
|
};
|
|
2442
2473
|
var ParagraphNode_default = ParagraphNode;
|
|
2443
2474
|
|
|
2444
2475
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
2445
2476
|
import React31 from "react";
|
|
2446
|
-
import { Fragment as Fragment5, jsx as
|
|
2477
|
+
import { Fragment as Fragment5, jsx as jsx44 } from "react/jsx-runtime";
|
|
2447
2478
|
var HeadingNode = (props) => {
|
|
2448
2479
|
const NodeTypes2 = {
|
|
2449
2480
|
["text"]: TextNode_default,
|
|
@@ -2459,12 +2490,12 @@ var HeadingNode = (props) => {
|
|
|
2459
2490
|
{
|
|
2460
2491
|
}
|
|
2461
2492
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
2462
|
-
return /* @__PURE__ */
|
|
2493
|
+
return /* @__PURE__ */ jsx44(Fragment5, { children: React31.createElement(
|
|
2463
2494
|
HeadingTag,
|
|
2464
2495
|
{ className: formatClasses },
|
|
2465
2496
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
2466
2497
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
2467
|
-
return /* @__PURE__ */
|
|
2498
|
+
return /* @__PURE__ */ jsx44(React31.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx44(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
2468
2499
|
})
|
|
2469
2500
|
) });
|
|
2470
2501
|
};
|
|
@@ -2475,7 +2506,7 @@ import React33 from "react";
|
|
|
2475
2506
|
|
|
2476
2507
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
2477
2508
|
import React32 from "react";
|
|
2478
|
-
import { jsx as
|
|
2509
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
2479
2510
|
var ListItemNode = (props) => {
|
|
2480
2511
|
const NodeTypes2 = {
|
|
2481
2512
|
text: TextNode_default,
|
|
@@ -2492,37 +2523,37 @@ var ListItemNode = (props) => {
|
|
|
2492
2523
|
liStyle.fontSize = match[1].trim();
|
|
2493
2524
|
}
|
|
2494
2525
|
}
|
|
2495
|
-
return /* @__PURE__ */
|
|
2526
|
+
return /* @__PURE__ */ jsx45("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
2496
2527
|
const SelectedNode = NodeTypes2[node.type];
|
|
2497
2528
|
if (node.type === "linebreak") {
|
|
2498
2529
|
if (!foundFirstBreak) {
|
|
2499
2530
|
foundFirstBreak = true;
|
|
2500
|
-
return /* @__PURE__ */
|
|
2531
|
+
return /* @__PURE__ */ jsx45("div", {}, index);
|
|
2501
2532
|
} else {
|
|
2502
|
-
return /* @__PURE__ */
|
|
2533
|
+
return /* @__PURE__ */ jsx45("div", { className: "py-1 lg:py-2" }, index);
|
|
2503
2534
|
}
|
|
2504
2535
|
} else {
|
|
2505
2536
|
foundFirstBreak = false;
|
|
2506
|
-
return /* @__PURE__ */
|
|
2537
|
+
return /* @__PURE__ */ jsx45(React32.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx45(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2507
2538
|
}
|
|
2508
2539
|
}) });
|
|
2509
2540
|
};
|
|
2510
2541
|
var ListItemNode_default = ListItemNode;
|
|
2511
2542
|
|
|
2512
2543
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
2513
|
-
import { jsx as
|
|
2544
|
+
import { jsx as jsx46, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2514
2545
|
var ListNode = (props) => {
|
|
2515
2546
|
const NodeTypes2 = {
|
|
2516
2547
|
listitem: ListItemNode_default
|
|
2517
2548
|
};
|
|
2518
2549
|
return /* @__PURE__ */ jsxs25(React33.Fragment, { children: [
|
|
2519
|
-
props.node.listType == "bullet" && /* @__PURE__ */
|
|
2550
|
+
props.node.listType == "bullet" && /* @__PURE__ */ jsx46("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2520
2551
|
const SelectedNode = NodeTypes2[node.type];
|
|
2521
|
-
return /* @__PURE__ */
|
|
2552
|
+
return /* @__PURE__ */ jsx46(React33.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx46(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2522
2553
|
}) }),
|
|
2523
|
-
props.node.listType == "number" && /* @__PURE__ */
|
|
2554
|
+
props.node.listType == "number" && /* @__PURE__ */ jsx46("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2524
2555
|
const SelectedNode = NodeTypes2[node.type];
|
|
2525
|
-
return /* @__PURE__ */
|
|
2556
|
+
return /* @__PURE__ */ jsx46(React33.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx46(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2526
2557
|
}) })
|
|
2527
2558
|
] });
|
|
2528
2559
|
};
|
|
@@ -2530,16 +2561,16 @@ var ListNode_default = ListNode;
|
|
|
2530
2561
|
|
|
2531
2562
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
2532
2563
|
import React34 from "react";
|
|
2533
|
-
import { jsx as
|
|
2564
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
2534
2565
|
var QuoteNode = (props) => {
|
|
2535
2566
|
const NodeTypes2 = {
|
|
2536
2567
|
["text"]: TextNode_default,
|
|
2537
2568
|
["linebreak"]: LineBreakNode_default,
|
|
2538
2569
|
["link"]: LinkNode_default
|
|
2539
2570
|
};
|
|
2540
|
-
return /* @__PURE__ */
|
|
2571
|
+
return /* @__PURE__ */ jsx47("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2541
2572
|
const SelectedNode = NodeTypes2[node.type];
|
|
2542
|
-
return /* @__PURE__ */
|
|
2573
|
+
return /* @__PURE__ */ jsx47(React34.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx47(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
2543
2574
|
}) });
|
|
2544
2575
|
};
|
|
2545
2576
|
var QuoteNode_default = QuoteNode;
|
|
@@ -2547,11 +2578,11 @@ var QuoteNode_default = QuoteNode;
|
|
|
2547
2578
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
2548
2579
|
import React35 from "react";
|
|
2549
2580
|
import dynamic5 from "next/dynamic";
|
|
2550
|
-
import { jsx as
|
|
2581
|
+
import { jsx as jsx48, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2551
2582
|
var CopyButton = dynamic5(() => import("./CopyButton-XONTQQW7.mjs"), {
|
|
2552
2583
|
ssr: false,
|
|
2553
2584
|
// optional: fallback UI while loading
|
|
2554
|
-
loading: () => /* @__PURE__ */
|
|
2585
|
+
loading: () => /* @__PURE__ */ jsx48("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
2555
2586
|
});
|
|
2556
2587
|
var CodeNode = (props) => {
|
|
2557
2588
|
const NodeTypes2 = {
|
|
@@ -2567,12 +2598,12 @@ var CodeNode = (props) => {
|
|
|
2567
2598
|
}).join("") ?? "";
|
|
2568
2599
|
return /* @__PURE__ */ jsxs26("div", { children: [
|
|
2569
2600
|
/* @__PURE__ */ jsxs26("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
2570
|
-
/* @__PURE__ */
|
|
2571
|
-
/* @__PURE__ */
|
|
2601
|
+
/* @__PURE__ */ jsx48("span", { children: "Code Snippet" }),
|
|
2602
|
+
/* @__PURE__ */ jsx48(CopyButton, { text: textContent })
|
|
2572
2603
|
] }),
|
|
2573
|
-
/* @__PURE__ */
|
|
2604
|
+
/* @__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) => {
|
|
2574
2605
|
const SelectedNode = NodeTypes2[node.type];
|
|
2575
|
-
return /* @__PURE__ */
|
|
2606
|
+
return /* @__PURE__ */ jsx48(React35.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx48(
|
|
2576
2607
|
SelectedNode,
|
|
2577
2608
|
{
|
|
2578
2609
|
node,
|
|
@@ -2587,15 +2618,15 @@ var CodeNode = (props) => {
|
|
|
2587
2618
|
var CodeNode_default = CodeNode;
|
|
2588
2619
|
|
|
2589
2620
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
2590
|
-
import { jsx as
|
|
2621
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
2591
2622
|
var HorizontalRuleNode = () => {
|
|
2592
|
-
return /* @__PURE__ */
|
|
2623
|
+
return /* @__PURE__ */ jsx49("hr", {});
|
|
2593
2624
|
};
|
|
2594
2625
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
2595
2626
|
|
|
2596
2627
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
2597
2628
|
import React36 from "react";
|
|
2598
|
-
import { Fragment as Fragment6, jsx as
|
|
2629
|
+
import { Fragment as Fragment6, jsx as jsx50 } from "react/jsx-runtime";
|
|
2599
2630
|
var WidgetNode = (props) => {
|
|
2600
2631
|
const getWidgetParameters = () => {
|
|
2601
2632
|
const widgetInputParameters = {
|
|
@@ -2659,7 +2690,7 @@ var WidgetNode = (props) => {
|
|
|
2659
2690
|
};
|
|
2660
2691
|
const widgetCode = props.node?.widgetCode;
|
|
2661
2692
|
if (!widgetCode) {
|
|
2662
|
-
return /* @__PURE__ */
|
|
2693
|
+
return /* @__PURE__ */ jsx50(Fragment6, { children: "Invalid widget" });
|
|
2663
2694
|
}
|
|
2664
2695
|
const widgetParams = getWidgetParameters();
|
|
2665
2696
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -2668,7 +2699,7 @@ var WidgetNode = (props) => {
|
|
|
2668
2699
|
}
|
|
2669
2700
|
return (
|
|
2670
2701
|
// eslint-disable-next-line react-hooks/static-components
|
|
2671
|
-
/* @__PURE__ */
|
|
2702
|
+
/* @__PURE__ */ jsx50(React36.Fragment, { children: /* @__PURE__ */ jsx50(
|
|
2672
2703
|
WidgetRenderer,
|
|
2673
2704
|
{
|
|
2674
2705
|
params: widgetParams,
|
|
@@ -2688,9 +2719,9 @@ var WidgetNode_default = WidgetNode;
|
|
|
2688
2719
|
import React37, { useRef as useRef3, useReducer, useCallback as useCallback2, useEffect as useEffect7 } from "react";
|
|
2689
2720
|
|
|
2690
2721
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
2691
|
-
import { jsx as
|
|
2722
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
2692
2723
|
var InputControlNode = (props) => {
|
|
2693
|
-
return /* @__PURE__ */
|
|
2724
|
+
return /* @__PURE__ */ jsx51("div", { children: /* @__PURE__ */ jsx51(
|
|
2694
2725
|
InputControl_default,
|
|
2695
2726
|
{
|
|
2696
2727
|
name: props.node.name,
|
|
@@ -2763,7 +2794,7 @@ function FormReducer(state, action) {
|
|
|
2763
2794
|
var FormReducer_default = FormReducer;
|
|
2764
2795
|
|
|
2765
2796
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
2766
|
-
import { jsx as
|
|
2797
|
+
import { jsx as jsx52, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2767
2798
|
var FormContainerNode = (props) => {
|
|
2768
2799
|
const NodeTypes2 = {
|
|
2769
2800
|
["input-control"]: InputControlNode_default
|
|
@@ -2798,7 +2829,7 @@ var FormContainerNode = (props) => {
|
|
|
2798
2829
|
{
|
|
2799
2830
|
}
|
|
2800
2831
|
const SelectedNode = NodeTypes2[node2.type];
|
|
2801
|
-
return /* @__PURE__ */
|
|
2832
|
+
return /* @__PURE__ */ jsx52(React37.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ jsx52(
|
|
2802
2833
|
InputControlNode_default,
|
|
2803
2834
|
{
|
|
2804
2835
|
value: formState.inputValues[node2.name],
|
|
@@ -2807,7 +2838,7 @@ var FormContainerNode = (props) => {
|
|
|
2807
2838
|
}
|
|
2808
2839
|
) }, index);
|
|
2809
2840
|
}),
|
|
2810
|
-
node.children.length == 0 && /* @__PURE__ */
|
|
2841
|
+
node.children.length == 0 && /* @__PURE__ */ jsx52("div", { className: "py-0.5 lg:py-1.5" })
|
|
2811
2842
|
] });
|
|
2812
2843
|
};
|
|
2813
2844
|
var FormContainerNode_default = FormContainerNode;
|
|
@@ -2817,7 +2848,7 @@ import React40 from "react";
|
|
|
2817
2848
|
|
|
2818
2849
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
2819
2850
|
import dynamic6 from "next/dynamic";
|
|
2820
|
-
import { jsx as
|
|
2851
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
2821
2852
|
var IframeClient = dynamic6(() => import("./IframeClient-J22NMEVY.mjs"), {
|
|
2822
2853
|
ssr: false
|
|
2823
2854
|
});
|
|
@@ -2830,13 +2861,13 @@ var EmbedNode = (props) => {
|
|
|
2830
2861
|
} else {
|
|
2831
2862
|
src = props.node.embedSrc;
|
|
2832
2863
|
}
|
|
2833
|
-
return /* @__PURE__ */
|
|
2864
|
+
return /* @__PURE__ */ jsx53("div", { className: "aspect-video", children: src && /* @__PURE__ */ jsx53(IframeClient, { src }) });
|
|
2834
2865
|
};
|
|
2835
2866
|
var EmbedNode_default = EmbedNode;
|
|
2836
2867
|
|
|
2837
2868
|
// src/components/Slider.tsx
|
|
2838
2869
|
import React38, { useState as useState5, useEffect as useEffect8, Children, cloneElement } from "react";
|
|
2839
|
-
import { Fragment as Fragment7, jsx as
|
|
2870
|
+
import { Fragment as Fragment7, jsx as jsx54, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2840
2871
|
var Slider = ({
|
|
2841
2872
|
children,
|
|
2842
2873
|
slidesToShow = 4,
|
|
@@ -2933,7 +2964,7 @@ var Slider = ({
|
|
|
2933
2964
|
if (!React38.isValidElement(child)) return null;
|
|
2934
2965
|
const childProps = child.props;
|
|
2935
2966
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
2936
|
-
return /* @__PURE__ */
|
|
2967
|
+
return /* @__PURE__ */ jsx54(
|
|
2937
2968
|
"div",
|
|
2938
2969
|
{
|
|
2939
2970
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
@@ -2963,7 +2994,7 @@ var Slider = ({
|
|
|
2963
2994
|
onMouseEnter: handleMouseEnter,
|
|
2964
2995
|
onMouseLeave: handleMouseLeave,
|
|
2965
2996
|
children: [
|
|
2966
|
-
/* @__PURE__ */
|
|
2997
|
+
/* @__PURE__ */ jsx54(
|
|
2967
2998
|
"div",
|
|
2968
2999
|
{
|
|
2969
3000
|
className: "flex h-full",
|
|
@@ -2975,14 +3006,14 @@ var Slider = ({
|
|
|
2975
3006
|
}
|
|
2976
3007
|
),
|
|
2977
3008
|
show_arrows && /* @__PURE__ */ jsxs28(Fragment7, { children: [
|
|
2978
|
-
/* @__PURE__ */
|
|
3009
|
+
/* @__PURE__ */ jsx54(
|
|
2979
3010
|
ArrowButton,
|
|
2980
3011
|
{
|
|
2981
3012
|
direction: "left",
|
|
2982
3013
|
onClick: prevSlide,
|
|
2983
3014
|
visible: infinite_scroll || currentSlide > 0,
|
|
2984
3015
|
className: arrowClassName,
|
|
2985
|
-
children: /* @__PURE__ */
|
|
3016
|
+
children: /* @__PURE__ */ jsx54("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ jsx54("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
2986
3017
|
}
|
|
2987
3018
|
),
|
|
2988
3019
|
/* @__PURE__ */ jsxs28(
|
|
@@ -2993,13 +3024,13 @@ var Slider = ({
|
|
|
2993
3024
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
2994
3025
|
className: arrowClassName,
|
|
2995
3026
|
children: [
|
|
2996
|
-
/* @__PURE__ */
|
|
3027
|
+
/* @__PURE__ */ jsx54("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ jsx54("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
|
|
2997
3028
|
" "
|
|
2998
3029
|
]
|
|
2999
3030
|
}
|
|
3000
3031
|
)
|
|
3001
3032
|
] }),
|
|
3002
|
-
show_dots && /* @__PURE__ */
|
|
3033
|
+
show_dots && /* @__PURE__ */ jsx54("div", { className: `absolute left-1/2 -translate-x-1/2 flex justify-center space-x-1.5 ${getProgressPositionClass()}`, children: Array.from({ length: totalSlides }).map((_, index) => /* @__PURE__ */ jsx54(
|
|
3003
3034
|
ProgressPill,
|
|
3004
3035
|
{
|
|
3005
3036
|
active: index === currentSlide,
|
|
@@ -3025,7 +3056,7 @@ var ArrowButton = ({
|
|
|
3025
3056
|
visible,
|
|
3026
3057
|
children,
|
|
3027
3058
|
className = ""
|
|
3028
|
-
}) => /* @__PURE__ */
|
|
3059
|
+
}) => /* @__PURE__ */ jsx54(
|
|
3029
3060
|
"button",
|
|
3030
3061
|
{
|
|
3031
3062
|
className: `
|
|
@@ -3112,7 +3143,7 @@ var ProgressPill = ({
|
|
|
3112
3143
|
const renderProgressBar = () => {
|
|
3113
3144
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
3114
3145
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
3115
|
-
return /* @__PURE__ */
|
|
3146
|
+
return /* @__PURE__ */ jsx54(
|
|
3116
3147
|
"div",
|
|
3117
3148
|
{
|
|
3118
3149
|
className: `absolute top-0 left-0 h-full rounded-full ${style === "cumulative" && isFilled ? activeClassName || "bg-white" : activeClassName || "bg-white"} transition-all duration-50 ease-linear`,
|
|
@@ -3124,7 +3155,7 @@ var ProgressPill = ({
|
|
|
3124
3155
|
};
|
|
3125
3156
|
const renderCumulativeFill = () => {
|
|
3126
3157
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
3127
|
-
return /* @__PURE__ */
|
|
3158
|
+
return /* @__PURE__ */ jsx54(
|
|
3128
3159
|
"div",
|
|
3129
3160
|
{
|
|
3130
3161
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -3472,10 +3503,10 @@ var PathUtility = class {
|
|
|
3472
3503
|
var PathUtility_default = new PathUtility();
|
|
3473
3504
|
|
|
3474
3505
|
// src/components/NoDataFound.tsx
|
|
3475
|
-
import { jsx as
|
|
3506
|
+
import { jsx as jsx55, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3476
3507
|
var NoDataFound = () => {
|
|
3477
3508
|
return /* @__PURE__ */ jsxs29("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
3478
|
-
/* @__PURE__ */
|
|
3509
|
+
/* @__PURE__ */ jsx55("div", { className: "mb-5", children: /* @__PURE__ */ jsx55("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx55(
|
|
3479
3510
|
"svg",
|
|
3480
3511
|
{
|
|
3481
3512
|
className: "w-10 h-10",
|
|
@@ -3483,7 +3514,7 @@ var NoDataFound = () => {
|
|
|
3483
3514
|
stroke: "currentColor",
|
|
3484
3515
|
viewBox: "0 0 24 24",
|
|
3485
3516
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3486
|
-
children: /* @__PURE__ */
|
|
3517
|
+
children: /* @__PURE__ */ jsx55(
|
|
3487
3518
|
"path",
|
|
3488
3519
|
{
|
|
3489
3520
|
strokeLinecap: "round",
|
|
@@ -3494,15 +3525,15 @@ var NoDataFound = () => {
|
|
|
3494
3525
|
)
|
|
3495
3526
|
}
|
|
3496
3527
|
) }) }),
|
|
3497
|
-
/* @__PURE__ */
|
|
3498
|
-
/* @__PURE__ */
|
|
3528
|
+
/* @__PURE__ */ jsx55("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
3529
|
+
/* @__PURE__ */ jsx55("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
3499
3530
|
] });
|
|
3500
3531
|
};
|
|
3501
3532
|
var NoDataFound_default = NoDataFound;
|
|
3502
3533
|
|
|
3503
3534
|
// src/components/Pagination.tsx
|
|
3504
3535
|
import { useMemo } from "react";
|
|
3505
|
-
import { jsx as
|
|
3536
|
+
import { jsx as jsx56, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3506
3537
|
var Pagination = (props) => {
|
|
3507
3538
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
3508
3539
|
const builder = useMemo(() => {
|
|
@@ -3546,7 +3577,7 @@ var Pagination = (props) => {
|
|
|
3546
3577
|
return range;
|
|
3547
3578
|
};
|
|
3548
3579
|
const paginationRange = getPaginationRange();
|
|
3549
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */
|
|
3580
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ jsx56(
|
|
3550
3581
|
Hyperlink,
|
|
3551
3582
|
{
|
|
3552
3583
|
linkType: "Link" /* Link */,
|
|
@@ -3561,9 +3592,9 @@ var Pagination = (props) => {
|
|
|
3561
3592
|
);
|
|
3562
3593
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
3563
3594
|
if (disabled) {
|
|
3564
|
-
return /* @__PURE__ */
|
|
3595
|
+
return /* @__PURE__ */ jsx56("span", { className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border bg-neutral-base cursor-not-allowed", children });
|
|
3565
3596
|
}
|
|
3566
|
-
return /* @__PURE__ */
|
|
3597
|
+
return /* @__PURE__ */ jsx56(
|
|
3567
3598
|
Hyperlink,
|
|
3568
3599
|
{
|
|
3569
3600
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border transition-colors duration-150",
|
|
@@ -3584,7 +3615,7 @@ var Pagination = (props) => {
|
|
|
3584
3615
|
] }),
|
|
3585
3616
|
" ",
|
|
3586
3617
|
"out of ",
|
|
3587
|
-
/* @__PURE__ */
|
|
3618
|
+
/* @__PURE__ */ jsx56("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
3588
3619
|
" results"
|
|
3589
3620
|
] }),
|
|
3590
3621
|
totalPages > 1 && /* @__PURE__ */ jsxs30("div", { className: "flex items-center space-x-1", children: [
|
|
@@ -3594,14 +3625,14 @@ var Pagination = (props) => {
|
|
|
3594
3625
|
page: activePageNumber - 1,
|
|
3595
3626
|
disabled: activePageNumber === 1,
|
|
3596
3627
|
children: [
|
|
3597
|
-
/* @__PURE__ */
|
|
3598
|
-
/* @__PURE__ */
|
|
3628
|
+
/* @__PURE__ */ jsx56("span", { children: /* @__PURE__ */ jsx56(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
3629
|
+
/* @__PURE__ */ jsx56("span", { className: "text-sm", children: "Prev" })
|
|
3599
3630
|
]
|
|
3600
3631
|
}
|
|
3601
3632
|
),
|
|
3602
3633
|
paginationRange.map((item, index) => {
|
|
3603
3634
|
if (item === "...") {
|
|
3604
|
-
return /* @__PURE__ */
|
|
3635
|
+
return /* @__PURE__ */ jsx56(
|
|
3605
3636
|
"span",
|
|
3606
3637
|
{
|
|
3607
3638
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -3611,7 +3642,7 @@ var Pagination = (props) => {
|
|
|
3611
3642
|
);
|
|
3612
3643
|
}
|
|
3613
3644
|
const page = item;
|
|
3614
|
-
return /* @__PURE__ */
|
|
3645
|
+
return /* @__PURE__ */ jsx56(PageButton, { page, children: page }, page);
|
|
3615
3646
|
}),
|
|
3616
3647
|
/* @__PURE__ */ jsxs30(
|
|
3617
3648
|
NavigationButton,
|
|
@@ -3619,15 +3650,15 @@ var Pagination = (props) => {
|
|
|
3619
3650
|
page: activePageNumber + 1,
|
|
3620
3651
|
disabled: activePageNumber === totalPages,
|
|
3621
3652
|
children: [
|
|
3622
|
-
/* @__PURE__ */
|
|
3623
|
-
/* @__PURE__ */
|
|
3653
|
+
/* @__PURE__ */ jsx56("span", { className: "text-sm", children: "Next" }),
|
|
3654
|
+
/* @__PURE__ */ jsx56("span", { children: /* @__PURE__ */ jsx56(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
3624
3655
|
]
|
|
3625
3656
|
}
|
|
3626
3657
|
)
|
|
3627
3658
|
] }),
|
|
3628
3659
|
showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs30("div", { className: "flex items-center space-x-2", children: [
|
|
3629
|
-
/* @__PURE__ */
|
|
3630
|
-
/* @__PURE__ */
|
|
3660
|
+
/* @__PURE__ */ jsx56("span", { className: "text-sm", children: "Go to:" }),
|
|
3661
|
+
/* @__PURE__ */ jsx56("div", { className: "relative", children: /* @__PURE__ */ jsx56(
|
|
3631
3662
|
"input",
|
|
3632
3663
|
{
|
|
3633
3664
|
type: "number",
|
|
@@ -3648,9 +3679,9 @@ var Pagination = (props) => {
|
|
|
3648
3679
|
) })
|
|
3649
3680
|
] })
|
|
3650
3681
|
] }),
|
|
3651
|
-
showPageSizeSelector && /* @__PURE__ */
|
|
3652
|
-
/* @__PURE__ */
|
|
3653
|
-
/* @__PURE__ */
|
|
3682
|
+
showPageSizeSelector && /* @__PURE__ */ jsx56("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
3683
|
+
/* @__PURE__ */ jsx56("span", { className: "text-sm", children: "Show:" }),
|
|
3684
|
+
/* @__PURE__ */ jsx56("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx56(
|
|
3654
3685
|
Hyperlink,
|
|
3655
3686
|
{
|
|
3656
3687
|
className: `
|
|
@@ -3662,7 +3693,7 @@ var Pagination = (props) => {
|
|
|
3662
3693
|
},
|
|
3663
3694
|
size
|
|
3664
3695
|
)) }),
|
|
3665
|
-
/* @__PURE__ */
|
|
3696
|
+
/* @__PURE__ */ jsx56("span", { className: "text-sm", children: "per page" })
|
|
3666
3697
|
] }) })
|
|
3667
3698
|
] });
|
|
3668
3699
|
};
|
|
@@ -3670,7 +3701,7 @@ var Pagination_default = Pagination;
|
|
|
3670
3701
|
|
|
3671
3702
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
3672
3703
|
import dynamic7 from "next/dynamic";
|
|
3673
|
-
import { Fragment as Fragment8, jsx as
|
|
3704
|
+
import { Fragment as Fragment8, jsx as jsx57, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3674
3705
|
var HlsPlayer2 = dynamic7(() => import("./HlsPlayer-GZR4QXJY.mjs"), { ssr: false });
|
|
3675
3706
|
var deviceToMediaQuery = (device) => {
|
|
3676
3707
|
switch (device) {
|
|
@@ -3740,7 +3771,7 @@ var ImageGalleryNode = (props) => {
|
|
|
3740
3771
|
};
|
|
3741
3772
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
3742
3773
|
return /* @__PURE__ */ jsxs31(Fragment8, { children: [
|
|
3743
|
-
hlsSources.length > 0 && /* @__PURE__ */
|
|
3774
|
+
hlsSources.length > 0 && /* @__PURE__ */ jsx57(Fragment8, { children: /* @__PURE__ */ jsx57(
|
|
3744
3775
|
HlsPlayer2,
|
|
3745
3776
|
{
|
|
3746
3777
|
sources: hlsSources,
|
|
@@ -3754,14 +3785,14 @@ var ImageGalleryNode = (props) => {
|
|
|
3754
3785
|
session: props.session
|
|
3755
3786
|
}
|
|
3756
3787
|
) }),
|
|
3757
|
-
staticFallback && /* @__PURE__ */
|
|
3788
|
+
staticFallback && /* @__PURE__ */ jsx57(Fragment8, { children: /* @__PURE__ */ jsxs31("picture", { children: [
|
|
3758
3789
|
DEVICE_ORDER.map((deviceKey) => {
|
|
3759
3790
|
const match = staticSources.find((img) => img.device === deviceKey);
|
|
3760
3791
|
if (!match) return null;
|
|
3761
3792
|
const srcUrl = resolveImageUrl(match.imageUrl);
|
|
3762
3793
|
if (!srcUrl) return null;
|
|
3763
3794
|
const mediaQuery = deviceToMediaQuery(match.device);
|
|
3764
|
-
return /* @__PURE__ */
|
|
3795
|
+
return /* @__PURE__ */ jsx57(
|
|
3765
3796
|
"source",
|
|
3766
3797
|
{
|
|
3767
3798
|
media: mediaQuery,
|
|
@@ -3785,7 +3816,7 @@ var ImageGalleryNode = (props) => {
|
|
|
3785
3816
|
if (img.borderRadius) styles.borderRadius = img.borderRadius;
|
|
3786
3817
|
return (
|
|
3787
3818
|
// eslint-disable-next-line @next/next/no-img-element
|
|
3788
|
-
/* @__PURE__ */
|
|
3819
|
+
/* @__PURE__ */ jsx57(
|
|
3789
3820
|
"img",
|
|
3790
3821
|
{
|
|
3791
3822
|
loading: "lazy",
|
|
@@ -3806,7 +3837,7 @@ var ImageGalleryNode_default = ImageGalleryNode;
|
|
|
3806
3837
|
|
|
3807
3838
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
3808
3839
|
import Link2 from "next/link";
|
|
3809
|
-
import { jsx as
|
|
3840
|
+
import { jsx as jsx58, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3810
3841
|
function toCamelCase(str) {
|
|
3811
3842
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
3812
3843
|
}
|
|
@@ -4013,7 +4044,7 @@ var DivContainer = async (props) => {
|
|
|
4013
4044
|
response = await serviceClient.get(endpoint);
|
|
4014
4045
|
result = response?.result;
|
|
4015
4046
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
4016
|
-
return /* @__PURE__ */
|
|
4047
|
+
return /* @__PURE__ */ jsx58(NoDataFound_default, {});
|
|
4017
4048
|
}
|
|
4018
4049
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
4019
4050
|
childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
|
|
@@ -4030,7 +4061,7 @@ var DivContainer = async (props) => {
|
|
|
4030
4061
|
}
|
|
4031
4062
|
const SelectedNode = NodeTypes2[node.type];
|
|
4032
4063
|
if (!SelectedNode) return null;
|
|
4033
|
-
return /* @__PURE__ */
|
|
4064
|
+
return /* @__PURE__ */ jsx58(React40.Fragment, { children: /* @__PURE__ */ jsx58(
|
|
4034
4065
|
SelectedNode,
|
|
4035
4066
|
{
|
|
4036
4067
|
node,
|
|
@@ -4133,8 +4164,8 @@ var DivContainer = async (props) => {
|
|
|
4133
4164
|
props.node.bgClass
|
|
4134
4165
|
].filter(Boolean).join(" ");
|
|
4135
4166
|
return /* @__PURE__ */ jsxs32(React40.Fragment, { children: [
|
|
4136
|
-
/* @__PURE__ */
|
|
4137
|
-
/* @__PURE__ */
|
|
4167
|
+
/* @__PURE__ */ jsx58("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
4168
|
+
/* @__PURE__ */ jsx58(React40.Fragment, { children: /* @__PURE__ */ jsx58(
|
|
4138
4169
|
Wrapper,
|
|
4139
4170
|
{
|
|
4140
4171
|
id: guid,
|
|
@@ -4143,18 +4174,18 @@ var DivContainer = async (props) => {
|
|
|
4143
4174
|
...wrapperProps,
|
|
4144
4175
|
children: dataToRender.map(
|
|
4145
4176
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
4146
|
-
(child, i) => /* @__PURE__ */
|
|
4177
|
+
(child, i) => /* @__PURE__ */ jsx58(React40.Fragment, { children: child }, i)
|
|
4147
4178
|
) : renderChildren(props.node.children, props, item, idx)
|
|
4148
4179
|
)
|
|
4149
4180
|
}
|
|
4150
4181
|
) }),
|
|
4151
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */
|
|
4182
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ jsx58("div", { children: /* @__PURE__ */ jsx58(Pagination_default, { path: props.path, query: props.query, dataset: response }) })
|
|
4152
4183
|
] });
|
|
4153
4184
|
};
|
|
4154
4185
|
var DivContainer_default = DivContainer;
|
|
4155
4186
|
|
|
4156
4187
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
4157
|
-
import { jsx as
|
|
4188
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
4158
4189
|
var NodeTypes = {
|
|
4159
4190
|
["paragraph"]: ParagraphNode_default,
|
|
4160
4191
|
["heading"]: HeadingNode_default,
|
|
@@ -4182,11 +4213,11 @@ var PageBodyRenderer = (props) => {
|
|
|
4182
4213
|
if (pageBodyTree && pageBodyTree.root) {
|
|
4183
4214
|
rootNode = pageBodyTree.root;
|
|
4184
4215
|
}
|
|
4185
|
-
return /* @__PURE__ */
|
|
4216
|
+
return /* @__PURE__ */ jsx59(React41.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
4186
4217
|
{
|
|
4187
4218
|
}
|
|
4188
4219
|
const SelectedNode = NodeTypes[node.type];
|
|
4189
|
-
return /* @__PURE__ */
|
|
4220
|
+
return /* @__PURE__ */ jsx59(React41.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx59(React41.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx59(React41.Fragment, { children: /* @__PURE__ */ jsx59(
|
|
4190
4221
|
SelectedNode,
|
|
4191
4222
|
{
|
|
4192
4223
|
node,
|
|
@@ -4202,7 +4233,7 @@ var PageBodyRenderer = (props) => {
|
|
|
4202
4233
|
device: props.device,
|
|
4203
4234
|
widgetRenderer: props.widgetRenderer
|
|
4204
4235
|
}
|
|
4205
|
-
) }) : /* @__PURE__ */
|
|
4236
|
+
) }) : /* @__PURE__ */ jsx59(React41.Fragment, { children: /* @__PURE__ */ jsx59(
|
|
4206
4237
|
SelectedNode,
|
|
4207
4238
|
{
|
|
4208
4239
|
node,
|
|
@@ -4224,7 +4255,7 @@ var PageBodyRenderer_default = PageBodyRenderer;
|
|
|
4224
4255
|
|
|
4225
4256
|
// src/components/Toast.tsx
|
|
4226
4257
|
import { useState as useState7 } from "react";
|
|
4227
|
-
import { Fragment as Fragment9, jsx as
|
|
4258
|
+
import { Fragment as Fragment9, jsx as jsx60, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4228
4259
|
var Toast = () => {
|
|
4229
4260
|
const [showToast, setShowToast] = useState7(false);
|
|
4230
4261
|
const [message, setMessage] = useState7("");
|
|
@@ -4267,8 +4298,8 @@ var Toast = () => {
|
|
|
4267
4298
|
const closeToast = () => {
|
|
4268
4299
|
setShowToast(false);
|
|
4269
4300
|
};
|
|
4270
|
-
return /* @__PURE__ */
|
|
4271
|
-
/* @__PURE__ */
|
|
4301
|
+
return /* @__PURE__ */ jsx60(Fragment9, { 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: [
|
|
4302
|
+
/* @__PURE__ */ jsx60(
|
|
4272
4303
|
"span",
|
|
4273
4304
|
{
|
|
4274
4305
|
className: "font-medium text-inherit text-sm",
|
|
@@ -4276,7 +4307,7 @@ var Toast = () => {
|
|
|
4276
4307
|
children: message
|
|
4277
4308
|
}
|
|
4278
4309
|
),
|
|
4279
|
-
/* @__PURE__ */
|
|
4310
|
+
/* @__PURE__ */ jsx60("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ jsx60(
|
|
4280
4311
|
"svg",
|
|
4281
4312
|
{
|
|
4282
4313
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4284,7 +4315,7 @@ var Toast = () => {
|
|
|
4284
4315
|
fill: "none",
|
|
4285
4316
|
viewBox: "0 0 24 24",
|
|
4286
4317
|
stroke: "currentColor",
|
|
4287
|
-
children: /* @__PURE__ */
|
|
4318
|
+
children: /* @__PURE__ */ jsx60("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
4288
4319
|
}
|
|
4289
4320
|
) })
|
|
4290
4321
|
] }) }) });
|
|
@@ -4294,7 +4325,7 @@ var Toast_default = Toast;
|
|
|
4294
4325
|
// src/components/NavigationTabsV2.tsx
|
|
4295
4326
|
import Link3 from "next/link";
|
|
4296
4327
|
import { usePathname } from "next/navigation";
|
|
4297
|
-
import { jsx as
|
|
4328
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
4298
4329
|
function resolveRoutePlaceholders(route, params) {
|
|
4299
4330
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
4300
4331
|
const value = params[key];
|
|
@@ -4319,8 +4350,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
4319
4350
|
isActive: tab.isActive
|
|
4320
4351
|
})) || [];
|
|
4321
4352
|
if (mappedTabs.length === 0) return null;
|
|
4322
|
-
return /* @__PURE__ */
|
|
4323
|
-
return /* @__PURE__ */
|
|
4353
|
+
return /* @__PURE__ */ jsx61("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
4354
|
+
return /* @__PURE__ */ jsx61(Link3, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ jsx61(
|
|
4324
4355
|
"div",
|
|
4325
4356
|
{
|
|
4326
4357
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -4338,46 +4369,46 @@ import { useRouter } from "next/navigation";
|
|
|
4338
4369
|
|
|
4339
4370
|
// src/components/dataForm/NoContentView.tsx
|
|
4340
4371
|
import React43 from "react";
|
|
4341
|
-
import { jsx as
|
|
4372
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
4342
4373
|
var NoContentView = (props) => {
|
|
4343
|
-
return /* @__PURE__ */
|
|
4374
|
+
return /* @__PURE__ */ jsx62(React43.Fragment, { children: props.isDataFound === false && props.children });
|
|
4344
4375
|
};
|
|
4345
4376
|
var NoContentView_default = NoContentView;
|
|
4346
4377
|
|
|
4347
4378
|
// src/components/dataForm/ContentView.tsx
|
|
4348
4379
|
import React44 from "react";
|
|
4349
|
-
import { jsx as
|
|
4380
|
+
import { jsx as jsx63, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4350
4381
|
var ContentView = (props) => {
|
|
4351
4382
|
return /* @__PURE__ */ jsxs34(React44.Fragment, { children: [
|
|
4352
|
-
props.isDataFound == null && /* @__PURE__ */
|
|
4383
|
+
props.isDataFound == null && /* @__PURE__ */ jsx63("div", { className: "", children: /* @__PURE__ */ jsxs34("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
4353
4384
|
/* @__PURE__ */ jsxs34("div", { className: "flex items-center mb-4", children: [
|
|
4354
|
-
/* @__PURE__ */
|
|
4385
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
4355
4386
|
/* @__PURE__ */ jsxs34("div", { className: "ml-2", children: [
|
|
4356
|
-
/* @__PURE__ */
|
|
4357
|
-
/* @__PURE__ */
|
|
4387
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
4388
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
4358
4389
|
] })
|
|
4359
4390
|
] }),
|
|
4360
4391
|
/* @__PURE__ */ jsxs34("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
4361
4392
|
/* @__PURE__ */ jsxs34("div", { className: "animate-pulse", children: [
|
|
4362
|
-
/* @__PURE__ */
|
|
4363
|
-
/* @__PURE__ */
|
|
4364
|
-
/* @__PURE__ */
|
|
4365
|
-
/* @__PURE__ */
|
|
4366
|
-
/* @__PURE__ */
|
|
4393
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
4394
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
4395
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
4396
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
4397
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
4367
4398
|
] }),
|
|
4368
4399
|
/* @__PURE__ */ jsxs34("div", { className: "animate-pulse", children: [
|
|
4369
|
-
/* @__PURE__ */
|
|
4370
|
-
/* @__PURE__ */
|
|
4371
|
-
/* @__PURE__ */
|
|
4372
|
-
/* @__PURE__ */
|
|
4373
|
-
/* @__PURE__ */
|
|
4400
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
4401
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
4402
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
4403
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
4404
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
4374
4405
|
] }),
|
|
4375
4406
|
/* @__PURE__ */ jsxs34("div", { className: "animate-pulse", children: [
|
|
4376
|
-
/* @__PURE__ */
|
|
4377
|
-
/* @__PURE__ */
|
|
4378
|
-
/* @__PURE__ */
|
|
4379
|
-
/* @__PURE__ */
|
|
4380
|
-
/* @__PURE__ */
|
|
4407
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
4408
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
4409
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
4410
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
4411
|
+
/* @__PURE__ */ jsx63("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
4381
4412
|
] })
|
|
4382
4413
|
] })
|
|
4383
4414
|
] }) }),
|
|
@@ -4387,7 +4418,7 @@ var ContentView = (props) => {
|
|
|
4387
4418
|
var ContentView_default = ContentView;
|
|
4388
4419
|
|
|
4389
4420
|
// src/components/dataForm/DataList.tsx
|
|
4390
|
-
import { Fragment as Fragment10, jsx as
|
|
4421
|
+
import { Fragment as Fragment10, jsx as jsx64, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4391
4422
|
var DataList = (props) => {
|
|
4392
4423
|
console.log(props.dataset, "datasetssssss");
|
|
4393
4424
|
const router = useRouter();
|
|
@@ -4410,7 +4441,7 @@ var DataList = (props) => {
|
|
|
4410
4441
|
if (path.includes(".")) {
|
|
4411
4442
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
4412
4443
|
} else if (Array.isArray(obj[path])) {
|
|
4413
|
-
return obj[path].map((item, index) => /* @__PURE__ */
|
|
4444
|
+
return obj[path].map((item, index) => /* @__PURE__ */ jsx64("div", { children: item }, index));
|
|
4414
4445
|
} else {
|
|
4415
4446
|
return obj[path];
|
|
4416
4447
|
}
|
|
@@ -4466,30 +4497,30 @@ var DataList = (props) => {
|
|
|
4466
4497
|
const renderPageNumbers = () => {
|
|
4467
4498
|
if (pages <= 10) {
|
|
4468
4499
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
4469
|
-
(page) => /* @__PURE__ */
|
|
4500
|
+
(page) => /* @__PURE__ */ jsx64(React45.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx64(
|
|
4470
4501
|
Hyperlink,
|
|
4471
4502
|
{
|
|
4472
4503
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
4473
4504
|
href: builder.getNewPageUrl(page),
|
|
4474
4505
|
children: page
|
|
4475
4506
|
}
|
|
4476
|
-
) : /* @__PURE__ */
|
|
4507
|
+
) : /* @__PURE__ */ jsx64("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)
|
|
4477
4508
|
);
|
|
4478
4509
|
} else {
|
|
4479
4510
|
const showFirstPages = activePageNumber <= 5;
|
|
4480
4511
|
const showLastPages = activePageNumber > pages - 5;
|
|
4481
4512
|
if (showFirstPages) {
|
|
4482
4513
|
return /* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
4483
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */
|
|
4514
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ jsx64(React45.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx64(
|
|
4484
4515
|
Hyperlink,
|
|
4485
4516
|
{
|
|
4486
4517
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
4487
4518
|
href: builder.getNewPageUrl(page),
|
|
4488
4519
|
children: page
|
|
4489
4520
|
}
|
|
4490
|
-
) : /* @__PURE__ */
|
|
4491
|
-
/* @__PURE__ */
|
|
4492
|
-
/* @__PURE__ */
|
|
4521
|
+
) : /* @__PURE__ */ jsx64("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)),
|
|
4522
|
+
/* @__PURE__ */ jsx64("span", { className: "px-2 py-1", children: "..." }),
|
|
4523
|
+
/* @__PURE__ */ jsx64(
|
|
4493
4524
|
Hyperlink,
|
|
4494
4525
|
{
|
|
4495
4526
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4497,7 +4528,7 @@ var DataList = (props) => {
|
|
|
4497
4528
|
children: pages - 1
|
|
4498
4529
|
}
|
|
4499
4530
|
),
|
|
4500
|
-
/* @__PURE__ */
|
|
4531
|
+
/* @__PURE__ */ jsx64(
|
|
4501
4532
|
Hyperlink,
|
|
4502
4533
|
{
|
|
4503
4534
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4505,7 +4536,7 @@ var DataList = (props) => {
|
|
|
4505
4536
|
children: pages
|
|
4506
4537
|
}
|
|
4507
4538
|
),
|
|
4508
|
-
/* @__PURE__ */
|
|
4539
|
+
/* @__PURE__ */ jsx64("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs35(
|
|
4509
4540
|
"select",
|
|
4510
4541
|
{
|
|
4511
4542
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -4517,18 +4548,18 @@ var DataList = (props) => {
|
|
|
4517
4548
|
}
|
|
4518
4549
|
},
|
|
4519
4550
|
children: [
|
|
4520
|
-
/* @__PURE__ */
|
|
4551
|
+
/* @__PURE__ */ jsx64("option", { className: "", value: "", children: "Jump to" }),
|
|
4521
4552
|
Array.from(
|
|
4522
4553
|
{ length: Math.max(0, pages - 10) },
|
|
4523
4554
|
(_, index) => index + 9
|
|
4524
|
-
).map((page) => /* @__PURE__ */
|
|
4555
|
+
).map((page) => /* @__PURE__ */ jsx64("option", { value: page, children: page }, page))
|
|
4525
4556
|
]
|
|
4526
4557
|
}
|
|
4527
4558
|
) })
|
|
4528
4559
|
] });
|
|
4529
4560
|
} else if (showLastPages) {
|
|
4530
4561
|
return /* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
4531
|
-
/* @__PURE__ */
|
|
4562
|
+
/* @__PURE__ */ jsx64(
|
|
4532
4563
|
Hyperlink,
|
|
4533
4564
|
{
|
|
4534
4565
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4536,7 +4567,7 @@ var DataList = (props) => {
|
|
|
4536
4567
|
children: "1"
|
|
4537
4568
|
}
|
|
4538
4569
|
),
|
|
4539
|
-
/* @__PURE__ */
|
|
4570
|
+
/* @__PURE__ */ jsx64(
|
|
4540
4571
|
Hyperlink,
|
|
4541
4572
|
{
|
|
4542
4573
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4544,21 +4575,21 @@ var DataList = (props) => {
|
|
|
4544
4575
|
children: "2"
|
|
4545
4576
|
}
|
|
4546
4577
|
),
|
|
4547
|
-
/* @__PURE__ */
|
|
4578
|
+
/* @__PURE__ */ jsx64("span", { className: "px-2 py-1", children: "..." }),
|
|
4548
4579
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
4549
|
-
(page) => /* @__PURE__ */
|
|
4580
|
+
(page) => /* @__PURE__ */ jsx64(React45.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx64(
|
|
4550
4581
|
Hyperlink,
|
|
4551
4582
|
{
|
|
4552
4583
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
4553
4584
|
href: builder.getNewPageUrl(page),
|
|
4554
4585
|
children: page
|
|
4555
4586
|
}
|
|
4556
|
-
) : /* @__PURE__ */
|
|
4587
|
+
) : /* @__PURE__ */ jsx64("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)
|
|
4557
4588
|
)
|
|
4558
4589
|
] });
|
|
4559
4590
|
} else {
|
|
4560
4591
|
return /* @__PURE__ */ jsxs35(Fragment10, { children: [
|
|
4561
|
-
/* @__PURE__ */
|
|
4592
|
+
/* @__PURE__ */ jsx64(
|
|
4562
4593
|
Hyperlink,
|
|
4563
4594
|
{
|
|
4564
4595
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4566,7 +4597,7 @@ var DataList = (props) => {
|
|
|
4566
4597
|
children: "1"
|
|
4567
4598
|
}
|
|
4568
4599
|
),
|
|
4569
|
-
/* @__PURE__ */
|
|
4600
|
+
/* @__PURE__ */ jsx64(
|
|
4570
4601
|
Hyperlink,
|
|
4571
4602
|
{
|
|
4572
4603
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4574,20 +4605,20 @@ var DataList = (props) => {
|
|
|
4574
4605
|
children: "2"
|
|
4575
4606
|
}
|
|
4576
4607
|
),
|
|
4577
|
-
/* @__PURE__ */
|
|
4608
|
+
/* @__PURE__ */ jsx64("span", { className: "px-2 py-1", children: "..." }),
|
|
4578
4609
|
Array.from(
|
|
4579
4610
|
{ length: 5 },
|
|
4580
4611
|
(_, index) => activePageNumber - 2 + index
|
|
4581
|
-
).map((page) => /* @__PURE__ */
|
|
4612
|
+
).map((page) => /* @__PURE__ */ jsx64(React45.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx64(
|
|
4582
4613
|
Hyperlink,
|
|
4583
4614
|
{
|
|
4584
4615
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
4585
4616
|
href: builder.getNewPageUrl(page),
|
|
4586
4617
|
children: page
|
|
4587
4618
|
}
|
|
4588
|
-
) : /* @__PURE__ */
|
|
4589
|
-
/* @__PURE__ */
|
|
4590
|
-
/* @__PURE__ */
|
|
4619
|
+
) : /* @__PURE__ */ jsx64("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)),
|
|
4620
|
+
/* @__PURE__ */ jsx64("span", { className: "px-2 py-1", children: "..." }),
|
|
4621
|
+
/* @__PURE__ */ jsx64(
|
|
4591
4622
|
Hyperlink,
|
|
4592
4623
|
{
|
|
4593
4624
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4595,7 +4626,7 @@ var DataList = (props) => {
|
|
|
4595
4626
|
children: pages - 1
|
|
4596
4627
|
}
|
|
4597
4628
|
),
|
|
4598
|
-
/* @__PURE__ */
|
|
4629
|
+
/* @__PURE__ */ jsx64(
|
|
4599
4630
|
Hyperlink,
|
|
4600
4631
|
{
|
|
4601
4632
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -4603,7 +4634,7 @@ var DataList = (props) => {
|
|
|
4603
4634
|
children: pages
|
|
4604
4635
|
}
|
|
4605
4636
|
),
|
|
4606
|
-
/* @__PURE__ */
|
|
4637
|
+
/* @__PURE__ */ jsx64("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs35(
|
|
4607
4638
|
"select",
|
|
4608
4639
|
{
|
|
4609
4640
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -4615,8 +4646,8 @@ var DataList = (props) => {
|
|
|
4615
4646
|
}
|
|
4616
4647
|
},
|
|
4617
4648
|
children: [
|
|
4618
|
-
/* @__PURE__ */
|
|
4619
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */
|
|
4649
|
+
/* @__PURE__ */ jsx64("option", { value: "", children: "Jump to" }),
|
|
4650
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ jsx64("option", { value: page, children: page }, page))
|
|
4620
4651
|
]
|
|
4621
4652
|
}
|
|
4622
4653
|
) })
|
|
@@ -4631,9 +4662,9 @@ var DataList = (props) => {
|
|
|
4631
4662
|
{
|
|
4632
4663
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md border-b border-neutral-200 sticky top-0`,
|
|
4633
4664
|
children: [
|
|
4634
|
-
props.title ? /* @__PURE__ */
|
|
4665
|
+
props.title ? /* @__PURE__ */ jsx64("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx64("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ jsx64("div", {}),
|
|
4635
4666
|
/* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-3", children: [
|
|
4636
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
4667
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx64(
|
|
4637
4668
|
InputControl_default,
|
|
4638
4669
|
{
|
|
4639
4670
|
name: filter.name,
|
|
@@ -4655,8 +4686,8 @@ var DataList = (props) => {
|
|
|
4655
4686
|
linkType: "Primary" /* Solid */,
|
|
4656
4687
|
href: props.addLinkHref,
|
|
4657
4688
|
children: [
|
|
4658
|
-
/* @__PURE__ */
|
|
4659
|
-
/* @__PURE__ */
|
|
4689
|
+
/* @__PURE__ */ jsx64(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
4690
|
+
/* @__PURE__ */ jsx64("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
4660
4691
|
]
|
|
4661
4692
|
}
|
|
4662
4693
|
)
|
|
@@ -4664,8 +4695,8 @@ var DataList = (props) => {
|
|
|
4664
4695
|
]
|
|
4665
4696
|
}
|
|
4666
4697
|
),
|
|
4667
|
-
/* @__PURE__ */
|
|
4668
|
-
/* @__PURE__ */
|
|
4698
|
+
/* @__PURE__ */ jsx64("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ jsxs35("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
4699
|
+
/* @__PURE__ */ jsx64("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ jsx64("tr", { children: props?.columns?.map((column) => {
|
|
4669
4700
|
let url = builder.getNewOrderByUrl(column.name);
|
|
4670
4701
|
let icon = "chevronUpDown";
|
|
4671
4702
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -4675,18 +4706,18 @@ var DataList = (props) => {
|
|
|
4675
4706
|
icon = "chevronUp";
|
|
4676
4707
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
4677
4708
|
}
|
|
4678
|
-
return /* @__PURE__ */
|
|
4709
|
+
return /* @__PURE__ */ jsx64(
|
|
4679
4710
|
"th",
|
|
4680
4711
|
{
|
|
4681
4712
|
className: "px-6 py-3 text-left font-medium bg-neutral-soft " + (column.enableSorting ? "cursor-pointer " : "") + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
4682
|
-
children: /* @__PURE__ */
|
|
4713
|
+
children: /* @__PURE__ */ jsx64(
|
|
4683
4714
|
Hyperlink,
|
|
4684
4715
|
{
|
|
4685
4716
|
href: column.enableSorting ? url : void 0,
|
|
4686
4717
|
className: "!text-neutral-contrast ",
|
|
4687
4718
|
children: /* @__PURE__ */ jsxs35("span", { className: "flex items-center space-x-1", children: [
|
|
4688
|
-
/* @__PURE__ */
|
|
4689
|
-
column.enableSorting && /* @__PURE__ */
|
|
4719
|
+
/* @__PURE__ */ jsx64("span", { className: "text-black", children: column.label }),
|
|
4720
|
+
column.enableSorting && /* @__PURE__ */ jsx64(Icon_default, { className: "w-4 h-4", name: icon })
|
|
4690
4721
|
] })
|
|
4691
4722
|
}
|
|
4692
4723
|
)
|
|
@@ -4694,24 +4725,24 @@ var DataList = (props) => {
|
|
|
4694
4725
|
column.name
|
|
4695
4726
|
);
|
|
4696
4727
|
}) }) }),
|
|
4697
|
-
/* @__PURE__ */
|
|
4728
|
+
/* @__PURE__ */ jsx64("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
4698
4729
|
let validityClass = "";
|
|
4699
4730
|
console.log("dataitem", dataitem);
|
|
4700
4731
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
4701
4732
|
validityClass = "bg-alert-200";
|
|
4702
4733
|
}
|
|
4703
|
-
return /* @__PURE__ */
|
|
4734
|
+
return /* @__PURE__ */ jsx64("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
4704
4735
|
console.log("column", column);
|
|
4705
|
-
return /* @__PURE__ */
|
|
4736
|
+
return /* @__PURE__ */ jsx64(React45.Fragment, { children: /* @__PURE__ */ jsx64(
|
|
4706
4737
|
"td",
|
|
4707
4738
|
{
|
|
4708
4739
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
4709
|
-
children: column.addhref === true ? /* @__PURE__ */
|
|
4740
|
+
children: column.addhref === true ? /* @__PURE__ */ jsx64(
|
|
4710
4741
|
Hyperlink,
|
|
4711
4742
|
{
|
|
4712
4743
|
className: "",
|
|
4713
4744
|
href: `https://${dataitem[column.name]}`,
|
|
4714
|
-
children: /* @__PURE__ */
|
|
4745
|
+
children: /* @__PURE__ */ jsx64(
|
|
4715
4746
|
ViewControl_default,
|
|
4716
4747
|
{
|
|
4717
4748
|
controlType: column.controlType,
|
|
@@ -4724,11 +4755,11 @@ var DataList = (props) => {
|
|
|
4724
4755
|
}
|
|
4725
4756
|
)
|
|
4726
4757
|
}
|
|
4727
|
-
) : column.showAsLink ? /* @__PURE__ */
|
|
4758
|
+
) : column.showAsLink ? /* @__PURE__ */ jsx64(
|
|
4728
4759
|
Hyperlink,
|
|
4729
4760
|
{
|
|
4730
4761
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
4731
|
-
children: /* @__PURE__ */
|
|
4762
|
+
children: /* @__PURE__ */ jsx64(
|
|
4732
4763
|
ViewControl_default,
|
|
4733
4764
|
{
|
|
4734
4765
|
controlType: column.controlType,
|
|
@@ -4738,7 +4769,7 @@ var DataList = (props) => {
|
|
|
4738
4769
|
}
|
|
4739
4770
|
)
|
|
4740
4771
|
}
|
|
4741
|
-
) : /* @__PURE__ */
|
|
4772
|
+
) : /* @__PURE__ */ jsx64(
|
|
4742
4773
|
ViewControl_default,
|
|
4743
4774
|
{
|
|
4744
4775
|
controlType: column.controlType,
|
|
@@ -4752,10 +4783,10 @@ var DataList = (props) => {
|
|
|
4752
4783
|
}) }, index);
|
|
4753
4784
|
}) })
|
|
4754
4785
|
] }) }),
|
|
4755
|
-
/* @__PURE__ */
|
|
4756
|
-
/* @__PURE__ */
|
|
4786
|
+
/* @__PURE__ */ jsx64("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ jsxs35("div", { className: "flex items-center justify-between", children: [
|
|
4787
|
+
/* @__PURE__ */ jsx64("div", { className: "text-gray-700", children: label }),
|
|
4757
4788
|
/* @__PURE__ */ jsxs35("div", { className: "flex space-x-2 items-center", children: [
|
|
4758
|
-
activePageNumber > 1 && /* @__PURE__ */
|
|
4789
|
+
activePageNumber > 1 && /* @__PURE__ */ jsx64(
|
|
4759
4790
|
Hyperlink,
|
|
4760
4791
|
{
|
|
4761
4792
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -4763,9 +4794,9 @@ var DataList = (props) => {
|
|
|
4763
4794
|
children: "Prev"
|
|
4764
4795
|
}
|
|
4765
4796
|
),
|
|
4766
|
-
activePageNumber <= 1 && /* @__PURE__ */
|
|
4797
|
+
activePageNumber <= 1 && /* @__PURE__ */ jsx64("div", { className: "px-3 py-1 rounded-l-md border border-gray-300 bg-gray-200 text-gray-500 hover:bg-gray-200", children: "Prev" }),
|
|
4767
4798
|
renderPageNumbers(),
|
|
4768
|
-
activePageNumber < pages && /* @__PURE__ */
|
|
4799
|
+
activePageNumber < pages && /* @__PURE__ */ jsx64(
|
|
4769
4800
|
Hyperlink,
|
|
4770
4801
|
{
|
|
4771
4802
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -4773,7 +4804,7 @@ var DataList = (props) => {
|
|
|
4773
4804
|
children: "Next"
|
|
4774
4805
|
}
|
|
4775
4806
|
),
|
|
4776
|
-
activePageNumber >= pages && /* @__PURE__ */
|
|
4807
|
+
activePageNumber >= pages && /* @__PURE__ */ jsx64("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
4777
4808
|
] })
|
|
4778
4809
|
] }) })
|
|
4779
4810
|
] }),
|
|
@@ -4783,9 +4814,9 @@ var DataList = (props) => {
|
|
|
4783
4814
|
{
|
|
4784
4815
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md border-b border-neutral-200`,
|
|
4785
4816
|
children: [
|
|
4786
|
-
props.title ? /* @__PURE__ */
|
|
4817
|
+
props.title ? /* @__PURE__ */ jsx64("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx64("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ jsx64("div", {}),
|
|
4787
4818
|
/* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-3", children: [
|
|
4788
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
4819
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx64(
|
|
4789
4820
|
InputControl_default,
|
|
4790
4821
|
{
|
|
4791
4822
|
name: filter.name,
|
|
@@ -4807,8 +4838,8 @@ var DataList = (props) => {
|
|
|
4807
4838
|
linkType: "Primary" /* Solid */,
|
|
4808
4839
|
href: props.addLinkHref,
|
|
4809
4840
|
children: [
|
|
4810
|
-
/* @__PURE__ */
|
|
4811
|
-
/* @__PURE__ */
|
|
4841
|
+
/* @__PURE__ */ jsx64(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
4842
|
+
/* @__PURE__ */ jsx64("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
4812
4843
|
]
|
|
4813
4844
|
}
|
|
4814
4845
|
)
|
|
@@ -4817,7 +4848,7 @@ var DataList = (props) => {
|
|
|
4817
4848
|
}
|
|
4818
4849
|
),
|
|
4819
4850
|
/* @__PURE__ */ jsxs35("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
4820
|
-
/* @__PURE__ */
|
|
4851
|
+
/* @__PURE__ */ jsx64("div", { children: /* @__PURE__ */ jsx64("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ jsx64("thead", { className: "bg-gray-50", children: /* @__PURE__ */ jsx64("tr", { children: props?.columns?.map((column) => {
|
|
4821
4852
|
let url = builder.getNewOrderByUrl(column.name);
|
|
4822
4853
|
let icon = "chevronUpDown";
|
|
4823
4854
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -4827,18 +4858,18 @@ var DataList = (props) => {
|
|
|
4827
4858
|
icon = "chevronUp";
|
|
4828
4859
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
4829
4860
|
}
|
|
4830
|
-
return /* @__PURE__ */
|
|
4861
|
+
return /* @__PURE__ */ jsx64(
|
|
4831
4862
|
"th",
|
|
4832
4863
|
{
|
|
4833
4864
|
className: "px-6 py-3 text-left font-medium bg-neutral-soft " + (column.enableSorting ? "cursor-pointer " : "") + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
4834
|
-
children: /* @__PURE__ */
|
|
4865
|
+
children: /* @__PURE__ */ jsx64(
|
|
4835
4866
|
Hyperlink,
|
|
4836
4867
|
{
|
|
4837
4868
|
href: column.enableSorting ? url : void 0,
|
|
4838
4869
|
className: "text-body-950",
|
|
4839
4870
|
children: /* @__PURE__ */ jsxs35("span", { className: "flex items-center space-x-1", children: [
|
|
4840
|
-
/* @__PURE__ */
|
|
4841
|
-
column.enableSorting && /* @__PURE__ */
|
|
4871
|
+
/* @__PURE__ */ jsx64("span", { children: column.label }),
|
|
4872
|
+
column.enableSorting && /* @__PURE__ */ jsx64(Icon_default, { className: "w-4 h-4", name: icon })
|
|
4842
4873
|
] })
|
|
4843
4874
|
}
|
|
4844
4875
|
)
|
|
@@ -4846,7 +4877,7 @@ var DataList = (props) => {
|
|
|
4846
4877
|
column.name
|
|
4847
4878
|
);
|
|
4848
4879
|
}) }) }) }) }),
|
|
4849
|
-
/* @__PURE__ */
|
|
4880
|
+
/* @__PURE__ */ jsx64("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
4850
4881
|
] })
|
|
4851
4882
|
] })
|
|
4852
4883
|
] });
|
|
@@ -4856,7 +4887,7 @@ var DataList_default = DataList;
|
|
|
4856
4887
|
// src/components/dataForm/DataListRenderer.tsx
|
|
4857
4888
|
import React46, { useState as useState9, useEffect as useEffect10 } from "react";
|
|
4858
4889
|
import { usePathname as usePathname2 } from "next/navigation";
|
|
4859
|
-
import { jsx as
|
|
4890
|
+
import { jsx as jsx65, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4860
4891
|
var viewControlMap = {
|
|
4861
4892
|
number: ViewControlTypes.number,
|
|
4862
4893
|
lineText: ViewControlTypes.lineText,
|
|
@@ -4946,8 +4977,8 @@ var DataListRenderer = ({
|
|
|
4946
4977
|
const activeTab = tabItem?.find((tab) => tab.isActive);
|
|
4947
4978
|
const activeHref = activeTab ? resolveRoutePlaceholders2(activeTab.landingPageUrl, params) : pathname;
|
|
4948
4979
|
return /* @__PURE__ */ jsxs36(React46.Fragment, { children: [
|
|
4949
|
-
widgetProps && /* @__PURE__ */
|
|
4950
|
-
/* @__PURE__ */
|
|
4980
|
+
widgetProps && /* @__PURE__ */ jsx65(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
4981
|
+
/* @__PURE__ */ jsx65(
|
|
4951
4982
|
DataList_default,
|
|
4952
4983
|
{
|
|
4953
4984
|
addLinkHref,
|
|
@@ -4992,7 +5023,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
4992
5023
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
4993
5024
|
|
|
4994
5025
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
4995
|
-
import { jsx as
|
|
5026
|
+
import { jsx as jsx66, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4996
5027
|
var DataFormChildSection = (props) => {
|
|
4997
5028
|
const { section } = props;
|
|
4998
5029
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -5060,14 +5091,14 @@ var DataFormChildSection = (props) => {
|
|
|
5060
5091
|
childItemsToRender,
|
|
5061
5092
|
allChildItems: childItems
|
|
5062
5093
|
});
|
|
5063
|
-
return /* @__PURE__ */
|
|
5064
|
-
section.sectionTitle && /* @__PURE__ */
|
|
5065
|
-
/* @__PURE__ */
|
|
5066
|
-
/* @__PURE__ */
|
|
5067
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */
|
|
5094
|
+
return /* @__PURE__ */ jsx66(React47.Fragment, { children: /* @__PURE__ */ jsxs37("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
5095
|
+
section.sectionTitle && /* @__PURE__ */ jsx66("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
5096
|
+
/* @__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: [
|
|
5097
|
+
/* @__PURE__ */ jsx66("div", { children: /* @__PURE__ */ jsxs37("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
5098
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ jsx66("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
5068
5099
|
return /* @__PURE__ */ jsxs37("tr", { className: "", children: [
|
|
5069
5100
|
sectionRow.elements.map((field, index) => {
|
|
5070
|
-
return /* @__PURE__ */
|
|
5101
|
+
return /* @__PURE__ */ jsx66(
|
|
5071
5102
|
"th",
|
|
5072
5103
|
{
|
|
5073
5104
|
className: "py-3 font-normal text-left",
|
|
@@ -5076,13 +5107,13 @@ var DataFormChildSection = (props) => {
|
|
|
5076
5107
|
field.name
|
|
5077
5108
|
);
|
|
5078
5109
|
}),
|
|
5079
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
5110
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx66("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
5080
5111
|
] }, sectionRowIndex);
|
|
5081
5112
|
}) }),
|
|
5082
|
-
/* @__PURE__ */
|
|
5113
|
+
/* @__PURE__ */ jsx66("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
5083
5114
|
const { item, originalIndex } = visibleItem;
|
|
5084
5115
|
const rowKey = originalIndex;
|
|
5085
|
-
return /* @__PURE__ */
|
|
5116
|
+
return /* @__PURE__ */ jsx66(React47.Fragment, { children: section.sectionRows.map(
|
|
5086
5117
|
(sectionRow, sectionRowIndex) => {
|
|
5087
5118
|
return /* @__PURE__ */ jsxs37(
|
|
5088
5119
|
"tr",
|
|
@@ -5090,7 +5121,7 @@ var DataFormChildSection = (props) => {
|
|
|
5090
5121
|
className: "",
|
|
5091
5122
|
children: [
|
|
5092
5123
|
sectionRow.elements.map((field, index) => {
|
|
5093
|
-
return /* @__PURE__ */
|
|
5124
|
+
return /* @__PURE__ */ jsx66("td", { children: /* @__PURE__ */ jsx66("div", { className: "flex-1", children: /* @__PURE__ */ jsx66("div", { className: "w-11/12", children: /* @__PURE__ */ jsx66(
|
|
5094
5125
|
InputControl_default,
|
|
5095
5126
|
{
|
|
5096
5127
|
index: filteredIndex,
|
|
@@ -5110,7 +5141,7 @@ var DataFormChildSection = (props) => {
|
|
|
5110
5141
|
}
|
|
5111
5142
|
) }) }) }, field.name);
|
|
5112
5143
|
}),
|
|
5113
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
5144
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx66("td", { children: /* @__PURE__ */ jsx66(
|
|
5114
5145
|
ClientButton_default,
|
|
5115
5146
|
{
|
|
5116
5147
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -5119,7 +5150,7 @@ var DataFormChildSection = (props) => {
|
|
|
5119
5150
|
},
|
|
5120
5151
|
dataRole: "delete",
|
|
5121
5152
|
tabIndex: -1,
|
|
5122
|
-
children: /* @__PURE__ */
|
|
5153
|
+
children: /* @__PURE__ */ jsx66(
|
|
5123
5154
|
Icon_default,
|
|
5124
5155
|
{
|
|
5125
5156
|
className: "w-4 h-4",
|
|
@@ -5136,7 +5167,7 @@ var DataFormChildSection = (props) => {
|
|
|
5136
5167
|
) }, rowKey);
|
|
5137
5168
|
}) })
|
|
5138
5169
|
] }) }),
|
|
5139
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */
|
|
5170
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ jsx66("div", { className: "ml-1", children: /* @__PURE__ */ jsx66(
|
|
5140
5171
|
ClientButton_default,
|
|
5141
5172
|
{
|
|
5142
5173
|
ButtonType: "Link" /* Link */,
|
|
@@ -5151,7 +5182,7 @@ var DataFormChildSection = (props) => {
|
|
|
5151
5182
|
var DataFormChildSection_default = DataFormChildSection;
|
|
5152
5183
|
|
|
5153
5184
|
// src/components/dataForm/DataForm.tsx
|
|
5154
|
-
import { jsx as
|
|
5185
|
+
import { jsx as jsx67, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
5155
5186
|
var DataForm = (props) => {
|
|
5156
5187
|
const formRef = useRef4(null);
|
|
5157
5188
|
console.log(props.dataItem, "dssads");
|
|
@@ -5371,19 +5402,19 @@ var DataForm = (props) => {
|
|
|
5371
5402
|
return false;
|
|
5372
5403
|
}
|
|
5373
5404
|
}
|
|
5374
|
-
return /* @__PURE__ */
|
|
5375
|
-
props.title && /* @__PURE__ */
|
|
5405
|
+
return /* @__PURE__ */ jsx67(React48.Fragment, { children: /* @__PURE__ */ jsxs38("div", { className: "flex-grow flex flex-col", children: [
|
|
5406
|
+
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(
|
|
5376
5407
|
"div",
|
|
5377
5408
|
{
|
|
5378
5409
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
5379
5410
|
onClick: () => window.history.back(),
|
|
5380
5411
|
children: [
|
|
5381
|
-
/* @__PURE__ */
|
|
5382
|
-
/* @__PURE__ */
|
|
5412
|
+
/* @__PURE__ */ jsx67(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
5413
|
+
/* @__PURE__ */ jsx67("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
5383
5414
|
]
|
|
5384
5415
|
}
|
|
5385
5416
|
) }),
|
|
5386
|
-
/* @__PURE__ */
|
|
5417
|
+
/* @__PURE__ */ jsx67(
|
|
5387
5418
|
"form",
|
|
5388
5419
|
{
|
|
5389
5420
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -5404,8 +5435,8 @@ var DataForm = (props) => {
|
|
|
5404
5435
|
}
|
|
5405
5436
|
}
|
|
5406
5437
|
},
|
|
5407
|
-
children: /* @__PURE__ */
|
|
5408
|
-
return /* @__PURE__ */
|
|
5438
|
+
children: /* @__PURE__ */ jsx67("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
5439
|
+
return /* @__PURE__ */ jsx67(React48.Fragment, { children: !section.isChildSection && /* @__PURE__ */ jsxs38("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
5409
5440
|
section.sectionRows?.map(
|
|
5410
5441
|
(sectionRow, sectionRowIndex) => {
|
|
5411
5442
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -5416,14 +5447,14 @@ var DataForm = (props) => {
|
|
|
5416
5447
|
sectionRow.visible
|
|
5417
5448
|
);
|
|
5418
5449
|
}
|
|
5419
|
-
return /* @__PURE__ */
|
|
5450
|
+
return /* @__PURE__ */ jsx67(React48.Fragment, { children: isVisible && /* @__PURE__ */ jsx67("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
5420
5451
|
return /* @__PURE__ */ jsxs38(
|
|
5421
5452
|
"div",
|
|
5422
5453
|
{
|
|
5423
5454
|
className: sectionRow.grow ? "grow" : "",
|
|
5424
5455
|
children: [
|
|
5425
|
-
/* @__PURE__ */
|
|
5426
|
-
/* @__PURE__ */
|
|
5456
|
+
/* @__PURE__ */ jsx67("div", { children: field.controlType }),
|
|
5457
|
+
/* @__PURE__ */ jsx67(
|
|
5427
5458
|
InputControl_default,
|
|
5428
5459
|
{
|
|
5429
5460
|
name: field.name,
|
|
@@ -5453,12 +5484,12 @@ var DataForm = (props) => {
|
|
|
5453
5484
|
}) }) }, sectionRowIndex);
|
|
5454
5485
|
}
|
|
5455
5486
|
),
|
|
5456
|
-
/* @__PURE__ */
|
|
5487
|
+
/* @__PURE__ */ jsx67("div", { children: section.childSections?.map(
|
|
5457
5488
|
(childSection, childSectionIndex) => {
|
|
5458
|
-
return /* @__PURE__ */
|
|
5489
|
+
return /* @__PURE__ */ jsx67("div", { children: childSection.name && evalutateCondition(
|
|
5459
5490
|
formState.inputValues,
|
|
5460
5491
|
childSection.visible
|
|
5461
|
-
) && /* @__PURE__ */
|
|
5492
|
+
) && /* @__PURE__ */ jsx67(
|
|
5462
5493
|
DataFormChildSection_default,
|
|
5463
5494
|
{
|
|
5464
5495
|
section: childSection,
|
|
@@ -5474,7 +5505,7 @@ var DataForm = (props) => {
|
|
|
5474
5505
|
}
|
|
5475
5506
|
),
|
|
5476
5507
|
/* @__PURE__ */ jsxs38("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
5477
|
-
/* @__PURE__ */
|
|
5508
|
+
/* @__PURE__ */ jsx67("div", { children: props.additionalActions && /* @__PURE__ */ jsx67(
|
|
5478
5509
|
Button_default,
|
|
5479
5510
|
{
|
|
5480
5511
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -5482,7 +5513,7 @@ var DataForm = (props) => {
|
|
|
5482
5513
|
children: props.additionalActions.title
|
|
5483
5514
|
}
|
|
5484
5515
|
) }),
|
|
5485
|
-
/* @__PURE__ */
|
|
5516
|
+
/* @__PURE__ */ jsx67("div", { children: props.onDelete && /* @__PURE__ */ jsx67(
|
|
5486
5517
|
Button_default,
|
|
5487
5518
|
{
|
|
5488
5519
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -5493,7 +5524,7 @@ var DataForm = (props) => {
|
|
|
5493
5524
|
children: "Delete"
|
|
5494
5525
|
}
|
|
5495
5526
|
) }),
|
|
5496
|
-
/* @__PURE__ */
|
|
5527
|
+
/* @__PURE__ */ jsx67("div", { children: props.onClick && /* @__PURE__ */ jsx67(
|
|
5497
5528
|
Button_default,
|
|
5498
5529
|
{
|
|
5499
5530
|
onValidate,
|
|
@@ -5510,7 +5541,7 @@ var DataForm = (props) => {
|
|
|
5510
5541
|
var DataForm_default = DataForm;
|
|
5511
5542
|
|
|
5512
5543
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
5513
|
-
import { jsx as
|
|
5544
|
+
import { jsx as jsx68, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
5514
5545
|
function getAction(actions, code) {
|
|
5515
5546
|
return actions?.find((a) => a.actionCode === code);
|
|
5516
5547
|
}
|
|
@@ -5537,8 +5568,8 @@ var DataFormRenderer = ({
|
|
|
5537
5568
|
);
|
|
5538
5569
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
5539
5570
|
return /* @__PURE__ */ jsxs39("div", { className: "flex-grow flex flex-col", children: [
|
|
5540
|
-
widgetProps && /* @__PURE__ */
|
|
5541
|
-
/* @__PURE__ */
|
|
5571
|
+
widgetProps && /* @__PURE__ */ jsx68(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
5572
|
+
/* @__PURE__ */ jsx68(
|
|
5542
5573
|
DataForm_default,
|
|
5543
5574
|
{
|
|
5544
5575
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|