@nocobase/client 1.7.12 → 1.7.14

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
@@ -8711,7 +8711,7 @@ function addAppVersion(e, t) {
8711
8711
  addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
8712
8712
  }), e;
8713
8713
  }
8714
- const name = "@nocobase/client", version = "1.7.12", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
8714
+ const name = "@nocobase/client", version = "1.7.14", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
8715
8715
  "@ahooksjs/use-url-state": "3.5.1",
8716
8716
  "@ant-design/cssinjs": "^1.11.1",
8717
8717
  "@ant-design/icons": "^5.6.1",
@@ -8732,9 +8732,9 @@ const name = "@nocobase/client", version = "1.7.12", license = "AGPL-3.0", main
8732
8732
  "@formily/reactive-react": "^2.2.27",
8733
8733
  "@formily/shared": "^2.2.27",
8734
8734
  "@formily/validator": "^2.2.27",
8735
- "@nocobase/evaluators": "1.7.12",
8736
- "@nocobase/sdk": "1.7.12",
8737
- "@nocobase/utils": "1.7.12",
8735
+ "@nocobase/evaluators": "1.7.14",
8736
+ "@nocobase/sdk": "1.7.14",
8737
+ "@nocobase/utils": "1.7.14",
8738
8738
  ahooks: "^3.7.2",
8739
8739
  antd: "5.24.2",
8740
8740
  "antd-style": "3.7.1",
@@ -9500,7 +9500,7 @@ function useSatisfiedActionValues({
9500
9500
  schema: o,
9501
9501
  form: r
9502
9502
  }) {
9503
- const [a, i] = useState({}), l = useFieldSchema(), c = useVariables$1(), u = useLocalVariables$1({ currentForm: { values: e } }), d = o != null ? o : l, p = n != null ? n : d[LinkageRuleDataKeyMap[t]], m = useApp(), h = useCallback(() => {
9503
+ const [a, i] = useState({}), l = useFieldSchema(), c = useVariables$1(), u = useLocalVariables$1({ currentForm: { values: e } }), d = o != null ? o : l, p = n != null ? n : d[LinkageRuleDataKeyMap[t]] || (d == null ? void 0 : d.parent[LinkageRuleDataKeyMap[t]]), m = useApp(), h = useCallback(() => {
9504
9504
  p && e && getSatisfiedValueMap({ rules: p, variables: c, localVariables: u }, m.jsonLogic).then((g) => {
9505
9505
  isEmpty$1(g) ? i({}) : i(g);
9506
9506
  }).catch((g) => {
@@ -9518,7 +9518,7 @@ function useSatisfiedActionValues({
9518
9518
  r.removeEffects(g);
9519
9519
  };
9520
9520
  }
9521
- }, [r, h]), { valueMap: a };
9521
+ }, [r, h, e]), { valueMap: a };
9522
9522
  }
9523
9523
  const GetStyleRules = React.memo(({ record: e, schema: t, onStyleChange: n }) => {
9524
9524
  const { valueMap: o } = useSatisfiedActionValues({ formValues: e, category: "style", schema: t });
@@ -9582,9 +9582,13 @@ const mergeFilter = (e, t = "$and") => {
9582
9582
  "$dateBetween",
9583
9583
  "$in",
9584
9584
  "$notIn"
9585
- ].includes(t[i]) || a != null && a.type)
9585
+ ].includes(t[i]))
9586
9586
  return !0;
9587
9587
  const l = n(`${o}.${i}`);
9588
+ if (["datetime", "datetimeNoTz", "date", "unixTimestamp", "createdAt", "updatedAt"].includes(
9589
+ l == null ? void 0 : l.interface
9590
+ ))
9591
+ return !0;
9588
9592
  if (l != null && l.target) {
9589
9593
  if (Array.isArray(a))
9590
9594
  return !0;
@@ -16382,7 +16386,8 @@ const BlockTemplateContext = createContext({ componentNamePrefix: "" }), BlockTe
16382
16386
  "polygon",
16383
16387
  "circle",
16384
16388
  "point",
16385
- "lineString"
16389
+ "lineString",
16390
+ "vditor"
16386
16391
  ];
16387
16392
  function useTableColumnInitializerFields() {
16388
16393
  const { name: e, currentFields: t = [] } = useCollection_deprecated(), { getInterface: n, getCollection: o } = useCollectionManager_deprecated(), a = useFieldSchema()["x-component"] === "AssociationField.SubTable", i = useForm(), l = a ? i.readPretty : !0;
@@ -18131,6 +18136,14 @@ function useCreateFormBlockDecoratorProps(e) {
18131
18136
  function useCreateFormBlockProps() {
18132
18137
  return useFormBlockProps$1();
18133
18138
  }
18139
+ function useDataFormItemProps() {
18140
+ const e = useCollectionRecordData(), { form: t } = useFormBlockContext(), n = useSubFormValue(), { valueMap: o } = useSatisfiedActionValues({
18141
+ category: "style",
18142
+ formValues: (n == null ? void 0 : n.formValue) || (t == null ? void 0 : t.values) || e,
18143
+ form: t
18144
+ });
18145
+ return { wrapperStyle: o };
18146
+ }
18134
18147
  function useEditFormBlockDecoratorProps(e) {
18135
18148
  const t = useFormBlockParams(e);
18136
18149
  let n;
@@ -18147,14 +18160,16 @@ function useFormBlockParams(e) {
18147
18160
  function useEditFormBlockProps() {
18148
18161
  return useFormBlockProps$1();
18149
18162
  }
18150
- function useDataFormItemProps() {
18151
- const e = useCollectionRecordData(), { form: t } = useFormBlockContext(), n = useSubFormValue(), { valueMap: o } = useSatisfiedActionValues({
18152
- category: "style",
18153
- formValues: (n == null ? void 0 : n.formValue) || (t == null ? void 0 : t.values) || e,
18154
- form: t
18155
- });
18156
- return { wrapperStyle: o };
18157
- }
18163
+ const useGridCardActionBarProps$1 = () => {
18164
+ const e = useFieldSchema(), { designable: t } = useDesignable();
18165
+ return {
18166
+ style: {
18167
+ marginBottom: "var(--nb-spacing)"
18168
+ },
18169
+ // In non-configuration mode, when there are no buttons, ActionBar doesn't need to be displayed
18170
+ hidden: !t && _.isEmpty(e.properties)
18171
+ };
18172
+ };
18158
18173
  function useGridCardBlockParams(e) {
18159
18174
  const { params: t } = e, { filter: n, parseVariableLoading: o } = useParsedFilter({
18160
18175
  filterOption: t == null ? void 0 : t.filter
@@ -19158,7 +19173,8 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
19158
19173
  useGridCardBlockItemProps,
19159
19174
  useGridCardBlockProps,
19160
19175
  useFormItemProps,
19161
- useDataFormItemProps
19176
+ useDataFormItemProps,
19177
+ useGridCardActionBarProps: useGridCardActionBarProps$1
19162
19178
  }),
19163
19179
  children: e.children
19164
19180
  }
@@ -19217,7 +19233,8 @@ class BlockSchemaComponentPlugin extends Plugin {
19217
19233
  useGridCardBlockProps,
19218
19234
  useGridCardBlockItemProps,
19219
19235
  useFormItemProps,
19220
- useDataFormItemProps
19236
+ useDataFormItemProps,
19237
+ useGridCardActionBarProps: useGridCardActionBarProps$1
19221
19238
  }));
19222
19239
  }
19223
19240
  }
@@ -24559,7 +24576,6 @@ const useAllAccessDesktopRoutes = () => useContext(AllAccessDesktopRoutesContext
24559
24576
  padding: 0px 50px;
24560
24577
  }
24561
24578
  `, className1$1 = css`
24562
- width: 168px;
24563
24579
  height: var(--nb-header-height);
24564
24580
  margin-right: 4px;
24565
24581
  display: inline-flex;
@@ -24567,6 +24583,13 @@ const useAllAccessDesktopRoutes = () => useContext(AllAccessDesktopRoutesContext
24567
24583
  color: #fff;
24568
24584
  padding: 0;
24569
24585
  align-items: center;
24586
+ `, className1WithFixedWidth = css`
24587
+ ${className1$1}
24588
+ width: 168px;
24589
+ `, className1WithAutoWidth = css`
24590
+ ${className1$1}
24591
+ width: auto;
24592
+ min-width: 168px;
24570
24593
  `, className2 = css`
24571
24594
  object-fit: contain;
24572
24595
  width: 100%;
@@ -24606,9 +24629,9 @@ const LayoutContent = () => {
24606
24629
  /* @__PURE__ */ jsx(ShowTipWhenNoPages, {})
24607
24630
  ] }) });
24608
24631
  }, NocoBaseLogo = () => {
24609
- var r, a, i, l, c, u, d, p;
24610
- const e = useSystemSettings(), { token: t } = useToken(), n = useMemo(() => ({ fontSize: t.fontSizeHeading3 }), [t.fontSizeHeading3]), o = (i = (a = (r = e == null ? void 0 : e.data) == null ? void 0 : r.data) == null ? void 0 : a.logo) != null && i.url ? /* @__PURE__ */ jsx("img", { className: className2, src: (u = (c = (l = e == null ? void 0 : e.data) == null ? void 0 : l.data) == null ? void 0 : c.logo) == null ? void 0 : u.url }) : /* @__PURE__ */ jsx("span", { style: n, className: className3, children: (p = (d = e == null ? void 0 : e.data) == null ? void 0 : d.data) == null ? void 0 : p.title });
24611
- return /* @__PURE__ */ jsx("div", { className: className1$1, children: e != null && e.loading ? null : o });
24632
+ var a, i, l, c, u, d, p, m;
24633
+ const e = useSystemSettings(), { token: t } = useToken(), n = useMemo(() => ({ fontSize: t.fontSizeHeading3 }), [t.fontSizeHeading3]), o = (l = (i = (a = e == null ? void 0 : e.data) == null ? void 0 : a.data) == null ? void 0 : i.logo) == null ? void 0 : l.url, r = o ? /* @__PURE__ */ jsx("img", { className: className2, src: (d = (u = (c = e == null ? void 0 : e.data) == null ? void 0 : c.data) == null ? void 0 : u.logo) == null ? void 0 : d.url }) : /* @__PURE__ */ jsx("span", { style: n, className: className3, children: (m = (p = e == null ? void 0 : e.data) == null ? void 0 : p.data) == null ? void 0 : m.title });
24634
+ return /* @__PURE__ */ jsx("div", { className: o ? className1WithFixedWidth : className1WithAutoWidth, children: e != null && e.loading ? null : r });
24612
24635
  }, MenuSchemaToolbarWithContainer = () => {
24613
24636
  const e = useRef(null), [t, n] = React.useState(null);
24614
24637
  return useEffect(() => {
@@ -30834,9 +30857,9 @@ const DragHandler = (e) => {
30834
30857
  collectionName: C,
30835
30858
  dataSource: b,
30836
30859
  defaultValue: S
30837
- } = useParentPopupVariableContext(), { datetimeCtx: y } = useDatetimeVariableContext(), { currentFormCtx: v } = useCurrentFormContext({ form: e == null ? void 0 : e.currentForm }), { name: F } = useCollection_deprecated(), I = useContextVariable();
30838
- let { name: T } = useBlockCollection();
30839
- return e != null && e.collectionName && (T = e.collectionName), useMemo(() => [
30860
+ } = useParentPopupVariableContext(), { urlSearchParamsCtx: y, shouldDisplay: v } = useURLSearchParamsVariable(), { datetimeCtx: F } = useDatetimeVariableContext(), { currentFormCtx: I } = useCurrentFormContext({ form: e == null ? void 0 : e.currentForm }), { name: T } = useCollection_deprecated(), R = useContextVariable();
30861
+ let { name: D } = useBlockCollection();
30862
+ return e != null && e.collectionName && (D = e.collectionName), useMemo(() => [
30840
30863
  /**
30841
30864
  * @deprecated
30842
30865
  * 兼容老版本
@@ -30851,9 +30874,9 @@ const DragHandler = (e) => {
30851
30874
  * 兼容旧版本的以数据表名称命名的变量,新版本已更名为 `$nForm`
30852
30875
  */
30853
30876
  {
30854
- name: T,
30855
- ctx: v || i,
30856
- collectionName: T
30877
+ name: D,
30878
+ ctx: I || i,
30879
+ collectionName: D
30857
30880
  },
30858
30881
  /**
30859
30882
  * @deprecated
@@ -30861,8 +30884,8 @@ const DragHandler = (e) => {
30861
30884
  */
30862
30885
  {
30863
30886
  name: "$form",
30864
- ctx: v,
30865
- collectionName: T
30887
+ ctx: I,
30888
+ collectionName: D
30866
30889
  },
30867
30890
  {
30868
30891
  name: "$nRecord",
@@ -30892,12 +30915,12 @@ const DragHandler = (e) => {
30892
30915
  },
30893
30916
  {
30894
30917
  name: "$nForm",
30895
- ctx: v,
30896
- collectionName: T
30918
+ ctx: I,
30919
+ collectionName: D
30897
30920
  },
30898
30921
  {
30899
30922
  name: "$nDate",
30900
- ctx: y
30923
+ ctx: F
30901
30924
  },
30902
30925
  /**
30903
30926
  * @deprecated
@@ -30905,24 +30928,28 @@ const DragHandler = (e) => {
30905
30928
  */
30906
30929
  {
30907
30930
  name: "$date",
30908
- ctx: y
30931
+ ctx: F
30909
30932
  },
30910
- I,
30933
+ R,
30911
30934
  a && {
30912
30935
  name: "$iteration",
30913
30936
  ctx: r,
30914
- collectionName: F
30937
+ collectionName: T
30915
30938
  },
30916
30939
  n && {
30917
30940
  name: "$nParentIteration",
30918
30941
  ctx: t,
30919
30942
  collectionName: o
30943
+ },
30944
+ v && {
30945
+ name: "$nURLSearchParams",
30946
+ ctx: y
30920
30947
  }
30921
30948
  ].filter(Boolean), [
30922
30949
  i,
30923
30950
  l,
30924
- T,
30925
- v,
30951
+ D,
30952
+ I,
30926
30953
  c,
30927
30954
  u,
30928
30955
  d,
@@ -30930,16 +30957,17 @@ const DragHandler = (e) => {
30930
30957
  f,
30931
30958
  m,
30932
30959
  h,
30933
- y,
30960
+ F,
30934
30961
  a,
30935
30962
  r,
30936
- F,
30963
+ T,
30937
30964
  g,
30938
30965
  S,
30939
30966
  n,
30940
30967
  t,
30941
30968
  o,
30942
- I
30969
+ R,
30970
+ y
30943
30971
  ]);
30944
30972
  }, useLocalVariables$1 = useLocalVariables, useVariables = () => useContext(VariablesContext), useVariables$1 = useVariables, isSubFormOrSubTableField = (e) => {
30945
30973
  for (; e; ) {
@@ -34087,14 +34115,14 @@ const expendableActionSettings = new SchemaSettings({
34087
34115
  options: d,
34088
34116
  value: ((h = l["x-component-props"]) == null ? void 0 : h.component) || ((g = d[0]) == null ? void 0 : g.value),
34089
34117
  onChange(f) {
34090
- var S;
34091
- const C = d.find((y) => y.value === f), b = x({
34118
+ var y;
34119
+ const C = d.find((v) => v.value === f), b = ((y = C == null ? void 0 : C.useProps) == null ? void 0 : y.call(C)) || {}, S = x(x({
34092
34120
  component: f
34093
- }, ((S = C == null ? void 0 : C.useProps) == null ? void 0 : S.call(C)) || {});
34094
- _.set(l, "x-component-props", b), t.componentProps = b, c.emit("patch", {
34121
+ }, b), f === o.uiSchema["x-component"] ? o.uiSchema["x-component-props"] : {});
34122
+ _.set(l, "x-component-props", S), t.componentProps = S, c.emit("patch", {
34095
34123
  schema: {
34096
34124
  "x-uid": l["x-uid"],
34097
- "x-component-props": b
34125
+ "x-component-props": S
34098
34126
  }
34099
34127
  });
34100
34128
  }
@@ -39522,7 +39550,7 @@ const ActionBarContext = React.createContext({
39522
39550
  })
39523
39551
  );
39524
39552
  }, ActionBar = withDynamicSchemaProps(
39525
- (e) => /* @__PURE__ */ jsx(InternalActionBar, x({}, e)),
39553
+ (e) => e.hidden ? null : /* @__PURE__ */ jsx(InternalActionBar, x({}, e)),
39526
39554
  { displayName: "ActionBar" }
39527
39555
  ), useGetAriaLabelOfPopover = () => {
39528
39556
  const e = useFieldSchema(), t = e["x-component"], n = typeof t == "string" ? t : (t == null ? void 0 : t.displayName) || (t == null ? void 0 : t.name), o = useCompile();
@@ -44472,76 +44500,95 @@ const defaultModeToComponent = {
44472
44500
  return /* @__PURE__ */ jsx(AssociationFieldModeContext.Provider, { value: a, children: e.children });
44473
44501
  }, useAssociationFieldModeContext = () => React.useContext(AssociationFieldModeContext), AssociationFieldProvider = observer$1(
44474
44502
  (e) => {
44475
- var f, C, b;
44476
- const t = useField(), n = useCollectionManager(), o = useFieldSchema(), r = useAPIClient();
44503
+ var S, y, v;
44504
+ const t = useField(), n = useCollectionManager(), o = useFieldSchema(), r = useAPIClient(), a = useSchemaOptionsContext(), i = useRef(null);
44477
44505
  useSchemaComponentContext();
44478
- const a = ((f = o["x-component-props"]) == null ? void 0 : f.multiple) !== !1, i = ((C = o["x-component-props"]) == null ? void 0 : C.allowDissociate) !== !1, l = useMemo(
44506
+ const l = ((S = o["x-component-props"]) == null ? void 0 : S.multiple) !== !1, c = ((y = o["x-component-props"]) == null ? void 0 : y.allowDissociate) !== !1, u = useMemo(
44479
44507
  () => n.getCollectionField(o["x-collection-field"]),
44480
44508
  // eslint-disable-next-line react-hooks/exhaustive-deps
44481
44509
  [o["x-collection-field"], o.name]
44482
- ), c = useMemo(
44510
+ ), d = useMemo(
44483
44511
  () => {
44484
- var S;
44485
- return ((S = n.getCollection(l == null ? void 0 : l.target)) == null ? void 0 : S.template) === "file";
44512
+ var F;
44513
+ return ((F = n.getCollection(u == null ? void 0 : u.target)) == null ? void 0 : F.template) === "file";
44486
44514
  },
44487
44515
  // eslint-disable-next-line react-hooks/exhaustive-deps
44488
44516
  [o["x-collection-field"]]
44489
- ), u = useMemo(
44517
+ ), p = useMemo(
44490
44518
  () => {
44491
- var S;
44492
- return ((S = o["x-component-props"]) == null ? void 0 : S.mode) || (c ? "FileManager" : "Select");
44519
+ var F;
44520
+ return ((F = o["x-component-props"]) == null ? void 0 : F.mode) || (d ? "FileManager" : "Select");
44493
44521
  },
44494
44522
  // eslint-disable-next-line react-hooks/exhaustive-deps
44495
- [(b = o["x-component-props"]) == null ? void 0 : b.mode]
44496
- ), [d, p] = useState(!t.readPretty), { loading: m, run: h } = useRequest(
44523
+ [(v = o["x-component-props"]) == null ? void 0 : v.mode]
44524
+ ), [m, h] = useState(!t.readPretty), { loading: g, run: f } = useRequest(
44497
44525
  () => {
44498
- var v;
44499
- const S = l.targetKey;
44500
- if (!o.default || !["Picker", "Select"].includes(u) || !_.isObject(o.default))
44526
+ var T;
44527
+ const F = u.targetKey;
44528
+ if (!o.default || !["Picker", "Select"].includes(p) || !_.isObject(o.default))
44501
44529
  return Promise.reject(null);
44502
- const y = Array.isArray(o.default) ? o.default.map((F) => F[S]) : o.default[S];
44503
- return _.isUndefined(y) || _.isNil(y) || _.isNaN(y) ? Promise.reject(null) : r.request({
44504
- resource: l.target,
44505
- action: Array.isArray(y) ? "list" : "get",
44506
- headers: getDataSourceHeaders((v = n == null ? void 0 : n.dataSource) == null ? void 0 : v.key),
44530
+ const I = Array.isArray(o.default) ? o.default.map((R) => R[F]) : o.default[F];
44531
+ return _.isUndefined(I) || _.isNil(I) || _.isNaN(I) ? Promise.reject(null) : r.request({
44532
+ resource: u.target,
44533
+ action: Array.isArray(I) ? "list" : "get",
44534
+ headers: getDataSourceHeaders((T = n == null ? void 0 : n.dataSource) == null ? void 0 : T.key),
44507
44535
  params: {
44508
44536
  filter: {
44509
- [S]: y
44537
+ [F]: I
44510
44538
  }
44511
44539
  }
44512
44540
  });
44513
44541
  },
44514
44542
  {
44515
44543
  manual: !0,
44516
- onSuccess(S) {
44517
- var y;
44518
- t.initialValue = (y = S == null ? void 0 : S.data) == null ? void 0 : y.data;
44544
+ onSuccess(F) {
44545
+ var I;
44546
+ t.initialValue = (I = F == null ? void 0 : F.data) == null ? void 0 : I.data;
44519
44547
  }
44520
44548
  }
44521
- ), { active: g } = useKeepAlive();
44522
- return useEffect(() => {
44523
- var S;
44524
- if (g) {
44525
- if (p(!0), !l) {
44526
- p(!1);
44549
+ ), { active: C } = useKeepAlive();
44550
+ if (useEffect(() => {
44551
+ var F;
44552
+ if (C) {
44553
+ if (h(!0), !u) {
44554
+ h(!1);
44527
44555
  return;
44528
44556
  }
44529
- if (["Picker", "Select"].includes(u) && o.default && h(), t.value && t.form.__template && ["Nester", "SubTable", "PopoverNester"].includes(u) && (["belongsTo", "hasOne"].includes(l.type) ? ((S = t.value) != null && S[l.targetKey] && delete t.value[l.targetKey], t.value = x(x({}, t.initialValue), t.value)) : ["belongsToMany", "hasMany"].includes(l.type) && Array.isArray(t.value) && (t.value = t.value.map((y) => {
44530
- var v;
44531
- return delete y[l.targetKey], x(x({}, (v = t.initialValue) == null ? void 0 : v[0]), y);
44557
+ if (["Picker", "Select"].includes(p) && o.default && f(), t.value && t.form.__template && ["Nester", "SubTable", "PopoverNester"].includes(p) && (["belongsTo", "hasOne"].includes(u.type) ? ((F = t.value) != null && F[u.targetKey] && delete t.value[u.targetKey], t.value = x(x({}, t.initialValue), t.value)) : ["belongsToMany", "hasMany"].includes(u.type) && Array.isArray(t.value) && (t.value = t.value.map((I) => {
44558
+ var T;
44559
+ return delete I[u.targetKey], x(x({}, (T = t.initialValue) == null ? void 0 : T[0]), I);
44532
44560
  }))), t.value !== null && t.value !== void 0) {
44533
- ["Nester", "PopoverNester"].includes(u) && Array.isArray(t.value) && t.value.length === 0 && ["belongsToMany", "hasMany", "belongsToArray"].includes(l.type) && (t.value = [markRecordAsNew({})]), p(!1);
44561
+ ["Nester", "PopoverNester"].includes(p) && Array.isArray(t.value) && t.value.length === 0 && ["belongsToMany", "hasMany", "belongsToArray"].includes(u.type) && (t.value = [markRecordAsNew({})]), h(!1);
44534
44562
  return;
44535
44563
  }
44536
- ["Nester"].includes(u) && (["belongsTo", "hasOne"].includes(l.type) ? t.value = {} : ["belongsToMany", "hasMany", "belongsToArray"].includes(l.type) && (t.value = [markRecordAsNew({})])), u === "SubTable" && (t.value = []), p(!1);
44564
+ ["Nester"].includes(p) && (["belongsTo", "hasOne"].includes(u.type) ? t.value = {} : ["belongsToMany", "hasMany", "belongsToArray"].includes(u.type) && (t.value = [markRecordAsNew({})])), p === "SubTable" && (t.value = []), h(!1);
44537
44565
  }
44538
- }, [u, l, t, g]), d || m ? null : l ? /* @__PURE__ */ jsx(
44566
+ }, [p, u, t, C]), m || g)
44567
+ return null;
44568
+ const b = P(x({}, a.components), {
44569
+ FormItem: (F) => /* @__PURE__ */ jsx(
44570
+ FormItem,
44571
+ P(x({}, F), {
44572
+ getPopupContainer: (I) => i.current || document.body
44573
+ })
44574
+ )
44575
+ });
44576
+ return u ? /* @__PURE__ */ jsx("div", { ref: i, children: /* @__PURE__ */ jsx(
44539
44577
  AssociationFieldContext.Provider,
44540
44578
  {
44541
- value: { options: l, field: t, fieldSchema: o, allowMultiple: a, allowDissociate: i, currentMode: u },
44542
- children: e.children
44579
+ value: { options: u, field: t, fieldSchema: o, allowMultiple: l, allowDissociate: c, currentMode: p },
44580
+ children: /* @__PURE__ */ jsx(
44581
+ SchemaOptionsContext.Provider,
44582
+ {
44583
+ value: {
44584
+ components: b,
44585
+ scope: a.scope
44586
+ },
44587
+ children: e.children
44588
+ }
44589
+ )
44543
44590
  }
44544
- ) : null;
44591
+ ) }) : null;
44545
44592
  },
44546
44593
  { displayName: "AssociationFieldProvider" }
44547
44594
  ), InternalField = (e) => {
@@ -45377,8 +45424,11 @@ const useColumnsDeepMemoized = (e) => {
45377
45424
  return /* @__PURE__ */ jsx("td", P(x({}, c), { className: cls(e.className, cellClass), style: d, children: l || n || o ? e.children : /* @__PURE__ */ jsx("div", { style: p }) }));
45378
45425
  }, displayNone = { display: "none" }, BodyCellComponent = (n) => {
45379
45426
  var o = n, { columnHidden: e } = o, t = W(o, ["columnHidden"]);
45380
- const { designable: r } = useDesignable();
45381
- return e ? /* @__PURE__ */ jsx("td", { style: r ? columnOpacityStyle : columnHiddenStyle, children: r ? t.children : /* @__PURE__ */ jsx("span", { style: displayNone, children: t.children }) }) : /* @__PURE__ */ jsx(InternalBodyCellComponent, x({}, t));
45427
+ const { designable: r } = useDesignable(), a = useCollection();
45428
+ return e ? /* @__PURE__ */ jsx("td", { style: r ? columnOpacityStyle : columnHiddenStyle, children: r ? t.children : /* @__PURE__ */ jsx("span", { style: displayNone, children: t.children }) }) : /* @__PURE__ */ jsxs(SubFormProvider, { value: { value: t == null ? void 0 : t.record, collection: a, fieldSchema: t.schema }, children: [
45429
+ /* @__PURE__ */ jsx(InternalBodyCellComponent, x({}, t)),
45430
+ " "
45431
+ ] });
45382
45432
  }, InternalNocoBaseTable = React.memo(
45383
45433
  (e) => {
45384
45434
  const b = e, {
@@ -58023,7 +58073,10 @@ class InheritanceCollectionMixin extends Collection {
58023
58073
  return l > 0 && (r.splice(l), r.forEach((u) => {
58024
58074
  const d = this.collectionManager.getCollection(u);
58025
58075
  c = c.concat(d.getCurrentFields());
58026
- })), this.parentCollectionFields[n] = i.filter((u) => c.find((p) => p.name === u.name).collectionName !== this.name), this.parentCollectionFields[n];
58076
+ })), this.parentCollectionFields[n] = i.filter((u) => {
58077
+ const d = c.find((p) => p.name === u.name);
58078
+ return (d == null ? void 0 : d.collectionName) !== this.name;
58079
+ }), this.parentCollectionFields[n];
58027
58080
  }
58028
58081
  getAllCollectionsInheritChain() {
58029
58082
  if (this.allCollectionsInheritChain)
@@ -63413,11 +63466,7 @@ const createGridCardBlockUISchema = (e) => {
63413
63466
  type: "void",
63414
63467
  "x-initializer": "gridCard:configureActions",
63415
63468
  "x-component": "ActionBar",
63416
- "x-component-props": {
63417
- style: {
63418
- marginBottom: "var(--nb-spacing)"
63419
- }
63420
- }
63469
+ "x-use-component-props": "useGridCardActionBarProps"
63421
63470
  },
63422
63471
  list: {
63423
63472
  type: "array",
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export declare const useGridCardActionBarProps: () => {
10
+ style: {
11
+ marginBottom: string;
12
+ };
13
+ hidden: boolean;
14
+ };