@nocobase/client 1.3.48-beta → 1.3.50-beta
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/es/index.mjs +37 -37
- package/lib/index.js +6 -6
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -4140,7 +4140,7 @@ function addAppVersion(e, t) {
|
|
|
4140
4140
|
addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
|
|
4141
4141
|
}), e;
|
|
4142
4142
|
}
|
|
4143
|
-
const name = "@nocobase/client", version$1 = "1.3.
|
|
4143
|
+
const name = "@nocobase/client", version$1 = "1.3.50-beta", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
4144
4144
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
4145
4145
|
"@ant-design/cssinjs": "^1.11.1",
|
|
4146
4146
|
"@ant-design/icons": "^5.1.4",
|
|
@@ -4161,9 +4161,9 @@ const name = "@nocobase/client", version$1 = "1.3.48-beta", license = "AGPL-3.0"
|
|
|
4161
4161
|
"@formily/reactive-react": "^2.2.27",
|
|
4162
4162
|
"@formily/shared": "^2.2.27",
|
|
4163
4163
|
"@formily/validator": "^2.2.27",
|
|
4164
|
-
"@nocobase/evaluators": "1.3.
|
|
4165
|
-
"@nocobase/sdk": "1.3.
|
|
4166
|
-
"@nocobase/utils": "1.3.
|
|
4164
|
+
"@nocobase/evaluators": "1.3.50-beta",
|
|
4165
|
+
"@nocobase/sdk": "1.3.50-beta",
|
|
4166
|
+
"@nocobase/utils": "1.3.50-beta",
|
|
4167
4167
|
ahooks: "^3.7.2",
|
|
4168
4168
|
antd: "5.12.8",
|
|
4169
4169
|
"antd-style": "3.7.1",
|
|
@@ -21867,7 +21867,7 @@ const useStyles$d = createStyles(() => ({
|
|
|
21867
21867
|
return /* @__PURE__ */ jsx(
|
|
21868
21868
|
Input$3.TextArea,
|
|
21869
21869
|
{
|
|
21870
|
-
value: r.title
|
|
21870
|
+
value: r.title,
|
|
21871
21871
|
defaultValue: n("Linkage rule"),
|
|
21872
21872
|
onChange: (a) => {
|
|
21873
21873
|
a.stopPropagation(), t.field.value.splice(o, 1, F(h({}, r), { title: a.target.value }));
|
|
@@ -23541,18 +23541,18 @@ const FilterActionContext = createContext(null);
|
|
|
23541
23541
|
FilterActionContext.displayName = "FilterActionContext";
|
|
23542
23542
|
const FilterAction = withDynamicSchemaProps(
|
|
23543
23543
|
observer$1((e) => {
|
|
23544
|
-
const { t } = useTranslation(), o = useField(), [n, r] = useState(!1), { designable: i, dn: a } = useDesignable(), l = useFieldSchema(), c = useMemo(() => e.form || createForm(), []),
|
|
23545
|
-
r(
|
|
23544
|
+
const { t } = useTranslation(), o = useField(), [n, r] = useState(!1), { designable: i, dn: a } = useDesignable(), l = useFieldSchema(), c = useCompile(), u = useMemo(() => e.form || createForm(), []), C = useProps(e), { options: d, onSubmit: p, onReset: m, Container: g = StablePopover } = C, x = W(C, ["options", "onSubmit", "onReset", "Container"]), f = useCallback((S) => {
|
|
23545
|
+
r(S);
|
|
23546
23546
|
}, []);
|
|
23547
23547
|
return /* @__PURE__ */ jsx(FilterActionContext.Provider, { value: { field: o, fieldSchema: l, designable: i, dn: a }, children: /* @__PURE__ */ jsx(
|
|
23548
|
-
|
|
23548
|
+
g,
|
|
23549
23549
|
{
|
|
23550
23550
|
destroyTooltipOnHide: !0,
|
|
23551
23551
|
placement: "bottomLeft",
|
|
23552
23552
|
open: n,
|
|
23553
|
-
onOpenChange:
|
|
23553
|
+
onOpenChange: f,
|
|
23554
23554
|
trigger: "click",
|
|
23555
|
-
content: /* @__PURE__ */ jsx("form", { children: /* @__PURE__ */ jsxs(FormProvider, { form:
|
|
23555
|
+
content: /* @__PURE__ */ jsx("form", { children: /* @__PURE__ */ jsxs(FormProvider, { form: u, children: [
|
|
23556
23556
|
/* @__PURE__ */ jsx(DatePickerProvider, { value: { utc: !1 }, children: /* @__PURE__ */ jsx(
|
|
23557
23557
|
SchemaComponent,
|
|
23558
23558
|
{
|
|
@@ -23561,7 +23561,7 @@ const FilterAction = withDynamicSchemaProps(
|
|
|
23561
23561
|
properties: {
|
|
23562
23562
|
filter: {
|
|
23563
23563
|
type: "string",
|
|
23564
|
-
enum:
|
|
23564
|
+
enum: d || o.dataSource,
|
|
23565
23565
|
default: l.default,
|
|
23566
23566
|
"x-component": "Filter",
|
|
23567
23567
|
"x-component-props": {}
|
|
@@ -23584,7 +23584,7 @@ const FilterAction = withDynamicSchemaProps(
|
|
|
23584
23584
|
Button,
|
|
23585
23585
|
{
|
|
23586
23586
|
onClick: () => z(void 0, null, function* () {
|
|
23587
|
-
yield
|
|
23587
|
+
yield u.reset(), m == null || m(u.values), o.title = c(l.title) || t("Filter"), r(!1);
|
|
23588
23588
|
}),
|
|
23589
23589
|
children: t("Reset")
|
|
23590
23590
|
}
|
|
@@ -23594,8 +23594,8 @@ const FilterAction = withDynamicSchemaProps(
|
|
|
23594
23594
|
{
|
|
23595
23595
|
type: "primary",
|
|
23596
23596
|
htmlType: "submit",
|
|
23597
|
-
onClick: (
|
|
23598
|
-
|
|
23597
|
+
onClick: (S) => {
|
|
23598
|
+
S.preventDefault(), S.stopPropagation(), p == null || p(u.values), r(!1);
|
|
23599
23599
|
},
|
|
23600
23600
|
children: t("Submit")
|
|
23601
23601
|
}
|
|
@@ -23604,7 +23604,7 @@ const FilterAction = withDynamicSchemaProps(
|
|
|
23604
23604
|
}
|
|
23605
23605
|
)
|
|
23606
23606
|
] }) }),
|
|
23607
|
-
children: /* @__PURE__ */ jsx(Action, F(h({ onClick: () => r(!n) },
|
|
23607
|
+
children: /* @__PURE__ */ jsx(Action, F(h({ onClick: () => r(!n) }, x), { title: o.title }))
|
|
23608
23608
|
}
|
|
23609
23609
|
) });
|
|
23610
23610
|
}),
|
|
@@ -23993,36 +23993,36 @@ const useGetFilterOptions = () => {
|
|
|
23993
23993
|
const { name: e } = useCollection_deprecated(), t = useFilterOptions(e), { service: o, props: n } = useBlockRequestContext();
|
|
23994
23994
|
return useFilterFieldProps({ options: t, service: o, params: n == null ? void 0 : n.params });
|
|
23995
23995
|
}, useFilterFieldProps = ({ options: e, service: t, params: o }) => {
|
|
23996
|
-
const { t: n } = useTranslation(), r = useField(), i = useDataLoadingMode();
|
|
23996
|
+
const { t: n } = useTranslation(), r = useField(), i = useDataLoadingMode(), a = useFieldSchema(), l = useCompile();
|
|
23997
23997
|
return {
|
|
23998
23998
|
options: e,
|
|
23999
|
-
onSubmit(
|
|
24000
|
-
var
|
|
24001
|
-
const
|
|
24002
|
-
if (i === "manual" && _.isEmpty(
|
|
23999
|
+
onSubmit(c) {
|
|
24000
|
+
var g, x, f;
|
|
24001
|
+
const u = o.filter, d = removeNullCondition(c == null ? void 0 : c.filter);
|
|
24002
|
+
if (i === "manual" && _.isEmpty(d))
|
|
24003
24003
|
return t.mutate(void 0);
|
|
24004
|
-
const
|
|
24005
|
-
|
|
24006
|
-
F(h({}, (
|
|
24007
|
-
{ filters:
|
|
24004
|
+
const p = ((x = (g = t.params) == null ? void 0 : g[1]) == null ? void 0 : x.filters) || {};
|
|
24005
|
+
p.filterAction = d, t.run(
|
|
24006
|
+
F(h({}, (f = t.params) == null ? void 0 : f[0]), { page: 1, filter: mergeFilter([...Object.values(p), u]) }),
|
|
24007
|
+
{ filters: p }
|
|
24008
24008
|
);
|
|
24009
|
-
const
|
|
24010
|
-
|
|
24009
|
+
const m = (d == null ? void 0 : d.$and) || (d == null ? void 0 : d.$or);
|
|
24010
|
+
m != null && m.length ? r.title = n("{{count}} filter items", { count: (m == null ? void 0 : m.length) || 0 }) : r.title = l(a.title) || n("Filter");
|
|
24011
24011
|
},
|
|
24012
24012
|
onReset() {
|
|
24013
|
-
var
|
|
24014
|
-
const
|
|
24015
|
-
delete
|
|
24016
|
-
const
|
|
24017
|
-
F(h({}, (
|
|
24018
|
-
filter: mergeFilter([...Object.values(
|
|
24013
|
+
var p, m, g;
|
|
24014
|
+
const c = o.filter, u = ((m = (p = t.params) == null ? void 0 : p[1]) == null ? void 0 : m.filters) || {};
|
|
24015
|
+
delete u.filterAction;
|
|
24016
|
+
const d = [
|
|
24017
|
+
F(h({}, (g = t.params) == null ? void 0 : g[0]), {
|
|
24018
|
+
filter: mergeFilter([...Object.values(u), c]),
|
|
24019
24019
|
page: 1
|
|
24020
24020
|
}),
|
|
24021
|
-
{ filters:
|
|
24021
|
+
{ filters: u }
|
|
24022
24022
|
];
|
|
24023
|
-
if (
|
|
24024
|
-
return t.params =
|
|
24025
|
-
t.run(...
|
|
24023
|
+
if (i === "manual")
|
|
24024
|
+
return t.params = d, t.mutate(void 0);
|
|
24025
|
+
t.run(...d);
|
|
24026
24026
|
}
|
|
24027
24027
|
};
|
|
24028
24028
|
}, useLabelFields$1 = (e) => {
|
|
@@ -49311,7 +49311,7 @@ class OHOFieldInterface extends CollectionFieldInterface {
|
|
|
49311
49311
|
type: "string",
|
|
49312
49312
|
title: '{{t("Target collection")}}',
|
|
49313
49313
|
required: !0,
|
|
49314
|
-
"x-reactions": [
|
|
49314
|
+
"x-reactions": ["{{useAsyncDataSource(loadCollections)}}"],
|
|
49315
49315
|
"x-decorator": "FormItem",
|
|
49316
49316
|
"x-component": "Select",
|
|
49317
49317
|
"x-disabled": "{{ !createOnly }}"
|