@nocobase/client 2.0.0-beta.7 → 2.0.0-beta.9

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
@@ -92,7 +92,7 @@ import { TinyColor } from "@ctrl/tinycolor";
92
92
  import * as i18next from "i18next";
93
93
  import i18next__default from "i18next";
94
94
  import * as antIcons from "@ant-design/icons";
95
- import antIcons__default, { LoadingOutlined, createFromIconfontCN, RightOutlined, QuestionCircleOutlined, MenuOutlined, CloseOutlined, CloseCircleOutlined, PlusOutlined, DragOutlined, CopyOutlined, LeftOutlined, FileImageOutlined, ScanOutlined, CloseCircleFilled, ExclamationCircleFilled, UserOutlined, HighlightOutlined, EllipsisOutlined, ArrowLeftOutlined, DownOutlined, DownloadOutlined, UndoOutlined, RedoOutlined, InboxOutlined, DeleteOutlined, CheckOutlined, EditOutlined, ZoomInOutlined, EyeInvisibleOutlined, EyeOutlined, VerticalAlignBottomOutlined, VerticalAlignTopOutlined, VerticalAlignMiddleOutlined, RightSquareOutlined, SyncOutlined, SettingOutlined, ApiOutlined, ReadOutlined, ReloadOutlined, FullscreenExitOutlined, FullscreenOutlined, ExclamationCircleOutlined, LockOutlined, UploadOutlined, SwapOutlined, RotateLeftOutlined, RotateRightOutlined, ZoomOutOutlined, ArrowUpOutlined, ArrowDownOutlined, ThunderboltOutlined, SearchOutlined, TableOutlined, FormOutlined, ProfileOutlined, AppstoreOutlined, OrderedListOutlined, LineOutlined, DisconnectOutlined, TranslationOutlined } from "@ant-design/icons";
95
+ import antIcons__default, { LoadingOutlined, createFromIconfontCN, RightOutlined, QuestionCircleOutlined, MenuOutlined, CloseOutlined, CloseCircleOutlined, PlusOutlined, DragOutlined, CopyOutlined, LeftOutlined, FileImageOutlined, ScanOutlined, CloseCircleFilled, ExclamationCircleFilled, UserOutlined, HighlightOutlined, EllipsisOutlined, ArrowLeftOutlined, DownOutlined, DownloadOutlined, UndoOutlined, RedoOutlined, InboxOutlined, DeleteOutlined, CheckOutlined, EditOutlined, ZoomInOutlined, EyeInvisibleOutlined, EyeOutlined, VerticalAlignBottomOutlined, VerticalAlignTopOutlined, VerticalAlignMiddleOutlined, RightSquareOutlined, SyncOutlined, SettingOutlined, ApiOutlined, WarningFilled, ReadOutlined, ReloadOutlined, FullscreenExitOutlined, FullscreenOutlined, ExclamationCircleOutlined, LockOutlined, UploadOutlined, SwapOutlined, RotateLeftOutlined, RotateRightOutlined, ZoomOutOutlined, ArrowUpOutlined, ArrowDownOutlined, ThunderboltOutlined, SearchOutlined, TableOutlined, FormOutlined, ProfileOutlined, AppstoreOutlined, OrderedListOutlined, LineOutlined, DisconnectOutlined, TranslationOutlined } from "@ant-design/icons";
96
96
  import * as ReactRouter from "react-router";
97
97
  import { matchRoutes } from "react-router";
98
98
  import omit$1 from "lodash/omit";
@@ -9685,7 +9685,7 @@ function addAppVersion(e, t) {
9685
9685
  addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
9686
9686
  }), e;
9687
9687
  }
9688
- const name = "@nocobase/client", version = "2.0.0-beta.7", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
9688
+ const name = "@nocobase/client", version = "2.0.0-beta.9", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
9689
9689
  "@ahooksjs/use-url-state": "3.5.1",
9690
9690
  "@ant-design/cssinjs": "^1.11.1",
9691
9691
  "@ant-design/icons": "^5.6.1",
@@ -9708,10 +9708,10 @@ const name = "@nocobase/client", version = "2.0.0-beta.7", license = "AGPL-3.0",
9708
9708
  "@formily/reactive-react": "^2.2.27",
9709
9709
  "@formily/shared": "^2.2.27",
9710
9710
  "@formily/validator": "^2.2.27",
9711
- "@nocobase/evaluators": "2.0.0-beta.7",
9712
- "@nocobase/flow-engine": "2.0.0-beta.7",
9713
- "@nocobase/sdk": "2.0.0-beta.7",
9714
- "@nocobase/utils": "2.0.0-beta.7",
9711
+ "@nocobase/evaluators": "2.0.0-beta.9",
9712
+ "@nocobase/flow-engine": "2.0.0-beta.9",
9713
+ "@nocobase/sdk": "2.0.0-beta.9",
9714
+ "@nocobase/utils": "2.0.0-beta.9",
9715
9715
  "@tanstack/react-table": "^8.21.3",
9716
9716
  "@types/tabulator-tables": "^6.2.6",
9717
9717
  "acorn-jsx": "^5.3.2",
@@ -30201,7 +30201,7 @@ const useStyles$a = genStyleHook("nb-markdown", (e, { isDarkTheme: t }) => {
30201
30201
  }, t ? i : r)
30202
30202
  };
30203
30203
  }), parseMarkdown$1 = _.memoize((e) => N(void 0, null, function* () {
30204
- return e && (yield import("./md-oH2RssNY.mjs")).default.render(e);
30204
+ return e && (yield import("./md-BbvRKckr.mjs")).default.render(e);
30205
30205
  }));
30206
30206
  function useParseMarkdown$1(e) {
30207
30207
  const [t, o] = useState(""), [n, r] = useState(!0);
@@ -56153,15 +56153,18 @@ const supportTypes = ["string", "bigInt", "integer", "uuid", "uid", "nanoid"], S
56153
56153
  const { value: t, disabled: o } = e, { targetKey: n, target: r, type: i } = useRecord(), { getCollection: a } = useCollectionManager_deprecated(), [l, c] = useState([]), [u, d] = useState(t || n), p = useForm(), m = useCompile(), h = useField();
56154
56154
  return h.required = !0, useEffect(() => {
56155
56155
  var g;
56156
- r && c(
56157
- (g = a(r).fields) == null ? void 0 : g.filter((x) => x.primaryKey || x.unique ? !0 : i === "hasMany" && supportTypes.includes(x.type)).map((x) => {
56158
- var b;
56159
- return {
56160
- value: x.name,
56161
- label: m(((b = x == null ? void 0 : x.uiSchema) == null ? void 0 : b.title) || x.title || x.name)
56162
- };
56163
- })
56164
- );
56156
+ if (r) {
56157
+ const x = castArray(a(r).filterTargetKey);
56158
+ c(
56159
+ (g = a(r).fields) == null ? void 0 : g.filter((b) => b.primaryKey || b.unique ? !0 : x.length === 1 ? x[0] === b.name : i === "hasMany" && supportTypes.includes(b.type)).map((b) => {
56160
+ var y;
56161
+ return {
56162
+ value: b.name,
56163
+ label: m(((y = b == null ? void 0 : b.uiSchema) == null ? void 0 : y.title) || b.title || b.name)
56164
+ };
56165
+ })
56166
+ );
56167
+ }
56165
56168
  }, []), /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
56166
56169
  Select$1,
56167
56170
  {
@@ -56170,15 +56173,18 @@ const supportTypes = ["string", "bigInt", "integer", "uuid", "uid", "nanoid"], S
56170
56173
  onDropdownVisibleChange: (g) => N(void 0, null, function* () {
56171
56174
  var y;
56172
56175
  const { target: x, type: b } = p.values;
56173
- x && g && c(
56174
- (y = a(x).fields) == null ? void 0 : y.filter((C) => C.primaryKey || C.unique ? !0 : b === "hasMany" && supportTypes.includes(C.type)).map((C) => {
56175
- var v;
56176
- return {
56177
- value: C.name,
56178
- label: m(((v = C == null ? void 0 : C.uiSchema) == null ? void 0 : v.title) || C.title || C.name)
56179
- };
56180
- })
56181
- );
56176
+ if (x && g) {
56177
+ const C = castArray(a(x).filterTargetKey);
56178
+ c(
56179
+ (y = a(x).fields) == null ? void 0 : y.filter((v) => v.primaryKey || v.unique ? !0 : C.length === 1 ? C[0] === v.name : b === "hasMany" && supportTypes.includes(v.type)).map((v) => {
56180
+ var S;
56181
+ return {
56182
+ value: v.name,
56183
+ label: m(((S = v == null ? void 0 : v.uiSchema) == null ? void 0 : S.title) || v.title || v.name)
56184
+ };
56185
+ })
56186
+ );
56187
+ }
56182
56188
  }),
56183
56189
  onChange: (g) => {
56184
56190
  var x;
@@ -64870,15 +64876,28 @@ function PluginInfo(e) {
64870
64876
  role: "button",
64871
64877
  "aria-label": A,
64872
64878
  size: "small",
64873
- bordered: !1,
64879
+ variant: "borderless",
64874
64880
  onClick: () => {
64875
64881
  !h && o();
64876
64882
  },
64877
- headStyle: { border: "none", minHeight: "inherit", paddingTop: 14 },
64878
- bodyStyle: { paddingTop: 10 },
64879
- title: /* @__PURE__ */ jsx("div", { children: A }),
64883
+ styles: {
64884
+ body: { paddingTop: 10 },
64885
+ header: { border: "none", minHeight: "inherit", paddingTop: 14 }
64886
+ },
64887
+ title: /* @__PURE__ */ jsxs(Space$1, { children: [
64888
+ h ? /* @__PURE__ */ jsx(Tooltip, { title: C("Plugin loading failed. Please check the server logs."), children: /* @__PURE__ */ jsx(Typography.Text, { type: "danger", children: /* @__PURE__ */ jsx(CloseCircleFilled, {}) }) }) : null,
64889
+ a ? null : /* @__PURE__ */ jsx(Tooltip, { title: C("Plugin dependencies check failed"), children: /* @__PURE__ */ jsx(Typography.Text, { type: "warning", children: /* @__PURE__ */ jsx(WarningFilled, {}) }) }),
64890
+ /* @__PURE__ */ jsx("div", { children: A })
64891
+ ] }),
64880
64892
  hoverable: !0,
64881
64893
  className: css`
64894
+ display: flex;
64895
+ flex-direction: column;
64896
+
64897
+ .ant-card-body {
64898
+ flex-grow: 1;
64899
+ }
64900
+
64882
64901
  .ant-card-actions {
64883
64902
  li .ant-space {
64884
64903
  gap: 2px !important;
@@ -65051,13 +65070,17 @@ function PluginInfo(e) {
65051
65070
  children: /* @__PURE__ */ jsx(
65052
65071
  Card.Meta,
65053
65072
  {
65054
- description: h ? /* @__PURE__ */ jsx(Typography.Text, { type: "danger", children: C("Plugin loading failed. Please check the server logs.") }) : /* @__PURE__ */ jsx(
65073
+ description: /* @__PURE__ */ jsx(
65055
65074
  Typography.Paragraph,
65056
65075
  {
65057
- style: { height: b.fontSize * b.lineHeight * 3 },
65058
- type: a ? "secondary" : "danger",
65059
- ellipsis: { rows: 3 },
65060
- children: a ? m : C("Plugin dependencies check failed")
65076
+ type: "secondary",
65077
+ className: css`
65078
+ display: -webkit-box;
65079
+ -webkit-box-orient: vertical;
65080
+ -webkit-line-clamp: 2;
65081
+ overflow: hidden;
65082
+ `,
65083
+ children: m
65061
65084
  }
65062
65085
  )
65063
65086
  }
@@ -68611,7 +68634,7 @@ BlockGridModel.registerFlow({
68611
68634
  }
68612
68635
  });
68613
68636
  const parseMarkdown = _.memoize((e) => N(void 0, null, function* () {
68614
- return e && (yield import("./md-BbvRKckr.mjs")).default.render(e);
68637
+ return e && (yield import("./md-oH2RssNY.mjs")).default.render(e);
68615
68638
  }));
68616
68639
  function useParseMarkdown(e) {
68617
68640
  const [t, o] = useState(""), [n, r] = useState(!0);