@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260722072620 → 0.8.1-dev.20260722073037
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/EnterAnimationClient-4OKXLKSA.mjs +45 -0
- package/dist/EnterAnimationClient-ZN3NLFNO.mjs +47 -0
- package/dist/InputControlClient-AZRPSTUZ.mjs +677 -0
- package/dist/InputControlClient-HIZOJLKW.mjs +677 -0
- package/dist/{InputControlClient-7FJWGZDN.mjs → InputControlClient-QAZKQLFO.mjs} +23 -23
- package/dist/{InputControlClient-5RK7QDZZ.mjs → InputControlClient-QQCQD4EG.mjs} +23 -23
- package/dist/{LinkNodeButton-AOEDCCL7.mjs → LinkNodeButton-LX3KKGZY.mjs} +38 -92
- package/dist/LinkNodeButton-U7T2NP22.mjs +374 -0
- package/dist/{LinkNodeButton-BIZA2NPE.mjs → LinkNodeButton-XA7Z5IDR.mjs} +38 -92
- package/dist/Pagination-6OFACRMQ.mjs +229 -0
- package/dist/Pagination-OQT7Q2XO.mjs +183 -0
- package/dist/chunk-3R4VVVNK.mjs +903 -0
- package/dist/chunk-FI2KJBK2.mjs +110 -0
- package/dist/{chunk-23WJE3YB.mjs → chunk-JKP4XOZB.mjs} +9 -48
- package/dist/chunk-OGGIS4AN.mjs +201 -0
- package/dist/chunk-TVL6KVD5.mjs +229 -0
- package/dist/{chunk-RHVNJMS4.mjs → chunk-YL6E76X2.mjs} +9 -48
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +100 -191
- package/dist/index.mjs +35 -31
- package/dist/server.d.mts +113 -0
- package/dist/server.d.ts +113 -0
- package/dist/server.js +5179 -0
- package/dist/server.mjs +2736 -0
- package/package.json +5 -8
- package/server.d.ts +0 -1
- package/server.js +0 -1
|
@@ -127,7 +127,7 @@ var Confirm_default = Confirm;
|
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
// src/components/Button.tsx
|
|
130
|
-
import {
|
|
130
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
131
131
|
var Button = (props) => {
|
|
132
132
|
const [inProgress, setInProgress] = useState2(false);
|
|
133
133
|
const [isActionPerformed, setIsActionPerformed] = useState2(false);
|
|
@@ -137,9 +137,7 @@ var Button = (props) => {
|
|
|
137
137
|
event.preventDefault();
|
|
138
138
|
event.stopPropagation();
|
|
139
139
|
if (props.confirm) {
|
|
140
|
-
const confirmed = await showConfirmation(
|
|
141
|
-
"Are you sure you want to delete this item?"
|
|
142
|
-
);
|
|
140
|
+
const confirmed = await showConfirmation("Are you sure you want to delete this item?");
|
|
143
141
|
setShowModal(null);
|
|
144
142
|
if (!confirmed) {
|
|
145
143
|
return;
|
|
@@ -154,9 +152,7 @@ var Button = (props) => {
|
|
|
154
152
|
isValid = await props.onValidate();
|
|
155
153
|
if (!isValid) {
|
|
156
154
|
setInProgress(false);
|
|
157
|
-
ToastService_default.showError(
|
|
158
|
-
"There are errors in the form. Please fix them before proceeding."
|
|
159
|
-
);
|
|
155
|
+
ToastService_default.showError("There are errors in the form. Please fix them before proceeding.");
|
|
160
156
|
return;
|
|
161
157
|
}
|
|
162
158
|
}
|
|
@@ -180,16 +176,7 @@ var Button = (props) => {
|
|
|
180
176
|
return new Promise((resolve) => {
|
|
181
177
|
const onConfirm = () => resolve(true);
|
|
182
178
|
const onCancel = () => resolve(false);
|
|
183
|
-
setShowModal(
|
|
184
|
-
/* @__PURE__ */ jsx3(
|
|
185
|
-
Confirm_default,
|
|
186
|
-
{
|
|
187
|
-
message: props.confirmationMessage,
|
|
188
|
-
onConfirm,
|
|
189
|
-
onCancel
|
|
190
|
-
}
|
|
191
|
-
)
|
|
192
|
-
);
|
|
179
|
+
setShowModal(/* @__PURE__ */ jsx3(Confirm_default, { message: props.confirmationMessage, onConfirm, onCancel }));
|
|
193
180
|
});
|
|
194
181
|
};
|
|
195
182
|
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
@@ -203,39 +190,13 @@ var Button = (props) => {
|
|
|
203
190
|
onClick: execute,
|
|
204
191
|
disabled: props.disabled,
|
|
205
192
|
title: isDisabled ? "The button is disabled to prevent any action" : "",
|
|
206
|
-
className:
|
|
193
|
+
className: buttonClass + " relative " + props.className,
|
|
207
194
|
children: [
|
|
208
195
|
isActionPerformed && props.oneTimeAction && responseMessage ? responseMessage : props.children,
|
|
209
|
-
inProgress && /* @__PURE__ */ jsx3(
|
|
210
|
-
"
|
|
211
|
-
{
|
|
212
|
-
|
|
213
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
214
|
-
fill: "none",
|
|
215
|
-
viewBox: "0 0 24 24",
|
|
216
|
-
children: [
|
|
217
|
-
/* @__PURE__ */ jsx3(
|
|
218
|
-
"circle",
|
|
219
|
-
{
|
|
220
|
-
className: "opacity-25",
|
|
221
|
-
cx: "12",
|
|
222
|
-
cy: "12",
|
|
223
|
-
r: "10",
|
|
224
|
-
stroke: "currentColor",
|
|
225
|
-
strokeWidth: "4"
|
|
226
|
-
}
|
|
227
|
-
),
|
|
228
|
-
/* @__PURE__ */ jsx3(
|
|
229
|
-
"path",
|
|
230
|
-
{
|
|
231
|
-
className: "opacity-75",
|
|
232
|
-
fill: "currentColor",
|
|
233
|
-
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
234
|
-
}
|
|
235
|
-
)
|
|
236
|
-
]
|
|
237
|
-
}
|
|
238
|
-
) })
|
|
196
|
+
inProgress && /* @__PURE__ */ jsx3(React3.Fragment, { children: props.hideProgressIndicator === true ? /* @__PURE__ */ jsx3("div", { className: "absolute bottom-0 left-0 h-0.5 bg-gray-400 rounded animate-progress" }) : /* @__PURE__ */ jsxs2("svg", { className: "animate-spin ml-2 mr-3 h-5 w-5 " + progressClass, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
|
|
197
|
+
/* @__PURE__ */ jsx3("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
198
|
+
/* @__PURE__ */ jsx3("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
|
|
199
|
+
] }) })
|
|
239
200
|
]
|
|
240
201
|
}
|
|
241
202
|
),
|
package/dist/index.d.mts
CHANGED
|
@@ -13,7 +13,7 @@ interface ViewControlProps {
|
|
|
13
13
|
session?: any;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
declare const ViewControl:
|
|
16
|
+
declare const ViewControl: (props: ViewControlProps) => React__default.JSX.Element;
|
|
17
17
|
|
|
18
18
|
declare const ViewControlTypes: {
|
|
19
19
|
lineText: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ interface ViewControlProps {
|
|
|
13
13
|
session?: any;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
declare const ViewControl:
|
|
16
|
+
declare const ViewControl: (props: ViewControlProps) => React__default.JSX.Element;
|
|
17
17
|
|
|
18
18
|
declare const ViewControlTypes: {
|
|
19
19
|
lineText: string;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
1
|
"use strict";
|
|
4
2
|
var __create = Object.create;
|
|
5
3
|
var __defProp = Object.defineProperty;
|
|
@@ -1871,9 +1869,7 @@ var init_Button = __esm({
|
|
|
1871
1869
|
event.preventDefault();
|
|
1872
1870
|
event.stopPropagation();
|
|
1873
1871
|
if (props.confirm) {
|
|
1874
|
-
const confirmed = await showConfirmation(
|
|
1875
|
-
"Are you sure you want to delete this item?"
|
|
1876
|
-
);
|
|
1872
|
+
const confirmed = await showConfirmation("Are you sure you want to delete this item?");
|
|
1877
1873
|
setShowModal(null);
|
|
1878
1874
|
if (!confirmed) {
|
|
1879
1875
|
return;
|
|
@@ -1888,9 +1884,7 @@ var init_Button = __esm({
|
|
|
1888
1884
|
isValid = await props.onValidate();
|
|
1889
1885
|
if (!isValid) {
|
|
1890
1886
|
setInProgress(false);
|
|
1891
|
-
ToastService_default.showError(
|
|
1892
|
-
"There are errors in the form. Please fix them before proceeding."
|
|
1893
|
-
);
|
|
1887
|
+
ToastService_default.showError("There are errors in the form. Please fix them before proceeding.");
|
|
1894
1888
|
return;
|
|
1895
1889
|
}
|
|
1896
1890
|
}
|
|
@@ -1914,16 +1908,7 @@ var init_Button = __esm({
|
|
|
1914
1908
|
return new Promise((resolve) => {
|
|
1915
1909
|
const onConfirm = () => resolve(true);
|
|
1916
1910
|
const onCancel = () => resolve(false);
|
|
1917
|
-
setShowModal(
|
|
1918
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1919
|
-
Confirm_default,
|
|
1920
|
-
{
|
|
1921
|
-
message: props.confirmationMessage,
|
|
1922
|
-
onConfirm,
|
|
1923
|
-
onCancel
|
|
1924
|
-
}
|
|
1925
|
-
)
|
|
1926
|
-
);
|
|
1911
|
+
setShowModal(/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Confirm_default, { message: props.confirmationMessage, onConfirm, onCancel }));
|
|
1927
1912
|
});
|
|
1928
1913
|
};
|
|
1929
1914
|
let buttonClass = props.ButtonType ? buttonClasses.get(props.ButtonType) : buttonClasses.get("Primary" /* Solid */);
|
|
@@ -1937,39 +1922,13 @@ var init_Button = __esm({
|
|
|
1937
1922
|
onClick: execute,
|
|
1938
1923
|
disabled: props.disabled,
|
|
1939
1924
|
title: isDisabled ? "The button is disabled to prevent any action" : "",
|
|
1940
|
-
className:
|
|
1925
|
+
className: buttonClass + " relative " + props.className,
|
|
1941
1926
|
children: [
|
|
1942
1927
|
isActionPerformed && props.oneTimeAction && responseMessage ? responseMessage : props.children,
|
|
1943
|
-
inProgress && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1944
|
-
"
|
|
1945
|
-
{
|
|
1946
|
-
|
|
1947
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1948
|
-
fill: "none",
|
|
1949
|
-
viewBox: "0 0 24 24",
|
|
1950
|
-
children: [
|
|
1951
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1952
|
-
"circle",
|
|
1953
|
-
{
|
|
1954
|
-
className: "opacity-25",
|
|
1955
|
-
cx: "12",
|
|
1956
|
-
cy: "12",
|
|
1957
|
-
r: "10",
|
|
1958
|
-
stroke: "currentColor",
|
|
1959
|
-
strokeWidth: "4"
|
|
1960
|
-
}
|
|
1961
|
-
),
|
|
1962
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1963
|
-
"path",
|
|
1964
|
-
{
|
|
1965
|
-
className: "opacity-75",
|
|
1966
|
-
fill: "currentColor",
|
|
1967
|
-
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
1968
|
-
}
|
|
1969
|
-
)
|
|
1970
|
-
]
|
|
1971
|
-
}
|
|
1972
|
-
) })
|
|
1928
|
+
inProgress && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react30.default.Fragment, { children: props.hideProgressIndicator === true ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "absolute bottom-0 left-0 h-0.5 bg-gray-400 rounded animate-progress" }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("svg", { className: "animate-spin ml-2 mr-3 h-5 w-5 " + progressClass, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
|
|
1929
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
1930
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
|
|
1931
|
+
] }) })
|
|
1973
1932
|
]
|
|
1974
1933
|
}
|
|
1975
1934
|
),
|
|
@@ -2842,7 +2801,7 @@ var InputControlClient_exports = {};
|
|
|
2842
2801
|
__export(InputControlClient_exports, {
|
|
2843
2802
|
default: () => InputControlClient_default
|
|
2844
2803
|
});
|
|
2845
|
-
var import_react37, import_jsx_runtime46,
|
|
2804
|
+
var import_react37, import_jsx_runtime46, InputControl, InputControlClient_default;
|
|
2846
2805
|
var init_InputControlClient = __esm({
|
|
2847
2806
|
"src/components/controls/edit/InputControlClient.tsx"() {
|
|
2848
2807
|
"use strict";
|
|
@@ -2868,32 +2827,32 @@ var init_InputControlClient = __esm({
|
|
|
2868
2827
|
init_AssetUpload();
|
|
2869
2828
|
init_SwitchInput();
|
|
2870
2829
|
import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2871
|
-
|
|
2872
|
-
[InputControlType_default.lineTextInput]: LineTextInput_default,
|
|
2873
|
-
[InputControlType_default.emailInput]: EmailInput_default,
|
|
2874
|
-
[InputControlType_default.multilineTextInput]: MultilineTextInput_default,
|
|
2875
|
-
[InputControlType_default.moneyInput]: MoneyInput_default,
|
|
2876
|
-
[InputControlType_default.select]: Select_default,
|
|
2877
|
-
[InputControlType_default.percentageInput]: PercentageInput_default,
|
|
2878
|
-
[InputControlType_default.phoneInput]: PhoneInput_default,
|
|
2879
|
-
[InputControlType_default.numberInput]: NumberInput_default,
|
|
2880
|
-
[InputControlType_default.checkboxInput]: CheckboxInput_default,
|
|
2881
|
-
[InputControlType_default.otpInput]: OtpInput_default,
|
|
2882
|
-
[InputControlType_default.datetimeInput]: DateTimeInput_default,
|
|
2883
|
-
[InputControlType_default.colorInput]: ColorInput_default,
|
|
2884
|
-
[InputControlType_default.selectWithSearchInput]: SelectWithSearchInput_default,
|
|
2885
|
-
[InputControlType_default.selectWithSearchPanel]: SelectWithSearchPanel_default,
|
|
2886
|
-
[InputControlType_default.booleanSelect]: BooleanSelect_default,
|
|
2887
|
-
[InputControlType_default.timeInput]: TimeInput_default,
|
|
2888
|
-
[InputControlType_default.asset]: AssetUpload_default,
|
|
2889
|
-
[InputControlType_default.switchInput]: SwitchInput_default
|
|
2890
|
-
};
|
|
2891
|
-
InputControl = import_react37.default.memo(import_react37.default.forwardRef(
|
|
2830
|
+
InputControl = import_react37.default.forwardRef(
|
|
2892
2831
|
(props, ref) => {
|
|
2893
|
-
const
|
|
2832
|
+
const ControlComponents = {
|
|
2833
|
+
[InputControlType_default.lineTextInput]: LineTextInput_default,
|
|
2834
|
+
[InputControlType_default.emailInput]: EmailInput_default,
|
|
2835
|
+
[InputControlType_default.multilineTextInput]: MultilineTextInput_default,
|
|
2836
|
+
[InputControlType_default.moneyInput]: MoneyInput_default,
|
|
2837
|
+
[InputControlType_default.select]: Select_default,
|
|
2838
|
+
[InputControlType_default.percentageInput]: PercentageInput_default,
|
|
2839
|
+
[InputControlType_default.phoneInput]: PhoneInput_default,
|
|
2840
|
+
[InputControlType_default.numberInput]: NumberInput_default,
|
|
2841
|
+
[InputControlType_default.checkboxInput]: CheckboxInput_default,
|
|
2842
|
+
[InputControlType_default.otpInput]: OtpInput_default,
|
|
2843
|
+
[InputControlType_default.datetimeInput]: DateTimeInput_default,
|
|
2844
|
+
[InputControlType_default.colorInput]: ColorInput_default,
|
|
2845
|
+
[InputControlType_default.selectWithSearchInput]: SelectWithSearchInput_default,
|
|
2846
|
+
[InputControlType_default.selectWithSearchPanel]: SelectWithSearchPanel_default,
|
|
2847
|
+
[InputControlType_default.booleanSelect]: BooleanSelect_default,
|
|
2848
|
+
[InputControlType_default.timeInput]: TimeInput_default,
|
|
2849
|
+
[InputControlType_default.asset]: AssetUpload_default,
|
|
2850
|
+
[InputControlType_default.switchInput]: SwitchInput_default
|
|
2851
|
+
};
|
|
2852
|
+
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
2894
2853
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react37.default.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SelectedControlComponent, { ...props }) : "Control not found" });
|
|
2895
2854
|
}
|
|
2896
|
-
)
|
|
2855
|
+
);
|
|
2897
2856
|
InputControl.displayName = "InputControl";
|
|
2898
2857
|
InputControlClient_default = InputControl;
|
|
2899
2858
|
}
|
|
@@ -3131,8 +3090,6 @@ var init_LinkNodeButton = __esm({
|
|
|
3131
3090
|
LinkNodeButton = (props) => {
|
|
3132
3091
|
const { node, dataitem, children, linkText, linkType, linkUrl } = props;
|
|
3133
3092
|
const [isLoading, setIsLoading] = (0, import_react38.useState)(false);
|
|
3134
|
-
const [successMessage, setSuccessMessage] = (0, import_react38.useState)(null);
|
|
3135
|
-
console.log("LinkNodeButton props:", props);
|
|
3136
3093
|
const extractFieldNames = (0, import_react38.useCallback)((template) => {
|
|
3137
3094
|
if (!template) return [];
|
|
3138
3095
|
const regex = /\{(\{\})?([a-zA-Z_$][a-zA-Z0-9_$]*)(?:\}\})?\}/g;
|
|
@@ -3140,38 +3097,35 @@ var init_LinkNodeButton = __esm({
|
|
|
3140
3097
|
const fieldNames = matches.map((match) => match[2] || match[1]).filter((name, index, self) => self.indexOf(name) === index);
|
|
3141
3098
|
return fieldNames;
|
|
3142
3099
|
}, []);
|
|
3143
|
-
const replaceTemplateVariables = (0, import_react38.useCallback)(
|
|
3144
|
-
(template
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
},
|
|
3173
|
-
[props.routeParameters, dataitem, extractFieldNames]
|
|
3174
|
-
);
|
|
3100
|
+
const replaceTemplateVariables = (0, import_react38.useCallback)((template, responseData) => {
|
|
3101
|
+
if (!template) return template;
|
|
3102
|
+
let result = template;
|
|
3103
|
+
const fieldNames = extractFieldNames(template);
|
|
3104
|
+
if (responseData) {
|
|
3105
|
+
fieldNames.forEach((fieldName) => {
|
|
3106
|
+
const value = getNestedValue7(responseData, fieldName);
|
|
3107
|
+
if (value !== void 0) {
|
|
3108
|
+
const regex1 = new RegExp(`\\{${fieldName}\\}`, "g");
|
|
3109
|
+
const regex2 = new RegExp(`\\{\\{${fieldName}\\}\\}`, "g");
|
|
3110
|
+
result = result.replace(regex1, String(value));
|
|
3111
|
+
result = result.replace(regex2, String(value));
|
|
3112
|
+
}
|
|
3113
|
+
});
|
|
3114
|
+
}
|
|
3115
|
+
if (props.routeParameters) {
|
|
3116
|
+
Object.entries(props.routeParameters).forEach(([key, value]) => {
|
|
3117
|
+
const regex = new RegExp(`\\{\\{${key}\\}\\}`, "g");
|
|
3118
|
+
result = result.replace(regex, String(value));
|
|
3119
|
+
});
|
|
3120
|
+
}
|
|
3121
|
+
if (dataitem) {
|
|
3122
|
+
Object.entries(dataitem).forEach(([key, value]) => {
|
|
3123
|
+
const regex = new RegExp(`\\{\\{${key}\\}\\}`, "g");
|
|
3124
|
+
result = result.replace(regex, String(value));
|
|
3125
|
+
});
|
|
3126
|
+
}
|
|
3127
|
+
return result;
|
|
3128
|
+
}, [props.routeParameters, dataitem, extractFieldNames]);
|
|
3175
3129
|
const getNestedValue7 = (0, import_react38.useCallback)((obj, path) => {
|
|
3176
3130
|
if (!obj || !path) return void 0;
|
|
3177
3131
|
if (obj[path] !== void 0) {
|
|
@@ -3189,10 +3143,7 @@ var init_LinkNodeButton = __esm({
|
|
|
3189
3143
|
}, []);
|
|
3190
3144
|
const onClick = (0, import_react38.useCallback)(async () => {
|
|
3191
3145
|
if (!node.postUrl) {
|
|
3192
|
-
return {
|
|
3193
|
-
isSuccessful: false,
|
|
3194
|
-
message: "No POST URL configured for this button"
|
|
3195
|
-
};
|
|
3146
|
+
return { isSuccessful: false, message: "No POST URL configured for this button" };
|
|
3196
3147
|
}
|
|
3197
3148
|
setIsLoading(true);
|
|
3198
3149
|
try {
|
|
@@ -3218,7 +3169,6 @@ var init_LinkNodeButton = __esm({
|
|
|
3218
3169
|
}
|
|
3219
3170
|
if (response?.message) {
|
|
3220
3171
|
ToastService_default.showSuccess(response.message);
|
|
3221
|
-
setSuccessMessage(response.message);
|
|
3222
3172
|
}
|
|
3223
3173
|
if (response && node.redirectUrl) {
|
|
3224
3174
|
const fieldNames = extractFieldNames(node.redirectUrl);
|
|
@@ -3241,9 +3191,7 @@ var init_LinkNodeButton = __esm({
|
|
|
3241
3191
|
}
|
|
3242
3192
|
});
|
|
3243
3193
|
console.log("Field value map:", fieldValueMap);
|
|
3244
|
-
const missingFields = fieldNames.filter(
|
|
3245
|
-
(fieldName) => !fieldValueMap[fieldName]
|
|
3246
|
-
);
|
|
3194
|
+
const missingFields = fieldNames.filter((fieldName) => !fieldValueMap[fieldName]);
|
|
3247
3195
|
if (missingFields.length > 0) {
|
|
3248
3196
|
console.warn(`Missing field values for: ${missingFields.join(", ")}`);
|
|
3249
3197
|
}
|
|
@@ -3254,10 +3202,7 @@ var init_LinkNodeButton = __esm({
|
|
|
3254
3202
|
resolvedRedirectUrl = resolvedRedirectUrl.replace(regex1, value);
|
|
3255
3203
|
resolvedRedirectUrl = resolvedRedirectUrl.replace(regex2, value);
|
|
3256
3204
|
});
|
|
3257
|
-
resolvedRedirectUrl = replaceTemplateVariables(
|
|
3258
|
-
resolvedRedirectUrl,
|
|
3259
|
-
response
|
|
3260
|
-
);
|
|
3205
|
+
resolvedRedirectUrl = replaceTemplateVariables(resolvedRedirectUrl, response);
|
|
3261
3206
|
console.log("Final redirect URL:", resolvedRedirectUrl);
|
|
3262
3207
|
if (resolvedRedirectUrl && !resolvedRedirectUrl.includes("{")) {
|
|
3263
3208
|
window.location.href = resolvedRedirectUrl;
|
|
@@ -3268,27 +3213,14 @@ var init_LinkNodeButton = __esm({
|
|
|
3268
3213
|
return { isSuccessful: false, message: errorMessage };
|
|
3269
3214
|
}
|
|
3270
3215
|
setIsLoading(false);
|
|
3271
|
-
return {
|
|
3272
|
-
isSuccessful: true,
|
|
3273
|
-
message: response?.message,
|
|
3274
|
-
result: response
|
|
3275
|
-
};
|
|
3216
|
+
return { isSuccessful: true, message: response?.message, result: response };
|
|
3276
3217
|
} catch (err) {
|
|
3277
3218
|
console.error("Button API call failed:", err);
|
|
3278
3219
|
const errorMessage = err.message || "An unexpected error occurred";
|
|
3279
3220
|
setIsLoading(false);
|
|
3280
3221
|
return { isSuccessful: false, message: errorMessage };
|
|
3281
3222
|
}
|
|
3282
|
-
}, [
|
|
3283
|
-
node.postUrl,
|
|
3284
|
-
node.payload,
|
|
3285
|
-
node.redirectUrl,
|
|
3286
|
-
replaceTemplateVariables,
|
|
3287
|
-
extractFieldNames,
|
|
3288
|
-
getNestedValue7,
|
|
3289
|
-
props.apiBaseUrl,
|
|
3290
|
-
props.session
|
|
3291
|
-
]);
|
|
3223
|
+
}, [node.postUrl, node.payload, node.redirectUrl, replaceTemplateVariables, extractFieldNames, getNestedValue7, props.apiBaseUrl, props.session]);
|
|
3292
3224
|
const renderButtonContent = () => {
|
|
3293
3225
|
if (children) {
|
|
3294
3226
|
return children;
|
|
@@ -3298,41 +3230,14 @@ var init_LinkNodeButton = __esm({
|
|
|
3298
3230
|
}
|
|
3299
3231
|
return node.title || "Button";
|
|
3300
3232
|
};
|
|
3301
|
-
const fontSize = node.children?.[0]?.style?.match(/font-size:\s*([^;]+)/)?.[1];
|
|
3302
3233
|
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "link-button-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3303
3234
|
Button_default,
|
|
3304
3235
|
{
|
|
3305
3236
|
ButtonType: linkType,
|
|
3306
3237
|
onClick,
|
|
3307
|
-
disabled: isLoading
|
|
3238
|
+
disabled: isLoading,
|
|
3308
3239
|
className: "w-full",
|
|
3309
|
-
children:
|
|
3310
|
-
"span",
|
|
3311
|
-
{
|
|
3312
|
-
style: fontSize ? { fontSize } : void 0,
|
|
3313
|
-
className: "inline-flex items-center gap-2",
|
|
3314
|
-
children: [
|
|
3315
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3316
|
-
"svg",
|
|
3317
|
-
{
|
|
3318
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3319
|
-
viewBox: "0 0 20 20",
|
|
3320
|
-
fill: "currentColor",
|
|
3321
|
-
className: "w-5 h-5",
|
|
3322
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3323
|
-
"path",
|
|
3324
|
-
{
|
|
3325
|
-
fillRule: "evenodd",
|
|
3326
|
-
d: "M16.704 5.29a1 1 0 010 1.42l-7.25 7.25a1 1 0 01-1.415 0L3.29 9.21a1 1 0 111.415-1.414l4.042 4.042 6.543-6.543a1 1 0 011.414 0z",
|
|
3327
|
-
clipRule: "evenodd"
|
|
3328
|
-
}
|
|
3329
|
-
)
|
|
3330
|
-
}
|
|
3331
|
-
),
|
|
3332
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: successMessage })
|
|
3333
|
-
]
|
|
3334
|
-
}
|
|
3335
|
-
) : renderButtonContent()
|
|
3240
|
+
children: renderButtonContent()
|
|
3336
3241
|
}
|
|
3337
3242
|
) });
|
|
3338
3243
|
};
|
|
@@ -4592,36 +4497,36 @@ var DateTimeVew_default = DateTimeView;
|
|
|
4592
4497
|
|
|
4593
4498
|
// src/components/controls/view/ViewControl.tsx
|
|
4594
4499
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
4595
|
-
var
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4500
|
+
var ViewControl = (props) => {
|
|
4501
|
+
const ControlComponents = {
|
|
4502
|
+
[ViewControlTypes_default.lineText]: LineTextView_default,
|
|
4503
|
+
[ViewControlTypes_default.emailText]: EmailTextView_default,
|
|
4504
|
+
[ViewControlTypes_default.asset]: Asset_default,
|
|
4505
|
+
[ViewControlTypes_default.multilineTextBullets]: MultilineTextBulletsView_default,
|
|
4506
|
+
[ViewControlTypes_default.boolean]: BooleanView_default,
|
|
4507
|
+
[ViewControlTypes_default.checkboxInput]: BooleanView_default,
|
|
4508
|
+
// [ViewControlTypes.timeUntilStarts]: TimeUntilStarts,
|
|
4509
|
+
[ViewControlTypes_default.money]: MoneyView_default,
|
|
4510
|
+
[ViewControlTypes_default.date]: DateView_default,
|
|
4511
|
+
[ViewControlTypes_default.time]: DateView_default,
|
|
4512
|
+
[ViewControlTypes_default.datetime]: DateTimeVew_default,
|
|
4513
|
+
[ViewControlTypes_default.number]: NumberView_default,
|
|
4514
|
+
[ViewControlTypes_default.multilineText]: MultilineTextView_default,
|
|
4515
|
+
[ViewControlTypes_default.multilinetext]: MultilineTextView_default,
|
|
4516
|
+
[ViewControlTypes_default.moneyText]: MoneyView_default,
|
|
4517
|
+
[ViewControlTypes_default.percentage]: PercentageView_default,
|
|
4518
|
+
[ViewControlTypes_default.status]: StatusView_default,
|
|
4519
|
+
[ViewControlTypes_default.statusBg]: StatusBgView_default,
|
|
4520
|
+
[ViewControlTypes_default.progressIndicator]: ProgressIndicator_default,
|
|
4521
|
+
// [ViewControlTypes.timeUntilStarts]: TimeUntilStarts,
|
|
4522
|
+
// [ViewControlTypes.timeUntilStartsStyled]: TimeUntilStartsStyled,
|
|
4523
|
+
[ViewControlTypes_default.aiGeneratedSummary]: AiGeneratedSummary_default,
|
|
4524
|
+
[ViewControlTypes_default.booleanView]: BooleanView_default,
|
|
4525
|
+
[ViewControlTypes_default.text]: LineTextView_default
|
|
4526
|
+
};
|
|
4622
4527
|
const SelectedControlComponent = props.controlType ? ControlComponents[props.controlType] : void 0;
|
|
4623
4528
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react15.default.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
4624
|
-
}
|
|
4529
|
+
};
|
|
4625
4530
|
var ViewControl_default = ViewControl;
|
|
4626
4531
|
|
|
4627
4532
|
// src/components/controls/edit/InputControl.tsx
|
|
@@ -7281,6 +7186,7 @@ var DataList = (props) => {
|
|
|
7281
7186
|
let orderBy = "";
|
|
7282
7187
|
let activePageNumber = 0;
|
|
7283
7188
|
let pages = 0;
|
|
7189
|
+
console.log(props.addLinkText);
|
|
7284
7190
|
const [isDataFound, setIsDataFound] = (0, import_react58.useState)(null);
|
|
7285
7191
|
const [searchTerm, setSearchTerm] = (0, import_react58.useState)(props.query?.searchTerm ?? "");
|
|
7286
7192
|
(0, import_react58.useEffect)(() => {
|
|
@@ -7331,6 +7237,7 @@ var DataList = (props) => {
|
|
|
7331
7237
|
name: updatedValues.name,
|
|
7332
7238
|
value: updatedValues.value
|
|
7333
7239
|
});
|
|
7240
|
+
console.log("ddddaaa", updatedValues.value);
|
|
7334
7241
|
let builder2 = new OdataBuilder(props.path);
|
|
7335
7242
|
builder2 = builder2.setQuery(props.query);
|
|
7336
7243
|
if (updatedValues.value != "" && updatedValues.value != null) {
|
|
@@ -7631,10 +7538,12 @@ var DataList = (props) => {
|
|
|
7631
7538
|
}) }) }),
|
|
7632
7539
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("tbody", { className: "divide-y divide-gray-200 ", children: props.dataset?.result?.map((dataitem, index) => {
|
|
7633
7540
|
let validityClass = "";
|
|
7541
|
+
console.log("dataitem", dataitem);
|
|
7634
7542
|
if (props.recordValidityColumnName && getNestedProperty2(dataitem, props.recordValidityColumnName) == false) {
|
|
7635
7543
|
validityClass = "bg-alert-200";
|
|
7636
7544
|
}
|
|
7637
7545
|
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("tr", { className: validityClass, children: props?.columns?.map((column, colindex) => {
|
|
7546
|
+
console.log("column", column);
|
|
7638
7547
|
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react58.default.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
7639
7548
|
"td",
|
|
7640
7549
|
{
|