@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260707141031 → 0.8.1-dev.20260708060703
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/{InputControlClient-NJV6B65M.mjs → InputControlClient-646PQPKQ.mjs} +79 -6
- package/dist/{InputControlClient-TW664WIJ.mjs → InputControlClient-O4HBEUP4.mjs} +79 -6
- package/dist/{Pagination-FSYLYKUA.mjs → Pagination-4K7GMWUE.mjs} +2 -2
- package/dist/Pagination-OQT7Q2XO.mjs +183 -0
- package/dist/chunk-FI2KJBK2.mjs +110 -0
- package/dist/{chunk-47HD7QP7.mjs → chunk-FYGNBMII.mjs} +1 -1
- package/dist/chunk-OGGIS4AN.mjs +201 -0
- package/dist/{chunk-CM7LUGCH.mjs → chunk-UWFXFVUU.mjs} +2 -1
- package/dist/index.d.mts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +902 -785
- package/dist/index.mjs +368 -332
- package/dist/server.d.mts +6 -0
- package/dist/server.d.ts +6 -0
- package/dist/server.js +330 -294
- package/dist/server.mjs +187 -151
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -791,27 +791,27 @@ var DateTimeViewClient_exports = {};
|
|
|
791
791
|
__export(DateTimeViewClient_exports, {
|
|
792
792
|
default: () => DateTimeViewClient_default
|
|
793
793
|
});
|
|
794
|
-
var
|
|
794
|
+
var import_jsx_runtime17, DateTimeViewClient, DateTimeViewClient_default;
|
|
795
795
|
var init_DateTimeViewClient = __esm({
|
|
796
796
|
"src/components/controls/view/DateTimeViewClient.tsx"() {
|
|
797
797
|
"use strict";
|
|
798
798
|
"use client";
|
|
799
799
|
init_DateViewClient();
|
|
800
|
-
|
|
800
|
+
import_jsx_runtime17 = require("react/jsx-runtime");
|
|
801
801
|
DateTimeViewClient = (props) => {
|
|
802
|
-
return /* @__PURE__ */ (0,
|
|
802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DateViewClient_default, { ...props, controlType: "datetime" });
|
|
803
803
|
};
|
|
804
804
|
DateTimeViewClient_default = DateTimeViewClient;
|
|
805
805
|
}
|
|
806
806
|
});
|
|
807
807
|
|
|
808
808
|
// src/components/controls/edit/MultilineTextInput.tsx
|
|
809
|
-
var
|
|
809
|
+
var import_react16, import_jsx_runtime19, MultilineTextInput, MultilineTextInput_default;
|
|
810
810
|
var init_MultilineTextInput = __esm({
|
|
811
811
|
"src/components/controls/edit/MultilineTextInput.tsx"() {
|
|
812
812
|
"use strict";
|
|
813
|
-
|
|
814
|
-
|
|
813
|
+
import_react16 = __toESM(require("react"));
|
|
814
|
+
import_jsx_runtime19 = require("react/jsx-runtime");
|
|
815
815
|
MultilineTextInput = (props) => {
|
|
816
816
|
const textChangeHandler = (event) => {
|
|
817
817
|
const text = event.target.value;
|
|
@@ -830,11 +830,11 @@ var init_MultilineTextInput = __esm({
|
|
|
830
830
|
if (props.value !== void 0 && props.value !== null) {
|
|
831
831
|
value = props.value;
|
|
832
832
|
}
|
|
833
|
-
return /* @__PURE__ */ (0,
|
|
834
|
-
/* @__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 }),
|
|
835
835
|
" ",
|
|
836
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
837
|
-
/* @__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)(
|
|
838
838
|
"textarea",
|
|
839
839
|
{
|
|
840
840
|
name: props.name,
|
|
@@ -851,7 +851,7 @@ var init_MultilineTextInput = __esm({
|
|
|
851
851
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm input"
|
|
852
852
|
}
|
|
853
853
|
),
|
|
854
|
-
/* @__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 : "" })
|
|
855
855
|
] }) });
|
|
856
856
|
};
|
|
857
857
|
MultilineTextInput_default = MultilineTextInput;
|
|
@@ -859,12 +859,12 @@ var init_MultilineTextInput = __esm({
|
|
|
859
859
|
});
|
|
860
860
|
|
|
861
861
|
// src/components/controls/edit/LineTextInput.tsx
|
|
862
|
-
var
|
|
862
|
+
var import_react17, import_jsx_runtime20, LineTextInput, LineTextInput_default;
|
|
863
863
|
var init_LineTextInput = __esm({
|
|
864
864
|
"src/components/controls/edit/LineTextInput.tsx"() {
|
|
865
865
|
"use strict";
|
|
866
|
-
|
|
867
|
-
|
|
866
|
+
import_react17 = __toESM(require("react"));
|
|
867
|
+
import_jsx_runtime20 = require("react/jsx-runtime");
|
|
868
868
|
LineTextInput = (props) => {
|
|
869
869
|
const textChangeHandler = (event) => {
|
|
870
870
|
const text = event.target.value;
|
|
@@ -883,11 +883,11 @@ var init_LineTextInput = __esm({
|
|
|
883
883
|
if (props.value !== void 0 && props.value !== null) {
|
|
884
884
|
value = props.value;
|
|
885
885
|
}
|
|
886
|
-
return /* @__PURE__ */ (0,
|
|
887
|
-
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 }),
|
|
888
888
|
" ",
|
|
889
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
890
|
-
/* @__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)(
|
|
891
891
|
"input",
|
|
892
892
|
{
|
|
893
893
|
type: "text",
|
|
@@ -907,7 +907,7 @@ var init_LineTextInput = __esm({
|
|
|
907
907
|
`
|
|
908
908
|
}
|
|
909
909
|
),
|
|
910
|
-
/* @__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 : "" })
|
|
911
911
|
] }) });
|
|
912
912
|
};
|
|
913
913
|
LineTextInput_default = LineTextInput;
|
|
@@ -915,12 +915,12 @@ var init_LineTextInput = __esm({
|
|
|
915
915
|
});
|
|
916
916
|
|
|
917
917
|
// src/components/controls/edit/MoneyInput.tsx
|
|
918
|
-
var
|
|
918
|
+
var import_react18, import_jsx_runtime21, MoneyInput, MoneyInput_default;
|
|
919
919
|
var init_MoneyInput = __esm({
|
|
920
920
|
"src/components/controls/edit/MoneyInput.tsx"() {
|
|
921
921
|
"use strict";
|
|
922
|
-
|
|
923
|
-
|
|
922
|
+
import_react18 = __toESM(require("react"));
|
|
923
|
+
import_jsx_runtime21 = require("react/jsx-runtime");
|
|
924
924
|
MoneyInput = (props) => {
|
|
925
925
|
const textChangeHandler = (event) => {
|
|
926
926
|
const rawValue = event.target.value;
|
|
@@ -949,11 +949,11 @@ var init_MoneyInput = __esm({
|
|
|
949
949
|
e.preventDefault();
|
|
950
950
|
}
|
|
951
951
|
};
|
|
952
|
-
return /* @__PURE__ */ (0,
|
|
953
|
-
/* @__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 }),
|
|
954
954
|
" ",
|
|
955
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
956
|
-
/* @__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)(
|
|
957
957
|
"input",
|
|
958
958
|
{
|
|
959
959
|
type: "number",
|
|
@@ -973,7 +973,7 @@ var init_MoneyInput = __esm({
|
|
|
973
973
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm number-input"
|
|
974
974
|
}
|
|
975
975
|
),
|
|
976
|
-
/* @__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 : "" })
|
|
977
977
|
] }) });
|
|
978
978
|
};
|
|
979
979
|
MoneyInput_default = MoneyInput;
|
|
@@ -1005,21 +1005,22 @@ var init_InputControlType = __esm({
|
|
|
1005
1005
|
colorInput: "colorInput",
|
|
1006
1006
|
selectWithSearchInput: "selectWithSearchInput",
|
|
1007
1007
|
selectWithSearchPanel: "selectWithSearchPanel",
|
|
1008
|
-
booleanSelect: "booleanSelect"
|
|
1008
|
+
booleanSelect: "booleanSelect",
|
|
1009
|
+
switchInput: "switchInput"
|
|
1009
1010
|
};
|
|
1010
1011
|
InputControlType_default = InputControlType;
|
|
1011
1012
|
}
|
|
1012
1013
|
});
|
|
1013
1014
|
|
|
1014
1015
|
// src/components/controls/edit/Select.tsx
|
|
1015
|
-
var
|
|
1016
|
+
var import_react19, import_jsx_runtime22, Select, Select_default;
|
|
1016
1017
|
var init_Select = __esm({
|
|
1017
1018
|
"src/components/controls/edit/Select.tsx"() {
|
|
1018
1019
|
"use strict";
|
|
1019
|
-
|
|
1020
|
-
|
|
1020
|
+
import_react19 = require("react");
|
|
1021
|
+
import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1021
1022
|
Select = (props) => {
|
|
1022
|
-
const [list, setList] = (0,
|
|
1023
|
+
const [list, setList] = (0, import_react19.useState)([]);
|
|
1023
1024
|
const getSafeValue = (val) => {
|
|
1024
1025
|
if (val === null || val === void 0) return "";
|
|
1025
1026
|
if (typeof val === "boolean") return val ? "1" : "0";
|
|
@@ -1048,7 +1049,7 @@ var init_Select = __esm({
|
|
|
1048
1049
|
groupKey: props.groupKey
|
|
1049
1050
|
});
|
|
1050
1051
|
};
|
|
1051
|
-
(0,
|
|
1052
|
+
(0, import_react19.useEffect)(() => {
|
|
1052
1053
|
async function fetchData() {
|
|
1053
1054
|
if (props.dataset) {
|
|
1054
1055
|
setList(props.dataset);
|
|
@@ -1075,11 +1076,11 @@ var init_Select = __esm({
|
|
|
1075
1076
|
props.dataSourceDependsOn
|
|
1076
1077
|
]);
|
|
1077
1078
|
const value = getSafeValue(props.value);
|
|
1078
|
-
return /* @__PURE__ */ (0,
|
|
1079
|
-
props.attributes?.label && /* @__PURE__ */ (0,
|
|
1079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("label", { className: "block", children: [
|
|
1080
|
+
props.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-sm font-medium inline-block pb-1", children: props.attributes?.label }),
|
|
1080
1081
|
" ",
|
|
1081
|
-
props.attributes?.label && props.attributes?.required && /* @__PURE__ */ (0,
|
|
1082
|
-
/* @__PURE__ */ (0,
|
|
1082
|
+
props.attributes?.label && props.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1083
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1083
1084
|
"select",
|
|
1084
1085
|
{
|
|
1085
1086
|
name: props.name,
|
|
@@ -1090,16 +1091,16 @@ var init_Select = __esm({
|
|
|
1090
1091
|
disabled: props.attributes?.readOnly,
|
|
1091
1092
|
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",
|
|
1092
1093
|
children: [
|
|
1093
|
-
/* @__PURE__ */ (0,
|
|
1094
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: "", children: props.attributes?.placeholder || "Select" }),
|
|
1094
1095
|
list.map((item, index) => {
|
|
1095
1096
|
const keyField = props.dataKeyFieldName;
|
|
1096
1097
|
const textField = props.dataTextFieldName;
|
|
1097
|
-
return /* @__PURE__ */ (0,
|
|
1098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("option", { value: item[keyField], children: item[textField] }, index);
|
|
1098
1099
|
})
|
|
1099
1100
|
]
|
|
1100
1101
|
}
|
|
1101
1102
|
),
|
|
1102
|
-
/* @__PURE__ */ (0,
|
|
1103
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 text-alert text-sm", children: props.attributes?.errorMessage || "" })
|
|
1103
1104
|
] });
|
|
1104
1105
|
};
|
|
1105
1106
|
Select_default = Select;
|
|
@@ -1107,12 +1108,12 @@ var init_Select = __esm({
|
|
|
1107
1108
|
});
|
|
1108
1109
|
|
|
1109
1110
|
// src/components/controls/edit/PercentageInput.tsx
|
|
1110
|
-
var
|
|
1111
|
+
var import_react20, import_jsx_runtime23, PercentageInput, PercentageInput_default;
|
|
1111
1112
|
var init_PercentageInput = __esm({
|
|
1112
1113
|
"src/components/controls/edit/PercentageInput.tsx"() {
|
|
1113
1114
|
"use strict";
|
|
1114
|
-
|
|
1115
|
-
|
|
1115
|
+
import_react20 = __toESM(require("react"));
|
|
1116
|
+
import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1116
1117
|
PercentageInput = (props) => {
|
|
1117
1118
|
const textChangeHandler = (event) => {
|
|
1118
1119
|
const rawValue = event.target.value;
|
|
@@ -1141,11 +1142,11 @@ var init_PercentageInput = __esm({
|
|
|
1141
1142
|
e.preventDefault();
|
|
1142
1143
|
}
|
|
1143
1144
|
};
|
|
1144
|
-
return /* @__PURE__ */ (0,
|
|
1145
|
-
/* @__PURE__ */ (0,
|
|
1145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react20.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { className: "block mb-1", children: [
|
|
1146
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label ? props?.attributes?.label + " %" : "" }),
|
|
1146
1147
|
" ",
|
|
1147
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1148
|
-
/* @__PURE__ */ (0,
|
|
1148
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1149
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1149
1150
|
"input",
|
|
1150
1151
|
{
|
|
1151
1152
|
type: "number",
|
|
@@ -1164,7 +1165,7 @@ var init_PercentageInput = __esm({
|
|
|
1164
1165
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm number-input"
|
|
1165
1166
|
}
|
|
1166
1167
|
),
|
|
1167
|
-
/* @__PURE__ */ (0,
|
|
1168
|
+
/* @__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 : "" })
|
|
1168
1169
|
] }) });
|
|
1169
1170
|
};
|
|
1170
1171
|
PercentageInput_default = PercentageInput;
|
|
@@ -1172,12 +1173,12 @@ var init_PercentageInput = __esm({
|
|
|
1172
1173
|
});
|
|
1173
1174
|
|
|
1174
1175
|
// src/components/controls/edit/PhoneInput.tsx
|
|
1175
|
-
var
|
|
1176
|
+
var import_react21, import_jsx_runtime24, PhoneInput, PhoneInput_default;
|
|
1176
1177
|
var init_PhoneInput = __esm({
|
|
1177
1178
|
"src/components/controls/edit/PhoneInput.tsx"() {
|
|
1178
1179
|
"use strict";
|
|
1179
|
-
|
|
1180
|
-
|
|
1180
|
+
import_react21 = __toESM(require("react"));
|
|
1181
|
+
import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1181
1182
|
PhoneInput = (props) => {
|
|
1182
1183
|
const textChangeHandler = (event) => {
|
|
1183
1184
|
const text = event.target.value;
|
|
@@ -1196,13 +1197,13 @@ var init_PhoneInput = __esm({
|
|
|
1196
1197
|
if (props.value !== void 0 && props.value !== null) {
|
|
1197
1198
|
value = props.value;
|
|
1198
1199
|
}
|
|
1199
|
-
return /* @__PURE__ */ (0,
|
|
1200
|
-
/* @__PURE__ */ (0,
|
|
1200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react21.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { className: "block mb-1", children: [
|
|
1201
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1201
1202
|
" ",
|
|
1202
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1203
|
-
/* @__PURE__ */ (0,
|
|
1204
|
-
/* @__PURE__ */ (0,
|
|
1205
|
-
/* @__PURE__ */ (0,
|
|
1203
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1204
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center rounded border ", children: [
|
|
1205
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "px-3", children: props.prefix }),
|
|
1206
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1206
1207
|
"input",
|
|
1207
1208
|
{
|
|
1208
1209
|
type: "text",
|
|
@@ -1220,7 +1221,7 @@ var init_PhoneInput = __esm({
|
|
|
1220
1221
|
}
|
|
1221
1222
|
)
|
|
1222
1223
|
] }),
|
|
1223
|
-
/* @__PURE__ */ (0,
|
|
1224
|
+
/* @__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 : "" })
|
|
1224
1225
|
] }) });
|
|
1225
1226
|
};
|
|
1226
1227
|
PhoneInput_default = PhoneInput;
|
|
@@ -1228,12 +1229,12 @@ var init_PhoneInput = __esm({
|
|
|
1228
1229
|
});
|
|
1229
1230
|
|
|
1230
1231
|
// src/components/controls/edit/NumberInput.tsx
|
|
1231
|
-
var
|
|
1232
|
+
var import_react22, import_jsx_runtime25, NumberInput, NumberInput_default;
|
|
1232
1233
|
var init_NumberInput = __esm({
|
|
1233
1234
|
"src/components/controls/edit/NumberInput.tsx"() {
|
|
1234
1235
|
"use strict";
|
|
1235
|
-
|
|
1236
|
-
|
|
1236
|
+
import_react22 = __toESM(require("react"));
|
|
1237
|
+
import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1237
1238
|
NumberInput = (props) => {
|
|
1238
1239
|
const textChangeHandler = (event) => {
|
|
1239
1240
|
const text = event.target.value;
|
|
@@ -1256,11 +1257,11 @@ var init_NumberInput = __esm({
|
|
|
1256
1257
|
if (props.value !== void 0 && props.value !== null) {
|
|
1257
1258
|
value = props.value;
|
|
1258
1259
|
}
|
|
1259
|
-
return /* @__PURE__ */ (0,
|
|
1260
|
-
props?.attributes?.label && /* @__PURE__ */ (0,
|
|
1260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react22.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "block", children: [
|
|
1261
|
+
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-sm inline-block pb-1 font-medium ", children: props?.attributes?.label }),
|
|
1261
1262
|
" ",
|
|
1262
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1263
|
-
/* @__PURE__ */ (0,
|
|
1263
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1264
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1264
1265
|
"input",
|
|
1265
1266
|
{
|
|
1266
1267
|
type: "number",
|
|
@@ -1279,7 +1280,7 @@ var init_NumberInput = __esm({
|
|
|
1279
1280
|
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 "
|
|
1280
1281
|
}
|
|
1281
1282
|
),
|
|
1282
|
-
/* @__PURE__ */ (0,
|
|
1283
|
+
/* @__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 : "" })
|
|
1283
1284
|
] }) });
|
|
1284
1285
|
};
|
|
1285
1286
|
NumberInput_default = NumberInput;
|
|
@@ -1287,12 +1288,12 @@ var init_NumberInput = __esm({
|
|
|
1287
1288
|
});
|
|
1288
1289
|
|
|
1289
1290
|
// src/components/controls/edit/CheckboxInput.tsx
|
|
1290
|
-
var
|
|
1291
|
+
var import_react23, import_jsx_runtime26, CheckboxInput, CheckboxInput_default;
|
|
1291
1292
|
var init_CheckboxInput = __esm({
|
|
1292
1293
|
"src/components/controls/edit/CheckboxInput.tsx"() {
|
|
1293
1294
|
"use strict";
|
|
1294
|
-
|
|
1295
|
-
|
|
1295
|
+
import_react23 = __toESM(require("react"));
|
|
1296
|
+
import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1296
1297
|
CheckboxInput = (props) => {
|
|
1297
1298
|
const textChangeHandler = (event) => {
|
|
1298
1299
|
let text = event.target.checked;
|
|
@@ -1309,9 +1310,9 @@ var init_CheckboxInput = __esm({
|
|
|
1309
1310
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
1310
1311
|
value = true;
|
|
1311
1312
|
}
|
|
1312
|
-
return /* @__PURE__ */ (0,
|
|
1313
|
-
props?.attributes?.label && /* @__PURE__ */ (0,
|
|
1314
|
-
/* @__PURE__ */ (0,
|
|
1313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react23.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "mb-1", children: [
|
|
1314
|
+
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
1315
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1315
1316
|
"label",
|
|
1316
1317
|
{
|
|
1317
1318
|
htmlFor: props.name,
|
|
@@ -1319,9 +1320,9 @@ var init_CheckboxInput = __esm({
|
|
|
1319
1320
|
children: props.attributes.label
|
|
1320
1321
|
}
|
|
1321
1322
|
),
|
|
1322
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1323
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "bg-error-weak", children: "*" })
|
|
1323
1324
|
] }),
|
|
1324
|
-
/* @__PURE__ */ (0,
|
|
1325
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1325
1326
|
"input",
|
|
1326
1327
|
{
|
|
1327
1328
|
type: "checkbox",
|
|
@@ -1338,7 +1339,7 @@ var init_CheckboxInput = __esm({
|
|
|
1338
1339
|
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 "
|
|
1339
1340
|
}
|
|
1340
1341
|
),
|
|
1341
|
-
/* @__PURE__ */ (0,
|
|
1342
|
+
/* @__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 || "" })
|
|
1342
1343
|
] }) });
|
|
1343
1344
|
};
|
|
1344
1345
|
CheckboxInput_default = CheckboxInput;
|
|
@@ -1346,12 +1347,12 @@ var init_CheckboxInput = __esm({
|
|
|
1346
1347
|
});
|
|
1347
1348
|
|
|
1348
1349
|
// src/components/controls/edit/OtpInput.tsx
|
|
1349
|
-
var
|
|
1350
|
+
var import_react24, import_jsx_runtime27, OtpInput, OtpInput_default;
|
|
1350
1351
|
var init_OtpInput = __esm({
|
|
1351
1352
|
"src/components/controls/edit/OtpInput.tsx"() {
|
|
1352
1353
|
"use strict";
|
|
1353
|
-
|
|
1354
|
-
|
|
1354
|
+
import_react24 = __toESM(require("react"));
|
|
1355
|
+
import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1355
1356
|
OtpInput = (props) => {
|
|
1356
1357
|
const textChangeHandler = (event) => {
|
|
1357
1358
|
const text = event.target.value;
|
|
@@ -1373,11 +1374,11 @@ var init_OtpInput = __esm({
|
|
|
1373
1374
|
if (props.value !== void 0 && props.value !== null) {
|
|
1374
1375
|
value = props.value;
|
|
1375
1376
|
}
|
|
1376
|
-
return /* @__PURE__ */ (0,
|
|
1377
|
-
/* @__PURE__ */ (0,
|
|
1377
|
+
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: [
|
|
1378
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1378
1379
|
" ",
|
|
1379
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1380
|
-
/* @__PURE__ */ (0,
|
|
1380
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1381
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1381
1382
|
"input",
|
|
1382
1383
|
{
|
|
1383
1384
|
type: "text",
|
|
@@ -1397,7 +1398,7 @@ var init_OtpInput = __esm({
|
|
|
1397
1398
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm tracking-[1.25em] text-center"
|
|
1398
1399
|
}
|
|
1399
1400
|
),
|
|
1400
|
-
/* @__PURE__ */ (0,
|
|
1401
|
+
/* @__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 : "" })
|
|
1401
1402
|
] }) });
|
|
1402
1403
|
};
|
|
1403
1404
|
OtpInput_default = OtpInput;
|
|
@@ -1405,12 +1406,12 @@ var init_OtpInput = __esm({
|
|
|
1405
1406
|
});
|
|
1406
1407
|
|
|
1407
1408
|
// src/components/controls/edit/DateTimeInput.tsx
|
|
1408
|
-
var
|
|
1409
|
+
var import_react25, import_jsx_runtime28, DateTimeInput, DateTimeInput_default;
|
|
1409
1410
|
var init_DateTimeInput = __esm({
|
|
1410
1411
|
"src/components/controls/edit/DateTimeInput.tsx"() {
|
|
1411
1412
|
"use strict";
|
|
1412
|
-
|
|
1413
|
-
|
|
1413
|
+
import_react25 = __toESM(require("react"));
|
|
1414
|
+
import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1414
1415
|
DateTimeInput = (props) => {
|
|
1415
1416
|
const textChangeHandler = (event) => {
|
|
1416
1417
|
const localDate = new Date(event.target.value);
|
|
@@ -1442,12 +1443,12 @@ var init_DateTimeInput = __esm({
|
|
|
1442
1443
|
e.preventDefault();
|
|
1443
1444
|
}
|
|
1444
1445
|
};
|
|
1445
|
-
return /* @__PURE__ */ (0,
|
|
1446
|
-
/* @__PURE__ */ (0,
|
|
1446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react25.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("label", { className: "block mb-1", children: [
|
|
1447
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
1447
1448
|
" ",
|
|
1448
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1449
|
-
/* @__PURE__ */ (0,
|
|
1450
|
-
/* @__PURE__ */ (0,
|
|
1449
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1450
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1451
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1451
1452
|
"input",
|
|
1452
1453
|
{
|
|
1453
1454
|
type: "datetime-local",
|
|
@@ -1465,9 +1466,9 @@ var init_DateTimeInput = __esm({
|
|
|
1465
1466
|
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 "
|
|
1466
1467
|
}
|
|
1467
1468
|
),
|
|
1468
|
-
/* @__PURE__ */ (0,
|
|
1469
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: timeZoneAbbr })
|
|
1469
1470
|
] }),
|
|
1470
|
-
/* @__PURE__ */ (0,
|
|
1471
|
+
/* @__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 : "" })
|
|
1471
1472
|
] }) });
|
|
1472
1473
|
};
|
|
1473
1474
|
DateTimeInput_default = DateTimeInput;
|
|
@@ -1475,15 +1476,15 @@ var init_DateTimeInput = __esm({
|
|
|
1475
1476
|
});
|
|
1476
1477
|
|
|
1477
1478
|
// src/components/controls/edit/ColorInput.tsx
|
|
1478
|
-
var
|
|
1479
|
+
var import_react26, import_jsx_runtime29, ColorInput, ColorInput_default;
|
|
1479
1480
|
var init_ColorInput = __esm({
|
|
1480
1481
|
"src/components/controls/edit/ColorInput.tsx"() {
|
|
1481
1482
|
"use strict";
|
|
1482
|
-
|
|
1483
|
-
|
|
1483
|
+
import_react26 = __toESM(require("react"));
|
|
1484
|
+
import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1484
1485
|
ColorInput = (props) => {
|
|
1485
|
-
const [color, setColor] =
|
|
1486
|
-
(0,
|
|
1486
|
+
const [color, setColor] = import_react26.default.useState("#3b82f6");
|
|
1487
|
+
(0, import_react26.useEffect)(() => {
|
|
1487
1488
|
if (props.value !== void 0 && props.value !== null) {
|
|
1488
1489
|
if (typeof props.value === "string") {
|
|
1489
1490
|
setColor(props.value);
|
|
@@ -1502,11 +1503,11 @@ var init_ColorInput = __esm({
|
|
|
1502
1503
|
});
|
|
1503
1504
|
}
|
|
1504
1505
|
};
|
|
1505
|
-
return /* @__PURE__ */ (0,
|
|
1506
|
-
/* @__PURE__ */ (0,
|
|
1506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("label", { className: "block mb-1", children: [
|
|
1507
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
1507
1508
|
" ",
|
|
1508
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1509
|
-
/* @__PURE__ */ (0,
|
|
1509
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
1510
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1510
1511
|
"input",
|
|
1511
1512
|
{
|
|
1512
1513
|
type: "color",
|
|
@@ -1519,7 +1520,7 @@ var init_ColorInput = __esm({
|
|
|
1519
1520
|
className: `w-[78px] h-12 block cursor-pointer`
|
|
1520
1521
|
}
|
|
1521
1522
|
),
|
|
1522
|
-
props?.attributes?.errorMessage && /* @__PURE__ */ (0,
|
|
1523
|
+
props?.attributes?.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "mt-1 bg-error-weak text-sm", children: props.attributes.errorMessage })
|
|
1523
1524
|
] });
|
|
1524
1525
|
};
|
|
1525
1526
|
ColorInput_default = ColorInput;
|
|
@@ -1527,20 +1528,20 @@ var init_ColorInput = __esm({
|
|
|
1527
1528
|
});
|
|
1528
1529
|
|
|
1529
1530
|
// src/components/controls/edit/SelectWithSearchInput.tsx
|
|
1530
|
-
var
|
|
1531
|
+
var import_react27, import_jsx_runtime30, SelectWithSearchInput, SelectWithSearchInput_default;
|
|
1531
1532
|
var init_SelectWithSearchInput = __esm({
|
|
1532
1533
|
"src/components/controls/edit/SelectWithSearchInput.tsx"() {
|
|
1533
1534
|
"use strict";
|
|
1534
1535
|
"use client";
|
|
1535
|
-
|
|
1536
|
-
|
|
1536
|
+
import_react27 = require("react");
|
|
1537
|
+
import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1537
1538
|
SelectWithSearchInput = (props) => {
|
|
1538
|
-
const [isOpen, setIsOpen] = (0,
|
|
1539
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
1540
|
-
const [highlightedIndex, setHighlightedIndex] = (0,
|
|
1541
|
-
const [selectedItem, setSelectedItem] = (0,
|
|
1542
|
-
const [list, setList] = (0,
|
|
1543
|
-
(0,
|
|
1539
|
+
const [isOpen, setIsOpen] = (0, import_react27.useState)(false);
|
|
1540
|
+
const [searchTerm, setSearchTerm] = (0, import_react27.useState)("");
|
|
1541
|
+
const [highlightedIndex, setHighlightedIndex] = (0, import_react27.useState)(-1);
|
|
1542
|
+
const [selectedItem, setSelectedItem] = (0, import_react27.useState)(null);
|
|
1543
|
+
const [list, setList] = (0, import_react27.useState)([]);
|
|
1544
|
+
(0, import_react27.useEffect)(() => {
|
|
1544
1545
|
async function fetchData() {
|
|
1545
1546
|
if (props.dataset) {
|
|
1546
1547
|
setList(props.dataset);
|
|
@@ -1594,8 +1595,8 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1594
1595
|
handleSelect(e, filteredItems[highlightedIndex]);
|
|
1595
1596
|
}
|
|
1596
1597
|
};
|
|
1597
|
-
const dropdownRef = (0,
|
|
1598
|
-
(0,
|
|
1598
|
+
const dropdownRef = (0, import_react27.useRef)(null);
|
|
1599
|
+
(0, import_react27.useEffect)(() => {
|
|
1599
1600
|
if (highlightedIndex >= 0 && dropdownRef.current) {
|
|
1600
1601
|
const highlightedItem = dropdownRef.current.children[highlightedIndex];
|
|
1601
1602
|
highlightedItem?.scrollIntoView({
|
|
@@ -1604,15 +1605,15 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1604
1605
|
});
|
|
1605
1606
|
}
|
|
1606
1607
|
}, [highlightedIndex]);
|
|
1607
|
-
return /* @__PURE__ */ (0,
|
|
1608
|
-
/* @__PURE__ */ (0,
|
|
1608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "relative", children: [
|
|
1609
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("label", { children: [
|
|
1609
1610
|
props.attributes?.label,
|
|
1610
1611
|
" ",
|
|
1611
1612
|
" ",
|
|
1612
|
-
props?.attributes?.required && /* @__PURE__ */ (0,
|
|
1613
|
+
props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "bg-error-weak", children: "*" })
|
|
1613
1614
|
] }),
|
|
1614
|
-
/* @__PURE__ */ (0,
|
|
1615
|
-
/* @__PURE__ */ (0,
|
|
1615
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "relative", children: [
|
|
1616
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1616
1617
|
"input",
|
|
1617
1618
|
{
|
|
1618
1619
|
type: "text",
|
|
@@ -1628,13 +1629,13 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1628
1629
|
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 "
|
|
1629
1630
|
}
|
|
1630
1631
|
),
|
|
1631
|
-
/* @__PURE__ */ (0,
|
|
1632
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1632
1633
|
"button",
|
|
1633
1634
|
{
|
|
1634
1635
|
type: "button",
|
|
1635
1636
|
onClick: () => setIsOpen(!isOpen),
|
|
1636
1637
|
className: "absolute right-2 top-3 h-5 w-5 text-gray-500 focus:outline-none",
|
|
1637
|
-
children: /* @__PURE__ */ (0,
|
|
1638
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1638
1639
|
"svg",
|
|
1639
1640
|
{
|
|
1640
1641
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1643,7 +1644,7 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1643
1644
|
strokeWidth: 1.5,
|
|
1644
1645
|
stroke: "currentColor",
|
|
1645
1646
|
className: "w-full h-full",
|
|
1646
|
-
children: /* @__PURE__ */ (0,
|
|
1647
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1647
1648
|
"path",
|
|
1648
1649
|
{
|
|
1649
1650
|
strokeLinecap: "round",
|
|
@@ -1656,12 +1657,12 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1656
1657
|
}
|
|
1657
1658
|
)
|
|
1658
1659
|
] }),
|
|
1659
|
-
isOpen && /* @__PURE__ */ (0,
|
|
1660
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1660
1661
|
"div",
|
|
1661
1662
|
{
|
|
1662
1663
|
ref: dropdownRef,
|
|
1663
1664
|
className: "absolute z-10 mt-2 w-full bg-white border border-gray-200 rounded-md shadow-lg max-h-48 overflow-y-auto",
|
|
1664
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ (0,
|
|
1665
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1665
1666
|
"button",
|
|
1666
1667
|
{
|
|
1667
1668
|
onClick: (e) => handleSelect(e, item),
|
|
@@ -1669,10 +1670,10 @@ var init_SelectWithSearchInput = __esm({
|
|
|
1669
1670
|
role: "option",
|
|
1670
1671
|
tabIndex: -1,
|
|
1671
1672
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
1672
|
-
children: /* @__PURE__ */ (0,
|
|
1673
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: item[props.dataTextFieldName] })
|
|
1673
1674
|
},
|
|
1674
1675
|
item[props.dataKeyFieldName]
|
|
1675
|
-
)) : /* @__PURE__ */ (0,
|
|
1676
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
1676
1677
|
}
|
|
1677
1678
|
)
|
|
1678
1679
|
] });
|
|
@@ -1746,15 +1747,15 @@ var init_StyleTypes = __esm({
|
|
|
1746
1747
|
});
|
|
1747
1748
|
|
|
1748
1749
|
// src/components/ClientButton.tsx
|
|
1749
|
-
var
|
|
1750
|
+
var import_react28, import_jsx_runtime31, ClientButton, ClientButton_default;
|
|
1750
1751
|
var init_ClientButton = __esm({
|
|
1751
1752
|
"src/components/ClientButton.tsx"() {
|
|
1752
1753
|
"use strict";
|
|
1753
1754
|
"use client";
|
|
1754
|
-
|
|
1755
|
+
import_react28 = __toESM(require("react"));
|
|
1755
1756
|
init_ToastService();
|
|
1756
1757
|
init_StyleTypes();
|
|
1757
|
-
|
|
1758
|
+
import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1758
1759
|
ClientButton = (props) => {
|
|
1759
1760
|
const execute = async (event) => {
|
|
1760
1761
|
if (props.onClick !== void 0) {
|
|
@@ -1764,7 +1765,7 @@ var init_ClientButton = __esm({
|
|
|
1764
1765
|
}
|
|
1765
1766
|
};
|
|
1766
1767
|
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
1767
|
-
return /* @__PURE__ */ (0,
|
|
1768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react28.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1768
1769
|
"button",
|
|
1769
1770
|
{
|
|
1770
1771
|
type: "button",
|
|
@@ -1779,17 +1780,17 @@ var init_ClientButton = __esm({
|
|
|
1779
1780
|
});
|
|
1780
1781
|
|
|
1781
1782
|
// src/components/Confirm.tsx
|
|
1782
|
-
var
|
|
1783
|
+
var import_react29, import_jsx_runtime32, Confirm, Confirm_default;
|
|
1783
1784
|
var init_Confirm = __esm({
|
|
1784
1785
|
"src/components/Confirm.tsx"() {
|
|
1785
1786
|
"use strict";
|
|
1786
1787
|
"use client";
|
|
1787
|
-
|
|
1788
|
+
import_react29 = require("react");
|
|
1788
1789
|
init_ClientButton();
|
|
1789
1790
|
init_StyleTypes();
|
|
1790
|
-
|
|
1791
|
+
import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1791
1792
|
Confirm = ({ message, onConfirm, onCancel }) => {
|
|
1792
|
-
const [showModal, setShowModal] = (0,
|
|
1793
|
+
const [showModal, setShowModal] = (0, import_react29.useState)(true);
|
|
1793
1794
|
const handleConfirmAction = () => {
|
|
1794
1795
|
setShowModal(false);
|
|
1795
1796
|
if (onConfirm) {
|
|
@@ -1802,13 +1803,13 @@ var init_Confirm = __esm({
|
|
|
1802
1803
|
onCancel();
|
|
1803
1804
|
}
|
|
1804
1805
|
};
|
|
1805
|
-
return /* @__PURE__ */ (0,
|
|
1806
|
-
/* @__PURE__ */ (0,
|
|
1807
|
-
/* @__PURE__ */ (0,
|
|
1808
|
-
/* @__PURE__ */ (0,
|
|
1809
|
-
/* @__PURE__ */ (0,
|
|
1810
|
-
/* @__PURE__ */ (0,
|
|
1811
|
-
/* @__PURE__ */ (0,
|
|
1806
|
+
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: [
|
|
1807
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "absolute inset-0 bg-black opacity-70" }),
|
|
1808
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "bg-white rounded-md p-6 w-2/6 shadow border z-50", children: [
|
|
1809
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-xl font-medium mb-4", children: "Confirmation" }),
|
|
1810
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "mb-4", children: message }),
|
|
1811
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex justify-end gap-8", children: [
|
|
1812
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1812
1813
|
ClientButton_default,
|
|
1813
1814
|
{
|
|
1814
1815
|
onClick: handleCancelAction,
|
|
@@ -1816,7 +1817,7 @@ var init_Confirm = __esm({
|
|
|
1816
1817
|
children: "Cancel"
|
|
1817
1818
|
}
|
|
1818
1819
|
),
|
|
1819
|
-
/* @__PURE__ */ (0,
|
|
1820
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1820
1821
|
ClientButton_default,
|
|
1821
1822
|
{
|
|
1822
1823
|
onClick: handleConfirmAction,
|
|
@@ -1834,21 +1835,21 @@ var init_Confirm = __esm({
|
|
|
1834
1835
|
});
|
|
1835
1836
|
|
|
1836
1837
|
// src/components/Button.tsx
|
|
1837
|
-
var
|
|
1838
|
+
var import_react30, import_jsx_runtime33, Button, Button_default;
|
|
1838
1839
|
var init_Button = __esm({
|
|
1839
1840
|
"src/components/Button.tsx"() {
|
|
1840
1841
|
"use strict";
|
|
1841
1842
|
"use client";
|
|
1842
|
-
|
|
1843
|
+
import_react30 = __toESM(require("react"));
|
|
1843
1844
|
init_ToastService();
|
|
1844
1845
|
init_StyleTypes();
|
|
1845
1846
|
init_Confirm();
|
|
1846
|
-
|
|
1847
|
+
import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1847
1848
|
Button = (props) => {
|
|
1848
|
-
const [inProgress, setInProgress] = (0,
|
|
1849
|
-
const [isActionPerformed, setIsActionPerformed] = (0,
|
|
1850
|
-
const [responseMessage, setResponseMessage] = (0,
|
|
1851
|
-
const [showModal, setShowModal] = (0,
|
|
1849
|
+
const [inProgress, setInProgress] = (0, import_react30.useState)(false);
|
|
1850
|
+
const [isActionPerformed, setIsActionPerformed] = (0, import_react30.useState)(false);
|
|
1851
|
+
const [responseMessage, setResponseMessage] = (0, import_react30.useState)(null);
|
|
1852
|
+
const [showModal, setShowModal] = (0, import_react30.useState)(null);
|
|
1852
1853
|
const execute = async (event) => {
|
|
1853
1854
|
event.preventDefault();
|
|
1854
1855
|
event.stopPropagation();
|
|
@@ -1892,14 +1893,14 @@ var init_Button = __esm({
|
|
|
1892
1893
|
return new Promise((resolve) => {
|
|
1893
1894
|
const onConfirm = () => resolve(true);
|
|
1894
1895
|
const onCancel = () => resolve(false);
|
|
1895
|
-
setShowModal(/* @__PURE__ */ (0,
|
|
1896
|
+
setShowModal(/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Confirm_default, { message: props.confirmationMessage, onConfirm, onCancel }));
|
|
1896
1897
|
});
|
|
1897
1898
|
};
|
|
1898
1899
|
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
1899
1900
|
let progressClass = props.ButtonType ? progressClasses.get(props.ButtonType) : progressClasses.get("Primary" /* Solid */);
|
|
1900
1901
|
const isDisabled = inProgress || isActionPerformed && props.oneTimeAction;
|
|
1901
|
-
return /* @__PURE__ */ (0,
|
|
1902
|
-
/* @__PURE__ */ (0,
|
|
1902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react30.default.Fragment, { children: [
|
|
1903
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
1903
1904
|
"button",
|
|
1904
1905
|
{
|
|
1905
1906
|
type: "submit",
|
|
@@ -1909,9 +1910,9 @@ var init_Button = __esm({
|
|
|
1909
1910
|
className: buttonClass + " relative " + props.className,
|
|
1910
1911
|
children: [
|
|
1911
1912
|
isActionPerformed && props.oneTimeAction && responseMessage ? responseMessage : props.children,
|
|
1912
|
-
inProgress && /* @__PURE__ */ (0,
|
|
1913
|
-
/* @__PURE__ */ (0,
|
|
1914
|
-
/* @__PURE__ */ (0,
|
|
1913
|
+
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: [
|
|
1914
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
1915
|
+
/* @__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" })
|
|
1915
1916
|
] }) })
|
|
1916
1917
|
]
|
|
1917
1918
|
}
|
|
@@ -1924,28 +1925,28 @@ var init_Button = __esm({
|
|
|
1924
1925
|
});
|
|
1925
1926
|
|
|
1926
1927
|
// src/components/controls/edit/SelectWithSearchPanel.tsx
|
|
1927
|
-
var
|
|
1928
|
+
var import_react31, import_jsx_runtime34, SelectWithSearchPanel, SelectWithSearchPanel_default;
|
|
1928
1929
|
var init_SelectWithSearchPanel = __esm({
|
|
1929
1930
|
"src/components/controls/edit/SelectWithSearchPanel.tsx"() {
|
|
1930
1931
|
"use strict";
|
|
1931
1932
|
"use client";
|
|
1932
1933
|
init_Button();
|
|
1933
|
-
|
|
1934
|
-
|
|
1934
|
+
import_react31 = __toESM(require("react"));
|
|
1935
|
+
import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1935
1936
|
SelectWithSearchPanel = (props) => {
|
|
1936
|
-
const [isOpen, setIsOpen] = (0,
|
|
1937
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
1938
|
-
const [highlightedIndex, setHighlightedIndex] = (0,
|
|
1939
|
-
const [list, setList] = (0,
|
|
1940
|
-
const listRef = (0,
|
|
1941
|
-
const [isError, setIsError] = (0,
|
|
1942
|
-
const containerRef = (0,
|
|
1943
|
-
const [isCreateOpen, setIsCreateOpen] = (0,
|
|
1944
|
-
const [formData, setFormData] = (0,
|
|
1937
|
+
const [isOpen, setIsOpen] = (0, import_react31.useState)(false);
|
|
1938
|
+
const [searchTerm, setSearchTerm] = (0, import_react31.useState)("");
|
|
1939
|
+
const [highlightedIndex, setHighlightedIndex] = (0, import_react31.useState)(0);
|
|
1940
|
+
const [list, setList] = (0, import_react31.useState)([]);
|
|
1941
|
+
const listRef = (0, import_react31.useRef)(null);
|
|
1942
|
+
const [isError, setIsError] = (0, import_react31.useState)(false);
|
|
1943
|
+
const containerRef = (0, import_react31.useRef)(null);
|
|
1944
|
+
const [isCreateOpen, setIsCreateOpen] = (0, import_react31.useState)(false);
|
|
1945
|
+
const [formData, setFormData] = (0, import_react31.useState)({});
|
|
1945
1946
|
const getNestedValue7 = (obj, path) => {
|
|
1946
1947
|
return path.split(".").reduce((acc, key) => acc?.[key], obj);
|
|
1947
1948
|
};
|
|
1948
|
-
(0,
|
|
1949
|
+
(0, import_react31.useEffect)(() => {
|
|
1949
1950
|
const handleClickOutside = (event) => {
|
|
1950
1951
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
1951
1952
|
setIsOpen(false);
|
|
@@ -1956,7 +1957,7 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
1956
1957
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
1957
1958
|
};
|
|
1958
1959
|
}, []);
|
|
1959
|
-
(0,
|
|
1960
|
+
(0, import_react31.useEffect)(() => {
|
|
1960
1961
|
async function fetchData() {
|
|
1961
1962
|
if (props.dataset) {
|
|
1962
1963
|
setList(props.dataset);
|
|
@@ -1998,7 +1999,7 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
1998
1999
|
audioCtx.close();
|
|
1999
2000
|
}, 250);
|
|
2000
2001
|
};
|
|
2001
|
-
(0,
|
|
2002
|
+
(0, import_react31.useEffect)(() => {
|
|
2002
2003
|
const filteredItems2 = list?.filter(
|
|
2003
2004
|
(item) => item[props?.dataTextFieldName]?.toLowerCase().includes(searchTerm?.toLowerCase())
|
|
2004
2005
|
);
|
|
@@ -2063,18 +2064,18 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2063
2064
|
const handleInputChange = (event, field) => {
|
|
2064
2065
|
setFormData((prev) => ({ ...prev, [field]: event.target.value }));
|
|
2065
2066
|
};
|
|
2066
|
-
const handleSaveModal = (0,
|
|
2067
|
+
const handleSaveModal = (0, import_react31.useCallback)(async () => {
|
|
2067
2068
|
console.log("Form Data:", formData);
|
|
2068
2069
|
return formData;
|
|
2069
2070
|
}, []);
|
|
2070
|
-
return /* @__PURE__ */ (0,
|
|
2071
|
-
/* @__PURE__ */ (0,
|
|
2071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "relative", children: [
|
|
2072
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("label", { className: "text-sm mb-1 font-medium", children: [
|
|
2072
2073
|
props.attributes?.label,
|
|
2073
2074
|
" ",
|
|
2074
2075
|
" ",
|
|
2075
|
-
props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2076
|
+
props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "bg-error-weak", children: "*" })
|
|
2076
2077
|
] }),
|
|
2077
|
-
/* @__PURE__ */ (0,
|
|
2078
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2078
2079
|
"input",
|
|
2079
2080
|
{
|
|
2080
2081
|
type: "text",
|
|
@@ -2088,14 +2089,14 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2088
2089
|
disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none`
|
|
2089
2090
|
}
|
|
2090
2091
|
) }),
|
|
2091
|
-
/* @__PURE__ */ (0,
|
|
2092
|
-
/* @__PURE__ */ (0,
|
|
2093
|
-
/* @__PURE__ */ (0,
|
|
2092
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ref: containerRef, children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react31.default.Fragment, { children: [
|
|
2093
|
+
/* @__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: [
|
|
2094
|
+
/* @__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: [
|
|
2094
2095
|
"Select a",
|
|
2095
2096
|
" ",
|
|
2096
2097
|
props.attributes?.label || props.attributes?.heading
|
|
2097
2098
|
] }) }),
|
|
2098
|
-
/* @__PURE__ */ (0,
|
|
2099
|
+
/* @__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)(
|
|
2099
2100
|
"button",
|
|
2100
2101
|
{
|
|
2101
2102
|
type: "button",
|
|
@@ -2108,12 +2109,12 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2108
2109
|
}
|
|
2109
2110
|
) })
|
|
2110
2111
|
] }),
|
|
2111
|
-
isCreateOpen && /* @__PURE__ */ (0,
|
|
2112
|
-
/* @__PURE__ */ (0,
|
|
2112
|
+
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: [
|
|
2113
|
+
/* @__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: [
|
|
2113
2114
|
"Create New ",
|
|
2114
2115
|
props.attributes?.label
|
|
2115
2116
|
] }) }),
|
|
2116
|
-
/* @__PURE__ */ (0,
|
|
2117
|
+
/* @__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)(
|
|
2117
2118
|
"button",
|
|
2118
2119
|
{
|
|
2119
2120
|
type: "button",
|
|
@@ -2122,10 +2123,10 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2122
2123
|
children: "Close"
|
|
2123
2124
|
}
|
|
2124
2125
|
) }),
|
|
2125
|
-
/* @__PURE__ */ (0,
|
|
2126
|
-
props.createFields?.map((field) => /* @__PURE__ */ (0,
|
|
2127
|
-
/* @__PURE__ */ (0,
|
|
2128
|
-
/* @__PURE__ */ (0,
|
|
2126
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "p-4", children: [
|
|
2127
|
+
props.createFields?.map((field) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "mb-4", children: [
|
|
2128
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { className: "text-sm mb-1 font-medium block", children: field.label }),
|
|
2129
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2129
2130
|
"input",
|
|
2130
2131
|
{
|
|
2131
2132
|
type: field.type,
|
|
@@ -2141,7 +2142,7 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2141
2142
|
}
|
|
2142
2143
|
)
|
|
2143
2144
|
] }, field.name)),
|
|
2144
|
-
/* @__PURE__ */ (0,
|
|
2145
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Button_default, { onClick: async () => {
|
|
2145
2146
|
handleSaveModal();
|
|
2146
2147
|
return { isSuccessful: true };
|
|
2147
2148
|
}, className: "w-full", children: [
|
|
@@ -2150,13 +2151,13 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2150
2151
|
] })
|
|
2151
2152
|
] })
|
|
2152
2153
|
] }),
|
|
2153
|
-
/* @__PURE__ */ (0,
|
|
2154
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2154
2155
|
"div",
|
|
2155
2156
|
{
|
|
2156
2157
|
ref: listRef,
|
|
2157
2158
|
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",
|
|
2158
2159
|
style: { height: "calc(100vh - 130px)" },
|
|
2159
|
-
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ (0,
|
|
2160
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2160
2161
|
"button",
|
|
2161
2162
|
{
|
|
2162
2163
|
onClick: (e) => {
|
|
@@ -2166,9 +2167,9 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2166
2167
|
role: "option",
|
|
2167
2168
|
tabIndex: -1,
|
|
2168
2169
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
2169
|
-
children: /* @__PURE__ */ (0,
|
|
2170
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: getNestedValue7(item, props.dataTextFieldName) })
|
|
2170
2171
|
}
|
|
2171
|
-
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ (0,
|
|
2172
|
+
) }, item[props.dataKeyFieldName])) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "px-4 py-2 text-gray-500", children: "No results found" })
|
|
2172
2173
|
}
|
|
2173
2174
|
)
|
|
2174
2175
|
] }) })
|
|
@@ -2179,14 +2180,14 @@ var init_SelectWithSearchPanel = __esm({
|
|
|
2179
2180
|
});
|
|
2180
2181
|
|
|
2181
2182
|
// src/components/controls/edit/BooleanSelect.tsx
|
|
2182
|
-
var
|
|
2183
|
+
var import_react32, import_jsx_runtime35, BooleanSelect, BooleanSelect_default;
|
|
2183
2184
|
var init_BooleanSelect = __esm({
|
|
2184
2185
|
"src/components/controls/edit/BooleanSelect.tsx"() {
|
|
2185
2186
|
"use strict";
|
|
2186
|
-
|
|
2187
|
-
|
|
2187
|
+
import_react32 = __toESM(require("react"));
|
|
2188
|
+
import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2188
2189
|
BooleanSelect = (props) => {
|
|
2189
|
-
const [list, setList] = (0,
|
|
2190
|
+
const [list, setList] = (0, import_react32.useState)();
|
|
2190
2191
|
const textChangeHandler = (event) => {
|
|
2191
2192
|
const text = event.target.value;
|
|
2192
2193
|
const boolValue = text?.toLowerCase() === "true" || text === "1";
|
|
@@ -2199,7 +2200,7 @@ var init_BooleanSelect = __esm({
|
|
|
2199
2200
|
});
|
|
2200
2201
|
}
|
|
2201
2202
|
};
|
|
2202
|
-
(0,
|
|
2203
|
+
(0, import_react32.useEffect)(() => {
|
|
2203
2204
|
async function fetchData() {
|
|
2204
2205
|
console.log("in select");
|
|
2205
2206
|
if (props.dataset) {
|
|
@@ -2233,11 +2234,11 @@ var init_BooleanSelect = __esm({
|
|
|
2233
2234
|
if (props.value !== void 0 && props.value !== null) {
|
|
2234
2235
|
value = props.value;
|
|
2235
2236
|
}
|
|
2236
|
-
return /* @__PURE__ */ (0,
|
|
2237
|
-
/* @__PURE__ */ (0,
|
|
2237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react32.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("label", { className: "block", children: [
|
|
2238
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
2238
2239
|
" ",
|
|
2239
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2240
|
-
/* @__PURE__ */ (0,
|
|
2240
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2241
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
2241
2242
|
"select",
|
|
2242
2243
|
{
|
|
2243
2244
|
name: props.name,
|
|
@@ -2249,9 +2250,9 @@ var init_BooleanSelect = __esm({
|
|
|
2249
2250
|
disabled: props?.attributes?.readOnly,
|
|
2250
2251
|
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 ",
|
|
2251
2252
|
children: [
|
|
2252
|
-
/* @__PURE__ */ (0,
|
|
2253
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("option", { className: "", value: "", children: props.attributes?.placeholder || "Select" }),
|
|
2253
2254
|
list && list.map((item, i) => {
|
|
2254
|
-
return /* @__PURE__ */ (0,
|
|
2255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2255
2256
|
"option",
|
|
2256
2257
|
{
|
|
2257
2258
|
className: "fac-select-option",
|
|
@@ -2264,7 +2265,7 @@ var init_BooleanSelect = __esm({
|
|
|
2264
2265
|
]
|
|
2265
2266
|
}
|
|
2266
2267
|
),
|
|
2267
|
-
/* @__PURE__ */ (0,
|
|
2268
|
+
/* @__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 : "" })
|
|
2268
2269
|
] }) });
|
|
2269
2270
|
};
|
|
2270
2271
|
BooleanSelect_default = BooleanSelect;
|
|
@@ -2272,12 +2273,12 @@ var init_BooleanSelect = __esm({
|
|
|
2272
2273
|
});
|
|
2273
2274
|
|
|
2274
2275
|
// src/components/controls/edit/EmailInput.tsx
|
|
2275
|
-
var
|
|
2276
|
+
var import_react33, import_jsx_runtime36, EmailInput, EmailInput_default;
|
|
2276
2277
|
var init_EmailInput = __esm({
|
|
2277
2278
|
"src/components/controls/edit/EmailInput.tsx"() {
|
|
2278
2279
|
"use strict";
|
|
2279
|
-
|
|
2280
|
-
|
|
2280
|
+
import_react33 = __toESM(require("react"));
|
|
2281
|
+
import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2281
2282
|
EmailInput = (props) => {
|
|
2282
2283
|
const textChangeHandler = (event) => {
|
|
2283
2284
|
const text = event.target.value;
|
|
@@ -2302,11 +2303,11 @@ var init_EmailInput = __esm({
|
|
|
2302
2303
|
if (props.value !== void 0 && props.value !== null) {
|
|
2303
2304
|
value = props.value;
|
|
2304
2305
|
}
|
|
2305
|
-
return /* @__PURE__ */ (0,
|
|
2306
|
-
/* @__PURE__ */ (0,
|
|
2306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react33.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("label", { className: "block mb-1", children: [
|
|
2307
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-sm font-medium text-slate-700", children: props?.attributes?.label }),
|
|
2307
2308
|
" ",
|
|
2308
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2309
|
-
/* @__PURE__ */ (0,
|
|
2309
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2310
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2310
2311
|
"input",
|
|
2311
2312
|
{
|
|
2312
2313
|
type: "email",
|
|
@@ -2322,7 +2323,7 @@ var init_EmailInput = __esm({
|
|
|
2322
2323
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n transition-all duration-500 ease-in-out"
|
|
2323
2324
|
}
|
|
2324
2325
|
),
|
|
2325
|
-
/* @__PURE__ */ (0,
|
|
2326
|
+
/* @__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 : "" })
|
|
2326
2327
|
] }) });
|
|
2327
2328
|
};
|
|
2328
2329
|
EmailInput_default = EmailInput;
|
|
@@ -2330,13 +2331,13 @@ var init_EmailInput = __esm({
|
|
|
2330
2331
|
});
|
|
2331
2332
|
|
|
2332
2333
|
// src/components/controls/edit/TimeInput.tsx
|
|
2333
|
-
var
|
|
2334
|
+
var import_react34, import_jsx_runtime37, TimeInput, TimeInput_default;
|
|
2334
2335
|
var init_TimeInput = __esm({
|
|
2335
2336
|
"src/components/controls/edit/TimeInput.tsx"() {
|
|
2336
2337
|
"use strict";
|
|
2337
2338
|
"use client";
|
|
2338
|
-
|
|
2339
|
-
|
|
2339
|
+
import_react34 = __toESM(require("react"));
|
|
2340
|
+
import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2340
2341
|
TimeInput = (props) => {
|
|
2341
2342
|
const timeChangeHandler = (event) => {
|
|
2342
2343
|
const timeValue = event.target.value;
|
|
@@ -2349,11 +2350,11 @@ var init_TimeInput = __esm({
|
|
|
2349
2350
|
});
|
|
2350
2351
|
}
|
|
2351
2352
|
};
|
|
2352
|
-
return /* @__PURE__ */ (0,
|
|
2353
|
-
/* @__PURE__ */ (0,
|
|
2353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react34.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("label", { className: "block mb-1", children: [
|
|
2354
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
2354
2355
|
" ",
|
|
2355
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0,
|
|
2356
|
-
/* @__PURE__ */ (0,
|
|
2356
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2357
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2357
2358
|
"input",
|
|
2358
2359
|
{
|
|
2359
2360
|
type: "time",
|
|
@@ -2366,7 +2367,7 @@ var init_TimeInput = __esm({
|
|
|
2366
2367
|
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"
|
|
2367
2368
|
}
|
|
2368
2369
|
) }),
|
|
2369
|
-
/* @__PURE__ */ (0,
|
|
2370
|
+
/* @__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 ?? "" })
|
|
2370
2371
|
] }) });
|
|
2371
2372
|
};
|
|
2372
2373
|
TimeInput_default = TimeInput;
|
|
@@ -2381,7 +2382,7 @@ function Hyperlink(props) {
|
|
|
2381
2382
|
if (target == "_blank") {
|
|
2382
2383
|
additionalProps.rel = "noopener noreferrer";
|
|
2383
2384
|
}
|
|
2384
|
-
return /* @__PURE__ */ (0,
|
|
2385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_jsx_runtime38.Fragment, { children: props.href ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2385
2386
|
import_link.default,
|
|
2386
2387
|
{
|
|
2387
2388
|
href: props.href,
|
|
@@ -2391,65 +2392,65 @@ function Hyperlink(props) {
|
|
|
2391
2392
|
target,
|
|
2392
2393
|
children: props.children
|
|
2393
2394
|
}
|
|
2394
|
-
) : props.isHeading ? /* @__PURE__ */ (0,
|
|
2395
|
+
) : 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 }) });
|
|
2395
2396
|
}
|
|
2396
|
-
var import_link,
|
|
2397
|
+
var import_link, import_jsx_runtime38;
|
|
2397
2398
|
var init_Hyperlink = __esm({
|
|
2398
2399
|
"src/components/dataForm/Hyperlink.tsx"() {
|
|
2399
2400
|
"use strict";
|
|
2400
2401
|
import_link = __toESM(require("next/link"));
|
|
2401
2402
|
init_StyleTypes();
|
|
2402
|
-
|
|
2403
|
+
import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2403
2404
|
}
|
|
2404
2405
|
});
|
|
2405
2406
|
|
|
2406
2407
|
// src/svg/chevron-updown.tsx
|
|
2407
|
-
var
|
|
2408
|
+
var import_jsx_runtime39, ChevronUpDown, chevron_updown_default;
|
|
2408
2409
|
var init_chevron_updown = __esm({
|
|
2409
2410
|
"src/svg/chevron-updown.tsx"() {
|
|
2410
2411
|
"use strict";
|
|
2411
|
-
|
|
2412
|
+
import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2412
2413
|
ChevronUpDown = (props) => {
|
|
2413
|
-
return /* @__PURE__ */ (0,
|
|
2414
|
+
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" }) });
|
|
2414
2415
|
};
|
|
2415
2416
|
chevron_updown_default = ChevronUpDown;
|
|
2416
2417
|
}
|
|
2417
2418
|
});
|
|
2418
2419
|
|
|
2419
2420
|
// src/svg/chevron-down.tsx
|
|
2420
|
-
var
|
|
2421
|
+
var import_jsx_runtime40, ChevronDown, chevron_down_default;
|
|
2421
2422
|
var init_chevron_down = __esm({
|
|
2422
2423
|
"src/svg/chevron-down.tsx"() {
|
|
2423
2424
|
"use strict";
|
|
2424
|
-
|
|
2425
|
+
import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2425
2426
|
ChevronDown = (props) => {
|
|
2426
|
-
return /* @__PURE__ */ (0,
|
|
2427
|
+
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" }) });
|
|
2427
2428
|
};
|
|
2428
2429
|
chevron_down_default = ChevronDown;
|
|
2429
2430
|
}
|
|
2430
2431
|
});
|
|
2431
2432
|
|
|
2432
2433
|
// src/svg/chevron-up.tsx
|
|
2433
|
-
var
|
|
2434
|
+
var import_jsx_runtime41, ChevronUp, chevron_up_default;
|
|
2434
2435
|
var init_chevron_up = __esm({
|
|
2435
2436
|
"src/svg/chevron-up.tsx"() {
|
|
2436
2437
|
"use strict";
|
|
2437
|
-
|
|
2438
|
+
import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2438
2439
|
ChevronUp = (props) => {
|
|
2439
|
-
return /* @__PURE__ */ (0,
|
|
2440
|
+
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" }) });
|
|
2440
2441
|
};
|
|
2441
2442
|
chevron_up_default = ChevronUp;
|
|
2442
2443
|
}
|
|
2443
2444
|
});
|
|
2444
2445
|
|
|
2445
2446
|
// src/svg/plus.tsx
|
|
2446
|
-
var
|
|
2447
|
+
var import_jsx_runtime42, Plus, plus_default;
|
|
2447
2448
|
var init_plus = __esm({
|
|
2448
2449
|
"src/svg/plus.tsx"() {
|
|
2449
2450
|
"use strict";
|
|
2450
|
-
|
|
2451
|
+
import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2451
2452
|
Plus = (props) => {
|
|
2452
|
-
return /* @__PURE__ */ (0,
|
|
2453
|
+
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" }) });
|
|
2453
2454
|
};
|
|
2454
2455
|
plus_default = Plus;
|
|
2455
2456
|
}
|
|
@@ -2475,37 +2476,37 @@ var init_Icons = __esm({
|
|
|
2475
2476
|
});
|
|
2476
2477
|
|
|
2477
2478
|
// src/svg/Icon.tsx
|
|
2478
|
-
var
|
|
2479
|
+
var import_jsx_runtime43, Icon, Icon_default;
|
|
2479
2480
|
var init_Icon = __esm({
|
|
2480
2481
|
"src/svg/Icon.tsx"() {
|
|
2481
2482
|
"use strict";
|
|
2482
2483
|
init_Icons();
|
|
2483
|
-
|
|
2484
|
+
import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2484
2485
|
Icon = ({ name, className, ...props }) => {
|
|
2485
2486
|
const IconComponent = Icons_default[name];
|
|
2486
2487
|
if (!IconComponent) {
|
|
2487
2488
|
console.error(`Icon "${name}" not found.`);
|
|
2488
2489
|
return null;
|
|
2489
2490
|
}
|
|
2490
|
-
return /* @__PURE__ */ (0,
|
|
2491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(IconComponent, { ...props, className });
|
|
2491
2492
|
};
|
|
2492
2493
|
Icon_default = Icon;
|
|
2493
2494
|
}
|
|
2494
2495
|
});
|
|
2495
2496
|
|
|
2496
2497
|
// src/components/controls/edit/AssetUpload.tsx
|
|
2497
|
-
var
|
|
2498
|
+
var import_react35, import_jsx_runtime44, AssetUpload, AssetUpload_default;
|
|
2498
2499
|
var init_AssetUpload = __esm({
|
|
2499
2500
|
"src/components/controls/edit/AssetUpload.tsx"() {
|
|
2500
2501
|
"use strict";
|
|
2501
2502
|
"use client";
|
|
2502
|
-
|
|
2503
|
+
import_react35 = __toESM(require("react"));
|
|
2503
2504
|
init_ClientButton();
|
|
2504
2505
|
init_StyleTypes();
|
|
2505
2506
|
init_AssetUtility();
|
|
2506
2507
|
init_Hyperlink();
|
|
2507
2508
|
init_Icon();
|
|
2508
|
-
|
|
2509
|
+
import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2509
2510
|
AssetUpload = (props) => {
|
|
2510
2511
|
const isDisabled = props.attributes?.disable ?? false;
|
|
2511
2512
|
let allValues = [];
|
|
@@ -2526,8 +2527,8 @@ var init_AssetUpload = __esm({
|
|
|
2526
2527
|
}
|
|
2527
2528
|
return "image";
|
|
2528
2529
|
};
|
|
2529
|
-
const [assetType, setAssetType] =
|
|
2530
|
-
(0,
|
|
2530
|
+
const [assetType, setAssetType] = import_react35.default.useState(getInitialTab);
|
|
2531
|
+
(0, import_react35.useEffect)(() => {
|
|
2531
2532
|
setAssetType(getInitialTab());
|
|
2532
2533
|
}, [props.value]);
|
|
2533
2534
|
const assetUploadCallback = (newAsset) => {
|
|
@@ -2602,10 +2603,10 @@ var init_AssetUpload = __esm({
|
|
|
2602
2603
|
}
|
|
2603
2604
|
return false;
|
|
2604
2605
|
};
|
|
2605
|
-
return /* @__PURE__ */ (0,
|
|
2606
|
-
/* @__PURE__ */ (0,
|
|
2607
|
-
/* @__PURE__ */ (0,
|
|
2608
|
-
/* @__PURE__ */ (0,
|
|
2606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react35.default.Fragment, { children: [
|
|
2607
|
+
/* @__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 }) }),
|
|
2608
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex gap-6 bg-neutral-100 rounded p-2", children: [
|
|
2609
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2609
2610
|
ClientButton_default,
|
|
2610
2611
|
{
|
|
2611
2612
|
className: assetType === "image" ? "px-2 py-1 rounded bg-body-200 scale-95" : "text-neutral-700",
|
|
@@ -2615,7 +2616,7 @@ var init_AssetUpload = __esm({
|
|
|
2615
2616
|
children: "Image Upload"
|
|
2616
2617
|
}
|
|
2617
2618
|
),
|
|
2618
|
-
/* @__PURE__ */ (0,
|
|
2619
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2619
2620
|
ClientButton_default,
|
|
2620
2621
|
{
|
|
2621
2622
|
className: assetType === "video" ? "bg-body-200 px-2 py-1 rounded-md scale-95" : "text-neutral-700",
|
|
@@ -2626,13 +2627,13 @@ var init_AssetUpload = __esm({
|
|
|
2626
2627
|
}
|
|
2627
2628
|
)
|
|
2628
2629
|
] }),
|
|
2629
|
-
shouldShowDetails() && /* @__PURE__ */ (0,
|
|
2630
|
-
/* @__PURE__ */ (0,
|
|
2631
|
-
/* @__PURE__ */ (0,
|
|
2632
|
-
/* @__PURE__ */ (0,
|
|
2633
|
-
/* @__PURE__ */ (0,
|
|
2634
|
-
/* @__PURE__ */ (0,
|
|
2635
|
-
/* @__PURE__ */ (0,
|
|
2630
|
+
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: [
|
|
2631
|
+
/* @__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" }),
|
|
2632
|
+
/* @__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: [
|
|
2633
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "grid grid-cols-2 gap-x-8 gap-y-3 text-sm w-full", children: [
|
|
2634
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { children: [
|
|
2635
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-gray-500", children: "Title" }),
|
|
2636
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2636
2637
|
"input",
|
|
2637
2638
|
{
|
|
2638
2639
|
type: "text",
|
|
@@ -2644,18 +2645,18 @@ var init_AssetUpload = __esm({
|
|
|
2644
2645
|
}
|
|
2645
2646
|
)
|
|
2646
2647
|
] }),
|
|
2647
|
-
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ (0,
|
|
2648
|
-
/* @__PURE__ */ (0,
|
|
2649
|
-
/* @__PURE__ */ (0,
|
|
2648
|
+
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { children: [
|
|
2649
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-gray-500", children: "Resolution" }),
|
|
2650
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("p", { className: "font-medium text-gray-900 mt-3", children: [
|
|
2650
2651
|
digitalAsset.intrinsicWidth,
|
|
2651
2652
|
"\xD7",
|
|
2652
2653
|
digitalAsset.intrinsicHeight
|
|
2653
2654
|
] })
|
|
2654
2655
|
] }),
|
|
2655
|
-
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ (0,
|
|
2656
|
-
/* @__PURE__ */ (0,
|
|
2657
|
-
/* @__PURE__ */ (0,
|
|
2658
|
-
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ (0,
|
|
2656
|
+
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { children: [
|
|
2657
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-gray-500", children: "Image / Poster" }),
|
|
2658
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex-shrink-0 flex flex-col gap-3 mt-1", children: [
|
|
2659
|
+
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2659
2660
|
"img",
|
|
2660
2661
|
{
|
|
2661
2662
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.posterUrl),
|
|
@@ -2663,7 +2664,7 @@ var init_AssetUpload = __esm({
|
|
|
2663
2664
|
className: "w-32 h-auto object-cover rounded border p-1"
|
|
2664
2665
|
}
|
|
2665
2666
|
),
|
|
2666
|
-
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ (0,
|
|
2667
|
+
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2667
2668
|
"img",
|
|
2668
2669
|
{
|
|
2669
2670
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.assetUrl),
|
|
@@ -2673,9 +2674,9 @@ var init_AssetUpload = __esm({
|
|
|
2673
2674
|
)
|
|
2674
2675
|
] })
|
|
2675
2676
|
] }),
|
|
2676
|
-
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ (0,
|
|
2677
|
-
/* @__PURE__ */ (0,
|
|
2678
|
-
/* @__PURE__ */ (0,
|
|
2677
|
+
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "col-span-2", children: [
|
|
2678
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-gray-500", children: "HLS Link" }),
|
|
2679
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2679
2680
|
Hyperlink,
|
|
2680
2681
|
{
|
|
2681
2682
|
href: digitalAsset.assetUrl,
|
|
@@ -2686,12 +2687,12 @@ var init_AssetUpload = __esm({
|
|
|
2686
2687
|
)
|
|
2687
2688
|
] })
|
|
2688
2689
|
] }),
|
|
2689
|
-
/* @__PURE__ */ (0,
|
|
2690
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2690
2691
|
"span",
|
|
2691
2692
|
{
|
|
2692
2693
|
onClick: () => !isDisabled && deleteFile(index),
|
|
2693
2694
|
className: isDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
2694
|
-
children: /* @__PURE__ */ (0,
|
|
2695
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Icon_default, { className: "w-4 h-4 text-primary", name: "delete" })
|
|
2695
2696
|
}
|
|
2696
2697
|
)
|
|
2697
2698
|
] }, index)) })
|
|
@@ -2702,17 +2703,95 @@ var init_AssetUpload = __esm({
|
|
|
2702
2703
|
}
|
|
2703
2704
|
});
|
|
2704
2705
|
|
|
2706
|
+
// src/components/controls/edit/SwitchInput.tsx
|
|
2707
|
+
var import_react36, import_jsx_runtime45, SwitchInput, SwitchInput_default;
|
|
2708
|
+
var init_SwitchInput = __esm({
|
|
2709
|
+
"src/components/controls/edit/SwitchInput.tsx"() {
|
|
2710
|
+
"use strict";
|
|
2711
|
+
import_react36 = __toESM(require("react"));
|
|
2712
|
+
import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2713
|
+
SwitchInput = (props) => {
|
|
2714
|
+
const textChangeHandler = (event) => {
|
|
2715
|
+
let text = event.target.checked;
|
|
2716
|
+
if (props.callback !== void 0) {
|
|
2717
|
+
props.callback({
|
|
2718
|
+
name: props.name,
|
|
2719
|
+
value: text,
|
|
2720
|
+
index: props.index,
|
|
2721
|
+
groupKey: props.groupKey
|
|
2722
|
+
});
|
|
2723
|
+
}
|
|
2724
|
+
};
|
|
2725
|
+
let value = false;
|
|
2726
|
+
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
2727
|
+
value = true;
|
|
2728
|
+
}
|
|
2729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react36.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-start justify-between gap-4 py-3", children: [
|
|
2730
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "min-w-0", children: [
|
|
2731
|
+
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
2732
|
+
"label",
|
|
2733
|
+
{
|
|
2734
|
+
htmlFor: props.name,
|
|
2735
|
+
className: "inline-block text-sm font-semibold text-slate-800",
|
|
2736
|
+
children: [
|
|
2737
|
+
props.attributes.label,
|
|
2738
|
+
props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "bg-error-weak", children: "*" })
|
|
2739
|
+
]
|
|
2740
|
+
}
|
|
2741
|
+
),
|
|
2742
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage || "" })
|
|
2743
|
+
] }),
|
|
2744
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
2745
|
+
"label",
|
|
2746
|
+
{
|
|
2747
|
+
htmlFor: props.name,
|
|
2748
|
+
className: "relative inline-flex shrink-0 cursor-pointer items-center peer-disabled:cursor-not-allowed",
|
|
2749
|
+
children: [
|
|
2750
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2751
|
+
"input",
|
|
2752
|
+
{
|
|
2753
|
+
type: "checkbox",
|
|
2754
|
+
name: props.name,
|
|
2755
|
+
id: props.name,
|
|
2756
|
+
checked: value,
|
|
2757
|
+
onChange: textChangeHandler,
|
|
2758
|
+
required: props?.attributes?.required,
|
|
2759
|
+
disabled: props?.attributes?.readOnly,
|
|
2760
|
+
className: "peer sr-only"
|
|
2761
|
+
}
|
|
2762
|
+
),
|
|
2763
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2764
|
+
"div",
|
|
2765
|
+
{
|
|
2766
|
+
className: "h-6 w-11 rounded-full bg-slate-200 shadow-inner\n transition-colors duration-200 ease-in-out\n peer-checked:bg-blue-600\n peer-focus-visible:ring-2 peer-focus-visible:ring-blue-300 peer-focus-visible:ring-offset-2\n peer-disabled:bg-slate-100"
|
|
2767
|
+
}
|
|
2768
|
+
),
|
|
2769
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2770
|
+
"div",
|
|
2771
|
+
{
|
|
2772
|
+
className: "absolute left-0.5 top-0.5 h-5 w-5 rounded-full bg-default shadow\n transition-transform duration-200 ease-in-out\n peer-checked:translate-x-5\n peer-disabled:bg-slate-50"
|
|
2773
|
+
}
|
|
2774
|
+
)
|
|
2775
|
+
]
|
|
2776
|
+
}
|
|
2777
|
+
)
|
|
2778
|
+
] }) });
|
|
2779
|
+
};
|
|
2780
|
+
SwitchInput_default = SwitchInput;
|
|
2781
|
+
}
|
|
2782
|
+
});
|
|
2783
|
+
|
|
2705
2784
|
// src/components/controls/edit/InputControlClient.tsx
|
|
2706
2785
|
var InputControlClient_exports = {};
|
|
2707
2786
|
__export(InputControlClient_exports, {
|
|
2708
2787
|
default: () => InputControlClient_default
|
|
2709
2788
|
});
|
|
2710
|
-
var
|
|
2789
|
+
var import_react37, import_jsx_runtime46, InputControl, InputControlClient_default;
|
|
2711
2790
|
var init_InputControlClient = __esm({
|
|
2712
2791
|
"src/components/controls/edit/InputControlClient.tsx"() {
|
|
2713
2792
|
"use strict";
|
|
2714
2793
|
"use client";
|
|
2715
|
-
|
|
2794
|
+
import_react37 = __toESM(require("react"));
|
|
2716
2795
|
init_MultilineTextInput();
|
|
2717
2796
|
init_LineTextInput();
|
|
2718
2797
|
init_MoneyInput();
|
|
@@ -2731,8 +2810,9 @@ var init_InputControlClient = __esm({
|
|
|
2731
2810
|
init_EmailInput();
|
|
2732
2811
|
init_TimeInput();
|
|
2733
2812
|
init_AssetUpload();
|
|
2734
|
-
|
|
2735
|
-
|
|
2813
|
+
init_SwitchInput();
|
|
2814
|
+
import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2815
|
+
InputControl = import_react37.default.forwardRef(
|
|
2736
2816
|
(props, ref) => {
|
|
2737
2817
|
const ControlComponents = {
|
|
2738
2818
|
[InputControlType_default.lineTextInput]: LineTextInput_default,
|
|
@@ -2751,10 +2831,11 @@ var init_InputControlClient = __esm({
|
|
|
2751
2831
|
[InputControlType_default.selectWithSearchPanel]: SelectWithSearchPanel_default,
|
|
2752
2832
|
[InputControlType_default.booleanSelect]: BooleanSelect_default,
|
|
2753
2833
|
[InputControlType_default.timeInput]: TimeInput_default,
|
|
2754
|
-
[InputControlType_default.asset]: AssetUpload_default
|
|
2834
|
+
[InputControlType_default.asset]: AssetUpload_default,
|
|
2835
|
+
[InputControlType_default.switchInput]: SwitchInput_default
|
|
2755
2836
|
};
|
|
2756
2837
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
2757
|
-
return /* @__PURE__ */ (0,
|
|
2838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react37.default.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SelectedControlComponent, { ...props }) : "Control not found" });
|
|
2758
2839
|
}
|
|
2759
2840
|
);
|
|
2760
2841
|
InputControl.displayName = "InputControl";
|
|
@@ -2981,27 +3062,27 @@ var LinkNodeButton_exports = {};
|
|
|
2981
3062
|
__export(LinkNodeButton_exports, {
|
|
2982
3063
|
default: () => LinkNodeButton_default
|
|
2983
3064
|
});
|
|
2984
|
-
var
|
|
3065
|
+
var import_react38, import_jsx_runtime50, LinkNodeButton, LinkNodeButton_default;
|
|
2985
3066
|
var init_LinkNodeButton = __esm({
|
|
2986
3067
|
"src/components/pageRenderingEngine/nodes/LinkNodeButton.tsx"() {
|
|
2987
3068
|
"use strict";
|
|
2988
3069
|
"use client";
|
|
2989
|
-
|
|
3070
|
+
import_react38 = require("react");
|
|
2990
3071
|
init_Button();
|
|
2991
3072
|
init_ServiceClient();
|
|
2992
|
-
|
|
3073
|
+
import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2993
3074
|
LinkNodeButton = (props) => {
|
|
2994
3075
|
const { node, dataitem, children, linkText, linkType, linkUrl } = props;
|
|
2995
|
-
const [isLoading, setIsLoading] = (0,
|
|
2996
|
-
const [error, setError] = (0,
|
|
2997
|
-
const extractFieldNames = (0,
|
|
3076
|
+
const [isLoading, setIsLoading] = (0, import_react38.useState)(false);
|
|
3077
|
+
const [error, setError] = (0, import_react38.useState)(null);
|
|
3078
|
+
const extractFieldNames = (0, import_react38.useCallback)((template) => {
|
|
2998
3079
|
if (!template) return [];
|
|
2999
3080
|
const regex = /\{(\{\})?([a-zA-Z_$][a-zA-Z0-9_$]*)(?:\}\})?\}/g;
|
|
3000
3081
|
const matches = Array.from(template.matchAll(regex));
|
|
3001
3082
|
const fieldNames = matches.map((match) => match[2] || match[1]).filter((name, index, self) => self.indexOf(name) === index);
|
|
3002
3083
|
return fieldNames;
|
|
3003
3084
|
}, []);
|
|
3004
|
-
const replaceTemplateVariables = (0,
|
|
3085
|
+
const replaceTemplateVariables = (0, import_react38.useCallback)((template, responseData) => {
|
|
3005
3086
|
if (!template) return template;
|
|
3006
3087
|
let result = template;
|
|
3007
3088
|
const fieldNames = extractFieldNames(template);
|
|
@@ -3030,7 +3111,7 @@ var init_LinkNodeButton = __esm({
|
|
|
3030
3111
|
}
|
|
3031
3112
|
return result;
|
|
3032
3113
|
}, [props.routeParameters, dataitem, extractFieldNames]);
|
|
3033
|
-
const getNestedValue7 = (0,
|
|
3114
|
+
const getNestedValue7 = (0, import_react38.useCallback)((obj, path) => {
|
|
3034
3115
|
if (!obj || !path) return void 0;
|
|
3035
3116
|
if (obj[path] !== void 0) {
|
|
3036
3117
|
return obj[path];
|
|
@@ -3045,7 +3126,7 @@ var init_LinkNodeButton = __esm({
|
|
|
3045
3126
|
}
|
|
3046
3127
|
return current;
|
|
3047
3128
|
}, []);
|
|
3048
|
-
const onClick = (0,
|
|
3129
|
+
const onClick = (0, import_react38.useCallback)(async (e) => {
|
|
3049
3130
|
if (!node.postUrl) {
|
|
3050
3131
|
setError("No POST URL configured for this button");
|
|
3051
3132
|
return;
|
|
@@ -3131,11 +3212,11 @@ var init_LinkNodeButton = __esm({
|
|
|
3131
3212
|
return children;
|
|
3132
3213
|
}
|
|
3133
3214
|
if (linkText) {
|
|
3134
|
-
return /* @__PURE__ */ (0,
|
|
3215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: linkText });
|
|
3135
3216
|
}
|
|
3136
3217
|
return node.title || "Button";
|
|
3137
3218
|
};
|
|
3138
|
-
return /* @__PURE__ */ (0,
|
|
3219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "link-button-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3139
3220
|
Button_default,
|
|
3140
3221
|
{
|
|
3141
3222
|
ButtonType: linkType,
|
|
@@ -3156,9 +3237,9 @@ __export(CopyButton_exports, {
|
|
|
3156
3237
|
default: () => CopyButton
|
|
3157
3238
|
});
|
|
3158
3239
|
function CopyButton({ text }) {
|
|
3159
|
-
const [copied, setCopied] = (0,
|
|
3160
|
-
const timeoutRef = (0,
|
|
3161
|
-
(0,
|
|
3240
|
+
const [copied, setCopied] = (0, import_react45.useState)(false);
|
|
3241
|
+
const timeoutRef = (0, import_react45.useRef)(null);
|
|
3242
|
+
(0, import_react45.useEffect)(() => {
|
|
3162
3243
|
return () => {
|
|
3163
3244
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3164
3245
|
};
|
|
@@ -3173,13 +3254,13 @@ function CopyButton({ text }) {
|
|
|
3173
3254
|
console.error("Failed to copy: ", err);
|
|
3174
3255
|
}
|
|
3175
3256
|
};
|
|
3176
|
-
return /* @__PURE__ */ (0,
|
|
3257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
3177
3258
|
"button",
|
|
3178
3259
|
{
|
|
3179
3260
|
onClick: handleCopy,
|
|
3180
3261
|
className: "flex gap-1 items-center hover:text-white transition",
|
|
3181
3262
|
children: [
|
|
3182
|
-
/* @__PURE__ */ (0,
|
|
3263
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
3183
3264
|
"svg",
|
|
3184
3265
|
{
|
|
3185
3266
|
width: "16",
|
|
@@ -3187,7 +3268,7 @@ function CopyButton({ text }) {
|
|
|
3187
3268
|
viewBox: "0 0 24 24",
|
|
3188
3269
|
className: "w-4 h-4",
|
|
3189
3270
|
fill: "currentColor",
|
|
3190
|
-
children: /* @__PURE__ */ (0,
|
|
3271
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
3191
3272
|
"path",
|
|
3192
3273
|
{
|
|
3193
3274
|
fillRule: "evenodd",
|
|
@@ -3202,54 +3283,54 @@ function CopyButton({ text }) {
|
|
|
3202
3283
|
}
|
|
3203
3284
|
);
|
|
3204
3285
|
}
|
|
3205
|
-
var
|
|
3286
|
+
var import_react45, import_jsx_runtime60;
|
|
3206
3287
|
var init_CopyButton = __esm({
|
|
3207
3288
|
"src/components/CopyButton.tsx"() {
|
|
3208
3289
|
"use strict";
|
|
3209
3290
|
"use client";
|
|
3210
|
-
|
|
3211
|
-
|
|
3291
|
+
import_react45 = require("react");
|
|
3292
|
+
import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3212
3293
|
}
|
|
3213
3294
|
});
|
|
3214
3295
|
|
|
3215
3296
|
// src/components/IFrameLoaderView.tsx
|
|
3216
|
-
var
|
|
3297
|
+
var import_react48, import_jsx_runtime64, IFrameLoaderView, IFrameLoaderView_default;
|
|
3217
3298
|
var init_IFrameLoaderView = __esm({
|
|
3218
3299
|
"src/components/IFrameLoaderView.tsx"() {
|
|
3219
3300
|
"use strict";
|
|
3220
|
-
|
|
3221
|
-
|
|
3301
|
+
import_react48 = __toESM(require("react"));
|
|
3302
|
+
import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3222
3303
|
IFrameLoaderView = (props) => {
|
|
3223
|
-
return /* @__PURE__ */ (0,
|
|
3224
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
3225
|
-
/* @__PURE__ */ (0,
|
|
3226
|
-
/* @__PURE__ */ (0,
|
|
3227
|
-
/* @__PURE__ */ (0,
|
|
3228
|
-
/* @__PURE__ */ (0,
|
|
3229
|
-
/* @__PURE__ */ (0,
|
|
3304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_react48.default.Fragment, { children: [
|
|
3305
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
3306
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
3307
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
3308
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "ml-2", children: [
|
|
3309
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
3310
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
3230
3311
|
] })
|
|
3231
3312
|
] }),
|
|
3232
|
-
/* @__PURE__ */ (0,
|
|
3233
|
-
/* @__PURE__ */ (0,
|
|
3234
|
-
/* @__PURE__ */ (0,
|
|
3235
|
-
/* @__PURE__ */ (0,
|
|
3236
|
-
/* @__PURE__ */ (0,
|
|
3237
|
-
/* @__PURE__ */ (0,
|
|
3238
|
-
/* @__PURE__ */ (0,
|
|
3313
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
3314
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "animate-pulse", children: [
|
|
3315
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3316
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3317
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3318
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3319
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3239
3320
|
] }),
|
|
3240
|
-
/* @__PURE__ */ (0,
|
|
3241
|
-
/* @__PURE__ */ (0,
|
|
3242
|
-
/* @__PURE__ */ (0,
|
|
3243
|
-
/* @__PURE__ */ (0,
|
|
3244
|
-
/* @__PURE__ */ (0,
|
|
3245
|
-
/* @__PURE__ */ (0,
|
|
3321
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "animate-pulse", children: [
|
|
3322
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3323
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3324
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3325
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3326
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3246
3327
|
] }),
|
|
3247
|
-
/* @__PURE__ */ (0,
|
|
3248
|
-
/* @__PURE__ */ (0,
|
|
3249
|
-
/* @__PURE__ */ (0,
|
|
3250
|
-
/* @__PURE__ */ (0,
|
|
3251
|
-
/* @__PURE__ */ (0,
|
|
3252
|
-
/* @__PURE__ */ (0,
|
|
3328
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "animate-pulse", children: [
|
|
3329
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3330
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3331
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3332
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3333
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3253
3334
|
] })
|
|
3254
3335
|
] })
|
|
3255
3336
|
] }) }),
|
|
@@ -3265,19 +3346,19 @@ var IframeClient_exports = {};
|
|
|
3265
3346
|
__export(IframeClient_exports, {
|
|
3266
3347
|
default: () => IframeClient_default
|
|
3267
3348
|
});
|
|
3268
|
-
var
|
|
3349
|
+
var import_react49, import_jsx_runtime65, IframeClient, IframeClient_default;
|
|
3269
3350
|
var init_IframeClient = __esm({
|
|
3270
3351
|
"src/components/pageRenderingEngine/nodes/IframeClient.tsx"() {
|
|
3271
3352
|
"use strict";
|
|
3272
3353
|
"use client";
|
|
3273
|
-
|
|
3354
|
+
import_react49 = __toESM(require("react"));
|
|
3274
3355
|
init_IFrameLoaderView();
|
|
3275
|
-
|
|
3356
|
+
import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3276
3357
|
IframeClient = ({ src }) => {
|
|
3277
|
-
const iframeRef = (0,
|
|
3278
|
-
const [iframeHeight, setIframeHeight] = (0,
|
|
3279
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
3280
|
-
(0,
|
|
3358
|
+
const iframeRef = (0, import_react49.useRef)(null);
|
|
3359
|
+
const [iframeHeight, setIframeHeight] = (0, import_react49.useState)("100%");
|
|
3360
|
+
const [isDataFound, setIsDataFound] = (0, import_react49.useState)(null);
|
|
3361
|
+
(0, import_react49.useEffect)(() => {
|
|
3281
3362
|
const handleReceiveMessage = (event) => {
|
|
3282
3363
|
const eventName = event?.data?.eventName;
|
|
3283
3364
|
const payload = event?.data?.payload;
|
|
@@ -3292,7 +3373,7 @@ var init_IframeClient = __esm({
|
|
|
3292
3373
|
window.addEventListener("message", handleReceiveMessage);
|
|
3293
3374
|
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
3294
3375
|
}, []);
|
|
3295
|
-
(0,
|
|
3376
|
+
(0, import_react49.useEffect)(() => {
|
|
3296
3377
|
const handleResize = () => {
|
|
3297
3378
|
if (iframeRef.current) {
|
|
3298
3379
|
iframeRef.current.contentWindow?.postMessage({ eventName: "RESIZE" }, "*");
|
|
@@ -3304,7 +3385,7 @@ var init_IframeClient = __esm({
|
|
|
3304
3385
|
const handleIframeLoad = () => {
|
|
3305
3386
|
setIsDataFound(true);
|
|
3306
3387
|
};
|
|
3307
|
-
return /* @__PURE__ */ (0,
|
|
3388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react49.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3308
3389
|
"iframe",
|
|
3309
3390
|
{
|
|
3310
3391
|
ref: iframeRef,
|
|
@@ -3524,21 +3605,21 @@ var Pagination_exports = {};
|
|
|
3524
3605
|
__export(Pagination_exports, {
|
|
3525
3606
|
default: () => Pagination_default
|
|
3526
3607
|
});
|
|
3527
|
-
var
|
|
3608
|
+
var import_react50, import_jsx_runtime70, Pagination, Pagination_default;
|
|
3528
3609
|
var init_Pagination = __esm({
|
|
3529
3610
|
"src/components/Pagination.tsx"() {
|
|
3530
3611
|
"use strict";
|
|
3531
3612
|
"use client";
|
|
3532
|
-
|
|
3613
|
+
import_react50 = require("react");
|
|
3533
3614
|
init_OdataBuilder();
|
|
3534
3615
|
init_Icon();
|
|
3535
3616
|
init_StyleTypes();
|
|
3536
3617
|
init_InputControlType();
|
|
3537
3618
|
init_Hyperlink();
|
|
3538
|
-
|
|
3619
|
+
import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3539
3620
|
Pagination = (props) => {
|
|
3540
3621
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
3541
|
-
const builder = (0,
|
|
3622
|
+
const builder = (0, import_react50.useMemo)(() => {
|
|
3542
3623
|
const b = new OdataBuilder(path);
|
|
3543
3624
|
if (query) b.setQuery(query);
|
|
3544
3625
|
return b;
|
|
@@ -3579,7 +3660,7 @@ var init_Pagination = __esm({
|
|
|
3579
3660
|
return range;
|
|
3580
3661
|
};
|
|
3581
3662
|
const paginationRange = getPaginationRange();
|
|
3582
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */ (0,
|
|
3663
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3583
3664
|
Hyperlink,
|
|
3584
3665
|
{
|
|
3585
3666
|
linkType: "Link" /* Link */,
|
|
@@ -3594,9 +3675,9 @@ var init_Pagination = __esm({
|
|
|
3594
3675
|
);
|
|
3595
3676
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
3596
3677
|
if (disabled) {
|
|
3597
|
-
return /* @__PURE__ */ (0,
|
|
3678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.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 });
|
|
3598
3679
|
}
|
|
3599
|
-
return /* @__PURE__ */ (0,
|
|
3680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3600
3681
|
Hyperlink,
|
|
3601
3682
|
{
|
|
3602
3683
|
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",
|
|
@@ -3606,35 +3687,35 @@ var init_Pagination = __esm({
|
|
|
3606
3687
|
);
|
|
3607
3688
|
};
|
|
3608
3689
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
3609
|
-
return /* @__PURE__ */ (0,
|
|
3610
|
-
/* @__PURE__ */ (0,
|
|
3611
|
-
/* @__PURE__ */ (0,
|
|
3690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "py-6 border-t bg-default", children: [
|
|
3691
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
3692
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "text-sm", children: [
|
|
3612
3693
|
"Showing ",
|
|
3613
|
-
/* @__PURE__ */ (0,
|
|
3694
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("span", { className: "font-semibold", children: [
|
|
3614
3695
|
startItem,
|
|
3615
3696
|
"-",
|
|
3616
3697
|
endItem
|
|
3617
3698
|
] }),
|
|
3618
3699
|
" ",
|
|
3619
3700
|
"out of ",
|
|
3620
|
-
/* @__PURE__ */ (0,
|
|
3701
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
3621
3702
|
" results"
|
|
3622
3703
|
] }),
|
|
3623
|
-
totalPages > 1 && /* @__PURE__ */ (0,
|
|
3624
|
-
/* @__PURE__ */ (0,
|
|
3704
|
+
totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex items-center space-x-1", children: [
|
|
3705
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
3625
3706
|
NavigationButton,
|
|
3626
3707
|
{
|
|
3627
3708
|
page: activePageNumber - 1,
|
|
3628
3709
|
disabled: activePageNumber === 1,
|
|
3629
3710
|
children: [
|
|
3630
|
-
/* @__PURE__ */ (0,
|
|
3631
|
-
/* @__PURE__ */ (0,
|
|
3711
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
3712
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "text-sm", children: "Prev" })
|
|
3632
3713
|
]
|
|
3633
3714
|
}
|
|
3634
3715
|
),
|
|
3635
3716
|
paginationRange.map((item, index) => {
|
|
3636
3717
|
if (item === "...") {
|
|
3637
|
-
return /* @__PURE__ */ (0,
|
|
3718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3638
3719
|
"span",
|
|
3639
3720
|
{
|
|
3640
3721
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -3644,23 +3725,23 @@ var init_Pagination = __esm({
|
|
|
3644
3725
|
);
|
|
3645
3726
|
}
|
|
3646
3727
|
const page = item;
|
|
3647
|
-
return /* @__PURE__ */ (0,
|
|
3728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(PageButton, { page, children: page }, page);
|
|
3648
3729
|
}),
|
|
3649
|
-
/* @__PURE__ */ (0,
|
|
3730
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
3650
3731
|
NavigationButton,
|
|
3651
3732
|
{
|
|
3652
3733
|
page: activePageNumber + 1,
|
|
3653
3734
|
disabled: activePageNumber === totalPages,
|
|
3654
3735
|
children: [
|
|
3655
|
-
/* @__PURE__ */ (0,
|
|
3656
|
-
/* @__PURE__ */ (0,
|
|
3736
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "text-sm", children: "Next" }),
|
|
3737
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
3657
3738
|
]
|
|
3658
3739
|
}
|
|
3659
3740
|
)
|
|
3660
3741
|
] }),
|
|
3661
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0,
|
|
3662
|
-
/* @__PURE__ */ (0,
|
|
3663
|
-
/* @__PURE__ */ (0,
|
|
3742
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
3743
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "text-sm", children: "Go to:" }),
|
|
3744
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3664
3745
|
"input",
|
|
3665
3746
|
{
|
|
3666
3747
|
type: "number",
|
|
@@ -3681,9 +3762,9 @@ var init_Pagination = __esm({
|
|
|
3681
3762
|
) })
|
|
3682
3763
|
] })
|
|
3683
3764
|
] }),
|
|
3684
|
-
showPageSizeSelector && /* @__PURE__ */ (0,
|
|
3685
|
-
/* @__PURE__ */ (0,
|
|
3686
|
-
/* @__PURE__ */ (0,
|
|
3765
|
+
showPageSizeSelector && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
3766
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "text-sm", children: "Show:" }),
|
|
3767
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3687
3768
|
Hyperlink,
|
|
3688
3769
|
{
|
|
3689
3770
|
className: `
|
|
@@ -3695,7 +3776,7 @@ var init_Pagination = __esm({
|
|
|
3695
3776
|
},
|
|
3696
3777
|
size
|
|
3697
3778
|
)) }),
|
|
3698
|
-
/* @__PURE__ */ (0,
|
|
3779
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "text-sm", children: "per page" })
|
|
3699
3780
|
] }) })
|
|
3700
3781
|
] });
|
|
3701
3782
|
};
|
|
@@ -3708,13 +3789,13 @@ var Slider_exports = {};
|
|
|
3708
3789
|
__export(Slider_exports, {
|
|
3709
3790
|
default: () => Slider_default
|
|
3710
3791
|
});
|
|
3711
|
-
var
|
|
3792
|
+
var import_react51, import_jsx_runtime71, Slider, ArrowButton, ProgressPill, Slider_default;
|
|
3712
3793
|
var init_Slider = __esm({
|
|
3713
3794
|
"src/components/Slider.tsx"() {
|
|
3714
3795
|
"use strict";
|
|
3715
3796
|
"use client";
|
|
3716
|
-
|
|
3717
|
-
|
|
3797
|
+
import_react51 = __toESM(require("react"));
|
|
3798
|
+
import_jsx_runtime71 = require("react/jsx-runtime");
|
|
3718
3799
|
Slider = ({
|
|
3719
3800
|
children,
|
|
3720
3801
|
slidesToShow = 4,
|
|
@@ -3732,13 +3813,13 @@ var init_Slider = __esm({
|
|
|
3732
3813
|
pillStyle = "cumulative",
|
|
3733
3814
|
progressPosition = "bottom"
|
|
3734
3815
|
}) => {
|
|
3735
|
-
const [currentSlide, setCurrentSlide] = (0,
|
|
3736
|
-
const [transition, setTransition] = (0,
|
|
3737
|
-
const [slidesToShowState, setSlidesToShowState] = (0,
|
|
3816
|
+
const [currentSlide, setCurrentSlide] = (0, import_react51.useState)(0);
|
|
3817
|
+
const [transition, setTransition] = (0, import_react51.useState)(true);
|
|
3818
|
+
const [slidesToShowState, setSlidesToShowState] = (0, import_react51.useState)(
|
|
3738
3819
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
3739
3820
|
);
|
|
3740
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
3741
|
-
(0,
|
|
3821
|
+
const [isPlaying, setIsPlaying] = (0, import_react51.useState)(autoplay);
|
|
3822
|
+
(0, import_react51.useEffect)(() => {
|
|
3742
3823
|
if (typeof slidesToShow === "number") return;
|
|
3743
3824
|
const handleResize = () => {
|
|
3744
3825
|
if (window.innerWidth >= 1024) {
|
|
@@ -3753,7 +3834,7 @@ var init_Slider = __esm({
|
|
|
3753
3834
|
window.addEventListener("resize", handleResize);
|
|
3754
3835
|
return () => window.removeEventListener("resize", handleResize);
|
|
3755
3836
|
}, [slidesToShow]);
|
|
3756
|
-
(0,
|
|
3837
|
+
(0, import_react51.useEffect)(() => {
|
|
3757
3838
|
if (!autoplay) return;
|
|
3758
3839
|
const timer = setInterval(() => {
|
|
3759
3840
|
if (isPlaying) {
|
|
@@ -3762,7 +3843,7 @@ var init_Slider = __esm({
|
|
|
3762
3843
|
}, autoplay_speed);
|
|
3763
3844
|
return () => clearInterval(timer);
|
|
3764
3845
|
}, [autoplay, autoplay_speed, currentSlide, isPlaying]);
|
|
3765
|
-
const totalSlides =
|
|
3846
|
+
const totalSlides = import_react51.Children.count(children);
|
|
3766
3847
|
const maxSlide = totalSlides - slidesToShowState;
|
|
3767
3848
|
const nextSlide = () => {
|
|
3768
3849
|
if (currentSlide >= maxSlide) {
|
|
@@ -3807,16 +3888,16 @@ var init_Slider = __esm({
|
|
|
3807
3888
|
}
|
|
3808
3889
|
};
|
|
3809
3890
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
3810
|
-
const slides =
|
|
3811
|
-
if (!
|
|
3891
|
+
const slides = import_react51.Children.map(children, (child, index) => {
|
|
3892
|
+
if (!import_react51.default.isValidElement(child)) return null;
|
|
3812
3893
|
const childProps = child.props;
|
|
3813
3894
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
3814
|
-
return /* @__PURE__ */ (0,
|
|
3895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3815
3896
|
"div",
|
|
3816
3897
|
{
|
|
3817
3898
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
3818
3899
|
style: { width: `calc(${100 / slidesToShowState}%)`, paddingRight: gap },
|
|
3819
|
-
children: (0,
|
|
3900
|
+
children: (0, import_react51.cloneElement)(child, {
|
|
3820
3901
|
className: mergedClassName
|
|
3821
3902
|
})
|
|
3822
3903
|
},
|
|
@@ -3834,14 +3915,14 @@ var init_Slider = __esm({
|
|
|
3834
3915
|
return "bottom-4";
|
|
3835
3916
|
}
|
|
3836
3917
|
};
|
|
3837
|
-
return /* @__PURE__ */ (0,
|
|
3918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
3838
3919
|
"div",
|
|
3839
3920
|
{
|
|
3840
3921
|
className: `relative w-full overflow-hidden ${className}`,
|
|
3841
3922
|
onMouseEnter: handleMouseEnter,
|
|
3842
3923
|
onMouseLeave: handleMouseLeave,
|
|
3843
3924
|
children: [
|
|
3844
|
-
/* @__PURE__ */ (0,
|
|
3925
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3845
3926
|
"div",
|
|
3846
3927
|
{
|
|
3847
3928
|
className: "flex h-full",
|
|
@@ -3852,18 +3933,18 @@ var init_Slider = __esm({
|
|
|
3852
3933
|
children: slides
|
|
3853
3934
|
}
|
|
3854
3935
|
),
|
|
3855
|
-
show_arrows && /* @__PURE__ */ (0,
|
|
3856
|
-
/* @__PURE__ */ (0,
|
|
3936
|
+
show_arrows && /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
|
|
3937
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3857
3938
|
ArrowButton,
|
|
3858
3939
|
{
|
|
3859
3940
|
direction: "left",
|
|
3860
3941
|
onClick: prevSlide,
|
|
3861
3942
|
visible: infinite_scroll || currentSlide > 0,
|
|
3862
3943
|
className: arrowClassName,
|
|
3863
|
-
children: /* @__PURE__ */ (0,
|
|
3944
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime71.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_runtime71.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
3864
3945
|
}
|
|
3865
3946
|
),
|
|
3866
|
-
/* @__PURE__ */ (0,
|
|
3947
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
3867
3948
|
ArrowButton,
|
|
3868
3949
|
{
|
|
3869
3950
|
direction: "right",
|
|
@@ -3871,13 +3952,13 @@ var init_Slider = __esm({
|
|
|
3871
3952
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
3872
3953
|
className: arrowClassName,
|
|
3873
3954
|
children: [
|
|
3874
|
-
/* @__PURE__ */ (0,
|
|
3955
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.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_runtime71.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
|
|
3875
3956
|
" "
|
|
3876
3957
|
]
|
|
3877
3958
|
}
|
|
3878
3959
|
)
|
|
3879
3960
|
] }),
|
|
3880
|
-
show_dots && /* @__PURE__ */ (0,
|
|
3961
|
+
show_dots && /* @__PURE__ */ (0, import_jsx_runtime71.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_runtime71.jsx)(
|
|
3881
3962
|
ProgressPill,
|
|
3882
3963
|
{
|
|
3883
3964
|
active: index === currentSlide,
|
|
@@ -3903,7 +3984,7 @@ var init_Slider = __esm({
|
|
|
3903
3984
|
visible,
|
|
3904
3985
|
children,
|
|
3905
3986
|
className = ""
|
|
3906
|
-
}) => /* @__PURE__ */ (0,
|
|
3987
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3907
3988
|
"button",
|
|
3908
3989
|
{
|
|
3909
3990
|
className: `
|
|
@@ -3929,13 +4010,13 @@ var init_Slider = __esm({
|
|
|
3929
4010
|
currentSlide,
|
|
3930
4011
|
totalSlides
|
|
3931
4012
|
}) => {
|
|
3932
|
-
const [progress, setProgress] = (0,
|
|
3933
|
-
(0,
|
|
4013
|
+
const [progress, setProgress] = (0, import_react51.useState)(0);
|
|
4014
|
+
(0, import_react51.useEffect)(() => {
|
|
3934
4015
|
if (active) {
|
|
3935
4016
|
setProgress(0);
|
|
3936
4017
|
}
|
|
3937
4018
|
}, [active, index]);
|
|
3938
|
-
(0,
|
|
4019
|
+
(0, import_react51.useEffect)(() => {
|
|
3939
4020
|
if (!active || !isPlaying) {
|
|
3940
4021
|
if (!active) {
|
|
3941
4022
|
setProgress(0);
|
|
@@ -3990,7 +4071,7 @@ var init_Slider = __esm({
|
|
|
3990
4071
|
const renderProgressBar = () => {
|
|
3991
4072
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
3992
4073
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
3993
|
-
return /* @__PURE__ */ (0,
|
|
4074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3994
4075
|
"div",
|
|
3995
4076
|
{
|
|
3996
4077
|
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`,
|
|
@@ -4002,7 +4083,7 @@ var init_Slider = __esm({
|
|
|
4002
4083
|
};
|
|
4003
4084
|
const renderCumulativeFill = () => {
|
|
4004
4085
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
4005
|
-
return /* @__PURE__ */ (0,
|
|
4086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
4006
4087
|
"div",
|
|
4007
4088
|
{
|
|
4008
4089
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -4012,7 +4093,7 @@ var init_Slider = __esm({
|
|
|
4012
4093
|
}
|
|
4013
4094
|
return null;
|
|
4014
4095
|
};
|
|
4015
|
-
return /* @__PURE__ */ (0,
|
|
4096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
4016
4097
|
"button",
|
|
4017
4098
|
{
|
|
4018
4099
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -4062,27 +4143,33 @@ __export(index_exports, {
|
|
|
4062
4143
|
module.exports = __toCommonJS(index_exports);
|
|
4063
4144
|
|
|
4064
4145
|
// src/components/controls/view/ViewControl.tsx
|
|
4065
|
-
var
|
|
4146
|
+
var import_react15 = __toESM(require("react"));
|
|
4066
4147
|
|
|
4067
4148
|
// src/components/controls/view/ViewControlTypes.tsx
|
|
4068
4149
|
var ViewControlTypes = {
|
|
4069
4150
|
lineText: "lineText",
|
|
4151
|
+
emailText: "email",
|
|
4070
4152
|
asset: "asset",
|
|
4071
4153
|
multilineTextBullets: "multilineTextBullets",
|
|
4072
4154
|
boolean: "boolean",
|
|
4155
|
+
checkboxInput: "boolean",
|
|
4073
4156
|
money: "money",
|
|
4074
4157
|
date: "date",
|
|
4075
4158
|
time: "time",
|
|
4076
4159
|
datetime: "datetime",
|
|
4077
4160
|
number: "number",
|
|
4078
4161
|
multilineText: "multilineText",
|
|
4162
|
+
multilinetext: "multilinetext",
|
|
4079
4163
|
moneyText: "moneyText",
|
|
4080
4164
|
percentage: "percentage",
|
|
4165
|
+
status: "status",
|
|
4081
4166
|
statusBg: "statusBg",
|
|
4082
4167
|
progressIndicator: "progressIndicator",
|
|
4083
4168
|
timeUntilStarts: "timeUntilStarts",
|
|
4084
4169
|
timeUntilStartsStyled: "timeUntilStartsStyled",
|
|
4085
|
-
aiGeneratedSummary: "aiGeneratedSummary"
|
|
4170
|
+
aiGeneratedSummary: "aiGeneratedSummary",
|
|
4171
|
+
booleanView: "booleanView",
|
|
4172
|
+
text: "text"
|
|
4086
4173
|
};
|
|
4087
4174
|
var ViewControlTypes_default = ViewControlTypes;
|
|
4088
4175
|
|
|
@@ -4264,8 +4351,32 @@ var LineText = (props) => {
|
|
|
4264
4351
|
};
|
|
4265
4352
|
var LineTextView_default = LineText;
|
|
4266
4353
|
|
|
4267
|
-
// src/components/controls/view/
|
|
4354
|
+
// src/components/controls/view/EmailTextView.tsx
|
|
4268
4355
|
var import_react7 = __toESM(require("react"));
|
|
4356
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
4357
|
+
var EmailText = (props) => {
|
|
4358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react7.default.Fragment, { children: props.value });
|
|
4359
|
+
};
|
|
4360
|
+
var EmailTextView_default = EmailText;
|
|
4361
|
+
|
|
4362
|
+
// src/components/controls/view/StatusBgView.tsx
|
|
4363
|
+
var import_react8 = __toESM(require("react"));
|
|
4364
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
4365
|
+
var StatusBg = (props) => {
|
|
4366
|
+
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 }) });
|
|
4367
|
+
};
|
|
4368
|
+
var StatusBgView_default = StatusBg;
|
|
4369
|
+
|
|
4370
|
+
// src/components/controls/view/StatusView.tsx
|
|
4371
|
+
var import_react9 = __toESM(require("react"));
|
|
4372
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
4373
|
+
var Status = (props) => {
|
|
4374
|
+
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 }) });
|
|
4375
|
+
};
|
|
4376
|
+
var StatusView_default = Status;
|
|
4377
|
+
|
|
4378
|
+
// src/components/controls/view/MoneyView.tsx
|
|
4379
|
+
var import_react10 = __toESM(require("react"));
|
|
4269
4380
|
|
|
4270
4381
|
// src/components/utilities/CurrencyUtility.tsx
|
|
4271
4382
|
var CurrencyUtility = class {
|
|
@@ -4286,40 +4397,40 @@ var CurrencyUtility = class {
|
|
|
4286
4397
|
var CurrencyUtility_default = CurrencyUtility;
|
|
4287
4398
|
|
|
4288
4399
|
// src/components/controls/view/MoneyView.tsx
|
|
4289
|
-
var
|
|
4400
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
4290
4401
|
var Money = (props) => {
|
|
4291
4402
|
const parsedNumber = parseFloat(props.value);
|
|
4292
|
-
return /* @__PURE__ */ (0,
|
|
4293
|
-
/* @__PURE__ */ (0,
|
|
4403
|
+
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: [
|
|
4404
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "mr-0.5", children: CurrencyUtility_default.getCurrencySymbol(props.unit) }),
|
|
4294
4405
|
parsedNumber.toLocaleString()
|
|
4295
4406
|
] }) });
|
|
4296
4407
|
};
|
|
4297
4408
|
var MoneyView_default = Money;
|
|
4298
4409
|
|
|
4299
4410
|
// src/components/controls/view/MultilineTextBulletsView.tsx
|
|
4300
|
-
var
|
|
4301
|
-
var
|
|
4411
|
+
var import_react11 = __toESM(require("react"));
|
|
4412
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
4302
4413
|
var MultilineTextBullets = (props) => {
|
|
4303
4414
|
const lines = props.value?.split("\\n");
|
|
4304
|
-
return /* @__PURE__ */ (0,
|
|
4305
|
-
return /* @__PURE__ */ (0,
|
|
4415
|
+
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) => {
|
|
4416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: line }, index);
|
|
4306
4417
|
}) }) });
|
|
4307
4418
|
};
|
|
4308
4419
|
var MultilineTextBulletsView_default = MultilineTextBullets;
|
|
4309
4420
|
|
|
4310
4421
|
// src/components/controls/view/MultilineTextView.tsx
|
|
4311
|
-
var
|
|
4312
|
-
var
|
|
4422
|
+
var import_react12 = __toESM(require("react"));
|
|
4423
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
4313
4424
|
var MultilineText = (props) => {
|
|
4314
|
-
return /* @__PURE__ */ (0,
|
|
4425
|
+
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 }) });
|
|
4315
4426
|
};
|
|
4316
4427
|
var MultilineTextView_default = MultilineText;
|
|
4317
4428
|
|
|
4318
4429
|
// src/components/controls/view/PercentageView.tsx
|
|
4319
|
-
var
|
|
4320
|
-
var
|
|
4430
|
+
var import_react13 = __toESM(require("react"));
|
|
4431
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
4321
4432
|
var PercentageView = (props) => {
|
|
4322
|
-
return /* @__PURE__ */ (0,
|
|
4433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react13.default.Fragment, { children: [
|
|
4323
4434
|
props.value,
|
|
4324
4435
|
"%"
|
|
4325
4436
|
] });
|
|
@@ -4327,16 +4438,16 @@ var PercentageView = (props) => {
|
|
|
4327
4438
|
var PercentageView_default = PercentageView;
|
|
4328
4439
|
|
|
4329
4440
|
// src/components/controls/view/ProgressIndicator.tsx
|
|
4330
|
-
var
|
|
4331
|
-
var
|
|
4441
|
+
var import_react14 = __toESM(require("react"));
|
|
4442
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
4332
4443
|
var ProgressIndicator = (props) => {
|
|
4333
4444
|
const percentage = 100;
|
|
4334
4445
|
const circumference = Math.PI * 56;
|
|
4335
4446
|
const offset = circumference * (1 - percentage / 100);
|
|
4336
|
-
return /* @__PURE__ */ (0,
|
|
4337
|
-
/* @__PURE__ */ (0,
|
|
4338
|
-
/* @__PURE__ */ (0,
|
|
4339
|
-
/* @__PURE__ */ (0,
|
|
4447
|
+
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: [
|
|
4448
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "absolute top-0 left-0 w-full h-full rounded-full border border-gray-200" }),
|
|
4449
|
+
/* @__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)` } }) }),
|
|
4450
|
+
/* @__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: [
|
|
4340
4451
|
percentage,
|
|
4341
4452
|
"%"
|
|
4342
4453
|
] }) })
|
|
@@ -4345,18 +4456,18 @@ var ProgressIndicator = (props) => {
|
|
|
4345
4456
|
var ProgressIndicator_default = ProgressIndicator;
|
|
4346
4457
|
|
|
4347
4458
|
// src/components/controls/view/AiGeneratedSummary.tsx
|
|
4348
|
-
var
|
|
4459
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
4349
4460
|
var AiGeneratedSummary = (props) => {
|
|
4350
4461
|
const lines = props.value?.split("\n").filter((line) => line.trim() !== "") || [];
|
|
4351
|
-
return /* @__PURE__ */ (0,
|
|
4352
|
-
/* @__PURE__ */ (0,
|
|
4353
|
-
/* @__PURE__ */ (0,
|
|
4354
|
-
/* @__PURE__ */ (0,
|
|
4355
|
-
/* @__PURE__ */ (0,
|
|
4356
|
-
/* @__PURE__ */ (0,
|
|
4462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("details", { className: "group rounded-xl border-2 bg-white shadow-sm border-p overflow-hidden", children: [
|
|
4463
|
+
/* @__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: [
|
|
4464
|
+
/* @__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" }) }) }),
|
|
4465
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
|
|
4466
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h3", { className: "text-lg font-semibold ", children: "Quick Read" }),
|
|
4467
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-sm text-gray-500 mb-0", children: "Summary is AI-generated, author-reviewed" })
|
|
4357
4468
|
] })
|
|
4358
4469
|
] }) }),
|
|
4359
|
-
/* @__PURE__ */ (0,
|
|
4470
|
+
/* @__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)) }) })
|
|
4360
4471
|
] });
|
|
4361
4472
|
};
|
|
4362
4473
|
var AiGeneratedSummary_default = AiGeneratedSummary;
|
|
@@ -4369,13 +4480,15 @@ var DateTimeView = (0, import_dynamic3.default)(() => Promise.resolve().then(()
|
|
|
4369
4480
|
var DateTimeVew_default = DateTimeView;
|
|
4370
4481
|
|
|
4371
4482
|
// src/components/controls/view/ViewControl.tsx
|
|
4372
|
-
var
|
|
4483
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
4373
4484
|
var ViewControl = (props) => {
|
|
4374
4485
|
const ControlComponents = {
|
|
4375
4486
|
[ViewControlTypes_default.lineText]: LineTextView_default,
|
|
4487
|
+
[ViewControlTypes_default.emailText]: EmailTextView_default,
|
|
4376
4488
|
[ViewControlTypes_default.asset]: Asset_default,
|
|
4377
4489
|
[ViewControlTypes_default.multilineTextBullets]: MultilineTextBulletsView_default,
|
|
4378
4490
|
[ViewControlTypes_default.boolean]: BooleanView_default,
|
|
4491
|
+
[ViewControlTypes_default.checkboxInput]: BooleanView_default,
|
|
4379
4492
|
// [ViewControlTypes.timeUntilStarts]: TimeUntilStarts,
|
|
4380
4493
|
[ViewControlTypes_default.money]: MoneyView_default,
|
|
4381
4494
|
[ViewControlTypes_default.date]: DateView_default,
|
|
@@ -4383,16 +4496,20 @@ var ViewControl = (props) => {
|
|
|
4383
4496
|
[ViewControlTypes_default.datetime]: DateTimeVew_default,
|
|
4384
4497
|
[ViewControlTypes_default.number]: NumberView_default,
|
|
4385
4498
|
[ViewControlTypes_default.multilineText]: MultilineTextView_default,
|
|
4499
|
+
[ViewControlTypes_default.multilinetext]: MultilineTextView_default,
|
|
4386
4500
|
[ViewControlTypes_default.moneyText]: MoneyView_default,
|
|
4387
4501
|
[ViewControlTypes_default.percentage]: PercentageView_default,
|
|
4388
|
-
|
|
4502
|
+
[ViewControlTypes_default.status]: StatusView_default,
|
|
4503
|
+
[ViewControlTypes_default.statusBg]: StatusBgView_default,
|
|
4389
4504
|
[ViewControlTypes_default.progressIndicator]: ProgressIndicator_default,
|
|
4390
4505
|
// [ViewControlTypes.timeUntilStarts]: TimeUntilStarts,
|
|
4391
4506
|
// [ViewControlTypes.timeUntilStartsStyled]: TimeUntilStartsStyled,
|
|
4392
|
-
[ViewControlTypes_default.aiGeneratedSummary]: AiGeneratedSummary_default
|
|
4507
|
+
[ViewControlTypes_default.aiGeneratedSummary]: AiGeneratedSummary_default,
|
|
4508
|
+
[ViewControlTypes_default.booleanView]: BooleanView_default,
|
|
4509
|
+
[ViewControlTypes_default.text]: LineTextView_default
|
|
4393
4510
|
};
|
|
4394
4511
|
const SelectedControlComponent = props.controlType ? ControlComponents[props.controlType] : void 0;
|
|
4395
|
-
return /* @__PURE__ */ (0,
|
|
4512
|
+
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 });
|
|
4396
4513
|
};
|
|
4397
4514
|
var ViewControl_default = ViewControl;
|
|
4398
4515
|
|
|
@@ -4407,13 +4524,13 @@ var InputControl_default = InputControl2;
|
|
|
4407
4524
|
init_InputControlType();
|
|
4408
4525
|
|
|
4409
4526
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
4410
|
-
var
|
|
4527
|
+
var import_react53 = __toESM(require("react"));
|
|
4411
4528
|
|
|
4412
4529
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
4413
|
-
var
|
|
4530
|
+
var import_react40 = __toESM(require("react"));
|
|
4414
4531
|
|
|
4415
4532
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
4416
|
-
var
|
|
4533
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
4417
4534
|
var TextNode = (props) => {
|
|
4418
4535
|
function cssStringToJson(cssString) {
|
|
4419
4536
|
const styleObject = {};
|
|
@@ -4468,36 +4585,36 @@ var TextNode = (props) => {
|
|
|
4468
4585
|
});
|
|
4469
4586
|
}
|
|
4470
4587
|
function renderWithLineBreaks(text) {
|
|
4471
|
-
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0,
|
|
4588
|
+
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { children: [
|
|
4472
4589
|
line,
|
|
4473
|
-
index < arr.length - 1 && /* @__PURE__ */ (0,
|
|
4590
|
+
index < arr.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("br", {})
|
|
4474
4591
|
] }, index));
|
|
4475
4592
|
}
|
|
4476
4593
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
4477
4594
|
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
4478
4595
|
const content = typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText;
|
|
4479
|
-
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ (0,
|
|
4596
|
+
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("sup", { children: content }) : props.node.format & 32 ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("sub", { children: content }) : content;
|
|
4480
4597
|
return (
|
|
4481
4598
|
// @ts-expect-error custom code
|
|
4482
|
-
/* @__PURE__ */ (0,
|
|
4599
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: formattedContent })
|
|
4483
4600
|
);
|
|
4484
4601
|
};
|
|
4485
4602
|
var TextNode_default = TextNode;
|
|
4486
4603
|
|
|
4487
4604
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
4488
|
-
var
|
|
4605
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4489
4606
|
var LineBreakNode = () => {
|
|
4490
|
-
return /* @__PURE__ */ (0,
|
|
4607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "py-0.5 lg:py-1.5" });
|
|
4491
4608
|
};
|
|
4492
4609
|
var LineBreakNode_default = LineBreakNode;
|
|
4493
4610
|
|
|
4494
4611
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
4495
|
-
var
|
|
4612
|
+
var import_react39 = __toESM(require("react"));
|
|
4496
4613
|
|
|
4497
4614
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
4498
4615
|
init_AssetUtility();
|
|
4499
4616
|
var import_dynamic5 = __toESM(require("next/dynamic"));
|
|
4500
|
-
var
|
|
4617
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4501
4618
|
var HlsPlayer3 = (0, import_dynamic5.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
4502
4619
|
var getNestedValue = (obj, path) => {
|
|
4503
4620
|
if (!obj || !path) return void 0;
|
|
@@ -4530,7 +4647,7 @@ var ImageNode = (props) => {
|
|
|
4530
4647
|
assets = [image];
|
|
4531
4648
|
}
|
|
4532
4649
|
if (assets && assets.length > 0) {
|
|
4533
|
-
return /* @__PURE__ */ (0,
|
|
4650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4534
4651
|
DeviceAssetSelector_default,
|
|
4535
4652
|
{
|
|
4536
4653
|
device: props.device,
|
|
@@ -4571,7 +4688,7 @@ var ImageNode = (props) => {
|
|
|
4571
4688
|
right: "justify-end"
|
|
4572
4689
|
};
|
|
4573
4690
|
const isHls = imageUrl.endsWith(".m3u8");
|
|
4574
|
-
const renderMedia = () => isHls ? /* @__PURE__ */ (0,
|
|
4691
|
+
const renderMedia = () => isHls ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4575
4692
|
HlsPlayer3,
|
|
4576
4693
|
{
|
|
4577
4694
|
assetUrl: imageUrl,
|
|
@@ -4584,7 +4701,7 @@ var ImageNode = (props) => {
|
|
|
4584
4701
|
apiBaseUrl: props.apiBaseUrl,
|
|
4585
4702
|
session: props.session
|
|
4586
4703
|
}
|
|
4587
|
-
) : /* @__PURE__ */ (0,
|
|
4704
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4588
4705
|
"img",
|
|
4589
4706
|
{
|
|
4590
4707
|
style: styles,
|
|
@@ -4597,7 +4714,7 @@ var ImageNode = (props) => {
|
|
|
4597
4714
|
}
|
|
4598
4715
|
);
|
|
4599
4716
|
if (props.node.width) {
|
|
4600
|
-
return /* @__PURE__ */ (0,
|
|
4717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: `flex ${FORMAT_CLASSES2[props.node.format] ?? ""}`, children: renderMedia() });
|
|
4601
4718
|
}
|
|
4602
4719
|
return renderMedia();
|
|
4603
4720
|
};
|
|
@@ -4607,7 +4724,7 @@ var ImageNode_default = ImageNode;
|
|
|
4607
4724
|
init_StyleTypes();
|
|
4608
4725
|
init_Hyperlink();
|
|
4609
4726
|
var import_dynamic6 = __toESM(require("next/dynamic"));
|
|
4610
|
-
var
|
|
4727
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4611
4728
|
var LinkNodeButton2 = (0, import_dynamic6.default)(() => Promise.resolve().then(() => (init_LinkNodeButton(), LinkNodeButton_exports)), {
|
|
4612
4729
|
ssr: false
|
|
4613
4730
|
});
|
|
@@ -4660,13 +4777,13 @@ var LinkNode = (props) => {
|
|
|
4660
4777
|
const isButton = node.isButton === true;
|
|
4661
4778
|
const renderChildren = () => {
|
|
4662
4779
|
if (!node.children || node.children.length === 0) return null;
|
|
4663
|
-
return /* @__PURE__ */ (0,
|
|
4780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx_runtime51.Fragment, { children: node.children.map((childNode, index) => {
|
|
4664
4781
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
4665
4782
|
if (!SelectedNode) {
|
|
4666
4783
|
console.warn("Unknown node type:", childNode.type);
|
|
4667
4784
|
return null;
|
|
4668
4785
|
}
|
|
4669
|
-
return /* @__PURE__ */ (0,
|
|
4786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react39.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4670
4787
|
SelectedNode,
|
|
4671
4788
|
{
|
|
4672
4789
|
node: childNode,
|
|
@@ -4679,15 +4796,15 @@ var LinkNode = (props) => {
|
|
|
4679
4796
|
};
|
|
4680
4797
|
const renderFallback = () => {
|
|
4681
4798
|
if ((!node.children || node.children.length === 0) && linkText) {
|
|
4682
|
-
return /* @__PURE__ */ (0,
|
|
4799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: linkText });
|
|
4683
4800
|
}
|
|
4684
4801
|
if ((!node.children || node.children.length === 0) && !linkText) {
|
|
4685
|
-
return /* @__PURE__ */ (0,
|
|
4802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("br", {});
|
|
4686
4803
|
}
|
|
4687
4804
|
return null;
|
|
4688
4805
|
};
|
|
4689
4806
|
if (isButton) {
|
|
4690
|
-
return /* @__PURE__ */ (0,
|
|
4807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
4691
4808
|
LinkNodeButton2,
|
|
4692
4809
|
{
|
|
4693
4810
|
node,
|
|
@@ -4705,7 +4822,7 @@ var LinkNode = (props) => {
|
|
|
4705
4822
|
}
|
|
4706
4823
|
);
|
|
4707
4824
|
}
|
|
4708
|
-
return /* @__PURE__ */ (0,
|
|
4825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
4709
4826
|
Hyperlink,
|
|
4710
4827
|
{
|
|
4711
4828
|
href: linkUrl || "#",
|
|
@@ -4721,10 +4838,10 @@ var LinkNode = (props) => {
|
|
|
4721
4838
|
var LinkNode_default = LinkNode;
|
|
4722
4839
|
|
|
4723
4840
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
4724
|
-
var
|
|
4841
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4725
4842
|
var SVGIconNode = ({ node }) => {
|
|
4726
4843
|
if (!node?.svgCode) return null;
|
|
4727
|
-
return /* @__PURE__ */ (0,
|
|
4844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4728
4845
|
"span",
|
|
4729
4846
|
{
|
|
4730
4847
|
style: {
|
|
@@ -4741,7 +4858,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
4741
4858
|
|
|
4742
4859
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
4743
4860
|
var import_katex = __toESM(require("katex"));
|
|
4744
|
-
var
|
|
4861
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4745
4862
|
var EquationNode = ({ node }) => {
|
|
4746
4863
|
const { equation, inline } = node;
|
|
4747
4864
|
let html = "";
|
|
@@ -4756,7 +4873,7 @@ var EquationNode = ({ node }) => {
|
|
|
4756
4873
|
});
|
|
4757
4874
|
}
|
|
4758
4875
|
if (inline) {
|
|
4759
|
-
return /* @__PURE__ */ (0,
|
|
4876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4760
4877
|
"span",
|
|
4761
4878
|
{
|
|
4762
4879
|
className: "katex-inline",
|
|
@@ -4764,7 +4881,7 @@ var EquationNode = ({ node }) => {
|
|
|
4764
4881
|
}
|
|
4765
4882
|
);
|
|
4766
4883
|
}
|
|
4767
|
-
return /* @__PURE__ */ (0,
|
|
4884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4768
4885
|
"div",
|
|
4769
4886
|
{
|
|
4770
4887
|
className: "katex-block my-3 text-center",
|
|
@@ -4775,7 +4892,7 @@ var EquationNode = ({ node }) => {
|
|
|
4775
4892
|
var EquationNode_default = EquationNode;
|
|
4776
4893
|
|
|
4777
4894
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
4778
|
-
var
|
|
4895
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4779
4896
|
function getNestedProperty(obj, path) {
|
|
4780
4897
|
if (!obj || !path) return null;
|
|
4781
4898
|
if (path.includes(".")) {
|
|
@@ -4788,7 +4905,7 @@ function getNestedProperty(obj, path) {
|
|
|
4788
4905
|
}
|
|
4789
4906
|
const value = obj[path];
|
|
4790
4907
|
if (Array.isArray(value)) {
|
|
4791
|
-
return value.map((item, index) => /* @__PURE__ */ (0,
|
|
4908
|
+
return value.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { children: String(item) }, index));
|
|
4792
4909
|
}
|
|
4793
4910
|
return value;
|
|
4794
4911
|
}
|
|
@@ -4849,7 +4966,7 @@ var DatafieldNode = (props) => {
|
|
|
4849
4966
|
const dataType = props.node.dataType;
|
|
4850
4967
|
if (isEmptyValue) return null;
|
|
4851
4968
|
if (dataType === "rawContent") {
|
|
4852
|
-
return /* @__PURE__ */ (0,
|
|
4969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4853
4970
|
PageBodyRenderer_default,
|
|
4854
4971
|
{
|
|
4855
4972
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -4865,12 +4982,12 @@ var DatafieldNode = (props) => {
|
|
|
4865
4982
|
}
|
|
4866
4983
|
);
|
|
4867
4984
|
}
|
|
4868
|
-
return /* @__PURE__ */ (0,
|
|
4985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4869
4986
|
"span",
|
|
4870
4987
|
{
|
|
4871
4988
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
4872
4989
|
style: styles,
|
|
4873
|
-
children: /* @__PURE__ */ (0,
|
|
4990
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4874
4991
|
ViewControl_default,
|
|
4875
4992
|
{
|
|
4876
4993
|
controlType: dataType,
|
|
@@ -4883,7 +5000,7 @@ var DatafieldNode = (props) => {
|
|
|
4883
5000
|
var DatafieldNode_default = DatafieldNode;
|
|
4884
5001
|
|
|
4885
5002
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
4886
|
-
var
|
|
5003
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4887
5004
|
var ParagraphNode = (props) => {
|
|
4888
5005
|
const NodeTypes2 = {
|
|
4889
5006
|
["text"]: TextNode_default,
|
|
@@ -4903,9 +5020,9 @@ var ParagraphNode = (props) => {
|
|
|
4903
5020
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
4904
5021
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
4905
5022
|
if (isInlineOnlyParent) {
|
|
4906
|
-
return /* @__PURE__ */ (0,
|
|
5023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_jsx_runtime55.Fragment, { children: hasChildren && props.node.children.map((node, index) => {
|
|
4907
5024
|
const SelectedNode = NodeTypes2[node.type];
|
|
4908
|
-
return /* @__PURE__ */ (0,
|
|
5025
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react40.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
4909
5026
|
SelectedNode,
|
|
4910
5027
|
{
|
|
4911
5028
|
node,
|
|
@@ -4917,10 +5034,10 @@ var ParagraphNode = (props) => {
|
|
|
4917
5034
|
) }, index);
|
|
4918
5035
|
}) });
|
|
4919
5036
|
}
|
|
4920
|
-
return /* @__PURE__ */ (0,
|
|
5037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: " " + formatClasses, children: [
|
|
4921
5038
|
hasChildren && props.node.children.map((node, index) => {
|
|
4922
5039
|
const SelectedNode = NodeTypes2[node.type];
|
|
4923
|
-
return /* @__PURE__ */ (0,
|
|
5040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react40.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
4924
5041
|
SelectedNode,
|
|
4925
5042
|
{
|
|
4926
5043
|
node,
|
|
@@ -4931,14 +5048,14 @@ var ParagraphNode = (props) => {
|
|
|
4931
5048
|
}
|
|
4932
5049
|
) }, index);
|
|
4933
5050
|
}),
|
|
4934
|
-
!hasChildren && /* @__PURE__ */ (0,
|
|
5051
|
+
!hasChildren && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "py-1.5 lg:py-2" })
|
|
4935
5052
|
] });
|
|
4936
5053
|
};
|
|
4937
5054
|
var ParagraphNode_default = ParagraphNode;
|
|
4938
5055
|
|
|
4939
5056
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
4940
|
-
var
|
|
4941
|
-
var
|
|
5057
|
+
var import_react41 = __toESM(require("react"));
|
|
5058
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
4942
5059
|
var HeadingNode = (props) => {
|
|
4943
5060
|
const NodeTypes2 = {
|
|
4944
5061
|
["text"]: TextNode_default,
|
|
@@ -4954,23 +5071,23 @@ var HeadingNode = (props) => {
|
|
|
4954
5071
|
{
|
|
4955
5072
|
}
|
|
4956
5073
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
4957
|
-
return /* @__PURE__ */ (0,
|
|
5074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_jsx_runtime56.Fragment, { children: import_react41.default.createElement(
|
|
4958
5075
|
HeadingTag,
|
|
4959
5076
|
{ className: formatClasses },
|
|
4960
5077
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
4961
5078
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
4962
|
-
return /* @__PURE__ */ (0,
|
|
5079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react41.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
4963
5080
|
})
|
|
4964
5081
|
) });
|
|
4965
5082
|
};
|
|
4966
5083
|
var HeadingNode_default = HeadingNode;
|
|
4967
5084
|
|
|
4968
5085
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
4969
|
-
var
|
|
5086
|
+
var import_react43 = __toESM(require("react"));
|
|
4970
5087
|
|
|
4971
5088
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
4972
|
-
var
|
|
4973
|
-
var
|
|
5089
|
+
var import_react42 = __toESM(require("react"));
|
|
5090
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
4974
5091
|
var ListItemNode = (props) => {
|
|
4975
5092
|
const NodeTypes2 = {
|
|
4976
5093
|
text: TextNode_default,
|
|
@@ -4987,66 +5104,66 @@ var ListItemNode = (props) => {
|
|
|
4987
5104
|
liStyle.fontSize = match[1].trim();
|
|
4988
5105
|
}
|
|
4989
5106
|
}
|
|
4990
|
-
return /* @__PURE__ */ (0,
|
|
5107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
4991
5108
|
const SelectedNode = NodeTypes2[node.type];
|
|
4992
5109
|
if (node.type === "linebreak") {
|
|
4993
5110
|
if (!foundFirstBreak) {
|
|
4994
5111
|
foundFirstBreak = true;
|
|
4995
|
-
return /* @__PURE__ */ (0,
|
|
5112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", {}, index);
|
|
4996
5113
|
} else {
|
|
4997
|
-
return /* @__PURE__ */ (0,
|
|
5114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "py-1 lg:py-2" }, index);
|
|
4998
5115
|
}
|
|
4999
5116
|
} else {
|
|
5000
5117
|
foundFirstBreak = false;
|
|
5001
|
-
return /* @__PURE__ */ (0,
|
|
5118
|
+
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);
|
|
5002
5119
|
}
|
|
5003
5120
|
}) });
|
|
5004
5121
|
};
|
|
5005
5122
|
var ListItemNode_default = ListItemNode;
|
|
5006
5123
|
|
|
5007
5124
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
5008
|
-
var
|
|
5125
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5009
5126
|
var ListNode = (props) => {
|
|
5010
5127
|
const NodeTypes2 = {
|
|
5011
5128
|
listitem: ListItemNode_default
|
|
5012
5129
|
};
|
|
5013
|
-
return /* @__PURE__ */ (0,
|
|
5014
|
-
props.node.listType == "bullet" && /* @__PURE__ */ (0,
|
|
5130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_react43.default.Fragment, { children: [
|
|
5131
|
+
props.node.listType == "bullet" && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
5015
5132
|
const SelectedNode = NodeTypes2[node.type];
|
|
5016
|
-
return /* @__PURE__ */ (0,
|
|
5133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react43.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
5017
5134
|
}) }),
|
|
5018
|
-
props.node.listType == "number" && /* @__PURE__ */ (0,
|
|
5135
|
+
props.node.listType == "number" && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
5019
5136
|
const SelectedNode = NodeTypes2[node.type];
|
|
5020
|
-
return /* @__PURE__ */ (0,
|
|
5137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react43.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
5021
5138
|
}) })
|
|
5022
5139
|
] });
|
|
5023
5140
|
};
|
|
5024
5141
|
var ListNode_default = ListNode;
|
|
5025
5142
|
|
|
5026
5143
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
5027
|
-
var
|
|
5028
|
-
var
|
|
5144
|
+
var import_react44 = __toESM(require("react"));
|
|
5145
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5029
5146
|
var QuoteNode = (props) => {
|
|
5030
5147
|
const NodeTypes2 = {
|
|
5031
5148
|
["text"]: TextNode_default,
|
|
5032
5149
|
["linebreak"]: LineBreakNode_default,
|
|
5033
5150
|
["link"]: LinkNode_default
|
|
5034
5151
|
};
|
|
5035
|
-
return /* @__PURE__ */ (0,
|
|
5152
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
5036
5153
|
const SelectedNode = NodeTypes2[node.type];
|
|
5037
|
-
return /* @__PURE__ */ (0,
|
|
5154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react44.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
5038
5155
|
}) });
|
|
5039
5156
|
};
|
|
5040
5157
|
var QuoteNode_default = QuoteNode;
|
|
5041
5158
|
|
|
5042
5159
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
5043
|
-
var
|
|
5160
|
+
var import_react46 = __toESM(require("react"));
|
|
5044
5161
|
var import_dynamic7 = __toESM(require("next/dynamic"));
|
|
5045
|
-
var
|
|
5162
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
5046
5163
|
var CopyButton2 = (0, import_dynamic7.default)(() => Promise.resolve().then(() => (init_CopyButton(), CopyButton_exports)), {
|
|
5047
5164
|
ssr: false,
|
|
5048
5165
|
// optional: fallback UI while loading
|
|
5049
|
-
loading: () => /* @__PURE__ */ (0,
|
|
5166
|
+
loading: () => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
5050
5167
|
});
|
|
5051
5168
|
var CodeNode = (props) => {
|
|
5052
5169
|
const NodeTypes2 = {
|
|
@@ -5060,14 +5177,14 @@ var CodeNode = (props) => {
|
|
|
5060
5177
|
if (node.type === "link") return node.text || node.url || "";
|
|
5061
5178
|
return "";
|
|
5062
5179
|
}).join("") ?? "";
|
|
5063
|
-
return /* @__PURE__ */ (0,
|
|
5064
|
-
/* @__PURE__ */ (0,
|
|
5065
|
-
/* @__PURE__ */ (0,
|
|
5066
|
-
/* @__PURE__ */ (0,
|
|
5180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { children: [
|
|
5181
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
5182
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { children: "Code Snippet" }),
|
|
5183
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(CopyButton2, { text: textContent })
|
|
5067
5184
|
] }),
|
|
5068
|
-
/* @__PURE__ */ (0,
|
|
5185
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.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) => {
|
|
5069
5186
|
const SelectedNode = NodeTypes2[node.type];
|
|
5070
|
-
return /* @__PURE__ */ (0,
|
|
5187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react46.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5071
5188
|
SelectedNode,
|
|
5072
5189
|
{
|
|
5073
5190
|
node,
|
|
@@ -5082,15 +5199,15 @@ var CodeNode = (props) => {
|
|
|
5082
5199
|
var CodeNode_default = CodeNode;
|
|
5083
5200
|
|
|
5084
5201
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
5085
|
-
var
|
|
5202
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
5086
5203
|
var HorizontalRuleNode = () => {
|
|
5087
|
-
return /* @__PURE__ */ (0,
|
|
5204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("hr", {});
|
|
5088
5205
|
};
|
|
5089
5206
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
5090
5207
|
|
|
5091
5208
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
5092
|
-
var
|
|
5093
|
-
var
|
|
5209
|
+
var import_react47 = __toESM(require("react"));
|
|
5210
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
5094
5211
|
var WidgetNode = (props) => {
|
|
5095
5212
|
const getWidgetParameters = () => {
|
|
5096
5213
|
const widgetInputParameters = {
|
|
@@ -5154,7 +5271,7 @@ var WidgetNode = (props) => {
|
|
|
5154
5271
|
};
|
|
5155
5272
|
const widgetCode = props.node?.widgetCode;
|
|
5156
5273
|
if (!widgetCode) {
|
|
5157
|
-
return /* @__PURE__ */ (0,
|
|
5274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_jsx_runtime63.Fragment, { children: "Invalid widget" });
|
|
5158
5275
|
}
|
|
5159
5276
|
const widgetParams = getWidgetParameters();
|
|
5160
5277
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -5163,7 +5280,7 @@ var WidgetNode = (props) => {
|
|
|
5163
5280
|
}
|
|
5164
5281
|
return (
|
|
5165
5282
|
// eslint-disable-next-line react-hooks/static-components
|
|
5166
|
-
/* @__PURE__ */ (0,
|
|
5283
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react47.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5167
5284
|
WidgetRenderer,
|
|
5168
5285
|
{
|
|
5169
5286
|
params: widgetParams,
|
|
@@ -5180,11 +5297,11 @@ var WidgetNode = (props) => {
|
|
|
5180
5297
|
var WidgetNode_default = WidgetNode;
|
|
5181
5298
|
|
|
5182
5299
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
5183
|
-
var
|
|
5300
|
+
var import_react52 = __toESM(require("react"));
|
|
5184
5301
|
|
|
5185
5302
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
5186
5303
|
var import_dynamic8 = __toESM(require("next/dynamic"));
|
|
5187
|
-
var
|
|
5304
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
5188
5305
|
var IframeClient2 = (0, import_dynamic8.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
5189
5306
|
ssr: false
|
|
5190
5307
|
});
|
|
@@ -5197,7 +5314,7 @@ var EmbedNode = (props) => {
|
|
|
5197
5314
|
} else {
|
|
5198
5315
|
src = props.node.embedSrc;
|
|
5199
5316
|
}
|
|
5200
|
-
return /* @__PURE__ */ (0,
|
|
5317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "aspect-video", children: src && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(IframeClient2, { src }) });
|
|
5201
5318
|
};
|
|
5202
5319
|
var EmbedNode_default = EmbedNode;
|
|
5203
5320
|
|
|
@@ -5376,10 +5493,10 @@ var PathUtility = class {
|
|
|
5376
5493
|
var PathUtility_default = new PathUtility();
|
|
5377
5494
|
|
|
5378
5495
|
// src/components/NoDataFound.tsx
|
|
5379
|
-
var
|
|
5496
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
5380
5497
|
var NoDataFound = () => {
|
|
5381
|
-
return /* @__PURE__ */ (0,
|
|
5382
|
-
/* @__PURE__ */ (0,
|
|
5498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
5499
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "mb-5", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5383
5500
|
"svg",
|
|
5384
5501
|
{
|
|
5385
5502
|
className: "w-10 h-10",
|
|
@@ -5387,7 +5504,7 @@ var NoDataFound = () => {
|
|
|
5387
5504
|
stroke: "currentColor",
|
|
5388
5505
|
viewBox: "0 0 24 24",
|
|
5389
5506
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5390
|
-
children: /* @__PURE__ */ (0,
|
|
5507
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5391
5508
|
"path",
|
|
5392
5509
|
{
|
|
5393
5510
|
strokeLinecap: "round",
|
|
@@ -5398,8 +5515,8 @@ var NoDataFound = () => {
|
|
|
5398
5515
|
)
|
|
5399
5516
|
}
|
|
5400
5517
|
) }) }),
|
|
5401
|
-
/* @__PURE__ */ (0,
|
|
5402
|
-
/* @__PURE__ */ (0,
|
|
5518
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
5519
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
5403
5520
|
] });
|
|
5404
5521
|
};
|
|
5405
5522
|
var NoDataFound_default = NoDataFound;
|
|
@@ -5410,7 +5527,7 @@ var import_dynamic10 = __toESM(require("next/dynamic"));
|
|
|
5410
5527
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
5411
5528
|
init_AssetUtility();
|
|
5412
5529
|
var import_dynamic9 = __toESM(require("next/dynamic"));
|
|
5413
|
-
var
|
|
5530
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
5414
5531
|
var HlsPlayer4 = (0, import_dynamic9.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
5415
5532
|
var deviceToMediaQuery = (device) => {
|
|
5416
5533
|
switch (device) {
|
|
@@ -5539,8 +5656,8 @@ var ImageGalleryNode = (props) => {
|
|
|
5539
5656
|
right: "justify-end"
|
|
5540
5657
|
};
|
|
5541
5658
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
5542
|
-
return /* @__PURE__ */ (0,
|
|
5543
|
-
hlsSources.length > 0 && /* @__PURE__ */ (0,
|
|
5659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
|
|
5660
|
+
hlsSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5544
5661
|
HlsPlayer4,
|
|
5545
5662
|
{
|
|
5546
5663
|
sources: hlsSources,
|
|
@@ -5555,7 +5672,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5555
5672
|
styles: hlsStyles
|
|
5556
5673
|
}
|
|
5557
5674
|
) }),
|
|
5558
|
-
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0,
|
|
5675
|
+
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, { children: staticFallback ? /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("picture", { children: [
|
|
5559
5676
|
DEVICE_ORDER.map((deviceKey) => {
|
|
5560
5677
|
const match = staticSources.find(
|
|
5561
5678
|
(img) => img.device === deviceKey
|
|
@@ -5567,7 +5684,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5567
5684
|
if (!srcUrl) {
|
|
5568
5685
|
return null;
|
|
5569
5686
|
}
|
|
5570
|
-
return /* @__PURE__ */ (0,
|
|
5687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5571
5688
|
"source",
|
|
5572
5689
|
{
|
|
5573
5690
|
media: deviceToMediaQuery(match.device),
|
|
@@ -5591,7 +5708,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5591
5708
|
if (img.borderRadius) {
|
|
5592
5709
|
styles.borderRadius = img.borderRadius;
|
|
5593
5710
|
}
|
|
5594
|
-
return /* @__PURE__ */ (0,
|
|
5711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5595
5712
|
"img",
|
|
5596
5713
|
{
|
|
5597
5714
|
loading: "lazy",
|
|
@@ -5606,7 +5723,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5606
5723
|
})()
|
|
5607
5724
|
] }) : (
|
|
5608
5725
|
/* Case 2: Only device-specific images exist */
|
|
5609
|
-
/* @__PURE__ */ (0,
|
|
5726
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, { children: staticSources.map((img, index) => {
|
|
5610
5727
|
const imageUrl = resolveImageUrl(img);
|
|
5611
5728
|
if (!imageUrl) {
|
|
5612
5729
|
return null;
|
|
@@ -5632,7 +5749,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5632
5749
|
default:
|
|
5633
5750
|
display = "block";
|
|
5634
5751
|
}
|
|
5635
|
-
return /* @__PURE__ */ (0,
|
|
5752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5636
5753
|
"img",
|
|
5637
5754
|
{
|
|
5638
5755
|
loading: "lazy",
|
|
@@ -5773,28 +5890,28 @@ var shouldRenderContainer = (node, dataItem, session) => {
|
|
|
5773
5890
|
|
|
5774
5891
|
// src/components/pageRenderingEngine/nodes/DocumentNode.tsx
|
|
5775
5892
|
init_AssetUtility();
|
|
5776
|
-
var
|
|
5893
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
5777
5894
|
var getNestedValue5 = (obj, path) => {
|
|
5778
5895
|
if (!obj || !path) return void 0;
|
|
5779
5896
|
return path.split(".").reduce((current, key) => {
|
|
5780
5897
|
return current && current[key] !== void 0 ? current[key] : void 0;
|
|
5781
5898
|
}, obj);
|
|
5782
5899
|
};
|
|
5783
|
-
var PdfIcon = () => /* @__PURE__ */ (0,
|
|
5900
|
+
var PdfIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5784
5901
|
"svg",
|
|
5785
5902
|
{
|
|
5786
5903
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5787
5904
|
viewBox: "0 0 48 48",
|
|
5788
5905
|
className: "w-10 h-10",
|
|
5789
5906
|
children: [
|
|
5790
|
-
/* @__PURE__ */ (0,
|
|
5907
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5791
5908
|
"path",
|
|
5792
5909
|
{
|
|
5793
5910
|
fill: "#e53935",
|
|
5794
5911
|
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"
|
|
5795
5912
|
}
|
|
5796
5913
|
),
|
|
5797
|
-
/* @__PURE__ */ (0,
|
|
5914
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5798
5915
|
"path",
|
|
5799
5916
|
{
|
|
5800
5917
|
fill: "#fff",
|
|
@@ -5804,55 +5921,55 @@ var PdfIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
5804
5921
|
]
|
|
5805
5922
|
}
|
|
5806
5923
|
);
|
|
5807
|
-
var ExcelIcon = () => /* @__PURE__ */ (0,
|
|
5924
|
+
var ExcelIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5808
5925
|
"svg",
|
|
5809
5926
|
{
|
|
5810
5927
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5811
5928
|
viewBox: "0 0 48 48",
|
|
5812
5929
|
className: "w-10 h-10",
|
|
5813
5930
|
children: [
|
|
5814
|
-
/* @__PURE__ */ (0,
|
|
5931
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5815
5932
|
"path",
|
|
5816
5933
|
{
|
|
5817
5934
|
fill: "#169154",
|
|
5818
5935
|
d: "M29,6H15.744C14.781,6,14,6.781,14,7.744v7.259h15V6z"
|
|
5819
5936
|
}
|
|
5820
5937
|
),
|
|
5821
|
-
/* @__PURE__ */ (0,
|
|
5938
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5822
5939
|
"path",
|
|
5823
5940
|
{
|
|
5824
5941
|
fill: "#18482a",
|
|
5825
5942
|
d: "M14,33.054v7.202C14,41.219,14.781,42,15.743,42H29v-8.946H14z"
|
|
5826
5943
|
}
|
|
5827
5944
|
),
|
|
5828
|
-
/* @__PURE__ */ (0,
|
|
5829
|
-
/* @__PURE__ */ (0,
|
|
5830
|
-
/* @__PURE__ */ (0,
|
|
5831
|
-
/* @__PURE__ */ (0,
|
|
5945
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { fill: "#0c8045", d: "M14 15.003H29V24.005000000000003H14z" }),
|
|
5946
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { fill: "#17472a", d: "M14 24.005H29V33.055H14z" }),
|
|
5947
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("g", { children: [
|
|
5948
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5832
5949
|
"path",
|
|
5833
5950
|
{
|
|
5834
5951
|
fill: "#29c27f",
|
|
5835
5952
|
d: "M42.256,6H29v9.003h15V7.744C44,6.781,43.219,6,42.256,6z"
|
|
5836
5953
|
}
|
|
5837
5954
|
),
|
|
5838
|
-
/* @__PURE__ */ (0,
|
|
5955
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5839
5956
|
"path",
|
|
5840
5957
|
{
|
|
5841
5958
|
fill: "#27663f",
|
|
5842
5959
|
d: "M29,33.054V42h13.257C43.219,42,44,41.219,44,40.257v-7.202H29z"
|
|
5843
5960
|
}
|
|
5844
5961
|
),
|
|
5845
|
-
/* @__PURE__ */ (0,
|
|
5846
|
-
/* @__PURE__ */ (0,
|
|
5962
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { fill: "#19ac65", d: "M29 15.003H44V24.005000000000003H29z" }),
|
|
5963
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { fill: "#129652", d: "M29 24.005H44V33.055H29z" })
|
|
5847
5964
|
] }),
|
|
5848
|
-
/* @__PURE__ */ (0,
|
|
5965
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5849
5966
|
"path",
|
|
5850
5967
|
{
|
|
5851
5968
|
fill: "#0c7238",
|
|
5852
5969
|
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"
|
|
5853
5970
|
}
|
|
5854
5971
|
),
|
|
5855
|
-
/* @__PURE__ */ (0,
|
|
5972
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5856
5973
|
"path",
|
|
5857
5974
|
{
|
|
5858
5975
|
fill: "#fff",
|
|
@@ -5862,7 +5979,7 @@ var ExcelIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
5862
5979
|
]
|
|
5863
5980
|
}
|
|
5864
5981
|
);
|
|
5865
|
-
var WordIcon = () => /* @__PURE__ */ (0,
|
|
5982
|
+
var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5866
5983
|
"svg",
|
|
5867
5984
|
{
|
|
5868
5985
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5870,14 +5987,14 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
5870
5987
|
className: "w-10 h-10",
|
|
5871
5988
|
baseProfile: "basic",
|
|
5872
5989
|
children: [
|
|
5873
|
-
/* @__PURE__ */ (0,
|
|
5990
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5874
5991
|
"path",
|
|
5875
5992
|
{
|
|
5876
5993
|
fill: "#283593",
|
|
5877
5994
|
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"
|
|
5878
5995
|
}
|
|
5879
5996
|
),
|
|
5880
|
-
/* @__PURE__ */ (0,
|
|
5997
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5881
5998
|
"linearGradient",
|
|
5882
5999
|
{
|
|
5883
6000
|
id: "qh2LT5tehRDFkLLfb-odWa",
|
|
@@ -5888,19 +6005,19 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
5888
6005
|
gradientTransform: "translate(0 -339.89)",
|
|
5889
6006
|
gradientUnits: "userSpaceOnUse",
|
|
5890
6007
|
children: [
|
|
5891
|
-
/* @__PURE__ */ (0,
|
|
5892
|
-
/* @__PURE__ */ (0,
|
|
6008
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("stop", { offset: "0", "stop-color": "#66c0ff" }),
|
|
6009
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("stop", { offset: ".26", "stop-color": "#0094f0" })
|
|
5893
6010
|
]
|
|
5894
6011
|
}
|
|
5895
6012
|
),
|
|
5896
|
-
/* @__PURE__ */ (0,
|
|
6013
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5897
6014
|
"path",
|
|
5898
6015
|
{
|
|
5899
6016
|
fill: "url(#qh2LT5tehRDFkLLfb-odWa)",
|
|
5900
6017
|
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"
|
|
5901
6018
|
}
|
|
5902
6019
|
),
|
|
5903
|
-
/* @__PURE__ */ (0,
|
|
6020
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5904
6021
|
"path",
|
|
5905
6022
|
{
|
|
5906
6023
|
fill: "#1e88e5",
|
|
@@ -5908,21 +6025,21 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
5908
6025
|
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"
|
|
5909
6026
|
}
|
|
5910
6027
|
),
|
|
5911
|
-
/* @__PURE__ */ (0,
|
|
6028
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5912
6029
|
"path",
|
|
5913
6030
|
{
|
|
5914
6031
|
fill: "#00e5ff",
|
|
5915
6032
|
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"
|
|
5916
6033
|
}
|
|
5917
6034
|
),
|
|
5918
|
-
/* @__PURE__ */ (0,
|
|
6035
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5919
6036
|
"path",
|
|
5920
6037
|
{
|
|
5921
6038
|
fill: "#1565c0",
|
|
5922
6039
|
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"
|
|
5923
6040
|
}
|
|
5924
6041
|
),
|
|
5925
|
-
/* @__PURE__ */ (0,
|
|
6042
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5926
6043
|
"path",
|
|
5927
6044
|
{
|
|
5928
6045
|
fill: "#fff",
|
|
@@ -5932,42 +6049,42 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
5932
6049
|
]
|
|
5933
6050
|
}
|
|
5934
6051
|
);
|
|
5935
|
-
var StandardIcon = () => /* @__PURE__ */ (0,
|
|
6052
|
+
var StandardIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5936
6053
|
"svg",
|
|
5937
6054
|
{
|
|
5938
6055
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5939
6056
|
viewBox: "0 0 48 48",
|
|
5940
6057
|
className: "w-10 h-10",
|
|
5941
6058
|
children: [
|
|
5942
|
-
/* @__PURE__ */ (0,
|
|
5943
|
-
/* @__PURE__ */ (0,
|
|
6059
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
6060
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" })
|
|
5944
6061
|
]
|
|
5945
6062
|
}
|
|
5946
6063
|
);
|
|
5947
|
-
var PowerPointIcon = () => /* @__PURE__ */ (0,
|
|
6064
|
+
var PowerPointIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5948
6065
|
"svg",
|
|
5949
6066
|
{
|
|
5950
6067
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5951
6068
|
viewBox: "0 0 48 48",
|
|
5952
6069
|
className: "w-10 h-10",
|
|
5953
6070
|
children: [
|
|
5954
|
-
/* @__PURE__ */ (0,
|
|
6071
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5955
6072
|
"path",
|
|
5956
6073
|
{
|
|
5957
6074
|
fill: "#dc4c2c",
|
|
5958
6075
|
d: "M8,24c0,9.941,8.059,18,18,18s18-8.059,18-18H26H8z"
|
|
5959
6076
|
}
|
|
5960
6077
|
),
|
|
5961
|
-
/* @__PURE__ */ (0,
|
|
5962
|
-
/* @__PURE__ */ (0,
|
|
5963
|
-
/* @__PURE__ */ (0,
|
|
6078
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { fill: "#f7a278", d: "M26,6v18h18C44,14.059,35.941,6,26,6z" }),
|
|
6079
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { fill: "#c06346", d: "M26,6C16.059,6,8,14.059,8,24h18V6z" }),
|
|
6080
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5964
6081
|
"path",
|
|
5965
6082
|
{
|
|
5966
6083
|
fill: "#9b341f",
|
|
5967
6084
|
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"
|
|
5968
6085
|
}
|
|
5969
6086
|
),
|
|
5970
|
-
/* @__PURE__ */ (0,
|
|
6087
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5971
6088
|
"path",
|
|
5972
6089
|
{
|
|
5973
6090
|
fill: "#fff",
|
|
@@ -5977,16 +6094,16 @@ var PowerPointIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
5977
6094
|
]
|
|
5978
6095
|
}
|
|
5979
6096
|
);
|
|
5980
|
-
var TextIcon = () => /* @__PURE__ */ (0,
|
|
6097
|
+
var TextIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5981
6098
|
"svg",
|
|
5982
6099
|
{
|
|
5983
6100
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5984
6101
|
viewBox: "0 0 48 48",
|
|
5985
6102
|
className: "w-10 h-10",
|
|
5986
6103
|
children: [
|
|
5987
|
-
/* @__PURE__ */ (0,
|
|
5988
|
-
/* @__PURE__ */ (0,
|
|
5989
|
-
/* @__PURE__ */ (0,
|
|
6104
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
6105
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" }),
|
|
6106
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5990
6107
|
"path",
|
|
5991
6108
|
{
|
|
5992
6109
|
fill: "#1976D2",
|
|
@@ -5996,7 +6113,7 @@ var TextIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
5996
6113
|
]
|
|
5997
6114
|
}
|
|
5998
6115
|
);
|
|
5999
|
-
var ArchiveIcon = () => /* @__PURE__ */ (0,
|
|
6116
|
+
var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
6000
6117
|
"svg",
|
|
6001
6118
|
{
|
|
6002
6119
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6006,14 +6123,14 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
6006
6123
|
version: "1.0",
|
|
6007
6124
|
className: "w-10 h-10",
|
|
6008
6125
|
children: [
|
|
6009
|
-
/* @__PURE__ */ (0,
|
|
6126
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("clipPath", { id: "273d29c8a6", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6010
6127
|
"path",
|
|
6011
6128
|
{
|
|
6012
6129
|
d: "M 8.90625 0 L 65.90625 0 L 65.90625 75 L 8.90625 75 Z M 8.90625 0 ",
|
|
6013
6130
|
"clip-rule": "nonzero"
|
|
6014
6131
|
}
|
|
6015
6132
|
) }) }),
|
|
6016
|
-
/* @__PURE__ */ (0,
|
|
6133
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("g", { "clip-path": "url(#273d29c8a6)", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6017
6134
|
"path",
|
|
6018
6135
|
{
|
|
6019
6136
|
fill: "#ff9100",
|
|
@@ -6022,7 +6139,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
6022
6139
|
"fill-rule": "nonzero"
|
|
6023
6140
|
}
|
|
6024
6141
|
) }),
|
|
6025
|
-
/* @__PURE__ */ (0,
|
|
6142
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6026
6143
|
"path",
|
|
6027
6144
|
{
|
|
6028
6145
|
fill: "#fbe9e7",
|
|
@@ -6031,7 +6148,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
6031
6148
|
"fill-rule": "nonzero"
|
|
6032
6149
|
}
|
|
6033
6150
|
),
|
|
6034
|
-
/* @__PURE__ */ (0,
|
|
6151
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6035
6152
|
"path",
|
|
6036
6153
|
{
|
|
6037
6154
|
fill: "#ffe0b2",
|
|
@@ -6040,7 +6157,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
6040
6157
|
"fill-rule": "nonzero"
|
|
6041
6158
|
}
|
|
6042
6159
|
),
|
|
6043
|
-
/* @__PURE__ */ (0,
|
|
6160
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6044
6161
|
"path",
|
|
6045
6162
|
{
|
|
6046
6163
|
fill: "#ffe0b2",
|
|
@@ -6049,7 +6166,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
|
6049
6166
|
"fill-rule": "nonzero"
|
|
6050
6167
|
}
|
|
6051
6168
|
),
|
|
6052
|
-
/* @__PURE__ */ (0,
|
|
6169
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6053
6170
|
"path",
|
|
6054
6171
|
{
|
|
6055
6172
|
fill: "#ffe0b2",
|
|
@@ -6125,8 +6242,8 @@ var DocumentNode = (props) => {
|
|
|
6125
6242
|
}
|
|
6126
6243
|
}
|
|
6127
6244
|
if (documents.length === 0) {
|
|
6128
|
-
return /* @__PURE__ */ (0,
|
|
6129
|
-
/* @__PURE__ */ (0,
|
|
6245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_jsx_runtime69.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "py-4 px-2 bg-neutral-weak border rounded text-center flex flex-col gap-2", children: [
|
|
6246
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "mx-auto w-10 h-10 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6130
6247
|
"svg",
|
|
6131
6248
|
{
|
|
6132
6249
|
className: "w-5 h-5",
|
|
@@ -6134,7 +6251,7 @@ var DocumentNode = (props) => {
|
|
|
6134
6251
|
stroke: "currentColor",
|
|
6135
6252
|
viewBox: "0 0 24 24",
|
|
6136
6253
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6137
|
-
children: /* @__PURE__ */ (0,
|
|
6254
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6138
6255
|
"path",
|
|
6139
6256
|
{
|
|
6140
6257
|
strokeLinecap: "round",
|
|
@@ -6145,11 +6262,11 @@ var DocumentNode = (props) => {
|
|
|
6145
6262
|
)
|
|
6146
6263
|
}
|
|
6147
6264
|
) }),
|
|
6148
|
-
/* @__PURE__ */ (0,
|
|
6149
|
-
/* @__PURE__ */ (0,
|
|
6265
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "text-sm font-medium", children: "No documents found" }),
|
|
6266
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "text-xs", children: "No records found. Data may be empty or not available at the moment." })
|
|
6150
6267
|
] }) });
|
|
6151
6268
|
}
|
|
6152
|
-
return /* @__PURE__ */ (0,
|
|
6269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "", children: documents.map((doc, index) => {
|
|
6153
6270
|
const documentUrl = AssetUtility_default.resolveUrl(
|
|
6154
6271
|
props.assetBaseUrl,
|
|
6155
6272
|
doc.assetUrl
|
|
@@ -6167,16 +6284,16 @@ var DocumentNode = (props) => {
|
|
|
6167
6284
|
}
|
|
6168
6285
|
}
|
|
6169
6286
|
const { Icon: Icon2, extLabel } = getFileDetails(documentUrl);
|
|
6170
|
-
return /* @__PURE__ */ (0,
|
|
6287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
6171
6288
|
"div",
|
|
6172
6289
|
{
|
|
6173
6290
|
className: `flex items-center justify-between py-4 bg-default gap-4 ${index !== 0 ? "border-t" : ""}`,
|
|
6174
6291
|
children: [
|
|
6175
|
-
/* @__PURE__ */ (0,
|
|
6176
|
-
/* @__PURE__ */ (0,
|
|
6177
|
-
/* @__PURE__ */ (0,
|
|
6292
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center space-x-4", children: [
|
|
6293
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "flex items-center justify-center p-2 rounded bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Icon2, {}) }),
|
|
6294
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "flex items-baseline space-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("h4", { className: "text-base font-semibold", children: documentTitle }) })
|
|
6178
6295
|
] }),
|
|
6179
|
-
/* @__PURE__ */ (0,
|
|
6296
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
6180
6297
|
"a",
|
|
6181
6298
|
{
|
|
6182
6299
|
href: documentUrl,
|
|
@@ -6184,7 +6301,7 @@ var DocumentNode = (props) => {
|
|
|
6184
6301
|
rel: "noopener noreferrer",
|
|
6185
6302
|
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",
|
|
6186
6303
|
children: [
|
|
6187
|
-
/* @__PURE__ */ (0,
|
|
6304
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
6188
6305
|
"svg",
|
|
6189
6306
|
{
|
|
6190
6307
|
className: "w-4 h-4 mr-2",
|
|
@@ -6192,7 +6309,7 @@ var DocumentNode = (props) => {
|
|
|
6192
6309
|
stroke: "currentColor",
|
|
6193
6310
|
viewBox: "0 0 24 24",
|
|
6194
6311
|
children: [
|
|
6195
|
-
/* @__PURE__ */ (0,
|
|
6312
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6196
6313
|
"path",
|
|
6197
6314
|
{
|
|
6198
6315
|
strokeLinecap: "round",
|
|
@@ -6201,7 +6318,7 @@ var DocumentNode = (props) => {
|
|
|
6201
6318
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
|
6202
6319
|
}
|
|
6203
6320
|
),
|
|
6204
|
-
/* @__PURE__ */ (0,
|
|
6321
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6205
6322
|
"path",
|
|
6206
6323
|
{
|
|
6207
6324
|
strokeLinecap: "round",
|
|
@@ -6226,7 +6343,7 @@ var DocumentNode = (props) => {
|
|
|
6226
6343
|
var DocumentNode_default = DocumentNode;
|
|
6227
6344
|
|
|
6228
6345
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
6229
|
-
var
|
|
6346
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
6230
6347
|
var Pagination2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_Pagination(), Pagination_exports)), { ssr: true });
|
|
6231
6348
|
var Slider2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_Slider(), Slider_exports)), {
|
|
6232
6349
|
ssr: false
|
|
@@ -6480,7 +6597,7 @@ var DivContainer = async (props) => {
|
|
|
6480
6597
|
response = await serviceClient.get(endpoint);
|
|
6481
6598
|
result = response?.result;
|
|
6482
6599
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
6483
|
-
return /* @__PURE__ */ (0,
|
|
6600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(NoDataFound_default, {});
|
|
6484
6601
|
}
|
|
6485
6602
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
6486
6603
|
childCollectionData = getNestedValue6(
|
|
@@ -6500,7 +6617,7 @@ var DivContainer = async (props) => {
|
|
|
6500
6617
|
}
|
|
6501
6618
|
const SelectedNode = NodeTypes2[node.type];
|
|
6502
6619
|
if (!SelectedNode) return null;
|
|
6503
|
-
return /* @__PURE__ */ (0,
|
|
6620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react52.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6504
6621
|
SelectedNode,
|
|
6505
6622
|
{
|
|
6506
6623
|
node,
|
|
@@ -6632,14 +6749,14 @@ var DivContainer = async (props) => {
|
|
|
6632
6749
|
props.node.bgClass,
|
|
6633
6750
|
noLinkColor && "no-link-color"
|
|
6634
6751
|
].filter(Boolean).join(" ");
|
|
6635
|
-
return /* @__PURE__ */ (0,
|
|
6636
|
-
/* @__PURE__ */ (0,
|
|
6752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_react52.default.Fragment, { children: [
|
|
6753
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6637
6754
|
"style",
|
|
6638
6755
|
{
|
|
6639
6756
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
6640
6757
|
}
|
|
6641
6758
|
),
|
|
6642
|
-
/* @__PURE__ */ (0,
|
|
6759
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react52.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6643
6760
|
Wrapper,
|
|
6644
6761
|
{
|
|
6645
6762
|
id: guid,
|
|
@@ -6653,11 +6770,11 @@ var DivContainer = async (props) => {
|
|
|
6653
6770
|
item,
|
|
6654
6771
|
idx,
|
|
6655
6772
|
props.href ? void 0 : item?.links?.view
|
|
6656
|
-
)?.map((child, i) => /* @__PURE__ */ (0,
|
|
6773
|
+
)?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react52.default.Fragment, { children: child }, i)) : renderChildren(props.node.children, props, item, idx)
|
|
6657
6774
|
)
|
|
6658
6775
|
}
|
|
6659
6776
|
) }),
|
|
6660
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0,
|
|
6777
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6661
6778
|
Pagination2,
|
|
6662
6779
|
{
|
|
6663
6780
|
path: props.path,
|
|
@@ -6670,7 +6787,7 @@ var DivContainer = async (props) => {
|
|
|
6670
6787
|
var DivContainer_default = DivContainer;
|
|
6671
6788
|
|
|
6672
6789
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
6673
|
-
var
|
|
6790
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
6674
6791
|
var NodeTypes = {
|
|
6675
6792
|
["paragraph"]: ParagraphNode_default,
|
|
6676
6793
|
["heading"]: HeadingNode_default,
|
|
@@ -6707,14 +6824,14 @@ var PageBodyRenderer = (props) => {
|
|
|
6707
6824
|
}
|
|
6708
6825
|
return true;
|
|
6709
6826
|
};
|
|
6710
|
-
return /* @__PURE__ */ (0,
|
|
6827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react53.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
6711
6828
|
{
|
|
6712
6829
|
}
|
|
6713
6830
|
const SelectedNode = NodeTypes[node.type];
|
|
6714
6831
|
if (!shouldRenderNode(node)) {
|
|
6715
6832
|
return null;
|
|
6716
6833
|
}
|
|
6717
|
-
return /* @__PURE__ */ (0,
|
|
6834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react53.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react53.default.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react53.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6718
6835
|
SelectedNode,
|
|
6719
6836
|
{
|
|
6720
6837
|
node,
|
|
@@ -6730,7 +6847,7 @@ var PageBodyRenderer = (props) => {
|
|
|
6730
6847
|
device: props.device,
|
|
6731
6848
|
widgetRenderer: props.widgetRenderer
|
|
6732
6849
|
}
|
|
6733
|
-
) }) : /* @__PURE__ */ (0,
|
|
6850
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react53.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6734
6851
|
SelectedNode,
|
|
6735
6852
|
{
|
|
6736
6853
|
node,
|
|
@@ -6751,13 +6868,13 @@ var PageBodyRenderer = (props) => {
|
|
|
6751
6868
|
var PageBodyRenderer_default = PageBodyRenderer;
|
|
6752
6869
|
|
|
6753
6870
|
// src/components/Toast.tsx
|
|
6754
|
-
var
|
|
6871
|
+
var import_react54 = require("react");
|
|
6755
6872
|
init_ToastService();
|
|
6756
|
-
var
|
|
6873
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
6757
6874
|
var Toast = () => {
|
|
6758
|
-
const [showToast, setShowToast] = (0,
|
|
6759
|
-
const [message, setMessage] = (0,
|
|
6760
|
-
const [messageType, setMessageType] = (0,
|
|
6875
|
+
const [showToast, setShowToast] = (0, import_react54.useState)(false);
|
|
6876
|
+
const [message, setMessage] = (0, import_react54.useState)("");
|
|
6877
|
+
const [messageType, setMessageType] = (0, import_react54.useState)("error");
|
|
6761
6878
|
ToastService_default.showError = function(message2) {
|
|
6762
6879
|
setShowToast(true);
|
|
6763
6880
|
setMessage(message2);
|
|
@@ -6796,8 +6913,8 @@ var Toast = () => {
|
|
|
6796
6913
|
const closeToast = () => {
|
|
6797
6914
|
setShowToast(false);
|
|
6798
6915
|
};
|
|
6799
|
-
return /* @__PURE__ */ (0,
|
|
6800
|
-
/* @__PURE__ */ (0,
|
|
6916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_jsx_runtime74.Fragment, { children: showToast && /* @__PURE__ */ (0, import_jsx_runtime74.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_runtime74.jsxs)("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
6917
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6801
6918
|
"span",
|
|
6802
6919
|
{
|
|
6803
6920
|
className: "font-medium text-inherit text-sm",
|
|
@@ -6805,7 +6922,7 @@ var Toast = () => {
|
|
|
6805
6922
|
children: message
|
|
6806
6923
|
}
|
|
6807
6924
|
),
|
|
6808
|
-
/* @__PURE__ */ (0,
|
|
6925
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6809
6926
|
"svg",
|
|
6810
6927
|
{
|
|
6811
6928
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6813,7 +6930,7 @@ var Toast = () => {
|
|
|
6813
6930
|
fill: "none",
|
|
6814
6931
|
viewBox: "0 0 24 24",
|
|
6815
6932
|
stroke: "currentColor",
|
|
6816
|
-
children: /* @__PURE__ */ (0,
|
|
6933
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
6817
6934
|
}
|
|
6818
6935
|
) })
|
|
6819
6936
|
] }) }) });
|
|
@@ -6840,7 +6957,7 @@ init_TimeInput();
|
|
|
6840
6957
|
// src/components/NavigationTabsV2.tsx
|
|
6841
6958
|
var import_link3 = __toESM(require("next/link"));
|
|
6842
6959
|
var import_navigation = require("next/navigation");
|
|
6843
|
-
var
|
|
6960
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
6844
6961
|
function resolveRoutePlaceholders(route, params) {
|
|
6845
6962
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
6846
6963
|
const value = params[key];
|
|
@@ -6865,8 +6982,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
6865
6982
|
isActive: tab.isActive
|
|
6866
6983
|
})) || [];
|
|
6867
6984
|
if (mappedTabs.length === 0) return null;
|
|
6868
|
-
return /* @__PURE__ */ (0,
|
|
6869
|
-
return /* @__PURE__ */ (0,
|
|
6985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
6986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_link3.default, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6870
6987
|
"div",
|
|
6871
6988
|
{
|
|
6872
6989
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -6879,14 +6996,14 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
6879
6996
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
6880
6997
|
|
|
6881
6998
|
// src/components/dataForm/DataList.tsx
|
|
6882
|
-
var
|
|
6999
|
+
var import_react57 = __toESM(require("react"));
|
|
6883
7000
|
var import_navigation2 = require("next/navigation");
|
|
6884
7001
|
|
|
6885
7002
|
// src/components/dataForm/NoContentView.tsx
|
|
6886
|
-
var
|
|
6887
|
-
var
|
|
7003
|
+
var import_react55 = __toESM(require("react"));
|
|
7004
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
6888
7005
|
var NoContentView = (props) => {
|
|
6889
|
-
return /* @__PURE__ */ (0,
|
|
7006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react55.default.Fragment, { children: props.isDataFound === false && props.children });
|
|
6890
7007
|
};
|
|
6891
7008
|
var NoContentView_default = NoContentView;
|
|
6892
7009
|
|
|
@@ -6894,39 +7011,39 @@ var NoContentView_default = NoContentView;
|
|
|
6894
7011
|
init_InputControlType();
|
|
6895
7012
|
|
|
6896
7013
|
// src/components/dataForm/ContentView.tsx
|
|
6897
|
-
var
|
|
6898
|
-
var
|
|
7014
|
+
var import_react56 = __toESM(require("react"));
|
|
7015
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
6899
7016
|
var ContentView = (props) => {
|
|
6900
|
-
return /* @__PURE__ */ (0,
|
|
6901
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
6902
|
-
/* @__PURE__ */ (0,
|
|
6903
|
-
/* @__PURE__ */ (0,
|
|
6904
|
-
/* @__PURE__ */ (0,
|
|
6905
|
-
/* @__PURE__ */ (0,
|
|
6906
|
-
/* @__PURE__ */ (0,
|
|
7017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_react56.default.Fragment, { children: [
|
|
7018
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
7019
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
7020
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
7021
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ml-2", children: [
|
|
7022
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
7023
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
6907
7024
|
] })
|
|
6908
7025
|
] }),
|
|
6909
|
-
/* @__PURE__ */ (0,
|
|
6910
|
-
/* @__PURE__ */ (0,
|
|
6911
|
-
/* @__PURE__ */ (0,
|
|
6912
|
-
/* @__PURE__ */ (0,
|
|
6913
|
-
/* @__PURE__ */ (0,
|
|
6914
|
-
/* @__PURE__ */ (0,
|
|
6915
|
-
/* @__PURE__ */ (0,
|
|
7026
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
7027
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "animate-pulse", children: [
|
|
7028
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
7029
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
7030
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
7031
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
7032
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
6916
7033
|
] }),
|
|
6917
|
-
/* @__PURE__ */ (0,
|
|
6918
|
-
/* @__PURE__ */ (0,
|
|
6919
|
-
/* @__PURE__ */ (0,
|
|
6920
|
-
/* @__PURE__ */ (0,
|
|
6921
|
-
/* @__PURE__ */ (0,
|
|
6922
|
-
/* @__PURE__ */ (0,
|
|
7034
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "animate-pulse", children: [
|
|
7035
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
7036
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
7037
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
7038
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
7039
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
6923
7040
|
] }),
|
|
6924
|
-
/* @__PURE__ */ (0,
|
|
6925
|
-
/* @__PURE__ */ (0,
|
|
6926
|
-
/* @__PURE__ */ (0,
|
|
6927
|
-
/* @__PURE__ */ (0,
|
|
6928
|
-
/* @__PURE__ */ (0,
|
|
6929
|
-
/* @__PURE__ */ (0,
|
|
7041
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "animate-pulse", children: [
|
|
7042
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
7043
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
7044
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
7045
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
7046
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
6930
7047
|
] })
|
|
6931
7048
|
] })
|
|
6932
7049
|
] }) }),
|
|
@@ -6986,7 +7103,7 @@ function FormReducer(state, action) {
|
|
|
6986
7103
|
var FormReducer_default = FormReducer;
|
|
6987
7104
|
|
|
6988
7105
|
// src/components/dataForm/DataList.tsx
|
|
6989
|
-
var
|
|
7106
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
6990
7107
|
var DataList = (props) => {
|
|
6991
7108
|
const router = (0, import_navigation2.useRouter)();
|
|
6992
7109
|
let builder = new OdataBuilder(props.path);
|
|
@@ -6994,9 +7111,9 @@ var DataList = (props) => {
|
|
|
6994
7111
|
let activePageNumber = 0;
|
|
6995
7112
|
let pages = 0;
|
|
6996
7113
|
console.log(props.addLinkText);
|
|
6997
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
6998
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
6999
|
-
(0,
|
|
7114
|
+
const [isDataFound, setIsDataFound] = (0, import_react57.useState)(null);
|
|
7115
|
+
const [searchTerm, setSearchTerm] = (0, import_react57.useState)(props.query?.searchTerm ?? "");
|
|
7116
|
+
(0, import_react57.useEffect)(() => {
|
|
7000
7117
|
if (props?.dataset) {
|
|
7001
7118
|
if (props?.dataset.result && props.dataset.result.length > 0) {
|
|
7002
7119
|
setIsDataFound(true);
|
|
@@ -7005,7 +7122,7 @@ var DataList = (props) => {
|
|
|
7005
7122
|
}
|
|
7006
7123
|
}
|
|
7007
7124
|
}, [props.dataset]);
|
|
7008
|
-
(0,
|
|
7125
|
+
(0, import_react57.useEffect)(() => {
|
|
7009
7126
|
if (!props.query?.["$filter"] || !props.filters) return;
|
|
7010
7127
|
const filterQuery = props.query["$filter"];
|
|
7011
7128
|
props.filters.forEach((filter) => {
|
|
@@ -7024,7 +7141,7 @@ var DataList = (props) => {
|
|
|
7024
7141
|
if (path.includes(".")) {
|
|
7025
7142
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
7026
7143
|
} else if (Array.isArray(obj[path])) {
|
|
7027
|
-
return obj[path].map((item, index) => /* @__PURE__ */ (0,
|
|
7144
|
+
return obj[path].map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { children: item }, index));
|
|
7028
7145
|
} else {
|
|
7029
7146
|
return obj[path];
|
|
7030
7147
|
}
|
|
@@ -7033,11 +7150,11 @@ var DataList = (props) => {
|
|
|
7033
7150
|
inputValues: {},
|
|
7034
7151
|
lastPropertyChanged: ""
|
|
7035
7152
|
};
|
|
7036
|
-
const [formState, dispatch] = (0,
|
|
7153
|
+
const [formState, dispatch] = (0, import_react57.useReducer)(FormReducer_default, initialState);
|
|
7037
7154
|
const getSearchableColumns = () => {
|
|
7038
7155
|
return props.columns?.filter((c) => c.isSearchable)?.map((c) => c.name)?.join(",");
|
|
7039
7156
|
};
|
|
7040
|
-
const handleFilterChange = (0,
|
|
7157
|
+
const handleFilterChange = (0, import_react57.useCallback)(
|
|
7041
7158
|
(updatedValues) => {
|
|
7042
7159
|
dispatch({
|
|
7043
7160
|
type: FORM_INPUT_UPDATE,
|
|
@@ -7068,7 +7185,7 @@ var DataList = (props) => {
|
|
|
7068
7185
|
},
|
|
7069
7186
|
[dispatch, props, router]
|
|
7070
7187
|
);
|
|
7071
|
-
(0,
|
|
7188
|
+
(0, import_react57.useEffect)(() => {
|
|
7072
7189
|
if (!props.columns.some((col) => col.isSearchable)) {
|
|
7073
7190
|
return;
|
|
7074
7191
|
}
|
|
@@ -7103,30 +7220,30 @@ var DataList = (props) => {
|
|
|
7103
7220
|
const renderPageNumbers = () => {
|
|
7104
7221
|
if (pages <= 10) {
|
|
7105
7222
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
7106
|
-
(page) => /* @__PURE__ */ (0,
|
|
7223
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react57.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7107
7224
|
Hyperlink,
|
|
7108
7225
|
{
|
|
7109
7226
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7110
7227
|
href: builder.getNewPageUrl(page),
|
|
7111
7228
|
children: page
|
|
7112
7229
|
}
|
|
7113
|
-
) : /* @__PURE__ */ (0,
|
|
7230
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
7114
7231
|
);
|
|
7115
7232
|
} else {
|
|
7116
7233
|
const showFirstPages = activePageNumber <= 5;
|
|
7117
7234
|
const showLastPages = activePageNumber > pages - 5;
|
|
7118
7235
|
if (showFirstPages) {
|
|
7119
|
-
return /* @__PURE__ */ (0,
|
|
7120
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0,
|
|
7236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
7237
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react57.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7121
7238
|
Hyperlink,
|
|
7122
7239
|
{
|
|
7123
7240
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7124
7241
|
href: builder.getNewPageUrl(page),
|
|
7125
7242
|
children: page
|
|
7126
7243
|
}
|
|
7127
|
-
) : /* @__PURE__ */ (0,
|
|
7128
|
-
/* @__PURE__ */ (0,
|
|
7129
|
-
/* @__PURE__ */ (0,
|
|
7244
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
7245
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7246
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7130
7247
|
Hyperlink,
|
|
7131
7248
|
{
|
|
7132
7249
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7134,7 +7251,7 @@ var DataList = (props) => {
|
|
|
7134
7251
|
children: pages - 1
|
|
7135
7252
|
}
|
|
7136
7253
|
),
|
|
7137
|
-
/* @__PURE__ */ (0,
|
|
7254
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7138
7255
|
Hyperlink,
|
|
7139
7256
|
{
|
|
7140
7257
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7142,7 +7259,7 @@ var DataList = (props) => {
|
|
|
7142
7259
|
children: pages
|
|
7143
7260
|
}
|
|
7144
7261
|
),
|
|
7145
|
-
/* @__PURE__ */ (0,
|
|
7262
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
7146
7263
|
"select",
|
|
7147
7264
|
{
|
|
7148
7265
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -7154,18 +7271,18 @@ var DataList = (props) => {
|
|
|
7154
7271
|
}
|
|
7155
7272
|
},
|
|
7156
7273
|
children: [
|
|
7157
|
-
/* @__PURE__ */ (0,
|
|
7274
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("option", { className: "", value: "", children: "Jump to" }),
|
|
7158
7275
|
Array.from(
|
|
7159
7276
|
{ length: Math.max(0, pages - 10) },
|
|
7160
7277
|
(_, index) => index + 9
|
|
7161
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
7278
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("option", { value: page, children: page }, page))
|
|
7162
7279
|
]
|
|
7163
7280
|
}
|
|
7164
7281
|
) })
|
|
7165
7282
|
] });
|
|
7166
7283
|
} else if (showLastPages) {
|
|
7167
|
-
return /* @__PURE__ */ (0,
|
|
7168
|
-
/* @__PURE__ */ (0,
|
|
7284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
7285
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7169
7286
|
Hyperlink,
|
|
7170
7287
|
{
|
|
7171
7288
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7173,7 +7290,7 @@ var DataList = (props) => {
|
|
|
7173
7290
|
children: "1"
|
|
7174
7291
|
}
|
|
7175
7292
|
),
|
|
7176
|
-
/* @__PURE__ */ (0,
|
|
7293
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7177
7294
|
Hyperlink,
|
|
7178
7295
|
{
|
|
7179
7296
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7181,21 +7298,21 @@ var DataList = (props) => {
|
|
|
7181
7298
|
children: "2"
|
|
7182
7299
|
}
|
|
7183
7300
|
),
|
|
7184
|
-
/* @__PURE__ */ (0,
|
|
7301
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7185
7302
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
7186
|
-
(page) => /* @__PURE__ */ (0,
|
|
7303
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react57.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7187
7304
|
Hyperlink,
|
|
7188
7305
|
{
|
|
7189
7306
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7190
7307
|
href: builder.getNewPageUrl(page),
|
|
7191
7308
|
children: page
|
|
7192
7309
|
}
|
|
7193
|
-
) : /* @__PURE__ */ (0,
|
|
7310
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
7194
7311
|
)
|
|
7195
7312
|
] });
|
|
7196
7313
|
} else {
|
|
7197
|
-
return /* @__PURE__ */ (0,
|
|
7198
|
-
/* @__PURE__ */ (0,
|
|
7314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
7315
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7199
7316
|
Hyperlink,
|
|
7200
7317
|
{
|
|
7201
7318
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7203,7 +7320,7 @@ var DataList = (props) => {
|
|
|
7203
7320
|
children: "1"
|
|
7204
7321
|
}
|
|
7205
7322
|
),
|
|
7206
|
-
/* @__PURE__ */ (0,
|
|
7323
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7207
7324
|
Hyperlink,
|
|
7208
7325
|
{
|
|
7209
7326
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7211,20 +7328,20 @@ var DataList = (props) => {
|
|
|
7211
7328
|
children: "2"
|
|
7212
7329
|
}
|
|
7213
7330
|
),
|
|
7214
|
-
/* @__PURE__ */ (0,
|
|
7331
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7215
7332
|
Array.from(
|
|
7216
7333
|
{ length: 5 },
|
|
7217
7334
|
(_, index) => activePageNumber - 2 + index
|
|
7218
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
7335
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react57.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7219
7336
|
Hyperlink,
|
|
7220
7337
|
{
|
|
7221
7338
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7222
7339
|
href: builder.getNewPageUrl(page),
|
|
7223
7340
|
children: page
|
|
7224
7341
|
}
|
|
7225
|
-
) : /* @__PURE__ */ (0,
|
|
7226
|
-
/* @__PURE__ */ (0,
|
|
7227
|
-
/* @__PURE__ */ (0,
|
|
7342
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
7343
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7344
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7228
7345
|
Hyperlink,
|
|
7229
7346
|
{
|
|
7230
7347
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7232,7 +7349,7 @@ var DataList = (props) => {
|
|
|
7232
7349
|
children: pages - 1
|
|
7233
7350
|
}
|
|
7234
7351
|
),
|
|
7235
|
-
/* @__PURE__ */ (0,
|
|
7352
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7236
7353
|
Hyperlink,
|
|
7237
7354
|
{
|
|
7238
7355
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7240,7 +7357,7 @@ var DataList = (props) => {
|
|
|
7240
7357
|
children: pages
|
|
7241
7358
|
}
|
|
7242
7359
|
),
|
|
7243
|
-
/* @__PURE__ */ (0,
|
|
7360
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
7244
7361
|
"select",
|
|
7245
7362
|
{
|
|
7246
7363
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -7252,8 +7369,8 @@ var DataList = (props) => {
|
|
|
7252
7369
|
}
|
|
7253
7370
|
},
|
|
7254
7371
|
children: [
|
|
7255
|
-
/* @__PURE__ */ (0,
|
|
7256
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0,
|
|
7372
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("option", { value: "", children: "Jump to" }),
|
|
7373
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("option", { value: page, children: page }, page))
|
|
7257
7374
|
]
|
|
7258
7375
|
}
|
|
7259
7376
|
) })
|
|
@@ -7261,16 +7378,16 @@ var DataList = (props) => {
|
|
|
7261
7378
|
}
|
|
7262
7379
|
}
|
|
7263
7380
|
};
|
|
7264
|
-
return /* @__PURE__ */ (0,
|
|
7265
|
-
/* @__PURE__ */ (0,
|
|
7266
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
7381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_react57.default.Fragment, { children: [
|
|
7382
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(ContentView_default, { isDataFound, children: [
|
|
7383
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
7267
7384
|
"div",
|
|
7268
7385
|
{
|
|
7269
7386
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md sticky top-0`,
|
|
7270
7387
|
children: [
|
|
7271
|
-
props.title ? /* @__PURE__ */ (0,
|
|
7272
|
-
/* @__PURE__ */ (0,
|
|
7273
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
7388
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", {}),
|
|
7389
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
7390
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7274
7391
|
InputControl_default,
|
|
7275
7392
|
{
|
|
7276
7393
|
name: "Search_input",
|
|
@@ -7282,7 +7399,7 @@ var DataList = (props) => {
|
|
|
7282
7399
|
}
|
|
7283
7400
|
}
|
|
7284
7401
|
),
|
|
7285
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
7402
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7286
7403
|
InputControl_default,
|
|
7287
7404
|
{
|
|
7288
7405
|
name: filter.name,
|
|
@@ -7297,15 +7414,15 @@ var DataList = (props) => {
|
|
|
7297
7414
|
},
|
|
7298
7415
|
filter.name
|
|
7299
7416
|
)),
|
|
7300
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
7417
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
7301
7418
|
Hyperlink,
|
|
7302
7419
|
{
|
|
7303
7420
|
className: "gap-1",
|
|
7304
7421
|
linkType: "Primary" /* Solid */,
|
|
7305
7422
|
href: props.addLinkHref,
|
|
7306
7423
|
children: [
|
|
7307
|
-
/* @__PURE__ */ (0,
|
|
7308
|
-
/* @__PURE__ */ (0,
|
|
7424
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
7425
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
7309
7426
|
]
|
|
7310
7427
|
}
|
|
7311
7428
|
)
|
|
@@ -7313,8 +7430,8 @@ var DataList = (props) => {
|
|
|
7313
7430
|
]
|
|
7314
7431
|
}
|
|
7315
7432
|
),
|
|
7316
|
-
/* @__PURE__ */ (0,
|
|
7317
|
-
/* @__PURE__ */ (0,
|
|
7433
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
7434
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
7318
7435
|
let url = builder.getNewOrderByUrl(column.name);
|
|
7319
7436
|
let icon = "chevronUpDown";
|
|
7320
7437
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -7324,18 +7441,18 @@ var DataList = (props) => {
|
|
|
7324
7441
|
icon = "chevronUp";
|
|
7325
7442
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
7326
7443
|
}
|
|
7327
|
-
return /* @__PURE__ */ (0,
|
|
7444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7328
7445
|
"th",
|
|
7329
7446
|
{
|
|
7330
7447
|
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" : ""),
|
|
7331
|
-
children: /* @__PURE__ */ (0,
|
|
7448
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7332
7449
|
Hyperlink,
|
|
7333
7450
|
{
|
|
7334
7451
|
href: column.enableSorting ? url : void 0,
|
|
7335
7452
|
className: "!text-neutral-contrast ",
|
|
7336
|
-
children: /* @__PURE__ */ (0,
|
|
7337
|
-
/* @__PURE__ */ (0,
|
|
7338
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
7453
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
7454
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "text-black", children: column.label }),
|
|
7455
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
7339
7456
|
] })
|
|
7340
7457
|
}
|
|
7341
7458
|
)
|
|
@@ -7343,24 +7460,24 @@ var DataList = (props) => {
|
|
|
7343
7460
|
column.name
|
|
7344
7461
|
);
|
|
7345
7462
|
}) }) }),
|
|
7346
|
-
/* @__PURE__ */ (0,
|
|
7463
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
7347
7464
|
let validityClass = "";
|
|
7348
7465
|
console.log("dataitem", dataitem);
|
|
7349
7466
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
7350
7467
|
validityClass = "bg-alert-200";
|
|
7351
7468
|
}
|
|
7352
|
-
return /* @__PURE__ */ (0,
|
|
7469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
7353
7470
|
console.log("column", column);
|
|
7354
|
-
return /* @__PURE__ */ (0,
|
|
7471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react57.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7355
7472
|
"td",
|
|
7356
7473
|
{
|
|
7357
7474
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
7358
|
-
children: column.addhref === true ? /* @__PURE__ */ (0,
|
|
7475
|
+
children: column.addhref === true ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7359
7476
|
Hyperlink,
|
|
7360
7477
|
{
|
|
7361
7478
|
className: "",
|
|
7362
7479
|
href: `https://${dataitem[column.name]}`,
|
|
7363
|
-
children: /* @__PURE__ */ (0,
|
|
7480
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7364
7481
|
ViewControl_default,
|
|
7365
7482
|
{
|
|
7366
7483
|
controlType: column.controlType,
|
|
@@ -7373,11 +7490,11 @@ var DataList = (props) => {
|
|
|
7373
7490
|
}
|
|
7374
7491
|
)
|
|
7375
7492
|
}
|
|
7376
|
-
) : column.showAsLink ? /* @__PURE__ */ (0,
|
|
7493
|
+
) : column.showAsLink ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7377
7494
|
Hyperlink,
|
|
7378
7495
|
{
|
|
7379
7496
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
7380
|
-
children: /* @__PURE__ */ (0,
|
|
7497
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7381
7498
|
ViewControl_default,
|
|
7382
7499
|
{
|
|
7383
7500
|
controlType: column.controlType,
|
|
@@ -7387,7 +7504,7 @@ var DataList = (props) => {
|
|
|
7387
7504
|
}
|
|
7388
7505
|
)
|
|
7389
7506
|
}
|
|
7390
|
-
) : /* @__PURE__ */ (0,
|
|
7507
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7391
7508
|
ViewControl_default,
|
|
7392
7509
|
{
|
|
7393
7510
|
controlType: column.controlType,
|
|
@@ -7401,10 +7518,10 @@ var DataList = (props) => {
|
|
|
7401
7518
|
}) }, index);
|
|
7402
7519
|
}) })
|
|
7403
7520
|
] }) }),
|
|
7404
|
-
/* @__PURE__ */ (0,
|
|
7405
|
-
/* @__PURE__ */ (0,
|
|
7406
|
-
/* @__PURE__ */ (0,
|
|
7407
|
-
activePageNumber > 1 && /* @__PURE__ */ (0,
|
|
7521
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
7522
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "text-gray-700", children: label }),
|
|
7523
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex space-x-2 items-center", children: [
|
|
7524
|
+
activePageNumber > 1 && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7408
7525
|
Hyperlink,
|
|
7409
7526
|
{
|
|
7410
7527
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -7412,9 +7529,9 @@ var DataList = (props) => {
|
|
|
7412
7529
|
children: "Prev"
|
|
7413
7530
|
}
|
|
7414
7531
|
),
|
|
7415
|
-
activePageNumber <= 1 && /* @__PURE__ */ (0,
|
|
7532
|
+
activePageNumber <= 1 && /* @__PURE__ */ (0, import_jsx_runtime78.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" }),
|
|
7416
7533
|
renderPageNumbers(),
|
|
7417
|
-
activePageNumber < pages && /* @__PURE__ */ (0,
|
|
7534
|
+
activePageNumber < pages && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7418
7535
|
Hyperlink,
|
|
7419
7536
|
{
|
|
7420
7537
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -7422,19 +7539,19 @@ var DataList = (props) => {
|
|
|
7422
7539
|
children: "Next"
|
|
7423
7540
|
}
|
|
7424
7541
|
),
|
|
7425
|
-
activePageNumber >= pages && /* @__PURE__ */ (0,
|
|
7542
|
+
activePageNumber >= pages && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
7426
7543
|
] })
|
|
7427
7544
|
] }) })
|
|
7428
7545
|
] }),
|
|
7429
|
-
/* @__PURE__ */ (0,
|
|
7430
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
7546
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(NoContentView_default, { isDataFound, children: [
|
|
7547
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
7431
7548
|
"div",
|
|
7432
7549
|
{
|
|
7433
7550
|
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`,
|
|
7434
7551
|
children: [
|
|
7435
|
-
props.title ? /* @__PURE__ */ (0,
|
|
7436
|
-
/* @__PURE__ */ (0,
|
|
7437
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
7552
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", {}),
|
|
7553
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
7554
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7438
7555
|
InputControl_default,
|
|
7439
7556
|
{
|
|
7440
7557
|
name: "Search_input",
|
|
@@ -7446,7 +7563,7 @@ var DataList = (props) => {
|
|
|
7446
7563
|
}
|
|
7447
7564
|
}
|
|
7448
7565
|
),
|
|
7449
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
7566
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7450
7567
|
InputControl_default,
|
|
7451
7568
|
{
|
|
7452
7569
|
name: filter.name,
|
|
@@ -7461,15 +7578,15 @@ var DataList = (props) => {
|
|
|
7461
7578
|
},
|
|
7462
7579
|
filter.name
|
|
7463
7580
|
)),
|
|
7464
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
7581
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
7465
7582
|
Hyperlink,
|
|
7466
7583
|
{
|
|
7467
7584
|
className: "gap-1",
|
|
7468
7585
|
linkType: "Primary" /* Solid */,
|
|
7469
7586
|
href: props.addLinkHref,
|
|
7470
7587
|
children: [
|
|
7471
|
-
/* @__PURE__ */ (0,
|
|
7472
|
-
/* @__PURE__ */ (0,
|
|
7588
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
7589
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
7473
7590
|
]
|
|
7474
7591
|
}
|
|
7475
7592
|
)
|
|
@@ -7477,8 +7594,8 @@ var DataList = (props) => {
|
|
|
7477
7594
|
]
|
|
7478
7595
|
}
|
|
7479
7596
|
),
|
|
7480
|
-
/* @__PURE__ */ (0,
|
|
7481
|
-
/* @__PURE__ */ (0,
|
|
7597
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
7598
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("thead", { className: "bg-gray-50", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
7482
7599
|
let url = builder.getNewOrderByUrl(column.name);
|
|
7483
7600
|
let icon = "chevronUpDown";
|
|
7484
7601
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -7488,18 +7605,18 @@ var DataList = (props) => {
|
|
|
7488
7605
|
icon = "chevronUp";
|
|
7489
7606
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
7490
7607
|
}
|
|
7491
|
-
return /* @__PURE__ */ (0,
|
|
7608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7492
7609
|
"th",
|
|
7493
7610
|
{
|
|
7494
7611
|
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" : ""),
|
|
7495
|
-
children: /* @__PURE__ */ (0,
|
|
7612
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7496
7613
|
Hyperlink,
|
|
7497
7614
|
{
|
|
7498
7615
|
href: column.enableSorting ? url : void 0,
|
|
7499
7616
|
className: "text-body-950",
|
|
7500
|
-
children: /* @__PURE__ */ (0,
|
|
7501
|
-
/* @__PURE__ */ (0,
|
|
7502
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
7617
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
7618
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { children: column.label }),
|
|
7619
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
7503
7620
|
] })
|
|
7504
7621
|
}
|
|
7505
7622
|
)
|
|
@@ -7507,7 +7624,7 @@ var DataList = (props) => {
|
|
|
7507
7624
|
column.name
|
|
7508
7625
|
);
|
|
7509
7626
|
}) }) }) }) }),
|
|
7510
|
-
/* @__PURE__ */ (0,
|
|
7627
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
7511
7628
|
] })
|
|
7512
7629
|
] })
|
|
7513
7630
|
] });
|
|
@@ -7515,12 +7632,12 @@ var DataList = (props) => {
|
|
|
7515
7632
|
var DataList_default = DataList;
|
|
7516
7633
|
|
|
7517
7634
|
// src/components/dataForm/DataListRenderer.tsx
|
|
7518
|
-
var
|
|
7635
|
+
var import_react58 = __toESM(require("react"));
|
|
7519
7636
|
init_ServiceClient();
|
|
7520
7637
|
init_OdataBuilder();
|
|
7521
7638
|
init_SelectWithSearchInput();
|
|
7522
7639
|
var import_navigation3 = require("next/navigation");
|
|
7523
|
-
var
|
|
7640
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
7524
7641
|
var viewControlMap = {
|
|
7525
7642
|
number: ViewControlTypes.number,
|
|
7526
7643
|
lineText: ViewControlTypes.lineText,
|
|
@@ -7575,14 +7692,14 @@ var DataListRenderer = ({
|
|
|
7575
7692
|
widgetProps
|
|
7576
7693
|
}) => {
|
|
7577
7694
|
const serviceClient = new ServiceClient_default(apiBaseUrl, session);
|
|
7578
|
-
const [columns, setColumns] = (0,
|
|
7579
|
-
const [dataset, setDataset] = (0,
|
|
7580
|
-
const [filter, setFilters] = (0,
|
|
7581
|
-
const [addLinkHref, setAddLinkHref] = (0,
|
|
7582
|
-
const [addLinkText, setAddLinkText] = (0,
|
|
7583
|
-
const [serviceRoute, setServiceRoute] = (0,
|
|
7695
|
+
const [columns, setColumns] = (0, import_react58.useState)([]);
|
|
7696
|
+
const [dataset, setDataset] = (0, import_react58.useState)();
|
|
7697
|
+
const [filter, setFilters] = (0, import_react58.useState)([]);
|
|
7698
|
+
const [addLinkHref, setAddLinkHref] = (0, import_react58.useState)("");
|
|
7699
|
+
const [addLinkText, setAddLinkText] = (0, import_react58.useState)("");
|
|
7700
|
+
const [serviceRoute, setServiceRoute] = (0, import_react58.useState)("");
|
|
7584
7701
|
const pathname = (0, import_navigation3.usePathname)();
|
|
7585
|
-
(0,
|
|
7702
|
+
(0, import_react58.useEffect)(() => {
|
|
7586
7703
|
if (!formDefinition) return;
|
|
7587
7704
|
setColumns(mapApiToColumns(formDefinition));
|
|
7588
7705
|
setFilters(mapApiToFilters(formDefinition));
|
|
@@ -7595,7 +7712,7 @@ var DataListRenderer = ({
|
|
|
7595
7712
|
setAddLinkHref(resolvedAddLinkHref);
|
|
7596
7713
|
setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
|
|
7597
7714
|
}, [formDefinition, params]);
|
|
7598
|
-
(0,
|
|
7715
|
+
(0, import_react58.useEffect)(() => {
|
|
7599
7716
|
const fetchData = async () => {
|
|
7600
7717
|
if (!serviceRoute) return;
|
|
7601
7718
|
const resolvedRoute = resolveRoutePlaceholders2(serviceRoute, params);
|
|
@@ -7615,15 +7732,15 @@ var DataListRenderer = ({
|
|
|
7615
7732
|
isActive: landingPageUrl === pathname
|
|
7616
7733
|
};
|
|
7617
7734
|
});
|
|
7618
|
-
return /* @__PURE__ */ (0,
|
|
7619
|
-
resolvedTabs.length > 0 && /* @__PURE__ */ (0,
|
|
7735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_react58.default.Fragment, { children: [
|
|
7736
|
+
resolvedTabs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7620
7737
|
NavigationTabsV2_default,
|
|
7621
7738
|
{
|
|
7622
7739
|
tabs: resolvedTabs,
|
|
7623
7740
|
params: widgetProps?.params ?? params
|
|
7624
7741
|
}
|
|
7625
7742
|
),
|
|
7626
|
-
/* @__PURE__ */ (0,
|
|
7743
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7627
7744
|
DataList_default,
|
|
7628
7745
|
{
|
|
7629
7746
|
addLinkHref,
|
|
@@ -7645,13 +7762,13 @@ var DataListRenderer_default = DataListRenderer;
|
|
|
7645
7762
|
init_InputControlType();
|
|
7646
7763
|
|
|
7647
7764
|
// src/components/dataForm/DataForm.tsx
|
|
7648
|
-
var
|
|
7765
|
+
var import_react60 = __toESM(require("react"));
|
|
7649
7766
|
init_Icon();
|
|
7650
7767
|
init_Button();
|
|
7651
7768
|
init_StyleTypes();
|
|
7652
7769
|
|
|
7653
7770
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
7654
|
-
var
|
|
7771
|
+
var import_react59 = __toESM(require("react"));
|
|
7655
7772
|
|
|
7656
7773
|
// src/components/dataForm/StyleTypes.tsx
|
|
7657
7774
|
var StyleTypes2 = /* @__PURE__ */ ((StyleTypes3) => {
|
|
@@ -7678,7 +7795,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
7678
7795
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
7679
7796
|
|
|
7680
7797
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
7681
|
-
var
|
|
7798
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
7682
7799
|
var DataFormChildSection = (props) => {
|
|
7683
7800
|
const { section } = props;
|
|
7684
7801
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -7690,7 +7807,7 @@ var DataFormChildSection = (props) => {
|
|
|
7690
7807
|
return childItems.map((item, originalIndex) => ({ item, originalIndex })).filter((x) => !x.item.isDeleted) || [];
|
|
7691
7808
|
};
|
|
7692
7809
|
const childItemsToRender = getChildItemsForRendering();
|
|
7693
|
-
const handleChildInputChange = (0,
|
|
7810
|
+
const handleChildInputChange = (0, import_react59.useCallback)(
|
|
7694
7811
|
(updatedValues) => {
|
|
7695
7812
|
if (isOneToOne) {
|
|
7696
7813
|
props.callback({
|
|
@@ -7717,7 +7834,7 @@ var DataFormChildSection = (props) => {
|
|
|
7717
7834
|
},
|
|
7718
7835
|
[props, isOneToOne, childItemsToRender]
|
|
7719
7836
|
);
|
|
7720
|
-
const onAddRow = (0,
|
|
7837
|
+
const onAddRow = (0, import_react59.useCallback)(() => {
|
|
7721
7838
|
props.callback({
|
|
7722
7839
|
sectionName: props.section.name,
|
|
7723
7840
|
actionType: FORM_CHILD_ROW_ADD,
|
|
@@ -7726,7 +7843,7 @@ var DataFormChildSection = (props) => {
|
|
|
7726
7843
|
rowIndex: -1
|
|
7727
7844
|
});
|
|
7728
7845
|
}, [props]);
|
|
7729
|
-
const onDeleteRow = (0,
|
|
7846
|
+
const onDeleteRow = (0, import_react59.useCallback)(
|
|
7730
7847
|
(filteredIndex) => {
|
|
7731
7848
|
const visibleItem = childItemsToRender[filteredIndex];
|
|
7732
7849
|
if (visibleItem) {
|
|
@@ -7746,14 +7863,14 @@ var DataFormChildSection = (props) => {
|
|
|
7746
7863
|
childItemsToRender,
|
|
7747
7864
|
allChildItems: childItems
|
|
7748
7865
|
});
|
|
7749
|
-
return /* @__PURE__ */ (0,
|
|
7750
|
-
section.sectionTitle && /* @__PURE__ */ (0,
|
|
7751
|
-
/* @__PURE__ */ (0,
|
|
7752
|
-
/* @__PURE__ */ (0,
|
|
7753
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0,
|
|
7754
|
-
return /* @__PURE__ */ (0,
|
|
7866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react59.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
7867
|
+
section.sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
7868
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
7869
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
7870
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
7871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("tr", { className: "", children: [
|
|
7755
7872
|
sectionRow.elements.map((field, index) => {
|
|
7756
|
-
return /* @__PURE__ */ (0,
|
|
7873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7757
7874
|
"th",
|
|
7758
7875
|
{
|
|
7759
7876
|
className: "py-3 font-normal text-left",
|
|
@@ -7762,21 +7879,21 @@ var DataFormChildSection = (props) => {
|
|
|
7762
7879
|
field.name
|
|
7763
7880
|
);
|
|
7764
7881
|
}),
|
|
7765
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
7882
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
7766
7883
|
] }, sectionRowIndex);
|
|
7767
7884
|
}) }),
|
|
7768
|
-
/* @__PURE__ */ (0,
|
|
7885
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
7769
7886
|
const { item, originalIndex } = visibleItem;
|
|
7770
7887
|
const rowKey = originalIndex;
|
|
7771
|
-
return /* @__PURE__ */ (0,
|
|
7888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react59.default.Fragment, { children: section.sectionRows.map(
|
|
7772
7889
|
(sectionRow, sectionRowIndex) => {
|
|
7773
|
-
return /* @__PURE__ */ (0,
|
|
7890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
7774
7891
|
"tr",
|
|
7775
7892
|
{
|
|
7776
7893
|
className: "",
|
|
7777
7894
|
children: [
|
|
7778
7895
|
sectionRow.elements.map((field, index) => {
|
|
7779
|
-
return /* @__PURE__ */ (0,
|
|
7896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "w-11/12", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7780
7897
|
InputControl_default,
|
|
7781
7898
|
{
|
|
7782
7899
|
index: filteredIndex,
|
|
@@ -7796,7 +7913,7 @@ var DataFormChildSection = (props) => {
|
|
|
7796
7913
|
}
|
|
7797
7914
|
) }) }) }, field.name);
|
|
7798
7915
|
}),
|
|
7799
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
7916
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7800
7917
|
ClientButton_default,
|
|
7801
7918
|
{
|
|
7802
7919
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -7805,7 +7922,7 @@ var DataFormChildSection = (props) => {
|
|
|
7805
7922
|
},
|
|
7806
7923
|
dataRole: "delete",
|
|
7807
7924
|
tabIndex: -1,
|
|
7808
|
-
children: /* @__PURE__ */ (0,
|
|
7925
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7809
7926
|
Icon_default,
|
|
7810
7927
|
{
|
|
7811
7928
|
className: "w-4 h-4",
|
|
@@ -7822,7 +7939,7 @@ var DataFormChildSection = (props) => {
|
|
|
7822
7939
|
) }, rowKey);
|
|
7823
7940
|
}) })
|
|
7824
7941
|
] }) }),
|
|
7825
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
7942
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7826
7943
|
ClientButton_default,
|
|
7827
7944
|
{
|
|
7828
7945
|
ButtonType: "Link" /* Link */,
|
|
@@ -7837,9 +7954,9 @@ var DataFormChildSection = (props) => {
|
|
|
7837
7954
|
var DataFormChildSection_default = DataFormChildSection;
|
|
7838
7955
|
|
|
7839
7956
|
// src/components/dataForm/DataForm.tsx
|
|
7840
|
-
var
|
|
7957
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
7841
7958
|
var DataForm = (props) => {
|
|
7842
|
-
const formRef = (0,
|
|
7959
|
+
const formRef = (0, import_react60.useRef)(null);
|
|
7843
7960
|
console.log(props.dataItem, "dssads");
|
|
7844
7961
|
const initialState = {
|
|
7845
7962
|
inputValues: {},
|
|
@@ -7848,9 +7965,9 @@ var DataForm = (props) => {
|
|
|
7848
7965
|
const childInitialState = {
|
|
7849
7966
|
inputValues: []
|
|
7850
7967
|
};
|
|
7851
|
-
const [formState, dispatch] = (0,
|
|
7968
|
+
const [formState, dispatch] = (0, import_react60.useReducer)(FormReducer_default, initialState);
|
|
7852
7969
|
console.log(props.sections, "sections");
|
|
7853
|
-
const clearHiddenChildSections = (0,
|
|
7970
|
+
const clearHiddenChildSections = (0, import_react60.useCallback)(
|
|
7854
7971
|
(changedProperty, newValues) => {
|
|
7855
7972
|
if (!props.sections) return;
|
|
7856
7973
|
const allChildSections = [];
|
|
@@ -7888,7 +8005,7 @@ var DataForm = (props) => {
|
|
|
7888
8005
|
},
|
|
7889
8006
|
[props.sections, formState.inputValues]
|
|
7890
8007
|
);
|
|
7891
|
-
const handleInputChange = (0,
|
|
8008
|
+
const handleInputChange = (0, import_react60.useCallback)(
|
|
7892
8009
|
async (updatedValues) => {
|
|
7893
8010
|
dispatch({
|
|
7894
8011
|
type: FORM_INPUT_UPDATE,
|
|
@@ -7903,7 +8020,7 @@ var DataForm = (props) => {
|
|
|
7903
8020
|
},
|
|
7904
8021
|
[dispatch, formState.inputValues, clearHiddenChildSections]
|
|
7905
8022
|
);
|
|
7906
|
-
const fetchData = (0,
|
|
8023
|
+
const fetchData = (0, import_react60.useCallback)(async () => {
|
|
7907
8024
|
if (!props.rules) return;
|
|
7908
8025
|
if (Object.keys(formState.inputValues).length === 0) {
|
|
7909
8026
|
return;
|
|
@@ -7934,7 +8051,7 @@ var DataForm = (props) => {
|
|
|
7934
8051
|
console.error("Error fetching data:", error);
|
|
7935
8052
|
}
|
|
7936
8053
|
}, [formState.lastPropertyChanged, formState.inputValues]);
|
|
7937
|
-
(0,
|
|
8054
|
+
(0, import_react60.useEffect)(() => {
|
|
7938
8055
|
fetchData();
|
|
7939
8056
|
}, [formState.inputValues, formState.lastPropertyChanged]);
|
|
7940
8057
|
function replacePlaceholders(template, context, params) {
|
|
@@ -7954,7 +8071,7 @@ var DataForm = (props) => {
|
|
|
7954
8071
|
}
|
|
7955
8072
|
);
|
|
7956
8073
|
}
|
|
7957
|
-
const handleChildSectionChangeCallback = (0,
|
|
8074
|
+
const handleChildSectionChangeCallback = (0, import_react60.useCallback)(
|
|
7958
8075
|
(params) => {
|
|
7959
8076
|
dispatch({
|
|
7960
8077
|
type: params.actionType,
|
|
@@ -7999,7 +8116,7 @@ var DataForm = (props) => {
|
|
|
7999
8116
|
});
|
|
8000
8117
|
return cloned;
|
|
8001
8118
|
}
|
|
8002
|
-
const onClick = (0,
|
|
8119
|
+
const onClick = (0, import_react60.useCallback)(async () => {
|
|
8003
8120
|
if (props.onClick) {
|
|
8004
8121
|
const isEdit = props.dataItem && Object.keys(props.dataItem).length > 0;
|
|
8005
8122
|
const normalizedValues = normalizeChildSections(
|
|
@@ -8015,21 +8132,21 @@ var DataForm = (props) => {
|
|
|
8015
8132
|
return { isSuccessful: true };
|
|
8016
8133
|
}
|
|
8017
8134
|
}, [formState, props]);
|
|
8018
|
-
const handleAdditionalOnClick = (0,
|
|
8135
|
+
const handleAdditionalOnClick = (0, import_react60.useCallback)(async () => {
|
|
8019
8136
|
if (props.additionalActions?.onClick) {
|
|
8020
8137
|
return await props.additionalActions.onClick(formState);
|
|
8021
8138
|
} else {
|
|
8022
8139
|
return { isSuccessful: true, message: "Action completed successfully" };
|
|
8023
8140
|
}
|
|
8024
8141
|
}, [formState, props]);
|
|
8025
|
-
const onDelete = (0,
|
|
8142
|
+
const onDelete = (0, import_react60.useCallback)(async () => {
|
|
8026
8143
|
if (props.onDelete) {
|
|
8027
8144
|
return await props.onDelete(formState);
|
|
8028
8145
|
} else {
|
|
8029
8146
|
return { isSuccessful: true };
|
|
8030
8147
|
}
|
|
8031
8148
|
}, [formState, props]);
|
|
8032
|
-
(0,
|
|
8149
|
+
(0, import_react60.useEffect)(() => {
|
|
8033
8150
|
if (props.dataItem) {
|
|
8034
8151
|
dispatch({
|
|
8035
8152
|
type: FORM_INITIAL_UPDATE,
|
|
@@ -8057,19 +8174,19 @@ var DataForm = (props) => {
|
|
|
8057
8174
|
return false;
|
|
8058
8175
|
}
|
|
8059
8176
|
}
|
|
8060
|
-
return /* @__PURE__ */ (0,
|
|
8061
|
-
props.title && /* @__PURE__ */ (0,
|
|
8177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react60.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
8178
|
+
props.title && /* @__PURE__ */ (0, import_jsx_runtime81.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_runtime81.jsxs)(
|
|
8062
8179
|
"div",
|
|
8063
8180
|
{
|
|
8064
8181
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
8065
8182
|
onClick: () => window.history.back(),
|
|
8066
8183
|
children: [
|
|
8067
|
-
/* @__PURE__ */ (0,
|
|
8068
|
-
/* @__PURE__ */ (0,
|
|
8184
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
8185
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
8069
8186
|
]
|
|
8070
8187
|
}
|
|
8071
8188
|
) }),
|
|
8072
|
-
/* @__PURE__ */ (0,
|
|
8189
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8073
8190
|
"form",
|
|
8074
8191
|
{
|
|
8075
8192
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -8090,8 +8207,8 @@ var DataForm = (props) => {
|
|
|
8090
8207
|
}
|
|
8091
8208
|
}
|
|
8092
8209
|
},
|
|
8093
|
-
children: /* @__PURE__ */ (0,
|
|
8094
|
-
return /* @__PURE__ */ (0,
|
|
8210
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
8211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react60.default.Fragment, { children: !section.isChildSection && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
8095
8212
|
section.sectionRows?.map(
|
|
8096
8213
|
(sectionRow, sectionRowIndex) => {
|
|
8097
8214
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -8102,14 +8219,14 @@ var DataForm = (props) => {
|
|
|
8102
8219
|
sectionRow.visible
|
|
8103
8220
|
);
|
|
8104
8221
|
}
|
|
8105
|
-
return /* @__PURE__ */ (0,
|
|
8106
|
-
return /* @__PURE__ */ (0,
|
|
8222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react60.default.Fragment, { children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
8223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
8107
8224
|
"div",
|
|
8108
8225
|
{
|
|
8109
8226
|
className: sectionRow.grow ? "grow" : "",
|
|
8110
8227
|
children: [
|
|
8111
|
-
/* @__PURE__ */ (0,
|
|
8112
|
-
/* @__PURE__ */ (0,
|
|
8228
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { children: field.controlType }),
|
|
8229
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8113
8230
|
InputControl_default,
|
|
8114
8231
|
{
|
|
8115
8232
|
name: field.name,
|
|
@@ -8139,12 +8256,12 @@ var DataForm = (props) => {
|
|
|
8139
8256
|
}) }) }, sectionRowIndex);
|
|
8140
8257
|
}
|
|
8141
8258
|
),
|
|
8142
|
-
/* @__PURE__ */ (0,
|
|
8259
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { children: section.childSections?.map(
|
|
8143
8260
|
(childSection, childSectionIndex) => {
|
|
8144
|
-
return /* @__PURE__ */ (0,
|
|
8261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { children: childSection.name && evalutateCondition(
|
|
8145
8262
|
formState.inputValues,
|
|
8146
8263
|
childSection.visible
|
|
8147
|
-
) && /* @__PURE__ */ (0,
|
|
8264
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8148
8265
|
DataFormChildSection_default,
|
|
8149
8266
|
{
|
|
8150
8267
|
section: childSection,
|
|
@@ -8159,8 +8276,8 @@ var DataForm = (props) => {
|
|
|
8159
8276
|
}) })
|
|
8160
8277
|
}
|
|
8161
8278
|
),
|
|
8162
|
-
/* @__PURE__ */ (0,
|
|
8163
|
-
/* @__PURE__ */ (0,
|
|
8279
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
8280
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { children: props.additionalActions && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8164
8281
|
Button_default,
|
|
8165
8282
|
{
|
|
8166
8283
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -8168,7 +8285,7 @@ var DataForm = (props) => {
|
|
|
8168
8285
|
children: props.additionalActions.title
|
|
8169
8286
|
}
|
|
8170
8287
|
) }),
|
|
8171
|
-
/* @__PURE__ */ (0,
|
|
8288
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { children: props.onDelete && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8172
8289
|
Button_default,
|
|
8173
8290
|
{
|
|
8174
8291
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -8179,7 +8296,7 @@ var DataForm = (props) => {
|
|
|
8179
8296
|
children: "Delete"
|
|
8180
8297
|
}
|
|
8181
8298
|
) }),
|
|
8182
|
-
/* @__PURE__ */ (0,
|
|
8299
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { children: props.onClick && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8183
8300
|
Button_default,
|
|
8184
8301
|
{
|
|
8185
8302
|
onValidate,
|
|
@@ -8197,7 +8314,7 @@ var DataForm_default = DataForm;
|
|
|
8197
8314
|
|
|
8198
8315
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
8199
8316
|
init_ServiceClient();
|
|
8200
|
-
var
|
|
8317
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
8201
8318
|
function getAction(actions, code) {
|
|
8202
8319
|
return actions?.find((a) => a.actionCode === code);
|
|
8203
8320
|
}
|
|
@@ -8223,9 +8340,9 @@ var DataFormRenderer = ({
|
|
|
8223
8340
|
"Delete"
|
|
8224
8341
|
);
|
|
8225
8342
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
8226
|
-
return /* @__PURE__ */ (0,
|
|
8227
|
-
widgetProps && /* @__PURE__ */ (0,
|
|
8228
|
-
/* @__PURE__ */ (0,
|
|
8343
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
8344
|
+
widgetProps && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
8345
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8229
8346
|
DataForm_default,
|
|
8230
8347
|
{
|
|
8231
8348
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|