@nocobase/client 1.9.36 → 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 +47 -40
- package/lib/index.js +17 -17
- package/package.json +6 -6
package/es/index.mjs
CHANGED
|
@@ -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.36", 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.36", 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
|
);
|
|
@@ -70501,7 +70508,7 @@ export {
|
|
|
70501
70508
|
createReadPrettyFormBlockSchema,
|
|
70502
70509
|
createRouterManager,
|
|
70503
70510
|
createSelectSchemaSettingsItem,
|
|
70504
|
-
|
|
70511
|
+
Rn as createStyles,
|
|
70505
70512
|
createSwitchSettingsItem,
|
|
70506
70513
|
createTableBlockSchema,
|
|
70507
70514
|
createTableBlockUISchema,
|