@nocobase/client 1.5.2 → 1.5.4
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 +41 -47
- package/lib/index.js +8 -8
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -7493,7 +7493,7 @@ function getSubscriber({
|
|
|
7493
7493
|
t.setState((d) => {
|
|
7494
7494
|
d.display = "visible";
|
|
7495
7495
|
});
|
|
7496
|
-
})) : (t[a] = c == null ? void 0 : c.value, requestAnimationFrame(() => {
|
|
7496
|
+
})) : (t[a] = c == null ? void 0 : c.value, t.data = t.data || {}, t.data.hidden = !1, requestAnimationFrame(() => {
|
|
7497
7497
|
t.setState((d) => {
|
|
7498
7498
|
d[a] = c == null ? void 0 : c.value;
|
|
7499
7499
|
});
|
|
@@ -12789,28 +12789,26 @@ const setFieldProps$1 = (e, t, n) => {
|
|
|
12789
12789
|
}, setRequired$1 = (e, t, n) => {
|
|
12790
12790
|
typeof t.required == "undefined" && (e.required = !!n.required);
|
|
12791
12791
|
}, FilterCollectionFieldInternalField = (e) => {
|
|
12792
|
-
var g, f, C, b;
|
|
12793
|
-
const t = useCompile(), n = useField(), o = useFieldSchema(), { getInterface: r } = useCollectionManager_deprecated(), { uiSchema: i, defaultValue: a, interface: l } = useCollectionField(), { isAllowToSetDefaultValue: c } = useIsAllowToSetDefaultValue(), u = r(l), d = (f = (g = u == null ? void 0 : u.filterable) == null ? void 0 : g.operators) == null ? void 0 : f.find(
|
|
12794
|
-
(S
|
|
12795
|
-
), p = useComponent(
|
|
12796
|
-
((C = d == null ? void 0 : d.schema) == null ? void 0 : C["x-component"]) || ((b = o["x-component-props"]) == null ? void 0 : b.component) || (i == null ? void 0 : i["x-component"]) || "Input"
|
|
12792
|
+
var g, f, C, b, S, y;
|
|
12793
|
+
const t = useCompile(), n = useField(), o = useFieldSchema(), { getInterface: r } = useCollectionManager_deprecated(), { uiSchema: i, defaultValue: a, interface: l } = useCollectionField(), { isAllowToSetDefaultValue: c } = useIsAllowToSetDefaultValue(), u = r(l), d = ((f = (g = u == null ? void 0 : u.filterable) == null ? void 0 : g.operators) == null ? void 0 : f.find((v, F) => v.value === (o == null ? void 0 : o["x-filter-operator"]))) || ((b = (C = u == null ? void 0 : u.filterable) == null ? void 0 : C.operators) == null ? void 0 : b[0]), p = useComponent(
|
|
12794
|
+
((S = d == null ? void 0 : d.schema) == null ? void 0 : S["x-component"]) || ((y = o["x-component-props"]) == null ? void 0 : y.component) || (i == null ? void 0 : i["x-component"]) || "Input"
|
|
12797
12795
|
), m = useFormBlockContext(), h = useDynamicComponentProps(i == null ? void 0 : i["x-use-component-props"], e);
|
|
12798
12796
|
return useEffect(() => {
|
|
12799
|
-
var
|
|
12797
|
+
var I;
|
|
12800
12798
|
if (!i)
|
|
12801
12799
|
return;
|
|
12802
|
-
const
|
|
12803
|
-
if (setFieldProps$1(n, "content",
|
|
12804
|
-
const
|
|
12805
|
-
|
|
12806
|
-
}
|
|
12807
|
-
if (!n.validator && (
|
|
12808
|
-
const
|
|
12809
|
-
n.validator =
|
|
12810
|
-
}
|
|
12811
|
-
o["x-disabled"] === !0 && (n.disabled = !0), o["x-read-pretty"] === !0 && (n.readPretty = !0), setRequired$1(n, o,
|
|
12812
|
-
const
|
|
12813
|
-
n.componentProps = merge(
|
|
12800
|
+
const v = t(i);
|
|
12801
|
+
if (setFieldProps$1(n, "content", v["x-content"]), setFieldProps$1(n, "title", v.title), setFieldProps$1(n, "description", v.description), m != null && m.form) {
|
|
12802
|
+
const R = c() ? o.default || a : void 0;
|
|
12803
|
+
R != null && setFieldProps$1(n, "initialValue", R);
|
|
12804
|
+
}
|
|
12805
|
+
if (!n.validator && (v["x-validator"] || o["x-validator"])) {
|
|
12806
|
+
const R = concat([], v["x-validator"] || [], o["x-validator"] || []);
|
|
12807
|
+
n.validator = R;
|
|
12808
|
+
}
|
|
12809
|
+
o["x-disabled"] === !0 && (n.disabled = !0), o["x-read-pretty"] === !0 && (n.readPretty = !0), setRequired$1(n, o, v), n.dataSource = v.enum;
|
|
12810
|
+
const F = t(x(x({}, ((I = d == null ? void 0 : d.schema) == null ? void 0 : I["x-component-props"]) || {}), v["x-component-props"] || {})) || {};
|
|
12811
|
+
n.componentProps = merge(F, n.componentProps || {}, h || {});
|
|
12814
12812
|
}, [i]), i ? /* @__PURE__ */ jsx(p, x(x({}, e), h)) : null;
|
|
12815
12813
|
}, FilterCollectionField = connect((e) => {
|
|
12816
12814
|
const t = useFieldSchema();
|
|
@@ -19528,7 +19526,7 @@ DatePicker.FilterWithPicker = function e(t) {
|
|
|
19528
19526
|
});
|
|
19529
19527
|
}
|
|
19530
19528
|
}), g = useField(), [f, C] = useState(h);
|
|
19531
|
-
return /* @__PURE__ */ jsxs(Space$1.Compact, { children: [
|
|
19529
|
+
return /* @__PURE__ */ jsxs(Space$1.Compact, { style: { width: "100%" }, children: [
|
|
19532
19530
|
/* @__PURE__ */ jsx(
|
|
19533
19531
|
Select$1,
|
|
19534
19532
|
{
|
|
@@ -20152,7 +20150,7 @@ const ParentCollectionProvider = (e) => {
|
|
|
20152
20150
|
return r ? /* @__PURE__ */ jsx(CollectionProvider, { name: String(t).split(".")[0], children: /* @__PURE__ */ jsx(ParentCollectionProvider, { children: /* @__PURE__ */ jsx(CollectionFieldProvider, { name: t, children: /* @__PURE__ */ jsx(CollectionProvider, { name: r, children: n }) }) }) }) : /* @__PURE__ */ jsx(CollectionDeletedPlaceholder, { type: "Collection", name: t });
|
|
20153
20151
|
}, useAssociationName = () => {
|
|
20154
20152
|
const e = useCollectionField();
|
|
20155
|
-
return e
|
|
20153
|
+
return e != null && e.target ? `${e.collectionName}.${e.name}` : null;
|
|
20156
20154
|
}, useCurrentParentRecordContext = () => {
|
|
20157
20155
|
var c, u;
|
|
20158
20156
|
const e = useCollectionRecord(), { name: t, dataSource: n } = useParentCollection() || {}, o = useCollection(), { isInSubForm: r, isInSubTable: i } = useFlag() || {}, a = t ? n : o == null ? void 0 : o.dataSource, l = useCollectionField();
|
|
@@ -24177,9 +24175,7 @@ const useGetFilterOptions = () => {
|
|
|
24177
24175
|
}
|
|
24178
24176
|
return t.unflatten(o);
|
|
24179
24177
|
}, useFilterActionProps$1 = () => {
|
|
24180
|
-
const e = useCollection(), t = useFilterOptions(e == null ? void 0 : e.name);
|
|
24181
|
-
console.log(t);
|
|
24182
|
-
const n = useDataBlockProps();
|
|
24178
|
+
const e = useCollection(), t = useFilterOptions(e == null ? void 0 : e.name), n = useDataBlockProps();
|
|
24183
24179
|
return useFilterFieldProps({ options: t, params: n == null ? void 0 : n.params });
|
|
24184
24180
|
}, useFilterFieldProps = ({ options: e, service: t, params: n }) => {
|
|
24185
24181
|
const { getDataBlockRequest: o } = useDataBlockRequestGetter(), { t: r } = useTranslation(), i = useField(), a = useDataLoadingMode(), l = useFieldSchema(), c = useCompile(), u = useCallback(
|
|
@@ -33062,7 +33058,7 @@ const tableBlockSettings = new SchemaSettings({
|
|
|
33062
33058
|
name: "enableLink",
|
|
33063
33059
|
type: "switch",
|
|
33064
33060
|
useVisible() {
|
|
33065
|
-
const e = useField(), { fieldSchema: t } = useColumnSchema$1(), n = useFieldSchema(), o = t || n, { name: r } = useBlockContext();
|
|
33061
|
+
const e = useField(), { fieldSchema: t } = useColumnSchema$1(), n = useFieldSchema(), o = t || n, { name: r } = useBlockContext() || {};
|
|
33066
33062
|
return r !== "kanban" && ((o == null ? void 0 : o["x-read-pretty"]) || e.readPretty);
|
|
33067
33063
|
},
|
|
33068
33064
|
useComponentProps() {
|
|
@@ -33553,11 +33549,7 @@ const tableBlockSettings = new SchemaSettings({
|
|
|
33553
33549
|
return e && !t;
|
|
33554
33550
|
}
|
|
33555
33551
|
}),
|
|
33556
|
-
|
|
33557
|
-
useVisible() {
|
|
33558
|
-
return useField().componentProps.multiple !== !1;
|
|
33559
|
-
}
|
|
33560
|
-
}),
|
|
33552
|
+
getAllowMultiple({ title: "Allow multiple selection" }),
|
|
33561
33553
|
P(x({}, titleField$1), {
|
|
33562
33554
|
useVisible: useIsAssociationField
|
|
33563
33555
|
}),
|
|
@@ -35185,7 +35177,7 @@ function addAppVersion(e, t) {
|
|
|
35185
35177
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
35186
35178
|
}), e;
|
|
35187
35179
|
}
|
|
35188
|
-
const name = "@nocobase/client", version = "1.5.
|
|
35180
|
+
const name = "@nocobase/client", version = "1.5.4", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
35189
35181
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
35190
35182
|
"@ant-design/cssinjs": "^1.11.1",
|
|
35191
35183
|
"@ant-design/icons": "^5.1.4",
|
|
@@ -35207,9 +35199,9 @@ const name = "@nocobase/client", version = "1.5.2", license = "AGPL-3.0", main =
|
|
|
35207
35199
|
"@formily/reactive-react": "^2.2.27",
|
|
35208
35200
|
"@formily/shared": "^2.2.27",
|
|
35209
35201
|
"@formily/validator": "^2.2.27",
|
|
35210
|
-
"@nocobase/evaluators": "1.5.
|
|
35211
|
-
"@nocobase/sdk": "1.5.
|
|
35212
|
-
"@nocobase/utils": "1.5.
|
|
35202
|
+
"@nocobase/evaluators": "1.5.4",
|
|
35203
|
+
"@nocobase/sdk": "1.5.4",
|
|
35204
|
+
"@nocobase/utils": "1.5.4",
|
|
35213
35205
|
ahooks: "^3.7.2",
|
|
35214
35206
|
antd: "5.12.8",
|
|
35215
35207
|
"antd-style": "3.7.1",
|
|
@@ -56410,9 +56402,9 @@ const PluginDetail = ({ plugin: e, onCancel: t }) => {
|
|
|
56410
56402
|
/* @__PURE__ */ jsx(Typography.Text, { type: "secondary", children: n("Repository") }),
|
|
56411
56403
|
/* @__PURE__ */ jsx(Typography.Text, { strong: !0, children: a })
|
|
56412
56404
|
] }) }),
|
|
56413
|
-
((p = r == null ? void 0 : r.data) == null ? void 0 : p.
|
|
56405
|
+
((p = r == null ? void 0 : r.data) == null ? void 0 : p.homepage) && /* @__PURE__ */ jsx(Col, { span: 24, children: /* @__PURE__ */ jsxs("div", { className: c.PluginDetailBaseInfo, children: [
|
|
56414
56406
|
/* @__PURE__ */ jsx(Typography.Text, { type: "secondary", children: n("Homepage") }),
|
|
56415
|
-
/* @__PURE__ */ jsx("a", { href: (m = r == null ? void 0 : r.data) == null ? void 0 : m.
|
|
56407
|
+
/* @__PURE__ */ jsx("a", { href: (m = r == null ? void 0 : r.data) == null ? void 0 : m.homepage, target: "_blank", rel: "noreferrer", children: (h = r == null ? void 0 : r.data) == null ? void 0 : h.homepage })
|
|
56416
56408
|
] }) }),
|
|
56417
56409
|
e.description && /* @__PURE__ */ jsx(Col, { span: 24, children: /* @__PURE__ */ jsxs("div", { className: c.PluginDetailBaseInfo, children: [
|
|
56418
56410
|
/* @__PURE__ */ jsx(Typography.Text, { type: "secondary", children: n("Description") }),
|
|
@@ -63543,24 +63535,26 @@ const mockAPIClient = () => {
|
|
|
63543
63535
|
const e = new MockAPIClient(), t = e.mockAdapter();
|
|
63544
63536
|
return { apiClient: e, mockRequest: t };
|
|
63545
63537
|
}, PopupContextProvider = (e) => {
|
|
63546
|
-
var
|
|
63547
|
-
const { visible: t, setVisible: n } = e, [o, r] = useState(!1), { visible:
|
|
63538
|
+
var h, g;
|
|
63539
|
+
const { visible: t, setVisible: n } = e, [o, r] = useState(!1), [i, a] = useState(!1), { visible: l, setVisible: c } = useContext(PopupVisibleProviderContext) || {
|
|
63548
63540
|
visible: !1,
|
|
63549
63541
|
setVisible: () => {
|
|
63550
63542
|
}
|
|
63551
|
-
},
|
|
63552
|
-
(
|
|
63553
|
-
n == null || n(
|
|
63543
|
+
}, u = useFieldSchema(), d = useCallback(
|
|
63544
|
+
(f) => {
|
|
63545
|
+
n == null || n(f), r == null || r(f), c == null || c(f);
|
|
63554
63546
|
},
|
|
63555
|
-
[n,
|
|
63556
|
-
),
|
|
63547
|
+
[n, c]
|
|
63548
|
+
), p = ((h = u["x-component-props"]) == null ? void 0 : h.openMode) || "drawer", m = (g = u["x-component-props"]) == null ? void 0 : g.openSize;
|
|
63557
63549
|
return /* @__PURE__ */ jsx(PopupVisibleProvider, { visible: !1, children: /* @__PURE__ */ jsx(
|
|
63558
63550
|
ActionContextProvider,
|
|
63559
63551
|
{
|
|
63560
|
-
visible: t || o ||
|
|
63561
|
-
setVisible:
|
|
63562
|
-
openMode:
|
|
63563
|
-
openSize:
|
|
63552
|
+
visible: t || o || l,
|
|
63553
|
+
setVisible: d,
|
|
63554
|
+
openMode: p,
|
|
63555
|
+
openSize: m,
|
|
63556
|
+
formValueChanged: i,
|
|
63557
|
+
setFormValueChanged: a,
|
|
63564
63558
|
children: e.children
|
|
63565
63559
|
}
|
|
63566
63560
|
) });
|