@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260707162731 → 0.8.1-dev.20260708070033
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{InputControlClient-NJV6B65M.mjs → InputControlClient-646PQPKQ.mjs} +79 -6
- package/dist/{InputControlClient-TW664WIJ.mjs → InputControlClient-O4HBEUP4.mjs} +79 -6
- package/dist/{LinkNodeButton-FUL3J5HR.mjs → LinkNodeButton-66LEXGVY.mjs} +12 -12
- package/dist/{LinkNodeButton-IGJOGOKI.mjs → LinkNodeButton-GVOICN34.mjs} +10 -11
- package/dist/{LinkNodeButton-ZONM74OO.mjs → LinkNodeButton-WA5N3CBJ.mjs} +12 -12
- package/dist/{Pagination-FSYLYKUA.mjs → Pagination-4K7GMWUE.mjs} +2 -2
- package/dist/Pagination-OQT7Q2XO.mjs +183 -0
- package/dist/chunk-FI2KJBK2.mjs +110 -0
- package/dist/{chunk-47HD7QP7.mjs → chunk-FYGNBMII.mjs} +1 -1
- package/dist/chunk-OGGIS4AN.mjs +201 -0
- package/dist/{chunk-CM7LUGCH.mjs → chunk-UWFXFVUU.mjs} +2 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +575 -494
- package/dist/index.mjs +19 -19
- package/dist/server.js +11 -11
- package/dist/server.mjs +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1005,7 +1005,8 @@ var init_InputControlType = __esm({
|
|
|
1005
1005
|
colorInput: "colorInput",
|
|
1006
1006
|
selectWithSearchInput: "selectWithSearchInput",
|
|
1007
1007
|
selectWithSearchPanel: "selectWithSearchPanel",
|
|
1008
|
-
booleanSelect: "booleanSelect"
|
|
1008
|
+
booleanSelect: "booleanSelect",
|
|
1009
|
+
switchInput: "switchInput"
|
|
1009
1010
|
};
|
|
1010
1011
|
InputControlType_default = InputControlType;
|
|
1011
1012
|
}
|
|
@@ -2702,17 +2703,95 @@ var init_AssetUpload = __esm({
|
|
|
2702
2703
|
}
|
|
2703
2704
|
});
|
|
2704
2705
|
|
|
2706
|
+
// src/components/controls/edit/SwitchInput.tsx
|
|
2707
|
+
var import_react36, import_jsx_runtime45, SwitchInput, SwitchInput_default;
|
|
2708
|
+
var init_SwitchInput = __esm({
|
|
2709
|
+
"src/components/controls/edit/SwitchInput.tsx"() {
|
|
2710
|
+
"use strict";
|
|
2711
|
+
import_react36 = __toESM(require("react"));
|
|
2712
|
+
import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2713
|
+
SwitchInput = (props) => {
|
|
2714
|
+
const textChangeHandler = (event) => {
|
|
2715
|
+
let text = event.target.checked;
|
|
2716
|
+
if (props.callback !== void 0) {
|
|
2717
|
+
props.callback({
|
|
2718
|
+
name: props.name,
|
|
2719
|
+
value: text,
|
|
2720
|
+
index: props.index,
|
|
2721
|
+
groupKey: props.groupKey
|
|
2722
|
+
});
|
|
2723
|
+
}
|
|
2724
|
+
};
|
|
2725
|
+
let value = false;
|
|
2726
|
+
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
2727
|
+
value = true;
|
|
2728
|
+
}
|
|
2729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react36.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-start justify-between gap-4 py-3", children: [
|
|
2730
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "min-w-0", children: [
|
|
2731
|
+
props?.attributes?.label && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
2732
|
+
"label",
|
|
2733
|
+
{
|
|
2734
|
+
htmlFor: props.name,
|
|
2735
|
+
className: "inline-block text-sm font-semibold text-slate-800",
|
|
2736
|
+
children: [
|
|
2737
|
+
props.attributes.label,
|
|
2738
|
+
props?.attributes?.required && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "bg-error-weak", children: "*" })
|
|
2739
|
+
]
|
|
2740
|
+
}
|
|
2741
|
+
),
|
|
2742
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage || "" })
|
|
2743
|
+
] }),
|
|
2744
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
2745
|
+
"label",
|
|
2746
|
+
{
|
|
2747
|
+
htmlFor: props.name,
|
|
2748
|
+
className: "relative inline-flex shrink-0 cursor-pointer items-center peer-disabled:cursor-not-allowed",
|
|
2749
|
+
children: [
|
|
2750
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2751
|
+
"input",
|
|
2752
|
+
{
|
|
2753
|
+
type: "checkbox",
|
|
2754
|
+
name: props.name,
|
|
2755
|
+
id: props.name,
|
|
2756
|
+
checked: value,
|
|
2757
|
+
onChange: textChangeHandler,
|
|
2758
|
+
required: props?.attributes?.required,
|
|
2759
|
+
disabled: props?.attributes?.readOnly,
|
|
2760
|
+
className: "peer sr-only"
|
|
2761
|
+
}
|
|
2762
|
+
),
|
|
2763
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2764
|
+
"div",
|
|
2765
|
+
{
|
|
2766
|
+
className: "h-6 w-11 rounded-full bg-slate-200 shadow-inner\n transition-colors duration-200 ease-in-out\n peer-checked:bg-blue-600\n peer-focus-visible:ring-2 peer-focus-visible:ring-blue-300 peer-focus-visible:ring-offset-2\n peer-disabled:bg-slate-100"
|
|
2767
|
+
}
|
|
2768
|
+
),
|
|
2769
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2770
|
+
"div",
|
|
2771
|
+
{
|
|
2772
|
+
className: "absolute left-0.5 top-0.5 h-5 w-5 rounded-full bg-default shadow\n transition-transform duration-200 ease-in-out\n peer-checked:translate-x-5\n peer-disabled:bg-slate-50"
|
|
2773
|
+
}
|
|
2774
|
+
)
|
|
2775
|
+
]
|
|
2776
|
+
}
|
|
2777
|
+
)
|
|
2778
|
+
] }) });
|
|
2779
|
+
};
|
|
2780
|
+
SwitchInput_default = SwitchInput;
|
|
2781
|
+
}
|
|
2782
|
+
});
|
|
2783
|
+
|
|
2705
2784
|
// src/components/controls/edit/InputControlClient.tsx
|
|
2706
2785
|
var InputControlClient_exports = {};
|
|
2707
2786
|
__export(InputControlClient_exports, {
|
|
2708
2787
|
default: () => InputControlClient_default
|
|
2709
2788
|
});
|
|
2710
|
-
var
|
|
2789
|
+
var import_react37, import_jsx_runtime46, InputControl, InputControlClient_default;
|
|
2711
2790
|
var init_InputControlClient = __esm({
|
|
2712
2791
|
"src/components/controls/edit/InputControlClient.tsx"() {
|
|
2713
2792
|
"use strict";
|
|
2714
2793
|
"use client";
|
|
2715
|
-
|
|
2794
|
+
import_react37 = __toESM(require("react"));
|
|
2716
2795
|
init_MultilineTextInput();
|
|
2717
2796
|
init_LineTextInput();
|
|
2718
2797
|
init_MoneyInput();
|
|
@@ -2731,8 +2810,9 @@ var init_InputControlClient = __esm({
|
|
|
2731
2810
|
init_EmailInput();
|
|
2732
2811
|
init_TimeInput();
|
|
2733
2812
|
init_AssetUpload();
|
|
2734
|
-
|
|
2735
|
-
|
|
2813
|
+
init_SwitchInput();
|
|
2814
|
+
import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2815
|
+
InputControl = import_react37.default.forwardRef(
|
|
2736
2816
|
(props, ref) => {
|
|
2737
2817
|
const ControlComponents = {
|
|
2738
2818
|
[InputControlType_default.lineTextInput]: LineTextInput_default,
|
|
@@ -2751,10 +2831,11 @@ var init_InputControlClient = __esm({
|
|
|
2751
2831
|
[InputControlType_default.selectWithSearchPanel]: SelectWithSearchPanel_default,
|
|
2752
2832
|
[InputControlType_default.booleanSelect]: BooleanSelect_default,
|
|
2753
2833
|
[InputControlType_default.timeInput]: TimeInput_default,
|
|
2754
|
-
[InputControlType_default.asset]: AssetUpload_default
|
|
2834
|
+
[InputControlType_default.asset]: AssetUpload_default,
|
|
2835
|
+
[InputControlType_default.switchInput]: SwitchInput_default
|
|
2755
2836
|
};
|
|
2756
2837
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
2757
|
-
return /* @__PURE__ */ (0,
|
|
2838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react37.default.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SelectedControlComponent, { ...props }) : "Control not found" });
|
|
2758
2839
|
}
|
|
2759
2840
|
);
|
|
2760
2841
|
InputControl.displayName = "InputControl";
|
|
@@ -2981,27 +3062,27 @@ var LinkNodeButton_exports = {};
|
|
|
2981
3062
|
__export(LinkNodeButton_exports, {
|
|
2982
3063
|
default: () => LinkNodeButton_default
|
|
2983
3064
|
});
|
|
2984
|
-
var
|
|
3065
|
+
var import_react38, import_jsx_runtime50, LinkNodeButton, LinkNodeButton_default;
|
|
2985
3066
|
var init_LinkNodeButton = __esm({
|
|
2986
3067
|
"src/components/pageRenderingEngine/nodes/LinkNodeButton.tsx"() {
|
|
2987
3068
|
"use strict";
|
|
2988
3069
|
"use client";
|
|
2989
|
-
|
|
3070
|
+
import_react38 = require("react");
|
|
2990
3071
|
init_Button();
|
|
2991
3072
|
init_ServiceClient();
|
|
2992
|
-
|
|
3073
|
+
init_ToastService();
|
|
3074
|
+
import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2993
3075
|
LinkNodeButton = (props) => {
|
|
2994
3076
|
const { node, dataitem, children, linkText, linkType, linkUrl } = props;
|
|
2995
|
-
const [isLoading, setIsLoading] = (0,
|
|
2996
|
-
const
|
|
2997
|
-
const extractFieldNames = (0, import_react37.useCallback)((template) => {
|
|
3077
|
+
const [isLoading, setIsLoading] = (0, import_react38.useState)(false);
|
|
3078
|
+
const extractFieldNames = (0, import_react38.useCallback)((template) => {
|
|
2998
3079
|
if (!template) return [];
|
|
2999
3080
|
const regex = /\{(\{\})?([a-zA-Z_$][a-zA-Z0-9_$]*)(?:\}\})?\}/g;
|
|
3000
3081
|
const matches = Array.from(template.matchAll(regex));
|
|
3001
3082
|
const fieldNames = matches.map((match) => match[2] || match[1]).filter((name, index, self) => self.indexOf(name) === index);
|
|
3002
3083
|
return fieldNames;
|
|
3003
3084
|
}, []);
|
|
3004
|
-
const replaceTemplateVariables = (0,
|
|
3085
|
+
const replaceTemplateVariables = (0, import_react38.useCallback)((template, responseData) => {
|
|
3005
3086
|
if (!template) return template;
|
|
3006
3087
|
let result = template;
|
|
3007
3088
|
const fieldNames = extractFieldNames(template);
|
|
@@ -3030,7 +3111,7 @@ var init_LinkNodeButton = __esm({
|
|
|
3030
3111
|
}
|
|
3031
3112
|
return result;
|
|
3032
3113
|
}, [props.routeParameters, dataitem, extractFieldNames]);
|
|
3033
|
-
const getNestedValue7 = (0,
|
|
3114
|
+
const getNestedValue7 = (0, import_react38.useCallback)((obj, path) => {
|
|
3034
3115
|
if (!obj || !path) return void 0;
|
|
3035
3116
|
if (obj[path] !== void 0) {
|
|
3036
3117
|
return obj[path];
|
|
@@ -3045,13 +3126,12 @@ var init_LinkNodeButton = __esm({
|
|
|
3045
3126
|
}
|
|
3046
3127
|
return current;
|
|
3047
3128
|
}, []);
|
|
3048
|
-
const onClick = (0,
|
|
3129
|
+
const onClick = (0, import_react38.useCallback)(async (e) => {
|
|
3049
3130
|
if (!node.postUrl) {
|
|
3050
|
-
|
|
3131
|
+
ToastService_default.showError("No POST URL configured for this button");
|
|
3051
3132
|
return;
|
|
3052
3133
|
}
|
|
3053
3134
|
setIsLoading(true);
|
|
3054
|
-
setError(null);
|
|
3055
3135
|
try {
|
|
3056
3136
|
const resolvedPostUrl = replaceTemplateVariables(node.postUrl);
|
|
3057
3137
|
let parsedPayload = {};
|
|
@@ -3070,10 +3150,12 @@ var init_LinkNodeButton = __esm({
|
|
|
3070
3150
|
console.log("API Response:", response);
|
|
3071
3151
|
if (response && !response.isSuccessful) {
|
|
3072
3152
|
const errorMessage = response.message || "API request failed";
|
|
3073
|
-
setError(errorMessage);
|
|
3074
3153
|
setIsLoading(false);
|
|
3075
3154
|
return { isSuccessful: false, message: errorMessage };
|
|
3076
3155
|
}
|
|
3156
|
+
if (response?.message) {
|
|
3157
|
+
ToastService_default.showSuccess(response.message);
|
|
3158
|
+
}
|
|
3077
3159
|
if (response && node.redirectUrl) {
|
|
3078
3160
|
const fieldNames = extractFieldNames(node.redirectUrl);
|
|
3079
3161
|
console.log("Field names in redirect URL:", fieldNames);
|
|
@@ -3111,19 +3193,18 @@ var init_LinkNodeButton = __esm({
|
|
|
3111
3193
|
if (resolvedRedirectUrl && !resolvedRedirectUrl.includes("{")) {
|
|
3112
3194
|
window.location.href = resolvedRedirectUrl;
|
|
3113
3195
|
}
|
|
3114
|
-
} else if (response && !response.result && response.message) {
|
|
3115
|
-
setError(response.message);
|
|
3116
|
-
throw new Error(response.message);
|
|
3117
3196
|
} else if (!response) {
|
|
3118
|
-
|
|
3197
|
+
const errorMessage = "No response from server";
|
|
3198
|
+
setIsLoading(false);
|
|
3199
|
+
return { isSuccessful: false, message: errorMessage };
|
|
3119
3200
|
}
|
|
3120
3201
|
setIsLoading(false);
|
|
3121
|
-
return { isSuccessful: true, response };
|
|
3202
|
+
return { isSuccessful: true, message: response?.message, result: response };
|
|
3122
3203
|
} catch (err) {
|
|
3123
3204
|
console.error("Button API call failed:", err);
|
|
3124
|
-
|
|
3205
|
+
const errorMessage = err.message || "An unexpected error occurred";
|
|
3125
3206
|
setIsLoading(false);
|
|
3126
|
-
return { isSuccessful: false, message:
|
|
3207
|
+
return { isSuccessful: false, message: errorMessage };
|
|
3127
3208
|
}
|
|
3128
3209
|
}, [node.postUrl, node.payload, node.redirectUrl, replaceTemplateVariables, extractFieldNames, getNestedValue7, props.apiBaseUrl, props.session]);
|
|
3129
3210
|
const renderButtonContent = () => {
|
|
@@ -3131,11 +3212,11 @@ var init_LinkNodeButton = __esm({
|
|
|
3131
3212
|
return children;
|
|
3132
3213
|
}
|
|
3133
3214
|
if (linkText) {
|
|
3134
|
-
return /* @__PURE__ */ (0,
|
|
3215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: linkText });
|
|
3135
3216
|
}
|
|
3136
3217
|
return node.title || "Button";
|
|
3137
3218
|
};
|
|
3138
|
-
return /* @__PURE__ */ (0,
|
|
3219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "link-button-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3139
3220
|
Button_default,
|
|
3140
3221
|
{
|
|
3141
3222
|
ButtonType: linkType,
|
|
@@ -3156,9 +3237,9 @@ __export(CopyButton_exports, {
|
|
|
3156
3237
|
default: () => CopyButton
|
|
3157
3238
|
});
|
|
3158
3239
|
function CopyButton({ text }) {
|
|
3159
|
-
const [copied, setCopied] = (0,
|
|
3160
|
-
const timeoutRef = (0,
|
|
3161
|
-
(0,
|
|
3240
|
+
const [copied, setCopied] = (0, import_react45.useState)(false);
|
|
3241
|
+
const timeoutRef = (0, import_react45.useRef)(null);
|
|
3242
|
+
(0, import_react45.useEffect)(() => {
|
|
3162
3243
|
return () => {
|
|
3163
3244
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
3164
3245
|
};
|
|
@@ -3173,13 +3254,13 @@ function CopyButton({ text }) {
|
|
|
3173
3254
|
console.error("Failed to copy: ", err);
|
|
3174
3255
|
}
|
|
3175
3256
|
};
|
|
3176
|
-
return /* @__PURE__ */ (0,
|
|
3257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
3177
3258
|
"button",
|
|
3178
3259
|
{
|
|
3179
3260
|
onClick: handleCopy,
|
|
3180
3261
|
className: "flex gap-1 items-center hover:text-white transition",
|
|
3181
3262
|
children: [
|
|
3182
|
-
/* @__PURE__ */ (0,
|
|
3263
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
3183
3264
|
"svg",
|
|
3184
3265
|
{
|
|
3185
3266
|
width: "16",
|
|
@@ -3187,7 +3268,7 @@ function CopyButton({ text }) {
|
|
|
3187
3268
|
viewBox: "0 0 24 24",
|
|
3188
3269
|
className: "w-4 h-4",
|
|
3189
3270
|
fill: "currentColor",
|
|
3190
|
-
children: /* @__PURE__ */ (0,
|
|
3271
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
3191
3272
|
"path",
|
|
3192
3273
|
{
|
|
3193
3274
|
fillRule: "evenodd",
|
|
@@ -3202,54 +3283,54 @@ function CopyButton({ text }) {
|
|
|
3202
3283
|
}
|
|
3203
3284
|
);
|
|
3204
3285
|
}
|
|
3205
|
-
var
|
|
3286
|
+
var import_react45, import_jsx_runtime60;
|
|
3206
3287
|
var init_CopyButton = __esm({
|
|
3207
3288
|
"src/components/CopyButton.tsx"() {
|
|
3208
3289
|
"use strict";
|
|
3209
3290
|
"use client";
|
|
3210
|
-
|
|
3211
|
-
|
|
3291
|
+
import_react45 = require("react");
|
|
3292
|
+
import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3212
3293
|
}
|
|
3213
3294
|
});
|
|
3214
3295
|
|
|
3215
3296
|
// src/components/IFrameLoaderView.tsx
|
|
3216
|
-
var
|
|
3297
|
+
var import_react48, import_jsx_runtime64, IFrameLoaderView, IFrameLoaderView_default;
|
|
3217
3298
|
var init_IFrameLoaderView = __esm({
|
|
3218
3299
|
"src/components/IFrameLoaderView.tsx"() {
|
|
3219
3300
|
"use strict";
|
|
3220
|
-
|
|
3221
|
-
|
|
3301
|
+
import_react48 = __toESM(require("react"));
|
|
3302
|
+
import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3222
3303
|
IFrameLoaderView = (props) => {
|
|
3223
|
-
return /* @__PURE__ */ (0,
|
|
3224
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
3225
|
-
/* @__PURE__ */ (0,
|
|
3226
|
-
/* @__PURE__ */ (0,
|
|
3227
|
-
/* @__PURE__ */ (0,
|
|
3228
|
-
/* @__PURE__ */ (0,
|
|
3229
|
-
/* @__PURE__ */ (0,
|
|
3304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_react48.default.Fragment, { children: [
|
|
3305
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "mt-4 bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
3306
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
3307
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
3308
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "ml-2", children: [
|
|
3309
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
3310
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
3230
3311
|
] })
|
|
3231
3312
|
] }),
|
|
3232
|
-
/* @__PURE__ */ (0,
|
|
3233
|
-
/* @__PURE__ */ (0,
|
|
3234
|
-
/* @__PURE__ */ (0,
|
|
3235
|
-
/* @__PURE__ */ (0,
|
|
3236
|
-
/* @__PURE__ */ (0,
|
|
3237
|
-
/* @__PURE__ */ (0,
|
|
3238
|
-
/* @__PURE__ */ (0,
|
|
3313
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
3314
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "animate-pulse", children: [
|
|
3315
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3316
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3317
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3318
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3319
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3239
3320
|
] }),
|
|
3240
|
-
/* @__PURE__ */ (0,
|
|
3241
|
-
/* @__PURE__ */ (0,
|
|
3242
|
-
/* @__PURE__ */ (0,
|
|
3243
|
-
/* @__PURE__ */ (0,
|
|
3244
|
-
/* @__PURE__ */ (0,
|
|
3245
|
-
/* @__PURE__ */ (0,
|
|
3321
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "animate-pulse", children: [
|
|
3322
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3323
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3324
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3325
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3326
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3246
3327
|
] }),
|
|
3247
|
-
/* @__PURE__ */ (0,
|
|
3248
|
-
/* @__PURE__ */ (0,
|
|
3249
|
-
/* @__PURE__ */ (0,
|
|
3250
|
-
/* @__PURE__ */ (0,
|
|
3251
|
-
/* @__PURE__ */ (0,
|
|
3252
|
-
/* @__PURE__ */ (0,
|
|
3328
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "animate-pulse", children: [
|
|
3329
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
3330
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
3331
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
3332
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
3333
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
3253
3334
|
] })
|
|
3254
3335
|
] })
|
|
3255
3336
|
] }) }),
|
|
@@ -3265,19 +3346,19 @@ var IframeClient_exports = {};
|
|
|
3265
3346
|
__export(IframeClient_exports, {
|
|
3266
3347
|
default: () => IframeClient_default
|
|
3267
3348
|
});
|
|
3268
|
-
var
|
|
3349
|
+
var import_react49, import_jsx_runtime65, IframeClient, IframeClient_default;
|
|
3269
3350
|
var init_IframeClient = __esm({
|
|
3270
3351
|
"src/components/pageRenderingEngine/nodes/IframeClient.tsx"() {
|
|
3271
3352
|
"use strict";
|
|
3272
3353
|
"use client";
|
|
3273
|
-
|
|
3354
|
+
import_react49 = __toESM(require("react"));
|
|
3274
3355
|
init_IFrameLoaderView();
|
|
3275
|
-
|
|
3356
|
+
import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3276
3357
|
IframeClient = ({ src }) => {
|
|
3277
|
-
const iframeRef = (0,
|
|
3278
|
-
const [iframeHeight, setIframeHeight] = (0,
|
|
3279
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
3280
|
-
(0,
|
|
3358
|
+
const iframeRef = (0, import_react49.useRef)(null);
|
|
3359
|
+
const [iframeHeight, setIframeHeight] = (0, import_react49.useState)("100%");
|
|
3360
|
+
const [isDataFound, setIsDataFound] = (0, import_react49.useState)(null);
|
|
3361
|
+
(0, import_react49.useEffect)(() => {
|
|
3281
3362
|
const handleReceiveMessage = (event) => {
|
|
3282
3363
|
const eventName = event?.data?.eventName;
|
|
3283
3364
|
const payload = event?.data?.payload;
|
|
@@ -3292,7 +3373,7 @@ var init_IframeClient = __esm({
|
|
|
3292
3373
|
window.addEventListener("message", handleReceiveMessage);
|
|
3293
3374
|
return () => window.removeEventListener("message", handleReceiveMessage);
|
|
3294
3375
|
}, []);
|
|
3295
|
-
(0,
|
|
3376
|
+
(0, import_react49.useEffect)(() => {
|
|
3296
3377
|
const handleResize = () => {
|
|
3297
3378
|
if (iframeRef.current) {
|
|
3298
3379
|
iframeRef.current.contentWindow?.postMessage({ eventName: "RESIZE" }, "*");
|
|
@@ -3304,7 +3385,7 @@ var init_IframeClient = __esm({
|
|
|
3304
3385
|
const handleIframeLoad = () => {
|
|
3305
3386
|
setIsDataFound(true);
|
|
3306
3387
|
};
|
|
3307
|
-
return /* @__PURE__ */ (0,
|
|
3388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react49.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(IFrameLoaderView_default, { isDataFound, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3308
3389
|
"iframe",
|
|
3309
3390
|
{
|
|
3310
3391
|
ref: iframeRef,
|
|
@@ -3524,21 +3605,21 @@ var Pagination_exports = {};
|
|
|
3524
3605
|
__export(Pagination_exports, {
|
|
3525
3606
|
default: () => Pagination_default
|
|
3526
3607
|
});
|
|
3527
|
-
var
|
|
3608
|
+
var import_react50, import_jsx_runtime70, Pagination, Pagination_default;
|
|
3528
3609
|
var init_Pagination = __esm({
|
|
3529
3610
|
"src/components/Pagination.tsx"() {
|
|
3530
3611
|
"use strict";
|
|
3531
3612
|
"use client";
|
|
3532
|
-
|
|
3613
|
+
import_react50 = require("react");
|
|
3533
3614
|
init_OdataBuilder();
|
|
3534
3615
|
init_Icon();
|
|
3535
3616
|
init_StyleTypes();
|
|
3536
3617
|
init_InputControlType();
|
|
3537
3618
|
init_Hyperlink();
|
|
3538
|
-
|
|
3619
|
+
import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3539
3620
|
Pagination = (props) => {
|
|
3540
3621
|
const { dataset, path, query, showPageSizeSelector = false, showJumpToPage = false } = props;
|
|
3541
|
-
const builder = (0,
|
|
3622
|
+
const builder = (0, import_react50.useMemo)(() => {
|
|
3542
3623
|
const b = new OdataBuilder(path);
|
|
3543
3624
|
if (query) b.setQuery(query);
|
|
3544
3625
|
return b;
|
|
@@ -3579,7 +3660,7 @@ var init_Pagination = __esm({
|
|
|
3579
3660
|
return range;
|
|
3580
3661
|
};
|
|
3581
3662
|
const paginationRange = getPaginationRange();
|
|
3582
|
-
const PageButton = ({ page, children }) => /* @__PURE__ */ (0,
|
|
3663
|
+
const PageButton = ({ page, children }) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3583
3664
|
Hyperlink,
|
|
3584
3665
|
{
|
|
3585
3666
|
linkType: "Link" /* Link */,
|
|
@@ -3594,9 +3675,9 @@ var init_Pagination = __esm({
|
|
|
3594
3675
|
);
|
|
3595
3676
|
const NavigationButton = ({ page, disabled, children }) => {
|
|
3596
3677
|
if (disabled) {
|
|
3597
|
-
return /* @__PURE__ */ (0,
|
|
3678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border bg-neutral-base cursor-not-allowed", children });
|
|
3598
3679
|
}
|
|
3599
|
-
return /* @__PURE__ */ (0,
|
|
3680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3600
3681
|
Hyperlink,
|
|
3601
3682
|
{
|
|
3602
3683
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center px-2 md:px-3 border transition-colors duration-150",
|
|
@@ -3606,35 +3687,35 @@ var init_Pagination = __esm({
|
|
|
3606
3687
|
);
|
|
3607
3688
|
};
|
|
3608
3689
|
if (totalPages <= 1 && totalItems === 0) return null;
|
|
3609
|
-
return /* @__PURE__ */ (0,
|
|
3610
|
-
/* @__PURE__ */ (0,
|
|
3611
|
-
/* @__PURE__ */ (0,
|
|
3690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "py-6 border-t bg-default", children: [
|
|
3691
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-4", children: [
|
|
3692
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "text-sm", children: [
|
|
3612
3693
|
"Showing ",
|
|
3613
|
-
/* @__PURE__ */ (0,
|
|
3694
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("span", { className: "font-semibold", children: [
|
|
3614
3695
|
startItem,
|
|
3615
3696
|
"-",
|
|
3616
3697
|
endItem
|
|
3617
3698
|
] }),
|
|
3618
3699
|
" ",
|
|
3619
3700
|
"out of ",
|
|
3620
|
-
/* @__PURE__ */ (0,
|
|
3701
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "font-semibold", children: totalItems.toLocaleString() }),
|
|
3621
3702
|
" results"
|
|
3622
3703
|
] }),
|
|
3623
|
-
totalPages > 1 && /* @__PURE__ */ (0,
|
|
3624
|
-
/* @__PURE__ */ (0,
|
|
3704
|
+
totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex items-center space-x-1", children: [
|
|
3705
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
3625
3706
|
NavigationButton,
|
|
3626
3707
|
{
|
|
3627
3708
|
page: activePageNumber - 1,
|
|
3628
3709
|
disabled: activePageNumber === 1,
|
|
3629
3710
|
children: [
|
|
3630
|
-
/* @__PURE__ */ (0,
|
|
3631
|
-
/* @__PURE__ */ (0,
|
|
3711
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 mr-1" }) }),
|
|
3712
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "text-sm", children: "Prev" })
|
|
3632
3713
|
]
|
|
3633
3714
|
}
|
|
3634
3715
|
),
|
|
3635
3716
|
paginationRange.map((item, index) => {
|
|
3636
3717
|
if (item === "...") {
|
|
3637
|
-
return /* @__PURE__ */ (0,
|
|
3718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3638
3719
|
"span",
|
|
3639
3720
|
{
|
|
3640
3721
|
className: "min-w-[20px] md:min-w-[40px] h-10 flex items-center justify-center text-gray-500",
|
|
@@ -3644,23 +3725,23 @@ var init_Pagination = __esm({
|
|
|
3644
3725
|
);
|
|
3645
3726
|
}
|
|
3646
3727
|
const page = item;
|
|
3647
|
-
return /* @__PURE__ */ (0,
|
|
3728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(PageButton, { page, children: page }, page);
|
|
3648
3729
|
}),
|
|
3649
|
-
/* @__PURE__ */ (0,
|
|
3730
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
3650
3731
|
NavigationButton,
|
|
3651
3732
|
{
|
|
3652
3733
|
page: activePageNumber + 1,
|
|
3653
3734
|
disabled: activePageNumber === totalPages,
|
|
3654
3735
|
children: [
|
|
3655
|
-
/* @__PURE__ */ (0,
|
|
3656
|
-
/* @__PURE__ */ (0,
|
|
3736
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "text-sm", children: "Next" }),
|
|
3737
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Icon_default, { name: "chevronRight", className: "w-4 h-4 ml-1" }) })
|
|
3657
3738
|
]
|
|
3658
3739
|
}
|
|
3659
3740
|
)
|
|
3660
3741
|
] }),
|
|
3661
|
-
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0,
|
|
3662
|
-
/* @__PURE__ */ (0,
|
|
3663
|
-
/* @__PURE__ */ (0,
|
|
3742
|
+
showJumpToPage && totalPages > 5 && /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
3743
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "text-sm", children: "Go to:" }),
|
|
3744
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3664
3745
|
"input",
|
|
3665
3746
|
{
|
|
3666
3747
|
type: "number",
|
|
@@ -3681,9 +3762,9 @@ var init_Pagination = __esm({
|
|
|
3681
3762
|
) })
|
|
3682
3763
|
] })
|
|
3683
3764
|
] }),
|
|
3684
|
-
showPageSizeSelector && /* @__PURE__ */ (0,
|
|
3685
|
-
/* @__PURE__ */ (0,
|
|
3686
|
-
/* @__PURE__ */ (0,
|
|
3765
|
+
showPageSizeSelector && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "mt-4 pt-4 border-t bg-default", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
3766
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "text-sm", children: "Show:" }),
|
|
3767
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "flex space-x-1", children: [10, 25, 50, 100].map((size) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3687
3768
|
Hyperlink,
|
|
3688
3769
|
{
|
|
3689
3770
|
className: `
|
|
@@ -3695,7 +3776,7 @@ var init_Pagination = __esm({
|
|
|
3695
3776
|
},
|
|
3696
3777
|
size
|
|
3697
3778
|
)) }),
|
|
3698
|
-
/* @__PURE__ */ (0,
|
|
3779
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "text-sm", children: "per page" })
|
|
3699
3780
|
] }) })
|
|
3700
3781
|
] });
|
|
3701
3782
|
};
|
|
@@ -3708,13 +3789,13 @@ var Slider_exports = {};
|
|
|
3708
3789
|
__export(Slider_exports, {
|
|
3709
3790
|
default: () => Slider_default
|
|
3710
3791
|
});
|
|
3711
|
-
var
|
|
3792
|
+
var import_react51, import_jsx_runtime71, Slider, ArrowButton, ProgressPill, Slider_default;
|
|
3712
3793
|
var init_Slider = __esm({
|
|
3713
3794
|
"src/components/Slider.tsx"() {
|
|
3714
3795
|
"use strict";
|
|
3715
3796
|
"use client";
|
|
3716
|
-
|
|
3717
|
-
|
|
3797
|
+
import_react51 = __toESM(require("react"));
|
|
3798
|
+
import_jsx_runtime71 = require("react/jsx-runtime");
|
|
3718
3799
|
Slider = ({
|
|
3719
3800
|
children,
|
|
3720
3801
|
slidesToShow = 4,
|
|
@@ -3732,13 +3813,13 @@ var init_Slider = __esm({
|
|
|
3732
3813
|
pillStyle = "cumulative",
|
|
3733
3814
|
progressPosition = "bottom"
|
|
3734
3815
|
}) => {
|
|
3735
|
-
const [currentSlide, setCurrentSlide] = (0,
|
|
3736
|
-
const [transition, setTransition] = (0,
|
|
3737
|
-
const [slidesToShowState, setSlidesToShowState] = (0,
|
|
3816
|
+
const [currentSlide, setCurrentSlide] = (0, import_react51.useState)(0);
|
|
3817
|
+
const [transition, setTransition] = (0, import_react51.useState)(true);
|
|
3818
|
+
const [slidesToShowState, setSlidesToShowState] = (0, import_react51.useState)(
|
|
3738
3819
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
3739
3820
|
);
|
|
3740
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
3741
|
-
(0,
|
|
3821
|
+
const [isPlaying, setIsPlaying] = (0, import_react51.useState)(autoplay);
|
|
3822
|
+
(0, import_react51.useEffect)(() => {
|
|
3742
3823
|
if (typeof slidesToShow === "number") return;
|
|
3743
3824
|
const handleResize = () => {
|
|
3744
3825
|
if (window.innerWidth >= 1024) {
|
|
@@ -3753,7 +3834,7 @@ var init_Slider = __esm({
|
|
|
3753
3834
|
window.addEventListener("resize", handleResize);
|
|
3754
3835
|
return () => window.removeEventListener("resize", handleResize);
|
|
3755
3836
|
}, [slidesToShow]);
|
|
3756
|
-
(0,
|
|
3837
|
+
(0, import_react51.useEffect)(() => {
|
|
3757
3838
|
if (!autoplay) return;
|
|
3758
3839
|
const timer = setInterval(() => {
|
|
3759
3840
|
if (isPlaying) {
|
|
@@ -3762,7 +3843,7 @@ var init_Slider = __esm({
|
|
|
3762
3843
|
}, autoplay_speed);
|
|
3763
3844
|
return () => clearInterval(timer);
|
|
3764
3845
|
}, [autoplay, autoplay_speed, currentSlide, isPlaying]);
|
|
3765
|
-
const totalSlides =
|
|
3846
|
+
const totalSlides = import_react51.Children.count(children);
|
|
3766
3847
|
const maxSlide = totalSlides - slidesToShowState;
|
|
3767
3848
|
const nextSlide = () => {
|
|
3768
3849
|
if (currentSlide >= maxSlide) {
|
|
@@ -3807,16 +3888,16 @@ var init_Slider = __esm({
|
|
|
3807
3888
|
}
|
|
3808
3889
|
};
|
|
3809
3890
|
const translateX = -currentSlide * (100 / slidesToShowState);
|
|
3810
|
-
const slides =
|
|
3811
|
-
if (!
|
|
3891
|
+
const slides = import_react51.Children.map(children, (child, index) => {
|
|
3892
|
+
if (!import_react51.default.isValidElement(child)) return null;
|
|
3812
3893
|
const childProps = child.props;
|
|
3813
3894
|
const mergedClassName = `${childProps.className ?? ""} w-full`.trim();
|
|
3814
|
-
return /* @__PURE__ */ (0,
|
|
3895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3815
3896
|
"div",
|
|
3816
3897
|
{
|
|
3817
3898
|
className: `flex-none ${scaleOnHover ? "group hover:z-50" : ""} relative`,
|
|
3818
3899
|
style: { width: `calc(${100 / slidesToShowState}%)`, paddingRight: gap },
|
|
3819
|
-
children: (0,
|
|
3900
|
+
children: (0, import_react51.cloneElement)(child, {
|
|
3820
3901
|
className: mergedClassName
|
|
3821
3902
|
})
|
|
3822
3903
|
},
|
|
@@ -3834,14 +3915,14 @@ var init_Slider = __esm({
|
|
|
3834
3915
|
return "bottom-4";
|
|
3835
3916
|
}
|
|
3836
3917
|
};
|
|
3837
|
-
return /* @__PURE__ */ (0,
|
|
3918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
3838
3919
|
"div",
|
|
3839
3920
|
{
|
|
3840
3921
|
className: `relative w-full overflow-hidden ${className}`,
|
|
3841
3922
|
onMouseEnter: handleMouseEnter,
|
|
3842
3923
|
onMouseLeave: handleMouseLeave,
|
|
3843
3924
|
children: [
|
|
3844
|
-
/* @__PURE__ */ (0,
|
|
3925
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3845
3926
|
"div",
|
|
3846
3927
|
{
|
|
3847
3928
|
className: "flex h-full",
|
|
@@ -3852,18 +3933,18 @@ var init_Slider = __esm({
|
|
|
3852
3933
|
children: slides
|
|
3853
3934
|
}
|
|
3854
3935
|
),
|
|
3855
|
-
show_arrows && /* @__PURE__ */ (0,
|
|
3856
|
-
/* @__PURE__ */ (0,
|
|
3936
|
+
show_arrows && /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
|
|
3937
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3857
3938
|
ArrowButton,
|
|
3858
3939
|
{
|
|
3859
3940
|
direction: "left",
|
|
3860
3941
|
onClick: prevSlide,
|
|
3861
3942
|
visible: infinite_scroll || currentSlide > 0,
|
|
3862
3943
|
className: arrowClassName,
|
|
3863
|
-
children: /* @__PURE__ */ (0,
|
|
3944
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5 8.25 12l7.5-7.5" }) })
|
|
3864
3945
|
}
|
|
3865
3946
|
),
|
|
3866
|
-
/* @__PURE__ */ (0,
|
|
3947
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
3867
3948
|
ArrowButton,
|
|
3868
3949
|
{
|
|
3869
3950
|
direction: "right",
|
|
@@ -3871,13 +3952,13 @@ var init_Slider = __esm({
|
|
|
3871
3952
|
visible: infinite_scroll || currentSlide < maxSlide,
|
|
3872
3953
|
className: arrowClassName,
|
|
3873
3954
|
children: [
|
|
3874
|
-
/* @__PURE__ */ (0,
|
|
3955
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-6 h-6", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m8.25 4.5 7.5 7.5-7.5 7.5" }) }),
|
|
3875
3956
|
" "
|
|
3876
3957
|
]
|
|
3877
3958
|
}
|
|
3878
3959
|
)
|
|
3879
3960
|
] }),
|
|
3880
|
-
show_dots && /* @__PURE__ */ (0,
|
|
3961
|
+
show_dots && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: `absolute left-1/2 -translate-x-1/2 flex justify-center space-x-1.5 ${getProgressPositionClass()}`, children: Array.from({ length: totalSlides }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3881
3962
|
ProgressPill,
|
|
3882
3963
|
{
|
|
3883
3964
|
active: index === currentSlide,
|
|
@@ -3903,7 +3984,7 @@ var init_Slider = __esm({
|
|
|
3903
3984
|
visible,
|
|
3904
3985
|
children,
|
|
3905
3986
|
className = ""
|
|
3906
|
-
}) => /* @__PURE__ */ (0,
|
|
3987
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3907
3988
|
"button",
|
|
3908
3989
|
{
|
|
3909
3990
|
className: `
|
|
@@ -3929,13 +4010,13 @@ var init_Slider = __esm({
|
|
|
3929
4010
|
currentSlide,
|
|
3930
4011
|
totalSlides
|
|
3931
4012
|
}) => {
|
|
3932
|
-
const [progress, setProgress] = (0,
|
|
3933
|
-
(0,
|
|
4013
|
+
const [progress, setProgress] = (0, import_react51.useState)(0);
|
|
4014
|
+
(0, import_react51.useEffect)(() => {
|
|
3934
4015
|
if (active) {
|
|
3935
4016
|
setProgress(0);
|
|
3936
4017
|
}
|
|
3937
4018
|
}, [active, index]);
|
|
3938
|
-
(0,
|
|
4019
|
+
(0, import_react51.useEffect)(() => {
|
|
3939
4020
|
if (!active || !isPlaying) {
|
|
3940
4021
|
if (!active) {
|
|
3941
4022
|
setProgress(0);
|
|
@@ -3990,7 +4071,7 @@ var init_Slider = __esm({
|
|
|
3990
4071
|
const renderProgressBar = () => {
|
|
3991
4072
|
if (style === "modern" && isActive || style === "cumulative" && shouldShowProgress) {
|
|
3992
4073
|
const displayProgress = style === "cumulative" && isFilled ? 100 : progress;
|
|
3993
|
-
return /* @__PURE__ */ (0,
|
|
4074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3994
4075
|
"div",
|
|
3995
4076
|
{
|
|
3996
4077
|
className: `absolute top-0 left-0 h-full rounded-full ${style === "cumulative" && isFilled ? activeClassName || "bg-white" : activeClassName || "bg-white"} transition-all duration-50 ease-linear`,
|
|
@@ -4002,7 +4083,7 @@ var init_Slider = __esm({
|
|
|
4002
4083
|
};
|
|
4003
4084
|
const renderCumulativeFill = () => {
|
|
4004
4085
|
if (style === "cumulative" && isFilled && !isActive) {
|
|
4005
|
-
return /* @__PURE__ */ (0,
|
|
4086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
4006
4087
|
"div",
|
|
4007
4088
|
{
|
|
4008
4089
|
className: `absolute top-0 left-0 h-full rounded-full ${activeClassName || "bg-white"} transition-all duration-300`,
|
|
@@ -4012,7 +4093,7 @@ var init_Slider = __esm({
|
|
|
4012
4093
|
}
|
|
4013
4094
|
return null;
|
|
4014
4095
|
};
|
|
4015
|
-
return /* @__PURE__ */ (0,
|
|
4096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
4016
4097
|
"button",
|
|
4017
4098
|
{
|
|
4018
4099
|
className: `${baseClasses} ${getStyleClasses()}`,
|
|
@@ -4443,13 +4524,13 @@ var InputControl_default = InputControl2;
|
|
|
4443
4524
|
init_InputControlType();
|
|
4444
4525
|
|
|
4445
4526
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
4446
|
-
var
|
|
4527
|
+
var import_react53 = __toESM(require("react"));
|
|
4447
4528
|
|
|
4448
4529
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
4449
|
-
var
|
|
4530
|
+
var import_react40 = __toESM(require("react"));
|
|
4450
4531
|
|
|
4451
4532
|
// src/components/pageRenderingEngine/nodes/TextNode.tsx
|
|
4452
|
-
var
|
|
4533
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
4453
4534
|
var TextNode = (props) => {
|
|
4454
4535
|
function cssStringToJson(cssString) {
|
|
4455
4536
|
const styleObject = {};
|
|
@@ -4504,36 +4585,36 @@ var TextNode = (props) => {
|
|
|
4504
4585
|
});
|
|
4505
4586
|
}
|
|
4506
4587
|
function renderWithLineBreaks(text) {
|
|
4507
|
-
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0,
|
|
4588
|
+
return text.split("\n").map((line, index, arr) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { children: [
|
|
4508
4589
|
line,
|
|
4509
|
-
index < arr.length - 1 && /* @__PURE__ */ (0,
|
|
4590
|
+
index < arr.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("br", {})
|
|
4510
4591
|
] }, index));
|
|
4511
4592
|
}
|
|
4512
4593
|
const displayText = props.linkText ? props.linkText : props.node.text;
|
|
4513
4594
|
const finalText = props.dataitem && props.linkText ? displayText : props.dataitem ? replacePlaceholders(props.node.text, props.dataitem) : props.node.text;
|
|
4514
4595
|
const content = typeof finalText === "string" ? renderWithLineBreaks(finalText) : finalText;
|
|
4515
|
-
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ (0,
|
|
4596
|
+
const formattedContent = props.node.format & 64 ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("sup", { children: content }) : props.node.format & 32 ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("sub", { children: content }) : content;
|
|
4516
4597
|
return (
|
|
4517
4598
|
// @ts-expect-error custom code
|
|
4518
|
-
/* @__PURE__ */ (0,
|
|
4599
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { style: { ...styles }, className: getFormatClass(props.node.format), children: formattedContent })
|
|
4519
4600
|
);
|
|
4520
4601
|
};
|
|
4521
4602
|
var TextNode_default = TextNode;
|
|
4522
4603
|
|
|
4523
4604
|
// src/components/pageRenderingEngine/nodes/LineBreakNode.tsx
|
|
4524
|
-
var
|
|
4605
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4525
4606
|
var LineBreakNode = () => {
|
|
4526
|
-
return /* @__PURE__ */ (0,
|
|
4607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "py-0.5 lg:py-1.5" });
|
|
4527
4608
|
};
|
|
4528
4609
|
var LineBreakNode_default = LineBreakNode;
|
|
4529
4610
|
|
|
4530
4611
|
// src/components/pageRenderingEngine/nodes/LinkNode.tsx
|
|
4531
|
-
var
|
|
4612
|
+
var import_react39 = __toESM(require("react"));
|
|
4532
4613
|
|
|
4533
4614
|
// src/components/pageRenderingEngine/nodes/ImageNode.tsx
|
|
4534
4615
|
init_AssetUtility();
|
|
4535
4616
|
var import_dynamic5 = __toESM(require("next/dynamic"));
|
|
4536
|
-
var
|
|
4617
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4537
4618
|
var HlsPlayer3 = (0, import_dynamic5.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
4538
4619
|
var getNestedValue = (obj, path) => {
|
|
4539
4620
|
if (!obj || !path) return void 0;
|
|
@@ -4566,7 +4647,7 @@ var ImageNode = (props) => {
|
|
|
4566
4647
|
assets = [image];
|
|
4567
4648
|
}
|
|
4568
4649
|
if (assets && assets.length > 0) {
|
|
4569
|
-
return /* @__PURE__ */ (0,
|
|
4650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4570
4651
|
DeviceAssetSelector_default,
|
|
4571
4652
|
{
|
|
4572
4653
|
device: props.device,
|
|
@@ -4607,7 +4688,7 @@ var ImageNode = (props) => {
|
|
|
4607
4688
|
right: "justify-end"
|
|
4608
4689
|
};
|
|
4609
4690
|
const isHls = imageUrl.endsWith(".m3u8");
|
|
4610
|
-
const renderMedia = () => isHls ? /* @__PURE__ */ (0,
|
|
4691
|
+
const renderMedia = () => isHls ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4611
4692
|
HlsPlayer3,
|
|
4612
4693
|
{
|
|
4613
4694
|
assetUrl: imageUrl,
|
|
@@ -4620,7 +4701,7 @@ var ImageNode = (props) => {
|
|
|
4620
4701
|
apiBaseUrl: props.apiBaseUrl,
|
|
4621
4702
|
session: props.session
|
|
4622
4703
|
}
|
|
4623
|
-
) : /* @__PURE__ */ (0,
|
|
4704
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4624
4705
|
"img",
|
|
4625
4706
|
{
|
|
4626
4707
|
style: styles,
|
|
@@ -4633,7 +4714,7 @@ var ImageNode = (props) => {
|
|
|
4633
4714
|
}
|
|
4634
4715
|
);
|
|
4635
4716
|
if (props.node.width) {
|
|
4636
|
-
return /* @__PURE__ */ (0,
|
|
4717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: `flex ${FORMAT_CLASSES2[props.node.format] ?? ""}`, children: renderMedia() });
|
|
4637
4718
|
}
|
|
4638
4719
|
return renderMedia();
|
|
4639
4720
|
};
|
|
@@ -4643,7 +4724,7 @@ var ImageNode_default = ImageNode;
|
|
|
4643
4724
|
init_StyleTypes();
|
|
4644
4725
|
init_Hyperlink();
|
|
4645
4726
|
var import_dynamic6 = __toESM(require("next/dynamic"));
|
|
4646
|
-
var
|
|
4727
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4647
4728
|
var LinkNodeButton2 = (0, import_dynamic6.default)(() => Promise.resolve().then(() => (init_LinkNodeButton(), LinkNodeButton_exports)), {
|
|
4648
4729
|
ssr: false
|
|
4649
4730
|
});
|
|
@@ -4696,13 +4777,13 @@ var LinkNode = (props) => {
|
|
|
4696
4777
|
const isButton = node.isButton === true;
|
|
4697
4778
|
const renderChildren = () => {
|
|
4698
4779
|
if (!node.children || node.children.length === 0) return null;
|
|
4699
|
-
return /* @__PURE__ */ (0,
|
|
4780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx_runtime51.Fragment, { children: node.children.map((childNode, index) => {
|
|
4700
4781
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
4701
4782
|
if (!SelectedNode) {
|
|
4702
4783
|
console.warn("Unknown node type:", childNode.type);
|
|
4703
4784
|
return null;
|
|
4704
4785
|
}
|
|
4705
|
-
return /* @__PURE__ */ (0,
|
|
4786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react39.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4706
4787
|
SelectedNode,
|
|
4707
4788
|
{
|
|
4708
4789
|
node: childNode,
|
|
@@ -4715,15 +4796,15 @@ var LinkNode = (props) => {
|
|
|
4715
4796
|
};
|
|
4716
4797
|
const renderFallback = () => {
|
|
4717
4798
|
if ((!node.children || node.children.length === 0) && linkText) {
|
|
4718
|
-
return /* @__PURE__ */ (0,
|
|
4799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: linkText });
|
|
4719
4800
|
}
|
|
4720
4801
|
if ((!node.children || node.children.length === 0) && !linkText) {
|
|
4721
|
-
return /* @__PURE__ */ (0,
|
|
4802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("br", {});
|
|
4722
4803
|
}
|
|
4723
4804
|
return null;
|
|
4724
4805
|
};
|
|
4725
4806
|
if (isButton) {
|
|
4726
|
-
return /* @__PURE__ */ (0,
|
|
4807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
4727
4808
|
LinkNodeButton2,
|
|
4728
4809
|
{
|
|
4729
4810
|
node,
|
|
@@ -4741,7 +4822,7 @@ var LinkNode = (props) => {
|
|
|
4741
4822
|
}
|
|
4742
4823
|
);
|
|
4743
4824
|
}
|
|
4744
|
-
return /* @__PURE__ */ (0,
|
|
4825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
4745
4826
|
Hyperlink,
|
|
4746
4827
|
{
|
|
4747
4828
|
href: linkUrl || "#",
|
|
@@ -4757,10 +4838,10 @@ var LinkNode = (props) => {
|
|
|
4757
4838
|
var LinkNode_default = LinkNode;
|
|
4758
4839
|
|
|
4759
4840
|
// src/components/pageRenderingEngine/nodes/SVGIconNode.tsx
|
|
4760
|
-
var
|
|
4841
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4761
4842
|
var SVGIconNode = ({ node }) => {
|
|
4762
4843
|
if (!node?.svgCode) return null;
|
|
4763
|
-
return /* @__PURE__ */ (0,
|
|
4844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4764
4845
|
"span",
|
|
4765
4846
|
{
|
|
4766
4847
|
style: {
|
|
@@ -4777,7 +4858,7 @@ var SVGIconNode_default = SVGIconNode;
|
|
|
4777
4858
|
|
|
4778
4859
|
// src/components/pageRenderingEngine/nodes/EquationNode.tsx
|
|
4779
4860
|
var import_katex = __toESM(require("katex"));
|
|
4780
|
-
var
|
|
4861
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4781
4862
|
var EquationNode = ({ node }) => {
|
|
4782
4863
|
const { equation, inline } = node;
|
|
4783
4864
|
let html = "";
|
|
@@ -4792,7 +4873,7 @@ var EquationNode = ({ node }) => {
|
|
|
4792
4873
|
});
|
|
4793
4874
|
}
|
|
4794
4875
|
if (inline) {
|
|
4795
|
-
return /* @__PURE__ */ (0,
|
|
4876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4796
4877
|
"span",
|
|
4797
4878
|
{
|
|
4798
4879
|
className: "katex-inline",
|
|
@@ -4800,7 +4881,7 @@ var EquationNode = ({ node }) => {
|
|
|
4800
4881
|
}
|
|
4801
4882
|
);
|
|
4802
4883
|
}
|
|
4803
|
-
return /* @__PURE__ */ (0,
|
|
4884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
4804
4885
|
"div",
|
|
4805
4886
|
{
|
|
4806
4887
|
className: "katex-block my-3 text-center",
|
|
@@ -4811,7 +4892,7 @@ var EquationNode = ({ node }) => {
|
|
|
4811
4892
|
var EquationNode_default = EquationNode;
|
|
4812
4893
|
|
|
4813
4894
|
// src/components/pageRenderingEngine/nodes/DatafieldNode.tsx
|
|
4814
|
-
var
|
|
4895
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4815
4896
|
function getNestedProperty(obj, path) {
|
|
4816
4897
|
if (!obj || !path) return null;
|
|
4817
4898
|
if (path.includes(".")) {
|
|
@@ -4824,7 +4905,7 @@ function getNestedProperty(obj, path) {
|
|
|
4824
4905
|
}
|
|
4825
4906
|
const value = obj[path];
|
|
4826
4907
|
if (Array.isArray(value)) {
|
|
4827
|
-
return value.map((item, index) => /* @__PURE__ */ (0,
|
|
4908
|
+
return value.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { children: String(item) }, index));
|
|
4828
4909
|
}
|
|
4829
4910
|
return value;
|
|
4830
4911
|
}
|
|
@@ -4885,7 +4966,7 @@ var DatafieldNode = (props) => {
|
|
|
4885
4966
|
const dataType = props.node.dataType;
|
|
4886
4967
|
if (isEmptyValue) return null;
|
|
4887
4968
|
if (dataType === "rawContent") {
|
|
4888
|
-
return /* @__PURE__ */ (0,
|
|
4969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4889
4970
|
PageBodyRenderer_default,
|
|
4890
4971
|
{
|
|
4891
4972
|
rawBody: String(value ?? `@databound[${fieldName}]`),
|
|
@@ -4901,12 +4982,12 @@ var DatafieldNode = (props) => {
|
|
|
4901
4982
|
}
|
|
4902
4983
|
);
|
|
4903
4984
|
}
|
|
4904
|
-
return /* @__PURE__ */ (0,
|
|
4985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4905
4986
|
"span",
|
|
4906
4987
|
{
|
|
4907
4988
|
className: `datafield-node ${props.node.format < Formats.length ? Formats[props.node.format] : ""}`,
|
|
4908
4989
|
style: styles,
|
|
4909
|
-
children: /* @__PURE__ */ (0,
|
|
4990
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4910
4991
|
ViewControl_default,
|
|
4911
4992
|
{
|
|
4912
4993
|
controlType: dataType,
|
|
@@ -4919,7 +5000,7 @@ var DatafieldNode = (props) => {
|
|
|
4919
5000
|
var DatafieldNode_default = DatafieldNode;
|
|
4920
5001
|
|
|
4921
5002
|
// src/components/pageRenderingEngine/nodes/ParagraphNode.tsx
|
|
4922
|
-
var
|
|
5003
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4923
5004
|
var ParagraphNode = (props) => {
|
|
4924
5005
|
const NodeTypes2 = {
|
|
4925
5006
|
["text"]: TextNode_default,
|
|
@@ -4939,9 +5020,9 @@ var ParagraphNode = (props) => {
|
|
|
4939
5020
|
const isInlineOnlyParent = props.parentTag === "summary";
|
|
4940
5021
|
const hasChildren = props.node.children && props.node.children.length > 0;
|
|
4941
5022
|
if (isInlineOnlyParent) {
|
|
4942
|
-
return /* @__PURE__ */ (0,
|
|
5023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_jsx_runtime55.Fragment, { children: hasChildren && props.node.children.map((node, index) => {
|
|
4943
5024
|
const SelectedNode = NodeTypes2[node.type];
|
|
4944
|
-
return /* @__PURE__ */ (0,
|
|
5025
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react40.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
4945
5026
|
SelectedNode,
|
|
4946
5027
|
{
|
|
4947
5028
|
node,
|
|
@@ -4953,10 +5034,10 @@ var ParagraphNode = (props) => {
|
|
|
4953
5034
|
) }, index);
|
|
4954
5035
|
}) });
|
|
4955
5036
|
}
|
|
4956
|
-
return /* @__PURE__ */ (0,
|
|
5037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: " " + formatClasses, children: [
|
|
4957
5038
|
hasChildren && props.node.children.map((node, index) => {
|
|
4958
5039
|
const SelectedNode = NodeTypes2[node.type];
|
|
4959
|
-
return /* @__PURE__ */ (0,
|
|
5040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react40.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
4960
5041
|
SelectedNode,
|
|
4961
5042
|
{
|
|
4962
5043
|
node,
|
|
@@ -4967,14 +5048,14 @@ var ParagraphNode = (props) => {
|
|
|
4967
5048
|
}
|
|
4968
5049
|
) }, index);
|
|
4969
5050
|
}),
|
|
4970
|
-
!hasChildren && /* @__PURE__ */ (0,
|
|
5051
|
+
!hasChildren && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "py-1.5 lg:py-2" })
|
|
4971
5052
|
] });
|
|
4972
5053
|
};
|
|
4973
5054
|
var ParagraphNode_default = ParagraphNode;
|
|
4974
5055
|
|
|
4975
5056
|
// src/components/pageRenderingEngine/nodes/HeadingNode.tsx
|
|
4976
|
-
var
|
|
4977
|
-
var
|
|
5057
|
+
var import_react41 = __toESM(require("react"));
|
|
5058
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
4978
5059
|
var HeadingNode = (props) => {
|
|
4979
5060
|
const NodeTypes2 = {
|
|
4980
5061
|
["text"]: TextNode_default,
|
|
@@ -4990,23 +5071,23 @@ var HeadingNode = (props) => {
|
|
|
4990
5071
|
{
|
|
4991
5072
|
}
|
|
4992
5073
|
const formatClasses = FormatClass[props.node.format] || "";
|
|
4993
|
-
return /* @__PURE__ */ (0,
|
|
5074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_jsx_runtime56.Fragment, { children: import_react41.default.createElement(
|
|
4994
5075
|
HeadingTag,
|
|
4995
5076
|
{ className: formatClasses },
|
|
4996
5077
|
props.node.children && props.node.children.map((childNode, index) => {
|
|
4997
5078
|
const SelectedNode = NodeTypes2[childNode.type];
|
|
4998
|
-
return /* @__PURE__ */ (0,
|
|
5079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react41.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SelectedNode, { node: childNode, dataitem: props.dataitem, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
4999
5080
|
})
|
|
5000
5081
|
) });
|
|
5001
5082
|
};
|
|
5002
5083
|
var HeadingNode_default = HeadingNode;
|
|
5003
5084
|
|
|
5004
5085
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
5005
|
-
var
|
|
5086
|
+
var import_react43 = __toESM(require("react"));
|
|
5006
5087
|
|
|
5007
5088
|
// src/components/pageRenderingEngine/nodes/ListItemNode.tsx
|
|
5008
|
-
var
|
|
5009
|
-
var
|
|
5089
|
+
var import_react42 = __toESM(require("react"));
|
|
5090
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5010
5091
|
var ListItemNode = (props) => {
|
|
5011
5092
|
const NodeTypes2 = {
|
|
5012
5093
|
text: TextNode_default,
|
|
@@ -5023,66 +5104,66 @@ var ListItemNode = (props) => {
|
|
|
5023
5104
|
liStyle.fontSize = match[1].trim();
|
|
5024
5105
|
}
|
|
5025
5106
|
}
|
|
5026
|
-
return /* @__PURE__ */ (0,
|
|
5107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("li", { style: liStyle, children: props.node.children && props.node.children.map((node, index) => {
|
|
5027
5108
|
const SelectedNode = NodeTypes2[node.type];
|
|
5028
5109
|
if (node.type === "linebreak") {
|
|
5029
5110
|
if (!foundFirstBreak) {
|
|
5030
5111
|
foundFirstBreak = true;
|
|
5031
|
-
return /* @__PURE__ */ (0,
|
|
5112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", {}, index);
|
|
5032
5113
|
} else {
|
|
5033
|
-
return /* @__PURE__ */ (0,
|
|
5114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "py-1 lg:py-2" }, index);
|
|
5034
5115
|
}
|
|
5035
5116
|
} else {
|
|
5036
5117
|
foundFirstBreak = false;
|
|
5037
|
-
return /* @__PURE__ */ (0,
|
|
5118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react42.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
5038
5119
|
}
|
|
5039
5120
|
}) });
|
|
5040
5121
|
};
|
|
5041
5122
|
var ListItemNode_default = ListItemNode;
|
|
5042
5123
|
|
|
5043
5124
|
// src/components/pageRenderingEngine/nodes/ListNode.tsx
|
|
5044
|
-
var
|
|
5125
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5045
5126
|
var ListNode = (props) => {
|
|
5046
5127
|
const NodeTypes2 = {
|
|
5047
5128
|
listitem: ListItemNode_default
|
|
5048
5129
|
};
|
|
5049
|
-
return /* @__PURE__ */ (0,
|
|
5050
|
-
props.node.listType == "bullet" && /* @__PURE__ */ (0,
|
|
5130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_react43.default.Fragment, { children: [
|
|
5131
|
+
props.node.listType == "bullet" && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("ul", { children: props.node.children && props.node.children.map((node, index) => {
|
|
5051
5132
|
const SelectedNode = NodeTypes2[node.type];
|
|
5052
|
-
return /* @__PURE__ */ (0,
|
|
5133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react43.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
5053
5134
|
}) }),
|
|
5054
|
-
props.node.listType == "number" && /* @__PURE__ */ (0,
|
|
5135
|
+
props.node.listType == "number" && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("ol", { children: props.node.children && props.node.children.map((node, index) => {
|
|
5055
5136
|
const SelectedNode = NodeTypes2[node.type];
|
|
5056
|
-
return /* @__PURE__ */ (0,
|
|
5137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react43.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SelectedNode, { node, dataitem: props.dataitem, routeParameters: props.routeParameters }) }, index);
|
|
5057
5138
|
}) })
|
|
5058
5139
|
] });
|
|
5059
5140
|
};
|
|
5060
5141
|
var ListNode_default = ListNode;
|
|
5061
5142
|
|
|
5062
5143
|
// src/components/pageRenderingEngine/nodes/QuoteNode.tsx
|
|
5063
|
-
var
|
|
5064
|
-
var
|
|
5144
|
+
var import_react44 = __toESM(require("react"));
|
|
5145
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5065
5146
|
var QuoteNode = (props) => {
|
|
5066
5147
|
const NodeTypes2 = {
|
|
5067
5148
|
["text"]: TextNode_default,
|
|
5068
5149
|
["linebreak"]: LineBreakNode_default,
|
|
5069
5150
|
["link"]: LinkNode_default
|
|
5070
5151
|
};
|
|
5071
|
-
return /* @__PURE__ */ (0,
|
|
5152
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("blockquote", { children: props.node.children && props.node.children.map((node, index) => {
|
|
5072
5153
|
const SelectedNode = NodeTypes2[node.type];
|
|
5073
|
-
return /* @__PURE__ */ (0,
|
|
5154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react44.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectedNode, { node, session: props.session, apiBaseUrl: props.apiBaseUrl, routeParameters: props.routeParameters }) }, index);
|
|
5074
5155
|
}) });
|
|
5075
5156
|
};
|
|
5076
5157
|
var QuoteNode_default = QuoteNode;
|
|
5077
5158
|
|
|
5078
5159
|
// src/components/pageRenderingEngine/nodes/CodeNode.tsx
|
|
5079
|
-
var
|
|
5160
|
+
var import_react46 = __toESM(require("react"));
|
|
5080
5161
|
var import_dynamic7 = __toESM(require("next/dynamic"));
|
|
5081
|
-
var
|
|
5162
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
5082
5163
|
var CopyButton2 = (0, import_dynamic7.default)(() => Promise.resolve().then(() => (init_CopyButton(), CopyButton_exports)), {
|
|
5083
5164
|
ssr: false,
|
|
5084
5165
|
// optional: fallback UI while loading
|
|
5085
|
-
loading: () => /* @__PURE__ */ (0,
|
|
5166
|
+
loading: () => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "text-gray-400 text-xs", children: "Copy" })
|
|
5086
5167
|
});
|
|
5087
5168
|
var CodeNode = (props) => {
|
|
5088
5169
|
const NodeTypes2 = {
|
|
@@ -5096,14 +5177,14 @@ var CodeNode = (props) => {
|
|
|
5096
5177
|
if (node.type === "link") return node.text || node.url || "";
|
|
5097
5178
|
return "";
|
|
5098
5179
|
}).join("") ?? "";
|
|
5099
|
-
return /* @__PURE__ */ (0,
|
|
5100
|
-
/* @__PURE__ */ (0,
|
|
5101
|
-
/* @__PURE__ */ (0,
|
|
5102
|
-
/* @__PURE__ */ (0,
|
|
5180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { children: [
|
|
5181
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex items-center relative bg-neutral-strong px-4 py-3 text-xs font-sans justify-between rounded-t-md ", children: [
|
|
5182
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { children: "Code Snippet" }),
|
|
5183
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(CopyButton2, { text: textContent })
|
|
5103
5184
|
] }),
|
|
5104
|
-
/* @__PURE__ */ (0,
|
|
5185
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("code", { className: "bg-neutral-soft p-4 text-sm whitespace-pre-wrap border border-2 block", children: props.node.children && props.node.children.map((node, index) => {
|
|
5105
5186
|
const SelectedNode = NodeTypes2[node.type];
|
|
5106
|
-
return /* @__PURE__ */ (0,
|
|
5187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_react46.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
5107
5188
|
SelectedNode,
|
|
5108
5189
|
{
|
|
5109
5190
|
node,
|
|
@@ -5118,15 +5199,15 @@ var CodeNode = (props) => {
|
|
|
5118
5199
|
var CodeNode_default = CodeNode;
|
|
5119
5200
|
|
|
5120
5201
|
// src/components/pageRenderingEngine/nodes/HorizontalRuleNode.tsx
|
|
5121
|
-
var
|
|
5202
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
5122
5203
|
var HorizontalRuleNode = () => {
|
|
5123
|
-
return /* @__PURE__ */ (0,
|
|
5204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("hr", {});
|
|
5124
5205
|
};
|
|
5125
5206
|
var HorizontalRuleNode_default = HorizontalRuleNode;
|
|
5126
5207
|
|
|
5127
5208
|
// src/components/pageRenderingEngine/nodes/WidgetNode.tsx
|
|
5128
|
-
var
|
|
5129
|
-
var
|
|
5209
|
+
var import_react47 = __toESM(require("react"));
|
|
5210
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
5130
5211
|
var WidgetNode = (props) => {
|
|
5131
5212
|
const getWidgetParameters = () => {
|
|
5132
5213
|
const widgetInputParameters = {
|
|
@@ -5190,7 +5271,7 @@ var WidgetNode = (props) => {
|
|
|
5190
5271
|
};
|
|
5191
5272
|
const widgetCode = props.node?.widgetCode;
|
|
5192
5273
|
if (!widgetCode) {
|
|
5193
|
-
return /* @__PURE__ */ (0,
|
|
5274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_jsx_runtime63.Fragment, { children: "Invalid widget" });
|
|
5194
5275
|
}
|
|
5195
5276
|
const widgetParams = getWidgetParameters();
|
|
5196
5277
|
const WidgetRenderer = props.widgetRenderer;
|
|
@@ -5199,7 +5280,7 @@ var WidgetNode = (props) => {
|
|
|
5199
5280
|
}
|
|
5200
5281
|
return (
|
|
5201
5282
|
// eslint-disable-next-line react-hooks/static-components
|
|
5202
|
-
/* @__PURE__ */ (0,
|
|
5283
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react47.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
5203
5284
|
WidgetRenderer,
|
|
5204
5285
|
{
|
|
5205
5286
|
params: widgetParams,
|
|
@@ -5216,11 +5297,11 @@ var WidgetNode = (props) => {
|
|
|
5216
5297
|
var WidgetNode_default = WidgetNode;
|
|
5217
5298
|
|
|
5218
5299
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
5219
|
-
var
|
|
5300
|
+
var import_react52 = __toESM(require("react"));
|
|
5220
5301
|
|
|
5221
5302
|
// src/components/pageRenderingEngine/nodes/EmbedNode.tsx
|
|
5222
5303
|
var import_dynamic8 = __toESM(require("next/dynamic"));
|
|
5223
|
-
var
|
|
5304
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
5224
5305
|
var IframeClient2 = (0, import_dynamic8.default)(() => Promise.resolve().then(() => (init_IframeClient(), IframeClient_exports)), {
|
|
5225
5306
|
ssr: false
|
|
5226
5307
|
});
|
|
@@ -5233,7 +5314,7 @@ var EmbedNode = (props) => {
|
|
|
5233
5314
|
} else {
|
|
5234
5315
|
src = props.node.embedSrc;
|
|
5235
5316
|
}
|
|
5236
|
-
return /* @__PURE__ */ (0,
|
|
5317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "aspect-video", children: src && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(IframeClient2, { src }) });
|
|
5237
5318
|
};
|
|
5238
5319
|
var EmbedNode_default = EmbedNode;
|
|
5239
5320
|
|
|
@@ -5412,10 +5493,10 @@ var PathUtility = class {
|
|
|
5412
5493
|
var PathUtility_default = new PathUtility();
|
|
5413
5494
|
|
|
5414
5495
|
// src/components/NoDataFound.tsx
|
|
5415
|
-
var
|
|
5496
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
5416
5497
|
var NoDataFound = () => {
|
|
5417
|
-
return /* @__PURE__ */ (0,
|
|
5418
|
-
/* @__PURE__ */ (0,
|
|
5498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 px-4 text-center bg-neutral-weak", children: [
|
|
5499
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "mb-5", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "mx-auto w-20 h-20 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5419
5500
|
"svg",
|
|
5420
5501
|
{
|
|
5421
5502
|
className: "w-10 h-10",
|
|
@@ -5423,7 +5504,7 @@ var NoDataFound = () => {
|
|
|
5423
5504
|
stroke: "currentColor",
|
|
5424
5505
|
viewBox: "0 0 24 24",
|
|
5425
5506
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5426
|
-
children: /* @__PURE__ */ (0,
|
|
5507
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5427
5508
|
"path",
|
|
5428
5509
|
{
|
|
5429
5510
|
strokeLinecap: "round",
|
|
@@ -5434,8 +5515,8 @@ var NoDataFound = () => {
|
|
|
5434
5515
|
)
|
|
5435
5516
|
}
|
|
5436
5517
|
) }) }),
|
|
5437
|
-
/* @__PURE__ */ (0,
|
|
5438
|
-
/* @__PURE__ */ (0,
|
|
5518
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("h3", { className: "text-lg font-medium mb-2", children: "No data available" }),
|
|
5519
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: " max-w-sm mb-0", children: "No records found. Data may be empty or not available at the moment." })
|
|
5439
5520
|
] });
|
|
5440
5521
|
};
|
|
5441
5522
|
var NoDataFound_default = NoDataFound;
|
|
@@ -5446,7 +5527,7 @@ var import_dynamic10 = __toESM(require("next/dynamic"));
|
|
|
5446
5527
|
// src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
|
|
5447
5528
|
init_AssetUtility();
|
|
5448
5529
|
var import_dynamic9 = __toESM(require("next/dynamic"));
|
|
5449
|
-
var
|
|
5530
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
5450
5531
|
var HlsPlayer4 = (0, import_dynamic9.default)(() => Promise.resolve().then(() => (init_HlsPlayer(), HlsPlayer_exports)), { ssr: false });
|
|
5451
5532
|
var deviceToMediaQuery = (device) => {
|
|
5452
5533
|
switch (device) {
|
|
@@ -5575,8 +5656,8 @@ var ImageGalleryNode = (props) => {
|
|
|
5575
5656
|
right: "justify-end"
|
|
5576
5657
|
};
|
|
5577
5658
|
const formatClasses = FormatClass[props.node.format || ""] || "";
|
|
5578
|
-
return /* @__PURE__ */ (0,
|
|
5579
|
-
hlsSources.length > 0 && /* @__PURE__ */ (0,
|
|
5659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(import_jsx_runtime68.Fragment, { children: [
|
|
5660
|
+
hlsSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5580
5661
|
HlsPlayer4,
|
|
5581
5662
|
{
|
|
5582
5663
|
sources: hlsSources,
|
|
@@ -5591,7 +5672,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5591
5672
|
styles: hlsStyles
|
|
5592
5673
|
}
|
|
5593
5674
|
) }),
|
|
5594
|
-
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0,
|
|
5675
|
+
(staticFallback || staticSources.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, { children: staticFallback ? /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("picture", { children: [
|
|
5595
5676
|
DEVICE_ORDER.map((deviceKey) => {
|
|
5596
5677
|
const match = staticSources.find(
|
|
5597
5678
|
(img) => img.device === deviceKey
|
|
@@ -5603,7 +5684,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5603
5684
|
if (!srcUrl) {
|
|
5604
5685
|
return null;
|
|
5605
5686
|
}
|
|
5606
|
-
return /* @__PURE__ */ (0,
|
|
5687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5607
5688
|
"source",
|
|
5608
5689
|
{
|
|
5609
5690
|
media: deviceToMediaQuery(match.device),
|
|
@@ -5627,7 +5708,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5627
5708
|
if (img.borderRadius) {
|
|
5628
5709
|
styles.borderRadius = img.borderRadius;
|
|
5629
5710
|
}
|
|
5630
|
-
return /* @__PURE__ */ (0,
|
|
5711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5631
5712
|
"img",
|
|
5632
5713
|
{
|
|
5633
5714
|
loading: "lazy",
|
|
@@ -5642,7 +5723,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5642
5723
|
})()
|
|
5643
5724
|
] }) : (
|
|
5644
5725
|
/* Case 2: Only device-specific images exist */
|
|
5645
|
-
/* @__PURE__ */ (0,
|
|
5726
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_jsx_runtime68.Fragment, { children: staticSources.map((img, index) => {
|
|
5646
5727
|
const imageUrl = resolveImageUrl(img);
|
|
5647
5728
|
if (!imageUrl) {
|
|
5648
5729
|
return null;
|
|
@@ -5668,7 +5749,7 @@ var ImageGalleryNode = (props) => {
|
|
|
5668
5749
|
default:
|
|
5669
5750
|
display = "block";
|
|
5670
5751
|
}
|
|
5671
|
-
return /* @__PURE__ */ (0,
|
|
5752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
5672
5753
|
"img",
|
|
5673
5754
|
{
|
|
5674
5755
|
loading: "lazy",
|
|
@@ -5809,28 +5890,28 @@ var shouldRenderContainer = (node, dataItem, session) => {
|
|
|
5809
5890
|
|
|
5810
5891
|
// src/components/pageRenderingEngine/nodes/DocumentNode.tsx
|
|
5811
5892
|
init_AssetUtility();
|
|
5812
|
-
var
|
|
5893
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
5813
5894
|
var getNestedValue5 = (obj, path) => {
|
|
5814
5895
|
if (!obj || !path) return void 0;
|
|
5815
5896
|
return path.split(".").reduce((current, key) => {
|
|
5816
5897
|
return current && current[key] !== void 0 ? current[key] : void 0;
|
|
5817
5898
|
}, obj);
|
|
5818
5899
|
};
|
|
5819
|
-
var PdfIcon = () => /* @__PURE__ */ (0,
|
|
5900
|
+
var PdfIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5820
5901
|
"svg",
|
|
5821
5902
|
{
|
|
5822
5903
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5823
5904
|
viewBox: "0 0 48 48",
|
|
5824
5905
|
className: "w-10 h-10",
|
|
5825
5906
|
children: [
|
|
5826
|
-
/* @__PURE__ */ (0,
|
|
5907
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5827
5908
|
"path",
|
|
5828
5909
|
{
|
|
5829
5910
|
fill: "#e53935",
|
|
5830
5911
|
d: "M38,42H10c-2.209,0-4-1.791-4-4V10c0-2.209,1.791-4,4-4h28c2.209,0,4,1.791,4,4v28 C42,40.209,40.209,42,38,42z"
|
|
5831
5912
|
}
|
|
5832
5913
|
),
|
|
5833
|
-
/* @__PURE__ */ (0,
|
|
5914
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5834
5915
|
"path",
|
|
5835
5916
|
{
|
|
5836
5917
|
fill: "#fff",
|
|
@@ -5840,55 +5921,55 @@ var PdfIcon = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
|
5840
5921
|
]
|
|
5841
5922
|
}
|
|
5842
5923
|
);
|
|
5843
|
-
var ExcelIcon = () => /* @__PURE__ */ (0,
|
|
5924
|
+
var ExcelIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5844
5925
|
"svg",
|
|
5845
5926
|
{
|
|
5846
5927
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5847
5928
|
viewBox: "0 0 48 48",
|
|
5848
5929
|
className: "w-10 h-10",
|
|
5849
5930
|
children: [
|
|
5850
|
-
/* @__PURE__ */ (0,
|
|
5931
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5851
5932
|
"path",
|
|
5852
5933
|
{
|
|
5853
5934
|
fill: "#169154",
|
|
5854
5935
|
d: "M29,6H15.744C14.781,6,14,6.781,14,7.744v7.259h15V6z"
|
|
5855
5936
|
}
|
|
5856
5937
|
),
|
|
5857
|
-
/* @__PURE__ */ (0,
|
|
5938
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5858
5939
|
"path",
|
|
5859
5940
|
{
|
|
5860
5941
|
fill: "#18482a",
|
|
5861
5942
|
d: "M14,33.054v7.202C14,41.219,14.781,42,15.743,42H29v-8.946H14z"
|
|
5862
5943
|
}
|
|
5863
5944
|
),
|
|
5864
|
-
/* @__PURE__ */ (0,
|
|
5865
|
-
/* @__PURE__ */ (0,
|
|
5866
|
-
/* @__PURE__ */ (0,
|
|
5867
|
-
/* @__PURE__ */ (0,
|
|
5945
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { fill: "#0c8045", d: "M14 15.003H29V24.005000000000003H14z" }),
|
|
5946
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { fill: "#17472a", d: "M14 24.005H29V33.055H14z" }),
|
|
5947
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("g", { children: [
|
|
5948
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5868
5949
|
"path",
|
|
5869
5950
|
{
|
|
5870
5951
|
fill: "#29c27f",
|
|
5871
5952
|
d: "M42.256,6H29v9.003h15V7.744C44,6.781,43.219,6,42.256,6z"
|
|
5872
5953
|
}
|
|
5873
5954
|
),
|
|
5874
|
-
/* @__PURE__ */ (0,
|
|
5955
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5875
5956
|
"path",
|
|
5876
5957
|
{
|
|
5877
5958
|
fill: "#27663f",
|
|
5878
5959
|
d: "M29,33.054V42h13.257C43.219,42,44,41.219,44,40.257v-7.202H29z"
|
|
5879
5960
|
}
|
|
5880
5961
|
),
|
|
5881
|
-
/* @__PURE__ */ (0,
|
|
5882
|
-
/* @__PURE__ */ (0,
|
|
5962
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { fill: "#19ac65", d: "M29 15.003H44V24.005000000000003H29z" }),
|
|
5963
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { fill: "#129652", d: "M29 24.005H44V33.055H29z" })
|
|
5883
5964
|
] }),
|
|
5884
|
-
/* @__PURE__ */ (0,
|
|
5965
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5885
5966
|
"path",
|
|
5886
5967
|
{
|
|
5887
5968
|
fill: "#0c7238",
|
|
5888
5969
|
d: "M22.319,34H5.681C4.753,34,4,33.247,4,32.319V15.681C4,14.753,4.753,14,5.681,14h16.638 C23.247,14,24,14.753,24,15.681v16.638C24,33.247,23.247,34,22.319,34z"
|
|
5889
5970
|
}
|
|
5890
5971
|
),
|
|
5891
|
-
/* @__PURE__ */ (0,
|
|
5972
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5892
5973
|
"path",
|
|
5893
5974
|
{
|
|
5894
5975
|
fill: "#fff",
|
|
@@ -5898,7 +5979,7 @@ var ExcelIcon = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
|
5898
5979
|
]
|
|
5899
5980
|
}
|
|
5900
5981
|
);
|
|
5901
|
-
var WordIcon = () => /* @__PURE__ */ (0,
|
|
5982
|
+
var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5902
5983
|
"svg",
|
|
5903
5984
|
{
|
|
5904
5985
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5906,14 +5987,14 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
|
5906
5987
|
className: "w-10 h-10",
|
|
5907
5988
|
baseProfile: "basic",
|
|
5908
5989
|
children: [
|
|
5909
|
-
/* @__PURE__ */ (0,
|
|
5990
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5910
5991
|
"path",
|
|
5911
5992
|
{
|
|
5912
5993
|
fill: "#283593",
|
|
5913
5994
|
d: "M9,33.595l14.911-18.706L41,26v13.306C41,41.346,39.346,43,37.306,43H15.332 C11.835,43,9,40.164,9,36.667C9,36.667,9,33.595,9,33.595z"
|
|
5914
5995
|
}
|
|
5915
5996
|
),
|
|
5916
|
-
/* @__PURE__ */ (0,
|
|
5997
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5917
5998
|
"linearGradient",
|
|
5918
5999
|
{
|
|
5919
6000
|
id: "qh2LT5tehRDFkLLfb-odWa",
|
|
@@ -5924,19 +6005,19 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
|
5924
6005
|
gradientTransform: "translate(0 -339.89)",
|
|
5925
6006
|
gradientUnits: "userSpaceOnUse",
|
|
5926
6007
|
children: [
|
|
5927
|
-
/* @__PURE__ */ (0,
|
|
5928
|
-
/* @__PURE__ */ (0,
|
|
6008
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("stop", { offset: "0", "stop-color": "#66c0ff" }),
|
|
6009
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("stop", { offset: ".26", "stop-color": "#0094f0" })
|
|
5929
6010
|
]
|
|
5930
6011
|
}
|
|
5931
6012
|
),
|
|
5932
|
-
/* @__PURE__ */ (0,
|
|
6013
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5933
6014
|
"path",
|
|
5934
6015
|
{
|
|
5935
6016
|
fill: "url(#qh2LT5tehRDFkLLfb-odWa)",
|
|
5936
6017
|
d: "M9,20.208c0-2.624,2.126-4.75,4.749-4.75h21.857L41,12.778v13.527 C41,28.346,39.346,30,37.306,30H15.332C11.835,30,9,32.836,9,36.333L9,20.208L9,20.208z"
|
|
5937
6018
|
}
|
|
5938
6019
|
),
|
|
5939
|
-
/* @__PURE__ */ (0,
|
|
6020
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5940
6021
|
"path",
|
|
5941
6022
|
{
|
|
5942
6023
|
fill: "#1e88e5",
|
|
@@ -5944,21 +6025,21 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
|
5944
6025
|
d: "M9,20.208c0-2.624,2.126-4.75,4.749-4.75h21.857L41,12.778v13.527 C41,28.346,39.346,30,37.306,30H15.332C11.835,30,9,32.836,9,36.333L9,20.208L9,20.208z"
|
|
5945
6026
|
}
|
|
5946
6027
|
),
|
|
5947
|
-
/* @__PURE__ */ (0,
|
|
6028
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5948
6029
|
"path",
|
|
5949
6030
|
{
|
|
5950
6031
|
fill: "#00e5ff",
|
|
5951
6032
|
d: "M9,10.333C9,6.836,11.835,4,15.332,4h21.975C39.346,4,41,5.654,41,7.694v5.611 C41,15.346,39.346,17,37.306,17H15.332C11.835,17,9,19.836,9,23.333C9,23.333,9,10.333,9,10.333z"
|
|
5952
6033
|
}
|
|
5953
6034
|
),
|
|
5954
|
-
/* @__PURE__ */ (0,
|
|
6035
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5955
6036
|
"path",
|
|
5956
6037
|
{
|
|
5957
6038
|
fill: "#1565c0",
|
|
5958
6039
|
d: "M7.5,23h10c1.933,0,3.5,1.567,3.5,3.5v10c0,1.933-1.567,3.5-3.5,3.5h-10C5.567,40,4,38.433,4,36.5 v-10C4,24.567,5.567,23,7.5,23z"
|
|
5959
6040
|
}
|
|
5960
6041
|
),
|
|
5961
|
-
/* @__PURE__ */ (0,
|
|
6042
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5962
6043
|
"path",
|
|
5963
6044
|
{
|
|
5964
6045
|
fill: "#fff",
|
|
@@ -5968,42 +6049,42 @@ var WordIcon = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
|
5968
6049
|
]
|
|
5969
6050
|
}
|
|
5970
6051
|
);
|
|
5971
|
-
var StandardIcon = () => /* @__PURE__ */ (0,
|
|
6052
|
+
var StandardIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5972
6053
|
"svg",
|
|
5973
6054
|
{
|
|
5974
6055
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5975
6056
|
viewBox: "0 0 48 48",
|
|
5976
6057
|
className: "w-10 h-10",
|
|
5977
6058
|
children: [
|
|
5978
|
-
/* @__PURE__ */ (0,
|
|
5979
|
-
/* @__PURE__ */ (0,
|
|
6059
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
6060
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" })
|
|
5980
6061
|
]
|
|
5981
6062
|
}
|
|
5982
6063
|
);
|
|
5983
|
-
var PowerPointIcon = () => /* @__PURE__ */ (0,
|
|
6064
|
+
var PowerPointIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
5984
6065
|
"svg",
|
|
5985
6066
|
{
|
|
5986
6067
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5987
6068
|
viewBox: "0 0 48 48",
|
|
5988
6069
|
className: "w-10 h-10",
|
|
5989
6070
|
children: [
|
|
5990
|
-
/* @__PURE__ */ (0,
|
|
6071
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
5991
6072
|
"path",
|
|
5992
6073
|
{
|
|
5993
6074
|
fill: "#dc4c2c",
|
|
5994
6075
|
d: "M8,24c0,9.941,8.059,18,18,18s18-8.059,18-18H26H8z"
|
|
5995
6076
|
}
|
|
5996
6077
|
),
|
|
5997
|
-
/* @__PURE__ */ (0,
|
|
5998
|
-
/* @__PURE__ */ (0,
|
|
5999
|
-
/* @__PURE__ */ (0,
|
|
6078
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { fill: "#f7a278", d: "M26,6v18h18C44,14.059,35.941,6,26,6z" }),
|
|
6079
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { fill: "#c06346", d: "M26,6C16.059,6,8,14.059,8,24h18V6z" }),
|
|
6080
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6000
6081
|
"path",
|
|
6001
6082
|
{
|
|
6002
6083
|
fill: "#9b341f",
|
|
6003
6084
|
d: "M22.319,34H5.681C4.753,34,4,33.247,4,32.319V15.681C4,14.753,4.753,14,5.681,14h16.638 C23.247,14,24,14.753,24,15.681v16.638C24,33.247,23.247,34,22.319,34z"
|
|
6004
6085
|
}
|
|
6005
6086
|
),
|
|
6006
|
-
/* @__PURE__ */ (0,
|
|
6087
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6007
6088
|
"path",
|
|
6008
6089
|
{
|
|
6009
6090
|
fill: "#fff",
|
|
@@ -6013,16 +6094,16 @@ var PowerPointIcon = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
|
6013
6094
|
]
|
|
6014
6095
|
}
|
|
6015
6096
|
);
|
|
6016
|
-
var TextIcon = () => /* @__PURE__ */ (0,
|
|
6097
|
+
var TextIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
6017
6098
|
"svg",
|
|
6018
6099
|
{
|
|
6019
6100
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6020
6101
|
viewBox: "0 0 48 48",
|
|
6021
6102
|
className: "w-10 h-10",
|
|
6022
6103
|
children: [
|
|
6023
|
-
/* @__PURE__ */ (0,
|
|
6024
|
-
/* @__PURE__ */ (0,
|
|
6025
|
-
/* @__PURE__ */ (0,
|
|
6104
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { fill: "#90CAF9", d: "M40 45L8 45 8 3 30 3 40 13z" }),
|
|
6105
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { fill: "#E1F5FE", d: "M38.5 14L29 14 29 4.5z" }),
|
|
6106
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6026
6107
|
"path",
|
|
6027
6108
|
{
|
|
6028
6109
|
fill: "#1976D2",
|
|
@@ -6032,7 +6113,7 @@ var TextIcon = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
|
6032
6113
|
]
|
|
6033
6114
|
}
|
|
6034
6115
|
);
|
|
6035
|
-
var ArchiveIcon = () => /* @__PURE__ */ (0,
|
|
6116
|
+
var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
6036
6117
|
"svg",
|
|
6037
6118
|
{
|
|
6038
6119
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6042,14 +6123,14 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
|
6042
6123
|
version: "1.0",
|
|
6043
6124
|
className: "w-10 h-10",
|
|
6044
6125
|
children: [
|
|
6045
|
-
/* @__PURE__ */ (0,
|
|
6126
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("clipPath", { id: "273d29c8a6", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6046
6127
|
"path",
|
|
6047
6128
|
{
|
|
6048
6129
|
d: "M 8.90625 0 L 65.90625 0 L 65.90625 75 L 8.90625 75 Z M 8.90625 0 ",
|
|
6049
6130
|
"clip-rule": "nonzero"
|
|
6050
6131
|
}
|
|
6051
6132
|
) }) }),
|
|
6052
|
-
/* @__PURE__ */ (0,
|
|
6133
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("g", { "clip-path": "url(#273d29c8a6)", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6053
6134
|
"path",
|
|
6054
6135
|
{
|
|
6055
6136
|
fill: "#ff9100",
|
|
@@ -6058,7 +6139,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
|
6058
6139
|
"fill-rule": "nonzero"
|
|
6059
6140
|
}
|
|
6060
6141
|
) }),
|
|
6061
|
-
/* @__PURE__ */ (0,
|
|
6142
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6062
6143
|
"path",
|
|
6063
6144
|
{
|
|
6064
6145
|
fill: "#fbe9e7",
|
|
@@ -6067,7 +6148,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
|
6067
6148
|
"fill-rule": "nonzero"
|
|
6068
6149
|
}
|
|
6069
6150
|
),
|
|
6070
|
-
/* @__PURE__ */ (0,
|
|
6151
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6071
6152
|
"path",
|
|
6072
6153
|
{
|
|
6073
6154
|
fill: "#ffe0b2",
|
|
@@ -6076,7 +6157,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
|
6076
6157
|
"fill-rule": "nonzero"
|
|
6077
6158
|
}
|
|
6078
6159
|
),
|
|
6079
|
-
/* @__PURE__ */ (0,
|
|
6160
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6080
6161
|
"path",
|
|
6081
6162
|
{
|
|
6082
6163
|
fill: "#ffe0b2",
|
|
@@ -6085,7 +6166,7 @@ var ArchiveIcon = () => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
|
6085
6166
|
"fill-rule": "nonzero"
|
|
6086
6167
|
}
|
|
6087
6168
|
),
|
|
6088
|
-
/* @__PURE__ */ (0,
|
|
6169
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6089
6170
|
"path",
|
|
6090
6171
|
{
|
|
6091
6172
|
fill: "#ffe0b2",
|
|
@@ -6161,8 +6242,8 @@ var DocumentNode = (props) => {
|
|
|
6161
6242
|
}
|
|
6162
6243
|
}
|
|
6163
6244
|
if (documents.length === 0) {
|
|
6164
|
-
return /* @__PURE__ */ (0,
|
|
6165
|
-
/* @__PURE__ */ (0,
|
|
6245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_jsx_runtime69.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "py-4 px-2 bg-neutral-weak border rounded text-center flex flex-col gap-2", children: [
|
|
6246
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "mx-auto w-10 h-10 rounded-full flex items-center justify-center bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6166
6247
|
"svg",
|
|
6167
6248
|
{
|
|
6168
6249
|
className: "w-5 h-5",
|
|
@@ -6170,7 +6251,7 @@ var DocumentNode = (props) => {
|
|
|
6170
6251
|
stroke: "currentColor",
|
|
6171
6252
|
viewBox: "0 0 24 24",
|
|
6172
6253
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6173
|
-
children: /* @__PURE__ */ (0,
|
|
6254
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6174
6255
|
"path",
|
|
6175
6256
|
{
|
|
6176
6257
|
strokeLinecap: "round",
|
|
@@ -6181,11 +6262,11 @@ var DocumentNode = (props) => {
|
|
|
6181
6262
|
)
|
|
6182
6263
|
}
|
|
6183
6264
|
) }),
|
|
6184
|
-
/* @__PURE__ */ (0,
|
|
6185
|
-
/* @__PURE__ */ (0,
|
|
6265
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "text-sm font-medium", children: "No documents found" }),
|
|
6266
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "text-xs", children: "No records found. Data may be empty or not available at the moment." })
|
|
6186
6267
|
] }) });
|
|
6187
6268
|
}
|
|
6188
|
-
return /* @__PURE__ */ (0,
|
|
6269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "", children: documents.map((doc, index) => {
|
|
6189
6270
|
const documentUrl = AssetUtility_default.resolveUrl(
|
|
6190
6271
|
props.assetBaseUrl,
|
|
6191
6272
|
doc.assetUrl
|
|
@@ -6203,16 +6284,16 @@ var DocumentNode = (props) => {
|
|
|
6203
6284
|
}
|
|
6204
6285
|
}
|
|
6205
6286
|
const { Icon: Icon2, extLabel } = getFileDetails(documentUrl);
|
|
6206
|
-
return /* @__PURE__ */ (0,
|
|
6287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
6207
6288
|
"div",
|
|
6208
6289
|
{
|
|
6209
6290
|
className: `flex items-center justify-between py-4 bg-default gap-4 ${index !== 0 ? "border-t" : ""}`,
|
|
6210
6291
|
children: [
|
|
6211
|
-
/* @__PURE__ */ (0,
|
|
6212
|
-
/* @__PURE__ */ (0,
|
|
6213
|
-
/* @__PURE__ */ (0,
|
|
6292
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center space-x-4", children: [
|
|
6293
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "flex items-center justify-center p-2 rounded bg-neutral-soft", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Icon2, {}) }),
|
|
6294
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "flex items-baseline space-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("h4", { className: "text-base font-semibold", children: documentTitle }) })
|
|
6214
6295
|
] }),
|
|
6215
|
-
/* @__PURE__ */ (0,
|
|
6296
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
6216
6297
|
"a",
|
|
6217
6298
|
{
|
|
6218
6299
|
href: documentUrl,
|
|
@@ -6220,7 +6301,7 @@ var DocumentNode = (props) => {
|
|
|
6220
6301
|
rel: "noopener noreferrer",
|
|
6221
6302
|
className: "inline-flex items-center px-4 py-2 text-sm font-medium bg-default border rounded focus:outline-none focus:ring-2 focus:ring-offset-2 transition-colors",
|
|
6222
6303
|
children: [
|
|
6223
|
-
/* @__PURE__ */ (0,
|
|
6304
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
6224
6305
|
"svg",
|
|
6225
6306
|
{
|
|
6226
6307
|
className: "w-4 h-4 mr-2",
|
|
@@ -6228,7 +6309,7 @@ var DocumentNode = (props) => {
|
|
|
6228
6309
|
stroke: "currentColor",
|
|
6229
6310
|
viewBox: "0 0 24 24",
|
|
6230
6311
|
children: [
|
|
6231
|
-
/* @__PURE__ */ (0,
|
|
6312
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6232
6313
|
"path",
|
|
6233
6314
|
{
|
|
6234
6315
|
strokeLinecap: "round",
|
|
@@ -6237,7 +6318,7 @@ var DocumentNode = (props) => {
|
|
|
6237
6318
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
|
6238
6319
|
}
|
|
6239
6320
|
),
|
|
6240
|
-
/* @__PURE__ */ (0,
|
|
6321
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6241
6322
|
"path",
|
|
6242
6323
|
{
|
|
6243
6324
|
strokeLinecap: "round",
|
|
@@ -6262,7 +6343,7 @@ var DocumentNode = (props) => {
|
|
|
6262
6343
|
var DocumentNode_default = DocumentNode;
|
|
6263
6344
|
|
|
6264
6345
|
// src/components/pageRenderingEngine/nodes/DivContainer.tsx
|
|
6265
|
-
var
|
|
6346
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
6266
6347
|
var Pagination2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_Pagination(), Pagination_exports)), { ssr: true });
|
|
6267
6348
|
var Slider2 = (0, import_dynamic10.default)(() => Promise.resolve().then(() => (init_Slider(), Slider_exports)), {
|
|
6268
6349
|
ssr: false
|
|
@@ -6516,7 +6597,7 @@ var DivContainer = async (props) => {
|
|
|
6516
6597
|
response = await serviceClient.get(endpoint);
|
|
6517
6598
|
result = response?.result;
|
|
6518
6599
|
if (dataBindingProperties.showNoResultsMessage && (result === void 0 || result.length == 0)) {
|
|
6519
|
-
return /* @__PURE__ */ (0,
|
|
6600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(NoDataFound_default, {});
|
|
6520
6601
|
}
|
|
6521
6602
|
if (dataBindingProperties.childCollectionName && props.dataitem) {
|
|
6522
6603
|
childCollectionData = getNestedValue6(
|
|
@@ -6536,7 +6617,7 @@ var DivContainer = async (props) => {
|
|
|
6536
6617
|
}
|
|
6537
6618
|
const SelectedNode = NodeTypes2[node.type];
|
|
6538
6619
|
if (!SelectedNode) return null;
|
|
6539
|
-
return /* @__PURE__ */ (0,
|
|
6620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react52.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6540
6621
|
SelectedNode,
|
|
6541
6622
|
{
|
|
6542
6623
|
node,
|
|
@@ -6668,14 +6749,14 @@ var DivContainer = async (props) => {
|
|
|
6668
6749
|
props.node.bgClass,
|
|
6669
6750
|
noLinkColor && "no-link-color"
|
|
6670
6751
|
].filter(Boolean).join(" ");
|
|
6671
|
-
return /* @__PURE__ */ (0,
|
|
6672
|
-
/* @__PURE__ */ (0,
|
|
6752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_react52.default.Fragment, { children: [
|
|
6753
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6673
6754
|
"style",
|
|
6674
6755
|
{
|
|
6675
6756
|
dangerouslySetInnerHTML: { __html: cssResult.css + animationCSS }
|
|
6676
6757
|
}
|
|
6677
6758
|
),
|
|
6678
|
-
/* @__PURE__ */ (0,
|
|
6759
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react52.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6679
6760
|
Wrapper,
|
|
6680
6761
|
{
|
|
6681
6762
|
id: guid,
|
|
@@ -6689,11 +6770,11 @@ var DivContainer = async (props) => {
|
|
|
6689
6770
|
item,
|
|
6690
6771
|
idx,
|
|
6691
6772
|
props.href ? void 0 : item?.links?.view
|
|
6692
|
-
)?.map((child, i) => /* @__PURE__ */ (0,
|
|
6773
|
+
)?.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react52.default.Fragment, { children: child }, i)) : renderChildren(props.node.children, props, item, idx)
|
|
6693
6774
|
)
|
|
6694
6775
|
}
|
|
6695
6776
|
) }),
|
|
6696
|
-
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0,
|
|
6777
|
+
dataBindingProperties && props.node.dataBinding.enablePagination && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6697
6778
|
Pagination2,
|
|
6698
6779
|
{
|
|
6699
6780
|
path: props.path,
|
|
@@ -6706,7 +6787,7 @@ var DivContainer = async (props) => {
|
|
|
6706
6787
|
var DivContainer_default = DivContainer;
|
|
6707
6788
|
|
|
6708
6789
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
6709
|
-
var
|
|
6790
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
6710
6791
|
var NodeTypes = {
|
|
6711
6792
|
["paragraph"]: ParagraphNode_default,
|
|
6712
6793
|
["heading"]: HeadingNode_default,
|
|
@@ -6743,14 +6824,14 @@ var PageBodyRenderer = (props) => {
|
|
|
6743
6824
|
}
|
|
6744
6825
|
return true;
|
|
6745
6826
|
};
|
|
6746
|
-
return /* @__PURE__ */ (0,
|
|
6827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react53.default.Fragment, { children: rootNode && rootNode?.children?.map((node, index) => {
|
|
6747
6828
|
{
|
|
6748
6829
|
}
|
|
6749
6830
|
const SelectedNode = NodeTypes[node.type];
|
|
6750
6831
|
if (!shouldRenderNode(node)) {
|
|
6751
6832
|
return null;
|
|
6752
6833
|
}
|
|
6753
|
-
return /* @__PURE__ */ (0,
|
|
6834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react53.default.Fragment, { children: SelectedNode && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react53.default.Fragment, { children: node.type == "layout-container" ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react53.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6754
6835
|
SelectedNode,
|
|
6755
6836
|
{
|
|
6756
6837
|
node,
|
|
@@ -6766,7 +6847,7 @@ var PageBodyRenderer = (props) => {
|
|
|
6766
6847
|
device: props.device,
|
|
6767
6848
|
widgetRenderer: props.widgetRenderer
|
|
6768
6849
|
}
|
|
6769
|
-
) }) : /* @__PURE__ */ (0,
|
|
6850
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react53.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6770
6851
|
SelectedNode,
|
|
6771
6852
|
{
|
|
6772
6853
|
node,
|
|
@@ -6787,13 +6868,13 @@ var PageBodyRenderer = (props) => {
|
|
|
6787
6868
|
var PageBodyRenderer_default = PageBodyRenderer;
|
|
6788
6869
|
|
|
6789
6870
|
// src/components/Toast.tsx
|
|
6790
|
-
var
|
|
6871
|
+
var import_react54 = require("react");
|
|
6791
6872
|
init_ToastService();
|
|
6792
|
-
var
|
|
6873
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
6793
6874
|
var Toast = () => {
|
|
6794
|
-
const [showToast, setShowToast] = (0,
|
|
6795
|
-
const [message, setMessage] = (0,
|
|
6796
|
-
const [messageType, setMessageType] = (0,
|
|
6875
|
+
const [showToast, setShowToast] = (0, import_react54.useState)(false);
|
|
6876
|
+
const [message, setMessage] = (0, import_react54.useState)("");
|
|
6877
|
+
const [messageType, setMessageType] = (0, import_react54.useState)("error");
|
|
6797
6878
|
ToastService_default.showError = function(message2) {
|
|
6798
6879
|
setShowToast(true);
|
|
6799
6880
|
setMessage(message2);
|
|
@@ -6832,8 +6913,8 @@ var Toast = () => {
|
|
|
6832
6913
|
const closeToast = () => {
|
|
6833
6914
|
setShowToast(false);
|
|
6834
6915
|
};
|
|
6835
|
-
return /* @__PURE__ */ (0,
|
|
6836
|
-
/* @__PURE__ */ (0,
|
|
6916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_jsx_runtime74.Fragment, { children: showToast && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "fixed top-2 flex justify-center w-1/2 max-w-xl left-1/2 -translate-x-1/2", style: { zIndex: 1e3 }, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: `w-full items-center flex justify-between p-3 rounded-md relative shadow border bg-${messageType}-soft`, children: [
|
|
6917
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6837
6918
|
"span",
|
|
6838
6919
|
{
|
|
6839
6920
|
className: "font-medium text-inherit text-sm",
|
|
@@ -6841,7 +6922,7 @@ var Toast = () => {
|
|
|
6841
6922
|
children: message
|
|
6842
6923
|
}
|
|
6843
6924
|
),
|
|
6844
|
-
/* @__PURE__ */ (0,
|
|
6925
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("button", { className: "absolute right-2 top-2 ml-2 focus:outline-none", onClick: closeToast, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
6845
6926
|
"svg",
|
|
6846
6927
|
{
|
|
6847
6928
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6849,7 +6930,7 @@ var Toast = () => {
|
|
|
6849
6930
|
fill: "none",
|
|
6850
6931
|
viewBox: "0 0 24 24",
|
|
6851
6932
|
stroke: "currentColor",
|
|
6852
|
-
children: /* @__PURE__ */ (0,
|
|
6933
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" })
|
|
6853
6934
|
}
|
|
6854
6935
|
) })
|
|
6855
6936
|
] }) }) });
|
|
@@ -6876,7 +6957,7 @@ init_TimeInput();
|
|
|
6876
6957
|
// src/components/NavigationTabsV2.tsx
|
|
6877
6958
|
var import_link3 = __toESM(require("next/link"));
|
|
6878
6959
|
var import_navigation = require("next/navigation");
|
|
6879
|
-
var
|
|
6960
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
6880
6961
|
function resolveRoutePlaceholders(route, params) {
|
|
6881
6962
|
return route.replace(/\{([^}]+)\}/g, (match, key) => {
|
|
6882
6963
|
const value = params[key];
|
|
@@ -6901,8 +6982,8 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
6901
6982
|
isActive: tab.isActive
|
|
6902
6983
|
})) || [];
|
|
6903
6984
|
if (mappedTabs.length === 0) return null;
|
|
6904
|
-
return /* @__PURE__ */ (0,
|
|
6905
|
-
return /* @__PURE__ */ (0,
|
|
6985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "flex border-b bg-white rounded-t mb-3", children: mappedTabs.map(({ tabTitle, landingPageUrl, isActive }) => {
|
|
6986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_link3.default, { href: landingPageUrl, className: "-mb-px", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
6906
6987
|
"div",
|
|
6907
6988
|
{
|
|
6908
6989
|
className: `text-sm font-medium border-b-2 px-6 py-2 transition
|
|
@@ -6915,14 +6996,14 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
6915
6996
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
6916
6997
|
|
|
6917
6998
|
// src/components/dataForm/DataList.tsx
|
|
6918
|
-
var
|
|
6999
|
+
var import_react57 = __toESM(require("react"));
|
|
6919
7000
|
var import_navigation2 = require("next/navigation");
|
|
6920
7001
|
|
|
6921
7002
|
// src/components/dataForm/NoContentView.tsx
|
|
6922
|
-
var
|
|
6923
|
-
var
|
|
7003
|
+
var import_react55 = __toESM(require("react"));
|
|
7004
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
6924
7005
|
var NoContentView = (props) => {
|
|
6925
|
-
return /* @__PURE__ */ (0,
|
|
7006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react55.default.Fragment, { children: props.isDataFound === false && props.children });
|
|
6926
7007
|
};
|
|
6927
7008
|
var NoContentView_default = NoContentView;
|
|
6928
7009
|
|
|
@@ -6930,39 +7011,39 @@ var NoContentView_default = NoContentView;
|
|
|
6930
7011
|
init_InputControlType();
|
|
6931
7012
|
|
|
6932
7013
|
// src/components/dataForm/ContentView.tsx
|
|
6933
|
-
var
|
|
6934
|
-
var
|
|
7014
|
+
var import_react56 = __toESM(require("react"));
|
|
7015
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
6935
7016
|
var ContentView = (props) => {
|
|
6936
|
-
return /* @__PURE__ */ (0,
|
|
6937
|
-
props.isDataFound == null && /* @__PURE__ */ (0,
|
|
6938
|
-
/* @__PURE__ */ (0,
|
|
6939
|
-
/* @__PURE__ */ (0,
|
|
6940
|
-
/* @__PURE__ */ (0,
|
|
6941
|
-
/* @__PURE__ */ (0,
|
|
6942
|
-
/* @__PURE__ */ (0,
|
|
7017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_react56.default.Fragment, { children: [
|
|
7018
|
+
props.isDataFound == null && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "bg-gray-200 rounded-md p-4 animate-pulse", children: [
|
|
7019
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "flex items-center mb-4", children: [
|
|
7020
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 h-8 w-8 rounded-full animate-pulse" }),
|
|
7021
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ml-2", children: [
|
|
7022
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 h-3 w-16 animate-pulse" }),
|
|
7023
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 h-2 w-12 animate-pulse" })
|
|
6943
7024
|
] })
|
|
6944
7025
|
] }),
|
|
6945
|
-
/* @__PURE__ */ (0,
|
|
6946
|
-
/* @__PURE__ */ (0,
|
|
6947
|
-
/* @__PURE__ */ (0,
|
|
6948
|
-
/* @__PURE__ */ (0,
|
|
6949
|
-
/* @__PURE__ */ (0,
|
|
6950
|
-
/* @__PURE__ */ (0,
|
|
6951
|
-
/* @__PURE__ */ (0,
|
|
7026
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "grid grid-cols-3 gap-4 mt-6", children: [
|
|
7027
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "animate-pulse", children: [
|
|
7028
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
7029
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
7030
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
7031
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
7032
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
6952
7033
|
] }),
|
|
6953
|
-
/* @__PURE__ */ (0,
|
|
6954
|
-
/* @__PURE__ */ (0,
|
|
6955
|
-
/* @__PURE__ */ (0,
|
|
6956
|
-
/* @__PURE__ */ (0,
|
|
6957
|
-
/* @__PURE__ */ (0,
|
|
6958
|
-
/* @__PURE__ */ (0,
|
|
7034
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "animate-pulse", children: [
|
|
7035
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
7036
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
7037
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
7038
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
7039
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
6959
7040
|
] }),
|
|
6960
|
-
/* @__PURE__ */ (0,
|
|
6961
|
-
/* @__PURE__ */ (0,
|
|
6962
|
-
/* @__PURE__ */ (0,
|
|
6963
|
-
/* @__PURE__ */ (0,
|
|
6964
|
-
/* @__PURE__ */ (0,
|
|
6965
|
-
/* @__PURE__ */ (0,
|
|
7041
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "animate-pulse", children: [
|
|
7042
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-12 mb-2" }),
|
|
7043
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-24 mb-2" }),
|
|
7044
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-32 mb-2" }),
|
|
7045
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-16 mb-2" }),
|
|
7046
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "bg-gray-300 rounded-full h-3 w-28 mb-2" })
|
|
6966
7047
|
] })
|
|
6967
7048
|
] })
|
|
6968
7049
|
] }) }),
|
|
@@ -7022,7 +7103,7 @@ function FormReducer(state, action) {
|
|
|
7022
7103
|
var FormReducer_default = FormReducer;
|
|
7023
7104
|
|
|
7024
7105
|
// src/components/dataForm/DataList.tsx
|
|
7025
|
-
var
|
|
7106
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
7026
7107
|
var DataList = (props) => {
|
|
7027
7108
|
const router = (0, import_navigation2.useRouter)();
|
|
7028
7109
|
let builder = new OdataBuilder(props.path);
|
|
@@ -7030,9 +7111,9 @@ var DataList = (props) => {
|
|
|
7030
7111
|
let activePageNumber = 0;
|
|
7031
7112
|
let pages = 0;
|
|
7032
7113
|
console.log(props.addLinkText);
|
|
7033
|
-
const [isDataFound, setIsDataFound] = (0,
|
|
7034
|
-
const [searchTerm, setSearchTerm] = (0,
|
|
7035
|
-
(0,
|
|
7114
|
+
const [isDataFound, setIsDataFound] = (0, import_react57.useState)(null);
|
|
7115
|
+
const [searchTerm, setSearchTerm] = (0, import_react57.useState)(props.query?.searchTerm ?? "");
|
|
7116
|
+
(0, import_react57.useEffect)(() => {
|
|
7036
7117
|
if (props?.dataset) {
|
|
7037
7118
|
if (props?.dataset.result && props.dataset.result.length > 0) {
|
|
7038
7119
|
setIsDataFound(true);
|
|
@@ -7041,7 +7122,7 @@ var DataList = (props) => {
|
|
|
7041
7122
|
}
|
|
7042
7123
|
}
|
|
7043
7124
|
}, [props.dataset]);
|
|
7044
|
-
(0,
|
|
7125
|
+
(0, import_react57.useEffect)(() => {
|
|
7045
7126
|
if (!props.query?.["$filter"] || !props.filters) return;
|
|
7046
7127
|
const filterQuery = props.query["$filter"];
|
|
7047
7128
|
props.filters.forEach((filter) => {
|
|
@@ -7060,7 +7141,7 @@ var DataList = (props) => {
|
|
|
7060
7141
|
if (path.includes(".")) {
|
|
7061
7142
|
return path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj);
|
|
7062
7143
|
} else if (Array.isArray(obj[path])) {
|
|
7063
|
-
return obj[path].map((item, index) => /* @__PURE__ */ (0,
|
|
7144
|
+
return obj[path].map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { children: item }, index));
|
|
7064
7145
|
} else {
|
|
7065
7146
|
return obj[path];
|
|
7066
7147
|
}
|
|
@@ -7069,11 +7150,11 @@ var DataList = (props) => {
|
|
|
7069
7150
|
inputValues: {},
|
|
7070
7151
|
lastPropertyChanged: ""
|
|
7071
7152
|
};
|
|
7072
|
-
const [formState, dispatch] = (0,
|
|
7153
|
+
const [formState, dispatch] = (0, import_react57.useReducer)(FormReducer_default, initialState);
|
|
7073
7154
|
const getSearchableColumns = () => {
|
|
7074
7155
|
return props.columns?.filter((c) => c.isSearchable)?.map((c) => c.name)?.join(",");
|
|
7075
7156
|
};
|
|
7076
|
-
const handleFilterChange = (0,
|
|
7157
|
+
const handleFilterChange = (0, import_react57.useCallback)(
|
|
7077
7158
|
(updatedValues) => {
|
|
7078
7159
|
dispatch({
|
|
7079
7160
|
type: FORM_INPUT_UPDATE,
|
|
@@ -7104,7 +7185,7 @@ var DataList = (props) => {
|
|
|
7104
7185
|
},
|
|
7105
7186
|
[dispatch, props, router]
|
|
7106
7187
|
);
|
|
7107
|
-
(0,
|
|
7188
|
+
(0, import_react57.useEffect)(() => {
|
|
7108
7189
|
if (!props.columns.some((col) => col.isSearchable)) {
|
|
7109
7190
|
return;
|
|
7110
7191
|
}
|
|
@@ -7139,30 +7220,30 @@ var DataList = (props) => {
|
|
|
7139
7220
|
const renderPageNumbers = () => {
|
|
7140
7221
|
if (pages <= 10) {
|
|
7141
7222
|
return Array.from({ length: pages }, (_, index) => index + 1).map(
|
|
7142
|
-
(page) => /* @__PURE__ */ (0,
|
|
7223
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react57.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7143
7224
|
Hyperlink,
|
|
7144
7225
|
{
|
|
7145
7226
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7146
7227
|
href: builder.getNewPageUrl(page),
|
|
7147
7228
|
children: page
|
|
7148
7229
|
}
|
|
7149
|
-
) : /* @__PURE__ */ (0,
|
|
7230
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
7150
7231
|
);
|
|
7151
7232
|
} else {
|
|
7152
7233
|
const showFirstPages = activePageNumber <= 5;
|
|
7153
7234
|
const showLastPages = activePageNumber > pages - 5;
|
|
7154
7235
|
if (showFirstPages) {
|
|
7155
|
-
return /* @__PURE__ */ (0,
|
|
7156
|
-
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0,
|
|
7236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
7237
|
+
Array.from({ length: 8 }, (_, index) => index + 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react57.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7157
7238
|
Hyperlink,
|
|
7158
7239
|
{
|
|
7159
7240
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7160
7241
|
href: builder.getNewPageUrl(page),
|
|
7161
7242
|
children: page
|
|
7162
7243
|
}
|
|
7163
|
-
) : /* @__PURE__ */ (0,
|
|
7164
|
-
/* @__PURE__ */ (0,
|
|
7165
|
-
/* @__PURE__ */ (0,
|
|
7244
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
7245
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7246
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7166
7247
|
Hyperlink,
|
|
7167
7248
|
{
|
|
7168
7249
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7170,7 +7251,7 @@ var DataList = (props) => {
|
|
|
7170
7251
|
children: pages - 1
|
|
7171
7252
|
}
|
|
7172
7253
|
),
|
|
7173
|
-
/* @__PURE__ */ (0,
|
|
7254
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7174
7255
|
Hyperlink,
|
|
7175
7256
|
{
|
|
7176
7257
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7178,7 +7259,7 @@ var DataList = (props) => {
|
|
|
7178
7259
|
children: pages
|
|
7179
7260
|
}
|
|
7180
7261
|
),
|
|
7181
|
-
/* @__PURE__ */ (0,
|
|
7262
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
7182
7263
|
"select",
|
|
7183
7264
|
{
|
|
7184
7265
|
className: " py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -7190,18 +7271,18 @@ var DataList = (props) => {
|
|
|
7190
7271
|
}
|
|
7191
7272
|
},
|
|
7192
7273
|
children: [
|
|
7193
|
-
/* @__PURE__ */ (0,
|
|
7274
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("option", { className: "", value: "", children: "Jump to" }),
|
|
7194
7275
|
Array.from(
|
|
7195
7276
|
{ length: Math.max(0, pages - 10) },
|
|
7196
7277
|
(_, index) => index + 9
|
|
7197
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
7278
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("option", { value: page, children: page }, page))
|
|
7198
7279
|
]
|
|
7199
7280
|
}
|
|
7200
7281
|
) })
|
|
7201
7282
|
] });
|
|
7202
7283
|
} else if (showLastPages) {
|
|
7203
|
-
return /* @__PURE__ */ (0,
|
|
7204
|
-
/* @__PURE__ */ (0,
|
|
7284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
7285
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7205
7286
|
Hyperlink,
|
|
7206
7287
|
{
|
|
7207
7288
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7209,7 +7290,7 @@ var DataList = (props) => {
|
|
|
7209
7290
|
children: "1"
|
|
7210
7291
|
}
|
|
7211
7292
|
),
|
|
7212
|
-
/* @__PURE__ */ (0,
|
|
7293
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7213
7294
|
Hyperlink,
|
|
7214
7295
|
{
|
|
7215
7296
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7217,21 +7298,21 @@ var DataList = (props) => {
|
|
|
7217
7298
|
children: "2"
|
|
7218
7299
|
}
|
|
7219
7300
|
),
|
|
7220
|
-
/* @__PURE__ */ (0,
|
|
7301
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7221
7302
|
Array.from({ length: 8 }, (_, index) => pages - 7 + index).map(
|
|
7222
|
-
(page) => /* @__PURE__ */ (0,
|
|
7303
|
+
(page) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react57.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7223
7304
|
Hyperlink,
|
|
7224
7305
|
{
|
|
7225
7306
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7226
7307
|
href: builder.getNewPageUrl(page),
|
|
7227
7308
|
children: page
|
|
7228
7309
|
}
|
|
7229
|
-
) : /* @__PURE__ */ (0,
|
|
7310
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)
|
|
7230
7311
|
)
|
|
7231
7312
|
] });
|
|
7232
7313
|
} else {
|
|
7233
|
-
return /* @__PURE__ */ (0,
|
|
7234
|
-
/* @__PURE__ */ (0,
|
|
7314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
|
|
7315
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7235
7316
|
Hyperlink,
|
|
7236
7317
|
{
|
|
7237
7318
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7239,7 +7320,7 @@ var DataList = (props) => {
|
|
|
7239
7320
|
children: "1"
|
|
7240
7321
|
}
|
|
7241
7322
|
),
|
|
7242
|
-
/* @__PURE__ */ (0,
|
|
7323
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7243
7324
|
Hyperlink,
|
|
7244
7325
|
{
|
|
7245
7326
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7247,20 +7328,20 @@ var DataList = (props) => {
|
|
|
7247
7328
|
children: "2"
|
|
7248
7329
|
}
|
|
7249
7330
|
),
|
|
7250
|
-
/* @__PURE__ */ (0,
|
|
7331
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7251
7332
|
Array.from(
|
|
7252
7333
|
{ length: 5 },
|
|
7253
7334
|
(_, index) => activePageNumber - 2 + index
|
|
7254
|
-
).map((page) => /* @__PURE__ */ (0,
|
|
7335
|
+
).map((page) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react57.default.Fragment, { children: activePageNumber !== page ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7255
7336
|
Hyperlink,
|
|
7256
7337
|
{
|
|
7257
7338
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
7258
7339
|
href: builder.getNewPageUrl(page),
|
|
7259
7340
|
children: page
|
|
7260
7341
|
}
|
|
7261
|
-
) : /* @__PURE__ */ (0,
|
|
7262
|
-
/* @__PURE__ */ (0,
|
|
7263
|
-
/* @__PURE__ */ (0,
|
|
7342
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-3 py-1 border-t border-b border-gray-300 bg-primary-base", children: page }) }, page)),
|
|
7343
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "px-2 py-1", children: "..." }),
|
|
7344
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7264
7345
|
Hyperlink,
|
|
7265
7346
|
{
|
|
7266
7347
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7268,7 +7349,7 @@ var DataList = (props) => {
|
|
|
7268
7349
|
children: pages - 1
|
|
7269
7350
|
}
|
|
7270
7351
|
),
|
|
7271
|
-
/* @__PURE__ */ (0,
|
|
7352
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7272
7353
|
Hyperlink,
|
|
7273
7354
|
{
|
|
7274
7355
|
className: "px-3 py-1 border-t border-b border-gray-300 bg-white text-gray-700 hover:bg-gray-100",
|
|
@@ -7276,7 +7357,7 @@ var DataList = (props) => {
|
|
|
7276
7357
|
children: pages
|
|
7277
7358
|
}
|
|
7278
7359
|
),
|
|
7279
|
-
/* @__PURE__ */ (0,
|
|
7360
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "relative inline-block", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
7280
7361
|
"select",
|
|
7281
7362
|
{
|
|
7282
7363
|
className: "px-2 py-1 border border-gray-300 bg-white text-gray-700 appearance-none rounded-none",
|
|
@@ -7288,8 +7369,8 @@ var DataList = (props) => {
|
|
|
7288
7369
|
}
|
|
7289
7370
|
},
|
|
7290
7371
|
children: [
|
|
7291
|
-
/* @__PURE__ */ (0,
|
|
7292
|
-
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0,
|
|
7372
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("option", { value: "", children: "Jump to" }),
|
|
7373
|
+
Array.from({ length: pages - 4 }, (_, index) => index + 3).filter((page) => page > 2 && page < pages - 1).map((page) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("option", { value: page, children: page }, page))
|
|
7293
7374
|
]
|
|
7294
7375
|
}
|
|
7295
7376
|
) })
|
|
@@ -7297,16 +7378,16 @@ var DataList = (props) => {
|
|
|
7297
7378
|
}
|
|
7298
7379
|
}
|
|
7299
7380
|
};
|
|
7300
|
-
return /* @__PURE__ */ (0,
|
|
7301
|
-
/* @__PURE__ */ (0,
|
|
7302
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
7381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_react57.default.Fragment, { children: [
|
|
7382
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(ContentView_default, { isDataFound, children: [
|
|
7383
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
7303
7384
|
"div",
|
|
7304
7385
|
{
|
|
7305
7386
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md sticky top-0`,
|
|
7306
7387
|
children: [
|
|
7307
|
-
props.title ? /* @__PURE__ */ (0,
|
|
7308
|
-
/* @__PURE__ */ (0,
|
|
7309
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
7388
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("h2", { className: "text-lg font-semibold text-black-800", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", {}),
|
|
7389
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
7390
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7310
7391
|
InputControl_default,
|
|
7311
7392
|
{
|
|
7312
7393
|
name: "Search_input",
|
|
@@ -7318,7 +7399,7 @@ var DataList = (props) => {
|
|
|
7318
7399
|
}
|
|
7319
7400
|
}
|
|
7320
7401
|
),
|
|
7321
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
7402
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7322
7403
|
InputControl_default,
|
|
7323
7404
|
{
|
|
7324
7405
|
name: filter.name,
|
|
@@ -7333,15 +7414,15 @@ var DataList = (props) => {
|
|
|
7333
7414
|
},
|
|
7334
7415
|
filter.name
|
|
7335
7416
|
)),
|
|
7336
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
7417
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
7337
7418
|
Hyperlink,
|
|
7338
7419
|
{
|
|
7339
7420
|
className: "gap-1",
|
|
7340
7421
|
linkType: "Primary" /* Solid */,
|
|
7341
7422
|
href: props.addLinkHref,
|
|
7342
7423
|
children: [
|
|
7343
|
-
/* @__PURE__ */ (0,
|
|
7344
|
-
/* @__PURE__ */ (0,
|
|
7424
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
7425
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
7345
7426
|
]
|
|
7346
7427
|
}
|
|
7347
7428
|
)
|
|
@@ -7349,8 +7430,8 @@ var DataList = (props) => {
|
|
|
7349
7430
|
]
|
|
7350
7431
|
}
|
|
7351
7432
|
),
|
|
7352
|
-
/* @__PURE__ */ (0,
|
|
7353
|
-
/* @__PURE__ */ (0,
|
|
7433
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "flex-1 overflow-y-auto justify-end bg-white rounded shadow h-[calc(100vh-14rem)]", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("table", { className: "w-full divide-y divide-gray-200", children: [
|
|
7434
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("thead", { className: "bg-gray-50 sticky top-0", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
7354
7435
|
let url = builder.getNewOrderByUrl(column.name);
|
|
7355
7436
|
let icon = "chevronUpDown";
|
|
7356
7437
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -7360,18 +7441,18 @@ var DataList = (props) => {
|
|
|
7360
7441
|
icon = "chevronUp";
|
|
7361
7442
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
7362
7443
|
}
|
|
7363
|
-
return /* @__PURE__ */ (0,
|
|
7444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7364
7445
|
"th",
|
|
7365
7446
|
{
|
|
7366
7447
|
className: "px-6 py-3 text-left font-medium bg-neutral-soft " + (column.enableSorting ? "cursor-pointer " : "") + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
7367
|
-
children: /* @__PURE__ */ (0,
|
|
7448
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7368
7449
|
Hyperlink,
|
|
7369
7450
|
{
|
|
7370
7451
|
href: column.enableSorting ? url : void 0,
|
|
7371
7452
|
className: "!text-neutral-contrast ",
|
|
7372
|
-
children: /* @__PURE__ */ (0,
|
|
7373
|
-
/* @__PURE__ */ (0,
|
|
7374
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
7453
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
7454
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "text-black", children: column.label }),
|
|
7455
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
7375
7456
|
] })
|
|
7376
7457
|
}
|
|
7377
7458
|
)
|
|
@@ -7379,24 +7460,24 @@ var DataList = (props) => {
|
|
|
7379
7460
|
column.name
|
|
7380
7461
|
);
|
|
7381
7462
|
}) }) }),
|
|
7382
|
-
/* @__PURE__ */ (0,
|
|
7463
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
7383
7464
|
let validityClass = "";
|
|
7384
7465
|
console.log("dataitem", dataitem);
|
|
7385
7466
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
7386
7467
|
validityClass = "bg-alert-200";
|
|
7387
7468
|
}
|
|
7388
|
-
return /* @__PURE__ */ (0,
|
|
7469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
7389
7470
|
console.log("column", column);
|
|
7390
|
-
return /* @__PURE__ */ (0,
|
|
7471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react57.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7391
7472
|
"td",
|
|
7392
7473
|
{
|
|
7393
7474
|
className: "px-6 py-2 whitespace-normal " + (column.controlType == ViewControlTypes_default.money ? "" : ""),
|
|
7394
|
-
children: column.addhref === true ? /* @__PURE__ */ (0,
|
|
7475
|
+
children: column.addhref === true ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7395
7476
|
Hyperlink,
|
|
7396
7477
|
{
|
|
7397
7478
|
className: "",
|
|
7398
7479
|
href: `https://${dataitem[column.name]}`,
|
|
7399
|
-
children: /* @__PURE__ */ (0,
|
|
7480
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7400
7481
|
ViewControl_default,
|
|
7401
7482
|
{
|
|
7402
7483
|
controlType: column.controlType,
|
|
@@ -7409,11 +7490,11 @@ var DataList = (props) => {
|
|
|
7409
7490
|
}
|
|
7410
7491
|
)
|
|
7411
7492
|
}
|
|
7412
|
-
) : column.showAsLink ? /* @__PURE__ */ (0,
|
|
7493
|
+
) : column.showAsLink ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7413
7494
|
Hyperlink,
|
|
7414
7495
|
{
|
|
7415
7496
|
href: props.path + dataitem[props.columns[0].name] + "/" + (dataitem.linkUrlSegment ?? column.linkUrlSegment),
|
|
7416
|
-
children: /* @__PURE__ */ (0,
|
|
7497
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7417
7498
|
ViewControl_default,
|
|
7418
7499
|
{
|
|
7419
7500
|
controlType: column.controlType,
|
|
@@ -7423,7 +7504,7 @@ var DataList = (props) => {
|
|
|
7423
7504
|
}
|
|
7424
7505
|
)
|
|
7425
7506
|
}
|
|
7426
|
-
) : /* @__PURE__ */ (0,
|
|
7507
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7427
7508
|
ViewControl_default,
|
|
7428
7509
|
{
|
|
7429
7510
|
controlType: column.controlType,
|
|
@@ -7437,10 +7518,10 @@ var DataList = (props) => {
|
|
|
7437
7518
|
}) }, index);
|
|
7438
7519
|
}) })
|
|
7439
7520
|
] }) }),
|
|
7440
|
-
/* @__PURE__ */ (0,
|
|
7441
|
-
/* @__PURE__ */ (0,
|
|
7442
|
-
/* @__PURE__ */ (0,
|
|
7443
|
-
activePageNumber > 1 && /* @__PURE__ */ (0,
|
|
7521
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "pt-4 border-t border-t-gray-50 sticky bottom-0 h-11 mt-2 ", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
7522
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "text-gray-700", children: label }),
|
|
7523
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex space-x-2 items-center", children: [
|
|
7524
|
+
activePageNumber > 1 && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7444
7525
|
Hyperlink,
|
|
7445
7526
|
{
|
|
7446
7527
|
className: "px-3 py-1 rounded-l-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -7448,9 +7529,9 @@ var DataList = (props) => {
|
|
|
7448
7529
|
children: "Prev"
|
|
7449
7530
|
}
|
|
7450
7531
|
),
|
|
7451
|
-
activePageNumber <= 1 && /* @__PURE__ */ (0,
|
|
7532
|
+
activePageNumber <= 1 && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "px-3 py-1 rounded-l-md border border-gray-300 bg-gray-200 text-gray-500 hover:bg-gray-200", children: "Prev" }),
|
|
7452
7533
|
renderPageNumbers(),
|
|
7453
|
-
activePageNumber < pages && /* @__PURE__ */ (0,
|
|
7534
|
+
activePageNumber < pages && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7454
7535
|
Hyperlink,
|
|
7455
7536
|
{
|
|
7456
7537
|
className: "px-3 py-1 rounded-r-md border border-gray-300 bg-white text-gray-500 hover:bg-gray-200",
|
|
@@ -7458,19 +7539,19 @@ var DataList = (props) => {
|
|
|
7458
7539
|
children: "Next"
|
|
7459
7540
|
}
|
|
7460
7541
|
),
|
|
7461
|
-
activePageNumber >= pages && /* @__PURE__ */ (0,
|
|
7542
|
+
activePageNumber >= pages && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "px-3 py-1 rounded-r-md border border-gray-300 bg-gray-200 text-gray-500", children: "Next" })
|
|
7462
7543
|
] })
|
|
7463
7544
|
] }) })
|
|
7464
7545
|
] }),
|
|
7465
|
-
/* @__PURE__ */ (0,
|
|
7466
|
-
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0,
|
|
7546
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(NoContentView_default, { isDataFound, children: [
|
|
7547
|
+
(props.title || props.filters || props.addLinkHref) && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
7467
7548
|
"div",
|
|
7468
7549
|
{
|
|
7469
7550
|
className: `flex justify-between items-center bg-white pl-6 pr-2 h-14 mb-3 shadow-sm rounded-md border-b border-neutral-200`,
|
|
7470
7551
|
children: [
|
|
7471
|
-
props.title ? /* @__PURE__ */ (0,
|
|
7472
|
-
/* @__PURE__ */ (0,
|
|
7473
|
-
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0,
|
|
7552
|
+
props.title ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "inline-flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("h2", { className: "text-lg font-semibold text-black", children: props.title }) }) : /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", {}),
|
|
7553
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
7554
|
+
props.columns.some((col) => col.isSearchable) && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7474
7555
|
InputControl_default,
|
|
7475
7556
|
{
|
|
7476
7557
|
name: "Search_input",
|
|
@@ -7482,7 +7563,7 @@ var DataList = (props) => {
|
|
|
7482
7563
|
}
|
|
7483
7564
|
}
|
|
7484
7565
|
),
|
|
7485
|
-
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0,
|
|
7566
|
+
props.filters && props.filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7486
7567
|
InputControl_default,
|
|
7487
7568
|
{
|
|
7488
7569
|
name: filter.name,
|
|
@@ -7497,15 +7578,15 @@ var DataList = (props) => {
|
|
|
7497
7578
|
},
|
|
7498
7579
|
filter.name
|
|
7499
7580
|
)),
|
|
7500
|
-
props.addLinkHref && /* @__PURE__ */ (0,
|
|
7581
|
+
props.addLinkHref && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
7501
7582
|
Hyperlink,
|
|
7502
7583
|
{
|
|
7503
7584
|
className: "gap-1",
|
|
7504
7585
|
linkType: "Primary" /* Solid */,
|
|
7505
7586
|
href: props.addLinkHref,
|
|
7506
7587
|
children: [
|
|
7507
|
-
/* @__PURE__ */ (0,
|
|
7508
|
-
/* @__PURE__ */ (0,
|
|
7588
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Icon_default, { name: "plus", className: "w-4 h-4" }),
|
|
7589
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "text-sm font-medium", children: props.addLinkText || "Add New" })
|
|
7509
7590
|
]
|
|
7510
7591
|
}
|
|
7511
7592
|
)
|
|
@@ -7513,8 +7594,8 @@ var DataList = (props) => {
|
|
|
7513
7594
|
]
|
|
7514
7595
|
}
|
|
7515
7596
|
),
|
|
7516
|
-
/* @__PURE__ */ (0,
|
|
7517
|
-
/* @__PURE__ */ (0,
|
|
7597
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex-grow overflow-y-auto justify-end bg-white rounded shadow h-[75vh]", children: [
|
|
7598
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("table", { className: "w-full divide-y divide-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("thead", { className: "bg-gray-50", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("tr", { children: props?.columns?.map((column) => {
|
|
7518
7599
|
let url = builder.getNewOrderByUrl(column.name);
|
|
7519
7600
|
let icon = "chevronUpDown";
|
|
7520
7601
|
if (orderBy.includes(`${column.name} desc`)) {
|
|
@@ -7524,18 +7605,18 @@ var DataList = (props) => {
|
|
|
7524
7605
|
icon = "chevronUp";
|
|
7525
7606
|
url = builder.getNewOrderByUrl(column.name + " desc");
|
|
7526
7607
|
}
|
|
7527
|
-
return /* @__PURE__ */ (0,
|
|
7608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7528
7609
|
"th",
|
|
7529
7610
|
{
|
|
7530
7611
|
className: "px-6 py-3 text-left font-medium bg-neutral-soft " + (column.enableSorting ? "cursor-pointer " : "") + column.width + (column.controlType == ViewControlTypes_default.money ? " text-right" : ""),
|
|
7531
|
-
children: /* @__PURE__ */ (0,
|
|
7612
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7532
7613
|
Hyperlink,
|
|
7533
7614
|
{
|
|
7534
7615
|
href: column.enableSorting ? url : void 0,
|
|
7535
7616
|
className: "text-body-950",
|
|
7536
|
-
children: /* @__PURE__ */ (0,
|
|
7537
|
-
/* @__PURE__ */ (0,
|
|
7538
|
-
column.enableSorting && /* @__PURE__ */ (0,
|
|
7617
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: "flex items-center space-x-1", children: [
|
|
7618
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { children: column.label }),
|
|
7619
|
+
column.enableSorting && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Icon_default, { className: "w-4 h-4", name: icon })
|
|
7539
7620
|
] })
|
|
7540
7621
|
}
|
|
7541
7622
|
)
|
|
@@ -7543,7 +7624,7 @@ var DataList = (props) => {
|
|
|
7543
7624
|
column.name
|
|
7544
7625
|
);
|
|
7545
7626
|
}) }) }) }) }),
|
|
7546
|
-
/* @__PURE__ */ (0,
|
|
7627
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "w-full text-center bg-transparent pt-5", children: "There are no entries in the table at the moment." })
|
|
7547
7628
|
] })
|
|
7548
7629
|
] })
|
|
7549
7630
|
] });
|
|
@@ -7551,12 +7632,12 @@ var DataList = (props) => {
|
|
|
7551
7632
|
var DataList_default = DataList;
|
|
7552
7633
|
|
|
7553
7634
|
// src/components/dataForm/DataListRenderer.tsx
|
|
7554
|
-
var
|
|
7635
|
+
var import_react58 = __toESM(require("react"));
|
|
7555
7636
|
init_ServiceClient();
|
|
7556
7637
|
init_OdataBuilder();
|
|
7557
7638
|
init_SelectWithSearchInput();
|
|
7558
7639
|
var import_navigation3 = require("next/navigation");
|
|
7559
|
-
var
|
|
7640
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
7560
7641
|
var viewControlMap = {
|
|
7561
7642
|
number: ViewControlTypes.number,
|
|
7562
7643
|
lineText: ViewControlTypes.lineText,
|
|
@@ -7611,14 +7692,14 @@ var DataListRenderer = ({
|
|
|
7611
7692
|
widgetProps
|
|
7612
7693
|
}) => {
|
|
7613
7694
|
const serviceClient = new ServiceClient_default(apiBaseUrl, session);
|
|
7614
|
-
const [columns, setColumns] = (0,
|
|
7615
|
-
const [dataset, setDataset] = (0,
|
|
7616
|
-
const [filter, setFilters] = (0,
|
|
7617
|
-
const [addLinkHref, setAddLinkHref] = (0,
|
|
7618
|
-
const [addLinkText, setAddLinkText] = (0,
|
|
7619
|
-
const [serviceRoute, setServiceRoute] = (0,
|
|
7695
|
+
const [columns, setColumns] = (0, import_react58.useState)([]);
|
|
7696
|
+
const [dataset, setDataset] = (0, import_react58.useState)();
|
|
7697
|
+
const [filter, setFilters] = (0, import_react58.useState)([]);
|
|
7698
|
+
const [addLinkHref, setAddLinkHref] = (0, import_react58.useState)("");
|
|
7699
|
+
const [addLinkText, setAddLinkText] = (0, import_react58.useState)("");
|
|
7700
|
+
const [serviceRoute, setServiceRoute] = (0, import_react58.useState)("");
|
|
7620
7701
|
const pathname = (0, import_navigation3.usePathname)();
|
|
7621
|
-
(0,
|
|
7702
|
+
(0, import_react58.useEffect)(() => {
|
|
7622
7703
|
if (!formDefinition) return;
|
|
7623
7704
|
setColumns(mapApiToColumns(formDefinition));
|
|
7624
7705
|
setFilters(mapApiToFilters(formDefinition));
|
|
@@ -7631,7 +7712,7 @@ var DataListRenderer = ({
|
|
|
7631
7712
|
setAddLinkHref(resolvedAddLinkHref);
|
|
7632
7713
|
setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
|
|
7633
7714
|
}, [formDefinition, params]);
|
|
7634
|
-
(0,
|
|
7715
|
+
(0, import_react58.useEffect)(() => {
|
|
7635
7716
|
const fetchData = async () => {
|
|
7636
7717
|
if (!serviceRoute) return;
|
|
7637
7718
|
const resolvedRoute = resolveRoutePlaceholders2(serviceRoute, params);
|
|
@@ -7651,15 +7732,15 @@ var DataListRenderer = ({
|
|
|
7651
7732
|
isActive: landingPageUrl === pathname
|
|
7652
7733
|
};
|
|
7653
7734
|
});
|
|
7654
|
-
return /* @__PURE__ */ (0,
|
|
7655
|
-
resolvedTabs.length > 0 && /* @__PURE__ */ (0,
|
|
7735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_react58.default.Fragment, { children: [
|
|
7736
|
+
resolvedTabs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7656
7737
|
NavigationTabsV2_default,
|
|
7657
7738
|
{
|
|
7658
7739
|
tabs: resolvedTabs,
|
|
7659
7740
|
params: widgetProps?.params ?? params
|
|
7660
7741
|
}
|
|
7661
7742
|
),
|
|
7662
|
-
/* @__PURE__ */ (0,
|
|
7743
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
7663
7744
|
DataList_default,
|
|
7664
7745
|
{
|
|
7665
7746
|
addLinkHref,
|
|
@@ -7681,13 +7762,13 @@ var DataListRenderer_default = DataListRenderer;
|
|
|
7681
7762
|
init_InputControlType();
|
|
7682
7763
|
|
|
7683
7764
|
// src/components/dataForm/DataForm.tsx
|
|
7684
|
-
var
|
|
7765
|
+
var import_react60 = __toESM(require("react"));
|
|
7685
7766
|
init_Icon();
|
|
7686
7767
|
init_Button();
|
|
7687
7768
|
init_StyleTypes();
|
|
7688
7769
|
|
|
7689
7770
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
7690
|
-
var
|
|
7771
|
+
var import_react59 = __toESM(require("react"));
|
|
7691
7772
|
|
|
7692
7773
|
// src/components/dataForm/StyleTypes.tsx
|
|
7693
7774
|
var StyleTypes2 = /* @__PURE__ */ ((StyleTypes3) => {
|
|
@@ -7714,7 +7795,7 @@ var FORM_CHILD_ONE_TO_ONE_UPDATE = "FORM_CHILD_ONE_TO_ONE_UPDATE";
|
|
|
7714
7795
|
var FORM_CHILD_ROW_ADD = "FORM_CHILD_ROW_ADD";
|
|
7715
7796
|
|
|
7716
7797
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
7717
|
-
var
|
|
7798
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
7718
7799
|
var DataFormChildSection = (props) => {
|
|
7719
7800
|
const { section } = props;
|
|
7720
7801
|
const isOneToOne = section.relationshipType === "one-to-one";
|
|
@@ -7726,7 +7807,7 @@ var DataFormChildSection = (props) => {
|
|
|
7726
7807
|
return childItems.map((item, originalIndex) => ({ item, originalIndex })).filter((x) => !x.item.isDeleted) || [];
|
|
7727
7808
|
};
|
|
7728
7809
|
const childItemsToRender = getChildItemsForRendering();
|
|
7729
|
-
const handleChildInputChange = (0,
|
|
7810
|
+
const handleChildInputChange = (0, import_react59.useCallback)(
|
|
7730
7811
|
(updatedValues) => {
|
|
7731
7812
|
if (isOneToOne) {
|
|
7732
7813
|
props.callback({
|
|
@@ -7753,7 +7834,7 @@ var DataFormChildSection = (props) => {
|
|
|
7753
7834
|
},
|
|
7754
7835
|
[props, isOneToOne, childItemsToRender]
|
|
7755
7836
|
);
|
|
7756
|
-
const onAddRow = (0,
|
|
7837
|
+
const onAddRow = (0, import_react59.useCallback)(() => {
|
|
7757
7838
|
props.callback({
|
|
7758
7839
|
sectionName: props.section.name,
|
|
7759
7840
|
actionType: FORM_CHILD_ROW_ADD,
|
|
@@ -7762,7 +7843,7 @@ var DataFormChildSection = (props) => {
|
|
|
7762
7843
|
rowIndex: -1
|
|
7763
7844
|
});
|
|
7764
7845
|
}, [props]);
|
|
7765
|
-
const onDeleteRow = (0,
|
|
7846
|
+
const onDeleteRow = (0, import_react59.useCallback)(
|
|
7766
7847
|
(filteredIndex) => {
|
|
7767
7848
|
const visibleItem = childItemsToRender[filteredIndex];
|
|
7768
7849
|
if (visibleItem) {
|
|
@@ -7782,14 +7863,14 @@ var DataFormChildSection = (props) => {
|
|
|
7782
7863
|
childItemsToRender,
|
|
7783
7864
|
allChildItems: childItems
|
|
7784
7865
|
});
|
|
7785
|
-
return /* @__PURE__ */ (0,
|
|
7786
|
-
section.sectionTitle && /* @__PURE__ */ (0,
|
|
7787
|
-
/* @__PURE__ */ (0,
|
|
7788
|
-
/* @__PURE__ */ (0,
|
|
7789
|
-
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0,
|
|
7790
|
-
return /* @__PURE__ */ (0,
|
|
7866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react59.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "rounded border-neutral-200 border px-6 py-4 mb-2", children: [
|
|
7867
|
+
section.sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "mb-4 text-lg font-medium text-body-950", children: section.sectionTitle }),
|
|
7868
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "flex-grow flex flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
7869
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("table", { className: "w-full border-separate divide-y divide-gray-200", children: [
|
|
7870
|
+
(!isOneToOne || childItemsToRender.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("thead", { className: "", children: section.sectionRows.map((sectionRow, sectionRowIndex) => {
|
|
7871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("tr", { className: "", children: [
|
|
7791
7872
|
sectionRow.elements.map((field, index) => {
|
|
7792
|
-
return /* @__PURE__ */ (0,
|
|
7873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7793
7874
|
"th",
|
|
7794
7875
|
{
|
|
7795
7876
|
className: "py-3 font-normal text-left",
|
|
@@ -7798,21 +7879,21 @@ var DataFormChildSection = (props) => {
|
|
|
7798
7879
|
field.name
|
|
7799
7880
|
);
|
|
7800
7881
|
}),
|
|
7801
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
7882
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("th", { className: "py-3 font-normal text-left", children: "Actions" })
|
|
7802
7883
|
] }, sectionRowIndex);
|
|
7803
7884
|
}) }),
|
|
7804
|
-
/* @__PURE__ */ (0,
|
|
7885
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("tbody", { className: "divide-y divide-gray-200", children: childItemsToRender.map((visibleItem, filteredIndex) => {
|
|
7805
7886
|
const { item, originalIndex } = visibleItem;
|
|
7806
7887
|
const rowKey = originalIndex;
|
|
7807
|
-
return /* @__PURE__ */ (0,
|
|
7888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react59.default.Fragment, { children: section.sectionRows.map(
|
|
7808
7889
|
(sectionRow, sectionRowIndex) => {
|
|
7809
|
-
return /* @__PURE__ */ (0,
|
|
7890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
7810
7891
|
"tr",
|
|
7811
7892
|
{
|
|
7812
7893
|
className: "",
|
|
7813
7894
|
children: [
|
|
7814
7895
|
sectionRow.elements.map((field, index) => {
|
|
7815
|
-
return /* @__PURE__ */ (0,
|
|
7896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "w-11/12", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7816
7897
|
InputControl_default,
|
|
7817
7898
|
{
|
|
7818
7899
|
index: filteredIndex,
|
|
@@ -7832,7 +7913,7 @@ var DataFormChildSection = (props) => {
|
|
|
7832
7913
|
}
|
|
7833
7914
|
) }) }) }, field.name);
|
|
7834
7915
|
}),
|
|
7835
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
7916
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7836
7917
|
ClientButton_default,
|
|
7837
7918
|
{
|
|
7838
7919
|
ButtonType: StyleTypes2.Hollow,
|
|
@@ -7841,7 +7922,7 @@ var DataFormChildSection = (props) => {
|
|
|
7841
7922
|
},
|
|
7842
7923
|
dataRole: "delete",
|
|
7843
7924
|
tabIndex: -1,
|
|
7844
|
-
children: /* @__PURE__ */ (0,
|
|
7925
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7845
7926
|
Icon_default,
|
|
7846
7927
|
{
|
|
7847
7928
|
className: "w-4 h-4",
|
|
@@ -7858,7 +7939,7 @@ var DataFormChildSection = (props) => {
|
|
|
7858
7939
|
) }, rowKey);
|
|
7859
7940
|
}) })
|
|
7860
7941
|
] }) }),
|
|
7861
|
-
!section.readonly && !isOneToOne && /* @__PURE__ */ (0,
|
|
7942
|
+
!section.readonly && !isOneToOne && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
7862
7943
|
ClientButton_default,
|
|
7863
7944
|
{
|
|
7864
7945
|
ButtonType: "Link" /* Link */,
|
|
@@ -7873,9 +7954,9 @@ var DataFormChildSection = (props) => {
|
|
|
7873
7954
|
var DataFormChildSection_default = DataFormChildSection;
|
|
7874
7955
|
|
|
7875
7956
|
// src/components/dataForm/DataForm.tsx
|
|
7876
|
-
var
|
|
7957
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
7877
7958
|
var DataForm = (props) => {
|
|
7878
|
-
const formRef = (0,
|
|
7959
|
+
const formRef = (0, import_react60.useRef)(null);
|
|
7879
7960
|
console.log(props.dataItem, "dssads");
|
|
7880
7961
|
const initialState = {
|
|
7881
7962
|
inputValues: {},
|
|
@@ -7884,9 +7965,9 @@ var DataForm = (props) => {
|
|
|
7884
7965
|
const childInitialState = {
|
|
7885
7966
|
inputValues: []
|
|
7886
7967
|
};
|
|
7887
|
-
const [formState, dispatch] = (0,
|
|
7968
|
+
const [formState, dispatch] = (0, import_react60.useReducer)(FormReducer_default, initialState);
|
|
7888
7969
|
console.log(props.sections, "sections");
|
|
7889
|
-
const clearHiddenChildSections = (0,
|
|
7970
|
+
const clearHiddenChildSections = (0, import_react60.useCallback)(
|
|
7890
7971
|
(changedProperty, newValues) => {
|
|
7891
7972
|
if (!props.sections) return;
|
|
7892
7973
|
const allChildSections = [];
|
|
@@ -7924,7 +8005,7 @@ var DataForm = (props) => {
|
|
|
7924
8005
|
},
|
|
7925
8006
|
[props.sections, formState.inputValues]
|
|
7926
8007
|
);
|
|
7927
|
-
const handleInputChange = (0,
|
|
8008
|
+
const handleInputChange = (0, import_react60.useCallback)(
|
|
7928
8009
|
async (updatedValues) => {
|
|
7929
8010
|
dispatch({
|
|
7930
8011
|
type: FORM_INPUT_UPDATE,
|
|
@@ -7939,7 +8020,7 @@ var DataForm = (props) => {
|
|
|
7939
8020
|
},
|
|
7940
8021
|
[dispatch, formState.inputValues, clearHiddenChildSections]
|
|
7941
8022
|
);
|
|
7942
|
-
const fetchData = (0,
|
|
8023
|
+
const fetchData = (0, import_react60.useCallback)(async () => {
|
|
7943
8024
|
if (!props.rules) return;
|
|
7944
8025
|
if (Object.keys(formState.inputValues).length === 0) {
|
|
7945
8026
|
return;
|
|
@@ -7970,7 +8051,7 @@ var DataForm = (props) => {
|
|
|
7970
8051
|
console.error("Error fetching data:", error);
|
|
7971
8052
|
}
|
|
7972
8053
|
}, [formState.lastPropertyChanged, formState.inputValues]);
|
|
7973
|
-
(0,
|
|
8054
|
+
(0, import_react60.useEffect)(() => {
|
|
7974
8055
|
fetchData();
|
|
7975
8056
|
}, [formState.inputValues, formState.lastPropertyChanged]);
|
|
7976
8057
|
function replacePlaceholders(template, context, params) {
|
|
@@ -7990,7 +8071,7 @@ var DataForm = (props) => {
|
|
|
7990
8071
|
}
|
|
7991
8072
|
);
|
|
7992
8073
|
}
|
|
7993
|
-
const handleChildSectionChangeCallback = (0,
|
|
8074
|
+
const handleChildSectionChangeCallback = (0, import_react60.useCallback)(
|
|
7994
8075
|
(params) => {
|
|
7995
8076
|
dispatch({
|
|
7996
8077
|
type: params.actionType,
|
|
@@ -8035,7 +8116,7 @@ var DataForm = (props) => {
|
|
|
8035
8116
|
});
|
|
8036
8117
|
return cloned;
|
|
8037
8118
|
}
|
|
8038
|
-
const onClick = (0,
|
|
8119
|
+
const onClick = (0, import_react60.useCallback)(async () => {
|
|
8039
8120
|
if (props.onClick) {
|
|
8040
8121
|
const isEdit = props.dataItem && Object.keys(props.dataItem).length > 0;
|
|
8041
8122
|
const normalizedValues = normalizeChildSections(
|
|
@@ -8051,21 +8132,21 @@ var DataForm = (props) => {
|
|
|
8051
8132
|
return { isSuccessful: true };
|
|
8052
8133
|
}
|
|
8053
8134
|
}, [formState, props]);
|
|
8054
|
-
const handleAdditionalOnClick = (0,
|
|
8135
|
+
const handleAdditionalOnClick = (0, import_react60.useCallback)(async () => {
|
|
8055
8136
|
if (props.additionalActions?.onClick) {
|
|
8056
8137
|
return await props.additionalActions.onClick(formState);
|
|
8057
8138
|
} else {
|
|
8058
8139
|
return { isSuccessful: true, message: "Action completed successfully" };
|
|
8059
8140
|
}
|
|
8060
8141
|
}, [formState, props]);
|
|
8061
|
-
const onDelete = (0,
|
|
8142
|
+
const onDelete = (0, import_react60.useCallback)(async () => {
|
|
8062
8143
|
if (props.onDelete) {
|
|
8063
8144
|
return await props.onDelete(formState);
|
|
8064
8145
|
} else {
|
|
8065
8146
|
return { isSuccessful: true };
|
|
8066
8147
|
}
|
|
8067
8148
|
}, [formState, props]);
|
|
8068
|
-
(0,
|
|
8149
|
+
(0, import_react60.useEffect)(() => {
|
|
8069
8150
|
if (props.dataItem) {
|
|
8070
8151
|
dispatch({
|
|
8071
8152
|
type: FORM_INITIAL_UPDATE,
|
|
@@ -8093,19 +8174,19 @@ var DataForm = (props) => {
|
|
|
8093
8174
|
return false;
|
|
8094
8175
|
}
|
|
8095
8176
|
}
|
|
8096
|
-
return /* @__PURE__ */ (0,
|
|
8097
|
-
props.title && /* @__PURE__ */ (0,
|
|
8177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react60.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
8178
|
+
props.title && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "inline-flex items-center gap-2 px-6 py-3 border border-neutral-200 bg-white shadow-sm rounded-t-md", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
8098
8179
|
"div",
|
|
8099
8180
|
{
|
|
8100
8181
|
className: "inline-flex items-center gap-2 cursor-pointer",
|
|
8101
8182
|
onClick: () => window.history.back(),
|
|
8102
8183
|
children: [
|
|
8103
|
-
/* @__PURE__ */ (0,
|
|
8104
|
-
/* @__PURE__ */ (0,
|
|
8184
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Icon_default, { name: "chevronLeft", className: "w-4 h-4 text-primary-800" }),
|
|
8185
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("h2", { className: "text-lg font-semibold text-primary-800", children: props.title })
|
|
8105
8186
|
]
|
|
8106
8187
|
}
|
|
8107
8188
|
) }),
|
|
8108
|
-
/* @__PURE__ */ (0,
|
|
8189
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8109
8190
|
"form",
|
|
8110
8191
|
{
|
|
8111
8192
|
className: "group space-y-6 pb-6 overflow-y-auto",
|
|
@@ -8126,8 +8207,8 @@ var DataForm = (props) => {
|
|
|
8126
8207
|
}
|
|
8127
8208
|
}
|
|
8128
8209
|
},
|
|
8129
|
-
children: /* @__PURE__ */ (0,
|
|
8130
|
-
return /* @__PURE__ */ (0,
|
|
8210
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "flex flex-col gap-6", children: props.sections?.map((section, sectionIndex) => {
|
|
8211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react60.default.Fragment, { children: !section.isChildSection && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: " rounded-b-lg bg-white shadow border-neutral-200 border px-8 py-6 ", children: [
|
|
8131
8212
|
section.sectionRows?.map(
|
|
8132
8213
|
(sectionRow, sectionRowIndex) => {
|
|
8133
8214
|
const elementsCount = sectionRow.elements.length;
|
|
@@ -8138,14 +8219,14 @@ var DataForm = (props) => {
|
|
|
8138
8219
|
sectionRow.visible
|
|
8139
8220
|
);
|
|
8140
8221
|
}
|
|
8141
|
-
return /* @__PURE__ */ (0,
|
|
8142
|
-
return /* @__PURE__ */ (0,
|
|
8222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react60.default.Fragment, { children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "lg:flex gap-14 flex-1 mb-4 ", children: sectionRow.elements.map((field, index) => {
|
|
8223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
8143
8224
|
"div",
|
|
8144
8225
|
{
|
|
8145
8226
|
className: sectionRow.grow ? "grow" : "",
|
|
8146
8227
|
children: [
|
|
8147
|
-
/* @__PURE__ */ (0,
|
|
8148
|
-
/* @__PURE__ */ (0,
|
|
8228
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { children: field.controlType }),
|
|
8229
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8149
8230
|
InputControl_default,
|
|
8150
8231
|
{
|
|
8151
8232
|
name: field.name,
|
|
@@ -8175,12 +8256,12 @@ var DataForm = (props) => {
|
|
|
8175
8256
|
}) }) }, sectionRowIndex);
|
|
8176
8257
|
}
|
|
8177
8258
|
),
|
|
8178
|
-
/* @__PURE__ */ (0,
|
|
8259
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { children: section.childSections?.map(
|
|
8179
8260
|
(childSection, childSectionIndex) => {
|
|
8180
|
-
return /* @__PURE__ */ (0,
|
|
8261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { children: childSection.name && evalutateCondition(
|
|
8181
8262
|
formState.inputValues,
|
|
8182
8263
|
childSection.visible
|
|
8183
|
-
) && /* @__PURE__ */ (0,
|
|
8264
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8184
8265
|
DataFormChildSection_default,
|
|
8185
8266
|
{
|
|
8186
8267
|
section: childSection,
|
|
@@ -8195,8 +8276,8 @@ var DataForm = (props) => {
|
|
|
8195
8276
|
}) })
|
|
8196
8277
|
}
|
|
8197
8278
|
),
|
|
8198
|
-
/* @__PURE__ */ (0,
|
|
8199
|
-
/* @__PURE__ */ (0,
|
|
8279
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex px-6 py-3 mt-2 mb-2 justify-end items-center gap-5", children: [
|
|
8280
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { children: props.additionalActions && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8200
8281
|
Button_default,
|
|
8201
8282
|
{
|
|
8202
8283
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -8204,7 +8285,7 @@ var DataForm = (props) => {
|
|
|
8204
8285
|
children: props.additionalActions.title
|
|
8205
8286
|
}
|
|
8206
8287
|
) }),
|
|
8207
|
-
/* @__PURE__ */ (0,
|
|
8288
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { children: props.onDelete && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8208
8289
|
Button_default,
|
|
8209
8290
|
{
|
|
8210
8291
|
ButtonType: "PrimaryHollow" /* Hollow */,
|
|
@@ -8215,7 +8296,7 @@ var DataForm = (props) => {
|
|
|
8215
8296
|
children: "Delete"
|
|
8216
8297
|
}
|
|
8217
8298
|
) }),
|
|
8218
|
-
/* @__PURE__ */ (0,
|
|
8299
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { children: props.onClick && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8219
8300
|
Button_default,
|
|
8220
8301
|
{
|
|
8221
8302
|
onValidate,
|
|
@@ -8233,7 +8314,7 @@ var DataForm_default = DataForm;
|
|
|
8233
8314
|
|
|
8234
8315
|
// src/components/dataForm/DataFormRenderer.tsx
|
|
8235
8316
|
init_ServiceClient();
|
|
8236
|
-
var
|
|
8317
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
8237
8318
|
function getAction(actions, code) {
|
|
8238
8319
|
return actions?.find((a) => a.actionCode === code);
|
|
8239
8320
|
}
|
|
@@ -8259,9 +8340,9 @@ var DataFormRenderer = ({
|
|
|
8259
8340
|
"Delete"
|
|
8260
8341
|
);
|
|
8261
8342
|
const hasDataItem = dataItem && Object.keys(dataItem).length > 0;
|
|
8262
|
-
return /* @__PURE__ */ (0,
|
|
8263
|
-
widgetProps && /* @__PURE__ */ (0,
|
|
8264
|
-
/* @__PURE__ */ (0,
|
|
8343
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "flex-grow flex flex-col", children: [
|
|
8344
|
+
widgetProps && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(NavigationTabsV2_default, { tabs, params: widgetProps.params }),
|
|
8345
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8265
8346
|
DataForm_default,
|
|
8266
8347
|
{
|
|
8267
8348
|
title: !isAddPage ? "Edit " + formDefinition.formTitle + "- v2" : "Add " + formDefinition.formTitle + "- v2",
|