@realtek/core-theme 0.0.76 → 0.0.77
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-lib/index.cjs +1 -1
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +11 -3
- package/dist-lib/index.js.map +1 -1
- package/dist-lib/style.css +1 -1
- package/package.json +1 -1
package/dist-lib/index.js
CHANGED
|
@@ -6077,7 +6077,7 @@ function qu({ moduleName: e, open: t = !1, filters: n = [], onClose: r, onApply:
|
|
|
6077
6077
|
}
|
|
6078
6078
|
function k() {
|
|
6079
6079
|
y.current = !0;
|
|
6080
|
-
let t = (o.getFieldsValue().filters ?? []).map(({ locked: e, ...t }) => {
|
|
6080
|
+
let t = (o.getFieldsValue().filters ?? []).filter((e) => !A(e)).map(({ locked: e, ...t }) => {
|
|
6081
6081
|
let n = d.find((e) => e.value === t.field), r = n?.label ?? t.field, i = n?.filterInputType, a = i === "datepicker" || n?.type === "date", o = i === "number-range" || !i && n?.type === "number", s = i === "text";
|
|
6082
6082
|
if (a) {
|
|
6083
6083
|
let [e, n] = Array.isArray(t.values) ? t.values : [], a = (e) => e ? typeof e.format == "function" ? e.format("YYYY-MM-DD") : typeof e.toISOString == "function" || e instanceof Date ? e.toISOString().substring(0, 10) : null : null, o = a(e), s = a(n);
|
|
@@ -6123,7 +6123,14 @@ function qu({ moduleName: e, open: t = !1, filters: n = [], onClose: r, onApply:
|
|
|
6123
6123
|
filters: t
|
|
6124
6124
|
}), r?.();
|
|
6125
6125
|
}
|
|
6126
|
-
function A(e
|
|
6126
|
+
function A(e) {
|
|
6127
|
+
if (!e?.field) return !0;
|
|
6128
|
+
if (e.operator === "isEmpty" || e.operator === "notEmpty") return !1;
|
|
6129
|
+
let { values: t } = e;
|
|
6130
|
+
return typeof t == "string" ? t.trim() === "" : Array.isArray(t) ? t.length === 0 || t.every((e) => e == null || e === "") : !0;
|
|
6131
|
+
}
|
|
6132
|
+
let j = s.length === 0 || s.every(A);
|
|
6133
|
+
function M(e, t) {
|
|
6127
6134
|
let n = o.getFieldValue("filters") ?? [];
|
|
6128
6135
|
o.setFieldValue("filters", n.map((t, n) => n === e ? {
|
|
6129
6136
|
...t,
|
|
@@ -6160,6 +6167,7 @@ function qu({ moduleName: e, open: t = !1, filters: n = [], onClose: r, onApply:
|
|
|
6160
6167
|
}), /* @__PURE__ */ Q(Fu, {
|
|
6161
6168
|
variant: "primary",
|
|
6162
6169
|
onClick: k,
|
|
6170
|
+
disabled: j,
|
|
6163
6171
|
children: "Apply"
|
|
6164
6172
|
})]
|
|
6165
6173
|
}),
|
|
@@ -6247,7 +6255,7 @@ function qu({ moduleName: e, open: t = !1, filters: n = [], onClose: r, onApply:
|
|
|
6247
6255
|
options: x,
|
|
6248
6256
|
optionFilterProp: "label",
|
|
6249
6257
|
loading: l,
|
|
6250
|
-
onChange: (e) =>
|
|
6258
|
+
onChange: (e) => M(t.name, e)
|
|
6251
6259
|
})
|
|
6252
6260
|
})
|
|
6253
6261
|
}), /* @__PURE__ */ Q(B.Item, {
|