@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260723122345 → 0.8.1-dev.20260724042342
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-7NS4QUWO.mjs → InputControlClient-TE33BZ6U.mjs} +10 -3
- package/dist/{Pagination-T7YN2OMV.mjs → Pagination-BETIPTVF.mjs} +2 -2
- package/dist/{chunk-5GHPW7SJ.mjs → chunk-BAGK3UOE.mjs} +4 -0
- package/dist/{chunk-7ZFZLN56.mjs → chunk-HAGCF2RO.mjs} +322 -1
- package/dist/{chunk-X3YSXTD2.mjs → chunk-TMVO22U3.mjs} +1 -1
- package/dist/index.d.mts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.js +886 -530
- package/dist/index.mjs +97 -94
- package/dist/server.js +37 -40
- package/dist/server.mjs +38 -41
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1003,6 +1003,7 @@ var init_InputControlType = __esm({
|
|
|
1003
1003
|
select: "select",
|
|
1004
1004
|
percentageInput: "percentage",
|
|
1005
1005
|
asset: "asset",
|
|
1006
|
+
assetUpload: "assetUpload",
|
|
1006
1007
|
phoneInput: "phone",
|
|
1007
1008
|
numberInput: "number",
|
|
1008
1009
|
checkboxInput: "boolean",
|
|
@@ -1014,6 +1015,9 @@ var init_InputControlType = __esm({
|
|
|
1014
1015
|
selectWithSearchPanel: "selectWithSearchPanel",
|
|
1015
1016
|
booleanSelect: "booleanSelect",
|
|
1016
1017
|
switchInput: "switchInput",
|
|
1018
|
+
dateInput: "dateInput",
|
|
1019
|
+
radioInput: "radioInput",
|
|
1020
|
+
switcher: "switcher",
|
|
1017
1021
|
videoInput: "videoInput"
|
|
1018
1022
|
};
|
|
1019
1023
|
InputControlType_default = InputControlType;
|
|
@@ -2842,17 +2846,356 @@ var init_SwitchInput = __esm({
|
|
|
2842
2846
|
}
|
|
2843
2847
|
});
|
|
2844
2848
|
|
|
2849
|
+
// src/components/utilities/DateTimeUtility.tsx
|
|
2850
|
+
var DateTimeUtility, DateTimeUtility_default;
|
|
2851
|
+
var init_DateTimeUtility = __esm({
|
|
2852
|
+
"src/components/utilities/DateTimeUtility.tsx"() {
|
|
2853
|
+
"use strict";
|
|
2854
|
+
DateTimeUtility = class {
|
|
2855
|
+
constructor() {
|
|
2856
|
+
}
|
|
2857
|
+
static formatDate(date) {
|
|
2858
|
+
if (!date) {
|
|
2859
|
+
throw new Error("Invalid date");
|
|
2860
|
+
}
|
|
2861
|
+
const pad = (num) => num.toString().padStart(2, "0");
|
|
2862
|
+
const year = date.getFullYear();
|
|
2863
|
+
const month = pad(date.getMonth() + 1);
|
|
2864
|
+
const day = pad(date.getDate());
|
|
2865
|
+
const hours = pad(date.getHours());
|
|
2866
|
+
const minutes = pad(date.getMinutes());
|
|
2867
|
+
const seconds = pad(date.getSeconds());
|
|
2868
|
+
return `${year}-${month}-${day}T${hours}:${minutes}:${seconds}`;
|
|
2869
|
+
}
|
|
2870
|
+
static getMonthShortNameCustom(month) {
|
|
2871
|
+
const monthNames = [
|
|
2872
|
+
"Jan",
|
|
2873
|
+
"Feb",
|
|
2874
|
+
"Mar",
|
|
2875
|
+
"Apr",
|
|
2876
|
+
"May",
|
|
2877
|
+
"Jun",
|
|
2878
|
+
"Jul",
|
|
2879
|
+
"Aug",
|
|
2880
|
+
"Sep",
|
|
2881
|
+
"Oct",
|
|
2882
|
+
"Nov",
|
|
2883
|
+
"Dec"
|
|
2884
|
+
];
|
|
2885
|
+
if (month < 1 || month > 12) {
|
|
2886
|
+
throw new Error(
|
|
2887
|
+
"Invalid month. Please provide a value between 1 and 12."
|
|
2888
|
+
);
|
|
2889
|
+
}
|
|
2890
|
+
return monthNames[month - 1];
|
|
2891
|
+
}
|
|
2892
|
+
static getCurrentWeekRange() {
|
|
2893
|
+
const today = /* @__PURE__ */ new Date();
|
|
2894
|
+
const day = today.getDay();
|
|
2895
|
+
const diffToMonday = (day === 0 ? -6 : 1) - day;
|
|
2896
|
+
const monday = new Date(today);
|
|
2897
|
+
monday.setDate(today.getDate() + diffToMonday);
|
|
2898
|
+
monday.setHours(0, 0, 0, 0);
|
|
2899
|
+
const sunday = new Date(monday);
|
|
2900
|
+
sunday.setDate(monday.getDate() + 6);
|
|
2901
|
+
sunday.setHours(23, 59, 59, 999);
|
|
2902
|
+
return { start: monday, end: sunday };
|
|
2903
|
+
}
|
|
2904
|
+
static getCurrentMonthRange() {
|
|
2905
|
+
const now = /* @__PURE__ */ new Date();
|
|
2906
|
+
const start = new Date(now.getFullYear(), now.getMonth(), 1);
|
|
2907
|
+
const end = new Date(now.getFullYear(), now.getMonth() + 1, 0);
|
|
2908
|
+
return { start, end };
|
|
2909
|
+
}
|
|
2910
|
+
static formatShortDate(date) {
|
|
2911
|
+
const day = date.getDate();
|
|
2912
|
+
const month = this.getMonthShortNameCustom(date.getMonth() + 1);
|
|
2913
|
+
return `${day} ${month}`;
|
|
2914
|
+
}
|
|
2915
|
+
static formatIndianCurrencyShort(value) {
|
|
2916
|
+
if (value >= 1e7) {
|
|
2917
|
+
return `${(value / 1e7).toFixed(2)} Cr`;
|
|
2918
|
+
} else if (value >= 1e5) {
|
|
2919
|
+
return `${(value / 1e5).toFixed(2)} L`;
|
|
2920
|
+
} else if (value >= 1e3) {
|
|
2921
|
+
return `${(value / 1e3).toFixed(2)} K`;
|
|
2922
|
+
} else {
|
|
2923
|
+
return `${value}`;
|
|
2924
|
+
}
|
|
2925
|
+
}
|
|
2926
|
+
};
|
|
2927
|
+
DateTimeUtility_default = DateTimeUtility;
|
|
2928
|
+
}
|
|
2929
|
+
});
|
|
2930
|
+
|
|
2931
|
+
// src/components/controls/edit/DateInput.tsx
|
|
2932
|
+
var import_react37, import_jsx_runtime46, DateInput, DateInput_default;
|
|
2933
|
+
var init_DateInput = __esm({
|
|
2934
|
+
"src/components/controls/edit/DateInput.tsx"() {
|
|
2935
|
+
"use strict";
|
|
2936
|
+
import_react37 = require("react");
|
|
2937
|
+
init_DateTimeUtility();
|
|
2938
|
+
import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2939
|
+
DateInput = (props) => {
|
|
2940
|
+
const value = (0, import_react37.useMemo)(() => {
|
|
2941
|
+
if (props.value === void 0 || props.value === null || props.value === "") {
|
|
2942
|
+
return "";
|
|
2943
|
+
}
|
|
2944
|
+
try {
|
|
2945
|
+
const rawValue = String(props.value);
|
|
2946
|
+
const utcDate = new Date(rawValue.endsWith("Z") ? rawValue : `${rawValue}Z`);
|
|
2947
|
+
const localDate = new Date(
|
|
2948
|
+
utcDate.getTime() - utcDate.getTimezoneOffset() * 6e4
|
|
2949
|
+
);
|
|
2950
|
+
return localDate.toISOString().slice(0, 10);
|
|
2951
|
+
} catch {
|
|
2952
|
+
return String(props.value);
|
|
2953
|
+
}
|
|
2954
|
+
}, [props.value]);
|
|
2955
|
+
const changeHandler = (event) => {
|
|
2956
|
+
const dateValue = event.target.value;
|
|
2957
|
+
let callbackValue = dateValue;
|
|
2958
|
+
const parsedDate = new Date(dateValue);
|
|
2959
|
+
if (dateValue && !Number.isNaN(parsedDate.getTime())) {
|
|
2960
|
+
const adjustedDate = new Date(
|
|
2961
|
+
parsedDate.getTime() + 2 * parsedDate.getTimezoneOffset() * 6e4
|
|
2962
|
+
);
|
|
2963
|
+
callbackValue = DateTimeUtility_default.formatDate(adjustedDate);
|
|
2964
|
+
}
|
|
2965
|
+
props.callback?.({
|
|
2966
|
+
name: props.name,
|
|
2967
|
+
value: callbackValue,
|
|
2968
|
+
index: props.index,
|
|
2969
|
+
groupKey: props.groupKey
|
|
2970
|
+
});
|
|
2971
|
+
};
|
|
2972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("label", { className: "block mb-1", children: [
|
|
2973
|
+
props.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm font-medium", children: props.attributes.label }),
|
|
2974
|
+
" ",
|
|
2975
|
+
props.attributes?.label && props.attributes.required && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "bg-error-weak", children: "*" }),
|
|
2976
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2977
|
+
"input",
|
|
2978
|
+
{
|
|
2979
|
+
type: "date",
|
|
2980
|
+
name: props.name,
|
|
2981
|
+
id: props.name,
|
|
2982
|
+
value,
|
|
2983
|
+
onChange: changeHandler,
|
|
2984
|
+
required: props.attributes?.required,
|
|
2985
|
+
disabled: props.attributes?.readOnly,
|
|
2986
|
+
max: String(props.attributes?.maxValue ?? "9999-12-31"),
|
|
2987
|
+
className: `peer input mt-1 py-1.5 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`
|
|
2988
|
+
}
|
|
2989
|
+
),
|
|
2990
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props.attributes?.errorMessage ?? "" })
|
|
2991
|
+
] });
|
|
2992
|
+
};
|
|
2993
|
+
DateInput_default = DateInput;
|
|
2994
|
+
}
|
|
2995
|
+
});
|
|
2996
|
+
|
|
2997
|
+
// src/components/controls/edit/RadioInput.tsx
|
|
2998
|
+
var import_react38, import_jsx_runtime47, RadioInput, RadioInput_default;
|
|
2999
|
+
var init_RadioInput = __esm({
|
|
3000
|
+
"src/components/controls/edit/RadioInput.tsx"() {
|
|
3001
|
+
"use strict";
|
|
3002
|
+
import_react38 = require("react");
|
|
3003
|
+
init_Icon();
|
|
3004
|
+
import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3005
|
+
RadioInput = (props) => {
|
|
3006
|
+
const [list, setList] = (0, import_react38.useState)([]);
|
|
3007
|
+
(0, import_react38.useEffect)(() => {
|
|
3008
|
+
async function loadData() {
|
|
3009
|
+
if (props.dataset) {
|
|
3010
|
+
setList(props.dataset);
|
|
3011
|
+
return;
|
|
3012
|
+
}
|
|
3013
|
+
if (!props.dataSource || !props.serviceClient) {
|
|
3014
|
+
setList([]);
|
|
3015
|
+
return;
|
|
3016
|
+
}
|
|
3017
|
+
let dataSource = props.dataSource;
|
|
3018
|
+
if (props.dataSourceDependsOn) {
|
|
3019
|
+
if (!props.dependentValue) {
|
|
3020
|
+
setList([]);
|
|
3021
|
+
return;
|
|
3022
|
+
}
|
|
3023
|
+
dataSource = dataSource.replace(
|
|
3024
|
+
`{${props.dataSourceDependsOn}}`,
|
|
3025
|
+
props.dependentValue
|
|
3026
|
+
);
|
|
3027
|
+
}
|
|
3028
|
+
const response = await props.serviceClient.get(dataSource);
|
|
3029
|
+
setList(response.result ?? []);
|
|
3030
|
+
}
|
|
3031
|
+
loadData();
|
|
3032
|
+
}, [
|
|
3033
|
+
props.dataSource,
|
|
3034
|
+
props.dataSourceDependsOn,
|
|
3035
|
+
props.dataset,
|
|
3036
|
+
props.dependentValue,
|
|
3037
|
+
props.serviceClient
|
|
3038
|
+
]);
|
|
3039
|
+
const changeHandler = (event) => {
|
|
3040
|
+
if (!props.attributes?.readOnly) {
|
|
3041
|
+
props.callback?.({
|
|
3042
|
+
name: props.name,
|
|
3043
|
+
value: event.target.value,
|
|
3044
|
+
index: props.index,
|
|
3045
|
+
groupKey: props.groupKey
|
|
3046
|
+
});
|
|
3047
|
+
}
|
|
3048
|
+
};
|
|
3049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "block", children: [
|
|
3050
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-sm font-medium", children: props.attributes?.label }),
|
|
3051
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex flex-col gap-3", children: list.map((item, index) => {
|
|
3052
|
+
const itemValue = item[props.dataKeyFieldName];
|
|
3053
|
+
const isSelected = String(itemValue) === String(props.value ?? "");
|
|
3054
|
+
const isRecommended = props.dataRecommendedValue !== void 0 && String(itemValue) === String(props.dataRecommendedValue);
|
|
3055
|
+
const resultClassName = isSelected ? isRecommended ? "bg-success" : props.dataRecommendedValue ? "bg-alert" : "border-transparent" : "border-transparent";
|
|
3056
|
+
const iconName = isSelected && props.dataRecommendedValue ? isRecommended ? "checkCircle" : "xCircle" : void 0;
|
|
3057
|
+
const inputId = `${props.name}-${props.index ?? 0}-id-${index}`;
|
|
3058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
3059
|
+
"div",
|
|
3060
|
+
{
|
|
3061
|
+
className: `font-normal flex items-center justify-between gap-4 cursor-pointer border rounded p-2 ${resultClassName}`,
|
|
3062
|
+
children: [
|
|
3063
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex gap-4 items-start", children: [
|
|
3064
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3065
|
+
"input",
|
|
3066
|
+
{
|
|
3067
|
+
type: "radio",
|
|
3068
|
+
className: "form-radio mt-1.5 focus:outline-none",
|
|
3069
|
+
name: `${props.name}-${props.index ?? 0}`,
|
|
3070
|
+
id: inputId,
|
|
3071
|
+
value: itemValue,
|
|
3072
|
+
checked: isSelected,
|
|
3073
|
+
readOnly: props.attributes?.readOnly,
|
|
3074
|
+
onChange: changeHandler,
|
|
3075
|
+
required: props.attributes?.required
|
|
3076
|
+
}
|
|
3077
|
+
),
|
|
3078
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("label", { className: "text-body-950 pr-2", htmlFor: inputId, children: item[props.dataTextFieldName] })
|
|
3079
|
+
] }),
|
|
3080
|
+
iconName && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon_default, { className: "w-5 h-5 text-success", name: iconName })
|
|
3081
|
+
]
|
|
3082
|
+
},
|
|
3083
|
+
String(itemValue)
|
|
3084
|
+
);
|
|
3085
|
+
}) }),
|
|
3086
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props.attributes?.errorMessage ?? "" })
|
|
3087
|
+
] });
|
|
3088
|
+
};
|
|
3089
|
+
RadioInput_default = RadioInput;
|
|
3090
|
+
}
|
|
3091
|
+
});
|
|
3092
|
+
|
|
3093
|
+
// src/components/controls/edit/Switcher.tsx
|
|
3094
|
+
var import_react39, import_jsx_runtime48, Switcher, Switcher_default;
|
|
3095
|
+
var init_Switcher = __esm({
|
|
3096
|
+
"src/components/controls/edit/Switcher.tsx"() {
|
|
3097
|
+
"use strict";
|
|
3098
|
+
import_react39 = require("react");
|
|
3099
|
+
import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3100
|
+
Switcher = (props) => {
|
|
3101
|
+
const [list, setList] = (0, import_react39.useState)([]);
|
|
3102
|
+
(0, import_react39.useEffect)(() => {
|
|
3103
|
+
async function loadData() {
|
|
3104
|
+
if (props.dataset) {
|
|
3105
|
+
setList(props.dataset);
|
|
3106
|
+
return;
|
|
3107
|
+
}
|
|
3108
|
+
if (!props.dataSource || !props.serviceClient) {
|
|
3109
|
+
setList([]);
|
|
3110
|
+
return;
|
|
3111
|
+
}
|
|
3112
|
+
let dataSource = props.dataSource;
|
|
3113
|
+
if (props.dataSourceDependsOn) {
|
|
3114
|
+
if (!props.dependentValue) {
|
|
3115
|
+
setList([]);
|
|
3116
|
+
return;
|
|
3117
|
+
}
|
|
3118
|
+
dataSource = dataSource.replace(
|
|
3119
|
+
`{${props.dataSourceDependsOn}}`,
|
|
3120
|
+
props.dependentValue
|
|
3121
|
+
);
|
|
3122
|
+
}
|
|
3123
|
+
const response = await props.serviceClient.get(dataSource);
|
|
3124
|
+
setList(response.result ?? []);
|
|
3125
|
+
}
|
|
3126
|
+
loadData();
|
|
3127
|
+
}, [
|
|
3128
|
+
props.dataSource,
|
|
3129
|
+
props.dataSourceDependsOn,
|
|
3130
|
+
props.dataset,
|
|
3131
|
+
props.dependentValue,
|
|
3132
|
+
props.serviceClient
|
|
3133
|
+
]);
|
|
3134
|
+
const changeHandler = (event) => {
|
|
3135
|
+
props.callback?.({
|
|
3136
|
+
name: props.name,
|
|
3137
|
+
value: event.target.value,
|
|
3138
|
+
index: props.index,
|
|
3139
|
+
groupKey: props.groupKey
|
|
3140
|
+
});
|
|
3141
|
+
};
|
|
3142
|
+
const value = props.value === void 0 || props.value === null ? "" : String(props.value);
|
|
3143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("label", { className: "block mb-1", children: [
|
|
3144
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-sm font-medium", children: props.attributes?.label }),
|
|
3145
|
+
list.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3146
|
+
"input",
|
|
3147
|
+
{
|
|
3148
|
+
type: "text",
|
|
3149
|
+
name: props.name,
|
|
3150
|
+
id: props.name,
|
|
3151
|
+
value,
|
|
3152
|
+
onChange: changeHandler,
|
|
3153
|
+
required: props.attributes?.required,
|
|
3154
|
+
placeholder: props.attributes?.placeholder,
|
|
3155
|
+
disabled: props.attributes?.readOnly,
|
|
3156
|
+
className: `peer input mt-1 py-1.5 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`
|
|
3157
|
+
}
|
|
3158
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
3159
|
+
"select",
|
|
3160
|
+
{
|
|
3161
|
+
name: props.name,
|
|
3162
|
+
id: props.name,
|
|
3163
|
+
value,
|
|
3164
|
+
onChange: changeHandler,
|
|
3165
|
+
required: props.attributes?.required,
|
|
3166
|
+
disabled: props.attributes?.readOnly,
|
|
3167
|
+
className: `peer select my-1 py-1 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`,
|
|
3168
|
+
children: [
|
|
3169
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("option", { value: "", children: props.attributes?.placeholder || "Select" }),
|
|
3170
|
+
list.map((item) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3171
|
+
"option",
|
|
3172
|
+
{
|
|
3173
|
+
value: item[props.dataKeyFieldName],
|
|
3174
|
+
children: item[props.dataTextFieldName]
|
|
3175
|
+
},
|
|
3176
|
+
String(item[props.dataKeyFieldName])
|
|
3177
|
+
))
|
|
3178
|
+
]
|
|
3179
|
+
}
|
|
3180
|
+
),
|
|
3181
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props.attributes?.errorMessage ?? "" })
|
|
3182
|
+
] });
|
|
3183
|
+
};
|
|
3184
|
+
Switcher_default = Switcher;
|
|
3185
|
+
}
|
|
3186
|
+
});
|
|
3187
|
+
|
|
2845
3188
|
// src/components/controls/edit/InputControlClient.tsx
|
|
2846
3189
|
var InputControlClient_exports = {};
|
|
2847
3190
|
__export(InputControlClient_exports, {
|
|
2848
3191
|
default: () => InputControlClient_default
|
|
2849
3192
|
});
|
|
2850
|
-
var
|
|
3193
|
+
var import_react40, import_jsx_runtime49, InputControl, InputControlClient_default;
|
|
2851
3194
|
var init_InputControlClient = __esm({
|
|
2852
3195
|
"src/components/controls/edit/InputControlClient.tsx"() {
|
|
2853
3196
|
"use strict";
|
|
2854
3197
|
"use client";
|
|
2855
|
-
|
|
3198
|
+
import_react40 = __toESM(require("react"));
|
|
2856
3199
|
init_MultilineTextInput();
|
|
2857
3200
|
init_LineTextInput();
|
|
2858
3201
|
init_MoneyInput();
|
|
@@ -2872,8 +3215,11 @@ var init_InputControlClient = __esm({
|
|
|
2872
3215
|
init_TimeInput();
|
|
2873
3216
|
init_AssetUpload();
|
|
2874
3217
|
init_SwitchInput();
|
|
2875
|
-
|
|
2876
|
-
|
|
3218
|
+
init_DateInput();
|
|
3219
|
+
init_RadioInput();
|
|
3220
|
+
init_Switcher();
|
|
3221
|
+
import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3222
|
+
InputControl = import_react40.default.forwardRef(
|
|
2877
3223
|
(props, ref) => {
|
|
2878
3224
|
const ControlComponents = {
|
|
2879
3225
|
[InputControlType_default.lineTextInput]: LineTextInput_default,
|
|
@@ -2893,10 +3239,14 @@ var init_InputControlClient = __esm({
|
|
|
2893
3239
|
[InputControlType_default.booleanSelect]: BooleanSelect_default,
|
|
2894
3240
|
[InputControlType_default.timeInput]: TimeInput_default,
|
|
2895
3241
|
[InputControlType_default.asset]: AssetUpload_default,
|
|
2896
|
-
[InputControlType_default.
|
|
3242
|
+
[InputControlType_default.assetUpload]: AssetUpload_default,
|
|
3243
|
+
[InputControlType_default.switchInput]: SwitchInput_default,
|
|
3244
|
+
[InputControlType_default.dateInput]: DateInput_default,
|
|
3245
|
+
[InputControlType_default.radioInput]: RadioInput_default,
|
|
3246
|
+
[InputControlType_default.switcher]: Switcher_default
|
|
2897
3247
|
};
|
|
2898
3248
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
2899
|
-
return /* @__PURE__ */ (0,
|
|
3249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react40.default.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectedControlComponent, { ...props }) : "Control not found" });
|
|
2900
3250
|
}
|
|
2901
3251
|
);
|
|
2902
3252
|
InputControl.displayName = "InputControl";
|
|
@@ -3123,29 +3473,29 @@ var LinkNodeButton_exports = {};
|
|
|
3123
3473
|
__export(LinkNodeButton_exports, {
|
|
3124
3474
|
default: () => LinkNodeButton_default
|
|
3125
3475
|
});
|
|
3126
|
-
var
|
|
3476
|
+
var import_react41, import_jsx_runtime53, LinkNodeButton, LinkNodeButton_default;
|
|
3127
3477
|
var init_LinkNodeButton = __esm({
|
|
3128
3478
|
"src/components/pageRenderingEngine/nodes/LinkNodeButton.tsx"() {
|
|
3129
3479
|
"use strict";
|
|
3130
3480
|
"use client";
|
|
3131
|
-
|
|
3481
|
+
import_react41 = require("react");
|
|
3132
3482
|
init_Button();
|
|
3133
3483
|
init_ServiceClient();
|
|
3134
3484
|
init_ToastService();
|
|
3135
|
-
|
|
3485
|
+
import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3136
3486
|
LinkNodeButton = (props) => {
|
|
3137
3487
|
const { node, dataitem, children, linkText, linkType, linkUrl } = props;
|
|
3138
|
-
const [isLoading, setIsLoading] = (0,
|
|
3139
|
-
const [successMessage, setSuccessMessage] = (0,
|
|
3488
|
+
const [isLoading, setIsLoading] = (0, import_react41.useState)(false);
|
|
3489
|
+
const [successMessage, setSuccessMessage] = (0, import_react41.useState)(null);
|
|
3140
3490
|
console.log("LinkNodeButton props:", props);
|
|
3141
|
-
const extractFieldNames = (0,
|
|
3491
|
+
const extractFieldNames = (0, import_react41.useCallback)((template) => {
|
|
3142
3492
|
if (!template) return [];
|
|
3143
3493
|
const regex = /\{(\{\})?([a-zA-Z_$][a-zA-Z0-9_$]*)(?:\}\})?\}/g;
|
|
3144
3494
|
const matches = Array.from(template.matchAll(regex));
|
|
3145
3495
|
const fieldNames = matches.map((match) => match[2] || match[1]).filter((name, index, self) => self.indexOf(name) === index);
|
|
3146
3496
|
return fieldNames;
|
|
3147
3497
|
}, []);
|
|
3148
|
-
const replaceTemplateVariables = (0,
|
|
3498
|
+
const replaceTemplateVariables = (0, import_react41.useCallback)(
|
|
3149
3499
|
(template, responseData) => {
|
|
3150
3500
|
if (!template) return template;
|
|
3151
3501
|
let result = template;
|
|
@@ -3177,7 +3527,7 @@ var init_LinkNodeButton = __esm({
|
|
|
3177
3527
|
},
|
|
3178
3528
|
[props.routeParameters, dataitem, extractFieldNames]
|
|
3179
3529
|
);
|
|
3180
|
-
const getNestedValue7 = (0,
|
|
3530
|
+
const getNestedValue7 = (0, import_react41.useCallback)((obj, path) => {
|
|
3181
3531
|
if (!obj || !path) return void 0;
|
|
3182
3532
|
if (obj[path] !== void 0) {
|
|
3183
3533
|
return obj[path];
|
|
@@ -3192,7 +3542,7 @@ var init_LinkNodeButton = __esm({
|
|
|
3192
3542
|
}
|
|
3193
3543
|
return current;
|
|
3194
3544
|
}, []);
|
|
3195
|
-
const onClick = (0,
|
|
3545
|
+
const onClick = (0, import_react41.useCallback)(async () => {
|
|
3196
3546
|
if (!node.postUrl) {
|
|
3197
3547
|
return {
|
|
3198
3548
|
isSuccessful: false,
|
|
@@ -3299,32 +3649,32 @@ var init_LinkNodeButton = __esm({
|
|
|
3299
3649
|
return children;
|
|
3300
3650
|
}
|
|
3301
3651
|
if (linkText) {
|
|
3302
|
-
return /* @__PURE__ */ (0,
|
|
3652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: linkText });
|
|
3303
3653
|
}
|
|
3304
3654
|
return node.title || "Button";
|
|
3305
3655
|
};
|
|
3306
3656
|
const fontSize = node.children?.[0]?.style?.match(/font-size:\s*([^;]+)/)?.[1];
|
|
3307
|
-
return /* @__PURE__ */ (0,
|
|
3657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "link-button-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3308
3658
|
Button_default,
|
|
3309
3659
|
{
|
|
3310
3660
|
ButtonType: linkType,
|
|
3311
3661
|
onClick,
|
|
3312
3662
|
disabled: isLoading || !!successMessage,
|
|
3313
3663
|
className: "w-full",
|
|
3314
|
-
children: successMessage ? /* @__PURE__ */ (0,
|
|
3664
|
+
children: successMessage ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
3315
3665
|
"span",
|
|
3316
3666
|
{
|
|
3317
3667
|
style: fontSize ? { fontSize } : void 0,
|
|
3318
3668
|
className: "inline-flex items-center gap-2",
|
|
3319
3669
|
children: [
|
|
3320
|
-
/* @__PURE__ */ (0,
|
|
3670
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3321
3671
|
"svg",
|
|
3322
3672
|
{
|
|
3323
3673
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3324
3674
|
viewBox: "0 0 20 20",
|
|
3325
3675
|
fill: "currentColor",
|
|
3326
3676
|
className: "w-5 h-5",
|
|
3327
|
-
children: /* @__PURE__ */ (0,
|
|
3677
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3328
3678
|
"path",
|
|
3329
3679
|
{
|
|
3330
3680
|
fillRule: "evenodd",
|
|
@@ -3334,7 +3684,7 @@ var init_LinkNodeButton = __esm({
|
|
|
3334
3684
|
)
|
|
3335
3685
|
}
|
|
3336
3686
|
),
|
|
3337
|
-
/* @__PURE__ */ (0,
|
|
3687
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: successMessage })
|
|
3338
3688
|
]
|
|
3339
3689
|
}
|
|
3340
3690
|
) : renderButtonContent()
|
|
@@ -3351,9 +3701,9 @@ __export(CopyButton_exports, {
|
|
|
3351
3701
|
default: () => CopyButton
|
|
3352
3702
|
});
|
|
3353
3703
|
function CopyButton({ text }) {
|
|
3354
|
-
const [copied, setCopied] = (0,
|
|
3355
|
-
const timeoutRef = (0,
|
|
3356
|
-
(0,
|
|
3704
|
+
const [copied, setCopied] = (0, import_react48.useState)(false);
|
|
3705
|
+
const timeoutRef = (0, import_react48.useRef)(null);
|
|
3706
|
+
(0, import_react48.useEffect)(() => {
|
|
3357
3707
|
return () => {
|
|
3358
3708
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3359
3709
|
};
|
|
@@ -3368,13 +3718,13 @@ function CopyButton({ text }) {
|
|
|
3368
3718
|
console.error("Failed to copy: ", err);
|
|
3369
3719
|
}
|
|
3370
3720
|
};
|
|
3371
|
-
return /* @__PURE__ */ (0,
|
|
3721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
3372
3722
|
"button",
|
|
3373
3723
|
{
|
|
3374
3724
|
onClick: handleCopy,
|
|
3375
3725
|
className: "flex gap-1 items-center hover:text-white transition",
|
|
3376
3726
|
children: [
|
|
3377
|
-
/* @__PURE__ */ (0,
|
|
3727
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3378
3728
|
"svg",
|
|
3379
3729
|
{
|
|
3380
3730
|
width: "16",
|
|
@@ -3382,7 +3732,7 @@ function CopyButton({ text }) {
|
|
|
3382
3732
|
viewBox: "0 0 24 24",
|
|
3383
3733
|
className: "w-4 h-4",
|
|
3384
3734
|
fill: "currentColor",
|
|
3385
|
-
children: /* @__PURE__ */ (0,
|
|
3735
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3386
3736
|
"path",
|
|
3387
3737
|
{
|
|
3388
3738
|
fillRule: "evenodd",
|
|
@@ -3397,54 +3747,54 @@ function CopyButton({ text }) {
|
|
|
3397
3747
|
}
|
|
3398
3748
|
);
|
|
3399
3749
|
}
|
|
3400
|
-
var
|
|
3750
|
+
var import_react48, import_jsx_runtime63;
|
|
3401
3751
|
var init_CopyButton = __esm({
|
|
3402
3752
|
"src/components/CopyButton.tsx"() {
|
|
3403
3753
|
"use strict";
|
|
3404
3754
|
"use client";
|
|
3405
|
-
|
|
3406
|
-
|
|
3755
|
+
import_react48 = require("react");
|
|
3756
|
+
import_jsx_runtime63 = require("react/jsx-runtime");
|
|
3407
3757
|
}
|
|
3408
3758
|
});
|
|
3409
3759
|
|
|
3410
3760
|
// src/components/IFrameLoaderView.tsx
|
|
3411
|
-
var
|
|
3761
|
+
var import_react51, import_jsx_runtime67, IFrameLoaderView, IFrameLoaderView_default;
|
|
3412
3762
|
var init_IFrameLoaderView = __esm({
|
|
3413
3763
|
"src/components/IFrameLoaderView.tsx"() {
|
|
3414
3764
|
"use strict";
|
|
3415
|
-
|
|
3416
|
-
|
|
3765
|
+
import_react51 = __toESM(require("react"));
|
|
3766
|
+
import_jsx_runtime67 = require("react/jsx-runtime");
|
|
3417
3767
|
IFrameLoaderView = (props) => {
|
|
3418
|
-
return /* @__PURE__ */ (0,
|
|
3419
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
3420
|
-
/* @__PURE__ */ (0,
|
|
3421
|
-
/* @__PURE__ */ (0,
|
|
3422
|
-
/* @__PURE__ */ (0,
|
|
3423
|
-
/* @__PURE__ */ (0,
|
|
3424
|
-
/* @__PURE__ */ (0,
|
|
3768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_react51.default.Fragment, { children: [
|
|
3769
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
3770
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
3771
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
3772
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "ml-2", children: [
|
|
3773
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
3774
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
3425
3775
|
] })
|
|
3426
3776
|
] }),
|
|
3427
|
-
/* @__PURE__ */ (0,
|
|
3428
|
-
/* @__PURE__ */ (0,
|
|
3429
|
-
/* @__PURE__ */ (0,
|
|
3430
|
-
/* @__PURE__ */ (0,
|
|
3431
|
-
/* @__PURE__ */ (0,
|
|
3432
|
-
/* @__PURE__ */ (0,
|
|
3433
|
-
/* @__PURE__ */ (0,
|
|
3777
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
3778
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "animate-pulse", children: [
|
|
3779
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3780
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3781
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3782
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3783
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3434
3784
|
] }),
|
|
3435
|
-
/* @__PURE__ */ (0,
|
|
3436
|
-
/* @__PURE__ */ (0,
|
|
3437
|
-
/* @__PURE__ */ (0,
|
|
3438
|
-
/* @__PURE__ */ (0,
|
|
3439
|
-
/* @__PURE__ */ (0,
|
|
3440
|
-
/* @__PURE__ */ (0,
|
|
3785
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "animate-pulse", children: [
|
|
3786
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3787
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3788
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3789
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3790
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3441
3791
|
] }),
|
|
3442
|
-
/* @__PURE__ */ (0,
|
|
3443
|
-
/* @__PURE__ */ (0,
|
|
3444
|
-
/* @__PURE__ */ (0,
|
|
3445
|
-
/* @__PURE__ */ (0,
|
|
3446
|
-
/* @__PURE__ */ (0,
|
|
3447
|
-
/* @__PURE__ */ (0,
|
|
3792
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "animate-pulse", children: [
|
|
3793
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3794
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3795
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3796
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3797
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3448
3798
|
] })
|
|
3449
3799
|
] })
|
|
3450
3800
|
] }) }),
|
|
@@ -3460,19 +3810,19 @@ var IframeClient_exports = {};
|
|
|
3460
3810
|
__export(IframeClient_exports, {
|
|
3461
3811
|
default: () => IframeClient_default
|
|
3462
3812
|
});
|
|
3463
|
-
var
|
|
3813
|
+
var import_react52, import_jsx_runtime68, IframeClient, IframeClient_default;
|
|
3464
3814
|
var init_IframeClient = __esm({
|
|
3465
3815
|
"src/components/pageRenderingEngine/nodes/IframeClient.tsx"() {
|
|
3466
3816
|
"use strict";
|
|
3467
3817
|
"use client";
|
|
3468
|
-
|
|
3818
|
+
import_react52 = __toESM(require("react"));
|
|
3469
3819
|
init_IFrameLoaderView();
|
|
3470
|
-
|
|
3820
|
+
import_jsx_runtime68 = require("react/jsx-runtime");
|
|
3471
3821
|
IframeClient = ({ src }) => {
|
|
3472
|
-
const iframeRef = (0,
|
|
3473
|
-
const [iframeHeight, setIframeHeight] = (0,
|
|
3474
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
3475
|
-
(0,
|
|
3822
|
+
const iframeRef = (0, import_react52.useRef)(null);
|
|
3823
|
+
const [iframeHeight, setIframeHeight] = (0, import_react52.useState)("100%");
|
|
3824
|
+
const [isDataFound, setIsDataFound] = (0, import_react52.useState)(null);
|
|
3825
|
+
(0, import_react52.useEffect)(() => {
|
|
3476
3826
|
const handleReceiveMessage = (event) => {
|
|
3477
3827
|
const eventName = event?.data?.eventName;
|
|
3478
3828
|
const payload = event?.data?.payload;
|
|
@@ -3487,7 +3837,7 @@ var init_IframeClient = __esm({
|
|
|
3487
3837
|
window.addEventListener("message", handleReceiveMessage);
|
|
3488
3838
|
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
3489
3839
|
}, []);
|
|
3490
|
-
(0,
|
|
3840
|
+
(0, import_react52.useEffect)(() => {
|
|
3491
3841
|
const handleResize = () => {
|
|
3492
3842
|
if (iframeRef.current) {
|
|
3493
3843
|
iframeRef.current.contentWindow?.postMessage({ eventName: "RESIZE" }, "*");
|
|
@@ -3499,7 +3849,7 @@ var init_IframeClient = __esm({
|
|
|
3499
3849
|
const handleIframeLoad = () => {
|
|
3500
3850
|
setIsDataFound(true);
|
|
3501
3851
|
};
|
|
3502
|
-
return /* @__PURE__ */ (0,
|
|
3852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react52.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
3503
3853
|
"iframe",
|
|
3504
3854
|
{
|
|
3505
3855
|
ref: iframeRef,
|
|
@@ -3719,21 +4069,21 @@ var Pagination_exports = {};
|
|
|
3719
4069
|
__export(Pagination_exports, {
|
|
3720
4070
|
default: () => Pagination_default
|
|
3721
4071
|
});
|
|
3722
|
-
var
|
|
4072
|
+
var import_react53, import_jsx_runtime73, Pagination, Pagination_default;
|
|
3723
4073
|
var init_Pagination = __esm({
|
|
3724
4074
|
"src/components/Pagination.tsx"() {
|
|
3725
4075
|
"use strict";
|
|
3726
4076
|
"use client";
|
|
3727
|
-
|
|
4077
|
+
import_react53 = require("react");
|
|
3728
4078
|
init_OdataBuilder();
|
|
3729
4079
|
init_Icon();
|
|
3730
4080
|
init_StyleTypes();
|
|
3731
4081
|
init_InputControlType();
|
|
3732
4082
|
init_Hyperlink();
|
|
3733
|
-
|
|
4083
|
+
import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3734
4084
|
Pagination = (props) => {
|
|
3735
4085
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
3736
|
-
const builder = (0,
|
|
4086
|
+
const builder = (0, import_react53.useMemo)(() => {
|
|
3737
4087
|
const b = new OdataBuilder(path);
|
|
3738
4088
|
if (query) b.setQuery(query);
|
|
3739
4089
|
return b;
|
|
@@ -3774,7 +4124,7 @@ var init_Pagination = __esm({
|
|
|
3774
4124
|
return range;
|
|
3775
4125
|
};
|
|
3776
4126
|
const paginationRange = getPaginationRange();
|
|
3777
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */ (0,
|
|
4127
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3778
4128
|
Hyperlink,
|
|
3779
4129
|
{
|
|
3780
4130
|
linkType: "Link" /* Link */,
|
|
@@ -3789,9 +4139,9 @@ var init_Pagination = __esm({
|
|
|
3789
4139
|
);
|
|
3790
4140
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
3791
4141
|
if (disabled) {
|
|
3792
|
-
return /* @__PURE__ */ (0,
|
|
4142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.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 });
|
|
3793
4143
|
}
|
|
3794
|
-
return /* @__PURE__ */ (0,
|
|
4144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3795
4145
|
Hyperlink,
|
|
3796
4146
|
{
|
|
3797
4147
|
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",
|
|
@@ -3801,35 +4151,35 @@ var init_Pagination = __esm({
|
|
|
3801
4151
|
);
|
|
3802
4152
|
};
|
|
3803
4153
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
3804
|
-
return /* @__PURE__ */ (0,
|
|
3805
|
-
/* @__PURE__ */ (0,
|
|
3806
|
-
/* @__PURE__ */ (0,
|
|
4154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "py-6 border-t bg-default", children: [
|
|
4155
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
4156
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "text-sm", children: [
|
|
3807
4157
|
"Showing ",
|
|
3808
|
-
/* @__PURE__ */ (0,
|
|
4158
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { className: "font-semibold", children: [
|
|
3809
4159
|
startItem,
|
|
3810
4160
|
"-",
|
|
3811
4161
|
endItem
|
|
3812
4162
|
] }),
|
|
3813
4163
|
" ",
|
|
3814
4164
|
"out of ",
|
|
3815
|
-
/* @__PURE__ */ (0,
|
|
4165
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
3816
4166
|
" results"
|
|
3817
4167
|
] }),
|
|
3818
|
-
totalPages > 1 && /* @__PURE__ */ (0,
|
|
3819
|
-
/* @__PURE__ */ (0,
|
|
4168
|
+
totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center space-x-1", children: [
|
|
4169
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
3820
4170
|
NavigationButton,
|
|
3821
4171
|
{
|
|
3822
4172
|
page: activePageNumber - 1,
|
|
3823
4173
|
disabled: activePageNumber === 1,
|
|
3824
4174
|
children: [
|
|
3825
|
-
/* @__PURE__ */ (0,
|
|
3826
|
-
/* @__PURE__ */ (0,
|
|
4175
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
4176
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "text-sm", children: "Prev" })
|
|
3827
4177
|
]
|
|
3828
4178
|
}
|
|
3829
4179
|
),
|
|
3830
4180
|
paginationRange.map((item, index) => {
|
|
3831
4181
|
if (item === "...") {
|
|
3832
|
-
return /* @__PURE__ */ (0,
|
|
4182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3833
4183
|
"span",
|
|
3834
4184
|
{
|
|
3835
4185
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -3839,23 +4189,23 @@ var init_Pagination = __esm({
|
|
|
3839
4189
|
);
|
|
3840
4190
|
}
|
|
3841
4191
|
const page = item;
|
|
3842
|
-
return /* @__PURE__ */ (0,
|
|
4192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(PageButton, { page, children: page }, page);
|
|
3843
4193
|
}),
|
|
3844
|
-
/* @__PURE__ */ (0,
|
|
4194
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
3845
4195
|
NavigationButton,
|
|
3846
4196
|
{
|
|
3847
4197
|
page: activePageNumber + 1,
|
|
3848
4198
|
disabled: activePageNumber === totalPages,
|
|
3849
4199
|
children: [
|
|
3850
|
-
/* @__PURE__ */ (0,
|
|
3851
|
-
/* @__PURE__ */ (0,
|
|
4200
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "text-sm", children: "Next" }),
|
|
4201
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
3852
4202
|
]
|
|
3853
4203
|
}
|
|
3854
4204
|
)
|
|
3855
4205
|
] }),
|
|
3856
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0,
|
|
3857
|
-
/* @__PURE__ */ (0,
|
|
3858
|
-
/* @__PURE__ */ (0,
|
|
4206
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
4207
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "text-sm", children: "Go to:" }),
|
|
4208
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3859
4209
|
"input",
|
|
3860
4210
|
{
|
|
3861
4211
|
type: "number",
|
|
@@ -3876,9 +4226,9 @@ var init_Pagination = __esm({
|
|
|
3876
4226
|
) })
|
|
3877
4227
|
] })
|
|
3878
4228
|
] }),
|
|
3879
|
-
showPageSizeSelector && /* @__PURE__ */ (0,
|
|
3880
|
-
/* @__PURE__ */ (0,
|
|
3881
|
-
/* @__PURE__ */ (0,
|
|
4229
|
+
showPageSizeSelector && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
4230
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "text-sm", children: "Show:" }),
|
|
4231
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3882
4232
|
Hyperlink,
|
|
3883
4233
|
{
|
|
3884
4234
|
className: `
|
|
@@ -3890,7 +4240,7 @@ var init_Pagination = __esm({
|
|
|
3890
4240
|
},
|
|
3891
4241
|
size
|
|
3892
4242
|
)) }),
|
|
3893
|
-
/* @__PURE__ */ (0,
|
|
4243
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "text-sm", children: "per page" })
|
|
3894
4244
|
] }) })
|
|
3895
4245
|
] });
|
|
3896
4246
|
};
|
|
@@ -3903,13 +4253,13 @@ var Slider_exports = {};
|
|
|
3903
4253
|
__export(Slider_exports, {
|
|
3904
4254
|
default: () => Slider_default
|
|
3905
4255
|
});
|
|
3906
|
-
var
|
|
4256
|
+
var import_react54, import_jsx_runtime74, Slider, ArrowButton, ProgressPill, Slider_default;
|
|
3907
4257
|
var init_Slider = __esm({
|
|
3908
4258
|
"src/components/Slider.tsx"() {
|
|
3909
4259
|
"use strict";
|
|
3910
4260
|
"use client";
|
|
3911
|
-
|
|
3912
|
-
|
|
4261
|
+
import_react54 = __toESM(require("react"));
|
|
4262
|
+
import_jsx_runtime74 = require("react/jsx-runtime");
|
|
3913
4263
|
Slider = ({
|
|
3914
4264
|
children,
|
|
3915
4265
|
slidesToShow = 4,
|
|
@@ -3927,13 +4277,13 @@ var init_Slider = __esm({
|
|
|
3927
4277
|
pillStyle = "cumulative",
|
|
3928
4278
|
progressPosition = "bottom"
|
|
3929
4279
|
}) => {
|
|
3930
|
-
const [currentSlide, setCurrentSlide] = (0,
|
|
3931
|
-
const [transition, setTransition] = (0,
|
|
3932
|
-
const [slidesToShowState, setSlidesToShowState] = (0,
|
|
4280
|
+
const [currentSlide, setCurrentSlide] = (0, import_react54.useState)(0);
|
|
4281
|
+
const [transition, setTransition] = (0, import_react54.useState)(true);
|
|
4282
|
+
const [slidesToShowState, setSlidesToShowState] = (0, import_react54.useState)(
|
|
3933
4283
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
3934
4284
|
);
|
|
3935
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
3936
|
-
(0,
|
|
4285
|
+
const [isPlaying, setIsPlaying] = (0, import_react54.useState)(autoplay);
|
|
4286
|
+
(0, import_react54.useEffect)(() => {
|
|
3937
4287
|
if (typeof slidesToShow === "number") return;
|
|
3938
4288
|
const handleResize = () => {
|
|
3939
4289
|
if (window.innerWidth >= 1024) {
|
|
@@ -3948,7 +4298,7 @@ var init_Slider = __esm({
|
|
|
3948
4298
|
window.addEventListener("resize", handleResize);
|
|
3949
4299
|
return () => window.removeEventListener("resize", handleResize);
|
|
3950
4300
|
}, [slidesToShow]);
|
|
3951
|
-
(0,
|
|
4301
|
+
(0, import_react54.useEffect)(() => {
|
|
3952
4302
|
if (!autoplay) return;
|
|
3953
4303
|
const timer = setInterval(() => {
|
|
3954
4304
|
if (isPlaying) {
|
|
@@ -3957,7 +4307,7 @@ var init_Slider = __esm({
|
|
|
3957
4307
|
}, autoplay_speed);
|
|
3958
4308
|
return () => clearInterval(timer);
|
|
3959
4309
|
}, [autoplay, autoplay_speed, currentSlide, isPlaying]);
|
|
3960
|
-
const totalSlides =
|
|
4310
|
+
const totalSlides = import_react54.Children.count(children);
|
|
3961
4311
|
const maxSlide = totalSlides - slidesToShowState;
|
|
3962
4312
|
const nextSlide = () => {
|
|
3963
4313
|
if (currentSlide >= maxSlide) {
|
|
@@ -4002,16 +4352,16 @@ var init_Slider = __esm({
|
|
|
4002
4352
|
}
|
|
4003
4353
|
};
|
|
4004
4354
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
4005
|
-
const slides =
|
|
4006
|
-
if (!
|
|
4355
|
+
const slides = import_react54.Children.map(children, (child, index) => {
|
|
4356
|
+
if (!import_react54.default.isValidElement(child)) return null;
|
|
4007
4357
|
const childProps = child.props;
|
|
4008
4358
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
4009
|
-
return /* @__PURE__ */ (0,
|
|
4359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4010
4360
|
"div",
|
|
4011
4361
|
{
|
|
4012
4362
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
4013
4363
|
style: { width: `calc(${100 / slidesToShowState}%)`, paddingRight: gap },
|
|
4014
|
-
children: (0,
|
|
4364
|
+
children: (0, import_react54.cloneElement)(child, {
|
|
4015
4365
|
className: mergedClassName
|
|
4016
4366
|
})
|
|
4017
4367
|
},
|
|
@@ -4029,14 +4379,14 @@ var init_Slider = __esm({
|
|
|
4029
4379
|
return "bottom-4";
|
|
4030
4380
|
}
|
|
4031
4381
|
};
|
|
4032
|
-
return /* @__PURE__ */ (0,
|
|
4382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
4033
4383
|
"div",
|
|
4034
4384
|
{
|
|
4035
4385
|
className: `relative w-full overflow-hidden ${className}`,
|
|
4036
4386
|
onMouseEnter: handleMouseEnter,
|
|
4037
4387
|
onMouseLeave: handleMouseLeave,
|
|
4038
4388
|
children: [
|
|
4039
|
-
/* @__PURE__ */ (0,
|
|
4389
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4040
4390
|
"div",
|
|
4041
4391
|
{
|
|
4042
4392
|
className: "flex h-full",
|
|
@@ -4047,18 +4397,18 @@ var init_Slider = __esm({
|
|
|
4047
4397
|
children: slides
|
|
4048
4398
|
}
|
|
4049
4399
|
),
|
|
4050
|
-
show_arrows && /* @__PURE__ */ (0,
|
|
4051
|
-
/* @__PURE__ */ (0,
|
|
4400
|
+
show_arrows && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
|
|
4401
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4052
4402
|
ArrowButton,
|
|
4053
4403
|
{
|
|
4054
4404
|
direction: "left",
|
|
4055
4405
|
onClick: prevSlide,
|
|
4056
4406
|
visible: infinite_scroll || currentSlide > 0,
|
|
4057
4407
|
className: arrowClassName,
|
|
4058
|
-
children: /* @__PURE__ */ (0,
|
|
4408
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.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_runtime74.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
4059
4409
|
}
|
|
4060
4410
|
),
|
|
4061
|
-
/* @__PURE__ */ (0,
|
|
4411
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
4062
4412
|
ArrowButton,
|
|
4063
4413
|
{
|
|
4064
4414
|
direction: "right",
|
|
@@ -4066,13 +4416,13 @@ var init_Slider = __esm({
|
|
|
4066
4416
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
4067
4417
|
className: arrowClassName,
|
|
4068
4418
|
children: [
|
|
4069
|
-
/* @__PURE__ */ (0,
|
|
4419
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.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_runtime74.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
|
|
4070
4420
|
" "
|
|
4071
4421
|
]
|
|
4072
4422
|
}
|
|
4073
4423
|
)
|
|
4074
4424
|
] }),
|
|
4075
|
-
show_dots && /* @__PURE__ */ (0,
|
|
4425
|
+
show_dots && /* @__PURE__ */ (0, import_jsx_runtime74.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_runtime74.jsx)(
|
|
4076
4426
|
ProgressPill,
|
|
4077
4427
|
{
|
|
4078
4428
|
active: index === currentSlide,
|
|
@@ -4098,7 +4448,7 @@ var init_Slider = __esm({
|
|
|
4098
4448
|
visible,
|
|
4099
4449
|
children,
|
|
4100
4450
|
className = ""
|
|
4101
|
-
}) => /* @__PURE__ */ (0,
|
|
4451
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4102
4452
|
"button",
|
|
4103
4453
|
{
|
|
4104
4454
|
className: `
|
|
@@ -4124,13 +4474,13 @@ var init_Slider = __esm({
|
|
|
4124
4474
|
currentSlide,
|
|
4125
4475
|
totalSlides
|
|
4126
4476
|
}) => {
|
|
4127
|
-
const [progress, setProgress] = (0,
|
|
4128
|
-
(0,
|
|
4477
|
+
const [progress, setProgress] = (0, import_react54.useState)(0);
|
|
4478
|
+
(0, import_react54.useEffect)(() => {
|
|
4129
4479
|
if (active) {
|
|
4130
4480
|
setProgress(0);
|
|
4131
4481
|
}
|
|
4132
4482
|
}, [active, index]);
|
|
4133
|
-
(0,
|
|
4483
|
+
(0, import_react54.useEffect)(() => {
|
|
4134
4484
|
if (!active || !isPlaying) {
|
|
4135
4485
|
if (!active) {
|
|
4136
4486
|
setProgress(0);
|
|
@@ -4185,7 +4535,7 @@ var init_Slider = __esm({
|
|
|
4185
4535
|
const renderProgressBar = () => {
|
|
4186
4536
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
4187
4537
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
4188
|
-
return /* @__PURE__ */ (0,
|
|
4538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4189
4539
|
"div",
|
|
4190
4540
|
{
|
|
4191
4541
|
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`,
|
|
@@ -4197,7 +4547,7 @@ var init_Slider = __esm({
|
|
|
4197
4547
|
};
|
|
4198
4548
|
const renderCumulativeFill = () => {
|
|
4199
4549
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
4200
|
-
return /* @__PURE__ */ (0,
|
|
4550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4201
4551
|
"div",
|
|
4202
4552
|
{
|
|
4203
4553
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -4207,7 +4557,7 @@ var init_Slider = __esm({
|
|
|
4207
4557
|
}
|
|
4208
4558
|
return null;
|
|
4209
4559
|
};
|
|
4210
|
-
return /* @__PURE__ */ (0,
|
|
4560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
4211
4561
|
"button",
|
|
4212
4562
|
{
|
|
4213
4563
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -4235,6 +4585,7 @@ __export(index_exports, {
|
|
|
4235
4585
|
DataFormRenderer: () => DataFormRenderer_default,
|
|
4236
4586
|
DataList: () => DataList_default,
|
|
4237
4587
|
DataListRenderer: () => DataListRenderer_default,
|
|
4588
|
+
DateInput: () => DateInput_default,
|
|
4238
4589
|
DateTimeInput: () => DateTimeInput_default,
|
|
4239
4590
|
EmailInput: () => EmailInput_default,
|
|
4240
4591
|
EnterAnimationHydrator: () => EnterAnimationHydrator,
|
|
@@ -4249,6 +4600,8 @@ __export(index_exports, {
|
|
|
4249
4600
|
PageBodyRenderer: () => PageBodyRenderer_default,
|
|
4250
4601
|
PercentageInput: () => PercentageInput_default,
|
|
4251
4602
|
PhoneInput: () => PhoneInput_default,
|
|
4603
|
+
RadioInput: () => RadioInput_default,
|
|
4604
|
+
Switcher: () => Switcher_default,
|
|
4252
4605
|
TimeInput: () => TimeInput_default,
|
|
4253
4606
|
Toast: () => Toast_default,
|
|
4254
4607
|
ToastService: () => ToastService_default,
|
|
@@ -4640,13 +4993,13 @@ var InputControl_default = InputControl2;
|
|
|
4640
4993
|
init_InputControlType();
|
|
4641
4994
|
|
|
4642
4995
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
4643
|
-
var
|
|
4996
|
+
var import_react56 = __toESM(require("react"));
|
|
4644
4997
|
|
|
4645
4998
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
4646
|
-
var
|
|
4999
|
+
var import_react43 = __toESM(require("react"));
|
|
4647
5000
|
|
|
4648
5001
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
4649
|
-
var
|
|
5002
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4650
5003
|
var TextNode = (props) => {
|
|
4651
5004
|
function cssStringToJson(cssString) {
|
|
4652
5005
|
const styleObject = {};
|
|
@@ -4701,36 +5054,36 @@ var TextNode = (props) => {
|
|
|
4701
5054
|
});
|
|
4702
5055
|
}
|
|
4703
5056
|
function renderWithLineBreaks(text) {
|
|
4704
|
-
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0,
|
|
5057
|
+
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("span", { children: [
|
|
4705
5058
|
line,
|
|
4706
|
-
index < arr.length - 1 && /* @__PURE__ */ (0,
|
|
5059
|
+
index < arr.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("br", {})
|
|
4707
5060
|
] }, index));
|
|
4708
5061
|
}
|
|
4709
5062
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
4710
5063
|
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
4711
5064
|
const content = typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText;
|
|
4712
|
-
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ (0,
|
|
5065
|
+
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("sup", { children: content }) : props.node.format & 32 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("sub", { children: content }) : content;
|
|
4713
5066
|
return (
|
|
4714
5067
|
// @ts-expect-error custom code
|
|
4715
|
-
/* @__PURE__ */ (0,
|
|
5068
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: formattedContent })
|
|
4716
5069
|
);
|
|
4717
5070
|
};
|
|
4718
5071
|
var TextNode_default = TextNode;
|
|
4719
5072
|
|
|
4720
5073
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
4721
|
-
var
|
|
5074
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4722
5075
|
var LineBreakNode = () => {
|
|
4723
|
-
return /* @__PURE__ */ (0,
|
|
5076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "py-0.5 lg:py-1.5" });
|
|
4724
5077
|
};
|
|
4725
5078
|
var LineBreakNode_default = LineBreakNode;
|
|
4726
5079
|
|
|
4727
5080
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
4728
|
-
var
|
|
5081
|
+
var import_react42 = __toESM(require("react"));
|
|
4729
5082
|
|
|
4730
5083
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
4731
5084
|
init_AssetUtility();
|
|
4732
5085
|
var import_dynamic5 = __toESM(require("next/dynamic"));
|
|
4733
|
-
var
|
|
5086
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4734
5087
|
var HlsPlayer3 = (0, import_dynamic5.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
4735
5088
|
var getNestedValue = (obj, path) => {
|
|
4736
5089
|
if (!obj || !path) return void 0;
|
|
@@ -4763,7 +5116,7 @@ var ImageNode = (props) => {
|
|
|
4763
5116
|
assets = [image];
|
|
4764
5117
|
}
|
|
4765
5118
|
if (assets && assets.length > 0) {
|
|
4766
|
-
return /* @__PURE__ */ (0,
|
|
5119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4767
5120
|
DeviceAssetSelector_default,
|
|
4768
5121
|
{
|
|
4769
5122
|
device: props.device,
|
|
@@ -4804,7 +5157,7 @@ var ImageNode = (props) => {
|
|
|
4804
5157
|
right: "justify-end"
|
|
4805
5158
|
};
|
|
4806
5159
|
const isHls = imageUrl.endsWith(".m3u8");
|
|
4807
|
-
const renderMedia = () => isHls ? /* @__PURE__ */ (0,
|
|
5160
|
+
const renderMedia = () => isHls ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4808
5161
|
HlsPlayer3,
|
|
4809
5162
|
{
|
|
4810
5163
|
assetUrl: imageUrl,
|
|
@@ -4817,7 +5170,7 @@ var ImageNode = (props) => {
|
|
|
4817
5170
|
apiBaseUrl: props.apiBaseUrl,
|
|
4818
5171
|
session: props.session
|
|
4819
5172
|
}
|
|
4820
|
-
) : /* @__PURE__ */ (0,
|
|
5173
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4821
5174
|
"img",
|
|
4822
5175
|
{
|
|
4823
5176
|
style: styles,
|
|
@@ -4830,7 +5183,7 @@ var ImageNode = (props) => {
|
|
|
4830
5183
|
}
|
|
4831
5184
|
);
|
|
4832
5185
|
if (props.node.width) {
|
|
4833
|
-
return /* @__PURE__ */ (0,
|
|
5186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: `flex ${FORMAT_CLASSES2[props.node.format] ?? ""}`, children: renderMedia() });
|
|
4834
5187
|
}
|
|
4835
5188
|
return renderMedia();
|
|
4836
5189
|
};
|
|
@@ -4840,7 +5193,7 @@ var ImageNode_default = ImageNode;
|
|
|
4840
5193
|
init_StyleTypes();
|
|
4841
5194
|
init_Hyperlink();
|
|
4842
5195
|
var import_dynamic6 = __toESM(require("next/dynamic"));
|
|
4843
|
-
var
|
|
5196
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4844
5197
|
var LinkNodeButton2 = (0, import_dynamic6.default)(() => Promise.resolve().then(() => (init_LinkNodeButton(), LinkNodeButton_exports)), {
|
|
4845
5198
|
ssr: false
|
|
4846
5199
|
});
|
|
@@ -4893,13 +5246,13 @@ var LinkNode = (props) => {
|
|
|
4893
5246
|
const isButton = node.isButton === true;
|
|
4894
5247
|
const renderChildren = () => {
|
|
4895
5248
|
if (!node.children || node.children.length === 0) return null;
|
|
4896
|
-
return /* @__PURE__ */ (0,
|
|
5249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_jsx_runtime54.Fragment, { children: node.children.map((childNode, index) => {
|
|
4897
5250
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
4898
5251
|
if (!SelectedNode) {
|
|
4899
5252
|
console.warn("Unknown node type:", childNode.type);
|
|
4900
5253
|
return null;
|
|
4901
5254
|
}
|
|
4902
|
-
return /* @__PURE__ */ (0,
|
|
5255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react42.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4903
5256
|
SelectedNode,
|
|
4904
5257
|
{
|
|
4905
5258
|
node: childNode,
|
|
@@ -4912,15 +5265,15 @@ var LinkNode = (props) => {
|
|
|
4912
5265
|
};
|
|
4913
5266
|
const renderFallback = () => {
|
|
4914
5267
|
if ((!node.children || node.children.length === 0) && linkText) {
|
|
4915
|
-
return /* @__PURE__ */ (0,
|
|
5268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { children: linkText });
|
|
4916
5269
|
}
|
|
4917
5270
|
if ((!node.children || node.children.length === 0) && !linkText) {
|
|
4918
|
-
return /* @__PURE__ */ (0,
|
|
5271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("br", {});
|
|
4919
5272
|
}
|
|
4920
5273
|
return null;
|
|
4921
5274
|
};
|
|
4922
5275
|
if (isButton) {
|
|
4923
|
-
return /* @__PURE__ */ (0,
|
|
5276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
4924
5277
|
LinkNodeButton2,
|
|
4925
5278
|
{
|
|
4926
5279
|
node,
|
|
@@ -4938,7 +5291,7 @@ var LinkNode = (props) => {
|
|
|
4938
5291
|
}
|
|
4939
5292
|
);
|
|
4940
5293
|
}
|
|
4941
|
-
return /* @__PURE__ */ (0,
|
|
5294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
4942
5295
|
Hyperlink,
|
|
4943
5296
|
{
|
|
4944
5297
|
href: linkUrl || "#",
|
|
@@ -4954,10 +5307,10 @@ var LinkNode = (props) => {
|
|
|
4954
5307
|
var LinkNode_default = LinkNode;
|
|
4955
5308
|
|
|
4956
5309
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
4957
|
-
var
|
|
5310
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4958
5311
|
var SVGIconNode = ({ node }) => {
|
|
4959
5312
|
if (!node?.svgCode) return null;
|
|
4960
|
-
return /* @__PURE__ */ (0,
|
|
5313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
4961
5314
|
"span",
|
|
4962
5315
|
{
|
|
4963
5316
|
style: {
|
|
@@ -4974,7 +5327,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
4974
5327
|
|
|
4975
5328
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
4976
5329
|
var import_katex = __toESM(require("katex"));
|
|
4977
|
-
var
|
|
5330
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
4978
5331
|
var EquationNode = ({ node }) => {
|
|
4979
5332
|
const { equation, inline } = node;
|
|
4980
5333
|
let html = "";
|
|
@@ -4989,7 +5342,7 @@ var EquationNode = ({ node }) => {
|
|
|
4989
5342
|
});
|
|
4990
5343
|
}
|
|
4991
5344
|
if (inline) {
|
|
4992
|
-
return /* @__PURE__ */ (0,
|
|
5345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
4993
5346
|
"span",
|
|
4994
5347
|
{
|
|
4995
5348
|
className: "katex-inline",
|
|
@@ -4997,7 +5350,7 @@ var EquationNode = ({ node }) => {
|
|
|
4997
5350
|
}
|
|
4998
5351
|
);
|
|
4999
5352
|
}
|
|
5000
|
-
return /* @__PURE__ */ (0,
|
|
5353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
5001
5354
|
"div",
|
|
5002
5355
|
{
|
|
5003
5356
|
className: "katex-block my-3 text-center",
|
|
@@ -5008,7 +5361,7 @@ var EquationNode = ({ node }) => {
|
|
|
5008
5361
|
var EquationNode_default = EquationNode;
|
|
5009
5362
|
|
|
5010
5363
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
5011
|
-
var
|
|
5364
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5012
5365
|
function getNestedProperty(obj, path) {
|
|
5013
5366
|
if (!obj || !path) return null;
|
|
5014
5367
|
if (path.includes(".")) {
|
|
@@ -5021,7 +5374,7 @@ function getNestedProperty(obj, path) {
|
|
|
5021
5374
|
}
|
|
5022
5375
|
const value = obj[path];
|
|
5023
5376
|
if (Array.isArray(value)) {
|
|
5024
|
-
return value.map((item, index) => /* @__PURE__ */ (0,
|
|
5377
|
+
return value.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { children: String(item) }, index));
|
|
5025
5378
|
}
|
|
5026
5379
|
return value;
|
|
5027
5380
|
}
|
|
@@ -5082,7 +5435,7 @@ var DatafieldNode = (props) => {
|
|
|
5082
5435
|
const dataType = props.node.dataType;
|
|
5083
5436
|
if (isEmptyValue) return null;
|
|
5084
5437
|
if (dataType === "rawContent") {
|
|
5085
|
-
return /* @__PURE__ */ (0,
|
|
5438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
5086
5439
|
PageBodyRenderer_default,
|
|
5087
5440
|
{
|
|
5088
5441
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -5098,12 +5451,12 @@ var DatafieldNode = (props) => {
|
|
|
5098
5451
|
}
|
|
5099
5452
|
);
|
|
5100
5453
|
}
|
|
5101
|
-
return /* @__PURE__ */ (0,
|
|
5454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
5102
5455
|
"span",
|
|
5103
5456
|
{
|
|
5104
5457
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
5105
5458
|
style: styles,
|
|
5106
|
-
children: /* @__PURE__ */ (0,
|
|
5459
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
5107
5460
|
ViewControl_default,
|
|
5108
5461
|
{
|
|
5109
5462
|
controlType: dataType,
|
|
@@ -5116,7 +5469,7 @@ var DatafieldNode = (props) => {
|
|
|
5116
5469
|
var DatafieldNode_default = DatafieldNode;
|
|
5117
5470
|
|
|
5118
5471
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
5119
|
-
var
|
|
5472
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5120
5473
|
var ParagraphNode = (props) => {
|
|
5121
5474
|
const NodeTypes2 = {
|
|
5122
5475
|
["text"]: TextNode_default,
|
|
@@ -5136,9 +5489,9 @@ var ParagraphNode = (props) => {
|
|
|
5136
5489
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
5137
5490
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
5138
5491
|
if (isInlineOnlyParent) {
|
|
5139
|
-
return /* @__PURE__ */ (0,
|
|
5492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: hasChildren && props.node.children.map((node, index) => {
|
|
5140
5493
|
const SelectedNode = NodeTypes2[node.type];
|
|
5141
|
-
return /* @__PURE__ */ (0,
|
|
5494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react43.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5142
5495
|
SelectedNode,
|
|
5143
5496
|
{
|
|
5144
5497
|
node,
|
|
@@ -5150,10 +5503,10 @@ var ParagraphNode = (props) => {
|
|
|
5150
5503
|
) }, index);
|
|
5151
5504
|
}) });
|
|
5152
5505
|
}
|
|
5153
|
-
return /* @__PURE__ */ (0,
|
|
5506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: " " + formatClasses, children: [
|
|
5154
5507
|
hasChildren && props.node.children.map((node, index) => {
|
|
5155
5508
|
const SelectedNode = NodeTypes2[node.type];
|
|
5156
|
-
return /* @__PURE__ */ (0,
|
|
5509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react43.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5157
5510
|
SelectedNode,
|
|
5158
5511
|
{
|
|
5159
5512
|
node,
|
|
@@ -5164,14 +5517,14 @@ var ParagraphNode = (props) => {
|
|
|
5164
5517
|
}
|
|
5165
5518
|
) }, index);
|
|
5166
5519
|
}),
|
|
5167
|
-
!hasChildren && /* @__PURE__ */ (0,
|
|
5520
|
+
!hasChildren && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "py-1.5 lg:py-2" })
|
|
5168
5521
|
] });
|
|
5169
5522
|
};
|
|
5170
5523
|
var ParagraphNode_default = ParagraphNode;
|
|
5171
5524
|
|
|
5172
5525
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
5173
|
-
var
|
|
5174
|
-
var
|
|
5526
|
+
var import_react44 = __toESM(require("react"));
|
|
5527
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5175
5528
|
var HeadingNode = (props) => {
|
|
5176
5529
|
const NodeTypes2 = {
|
|
5177
5530
|
["text"]: TextNode_default,
|
|
@@ -5187,23 +5540,23 @@ var HeadingNode = (props) => {
|
|
|
5187
5540
|
{
|
|
5188
5541
|
}
|
|
5189
5542
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
5190
|
-
return /* @__PURE__ */ (0,
|
|
5543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_jsx_runtime59.Fragment, { children: import_react44.default.createElement(
|
|
5191
5544
|
HeadingTag,
|
|
5192
5545
|
{ className: formatClasses },
|
|
5193
5546
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
5194
5547
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
5195
|
-
return /* @__PURE__ */ (0,
|
|
5548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react44.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
5196
5549
|
})
|
|
5197
5550
|
) });
|
|
5198
5551
|
};
|
|
5199
5552
|
var HeadingNode_default = HeadingNode;
|
|
5200
5553
|
|
|
5201
5554
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
5202
|
-
var
|
|
5555
|
+
var import_react46 = __toESM(require("react"));
|
|
5203
5556
|
|
|
5204
5557
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
5205
|
-
var
|
|
5206
|
-
var
|
|
5558
|
+
var import_react45 = __toESM(require("react"));
|
|
5559
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5207
5560
|
var ListItemNode = (props) => {
|
|
5208
5561
|
const NodeTypes2 = {
|
|
5209
5562
|
text: TextNode_default,
|
|
@@ -5220,66 +5573,66 @@ var ListItemNode = (props) => {
|
|
|
5220
5573
|
liStyle.fontSize = match[1].trim();
|
|
5221
5574
|
}
|
|
5222
5575
|
}
|
|
5223
|
-
return /* @__PURE__ */ (0,
|
|
5576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
5224
5577
|
const SelectedNode = NodeTypes2[node.type];
|
|
5225
5578
|
if (node.type === "linebreak") {
|
|
5226
5579
|
if (!foundFirstBreak) {
|
|
5227
5580
|
foundFirstBreak = true;
|
|
5228
|
-
return /* @__PURE__ */ (0,
|
|
5581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", {}, index);
|
|
5229
5582
|
} else {
|
|
5230
|
-
return /* @__PURE__ */ (0,
|
|
5583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "py-1 lg:py-2" }, index);
|
|
5231
5584
|
}
|
|
5232
5585
|
} else {
|
|
5233
5586
|
foundFirstBreak = false;
|
|
5234
|
-
return /* @__PURE__ */ (0,
|
|
5587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react45.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
5235
5588
|
}
|
|
5236
5589
|
}) });
|
|
5237
5590
|
};
|
|
5238
5591
|
var ListItemNode_default = ListItemNode;
|
|
5239
5592
|
|
|
5240
5593
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
5241
|
-
var
|
|
5594
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
5242
5595
|
var ListNode = (props) => {
|
|
5243
5596
|
const NodeTypes2 = {
|
|
5244
5597
|
listitem: ListItemNode_default
|
|
5245
5598
|
};
|
|
5246
|
-
return /* @__PURE__ */ (0,
|
|
5247
|
-
props.node.listType == "bullet" && /* @__PURE__ */ (0,
|
|
5599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_react46.default.Fragment, { children: [
|
|
5600
|
+
props.node.listType == "bullet" && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
5248
5601
|
const SelectedNode = NodeTypes2[node.type];
|
|
5249
|
-
return /* @__PURE__ */ (0,
|
|
5602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react46.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
5250
5603
|
}) }),
|
|
5251
|
-
props.node.listType == "number" && /* @__PURE__ */ (0,
|
|
5604
|
+
props.node.listType == "number" && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
5252
5605
|
const SelectedNode = NodeTypes2[node.type];
|
|
5253
|
-
return /* @__PURE__ */ (0,
|
|
5606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react46.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
5254
5607
|
}) })
|
|
5255
5608
|
] });
|
|
5256
5609
|
};
|
|
5257
5610
|
var ListNode_default = ListNode;
|
|
5258
5611
|
|
|
5259
5612
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
5260
|
-
var
|
|
5261
|
-
var
|
|
5613
|
+
var import_react47 = __toESM(require("react"));
|
|
5614
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
5262
5615
|
var QuoteNode = (props) => {
|
|
5263
5616
|
const NodeTypes2 = {
|
|
5264
5617
|
["text"]: TextNode_default,
|
|
5265
5618
|
["linebreak"]: LineBreakNode_default,
|
|
5266
5619
|
["link"]: LinkNode_default
|
|
5267
5620
|
};
|
|
5268
|
-
return /* @__PURE__ */ (0,
|
|
5621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
5269
5622
|
const SelectedNode = NodeTypes2[node.type];
|
|
5270
|
-
return /* @__PURE__ */ (0,
|
|
5623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react47.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
5271
5624
|
}) });
|
|
5272
5625
|
};
|
|
5273
5626
|
var QuoteNode_default = QuoteNode;
|
|
5274
5627
|
|
|
5275
5628
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
5276
|
-
var
|
|
5629
|
+
var import_react49 = __toESM(require("react"));
|
|
5277
5630
|
var import_dynamic7 = __toESM(require("next/dynamic"));
|
|
5278
|
-
var
|
|
5631
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
5279
5632
|
var CopyButton2 = (0, import_dynamic7.default)(() => Promise.resolve().then(() => (init_CopyButton(), CopyButton_exports)), {
|
|
5280
5633
|
ssr: false,
|
|
5281
5634
|
// optional: fallback UI while loading
|
|
5282
|
-
loading: () => /* @__PURE__ */ (0,
|
|
5635
|
+
loading: () => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
5283
5636
|
});
|
|
5284
5637
|
var CodeNode = (props) => {
|
|
5285
5638
|
const NodeTypes2 = {
|
|
@@ -5293,14 +5646,14 @@ var CodeNode = (props) => {
|
|
|
5293
5646
|
if (node.type === "link") return node.text || node.url || "";
|
|
5294
5647
|
return "";
|
|
5295
5648
|
}).join("") ?? "";
|
|
5296
|
-
return /* @__PURE__ */ (0,
|
|
5297
|
-
/* @__PURE__ */ (0,
|
|
5298
|
-
/* @__PURE__ */ (0,
|
|
5299
|
-
/* @__PURE__ */ (0,
|
|
5649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { children: [
|
|
5650
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
5651
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: "Code Snippet" }),
|
|
5652
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(CopyButton2, { text: textContent })
|
|
5300
5653
|
] }),
|
|
5301
|
-
/* @__PURE__ */ (0,
|
|
5654
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.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) => {
|
|
5302
5655
|
const SelectedNode = NodeTypes2[node.type];
|
|
5303
|
-
return /* @__PURE__ */ (0,
|
|
5656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react49.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5304
5657
|
SelectedNode,
|
|
5305
5658
|
{
|
|
5306
5659
|
node,
|
|
@@ -5315,15 +5668,15 @@ var CodeNode = (props) => {
|
|
|
5315
5668
|
var CodeNode_default = CodeNode;
|
|
5316
5669
|
|
|
5317
5670
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
5318
|
-
var
|
|
5671
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
5319
5672
|
var HorizontalRuleNode = () => {
|
|
5320
|
-
return /* @__PURE__ */ (0,
|
|
5673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("hr", {});
|
|
5321
5674
|
};
|
|
5322
5675
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
5323
5676
|
|
|
5324
5677
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
5325
|
-
var
|
|
5326
|
-
var
|
|
5678
|
+
var import_react50 = __toESM(require("react"));
|
|
5679
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
5327
5680
|
var WidgetNode = (props) => {
|
|
5328
5681
|
const getWidgetParameters = () => {
|
|
5329
5682
|
const widgetInputParameters = {
|
|
@@ -5387,7 +5740,7 @@ var WidgetNode = (props) => {
|
|
|
5387
5740
|
};
|
|
5388
5741
|
const widgetCode = props.node?.widgetCode;
|
|
5389
5742
|
if (!widgetCode) {
|
|
5390
|
-
return /* @__PURE__ */ (0,
|
|
5743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: "Invalid widget" });
|
|
5391
5744
|
}
|
|
5392
5745
|
const widgetParams = getWidgetParameters();
|
|
5393
5746
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -5396,7 +5749,7 @@ var WidgetNode = (props) => {
|
|
|
5396
5749
|
}
|
|
5397
5750
|
return (
|
|
5398
5751
|
// eslint-disable-next-line react-hooks/static-components
|
|
5399
|
-
/* @__PURE__ */ (0,
|
|
5752
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react50.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5400
5753
|
WidgetRenderer,
|
|
5401
5754
|
{
|
|
5402
5755
|
params: widgetParams,
|
|
@@ -5414,11 +5767,11 @@ var WidgetNode_default = WidgetNode;
|
|
|
5414
5767
|
|
|
5415
5768
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
5416
5769
|
var import_dynamic10 = __toESM(require("next/dynamic"));
|
|
5417
|
-
var
|
|
5770
|
+
var import_react55 = __toESM(require("react"));
|
|
5418
5771
|
|
|
5419
5772
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
5420
5773
|
var import_dynamic8 = __toESM(require("next/dynamic"));
|
|
5421
|
-
var
|
|
5774
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
5422
5775
|
var IframeClient2 = (0, import_dynamic8.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
5423
5776
|
ssr: false
|
|
5424
5777
|
});
|
|
@@ -5431,7 +5784,7 @@ var EmbedNode = (props) => {
|
|
|
5431
5784
|
} else {
|
|
5432
5785
|
src = props.node.embedSrc;
|
|
5433
5786
|
}
|
|
5434
|
-
return /* @__PURE__ */ (0,
|
|
5787
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "aspect-video", children: src && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(IframeClient2, { src }) });
|
|
5435
5788
|
};
|
|
5436
5789
|
var EmbedNode_default = EmbedNode;
|
|
5437
5790
|
|
|
@@ -5631,10 +5984,10 @@ var PathUtility = class {
|
|
|
5631
5984
|
var PathUtility_default = new PathUtility();
|
|
5632
5985
|
|
|
5633
5986
|
// src/components/NoDataFound.tsx
|
|
5634
|
-
var
|
|
5987
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
5635
5988
|
var NoDataFound = () => {
|
|
5636
|
-
return /* @__PURE__ */ (0,
|
|
5637
|
-
/* @__PURE__ */ (0,
|
|
5989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
5990
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "mb-5", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
5638
5991
|
"svg",
|
|
5639
5992
|
{
|
|
5640
5993
|
className: "w-10 h-10",
|
|
@@ -5642,7 +5995,7 @@ var NoDataFound = () => {
|
|
|
5642
5995
|
stroke: "currentColor",
|
|
5643
5996
|
viewBox: "0 0 24 24",
|
|
5644
5997
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5645
|
-
children: /* @__PURE__ */ (0,
|
|
5998
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
5646
5999
|
"path",
|
|
5647
6000
|
{
|
|
5648
6001
|
strokeLinecap: "round",
|
|
@@ -5653,8 +6006,8 @@ var NoDataFound = () => {
|
|
|
5653
6006
|
)
|
|
5654
6007
|
}
|
|
5655
6008
|
) }) }),
|
|
5656
|
-
/* @__PURE__ */ (0,
|
|
5657
|
-
/* @__PURE__ */ (0,
|
|
6009
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
6010
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
5658
6011
|
] });
|
|
5659
6012
|
};
|
|
5660
6013
|
var NoDataFound_default = NoDataFound;
|
|
@@ -5662,7 +6015,7 @@ var NoDataFound_default = NoDataFound;
|
|
|
5662
6015
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
5663
6016
|
init_AssetUtility();
|
|
5664
6017
|
var import_dynamic9 = __toESM(require("next/dynamic"));
|
|
5665
|
-
var
|
|
6018
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
5666
6019
|
var HlsPlayer4 = (0, import_dynamic9.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
5667
6020
|
var deviceToMediaQuery = (device) => {
|
|
5668
6021
|
switch (device) {
|
|
@@ -5791,8 +6144,8 @@ var ImageGalleryNode = (props) => {
|
|
|
5791
6144
|
right: "justify-end"
|
|
5792
6145
|
};
|
|
5793
6146
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
5794
|
-
return /* @__PURE__ */ (0,
|
|
5795
|
-
hlsSources.length > 0 && /* @__PURE__ */ (0,
|
|
6147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
|
|
6148
|
+
hlsSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_jsx_runtime71.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
5796
6149
|
HlsPlayer4,
|
|
5797
6150
|
{
|
|
5798
6151
|
sources: hlsSources,
|
|
@@ -5807,7 +6160,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5807
6160
|
styles: hlsStyles
|
|
5808
6161
|
}
|
|
5809
6162
|
) }),
|
|
5810
|
-
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0,
|
|
6163
|
+
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_jsx_runtime71.Fragment, { children: staticFallback ? /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("picture", { children: [
|
|
5811
6164
|
DEVICE_ORDER.map((deviceKey) => {
|
|
5812
6165
|
const match = staticSources.find(
|
|
5813
6166
|
(img) => img.device === deviceKey
|
|
@@ -5819,7 +6172,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5819
6172
|
if (!srcUrl) {
|
|
5820
6173
|
return null;
|
|
5821
6174
|
}
|
|
5822
|
-
return /* @__PURE__ */ (0,
|
|
6175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
5823
6176
|
"source",
|
|
5824
6177
|
{
|
|
5825
6178
|
media: deviceToMediaQuery(match.device),
|
|
@@ -5843,7 +6196,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5843
6196
|
if (img.borderRadius) {
|
|
5844
6197
|
styles.borderRadius = img.borderRadius;
|
|
5845
6198
|
}
|
|
5846
|
-
return /* @__PURE__ */ (0,
|
|
6199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
5847
6200
|
"img",
|
|
5848
6201
|
{
|
|
5849
6202
|
loading: "lazy",
|
|
@@ -5858,7 +6211,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5858
6211
|
})()
|
|
5859
6212
|
] }) : (
|
|
5860
6213
|
/* Case 2: Only device-specific images exist */
|
|
5861
|
-
/* @__PURE__ */ (0,
|
|
6214
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_jsx_runtime71.Fragment, { children: staticSources.map((img, index) => {
|
|
5862
6215
|
const imageUrl = resolveImageUrl(img);
|
|
5863
6216
|
if (!imageUrl) {
|
|
5864
6217
|
return null;
|
|
@@ -5884,7 +6237,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5884
6237
|
default:
|
|
5885
6238
|
display = "block";
|
|
5886
6239
|
}
|
|
5887
|
-
return /* @__PURE__ */ (0,
|
|
6240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
5888
6241
|
"img",
|
|
5889
6242
|
{
|
|
5890
6243
|
loading: "lazy",
|
|
@@ -6025,28 +6378,28 @@ var shouldRenderContainer = (node, dataItem, session) => {
|
|
|
6025
6378
|
|
|
6026
6379
|
// src/components/pageRenderingEngine/nodes/DocumentNode.tsx
|
|
6027
6380
|
init_AssetUtility();
|
|
6028
|
-
var
|
|
6381
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
6029
6382
|
var getNestedValue5 = (obj, path) => {
|
|
6030
6383
|
if (!obj || !path) return void 0;
|
|
6031
6384
|
return path.split(".").reduce((current, key) => {
|
|
6032
6385
|
return current && current[key] !== void 0 ? current[key] : void 0;
|
|
6033
6386
|
}, obj);
|
|
6034
6387
|
};
|
|
6035
|
-
var PdfIcon = () => /* @__PURE__ */ (0,
|
|
6388
|
+
var PdfIcon = () => /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
6036
6389
|
"svg",
|
|
6037
6390
|
{
|
|
6038
6391
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6039
6392
|
viewBox: "0 0 48 48",
|
|
6040
6393
|
className: "w-10 h-10",
|
|
6041
6394
|
children: [
|
|
6042
|
-
/* @__PURE__ */ (0,
|
|
6395
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6043
6396
|
"path",
|
|
6044
6397
|
{
|
|
6045
6398
|
fill: "#e53935",
|
|
6046
6399
|
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"
|
|
6047
6400
|
}
|
|
6048
6401
|
),
|
|
6049
|
-
/* @__PURE__ */ (0,
|
|
6402
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6050
6403
|
"path",
|
|
6051
6404
|
{
|
|
6052
6405
|
fill: "#fff",
|
|
@@ -6056,55 +6409,55 @@ var PdfIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
|
6056
6409
|
]
|
|
6057
6410
|
}
|
|
6058
6411
|
);
|
|
6059
|
-
var ExcelIcon = () => /* @__PURE__ */ (0,
|
|
6412
|
+
var ExcelIcon = () => /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
6060
6413
|
"svg",
|
|
6061
6414
|
{
|
|
6062
6415
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6063
6416
|
viewBox: "0 0 48 48",
|
|
6064
6417
|
className: "w-10 h-10",
|
|
6065
6418
|
children: [
|
|
6066
|
-
/* @__PURE__ */ (0,
|
|
6419
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6067
6420
|
"path",
|
|
6068
6421
|
{
|
|
6069
6422
|
fill: "#169154",
|
|
6070
6423
|
d: "M29,6H15.744C14.781,6,14,6.781,14,7.744v7.259h15V6z"
|
|
6071
6424
|
}
|
|
6072
6425
|
),
|
|
6073
|
-
/* @__PURE__ */ (0,
|
|
6426
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6074
6427
|
"path",
|
|
6075
6428
|
{
|
|
6076
6429
|
fill: "#18482a",
|
|
6077
6430
|
d: "M14,33.054v7.202C14,41.219,14.781,42,15.743,42H29v-8.946H14z"
|
|
6078
6431
|
}
|
|
6079
6432
|
),
|
|
6080
|
-
/* @__PURE__ */ (0,
|
|
6081
|
-
/* @__PURE__ */ (0,
|
|
6082
|
-
/* @__PURE__ */ (0,
|
|
6083
|
-
/* @__PURE__ */ (0,
|
|
6433
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("path", { fill: "#0c8045", d: "M14 15.003H29V24.005000000000003H14z" }),
|
|
6434
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("path", { fill: "#17472a", d: "M14 24.005H29V33.055H14z" }),
|
|
6435
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("g", { children: [
|
|
6436
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6084
6437
|
"path",
|
|
6085
6438
|
{
|
|
6086
6439
|
fill: "#29c27f",
|
|
6087
6440
|
d: "M42.256,6H29v9.003h15V7.744C44,6.781,43.219,6,42.256,6z"
|
|
6088
6441
|
}
|
|
6089
6442
|
),
|
|
6090
|
-
/* @__PURE__ */ (0,
|
|
6443
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6091
6444
|
"path",
|
|
6092
6445
|
{
|
|
6093
6446
|
fill: "#27663f",
|
|
6094
6447
|
d: "M29,33.054V42h13.257C43.219,42,44,41.219,44,40.257v-7.202H29z"
|
|
6095
6448
|
}
|
|
6096
6449
|
),
|
|
6097
|
-
/* @__PURE__ */ (0,
|
|
6098
|
-
/* @__PURE__ */ (0,
|
|
6450
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("path", { fill: "#19ac65", d: "M29 15.003H44V24.005000000000003H29z" }),
|
|
6451
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("path", { fill: "#129652", d: "M29 24.005H44V33.055H29z" })
|
|
6099
6452
|
] }),
|
|
6100
|
-
/* @__PURE__ */ (0,
|
|
6453
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6101
6454
|
"path",
|
|
6102
6455
|
{
|
|
6103
6456
|
fill: "#0c7238",
|
|
6104
6457
|
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"
|
|
6105
6458
|
}
|
|
6106
6459
|
),
|
|
6107
|
-
/* @__PURE__ */ (0,
|
|
6460
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6108
6461
|
"path",
|
|
6109
6462
|
{
|
|
6110
6463
|
fill: "#fff",
|
|
@@ -6114,7 +6467,7 @@ var ExcelIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
|
6114
6467
|
]
|
|
6115
6468
|
}
|
|
6116
6469
|
);
|
|
6117
|
-
var WordIcon = () => /* @__PURE__ */ (0,
|
|
6470
|
+
var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
6118
6471
|
"svg",
|
|
6119
6472
|
{
|
|
6120
6473
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6122,14 +6475,14 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
|
6122
6475
|
className: "w-10 h-10",
|
|
6123
6476
|
baseProfile: "basic",
|
|
6124
6477
|
children: [
|
|
6125
|
-
/* @__PURE__ */ (0,
|
|
6478
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6126
6479
|
"path",
|
|
6127
6480
|
{
|
|
6128
6481
|
fill: "#283593",
|
|
6129
6482
|
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"
|
|
6130
6483
|
}
|
|
6131
6484
|
),
|
|
6132
|
-
/* @__PURE__ */ (0,
|
|
6485
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
6133
6486
|
"linearGradient",
|
|
6134
6487
|
{
|
|
6135
6488
|
id: "qh2LT5tehRDFkLLfb-odWa",
|
|
@@ -6140,19 +6493,19 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
|
6140
6493
|
gradientTransform: "translate(0 -339.89)",
|
|
6141
6494
|
gradientUnits: "userSpaceOnUse",
|
|
6142
6495
|
children: [
|
|
6143
|
-
/* @__PURE__ */ (0,
|
|
6144
|
-
/* @__PURE__ */ (0,
|
|
6496
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("stop", { offset: "0", "stop-color": "#66c0ff" }),
|
|
6497
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("stop", { offset: ".26", "stop-color": "#0094f0" })
|
|
6145
6498
|
]
|
|
6146
6499
|
}
|
|
6147
6500
|
),
|
|
6148
|
-
/* @__PURE__ */ (0,
|
|
6501
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6149
6502
|
"path",
|
|
6150
6503
|
{
|
|
6151
6504
|
fill: "url(#qh2LT5tehRDFkLLfb-odWa)",
|
|
6152
6505
|
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"
|
|
6153
6506
|
}
|
|
6154
6507
|
),
|
|
6155
|
-
/* @__PURE__ */ (0,
|
|
6508
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6156
6509
|
"path",
|
|
6157
6510
|
{
|
|
6158
6511
|
fill: "#1e88e5",
|
|
@@ -6160,21 +6513,21 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
|
6160
6513
|
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"
|
|
6161
6514
|
}
|
|
6162
6515
|
),
|
|
6163
|
-
/* @__PURE__ */ (0,
|
|
6516
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6164
6517
|
"path",
|
|
6165
6518
|
{
|
|
6166
6519
|
fill: "#00e5ff",
|
|
6167
6520
|
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"
|
|
6168
6521
|
}
|
|
6169
6522
|
),
|
|
6170
|
-
/* @__PURE__ */ (0,
|
|
6523
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6171
6524
|
"path",
|
|
6172
6525
|
{
|
|
6173
6526
|
fill: "#1565c0",
|
|
6174
6527
|
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"
|
|
6175
6528
|
}
|
|
6176
6529
|
),
|
|
6177
|
-
/* @__PURE__ */ (0,
|
|
6530
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6178
6531
|
"path",
|
|
6179
6532
|
{
|
|
6180
6533
|
fill: "#fff",
|
|
@@ -6184,42 +6537,42 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
|
6184
6537
|
]
|
|
6185
6538
|
}
|
|
6186
6539
|
);
|
|
6187
|
-
var StandardIcon = () => /* @__PURE__ */ (0,
|
|
6540
|
+
var StandardIcon = () => /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
6188
6541
|
"svg",
|
|
6189
6542
|
{
|
|
6190
6543
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6191
6544
|
viewBox: "0 0 48 48",
|
|
6192
6545
|
className: "w-10 h-10",
|
|
6193
6546
|
children: [
|
|
6194
|
-
/* @__PURE__ */ (0,
|
|
6195
|
-
/* @__PURE__ */ (0,
|
|
6547
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
6548
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" })
|
|
6196
6549
|
]
|
|
6197
6550
|
}
|
|
6198
6551
|
);
|
|
6199
|
-
var PowerPointIcon = () => /* @__PURE__ */ (0,
|
|
6552
|
+
var PowerPointIcon = () => /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
6200
6553
|
"svg",
|
|
6201
6554
|
{
|
|
6202
6555
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6203
6556
|
viewBox: "0 0 48 48",
|
|
6204
6557
|
className: "w-10 h-10",
|
|
6205
6558
|
children: [
|
|
6206
|
-
/* @__PURE__ */ (0,
|
|
6559
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6207
6560
|
"path",
|
|
6208
6561
|
{
|
|
6209
6562
|
fill: "#dc4c2c",
|
|
6210
6563
|
d: "M8,24c0,9.941,8.059,18,18,18s18-8.059,18-18H26H8z"
|
|
6211
6564
|
}
|
|
6212
6565
|
),
|
|
6213
|
-
/* @__PURE__ */ (0,
|
|
6214
|
-
/* @__PURE__ */ (0,
|
|
6215
|
-
/* @__PURE__ */ (0,
|
|
6566
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("path", { fill: "#f7a278", d: "M26,6v18h18C44,14.059,35.941,6,26,6z" }),
|
|
6567
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("path", { fill: "#c06346", d: "M26,6C16.059,6,8,14.059,8,24h18V6z" }),
|
|
6568
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6216
6569
|
"path",
|
|
6217
6570
|
{
|
|
6218
6571
|
fill: "#9b341f",
|
|
6219
6572
|
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"
|
|
6220
6573
|
}
|
|
6221
6574
|
),
|
|
6222
|
-
/* @__PURE__ */ (0,
|
|
6575
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6223
6576
|
"path",
|
|
6224
6577
|
{
|
|
6225
6578
|
fill: "#fff",
|
|
@@ -6229,16 +6582,16 @@ var PowerPointIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
|
6229
6582
|
]
|
|
6230
6583
|
}
|
|
6231
6584
|
);
|
|
6232
|
-
var TextIcon = () => /* @__PURE__ */ (0,
|
|
6585
|
+
var TextIcon = () => /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
6233
6586
|
"svg",
|
|
6234
6587
|
{
|
|
6235
6588
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6236
6589
|
viewBox: "0 0 48 48",
|
|
6237
6590
|
className: "w-10 h-10",
|
|
6238
6591
|
children: [
|
|
6239
|
-
/* @__PURE__ */ (0,
|
|
6240
|
-
/* @__PURE__ */ (0,
|
|
6241
|
-
/* @__PURE__ */ (0,
|
|
6592
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
6593
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" }),
|
|
6594
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6242
6595
|
"path",
|
|
6243
6596
|
{
|
|
6244
6597
|
fill: "#1976D2",
|
|
@@ -6248,7 +6601,7 @@ var TextIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
|
6248
6601
|
]
|
|
6249
6602
|
}
|
|
6250
6603
|
);
|
|
6251
|
-
var ArchiveIcon = () => /* @__PURE__ */ (0,
|
|
6604
|
+
var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
6252
6605
|
"svg",
|
|
6253
6606
|
{
|
|
6254
6607
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6258,14 +6611,14 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
|
6258
6611
|
version: "1.0",
|
|
6259
6612
|
className: "w-10 h-10",
|
|
6260
6613
|
children: [
|
|
6261
|
-
/* @__PURE__ */ (0,
|
|
6614
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("clipPath", { id: "273d29c8a6", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6262
6615
|
"path",
|
|
6263
6616
|
{
|
|
6264
6617
|
d: "M 8.90625 0 L 65.90625 0 L 65.90625 75 L 8.90625 75 Z M 8.90625 0 ",
|
|
6265
6618
|
"clip-rule": "nonzero"
|
|
6266
6619
|
}
|
|
6267
6620
|
) }) }),
|
|
6268
|
-
/* @__PURE__ */ (0,
|
|
6621
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("g", { "clip-path": "url(#273d29c8a6)", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6269
6622
|
"path",
|
|
6270
6623
|
{
|
|
6271
6624
|
fill: "#ff9100",
|
|
@@ -6274,7 +6627,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
|
6274
6627
|
"fill-rule": "nonzero"
|
|
6275
6628
|
}
|
|
6276
6629
|
) }),
|
|
6277
|
-
/* @__PURE__ */ (0,
|
|
6630
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6278
6631
|
"path",
|
|
6279
6632
|
{
|
|
6280
6633
|
fill: "#fbe9e7",
|
|
@@ -6283,7 +6636,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
|
6283
6636
|
"fill-rule": "nonzero"
|
|
6284
6637
|
}
|
|
6285
6638
|
),
|
|
6286
|
-
/* @__PURE__ */ (0,
|
|
6639
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6287
6640
|
"path",
|
|
6288
6641
|
{
|
|
6289
6642
|
fill: "#ffe0b2",
|
|
@@ -6292,7 +6645,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
|
6292
6645
|
"fill-rule": "nonzero"
|
|
6293
6646
|
}
|
|
6294
6647
|
),
|
|
6295
|
-
/* @__PURE__ */ (0,
|
|
6648
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6296
6649
|
"path",
|
|
6297
6650
|
{
|
|
6298
6651
|
fill: "#ffe0b2",
|
|
@@ -6301,7 +6654,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
|
6301
6654
|
"fill-rule": "nonzero"
|
|
6302
6655
|
}
|
|
6303
6656
|
),
|
|
6304
|
-
/* @__PURE__ */ (0,
|
|
6657
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6305
6658
|
"path",
|
|
6306
6659
|
{
|
|
6307
6660
|
fill: "#ffe0b2",
|
|
@@ -6377,8 +6730,8 @@ var DocumentNode = (props) => {
|
|
|
6377
6730
|
}
|
|
6378
6731
|
}
|
|
6379
6732
|
if (documents.length === 0) {
|
|
6380
|
-
return /* @__PURE__ */ (0,
|
|
6381
|
-
/* @__PURE__ */ (0,
|
|
6733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_jsx_runtime72.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "py-4 px-2 bg-neutral-weak border rounded text-center flex flex-col gap-2", children: [
|
|
6734
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "mx-auto w-10 h-10 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6382
6735
|
"svg",
|
|
6383
6736
|
{
|
|
6384
6737
|
className: "w-5 h-5",
|
|
@@ -6386,7 +6739,7 @@ var DocumentNode = (props) => {
|
|
|
6386
6739
|
stroke: "currentColor",
|
|
6387
6740
|
viewBox: "0 0 24 24",
|
|
6388
6741
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6389
|
-
children: /* @__PURE__ */ (0,
|
|
6742
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6390
6743
|
"path",
|
|
6391
6744
|
{
|
|
6392
6745
|
strokeLinecap: "round",
|
|
@@ -6397,11 +6750,11 @@ var DocumentNode = (props) => {
|
|
|
6397
6750
|
)
|
|
6398
6751
|
}
|
|
6399
6752
|
) }),
|
|
6400
|
-
/* @__PURE__ */ (0,
|
|
6401
|
-
/* @__PURE__ */ (0,
|
|
6753
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "text-sm font-medium", children: "No documents found" }),
|
|
6754
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "text-xs", children: "No records found. Data may be empty or not available at the moment." })
|
|
6402
6755
|
] }) });
|
|
6403
6756
|
}
|
|
6404
|
-
return /* @__PURE__ */ (0,
|
|
6757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "", children: documents.map((doc, index) => {
|
|
6405
6758
|
const documentUrl = AssetUtility_default.resolveUrl(
|
|
6406
6759
|
props.assetBaseUrl,
|
|
6407
6760
|
doc.assetUrl
|
|
@@ -6419,16 +6772,16 @@ var DocumentNode = (props) => {
|
|
|
6419
6772
|
}
|
|
6420
6773
|
}
|
|
6421
6774
|
const { Icon: Icon2, extLabel } = getFileDetails(documentUrl);
|
|
6422
|
-
return /* @__PURE__ */ (0,
|
|
6775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
6423
6776
|
"div",
|
|
6424
6777
|
{
|
|
6425
6778
|
className: `flex items-center justify-between py-4 bg-default gap-4 ${index !== 0 ? "border-t" : ""}`,
|
|
6426
6779
|
children: [
|
|
6427
|
-
/* @__PURE__ */ (0,
|
|
6428
|
-
/* @__PURE__ */ (0,
|
|
6429
|
-
/* @__PURE__ */ (0,
|
|
6780
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex items-center space-x-4", children: [
|
|
6781
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "flex items-center justify-center p-2 rounded bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Icon2, {}) }),
|
|
6782
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "flex items-baseline space-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("h4", { className: "text-base font-semibold", children: documentTitle }) })
|
|
6430
6783
|
] }),
|
|
6431
|
-
/* @__PURE__ */ (0,
|
|
6784
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
6432
6785
|
"a",
|
|
6433
6786
|
{
|
|
6434
6787
|
href: documentUrl,
|
|
@@ -6436,7 +6789,7 @@ var DocumentNode = (props) => {
|
|
|
6436
6789
|
rel: "noopener noreferrer",
|
|
6437
6790
|
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",
|
|
6438
6791
|
children: [
|
|
6439
|
-
/* @__PURE__ */ (0,
|
|
6792
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
6440
6793
|
"svg",
|
|
6441
6794
|
{
|
|
6442
6795
|
className: "w-4 h-4 mr-2",
|
|
@@ -6444,7 +6797,7 @@ var DocumentNode = (props) => {
|
|
|
6444
6797
|
stroke: "currentColor",
|
|
6445
6798
|
viewBox: "0 0 24 24",
|
|
6446
6799
|
children: [
|
|
6447
|
-
/* @__PURE__ */ (0,
|
|
6800
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6448
6801
|
"path",
|
|
6449
6802
|
{
|
|
6450
6803
|
strokeLinecap: "round",
|
|
@@ -6453,7 +6806,7 @@ var DocumentNode = (props) => {
|
|
|
6453
6806
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
|
6454
6807
|
}
|
|
6455
6808
|
),
|
|
6456
|
-
/* @__PURE__ */ (0,
|
|
6809
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6457
6810
|
"path",
|
|
6458
6811
|
{
|
|
6459
6812
|
strokeLinecap: "round",
|
|
@@ -6478,7 +6831,7 @@ var DocumentNode = (props) => {
|
|
|
6478
6831
|
var DocumentNode_default = DocumentNode;
|
|
6479
6832
|
|
|
6480
6833
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
6481
|
-
var
|
|
6834
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
6482
6835
|
var Pagination2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_Pagination(), Pagination_exports)), { ssr: true });
|
|
6483
6836
|
var Slider2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_Slider(), Slider_exports)), {
|
|
6484
6837
|
ssr: false
|
|
@@ -6733,7 +7086,7 @@ var DivContainer = async (props) => {
|
|
|
6733
7086
|
response = await serviceClient.get(endpoint);
|
|
6734
7087
|
result = response?.result;
|
|
6735
7088
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
6736
|
-
return /* @__PURE__ */ (0,
|
|
7089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(NoDataFound_default, {});
|
|
6737
7090
|
}
|
|
6738
7091
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
6739
7092
|
childCollectionData = getNestedValue6(
|
|
@@ -6753,7 +7106,7 @@ var DivContainer = async (props) => {
|
|
|
6753
7106
|
}
|
|
6754
7107
|
const SelectedNode = NodeTypes2[node.type];
|
|
6755
7108
|
if (!SelectedNode) return null;
|
|
6756
|
-
return /* @__PURE__ */ (0,
|
|
7109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react55.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6757
7110
|
SelectedNode,
|
|
6758
7111
|
{
|
|
6759
7112
|
node,
|
|
@@ -6886,14 +7239,14 @@ var DivContainer = async (props) => {
|
|
|
6886
7239
|
noLinkColor && "no-link-color",
|
|
6887
7240
|
!!props.node.enterAnimation && "enter-animation"
|
|
6888
7241
|
].filter(Boolean).join(" ");
|
|
6889
|
-
return /* @__PURE__ */ (0,
|
|
6890
|
-
/* @__PURE__ */ (0,
|
|
7242
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_react55.default.Fragment, { children: [
|
|
7243
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6891
7244
|
"style",
|
|
6892
7245
|
{
|
|
6893
7246
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
6894
7247
|
}
|
|
6895
7248
|
),
|
|
6896
|
-
/* @__PURE__ */ (0,
|
|
7249
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6897
7250
|
Wrapper,
|
|
6898
7251
|
{
|
|
6899
7252
|
id: guid,
|
|
@@ -6907,11 +7260,11 @@ var DivContainer = async (props) => {
|
|
|
6907
7260
|
item,
|
|
6908
7261
|
idx,
|
|
6909
7262
|
props.href ? void 0 : item?.links?.view
|
|
6910
|
-
)?.map((child, i) => /* @__PURE__ */ (0,
|
|
7263
|
+
)?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react55.default.Fragment, { children: child }, i)) : renderChildren(props.node.children, props, item, idx)
|
|
6911
7264
|
)
|
|
6912
7265
|
}
|
|
6913
7266
|
),
|
|
6914
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0,
|
|
7267
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6915
7268
|
Pagination2,
|
|
6916
7269
|
{
|
|
6917
7270
|
path: props.path,
|
|
@@ -6924,7 +7277,7 @@ var DivContainer = async (props) => {
|
|
|
6924
7277
|
var DivContainer_default = DivContainer;
|
|
6925
7278
|
|
|
6926
7279
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
6927
|
-
var
|
|
7280
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
6928
7281
|
var NodeTypes = {
|
|
6929
7282
|
["paragraph"]: ParagraphNode_default,
|
|
6930
7283
|
["heading"]: HeadingNode_default,
|
|
@@ -6961,57 +7314,54 @@ var PageBodyRenderer = (props) => {
|
|
|
6961
7314
|
}
|
|
6962
7315
|
return true;
|
|
6963
7316
|
};
|
|
6964
|
-
return /* @__PURE__ */ (0,
|
|
6965
|
-
|
|
6966
|
-
|
|
7317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react56.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
7318
|
+
{
|
|
7319
|
+
}
|
|
7320
|
+
const SelectedNode = NodeTypes[node.type];
|
|
7321
|
+
if (!shouldRenderNode(node)) {
|
|
7322
|
+
return null;
|
|
7323
|
+
}
|
|
7324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react56.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react56.default.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react56.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
7325
|
+
SelectedNode,
|
|
6967
7326
|
{
|
|
7327
|
+
node,
|
|
7328
|
+
firstNode: true,
|
|
7329
|
+
routeParameters: props.routeParameters,
|
|
7330
|
+
query: props.query,
|
|
7331
|
+
session: props.session,
|
|
7332
|
+
host: props.host,
|
|
7333
|
+
path: props.path,
|
|
7334
|
+
apiBaseUrl: props.apiBaseUrl,
|
|
7335
|
+
serviceClient: props.serviceClient,
|
|
7336
|
+
assetBaseUrl: props.assetBaseUrl,
|
|
7337
|
+
device: props.device,
|
|
7338
|
+
widgetRenderer: props.widgetRenderer
|
|
6968
7339
|
}
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
7340
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react56.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
7341
|
+
SelectedNode,
|
|
7342
|
+
{
|
|
7343
|
+
node,
|
|
7344
|
+
routeParameters: props.routeParameters,
|
|
7345
|
+
query: props.query,
|
|
7346
|
+
session: props.session,
|
|
7347
|
+
host: props.host,
|
|
7348
|
+
path: props.path,
|
|
7349
|
+
apiBaseUrl: props.apiBaseUrl,
|
|
7350
|
+
serviceClient: props.serviceClient,
|
|
7351
|
+
assetBaseUrl: props.assetBaseUrl,
|
|
7352
|
+
device: props.device,
|
|
7353
|
+
widgetRenderer: props.widgetRenderer
|
|
6972
7354
|
}
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
{
|
|
6976
|
-
node,
|
|
6977
|
-
firstNode: true,
|
|
6978
|
-
routeParameters: props.routeParameters,
|
|
6979
|
-
query: props.query,
|
|
6980
|
-
session: props.session,
|
|
6981
|
-
host: props.host,
|
|
6982
|
-
path: props.path,
|
|
6983
|
-
apiBaseUrl: props.apiBaseUrl,
|
|
6984
|
-
serviceClient: props.serviceClient,
|
|
6985
|
-
assetBaseUrl: props.assetBaseUrl,
|
|
6986
|
-
device: props.device,
|
|
6987
|
-
widgetRenderer: props.widgetRenderer
|
|
6988
|
-
}
|
|
6989
|
-
) }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react53.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6990
|
-
SelectedNode,
|
|
6991
|
-
{
|
|
6992
|
-
node,
|
|
6993
|
-
routeParameters: props.routeParameters,
|
|
6994
|
-
query: props.query,
|
|
6995
|
-
session: props.session,
|
|
6996
|
-
host: props.host,
|
|
6997
|
-
path: props.path,
|
|
6998
|
-
apiBaseUrl: props.apiBaseUrl,
|
|
6999
|
-
serviceClient: props.serviceClient,
|
|
7000
|
-
assetBaseUrl: props.assetBaseUrl,
|
|
7001
|
-
device: props.device,
|
|
7002
|
-
widgetRenderer: props.widgetRenderer
|
|
7003
|
-
}
|
|
7004
|
-
) }) }) }, index);
|
|
7005
|
-
})
|
|
7006
|
-
] });
|
|
7355
|
+
) }) }) }, index);
|
|
7356
|
+
}) });
|
|
7007
7357
|
};
|
|
7008
7358
|
var PageBodyRenderer_default = PageBodyRenderer;
|
|
7009
7359
|
|
|
7010
7360
|
// src/components/pageRenderingEngine/EnterAnimationHydrator.tsx
|
|
7011
|
-
var
|
|
7361
|
+
var import_react57 = require("react");
|
|
7012
7362
|
var ENTER_ANIMATION_SELECTOR = ".enter-animation";
|
|
7013
7363
|
function EnterAnimationHydrator() {
|
|
7014
|
-
(0,
|
|
7364
|
+
(0, import_react57.useEffect)(() => {
|
|
7015
7365
|
let observer;
|
|
7016
7366
|
const observedElements = /* @__PURE__ */ new WeakSet();
|
|
7017
7367
|
const revealAnimatedElements = () => {
|
|
@@ -7056,22 +7406,22 @@ function EnterAnimationHydrator() {
|
|
|
7056
7406
|
}
|
|
7057
7407
|
|
|
7058
7408
|
// src/components/Toast.tsx
|
|
7059
|
-
var
|
|
7409
|
+
var import_react58 = require("react");
|
|
7060
7410
|
init_ToastService();
|
|
7061
|
-
var
|
|
7411
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
7062
7412
|
var Toast = () => {
|
|
7063
|
-
const [showToast, setShowToast] = (0,
|
|
7064
|
-
const [message, setMessage] = (0,
|
|
7065
|
-
const [messageType, setMessageType] = (0,
|
|
7066
|
-
const timeoutRef = (0,
|
|
7067
|
-
const closeToast = (0,
|
|
7413
|
+
const [showToast, setShowToast] = (0, import_react58.useState)(false);
|
|
7414
|
+
const [message, setMessage] = (0, import_react58.useState)("");
|
|
7415
|
+
const [messageType, setMessageType] = (0, import_react58.useState)("error");
|
|
7416
|
+
const timeoutRef = (0, import_react58.useRef)(null);
|
|
7417
|
+
const closeToast = (0, import_react58.useCallback)(() => {
|
|
7068
7418
|
if (timeoutRef.current) {
|
|
7069
7419
|
clearTimeout(timeoutRef.current);
|
|
7070
7420
|
timeoutRef.current = null;
|
|
7071
7421
|
}
|
|
7072
7422
|
setShowToast(false);
|
|
7073
7423
|
}, []);
|
|
7074
|
-
const showMessage = (0,
|
|
7424
|
+
const showMessage = (0, import_react58.useCallback)((message2, messageType2) => {
|
|
7075
7425
|
if (timeoutRef.current) {
|
|
7076
7426
|
clearTimeout(timeoutRef.current);
|
|
7077
7427
|
}
|
|
@@ -7083,7 +7433,7 @@ var Toast = () => {
|
|
|
7083
7433
|
timeoutRef.current = null;
|
|
7084
7434
|
}, 4e3);
|
|
7085
7435
|
}, []);
|
|
7086
|
-
(0,
|
|
7436
|
+
(0, import_react58.useEffect)(() => {
|
|
7087
7437
|
ToastService_default.initialize(showMessage, closeToast);
|
|
7088
7438
|
return () => {
|
|
7089
7439
|
closeToast();
|
|
@@ -7092,8 +7442,8 @@ var Toast = () => {
|
|
|
7092
7442
|
});
|
|
7093
7443
|
};
|
|
7094
7444
|
}, [closeToast, showMessage]);
|
|
7095
|
-
return /* @__PURE__ */ (0,
|
|
7096
|
-
/* @__PURE__ */ (0,
|
|
7445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_jsx_runtime77.Fragment, { children: showToast && /* @__PURE__ */ (0, import_jsx_runtime77.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_runtime77.jsxs)("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
7446
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7097
7447
|
"span",
|
|
7098
7448
|
{
|
|
7099
7449
|
className: "font-medium text-inherit text-sm",
|
|
@@ -7101,7 +7451,7 @@ var Toast = () => {
|
|
|
7101
7451
|
children: message
|
|
7102
7452
|
}
|
|
7103
7453
|
),
|
|
7104
|
-
/* @__PURE__ */ (0,
|
|
7454
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
7105
7455
|
"svg",
|
|
7106
7456
|
{
|
|
7107
7457
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -7109,7 +7459,7 @@ var Toast = () => {
|
|
|
7109
7459
|
fill: "none",
|
|
7110
7460
|
viewBox: "0 0 24 24",
|
|
7111
7461
|
stroke: "currentColor",
|
|
7112
|
-
children: /* @__PURE__ */ (0,
|
|
7462
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
7113
7463
|
}
|
|
7114
7464
|
) })
|
|
7115
7465
|
] }) }) });
|
|
@@ -7132,11 +7482,14 @@ init_ColorInput();
|
|
|
7132
7482
|
init_BooleanSelect();
|
|
7133
7483
|
init_EmailInput();
|
|
7134
7484
|
init_TimeInput();
|
|
7485
|
+
init_DateInput();
|
|
7486
|
+
init_RadioInput();
|
|
7487
|
+
init_Switcher();
|
|
7135
7488
|
|
|
7136
7489
|
// src/components/NavigationTabsV2.tsx
|
|
7137
7490
|
var import_link3 = __toESM(require("next/link"));
|
|
7138
7491
|
var import_navigation = require("next/navigation");
|
|
7139
|
-
var
|
|
7492
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
7140
7493
|
function resolveRoutePlaceholders(route, params) {
|
|
7141
7494
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
7142
7495
|
const value = params[key];
|
|
@@ -7161,8 +7514,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
7161
7514
|
isActive: tab.isActive
|
|
7162
7515
|
})) || [];
|
|
7163
7516
|
if (mappedTabs.length === 0) return null;
|
|
7164
|
-
return /* @__PURE__ */ (0,
|
|
7165
|
-
return /* @__PURE__ */ (0,
|
|
7517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
7518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_link3.default, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7166
7519
|
"div",
|
|
7167
7520
|
{
|
|
7168
7521
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -7175,14 +7528,14 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
7175
7528
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
7176
7529
|
|
|
7177
7530
|
// src/components/dataForm/DataList.tsx
|
|
7178
|
-
var
|
|
7531
|
+
var import_react61 = __toESM(require("react"));
|
|
7179
7532
|
var import_navigation2 = require("next/navigation");
|
|
7180
7533
|
|
|
7181
7534
|
// src/components/dataForm/NoContentView.tsx
|
|
7182
|
-
var
|
|
7183
|
-
var
|
|
7535
|
+
var import_react59 = __toESM(require("react"));
|
|
7536
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
7184
7537
|
var NoContentView = (props) => {
|
|
7185
|
-
return /* @__PURE__ */ (0,
|
|
7538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_react59.default.Fragment, { children: props.isDataFound === false && props.children });
|
|
7186
7539
|
};
|
|
7187
7540
|
var NoContentView_default = NoContentView;
|
|
7188
7541
|
|
|
@@ -7190,39 +7543,39 @@ var NoContentView_default = NoContentView;
|
|
|
7190
7543
|
init_InputControlType();
|
|
7191
7544
|
|
|
7192
7545
|
// src/components/dataForm/ContentView.tsx
|
|
7193
|
-
var
|
|
7194
|
-
var
|
|
7546
|
+
var import_react60 = __toESM(require("react"));
|
|
7547
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
7195
7548
|
var ContentView = (props) => {
|
|
7196
|
-
return /* @__PURE__ */ (0,
|
|
7197
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
7198
|
-
/* @__PURE__ */ (0,
|
|
7199
|
-
/* @__PURE__ */ (0,
|
|
7200
|
-
/* @__PURE__ */ (0,
|
|
7201
|
-
/* @__PURE__ */ (0,
|
|
7202
|
-
/* @__PURE__ */ (0,
|
|
7549
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_react60.default.Fragment, { children: [
|
|
7550
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
7551
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
7552
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
7553
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ml-2", children: [
|
|
7554
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
7555
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
7203
7556
|
] })
|
|
7204
7557
|
] }),
|
|
7205
|
-
/* @__PURE__ */ (0,
|
|
7206
|
-
/* @__PURE__ */ (0,
|
|
7207
|
-
/* @__PURE__ */ (0,
|
|
7208
|
-
/* @__PURE__ */ (0,
|
|
7209
|
-
/* @__PURE__ */ (0,
|
|
7210
|
-
/* @__PURE__ */ (0,
|
|
7211
|
-
/* @__PURE__ */ (0,
|
|
7558
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
7559
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "animate-pulse", children: [
|
|
7560
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
7561
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
7562
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
7563
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
7564
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
7212
7565
|
] }),
|
|
7213
|
-
/* @__PURE__ */ (0,
|
|
7214
|
-
/* @__PURE__ */ (0,
|
|
7215
|
-
/* @__PURE__ */ (0,
|
|
7216
|
-
/* @__PURE__ */ (0,
|
|
7217
|
-
/* @__PURE__ */ (0,
|
|
7218
|
-
/* @__PURE__ */ (0,
|
|
7566
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "animate-pulse", children: [
|
|
7567
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
7568
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
7569
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
7570
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
7571
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
7219
7572
|
] }),
|
|
7220
|
-
/* @__PURE__ */ (0,
|
|
7221
|
-
/* @__PURE__ */ (0,
|
|
7222
|
-
/* @__PURE__ */ (0,
|
|
7223
|
-
/* @__PURE__ */ (0,
|
|
7224
|
-
/* @__PURE__ */ (0,
|
|
7225
|
-
/* @__PURE__ */ (0,
|
|
7573
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "animate-pulse", children: [
|
|
7574
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
7575
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
7576
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
7577
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
7578
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
7226
7579
|
] })
|
|
7227
7580
|
] })
|
|
7228
7581
|
] }) }),
|
|
@@ -7282,7 +7635,7 @@ function FormReducer(state, action) {
|
|
|
7282
7635
|
var FormReducer_default = FormReducer;
|
|
7283
7636
|
|
|
7284
7637
|
// src/components/dataForm/DataList.tsx
|
|
7285
|
-
var
|
|
7638
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
7286
7639
|
var DataList = (props) => {
|
|
7287
7640
|
const router = (0, import_navigation2.useRouter)();
|
|
7288
7641
|
let builder = new OdataBuilder(props.path);
|
|
@@ -7290,9 +7643,9 @@ var DataList = (props) => {
|
|
|
7290
7643
|
let activePageNumber = 0;
|
|
7291
7644
|
let pages = 0;
|
|
7292
7645
|
console.log(props.addLinkText);
|
|
7293
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
7294
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
7295
|
-
(0,
|
|
7646
|
+
const [isDataFound, setIsDataFound] = (0, import_react61.useState)(null);
|
|
7647
|
+
const [searchTerm, setSearchTerm] = (0, import_react61.useState)(props.query?.searchTerm ?? "");
|
|
7648
|
+
(0, import_react61.useEffect)(() => {
|
|
7296
7649
|
if (props?.dataset) {
|
|
7297
7650
|
if (props?.dataset.result && props.dataset.result.length > 0) {
|
|
7298
7651
|
setIsDataFound(true);
|
|
@@ -7301,7 +7654,7 @@ var DataList = (props) => {
|
|
|
7301
7654
|
}
|
|
7302
7655
|
}
|
|
7303
7656
|
}, [props.dataset]);
|
|
7304
|
-
(0,
|
|
7657
|
+
(0, import_react61.useEffect)(() => {
|
|
7305
7658
|
if (!props.query?.["$filter"] || !props.filters) return;
|
|
7306
7659
|
const filterQuery = props.query["$filter"];
|
|
7307
7660
|
props.filters.forEach((filter) => {
|
|
@@ -7320,7 +7673,7 @@ var DataList = (props) => {
|
|
|
7320
7673
|
if (path.includes(".")) {
|
|
7321
7674
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
7322
7675
|
} else if (Array.isArray(obj[path])) {
|
|
7323
|
-
return obj[path].map((item, index) => /* @__PURE__ */ (0,
|
|
7676
|
+
return obj[path].map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { children: item }, index));
|
|
7324
7677
|
} else {
|
|
7325
7678
|
return obj[path];
|
|
7326
7679
|
}
|
|
@@ -7329,11 +7682,11 @@ var DataList = (props) => {
|
|
|
7329
7682
|
inputValues: {},
|
|
7330
7683
|
lastPropertyChanged: ""
|
|
7331
7684
|
};
|
|
7332
|
-
const [formState, dispatch] = (0,
|
|
7685
|
+
const [formState, dispatch] = (0, import_react61.useReducer)(FormReducer_default, initialState);
|
|
7333
7686
|
const getSearchableColumns = () => {
|
|
7334
7687
|
return props.columns?.filter((c) => c.isSearchable)?.map((c) => c.name)?.join(",");
|
|
7335
7688
|
};
|
|
7336
|
-
const handleFilterChange = (0,
|
|
7689
|
+
const handleFilterChange = (0, import_react61.useCallback)(
|
|
7337
7690
|
(updatedValues) => {
|
|
7338
7691
|
dispatch({
|
|
7339
7692
|
type: FORM_INPUT_UPDATE,
|
|
@@ -7364,7 +7717,7 @@ var DataList = (props) => {
|
|
|
7364
7717
|
},
|
|
7365
7718
|
[dispatch, props, router]
|
|
7366
7719
|
);
|
|
7367
|
-
(0,
|
|
7720
|
+
(0, import_react61.useEffect)(() => {
|
|
7368
7721
|
if (!props.columns.some((col) => col.isSearchable)) {
|
|
7369
7722
|
return;
|
|
7370
7723
|
}
|
|
@@ -7399,30 +7752,30 @@ var DataList = (props) => {
|
|
|
7399
7752
|
const renderPageNumbers = () => {
|
|
7400
7753
|
if (pages <= 10) {
|
|
7401
7754
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
7402
|
-
(page) => /* @__PURE__ */ (0,
|
|
7755
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react61.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7403
7756
|
Hyperlink,
|
|
7404
7757
|
{
|
|
7405
7758
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7406
7759
|
href: builder.getNewPageUrl(page),
|
|
7407
7760
|
children: page
|
|
7408
7761
|
}
|
|
7409
|
-
) : /* @__PURE__ */ (0,
|
|
7762
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
7410
7763
|
);
|
|
7411
7764
|
} else {
|
|
7412
7765
|
const showFirstPages = activePageNumber <= 5;
|
|
7413
7766
|
const showLastPages = activePageNumber > pages - 5;
|
|
7414
7767
|
if (showFirstPages) {
|
|
7415
|
-
return /* @__PURE__ */ (0,
|
|
7416
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0,
|
|
7768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
7769
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react61.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7417
7770
|
Hyperlink,
|
|
7418
7771
|
{
|
|
7419
7772
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7420
7773
|
href: builder.getNewPageUrl(page),
|
|
7421
7774
|
children: page
|
|
7422
7775
|
}
|
|
7423
|
-
) : /* @__PURE__ */ (0,
|
|
7424
|
-
/* @__PURE__ */ (0,
|
|
7425
|
-
/* @__PURE__ */ (0,
|
|
7776
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
7777
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7778
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7426
7779
|
Hyperlink,
|
|
7427
7780
|
{
|
|
7428
7781
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7430,7 +7783,7 @@ var DataList = (props) => {
|
|
|
7430
7783
|
children: pages - 1
|
|
7431
7784
|
}
|
|
7432
7785
|
),
|
|
7433
|
-
/* @__PURE__ */ (0,
|
|
7786
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7434
7787
|
Hyperlink,
|
|
7435
7788
|
{
|
|
7436
7789
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7438,7 +7791,7 @@ var DataList = (props) => {
|
|
|
7438
7791
|
children: pages
|
|
7439
7792
|
}
|
|
7440
7793
|
),
|
|
7441
|
-
/* @__PURE__ */ (0,
|
|
7794
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
7442
7795
|
"select",
|
|
7443
7796
|
{
|
|
7444
7797
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -7450,18 +7803,18 @@ var DataList = (props) => {
|
|
|
7450
7803
|
}
|
|
7451
7804
|
},
|
|
7452
7805
|
children: [
|
|
7453
|
-
/* @__PURE__ */ (0,
|
|
7806
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("option", { className: "", value: "", children: "Jump to" }),
|
|
7454
7807
|
Array.from(
|
|
7455
7808
|
{ length: Math.max(0, pages - 10) },
|
|
7456
7809
|
(_, index) => index + 9
|
|
7457
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
7810
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("option", { value: page, children: page }, page))
|
|
7458
7811
|
]
|
|
7459
7812
|
}
|
|
7460
7813
|
) })
|
|
7461
7814
|
] });
|
|
7462
7815
|
} else if (showLastPages) {
|
|
7463
|
-
return /* @__PURE__ */ (0,
|
|
7464
|
-
/* @__PURE__ */ (0,
|
|
7816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
7817
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7465
7818
|
Hyperlink,
|
|
7466
7819
|
{
|
|
7467
7820
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7469,7 +7822,7 @@ var DataList = (props) => {
|
|
|
7469
7822
|
children: "1"
|
|
7470
7823
|
}
|
|
7471
7824
|
),
|
|
7472
|
-
/* @__PURE__ */ (0,
|
|
7825
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7473
7826
|
Hyperlink,
|
|
7474
7827
|
{
|
|
7475
7828
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7477,21 +7830,21 @@ var DataList = (props) => {
|
|
|
7477
7830
|
children: "2"
|
|
7478
7831
|
}
|
|
7479
7832
|
),
|
|
7480
|
-
/* @__PURE__ */ (0,
|
|
7833
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7481
7834
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
7482
|
-
(page) => /* @__PURE__ */ (0,
|
|
7835
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react61.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7483
7836
|
Hyperlink,
|
|
7484
7837
|
{
|
|
7485
7838
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7486
7839
|
href: builder.getNewPageUrl(page),
|
|
7487
7840
|
children: page
|
|
7488
7841
|
}
|
|
7489
|
-
) : /* @__PURE__ */ (0,
|
|
7842
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
7490
7843
|
)
|
|
7491
7844
|
] });
|
|
7492
7845
|
} else {
|
|
7493
|
-
return /* @__PURE__ */ (0,
|
|
7494
|
-
/* @__PURE__ */ (0,
|
|
7846
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
7847
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7495
7848
|
Hyperlink,
|
|
7496
7849
|
{
|
|
7497
7850
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7499,7 +7852,7 @@ var DataList = (props) => {
|
|
|
7499
7852
|
children: "1"
|
|
7500
7853
|
}
|
|
7501
7854
|
),
|
|
7502
|
-
/* @__PURE__ */ (0,
|
|
7855
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7503
7856
|
Hyperlink,
|
|
7504
7857
|
{
|
|
7505
7858
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7507,20 +7860,20 @@ var DataList = (props) => {
|
|
|
7507
7860
|
children: "2"
|
|
7508
7861
|
}
|
|
7509
7862
|
),
|
|
7510
|
-
/* @__PURE__ */ (0,
|
|
7863
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7511
7864
|
Array.from(
|
|
7512
7865
|
{ length: 5 },
|
|
7513
7866
|
(_, index) => activePageNumber - 2 + index
|
|
7514
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
7867
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react61.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7515
7868
|
Hyperlink,
|
|
7516
7869
|
{
|
|
7517
7870
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7518
7871
|
href: builder.getNewPageUrl(page),
|
|
7519
7872
|
children: page
|
|
7520
7873
|
}
|
|
7521
|
-
) : /* @__PURE__ */ (0,
|
|
7522
|
-
/* @__PURE__ */ (0,
|
|
7523
|
-
/* @__PURE__ */ (0,
|
|
7874
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
7875
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7876
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7524
7877
|
Hyperlink,
|
|
7525
7878
|
{
|
|
7526
7879
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7528,7 +7881,7 @@ var DataList = (props) => {
|
|
|
7528
7881
|
children: pages - 1
|
|
7529
7882
|
}
|
|
7530
7883
|
),
|
|
7531
|
-
/* @__PURE__ */ (0,
|
|
7884
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7532
7885
|
Hyperlink,
|
|
7533
7886
|
{
|
|
7534
7887
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7536,7 +7889,7 @@ var DataList = (props) => {
|
|
|
7536
7889
|
children: pages
|
|
7537
7890
|
}
|
|
7538
7891
|
),
|
|
7539
|
-
/* @__PURE__ */ (0,
|
|
7892
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
7540
7893
|
"select",
|
|
7541
7894
|
{
|
|
7542
7895
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -7548,8 +7901,8 @@ var DataList = (props) => {
|
|
|
7548
7901
|
}
|
|
7549
7902
|
},
|
|
7550
7903
|
children: [
|
|
7551
|
-
/* @__PURE__ */ (0,
|
|
7552
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0,
|
|
7904
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("option", { value: "", children: "Jump to" }),
|
|
7905
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("option", { value: page, children: page }, page))
|
|
7553
7906
|
]
|
|
7554
7907
|
}
|
|
7555
7908
|
) })
|
|
@@ -7557,16 +7910,16 @@ var DataList = (props) => {
|
|
|
7557
7910
|
}
|
|
7558
7911
|
}
|
|
7559
7912
|
};
|
|
7560
|
-
return /* @__PURE__ */ (0,
|
|
7561
|
-
/* @__PURE__ */ (0,
|
|
7562
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
7913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_react61.default.Fragment, { children: [
|
|
7914
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(ContentView_default, { isDataFound, children: [
|
|
7915
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
7563
7916
|
"div",
|
|
7564
7917
|
{
|
|
7565
7918
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md sticky top-0`,
|
|
7566
7919
|
children: [
|
|
7567
|
-
props.title ? /* @__PURE__ */ (0,
|
|
7568
|
-
/* @__PURE__ */ (0,
|
|
7569
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
7920
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", {}),
|
|
7921
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
7922
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7570
7923
|
InputControl_default,
|
|
7571
7924
|
{
|
|
7572
7925
|
name: "Search_input",
|
|
@@ -7578,7 +7931,7 @@ var DataList = (props) => {
|
|
|
7578
7931
|
}
|
|
7579
7932
|
}
|
|
7580
7933
|
),
|
|
7581
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
7934
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7582
7935
|
InputControl_default,
|
|
7583
7936
|
{
|
|
7584
7937
|
name: filter.name,
|
|
@@ -7593,15 +7946,15 @@ var DataList = (props) => {
|
|
|
7593
7946
|
},
|
|
7594
7947
|
filter.name
|
|
7595
7948
|
)),
|
|
7596
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
7949
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
7597
7950
|
Hyperlink,
|
|
7598
7951
|
{
|
|
7599
7952
|
className: "gap-1",
|
|
7600
7953
|
linkType: "Primary" /* Solid */,
|
|
7601
7954
|
href: props.addLinkHref,
|
|
7602
7955
|
children: [
|
|
7603
|
-
/* @__PURE__ */ (0,
|
|
7604
|
-
/* @__PURE__ */ (0,
|
|
7956
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
7957
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
7605
7958
|
]
|
|
7606
7959
|
}
|
|
7607
7960
|
)
|
|
@@ -7609,8 +7962,8 @@ var DataList = (props) => {
|
|
|
7609
7962
|
]
|
|
7610
7963
|
}
|
|
7611
7964
|
),
|
|
7612
|
-
/* @__PURE__ */ (0,
|
|
7613
|
-
/* @__PURE__ */ (0,
|
|
7965
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
7966
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
7614
7967
|
let url = builder.getNewOrderByUrl(column.name);
|
|
7615
7968
|
let icon = "chevronUpDown";
|
|
7616
7969
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -7620,18 +7973,18 @@ var DataList = (props) => {
|
|
|
7620
7973
|
icon = "chevronUp";
|
|
7621
7974
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
7622
7975
|
}
|
|
7623
|
-
return /* @__PURE__ */ (0,
|
|
7976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7624
7977
|
"th",
|
|
7625
7978
|
{
|
|
7626
7979
|
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" : ""),
|
|
7627
|
-
children: /* @__PURE__ */ (0,
|
|
7980
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7628
7981
|
Hyperlink,
|
|
7629
7982
|
{
|
|
7630
7983
|
href: column.enableSorting ? url : void 0,
|
|
7631
7984
|
className: "!text-neutral-contrast ",
|
|
7632
|
-
children: /* @__PURE__ */ (0,
|
|
7633
|
-
/* @__PURE__ */ (0,
|
|
7634
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
7985
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
7986
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "text-black", children: column.label }),
|
|
7987
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
7635
7988
|
] })
|
|
7636
7989
|
}
|
|
7637
7990
|
)
|
|
@@ -7639,24 +7992,24 @@ var DataList = (props) => {
|
|
|
7639
7992
|
column.name
|
|
7640
7993
|
);
|
|
7641
7994
|
}) }) }),
|
|
7642
|
-
/* @__PURE__ */ (0,
|
|
7995
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
7643
7996
|
let validityClass = "";
|
|
7644
7997
|
console.log("dataitem", dataitem);
|
|
7645
7998
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
7646
7999
|
validityClass = "bg-alert-200";
|
|
7647
8000
|
}
|
|
7648
|
-
return /* @__PURE__ */ (0,
|
|
8001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
7649
8002
|
console.log("column", column);
|
|
7650
|
-
return /* @__PURE__ */ (0,
|
|
8003
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react61.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7651
8004
|
"td",
|
|
7652
8005
|
{
|
|
7653
8006
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
7654
|
-
children: column.addhref === true ? /* @__PURE__ */ (0,
|
|
8007
|
+
children: column.addhref === true ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7655
8008
|
Hyperlink,
|
|
7656
8009
|
{
|
|
7657
8010
|
className: "",
|
|
7658
8011
|
href: `https://${dataitem[column.name]}`,
|
|
7659
|
-
children: /* @__PURE__ */ (0,
|
|
8012
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7660
8013
|
ViewControl_default,
|
|
7661
8014
|
{
|
|
7662
8015
|
controlType: column.controlType,
|
|
@@ -7669,11 +8022,11 @@ var DataList = (props) => {
|
|
|
7669
8022
|
}
|
|
7670
8023
|
)
|
|
7671
8024
|
}
|
|
7672
|
-
) : column.showAsLink ? /* @__PURE__ */ (0,
|
|
8025
|
+
) : column.showAsLink ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7673
8026
|
Hyperlink,
|
|
7674
8027
|
{
|
|
7675
8028
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
7676
|
-
children: /* @__PURE__ */ (0,
|
|
8029
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7677
8030
|
ViewControl_default,
|
|
7678
8031
|
{
|
|
7679
8032
|
controlType: column.controlType,
|
|
@@ -7683,7 +8036,7 @@ var DataList = (props) => {
|
|
|
7683
8036
|
}
|
|
7684
8037
|
)
|
|
7685
8038
|
}
|
|
7686
|
-
) : /* @__PURE__ */ (0,
|
|
8039
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7687
8040
|
ViewControl_default,
|
|
7688
8041
|
{
|
|
7689
8042
|
controlType: column.controlType,
|
|
@@ -7697,10 +8050,10 @@ var DataList = (props) => {
|
|
|
7697
8050
|
}) }, index);
|
|
7698
8051
|
}) })
|
|
7699
8052
|
] }) }),
|
|
7700
|
-
/* @__PURE__ */ (0,
|
|
7701
|
-
/* @__PURE__ */ (0,
|
|
7702
|
-
/* @__PURE__ */ (0,
|
|
7703
|
-
activePageNumber > 1 && /* @__PURE__ */ (0,
|
|
8053
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
8054
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "text-gray-700", children: label }),
|
|
8055
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex space-x-2 items-center", children: [
|
|
8056
|
+
activePageNumber > 1 && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7704
8057
|
Hyperlink,
|
|
7705
8058
|
{
|
|
7706
8059
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -7708,9 +8061,9 @@ var DataList = (props) => {
|
|
|
7708
8061
|
children: "Prev"
|
|
7709
8062
|
}
|
|
7710
8063
|
),
|
|
7711
|
-
activePageNumber <= 1 && /* @__PURE__ */ (0,
|
|
8064
|
+
activePageNumber <= 1 && /* @__PURE__ */ (0, import_jsx_runtime81.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" }),
|
|
7712
8065
|
renderPageNumbers(),
|
|
7713
|
-
activePageNumber < pages && /* @__PURE__ */ (0,
|
|
8066
|
+
activePageNumber < pages && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7714
8067
|
Hyperlink,
|
|
7715
8068
|
{
|
|
7716
8069
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -7718,19 +8071,19 @@ var DataList = (props) => {
|
|
|
7718
8071
|
children: "Next"
|
|
7719
8072
|
}
|
|
7720
8073
|
),
|
|
7721
|
-
activePageNumber >= pages && /* @__PURE__ */ (0,
|
|
8074
|
+
activePageNumber >= pages && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
7722
8075
|
] })
|
|
7723
8076
|
] }) })
|
|
7724
8077
|
] }),
|
|
7725
|
-
/* @__PURE__ */ (0,
|
|
7726
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
8078
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(NoContentView_default, { isDataFound, children: [
|
|
8079
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
7727
8080
|
"div",
|
|
7728
8081
|
{
|
|
7729
8082
|
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`,
|
|
7730
8083
|
children: [
|
|
7731
|
-
props.title ? /* @__PURE__ */ (0,
|
|
7732
|
-
/* @__PURE__ */ (0,
|
|
7733
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
8084
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", {}),
|
|
8085
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
8086
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7734
8087
|
InputControl_default,
|
|
7735
8088
|
{
|
|
7736
8089
|
name: "Search_input",
|
|
@@ -7742,7 +8095,7 @@ var DataList = (props) => {
|
|
|
7742
8095
|
}
|
|
7743
8096
|
}
|
|
7744
8097
|
),
|
|
7745
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
8098
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7746
8099
|
InputControl_default,
|
|
7747
8100
|
{
|
|
7748
8101
|
name: filter.name,
|
|
@@ -7757,15 +8110,15 @@ var DataList = (props) => {
|
|
|
7757
8110
|
},
|
|
7758
8111
|
filter.name
|
|
7759
8112
|
)),
|
|
7760
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
8113
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
7761
8114
|
Hyperlink,
|
|
7762
8115
|
{
|
|
7763
8116
|
className: "gap-1",
|
|
7764
8117
|
linkType: "Primary" /* Solid */,
|
|
7765
8118
|
href: props.addLinkHref,
|
|
7766
8119
|
children: [
|
|
7767
|
-
/* @__PURE__ */ (0,
|
|
7768
|
-
/* @__PURE__ */ (0,
|
|
8120
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
8121
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
7769
8122
|
]
|
|
7770
8123
|
}
|
|
7771
8124
|
)
|
|
@@ -7773,8 +8126,8 @@ var DataList = (props) => {
|
|
|
7773
8126
|
]
|
|
7774
8127
|
}
|
|
7775
8128
|
),
|
|
7776
|
-
/* @__PURE__ */ (0,
|
|
7777
|
-
/* @__PURE__ */ (0,
|
|
8129
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
8130
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("thead", { className: "bg-gray-50", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
7778
8131
|
let url = builder.getNewOrderByUrl(column.name);
|
|
7779
8132
|
let icon = "chevronUpDown";
|
|
7780
8133
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -7784,18 +8137,18 @@ var DataList = (props) => {
|
|
|
7784
8137
|
icon = "chevronUp";
|
|
7785
8138
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
7786
8139
|
}
|
|
7787
|
-
return /* @__PURE__ */ (0,
|
|
8140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7788
8141
|
"th",
|
|
7789
8142
|
{
|
|
7790
8143
|
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" : ""),
|
|
7791
|
-
children: /* @__PURE__ */ (0,
|
|
8144
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
7792
8145
|
Hyperlink,
|
|
7793
8146
|
{
|
|
7794
8147
|
href: column.enableSorting ? url : void 0,
|
|
7795
8148
|
className: "text-body-950",
|
|
7796
|
-
children: /* @__PURE__ */ (0,
|
|
7797
|
-
/* @__PURE__ */ (0,
|
|
7798
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
8149
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
8150
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { children: column.label }),
|
|
8151
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
7799
8152
|
] })
|
|
7800
8153
|
}
|
|
7801
8154
|
)
|
|
@@ -7803,7 +8156,7 @@ var DataList = (props) => {
|
|
|
7803
8156
|
column.name
|
|
7804
8157
|
);
|
|
7805
8158
|
}) }) }) }) }),
|
|
7806
|
-
/* @__PURE__ */ (0,
|
|
8159
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
7807
8160
|
] })
|
|
7808
8161
|
] })
|
|
7809
8162
|
] });
|
|
@@ -7811,12 +8164,12 @@ var DataList = (props) => {
|
|
|
7811
8164
|
var DataList_default = DataList;
|
|
7812
8165
|
|
|
7813
8166
|
// src/components/dataForm/DataListRenderer.tsx
|
|
7814
|
-
var
|
|
8167
|
+
var import_react62 = __toESM(require("react"));
|
|
7815
8168
|
init_ServiceClient();
|
|
7816
8169
|
init_OdataBuilder();
|
|
7817
8170
|
init_SelectWithSearchInput();
|
|
7818
8171
|
var import_navigation3 = require("next/navigation");
|
|
7819
|
-
var
|
|
8172
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
7820
8173
|
var viewControlMap = {
|
|
7821
8174
|
number: ViewControlTypes.number,
|
|
7822
8175
|
lineText: ViewControlTypes.lineText,
|
|
@@ -7871,14 +8224,14 @@ var DataListRenderer = ({
|
|
|
7871
8224
|
widgetProps
|
|
7872
8225
|
}) => {
|
|
7873
8226
|
const serviceClient = new ServiceClient_default(apiBaseUrl, session);
|
|
7874
|
-
const [columns, setColumns] = (0,
|
|
7875
|
-
const [dataset, setDataset] = (0,
|
|
7876
|
-
const [filter, setFilters] = (0,
|
|
7877
|
-
const [addLinkHref, setAddLinkHref] = (0,
|
|
7878
|
-
const [addLinkText, setAddLinkText] = (0,
|
|
7879
|
-
const [serviceRoute, setServiceRoute] = (0,
|
|
8227
|
+
const [columns, setColumns] = (0, import_react62.useState)([]);
|
|
8228
|
+
const [dataset, setDataset] = (0, import_react62.useState)();
|
|
8229
|
+
const [filter, setFilters] = (0, import_react62.useState)([]);
|
|
8230
|
+
const [addLinkHref, setAddLinkHref] = (0, import_react62.useState)("");
|
|
8231
|
+
const [addLinkText, setAddLinkText] = (0, import_react62.useState)("");
|
|
8232
|
+
const [serviceRoute, setServiceRoute] = (0, import_react62.useState)("");
|
|
7880
8233
|
const pathname = (0, import_navigation3.usePathname)();
|
|
7881
|
-
(0,
|
|
8234
|
+
(0, import_react62.useEffect)(() => {
|
|
7882
8235
|
if (!formDefinition) return;
|
|
7883
8236
|
setColumns(mapApiToColumns(formDefinition));
|
|
7884
8237
|
setFilters(mapApiToFilters(formDefinition));
|
|
@@ -7891,7 +8244,7 @@ var DataListRenderer = ({
|
|
|
7891
8244
|
setAddLinkHref(resolvedAddLinkHref);
|
|
7892
8245
|
setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
|
|
7893
8246
|
}, [formDefinition, params]);
|
|
7894
|
-
(0,
|
|
8247
|
+
(0, import_react62.useEffect)(() => {
|
|
7895
8248
|
const fetchData = async () => {
|
|
7896
8249
|
if (!serviceRoute) return;
|
|
7897
8250
|
const resolvedRoute = resolveRoutePlaceholders2(serviceRoute, params);
|
|
@@ -7911,13 +8264,13 @@ var DataListRenderer = ({
|
|
|
7911
8264
|
isActive: landingPageUrl === pathname
|
|
7912
8265
|
};
|
|
7913
8266
|
});
|
|
7914
|
-
return /* @__PURE__ */ (0,
|
|
8267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_react62.default.Fragment, { children: [
|
|
7915
8268
|
resolvedTabs.length > 0 && // <NavigationTabsV2
|
|
7916
8269
|
// tabs={resolvedTabs}
|
|
7917
8270
|
// params={(widgetProps?.params ?? params) as Record<string, any>}
|
|
7918
8271
|
// />
|
|
7919
|
-
/* @__PURE__ */ (0,
|
|
7920
|
-
/* @__PURE__ */ (0,
|
|
8272
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
8273
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
7921
8274
|
DataList_default,
|
|
7922
8275
|
{
|
|
7923
8276
|
addLinkHref,
|
|
@@ -7939,13 +8292,13 @@ var DataListRenderer_default = DataListRenderer;
|
|
|
7939
8292
|
init_InputControlType();
|
|
7940
8293
|
|
|
7941
8294
|
// src/components/dataForm/DataForm.tsx
|
|
7942
|
-
var
|
|
8295
|
+
var import_react64 = __toESM(require("react"));
|
|
7943
8296
|
init_Icon();
|
|
7944
8297
|
init_Button();
|
|
7945
8298
|
init_StyleTypes();
|
|
7946
8299
|
|
|
7947
8300
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
7948
|
-
var
|
|
8301
|
+
var import_react63 = __toESM(require("react"));
|
|
7949
8302
|
|
|
7950
8303
|
// src/components/dataForm/StyleTypes.tsx
|
|
7951
8304
|
var StyleTypes2 = /* @__PURE__ */ ((StyleTypes3) => {
|
|
@@ -7972,7 +8325,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
7972
8325
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
7973
8326
|
|
|
7974
8327
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
7975
|
-
var
|
|
8328
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
7976
8329
|
var DataFormChildSection = (props) => {
|
|
7977
8330
|
const { section } = props;
|
|
7978
8331
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -7984,7 +8337,7 @@ var DataFormChildSection = (props) => {
|
|
|
7984
8337
|
return childItems.map((item, originalIndex) => ({ item, originalIndex })).filter((x) => !x.item.isDeleted) || [];
|
|
7985
8338
|
};
|
|
7986
8339
|
const childItemsToRender = getChildItemsForRendering();
|
|
7987
|
-
const handleChildInputChange = (0,
|
|
8340
|
+
const handleChildInputChange = (0, import_react63.useCallback)(
|
|
7988
8341
|
(updatedValues) => {
|
|
7989
8342
|
if (isOneToOne) {
|
|
7990
8343
|
props.callback({
|
|
@@ -8011,7 +8364,7 @@ var DataFormChildSection = (props) => {
|
|
|
8011
8364
|
},
|
|
8012
8365
|
[props, isOneToOne, childItemsToRender]
|
|
8013
8366
|
);
|
|
8014
|
-
const onAddRow = (0,
|
|
8367
|
+
const onAddRow = (0, import_react63.useCallback)(() => {
|
|
8015
8368
|
props.callback({
|
|
8016
8369
|
sectionName: props.section.name,
|
|
8017
8370
|
actionType: FORM_CHILD_ROW_ADD,
|
|
@@ -8020,7 +8373,7 @@ var DataFormChildSection = (props) => {
|
|
|
8020
8373
|
rowIndex: -1
|
|
8021
8374
|
});
|
|
8022
8375
|
}, [props]);
|
|
8023
|
-
const onDeleteRow = (0,
|
|
8376
|
+
const onDeleteRow = (0, import_react63.useCallback)(
|
|
8024
8377
|
(filteredIndex) => {
|
|
8025
8378
|
const visibleItem = childItemsToRender[filteredIndex];
|
|
8026
8379
|
if (visibleItem) {
|
|
@@ -8040,14 +8393,14 @@ var DataFormChildSection = (props) => {
|
|
|
8040
8393
|
childItemsToRender,
|
|
8041
8394
|
allChildItems: childItems
|
|
8042
8395
|
});
|
|
8043
|
-
return /* @__PURE__ */ (0,
|
|
8044
|
-
section.sectionTitle && /* @__PURE__ */ (0,
|
|
8045
|
-
/* @__PURE__ */ (0,
|
|
8046
|
-
/* @__PURE__ */ (0,
|
|
8047
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0,
|
|
8048
|
-
return /* @__PURE__ */ (0,
|
|
8396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_react63.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
8397
|
+
section.sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
8398
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
8399
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
8400
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
8401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("tr", { className: "", children: [
|
|
8049
8402
|
sectionRow.elements.map((field, index) => {
|
|
8050
|
-
return /* @__PURE__ */ (0,
|
|
8403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8051
8404
|
"th",
|
|
8052
8405
|
{
|
|
8053
8406
|
className: "py-3 font-normal text-left",
|
|
@@ -8056,21 +8409,21 @@ var DataFormChildSection = (props) => {
|
|
|
8056
8409
|
field.name
|
|
8057
8410
|
);
|
|
8058
8411
|
}),
|
|
8059
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
8412
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
8060
8413
|
] }, sectionRowIndex);
|
|
8061
8414
|
}) }),
|
|
8062
|
-
/* @__PURE__ */ (0,
|
|
8415
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
8063
8416
|
const { item, originalIndex } = visibleItem;
|
|
8064
8417
|
const rowKey = originalIndex;
|
|
8065
|
-
return /* @__PURE__ */ (0,
|
|
8418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_react63.default.Fragment, { children: section.sectionRows.map(
|
|
8066
8419
|
(sectionRow, sectionRowIndex) => {
|
|
8067
|
-
return /* @__PURE__ */ (0,
|
|
8420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
8068
8421
|
"tr",
|
|
8069
8422
|
{
|
|
8070
8423
|
className: "",
|
|
8071
8424
|
children: [
|
|
8072
8425
|
sectionRow.elements.map((field, index) => {
|
|
8073
|
-
return /* @__PURE__ */ (0,
|
|
8426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "w-11/12", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8074
8427
|
InputControl_default,
|
|
8075
8428
|
{
|
|
8076
8429
|
index: filteredIndex,
|
|
@@ -8090,7 +8443,7 @@ var DataFormChildSection = (props) => {
|
|
|
8090
8443
|
}
|
|
8091
8444
|
) }) }) }, field.name);
|
|
8092
8445
|
}),
|
|
8093
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
8446
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8094
8447
|
ClientButton_default,
|
|
8095
8448
|
{
|
|
8096
8449
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -8099,7 +8452,7 @@ var DataFormChildSection = (props) => {
|
|
|
8099
8452
|
},
|
|
8100
8453
|
dataRole: "delete",
|
|
8101
8454
|
tabIndex: -1,
|
|
8102
|
-
children: /* @__PURE__ */ (0,
|
|
8455
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8103
8456
|
Icon_default,
|
|
8104
8457
|
{
|
|
8105
8458
|
className: "w-4 h-4",
|
|
@@ -8116,7 +8469,7 @@ var DataFormChildSection = (props) => {
|
|
|
8116
8469
|
) }, rowKey);
|
|
8117
8470
|
}) })
|
|
8118
8471
|
] }) }),
|
|
8119
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
8472
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
8120
8473
|
ClientButton_default,
|
|
8121
8474
|
{
|
|
8122
8475
|
ButtonType: "Link" /* Link */,
|
|
@@ -8131,9 +8484,9 @@ var DataFormChildSection = (props) => {
|
|
|
8131
8484
|
var DataFormChildSection_default = DataFormChildSection;
|
|
8132
8485
|
|
|
8133
8486
|
// src/components/dataForm/DataForm.tsx
|
|
8134
|
-
var
|
|
8487
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
8135
8488
|
var DataForm = (props) => {
|
|
8136
|
-
const formRef = (0,
|
|
8489
|
+
const formRef = (0, import_react64.useRef)(null);
|
|
8137
8490
|
console.log(props.dataItem, "dssads");
|
|
8138
8491
|
const initialState = {
|
|
8139
8492
|
inputValues: {},
|
|
@@ -8142,9 +8495,9 @@ var DataForm = (props) => {
|
|
|
8142
8495
|
const childInitialState = {
|
|
8143
8496
|
inputValues: []
|
|
8144
8497
|
};
|
|
8145
|
-
const [formState, dispatch] = (0,
|
|
8498
|
+
const [formState, dispatch] = (0, import_react64.useReducer)(FormReducer_default, initialState);
|
|
8146
8499
|
console.log(props.sections, "sections");
|
|
8147
|
-
const clearHiddenChildSections = (0,
|
|
8500
|
+
const clearHiddenChildSections = (0, import_react64.useCallback)(
|
|
8148
8501
|
(changedProperty, newValues) => {
|
|
8149
8502
|
if (!props.sections) return;
|
|
8150
8503
|
const allChildSections = [];
|
|
@@ -8182,7 +8535,7 @@ var DataForm = (props) => {
|
|
|
8182
8535
|
},
|
|
8183
8536
|
[props.sections, formState.inputValues]
|
|
8184
8537
|
);
|
|
8185
|
-
const handleInputChange = (0,
|
|
8538
|
+
const handleInputChange = (0, import_react64.useCallback)(
|
|
8186
8539
|
async (updatedValues) => {
|
|
8187
8540
|
dispatch({
|
|
8188
8541
|
type: FORM_INPUT_UPDATE,
|
|
@@ -8197,7 +8550,7 @@ var DataForm = (props) => {
|
|
|
8197
8550
|
},
|
|
8198
8551
|
[dispatch, formState.inputValues, clearHiddenChildSections]
|
|
8199
8552
|
);
|
|
8200
|
-
const fetchData = (0,
|
|
8553
|
+
const fetchData = (0, import_react64.useCallback)(async () => {
|
|
8201
8554
|
if (!props.rules) return;
|
|
8202
8555
|
if (Object.keys(formState.inputValues).length === 0) {
|
|
8203
8556
|
return;
|
|
@@ -8228,7 +8581,7 @@ var DataForm = (props) => {
|
|
|
8228
8581
|
console.error("Error fetching data:", error);
|
|
8229
8582
|
}
|
|
8230
8583
|
}, [formState.lastPropertyChanged, formState.inputValues]);
|
|
8231
|
-
(0,
|
|
8584
|
+
(0, import_react64.useEffect)(() => {
|
|
8232
8585
|
fetchData();
|
|
8233
8586
|
}, [formState.inputValues, formState.lastPropertyChanged]);
|
|
8234
8587
|
function replacePlaceholders(template, context, params) {
|
|
@@ -8248,7 +8601,7 @@ var DataForm = (props) => {
|
|
|
8248
8601
|
}
|
|
8249
8602
|
);
|
|
8250
8603
|
}
|
|
8251
|
-
const handleChildSectionChangeCallback = (0,
|
|
8604
|
+
const handleChildSectionChangeCallback = (0, import_react64.useCallback)(
|
|
8252
8605
|
(params) => {
|
|
8253
8606
|
dispatch({
|
|
8254
8607
|
type: params.actionType,
|
|
@@ -8293,7 +8646,7 @@ var DataForm = (props) => {
|
|
|
8293
8646
|
});
|
|
8294
8647
|
return cloned;
|
|
8295
8648
|
}
|
|
8296
|
-
const onClick = (0,
|
|
8649
|
+
const onClick = (0, import_react64.useCallback)(async () => {
|
|
8297
8650
|
if (props.onClick) {
|
|
8298
8651
|
const isEdit = props.dataItem && Object.keys(props.dataItem).length > 0;
|
|
8299
8652
|
const normalizedValues = normalizeChildSections(
|
|
@@ -8309,21 +8662,21 @@ var DataForm = (props) => {
|
|
|
8309
8662
|
return { isSuccessful: true };
|
|
8310
8663
|
}
|
|
8311
8664
|
}, [formState, props]);
|
|
8312
|
-
const handleAdditionalOnClick = (0,
|
|
8665
|
+
const handleAdditionalOnClick = (0, import_react64.useCallback)(async () => {
|
|
8313
8666
|
if (props.additionalActions?.onClick) {
|
|
8314
8667
|
return await props.additionalActions.onClick(formState);
|
|
8315
8668
|
} else {
|
|
8316
8669
|
return { isSuccessful: true, message: "Action completed successfully" };
|
|
8317
8670
|
}
|
|
8318
8671
|
}, [formState, props]);
|
|
8319
|
-
const onDelete = (0,
|
|
8672
|
+
const onDelete = (0, import_react64.useCallback)(async () => {
|
|
8320
8673
|
if (props.onDelete) {
|
|
8321
8674
|
return await props.onDelete(formState);
|
|
8322
8675
|
} else {
|
|
8323
8676
|
return { isSuccessful: true };
|
|
8324
8677
|
}
|
|
8325
8678
|
}, [formState, props]);
|
|
8326
|
-
(0,
|
|
8679
|
+
(0, import_react64.useEffect)(() => {
|
|
8327
8680
|
if (props.dataItem) {
|
|
8328
8681
|
dispatch({
|
|
8329
8682
|
type: FORM_INITIAL_UPDATE,
|
|
@@ -8351,19 +8704,19 @@ var DataForm = (props) => {
|
|
|
8351
8704
|
return false;
|
|
8352
8705
|
}
|
|
8353
8706
|
}
|
|
8354
|
-
return /* @__PURE__ */ (0,
|
|
8355
|
-
props.title && /* @__PURE__ */ (0,
|
|
8707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react64.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
8708
|
+
props.title && /* @__PURE__ */ (0, import_jsx_runtime84.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_runtime84.jsxs)(
|
|
8356
8709
|
"div",
|
|
8357
8710
|
{
|
|
8358
8711
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
8359
8712
|
onClick: () => window.history.back(),
|
|
8360
8713
|
children: [
|
|
8361
|
-
/* @__PURE__ */ (0,
|
|
8362
|
-
/* @__PURE__ */ (0,
|
|
8714
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
8715
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
8363
8716
|
]
|
|
8364
8717
|
}
|
|
8365
8718
|
) }),
|
|
8366
|
-
/* @__PURE__ */ (0,
|
|
8719
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
8367
8720
|
"form",
|
|
8368
8721
|
{
|
|
8369
8722
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -8384,8 +8737,8 @@ var DataForm = (props) => {
|
|
|
8384
8737
|
}
|
|
8385
8738
|
}
|
|
8386
8739
|
},
|
|
8387
|
-
children: /* @__PURE__ */ (0,
|
|
8388
|
-
return /* @__PURE__ */ (0,
|
|
8740
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
8741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react64.default.Fragment, { children: !section.isChildSection && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
8389
8742
|
section.sectionRows?.map(
|
|
8390
8743
|
(sectionRow, sectionRowIndex) => {
|
|
8391
8744
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -8396,14 +8749,14 @@ var DataForm = (props) => {
|
|
|
8396
8749
|
sectionRow.visible
|
|
8397
8750
|
);
|
|
8398
8751
|
}
|
|
8399
|
-
return /* @__PURE__ */ (0,
|
|
8400
|
-
return /* @__PURE__ */ (0,
|
|
8752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_react64.default.Fragment, { children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
8753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
8401
8754
|
"div",
|
|
8402
8755
|
{
|
|
8403
8756
|
className: sectionRow.grow ? "grow" : "",
|
|
8404
8757
|
children: [
|
|
8405
|
-
/* @__PURE__ */ (0,
|
|
8406
|
-
/* @__PURE__ */ (0,
|
|
8758
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { children: field.controlType }),
|
|
8759
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
8407
8760
|
InputControl_default,
|
|
8408
8761
|
{
|
|
8409
8762
|
name: field.name,
|
|
@@ -8433,12 +8786,12 @@ var DataForm = (props) => {
|
|
|
8433
8786
|
}) }) }, sectionRowIndex);
|
|
8434
8787
|
}
|
|
8435
8788
|
),
|
|
8436
|
-
/* @__PURE__ */ (0,
|
|
8789
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { children: section.childSections?.map(
|
|
8437
8790
|
(childSection, childSectionIndex) => {
|
|
8438
|
-
return /* @__PURE__ */ (0,
|
|
8791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { children: childSection.name && evalutateCondition(
|
|
8439
8792
|
formState.inputValues,
|
|
8440
8793
|
childSection.visible
|
|
8441
|
-
) && /* @__PURE__ */ (0,
|
|
8794
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
8442
8795
|
DataFormChildSection_default,
|
|
8443
8796
|
{
|
|
8444
8797
|
section: childSection,
|
|
@@ -8453,8 +8806,8 @@ var DataForm = (props) => {
|
|
|
8453
8806
|
}) })
|
|
8454
8807
|
}
|
|
8455
8808
|
),
|
|
8456
|
-
/* @__PURE__ */ (0,
|
|
8457
|
-
/* @__PURE__ */ (0,
|
|
8809
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
8810
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { children: props.additionalActions && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
8458
8811
|
Button_default,
|
|
8459
8812
|
{
|
|
8460
8813
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -8462,7 +8815,7 @@ var DataForm = (props) => {
|
|
|
8462
8815
|
children: props.additionalActions.title
|
|
8463
8816
|
}
|
|
8464
8817
|
) }),
|
|
8465
|
-
/* @__PURE__ */ (0,
|
|
8818
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { children: props.onDelete && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
8466
8819
|
Button_default,
|
|
8467
8820
|
{
|
|
8468
8821
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -8473,7 +8826,7 @@ var DataForm = (props) => {
|
|
|
8473
8826
|
children: "Delete"
|
|
8474
8827
|
}
|
|
8475
8828
|
) }),
|
|
8476
|
-
/* @__PURE__ */ (0,
|
|
8829
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { children: props.onClick && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
8477
8830
|
Button_default,
|
|
8478
8831
|
{
|
|
8479
8832
|
onValidate,
|
|
@@ -8491,7 +8844,7 @@ var DataForm_default = DataForm;
|
|
|
8491
8844
|
|
|
8492
8845
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
8493
8846
|
init_ServiceClient();
|
|
8494
|
-
var
|
|
8847
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
8495
8848
|
function getAction(actions, code) {
|
|
8496
8849
|
return actions?.find((a) => a.actionCode === code);
|
|
8497
8850
|
}
|
|
@@ -8517,9 +8870,9 @@ var DataFormRenderer = ({
|
|
|
8517
8870
|
"Delete"
|
|
8518
8871
|
);
|
|
8519
8872
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
8520
|
-
return /* @__PURE__ */ (0,
|
|
8521
|
-
widgetProps && /* @__PURE__ */ (0,
|
|
8522
|
-
/* @__PURE__ */ (0,
|
|
8873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
8874
|
+
widgetProps && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
8875
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
8523
8876
|
DataForm_default,
|
|
8524
8877
|
{
|
|
8525
8878
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|
|
@@ -8547,6 +8900,7 @@ var DataFormRenderer_default = DataFormRenderer;
|
|
|
8547
8900
|
DataFormRenderer,
|
|
8548
8901
|
DataList,
|
|
8549
8902
|
DataListRenderer,
|
|
8903
|
+
DateInput,
|
|
8550
8904
|
DateTimeInput,
|
|
8551
8905
|
EmailInput,
|
|
8552
8906
|
EnterAnimationHydrator,
|
|
@@ -8561,6 +8915,8 @@ var DataFormRenderer_default = DataFormRenderer;
|
|
|
8561
8915
|
PageBodyRenderer,
|
|
8562
8916
|
PercentageInput,
|
|
8563
8917
|
PhoneInput,
|
|
8918
|
+
RadioInput,
|
|
8919
|
+
Switcher,
|
|
8564
8920
|
TimeInput,
|
|
8565
8921
|
Toast,
|
|
8566
8922
|
ToastService,
|