@nocobase/client 1.4.7 → 1.4.8

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.
Files changed (3) hide show
  1. package/es/index.mjs +21 -24
  2. package/lib/index.js +52 -52
  3. package/package.json +5 -5
package/es/index.mjs CHANGED
@@ -4295,7 +4295,7 @@ function addAppVersion(e, t) {
4295
4295
  addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
4296
4296
  }), e;
4297
4297
  }
4298
- const name = "@nocobase/client", version$1 = "1.4.7", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
4298
+ const name = "@nocobase/client", version$1 = "1.4.8", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
4299
4299
  "@ahooksjs/use-url-state": "3.5.1",
4300
4300
  "@ant-design/cssinjs": "^1.11.1",
4301
4301
  "@ant-design/icons": "^5.1.4",
@@ -4317,9 +4317,9 @@ const name = "@nocobase/client", version$1 = "1.4.7", license = "AGPL-3.0", main
4317
4317
  "@formily/reactive-react": "^2.2.27",
4318
4318
  "@formily/shared": "^2.2.27",
4319
4319
  "@formily/validator": "^2.2.27",
4320
- "@nocobase/evaluators": "1.4.7",
4321
- "@nocobase/sdk": "1.4.7",
4322
- "@nocobase/utils": "1.4.7",
4320
+ "@nocobase/evaluators": "1.4.8",
4321
+ "@nocobase/sdk": "1.4.8",
4322
+ "@nocobase/utils": "1.4.8",
4323
4323
  ahooks: "^3.7.2",
4324
4324
  antd: "5.12.8",
4325
4325
  "antd-style": "3.7.1",
@@ -5213,6 +5213,8 @@ const InternalFormBlockProvider = (e) => {
5213
5213
  for (; e; ) {
5214
5214
  if (e["x-decorator"] === "FormBlockProvider")
5215
5215
  return e;
5216
+ if (e["x-component"] === "AssociationField.Selector")
5217
+ return null;
5216
5218
  e = e.parent;
5217
5219
  }
5218
5220
  return null;
@@ -7602,7 +7604,7 @@ function getRenderContent(e, t, o, n, r) {
7602
7604
  const l = yield replaceVariableValue(t, o, n);
7603
7605
  return yield r(l);
7604
7606
  } catch (l) {
7605
- return t;
7607
+ return console.log(l), t;
7606
7608
  }
7607
7609
  });
7608
7610
  }
@@ -10465,7 +10467,7 @@ const variablesStore = {}, getFieldPath = (e, t) => {
10465
10467
  dataSource: A,
10466
10468
  collectionName: O
10467
10469
  };
10468
- const T = y[M], { fieldPath: N } = getFieldPath(y.slice(0, M + 1).join("."), I), z = r(N, A), q = (B = i($)) == null ? void 0 : B.getPrimaryKey();
10470
+ const T = y[M], { fieldPath: N } = getFieldPath(y.slice(0, M + 1).join("."), I), z = r(N, A), q = (B = i($, A)) == null ? void 0 : B.getPrimaryKey();
10469
10471
  if (Array.isArray(w)) {
10470
10472
  const E = w.map((U) => {
10471
10473
  if (!(b != null && b.doNotRequest) && shouldToRequest(U == null ? void 0 : U[T]) && (U == null ? void 0 : U[q]) != null && z != null && z.target) {
@@ -11543,7 +11545,8 @@ const ParentCollectionProvider = (e) => {
11543
11545
  {
11544
11546
  name: "$nRecord",
11545
11547
  ctx: a,
11546
- collectionName: l
11548
+ collectionName: l,
11549
+ dataSource: d
11547
11550
  },
11548
11551
  {
11549
11552
  name: "$nParentRecord",
@@ -41457,22 +41460,16 @@ const MarkdownEditor = (e) => {
41457
41460
  return t - 2 * e.paddingLG;
41458
41461
  }, MarkdownVoid = withDynamicSchemaProps(
41459
41462
  observer$1((e) => {
41460
- const { isDarkTheme: t } = useGlobalTheme(), { componentCls: o, hashId: n } = useStyles$4({ isDarkTheme: t }), { content: r, className: i } = e, a = useField(), l = useFieldSchema(), { dn: c } = useDesignable(), { onSave: u, onCancel: d, form: p } = e, m = useCollectionRecord(), [h, g] = useState(""), f = useVariables(), C = useLocalVariables(), { engine: S } = (l == null ? void 0 : l["x-decorator-props"]) || {}, [b, y] = useState(!1), v = useCompile();
41461
- useEffect(() => {
41463
+ const { isDarkTheme: t } = useGlobalTheme(), { componentCls: o, hashId: n } = useStyles$4({ isDarkTheme: t }), { content: r, className: i } = e, a = useField(), l = useFieldSchema(), { dn: c } = useDesignable(), { onSave: u, onCancel: d, form: p } = e, m = useCollectionRecord(), [h, g] = useState(""), f = useVariables(), C = useLocalVariables(), { engine: S } = (l == null ? void 0 : l["x-decorator-props"]) || {}, [b, y] = useState(!1);
41464
+ useCompile(), useEffect(() => {
41462
41465
  y(!0), V(void 0, null, function* () {
41463
41466
  setTimeout(() => V(void 0, null, function* () {
41464
- const A = yield getRenderContent(
41465
- S,
41466
- r,
41467
- v(f),
41468
- v(C),
41469
- parseMarkdown
41470
- );
41471
- g(A);
41467
+ const k = yield getRenderContent(S, r, f, C, parseMarkdown);
41468
+ g(k);
41472
41469
  })), y(!1);
41473
41470
  });
41474
41471
  }, [r, f, C, S]);
41475
- const I = useMarkdownHeight(), w = useVariableOptions({
41472
+ const v = useMarkdownHeight(), I = useVariableOptions({
41476
41473
  collectionField: { uiSchema: l },
41477
41474
  form: p,
41478
41475
  record: m,
@@ -41484,20 +41481,20 @@ const MarkdownEditor = (e) => {
41484
41481
  }, []), b ? /* @__PURE__ */ jsx(Spin, {}) : a != null && a.editable ? /* @__PURE__ */ jsx(
41485
41482
  MarkdownEditor,
41486
41483
  F(x({
41487
- scope: w
41484
+ scope: I
41488
41485
  }, e), {
41489
41486
  className: !0,
41490
41487
  defaultValue: r,
41491
41488
  onCancel: () => {
41492
41489
  a.editable = !1, d == null || d();
41493
41490
  },
41494
- onSubmit: (k) => V(void 0, null, function* () {
41495
- var A;
41496
- a.editable = !1, (A = l["x-component-props"]) != null || (l["x-component-props"] = {}), l["x-component-props"].content = k, a.componentProps.content = k, u == null || u(l), c.emit("patch", {
41491
+ onSubmit: (w) => V(void 0, null, function* () {
41492
+ var k;
41493
+ a.editable = !1, (k = l["x-component-props"]) != null || (l["x-component-props"] = {}), l["x-component-props"].content = w, a.componentProps.content = w, u == null || u(l), c.emit("patch", {
41497
41494
  schema: {
41498
41495
  "x-uid": l["x-uid"],
41499
41496
  "x-component-props": {
41500
- content: k
41497
+ content: w
41501
41498
  }
41502
41499
  }
41503
41500
  });
@@ -41507,7 +41504,7 @@ const MarkdownEditor = (e) => {
41507
41504
  "div",
41508
41505
  {
41509
41506
  className: cls([o, n, "nb-markdown nb-markdown-default nb-markdown-table", i]),
41510
- style: F(x({}, e.style), { height: I || "100%", overflowY: I ? "auto" : "null" }),
41507
+ style: F(x({}, e.style), { height: v || "100%", overflowY: v ? "auto" : "null" }),
41511
41508
  dangerouslySetInnerHTML: { __html: h }
41512
41509
  }
41513
41510
  );