@nocobase/client 1.9.35 → 1.9.37
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 +74 -50
- package/lib/index.js +31 -19
- package/package.json +6 -6
package/es/index.mjs
CHANGED
|
@@ -91,7 +91,7 @@ import { TinyColor } from "@ctrl/tinycolor";
|
|
|
91
91
|
import * as i18next from "i18next";
|
|
92
92
|
import i18next__default from "i18next";
|
|
93
93
|
import * as antIcons from "@ant-design/icons";
|
|
94
|
-
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, ApiOutlined, SettingOutlined, ReadOutlined, ReloadOutlined, SearchOutlined, TableOutlined, FormOutlined, ProfileOutlined, AppstoreOutlined, OrderedListOutlined, LineOutlined, DisconnectOutlined, TranslationOutlined } from "@ant-design/icons";
|
|
94
|
+
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, ApiOutlined, SettingOutlined, WarningFilled, ReadOutlined, ReloadOutlined, SearchOutlined, TableOutlined, FormOutlined, ProfileOutlined, AppstoreOutlined, OrderedListOutlined, LineOutlined, DisconnectOutlined, TranslationOutlined } from "@ant-design/icons";
|
|
95
95
|
import * as ReactRouter from "react-router";
|
|
96
96
|
import { matchRoutes } from "react-router";
|
|
97
97
|
import omit$1 from "lodash/omit";
|
|
@@ -113,7 +113,7 @@ import { loadableResource } from "react-imported-component";
|
|
|
113
113
|
import ProLayout, { RouteContext, PageHeader } from "@ant-design/pro-layout";
|
|
114
114
|
import * as antdStyle from "antd-style";
|
|
115
115
|
import { createStyles, createGlobalStyle, useAntdToken } from "antd-style";
|
|
116
|
-
import { createStyles as
|
|
116
|
+
import { createStyles as Rn } from "antd-style";
|
|
117
117
|
import * as dndKitCore from "@dnd-kit/core";
|
|
118
118
|
import { DndContext as DndContext$1, rectIntersection, DragOverlay, useDroppable, useDndContext, useDndMonitor, useDraggable } from "@dnd-kit/core";
|
|
119
119
|
import * as dndKitSortable from "@dnd-kit/sortable";
|
|
@@ -142,7 +142,6 @@ import { Line, Area, Column, Bar, Pie, Rose, WordCloud, Scatter, Radar, DualAxes
|
|
|
142
142
|
import BigNumber from "bignumber.js";
|
|
143
143
|
import { format } from "d3-format";
|
|
144
144
|
import * as math from "mathjs";
|
|
145
|
-
import { isFunction as isFunction$1 } from "mathjs";
|
|
146
145
|
import { customAlphabet } from "nanoid";
|
|
147
146
|
import { isDesktop } from "react-device-detect";
|
|
148
147
|
import ReactDragListView from "react-drag-listview";
|
|
@@ -8856,7 +8855,7 @@ function addAppVersion(e, t) {
|
|
|
8856
8855
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
8857
8856
|
}), e;
|
|
8858
8857
|
}
|
|
8859
|
-
const name = "@nocobase/client", version = "1.9.
|
|
8858
|
+
const name = "@nocobase/client", version = "1.9.37", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
8860
8859
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
8861
8860
|
"@ant-design/cssinjs": "^1.11.1",
|
|
8862
8861
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -8877,9 +8876,9 @@ const name = "@nocobase/client", version = "1.9.35", license = "AGPL-3.0", main
|
|
|
8877
8876
|
"@formily/reactive-react": "^2.2.27",
|
|
8878
8877
|
"@formily/shared": "^2.2.27",
|
|
8879
8878
|
"@formily/validator": "^2.2.27",
|
|
8880
|
-
"@nocobase/evaluators": "1.9.
|
|
8881
|
-
"@nocobase/sdk": "1.9.
|
|
8882
|
-
"@nocobase/utils": "1.9.
|
|
8879
|
+
"@nocobase/evaluators": "1.9.37",
|
|
8880
|
+
"@nocobase/sdk": "1.9.37",
|
|
8881
|
+
"@nocobase/utils": "1.9.37",
|
|
8883
8882
|
ahooks: "^3.7.2",
|
|
8884
8883
|
antd: "5.24.2",
|
|
8885
8884
|
"antd-mobile": "^5.41.1",
|
|
@@ -8901,7 +8900,7 @@ const name = "@nocobase/client", version = "1.9.35", license = "AGPL-3.0", main
|
|
|
8901
8900
|
"lru-cache": "6.0.0",
|
|
8902
8901
|
"markdown-it": "14.1.0",
|
|
8903
8902
|
"markdown-it-highlightjs": "3.3.1",
|
|
8904
|
-
mathjs: "^
|
|
8903
|
+
mathjs: "^15.1.0",
|
|
8905
8904
|
mermaid: "9.4.3",
|
|
8906
8905
|
mime: "^4.0.4",
|
|
8907
8906
|
"mime-match": "^1.0.2",
|
|
@@ -40511,23 +40510,23 @@ const RenderButton = ({
|
|
|
40511
40510
|
localVariables: $
|
|
40512
40511
|
}, L = useCallback(
|
|
40513
40512
|
(G, H = !0) => q(void 0, null, function* () {
|
|
40514
|
-
var Y;
|
|
40513
|
+
var Y, X;
|
|
40515
40514
|
if (H && isPortalInBody(G.target))
|
|
40516
40515
|
return;
|
|
40517
40516
|
G.preventDefault(), G.stopPropagation();
|
|
40518
40517
|
const U = yield getVariableValue(M(F == null ? void 0 : F.title, { title: E(y.title) }), V), K = yield getVariableValue(M(F == null ? void 0 : F.content, { title: E(y.title) }), V);
|
|
40519
|
-
if (!a && n) {
|
|
40520
|
-
const
|
|
40518
|
+
if (console.log(U, K), !a && n) {
|
|
40519
|
+
const J = () => {
|
|
40521
40520
|
b ? b(G, () => {
|
|
40522
|
-
var
|
|
40523
|
-
S !== !1 && (T == null || T(!0), (
|
|
40521
|
+
var Z, Q;
|
|
40522
|
+
S !== !1 && (T == null || T(!0), (Q = (Z = N()) == null ? void 0 : Z.refresh) == null || Q.call(Z));
|
|
40524
40523
|
}) : isBulkEditAction(y) || !j() ? (v(!0), I == null || I()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ? A.current() : (v(!0), I == null || I());
|
|
40525
40524
|
};
|
|
40526
|
-
(F == null ? void 0 : F.enable) !== !1 && (F != null && F.content) ? (yield (
|
|
40525
|
+
(F == null ? void 0 : F.enable) !== !1 && (F != null && F.content) ? ((Y = y["x-action-settings"]) != null && Y.skipValidator || (yield (X = z == null ? void 0 : z.submit) == null ? void 0 : X.call(z)), w.confirm({
|
|
40527
40526
|
title: M(U, { title: D || B || (t == null ? void 0 : t.title) }),
|
|
40528
40527
|
content: M(K, { title: D || B || (t == null ? void 0 : t.title) }),
|
|
40529
|
-
onOk:
|
|
40530
|
-
})) :
|
|
40528
|
+
onOk: J
|
|
40529
|
+
})) : J();
|
|
40531
40530
|
}
|
|
40532
40531
|
}),
|
|
40533
40532
|
[
|
|
@@ -43991,7 +43990,7 @@ const InternalAssociationSelect$1 = observer$1(
|
|
|
43991
43990
|
A.push(R), f.setValuesIn(r.path, A), r.onInput(A);
|
|
43992
43991
|
} else
|
|
43993
43992
|
f.setValuesIn(r.path, R), r.onInput(R);
|
|
43994
|
-
isFunction
|
|
43993
|
+
isFunction(j) && (j == null || j()), message.success(h("Saved successfully"));
|
|
43995
43994
|
}
|
|
43996
43995
|
}), T = (N) => /* @__PURE__ */ jsxs(
|
|
43997
43996
|
"div",
|
|
@@ -45126,7 +45125,9 @@ const InternalFileManager = (e) => {
|
|
|
45126
45125
|
}));
|
|
45127
45126
|
i(O);
|
|
45128
45127
|
}
|
|
45129
|
-
}, [])
|
|
45128
|
+
}, []), useEffect(() => {
|
|
45129
|
+
r || i([{ key: void 0, children: [], value: null }]);
|
|
45130
|
+
}, [r]);
|
|
45130
45131
|
const w = useCallback(
|
|
45131
45132
|
(j) => {
|
|
45132
45133
|
try {
|
|
@@ -45225,43 +45226,49 @@ const InternalFileManager = (e) => {
|
|
|
45225
45226
|
}) });
|
|
45226
45227
|
}), AssociationCascadeSelect = connect((e) => /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(CascadeSelect, x({}, e)) })), InternalCascadeSelect = observer$1(
|
|
45227
45228
|
(e) => {
|
|
45228
|
-
|
|
45229
|
-
|
|
45230
|
-
|
|
45231
|
-
|
|
45232
|
-
|
|
45229
|
+
var f;
|
|
45230
|
+
const { options: t } = useAssociationFieldContext(), n = useMemo(() => createForm(), []), { t: o } = useTranslation(), r = useField(), a = useForm(), i = useFieldSchema(), { loading: l, data: c } = useDataBlockRequest() || {}, u = useMemo(() => {
|
|
45231
|
+
var C;
|
|
45232
|
+
return (C = c == null ? void 0 : c.data) == null ? void 0 : C[i.name];
|
|
45233
|
+
}, [l]), d = !c || i.name in ((c == null ? void 0 : c.data) || {}), p = debounce((C) => {
|
|
45234
|
+
var b, S;
|
|
45233
45235
|
if (t.interface === "m2o") {
|
|
45234
|
-
const
|
|
45236
|
+
const y = extractLastNonNullValueObjects((b = C.values) == null ? void 0 : b[i.name]);
|
|
45235
45237
|
setTimeout(() => {
|
|
45236
|
-
|
|
45238
|
+
C.setValuesIn(i.name, y), r.value = y;
|
|
45237
45239
|
});
|
|
45238
45240
|
} else {
|
|
45239
|
-
const
|
|
45240
|
-
(
|
|
45241
|
+
const y = extractLastNonNullValueObjects(((S = C.values) == null ? void 0 : S.select_array) || []).filter(
|
|
45242
|
+
(v) => v && Object.keys(v).length > 0
|
|
45241
45243
|
);
|
|
45242
45244
|
setTimeout(() => {
|
|
45243
|
-
r.value =
|
|
45245
|
+
r.value = y;
|
|
45244
45246
|
});
|
|
45245
45247
|
}
|
|
45246
45248
|
}, 300);
|
|
45247
45249
|
useEffect(() => {
|
|
45248
|
-
const
|
|
45249
|
-
return n.addEffects(
|
|
45250
|
-
onFormValuesChange((
|
|
45251
|
-
|
|
45250
|
+
const C = uid();
|
|
45251
|
+
return n.addEffects(C, () => {
|
|
45252
|
+
onFormValuesChange((b) => {
|
|
45253
|
+
p(b);
|
|
45252
45254
|
});
|
|
45253
45255
|
}), () => {
|
|
45254
|
-
n.removeEffects(
|
|
45256
|
+
n.removeEffects(C), p.cancel();
|
|
45255
45257
|
};
|
|
45256
|
-
}, [])
|
|
45257
|
-
|
|
45258
|
+
}, []), useEffect(() => {
|
|
45259
|
+
var C, b;
|
|
45260
|
+
(C = a.values) != null && C[i.name] || (n && n.values.select_array && !((b = a.values) != null && b[i.name]) ? (n.setValuesIn("select_array", void 0), setTimeout(() => {
|
|
45261
|
+
n.setValuesIn("select_array", [{}]);
|
|
45262
|
+
})) : n.reset());
|
|
45263
|
+
}, [(f = a.values) == null ? void 0 : f[i.name]]);
|
|
45264
|
+
const g = {
|
|
45258
45265
|
type: "object",
|
|
45259
45266
|
properties: {
|
|
45260
45267
|
select_array: {
|
|
45261
45268
|
type: "array",
|
|
45262
45269
|
"x-component": "ArrayItems",
|
|
45263
45270
|
"x-decorator": "FormItem",
|
|
45264
|
-
default: Array.isArray(
|
|
45271
|
+
default: Array.isArray(u) && u.length > 0 ? u : [{}],
|
|
45265
45272
|
items: {
|
|
45266
45273
|
type: "void",
|
|
45267
45274
|
"x-component": "Space",
|
|
@@ -45312,18 +45319,18 @@ const InternalFileManager = (e) => {
|
|
|
45312
45319
|
}
|
|
45313
45320
|
}
|
|
45314
45321
|
};
|
|
45315
|
-
return !
|
|
45322
|
+
return !l && d && /* @__PURE__ */ jsx(FormProvider$1, { form: n, children: t.interface === "m2o" ? /* @__PURE__ */ jsx(
|
|
45316
45323
|
SchemaComponent,
|
|
45317
45324
|
{
|
|
45318
45325
|
components: { FormItem: FormItem$1 },
|
|
45319
|
-
schema: P(x({},
|
|
45320
|
-
default:
|
|
45326
|
+
schema: P(x({}, i), {
|
|
45327
|
+
default: u,
|
|
45321
45328
|
title: "",
|
|
45322
45329
|
"x-component": AssociationCascadeSelect,
|
|
45323
45330
|
"x-component-props": x({}, e)
|
|
45324
45331
|
})
|
|
45325
45332
|
}
|
|
45326
|
-
) : /* @__PURE__ */ jsx(SchemaField, { schema:
|
|
45333
|
+
) : /* @__PURE__ */ jsx(SchemaField, { schema: g }) });
|
|
45327
45334
|
},
|
|
45328
45335
|
{ displayName: "InternalCascadeSelect" }
|
|
45329
45336
|
);
|
|
@@ -63457,15 +63464,28 @@ function PluginInfo(e) {
|
|
|
63457
63464
|
role: "button",
|
|
63458
63465
|
"aria-label": w,
|
|
63459
63466
|
size: "small",
|
|
63460
|
-
|
|
63467
|
+
variant: "borderless",
|
|
63461
63468
|
onClick: () => {
|
|
63462
63469
|
!h && n();
|
|
63463
63470
|
},
|
|
63464
|
-
|
|
63465
|
-
|
|
63466
|
-
|
|
63471
|
+
styles: {
|
|
63472
|
+
body: { paddingTop: 10 },
|
|
63473
|
+
header: { border: "none", minHeight: "inherit", paddingTop: 14 }
|
|
63474
|
+
},
|
|
63475
|
+
title: /* @__PURE__ */ jsxs(Space$1, { children: [
|
|
63476
|
+
h ? /* @__PURE__ */ jsx(Tooltip, { title: S("Plugin loading failed. Please check the server logs."), children: /* @__PURE__ */ jsx(Typography.Text, { type: "danger", children: /* @__PURE__ */ jsx(CloseCircleFilled, {}) }) }) : null,
|
|
63477
|
+
i ? null : /* @__PURE__ */ jsx(Tooltip, { title: S("Plugin dependencies check failed"), children: /* @__PURE__ */ jsx(Typography.Text, { type: "warning", children: /* @__PURE__ */ jsx(WarningFilled, {}) }) }),
|
|
63478
|
+
/* @__PURE__ */ jsx("div", { children: w })
|
|
63479
|
+
] }),
|
|
63467
63480
|
hoverable: !0,
|
|
63468
63481
|
className: css`
|
|
63482
|
+
display: flex;
|
|
63483
|
+
flex-direction: column;
|
|
63484
|
+
|
|
63485
|
+
.ant-card-body {
|
|
63486
|
+
flex-grow: 1;
|
|
63487
|
+
}
|
|
63488
|
+
|
|
63469
63489
|
.ant-card-actions {
|
|
63470
63490
|
li .ant-space {
|
|
63471
63491
|
gap: 2px !important;
|
|
@@ -63638,13 +63658,17 @@ function PluginInfo(e) {
|
|
|
63638
63658
|
children: /* @__PURE__ */ jsx(
|
|
63639
63659
|
Card.Meta,
|
|
63640
63660
|
{
|
|
63641
|
-
description:
|
|
63661
|
+
description: /* @__PURE__ */ jsx(
|
|
63642
63662
|
Typography.Paragraph,
|
|
63643
63663
|
{
|
|
63644
|
-
|
|
63645
|
-
|
|
63646
|
-
|
|
63647
|
-
|
|
63664
|
+
type: "secondary",
|
|
63665
|
+
className: css`
|
|
63666
|
+
display: -webkit-box;
|
|
63667
|
+
-webkit-box-orient: vertical;
|
|
63668
|
+
-webkit-line-clamp: 2;
|
|
63669
|
+
overflow: hidden;
|
|
63670
|
+
`,
|
|
63671
|
+
children: m
|
|
63648
63672
|
}
|
|
63649
63673
|
)
|
|
63650
63674
|
}
|
|
@@ -70484,7 +70508,7 @@ export {
|
|
|
70484
70508
|
createReadPrettyFormBlockSchema,
|
|
70485
70509
|
createRouterManager,
|
|
70486
70510
|
createSelectSchemaSettingsItem,
|
|
70487
|
-
|
|
70511
|
+
Rn as createStyles,
|
|
70488
70512
|
createSwitchSettingsItem,
|
|
70489
70513
|
createTableBlockSchema,
|
|
70490
70514
|
createTableBlockUISchema,
|