@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260326053312 → 0.8.1-dev.20260326055821
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +17 -12
- package/dist/index.d.ts +17 -12
- package/dist/index.js +634 -671
- package/dist/index.mjs +512 -549
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -12,23 +12,26 @@ function getWidget(code) {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
// src/components/controls/view/ViewControl.tsx
|
|
15
|
-
import
|
|
15
|
+
import React9 from "react";
|
|
16
16
|
|
|
17
17
|
// src/components/controls/view/ViewControlTypes.tsx
|
|
18
18
|
var ViewControlTypes = {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
19
|
+
lineText: "lineText",
|
|
20
|
+
asset: "asset",
|
|
21
|
+
multilineTextBullets: "multilineTextBullets",
|
|
22
|
+
money: "money",
|
|
23
|
+
date: "date",
|
|
24
|
+
time: "time",
|
|
25
|
+
datetime: "datetime",
|
|
26
|
+
number: "number",
|
|
27
|
+
multilineText: "multilineText",
|
|
28
|
+
moneyText: "moneyText",
|
|
29
|
+
percentage: "percentage",
|
|
30
|
+
statusBg: "statusBg",
|
|
31
|
+
progressIndicator: "progressIndicator",
|
|
32
|
+
timeUntilStarts: "timeUntilStarts",
|
|
33
|
+
timeUntilStartsStyled: "timeUntilStartsStyled",
|
|
34
|
+
aiGeneratedSummary: "aiGeneratedSummary"
|
|
32
35
|
};
|
|
33
36
|
var ViewControlTypes_default = ViewControlTypes;
|
|
34
37
|
|
|
@@ -49,8 +52,6 @@ var DateView = (props) => {
|
|
|
49
52
|
let timezone;
|
|
50
53
|
try {
|
|
51
54
|
const val = props.value && props.value.toString().includes("Z") ? props.value : props.value + "Z";
|
|
52
|
-
{
|
|
53
|
-
}
|
|
54
55
|
const parsedDate = new Date(val);
|
|
55
56
|
const timezoneOffset = parsedDate.getTimezoneOffset();
|
|
56
57
|
timezone = moment.tz.zone(moment.tz.guess())?.abbr(timezoneOffset);
|
|
@@ -88,147 +89,109 @@ var DateView = (props) => {
|
|
|
88
89
|
};
|
|
89
90
|
var DateView_default = DateView;
|
|
90
91
|
|
|
91
|
-
// src/components/controls/view/
|
|
92
|
+
// src/components/controls/view/LineTextView.tsx
|
|
92
93
|
import React3 from "react";
|
|
93
94
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
94
|
-
var BooleanView = (props) => {
|
|
95
|
-
const { value, customProps } = props;
|
|
96
|
-
const showOnlyTrueIcon = customProps?.showOnlyTrueIcon;
|
|
97
|
-
console.log("BooleanView Debug:", {
|
|
98
|
-
value,
|
|
99
|
-
type: typeof value,
|
|
100
|
-
customProps,
|
|
101
|
-
showOnlyTrueIcon
|
|
102
|
-
});
|
|
103
|
-
const booleanValue = React3.useMemo(() => {
|
|
104
|
-
if (typeof value === "boolean") return value;
|
|
105
|
-
if (typeof value === "string") {
|
|
106
|
-
return value.toLowerCase() === "true";
|
|
107
|
-
}
|
|
108
|
-
if (typeof value === "number") {
|
|
109
|
-
return value === 1;
|
|
110
|
-
}
|
|
111
|
-
return false;
|
|
112
|
-
}, [value]);
|
|
113
|
-
if (showOnlyTrueIcon) {
|
|
114
|
-
return /* @__PURE__ */ jsx3(React3.Fragment, { children: booleanValue === true && /* @__PURE__ */ jsx3(
|
|
115
|
-
"svg",
|
|
116
|
-
{
|
|
117
|
-
className: "w-15 h-8 text-green-600",
|
|
118
|
-
fill: "currentColor",
|
|
119
|
-
viewBox: "0 0 20 20",
|
|
120
|
-
children: /* @__PURE__ */ jsx3(
|
|
121
|
-
"path",
|
|
122
|
-
{
|
|
123
|
-
fillRule: "evenodd",
|
|
124
|
-
d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
|
|
125
|
-
clipRule: "evenodd"
|
|
126
|
-
}
|
|
127
|
-
)
|
|
128
|
-
}
|
|
129
|
-
) });
|
|
130
|
-
}
|
|
131
|
-
return /* @__PURE__ */ jsx3(React3.Fragment, { children: booleanValue ? "true" : "false" });
|
|
132
|
-
};
|
|
133
|
-
var BooleanView_default = BooleanView;
|
|
134
|
-
|
|
135
|
-
// src/components/controls/view/LineTextView.tsx
|
|
136
|
-
import React4 from "react";
|
|
137
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
138
95
|
var LineText = (props) => {
|
|
139
|
-
return /* @__PURE__ */
|
|
96
|
+
return /* @__PURE__ */ jsx3(React3.Fragment, { children: props.value });
|
|
140
97
|
};
|
|
141
98
|
var LineTextView_default = LineText;
|
|
142
99
|
|
|
143
|
-
// src/components/controls/view/EmailTextView.tsx
|
|
144
|
-
import React5 from "react";
|
|
145
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
146
|
-
var EmailText = (props) => {
|
|
147
|
-
return /* @__PURE__ */ jsx5(React5.Fragment, { children: props.value });
|
|
148
|
-
};
|
|
149
|
-
var EmailTextView_default = EmailText;
|
|
150
|
-
|
|
151
|
-
// src/components/controls/view/StatusBgView.tsx
|
|
152
|
-
import React6 from "react";
|
|
153
|
-
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
154
|
-
var StatusBg = (props) => {
|
|
155
|
-
return /* @__PURE__ */ jsx6(React6.Fragment, { children: props.value && props.value != "" && /* @__PURE__ */ jsx6("span", { className: "py-0.5 px-1.5 text-xs capitalize text-white font-semibold rounded bg-status bg-status-" + props.value, children: props.value }) });
|
|
156
|
-
};
|
|
157
|
-
var StatusBgView_default = StatusBg;
|
|
158
|
-
|
|
159
|
-
// src/components/controls/view/StatusView.tsx
|
|
160
|
-
import React7 from "react";
|
|
161
|
-
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
162
|
-
var Status = (props) => {
|
|
163
|
-
return /* @__PURE__ */ jsx7(React7.Fragment, { children: /* @__PURE__ */ jsx7("span", { className: "capitalize font-semibold rounded text-status text-status-" + props.value, children: props.value }) });
|
|
164
|
-
};
|
|
165
|
-
var StatusView_default = Status;
|
|
166
|
-
|
|
167
100
|
// src/components/controls/view/MoneyView.tsx
|
|
168
|
-
import
|
|
169
|
-
import { jsx as
|
|
101
|
+
import React4 from "react";
|
|
102
|
+
import { jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
170
103
|
var Money = (props) => {
|
|
171
|
-
{
|
|
172
|
-
}
|
|
173
104
|
const parsedNumber = parseFloat(props.value);
|
|
174
|
-
return /* @__PURE__ */
|
|
175
|
-
/* @__PURE__ */
|
|
105
|
+
return /* @__PURE__ */ jsx4(React4.Fragment, { children: !Number.isNaN(parsedNumber) && /* @__PURE__ */ jsxs("span", { className: parsedNumber < 0 ? "text-alert" : "", children: [
|
|
106
|
+
/* @__PURE__ */ jsx4("span", { className: "mr-0.5", children: "\u20B9" }),
|
|
176
107
|
parsedNumber.toLocaleString()
|
|
177
108
|
] }) });
|
|
178
109
|
};
|
|
179
110
|
var MoneyView_default = Money;
|
|
180
111
|
|
|
181
112
|
// src/components/controls/view/MultilineTextBulletsView.tsx
|
|
182
|
-
import
|
|
183
|
-
import { jsx as
|
|
113
|
+
import React5 from "react";
|
|
114
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
184
115
|
var MultilineTextBullets = (props) => {
|
|
185
|
-
{
|
|
186
|
-
}
|
|
187
116
|
const lines = props.value?.split("\\n");
|
|
188
|
-
return /* @__PURE__ */
|
|
189
|
-
return /* @__PURE__ */
|
|
117
|
+
return /* @__PURE__ */ jsx5(React5.Fragment, { children: /* @__PURE__ */ jsx5("ul", { className: "list-disc", children: lines && lines.map((line, index) => {
|
|
118
|
+
return /* @__PURE__ */ jsx5("li", { children: line }, index);
|
|
190
119
|
}) }) });
|
|
191
120
|
};
|
|
192
121
|
var MultilineTextBulletsView_default = MultilineTextBullets;
|
|
193
122
|
|
|
194
123
|
// src/components/controls/view/MultilineTextView.tsx
|
|
195
|
-
import
|
|
196
|
-
import { jsx as
|
|
124
|
+
import React6 from "react";
|
|
125
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
197
126
|
var MultilineText = (props) => {
|
|
198
|
-
return /* @__PURE__ */
|
|
127
|
+
return /* @__PURE__ */ jsx6(React6.Fragment, { children: /* @__PURE__ */ jsx6("span", { className: "whitespace-pre-line", children: props.value }) });
|
|
199
128
|
};
|
|
200
129
|
var MultilineTextView_default = MultilineText;
|
|
201
130
|
|
|
131
|
+
// src/components/controls/view/PercentageView.tsx
|
|
132
|
+
import React7 from "react";
|
|
133
|
+
import { jsxs as jsxs2 } from "react/jsx-runtime";
|
|
134
|
+
var PercentageView = (props) => {
|
|
135
|
+
return /* @__PURE__ */ jsxs2(React7.Fragment, { children: [
|
|
136
|
+
props.value,
|
|
137
|
+
"%"
|
|
138
|
+
] });
|
|
139
|
+
};
|
|
140
|
+
var PercentageView_default = PercentageView;
|
|
141
|
+
|
|
142
|
+
// src/components/controls/view/ProgressIndicator.tsx
|
|
143
|
+
import React8 from "react";
|
|
144
|
+
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
145
|
+
var ProgressIndicator = (props) => {
|
|
146
|
+
const percentage = 100;
|
|
147
|
+
const circumference = Math.PI * 56;
|
|
148
|
+
const offset = circumference * (1 - percentage / 100);
|
|
149
|
+
return /* @__PURE__ */ jsx7(React8.Fragment, { children: /* @__PURE__ */ jsxs3("div", { className: "relative w-48 h-48", children: [
|
|
150
|
+
/* @__PURE__ */ jsx7("div", { className: "absolute top-0 left-0 w-full h-full rounded-full border border-gray-200" }),
|
|
151
|
+
/* @__PURE__ */ jsx7("div", { className: "absolute top-0 left-0 w-full h-full rounded-full overflow-hidden", children: /* @__PURE__ */ jsx7("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)` } }) }),
|
|
152
|
+
/* @__PURE__ */ jsx7("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: [
|
|
153
|
+
percentage,
|
|
154
|
+
"%"
|
|
155
|
+
] }) })
|
|
156
|
+
] }) });
|
|
157
|
+
};
|
|
158
|
+
var ProgressIndicator_default = ProgressIndicator;
|
|
159
|
+
|
|
202
160
|
// src/components/controls/view/ViewControl.tsx
|
|
203
|
-
import { jsx as
|
|
204
|
-
var ViewControl =
|
|
161
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
162
|
+
var ViewControl = React9.forwardRef(
|
|
205
163
|
(props, ref) => {
|
|
206
164
|
const ControlComponents = {
|
|
207
|
-
[ViewControlTypes_default.
|
|
208
|
-
[
|
|
209
|
-
[ViewControlTypes_default.
|
|
210
|
-
[ViewControlTypes_default.
|
|
211
|
-
[ViewControlTypes_default.
|
|
212
|
-
[ViewControlTypes_default.
|
|
213
|
-
[ViewControlTypes_default.
|
|
214
|
-
[ViewControlTypes_default.
|
|
215
|
-
[ViewControlTypes_default.
|
|
216
|
-
[ViewControlTypes_default.
|
|
217
|
-
|
|
165
|
+
[ViewControlTypes_default.lineText]: LineTextView_default,
|
|
166
|
+
// [ViewControlTypes.asset]: Asset,
|
|
167
|
+
[ViewControlTypes_default.multilineTextBullets]: MultilineTextBulletsView_default,
|
|
168
|
+
[ViewControlTypes_default.money]: MoneyView_default,
|
|
169
|
+
[ViewControlTypes_default.date]: DateView_default,
|
|
170
|
+
[ViewControlTypes_default.time]: DateView_default,
|
|
171
|
+
[ViewControlTypes_default.datetime]: DateView_default,
|
|
172
|
+
[ViewControlTypes_default.number]: NumberView_default,
|
|
173
|
+
[ViewControlTypes_default.multilineText]: MultilineTextView_default,
|
|
174
|
+
[ViewControlTypes_default.moneyText]: MoneyView_default,
|
|
175
|
+
[ViewControlTypes_default.percentage]: PercentageView_default,
|
|
176
|
+
// [ViewControlTypes.statusBg]: StatusBg,
|
|
177
|
+
[ViewControlTypes_default.progressIndicator]: ProgressIndicator_default
|
|
178
|
+
// [ViewControlTypes.timeUntilStarts]: TimeUntilStarts,
|
|
179
|
+
// [ViewControlTypes.timeUntilStartsStyled]: TimeUntilStartsStyled,
|
|
180
|
+
// [ViewControlTypes.aiGeneratedSummary]: AiGeneratedSummary,
|
|
218
181
|
};
|
|
219
182
|
const SelectedControlComponent = props.controlType ? ControlComponents[props.controlType] : void 0;
|
|
220
|
-
return /* @__PURE__ */
|
|
183
|
+
return /* @__PURE__ */ jsx8(React9.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx8(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
221
184
|
}
|
|
222
185
|
);
|
|
223
186
|
ViewControl.displayName = "ViewControl";
|
|
224
187
|
var ViewControl_default = ViewControl;
|
|
225
188
|
|
|
226
189
|
// src/components/controls/edit/InputControl.tsx
|
|
227
|
-
import
|
|
190
|
+
import React29 from "react";
|
|
228
191
|
|
|
229
192
|
// src/components/controls/edit/MultilineTextInput.tsx
|
|
230
|
-
import
|
|
231
|
-
import { jsx as
|
|
193
|
+
import React10 from "react";
|
|
194
|
+
import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
232
195
|
var MultilineTextInput = (props) => {
|
|
233
196
|
const textChangeHandler = (event) => {
|
|
234
197
|
const text = event.target.value;
|
|
@@ -247,11 +210,11 @@ var MultilineTextInput = (props) => {
|
|
|
247
210
|
if (props.value !== void 0 && props.value !== null) {
|
|
248
211
|
value = props.value;
|
|
249
212
|
}
|
|
250
|
-
return /* @__PURE__ */
|
|
251
|
-
/* @__PURE__ */
|
|
213
|
+
return /* @__PURE__ */ jsx9(React10.Fragment, { children: /* @__PURE__ */ jsxs4("label", { className: "block mb-1", children: [
|
|
214
|
+
/* @__PURE__ */ jsx9("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
252
215
|
" ",
|
|
253
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
254
|
-
/* @__PURE__ */
|
|
216
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx9("span", { className: "text-alert", children: "*" }),
|
|
217
|
+
/* @__PURE__ */ jsx9(
|
|
255
218
|
"textarea",
|
|
256
219
|
{
|
|
257
220
|
name: props.name,
|
|
@@ -268,14 +231,14 @@ var MultilineTextInput = (props) => {
|
|
|
268
231
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
|
|
269
232
|
}
|
|
270
233
|
),
|
|
271
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ jsx9("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
272
235
|
] }) });
|
|
273
236
|
};
|
|
274
237
|
var MultilineTextInput_default = MultilineTextInput;
|
|
275
238
|
|
|
276
239
|
// src/components/controls/edit/LineTextInput.tsx
|
|
277
|
-
import
|
|
278
|
-
import { jsx as
|
|
240
|
+
import React11 from "react";
|
|
241
|
+
import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
279
242
|
var LineTextInput = (props) => {
|
|
280
243
|
const textChangeHandler = (event) => {
|
|
281
244
|
const text = event.target.value;
|
|
@@ -294,11 +257,11 @@ var LineTextInput = (props) => {
|
|
|
294
257
|
if (props.value !== void 0 && props.value !== null) {
|
|
295
258
|
value = props.value;
|
|
296
259
|
}
|
|
297
|
-
return /* @__PURE__ */
|
|
298
|
-
props?.attributes?.label && /* @__PURE__ */
|
|
260
|
+
return /* @__PURE__ */ jsx10(React11.Fragment, { children: /* @__PURE__ */ jsxs5("label", { className: "block", children: [
|
|
261
|
+
props?.attributes?.label && /* @__PURE__ */ jsx10("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
299
262
|
" ",
|
|
300
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
301
|
-
/* @__PURE__ */
|
|
263
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx10("span", { className: "text-alert", children: "*" }),
|
|
264
|
+
/* @__PURE__ */ jsx10(
|
|
302
265
|
"input",
|
|
303
266
|
{
|
|
304
267
|
type: "text",
|
|
@@ -320,14 +283,14 @@ var LineTextInput = (props) => {
|
|
|
320
283
|
`
|
|
321
284
|
}
|
|
322
285
|
),
|
|
323
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ jsx10("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
324
287
|
] }) });
|
|
325
288
|
};
|
|
326
289
|
var LineTextInput_default = LineTextInput;
|
|
327
290
|
|
|
328
291
|
// src/components/controls/edit/MoneyInput.tsx
|
|
329
|
-
import
|
|
330
|
-
import { jsx as
|
|
292
|
+
import React12 from "react";
|
|
293
|
+
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
331
294
|
var MoneyInput = (props) => {
|
|
332
295
|
const textChangeHandler = (event) => {
|
|
333
296
|
const rawValue = event.target.value;
|
|
@@ -356,11 +319,11 @@ var MoneyInput = (props) => {
|
|
|
356
319
|
e.preventDefault();
|
|
357
320
|
}
|
|
358
321
|
};
|
|
359
|
-
return /* @__PURE__ */
|
|
360
|
-
/* @__PURE__ */
|
|
322
|
+
return /* @__PURE__ */ jsx11(React12.Fragment, { children: /* @__PURE__ */ jsxs6("label", { className: "block mb-1", children: [
|
|
323
|
+
/* @__PURE__ */ jsx11("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
361
324
|
" ",
|
|
362
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
363
|
-
/* @__PURE__ */
|
|
325
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx11("span", { className: "text-alert", children: "*" }),
|
|
326
|
+
/* @__PURE__ */ jsx11(
|
|
364
327
|
"input",
|
|
365
328
|
{
|
|
366
329
|
type: "number",
|
|
@@ -380,7 +343,7 @@ var MoneyInput = (props) => {
|
|
|
380
343
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 number-input"
|
|
381
344
|
}
|
|
382
345
|
),
|
|
383
|
-
/* @__PURE__ */
|
|
346
|
+
/* @__PURE__ */ jsx11("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
384
347
|
] }) });
|
|
385
348
|
};
|
|
386
349
|
var MoneyInput_default = MoneyInput;
|
|
@@ -411,7 +374,7 @@ var InputControlType_default = InputControlType;
|
|
|
411
374
|
|
|
412
375
|
// src/components/controls/edit/Select.tsx
|
|
413
376
|
import { useState, useEffect } from "react";
|
|
414
|
-
import { jsx as
|
|
377
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
415
378
|
var Select = (props) => {
|
|
416
379
|
const [list, setList] = useState([]);
|
|
417
380
|
const getSafeValue = (val) => {
|
|
@@ -469,10 +432,10 @@ var Select = (props) => {
|
|
|
469
432
|
props.dataSourceDependsOn
|
|
470
433
|
]);
|
|
471
434
|
const value = getSafeValue(props.value);
|
|
472
|
-
return /* @__PURE__ */
|
|
473
|
-
props.attributes?.label && /* @__PURE__ */
|
|
474
|
-
props.attributes?.label && props.attributes?.required && /* @__PURE__ */
|
|
475
|
-
/* @__PURE__ */
|
|
435
|
+
return /* @__PURE__ */ jsxs7("label", { className: "block", children: [
|
|
436
|
+
props.attributes?.label && /* @__PURE__ */ jsx12("span", { className: "text-sm font-medium inline-block pb-1", children: props.attributes?.label }),
|
|
437
|
+
props.attributes?.label && props.attributes?.required && /* @__PURE__ */ jsx12("span", { className: "text-alert", children: "*" }),
|
|
438
|
+
/* @__PURE__ */ jsxs7(
|
|
476
439
|
"select",
|
|
477
440
|
{
|
|
478
441
|
name: props.name,
|
|
@@ -483,23 +446,23 @@ var Select = (props) => {
|
|
|
483
446
|
disabled: props.attributes?.readOnly,
|
|
484
447
|
className: "peer 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",
|
|
485
448
|
children: [
|
|
486
|
-
/* @__PURE__ */
|
|
449
|
+
/* @__PURE__ */ jsx12("option", { value: "", children: props.attributes?.placeholder || "Select" }),
|
|
487
450
|
list.map((item, index) => {
|
|
488
451
|
const keyField = props.dataKeyFieldName;
|
|
489
452
|
const textField = props.dataTextFieldName;
|
|
490
|
-
return /* @__PURE__ */
|
|
453
|
+
return /* @__PURE__ */ jsx12("option", { value: item[keyField], children: item[textField] }, index);
|
|
491
454
|
})
|
|
492
455
|
]
|
|
493
456
|
}
|
|
494
457
|
),
|
|
495
|
-
/* @__PURE__ */
|
|
458
|
+
/* @__PURE__ */ jsx12("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props.attributes?.errorMessage || "" })
|
|
496
459
|
] });
|
|
497
460
|
};
|
|
498
461
|
var Select_default = Select;
|
|
499
462
|
|
|
500
463
|
// src/components/controls/edit/PercentageInput.tsx
|
|
501
|
-
import
|
|
502
|
-
import { jsx as
|
|
464
|
+
import React14 from "react";
|
|
465
|
+
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
503
466
|
var PercentageInput = (props) => {
|
|
504
467
|
const textChangeHandler = (event) => {
|
|
505
468
|
const rawValue = event.target.value;
|
|
@@ -528,11 +491,11 @@ var PercentageInput = (props) => {
|
|
|
528
491
|
e.preventDefault();
|
|
529
492
|
}
|
|
530
493
|
};
|
|
531
|
-
return /* @__PURE__ */
|
|
532
|
-
/* @__PURE__ */
|
|
494
|
+
return /* @__PURE__ */ jsx13(React14.Fragment, { children: /* @__PURE__ */ jsxs8("label", { className: "block mb-1", children: [
|
|
495
|
+
/* @__PURE__ */ jsx13("span", { className: "text-sm font-medium ", children: props?.attributes?.label ? props?.attributes?.label + " %" : "" }),
|
|
533
496
|
" ",
|
|
534
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
535
|
-
/* @__PURE__ */
|
|
497
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx13("span", { className: "text-alert", children: "*" }),
|
|
498
|
+
/* @__PURE__ */ jsx13(
|
|
536
499
|
"input",
|
|
537
500
|
{
|
|
538
501
|
type: "number",
|
|
@@ -551,14 +514,14 @@ var PercentageInput = (props) => {
|
|
|
551
514
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 number-input"
|
|
552
515
|
}
|
|
553
516
|
),
|
|
554
|
-
/* @__PURE__ */
|
|
517
|
+
/* @__PURE__ */ jsx13("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
555
518
|
] }) });
|
|
556
519
|
};
|
|
557
520
|
var PercentageInput_default = PercentageInput;
|
|
558
521
|
|
|
559
522
|
// src/components/controls/edit/PhoneInput.tsx
|
|
560
|
-
import
|
|
561
|
-
import { jsx as
|
|
523
|
+
import React15 from "react";
|
|
524
|
+
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
562
525
|
var PhoneInput = (props) => {
|
|
563
526
|
const textChangeHandler = (event) => {
|
|
564
527
|
const text = event.target.value;
|
|
@@ -577,11 +540,11 @@ var PhoneInput = (props) => {
|
|
|
577
540
|
if (props.value !== void 0 && props.value !== null) {
|
|
578
541
|
value = props.value;
|
|
579
542
|
}
|
|
580
|
-
return /* @__PURE__ */
|
|
581
|
-
/* @__PURE__ */
|
|
582
|
-
/* @__PURE__ */
|
|
583
|
-
/* @__PURE__ */
|
|
584
|
-
/* @__PURE__ */
|
|
543
|
+
return /* @__PURE__ */ jsx14(React15.Fragment, { children: /* @__PURE__ */ jsxs9("label", { className: "block mb-1", children: [
|
|
544
|
+
/* @__PURE__ */ jsx14("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
545
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex items-center bg-gray-100 rounded border border-gray-300 \n focus-within:border-indigo-300 focus-within:ring focus-within:ring-indigo-200 focus-within:ring-opacity-50", children: [
|
|
546
|
+
/* @__PURE__ */ jsx14("span", { className: "px-3 text-gray-700", children: props.prefix }),
|
|
547
|
+
/* @__PURE__ */ jsx14(
|
|
585
548
|
"input",
|
|
586
549
|
{
|
|
587
550
|
type: "text",
|
|
@@ -599,14 +562,14 @@ var PhoneInput = (props) => {
|
|
|
599
562
|
}
|
|
600
563
|
)
|
|
601
564
|
] }),
|
|
602
|
-
/* @__PURE__ */
|
|
565
|
+
/* @__PURE__ */ jsx14("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
603
566
|
] }) });
|
|
604
567
|
};
|
|
605
568
|
var PhoneInput_default = PhoneInput;
|
|
606
569
|
|
|
607
570
|
// src/components/controls/edit/NumberInput.tsx
|
|
608
|
-
import
|
|
609
|
-
import { jsx as
|
|
571
|
+
import React16 from "react";
|
|
572
|
+
import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
610
573
|
var NumberInput = (props) => {
|
|
611
574
|
const textChangeHandler = (event) => {
|
|
612
575
|
const text = event.target.value;
|
|
@@ -629,11 +592,11 @@ var NumberInput = (props) => {
|
|
|
629
592
|
if (props.value !== void 0 && props.value !== null) {
|
|
630
593
|
value = props.value;
|
|
631
594
|
}
|
|
632
|
-
return /* @__PURE__ */
|
|
633
|
-
props?.attributes?.label && /* @__PURE__ */
|
|
595
|
+
return /* @__PURE__ */ jsx15(React16.Fragment, { children: /* @__PURE__ */ jsxs10("label", { className: "block", children: [
|
|
596
|
+
props?.attributes?.label && /* @__PURE__ */ jsx15("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
634
597
|
" ",
|
|
635
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
636
|
-
/* @__PURE__ */
|
|
598
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx15("span", { className: "text-alert", children: "*" }),
|
|
599
|
+
/* @__PURE__ */ jsx15(
|
|
637
600
|
"input",
|
|
638
601
|
{
|
|
639
602
|
type: "number",
|
|
@@ -652,14 +615,14 @@ var NumberInput = (props) => {
|
|
|
652
615
|
className: "peer py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 number-input\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
653
616
|
}
|
|
654
617
|
),
|
|
655
|
-
/* @__PURE__ */
|
|
618
|
+
/* @__PURE__ */ jsx15("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
656
619
|
] }) });
|
|
657
620
|
};
|
|
658
621
|
var NumberInput_default = NumberInput;
|
|
659
622
|
|
|
660
623
|
// src/components/controls/edit/CheckboxInput.tsx
|
|
661
|
-
import
|
|
662
|
-
import { jsx as
|
|
624
|
+
import React17 from "react";
|
|
625
|
+
import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
663
626
|
var CheckboxInput = (props) => {
|
|
664
627
|
const textChangeHandler = (event) => {
|
|
665
628
|
let text = event.target.checked;
|
|
@@ -678,11 +641,11 @@ var CheckboxInput = (props) => {
|
|
|
678
641
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
679
642
|
value = true;
|
|
680
643
|
}
|
|
681
|
-
return /* @__PURE__ */
|
|
682
|
-
/* @__PURE__ */
|
|
644
|
+
return /* @__PURE__ */ jsx16(React17.Fragment, { children: /* @__PURE__ */ jsxs11("label", { className: "block mb-1", children: [
|
|
645
|
+
/* @__PURE__ */ jsx16("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
683
646
|
" ",
|
|
684
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
685
|
-
/* @__PURE__ */
|
|
647
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx16("span", { className: "text-alert", children: "*" }),
|
|
648
|
+
/* @__PURE__ */ jsx16(
|
|
686
649
|
"input",
|
|
687
650
|
{
|
|
688
651
|
type: "checkbox",
|
|
@@ -699,14 +662,14 @@ var CheckboxInput = (props) => {
|
|
|
699
662
|
className: "peer mt-1 py-1.5 block 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 "
|
|
700
663
|
}
|
|
701
664
|
),
|
|
702
|
-
/* @__PURE__ */
|
|
665
|
+
/* @__PURE__ */ jsx16("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
703
666
|
] }) });
|
|
704
667
|
};
|
|
705
668
|
var CheckboxInput_default = CheckboxInput;
|
|
706
669
|
|
|
707
670
|
// src/components/controls/edit/OtpInput.tsx
|
|
708
|
-
import
|
|
709
|
-
import { jsx as
|
|
671
|
+
import React18 from "react";
|
|
672
|
+
import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
710
673
|
var OtpInput = (props) => {
|
|
711
674
|
const textChangeHandler = (event) => {
|
|
712
675
|
const text = event.target.value;
|
|
@@ -728,9 +691,9 @@ var OtpInput = (props) => {
|
|
|
728
691
|
if (props.value !== void 0 && props.value !== null) {
|
|
729
692
|
value = props.value;
|
|
730
693
|
}
|
|
731
|
-
return /* @__PURE__ */
|
|
732
|
-
/* @__PURE__ */
|
|
733
|
-
/* @__PURE__ */
|
|
694
|
+
return /* @__PURE__ */ jsx17(React18.Fragment, { children: /* @__PURE__ */ jsxs12("label", { htmlFor: props.name, className: "block mb-1 w-full", children: [
|
|
695
|
+
/* @__PURE__ */ jsx17("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
696
|
+
/* @__PURE__ */ jsx17(
|
|
734
697
|
"input",
|
|
735
698
|
{
|
|
736
699
|
type: "text",
|
|
@@ -750,7 +713,7 @@ var OtpInput = (props) => {
|
|
|
750
713
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm tracking-[1.25em] text-center\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
|
|
751
714
|
}
|
|
752
715
|
),
|
|
753
|
-
/* @__PURE__ */
|
|
716
|
+
/* @__PURE__ */ jsx17("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
754
717
|
] }) });
|
|
755
718
|
};
|
|
756
719
|
var OtpInput_default = OtpInput;
|
|
@@ -832,8 +795,8 @@ var DateTimeUtility = class {
|
|
|
832
795
|
var DateTimeUtility_default = DateTimeUtility;
|
|
833
796
|
|
|
834
797
|
// src/components/controls/edit/DateTimeInput.tsx
|
|
835
|
-
import
|
|
836
|
-
import { jsx as
|
|
798
|
+
import React19 from "react";
|
|
799
|
+
import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
837
800
|
var DateTimeInput = (props) => {
|
|
838
801
|
const textChangeHandler = (event) => {
|
|
839
802
|
const localDate = new Date(event.target.value);
|
|
@@ -868,12 +831,12 @@ var DateTimeInput = (props) => {
|
|
|
868
831
|
timeZoneAbbr = now2.toLocaleTimeString("en", { timeZoneName: "short" }).split(" ")[2];
|
|
869
832
|
localvalue = localDate?.toISOString()?.slice(0, 16);
|
|
870
833
|
}
|
|
871
|
-
return /* @__PURE__ */
|
|
872
|
-
/* @__PURE__ */
|
|
834
|
+
return /* @__PURE__ */ jsx18(React19.Fragment, { children: /* @__PURE__ */ jsxs13("label", { className: "block mb-1", children: [
|
|
835
|
+
/* @__PURE__ */ jsx18("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
873
836
|
" ",
|
|
874
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
875
|
-
/* @__PURE__ */
|
|
876
|
-
/* @__PURE__ */
|
|
837
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx18("span", { className: "text-alert", children: "*" }),
|
|
838
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-2", children: [
|
|
839
|
+
/* @__PURE__ */ jsx18(
|
|
877
840
|
"input",
|
|
878
841
|
{
|
|
879
842
|
type: "datetime-local",
|
|
@@ -890,18 +853,18 @@ var DateTimeInput = (props) => {
|
|
|
890
853
|
className: "peer mt-1 py-1.5 block w-full 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 "
|
|
891
854
|
}
|
|
892
855
|
),
|
|
893
|
-
/* @__PURE__ */
|
|
856
|
+
/* @__PURE__ */ jsx18("span", { children: timeZoneAbbr })
|
|
894
857
|
] }),
|
|
895
|
-
/* @__PURE__ */
|
|
858
|
+
/* @__PURE__ */ jsx18("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
896
859
|
] }) });
|
|
897
860
|
};
|
|
898
861
|
var DateTimeInput_default = DateTimeInput;
|
|
899
862
|
|
|
900
863
|
// src/components/controls/edit/ColorInput.tsx
|
|
901
|
-
import
|
|
902
|
-
import { jsx as
|
|
864
|
+
import React20, { useEffect as useEffect2 } from "react";
|
|
865
|
+
import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
903
866
|
var ColorInput = (props) => {
|
|
904
|
-
const [color, setColor] =
|
|
867
|
+
const [color, setColor] = React20.useState("#3b82f6");
|
|
905
868
|
useEffect2(() => {
|
|
906
869
|
if (props.value !== void 0 && props.value !== null) {
|
|
907
870
|
if (typeof props.value === "string") {
|
|
@@ -921,11 +884,11 @@ var ColorInput = (props) => {
|
|
|
921
884
|
});
|
|
922
885
|
}
|
|
923
886
|
};
|
|
924
|
-
return /* @__PURE__ */
|
|
925
|
-
/* @__PURE__ */
|
|
887
|
+
return /* @__PURE__ */ jsxs14("label", { className: "block mb-1", children: [
|
|
888
|
+
/* @__PURE__ */ jsx19("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
926
889
|
" ",
|
|
927
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
928
|
-
/* @__PURE__ */
|
|
890
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx19("span", { className: "text-alert", children: "*" }),
|
|
891
|
+
/* @__PURE__ */ jsx19(
|
|
929
892
|
"input",
|
|
930
893
|
{
|
|
931
894
|
type: "color",
|
|
@@ -938,14 +901,14 @@ var ColorInput = (props) => {
|
|
|
938
901
|
className: `w-[88px] h-12 block cursor-pointer focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50`
|
|
939
902
|
}
|
|
940
903
|
),
|
|
941
|
-
props?.attributes?.errorMessage && /* @__PURE__ */
|
|
904
|
+
props?.attributes?.errorMessage && /* @__PURE__ */ jsx19("p", { className: "mt-1 text-alert text-sm", children: props.attributes.errorMessage })
|
|
942
905
|
] });
|
|
943
906
|
};
|
|
944
907
|
var ColorInput_default = ColorInput;
|
|
945
908
|
|
|
946
909
|
// src/components/controls/edit/SelectWithSearchInput.tsx
|
|
947
910
|
import { useEffect as useEffect3, useRef, useState as useState2 } from "react";
|
|
948
|
-
import { jsx as
|
|
911
|
+
import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
949
912
|
var SelectWithSearchInput = (props) => {
|
|
950
913
|
const [isOpen, setIsOpen] = useState2(false);
|
|
951
914
|
const [searchTerm, setSearchTerm] = useState2("");
|
|
@@ -1016,12 +979,12 @@ var SelectWithSearchInput = (props) => {
|
|
|
1016
979
|
});
|
|
1017
980
|
}
|
|
1018
981
|
}, [highlightedIndex]);
|
|
1019
|
-
return /* @__PURE__ */
|
|
1020
|
-
/* @__PURE__ */
|
|
982
|
+
return /* @__PURE__ */ jsxs15("div", { className: "relative", children: [
|
|
983
|
+
/* @__PURE__ */ jsx20("label", { children: props.attributes?.label }),
|
|
1021
984
|
" ",
|
|
1022
|
-
props?.attributes?.required && /* @__PURE__ */
|
|
1023
|
-
/* @__PURE__ */
|
|
1024
|
-
/* @__PURE__ */
|
|
985
|
+
props?.attributes?.required && /* @__PURE__ */ jsx20("span", { className: "text-alert", children: "*" }),
|
|
986
|
+
/* @__PURE__ */ jsxs15("div", { className: "relative", children: [
|
|
987
|
+
/* @__PURE__ */ jsx20(
|
|
1025
988
|
"input",
|
|
1026
989
|
{
|
|
1027
990
|
type: "text",
|
|
@@ -1037,13 +1000,13 @@ var SelectWithSearchInput = (props) => {
|
|
|
1037
1000
|
className: "peer 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\n "
|
|
1038
1001
|
}
|
|
1039
1002
|
),
|
|
1040
|
-
/* @__PURE__ */
|
|
1003
|
+
/* @__PURE__ */ jsx20(
|
|
1041
1004
|
"button",
|
|
1042
1005
|
{
|
|
1043
1006
|
type: "button",
|
|
1044
1007
|
onClick: () => setIsOpen(!isOpen),
|
|
1045
1008
|
className: "absolute right-2 top-3 h-5 w-5 text-gray-500 focus:outline-none",
|
|
1046
|
-
children: /* @__PURE__ */
|
|
1009
|
+
children: /* @__PURE__ */ jsx20(
|
|
1047
1010
|
"svg",
|
|
1048
1011
|
{
|
|
1049
1012
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1052,7 +1015,7 @@ var SelectWithSearchInput = (props) => {
|
|
|
1052
1015
|
strokeWidth: 1.5,
|
|
1053
1016
|
stroke: "currentColor",
|
|
1054
1017
|
className: "w-full h-full",
|
|
1055
|
-
children: /* @__PURE__ */
|
|
1018
|
+
children: /* @__PURE__ */ jsx20(
|
|
1056
1019
|
"path",
|
|
1057
1020
|
{
|
|
1058
1021
|
strokeLinecap: "round",
|
|
@@ -1065,12 +1028,12 @@ var SelectWithSearchInput = (props) => {
|
|
|
1065
1028
|
}
|
|
1066
1029
|
)
|
|
1067
1030
|
] }),
|
|
1068
|
-
isOpen && /* @__PURE__ */
|
|
1031
|
+
isOpen && /* @__PURE__ */ jsx20(
|
|
1069
1032
|
"div",
|
|
1070
1033
|
{
|
|
1071
1034
|
ref: dropdownRef,
|
|
1072
1035
|
className: "absolute z-10 mt-2 w-full bg-white border border-gray-200 rounded-md shadow-lg max-h-48 overflow-y-auto",
|
|
1073
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */
|
|
1036
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ jsx20(
|
|
1074
1037
|
"button",
|
|
1075
1038
|
{
|
|
1076
1039
|
onClick: (e) => handleSelect(e, item),
|
|
@@ -1078,10 +1041,10 @@ var SelectWithSearchInput = (props) => {
|
|
|
1078
1041
|
role: "option",
|
|
1079
1042
|
tabIndex: -1,
|
|
1080
1043
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1081
|
-
children: /* @__PURE__ */
|
|
1044
|
+
children: /* @__PURE__ */ jsx20("span", { children: item[props.dataTextFieldName] })
|
|
1082
1045
|
},
|
|
1083
1046
|
item[props.dataKeyFieldName]
|
|
1084
|
-
)) : /* @__PURE__ */
|
|
1047
|
+
)) : /* @__PURE__ */ jsx20("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1085
1048
|
}
|
|
1086
1049
|
)
|
|
1087
1050
|
] });
|
|
@@ -1089,7 +1052,7 @@ var SelectWithSearchInput = (props) => {
|
|
|
1089
1052
|
var SelectWithSearchInput_default = SelectWithSearchInput;
|
|
1090
1053
|
|
|
1091
1054
|
// src/components/Button.tsx
|
|
1092
|
-
import
|
|
1055
|
+
import React24, { useState as useState4 } from "react";
|
|
1093
1056
|
|
|
1094
1057
|
// src/components/ToastService.tsx
|
|
1095
1058
|
var ToastService = class _ToastService {
|
|
@@ -1146,8 +1109,8 @@ var progressClasses = /* @__PURE__ */ new Map([
|
|
|
1146
1109
|
import { useState as useState3 } from "react";
|
|
1147
1110
|
|
|
1148
1111
|
// src/components/ClientButton.tsx
|
|
1149
|
-
import
|
|
1150
|
-
import { jsx as
|
|
1112
|
+
import React22 from "react";
|
|
1113
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1151
1114
|
var ClientButton = (props) => {
|
|
1152
1115
|
const execute = async (event) => {
|
|
1153
1116
|
if (props.onClick !== void 0) {
|
|
@@ -1157,7 +1120,7 @@ var ClientButton = (props) => {
|
|
|
1157
1120
|
}
|
|
1158
1121
|
};
|
|
1159
1122
|
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
1160
|
-
return /* @__PURE__ */
|
|
1123
|
+
return /* @__PURE__ */ jsx21(React22.Fragment, { children: /* @__PURE__ */ jsx21(
|
|
1161
1124
|
"button",
|
|
1162
1125
|
{
|
|
1163
1126
|
type: "button",
|
|
@@ -1170,7 +1133,7 @@ var ClientButton = (props) => {
|
|
|
1170
1133
|
var ClientButton_default = ClientButton;
|
|
1171
1134
|
|
|
1172
1135
|
// src/components/Confirm.tsx
|
|
1173
|
-
import { Fragment, jsx as
|
|
1136
|
+
import { Fragment, jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1174
1137
|
var Confirm = ({ message, onConfirm, onCancel }) => {
|
|
1175
1138
|
const [showModal, setShowModal] = useState3(true);
|
|
1176
1139
|
const handleConfirmAction = () => {
|
|
@@ -1185,13 +1148,13 @@ var Confirm = ({ message, onConfirm, onCancel }) => {
|
|
|
1185
1148
|
onCancel();
|
|
1186
1149
|
}
|
|
1187
1150
|
};
|
|
1188
|
-
return /* @__PURE__ */
|
|
1189
|
-
/* @__PURE__ */
|
|
1190
|
-
/* @__PURE__ */
|
|
1191
|
-
/* @__PURE__ */
|
|
1192
|
-
/* @__PURE__ */
|
|
1193
|
-
/* @__PURE__ */
|
|
1194
|
-
/* @__PURE__ */
|
|
1151
|
+
return /* @__PURE__ */ jsx22(Fragment, { children: showModal && /* @__PURE__ */ jsxs16("div", { className: "fixed inset-0 flex items-center justify-center z-50", children: [
|
|
1152
|
+
/* @__PURE__ */ jsx22("div", { className: "absolute inset-0 bg-black opacity-70" }),
|
|
1153
|
+
/* @__PURE__ */ jsxs16("div", { className: "bg-white rounded-md p-6 w-2/6 shadow border z-50", children: [
|
|
1154
|
+
/* @__PURE__ */ jsx22("p", { className: "text-xl font-medium mb-4", children: "Confirmation" }),
|
|
1155
|
+
/* @__PURE__ */ jsx22("p", { className: "mb-4", children: message }),
|
|
1156
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex justify-end gap-8", children: [
|
|
1157
|
+
/* @__PURE__ */ jsx22(
|
|
1195
1158
|
ClientButton_default,
|
|
1196
1159
|
{
|
|
1197
1160
|
onClick: handleCancelAction,
|
|
@@ -1199,7 +1162,7 @@ var Confirm = ({ message, onConfirm, onCancel }) => {
|
|
|
1199
1162
|
children: "Cancel"
|
|
1200
1163
|
}
|
|
1201
1164
|
),
|
|
1202
|
-
/* @__PURE__ */
|
|
1165
|
+
/* @__PURE__ */ jsx22(
|
|
1203
1166
|
ClientButton_default,
|
|
1204
1167
|
{
|
|
1205
1168
|
onClick: handleConfirmAction,
|
|
@@ -1215,7 +1178,7 @@ var Confirm_default = Confirm;
|
|
|
1215
1178
|
}
|
|
1216
1179
|
|
|
1217
1180
|
// src/components/Button.tsx
|
|
1218
|
-
import { jsx as
|
|
1181
|
+
import { jsx as jsx23, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1219
1182
|
var Button = (props) => {
|
|
1220
1183
|
const [inProgress, setInProgress] = useState4(false);
|
|
1221
1184
|
const [isActionPerformed, setIsActionPerformed] = useState4(false);
|
|
@@ -1264,14 +1227,14 @@ var Button = (props) => {
|
|
|
1264
1227
|
return new Promise((resolve) => {
|
|
1265
1228
|
const onConfirm = () => resolve(true);
|
|
1266
1229
|
const onCancel = () => resolve(false);
|
|
1267
|
-
setShowModal(/* @__PURE__ */
|
|
1230
|
+
setShowModal(/* @__PURE__ */ jsx23(Confirm_default, { message: props.confirmationMessage, onConfirm, onCancel }));
|
|
1268
1231
|
});
|
|
1269
1232
|
};
|
|
1270
1233
|
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
1271
1234
|
let progressClass = props.ButtonType ? progressClasses.get(props.ButtonType) : progressClasses.get("Primary" /* Solid */);
|
|
1272
1235
|
const isDisabled = inProgress || isActionPerformed && props.oneTimeAction;
|
|
1273
|
-
return /* @__PURE__ */
|
|
1274
|
-
/* @__PURE__ */
|
|
1236
|
+
return /* @__PURE__ */ jsxs17(React24.Fragment, { children: [
|
|
1237
|
+
/* @__PURE__ */ jsxs17(
|
|
1275
1238
|
"button",
|
|
1276
1239
|
{
|
|
1277
1240
|
type: "submit",
|
|
@@ -1281,9 +1244,9 @@ var Button = (props) => {
|
|
|
1281
1244
|
className: buttonClass + " relative " + props.className,
|
|
1282
1245
|
children: [
|
|
1283
1246
|
isActionPerformed && props.oneTimeAction && responseMessage ? responseMessage : props.children,
|
|
1284
|
-
inProgress && /* @__PURE__ */
|
|
1285
|
-
/* @__PURE__ */
|
|
1286
|
-
/* @__PURE__ */
|
|
1247
|
+
inProgress && /* @__PURE__ */ jsx23(React24.Fragment, { children: props.hideProgressIndicator === true ? /* @__PURE__ */ jsx23("div", { className: "absolute bottom-0 left-0 h-0.5 bg-gray-400 rounded animate-progress" }) : /* @__PURE__ */ jsxs17("svg", { className: "animate-spin ml-2 mr-3 h-5 w-5 " + progressClass, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
|
|
1248
|
+
/* @__PURE__ */ jsx23("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
1249
|
+
/* @__PURE__ */ jsx23("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
|
|
1287
1250
|
] }) })
|
|
1288
1251
|
]
|
|
1289
1252
|
}
|
|
@@ -1294,13 +1257,13 @@ var Button = (props) => {
|
|
|
1294
1257
|
var Button_default = Button;
|
|
1295
1258
|
|
|
1296
1259
|
// src/components/controls/edit/SelectWithSearchPanel.tsx
|
|
1297
|
-
import
|
|
1260
|
+
import React25, {
|
|
1298
1261
|
useEffect as useEffect4,
|
|
1299
1262
|
useRef as useRef2,
|
|
1300
1263
|
useState as useState5,
|
|
1301
1264
|
useCallback
|
|
1302
1265
|
} from "react";
|
|
1303
|
-
import { jsx as
|
|
1266
|
+
import { jsx as jsx24, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1304
1267
|
var SelectWithSearchPanel = (props) => {
|
|
1305
1268
|
const [isOpen, setIsOpen] = useState5(false);
|
|
1306
1269
|
const [searchTerm, setSearchTerm] = useState5("");
|
|
@@ -1436,9 +1399,9 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1436
1399
|
console.log("Form Data:", formData);
|
|
1437
1400
|
return formData;
|
|
1438
1401
|
}, []);
|
|
1439
|
-
return /* @__PURE__ */
|
|
1440
|
-
/* @__PURE__ */
|
|
1441
|
-
/* @__PURE__ */
|
|
1402
|
+
return /* @__PURE__ */ jsxs18("div", { className: "relative", children: [
|
|
1403
|
+
/* @__PURE__ */ jsx24("label", { className: "text-sm mb-1 font-medium", children: props.attributes?.label }),
|
|
1404
|
+
/* @__PURE__ */ jsx24("div", { children: /* @__PURE__ */ jsx24(
|
|
1442
1405
|
"input",
|
|
1443
1406
|
{
|
|
1444
1407
|
type: "text",
|
|
@@ -1452,14 +1415,14 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1452
1415
|
disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none`
|
|
1453
1416
|
}
|
|
1454
1417
|
) }),
|
|
1455
|
-
/* @__PURE__ */
|
|
1456
|
-
/* @__PURE__ */
|
|
1457
|
-
/* @__PURE__ */
|
|
1418
|
+
/* @__PURE__ */ jsx24("div", { ref: containerRef, children: isOpen && /* @__PURE__ */ jsxs18(React25.Fragment, { children: [
|
|
1419
|
+
/* @__PURE__ */ jsxs18("div", { className: "fixed z-50 right-0 bg-white top-[62px] w-1/4 border-l border-gray-200", children: [
|
|
1420
|
+
/* @__PURE__ */ jsx24("div", { className: "flex flex-col p-2 bg-accent-950 text-white", children: /* @__PURE__ */ jsxs18("h5", { className: "text-md text-white font-medium", children: [
|
|
1458
1421
|
"Select a",
|
|
1459
1422
|
" ",
|
|
1460
1423
|
props.attributes?.label || props.attributes?.heading
|
|
1461
1424
|
] }) }),
|
|
1462
|
-
/* @__PURE__ */
|
|
1425
|
+
/* @__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(
|
|
1463
1426
|
"button",
|
|
1464
1427
|
{
|
|
1465
1428
|
type: "button",
|
|
@@ -1472,12 +1435,12 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1472
1435
|
}
|
|
1473
1436
|
) })
|
|
1474
1437
|
] }),
|
|
1475
|
-
isCreateOpen && /* @__PURE__ */
|
|
1476
|
-
/* @__PURE__ */
|
|
1438
|
+
isCreateOpen && /* @__PURE__ */ jsxs18("div", { className: "fixed right-0 w-1/4 h-full top-[62px] bg-white shadow-lg border-l border-gray-200 z-50", children: [
|
|
1439
|
+
/* @__PURE__ */ jsx24("div", { className: "flex flex-col p-2 bg-accent-950", children: /* @__PURE__ */ jsxs18("h5", { className: "text-md font-medium text-white", children: [
|
|
1477
1440
|
"Create New ",
|
|
1478
1441
|
props.attributes?.label
|
|
1479
1442
|
] }) }),
|
|
1480
|
-
/* @__PURE__ */
|
|
1443
|
+
/* @__PURE__ */ jsx24("div", { className: "flex justify-end px-4 border-b py-2 border-gray-200", children: /* @__PURE__ */ jsx24(
|
|
1481
1444
|
"button",
|
|
1482
1445
|
{
|
|
1483
1446
|
type: "button",
|
|
@@ -1486,10 +1449,10 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1486
1449
|
children: "Close"
|
|
1487
1450
|
}
|
|
1488
1451
|
) }),
|
|
1489
|
-
/* @__PURE__ */
|
|
1490
|
-
props.createFields?.map((field) => /* @__PURE__ */
|
|
1491
|
-
/* @__PURE__ */
|
|
1492
|
-
/* @__PURE__ */
|
|
1452
|
+
/* @__PURE__ */ jsxs18("div", { className: "p-4", children: [
|
|
1453
|
+
props.createFields?.map((field) => /* @__PURE__ */ jsxs18("div", { className: "mb-4", children: [
|
|
1454
|
+
/* @__PURE__ */ jsx24("label", { className: "text-sm mb-1 font-medium block", children: field.label }),
|
|
1455
|
+
/* @__PURE__ */ jsx24(
|
|
1493
1456
|
"input",
|
|
1494
1457
|
{
|
|
1495
1458
|
type: field.type,
|
|
@@ -1505,7 +1468,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1505
1468
|
}
|
|
1506
1469
|
)
|
|
1507
1470
|
] }, field.name)),
|
|
1508
|
-
/* @__PURE__ */
|
|
1471
|
+
/* @__PURE__ */ jsxs18(Button_default, { onClick: async () => {
|
|
1509
1472
|
handleSaveModal();
|
|
1510
1473
|
return { isSuccessful: true };
|
|
1511
1474
|
}, className: "w-full", children: [
|
|
@@ -1514,13 +1477,13 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1514
1477
|
] })
|
|
1515
1478
|
] })
|
|
1516
1479
|
] }),
|
|
1517
|
-
/* @__PURE__ */
|
|
1480
|
+
/* @__PURE__ */ jsx24(
|
|
1518
1481
|
"div",
|
|
1519
1482
|
{
|
|
1520
1483
|
ref: listRef,
|
|
1521
1484
|
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",
|
|
1522
1485
|
style: { height: "calc(100vh - 130px)" },
|
|
1523
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */
|
|
1486
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ jsx24("div", { children: /* @__PURE__ */ jsx24(
|
|
1524
1487
|
"button",
|
|
1525
1488
|
{
|
|
1526
1489
|
onClick: (e) => {
|
|
@@ -1530,9 +1493,9 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1530
1493
|
role: "option",
|
|
1531
1494
|
tabIndex: -1,
|
|
1532
1495
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1533
|
-
children: /* @__PURE__ */
|
|
1496
|
+
children: /* @__PURE__ */ jsx24("span", { children: getNestedValue3(item, props.dataTextFieldName) })
|
|
1534
1497
|
}
|
|
1535
|
-
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */
|
|
1498
|
+
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ jsx24("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1536
1499
|
}
|
|
1537
1500
|
)
|
|
1538
1501
|
] }) })
|
|
@@ -1541,11 +1504,11 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1541
1504
|
var SelectWithSearchPanel_default = SelectWithSearchPanel;
|
|
1542
1505
|
|
|
1543
1506
|
// src/components/controls/edit/BooleanSelect.tsx
|
|
1544
|
-
import
|
|
1507
|
+
import React26, {
|
|
1545
1508
|
useState as useState6,
|
|
1546
1509
|
useEffect as useEffect5
|
|
1547
1510
|
} from "react";
|
|
1548
|
-
import { jsx as
|
|
1511
|
+
import { jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1549
1512
|
var BooleanSelect = (props) => {
|
|
1550
1513
|
const [list, setList] = useState6();
|
|
1551
1514
|
const textChangeHandler = (event) => {
|
|
@@ -1594,11 +1557,11 @@ var BooleanSelect = (props) => {
|
|
|
1594
1557
|
if (props.value !== void 0 && props.value !== null) {
|
|
1595
1558
|
value = props.value;
|
|
1596
1559
|
}
|
|
1597
|
-
return /* @__PURE__ */
|
|
1598
|
-
/* @__PURE__ */
|
|
1560
|
+
return /* @__PURE__ */ jsx25(React26.Fragment, { children: /* @__PURE__ */ jsxs19("label", { className: "block", children: [
|
|
1561
|
+
/* @__PURE__ */ jsx25("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1599
1562
|
" ",
|
|
1600
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1601
|
-
/* @__PURE__ */
|
|
1563
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx25("span", { className: "text-alert", children: "*" }),
|
|
1564
|
+
/* @__PURE__ */ jsxs19(
|
|
1602
1565
|
"select",
|
|
1603
1566
|
{
|
|
1604
1567
|
name: props.name,
|
|
@@ -1610,9 +1573,9 @@ var BooleanSelect = (props) => {
|
|
|
1610
1573
|
disabled: props?.attributes?.readOnly,
|
|
1611
1574
|
className: "peer mt-1 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\n ",
|
|
1612
1575
|
children: [
|
|
1613
|
-
/* @__PURE__ */
|
|
1576
|
+
/* @__PURE__ */ jsx25("option", { className: "", value: "", children: props.attributes?.placeholder || "Select" }),
|
|
1614
1577
|
list && list.map((item, i) => {
|
|
1615
|
-
return /* @__PURE__ */
|
|
1578
|
+
return /* @__PURE__ */ jsx25(
|
|
1616
1579
|
"option",
|
|
1617
1580
|
{
|
|
1618
1581
|
className: "fac-select-option",
|
|
@@ -1625,14 +1588,14 @@ var BooleanSelect = (props) => {
|
|
|
1625
1588
|
]
|
|
1626
1589
|
}
|
|
1627
1590
|
),
|
|
1628
|
-
/* @__PURE__ */
|
|
1591
|
+
/* @__PURE__ */ jsx25("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1629
1592
|
] }) });
|
|
1630
1593
|
};
|
|
1631
1594
|
var BooleanSelect_default = BooleanSelect;
|
|
1632
1595
|
|
|
1633
1596
|
// src/components/controls/edit/EmailInput.tsx
|
|
1634
|
-
import
|
|
1635
|
-
import { jsx as
|
|
1597
|
+
import React27 from "react";
|
|
1598
|
+
import { jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1636
1599
|
var EmailInput = (props) => {
|
|
1637
1600
|
const textChangeHandler = (event) => {
|
|
1638
1601
|
const text = event.target.value;
|
|
@@ -1657,11 +1620,11 @@ var EmailInput = (props) => {
|
|
|
1657
1620
|
if (props.value !== void 0 && props.value !== null) {
|
|
1658
1621
|
value = props.value;
|
|
1659
1622
|
}
|
|
1660
|
-
return /* @__PURE__ */
|
|
1661
|
-
/* @__PURE__ */
|
|
1623
|
+
return /* @__PURE__ */ jsx26(React27.Fragment, { children: /* @__PURE__ */ jsxs20("label", { className: "block mb-1", children: [
|
|
1624
|
+
/* @__PURE__ */ jsx26("span", { className: "text-sm font-medium text-slate-700", children: props?.attributes?.label }),
|
|
1662
1625
|
" ",
|
|
1663
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1664
|
-
/* @__PURE__ */
|
|
1626
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx26("span", { className: "text-alert", children: "*" }),
|
|
1627
|
+
/* @__PURE__ */ jsx26(
|
|
1665
1628
|
"input",
|
|
1666
1629
|
{
|
|
1667
1630
|
type: "email",
|
|
@@ -1677,14 +1640,14 @@ var EmailInput = (props) => {
|
|
|
1677
1640
|
className: "peer mt-1 py-1.5 block w-full rounded border-gray-300 shadow-sm\n focus-within:border-neutral-300 focus-within:ring focus-within:ring-neutral-300 focus-within:ring-opacity-50 transition-all duration-500 ease-in-out"
|
|
1678
1641
|
}
|
|
1679
1642
|
),
|
|
1680
|
-
/* @__PURE__ */
|
|
1643
|
+
/* @__PURE__ */ jsx26("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 mb-0 text-alert text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1681
1644
|
] }) });
|
|
1682
1645
|
};
|
|
1683
1646
|
var EmailInput_default = EmailInput;
|
|
1684
1647
|
|
|
1685
1648
|
// src/components/controls/edit/TimeInput.tsx
|
|
1686
|
-
import
|
|
1687
|
-
import { jsx as
|
|
1649
|
+
import React28 from "react";
|
|
1650
|
+
import { jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1688
1651
|
var TimeInput = (props) => {
|
|
1689
1652
|
const timeChangeHandler = (event) => {
|
|
1690
1653
|
const timeValue = event.target.value;
|
|
@@ -1697,10 +1660,10 @@ var TimeInput = (props) => {
|
|
|
1697
1660
|
});
|
|
1698
1661
|
}
|
|
1699
1662
|
};
|
|
1700
|
-
return /* @__PURE__ */
|
|
1701
|
-
/* @__PURE__ */
|
|
1702
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1703
|
-
/* @__PURE__ */
|
|
1663
|
+
return /* @__PURE__ */ jsx27(React28.Fragment, { children: /* @__PURE__ */ jsxs21("label", { className: "block mb-1", children: [
|
|
1664
|
+
/* @__PURE__ */ jsx27("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
1665
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx27("span", { className: "text-alert", children: "*" }),
|
|
1666
|
+
/* @__PURE__ */ jsx27("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx27(
|
|
1704
1667
|
"input",
|
|
1705
1668
|
{
|
|
1706
1669
|
type: "time",
|
|
@@ -1713,14 +1676,14 @@ var TimeInput = (props) => {
|
|
|
1713
1676
|
className: "peer mt-1 py-1.5 block w-full 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"
|
|
1714
1677
|
}
|
|
1715
1678
|
) }),
|
|
1716
|
-
/* @__PURE__ */
|
|
1679
|
+
/* @__PURE__ */ jsx27("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props?.attributes?.errorMessage ?? "" })
|
|
1717
1680
|
] }) });
|
|
1718
1681
|
};
|
|
1719
1682
|
var TimeInput_default = TimeInput;
|
|
1720
1683
|
|
|
1721
1684
|
// src/components/controls/edit/InputControl.tsx
|
|
1722
|
-
import { jsx as
|
|
1723
|
-
var InputControl =
|
|
1685
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1686
|
+
var InputControl = React29.forwardRef(
|
|
1724
1687
|
(props, ref) => {
|
|
1725
1688
|
const ControlComponents = {
|
|
1726
1689
|
[InputControlType_default.lineTextInput]: LineTextInput_default,
|
|
@@ -1741,58 +1704,58 @@ var InputControl = React31.forwardRef(
|
|
|
1741
1704
|
[InputControlType_default.timeInput]: TimeInput_default
|
|
1742
1705
|
};
|
|
1743
1706
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
1744
|
-
return /* @__PURE__ */
|
|
1707
|
+
return /* @__PURE__ */ jsx28(React29.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx28(SelectedControlComponent, { ...props }) : "Control not found" });
|
|
1745
1708
|
}
|
|
1746
1709
|
);
|
|
1747
1710
|
InputControl.displayName = "InputControl";
|
|
1748
1711
|
var InputControl_default = InputControl;
|
|
1749
1712
|
|
|
1750
1713
|
// src/components/dataForm/DataList.tsx
|
|
1751
|
-
import
|
|
1714
|
+
import React32, { useEffect as useEffect6, useState as useState7, useCallback as useCallback2, useReducer } from "react";
|
|
1752
1715
|
import { useRouter } from "next/navigation";
|
|
1753
1716
|
|
|
1754
1717
|
// src/components/dataForm/NoContentView.tsx
|
|
1755
|
-
import
|
|
1756
|
-
import { jsx as
|
|
1718
|
+
import React30 from "react";
|
|
1719
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1757
1720
|
var NoContentView = (props) => {
|
|
1758
|
-
return /* @__PURE__ */
|
|
1721
|
+
return /* @__PURE__ */ jsx29(React30.Fragment, { children: props.isDataFound === false && props.children });
|
|
1759
1722
|
};
|
|
1760
1723
|
var NoContentView_default = NoContentView;
|
|
1761
1724
|
|
|
1762
1725
|
// src/components/dataForm/ContentView.tsx
|
|
1763
|
-
import
|
|
1764
|
-
import { jsx as
|
|
1726
|
+
import React31 from "react";
|
|
1727
|
+
import { jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1765
1728
|
var ContentView = (props) => {
|
|
1766
|
-
return /* @__PURE__ */
|
|
1767
|
-
props.isDataFound == null && /* @__PURE__ */
|
|
1768
|
-
/* @__PURE__ */
|
|
1769
|
-
/* @__PURE__ */
|
|
1770
|
-
/* @__PURE__ */
|
|
1771
|
-
/* @__PURE__ */
|
|
1772
|
-
/* @__PURE__ */
|
|
1729
|
+
return /* @__PURE__ */ jsxs22(React31.Fragment, { children: [
|
|
1730
|
+
props.isDataFound == null && /* @__PURE__ */ jsx30("div", { className: "", children: /* @__PURE__ */ jsxs22("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
1731
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex items-center mb-4", children: [
|
|
1732
|
+
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
1733
|
+
/* @__PURE__ */ jsxs22("div", { className: "ml-2", children: [
|
|
1734
|
+
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
1735
|
+
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
1773
1736
|
] })
|
|
1774
1737
|
] }),
|
|
1775
|
-
/* @__PURE__ */
|
|
1776
|
-
/* @__PURE__ */
|
|
1777
|
-
/* @__PURE__ */
|
|
1778
|
-
/* @__PURE__ */
|
|
1779
|
-
/* @__PURE__ */
|
|
1780
|
-
/* @__PURE__ */
|
|
1781
|
-
/* @__PURE__ */
|
|
1738
|
+
/* @__PURE__ */ jsxs22("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
1739
|
+
/* @__PURE__ */ jsxs22("div", { className: "animate-pulse", children: [
|
|
1740
|
+
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
1741
|
+
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
1742
|
+
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
1743
|
+
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
1744
|
+
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
1782
1745
|
] }),
|
|
1783
|
-
/* @__PURE__ */
|
|
1784
|
-
/* @__PURE__ */
|
|
1785
|
-
/* @__PURE__ */
|
|
1786
|
-
/* @__PURE__ */
|
|
1787
|
-
/* @__PURE__ */
|
|
1788
|
-
/* @__PURE__ */
|
|
1746
|
+
/* @__PURE__ */ jsxs22("div", { className: "animate-pulse", children: [
|
|
1747
|
+
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
1748
|
+
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
1749
|
+
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
1750
|
+
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
1751
|
+
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
1789
1752
|
] }),
|
|
1790
|
-
/* @__PURE__ */
|
|
1791
|
-
/* @__PURE__ */
|
|
1792
|
-
/* @__PURE__ */
|
|
1793
|
-
/* @__PURE__ */
|
|
1794
|
-
/* @__PURE__ */
|
|
1795
|
-
/* @__PURE__ */
|
|
1753
|
+
/* @__PURE__ */ jsxs22("div", { className: "animate-pulse", children: [
|
|
1754
|
+
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
1755
|
+
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
1756
|
+
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
1757
|
+
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
1758
|
+
/* @__PURE__ */ jsx30("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
1796
1759
|
] })
|
|
1797
1760
|
] })
|
|
1798
1761
|
] }) }),
|
|
@@ -1803,7 +1766,7 @@ var ContentView_default = ContentView;
|
|
|
1803
1766
|
|
|
1804
1767
|
// src/components/dataForm/Hyperlink.tsx
|
|
1805
1768
|
import Link from "next/link";
|
|
1806
|
-
import { Fragment as Fragment2, jsx as
|
|
1769
|
+
import { Fragment as Fragment2, jsx as jsx31 } from "react/jsx-runtime";
|
|
1807
1770
|
function Hyperlink(props) {
|
|
1808
1771
|
let linkClass = props.linkType ? buttonClasses.get(props.linkType) : "";
|
|
1809
1772
|
const target = props?.href?.startsWith("http") ? "_blank" : "_self";
|
|
@@ -1811,7 +1774,7 @@ function Hyperlink(props) {
|
|
|
1811
1774
|
if (target == "_blank") {
|
|
1812
1775
|
additionalProps.rel = "noopener noreferrer";
|
|
1813
1776
|
}
|
|
1814
|
-
return /* @__PURE__ */
|
|
1777
|
+
return /* @__PURE__ */ jsx31(Fragment2, { children: props.href ? /* @__PURE__ */ jsx31(
|
|
1815
1778
|
Link,
|
|
1816
1779
|
{
|
|
1817
1780
|
href: props.href,
|
|
@@ -1821,7 +1784,7 @@ function Hyperlink(props) {
|
|
|
1821
1784
|
target,
|
|
1822
1785
|
children: props.children
|
|
1823
1786
|
}
|
|
1824
|
-
) : props.isHeading ? /* @__PURE__ */
|
|
1787
|
+
) : props.isHeading ? /* @__PURE__ */ jsx31("h5", { className: props.className + "inline-block", children: props.children }) : /* @__PURE__ */ jsx31("span", { className: props.className, children: props.children }) });
|
|
1825
1788
|
}
|
|
1826
1789
|
|
|
1827
1790
|
// src/clients/OdataBuilder.tsx
|
|
@@ -1979,30 +1942,30 @@ var OdataBuilder = class {
|
|
|
1979
1942
|
};
|
|
1980
1943
|
|
|
1981
1944
|
// src/svg/chevron-updown.tsx
|
|
1982
|
-
import { jsx as
|
|
1945
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1983
1946
|
var ChevronUpDown = (props) => {
|
|
1984
|
-
return /* @__PURE__ */
|
|
1947
|
+
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: "M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" }) });
|
|
1985
1948
|
};
|
|
1986
1949
|
var chevron_updown_default = ChevronUpDown;
|
|
1987
1950
|
|
|
1988
1951
|
// src/svg/chevron-down.tsx
|
|
1989
|
-
import { jsx as
|
|
1952
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1990
1953
|
var ChevronDown = (props) => {
|
|
1991
|
-
return /* @__PURE__ */
|
|
1954
|
+
return /* @__PURE__ */ jsx33("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__ */ jsx33("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) });
|
|
1992
1955
|
};
|
|
1993
1956
|
var chevron_down_default = ChevronDown;
|
|
1994
1957
|
|
|
1995
1958
|
// src/svg/chevron-up.tsx
|
|
1996
|
-
import { jsx as
|
|
1959
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1997
1960
|
var ChevronUp = (props) => {
|
|
1998
|
-
return /* @__PURE__ */
|
|
1961
|
+
return /* @__PURE__ */ jsx34("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__ */ jsx34("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 15.75l7.5-7.5 7.5 7.5" }) });
|
|
1999
1962
|
};
|
|
2000
1963
|
var chevron_up_default = ChevronUp;
|
|
2001
1964
|
|
|
2002
1965
|
// src/svg/plus.tsx
|
|
2003
|
-
import { jsx as
|
|
1966
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
2004
1967
|
var Plus = (props) => {
|
|
2005
|
-
return /* @__PURE__ */
|
|
1968
|
+
return /* @__PURE__ */ jsx35("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__ */ jsx35("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) });
|
|
2006
1969
|
};
|
|
2007
1970
|
var plus_default = Plus;
|
|
2008
1971
|
|
|
@@ -2016,14 +1979,14 @@ var Icons = {
|
|
|
2016
1979
|
var Icons_default = Icons;
|
|
2017
1980
|
|
|
2018
1981
|
// src/svg/Icon.tsx
|
|
2019
|
-
import { jsx as
|
|
1982
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2020
1983
|
var Icon = ({ name, className, ...props }) => {
|
|
2021
1984
|
const IconComponent = Icons_default[name];
|
|
2022
1985
|
if (!IconComponent) {
|
|
2023
1986
|
console.error(`Icon "${name}" not found.`);
|
|
2024
1987
|
return null;
|
|
2025
1988
|
}
|
|
2026
|
-
return /* @__PURE__ */
|
|
1989
|
+
return /* @__PURE__ */ jsx36(IconComponent, { ...props, className });
|
|
2027
1990
|
};
|
|
2028
1991
|
var Icon_default = Icon;
|
|
2029
1992
|
|
|
@@ -2072,7 +2035,7 @@ function FormReducer(state, action) {
|
|
|
2072
2035
|
var FormReducer_default = FormReducer;
|
|
2073
2036
|
|
|
2074
2037
|
// src/components/dataForm/DataList.tsx
|
|
2075
|
-
import { Fragment as Fragment3, jsx as
|
|
2038
|
+
import { Fragment as Fragment3, jsx as jsx37, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2076
2039
|
var DataList = (props) => {
|
|
2077
2040
|
console.log(props.dataset, "datasetssssss");
|
|
2078
2041
|
const router = useRouter();
|
|
@@ -2095,7 +2058,7 @@ var DataList = (props) => {
|
|
|
2095
2058
|
if (path.includes(".")) {
|
|
2096
2059
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
2097
2060
|
} else if (Array.isArray(obj[path])) {
|
|
2098
|
-
return obj[path].map((item, index) => /* @__PURE__ */
|
|
2061
|
+
return obj[path].map((item, index) => /* @__PURE__ */ jsx37("div", { children: item }, index));
|
|
2099
2062
|
} else {
|
|
2100
2063
|
return obj[path];
|
|
2101
2064
|
}
|
|
@@ -2151,30 +2114,30 @@ var DataList = (props) => {
|
|
|
2151
2114
|
const renderPageNumbers = () => {
|
|
2152
2115
|
if (pages <= 10) {
|
|
2153
2116
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
2154
|
-
(page) => /* @__PURE__ */
|
|
2117
|
+
(page) => /* @__PURE__ */ jsx37(React32.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx37(
|
|
2155
2118
|
Hyperlink,
|
|
2156
2119
|
{
|
|
2157
2120
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
2158
2121
|
href: builder.getNewPageUrl(page),
|
|
2159
2122
|
children: page
|
|
2160
2123
|
}
|
|
2161
|
-
) : /* @__PURE__ */
|
|
2124
|
+
) : /* @__PURE__ */ jsx37("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)
|
|
2162
2125
|
);
|
|
2163
2126
|
} else {
|
|
2164
2127
|
const showFirstPages = activePageNumber <= 5;
|
|
2165
2128
|
const showLastPages = activePageNumber > pages - 5;
|
|
2166
2129
|
if (showFirstPages) {
|
|
2167
|
-
return /* @__PURE__ */
|
|
2168
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */
|
|
2130
|
+
return /* @__PURE__ */ jsxs23(Fragment3, { children: [
|
|
2131
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ jsx37(React32.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx37(
|
|
2169
2132
|
Hyperlink,
|
|
2170
2133
|
{
|
|
2171
2134
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
2172
2135
|
href: builder.getNewPageUrl(page),
|
|
2173
2136
|
children: page
|
|
2174
2137
|
}
|
|
2175
|
-
) : /* @__PURE__ */
|
|
2176
|
-
/* @__PURE__ */
|
|
2177
|
-
/* @__PURE__ */
|
|
2138
|
+
) : /* @__PURE__ */ jsx37("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)),
|
|
2139
|
+
/* @__PURE__ */ jsx37("span", { className: "px-2 py-1", children: "..." }),
|
|
2140
|
+
/* @__PURE__ */ jsx37(
|
|
2178
2141
|
Hyperlink,
|
|
2179
2142
|
{
|
|
2180
2143
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2182,7 +2145,7 @@ var DataList = (props) => {
|
|
|
2182
2145
|
children: pages - 1
|
|
2183
2146
|
}
|
|
2184
2147
|
),
|
|
2185
|
-
/* @__PURE__ */
|
|
2148
|
+
/* @__PURE__ */ jsx37(
|
|
2186
2149
|
Hyperlink,
|
|
2187
2150
|
{
|
|
2188
2151
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2190,7 +2153,7 @@ var DataList = (props) => {
|
|
|
2190
2153
|
children: pages
|
|
2191
2154
|
}
|
|
2192
2155
|
),
|
|
2193
|
-
/* @__PURE__ */
|
|
2156
|
+
/* @__PURE__ */ jsx37("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs23(
|
|
2194
2157
|
"select",
|
|
2195
2158
|
{
|
|
2196
2159
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -2202,18 +2165,18 @@ var DataList = (props) => {
|
|
|
2202
2165
|
}
|
|
2203
2166
|
},
|
|
2204
2167
|
children: [
|
|
2205
|
-
/* @__PURE__ */
|
|
2168
|
+
/* @__PURE__ */ jsx37("option", { className: "", value: "", children: "Jump to" }),
|
|
2206
2169
|
Array.from(
|
|
2207
2170
|
{ length: Math.max(0, pages - 10) },
|
|
2208
2171
|
(_, index) => index + 9
|
|
2209
|
-
).map((page) => /* @__PURE__ */
|
|
2172
|
+
).map((page) => /* @__PURE__ */ jsx37("option", { value: page, children: page }, page))
|
|
2210
2173
|
]
|
|
2211
2174
|
}
|
|
2212
2175
|
) })
|
|
2213
2176
|
] });
|
|
2214
2177
|
} else if (showLastPages) {
|
|
2215
|
-
return /* @__PURE__ */
|
|
2216
|
-
/* @__PURE__ */
|
|
2178
|
+
return /* @__PURE__ */ jsxs23(Fragment3, { children: [
|
|
2179
|
+
/* @__PURE__ */ jsx37(
|
|
2217
2180
|
Hyperlink,
|
|
2218
2181
|
{
|
|
2219
2182
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2221,7 +2184,7 @@ var DataList = (props) => {
|
|
|
2221
2184
|
children: "1"
|
|
2222
2185
|
}
|
|
2223
2186
|
),
|
|
2224
|
-
/* @__PURE__ */
|
|
2187
|
+
/* @__PURE__ */ jsx37(
|
|
2225
2188
|
Hyperlink,
|
|
2226
2189
|
{
|
|
2227
2190
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2229,21 +2192,21 @@ var DataList = (props) => {
|
|
|
2229
2192
|
children: "2"
|
|
2230
2193
|
}
|
|
2231
2194
|
),
|
|
2232
|
-
/* @__PURE__ */
|
|
2195
|
+
/* @__PURE__ */ jsx37("span", { className: "px-2 py-1", children: "..." }),
|
|
2233
2196
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
2234
|
-
(page) => /* @__PURE__ */
|
|
2197
|
+
(page) => /* @__PURE__ */ jsx37(React32.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx37(
|
|
2235
2198
|
Hyperlink,
|
|
2236
2199
|
{
|
|
2237
2200
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
2238
2201
|
href: builder.getNewPageUrl(page),
|
|
2239
2202
|
children: page
|
|
2240
2203
|
}
|
|
2241
|
-
) : /* @__PURE__ */
|
|
2204
|
+
) : /* @__PURE__ */ jsx37("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)
|
|
2242
2205
|
)
|
|
2243
2206
|
] });
|
|
2244
2207
|
} else {
|
|
2245
|
-
return /* @__PURE__ */
|
|
2246
|
-
/* @__PURE__ */
|
|
2208
|
+
return /* @__PURE__ */ jsxs23(Fragment3, { children: [
|
|
2209
|
+
/* @__PURE__ */ jsx37(
|
|
2247
2210
|
Hyperlink,
|
|
2248
2211
|
{
|
|
2249
2212
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2251,7 +2214,7 @@ var DataList = (props) => {
|
|
|
2251
2214
|
children: "1"
|
|
2252
2215
|
}
|
|
2253
2216
|
),
|
|
2254
|
-
/* @__PURE__ */
|
|
2217
|
+
/* @__PURE__ */ jsx37(
|
|
2255
2218
|
Hyperlink,
|
|
2256
2219
|
{
|
|
2257
2220
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2259,20 +2222,20 @@ var DataList = (props) => {
|
|
|
2259
2222
|
children: "2"
|
|
2260
2223
|
}
|
|
2261
2224
|
),
|
|
2262
|
-
/* @__PURE__ */
|
|
2225
|
+
/* @__PURE__ */ jsx37("span", { className: "px-2 py-1", children: "..." }),
|
|
2263
2226
|
Array.from(
|
|
2264
2227
|
{ length: 5 },
|
|
2265
2228
|
(_, index) => activePageNumber - 2 + index
|
|
2266
|
-
).map((page) => /* @__PURE__ */
|
|
2229
|
+
).map((page) => /* @__PURE__ */ jsx37(React32.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ jsx37(
|
|
2267
2230
|
Hyperlink,
|
|
2268
2231
|
{
|
|
2269
2232
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
2270
2233
|
href: builder.getNewPageUrl(page),
|
|
2271
2234
|
children: page
|
|
2272
2235
|
}
|
|
2273
|
-
) : /* @__PURE__ */
|
|
2274
|
-
/* @__PURE__ */
|
|
2275
|
-
/* @__PURE__ */
|
|
2236
|
+
) : /* @__PURE__ */ jsx37("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary text-white", children: page }) }, page)),
|
|
2237
|
+
/* @__PURE__ */ jsx37("span", { className: "px-2 py-1", children: "..." }),
|
|
2238
|
+
/* @__PURE__ */ jsx37(
|
|
2276
2239
|
Hyperlink,
|
|
2277
2240
|
{
|
|
2278
2241
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2280,7 +2243,7 @@ var DataList = (props) => {
|
|
|
2280
2243
|
children: pages - 1
|
|
2281
2244
|
}
|
|
2282
2245
|
),
|
|
2283
|
-
/* @__PURE__ */
|
|
2246
|
+
/* @__PURE__ */ jsx37(
|
|
2284
2247
|
Hyperlink,
|
|
2285
2248
|
{
|
|
2286
2249
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -2288,7 +2251,7 @@ var DataList = (props) => {
|
|
|
2288
2251
|
children: pages
|
|
2289
2252
|
}
|
|
2290
2253
|
),
|
|
2291
|
-
/* @__PURE__ */
|
|
2254
|
+
/* @__PURE__ */ jsx37("div", { className: "relative inline-block", children: /* @__PURE__ */ jsxs23(
|
|
2292
2255
|
"select",
|
|
2293
2256
|
{
|
|
2294
2257
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -2300,8 +2263,8 @@ var DataList = (props) => {
|
|
|
2300
2263
|
}
|
|
2301
2264
|
},
|
|
2302
2265
|
children: [
|
|
2303
|
-
/* @__PURE__ */
|
|
2304
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */
|
|
2266
|
+
/* @__PURE__ */ jsx37("option", { value: "", children: "Jump to" }),
|
|
2267
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ jsx37("option", { value: page, children: page }, page))
|
|
2305
2268
|
]
|
|
2306
2269
|
}
|
|
2307
2270
|
) })
|
|
@@ -2309,16 +2272,16 @@ var DataList = (props) => {
|
|
|
2309
2272
|
}
|
|
2310
2273
|
}
|
|
2311
2274
|
};
|
|
2312
|
-
return /* @__PURE__ */
|
|
2313
|
-
/* @__PURE__ */
|
|
2314
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */
|
|
2275
|
+
return /* @__PURE__ */ jsxs23(React32.Fragment, { children: [
|
|
2276
|
+
/* @__PURE__ */ jsxs23(ContentView_default, { isDataFound, children: [
|
|
2277
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs23(
|
|
2315
2278
|
"div",
|
|
2316
2279
|
{
|
|
2317
2280
|
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`,
|
|
2318
2281
|
children: [
|
|
2319
|
-
props.title ? /* @__PURE__ */
|
|
2320
|
-
/* @__PURE__ */
|
|
2321
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
2282
|
+
props.title ? /* @__PURE__ */ jsx37("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx37("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ jsx37("div", {}),
|
|
2283
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-3", children: [
|
|
2284
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx37(
|
|
2322
2285
|
InputControl_default,
|
|
2323
2286
|
{
|
|
2324
2287
|
name: filter.name,
|
|
@@ -2333,15 +2296,15 @@ var DataList = (props) => {
|
|
|
2333
2296
|
},
|
|
2334
2297
|
filter.name
|
|
2335
2298
|
)),
|
|
2336
|
-
props.addLinkHref && /* @__PURE__ */
|
|
2299
|
+
props.addLinkHref && /* @__PURE__ */ jsxs23(
|
|
2337
2300
|
Hyperlink,
|
|
2338
2301
|
{
|
|
2339
2302
|
className: "gap-1",
|
|
2340
2303
|
linkType: "Primary" /* Solid */,
|
|
2341
2304
|
href: props.addLinkHref,
|
|
2342
2305
|
children: [
|
|
2343
|
-
/* @__PURE__ */
|
|
2344
|
-
/* @__PURE__ */
|
|
2306
|
+
/* @__PURE__ */ jsx37(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
2307
|
+
/* @__PURE__ */ jsx37("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
2345
2308
|
]
|
|
2346
2309
|
}
|
|
2347
2310
|
)
|
|
@@ -2349,8 +2312,8 @@ var DataList = (props) => {
|
|
|
2349
2312
|
]
|
|
2350
2313
|
}
|
|
2351
2314
|
),
|
|
2352
|
-
/* @__PURE__ */
|
|
2353
|
-
/* @__PURE__ */
|
|
2315
|
+
/* @__PURE__ */ jsx37("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ jsxs23("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
2316
|
+
/* @__PURE__ */ jsx37("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ jsx37("tr", { children: props?.columns?.map((column) => {
|
|
2354
2317
|
let url = builder.getNewOrderByUrl(column.name);
|
|
2355
2318
|
let icon = "chevronUpDown";
|
|
2356
2319
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -2360,36 +2323,36 @@ var DataList = (props) => {
|
|
|
2360
2323
|
icon = "chevronUp";
|
|
2361
2324
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
2362
2325
|
}
|
|
2363
|
-
return /* @__PURE__ */
|
|
2326
|
+
return /* @__PURE__ */ jsx37(
|
|
2364
2327
|
"th",
|
|
2365
2328
|
{
|
|
2366
|
-
className: "px-6 py-3 text-left font-medium cursor-pointer bg-neutral-soft " + column.width + (column.controlType == ViewControlTypes_default.
|
|
2367
|
-
children: /* @__PURE__ */
|
|
2368
|
-
/* @__PURE__ */
|
|
2369
|
-
column.enableSorting && /* @__PURE__ */
|
|
2329
|
+
className: "px-6 py-3 text-left font-medium cursor-pointer bg-neutral-soft " + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
2330
|
+
children: /* @__PURE__ */ jsx37(Hyperlink, { href: url, className: "!text-neutral-contrast ", children: /* @__PURE__ */ jsxs23("span", { className: "flex items-center space-x-1", children: [
|
|
2331
|
+
/* @__PURE__ */ jsx37("span", { className: "text-black", children: column.label }),
|
|
2332
|
+
column.enableSorting && /* @__PURE__ */ jsx37(Icon_default, { className: "w-4 h-4", name: icon })
|
|
2370
2333
|
] }) })
|
|
2371
2334
|
},
|
|
2372
2335
|
column.name
|
|
2373
2336
|
);
|
|
2374
2337
|
}) }) }),
|
|
2375
|
-
/* @__PURE__ */
|
|
2338
|
+
/* @__PURE__ */ jsx37("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
2376
2339
|
let validityClass = "";
|
|
2377
2340
|
console.log("dataitem", dataitem);
|
|
2378
2341
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
2379
2342
|
validityClass = "bg-alert-200";
|
|
2380
2343
|
}
|
|
2381
|
-
return /* @__PURE__ */
|
|
2344
|
+
return /* @__PURE__ */ jsx37("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
2382
2345
|
console.log("column", column);
|
|
2383
|
-
return /* @__PURE__ */
|
|
2346
|
+
return /* @__PURE__ */ jsx37(React32.Fragment, { children: /* @__PURE__ */ jsx37(
|
|
2384
2347
|
"td",
|
|
2385
2348
|
{
|
|
2386
|
-
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.
|
|
2387
|
-
children: column.addhref === true ? /* @__PURE__ */
|
|
2349
|
+
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
2350
|
+
children: column.addhref === true ? /* @__PURE__ */ jsx37(
|
|
2388
2351
|
Hyperlink,
|
|
2389
2352
|
{
|
|
2390
2353
|
className: "",
|
|
2391
2354
|
href: `https://${dataitem[column.name]}`,
|
|
2392
|
-
children: /* @__PURE__ */
|
|
2355
|
+
children: /* @__PURE__ */ jsx37(
|
|
2393
2356
|
ViewControl_default,
|
|
2394
2357
|
{
|
|
2395
2358
|
controlType: column.controlType,
|
|
@@ -2402,11 +2365,11 @@ var DataList = (props) => {
|
|
|
2402
2365
|
}
|
|
2403
2366
|
)
|
|
2404
2367
|
}
|
|
2405
|
-
) : column.showAsLink ? /* @__PURE__ */
|
|
2368
|
+
) : column.showAsLink ? /* @__PURE__ */ jsx37(
|
|
2406
2369
|
Hyperlink,
|
|
2407
2370
|
{
|
|
2408
2371
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
2409
|
-
children: /* @__PURE__ */
|
|
2372
|
+
children: /* @__PURE__ */ jsx37(
|
|
2410
2373
|
ViewControl_default,
|
|
2411
2374
|
{
|
|
2412
2375
|
controlType: column.controlType,
|
|
@@ -2416,7 +2379,7 @@ var DataList = (props) => {
|
|
|
2416
2379
|
}
|
|
2417
2380
|
)
|
|
2418
2381
|
}
|
|
2419
|
-
) : /* @__PURE__ */
|
|
2382
|
+
) : /* @__PURE__ */ jsx37(
|
|
2420
2383
|
ViewControl_default,
|
|
2421
2384
|
{
|
|
2422
2385
|
controlType: column.controlType,
|
|
@@ -2430,10 +2393,10 @@ var DataList = (props) => {
|
|
|
2430
2393
|
}) }, index);
|
|
2431
2394
|
}) })
|
|
2432
2395
|
] }) }),
|
|
2433
|
-
/* @__PURE__ */
|
|
2434
|
-
/* @__PURE__ */
|
|
2435
|
-
/* @__PURE__ */
|
|
2436
|
-
activePageNumber > 1 && /* @__PURE__ */
|
|
2396
|
+
/* @__PURE__ */ jsx37("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ jsxs23("div", { className: "flex items-center justify-between", children: [
|
|
2397
|
+
/* @__PURE__ */ jsx37("div", { className: "text-gray-700", children: label }),
|
|
2398
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex space-x-2 items-center", children: [
|
|
2399
|
+
activePageNumber > 1 && /* @__PURE__ */ jsx37(
|
|
2437
2400
|
Hyperlink,
|
|
2438
2401
|
{
|
|
2439
2402
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -2441,9 +2404,9 @@ var DataList = (props) => {
|
|
|
2441
2404
|
children: "Prev"
|
|
2442
2405
|
}
|
|
2443
2406
|
),
|
|
2444
|
-
activePageNumber <= 1 && /* @__PURE__ */
|
|
2407
|
+
activePageNumber <= 1 && /* @__PURE__ */ jsx37("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" }),
|
|
2445
2408
|
renderPageNumbers(),
|
|
2446
|
-
activePageNumber < pages && /* @__PURE__ */
|
|
2409
|
+
activePageNumber < pages && /* @__PURE__ */ jsx37(
|
|
2447
2410
|
Hyperlink,
|
|
2448
2411
|
{
|
|
2449
2412
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -2451,19 +2414,19 @@ var DataList = (props) => {
|
|
|
2451
2414
|
children: "Next"
|
|
2452
2415
|
}
|
|
2453
2416
|
),
|
|
2454
|
-
activePageNumber >= pages && /* @__PURE__ */
|
|
2417
|
+
activePageNumber >= pages && /* @__PURE__ */ jsx37("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
2455
2418
|
] })
|
|
2456
2419
|
] }) })
|
|
2457
2420
|
] }),
|
|
2458
|
-
/* @__PURE__ */
|
|
2459
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */
|
|
2421
|
+
/* @__PURE__ */ jsxs23(NoContentView_default, { isDataFound, children: [
|
|
2422
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ jsxs23(
|
|
2460
2423
|
"div",
|
|
2461
2424
|
{
|
|
2462
2425
|
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`,
|
|
2463
2426
|
children: [
|
|
2464
|
-
props.title ? /* @__PURE__ */
|
|
2465
|
-
/* @__PURE__ */
|
|
2466
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */
|
|
2427
|
+
props.title ? /* @__PURE__ */ jsx37("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ jsx37("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ jsx37("div", {}),
|
|
2428
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-3", children: [
|
|
2429
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ jsx37(
|
|
2467
2430
|
InputControl_default,
|
|
2468
2431
|
{
|
|
2469
2432
|
name: filter.name,
|
|
@@ -2478,15 +2441,15 @@ var DataList = (props) => {
|
|
|
2478
2441
|
},
|
|
2479
2442
|
filter.name
|
|
2480
2443
|
)),
|
|
2481
|
-
props.addLinkHref && /* @__PURE__ */
|
|
2444
|
+
props.addLinkHref && /* @__PURE__ */ jsxs23(
|
|
2482
2445
|
Hyperlink,
|
|
2483
2446
|
{
|
|
2484
2447
|
className: "gap-1",
|
|
2485
2448
|
linkType: "Primary" /* Solid */,
|
|
2486
2449
|
href: props.addLinkHref,
|
|
2487
2450
|
children: [
|
|
2488
|
-
/* @__PURE__ */
|
|
2489
|
-
/* @__PURE__ */
|
|
2451
|
+
/* @__PURE__ */ jsx37(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
2452
|
+
/* @__PURE__ */ jsx37("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
2490
2453
|
]
|
|
2491
2454
|
}
|
|
2492
2455
|
)
|
|
@@ -2494,8 +2457,8 @@ var DataList = (props) => {
|
|
|
2494
2457
|
]
|
|
2495
2458
|
}
|
|
2496
2459
|
),
|
|
2497
|
-
/* @__PURE__ */
|
|
2498
|
-
/* @__PURE__ */
|
|
2460
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
2461
|
+
/* @__PURE__ */ jsx37("div", { children: /* @__PURE__ */ jsx37("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ jsx37("thead", { className: "bg-gray-50", children: /* @__PURE__ */ jsx37("tr", { children: props?.columns?.map((column) => {
|
|
2499
2462
|
let url = builder.getNewOrderByUrl(column.name);
|
|
2500
2463
|
let icon = "chevronUpDown";
|
|
2501
2464
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -2505,19 +2468,19 @@ var DataList = (props) => {
|
|
|
2505
2468
|
icon = "chevronUp";
|
|
2506
2469
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
2507
2470
|
}
|
|
2508
|
-
return /* @__PURE__ */
|
|
2471
|
+
return /* @__PURE__ */ jsx37(
|
|
2509
2472
|
"th",
|
|
2510
2473
|
{
|
|
2511
|
-
className: "px-6 py-3 text-left font-medium cursor-pointer bg-neutral-soft " + column.width + (column.controlType == ViewControlTypes_default.
|
|
2512
|
-
children: /* @__PURE__ */
|
|
2513
|
-
/* @__PURE__ */
|
|
2514
|
-
column.enableSorting && /* @__PURE__ */
|
|
2474
|
+
className: "px-6 py-3 text-left font-medium cursor-pointer bg-neutral-soft " + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
2475
|
+
children: /* @__PURE__ */ jsx37(Hyperlink, { href: url, className: "text-body-950", children: /* @__PURE__ */ jsxs23("span", { className: "flex items-center space-x-1", children: [
|
|
2476
|
+
/* @__PURE__ */ jsx37("span", { children: column.label }),
|
|
2477
|
+
column.enableSorting && /* @__PURE__ */ jsx37(Icon_default, { className: "w-4 h-4", name: icon })
|
|
2515
2478
|
] }) })
|
|
2516
2479
|
},
|
|
2517
2480
|
column.name
|
|
2518
2481
|
);
|
|
2519
2482
|
}) }) }) }) }),
|
|
2520
|
-
/* @__PURE__ */
|
|
2483
|
+
/* @__PURE__ */ jsx37("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
2521
2484
|
] })
|
|
2522
2485
|
] })
|
|
2523
2486
|
] });
|
|
@@ -2525,13 +2488,13 @@ var DataList = (props) => {
|
|
|
2525
2488
|
var DataList_default = DataList;
|
|
2526
2489
|
|
|
2527
2490
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
2528
|
-
import
|
|
2491
|
+
import React45 from "react";
|
|
2529
2492
|
|
|
2530
2493
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
2531
|
-
import
|
|
2494
|
+
import React34 from "react";
|
|
2532
2495
|
|
|
2533
2496
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
2534
|
-
import { jsx as
|
|
2497
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
2535
2498
|
var TextNode = (props) => {
|
|
2536
2499
|
function cssStringToJson(cssString) {
|
|
2537
2500
|
const styleObject = {};
|
|
@@ -2591,22 +2554,22 @@ var TextNode = (props) => {
|
|
|
2591
2554
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
2592
2555
|
return (
|
|
2593
2556
|
// @ts-expect-error custom code
|
|
2594
|
-
/* @__PURE__ */
|
|
2557
|
+
/* @__PURE__ */ jsx38("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text })
|
|
2595
2558
|
);
|
|
2596
2559
|
};
|
|
2597
2560
|
var TextNode_default = TextNode;
|
|
2598
2561
|
|
|
2599
2562
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
2600
|
-
import { jsx as
|
|
2563
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2601
2564
|
var LineBreakNode = () => {
|
|
2602
|
-
return /* @__PURE__ */
|
|
2565
|
+
return /* @__PURE__ */ jsx39("div", { className: "py-0.5 lg:py-1.5" });
|
|
2603
2566
|
};
|
|
2604
2567
|
var LineBreakNode_default = LineBreakNode;
|
|
2605
2568
|
|
|
2606
2569
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
2607
|
-
import
|
|
2570
|
+
import React33 from "react";
|
|
2608
2571
|
import Link2 from "next/link";
|
|
2609
|
-
import { jsx as
|
|
2572
|
+
import { jsx as jsx40, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2610
2573
|
var LinkNode = (props) => {
|
|
2611
2574
|
const NodeTypes2 = {
|
|
2612
2575
|
["text"]: TextNode_default
|
|
@@ -2614,21 +2577,21 @@ var LinkNode = (props) => {
|
|
|
2614
2577
|
{
|
|
2615
2578
|
}
|
|
2616
2579
|
let formatClasses = props.node.cssClass || "";
|
|
2617
|
-
return /* @__PURE__ */
|
|
2580
|
+
return /* @__PURE__ */ jsxs24(Link2, { className: formatClasses, href: props.node.url, title: props.node.title, children: [
|
|
2618
2581
|
props.node.children && props.node.children.map((node, index) => {
|
|
2619
2582
|
const SelectedNode = NodeTypes2[node.type];
|
|
2620
|
-
return /* @__PURE__ */
|
|
2583
|
+
return /* @__PURE__ */ jsx40(React33.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx40(SelectedNode, { node }) }, index);
|
|
2621
2584
|
}),
|
|
2622
|
-
props.node.children.length == 0 && /* @__PURE__ */
|
|
2585
|
+
props.node.children.length == 0 && /* @__PURE__ */ jsx40("br", {})
|
|
2623
2586
|
] });
|
|
2624
2587
|
};
|
|
2625
2588
|
var LinkNode_default = LinkNode;
|
|
2626
2589
|
|
|
2627
2590
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
2628
|
-
import { jsx as
|
|
2591
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
2629
2592
|
var SVGIconNode = ({ node }) => {
|
|
2630
2593
|
if (!node?.svgCode) return null;
|
|
2631
|
-
return /* @__PURE__ */
|
|
2594
|
+
return /* @__PURE__ */ jsx41(
|
|
2632
2595
|
"span",
|
|
2633
2596
|
{
|
|
2634
2597
|
style: {
|
|
@@ -2645,7 +2608,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
2645
2608
|
|
|
2646
2609
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
2647
2610
|
import katex from "katex";
|
|
2648
|
-
import { jsx as
|
|
2611
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
2649
2612
|
var EquationNode = ({ node }) => {
|
|
2650
2613
|
const { equation, inline } = node;
|
|
2651
2614
|
let html = "";
|
|
@@ -2660,7 +2623,7 @@ var EquationNode = ({ node }) => {
|
|
|
2660
2623
|
});
|
|
2661
2624
|
}
|
|
2662
2625
|
if (inline) {
|
|
2663
|
-
return /* @__PURE__ */
|
|
2626
|
+
return /* @__PURE__ */ jsx42(
|
|
2664
2627
|
"span",
|
|
2665
2628
|
{
|
|
2666
2629
|
className: "katex-inline",
|
|
@@ -2668,7 +2631,7 @@ var EquationNode = ({ node }) => {
|
|
|
2668
2631
|
}
|
|
2669
2632
|
);
|
|
2670
2633
|
}
|
|
2671
|
-
return /* @__PURE__ */
|
|
2634
|
+
return /* @__PURE__ */ jsx42(
|
|
2672
2635
|
"div",
|
|
2673
2636
|
{
|
|
2674
2637
|
className: "katex-block my-3 text-center",
|
|
@@ -2679,7 +2642,7 @@ var EquationNode = ({ node }) => {
|
|
|
2679
2642
|
var EquationNode_default = EquationNode;
|
|
2680
2643
|
|
|
2681
2644
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
2682
|
-
import { jsx as
|
|
2645
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
2683
2646
|
function getNestedProperty(obj, path) {
|
|
2684
2647
|
if (!obj || !path) return null;
|
|
2685
2648
|
if (path.includes(".")) {
|
|
@@ -2692,7 +2655,7 @@ function getNestedProperty(obj, path) {
|
|
|
2692
2655
|
}
|
|
2693
2656
|
const value = obj[path];
|
|
2694
2657
|
if (Array.isArray(value)) {
|
|
2695
|
-
return value.map((item, index) => /* @__PURE__ */
|
|
2658
|
+
return value.map((item, index) => /* @__PURE__ */ jsx43("div", { children: String(item) }, index));
|
|
2696
2659
|
}
|
|
2697
2660
|
return value;
|
|
2698
2661
|
}
|
|
@@ -2753,7 +2716,7 @@ var DatafieldNode = (props) => {
|
|
|
2753
2716
|
const dataType = props.node.dataType;
|
|
2754
2717
|
if (isEmptyValue) return null;
|
|
2755
2718
|
if (dataType === "rawContent") {
|
|
2756
|
-
return /* @__PURE__ */
|
|
2719
|
+
return /* @__PURE__ */ jsx43(
|
|
2757
2720
|
PageBodyRenderer_default,
|
|
2758
2721
|
{
|
|
2759
2722
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -2768,12 +2731,12 @@ var DatafieldNode = (props) => {
|
|
|
2768
2731
|
}
|
|
2769
2732
|
);
|
|
2770
2733
|
}
|
|
2771
|
-
return /* @__PURE__ */
|
|
2734
|
+
return /* @__PURE__ */ jsx43(
|
|
2772
2735
|
"span",
|
|
2773
2736
|
{
|
|
2774
2737
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
2775
2738
|
style: styles,
|
|
2776
|
-
children: /* @__PURE__ */
|
|
2739
|
+
children: /* @__PURE__ */ jsx43(
|
|
2777
2740
|
ViewControl_default,
|
|
2778
2741
|
{
|
|
2779
2742
|
controlType: dataType,
|
|
@@ -2786,7 +2749,7 @@ var DatafieldNode = (props) => {
|
|
|
2786
2749
|
var DatafieldNode_default = DatafieldNode;
|
|
2787
2750
|
|
|
2788
2751
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
2789
|
-
import { Fragment as Fragment4, jsx as
|
|
2752
|
+
import { Fragment as Fragment4, jsx as jsx44, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2790
2753
|
var ParagraphNode = (props) => {
|
|
2791
2754
|
const NodeTypes2 = {
|
|
2792
2755
|
["text"]: TextNode_default,
|
|
@@ -2806,9 +2769,9 @@ var ParagraphNode = (props) => {
|
|
|
2806
2769
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
2807
2770
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
2808
2771
|
if (isInlineOnlyParent) {
|
|
2809
|
-
return /* @__PURE__ */
|
|
2772
|
+
return /* @__PURE__ */ jsx44(Fragment4, { children: hasChildren && props.node.children.map((node, index) => {
|
|
2810
2773
|
const SelectedNode = NodeTypes2[node.type];
|
|
2811
|
-
return /* @__PURE__ */
|
|
2774
|
+
return /* @__PURE__ */ jsx44(React34.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx44(
|
|
2812
2775
|
SelectedNode,
|
|
2813
2776
|
{
|
|
2814
2777
|
node,
|
|
@@ -2820,10 +2783,10 @@ var ParagraphNode = (props) => {
|
|
|
2820
2783
|
) }, index);
|
|
2821
2784
|
}) });
|
|
2822
2785
|
}
|
|
2823
|
-
return /* @__PURE__ */
|
|
2786
|
+
return /* @__PURE__ */ jsxs25("div", { className: " " + formatClasses, children: [
|
|
2824
2787
|
hasChildren && props.node.children.map((node, index) => {
|
|
2825
2788
|
const SelectedNode = NodeTypes2[node.type];
|
|
2826
|
-
return /* @__PURE__ */
|
|
2789
|
+
return /* @__PURE__ */ jsx44(React34.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx44(
|
|
2827
2790
|
SelectedNode,
|
|
2828
2791
|
{
|
|
2829
2792
|
node,
|
|
@@ -2834,14 +2797,14 @@ var ParagraphNode = (props) => {
|
|
|
2834
2797
|
}
|
|
2835
2798
|
) }, index);
|
|
2836
2799
|
}),
|
|
2837
|
-
!hasChildren && /* @__PURE__ */
|
|
2800
|
+
!hasChildren && /* @__PURE__ */ jsx44("div", { className: "py-1.5 lg:py-2" })
|
|
2838
2801
|
] });
|
|
2839
2802
|
};
|
|
2840
2803
|
var ParagraphNode_default = ParagraphNode;
|
|
2841
2804
|
|
|
2842
2805
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
2843
|
-
import
|
|
2844
|
-
import { Fragment as Fragment5, jsx as
|
|
2806
|
+
import React35 from "react";
|
|
2807
|
+
import { Fragment as Fragment5, jsx as jsx45 } from "react/jsx-runtime";
|
|
2845
2808
|
var HeadingNode = (props) => {
|
|
2846
2809
|
const NodeTypes2 = {
|
|
2847
2810
|
["text"]: TextNode_default,
|
|
@@ -2857,23 +2820,23 @@ var HeadingNode = (props) => {
|
|
|
2857
2820
|
{
|
|
2858
2821
|
}
|
|
2859
2822
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
2860
|
-
return /* @__PURE__ */
|
|
2823
|
+
return /* @__PURE__ */ jsx45(Fragment5, { children: React35.createElement(
|
|
2861
2824
|
HeadingTag,
|
|
2862
2825
|
{ className: formatClasses },
|
|
2863
2826
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
2864
2827
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
2865
|
-
return /* @__PURE__ */
|
|
2828
|
+
return /* @__PURE__ */ jsx45(React35.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx45(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
2866
2829
|
})
|
|
2867
2830
|
) });
|
|
2868
2831
|
};
|
|
2869
2832
|
var HeadingNode_default = HeadingNode;
|
|
2870
2833
|
|
|
2871
2834
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
2872
|
-
import
|
|
2835
|
+
import React37 from "react";
|
|
2873
2836
|
|
|
2874
2837
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
2875
|
-
import
|
|
2876
|
-
import { jsx as
|
|
2838
|
+
import React36 from "react";
|
|
2839
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
2877
2840
|
var ListItemNode = (props) => {
|
|
2878
2841
|
const NodeTypes2 = {
|
|
2879
2842
|
text: TextNode_default,
|
|
@@ -2890,66 +2853,66 @@ var ListItemNode = (props) => {
|
|
|
2890
2853
|
liStyle.fontSize = match[1].trim();
|
|
2891
2854
|
}
|
|
2892
2855
|
}
|
|
2893
|
-
return /* @__PURE__ */
|
|
2856
|
+
return /* @__PURE__ */ jsx46("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
2894
2857
|
const SelectedNode = NodeTypes2[node.type];
|
|
2895
2858
|
if (node.type === "linebreak") {
|
|
2896
2859
|
if (!foundFirstBreak) {
|
|
2897
2860
|
foundFirstBreak = true;
|
|
2898
|
-
return /* @__PURE__ */
|
|
2861
|
+
return /* @__PURE__ */ jsx46("div", {}, index);
|
|
2899
2862
|
} else {
|
|
2900
|
-
return /* @__PURE__ */
|
|
2863
|
+
return /* @__PURE__ */ jsx46("div", { className: "py-1 lg:py-2" }, index);
|
|
2901
2864
|
}
|
|
2902
2865
|
} else {
|
|
2903
2866
|
foundFirstBreak = false;
|
|
2904
|
-
return /* @__PURE__ */
|
|
2867
|
+
return /* @__PURE__ */ jsx46(React36.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx46(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2905
2868
|
}
|
|
2906
2869
|
}) });
|
|
2907
2870
|
};
|
|
2908
2871
|
var ListItemNode_default = ListItemNode;
|
|
2909
2872
|
|
|
2910
2873
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
2911
|
-
import { jsx as
|
|
2874
|
+
import { jsx as jsx47, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2912
2875
|
var ListNode = (props) => {
|
|
2913
2876
|
const NodeTypes2 = {
|
|
2914
2877
|
listitem: ListItemNode_default
|
|
2915
2878
|
};
|
|
2916
|
-
return /* @__PURE__ */
|
|
2917
|
-
props.node.listType == "bullet" && /* @__PURE__ */
|
|
2879
|
+
return /* @__PURE__ */ jsxs26(React37.Fragment, { children: [
|
|
2880
|
+
props.node.listType == "bullet" && /* @__PURE__ */ jsx47("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2918
2881
|
const SelectedNode = NodeTypes2[node.type];
|
|
2919
|
-
return /* @__PURE__ */
|
|
2882
|
+
return /* @__PURE__ */ jsx47(React37.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx47(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2920
2883
|
}) }),
|
|
2921
|
-
props.node.listType == "number" && /* @__PURE__ */
|
|
2884
|
+
props.node.listType == "number" && /* @__PURE__ */ jsx47("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2922
2885
|
const SelectedNode = NodeTypes2[node.type];
|
|
2923
|
-
return /* @__PURE__ */
|
|
2886
|
+
return /* @__PURE__ */ jsx47(React37.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx47(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
2924
2887
|
}) })
|
|
2925
2888
|
] });
|
|
2926
2889
|
};
|
|
2927
2890
|
var ListNode_default = ListNode;
|
|
2928
2891
|
|
|
2929
2892
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
2930
|
-
import
|
|
2931
|
-
import { jsx as
|
|
2893
|
+
import React38 from "react";
|
|
2894
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
2932
2895
|
var QuoteNode = (props) => {
|
|
2933
2896
|
const NodeTypes2 = {
|
|
2934
2897
|
["text"]: TextNode_default,
|
|
2935
2898
|
["linebreak"]: LineBreakNode_default,
|
|
2936
2899
|
["link"]: LinkNode_default
|
|
2937
2900
|
};
|
|
2938
|
-
return /* @__PURE__ */
|
|
2901
|
+
return /* @__PURE__ */ jsx48("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
2939
2902
|
const SelectedNode = NodeTypes2[node.type];
|
|
2940
|
-
return /* @__PURE__ */
|
|
2903
|
+
return /* @__PURE__ */ jsx48(React38.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx48(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
2941
2904
|
}) });
|
|
2942
2905
|
};
|
|
2943
2906
|
var QuoteNode_default = QuoteNode;
|
|
2944
2907
|
|
|
2945
2908
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
2946
|
-
import
|
|
2909
|
+
import React39 from "react";
|
|
2947
2910
|
import dynamic from "next/dynamic";
|
|
2948
|
-
import { jsx as
|
|
2911
|
+
import { jsx as jsx49, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2949
2912
|
var CopyButton = dynamic(() => import("./CopyButton-XONTQQW7.mjs"), {
|
|
2950
2913
|
ssr: false,
|
|
2951
2914
|
// optional: fallback UI while loading
|
|
2952
|
-
loading: () => /* @__PURE__ */
|
|
2915
|
+
loading: () => /* @__PURE__ */ jsx49("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
2953
2916
|
});
|
|
2954
2917
|
var CodeNode = (props) => {
|
|
2955
2918
|
const NodeTypes2 = {
|
|
@@ -2963,14 +2926,14 @@ var CodeNode = (props) => {
|
|
|
2963
2926
|
if (node.type === "link") return node.text || node.url || "";
|
|
2964
2927
|
return "";
|
|
2965
2928
|
}).join("") ?? "";
|
|
2966
|
-
return /* @__PURE__ */
|
|
2967
|
-
/* @__PURE__ */
|
|
2968
|
-
/* @__PURE__ */
|
|
2969
|
-
/* @__PURE__ */
|
|
2929
|
+
return /* @__PURE__ */ jsxs27("div", { children: [
|
|
2930
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
2931
|
+
/* @__PURE__ */ jsx49("span", { children: "Code Snippet" }),
|
|
2932
|
+
/* @__PURE__ */ jsx49(CopyButton, { text: textContent })
|
|
2970
2933
|
] }),
|
|
2971
|
-
/* @__PURE__ */
|
|
2934
|
+
/* @__PURE__ */ jsx49("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) => {
|
|
2972
2935
|
const SelectedNode = NodeTypes2[node.type];
|
|
2973
|
-
return /* @__PURE__ */
|
|
2936
|
+
return /* @__PURE__ */ jsx49(React39.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx49(
|
|
2974
2937
|
SelectedNode,
|
|
2975
2938
|
{
|
|
2976
2939
|
node,
|
|
@@ -2985,14 +2948,14 @@ var CodeNode = (props) => {
|
|
|
2985
2948
|
var CodeNode_default = CodeNode;
|
|
2986
2949
|
|
|
2987
2950
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
2988
|
-
import { jsx as
|
|
2951
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
2989
2952
|
var HorizontalRuleNode = () => {
|
|
2990
|
-
return /* @__PURE__ */
|
|
2953
|
+
return /* @__PURE__ */ jsx50("hr", {});
|
|
2991
2954
|
};
|
|
2992
2955
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
2993
2956
|
|
|
2994
2957
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
2995
|
-
import
|
|
2958
|
+
import React40 from "react";
|
|
2996
2959
|
|
|
2997
2960
|
// src/components/utilities/AssetUtility.tsx
|
|
2998
2961
|
var AssetUtility = class {
|
|
@@ -3009,7 +2972,7 @@ var AssetUtility = class {
|
|
|
3009
2972
|
// return `https://cdn.g-assets.com/${domainName}`;
|
|
3010
2973
|
// }
|
|
3011
2974
|
static getAssetFullPath(apiBaseUrl, relativePath) {
|
|
3012
|
-
|
|
2975
|
+
const domainName = apiBaseUrl.replace("https://", "");
|
|
3013
2976
|
return `https://cdn.g-assets.com/${domainName}/${relativePath}`;
|
|
3014
2977
|
}
|
|
3015
2978
|
};
|
|
@@ -3019,7 +2982,7 @@ var AssetUtility_default = AssetUtility;
|
|
|
3019
2982
|
import dynamic2 from "next/dynamic";
|
|
3020
2983
|
|
|
3021
2984
|
// src/components/DeviceAssetSelector.tsx
|
|
3022
|
-
import { jsx as
|
|
2985
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
3023
2986
|
var DeviceAssetSelector = ({
|
|
3024
2987
|
assets,
|
|
3025
2988
|
assetBaseUrl,
|
|
@@ -3094,7 +3057,7 @@ var DeviceAssetSelector = ({
|
|
|
3094
3057
|
const formatClasses = FormatClass[nodeProps?.format || ""] || "";
|
|
3095
3058
|
const renderMedia = () => {
|
|
3096
3059
|
if (isHls) {
|
|
3097
|
-
return /* @__PURE__ */
|
|
3060
|
+
return /* @__PURE__ */ jsx51(
|
|
3098
3061
|
HlsPlayer_default,
|
|
3099
3062
|
{
|
|
3100
3063
|
assetUrl: resolvedAssetUrl,
|
|
@@ -3111,7 +3074,7 @@ var DeviceAssetSelector = ({
|
|
|
3111
3074
|
} else {
|
|
3112
3075
|
return (
|
|
3113
3076
|
/* eslint-disable-next-line @next/next/no-img-element */
|
|
3114
|
-
/* @__PURE__ */
|
|
3077
|
+
/* @__PURE__ */ jsx51(
|
|
3115
3078
|
"img",
|
|
3116
3079
|
{
|
|
3117
3080
|
style: styles,
|
|
@@ -3127,17 +3090,17 @@ var DeviceAssetSelector = ({
|
|
|
3127
3090
|
}
|
|
3128
3091
|
};
|
|
3129
3092
|
if (width) {
|
|
3130
|
-
return /* @__PURE__ */
|
|
3093
|
+
return /* @__PURE__ */ jsx51("div", { style: { width }, children: renderMedia() });
|
|
3131
3094
|
}
|
|
3132
3095
|
if (nodeProps?.format) {
|
|
3133
|
-
return /* @__PURE__ */
|
|
3096
|
+
return /* @__PURE__ */ jsx51("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
3134
3097
|
}
|
|
3135
3098
|
return renderMedia();
|
|
3136
3099
|
};
|
|
3137
3100
|
var DeviceAssetSelector_default = DeviceAssetSelector;
|
|
3138
3101
|
|
|
3139
3102
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
3140
|
-
import { Fragment as Fragment6, jsx as
|
|
3103
|
+
import { Fragment as Fragment6, jsx as jsx52 } from "react/jsx-runtime";
|
|
3141
3104
|
var HlsPlayer = dynamic2(() => import("./HlsPlayer-FFEIK6FG.mjs"), {
|
|
3142
3105
|
ssr: false
|
|
3143
3106
|
});
|
|
@@ -3180,7 +3143,7 @@ var ImageNode = (props) => {
|
|
|
3180
3143
|
console.error("Error parsing assets in ImageNode:", error);
|
|
3181
3144
|
}
|
|
3182
3145
|
if (assets && assets.length > 0) {
|
|
3183
|
-
return /* @__PURE__ */
|
|
3146
|
+
return /* @__PURE__ */ jsx52(Fragment6, { children: /* @__PURE__ */ jsx52(
|
|
3184
3147
|
DeviceAssetSelector_default,
|
|
3185
3148
|
{
|
|
3186
3149
|
device: props.device,
|
|
@@ -3229,7 +3192,7 @@ var ImageNode = (props) => {
|
|
|
3229
3192
|
const isHls = imageUrl?.endsWith(".m3u8");
|
|
3230
3193
|
const renderMedia = () => {
|
|
3231
3194
|
if (isHls) {
|
|
3232
|
-
return /* @__PURE__ */
|
|
3195
|
+
return /* @__PURE__ */ jsx52(
|
|
3233
3196
|
HlsPlayer,
|
|
3234
3197
|
{
|
|
3235
3198
|
assetUrl: imageUrl,
|
|
@@ -3244,7 +3207,7 @@ var ImageNode = (props) => {
|
|
|
3244
3207
|
}
|
|
3245
3208
|
);
|
|
3246
3209
|
} else {
|
|
3247
|
-
return /* @__PURE__ */
|
|
3210
|
+
return /* @__PURE__ */ jsx52(React40.Fragment, { children: /* @__PURE__ */ jsx52(
|
|
3248
3211
|
"img",
|
|
3249
3212
|
{
|
|
3250
3213
|
style: styles,
|
|
@@ -3259,14 +3222,14 @@ var ImageNode = (props) => {
|
|
|
3259
3222
|
}
|
|
3260
3223
|
};
|
|
3261
3224
|
if (props.node.width) {
|
|
3262
|
-
return /* @__PURE__ */
|
|
3225
|
+
return /* @__PURE__ */ jsx52("div", { className: `flex ${formatClasses}`, children: renderMedia() });
|
|
3263
3226
|
}
|
|
3264
3227
|
return renderMedia();
|
|
3265
3228
|
};
|
|
3266
3229
|
var ImageNode_default = ImageNode;
|
|
3267
3230
|
|
|
3268
3231
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
3269
|
-
import { Fragment as Fragment7, jsx as
|
|
3232
|
+
import { Fragment as Fragment7, jsx as jsx53, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3270
3233
|
var WidgetNode = (props) => {
|
|
3271
3234
|
const getWidgetParameters = () => {
|
|
3272
3235
|
const widgetInputParameters = {
|
|
@@ -3323,14 +3286,14 @@ var WidgetNode = (props) => {
|
|
|
3323
3286
|
};
|
|
3324
3287
|
const widgetCode = props.node?.widgetCode;
|
|
3325
3288
|
if (!widgetCode) {
|
|
3326
|
-
return /* @__PURE__ */
|
|
3289
|
+
return /* @__PURE__ */ jsx53(Fragment7, { children: "Invalid widget" });
|
|
3327
3290
|
}
|
|
3328
3291
|
const SelectedWidget = getWidget(widgetCode);
|
|
3329
3292
|
if (!SelectedWidget) {
|
|
3330
3293
|
if (process.env.NODE_ENV !== "production") {
|
|
3331
3294
|
console.warn("Widget not found:", widgetCode);
|
|
3332
3295
|
}
|
|
3333
|
-
return /* @__PURE__ */
|
|
3296
|
+
return /* @__PURE__ */ jsxs28(Fragment7, { children: [
|
|
3334
3297
|
"Widget not found: ",
|
|
3335
3298
|
widgetCode
|
|
3336
3299
|
] });
|
|
@@ -3338,7 +3301,7 @@ var WidgetNode = (props) => {
|
|
|
3338
3301
|
const widgetParams = getWidgetParameters();
|
|
3339
3302
|
return (
|
|
3340
3303
|
// eslint-disable-next-line react-hooks/static-components
|
|
3341
|
-
/* @__PURE__ */
|
|
3304
|
+
/* @__PURE__ */ jsx53(
|
|
3342
3305
|
SelectedWidget,
|
|
3343
3306
|
{
|
|
3344
3307
|
params: widgetParams,
|
|
@@ -3354,12 +3317,12 @@ var WidgetNode = (props) => {
|
|
|
3354
3317
|
var WidgetNode_default = WidgetNode;
|
|
3355
3318
|
|
|
3356
3319
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3357
|
-
import
|
|
3320
|
+
import React41, { useRef as useRef3, useReducer as useReducer2, useCallback as useCallback3, useEffect as useEffect7 } from "react";
|
|
3358
3321
|
|
|
3359
3322
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
3360
|
-
import { jsx as
|
|
3323
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
3361
3324
|
var InputControlNode = (props) => {
|
|
3362
|
-
return /* @__PURE__ */
|
|
3325
|
+
return /* @__PURE__ */ jsx54("div", { children: /* @__PURE__ */ jsx54(
|
|
3363
3326
|
InputControl_default,
|
|
3364
3327
|
{
|
|
3365
3328
|
name: props.node.name,
|
|
@@ -3593,7 +3556,7 @@ var ServiceClient = class {
|
|
|
3593
3556
|
var ServiceClient_default = ServiceClient;
|
|
3594
3557
|
|
|
3595
3558
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
3596
|
-
import { jsx as
|
|
3559
|
+
import { jsx as jsx55, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3597
3560
|
var FormContainerNode = (props) => {
|
|
3598
3561
|
const NodeTypes2 = {
|
|
3599
3562
|
["input-control"]: InputControlNode_default
|
|
@@ -3623,12 +3586,12 @@ var FormContainerNode = (props) => {
|
|
|
3623
3586
|
};
|
|
3624
3587
|
fetchInitialData();
|
|
3625
3588
|
}, [props.apiBaseUrl, props.node, props.session, props.routeParameters]);
|
|
3626
|
-
return /* @__PURE__ */
|
|
3589
|
+
return /* @__PURE__ */ jsxs29("form", { className: "group space-y-6 pb-6 overflow-y-auto", noValidate: true, ref: formRef, children: [
|
|
3627
3590
|
node.children && node.children.map((node2, index) => {
|
|
3628
3591
|
{
|
|
3629
3592
|
}
|
|
3630
3593
|
const SelectedNode = NodeTypes2[node2.type];
|
|
3631
|
-
return /* @__PURE__ */
|
|
3594
|
+
return /* @__PURE__ */ jsx55(React41.Fragment, { children: SelectedNode && node2.type == "input-control" && /* @__PURE__ */ jsx55(
|
|
3632
3595
|
InputControlNode_default,
|
|
3633
3596
|
{
|
|
3634
3597
|
value: formState.inputValues[node2.name],
|
|
@@ -3637,17 +3600,17 @@ var FormContainerNode = (props) => {
|
|
|
3637
3600
|
}
|
|
3638
3601
|
) }, index);
|
|
3639
3602
|
}),
|
|
3640
|
-
node.children.length == 0 && /* @__PURE__ */
|
|
3603
|
+
node.children.length == 0 && /* @__PURE__ */ jsx55("div", { className: "py-0.5 lg:py-1.5" })
|
|
3641
3604
|
] });
|
|
3642
3605
|
};
|
|
3643
3606
|
var FormContainerNode_default = FormContainerNode;
|
|
3644
3607
|
|
|
3645
3608
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
3646
|
-
import
|
|
3609
|
+
import React44 from "react";
|
|
3647
3610
|
|
|
3648
3611
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
3649
3612
|
import dynamic3 from "next/dynamic";
|
|
3650
|
-
import { jsx as
|
|
3613
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
3651
3614
|
var IframeClient = dynamic3(() => import("./IframeClient-J22NMEVY.mjs"), {
|
|
3652
3615
|
ssr: false
|
|
3653
3616
|
});
|
|
@@ -3660,13 +3623,13 @@ var EmbedNode = (props) => {
|
|
|
3660
3623
|
} else {
|
|
3661
3624
|
src = props.node.embedSrc;
|
|
3662
3625
|
}
|
|
3663
|
-
return /* @__PURE__ */
|
|
3626
|
+
return /* @__PURE__ */ jsx56("div", { className: "aspect-video", children: src && /* @__PURE__ */ jsx56(IframeClient, { src }) });
|
|
3664
3627
|
};
|
|
3665
3628
|
var EmbedNode_default = EmbedNode;
|
|
3666
3629
|
|
|
3667
3630
|
// src/components/Slider.tsx
|
|
3668
|
-
import
|
|
3669
|
-
import { Fragment as Fragment8, jsx as
|
|
3631
|
+
import React42, { useState as useState8, useEffect as useEffect8, Children, cloneElement } from "react";
|
|
3632
|
+
import { Fragment as Fragment8, jsx as jsx57, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3670
3633
|
var Slider = ({
|
|
3671
3634
|
children,
|
|
3672
3635
|
slidesToShow = 4,
|
|
@@ -3760,10 +3723,10 @@ var Slider = ({
|
|
|
3760
3723
|
};
|
|
3761
3724
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
3762
3725
|
const slides = Children.map(children, (child, index) => {
|
|
3763
|
-
if (!
|
|
3726
|
+
if (!React42.isValidElement(child)) return null;
|
|
3764
3727
|
const childProps = child.props;
|
|
3765
3728
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
3766
|
-
return /* @__PURE__ */
|
|
3729
|
+
return /* @__PURE__ */ jsx57(
|
|
3767
3730
|
"div",
|
|
3768
3731
|
{
|
|
3769
3732
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
@@ -3786,14 +3749,14 @@ var Slider = ({
|
|
|
3786
3749
|
return "bottom-4";
|
|
3787
3750
|
}
|
|
3788
3751
|
};
|
|
3789
|
-
return /* @__PURE__ */
|
|
3752
|
+
return /* @__PURE__ */ jsxs30(
|
|
3790
3753
|
"div",
|
|
3791
3754
|
{
|
|
3792
3755
|
className: `relative w-full overflow-hidden ${className}`,
|
|
3793
3756
|
onMouseEnter: handleMouseEnter,
|
|
3794
3757
|
onMouseLeave: handleMouseLeave,
|
|
3795
3758
|
children: [
|
|
3796
|
-
/* @__PURE__ */
|
|
3759
|
+
/* @__PURE__ */ jsx57(
|
|
3797
3760
|
"div",
|
|
3798
3761
|
{
|
|
3799
3762
|
className: "flex h-full",
|
|
@@ -3804,18 +3767,18 @@ var Slider = ({
|
|
|
3804
3767
|
children: slides
|
|
3805
3768
|
}
|
|
3806
3769
|
),
|
|
3807
|
-
show_arrows && /* @__PURE__ */
|
|
3808
|
-
/* @__PURE__ */
|
|
3770
|
+
show_arrows && /* @__PURE__ */ jsxs30(Fragment8, { children: [
|
|
3771
|
+
/* @__PURE__ */ jsx57(
|
|
3809
3772
|
ArrowButton,
|
|
3810
3773
|
{
|
|
3811
3774
|
direction: "left",
|
|
3812
3775
|
onClick: prevSlide,
|
|
3813
3776
|
visible: infinite_scroll || currentSlide > 0,
|
|
3814
3777
|
className: arrowClassName,
|
|
3815
|
-
children: /* @__PURE__ */
|
|
3778
|
+
children: /* @__PURE__ */ jsx57("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__ */ jsx57("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
3816
3779
|
}
|
|
3817
3780
|
),
|
|
3818
|
-
/* @__PURE__ */
|
|
3781
|
+
/* @__PURE__ */ jsxs30(
|
|
3819
3782
|
ArrowButton,
|
|
3820
3783
|
{
|
|
3821
3784
|
direction: "right",
|
|
@@ -3823,13 +3786,13 @@ var Slider = ({
|
|
|
3823
3786
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
3824
3787
|
className: arrowClassName,
|
|
3825
3788
|
children: [
|
|
3826
|
-
/* @__PURE__ */
|
|
3789
|
+
/* @__PURE__ */ jsx57("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__ */ jsx57("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
|
|
3827
3790
|
" "
|
|
3828
3791
|
]
|
|
3829
3792
|
}
|
|
3830
3793
|
)
|
|
3831
3794
|
] }),
|
|
3832
|
-
show_dots && /* @__PURE__ */
|
|
3795
|
+
show_dots && /* @__PURE__ */ jsx57("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__ */ jsx57(
|
|
3833
3796
|
ProgressPill,
|
|
3834
3797
|
{
|
|
3835
3798
|
active: index === currentSlide,
|
|
@@ -3855,7 +3818,7 @@ var ArrowButton = ({
|
|
|
3855
3818
|
visible,
|
|
3856
3819
|
children,
|
|
3857
3820
|
className = ""
|
|
3858
|
-
}) => /* @__PURE__ */
|
|
3821
|
+
}) => /* @__PURE__ */ jsx57(
|
|
3859
3822
|
"button",
|
|
3860
3823
|
{
|
|
3861
3824
|
className: `
|
|
@@ -3942,7 +3905,7 @@ var ProgressPill = ({
|
|
|
3942
3905
|
const renderProgressBar = () => {
|
|
3943
3906
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
3944
3907
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
3945
|
-
return /* @__PURE__ */
|
|
3908
|
+
return /* @__PURE__ */ jsx57(
|
|
3946
3909
|
"div",
|
|
3947
3910
|
{
|
|
3948
3911
|
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`,
|
|
@@ -3954,7 +3917,7 @@ var ProgressPill = ({
|
|
|
3954
3917
|
};
|
|
3955
3918
|
const renderCumulativeFill = () => {
|
|
3956
3919
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
3957
|
-
return /* @__PURE__ */
|
|
3920
|
+
return /* @__PURE__ */ jsx57(
|
|
3958
3921
|
"div",
|
|
3959
3922
|
{
|
|
3960
3923
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -3964,7 +3927,7 @@ var ProgressPill = ({
|
|
|
3964
3927
|
}
|
|
3965
3928
|
return null;
|
|
3966
3929
|
};
|
|
3967
|
-
return /* @__PURE__ */
|
|
3930
|
+
return /* @__PURE__ */ jsxs30(
|
|
3968
3931
|
"button",
|
|
3969
3932
|
{
|
|
3970
3933
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -4140,10 +4103,10 @@ var PathUtility = class {
|
|
|
4140
4103
|
var PathUtility_default = new PathUtility();
|
|
4141
4104
|
|
|
4142
4105
|
// src/components/NoDataFound.tsx
|
|
4143
|
-
import { jsx as
|
|
4106
|
+
import { jsx as jsx58, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4144
4107
|
var NoDataFound = () => {
|
|
4145
|
-
return /* @__PURE__ */
|
|
4146
|
-
/* @__PURE__ */
|
|
4108
|
+
return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
4109
|
+
/* @__PURE__ */ jsx58("div", { className: "mb-5", children: /* @__PURE__ */ jsx58("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ jsx58(
|
|
4147
4110
|
"svg",
|
|
4148
4111
|
{
|
|
4149
4112
|
className: "w-10 h-10",
|
|
@@ -4151,7 +4114,7 @@ var NoDataFound = () => {
|
|
|
4151
4114
|
stroke: "currentColor",
|
|
4152
4115
|
viewBox: "0 0 24 24",
|
|
4153
4116
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4154
|
-
children: /* @__PURE__ */
|
|
4117
|
+
children: /* @__PURE__ */ jsx58(
|
|
4155
4118
|
"path",
|
|
4156
4119
|
{
|
|
4157
4120
|
strokeLinecap: "round",
|
|
@@ -4162,15 +4125,15 @@ var NoDataFound = () => {
|
|
|
4162
4125
|
)
|
|
4163
4126
|
}
|
|
4164
4127
|
) }) }),
|
|
4165
|
-
/* @__PURE__ */
|
|
4166
|
-
/* @__PURE__ */
|
|
4128
|
+
/* @__PURE__ */ jsx58("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
4129
|
+
/* @__PURE__ */ jsx58("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
4167
4130
|
] });
|
|
4168
4131
|
};
|
|
4169
4132
|
var NoDataFound_default = NoDataFound;
|
|
4170
4133
|
|
|
4171
4134
|
// src/components/Pagination.tsx
|
|
4172
4135
|
import { useMemo } from "react";
|
|
4173
|
-
import { jsx as
|
|
4136
|
+
import { jsx as jsx59, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4174
4137
|
var Pagination = (props) => {
|
|
4175
4138
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
4176
4139
|
const builder = useMemo(() => {
|
|
@@ -4214,7 +4177,7 @@ var Pagination = (props) => {
|
|
|
4214
4177
|
return range;
|
|
4215
4178
|
};
|
|
4216
4179
|
const paginationRange = getPaginationRange();
|
|
4217
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */
|
|
4180
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ jsx59(
|
|
4218
4181
|
Hyperlink,
|
|
4219
4182
|
{
|
|
4220
4183
|
linkType: "Link" /* Link */,
|
|
@@ -4229,9 +4192,9 @@ var Pagination = (props) => {
|
|
|
4229
4192
|
);
|
|
4230
4193
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
4231
4194
|
if (disabled) {
|
|
4232
|
-
return /* @__PURE__ */
|
|
4195
|
+
return /* @__PURE__ */ jsx59("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 });
|
|
4233
4196
|
}
|
|
4234
|
-
return /* @__PURE__ */
|
|
4197
|
+
return /* @__PURE__ */ jsx59(
|
|
4235
4198
|
Hyperlink,
|
|
4236
4199
|
{
|
|
4237
4200
|
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",
|
|
@@ -4241,35 +4204,35 @@ var Pagination = (props) => {
|
|
|
4241
4204
|
);
|
|
4242
4205
|
};
|
|
4243
4206
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
4244
|
-
return /* @__PURE__ */
|
|
4245
|
-
/* @__PURE__ */
|
|
4246
|
-
/* @__PURE__ */
|
|
4207
|
+
return /* @__PURE__ */ jsxs32("div", { className: "py-6 border-t bg-default", children: [
|
|
4208
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
4209
|
+
/* @__PURE__ */ jsxs32("div", { className: "text-sm", children: [
|
|
4247
4210
|
"Showing ",
|
|
4248
|
-
/* @__PURE__ */
|
|
4211
|
+
/* @__PURE__ */ jsxs32("span", { className: "font-semibold", children: [
|
|
4249
4212
|
startItem,
|
|
4250
4213
|
"-",
|
|
4251
4214
|
endItem
|
|
4252
4215
|
] }),
|
|
4253
4216
|
" ",
|
|
4254
4217
|
"out of ",
|
|
4255
|
-
/* @__PURE__ */
|
|
4218
|
+
/* @__PURE__ */ jsx59("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
4256
4219
|
" results"
|
|
4257
4220
|
] }),
|
|
4258
|
-
totalPages > 1 && /* @__PURE__ */
|
|
4259
|
-
/* @__PURE__ */
|
|
4221
|
+
totalPages > 1 && /* @__PURE__ */ jsxs32("div", { className: "flex items-center space-x-1", children: [
|
|
4222
|
+
/* @__PURE__ */ jsxs32(
|
|
4260
4223
|
NavigationButton,
|
|
4261
4224
|
{
|
|
4262
4225
|
page: activePageNumber - 1,
|
|
4263
4226
|
disabled: activePageNumber === 1,
|
|
4264
4227
|
children: [
|
|
4265
|
-
/* @__PURE__ */
|
|
4266
|
-
/* @__PURE__ */
|
|
4228
|
+
/* @__PURE__ */ jsx59("span", { children: /* @__PURE__ */ jsx59(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
4229
|
+
/* @__PURE__ */ jsx59("span", { className: "text-sm", children: "Prev" })
|
|
4267
4230
|
]
|
|
4268
4231
|
}
|
|
4269
4232
|
),
|
|
4270
4233
|
paginationRange.map((item, index) => {
|
|
4271
4234
|
if (item === "...") {
|
|
4272
|
-
return /* @__PURE__ */
|
|
4235
|
+
return /* @__PURE__ */ jsx59(
|
|
4273
4236
|
"span",
|
|
4274
4237
|
{
|
|
4275
4238
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -4279,23 +4242,23 @@ var Pagination = (props) => {
|
|
|
4279
4242
|
);
|
|
4280
4243
|
}
|
|
4281
4244
|
const page = item;
|
|
4282
|
-
return /* @__PURE__ */
|
|
4245
|
+
return /* @__PURE__ */ jsx59(PageButton, { page, children: page }, page);
|
|
4283
4246
|
}),
|
|
4284
|
-
/* @__PURE__ */
|
|
4247
|
+
/* @__PURE__ */ jsxs32(
|
|
4285
4248
|
NavigationButton,
|
|
4286
4249
|
{
|
|
4287
4250
|
page: activePageNumber + 1,
|
|
4288
4251
|
disabled: activePageNumber === totalPages,
|
|
4289
4252
|
children: [
|
|
4290
|
-
/* @__PURE__ */
|
|
4291
|
-
/* @__PURE__ */
|
|
4253
|
+
/* @__PURE__ */ jsx59("span", { className: "text-sm", children: "Next" }),
|
|
4254
|
+
/* @__PURE__ */ jsx59("span", { children: /* @__PURE__ */ jsx59(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
4292
4255
|
]
|
|
4293
4256
|
}
|
|
4294
4257
|
)
|
|
4295
4258
|
] }),
|
|
4296
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */
|
|
4297
|
-
/* @__PURE__ */
|
|
4298
|
-
/* @__PURE__ */
|
|
4259
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ jsxs32("div", { className: "flex items-center space-x-2", children: [
|
|
4260
|
+
/* @__PURE__ */ jsx59("span", { className: "text-sm", children: "Go to:" }),
|
|
4261
|
+
/* @__PURE__ */ jsx59("div", { className: "relative", children: /* @__PURE__ */ jsx59(
|
|
4299
4262
|
"input",
|
|
4300
4263
|
{
|
|
4301
4264
|
type: "number",
|
|
@@ -4316,9 +4279,9 @@ var Pagination = (props) => {
|
|
|
4316
4279
|
) })
|
|
4317
4280
|
] })
|
|
4318
4281
|
] }),
|
|
4319
|
-
showPageSizeSelector && /* @__PURE__ */
|
|
4320
|
-
/* @__PURE__ */
|
|
4321
|
-
/* @__PURE__ */
|
|
4282
|
+
showPageSizeSelector && /* @__PURE__ */ jsx59("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ jsxs32("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
4283
|
+
/* @__PURE__ */ jsx59("span", { className: "text-sm", children: "Show:" }),
|
|
4284
|
+
/* @__PURE__ */ jsx59("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ jsx59(
|
|
4322
4285
|
Hyperlink,
|
|
4323
4286
|
{
|
|
4324
4287
|
className: `
|
|
@@ -4330,7 +4293,7 @@ var Pagination = (props) => {
|
|
|
4330
4293
|
},
|
|
4331
4294
|
size
|
|
4332
4295
|
)) }),
|
|
4333
|
-
/* @__PURE__ */
|
|
4296
|
+
/* @__PURE__ */ jsx59("span", { className: "text-sm", children: "per page" })
|
|
4334
4297
|
] }) })
|
|
4335
4298
|
] });
|
|
4336
4299
|
};
|
|
@@ -4338,7 +4301,7 @@ var Pagination_default = Pagination;
|
|
|
4338
4301
|
|
|
4339
4302
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
4340
4303
|
import dynamic4 from "next/dynamic";
|
|
4341
|
-
import { jsx as
|
|
4304
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
4342
4305
|
var HlsPlayer1 = dynamic4(() => import("./HlsPlayer-FFEIK6FG.mjs"), {
|
|
4343
4306
|
ssr: false
|
|
4344
4307
|
});
|
|
@@ -4375,7 +4338,7 @@ var ImageGalleryNode = (props) => {
|
|
|
4375
4338
|
right: "justify-end"
|
|
4376
4339
|
};
|
|
4377
4340
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
4378
|
-
return /* @__PURE__ */
|
|
4341
|
+
return /* @__PURE__ */ jsx60("div", { className: `flex flex-wrap gap-4 ${formatClasses}`, children: visibleImages.map((img, idx) => {
|
|
4379
4342
|
const imageUrl = resolveImageUrl(img.imageUrl);
|
|
4380
4343
|
if (!imageUrl) return null;
|
|
4381
4344
|
const posterUrl = resolvePosterUrl(img.posterUrl);
|
|
@@ -4383,7 +4346,7 @@ var ImageGalleryNode = (props) => {
|
|
|
4383
4346
|
const intrinsicHeight = parseMaybeNumber(img.intrinsicHeight);
|
|
4384
4347
|
const isHls = imageUrl.endsWith(".m3u8");
|
|
4385
4348
|
const alt = img.title || "Gallery image";
|
|
4386
|
-
return /* @__PURE__ */
|
|
4349
|
+
return /* @__PURE__ */ jsx60("div", { className: "max-w-full", children: isHls ? /* @__PURE__ */ jsx60(
|
|
4387
4350
|
HlsPlayer1,
|
|
4388
4351
|
{
|
|
4389
4352
|
assetUrl: imageUrl,
|
|
@@ -4398,7 +4361,7 @@ var ImageGalleryNode = (props) => {
|
|
|
4398
4361
|
}
|
|
4399
4362
|
) : (
|
|
4400
4363
|
/* eslint-disable-next-line @next/next/no-img-element */
|
|
4401
|
-
/* @__PURE__ */
|
|
4364
|
+
/* @__PURE__ */ jsx60(
|
|
4402
4365
|
"img",
|
|
4403
4366
|
{
|
|
4404
4367
|
loading: "lazy",
|
|
@@ -4415,7 +4378,7 @@ var ImageGalleryNode = (props) => {
|
|
|
4415
4378
|
var ImageGalleryNode_default = ImageGalleryNode;
|
|
4416
4379
|
|
|
4417
4380
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
4418
|
-
import { jsx as
|
|
4381
|
+
import { jsx as jsx61, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4419
4382
|
function toCamelCase(str) {
|
|
4420
4383
|
return str.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
|
|
4421
4384
|
}
|
|
@@ -4598,7 +4561,7 @@ var DivContainer = async (props) => {
|
|
|
4598
4561
|
response = await serviceClient.get(endpoint);
|
|
4599
4562
|
result = response?.result;
|
|
4600
4563
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
4601
|
-
return /* @__PURE__ */
|
|
4564
|
+
return /* @__PURE__ */ jsx61(NoDataFound_default, {});
|
|
4602
4565
|
}
|
|
4603
4566
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
4604
4567
|
childCollectionData = getNestedValue2(props.dataitem, dataBindingProperties.childCollectionName);
|
|
@@ -4610,7 +4573,7 @@ var DivContainer = async (props) => {
|
|
|
4610
4573
|
}
|
|
4611
4574
|
const SelectedNode = NodeTypes2[node.type];
|
|
4612
4575
|
if (!SelectedNode) return null;
|
|
4613
|
-
return /* @__PURE__ */
|
|
4576
|
+
return /* @__PURE__ */ jsx61(React44.Fragment, { children: /* @__PURE__ */ jsx61(
|
|
4614
4577
|
SelectedNode,
|
|
4615
4578
|
{
|
|
4616
4579
|
node,
|
|
@@ -4710,9 +4673,9 @@ var DivContainer = async (props) => {
|
|
|
4710
4673
|
props.node.autoFormat && "auto-format",
|
|
4711
4674
|
props.node.bgClass
|
|
4712
4675
|
].filter(Boolean).join(" ");
|
|
4713
|
-
return /* @__PURE__ */
|
|
4714
|
-
/* @__PURE__ */
|
|
4715
|
-
/* @__PURE__ */
|
|
4676
|
+
return /* @__PURE__ */ jsxs33(React44.Fragment, { children: [
|
|
4677
|
+
/* @__PURE__ */ jsx61("style", { dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS } }),
|
|
4678
|
+
/* @__PURE__ */ jsx61(React44.Fragment, { children: /* @__PURE__ */ jsx61(
|
|
4716
4679
|
Wrapper,
|
|
4717
4680
|
{
|
|
4718
4681
|
id: guid,
|
|
@@ -4721,18 +4684,18 @@ var DivContainer = async (props) => {
|
|
|
4721
4684
|
...wrapperProps,
|
|
4722
4685
|
children: dataToRender.map(
|
|
4723
4686
|
(item, idx) => item?.links?.view && renderLink ? renderChildren(props.node.children, props, item, idx, props.href ? void 0 : item?.links?.view)?.map(
|
|
4724
|
-
(child, i) => /* @__PURE__ */
|
|
4687
|
+
(child, i) => /* @__PURE__ */ jsx61(React44.Fragment, { children: child }, i)
|
|
4725
4688
|
) : renderChildren(props.node.children, props, item, idx)
|
|
4726
4689
|
)
|
|
4727
4690
|
}
|
|
4728
4691
|
) }),
|
|
4729
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */
|
|
4692
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ jsx61("div", { children: /* @__PURE__ */ jsx61(Pagination_default, { path: props.path, query: props.query, dataset: response }) })
|
|
4730
4693
|
] });
|
|
4731
4694
|
};
|
|
4732
4695
|
var DivContainer_default = DivContainer;
|
|
4733
4696
|
|
|
4734
4697
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
4735
|
-
import { jsx as
|
|
4698
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
4736
4699
|
var NodeTypes = {
|
|
4737
4700
|
["paragraph"]: ParagraphNode_default,
|
|
4738
4701
|
["heading"]: HeadingNode_default,
|
|
@@ -4760,11 +4723,11 @@ var PageBodyRenderer = (props) => {
|
|
|
4760
4723
|
if (pageBodyTree && pageBodyTree.root) {
|
|
4761
4724
|
rootNode = pageBodyTree.root;
|
|
4762
4725
|
}
|
|
4763
|
-
return /* @__PURE__ */
|
|
4726
|
+
return /* @__PURE__ */ jsx62(React45.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
4764
4727
|
{
|
|
4765
4728
|
}
|
|
4766
4729
|
const SelectedNode = NodeTypes[node.type];
|
|
4767
|
-
return /* @__PURE__ */
|
|
4730
|
+
return /* @__PURE__ */ jsx62(React45.Fragment, { children: SelectedNode && /* @__PURE__ */ jsx62(React45.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ jsx62(React45.Fragment, { children: /* @__PURE__ */ jsx62(
|
|
4768
4731
|
SelectedNode,
|
|
4769
4732
|
{
|
|
4770
4733
|
node,
|
|
@@ -4779,7 +4742,7 @@ var PageBodyRenderer = (props) => {
|
|
|
4779
4742
|
assetBaseUrl: props.assetBaseUrl,
|
|
4780
4743
|
device: props.device
|
|
4781
4744
|
}
|
|
4782
|
-
) }) : /* @__PURE__ */
|
|
4745
|
+
) }) : /* @__PURE__ */ jsx62(React45.Fragment, { children: /* @__PURE__ */ jsx62(
|
|
4783
4746
|
SelectedNode,
|
|
4784
4747
|
{
|
|
4785
4748
|
node,
|