@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260831113446 → 0.8.1-dev.20260901043813
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/{CommentRendererClient-JYDYPHSQ.mjs → CommentRendererClient-FU5ZMGBV.mjs} +46 -2
- package/dist/{CommentRendererClient-5OIJYJ5Z.mjs → CommentRendererClient-L6GILW7U.mjs} +46 -2
- package/dist/{DataBindingControls-Y4JXUDZV.mjs → DataBindingControls-ANAEGFPF.mjs} +2 -2
- package/dist/{DataBindingControls-JLAO3NJL.mjs → DataBindingControls-GA2UILYQ.mjs} +2 -2
- package/dist/{InputControlClient-XC24HYZX.mjs → InputControlClient-HDT3N6ZI.mjs} +80 -262
- package/dist/{InputControlClient-POQDFVL3.mjs → InputControlClient-ZM6VEU6Q.mjs} +2 -7
- package/dist/{Pagination-T7Z2NXKO.mjs → Pagination-JGUQJ2DH.mjs} +2 -2
- package/dist/{Pagination-QBPYDD66.mjs → Pagination-LNJ27L7U.mjs} +2 -2
- package/dist/{chunk-5TQWVOWH.mjs → chunk-2VS554XP.mjs} +1 -1
- package/dist/{chunk-GGG5MJLN.mjs → chunk-37F2HMKK.mjs} +1 -1
- package/dist/{chunk-E4VOFO5Q.mjs → chunk-DTWPZPSX.mjs} +0 -3
- package/dist/{chunk-4R7F7LBL.mjs → chunk-IEY342PD.mjs} +0 -3
- package/dist/{chunk-XTG4JW2O.mjs → chunk-PE3NKJNR.mjs} +34 -215
- package/dist/{chunk-X5ERUUQV.mjs → chunk-RG3CISAA.mjs} +1 -1
- package/dist/index.d.mts +1 -8
- package/dist/index.d.ts +1 -8
- package/dist/index.js +682 -840
- package/dist/index.mjs +7 -11
- package/dist/server.js +210 -362
- package/dist/server.mjs +5 -5
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-2R26M6CK.mjs";
|
|
8
8
|
import {
|
|
9
9
|
InputControlType_default
|
|
10
|
-
} from "./chunk-
|
|
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
|
|
21
|
+
import React20 from "react";
|
|
22
22
|
|
|
23
23
|
// src/components/controls/edit/MultilineTextInput.tsx
|
|
24
24
|
import React from "react";
|
|
@@ -1111,99 +1111,9 @@ var SelectWithSearchPanel = (props) => {
|
|
|
1111
1111
|
};
|
|
1112
1112
|
var SelectWithSearchPanel_default = SelectWithSearchPanel;
|
|
1113
1113
|
|
|
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
1114
|
// src/components/controls/edit/EmailInput.tsx
|
|
1205
|
-
import
|
|
1206
|
-
import { jsx as
|
|
1115
|
+
import React14 from "react";
|
|
1116
|
+
import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1207
1117
|
var EmailInput = (props) => {
|
|
1208
1118
|
const textChangeHandler = (event) => {
|
|
1209
1119
|
const text = event.target.value;
|
|
@@ -1228,11 +1138,11 @@ var EmailInput = (props) => {
|
|
|
1228
1138
|
if (props.value !== void 0 && props.value !== null) {
|
|
1229
1139
|
value = props.value;
|
|
1230
1140
|
}
|
|
1231
|
-
return /* @__PURE__ */
|
|
1232
|
-
/* @__PURE__ */
|
|
1141
|
+
return /* @__PURE__ */ jsx14(React14.Fragment, { children: /* @__PURE__ */ jsxs14("label", { className: "block mb-1", children: [
|
|
1142
|
+
/* @__PURE__ */ jsx14("span", { className: "text-sm font-medium text-slate-700", children: props?.attributes?.label }),
|
|
1233
1143
|
" ",
|
|
1234
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1235
|
-
/* @__PURE__ */
|
|
1144
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx14("span", { className: "bg-error-weak", children: "*" }),
|
|
1145
|
+
/* @__PURE__ */ jsx14(
|
|
1236
1146
|
"input",
|
|
1237
1147
|
{
|
|
1238
1148
|
type: "email",
|
|
@@ -1248,14 +1158,14 @@ var EmailInput = (props) => {
|
|
|
1248
1158
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n transition-all duration-500 ease-in-out"
|
|
1249
1159
|
}
|
|
1250
1160
|
),
|
|
1251
|
-
/* @__PURE__ */
|
|
1161
|
+
/* @__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
1162
|
] }) });
|
|
1253
1163
|
};
|
|
1254
1164
|
var EmailInput_default = EmailInput;
|
|
1255
1165
|
|
|
1256
1166
|
// src/components/controls/edit/TimeInput.tsx
|
|
1257
|
-
import
|
|
1258
|
-
import { jsx as
|
|
1167
|
+
import React15 from "react";
|
|
1168
|
+
import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1259
1169
|
var TimeInput = (props) => {
|
|
1260
1170
|
const timeChangeHandler = (event) => {
|
|
1261
1171
|
const timeValue = event.target.value;
|
|
@@ -1268,11 +1178,11 @@ var TimeInput = (props) => {
|
|
|
1268
1178
|
});
|
|
1269
1179
|
}
|
|
1270
1180
|
};
|
|
1271
|
-
return /* @__PURE__ */
|
|
1272
|
-
/* @__PURE__ */
|
|
1181
|
+
return /* @__PURE__ */ jsx15(React15.Fragment, { children: /* @__PURE__ */ jsxs15("label", { className: "block mb-1", children: [
|
|
1182
|
+
/* @__PURE__ */ jsx15("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
1273
1183
|
" ",
|
|
1274
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1275
|
-
/* @__PURE__ */
|
|
1184
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx15("span", { className: "bg-error-weak", children: "*" }),
|
|
1185
|
+
/* @__PURE__ */ jsx15("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx15(
|
|
1276
1186
|
"input",
|
|
1277
1187
|
{
|
|
1278
1188
|
type: "time",
|
|
@@ -1285,14 +1195,14 @@ var TimeInput = (props) => {
|
|
|
1285
1195
|
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
1196
|
}
|
|
1287
1197
|
) }),
|
|
1288
|
-
/* @__PURE__ */
|
|
1198
|
+
/* @__PURE__ */ jsx15("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ?? "" })
|
|
1289
1199
|
] }) });
|
|
1290
1200
|
};
|
|
1291
1201
|
var TimeInput_default = TimeInput;
|
|
1292
1202
|
|
|
1293
1203
|
// src/components/controls/edit/AssetUpload.tsx
|
|
1294
|
-
import
|
|
1295
|
-
import { jsx as
|
|
1204
|
+
import React16, { useEffect as useEffect5 } from "react";
|
|
1205
|
+
import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1296
1206
|
var AssetUpload = (props) => {
|
|
1297
1207
|
const isDisabled = props.attributes?.disable ?? false;
|
|
1298
1208
|
let allValues = [];
|
|
@@ -1313,8 +1223,8 @@ var AssetUpload = (props) => {
|
|
|
1313
1223
|
}
|
|
1314
1224
|
return "image";
|
|
1315
1225
|
};
|
|
1316
|
-
const [assetType, setAssetType] =
|
|
1317
|
-
|
|
1226
|
+
const [assetType, setAssetType] = React16.useState(getInitialTab);
|
|
1227
|
+
useEffect5(() => {
|
|
1318
1228
|
setAssetType(getInitialTab());
|
|
1319
1229
|
}, [props.value]);
|
|
1320
1230
|
const assetUploadCallback = (newAsset) => {
|
|
@@ -1389,10 +1299,10 @@ var AssetUpload = (props) => {
|
|
|
1389
1299
|
}
|
|
1390
1300
|
return false;
|
|
1391
1301
|
};
|
|
1392
|
-
return /* @__PURE__ */
|
|
1393
|
-
/* @__PURE__ */
|
|
1394
|
-
/* @__PURE__ */
|
|
1395
|
-
/* @__PURE__ */
|
|
1302
|
+
return /* @__PURE__ */ jsxs16(React16.Fragment, { children: [
|
|
1303
|
+
/* @__PURE__ */ jsx16("label", { className: "block mb-1", children: /* @__PURE__ */ jsx16("span", { className: "text-sm font-medium", children: props?.attributes?.label }) }),
|
|
1304
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex gap-6 bg-neutral-100 rounded p-2", children: [
|
|
1305
|
+
/* @__PURE__ */ jsx16(
|
|
1396
1306
|
ClientButton_default,
|
|
1397
1307
|
{
|
|
1398
1308
|
className: assetType === "image" ? "px-2 py-1 rounded bg-body-200 scale-95" : "text-neutral-700",
|
|
@@ -1402,7 +1312,7 @@ var AssetUpload = (props) => {
|
|
|
1402
1312
|
children: "Image Upload"
|
|
1403
1313
|
}
|
|
1404
1314
|
),
|
|
1405
|
-
/* @__PURE__ */
|
|
1315
|
+
/* @__PURE__ */ jsx16(
|
|
1406
1316
|
ClientButton_default,
|
|
1407
1317
|
{
|
|
1408
1318
|
className: assetType === "video" ? "bg-body-200 px-2 py-1 rounded-md scale-95" : "text-neutral-700",
|
|
@@ -1413,13 +1323,13 @@ var AssetUpload = (props) => {
|
|
|
1413
1323
|
}
|
|
1414
1324
|
)
|
|
1415
1325
|
] }),
|
|
1416
|
-
shouldShowDetails() && /* @__PURE__ */
|
|
1417
|
-
/* @__PURE__ */
|
|
1418
|
-
/* @__PURE__ */
|
|
1419
|
-
/* @__PURE__ */
|
|
1420
|
-
/* @__PURE__ */
|
|
1421
|
-
/* @__PURE__ */
|
|
1422
|
-
/* @__PURE__ */
|
|
1326
|
+
shouldShowDetails() && /* @__PURE__ */ jsxs16("div", { className: "relative mt-4 rounded-md p-4 border-2 border-dotted border-gray-300 bg-gray-50", children: [
|
|
1327
|
+
/* @__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" }),
|
|
1328
|
+
/* @__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: [
|
|
1329
|
+
/* @__PURE__ */ jsxs16("div", { className: "grid grid-cols-2 gap-x-8 gap-y-3 text-sm w-full", children: [
|
|
1330
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
1331
|
+
/* @__PURE__ */ jsx16("p", { className: "text-gray-500", children: "Title" }),
|
|
1332
|
+
/* @__PURE__ */ jsx16(
|
|
1423
1333
|
"input",
|
|
1424
1334
|
{
|
|
1425
1335
|
type: "text",
|
|
@@ -1431,18 +1341,18 @@ var AssetUpload = (props) => {
|
|
|
1431
1341
|
}
|
|
1432
1342
|
)
|
|
1433
1343
|
] }),
|
|
1434
|
-
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */
|
|
1435
|
-
/* @__PURE__ */
|
|
1436
|
-
/* @__PURE__ */
|
|
1344
|
+
digitalAsset.intrinsicWidth && digitalAsset.intrinsicHeight && /* @__PURE__ */ jsxs16("div", { children: [
|
|
1345
|
+
/* @__PURE__ */ jsx16("p", { className: "text-gray-500", children: "Resolution" }),
|
|
1346
|
+
/* @__PURE__ */ jsxs16("p", { className: "font-medium text-gray-900 mt-3", children: [
|
|
1437
1347
|
digitalAsset.intrinsicWidth,
|
|
1438
1348
|
"\xD7",
|
|
1439
1349
|
digitalAsset.intrinsicHeight
|
|
1440
1350
|
] })
|
|
1441
1351
|
] }),
|
|
1442
|
-
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */
|
|
1443
|
-
/* @__PURE__ */
|
|
1444
|
-
/* @__PURE__ */
|
|
1445
|
-
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */
|
|
1352
|
+
(digitalAsset.assetUrl || digitalAsset.posterUrl) && /* @__PURE__ */ jsxs16("div", { children: [
|
|
1353
|
+
/* @__PURE__ */ jsx16("p", { className: "text-gray-500", children: "Image / Poster" }),
|
|
1354
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex-shrink-0 flex flex-col gap-3 mt-1", children: [
|
|
1355
|
+
getAssetType(digitalAsset) === "video" && digitalAsset.posterUrl && /* @__PURE__ */ jsx16(
|
|
1446
1356
|
"img",
|
|
1447
1357
|
{
|
|
1448
1358
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.posterUrl),
|
|
@@ -1450,7 +1360,7 @@ var AssetUpload = (props) => {
|
|
|
1450
1360
|
className: "w-32 h-auto object-cover rounded border p-1"
|
|
1451
1361
|
}
|
|
1452
1362
|
),
|
|
1453
|
-
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */
|
|
1363
|
+
getAssetType(digitalAsset) === "image" && digitalAsset.assetUrl && /* @__PURE__ */ jsx16(
|
|
1454
1364
|
"img",
|
|
1455
1365
|
{
|
|
1456
1366
|
src: AssetUtility_default.resolveUrl(props.serviceClient?.baseUrl, digitalAsset.assetUrl),
|
|
@@ -1460,9 +1370,9 @@ var AssetUpload = (props) => {
|
|
|
1460
1370
|
)
|
|
1461
1371
|
] })
|
|
1462
1372
|
] }),
|
|
1463
|
-
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */
|
|
1464
|
-
/* @__PURE__ */
|
|
1465
|
-
/* @__PURE__ */
|
|
1373
|
+
digitalAsset.assetUrl?.endsWith(".m3u8") && /* @__PURE__ */ jsxs16("div", { className: "col-span-2", children: [
|
|
1374
|
+
/* @__PURE__ */ jsx16("p", { className: "text-gray-500", children: "HLS Link" }),
|
|
1375
|
+
/* @__PURE__ */ jsx16(
|
|
1466
1376
|
Hyperlink,
|
|
1467
1377
|
{
|
|
1468
1378
|
href: digitalAsset.assetUrl,
|
|
@@ -1473,12 +1383,12 @@ var AssetUpload = (props) => {
|
|
|
1473
1383
|
)
|
|
1474
1384
|
] })
|
|
1475
1385
|
] }),
|
|
1476
|
-
/* @__PURE__ */
|
|
1386
|
+
/* @__PURE__ */ jsx16(
|
|
1477
1387
|
"span",
|
|
1478
1388
|
{
|
|
1479
1389
|
onClick: () => !isDisabled && deleteFile(index),
|
|
1480
1390
|
className: isDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
1481
|
-
children: /* @__PURE__ */
|
|
1391
|
+
children: /* @__PURE__ */ jsx16(Icon_default, { className: "w-4 h-4 text-primary", name: "delete" })
|
|
1482
1392
|
}
|
|
1483
1393
|
)
|
|
1484
1394
|
] }, index)) })
|
|
@@ -1488,8 +1398,8 @@ var AssetUpload = (props) => {
|
|
|
1488
1398
|
var AssetUpload_default = AssetUpload;
|
|
1489
1399
|
|
|
1490
1400
|
// src/components/controls/edit/SwitchInput.tsx
|
|
1491
|
-
import
|
|
1492
|
-
import { jsx as
|
|
1401
|
+
import React17 from "react";
|
|
1402
|
+
import { jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1493
1403
|
var SwitchInput = (props) => {
|
|
1494
1404
|
const textChangeHandler = (event) => {
|
|
1495
1405
|
let text = event.target.checked;
|
|
@@ -1506,28 +1416,28 @@ var SwitchInput = (props) => {
|
|
|
1506
1416
|
if (props.value != void 0 && props.value != null && props.value != "" && (props.value == "true" || props.value.toString() == "true")) {
|
|
1507
1417
|
value = true;
|
|
1508
1418
|
}
|
|
1509
|
-
return /* @__PURE__ */
|
|
1510
|
-
/* @__PURE__ */
|
|
1511
|
-
props?.attributes?.label && /* @__PURE__ */
|
|
1419
|
+
return /* @__PURE__ */ jsx17(React17.Fragment, { children: /* @__PURE__ */ jsxs17("div", { className: "flex items-start justify-between gap-4 py-3", children: [
|
|
1420
|
+
/* @__PURE__ */ jsxs17("div", { className: "min-w-0", children: [
|
|
1421
|
+
props?.attributes?.label && /* @__PURE__ */ jsxs17(
|
|
1512
1422
|
"label",
|
|
1513
1423
|
{
|
|
1514
1424
|
htmlFor: props.name,
|
|
1515
1425
|
className: "inline-block text-sm font-semibold text-slate-800",
|
|
1516
1426
|
children: [
|
|
1517
1427
|
props.attributes.label,
|
|
1518
|
-
props?.attributes?.required && /* @__PURE__ */
|
|
1428
|
+
props?.attributes?.required && /* @__PURE__ */ jsx17("span", { className: "bg-error-weak", children: "*" })
|
|
1519
1429
|
]
|
|
1520
1430
|
}
|
|
1521
1431
|
),
|
|
1522
|
-
/* @__PURE__ */
|
|
1432
|
+
/* @__PURE__ */ jsx17("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage || "" })
|
|
1523
1433
|
] }),
|
|
1524
|
-
/* @__PURE__ */
|
|
1434
|
+
/* @__PURE__ */ jsxs17(
|
|
1525
1435
|
"label",
|
|
1526
1436
|
{
|
|
1527
1437
|
htmlFor: props.name,
|
|
1528
1438
|
className: "relative inline-flex shrink-0 cursor-pointer items-center peer-disabled:cursor-not-allowed",
|
|
1529
1439
|
children: [
|
|
1530
|
-
/* @__PURE__ */
|
|
1440
|
+
/* @__PURE__ */ jsx17(
|
|
1531
1441
|
"input",
|
|
1532
1442
|
{
|
|
1533
1443
|
type: "checkbox",
|
|
@@ -1540,13 +1450,13 @@ var SwitchInput = (props) => {
|
|
|
1540
1450
|
className: "peer sr-only"
|
|
1541
1451
|
}
|
|
1542
1452
|
),
|
|
1543
|
-
/* @__PURE__ */
|
|
1453
|
+
/* @__PURE__ */ jsx17(
|
|
1544
1454
|
"div",
|
|
1545
1455
|
{
|
|
1546
1456
|
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
1457
|
}
|
|
1548
1458
|
),
|
|
1549
|
-
/* @__PURE__ */
|
|
1459
|
+
/* @__PURE__ */ jsx17(
|
|
1550
1460
|
"div",
|
|
1551
1461
|
{
|
|
1552
1462
|
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 +1549,7 @@ var DateTimeUtility = class {
|
|
|
1639
1549
|
var DateTimeUtility_default = DateTimeUtility;
|
|
1640
1550
|
|
|
1641
1551
|
// src/components/controls/edit/DateInput.tsx
|
|
1642
|
-
import { jsx as
|
|
1552
|
+
import { jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1643
1553
|
var DateInput = (props) => {
|
|
1644
1554
|
const value = useMemo(() => {
|
|
1645
1555
|
if (props.value === void 0 || props.value === null || props.value === "") {
|
|
@@ -1673,11 +1583,11 @@ var DateInput = (props) => {
|
|
|
1673
1583
|
groupKey: props.groupKey
|
|
1674
1584
|
});
|
|
1675
1585
|
};
|
|
1676
|
-
return /* @__PURE__ */
|
|
1677
|
-
props.attributes?.label && /* @__PURE__ */
|
|
1586
|
+
return /* @__PURE__ */ jsxs18("label", { className: "block mb-1", children: [
|
|
1587
|
+
props.attributes?.label && /* @__PURE__ */ jsx18("span", { className: "text-sm font-medium", children: props.attributes.label }),
|
|
1678
1588
|
" ",
|
|
1679
|
-
props.attributes?.label && props.attributes.required && /* @__PURE__ */
|
|
1680
|
-
/* @__PURE__ */
|
|
1589
|
+
props.attributes?.label && props.attributes.required && /* @__PURE__ */ jsx18("span", { className: "bg-error-weak", children: "*" }),
|
|
1590
|
+
/* @__PURE__ */ jsx18(
|
|
1681
1591
|
"input",
|
|
1682
1592
|
{
|
|
1683
1593
|
type: "date",
|
|
@@ -1691,17 +1601,17 @@ var DateInput = (props) => {
|
|
|
1691
1601
|
className: `peer input mt-1 py-1.5 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`
|
|
1692
1602
|
}
|
|
1693
1603
|
),
|
|
1694
|
-
/* @__PURE__ */
|
|
1604
|
+
/* @__PURE__ */ jsx18("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props.attributes?.errorMessage ?? "" })
|
|
1695
1605
|
] });
|
|
1696
1606
|
};
|
|
1697
1607
|
var DateInput_default = DateInput;
|
|
1698
1608
|
|
|
1699
1609
|
// src/components/controls/edit/RadioInput.tsx
|
|
1700
|
-
import { useEffect as
|
|
1701
|
-
import { jsx as
|
|
1610
|
+
import { useEffect as useEffect6, useState as useState4 } from "react";
|
|
1611
|
+
import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1702
1612
|
var RadioInput = (props) => {
|
|
1703
|
-
const [list, setList] =
|
|
1704
|
-
|
|
1613
|
+
const [list, setList] = useState4([]);
|
|
1614
|
+
useEffect6(() => {
|
|
1705
1615
|
async function loadData() {
|
|
1706
1616
|
if (props.dataset) {
|
|
1707
1617
|
setList(props.dataset);
|
|
@@ -1743,22 +1653,22 @@ var RadioInput = (props) => {
|
|
|
1743
1653
|
});
|
|
1744
1654
|
}
|
|
1745
1655
|
};
|
|
1746
|
-
return /* @__PURE__ */
|
|
1747
|
-
/* @__PURE__ */
|
|
1748
|
-
/* @__PURE__ */
|
|
1656
|
+
return /* @__PURE__ */ jsxs19("div", { className: "block", children: [
|
|
1657
|
+
/* @__PURE__ */ jsx19("span", { className: "text-sm font-medium", children: props.attributes?.label }),
|
|
1658
|
+
/* @__PURE__ */ jsx19("div", { className: "flex flex-col gap-3", children: list.map((item, index) => {
|
|
1749
1659
|
const itemValue = item[props.dataKeyFieldName];
|
|
1750
1660
|
const isSelected = String(itemValue) === String(props.value ?? "");
|
|
1751
1661
|
const isRecommended = props.dataRecommendedValue !== void 0 && String(itemValue) === String(props.dataRecommendedValue);
|
|
1752
1662
|
const resultClassName = isSelected ? isRecommended ? "bg-success" : props.dataRecommendedValue ? "bg-alert" : "border-transparent" : "border-transparent";
|
|
1753
1663
|
const iconName = isSelected && props.dataRecommendedValue ? isRecommended ? "checkCircle" : "xCircle" : void 0;
|
|
1754
1664
|
const inputId = `${props.name}-${props.index ?? 0}-id-${index}`;
|
|
1755
|
-
return /* @__PURE__ */
|
|
1665
|
+
return /* @__PURE__ */ jsxs19(
|
|
1756
1666
|
"div",
|
|
1757
1667
|
{
|
|
1758
1668
|
className: `font-normal flex items-center justify-between gap-4 cursor-pointer border rounded p-2 ${resultClassName}`,
|
|
1759
1669
|
children: [
|
|
1760
|
-
/* @__PURE__ */
|
|
1761
|
-
/* @__PURE__ */
|
|
1670
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex gap-4 items-start", children: [
|
|
1671
|
+
/* @__PURE__ */ jsx19(
|
|
1762
1672
|
"input",
|
|
1763
1673
|
{
|
|
1764
1674
|
type: "radio",
|
|
@@ -1772,118 +1682,29 @@ var RadioInput = (props) => {
|
|
|
1772
1682
|
required: props.attributes?.required
|
|
1773
1683
|
}
|
|
1774
1684
|
),
|
|
1775
|
-
/* @__PURE__ */
|
|
1685
|
+
/* @__PURE__ */ jsx19("label", { className: "text-body-950 pr-2", htmlFor: inputId, children: item[props.dataTextFieldName] })
|
|
1776
1686
|
] }),
|
|
1777
|
-
iconName && /* @__PURE__ */
|
|
1687
|
+
iconName && /* @__PURE__ */ jsx19(Icon_default, { className: "w-5 h-5 text-success", name: iconName })
|
|
1778
1688
|
]
|
|
1779
1689
|
},
|
|
1780
1690
|
String(itemValue)
|
|
1781
1691
|
);
|
|
1782
1692
|
}) }),
|
|
1783
|
-
/* @__PURE__ */
|
|
1693
|
+
/* @__PURE__ */ jsx19("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props.attributes?.errorMessage ?? "" })
|
|
1784
1694
|
] });
|
|
1785
1695
|
};
|
|
1786
1696
|
var RadioInput_default = RadioInput;
|
|
1787
1697
|
|
|
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
1698
|
// src/components/controls/edit/ReferenceInput.tsx
|
|
1878
|
-
import { jsx as
|
|
1699
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1879
1700
|
var ReferenceInput = (props) => {
|
|
1880
|
-
return /* @__PURE__ */
|
|
1701
|
+
return /* @__PURE__ */ jsx20(SelectWithSearchInput_default, { ...props });
|
|
1881
1702
|
};
|
|
1882
1703
|
var ReferenceInput_default = ReferenceInput;
|
|
1883
1704
|
|
|
1884
1705
|
// src/components/controls/edit/InputControlClient.tsx
|
|
1885
|
-
import { jsx as
|
|
1886
|
-
var InputControl =
|
|
1706
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1707
|
+
var InputControl = React20.forwardRef(
|
|
1887
1708
|
(props, ref) => {
|
|
1888
1709
|
const ControlComponents = {
|
|
1889
1710
|
[InputControlType_default.lineTextInput]: LineTextInput_default,
|
|
@@ -1900,18 +1721,15 @@ var InputControl = React22.forwardRef(
|
|
|
1900
1721
|
[InputControlType_default.colorInput]: ColorInput_default,
|
|
1901
1722
|
[InputControlType_default.selectWithSearchInput]: SelectWithSearchInput_default,
|
|
1902
1723
|
[InputControlType_default.selectWithSearchPanel]: SelectWithSearchPanel_default,
|
|
1903
|
-
[InputControlType_default.booleanSelect]: BooleanSelect_default,
|
|
1904
1724
|
[InputControlType_default.timeInput]: TimeInput_default,
|
|
1905
|
-
[InputControlType_default.asset]: AssetUpload_default,
|
|
1906
1725
|
[InputControlType_default.assetUpload]: AssetUpload_default,
|
|
1907
1726
|
[InputControlType_default.switchInput]: SwitchInput_default,
|
|
1908
1727
|
[InputControlType_default.dateInput]: DateInput_default,
|
|
1909
1728
|
[InputControlType_default.radioInput]: RadioInput_default,
|
|
1910
|
-
[InputControlType_default.switcher]: Switcher_default,
|
|
1911
1729
|
[InputControlType_default.referenceInput]: ReferenceInput_default
|
|
1912
1730
|
};
|
|
1913
1731
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
1914
|
-
return /* @__PURE__ */
|
|
1732
|
+
return /* @__PURE__ */ jsx21(React20.Fragment, { children: SelectedControlComponent ? /* @__PURE__ */ jsx21(SelectedControlComponent, { ...props }) : "Control not found:" + props.controlType });
|
|
1915
1733
|
}
|
|
1916
1734
|
);
|
|
1917
1735
|
InputControl.displayName = "InputControl";
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
"use client";
|
|
4
4
|
import {
|
|
5
|
-
BooleanSelect_default,
|
|
6
5
|
CheckboxInput_default,
|
|
7
6
|
ColorInput_default,
|
|
8
7
|
DateInput_default,
|
|
@@ -18,16 +17,15 @@ import {
|
|
|
18
17
|
RadioInput_default,
|
|
19
18
|
SelectWithSearchInput_default,
|
|
20
19
|
Select_default,
|
|
21
|
-
Switcher_default,
|
|
22
20
|
TimeInput_default
|
|
23
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-PE3NKJNR.mjs";
|
|
24
22
|
import {
|
|
25
23
|
Hyperlink,
|
|
26
24
|
Icon_default
|
|
27
25
|
} from "./chunk-GCG4OYDJ.mjs";
|
|
28
26
|
import {
|
|
29
27
|
InputControlType_default
|
|
30
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-DTWPZPSX.mjs";
|
|
31
29
|
import {
|
|
32
30
|
AssetUtility_default
|
|
33
31
|
} from "./chunk-UPCAOGEY.mjs";
|
|
@@ -587,14 +585,11 @@ var InputControl = React4.forwardRef(
|
|
|
587
585
|
[InputControlType_default.colorInput]: ColorInput_default,
|
|
588
586
|
[InputControlType_default.selectWithSearchInput]: SelectWithSearchInput_default,
|
|
589
587
|
[InputControlType_default.selectWithSearchPanel]: SelectWithSearchPanel_default,
|
|
590
|
-
[InputControlType_default.booleanSelect]: BooleanSelect_default,
|
|
591
588
|
[InputControlType_default.timeInput]: TimeInput_default,
|
|
592
|
-
[InputControlType_default.asset]: AssetUpload_default,
|
|
593
589
|
[InputControlType_default.assetUpload]: AssetUpload_default,
|
|
594
590
|
[InputControlType_default.switchInput]: SwitchInput_default,
|
|
595
591
|
[InputControlType_default.dateInput]: DateInput_default,
|
|
596
592
|
[InputControlType_default.radioInput]: RadioInput_default,
|
|
597
|
-
[InputControlType_default.switcher]: Switcher_default,
|
|
598
593
|
[InputControlType_default.referenceInput]: ReferenceInput_default
|
|
599
594
|
};
|
|
600
595
|
const SelectedControlComponent = ControlComponents[props.controlType];
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
import {
|
|
5
5
|
OdataBuilder
|
|
6
|
-
} from "./chunk-
|
|
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-
|
|
13
|
+
} from "./chunk-DTWPZPSX.mjs";
|
|
14
14
|
import "./chunk-IMNQO57B.mjs";
|
|
15
15
|
|
|
16
16
|
// src/components/Pagination.tsx
|