@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260807124440 → 0.8.1-dev.20260808070128
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/{IframeClient-7MLB3UB2.mjs → IframeClient-J22NMEVY.mjs} +7 -8
- package/dist/{IframeClient-ZFI2S3GR.mjs → IframeClient-RGJFZ5P2.mjs} +7 -8
- package/dist/index.js +892 -821
- package/dist/index.mjs +381 -309
- package/dist/server.js +340 -269
- package/dist/server.mjs +197 -125
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -824,12 +824,12 @@ var init_DateTimeViewClient = __esm({
|
|
|
824
824
|
});
|
|
825
825
|
|
|
826
826
|
// src/components/controls/edit/MultilineTextInput.tsx
|
|
827
|
-
var
|
|
827
|
+
var import_react17, import_jsx_runtime20, MultilineTextInput, MultilineTextInput_default;
|
|
828
828
|
var init_MultilineTextInput = __esm({
|
|
829
829
|
"src/components/controls/edit/MultilineTextInput.tsx"() {
|
|
830
830
|
"use strict";
|
|
831
|
-
|
|
832
|
-
|
|
831
|
+
import_react17 = __toESM(require("react"));
|
|
832
|
+
import_jsx_runtime20 = require("react/jsx-runtime");
|
|
833
833
|
MultilineTextInput = (props) => {
|
|
834
834
|
const textChangeHandler = (event) => {
|
|
835
835
|
const text = event.target.value;
|
|
@@ -848,11 +848,11 @@ var init_MultilineTextInput = __esm({
|
|
|
848
848
|
if (props.value !== void 0 && props.value !== null) {
|
|
849
849
|
value = props.value;
|
|
850
850
|
}
|
|
851
|
-
return /* @__PURE__ */ (0,
|
|
852
|
-
/* @__PURE__ */ (0,
|
|
851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react17.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { className: "block mb-1", children: [
|
|
852
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
853
853
|
" ",
|
|
854
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
855
|
-
/* @__PURE__ */ (0,
|
|
854
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
855
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
856
856
|
"textarea",
|
|
857
857
|
{
|
|
858
858
|
name: props.name,
|
|
@@ -869,7 +869,7 @@ var init_MultilineTextInput = __esm({
|
|
|
869
869
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm input"
|
|
870
870
|
}
|
|
871
871
|
),
|
|
872
|
-
/* @__PURE__ */ (0,
|
|
872
|
+
/* @__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
873
|
] }) });
|
|
874
874
|
};
|
|
875
875
|
MultilineTextInput_default = MultilineTextInput;
|
|
@@ -877,12 +877,12 @@ var init_MultilineTextInput = __esm({
|
|
|
877
877
|
});
|
|
878
878
|
|
|
879
879
|
// src/components/controls/edit/LineTextInput.tsx
|
|
880
|
-
var
|
|
880
|
+
var import_react18, import_jsx_runtime21, LineTextInput, LineTextInput_default;
|
|
881
881
|
var init_LineTextInput = __esm({
|
|
882
882
|
"src/components/controls/edit/LineTextInput.tsx"() {
|
|
883
883
|
"use strict";
|
|
884
|
-
|
|
885
|
-
|
|
884
|
+
import_react18 = __toESM(require("react"));
|
|
885
|
+
import_jsx_runtime21 = require("react/jsx-runtime");
|
|
886
886
|
LineTextInput = (props) => {
|
|
887
887
|
const textChangeHandler = (event) => {
|
|
888
888
|
const text = event.target.value;
|
|
@@ -901,11 +901,11 @@ var init_LineTextInput = __esm({
|
|
|
901
901
|
if (props.value !== void 0 && props.value !== null) {
|
|
902
902
|
value = props.value;
|
|
903
903
|
}
|
|
904
|
-
return /* @__PURE__ */ (0,
|
|
905
|
-
props?.attributes?.label && /* @__PURE__ */ (0,
|
|
904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react18.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("label", { className: "block", children: [
|
|
905
|
+
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
906
906
|
" ",
|
|
907
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
908
|
-
/* @__PURE__ */ (0,
|
|
907
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "bg-error-weak !bg-transparent", children: "*" }),
|
|
908
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
909
909
|
"input",
|
|
910
910
|
{
|
|
911
911
|
type: "text",
|
|
@@ -925,7 +925,7 @@ var init_LineTextInput = __esm({
|
|
|
925
925
|
`
|
|
926
926
|
}
|
|
927
927
|
),
|
|
928
|
-
/* @__PURE__ */ (0,
|
|
928
|
+
/* @__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
929
|
] }) });
|
|
930
930
|
};
|
|
931
931
|
LineTextInput_default = LineTextInput;
|
|
@@ -933,12 +933,12 @@ var init_LineTextInput = __esm({
|
|
|
933
933
|
});
|
|
934
934
|
|
|
935
935
|
// src/components/controls/edit/MoneyInput.tsx
|
|
936
|
-
var
|
|
936
|
+
var import_react19, import_jsx_runtime22, MoneyInput, MoneyInput_default;
|
|
937
937
|
var init_MoneyInput = __esm({
|
|
938
938
|
"src/components/controls/edit/MoneyInput.tsx"() {
|
|
939
939
|
"use strict";
|
|
940
|
-
|
|
941
|
-
|
|
940
|
+
import_react19 = __toESM(require("react"));
|
|
941
|
+
import_jsx_runtime22 = require("react/jsx-runtime");
|
|
942
942
|
MoneyInput = (props) => {
|
|
943
943
|
const textChangeHandler = (event) => {
|
|
944
944
|
const rawValue = event.target.value;
|
|
@@ -967,11 +967,11 @@ var init_MoneyInput = __esm({
|
|
|
967
967
|
e.preventDefault();
|
|
968
968
|
}
|
|
969
969
|
};
|
|
970
|
-
return /* @__PURE__ */ (0,
|
|
971
|
-
/* @__PURE__ */ (0,
|
|
970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react19.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { className: "block mb-1", children: [
|
|
971
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
972
972
|
" ",
|
|
973
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
974
|
-
/* @__PURE__ */ (0,
|
|
973
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
974
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
975
975
|
"input",
|
|
976
976
|
{
|
|
977
977
|
type: "number",
|
|
@@ -991,7 +991,7 @@ var init_MoneyInput = __esm({
|
|
|
991
991
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm number-input"
|
|
992
992
|
}
|
|
993
993
|
),
|
|
994
|
-
/* @__PURE__ */ (0,
|
|
994
|
+
/* @__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
995
|
] }) });
|
|
996
996
|
};
|
|
997
997
|
MoneyInput_default = MoneyInput;
|
|
@@ -1037,14 +1037,14 @@ var init_InputControlType = __esm({
|
|
|
1037
1037
|
});
|
|
1038
1038
|
|
|
1039
1039
|
// src/components/controls/edit/Select.tsx
|
|
1040
|
-
var
|
|
1040
|
+
var import_react20, import_jsx_runtime23, Select, Select_default;
|
|
1041
1041
|
var init_Select = __esm({
|
|
1042
1042
|
"src/components/controls/edit/Select.tsx"() {
|
|
1043
1043
|
"use strict";
|
|
1044
|
-
|
|
1045
|
-
|
|
1044
|
+
import_react20 = require("react");
|
|
1045
|
+
import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1046
1046
|
Select = (props) => {
|
|
1047
|
-
const [list, setList] = (0,
|
|
1047
|
+
const [list, setList] = (0, import_react20.useState)();
|
|
1048
1048
|
const getSafeValue = (val) => {
|
|
1049
1049
|
if (val === null || val === void 0) return "";
|
|
1050
1050
|
if (typeof val === "boolean") return val ? "1" : "0";
|
|
@@ -1081,7 +1081,7 @@ var init_Select = __esm({
|
|
|
1081
1081
|
groupKey: props.groupKey
|
|
1082
1082
|
});
|
|
1083
1083
|
};
|
|
1084
|
-
(0,
|
|
1084
|
+
(0, import_react20.useEffect)(() => {
|
|
1085
1085
|
async function fetchData() {
|
|
1086
1086
|
if (props.dataset) {
|
|
1087
1087
|
setList(props.dataset);
|
|
@@ -1114,11 +1114,11 @@ var init_Select = __esm({
|
|
|
1114
1114
|
props.dataSourceDependsOn
|
|
1115
1115
|
]);
|
|
1116
1116
|
const value = getSafeValue(props.value);
|
|
1117
|
-
return /* @__PURE__ */ (0,
|
|
1118
|
-
props.attributes?.label && /* @__PURE__ */ (0,
|
|
1117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { className: "block", children: [
|
|
1118
|
+
props.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-sm font-medium inline-block pb-1", children: props.attributes?.label }),
|
|
1119
1119
|
" ",
|
|
1120
|
-
props.attributes?.label && props.attributes?.required && /* @__PURE__ */ (0,
|
|
1121
|
-
list && list.length === 0 && /* @__PURE__ */ (0,
|
|
1120
|
+
props.attributes?.label && props.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1121
|
+
list && list.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1122
1122
|
"input",
|
|
1123
1123
|
{
|
|
1124
1124
|
type: "text",
|
|
@@ -1135,7 +1135,7 @@ var init_Select = __esm({
|
|
|
1135
1135
|
className: `peer input select mt-1 py-1.5 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`
|
|
1136
1136
|
}
|
|
1137
1137
|
),
|
|
1138
|
-
list && list.length > 0 && /* @__PURE__ */ (0,
|
|
1138
|
+
list && list.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1139
1139
|
"select",
|
|
1140
1140
|
{
|
|
1141
1141
|
name: props.name,
|
|
@@ -1148,16 +1148,16 @@ var init_Select = __esm({
|
|
|
1148
1148
|
focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50
|
|
1149
1149
|
disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none ${props.inputClasses ?? ""}`,
|
|
1150
1150
|
children: [
|
|
1151
|
-
/* @__PURE__ */ (0,
|
|
1151
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "", children: props.attributes?.placeholder || "Select" }),
|
|
1152
1152
|
list.map((item, index) => {
|
|
1153
1153
|
const keyField = props.dataKeyFieldName;
|
|
1154
1154
|
const textField = props.dataTextFieldName;
|
|
1155
|
-
return /* @__PURE__ */ (0,
|
|
1155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: item[keyField], children: item[textField] }, index);
|
|
1156
1156
|
})
|
|
1157
1157
|
]
|
|
1158
1158
|
}
|
|
1159
1159
|
),
|
|
1160
|
-
/* @__PURE__ */ (0,
|
|
1160
|
+
/* @__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
1161
|
] });
|
|
1162
1162
|
};
|
|
1163
1163
|
Select_default = Select;
|
|
@@ -1165,12 +1165,12 @@ var init_Select = __esm({
|
|
|
1165
1165
|
});
|
|
1166
1166
|
|
|
1167
1167
|
// src/components/controls/edit/PercentageInput.tsx
|
|
1168
|
-
var
|
|
1168
|
+
var import_react21, import_jsx_runtime24, PercentageInput, PercentageInput_default;
|
|
1169
1169
|
var init_PercentageInput = __esm({
|
|
1170
1170
|
"src/components/controls/edit/PercentageInput.tsx"() {
|
|
1171
1171
|
"use strict";
|
|
1172
|
-
|
|
1173
|
-
|
|
1172
|
+
import_react21 = __toESM(require("react"));
|
|
1173
|
+
import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1174
1174
|
PercentageInput = (props) => {
|
|
1175
1175
|
const textChangeHandler = (event) => {
|
|
1176
1176
|
const rawValue = event.target.value;
|
|
@@ -1199,11 +1199,11 @@ var init_PercentageInput = __esm({
|
|
|
1199
1199
|
e.preventDefault();
|
|
1200
1200
|
}
|
|
1201
1201
|
};
|
|
1202
|
-
return /* @__PURE__ */ (0,
|
|
1203
|
-
/* @__PURE__ */ (0,
|
|
1202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react21.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { className: "block mb-1", children: [
|
|
1203
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label ? props?.attributes?.label + " %" : "" }),
|
|
1204
1204
|
" ",
|
|
1205
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1206
|
-
/* @__PURE__ */ (0,
|
|
1205
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1206
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1207
1207
|
"input",
|
|
1208
1208
|
{
|
|
1209
1209
|
type: "number",
|
|
@@ -1222,7 +1222,7 @@ var init_PercentageInput = __esm({
|
|
|
1222
1222
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm number-input"
|
|
1223
1223
|
}
|
|
1224
1224
|
),
|
|
1225
|
-
/* @__PURE__ */ (0,
|
|
1225
|
+
/* @__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
1226
|
] }) });
|
|
1227
1227
|
};
|
|
1228
1228
|
PercentageInput_default = PercentageInput;
|
|
@@ -1230,12 +1230,12 @@ var init_PercentageInput = __esm({
|
|
|
1230
1230
|
});
|
|
1231
1231
|
|
|
1232
1232
|
// src/components/controls/edit/PhoneInput.tsx
|
|
1233
|
-
var
|
|
1233
|
+
var import_react22, import_jsx_runtime25, PhoneInput, PhoneInput_default;
|
|
1234
1234
|
var init_PhoneInput = __esm({
|
|
1235
1235
|
"src/components/controls/edit/PhoneInput.tsx"() {
|
|
1236
1236
|
"use strict";
|
|
1237
|
-
|
|
1238
|
-
|
|
1237
|
+
import_react22 = __toESM(require("react"));
|
|
1238
|
+
import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1239
1239
|
PhoneInput = (props) => {
|
|
1240
1240
|
const textChangeHandler = (event) => {
|
|
1241
1241
|
const text = event.target.value;
|
|
@@ -1254,13 +1254,13 @@ var init_PhoneInput = __esm({
|
|
|
1254
1254
|
if (props.value !== void 0 && props.value !== null) {
|
|
1255
1255
|
value = props.value;
|
|
1256
1256
|
}
|
|
1257
|
-
return /* @__PURE__ */ (0,
|
|
1258
|
-
/* @__PURE__ */ (0,
|
|
1257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react22.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "block mb-1", children: [
|
|
1258
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1259
1259
|
" ",
|
|
1260
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1261
|
-
/* @__PURE__ */ (0,
|
|
1262
|
-
/* @__PURE__ */ (0,
|
|
1263
|
-
/* @__PURE__ */ (0,
|
|
1260
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1261
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center rounded border ", children: [
|
|
1262
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "px-3", children: props.prefix }),
|
|
1263
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1264
1264
|
"input",
|
|
1265
1265
|
{
|
|
1266
1266
|
type: "text",
|
|
@@ -1278,7 +1278,7 @@ var init_PhoneInput = __esm({
|
|
|
1278
1278
|
}
|
|
1279
1279
|
)
|
|
1280
1280
|
] }),
|
|
1281
|
-
/* @__PURE__ */ (0,
|
|
1281
|
+
/* @__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
1282
|
] }) });
|
|
1283
1283
|
};
|
|
1284
1284
|
PhoneInput_default = PhoneInput;
|
|
@@ -1286,12 +1286,12 @@ var init_PhoneInput = __esm({
|
|
|
1286
1286
|
});
|
|
1287
1287
|
|
|
1288
1288
|
// src/components/controls/edit/NumberInput.tsx
|
|
1289
|
-
var
|
|
1289
|
+
var import_react23, import_jsx_runtime26, NumberInput, NumberInput_default;
|
|
1290
1290
|
var init_NumberInput = __esm({
|
|
1291
1291
|
"src/components/controls/edit/NumberInput.tsx"() {
|
|
1292
1292
|
"use strict";
|
|
1293
|
-
|
|
1294
|
-
|
|
1293
|
+
import_react23 = __toESM(require("react"));
|
|
1294
|
+
import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1295
1295
|
NumberInput = (props) => {
|
|
1296
1296
|
const textChangeHandler = (event) => {
|
|
1297
1297
|
const text = event.target.value;
|
|
@@ -1314,11 +1314,11 @@ var init_NumberInput = __esm({
|
|
|
1314
1314
|
if (props.value !== void 0 && props.value !== null) {
|
|
1315
1315
|
value = props.value;
|
|
1316
1316
|
}
|
|
1317
|
-
return /* @__PURE__ */ (0,
|
|
1318
|
-
props?.attributes?.label && /* @__PURE__ */ (0,
|
|
1317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react23.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { className: "block", children: [
|
|
1318
|
+
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
1319
1319
|
" ",
|
|
1320
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1321
|
-
/* @__PURE__ */ (0,
|
|
1320
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1321
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1322
1322
|
"input",
|
|
1323
1323
|
{
|
|
1324
1324
|
type: "number",
|
|
@@ -1337,7 +1337,7 @@ var init_NumberInput = __esm({
|
|
|
1337
1337
|
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
1338
|
}
|
|
1339
1339
|
),
|
|
1340
|
-
/* @__PURE__ */ (0,
|
|
1340
|
+
/* @__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
1341
|
] }) });
|
|
1342
1342
|
};
|
|
1343
1343
|
NumberInput_default = NumberInput;
|
|
@@ -1345,12 +1345,12 @@ var init_NumberInput = __esm({
|
|
|
1345
1345
|
});
|
|
1346
1346
|
|
|
1347
1347
|
// src/components/controls/edit/CheckboxInput.tsx
|
|
1348
|
-
var
|
|
1348
|
+
var import_react24, import_jsx_runtime27, CheckboxInput, CheckboxInput_default;
|
|
1349
1349
|
var init_CheckboxInput = __esm({
|
|
1350
1350
|
"src/components/controls/edit/CheckboxInput.tsx"() {
|
|
1351
1351
|
"use strict";
|
|
1352
|
-
|
|
1353
|
-
|
|
1352
|
+
import_react24 = __toESM(require("react"));
|
|
1353
|
+
import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1354
1354
|
CheckboxInput = (props) => {
|
|
1355
1355
|
const textChangeHandler = (event) => {
|
|
1356
1356
|
let text = event.target.checked;
|
|
@@ -1367,9 +1367,9 @@ var init_CheckboxInput = __esm({
|
|
|
1367
1367
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
1368
1368
|
value = true;
|
|
1369
1369
|
}
|
|
1370
|
-
return /* @__PURE__ */ (0,
|
|
1371
|
-
props?.attributes?.label && /* @__PURE__ */ (0,
|
|
1372
|
-
/* @__PURE__ */ (0,
|
|
1370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react24.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "mb-1", children: [
|
|
1371
|
+
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
1372
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1373
1373
|
"label",
|
|
1374
1374
|
{
|
|
1375
1375
|
htmlFor: props.name,
|
|
@@ -1377,9 +1377,9 @@ var init_CheckboxInput = __esm({
|
|
|
1377
1377
|
children: props.attributes.label
|
|
1378
1378
|
}
|
|
1379
1379
|
),
|
|
1380
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1380
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "bg-error-weak", children: "*" })
|
|
1381
1381
|
] }),
|
|
1382
|
-
/* @__PURE__ */ (0,
|
|
1382
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1383
1383
|
"input",
|
|
1384
1384
|
{
|
|
1385
1385
|
type: "checkbox",
|
|
@@ -1396,7 +1396,7 @@ var init_CheckboxInput = __esm({
|
|
|
1396
1396
|
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
1397
|
}
|
|
1398
1398
|
),
|
|
1399
|
-
/* @__PURE__ */ (0,
|
|
1399
|
+
/* @__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
1400
|
] }) });
|
|
1401
1401
|
};
|
|
1402
1402
|
CheckboxInput_default = CheckboxInput;
|
|
@@ -1404,12 +1404,12 @@ var init_CheckboxInput = __esm({
|
|
|
1404
1404
|
});
|
|
1405
1405
|
|
|
1406
1406
|
// src/components/controls/edit/OtpInput.tsx
|
|
1407
|
-
var
|
|
1407
|
+
var import_react25, import_jsx_runtime28, OtpInput, OtpInput_default;
|
|
1408
1408
|
var init_OtpInput = __esm({
|
|
1409
1409
|
"src/components/controls/edit/OtpInput.tsx"() {
|
|
1410
1410
|
"use strict";
|
|
1411
|
-
|
|
1412
|
-
|
|
1411
|
+
import_react25 = __toESM(require("react"));
|
|
1412
|
+
import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1413
1413
|
OtpInput = (props) => {
|
|
1414
1414
|
const textChangeHandler = (event) => {
|
|
1415
1415
|
const text = event.target.value;
|
|
@@ -1431,11 +1431,11 @@ var init_OtpInput = __esm({
|
|
|
1431
1431
|
if (props.value !== void 0 && props.value !== null) {
|
|
1432
1432
|
value = props.value;
|
|
1433
1433
|
}
|
|
1434
|
-
return /* @__PURE__ */ (0,
|
|
1435
|
-
/* @__PURE__ */ (0,
|
|
1434
|
+
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: [
|
|
1435
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1436
1436
|
" ",
|
|
1437
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1438
|
-
/* @__PURE__ */ (0,
|
|
1437
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1438
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1439
1439
|
"input",
|
|
1440
1440
|
{
|
|
1441
1441
|
type: "text",
|
|
@@ -1455,7 +1455,7 @@ var init_OtpInput = __esm({
|
|
|
1455
1455
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm tracking-[1.25em] text-center"
|
|
1456
1456
|
}
|
|
1457
1457
|
),
|
|
1458
|
-
/* @__PURE__ */ (0,
|
|
1458
|
+
/* @__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
1459
|
] }) });
|
|
1460
1460
|
};
|
|
1461
1461
|
OtpInput_default = OtpInput;
|
|
@@ -1463,12 +1463,12 @@ var init_OtpInput = __esm({
|
|
|
1463
1463
|
});
|
|
1464
1464
|
|
|
1465
1465
|
// src/components/controls/edit/DateTimeInput.tsx
|
|
1466
|
-
var
|
|
1466
|
+
var import_react26, import_jsx_runtime29, DateTimeInput, DateTimeInput_default;
|
|
1467
1467
|
var init_DateTimeInput = __esm({
|
|
1468
1468
|
"src/components/controls/edit/DateTimeInput.tsx"() {
|
|
1469
1469
|
"use strict";
|
|
1470
|
-
|
|
1471
|
-
|
|
1470
|
+
import_react26 = __toESM(require("react"));
|
|
1471
|
+
import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1472
1472
|
DateTimeInput = (props) => {
|
|
1473
1473
|
const textChangeHandler = (event) => {
|
|
1474
1474
|
const localDate = new Date(event.target.value);
|
|
@@ -1500,12 +1500,12 @@ var init_DateTimeInput = __esm({
|
|
|
1500
1500
|
e.preventDefault();
|
|
1501
1501
|
}
|
|
1502
1502
|
};
|
|
1503
|
-
return /* @__PURE__ */ (0,
|
|
1504
|
-
/* @__PURE__ */ (0,
|
|
1503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react26.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("label", { className: "block mb-1", children: [
|
|
1504
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1505
1505
|
" ",
|
|
1506
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1507
|
-
/* @__PURE__ */ (0,
|
|
1508
|
-
/* @__PURE__ */ (0,
|
|
1506
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1507
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1508
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1509
1509
|
"input",
|
|
1510
1510
|
{
|
|
1511
1511
|
type: "datetime-local",
|
|
@@ -1523,9 +1523,9 @@ var init_DateTimeInput = __esm({
|
|
|
1523
1523
|
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
1524
|
}
|
|
1525
1525
|
),
|
|
1526
|
-
/* @__PURE__ */ (0,
|
|
1526
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: timeZoneAbbr })
|
|
1527
1527
|
] }),
|
|
1528
|
-
/* @__PURE__ */ (0,
|
|
1528
|
+
/* @__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
1529
|
] }) });
|
|
1530
1530
|
};
|
|
1531
1531
|
DateTimeInput_default = DateTimeInput;
|
|
@@ -1533,15 +1533,15 @@ var init_DateTimeInput = __esm({
|
|
|
1533
1533
|
});
|
|
1534
1534
|
|
|
1535
1535
|
// src/components/controls/edit/ColorInput.tsx
|
|
1536
|
-
var
|
|
1536
|
+
var import_react27, import_jsx_runtime30, ColorInput, ColorInput_default;
|
|
1537
1537
|
var init_ColorInput = __esm({
|
|
1538
1538
|
"src/components/controls/edit/ColorInput.tsx"() {
|
|
1539
1539
|
"use strict";
|
|
1540
|
-
|
|
1541
|
-
|
|
1540
|
+
import_react27 = __toESM(require("react"));
|
|
1541
|
+
import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1542
1542
|
ColorInput = (props) => {
|
|
1543
|
-
const [color, setColor] =
|
|
1544
|
-
(0,
|
|
1543
|
+
const [color, setColor] = import_react27.default.useState("#3b82f6");
|
|
1544
|
+
(0, import_react27.useEffect)(() => {
|
|
1545
1545
|
if (props.value !== void 0 && props.value !== null) {
|
|
1546
1546
|
if (typeof props.value === "string") {
|
|
1547
1547
|
setColor(props.value);
|
|
@@ -1560,11 +1560,11 @@ var init_ColorInput = __esm({
|
|
|
1560
1560
|
});
|
|
1561
1561
|
}
|
|
1562
1562
|
};
|
|
1563
|
-
return /* @__PURE__ */ (0,
|
|
1564
|
-
/* @__PURE__ */ (0,
|
|
1563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("label", { className: "block mb-1", children: [
|
|
1564
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
1565
1565
|
" ",
|
|
1566
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1567
|
-
/* @__PURE__ */ (0,
|
|
1566
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1567
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1568
1568
|
"input",
|
|
1569
1569
|
{
|
|
1570
1570
|
type: "color",
|
|
@@ -1577,7 +1577,7 @@ var init_ColorInput = __esm({
|
|
|
1577
1577
|
className: `w-[78px] h-12 block cursor-pointer`
|
|
1578
1578
|
}
|
|
1579
1579
|
),
|
|
1580
|
-
props?.attributes?.errorMessage && /* @__PURE__ */ (0,
|
|
1580
|
+
props?.attributes?.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "mt-1 bg-error-weak text-sm", children: props.attributes.errorMessage })
|
|
1581
1581
|
] });
|
|
1582
1582
|
};
|
|
1583
1583
|
ColorInput_default = ColorInput;
|
|
@@ -1585,22 +1585,22 @@ var init_ColorInput = __esm({
|
|
|
1585
1585
|
});
|
|
1586
1586
|
|
|
1587
1587
|
// src/components/controls/edit/SelectWithSearchInput.tsx
|
|
1588
|
-
var
|
|
1588
|
+
var import_react28, import_jsx_runtime31, SelectWithSearchInput, SelectWithSearchInput_default;
|
|
1589
1589
|
var init_SelectWithSearchInput = __esm({
|
|
1590
1590
|
"src/components/controls/edit/SelectWithSearchInput.tsx"() {
|
|
1591
1591
|
"use strict";
|
|
1592
1592
|
"use client";
|
|
1593
|
-
|
|
1594
|
-
|
|
1593
|
+
import_react28 = __toESM(require("react"));
|
|
1594
|
+
import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1595
1595
|
SelectWithSearchInput = (props) => {
|
|
1596
|
-
const [isOpen, setIsOpen] = (0,
|
|
1597
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
1598
|
-
const [highlightedIndex, setHighlightedIndex] = (0,
|
|
1599
|
-
const [selectedItem, setSelectedItem] = (0,
|
|
1596
|
+
const [isOpen, setIsOpen] = (0, import_react28.useState)(false);
|
|
1597
|
+
const [searchTerm, setSearchTerm] = (0, import_react28.useState)("");
|
|
1598
|
+
const [highlightedIndex, setHighlightedIndex] = (0, import_react28.useState)(-1);
|
|
1599
|
+
const [selectedItem, setSelectedItem] = (0, import_react28.useState)(
|
|
1600
1600
|
null
|
|
1601
1601
|
);
|
|
1602
|
-
const [list, setList] = (0,
|
|
1603
|
-
const loadData =
|
|
1602
|
+
const [list, setList] = (0, import_react28.useState)([]);
|
|
1603
|
+
const loadData = import_react28.default.useCallback(async () => {
|
|
1604
1604
|
if (props.dataset) {
|
|
1605
1605
|
setList(props.dataset);
|
|
1606
1606
|
return;
|
|
@@ -1625,10 +1625,10 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1625
1625
|
props.dataSourceDependsOn,
|
|
1626
1626
|
props.dependentValue
|
|
1627
1627
|
]);
|
|
1628
|
-
(0,
|
|
1628
|
+
(0, import_react28.useEffect)(() => {
|
|
1629
1629
|
loadData();
|
|
1630
1630
|
}, [loadData]);
|
|
1631
|
-
(0,
|
|
1631
|
+
(0, import_react28.useEffect)(() => {
|
|
1632
1632
|
if (props.value && list.length && props.dataKeyFieldName && props.dataTextFieldName) {
|
|
1633
1633
|
const selected = list.find(
|
|
1634
1634
|
(x) => x[props.dataKeyFieldName] == props.value
|
|
@@ -1675,8 +1675,8 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1675
1675
|
handleSelect(e, filteredItems[highlightedIndex]);
|
|
1676
1676
|
}
|
|
1677
1677
|
};
|
|
1678
|
-
const dropdownRef = (0,
|
|
1679
|
-
(0,
|
|
1678
|
+
const dropdownRef = (0, import_react28.useRef)(null);
|
|
1679
|
+
(0, import_react28.useEffect)(() => {
|
|
1680
1680
|
if (highlightedIndex >= 0 && dropdownRef.current) {
|
|
1681
1681
|
const highlightedItem = dropdownRef.current.children[highlightedIndex];
|
|
1682
1682
|
highlightedItem?.scrollIntoView({
|
|
@@ -1686,14 +1686,14 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1686
1686
|
}
|
|
1687
1687
|
}, [highlightedIndex]);
|
|
1688
1688
|
const isReadOnly = props.attributes?.readOnly || props.disable || props.attributes?.disable;
|
|
1689
|
-
return /* @__PURE__ */ (0,
|
|
1690
|
-
/* @__PURE__ */ (0,
|
|
1689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "relative", children: [
|
|
1690
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("label", { className: "pb-1", children: [
|
|
1691
1691
|
props.attributes?.label,
|
|
1692
1692
|
" ",
|
|
1693
|
-
props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1693
|
+
props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "bg-error-weak", children: "*" })
|
|
1694
1694
|
] }),
|
|
1695
|
-
/* @__PURE__ */ (0,
|
|
1696
|
-
/* @__PURE__ */ (0,
|
|
1695
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "relative", children: [
|
|
1696
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1697
1697
|
"input",
|
|
1698
1698
|
{
|
|
1699
1699
|
type: "text",
|
|
@@ -1715,7 +1715,7 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1715
1715
|
`
|
|
1716
1716
|
}
|
|
1717
1717
|
),
|
|
1718
|
-
/* @__PURE__ */ (0,
|
|
1718
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1719
1719
|
"button",
|
|
1720
1720
|
{
|
|
1721
1721
|
type: "button",
|
|
@@ -1726,7 +1726,7 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1726
1726
|
}
|
|
1727
1727
|
},
|
|
1728
1728
|
className: "absolute right-2 top-3 h-5 w-5 text-gray-500 focus:outline-none",
|
|
1729
|
-
children: /* @__PURE__ */ (0,
|
|
1729
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1730
1730
|
"svg",
|
|
1731
1731
|
{
|
|
1732
1732
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1735,7 +1735,7 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1735
1735
|
strokeWidth: 1.5,
|
|
1736
1736
|
stroke: "currentColor",
|
|
1737
1737
|
className: "w-full h-full",
|
|
1738
|
-
children: /* @__PURE__ */ (0,
|
|
1738
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1739
1739
|
"path",
|
|
1740
1740
|
{
|
|
1741
1741
|
strokeLinecap: "round",
|
|
@@ -1748,12 +1748,12 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1748
1748
|
}
|
|
1749
1749
|
)
|
|
1750
1750
|
] }),
|
|
1751
|
-
!isReadOnly && isOpen && /* @__PURE__ */ (0,
|
|
1751
|
+
!isReadOnly && isOpen && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1752
1752
|
"div",
|
|
1753
1753
|
{
|
|
1754
1754
|
ref: dropdownRef,
|
|
1755
1755
|
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,
|
|
1756
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1757
1757
|
"button",
|
|
1758
1758
|
{
|
|
1759
1759
|
onClick: (e) => handleSelect(e, item),
|
|
@@ -1761,10 +1761,10 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1761
1761
|
role: "option",
|
|
1762
1762
|
tabIndex: -1,
|
|
1763
1763
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1764
|
-
children: /* @__PURE__ */ (0,
|
|
1764
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: item[props.dataTextFieldName] })
|
|
1765
1765
|
},
|
|
1766
1766
|
item[props.dataKeyFieldName]
|
|
1767
|
-
)) : /* @__PURE__ */ (0,
|
|
1767
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1768
1768
|
}
|
|
1769
1769
|
)
|
|
1770
1770
|
] });
|
|
@@ -1852,15 +1852,15 @@ var init_StyleTypes = __esm({
|
|
|
1852
1852
|
});
|
|
1853
1853
|
|
|
1854
1854
|
// src/components/ClientButton.tsx
|
|
1855
|
-
var
|
|
1855
|
+
var import_react29, import_jsx_runtime32, ClientButton, ClientButton_default;
|
|
1856
1856
|
var init_ClientButton = __esm({
|
|
1857
1857
|
"src/components/ClientButton.tsx"() {
|
|
1858
1858
|
"use strict";
|
|
1859
1859
|
"use client";
|
|
1860
|
-
|
|
1860
|
+
import_react29 = __toESM(require("react"));
|
|
1861
1861
|
init_ToastService();
|
|
1862
1862
|
init_StyleTypes();
|
|
1863
|
-
|
|
1863
|
+
import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1864
1864
|
ClientButton = (props) => {
|
|
1865
1865
|
const execute = async (event) => {
|
|
1866
1866
|
if (props.onClick !== void 0) {
|
|
@@ -1870,7 +1870,7 @@ var init_ClientButton = __esm({
|
|
|
1870
1870
|
}
|
|
1871
1871
|
};
|
|
1872
1872
|
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
1873
|
-
return /* @__PURE__ */ (0,
|
|
1873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react29.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1874
1874
|
"button",
|
|
1875
1875
|
{
|
|
1876
1876
|
type: "button",
|
|
@@ -1885,17 +1885,17 @@ var init_ClientButton = __esm({
|
|
|
1885
1885
|
});
|
|
1886
1886
|
|
|
1887
1887
|
// src/components/Confirm.tsx
|
|
1888
|
-
var
|
|
1888
|
+
var import_react30, import_jsx_runtime33, Confirm, Confirm_default;
|
|
1889
1889
|
var init_Confirm = __esm({
|
|
1890
1890
|
"src/components/Confirm.tsx"() {
|
|
1891
1891
|
"use strict";
|
|
1892
1892
|
"use client";
|
|
1893
|
-
|
|
1893
|
+
import_react30 = require("react");
|
|
1894
1894
|
init_ClientButton();
|
|
1895
1895
|
init_StyleTypes();
|
|
1896
|
-
|
|
1896
|
+
import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1897
1897
|
Confirm = ({ message, onConfirm, onCancel }) => {
|
|
1898
|
-
const [showModal, setShowModal] = (0,
|
|
1898
|
+
const [showModal, setShowModal] = (0, import_react30.useState)(true);
|
|
1899
1899
|
const handleConfirmAction = () => {
|
|
1900
1900
|
setShowModal(false);
|
|
1901
1901
|
if (onConfirm) {
|
|
@@ -1908,13 +1908,13 @@ var init_Confirm = __esm({
|
|
|
1908
1908
|
onCancel();
|
|
1909
1909
|
}
|
|
1910
1910
|
};
|
|
1911
|
-
return /* @__PURE__ */ (0,
|
|
1912
|
-
/* @__PURE__ */ (0,
|
|
1913
|
-
/* @__PURE__ */ (0,
|
|
1914
|
-
/* @__PURE__ */ (0,
|
|
1915
|
-
/* @__PURE__ */ (0,
|
|
1916
|
-
/* @__PURE__ */ (0,
|
|
1917
|
-
/* @__PURE__ */ (0,
|
|
1911
|
+
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: [
|
|
1912
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "absolute inset-0 bg-black opacity-70" }),
|
|
1913
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "bg-white rounded-md p-6 w-2/6 shadow border z-50", children: [
|
|
1914
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "text-xl font-medium mb-4", children: "Confirmation" }),
|
|
1915
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mb-4", children: message }),
|
|
1916
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex justify-end gap-8", children: [
|
|
1917
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1918
1918
|
ClientButton_default,
|
|
1919
1919
|
{
|
|
1920
1920
|
onClick: handleCancelAction,
|
|
@@ -1922,7 +1922,7 @@ var init_Confirm = __esm({
|
|
|
1922
1922
|
children: "Cancel"
|
|
1923
1923
|
}
|
|
1924
1924
|
),
|
|
1925
|
-
/* @__PURE__ */ (0,
|
|
1925
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1926
1926
|
ClientButton_default,
|
|
1927
1927
|
{
|
|
1928
1928
|
onClick: handleConfirmAction,
|
|
@@ -1940,21 +1940,21 @@ var init_Confirm = __esm({
|
|
|
1940
1940
|
});
|
|
1941
1941
|
|
|
1942
1942
|
// src/components/Button.tsx
|
|
1943
|
-
var
|
|
1943
|
+
var import_react31, import_jsx_runtime34, Button, Button_default;
|
|
1944
1944
|
var init_Button = __esm({
|
|
1945
1945
|
"src/components/Button.tsx"() {
|
|
1946
1946
|
"use strict";
|
|
1947
1947
|
"use client";
|
|
1948
|
-
|
|
1948
|
+
import_react31 = __toESM(require("react"));
|
|
1949
1949
|
init_ToastService();
|
|
1950
1950
|
init_StyleTypes();
|
|
1951
1951
|
init_Confirm();
|
|
1952
|
-
|
|
1952
|
+
import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1953
1953
|
Button = (props) => {
|
|
1954
|
-
const [inProgress, setInProgress] = (0,
|
|
1955
|
-
const [isActionPerformed, setIsActionPerformed] = (0,
|
|
1956
|
-
const [responseMessage, setResponseMessage] = (0,
|
|
1957
|
-
const [showModal, setShowModal] = (0,
|
|
1954
|
+
const [inProgress, setInProgress] = (0, import_react31.useState)(false);
|
|
1955
|
+
const [isActionPerformed, setIsActionPerformed] = (0, import_react31.useState)(false);
|
|
1956
|
+
const [responseMessage, setResponseMessage] = (0, import_react31.useState)(null);
|
|
1957
|
+
const [showModal, setShowModal] = (0, import_react31.useState)(null);
|
|
1958
1958
|
const execute = async (event) => {
|
|
1959
1959
|
event.preventDefault();
|
|
1960
1960
|
event.stopPropagation();
|
|
@@ -2003,7 +2003,7 @@ var init_Button = __esm({
|
|
|
2003
2003
|
const onConfirm = () => resolve(true);
|
|
2004
2004
|
const onCancel = () => resolve(false);
|
|
2005
2005
|
setShowModal(
|
|
2006
|
-
/* @__PURE__ */ (0,
|
|
2006
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2007
2007
|
Confirm_default,
|
|
2008
2008
|
{
|
|
2009
2009
|
message: props.confirmationMessage,
|
|
@@ -2017,8 +2017,8 @@ var init_Button = __esm({
|
|
|
2017
2017
|
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
2018
2018
|
let progressClass = props.ButtonType ? progressClasses.get(props.ButtonType) : progressClasses.get("Primary" /* Solid */);
|
|
2019
2019
|
const isDisabled = inProgress || isActionPerformed && props.oneTimeAction;
|
|
2020
|
-
return /* @__PURE__ */ (0,
|
|
2021
|
-
/* @__PURE__ */ (0,
|
|
2020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react31.default.Fragment, { children: [
|
|
2021
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2022
2022
|
"button",
|
|
2023
2023
|
{
|
|
2024
2024
|
type: "submit",
|
|
@@ -2028,7 +2028,7 @@ var init_Button = __esm({
|
|
|
2028
2028
|
className: `${buttonClass} relative inline-flex items-center justify-center gap-2 ${props.className ?? ""}`,
|
|
2029
2029
|
children: [
|
|
2030
2030
|
isActionPerformed && props.oneTimeAction && responseMessage ? responseMessage : props.children,
|
|
2031
|
-
inProgress && /* @__PURE__ */ (0,
|
|
2031
|
+
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
2032
|
"svg",
|
|
2033
2033
|
{
|
|
2034
2034
|
className: `animate-spin h-5 w-5 flex-shrink-0 ${progressClass}`,
|
|
@@ -2036,7 +2036,7 @@ var init_Button = __esm({
|
|
|
2036
2036
|
fill: "none",
|
|
2037
2037
|
viewBox: "0 0 24 24",
|
|
2038
2038
|
children: [
|
|
2039
|
-
/* @__PURE__ */ (0,
|
|
2039
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2040
2040
|
"circle",
|
|
2041
2041
|
{
|
|
2042
2042
|
className: "opacity-25",
|
|
@@ -2047,7 +2047,7 @@ var init_Button = __esm({
|
|
|
2047
2047
|
strokeWidth: "4"
|
|
2048
2048
|
}
|
|
2049
2049
|
),
|
|
2050
|
-
/* @__PURE__ */ (0,
|
|
2050
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2051
2051
|
"path",
|
|
2052
2052
|
{
|
|
2053
2053
|
className: "opacity-75",
|
|
@@ -2069,28 +2069,28 @@ var init_Button = __esm({
|
|
|
2069
2069
|
});
|
|
2070
2070
|
|
|
2071
2071
|
// src/components/controls/edit/SelectWithSearchPanel.tsx
|
|
2072
|
-
var
|
|
2072
|
+
var import_react32, import_jsx_runtime35, SelectWithSearchPanel, SelectWithSearchPanel_default;
|
|
2073
2073
|
var init_SelectWithSearchPanel = __esm({
|
|
2074
2074
|
"src/components/controls/edit/SelectWithSearchPanel.tsx"() {
|
|
2075
2075
|
"use strict";
|
|
2076
2076
|
"use client";
|
|
2077
2077
|
init_Button();
|
|
2078
|
-
|
|
2079
|
-
|
|
2078
|
+
import_react32 = __toESM(require("react"));
|
|
2079
|
+
import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2080
2080
|
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,
|
|
2081
|
+
const [isOpen, setIsOpen] = (0, import_react32.useState)(false);
|
|
2082
|
+
const [searchTerm, setSearchTerm] = (0, import_react32.useState)("");
|
|
2083
|
+
const [highlightedIndex, setHighlightedIndex] = (0, import_react32.useState)(0);
|
|
2084
|
+
const [list, setList] = (0, import_react32.useState)([]);
|
|
2085
|
+
const listRef = (0, import_react32.useRef)(null);
|
|
2086
|
+
const [isError, setIsError] = (0, import_react32.useState)(false);
|
|
2087
|
+
const containerRef = (0, import_react32.useRef)(null);
|
|
2088
|
+
const [isCreateOpen, setIsCreateOpen] = (0, import_react32.useState)(false);
|
|
2089
|
+
const [formData, setFormData] = (0, import_react32.useState)({});
|
|
2090
2090
|
const getNestedValue7 = (obj, path) => {
|
|
2091
2091
|
return path.split(".").reduce((acc, key) => acc?.[key], obj);
|
|
2092
2092
|
};
|
|
2093
|
-
(0,
|
|
2093
|
+
(0, import_react32.useEffect)(() => {
|
|
2094
2094
|
const handleClickOutside = (event) => {
|
|
2095
2095
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
2096
2096
|
setIsOpen(false);
|
|
@@ -2101,7 +2101,7 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2101
2101
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
2102
2102
|
};
|
|
2103
2103
|
}, []);
|
|
2104
|
-
(0,
|
|
2104
|
+
(0, import_react32.useEffect)(() => {
|
|
2105
2105
|
async function fetchData() {
|
|
2106
2106
|
if (props.dataset) {
|
|
2107
2107
|
setList(props.dataset);
|
|
@@ -2143,7 +2143,7 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2143
2143
|
audioCtx.close();
|
|
2144
2144
|
}, 250);
|
|
2145
2145
|
};
|
|
2146
|
-
(0,
|
|
2146
|
+
(0, import_react32.useEffect)(() => {
|
|
2147
2147
|
const filteredItems2 = list?.filter(
|
|
2148
2148
|
(item) => item[props?.dataTextFieldName]?.toLowerCase().includes(searchTerm?.toLowerCase())
|
|
2149
2149
|
);
|
|
@@ -2208,18 +2208,18 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2208
2208
|
const handleInputChange = (event, field) => {
|
|
2209
2209
|
setFormData((prev) => ({ ...prev, [field]: event.target.value }));
|
|
2210
2210
|
};
|
|
2211
|
-
const handleSaveModal = (0,
|
|
2211
|
+
const handleSaveModal = (0, import_react32.useCallback)(async () => {
|
|
2212
2212
|
console.log("Form Data:", formData);
|
|
2213
2213
|
return formData;
|
|
2214
2214
|
}, []);
|
|
2215
|
-
return /* @__PURE__ */ (0,
|
|
2216
|
-
/* @__PURE__ */ (0,
|
|
2215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "relative", children: [
|
|
2216
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("label", { className: "text-sm mb-1 font-medium", children: [
|
|
2217
2217
|
props.attributes?.label,
|
|
2218
2218
|
" ",
|
|
2219
2219
|
" ",
|
|
2220
|
-
props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2220
|
+
props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "bg-error-weak", children: "*" })
|
|
2221
2221
|
] }),
|
|
2222
|
-
/* @__PURE__ */ (0,
|
|
2222
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2223
2223
|
"input",
|
|
2224
2224
|
{
|
|
2225
2225
|
type: "text",
|
|
@@ -2233,14 +2233,14 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2233
2233
|
disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none`
|
|
2234
2234
|
}
|
|
2235
2235
|
) }),
|
|
2236
|
-
/* @__PURE__ */ (0,
|
|
2237
|
-
/* @__PURE__ */ (0,
|
|
2238
|
-
/* @__PURE__ */ (0,
|
|
2236
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { ref: containerRef, children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_react32.default.Fragment, { children: [
|
|
2237
|
+
/* @__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: [
|
|
2238
|
+
/* @__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
2239
|
"Select a",
|
|
2240
2240
|
" ",
|
|
2241
2241
|
props.attributes?.label || props.attributes?.heading
|
|
2242
2242
|
] }) }),
|
|
2243
|
-
/* @__PURE__ */ (0,
|
|
2243
|
+
/* @__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
2244
|
"button",
|
|
2245
2245
|
{
|
|
2246
2246
|
type: "button",
|
|
@@ -2253,12 +2253,12 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2253
2253
|
}
|
|
2254
2254
|
) })
|
|
2255
2255
|
] }),
|
|
2256
|
-
isCreateOpen && /* @__PURE__ */ (0,
|
|
2257
|
-
/* @__PURE__ */ (0,
|
|
2256
|
+
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: [
|
|
2257
|
+
/* @__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
2258
|
"Create New ",
|
|
2259
2259
|
props.attributes?.label
|
|
2260
2260
|
] }) }),
|
|
2261
|
-
/* @__PURE__ */ (0,
|
|
2261
|
+
/* @__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
2262
|
"button",
|
|
2263
2263
|
{
|
|
2264
2264
|
type: "button",
|
|
@@ -2267,10 +2267,10 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2267
2267
|
children: "Close"
|
|
2268
2268
|
}
|
|
2269
2269
|
) }),
|
|
2270
|
-
/* @__PURE__ */ (0,
|
|
2271
|
-
props.createFields?.map((field) => /* @__PURE__ */ (0,
|
|
2272
|
-
/* @__PURE__ */ (0,
|
|
2273
|
-
/* @__PURE__ */ (0,
|
|
2270
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "p-4", children: [
|
|
2271
|
+
props.createFields?.map((field) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "mb-4", children: [
|
|
2272
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("label", { className: "text-sm mb-1 font-medium block", children: field.label }),
|
|
2273
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2274
2274
|
"input",
|
|
2275
2275
|
{
|
|
2276
2276
|
type: field.type,
|
|
@@ -2286,7 +2286,7 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2286
2286
|
}
|
|
2287
2287
|
)
|
|
2288
2288
|
] }, field.name)),
|
|
2289
|
-
/* @__PURE__ */ (0,
|
|
2289
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Button_default, { onClick: async () => {
|
|
2290
2290
|
handleSaveModal();
|
|
2291
2291
|
return { isSuccessful: true };
|
|
2292
2292
|
}, className: "w-full", children: [
|
|
@@ -2295,13 +2295,13 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2295
2295
|
] })
|
|
2296
2296
|
] })
|
|
2297
2297
|
] }),
|
|
2298
|
-
/* @__PURE__ */ (0,
|
|
2298
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2299
2299
|
"div",
|
|
2300
2300
|
{
|
|
2301
2301
|
ref: listRef,
|
|
2302
2302
|
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
2303
|
style: { height: "calc(100vh - 130px)" },
|
|
2304
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ (0,
|
|
2304
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2305
2305
|
"button",
|
|
2306
2306
|
{
|
|
2307
2307
|
onClick: (e) => {
|
|
@@ -2311,9 +2311,9 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2311
2311
|
role: "option",
|
|
2312
2312
|
tabIndex: -1,
|
|
2313
2313
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
2314
|
-
children: /* @__PURE__ */ (0,
|
|
2314
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: getNestedValue7(item, props.dataTextFieldName) })
|
|
2315
2315
|
}
|
|
2316
|
-
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ (0,
|
|
2316
|
+
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
2317
2317
|
}
|
|
2318
2318
|
)
|
|
2319
2319
|
] }) })
|
|
@@ -2324,14 +2324,14 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2324
2324
|
});
|
|
2325
2325
|
|
|
2326
2326
|
// src/components/controls/edit/BooleanSelect.tsx
|
|
2327
|
-
var
|
|
2327
|
+
var import_react33, import_jsx_runtime36, BooleanSelect, BooleanSelect_default;
|
|
2328
2328
|
var init_BooleanSelect = __esm({
|
|
2329
2329
|
"src/components/controls/edit/BooleanSelect.tsx"() {
|
|
2330
2330
|
"use strict";
|
|
2331
|
-
|
|
2332
|
-
|
|
2331
|
+
import_react33 = __toESM(require("react"));
|
|
2332
|
+
import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2333
2333
|
BooleanSelect = (props) => {
|
|
2334
|
-
const [list, setList] = (0,
|
|
2334
|
+
const [list, setList] = (0, import_react33.useState)();
|
|
2335
2335
|
const textChangeHandler = (event) => {
|
|
2336
2336
|
const text = event.target.value;
|
|
2337
2337
|
const boolValue = text?.toLowerCase() === "true" || text === "1";
|
|
@@ -2344,7 +2344,7 @@ var init_BooleanSelect = __esm({
|
|
|
2344
2344
|
});
|
|
2345
2345
|
}
|
|
2346
2346
|
};
|
|
2347
|
-
(0,
|
|
2347
|
+
(0, import_react33.useEffect)(() => {
|
|
2348
2348
|
async function fetchData() {
|
|
2349
2349
|
console.log("in select");
|
|
2350
2350
|
if (props.dataset) {
|
|
@@ -2378,11 +2378,11 @@ var init_BooleanSelect = __esm({
|
|
|
2378
2378
|
if (props.value !== void 0 && props.value !== null) {
|
|
2379
2379
|
value = props.value;
|
|
2380
2380
|
}
|
|
2381
|
-
return /* @__PURE__ */ (0,
|
|
2382
|
-
/* @__PURE__ */ (0,
|
|
2381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react33.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("label", { className: "block", children: [
|
|
2382
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
2383
2383
|
" ",
|
|
2384
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2385
|
-
/* @__PURE__ */ (0,
|
|
2384
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2385
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2386
2386
|
"select",
|
|
2387
2387
|
{
|
|
2388
2388
|
name: props.name,
|
|
@@ -2394,9 +2394,9 @@ var init_BooleanSelect = __esm({
|
|
|
2394
2394
|
disabled: props?.attributes?.readOnly,
|
|
2395
2395
|
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
2396
|
children: [
|
|
2397
|
-
/* @__PURE__ */ (0,
|
|
2397
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("option", { className: "", value: "", children: props.attributes?.placeholder || "Select" }),
|
|
2398
2398
|
list && list.map((item, i) => {
|
|
2399
|
-
return /* @__PURE__ */ (0,
|
|
2399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2400
2400
|
"option",
|
|
2401
2401
|
{
|
|
2402
2402
|
className: "fac-select-option",
|
|
@@ -2409,7 +2409,7 @@ var init_BooleanSelect = __esm({
|
|
|
2409
2409
|
]
|
|
2410
2410
|
}
|
|
2411
2411
|
),
|
|
2412
|
-
/* @__PURE__ */ (0,
|
|
2412
|
+
/* @__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
2413
|
] }) });
|
|
2414
2414
|
};
|
|
2415
2415
|
BooleanSelect_default = BooleanSelect;
|
|
@@ -2417,12 +2417,12 @@ var init_BooleanSelect = __esm({
|
|
|
2417
2417
|
});
|
|
2418
2418
|
|
|
2419
2419
|
// src/components/controls/edit/EmailInput.tsx
|
|
2420
|
-
var
|
|
2420
|
+
var import_react34, import_jsx_runtime37, EmailInput, EmailInput_default;
|
|
2421
2421
|
var init_EmailInput = __esm({
|
|
2422
2422
|
"src/components/controls/edit/EmailInput.tsx"() {
|
|
2423
2423
|
"use strict";
|
|
2424
|
-
|
|
2425
|
-
|
|
2424
|
+
import_react34 = __toESM(require("react"));
|
|
2425
|
+
import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2426
2426
|
EmailInput = (props) => {
|
|
2427
2427
|
const textChangeHandler = (event) => {
|
|
2428
2428
|
const text = event.target.value;
|
|
@@ -2447,11 +2447,11 @@ var init_EmailInput = __esm({
|
|
|
2447
2447
|
if (props.value !== void 0 && props.value !== null) {
|
|
2448
2448
|
value = props.value;
|
|
2449
2449
|
}
|
|
2450
|
-
return /* @__PURE__ */ (0,
|
|
2451
|
-
/* @__PURE__ */ (0,
|
|
2450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react34.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("label", { className: "block mb-1", children: [
|
|
2451
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-sm font-medium text-slate-700", children: props?.attributes?.label }),
|
|
2452
2452
|
" ",
|
|
2453
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2454
|
-
/* @__PURE__ */ (0,
|
|
2453
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2454
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2455
2455
|
"input",
|
|
2456
2456
|
{
|
|
2457
2457
|
type: "email",
|
|
@@ -2467,7 +2467,7 @@ var init_EmailInput = __esm({
|
|
|
2467
2467
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n transition-all duration-500 ease-in-out"
|
|
2468
2468
|
}
|
|
2469
2469
|
),
|
|
2470
|
-
/* @__PURE__ */ (0,
|
|
2470
|
+
/* @__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
2471
|
] }) });
|
|
2472
2472
|
};
|
|
2473
2473
|
EmailInput_default = EmailInput;
|
|
@@ -2475,13 +2475,13 @@ var init_EmailInput = __esm({
|
|
|
2475
2475
|
});
|
|
2476
2476
|
|
|
2477
2477
|
// src/components/controls/edit/TimeInput.tsx
|
|
2478
|
-
var
|
|
2478
|
+
var import_react35, import_jsx_runtime38, TimeInput, TimeInput_default;
|
|
2479
2479
|
var init_TimeInput = __esm({
|
|
2480
2480
|
"src/components/controls/edit/TimeInput.tsx"() {
|
|
2481
2481
|
"use strict";
|
|
2482
2482
|
"use client";
|
|
2483
|
-
|
|
2484
|
-
|
|
2483
|
+
import_react35 = __toESM(require("react"));
|
|
2484
|
+
import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2485
2485
|
TimeInput = (props) => {
|
|
2486
2486
|
const timeChangeHandler = (event) => {
|
|
2487
2487
|
const timeValue = event.target.value;
|
|
@@ -2494,11 +2494,11 @@ var init_TimeInput = __esm({
|
|
|
2494
2494
|
});
|
|
2495
2495
|
}
|
|
2496
2496
|
};
|
|
2497
|
-
return /* @__PURE__ */ (0,
|
|
2498
|
-
/* @__PURE__ */ (0,
|
|
2497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react35.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("label", { className: "block mb-1", children: [
|
|
2498
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
2499
2499
|
" ",
|
|
2500
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2501
|
-
/* @__PURE__ */ (0,
|
|
2500
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2501
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2502
2502
|
"input",
|
|
2503
2503
|
{
|
|
2504
2504
|
type: "time",
|
|
@@ -2511,7 +2511,7 @@ var init_TimeInput = __esm({
|
|
|
2511
2511
|
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
2512
|
}
|
|
2513
2513
|
) }),
|
|
2514
|
-
/* @__PURE__ */ (0,
|
|
2514
|
+
/* @__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
2515
|
] }) });
|
|
2516
2516
|
};
|
|
2517
2517
|
TimeInput_default = TimeInput;
|
|
@@ -2526,7 +2526,7 @@ function Hyperlink(props) {
|
|
|
2526
2526
|
if (target == "_blank") {
|
|
2527
2527
|
additionalProps.rel = "noopener noreferrer";
|
|
2528
2528
|
}
|
|
2529
|
-
return /* @__PURE__ */ (0,
|
|
2529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_jsx_runtime39.Fragment, { children: props.href ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2530
2530
|
import_link.default,
|
|
2531
2531
|
{
|
|
2532
2532
|
href: props.href,
|
|
@@ -2536,65 +2536,65 @@ function Hyperlink(props) {
|
|
|
2536
2536
|
target,
|
|
2537
2537
|
children: props.children
|
|
2538
2538
|
}
|
|
2539
|
-
) : props.isHeading ? /* @__PURE__ */ (0,
|
|
2539
|
+
) : 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
2540
|
}
|
|
2541
|
-
var import_link,
|
|
2541
|
+
var import_link, import_jsx_runtime39;
|
|
2542
2542
|
var init_Hyperlink = __esm({
|
|
2543
2543
|
"src/components/dataForm/Hyperlink.tsx"() {
|
|
2544
2544
|
"use strict";
|
|
2545
2545
|
import_link = __toESM(require("next/link"));
|
|
2546
2546
|
init_StyleTypes();
|
|
2547
|
-
|
|
2547
|
+
import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2548
2548
|
}
|
|
2549
2549
|
});
|
|
2550
2550
|
|
|
2551
2551
|
// src/svg/chevron-updown.tsx
|
|
2552
|
-
var
|
|
2552
|
+
var import_jsx_runtime40, ChevronUpDown, chevron_updown_default;
|
|
2553
2553
|
var init_chevron_updown = __esm({
|
|
2554
2554
|
"src/svg/chevron-updown.tsx"() {
|
|
2555
2555
|
"use strict";
|
|
2556
|
-
|
|
2556
|
+
import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2557
2557
|
ChevronUpDown = (props) => {
|
|
2558
|
-
return /* @__PURE__ */ (0,
|
|
2558
|
+
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
2559
|
};
|
|
2560
2560
|
chevron_updown_default = ChevronUpDown;
|
|
2561
2561
|
}
|
|
2562
2562
|
});
|
|
2563
2563
|
|
|
2564
2564
|
// src/svg/chevron-down.tsx
|
|
2565
|
-
var
|
|
2565
|
+
var import_jsx_runtime41, ChevronDown, chevron_down_default;
|
|
2566
2566
|
var init_chevron_down = __esm({
|
|
2567
2567
|
"src/svg/chevron-down.tsx"() {
|
|
2568
2568
|
"use strict";
|
|
2569
|
-
|
|
2569
|
+
import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2570
2570
|
ChevronDown = (props) => {
|
|
2571
|
-
return /* @__PURE__ */ (0,
|
|
2571
|
+
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
2572
|
};
|
|
2573
2573
|
chevron_down_default = ChevronDown;
|
|
2574
2574
|
}
|
|
2575
2575
|
});
|
|
2576
2576
|
|
|
2577
2577
|
// src/svg/chevron-up.tsx
|
|
2578
|
-
var
|
|
2578
|
+
var import_jsx_runtime42, ChevronUp, chevron_up_default;
|
|
2579
2579
|
var init_chevron_up = __esm({
|
|
2580
2580
|
"src/svg/chevron-up.tsx"() {
|
|
2581
2581
|
"use strict";
|
|
2582
|
-
|
|
2582
|
+
import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2583
2583
|
ChevronUp = (props) => {
|
|
2584
|
-
return /* @__PURE__ */ (0,
|
|
2584
|
+
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
2585
|
};
|
|
2586
2586
|
chevron_up_default = ChevronUp;
|
|
2587
2587
|
}
|
|
2588
2588
|
});
|
|
2589
2589
|
|
|
2590
2590
|
// src/svg/plus.tsx
|
|
2591
|
-
var
|
|
2591
|
+
var import_jsx_runtime43, Plus, plus_default;
|
|
2592
2592
|
var init_plus = __esm({
|
|
2593
2593
|
"src/svg/plus.tsx"() {
|
|
2594
2594
|
"use strict";
|
|
2595
|
-
|
|
2595
|
+
import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2596
2596
|
Plus = (props) => {
|
|
2597
|
-
return /* @__PURE__ */ (0,
|
|
2597
|
+
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
2598
|
};
|
|
2599
2599
|
plus_default = Plus;
|
|
2600
2600
|
}
|
|
@@ -2620,37 +2620,37 @@ var init_Icons = __esm({
|
|
|
2620
2620
|
});
|
|
2621
2621
|
|
|
2622
2622
|
// src/svg/Icon.tsx
|
|
2623
|
-
var
|
|
2623
|
+
var import_jsx_runtime44, Icon, Icon_default;
|
|
2624
2624
|
var init_Icon = __esm({
|
|
2625
2625
|
"src/svg/Icon.tsx"() {
|
|
2626
2626
|
"use strict";
|
|
2627
2627
|
init_Icons();
|
|
2628
|
-
|
|
2628
|
+
import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2629
2629
|
Icon = ({ name, className, ...props }) => {
|
|
2630
2630
|
const IconComponent = Icons_default[name];
|
|
2631
2631
|
if (!IconComponent) {
|
|
2632
2632
|
console.error(`Icon "${name}" not found.`);
|
|
2633
2633
|
return null;
|
|
2634
2634
|
}
|
|
2635
|
-
return /* @__PURE__ */ (0,
|
|
2635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(IconComponent, { ...props, className });
|
|
2636
2636
|
};
|
|
2637
2637
|
Icon_default = Icon;
|
|
2638
2638
|
}
|
|
2639
2639
|
});
|
|
2640
2640
|
|
|
2641
2641
|
// src/components/controls/edit/AssetUpload.tsx
|
|
2642
|
-
var
|
|
2642
|
+
var import_react36, import_jsx_runtime45, AssetUpload, AssetUpload_default;
|
|
2643
2643
|
var init_AssetUpload = __esm({
|
|
2644
2644
|
"src/components/controls/edit/AssetUpload.tsx"() {
|
|
2645
2645
|
"use strict";
|
|
2646
2646
|
"use client";
|
|
2647
|
-
|
|
2647
|
+
import_react36 = __toESM(require("react"));
|
|
2648
2648
|
init_ClientButton();
|
|
2649
2649
|
init_StyleTypes();
|
|
2650
2650
|
init_AssetUtility();
|
|
2651
2651
|
init_Hyperlink();
|
|
2652
2652
|
init_Icon();
|
|
2653
|
-
|
|
2653
|
+
import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2654
2654
|
AssetUpload = (props) => {
|
|
2655
2655
|
const isDisabled = props.attributes?.disable ?? false;
|
|
2656
2656
|
let allValues = [];
|
|
@@ -2671,8 +2671,8 @@ var init_AssetUpload = __esm({
|
|
|
2671
2671
|
}
|
|
2672
2672
|
return "image";
|
|
2673
2673
|
};
|
|
2674
|
-
const [assetType, setAssetType] =
|
|
2675
|
-
(0,
|
|
2674
|
+
const [assetType, setAssetType] = import_react36.default.useState(getInitialTab);
|
|
2675
|
+
(0, import_react36.useEffect)(() => {
|
|
2676
2676
|
setAssetType(getInitialTab());
|
|
2677
2677
|
}, [props.value]);
|
|
2678
2678
|
const assetUploadCallback = (newAsset) => {
|
|
@@ -2747,10 +2747,10 @@ var init_AssetUpload = __esm({
|
|
|
2747
2747
|
}
|
|
2748
2748
|
return false;
|
|
2749
2749
|
};
|
|
2750
|
-
return /* @__PURE__ */ (0,
|
|
2751
|
-
/* @__PURE__ */ (0,
|
|
2752
|
-
/* @__PURE__ */ (0,
|
|
2753
|
-
/* @__PURE__ */ (0,
|
|
2750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react36.default.Fragment, { children: [
|
|
2751
|
+
/* @__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 }) }),
|
|
2752
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex gap-6 bg-neutral-100 rounded p-2", children: [
|
|
2753
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2754
2754
|
ClientButton_default,
|
|
2755
2755
|
{
|
|
2756
2756
|
className: assetType === "image" ? "px-2 py-1 rounded bg-body-200 scale-95" : "text-neutral-700",
|
|
@@ -2760,7 +2760,7 @@ var init_AssetUpload = __esm({
|
|
|
2760
2760
|
children: "Image Upload"
|
|
2761
2761
|
}
|
|
2762
2762
|
),
|
|
2763
|
-
/* @__PURE__ */ (0,
|
|
2763
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2764
2764
|
ClientButton_default,
|
|
2765
2765
|
{
|
|
2766
2766
|
className: assetType === "video" ? "bg-body-200 px-2 py-1 rounded-md scale-95" : "text-neutral-700",
|
|
@@ -2771,13 +2771,13 @@ var init_AssetUpload = __esm({
|
|
|
2771
2771
|
}
|
|
2772
2772
|
)
|
|
2773
2773
|
] }),
|
|
2774
|
-
shouldShowDetails() && /* @__PURE__ */ (0,
|
|
2775
|
-
/* @__PURE__ */ (0,
|
|
2776
|
-
/* @__PURE__ */ (0,
|
|
2777
|
-
/* @__PURE__ */ (0,
|
|
2778
|
-
/* @__PURE__ */ (0,
|
|
2779
|
-
/* @__PURE__ */ (0,
|
|
2780
|
-
/* @__PURE__ */ (0,
|
|
2774
|
+
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: [
|
|
2775
|
+
/* @__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" }),
|
|
2776
|
+
/* @__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: [
|
|
2777
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "grid grid-cols-2 gap-x-8 gap-y-3 text-sm w-full", children: [
|
|
2778
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { children: [
|
|
2779
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "text-gray-500", children: "Title" }),
|
|
2780
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2781
2781
|
"input",
|
|
2782
2782
|
{
|
|
2783
2783
|
type: "text",
|
|
@@ -2789,18 +2789,18 @@ var init_AssetUpload = __esm({
|
|
|
2789
2789
|
}
|
|
2790
2790
|
)
|
|
2791
2791
|
] }),
|
|
2792
|
-
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ (0,
|
|
2793
|
-
/* @__PURE__ */ (0,
|
|
2794
|
-
/* @__PURE__ */ (0,
|
|
2792
|
+
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { children: [
|
|
2793
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "text-gray-500", children: "Resolution" }),
|
|
2794
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("p", { className: "font-medium text-gray-900 mt-3", children: [
|
|
2795
2795
|
digitalAsset.intrinsicWidth,
|
|
2796
2796
|
"\xD7",
|
|
2797
2797
|
digitalAsset.intrinsicHeight
|
|
2798
2798
|
] })
|
|
2799
2799
|
] }),
|
|
2800
|
-
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ (0,
|
|
2801
|
-
/* @__PURE__ */ (0,
|
|
2802
|
-
/* @__PURE__ */ (0,
|
|
2803
|
-
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ (0,
|
|
2800
|
+
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { children: [
|
|
2801
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "text-gray-500", children: "Image / Poster" }),
|
|
2802
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex-shrink-0 flex flex-col gap-3 mt-1", children: [
|
|
2803
|
+
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2804
2804
|
"img",
|
|
2805
2805
|
{
|
|
2806
2806
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.posterUrl),
|
|
@@ -2808,7 +2808,7 @@ var init_AssetUpload = __esm({
|
|
|
2808
2808
|
className: "w-32 h-auto object-cover rounded border p-1"
|
|
2809
2809
|
}
|
|
2810
2810
|
),
|
|
2811
|
-
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ (0,
|
|
2811
|
+
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2812
2812
|
"img",
|
|
2813
2813
|
{
|
|
2814
2814
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.assetUrl),
|
|
@@ -2818,9 +2818,9 @@ var init_AssetUpload = __esm({
|
|
|
2818
2818
|
)
|
|
2819
2819
|
] })
|
|
2820
2820
|
] }),
|
|
2821
|
-
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ (0,
|
|
2822
|
-
/* @__PURE__ */ (0,
|
|
2823
|
-
/* @__PURE__ */ (0,
|
|
2821
|
+
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "col-span-2", children: [
|
|
2822
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "text-gray-500", children: "HLS Link" }),
|
|
2823
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2824
2824
|
Hyperlink,
|
|
2825
2825
|
{
|
|
2826
2826
|
href: digitalAsset.assetUrl,
|
|
@@ -2831,12 +2831,12 @@ var init_AssetUpload = __esm({
|
|
|
2831
2831
|
)
|
|
2832
2832
|
] })
|
|
2833
2833
|
] }),
|
|
2834
|
-
/* @__PURE__ */ (0,
|
|
2834
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2835
2835
|
"span",
|
|
2836
2836
|
{
|
|
2837
2837
|
onClick: () => !isDisabled && deleteFile(index),
|
|
2838
2838
|
className: isDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
2839
|
-
children: /* @__PURE__ */ (0,
|
|
2839
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Icon_default, { className: "w-4 h-4 text-primary", name: "delete" })
|
|
2840
2840
|
}
|
|
2841
2841
|
)
|
|
2842
2842
|
] }, index)) })
|
|
@@ -2848,12 +2848,12 @@ var init_AssetUpload = __esm({
|
|
|
2848
2848
|
});
|
|
2849
2849
|
|
|
2850
2850
|
// src/components/controls/edit/SwitchInput.tsx
|
|
2851
|
-
var
|
|
2851
|
+
var import_react37, import_jsx_runtime46, SwitchInput, SwitchInput_default;
|
|
2852
2852
|
var init_SwitchInput = __esm({
|
|
2853
2853
|
"src/components/controls/edit/SwitchInput.tsx"() {
|
|
2854
2854
|
"use strict";
|
|
2855
|
-
|
|
2856
|
-
|
|
2855
|
+
import_react37 = __toESM(require("react"));
|
|
2856
|
+
import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2857
2857
|
SwitchInput = (props) => {
|
|
2858
2858
|
const textChangeHandler = (event) => {
|
|
2859
2859
|
let text = event.target.checked;
|
|
@@ -2870,28 +2870,28 @@ var init_SwitchInput = __esm({
|
|
|
2870
2870
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
2871
2871
|
value = true;
|
|
2872
2872
|
}
|
|
2873
|
-
return /* @__PURE__ */ (0,
|
|
2874
|
-
/* @__PURE__ */ (0,
|
|
2875
|
-
props?.attributes?.label && /* @__PURE__ */ (0,
|
|
2873
|
+
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: [
|
|
2874
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "min-w-0", children: [
|
|
2875
|
+
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
2876
2876
|
"label",
|
|
2877
2877
|
{
|
|
2878
2878
|
htmlFor: props.name,
|
|
2879
2879
|
className: "inline-block text-sm font-semibold text-slate-800",
|
|
2880
2880
|
children: [
|
|
2881
2881
|
props.attributes.label,
|
|
2882
|
-
props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2882
|
+
props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "bg-error-weak", children: "*" })
|
|
2883
2883
|
]
|
|
2884
2884
|
}
|
|
2885
2885
|
),
|
|
2886
|
-
/* @__PURE__ */ (0,
|
|
2886
|
+
/* @__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
2887
|
] }),
|
|
2888
|
-
/* @__PURE__ */ (0,
|
|
2888
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
2889
2889
|
"label",
|
|
2890
2890
|
{
|
|
2891
2891
|
htmlFor: props.name,
|
|
2892
2892
|
className: "relative inline-flex shrink-0 cursor-pointer items-center peer-disabled:cursor-not-allowed",
|
|
2893
2893
|
children: [
|
|
2894
|
-
/* @__PURE__ */ (0,
|
|
2894
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2895
2895
|
"input",
|
|
2896
2896
|
{
|
|
2897
2897
|
type: "checkbox",
|
|
@@ -2904,13 +2904,13 @@ var init_SwitchInput = __esm({
|
|
|
2904
2904
|
className: "peer sr-only"
|
|
2905
2905
|
}
|
|
2906
2906
|
),
|
|
2907
|
-
/* @__PURE__ */ (0,
|
|
2907
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2908
2908
|
"div",
|
|
2909
2909
|
{
|
|
2910
2910
|
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
2911
|
}
|
|
2912
2912
|
),
|
|
2913
|
-
/* @__PURE__ */ (0,
|
|
2913
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2914
2914
|
"div",
|
|
2915
2915
|
{
|
|
2916
2916
|
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 +3008,15 @@ var init_DateTimeUtility = __esm({
|
|
|
3008
3008
|
});
|
|
3009
3009
|
|
|
3010
3010
|
// src/components/controls/edit/DateInput.tsx
|
|
3011
|
-
var
|
|
3011
|
+
var import_react38, import_jsx_runtime47, DateInput, DateInput_default;
|
|
3012
3012
|
var init_DateInput = __esm({
|
|
3013
3013
|
"src/components/controls/edit/DateInput.tsx"() {
|
|
3014
3014
|
"use strict";
|
|
3015
|
-
|
|
3015
|
+
import_react38 = require("react");
|
|
3016
3016
|
init_DateTimeUtility();
|
|
3017
|
-
|
|
3017
|
+
import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3018
3018
|
DateInput = (props) => {
|
|
3019
|
-
const value = (0,
|
|
3019
|
+
const value = (0, import_react38.useMemo)(() => {
|
|
3020
3020
|
if (props.value === void 0 || props.value === null || props.value === "") {
|
|
3021
3021
|
return "";
|
|
3022
3022
|
}
|
|
@@ -3048,11 +3048,11 @@ var init_DateInput = __esm({
|
|
|
3048
3048
|
groupKey: props.groupKey
|
|
3049
3049
|
});
|
|
3050
3050
|
};
|
|
3051
|
-
return /* @__PURE__ */ (0,
|
|
3052
|
-
props.attributes?.label && /* @__PURE__ */ (0,
|
|
3051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("label", { className: "block mb-1", children: [
|
|
3052
|
+
props.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-sm font-medium", children: props.attributes.label }),
|
|
3053
3053
|
" ",
|
|
3054
|
-
props.attributes?.label && props.attributes.required && /* @__PURE__ */ (0,
|
|
3055
|
-
/* @__PURE__ */ (0,
|
|
3054
|
+
props.attributes?.label && props.attributes.required && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
3055
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3056
3056
|
"input",
|
|
3057
3057
|
{
|
|
3058
3058
|
type: "date",
|
|
@@ -3066,7 +3066,7 @@ var init_DateInput = __esm({
|
|
|
3066
3066
|
className: `peer input mt-1 py-1.5 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`
|
|
3067
3067
|
}
|
|
3068
3068
|
),
|
|
3069
|
-
/* @__PURE__ */ (0,
|
|
3069
|
+
/* @__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
3070
|
] });
|
|
3071
3071
|
};
|
|
3072
3072
|
DateInput_default = DateInput;
|
|
@@ -3074,16 +3074,16 @@ var init_DateInput = __esm({
|
|
|
3074
3074
|
});
|
|
3075
3075
|
|
|
3076
3076
|
// src/components/controls/edit/RadioInput.tsx
|
|
3077
|
-
var
|
|
3077
|
+
var import_react39, import_jsx_runtime48, RadioInput, RadioInput_default;
|
|
3078
3078
|
var init_RadioInput = __esm({
|
|
3079
3079
|
"src/components/controls/edit/RadioInput.tsx"() {
|
|
3080
3080
|
"use strict";
|
|
3081
|
-
|
|
3081
|
+
import_react39 = require("react");
|
|
3082
3082
|
init_Icon();
|
|
3083
|
-
|
|
3083
|
+
import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3084
3084
|
RadioInput = (props) => {
|
|
3085
|
-
const [list, setList] = (0,
|
|
3086
|
-
(0,
|
|
3085
|
+
const [list, setList] = (0, import_react39.useState)([]);
|
|
3086
|
+
(0, import_react39.useEffect)(() => {
|
|
3087
3087
|
async function loadData() {
|
|
3088
3088
|
if (props.dataset) {
|
|
3089
3089
|
setList(props.dataset);
|
|
@@ -3125,22 +3125,22 @@ var init_RadioInput = __esm({
|
|
|
3125
3125
|
});
|
|
3126
3126
|
}
|
|
3127
3127
|
};
|
|
3128
|
-
return /* @__PURE__ */ (0,
|
|
3129
|
-
/* @__PURE__ */ (0,
|
|
3130
|
-
/* @__PURE__ */ (0,
|
|
3128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "block", children: [
|
|
3129
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-sm font-medium", children: props.attributes?.label }),
|
|
3130
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "flex flex-col gap-3", children: list.map((item, index) => {
|
|
3131
3131
|
const itemValue = item[props.dataKeyFieldName];
|
|
3132
3132
|
const isSelected = String(itemValue) === String(props.value ?? "");
|
|
3133
3133
|
const isRecommended = props.dataRecommendedValue !== void 0 && String(itemValue) === String(props.dataRecommendedValue);
|
|
3134
3134
|
const resultClassName = isSelected ? isRecommended ? "bg-success" : props.dataRecommendedValue ? "bg-alert" : "border-transparent" : "border-transparent";
|
|
3135
3135
|
const iconName = isSelected && props.dataRecommendedValue ? isRecommended ? "checkCircle" : "xCircle" : void 0;
|
|
3136
3136
|
const inputId = `${props.name}-${props.index ?? 0}-id-${index}`;
|
|
3137
|
-
return /* @__PURE__ */ (0,
|
|
3137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
3138
3138
|
"div",
|
|
3139
3139
|
{
|
|
3140
3140
|
className: `font-normal flex items-center justify-between gap-4 cursor-pointer border rounded p-2 ${resultClassName}`,
|
|
3141
3141
|
children: [
|
|
3142
|
-
/* @__PURE__ */ (0,
|
|
3143
|
-
/* @__PURE__ */ (0,
|
|
3142
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex gap-4 items-start", children: [
|
|
3143
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3144
3144
|
"input",
|
|
3145
3145
|
{
|
|
3146
3146
|
type: "radio",
|
|
@@ -3154,15 +3154,15 @@ var init_RadioInput = __esm({
|
|
|
3154
3154
|
required: props.attributes?.required
|
|
3155
3155
|
}
|
|
3156
3156
|
),
|
|
3157
|
-
/* @__PURE__ */ (0,
|
|
3157
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("label", { className: "text-body-950 pr-2", htmlFor: inputId, children: item[props.dataTextFieldName] })
|
|
3158
3158
|
] }),
|
|
3159
|
-
iconName && /* @__PURE__ */ (0,
|
|
3159
|
+
iconName && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon_default, { className: "w-5 h-5 text-success", name: iconName })
|
|
3160
3160
|
]
|
|
3161
3161
|
},
|
|
3162
3162
|
String(itemValue)
|
|
3163
3163
|
);
|
|
3164
3164
|
}) }),
|
|
3165
|
-
/* @__PURE__ */ (0,
|
|
3165
|
+
/* @__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
3166
|
] });
|
|
3167
3167
|
};
|
|
3168
3168
|
RadioInput_default = RadioInput;
|
|
@@ -3170,15 +3170,15 @@ var init_RadioInput = __esm({
|
|
|
3170
3170
|
});
|
|
3171
3171
|
|
|
3172
3172
|
// src/components/controls/edit/Switcher.tsx
|
|
3173
|
-
var
|
|
3173
|
+
var import_react40, import_jsx_runtime49, Switcher, Switcher_default;
|
|
3174
3174
|
var init_Switcher = __esm({
|
|
3175
3175
|
"src/components/controls/edit/Switcher.tsx"() {
|
|
3176
3176
|
"use strict";
|
|
3177
|
-
|
|
3178
|
-
|
|
3177
|
+
import_react40 = require("react");
|
|
3178
|
+
import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3179
3179
|
Switcher = (props) => {
|
|
3180
|
-
const [list, setList] = (0,
|
|
3181
|
-
(0,
|
|
3180
|
+
const [list, setList] = (0, import_react40.useState)([]);
|
|
3181
|
+
(0, import_react40.useEffect)(() => {
|
|
3182
3182
|
async function loadData() {
|
|
3183
3183
|
if (props.dataset) {
|
|
3184
3184
|
setList(props.dataset);
|
|
@@ -3219,9 +3219,9 @@ var init_Switcher = __esm({
|
|
|
3219
3219
|
});
|
|
3220
3220
|
};
|
|
3221
3221
|
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,
|
|
3222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("label", { className: "block mb-1", children: [
|
|
3223
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-sm font-medium", children: props.attributes?.label }),
|
|
3224
|
+
list.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3225
3225
|
"input",
|
|
3226
3226
|
{
|
|
3227
3227
|
type: "text",
|
|
@@ -3234,7 +3234,7 @@ var init_Switcher = __esm({
|
|
|
3234
3234
|
disabled: props.attributes?.readOnly,
|
|
3235
3235
|
className: `peer input mt-1 py-1.5 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`
|
|
3236
3236
|
}
|
|
3237
|
-
) : /* @__PURE__ */ (0,
|
|
3237
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
3238
3238
|
"select",
|
|
3239
3239
|
{
|
|
3240
3240
|
name: props.name,
|
|
@@ -3245,8 +3245,8 @@ var init_Switcher = __esm({
|
|
|
3245
3245
|
disabled: props.attributes?.readOnly,
|
|
3246
3246
|
className: `peer select my-1 py-1 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`,
|
|
3247
3247
|
children: [
|
|
3248
|
-
/* @__PURE__ */ (0,
|
|
3249
|
-
list.map((item) => /* @__PURE__ */ (0,
|
|
3248
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("option", { value: "", children: props.attributes?.placeholder || "Select" }),
|
|
3249
|
+
list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3250
3250
|
"option",
|
|
3251
3251
|
{
|
|
3252
3252
|
value: item[props.dataKeyFieldName],
|
|
@@ -3257,7 +3257,7 @@ var init_Switcher = __esm({
|
|
|
3257
3257
|
]
|
|
3258
3258
|
}
|
|
3259
3259
|
),
|
|
3260
|
-
/* @__PURE__ */ (0,
|
|
3260
|
+
/* @__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
3261
|
] });
|
|
3262
3262
|
};
|
|
3263
3263
|
Switcher_default = Switcher;
|
|
@@ -3265,14 +3265,14 @@ var init_Switcher = __esm({
|
|
|
3265
3265
|
});
|
|
3266
3266
|
|
|
3267
3267
|
// src/components/controls/edit/ReferenceInput.tsx
|
|
3268
|
-
var
|
|
3268
|
+
var import_jsx_runtime50, ReferenceInput, ReferenceInput_default;
|
|
3269
3269
|
var init_ReferenceInput = __esm({
|
|
3270
3270
|
"src/components/controls/edit/ReferenceInput.tsx"() {
|
|
3271
3271
|
"use strict";
|
|
3272
3272
|
init_SelectWithSearchInput();
|
|
3273
|
-
|
|
3273
|
+
import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3274
3274
|
ReferenceInput = (props) => {
|
|
3275
|
-
return /* @__PURE__ */ (0,
|
|
3275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectWithSearchInput_default, { ...props });
|
|
3276
3276
|
};
|
|
3277
3277
|
ReferenceInput_default = ReferenceInput;
|
|
3278
3278
|
}
|
|
@@ -3283,12 +3283,12 @@ var InputControlClient_exports = {};
|
|
|
3283
3283
|
__export(InputControlClient_exports, {
|
|
3284
3284
|
default: () => InputControlClient_default
|
|
3285
3285
|
});
|
|
3286
|
-
var
|
|
3286
|
+
var import_react41, import_jsx_runtime51, InputControl, InputControlClient_default;
|
|
3287
3287
|
var init_InputControlClient = __esm({
|
|
3288
3288
|
"src/components/controls/edit/InputControlClient.tsx"() {
|
|
3289
3289
|
"use strict";
|
|
3290
3290
|
"use client";
|
|
3291
|
-
|
|
3291
|
+
import_react41 = __toESM(require("react"));
|
|
3292
3292
|
init_MultilineTextInput();
|
|
3293
3293
|
init_LineTextInput();
|
|
3294
3294
|
init_MoneyInput();
|
|
@@ -3312,8 +3312,8 @@ var init_InputControlClient = __esm({
|
|
|
3312
3312
|
init_RadioInput();
|
|
3313
3313
|
init_Switcher();
|
|
3314
3314
|
init_ReferenceInput();
|
|
3315
|
-
|
|
3316
|
-
InputControl =
|
|
3315
|
+
import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3316
|
+
InputControl = import_react41.default.forwardRef(
|
|
3317
3317
|
(props, ref) => {
|
|
3318
3318
|
const ControlComponents = {
|
|
3319
3319
|
[InputControlType_default.lineTextInput]: LineTextInput_default,
|
|
@@ -3341,7 +3341,7 @@ var init_InputControlClient = __esm({
|
|
|
3341
3341
|
[InputControlType_default.referenceInput]: ReferenceInput_default
|
|
3342
3342
|
};
|
|
3343
3343
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
3344
|
-
return /* @__PURE__ */ (0,
|
|
3344
|
+
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
3345
|
}
|
|
3346
3346
|
);
|
|
3347
3347
|
InputControl.displayName = "InputControl";
|
|
@@ -3568,29 +3568,29 @@ var LinkNodeButton_exports = {};
|
|
|
3568
3568
|
__export(LinkNodeButton_exports, {
|
|
3569
3569
|
default: () => LinkNodeButton_default
|
|
3570
3570
|
});
|
|
3571
|
-
var
|
|
3571
|
+
var import_react42, import_jsx_runtime55, LinkNodeButton, LinkNodeButton_default;
|
|
3572
3572
|
var init_LinkNodeButton = __esm({
|
|
3573
3573
|
"src/components/pageRenderingEngine/nodes/LinkNodeButton.tsx"() {
|
|
3574
3574
|
"use strict";
|
|
3575
3575
|
"use client";
|
|
3576
|
-
|
|
3576
|
+
import_react42 = require("react");
|
|
3577
3577
|
init_Button();
|
|
3578
3578
|
init_ServiceClient();
|
|
3579
3579
|
init_ToastService();
|
|
3580
|
-
|
|
3580
|
+
import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3581
3581
|
LinkNodeButton = (props) => {
|
|
3582
3582
|
const { node, dataitem, children, linkText, linkType, linkUrl } = props;
|
|
3583
|
-
const [isLoading, setIsLoading] = (0,
|
|
3584
|
-
const [successMessage, setSuccessMessage] = (0,
|
|
3583
|
+
const [isLoading, setIsLoading] = (0, import_react42.useState)(false);
|
|
3584
|
+
const [successMessage, setSuccessMessage] = (0, import_react42.useState)(null);
|
|
3585
3585
|
console.log("LinkNodeButton props:", props);
|
|
3586
|
-
const extractFieldNames = (0,
|
|
3586
|
+
const extractFieldNames = (0, import_react42.useCallback)((template) => {
|
|
3587
3587
|
if (!template) return [];
|
|
3588
3588
|
const regex = /\{(\{\})?([a-zA-Z_$][a-zA-Z0-9_$]*)(?:\}\})?\}/g;
|
|
3589
3589
|
const matches = Array.from(template.matchAll(regex));
|
|
3590
3590
|
const fieldNames = matches.map((match) => match[2] || match[1]).filter((name, index, self) => self.indexOf(name) === index);
|
|
3591
3591
|
return fieldNames;
|
|
3592
3592
|
}, []);
|
|
3593
|
-
const replaceTemplateVariables = (0,
|
|
3593
|
+
const replaceTemplateVariables = (0, import_react42.useCallback)(
|
|
3594
3594
|
(template, responseData) => {
|
|
3595
3595
|
if (!template) return template;
|
|
3596
3596
|
let result = template;
|
|
@@ -3622,7 +3622,7 @@ var init_LinkNodeButton = __esm({
|
|
|
3622
3622
|
},
|
|
3623
3623
|
[props.routeParameters, dataitem, extractFieldNames]
|
|
3624
3624
|
);
|
|
3625
|
-
const getNestedValue7 = (0,
|
|
3625
|
+
const getNestedValue7 = (0, import_react42.useCallback)((obj, path) => {
|
|
3626
3626
|
if (!obj || !path) return void 0;
|
|
3627
3627
|
if (obj[path] !== void 0) {
|
|
3628
3628
|
return obj[path];
|
|
@@ -3637,7 +3637,7 @@ var init_LinkNodeButton = __esm({
|
|
|
3637
3637
|
}
|
|
3638
3638
|
return current;
|
|
3639
3639
|
}, []);
|
|
3640
|
-
const onClick = (0,
|
|
3640
|
+
const onClick = (0, import_react42.useCallback)(async () => {
|
|
3641
3641
|
if (!node.postUrl) {
|
|
3642
3642
|
return {
|
|
3643
3643
|
isSuccessful: false,
|
|
@@ -3744,32 +3744,32 @@ var init_LinkNodeButton = __esm({
|
|
|
3744
3744
|
return children;
|
|
3745
3745
|
}
|
|
3746
3746
|
if (linkText) {
|
|
3747
|
-
return /* @__PURE__ */ (0,
|
|
3747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: linkText });
|
|
3748
3748
|
}
|
|
3749
3749
|
return node.title || "Button";
|
|
3750
3750
|
};
|
|
3751
3751
|
const fontSize = node.children?.[0]?.style?.match(/font-size:\s*([^;]+)/)?.[1];
|
|
3752
|
-
return /* @__PURE__ */ (0,
|
|
3752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "link-button-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3753
3753
|
Button_default,
|
|
3754
3754
|
{
|
|
3755
3755
|
ButtonType: linkType,
|
|
3756
3756
|
onClick,
|
|
3757
3757
|
disabled: isLoading || !!successMessage,
|
|
3758
3758
|
className: "w-full",
|
|
3759
|
-
children: successMessage ? /* @__PURE__ */ (0,
|
|
3759
|
+
children: successMessage ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
3760
3760
|
"span",
|
|
3761
3761
|
{
|
|
3762
3762
|
style: fontSize ? { fontSize } : void 0,
|
|
3763
3763
|
className: "inline-flex items-center gap-2",
|
|
3764
3764
|
children: [
|
|
3765
|
-
/* @__PURE__ */ (0,
|
|
3765
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3766
3766
|
"svg",
|
|
3767
3767
|
{
|
|
3768
3768
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3769
3769
|
viewBox: "0 0 20 20",
|
|
3770
3770
|
fill: "currentColor",
|
|
3771
3771
|
className: "w-5 h-5",
|
|
3772
|
-
children: /* @__PURE__ */ (0,
|
|
3772
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3773
3773
|
"path",
|
|
3774
3774
|
{
|
|
3775
3775
|
fillRule: "evenodd",
|
|
@@ -3779,7 +3779,7 @@ var init_LinkNodeButton = __esm({
|
|
|
3779
3779
|
)
|
|
3780
3780
|
}
|
|
3781
3781
|
),
|
|
3782
|
-
/* @__PURE__ */ (0,
|
|
3782
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: successMessage })
|
|
3783
3783
|
]
|
|
3784
3784
|
}
|
|
3785
3785
|
) : renderButtonContent()
|
|
@@ -3796,9 +3796,9 @@ __export(CopyButton_exports, {
|
|
|
3796
3796
|
default: () => CopyButton
|
|
3797
3797
|
});
|
|
3798
3798
|
function CopyButton({ text }) {
|
|
3799
|
-
const [copied, setCopied] = (0,
|
|
3800
|
-
const timeoutRef = (0,
|
|
3801
|
-
(0,
|
|
3799
|
+
const [copied, setCopied] = (0, import_react49.useState)(false);
|
|
3800
|
+
const timeoutRef = (0, import_react49.useRef)(null);
|
|
3801
|
+
(0, import_react49.useEffect)(() => {
|
|
3802
3802
|
return () => {
|
|
3803
3803
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3804
3804
|
};
|
|
@@ -3813,13 +3813,13 @@ function CopyButton({ text }) {
|
|
|
3813
3813
|
console.error("Failed to copy: ", err);
|
|
3814
3814
|
}
|
|
3815
3815
|
};
|
|
3816
|
-
return /* @__PURE__ */ (0,
|
|
3816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
3817
3817
|
"button",
|
|
3818
3818
|
{
|
|
3819
3819
|
onClick: handleCopy,
|
|
3820
3820
|
className: "flex gap-1 items-center hover:text-white transition",
|
|
3821
3821
|
children: [
|
|
3822
|
-
/* @__PURE__ */ (0,
|
|
3822
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3823
3823
|
"svg",
|
|
3824
3824
|
{
|
|
3825
3825
|
width: "16",
|
|
@@ -3827,7 +3827,7 @@ function CopyButton({ text }) {
|
|
|
3827
3827
|
viewBox: "0 0 24 24",
|
|
3828
3828
|
className: "w-4 h-4",
|
|
3829
3829
|
fill: "currentColor",
|
|
3830
|
-
children: /* @__PURE__ */ (0,
|
|
3830
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3831
3831
|
"path",
|
|
3832
3832
|
{
|
|
3833
3833
|
fillRule: "evenodd",
|
|
@@ -3842,54 +3842,54 @@ function CopyButton({ text }) {
|
|
|
3842
3842
|
}
|
|
3843
3843
|
);
|
|
3844
3844
|
}
|
|
3845
|
-
var
|
|
3845
|
+
var import_react49, import_jsx_runtime65;
|
|
3846
3846
|
var init_CopyButton = __esm({
|
|
3847
3847
|
"src/components/CopyButton.tsx"() {
|
|
3848
3848
|
"use strict";
|
|
3849
3849
|
"use client";
|
|
3850
|
-
|
|
3851
|
-
|
|
3850
|
+
import_react49 = require("react");
|
|
3851
|
+
import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3852
3852
|
}
|
|
3853
3853
|
});
|
|
3854
3854
|
|
|
3855
3855
|
// src/components/IFrameLoaderView.tsx
|
|
3856
|
-
var
|
|
3856
|
+
var import_react52, import_jsx_runtime69, IFrameLoaderView, IFrameLoaderView_default;
|
|
3857
3857
|
var init_IFrameLoaderView = __esm({
|
|
3858
3858
|
"src/components/IFrameLoaderView.tsx"() {
|
|
3859
3859
|
"use strict";
|
|
3860
|
-
|
|
3861
|
-
|
|
3860
|
+
import_react52 = __toESM(require("react"));
|
|
3861
|
+
import_jsx_runtime69 = require("react/jsx-runtime");
|
|
3862
3862
|
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,
|
|
3863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_react52.default.Fragment, { children: [
|
|
3864
|
+
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: [
|
|
3865
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
3866
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
3867
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ml-2", children: [
|
|
3868
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
3869
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
3870
3870
|
] })
|
|
3871
3871
|
] }),
|
|
3872
|
-
/* @__PURE__ */ (0,
|
|
3873
|
-
/* @__PURE__ */ (0,
|
|
3874
|
-
/* @__PURE__ */ (0,
|
|
3875
|
-
/* @__PURE__ */ (0,
|
|
3876
|
-
/* @__PURE__ */ (0,
|
|
3877
|
-
/* @__PURE__ */ (0,
|
|
3878
|
-
/* @__PURE__ */ (0,
|
|
3872
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
3873
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "animate-pulse", children: [
|
|
3874
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3875
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3876
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3877
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3878
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3879
3879
|
] }),
|
|
3880
|
-
/* @__PURE__ */ (0,
|
|
3881
|
-
/* @__PURE__ */ (0,
|
|
3882
|
-
/* @__PURE__ */ (0,
|
|
3883
|
-
/* @__PURE__ */ (0,
|
|
3884
|
-
/* @__PURE__ */ (0,
|
|
3885
|
-
/* @__PURE__ */ (0,
|
|
3880
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "animate-pulse", children: [
|
|
3881
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3882
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3883
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3884
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3885
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3886
3886
|
] }),
|
|
3887
|
-
/* @__PURE__ */ (0,
|
|
3888
|
-
/* @__PURE__ */ (0,
|
|
3889
|
-
/* @__PURE__ */ (0,
|
|
3890
|
-
/* @__PURE__ */ (0,
|
|
3891
|
-
/* @__PURE__ */ (0,
|
|
3892
|
-
/* @__PURE__ */ (0,
|
|
3887
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "animate-pulse", children: [
|
|
3888
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3889
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3890
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3891
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3892
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3893
3893
|
] })
|
|
3894
3894
|
] })
|
|
3895
3895
|
] }) }),
|
|
@@ -3905,34 +3905,34 @@ var IframeClient_exports = {};
|
|
|
3905
3905
|
__export(IframeClient_exports, {
|
|
3906
3906
|
default: () => IframeClient_default
|
|
3907
3907
|
});
|
|
3908
|
-
var
|
|
3908
|
+
var import_react53, import_jsx_runtime70, IframeClient, IframeClient_default;
|
|
3909
3909
|
var init_IframeClient = __esm({
|
|
3910
3910
|
"src/components/pageRenderingEngine/nodes/IframeClient.tsx"() {
|
|
3911
3911
|
"use strict";
|
|
3912
3912
|
"use client";
|
|
3913
|
-
|
|
3913
|
+
import_react53 = __toESM(require("react"));
|
|
3914
3914
|
init_IFrameLoaderView();
|
|
3915
|
-
|
|
3916
|
-
IframeClient = ({ src
|
|
3917
|
-
const iframeRef = (0,
|
|
3918
|
-
const [iframeHeight, setIframeHeight] = (0,
|
|
3919
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
3920
|
-
(0,
|
|
3915
|
+
import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3916
|
+
IframeClient = ({ src }) => {
|
|
3917
|
+
const iframeRef = (0, import_react53.useRef)(null);
|
|
3918
|
+
const [iframeHeight, setIframeHeight] = (0, import_react53.useState)("100%");
|
|
3919
|
+
const [isDataFound, setIsDataFound] = (0, import_react53.useState)(null);
|
|
3920
|
+
(0, import_react53.useEffect)(() => {
|
|
3921
3921
|
const handleReceiveMessage = (event) => {
|
|
3922
3922
|
const eventName = event?.data?.eventName;
|
|
3923
3923
|
const payload = event?.data?.payload;
|
|
3924
3924
|
if (eventName === "SET_HEIGHT" && payload?.height) {
|
|
3925
|
-
let
|
|
3925
|
+
let height = 500;
|
|
3926
3926
|
if (payload.height > 500) {
|
|
3927
|
-
|
|
3927
|
+
height = payload.height + 50;
|
|
3928
3928
|
}
|
|
3929
|
-
setIframeHeight(`${
|
|
3929
|
+
setIframeHeight(`${height}px`);
|
|
3930
3930
|
}
|
|
3931
3931
|
};
|
|
3932
3932
|
window.addEventListener("message", handleReceiveMessage);
|
|
3933
3933
|
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
3934
3934
|
}, []);
|
|
3935
|
-
(0,
|
|
3935
|
+
(0, import_react53.useEffect)(() => {
|
|
3936
3936
|
const handleResize = () => {
|
|
3937
3937
|
if (iframeRef.current) {
|
|
3938
3938
|
iframeRef.current.contentWindow?.postMessage({ eventName: "RESIZE" }, "*");
|
|
@@ -3944,16 +3944,15 @@ var init_IframeClient = __esm({
|
|
|
3944
3944
|
const handleIframeLoad = () => {
|
|
3945
3945
|
setIsDataFound(true);
|
|
3946
3946
|
};
|
|
3947
|
-
return /* @__PURE__ */ (0,
|
|
3947
|
+
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
3948
|
"iframe",
|
|
3949
3949
|
{
|
|
3950
3950
|
ref: iframeRef,
|
|
3951
3951
|
src,
|
|
3952
|
-
className: " border-none",
|
|
3952
|
+
className: "w-full h-full border-none",
|
|
3953
3953
|
scrolling: "no",
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
width
|
|
3954
|
+
style: { height: iframeHeight },
|
|
3955
|
+
onLoad: handleIframeLoad
|
|
3957
3956
|
}
|
|
3958
3957
|
) }) });
|
|
3959
3958
|
};
|
|
@@ -4165,21 +4164,21 @@ var Pagination_exports = {};
|
|
|
4165
4164
|
__export(Pagination_exports, {
|
|
4166
4165
|
default: () => Pagination_default
|
|
4167
4166
|
});
|
|
4168
|
-
var
|
|
4167
|
+
var import_react54, import_jsx_runtime75, Pagination, Pagination_default;
|
|
4169
4168
|
var init_Pagination = __esm({
|
|
4170
4169
|
"src/components/Pagination.tsx"() {
|
|
4171
4170
|
"use strict";
|
|
4172
4171
|
"use client";
|
|
4173
|
-
|
|
4172
|
+
import_react54 = require("react");
|
|
4174
4173
|
init_OdataBuilder();
|
|
4175
4174
|
init_Icon();
|
|
4176
4175
|
init_StyleTypes();
|
|
4177
4176
|
init_InputControlType();
|
|
4178
4177
|
init_Hyperlink();
|
|
4179
|
-
|
|
4178
|
+
import_jsx_runtime75 = require("react/jsx-runtime");
|
|
4180
4179
|
Pagination = (props) => {
|
|
4181
4180
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
4182
|
-
const builder = (0,
|
|
4181
|
+
const builder = (0, import_react54.useMemo)(() => {
|
|
4183
4182
|
const b = new OdataBuilder(path);
|
|
4184
4183
|
if (query) b.setQuery(query);
|
|
4185
4184
|
return b;
|
|
@@ -4220,7 +4219,7 @@ var init_Pagination = __esm({
|
|
|
4220
4219
|
return range;
|
|
4221
4220
|
};
|
|
4222
4221
|
const paginationRange = getPaginationRange();
|
|
4223
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */ (0,
|
|
4222
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4224
4223
|
Hyperlink,
|
|
4225
4224
|
{
|
|
4226
4225
|
linkType: "Link" /* Link */,
|
|
@@ -4235,9 +4234,9 @@ var init_Pagination = __esm({
|
|
|
4235
4234
|
);
|
|
4236
4235
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
4237
4236
|
if (disabled) {
|
|
4238
|
-
return /* @__PURE__ */ (0,
|
|
4237
|
+
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 });
|
|
4239
4238
|
}
|
|
4240
|
-
return /* @__PURE__ */ (0,
|
|
4239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4241
4240
|
Hyperlink,
|
|
4242
4241
|
{
|
|
4243
4242
|
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",
|
|
@@ -4247,35 +4246,35 @@ var init_Pagination = __esm({
|
|
|
4247
4246
|
);
|
|
4248
4247
|
};
|
|
4249
4248
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
4250
|
-
return /* @__PURE__ */ (0,
|
|
4251
|
-
/* @__PURE__ */ (0,
|
|
4252
|
-
/* @__PURE__ */ (0,
|
|
4249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "py-6 border-t bg-default", children: [
|
|
4250
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
4251
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "text-sm", children: [
|
|
4253
4252
|
"Showing ",
|
|
4254
|
-
/* @__PURE__ */ (0,
|
|
4253
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("span", { className: "font-semibold", children: [
|
|
4255
4254
|
startItem,
|
|
4256
4255
|
"-",
|
|
4257
4256
|
endItem
|
|
4258
4257
|
] }),
|
|
4259
4258
|
" ",
|
|
4260
4259
|
"out of ",
|
|
4261
|
-
/* @__PURE__ */ (0,
|
|
4260
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
4262
4261
|
" results"
|
|
4263
4262
|
] }),
|
|
4264
|
-
totalPages > 1 && /* @__PURE__ */ (0,
|
|
4265
|
-
/* @__PURE__ */ (0,
|
|
4263
|
+
totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "flex items-center space-x-1", children: [
|
|
4264
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
4266
4265
|
NavigationButton,
|
|
4267
4266
|
{
|
|
4268
4267
|
page: activePageNumber - 1,
|
|
4269
4268
|
disabled: activePageNumber === 1,
|
|
4270
4269
|
children: [
|
|
4271
|
-
/* @__PURE__ */ (0,
|
|
4272
|
-
/* @__PURE__ */ (0,
|
|
4270
|
+
/* @__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" }) }),
|
|
4271
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "text-sm", children: "Prev" })
|
|
4273
4272
|
]
|
|
4274
4273
|
}
|
|
4275
4274
|
),
|
|
4276
4275
|
paginationRange.map((item, index) => {
|
|
4277
4276
|
if (item === "...") {
|
|
4278
|
-
return /* @__PURE__ */ (0,
|
|
4277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4279
4278
|
"span",
|
|
4280
4279
|
{
|
|
4281
4280
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -4285,23 +4284,23 @@ var init_Pagination = __esm({
|
|
|
4285
4284
|
);
|
|
4286
4285
|
}
|
|
4287
4286
|
const page = item;
|
|
4288
|
-
return /* @__PURE__ */ (0,
|
|
4287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(PageButton, { page, children: page }, page);
|
|
4289
4288
|
}),
|
|
4290
|
-
/* @__PURE__ */ (0,
|
|
4289
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
4291
4290
|
NavigationButton,
|
|
4292
4291
|
{
|
|
4293
4292
|
page: activePageNumber + 1,
|
|
4294
4293
|
disabled: activePageNumber === totalPages,
|
|
4295
4294
|
children: [
|
|
4296
|
-
/* @__PURE__ */ (0,
|
|
4297
|
-
/* @__PURE__ */ (0,
|
|
4295
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "text-sm", children: "Next" }),
|
|
4296
|
+
/* @__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" }) })
|
|
4298
4297
|
]
|
|
4299
4298
|
}
|
|
4300
4299
|
)
|
|
4301
4300
|
] }),
|
|
4302
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0,
|
|
4303
|
-
/* @__PURE__ */ (0,
|
|
4304
|
-
/* @__PURE__ */ (0,
|
|
4301
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
4302
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "text-sm", children: "Go to:" }),
|
|
4303
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4305
4304
|
"input",
|
|
4306
4305
|
{
|
|
4307
4306
|
type: "number",
|
|
@@ -4322,9 +4321,9 @@ var init_Pagination = __esm({
|
|
|
4322
4321
|
) })
|
|
4323
4322
|
] })
|
|
4324
4323
|
] }),
|
|
4325
|
-
showPageSizeSelector && /* @__PURE__ */ (0,
|
|
4326
|
-
/* @__PURE__ */ (0,
|
|
4327
|
-
/* @__PURE__ */ (0,
|
|
4324
|
+
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: [
|
|
4325
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "text-sm", children: "Show:" }),
|
|
4326
|
+
/* @__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)(
|
|
4328
4327
|
Hyperlink,
|
|
4329
4328
|
{
|
|
4330
4329
|
className: `
|
|
@@ -4336,7 +4335,7 @@ var init_Pagination = __esm({
|
|
|
4336
4335
|
},
|
|
4337
4336
|
size
|
|
4338
4337
|
)) }),
|
|
4339
|
-
/* @__PURE__ */ (0,
|
|
4338
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "text-sm", children: "per page" })
|
|
4340
4339
|
] }) })
|
|
4341
4340
|
] });
|
|
4342
4341
|
};
|
|
@@ -4349,13 +4348,13 @@ var Slider_exports = {};
|
|
|
4349
4348
|
__export(Slider_exports, {
|
|
4350
4349
|
default: () => Slider_default
|
|
4351
4350
|
});
|
|
4352
|
-
var
|
|
4351
|
+
var import_react55, import_jsx_runtime76, Slider, ArrowButton, ProgressPill, Slider_default;
|
|
4353
4352
|
var init_Slider = __esm({
|
|
4354
4353
|
"src/components/Slider.tsx"() {
|
|
4355
4354
|
"use strict";
|
|
4356
4355
|
"use client";
|
|
4357
|
-
|
|
4358
|
-
|
|
4356
|
+
import_react55 = __toESM(require("react"));
|
|
4357
|
+
import_jsx_runtime76 = require("react/jsx-runtime");
|
|
4359
4358
|
Slider = ({
|
|
4360
4359
|
children,
|
|
4361
4360
|
slidesToShow = 4,
|
|
@@ -4373,13 +4372,13 @@ var init_Slider = __esm({
|
|
|
4373
4372
|
pillStyle = "cumulative",
|
|
4374
4373
|
progressPosition = "bottom"
|
|
4375
4374
|
}) => {
|
|
4376
|
-
const [currentSlide, setCurrentSlide] = (0,
|
|
4377
|
-
const [transition, setTransition] = (0,
|
|
4378
|
-
const [slidesToShowState, setSlidesToShowState] = (0,
|
|
4375
|
+
const [currentSlide, setCurrentSlide] = (0, import_react55.useState)(0);
|
|
4376
|
+
const [transition, setTransition] = (0, import_react55.useState)(true);
|
|
4377
|
+
const [slidesToShowState, setSlidesToShowState] = (0, import_react55.useState)(
|
|
4379
4378
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
4380
4379
|
);
|
|
4381
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
4382
|
-
(0,
|
|
4380
|
+
const [isPlaying, setIsPlaying] = (0, import_react55.useState)(autoplay);
|
|
4381
|
+
(0, import_react55.useEffect)(() => {
|
|
4383
4382
|
if (typeof slidesToShow === "number") return;
|
|
4384
4383
|
const handleResize = () => {
|
|
4385
4384
|
if (window.innerWidth >= 1024) {
|
|
@@ -4394,7 +4393,7 @@ var init_Slider = __esm({
|
|
|
4394
4393
|
window.addEventListener("resize", handleResize);
|
|
4395
4394
|
return () => window.removeEventListener("resize", handleResize);
|
|
4396
4395
|
}, [slidesToShow]);
|
|
4397
|
-
(0,
|
|
4396
|
+
(0, import_react55.useEffect)(() => {
|
|
4398
4397
|
if (!autoplay) return;
|
|
4399
4398
|
const timer = setInterval(() => {
|
|
4400
4399
|
if (isPlaying) {
|
|
@@ -4403,7 +4402,7 @@ var init_Slider = __esm({
|
|
|
4403
4402
|
}, autoplay_speed);
|
|
4404
4403
|
return () => clearInterval(timer);
|
|
4405
4404
|
}, [autoplay, autoplay_speed, currentSlide, isPlaying]);
|
|
4406
|
-
const totalSlides =
|
|
4405
|
+
const totalSlides = import_react55.Children.count(children);
|
|
4407
4406
|
const maxSlide = totalSlides - slidesToShowState;
|
|
4408
4407
|
const nextSlide = () => {
|
|
4409
4408
|
if (currentSlide >= maxSlide) {
|
|
@@ -4448,16 +4447,16 @@ var init_Slider = __esm({
|
|
|
4448
4447
|
}
|
|
4449
4448
|
};
|
|
4450
4449
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
4451
|
-
const slides =
|
|
4452
|
-
if (!
|
|
4450
|
+
const slides = import_react55.Children.map(children, (child, index) => {
|
|
4451
|
+
if (!import_react55.default.isValidElement(child)) return null;
|
|
4453
4452
|
const childProps = child.props;
|
|
4454
4453
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
4455
|
-
return /* @__PURE__ */ (0,
|
|
4454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4456
4455
|
"div",
|
|
4457
4456
|
{
|
|
4458
4457
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
4459
4458
|
style: { width: `calc(${100 / slidesToShowState}%)`, paddingRight: gap },
|
|
4460
|
-
children: (0,
|
|
4459
|
+
children: (0, import_react55.cloneElement)(child, {
|
|
4461
4460
|
className: mergedClassName
|
|
4462
4461
|
})
|
|
4463
4462
|
},
|
|
@@ -4475,14 +4474,14 @@ var init_Slider = __esm({
|
|
|
4475
4474
|
return "bottom-4";
|
|
4476
4475
|
}
|
|
4477
4476
|
};
|
|
4478
|
-
return /* @__PURE__ */ (0,
|
|
4477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
4479
4478
|
"div",
|
|
4480
4479
|
{
|
|
4481
4480
|
className: `relative w-full overflow-hidden ${className}`,
|
|
4482
4481
|
onMouseEnter: handleMouseEnter,
|
|
4483
4482
|
onMouseLeave: handleMouseLeave,
|
|
4484
4483
|
children: [
|
|
4485
|
-
/* @__PURE__ */ (0,
|
|
4484
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4486
4485
|
"div",
|
|
4487
4486
|
{
|
|
4488
4487
|
className: "flex h-full",
|
|
@@ -4493,18 +4492,18 @@ var init_Slider = __esm({
|
|
|
4493
4492
|
children: slides
|
|
4494
4493
|
}
|
|
4495
4494
|
),
|
|
4496
|
-
show_arrows && /* @__PURE__ */ (0,
|
|
4497
|
-
/* @__PURE__ */ (0,
|
|
4495
|
+
show_arrows && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
|
|
4496
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4498
4497
|
ArrowButton,
|
|
4499
4498
|
{
|
|
4500
4499
|
direction: "left",
|
|
4501
4500
|
onClick: prevSlide,
|
|
4502
4501
|
visible: infinite_scroll || currentSlide > 0,
|
|
4503
4502
|
className: arrowClassName,
|
|
4504
|
-
children: /* @__PURE__ */ (0,
|
|
4503
|
+
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" }) })
|
|
4505
4504
|
}
|
|
4506
4505
|
),
|
|
4507
|
-
/* @__PURE__ */ (0,
|
|
4506
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
4508
4507
|
ArrowButton,
|
|
4509
4508
|
{
|
|
4510
4509
|
direction: "right",
|
|
@@ -4512,13 +4511,13 @@ var init_Slider = __esm({
|
|
|
4512
4511
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
4513
4512
|
className: arrowClassName,
|
|
4514
4513
|
children: [
|
|
4515
|
-
/* @__PURE__ */ (0,
|
|
4514
|
+
/* @__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" }) }),
|
|
4516
4515
|
" "
|
|
4517
4516
|
]
|
|
4518
4517
|
}
|
|
4519
4518
|
)
|
|
4520
4519
|
] }),
|
|
4521
|
-
show_dots && /* @__PURE__ */ (0,
|
|
4520
|
+
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)(
|
|
4522
4521
|
ProgressPill,
|
|
4523
4522
|
{
|
|
4524
4523
|
active: index === currentSlide,
|
|
@@ -4544,7 +4543,7 @@ var init_Slider = __esm({
|
|
|
4544
4543
|
visible,
|
|
4545
4544
|
children,
|
|
4546
4545
|
className = ""
|
|
4547
|
-
}) => /* @__PURE__ */ (0,
|
|
4546
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4548
4547
|
"button",
|
|
4549
4548
|
{
|
|
4550
4549
|
className: `
|
|
@@ -4570,13 +4569,13 @@ var init_Slider = __esm({
|
|
|
4570
4569
|
currentSlide,
|
|
4571
4570
|
totalSlides
|
|
4572
4571
|
}) => {
|
|
4573
|
-
const [progress, setProgress] = (0,
|
|
4574
|
-
(0,
|
|
4572
|
+
const [progress, setProgress] = (0, import_react55.useState)(0);
|
|
4573
|
+
(0, import_react55.useEffect)(() => {
|
|
4575
4574
|
if (active) {
|
|
4576
4575
|
setProgress(0);
|
|
4577
4576
|
}
|
|
4578
4577
|
}, [active, index]);
|
|
4579
|
-
(0,
|
|
4578
|
+
(0, import_react55.useEffect)(() => {
|
|
4580
4579
|
if (!active || !isPlaying) {
|
|
4581
4580
|
if (!active) {
|
|
4582
4581
|
setProgress(0);
|
|
@@ -4631,7 +4630,7 @@ var init_Slider = __esm({
|
|
|
4631
4630
|
const renderProgressBar = () => {
|
|
4632
4631
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
4633
4632
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
4634
|
-
return /* @__PURE__ */ (0,
|
|
4633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4635
4634
|
"div",
|
|
4636
4635
|
{
|
|
4637
4636
|
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`,
|
|
@@ -4643,7 +4642,7 @@ var init_Slider = __esm({
|
|
|
4643
4642
|
};
|
|
4644
4643
|
const renderCumulativeFill = () => {
|
|
4645
4644
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
4646
|
-
return /* @__PURE__ */ (0,
|
|
4645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4647
4646
|
"div",
|
|
4648
4647
|
{
|
|
4649
4648
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -4653,7 +4652,7 @@ var init_Slider = __esm({
|
|
|
4653
4652
|
}
|
|
4654
4653
|
return null;
|
|
4655
4654
|
};
|
|
4656
|
-
return /* @__PURE__ */ (0,
|
|
4655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
4657
4656
|
"button",
|
|
4658
4657
|
{
|
|
4659
4658
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -4708,7 +4707,7 @@ __export(index_exports, {
|
|
|
4708
4707
|
module.exports = __toCommonJS(index_exports);
|
|
4709
4708
|
|
|
4710
4709
|
// src/components/controls/view/ViewControl.tsx
|
|
4711
|
-
var
|
|
4710
|
+
var import_react16 = __toESM(require("react"));
|
|
4712
4711
|
|
|
4713
4712
|
// src/components/controls/view/ViewControlTypes.tsx
|
|
4714
4713
|
var ViewControlTypes = {
|
|
@@ -5045,8 +5044,80 @@ var DateTimeView = (0, import_dynamic3.default)(() => Promise.resolve().then(()
|
|
|
5045
5044
|
});
|
|
5046
5045
|
var DateTimeVew_default = DateTimeView;
|
|
5047
5046
|
|
|
5048
|
-
// src/components/controls/view/
|
|
5047
|
+
// src/components/controls/view/TimeUntilStarts.tsx
|
|
5048
|
+
var import_react15 = require("react");
|
|
5049
5049
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
5050
|
+
var TimeUntilStarts = (props) => {
|
|
5051
|
+
const calculateTimeDifference = (startDate) => {
|
|
5052
|
+
const now = /* @__PURE__ */ new Date();
|
|
5053
|
+
const nowUtc = new Date(now.getTime() + now.getTimezoneOffset() * 6e4);
|
|
5054
|
+
const startDateUtc = new Date(startDate);
|
|
5055
|
+
const diffMs = startDateUtc.getTime() - nowUtc.getTime();
|
|
5056
|
+
const isPast = diffMs < 0;
|
|
5057
|
+
const absoluteDiffMs = Math.abs(diffMs);
|
|
5058
|
+
const diffDays = Math.floor(absoluteDiffMs / (1e3 * 60 * 60 * 24));
|
|
5059
|
+
const diffHours = Math.floor(
|
|
5060
|
+
absoluteDiffMs % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)
|
|
5061
|
+
);
|
|
5062
|
+
const diffMinutes = Math.floor(
|
|
5063
|
+
absoluteDiffMs % (1e3 * 60 * 60) / (1e3 * 60)
|
|
5064
|
+
);
|
|
5065
|
+
if (absoluteDiffMs < 6e4) {
|
|
5066
|
+
return "Just now";
|
|
5067
|
+
}
|
|
5068
|
+
let timeParts = [
|
|
5069
|
+
{ value: diffDays, unit: "days" },
|
|
5070
|
+
{ value: diffHours, unit: "hours" },
|
|
5071
|
+
{ value: diffMinutes, unit: "minutes" }
|
|
5072
|
+
];
|
|
5073
|
+
timeParts = timeParts.filter((part) => part.value > 0);
|
|
5074
|
+
if (isPast) {
|
|
5075
|
+
if (diffDays > 0) {
|
|
5076
|
+
return `${diffDays} day(s) ago`;
|
|
5077
|
+
} else if (diffHours > 0) {
|
|
5078
|
+
return `${diffHours} hour(s) ago`;
|
|
5079
|
+
} else if (diffMinutes > 0) {
|
|
5080
|
+
return `${diffMinutes} minute(s) ago`;
|
|
5081
|
+
} else {
|
|
5082
|
+
return "Just now";
|
|
5083
|
+
}
|
|
5084
|
+
} else {
|
|
5085
|
+
if (timeParts.length > 2) {
|
|
5086
|
+
timeParts = timeParts.slice(0, 2);
|
|
5087
|
+
}
|
|
5088
|
+
const displayString = timeParts.map((part) => `${part.value} ${part.unit}`).join(" ");
|
|
5089
|
+
return displayString ? `Starting in ${displayString}` : "Started";
|
|
5090
|
+
}
|
|
5091
|
+
};
|
|
5092
|
+
const isValidDate = (date) => {
|
|
5093
|
+
return !isNaN(Date.parse(date));
|
|
5094
|
+
};
|
|
5095
|
+
const [timeUntilStart, setTimeUntilStart] = (0, import_react15.useState)(() => {
|
|
5096
|
+
if (props.value && isValidDate(props.value)) {
|
|
5097
|
+
return calculateTimeDifference(props.value);
|
|
5098
|
+
}
|
|
5099
|
+
return "";
|
|
5100
|
+
});
|
|
5101
|
+
(0, import_react15.useEffect)(() => {
|
|
5102
|
+
if (props.value && isValidDate(props.value)) {
|
|
5103
|
+
setTimeUntilStart(calculateTimeDifference(props.value));
|
|
5104
|
+
const initialTimeout = setTimeout(() => {
|
|
5105
|
+
const interval = setInterval(() => {
|
|
5106
|
+
setTimeUntilStart(calculateTimeDifference(props.value));
|
|
5107
|
+
}, 6e4);
|
|
5108
|
+
return () => clearInterval(interval);
|
|
5109
|
+
}, 5e3);
|
|
5110
|
+
return () => clearTimeout(initialTimeout);
|
|
5111
|
+
} else {
|
|
5112
|
+
setTimeUntilStart("");
|
|
5113
|
+
}
|
|
5114
|
+
}, [props.value]);
|
|
5115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { children: timeUntilStart });
|
|
5116
|
+
};
|
|
5117
|
+
var TimeUntilStarts_default = TimeUntilStarts;
|
|
5118
|
+
|
|
5119
|
+
// src/components/controls/view/ViewControl.tsx
|
|
5120
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
5050
5121
|
var ViewControl = (props) => {
|
|
5051
5122
|
const ControlComponents = {
|
|
5052
5123
|
[ViewControlTypes_default.lineText]: LineTextView_default,
|
|
@@ -5055,7 +5126,7 @@ var ViewControl = (props) => {
|
|
|
5055
5126
|
[ViewControlTypes_default.multilineTextBullets]: MultilineTextBulletsView_default,
|
|
5056
5127
|
[ViewControlTypes_default.boolean]: BooleanView_default,
|
|
5057
5128
|
[ViewControlTypes_default.checkboxInput]: BooleanView_default,
|
|
5058
|
-
|
|
5129
|
+
[ViewControlTypes_default.timeUntilStarts]: TimeUntilStarts_default,
|
|
5059
5130
|
[ViewControlTypes_default.money]: MoneyView_default,
|
|
5060
5131
|
[ViewControlTypes_default.date]: DateView_default,
|
|
5061
5132
|
[ViewControlTypes_default.time]: DateView_default,
|
|
@@ -5075,7 +5146,7 @@ var ViewControl = (props) => {
|
|
|
5075
5146
|
[ViewControlTypes_default.text]: LineTextView_default
|
|
5076
5147
|
};
|
|
5077
5148
|
const SelectedControlComponent = props.controlType ? ControlComponents[props.controlType] : void 0;
|
|
5078
|
-
return /* @__PURE__ */ (0,
|
|
5149
|
+
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 });
|
|
5079
5150
|
};
|
|
5080
5151
|
var ViewControl_default = ViewControl;
|
|
5081
5152
|
|
|
@@ -5090,13 +5161,13 @@ var InputControl_default = InputControl2;
|
|
|
5090
5161
|
init_InputControlType();
|
|
5091
5162
|
|
|
5092
5163
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
5093
|
-
var
|
|
5164
|
+
var import_react57 = __toESM(require("react"));
|
|
5094
5165
|
|
|
5095
5166
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
5096
|
-
var
|
|
5167
|
+
var import_react44 = __toESM(require("react"));
|
|
5097
5168
|
|
|
5098
5169
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
5099
|
-
var
|
|
5170
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
5100
5171
|
var TextNode = (props) => {
|
|
5101
5172
|
function cssStringToJson(cssString) {
|
|
5102
5173
|
const styleObject = {};
|
|
@@ -5151,36 +5222,36 @@ var TextNode = (props) => {
|
|
|
5151
5222
|
});
|
|
5152
5223
|
}
|
|
5153
5224
|
function renderWithLineBreaks(text) {
|
|
5154
|
-
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0,
|
|
5225
|
+
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { children: [
|
|
5155
5226
|
line,
|
|
5156
|
-
index < arr.length - 1 && /* @__PURE__ */ (0,
|
|
5227
|
+
index < arr.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("br", {})
|
|
5157
5228
|
] }, index));
|
|
5158
5229
|
}
|
|
5159
5230
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
5160
5231
|
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
5161
5232
|
const content = typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText;
|
|
5162
|
-
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ (0,
|
|
5233
|
+
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;
|
|
5163
5234
|
return (
|
|
5164
5235
|
// @ts-expect-error custom code
|
|
5165
|
-
/* @__PURE__ */ (0,
|
|
5236
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: formattedContent })
|
|
5166
5237
|
);
|
|
5167
5238
|
};
|
|
5168
5239
|
var TextNode_default = TextNode;
|
|
5169
5240
|
|
|
5170
5241
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
5171
|
-
var
|
|
5242
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
5172
5243
|
var LineBreakNode = () => {
|
|
5173
|
-
return /* @__PURE__ */ (0,
|
|
5244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "py-0.5 lg:py-1.5" });
|
|
5174
5245
|
};
|
|
5175
5246
|
var LineBreakNode_default = LineBreakNode;
|
|
5176
5247
|
|
|
5177
5248
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
5178
|
-
var
|
|
5249
|
+
var import_react43 = __toESM(require("react"));
|
|
5179
5250
|
|
|
5180
5251
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
5181
5252
|
init_AssetUtility();
|
|
5182
5253
|
var import_dynamic5 = __toESM(require("next/dynamic"));
|
|
5183
|
-
var
|
|
5254
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
5184
5255
|
var HlsPlayer3 = (0, import_dynamic5.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
5185
5256
|
var getNestedValue = (obj, path) => {
|
|
5186
5257
|
if (!obj || !path) return void 0;
|
|
@@ -5213,7 +5284,7 @@ var ImageNode = (props) => {
|
|
|
5213
5284
|
assets = [image];
|
|
5214
5285
|
}
|
|
5215
5286
|
if (assets && assets.length > 0) {
|
|
5216
|
-
return /* @__PURE__ */ (0,
|
|
5287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5217
5288
|
DeviceAssetSelector_default,
|
|
5218
5289
|
{
|
|
5219
5290
|
device: props.device,
|
|
@@ -5254,7 +5325,7 @@ var ImageNode = (props) => {
|
|
|
5254
5325
|
right: "justify-end"
|
|
5255
5326
|
};
|
|
5256
5327
|
const isHls = imageUrl.endsWith(".m3u8");
|
|
5257
|
-
const renderMedia = () => isHls ? /* @__PURE__ */ (0,
|
|
5328
|
+
const renderMedia = () => isHls ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5258
5329
|
HlsPlayer3,
|
|
5259
5330
|
{
|
|
5260
5331
|
assetUrl: imageUrl,
|
|
@@ -5267,7 +5338,7 @@ var ImageNode = (props) => {
|
|
|
5267
5338
|
apiBaseUrl: props.apiBaseUrl,
|
|
5268
5339
|
session: props.session
|
|
5269
5340
|
}
|
|
5270
|
-
) : /* @__PURE__ */ (0,
|
|
5341
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
5271
5342
|
"img",
|
|
5272
5343
|
{
|
|
5273
5344
|
style: styles,
|
|
@@ -5280,7 +5351,7 @@ var ImageNode = (props) => {
|
|
|
5280
5351
|
}
|
|
5281
5352
|
);
|
|
5282
5353
|
if (props.node.width) {
|
|
5283
|
-
return /* @__PURE__ */ (0,
|
|
5354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: `flex ${FORMAT_CLASSES2[props.node.format] ?? ""}`, children: renderMedia() });
|
|
5284
5355
|
}
|
|
5285
5356
|
return renderMedia();
|
|
5286
5357
|
};
|
|
@@ -5290,7 +5361,7 @@ var ImageNode_default = ImageNode;
|
|
|
5290
5361
|
init_StyleTypes();
|
|
5291
5362
|
init_Hyperlink();
|
|
5292
5363
|
var import_dynamic6 = __toESM(require("next/dynamic"));
|
|
5293
|
-
var
|
|
5364
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
5294
5365
|
var LinkNodeButton2 = (0, import_dynamic6.default)(() => Promise.resolve().then(() => (init_LinkNodeButton(), LinkNodeButton_exports)), {
|
|
5295
5366
|
ssr: false
|
|
5296
5367
|
});
|
|
@@ -5343,13 +5414,13 @@ var LinkNode = (props) => {
|
|
|
5343
5414
|
const isButton = node.isButton === true;
|
|
5344
5415
|
const renderChildren = () => {
|
|
5345
5416
|
if (!node.children || node.children.length === 0) return null;
|
|
5346
|
-
return /* @__PURE__ */ (0,
|
|
5417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_jsx_runtime56.Fragment, { children: node.children.map((childNode, index) => {
|
|
5347
5418
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
5348
5419
|
if (!SelectedNode) {
|
|
5349
5420
|
console.warn("Unknown node type:", childNode.type);
|
|
5350
5421
|
return null;
|
|
5351
5422
|
}
|
|
5352
|
-
return /* @__PURE__ */ (0,
|
|
5423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react43.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
5353
5424
|
SelectedNode,
|
|
5354
5425
|
{
|
|
5355
5426
|
node: childNode,
|
|
@@ -5362,15 +5433,15 @@ var LinkNode = (props) => {
|
|
|
5362
5433
|
};
|
|
5363
5434
|
const renderFallback = () => {
|
|
5364
5435
|
if ((!node.children || node.children.length === 0) && linkText) {
|
|
5365
|
-
return /* @__PURE__ */ (0,
|
|
5436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { children: linkText });
|
|
5366
5437
|
}
|
|
5367
5438
|
if ((!node.children || node.children.length === 0) && !linkText) {
|
|
5368
|
-
return /* @__PURE__ */ (0,
|
|
5439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("br", {});
|
|
5369
5440
|
}
|
|
5370
5441
|
return null;
|
|
5371
5442
|
};
|
|
5372
5443
|
if (isButton) {
|
|
5373
|
-
return /* @__PURE__ */ (0,
|
|
5444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5374
5445
|
LinkNodeButton2,
|
|
5375
5446
|
{
|
|
5376
5447
|
node,
|
|
@@ -5388,7 +5459,7 @@ var LinkNode = (props) => {
|
|
|
5388
5459
|
}
|
|
5389
5460
|
);
|
|
5390
5461
|
}
|
|
5391
|
-
return /* @__PURE__ */ (0,
|
|
5462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5392
5463
|
Hyperlink,
|
|
5393
5464
|
{
|
|
5394
5465
|
href: linkUrl || "#",
|
|
@@ -5404,10 +5475,10 @@ var LinkNode = (props) => {
|
|
|
5404
5475
|
var LinkNode_default = LinkNode;
|
|
5405
5476
|
|
|
5406
5477
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
5407
|
-
var
|
|
5478
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5408
5479
|
var SVGIconNode = ({ node }) => {
|
|
5409
5480
|
if (!node?.svgCode) return null;
|
|
5410
|
-
return /* @__PURE__ */ (0,
|
|
5481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
5411
5482
|
"span",
|
|
5412
5483
|
{
|
|
5413
5484
|
style: {
|
|
@@ -5424,7 +5495,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
5424
5495
|
|
|
5425
5496
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
5426
5497
|
var import_katex = __toESM(require("katex"));
|
|
5427
|
-
var
|
|
5498
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5428
5499
|
var EquationNode = ({ node }) => {
|
|
5429
5500
|
const { equation, inline } = node;
|
|
5430
5501
|
let html = "";
|
|
@@ -5439,7 +5510,7 @@ var EquationNode = ({ node }) => {
|
|
|
5439
5510
|
});
|
|
5440
5511
|
}
|
|
5441
5512
|
if (inline) {
|
|
5442
|
-
return /* @__PURE__ */ (0,
|
|
5513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5443
5514
|
"span",
|
|
5444
5515
|
{
|
|
5445
5516
|
className: "katex-inline",
|
|
@@ -5447,7 +5518,7 @@ var EquationNode = ({ node }) => {
|
|
|
5447
5518
|
}
|
|
5448
5519
|
);
|
|
5449
5520
|
}
|
|
5450
|
-
return /* @__PURE__ */ (0,
|
|
5521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5451
5522
|
"div",
|
|
5452
5523
|
{
|
|
5453
5524
|
className: "katex-block my-3 text-center",
|
|
@@ -5458,7 +5529,7 @@ var EquationNode = ({ node }) => {
|
|
|
5458
5529
|
var EquationNode_default = EquationNode;
|
|
5459
5530
|
|
|
5460
5531
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
5461
|
-
var
|
|
5532
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5462
5533
|
function getNestedProperty(obj, path) {
|
|
5463
5534
|
if (!obj || !path) return null;
|
|
5464
5535
|
if (path.includes(".")) {
|
|
@@ -5471,7 +5542,7 @@ function getNestedProperty(obj, path) {
|
|
|
5471
5542
|
}
|
|
5472
5543
|
const value = obj[path];
|
|
5473
5544
|
if (Array.isArray(value)) {
|
|
5474
|
-
return value.map((item, index) => /* @__PURE__ */ (0,
|
|
5545
|
+
return value.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { children: String(item) }, index));
|
|
5475
5546
|
}
|
|
5476
5547
|
return value;
|
|
5477
5548
|
}
|
|
@@ -5532,7 +5603,7 @@ var DatafieldNode = (props) => {
|
|
|
5532
5603
|
const dataType = props.node.dataType;
|
|
5533
5604
|
if (isEmptyValue) return null;
|
|
5534
5605
|
if (dataType === "rawContent") {
|
|
5535
|
-
return /* @__PURE__ */ (0,
|
|
5606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5536
5607
|
PageBodyRenderer_default,
|
|
5537
5608
|
{
|
|
5538
5609
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -5548,12 +5619,12 @@ var DatafieldNode = (props) => {
|
|
|
5548
5619
|
}
|
|
5549
5620
|
);
|
|
5550
5621
|
}
|
|
5551
|
-
return /* @__PURE__ */ (0,
|
|
5622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5552
5623
|
"span",
|
|
5553
5624
|
{
|
|
5554
5625
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
5555
5626
|
style: styles,
|
|
5556
|
-
children: /* @__PURE__ */ (0,
|
|
5627
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5557
5628
|
ViewControl_default,
|
|
5558
5629
|
{
|
|
5559
5630
|
controlType: dataType,
|
|
@@ -5566,7 +5637,7 @@ var DatafieldNode = (props) => {
|
|
|
5566
5637
|
var DatafieldNode_default = DatafieldNode;
|
|
5567
5638
|
|
|
5568
5639
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
5569
|
-
var
|
|
5640
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5570
5641
|
var ParagraphNode = (props) => {
|
|
5571
5642
|
const NodeTypes2 = {
|
|
5572
5643
|
["text"]: TextNode_default,
|
|
@@ -5586,9 +5657,9 @@ var ParagraphNode = (props) => {
|
|
|
5586
5657
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
5587
5658
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
5588
5659
|
if (isInlineOnlyParent) {
|
|
5589
|
-
return /* @__PURE__ */ (0,
|
|
5660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_jsx_runtime60.Fragment, { children: hasChildren && props.node.children.map((node, index) => {
|
|
5590
5661
|
const SelectedNode = NodeTypes2[node.type];
|
|
5591
|
-
return /* @__PURE__ */ (0,
|
|
5662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react44.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
5592
5663
|
SelectedNode,
|
|
5593
5664
|
{
|
|
5594
5665
|
node,
|
|
@@ -5600,10 +5671,10 @@ var ParagraphNode = (props) => {
|
|
|
5600
5671
|
) }, index);
|
|
5601
5672
|
}) });
|
|
5602
5673
|
}
|
|
5603
|
-
return /* @__PURE__ */ (0,
|
|
5674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: " " + formatClasses, children: [
|
|
5604
5675
|
hasChildren && props.node.children.map((node, index) => {
|
|
5605
5676
|
const SelectedNode = NodeTypes2[node.type];
|
|
5606
|
-
return /* @__PURE__ */ (0,
|
|
5677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react44.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
5607
5678
|
SelectedNode,
|
|
5608
5679
|
{
|
|
5609
5680
|
node,
|
|
@@ -5614,14 +5685,14 @@ var ParagraphNode = (props) => {
|
|
|
5614
5685
|
}
|
|
5615
5686
|
) }, index);
|
|
5616
5687
|
}),
|
|
5617
|
-
!hasChildren && /* @__PURE__ */ (0,
|
|
5688
|
+
!hasChildren && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "py-1.5 lg:py-2" })
|
|
5618
5689
|
] });
|
|
5619
5690
|
};
|
|
5620
5691
|
var ParagraphNode_default = ParagraphNode;
|
|
5621
5692
|
|
|
5622
5693
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
5623
|
-
var
|
|
5624
|
-
var
|
|
5694
|
+
var import_react45 = __toESM(require("react"));
|
|
5695
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
5625
5696
|
var HeadingNode = (props) => {
|
|
5626
5697
|
const NodeTypes2 = {
|
|
5627
5698
|
["text"]: TextNode_default,
|
|
@@ -5637,23 +5708,23 @@ var HeadingNode = (props) => {
|
|
|
5637
5708
|
{
|
|
5638
5709
|
}
|
|
5639
5710
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
5640
|
-
return /* @__PURE__ */ (0,
|
|
5711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_jsx_runtime61.Fragment, { children: import_react45.default.createElement(
|
|
5641
5712
|
HeadingTag,
|
|
5642
5713
|
{ className: formatClasses },
|
|
5643
5714
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
5644
5715
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
5645
|
-
return /* @__PURE__ */ (0,
|
|
5716
|
+
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);
|
|
5646
5717
|
})
|
|
5647
5718
|
) });
|
|
5648
5719
|
};
|
|
5649
5720
|
var HeadingNode_default = HeadingNode;
|
|
5650
5721
|
|
|
5651
5722
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
5652
|
-
var
|
|
5723
|
+
var import_react47 = __toESM(require("react"));
|
|
5653
5724
|
|
|
5654
5725
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
5655
|
-
var
|
|
5656
|
-
var
|
|
5726
|
+
var import_react46 = __toESM(require("react"));
|
|
5727
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
5657
5728
|
var ListItemNode = (props) => {
|
|
5658
5729
|
const NodeTypes2 = {
|
|
5659
5730
|
text: TextNode_default,
|
|
@@ -5670,66 +5741,66 @@ var ListItemNode = (props) => {
|
|
|
5670
5741
|
liStyle.fontSize = match[1].trim();
|
|
5671
5742
|
}
|
|
5672
5743
|
}
|
|
5673
|
-
return /* @__PURE__ */ (0,
|
|
5744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
5674
5745
|
const SelectedNode = NodeTypes2[node.type];
|
|
5675
5746
|
if (node.type === "linebreak") {
|
|
5676
5747
|
if (!foundFirstBreak) {
|
|
5677
5748
|
foundFirstBreak = true;
|
|
5678
|
-
return /* @__PURE__ */ (0,
|
|
5749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", {}, index);
|
|
5679
5750
|
} else {
|
|
5680
|
-
return /* @__PURE__ */ (0,
|
|
5751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "py-1 lg:py-2" }, index);
|
|
5681
5752
|
}
|
|
5682
5753
|
} else {
|
|
5683
5754
|
foundFirstBreak = false;
|
|
5684
|
-
return /* @__PURE__ */ (0,
|
|
5755
|
+
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);
|
|
5685
5756
|
}
|
|
5686
5757
|
}) });
|
|
5687
5758
|
};
|
|
5688
5759
|
var ListItemNode_default = ListItemNode;
|
|
5689
5760
|
|
|
5690
5761
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
5691
|
-
var
|
|
5762
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
5692
5763
|
var ListNode = (props) => {
|
|
5693
5764
|
const NodeTypes2 = {
|
|
5694
5765
|
listitem: ListItemNode_default
|
|
5695
5766
|
};
|
|
5696
|
-
return /* @__PURE__ */ (0,
|
|
5697
|
-
props.node.listType == "bullet" && /* @__PURE__ */ (0,
|
|
5767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_react47.default.Fragment, { children: [
|
|
5768
|
+
props.node.listType == "bullet" && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
5698
5769
|
const SelectedNode = NodeTypes2[node.type];
|
|
5699
|
-
return /* @__PURE__ */ (0,
|
|
5770
|
+
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);
|
|
5700
5771
|
}) }),
|
|
5701
|
-
props.node.listType == "number" && /* @__PURE__ */ (0,
|
|
5772
|
+
props.node.listType == "number" && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
5702
5773
|
const SelectedNode = NodeTypes2[node.type];
|
|
5703
|
-
return /* @__PURE__ */ (0,
|
|
5774
|
+
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);
|
|
5704
5775
|
}) })
|
|
5705
5776
|
] });
|
|
5706
5777
|
};
|
|
5707
5778
|
var ListNode_default = ListNode;
|
|
5708
5779
|
|
|
5709
5780
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
5710
|
-
var
|
|
5711
|
-
var
|
|
5781
|
+
var import_react48 = __toESM(require("react"));
|
|
5782
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
5712
5783
|
var QuoteNode = (props) => {
|
|
5713
5784
|
const NodeTypes2 = {
|
|
5714
5785
|
["text"]: TextNode_default,
|
|
5715
5786
|
["linebreak"]: LineBreakNode_default,
|
|
5716
5787
|
["link"]: LinkNode_default
|
|
5717
5788
|
};
|
|
5718
|
-
return /* @__PURE__ */ (0,
|
|
5789
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
5719
5790
|
const SelectedNode = NodeTypes2[node.type];
|
|
5720
|
-
return /* @__PURE__ */ (0,
|
|
5791
|
+
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);
|
|
5721
5792
|
}) });
|
|
5722
5793
|
};
|
|
5723
5794
|
var QuoteNode_default = QuoteNode;
|
|
5724
5795
|
|
|
5725
5796
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
5726
|
-
var
|
|
5797
|
+
var import_react50 = __toESM(require("react"));
|
|
5727
5798
|
var import_dynamic7 = __toESM(require("next/dynamic"));
|
|
5728
|
-
var
|
|
5799
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
5729
5800
|
var CopyButton2 = (0, import_dynamic7.default)(() => Promise.resolve().then(() => (init_CopyButton(), CopyButton_exports)), {
|
|
5730
5801
|
ssr: false,
|
|
5731
5802
|
// optional: fallback UI while loading
|
|
5732
|
-
loading: () => /* @__PURE__ */ (0,
|
|
5803
|
+
loading: () => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
5733
5804
|
});
|
|
5734
5805
|
var CodeNode = (props) => {
|
|
5735
5806
|
const NodeTypes2 = {
|
|
@@ -5743,14 +5814,14 @@ var CodeNode = (props) => {
|
|
|
5743
5814
|
if (node.type === "link") return node.text || node.url || "";
|
|
5744
5815
|
return "";
|
|
5745
5816
|
}).join("") ?? "";
|
|
5746
|
-
return /* @__PURE__ */ (0,
|
|
5747
|
-
/* @__PURE__ */ (0,
|
|
5748
|
-
/* @__PURE__ */ (0,
|
|
5749
|
-
/* @__PURE__ */ (0,
|
|
5817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { children: [
|
|
5818
|
+
/* @__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: [
|
|
5819
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { children: "Code Snippet" }),
|
|
5820
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(CopyButton2, { text: textContent })
|
|
5750
5821
|
] }),
|
|
5751
|
-
/* @__PURE__ */ (0,
|
|
5822
|
+
/* @__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) => {
|
|
5752
5823
|
const SelectedNode = NodeTypes2[node.type];
|
|
5753
|
-
return /* @__PURE__ */ (0,
|
|
5824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react50.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5754
5825
|
SelectedNode,
|
|
5755
5826
|
{
|
|
5756
5827
|
node,
|
|
@@ -5765,15 +5836,15 @@ var CodeNode = (props) => {
|
|
|
5765
5836
|
var CodeNode_default = CodeNode;
|
|
5766
5837
|
|
|
5767
5838
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
5768
|
-
var
|
|
5839
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
5769
5840
|
var HorizontalRuleNode = () => {
|
|
5770
|
-
return /* @__PURE__ */ (0,
|
|
5841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("hr", {});
|
|
5771
5842
|
};
|
|
5772
5843
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
5773
5844
|
|
|
5774
5845
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
5775
|
-
var
|
|
5776
|
-
var
|
|
5846
|
+
var import_react51 = __toESM(require("react"));
|
|
5847
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
5777
5848
|
var WidgetNode = (props) => {
|
|
5778
5849
|
const getWidgetParameters = () => {
|
|
5779
5850
|
const widgetInputParameters = {
|
|
@@ -5837,7 +5908,7 @@ var WidgetNode = (props) => {
|
|
|
5837
5908
|
};
|
|
5838
5909
|
const widgetCode = props.node?.widgetCode;
|
|
5839
5910
|
if (!widgetCode) {
|
|
5840
|
-
return /* @__PURE__ */ (0,
|
|
5911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, { children: "Invalid widget" });
|
|
5841
5912
|
}
|
|
5842
5913
|
const widgetParams = getWidgetParameters();
|
|
5843
5914
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -5846,7 +5917,7 @@ var WidgetNode = (props) => {
|
|
|
5846
5917
|
}
|
|
5847
5918
|
return (
|
|
5848
5919
|
// eslint-disable-next-line react-hooks/static-components
|
|
5849
|
-
/* @__PURE__ */ (0,
|
|
5920
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react51.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5850
5921
|
WidgetRenderer,
|
|
5851
5922
|
{
|
|
5852
5923
|
params: widgetParams,
|
|
@@ -5864,11 +5935,11 @@ var WidgetNode_default = WidgetNode;
|
|
|
5864
5935
|
|
|
5865
5936
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
5866
5937
|
var import_dynamic10 = __toESM(require("next/dynamic"));
|
|
5867
|
-
var
|
|
5938
|
+
var import_react56 = __toESM(require("react"));
|
|
5868
5939
|
|
|
5869
5940
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
5870
5941
|
var import_dynamic8 = __toESM(require("next/dynamic"));
|
|
5871
|
-
var
|
|
5942
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
5872
5943
|
var IframeClient2 = (0, import_dynamic8.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
5873
5944
|
ssr: false
|
|
5874
5945
|
});
|
|
@@ -5881,7 +5952,7 @@ var EmbedNode = (props) => {
|
|
|
5881
5952
|
} else {
|
|
5882
5953
|
src = props.node.embedSrc;
|
|
5883
5954
|
}
|
|
5884
|
-
return /* @__PURE__ */ (0,
|
|
5955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "aspect-video", children: src && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(IframeClient2, { src }) });
|
|
5885
5956
|
};
|
|
5886
5957
|
var EmbedNode_default = EmbedNode;
|
|
5887
5958
|
|
|
@@ -6081,10 +6152,10 @@ var PathUtility = class {
|
|
|
6081
6152
|
var PathUtility_default = new PathUtility();
|
|
6082
6153
|
|
|
6083
6154
|
// src/components/NoDataFound.tsx
|
|
6084
|
-
var
|
|
6155
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
6085
6156
|
var NoDataFound = () => {
|
|
6086
|
-
return /* @__PURE__ */ (0,
|
|
6087
|
-
/* @__PURE__ */ (0,
|
|
6157
|
+
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: [
|
|
6158
|
+
/* @__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)(
|
|
6088
6159
|
"svg",
|
|
6089
6160
|
{
|
|
6090
6161
|
className: "w-10 h-10",
|
|
@@ -6092,7 +6163,7 @@ var NoDataFound = () => {
|
|
|
6092
6163
|
stroke: "currentColor",
|
|
6093
6164
|
viewBox: "0 0 24 24",
|
|
6094
6165
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6095
|
-
children: /* @__PURE__ */ (0,
|
|
6166
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6096
6167
|
"path",
|
|
6097
6168
|
{
|
|
6098
6169
|
strokeLinecap: "round",
|
|
@@ -6103,8 +6174,8 @@ var NoDataFound = () => {
|
|
|
6103
6174
|
)
|
|
6104
6175
|
}
|
|
6105
6176
|
) }) }),
|
|
6106
|
-
/* @__PURE__ */ (0,
|
|
6107
|
-
/* @__PURE__ */ (0,
|
|
6177
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
6178
|
+
/* @__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." })
|
|
6108
6179
|
] });
|
|
6109
6180
|
};
|
|
6110
6181
|
var NoDataFound_default = NoDataFound;
|
|
@@ -6112,7 +6183,7 @@ var NoDataFound_default = NoDataFound;
|
|
|
6112
6183
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
6113
6184
|
init_AssetUtility();
|
|
6114
6185
|
var import_dynamic9 = __toESM(require("next/dynamic"));
|
|
6115
|
-
var
|
|
6186
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
6116
6187
|
var HlsPlayer4 = (0, import_dynamic9.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
6117
6188
|
var deviceToMediaQuery = (device) => {
|
|
6118
6189
|
switch (device) {
|
|
@@ -6268,8 +6339,8 @@ var ImageGalleryNode = (props) => {
|
|
|
6268
6339
|
right: "justify-end"
|
|
6269
6340
|
};
|
|
6270
6341
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
6271
|
-
return /* @__PURE__ */ (0,
|
|
6272
|
-
hlsSources.length > 0 && /* @__PURE__ */ (0,
|
|
6342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
|
|
6343
|
+
hlsSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_jsx_runtime73.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6273
6344
|
HlsPlayer4,
|
|
6274
6345
|
{
|
|
6275
6346
|
sources: hlsSources,
|
|
@@ -6284,7 +6355,7 @@ var ImageGalleryNode = (props) => {
|
|
|
6284
6355
|
styles: hlsStyles
|
|
6285
6356
|
}
|
|
6286
6357
|
) }),
|
|
6287
|
-
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0,
|
|
6358
|
+
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_jsx_runtime73.Fragment, { children: staticFallback ? /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("picture", { children: [
|
|
6288
6359
|
DEVICE_ORDER.map((deviceKey) => {
|
|
6289
6360
|
const match = staticSources.find(
|
|
6290
6361
|
(img) => img.device === deviceKey
|
|
@@ -6300,7 +6371,7 @@ var ImageGalleryNode = (props) => {
|
|
|
6300
6371
|
if (!srcUrl) {
|
|
6301
6372
|
return null;
|
|
6302
6373
|
}
|
|
6303
|
-
return /* @__PURE__ */ (0,
|
|
6374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6304
6375
|
"source",
|
|
6305
6376
|
{
|
|
6306
6377
|
media: deviceToMediaQuery(match.device),
|
|
@@ -6325,7 +6396,7 @@ var ImageGalleryNode = (props) => {
|
|
|
6325
6396
|
if (img.borderRadius) {
|
|
6326
6397
|
styles.borderRadius = img.borderRadius;
|
|
6327
6398
|
}
|
|
6328
|
-
return /* @__PURE__ */ (0,
|
|
6399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6329
6400
|
"img",
|
|
6330
6401
|
{
|
|
6331
6402
|
loading: "lazy",
|
|
@@ -6340,7 +6411,7 @@ var ImageGalleryNode = (props) => {
|
|
|
6340
6411
|
})()
|
|
6341
6412
|
] }) : (
|
|
6342
6413
|
/* Case 2: Only device-specific images exist */
|
|
6343
|
-
/* @__PURE__ */ (0,
|
|
6414
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_jsx_runtime73.Fragment, { children: staticSources.map((img, index) => {
|
|
6344
6415
|
const resolved = resolveImage(img);
|
|
6345
6416
|
const imageUrl = resolved?.imageUrl;
|
|
6346
6417
|
if (!imageUrl) {
|
|
@@ -6367,7 +6438,7 @@ var ImageGalleryNode = (props) => {
|
|
|
6367
6438
|
default:
|
|
6368
6439
|
display = "block";
|
|
6369
6440
|
}
|
|
6370
|
-
return /* @__PURE__ */ (0,
|
|
6441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6371
6442
|
"img",
|
|
6372
6443
|
{
|
|
6373
6444
|
loading: "lazy",
|
|
@@ -6508,28 +6579,28 @@ var shouldRenderContainer = (node, dataItem, session) => {
|
|
|
6508
6579
|
|
|
6509
6580
|
// src/components/pageRenderingEngine/nodes/DocumentNode.tsx
|
|
6510
6581
|
init_AssetUtility();
|
|
6511
|
-
var
|
|
6582
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
6512
6583
|
var getNestedValue5 = (obj, path) => {
|
|
6513
6584
|
if (!obj || !path) return void 0;
|
|
6514
6585
|
return path.split(".").reduce((current, key) => {
|
|
6515
6586
|
return current && current[key] !== void 0 ? current[key] : void 0;
|
|
6516
6587
|
}, obj);
|
|
6517
6588
|
};
|
|
6518
|
-
var PdfIcon = () => /* @__PURE__ */ (0,
|
|
6589
|
+
var PdfIcon = () => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6519
6590
|
"svg",
|
|
6520
6591
|
{
|
|
6521
6592
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6522
6593
|
viewBox: "0 0 48 48",
|
|
6523
6594
|
className: "w-10 h-10",
|
|
6524
6595
|
children: [
|
|
6525
|
-
/* @__PURE__ */ (0,
|
|
6596
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6526
6597
|
"path",
|
|
6527
6598
|
{
|
|
6528
6599
|
fill: "#e53935",
|
|
6529
6600
|
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"
|
|
6530
6601
|
}
|
|
6531
6602
|
),
|
|
6532
|
-
/* @__PURE__ */ (0,
|
|
6603
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6533
6604
|
"path",
|
|
6534
6605
|
{
|
|
6535
6606
|
fill: "#fff",
|
|
@@ -6539,55 +6610,55 @@ var PdfIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6539
6610
|
]
|
|
6540
6611
|
}
|
|
6541
6612
|
);
|
|
6542
|
-
var ExcelIcon = () => /* @__PURE__ */ (0,
|
|
6613
|
+
var ExcelIcon = () => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6543
6614
|
"svg",
|
|
6544
6615
|
{
|
|
6545
6616
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6546
6617
|
viewBox: "0 0 48 48",
|
|
6547
6618
|
className: "w-10 h-10",
|
|
6548
6619
|
children: [
|
|
6549
|
-
/* @__PURE__ */ (0,
|
|
6620
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6550
6621
|
"path",
|
|
6551
6622
|
{
|
|
6552
6623
|
fill: "#169154",
|
|
6553
6624
|
d: "M29,6H15.744C14.781,6,14,6.781,14,7.744v7.259h15V6z"
|
|
6554
6625
|
}
|
|
6555
6626
|
),
|
|
6556
|
-
/* @__PURE__ */ (0,
|
|
6627
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6557
6628
|
"path",
|
|
6558
6629
|
{
|
|
6559
6630
|
fill: "#18482a",
|
|
6560
6631
|
d: "M14,33.054v7.202C14,41.219,14.781,42,15.743,42H29v-8.946H14z"
|
|
6561
6632
|
}
|
|
6562
6633
|
),
|
|
6563
|
-
/* @__PURE__ */ (0,
|
|
6564
|
-
/* @__PURE__ */ (0,
|
|
6565
|
-
/* @__PURE__ */ (0,
|
|
6566
|
-
/* @__PURE__ */ (0,
|
|
6634
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { fill: "#0c8045", d: "M14 15.003H29V24.005000000000003H14z" }),
|
|
6635
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { fill: "#17472a", d: "M14 24.005H29V33.055H14z" }),
|
|
6636
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("g", { children: [
|
|
6637
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6567
6638
|
"path",
|
|
6568
6639
|
{
|
|
6569
6640
|
fill: "#29c27f",
|
|
6570
6641
|
d: "M42.256,6H29v9.003h15V7.744C44,6.781,43.219,6,42.256,6z"
|
|
6571
6642
|
}
|
|
6572
6643
|
),
|
|
6573
|
-
/* @__PURE__ */ (0,
|
|
6644
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6574
6645
|
"path",
|
|
6575
6646
|
{
|
|
6576
6647
|
fill: "#27663f",
|
|
6577
6648
|
d: "M29,33.054V42h13.257C43.219,42,44,41.219,44,40.257v-7.202H29z"
|
|
6578
6649
|
}
|
|
6579
6650
|
),
|
|
6580
|
-
/* @__PURE__ */ (0,
|
|
6581
|
-
/* @__PURE__ */ (0,
|
|
6651
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { fill: "#19ac65", d: "M29 15.003H44V24.005000000000003H29z" }),
|
|
6652
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { fill: "#129652", d: "M29 24.005H44V33.055H29z" })
|
|
6582
6653
|
] }),
|
|
6583
|
-
/* @__PURE__ */ (0,
|
|
6654
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6584
6655
|
"path",
|
|
6585
6656
|
{
|
|
6586
6657
|
fill: "#0c7238",
|
|
6587
6658
|
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"
|
|
6588
6659
|
}
|
|
6589
6660
|
),
|
|
6590
|
-
/* @__PURE__ */ (0,
|
|
6661
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6591
6662
|
"path",
|
|
6592
6663
|
{
|
|
6593
6664
|
fill: "#fff",
|
|
@@ -6597,7 +6668,7 @@ var ExcelIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6597
6668
|
]
|
|
6598
6669
|
}
|
|
6599
6670
|
);
|
|
6600
|
-
var WordIcon = () => /* @__PURE__ */ (0,
|
|
6671
|
+
var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6601
6672
|
"svg",
|
|
6602
6673
|
{
|
|
6603
6674
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6605,14 +6676,14 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6605
6676
|
className: "w-10 h-10",
|
|
6606
6677
|
baseProfile: "basic",
|
|
6607
6678
|
children: [
|
|
6608
|
-
/* @__PURE__ */ (0,
|
|
6679
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6609
6680
|
"path",
|
|
6610
6681
|
{
|
|
6611
6682
|
fill: "#283593",
|
|
6612
6683
|
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"
|
|
6613
6684
|
}
|
|
6614
6685
|
),
|
|
6615
|
-
/* @__PURE__ */ (0,
|
|
6686
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6616
6687
|
"linearGradient",
|
|
6617
6688
|
{
|
|
6618
6689
|
id: "qh2LT5tehRDFkLLfb-odWa",
|
|
@@ -6623,19 +6694,19 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6623
6694
|
gradientTransform: "translate(0 -339.89)",
|
|
6624
6695
|
gradientUnits: "userSpaceOnUse",
|
|
6625
6696
|
children: [
|
|
6626
|
-
/* @__PURE__ */ (0,
|
|
6627
|
-
/* @__PURE__ */ (0,
|
|
6697
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("stop", { offset: "0", "stop-color": "#66c0ff" }),
|
|
6698
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("stop", { offset: ".26", "stop-color": "#0094f0" })
|
|
6628
6699
|
]
|
|
6629
6700
|
}
|
|
6630
6701
|
),
|
|
6631
|
-
/* @__PURE__ */ (0,
|
|
6702
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6632
6703
|
"path",
|
|
6633
6704
|
{
|
|
6634
6705
|
fill: "url(#qh2LT5tehRDFkLLfb-odWa)",
|
|
6635
6706
|
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"
|
|
6636
6707
|
}
|
|
6637
6708
|
),
|
|
6638
|
-
/* @__PURE__ */ (0,
|
|
6709
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6639
6710
|
"path",
|
|
6640
6711
|
{
|
|
6641
6712
|
fill: "#1e88e5",
|
|
@@ -6643,21 +6714,21 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6643
6714
|
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"
|
|
6644
6715
|
}
|
|
6645
6716
|
),
|
|
6646
|
-
/* @__PURE__ */ (0,
|
|
6717
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6647
6718
|
"path",
|
|
6648
6719
|
{
|
|
6649
6720
|
fill: "#00e5ff",
|
|
6650
6721
|
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"
|
|
6651
6722
|
}
|
|
6652
6723
|
),
|
|
6653
|
-
/* @__PURE__ */ (0,
|
|
6724
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6654
6725
|
"path",
|
|
6655
6726
|
{
|
|
6656
6727
|
fill: "#1565c0",
|
|
6657
6728
|
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"
|
|
6658
6729
|
}
|
|
6659
6730
|
),
|
|
6660
|
-
/* @__PURE__ */ (0,
|
|
6731
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6661
6732
|
"path",
|
|
6662
6733
|
{
|
|
6663
6734
|
fill: "#fff",
|
|
@@ -6667,42 +6738,42 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6667
6738
|
]
|
|
6668
6739
|
}
|
|
6669
6740
|
);
|
|
6670
|
-
var StandardIcon = () => /* @__PURE__ */ (0,
|
|
6741
|
+
var StandardIcon = () => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6671
6742
|
"svg",
|
|
6672
6743
|
{
|
|
6673
6744
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6674
6745
|
viewBox: "0 0 48 48",
|
|
6675
6746
|
className: "w-10 h-10",
|
|
6676
6747
|
children: [
|
|
6677
|
-
/* @__PURE__ */ (0,
|
|
6678
|
-
/* @__PURE__ */ (0,
|
|
6748
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
6749
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" })
|
|
6679
6750
|
]
|
|
6680
6751
|
}
|
|
6681
6752
|
);
|
|
6682
|
-
var PowerPointIcon = () => /* @__PURE__ */ (0,
|
|
6753
|
+
var PowerPointIcon = () => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6683
6754
|
"svg",
|
|
6684
6755
|
{
|
|
6685
6756
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6686
6757
|
viewBox: "0 0 48 48",
|
|
6687
6758
|
className: "w-10 h-10",
|
|
6688
6759
|
children: [
|
|
6689
|
-
/* @__PURE__ */ (0,
|
|
6760
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6690
6761
|
"path",
|
|
6691
6762
|
{
|
|
6692
6763
|
fill: "#dc4c2c",
|
|
6693
6764
|
d: "M8,24c0,9.941,8.059,18,18,18s18-8.059,18-18H26H8z"
|
|
6694
6765
|
}
|
|
6695
6766
|
),
|
|
6696
|
-
/* @__PURE__ */ (0,
|
|
6697
|
-
/* @__PURE__ */ (0,
|
|
6698
|
-
/* @__PURE__ */ (0,
|
|
6767
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { fill: "#f7a278", d: "M26,6v18h18C44,14.059,35.941,6,26,6z" }),
|
|
6768
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { fill: "#c06346", d: "M26,6C16.059,6,8,14.059,8,24h18V6z" }),
|
|
6769
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6699
6770
|
"path",
|
|
6700
6771
|
{
|
|
6701
6772
|
fill: "#9b341f",
|
|
6702
6773
|
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"
|
|
6703
6774
|
}
|
|
6704
6775
|
),
|
|
6705
|
-
/* @__PURE__ */ (0,
|
|
6776
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6706
6777
|
"path",
|
|
6707
6778
|
{
|
|
6708
6779
|
fill: "#fff",
|
|
@@ -6712,16 +6783,16 @@ var PowerPointIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6712
6783
|
]
|
|
6713
6784
|
}
|
|
6714
6785
|
);
|
|
6715
|
-
var TextIcon = () => /* @__PURE__ */ (0,
|
|
6786
|
+
var TextIcon = () => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6716
6787
|
"svg",
|
|
6717
6788
|
{
|
|
6718
6789
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6719
6790
|
viewBox: "0 0 48 48",
|
|
6720
6791
|
className: "w-10 h-10",
|
|
6721
6792
|
children: [
|
|
6722
|
-
/* @__PURE__ */ (0,
|
|
6723
|
-
/* @__PURE__ */ (0,
|
|
6724
|
-
/* @__PURE__ */ (0,
|
|
6793
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
6794
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" }),
|
|
6795
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6725
6796
|
"path",
|
|
6726
6797
|
{
|
|
6727
6798
|
fill: "#1976D2",
|
|
@@ -6731,7 +6802,7 @@ var TextIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6731
6802
|
]
|
|
6732
6803
|
}
|
|
6733
6804
|
);
|
|
6734
|
-
var ArchiveIcon = () => /* @__PURE__ */ (0,
|
|
6805
|
+
var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6735
6806
|
"svg",
|
|
6736
6807
|
{
|
|
6737
6808
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6741,14 +6812,14 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6741
6812
|
version: "1.0",
|
|
6742
6813
|
className: "w-10 h-10",
|
|
6743
6814
|
children: [
|
|
6744
|
-
/* @__PURE__ */ (0,
|
|
6815
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("clipPath", { id: "273d29c8a6", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6745
6816
|
"path",
|
|
6746
6817
|
{
|
|
6747
6818
|
d: "M 8.90625 0 L 65.90625 0 L 65.90625 75 L 8.90625 75 Z M 8.90625 0 ",
|
|
6748
6819
|
"clip-rule": "nonzero"
|
|
6749
6820
|
}
|
|
6750
6821
|
) }) }),
|
|
6751
|
-
/* @__PURE__ */ (0,
|
|
6822
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("g", { "clip-path": "url(#273d29c8a6)", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6752
6823
|
"path",
|
|
6753
6824
|
{
|
|
6754
6825
|
fill: "#ff9100",
|
|
@@ -6757,7 +6828,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6757
6828
|
"fill-rule": "nonzero"
|
|
6758
6829
|
}
|
|
6759
6830
|
) }),
|
|
6760
|
-
/* @__PURE__ */ (0,
|
|
6831
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6761
6832
|
"path",
|
|
6762
6833
|
{
|
|
6763
6834
|
fill: "#fbe9e7",
|
|
@@ -6766,7 +6837,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6766
6837
|
"fill-rule": "nonzero"
|
|
6767
6838
|
}
|
|
6768
6839
|
),
|
|
6769
|
-
/* @__PURE__ */ (0,
|
|
6840
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6770
6841
|
"path",
|
|
6771
6842
|
{
|
|
6772
6843
|
fill: "#ffe0b2",
|
|
@@ -6775,7 +6846,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6775
6846
|
"fill-rule": "nonzero"
|
|
6776
6847
|
}
|
|
6777
6848
|
),
|
|
6778
|
-
/* @__PURE__ */ (0,
|
|
6849
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6779
6850
|
"path",
|
|
6780
6851
|
{
|
|
6781
6852
|
fill: "#ffe0b2",
|
|
@@ -6784,7 +6855,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
|
6784
6855
|
"fill-rule": "nonzero"
|
|
6785
6856
|
}
|
|
6786
6857
|
),
|
|
6787
|
-
/* @__PURE__ */ (0,
|
|
6858
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6788
6859
|
"path",
|
|
6789
6860
|
{
|
|
6790
6861
|
fill: "#ffe0b2",
|
|
@@ -6860,8 +6931,8 @@ var DocumentNode = (props) => {
|
|
|
6860
6931
|
}
|
|
6861
6932
|
}
|
|
6862
6933
|
if (documents.length === 0) {
|
|
6863
|
-
return /* @__PURE__ */ (0,
|
|
6864
|
-
/* @__PURE__ */ (0,
|
|
6934
|
+
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: [
|
|
6935
|
+
/* @__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)(
|
|
6865
6936
|
"svg",
|
|
6866
6937
|
{
|
|
6867
6938
|
className: "w-5 h-5",
|
|
@@ -6869,7 +6940,7 @@ var DocumentNode = (props) => {
|
|
|
6869
6940
|
stroke: "currentColor",
|
|
6870
6941
|
viewBox: "0 0 24 24",
|
|
6871
6942
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6872
|
-
children: /* @__PURE__ */ (0,
|
|
6943
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6873
6944
|
"path",
|
|
6874
6945
|
{
|
|
6875
6946
|
strokeLinecap: "round",
|
|
@@ -6880,11 +6951,11 @@ var DocumentNode = (props) => {
|
|
|
6880
6951
|
)
|
|
6881
6952
|
}
|
|
6882
6953
|
) }),
|
|
6883
|
-
/* @__PURE__ */ (0,
|
|
6884
|
-
/* @__PURE__ */ (0,
|
|
6954
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "text-sm font-medium", children: "No documents found" }),
|
|
6955
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "text-xs", children: "No records found. Data may be empty or not available at the moment." })
|
|
6885
6956
|
] }) });
|
|
6886
6957
|
}
|
|
6887
|
-
return /* @__PURE__ */ (0,
|
|
6958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "", children: documents.map((doc, index) => {
|
|
6888
6959
|
const documentUrl = AssetUtility_default.resolveUrl(
|
|
6889
6960
|
props.assetBaseUrl,
|
|
6890
6961
|
doc.assetUrl
|
|
@@ -6902,16 +6973,16 @@ var DocumentNode = (props) => {
|
|
|
6902
6973
|
}
|
|
6903
6974
|
}
|
|
6904
6975
|
const { Icon: Icon2, extLabel } = getFileDetails(documentUrl);
|
|
6905
|
-
return /* @__PURE__ */ (0,
|
|
6976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6906
6977
|
"div",
|
|
6907
6978
|
{
|
|
6908
6979
|
className: `flex items-center justify-between py-4 bg-default gap-4 ${index !== 0 ? "border-t" : ""}`,
|
|
6909
6980
|
children: [
|
|
6910
|
-
/* @__PURE__ */ (0,
|
|
6911
|
-
/* @__PURE__ */ (0,
|
|
6912
|
-
/* @__PURE__ */ (0,
|
|
6981
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex items-center space-x-4", children: [
|
|
6982
|
+
/* @__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, {}) }),
|
|
6983
|
+
/* @__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 }) })
|
|
6913
6984
|
] }),
|
|
6914
|
-
/* @__PURE__ */ (0,
|
|
6985
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6915
6986
|
"a",
|
|
6916
6987
|
{
|
|
6917
6988
|
href: documentUrl,
|
|
@@ -6919,7 +6990,7 @@ var DocumentNode = (props) => {
|
|
|
6919
6990
|
rel: "noopener noreferrer",
|
|
6920
6991
|
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",
|
|
6921
6992
|
children: [
|
|
6922
|
-
/* @__PURE__ */ (0,
|
|
6993
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6923
6994
|
"svg",
|
|
6924
6995
|
{
|
|
6925
6996
|
className: "w-4 h-4 mr-2",
|
|
@@ -6927,7 +6998,7 @@ var DocumentNode = (props) => {
|
|
|
6927
6998
|
stroke: "currentColor",
|
|
6928
6999
|
viewBox: "0 0 24 24",
|
|
6929
7000
|
children: [
|
|
6930
|
-
/* @__PURE__ */ (0,
|
|
7001
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6931
7002
|
"path",
|
|
6932
7003
|
{
|
|
6933
7004
|
strokeLinecap: "round",
|
|
@@ -6936,7 +7007,7 @@ var DocumentNode = (props) => {
|
|
|
6936
7007
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
|
6937
7008
|
}
|
|
6938
7009
|
),
|
|
6939
|
-
/* @__PURE__ */ (0,
|
|
7010
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6940
7011
|
"path",
|
|
6941
7012
|
{
|
|
6942
7013
|
strokeLinecap: "round",
|
|
@@ -6961,7 +7032,7 @@ var DocumentNode = (props) => {
|
|
|
6961
7032
|
var DocumentNode_default = DocumentNode;
|
|
6962
7033
|
|
|
6963
7034
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
6964
|
-
var
|
|
7035
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
6965
7036
|
var Pagination2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_Pagination(), Pagination_exports)), { ssr: true });
|
|
6966
7037
|
var Slider2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_Slider(), Slider_exports)), {
|
|
6967
7038
|
ssr: false
|
|
@@ -7216,7 +7287,7 @@ var DivContainer = async (props) => {
|
|
|
7216
7287
|
response = await serviceClient.get(endpoint);
|
|
7217
7288
|
result = response?.result;
|
|
7218
7289
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
7219
|
-
return /* @__PURE__ */ (0,
|
|
7290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(NoDataFound_default, {});
|
|
7220
7291
|
}
|
|
7221
7292
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
7222
7293
|
childCollectionData = getNestedValue6(
|
|
@@ -7236,7 +7307,7 @@ var DivContainer = async (props) => {
|
|
|
7236
7307
|
}
|
|
7237
7308
|
const SelectedNode = NodeTypes2[node.type];
|
|
7238
7309
|
if (!SelectedNode) return null;
|
|
7239
|
-
return /* @__PURE__ */ (0,
|
|
7310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react56.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7240
7311
|
SelectedNode,
|
|
7241
7312
|
{
|
|
7242
7313
|
node,
|
|
@@ -7369,14 +7440,14 @@ var DivContainer = async (props) => {
|
|
|
7369
7440
|
noLinkColor && "no-link-color",
|
|
7370
7441
|
!!props.node.enterAnimation && "enter-animation"
|
|
7371
7442
|
].filter(Boolean).join(" ");
|
|
7372
|
-
return /* @__PURE__ */ (0,
|
|
7373
|
-
/* @__PURE__ */ (0,
|
|
7443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_react56.default.Fragment, { children: [
|
|
7444
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7374
7445
|
"style",
|
|
7375
7446
|
{
|
|
7376
7447
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
7377
7448
|
}
|
|
7378
7449
|
),
|
|
7379
|
-
/* @__PURE__ */ (0,
|
|
7450
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7380
7451
|
Wrapper,
|
|
7381
7452
|
{
|
|
7382
7453
|
id: guid,
|
|
@@ -7390,11 +7461,11 @@ var DivContainer = async (props) => {
|
|
|
7390
7461
|
item,
|
|
7391
7462
|
idx,
|
|
7392
7463
|
props.href ? void 0 : item?.links?.view
|
|
7393
|
-
)?.map((child, i) => /* @__PURE__ */ (0,
|
|
7464
|
+
)?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react56.default.Fragment, { children: child }, i)) : renderChildren(props.node.children, props, item, idx)
|
|
7394
7465
|
)
|
|
7395
7466
|
}
|
|
7396
7467
|
),
|
|
7397
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0,
|
|
7468
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7398
7469
|
Pagination2,
|
|
7399
7470
|
{
|
|
7400
7471
|
path: props.path,
|
|
@@ -7407,7 +7478,7 @@ var DivContainer = async (props) => {
|
|
|
7407
7478
|
var DivContainer_default = DivContainer;
|
|
7408
7479
|
|
|
7409
7480
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
7410
|
-
var
|
|
7481
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
7411
7482
|
var NodeTypes = {
|
|
7412
7483
|
["paragraph"]: ParagraphNode_default,
|
|
7413
7484
|
["heading"]: HeadingNode_default,
|
|
@@ -7444,14 +7515,14 @@ var PageBodyRenderer = (props) => {
|
|
|
7444
7515
|
}
|
|
7445
7516
|
return true;
|
|
7446
7517
|
};
|
|
7447
|
-
return /* @__PURE__ */ (0,
|
|
7518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react57.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
7448
7519
|
{
|
|
7449
7520
|
}
|
|
7450
7521
|
const SelectedNode = NodeTypes[node.type];
|
|
7451
7522
|
if (!shouldRenderNode(node)) {
|
|
7452
7523
|
return null;
|
|
7453
7524
|
}
|
|
7454
|
-
return /* @__PURE__ */ (0,
|
|
7525
|
+
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)(
|
|
7455
7526
|
SelectedNode,
|
|
7456
7527
|
{
|
|
7457
7528
|
node,
|
|
@@ -7467,7 +7538,7 @@ var PageBodyRenderer = (props) => {
|
|
|
7467
7538
|
device: props.device,
|
|
7468
7539
|
widgetRenderer: props.widgetRenderer
|
|
7469
7540
|
}
|
|
7470
|
-
) }) : /* @__PURE__ */ (0,
|
|
7541
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react57.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7471
7542
|
SelectedNode,
|
|
7472
7543
|
{
|
|
7473
7544
|
node,
|
|
@@ -7488,10 +7559,10 @@ var PageBodyRenderer = (props) => {
|
|
|
7488
7559
|
var PageBodyRenderer_default = PageBodyRenderer;
|
|
7489
7560
|
|
|
7490
7561
|
// src/components/pageRenderingEngine/EnterAnimationHydrator.tsx
|
|
7491
|
-
var
|
|
7562
|
+
var import_react58 = require("react");
|
|
7492
7563
|
var ENTER_ANIMATION_SELECTOR = ".enter-animation";
|
|
7493
7564
|
function EnterAnimationHydrator() {
|
|
7494
|
-
(0,
|
|
7565
|
+
(0, import_react58.useEffect)(() => {
|
|
7495
7566
|
let observer;
|
|
7496
7567
|
const observedElements = /* @__PURE__ */ new WeakSet();
|
|
7497
7568
|
const revealAnimatedElements = () => {
|
|
@@ -7536,22 +7607,22 @@ function EnterAnimationHydrator() {
|
|
|
7536
7607
|
}
|
|
7537
7608
|
|
|
7538
7609
|
// src/components/Toast.tsx
|
|
7539
|
-
var
|
|
7610
|
+
var import_react59 = require("react");
|
|
7540
7611
|
init_ToastService();
|
|
7541
|
-
var
|
|
7612
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
7542
7613
|
var Toast = () => {
|
|
7543
|
-
const [showToast, setShowToast] = (0,
|
|
7544
|
-
const [message, setMessage] = (0,
|
|
7545
|
-
const [messageType, setMessageType] = (0,
|
|
7546
|
-
const timeoutRef = (0,
|
|
7547
|
-
const closeToast = (0,
|
|
7614
|
+
const [showToast, setShowToast] = (0, import_react59.useState)(false);
|
|
7615
|
+
const [message, setMessage] = (0, import_react59.useState)("");
|
|
7616
|
+
const [messageType, setMessageType] = (0, import_react59.useState)("error");
|
|
7617
|
+
const timeoutRef = (0, import_react59.useRef)(null);
|
|
7618
|
+
const closeToast = (0, import_react59.useCallback)(() => {
|
|
7548
7619
|
if (timeoutRef.current) {
|
|
7549
7620
|
clearTimeout(timeoutRef.current);
|
|
7550
7621
|
timeoutRef.current = null;
|
|
7551
7622
|
}
|
|
7552
7623
|
setShowToast(false);
|
|
7553
7624
|
}, []);
|
|
7554
|
-
const showMessage = (0,
|
|
7625
|
+
const showMessage = (0, import_react59.useCallback)((message2, messageType2) => {
|
|
7555
7626
|
if (timeoutRef.current) {
|
|
7556
7627
|
clearTimeout(timeoutRef.current);
|
|
7557
7628
|
}
|
|
@@ -7563,7 +7634,7 @@ var Toast = () => {
|
|
|
7563
7634
|
timeoutRef.current = null;
|
|
7564
7635
|
}, 4e3);
|
|
7565
7636
|
}, []);
|
|
7566
|
-
(0,
|
|
7637
|
+
(0, import_react59.useEffect)(() => {
|
|
7567
7638
|
ToastService_default.initialize(showMessage, closeToast);
|
|
7568
7639
|
return () => {
|
|
7569
7640
|
closeToast();
|
|
@@ -7572,8 +7643,8 @@ var Toast = () => {
|
|
|
7572
7643
|
});
|
|
7573
7644
|
};
|
|
7574
7645
|
}, [closeToast, showMessage]);
|
|
7575
|
-
return /* @__PURE__ */ (0,
|
|
7576
|
-
/* @__PURE__ */ (0,
|
|
7646
|
+
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: [
|
|
7647
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7577
7648
|
"span",
|
|
7578
7649
|
{
|
|
7579
7650
|
className: "font-medium text-inherit text-sm",
|
|
@@ -7581,7 +7652,7 @@ var Toast = () => {
|
|
|
7581
7652
|
children: message
|
|
7582
7653
|
}
|
|
7583
7654
|
),
|
|
7584
|
-
/* @__PURE__ */ (0,
|
|
7655
|
+
/* @__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)(
|
|
7585
7656
|
"svg",
|
|
7586
7657
|
{
|
|
7587
7658
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -7589,7 +7660,7 @@ var Toast = () => {
|
|
|
7589
7660
|
fill: "none",
|
|
7590
7661
|
viewBox: "0 0 24 24",
|
|
7591
7662
|
stroke: "currentColor",
|
|
7592
|
-
children: /* @__PURE__ */ (0,
|
|
7663
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
7593
7664
|
}
|
|
7594
7665
|
) })
|
|
7595
7666
|
] }) }) });
|
|
@@ -7620,7 +7691,7 @@ init_Switcher();
|
|
|
7620
7691
|
// src/components/NavigationTabsV2.tsx
|
|
7621
7692
|
var import_link3 = __toESM(require("next/link"));
|
|
7622
7693
|
var import_navigation = require("next/navigation");
|
|
7623
|
-
var
|
|
7694
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
7624
7695
|
function resolveRoutePlaceholders(route, params) {
|
|
7625
7696
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
7626
7697
|
const value = params[key];
|
|
@@ -7645,8 +7716,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
7645
7716
|
isActive: tab.isActive
|
|
7646
7717
|
})) || [];
|
|
7647
7718
|
if (mappedTabs.length === 0) return null;
|
|
7648
|
-
return /* @__PURE__ */ (0,
|
|
7649
|
-
return /* @__PURE__ */ (0,
|
|
7719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
7720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_link3.default, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7650
7721
|
"div",
|
|
7651
7722
|
{
|
|
7652
7723
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -7659,14 +7730,14 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
7659
7730
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
7660
7731
|
|
|
7661
7732
|
// src/components/dataForm/DataList.tsx
|
|
7662
|
-
var
|
|
7733
|
+
var import_react62 = __toESM(require("react"));
|
|
7663
7734
|
var import_navigation2 = require("next/navigation");
|
|
7664
7735
|
|
|
7665
7736
|
// src/components/dataForm/NoContentView.tsx
|
|
7666
|
-
var
|
|
7667
|
-
var
|
|
7737
|
+
var import_react60 = __toESM(require("react"));
|
|
7738
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
7668
7739
|
var NoContentView = (props) => {
|
|
7669
|
-
return /* @__PURE__ */ (0,
|
|
7740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react60.default.Fragment, { children: props.isDataFound === false && props.children });
|
|
7670
7741
|
};
|
|
7671
7742
|
var NoContentView_default = NoContentView;
|
|
7672
7743
|
|
|
@@ -7674,39 +7745,39 @@ var NoContentView_default = NoContentView;
|
|
|
7674
7745
|
init_InputControlType();
|
|
7675
7746
|
|
|
7676
7747
|
// src/components/dataForm/ContentView.tsx
|
|
7677
|
-
var
|
|
7678
|
-
var
|
|
7748
|
+
var import_react61 = __toESM(require("react"));
|
|
7749
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
7679
7750
|
var ContentView = (props) => {
|
|
7680
|
-
return /* @__PURE__ */ (0,
|
|
7681
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
7682
|
-
/* @__PURE__ */ (0,
|
|
7683
|
-
/* @__PURE__ */ (0,
|
|
7684
|
-
/* @__PURE__ */ (0,
|
|
7685
|
-
/* @__PURE__ */ (0,
|
|
7686
|
-
/* @__PURE__ */ (0,
|
|
7751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_react61.default.Fragment, { children: [
|
|
7752
|
+
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: [
|
|
7753
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
7754
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
7755
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ml-2", children: [
|
|
7756
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
7757
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
7687
7758
|
] })
|
|
7688
7759
|
] }),
|
|
7689
|
-
/* @__PURE__ */ (0,
|
|
7690
|
-
/* @__PURE__ */ (0,
|
|
7691
|
-
/* @__PURE__ */ (0,
|
|
7692
|
-
/* @__PURE__ */ (0,
|
|
7693
|
-
/* @__PURE__ */ (0,
|
|
7694
|
-
/* @__PURE__ */ (0,
|
|
7695
|
-
/* @__PURE__ */ (0,
|
|
7760
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
7761
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "animate-pulse", children: [
|
|
7762
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
7763
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
7764
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
7765
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
7766
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
7696
7767
|
] }),
|
|
7697
|
-
/* @__PURE__ */ (0,
|
|
7698
|
-
/* @__PURE__ */ (0,
|
|
7699
|
-
/* @__PURE__ */ (0,
|
|
7700
|
-
/* @__PURE__ */ (0,
|
|
7701
|
-
/* @__PURE__ */ (0,
|
|
7702
|
-
/* @__PURE__ */ (0,
|
|
7768
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "animate-pulse", children: [
|
|
7769
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
7770
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
7771
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
7772
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
7773
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
7703
7774
|
] }),
|
|
7704
|
-
/* @__PURE__ */ (0,
|
|
7705
|
-
/* @__PURE__ */ (0,
|
|
7706
|
-
/* @__PURE__ */ (0,
|
|
7707
|
-
/* @__PURE__ */ (0,
|
|
7708
|
-
/* @__PURE__ */ (0,
|
|
7709
|
-
/* @__PURE__ */ (0,
|
|
7775
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "animate-pulse", children: [
|
|
7776
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
7777
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
7778
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
7779
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
7780
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
7710
7781
|
] })
|
|
7711
7782
|
] })
|
|
7712
7783
|
] }) }),
|
|
@@ -7766,7 +7837,7 @@ function FormReducer(state, action) {
|
|
|
7766
7837
|
var FormReducer_default = FormReducer;
|
|
7767
7838
|
|
|
7768
7839
|
// src/components/dataForm/DataList.tsx
|
|
7769
|
-
var
|
|
7840
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
7770
7841
|
var DataList = (props) => {
|
|
7771
7842
|
const router = (0, import_navigation2.useRouter)();
|
|
7772
7843
|
let builder = new OdataBuilder(props.path);
|
|
@@ -7774,9 +7845,9 @@ var DataList = (props) => {
|
|
|
7774
7845
|
let activePageNumber = 0;
|
|
7775
7846
|
let pages = 0;
|
|
7776
7847
|
console.log(props.addLinkText);
|
|
7777
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
7778
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
7779
|
-
(0,
|
|
7848
|
+
const [isDataFound, setIsDataFound] = (0, import_react62.useState)(null);
|
|
7849
|
+
const [searchTerm, setSearchTerm] = (0, import_react62.useState)(props.query?.searchTerm ?? "");
|
|
7850
|
+
(0, import_react62.useEffect)(() => {
|
|
7780
7851
|
if (props?.dataset) {
|
|
7781
7852
|
if (props?.dataset.result && props.dataset.result.length > 0) {
|
|
7782
7853
|
setIsDataFound(true);
|
|
@@ -7785,7 +7856,7 @@ var DataList = (props) => {
|
|
|
7785
7856
|
}
|
|
7786
7857
|
}
|
|
7787
7858
|
}, [props.dataset]);
|
|
7788
|
-
(0,
|
|
7859
|
+
(0, import_react62.useEffect)(() => {
|
|
7789
7860
|
if (!props.query?.["$filter"] || !props.filters) return;
|
|
7790
7861
|
const filterQuery = props.query["$filter"];
|
|
7791
7862
|
props.filters.forEach((filter) => {
|
|
@@ -7804,7 +7875,7 @@ var DataList = (props) => {
|
|
|
7804
7875
|
if (path.includes(".")) {
|
|
7805
7876
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
7806
7877
|
} else if (Array.isArray(obj[path])) {
|
|
7807
|
-
return obj[path].map((item, index) => /* @__PURE__ */ (0,
|
|
7878
|
+
return obj[path].map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { children: item }, index));
|
|
7808
7879
|
} else {
|
|
7809
7880
|
return obj[path];
|
|
7810
7881
|
}
|
|
@@ -7813,11 +7884,11 @@ var DataList = (props) => {
|
|
|
7813
7884
|
inputValues: {},
|
|
7814
7885
|
lastPropertyChanged: ""
|
|
7815
7886
|
};
|
|
7816
|
-
const [formState, dispatch] = (0,
|
|
7887
|
+
const [formState, dispatch] = (0, import_react62.useReducer)(FormReducer_default, initialState);
|
|
7817
7888
|
const getSearchableColumns = () => {
|
|
7818
7889
|
return props.columns?.filter((c) => c.isSearchable)?.map((c) => c.name)?.join(",");
|
|
7819
7890
|
};
|
|
7820
|
-
const handleFilterChange = (0,
|
|
7891
|
+
const handleFilterChange = (0, import_react62.useCallback)(
|
|
7821
7892
|
(updatedValues) => {
|
|
7822
7893
|
dispatch({
|
|
7823
7894
|
type: FORM_INPUT_UPDATE,
|
|
@@ -7848,7 +7919,7 @@ var DataList = (props) => {
|
|
|
7848
7919
|
},
|
|
7849
7920
|
[dispatch, props, router]
|
|
7850
7921
|
);
|
|
7851
|
-
(0,
|
|
7922
|
+
(0, import_react62.useEffect)(() => {
|
|
7852
7923
|
if (!props.columns.some((col) => col.isSearchable)) {
|
|
7853
7924
|
return;
|
|
7854
7925
|
}
|
|
@@ -7883,30 +7954,30 @@ var DataList = (props) => {
|
|
|
7883
7954
|
const renderPageNumbers = () => {
|
|
7884
7955
|
if (pages <= 10) {
|
|
7885
7956
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
7886
|
-
(page) => /* @__PURE__ */ (0,
|
|
7957
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_react62.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
7887
7958
|
Hyperlink,
|
|
7888
7959
|
{
|
|
7889
7960
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7890
7961
|
href: builder.getNewPageUrl(page),
|
|
7891
7962
|
children: page
|
|
7892
7963
|
}
|
|
7893
|
-
) : /* @__PURE__ */ (0,
|
|
7964
|
+
) : /* @__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)
|
|
7894
7965
|
);
|
|
7895
7966
|
} else {
|
|
7896
7967
|
const showFirstPages = activePageNumber <= 5;
|
|
7897
7968
|
const showLastPages = activePageNumber > pages - 5;
|
|
7898
7969
|
if (showFirstPages) {
|
|
7899
|
-
return /* @__PURE__ */ (0,
|
|
7900
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0,
|
|
7970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
|
|
7971
|
+
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)(
|
|
7901
7972
|
Hyperlink,
|
|
7902
7973
|
{
|
|
7903
7974
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7904
7975
|
href: builder.getNewPageUrl(page),
|
|
7905
7976
|
children: page
|
|
7906
7977
|
}
|
|
7907
|
-
) : /* @__PURE__ */ (0,
|
|
7908
|
-
/* @__PURE__ */ (0,
|
|
7909
|
-
/* @__PURE__ */ (0,
|
|
7978
|
+
) : /* @__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)),
|
|
7979
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7980
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
7910
7981
|
Hyperlink,
|
|
7911
7982
|
{
|
|
7912
7983
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7914,7 +7985,7 @@ var DataList = (props) => {
|
|
|
7914
7985
|
children: pages - 1
|
|
7915
7986
|
}
|
|
7916
7987
|
),
|
|
7917
|
-
/* @__PURE__ */ (0,
|
|
7988
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
7918
7989
|
Hyperlink,
|
|
7919
7990
|
{
|
|
7920
7991
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7922,7 +7993,7 @@ var DataList = (props) => {
|
|
|
7922
7993
|
children: pages
|
|
7923
7994
|
}
|
|
7924
7995
|
),
|
|
7925
|
-
/* @__PURE__ */ (0,
|
|
7996
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
7926
7997
|
"select",
|
|
7927
7998
|
{
|
|
7928
7999
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -7934,18 +8005,18 @@ var DataList = (props) => {
|
|
|
7934
8005
|
}
|
|
7935
8006
|
},
|
|
7936
8007
|
children: [
|
|
7937
|
-
/* @__PURE__ */ (0,
|
|
8008
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("option", { className: "", value: "", children: "Jump to" }),
|
|
7938
8009
|
Array.from(
|
|
7939
8010
|
{ length: Math.max(0, pages - 10) },
|
|
7940
8011
|
(_, index) => index + 9
|
|
7941
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
8012
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("option", { value: page, children: page }, page))
|
|
7942
8013
|
]
|
|
7943
8014
|
}
|
|
7944
8015
|
) })
|
|
7945
8016
|
] });
|
|
7946
8017
|
} else if (showLastPages) {
|
|
7947
|
-
return /* @__PURE__ */ (0,
|
|
7948
|
-
/* @__PURE__ */ (0,
|
|
8018
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
|
|
8019
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
7949
8020
|
Hyperlink,
|
|
7950
8021
|
{
|
|
7951
8022
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7953,7 +8024,7 @@ var DataList = (props) => {
|
|
|
7953
8024
|
children: "1"
|
|
7954
8025
|
}
|
|
7955
8026
|
),
|
|
7956
|
-
/* @__PURE__ */ (0,
|
|
8027
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
7957
8028
|
Hyperlink,
|
|
7958
8029
|
{
|
|
7959
8030
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7961,21 +8032,21 @@ var DataList = (props) => {
|
|
|
7961
8032
|
children: "2"
|
|
7962
8033
|
}
|
|
7963
8034
|
),
|
|
7964
|
-
/* @__PURE__ */ (0,
|
|
8035
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7965
8036
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
7966
|
-
(page) => /* @__PURE__ */ (0,
|
|
8037
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_react62.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
7967
8038
|
Hyperlink,
|
|
7968
8039
|
{
|
|
7969
8040
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7970
8041
|
href: builder.getNewPageUrl(page),
|
|
7971
8042
|
children: page
|
|
7972
8043
|
}
|
|
7973
|
-
) : /* @__PURE__ */ (0,
|
|
8044
|
+
) : /* @__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)
|
|
7974
8045
|
)
|
|
7975
8046
|
] });
|
|
7976
8047
|
} else {
|
|
7977
|
-
return /* @__PURE__ */ (0,
|
|
7978
|
-
/* @__PURE__ */ (0,
|
|
8048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_jsx_runtime83.Fragment, { children: [
|
|
8049
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
7979
8050
|
Hyperlink,
|
|
7980
8051
|
{
|
|
7981
8052
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7983,7 +8054,7 @@ var DataList = (props) => {
|
|
|
7983
8054
|
children: "1"
|
|
7984
8055
|
}
|
|
7985
8056
|
),
|
|
7986
|
-
/* @__PURE__ */ (0,
|
|
8057
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
7987
8058
|
Hyperlink,
|
|
7988
8059
|
{
|
|
7989
8060
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7991,20 +8062,20 @@ var DataList = (props) => {
|
|
|
7991
8062
|
children: "2"
|
|
7992
8063
|
}
|
|
7993
8064
|
),
|
|
7994
|
-
/* @__PURE__ */ (0,
|
|
8065
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7995
8066
|
Array.from(
|
|
7996
8067
|
{ length: 5 },
|
|
7997
8068
|
(_, index) => activePageNumber - 2 + index
|
|
7998
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
8069
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_react62.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
7999
8070
|
Hyperlink,
|
|
8000
8071
|
{
|
|
8001
8072
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
8002
8073
|
href: builder.getNewPageUrl(page),
|
|
8003
8074
|
children: page
|
|
8004
8075
|
}
|
|
8005
|
-
) : /* @__PURE__ */ (0,
|
|
8006
|
-
/* @__PURE__ */ (0,
|
|
8007
|
-
/* @__PURE__ */ (0,
|
|
8076
|
+
) : /* @__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)),
|
|
8077
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
8078
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8008
8079
|
Hyperlink,
|
|
8009
8080
|
{
|
|
8010
8081
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -8012,7 +8083,7 @@ var DataList = (props) => {
|
|
|
8012
8083
|
children: pages - 1
|
|
8013
8084
|
}
|
|
8014
8085
|
),
|
|
8015
|
-
/* @__PURE__ */ (0,
|
|
8086
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8016
8087
|
Hyperlink,
|
|
8017
8088
|
{
|
|
8018
8089
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -8020,7 +8091,7 @@ var DataList = (props) => {
|
|
|
8020
8091
|
children: pages
|
|
8021
8092
|
}
|
|
8022
8093
|
),
|
|
8023
|
-
/* @__PURE__ */ (0,
|
|
8094
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
8024
8095
|
"select",
|
|
8025
8096
|
{
|
|
8026
8097
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -8032,8 +8103,8 @@ var DataList = (props) => {
|
|
|
8032
8103
|
}
|
|
8033
8104
|
},
|
|
8034
8105
|
children: [
|
|
8035
|
-
/* @__PURE__ */ (0,
|
|
8036
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0,
|
|
8106
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("option", { value: "", children: "Jump to" }),
|
|
8107
|
+
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))
|
|
8037
8108
|
]
|
|
8038
8109
|
}
|
|
8039
8110
|
) })
|
|
@@ -8041,16 +8112,16 @@ var DataList = (props) => {
|
|
|
8041
8112
|
}
|
|
8042
8113
|
}
|
|
8043
8114
|
};
|
|
8044
|
-
return /* @__PURE__ */ (0,
|
|
8045
|
-
/* @__PURE__ */ (0,
|
|
8046
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
8115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(import_react62.default.Fragment, { children: [
|
|
8116
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(ContentView_default, { isDataFound, children: [
|
|
8117
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
8047
8118
|
"div",
|
|
8048
8119
|
{
|
|
8049
8120
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md sticky top-0`,
|
|
8050
8121
|
children: [
|
|
8051
|
-
props.title ? /* @__PURE__ */ (0,
|
|
8052
|
-
/* @__PURE__ */ (0,
|
|
8053
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
8122
|
+
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", {}),
|
|
8123
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
8124
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8054
8125
|
InputControl_default,
|
|
8055
8126
|
{
|
|
8056
8127
|
name: "Search_input",
|
|
@@ -8062,7 +8133,7 @@ var DataList = (props) => {
|
|
|
8062
8133
|
}
|
|
8063
8134
|
}
|
|
8064
8135
|
),
|
|
8065
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
8136
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8066
8137
|
InputControl_default,
|
|
8067
8138
|
{
|
|
8068
8139
|
name: filter.name,
|
|
@@ -8077,15 +8148,15 @@ var DataList = (props) => {
|
|
|
8077
8148
|
},
|
|
8078
8149
|
filter.name
|
|
8079
8150
|
)),
|
|
8080
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
8151
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
8081
8152
|
Hyperlink,
|
|
8082
8153
|
{
|
|
8083
8154
|
className: "gap-1",
|
|
8084
8155
|
linkType: "Primary" /* Solid */,
|
|
8085
8156
|
href: props.addLinkHref,
|
|
8086
8157
|
children: [
|
|
8087
|
-
/* @__PURE__ */ (0,
|
|
8088
|
-
/* @__PURE__ */ (0,
|
|
8158
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
8159
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
8089
8160
|
]
|
|
8090
8161
|
}
|
|
8091
8162
|
)
|
|
@@ -8093,8 +8164,8 @@ var DataList = (props) => {
|
|
|
8093
8164
|
]
|
|
8094
8165
|
}
|
|
8095
8166
|
),
|
|
8096
|
-
/* @__PURE__ */ (0,
|
|
8097
|
-
/* @__PURE__ */ (0,
|
|
8167
|
+
/* @__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: [
|
|
8168
|
+
/* @__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) => {
|
|
8098
8169
|
let url = builder.getNewOrderByUrl(column.name);
|
|
8099
8170
|
let icon = "chevronUpDown";
|
|
8100
8171
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -8104,18 +8175,18 @@ var DataList = (props) => {
|
|
|
8104
8175
|
icon = "chevronUp";
|
|
8105
8176
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
8106
8177
|
}
|
|
8107
|
-
return /* @__PURE__ */ (0,
|
|
8178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8108
8179
|
"th",
|
|
8109
8180
|
{
|
|
8110
8181
|
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" : ""),
|
|
8111
|
-
children: /* @__PURE__ */ (0,
|
|
8182
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8112
8183
|
Hyperlink,
|
|
8113
8184
|
{
|
|
8114
8185
|
href: column.enableSorting ? url : void 0,
|
|
8115
8186
|
className: "!text-neutral-contrast ",
|
|
8116
|
-
children: /* @__PURE__ */ (0,
|
|
8117
|
-
/* @__PURE__ */ (0,
|
|
8118
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
8187
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
8188
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "text-black", children: column.label }),
|
|
8189
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
8119
8190
|
] })
|
|
8120
8191
|
}
|
|
8121
8192
|
)
|
|
@@ -8123,24 +8194,24 @@ var DataList = (props) => {
|
|
|
8123
8194
|
column.name
|
|
8124
8195
|
);
|
|
8125
8196
|
}) }) }),
|
|
8126
|
-
/* @__PURE__ */ (0,
|
|
8197
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
8127
8198
|
let validityClass = "";
|
|
8128
8199
|
console.log("dataitem", dataitem);
|
|
8129
8200
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
8130
8201
|
validityClass = "bg-alert-200";
|
|
8131
8202
|
}
|
|
8132
|
-
return /* @__PURE__ */ (0,
|
|
8203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
8133
8204
|
console.log("column", column);
|
|
8134
|
-
return /* @__PURE__ */ (0,
|
|
8205
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_react62.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8135
8206
|
"td",
|
|
8136
8207
|
{
|
|
8137
8208
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
8138
|
-
children: column.addhref === true ? /* @__PURE__ */ (0,
|
|
8209
|
+
children: column.addhref === true ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8139
8210
|
Hyperlink,
|
|
8140
8211
|
{
|
|
8141
8212
|
className: "",
|
|
8142
8213
|
href: `https://${dataitem[column.name]}`,
|
|
8143
|
-
children: /* @__PURE__ */ (0,
|
|
8214
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8144
8215
|
ViewControl_default,
|
|
8145
8216
|
{
|
|
8146
8217
|
controlType: column.controlType,
|
|
@@ -8153,11 +8224,11 @@ var DataList = (props) => {
|
|
|
8153
8224
|
}
|
|
8154
8225
|
)
|
|
8155
8226
|
}
|
|
8156
|
-
) : column.showAsLink ? /* @__PURE__ */ (0,
|
|
8227
|
+
) : column.showAsLink ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8157
8228
|
Hyperlink,
|
|
8158
8229
|
{
|
|
8159
8230
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
8160
|
-
children: /* @__PURE__ */ (0,
|
|
8231
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8161
8232
|
ViewControl_default,
|
|
8162
8233
|
{
|
|
8163
8234
|
controlType: column.controlType,
|
|
@@ -8167,7 +8238,7 @@ var DataList = (props) => {
|
|
|
8167
8238
|
}
|
|
8168
8239
|
)
|
|
8169
8240
|
}
|
|
8170
|
-
) : /* @__PURE__ */ (0,
|
|
8241
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8171
8242
|
ViewControl_default,
|
|
8172
8243
|
{
|
|
8173
8244
|
controlType: column.controlType,
|
|
@@ -8181,10 +8252,10 @@ var DataList = (props) => {
|
|
|
8181
8252
|
}) }, index);
|
|
8182
8253
|
}) })
|
|
8183
8254
|
] }) }),
|
|
8184
|
-
/* @__PURE__ */ (0,
|
|
8185
|
-
/* @__PURE__ */ (0,
|
|
8186
|
-
/* @__PURE__ */ (0,
|
|
8187
|
-
activePageNumber > 1 && /* @__PURE__ */ (0,
|
|
8255
|
+
/* @__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: [
|
|
8256
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "text-gray-700", children: label }),
|
|
8257
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex space-x-2 items-center", children: [
|
|
8258
|
+
activePageNumber > 1 && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8188
8259
|
Hyperlink,
|
|
8189
8260
|
{
|
|
8190
8261
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -8192,9 +8263,9 @@ var DataList = (props) => {
|
|
|
8192
8263
|
children: "Prev"
|
|
8193
8264
|
}
|
|
8194
8265
|
),
|
|
8195
|
-
activePageNumber <= 1 && /* @__PURE__ */ (0,
|
|
8266
|
+
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" }),
|
|
8196
8267
|
renderPageNumbers(),
|
|
8197
|
-
activePageNumber < pages && /* @__PURE__ */ (0,
|
|
8268
|
+
activePageNumber < pages && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8198
8269
|
Hyperlink,
|
|
8199
8270
|
{
|
|
8200
8271
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -8202,19 +8273,19 @@ var DataList = (props) => {
|
|
|
8202
8273
|
children: "Next"
|
|
8203
8274
|
}
|
|
8204
8275
|
),
|
|
8205
|
-
activePageNumber >= pages && /* @__PURE__ */ (0,
|
|
8276
|
+
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" })
|
|
8206
8277
|
] })
|
|
8207
8278
|
] }) })
|
|
8208
8279
|
] }),
|
|
8209
|
-
/* @__PURE__ */ (0,
|
|
8210
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
8280
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(NoContentView_default, { isDataFound, children: [
|
|
8281
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
8211
8282
|
"div",
|
|
8212
8283
|
{
|
|
8213
8284
|
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`,
|
|
8214
8285
|
children: [
|
|
8215
|
-
props.title ? /* @__PURE__ */ (0,
|
|
8216
|
-
/* @__PURE__ */ (0,
|
|
8217
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
8286
|
+
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", {}),
|
|
8287
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
8288
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8218
8289
|
InputControl_default,
|
|
8219
8290
|
{
|
|
8220
8291
|
name: "Search_input",
|
|
@@ -8226,7 +8297,7 @@ var DataList = (props) => {
|
|
|
8226
8297
|
}
|
|
8227
8298
|
}
|
|
8228
8299
|
),
|
|
8229
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
8300
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8230
8301
|
InputControl_default,
|
|
8231
8302
|
{
|
|
8232
8303
|
name: filter.name,
|
|
@@ -8241,15 +8312,15 @@ var DataList = (props) => {
|
|
|
8241
8312
|
},
|
|
8242
8313
|
filter.name
|
|
8243
8314
|
)),
|
|
8244
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
8315
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
8245
8316
|
Hyperlink,
|
|
8246
8317
|
{
|
|
8247
8318
|
className: "gap-1",
|
|
8248
8319
|
linkType: "Primary" /* Solid */,
|
|
8249
8320
|
href: props.addLinkHref,
|
|
8250
8321
|
children: [
|
|
8251
|
-
/* @__PURE__ */ (0,
|
|
8252
|
-
/* @__PURE__ */ (0,
|
|
8322
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
8323
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
8253
8324
|
]
|
|
8254
8325
|
}
|
|
8255
8326
|
)
|
|
@@ -8257,8 +8328,8 @@ var DataList = (props) => {
|
|
|
8257
8328
|
]
|
|
8258
8329
|
}
|
|
8259
8330
|
),
|
|
8260
|
-
/* @__PURE__ */ (0,
|
|
8261
|
-
/* @__PURE__ */ (0,
|
|
8331
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
8332
|
+
/* @__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) => {
|
|
8262
8333
|
let url = builder.getNewOrderByUrl(column.name);
|
|
8263
8334
|
let icon = "chevronUpDown";
|
|
8264
8335
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -8268,18 +8339,18 @@ var DataList = (props) => {
|
|
|
8268
8339
|
icon = "chevronUp";
|
|
8269
8340
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
8270
8341
|
}
|
|
8271
|
-
return /* @__PURE__ */ (0,
|
|
8342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8272
8343
|
"th",
|
|
8273
8344
|
{
|
|
8274
8345
|
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" : ""),
|
|
8275
|
-
children: /* @__PURE__ */ (0,
|
|
8346
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8276
8347
|
Hyperlink,
|
|
8277
8348
|
{
|
|
8278
8349
|
href: column.enableSorting ? url : void 0,
|
|
8279
8350
|
className: "text-body-950",
|
|
8280
|
-
children: /* @__PURE__ */ (0,
|
|
8281
|
-
/* @__PURE__ */ (0,
|
|
8282
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
8351
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
8352
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { children: column.label }),
|
|
8353
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
8283
8354
|
] })
|
|
8284
8355
|
}
|
|
8285
8356
|
)
|
|
@@ -8287,7 +8358,7 @@ var DataList = (props) => {
|
|
|
8287
8358
|
column.name
|
|
8288
8359
|
);
|
|
8289
8360
|
}) }) }) }) }),
|
|
8290
|
-
/* @__PURE__ */ (0,
|
|
8361
|
+
/* @__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." })
|
|
8291
8362
|
] })
|
|
8292
8363
|
] })
|
|
8293
8364
|
] });
|
|
@@ -8295,12 +8366,12 @@ var DataList = (props) => {
|
|
|
8295
8366
|
var DataList_default = DataList;
|
|
8296
8367
|
|
|
8297
8368
|
// src/components/dataForm/DataListRenderer.tsx
|
|
8298
|
-
var
|
|
8369
|
+
var import_react63 = __toESM(require("react"));
|
|
8299
8370
|
init_ServiceClient();
|
|
8300
8371
|
init_OdataBuilder();
|
|
8301
8372
|
init_SelectWithSearchInput();
|
|
8302
8373
|
var import_navigation3 = require("next/navigation");
|
|
8303
|
-
var
|
|
8374
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
8304
8375
|
var viewControlMap = {
|
|
8305
8376
|
number: ViewControlTypes.number,
|
|
8306
8377
|
lineText: ViewControlTypes.lineText,
|
|
@@ -8355,14 +8426,14 @@ var DataListRenderer = ({
|
|
|
8355
8426
|
widgetProps
|
|
8356
8427
|
}) => {
|
|
8357
8428
|
const serviceClient = new ServiceClient_default(apiBaseUrl, session);
|
|
8358
|
-
const [columns, setColumns] = (0,
|
|
8359
|
-
const [dataset, setDataset] = (0,
|
|
8360
|
-
const [filter, setFilters] = (0,
|
|
8361
|
-
const [addLinkHref, setAddLinkHref] = (0,
|
|
8362
|
-
const [addLinkText, setAddLinkText] = (0,
|
|
8363
|
-
const [serviceRoute, setServiceRoute] = (0,
|
|
8429
|
+
const [columns, setColumns] = (0, import_react63.useState)([]);
|
|
8430
|
+
const [dataset, setDataset] = (0, import_react63.useState)();
|
|
8431
|
+
const [filter, setFilters] = (0, import_react63.useState)([]);
|
|
8432
|
+
const [addLinkHref, setAddLinkHref] = (0, import_react63.useState)("");
|
|
8433
|
+
const [addLinkText, setAddLinkText] = (0, import_react63.useState)("");
|
|
8434
|
+
const [serviceRoute, setServiceRoute] = (0, import_react63.useState)("");
|
|
8364
8435
|
const pathname = (0, import_navigation3.usePathname)();
|
|
8365
|
-
(0,
|
|
8436
|
+
(0, import_react63.useEffect)(() => {
|
|
8366
8437
|
if (!formDefinition) return;
|
|
8367
8438
|
setColumns(mapApiToColumns(formDefinition));
|
|
8368
8439
|
setFilters(mapApiToFilters(formDefinition));
|
|
@@ -8375,7 +8446,7 @@ var DataListRenderer = ({
|
|
|
8375
8446
|
setAddLinkHref(resolvedAddLinkHref);
|
|
8376
8447
|
setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
|
|
8377
8448
|
}, [formDefinition, params]);
|
|
8378
|
-
(0,
|
|
8449
|
+
(0, import_react63.useEffect)(() => {
|
|
8379
8450
|
const fetchData = async () => {
|
|
8380
8451
|
if (!serviceRoute) return;
|
|
8381
8452
|
const resolvedRoute = resolveRoutePlaceholders2(serviceRoute, params);
|
|
@@ -8395,13 +8466,13 @@ var DataListRenderer = ({
|
|
|
8395
8466
|
isActive: landingPageUrl === pathname
|
|
8396
8467
|
};
|
|
8397
8468
|
});
|
|
8398
|
-
return /* @__PURE__ */ (0,
|
|
8469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_react63.default.Fragment, { children: [
|
|
8399
8470
|
resolvedTabs.length > 0 && // <NavigationTabsV2
|
|
8400
8471
|
// tabs={resolvedTabs}
|
|
8401
8472
|
// params={(widgetProps?.params ?? params) as Record<string, any>}
|
|
8402
8473
|
// />
|
|
8403
|
-
/* @__PURE__ */ (0,
|
|
8404
|
-
/* @__PURE__ */ (0,
|
|
8474
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
8475
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
8405
8476
|
DataList_default,
|
|
8406
8477
|
{
|
|
8407
8478
|
addLinkHref,
|
|
@@ -8423,13 +8494,13 @@ var DataListRenderer_default = DataListRenderer;
|
|
|
8423
8494
|
init_InputControlType();
|
|
8424
8495
|
|
|
8425
8496
|
// src/components/dataForm/DataForm.tsx
|
|
8426
|
-
var
|
|
8497
|
+
var import_react65 = __toESM(require("react"));
|
|
8427
8498
|
init_Icon();
|
|
8428
8499
|
init_Button();
|
|
8429
8500
|
init_StyleTypes();
|
|
8430
8501
|
|
|
8431
8502
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
8432
|
-
var
|
|
8503
|
+
var import_react64 = __toESM(require("react"));
|
|
8433
8504
|
|
|
8434
8505
|
// src/components/dataForm/StyleTypes.tsx
|
|
8435
8506
|
var StyleTypes2 = /* @__PURE__ */ ((StyleTypes3) => {
|
|
@@ -8456,7 +8527,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
8456
8527
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
8457
8528
|
|
|
8458
8529
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
8459
|
-
var
|
|
8530
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
8460
8531
|
var DataFormChildSection = (props) => {
|
|
8461
8532
|
const { section } = props;
|
|
8462
8533
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -8468,7 +8539,7 @@ var DataFormChildSection = (props) => {
|
|
|
8468
8539
|
return childItems.map((item, originalIndex) => ({ item, originalIndex })).filter((x) => !x.item.isDeleted) || [];
|
|
8469
8540
|
};
|
|
8470
8541
|
const childItemsToRender = getChildItemsForRendering();
|
|
8471
|
-
const handleChildInputChange = (0,
|
|
8542
|
+
const handleChildInputChange = (0, import_react64.useCallback)(
|
|
8472
8543
|
(updatedValues) => {
|
|
8473
8544
|
if (isOneToOne) {
|
|
8474
8545
|
props.callback({
|
|
@@ -8495,7 +8566,7 @@ var DataFormChildSection = (props) => {
|
|
|
8495
8566
|
},
|
|
8496
8567
|
[props, isOneToOne, childItemsToRender]
|
|
8497
8568
|
);
|
|
8498
|
-
const onAddRow = (0,
|
|
8569
|
+
const onAddRow = (0, import_react64.useCallback)(() => {
|
|
8499
8570
|
props.callback({
|
|
8500
8571
|
sectionName: props.section.name,
|
|
8501
8572
|
actionType: FORM_CHILD_ROW_ADD,
|
|
@@ -8504,7 +8575,7 @@ var DataFormChildSection = (props) => {
|
|
|
8504
8575
|
rowIndex: -1
|
|
8505
8576
|
});
|
|
8506
8577
|
}, [props]);
|
|
8507
|
-
const onDeleteRow = (0,
|
|
8578
|
+
const onDeleteRow = (0, import_react64.useCallback)(
|
|
8508
8579
|
(filteredIndex) => {
|
|
8509
8580
|
const visibleItem = childItemsToRender[filteredIndex];
|
|
8510
8581
|
if (visibleItem) {
|
|
@@ -8524,14 +8595,14 @@ var DataFormChildSection = (props) => {
|
|
|
8524
8595
|
childItemsToRender,
|
|
8525
8596
|
allChildItems: childItems
|
|
8526
8597
|
});
|
|
8527
|
-
return /* @__PURE__ */ (0,
|
|
8528
|
-
section.sectionTitle && /* @__PURE__ */ (0,
|
|
8529
|
-
/* @__PURE__ */ (0,
|
|
8530
|
-
/* @__PURE__ */ (0,
|
|
8531
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0,
|
|
8532
|
-
return /* @__PURE__ */ (0,
|
|
8598
|
+
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: [
|
|
8599
|
+
section.sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
8600
|
+
/* @__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: [
|
|
8601
|
+
/* @__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: [
|
|
8602
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
8603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("tr", { className: "", children: [
|
|
8533
8604
|
sectionRow.elements.map((field, index) => {
|
|
8534
|
-
return /* @__PURE__ */ (0,
|
|
8605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
8535
8606
|
"th",
|
|
8536
8607
|
{
|
|
8537
8608
|
className: "py-3 font-normal text-left",
|
|
@@ -8540,21 +8611,21 @@ var DataFormChildSection = (props) => {
|
|
|
8540
8611
|
field.name
|
|
8541
8612
|
);
|
|
8542
8613
|
}),
|
|
8543
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
8614
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
8544
8615
|
] }, sectionRowIndex);
|
|
8545
8616
|
}) }),
|
|
8546
|
-
/* @__PURE__ */ (0,
|
|
8617
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
8547
8618
|
const { item, originalIndex } = visibleItem;
|
|
8548
8619
|
const rowKey = originalIndex;
|
|
8549
|
-
return /* @__PURE__ */ (0,
|
|
8620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_react64.default.Fragment, { children: section.sectionRows.map(
|
|
8550
8621
|
(sectionRow, sectionRowIndex) => {
|
|
8551
|
-
return /* @__PURE__ */ (0,
|
|
8622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
8552
8623
|
"tr",
|
|
8553
8624
|
{
|
|
8554
8625
|
className: "",
|
|
8555
8626
|
children: [
|
|
8556
8627
|
sectionRow.elements.map((field, index) => {
|
|
8557
|
-
return /* @__PURE__ */ (0,
|
|
8628
|
+
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)(
|
|
8558
8629
|
InputControl_default,
|
|
8559
8630
|
{
|
|
8560
8631
|
index: filteredIndex,
|
|
@@ -8574,7 +8645,7 @@ var DataFormChildSection = (props) => {
|
|
|
8574
8645
|
}
|
|
8575
8646
|
) }) }) }, field.name);
|
|
8576
8647
|
}),
|
|
8577
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
8648
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
8578
8649
|
ClientButton_default,
|
|
8579
8650
|
{
|
|
8580
8651
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -8583,7 +8654,7 @@ var DataFormChildSection = (props) => {
|
|
|
8583
8654
|
},
|
|
8584
8655
|
dataRole: "delete",
|
|
8585
8656
|
tabIndex: -1,
|
|
8586
|
-
children: /* @__PURE__ */ (0,
|
|
8657
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
8587
8658
|
Icon_default,
|
|
8588
8659
|
{
|
|
8589
8660
|
className: "w-4 h-4",
|
|
@@ -8600,7 +8671,7 @@ var DataFormChildSection = (props) => {
|
|
|
8600
8671
|
) }, rowKey);
|
|
8601
8672
|
}) })
|
|
8602
8673
|
] }) }),
|
|
8603
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
8674
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
8604
8675
|
ClientButton_default,
|
|
8605
8676
|
{
|
|
8606
8677
|
ButtonType: "Link" /* Link */,
|
|
@@ -8615,9 +8686,9 @@ var DataFormChildSection = (props) => {
|
|
|
8615
8686
|
var DataFormChildSection_default = DataFormChildSection;
|
|
8616
8687
|
|
|
8617
8688
|
// src/components/dataForm/DataForm.tsx
|
|
8618
|
-
var
|
|
8689
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
8619
8690
|
var DataForm = (props) => {
|
|
8620
|
-
const formRef = (0,
|
|
8691
|
+
const formRef = (0, import_react65.useRef)(null);
|
|
8621
8692
|
console.log(props.dataItem, "dssads");
|
|
8622
8693
|
const initialState = {
|
|
8623
8694
|
inputValues: {},
|
|
@@ -8626,9 +8697,9 @@ var DataForm = (props) => {
|
|
|
8626
8697
|
const childInitialState = {
|
|
8627
8698
|
inputValues: []
|
|
8628
8699
|
};
|
|
8629
|
-
const [formState, dispatch] = (0,
|
|
8700
|
+
const [formState, dispatch] = (0, import_react65.useReducer)(FormReducer_default, initialState);
|
|
8630
8701
|
console.log(props.sections, "sections");
|
|
8631
|
-
const clearHiddenChildSections = (0,
|
|
8702
|
+
const clearHiddenChildSections = (0, import_react65.useCallback)(
|
|
8632
8703
|
(changedProperty, newValues) => {
|
|
8633
8704
|
if (!props.sections) return;
|
|
8634
8705
|
const allChildSections = [];
|
|
@@ -8666,7 +8737,7 @@ var DataForm = (props) => {
|
|
|
8666
8737
|
},
|
|
8667
8738
|
[props.sections, formState.inputValues]
|
|
8668
8739
|
);
|
|
8669
|
-
const handleInputChange = (0,
|
|
8740
|
+
const handleInputChange = (0, import_react65.useCallback)(
|
|
8670
8741
|
async (updatedValues) => {
|
|
8671
8742
|
dispatch({
|
|
8672
8743
|
type: FORM_INPUT_UPDATE,
|
|
@@ -8681,7 +8752,7 @@ var DataForm = (props) => {
|
|
|
8681
8752
|
},
|
|
8682
8753
|
[dispatch, formState.inputValues, clearHiddenChildSections]
|
|
8683
8754
|
);
|
|
8684
|
-
const fetchData = (0,
|
|
8755
|
+
const fetchData = (0, import_react65.useCallback)(async () => {
|
|
8685
8756
|
if (!props.rules) return;
|
|
8686
8757
|
if (Object.keys(formState.inputValues).length === 0) {
|
|
8687
8758
|
return;
|
|
@@ -8712,7 +8783,7 @@ var DataForm = (props) => {
|
|
|
8712
8783
|
console.error("Error fetching data:", error);
|
|
8713
8784
|
}
|
|
8714
8785
|
}, [formState.lastPropertyChanged, formState.inputValues]);
|
|
8715
|
-
(0,
|
|
8786
|
+
(0, import_react65.useEffect)(() => {
|
|
8716
8787
|
fetchData();
|
|
8717
8788
|
}, [formState.inputValues, formState.lastPropertyChanged]);
|
|
8718
8789
|
function replacePlaceholders(template, context, params) {
|
|
@@ -8732,7 +8803,7 @@ var DataForm = (props) => {
|
|
|
8732
8803
|
}
|
|
8733
8804
|
);
|
|
8734
8805
|
}
|
|
8735
|
-
const handleChildSectionChangeCallback = (0,
|
|
8806
|
+
const handleChildSectionChangeCallback = (0, import_react65.useCallback)(
|
|
8736
8807
|
(params) => {
|
|
8737
8808
|
dispatch({
|
|
8738
8809
|
type: params.actionType,
|
|
@@ -8777,7 +8848,7 @@ var DataForm = (props) => {
|
|
|
8777
8848
|
});
|
|
8778
8849
|
return cloned;
|
|
8779
8850
|
}
|
|
8780
|
-
const onClick = (0,
|
|
8851
|
+
const onClick = (0, import_react65.useCallback)(async () => {
|
|
8781
8852
|
if (props.onClick) {
|
|
8782
8853
|
const isEdit = props.dataItem && Object.keys(props.dataItem).length > 0;
|
|
8783
8854
|
const normalizedValues = normalizeChildSections(
|
|
@@ -8793,21 +8864,21 @@ var DataForm = (props) => {
|
|
|
8793
8864
|
return { isSuccessful: true };
|
|
8794
8865
|
}
|
|
8795
8866
|
}, [formState, props]);
|
|
8796
|
-
const handleAdditionalOnClick = (0,
|
|
8867
|
+
const handleAdditionalOnClick = (0, import_react65.useCallback)(async () => {
|
|
8797
8868
|
if (props.additionalActions?.onClick) {
|
|
8798
8869
|
return await props.additionalActions.onClick(formState);
|
|
8799
8870
|
} else {
|
|
8800
8871
|
return { isSuccessful: true, message: "Action completed successfully" };
|
|
8801
8872
|
}
|
|
8802
8873
|
}, [formState, props]);
|
|
8803
|
-
const onDelete = (0,
|
|
8874
|
+
const onDelete = (0, import_react65.useCallback)(async () => {
|
|
8804
8875
|
if (props.onDelete) {
|
|
8805
8876
|
return await props.onDelete(formState);
|
|
8806
8877
|
} else {
|
|
8807
8878
|
return { isSuccessful: true };
|
|
8808
8879
|
}
|
|
8809
8880
|
}, [formState, props]);
|
|
8810
|
-
(0,
|
|
8881
|
+
(0, import_react65.useEffect)(() => {
|
|
8811
8882
|
if (props.dataItem) {
|
|
8812
8883
|
dispatch({
|
|
8813
8884
|
type: FORM_INITIAL_UPDATE,
|
|
@@ -8835,19 +8906,19 @@ var DataForm = (props) => {
|
|
|
8835
8906
|
return false;
|
|
8836
8907
|
}
|
|
8837
8908
|
}
|
|
8838
|
-
return /* @__PURE__ */ (0,
|
|
8839
|
-
props.title && /* @__PURE__ */ (0,
|
|
8909
|
+
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: [
|
|
8910
|
+
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)(
|
|
8840
8911
|
"div",
|
|
8841
8912
|
{
|
|
8842
8913
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
8843
8914
|
onClick: () => window.history.back(),
|
|
8844
8915
|
children: [
|
|
8845
|
-
/* @__PURE__ */ (0,
|
|
8846
|
-
/* @__PURE__ */ (0,
|
|
8916
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
8917
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
8847
8918
|
]
|
|
8848
8919
|
}
|
|
8849
8920
|
) }),
|
|
8850
|
-
/* @__PURE__ */ (0,
|
|
8921
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8851
8922
|
"form",
|
|
8852
8923
|
{
|
|
8853
8924
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -8868,8 +8939,8 @@ var DataForm = (props) => {
|
|
|
8868
8939
|
}
|
|
8869
8940
|
}
|
|
8870
8941
|
},
|
|
8871
|
-
children: /* @__PURE__ */ (0,
|
|
8872
|
-
return /* @__PURE__ */ (0,
|
|
8942
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
8943
|
+
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: [
|
|
8873
8944
|
section.sectionRows?.map(
|
|
8874
8945
|
(sectionRow, sectionRowIndex) => {
|
|
8875
8946
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -8880,14 +8951,14 @@ var DataForm = (props) => {
|
|
|
8880
8951
|
sectionRow.visible
|
|
8881
8952
|
);
|
|
8882
8953
|
}
|
|
8883
|
-
return /* @__PURE__ */ (0,
|
|
8884
|
-
return /* @__PURE__ */ (0,
|
|
8954
|
+
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) => {
|
|
8955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
8885
8956
|
"div",
|
|
8886
8957
|
{
|
|
8887
8958
|
className: sectionRow.grow ? "grow" : "",
|
|
8888
8959
|
children: [
|
|
8889
|
-
/* @__PURE__ */ (0,
|
|
8890
|
-
/* @__PURE__ */ (0,
|
|
8960
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { children: field.controlType }),
|
|
8961
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8891
8962
|
InputControl_default,
|
|
8892
8963
|
{
|
|
8893
8964
|
name: field.name,
|
|
@@ -8917,12 +8988,12 @@ var DataForm = (props) => {
|
|
|
8917
8988
|
}) }) }, sectionRowIndex);
|
|
8918
8989
|
}
|
|
8919
8990
|
),
|
|
8920
|
-
/* @__PURE__ */ (0,
|
|
8991
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { children: section.childSections?.map(
|
|
8921
8992
|
(childSection, childSectionIndex) => {
|
|
8922
|
-
return /* @__PURE__ */ (0,
|
|
8993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { children: childSection.name && evalutateCondition(
|
|
8923
8994
|
formState.inputValues,
|
|
8924
8995
|
childSection.visible
|
|
8925
|
-
) && /* @__PURE__ */ (0,
|
|
8996
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8926
8997
|
DataFormChildSection_default,
|
|
8927
8998
|
{
|
|
8928
8999
|
section: childSection,
|
|
@@ -8937,8 +9008,8 @@ var DataForm = (props) => {
|
|
|
8937
9008
|
}) })
|
|
8938
9009
|
}
|
|
8939
9010
|
),
|
|
8940
|
-
/* @__PURE__ */ (0,
|
|
8941
|
-
/* @__PURE__ */ (0,
|
|
9011
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
9012
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { children: props.additionalActions && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8942
9013
|
Button_default,
|
|
8943
9014
|
{
|
|
8944
9015
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -8946,7 +9017,7 @@ var DataForm = (props) => {
|
|
|
8946
9017
|
children: props.additionalActions.title
|
|
8947
9018
|
}
|
|
8948
9019
|
) }),
|
|
8949
|
-
/* @__PURE__ */ (0,
|
|
9020
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { children: props.onDelete && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8950
9021
|
Button_default,
|
|
8951
9022
|
{
|
|
8952
9023
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -8957,7 +9028,7 @@ var DataForm = (props) => {
|
|
|
8957
9028
|
children: "Delete"
|
|
8958
9029
|
}
|
|
8959
9030
|
) }),
|
|
8960
|
-
/* @__PURE__ */ (0,
|
|
9031
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { children: props.onClick && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
8961
9032
|
Button_default,
|
|
8962
9033
|
{
|
|
8963
9034
|
onValidate,
|
|
@@ -8975,7 +9046,7 @@ var DataForm_default = DataForm;
|
|
|
8975
9046
|
|
|
8976
9047
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
8977
9048
|
init_ServiceClient();
|
|
8978
|
-
var
|
|
9049
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
8979
9050
|
function getAction(actions, code) {
|
|
8980
9051
|
return actions?.find((a) => a.actionCode === code);
|
|
8981
9052
|
}
|
|
@@ -9001,9 +9072,9 @@ var DataFormRenderer = ({
|
|
|
9001
9072
|
"Delete"
|
|
9002
9073
|
);
|
|
9003
9074
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
9004
|
-
return /* @__PURE__ */ (0,
|
|
9005
|
-
widgetProps && /* @__PURE__ */ (0,
|
|
9006
|
-
/* @__PURE__ */ (0,
|
|
9075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
9076
|
+
widgetProps && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
9077
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
9007
9078
|
DataForm_default,
|
|
9008
9079
|
{
|
|
9009
9080
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|