@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260831113446 → 0.8.1-dev.20260901054125

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.
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-2R26M6CK.mjs";
8
8
  import {
9
9
  InputControlType_default
10
- } from "./chunk-4R7F7LBL.mjs";
10
+ } from "./chunk-IEY342PD.mjs";
11
11
  import {
12
12
  Button_default,
13
13
  ClientButton_default
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-TQ6BXQ3A.mjs";
19
19
 
20
20
  // src/components/controls/edit/InputControlClient.tsx
21
- import React22 from "react";
21
+ import React20 from "react";
22
22
 
23
23
  // src/components/controls/edit/MultilineTextInput.tsx
24
24
  import React from "react";
@@ -101,6 +101,7 @@ var LineTextInput = (props) => {
101
101
  value,
102
102
  onChange: textChangeHandler,
103
103
  onBlur: props?.onBlur,
104
+ autoFocus: props?.attributes?.autoFocus,
104
105
  required: props?.attributes?.required,
105
106
  placeholder: props?.attributes?.placeholder,
106
107
  maxLength: props?.attributes?.maxLength,
@@ -1111,99 +1112,9 @@ var SelectWithSearchPanel = (props) => {
1111
1112
  };
1112
1113
  var SelectWithSearchPanel_default = SelectWithSearchPanel;
1113
1114
 
1114
- // src/components/controls/edit/BooleanSelect.tsx
1115
- import React14, {
1116
- useState as useState4,
1117
- useEffect as useEffect5
1118
- } from "react";
1119
- import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
1120
- var BooleanSelect = (props) => {
1121
- const [list, setList] = useState4();
1122
- const textChangeHandler = (event) => {
1123
- const text = event.target.value;
1124
- const boolValue = text?.toLowerCase() === "true" || text === "1";
1125
- if (props.callback !== void 0) {
1126
- props.callback({
1127
- name: props.name,
1128
- value: boolValue,
1129
- index: props.index,
1130
- groupKey: props.groupKey
1131
- });
1132
- }
1133
- };
1134
- useEffect5(() => {
1135
- async function fetchData() {
1136
- console.log("in select");
1137
- if (props.dataset) {
1138
- setList(props.dataset);
1139
- } else if (props.dataSource && props.dataSource != "" && props.serviceClient) {
1140
- let dataSource = props.dataSource;
1141
- let response;
1142
- if (props.dataSourceDependsOn) {
1143
- if (props.dependentValue) {
1144
- dataSource = dataSource.replace(
1145
- `{${props.dataSourceDependsOn}}`,
1146
- props.dependentValue
1147
- );
1148
- response = await props.serviceClient.get(dataSource);
1149
- setList(response.result);
1150
- }
1151
- } else {
1152
- response = await props.serviceClient.get(dataSource);
1153
- setList(response.result);
1154
- }
1155
- }
1156
- }
1157
- fetchData();
1158
- }, [
1159
- props.dataSource,
1160
- props.dependentValue,
1161
- props.dataset,
1162
- props.dataSourceDependsOn
1163
- ]);
1164
- let value;
1165
- if (props.value !== void 0 && props.value !== null) {
1166
- value = props.value;
1167
- }
1168
- return /* @__PURE__ */ jsx14(React14.Fragment, { children: /* @__PURE__ */ jsxs14("label", { className: "block", children: [
1169
- /* @__PURE__ */ jsx14("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
1170
- " ",
1171
- props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx14("span", { className: "bg-error-weak", children: "*" }),
1172
- /* @__PURE__ */ jsxs14(
1173
- "select",
1174
- {
1175
- name: props.name,
1176
- id: props.name,
1177
- value,
1178
- onChange: textChangeHandler,
1179
- required: props?.attributes?.required,
1180
- placeholder: props?.attributes?.placeholder,
1181
- disabled: props?.attributes?.readOnly,
1182
- className: "peer mt-1 py-1.5 block w-full text-black rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none\n ",
1183
- children: [
1184
- /* @__PURE__ */ jsx14("option", { className: "", value: "", children: props.attributes?.placeholder || "Select" }),
1185
- list && list.map((item, i) => {
1186
- return /* @__PURE__ */ jsx14(
1187
- "option",
1188
- {
1189
- className: "fac-select-option",
1190
- value: item[props.dataKeyFieldName],
1191
- children: item[props.dataTextFieldName]
1192
- },
1193
- item[props.dataKeyFieldName]
1194
- );
1195
- })
1196
- ]
1197
- }
1198
- ),
1199
- /* @__PURE__ */ jsx14("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
1200
- ] }) });
1201
- };
1202
- var BooleanSelect_default = BooleanSelect;
1203
-
1204
1115
  // src/components/controls/edit/EmailInput.tsx
1205
- import React15 from "react";
1206
- import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
1116
+ import React14 from "react";
1117
+ import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
1207
1118
  var EmailInput = (props) => {
1208
1119
  const textChangeHandler = (event) => {
1209
1120
  const text = event.target.value;
@@ -1228,11 +1139,11 @@ var EmailInput = (props) => {
1228
1139
  if (props.value !== void 0 && props.value !== null) {
1229
1140
  value = props.value;
1230
1141
  }
1231
- return /* @__PURE__ */ jsx15(React15.Fragment, { children: /* @__PURE__ */ jsxs15("label", { className: "block mb-1", children: [
1232
- /* @__PURE__ */ jsx15("span", { className: "text-sm font-medium text-slate-700", children: props?.attributes?.label }),
1142
+ return /* @__PURE__ */ jsx14(React14.Fragment, { children: /* @__PURE__ */ jsxs14("label", { className: "block mb-1", children: [
1143
+ /* @__PURE__ */ jsx14("span", { className: "text-sm font-medium text-slate-700", children: props?.attributes?.label }),
1233
1144
  " ",
1234
- props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx15("span", { className: "bg-error-weak", children: "*" }),
1235
- /* @__PURE__ */ jsx15(
1145
+ props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx14("span", { className: "bg-error-weak", children: "*" }),
1146
+ /* @__PURE__ */ jsx14(
1236
1147
  "input",
1237
1148
  {
1238
1149
  type: "email",
@@ -1248,14 +1159,14 @@ var EmailInput = (props) => {
1248
1159
  className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n transition-all duration-500 ease-in-out"
1249
1160
  }
1250
1161
  ),
1251
- /* @__PURE__ */ jsx15("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 mb-0 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
1162
+ /* @__PURE__ */ jsx14("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 mb-0 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
1252
1163
  ] }) });
1253
1164
  };
1254
1165
  var EmailInput_default = EmailInput;
1255
1166
 
1256
1167
  // src/components/controls/edit/TimeInput.tsx
1257
- import React16 from "react";
1258
- import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
1168
+ import React15 from "react";
1169
+ import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
1259
1170
  var TimeInput = (props) => {
1260
1171
  const timeChangeHandler = (event) => {
1261
1172
  const timeValue = event.target.value;
@@ -1268,11 +1179,11 @@ var TimeInput = (props) => {
1268
1179
  });
1269
1180
  }
1270
1181
  };
1271
- return /* @__PURE__ */ jsx16(React16.Fragment, { children: /* @__PURE__ */ jsxs16("label", { className: "block mb-1", children: [
1272
- /* @__PURE__ */ jsx16("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
1182
+ return /* @__PURE__ */ jsx15(React15.Fragment, { children: /* @__PURE__ */ jsxs15("label", { className: "block mb-1", children: [
1183
+ /* @__PURE__ */ jsx15("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
1273
1184
  " ",
1274
- props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx16("span", { className: "bg-error-weak", children: "*" }),
1275
- /* @__PURE__ */ jsx16("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx16(
1185
+ props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx15("span", { className: "bg-error-weak", children: "*" }),
1186
+ /* @__PURE__ */ jsx15("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx15(
1276
1187
  "input",
1277
1188
  {
1278
1189
  type: "time",
@@ -1285,14 +1196,14 @@ var TimeInput = (props) => {
1285
1196
  className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none"
1286
1197
  }
1287
1198
  ) }),
1288
- /* @__PURE__ */ jsx16("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ?? "" })
1199
+ /* @__PURE__ */ jsx15("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ?? "" })
1289
1200
  ] }) });
1290
1201
  };
1291
1202
  var TimeInput_default = TimeInput;
1292
1203
 
1293
1204
  // src/components/controls/edit/AssetUpload.tsx
1294
- import React17, { useEffect as useEffect6 } from "react";
1295
- import { jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
1205
+ import React16, { useEffect as useEffect5 } from "react";
1206
+ import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
1296
1207
  var AssetUpload = (props) => {
1297
1208
  const isDisabled = props.attributes?.disable ?? false;
1298
1209
  let allValues = [];
@@ -1313,8 +1224,8 @@ var AssetUpload = (props) => {
1313
1224
  }
1314
1225
  return "image";
1315
1226
  };
1316
- const [assetType, setAssetType] = React17.useState(getInitialTab);
1317
- useEffect6(() => {
1227
+ const [assetType, setAssetType] = React16.useState(getInitialTab);
1228
+ useEffect5(() => {
1318
1229
  setAssetType(getInitialTab());
1319
1230
  }, [props.value]);
1320
1231
  const assetUploadCallback = (newAsset) => {
@@ -1389,10 +1300,10 @@ var AssetUpload = (props) => {
1389
1300
  }
1390
1301
  return false;
1391
1302
  };
1392
- return /* @__PURE__ */ jsxs17(React17.Fragment, { children: [
1393
- /* @__PURE__ */ jsx17("label", { className: "block mb-1", children: /* @__PURE__ */ jsx17("span", { className: "text-sm font-medium", children: props?.attributes?.label }) }),
1394
- /* @__PURE__ */ jsxs17("div", { className: "flex gap-6 bg-neutral-100 rounded p-2", children: [
1395
- /* @__PURE__ */ jsx17(
1303
+ return /* @__PURE__ */ jsxs16(React16.Fragment, { children: [
1304
+ /* @__PURE__ */ jsx16("label", { className: "block mb-1", children: /* @__PURE__ */ jsx16("span", { className: "text-sm font-medium", children: props?.attributes?.label }) }),
1305
+ /* @__PURE__ */ jsxs16("div", { className: "flex gap-6 bg-neutral-100 rounded p-2", children: [
1306
+ /* @__PURE__ */ jsx16(
1396
1307
  ClientButton_default,
1397
1308
  {
1398
1309
  className: assetType === "image" ? "px-2 py-1 rounded bg-body-200 scale-95" : "text-neutral-700",
@@ -1402,7 +1313,7 @@ var AssetUpload = (props) => {
1402
1313
  children: "Image Upload"
1403
1314
  }
1404
1315
  ),
1405
- /* @__PURE__ */ jsx17(
1316
+ /* @__PURE__ */ jsx16(
1406
1317
  ClientButton_default,
1407
1318
  {
1408
1319
  className: assetType === "video" ? "bg-body-200 px-2 py-1 rounded-md scale-95" : "text-neutral-700",
@@ -1413,13 +1324,13 @@ var AssetUpload = (props) => {
1413
1324
  }
1414
1325
  )
1415
1326
  ] }),
1416
- shouldShowDetails() && /* @__PURE__ */ jsxs17("div", { className: "relative mt-4 rounded-md p-4 border-2 border-dotted border-gray-300 bg-gray-50", children: [
1417
- /* @__PURE__ */ jsx17("span", { className: "absolute -top-2.5 left-3 bg-primary-600 text-white text-xs px-2 py-0.5 rounded-full", children: getAssetType(allValues[0]) === "video" ? "Video" : "Image" }),
1418
- /* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-3", children: allValues.map((digitalAsset, index) => /* @__PURE__ */ jsxs17("div", { className: "flex justify-between items-start gap-5", children: [
1419
- /* @__PURE__ */ jsxs17("div", { className: "grid grid-cols-2 gap-x-8 gap-y-3 text-sm w-full", children: [
1420
- /* @__PURE__ */ jsxs17("div", { children: [
1421
- /* @__PURE__ */ jsx17("p", { className: "text-gray-500", children: "Title" }),
1422
- /* @__PURE__ */ jsx17(
1327
+ shouldShowDetails() && /* @__PURE__ */ jsxs16("div", { className: "relative mt-4 rounded-md p-4 border-2 border-dotted border-gray-300 bg-gray-50", children: [
1328
+ /* @__PURE__ */ jsx16("span", { className: "absolute -top-2.5 left-3 bg-primary-600 text-white text-xs px-2 py-0.5 rounded-full", children: getAssetType(allValues[0]) === "video" ? "Video" : "Image" }),
1329
+ /* @__PURE__ */ jsx16("div", { className: "flex flex-col gap-3", children: allValues.map((digitalAsset, index) => /* @__PURE__ */ jsxs16("div", { className: "flex justify-between items-start gap-5", children: [
1330
+ /* @__PURE__ */ jsxs16("div", { className: "grid grid-cols-2 gap-x-8 gap-y-3 text-sm w-full", children: [
1331
+ /* @__PURE__ */ jsxs16("div", { children: [
1332
+ /* @__PURE__ */ jsx16("p", { className: "text-gray-500", children: "Title" }),
1333
+ /* @__PURE__ */ jsx16(
1423
1334
  "input",
1424
1335
  {
1425
1336
  type: "text",
@@ -1431,18 +1342,18 @@ var AssetUpload = (props) => {
1431
1342
  }
1432
1343
  )
1433
1344
  ] }),
1434
- digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ jsxs17("div", { children: [
1435
- /* @__PURE__ */ jsx17("p", { className: "text-gray-500", children: "Resolution" }),
1436
- /* @__PURE__ */ jsxs17("p", { className: "font-medium text-gray-900 mt-3", children: [
1345
+ digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ jsxs16("div", { children: [
1346
+ /* @__PURE__ */ jsx16("p", { className: "text-gray-500", children: "Resolution" }),
1347
+ /* @__PURE__ */ jsxs16("p", { className: "font-medium text-gray-900 mt-3", children: [
1437
1348
  digitalAsset.intrinsicWidth,
1438
1349
  "\xD7",
1439
1350
  digitalAsset.intrinsicHeight
1440
1351
  ] })
1441
1352
  ] }),
1442
- (digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ jsxs17("div", { children: [
1443
- /* @__PURE__ */ jsx17("p", { className: "text-gray-500", children: "Image / Poster" }),
1444
- /* @__PURE__ */ jsxs17("div", { className: "flex-shrink-0 flex flex-col gap-3 mt-1", children: [
1445
- getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ jsx17(
1353
+ (digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ jsxs16("div", { children: [
1354
+ /* @__PURE__ */ jsx16("p", { className: "text-gray-500", children: "Image / Poster" }),
1355
+ /* @__PURE__ */ jsxs16("div", { className: "flex-shrink-0 flex flex-col gap-3 mt-1", children: [
1356
+ getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ jsx16(
1446
1357
  "img",
1447
1358
  {
1448
1359
  src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.posterUrl),
@@ -1450,7 +1361,7 @@ var AssetUpload = (props) => {
1450
1361
  className: "w-32 h-auto object-cover rounded border p-1"
1451
1362
  }
1452
1363
  ),
1453
- getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ jsx17(
1364
+ getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ jsx16(
1454
1365
  "img",
1455
1366
  {
1456
1367
  src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.assetUrl),
@@ -1460,9 +1371,9 @@ var AssetUpload = (props) => {
1460
1371
  )
1461
1372
  ] })
1462
1373
  ] }),
1463
- digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ jsxs17("div", { className: "col-span-2", children: [
1464
- /* @__PURE__ */ jsx17("p", { className: "text-gray-500", children: "HLS Link" }),
1465
- /* @__PURE__ */ jsx17(
1374
+ digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ jsxs16("div", { className: "col-span-2", children: [
1375
+ /* @__PURE__ */ jsx16("p", { className: "text-gray-500", children: "HLS Link" }),
1376
+ /* @__PURE__ */ jsx16(
1466
1377
  Hyperlink,
1467
1378
  {
1468
1379
  href: digitalAsset.assetUrl,
@@ -1473,12 +1384,12 @@ var AssetUpload = (props) => {
1473
1384
  )
1474
1385
  ] })
1475
1386
  ] }),
1476
- /* @__PURE__ */ jsx17(
1387
+ /* @__PURE__ */ jsx16(
1477
1388
  "span",
1478
1389
  {
1479
1390
  onClick: () => !isDisabled && deleteFile(index),
1480
1391
  className: isDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
1481
- children: /* @__PURE__ */ jsx17(Icon_default, { className: "w-4 h-4 text-primary", name: "delete" })
1392
+ children: /* @__PURE__ */ jsx16(Icon_default, { className: "w-4 h-4 text-primary", name: "delete" })
1482
1393
  }
1483
1394
  )
1484
1395
  ] }, index)) })
@@ -1488,8 +1399,8 @@ var AssetUpload = (props) => {
1488
1399
  var AssetUpload_default = AssetUpload;
1489
1400
 
1490
1401
  // src/components/controls/edit/SwitchInput.tsx
1491
- import React18 from "react";
1492
- import { jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
1402
+ import React17 from "react";
1403
+ import { jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
1493
1404
  var SwitchInput = (props) => {
1494
1405
  const textChangeHandler = (event) => {
1495
1406
  let text = event.target.checked;
@@ -1506,28 +1417,28 @@ var SwitchInput = (props) => {
1506
1417
  if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
1507
1418
  value = true;
1508
1419
  }
1509
- return /* @__PURE__ */ jsx18(React18.Fragment, { children: /* @__PURE__ */ jsxs18("div", { className: "flex items-start justify-between gap-4 py-3", children: [
1510
- /* @__PURE__ */ jsxs18("div", { className: "min-w-0", children: [
1511
- props?.attributes?.label && /* @__PURE__ */ jsxs18(
1420
+ return /* @__PURE__ */ jsx17(React17.Fragment, { children: /* @__PURE__ */ jsxs17("div", { className: "flex items-start justify-between gap-4 py-3", children: [
1421
+ /* @__PURE__ */ jsxs17("div", { className: "min-w-0", children: [
1422
+ props?.attributes?.label && /* @__PURE__ */ jsxs17(
1512
1423
  "label",
1513
1424
  {
1514
1425
  htmlFor: props.name,
1515
1426
  className: "inline-block text-sm font-semibold text-slate-800",
1516
1427
  children: [
1517
1428
  props.attributes.label,
1518
- props?.attributes?.required && /* @__PURE__ */ jsx18("span", { className: "bg-error-weak", children: "*" })
1429
+ props?.attributes?.required && /* @__PURE__ */ jsx17("span", { className: "bg-error-weak", children: "*" })
1519
1430
  ]
1520
1431
  }
1521
1432
  ),
1522
- /* @__PURE__ */ jsx18("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage || "" })
1433
+ /* @__PURE__ */ jsx17("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage || "" })
1523
1434
  ] }),
1524
- /* @__PURE__ */ jsxs18(
1435
+ /* @__PURE__ */ jsxs17(
1525
1436
  "label",
1526
1437
  {
1527
1438
  htmlFor: props.name,
1528
1439
  className: "relative inline-flex shrink-0 cursor-pointer items-center peer-disabled:cursor-not-allowed",
1529
1440
  children: [
1530
- /* @__PURE__ */ jsx18(
1441
+ /* @__PURE__ */ jsx17(
1531
1442
  "input",
1532
1443
  {
1533
1444
  type: "checkbox",
@@ -1540,13 +1451,13 @@ var SwitchInput = (props) => {
1540
1451
  className: "peer sr-only"
1541
1452
  }
1542
1453
  ),
1543
- /* @__PURE__ */ jsx18(
1454
+ /* @__PURE__ */ jsx17(
1544
1455
  "div",
1545
1456
  {
1546
1457
  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"
1547
1458
  }
1548
1459
  ),
1549
- /* @__PURE__ */ jsx18(
1460
+ /* @__PURE__ */ jsx17(
1550
1461
  "div",
1551
1462
  {
1552
1463
  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"
@@ -1639,7 +1550,7 @@ var DateTimeUtility = class {
1639
1550
  var DateTimeUtility_default = DateTimeUtility;
1640
1551
 
1641
1552
  // src/components/controls/edit/DateInput.tsx
1642
- import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
1553
+ import { jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
1643
1554
  var DateInput = (props) => {
1644
1555
  const value = useMemo(() => {
1645
1556
  if (props.value === void 0 || props.value === null || props.value === "") {
@@ -1673,11 +1584,11 @@ var DateInput = (props) => {
1673
1584
  groupKey: props.groupKey
1674
1585
  });
1675
1586
  };
1676
- return /* @__PURE__ */ jsxs19("label", { className: "block mb-1", children: [
1677
- props.attributes?.label && /* @__PURE__ */ jsx19("span", { className: "text-sm font-medium", children: props.attributes.label }),
1587
+ return /* @__PURE__ */ jsxs18("label", { className: "block mb-1", children: [
1588
+ props.attributes?.label && /* @__PURE__ */ jsx18("span", { className: "text-sm font-medium", children: props.attributes.label }),
1678
1589
  " ",
1679
- props.attributes?.label && props.attributes.required && /* @__PURE__ */ jsx19("span", { className: "bg-error-weak", children: "*" }),
1680
- /* @__PURE__ */ jsx19(
1590
+ props.attributes?.label && props.attributes.required && /* @__PURE__ */ jsx18("span", { className: "bg-error-weak", children: "*" }),
1591
+ /* @__PURE__ */ jsx18(
1681
1592
  "input",
1682
1593
  {
1683
1594
  type: "date",
@@ -1691,17 +1602,17 @@ var DateInput = (props) => {
1691
1602
  className: `peer input mt-1 py-1.5 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`
1692
1603
  }
1693
1604
  ),
1694
- /* @__PURE__ */ jsx19("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props.attributes?.errorMessage ?? "" })
1605
+ /* @__PURE__ */ jsx18("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props.attributes?.errorMessage ?? "" })
1695
1606
  ] });
1696
1607
  };
1697
1608
  var DateInput_default = DateInput;
1698
1609
 
1699
1610
  // src/components/controls/edit/RadioInput.tsx
1700
- import { useEffect as useEffect7, useState as useState5 } from "react";
1701
- import { jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
1611
+ import { useEffect as useEffect6, useState as useState4 } from "react";
1612
+ import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
1702
1613
  var RadioInput = (props) => {
1703
- const [list, setList] = useState5([]);
1704
- useEffect7(() => {
1614
+ const [list, setList] = useState4([]);
1615
+ useEffect6(() => {
1705
1616
  async function loadData() {
1706
1617
  if (props.dataset) {
1707
1618
  setList(props.dataset);
@@ -1743,22 +1654,22 @@ var RadioInput = (props) => {
1743
1654
  });
1744
1655
  }
1745
1656
  };
1746
- return /* @__PURE__ */ jsxs20("div", { className: "block", children: [
1747
- /* @__PURE__ */ jsx20("span", { className: "text-sm font-medium", children: props.attributes?.label }),
1748
- /* @__PURE__ */ jsx20("div", { className: "flex flex-col gap-3", children: list.map((item, index) => {
1657
+ return /* @__PURE__ */ jsxs19("div", { className: "block", children: [
1658
+ /* @__PURE__ */ jsx19("span", { className: "text-sm font-medium", children: props.attributes?.label }),
1659
+ /* @__PURE__ */ jsx19("div", { className: "flex flex-col gap-3", children: list.map((item, index) => {
1749
1660
  const itemValue = item[props.dataKeyFieldName];
1750
1661
  const isSelected = String(itemValue) === String(props.value ?? "");
1751
1662
  const isRecommended = props.dataRecommendedValue !== void 0 && String(itemValue) === String(props.dataRecommendedValue);
1752
1663
  const resultClassName = isSelected ? isRecommended ? "bg-success" : props.dataRecommendedValue ? "bg-alert" : "border-transparent" : "border-transparent";
1753
1664
  const iconName = isSelected && props.dataRecommendedValue ? isRecommended ? "checkCircle" : "xCircle" : void 0;
1754
1665
  const inputId = `${props.name}-${props.index ?? 0}-id-${index}`;
1755
- return /* @__PURE__ */ jsxs20(
1666
+ return /* @__PURE__ */ jsxs19(
1756
1667
  "div",
1757
1668
  {
1758
1669
  className: `font-normal flex items-center justify-between gap-4 cursor-pointer border rounded p-2 ${resultClassName}`,
1759
1670
  children: [
1760
- /* @__PURE__ */ jsxs20("div", { className: "flex gap-4 items-start", children: [
1761
- /* @__PURE__ */ jsx20(
1671
+ /* @__PURE__ */ jsxs19("div", { className: "flex gap-4 items-start", children: [
1672
+ /* @__PURE__ */ jsx19(
1762
1673
  "input",
1763
1674
  {
1764
1675
  type: "radio",
@@ -1772,118 +1683,29 @@ var RadioInput = (props) => {
1772
1683
  required: props.attributes?.required
1773
1684
  }
1774
1685
  ),
1775
- /* @__PURE__ */ jsx20("label", { className: "text-body-950 pr-2", htmlFor: inputId, children: item[props.dataTextFieldName] })
1686
+ /* @__PURE__ */ jsx19("label", { className: "text-body-950 pr-2", htmlFor: inputId, children: item[props.dataTextFieldName] })
1776
1687
  ] }),
1777
- iconName && /* @__PURE__ */ jsx20(Icon_default, { className: "w-5 h-5 text-success", name: iconName })
1688
+ iconName && /* @__PURE__ */ jsx19(Icon_default, { className: "w-5 h-5 text-success", name: iconName })
1778
1689
  ]
1779
1690
  },
1780
1691
  String(itemValue)
1781
1692
  );
1782
1693
  }) }),
1783
- /* @__PURE__ */ jsx20("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props.attributes?.errorMessage ?? "" })
1694
+ /* @__PURE__ */ jsx19("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props.attributes?.errorMessage ?? "" })
1784
1695
  ] });
1785
1696
  };
1786
1697
  var RadioInput_default = RadioInput;
1787
1698
 
1788
- // src/components/controls/edit/Switcher.tsx
1789
- import { useEffect as useEffect8, useState as useState6 } from "react";
1790
- import { jsx as jsx21, jsxs as jsxs21 } from "react/jsx-runtime";
1791
- var Switcher = (props) => {
1792
- const [list, setList] = useState6([]);
1793
- useEffect8(() => {
1794
- async function loadData() {
1795
- if (props.dataset) {
1796
- setList(props.dataset);
1797
- return;
1798
- }
1799
- if (!props.dataSource || !props.serviceClient) {
1800
- setList([]);
1801
- return;
1802
- }
1803
- let dataSource = props.dataSource;
1804
- if (props.dataSourceDependsOn) {
1805
- if (!props.dependentValue) {
1806
- setList([]);
1807
- return;
1808
- }
1809
- dataSource = dataSource.replace(
1810
- `{${props.dataSourceDependsOn}}`,
1811
- props.dependentValue
1812
- );
1813
- }
1814
- const response = await props.serviceClient.get(dataSource);
1815
- setList(response.result ?? []);
1816
- }
1817
- loadData();
1818
- }, [
1819
- props.dataSource,
1820
- props.dataSourceDependsOn,
1821
- props.dataset,
1822
- props.dependentValue,
1823
- props.serviceClient
1824
- ]);
1825
- const changeHandler = (event) => {
1826
- props.callback?.({
1827
- name: props.name,
1828
- value: event.target.value,
1829
- index: props.index,
1830
- groupKey: props.groupKey
1831
- });
1832
- };
1833
- const value = props.value === void 0 || props.value === null ? "" : String(props.value);
1834
- return /* @__PURE__ */ jsxs21("label", { className: "block mb-1", children: [
1835
- /* @__PURE__ */ jsx21("span", { className: "text-sm font-medium", children: props.attributes?.label }),
1836
- list.length === 0 ? /* @__PURE__ */ jsx21(
1837
- "input",
1838
- {
1839
- type: "text",
1840
- name: props.name,
1841
- id: props.name,
1842
- value,
1843
- onChange: changeHandler,
1844
- required: props.attributes?.required,
1845
- placeholder: props.attributes?.placeholder,
1846
- disabled: props.attributes?.readOnly,
1847
- className: `peer input mt-1 py-1.5 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`
1848
- }
1849
- ) : /* @__PURE__ */ jsxs21(
1850
- "select",
1851
- {
1852
- name: props.name,
1853
- id: props.name,
1854
- value,
1855
- onChange: changeHandler,
1856
- required: props.attributes?.required,
1857
- disabled: props.attributes?.readOnly,
1858
- className: `peer select my-1 py-1 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`,
1859
- children: [
1860
- /* @__PURE__ */ jsx21("option", { value: "", children: props.attributes?.placeholder || "Select" }),
1861
- list.map((item) => /* @__PURE__ */ jsx21(
1862
- "option",
1863
- {
1864
- value: item[props.dataKeyFieldName],
1865
- children: item[props.dataTextFieldName]
1866
- },
1867
- String(item[props.dataKeyFieldName])
1868
- ))
1869
- ]
1870
- }
1871
- ),
1872
- /* @__PURE__ */ jsx21("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props.attributes?.errorMessage ?? "" })
1873
- ] });
1874
- };
1875
- var Switcher_default = Switcher;
1876
-
1877
1699
  // src/components/controls/edit/ReferenceInput.tsx
1878
- import { jsx as jsx22 } from "react/jsx-runtime";
1700
+ import { jsx as jsx20 } from "react/jsx-runtime";
1879
1701
  var ReferenceInput = (props) => {
1880
- return /* @__PURE__ */ jsx22(SelectWithSearchInput_default, { ...props });
1702
+ return /* @__PURE__ */ jsx20(SelectWithSearchInput_default, { ...props });
1881
1703
  };
1882
1704
  var ReferenceInput_default = ReferenceInput;
1883
1705
 
1884
1706
  // src/components/controls/edit/InputControlClient.tsx
1885
- import { jsx as jsx23 } from "react/jsx-runtime";
1886
- var InputControl = React22.forwardRef(
1707
+ import { jsx as jsx21 } from "react/jsx-runtime";
1708
+ var InputControl = React20.forwardRef(
1887
1709
  (props, ref) => {
1888
1710
  const ControlComponents = {
1889
1711
  [InputControlType_default.lineTextInput]: LineTextInput_default,
@@ -1900,18 +1722,15 @@ var InputControl = React22.forwardRef(
1900
1722
  [InputControlType_default.colorInput]: ColorInput_default,
1901
1723
  [InputControlType_default.selectWithSearchInput]: SelectWithSearchInput_default,
1902
1724
  [InputControlType_default.selectWithSearchPanel]: SelectWithSearchPanel_default,
1903
- [InputControlType_default.booleanSelect]: BooleanSelect_default,
1904
1725
  [InputControlType_default.timeInput]: TimeInput_default,
1905
- [InputControlType_default.asset]: AssetUpload_default,
1906
1726
  [InputControlType_default.assetUpload]: AssetUpload_default,
1907
1727
  [InputControlType_default.switchInput]: SwitchInput_default,
1908
1728
  [InputControlType_default.dateInput]: DateInput_default,
1909
1729
  [InputControlType_default.radioInput]: RadioInput_default,
1910
- [InputControlType_default.switcher]: Switcher_default,
1911
1730
  [InputControlType_default.referenceInput]: ReferenceInput_default
1912
1731
  };
1913
1732
  const SelectedControlComponent = ControlComponents[props.controlType];
1914
- return /* @__PURE__ */ jsx23(React22.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx23(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
1733
+ return /* @__PURE__ */ jsx21(React20.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx21(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
1915
1734
  }
1916
1735
  );
1917
1736
  InputControl.displayName = "InputControl";
@@ -3,14 +3,14 @@
3
3
  "use client";
4
4
  import {
5
5
  OdataBuilder
6
- } from "./chunk-X5ERUUQV.mjs";
6
+ } from "./chunk-RG3CISAA.mjs";
7
7
  import {
8
8
  Hyperlink,
9
9
  Icon_default
10
10
  } from "./chunk-GCG4OYDJ.mjs";
11
11
  import {
12
12
  Constants
13
- } from "./chunk-E4VOFO5Q.mjs";
13
+ } from "./chunk-DTWPZPSX.mjs";
14
14
  import "./chunk-IMNQO57B.mjs";
15
15
 
16
16
  // src/components/Pagination.tsx
@@ -4,13 +4,13 @@ import {
4
4
  } from "./chunk-6PW2RLUJ.mjs";
5
5
  import {
6
6
  OdataBuilder
7
- } from "./chunk-5TQWVOWH.mjs";
7
+ } from "./chunk-2VS554XP.mjs";
8
8
  import {
9
9
  Hyperlink
10
10
  } from "./chunk-2R26M6CK.mjs";
11
11
  import {
12
12
  Constants
13
- } from "./chunk-4R7F7LBL.mjs";
13
+ } from "./chunk-IEY342PD.mjs";
14
14
  import "./chunk-56HSDML5.mjs";
15
15
 
16
16
  // src/components/Pagination.tsx
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Constants
3
- } from "./chunk-4R7F7LBL.mjs";
3
+ } from "./chunk-IEY342PD.mjs";
4
4
 
5
5
  // src/clients/OdataBuilder.tsx
6
6
  var OdataBuilder = class {