@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
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
} from "./chunk-6PW2RLUJ.mjs";
|
|
5
5
|
import {
|
|
6
6
|
OdataBuilder
|
|
7
|
-
} from "./chunk-
|
|
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-
|
|
13
|
+
} from "./chunk-IEY342PD.mjs";
|
|
14
14
|
import "./chunk-56HSDML5.mjs";
|
|
15
15
|
|
|
16
16
|
// src/components/Pagination.tsx
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
// src/components/controls/edit/InputControl.tsx
|
|
5
5
|
import dynamic from "next/dynamic";
|
|
6
|
-
var InputControl = dynamic(() => import("./InputControlClient-
|
|
6
|
+
var InputControl = dynamic(() => import("./InputControlClient-ZM6VEU6Q.mjs"), {
|
|
7
7
|
ssr: false
|
|
8
8
|
});
|
|
9
9
|
var InputControl_default = InputControl;
|
|
@@ -12,7 +12,6 @@ var InputControlType = {
|
|
|
12
12
|
moneyInput: "money",
|
|
13
13
|
select: "select",
|
|
14
14
|
percentageInput: "percentage",
|
|
15
|
-
asset: "asset",
|
|
16
15
|
assetUpload: "assetUpload",
|
|
17
16
|
phoneInput: "phone",
|
|
18
17
|
numberInput: "numberInput",
|
|
@@ -23,11 +22,9 @@ var InputControlType = {
|
|
|
23
22
|
colorInput: "colorInput",
|
|
24
23
|
selectWithSearchInput: "selectWithSearchInput",
|
|
25
24
|
selectWithSearchPanel: "selectWithSearchPanel",
|
|
26
|
-
booleanSelect: "booleanSelect",
|
|
27
25
|
switchInput: "switchInput",
|
|
28
26
|
dateInput: "dateInput",
|
|
29
27
|
radioInput: "radioInput",
|
|
30
|
-
switcher: "switcher",
|
|
31
28
|
videoInput: "videoInput",
|
|
32
29
|
referenceInput: "referenceInput"
|
|
33
30
|
};
|
|
@@ -9,7 +9,6 @@ var InputControlType = {
|
|
|
9
9
|
moneyInput: "money",
|
|
10
10
|
select: "select",
|
|
11
11
|
percentageInput: "percentage",
|
|
12
|
-
asset: "asset",
|
|
13
12
|
assetUpload: "assetUpload",
|
|
14
13
|
phoneInput: "phone",
|
|
15
14
|
numberInput: "numberInput",
|
|
@@ -20,11 +19,9 @@ var InputControlType = {
|
|
|
20
19
|
colorInput: "colorInput",
|
|
21
20
|
selectWithSearchInput: "selectWithSearchInput",
|
|
22
21
|
selectWithSearchPanel: "selectWithSearchPanel",
|
|
23
|
-
booleanSelect: "booleanSelect",
|
|
24
22
|
switchInput: "switchInput",
|
|
25
23
|
dateInput: "dateInput",
|
|
26
24
|
radioInput: "radioInput",
|
|
27
|
-
switcher: "switcher",
|
|
28
25
|
videoInput: "videoInput",
|
|
29
26
|
referenceInput: "referenceInput"
|
|
30
27
|
};
|
|
@@ -843,99 +843,9 @@ var SelectWithSearchInput = (props) => {
|
|
|
843
843
|
};
|
|
844
844
|
var SelectWithSearchInput_default = SelectWithSearchInput;
|
|
845
845
|
|
|
846
|
-
// src/components/controls/edit/BooleanSelect.tsx
|
|
847
|
-
import React13, {
|
|
848
|
-
useState as useState3,
|
|
849
|
-
useEffect as useEffect4
|
|
850
|
-
} from "react";
|
|
851
|
-
import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
852
|
-
var BooleanSelect = (props) => {
|
|
853
|
-
const [list, setList] = useState3();
|
|
854
|
-
const textChangeHandler = (event) => {
|
|
855
|
-
const text = event.target.value;
|
|
856
|
-
const boolValue = text?.toLowerCase() === "true" || text === "1";
|
|
857
|
-
if (props.callback !== void 0) {
|
|
858
|
-
props.callback({
|
|
859
|
-
name: props.name,
|
|
860
|
-
value: boolValue,
|
|
861
|
-
index: props.index,
|
|
862
|
-
groupKey: props.groupKey
|
|
863
|
-
});
|
|
864
|
-
}
|
|
865
|
-
};
|
|
866
|
-
useEffect4(() => {
|
|
867
|
-
async function fetchData() {
|
|
868
|
-
console.log("in select");
|
|
869
|
-
if (props.dataset) {
|
|
870
|
-
setList(props.dataset);
|
|
871
|
-
} else if (props.dataSource && props.dataSource != "" && props.serviceClient) {
|
|
872
|
-
let dataSource = props.dataSource;
|
|
873
|
-
let response;
|
|
874
|
-
if (props.dataSourceDependsOn) {
|
|
875
|
-
if (props.dependentValue) {
|
|
876
|
-
dataSource = dataSource.replace(
|
|
877
|
-
`{${props.dataSourceDependsOn}}`,
|
|
878
|
-
props.dependentValue
|
|
879
|
-
);
|
|
880
|
-
response = await props.serviceClient.get(dataSource);
|
|
881
|
-
setList(response.result);
|
|
882
|
-
}
|
|
883
|
-
} else {
|
|
884
|
-
response = await props.serviceClient.get(dataSource);
|
|
885
|
-
setList(response.result);
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
}
|
|
889
|
-
fetchData();
|
|
890
|
-
}, [
|
|
891
|
-
props.dataSource,
|
|
892
|
-
props.dependentValue,
|
|
893
|
-
props.dataset,
|
|
894
|
-
props.dataSourceDependsOn
|
|
895
|
-
]);
|
|
896
|
-
let value;
|
|
897
|
-
if (props.value !== void 0 && props.value !== null) {
|
|
898
|
-
value = props.value;
|
|
899
|
-
}
|
|
900
|
-
return /* @__PURE__ */ jsx13(React13.Fragment, { children: /* @__PURE__ */ jsxs13("label", { className: "block", children: [
|
|
901
|
-
/* @__PURE__ */ jsx13("span", { className: "text-sm font-medium ", children: props?.attributes?.label }),
|
|
902
|
-
" ",
|
|
903
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx13("span", { className: "bg-error-weak", children: "*" }),
|
|
904
|
-
/* @__PURE__ */ jsxs13(
|
|
905
|
-
"select",
|
|
906
|
-
{
|
|
907
|
-
name: props.name,
|
|
908
|
-
id: props.name,
|
|
909
|
-
value,
|
|
910
|
-
onChange: textChangeHandler,
|
|
911
|
-
required: props?.attributes?.required,
|
|
912
|
-
placeholder: props?.attributes?.placeholder,
|
|
913
|
-
disabled: props?.attributes?.readOnly,
|
|
914
|
-
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 ",
|
|
915
|
-
children: [
|
|
916
|
-
/* @__PURE__ */ jsx13("option", { className: "", value: "", children: props.attributes?.placeholder || "Select" }),
|
|
917
|
-
list && list.map((item, i) => {
|
|
918
|
-
return /* @__PURE__ */ jsx13(
|
|
919
|
-
"option",
|
|
920
|
-
{
|
|
921
|
-
className: "fac-select-option",
|
|
922
|
-
value: item[props.dataKeyFieldName],
|
|
923
|
-
children: item[props.dataTextFieldName]
|
|
924
|
-
},
|
|
925
|
-
item[props.dataKeyFieldName]
|
|
926
|
-
);
|
|
927
|
-
})
|
|
928
|
-
]
|
|
929
|
-
}
|
|
930
|
-
),
|
|
931
|
-
/* @__PURE__ */ jsx13("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
932
|
-
] }) });
|
|
933
|
-
};
|
|
934
|
-
var BooleanSelect_default = BooleanSelect;
|
|
935
|
-
|
|
936
846
|
// src/components/controls/edit/EmailInput.tsx
|
|
937
|
-
import
|
|
938
|
-
import { jsx as
|
|
847
|
+
import React13 from "react";
|
|
848
|
+
import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
939
849
|
var EmailInput = (props) => {
|
|
940
850
|
const textChangeHandler = (event) => {
|
|
941
851
|
const text = event.target.value;
|
|
@@ -960,11 +870,11 @@ var EmailInput = (props) => {
|
|
|
960
870
|
if (props.value !== void 0 && props.value !== null) {
|
|
961
871
|
value = props.value;
|
|
962
872
|
}
|
|
963
|
-
return /* @__PURE__ */
|
|
964
|
-
/* @__PURE__ */
|
|
873
|
+
return /* @__PURE__ */ jsx13(React13.Fragment, { children: /* @__PURE__ */ jsxs13("label", { className: "block mb-1", children: [
|
|
874
|
+
/* @__PURE__ */ jsx13("span", { className: "text-sm font-medium text-slate-700", children: props?.attributes?.label }),
|
|
965
875
|
" ",
|
|
966
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
967
|
-
/* @__PURE__ */
|
|
876
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx13("span", { className: "bg-error-weak", children: "*" }),
|
|
877
|
+
/* @__PURE__ */ jsx13(
|
|
968
878
|
"input",
|
|
969
879
|
{
|
|
970
880
|
type: "email",
|
|
@@ -980,14 +890,14 @@ var EmailInput = (props) => {
|
|
|
980
890
|
className: "peer mt-1 py-1.5 block w-full rounded shadow-sm\n transition-all duration-500 ease-in-out"
|
|
981
891
|
}
|
|
982
892
|
),
|
|
983
|
-
/* @__PURE__ */
|
|
893
|
+
/* @__PURE__ */ jsx13("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 mb-0 bg-error-weak text-sm", children: props?.attributes?.errorMessage ? props.attributes.errorMessage : "" })
|
|
984
894
|
] }) });
|
|
985
895
|
};
|
|
986
896
|
var EmailInput_default = EmailInput;
|
|
987
897
|
|
|
988
898
|
// src/components/controls/edit/TimeInput.tsx
|
|
989
|
-
import
|
|
990
|
-
import { jsx as
|
|
899
|
+
import React14 from "react";
|
|
900
|
+
import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
991
901
|
var TimeInput = (props) => {
|
|
992
902
|
const timeChangeHandler = (event) => {
|
|
993
903
|
const timeValue = event.target.value;
|
|
@@ -1000,11 +910,11 @@ var TimeInput = (props) => {
|
|
|
1000
910
|
});
|
|
1001
911
|
}
|
|
1002
912
|
};
|
|
1003
|
-
return /* @__PURE__ */
|
|
1004
|
-
/* @__PURE__ */
|
|
913
|
+
return /* @__PURE__ */ jsx14(React14.Fragment, { children: /* @__PURE__ */ jsxs14("label", { className: "block mb-1", children: [
|
|
914
|
+
/* @__PURE__ */ jsx14("span", { className: "text-sm font-medium", children: props?.attributes?.label }),
|
|
1005
915
|
" ",
|
|
1006
|
-
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */
|
|
1007
|
-
/* @__PURE__ */
|
|
916
|
+
props?.attributes?.label && props?.attributes?.required && /* @__PURE__ */ jsx14("span", { className: "bg-error-weak", children: "*" }),
|
|
917
|
+
/* @__PURE__ */ jsx14("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx14(
|
|
1008
918
|
"input",
|
|
1009
919
|
{
|
|
1010
920
|
type: "time",
|
|
@@ -1017,7 +927,7 @@ var TimeInput = (props) => {
|
|
|
1017
927
|
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"
|
|
1018
928
|
}
|
|
1019
929
|
) }),
|
|
1020
|
-
/* @__PURE__ */
|
|
930
|
+
/* @__PURE__ */ jsx14("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props?.attributes?.errorMessage ?? "" })
|
|
1021
931
|
] }) });
|
|
1022
932
|
};
|
|
1023
933
|
var TimeInput_default = TimeInput;
|
|
@@ -1102,7 +1012,7 @@ var DateTimeUtility = class {
|
|
|
1102
1012
|
var DateTimeUtility_default = DateTimeUtility;
|
|
1103
1013
|
|
|
1104
1014
|
// src/components/controls/edit/DateInput.tsx
|
|
1105
|
-
import { jsx as
|
|
1015
|
+
import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1106
1016
|
var DateInput = (props) => {
|
|
1107
1017
|
const value = useMemo(() => {
|
|
1108
1018
|
if (props.value === void 0 || props.value === null || props.value === "") {
|
|
@@ -1136,11 +1046,11 @@ var DateInput = (props) => {
|
|
|
1136
1046
|
groupKey: props.groupKey
|
|
1137
1047
|
});
|
|
1138
1048
|
};
|
|
1139
|
-
return /* @__PURE__ */
|
|
1140
|
-
props.attributes?.label && /* @__PURE__ */
|
|
1049
|
+
return /* @__PURE__ */ jsxs15("label", { className: "block mb-1", children: [
|
|
1050
|
+
props.attributes?.label && /* @__PURE__ */ jsx15("span", { className: "text-sm font-medium", children: props.attributes.label }),
|
|
1141
1051
|
" ",
|
|
1142
|
-
props.attributes?.label && props.attributes.required && /* @__PURE__ */
|
|
1143
|
-
/* @__PURE__ */
|
|
1052
|
+
props.attributes?.label && props.attributes.required && /* @__PURE__ */ jsx15("span", { className: "bg-error-weak", children: "*" }),
|
|
1053
|
+
/* @__PURE__ */ jsx15(
|
|
1144
1054
|
"input",
|
|
1145
1055
|
{
|
|
1146
1056
|
type: "date",
|
|
@@ -1154,17 +1064,17 @@ var DateInput = (props) => {
|
|
|
1154
1064
|
className: `peer input mt-1 py-1.5 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`
|
|
1155
1065
|
}
|
|
1156
1066
|
),
|
|
1157
|
-
/* @__PURE__ */
|
|
1067
|
+
/* @__PURE__ */ jsx15("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props.attributes?.errorMessage ?? "" })
|
|
1158
1068
|
] });
|
|
1159
1069
|
};
|
|
1160
1070
|
var DateInput_default = DateInput;
|
|
1161
1071
|
|
|
1162
1072
|
// src/components/controls/edit/RadioInput.tsx
|
|
1163
|
-
import { useEffect as
|
|
1164
|
-
import { jsx as
|
|
1073
|
+
import { useEffect as useEffect4, useState as useState3 } from "react";
|
|
1074
|
+
import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1165
1075
|
var RadioInput = (props) => {
|
|
1166
|
-
const [list, setList] =
|
|
1167
|
-
|
|
1076
|
+
const [list, setList] = useState3([]);
|
|
1077
|
+
useEffect4(() => {
|
|
1168
1078
|
async function loadData() {
|
|
1169
1079
|
if (props.dataset) {
|
|
1170
1080
|
setList(props.dataset);
|
|
@@ -1206,22 +1116,22 @@ var RadioInput = (props) => {
|
|
|
1206
1116
|
});
|
|
1207
1117
|
}
|
|
1208
1118
|
};
|
|
1209
|
-
return /* @__PURE__ */
|
|
1210
|
-
/* @__PURE__ */
|
|
1211
|
-
/* @__PURE__ */
|
|
1119
|
+
return /* @__PURE__ */ jsxs16("div", { className: "block", children: [
|
|
1120
|
+
/* @__PURE__ */ jsx16("span", { className: "text-sm font-medium", children: props.attributes?.label }),
|
|
1121
|
+
/* @__PURE__ */ jsx16("div", { className: "flex flex-col gap-3", children: list.map((item, index) => {
|
|
1212
1122
|
const itemValue = item[props.dataKeyFieldName];
|
|
1213
1123
|
const isSelected = String(itemValue) === String(props.value ?? "");
|
|
1214
1124
|
const isRecommended = props.dataRecommendedValue !== void 0 && String(itemValue) === String(props.dataRecommendedValue);
|
|
1215
1125
|
const resultClassName = isSelected ? isRecommended ? "bg-success" : props.dataRecommendedValue ? "bg-alert" : "border-transparent" : "border-transparent";
|
|
1216
1126
|
const iconName = isSelected && props.dataRecommendedValue ? isRecommended ? "checkCircle" : "xCircle" : void 0;
|
|
1217
1127
|
const inputId = `${props.name}-${props.index ?? 0}-id-${index}`;
|
|
1218
|
-
return /* @__PURE__ */
|
|
1128
|
+
return /* @__PURE__ */ jsxs16(
|
|
1219
1129
|
"div",
|
|
1220
1130
|
{
|
|
1221
1131
|
className: `font-normal flex items-center justify-between gap-4 cursor-pointer border rounded p-2 ${resultClassName}`,
|
|
1222
1132
|
children: [
|
|
1223
|
-
/* @__PURE__ */
|
|
1224
|
-
/* @__PURE__ */
|
|
1133
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex gap-4 items-start", children: [
|
|
1134
|
+
/* @__PURE__ */ jsx16(
|
|
1225
1135
|
"input",
|
|
1226
1136
|
{
|
|
1227
1137
|
type: "radio",
|
|
@@ -1235,108 +1145,19 @@ var RadioInput = (props) => {
|
|
|
1235
1145
|
required: props.attributes?.required
|
|
1236
1146
|
}
|
|
1237
1147
|
),
|
|
1238
|
-
/* @__PURE__ */
|
|
1148
|
+
/* @__PURE__ */ jsx16("label", { className: "text-body-950 pr-2", htmlFor: inputId, children: item[props.dataTextFieldName] })
|
|
1239
1149
|
] }),
|
|
1240
|
-
iconName && /* @__PURE__ */
|
|
1150
|
+
iconName && /* @__PURE__ */ jsx16(Icon_default, { className: "w-5 h-5 text-success", name: iconName })
|
|
1241
1151
|
]
|
|
1242
1152
|
},
|
|
1243
1153
|
String(itemValue)
|
|
1244
1154
|
);
|
|
1245
1155
|
}) }),
|
|
1246
|
-
/* @__PURE__ */
|
|
1156
|
+
/* @__PURE__ */ jsx16("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props.attributes?.errorMessage ?? "" })
|
|
1247
1157
|
] });
|
|
1248
1158
|
};
|
|
1249
1159
|
var RadioInput_default = RadioInput;
|
|
1250
1160
|
|
|
1251
|
-
// src/components/controls/edit/Switcher.tsx
|
|
1252
|
-
import { useEffect as useEffect6, useState as useState5 } from "react";
|
|
1253
|
-
import { jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1254
|
-
var Switcher = (props) => {
|
|
1255
|
-
const [list, setList] = useState5([]);
|
|
1256
|
-
useEffect6(() => {
|
|
1257
|
-
async function loadData() {
|
|
1258
|
-
if (props.dataset) {
|
|
1259
|
-
setList(props.dataset);
|
|
1260
|
-
return;
|
|
1261
|
-
}
|
|
1262
|
-
if (!props.dataSource || !props.serviceClient) {
|
|
1263
|
-
setList([]);
|
|
1264
|
-
return;
|
|
1265
|
-
}
|
|
1266
|
-
let dataSource = props.dataSource;
|
|
1267
|
-
if (props.dataSourceDependsOn) {
|
|
1268
|
-
if (!props.dependentValue) {
|
|
1269
|
-
setList([]);
|
|
1270
|
-
return;
|
|
1271
|
-
}
|
|
1272
|
-
dataSource = dataSource.replace(
|
|
1273
|
-
`{${props.dataSourceDependsOn}}`,
|
|
1274
|
-
props.dependentValue
|
|
1275
|
-
);
|
|
1276
|
-
}
|
|
1277
|
-
const response = await props.serviceClient.get(dataSource);
|
|
1278
|
-
setList(response.result ?? []);
|
|
1279
|
-
}
|
|
1280
|
-
loadData();
|
|
1281
|
-
}, [
|
|
1282
|
-
props.dataSource,
|
|
1283
|
-
props.dataSourceDependsOn,
|
|
1284
|
-
props.dataset,
|
|
1285
|
-
props.dependentValue,
|
|
1286
|
-
props.serviceClient
|
|
1287
|
-
]);
|
|
1288
|
-
const changeHandler = (event) => {
|
|
1289
|
-
props.callback?.({
|
|
1290
|
-
name: props.name,
|
|
1291
|
-
value: event.target.value,
|
|
1292
|
-
index: props.index,
|
|
1293
|
-
groupKey: props.groupKey
|
|
1294
|
-
});
|
|
1295
|
-
};
|
|
1296
|
-
const value = props.value === void 0 || props.value === null ? "" : String(props.value);
|
|
1297
|
-
return /* @__PURE__ */ jsxs18("label", { className: "block mb-1", children: [
|
|
1298
|
-
/* @__PURE__ */ jsx18("span", { className: "text-sm font-medium", children: props.attributes?.label }),
|
|
1299
|
-
list.length === 0 ? /* @__PURE__ */ jsx18(
|
|
1300
|
-
"input",
|
|
1301
|
-
{
|
|
1302
|
-
type: "text",
|
|
1303
|
-
name: props.name,
|
|
1304
|
-
id: props.name,
|
|
1305
|
-
value,
|
|
1306
|
-
onChange: changeHandler,
|
|
1307
|
-
required: props.attributes?.required,
|
|
1308
|
-
placeholder: props.attributes?.placeholder,
|
|
1309
|
-
disabled: props.attributes?.readOnly,
|
|
1310
|
-
className: `peer input mt-1 py-1.5 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`
|
|
1311
|
-
}
|
|
1312
|
-
) : /* @__PURE__ */ jsxs18(
|
|
1313
|
-
"select",
|
|
1314
|
-
{
|
|
1315
|
-
name: props.name,
|
|
1316
|
-
id: props.name,
|
|
1317
|
-
value,
|
|
1318
|
-
onChange: changeHandler,
|
|
1319
|
-
required: props.attributes?.required,
|
|
1320
|
-
disabled: props.attributes?.readOnly,
|
|
1321
|
-
className: `peer select my-1 py-1 block w-full rounded shadow-sm ${props.inputClasses ?? ""}`,
|
|
1322
|
-
children: [
|
|
1323
|
-
/* @__PURE__ */ jsx18("option", { value: "", children: props.attributes?.placeholder || "Select" }),
|
|
1324
|
-
list.map((item) => /* @__PURE__ */ jsx18(
|
|
1325
|
-
"option",
|
|
1326
|
-
{
|
|
1327
|
-
value: item[props.dataKeyFieldName],
|
|
1328
|
-
children: item[props.dataTextFieldName]
|
|
1329
|
-
},
|
|
1330
|
-
String(item[props.dataKeyFieldName])
|
|
1331
|
-
))
|
|
1332
|
-
]
|
|
1333
|
-
}
|
|
1334
|
-
),
|
|
1335
|
-
/* @__PURE__ */ jsx18("p", { className: "hidden group-[.validated]:peer-invalid:block mt-1 bg-error-weak text-sm", children: props.attributes?.errorMessage ?? "" })
|
|
1336
|
-
] });
|
|
1337
|
-
};
|
|
1338
|
-
var Switcher_default = Switcher;
|
|
1339
|
-
|
|
1340
1161
|
export {
|
|
1341
1162
|
MultilineTextInput_default,
|
|
1342
1163
|
LineTextInput_default,
|
|
@@ -1350,10 +1171,8 @@ export {
|
|
|
1350
1171
|
DateTimeInput_default,
|
|
1351
1172
|
ColorInput_default,
|
|
1352
1173
|
SelectWithSearchInput_default,
|
|
1353
|
-
BooleanSelect_default,
|
|
1354
1174
|
EmailInput_default,
|
|
1355
1175
|
TimeInput_default,
|
|
1356
1176
|
DateInput_default,
|
|
1357
|
-
RadioInput_default
|
|
1358
|
-
Switcher_default
|
|
1177
|
+
RadioInput_default
|
|
1359
1178
|
};
|
package/dist/index.d.mts
CHANGED
|
@@ -54,7 +54,6 @@ declare const InputControlType: {
|
|
|
54
54
|
moneyInput: string;
|
|
55
55
|
select: string;
|
|
56
56
|
percentageInput: string;
|
|
57
|
-
asset: string;
|
|
58
57
|
assetUpload: string;
|
|
59
58
|
phoneInput: string;
|
|
60
59
|
numberInput: string;
|
|
@@ -65,11 +64,9 @@ declare const InputControlType: {
|
|
|
65
64
|
colorInput: string;
|
|
66
65
|
selectWithSearchInput: string;
|
|
67
66
|
selectWithSearchPanel: string;
|
|
68
|
-
booleanSelect: string;
|
|
69
67
|
switchInput: string;
|
|
70
68
|
dateInput: string;
|
|
71
69
|
radioInput: string;
|
|
72
|
-
switcher: string;
|
|
73
70
|
videoInput: string;
|
|
74
71
|
referenceInput: string;
|
|
75
72
|
};
|
|
@@ -272,8 +269,6 @@ declare const DateTimeInput: React__default.FC<InputControlProps>;
|
|
|
272
269
|
|
|
273
270
|
declare const ColorInput: React__default.FC<InputControlProps>;
|
|
274
271
|
|
|
275
|
-
declare const BooleanSelect: React__default.FC<InputControlProps>;
|
|
276
|
-
|
|
277
272
|
declare const Select: React__default.FC<InputControlProps>;
|
|
278
273
|
|
|
279
274
|
declare const EmailInput: React__default.FC<InputControlProps>;
|
|
@@ -284,8 +279,6 @@ declare const DateInput: React__default.FC<InputControlProps>;
|
|
|
284
279
|
|
|
285
280
|
declare const RadioInput: React__default.FC<InputControlProps>;
|
|
286
281
|
|
|
287
|
-
declare const Switcher: React__default.FC<InputControlProps>;
|
|
288
|
-
|
|
289
282
|
interface TabItem {
|
|
290
283
|
tabTitle: string;
|
|
291
284
|
displayOrder: number;
|
|
@@ -485,4 +478,4 @@ interface DataFormRendererProps {
|
|
|
485
478
|
}
|
|
486
479
|
declare const DataFormRenderer: ({ formDefinition, dataItem, params, tabs, apiBaseUrl, session, widgetProps, onSave, onDelete, onCancelAdd, isAddPage, entityId, }: DataFormRendererProps) => React.JSX.Element | null;
|
|
487
480
|
|
|
488
|
-
export { type ActionResponse$1 as ActionResponse,
|
|
481
|
+
export { type ActionResponse$1 as ActionResponse, Button, CheckboxInput, ColorInput, DataFormRenderer, DataList, DataListRenderer, DateInput, DateTimeInput, EmailInput, EnterAnimationHydrator, InputControl, type InputControlProps, InputControlType, LineTextInput, MoneyInput, MultilineTextInput, NavigationTabsV2, NumberInput, OtpInput, PageBodyRenderer, PercentageInput, PhoneInput, RadioInput, Select, StyleTypes, TimeInput, Toast, ToastService, ViewControl, type ViewControlProps, ViewControlTypes };
|
package/dist/index.d.ts
CHANGED
|
@@ -54,7 +54,6 @@ declare const InputControlType: {
|
|
|
54
54
|
moneyInput: string;
|
|
55
55
|
select: string;
|
|
56
56
|
percentageInput: string;
|
|
57
|
-
asset: string;
|
|
58
57
|
assetUpload: string;
|
|
59
58
|
phoneInput: string;
|
|
60
59
|
numberInput: string;
|
|
@@ -65,11 +64,9 @@ declare const InputControlType: {
|
|
|
65
64
|
colorInput: string;
|
|
66
65
|
selectWithSearchInput: string;
|
|
67
66
|
selectWithSearchPanel: string;
|
|
68
|
-
booleanSelect: string;
|
|
69
67
|
switchInput: string;
|
|
70
68
|
dateInput: string;
|
|
71
69
|
radioInput: string;
|
|
72
|
-
switcher: string;
|
|
73
70
|
videoInput: string;
|
|
74
71
|
referenceInput: string;
|
|
75
72
|
};
|
|
@@ -272,8 +269,6 @@ declare const DateTimeInput: React__default.FC<InputControlProps>;
|
|
|
272
269
|
|
|
273
270
|
declare const ColorInput: React__default.FC<InputControlProps>;
|
|
274
271
|
|
|
275
|
-
declare const BooleanSelect: React__default.FC<InputControlProps>;
|
|
276
|
-
|
|
277
272
|
declare const Select: React__default.FC<InputControlProps>;
|
|
278
273
|
|
|
279
274
|
declare const EmailInput: React__default.FC<InputControlProps>;
|
|
@@ -284,8 +279,6 @@ declare const DateInput: React__default.FC<InputControlProps>;
|
|
|
284
279
|
|
|
285
280
|
declare const RadioInput: React__default.FC<InputControlProps>;
|
|
286
281
|
|
|
287
|
-
declare const Switcher: React__default.FC<InputControlProps>;
|
|
288
|
-
|
|
289
282
|
interface TabItem {
|
|
290
283
|
tabTitle: string;
|
|
291
284
|
displayOrder: number;
|
|
@@ -485,4 +478,4 @@ interface DataFormRendererProps {
|
|
|
485
478
|
}
|
|
486
479
|
declare const DataFormRenderer: ({ formDefinition, dataItem, params, tabs, apiBaseUrl, session, widgetProps, onSave, onDelete, onCancelAdd, isAddPage, entityId, }: DataFormRendererProps) => React.JSX.Element | null;
|
|
487
480
|
|
|
488
|
-
export { type ActionResponse$1 as ActionResponse,
|
|
481
|
+
export { type ActionResponse$1 as ActionResponse, Button, CheckboxInput, ColorInput, DataFormRenderer, DataList, DataListRenderer, DateInput, DateTimeInput, EmailInput, EnterAnimationHydrator, InputControl, type InputControlProps, InputControlType, LineTextInput, MoneyInput, MultilineTextInput, NavigationTabsV2, NumberInput, OtpInput, PageBodyRenderer, PercentageInput, PhoneInput, RadioInput, Select, StyleTypes, TimeInput, Toast, ToastService, ViewControl, type ViewControlProps, ViewControlTypes };
|