@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260807130918 → 0.8.1-dev.20260808073515
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/TimeUntilStartsClient-4C7NDEAD.mjs +76 -0
- package/dist/TimeUntilStartsClient-5HGQ5JKM.mjs +78 -0
- package/dist/index.js +919 -829
- package/dist/index.mjs +24 -17
- package/dist/server.js +361 -271
- package/dist/server.mjs +21 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -823,13 +823,96 @@ var init_DateTimeViewClient = __esm({
|
|
|
823
823
|
}
|
|
824
824
|
});
|
|
825
825
|
|
|
826
|
+
// src/components/controls/view/TimeUntilStartsClient.tsx
|
|
827
|
+
var TimeUntilStartsClient_exports = {};
|
|
828
|
+
__export(TimeUntilStartsClient_exports, {
|
|
829
|
+
default: () => TimeUntilStartsClient_default
|
|
830
|
+
});
|
|
831
|
+
var import_react15, import_jsx_runtime18, TimeUntilStartsClient, TimeUntilStartsClient_default;
|
|
832
|
+
var init_TimeUntilStartsClient = __esm({
|
|
833
|
+
"src/components/controls/view/TimeUntilStartsClient.tsx"() {
|
|
834
|
+
"use strict";
|
|
835
|
+
"use client";
|
|
836
|
+
import_react15 = require("react");
|
|
837
|
+
import_jsx_runtime18 = require("react/jsx-runtime");
|
|
838
|
+
TimeUntilStartsClient = (props) => {
|
|
839
|
+
const calculateTimeDifference = (startDate) => {
|
|
840
|
+
const now = /* @__PURE__ */ new Date();
|
|
841
|
+
const nowUtc = new Date(now.getTime() + now.getTimezoneOffset() * 6e4);
|
|
842
|
+
const startDateUtc = new Date(startDate);
|
|
843
|
+
const diffMs = startDateUtc.getTime() - nowUtc.getTime();
|
|
844
|
+
const isPast = diffMs < 0;
|
|
845
|
+
const absoluteDiffMs = Math.abs(diffMs);
|
|
846
|
+
const diffDays = Math.floor(absoluteDiffMs / (1e3 * 60 * 60 * 24));
|
|
847
|
+
const diffHours = Math.floor(
|
|
848
|
+
absoluteDiffMs % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)
|
|
849
|
+
);
|
|
850
|
+
const diffMinutes = Math.floor(
|
|
851
|
+
absoluteDiffMs % (1e3 * 60 * 60) / (1e3 * 60)
|
|
852
|
+
);
|
|
853
|
+
if (absoluteDiffMs < 6e4) {
|
|
854
|
+
return "Just now";
|
|
855
|
+
}
|
|
856
|
+
let timeParts = [
|
|
857
|
+
{ value: diffDays, unit: "days" },
|
|
858
|
+
{ value: diffHours, unit: "hours" },
|
|
859
|
+
{ value: diffMinutes, unit: "minutes" }
|
|
860
|
+
];
|
|
861
|
+
timeParts = timeParts.filter((part) => part.value > 0);
|
|
862
|
+
if (isPast) {
|
|
863
|
+
if (diffDays > 0) {
|
|
864
|
+
return `${diffDays} day(s) ago`;
|
|
865
|
+
} else if (diffHours > 0) {
|
|
866
|
+
return `${diffHours} hour(s) ago`;
|
|
867
|
+
} else if (diffMinutes > 0) {
|
|
868
|
+
return `${diffMinutes} minute(s) ago`;
|
|
869
|
+
} else {
|
|
870
|
+
return "Just now";
|
|
871
|
+
}
|
|
872
|
+
} else {
|
|
873
|
+
if (timeParts.length > 2) {
|
|
874
|
+
timeParts = timeParts.slice(0, 2);
|
|
875
|
+
}
|
|
876
|
+
const displayString = timeParts.map((part) => `${part.value} ${part.unit}`).join(" ");
|
|
877
|
+
return displayString ? `Starting in ${displayString}` : "Started";
|
|
878
|
+
}
|
|
879
|
+
};
|
|
880
|
+
const isValidDate = (date) => {
|
|
881
|
+
return !isNaN(Date.parse(date));
|
|
882
|
+
};
|
|
883
|
+
const [timeUntilStart, setTimeUntilStart] = (0, import_react15.useState)(() => {
|
|
884
|
+
if (props.value && isValidDate(props.value)) {
|
|
885
|
+
return calculateTimeDifference(props.value);
|
|
886
|
+
}
|
|
887
|
+
return "";
|
|
888
|
+
});
|
|
889
|
+
(0, import_react15.useEffect)(() => {
|
|
890
|
+
if (props.value && isValidDate(props.value)) {
|
|
891
|
+
setTimeUntilStart(calculateTimeDifference(props.value));
|
|
892
|
+
const initialTimeout = setTimeout(() => {
|
|
893
|
+
const interval = setInterval(() => {
|
|
894
|
+
setTimeUntilStart(calculateTimeDifference(props.value));
|
|
895
|
+
}, 6e4);
|
|
896
|
+
return () => clearInterval(interval);
|
|
897
|
+
}, 5e3);
|
|
898
|
+
return () => clearTimeout(initialTimeout);
|
|
899
|
+
} else {
|
|
900
|
+
setTimeUntilStart("");
|
|
901
|
+
}
|
|
902
|
+
}, [props.value]);
|
|
903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { children: timeUntilStart });
|
|
904
|
+
};
|
|
905
|
+
TimeUntilStartsClient_default = TimeUntilStartsClient;
|
|
906
|
+
}
|
|
907
|
+
});
|
|
908
|
+
|
|
826
909
|
// src/components/controls/edit/MultilineTextInput.tsx
|
|
827
|
-
var
|
|
910
|
+
var import_react17, import_jsx_runtime20, MultilineTextInput, MultilineTextInput_default;
|
|
828
911
|
var init_MultilineTextInput = __esm({
|
|
829
912
|
"src/components/controls/edit/MultilineTextInput.tsx"() {
|
|
830
913
|
"use strict";
|
|
831
|
-
|
|
832
|
-
|
|
914
|
+
import_react17 = __toESM(require("react"));
|
|
915
|
+
import_jsx_runtime20 = require("react/jsx-runtime");
|
|
833
916
|
MultilineTextInput = (props) => {
|
|
834
917
|
const textChangeHandler = (event) => {
|
|
835
918
|
const text = event.target.value;
|
|
@@ -848,11 +931,11 @@ var init_MultilineTextInput = __esm({
|
|
|
848
931
|
if (props.value !== void 0 && props.value !== null) {
|
|
849
932
|
value = props.value;
|
|
850
933
|
}
|
|
851
|
-
return /* @__PURE__ */ (0,
|
|
852
|
-
/* @__PURE__ */ (0,
|
|
934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react17.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { className: "block mb-1", children: [
|
|
935
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
853
936
|
" ",
|
|
854
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
855
|
-
/* @__PURE__ */ (0,
|
|
937
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
938
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
856
939
|
"textarea",
|
|
857
940
|
{
|
|
858
941
|
name: props.name,
|
|
@@ -869,7 +952,7 @@ var init_MultilineTextInput = __esm({
|
|
|
869
952
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm input"
|
|
870
953
|
}
|
|
871
954
|
),
|
|
872
|
-
/* @__PURE__ */ (0,
|
|
955
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
873
956
|
] }) });
|
|
874
957
|
};
|
|
875
958
|
MultilineTextInput_default = MultilineTextInput;
|
|
@@ -877,12 +960,12 @@ var init_MultilineTextInput = __esm({
|
|
|
877
960
|
});
|
|
878
961
|
|
|
879
962
|
// src/components/controls/edit/LineTextInput.tsx
|
|
880
|
-
var
|
|
963
|
+
var import_react18, import_jsx_runtime21, LineTextInput, LineTextInput_default;
|
|
881
964
|
var init_LineTextInput = __esm({
|
|
882
965
|
"src/components/controls/edit/LineTextInput.tsx"() {
|
|
883
966
|
"use strict";
|
|
884
|
-
|
|
885
|
-
|
|
967
|
+
import_react18 = __toESM(require("react"));
|
|
968
|
+
import_jsx_runtime21 = require("react/jsx-runtime");
|
|
886
969
|
LineTextInput = (props) => {
|
|
887
970
|
const textChangeHandler = (event) => {
|
|
888
971
|
const text = event.target.value;
|
|
@@ -901,11 +984,11 @@ var init_LineTextInput = __esm({
|
|
|
901
984
|
if (props.value !== void 0 && props.value !== null) {
|
|
902
985
|
value = props.value;
|
|
903
986
|
}
|
|
904
|
-
return /* @__PURE__ */ (0,
|
|
905
|
-
props?.attributes?.label && /* @__PURE__ */ (0,
|
|
987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react18.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("label", { className: "block", children: [
|
|
988
|
+
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
906
989
|
" ",
|
|
907
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
908
|
-
/* @__PURE__ */ (0,
|
|
990
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "bg-error-weak !bg-transparent", children: "*" }),
|
|
991
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
909
992
|
"input",
|
|
910
993
|
{
|
|
911
994
|
type: "text",
|
|
@@ -925,7 +1008,7 @@ var init_LineTextInput = __esm({
|
|
|
925
1008
|
`
|
|
926
1009
|
}
|
|
927
1010
|
),
|
|
928
|
-
/* @__PURE__ */ (0,
|
|
1011
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
929
1012
|
] }) });
|
|
930
1013
|
};
|
|
931
1014
|
LineTextInput_default = LineTextInput;
|
|
@@ -933,12 +1016,12 @@ var init_LineTextInput = __esm({
|
|
|
933
1016
|
});
|
|
934
1017
|
|
|
935
1018
|
// src/components/controls/edit/MoneyInput.tsx
|
|
936
|
-
var
|
|
1019
|
+
var import_react19, import_jsx_runtime22, MoneyInput, MoneyInput_default;
|
|
937
1020
|
var init_MoneyInput = __esm({
|
|
938
1021
|
"src/components/controls/edit/MoneyInput.tsx"() {
|
|
939
1022
|
"use strict";
|
|
940
|
-
|
|
941
|
-
|
|
1023
|
+
import_react19 = __toESM(require("react"));
|
|
1024
|
+
import_jsx_runtime22 = require("react/jsx-runtime");
|
|
942
1025
|
MoneyInput = (props) => {
|
|
943
1026
|
const textChangeHandler = (event) => {
|
|
944
1027
|
const rawValue = event.target.value;
|
|
@@ -967,11 +1050,11 @@ var init_MoneyInput = __esm({
|
|
|
967
1050
|
e.preventDefault();
|
|
968
1051
|
}
|
|
969
1052
|
};
|
|
970
|
-
return /* @__PURE__ */ (0,
|
|
971
|
-
/* @__PURE__ */ (0,
|
|
1053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react19.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { className: "block mb-1", children: [
|
|
1054
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
972
1055
|
" ",
|
|
973
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
974
|
-
/* @__PURE__ */ (0,
|
|
1056
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1057
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
975
1058
|
"input",
|
|
976
1059
|
{
|
|
977
1060
|
type: "number",
|
|
@@ -991,7 +1074,7 @@ var init_MoneyInput = __esm({
|
|
|
991
1074
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm number-input"
|
|
992
1075
|
}
|
|
993
1076
|
),
|
|
994
|
-
/* @__PURE__ */ (0,
|
|
1077
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
995
1078
|
] }) });
|
|
996
1079
|
};
|
|
997
1080
|
MoneyInput_default = MoneyInput;
|
|
@@ -1037,14 +1120,14 @@ var init_InputControlType = __esm({
|
|
|
1037
1120
|
});
|
|
1038
1121
|
|
|
1039
1122
|
// src/components/controls/edit/Select.tsx
|
|
1040
|
-
var
|
|
1123
|
+
var import_react20, import_jsx_runtime23, Select, Select_default;
|
|
1041
1124
|
var init_Select = __esm({
|
|
1042
1125
|
"src/components/controls/edit/Select.tsx"() {
|
|
1043
1126
|
"use strict";
|
|
1044
|
-
|
|
1045
|
-
|
|
1127
|
+
import_react20 = require("react");
|
|
1128
|
+
import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1046
1129
|
Select = (props) => {
|
|
1047
|
-
const [list, setList] = (0,
|
|
1130
|
+
const [list, setList] = (0, import_react20.useState)();
|
|
1048
1131
|
const getSafeValue = (val) => {
|
|
1049
1132
|
if (val === null || val === void 0) return "";
|
|
1050
1133
|
if (typeof val === "boolean") return val ? "1" : "0";
|
|
@@ -1081,7 +1164,7 @@ var init_Select = __esm({
|
|
|
1081
1164
|
groupKey: props.groupKey
|
|
1082
1165
|
});
|
|
1083
1166
|
};
|
|
1084
|
-
(0,
|
|
1167
|
+
(0, import_react20.useEffect)(() => {
|
|
1085
1168
|
async function fetchData() {
|
|
1086
1169
|
if (props.dataset) {
|
|
1087
1170
|
setList(props.dataset);
|
|
@@ -1114,11 +1197,11 @@ var init_Select = __esm({
|
|
|
1114
1197
|
props.dataSourceDependsOn
|
|
1115
1198
|
]);
|
|
1116
1199
|
const value = getSafeValue(props.value);
|
|
1117
|
-
return /* @__PURE__ */ (0,
|
|
1118
|
-
props.attributes?.label && /* @__PURE__ */ (0,
|
|
1200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { className: "block", children: [
|
|
1201
|
+
props.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-sm font-medium inline-block pb-1", children: props.attributes?.label }),
|
|
1119
1202
|
" ",
|
|
1120
|
-
props.attributes?.label && props.attributes?.required && /* @__PURE__ */ (0,
|
|
1121
|
-
list && list.length === 0 && /* @__PURE__ */ (0,
|
|
1203
|
+
props.attributes?.label && props.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1204
|
+
list && list.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1122
1205
|
"input",
|
|
1123
1206
|
{
|
|
1124
1207
|
type: "text",
|
|
@@ -1135,7 +1218,7 @@ var init_Select = __esm({
|
|
|
1135
1218
|
className: `peer input select mt-1 py-1.5 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`
|
|
1136
1219
|
}
|
|
1137
1220
|
),
|
|
1138
|
-
list && list.length > 0 && /* @__PURE__ */ (0,
|
|
1221
|
+
list && list.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1139
1222
|
"select",
|
|
1140
1223
|
{
|
|
1141
1224
|
name: props.name,
|
|
@@ -1148,16 +1231,16 @@ var init_Select = __esm({
|
|
|
1148
1231
|
focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50
|
|
1149
1232
|
disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none ${props.inputClasses ?? ""}`,
|
|
1150
1233
|
children: [
|
|
1151
|
-
/* @__PURE__ */ (0,
|
|
1234
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "", children: props.attributes?.placeholder || "Select" }),
|
|
1152
1235
|
list.map((item, index) => {
|
|
1153
1236
|
const keyField = props.dataKeyFieldName;
|
|
1154
1237
|
const textField = props.dataTextFieldName;
|
|
1155
|
-
return /* @__PURE__ */ (0,
|
|
1238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: item[keyField], children: item[textField] }, index);
|
|
1156
1239
|
})
|
|
1157
1240
|
]
|
|
1158
1241
|
}
|
|
1159
1242
|
),
|
|
1160
|
-
/* @__PURE__ */ (0,
|
|
1243
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props.attributes?.errorMessage || "" })
|
|
1161
1244
|
] });
|
|
1162
1245
|
};
|
|
1163
1246
|
Select_default = Select;
|
|
@@ -1165,12 +1248,12 @@ var init_Select = __esm({
|
|
|
1165
1248
|
});
|
|
1166
1249
|
|
|
1167
1250
|
// src/components/controls/edit/PercentageInput.tsx
|
|
1168
|
-
var
|
|
1251
|
+
var import_react21, import_jsx_runtime24, PercentageInput, PercentageInput_default;
|
|
1169
1252
|
var init_PercentageInput = __esm({
|
|
1170
1253
|
"src/components/controls/edit/PercentageInput.tsx"() {
|
|
1171
1254
|
"use strict";
|
|
1172
|
-
|
|
1173
|
-
|
|
1255
|
+
import_react21 = __toESM(require("react"));
|
|
1256
|
+
import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1174
1257
|
PercentageInput = (props) => {
|
|
1175
1258
|
const textChangeHandler = (event) => {
|
|
1176
1259
|
const rawValue = event.target.value;
|
|
@@ -1199,11 +1282,11 @@ var init_PercentageInput = __esm({
|
|
|
1199
1282
|
e.preventDefault();
|
|
1200
1283
|
}
|
|
1201
1284
|
};
|
|
1202
|
-
return /* @__PURE__ */ (0,
|
|
1203
|
-
/* @__PURE__ */ (0,
|
|
1285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react21.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { className: "block mb-1", children: [
|
|
1286
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label ? props?.attributes?.label + " %" : "" }),
|
|
1204
1287
|
" ",
|
|
1205
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1206
|
-
/* @__PURE__ */ (0,
|
|
1288
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1289
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1207
1290
|
"input",
|
|
1208
1291
|
{
|
|
1209
1292
|
type: "number",
|
|
@@ -1222,7 +1305,7 @@ var init_PercentageInput = __esm({
|
|
|
1222
1305
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm number-input"
|
|
1223
1306
|
}
|
|
1224
1307
|
),
|
|
1225
|
-
/* @__PURE__ */ (0,
|
|
1308
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1226
1309
|
] }) });
|
|
1227
1310
|
};
|
|
1228
1311
|
PercentageInput_default = PercentageInput;
|
|
@@ -1230,12 +1313,12 @@ var init_PercentageInput = __esm({
|
|
|
1230
1313
|
});
|
|
1231
1314
|
|
|
1232
1315
|
// src/components/controls/edit/PhoneInput.tsx
|
|
1233
|
-
var
|
|
1316
|
+
var import_react22, import_jsx_runtime25, PhoneInput, PhoneInput_default;
|
|
1234
1317
|
var init_PhoneInput = __esm({
|
|
1235
1318
|
"src/components/controls/edit/PhoneInput.tsx"() {
|
|
1236
1319
|
"use strict";
|
|
1237
|
-
|
|
1238
|
-
|
|
1320
|
+
import_react22 = __toESM(require("react"));
|
|
1321
|
+
import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1239
1322
|
PhoneInput = (props) => {
|
|
1240
1323
|
const textChangeHandler = (event) => {
|
|
1241
1324
|
const text = event.target.value;
|
|
@@ -1254,13 +1337,13 @@ var init_PhoneInput = __esm({
|
|
|
1254
1337
|
if (props.value !== void 0 && props.value !== null) {
|
|
1255
1338
|
value = props.value;
|
|
1256
1339
|
}
|
|
1257
|
-
return /* @__PURE__ */ (0,
|
|
1258
|
-
/* @__PURE__ */ (0,
|
|
1340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react22.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "block mb-1", children: [
|
|
1341
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1259
1342
|
" ",
|
|
1260
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1261
|
-
/* @__PURE__ */ (0,
|
|
1262
|
-
/* @__PURE__ */ (0,
|
|
1263
|
-
/* @__PURE__ */ (0,
|
|
1343
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1344
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center rounded border ", children: [
|
|
1345
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "px-3", children: props.prefix }),
|
|
1346
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1264
1347
|
"input",
|
|
1265
1348
|
{
|
|
1266
1349
|
type: "text",
|
|
@@ -1278,7 +1361,7 @@ var init_PhoneInput = __esm({
|
|
|
1278
1361
|
}
|
|
1279
1362
|
)
|
|
1280
1363
|
] }),
|
|
1281
|
-
/* @__PURE__ */ (0,
|
|
1364
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1282
1365
|
] }) });
|
|
1283
1366
|
};
|
|
1284
1367
|
PhoneInput_default = PhoneInput;
|
|
@@ -1286,12 +1369,12 @@ var init_PhoneInput = __esm({
|
|
|
1286
1369
|
});
|
|
1287
1370
|
|
|
1288
1371
|
// src/components/controls/edit/NumberInput.tsx
|
|
1289
|
-
var
|
|
1372
|
+
var import_react23, import_jsx_runtime26, NumberInput, NumberInput_default;
|
|
1290
1373
|
var init_NumberInput = __esm({
|
|
1291
1374
|
"src/components/controls/edit/NumberInput.tsx"() {
|
|
1292
1375
|
"use strict";
|
|
1293
|
-
|
|
1294
|
-
|
|
1376
|
+
import_react23 = __toESM(require("react"));
|
|
1377
|
+
import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1295
1378
|
NumberInput = (props) => {
|
|
1296
1379
|
const textChangeHandler = (event) => {
|
|
1297
1380
|
const text = event.target.value;
|
|
@@ -1314,11 +1397,11 @@ var init_NumberInput = __esm({
|
|
|
1314
1397
|
if (props.value !== void 0 && props.value !== null) {
|
|
1315
1398
|
value = props.value;
|
|
1316
1399
|
}
|
|
1317
|
-
return /* @__PURE__ */ (0,
|
|
1318
|
-
props?.attributes?.label && /* @__PURE__ */ (0,
|
|
1400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react23.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { className: "block", children: [
|
|
1401
|
+
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
1319
1402
|
" ",
|
|
1320
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1321
|
-
/* @__PURE__ */ (0,
|
|
1403
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1404
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1322
1405
|
"input",
|
|
1323
1406
|
{
|
|
1324
1407
|
type: "number",
|
|
@@ -1337,7 +1420,7 @@ var init_NumberInput = __esm({
|
|
|
1337
1420
|
className: "peer py-1.5 block w-full rounded shadow-sm number-input input\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
1338
1421
|
}
|
|
1339
1422
|
),
|
|
1340
|
-
/* @__PURE__ */ (0,
|
|
1423
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1341
1424
|
] }) });
|
|
1342
1425
|
};
|
|
1343
1426
|
NumberInput_default = NumberInput;
|
|
@@ -1345,12 +1428,12 @@ var init_NumberInput = __esm({
|
|
|
1345
1428
|
});
|
|
1346
1429
|
|
|
1347
1430
|
// src/components/controls/edit/CheckboxInput.tsx
|
|
1348
|
-
var
|
|
1431
|
+
var import_react24, import_jsx_runtime27, CheckboxInput, CheckboxInput_default;
|
|
1349
1432
|
var init_CheckboxInput = __esm({
|
|
1350
1433
|
"src/components/controls/edit/CheckboxInput.tsx"() {
|
|
1351
1434
|
"use strict";
|
|
1352
|
-
|
|
1353
|
-
|
|
1435
|
+
import_react24 = __toESM(require("react"));
|
|
1436
|
+
import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1354
1437
|
CheckboxInput = (props) => {
|
|
1355
1438
|
const textChangeHandler = (event) => {
|
|
1356
1439
|
let text = event.target.checked;
|
|
@@ -1367,9 +1450,9 @@ var init_CheckboxInput = __esm({
|
|
|
1367
1450
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
1368
1451
|
value = true;
|
|
1369
1452
|
}
|
|
1370
|
-
return /* @__PURE__ */ (0,
|
|
1371
|
-
props?.attributes?.label && /* @__PURE__ */ (0,
|
|
1372
|
-
/* @__PURE__ */ (0,
|
|
1453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react24.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "mb-1", children: [
|
|
1454
|
+
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
1455
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1373
1456
|
"label",
|
|
1374
1457
|
{
|
|
1375
1458
|
htmlFor: props.name,
|
|
@@ -1377,9 +1460,9 @@ var init_CheckboxInput = __esm({
|
|
|
1377
1460
|
children: props.attributes.label
|
|
1378
1461
|
}
|
|
1379
1462
|
),
|
|
1380
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1463
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "bg-error-weak", children: "*" })
|
|
1381
1464
|
] }),
|
|
1382
|
-
/* @__PURE__ */ (0,
|
|
1465
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1383
1466
|
"input",
|
|
1384
1467
|
{
|
|
1385
1468
|
type: "checkbox",
|
|
@@ -1396,7 +1479,7 @@ var init_CheckboxInput = __esm({
|
|
|
1396
1479
|
className: "peer mt-1 py-1.5 block rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
1397
1480
|
}
|
|
1398
1481
|
),
|
|
1399
|
-
/* @__PURE__ */ (0,
|
|
1482
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage || "" })
|
|
1400
1483
|
] }) });
|
|
1401
1484
|
};
|
|
1402
1485
|
CheckboxInput_default = CheckboxInput;
|
|
@@ -1404,12 +1487,12 @@ var init_CheckboxInput = __esm({
|
|
|
1404
1487
|
});
|
|
1405
1488
|
|
|
1406
1489
|
// src/components/controls/edit/OtpInput.tsx
|
|
1407
|
-
var
|
|
1490
|
+
var import_react25, import_jsx_runtime28, OtpInput, OtpInput_default;
|
|
1408
1491
|
var init_OtpInput = __esm({
|
|
1409
1492
|
"src/components/controls/edit/OtpInput.tsx"() {
|
|
1410
1493
|
"use strict";
|
|
1411
|
-
|
|
1412
|
-
|
|
1494
|
+
import_react25 = __toESM(require("react"));
|
|
1495
|
+
import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1413
1496
|
OtpInput = (props) => {
|
|
1414
1497
|
const textChangeHandler = (event) => {
|
|
1415
1498
|
const text = event.target.value;
|
|
@@ -1431,11 +1514,11 @@ var init_OtpInput = __esm({
|
|
|
1431
1514
|
if (props.value !== void 0 && props.value !== null) {
|
|
1432
1515
|
value = props.value;
|
|
1433
1516
|
}
|
|
1434
|
-
return /* @__PURE__ */ (0,
|
|
1435
|
-
/* @__PURE__ */ (0,
|
|
1517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react25.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("label", { htmlFor: props.name, className: "block mb-1 w-full", children: [
|
|
1518
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1436
1519
|
" ",
|
|
1437
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1438
|
-
/* @__PURE__ */ (0,
|
|
1520
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1521
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1439
1522
|
"input",
|
|
1440
1523
|
{
|
|
1441
1524
|
type: "text",
|
|
@@ -1455,7 +1538,7 @@ var init_OtpInput = __esm({
|
|
|
1455
1538
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm tracking-[1.25em] text-center"
|
|
1456
1539
|
}
|
|
1457
1540
|
),
|
|
1458
|
-
/* @__PURE__ */ (0,
|
|
1541
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1459
1542
|
] }) });
|
|
1460
1543
|
};
|
|
1461
1544
|
OtpInput_default = OtpInput;
|
|
@@ -1463,12 +1546,12 @@ var init_OtpInput = __esm({
|
|
|
1463
1546
|
});
|
|
1464
1547
|
|
|
1465
1548
|
// src/components/controls/edit/DateTimeInput.tsx
|
|
1466
|
-
var
|
|
1549
|
+
var import_react26, import_jsx_runtime29, DateTimeInput, DateTimeInput_default;
|
|
1467
1550
|
var init_DateTimeInput = __esm({
|
|
1468
1551
|
"src/components/controls/edit/DateTimeInput.tsx"() {
|
|
1469
1552
|
"use strict";
|
|
1470
|
-
|
|
1471
|
-
|
|
1553
|
+
import_react26 = __toESM(require("react"));
|
|
1554
|
+
import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1472
1555
|
DateTimeInput = (props) => {
|
|
1473
1556
|
const textChangeHandler = (event) => {
|
|
1474
1557
|
const localDate = new Date(event.target.value);
|
|
@@ -1500,12 +1583,12 @@ var init_DateTimeInput = __esm({
|
|
|
1500
1583
|
e.preventDefault();
|
|
1501
1584
|
}
|
|
1502
1585
|
};
|
|
1503
|
-
return /* @__PURE__ */ (0,
|
|
1504
|
-
/* @__PURE__ */ (0,
|
|
1586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react26.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("label", { className: "block mb-1", children: [
|
|
1587
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1505
1588
|
" ",
|
|
1506
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1507
|
-
/* @__PURE__ */ (0,
|
|
1508
|
-
/* @__PURE__ */ (0,
|
|
1589
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1590
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1591
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1509
1592
|
"input",
|
|
1510
1593
|
{
|
|
1511
1594
|
type: "datetime-local",
|
|
@@ -1523,9 +1606,9 @@ var init_DateTimeInput = __esm({
|
|
|
1523
1606
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
1524
1607
|
}
|
|
1525
1608
|
),
|
|
1526
|
-
/* @__PURE__ */ (0,
|
|
1609
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: timeZoneAbbr })
|
|
1527
1610
|
] }),
|
|
1528
|
-
/* @__PURE__ */ (0,
|
|
1611
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1529
1612
|
] }) });
|
|
1530
1613
|
};
|
|
1531
1614
|
DateTimeInput_default = DateTimeInput;
|
|
@@ -1533,15 +1616,15 @@ var init_DateTimeInput = __esm({
|
|
|
1533
1616
|
});
|
|
1534
1617
|
|
|
1535
1618
|
// src/components/controls/edit/ColorInput.tsx
|
|
1536
|
-
var
|
|
1619
|
+
var import_react27, import_jsx_runtime30, ColorInput, ColorInput_default;
|
|
1537
1620
|
var init_ColorInput = __esm({
|
|
1538
1621
|
"src/components/controls/edit/ColorInput.tsx"() {
|
|
1539
1622
|
"use strict";
|
|
1540
|
-
|
|
1541
|
-
|
|
1623
|
+
import_react27 = __toESM(require("react"));
|
|
1624
|
+
import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1542
1625
|
ColorInput = (props) => {
|
|
1543
|
-
const [color, setColor] =
|
|
1544
|
-
(0,
|
|
1626
|
+
const [color, setColor] = import_react27.default.useState("#3b82f6");
|
|
1627
|
+
(0, import_react27.useEffect)(() => {
|
|
1545
1628
|
if (props.value !== void 0 && props.value !== null) {
|
|
1546
1629
|
if (typeof props.value === "string") {
|
|
1547
1630
|
setColor(props.value);
|
|
@@ -1560,11 +1643,11 @@ var init_ColorInput = __esm({
|
|
|
1560
1643
|
});
|
|
1561
1644
|
}
|
|
1562
1645
|
};
|
|
1563
|
-
return /* @__PURE__ */ (0,
|
|
1564
|
-
/* @__PURE__ */ (0,
|
|
1646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("label", { className: "block mb-1", children: [
|
|
1647
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
1565
1648
|
" ",
|
|
1566
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1567
|
-
/* @__PURE__ */ (0,
|
|
1649
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1650
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1568
1651
|
"input",
|
|
1569
1652
|
{
|
|
1570
1653
|
type: "color",
|
|
@@ -1577,7 +1660,7 @@ var init_ColorInput = __esm({
|
|
|
1577
1660
|
className: `w-[78px] h-12 block cursor-pointer`
|
|
1578
1661
|
}
|
|
1579
1662
|
),
|
|
1580
|
-
props?.attributes?.errorMessage && /* @__PURE__ */ (0,
|
|
1663
|
+
props?.attributes?.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "mt-1 bg-error-weak text-sm", children: props.attributes.errorMessage })
|
|
1581
1664
|
] });
|
|
1582
1665
|
};
|
|
1583
1666
|
ColorInput_default = ColorInput;
|
|
@@ -1585,22 +1668,22 @@ var init_ColorInput = __esm({
|
|
|
1585
1668
|
});
|
|
1586
1669
|
|
|
1587
1670
|
// src/components/controls/edit/SelectWithSearchInput.tsx
|
|
1588
|
-
var
|
|
1671
|
+
var import_react28, import_jsx_runtime31, SelectWithSearchInput, SelectWithSearchInput_default;
|
|
1589
1672
|
var init_SelectWithSearchInput = __esm({
|
|
1590
1673
|
"src/components/controls/edit/SelectWithSearchInput.tsx"() {
|
|
1591
1674
|
"use strict";
|
|
1592
1675
|
"use client";
|
|
1593
|
-
|
|
1594
|
-
|
|
1676
|
+
import_react28 = __toESM(require("react"));
|
|
1677
|
+
import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1595
1678
|
SelectWithSearchInput = (props) => {
|
|
1596
|
-
const [isOpen, setIsOpen] = (0,
|
|
1597
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
1598
|
-
const [highlightedIndex, setHighlightedIndex] = (0,
|
|
1599
|
-
const [selectedItem, setSelectedItem] = (0,
|
|
1679
|
+
const [isOpen, setIsOpen] = (0, import_react28.useState)(false);
|
|
1680
|
+
const [searchTerm, setSearchTerm] = (0, import_react28.useState)("");
|
|
1681
|
+
const [highlightedIndex, setHighlightedIndex] = (0, import_react28.useState)(-1);
|
|
1682
|
+
const [selectedItem, setSelectedItem] = (0, import_react28.useState)(
|
|
1600
1683
|
null
|
|
1601
1684
|
);
|
|
1602
|
-
const [list, setList] = (0,
|
|
1603
|
-
const loadData =
|
|
1685
|
+
const [list, setList] = (0, import_react28.useState)([]);
|
|
1686
|
+
const loadData = import_react28.default.useCallback(async () => {
|
|
1604
1687
|
if (props.dataset) {
|
|
1605
1688
|
setList(props.dataset);
|
|
1606
1689
|
return;
|
|
@@ -1625,10 +1708,10 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1625
1708
|
props.dataSourceDependsOn,
|
|
1626
1709
|
props.dependentValue
|
|
1627
1710
|
]);
|
|
1628
|
-
(0,
|
|
1711
|
+
(0, import_react28.useEffect)(() => {
|
|
1629
1712
|
loadData();
|
|
1630
1713
|
}, [loadData]);
|
|
1631
|
-
(0,
|
|
1714
|
+
(0, import_react28.useEffect)(() => {
|
|
1632
1715
|
if (props.value && list.length && props.dataKeyFieldName && props.dataTextFieldName) {
|
|
1633
1716
|
const selected = list.find(
|
|
1634
1717
|
(x) => x[props.dataKeyFieldName] == props.value
|
|
@@ -1675,8 +1758,8 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1675
1758
|
handleSelect(e, filteredItems[highlightedIndex]);
|
|
1676
1759
|
}
|
|
1677
1760
|
};
|
|
1678
|
-
const dropdownRef = (0,
|
|
1679
|
-
(0,
|
|
1761
|
+
const dropdownRef = (0, import_react28.useRef)(null);
|
|
1762
|
+
(0, import_react28.useEffect)(() => {
|
|
1680
1763
|
if (highlightedIndex >= 0 && dropdownRef.current) {
|
|
1681
1764
|
const highlightedItem = dropdownRef.current.children[highlightedIndex];
|
|
1682
1765
|
highlightedItem?.scrollIntoView({
|
|
@@ -1686,14 +1769,14 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1686
1769
|
}
|
|
1687
1770
|
}, [highlightedIndex]);
|
|
1688
1771
|
const isReadOnly = props.attributes?.readOnly || props.disable || props.attributes?.disable;
|
|
1689
|
-
return /* @__PURE__ */ (0,
|
|
1690
|
-
/* @__PURE__ */ (0,
|
|
1772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "relative", children: [
|
|
1773
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("label", { className: "pb-1", children: [
|
|
1691
1774
|
props.attributes?.label,
|
|
1692
1775
|
" ",
|
|
1693
|
-
props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1776
|
+
props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "bg-error-weak", children: "*" })
|
|
1694
1777
|
] }),
|
|
1695
|
-
/* @__PURE__ */ (0,
|
|
1696
|
-
/* @__PURE__ */ (0,
|
|
1778
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "relative", children: [
|
|
1779
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1697
1780
|
"input",
|
|
1698
1781
|
{
|
|
1699
1782
|
type: "text",
|
|
@@ -1715,7 +1798,7 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1715
1798
|
`
|
|
1716
1799
|
}
|
|
1717
1800
|
),
|
|
1718
|
-
/* @__PURE__ */ (0,
|
|
1801
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1719
1802
|
"button",
|
|
1720
1803
|
{
|
|
1721
1804
|
type: "button",
|
|
@@ -1726,7 +1809,7 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1726
1809
|
}
|
|
1727
1810
|
},
|
|
1728
1811
|
className: "absolute right-2 top-3 h-5 w-5 text-gray-500 focus:outline-none",
|
|
1729
|
-
children: /* @__PURE__ */ (0,
|
|
1812
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1730
1813
|
"svg",
|
|
1731
1814
|
{
|
|
1732
1815
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1735,7 +1818,7 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1735
1818
|
strokeWidth: 1.5,
|
|
1736
1819
|
stroke: "currentColor",
|
|
1737
1820
|
className: "w-full h-full",
|
|
1738
|
-
children: /* @__PURE__ */ (0,
|
|
1821
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1739
1822
|
"path",
|
|
1740
1823
|
{
|
|
1741
1824
|
strokeLinecap: "round",
|
|
@@ -1748,12 +1831,12 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1748
1831
|
}
|
|
1749
1832
|
)
|
|
1750
1833
|
] }),
|
|
1751
|
-
!isReadOnly && isOpen && /* @__PURE__ */ (0,
|
|
1834
|
+
!isReadOnly && isOpen && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1752
1835
|
"div",
|
|
1753
1836
|
{
|
|
1754
1837
|
ref: dropdownRef,
|
|
1755
1838
|
className: "absolute z-10 w-full bg-default border border-gray-200 shadow-lg max-h-48 overflow-y-auto",
|
|
1756
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ (0,
|
|
1839
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1757
1840
|
"button",
|
|
1758
1841
|
{
|
|
1759
1842
|
onClick: (e) => handleSelect(e, item),
|
|
@@ -1761,10 +1844,10 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1761
1844
|
role: "option",
|
|
1762
1845
|
tabIndex: -1,
|
|
1763
1846
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1764
|
-
children: /* @__PURE__ */ (0,
|
|
1847
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: item[props.dataTextFieldName] })
|
|
1765
1848
|
},
|
|
1766
1849
|
item[props.dataKeyFieldName]
|
|
1767
|
-
)) : /* @__PURE__ */ (0,
|
|
1850
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1768
1851
|
}
|
|
1769
1852
|
)
|
|
1770
1853
|
] });
|
|
@@ -1852,15 +1935,15 @@ var init_StyleTypes = __esm({
|
|
|
1852
1935
|
});
|
|
1853
1936
|
|
|
1854
1937
|
// src/components/ClientButton.tsx
|
|
1855
|
-
var
|
|
1938
|
+
var import_react29, import_jsx_runtime32, ClientButton, ClientButton_default;
|
|
1856
1939
|
var init_ClientButton = __esm({
|
|
1857
1940
|
"src/components/ClientButton.tsx"() {
|
|
1858
1941
|
"use strict";
|
|
1859
1942
|
"use client";
|
|
1860
|
-
|
|
1943
|
+
import_react29 = __toESM(require("react"));
|
|
1861
1944
|
init_ToastService();
|
|
1862
1945
|
init_StyleTypes();
|
|
1863
|
-
|
|
1946
|
+
import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1864
1947
|
ClientButton = (props) => {
|
|
1865
1948
|
const execute = async (event) => {
|
|
1866
1949
|
if (props.onClick !== void 0) {
|
|
@@ -1870,7 +1953,7 @@ var init_ClientButton = __esm({
|
|
|
1870
1953
|
}
|
|
1871
1954
|
};
|
|
1872
1955
|
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
1873
|
-
return /* @__PURE__ */ (0,
|
|
1956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react29.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1874
1957
|
"button",
|
|
1875
1958
|
{
|
|
1876
1959
|
type: "button",
|
|
@@ -1885,17 +1968,17 @@ var init_ClientButton = __esm({
|
|
|
1885
1968
|
});
|
|
1886
1969
|
|
|
1887
1970
|
// src/components/Confirm.tsx
|
|
1888
|
-
var
|
|
1971
|
+
var import_react30, import_jsx_runtime33, Confirm, Confirm_default;
|
|
1889
1972
|
var init_Confirm = __esm({
|
|
1890
1973
|
"src/components/Confirm.tsx"() {
|
|
1891
1974
|
"use strict";
|
|
1892
1975
|
"use client";
|
|
1893
|
-
|
|
1976
|
+
import_react30 = require("react");
|
|
1894
1977
|
init_ClientButton();
|
|
1895
1978
|
init_StyleTypes();
|
|
1896
|
-
|
|
1979
|
+
import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1897
1980
|
Confirm = ({ message, onConfirm, onCancel }) => {
|
|
1898
|
-
const [showModal, setShowModal] = (0,
|
|
1981
|
+
const [showModal, setShowModal] = (0, import_react30.useState)(true);
|
|
1899
1982
|
const handleConfirmAction = () => {
|
|
1900
1983
|
setShowModal(false);
|
|
1901
1984
|
if (onConfirm) {
|
|
@@ -1908,13 +1991,13 @@ var init_Confirm = __esm({
|
|
|
1908
1991
|
onCancel();
|
|
1909
1992
|
}
|
|
1910
1993
|
};
|
|
1911
|
-
return /* @__PURE__ */ (0,
|
|
1912
|
-
/* @__PURE__ */ (0,
|
|
1913
|
-
/* @__PURE__ */ (0,
|
|
1914
|
-
/* @__PURE__ */ (0,
|
|
1915
|
-
/* @__PURE__ */ (0,
|
|
1916
|
-
/* @__PURE__ */ (0,
|
|
1917
|
-
/* @__PURE__ */ (0,
|
|
1994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, { children: showModal && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "fixed inset-0 flex items-center justify-center z-50", children: [
|
|
1995
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "absolute inset-0 bg-black opacity-70" }),
|
|
1996
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "bg-white rounded-md p-6 w-2/6 shadow border z-50", children: [
|
|
1997
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-xl font-medium mb-4", children: "Confirmation" }),
|
|
1998
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mb-4", children: message }),
|
|
1999
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex justify-end gap-8", children: [
|
|
2000
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1918
2001
|
ClientButton_default,
|
|
1919
2002
|
{
|
|
1920
2003
|
onClick: handleCancelAction,
|
|
@@ -1922,7 +2005,7 @@ var init_Confirm = __esm({
|
|
|
1922
2005
|
children: "Cancel"
|
|
1923
2006
|
}
|
|
1924
2007
|
),
|
|
1925
|
-
/* @__PURE__ */ (0,
|
|
2008
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1926
2009
|
ClientButton_default,
|
|
1927
2010
|
{
|
|
1928
2011
|
onClick: handleConfirmAction,
|
|
@@ -1940,21 +2023,21 @@ var init_Confirm = __esm({
|
|
|
1940
2023
|
});
|
|
1941
2024
|
|
|
1942
2025
|
// src/components/Button.tsx
|
|
1943
|
-
var
|
|
2026
|
+
var import_react31, import_jsx_runtime34, Button, Button_default;
|
|
1944
2027
|
var init_Button = __esm({
|
|
1945
2028
|
"src/components/Button.tsx"() {
|
|
1946
2029
|
"use strict";
|
|
1947
2030
|
"use client";
|
|
1948
|
-
|
|
2031
|
+
import_react31 = __toESM(require("react"));
|
|
1949
2032
|
init_ToastService();
|
|
1950
2033
|
init_StyleTypes();
|
|
1951
2034
|
init_Confirm();
|
|
1952
|
-
|
|
2035
|
+
import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1953
2036
|
Button = (props) => {
|
|
1954
|
-
const [inProgress, setInProgress] = (0,
|
|
1955
|
-
const [isActionPerformed, setIsActionPerformed] = (0,
|
|
1956
|
-
const [responseMessage, setResponseMessage] = (0,
|
|
1957
|
-
const [showModal, setShowModal] = (0,
|
|
2037
|
+
const [inProgress, setInProgress] = (0, import_react31.useState)(false);
|
|
2038
|
+
const [isActionPerformed, setIsActionPerformed] = (0, import_react31.useState)(false);
|
|
2039
|
+
const [responseMessage, setResponseMessage] = (0, import_react31.useState)(null);
|
|
2040
|
+
const [showModal, setShowModal] = (0, import_react31.useState)(null);
|
|
1958
2041
|
const execute = async (event) => {
|
|
1959
2042
|
event.preventDefault();
|
|
1960
2043
|
event.stopPropagation();
|
|
@@ -2003,7 +2086,7 @@ var init_Button = __esm({
|
|
|
2003
2086
|
const onConfirm = () => resolve(true);
|
|
2004
2087
|
const onCancel = () => resolve(false);
|
|
2005
2088
|
setShowModal(
|
|
2006
|
-
/* @__PURE__ */ (0,
|
|
2089
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2007
2090
|
Confirm_default,
|
|
2008
2091
|
{
|
|
2009
2092
|
message: props.confirmationMessage,
|
|
@@ -2017,8 +2100,8 @@ var init_Button = __esm({
|
|
|
2017
2100
|
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
2018
2101
|
let progressClass = props.ButtonType ? progressClasses.get(props.ButtonType) : progressClasses.get("Primary" /* Solid */);
|
|
2019
2102
|
const isDisabled = inProgress || isActionPerformed && props.oneTimeAction;
|
|
2020
|
-
return /* @__PURE__ */ (0,
|
|
2021
|
-
/* @__PURE__ */ (0,
|
|
2103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react31.default.Fragment, { children: [
|
|
2104
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2022
2105
|
"button",
|
|
2023
2106
|
{
|
|
2024
2107
|
type: "submit",
|
|
@@ -2028,7 +2111,7 @@ var init_Button = __esm({
|
|
|
2028
2111
|
className: `${buttonClass} relative inline-flex items-center justify-center gap-2 ${props.className ?? ""}`,
|
|
2029
2112
|
children: [
|
|
2030
2113
|
isActionPerformed && props.oneTimeAction && responseMessage ? responseMessage : props.children,
|
|
2031
|
-
inProgress && /* @__PURE__ */ (0,
|
|
2114
|
+
inProgress && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_jsx_runtime34.Fragment, { children: props.hideProgressIndicator ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "absolute bottom-0 left-0 h-0.5 bg-gray-400 rounded animate-progress" }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2032
2115
|
"svg",
|
|
2033
2116
|
{
|
|
2034
2117
|
className: `animate-spin h-5 w-5 flex-shrink-0 ${progressClass}`,
|
|
@@ -2036,7 +2119,7 @@ var init_Button = __esm({
|
|
|
2036
2119
|
fill: "none",
|
|
2037
2120
|
viewBox: "0 0 24 24",
|
|
2038
2121
|
children: [
|
|
2039
|
-
/* @__PURE__ */ (0,
|
|
2122
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2040
2123
|
"circle",
|
|
2041
2124
|
{
|
|
2042
2125
|
className: "opacity-25",
|
|
@@ -2047,7 +2130,7 @@ var init_Button = __esm({
|
|
|
2047
2130
|
strokeWidth: "4"
|
|
2048
2131
|
}
|
|
2049
2132
|
),
|
|
2050
|
-
/* @__PURE__ */ (0,
|
|
2133
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2051
2134
|
"path",
|
|
2052
2135
|
{
|
|
2053
2136
|
className: "opacity-75",
|
|
@@ -2069,28 +2152,28 @@ var init_Button = __esm({
|
|
|
2069
2152
|
});
|
|
2070
2153
|
|
|
2071
2154
|
// src/components/controls/edit/SelectWithSearchPanel.tsx
|
|
2072
|
-
var
|
|
2155
|
+
var import_react32, import_jsx_runtime35, SelectWithSearchPanel, SelectWithSearchPanel_default;
|
|
2073
2156
|
var init_SelectWithSearchPanel = __esm({
|
|
2074
2157
|
"src/components/controls/edit/SelectWithSearchPanel.tsx"() {
|
|
2075
2158
|
"use strict";
|
|
2076
2159
|
"use client";
|
|
2077
2160
|
init_Button();
|
|
2078
|
-
|
|
2079
|
-
|
|
2161
|
+
import_react32 = __toESM(require("react"));
|
|
2162
|
+
import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2080
2163
|
SelectWithSearchPanel = (props) => {
|
|
2081
|
-
const [isOpen, setIsOpen] = (0,
|
|
2082
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
2083
|
-
const [highlightedIndex, setHighlightedIndex] = (0,
|
|
2084
|
-
const [list, setList] = (0,
|
|
2085
|
-
const listRef = (0,
|
|
2086
|
-
const [isError, setIsError] = (0,
|
|
2087
|
-
const containerRef = (0,
|
|
2088
|
-
const [isCreateOpen, setIsCreateOpen] = (0,
|
|
2089
|
-
const [formData, setFormData] = (0,
|
|
2164
|
+
const [isOpen, setIsOpen] = (0, import_react32.useState)(false);
|
|
2165
|
+
const [searchTerm, setSearchTerm] = (0, import_react32.useState)("");
|
|
2166
|
+
const [highlightedIndex, setHighlightedIndex] = (0, import_react32.useState)(0);
|
|
2167
|
+
const [list, setList] = (0, import_react32.useState)([]);
|
|
2168
|
+
const listRef = (0, import_react32.useRef)(null);
|
|
2169
|
+
const [isError, setIsError] = (0, import_react32.useState)(false);
|
|
2170
|
+
const containerRef = (0, import_react32.useRef)(null);
|
|
2171
|
+
const [isCreateOpen, setIsCreateOpen] = (0, import_react32.useState)(false);
|
|
2172
|
+
const [formData, setFormData] = (0, import_react32.useState)({});
|
|
2090
2173
|
const getNestedValue7 = (obj, path) => {
|
|
2091
2174
|
return path.split(".").reduce((acc, key) => acc?.[key], obj);
|
|
2092
2175
|
};
|
|
2093
|
-
(0,
|
|
2176
|
+
(0, import_react32.useEffect)(() => {
|
|
2094
2177
|
const handleClickOutside = (event) => {
|
|
2095
2178
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
2096
2179
|
setIsOpen(false);
|
|
@@ -2101,7 +2184,7 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2101
2184
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
2102
2185
|
};
|
|
2103
2186
|
}, []);
|
|
2104
|
-
(0,
|
|
2187
|
+
(0, import_react32.useEffect)(() => {
|
|
2105
2188
|
async function fetchData() {
|
|
2106
2189
|
if (props.dataset) {
|
|
2107
2190
|
setList(props.dataset);
|
|
@@ -2143,7 +2226,7 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2143
2226
|
audioCtx.close();
|
|
2144
2227
|
}, 250);
|
|
2145
2228
|
};
|
|
2146
|
-
(0,
|
|
2229
|
+
(0, import_react32.useEffect)(() => {
|
|
2147
2230
|
const filteredItems2 = list?.filter(
|
|
2148
2231
|
(item) => item[props?.dataTextFieldName]?.toLowerCase().includes(searchTerm?.toLowerCase())
|
|
2149
2232
|
);
|
|
@@ -2208,18 +2291,18 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2208
2291
|
const handleInputChange = (event, field) => {
|
|
2209
2292
|
setFormData((prev) => ({ ...prev, [field]: event.target.value }));
|
|
2210
2293
|
};
|
|
2211
|
-
const handleSaveModal = (0,
|
|
2294
|
+
const handleSaveModal = (0, import_react32.useCallback)(async () => {
|
|
2212
2295
|
console.log("Form Data:", formData);
|
|
2213
2296
|
return formData;
|
|
2214
2297
|
}, []);
|
|
2215
|
-
return /* @__PURE__ */ (0,
|
|
2216
|
-
/* @__PURE__ */ (0,
|
|
2298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "relative", children: [
|
|
2299
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("label", { className: "text-sm mb-1 font-medium", children: [
|
|
2217
2300
|
props.attributes?.label,
|
|
2218
2301
|
" ",
|
|
2219
2302
|
" ",
|
|
2220
|
-
props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2303
|
+
props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "bg-error-weak", children: "*" })
|
|
2221
2304
|
] }),
|
|
2222
|
-
/* @__PURE__ */ (0,
|
|
2305
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2223
2306
|
"input",
|
|
2224
2307
|
{
|
|
2225
2308
|
type: "text",
|
|
@@ -2233,14 +2316,14 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2233
2316
|
disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none`
|
|
2234
2317
|
}
|
|
2235
2318
|
) }),
|
|
2236
|
-
/* @__PURE__ */ (0,
|
|
2237
|
-
/* @__PURE__ */ (0,
|
|
2238
|
-
/* @__PURE__ */ (0,
|
|
2319
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { ref: containerRef, children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react32.default.Fragment, { children: [
|
|
2320
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "fixed z-50 right-0 bg-white top-[62px] w-1/4 border-l border-gray-200", children: [
|
|
2321
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex flex-col p-2 bg-accent-950 text-white", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("h5", { className: "text-md text-white font-medium", children: [
|
|
2239
2322
|
"Select a",
|
|
2240
2323
|
" ",
|
|
2241
2324
|
props.attributes?.label || props.attributes?.heading
|
|
2242
2325
|
] }) }),
|
|
2243
|
-
/* @__PURE__ */ (0,
|
|
2326
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex justify-end px-4 border-b py-2 border-gray-200 h-10", children: props.createFields && props.createFields.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2244
2327
|
"button",
|
|
2245
2328
|
{
|
|
2246
2329
|
type: "button",
|
|
@@ -2253,12 +2336,12 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2253
2336
|
}
|
|
2254
2337
|
) })
|
|
2255
2338
|
] }),
|
|
2256
|
-
isCreateOpen && /* @__PURE__ */ (0,
|
|
2257
|
-
/* @__PURE__ */ (0,
|
|
2339
|
+
isCreateOpen && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "fixed right-0 w-1/4 h-full top-[62px] bg-white shadow-lg border-l border-gray-200 z-50", children: [
|
|
2340
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex flex-col p-2 bg-accent-950", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("h5", { className: "text-md font-medium text-white", children: [
|
|
2258
2341
|
"Create New ",
|
|
2259
2342
|
props.attributes?.label
|
|
2260
2343
|
] }) }),
|
|
2261
|
-
/* @__PURE__ */ (0,
|
|
2344
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex justify-end px-4 border-b py-2 border-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2262
2345
|
"button",
|
|
2263
2346
|
{
|
|
2264
2347
|
type: "button",
|
|
@@ -2267,10 +2350,10 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2267
2350
|
children: "Close"
|
|
2268
2351
|
}
|
|
2269
2352
|
) }),
|
|
2270
|
-
/* @__PURE__ */ (0,
|
|
2271
|
-
props.createFields?.map((field) => /* @__PURE__ */ (0,
|
|
2272
|
-
/* @__PURE__ */ (0,
|
|
2273
|
-
/* @__PURE__ */ (0,
|
|
2353
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "p-4", children: [
|
|
2354
|
+
props.createFields?.map((field) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "mb-4", children: [
|
|
2355
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("label", { className: "text-sm mb-1 font-medium block", children: field.label }),
|
|
2356
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2274
2357
|
"input",
|
|
2275
2358
|
{
|
|
2276
2359
|
type: field.type,
|
|
@@ -2286,7 +2369,7 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2286
2369
|
}
|
|
2287
2370
|
)
|
|
2288
2371
|
] }, field.name)),
|
|
2289
|
-
/* @__PURE__ */ (0,
|
|
2372
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Button_default, { onClick: async () => {
|
|
2290
2373
|
handleSaveModal();
|
|
2291
2374
|
return { isSuccessful: true };
|
|
2292
2375
|
}, className: "w-full", children: [
|
|
@@ -2295,13 +2378,13 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2295
2378
|
] })
|
|
2296
2379
|
] })
|
|
2297
2380
|
] }),
|
|
2298
|
-
/* @__PURE__ */ (0,
|
|
2381
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2299
2382
|
"div",
|
|
2300
2383
|
{
|
|
2301
2384
|
ref: listRef,
|
|
2302
2385
|
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",
|
|
2303
2386
|
style: { height: "calc(100vh - 130px)" },
|
|
2304
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ (0,
|
|
2387
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2305
2388
|
"button",
|
|
2306
2389
|
{
|
|
2307
2390
|
onClick: (e) => {
|
|
@@ -2311,9 +2394,9 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2311
2394
|
role: "option",
|
|
2312
2395
|
tabIndex: -1,
|
|
2313
2396
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
2314
|
-
children: /* @__PURE__ */ (0,
|
|
2397
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: getNestedValue7(item, props.dataTextFieldName) })
|
|
2315
2398
|
}
|
|
2316
|
-
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ (0,
|
|
2399
|
+
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
2317
2400
|
}
|
|
2318
2401
|
)
|
|
2319
2402
|
] }) })
|
|
@@ -2324,14 +2407,14 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2324
2407
|
});
|
|
2325
2408
|
|
|
2326
2409
|
// src/components/controls/edit/BooleanSelect.tsx
|
|
2327
|
-
var
|
|
2410
|
+
var import_react33, import_jsx_runtime36, BooleanSelect, BooleanSelect_default;
|
|
2328
2411
|
var init_BooleanSelect = __esm({
|
|
2329
2412
|
"src/components/controls/edit/BooleanSelect.tsx"() {
|
|
2330
2413
|
"use strict";
|
|
2331
|
-
|
|
2332
|
-
|
|
2414
|
+
import_react33 = __toESM(require("react"));
|
|
2415
|
+
import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2333
2416
|
BooleanSelect = (props) => {
|
|
2334
|
-
const [list, setList] = (0,
|
|
2417
|
+
const [list, setList] = (0, import_react33.useState)();
|
|
2335
2418
|
const textChangeHandler = (event) => {
|
|
2336
2419
|
const text = event.target.value;
|
|
2337
2420
|
const boolValue = text?.toLowerCase() === "true" || text === "1";
|
|
@@ -2344,7 +2427,7 @@ var init_BooleanSelect = __esm({
|
|
|
2344
2427
|
});
|
|
2345
2428
|
}
|
|
2346
2429
|
};
|
|
2347
|
-
(0,
|
|
2430
|
+
(0, import_react33.useEffect)(() => {
|
|
2348
2431
|
async function fetchData() {
|
|
2349
2432
|
console.log("in select");
|
|
2350
2433
|
if (props.dataset) {
|
|
@@ -2378,11 +2461,11 @@ var init_BooleanSelect = __esm({
|
|
|
2378
2461
|
if (props.value !== void 0 && props.value !== null) {
|
|
2379
2462
|
value = props.value;
|
|
2380
2463
|
}
|
|
2381
|
-
return /* @__PURE__ */ (0,
|
|
2382
|
-
/* @__PURE__ */ (0,
|
|
2464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react33.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("label", { className: "block", children: [
|
|
2465
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
2383
2466
|
" ",
|
|
2384
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2385
|
-
/* @__PURE__ */ (0,
|
|
2467
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2468
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2386
2469
|
"select",
|
|
2387
2470
|
{
|
|
2388
2471
|
name: props.name,
|
|
@@ -2394,9 +2477,9 @@ var init_BooleanSelect = __esm({
|
|
|
2394
2477
|
disabled: props?.attributes?.readOnly,
|
|
2395
2478
|
className: "peer mt-1 py-1.5 block w-full text-black rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n ",
|
|
2396
2479
|
children: [
|
|
2397
|
-
/* @__PURE__ */ (0,
|
|
2480
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("option", { className: "", value: "", children: props.attributes?.placeholder || "Select" }),
|
|
2398
2481
|
list && list.map((item, i) => {
|
|
2399
|
-
return /* @__PURE__ */ (0,
|
|
2482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2400
2483
|
"option",
|
|
2401
2484
|
{
|
|
2402
2485
|
className: "fac-select-option",
|
|
@@ -2409,7 +2492,7 @@ var init_BooleanSelect = __esm({
|
|
|
2409
2492
|
]
|
|
2410
2493
|
}
|
|
2411
2494
|
),
|
|
2412
|
-
/* @__PURE__ */ (0,
|
|
2495
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
2413
2496
|
] }) });
|
|
2414
2497
|
};
|
|
2415
2498
|
BooleanSelect_default = BooleanSelect;
|
|
@@ -2417,12 +2500,12 @@ var init_BooleanSelect = __esm({
|
|
|
2417
2500
|
});
|
|
2418
2501
|
|
|
2419
2502
|
// src/components/controls/edit/EmailInput.tsx
|
|
2420
|
-
var
|
|
2503
|
+
var import_react34, import_jsx_runtime37, EmailInput, EmailInput_default;
|
|
2421
2504
|
var init_EmailInput = __esm({
|
|
2422
2505
|
"src/components/controls/edit/EmailInput.tsx"() {
|
|
2423
2506
|
"use strict";
|
|
2424
|
-
|
|
2425
|
-
|
|
2507
|
+
import_react34 = __toESM(require("react"));
|
|
2508
|
+
import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2426
2509
|
EmailInput = (props) => {
|
|
2427
2510
|
const textChangeHandler = (event) => {
|
|
2428
2511
|
const text = event.target.value;
|
|
@@ -2447,11 +2530,11 @@ var init_EmailInput = __esm({
|
|
|
2447
2530
|
if (props.value !== void 0 && props.value !== null) {
|
|
2448
2531
|
value = props.value;
|
|
2449
2532
|
}
|
|
2450
|
-
return /* @__PURE__ */ (0,
|
|
2451
|
-
/* @__PURE__ */ (0,
|
|
2533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react34.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("label", { className: "block mb-1", children: [
|
|
2534
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-sm font-medium text-slate-700", children: props?.attributes?.label }),
|
|
2452
2535
|
" ",
|
|
2453
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2454
|
-
/* @__PURE__ */ (0,
|
|
2536
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2537
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2455
2538
|
"input",
|
|
2456
2539
|
{
|
|
2457
2540
|
type: "email",
|
|
@@ -2467,7 +2550,7 @@ var init_EmailInput = __esm({
|
|
|
2467
2550
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n transition-all duration-500 ease-in-out"
|
|
2468
2551
|
}
|
|
2469
2552
|
),
|
|
2470
|
-
/* @__PURE__ */ (0,
|
|
2553
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 mb-0 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
2471
2554
|
] }) });
|
|
2472
2555
|
};
|
|
2473
2556
|
EmailInput_default = EmailInput;
|
|
@@ -2475,13 +2558,13 @@ var init_EmailInput = __esm({
|
|
|
2475
2558
|
});
|
|
2476
2559
|
|
|
2477
2560
|
// src/components/controls/edit/TimeInput.tsx
|
|
2478
|
-
var
|
|
2561
|
+
var import_react35, import_jsx_runtime38, TimeInput, TimeInput_default;
|
|
2479
2562
|
var init_TimeInput = __esm({
|
|
2480
2563
|
"src/components/controls/edit/TimeInput.tsx"() {
|
|
2481
2564
|
"use strict";
|
|
2482
2565
|
"use client";
|
|
2483
|
-
|
|
2484
|
-
|
|
2566
|
+
import_react35 = __toESM(require("react"));
|
|
2567
|
+
import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2485
2568
|
TimeInput = (props) => {
|
|
2486
2569
|
const timeChangeHandler = (event) => {
|
|
2487
2570
|
const timeValue = event.target.value;
|
|
@@ -2494,11 +2577,11 @@ var init_TimeInput = __esm({
|
|
|
2494
2577
|
});
|
|
2495
2578
|
}
|
|
2496
2579
|
};
|
|
2497
|
-
return /* @__PURE__ */ (0,
|
|
2498
|
-
/* @__PURE__ */ (0,
|
|
2580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react35.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("label", { className: "block mb-1", children: [
|
|
2581
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
2499
2582
|
" ",
|
|
2500
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2501
|
-
/* @__PURE__ */ (0,
|
|
2583
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2584
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2502
2585
|
"input",
|
|
2503
2586
|
{
|
|
2504
2587
|
type: "time",
|
|
@@ -2511,7 +2594,7 @@ var init_TimeInput = __esm({
|
|
|
2511
2594
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none"
|
|
2512
2595
|
}
|
|
2513
2596
|
) }),
|
|
2514
|
-
/* @__PURE__ */ (0,
|
|
2597
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ?? "" })
|
|
2515
2598
|
] }) });
|
|
2516
2599
|
};
|
|
2517
2600
|
TimeInput_default = TimeInput;
|
|
@@ -2526,7 +2609,7 @@ function Hyperlink(props) {
|
|
|
2526
2609
|
if (target == "_blank") {
|
|
2527
2610
|
additionalProps.rel = "noopener noreferrer";
|
|
2528
2611
|
}
|
|
2529
|
-
return /* @__PURE__ */ (0,
|
|
2612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_jsx_runtime39.Fragment, { children: props.href ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2530
2613
|
import_link.default,
|
|
2531
2614
|
{
|
|
2532
2615
|
href: props.href,
|
|
@@ -2536,65 +2619,65 @@ function Hyperlink(props) {
|
|
|
2536
2619
|
target,
|
|
2537
2620
|
children: props.children
|
|
2538
2621
|
}
|
|
2539
|
-
) : props.isHeading ? /* @__PURE__ */ (0,
|
|
2622
|
+
) : props.isHeading ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h5", { className: props.className + "inline-block", children: props.children }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: props.className, children: props.children }) });
|
|
2540
2623
|
}
|
|
2541
|
-
var import_link,
|
|
2624
|
+
var import_link, import_jsx_runtime39;
|
|
2542
2625
|
var init_Hyperlink = __esm({
|
|
2543
2626
|
"src/components/dataForm/Hyperlink.tsx"() {
|
|
2544
2627
|
"use strict";
|
|
2545
2628
|
import_link = __toESM(require("next/link"));
|
|
2546
2629
|
init_StyleTypes();
|
|
2547
|
-
|
|
2630
|
+
import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2548
2631
|
}
|
|
2549
2632
|
});
|
|
2550
2633
|
|
|
2551
2634
|
// src/svg/chevron-updown.tsx
|
|
2552
|
-
var
|
|
2635
|
+
var import_jsx_runtime40, ChevronUpDown, chevron_updown_default;
|
|
2553
2636
|
var init_chevron_updown = __esm({
|
|
2554
2637
|
"src/svg/chevron-updown.tsx"() {
|
|
2555
2638
|
"use strict";
|
|
2556
|
-
|
|
2639
|
+
import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2557
2640
|
ChevronUpDown = (props) => {
|
|
2558
|
-
return /* @__PURE__ */ (0,
|
|
2641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("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__ */ (0, import_jsx_runtime40.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" }) });
|
|
2559
2642
|
};
|
|
2560
2643
|
chevron_updown_default = ChevronUpDown;
|
|
2561
2644
|
}
|
|
2562
2645
|
});
|
|
2563
2646
|
|
|
2564
2647
|
// src/svg/chevron-down.tsx
|
|
2565
|
-
var
|
|
2648
|
+
var import_jsx_runtime41, ChevronDown, chevron_down_default;
|
|
2566
2649
|
var init_chevron_down = __esm({
|
|
2567
2650
|
"src/svg/chevron-down.tsx"() {
|
|
2568
2651
|
"use strict";
|
|
2569
|
-
|
|
2652
|
+
import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2570
2653
|
ChevronDown = (props) => {
|
|
2571
|
-
return /* @__PURE__ */ (0,
|
|
2654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("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__ */ (0, import_jsx_runtime41.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) });
|
|
2572
2655
|
};
|
|
2573
2656
|
chevron_down_default = ChevronDown;
|
|
2574
2657
|
}
|
|
2575
2658
|
});
|
|
2576
2659
|
|
|
2577
2660
|
// src/svg/chevron-up.tsx
|
|
2578
|
-
var
|
|
2661
|
+
var import_jsx_runtime42, ChevronUp, chevron_up_default;
|
|
2579
2662
|
var init_chevron_up = __esm({
|
|
2580
2663
|
"src/svg/chevron-up.tsx"() {
|
|
2581
2664
|
"use strict";
|
|
2582
|
-
|
|
2665
|
+
import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2583
2666
|
ChevronUp = (props) => {
|
|
2584
|
-
return /* @__PURE__ */ (0,
|
|
2667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("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__ */ (0, import_jsx_runtime42.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 15.75l7.5-7.5 7.5 7.5" }) });
|
|
2585
2668
|
};
|
|
2586
2669
|
chevron_up_default = ChevronUp;
|
|
2587
2670
|
}
|
|
2588
2671
|
});
|
|
2589
2672
|
|
|
2590
2673
|
// src/svg/plus.tsx
|
|
2591
|
-
var
|
|
2674
|
+
var import_jsx_runtime43, Plus, plus_default;
|
|
2592
2675
|
var init_plus = __esm({
|
|
2593
2676
|
"src/svg/plus.tsx"() {
|
|
2594
2677
|
"use strict";
|
|
2595
|
-
|
|
2678
|
+
import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2596
2679
|
Plus = (props) => {
|
|
2597
|
-
return /* @__PURE__ */ (0,
|
|
2680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("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__ */ (0, import_jsx_runtime43.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) });
|
|
2598
2681
|
};
|
|
2599
2682
|
plus_default = Plus;
|
|
2600
2683
|
}
|
|
@@ -2620,37 +2703,37 @@ var init_Icons = __esm({
|
|
|
2620
2703
|
});
|
|
2621
2704
|
|
|
2622
2705
|
// src/svg/Icon.tsx
|
|
2623
|
-
var
|
|
2706
|
+
var import_jsx_runtime44, Icon, Icon_default;
|
|
2624
2707
|
var init_Icon = __esm({
|
|
2625
2708
|
"src/svg/Icon.tsx"() {
|
|
2626
2709
|
"use strict";
|
|
2627
2710
|
init_Icons();
|
|
2628
|
-
|
|
2711
|
+
import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2629
2712
|
Icon = ({ name, className, ...props }) => {
|
|
2630
2713
|
const IconComponent = Icons_default[name];
|
|
2631
2714
|
if (!IconComponent) {
|
|
2632
2715
|
console.error(`Icon "${name}" not found.`);
|
|
2633
2716
|
return null;
|
|
2634
2717
|
}
|
|
2635
|
-
return /* @__PURE__ */ (0,
|
|
2718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(IconComponent, { ...props, className });
|
|
2636
2719
|
};
|
|
2637
2720
|
Icon_default = Icon;
|
|
2638
2721
|
}
|
|
2639
2722
|
});
|
|
2640
2723
|
|
|
2641
2724
|
// src/components/controls/edit/AssetUpload.tsx
|
|
2642
|
-
var
|
|
2725
|
+
var import_react36, import_jsx_runtime45, AssetUpload, AssetUpload_default;
|
|
2643
2726
|
var init_AssetUpload = __esm({
|
|
2644
2727
|
"src/components/controls/edit/AssetUpload.tsx"() {
|
|
2645
2728
|
"use strict";
|
|
2646
2729
|
"use client";
|
|
2647
|
-
|
|
2730
|
+
import_react36 = __toESM(require("react"));
|
|
2648
2731
|
init_ClientButton();
|
|
2649
2732
|
init_StyleTypes();
|
|
2650
2733
|
init_AssetUtility();
|
|
2651
2734
|
init_Hyperlink();
|
|
2652
2735
|
init_Icon();
|
|
2653
|
-
|
|
2736
|
+
import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2654
2737
|
AssetUpload = (props) => {
|
|
2655
2738
|
const isDisabled = props.attributes?.disable ?? false;
|
|
2656
2739
|
let allValues = [];
|
|
@@ -2671,8 +2754,8 @@ var init_AssetUpload = __esm({
|
|
|
2671
2754
|
}
|
|
2672
2755
|
return "image";
|
|
2673
2756
|
};
|
|
2674
|
-
const [assetType, setAssetType] =
|
|
2675
|
-
(0,
|
|
2757
|
+
const [assetType, setAssetType] = import_react36.default.useState(getInitialTab);
|
|
2758
|
+
(0, import_react36.useEffect)(() => {
|
|
2676
2759
|
setAssetType(getInitialTab());
|
|
2677
2760
|
}, [props.value]);
|
|
2678
2761
|
const assetUploadCallback = (newAsset) => {
|
|
@@ -2747,10 +2830,10 @@ var init_AssetUpload = __esm({
|
|
|
2747
2830
|
}
|
|
2748
2831
|
return false;
|
|
2749
2832
|
};
|
|
2750
|
-
return /* @__PURE__ */ (0,
|
|
2751
|
-
/* @__PURE__ */ (0,
|
|
2752
|
-
/* @__PURE__ */ (0,
|
|
2753
|
-
/* @__PURE__ */ (0,
|
|
2833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react36.default.Fragment, { children: [
|
|
2834
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("label", { className: "block mb-1", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }) }),
|
|
2835
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex gap-6 bg-neutral-100 rounded p-2", children: [
|
|
2836
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2754
2837
|
ClientButton_default,
|
|
2755
2838
|
{
|
|
2756
2839
|
className: assetType === "image" ? "px-2 py-1 rounded bg-body-200 scale-95" : "text-neutral-700",
|
|
@@ -2760,7 +2843,7 @@ var init_AssetUpload = __esm({
|
|
|
2760
2843
|
children: "Image Upload"
|
|
2761
2844
|
}
|
|
2762
2845
|
),
|
|
2763
|
-
/* @__PURE__ */ (0,
|
|
2846
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2764
2847
|
ClientButton_default,
|
|
2765
2848
|
{
|
|
2766
2849
|
className: assetType === "video" ? "bg-body-200 px-2 py-1 rounded-md scale-95" : "text-neutral-700",
|
|
@@ -2771,13 +2854,13 @@ var init_AssetUpload = __esm({
|
|
|
2771
2854
|
}
|
|
2772
2855
|
)
|
|
2773
2856
|
] }),
|
|
2774
|
-
shouldShowDetails() && /* @__PURE__ */ (0,
|
|
2775
|
-
/* @__PURE__ */ (0,
|
|
2776
|
-
/* @__PURE__ */ (0,
|
|
2777
|
-
/* @__PURE__ */ (0,
|
|
2778
|
-
/* @__PURE__ */ (0,
|
|
2779
|
-
/* @__PURE__ */ (0,
|
|
2780
|
-
/* @__PURE__ */ (0,
|
|
2857
|
+
shouldShowDetails() && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "relative mt-4 rounded-md p-4 border-2 border-dotted border-gray-300 bg-gray-50", children: [
|
|
2858
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "absolute -top-2.5 left-3 bg-primary-600 text-white text-xs px-2 py-0.5 rounded-full", children: getAssetType(allValues[0]) === "video" ? "Video" : "Image" }),
|
|
2859
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex flex-col gap-3", children: allValues.map((digitalAsset, index) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex justify-between items-start gap-5", children: [
|
|
2860
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "grid grid-cols-2 gap-x-8 gap-y-3 text-sm w-full", children: [
|
|
2861
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { children: [
|
|
2862
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "text-gray-500", children: "Title" }),
|
|
2863
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2781
2864
|
"input",
|
|
2782
2865
|
{
|
|
2783
2866
|
type: "text",
|
|
@@ -2789,18 +2872,18 @@ var init_AssetUpload = __esm({
|
|
|
2789
2872
|
}
|
|
2790
2873
|
)
|
|
2791
2874
|
] }),
|
|
2792
|
-
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ (0,
|
|
2793
|
-
/* @__PURE__ */ (0,
|
|
2794
|
-
/* @__PURE__ */ (0,
|
|
2875
|
+
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { children: [
|
|
2876
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "text-gray-500", children: "Resolution" }),
|
|
2877
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("p", { className: "font-medium text-gray-900 mt-3", children: [
|
|
2795
2878
|
digitalAsset.intrinsicWidth,
|
|
2796
2879
|
"\xD7",
|
|
2797
2880
|
digitalAsset.intrinsicHeight
|
|
2798
2881
|
] })
|
|
2799
2882
|
] }),
|
|
2800
|
-
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ (0,
|
|
2801
|
-
/* @__PURE__ */ (0,
|
|
2802
|
-
/* @__PURE__ */ (0,
|
|
2803
|
-
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ (0,
|
|
2883
|
+
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { children: [
|
|
2884
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "text-gray-500", children: "Image / Poster" }),
|
|
2885
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex-shrink-0 flex flex-col gap-3 mt-1", children: [
|
|
2886
|
+
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2804
2887
|
"img",
|
|
2805
2888
|
{
|
|
2806
2889
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.posterUrl),
|
|
@@ -2808,7 +2891,7 @@ var init_AssetUpload = __esm({
|
|
|
2808
2891
|
className: "w-32 h-auto object-cover rounded border p-1"
|
|
2809
2892
|
}
|
|
2810
2893
|
),
|
|
2811
|
-
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ (0,
|
|
2894
|
+
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2812
2895
|
"img",
|
|
2813
2896
|
{
|
|
2814
2897
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.assetUrl),
|
|
@@ -2818,9 +2901,9 @@ var init_AssetUpload = __esm({
|
|
|
2818
2901
|
)
|
|
2819
2902
|
] })
|
|
2820
2903
|
] }),
|
|
2821
|
-
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ (0,
|
|
2822
|
-
/* @__PURE__ */ (0,
|
|
2823
|
-
/* @__PURE__ */ (0,
|
|
2904
|
+
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "col-span-2", children: [
|
|
2905
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "text-gray-500", children: "HLS Link" }),
|
|
2906
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2824
2907
|
Hyperlink,
|
|
2825
2908
|
{
|
|
2826
2909
|
href: digitalAsset.assetUrl,
|
|
@@ -2831,12 +2914,12 @@ var init_AssetUpload = __esm({
|
|
|
2831
2914
|
)
|
|
2832
2915
|
] })
|
|
2833
2916
|
] }),
|
|
2834
|
-
/* @__PURE__ */ (0,
|
|
2917
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2835
2918
|
"span",
|
|
2836
2919
|
{
|
|
2837
2920
|
onClick: () => !isDisabled && deleteFile(index),
|
|
2838
2921
|
className: isDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
2839
|
-
children: /* @__PURE__ */ (0,
|
|
2922
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Icon_default, { className: "w-4 h-4 text-primary", name: "delete" })
|
|
2840
2923
|
}
|
|
2841
2924
|
)
|
|
2842
2925
|
] }, index)) })
|
|
@@ -2848,12 +2931,12 @@ var init_AssetUpload = __esm({
|
|
|
2848
2931
|
});
|
|
2849
2932
|
|
|
2850
2933
|
// src/components/controls/edit/SwitchInput.tsx
|
|
2851
|
-
var
|
|
2934
|
+
var import_react37, import_jsx_runtime46, SwitchInput, SwitchInput_default;
|
|
2852
2935
|
var init_SwitchInput = __esm({
|
|
2853
2936
|
"src/components/controls/edit/SwitchInput.tsx"() {
|
|
2854
2937
|
"use strict";
|
|
2855
|
-
|
|
2856
|
-
|
|
2938
|
+
import_react37 = __toESM(require("react"));
|
|
2939
|
+
import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2857
2940
|
SwitchInput = (props) => {
|
|
2858
2941
|
const textChangeHandler = (event) => {
|
|
2859
2942
|
let text = event.target.checked;
|
|
@@ -2870,28 +2953,28 @@ var init_SwitchInput = __esm({
|
|
|
2870
2953
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
2871
2954
|
value = true;
|
|
2872
2955
|
}
|
|
2873
|
-
return /* @__PURE__ */ (0,
|
|
2874
|
-
/* @__PURE__ */ (0,
|
|
2875
|
-
props?.attributes?.label && /* @__PURE__ */ (0,
|
|
2956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react37.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-start justify-between gap-4 py-3", children: [
|
|
2957
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "min-w-0", children: [
|
|
2958
|
+
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
2876
2959
|
"label",
|
|
2877
2960
|
{
|
|
2878
2961
|
htmlFor: props.name,
|
|
2879
2962
|
className: "inline-block text-sm font-semibold text-slate-800",
|
|
2880
2963
|
children: [
|
|
2881
2964
|
props.attributes.label,
|
|
2882
|
-
props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2965
|
+
props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "bg-error-weak", children: "*" })
|
|
2883
2966
|
]
|
|
2884
2967
|
}
|
|
2885
2968
|
),
|
|
2886
|
-
/* @__PURE__ */ (0,
|
|
2969
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage || "" })
|
|
2887
2970
|
] }),
|
|
2888
|
-
/* @__PURE__ */ (0,
|
|
2971
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
2889
2972
|
"label",
|
|
2890
2973
|
{
|
|
2891
2974
|
htmlFor: props.name,
|
|
2892
2975
|
className: "relative inline-flex shrink-0 cursor-pointer items-center peer-disabled:cursor-not-allowed",
|
|
2893
2976
|
children: [
|
|
2894
|
-
/* @__PURE__ */ (0,
|
|
2977
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2895
2978
|
"input",
|
|
2896
2979
|
{
|
|
2897
2980
|
type: "checkbox",
|
|
@@ -2904,13 +2987,13 @@ var init_SwitchInput = __esm({
|
|
|
2904
2987
|
className: "peer sr-only"
|
|
2905
2988
|
}
|
|
2906
2989
|
),
|
|
2907
|
-
/* @__PURE__ */ (0,
|
|
2990
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2908
2991
|
"div",
|
|
2909
2992
|
{
|
|
2910
2993
|
className: "h-6 w-11 rounded-full bg-slate-200 shadow-inner\n transition-colors duration-200 ease-in-out\n peer-checked:bg-blue-600\n peer-focus-visible:ring-2 peer-focus-visible:ring-blue-300 peer-focus-visible:ring-offset-2\n peer-disabled:bg-slate-100"
|
|
2911
2994
|
}
|
|
2912
2995
|
),
|
|
2913
|
-
/* @__PURE__ */ (0,
|
|
2996
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2914
2997
|
"div",
|
|
2915
2998
|
{
|
|
2916
2999
|
className: "absolute left-0.5 top-0.5 h-5 w-5 rounded-full bg-default shadow\n transition-transform duration-200 ease-in-out\n peer-checked:translate-x-5\n peer-disabled:bg-slate-50"
|
|
@@ -3008,15 +3091,15 @@ var init_DateTimeUtility = __esm({
|
|
|
3008
3091
|
});
|
|
3009
3092
|
|
|
3010
3093
|
// src/components/controls/edit/DateInput.tsx
|
|
3011
|
-
var
|
|
3094
|
+
var import_react38, import_jsx_runtime47, DateInput, DateInput_default;
|
|
3012
3095
|
var init_DateInput = __esm({
|
|
3013
3096
|
"src/components/controls/edit/DateInput.tsx"() {
|
|
3014
3097
|
"use strict";
|
|
3015
|
-
|
|
3098
|
+
import_react38 = require("react");
|
|
3016
3099
|
init_DateTimeUtility();
|
|
3017
|
-
|
|
3100
|
+
import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3018
3101
|
DateInput = (props) => {
|
|
3019
|
-
const value = (0,
|
|
3102
|
+
const value = (0, import_react38.useMemo)(() => {
|
|
3020
3103
|
if (props.value === void 0 || props.value === null || props.value === "") {
|
|
3021
3104
|
return "";
|
|
3022
3105
|
}
|
|
@@ -3048,11 +3131,11 @@ var init_DateInput = __esm({
|
|
|
3048
3131
|
groupKey: props.groupKey
|
|
3049
3132
|
});
|
|
3050
3133
|
};
|
|
3051
|
-
return /* @__PURE__ */ (0,
|
|
3052
|
-
props.attributes?.label && /* @__PURE__ */ (0,
|
|
3134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "block mb-1", children: [
|
|
3135
|
+
props.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-sm font-medium", children: props.attributes.label }),
|
|
3053
3136
|
" ",
|
|
3054
|
-
props.attributes?.label && props.attributes.required && /* @__PURE__ */ (0,
|
|
3055
|
-
/* @__PURE__ */ (0,
|
|
3137
|
+
props.attributes?.label && props.attributes.required && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
3138
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3056
3139
|
"input",
|
|
3057
3140
|
{
|
|
3058
3141
|
type: "date",
|
|
@@ -3066,7 +3149,7 @@ var init_DateInput = __esm({
|
|
|
3066
3149
|
className: `peer input mt-1 py-1.5 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`
|
|
3067
3150
|
}
|
|
3068
3151
|
),
|
|
3069
|
-
/* @__PURE__ */ (0,
|
|
3152
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props.attributes?.errorMessage ?? "" })
|
|
3070
3153
|
] });
|
|
3071
3154
|
};
|
|
3072
3155
|
DateInput_default = DateInput;
|
|
@@ -3074,16 +3157,16 @@ var init_DateInput = __esm({
|
|
|
3074
3157
|
});
|
|
3075
3158
|
|
|
3076
3159
|
// src/components/controls/edit/RadioInput.tsx
|
|
3077
|
-
var
|
|
3160
|
+
var import_react39, import_jsx_runtime48, RadioInput, RadioInput_default;
|
|
3078
3161
|
var init_RadioInput = __esm({
|
|
3079
3162
|
"src/components/controls/edit/RadioInput.tsx"() {
|
|
3080
3163
|
"use strict";
|
|
3081
|
-
|
|
3164
|
+
import_react39 = require("react");
|
|
3082
3165
|
init_Icon();
|
|
3083
|
-
|
|
3166
|
+
import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3084
3167
|
RadioInput = (props) => {
|
|
3085
|
-
const [list, setList] = (0,
|
|
3086
|
-
(0,
|
|
3168
|
+
const [list, setList] = (0, import_react39.useState)([]);
|
|
3169
|
+
(0, import_react39.useEffect)(() => {
|
|
3087
3170
|
async function loadData() {
|
|
3088
3171
|
if (props.dataset) {
|
|
3089
3172
|
setList(props.dataset);
|
|
@@ -3125,22 +3208,22 @@ var init_RadioInput = __esm({
|
|
|
3125
3208
|
});
|
|
3126
3209
|
}
|
|
3127
3210
|
};
|
|
3128
|
-
return /* @__PURE__ */ (0,
|
|
3129
|
-
/* @__PURE__ */ (0,
|
|
3130
|
-
/* @__PURE__ */ (0,
|
|
3211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "block", children: [
|
|
3212
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-sm font-medium", children: props.attributes?.label }),
|
|
3213
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "flex flex-col gap-3", children: list.map((item, index) => {
|
|
3131
3214
|
const itemValue = item[props.dataKeyFieldName];
|
|
3132
3215
|
const isSelected = String(itemValue) === String(props.value ?? "");
|
|
3133
3216
|
const isRecommended = props.dataRecommendedValue !== void 0 && String(itemValue) === String(props.dataRecommendedValue);
|
|
3134
3217
|
const resultClassName = isSelected ? isRecommended ? "bg-success" : props.dataRecommendedValue ? "bg-alert" : "border-transparent" : "border-transparent";
|
|
3135
3218
|
const iconName = isSelected && props.dataRecommendedValue ? isRecommended ? "checkCircle" : "xCircle" : void 0;
|
|
3136
3219
|
const inputId = `${props.name}-${props.index ?? 0}-id-${index}`;
|
|
3137
|
-
return /* @__PURE__ */ (0,
|
|
3220
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
3138
3221
|
"div",
|
|
3139
3222
|
{
|
|
3140
3223
|
className: `font-normal flex items-center justify-between gap-4 cursor-pointer border rounded p-2 ${resultClassName}`,
|
|
3141
3224
|
children: [
|
|
3142
|
-
/* @__PURE__ */ (0,
|
|
3143
|
-
/* @__PURE__ */ (0,
|
|
3225
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex gap-4 items-start", children: [
|
|
3226
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3144
3227
|
"input",
|
|
3145
3228
|
{
|
|
3146
3229
|
type: "radio",
|
|
@@ -3154,15 +3237,15 @@ var init_RadioInput = __esm({
|
|
|
3154
3237
|
required: props.attributes?.required
|
|
3155
3238
|
}
|
|
3156
3239
|
),
|
|
3157
|
-
/* @__PURE__ */ (0,
|
|
3240
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("label", { className: "text-body-950 pr-2", htmlFor: inputId, children: item[props.dataTextFieldName] })
|
|
3158
3241
|
] }),
|
|
3159
|
-
iconName && /* @__PURE__ */ (0,
|
|
3242
|
+
iconName && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon_default, { className: "w-5 h-5 text-success", name: iconName })
|
|
3160
3243
|
]
|
|
3161
3244
|
},
|
|
3162
3245
|
String(itemValue)
|
|
3163
3246
|
);
|
|
3164
3247
|
}) }),
|
|
3165
|
-
/* @__PURE__ */ (0,
|
|
3248
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props.attributes?.errorMessage ?? "" })
|
|
3166
3249
|
] });
|
|
3167
3250
|
};
|
|
3168
3251
|
RadioInput_default = RadioInput;
|
|
@@ -3170,15 +3253,15 @@ var init_RadioInput = __esm({
|
|
|
3170
3253
|
});
|
|
3171
3254
|
|
|
3172
3255
|
// src/components/controls/edit/Switcher.tsx
|
|
3173
|
-
var
|
|
3256
|
+
var import_react40, import_jsx_runtime49, Switcher, Switcher_default;
|
|
3174
3257
|
var init_Switcher = __esm({
|
|
3175
3258
|
"src/components/controls/edit/Switcher.tsx"() {
|
|
3176
3259
|
"use strict";
|
|
3177
|
-
|
|
3178
|
-
|
|
3260
|
+
import_react40 = require("react");
|
|
3261
|
+
import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3179
3262
|
Switcher = (props) => {
|
|
3180
|
-
const [list, setList] = (0,
|
|
3181
|
-
(0,
|
|
3263
|
+
const [list, setList] = (0, import_react40.useState)([]);
|
|
3264
|
+
(0, import_react40.useEffect)(() => {
|
|
3182
3265
|
async function loadData() {
|
|
3183
3266
|
if (props.dataset) {
|
|
3184
3267
|
setList(props.dataset);
|
|
@@ -3219,9 +3302,9 @@ var init_Switcher = __esm({
|
|
|
3219
3302
|
});
|
|
3220
3303
|
};
|
|
3221
3304
|
const value = props.value === void 0 || props.value === null ? "" : String(props.value);
|
|
3222
|
-
return /* @__PURE__ */ (0,
|
|
3223
|
-
/* @__PURE__ */ (0,
|
|
3224
|
-
list.length === 0 ? /* @__PURE__ */ (0,
|
|
3305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("label", { className: "block mb-1", children: [
|
|
3306
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-sm font-medium", children: props.attributes?.label }),
|
|
3307
|
+
list.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3225
3308
|
"input",
|
|
3226
3309
|
{
|
|
3227
3310
|
type: "text",
|
|
@@ -3234,7 +3317,7 @@ var init_Switcher = __esm({
|
|
|
3234
3317
|
disabled: props.attributes?.readOnly,
|
|
3235
3318
|
className: `peer input mt-1 py-1.5 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`
|
|
3236
3319
|
}
|
|
3237
|
-
) : /* @__PURE__ */ (0,
|
|
3320
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
3238
3321
|
"select",
|
|
3239
3322
|
{
|
|
3240
3323
|
name: props.name,
|
|
@@ -3245,8 +3328,8 @@ var init_Switcher = __esm({
|
|
|
3245
3328
|
disabled: props.attributes?.readOnly,
|
|
3246
3329
|
className: `peer select my-1 py-1 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`,
|
|
3247
3330
|
children: [
|
|
3248
|
-
/* @__PURE__ */ (0,
|
|
3249
|
-
list.map((item) => /* @__PURE__ */ (0,
|
|
3331
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("option", { value: "", children: props.attributes?.placeholder || "Select" }),
|
|
3332
|
+
list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3250
3333
|
"option",
|
|
3251
3334
|
{
|
|
3252
3335
|
value: item[props.dataKeyFieldName],
|
|
@@ -3257,7 +3340,7 @@ var init_Switcher = __esm({
|
|
|
3257
3340
|
]
|
|
3258
3341
|
}
|
|
3259
3342
|
),
|
|
3260
|
-
/* @__PURE__ */ (0,
|
|
3343
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props.attributes?.errorMessage ?? "" })
|
|
3261
3344
|
] });
|
|
3262
3345
|
};
|
|
3263
3346
|
Switcher_default = Switcher;
|
|
@@ -3265,14 +3348,14 @@ var init_Switcher = __esm({
|
|
|
3265
3348
|
});
|
|
3266
3349
|
|
|
3267
3350
|
// src/components/controls/edit/ReferenceInput.tsx
|
|
3268
|
-
var
|
|
3351
|
+
var import_jsx_runtime50, ReferenceInput, ReferenceInput_default;
|
|
3269
3352
|
var init_ReferenceInput = __esm({
|
|
3270
3353
|
"src/components/controls/edit/ReferenceInput.tsx"() {
|
|
3271
3354
|
"use strict";
|
|
3272
3355
|
init_SelectWithSearchInput();
|
|
3273
|
-
|
|
3356
|
+
import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3274
3357
|
ReferenceInput = (props) => {
|
|
3275
|
-
return /* @__PURE__ */ (0,
|
|
3358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectWithSearchInput_default, { ...props });
|
|
3276
3359
|
};
|
|
3277
3360
|
ReferenceInput_default = ReferenceInput;
|
|
3278
3361
|
}
|
|
@@ -3283,12 +3366,12 @@ var InputControlClient_exports = {};
|
|
|
3283
3366
|
__export(InputControlClient_exports, {
|
|
3284
3367
|
default: () => InputControlClient_default
|
|
3285
3368
|
});
|
|
3286
|
-
var
|
|
3369
|
+
var import_react41, import_jsx_runtime51, InputControl, InputControlClient_default;
|
|
3287
3370
|
var init_InputControlClient = __esm({
|
|
3288
3371
|
"src/components/controls/edit/InputControlClient.tsx"() {
|
|
3289
3372
|
"use strict";
|
|
3290
3373
|
"use client";
|
|
3291
|
-
|
|
3374
|
+
import_react41 = __toESM(require("react"));
|
|
3292
3375
|
init_MultilineTextInput();
|
|
3293
3376
|
init_LineTextInput();
|
|
3294
3377
|
init_MoneyInput();
|
|
@@ -3312,8 +3395,8 @@ var init_InputControlClient = __esm({
|
|
|
3312
3395
|
init_RadioInput();
|
|
3313
3396
|
init_Switcher();
|
|
3314
3397
|
init_ReferenceInput();
|
|
3315
|
-
|
|
3316
|
-
InputControl =
|
|
3398
|
+
import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3399
|
+
InputControl = import_react41.default.forwardRef(
|
|
3317
3400
|
(props, ref) => {
|
|
3318
3401
|
const ControlComponents = {
|
|
3319
3402
|
[InputControlType_default.lineTextInput]: LineTextInput_default,
|
|
@@ -3341,7 +3424,7 @@ var init_InputControlClient = __esm({
|
|
|
3341
3424
|
[InputControlType_default.referenceInput]: ReferenceInput_default
|
|
3342
3425
|
};
|
|
3343
3426
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
3344
|
-
return /* @__PURE__ */ (0,
|
|
3427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react41.default.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
3345
3428
|
}
|
|
3346
3429
|
);
|
|
3347
3430
|
InputControl.displayName = "InputControl";
|
|
@@ -3568,29 +3651,29 @@ var LinkNodeButton_exports = {};
|
|
|
3568
3651
|
__export(LinkNodeButton_exports, {
|
|
3569
3652
|
default: () => LinkNodeButton_default
|
|
3570
3653
|
});
|
|
3571
|
-
var
|
|
3654
|
+
var import_react42, import_jsx_runtime55, LinkNodeButton, LinkNodeButton_default;
|
|
3572
3655
|
var init_LinkNodeButton = __esm({
|
|
3573
3656
|
"src/components/pageRenderingEngine/nodes/LinkNodeButton.tsx"() {
|
|
3574
3657
|
"use strict";
|
|
3575
3658
|
"use client";
|
|
3576
|
-
|
|
3659
|
+
import_react42 = require("react");
|
|
3577
3660
|
init_Button();
|
|
3578
3661
|
init_ServiceClient();
|
|
3579
3662
|
init_ToastService();
|
|
3580
|
-
|
|
3663
|
+
import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3581
3664
|
LinkNodeButton = (props) => {
|
|
3582
3665
|
const { node, dataitem, children, linkText, linkType, linkUrl } = props;
|
|
3583
|
-
const [isLoading, setIsLoading] = (0,
|
|
3584
|
-
const [successMessage, setSuccessMessage] = (0,
|
|
3666
|
+
const [isLoading, setIsLoading] = (0, import_react42.useState)(false);
|
|
3667
|
+
const [successMessage, setSuccessMessage] = (0, import_react42.useState)(null);
|
|
3585
3668
|
console.log("LinkNodeButton props:", props);
|
|
3586
|
-
const extractFieldNames = (0,
|
|
3669
|
+
const extractFieldNames = (0, import_react42.useCallback)((template) => {
|
|
3587
3670
|
if (!template) return [];
|
|
3588
3671
|
const regex = /\{(\{\})?([a-zA-Z_$][a-zA-Z0-9_$]*)(?:\}\})?\}/g;
|
|
3589
3672
|
const matches = Array.from(template.matchAll(regex));
|
|
3590
3673
|
const fieldNames = matches.map((match) => match[2] || match[1]).filter((name, index, self) => self.indexOf(name) === index);
|
|
3591
3674
|
return fieldNames;
|
|
3592
3675
|
}, []);
|
|
3593
|
-
const replaceTemplateVariables = (0,
|
|
3676
|
+
const replaceTemplateVariables = (0, import_react42.useCallback)(
|
|
3594
3677
|
(template, responseData) => {
|
|
3595
3678
|
if (!template) return template;
|
|
3596
3679
|
let result = template;
|
|
@@ -3622,7 +3705,7 @@ var init_LinkNodeButton = __esm({
|
|
|
3622
3705
|
},
|
|
3623
3706
|
[props.routeParameters, dataitem, extractFieldNames]
|
|
3624
3707
|
);
|
|
3625
|
-
const getNestedValue7 = (0,
|
|
3708
|
+
const getNestedValue7 = (0, import_react42.useCallback)((obj, path) => {
|
|
3626
3709
|
if (!obj || !path) return void 0;
|
|
3627
3710
|
if (obj[path] !== void 0) {
|
|
3628
3711
|
return obj[path];
|
|
@@ -3637,7 +3720,7 @@ var init_LinkNodeButton = __esm({
|
|
|
3637
3720
|
}
|
|
3638
3721
|
return current;
|
|
3639
3722
|
}, []);
|
|
3640
|
-
const onClick = (0,
|
|
3723
|
+
const onClick = (0, import_react42.useCallback)(async () => {
|
|
3641
3724
|
if (!node.postUrl) {
|
|
3642
3725
|
return {
|
|
3643
3726
|
isSuccessful: false,
|
|
@@ -3744,32 +3827,32 @@ var init_LinkNodeButton = __esm({
|
|
|
3744
3827
|
return children;
|
|
3745
3828
|
}
|
|
3746
3829
|
if (linkText) {
|
|
3747
|
-
return /* @__PURE__ */ (0,
|
|
3830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: linkText });
|
|
3748
3831
|
}
|
|
3749
3832
|
return node.title || "Button";
|
|
3750
3833
|
};
|
|
3751
3834
|
const fontSize = node.children?.[0]?.style?.match(/font-size:\s*([^;]+)/)?.[1];
|
|
3752
|
-
return /* @__PURE__ */ (0,
|
|
3835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "link-button-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3753
3836
|
Button_default,
|
|
3754
3837
|
{
|
|
3755
3838
|
ButtonType: linkType,
|
|
3756
3839
|
onClick,
|
|
3757
3840
|
disabled: isLoading || !!successMessage,
|
|
3758
3841
|
className: "w-full",
|
|
3759
|
-
children: successMessage ? /* @__PURE__ */ (0,
|
|
3842
|
+
children: successMessage ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
3760
3843
|
"span",
|
|
3761
3844
|
{
|
|
3762
3845
|
style: fontSize ? { fontSize } : void 0,
|
|
3763
3846
|
className: "inline-flex items-center gap-2",
|
|
3764
3847
|
children: [
|
|
3765
|
-
/* @__PURE__ */ (0,
|
|
3848
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3766
3849
|
"svg",
|
|
3767
3850
|
{
|
|
3768
3851
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3769
3852
|
viewBox: "0 0 20 20",
|
|
3770
3853
|
fill: "currentColor",
|
|
3771
3854
|
className: "w-5 h-5",
|
|
3772
|
-
children: /* @__PURE__ */ (0,
|
|
3855
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3773
3856
|
"path",
|
|
3774
3857
|
{
|
|
3775
3858
|
fillRule: "evenodd",
|
|
@@ -3779,7 +3862,7 @@ var init_LinkNodeButton = __esm({
|
|
|
3779
3862
|
)
|
|
3780
3863
|
}
|
|
3781
3864
|
),
|
|
3782
|
-
/* @__PURE__ */ (0,
|
|
3865
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: successMessage })
|
|
3783
3866
|
]
|
|
3784
3867
|
}
|
|
3785
3868
|
) : renderButtonContent()
|
|
@@ -3796,9 +3879,9 @@ __export(CopyButton_exports, {
|
|
|
3796
3879
|
default: () => CopyButton
|
|
3797
3880
|
});
|
|
3798
3881
|
function CopyButton({ text }) {
|
|
3799
|
-
const [copied, setCopied] = (0,
|
|
3800
|
-
const timeoutRef = (0,
|
|
3801
|
-
(0,
|
|
3882
|
+
const [copied, setCopied] = (0, import_react49.useState)(false);
|
|
3883
|
+
const timeoutRef = (0, import_react49.useRef)(null);
|
|
3884
|
+
(0, import_react49.useEffect)(() => {
|
|
3802
3885
|
return () => {
|
|
3803
3886
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3804
3887
|
};
|
|
@@ -3813,13 +3896,13 @@ function CopyButton({ text }) {
|
|
|
3813
3896
|
console.error("Failed to copy: ", err);
|
|
3814
3897
|
}
|
|
3815
3898
|
};
|
|
3816
|
-
return /* @__PURE__ */ (0,
|
|
3899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
3817
3900
|
"button",
|
|
3818
3901
|
{
|
|
3819
3902
|
onClick: handleCopy,
|
|
3820
3903
|
className: "flex gap-1 items-center hover:text-white transition",
|
|
3821
3904
|
children: [
|
|
3822
|
-
/* @__PURE__ */ (0,
|
|
3905
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3823
3906
|
"svg",
|
|
3824
3907
|
{
|
|
3825
3908
|
width: "16",
|
|
@@ -3827,7 +3910,7 @@ function CopyButton({ text }) {
|
|
|
3827
3910
|
viewBox: "0 0 24 24",
|
|
3828
3911
|
className: "w-4 h-4",
|
|
3829
3912
|
fill: "currentColor",
|
|
3830
|
-
children: /* @__PURE__ */ (0,
|
|
3913
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3831
3914
|
"path",
|
|
3832
3915
|
{
|
|
3833
3916
|
fillRule: "evenodd",
|
|
@@ -3842,54 +3925,54 @@ function CopyButton({ text }) {
|
|
|
3842
3925
|
}
|
|
3843
3926
|
);
|
|
3844
3927
|
}
|
|
3845
|
-
var
|
|
3928
|
+
var import_react49, import_jsx_runtime65;
|
|
3846
3929
|
var init_CopyButton = __esm({
|
|
3847
3930
|
"src/components/CopyButton.tsx"() {
|
|
3848
3931
|
"use strict";
|
|
3849
3932
|
"use client";
|
|
3850
|
-
|
|
3851
|
-
|
|
3933
|
+
import_react49 = require("react");
|
|
3934
|
+
import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3852
3935
|
}
|
|
3853
3936
|
});
|
|
3854
3937
|
|
|
3855
3938
|
// src/components/IFrameLoaderView.tsx
|
|
3856
|
-
var
|
|
3939
|
+
var import_react52, import_jsx_runtime69, IFrameLoaderView, IFrameLoaderView_default;
|
|
3857
3940
|
var init_IFrameLoaderView = __esm({
|
|
3858
3941
|
"src/components/IFrameLoaderView.tsx"() {
|
|
3859
3942
|
"use strict";
|
|
3860
|
-
|
|
3861
|
-
|
|
3943
|
+
import_react52 = __toESM(require("react"));
|
|
3944
|
+
import_jsx_runtime69 = require("react/jsx-runtime");
|
|
3862
3945
|
IFrameLoaderView = (props) => {
|
|
3863
|
-
return /* @__PURE__ */ (0,
|
|
3864
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
3865
|
-
/* @__PURE__ */ (0,
|
|
3866
|
-
/* @__PURE__ */ (0,
|
|
3867
|
-
/* @__PURE__ */ (0,
|
|
3868
|
-
/* @__PURE__ */ (0,
|
|
3869
|
-
/* @__PURE__ */ (0,
|
|
3946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_react52.default.Fragment, { children: [
|
|
3947
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
3948
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
3949
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
3950
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ml-2", children: [
|
|
3951
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
3952
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
3870
3953
|
] })
|
|
3871
3954
|
] }),
|
|
3872
|
-
/* @__PURE__ */ (0,
|
|
3873
|
-
/* @__PURE__ */ (0,
|
|
3874
|
-
/* @__PURE__ */ (0,
|
|
3875
|
-
/* @__PURE__ */ (0,
|
|
3876
|
-
/* @__PURE__ */ (0,
|
|
3877
|
-
/* @__PURE__ */ (0,
|
|
3878
|
-
/* @__PURE__ */ (0,
|
|
3955
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
3956
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "animate-pulse", children: [
|
|
3957
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3958
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3959
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3960
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3961
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3879
3962
|
] }),
|
|
3880
|
-
/* @__PURE__ */ (0,
|
|
3881
|
-
/* @__PURE__ */ (0,
|
|
3882
|
-
/* @__PURE__ */ (0,
|
|
3883
|
-
/* @__PURE__ */ (0,
|
|
3884
|
-
/* @__PURE__ */ (0,
|
|
3885
|
-
/* @__PURE__ */ (0,
|
|
3963
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "animate-pulse", children: [
|
|
3964
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3965
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3966
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3967
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3968
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3886
3969
|
] }),
|
|
3887
|
-
/* @__PURE__ */ (0,
|
|
3888
|
-
/* @__PURE__ */ (0,
|
|
3889
|
-
/* @__PURE__ */ (0,
|
|
3890
|
-
/* @__PURE__ */ (0,
|
|
3891
|
-
/* @__PURE__ */ (0,
|
|
3892
|
-
/* @__PURE__ */ (0,
|
|
3970
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "animate-pulse", children: [
|
|
3971
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3972
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3973
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3974
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3975
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3893
3976
|
] })
|
|
3894
3977
|
] })
|
|
3895
3978
|
] }) }),
|
|
@@ -3905,19 +3988,19 @@ var IframeClient_exports = {};
|
|
|
3905
3988
|
__export(IframeClient_exports, {
|
|
3906
3989
|
default: () => IframeClient_default
|
|
3907
3990
|
});
|
|
3908
|
-
var
|
|
3991
|
+
var import_react53, import_jsx_runtime70, IframeClient, IframeClient_default;
|
|
3909
3992
|
var init_IframeClient = __esm({
|
|
3910
3993
|
"src/components/pageRenderingEngine/nodes/IframeClient.tsx"() {
|
|
3911
3994
|
"use strict";
|
|
3912
3995
|
"use client";
|
|
3913
|
-
|
|
3996
|
+
import_react53 = __toESM(require("react"));
|
|
3914
3997
|
init_IFrameLoaderView();
|
|
3915
|
-
|
|
3998
|
+
import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3916
3999
|
IframeClient = ({ src }) => {
|
|
3917
|
-
const iframeRef = (0,
|
|
3918
|
-
const [iframeHeight, setIframeHeight] = (0,
|
|
3919
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
3920
|
-
(0,
|
|
4000
|
+
const iframeRef = (0, import_react53.useRef)(null);
|
|
4001
|
+
const [iframeHeight, setIframeHeight] = (0, import_react53.useState)("100%");
|
|
4002
|
+
const [isDataFound, setIsDataFound] = (0, import_react53.useState)(null);
|
|
4003
|
+
(0, import_react53.useEffect)(() => {
|
|
3921
4004
|
const handleReceiveMessage = (event) => {
|
|
3922
4005
|
const eventName = event?.data?.eventName;
|
|
3923
4006
|
const payload = event?.data?.payload;
|
|
@@ -3932,7 +4015,7 @@ var init_IframeClient = __esm({
|
|
|
3932
4015
|
window.addEventListener("message", handleReceiveMessage);
|
|
3933
4016
|
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
3934
4017
|
}, []);
|
|
3935
|
-
(0,
|
|
4018
|
+
(0, import_react53.useEffect)(() => {
|
|
3936
4019
|
const handleResize = () => {
|
|
3937
4020
|
if (iframeRef.current) {
|
|
3938
4021
|
iframeRef.current.contentWindow?.postMessage({ eventName: "RESIZE" }, "*");
|
|
@@ -3944,7 +4027,7 @@ var init_IframeClient = __esm({
|
|
|
3944
4027
|
const handleIframeLoad = () => {
|
|
3945
4028
|
setIsDataFound(true);
|
|
3946
4029
|
};
|
|
3947
|
-
return /* @__PURE__ */ (0,
|
|
4030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react53.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3948
4031
|
"iframe",
|
|
3949
4032
|
{
|
|
3950
4033
|
ref: iframeRef,
|
|
@@ -4164,21 +4247,21 @@ var Pagination_exports = {};
|
|
|
4164
4247
|
__export(Pagination_exports, {
|
|
4165
4248
|
default: () => Pagination_default
|
|
4166
4249
|
});
|
|
4167
|
-
var
|
|
4250
|
+
var import_react54, import_jsx_runtime75, Pagination, Pagination_default;
|
|
4168
4251
|
var init_Pagination = __esm({
|
|
4169
4252
|
"src/components/Pagination.tsx"() {
|
|
4170
4253
|
"use strict";
|
|
4171
4254
|
"use client";
|
|
4172
|
-
|
|
4255
|
+
import_react54 = require("react");
|
|
4173
4256
|
init_OdataBuilder();
|
|
4174
4257
|
init_Icon();
|
|
4175
4258
|
init_StyleTypes();
|
|
4176
4259
|
init_InputControlType();
|
|
4177
4260
|
init_Hyperlink();
|
|
4178
|
-
|
|
4261
|
+
import_jsx_runtime75 = require("react/jsx-runtime");
|
|
4179
4262
|
Pagination = (props) => {
|
|
4180
4263
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
4181
|
-
const builder = (0,
|
|
4264
|
+
const builder = (0, import_react54.useMemo)(() => {
|
|
4182
4265
|
const b = new OdataBuilder(path);
|
|
4183
4266
|
if (query) b.setQuery(query);
|
|
4184
4267
|
return b;
|
|
@@ -4219,7 +4302,7 @@ var init_Pagination = __esm({
|
|
|
4219
4302
|
return range;
|
|
4220
4303
|
};
|
|
4221
4304
|
const paginationRange = getPaginationRange();
|
|
4222
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */ (0,
|
|
4305
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4223
4306
|
Hyperlink,
|
|
4224
4307
|
{
|
|
4225
4308
|
linkType: "Link" /* Link */,
|
|
@@ -4234,9 +4317,9 @@ var init_Pagination = __esm({
|
|
|
4234
4317
|
);
|
|
4235
4318
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
4236
4319
|
if (disabled) {
|
|
4237
|
-
return /* @__PURE__ */ (0,
|
|
4320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("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 });
|
|
4238
4321
|
}
|
|
4239
|
-
return /* @__PURE__ */ (0,
|
|
4322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4240
4323
|
Hyperlink,
|
|
4241
4324
|
{
|
|
4242
4325
|
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",
|
|
@@ -4246,35 +4329,35 @@ var init_Pagination = __esm({
|
|
|
4246
4329
|
);
|
|
4247
4330
|
};
|
|
4248
4331
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
4249
|
-
return /* @__PURE__ */ (0,
|
|
4250
|
-
/* @__PURE__ */ (0,
|
|
4251
|
-
/* @__PURE__ */ (0,
|
|
4332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "py-6 border-t bg-default", children: [
|
|
4333
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
4334
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "text-sm", children: [
|
|
4252
4335
|
"Showing ",
|
|
4253
|
-
/* @__PURE__ */ (0,
|
|
4336
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("span", { className: "font-semibold", children: [
|
|
4254
4337
|
startItem,
|
|
4255
4338
|
"-",
|
|
4256
4339
|
endItem
|
|
4257
4340
|
] }),
|
|
4258
4341
|
" ",
|
|
4259
4342
|
"out of ",
|
|
4260
|
-
/* @__PURE__ */ (0,
|
|
4343
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
4261
4344
|
" results"
|
|
4262
4345
|
] }),
|
|
4263
|
-
totalPages > 1 && /* @__PURE__ */ (0,
|
|
4264
|
-
/* @__PURE__ */ (0,
|
|
4346
|
+
totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "flex items-center space-x-1", children: [
|
|
4347
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
4265
4348
|
NavigationButton,
|
|
4266
4349
|
{
|
|
4267
4350
|
page: activePageNumber - 1,
|
|
4268
4351
|
disabled: activePageNumber === 1,
|
|
4269
4352
|
children: [
|
|
4270
|
-
/* @__PURE__ */ (0,
|
|
4271
|
-
/* @__PURE__ */ (0,
|
|
4353
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
4354
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "text-sm", children: "Prev" })
|
|
4272
4355
|
]
|
|
4273
4356
|
}
|
|
4274
4357
|
),
|
|
4275
4358
|
paginationRange.map((item, index) => {
|
|
4276
4359
|
if (item === "...") {
|
|
4277
|
-
return /* @__PURE__ */ (0,
|
|
4360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4278
4361
|
"span",
|
|
4279
4362
|
{
|
|
4280
4363
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -4284,23 +4367,23 @@ var init_Pagination = __esm({
|
|
|
4284
4367
|
);
|
|
4285
4368
|
}
|
|
4286
4369
|
const page = item;
|
|
4287
|
-
return /* @__PURE__ */ (0,
|
|
4370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(PageButton, { page, children: page }, page);
|
|
4288
4371
|
}),
|
|
4289
|
-
/* @__PURE__ */ (0,
|
|
4372
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
4290
4373
|
NavigationButton,
|
|
4291
4374
|
{
|
|
4292
4375
|
page: activePageNumber + 1,
|
|
4293
4376
|
disabled: activePageNumber === totalPages,
|
|
4294
4377
|
children: [
|
|
4295
|
-
/* @__PURE__ */ (0,
|
|
4296
|
-
/* @__PURE__ */ (0,
|
|
4378
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "text-sm", children: "Next" }),
|
|
4379
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
4297
4380
|
]
|
|
4298
4381
|
}
|
|
4299
4382
|
)
|
|
4300
4383
|
] }),
|
|
4301
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0,
|
|
4302
|
-
/* @__PURE__ */ (0,
|
|
4303
|
-
/* @__PURE__ */ (0,
|
|
4384
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
4385
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "text-sm", children: "Go to:" }),
|
|
4386
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4304
4387
|
"input",
|
|
4305
4388
|
{
|
|
4306
4389
|
type: "number",
|
|
@@ -4321,9 +4404,9 @@ var init_Pagination = __esm({
|
|
|
4321
4404
|
) })
|
|
4322
4405
|
] })
|
|
4323
4406
|
] }),
|
|
4324
|
-
showPageSizeSelector && /* @__PURE__ */ (0,
|
|
4325
|
-
/* @__PURE__ */ (0,
|
|
4326
|
-
/* @__PURE__ */ (0,
|
|
4407
|
+
showPageSizeSelector && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
4408
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "text-sm", children: "Show:" }),
|
|
4409
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4327
4410
|
Hyperlink,
|
|
4328
4411
|
{
|
|
4329
4412
|
className: `
|
|
@@ -4335,7 +4418,7 @@ var init_Pagination = __esm({
|
|
|
4335
4418
|
},
|
|
4336
4419
|
size
|
|
4337
4420
|
)) }),
|
|
4338
|
-
/* @__PURE__ */ (0,
|
|
4421
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "text-sm", children: "per page" })
|
|
4339
4422
|
] }) })
|
|
4340
4423
|
] });
|
|
4341
4424
|
};
|
|
@@ -4348,13 +4431,13 @@ var Slider_exports = {};
|
|
|
4348
4431
|
__export(Slider_exports, {
|
|
4349
4432
|
default: () => Slider_default
|
|
4350
4433
|
});
|
|
4351
|
-
var
|
|
4434
|
+
var import_react55, import_jsx_runtime76, Slider, ArrowButton, ProgressPill, Slider_default;
|
|
4352
4435
|
var init_Slider = __esm({
|
|
4353
4436
|
"src/components/Slider.tsx"() {
|
|
4354
4437
|
"use strict";
|
|
4355
4438
|
"use client";
|
|
4356
|
-
|
|
4357
|
-
|
|
4439
|
+
import_react55 = __toESM(require("react"));
|
|
4440
|
+
import_jsx_runtime76 = require("react/jsx-runtime");
|
|
4358
4441
|
Slider = ({
|
|
4359
4442
|
children,
|
|
4360
4443
|
slidesToShow = 4,
|
|
@@ -4372,13 +4455,13 @@ var init_Slider = __esm({
|
|
|
4372
4455
|
pillStyle = "cumulative",
|
|
4373
4456
|
progressPosition = "bottom"
|
|
4374
4457
|
}) => {
|
|
4375
|
-
const [currentSlide, setCurrentSlide] = (0,
|
|
4376
|
-
const [transition, setTransition] = (0,
|
|
4377
|
-
const [slidesToShowState, setSlidesToShowState] = (0,
|
|
4458
|
+
const [currentSlide, setCurrentSlide] = (0, import_react55.useState)(0);
|
|
4459
|
+
const [transition, setTransition] = (0, import_react55.useState)(true);
|
|
4460
|
+
const [slidesToShowState, setSlidesToShowState] = (0, import_react55.useState)(
|
|
4378
4461
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
4379
4462
|
);
|
|
4380
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
4381
|
-
(0,
|
|
4463
|
+
const [isPlaying, setIsPlaying] = (0, import_react55.useState)(autoplay);
|
|
4464
|
+
(0, import_react55.useEffect)(() => {
|
|
4382
4465
|
if (typeof slidesToShow === "number") return;
|
|
4383
4466
|
const handleResize = () => {
|
|
4384
4467
|
if (window.innerWidth >= 1024) {
|
|
@@ -4393,7 +4476,7 @@ var init_Slider = __esm({
|
|
|
4393
4476
|
window.addEventListener("resize", handleResize);
|
|
4394
4477
|
return () => window.removeEventListener("resize", handleResize);
|
|
4395
4478
|
}, [slidesToShow]);
|
|
4396
|
-
(0,
|
|
4479
|
+
(0, import_react55.useEffect)(() => {
|
|
4397
4480
|
if (!autoplay) return;
|
|
4398
4481
|
const timer = setInterval(() => {
|
|
4399
4482
|
if (isPlaying) {
|
|
@@ -4402,7 +4485,7 @@ var init_Slider = __esm({
|
|
|
4402
4485
|
}, autoplay_speed);
|
|
4403
4486
|
return () => clearInterval(timer);
|
|
4404
4487
|
}, [autoplay, autoplay_speed, currentSlide, isPlaying]);
|
|
4405
|
-
const totalSlides =
|
|
4488
|
+
const totalSlides = import_react55.Children.count(children);
|
|
4406
4489
|
const maxSlide = totalSlides - slidesToShowState;
|
|
4407
4490
|
const nextSlide = () => {
|
|
4408
4491
|
if (currentSlide >= maxSlide) {
|
|
@@ -4447,16 +4530,16 @@ var init_Slider = __esm({
|
|
|
4447
4530
|
}
|
|
4448
4531
|
};
|
|
4449
4532
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
4450
|
-
const slides =
|
|
4451
|
-
if (!
|
|
4533
|
+
const slides = import_react55.Children.map(children, (child, index) => {
|
|
4534
|
+
if (!import_react55.default.isValidElement(child)) return null;
|
|
4452
4535
|
const childProps = child.props;
|
|
4453
4536
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
4454
|
-
return /* @__PURE__ */ (0,
|
|
4537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4455
4538
|
"div",
|
|
4456
4539
|
{
|
|
4457
4540
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
4458
4541
|
style: { width: `calc(${100 / slidesToShowState}%)`, paddingRight: gap },
|
|
4459
|
-
children: (0,
|
|
4542
|
+
children: (0, import_react55.cloneElement)(child, {
|
|
4460
4543
|
className: mergedClassName
|
|
4461
4544
|
})
|
|
4462
4545
|
},
|
|
@@ -4474,14 +4557,14 @@ var init_Slider = __esm({
|
|
|
4474
4557
|
return "bottom-4";
|
|
4475
4558
|
}
|
|
4476
4559
|
};
|
|
4477
|
-
return /* @__PURE__ */ (0,
|
|
4560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
4478
4561
|
"div",
|
|
4479
4562
|
{
|
|
4480
4563
|
className: `relative w-full overflow-hidden ${className}`,
|
|
4481
4564
|
onMouseEnter: handleMouseEnter,
|
|
4482
4565
|
onMouseLeave: handleMouseLeave,
|
|
4483
4566
|
children: [
|
|
4484
|
-
/* @__PURE__ */ (0,
|
|
4567
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4485
4568
|
"div",
|
|
4486
4569
|
{
|
|
4487
4570
|
className: "flex h-full",
|
|
@@ -4492,18 +4575,18 @@ var init_Slider = __esm({
|
|
|
4492
4575
|
children: slides
|
|
4493
4576
|
}
|
|
4494
4577
|
),
|
|
4495
|
-
show_arrows && /* @__PURE__ */ (0,
|
|
4496
|
-
/* @__PURE__ */ (0,
|
|
4578
|
+
show_arrows && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
|
|
4579
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4497
4580
|
ArrowButton,
|
|
4498
4581
|
{
|
|
4499
4582
|
direction: "left",
|
|
4500
4583
|
onClick: prevSlide,
|
|
4501
4584
|
visible: infinite_scroll || currentSlide > 0,
|
|
4502
4585
|
className: arrowClassName,
|
|
4503
|
-
children: /* @__PURE__ */ (0,
|
|
4586
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("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__ */ (0, import_jsx_runtime76.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
4504
4587
|
}
|
|
4505
4588
|
),
|
|
4506
|
-
/* @__PURE__ */ (0,
|
|
4589
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
4507
4590
|
ArrowButton,
|
|
4508
4591
|
{
|
|
4509
4592
|
direction: "right",
|
|
@@ -4511,13 +4594,13 @@ var init_Slider = __esm({
|
|
|
4511
4594
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
4512
4595
|
className: arrowClassName,
|
|
4513
4596
|
children: [
|
|
4514
|
-
/* @__PURE__ */ (0,
|
|
4597
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("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__ */ (0, import_jsx_runtime76.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
|
|
4515
4598
|
" "
|
|
4516
4599
|
]
|
|
4517
4600
|
}
|
|
4518
4601
|
)
|
|
4519
4602
|
] }),
|
|
4520
|
-
show_dots && /* @__PURE__ */ (0,
|
|
4603
|
+
show_dots && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("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__ */ (0, import_jsx_runtime76.jsx)(
|
|
4521
4604
|
ProgressPill,
|
|
4522
4605
|
{
|
|
4523
4606
|
active: index === currentSlide,
|
|
@@ -4543,7 +4626,7 @@ var init_Slider = __esm({
|
|
|
4543
4626
|
visible,
|
|
4544
4627
|
children,
|
|
4545
4628
|
className = ""
|
|
4546
|
-
}) => /* @__PURE__ */ (0,
|
|
4629
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4547
4630
|
"button",
|
|
4548
4631
|
{
|
|
4549
4632
|
className: `
|
|
@@ -4569,13 +4652,13 @@ var init_Slider = __esm({
|
|
|
4569
4652
|
currentSlide,
|
|
4570
4653
|
totalSlides
|
|
4571
4654
|
}) => {
|
|
4572
|
-
const [progress, setProgress] = (0,
|
|
4573
|
-
(0,
|
|
4655
|
+
const [progress, setProgress] = (0, import_react55.useState)(0);
|
|
4656
|
+
(0, import_react55.useEffect)(() => {
|
|
4574
4657
|
if (active) {
|
|
4575
4658
|
setProgress(0);
|
|
4576
4659
|
}
|
|
4577
4660
|
}, [active, index]);
|
|
4578
|
-
(0,
|
|
4661
|
+
(0, import_react55.useEffect)(() => {
|
|
4579
4662
|
if (!active || !isPlaying) {
|
|
4580
4663
|
if (!active) {
|
|
4581
4664
|
setProgress(0);
|
|
@@ -4630,7 +4713,7 @@ var init_Slider = __esm({
|
|
|
4630
4713
|
const renderProgressBar = () => {
|
|
4631
4714
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
4632
4715
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
4633
|
-
return /* @__PURE__ */ (0,
|
|
4716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4634
4717
|
"div",
|
|
4635
4718
|
{
|
|
4636
4719
|
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`,
|
|
@@ -4642,7 +4725,7 @@ var init_Slider = __esm({
|
|
|
4642
4725
|
};
|
|
4643
4726
|
const renderCumulativeFill = () => {
|
|
4644
4727
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
4645
|
-
return /* @__PURE__ */ (0,
|
|
4728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4646
4729
|
"div",
|
|
4647
4730
|
{
|
|
4648
4731
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -4652,7 +4735,7 @@ var init_Slider = __esm({
|
|
|
4652
4735
|
}
|
|
4653
4736
|
return null;
|
|
4654
4737
|
};
|
|
4655
|
-
return /* @__PURE__ */ (0,
|
|
4738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
4656
4739
|
"button",
|
|
4657
4740
|
{
|
|
4658
4741
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -4707,7 +4790,7 @@ __export(index_exports, {
|
|
|
4707
4790
|
module.exports = __toCommonJS(index_exports);
|
|
4708
4791
|
|
|
4709
4792
|
// src/components/controls/view/ViewControl.tsx
|
|
4710
|
-
var
|
|
4793
|
+
var import_react16 = __toESM(require("react"));
|
|
4711
4794
|
|
|
4712
4795
|
// src/components/controls/view/ViewControlTypes.tsx
|
|
4713
4796
|
var ViewControlTypes = {
|
|
@@ -5044,8 +5127,15 @@ var DateTimeView = (0, import_dynamic3.default)(() => Promise.resolve().then(()
|
|
|
5044
5127
|
});
|
|
5045
5128
|
var DateTimeVew_default = DateTimeView;
|
|
5046
5129
|
|
|
5130
|
+
// src/components/controls/view/TimeUntilStarts.tsx
|
|
5131
|
+
var import_dynamic4 = __toESM(require("next/dynamic"));
|
|
5132
|
+
var TimeUntilStarts = (0, import_dynamic4.default)(() => Promise.resolve().then(() => (init_TimeUntilStartsClient(), TimeUntilStartsClient_exports)), {
|
|
5133
|
+
ssr: false
|
|
5134
|
+
});
|
|
5135
|
+
var TimeUntilStarts_default = TimeUntilStarts;
|
|
5136
|
+
|
|
5047
5137
|
// src/components/controls/view/ViewControl.tsx
|
|
5048
|
-
var
|
|
5138
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
5049
5139
|
var ViewControl = (props) => {
|
|
5050
5140
|
const ControlComponents = {
|
|
5051
5141
|
[ViewControlTypes_default.lineText]: LineTextView_default,
|
|
@@ -5054,7 +5144,7 @@ var ViewControl = (props) => {
|
|
|
5054
5144
|
[ViewControlTypes_default.multilineTextBullets]: MultilineTextBulletsView_default,
|
|
5055
5145
|
[ViewControlTypes_default.boolean]: BooleanView_default,
|
|
5056
5146
|
[ViewControlTypes_default.checkboxInput]: BooleanView_default,
|
|
5057
|
-
|
|
5147
|
+
[ViewControlTypes_default.timeUntilStarts]: TimeUntilStarts_default,
|
|
5058
5148
|
[ViewControlTypes_default.money]: MoneyView_default,
|
|
5059
5149
|
[ViewControlTypes_default.date]: DateView_default,
|
|
5060
5150
|
[ViewControlTypes_default.time]: DateView_default,
|
|
@@ -5067,20 +5157,20 @@ var ViewControl = (props) => {
|
|
|
5067
5157
|
[ViewControlTypes_default.status]: StatusView_default,
|
|
5068
5158
|
[ViewControlTypes_default.statusBg]: StatusBgView_default,
|
|
5069
5159
|
[ViewControlTypes_default.progressIndicator]: ProgressIndicator_default,
|
|
5070
|
-
|
|
5160
|
+
[ViewControlTypes_default.timeUntilStarts]: TimeUntilStarts_default,
|
|
5071
5161
|
// [ViewControlTypes.timeUntilStartsStyled]: TimeUntilStartsStyled,
|
|
5072
5162
|
[ViewControlTypes_default.aiGeneratedSummary]: AiGeneratedSummary_default,
|
|
5073
5163
|
[ViewControlTypes_default.booleanView]: BooleanView_default,
|
|
5074
5164
|
[ViewControlTypes_default.text]: LineTextView_default
|
|
5075
5165
|
};
|
|
5076
5166
|
const SelectedControlComponent = props.controlType ? ControlComponents[props.controlType] : void 0;
|
|
5077
|
-
return /* @__PURE__ */ (0,
|
|
5167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react16.default.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
5078
5168
|
};
|
|
5079
5169
|
var ViewControl_default = ViewControl;
|
|
5080
5170
|
|
|
5081
5171
|
// src/components/controls/edit/InputControl.tsx
|
|
5082
|
-
var
|
|
5083
|
-
var InputControl2 = (0,
|
|
5172
|
+
var import_dynamic5 = __toESM(require("next/dynamic"));
|
|
5173
|
+
var InputControl2 = (0, import_dynamic5.default)(() => Promise.resolve().then(() => (init_InputControlClient(), InputControlClient_exports)), {
|
|
5084
5174
|
ssr: false
|
|
5085
5175
|
});
|
|
5086
5176
|
var InputControl_default = InputControl2;
|
|
@@ -5089,13 +5179,13 @@ var InputControl_default = InputControl2;
|
|
|
5089
5179
|
init_InputControlType();
|
|
5090
5180
|
|
|
5091
5181
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
5092
|
-
var
|
|
5182
|
+
var import_react57 = __toESM(require("react"));
|
|
5093
5183
|
|
|
5094
5184
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
5095
|
-
var
|
|
5185
|
+
var import_react44 = __toESM(require("react"));
|
|
5096
5186
|
|
|
5097
5187
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
5098
|
-
var
|
|
5188
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
5099
5189
|
var TextNode = (props) => {
|
|
5100
5190
|
function cssStringToJson(cssString) {
|
|
5101
5191
|
const styleObject = {};
|
|
@@ -5150,37 +5240,37 @@ var TextNode = (props) => {
|
|
|
5150
5240
|
});
|
|
5151
5241
|
}
|
|
5152
5242
|
function renderWithLineBreaks(text) {
|
|
5153
|
-
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0,
|
|
5243
|
+
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { children: [
|
|
5154
5244
|
line,
|
|
5155
|
-
index < arr.length - 1 && /* @__PURE__ */ (0,
|
|
5245
|
+
index < arr.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("br", {})
|
|
5156
5246
|
] }, index));
|
|
5157
5247
|
}
|
|
5158
5248
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
5159
5249
|
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
5160
5250
|
const content = typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText;
|
|
5161
|
-
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ (0,
|
|
5251
|
+
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("sup", { children: content }) : props.node.format & 32 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("sub", { children: content }) : content;
|
|
5162
5252
|
return (
|
|
5163
5253
|
// @ts-expect-error custom code
|
|
5164
|
-
/* @__PURE__ */ (0,
|
|
5254
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: formattedContent })
|
|
5165
5255
|
);
|
|
5166
5256
|
};
|
|
5167
5257
|
var TextNode_default = TextNode;
|
|
5168
5258
|
|
|
5169
5259
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
5170
|
-
var
|
|
5260
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
5171
5261
|
var LineBreakNode = () => {
|
|
5172
|
-
return /* @__PURE__ */ (0,
|
|
5262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "py-0.5 lg:py-1.5" });
|
|
5173
5263
|
};
|
|
5174
5264
|
var LineBreakNode_default = LineBreakNode;
|
|
5175
5265
|
|
|
5176
5266
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
5177
|
-
var
|
|
5267
|
+
var import_react43 = __toESM(require("react"));
|
|
5178
5268
|
|
|
5179
5269
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
5180
5270
|
init_AssetUtility();
|
|
5181
|
-
var
|
|
5182
|
-
var
|
|
5183
|
-
var HlsPlayer3 = (0,
|
|
5271
|
+
var import_dynamic6 = __toESM(require("next/dynamic"));
|
|
5272
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
5273
|
+
var HlsPlayer3 = (0, import_dynamic6.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
5184
5274
|
var getNestedValue = (obj, path) => {
|
|
5185
5275
|
if (!obj || !path) return void 0;
|
|
5186
5276
|
return path.split(".").reduce((current, key) => {
|
|
@@ -5212,7 +5302,7 @@ var ImageNode = (props) => {
|
|
|
5212
5302
|
assets = [image];
|
|
5213
5303
|
}
|
|
5214
5304
|
if (assets && assets.length > 0) {
|
|
5215
|
-
return /* @__PURE__ */ (0,
|
|
5305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5216
5306
|
DeviceAssetSelector_default,
|
|
5217
5307
|
{
|
|
5218
5308
|
device: props.device,
|
|
@@ -5253,7 +5343,7 @@ var ImageNode = (props) => {
|
|
|
5253
5343
|
right: "justify-end"
|
|
5254
5344
|
};
|
|
5255
5345
|
const isHls = imageUrl.endsWith(".m3u8");
|
|
5256
|
-
const renderMedia = () => isHls ? /* @__PURE__ */ (0,
|
|
5346
|
+
const renderMedia = () => isHls ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5257
5347
|
HlsPlayer3,
|
|
5258
5348
|
{
|
|
5259
5349
|
assetUrl: imageUrl,
|
|
@@ -5266,7 +5356,7 @@ var ImageNode = (props) => {
|
|
|
5266
5356
|
apiBaseUrl: props.apiBaseUrl,
|
|
5267
5357
|
session: props.session
|
|
5268
5358
|
}
|
|
5269
|
-
) : /* @__PURE__ */ (0,
|
|
5359
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5270
5360
|
"img",
|
|
5271
5361
|
{
|
|
5272
5362
|
style: styles,
|
|
@@ -5279,7 +5369,7 @@ var ImageNode = (props) => {
|
|
|
5279
5369
|
}
|
|
5280
5370
|
);
|
|
5281
5371
|
if (props.node.width) {
|
|
5282
|
-
return /* @__PURE__ */ (0,
|
|
5372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: `flex ${FORMAT_CLASSES2[props.node.format] ?? ""}`, children: renderMedia() });
|
|
5283
5373
|
}
|
|
5284
5374
|
return renderMedia();
|
|
5285
5375
|
};
|
|
@@ -5288,9 +5378,9 @@ var ImageNode_default = ImageNode;
|
|
|
5288
5378
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
5289
5379
|
init_StyleTypes();
|
|
5290
5380
|
init_Hyperlink();
|
|
5291
|
-
var
|
|
5292
|
-
var
|
|
5293
|
-
var LinkNodeButton2 = (0,
|
|
5381
|
+
var import_dynamic7 = __toESM(require("next/dynamic"));
|
|
5382
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
5383
|
+
var LinkNodeButton2 = (0, import_dynamic7.default)(() => Promise.resolve().then(() => (init_LinkNodeButton(), LinkNodeButton_exports)), {
|
|
5294
5384
|
ssr: false
|
|
5295
5385
|
});
|
|
5296
5386
|
function getNestedValue2(obj, path) {
|
|
@@ -5342,13 +5432,13 @@ var LinkNode = (props) => {
|
|
|
5342
5432
|
const isButton = node.isButton === true;
|
|
5343
5433
|
const renderChildren = () => {
|
|
5344
5434
|
if (!node.children || node.children.length === 0) return null;
|
|
5345
|
-
return /* @__PURE__ */ (0,
|
|
5435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_jsx_runtime56.Fragment, { children: node.children.map((childNode, index) => {
|
|
5346
5436
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
5347
5437
|
if (!SelectedNode) {
|
|
5348
5438
|
console.warn("Unknown node type:", childNode.type);
|
|
5349
5439
|
return null;
|
|
5350
5440
|
}
|
|
5351
|
-
return /* @__PURE__ */ (0,
|
|
5441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react43.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
5352
5442
|
SelectedNode,
|
|
5353
5443
|
{
|
|
5354
5444
|
node: childNode,
|
|
@@ -5361,15 +5451,15 @@ var LinkNode = (props) => {
|
|
|
5361
5451
|
};
|
|
5362
5452
|
const renderFallback = () => {
|
|
5363
5453
|
if ((!node.children || node.children.length === 0) && linkText) {
|
|
5364
|
-
return /* @__PURE__ */ (0,
|
|
5454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { children: linkText });
|
|
5365
5455
|
}
|
|
5366
5456
|
if ((!node.children || node.children.length === 0) && !linkText) {
|
|
5367
|
-
return /* @__PURE__ */ (0,
|
|
5457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("br", {});
|
|
5368
5458
|
}
|
|
5369
5459
|
return null;
|
|
5370
5460
|
};
|
|
5371
5461
|
if (isButton) {
|
|
5372
|
-
return /* @__PURE__ */ (0,
|
|
5462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5373
5463
|
LinkNodeButton2,
|
|
5374
5464
|
{
|
|
5375
5465
|
node,
|
|
@@ -5387,7 +5477,7 @@ var LinkNode = (props) => {
|
|
|
5387
5477
|
}
|
|
5388
5478
|
);
|
|
5389
5479
|
}
|
|
5390
|
-
return /* @__PURE__ */ (0,
|
|
5480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5391
5481
|
Hyperlink,
|
|
5392
5482
|
{
|
|
5393
5483
|
href: linkUrl || "#",
|
|
@@ -5403,10 +5493,10 @@ var LinkNode = (props) => {
|
|
|
5403
5493
|
var LinkNode_default = LinkNode;
|
|
5404
5494
|
|
|
5405
5495
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
5406
|
-
var
|
|
5496
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5407
5497
|
var SVGIconNode = ({ node }) => {
|
|
5408
5498
|
if (!node?.svgCode) return null;
|
|
5409
|
-
return /* @__PURE__ */ (0,
|
|
5499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
5410
5500
|
"span",
|
|
5411
5501
|
{
|
|
5412
5502
|
style: {
|
|
@@ -5423,7 +5513,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
5423
5513
|
|
|
5424
5514
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
5425
5515
|
var import_katex = __toESM(require("katex"));
|
|
5426
|
-
var
|
|
5516
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5427
5517
|
var EquationNode = ({ node }) => {
|
|
5428
5518
|
const { equation, inline } = node;
|
|
5429
5519
|
let html = "";
|
|
@@ -5438,7 +5528,7 @@ var EquationNode = ({ node }) => {
|
|
|
5438
5528
|
});
|
|
5439
5529
|
}
|
|
5440
5530
|
if (inline) {
|
|
5441
|
-
return /* @__PURE__ */ (0,
|
|
5531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5442
5532
|
"span",
|
|
5443
5533
|
{
|
|
5444
5534
|
className: "katex-inline",
|
|
@@ -5446,7 +5536,7 @@ var EquationNode = ({ node }) => {
|
|
|
5446
5536
|
}
|
|
5447
5537
|
);
|
|
5448
5538
|
}
|
|
5449
|
-
return /* @__PURE__ */ (0,
|
|
5539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5450
5540
|
"div",
|
|
5451
5541
|
{
|
|
5452
5542
|
className: "katex-block my-3 text-center",
|
|
@@ -5457,7 +5547,7 @@ var EquationNode = ({ node }) => {
|
|
|
5457
5547
|
var EquationNode_default = EquationNode;
|
|
5458
5548
|
|
|
5459
5549
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
5460
|
-
var
|
|
5550
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5461
5551
|
function getNestedProperty(obj, path) {
|
|
5462
5552
|
if (!obj || !path) return null;
|
|
5463
5553
|
if (path.includes(".")) {
|
|
@@ -5470,7 +5560,7 @@ function getNestedProperty(obj, path) {
|
|
|
5470
5560
|
}
|
|
5471
5561
|
const value = obj[path];
|
|
5472
5562
|
if (Array.isArray(value)) {
|
|
5473
|
-
return value.map((item, index) => /* @__PURE__ */ (0,
|
|
5563
|
+
return value.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { children: String(item) }, index));
|
|
5474
5564
|
}
|
|
5475
5565
|
return value;
|
|
5476
5566
|
}
|
|
@@ -5531,7 +5621,7 @@ var DatafieldNode = (props) => {
|
|
|
5531
5621
|
const dataType = props.node.dataType;
|
|
5532
5622
|
if (isEmptyValue) return null;
|
|
5533
5623
|
if (dataType === "rawContent") {
|
|
5534
|
-
return /* @__PURE__ */ (0,
|
|
5624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5535
5625
|
PageBodyRenderer_default,
|
|
5536
5626
|
{
|
|
5537
5627
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -5547,12 +5637,12 @@ var DatafieldNode = (props) => {
|
|
|
5547
5637
|
}
|
|
5548
5638
|
);
|
|
5549
5639
|
}
|
|
5550
|
-
return /* @__PURE__ */ (0,
|
|
5640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5551
5641
|
"span",
|
|
5552
5642
|
{
|
|
5553
5643
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
5554
5644
|
style: styles,
|
|
5555
|
-
children: /* @__PURE__ */ (0,
|
|
5645
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5556
5646
|
ViewControl_default,
|
|
5557
5647
|
{
|
|
5558
5648
|
controlType: dataType,
|
|
@@ -5565,7 +5655,7 @@ var DatafieldNode = (props) => {
|
|
|
5565
5655
|
var DatafieldNode_default = DatafieldNode;
|
|
5566
5656
|
|
|
5567
5657
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
5568
|
-
var
|
|
5658
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5569
5659
|
var ParagraphNode = (props) => {
|
|
5570
5660
|
const NodeTypes2 = {
|
|
5571
5661
|
["text"]: TextNode_default,
|
|
@@ -5585,9 +5675,9 @@ var ParagraphNode = (props) => {
|
|
|
5585
5675
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
5586
5676
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
5587
5677
|
if (isInlineOnlyParent) {
|
|
5588
|
-
return /* @__PURE__ */ (0,
|
|
5678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_jsx_runtime60.Fragment, { children: hasChildren && props.node.children.map((node, index) => {
|
|
5589
5679
|
const SelectedNode = NodeTypes2[node.type];
|
|
5590
|
-
return /* @__PURE__ */ (0,
|
|
5680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react44.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
5591
5681
|
SelectedNode,
|
|
5592
5682
|
{
|
|
5593
5683
|
node,
|
|
@@ -5599,10 +5689,10 @@ var ParagraphNode = (props) => {
|
|
|
5599
5689
|
) }, index);
|
|
5600
5690
|
}) });
|
|
5601
5691
|
}
|
|
5602
|
-
return /* @__PURE__ */ (0,
|
|
5692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: " " + formatClasses, children: [
|
|
5603
5693
|
hasChildren && props.node.children.map((node, index) => {
|
|
5604
5694
|
const SelectedNode = NodeTypes2[node.type];
|
|
5605
|
-
return /* @__PURE__ */ (0,
|
|
5695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react44.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
5606
5696
|
SelectedNode,
|
|
5607
5697
|
{
|
|
5608
5698
|
node,
|
|
@@ -5613,14 +5703,14 @@ var ParagraphNode = (props) => {
|
|
|
5613
5703
|
}
|
|
5614
5704
|
) }, index);
|
|
5615
5705
|
}),
|
|
5616
|
-
!hasChildren && /* @__PURE__ */ (0,
|
|
5706
|
+
!hasChildren && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "py-1.5 lg:py-2" })
|
|
5617
5707
|
] });
|
|
5618
5708
|
};
|
|
5619
5709
|
var ParagraphNode_default = ParagraphNode;
|
|
5620
5710
|
|
|
5621
5711
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
5622
|
-
var
|
|
5623
|
-
var
|
|
5712
|
+
var import_react45 = __toESM(require("react"));
|
|
5713
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
5624
5714
|
var HeadingNode = (props) => {
|
|
5625
5715
|
const NodeTypes2 = {
|
|
5626
5716
|
["text"]: TextNode_default,
|
|
@@ -5636,23 +5726,23 @@ var HeadingNode = (props) => {
|
|
|
5636
5726
|
{
|
|
5637
5727
|
}
|
|
5638
5728
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
5639
|
-
return /* @__PURE__ */ (0,
|
|
5729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_jsx_runtime61.Fragment, { children: import_react45.default.createElement(
|
|
5640
5730
|
HeadingTag,
|
|
5641
5731
|
{ className: formatClasses },
|
|
5642
5732
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
5643
5733
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
5644
|
-
return /* @__PURE__ */ (0,
|
|
5734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react45.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
5645
5735
|
})
|
|
5646
5736
|
) });
|
|
5647
5737
|
};
|
|
5648
5738
|
var HeadingNode_default = HeadingNode;
|
|
5649
5739
|
|
|
5650
5740
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
5651
|
-
var
|
|
5741
|
+
var import_react47 = __toESM(require("react"));
|
|
5652
5742
|
|
|
5653
5743
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
5654
|
-
var
|
|
5655
|
-
var
|
|
5744
|
+
var import_react46 = __toESM(require("react"));
|
|
5745
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
5656
5746
|
var ListItemNode = (props) => {
|
|
5657
5747
|
const NodeTypes2 = {
|
|
5658
5748
|
text: TextNode_default,
|
|
@@ -5669,66 +5759,66 @@ var ListItemNode = (props) => {
|
|
|
5669
5759
|
liStyle.fontSize = match[1].trim();
|
|
5670
5760
|
}
|
|
5671
5761
|
}
|
|
5672
|
-
return /* @__PURE__ */ (0,
|
|
5762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
5673
5763
|
const SelectedNode = NodeTypes2[node.type];
|
|
5674
5764
|
if (node.type === "linebreak") {
|
|
5675
5765
|
if (!foundFirstBreak) {
|
|
5676
5766
|
foundFirstBreak = true;
|
|
5677
|
-
return /* @__PURE__ */ (0,
|
|
5767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", {}, index);
|
|
5678
5768
|
} else {
|
|
5679
|
-
return /* @__PURE__ */ (0,
|
|
5769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "py-1 lg:py-2" }, index);
|
|
5680
5770
|
}
|
|
5681
5771
|
} else {
|
|
5682
5772
|
foundFirstBreak = false;
|
|
5683
|
-
return /* @__PURE__ */ (0,
|
|
5773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react46.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
5684
5774
|
}
|
|
5685
5775
|
}) });
|
|
5686
5776
|
};
|
|
5687
5777
|
var ListItemNode_default = ListItemNode;
|
|
5688
5778
|
|
|
5689
5779
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
5690
|
-
var
|
|
5780
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
5691
5781
|
var ListNode = (props) => {
|
|
5692
5782
|
const NodeTypes2 = {
|
|
5693
5783
|
listitem: ListItemNode_default
|
|
5694
5784
|
};
|
|
5695
|
-
return /* @__PURE__ */ (0,
|
|
5696
|
-
props.node.listType == "bullet" && /* @__PURE__ */ (0,
|
|
5785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_react47.default.Fragment, { children: [
|
|
5786
|
+
props.node.listType == "bullet" && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
5697
5787
|
const SelectedNode = NodeTypes2[node.type];
|
|
5698
|
-
return /* @__PURE__ */ (0,
|
|
5788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react47.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
5699
5789
|
}) }),
|
|
5700
|
-
props.node.listType == "number" && /* @__PURE__ */ (0,
|
|
5790
|
+
props.node.listType == "number" && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
5701
5791
|
const SelectedNode = NodeTypes2[node.type];
|
|
5702
|
-
return /* @__PURE__ */ (0,
|
|
5792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react47.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
5703
5793
|
}) })
|
|
5704
5794
|
] });
|
|
5705
5795
|
};
|
|
5706
5796
|
var ListNode_default = ListNode;
|
|
5707
5797
|
|
|
5708
5798
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
5709
|
-
var
|
|
5710
|
-
var
|
|
5799
|
+
var import_react48 = __toESM(require("react"));
|
|
5800
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
5711
5801
|
var QuoteNode = (props) => {
|
|
5712
5802
|
const NodeTypes2 = {
|
|
5713
5803
|
["text"]: TextNode_default,
|
|
5714
5804
|
["linebreak"]: LineBreakNode_default,
|
|
5715
5805
|
["link"]: LinkNode_default
|
|
5716
5806
|
};
|
|
5717
|
-
return /* @__PURE__ */ (0,
|
|
5807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
5718
5808
|
const SelectedNode = NodeTypes2[node.type];
|
|
5719
|
-
return /* @__PURE__ */ (0,
|
|
5809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react48.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
5720
5810
|
}) });
|
|
5721
5811
|
};
|
|
5722
5812
|
var QuoteNode_default = QuoteNode;
|
|
5723
5813
|
|
|
5724
5814
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
5725
|
-
var
|
|
5726
|
-
var
|
|
5727
|
-
var
|
|
5728
|
-
var CopyButton2 = (0,
|
|
5815
|
+
var import_react50 = __toESM(require("react"));
|
|
5816
|
+
var import_dynamic8 = __toESM(require("next/dynamic"));
|
|
5817
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
5818
|
+
var CopyButton2 = (0, import_dynamic8.default)(() => Promise.resolve().then(() => (init_CopyButton(), CopyButton_exports)), {
|
|
5729
5819
|
ssr: false,
|
|
5730
5820
|
// optional: fallback UI while loading
|
|
5731
|
-
loading: () => /* @__PURE__ */ (0,
|
|
5821
|
+
loading: () => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
5732
5822
|
});
|
|
5733
5823
|
var CodeNode = (props) => {
|
|
5734
5824
|
const NodeTypes2 = {
|
|
@@ -5742,14 +5832,14 @@ var CodeNode = (props) => {
|
|
|
5742
5832
|
if (node.type === "link") return node.text || node.url || "";
|
|
5743
5833
|
return "";
|
|
5744
5834
|
}).join("") ?? "";
|
|
5745
|
-
return /* @__PURE__ */ (0,
|
|
5746
|
-
/* @__PURE__ */ (0,
|
|
5747
|
-
/* @__PURE__ */ (0,
|
|
5748
|
-
/* @__PURE__ */ (0,
|
|
5835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { children: [
|
|
5836
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
5837
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { children: "Code Snippet" }),
|
|
5838
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(CopyButton2, { text: textContent })
|
|
5749
5839
|
] }),
|
|
5750
|
-
/* @__PURE__ */ (0,
|
|
5840
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("code", { className: "bg-neutral-soft p-4 text-sm whitespace-pre-wrap border border-2 block", children: props.node.children && props.node.children.map((node, index) => {
|
|
5751
5841
|
const SelectedNode = NodeTypes2[node.type];
|
|
5752
|
-
return /* @__PURE__ */ (0,
|
|
5842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react50.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5753
5843
|
SelectedNode,
|
|
5754
5844
|
{
|
|
5755
5845
|
node,
|
|
@@ -5764,15 +5854,15 @@ var CodeNode = (props) => {
|
|
|
5764
5854
|
var CodeNode_default = CodeNode;
|
|
5765
5855
|
|
|
5766
5856
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
5767
|
-
var
|
|
5857
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
5768
5858
|
var HorizontalRuleNode = () => {
|
|
5769
|
-
return /* @__PURE__ */ (0,
|
|
5859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("hr", {});
|
|
5770
5860
|
};
|
|
5771
5861
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
5772
5862
|
|
|
5773
5863
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
5774
|
-
var
|
|
5775
|
-
var
|
|
5864
|
+
var import_react51 = __toESM(require("react"));
|
|
5865
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
5776
5866
|
var WidgetNode = (props) => {
|
|
5777
5867
|
const getWidgetParameters = () => {
|
|
5778
5868
|
const widgetInputParameters = {
|
|
@@ -5836,7 +5926,7 @@ var WidgetNode = (props) => {
|
|
|
5836
5926
|
};
|
|
5837
5927
|
const widgetCode = props.node?.widgetCode;
|
|
5838
5928
|
if (!widgetCode) {
|
|
5839
|
-
return /* @__PURE__ */ (0,
|
|
5929
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, { children: "Invalid widget" });
|
|
5840
5930
|
}
|
|
5841
5931
|
const widgetParams = getWidgetParameters();
|
|
5842
5932
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -5845,7 +5935,7 @@ var WidgetNode = (props) => {
|
|
|
5845
5935
|
}
|
|
5846
5936
|
return (
|
|
5847
5937
|
// eslint-disable-next-line react-hooks/static-components
|
|
5848
|
-
/* @__PURE__ */ (0,
|
|
5938
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react51.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5849
5939
|
WidgetRenderer,
|
|
5850
5940
|
{
|
|
5851
5941
|
params: widgetParams,
|
|
@@ -5862,13 +5952,13 @@ var WidgetNode = (props) => {
|
|
|
5862
5952
|
var WidgetNode_default = WidgetNode;
|
|
5863
5953
|
|
|
5864
5954
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
5865
|
-
var
|
|
5866
|
-
var
|
|
5955
|
+
var import_dynamic11 = __toESM(require("next/dynamic"));
|
|
5956
|
+
var import_react56 = __toESM(require("react"));
|
|
5867
5957
|
|
|
5868
5958
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
5869
|
-
var
|
|
5870
|
-
var
|
|
5871
|
-
var IframeClient2 = (0,
|
|
5959
|
+
var import_dynamic9 = __toESM(require("next/dynamic"));
|
|
5960
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
5961
|
+
var IframeClient2 = (0, import_dynamic9.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
5872
5962
|
ssr: false
|
|
5873
5963
|
});
|
|
5874
5964
|
var EmbedNode = (props) => {
|
|
@@ -5880,7 +5970,7 @@ var EmbedNode = (props) => {
|
|
|
5880
5970
|
} else {
|
|
5881
5971
|
src = props.node.embedSrc;
|
|
5882
5972
|
}
|
|
5883
|
-
return /* @__PURE__ */ (0,
|
|
5973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "aspect-video", children: src && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(IframeClient2, { src }) });
|
|
5884
5974
|
};
|
|
5885
5975
|
var EmbedNode_default = EmbedNode;
|
|
5886
5976
|
|
|
@@ -6080,10 +6170,10 @@ var PathUtility = class {
|
|
|
6080
6170
|
var PathUtility_default = new PathUtility();
|
|
6081
6171
|
|
|
6082
6172
|
// src/components/NoDataFound.tsx
|
|
6083
|
-
var
|
|
6173
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
6084
6174
|
var NoDataFound = () => {
|
|
6085
|
-
return /* @__PURE__ */ (0,
|
|
6086
|
-
/* @__PURE__ */ (0,
|
|
6175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
6176
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "mb-5", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6087
6177
|
"svg",
|
|
6088
6178
|
{
|
|
6089
6179
|
className: "w-10 h-10",
|
|
@@ -6091,7 +6181,7 @@ var NoDataFound = () => {
|
|
|
6091
6181
|
stroke: "currentColor",
|
|
6092
6182
|
viewBox: "0 0 24 24",
|
|
6093
6183
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6094
|
-
children: /* @__PURE__ */ (0,
|
|
6184
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6095
6185
|
"path",
|
|
6096
6186
|
{
|
|
6097
6187
|
strokeLinecap: "round",
|
|
@@ -6102,17 +6192,17 @@ var NoDataFound = () => {
|
|
|
6102
6192
|
)
|
|
6103
6193
|
}
|
|
6104
6194
|
) }) }),
|
|
6105
|
-
/* @__PURE__ */ (0,
|
|
6106
|
-
/* @__PURE__ */ (0,
|
|
6195
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
6196
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
6107
6197
|
] });
|
|
6108
6198
|
};
|
|
6109
6199
|
var NoDataFound_default = NoDataFound;
|
|
6110
6200
|
|
|
6111
6201
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
6112
6202
|
init_AssetUtility();
|
|
6113
|
-
var
|
|
6114
|
-
var
|
|
6115
|
-
var HlsPlayer4 = (0,
|
|
6203
|
+
var import_dynamic10 = __toESM(require("next/dynamic"));
|
|
6204
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
6205
|
+
var HlsPlayer4 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
6116
6206
|
var deviceToMediaQuery = (device) => {
|
|
6117
6207
|
switch (device) {
|
|
6118
6208
|
case "lg":
|
|
@@ -6267,8 +6357,8 @@ var ImageGalleryNode = (props) => {
|
|
|
6267
6357
|
right: "justify-end"
|
|
6268
6358
|
};
|
|
6269
6359
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
6270
|
-
return /* @__PURE__ */ (0,
|
|
6271
|
-
hlsSources.length > 0 && /* @__PURE__ */ (0,
|
|
6360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
|
|
6361
|
+
hlsSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_jsx_runtime73.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6272
6362
|
HlsPlayer4,
|
|
6273
6363
|
{
|
|
6274
6364
|
sources: hlsSources,
|
|
@@ -6283,7 +6373,7 @@ var ImageGalleryNode = (props) => {
|
|
|
6283
6373
|
styles: hlsStyles
|
|
6284
6374
|
}
|
|
6285
6375
|
) }),
|
|
6286
|
-
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0,
|
|
6376
|
+
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_jsx_runtime73.Fragment, { children: staticFallback ? /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("picture", { children: [
|
|
6287
6377
|
DEVICE_ORDER.map((deviceKey) => {
|
|
6288
6378
|
const match = staticSources.find(
|
|
6289
6379
|
(img) => img.device === deviceKey
|
|
@@ -6299,7 +6389,7 @@ var ImageGalleryNode = (props) => {
|
|
|
6299
6389
|
if (!srcUrl) {
|
|
6300
6390
|
return null;
|
|
6301
6391
|
}
|
|
6302
|
-
return /* @__PURE__ */ (0,
|
|
6392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6303
6393
|
"source",
|
|
6304
6394
|
{
|
|
6305
6395
|
media: deviceToMediaQuery(match.device),
|
|
@@ -6324,7 +6414,7 @@ var ImageGalleryNode = (props) => {
|
|
|
6324
6414
|
if (img.borderRadius) {
|
|
6325
6415
|
styles.borderRadius = img.borderRadius;
|
|
6326
6416
|
}
|
|
6327
|
-
return /* @__PURE__ */ (0,
|
|
6417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6328
6418
|
"img",
|
|
6329
6419
|
{
|
|
6330
6420
|
loading: "lazy",
|
|
@@ -6339,7 +6429,7 @@ var ImageGalleryNode = (props) => {
|
|
|
6339
6429
|
})()
|
|
6340
6430
|
] }) : (
|
|
6341
6431
|
/* Case 2: Only device-specific images exist */
|
|
6342
|
-
/* @__PURE__ */ (0,
|
|
6432
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_jsx_runtime73.Fragment, { children: staticSources.map((img, index) => {
|
|
6343
6433
|
const resolved = resolveImage(img);
|
|
6344
6434
|
const imageUrl = resolved?.imageUrl;
|
|
6345
6435
|
if (!imageUrl) {
|
|
@@ -6366,7 +6456,7 @@ var ImageGalleryNode = (props) => {
|
|
|
6366
6456
|
default:
|
|
6367
6457
|
display = "block";
|
|
6368
6458
|
}
|
|
6369
|
-
return /* @__PURE__ */ (0,
|
|
6459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6370
6460
|
"img",
|
|
6371
6461
|
{
|
|
6372
6462
|
loading: "lazy",
|
|
@@ -6507,28 +6597,28 @@ var shouldRenderContainer = (node, dataItem, session) => {
|
|
|
6507
6597
|
|
|
6508
6598
|
// src/components/pageRenderingEngine/nodes/DocumentNode.tsx
|
|
6509
6599
|
init_AssetUtility();
|
|
6510
|
-
var
|
|
6600
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
6511
6601
|
var getNestedValue5 = (obj, path) => {
|
|
6512
6602
|
if (!obj || !path) return void 0;
|
|
6513
6603
|
return path.split(".").reduce((current, key) => {
|
|
6514
6604
|
return current && current[key] !== void 0 ? current[key] : void 0;
|
|
6515
6605
|
}, obj);
|
|
6516
6606
|
};
|
|
6517
|
-
var PdfIcon = () => /* @__PURE__ */ (0,
|
|
6607
|
+
var PdfIcon = () => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6518
6608
|
"svg",
|
|
6519
6609
|
{
|
|
6520
6610
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6521
6611
|
viewBox: "0 0 48 48",
|
|
6522
6612
|
className: "w-10 h-10",
|
|
6523
6613
|
children: [
|
|
6524
|
-
/* @__PURE__ */ (0,
|
|
6614
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6525
6615
|
"path",
|
|
6526
6616
|
{
|
|
6527
6617
|
fill: "#e53935",
|
|
6528
6618
|
d: "M38,42H10c-2.209,0-4-1.791-4-4V10c0-2.209,1.791-4,4-4h28c2.209,0,4,1.791,4,4v28 C42,40.209,40.209,42,38,42z"
|
|
6529
6619
|
}
|
|
6530
6620
|
),
|
|
6531
|
-
/* @__PURE__ */ (0,
|
|
6621
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6532
6622
|
"path",
|
|
6533
6623
|
{
|
|
6534
6624
|
fill: "#fff",
|
|
@@ -6538,55 +6628,55 @@ var PdfIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6538
6628
|
]
|
|
6539
6629
|
}
|
|
6540
6630
|
);
|
|
6541
|
-
var ExcelIcon = () => /* @__PURE__ */ (0,
|
|
6631
|
+
var ExcelIcon = () => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6542
6632
|
"svg",
|
|
6543
6633
|
{
|
|
6544
6634
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6545
6635
|
viewBox: "0 0 48 48",
|
|
6546
6636
|
className: "w-10 h-10",
|
|
6547
6637
|
children: [
|
|
6548
|
-
/* @__PURE__ */ (0,
|
|
6638
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6549
6639
|
"path",
|
|
6550
6640
|
{
|
|
6551
6641
|
fill: "#169154",
|
|
6552
6642
|
d: "M29,6H15.744C14.781,6,14,6.781,14,7.744v7.259h15V6z"
|
|
6553
6643
|
}
|
|
6554
6644
|
),
|
|
6555
|
-
/* @__PURE__ */ (0,
|
|
6645
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6556
6646
|
"path",
|
|
6557
6647
|
{
|
|
6558
6648
|
fill: "#18482a",
|
|
6559
6649
|
d: "M14,33.054v7.202C14,41.219,14.781,42,15.743,42H29v-8.946H14z"
|
|
6560
6650
|
}
|
|
6561
6651
|
),
|
|
6562
|
-
/* @__PURE__ */ (0,
|
|
6563
|
-
/* @__PURE__ */ (0,
|
|
6564
|
-
/* @__PURE__ */ (0,
|
|
6565
|
-
/* @__PURE__ */ (0,
|
|
6652
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { fill: "#0c8045", d: "M14 15.003H29V24.005000000000003H14z" }),
|
|
6653
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { fill: "#17472a", d: "M14 24.005H29V33.055H14z" }),
|
|
6654
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("g", { children: [
|
|
6655
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6566
6656
|
"path",
|
|
6567
6657
|
{
|
|
6568
6658
|
fill: "#29c27f",
|
|
6569
6659
|
d: "M42.256,6H29v9.003h15V7.744C44,6.781,43.219,6,42.256,6z"
|
|
6570
6660
|
}
|
|
6571
6661
|
),
|
|
6572
|
-
/* @__PURE__ */ (0,
|
|
6662
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6573
6663
|
"path",
|
|
6574
6664
|
{
|
|
6575
6665
|
fill: "#27663f",
|
|
6576
6666
|
d: "M29,33.054V42h13.257C43.219,42,44,41.219,44,40.257v-7.202H29z"
|
|
6577
6667
|
}
|
|
6578
6668
|
),
|
|
6579
|
-
/* @__PURE__ */ (0,
|
|
6580
|
-
/* @__PURE__ */ (0,
|
|
6669
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { fill: "#19ac65", d: "M29 15.003H44V24.005000000000003H29z" }),
|
|
6670
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { fill: "#129652", d: "M29 24.005H44V33.055H29z" })
|
|
6581
6671
|
] }),
|
|
6582
|
-
/* @__PURE__ */ (0,
|
|
6672
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6583
6673
|
"path",
|
|
6584
6674
|
{
|
|
6585
6675
|
fill: "#0c7238",
|
|
6586
6676
|
d: "M22.319,34H5.681C4.753,34,4,33.247,4,32.319V15.681C4,14.753,4.753,14,5.681,14h16.638 C23.247,14,24,14.753,24,15.681v16.638C24,33.247,23.247,34,22.319,34z"
|
|
6587
6677
|
}
|
|
6588
6678
|
),
|
|
6589
|
-
/* @__PURE__ */ (0,
|
|
6679
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6590
6680
|
"path",
|
|
6591
6681
|
{
|
|
6592
6682
|
fill: "#fff",
|
|
@@ -6596,7 +6686,7 @@ var ExcelIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6596
6686
|
]
|
|
6597
6687
|
}
|
|
6598
6688
|
);
|
|
6599
|
-
var WordIcon = () => /* @__PURE__ */ (0,
|
|
6689
|
+
var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6600
6690
|
"svg",
|
|
6601
6691
|
{
|
|
6602
6692
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6604,14 +6694,14 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6604
6694
|
className: "w-10 h-10",
|
|
6605
6695
|
baseProfile: "basic",
|
|
6606
6696
|
children: [
|
|
6607
|
-
/* @__PURE__ */ (0,
|
|
6697
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6608
6698
|
"path",
|
|
6609
6699
|
{
|
|
6610
6700
|
fill: "#283593",
|
|
6611
6701
|
d: "M9,33.595l14.911-18.706L41,26v13.306C41,41.346,39.346,43,37.306,43H15.332 C11.835,43,9,40.164,9,36.667C9,36.667,9,33.595,9,33.595z"
|
|
6612
6702
|
}
|
|
6613
6703
|
),
|
|
6614
|
-
/* @__PURE__ */ (0,
|
|
6704
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6615
6705
|
"linearGradient",
|
|
6616
6706
|
{
|
|
6617
6707
|
id: "qh2LT5tehRDFkLLfb-odWa",
|
|
@@ -6622,19 +6712,19 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6622
6712
|
gradientTransform: "translate(0 -339.89)",
|
|
6623
6713
|
gradientUnits: "userSpaceOnUse",
|
|
6624
6714
|
children: [
|
|
6625
|
-
/* @__PURE__ */ (0,
|
|
6626
|
-
/* @__PURE__ */ (0,
|
|
6715
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("stop", { offset: "0", "stop-color": "#66c0ff" }),
|
|
6716
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("stop", { offset: ".26", "stop-color": "#0094f0" })
|
|
6627
6717
|
]
|
|
6628
6718
|
}
|
|
6629
6719
|
),
|
|
6630
|
-
/* @__PURE__ */ (0,
|
|
6720
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6631
6721
|
"path",
|
|
6632
6722
|
{
|
|
6633
6723
|
fill: "url(#qh2LT5tehRDFkLLfb-odWa)",
|
|
6634
6724
|
d: "M9,20.208c0-2.624,2.126-4.75,4.749-4.75h21.857L41,12.778v13.527 C41,28.346,39.346,30,37.306,30H15.332C11.835,30,9,32.836,9,36.333L9,20.208L9,20.208z"
|
|
6635
6725
|
}
|
|
6636
6726
|
),
|
|
6637
|
-
/* @__PURE__ */ (0,
|
|
6727
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6638
6728
|
"path",
|
|
6639
6729
|
{
|
|
6640
6730
|
fill: "#1e88e5",
|
|
@@ -6642,21 +6732,21 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6642
6732
|
d: "M9,20.208c0-2.624,2.126-4.75,4.749-4.75h21.857L41,12.778v13.527 C41,28.346,39.346,30,37.306,30H15.332C11.835,30,9,32.836,9,36.333L9,20.208L9,20.208z"
|
|
6643
6733
|
}
|
|
6644
6734
|
),
|
|
6645
|
-
/* @__PURE__ */ (0,
|
|
6735
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6646
6736
|
"path",
|
|
6647
6737
|
{
|
|
6648
6738
|
fill: "#00e5ff",
|
|
6649
6739
|
d: "M9,10.333C9,6.836,11.835,4,15.332,4h21.975C39.346,4,41,5.654,41,7.694v5.611 C41,15.346,39.346,17,37.306,17H15.332C11.835,17,9,19.836,9,23.333C9,23.333,9,10.333,9,10.333z"
|
|
6650
6740
|
}
|
|
6651
6741
|
),
|
|
6652
|
-
/* @__PURE__ */ (0,
|
|
6742
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6653
6743
|
"path",
|
|
6654
6744
|
{
|
|
6655
6745
|
fill: "#1565c0",
|
|
6656
6746
|
d: "M7.5,23h10c1.933,0,3.5,1.567,3.5,3.5v10c0,1.933-1.567,3.5-3.5,3.5h-10C5.567,40,4,38.433,4,36.5 v-10C4,24.567,5.567,23,7.5,23z"
|
|
6657
6747
|
}
|
|
6658
6748
|
),
|
|
6659
|
-
/* @__PURE__ */ (0,
|
|
6749
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6660
6750
|
"path",
|
|
6661
6751
|
{
|
|
6662
6752
|
fill: "#fff",
|
|
@@ -6666,42 +6756,42 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6666
6756
|
]
|
|
6667
6757
|
}
|
|
6668
6758
|
);
|
|
6669
|
-
var StandardIcon = () => /* @__PURE__ */ (0,
|
|
6759
|
+
var StandardIcon = () => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6670
6760
|
"svg",
|
|
6671
6761
|
{
|
|
6672
6762
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6673
6763
|
viewBox: "0 0 48 48",
|
|
6674
6764
|
className: "w-10 h-10",
|
|
6675
6765
|
children: [
|
|
6676
|
-
/* @__PURE__ */ (0,
|
|
6677
|
-
/* @__PURE__ */ (0,
|
|
6766
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
6767
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" })
|
|
6678
6768
|
]
|
|
6679
6769
|
}
|
|
6680
6770
|
);
|
|
6681
|
-
var PowerPointIcon = () => /* @__PURE__ */ (0,
|
|
6771
|
+
var PowerPointIcon = () => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6682
6772
|
"svg",
|
|
6683
6773
|
{
|
|
6684
6774
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6685
6775
|
viewBox: "0 0 48 48",
|
|
6686
6776
|
className: "w-10 h-10",
|
|
6687
6777
|
children: [
|
|
6688
|
-
/* @__PURE__ */ (0,
|
|
6778
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6689
6779
|
"path",
|
|
6690
6780
|
{
|
|
6691
6781
|
fill: "#dc4c2c",
|
|
6692
6782
|
d: "M8,24c0,9.941,8.059,18,18,18s18-8.059,18-18H26H8z"
|
|
6693
6783
|
}
|
|
6694
6784
|
),
|
|
6695
|
-
/* @__PURE__ */ (0,
|
|
6696
|
-
/* @__PURE__ */ (0,
|
|
6697
|
-
/* @__PURE__ */ (0,
|
|
6785
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { fill: "#f7a278", d: "M26,6v18h18C44,14.059,35.941,6,26,6z" }),
|
|
6786
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { fill: "#c06346", d: "M26,6C16.059,6,8,14.059,8,24h18V6z" }),
|
|
6787
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6698
6788
|
"path",
|
|
6699
6789
|
{
|
|
6700
6790
|
fill: "#9b341f",
|
|
6701
6791
|
d: "M22.319,34H5.681C4.753,34,4,33.247,4,32.319V15.681C4,14.753,4.753,14,5.681,14h16.638 C23.247,14,24,14.753,24,15.681v16.638C24,33.247,23.247,34,22.319,34z"
|
|
6702
6792
|
}
|
|
6703
6793
|
),
|
|
6704
|
-
/* @__PURE__ */ (0,
|
|
6794
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6705
6795
|
"path",
|
|
6706
6796
|
{
|
|
6707
6797
|
fill: "#fff",
|
|
@@ -6711,16 +6801,16 @@ var PowerPointIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6711
6801
|
]
|
|
6712
6802
|
}
|
|
6713
6803
|
);
|
|
6714
|
-
var TextIcon = () => /* @__PURE__ */ (0,
|
|
6804
|
+
var TextIcon = () => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6715
6805
|
"svg",
|
|
6716
6806
|
{
|
|
6717
6807
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6718
6808
|
viewBox: "0 0 48 48",
|
|
6719
6809
|
className: "w-10 h-10",
|
|
6720
6810
|
children: [
|
|
6721
|
-
/* @__PURE__ */ (0,
|
|
6722
|
-
/* @__PURE__ */ (0,
|
|
6723
|
-
/* @__PURE__ */ (0,
|
|
6811
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
6812
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" }),
|
|
6813
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6724
6814
|
"path",
|
|
6725
6815
|
{
|
|
6726
6816
|
fill: "#1976D2",
|
|
@@ -6730,7 +6820,7 @@ var TextIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6730
6820
|
]
|
|
6731
6821
|
}
|
|
6732
6822
|
);
|
|
6733
|
-
var ArchiveIcon = () => /* @__PURE__ */ (0,
|
|
6823
|
+
var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6734
6824
|
"svg",
|
|
6735
6825
|
{
|
|
6736
6826
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6740,14 +6830,14 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6740
6830
|
version: "1.0",
|
|
6741
6831
|
className: "w-10 h-10",
|
|
6742
6832
|
children: [
|
|
6743
|
-
/* @__PURE__ */ (0,
|
|
6833
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("clipPath", { id: "273d29c8a6", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6744
6834
|
"path",
|
|
6745
6835
|
{
|
|
6746
6836
|
d: "M 8.90625 0 L 65.90625 0 L 65.90625 75 L 8.90625 75 Z M 8.90625 0 ",
|
|
6747
6837
|
"clip-rule": "nonzero"
|
|
6748
6838
|
}
|
|
6749
6839
|
) }) }),
|
|
6750
|
-
/* @__PURE__ */ (0,
|
|
6840
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("g", { "clip-path": "url(#273d29c8a6)", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6751
6841
|
"path",
|
|
6752
6842
|
{
|
|
6753
6843
|
fill: "#ff9100",
|
|
@@ -6756,7 +6846,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6756
6846
|
"fill-rule": "nonzero"
|
|
6757
6847
|
}
|
|
6758
6848
|
) }),
|
|
6759
|
-
/* @__PURE__ */ (0,
|
|
6849
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6760
6850
|
"path",
|
|
6761
6851
|
{
|
|
6762
6852
|
fill: "#fbe9e7",
|
|
@@ -6765,7 +6855,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6765
6855
|
"fill-rule": "nonzero"
|
|
6766
6856
|
}
|
|
6767
6857
|
),
|
|
6768
|
-
/* @__PURE__ */ (0,
|
|
6858
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6769
6859
|
"path",
|
|
6770
6860
|
{
|
|
6771
6861
|
fill: "#ffe0b2",
|
|
@@ -6774,7 +6864,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6774
6864
|
"fill-rule": "nonzero"
|
|
6775
6865
|
}
|
|
6776
6866
|
),
|
|
6777
|
-
/* @__PURE__ */ (0,
|
|
6867
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6778
6868
|
"path",
|
|
6779
6869
|
{
|
|
6780
6870
|
fill: "#ffe0b2",
|
|
@@ -6783,7 +6873,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6783
6873
|
"fill-rule": "nonzero"
|
|
6784
6874
|
}
|
|
6785
6875
|
),
|
|
6786
|
-
/* @__PURE__ */ (0,
|
|
6876
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6787
6877
|
"path",
|
|
6788
6878
|
{
|
|
6789
6879
|
fill: "#ffe0b2",
|
|
@@ -6859,8 +6949,8 @@ var DocumentNode = (props) => {
|
|
|
6859
6949
|
}
|
|
6860
6950
|
}
|
|
6861
6951
|
if (documents.length === 0) {
|
|
6862
|
-
return /* @__PURE__ */ (0,
|
|
6863
|
-
/* @__PURE__ */ (0,
|
|
6952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_jsx_runtime74.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "py-4 px-2 bg-neutral-weak border rounded text-center flex flex-col gap-2", children: [
|
|
6953
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "mx-auto w-10 h-10 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6864
6954
|
"svg",
|
|
6865
6955
|
{
|
|
6866
6956
|
className: "w-5 h-5",
|
|
@@ -6868,7 +6958,7 @@ var DocumentNode = (props) => {
|
|
|
6868
6958
|
stroke: "currentColor",
|
|
6869
6959
|
viewBox: "0 0 24 24",
|
|
6870
6960
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6871
|
-
children: /* @__PURE__ */ (0,
|
|
6961
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6872
6962
|
"path",
|
|
6873
6963
|
{
|
|
6874
6964
|
strokeLinecap: "round",
|
|
@@ -6879,11 +6969,11 @@ var DocumentNode = (props) => {
|
|
|
6879
6969
|
)
|
|
6880
6970
|
}
|
|
6881
6971
|
) }),
|
|
6882
|
-
/* @__PURE__ */ (0,
|
|
6883
|
-
/* @__PURE__ */ (0,
|
|
6972
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "text-sm font-medium", children: "No documents found" }),
|
|
6973
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "text-xs", children: "No records found. Data may be empty or not available at the moment." })
|
|
6884
6974
|
] }) });
|
|
6885
6975
|
}
|
|
6886
|
-
return /* @__PURE__ */ (0,
|
|
6976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "", children: documents.map((doc, index) => {
|
|
6887
6977
|
const documentUrl = AssetUtility_default.resolveUrl(
|
|
6888
6978
|
props.assetBaseUrl,
|
|
6889
6979
|
doc.assetUrl
|
|
@@ -6901,16 +6991,16 @@ var DocumentNode = (props) => {
|
|
|
6901
6991
|
}
|
|
6902
6992
|
}
|
|
6903
6993
|
const { Icon: Icon2, extLabel } = getFileDetails(documentUrl);
|
|
6904
|
-
return /* @__PURE__ */ (0,
|
|
6994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6905
6995
|
"div",
|
|
6906
6996
|
{
|
|
6907
6997
|
className: `flex items-center justify-between py-4 bg-default gap-4 ${index !== 0 ? "border-t" : ""}`,
|
|
6908
6998
|
children: [
|
|
6909
|
-
/* @__PURE__ */ (0,
|
|
6910
|
-
/* @__PURE__ */ (0,
|
|
6911
|
-
/* @__PURE__ */ (0,
|
|
6999
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex items-center space-x-4", children: [
|
|
7000
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "flex items-center justify-center p-2 rounded bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Icon2, {}) }),
|
|
7001
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "flex items-baseline space-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("h4", { className: "text-base font-semibold", children: documentTitle }) })
|
|
6912
7002
|
] }),
|
|
6913
|
-
/* @__PURE__ */ (0,
|
|
7003
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6914
7004
|
"a",
|
|
6915
7005
|
{
|
|
6916
7006
|
href: documentUrl,
|
|
@@ -6918,7 +7008,7 @@ var DocumentNode = (props) => {
|
|
|
6918
7008
|
rel: "noopener noreferrer",
|
|
6919
7009
|
className: "inline-flex items-center px-4 py-2 text-sm font-medium bg-default border rounded focus:outline-none focus:ring-2 focus:ring-offset-2 transition-colors",
|
|
6920
7010
|
children: [
|
|
6921
|
-
/* @__PURE__ */ (0,
|
|
7011
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6922
7012
|
"svg",
|
|
6923
7013
|
{
|
|
6924
7014
|
className: "w-4 h-4 mr-2",
|
|
@@ -6926,7 +7016,7 @@ var DocumentNode = (props) => {
|
|
|
6926
7016
|
stroke: "currentColor",
|
|
6927
7017
|
viewBox: "0 0 24 24",
|
|
6928
7018
|
children: [
|
|
6929
|
-
/* @__PURE__ */ (0,
|
|
7019
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6930
7020
|
"path",
|
|
6931
7021
|
{
|
|
6932
7022
|
strokeLinecap: "round",
|
|
@@ -6935,7 +7025,7 @@ var DocumentNode = (props) => {
|
|
|
6935
7025
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
|
6936
7026
|
}
|
|
6937
7027
|
),
|
|
6938
|
-
/* @__PURE__ */ (0,
|
|
7028
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6939
7029
|
"path",
|
|
6940
7030
|
{
|
|
6941
7031
|
strokeLinecap: "round",
|
|
@@ -6960,9 +7050,9 @@ var DocumentNode = (props) => {
|
|
|
6960
7050
|
var DocumentNode_default = DocumentNode;
|
|
6961
7051
|
|
|
6962
7052
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
6963
|
-
var
|
|
6964
|
-
var Pagination2 = (0,
|
|
6965
|
-
var Slider2 = (0,
|
|
7053
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
7054
|
+
var Pagination2 = (0, import_dynamic11.default)(() => Promise.resolve().then(() => (init_Pagination(), Pagination_exports)), { ssr: true });
|
|
7055
|
+
var Slider2 = (0, import_dynamic11.default)(() => Promise.resolve().then(() => (init_Slider(), Slider_exports)), {
|
|
6966
7056
|
ssr: false
|
|
6967
7057
|
});
|
|
6968
7058
|
function toCamelCase(str) {
|
|
@@ -7215,7 +7305,7 @@ var DivContainer = async (props) => {
|
|
|
7215
7305
|
response = await serviceClient.get(endpoint);
|
|
7216
7306
|
result = response?.result;
|
|
7217
7307
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
7218
|
-
return /* @__PURE__ */ (0,
|
|
7308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(NoDataFound_default, {});
|
|
7219
7309
|
}
|
|
7220
7310
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
7221
7311
|
childCollectionData = getNestedValue6(
|
|
@@ -7235,7 +7325,7 @@ var DivContainer = async (props) => {
|
|
|
7235
7325
|
}
|
|
7236
7326
|
const SelectedNode = NodeTypes2[node.type];
|
|
7237
7327
|
if (!SelectedNode) return null;
|
|
7238
|
-
return /* @__PURE__ */ (0,
|
|
7328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react56.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7239
7329
|
SelectedNode,
|
|
7240
7330
|
{
|
|
7241
7331
|
node,
|
|
@@ -7368,14 +7458,14 @@ var DivContainer = async (props) => {
|
|
|
7368
7458
|
noLinkColor && "no-link-color",
|
|
7369
7459
|
!!props.node.enterAnimation && "enter-animation"
|
|
7370
7460
|
].filter(Boolean).join(" ");
|
|
7371
|
-
return /* @__PURE__ */ (0,
|
|
7372
|
-
/* @__PURE__ */ (0,
|
|
7461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_react56.default.Fragment, { children: [
|
|
7462
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7373
7463
|
"style",
|
|
7374
7464
|
{
|
|
7375
7465
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
7376
7466
|
}
|
|
7377
7467
|
),
|
|
7378
|
-
/* @__PURE__ */ (0,
|
|
7468
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7379
7469
|
Wrapper,
|
|
7380
7470
|
{
|
|
7381
7471
|
id: guid,
|
|
@@ -7389,11 +7479,11 @@ var DivContainer = async (props) => {
|
|
|
7389
7479
|
item,
|
|
7390
7480
|
idx,
|
|
7391
7481
|
props.href ? void 0 : item?.links?.view
|
|
7392
|
-
)?.map((child, i) => /* @__PURE__ */ (0,
|
|
7482
|
+
)?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react56.default.Fragment, { children: child }, i)) : renderChildren(props.node.children, props, item, idx)
|
|
7393
7483
|
)
|
|
7394
7484
|
}
|
|
7395
7485
|
),
|
|
7396
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0,
|
|
7486
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7397
7487
|
Pagination2,
|
|
7398
7488
|
{
|
|
7399
7489
|
path: props.path,
|
|
@@ -7406,7 +7496,7 @@ var DivContainer = async (props) => {
|
|
|
7406
7496
|
var DivContainer_default = DivContainer;
|
|
7407
7497
|
|
|
7408
7498
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
7409
|
-
var
|
|
7499
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
7410
7500
|
var NodeTypes = {
|
|
7411
7501
|
["paragraph"]: ParagraphNode_default,
|
|
7412
7502
|
["heading"]: HeadingNode_default,
|
|
@@ -7443,14 +7533,14 @@ var PageBodyRenderer = (props) => {
|
|
|
7443
7533
|
}
|
|
7444
7534
|
return true;
|
|
7445
7535
|
};
|
|
7446
|
-
return /* @__PURE__ */ (0,
|
|
7536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react57.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
7447
7537
|
{
|
|
7448
7538
|
}
|
|
7449
7539
|
const SelectedNode = NodeTypes[node.type];
|
|
7450
7540
|
if (!shouldRenderNode(node)) {
|
|
7451
7541
|
return null;
|
|
7452
7542
|
}
|
|
7453
|
-
return /* @__PURE__ */ (0,
|
|
7543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react57.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react57.default.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react57.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7454
7544
|
SelectedNode,
|
|
7455
7545
|
{
|
|
7456
7546
|
node,
|
|
@@ -7466,7 +7556,7 @@ var PageBodyRenderer = (props) => {
|
|
|
7466
7556
|
device: props.device,
|
|
7467
7557
|
widgetRenderer: props.widgetRenderer
|
|
7468
7558
|
}
|
|
7469
|
-
) }) : /* @__PURE__ */ (0,
|
|
7559
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react57.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7470
7560
|
SelectedNode,
|
|
7471
7561
|
{
|
|
7472
7562
|
node,
|
|
@@ -7487,10 +7577,10 @@ var PageBodyRenderer = (props) => {
|
|
|
7487
7577
|
var PageBodyRenderer_default = PageBodyRenderer;
|
|
7488
7578
|
|
|
7489
7579
|
// src/components/pageRenderingEngine/EnterAnimationHydrator.tsx
|
|
7490
|
-
var
|
|
7580
|
+
var import_react58 = require("react");
|
|
7491
7581
|
var ENTER_ANIMATION_SELECTOR = ".enter-animation";
|
|
7492
7582
|
function EnterAnimationHydrator() {
|
|
7493
|
-
(0,
|
|
7583
|
+
(0, import_react58.useEffect)(() => {
|
|
7494
7584
|
let observer;
|
|
7495
7585
|
const observedElements = /* @__PURE__ */ new WeakSet();
|
|
7496
7586
|
const revealAnimatedElements = () => {
|
|
@@ -7535,22 +7625,22 @@ function EnterAnimationHydrator() {
|
|
|
7535
7625
|
}
|
|
7536
7626
|
|
|
7537
7627
|
// src/components/Toast.tsx
|
|
7538
|
-
var
|
|
7628
|
+
var import_react59 = require("react");
|
|
7539
7629
|
init_ToastService();
|
|
7540
|
-
var
|
|
7630
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
7541
7631
|
var Toast = () => {
|
|
7542
|
-
const [showToast, setShowToast] = (0,
|
|
7543
|
-
const [message, setMessage] = (0,
|
|
7544
|
-
const [messageType, setMessageType] = (0,
|
|
7545
|
-
const timeoutRef = (0,
|
|
7546
|
-
const closeToast = (0,
|
|
7632
|
+
const [showToast, setShowToast] = (0, import_react59.useState)(false);
|
|
7633
|
+
const [message, setMessage] = (0, import_react59.useState)("");
|
|
7634
|
+
const [messageType, setMessageType] = (0, import_react59.useState)("error");
|
|
7635
|
+
const timeoutRef = (0, import_react59.useRef)(null);
|
|
7636
|
+
const closeToast = (0, import_react59.useCallback)(() => {
|
|
7547
7637
|
if (timeoutRef.current) {
|
|
7548
7638
|
clearTimeout(timeoutRef.current);
|
|
7549
7639
|
timeoutRef.current = null;
|
|
7550
7640
|
}
|
|
7551
7641
|
setShowToast(false);
|
|
7552
7642
|
}, []);
|
|
7553
|
-
const showMessage = (0,
|
|
7643
|
+
const showMessage = (0, import_react59.useCallback)((message2, messageType2) => {
|
|
7554
7644
|
if (timeoutRef.current) {
|
|
7555
7645
|
clearTimeout(timeoutRef.current);
|
|
7556
7646
|
}
|
|
@@ -7562,7 +7652,7 @@ var Toast = () => {
|
|
|
7562
7652
|
timeoutRef.current = null;
|
|
7563
7653
|
}, 4e3);
|
|
7564
7654
|
}, []);
|
|
7565
|
-
(0,
|
|
7655
|
+
(0, import_react59.useEffect)(() => {
|
|
7566
7656
|
ToastService_default.initialize(showMessage, closeToast);
|
|
7567
7657
|
return () => {
|
|
7568
7658
|
closeToast();
|
|
@@ -7571,8 +7661,8 @@ var Toast = () => {
|
|
|
7571
7661
|
});
|
|
7572
7662
|
};
|
|
7573
7663
|
}, [closeToast, showMessage]);
|
|
7574
|
-
return /* @__PURE__ */ (0,
|
|
7575
|
-
/* @__PURE__ */ (0,
|
|
7664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_jsx_runtime79.Fragment, { children: showToast && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "fixed top-2 flex justify-center w-1/2 max-w-xl left-1/2 -translate-x-1/2", style: { zIndex: 1e3 }, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
7665
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7576
7666
|
"span",
|
|
7577
7667
|
{
|
|
7578
7668
|
className: "font-medium text-inherit text-sm",
|
|
@@ -7580,7 +7670,7 @@ var Toast = () => {
|
|
|
7580
7670
|
children: message
|
|
7581
7671
|
}
|
|
7582
7672
|
),
|
|
7583
|
-
/* @__PURE__ */ (0,
|
|
7673
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7584
7674
|
"svg",
|
|
7585
7675
|
{
|
|
7586
7676
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -7588,7 +7678,7 @@ var Toast = () => {
|
|
|
7588
7678
|
fill: "none",
|
|
7589
7679
|
viewBox: "0 0 24 24",
|
|
7590
7680
|
stroke: "currentColor",
|
|
7591
|
-
children: /* @__PURE__ */ (0,
|
|
7681
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
7592
7682
|
}
|
|
7593
7683
|
) })
|
|
7594
7684
|
] }) }) });
|
|
@@ -7619,7 +7709,7 @@ init_Switcher();
|
|
|
7619
7709
|
// src/components/NavigationTabsV2.tsx
|
|
7620
7710
|
var import_link3 = __toESM(require("next/link"));
|
|
7621
7711
|
var import_navigation = require("next/navigation");
|
|
7622
|
-
var
|
|
7712
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
7623
7713
|
function resolveRoutePlaceholders(route, params) {
|
|
7624
7714
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
7625
7715
|
const value = params[key];
|
|
@@ -7644,8 +7734,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
7644
7734
|
isActive: tab.isActive
|
|
7645
7735
|
})) || [];
|
|
7646
7736
|
if (mappedTabs.length === 0) return null;
|
|
7647
|
-
return /* @__PURE__ */ (0,
|
|
7648
|
-
return /* @__PURE__ */ (0,
|
|
7737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
7738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_link3.default, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7649
7739
|
"div",
|
|
7650
7740
|
{
|
|
7651
7741
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -7658,14 +7748,14 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
7658
7748
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
7659
7749
|
|
|
7660
7750
|
// src/components/dataForm/DataList.tsx
|
|
7661
|
-
var
|
|
7751
|
+
var import_react62 = __toESM(require("react"));
|
|
7662
7752
|
var import_navigation2 = require("next/navigation");
|
|
7663
7753
|
|
|
7664
7754
|
// src/components/dataForm/NoContentView.tsx
|
|
7665
|
-
var
|
|
7666
|
-
var
|
|
7755
|
+
var import_react60 = __toESM(require("react"));
|
|
7756
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
7667
7757
|
var NoContentView = (props) => {
|
|
7668
|
-
return /* @__PURE__ */ (0,
|
|
7758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react60.default.Fragment, { children: props.isDataFound === false && props.children });
|
|
7669
7759
|
};
|
|
7670
7760
|
var NoContentView_default = NoContentView;
|
|
7671
7761
|
|
|
@@ -7673,39 +7763,39 @@ var NoContentView_default = NoContentView;
|
|
|
7673
7763
|
init_InputControlType();
|
|
7674
7764
|
|
|
7675
7765
|
// src/components/dataForm/ContentView.tsx
|
|
7676
|
-
var
|
|
7677
|
-
var
|
|
7766
|
+
var import_react61 = __toESM(require("react"));
|
|
7767
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
7678
7768
|
var ContentView = (props) => {
|
|
7679
|
-
return /* @__PURE__ */ (0,
|
|
7680
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
7681
|
-
/* @__PURE__ */ (0,
|
|
7682
|
-
/* @__PURE__ */ (0,
|
|
7683
|
-
/* @__PURE__ */ (0,
|
|
7684
|
-
/* @__PURE__ */ (0,
|
|
7685
|
-
/* @__PURE__ */ (0,
|
|
7769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_react61.default.Fragment, { children: [
|
|
7770
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
7771
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
7772
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
7773
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ml-2", children: [
|
|
7774
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
7775
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
7686
7776
|
] })
|
|
7687
7777
|
] }),
|
|
7688
|
-
/* @__PURE__ */ (0,
|
|
7689
|
-
/* @__PURE__ */ (0,
|
|
7690
|
-
/* @__PURE__ */ (0,
|
|
7691
|
-
/* @__PURE__ */ (0,
|
|
7692
|
-
/* @__PURE__ */ (0,
|
|
7693
|
-
/* @__PURE__ */ (0,
|
|
7694
|
-
/* @__PURE__ */ (0,
|
|
7778
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
7779
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "animate-pulse", children: [
|
|
7780
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
7781
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
7782
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
7783
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
7784
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
7695
7785
|
] }),
|
|
7696
|
-
/* @__PURE__ */ (0,
|
|
7697
|
-
/* @__PURE__ */ (0,
|
|
7698
|
-
/* @__PURE__ */ (0,
|
|
7699
|
-
/* @__PURE__ */ (0,
|
|
7700
|
-
/* @__PURE__ */ (0,
|
|
7701
|
-
/* @__PURE__ */ (0,
|
|
7786
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "animate-pulse", children: [
|
|
7787
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
7788
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
7789
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
7790
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
7791
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
7702
7792
|
] }),
|
|
7703
|
-
/* @__PURE__ */ (0,
|
|
7704
|
-
/* @__PURE__ */ (0,
|
|
7705
|
-
/* @__PURE__ */ (0,
|
|
7706
|
-
/* @__PURE__ */ (0,
|
|
7707
|
-
/* @__PURE__ */ (0,
|
|
7708
|
-
/* @__PURE__ */ (0,
|
|
7793
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "animate-pulse", children: [
|
|
7794
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
7795
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
7796
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
7797
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
7798
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
7709
7799
|
] })
|
|
7710
7800
|
] })
|
|
7711
7801
|
] }) }),
|
|
@@ -7765,7 +7855,7 @@ function FormReducer(state, action) {
|
|
|
7765
7855
|
var FormReducer_default = FormReducer;
|
|
7766
7856
|
|
|
7767
7857
|
// src/components/dataForm/DataList.tsx
|
|
7768
|
-
var
|
|
7858
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
7769
7859
|
var DataList = (props) => {
|
|
7770
7860
|
const router = (0, import_navigation2.useRouter)();
|
|
7771
7861
|
let builder = new OdataBuilder(props.path);
|
|
@@ -7773,9 +7863,9 @@ var DataList = (props) => {
|
|
|
7773
7863
|
let activePageNumber = 0;
|
|
7774
7864
|
let pages = 0;
|
|
7775
7865
|
console.log(props.addLinkText);
|
|
7776
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
7777
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
7778
|
-
(0,
|
|
7866
|
+
const [isDataFound, setIsDataFound] = (0, import_react62.useState)(null);
|
|
7867
|
+
const [searchTerm, setSearchTerm] = (0, import_react62.useState)(props.query?.searchTerm ?? "");
|
|
7868
|
+
(0, import_react62.useEffect)(() => {
|
|
7779
7869
|
if (props?.dataset) {
|
|
7780
7870
|
if (props?.dataset.result && props.dataset.result.length > 0) {
|
|
7781
7871
|
setIsDataFound(true);
|
|
@@ -7784,7 +7874,7 @@ var DataList = (props) => {
|
|
|
7784
7874
|
}
|
|
7785
7875
|
}
|
|
7786
7876
|
}, [props.dataset]);
|
|
7787
|
-
(0,
|
|
7877
|
+
(0, import_react62.useEffect)(() => {
|
|
7788
7878
|
if (!props.query?.["$filter"] || !props.filters) return;
|
|
7789
7879
|
const filterQuery = props.query["$filter"];
|
|
7790
7880
|
props.filters.forEach((filter) => {
|
|
@@ -7803,7 +7893,7 @@ var DataList = (props) => {
|
|
|
7803
7893
|
if (path.includes(".")) {
|
|
7804
7894
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
7805
7895
|
} else if (Array.isArray(obj[path])) {
|
|
7806
|
-
return obj[path].map((item, index) => /* @__PURE__ */ (0,
|
|
7896
|
+
return obj[path].map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { children: item }, index));
|
|
7807
7897
|
} else {
|
|
7808
7898
|
return obj[path];
|
|
7809
7899
|
}
|
|
@@ -7812,11 +7902,11 @@ var DataList = (props) => {
|
|
|
7812
7902
|
inputValues: {},
|
|
7813
7903
|
lastPropertyChanged: ""
|
|
7814
7904
|
};
|
|
7815
|
-
const [formState, dispatch] = (0,
|
|
7905
|
+
const [formState, dispatch] = (0, import_react62.useReducer)(FormReducer_default, initialState);
|
|
7816
7906
|
const getSearchableColumns = () => {
|
|
7817
7907
|
return props.columns?.filter((c) => c.isSearchable)?.map((c) => c.name)?.join(",");
|
|
7818
7908
|
};
|
|
7819
|
-
const handleFilterChange = (0,
|
|
7909
|
+
const handleFilterChange = (0, import_react62.useCallback)(
|
|
7820
7910
|
(updatedValues) => {
|
|
7821
7911
|
dispatch({
|
|
7822
7912
|
type: FORM_INPUT_UPDATE,
|
|
@@ -7847,7 +7937,7 @@ var DataList = (props) => {
|
|
|
7847
7937
|
},
|
|
7848
7938
|
[dispatch, props, router]
|
|
7849
7939
|
);
|
|
7850
|
-
(0,
|
|
7940
|
+
(0, import_react62.useEffect)(() => {
|
|
7851
7941
|
if (!props.columns.some((col) => col.isSearchable)) {
|
|
7852
7942
|
return;
|
|
7853
7943
|
}
|
|
@@ -7882,30 +7972,30 @@ var DataList = (props) => {
|
|
|
7882
7972
|
const renderPageNumbers = () => {
|
|
7883
7973
|
if (pages <= 10) {
|
|
7884
7974
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
7885
|
-
(page) => /* @__PURE__ */ (0,
|
|
7975
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_react62.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
7886
7976
|
Hyperlink,
|
|
7887
7977
|
{
|
|
7888
7978
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7889
7979
|
href: builder.getNewPageUrl(page),
|
|
7890
7980
|
children: page
|
|
7891
7981
|
}
|
|
7892
|
-
) : /* @__PURE__ */ (0,
|
|
7982
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
7893
7983
|
);
|
|
7894
7984
|
} else {
|
|
7895
7985
|
const showFirstPages = activePageNumber <= 5;
|
|
7896
7986
|
const showLastPages = activePageNumber > pages - 5;
|
|
7897
7987
|
if (showFirstPages) {
|
|
7898
|
-
return /* @__PURE__ */ (0,
|
|
7899
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0,
|
|
7988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
|
|
7989
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_react62.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
7900
7990
|
Hyperlink,
|
|
7901
7991
|
{
|
|
7902
7992
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7903
7993
|
href: builder.getNewPageUrl(page),
|
|
7904
7994
|
children: page
|
|
7905
7995
|
}
|
|
7906
|
-
) : /* @__PURE__ */ (0,
|
|
7907
|
-
/* @__PURE__ */ (0,
|
|
7908
|
-
/* @__PURE__ */ (0,
|
|
7996
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
7997
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7998
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
7909
7999
|
Hyperlink,
|
|
7910
8000
|
{
|
|
7911
8001
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7913,7 +8003,7 @@ var DataList = (props) => {
|
|
|
7913
8003
|
children: pages - 1
|
|
7914
8004
|
}
|
|
7915
8005
|
),
|
|
7916
|
-
/* @__PURE__ */ (0,
|
|
8006
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
7917
8007
|
Hyperlink,
|
|
7918
8008
|
{
|
|
7919
8009
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7921,7 +8011,7 @@ var DataList = (props) => {
|
|
|
7921
8011
|
children: pages
|
|
7922
8012
|
}
|
|
7923
8013
|
),
|
|
7924
|
-
/* @__PURE__ */ (0,
|
|
8014
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
7925
8015
|
"select",
|
|
7926
8016
|
{
|
|
7927
8017
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -7933,18 +8023,18 @@ var DataList = (props) => {
|
|
|
7933
8023
|
}
|
|
7934
8024
|
},
|
|
7935
8025
|
children: [
|
|
7936
|
-
/* @__PURE__ */ (0,
|
|
8026
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("option", { className: "", value: "", children: "Jump to" }),
|
|
7937
8027
|
Array.from(
|
|
7938
8028
|
{ length: Math.max(0, pages - 10) },
|
|
7939
8029
|
(_, index) => index + 9
|
|
7940
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
8030
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("option", { value: page, children: page }, page))
|
|
7941
8031
|
]
|
|
7942
8032
|
}
|
|
7943
8033
|
) })
|
|
7944
8034
|
] });
|
|
7945
8035
|
} else if (showLastPages) {
|
|
7946
|
-
return /* @__PURE__ */ (0,
|
|
7947
|
-
/* @__PURE__ */ (0,
|
|
8036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
|
|
8037
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
7948
8038
|
Hyperlink,
|
|
7949
8039
|
{
|
|
7950
8040
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7952,7 +8042,7 @@ var DataList = (props) => {
|
|
|
7952
8042
|
children: "1"
|
|
7953
8043
|
}
|
|
7954
8044
|
),
|
|
7955
|
-
/* @__PURE__ */ (0,
|
|
8045
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
7956
8046
|
Hyperlink,
|
|
7957
8047
|
{
|
|
7958
8048
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7960,21 +8050,21 @@ var DataList = (props) => {
|
|
|
7960
8050
|
children: "2"
|
|
7961
8051
|
}
|
|
7962
8052
|
),
|
|
7963
|
-
/* @__PURE__ */ (0,
|
|
8053
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7964
8054
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
7965
|
-
(page) => /* @__PURE__ */ (0,
|
|
8055
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_react62.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
7966
8056
|
Hyperlink,
|
|
7967
8057
|
{
|
|
7968
8058
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7969
8059
|
href: builder.getNewPageUrl(page),
|
|
7970
8060
|
children: page
|
|
7971
8061
|
}
|
|
7972
|
-
) : /* @__PURE__ */ (0,
|
|
8062
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
7973
8063
|
)
|
|
7974
8064
|
] });
|
|
7975
8065
|
} else {
|
|
7976
|
-
return /* @__PURE__ */ (0,
|
|
7977
|
-
/* @__PURE__ */ (0,
|
|
8066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
|
|
8067
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
7978
8068
|
Hyperlink,
|
|
7979
8069
|
{
|
|
7980
8070
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7982,7 +8072,7 @@ var DataList = (props) => {
|
|
|
7982
8072
|
children: "1"
|
|
7983
8073
|
}
|
|
7984
8074
|
),
|
|
7985
|
-
/* @__PURE__ */ (0,
|
|
8075
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
7986
8076
|
Hyperlink,
|
|
7987
8077
|
{
|
|
7988
8078
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7990,20 +8080,20 @@ var DataList = (props) => {
|
|
|
7990
8080
|
children: "2"
|
|
7991
8081
|
}
|
|
7992
8082
|
),
|
|
7993
|
-
/* @__PURE__ */ (0,
|
|
8083
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7994
8084
|
Array.from(
|
|
7995
8085
|
{ length: 5 },
|
|
7996
8086
|
(_, index) => activePageNumber - 2 + index
|
|
7997
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
8087
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_react62.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
7998
8088
|
Hyperlink,
|
|
7999
8089
|
{
|
|
8000
8090
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
8001
8091
|
href: builder.getNewPageUrl(page),
|
|
8002
8092
|
children: page
|
|
8003
8093
|
}
|
|
8004
|
-
) : /* @__PURE__ */ (0,
|
|
8005
|
-
/* @__PURE__ */ (0,
|
|
8006
|
-
/* @__PURE__ */ (0,
|
|
8094
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
8095
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
8096
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8007
8097
|
Hyperlink,
|
|
8008
8098
|
{
|
|
8009
8099
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -8011,7 +8101,7 @@ var DataList = (props) => {
|
|
|
8011
8101
|
children: pages - 1
|
|
8012
8102
|
}
|
|
8013
8103
|
),
|
|
8014
|
-
/* @__PURE__ */ (0,
|
|
8104
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8015
8105
|
Hyperlink,
|
|
8016
8106
|
{
|
|
8017
8107
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -8019,7 +8109,7 @@ var DataList = (props) => {
|
|
|
8019
8109
|
children: pages
|
|
8020
8110
|
}
|
|
8021
8111
|
),
|
|
8022
|
-
/* @__PURE__ */ (0,
|
|
8112
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
8023
8113
|
"select",
|
|
8024
8114
|
{
|
|
8025
8115
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -8031,8 +8121,8 @@ var DataList = (props) => {
|
|
|
8031
8121
|
}
|
|
8032
8122
|
},
|
|
8033
8123
|
children: [
|
|
8034
|
-
/* @__PURE__ */ (0,
|
|
8035
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0,
|
|
8124
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("option", { value: "", children: "Jump to" }),
|
|
8125
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("option", { value: page, children: page }, page))
|
|
8036
8126
|
]
|
|
8037
8127
|
}
|
|
8038
8128
|
) })
|
|
@@ -8040,16 +8130,16 @@ var DataList = (props) => {
|
|
|
8040
8130
|
}
|
|
8041
8131
|
}
|
|
8042
8132
|
};
|
|
8043
|
-
return /* @__PURE__ */ (0,
|
|
8044
|
-
/* @__PURE__ */ (0,
|
|
8045
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
8133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_react62.default.Fragment, { children: [
|
|
8134
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(ContentView_default, { isDataFound, children: [
|
|
8135
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
8046
8136
|
"div",
|
|
8047
8137
|
{
|
|
8048
8138
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md sticky top-0`,
|
|
8049
8139
|
children: [
|
|
8050
|
-
props.title ? /* @__PURE__ */ (0,
|
|
8051
|
-
/* @__PURE__ */ (0,
|
|
8052
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
8140
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", {}),
|
|
8141
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
8142
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8053
8143
|
InputControl_default,
|
|
8054
8144
|
{
|
|
8055
8145
|
name: "Search_input",
|
|
@@ -8061,7 +8151,7 @@ var DataList = (props) => {
|
|
|
8061
8151
|
}
|
|
8062
8152
|
}
|
|
8063
8153
|
),
|
|
8064
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
8154
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8065
8155
|
InputControl_default,
|
|
8066
8156
|
{
|
|
8067
8157
|
name: filter.name,
|
|
@@ -8076,15 +8166,15 @@ var DataList = (props) => {
|
|
|
8076
8166
|
},
|
|
8077
8167
|
filter.name
|
|
8078
8168
|
)),
|
|
8079
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
8169
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
8080
8170
|
Hyperlink,
|
|
8081
8171
|
{
|
|
8082
8172
|
className: "gap-1",
|
|
8083
8173
|
linkType: "Primary" /* Solid */,
|
|
8084
8174
|
href: props.addLinkHref,
|
|
8085
8175
|
children: [
|
|
8086
|
-
/* @__PURE__ */ (0,
|
|
8087
|
-
/* @__PURE__ */ (0,
|
|
8176
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
8177
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
8088
8178
|
]
|
|
8089
8179
|
}
|
|
8090
8180
|
)
|
|
@@ -8092,8 +8182,8 @@ var DataList = (props) => {
|
|
|
8092
8182
|
]
|
|
8093
8183
|
}
|
|
8094
8184
|
),
|
|
8095
|
-
/* @__PURE__ */ (0,
|
|
8096
|
-
/* @__PURE__ */ (0,
|
|
8185
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
8186
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
8097
8187
|
let url = builder.getNewOrderByUrl(column.name);
|
|
8098
8188
|
let icon = "chevronUpDown";
|
|
8099
8189
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -8103,18 +8193,18 @@ var DataList = (props) => {
|
|
|
8103
8193
|
icon = "chevronUp";
|
|
8104
8194
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
8105
8195
|
}
|
|
8106
|
-
return /* @__PURE__ */ (0,
|
|
8196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8107
8197
|
"th",
|
|
8108
8198
|
{
|
|
8109
8199
|
className: "px-6 py-3 text-left font-medium bg-neutral-soft " + (column.enableSorting ? "cursor-pointer " : "") + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
8110
|
-
children: /* @__PURE__ */ (0,
|
|
8200
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8111
8201
|
Hyperlink,
|
|
8112
8202
|
{
|
|
8113
8203
|
href: column.enableSorting ? url : void 0,
|
|
8114
8204
|
className: "!text-neutral-contrast ",
|
|
8115
|
-
children: /* @__PURE__ */ (0,
|
|
8116
|
-
/* @__PURE__ */ (0,
|
|
8117
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
8205
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
8206
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "text-black", children: column.label }),
|
|
8207
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
8118
8208
|
] })
|
|
8119
8209
|
}
|
|
8120
8210
|
)
|
|
@@ -8122,24 +8212,24 @@ var DataList = (props) => {
|
|
|
8122
8212
|
column.name
|
|
8123
8213
|
);
|
|
8124
8214
|
}) }) }),
|
|
8125
|
-
/* @__PURE__ */ (0,
|
|
8215
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
8126
8216
|
let validityClass = "";
|
|
8127
8217
|
console.log("dataitem", dataitem);
|
|
8128
8218
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
8129
8219
|
validityClass = "bg-alert-200";
|
|
8130
8220
|
}
|
|
8131
|
-
return /* @__PURE__ */ (0,
|
|
8221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
8132
8222
|
console.log("column", column);
|
|
8133
|
-
return /* @__PURE__ */ (0,
|
|
8223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_react62.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8134
8224
|
"td",
|
|
8135
8225
|
{
|
|
8136
8226
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
8137
|
-
children: column.addhref === true ? /* @__PURE__ */ (0,
|
|
8227
|
+
children: column.addhref === true ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8138
8228
|
Hyperlink,
|
|
8139
8229
|
{
|
|
8140
8230
|
className: "",
|
|
8141
8231
|
href: `https://${dataitem[column.name]}`,
|
|
8142
|
-
children: /* @__PURE__ */ (0,
|
|
8232
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8143
8233
|
ViewControl_default,
|
|
8144
8234
|
{
|
|
8145
8235
|
controlType: column.controlType,
|
|
@@ -8152,11 +8242,11 @@ var DataList = (props) => {
|
|
|
8152
8242
|
}
|
|
8153
8243
|
)
|
|
8154
8244
|
}
|
|
8155
|
-
) : column.showAsLink ? /* @__PURE__ */ (0,
|
|
8245
|
+
) : column.showAsLink ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8156
8246
|
Hyperlink,
|
|
8157
8247
|
{
|
|
8158
8248
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
8159
|
-
children: /* @__PURE__ */ (0,
|
|
8249
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8160
8250
|
ViewControl_default,
|
|
8161
8251
|
{
|
|
8162
8252
|
controlType: column.controlType,
|
|
@@ -8166,7 +8256,7 @@ var DataList = (props) => {
|
|
|
8166
8256
|
}
|
|
8167
8257
|
)
|
|
8168
8258
|
}
|
|
8169
|
-
) : /* @__PURE__ */ (0,
|
|
8259
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8170
8260
|
ViewControl_default,
|
|
8171
8261
|
{
|
|
8172
8262
|
controlType: column.controlType,
|
|
@@ -8180,10 +8270,10 @@ var DataList = (props) => {
|
|
|
8180
8270
|
}) }, index);
|
|
8181
8271
|
}) })
|
|
8182
8272
|
] }) }),
|
|
8183
|
-
/* @__PURE__ */ (0,
|
|
8184
|
-
/* @__PURE__ */ (0,
|
|
8185
|
-
/* @__PURE__ */ (0,
|
|
8186
|
-
activePageNumber > 1 && /* @__PURE__ */ (0,
|
|
8273
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
8274
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "text-gray-700", children: label }),
|
|
8275
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex space-x-2 items-center", children: [
|
|
8276
|
+
activePageNumber > 1 && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8187
8277
|
Hyperlink,
|
|
8188
8278
|
{
|
|
8189
8279
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -8191,9 +8281,9 @@ var DataList = (props) => {
|
|
|
8191
8281
|
children: "Prev"
|
|
8192
8282
|
}
|
|
8193
8283
|
),
|
|
8194
|
-
activePageNumber <= 1 && /* @__PURE__ */ (0,
|
|
8284
|
+
activePageNumber <= 1 && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("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" }),
|
|
8195
8285
|
renderPageNumbers(),
|
|
8196
|
-
activePageNumber < pages && /* @__PURE__ */ (0,
|
|
8286
|
+
activePageNumber < pages && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8197
8287
|
Hyperlink,
|
|
8198
8288
|
{
|
|
8199
8289
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -8201,19 +8291,19 @@ var DataList = (props) => {
|
|
|
8201
8291
|
children: "Next"
|
|
8202
8292
|
}
|
|
8203
8293
|
),
|
|
8204
|
-
activePageNumber >= pages && /* @__PURE__ */ (0,
|
|
8294
|
+
activePageNumber >= pages && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
8205
8295
|
] })
|
|
8206
8296
|
] }) })
|
|
8207
8297
|
] }),
|
|
8208
|
-
/* @__PURE__ */ (0,
|
|
8209
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
8298
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(NoContentView_default, { isDataFound, children: [
|
|
8299
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
8210
8300
|
"div",
|
|
8211
8301
|
{
|
|
8212
8302
|
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`,
|
|
8213
8303
|
children: [
|
|
8214
|
-
props.title ? /* @__PURE__ */ (0,
|
|
8215
|
-
/* @__PURE__ */ (0,
|
|
8216
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
8304
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", {}),
|
|
8305
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
8306
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8217
8307
|
InputControl_default,
|
|
8218
8308
|
{
|
|
8219
8309
|
name: "Search_input",
|
|
@@ -8225,7 +8315,7 @@ var DataList = (props) => {
|
|
|
8225
8315
|
}
|
|
8226
8316
|
}
|
|
8227
8317
|
),
|
|
8228
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
8318
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8229
8319
|
InputControl_default,
|
|
8230
8320
|
{
|
|
8231
8321
|
name: filter.name,
|
|
@@ -8240,15 +8330,15 @@ var DataList = (props) => {
|
|
|
8240
8330
|
},
|
|
8241
8331
|
filter.name
|
|
8242
8332
|
)),
|
|
8243
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
8333
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
8244
8334
|
Hyperlink,
|
|
8245
8335
|
{
|
|
8246
8336
|
className: "gap-1",
|
|
8247
8337
|
linkType: "Primary" /* Solid */,
|
|
8248
8338
|
href: props.addLinkHref,
|
|
8249
8339
|
children: [
|
|
8250
|
-
/* @__PURE__ */ (0,
|
|
8251
|
-
/* @__PURE__ */ (0,
|
|
8340
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
8341
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
8252
8342
|
]
|
|
8253
8343
|
}
|
|
8254
8344
|
)
|
|
@@ -8256,8 +8346,8 @@ var DataList = (props) => {
|
|
|
8256
8346
|
]
|
|
8257
8347
|
}
|
|
8258
8348
|
),
|
|
8259
|
-
/* @__PURE__ */ (0,
|
|
8260
|
-
/* @__PURE__ */ (0,
|
|
8349
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
8350
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("thead", { className: "bg-gray-50", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
8261
8351
|
let url = builder.getNewOrderByUrl(column.name);
|
|
8262
8352
|
let icon = "chevronUpDown";
|
|
8263
8353
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -8267,18 +8357,18 @@ var DataList = (props) => {
|
|
|
8267
8357
|
icon = "chevronUp";
|
|
8268
8358
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
8269
8359
|
}
|
|
8270
|
-
return /* @__PURE__ */ (0,
|
|
8360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8271
8361
|
"th",
|
|
8272
8362
|
{
|
|
8273
8363
|
className: "px-6 py-3 text-left font-medium bg-neutral-soft " + (column.enableSorting ? "cursor-pointer " : "") + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
8274
|
-
children: /* @__PURE__ */ (0,
|
|
8364
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8275
8365
|
Hyperlink,
|
|
8276
8366
|
{
|
|
8277
8367
|
href: column.enableSorting ? url : void 0,
|
|
8278
8368
|
className: "text-body-950",
|
|
8279
|
-
children: /* @__PURE__ */ (0,
|
|
8280
|
-
/* @__PURE__ */ (0,
|
|
8281
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
8369
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
8370
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { children: column.label }),
|
|
8371
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
8282
8372
|
] })
|
|
8283
8373
|
}
|
|
8284
8374
|
)
|
|
@@ -8286,7 +8376,7 @@ var DataList = (props) => {
|
|
|
8286
8376
|
column.name
|
|
8287
8377
|
);
|
|
8288
8378
|
}) }) }) }) }),
|
|
8289
|
-
/* @__PURE__ */ (0,
|
|
8379
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
8290
8380
|
] })
|
|
8291
8381
|
] })
|
|
8292
8382
|
] });
|
|
@@ -8294,12 +8384,12 @@ var DataList = (props) => {
|
|
|
8294
8384
|
var DataList_default = DataList;
|
|
8295
8385
|
|
|
8296
8386
|
// src/components/dataForm/DataListRenderer.tsx
|
|
8297
|
-
var
|
|
8387
|
+
var import_react63 = __toESM(require("react"));
|
|
8298
8388
|
init_ServiceClient();
|
|
8299
8389
|
init_OdataBuilder();
|
|
8300
8390
|
init_SelectWithSearchInput();
|
|
8301
8391
|
var import_navigation3 = require("next/navigation");
|
|
8302
|
-
var
|
|
8392
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
8303
8393
|
var viewControlMap = {
|
|
8304
8394
|
number: ViewControlTypes.number,
|
|
8305
8395
|
lineText: ViewControlTypes.lineText,
|
|
@@ -8354,14 +8444,14 @@ var DataListRenderer = ({
|
|
|
8354
8444
|
widgetProps
|
|
8355
8445
|
}) => {
|
|
8356
8446
|
const serviceClient = new ServiceClient_default(apiBaseUrl, session);
|
|
8357
|
-
const [columns, setColumns] = (0,
|
|
8358
|
-
const [dataset, setDataset] = (0,
|
|
8359
|
-
const [filter, setFilters] = (0,
|
|
8360
|
-
const [addLinkHref, setAddLinkHref] = (0,
|
|
8361
|
-
const [addLinkText, setAddLinkText] = (0,
|
|
8362
|
-
const [serviceRoute, setServiceRoute] = (0,
|
|
8447
|
+
const [columns, setColumns] = (0, import_react63.useState)([]);
|
|
8448
|
+
const [dataset, setDataset] = (0, import_react63.useState)();
|
|
8449
|
+
const [filter, setFilters] = (0, import_react63.useState)([]);
|
|
8450
|
+
const [addLinkHref, setAddLinkHref] = (0, import_react63.useState)("");
|
|
8451
|
+
const [addLinkText, setAddLinkText] = (0, import_react63.useState)("");
|
|
8452
|
+
const [serviceRoute, setServiceRoute] = (0, import_react63.useState)("");
|
|
8363
8453
|
const pathname = (0, import_navigation3.usePathname)();
|
|
8364
|
-
(0,
|
|
8454
|
+
(0, import_react63.useEffect)(() => {
|
|
8365
8455
|
if (!formDefinition) return;
|
|
8366
8456
|
setColumns(mapApiToColumns(formDefinition));
|
|
8367
8457
|
setFilters(mapApiToFilters(formDefinition));
|
|
@@ -8374,7 +8464,7 @@ var DataListRenderer = ({
|
|
|
8374
8464
|
setAddLinkHref(resolvedAddLinkHref);
|
|
8375
8465
|
setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
|
|
8376
8466
|
}, [formDefinition, params]);
|
|
8377
|
-
(0,
|
|
8467
|
+
(0, import_react63.useEffect)(() => {
|
|
8378
8468
|
const fetchData = async () => {
|
|
8379
8469
|
if (!serviceRoute) return;
|
|
8380
8470
|
const resolvedRoute = resolveRoutePlaceholders2(serviceRoute, params);
|
|
@@ -8394,13 +8484,13 @@ var DataListRenderer = ({
|
|
|
8394
8484
|
isActive: landingPageUrl === pathname
|
|
8395
8485
|
};
|
|
8396
8486
|
});
|
|
8397
|
-
return /* @__PURE__ */ (0,
|
|
8487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_react63.default.Fragment, { children: [
|
|
8398
8488
|
resolvedTabs.length > 0 && // <NavigationTabsV2
|
|
8399
8489
|
// tabs={resolvedTabs}
|
|
8400
8490
|
// params={(widgetProps?.params ?? params) as Record<string, any>}
|
|
8401
8491
|
// />
|
|
8402
|
-
/* @__PURE__ */ (0,
|
|
8403
|
-
/* @__PURE__ */ (0,
|
|
8492
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
8493
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
8404
8494
|
DataList_default,
|
|
8405
8495
|
{
|
|
8406
8496
|
addLinkHref,
|
|
@@ -8422,13 +8512,13 @@ var DataListRenderer_default = DataListRenderer;
|
|
|
8422
8512
|
init_InputControlType();
|
|
8423
8513
|
|
|
8424
8514
|
// src/components/dataForm/DataForm.tsx
|
|
8425
|
-
var
|
|
8515
|
+
var import_react65 = __toESM(require("react"));
|
|
8426
8516
|
init_Icon();
|
|
8427
8517
|
init_Button();
|
|
8428
8518
|
init_StyleTypes();
|
|
8429
8519
|
|
|
8430
8520
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
8431
|
-
var
|
|
8521
|
+
var import_react64 = __toESM(require("react"));
|
|
8432
8522
|
|
|
8433
8523
|
// src/components/dataForm/StyleTypes.tsx
|
|
8434
8524
|
var StyleTypes2 = /* @__PURE__ */ ((StyleTypes3) => {
|
|
@@ -8455,7 +8545,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
8455
8545
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
8456
8546
|
|
|
8457
8547
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
8458
|
-
var
|
|
8548
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
8459
8549
|
var DataFormChildSection = (props) => {
|
|
8460
8550
|
const { section } = props;
|
|
8461
8551
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -8467,7 +8557,7 @@ var DataFormChildSection = (props) => {
|
|
|
8467
8557
|
return childItems.map((item, originalIndex) => ({ item, originalIndex })).filter((x) => !x.item.isDeleted) || [];
|
|
8468
8558
|
};
|
|
8469
8559
|
const childItemsToRender = getChildItemsForRendering();
|
|
8470
|
-
const handleChildInputChange = (0,
|
|
8560
|
+
const handleChildInputChange = (0, import_react64.useCallback)(
|
|
8471
8561
|
(updatedValues) => {
|
|
8472
8562
|
if (isOneToOne) {
|
|
8473
8563
|
props.callback({
|
|
@@ -8494,7 +8584,7 @@ var DataFormChildSection = (props) => {
|
|
|
8494
8584
|
},
|
|
8495
8585
|
[props, isOneToOne, childItemsToRender]
|
|
8496
8586
|
);
|
|
8497
|
-
const onAddRow = (0,
|
|
8587
|
+
const onAddRow = (0, import_react64.useCallback)(() => {
|
|
8498
8588
|
props.callback({
|
|
8499
8589
|
sectionName: props.section.name,
|
|
8500
8590
|
actionType: FORM_CHILD_ROW_ADD,
|
|
@@ -8503,7 +8593,7 @@ var DataFormChildSection = (props) => {
|
|
|
8503
8593
|
rowIndex: -1
|
|
8504
8594
|
});
|
|
8505
8595
|
}, [props]);
|
|
8506
|
-
const onDeleteRow = (0,
|
|
8596
|
+
const onDeleteRow = (0, import_react64.useCallback)(
|
|
8507
8597
|
(filteredIndex) => {
|
|
8508
8598
|
const visibleItem = childItemsToRender[filteredIndex];
|
|
8509
8599
|
if (visibleItem) {
|
|
@@ -8523,14 +8613,14 @@ var DataFormChildSection = (props) => {
|
|
|
8523
8613
|
childItemsToRender,
|
|
8524
8614
|
allChildItems: childItems
|
|
8525
8615
|
});
|
|
8526
|
-
return /* @__PURE__ */ (0,
|
|
8527
|
-
section.sectionTitle && /* @__PURE__ */ (0,
|
|
8528
|
-
/* @__PURE__ */ (0,
|
|
8529
|
-
/* @__PURE__ */ (0,
|
|
8530
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0,
|
|
8531
|
-
return /* @__PURE__ */ (0,
|
|
8616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react64.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
8617
|
+
section.sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
8618
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
8619
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
8620
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
8621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("tr", { className: "", children: [
|
|
8532
8622
|
sectionRow.elements.map((field, index) => {
|
|
8533
|
-
return /* @__PURE__ */ (0,
|
|
8623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
8534
8624
|
"th",
|
|
8535
8625
|
{
|
|
8536
8626
|
className: "py-3 font-normal text-left",
|
|
@@ -8539,21 +8629,21 @@ var DataFormChildSection = (props) => {
|
|
|
8539
8629
|
field.name
|
|
8540
8630
|
);
|
|
8541
8631
|
}),
|
|
8542
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
8632
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
8543
8633
|
] }, sectionRowIndex);
|
|
8544
8634
|
}) }),
|
|
8545
|
-
/* @__PURE__ */ (0,
|
|
8635
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
8546
8636
|
const { item, originalIndex } = visibleItem;
|
|
8547
8637
|
const rowKey = originalIndex;
|
|
8548
|
-
return /* @__PURE__ */ (0,
|
|
8638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react64.default.Fragment, { children: section.sectionRows.map(
|
|
8549
8639
|
(sectionRow, sectionRowIndex) => {
|
|
8550
|
-
return /* @__PURE__ */ (0,
|
|
8640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
8551
8641
|
"tr",
|
|
8552
8642
|
{
|
|
8553
8643
|
className: "",
|
|
8554
8644
|
children: [
|
|
8555
8645
|
sectionRow.elements.map((field, index) => {
|
|
8556
|
-
return /* @__PURE__ */ (0,
|
|
8646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "w-11/12", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
8557
8647
|
InputControl_default,
|
|
8558
8648
|
{
|
|
8559
8649
|
index: filteredIndex,
|
|
@@ -8573,7 +8663,7 @@ var DataFormChildSection = (props) => {
|
|
|
8573
8663
|
}
|
|
8574
8664
|
) }) }) }, field.name);
|
|
8575
8665
|
}),
|
|
8576
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
8666
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
8577
8667
|
ClientButton_default,
|
|
8578
8668
|
{
|
|
8579
8669
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -8582,7 +8672,7 @@ var DataFormChildSection = (props) => {
|
|
|
8582
8672
|
},
|
|
8583
8673
|
dataRole: "delete",
|
|
8584
8674
|
tabIndex: -1,
|
|
8585
|
-
children: /* @__PURE__ */ (0,
|
|
8675
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
8586
8676
|
Icon_default,
|
|
8587
8677
|
{
|
|
8588
8678
|
className: "w-4 h-4",
|
|
@@ -8599,7 +8689,7 @@ var DataFormChildSection = (props) => {
|
|
|
8599
8689
|
) }, rowKey);
|
|
8600
8690
|
}) })
|
|
8601
8691
|
] }) }),
|
|
8602
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
8692
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
8603
8693
|
ClientButton_default,
|
|
8604
8694
|
{
|
|
8605
8695
|
ButtonType: "Link" /* Link */,
|
|
@@ -8614,9 +8704,9 @@ var DataFormChildSection = (props) => {
|
|
|
8614
8704
|
var DataFormChildSection_default = DataFormChildSection;
|
|
8615
8705
|
|
|
8616
8706
|
// src/components/dataForm/DataForm.tsx
|
|
8617
|
-
var
|
|
8707
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
8618
8708
|
var DataForm = (props) => {
|
|
8619
|
-
const formRef = (0,
|
|
8709
|
+
const formRef = (0, import_react65.useRef)(null);
|
|
8620
8710
|
console.log(props.dataItem, "dssads");
|
|
8621
8711
|
const initialState = {
|
|
8622
8712
|
inputValues: {},
|
|
@@ -8625,9 +8715,9 @@ var DataForm = (props) => {
|
|
|
8625
8715
|
const childInitialState = {
|
|
8626
8716
|
inputValues: []
|
|
8627
8717
|
};
|
|
8628
|
-
const [formState, dispatch] = (0,
|
|
8718
|
+
const [formState, dispatch] = (0, import_react65.useReducer)(FormReducer_default, initialState);
|
|
8629
8719
|
console.log(props.sections, "sections");
|
|
8630
|
-
const clearHiddenChildSections = (0,
|
|
8720
|
+
const clearHiddenChildSections = (0, import_react65.useCallback)(
|
|
8631
8721
|
(changedProperty, newValues) => {
|
|
8632
8722
|
if (!props.sections) return;
|
|
8633
8723
|
const allChildSections = [];
|
|
@@ -8665,7 +8755,7 @@ var DataForm = (props) => {
|
|
|
8665
8755
|
},
|
|
8666
8756
|
[props.sections, formState.inputValues]
|
|
8667
8757
|
);
|
|
8668
|
-
const handleInputChange = (0,
|
|
8758
|
+
const handleInputChange = (0, import_react65.useCallback)(
|
|
8669
8759
|
async (updatedValues) => {
|
|
8670
8760
|
dispatch({
|
|
8671
8761
|
type: FORM_INPUT_UPDATE,
|
|
@@ -8680,7 +8770,7 @@ var DataForm = (props) => {
|
|
|
8680
8770
|
},
|
|
8681
8771
|
[dispatch, formState.inputValues, clearHiddenChildSections]
|
|
8682
8772
|
);
|
|
8683
|
-
const fetchData = (0,
|
|
8773
|
+
const fetchData = (0, import_react65.useCallback)(async () => {
|
|
8684
8774
|
if (!props.rules) return;
|
|
8685
8775
|
if (Object.keys(formState.inputValues).length === 0) {
|
|
8686
8776
|
return;
|
|
@@ -8711,7 +8801,7 @@ var DataForm = (props) => {
|
|
|
8711
8801
|
console.error("Error fetching data:", error);
|
|
8712
8802
|
}
|
|
8713
8803
|
}, [formState.lastPropertyChanged, formState.inputValues]);
|
|
8714
|
-
(0,
|
|
8804
|
+
(0, import_react65.useEffect)(() => {
|
|
8715
8805
|
fetchData();
|
|
8716
8806
|
}, [formState.inputValues, formState.lastPropertyChanged]);
|
|
8717
8807
|
function replacePlaceholders(template, context, params) {
|
|
@@ -8731,7 +8821,7 @@ var DataForm = (props) => {
|
|
|
8731
8821
|
}
|
|
8732
8822
|
);
|
|
8733
8823
|
}
|
|
8734
|
-
const handleChildSectionChangeCallback = (0,
|
|
8824
|
+
const handleChildSectionChangeCallback = (0, import_react65.useCallback)(
|
|
8735
8825
|
(params) => {
|
|
8736
8826
|
dispatch({
|
|
8737
8827
|
type: params.actionType,
|
|
@@ -8776,7 +8866,7 @@ var DataForm = (props) => {
|
|
|
8776
8866
|
});
|
|
8777
8867
|
return cloned;
|
|
8778
8868
|
}
|
|
8779
|
-
const onClick = (0,
|
|
8869
|
+
const onClick = (0, import_react65.useCallback)(async () => {
|
|
8780
8870
|
if (props.onClick) {
|
|
8781
8871
|
const isEdit = props.dataItem && Object.keys(props.dataItem).length > 0;
|
|
8782
8872
|
const normalizedValues = normalizeChildSections(
|
|
@@ -8792,21 +8882,21 @@ var DataForm = (props) => {
|
|
|
8792
8882
|
return { isSuccessful: true };
|
|
8793
8883
|
}
|
|
8794
8884
|
}, [formState, props]);
|
|
8795
|
-
const handleAdditionalOnClick = (0,
|
|
8885
|
+
const handleAdditionalOnClick = (0, import_react65.useCallback)(async () => {
|
|
8796
8886
|
if (props.additionalActions?.onClick) {
|
|
8797
8887
|
return await props.additionalActions.onClick(formState);
|
|
8798
8888
|
} else {
|
|
8799
8889
|
return { isSuccessful: true, message: "Action completed successfully" };
|
|
8800
8890
|
}
|
|
8801
8891
|
}, [formState, props]);
|
|
8802
|
-
const onDelete = (0,
|
|
8892
|
+
const onDelete = (0, import_react65.useCallback)(async () => {
|
|
8803
8893
|
if (props.onDelete) {
|
|
8804
8894
|
return await props.onDelete(formState);
|
|
8805
8895
|
} else {
|
|
8806
8896
|
return { isSuccessful: true };
|
|
8807
8897
|
}
|
|
8808
8898
|
}, [formState, props]);
|
|
8809
|
-
(0,
|
|
8899
|
+
(0, import_react65.useEffect)(() => {
|
|
8810
8900
|
if (props.dataItem) {
|
|
8811
8901
|
dispatch({
|
|
8812
8902
|
type: FORM_INITIAL_UPDATE,
|
|
@@ -8834,19 +8924,19 @@ var DataForm = (props) => {
|
|
|
8834
8924
|
return false;
|
|
8835
8925
|
}
|
|
8836
8926
|
}
|
|
8837
|
-
return /* @__PURE__ */ (0,
|
|
8838
|
-
props.title && /* @__PURE__ */ (0,
|
|
8927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react65.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
8928
|
+
props.title && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "inline-flex items-center gap-2 px-6 py-3 border border-neutral-200 bg-white shadow-sm rounded-t-md", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
8839
8929
|
"div",
|
|
8840
8930
|
{
|
|
8841
8931
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
8842
8932
|
onClick: () => window.history.back(),
|
|
8843
8933
|
children: [
|
|
8844
|
-
/* @__PURE__ */ (0,
|
|
8845
|
-
/* @__PURE__ */ (0,
|
|
8934
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
8935
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
8846
8936
|
]
|
|
8847
8937
|
}
|
|
8848
8938
|
) }),
|
|
8849
|
-
/* @__PURE__ */ (0,
|
|
8939
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8850
8940
|
"form",
|
|
8851
8941
|
{
|
|
8852
8942
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -8867,8 +8957,8 @@ var DataForm = (props) => {
|
|
|
8867
8957
|
}
|
|
8868
8958
|
}
|
|
8869
8959
|
},
|
|
8870
|
-
children: /* @__PURE__ */ (0,
|
|
8871
|
-
return /* @__PURE__ */ (0,
|
|
8960
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
8961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react65.default.Fragment, { children: !section.isChildSection && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
8872
8962
|
section.sectionRows?.map(
|
|
8873
8963
|
(sectionRow, sectionRowIndex) => {
|
|
8874
8964
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -8879,14 +8969,14 @@ var DataForm = (props) => {
|
|
|
8879
8969
|
sectionRow.visible
|
|
8880
8970
|
);
|
|
8881
8971
|
}
|
|
8882
|
-
return /* @__PURE__ */ (0,
|
|
8883
|
-
return /* @__PURE__ */ (0,
|
|
8972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react65.default.Fragment, { children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
8973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
8884
8974
|
"div",
|
|
8885
8975
|
{
|
|
8886
8976
|
className: sectionRow.grow ? "grow" : "",
|
|
8887
8977
|
children: [
|
|
8888
|
-
/* @__PURE__ */ (0,
|
|
8889
|
-
/* @__PURE__ */ (0,
|
|
8978
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { children: field.controlType }),
|
|
8979
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8890
8980
|
InputControl_default,
|
|
8891
8981
|
{
|
|
8892
8982
|
name: field.name,
|
|
@@ -8916,12 +9006,12 @@ var DataForm = (props) => {
|
|
|
8916
9006
|
}) }) }, sectionRowIndex);
|
|
8917
9007
|
}
|
|
8918
9008
|
),
|
|
8919
|
-
/* @__PURE__ */ (0,
|
|
9009
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { children: section.childSections?.map(
|
|
8920
9010
|
(childSection, childSectionIndex) => {
|
|
8921
|
-
return /* @__PURE__ */ (0,
|
|
9011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { children: childSection.name && evalutateCondition(
|
|
8922
9012
|
formState.inputValues,
|
|
8923
9013
|
childSection.visible
|
|
8924
|
-
) && /* @__PURE__ */ (0,
|
|
9014
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8925
9015
|
DataFormChildSection_default,
|
|
8926
9016
|
{
|
|
8927
9017
|
section: childSection,
|
|
@@ -8936,8 +9026,8 @@ var DataForm = (props) => {
|
|
|
8936
9026
|
}) })
|
|
8937
9027
|
}
|
|
8938
9028
|
),
|
|
8939
|
-
/* @__PURE__ */ (0,
|
|
8940
|
-
/* @__PURE__ */ (0,
|
|
9029
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
9030
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { children: props.additionalActions && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8941
9031
|
Button_default,
|
|
8942
9032
|
{
|
|
8943
9033
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -8945,7 +9035,7 @@ var DataForm = (props) => {
|
|
|
8945
9035
|
children: props.additionalActions.title
|
|
8946
9036
|
}
|
|
8947
9037
|
) }),
|
|
8948
|
-
/* @__PURE__ */ (0,
|
|
9038
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { children: props.onDelete && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8949
9039
|
Button_default,
|
|
8950
9040
|
{
|
|
8951
9041
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -8956,7 +9046,7 @@ var DataForm = (props) => {
|
|
|
8956
9046
|
children: "Delete"
|
|
8957
9047
|
}
|
|
8958
9048
|
) }),
|
|
8959
|
-
/* @__PURE__ */ (0,
|
|
9049
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { children: props.onClick && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8960
9050
|
Button_default,
|
|
8961
9051
|
{
|
|
8962
9052
|
onValidate,
|
|
@@ -8974,7 +9064,7 @@ var DataForm_default = DataForm;
|
|
|
8974
9064
|
|
|
8975
9065
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
8976
9066
|
init_ServiceClient();
|
|
8977
|
-
var
|
|
9067
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
8978
9068
|
function getAction(actions, code) {
|
|
8979
9069
|
return actions?.find((a) => a.actionCode === code);
|
|
8980
9070
|
}
|
|
@@ -9000,9 +9090,9 @@ var DataFormRenderer = ({
|
|
|
9000
9090
|
"Delete"
|
|
9001
9091
|
);
|
|
9002
9092
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
9003
|
-
return /* @__PURE__ */ (0,
|
|
9004
|
-
widgetProps && /* @__PURE__ */ (0,
|
|
9005
|
-
/* @__PURE__ */ (0,
|
|
9093
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
9094
|
+
widgetProps && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
9095
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
9006
9096
|
DataForm_default,
|
|
9007
9097
|
{
|
|
9008
9098
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|