@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260707132556 → 0.8.1-dev.20260707162731
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +820 -786
- package/dist/index.mjs +352 -314
- package/dist/server.d.mts +6 -0
- package/dist/server.d.ts +6 -0
- package/dist/server.js +331 -295
- package/dist/server.mjs +188 -152
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
1
|
"use strict";
|
|
4
2
|
var __create = Object.create;
|
|
5
3
|
var __defProp = Object.defineProperty;
|
|
@@ -793,27 +791,27 @@ var DateTimeViewClient_exports = {};
|
|
|
793
791
|
__export(DateTimeViewClient_exports, {
|
|
794
792
|
default: () => DateTimeViewClient_default
|
|
795
793
|
});
|
|
796
|
-
var
|
|
794
|
+
var import_jsx_runtime17, DateTimeViewClient, DateTimeViewClient_default;
|
|
797
795
|
var init_DateTimeViewClient = __esm({
|
|
798
796
|
"src/components/controls/view/DateTimeViewClient.tsx"() {
|
|
799
797
|
"use strict";
|
|
800
798
|
"use client";
|
|
801
799
|
init_DateViewClient();
|
|
802
|
-
|
|
800
|
+
import_jsx_runtime17 = require("react/jsx-runtime");
|
|
803
801
|
DateTimeViewClient = (props) => {
|
|
804
|
-
return /* @__PURE__ */ (0,
|
|
802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DateViewClient_default, { ...props, controlType: "datetime" });
|
|
805
803
|
};
|
|
806
804
|
DateTimeViewClient_default = DateTimeViewClient;
|
|
807
805
|
}
|
|
808
806
|
});
|
|
809
807
|
|
|
810
808
|
// src/components/controls/edit/MultilineTextInput.tsx
|
|
811
|
-
var
|
|
809
|
+
var import_react16, import_jsx_runtime19, MultilineTextInput, MultilineTextInput_default;
|
|
812
810
|
var init_MultilineTextInput = __esm({
|
|
813
811
|
"src/components/controls/edit/MultilineTextInput.tsx"() {
|
|
814
812
|
"use strict";
|
|
815
|
-
|
|
816
|
-
|
|
813
|
+
import_react16 = __toESM(require("react"));
|
|
814
|
+
import_jsx_runtime19 = require("react/jsx-runtime");
|
|
817
815
|
MultilineTextInput = (props) => {
|
|
818
816
|
const textChangeHandler = (event) => {
|
|
819
817
|
const text = event.target.value;
|
|
@@ -832,11 +830,11 @@ var init_MultilineTextInput = __esm({
|
|
|
832
830
|
if (props.value !== void 0 && props.value !== null) {
|
|
833
831
|
value = props.value;
|
|
834
832
|
}
|
|
835
|
-
return /* @__PURE__ */ (0,
|
|
836
|
-
/* @__PURE__ */ (0,
|
|
833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react16.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { className: "block mb-1", children: [
|
|
834
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
837
835
|
" ",
|
|
838
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
839
|
-
/* @__PURE__ */ (0,
|
|
836
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
837
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
840
838
|
"textarea",
|
|
841
839
|
{
|
|
842
840
|
name: props.name,
|
|
@@ -853,7 +851,7 @@ var init_MultilineTextInput = __esm({
|
|
|
853
851
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm input"
|
|
854
852
|
}
|
|
855
853
|
),
|
|
856
|
-
/* @__PURE__ */ (0,
|
|
854
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
857
855
|
] }) });
|
|
858
856
|
};
|
|
859
857
|
MultilineTextInput_default = MultilineTextInput;
|
|
@@ -861,12 +859,12 @@ var init_MultilineTextInput = __esm({
|
|
|
861
859
|
});
|
|
862
860
|
|
|
863
861
|
// src/components/controls/edit/LineTextInput.tsx
|
|
864
|
-
var
|
|
862
|
+
var import_react17, import_jsx_runtime20, LineTextInput, LineTextInput_default;
|
|
865
863
|
var init_LineTextInput = __esm({
|
|
866
864
|
"src/components/controls/edit/LineTextInput.tsx"() {
|
|
867
865
|
"use strict";
|
|
868
|
-
|
|
869
|
-
|
|
866
|
+
import_react17 = __toESM(require("react"));
|
|
867
|
+
import_jsx_runtime20 = require("react/jsx-runtime");
|
|
870
868
|
LineTextInput = (props) => {
|
|
871
869
|
const textChangeHandler = (event) => {
|
|
872
870
|
const text = event.target.value;
|
|
@@ -885,11 +883,11 @@ var init_LineTextInput = __esm({
|
|
|
885
883
|
if (props.value !== void 0 && props.value !== null) {
|
|
886
884
|
value = props.value;
|
|
887
885
|
}
|
|
888
|
-
return /* @__PURE__ */ (0,
|
|
889
|
-
props?.attributes?.label && /* @__PURE__ */ (0,
|
|
886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react17.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("label", { className: "block", children: [
|
|
887
|
+
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
890
888
|
" ",
|
|
891
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
892
|
-
/* @__PURE__ */ (0,
|
|
889
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "bg-error-weak !bg-transparent", children: "*" }),
|
|
890
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
893
891
|
"input",
|
|
894
892
|
{
|
|
895
893
|
type: "text",
|
|
@@ -909,7 +907,7 @@ var init_LineTextInput = __esm({
|
|
|
909
907
|
`
|
|
910
908
|
}
|
|
911
909
|
),
|
|
912
|
-
/* @__PURE__ */ (0,
|
|
910
|
+
/* @__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 : "" })
|
|
913
911
|
] }) });
|
|
914
912
|
};
|
|
915
913
|
LineTextInput_default = LineTextInput;
|
|
@@ -917,12 +915,12 @@ var init_LineTextInput = __esm({
|
|
|
917
915
|
});
|
|
918
916
|
|
|
919
917
|
// src/components/controls/edit/MoneyInput.tsx
|
|
920
|
-
var
|
|
918
|
+
var import_react18, import_jsx_runtime21, MoneyInput, MoneyInput_default;
|
|
921
919
|
var init_MoneyInput = __esm({
|
|
922
920
|
"src/components/controls/edit/MoneyInput.tsx"() {
|
|
923
921
|
"use strict";
|
|
924
|
-
|
|
925
|
-
|
|
922
|
+
import_react18 = __toESM(require("react"));
|
|
923
|
+
import_jsx_runtime21 = require("react/jsx-runtime");
|
|
926
924
|
MoneyInput = (props) => {
|
|
927
925
|
const textChangeHandler = (event) => {
|
|
928
926
|
const rawValue = event.target.value;
|
|
@@ -951,11 +949,11 @@ var init_MoneyInput = __esm({
|
|
|
951
949
|
e.preventDefault();
|
|
952
950
|
}
|
|
953
951
|
};
|
|
954
|
-
return /* @__PURE__ */ (0,
|
|
955
|
-
/* @__PURE__ */ (0,
|
|
952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react18.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("label", { className: "block mb-1", children: [
|
|
953
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
956
954
|
" ",
|
|
957
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
958
|
-
/* @__PURE__ */ (0,
|
|
955
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
956
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
959
957
|
"input",
|
|
960
958
|
{
|
|
961
959
|
type: "number",
|
|
@@ -975,7 +973,7 @@ var init_MoneyInput = __esm({
|
|
|
975
973
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm number-input"
|
|
976
974
|
}
|
|
977
975
|
),
|
|
978
|
-
/* @__PURE__ */ (0,
|
|
976
|
+
/* @__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 : "" })
|
|
979
977
|
] }) });
|
|
980
978
|
};
|
|
981
979
|
MoneyInput_default = MoneyInput;
|
|
@@ -1014,14 +1012,14 @@ var init_InputControlType = __esm({
|
|
|
1014
1012
|
});
|
|
1015
1013
|
|
|
1016
1014
|
// src/components/controls/edit/Select.tsx
|
|
1017
|
-
var
|
|
1015
|
+
var import_react19, import_jsx_runtime22, Select, Select_default;
|
|
1018
1016
|
var init_Select = __esm({
|
|
1019
1017
|
"src/components/controls/edit/Select.tsx"() {
|
|
1020
1018
|
"use strict";
|
|
1021
|
-
|
|
1022
|
-
|
|
1019
|
+
import_react19 = require("react");
|
|
1020
|
+
import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1023
1021
|
Select = (props) => {
|
|
1024
|
-
const [list, setList] = (0,
|
|
1022
|
+
const [list, setList] = (0, import_react19.useState)([]);
|
|
1025
1023
|
const getSafeValue = (val) => {
|
|
1026
1024
|
if (val === null || val === void 0) return "";
|
|
1027
1025
|
if (typeof val === "boolean") return val ? "1" : "0";
|
|
@@ -1050,7 +1048,7 @@ var init_Select = __esm({
|
|
|
1050
1048
|
groupKey: props.groupKey
|
|
1051
1049
|
});
|
|
1052
1050
|
};
|
|
1053
|
-
(0,
|
|
1051
|
+
(0, import_react19.useEffect)(() => {
|
|
1054
1052
|
async function fetchData() {
|
|
1055
1053
|
if (props.dataset) {
|
|
1056
1054
|
setList(props.dataset);
|
|
@@ -1077,11 +1075,11 @@ var init_Select = __esm({
|
|
|
1077
1075
|
props.dataSourceDependsOn
|
|
1078
1076
|
]);
|
|
1079
1077
|
const value = getSafeValue(props.value);
|
|
1080
|
-
return /* @__PURE__ */ (0,
|
|
1081
|
-
props.attributes?.label && /* @__PURE__ */ (0,
|
|
1078
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { className: "block", children: [
|
|
1079
|
+
props.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-sm font-medium inline-block pb-1", children: props.attributes?.label }),
|
|
1082
1080
|
" ",
|
|
1083
|
-
props.attributes?.label && props.attributes?.required && /* @__PURE__ */ (0,
|
|
1084
|
-
/* @__PURE__ */ (0,
|
|
1081
|
+
props.attributes?.label && props.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1082
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1085
1083
|
"select",
|
|
1086
1084
|
{
|
|
1087
1085
|
name: props.name,
|
|
@@ -1092,16 +1090,16 @@ var init_Select = __esm({
|
|
|
1092
1090
|
disabled: props.attributes?.readOnly,
|
|
1093
1091
|
className: "peer select py-1.5 block w-full text-black rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none",
|
|
1094
1092
|
children: [
|
|
1095
|
-
/* @__PURE__ */ (0,
|
|
1093
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: "", children: props.attributes?.placeholder || "Select" }),
|
|
1096
1094
|
list.map((item, index) => {
|
|
1097
1095
|
const keyField = props.dataKeyFieldName;
|
|
1098
1096
|
const textField = props.dataTextFieldName;
|
|
1099
|
-
return /* @__PURE__ */ (0,
|
|
1097
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: item[keyField], children: item[textField] }, index);
|
|
1100
1098
|
})
|
|
1101
1099
|
]
|
|
1102
1100
|
}
|
|
1103
1101
|
),
|
|
1104
|
-
/* @__PURE__ */ (0,
|
|
1102
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props.attributes?.errorMessage || "" })
|
|
1105
1103
|
] });
|
|
1106
1104
|
};
|
|
1107
1105
|
Select_default = Select;
|
|
@@ -1109,12 +1107,12 @@ var init_Select = __esm({
|
|
|
1109
1107
|
});
|
|
1110
1108
|
|
|
1111
1109
|
// src/components/controls/edit/PercentageInput.tsx
|
|
1112
|
-
var
|
|
1110
|
+
var import_react20, import_jsx_runtime23, PercentageInput, PercentageInput_default;
|
|
1113
1111
|
var init_PercentageInput = __esm({
|
|
1114
1112
|
"src/components/controls/edit/PercentageInput.tsx"() {
|
|
1115
1113
|
"use strict";
|
|
1116
|
-
|
|
1117
|
-
|
|
1114
|
+
import_react20 = __toESM(require("react"));
|
|
1115
|
+
import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1118
1116
|
PercentageInput = (props) => {
|
|
1119
1117
|
const textChangeHandler = (event) => {
|
|
1120
1118
|
const rawValue = event.target.value;
|
|
@@ -1143,11 +1141,11 @@ var init_PercentageInput = __esm({
|
|
|
1143
1141
|
e.preventDefault();
|
|
1144
1142
|
}
|
|
1145
1143
|
};
|
|
1146
|
-
return /* @__PURE__ */ (0,
|
|
1147
|
-
/* @__PURE__ */ (0,
|
|
1144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react20.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { className: "block mb-1", children: [
|
|
1145
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label ? props?.attributes?.label + " %" : "" }),
|
|
1148
1146
|
" ",
|
|
1149
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1150
|
-
/* @__PURE__ */ (0,
|
|
1147
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1148
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1151
1149
|
"input",
|
|
1152
1150
|
{
|
|
1153
1151
|
type: "number",
|
|
@@ -1166,7 +1164,7 @@ var init_PercentageInput = __esm({
|
|
|
1166
1164
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm number-input"
|
|
1167
1165
|
}
|
|
1168
1166
|
),
|
|
1169
|
-
/* @__PURE__ */ (0,
|
|
1167
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
1170
1168
|
] }) });
|
|
1171
1169
|
};
|
|
1172
1170
|
PercentageInput_default = PercentageInput;
|
|
@@ -1174,12 +1172,12 @@ var init_PercentageInput = __esm({
|
|
|
1174
1172
|
});
|
|
1175
1173
|
|
|
1176
1174
|
// src/components/controls/edit/PhoneInput.tsx
|
|
1177
|
-
var
|
|
1175
|
+
var import_react21, import_jsx_runtime24, PhoneInput, PhoneInput_default;
|
|
1178
1176
|
var init_PhoneInput = __esm({
|
|
1179
1177
|
"src/components/controls/edit/PhoneInput.tsx"() {
|
|
1180
1178
|
"use strict";
|
|
1181
|
-
|
|
1182
|
-
|
|
1179
|
+
import_react21 = __toESM(require("react"));
|
|
1180
|
+
import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1183
1181
|
PhoneInput = (props) => {
|
|
1184
1182
|
const textChangeHandler = (event) => {
|
|
1185
1183
|
const text = event.target.value;
|
|
@@ -1198,13 +1196,13 @@ var init_PhoneInput = __esm({
|
|
|
1198
1196
|
if (props.value !== void 0 && props.value !== null) {
|
|
1199
1197
|
value = props.value;
|
|
1200
1198
|
}
|
|
1201
|
-
return /* @__PURE__ */ (0,
|
|
1202
|
-
/* @__PURE__ */ (0,
|
|
1199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react21.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { className: "block mb-1", children: [
|
|
1200
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1203
1201
|
" ",
|
|
1204
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1205
|
-
/* @__PURE__ */ (0,
|
|
1206
|
-
/* @__PURE__ */ (0,
|
|
1207
|
-
/* @__PURE__ */ (0,
|
|
1202
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1203
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center rounded border ", children: [
|
|
1204
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "px-3", children: props.prefix }),
|
|
1205
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1208
1206
|
"input",
|
|
1209
1207
|
{
|
|
1210
1208
|
type: "text",
|
|
@@ -1222,7 +1220,7 @@ var init_PhoneInput = __esm({
|
|
|
1222
1220
|
}
|
|
1223
1221
|
)
|
|
1224
1222
|
] }),
|
|
1225
|
-
/* @__PURE__ */ (0,
|
|
1223
|
+
/* @__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
1224
|
] }) });
|
|
1227
1225
|
};
|
|
1228
1226
|
PhoneInput_default = PhoneInput;
|
|
@@ -1230,12 +1228,12 @@ var init_PhoneInput = __esm({
|
|
|
1230
1228
|
});
|
|
1231
1229
|
|
|
1232
1230
|
// src/components/controls/edit/NumberInput.tsx
|
|
1233
|
-
var
|
|
1231
|
+
var import_react22, import_jsx_runtime25, NumberInput, NumberInput_default;
|
|
1234
1232
|
var init_NumberInput = __esm({
|
|
1235
1233
|
"src/components/controls/edit/NumberInput.tsx"() {
|
|
1236
1234
|
"use strict";
|
|
1237
|
-
|
|
1238
|
-
|
|
1235
|
+
import_react22 = __toESM(require("react"));
|
|
1236
|
+
import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1239
1237
|
NumberInput = (props) => {
|
|
1240
1238
|
const textChangeHandler = (event) => {
|
|
1241
1239
|
const text = event.target.value;
|
|
@@ -1258,11 +1256,11 @@ var init_NumberInput = __esm({
|
|
|
1258
1256
|
if (props.value !== void 0 && props.value !== null) {
|
|
1259
1257
|
value = props.value;
|
|
1260
1258
|
}
|
|
1261
|
-
return /* @__PURE__ */ (0,
|
|
1262
|
-
props?.attributes?.label && /* @__PURE__ */ (0,
|
|
1259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react22.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "block", children: [
|
|
1260
|
+
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
1263
1261
|
" ",
|
|
1264
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1265
|
-
/* @__PURE__ */ (0,
|
|
1262
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1263
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1266
1264
|
"input",
|
|
1267
1265
|
{
|
|
1268
1266
|
type: "number",
|
|
@@ -1281,7 +1279,7 @@ var init_NumberInput = __esm({
|
|
|
1281
1279
|
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 "
|
|
1282
1280
|
}
|
|
1283
1281
|
),
|
|
1284
|
-
/* @__PURE__ */ (0,
|
|
1282
|
+
/* @__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 : "" })
|
|
1285
1283
|
] }) });
|
|
1286
1284
|
};
|
|
1287
1285
|
NumberInput_default = NumberInput;
|
|
@@ -1289,12 +1287,12 @@ var init_NumberInput = __esm({
|
|
|
1289
1287
|
});
|
|
1290
1288
|
|
|
1291
1289
|
// src/components/controls/edit/CheckboxInput.tsx
|
|
1292
|
-
var
|
|
1290
|
+
var import_react23, import_jsx_runtime26, CheckboxInput, CheckboxInput_default;
|
|
1293
1291
|
var init_CheckboxInput = __esm({
|
|
1294
1292
|
"src/components/controls/edit/CheckboxInput.tsx"() {
|
|
1295
1293
|
"use strict";
|
|
1296
|
-
|
|
1297
|
-
|
|
1294
|
+
import_react23 = __toESM(require("react"));
|
|
1295
|
+
import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1298
1296
|
CheckboxInput = (props) => {
|
|
1299
1297
|
const textChangeHandler = (event) => {
|
|
1300
1298
|
let text = event.target.checked;
|
|
@@ -1311,9 +1309,9 @@ var init_CheckboxInput = __esm({
|
|
|
1311
1309
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
1312
1310
|
value = true;
|
|
1313
1311
|
}
|
|
1314
|
-
return /* @__PURE__ */ (0,
|
|
1315
|
-
props?.attributes?.label && /* @__PURE__ */ (0,
|
|
1316
|
-
/* @__PURE__ */ (0,
|
|
1312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react23.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "mb-1", children: [
|
|
1313
|
+
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
1314
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1317
1315
|
"label",
|
|
1318
1316
|
{
|
|
1319
1317
|
htmlFor: props.name,
|
|
@@ -1321,9 +1319,9 @@ var init_CheckboxInput = __esm({
|
|
|
1321
1319
|
children: props.attributes.label
|
|
1322
1320
|
}
|
|
1323
1321
|
),
|
|
1324
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1322
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "bg-error-weak", children: "*" })
|
|
1325
1323
|
] }),
|
|
1326
|
-
/* @__PURE__ */ (0,
|
|
1324
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1327
1325
|
"input",
|
|
1328
1326
|
{
|
|
1329
1327
|
type: "checkbox",
|
|
@@ -1340,7 +1338,7 @@ var init_CheckboxInput = __esm({
|
|
|
1340
1338
|
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 "
|
|
1341
1339
|
}
|
|
1342
1340
|
),
|
|
1343
|
-
/* @__PURE__ */ (0,
|
|
1341
|
+
/* @__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 || "" })
|
|
1344
1342
|
] }) });
|
|
1345
1343
|
};
|
|
1346
1344
|
CheckboxInput_default = CheckboxInput;
|
|
@@ -1348,12 +1346,12 @@ var init_CheckboxInput = __esm({
|
|
|
1348
1346
|
});
|
|
1349
1347
|
|
|
1350
1348
|
// src/components/controls/edit/OtpInput.tsx
|
|
1351
|
-
var
|
|
1349
|
+
var import_react24, import_jsx_runtime27, OtpInput, OtpInput_default;
|
|
1352
1350
|
var init_OtpInput = __esm({
|
|
1353
1351
|
"src/components/controls/edit/OtpInput.tsx"() {
|
|
1354
1352
|
"use strict";
|
|
1355
|
-
|
|
1356
|
-
|
|
1353
|
+
import_react24 = __toESM(require("react"));
|
|
1354
|
+
import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1357
1355
|
OtpInput = (props) => {
|
|
1358
1356
|
const textChangeHandler = (event) => {
|
|
1359
1357
|
const text = event.target.value;
|
|
@@ -1375,11 +1373,11 @@ var init_OtpInput = __esm({
|
|
|
1375
1373
|
if (props.value !== void 0 && props.value !== null) {
|
|
1376
1374
|
value = props.value;
|
|
1377
1375
|
}
|
|
1378
|
-
return /* @__PURE__ */ (0,
|
|
1379
|
-
/* @__PURE__ */ (0,
|
|
1376
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react24.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("label", { htmlFor: props.name, className: "block mb-1 w-full", children: [
|
|
1377
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1380
1378
|
" ",
|
|
1381
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1382
|
-
/* @__PURE__ */ (0,
|
|
1379
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1380
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1383
1381
|
"input",
|
|
1384
1382
|
{
|
|
1385
1383
|
type: "text",
|
|
@@ -1399,7 +1397,7 @@ var init_OtpInput = __esm({
|
|
|
1399
1397
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm tracking-[1.25em] text-center"
|
|
1400
1398
|
}
|
|
1401
1399
|
),
|
|
1402
|
-
/* @__PURE__ */ (0,
|
|
1400
|
+
/* @__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 ? props.attributes.errorMessage : "" })
|
|
1403
1401
|
] }) });
|
|
1404
1402
|
};
|
|
1405
1403
|
OtpInput_default = OtpInput;
|
|
@@ -1407,12 +1405,12 @@ var init_OtpInput = __esm({
|
|
|
1407
1405
|
});
|
|
1408
1406
|
|
|
1409
1407
|
// src/components/controls/edit/DateTimeInput.tsx
|
|
1410
|
-
var
|
|
1408
|
+
var import_react25, import_jsx_runtime28, DateTimeInput, DateTimeInput_default;
|
|
1411
1409
|
var init_DateTimeInput = __esm({
|
|
1412
1410
|
"src/components/controls/edit/DateTimeInput.tsx"() {
|
|
1413
1411
|
"use strict";
|
|
1414
|
-
|
|
1415
|
-
|
|
1412
|
+
import_react25 = __toESM(require("react"));
|
|
1413
|
+
import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1416
1414
|
DateTimeInput = (props) => {
|
|
1417
1415
|
const textChangeHandler = (event) => {
|
|
1418
1416
|
const localDate = new Date(event.target.value);
|
|
@@ -1444,12 +1442,12 @@ var init_DateTimeInput = __esm({
|
|
|
1444
1442
|
e.preventDefault();
|
|
1445
1443
|
}
|
|
1446
1444
|
};
|
|
1447
|
-
return /* @__PURE__ */ (0,
|
|
1448
|
-
/* @__PURE__ */ (0,
|
|
1445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react25.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("label", { className: "block mb-1", children: [
|
|
1446
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1449
1447
|
" ",
|
|
1450
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1451
|
-
/* @__PURE__ */ (0,
|
|
1452
|
-
/* @__PURE__ */ (0,
|
|
1448
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1449
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1450
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1453
1451
|
"input",
|
|
1454
1452
|
{
|
|
1455
1453
|
type: "datetime-local",
|
|
@@ -1467,9 +1465,9 @@ var init_DateTimeInput = __esm({
|
|
|
1467
1465
|
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 "
|
|
1468
1466
|
}
|
|
1469
1467
|
),
|
|
1470
|
-
/* @__PURE__ */ (0,
|
|
1468
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: timeZoneAbbr })
|
|
1471
1469
|
] }),
|
|
1472
|
-
/* @__PURE__ */ (0,
|
|
1470
|
+
/* @__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 : "" })
|
|
1473
1471
|
] }) });
|
|
1474
1472
|
};
|
|
1475
1473
|
DateTimeInput_default = DateTimeInput;
|
|
@@ -1477,15 +1475,15 @@ var init_DateTimeInput = __esm({
|
|
|
1477
1475
|
});
|
|
1478
1476
|
|
|
1479
1477
|
// src/components/controls/edit/ColorInput.tsx
|
|
1480
|
-
var
|
|
1478
|
+
var import_react26, import_jsx_runtime29, ColorInput, ColorInput_default;
|
|
1481
1479
|
var init_ColorInput = __esm({
|
|
1482
1480
|
"src/components/controls/edit/ColorInput.tsx"() {
|
|
1483
1481
|
"use strict";
|
|
1484
|
-
|
|
1485
|
-
|
|
1482
|
+
import_react26 = __toESM(require("react"));
|
|
1483
|
+
import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1486
1484
|
ColorInput = (props) => {
|
|
1487
|
-
const [color, setColor] =
|
|
1488
|
-
(0,
|
|
1485
|
+
const [color, setColor] = import_react26.default.useState("#3b82f6");
|
|
1486
|
+
(0, import_react26.useEffect)(() => {
|
|
1489
1487
|
if (props.value !== void 0 && props.value !== null) {
|
|
1490
1488
|
if (typeof props.value === "string") {
|
|
1491
1489
|
setColor(props.value);
|
|
@@ -1504,11 +1502,11 @@ var init_ColorInput = __esm({
|
|
|
1504
1502
|
});
|
|
1505
1503
|
}
|
|
1506
1504
|
};
|
|
1507
|
-
return /* @__PURE__ */ (0,
|
|
1508
|
-
/* @__PURE__ */ (0,
|
|
1505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("label", { className: "block mb-1", children: [
|
|
1506
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
1509
1507
|
" ",
|
|
1510
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1511
|
-
/* @__PURE__ */ (0,
|
|
1508
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1509
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1512
1510
|
"input",
|
|
1513
1511
|
{
|
|
1514
1512
|
type: "color",
|
|
@@ -1521,7 +1519,7 @@ var init_ColorInput = __esm({
|
|
|
1521
1519
|
className: `w-[78px] h-12 block cursor-pointer`
|
|
1522
1520
|
}
|
|
1523
1521
|
),
|
|
1524
|
-
props?.attributes?.errorMessage && /* @__PURE__ */ (0,
|
|
1522
|
+
props?.attributes?.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "mt-1 bg-error-weak text-sm", children: props.attributes.errorMessage })
|
|
1525
1523
|
] });
|
|
1526
1524
|
};
|
|
1527
1525
|
ColorInput_default = ColorInput;
|
|
@@ -1529,20 +1527,20 @@ var init_ColorInput = __esm({
|
|
|
1529
1527
|
});
|
|
1530
1528
|
|
|
1531
1529
|
// src/components/controls/edit/SelectWithSearchInput.tsx
|
|
1532
|
-
var
|
|
1530
|
+
var import_react27, import_jsx_runtime30, SelectWithSearchInput, SelectWithSearchInput_default;
|
|
1533
1531
|
var init_SelectWithSearchInput = __esm({
|
|
1534
1532
|
"src/components/controls/edit/SelectWithSearchInput.tsx"() {
|
|
1535
1533
|
"use strict";
|
|
1536
1534
|
"use client";
|
|
1537
|
-
|
|
1538
|
-
|
|
1535
|
+
import_react27 = require("react");
|
|
1536
|
+
import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1539
1537
|
SelectWithSearchInput = (props) => {
|
|
1540
|
-
const [isOpen, setIsOpen] = (0,
|
|
1541
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
1542
|
-
const [highlightedIndex, setHighlightedIndex] = (0,
|
|
1543
|
-
const [selectedItem, setSelectedItem] = (0,
|
|
1544
|
-
const [list, setList] = (0,
|
|
1545
|
-
(0,
|
|
1538
|
+
const [isOpen, setIsOpen] = (0, import_react27.useState)(false);
|
|
1539
|
+
const [searchTerm, setSearchTerm] = (0, import_react27.useState)("");
|
|
1540
|
+
const [highlightedIndex, setHighlightedIndex] = (0, import_react27.useState)(-1);
|
|
1541
|
+
const [selectedItem, setSelectedItem] = (0, import_react27.useState)(null);
|
|
1542
|
+
const [list, setList] = (0, import_react27.useState)([]);
|
|
1543
|
+
(0, import_react27.useEffect)(() => {
|
|
1546
1544
|
async function fetchData() {
|
|
1547
1545
|
if (props.dataset) {
|
|
1548
1546
|
setList(props.dataset);
|
|
@@ -1596,8 +1594,8 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1596
1594
|
handleSelect(e, filteredItems[highlightedIndex]);
|
|
1597
1595
|
}
|
|
1598
1596
|
};
|
|
1599
|
-
const dropdownRef = (0,
|
|
1600
|
-
(0,
|
|
1597
|
+
const dropdownRef = (0, import_react27.useRef)(null);
|
|
1598
|
+
(0, import_react27.useEffect)(() => {
|
|
1601
1599
|
if (highlightedIndex >= 0 && dropdownRef.current) {
|
|
1602
1600
|
const highlightedItem = dropdownRef.current.children[highlightedIndex];
|
|
1603
1601
|
highlightedItem?.scrollIntoView({
|
|
@@ -1606,15 +1604,15 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1606
1604
|
});
|
|
1607
1605
|
}
|
|
1608
1606
|
}, [highlightedIndex]);
|
|
1609
|
-
return /* @__PURE__ */ (0,
|
|
1610
|
-
/* @__PURE__ */ (0,
|
|
1607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "relative", children: [
|
|
1608
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("label", { children: [
|
|
1611
1609
|
props.attributes?.label,
|
|
1612
1610
|
" ",
|
|
1613
1611
|
" ",
|
|
1614
|
-
props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1612
|
+
props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "bg-error-weak", children: "*" })
|
|
1615
1613
|
] }),
|
|
1616
|
-
/* @__PURE__ */ (0,
|
|
1617
|
-
/* @__PURE__ */ (0,
|
|
1614
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "relative", children: [
|
|
1615
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1618
1616
|
"input",
|
|
1619
1617
|
{
|
|
1620
1618
|
type: "text",
|
|
@@ -1630,13 +1628,13 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1630
1628
|
className: "peer py-1.5 select block w-full text-black rounded border-gray-300 shadow-sm\n focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n "
|
|
1631
1629
|
}
|
|
1632
1630
|
),
|
|
1633
|
-
/* @__PURE__ */ (0,
|
|
1631
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1634
1632
|
"button",
|
|
1635
1633
|
{
|
|
1636
1634
|
type: "button",
|
|
1637
1635
|
onClick: () => setIsOpen(!isOpen),
|
|
1638
1636
|
className: "absolute right-2 top-3 h-5 w-5 text-gray-500 focus:outline-none",
|
|
1639
|
-
children: /* @__PURE__ */ (0,
|
|
1637
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1640
1638
|
"svg",
|
|
1641
1639
|
{
|
|
1642
1640
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1645,7 +1643,7 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1645
1643
|
strokeWidth: 1.5,
|
|
1646
1644
|
stroke: "currentColor",
|
|
1647
1645
|
className: "w-full h-full",
|
|
1648
|
-
children: /* @__PURE__ */ (0,
|
|
1646
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1649
1647
|
"path",
|
|
1650
1648
|
{
|
|
1651
1649
|
strokeLinecap: "round",
|
|
@@ -1658,12 +1656,12 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1658
1656
|
}
|
|
1659
1657
|
)
|
|
1660
1658
|
] }),
|
|
1661
|
-
isOpen && /* @__PURE__ */ (0,
|
|
1659
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1662
1660
|
"div",
|
|
1663
1661
|
{
|
|
1664
1662
|
ref: dropdownRef,
|
|
1665
1663
|
className: "absolute z-10 mt-2 w-full bg-white border border-gray-200 rounded-md shadow-lg max-h-48 overflow-y-auto",
|
|
1666
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ (0,
|
|
1664
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1667
1665
|
"button",
|
|
1668
1666
|
{
|
|
1669
1667
|
onClick: (e) => handleSelect(e, item),
|
|
@@ -1671,10 +1669,10 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1671
1669
|
role: "option",
|
|
1672
1670
|
tabIndex: -1,
|
|
1673
1671
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1674
|
-
children: /* @__PURE__ */ (0,
|
|
1672
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: item[props.dataTextFieldName] })
|
|
1675
1673
|
},
|
|
1676
1674
|
item[props.dataKeyFieldName]
|
|
1677
|
-
)) : /* @__PURE__ */ (0,
|
|
1675
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1678
1676
|
}
|
|
1679
1677
|
)
|
|
1680
1678
|
] });
|
|
@@ -1748,15 +1746,15 @@ var init_StyleTypes = __esm({
|
|
|
1748
1746
|
});
|
|
1749
1747
|
|
|
1750
1748
|
// src/components/ClientButton.tsx
|
|
1751
|
-
var
|
|
1749
|
+
var import_react28, import_jsx_runtime31, ClientButton, ClientButton_default;
|
|
1752
1750
|
var init_ClientButton = __esm({
|
|
1753
1751
|
"src/components/ClientButton.tsx"() {
|
|
1754
1752
|
"use strict";
|
|
1755
1753
|
"use client";
|
|
1756
|
-
|
|
1754
|
+
import_react28 = __toESM(require("react"));
|
|
1757
1755
|
init_ToastService();
|
|
1758
1756
|
init_StyleTypes();
|
|
1759
|
-
|
|
1757
|
+
import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1760
1758
|
ClientButton = (props) => {
|
|
1761
1759
|
const execute = async (event) => {
|
|
1762
1760
|
if (props.onClick !== void 0) {
|
|
@@ -1766,7 +1764,7 @@ var init_ClientButton = __esm({
|
|
|
1766
1764
|
}
|
|
1767
1765
|
};
|
|
1768
1766
|
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
1769
|
-
return /* @__PURE__ */ (0,
|
|
1767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react28.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1770
1768
|
"button",
|
|
1771
1769
|
{
|
|
1772
1770
|
type: "button",
|
|
@@ -1781,17 +1779,17 @@ var init_ClientButton = __esm({
|
|
|
1781
1779
|
});
|
|
1782
1780
|
|
|
1783
1781
|
// src/components/Confirm.tsx
|
|
1784
|
-
var
|
|
1782
|
+
var import_react29, import_jsx_runtime32, Confirm, Confirm_default;
|
|
1785
1783
|
var init_Confirm = __esm({
|
|
1786
1784
|
"src/components/Confirm.tsx"() {
|
|
1787
1785
|
"use strict";
|
|
1788
1786
|
"use client";
|
|
1789
|
-
|
|
1787
|
+
import_react29 = require("react");
|
|
1790
1788
|
init_ClientButton();
|
|
1791
1789
|
init_StyleTypes();
|
|
1792
|
-
|
|
1790
|
+
import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1793
1791
|
Confirm = ({ message, onConfirm, onCancel }) => {
|
|
1794
|
-
const [showModal, setShowModal] = (0,
|
|
1792
|
+
const [showModal, setShowModal] = (0, import_react29.useState)(true);
|
|
1795
1793
|
const handleConfirmAction = () => {
|
|
1796
1794
|
setShowModal(false);
|
|
1797
1795
|
if (onConfirm) {
|
|
@@ -1804,13 +1802,13 @@ var init_Confirm = __esm({
|
|
|
1804
1802
|
onCancel();
|
|
1805
1803
|
}
|
|
1806
1804
|
};
|
|
1807
|
-
return /* @__PURE__ */ (0,
|
|
1808
|
-
/* @__PURE__ */ (0,
|
|
1809
|
-
/* @__PURE__ */ (0,
|
|
1810
|
-
/* @__PURE__ */ (0,
|
|
1811
|
-
/* @__PURE__ */ (0,
|
|
1812
|
-
/* @__PURE__ */ (0,
|
|
1813
|
-
/* @__PURE__ */ (0,
|
|
1805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_jsx_runtime32.Fragment, { children: showModal && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "fixed inset-0 flex items-center justify-center z-50", children: [
|
|
1806
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "absolute inset-0 bg-black opacity-70" }),
|
|
1807
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "bg-white rounded-md p-6 w-2/6 shadow border z-50", children: [
|
|
1808
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-xl font-medium mb-4", children: "Confirmation" }),
|
|
1809
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "mb-4", children: message }),
|
|
1810
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex justify-end gap-8", children: [
|
|
1811
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1814
1812
|
ClientButton_default,
|
|
1815
1813
|
{
|
|
1816
1814
|
onClick: handleCancelAction,
|
|
@@ -1818,7 +1816,7 @@ var init_Confirm = __esm({
|
|
|
1818
1816
|
children: "Cancel"
|
|
1819
1817
|
}
|
|
1820
1818
|
),
|
|
1821
|
-
/* @__PURE__ */ (0,
|
|
1819
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1822
1820
|
ClientButton_default,
|
|
1823
1821
|
{
|
|
1824
1822
|
onClick: handleConfirmAction,
|
|
@@ -1836,21 +1834,21 @@ var init_Confirm = __esm({
|
|
|
1836
1834
|
});
|
|
1837
1835
|
|
|
1838
1836
|
// src/components/Button.tsx
|
|
1839
|
-
var
|
|
1837
|
+
var import_react30, import_jsx_runtime33, Button, Button_default;
|
|
1840
1838
|
var init_Button = __esm({
|
|
1841
1839
|
"src/components/Button.tsx"() {
|
|
1842
1840
|
"use strict";
|
|
1843
1841
|
"use client";
|
|
1844
|
-
|
|
1842
|
+
import_react30 = __toESM(require("react"));
|
|
1845
1843
|
init_ToastService();
|
|
1846
1844
|
init_StyleTypes();
|
|
1847
1845
|
init_Confirm();
|
|
1848
|
-
|
|
1846
|
+
import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1849
1847
|
Button = (props) => {
|
|
1850
|
-
const [inProgress, setInProgress] = (0,
|
|
1851
|
-
const [isActionPerformed, setIsActionPerformed] = (0,
|
|
1852
|
-
const [responseMessage, setResponseMessage] = (0,
|
|
1853
|
-
const [showModal, setShowModal] = (0,
|
|
1848
|
+
const [inProgress, setInProgress] = (0, import_react30.useState)(false);
|
|
1849
|
+
const [isActionPerformed, setIsActionPerformed] = (0, import_react30.useState)(false);
|
|
1850
|
+
const [responseMessage, setResponseMessage] = (0, import_react30.useState)(null);
|
|
1851
|
+
const [showModal, setShowModal] = (0, import_react30.useState)(null);
|
|
1854
1852
|
const execute = async (event) => {
|
|
1855
1853
|
event.preventDefault();
|
|
1856
1854
|
event.stopPropagation();
|
|
@@ -1894,14 +1892,14 @@ var init_Button = __esm({
|
|
|
1894
1892
|
return new Promise((resolve) => {
|
|
1895
1893
|
const onConfirm = () => resolve(true);
|
|
1896
1894
|
const onCancel = () => resolve(false);
|
|
1897
|
-
setShowModal(/* @__PURE__ */ (0,
|
|
1895
|
+
setShowModal(/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Confirm_default, { message: props.confirmationMessage, onConfirm, onCancel }));
|
|
1898
1896
|
});
|
|
1899
1897
|
};
|
|
1900
1898
|
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
1901
1899
|
let progressClass = props.ButtonType ? progressClasses.get(props.ButtonType) : progressClasses.get("Primary" /* Solid */);
|
|
1902
1900
|
const isDisabled = inProgress || isActionPerformed && props.oneTimeAction;
|
|
1903
|
-
return /* @__PURE__ */ (0,
|
|
1904
|
-
/* @__PURE__ */ (0,
|
|
1901
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react30.default.Fragment, { children: [
|
|
1902
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
1905
1903
|
"button",
|
|
1906
1904
|
{
|
|
1907
1905
|
type: "submit",
|
|
@@ -1911,9 +1909,9 @@ var init_Button = __esm({
|
|
|
1911
1909
|
className: buttonClass + " relative " + props.className,
|
|
1912
1910
|
children: [
|
|
1913
1911
|
isActionPerformed && props.oneTimeAction && responseMessage ? responseMessage : props.children,
|
|
1914
|
-
inProgress && /* @__PURE__ */ (0,
|
|
1915
|
-
/* @__PURE__ */ (0,
|
|
1916
|
-
/* @__PURE__ */ (0,
|
|
1912
|
+
inProgress && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react30.default.Fragment, { children: props.hideProgressIndicator === true ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "absolute bottom-0 left-0 h-0.5 bg-gray-400 rounded animate-progress" }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("svg", { className: "animate-spin ml-2 mr-3 h-5 w-5 " + progressClass, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
|
|
1913
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
1914
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
|
|
1917
1915
|
] }) })
|
|
1918
1916
|
]
|
|
1919
1917
|
}
|
|
@@ -1926,28 +1924,28 @@ var init_Button = __esm({
|
|
|
1926
1924
|
});
|
|
1927
1925
|
|
|
1928
1926
|
// src/components/controls/edit/SelectWithSearchPanel.tsx
|
|
1929
|
-
var
|
|
1927
|
+
var import_react31, import_jsx_runtime34, SelectWithSearchPanel, SelectWithSearchPanel_default;
|
|
1930
1928
|
var init_SelectWithSearchPanel = __esm({
|
|
1931
1929
|
"src/components/controls/edit/SelectWithSearchPanel.tsx"() {
|
|
1932
1930
|
"use strict";
|
|
1933
1931
|
"use client";
|
|
1934
1932
|
init_Button();
|
|
1935
|
-
|
|
1936
|
-
|
|
1933
|
+
import_react31 = __toESM(require("react"));
|
|
1934
|
+
import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1937
1935
|
SelectWithSearchPanel = (props) => {
|
|
1938
|
-
const [isOpen, setIsOpen] = (0,
|
|
1939
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
1940
|
-
const [highlightedIndex, setHighlightedIndex] = (0,
|
|
1941
|
-
const [list, setList] = (0,
|
|
1942
|
-
const listRef = (0,
|
|
1943
|
-
const [isError, setIsError] = (0,
|
|
1944
|
-
const containerRef = (0,
|
|
1945
|
-
const [isCreateOpen, setIsCreateOpen] = (0,
|
|
1946
|
-
const [formData, setFormData] = (0,
|
|
1936
|
+
const [isOpen, setIsOpen] = (0, import_react31.useState)(false);
|
|
1937
|
+
const [searchTerm, setSearchTerm] = (0, import_react31.useState)("");
|
|
1938
|
+
const [highlightedIndex, setHighlightedIndex] = (0, import_react31.useState)(0);
|
|
1939
|
+
const [list, setList] = (0, import_react31.useState)([]);
|
|
1940
|
+
const listRef = (0, import_react31.useRef)(null);
|
|
1941
|
+
const [isError, setIsError] = (0, import_react31.useState)(false);
|
|
1942
|
+
const containerRef = (0, import_react31.useRef)(null);
|
|
1943
|
+
const [isCreateOpen, setIsCreateOpen] = (0, import_react31.useState)(false);
|
|
1944
|
+
const [formData, setFormData] = (0, import_react31.useState)({});
|
|
1947
1945
|
const getNestedValue7 = (obj, path) => {
|
|
1948
1946
|
return path.split(".").reduce((acc, key) => acc?.[key], obj);
|
|
1949
1947
|
};
|
|
1950
|
-
(0,
|
|
1948
|
+
(0, import_react31.useEffect)(() => {
|
|
1951
1949
|
const handleClickOutside = (event) => {
|
|
1952
1950
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
1953
1951
|
setIsOpen(false);
|
|
@@ -1958,7 +1956,7 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
1958
1956
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
1959
1957
|
};
|
|
1960
1958
|
}, []);
|
|
1961
|
-
(0,
|
|
1959
|
+
(0, import_react31.useEffect)(() => {
|
|
1962
1960
|
async function fetchData() {
|
|
1963
1961
|
if (props.dataset) {
|
|
1964
1962
|
setList(props.dataset);
|
|
@@ -2000,7 +1998,7 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2000
1998
|
audioCtx.close();
|
|
2001
1999
|
}, 250);
|
|
2002
2000
|
};
|
|
2003
|
-
(0,
|
|
2001
|
+
(0, import_react31.useEffect)(() => {
|
|
2004
2002
|
const filteredItems2 = list?.filter(
|
|
2005
2003
|
(item) => item[props?.dataTextFieldName]?.toLowerCase().includes(searchTerm?.toLowerCase())
|
|
2006
2004
|
);
|
|
@@ -2065,18 +2063,18 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2065
2063
|
const handleInputChange = (event, field) => {
|
|
2066
2064
|
setFormData((prev) => ({ ...prev, [field]: event.target.value }));
|
|
2067
2065
|
};
|
|
2068
|
-
const handleSaveModal = (0,
|
|
2066
|
+
const handleSaveModal = (0, import_react31.useCallback)(async () => {
|
|
2069
2067
|
console.log("Form Data:", formData);
|
|
2070
2068
|
return formData;
|
|
2071
2069
|
}, []);
|
|
2072
|
-
return /* @__PURE__ */ (0,
|
|
2073
|
-
/* @__PURE__ */ (0,
|
|
2070
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "relative", children: [
|
|
2071
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("label", { className: "text-sm mb-1 font-medium", children: [
|
|
2074
2072
|
props.attributes?.label,
|
|
2075
2073
|
" ",
|
|
2076
2074
|
" ",
|
|
2077
|
-
props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2075
|
+
props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "bg-error-weak", children: "*" })
|
|
2078
2076
|
] }),
|
|
2079
|
-
/* @__PURE__ */ (0,
|
|
2077
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2080
2078
|
"input",
|
|
2081
2079
|
{
|
|
2082
2080
|
type: "text",
|
|
@@ -2090,14 +2088,14 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2090
2088
|
disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none`
|
|
2091
2089
|
}
|
|
2092
2090
|
) }),
|
|
2093
|
-
/* @__PURE__ */ (0,
|
|
2094
|
-
/* @__PURE__ */ (0,
|
|
2095
|
-
/* @__PURE__ */ (0,
|
|
2091
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ref: containerRef, children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react31.default.Fragment, { children: [
|
|
2092
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "fixed z-50 right-0 bg-white top-[62px] w-1/4 border-l border-gray-200", children: [
|
|
2093
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-col p-2 bg-accent-950 text-white", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("h5", { className: "text-md text-white font-medium", children: [
|
|
2096
2094
|
"Select a",
|
|
2097
2095
|
" ",
|
|
2098
2096
|
props.attributes?.label || props.attributes?.heading
|
|
2099
2097
|
] }) }),
|
|
2100
|
-
/* @__PURE__ */ (0,
|
|
2098
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.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_runtime34.jsx)(
|
|
2101
2099
|
"button",
|
|
2102
2100
|
{
|
|
2103
2101
|
type: "button",
|
|
@@ -2110,12 +2108,12 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2110
2108
|
}
|
|
2111
2109
|
) })
|
|
2112
2110
|
] }),
|
|
2113
|
-
isCreateOpen && /* @__PURE__ */ (0,
|
|
2114
|
-
/* @__PURE__ */ (0,
|
|
2111
|
+
isCreateOpen && /* @__PURE__ */ (0, import_jsx_runtime34.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: [
|
|
2112
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-col p-2 bg-accent-950", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("h5", { className: "text-md font-medium text-white", children: [
|
|
2115
2113
|
"Create New ",
|
|
2116
2114
|
props.attributes?.label
|
|
2117
2115
|
] }) }),
|
|
2118
|
-
/* @__PURE__ */ (0,
|
|
2116
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex justify-end px-4 border-b py-2 border-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2119
2117
|
"button",
|
|
2120
2118
|
{
|
|
2121
2119
|
type: "button",
|
|
@@ -2124,10 +2122,10 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2124
2122
|
children: "Close"
|
|
2125
2123
|
}
|
|
2126
2124
|
) }),
|
|
2127
|
-
/* @__PURE__ */ (0,
|
|
2128
|
-
props.createFields?.map((field) => /* @__PURE__ */ (0,
|
|
2129
|
-
/* @__PURE__ */ (0,
|
|
2130
|
-
/* @__PURE__ */ (0,
|
|
2125
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "p-4", children: [
|
|
2126
|
+
props.createFields?.map((field) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "mb-4", children: [
|
|
2127
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { className: "text-sm mb-1 font-medium block", children: field.label }),
|
|
2128
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2131
2129
|
"input",
|
|
2132
2130
|
{
|
|
2133
2131
|
type: field.type,
|
|
@@ -2143,7 +2141,7 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2143
2141
|
}
|
|
2144
2142
|
)
|
|
2145
2143
|
] }, field.name)),
|
|
2146
|
-
/* @__PURE__ */ (0,
|
|
2144
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Button_default, { onClick: async () => {
|
|
2147
2145
|
handleSaveModal();
|
|
2148
2146
|
return { isSuccessful: true };
|
|
2149
2147
|
}, className: "w-full", children: [
|
|
@@ -2152,13 +2150,13 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2152
2150
|
] })
|
|
2153
2151
|
] })
|
|
2154
2152
|
] }),
|
|
2155
|
-
/* @__PURE__ */ (0,
|
|
2153
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2156
2154
|
"div",
|
|
2157
2155
|
{
|
|
2158
2156
|
ref: listRef,
|
|
2159
2157
|
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",
|
|
2160
2158
|
style: { height: "calc(100vh - 130px)" },
|
|
2161
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ (0,
|
|
2159
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2162
2160
|
"button",
|
|
2163
2161
|
{
|
|
2164
2162
|
onClick: (e) => {
|
|
@@ -2168,9 +2166,9 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2168
2166
|
role: "option",
|
|
2169
2167
|
tabIndex: -1,
|
|
2170
2168
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
2171
|
-
children: /* @__PURE__ */ (0,
|
|
2169
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: getNestedValue7(item, props.dataTextFieldName) })
|
|
2172
2170
|
}
|
|
2173
|
-
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ (0,
|
|
2171
|
+
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
2174
2172
|
}
|
|
2175
2173
|
)
|
|
2176
2174
|
] }) })
|
|
@@ -2181,14 +2179,14 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2181
2179
|
});
|
|
2182
2180
|
|
|
2183
2181
|
// src/components/controls/edit/BooleanSelect.tsx
|
|
2184
|
-
var
|
|
2182
|
+
var import_react32, import_jsx_runtime35, BooleanSelect, BooleanSelect_default;
|
|
2185
2183
|
var init_BooleanSelect = __esm({
|
|
2186
2184
|
"src/components/controls/edit/BooleanSelect.tsx"() {
|
|
2187
2185
|
"use strict";
|
|
2188
|
-
|
|
2189
|
-
|
|
2186
|
+
import_react32 = __toESM(require("react"));
|
|
2187
|
+
import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2190
2188
|
BooleanSelect = (props) => {
|
|
2191
|
-
const [list, setList] = (0,
|
|
2189
|
+
const [list, setList] = (0, import_react32.useState)();
|
|
2192
2190
|
const textChangeHandler = (event) => {
|
|
2193
2191
|
const text = event.target.value;
|
|
2194
2192
|
const boolValue = text?.toLowerCase() === "true" || text === "1";
|
|
@@ -2201,7 +2199,7 @@ var init_BooleanSelect = __esm({
|
|
|
2201
2199
|
});
|
|
2202
2200
|
}
|
|
2203
2201
|
};
|
|
2204
|
-
(0,
|
|
2202
|
+
(0, import_react32.useEffect)(() => {
|
|
2205
2203
|
async function fetchData() {
|
|
2206
2204
|
console.log("in select");
|
|
2207
2205
|
if (props.dataset) {
|
|
@@ -2235,11 +2233,11 @@ var init_BooleanSelect = __esm({
|
|
|
2235
2233
|
if (props.value !== void 0 && props.value !== null) {
|
|
2236
2234
|
value = props.value;
|
|
2237
2235
|
}
|
|
2238
|
-
return /* @__PURE__ */ (0,
|
|
2239
|
-
/* @__PURE__ */ (0,
|
|
2236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react32.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("label", { className: "block", children: [
|
|
2237
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
2240
2238
|
" ",
|
|
2241
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2242
|
-
/* @__PURE__ */ (0,
|
|
2239
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2240
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
2243
2241
|
"select",
|
|
2244
2242
|
{
|
|
2245
2243
|
name: props.name,
|
|
@@ -2251,9 +2249,9 @@ var init_BooleanSelect = __esm({
|
|
|
2251
2249
|
disabled: props?.attributes?.readOnly,
|
|
2252
2250
|
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 ",
|
|
2253
2251
|
children: [
|
|
2254
|
-
/* @__PURE__ */ (0,
|
|
2252
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("option", { className: "", value: "", children: props.attributes?.placeholder || "Select" }),
|
|
2255
2253
|
list && list.map((item, i) => {
|
|
2256
|
-
return /* @__PURE__ */ (0,
|
|
2254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2257
2255
|
"option",
|
|
2258
2256
|
{
|
|
2259
2257
|
className: "fac-select-option",
|
|
@@ -2266,7 +2264,7 @@ var init_BooleanSelect = __esm({
|
|
|
2266
2264
|
]
|
|
2267
2265
|
}
|
|
2268
2266
|
),
|
|
2269
|
-
/* @__PURE__ */ (0,
|
|
2267
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
2270
2268
|
] }) });
|
|
2271
2269
|
};
|
|
2272
2270
|
BooleanSelect_default = BooleanSelect;
|
|
@@ -2274,12 +2272,12 @@ var init_BooleanSelect = __esm({
|
|
|
2274
2272
|
});
|
|
2275
2273
|
|
|
2276
2274
|
// src/components/controls/edit/EmailInput.tsx
|
|
2277
|
-
var
|
|
2275
|
+
var import_react33, import_jsx_runtime36, EmailInput, EmailInput_default;
|
|
2278
2276
|
var init_EmailInput = __esm({
|
|
2279
2277
|
"src/components/controls/edit/EmailInput.tsx"() {
|
|
2280
2278
|
"use strict";
|
|
2281
|
-
|
|
2282
|
-
|
|
2279
|
+
import_react33 = __toESM(require("react"));
|
|
2280
|
+
import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2283
2281
|
EmailInput = (props) => {
|
|
2284
2282
|
const textChangeHandler = (event) => {
|
|
2285
2283
|
const text = event.target.value;
|
|
@@ -2304,11 +2302,11 @@ var init_EmailInput = __esm({
|
|
|
2304
2302
|
if (props.value !== void 0 && props.value !== null) {
|
|
2305
2303
|
value = props.value;
|
|
2306
2304
|
}
|
|
2307
|
-
return /* @__PURE__ */ (0,
|
|
2308
|
-
/* @__PURE__ */ (0,
|
|
2305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react33.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("label", { className: "block mb-1", children: [
|
|
2306
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-sm font-medium text-slate-700", children: props?.attributes?.label }),
|
|
2309
2307
|
" ",
|
|
2310
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2311
|
-
/* @__PURE__ */ (0,
|
|
2308
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2309
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2312
2310
|
"input",
|
|
2313
2311
|
{
|
|
2314
2312
|
type: "email",
|
|
@@ -2324,7 +2322,7 @@ var init_EmailInput = __esm({
|
|
|
2324
2322
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n transition-all duration-500 ease-in-out"
|
|
2325
2323
|
}
|
|
2326
2324
|
),
|
|
2327
|
-
/* @__PURE__ */ (0,
|
|
2325
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.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 : "" })
|
|
2328
2326
|
] }) });
|
|
2329
2327
|
};
|
|
2330
2328
|
EmailInput_default = EmailInput;
|
|
@@ -2332,13 +2330,13 @@ var init_EmailInput = __esm({
|
|
|
2332
2330
|
});
|
|
2333
2331
|
|
|
2334
2332
|
// src/components/controls/edit/TimeInput.tsx
|
|
2335
|
-
var
|
|
2333
|
+
var import_react34, import_jsx_runtime37, TimeInput, TimeInput_default;
|
|
2336
2334
|
var init_TimeInput = __esm({
|
|
2337
2335
|
"src/components/controls/edit/TimeInput.tsx"() {
|
|
2338
2336
|
"use strict";
|
|
2339
2337
|
"use client";
|
|
2340
|
-
|
|
2341
|
-
|
|
2338
|
+
import_react34 = __toESM(require("react"));
|
|
2339
|
+
import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2342
2340
|
TimeInput = (props) => {
|
|
2343
2341
|
const timeChangeHandler = (event) => {
|
|
2344
2342
|
const timeValue = event.target.value;
|
|
@@ -2351,11 +2349,11 @@ var init_TimeInput = __esm({
|
|
|
2351
2349
|
});
|
|
2352
2350
|
}
|
|
2353
2351
|
};
|
|
2354
|
-
return /* @__PURE__ */ (0,
|
|
2355
|
-
/* @__PURE__ */ (0,
|
|
2352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react34.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("label", { className: "block mb-1", children: [
|
|
2353
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
2356
2354
|
" ",
|
|
2357
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2358
|
-
/* @__PURE__ */ (0,
|
|
2355
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2356
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2359
2357
|
"input",
|
|
2360
2358
|
{
|
|
2361
2359
|
type: "time",
|
|
@@ -2368,7 +2366,7 @@ var init_TimeInput = __esm({
|
|
|
2368
2366
|
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"
|
|
2369
2367
|
}
|
|
2370
2368
|
) }),
|
|
2371
|
-
/* @__PURE__ */ (0,
|
|
2369
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ?? "" })
|
|
2372
2370
|
] }) });
|
|
2373
2371
|
};
|
|
2374
2372
|
TimeInput_default = TimeInput;
|
|
@@ -2383,7 +2381,7 @@ function Hyperlink(props) {
|
|
|
2383
2381
|
if (target == "_blank") {
|
|
2384
2382
|
additionalProps.rel = "noopener noreferrer";
|
|
2385
2383
|
}
|
|
2386
|
-
return /* @__PURE__ */ (0,
|
|
2384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_jsx_runtime38.Fragment, { children: props.href ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2387
2385
|
import_link.default,
|
|
2388
2386
|
{
|
|
2389
2387
|
href: props.href,
|
|
@@ -2393,65 +2391,65 @@ function Hyperlink(props) {
|
|
|
2393
2391
|
target,
|
|
2394
2392
|
children: props.children
|
|
2395
2393
|
}
|
|
2396
|
-
) : props.isHeading ? /* @__PURE__ */ (0,
|
|
2394
|
+
) : props.isHeading ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h5", { className: props.className + "inline-block", children: props.children }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: props.className, children: props.children }) });
|
|
2397
2395
|
}
|
|
2398
|
-
var import_link,
|
|
2396
|
+
var import_link, import_jsx_runtime38;
|
|
2399
2397
|
var init_Hyperlink = __esm({
|
|
2400
2398
|
"src/components/dataForm/Hyperlink.tsx"() {
|
|
2401
2399
|
"use strict";
|
|
2402
2400
|
import_link = __toESM(require("next/link"));
|
|
2403
2401
|
init_StyleTypes();
|
|
2404
|
-
|
|
2402
|
+
import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2405
2403
|
}
|
|
2406
2404
|
});
|
|
2407
2405
|
|
|
2408
2406
|
// src/svg/chevron-updown.tsx
|
|
2409
|
-
var
|
|
2407
|
+
var import_jsx_runtime39, ChevronUpDown, chevron_updown_default;
|
|
2410
2408
|
var init_chevron_updown = __esm({
|
|
2411
2409
|
"src/svg/chevron-updown.tsx"() {
|
|
2412
2410
|
"use strict";
|
|
2413
|
-
|
|
2411
|
+
import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2414
2412
|
ChevronUpDown = (props) => {
|
|
2415
|
-
return /* @__PURE__ */ (0,
|
|
2413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.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_runtime39.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" }) });
|
|
2416
2414
|
};
|
|
2417
2415
|
chevron_updown_default = ChevronUpDown;
|
|
2418
2416
|
}
|
|
2419
2417
|
});
|
|
2420
2418
|
|
|
2421
2419
|
// src/svg/chevron-down.tsx
|
|
2422
|
-
var
|
|
2420
|
+
var import_jsx_runtime40, ChevronDown, chevron_down_default;
|
|
2423
2421
|
var init_chevron_down = __esm({
|
|
2424
2422
|
"src/svg/chevron-down.tsx"() {
|
|
2425
2423
|
"use strict";
|
|
2426
|
-
|
|
2424
|
+
import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2427
2425
|
ChevronDown = (props) => {
|
|
2428
|
-
return /* @__PURE__ */ (0,
|
|
2426
|
+
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: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) });
|
|
2429
2427
|
};
|
|
2430
2428
|
chevron_down_default = ChevronDown;
|
|
2431
2429
|
}
|
|
2432
2430
|
});
|
|
2433
2431
|
|
|
2434
2432
|
// src/svg/chevron-up.tsx
|
|
2435
|
-
var
|
|
2433
|
+
var import_jsx_runtime41, ChevronUp, chevron_up_default;
|
|
2436
2434
|
var init_chevron_up = __esm({
|
|
2437
2435
|
"src/svg/chevron-up.tsx"() {
|
|
2438
2436
|
"use strict";
|
|
2439
|
-
|
|
2437
|
+
import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2440
2438
|
ChevronUp = (props) => {
|
|
2441
|
-
return /* @__PURE__ */ (0,
|
|
2439
|
+
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: "M4.5 15.75l7.5-7.5 7.5 7.5" }) });
|
|
2442
2440
|
};
|
|
2443
2441
|
chevron_up_default = ChevronUp;
|
|
2444
2442
|
}
|
|
2445
2443
|
});
|
|
2446
2444
|
|
|
2447
2445
|
// src/svg/plus.tsx
|
|
2448
|
-
var
|
|
2446
|
+
var import_jsx_runtime42, Plus, plus_default;
|
|
2449
2447
|
var init_plus = __esm({
|
|
2450
2448
|
"src/svg/plus.tsx"() {
|
|
2451
2449
|
"use strict";
|
|
2452
|
-
|
|
2450
|
+
import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2453
2451
|
Plus = (props) => {
|
|
2454
|
-
return /* @__PURE__ */ (0,
|
|
2452
|
+
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: "M12 4.5v15m7.5-7.5h-15" }) });
|
|
2455
2453
|
};
|
|
2456
2454
|
plus_default = Plus;
|
|
2457
2455
|
}
|
|
@@ -2477,37 +2475,37 @@ var init_Icons = __esm({
|
|
|
2477
2475
|
});
|
|
2478
2476
|
|
|
2479
2477
|
// src/svg/Icon.tsx
|
|
2480
|
-
var
|
|
2478
|
+
var import_jsx_runtime43, Icon, Icon_default;
|
|
2481
2479
|
var init_Icon = __esm({
|
|
2482
2480
|
"src/svg/Icon.tsx"() {
|
|
2483
2481
|
"use strict";
|
|
2484
2482
|
init_Icons();
|
|
2485
|
-
|
|
2483
|
+
import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2486
2484
|
Icon = ({ name, className, ...props }) => {
|
|
2487
2485
|
const IconComponent = Icons_default[name];
|
|
2488
2486
|
if (!IconComponent) {
|
|
2489
2487
|
console.error(`Icon "${name}" not found.`);
|
|
2490
2488
|
return null;
|
|
2491
2489
|
}
|
|
2492
|
-
return /* @__PURE__ */ (0,
|
|
2490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(IconComponent, { ...props, className });
|
|
2493
2491
|
};
|
|
2494
2492
|
Icon_default = Icon;
|
|
2495
2493
|
}
|
|
2496
2494
|
});
|
|
2497
2495
|
|
|
2498
2496
|
// src/components/controls/edit/AssetUpload.tsx
|
|
2499
|
-
var
|
|
2497
|
+
var import_react35, import_jsx_runtime44, AssetUpload, AssetUpload_default;
|
|
2500
2498
|
var init_AssetUpload = __esm({
|
|
2501
2499
|
"src/components/controls/edit/AssetUpload.tsx"() {
|
|
2502
2500
|
"use strict";
|
|
2503
2501
|
"use client";
|
|
2504
|
-
|
|
2502
|
+
import_react35 = __toESM(require("react"));
|
|
2505
2503
|
init_ClientButton();
|
|
2506
2504
|
init_StyleTypes();
|
|
2507
2505
|
init_AssetUtility();
|
|
2508
2506
|
init_Hyperlink();
|
|
2509
2507
|
init_Icon();
|
|
2510
|
-
|
|
2508
|
+
import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2511
2509
|
AssetUpload = (props) => {
|
|
2512
2510
|
const isDisabled = props.attributes?.disable ?? false;
|
|
2513
2511
|
let allValues = [];
|
|
@@ -2528,8 +2526,8 @@ var init_AssetUpload = __esm({
|
|
|
2528
2526
|
}
|
|
2529
2527
|
return "image";
|
|
2530
2528
|
};
|
|
2531
|
-
const [assetType, setAssetType] =
|
|
2532
|
-
(0,
|
|
2529
|
+
const [assetType, setAssetType] = import_react35.default.useState(getInitialTab);
|
|
2530
|
+
(0, import_react35.useEffect)(() => {
|
|
2533
2531
|
setAssetType(getInitialTab());
|
|
2534
2532
|
}, [props.value]);
|
|
2535
2533
|
const assetUploadCallback = (newAsset) => {
|
|
@@ -2604,10 +2602,10 @@ var init_AssetUpload = __esm({
|
|
|
2604
2602
|
}
|
|
2605
2603
|
return false;
|
|
2606
2604
|
};
|
|
2607
|
-
return /* @__PURE__ */ (0,
|
|
2608
|
-
/* @__PURE__ */ (0,
|
|
2609
|
-
/* @__PURE__ */ (0,
|
|
2610
|
-
/* @__PURE__ */ (0,
|
|
2605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react35.default.Fragment, { children: [
|
|
2606
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("label", { className: "block mb-1", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }) }),
|
|
2607
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex gap-6 bg-neutral-100 rounded p-2", children: [
|
|
2608
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2611
2609
|
ClientButton_default,
|
|
2612
2610
|
{
|
|
2613
2611
|
className: assetType === "image" ? "px-2 py-1 rounded bg-body-200 scale-95" : "text-neutral-700",
|
|
@@ -2617,7 +2615,7 @@ var init_AssetUpload = __esm({
|
|
|
2617
2615
|
children: "Image Upload"
|
|
2618
2616
|
}
|
|
2619
2617
|
),
|
|
2620
|
-
/* @__PURE__ */ (0,
|
|
2618
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2621
2619
|
ClientButton_default,
|
|
2622
2620
|
{
|
|
2623
2621
|
className: assetType === "video" ? "bg-body-200 px-2 py-1 rounded-md scale-95" : "text-neutral-700",
|
|
@@ -2628,13 +2626,13 @@ var init_AssetUpload = __esm({
|
|
|
2628
2626
|
}
|
|
2629
2627
|
)
|
|
2630
2628
|
] }),
|
|
2631
|
-
shouldShowDetails() && /* @__PURE__ */ (0,
|
|
2632
|
-
/* @__PURE__ */ (0,
|
|
2633
|
-
/* @__PURE__ */ (0,
|
|
2634
|
-
/* @__PURE__ */ (0,
|
|
2635
|
-
/* @__PURE__ */ (0,
|
|
2636
|
-
/* @__PURE__ */ (0,
|
|
2637
|
-
/* @__PURE__ */ (0,
|
|
2629
|
+
shouldShowDetails() && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "relative mt-4 rounded-md p-4 border-2 border-dotted border-gray-300 bg-gray-50", children: [
|
|
2630
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.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" }),
|
|
2631
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "flex flex-col gap-3", children: allValues.map((digitalAsset, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-between items-start gap-5", children: [
|
|
2632
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "grid grid-cols-2 gap-x-8 gap-y-3 text-sm w-full", children: [
|
|
2633
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { children: [
|
|
2634
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-gray-500", children: "Title" }),
|
|
2635
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2638
2636
|
"input",
|
|
2639
2637
|
{
|
|
2640
2638
|
type: "text",
|
|
@@ -2646,18 +2644,18 @@ var init_AssetUpload = __esm({
|
|
|
2646
2644
|
}
|
|
2647
2645
|
)
|
|
2648
2646
|
] }),
|
|
2649
|
-
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ (0,
|
|
2650
|
-
/* @__PURE__ */ (0,
|
|
2651
|
-
/* @__PURE__ */ (0,
|
|
2647
|
+
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { children: [
|
|
2648
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-gray-500", children: "Resolution" }),
|
|
2649
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("p", { className: "font-medium text-gray-900 mt-3", children: [
|
|
2652
2650
|
digitalAsset.intrinsicWidth,
|
|
2653
2651
|
"\xD7",
|
|
2654
2652
|
digitalAsset.intrinsicHeight
|
|
2655
2653
|
] })
|
|
2656
2654
|
] }),
|
|
2657
|
-
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ (0,
|
|
2658
|
-
/* @__PURE__ */ (0,
|
|
2659
|
-
/* @__PURE__ */ (0,
|
|
2660
|
-
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ (0,
|
|
2655
|
+
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { children: [
|
|
2656
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-gray-500", children: "Image / Poster" }),
|
|
2657
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex-shrink-0 flex flex-col gap-3 mt-1", children: [
|
|
2658
|
+
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2661
2659
|
"img",
|
|
2662
2660
|
{
|
|
2663
2661
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.posterUrl),
|
|
@@ -2665,7 +2663,7 @@ var init_AssetUpload = __esm({
|
|
|
2665
2663
|
className: "w-32 h-auto object-cover rounded border p-1"
|
|
2666
2664
|
}
|
|
2667
2665
|
),
|
|
2668
|
-
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ (0,
|
|
2666
|
+
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2669
2667
|
"img",
|
|
2670
2668
|
{
|
|
2671
2669
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.assetUrl),
|
|
@@ -2675,9 +2673,9 @@ var init_AssetUpload = __esm({
|
|
|
2675
2673
|
)
|
|
2676
2674
|
] })
|
|
2677
2675
|
] }),
|
|
2678
|
-
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ (0,
|
|
2679
|
-
/* @__PURE__ */ (0,
|
|
2680
|
-
/* @__PURE__ */ (0,
|
|
2676
|
+
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "col-span-2", children: [
|
|
2677
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-gray-500", children: "HLS Link" }),
|
|
2678
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2681
2679
|
Hyperlink,
|
|
2682
2680
|
{
|
|
2683
2681
|
href: digitalAsset.assetUrl,
|
|
@@ -2688,12 +2686,12 @@ var init_AssetUpload = __esm({
|
|
|
2688
2686
|
)
|
|
2689
2687
|
] })
|
|
2690
2688
|
] }),
|
|
2691
|
-
/* @__PURE__ */ (0,
|
|
2689
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2692
2690
|
"span",
|
|
2693
2691
|
{
|
|
2694
2692
|
onClick: () => !isDisabled && deleteFile(index),
|
|
2695
2693
|
className: isDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
2696
|
-
children: /* @__PURE__ */ (0,
|
|
2694
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon_default, { className: "w-4 h-4 text-primary", name: "delete" })
|
|
2697
2695
|
}
|
|
2698
2696
|
)
|
|
2699
2697
|
] }, index)) })
|
|
@@ -2709,12 +2707,12 @@ var InputControlClient_exports = {};
|
|
|
2709
2707
|
__export(InputControlClient_exports, {
|
|
2710
2708
|
default: () => InputControlClient_default
|
|
2711
2709
|
});
|
|
2712
|
-
var
|
|
2710
|
+
var import_react36, import_jsx_runtime45, InputControl, InputControlClient_default;
|
|
2713
2711
|
var init_InputControlClient = __esm({
|
|
2714
2712
|
"src/components/controls/edit/InputControlClient.tsx"() {
|
|
2715
2713
|
"use strict";
|
|
2716
2714
|
"use client";
|
|
2717
|
-
|
|
2715
|
+
import_react36 = __toESM(require("react"));
|
|
2718
2716
|
init_MultilineTextInput();
|
|
2719
2717
|
init_LineTextInput();
|
|
2720
2718
|
init_MoneyInput();
|
|
@@ -2733,8 +2731,8 @@ var init_InputControlClient = __esm({
|
|
|
2733
2731
|
init_EmailInput();
|
|
2734
2732
|
init_TimeInput();
|
|
2735
2733
|
init_AssetUpload();
|
|
2736
|
-
|
|
2737
|
-
InputControl =
|
|
2734
|
+
import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2735
|
+
InputControl = import_react36.default.forwardRef(
|
|
2738
2736
|
(props, ref) => {
|
|
2739
2737
|
const ControlComponents = {
|
|
2740
2738
|
[InputControlType_default.lineTextInput]: LineTextInput_default,
|
|
@@ -2756,7 +2754,7 @@ var init_InputControlClient = __esm({
|
|
|
2756
2754
|
[InputControlType_default.asset]: AssetUpload_default
|
|
2757
2755
|
};
|
|
2758
2756
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
2759
|
-
return /* @__PURE__ */ (0,
|
|
2757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react36.default.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SelectedControlComponent, { ...props }) : "Control not found" });
|
|
2760
2758
|
}
|
|
2761
2759
|
);
|
|
2762
2760
|
InputControl.displayName = "InputControl";
|
|
@@ -2983,27 +2981,27 @@ var LinkNodeButton_exports = {};
|
|
|
2983
2981
|
__export(LinkNodeButton_exports, {
|
|
2984
2982
|
default: () => LinkNodeButton_default
|
|
2985
2983
|
});
|
|
2986
|
-
var
|
|
2984
|
+
var import_react37, import_jsx_runtime49, LinkNodeButton, LinkNodeButton_default;
|
|
2987
2985
|
var init_LinkNodeButton = __esm({
|
|
2988
2986
|
"src/components/pageRenderingEngine/nodes/LinkNodeButton.tsx"() {
|
|
2989
2987
|
"use strict";
|
|
2990
2988
|
"use client";
|
|
2991
|
-
|
|
2989
|
+
import_react37 = require("react");
|
|
2992
2990
|
init_Button();
|
|
2993
2991
|
init_ServiceClient();
|
|
2994
|
-
|
|
2992
|
+
import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2995
2993
|
LinkNodeButton = (props) => {
|
|
2996
2994
|
const { node, dataitem, children, linkText, linkType, linkUrl } = props;
|
|
2997
|
-
const [isLoading, setIsLoading] = (0,
|
|
2998
|
-
const [error, setError] = (0,
|
|
2999
|
-
const extractFieldNames = (0,
|
|
2995
|
+
const [isLoading, setIsLoading] = (0, import_react37.useState)(false);
|
|
2996
|
+
const [error, setError] = (0, import_react37.useState)(null);
|
|
2997
|
+
const extractFieldNames = (0, import_react37.useCallback)((template) => {
|
|
3000
2998
|
if (!template) return [];
|
|
3001
2999
|
const regex = /\{(\{\})?([a-zA-Z_$][a-zA-Z0-9_$]*)(?:\}\})?\}/g;
|
|
3002
3000
|
const matches = Array.from(template.matchAll(regex));
|
|
3003
3001
|
const fieldNames = matches.map((match) => match[2] || match[1]).filter((name, index, self) => self.indexOf(name) === index);
|
|
3004
3002
|
return fieldNames;
|
|
3005
3003
|
}, []);
|
|
3006
|
-
const replaceTemplateVariables = (0,
|
|
3004
|
+
const replaceTemplateVariables = (0, import_react37.useCallback)((template, responseData) => {
|
|
3007
3005
|
if (!template) return template;
|
|
3008
3006
|
let result = template;
|
|
3009
3007
|
const fieldNames = extractFieldNames(template);
|
|
@@ -3032,7 +3030,7 @@ var init_LinkNodeButton = __esm({
|
|
|
3032
3030
|
}
|
|
3033
3031
|
return result;
|
|
3034
3032
|
}, [props.routeParameters, dataitem, extractFieldNames]);
|
|
3035
|
-
const getNestedValue7 = (0,
|
|
3033
|
+
const getNestedValue7 = (0, import_react37.useCallback)((obj, path) => {
|
|
3036
3034
|
if (!obj || !path) return void 0;
|
|
3037
3035
|
if (obj[path] !== void 0) {
|
|
3038
3036
|
return obj[path];
|
|
@@ -3047,7 +3045,7 @@ var init_LinkNodeButton = __esm({
|
|
|
3047
3045
|
}
|
|
3048
3046
|
return current;
|
|
3049
3047
|
}, []);
|
|
3050
|
-
const onClick = (0,
|
|
3048
|
+
const onClick = (0, import_react37.useCallback)(async (e) => {
|
|
3051
3049
|
if (!node.postUrl) {
|
|
3052
3050
|
setError("No POST URL configured for this button");
|
|
3053
3051
|
return;
|
|
@@ -3133,11 +3131,11 @@ var init_LinkNodeButton = __esm({
|
|
|
3133
3131
|
return children;
|
|
3134
3132
|
}
|
|
3135
3133
|
if (linkText) {
|
|
3136
|
-
return /* @__PURE__ */ (0,
|
|
3134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { children: linkText });
|
|
3137
3135
|
}
|
|
3138
3136
|
return node.title || "Button";
|
|
3139
3137
|
};
|
|
3140
|
-
return /* @__PURE__ */ (0,
|
|
3138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "link-button-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3141
3139
|
Button_default,
|
|
3142
3140
|
{
|
|
3143
3141
|
ButtonType: linkType,
|
|
@@ -3158,9 +3156,9 @@ __export(CopyButton_exports, {
|
|
|
3158
3156
|
default: () => CopyButton
|
|
3159
3157
|
});
|
|
3160
3158
|
function CopyButton({ text }) {
|
|
3161
|
-
const [copied, setCopied] = (0,
|
|
3162
|
-
const timeoutRef = (0,
|
|
3163
|
-
(0,
|
|
3159
|
+
const [copied, setCopied] = (0, import_react44.useState)(false);
|
|
3160
|
+
const timeoutRef = (0, import_react44.useRef)(null);
|
|
3161
|
+
(0, import_react44.useEffect)(() => {
|
|
3164
3162
|
return () => {
|
|
3165
3163
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3166
3164
|
};
|
|
@@ -3175,13 +3173,13 @@ function CopyButton({ text }) {
|
|
|
3175
3173
|
console.error("Failed to copy: ", err);
|
|
3176
3174
|
}
|
|
3177
3175
|
};
|
|
3178
|
-
return /* @__PURE__ */ (0,
|
|
3176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
3179
3177
|
"button",
|
|
3180
3178
|
{
|
|
3181
3179
|
onClick: handleCopy,
|
|
3182
3180
|
className: "flex gap-1 items-center hover:text-white transition",
|
|
3183
3181
|
children: [
|
|
3184
|
-
/* @__PURE__ */ (0,
|
|
3182
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3185
3183
|
"svg",
|
|
3186
3184
|
{
|
|
3187
3185
|
width: "16",
|
|
@@ -3189,7 +3187,7 @@ function CopyButton({ text }) {
|
|
|
3189
3187
|
viewBox: "0 0 24 24",
|
|
3190
3188
|
className: "w-4 h-4",
|
|
3191
3189
|
fill: "currentColor",
|
|
3192
|
-
children: /* @__PURE__ */ (0,
|
|
3190
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3193
3191
|
"path",
|
|
3194
3192
|
{
|
|
3195
3193
|
fillRule: "evenodd",
|
|
@@ -3204,54 +3202,54 @@ function CopyButton({ text }) {
|
|
|
3204
3202
|
}
|
|
3205
3203
|
);
|
|
3206
3204
|
}
|
|
3207
|
-
var
|
|
3205
|
+
var import_react44, import_jsx_runtime59;
|
|
3208
3206
|
var init_CopyButton = __esm({
|
|
3209
3207
|
"src/components/CopyButton.tsx"() {
|
|
3210
3208
|
"use strict";
|
|
3211
3209
|
"use client";
|
|
3212
|
-
|
|
3213
|
-
|
|
3210
|
+
import_react44 = require("react");
|
|
3211
|
+
import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3214
3212
|
}
|
|
3215
3213
|
});
|
|
3216
3214
|
|
|
3217
3215
|
// src/components/IFrameLoaderView.tsx
|
|
3218
|
-
var
|
|
3216
|
+
var import_react47, import_jsx_runtime63, IFrameLoaderView, IFrameLoaderView_default;
|
|
3219
3217
|
var init_IFrameLoaderView = __esm({
|
|
3220
3218
|
"src/components/IFrameLoaderView.tsx"() {
|
|
3221
3219
|
"use strict";
|
|
3222
|
-
|
|
3223
|
-
|
|
3220
|
+
import_react47 = __toESM(require("react"));
|
|
3221
|
+
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
3224
3222
|
IFrameLoaderView = (props) => {
|
|
3225
|
-
return /* @__PURE__ */ (0,
|
|
3226
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
3227
|
-
/* @__PURE__ */ (0,
|
|
3228
|
-
/* @__PURE__ */ (0,
|
|
3229
|
-
/* @__PURE__ */ (0,
|
|
3230
|
-
/* @__PURE__ */ (0,
|
|
3231
|
-
/* @__PURE__ */ (0,
|
|
3223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_react47.default.Fragment, { children: [
|
|
3224
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
3225
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
3226
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
3227
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "ml-2", children: [
|
|
3228
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
3229
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
3232
3230
|
] })
|
|
3233
3231
|
] }),
|
|
3234
|
-
/* @__PURE__ */ (0,
|
|
3235
|
-
/* @__PURE__ */ (0,
|
|
3236
|
-
/* @__PURE__ */ (0,
|
|
3237
|
-
/* @__PURE__ */ (0,
|
|
3238
|
-
/* @__PURE__ */ (0,
|
|
3239
|
-
/* @__PURE__ */ (0,
|
|
3240
|
-
/* @__PURE__ */ (0,
|
|
3232
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
3233
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "animate-pulse", children: [
|
|
3234
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3235
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3236
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3237
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3238
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3241
3239
|
] }),
|
|
3242
|
-
/* @__PURE__ */ (0,
|
|
3243
|
-
/* @__PURE__ */ (0,
|
|
3244
|
-
/* @__PURE__ */ (0,
|
|
3245
|
-
/* @__PURE__ */ (0,
|
|
3246
|
-
/* @__PURE__ */ (0,
|
|
3247
|
-
/* @__PURE__ */ (0,
|
|
3240
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "animate-pulse", children: [
|
|
3241
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3242
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3243
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3244
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3245
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3248
3246
|
] }),
|
|
3249
|
-
/* @__PURE__ */ (0,
|
|
3250
|
-
/* @__PURE__ */ (0,
|
|
3251
|
-
/* @__PURE__ */ (0,
|
|
3252
|
-
/* @__PURE__ */ (0,
|
|
3253
|
-
/* @__PURE__ */ (0,
|
|
3254
|
-
/* @__PURE__ */ (0,
|
|
3247
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "animate-pulse", children: [
|
|
3248
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3249
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3250
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3251
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3252
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3255
3253
|
] })
|
|
3256
3254
|
] })
|
|
3257
3255
|
] }) }),
|
|
@@ -3267,19 +3265,19 @@ var IframeClient_exports = {};
|
|
|
3267
3265
|
__export(IframeClient_exports, {
|
|
3268
3266
|
default: () => IframeClient_default
|
|
3269
3267
|
});
|
|
3270
|
-
var
|
|
3268
|
+
var import_react48, import_jsx_runtime64, IframeClient, IframeClient_default;
|
|
3271
3269
|
var init_IframeClient = __esm({
|
|
3272
3270
|
"src/components/pageRenderingEngine/nodes/IframeClient.tsx"() {
|
|
3273
3271
|
"use strict";
|
|
3274
3272
|
"use client";
|
|
3275
|
-
|
|
3273
|
+
import_react48 = __toESM(require("react"));
|
|
3276
3274
|
init_IFrameLoaderView();
|
|
3277
|
-
|
|
3275
|
+
import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3278
3276
|
IframeClient = ({ src }) => {
|
|
3279
|
-
const iframeRef = (0,
|
|
3280
|
-
const [iframeHeight, setIframeHeight] = (0,
|
|
3281
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
3282
|
-
(0,
|
|
3277
|
+
const iframeRef = (0, import_react48.useRef)(null);
|
|
3278
|
+
const [iframeHeight, setIframeHeight] = (0, import_react48.useState)("100%");
|
|
3279
|
+
const [isDataFound, setIsDataFound] = (0, import_react48.useState)(null);
|
|
3280
|
+
(0, import_react48.useEffect)(() => {
|
|
3283
3281
|
const handleReceiveMessage = (event) => {
|
|
3284
3282
|
const eventName = event?.data?.eventName;
|
|
3285
3283
|
const payload = event?.data?.payload;
|
|
@@ -3294,7 +3292,7 @@ var init_IframeClient = __esm({
|
|
|
3294
3292
|
window.addEventListener("message", handleReceiveMessage);
|
|
3295
3293
|
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
3296
3294
|
}, []);
|
|
3297
|
-
(0,
|
|
3295
|
+
(0, import_react48.useEffect)(() => {
|
|
3298
3296
|
const handleResize = () => {
|
|
3299
3297
|
if (iframeRef.current) {
|
|
3300
3298
|
iframeRef.current.contentWindow?.postMessage({ eventName: "RESIZE" }, "*");
|
|
@@ -3306,7 +3304,7 @@ var init_IframeClient = __esm({
|
|
|
3306
3304
|
const handleIframeLoad = () => {
|
|
3307
3305
|
setIsDataFound(true);
|
|
3308
3306
|
};
|
|
3309
|
-
return /* @__PURE__ */ (0,
|
|
3307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react48.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3310
3308
|
"iframe",
|
|
3311
3309
|
{
|
|
3312
3310
|
ref: iframeRef,
|
|
@@ -3526,21 +3524,21 @@ var Pagination_exports = {};
|
|
|
3526
3524
|
__export(Pagination_exports, {
|
|
3527
3525
|
default: () => Pagination_default
|
|
3528
3526
|
});
|
|
3529
|
-
var
|
|
3527
|
+
var import_react49, import_jsx_runtime69, Pagination, Pagination_default;
|
|
3530
3528
|
var init_Pagination = __esm({
|
|
3531
3529
|
"src/components/Pagination.tsx"() {
|
|
3532
3530
|
"use strict";
|
|
3533
3531
|
"use client";
|
|
3534
|
-
|
|
3532
|
+
import_react49 = require("react");
|
|
3535
3533
|
init_OdataBuilder();
|
|
3536
3534
|
init_Icon();
|
|
3537
3535
|
init_StyleTypes();
|
|
3538
3536
|
init_InputControlType();
|
|
3539
3537
|
init_Hyperlink();
|
|
3540
|
-
|
|
3538
|
+
import_jsx_runtime69 = require("react/jsx-runtime");
|
|
3541
3539
|
Pagination = (props) => {
|
|
3542
3540
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
3543
|
-
const builder = (0,
|
|
3541
|
+
const builder = (0, import_react49.useMemo)(() => {
|
|
3544
3542
|
const b = new OdataBuilder(path);
|
|
3545
3543
|
if (query) b.setQuery(query);
|
|
3546
3544
|
return b;
|
|
@@ -3581,7 +3579,7 @@ var init_Pagination = __esm({
|
|
|
3581
3579
|
return range;
|
|
3582
3580
|
};
|
|
3583
3581
|
const paginationRange = getPaginationRange();
|
|
3584
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */ (0,
|
|
3582
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3585
3583
|
Hyperlink,
|
|
3586
3584
|
{
|
|
3587
3585
|
linkType: "Link" /* Link */,
|
|
@@ -3596,9 +3594,9 @@ var init_Pagination = __esm({
|
|
|
3596
3594
|
);
|
|
3597
3595
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
3598
3596
|
if (disabled) {
|
|
3599
|
-
return /* @__PURE__ */ (0,
|
|
3597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.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 });
|
|
3600
3598
|
}
|
|
3601
|
-
return /* @__PURE__ */ (0,
|
|
3599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3602
3600
|
Hyperlink,
|
|
3603
3601
|
{
|
|
3604
3602
|
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",
|
|
@@ -3608,35 +3606,35 @@ var init_Pagination = __esm({
|
|
|
3608
3606
|
);
|
|
3609
3607
|
};
|
|
3610
3608
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
3611
|
-
return /* @__PURE__ */ (0,
|
|
3612
|
-
/* @__PURE__ */ (0,
|
|
3613
|
-
/* @__PURE__ */ (0,
|
|
3609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "py-6 border-t bg-default", children: [
|
|
3610
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
3611
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "text-sm", children: [
|
|
3614
3612
|
"Showing ",
|
|
3615
|
-
/* @__PURE__ */ (0,
|
|
3613
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("span", { className: "font-semibold", children: [
|
|
3616
3614
|
startItem,
|
|
3617
3615
|
"-",
|
|
3618
3616
|
endItem
|
|
3619
3617
|
] }),
|
|
3620
3618
|
" ",
|
|
3621
3619
|
"out of ",
|
|
3622
|
-
/* @__PURE__ */ (0,
|
|
3620
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
3623
3621
|
" results"
|
|
3624
3622
|
] }),
|
|
3625
|
-
totalPages > 1 && /* @__PURE__ */ (0,
|
|
3626
|
-
/* @__PURE__ */ (0,
|
|
3623
|
+
totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center space-x-1", children: [
|
|
3624
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
3627
3625
|
NavigationButton,
|
|
3628
3626
|
{
|
|
3629
3627
|
page: activePageNumber - 1,
|
|
3630
3628
|
disabled: activePageNumber === 1,
|
|
3631
3629
|
children: [
|
|
3632
|
-
/* @__PURE__ */ (0,
|
|
3633
|
-
/* @__PURE__ */ (0,
|
|
3630
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
3631
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-sm", children: "Prev" })
|
|
3634
3632
|
]
|
|
3635
3633
|
}
|
|
3636
3634
|
),
|
|
3637
3635
|
paginationRange.map((item, index) => {
|
|
3638
3636
|
if (item === "...") {
|
|
3639
|
-
return /* @__PURE__ */ (0,
|
|
3637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3640
3638
|
"span",
|
|
3641
3639
|
{
|
|
3642
3640
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -3646,23 +3644,23 @@ var init_Pagination = __esm({
|
|
|
3646
3644
|
);
|
|
3647
3645
|
}
|
|
3648
3646
|
const page = item;
|
|
3649
|
-
return /* @__PURE__ */ (0,
|
|
3647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(PageButton, { page, children: page }, page);
|
|
3650
3648
|
}),
|
|
3651
|
-
/* @__PURE__ */ (0,
|
|
3649
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
3652
3650
|
NavigationButton,
|
|
3653
3651
|
{
|
|
3654
3652
|
page: activePageNumber + 1,
|
|
3655
3653
|
disabled: activePageNumber === totalPages,
|
|
3656
3654
|
children: [
|
|
3657
|
-
/* @__PURE__ */ (0,
|
|
3658
|
-
/* @__PURE__ */ (0,
|
|
3655
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-sm", children: "Next" }),
|
|
3656
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
3659
3657
|
]
|
|
3660
3658
|
}
|
|
3661
3659
|
)
|
|
3662
3660
|
] }),
|
|
3663
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0,
|
|
3664
|
-
/* @__PURE__ */ (0,
|
|
3665
|
-
/* @__PURE__ */ (0,
|
|
3661
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
3662
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-sm", children: "Go to:" }),
|
|
3663
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3666
3664
|
"input",
|
|
3667
3665
|
{
|
|
3668
3666
|
type: "number",
|
|
@@ -3683,9 +3681,9 @@ var init_Pagination = __esm({
|
|
|
3683
3681
|
) })
|
|
3684
3682
|
] })
|
|
3685
3683
|
] }),
|
|
3686
|
-
showPageSizeSelector && /* @__PURE__ */ (0,
|
|
3687
|
-
/* @__PURE__ */ (0,
|
|
3688
|
-
/* @__PURE__ */ (0,
|
|
3684
|
+
showPageSizeSelector && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
3685
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-sm", children: "Show:" }),
|
|
3686
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3689
3687
|
Hyperlink,
|
|
3690
3688
|
{
|
|
3691
3689
|
className: `
|
|
@@ -3697,7 +3695,7 @@ var init_Pagination = __esm({
|
|
|
3697
3695
|
},
|
|
3698
3696
|
size
|
|
3699
3697
|
)) }),
|
|
3700
|
-
/* @__PURE__ */ (0,
|
|
3698
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "text-sm", children: "per page" })
|
|
3701
3699
|
] }) })
|
|
3702
3700
|
] });
|
|
3703
3701
|
};
|
|
@@ -3710,13 +3708,13 @@ var Slider_exports = {};
|
|
|
3710
3708
|
__export(Slider_exports, {
|
|
3711
3709
|
default: () => Slider_default
|
|
3712
3710
|
});
|
|
3713
|
-
var
|
|
3711
|
+
var import_react50, import_jsx_runtime70, Slider, ArrowButton, ProgressPill, Slider_default;
|
|
3714
3712
|
var init_Slider = __esm({
|
|
3715
3713
|
"src/components/Slider.tsx"() {
|
|
3716
3714
|
"use strict";
|
|
3717
3715
|
"use client";
|
|
3718
|
-
|
|
3719
|
-
|
|
3716
|
+
import_react50 = __toESM(require("react"));
|
|
3717
|
+
import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3720
3718
|
Slider = ({
|
|
3721
3719
|
children,
|
|
3722
3720
|
slidesToShow = 4,
|
|
@@ -3734,13 +3732,13 @@ var init_Slider = __esm({
|
|
|
3734
3732
|
pillStyle = "cumulative",
|
|
3735
3733
|
progressPosition = "bottom"
|
|
3736
3734
|
}) => {
|
|
3737
|
-
const [currentSlide, setCurrentSlide] = (0,
|
|
3738
|
-
const [transition, setTransition] = (0,
|
|
3739
|
-
const [slidesToShowState, setSlidesToShowState] = (0,
|
|
3735
|
+
const [currentSlide, setCurrentSlide] = (0, import_react50.useState)(0);
|
|
3736
|
+
const [transition, setTransition] = (0, import_react50.useState)(true);
|
|
3737
|
+
const [slidesToShowState, setSlidesToShowState] = (0, import_react50.useState)(
|
|
3740
3738
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
3741
3739
|
);
|
|
3742
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
3743
|
-
(0,
|
|
3740
|
+
const [isPlaying, setIsPlaying] = (0, import_react50.useState)(autoplay);
|
|
3741
|
+
(0, import_react50.useEffect)(() => {
|
|
3744
3742
|
if (typeof slidesToShow === "number") return;
|
|
3745
3743
|
const handleResize = () => {
|
|
3746
3744
|
if (window.innerWidth >= 1024) {
|
|
@@ -3755,7 +3753,7 @@ var init_Slider = __esm({
|
|
|
3755
3753
|
window.addEventListener("resize", handleResize);
|
|
3756
3754
|
return () => window.removeEventListener("resize", handleResize);
|
|
3757
3755
|
}, [slidesToShow]);
|
|
3758
|
-
(0,
|
|
3756
|
+
(0, import_react50.useEffect)(() => {
|
|
3759
3757
|
if (!autoplay) return;
|
|
3760
3758
|
const timer = setInterval(() => {
|
|
3761
3759
|
if (isPlaying) {
|
|
@@ -3764,7 +3762,7 @@ var init_Slider = __esm({
|
|
|
3764
3762
|
}, autoplay_speed);
|
|
3765
3763
|
return () => clearInterval(timer);
|
|
3766
3764
|
}, [autoplay, autoplay_speed, currentSlide, isPlaying]);
|
|
3767
|
-
const totalSlides =
|
|
3765
|
+
const totalSlides = import_react50.Children.count(children);
|
|
3768
3766
|
const maxSlide = totalSlides - slidesToShowState;
|
|
3769
3767
|
const nextSlide = () => {
|
|
3770
3768
|
if (currentSlide >= maxSlide) {
|
|
@@ -3809,16 +3807,16 @@ var init_Slider = __esm({
|
|
|
3809
3807
|
}
|
|
3810
3808
|
};
|
|
3811
3809
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
3812
|
-
const slides =
|
|
3813
|
-
if (!
|
|
3810
|
+
const slides = import_react50.Children.map(children, (child, index) => {
|
|
3811
|
+
if (!import_react50.default.isValidElement(child)) return null;
|
|
3814
3812
|
const childProps = child.props;
|
|
3815
3813
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
3816
|
-
return /* @__PURE__ */ (0,
|
|
3814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3817
3815
|
"div",
|
|
3818
3816
|
{
|
|
3819
3817
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
3820
3818
|
style: { width: `calc(${100 / slidesToShowState}%)`, paddingRight: gap },
|
|
3821
|
-
children: (0,
|
|
3819
|
+
children: (0, import_react50.cloneElement)(child, {
|
|
3822
3820
|
className: mergedClassName
|
|
3823
3821
|
})
|
|
3824
3822
|
},
|
|
@@ -3836,14 +3834,14 @@ var init_Slider = __esm({
|
|
|
3836
3834
|
return "bottom-4";
|
|
3837
3835
|
}
|
|
3838
3836
|
};
|
|
3839
|
-
return /* @__PURE__ */ (0,
|
|
3837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
3840
3838
|
"div",
|
|
3841
3839
|
{
|
|
3842
3840
|
className: `relative w-full overflow-hidden ${className}`,
|
|
3843
3841
|
onMouseEnter: handleMouseEnter,
|
|
3844
3842
|
onMouseLeave: handleMouseLeave,
|
|
3845
3843
|
children: [
|
|
3846
|
-
/* @__PURE__ */ (0,
|
|
3844
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3847
3845
|
"div",
|
|
3848
3846
|
{
|
|
3849
3847
|
className: "flex h-full",
|
|
@@ -3854,18 +3852,18 @@ var init_Slider = __esm({
|
|
|
3854
3852
|
children: slides
|
|
3855
3853
|
}
|
|
3856
3854
|
),
|
|
3857
|
-
show_arrows && /* @__PURE__ */ (0,
|
|
3858
|
-
/* @__PURE__ */ (0,
|
|
3855
|
+
show_arrows && /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
|
|
3856
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3859
3857
|
ArrowButton,
|
|
3860
3858
|
{
|
|
3861
3859
|
direction: "left",
|
|
3862
3860
|
onClick: prevSlide,
|
|
3863
3861
|
visible: infinite_scroll || currentSlide > 0,
|
|
3864
3862
|
className: arrowClassName,
|
|
3865
|
-
children: /* @__PURE__ */ (0,
|
|
3863
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.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_runtime70.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
3866
3864
|
}
|
|
3867
3865
|
),
|
|
3868
|
-
/* @__PURE__ */ (0,
|
|
3866
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
3869
3867
|
ArrowButton,
|
|
3870
3868
|
{
|
|
3871
3869
|
direction: "right",
|
|
@@ -3873,13 +3871,13 @@ var init_Slider = __esm({
|
|
|
3873
3871
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
3874
3872
|
className: arrowClassName,
|
|
3875
3873
|
children: [
|
|
3876
|
-
/* @__PURE__ */ (0,
|
|
3874
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.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_runtime70.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
|
|
3877
3875
|
" "
|
|
3878
3876
|
]
|
|
3879
3877
|
}
|
|
3880
3878
|
)
|
|
3881
3879
|
] }),
|
|
3882
|
-
show_dots && /* @__PURE__ */ (0,
|
|
3880
|
+
show_dots && /* @__PURE__ */ (0, import_jsx_runtime70.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_runtime70.jsx)(
|
|
3883
3881
|
ProgressPill,
|
|
3884
3882
|
{
|
|
3885
3883
|
active: index === currentSlide,
|
|
@@ -3905,7 +3903,7 @@ var init_Slider = __esm({
|
|
|
3905
3903
|
visible,
|
|
3906
3904
|
children,
|
|
3907
3905
|
className = ""
|
|
3908
|
-
}) => /* @__PURE__ */ (0,
|
|
3906
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3909
3907
|
"button",
|
|
3910
3908
|
{
|
|
3911
3909
|
className: `
|
|
@@ -3931,13 +3929,13 @@ var init_Slider = __esm({
|
|
|
3931
3929
|
currentSlide,
|
|
3932
3930
|
totalSlides
|
|
3933
3931
|
}) => {
|
|
3934
|
-
const [progress, setProgress] = (0,
|
|
3935
|
-
(0,
|
|
3932
|
+
const [progress, setProgress] = (0, import_react50.useState)(0);
|
|
3933
|
+
(0, import_react50.useEffect)(() => {
|
|
3936
3934
|
if (active) {
|
|
3937
3935
|
setProgress(0);
|
|
3938
3936
|
}
|
|
3939
3937
|
}, [active, index]);
|
|
3940
|
-
(0,
|
|
3938
|
+
(0, import_react50.useEffect)(() => {
|
|
3941
3939
|
if (!active || !isPlaying) {
|
|
3942
3940
|
if (!active) {
|
|
3943
3941
|
setProgress(0);
|
|
@@ -3992,7 +3990,7 @@ var init_Slider = __esm({
|
|
|
3992
3990
|
const renderProgressBar = () => {
|
|
3993
3991
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
3994
3992
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
3995
|
-
return /* @__PURE__ */ (0,
|
|
3993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3996
3994
|
"div",
|
|
3997
3995
|
{
|
|
3998
3996
|
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`,
|
|
@@ -4004,7 +4002,7 @@ var init_Slider = __esm({
|
|
|
4004
4002
|
};
|
|
4005
4003
|
const renderCumulativeFill = () => {
|
|
4006
4004
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
4007
|
-
return /* @__PURE__ */ (0,
|
|
4005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4008
4006
|
"div",
|
|
4009
4007
|
{
|
|
4010
4008
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -4014,7 +4012,7 @@ var init_Slider = __esm({
|
|
|
4014
4012
|
}
|
|
4015
4013
|
return null;
|
|
4016
4014
|
};
|
|
4017
|
-
return /* @__PURE__ */ (0,
|
|
4015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
4018
4016
|
"button",
|
|
4019
4017
|
{
|
|
4020
4018
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -4064,27 +4062,33 @@ __export(index_exports, {
|
|
|
4064
4062
|
module.exports = __toCommonJS(index_exports);
|
|
4065
4063
|
|
|
4066
4064
|
// src/components/controls/view/ViewControl.tsx
|
|
4067
|
-
var
|
|
4065
|
+
var import_react15 = __toESM(require("react"));
|
|
4068
4066
|
|
|
4069
4067
|
// src/components/controls/view/ViewControlTypes.tsx
|
|
4070
4068
|
var ViewControlTypes = {
|
|
4071
4069
|
lineText: "lineText",
|
|
4070
|
+
emailText: "email",
|
|
4072
4071
|
asset: "asset",
|
|
4073
4072
|
multilineTextBullets: "multilineTextBullets",
|
|
4074
4073
|
boolean: "boolean",
|
|
4074
|
+
checkboxInput: "boolean",
|
|
4075
4075
|
money: "money",
|
|
4076
4076
|
date: "date",
|
|
4077
4077
|
time: "time",
|
|
4078
4078
|
datetime: "datetime",
|
|
4079
4079
|
number: "number",
|
|
4080
4080
|
multilineText: "multilineText",
|
|
4081
|
+
multilinetext: "multilinetext",
|
|
4081
4082
|
moneyText: "moneyText",
|
|
4082
4083
|
percentage: "percentage",
|
|
4084
|
+
status: "status",
|
|
4083
4085
|
statusBg: "statusBg",
|
|
4084
4086
|
progressIndicator: "progressIndicator",
|
|
4085
4087
|
timeUntilStarts: "timeUntilStarts",
|
|
4086
4088
|
timeUntilStartsStyled: "timeUntilStartsStyled",
|
|
4087
|
-
aiGeneratedSummary: "aiGeneratedSummary"
|
|
4089
|
+
aiGeneratedSummary: "aiGeneratedSummary",
|
|
4090
|
+
booleanView: "booleanView",
|
|
4091
|
+
text: "text"
|
|
4088
4092
|
};
|
|
4089
4093
|
var ViewControlTypes_default = ViewControlTypes;
|
|
4090
4094
|
|
|
@@ -4266,8 +4270,32 @@ var LineText = (props) => {
|
|
|
4266
4270
|
};
|
|
4267
4271
|
var LineTextView_default = LineText;
|
|
4268
4272
|
|
|
4269
|
-
// src/components/controls/view/
|
|
4273
|
+
// src/components/controls/view/EmailTextView.tsx
|
|
4270
4274
|
var import_react7 = __toESM(require("react"));
|
|
4275
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
4276
|
+
var EmailText = (props) => {
|
|
4277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react7.default.Fragment, { children: props.value });
|
|
4278
|
+
};
|
|
4279
|
+
var EmailTextView_default = EmailText;
|
|
4280
|
+
|
|
4281
|
+
// src/components/controls/view/StatusBgView.tsx
|
|
4282
|
+
var import_react8 = __toESM(require("react"));
|
|
4283
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
4284
|
+
var StatusBg = (props) => {
|
|
4285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react8.default.Fragment, { children: props.value && props.value != "" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "py-0.5 px-1.5 text-xs capitalize text-white font-semibold rounded bg-status bg-status-" + props.value, children: props.value }) });
|
|
4286
|
+
};
|
|
4287
|
+
var StatusBgView_default = StatusBg;
|
|
4288
|
+
|
|
4289
|
+
// src/components/controls/view/StatusView.tsx
|
|
4290
|
+
var import_react9 = __toESM(require("react"));
|
|
4291
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
4292
|
+
var Status = (props) => {
|
|
4293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react9.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "capitalize font-semibold rounded text-status text-status-" + props.value, children: props.value }) });
|
|
4294
|
+
};
|
|
4295
|
+
var StatusView_default = Status;
|
|
4296
|
+
|
|
4297
|
+
// src/components/controls/view/MoneyView.tsx
|
|
4298
|
+
var import_react10 = __toESM(require("react"));
|
|
4271
4299
|
|
|
4272
4300
|
// src/components/utilities/CurrencyUtility.tsx
|
|
4273
4301
|
var CurrencyUtility = class {
|
|
@@ -4288,40 +4316,40 @@ var CurrencyUtility = class {
|
|
|
4288
4316
|
var CurrencyUtility_default = CurrencyUtility;
|
|
4289
4317
|
|
|
4290
4318
|
// src/components/controls/view/MoneyView.tsx
|
|
4291
|
-
var
|
|
4319
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
4292
4320
|
var Money = (props) => {
|
|
4293
4321
|
const parsedNumber = parseFloat(props.value);
|
|
4294
|
-
return /* @__PURE__ */ (0,
|
|
4295
|
-
/* @__PURE__ */ (0,
|
|
4322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react10.default.Fragment, { children: !Number.isNaN(parsedNumber) && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react10.default.Fragment, { children: [
|
|
4323
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "mr-0.5", children: CurrencyUtility_default.getCurrencySymbol(props.unit) }),
|
|
4296
4324
|
parsedNumber.toLocaleString()
|
|
4297
4325
|
] }) });
|
|
4298
4326
|
};
|
|
4299
4327
|
var MoneyView_default = Money;
|
|
4300
4328
|
|
|
4301
4329
|
// src/components/controls/view/MultilineTextBulletsView.tsx
|
|
4302
|
-
var
|
|
4303
|
-
var
|
|
4330
|
+
var import_react11 = __toESM(require("react"));
|
|
4331
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
4304
4332
|
var MultilineTextBullets = (props) => {
|
|
4305
4333
|
const lines = props.value?.split("\\n");
|
|
4306
|
-
return /* @__PURE__ */ (0,
|
|
4307
|
-
return /* @__PURE__ */ (0,
|
|
4334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react11.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ul", { className: "list-disc", children: lines && lines.map((line, index) => {
|
|
4335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: line }, index);
|
|
4308
4336
|
}) }) });
|
|
4309
4337
|
};
|
|
4310
4338
|
var MultilineTextBulletsView_default = MultilineTextBullets;
|
|
4311
4339
|
|
|
4312
4340
|
// src/components/controls/view/MultilineTextView.tsx
|
|
4313
|
-
var
|
|
4314
|
-
var
|
|
4341
|
+
var import_react12 = __toESM(require("react"));
|
|
4342
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
4315
4343
|
var MultilineText = (props) => {
|
|
4316
|
-
return /* @__PURE__ */ (0,
|
|
4344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react12.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "whitespace-pre-line", children: props.value }) });
|
|
4317
4345
|
};
|
|
4318
4346
|
var MultilineTextView_default = MultilineText;
|
|
4319
4347
|
|
|
4320
4348
|
// src/components/controls/view/PercentageView.tsx
|
|
4321
|
-
var
|
|
4322
|
-
var
|
|
4349
|
+
var import_react13 = __toESM(require("react"));
|
|
4350
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
4323
4351
|
var PercentageView = (props) => {
|
|
4324
|
-
return /* @__PURE__ */ (0,
|
|
4352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react13.default.Fragment, { children: [
|
|
4325
4353
|
props.value,
|
|
4326
4354
|
"%"
|
|
4327
4355
|
] });
|
|
@@ -4329,16 +4357,16 @@ var PercentageView = (props) => {
|
|
|
4329
4357
|
var PercentageView_default = PercentageView;
|
|
4330
4358
|
|
|
4331
4359
|
// src/components/controls/view/ProgressIndicator.tsx
|
|
4332
|
-
var
|
|
4333
|
-
var
|
|
4360
|
+
var import_react14 = __toESM(require("react"));
|
|
4361
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
4334
4362
|
var ProgressIndicator = (props) => {
|
|
4335
4363
|
const percentage = 100;
|
|
4336
4364
|
const circumference = Math.PI * 56;
|
|
4337
4365
|
const offset = circumference * (1 - percentage / 100);
|
|
4338
|
-
return /* @__PURE__ */ (0,
|
|
4339
|
-
/* @__PURE__ */ (0,
|
|
4340
|
-
/* @__PURE__ */ (0,
|
|
4341
|
-
/* @__PURE__ */ (0,
|
|
4366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react14.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "relative w-48 h-48", children: [
|
|
4367
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "absolute top-0 left-0 w-full h-full rounded-full border border-gray-200" }),
|
|
4368
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "absolute top-0 left-0 w-full h-full rounded-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "w-full h-full rounded-full border-t-8 border-green-500", style: { transform: `rotate(-90deg)`, clipPath: `inset(0px ${offset}px 0px 0px)` } }) }),
|
|
4369
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "absolute top-0 left-0 w-full h-full flex items-center justify-center text-lg font-bold text-gray-800", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
|
|
4342
4370
|
percentage,
|
|
4343
4371
|
"%"
|
|
4344
4372
|
] }) })
|
|
@@ -4347,18 +4375,18 @@ var ProgressIndicator = (props) => {
|
|
|
4347
4375
|
var ProgressIndicator_default = ProgressIndicator;
|
|
4348
4376
|
|
|
4349
4377
|
// src/components/controls/view/AiGeneratedSummary.tsx
|
|
4350
|
-
var
|
|
4378
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
4351
4379
|
var AiGeneratedSummary = (props) => {
|
|
4352
4380
|
const lines = props.value?.split("\n").filter((line) => line.trim() !== "") || [];
|
|
4353
|
-
return /* @__PURE__ */ (0,
|
|
4354
|
-
/* @__PURE__ */ (0,
|
|
4355
|
-
/* @__PURE__ */ (0,
|
|
4356
|
-
/* @__PURE__ */ (0,
|
|
4357
|
-
/* @__PURE__ */ (0,
|
|
4358
|
-
/* @__PURE__ */ (0,
|
|
4381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("details", { className: "group rounded-xl border-2 bg-white shadow-sm border-p overflow-hidden", children: [
|
|
4382
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("summary", { className: "flex items-start justify-between cursor-pointer list-none", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-start gap-3 ", children: [
|
|
4383
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "bg-primary-base bg-transparent rounded mt-1 p-1", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-5", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z" }) }) }),
|
|
4384
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
|
|
4385
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h3", { className: "text-lg font-semibold ", children: "Quick Read" }),
|
|
4386
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-sm text-gray-500 mb-0", children: "Summary is AI-generated, author-reviewed" })
|
|
4359
4387
|
] })
|
|
4360
4388
|
] }) }),
|
|
4361
|
-
/* @__PURE__ */ (0,
|
|
4389
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { className: "list-disc pl-6 space-y-3 text-gray-700 ps-4 pl-4", children: lines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { className: "m-0", children: line }, index)) }) })
|
|
4362
4390
|
] });
|
|
4363
4391
|
};
|
|
4364
4392
|
var AiGeneratedSummary_default = AiGeneratedSummary;
|
|
@@ -4371,13 +4399,15 @@ var DateTimeView = (0, import_dynamic3.default)(() => Promise.resolve().then(()
|
|
|
4371
4399
|
var DateTimeVew_default = DateTimeView;
|
|
4372
4400
|
|
|
4373
4401
|
// src/components/controls/view/ViewControl.tsx
|
|
4374
|
-
var
|
|
4402
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
4375
4403
|
var ViewControl = (props) => {
|
|
4376
4404
|
const ControlComponents = {
|
|
4377
4405
|
[ViewControlTypes_default.lineText]: LineTextView_default,
|
|
4406
|
+
[ViewControlTypes_default.emailText]: EmailTextView_default,
|
|
4378
4407
|
[ViewControlTypes_default.asset]: Asset_default,
|
|
4379
4408
|
[ViewControlTypes_default.multilineTextBullets]: MultilineTextBulletsView_default,
|
|
4380
4409
|
[ViewControlTypes_default.boolean]: BooleanView_default,
|
|
4410
|
+
[ViewControlTypes_default.checkboxInput]: BooleanView_default,
|
|
4381
4411
|
// [ViewControlTypes.timeUntilStarts]: TimeUntilStarts,
|
|
4382
4412
|
[ViewControlTypes_default.money]: MoneyView_default,
|
|
4383
4413
|
[ViewControlTypes_default.date]: DateView_default,
|
|
@@ -4385,16 +4415,20 @@ var ViewControl = (props) => {
|
|
|
4385
4415
|
[ViewControlTypes_default.datetime]: DateTimeVew_default,
|
|
4386
4416
|
[ViewControlTypes_default.number]: NumberView_default,
|
|
4387
4417
|
[ViewControlTypes_default.multilineText]: MultilineTextView_default,
|
|
4418
|
+
[ViewControlTypes_default.multilinetext]: MultilineTextView_default,
|
|
4388
4419
|
[ViewControlTypes_default.moneyText]: MoneyView_default,
|
|
4389
4420
|
[ViewControlTypes_default.percentage]: PercentageView_default,
|
|
4390
|
-
|
|
4421
|
+
[ViewControlTypes_default.status]: StatusView_default,
|
|
4422
|
+
[ViewControlTypes_default.statusBg]: StatusBgView_default,
|
|
4391
4423
|
[ViewControlTypes_default.progressIndicator]: ProgressIndicator_default,
|
|
4392
4424
|
// [ViewControlTypes.timeUntilStarts]: TimeUntilStarts,
|
|
4393
4425
|
// [ViewControlTypes.timeUntilStartsStyled]: TimeUntilStartsStyled,
|
|
4394
|
-
[ViewControlTypes_default.aiGeneratedSummary]: AiGeneratedSummary_default
|
|
4426
|
+
[ViewControlTypes_default.aiGeneratedSummary]: AiGeneratedSummary_default,
|
|
4427
|
+
[ViewControlTypes_default.booleanView]: BooleanView_default,
|
|
4428
|
+
[ViewControlTypes_default.text]: LineTextView_default
|
|
4395
4429
|
};
|
|
4396
4430
|
const SelectedControlComponent = props.controlType ? ControlComponents[props.controlType] : void 0;
|
|
4397
|
-
return /* @__PURE__ */ (0,
|
|
4431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react15.default.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
4398
4432
|
};
|
|
4399
4433
|
var ViewControl_default = ViewControl;
|
|
4400
4434
|
|
|
@@ -4409,13 +4443,13 @@ var InputControl_default = InputControl2;
|
|
|
4409
4443
|
init_InputControlType();
|
|
4410
4444
|
|
|
4411
4445
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
4412
|
-
var
|
|
4446
|
+
var import_react52 = __toESM(require("react"));
|
|
4413
4447
|
|
|
4414
4448
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
4415
|
-
var
|
|
4449
|
+
var import_react39 = __toESM(require("react"));
|
|
4416
4450
|
|
|
4417
4451
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
4418
|
-
var
|
|
4452
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
4419
4453
|
var TextNode = (props) => {
|
|
4420
4454
|
function cssStringToJson(cssString) {
|
|
4421
4455
|
const styleObject = {};
|
|
@@ -4470,36 +4504,36 @@ var TextNode = (props) => {
|
|
|
4470
4504
|
});
|
|
4471
4505
|
}
|
|
4472
4506
|
function renderWithLineBreaks(text) {
|
|
4473
|
-
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0,
|
|
4507
|
+
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { children: [
|
|
4474
4508
|
line,
|
|
4475
|
-
index < arr.length - 1 && /* @__PURE__ */ (0,
|
|
4509
|
+
index < arr.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("br", {})
|
|
4476
4510
|
] }, index));
|
|
4477
4511
|
}
|
|
4478
4512
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
4479
4513
|
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
4480
4514
|
const content = typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText;
|
|
4481
|
-
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ (0,
|
|
4515
|
+
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("sup", { children: content }) : props.node.format & 32 ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("sub", { children: content }) : content;
|
|
4482
4516
|
return (
|
|
4483
4517
|
// @ts-expect-error custom code
|
|
4484
|
-
/* @__PURE__ */ (0,
|
|
4518
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: formattedContent })
|
|
4485
4519
|
);
|
|
4486
4520
|
};
|
|
4487
4521
|
var TextNode_default = TextNode;
|
|
4488
4522
|
|
|
4489
4523
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
4490
|
-
var
|
|
4524
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
4491
4525
|
var LineBreakNode = () => {
|
|
4492
|
-
return /* @__PURE__ */ (0,
|
|
4526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "py-0.5 lg:py-1.5" });
|
|
4493
4527
|
};
|
|
4494
4528
|
var LineBreakNode_default = LineBreakNode;
|
|
4495
4529
|
|
|
4496
4530
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
4497
|
-
var
|
|
4531
|
+
var import_react38 = __toESM(require("react"));
|
|
4498
4532
|
|
|
4499
4533
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
4500
4534
|
init_AssetUtility();
|
|
4501
4535
|
var import_dynamic5 = __toESM(require("next/dynamic"));
|
|
4502
|
-
var
|
|
4536
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4503
4537
|
var HlsPlayer3 = (0, import_dynamic5.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
4504
4538
|
var getNestedValue = (obj, path) => {
|
|
4505
4539
|
if (!obj || !path) return void 0;
|
|
@@ -4532,7 +4566,7 @@ var ImageNode = (props) => {
|
|
|
4532
4566
|
assets = [image];
|
|
4533
4567
|
}
|
|
4534
4568
|
if (assets && assets.length > 0) {
|
|
4535
|
-
return /* @__PURE__ */ (0,
|
|
4569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4536
4570
|
DeviceAssetSelector_default,
|
|
4537
4571
|
{
|
|
4538
4572
|
device: props.device,
|
|
@@ -4573,7 +4607,7 @@ var ImageNode = (props) => {
|
|
|
4573
4607
|
right: "justify-end"
|
|
4574
4608
|
};
|
|
4575
4609
|
const isHls = imageUrl.endsWith(".m3u8");
|
|
4576
|
-
const renderMedia = () => isHls ? /* @__PURE__ */ (0,
|
|
4610
|
+
const renderMedia = () => isHls ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4577
4611
|
HlsPlayer3,
|
|
4578
4612
|
{
|
|
4579
4613
|
assetUrl: imageUrl,
|
|
@@ -4586,7 +4620,7 @@ var ImageNode = (props) => {
|
|
|
4586
4620
|
apiBaseUrl: props.apiBaseUrl,
|
|
4587
4621
|
session: props.session
|
|
4588
4622
|
}
|
|
4589
|
-
) : /* @__PURE__ */ (0,
|
|
4623
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4590
4624
|
"img",
|
|
4591
4625
|
{
|
|
4592
4626
|
style: styles,
|
|
@@ -4599,7 +4633,7 @@ var ImageNode = (props) => {
|
|
|
4599
4633
|
}
|
|
4600
4634
|
);
|
|
4601
4635
|
if (props.node.width) {
|
|
4602
|
-
return /* @__PURE__ */ (0,
|
|
4636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: `flex ${FORMAT_CLASSES2[props.node.format] ?? ""}`, children: renderMedia() });
|
|
4603
4637
|
}
|
|
4604
4638
|
return renderMedia();
|
|
4605
4639
|
};
|
|
@@ -4609,7 +4643,7 @@ var ImageNode_default = ImageNode;
|
|
|
4609
4643
|
init_StyleTypes();
|
|
4610
4644
|
init_Hyperlink();
|
|
4611
4645
|
var import_dynamic6 = __toESM(require("next/dynamic"));
|
|
4612
|
-
var
|
|
4646
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4613
4647
|
var LinkNodeButton2 = (0, import_dynamic6.default)(() => Promise.resolve().then(() => (init_LinkNodeButton(), LinkNodeButton_exports)), {
|
|
4614
4648
|
ssr: false
|
|
4615
4649
|
});
|
|
@@ -4662,13 +4696,13 @@ var LinkNode = (props) => {
|
|
|
4662
4696
|
const isButton = node.isButton === true;
|
|
4663
4697
|
const renderChildren = () => {
|
|
4664
4698
|
if (!node.children || node.children.length === 0) return null;
|
|
4665
|
-
return /* @__PURE__ */ (0,
|
|
4699
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, { children: node.children.map((childNode, index) => {
|
|
4666
4700
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
4667
4701
|
if (!SelectedNode) {
|
|
4668
4702
|
console.warn("Unknown node type:", childNode.type);
|
|
4669
4703
|
return null;
|
|
4670
4704
|
}
|
|
4671
|
-
return /* @__PURE__ */ (0,
|
|
4705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react38.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4672
4706
|
SelectedNode,
|
|
4673
4707
|
{
|
|
4674
4708
|
node: childNode,
|
|
@@ -4681,15 +4715,15 @@ var LinkNode = (props) => {
|
|
|
4681
4715
|
};
|
|
4682
4716
|
const renderFallback = () => {
|
|
4683
4717
|
if ((!node.children || node.children.length === 0) && linkText) {
|
|
4684
|
-
return /* @__PURE__ */ (0,
|
|
4718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: linkText });
|
|
4685
4719
|
}
|
|
4686
4720
|
if ((!node.children || node.children.length === 0) && !linkText) {
|
|
4687
|
-
return /* @__PURE__ */ (0,
|
|
4721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("br", {});
|
|
4688
4722
|
}
|
|
4689
4723
|
return null;
|
|
4690
4724
|
};
|
|
4691
4725
|
if (isButton) {
|
|
4692
|
-
return /* @__PURE__ */ (0,
|
|
4726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
4693
4727
|
LinkNodeButton2,
|
|
4694
4728
|
{
|
|
4695
4729
|
node,
|
|
@@ -4707,7 +4741,7 @@ var LinkNode = (props) => {
|
|
|
4707
4741
|
}
|
|
4708
4742
|
);
|
|
4709
4743
|
}
|
|
4710
|
-
return /* @__PURE__ */ (0,
|
|
4744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
4711
4745
|
Hyperlink,
|
|
4712
4746
|
{
|
|
4713
4747
|
href: linkUrl || "#",
|
|
@@ -4723,10 +4757,10 @@ var LinkNode = (props) => {
|
|
|
4723
4757
|
var LinkNode_default = LinkNode;
|
|
4724
4758
|
|
|
4725
4759
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
4726
|
-
var
|
|
4760
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4727
4761
|
var SVGIconNode = ({ node }) => {
|
|
4728
4762
|
if (!node?.svgCode) return null;
|
|
4729
|
-
return /* @__PURE__ */ (0,
|
|
4763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4730
4764
|
"span",
|
|
4731
4765
|
{
|
|
4732
4766
|
style: {
|
|
@@ -4743,7 +4777,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
4743
4777
|
|
|
4744
4778
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
4745
4779
|
var import_katex = __toESM(require("katex"));
|
|
4746
|
-
var
|
|
4780
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4747
4781
|
var EquationNode = ({ node }) => {
|
|
4748
4782
|
const { equation, inline } = node;
|
|
4749
4783
|
let html = "";
|
|
@@ -4758,7 +4792,7 @@ var EquationNode = ({ node }) => {
|
|
|
4758
4792
|
});
|
|
4759
4793
|
}
|
|
4760
4794
|
if (inline) {
|
|
4761
|
-
return /* @__PURE__ */ (0,
|
|
4795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4762
4796
|
"span",
|
|
4763
4797
|
{
|
|
4764
4798
|
className: "katex-inline",
|
|
@@ -4766,7 +4800,7 @@ var EquationNode = ({ node }) => {
|
|
|
4766
4800
|
}
|
|
4767
4801
|
);
|
|
4768
4802
|
}
|
|
4769
|
-
return /* @__PURE__ */ (0,
|
|
4803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4770
4804
|
"div",
|
|
4771
4805
|
{
|
|
4772
4806
|
className: "katex-block my-3 text-center",
|
|
@@ -4777,7 +4811,7 @@ var EquationNode = ({ node }) => {
|
|
|
4777
4811
|
var EquationNode_default = EquationNode;
|
|
4778
4812
|
|
|
4779
4813
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
4780
|
-
var
|
|
4814
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4781
4815
|
function getNestedProperty(obj, path) {
|
|
4782
4816
|
if (!obj || !path) return null;
|
|
4783
4817
|
if (path.includes(".")) {
|
|
@@ -4790,7 +4824,7 @@ function getNestedProperty(obj, path) {
|
|
|
4790
4824
|
}
|
|
4791
4825
|
const value = obj[path];
|
|
4792
4826
|
if (Array.isArray(value)) {
|
|
4793
|
-
return value.map((item, index) => /* @__PURE__ */ (0,
|
|
4827
|
+
return value.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { children: String(item) }, index));
|
|
4794
4828
|
}
|
|
4795
4829
|
return value;
|
|
4796
4830
|
}
|
|
@@ -4851,7 +4885,7 @@ var DatafieldNode = (props) => {
|
|
|
4851
4885
|
const dataType = props.node.dataType;
|
|
4852
4886
|
if (isEmptyValue) return null;
|
|
4853
4887
|
if (dataType === "rawContent") {
|
|
4854
|
-
return /* @__PURE__ */ (0,
|
|
4888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4855
4889
|
PageBodyRenderer_default,
|
|
4856
4890
|
{
|
|
4857
4891
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -4867,12 +4901,12 @@ var DatafieldNode = (props) => {
|
|
|
4867
4901
|
}
|
|
4868
4902
|
);
|
|
4869
4903
|
}
|
|
4870
|
-
return /* @__PURE__ */ (0,
|
|
4904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4871
4905
|
"span",
|
|
4872
4906
|
{
|
|
4873
4907
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
4874
4908
|
style: styles,
|
|
4875
|
-
children: /* @__PURE__ */ (0,
|
|
4909
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4876
4910
|
ViewControl_default,
|
|
4877
4911
|
{
|
|
4878
4912
|
controlType: dataType,
|
|
@@ -4885,7 +4919,7 @@ var DatafieldNode = (props) => {
|
|
|
4885
4919
|
var DatafieldNode_default = DatafieldNode;
|
|
4886
4920
|
|
|
4887
4921
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
4888
|
-
var
|
|
4922
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4889
4923
|
var ParagraphNode = (props) => {
|
|
4890
4924
|
const NodeTypes2 = {
|
|
4891
4925
|
["text"]: TextNode_default,
|
|
@@ -4905,9 +4939,9 @@ var ParagraphNode = (props) => {
|
|
|
4905
4939
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
4906
4940
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
4907
4941
|
if (isInlineOnlyParent) {
|
|
4908
|
-
return /* @__PURE__ */ (0,
|
|
4942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_jsx_runtime54.Fragment, { children: hasChildren && props.node.children.map((node, index) => {
|
|
4909
4943
|
const SelectedNode = NodeTypes2[node.type];
|
|
4910
|
-
return /* @__PURE__ */ (0,
|
|
4944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react39.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4911
4945
|
SelectedNode,
|
|
4912
4946
|
{
|
|
4913
4947
|
node,
|
|
@@ -4919,10 +4953,10 @@ var ParagraphNode = (props) => {
|
|
|
4919
4953
|
) }, index);
|
|
4920
4954
|
}) });
|
|
4921
4955
|
}
|
|
4922
|
-
return /* @__PURE__ */ (0,
|
|
4956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: " " + formatClasses, children: [
|
|
4923
4957
|
hasChildren && props.node.children.map((node, index) => {
|
|
4924
4958
|
const SelectedNode = NodeTypes2[node.type];
|
|
4925
|
-
return /* @__PURE__ */ (0,
|
|
4959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react39.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4926
4960
|
SelectedNode,
|
|
4927
4961
|
{
|
|
4928
4962
|
node,
|
|
@@ -4933,14 +4967,14 @@ var ParagraphNode = (props) => {
|
|
|
4933
4967
|
}
|
|
4934
4968
|
) }, index);
|
|
4935
4969
|
}),
|
|
4936
|
-
!hasChildren && /* @__PURE__ */ (0,
|
|
4970
|
+
!hasChildren && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "py-1.5 lg:py-2" })
|
|
4937
4971
|
] });
|
|
4938
4972
|
};
|
|
4939
4973
|
var ParagraphNode_default = ParagraphNode;
|
|
4940
4974
|
|
|
4941
4975
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
4942
|
-
var
|
|
4943
|
-
var
|
|
4976
|
+
var import_react40 = __toESM(require("react"));
|
|
4977
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4944
4978
|
var HeadingNode = (props) => {
|
|
4945
4979
|
const NodeTypes2 = {
|
|
4946
4980
|
["text"]: TextNode_default,
|
|
@@ -4956,23 +4990,23 @@ var HeadingNode = (props) => {
|
|
|
4956
4990
|
{
|
|
4957
4991
|
}
|
|
4958
4992
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
4959
|
-
return /* @__PURE__ */ (0,
|
|
4993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_jsx_runtime55.Fragment, { children: import_react40.default.createElement(
|
|
4960
4994
|
HeadingTag,
|
|
4961
4995
|
{ className: formatClasses },
|
|
4962
4996
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
4963
4997
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
4964
|
-
return /* @__PURE__ */ (0,
|
|
4998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react40.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
4965
4999
|
})
|
|
4966
5000
|
) });
|
|
4967
5001
|
};
|
|
4968
5002
|
var HeadingNode_default = HeadingNode;
|
|
4969
5003
|
|
|
4970
5004
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
4971
|
-
var
|
|
5005
|
+
var import_react42 = __toESM(require("react"));
|
|
4972
5006
|
|
|
4973
5007
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
4974
|
-
var
|
|
4975
|
-
var
|
|
5008
|
+
var import_react41 = __toESM(require("react"));
|
|
5009
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
4976
5010
|
var ListItemNode = (props) => {
|
|
4977
5011
|
const NodeTypes2 = {
|
|
4978
5012
|
text: TextNode_default,
|
|
@@ -4989,66 +5023,66 @@ var ListItemNode = (props) => {
|
|
|
4989
5023
|
liStyle.fontSize = match[1].trim();
|
|
4990
5024
|
}
|
|
4991
5025
|
}
|
|
4992
|
-
return /* @__PURE__ */ (0,
|
|
5026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
4993
5027
|
const SelectedNode = NodeTypes2[node.type];
|
|
4994
5028
|
if (node.type === "linebreak") {
|
|
4995
5029
|
if (!foundFirstBreak) {
|
|
4996
5030
|
foundFirstBreak = true;
|
|
4997
|
-
return /* @__PURE__ */ (0,
|
|
5031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", {}, index);
|
|
4998
5032
|
} else {
|
|
4999
|
-
return /* @__PURE__ */ (0,
|
|
5033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "py-1 lg:py-2" }, index);
|
|
5000
5034
|
}
|
|
5001
5035
|
} else {
|
|
5002
5036
|
foundFirstBreak = false;
|
|
5003
|
-
return /* @__PURE__ */ (0,
|
|
5037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react41.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
5004
5038
|
}
|
|
5005
5039
|
}) });
|
|
5006
5040
|
};
|
|
5007
5041
|
var ListItemNode_default = ListItemNode;
|
|
5008
5042
|
|
|
5009
5043
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
5010
|
-
var
|
|
5044
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5011
5045
|
var ListNode = (props) => {
|
|
5012
5046
|
const NodeTypes2 = {
|
|
5013
5047
|
listitem: ListItemNode_default
|
|
5014
5048
|
};
|
|
5015
|
-
return /* @__PURE__ */ (0,
|
|
5016
|
-
props.node.listType == "bullet" && /* @__PURE__ */ (0,
|
|
5049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_react42.default.Fragment, { children: [
|
|
5050
|
+
props.node.listType == "bullet" && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
5017
5051
|
const SelectedNode = NodeTypes2[node.type];
|
|
5018
|
-
return /* @__PURE__ */ (0,
|
|
5052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react42.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
5019
5053
|
}) }),
|
|
5020
|
-
props.node.listType == "number" && /* @__PURE__ */ (0,
|
|
5054
|
+
props.node.listType == "number" && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
5021
5055
|
const SelectedNode = NodeTypes2[node.type];
|
|
5022
|
-
return /* @__PURE__ */ (0,
|
|
5056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react42.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
5023
5057
|
}) })
|
|
5024
5058
|
] });
|
|
5025
5059
|
};
|
|
5026
5060
|
var ListNode_default = ListNode;
|
|
5027
5061
|
|
|
5028
5062
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
5029
|
-
var
|
|
5030
|
-
var
|
|
5063
|
+
var import_react43 = __toESM(require("react"));
|
|
5064
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5031
5065
|
var QuoteNode = (props) => {
|
|
5032
5066
|
const NodeTypes2 = {
|
|
5033
5067
|
["text"]: TextNode_default,
|
|
5034
5068
|
["linebreak"]: LineBreakNode_default,
|
|
5035
5069
|
["link"]: LinkNode_default
|
|
5036
5070
|
};
|
|
5037
|
-
return /* @__PURE__ */ (0,
|
|
5071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
5038
5072
|
const SelectedNode = NodeTypes2[node.type];
|
|
5039
|
-
return /* @__PURE__ */ (0,
|
|
5073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react43.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
5040
5074
|
}) });
|
|
5041
5075
|
};
|
|
5042
5076
|
var QuoteNode_default = QuoteNode;
|
|
5043
5077
|
|
|
5044
5078
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
5045
|
-
var
|
|
5079
|
+
var import_react45 = __toESM(require("react"));
|
|
5046
5080
|
var import_dynamic7 = __toESM(require("next/dynamic"));
|
|
5047
|
-
var
|
|
5081
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5048
5082
|
var CopyButton2 = (0, import_dynamic7.default)(() => Promise.resolve().then(() => (init_CopyButton(), CopyButton_exports)), {
|
|
5049
5083
|
ssr: false,
|
|
5050
5084
|
// optional: fallback UI while loading
|
|
5051
|
-
loading: () => /* @__PURE__ */ (0,
|
|
5085
|
+
loading: () => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
5052
5086
|
});
|
|
5053
5087
|
var CodeNode = (props) => {
|
|
5054
5088
|
const NodeTypes2 = {
|
|
@@ -5062,14 +5096,14 @@ var CodeNode = (props) => {
|
|
|
5062
5096
|
if (node.type === "link") return node.text || node.url || "";
|
|
5063
5097
|
return "";
|
|
5064
5098
|
}).join("") ?? "";
|
|
5065
|
-
return /* @__PURE__ */ (0,
|
|
5066
|
-
/* @__PURE__ */ (0,
|
|
5067
|
-
/* @__PURE__ */ (0,
|
|
5068
|
-
/* @__PURE__ */ (0,
|
|
5099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { children: [
|
|
5100
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
5101
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { children: "Code Snippet" }),
|
|
5102
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(CopyButton2, { text: textContent })
|
|
5069
5103
|
] }),
|
|
5070
|
-
/* @__PURE__ */ (0,
|
|
5104
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.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) => {
|
|
5071
5105
|
const SelectedNode = NodeTypes2[node.type];
|
|
5072
|
-
return /* @__PURE__ */ (0,
|
|
5106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react45.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
5073
5107
|
SelectedNode,
|
|
5074
5108
|
{
|
|
5075
5109
|
node,
|
|
@@ -5084,15 +5118,15 @@ var CodeNode = (props) => {
|
|
|
5084
5118
|
var CodeNode_default = CodeNode;
|
|
5085
5119
|
|
|
5086
5120
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
5087
|
-
var
|
|
5121
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
5088
5122
|
var HorizontalRuleNode = () => {
|
|
5089
|
-
return /* @__PURE__ */ (0,
|
|
5123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("hr", {});
|
|
5090
5124
|
};
|
|
5091
5125
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
5092
5126
|
|
|
5093
5127
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
5094
|
-
var
|
|
5095
|
-
var
|
|
5128
|
+
var import_react46 = __toESM(require("react"));
|
|
5129
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
5096
5130
|
var WidgetNode = (props) => {
|
|
5097
5131
|
const getWidgetParameters = () => {
|
|
5098
5132
|
const widgetInputParameters = {
|
|
@@ -5156,7 +5190,7 @@ var WidgetNode = (props) => {
|
|
|
5156
5190
|
};
|
|
5157
5191
|
const widgetCode = props.node?.widgetCode;
|
|
5158
5192
|
if (!widgetCode) {
|
|
5159
|
-
return /* @__PURE__ */ (0,
|
|
5193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_jsx_runtime62.Fragment, { children: "Invalid widget" });
|
|
5160
5194
|
}
|
|
5161
5195
|
const widgetParams = getWidgetParameters();
|
|
5162
5196
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -5165,7 +5199,7 @@ var WidgetNode = (props) => {
|
|
|
5165
5199
|
}
|
|
5166
5200
|
return (
|
|
5167
5201
|
// eslint-disable-next-line react-hooks/static-components
|
|
5168
|
-
/* @__PURE__ */ (0,
|
|
5202
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react46.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5169
5203
|
WidgetRenderer,
|
|
5170
5204
|
{
|
|
5171
5205
|
params: widgetParams,
|
|
@@ -5182,11 +5216,11 @@ var WidgetNode = (props) => {
|
|
|
5182
5216
|
var WidgetNode_default = WidgetNode;
|
|
5183
5217
|
|
|
5184
5218
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
5185
|
-
var
|
|
5219
|
+
var import_react51 = __toESM(require("react"));
|
|
5186
5220
|
|
|
5187
5221
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
5188
5222
|
var import_dynamic8 = __toESM(require("next/dynamic"));
|
|
5189
|
-
var
|
|
5223
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
5190
5224
|
var IframeClient2 = (0, import_dynamic8.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
5191
5225
|
ssr: false
|
|
5192
5226
|
});
|
|
@@ -5199,7 +5233,7 @@ var EmbedNode = (props) => {
|
|
|
5199
5233
|
} else {
|
|
5200
5234
|
src = props.node.embedSrc;
|
|
5201
5235
|
}
|
|
5202
|
-
return /* @__PURE__ */ (0,
|
|
5236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "aspect-video", children: src && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(IframeClient2, { src }) });
|
|
5203
5237
|
};
|
|
5204
5238
|
var EmbedNode_default = EmbedNode;
|
|
5205
5239
|
|
|
@@ -5378,10 +5412,10 @@ var PathUtility = class {
|
|
|
5378
5412
|
var PathUtility_default = new PathUtility();
|
|
5379
5413
|
|
|
5380
5414
|
// src/components/NoDataFound.tsx
|
|
5381
|
-
var
|
|
5415
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
5382
5416
|
var NoDataFound = () => {
|
|
5383
|
-
return /* @__PURE__ */ (0,
|
|
5384
|
-
/* @__PURE__ */ (0,
|
|
5417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
5418
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "mb-5", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5385
5419
|
"svg",
|
|
5386
5420
|
{
|
|
5387
5421
|
className: "w-10 h-10",
|
|
@@ -5389,7 +5423,7 @@ var NoDataFound = () => {
|
|
|
5389
5423
|
stroke: "currentColor",
|
|
5390
5424
|
viewBox: "0 0 24 24",
|
|
5391
5425
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5392
|
-
children: /* @__PURE__ */ (0,
|
|
5426
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5393
5427
|
"path",
|
|
5394
5428
|
{
|
|
5395
5429
|
strokeLinecap: "round",
|
|
@@ -5400,8 +5434,8 @@ var NoDataFound = () => {
|
|
|
5400
5434
|
)
|
|
5401
5435
|
}
|
|
5402
5436
|
) }) }),
|
|
5403
|
-
/* @__PURE__ */ (0,
|
|
5404
|
-
/* @__PURE__ */ (0,
|
|
5437
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
5438
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
5405
5439
|
] });
|
|
5406
5440
|
};
|
|
5407
5441
|
var NoDataFound_default = NoDataFound;
|
|
@@ -5412,7 +5446,7 @@ var import_dynamic10 = __toESM(require("next/dynamic"));
|
|
|
5412
5446
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
5413
5447
|
init_AssetUtility();
|
|
5414
5448
|
var import_dynamic9 = __toESM(require("next/dynamic"));
|
|
5415
|
-
var
|
|
5449
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
5416
5450
|
var HlsPlayer4 = (0, import_dynamic9.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
5417
5451
|
var deviceToMediaQuery = (device) => {
|
|
5418
5452
|
switch (device) {
|
|
@@ -5541,8 +5575,8 @@ var ImageGalleryNode = (props) => {
|
|
|
5541
5575
|
right: "justify-end"
|
|
5542
5576
|
};
|
|
5543
5577
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
5544
|
-
return /* @__PURE__ */ (0,
|
|
5545
|
-
hlsSources.length > 0 && /* @__PURE__ */ (0,
|
|
5578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
5579
|
+
hlsSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_jsx_runtime67.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5546
5580
|
HlsPlayer4,
|
|
5547
5581
|
{
|
|
5548
5582
|
sources: hlsSources,
|
|
@@ -5557,7 +5591,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5557
5591
|
styles: hlsStyles
|
|
5558
5592
|
}
|
|
5559
5593
|
) }),
|
|
5560
|
-
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0,
|
|
5594
|
+
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_jsx_runtime67.Fragment, { children: staticFallback ? /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("picture", { children: [
|
|
5561
5595
|
DEVICE_ORDER.map((deviceKey) => {
|
|
5562
5596
|
const match = staticSources.find(
|
|
5563
5597
|
(img) => img.device === deviceKey
|
|
@@ -5569,7 +5603,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5569
5603
|
if (!srcUrl) {
|
|
5570
5604
|
return null;
|
|
5571
5605
|
}
|
|
5572
|
-
return /* @__PURE__ */ (0,
|
|
5606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5573
5607
|
"source",
|
|
5574
5608
|
{
|
|
5575
5609
|
media: deviceToMediaQuery(match.device),
|
|
@@ -5593,7 +5627,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5593
5627
|
if (img.borderRadius) {
|
|
5594
5628
|
styles.borderRadius = img.borderRadius;
|
|
5595
5629
|
}
|
|
5596
|
-
return /* @__PURE__ */ (0,
|
|
5630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5597
5631
|
"img",
|
|
5598
5632
|
{
|
|
5599
5633
|
loading: "lazy",
|
|
@@ -5608,7 +5642,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5608
5642
|
})()
|
|
5609
5643
|
] }) : (
|
|
5610
5644
|
/* Case 2: Only device-specific images exist */
|
|
5611
|
-
/* @__PURE__ */ (0,
|
|
5645
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_jsx_runtime67.Fragment, { children: staticSources.map((img, index) => {
|
|
5612
5646
|
const imageUrl = resolveImageUrl(img);
|
|
5613
5647
|
if (!imageUrl) {
|
|
5614
5648
|
return null;
|
|
@@ -5634,7 +5668,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5634
5668
|
default:
|
|
5635
5669
|
display = "block";
|
|
5636
5670
|
}
|
|
5637
|
-
return /* @__PURE__ */ (0,
|
|
5671
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5638
5672
|
"img",
|
|
5639
5673
|
{
|
|
5640
5674
|
loading: "lazy",
|
|
@@ -5775,28 +5809,28 @@ var shouldRenderContainer = (node, dataItem, session) => {
|
|
|
5775
5809
|
|
|
5776
5810
|
// src/components/pageRenderingEngine/nodes/DocumentNode.tsx
|
|
5777
5811
|
init_AssetUtility();
|
|
5778
|
-
var
|
|
5812
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
5779
5813
|
var getNestedValue5 = (obj, path) => {
|
|
5780
5814
|
if (!obj || !path) return void 0;
|
|
5781
5815
|
return path.split(".").reduce((current, key) => {
|
|
5782
5816
|
return current && current[key] !== void 0 ? current[key] : void 0;
|
|
5783
5817
|
}, obj);
|
|
5784
5818
|
};
|
|
5785
|
-
var PdfIcon = () => /* @__PURE__ */ (0,
|
|
5819
|
+
var PdfIcon = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
5786
5820
|
"svg",
|
|
5787
5821
|
{
|
|
5788
5822
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5789
5823
|
viewBox: "0 0 48 48",
|
|
5790
5824
|
className: "w-10 h-10",
|
|
5791
5825
|
children: [
|
|
5792
|
-
/* @__PURE__ */ (0,
|
|
5826
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5793
5827
|
"path",
|
|
5794
5828
|
{
|
|
5795
5829
|
fill: "#e53935",
|
|
5796
5830
|
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"
|
|
5797
5831
|
}
|
|
5798
5832
|
),
|
|
5799
|
-
/* @__PURE__ */ (0,
|
|
5833
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5800
5834
|
"path",
|
|
5801
5835
|
{
|
|
5802
5836
|
fill: "#fff",
|
|
@@ -5806,55 +5840,55 @@ var PdfIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
5806
5840
|
]
|
|
5807
5841
|
}
|
|
5808
5842
|
);
|
|
5809
|
-
var ExcelIcon = () => /* @__PURE__ */ (0,
|
|
5843
|
+
var ExcelIcon = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
5810
5844
|
"svg",
|
|
5811
5845
|
{
|
|
5812
5846
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5813
5847
|
viewBox: "0 0 48 48",
|
|
5814
5848
|
className: "w-10 h-10",
|
|
5815
5849
|
children: [
|
|
5816
|
-
/* @__PURE__ */ (0,
|
|
5850
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5817
5851
|
"path",
|
|
5818
5852
|
{
|
|
5819
5853
|
fill: "#169154",
|
|
5820
5854
|
d: "M29,6H15.744C14.781,6,14,6.781,14,7.744v7.259h15V6z"
|
|
5821
5855
|
}
|
|
5822
5856
|
),
|
|
5823
|
-
/* @__PURE__ */ (0,
|
|
5857
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5824
5858
|
"path",
|
|
5825
5859
|
{
|
|
5826
5860
|
fill: "#18482a",
|
|
5827
5861
|
d: "M14,33.054v7.202C14,41.219,14.781,42,15.743,42H29v-8.946H14z"
|
|
5828
5862
|
}
|
|
5829
5863
|
),
|
|
5830
|
-
/* @__PURE__ */ (0,
|
|
5831
|
-
/* @__PURE__ */ (0,
|
|
5832
|
-
/* @__PURE__ */ (0,
|
|
5833
|
-
/* @__PURE__ */ (0,
|
|
5864
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("path", { fill: "#0c8045", d: "M14 15.003H29V24.005000000000003H14z" }),
|
|
5865
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("path", { fill: "#17472a", d: "M14 24.005H29V33.055H14z" }),
|
|
5866
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("g", { children: [
|
|
5867
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5834
5868
|
"path",
|
|
5835
5869
|
{
|
|
5836
5870
|
fill: "#29c27f",
|
|
5837
5871
|
d: "M42.256,6H29v9.003h15V7.744C44,6.781,43.219,6,42.256,6z"
|
|
5838
5872
|
}
|
|
5839
5873
|
),
|
|
5840
|
-
/* @__PURE__ */ (0,
|
|
5874
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5841
5875
|
"path",
|
|
5842
5876
|
{
|
|
5843
5877
|
fill: "#27663f",
|
|
5844
5878
|
d: "M29,33.054V42h13.257C43.219,42,44,41.219,44,40.257v-7.202H29z"
|
|
5845
5879
|
}
|
|
5846
5880
|
),
|
|
5847
|
-
/* @__PURE__ */ (0,
|
|
5848
|
-
/* @__PURE__ */ (0,
|
|
5881
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("path", { fill: "#19ac65", d: "M29 15.003H44V24.005000000000003H29z" }),
|
|
5882
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("path", { fill: "#129652", d: "M29 24.005H44V33.055H29z" })
|
|
5849
5883
|
] }),
|
|
5850
|
-
/* @__PURE__ */ (0,
|
|
5884
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5851
5885
|
"path",
|
|
5852
5886
|
{
|
|
5853
5887
|
fill: "#0c7238",
|
|
5854
5888
|
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"
|
|
5855
5889
|
}
|
|
5856
5890
|
),
|
|
5857
|
-
/* @__PURE__ */ (0,
|
|
5891
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5858
5892
|
"path",
|
|
5859
5893
|
{
|
|
5860
5894
|
fill: "#fff",
|
|
@@ -5864,7 +5898,7 @@ var ExcelIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
5864
5898
|
]
|
|
5865
5899
|
}
|
|
5866
5900
|
);
|
|
5867
|
-
var WordIcon = () => /* @__PURE__ */ (0,
|
|
5901
|
+
var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
5868
5902
|
"svg",
|
|
5869
5903
|
{
|
|
5870
5904
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5872,14 +5906,14 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
5872
5906
|
className: "w-10 h-10",
|
|
5873
5907
|
baseProfile: "basic",
|
|
5874
5908
|
children: [
|
|
5875
|
-
/* @__PURE__ */ (0,
|
|
5909
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5876
5910
|
"path",
|
|
5877
5911
|
{
|
|
5878
5912
|
fill: "#283593",
|
|
5879
5913
|
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"
|
|
5880
5914
|
}
|
|
5881
5915
|
),
|
|
5882
|
-
/* @__PURE__ */ (0,
|
|
5916
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
5883
5917
|
"linearGradient",
|
|
5884
5918
|
{
|
|
5885
5919
|
id: "qh2LT5tehRDFkLLfb-odWa",
|
|
@@ -5890,19 +5924,19 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
5890
5924
|
gradientTransform: "translate(0 -339.89)",
|
|
5891
5925
|
gradientUnits: "userSpaceOnUse",
|
|
5892
5926
|
children: [
|
|
5893
|
-
/* @__PURE__ */ (0,
|
|
5894
|
-
/* @__PURE__ */ (0,
|
|
5927
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("stop", { offset: "0", "stop-color": "#66c0ff" }),
|
|
5928
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("stop", { offset: ".26", "stop-color": "#0094f0" })
|
|
5895
5929
|
]
|
|
5896
5930
|
}
|
|
5897
5931
|
),
|
|
5898
|
-
/* @__PURE__ */ (0,
|
|
5932
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5899
5933
|
"path",
|
|
5900
5934
|
{
|
|
5901
5935
|
fill: "url(#qh2LT5tehRDFkLLfb-odWa)",
|
|
5902
5936
|
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"
|
|
5903
5937
|
}
|
|
5904
5938
|
),
|
|
5905
|
-
/* @__PURE__ */ (0,
|
|
5939
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5906
5940
|
"path",
|
|
5907
5941
|
{
|
|
5908
5942
|
fill: "#1e88e5",
|
|
@@ -5910,21 +5944,21 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
5910
5944
|
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"
|
|
5911
5945
|
}
|
|
5912
5946
|
),
|
|
5913
|
-
/* @__PURE__ */ (0,
|
|
5947
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5914
5948
|
"path",
|
|
5915
5949
|
{
|
|
5916
5950
|
fill: "#00e5ff",
|
|
5917
5951
|
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"
|
|
5918
5952
|
}
|
|
5919
5953
|
),
|
|
5920
|
-
/* @__PURE__ */ (0,
|
|
5954
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5921
5955
|
"path",
|
|
5922
5956
|
{
|
|
5923
5957
|
fill: "#1565c0",
|
|
5924
5958
|
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"
|
|
5925
5959
|
}
|
|
5926
5960
|
),
|
|
5927
|
-
/* @__PURE__ */ (0,
|
|
5961
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5928
5962
|
"path",
|
|
5929
5963
|
{
|
|
5930
5964
|
fill: "#fff",
|
|
@@ -5934,42 +5968,42 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
5934
5968
|
]
|
|
5935
5969
|
}
|
|
5936
5970
|
);
|
|
5937
|
-
var StandardIcon = () => /* @__PURE__ */ (0,
|
|
5971
|
+
var StandardIcon = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
5938
5972
|
"svg",
|
|
5939
5973
|
{
|
|
5940
5974
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5941
5975
|
viewBox: "0 0 48 48",
|
|
5942
5976
|
className: "w-10 h-10",
|
|
5943
5977
|
children: [
|
|
5944
|
-
/* @__PURE__ */ (0,
|
|
5945
|
-
/* @__PURE__ */ (0,
|
|
5978
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
5979
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" })
|
|
5946
5980
|
]
|
|
5947
5981
|
}
|
|
5948
5982
|
);
|
|
5949
|
-
var PowerPointIcon = () => /* @__PURE__ */ (0,
|
|
5983
|
+
var PowerPointIcon = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
5950
5984
|
"svg",
|
|
5951
5985
|
{
|
|
5952
5986
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5953
5987
|
viewBox: "0 0 48 48",
|
|
5954
5988
|
className: "w-10 h-10",
|
|
5955
5989
|
children: [
|
|
5956
|
-
/* @__PURE__ */ (0,
|
|
5990
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5957
5991
|
"path",
|
|
5958
5992
|
{
|
|
5959
5993
|
fill: "#dc4c2c",
|
|
5960
5994
|
d: "M8,24c0,9.941,8.059,18,18,18s18-8.059,18-18H26H8z"
|
|
5961
5995
|
}
|
|
5962
5996
|
),
|
|
5963
|
-
/* @__PURE__ */ (0,
|
|
5964
|
-
/* @__PURE__ */ (0,
|
|
5965
|
-
/* @__PURE__ */ (0,
|
|
5997
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("path", { fill: "#f7a278", d: "M26,6v18h18C44,14.059,35.941,6,26,6z" }),
|
|
5998
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("path", { fill: "#c06346", d: "M26,6C16.059,6,8,14.059,8,24h18V6z" }),
|
|
5999
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5966
6000
|
"path",
|
|
5967
6001
|
{
|
|
5968
6002
|
fill: "#9b341f",
|
|
5969
6003
|
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"
|
|
5970
6004
|
}
|
|
5971
6005
|
),
|
|
5972
|
-
/* @__PURE__ */ (0,
|
|
6006
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5973
6007
|
"path",
|
|
5974
6008
|
{
|
|
5975
6009
|
fill: "#fff",
|
|
@@ -5979,16 +6013,16 @@ var PowerPointIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
5979
6013
|
]
|
|
5980
6014
|
}
|
|
5981
6015
|
);
|
|
5982
|
-
var TextIcon = () => /* @__PURE__ */ (0,
|
|
6016
|
+
var TextIcon = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
5983
6017
|
"svg",
|
|
5984
6018
|
{
|
|
5985
6019
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5986
6020
|
viewBox: "0 0 48 48",
|
|
5987
6021
|
className: "w-10 h-10",
|
|
5988
6022
|
children: [
|
|
5989
|
-
/* @__PURE__ */ (0,
|
|
5990
|
-
/* @__PURE__ */ (0,
|
|
5991
|
-
/* @__PURE__ */ (0,
|
|
6023
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
6024
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" }),
|
|
6025
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5992
6026
|
"path",
|
|
5993
6027
|
{
|
|
5994
6028
|
fill: "#1976D2",
|
|
@@ -5998,7 +6032,7 @@ var TextIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
5998
6032
|
]
|
|
5999
6033
|
}
|
|
6000
6034
|
);
|
|
6001
|
-
var ArchiveIcon = () => /* @__PURE__ */ (0,
|
|
6035
|
+
var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
6002
6036
|
"svg",
|
|
6003
6037
|
{
|
|
6004
6038
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6008,14 +6042,14 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
6008
6042
|
version: "1.0",
|
|
6009
6043
|
className: "w-10 h-10",
|
|
6010
6044
|
children: [
|
|
6011
|
-
/* @__PURE__ */ (0,
|
|
6045
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("clipPath", { id: "273d29c8a6", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6012
6046
|
"path",
|
|
6013
6047
|
{
|
|
6014
6048
|
d: "M 8.90625 0 L 65.90625 0 L 65.90625 75 L 8.90625 75 Z M 8.90625 0 ",
|
|
6015
6049
|
"clip-rule": "nonzero"
|
|
6016
6050
|
}
|
|
6017
6051
|
) }) }),
|
|
6018
|
-
/* @__PURE__ */ (0,
|
|
6052
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("g", { "clip-path": "url(#273d29c8a6)", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6019
6053
|
"path",
|
|
6020
6054
|
{
|
|
6021
6055
|
fill: "#ff9100",
|
|
@@ -6024,7 +6058,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
6024
6058
|
"fill-rule": "nonzero"
|
|
6025
6059
|
}
|
|
6026
6060
|
) }),
|
|
6027
|
-
/* @__PURE__ */ (0,
|
|
6061
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6028
6062
|
"path",
|
|
6029
6063
|
{
|
|
6030
6064
|
fill: "#fbe9e7",
|
|
@@ -6033,7 +6067,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
6033
6067
|
"fill-rule": "nonzero"
|
|
6034
6068
|
}
|
|
6035
6069
|
),
|
|
6036
|
-
/* @__PURE__ */ (0,
|
|
6070
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6037
6071
|
"path",
|
|
6038
6072
|
{
|
|
6039
6073
|
fill: "#ffe0b2",
|
|
@@ -6042,7 +6076,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
6042
6076
|
"fill-rule": "nonzero"
|
|
6043
6077
|
}
|
|
6044
6078
|
),
|
|
6045
|
-
/* @__PURE__ */ (0,
|
|
6079
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6046
6080
|
"path",
|
|
6047
6081
|
{
|
|
6048
6082
|
fill: "#ffe0b2",
|
|
@@ -6051,7 +6085,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
6051
6085
|
"fill-rule": "nonzero"
|
|
6052
6086
|
}
|
|
6053
6087
|
),
|
|
6054
|
-
/* @__PURE__ */ (0,
|
|
6088
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6055
6089
|
"path",
|
|
6056
6090
|
{
|
|
6057
6091
|
fill: "#ffe0b2",
|
|
@@ -6127,8 +6161,8 @@ var DocumentNode = (props) => {
|
|
|
6127
6161
|
}
|
|
6128
6162
|
}
|
|
6129
6163
|
if (documents.length === 0) {
|
|
6130
|
-
return /* @__PURE__ */ (0,
|
|
6131
|
-
/* @__PURE__ */ (0,
|
|
6164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "py-4 px-2 bg-neutral-weak border rounded text-center flex flex-col gap-2", children: [
|
|
6165
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "mx-auto w-10 h-10 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6132
6166
|
"svg",
|
|
6133
6167
|
{
|
|
6134
6168
|
className: "w-5 h-5",
|
|
@@ -6136,7 +6170,7 @@ var DocumentNode = (props) => {
|
|
|
6136
6170
|
stroke: "currentColor",
|
|
6137
6171
|
viewBox: "0 0 24 24",
|
|
6138
6172
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6139
|
-
children: /* @__PURE__ */ (0,
|
|
6173
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6140
6174
|
"path",
|
|
6141
6175
|
{
|
|
6142
6176
|
strokeLinecap: "round",
|
|
@@ -6147,11 +6181,11 @@ var DocumentNode = (props) => {
|
|
|
6147
6181
|
)
|
|
6148
6182
|
}
|
|
6149
6183
|
) }),
|
|
6150
|
-
/* @__PURE__ */ (0,
|
|
6151
|
-
/* @__PURE__ */ (0,
|
|
6184
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "text-sm font-medium", children: "No documents found" }),
|
|
6185
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "text-xs", children: "No records found. Data may be empty or not available at the moment." })
|
|
6152
6186
|
] }) });
|
|
6153
6187
|
}
|
|
6154
|
-
return /* @__PURE__ */ (0,
|
|
6188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "", children: documents.map((doc, index) => {
|
|
6155
6189
|
const documentUrl = AssetUtility_default.resolveUrl(
|
|
6156
6190
|
props.assetBaseUrl,
|
|
6157
6191
|
doc.assetUrl
|
|
@@ -6169,16 +6203,16 @@ var DocumentNode = (props) => {
|
|
|
6169
6203
|
}
|
|
6170
6204
|
}
|
|
6171
6205
|
const { Icon: Icon2, extLabel } = getFileDetails(documentUrl);
|
|
6172
|
-
return /* @__PURE__ */ (0,
|
|
6206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
6173
6207
|
"div",
|
|
6174
6208
|
{
|
|
6175
6209
|
className: `flex items-center justify-between py-4 bg-default gap-4 ${index !== 0 ? "border-t" : ""}`,
|
|
6176
6210
|
children: [
|
|
6177
|
-
/* @__PURE__ */ (0,
|
|
6178
|
-
/* @__PURE__ */ (0,
|
|
6179
|
-
/* @__PURE__ */ (0,
|
|
6211
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex items-center space-x-4", children: [
|
|
6212
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "flex items-center justify-center p-2 rounded bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Icon2, {}) }),
|
|
6213
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "flex items-baseline space-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("h4", { className: "text-base font-semibold", children: documentTitle }) })
|
|
6180
6214
|
] }),
|
|
6181
|
-
/* @__PURE__ */ (0,
|
|
6215
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
6182
6216
|
"a",
|
|
6183
6217
|
{
|
|
6184
6218
|
href: documentUrl,
|
|
@@ -6186,7 +6220,7 @@ var DocumentNode = (props) => {
|
|
|
6186
6220
|
rel: "noopener noreferrer",
|
|
6187
6221
|
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",
|
|
6188
6222
|
children: [
|
|
6189
|
-
/* @__PURE__ */ (0,
|
|
6223
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
6190
6224
|
"svg",
|
|
6191
6225
|
{
|
|
6192
6226
|
className: "w-4 h-4 mr-2",
|
|
@@ -6194,7 +6228,7 @@ var DocumentNode = (props) => {
|
|
|
6194
6228
|
stroke: "currentColor",
|
|
6195
6229
|
viewBox: "0 0 24 24",
|
|
6196
6230
|
children: [
|
|
6197
|
-
/* @__PURE__ */ (0,
|
|
6231
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6198
6232
|
"path",
|
|
6199
6233
|
{
|
|
6200
6234
|
strokeLinecap: "round",
|
|
@@ -6203,7 +6237,7 @@ var DocumentNode = (props) => {
|
|
|
6203
6237
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
|
6204
6238
|
}
|
|
6205
6239
|
),
|
|
6206
|
-
/* @__PURE__ */ (0,
|
|
6240
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6207
6241
|
"path",
|
|
6208
6242
|
{
|
|
6209
6243
|
strokeLinecap: "round",
|
|
@@ -6228,7 +6262,7 @@ var DocumentNode = (props) => {
|
|
|
6228
6262
|
var DocumentNode_default = DocumentNode;
|
|
6229
6263
|
|
|
6230
6264
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
6231
|
-
var
|
|
6265
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
6232
6266
|
var Pagination2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_Pagination(), Pagination_exports)), { ssr: true });
|
|
6233
6267
|
var Slider2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_Slider(), Slider_exports)), {
|
|
6234
6268
|
ssr: false
|
|
@@ -6482,7 +6516,7 @@ var DivContainer = async (props) => {
|
|
|
6482
6516
|
response = await serviceClient.get(endpoint);
|
|
6483
6517
|
result = response?.result;
|
|
6484
6518
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
6485
|
-
return /* @__PURE__ */ (0,
|
|
6519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(NoDataFound_default, {});
|
|
6486
6520
|
}
|
|
6487
6521
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
6488
6522
|
childCollectionData = getNestedValue6(
|
|
@@ -6502,7 +6536,7 @@ var DivContainer = async (props) => {
|
|
|
6502
6536
|
}
|
|
6503
6537
|
const SelectedNode = NodeTypes2[node.type];
|
|
6504
6538
|
if (!SelectedNode) return null;
|
|
6505
|
-
return /* @__PURE__ */ (0,
|
|
6539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react51.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
6506
6540
|
SelectedNode,
|
|
6507
6541
|
{
|
|
6508
6542
|
node,
|
|
@@ -6606,7 +6640,7 @@ var DivContainer = async (props) => {
|
|
|
6606
6640
|
noLinkColor = true;
|
|
6607
6641
|
wrapperProps = {
|
|
6608
6642
|
href,
|
|
6609
|
-
"data-
|
|
6643
|
+
"data-isselected": isSelected,
|
|
6610
6644
|
"data-path": currentPath,
|
|
6611
6645
|
"data-href": resolvedHref
|
|
6612
6646
|
};
|
|
@@ -6634,14 +6668,14 @@ var DivContainer = async (props) => {
|
|
|
6634
6668
|
props.node.bgClass,
|
|
6635
6669
|
noLinkColor && "no-link-color"
|
|
6636
6670
|
].filter(Boolean).join(" ");
|
|
6637
|
-
return /* @__PURE__ */ (0,
|
|
6638
|
-
/* @__PURE__ */ (0,
|
|
6671
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_react51.default.Fragment, { children: [
|
|
6672
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
6639
6673
|
"style",
|
|
6640
6674
|
{
|
|
6641
6675
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
6642
6676
|
}
|
|
6643
6677
|
),
|
|
6644
|
-
/* @__PURE__ */ (0,
|
|
6678
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react51.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
6645
6679
|
Wrapper,
|
|
6646
6680
|
{
|
|
6647
6681
|
id: guid,
|
|
@@ -6655,11 +6689,11 @@ var DivContainer = async (props) => {
|
|
|
6655
6689
|
item,
|
|
6656
6690
|
idx,
|
|
6657
6691
|
props.href ? void 0 : item?.links?.view
|
|
6658
|
-
)?.map((child, i) => /* @__PURE__ */ (0,
|
|
6692
|
+
)?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react51.default.Fragment, { children: child }, i)) : renderChildren(props.node.children, props, item, idx)
|
|
6659
6693
|
)
|
|
6660
6694
|
}
|
|
6661
6695
|
) }),
|
|
6662
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0,
|
|
6696
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
6663
6697
|
Pagination2,
|
|
6664
6698
|
{
|
|
6665
6699
|
path: props.path,
|
|
@@ -6672,7 +6706,7 @@ var DivContainer = async (props) => {
|
|
|
6672
6706
|
var DivContainer_default = DivContainer;
|
|
6673
6707
|
|
|
6674
6708
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
6675
|
-
var
|
|
6709
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
6676
6710
|
var NodeTypes = {
|
|
6677
6711
|
["paragraph"]: ParagraphNode_default,
|
|
6678
6712
|
["heading"]: HeadingNode_default,
|
|
@@ -6709,14 +6743,14 @@ var PageBodyRenderer = (props) => {
|
|
|
6709
6743
|
}
|
|
6710
6744
|
return true;
|
|
6711
6745
|
};
|
|
6712
|
-
return /* @__PURE__ */ (0,
|
|
6746
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react52.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
6713
6747
|
{
|
|
6714
6748
|
}
|
|
6715
6749
|
const SelectedNode = NodeTypes[node.type];
|
|
6716
6750
|
if (!shouldRenderNode(node)) {
|
|
6717
6751
|
return null;
|
|
6718
6752
|
}
|
|
6719
|
-
return /* @__PURE__ */ (0,
|
|
6753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react52.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react52.default.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react52.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6720
6754
|
SelectedNode,
|
|
6721
6755
|
{
|
|
6722
6756
|
node,
|
|
@@ -6732,7 +6766,7 @@ var PageBodyRenderer = (props) => {
|
|
|
6732
6766
|
device: props.device,
|
|
6733
6767
|
widgetRenderer: props.widgetRenderer
|
|
6734
6768
|
}
|
|
6735
|
-
) }) : /* @__PURE__ */ (0,
|
|
6769
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react52.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6736
6770
|
SelectedNode,
|
|
6737
6771
|
{
|
|
6738
6772
|
node,
|
|
@@ -6753,13 +6787,13 @@ var PageBodyRenderer = (props) => {
|
|
|
6753
6787
|
var PageBodyRenderer_default = PageBodyRenderer;
|
|
6754
6788
|
|
|
6755
6789
|
// src/components/Toast.tsx
|
|
6756
|
-
var
|
|
6790
|
+
var import_react53 = require("react");
|
|
6757
6791
|
init_ToastService();
|
|
6758
|
-
var
|
|
6792
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
6759
6793
|
var Toast = () => {
|
|
6760
|
-
const [showToast, setShowToast] = (0,
|
|
6761
|
-
const [message, setMessage] = (0,
|
|
6762
|
-
const [messageType, setMessageType] = (0,
|
|
6794
|
+
const [showToast, setShowToast] = (0, import_react53.useState)(false);
|
|
6795
|
+
const [message, setMessage] = (0, import_react53.useState)("");
|
|
6796
|
+
const [messageType, setMessageType] = (0, import_react53.useState)("error");
|
|
6763
6797
|
ToastService_default.showError = function(message2) {
|
|
6764
6798
|
setShowToast(true);
|
|
6765
6799
|
setMessage(message2);
|
|
@@ -6798,8 +6832,8 @@ var Toast = () => {
|
|
|
6798
6832
|
const closeToast = () => {
|
|
6799
6833
|
setShowToast(false);
|
|
6800
6834
|
};
|
|
6801
|
-
return /* @__PURE__ */ (0,
|
|
6802
|
-
/* @__PURE__ */ (0,
|
|
6835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_jsx_runtime73.Fragment, { children: showToast && /* @__PURE__ */ (0, import_jsx_runtime73.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_runtime73.jsxs)("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
6836
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6803
6837
|
"span",
|
|
6804
6838
|
{
|
|
6805
6839
|
className: "font-medium text-inherit text-sm",
|
|
@@ -6807,7 +6841,7 @@ var Toast = () => {
|
|
|
6807
6841
|
children: message
|
|
6808
6842
|
}
|
|
6809
6843
|
),
|
|
6810
|
-
/* @__PURE__ */ (0,
|
|
6844
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6811
6845
|
"svg",
|
|
6812
6846
|
{
|
|
6813
6847
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6815,7 +6849,7 @@ var Toast = () => {
|
|
|
6815
6849
|
fill: "none",
|
|
6816
6850
|
viewBox: "0 0 24 24",
|
|
6817
6851
|
stroke: "currentColor",
|
|
6818
|
-
children: /* @__PURE__ */ (0,
|
|
6852
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
6819
6853
|
}
|
|
6820
6854
|
) })
|
|
6821
6855
|
] }) }) });
|
|
@@ -6842,7 +6876,7 @@ init_TimeInput();
|
|
|
6842
6876
|
// src/components/NavigationTabsV2.tsx
|
|
6843
6877
|
var import_link3 = __toESM(require("next/link"));
|
|
6844
6878
|
var import_navigation = require("next/navigation");
|
|
6845
|
-
var
|
|
6879
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
6846
6880
|
function resolveRoutePlaceholders(route, params) {
|
|
6847
6881
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
6848
6882
|
const value = params[key];
|
|
@@ -6867,8 +6901,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
6867
6901
|
isActive: tab.isActive
|
|
6868
6902
|
})) || [];
|
|
6869
6903
|
if (mappedTabs.length === 0) return null;
|
|
6870
|
-
return /* @__PURE__ */ (0,
|
|
6871
|
-
return /* @__PURE__ */ (0,
|
|
6904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
6905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_link3.default, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6872
6906
|
"div",
|
|
6873
6907
|
{
|
|
6874
6908
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -6881,14 +6915,14 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
6881
6915
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
6882
6916
|
|
|
6883
6917
|
// src/components/dataForm/DataList.tsx
|
|
6884
|
-
var
|
|
6918
|
+
var import_react56 = __toESM(require("react"));
|
|
6885
6919
|
var import_navigation2 = require("next/navigation");
|
|
6886
6920
|
|
|
6887
6921
|
// src/components/dataForm/NoContentView.tsx
|
|
6888
|
-
var
|
|
6889
|
-
var
|
|
6922
|
+
var import_react54 = __toESM(require("react"));
|
|
6923
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
6890
6924
|
var NoContentView = (props) => {
|
|
6891
|
-
return /* @__PURE__ */ (0,
|
|
6925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react54.default.Fragment, { children: props.isDataFound === false && props.children });
|
|
6892
6926
|
};
|
|
6893
6927
|
var NoContentView_default = NoContentView;
|
|
6894
6928
|
|
|
@@ -6896,39 +6930,39 @@ var NoContentView_default = NoContentView;
|
|
|
6896
6930
|
init_InputControlType();
|
|
6897
6931
|
|
|
6898
6932
|
// src/components/dataForm/ContentView.tsx
|
|
6899
|
-
var
|
|
6900
|
-
var
|
|
6933
|
+
var import_react55 = __toESM(require("react"));
|
|
6934
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
6901
6935
|
var ContentView = (props) => {
|
|
6902
|
-
return /* @__PURE__ */ (0,
|
|
6903
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
6904
|
-
/* @__PURE__ */ (0,
|
|
6905
|
-
/* @__PURE__ */ (0,
|
|
6906
|
-
/* @__PURE__ */ (0,
|
|
6907
|
-
/* @__PURE__ */ (0,
|
|
6908
|
-
/* @__PURE__ */ (0,
|
|
6936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_react55.default.Fragment, { children: [
|
|
6937
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
6938
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
6939
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
6940
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "ml-2", children: [
|
|
6941
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
6942
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
6909
6943
|
] })
|
|
6910
6944
|
] }),
|
|
6911
|
-
/* @__PURE__ */ (0,
|
|
6912
|
-
/* @__PURE__ */ (0,
|
|
6913
|
-
/* @__PURE__ */ (0,
|
|
6914
|
-
/* @__PURE__ */ (0,
|
|
6915
|
-
/* @__PURE__ */ (0,
|
|
6916
|
-
/* @__PURE__ */ (0,
|
|
6917
|
-
/* @__PURE__ */ (0,
|
|
6945
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
6946
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "animate-pulse", children: [
|
|
6947
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
6948
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
6949
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
6950
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
6951
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
6918
6952
|
] }),
|
|
6919
|
-
/* @__PURE__ */ (0,
|
|
6920
|
-
/* @__PURE__ */ (0,
|
|
6921
|
-
/* @__PURE__ */ (0,
|
|
6922
|
-
/* @__PURE__ */ (0,
|
|
6923
|
-
/* @__PURE__ */ (0,
|
|
6924
|
-
/* @__PURE__ */ (0,
|
|
6953
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "animate-pulse", children: [
|
|
6954
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
6955
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
6956
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
6957
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
6958
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
6925
6959
|
] }),
|
|
6926
|
-
/* @__PURE__ */ (0,
|
|
6927
|
-
/* @__PURE__ */ (0,
|
|
6928
|
-
/* @__PURE__ */ (0,
|
|
6929
|
-
/* @__PURE__ */ (0,
|
|
6930
|
-
/* @__PURE__ */ (0,
|
|
6931
|
-
/* @__PURE__ */ (0,
|
|
6960
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "animate-pulse", children: [
|
|
6961
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
6962
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
6963
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
6964
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
6965
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
6932
6966
|
] })
|
|
6933
6967
|
] })
|
|
6934
6968
|
] }) }),
|
|
@@ -6988,7 +7022,7 @@ function FormReducer(state, action) {
|
|
|
6988
7022
|
var FormReducer_default = FormReducer;
|
|
6989
7023
|
|
|
6990
7024
|
// src/components/dataForm/DataList.tsx
|
|
6991
|
-
var
|
|
7025
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
6992
7026
|
var DataList = (props) => {
|
|
6993
7027
|
const router = (0, import_navigation2.useRouter)();
|
|
6994
7028
|
let builder = new OdataBuilder(props.path);
|
|
@@ -6996,9 +7030,9 @@ var DataList = (props) => {
|
|
|
6996
7030
|
let activePageNumber = 0;
|
|
6997
7031
|
let pages = 0;
|
|
6998
7032
|
console.log(props.addLinkText);
|
|
6999
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
7000
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
7001
|
-
(0,
|
|
7033
|
+
const [isDataFound, setIsDataFound] = (0, import_react56.useState)(null);
|
|
7034
|
+
const [searchTerm, setSearchTerm] = (0, import_react56.useState)(props.query?.searchTerm ?? "");
|
|
7035
|
+
(0, import_react56.useEffect)(() => {
|
|
7002
7036
|
if (props?.dataset) {
|
|
7003
7037
|
if (props?.dataset.result && props.dataset.result.length > 0) {
|
|
7004
7038
|
setIsDataFound(true);
|
|
@@ -7007,7 +7041,7 @@ var DataList = (props) => {
|
|
|
7007
7041
|
}
|
|
7008
7042
|
}
|
|
7009
7043
|
}, [props.dataset]);
|
|
7010
|
-
(0,
|
|
7044
|
+
(0, import_react56.useEffect)(() => {
|
|
7011
7045
|
if (!props.query?.["$filter"] || !props.filters) return;
|
|
7012
7046
|
const filterQuery = props.query["$filter"];
|
|
7013
7047
|
props.filters.forEach((filter) => {
|
|
@@ -7026,7 +7060,7 @@ var DataList = (props) => {
|
|
|
7026
7060
|
if (path.includes(".")) {
|
|
7027
7061
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
7028
7062
|
} else if (Array.isArray(obj[path])) {
|
|
7029
|
-
return obj[path].map((item, index) => /* @__PURE__ */ (0,
|
|
7063
|
+
return obj[path].map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { children: item }, index));
|
|
7030
7064
|
} else {
|
|
7031
7065
|
return obj[path];
|
|
7032
7066
|
}
|
|
@@ -7035,11 +7069,11 @@ var DataList = (props) => {
|
|
|
7035
7069
|
inputValues: {},
|
|
7036
7070
|
lastPropertyChanged: ""
|
|
7037
7071
|
};
|
|
7038
|
-
const [formState, dispatch] = (0,
|
|
7072
|
+
const [formState, dispatch] = (0, import_react56.useReducer)(FormReducer_default, initialState);
|
|
7039
7073
|
const getSearchableColumns = () => {
|
|
7040
7074
|
return props.columns?.filter((c) => c.isSearchable)?.map((c) => c.name)?.join(",");
|
|
7041
7075
|
};
|
|
7042
|
-
const handleFilterChange = (0,
|
|
7076
|
+
const handleFilterChange = (0, import_react56.useCallback)(
|
|
7043
7077
|
(updatedValues) => {
|
|
7044
7078
|
dispatch({
|
|
7045
7079
|
type: FORM_INPUT_UPDATE,
|
|
@@ -7070,7 +7104,7 @@ var DataList = (props) => {
|
|
|
7070
7104
|
},
|
|
7071
7105
|
[dispatch, props, router]
|
|
7072
7106
|
);
|
|
7073
|
-
(0,
|
|
7107
|
+
(0, import_react56.useEffect)(() => {
|
|
7074
7108
|
if (!props.columns.some((col) => col.isSearchable)) {
|
|
7075
7109
|
return;
|
|
7076
7110
|
}
|
|
@@ -7105,30 +7139,30 @@ var DataList = (props) => {
|
|
|
7105
7139
|
const renderPageNumbers = () => {
|
|
7106
7140
|
if (pages <= 10) {
|
|
7107
7141
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
7108
|
-
(page) => /* @__PURE__ */ (0,
|
|
7142
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react56.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7109
7143
|
Hyperlink,
|
|
7110
7144
|
{
|
|
7111
7145
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7112
7146
|
href: builder.getNewPageUrl(page),
|
|
7113
7147
|
children: page
|
|
7114
7148
|
}
|
|
7115
|
-
) : /* @__PURE__ */ (0,
|
|
7149
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
7116
7150
|
);
|
|
7117
7151
|
} else {
|
|
7118
7152
|
const showFirstPages = activePageNumber <= 5;
|
|
7119
7153
|
const showLastPages = activePageNumber > pages - 5;
|
|
7120
7154
|
if (showFirstPages) {
|
|
7121
|
-
return /* @__PURE__ */ (0,
|
|
7122
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0,
|
|
7155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
7156
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react56.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7123
7157
|
Hyperlink,
|
|
7124
7158
|
{
|
|
7125
7159
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7126
7160
|
href: builder.getNewPageUrl(page),
|
|
7127
7161
|
children: page
|
|
7128
7162
|
}
|
|
7129
|
-
) : /* @__PURE__ */ (0,
|
|
7130
|
-
/* @__PURE__ */ (0,
|
|
7131
|
-
/* @__PURE__ */ (0,
|
|
7163
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
7164
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7165
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7132
7166
|
Hyperlink,
|
|
7133
7167
|
{
|
|
7134
7168
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7136,7 +7170,7 @@ var DataList = (props) => {
|
|
|
7136
7170
|
children: pages - 1
|
|
7137
7171
|
}
|
|
7138
7172
|
),
|
|
7139
|
-
/* @__PURE__ */ (0,
|
|
7173
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7140
7174
|
Hyperlink,
|
|
7141
7175
|
{
|
|
7142
7176
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7144,7 +7178,7 @@ var DataList = (props) => {
|
|
|
7144
7178
|
children: pages
|
|
7145
7179
|
}
|
|
7146
7180
|
),
|
|
7147
|
-
/* @__PURE__ */ (0,
|
|
7181
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
7148
7182
|
"select",
|
|
7149
7183
|
{
|
|
7150
7184
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -7156,18 +7190,18 @@ var DataList = (props) => {
|
|
|
7156
7190
|
}
|
|
7157
7191
|
},
|
|
7158
7192
|
children: [
|
|
7159
|
-
/* @__PURE__ */ (0,
|
|
7193
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("option", { className: "", value: "", children: "Jump to" }),
|
|
7160
7194
|
Array.from(
|
|
7161
7195
|
{ length: Math.max(0, pages - 10) },
|
|
7162
7196
|
(_, index) => index + 9
|
|
7163
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
7197
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("option", { value: page, children: page }, page))
|
|
7164
7198
|
]
|
|
7165
7199
|
}
|
|
7166
7200
|
) })
|
|
7167
7201
|
] });
|
|
7168
7202
|
} else if (showLastPages) {
|
|
7169
|
-
return /* @__PURE__ */ (0,
|
|
7170
|
-
/* @__PURE__ */ (0,
|
|
7203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
7204
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7171
7205
|
Hyperlink,
|
|
7172
7206
|
{
|
|
7173
7207
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7175,7 +7209,7 @@ var DataList = (props) => {
|
|
|
7175
7209
|
children: "1"
|
|
7176
7210
|
}
|
|
7177
7211
|
),
|
|
7178
|
-
/* @__PURE__ */ (0,
|
|
7212
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7179
7213
|
Hyperlink,
|
|
7180
7214
|
{
|
|
7181
7215
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7183,21 +7217,21 @@ var DataList = (props) => {
|
|
|
7183
7217
|
children: "2"
|
|
7184
7218
|
}
|
|
7185
7219
|
),
|
|
7186
|
-
/* @__PURE__ */ (0,
|
|
7220
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7187
7221
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
7188
|
-
(page) => /* @__PURE__ */ (0,
|
|
7222
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react56.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7189
7223
|
Hyperlink,
|
|
7190
7224
|
{
|
|
7191
7225
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7192
7226
|
href: builder.getNewPageUrl(page),
|
|
7193
7227
|
children: page
|
|
7194
7228
|
}
|
|
7195
|
-
) : /* @__PURE__ */ (0,
|
|
7229
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
7196
7230
|
)
|
|
7197
7231
|
] });
|
|
7198
7232
|
} else {
|
|
7199
|
-
return /* @__PURE__ */ (0,
|
|
7200
|
-
/* @__PURE__ */ (0,
|
|
7233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
7234
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7201
7235
|
Hyperlink,
|
|
7202
7236
|
{
|
|
7203
7237
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7205,7 +7239,7 @@ var DataList = (props) => {
|
|
|
7205
7239
|
children: "1"
|
|
7206
7240
|
}
|
|
7207
7241
|
),
|
|
7208
|
-
/* @__PURE__ */ (0,
|
|
7242
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7209
7243
|
Hyperlink,
|
|
7210
7244
|
{
|
|
7211
7245
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7213,20 +7247,20 @@ var DataList = (props) => {
|
|
|
7213
7247
|
children: "2"
|
|
7214
7248
|
}
|
|
7215
7249
|
),
|
|
7216
|
-
/* @__PURE__ */ (0,
|
|
7250
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7217
7251
|
Array.from(
|
|
7218
7252
|
{ length: 5 },
|
|
7219
7253
|
(_, index) => activePageNumber - 2 + index
|
|
7220
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
7254
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react56.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7221
7255
|
Hyperlink,
|
|
7222
7256
|
{
|
|
7223
7257
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7224
7258
|
href: builder.getNewPageUrl(page),
|
|
7225
7259
|
children: page
|
|
7226
7260
|
}
|
|
7227
|
-
) : /* @__PURE__ */ (0,
|
|
7228
|
-
/* @__PURE__ */ (0,
|
|
7229
|
-
/* @__PURE__ */ (0,
|
|
7261
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
7262
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7263
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7230
7264
|
Hyperlink,
|
|
7231
7265
|
{
|
|
7232
7266
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7234,7 +7268,7 @@ var DataList = (props) => {
|
|
|
7234
7268
|
children: pages - 1
|
|
7235
7269
|
}
|
|
7236
7270
|
),
|
|
7237
|
-
/* @__PURE__ */ (0,
|
|
7271
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7238
7272
|
Hyperlink,
|
|
7239
7273
|
{
|
|
7240
7274
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7242,7 +7276,7 @@ var DataList = (props) => {
|
|
|
7242
7276
|
children: pages
|
|
7243
7277
|
}
|
|
7244
7278
|
),
|
|
7245
|
-
/* @__PURE__ */ (0,
|
|
7279
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
7246
7280
|
"select",
|
|
7247
7281
|
{
|
|
7248
7282
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -7254,8 +7288,8 @@ var DataList = (props) => {
|
|
|
7254
7288
|
}
|
|
7255
7289
|
},
|
|
7256
7290
|
children: [
|
|
7257
|
-
/* @__PURE__ */ (0,
|
|
7258
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0,
|
|
7291
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("option", { value: "", children: "Jump to" }),
|
|
7292
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("option", { value: page, children: page }, page))
|
|
7259
7293
|
]
|
|
7260
7294
|
}
|
|
7261
7295
|
) })
|
|
@@ -7263,16 +7297,16 @@ var DataList = (props) => {
|
|
|
7263
7297
|
}
|
|
7264
7298
|
}
|
|
7265
7299
|
};
|
|
7266
|
-
return /* @__PURE__ */ (0,
|
|
7267
|
-
/* @__PURE__ */ (0,
|
|
7268
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
7300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_react56.default.Fragment, { children: [
|
|
7301
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(ContentView_default, { isDataFound, children: [
|
|
7302
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
7269
7303
|
"div",
|
|
7270
7304
|
{
|
|
7271
7305
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md sticky top-0`,
|
|
7272
7306
|
children: [
|
|
7273
|
-
props.title ? /* @__PURE__ */ (0,
|
|
7274
|
-
/* @__PURE__ */ (0,
|
|
7275
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
7307
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", {}),
|
|
7308
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
7309
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7276
7310
|
InputControl_default,
|
|
7277
7311
|
{
|
|
7278
7312
|
name: "Search_input",
|
|
@@ -7284,7 +7318,7 @@ var DataList = (props) => {
|
|
|
7284
7318
|
}
|
|
7285
7319
|
}
|
|
7286
7320
|
),
|
|
7287
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
7321
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7288
7322
|
InputControl_default,
|
|
7289
7323
|
{
|
|
7290
7324
|
name: filter.name,
|
|
@@ -7299,15 +7333,15 @@ var DataList = (props) => {
|
|
|
7299
7333
|
},
|
|
7300
7334
|
filter.name
|
|
7301
7335
|
)),
|
|
7302
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
7336
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
7303
7337
|
Hyperlink,
|
|
7304
7338
|
{
|
|
7305
7339
|
className: "gap-1",
|
|
7306
7340
|
linkType: "Primary" /* Solid */,
|
|
7307
7341
|
href: props.addLinkHref,
|
|
7308
7342
|
children: [
|
|
7309
|
-
/* @__PURE__ */ (0,
|
|
7310
|
-
/* @__PURE__ */ (0,
|
|
7343
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
7344
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
7311
7345
|
]
|
|
7312
7346
|
}
|
|
7313
7347
|
)
|
|
@@ -7315,8 +7349,8 @@ var DataList = (props) => {
|
|
|
7315
7349
|
]
|
|
7316
7350
|
}
|
|
7317
7351
|
),
|
|
7318
|
-
/* @__PURE__ */ (0,
|
|
7319
|
-
/* @__PURE__ */ (0,
|
|
7352
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
7353
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
7320
7354
|
let url = builder.getNewOrderByUrl(column.name);
|
|
7321
7355
|
let icon = "chevronUpDown";
|
|
7322
7356
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -7326,18 +7360,18 @@ var DataList = (props) => {
|
|
|
7326
7360
|
icon = "chevronUp";
|
|
7327
7361
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
7328
7362
|
}
|
|
7329
|
-
return /* @__PURE__ */ (0,
|
|
7363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7330
7364
|
"th",
|
|
7331
7365
|
{
|
|
7332
7366
|
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" : ""),
|
|
7333
|
-
children: /* @__PURE__ */ (0,
|
|
7367
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7334
7368
|
Hyperlink,
|
|
7335
7369
|
{
|
|
7336
7370
|
href: column.enableSorting ? url : void 0,
|
|
7337
7371
|
className: "!text-neutral-contrast ",
|
|
7338
|
-
children: /* @__PURE__ */ (0,
|
|
7339
|
-
/* @__PURE__ */ (0,
|
|
7340
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
7372
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
7373
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "text-black", children: column.label }),
|
|
7374
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
7341
7375
|
] })
|
|
7342
7376
|
}
|
|
7343
7377
|
)
|
|
@@ -7345,24 +7379,24 @@ var DataList = (props) => {
|
|
|
7345
7379
|
column.name
|
|
7346
7380
|
);
|
|
7347
7381
|
}) }) }),
|
|
7348
|
-
/* @__PURE__ */ (0,
|
|
7382
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
7349
7383
|
let validityClass = "";
|
|
7350
7384
|
console.log("dataitem", dataitem);
|
|
7351
7385
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
7352
7386
|
validityClass = "bg-alert-200";
|
|
7353
7387
|
}
|
|
7354
|
-
return /* @__PURE__ */ (0,
|
|
7388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
7355
7389
|
console.log("column", column);
|
|
7356
|
-
return /* @__PURE__ */ (0,
|
|
7390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react56.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7357
7391
|
"td",
|
|
7358
7392
|
{
|
|
7359
7393
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
7360
|
-
children: column.addhref === true ? /* @__PURE__ */ (0,
|
|
7394
|
+
children: column.addhref === true ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7361
7395
|
Hyperlink,
|
|
7362
7396
|
{
|
|
7363
7397
|
className: "",
|
|
7364
7398
|
href: `https://${dataitem[column.name]}`,
|
|
7365
|
-
children: /* @__PURE__ */ (0,
|
|
7399
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7366
7400
|
ViewControl_default,
|
|
7367
7401
|
{
|
|
7368
7402
|
controlType: column.controlType,
|
|
@@ -7375,11 +7409,11 @@ var DataList = (props) => {
|
|
|
7375
7409
|
}
|
|
7376
7410
|
)
|
|
7377
7411
|
}
|
|
7378
|
-
) : column.showAsLink ? /* @__PURE__ */ (0,
|
|
7412
|
+
) : column.showAsLink ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7379
7413
|
Hyperlink,
|
|
7380
7414
|
{
|
|
7381
7415
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
7382
|
-
children: /* @__PURE__ */ (0,
|
|
7416
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7383
7417
|
ViewControl_default,
|
|
7384
7418
|
{
|
|
7385
7419
|
controlType: column.controlType,
|
|
@@ -7389,7 +7423,7 @@ var DataList = (props) => {
|
|
|
7389
7423
|
}
|
|
7390
7424
|
)
|
|
7391
7425
|
}
|
|
7392
|
-
) : /* @__PURE__ */ (0,
|
|
7426
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7393
7427
|
ViewControl_default,
|
|
7394
7428
|
{
|
|
7395
7429
|
controlType: column.controlType,
|
|
@@ -7403,10 +7437,10 @@ var DataList = (props) => {
|
|
|
7403
7437
|
}) }, index);
|
|
7404
7438
|
}) })
|
|
7405
7439
|
] }) }),
|
|
7406
|
-
/* @__PURE__ */ (0,
|
|
7407
|
-
/* @__PURE__ */ (0,
|
|
7408
|
-
/* @__PURE__ */ (0,
|
|
7409
|
-
activePageNumber > 1 && /* @__PURE__ */ (0,
|
|
7440
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
7441
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "text-gray-700", children: label }),
|
|
7442
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex space-x-2 items-center", children: [
|
|
7443
|
+
activePageNumber > 1 && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7410
7444
|
Hyperlink,
|
|
7411
7445
|
{
|
|
7412
7446
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -7414,9 +7448,9 @@ var DataList = (props) => {
|
|
|
7414
7448
|
children: "Prev"
|
|
7415
7449
|
}
|
|
7416
7450
|
),
|
|
7417
|
-
activePageNumber <= 1 && /* @__PURE__ */ (0,
|
|
7451
|
+
activePageNumber <= 1 && /* @__PURE__ */ (0, import_jsx_runtime77.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" }),
|
|
7418
7452
|
renderPageNumbers(),
|
|
7419
|
-
activePageNumber < pages && /* @__PURE__ */ (0,
|
|
7453
|
+
activePageNumber < pages && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7420
7454
|
Hyperlink,
|
|
7421
7455
|
{
|
|
7422
7456
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -7424,19 +7458,19 @@ var DataList = (props) => {
|
|
|
7424
7458
|
children: "Next"
|
|
7425
7459
|
}
|
|
7426
7460
|
),
|
|
7427
|
-
activePageNumber >= pages && /* @__PURE__ */ (0,
|
|
7461
|
+
activePageNumber >= pages && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
7428
7462
|
] })
|
|
7429
7463
|
] }) })
|
|
7430
7464
|
] }),
|
|
7431
|
-
/* @__PURE__ */ (0,
|
|
7432
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
7465
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(NoContentView_default, { isDataFound, children: [
|
|
7466
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
7433
7467
|
"div",
|
|
7434
7468
|
{
|
|
7435
7469
|
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`,
|
|
7436
7470
|
children: [
|
|
7437
|
-
props.title ? /* @__PURE__ */ (0,
|
|
7438
|
-
/* @__PURE__ */ (0,
|
|
7439
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
7471
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", {}),
|
|
7472
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
7473
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7440
7474
|
InputControl_default,
|
|
7441
7475
|
{
|
|
7442
7476
|
name: "Search_input",
|
|
@@ -7448,7 +7482,7 @@ var DataList = (props) => {
|
|
|
7448
7482
|
}
|
|
7449
7483
|
}
|
|
7450
7484
|
),
|
|
7451
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
7485
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7452
7486
|
InputControl_default,
|
|
7453
7487
|
{
|
|
7454
7488
|
name: filter.name,
|
|
@@ -7463,15 +7497,15 @@ var DataList = (props) => {
|
|
|
7463
7497
|
},
|
|
7464
7498
|
filter.name
|
|
7465
7499
|
)),
|
|
7466
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
7500
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
7467
7501
|
Hyperlink,
|
|
7468
7502
|
{
|
|
7469
7503
|
className: "gap-1",
|
|
7470
7504
|
linkType: "Primary" /* Solid */,
|
|
7471
7505
|
href: props.addLinkHref,
|
|
7472
7506
|
children: [
|
|
7473
|
-
/* @__PURE__ */ (0,
|
|
7474
|
-
/* @__PURE__ */ (0,
|
|
7507
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
7508
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
7475
7509
|
]
|
|
7476
7510
|
}
|
|
7477
7511
|
)
|
|
@@ -7479,8 +7513,8 @@ var DataList = (props) => {
|
|
|
7479
7513
|
]
|
|
7480
7514
|
}
|
|
7481
7515
|
),
|
|
7482
|
-
/* @__PURE__ */ (0,
|
|
7483
|
-
/* @__PURE__ */ (0,
|
|
7516
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
7517
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("thead", { className: "bg-gray-50", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
7484
7518
|
let url = builder.getNewOrderByUrl(column.name);
|
|
7485
7519
|
let icon = "chevronUpDown";
|
|
7486
7520
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -7490,18 +7524,18 @@ var DataList = (props) => {
|
|
|
7490
7524
|
icon = "chevronUp";
|
|
7491
7525
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
7492
7526
|
}
|
|
7493
|
-
return /* @__PURE__ */ (0,
|
|
7527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7494
7528
|
"th",
|
|
7495
7529
|
{
|
|
7496
7530
|
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" : ""),
|
|
7497
|
-
children: /* @__PURE__ */ (0,
|
|
7531
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7498
7532
|
Hyperlink,
|
|
7499
7533
|
{
|
|
7500
7534
|
href: column.enableSorting ? url : void 0,
|
|
7501
7535
|
className: "text-body-950",
|
|
7502
|
-
children: /* @__PURE__ */ (0,
|
|
7503
|
-
/* @__PURE__ */ (0,
|
|
7504
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
7536
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
7537
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { children: column.label }),
|
|
7538
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
7505
7539
|
] })
|
|
7506
7540
|
}
|
|
7507
7541
|
)
|
|
@@ -7509,7 +7543,7 @@ var DataList = (props) => {
|
|
|
7509
7543
|
column.name
|
|
7510
7544
|
);
|
|
7511
7545
|
}) }) }) }) }),
|
|
7512
|
-
/* @__PURE__ */ (0,
|
|
7546
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
7513
7547
|
] })
|
|
7514
7548
|
] })
|
|
7515
7549
|
] });
|
|
@@ -7517,12 +7551,12 @@ var DataList = (props) => {
|
|
|
7517
7551
|
var DataList_default = DataList;
|
|
7518
7552
|
|
|
7519
7553
|
// src/components/dataForm/DataListRenderer.tsx
|
|
7520
|
-
var
|
|
7554
|
+
var import_react57 = __toESM(require("react"));
|
|
7521
7555
|
init_ServiceClient();
|
|
7522
7556
|
init_OdataBuilder();
|
|
7523
7557
|
init_SelectWithSearchInput();
|
|
7524
7558
|
var import_navigation3 = require("next/navigation");
|
|
7525
|
-
var
|
|
7559
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
7526
7560
|
var viewControlMap = {
|
|
7527
7561
|
number: ViewControlTypes.number,
|
|
7528
7562
|
lineText: ViewControlTypes.lineText,
|
|
@@ -7577,14 +7611,14 @@ var DataListRenderer = ({
|
|
|
7577
7611
|
widgetProps
|
|
7578
7612
|
}) => {
|
|
7579
7613
|
const serviceClient = new ServiceClient_default(apiBaseUrl, session);
|
|
7580
|
-
const [columns, setColumns] = (0,
|
|
7581
|
-
const [dataset, setDataset] = (0,
|
|
7582
|
-
const [filter, setFilters] = (0,
|
|
7583
|
-
const [addLinkHref, setAddLinkHref] = (0,
|
|
7584
|
-
const [addLinkText, setAddLinkText] = (0,
|
|
7585
|
-
const [serviceRoute, setServiceRoute] = (0,
|
|
7614
|
+
const [columns, setColumns] = (0, import_react57.useState)([]);
|
|
7615
|
+
const [dataset, setDataset] = (0, import_react57.useState)();
|
|
7616
|
+
const [filter, setFilters] = (0, import_react57.useState)([]);
|
|
7617
|
+
const [addLinkHref, setAddLinkHref] = (0, import_react57.useState)("");
|
|
7618
|
+
const [addLinkText, setAddLinkText] = (0, import_react57.useState)("");
|
|
7619
|
+
const [serviceRoute, setServiceRoute] = (0, import_react57.useState)("");
|
|
7586
7620
|
const pathname = (0, import_navigation3.usePathname)();
|
|
7587
|
-
(0,
|
|
7621
|
+
(0, import_react57.useEffect)(() => {
|
|
7588
7622
|
if (!formDefinition) return;
|
|
7589
7623
|
setColumns(mapApiToColumns(formDefinition));
|
|
7590
7624
|
setFilters(mapApiToFilters(formDefinition));
|
|
@@ -7597,7 +7631,7 @@ var DataListRenderer = ({
|
|
|
7597
7631
|
setAddLinkHref(resolvedAddLinkHref);
|
|
7598
7632
|
setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
|
|
7599
7633
|
}, [formDefinition, params]);
|
|
7600
|
-
(0,
|
|
7634
|
+
(0, import_react57.useEffect)(() => {
|
|
7601
7635
|
const fetchData = async () => {
|
|
7602
7636
|
if (!serviceRoute) return;
|
|
7603
7637
|
const resolvedRoute = resolveRoutePlaceholders2(serviceRoute, params);
|
|
@@ -7617,15 +7651,15 @@ var DataListRenderer = ({
|
|
|
7617
7651
|
isActive: landingPageUrl === pathname
|
|
7618
7652
|
};
|
|
7619
7653
|
});
|
|
7620
|
-
return /* @__PURE__ */ (0,
|
|
7621
|
-
resolvedTabs.length > 0 && /* @__PURE__ */ (0,
|
|
7654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_react57.default.Fragment, { children: [
|
|
7655
|
+
resolvedTabs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7622
7656
|
NavigationTabsV2_default,
|
|
7623
7657
|
{
|
|
7624
7658
|
tabs: resolvedTabs,
|
|
7625
7659
|
params: widgetProps?.params ?? params
|
|
7626
7660
|
}
|
|
7627
7661
|
),
|
|
7628
|
-
/* @__PURE__ */ (0,
|
|
7662
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7629
7663
|
DataList_default,
|
|
7630
7664
|
{
|
|
7631
7665
|
addLinkHref,
|
|
@@ -7647,13 +7681,13 @@ var DataListRenderer_default = DataListRenderer;
|
|
|
7647
7681
|
init_InputControlType();
|
|
7648
7682
|
|
|
7649
7683
|
// src/components/dataForm/DataForm.tsx
|
|
7650
|
-
var
|
|
7684
|
+
var import_react59 = __toESM(require("react"));
|
|
7651
7685
|
init_Icon();
|
|
7652
7686
|
init_Button();
|
|
7653
7687
|
init_StyleTypes();
|
|
7654
7688
|
|
|
7655
7689
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
7656
|
-
var
|
|
7690
|
+
var import_react58 = __toESM(require("react"));
|
|
7657
7691
|
|
|
7658
7692
|
// src/components/dataForm/StyleTypes.tsx
|
|
7659
7693
|
var StyleTypes2 = /* @__PURE__ */ ((StyleTypes3) => {
|
|
@@ -7680,7 +7714,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
7680
7714
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
7681
7715
|
|
|
7682
7716
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
7683
|
-
var
|
|
7717
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
7684
7718
|
var DataFormChildSection = (props) => {
|
|
7685
7719
|
const { section } = props;
|
|
7686
7720
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -7692,7 +7726,7 @@ var DataFormChildSection = (props) => {
|
|
|
7692
7726
|
return childItems.map((item, originalIndex) => ({ item, originalIndex })).filter((x) => !x.item.isDeleted) || [];
|
|
7693
7727
|
};
|
|
7694
7728
|
const childItemsToRender = getChildItemsForRendering();
|
|
7695
|
-
const handleChildInputChange = (0,
|
|
7729
|
+
const handleChildInputChange = (0, import_react58.useCallback)(
|
|
7696
7730
|
(updatedValues) => {
|
|
7697
7731
|
if (isOneToOne) {
|
|
7698
7732
|
props.callback({
|
|
@@ -7719,7 +7753,7 @@ var DataFormChildSection = (props) => {
|
|
|
7719
7753
|
},
|
|
7720
7754
|
[props, isOneToOne, childItemsToRender]
|
|
7721
7755
|
);
|
|
7722
|
-
const onAddRow = (0,
|
|
7756
|
+
const onAddRow = (0, import_react58.useCallback)(() => {
|
|
7723
7757
|
props.callback({
|
|
7724
7758
|
sectionName: props.section.name,
|
|
7725
7759
|
actionType: FORM_CHILD_ROW_ADD,
|
|
@@ -7728,7 +7762,7 @@ var DataFormChildSection = (props) => {
|
|
|
7728
7762
|
rowIndex: -1
|
|
7729
7763
|
});
|
|
7730
7764
|
}, [props]);
|
|
7731
|
-
const onDeleteRow = (0,
|
|
7765
|
+
const onDeleteRow = (0, import_react58.useCallback)(
|
|
7732
7766
|
(filteredIndex) => {
|
|
7733
7767
|
const visibleItem = childItemsToRender[filteredIndex];
|
|
7734
7768
|
if (visibleItem) {
|
|
@@ -7748,14 +7782,14 @@ var DataFormChildSection = (props) => {
|
|
|
7748
7782
|
childItemsToRender,
|
|
7749
7783
|
allChildItems: childItems
|
|
7750
7784
|
});
|
|
7751
|
-
return /* @__PURE__ */ (0,
|
|
7752
|
-
section.sectionTitle && /* @__PURE__ */ (0,
|
|
7753
|
-
/* @__PURE__ */ (0,
|
|
7754
|
-
/* @__PURE__ */ (0,
|
|
7755
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0,
|
|
7756
|
-
return /* @__PURE__ */ (0,
|
|
7785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react58.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
7786
|
+
section.sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
7787
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
7788
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
7789
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
7790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("tr", { className: "", children: [
|
|
7757
7791
|
sectionRow.elements.map((field, index) => {
|
|
7758
|
-
return /* @__PURE__ */ (0,
|
|
7792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7759
7793
|
"th",
|
|
7760
7794
|
{
|
|
7761
7795
|
className: "py-3 font-normal text-left",
|
|
@@ -7764,21 +7798,21 @@ var DataFormChildSection = (props) => {
|
|
|
7764
7798
|
field.name
|
|
7765
7799
|
);
|
|
7766
7800
|
}),
|
|
7767
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
7801
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
7768
7802
|
] }, sectionRowIndex);
|
|
7769
7803
|
}) }),
|
|
7770
|
-
/* @__PURE__ */ (0,
|
|
7804
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
7771
7805
|
const { item, originalIndex } = visibleItem;
|
|
7772
7806
|
const rowKey = originalIndex;
|
|
7773
|
-
return /* @__PURE__ */ (0,
|
|
7807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react58.default.Fragment, { children: section.sectionRows.map(
|
|
7774
7808
|
(sectionRow, sectionRowIndex) => {
|
|
7775
|
-
return /* @__PURE__ */ (0,
|
|
7809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
7776
7810
|
"tr",
|
|
7777
7811
|
{
|
|
7778
7812
|
className: "",
|
|
7779
7813
|
children: [
|
|
7780
7814
|
sectionRow.elements.map((field, index) => {
|
|
7781
|
-
return /* @__PURE__ */ (0,
|
|
7815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "w-11/12", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7782
7816
|
InputControl_default,
|
|
7783
7817
|
{
|
|
7784
7818
|
index: filteredIndex,
|
|
@@ -7798,7 +7832,7 @@ var DataFormChildSection = (props) => {
|
|
|
7798
7832
|
}
|
|
7799
7833
|
) }) }) }, field.name);
|
|
7800
7834
|
}),
|
|
7801
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
7835
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7802
7836
|
ClientButton_default,
|
|
7803
7837
|
{
|
|
7804
7838
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -7807,7 +7841,7 @@ var DataFormChildSection = (props) => {
|
|
|
7807
7841
|
},
|
|
7808
7842
|
dataRole: "delete",
|
|
7809
7843
|
tabIndex: -1,
|
|
7810
|
-
children: /* @__PURE__ */ (0,
|
|
7844
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7811
7845
|
Icon_default,
|
|
7812
7846
|
{
|
|
7813
7847
|
className: "w-4 h-4",
|
|
@@ -7824,7 +7858,7 @@ var DataFormChildSection = (props) => {
|
|
|
7824
7858
|
) }, rowKey);
|
|
7825
7859
|
}) })
|
|
7826
7860
|
] }) }),
|
|
7827
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
7861
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7828
7862
|
ClientButton_default,
|
|
7829
7863
|
{
|
|
7830
7864
|
ButtonType: "Link" /* Link */,
|
|
@@ -7839,9 +7873,9 @@ var DataFormChildSection = (props) => {
|
|
|
7839
7873
|
var DataFormChildSection_default = DataFormChildSection;
|
|
7840
7874
|
|
|
7841
7875
|
// src/components/dataForm/DataForm.tsx
|
|
7842
|
-
var
|
|
7876
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
7843
7877
|
var DataForm = (props) => {
|
|
7844
|
-
const formRef = (0,
|
|
7878
|
+
const formRef = (0, import_react59.useRef)(null);
|
|
7845
7879
|
console.log(props.dataItem, "dssads");
|
|
7846
7880
|
const initialState = {
|
|
7847
7881
|
inputValues: {},
|
|
@@ -7850,9 +7884,9 @@ var DataForm = (props) => {
|
|
|
7850
7884
|
const childInitialState = {
|
|
7851
7885
|
inputValues: []
|
|
7852
7886
|
};
|
|
7853
|
-
const [formState, dispatch] = (0,
|
|
7887
|
+
const [formState, dispatch] = (0, import_react59.useReducer)(FormReducer_default, initialState);
|
|
7854
7888
|
console.log(props.sections, "sections");
|
|
7855
|
-
const clearHiddenChildSections = (0,
|
|
7889
|
+
const clearHiddenChildSections = (0, import_react59.useCallback)(
|
|
7856
7890
|
(changedProperty, newValues) => {
|
|
7857
7891
|
if (!props.sections) return;
|
|
7858
7892
|
const allChildSections = [];
|
|
@@ -7890,7 +7924,7 @@ var DataForm = (props) => {
|
|
|
7890
7924
|
},
|
|
7891
7925
|
[props.sections, formState.inputValues]
|
|
7892
7926
|
);
|
|
7893
|
-
const handleInputChange = (0,
|
|
7927
|
+
const handleInputChange = (0, import_react59.useCallback)(
|
|
7894
7928
|
async (updatedValues) => {
|
|
7895
7929
|
dispatch({
|
|
7896
7930
|
type: FORM_INPUT_UPDATE,
|
|
@@ -7905,7 +7939,7 @@ var DataForm = (props) => {
|
|
|
7905
7939
|
},
|
|
7906
7940
|
[dispatch, formState.inputValues, clearHiddenChildSections]
|
|
7907
7941
|
);
|
|
7908
|
-
const fetchData = (0,
|
|
7942
|
+
const fetchData = (0, import_react59.useCallback)(async () => {
|
|
7909
7943
|
if (!props.rules) return;
|
|
7910
7944
|
if (Object.keys(formState.inputValues).length === 0) {
|
|
7911
7945
|
return;
|
|
@@ -7936,7 +7970,7 @@ var DataForm = (props) => {
|
|
|
7936
7970
|
console.error("Error fetching data:", error);
|
|
7937
7971
|
}
|
|
7938
7972
|
}, [formState.lastPropertyChanged, formState.inputValues]);
|
|
7939
|
-
(0,
|
|
7973
|
+
(0, import_react59.useEffect)(() => {
|
|
7940
7974
|
fetchData();
|
|
7941
7975
|
}, [formState.inputValues, formState.lastPropertyChanged]);
|
|
7942
7976
|
function replacePlaceholders(template, context, params) {
|
|
@@ -7956,7 +7990,7 @@ var DataForm = (props) => {
|
|
|
7956
7990
|
}
|
|
7957
7991
|
);
|
|
7958
7992
|
}
|
|
7959
|
-
const handleChildSectionChangeCallback = (0,
|
|
7993
|
+
const handleChildSectionChangeCallback = (0, import_react59.useCallback)(
|
|
7960
7994
|
(params) => {
|
|
7961
7995
|
dispatch({
|
|
7962
7996
|
type: params.actionType,
|
|
@@ -8001,7 +8035,7 @@ var DataForm = (props) => {
|
|
|
8001
8035
|
});
|
|
8002
8036
|
return cloned;
|
|
8003
8037
|
}
|
|
8004
|
-
const onClick = (0,
|
|
8038
|
+
const onClick = (0, import_react59.useCallback)(async () => {
|
|
8005
8039
|
if (props.onClick) {
|
|
8006
8040
|
const isEdit = props.dataItem && Object.keys(props.dataItem).length > 0;
|
|
8007
8041
|
const normalizedValues = normalizeChildSections(
|
|
@@ -8017,21 +8051,21 @@ var DataForm = (props) => {
|
|
|
8017
8051
|
return { isSuccessful: true };
|
|
8018
8052
|
}
|
|
8019
8053
|
}, [formState, props]);
|
|
8020
|
-
const handleAdditionalOnClick = (0,
|
|
8054
|
+
const handleAdditionalOnClick = (0, import_react59.useCallback)(async () => {
|
|
8021
8055
|
if (props.additionalActions?.onClick) {
|
|
8022
8056
|
return await props.additionalActions.onClick(formState);
|
|
8023
8057
|
} else {
|
|
8024
8058
|
return { isSuccessful: true, message: "Action completed successfully" };
|
|
8025
8059
|
}
|
|
8026
8060
|
}, [formState, props]);
|
|
8027
|
-
const onDelete = (0,
|
|
8061
|
+
const onDelete = (0, import_react59.useCallback)(async () => {
|
|
8028
8062
|
if (props.onDelete) {
|
|
8029
8063
|
return await props.onDelete(formState);
|
|
8030
8064
|
} else {
|
|
8031
8065
|
return { isSuccessful: true };
|
|
8032
8066
|
}
|
|
8033
8067
|
}, [formState, props]);
|
|
8034
|
-
(0,
|
|
8068
|
+
(0, import_react59.useEffect)(() => {
|
|
8035
8069
|
if (props.dataItem) {
|
|
8036
8070
|
dispatch({
|
|
8037
8071
|
type: FORM_INITIAL_UPDATE,
|
|
@@ -8059,19 +8093,19 @@ var DataForm = (props) => {
|
|
|
8059
8093
|
return false;
|
|
8060
8094
|
}
|
|
8061
8095
|
}
|
|
8062
|
-
return /* @__PURE__ */ (0,
|
|
8063
|
-
props.title && /* @__PURE__ */ (0,
|
|
8096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react59.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
8097
|
+
props.title && /* @__PURE__ */ (0, import_jsx_runtime80.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_runtime80.jsxs)(
|
|
8064
8098
|
"div",
|
|
8065
8099
|
{
|
|
8066
8100
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
8067
8101
|
onClick: () => window.history.back(),
|
|
8068
8102
|
children: [
|
|
8069
|
-
/* @__PURE__ */ (0,
|
|
8070
|
-
/* @__PURE__ */ (0,
|
|
8103
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
8104
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
8071
8105
|
]
|
|
8072
8106
|
}
|
|
8073
8107
|
) }),
|
|
8074
|
-
/* @__PURE__ */ (0,
|
|
8108
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
8075
8109
|
"form",
|
|
8076
8110
|
{
|
|
8077
8111
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -8092,8 +8126,8 @@ var DataForm = (props) => {
|
|
|
8092
8126
|
}
|
|
8093
8127
|
}
|
|
8094
8128
|
},
|
|
8095
|
-
children: /* @__PURE__ */ (0,
|
|
8096
|
-
return /* @__PURE__ */ (0,
|
|
8129
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
8130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react59.default.Fragment, { children: !section.isChildSection && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
8097
8131
|
section.sectionRows?.map(
|
|
8098
8132
|
(sectionRow, sectionRowIndex) => {
|
|
8099
8133
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -8104,14 +8138,14 @@ var DataForm = (props) => {
|
|
|
8104
8138
|
sectionRow.visible
|
|
8105
8139
|
);
|
|
8106
8140
|
}
|
|
8107
|
-
return /* @__PURE__ */ (0,
|
|
8108
|
-
return /* @__PURE__ */ (0,
|
|
8141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react59.default.Fragment, { children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
8142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
8109
8143
|
"div",
|
|
8110
8144
|
{
|
|
8111
8145
|
className: sectionRow.grow ? "grow" : "",
|
|
8112
8146
|
children: [
|
|
8113
|
-
/* @__PURE__ */ (0,
|
|
8114
|
-
/* @__PURE__ */ (0,
|
|
8147
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { children: field.controlType }),
|
|
8148
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
8115
8149
|
InputControl_default,
|
|
8116
8150
|
{
|
|
8117
8151
|
name: field.name,
|
|
@@ -8141,12 +8175,12 @@ var DataForm = (props) => {
|
|
|
8141
8175
|
}) }) }, sectionRowIndex);
|
|
8142
8176
|
}
|
|
8143
8177
|
),
|
|
8144
|
-
/* @__PURE__ */ (0,
|
|
8178
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { children: section.childSections?.map(
|
|
8145
8179
|
(childSection, childSectionIndex) => {
|
|
8146
|
-
return /* @__PURE__ */ (0,
|
|
8180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { children: childSection.name && evalutateCondition(
|
|
8147
8181
|
formState.inputValues,
|
|
8148
8182
|
childSection.visible
|
|
8149
|
-
) && /* @__PURE__ */ (0,
|
|
8183
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
8150
8184
|
DataFormChildSection_default,
|
|
8151
8185
|
{
|
|
8152
8186
|
section: childSection,
|
|
@@ -8161,8 +8195,8 @@ var DataForm = (props) => {
|
|
|
8161
8195
|
}) })
|
|
8162
8196
|
}
|
|
8163
8197
|
),
|
|
8164
|
-
/* @__PURE__ */ (0,
|
|
8165
|
-
/* @__PURE__ */ (0,
|
|
8198
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
8199
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { children: props.additionalActions && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
8166
8200
|
Button_default,
|
|
8167
8201
|
{
|
|
8168
8202
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -8170,7 +8204,7 @@ var DataForm = (props) => {
|
|
|
8170
8204
|
children: props.additionalActions.title
|
|
8171
8205
|
}
|
|
8172
8206
|
) }),
|
|
8173
|
-
/* @__PURE__ */ (0,
|
|
8207
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { children: props.onDelete && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
8174
8208
|
Button_default,
|
|
8175
8209
|
{
|
|
8176
8210
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -8181,7 +8215,7 @@ var DataForm = (props) => {
|
|
|
8181
8215
|
children: "Delete"
|
|
8182
8216
|
}
|
|
8183
8217
|
) }),
|
|
8184
|
-
/* @__PURE__ */ (0,
|
|
8218
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { children: props.onClick && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
8185
8219
|
Button_default,
|
|
8186
8220
|
{
|
|
8187
8221
|
onValidate,
|
|
@@ -8199,7 +8233,7 @@ var DataForm_default = DataForm;
|
|
|
8199
8233
|
|
|
8200
8234
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
8201
8235
|
init_ServiceClient();
|
|
8202
|
-
var
|
|
8236
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
8203
8237
|
function getAction(actions, code) {
|
|
8204
8238
|
return actions?.find((a) => a.actionCode === code);
|
|
8205
8239
|
}
|
|
@@ -8225,9 +8259,9 @@ var DataFormRenderer = ({
|
|
|
8225
8259
|
"Delete"
|
|
8226
8260
|
);
|
|
8227
8261
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
8228
|
-
return /* @__PURE__ */ (0,
|
|
8229
|
-
widgetProps && /* @__PURE__ */ (0,
|
|
8230
|
-
/* @__PURE__ */ (0,
|
|
8262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
8263
|
+
widgetProps && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
8264
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8231
8265
|
DataForm_default,
|
|
8232
8266
|
{
|
|
8233
8267
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|