@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260428111737 → 0.8.1-dev.20260429062753
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -13
- package/dist/index.mjs +69 -77
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1296,23 +1296,13 @@ var timeZoneAbbreviations = {
|
|
|
1296
1296
|
// src/components/controls/view/DateView.tsx
|
|
1297
1297
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
1298
1298
|
var DateView = (props) => {
|
|
1299
|
-
const
|
|
1300
|
-
(0, import_react2.useEffect)(() => {
|
|
1301
|
-
setUserTimeZone(Intl.DateTimeFormat().resolvedOptions().timeZone);
|
|
1302
|
-
}, []);
|
|
1303
|
-
if (!userTimeZone) return null;
|
|
1299
|
+
const userTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
1304
1300
|
const getTimeZoneAbbreviation = (timeZone) => {
|
|
1305
1301
|
return timeZoneAbbreviations[timeZone] || timeZone;
|
|
1306
1302
|
};
|
|
1307
|
-
const toUtcDate = (dateString) => {
|
|
1308
|
-
const s = dateString.trim();
|
|
1309
|
-
const iso = s.replace(" ", "T");
|
|
1310
|
-
const utc = iso.endsWith("Z") || iso.includes("+") ? iso : iso + "Z";
|
|
1311
|
-
return new Date(utc);
|
|
1312
|
-
};
|
|
1313
1303
|
const getRelativeTime = (dateString) => {
|
|
1314
1304
|
const now = /* @__PURE__ */ new Date();
|
|
1315
|
-
const date =
|
|
1305
|
+
const date = /* @__PURE__ */ new Date(dateString + "Z");
|
|
1316
1306
|
const diffMs = now.getTime() - date.getTime();
|
|
1317
1307
|
const diffSec = Math.floor(diffMs / 1e3);
|
|
1318
1308
|
const diffMin = Math.floor(diffSec / 60);
|
|
@@ -1329,8 +1319,9 @@ var DateView = (props) => {
|
|
|
1329
1319
|
timeZone: userTimeZone
|
|
1330
1320
|
}).format(date);
|
|
1331
1321
|
};
|
|
1322
|
+
console.log("DateView props:", props);
|
|
1332
1323
|
const parseAndFormatDate = (dateString, format) => {
|
|
1333
|
-
const parsedDate =
|
|
1324
|
+
const parsedDate = /* @__PURE__ */ new Date(dateString + "Z");
|
|
1334
1325
|
if (format === "relative") {
|
|
1335
1326
|
return getRelativeTime(dateString);
|
|
1336
1327
|
}
|
|
@@ -5243,6 +5234,7 @@ ${cssRules.join(
|
|
|
5243
5234
|
@media (max-width: 480px) {
|
|
5244
5235
|
#${guid} {
|
|
5245
5236
|
grid-template-columns: repeat(${mobileColumns}, minmax(0, 1fr));
|
|
5237
|
+
grid-column: unset;
|
|
5246
5238
|
}
|
|
5247
5239
|
}`;
|
|
5248
5240
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -43,7 +43,7 @@ var NumberView = (props) => {
|
|
|
43
43
|
var NumberView_default = NumberView;
|
|
44
44
|
|
|
45
45
|
// src/components/controls/view/DateView.tsx
|
|
46
|
-
import React2
|
|
46
|
+
import React2 from "react";
|
|
47
47
|
|
|
48
48
|
// src/components/controls/view/TimeZoneAbbrevations.tsx
|
|
49
49
|
var timeZoneAbbreviations = {
|
|
@@ -164,23 +164,13 @@ var timeZoneAbbreviations = {
|
|
|
164
164
|
// src/components/controls/view/DateView.tsx
|
|
165
165
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
166
166
|
var DateView = (props) => {
|
|
167
|
-
const
|
|
168
|
-
useEffect(() => {
|
|
169
|
-
setUserTimeZone(Intl.DateTimeFormat().resolvedOptions().timeZone);
|
|
170
|
-
}, []);
|
|
171
|
-
if (!userTimeZone) return null;
|
|
167
|
+
const userTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
172
168
|
const getTimeZoneAbbreviation = (timeZone) => {
|
|
173
169
|
return timeZoneAbbreviations[timeZone] || timeZone;
|
|
174
170
|
};
|
|
175
|
-
const toUtcDate = (dateString) => {
|
|
176
|
-
const s = dateString.trim();
|
|
177
|
-
const iso = s.replace(" ", "T");
|
|
178
|
-
const utc = iso.endsWith("Z") || iso.includes("+") ? iso : iso + "Z";
|
|
179
|
-
return new Date(utc);
|
|
180
|
-
};
|
|
181
171
|
const getRelativeTime = (dateString) => {
|
|
182
172
|
const now = /* @__PURE__ */ new Date();
|
|
183
|
-
const date =
|
|
173
|
+
const date = /* @__PURE__ */ new Date(dateString + "Z");
|
|
184
174
|
const diffMs = now.getTime() - date.getTime();
|
|
185
175
|
const diffSec = Math.floor(diffMs / 1e3);
|
|
186
176
|
const diffMin = Math.floor(diffSec / 60);
|
|
@@ -197,8 +187,9 @@ var DateView = (props) => {
|
|
|
197
187
|
timeZone: userTimeZone
|
|
198
188
|
}).format(date);
|
|
199
189
|
};
|
|
190
|
+
console.log("DateView props:", props);
|
|
200
191
|
const parseAndFormatDate = (dateString, format) => {
|
|
201
|
-
const parsedDate =
|
|
192
|
+
const parsedDate = /* @__PURE__ */ new Date(dateString + "Z");
|
|
202
193
|
if (format === "relative") {
|
|
203
194
|
return getRelativeTime(dateString);
|
|
204
195
|
}
|
|
@@ -616,10 +607,10 @@ var InputControlType = {
|
|
|
616
607
|
var InputControlType_default = InputControlType;
|
|
617
608
|
|
|
618
609
|
// src/components/controls/edit/Select.tsx
|
|
619
|
-
import { useState
|
|
610
|
+
import { useState, useEffect } from "react";
|
|
620
611
|
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
621
612
|
var Select = (props) => {
|
|
622
|
-
const [list, setList] =
|
|
613
|
+
const [list, setList] = useState([]);
|
|
623
614
|
const getSafeValue = (val) => {
|
|
624
615
|
if (val === null || val === void 0) return "";
|
|
625
616
|
if (typeof val === "boolean") return val ? "1" : "0";
|
|
@@ -648,7 +639,7 @@ var Select = (props) => {
|
|
|
648
639
|
groupKey: props.groupKey
|
|
649
640
|
});
|
|
650
641
|
};
|
|
651
|
-
|
|
642
|
+
useEffect(() => {
|
|
652
643
|
async function fetchData() {
|
|
653
644
|
if (props.dataset) {
|
|
654
645
|
setList(props.dataset);
|
|
@@ -1029,11 +1020,11 @@ var DateTimeInput = (props) => {
|
|
|
1029
1020
|
var DateTimeInput_default = DateTimeInput;
|
|
1030
1021
|
|
|
1031
1022
|
// src/components/controls/edit/ColorInput.tsx
|
|
1032
|
-
import React21, { useEffect as
|
|
1023
|
+
import React21, { useEffect as useEffect2 } from "react";
|
|
1033
1024
|
import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1034
1025
|
var ColorInput = (props) => {
|
|
1035
1026
|
const [color, setColor] = React21.useState("#3b82f6");
|
|
1036
|
-
|
|
1027
|
+
useEffect2(() => {
|
|
1037
1028
|
if (props.value !== void 0 && props.value !== null) {
|
|
1038
1029
|
if (typeof props.value === "string") {
|
|
1039
1030
|
setColor(props.value);
|
|
@@ -1075,15 +1066,15 @@ var ColorInput = (props) => {
|
|
|
1075
1066
|
var ColorInput_default = ColorInput;
|
|
1076
1067
|
|
|
1077
1068
|
// src/components/controls/edit/SelectWithSearchInput.tsx
|
|
1078
|
-
import { useEffect as
|
|
1069
|
+
import { useEffect as useEffect3, useRef, useState as useState2 } from "react";
|
|
1079
1070
|
import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1080
1071
|
var SelectWithSearchInput = (props) => {
|
|
1081
|
-
const [isOpen, setIsOpen] =
|
|
1082
|
-
const [searchTerm, setSearchTerm] =
|
|
1083
|
-
const [highlightedIndex, setHighlightedIndex] =
|
|
1084
|
-
const [selectedItem, setSelectedItem] =
|
|
1085
|
-
const [list, setList] =
|
|
1086
|
-
|
|
1072
|
+
const [isOpen, setIsOpen] = useState2(false);
|
|
1073
|
+
const [searchTerm, setSearchTerm] = useState2("");
|
|
1074
|
+
const [highlightedIndex, setHighlightedIndex] = useState2(-1);
|
|
1075
|
+
const [selectedItem, setSelectedItem] = useState2(null);
|
|
1076
|
+
const [list, setList] = useState2([]);
|
|
1077
|
+
useEffect3(() => {
|
|
1087
1078
|
async function fetchData() {
|
|
1088
1079
|
if (props.dataset) {
|
|
1089
1080
|
setList(props.dataset);
|
|
@@ -1138,7 +1129,7 @@ var SelectWithSearchInput = (props) => {
|
|
|
1138
1129
|
}
|
|
1139
1130
|
};
|
|
1140
1131
|
const dropdownRef = useRef(null);
|
|
1141
|
-
|
|
1132
|
+
useEffect3(() => {
|
|
1142
1133
|
if (highlightedIndex >= 0 && dropdownRef.current) {
|
|
1143
1134
|
const highlightedItem = dropdownRef.current.children[highlightedIndex];
|
|
1144
1135
|
highlightedItem?.scrollIntoView({
|
|
@@ -1224,26 +1215,26 @@ var SelectWithSearchInput_default = SelectWithSearchInput;
|
|
|
1224
1215
|
|
|
1225
1216
|
// src/components/controls/edit/SelectWithSearchPanel.tsx
|
|
1226
1217
|
import React23, {
|
|
1227
|
-
useEffect as
|
|
1218
|
+
useEffect as useEffect4,
|
|
1228
1219
|
useRef as useRef2,
|
|
1229
|
-
useState as
|
|
1220
|
+
useState as useState3,
|
|
1230
1221
|
useCallback
|
|
1231
1222
|
} from "react";
|
|
1232
1223
|
import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1233
1224
|
var SelectWithSearchPanel = (props) => {
|
|
1234
|
-
const [isOpen, setIsOpen] =
|
|
1235
|
-
const [searchTerm, setSearchTerm] =
|
|
1236
|
-
const [highlightedIndex, setHighlightedIndex] =
|
|
1237
|
-
const [list, setList] =
|
|
1225
|
+
const [isOpen, setIsOpen] = useState3(false);
|
|
1226
|
+
const [searchTerm, setSearchTerm] = useState3("");
|
|
1227
|
+
const [highlightedIndex, setHighlightedIndex] = useState3(0);
|
|
1228
|
+
const [list, setList] = useState3([]);
|
|
1238
1229
|
const listRef = useRef2(null);
|
|
1239
|
-
const [isError, setIsError] =
|
|
1230
|
+
const [isError, setIsError] = useState3(false);
|
|
1240
1231
|
const containerRef = useRef2(null);
|
|
1241
|
-
const [isCreateOpen, setIsCreateOpen] =
|
|
1242
|
-
const [formData, setFormData] =
|
|
1232
|
+
const [isCreateOpen, setIsCreateOpen] = useState3(false);
|
|
1233
|
+
const [formData, setFormData] = useState3({});
|
|
1243
1234
|
const getNestedValue3 = (obj, path) => {
|
|
1244
1235
|
return path.split(".").reduce((acc, key) => acc?.[key], obj);
|
|
1245
1236
|
};
|
|
1246
|
-
|
|
1237
|
+
useEffect4(() => {
|
|
1247
1238
|
const handleClickOutside = (event) => {
|
|
1248
1239
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
1249
1240
|
setIsOpen(false);
|
|
@@ -1254,7 +1245,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1254
1245
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
1255
1246
|
};
|
|
1256
1247
|
}, []);
|
|
1257
|
-
|
|
1248
|
+
useEffect4(() => {
|
|
1258
1249
|
async function fetchData() {
|
|
1259
1250
|
if (props.dataset) {
|
|
1260
1251
|
setList(props.dataset);
|
|
@@ -1296,7 +1287,7 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1296
1287
|
audioCtx.close();
|
|
1297
1288
|
}, 250);
|
|
1298
1289
|
};
|
|
1299
|
-
|
|
1290
|
+
useEffect4(() => {
|
|
1300
1291
|
const filteredItems2 = list?.filter(
|
|
1301
1292
|
(item) => item[props?.dataTextFieldName]?.toLowerCase().includes(searchTerm?.toLowerCase())
|
|
1302
1293
|
);
|
|
@@ -1476,12 +1467,12 @@ var SelectWithSearchPanel_default = SelectWithSearchPanel;
|
|
|
1476
1467
|
|
|
1477
1468
|
// src/components/controls/edit/BooleanSelect.tsx
|
|
1478
1469
|
import React24, {
|
|
1479
|
-
useState as
|
|
1480
|
-
useEffect as
|
|
1470
|
+
useState as useState4,
|
|
1471
|
+
useEffect as useEffect5
|
|
1481
1472
|
} from "react";
|
|
1482
1473
|
import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1483
1474
|
var BooleanSelect = (props) => {
|
|
1484
|
-
const [list, setList] =
|
|
1475
|
+
const [list, setList] = useState4();
|
|
1485
1476
|
const textChangeHandler = (event) => {
|
|
1486
1477
|
const text = event.target.value;
|
|
1487
1478
|
const boolValue = text?.toLowerCase() === "true" || text === "1";
|
|
@@ -1494,7 +1485,7 @@ var BooleanSelect = (props) => {
|
|
|
1494
1485
|
});
|
|
1495
1486
|
}
|
|
1496
1487
|
};
|
|
1497
|
-
|
|
1488
|
+
useEffect5(() => {
|
|
1498
1489
|
async function fetchData() {
|
|
1499
1490
|
console.log("in select");
|
|
1500
1491
|
if (props.dataset) {
|
|
@@ -1654,7 +1645,7 @@ var TimeInput = (props) => {
|
|
|
1654
1645
|
var TimeInput_default = TimeInput;
|
|
1655
1646
|
|
|
1656
1647
|
// src/components/controls/edit/AssetUpload.tsx
|
|
1657
|
-
import React27, { useEffect as
|
|
1648
|
+
import React27, { useEffect as useEffect6 } from "react";
|
|
1658
1649
|
|
|
1659
1650
|
// src/components/utilities/AssetUtility.tsx
|
|
1660
1651
|
var AssetUtility = class {
|
|
@@ -1772,7 +1763,7 @@ var AssetUpload = (props) => {
|
|
|
1772
1763
|
return "image";
|
|
1773
1764
|
};
|
|
1774
1765
|
const [assetType, setAssetType] = React27.useState(getInitialTab);
|
|
1775
|
-
|
|
1766
|
+
useEffect6(() => {
|
|
1776
1767
|
setAssetType(getInitialTab());
|
|
1777
1768
|
}, [props.value]);
|
|
1778
1769
|
const assetUploadCallback = (newAsset) => {
|
|
@@ -2877,7 +2868,7 @@ var WidgetNode = (props) => {
|
|
|
2877
2868
|
var WidgetNode_default = WidgetNode;
|
|
2878
2869
|
|
|
2879
2870
|
// src/components/pageRenderingEngine/nodes/FormContainerNode.tsx
|
|
2880
|
-
import React38, { useRef as useRef3, useReducer, useCallback as useCallback2, useEffect as
|
|
2871
|
+
import React38, { useRef as useRef3, useReducer, useCallback as useCallback2, useEffect as useEffect7 } from "react";
|
|
2881
2872
|
|
|
2882
2873
|
// src/components/pageRenderingEngine/nodes/InputControlNode.tsx
|
|
2883
2874
|
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
@@ -2970,7 +2961,7 @@ var FormContainerNode = (props) => {
|
|
|
2970
2961
|
const handleInputChange = useCallback2((updatedValues) => {
|
|
2971
2962
|
dispatch({ type: FORM_INPUT_UPDATE, name: updatedValues.name, value: updatedValues.value });
|
|
2972
2963
|
}, [dispatch]);
|
|
2973
|
-
|
|
2964
|
+
useEffect7(() => {
|
|
2974
2965
|
const fetchInitialData = async () => {
|
|
2975
2966
|
const client = new ServiceClient_default(props.apiBaseUrl, props.session);
|
|
2976
2967
|
const response = await client.getSingle(props.node.dataFetchApi, props.routeParameters);
|
|
@@ -3027,7 +3018,7 @@ var EmbedNode = (props) => {
|
|
|
3027
3018
|
var EmbedNode_default = EmbedNode;
|
|
3028
3019
|
|
|
3029
3020
|
// src/components/Slider.tsx
|
|
3030
|
-
import React39, { useState as
|
|
3021
|
+
import React39, { useState as useState5, useEffect as useEffect8, Children, cloneElement } from "react";
|
|
3031
3022
|
import { Fragment as Fragment7, jsx as jsx54, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3032
3023
|
var Slider = ({
|
|
3033
3024
|
children,
|
|
@@ -3046,13 +3037,13 @@ var Slider = ({
|
|
|
3046
3037
|
pillStyle = "cumulative",
|
|
3047
3038
|
progressPosition = "bottom"
|
|
3048
3039
|
}) => {
|
|
3049
|
-
const [currentSlide, setCurrentSlide] =
|
|
3050
|
-
const [transition, setTransition] =
|
|
3051
|
-
const [slidesToShowState, setSlidesToShowState] =
|
|
3040
|
+
const [currentSlide, setCurrentSlide] = useState5(0);
|
|
3041
|
+
const [transition, setTransition] = useState5(true);
|
|
3042
|
+
const [slidesToShowState, setSlidesToShowState] = useState5(
|
|
3052
3043
|
typeof slidesToShow === "number" ? slidesToShow : slidesToShow.large
|
|
3053
3044
|
);
|
|
3054
|
-
const [isPlaying, setIsPlaying] =
|
|
3055
|
-
|
|
3045
|
+
const [isPlaying, setIsPlaying] = useState5(autoplay);
|
|
3046
|
+
useEffect8(() => {
|
|
3056
3047
|
if (typeof slidesToShow === "number") return;
|
|
3057
3048
|
const handleResize = () => {
|
|
3058
3049
|
if (window.innerWidth >= 1024) {
|
|
@@ -3067,7 +3058,7 @@ var Slider = ({
|
|
|
3067
3058
|
window.addEventListener("resize", handleResize);
|
|
3068
3059
|
return () => window.removeEventListener("resize", handleResize);
|
|
3069
3060
|
}, [slidesToShow]);
|
|
3070
|
-
|
|
3061
|
+
useEffect8(() => {
|
|
3071
3062
|
if (!autoplay) return;
|
|
3072
3063
|
const timer = setInterval(() => {
|
|
3073
3064
|
if (isPlaying) {
|
|
@@ -3243,13 +3234,13 @@ var ProgressPill = ({
|
|
|
3243
3234
|
currentSlide,
|
|
3244
3235
|
totalSlides
|
|
3245
3236
|
}) => {
|
|
3246
|
-
const [progress, setProgress] =
|
|
3247
|
-
|
|
3237
|
+
const [progress, setProgress] = useState5(0);
|
|
3238
|
+
useEffect8(() => {
|
|
3248
3239
|
if (active) {
|
|
3249
3240
|
setProgress(0);
|
|
3250
3241
|
}
|
|
3251
3242
|
}, [active, index]);
|
|
3252
|
-
|
|
3243
|
+
useEffect8(() => {
|
|
3253
3244
|
if (!active || !isPlaying) {
|
|
3254
3245
|
if (!active) {
|
|
3255
3246
|
setProgress(0);
|
|
@@ -4108,6 +4099,7 @@ ${cssRules.join(
|
|
|
4108
4099
|
@media (max-width: 480px) {
|
|
4109
4100
|
#${guid} {
|
|
4110
4101
|
grid-template-columns: repeat(${mobileColumns}, minmax(0, 1fr));
|
|
4102
|
+
grid-column: unset;
|
|
4111
4103
|
}
|
|
4112
4104
|
}`;
|
|
4113
4105
|
}
|
|
@@ -4413,12 +4405,12 @@ var PageBodyRenderer = (props) => {
|
|
|
4413
4405
|
var PageBodyRenderer_default = PageBodyRenderer;
|
|
4414
4406
|
|
|
4415
4407
|
// src/components/Toast.tsx
|
|
4416
|
-
import { useState as
|
|
4408
|
+
import { useState as useState7 } from "react";
|
|
4417
4409
|
import { Fragment as Fragment9, jsx as jsx60, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4418
4410
|
var Toast = () => {
|
|
4419
|
-
const [showToast, setShowToast] =
|
|
4420
|
-
const [message, setMessage] =
|
|
4421
|
-
const [messageType, setMessageType] =
|
|
4411
|
+
const [showToast, setShowToast] = useState7(false);
|
|
4412
|
+
const [message, setMessage] = useState7("");
|
|
4413
|
+
const [messageType, setMessageType] = useState7("error");
|
|
4422
4414
|
ToastService_default.showError = function(message2) {
|
|
4423
4415
|
setShowToast(true);
|
|
4424
4416
|
setMessage(message2);
|
|
@@ -4523,7 +4515,7 @@ var NavigationTabsV2 = ({ tabs, params = {} }) => {
|
|
|
4523
4515
|
var NavigationTabsV2_default = NavigationTabsV2;
|
|
4524
4516
|
|
|
4525
4517
|
// src/components/dataForm/DataList.tsx
|
|
4526
|
-
import React46, { useEffect as
|
|
4518
|
+
import React46, { useEffect as useEffect9, useState as useState8, useCallback as useCallback3, useReducer as useReducer2 } from "react";
|
|
4527
4519
|
import { useRouter } from "next/navigation";
|
|
4528
4520
|
|
|
4529
4521
|
// src/components/dataForm/NoContentView.tsx
|
|
@@ -4586,8 +4578,8 @@ var DataList = (props) => {
|
|
|
4586
4578
|
let activePageNumber = 0;
|
|
4587
4579
|
let pages = 0;
|
|
4588
4580
|
console.log(props.addLinkText);
|
|
4589
|
-
const [isDataFound, setIsDataFound] =
|
|
4590
|
-
|
|
4581
|
+
const [isDataFound, setIsDataFound] = useState8(null);
|
|
4582
|
+
useEffect9(() => {
|
|
4591
4583
|
if (props?.dataset) {
|
|
4592
4584
|
if (props?.dataset.result && props.dataset.result.length > 0) {
|
|
4593
4585
|
setIsDataFound(true);
|
|
@@ -5030,7 +5022,7 @@ var DataList = (props) => {
|
|
|
5030
5022
|
var DataList_default = DataList;
|
|
5031
5023
|
|
|
5032
5024
|
// src/components/dataForm/DataListRenderer.tsx
|
|
5033
|
-
import React47, { useState as
|
|
5025
|
+
import React47, { useState as useState9, useEffect as useEffect10 } from "react";
|
|
5034
5026
|
import { usePathname as usePathname2 } from "next/navigation";
|
|
5035
5027
|
import { jsx as jsx65, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
5036
5028
|
var viewControlMap = {
|
|
@@ -5086,14 +5078,14 @@ var DataListRenderer = ({
|
|
|
5086
5078
|
widgetProps
|
|
5087
5079
|
}) => {
|
|
5088
5080
|
const serviceClient = new ServiceClient_default(apiBaseUrl, session);
|
|
5089
|
-
const [columns, setColumns] =
|
|
5090
|
-
const [dataset, setDataset] =
|
|
5091
|
-
const [filter, setFilters] =
|
|
5092
|
-
const [addLinkHref, setAddLinkHref] =
|
|
5093
|
-
const [addLinkText, setAddLinkText] =
|
|
5094
|
-
const [serviceRoute, setServiceRoute] =
|
|
5081
|
+
const [columns, setColumns] = useState9([]);
|
|
5082
|
+
const [dataset, setDataset] = useState9();
|
|
5083
|
+
const [filter, setFilters] = useState9([]);
|
|
5084
|
+
const [addLinkHref, setAddLinkHref] = useState9("");
|
|
5085
|
+
const [addLinkText, setAddLinkText] = useState9("");
|
|
5086
|
+
const [serviceRoute, setServiceRoute] = useState9("");
|
|
5095
5087
|
const pathname = usePathname2();
|
|
5096
|
-
|
|
5088
|
+
useEffect10(() => {
|
|
5097
5089
|
if (!formDefinition) return;
|
|
5098
5090
|
setColumns(mapApiToColumns(formDefinition));
|
|
5099
5091
|
setFilters(mapApiToFilters(formDefinition));
|
|
@@ -5106,7 +5098,7 @@ var DataListRenderer = ({
|
|
|
5106
5098
|
setAddLinkHref(resolvedAddLinkHref);
|
|
5107
5099
|
setAddLinkText(formDefinition?.siteFormDataList?.addLinkText ?? "");
|
|
5108
5100
|
}, [formDefinition, params]);
|
|
5109
|
-
|
|
5101
|
+
useEffect10(() => {
|
|
5110
5102
|
const fetchData = async () => {
|
|
5111
5103
|
if (!serviceRoute) return;
|
|
5112
5104
|
const resolvedRoute = resolveRoutePlaceholders2(serviceRoute, params);
|
|
@@ -5118,7 +5110,7 @@ var DataListRenderer = ({
|
|
|
5118
5110
|
};
|
|
5119
5111
|
fetchData();
|
|
5120
5112
|
}, [serviceRoute, query, params]);
|
|
5121
|
-
const [tabItem, setTabItem] =
|
|
5113
|
+
const [tabItem, setTabItem] = useState9();
|
|
5122
5114
|
const activeTab = tabItem?.find((tab) => tab.isActive);
|
|
5123
5115
|
const activeHref = activeTab ? resolveRoutePlaceholders2(activeTab.landingPageUrl, params) : pathname;
|
|
5124
5116
|
return /* @__PURE__ */ jsxs37(React47.Fragment, { children: [
|
|
@@ -5142,7 +5134,7 @@ var DataListRenderer = ({
|
|
|
5142
5134
|
var DataListRenderer_default = DataListRenderer;
|
|
5143
5135
|
|
|
5144
5136
|
// src/components/dataForm/DataForm.tsx
|
|
5145
|
-
import React49, { useCallback as useCallback5, useEffect as
|
|
5137
|
+
import React49, { useCallback as useCallback5, useEffect as useEffect11, useReducer as useReducer3, useRef as useRef4 } from "react";
|
|
5146
5138
|
|
|
5147
5139
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
5148
5140
|
import React48, { useCallback as useCallback4 } from "react";
|
|
@@ -5424,7 +5416,7 @@ var DataForm = (props) => {
|
|
|
5424
5416
|
console.error("Error fetching data:", error);
|
|
5425
5417
|
}
|
|
5426
5418
|
}, [formState.lastPropertyChanged, formState.inputValues]);
|
|
5427
|
-
|
|
5419
|
+
useEffect11(() => {
|
|
5428
5420
|
fetchData();
|
|
5429
5421
|
}, [formState.inputValues, formState.lastPropertyChanged]);
|
|
5430
5422
|
function replacePlaceholders(template, context, params) {
|
|
@@ -5519,7 +5511,7 @@ var DataForm = (props) => {
|
|
|
5519
5511
|
return { isSuccessful: true };
|
|
5520
5512
|
}
|
|
5521
5513
|
}, [formState, props]);
|
|
5522
|
-
|
|
5514
|
+
useEffect11(() => {
|
|
5523
5515
|
if (props.dataItem) {
|
|
5524
5516
|
dispatch({
|
|
5525
5517
|
type: FORM_INITIAL_UPDATE,
|
package/package.json
CHANGED