@nocobase/client 1.4.0-beta.2 → 1.4.0-beta.3

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 CHANGED
@@ -4289,7 +4289,7 @@ function addAppVersion(e, t) {
4289
4289
  addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
4290
4290
  }), e;
4291
4291
  }
4292
- const name = "@nocobase/client", version$1 = "1.4.0-beta.2", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
4292
+ const name = "@nocobase/client", version$1 = "1.4.0-beta.3", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
4293
4293
  "@ahooksjs/use-url-state": "3.5.1",
4294
4294
  "@ant-design/cssinjs": "^1.11.1",
4295
4295
  "@ant-design/icons": "^5.1.4",
@@ -4311,9 +4311,9 @@ const name = "@nocobase/client", version$1 = "1.4.0-beta.2", license = "AGPL-3.0
4311
4311
  "@formily/reactive-react": "^2.2.27",
4312
4312
  "@formily/shared": "^2.2.27",
4313
4313
  "@formily/validator": "^2.2.27",
4314
- "@nocobase/evaluators": "1.4.0-beta.2",
4315
- "@nocobase/sdk": "1.4.0-beta.2",
4316
- "@nocobase/utils": "1.4.0-beta.2",
4314
+ "@nocobase/evaluators": "1.4.0-beta.3",
4315
+ "@nocobase/sdk": "1.4.0-beta.3",
4316
+ "@nocobase/utils": "1.4.0-beta.3",
4317
4317
  ahooks: "^3.7.2",
4318
4318
  antd: "5.12.8",
4319
4319
  "antd-style": "3.7.1",
@@ -28334,19 +28334,19 @@ function useVariablesFromValue(e, t = ["{{", "}}"]) {
28334
28334
  }, [e, o]);
28335
28335
  }
28336
28336
  function TextArea(e) {
28337
- const { wrapSSR: t, hashId: o, componentCls: n } = useStyles$c(), { value: r = "", scope: i, onChange: a, changeOnSelect: l, style: c, fieldNames: u, delimiters: d = ["{{", "}}"] } = e, p = useVariablesFromValue(r, d), m = useRef(null), [h, g] = useState([]), f = useForm(), C = useMemo(
28338
- () => createOptionsValueLabelMap(h, u || defaultFieldNames$2),
28339
- [u, h]
28340
- ), [S, b] = useState(!1), [y, v] = useState(!1), [I, w] = useState(() => renderHTML(r != null ? r : "", C, d)), [T, A] = useState([-1, 0, -1, 0]);
28337
+ const { wrapSSR: t, hashId: o, componentCls: n } = useStyles$c(), { scope: r, onChange: i, changeOnSelect: a, style: l, fieldNames: c, delimiters: u = ["{{", "}}"] } = e, d = typeof e.value == "string" ? e.value : e.value == null ? "" : e.value.toString(), p = useVariablesFromValue(d, u), m = useRef(null), [h, g] = useState([]), f = useForm(), C = useMemo(
28338
+ () => createOptionsValueLabelMap(h, c || defaultFieldNames$2),
28339
+ [c, h]
28340
+ ), [S, b] = useState(!1), [y, v] = useState(!1), [I, w] = useState(() => renderHTML(d != null ? d : "", C, u)), [T, A] = useState([-1, 0, -1, 0]);
28341
28341
  useAntdInputStyle("ant-input");
28342
- const D = d.join(" ");
28342
+ const D = u.join(" ");
28343
28343
  useEffect(() => {
28344
- preloadOptions(i, p).then((N) => {
28344
+ preloadOptions(r, p).then((N) => {
28345
28345
  g(N);
28346
28346
  }).catch(console.error);
28347
- }, [i, JSON.stringify(p)]), useEffect(() => {
28348
- w(renderHTML(r != null ? r : "", C, d)), y || A([-1, 0, -1, 0]);
28349
- }, [r, C, D]), useEffect(() => {
28347
+ }, [r, JSON.stringify(p)]), useEffect(() => {
28348
+ w(renderHTML(d != null ? d : "", C, u)), y || A([-1, 0, -1, 0]);
28349
+ }, [d, C, D]), useEffect(() => {
28350
28350
  var q;
28351
28351
  const { current: N } = m;
28352
28352
  if (!N)
@@ -28380,14 +28380,14 @@ function TextArea(e) {
28380
28380
  const V = createVariableTagHTML(O.join("."), C);
28381
28381
  pasteHTML(q, V, {
28382
28382
  range: T
28383
- }), v(!0), A(getCurrentRange(q)), a(getValue(q, d));
28383
+ }), v(!0), A(getCurrentRange(q)), i(getValue(q, u));
28384
28384
  },
28385
- [C, a, T, D]
28385
+ [C, i, T, D]
28386
28386
  ), L = useCallback(
28387
28387
  function({ currentTarget: N }) {
28388
- S || (v(!0), A(getCurrentRange(N)), a(getValue(N, d)));
28388
+ S || (v(!0), A(getCurrentRange(N)), i(getValue(N, u)));
28389
28389
  },
28390
- [S, a, D]
28390
+ [S, i, D]
28391
28391
  ), z = useCallback(function({ currentTarget: N }) {
28392
28392
  A(getCurrentRange(N));
28393
28393
  }, []), j = useCallback(function(N) {
@@ -28396,9 +28396,9 @@ function TextArea(e) {
28396
28396
  b(!0);
28397
28397
  }, []), B = useCallback(
28398
28398
  ({ currentTarget: N }) => {
28399
- b(!1), v(!0), A(getCurrentRange(N)), a(getValue(N, d));
28399
+ b(!1), v(!0), A(getCurrentRange(N)), i(getValue(N, u));
28400
28400
  },
28401
- [a, D]
28401
+ [i, D]
28402
28402
  ), M = useCallback(
28403
28403
  function(N) {
28404
28404
  N.preventDefault();
@@ -28419,9 +28419,9 @@ function TextArea(e) {
28419
28419
  }
28420
28420
  }
28421
28421
  }).replace(/\n/g, " ");
28422
- v(!0), pasteHTML(N.currentTarget, q), A(getCurrentRange(N.currentTarget)), a(getValue(N.currentTarget, d));
28422
+ v(!0), pasteHTML(N.currentTarget, q), A(getCurrentRange(N.currentTarget)), i(getValue(N.currentTarget, u));
28423
28423
  },
28424
- [a, D]
28424
+ [i, D]
28425
28425
  ), k = e.disabled || f.disabled;
28426
28426
  return t(
28427
28427
  /* @__PURE__ */ jsxs(
@@ -28462,7 +28462,7 @@ function TextArea(e) {
28462
28462
  onCompositionStart: R,
28463
28463
  onCompositionEnd: B,
28464
28464
  placeholder: e.placeholder,
28465
- style: c,
28465
+ style: l,
28466
28466
  className: cx(
28467
28467
  o,
28468
28468
  "ant-input",
@@ -28497,8 +28497,8 @@ function TextArea(e) {
28497
28497
  options: h,
28498
28498
  setOptions: g,
28499
28499
  onInsert: $,
28500
- changeOnSelect: l,
28501
- fieldNames: u || defaultFieldNames$2
28500
+ changeOnSelect: a,
28501
+ fieldNames: c || defaultFieldNames$2
28502
28502
  }
28503
28503
  )
28504
28504
  ]
@@ -37448,6 +37448,7 @@ const ButtonLinkList = (e) => {
37448
37448
  `,
37449
37449
  layout: "vertical",
37450
37450
  bordered: !1,
37451
+ feedbackLayout: "popover",
37451
37452
  children: /* @__PURE__ */ jsx(
37452
37453
  SchemaOptionsContext.Provider,
37453
37454
  {
@@ -47709,15 +47710,15 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
47709
47710
  const t = useRecord();
47710
47711
  return /* @__PURE__ */ jsx(SyncFieldsActionCom, x({ item: t }, e));
47711
47712
  }, SyncFieldsActionCom = (e) => {
47712
- const { scope: t, getContainer: o, item: n, children: r } = e, [i, a] = useState(!1), [l, c] = useState({}), u = useCompile(), { t: d } = useTranslation();
47713
- return n.template === "view" && /* @__PURE__ */ jsx(RecordProvider, { record: n, children: /* @__PURE__ */ jsxs(ActionContextProvider, { value: { visible: i, setVisible: a, drawerProps: { width: 900 } }, children: [
47713
+ const { scope: t, getContainer: o, item: n, children: r } = e, [i, a] = useState(!1), [l, c] = useState({}), u = useCompile(), { t: d } = useTranslation(), { name: p = "main" } = useParams();
47714
+ return n.template === "view" && p === "main" && /* @__PURE__ */ jsx(RecordProvider, { record: n, children: /* @__PURE__ */ jsxs(ActionContextProvider, { value: { visible: i, setVisible: a, drawerProps: { width: 900 } }, children: [
47714
47715
  r || /* @__PURE__ */ jsx(
47715
47716
  Button,
47716
47717
  {
47717
47718
  icon: /* @__PURE__ */ jsx(PlusOutlined, {}),
47718
- onClick: (p) => {
47719
- const m = getSchema$2({}, n, u);
47720
- m && (c(m), a(!0));
47719
+ onClick: (m) => {
47720
+ const h = getSchema$2({}, n, u);
47721
+ h && (c(h), a(!0));
47721
47722
  },
47722
47723
  children: d("Sync from database")
47723
47724
  }