@nocobase/client 1.4.23 → 1.4.24

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
@@ -113,6 +113,7 @@ import dayjs from "dayjs";
113
113
  import LRUCache from "lru-cache";
114
114
  import { PageHeader } from "@ant-design/pro-layout";
115
115
  import { useHotkeys } from "react-hotkeys-hook";
116
+ import { usePrefixCls as usePrefixCls$1, dayjsable, formatDayjsValue } from "@formily/antd-v5/esm/__builtins__";
116
117
  import * as dndKitAccessibility from "@dnd-kit/accessibility";
117
118
  import * as dndKitModifiers from "@dnd-kit/modifiers";
118
119
  import * as dndKitSortable from "@dnd-kit/sortable";
@@ -124,7 +125,6 @@ import * as formilyValidator from "@formily/validator";
124
125
  import { registerValidateRules, setValidateLanguage } from "@formily/validator";
125
126
  import axios from "axios";
126
127
  import * as ReactRouter from "react-router";
127
- import { usePrefixCls as usePrefixCls$1, dayjsable, formatDayjsValue } from "@formily/antd-v5/esm/__builtins__";
128
128
  import JSON5 from "json5";
129
129
  import { Helmet } from "react-helmet";
130
130
  import relativeTime from "dayjs/plugin/relativeTime";
@@ -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.23", 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.24", 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.23", license = "AGPL-3.0", mai
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.23",
4321
- "@nocobase/sdk": "1.4.23",
4322
- "@nocobase/utils": "1.4.23",
4320
+ "@nocobase/evaluators": "1.4.24",
4321
+ "@nocobase/sdk": "1.4.24",
4322
+ "@nocobase/utils": "1.4.24",
4323
4323
  ahooks: "^3.7.2",
4324
4324
  antd: "5.12.8",
4325
4325
  "antd-style": "3.7.1",
@@ -10698,7 +10698,8 @@ const DatePickerContext = React.createContext({ utc: !0 }), useDatePickerContext
10698
10698
  const { utc: t = !0 } = useDatePickerContext(), o = Array.isArray(e.value) ? e.value[0] : e.value, n = v(x({
10699
10699
  utc: t
10700
10700
  }, e), {
10701
- showTime: e.showTime ? { defaultValue: dayjs("00:00:00", "HH:mm:ss") } : !1
10701
+ showTime: e.showTime ? { defaultValue: dayjs("00:00:00", "HH:mm:ss") } : !1,
10702
+ inputReadOnly: !0
10702
10703
  });
10703
10704
  return /* @__PURE__ */ jsx(InternalDatePicker, v(x({}, n), { value: o }));
10704
10705
  };
@@ -10730,7 +10731,8 @@ DatePicker.RangePicker = function(t) {
10730
10731
  }, t), {
10731
10732
  format: getDateTimeFormat(f, C, i, a),
10732
10733
  picker: f,
10733
- showTime: i ? { defaultValue: [dayjs("00:00:00", "HH:mm:ss"), dayjs("23:59:59", "HH:mm:ss")] } : !1
10734
+ showTime: i ? { defaultValue: [dayjs("00:00:00", "HH:mm:ss"), dayjs("23:59:59", "HH:mm:ss")] } : !1,
10735
+ inputReadOnly: !0
10734
10736
  }), [b, y] = useState(S);
10735
10737
  return h ? /* @__PURE__ */ jsxs(Space$1.Compact, { children: [
10736
10738
  /* @__PURE__ */ jsx(
@@ -10782,6 +10784,7 @@ DatePicker.FilterWithPicker = function(t) {
10782
10784
  showTime: r ? { defaultValue: dayjs("00:00:00", "HH:mm:ss") } : !1,
10783
10785
  format: getDateTimeFormat(d, p, r, i),
10784
10786
  picker: d,
10787
+ inputReadOnly: !0,
10785
10788
  onChange: (C) => {
10786
10789
  t.onChange(void 0), setTimeout(() => {
10787
10790
  t.onChange(C);
@@ -22099,8 +22102,8 @@ const SchemaSettingsWrapper = (e) => {
22099
22102
  }
22100
22103
  `, TableColumnActionBar$1 = observer$1(
22101
22104
  (e) => {
22102
- const t = useDesigner(), { isInSubTable: o } = useFlag() || {};
22103
- return /* @__PURE__ */ jsxs(
22105
+ const t = useDesigner(), { isInSubTable: o } = useFlag() || {}, { designable: n } = useSchemaComponentContext();
22106
+ return !n || t.isNullComponent ? e.children : /* @__PURE__ */ jsxs(
22104
22107
  SortableItem,
22105
22108
  {
22106
22109
  className: designerCss$4({
@@ -22146,21 +22149,27 @@ const useColumnSchema$1 = () => {
22146
22149
  }, [e, t]);
22147
22150
  return t ? o : [];
22148
22151
  }, TableColumnDecorator$1 = (e) => {
22149
- const t = useDesigner(), o = useField(), { fieldSchema: n, uiSchema: r, collectionField: i } = useColumnSchema$1(), a = useCompile(), { isInSubTable: l } = useFlag() || {};
22152
+ const t = useDesigner(), o = useField(), { fieldSchema: n, uiSchema: r, collectionField: i } = useColumnSchema$1(), { designable: a } = useSchemaComponentContext(), l = useCompile(), { isInSubTable: c } = useFlag() || {};
22150
22153
  return useLayoutEffect(() => {
22151
22154
  o.title || n && r != null && r.title && (o.title = r == null ? void 0 : r.title);
22152
- }, [r == null ? void 0 : r.title]), /* @__PURE__ */ jsx(
22155
+ }, [r == null ? void 0 : r.title]), !a || t.isNullComponent ? /* @__PURE__ */ jsxs(CollectionFieldContext.Provider, { value: i, children: [
22156
+ /* @__PURE__ */ jsx(t, { fieldSchema: n, uiSchema: r, collectionField: i }),
22157
+ /* @__PURE__ */ jsxs("span", { role: "button", children: [
22158
+ (n == null ? void 0 : n.required) && /* @__PURE__ */ jsx("span", { className: "ant-formily-item-asterisk", children: "*" }),
22159
+ /* @__PURE__ */ jsx("span", { children: (o == null ? void 0 : o.title) || l(r == null ? void 0 : r.title) })
22160
+ ] })
22161
+ ] }) : /* @__PURE__ */ jsx(
22153
22162
  SortableItem,
22154
22163
  {
22155
22164
  className: designerCss$4({
22156
- margin: l ? "-12px -8px" : "-18px -16px",
22157
- padding: l ? "12px 8px" : "12px 16px"
22165
+ margin: c ? "-12px -8px" : "-18px -16px",
22166
+ padding: c ? "12px 8px" : "12px 16px"
22158
22167
  }),
22159
22168
  children: /* @__PURE__ */ jsxs(CollectionFieldContext.Provider, { value: i, children: [
22160
22169
  /* @__PURE__ */ jsx(t, { fieldSchema: n, uiSchema: r, collectionField: i }),
22161
22170
  /* @__PURE__ */ jsxs("span", { role: "button", children: [
22162
22171
  (n == null ? void 0 : n.required) && /* @__PURE__ */ jsx("span", { className: "ant-formily-item-asterisk", children: "*" }),
22163
- /* @__PURE__ */ jsx("span", { children: (o == null ? void 0 : o.title) || a(r == null ? void 0 : r.title) })
22172
+ /* @__PURE__ */ jsx("span", { children: (o == null ? void 0 : o.title) || l(r == null ? void 0 : r.title) })
22164
22173
  ] })
22165
22174
  ] })
22166
22175
  }
@@ -25418,7 +25427,8 @@ const getAppends = ({
25418
25427
  "AssociationField.Selector",
25419
25428
  "AssociationField.AddNewer",
25420
25429
  "TableField",
25421
- "Kanban.CardViewer"
25430
+ "Kanban.CardViewer",
25431
+ "Action.Container"
25422
25432
  ].includes(c["x-component"]) || getAppends({
25423
25433
  schema: c,
25424
25434
  prefix: t,
@@ -33456,7 +33466,9 @@ class SchemaSettingsPlugin extends Plugin {
33456
33466
  });
33457
33467
  }
33458
33468
  }
33459
- const DefaultSchemaToolbar = () => null, useDesigner = () => {
33469
+ const DefaultSchemaToolbar = () => null;
33470
+ DefaultSchemaToolbar.isNullComponent = !0;
33471
+ const useDesigner = () => {
33460
33472
  const { designable: e } = useDesignable(), t = useFieldSchema(), o = useMemo(() => t["x-designer"] || t["x-toolbar"] ? t["x-designer"] || t["x-toolbar"] : t["x-settings"] ? SchemaToolbar : DefaultSchemaToolbar, [t]), n = useComponent(o);
33461
33473
  return e && n || DefaultSchemaToolbar;
33462
33474
  }, useFieldProps = (e) => {
@@ -38419,9 +38431,6 @@ const useColumnsDeepMemoized = (e) => {
38419
38431
  .ant-table-cell-fix-right {
38420
38432
  padding: 8px 16px !important;
38421
38433
  }
38422
- .ant-table-thead .ant-table-cell {
38423
- padding: 8px 16px;
38424
- }
38425
38434
  }
38426
38435
  }
38427
38436
  }
@@ -38775,7 +38784,7 @@ const Table$1 = withDynamicSchemaProps(
38775
38784
  field: o,
38776
38785
  showIndex: !0,
38777
38786
  dragSort: !1,
38778
- showDel: C !== !1 || f !== !1 || S !== !1 ? ($) => o.editable ? S !== !1 ? !0 : $ == null ? void 0 : $.__isNewRecord__ : !1 : !1,
38787
+ showDel: o.editable && (C !== !1 || f !== !1 || S !== !1) ? ($) => o.editable ? S !== !1 ? !0 : $ == null ? void 0 : $.__isNewRecord__ : !1 : !1,
38779
38788
  pagination: L,
38780
38789
  rowSelection: { type: "none", hideSelectAll: !0 },
38781
38790
  footer: () => o.editable && /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -40849,10 +40858,13 @@ function toSafeNumber(e) {
40849
40858
  return e && (e > Number.MAX_SAFE_INTEGER || e < Number.MIN_SAFE_INTEGER ? new BigNumber(e).toString() : Number(e));
40850
40859
  }
40851
40860
  const InputNumber = connect((e) => {
40852
- const r = e, { onChange: t } = r, o = K(r, ["onChange"]);
40853
- return /* @__PURE__ */ jsx(InputNumber$1, x({ onChange: (i) => {
40854
- Number.isNaN(i) ? t(null) : t(toSafeNumber(i));
40855
- } }, o));
40861
+ const i = e, { onChange: t } = i, o = K(i, ["onChange"]);
40862
+ let r = x({
40863
+ onChange: (a) => {
40864
+ Number.isNaN(a) ? t(null) : t(toSafeNumber(a));
40865
+ }
40866
+ }, o);
40867
+ return o.formatStyle && (r = omit$1(r, ["addonAfter", "addonBefore"])), /* @__PURE__ */ jsx(InputNumber$1, x({}, r));
40856
40868
  }, mapReadPretty(ReadPretty$2));
40857
40869
  InputNumber.ReadPretty = ReadPretty$2;
40858
40870
  const ListBlockContext = createContext({});
@@ -11,4 +11,4 @@ export declare const designerCss: ({ margin, padding }?: {
11
11
  margin?: string;
12
12
  padding?: string;
13
13
  }) => string;
14
- export declare const TableColumnActionBar: React.MemoExoticComponent<import("@formily/react").ReactFC<unknown>>;
14
+ export declare const TableColumnActionBar: React.MemoExoticComponent<import("@formily/react").ReactFC<Omit<any, "ref">>>;