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