baaz-custom-components 5.2.8 → 5.2.9
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -5
- package/dist/index.mjs +11 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -2239,9 +2239,15 @@ var Filters = ({
|
|
|
2239
2239
|
"select",
|
|
2240
2240
|
{
|
|
2241
2241
|
value: (_e = condition.value) != null ? _e : "",
|
|
2242
|
-
onChange: (e) =>
|
|
2243
|
-
|
|
2244
|
-
|
|
2242
|
+
onChange: (e) => {
|
|
2243
|
+
var _a2;
|
|
2244
|
+
const rawValue = e.target.value;
|
|
2245
|
+
const firstOption = (_a2 = selectedOperator.options) == null ? void 0 : _a2[0];
|
|
2246
|
+
const coercedValue = typeof (firstOption == null ? void 0 : firstOption.value) === "number" ? Number(rawValue) : rawValue;
|
|
2247
|
+
updateCondition(condition.id, {
|
|
2248
|
+
value: coercedValue
|
|
2249
|
+
});
|
|
2250
|
+
},
|
|
2245
2251
|
className: "w-full px-3 py-2 rounded-md bg-input text-sm focus:outline-none",
|
|
2246
2252
|
children: [
|
|
2247
2253
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: "", disabled: true, children: "Select value" }),
|
|
@@ -2267,7 +2273,7 @@ var Filters = ({
|
|
|
2267
2273
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2268
2274
|
"input",
|
|
2269
2275
|
{
|
|
2270
|
-
type: "
|
|
2276
|
+
type: "datetime-local",
|
|
2271
2277
|
value: ((_g = condition.value) == null ? void 0 : _g.start) ? new Date(condition.value.start).toISOString().split("T")[0] : "",
|
|
2272
2278
|
onChange: (e) => updateCondition(condition.id, {
|
|
2273
2279
|
value: __spreadProps(__spreadValues({}, condition.value), {
|
|
@@ -2280,7 +2286,7 @@ var Filters = ({
|
|
|
2280
2286
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2281
2287
|
"input",
|
|
2282
2288
|
{
|
|
2283
|
-
type: "
|
|
2289
|
+
type: "datetime-local",
|
|
2284
2290
|
value: ((_h = condition.value) == null ? void 0 : _h.end) ? new Date(condition.value.end).toISOString().split("T")[0] : "",
|
|
2285
2291
|
onChange: (e) => updateCondition(condition.id, {
|
|
2286
2292
|
value: __spreadProps(__spreadValues({}, condition.value), {
|
package/dist/index.mjs
CHANGED
|
@@ -2208,9 +2208,15 @@ var Filters = ({
|
|
|
2208
2208
|
"select",
|
|
2209
2209
|
{
|
|
2210
2210
|
value: (_e = condition.value) != null ? _e : "",
|
|
2211
|
-
onChange: (e) =>
|
|
2212
|
-
|
|
2213
|
-
|
|
2211
|
+
onChange: (e) => {
|
|
2212
|
+
var _a2;
|
|
2213
|
+
const rawValue = e.target.value;
|
|
2214
|
+
const firstOption = (_a2 = selectedOperator.options) == null ? void 0 : _a2[0];
|
|
2215
|
+
const coercedValue = typeof (firstOption == null ? void 0 : firstOption.value) === "number" ? Number(rawValue) : rawValue;
|
|
2216
|
+
updateCondition(condition.id, {
|
|
2217
|
+
value: coercedValue
|
|
2218
|
+
});
|
|
2219
|
+
},
|
|
2214
2220
|
className: "w-full px-3 py-2 rounded-md bg-input text-sm focus:outline-none",
|
|
2215
2221
|
children: [
|
|
2216
2222
|
/* @__PURE__ */ jsx23("option", { value: "", disabled: true, children: "Select value" }),
|
|
@@ -2236,7 +2242,7 @@ var Filters = ({
|
|
|
2236
2242
|
/* @__PURE__ */ jsx23(
|
|
2237
2243
|
"input",
|
|
2238
2244
|
{
|
|
2239
|
-
type: "
|
|
2245
|
+
type: "datetime-local",
|
|
2240
2246
|
value: ((_g = condition.value) == null ? void 0 : _g.start) ? new Date(condition.value.start).toISOString().split("T")[0] : "",
|
|
2241
2247
|
onChange: (e) => updateCondition(condition.id, {
|
|
2242
2248
|
value: __spreadProps(__spreadValues({}, condition.value), {
|
|
@@ -2249,7 +2255,7 @@ var Filters = ({
|
|
|
2249
2255
|
/* @__PURE__ */ jsx23(
|
|
2250
2256
|
"input",
|
|
2251
2257
|
{
|
|
2252
|
-
type: "
|
|
2258
|
+
type: "datetime-local",
|
|
2253
2259
|
value: ((_h = condition.value) == null ? void 0 : _h.end) ? new Date(condition.value.end).toISOString().split("T")[0] : "",
|
|
2254
2260
|
onChange: (e) => updateCondition(condition.id, {
|
|
2255
2261
|
value: __spreadProps(__spreadValues({}, condition.value), {
|