@nocobase/client 1.4.7 → 1.4.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 +39 -35
- package/lib/index.js +96 -93
- package/lib/locale/zh-CN.js +2 -2
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -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.
|
|
4298
|
+
const name = "@nocobase/client", version$1 = "1.4.9", 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.7", license = "AGPL-3.0", main
|
|
|
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.
|
|
4321
|
-
"@nocobase/sdk": "1.4.
|
|
4322
|
-
"@nocobase/utils": "1.4.
|
|
4320
|
+
"@nocobase/evaluators": "1.4.9",
|
|
4321
|
+
"@nocobase/sdk": "1.4.9",
|
|
4322
|
+
"@nocobase/utils": "1.4.9",
|
|
4323
4323
|
ahooks: "^3.7.2",
|
|
4324
4324
|
antd: "5.12.8",
|
|
4325
4325
|
"antd-style": "3.7.1",
|
|
@@ -5213,6 +5213,8 @@ const InternalFormBlockProvider = (e) => {
|
|
|
5213
5213
|
for (; e; ) {
|
|
5214
5214
|
if (e["x-decorator"] === "FormBlockProvider")
|
|
5215
5215
|
return e;
|
|
5216
|
+
if (e["x-component"] === "AssociationField.Selector")
|
|
5217
|
+
return null;
|
|
5216
5218
|
e = e.parent;
|
|
5217
5219
|
}
|
|
5218
5220
|
return null;
|
|
@@ -7602,7 +7604,7 @@ function getRenderContent(e, t, o, n, r) {
|
|
|
7602
7604
|
const l = yield replaceVariableValue(t, o, n);
|
|
7603
7605
|
return yield r(l);
|
|
7604
7606
|
} catch (l) {
|
|
7605
|
-
return t;
|
|
7607
|
+
return console.log(l), t;
|
|
7606
7608
|
}
|
|
7607
7609
|
});
|
|
7608
7610
|
}
|
|
@@ -10465,7 +10467,7 @@ const variablesStore = {}, getFieldPath = (e, t) => {
|
|
|
10465
10467
|
dataSource: A,
|
|
10466
10468
|
collectionName: O
|
|
10467
10469
|
};
|
|
10468
|
-
const T = y[M], { fieldPath: N } = getFieldPath(y.slice(0, M + 1).join("."), I), z = r(N, A), q = (B = i(
|
|
10470
|
+
const T = y[M], { fieldPath: N } = getFieldPath(y.slice(0, M + 1).join("."), I), z = r(N, A), q = (B = i($, A)) == null ? void 0 : B.getPrimaryKey();
|
|
10469
10471
|
if (Array.isArray(w)) {
|
|
10470
10472
|
const E = w.map((U) => {
|
|
10471
10473
|
if (!(b != null && b.doNotRequest) && shouldToRequest(U == null ? void 0 : U[T]) && (U == null ? void 0 : U[q]) != null && z != null && z.target) {
|
|
@@ -11543,7 +11545,8 @@ const ParentCollectionProvider = (e) => {
|
|
|
11543
11545
|
{
|
|
11544
11546
|
name: "$nRecord",
|
|
11545
11547
|
ctx: a,
|
|
11546
|
-
collectionName: l
|
|
11548
|
+
collectionName: l,
|
|
11549
|
+
dataSource: d
|
|
11547
11550
|
},
|
|
11548
11551
|
{
|
|
11549
11552
|
name: "$nParentRecord",
|
|
@@ -11638,12 +11641,17 @@ function useParsedFilter({ filterOption: e }) {
|
|
|
11638
11641
|
if (!isVariable(d))
|
|
11639
11642
|
return d;
|
|
11640
11643
|
const p = getVariableName(d), m = o(p);
|
|
11641
|
-
|
|
11642
|
-
|
|
11643
|
-
|
|
11644
|
-
|
|
11645
|
-
|
|
11646
|
-
|
|
11644
|
+
let h = null;
|
|
11645
|
+
const f = getPath(d).split(".");
|
|
11646
|
+
return f.forEach((C, S) => {
|
|
11647
|
+
const b = f.slice(0, S + 1).join("."), y = getValuesByPath(
|
|
11648
|
+
{
|
|
11649
|
+
[p]: (m == null ? void 0 : m.ctx) || {}
|
|
11650
|
+
},
|
|
11651
|
+
b
|
|
11652
|
+
);
|
|
11653
|
+
_.isEmpty(y) || (h = y);
|
|
11654
|
+
}), h;
|
|
11647
11655
|
}
|
|
11648
11656
|
}),
|
|
11649
11657
|
c,
|
|
@@ -23050,10 +23058,8 @@ const DynamicComponent = (e) => {
|
|
|
23050
23058
|
placeholder: t("Comparision")
|
|
23051
23059
|
}
|
|
23052
23060
|
),
|
|
23053
|
-
/* @__PURE__ */
|
|
23054
|
-
|
|
23055
|
-
!e.disabled && /* @__PURE__ */ jsx("a", { role: "button", "aria-label": "icon-close", children: /* @__PURE__ */ jsx(CloseCircleOutlined, { onClick: n, style: b }) })
|
|
23056
|
-
] })
|
|
23061
|
+
c != null && c.noValue ? null : /* @__PURE__ */ jsx(DynamicComponent, { value: p, schema: r, collectionField: h, onChange: m }),
|
|
23062
|
+
!e.disabled && /* @__PURE__ */ jsx("a", { role: "button", "aria-label": "icon-close", children: /* @__PURE__ */ jsx(CloseCircleOutlined, { onClick: n, style: b }) })
|
|
23057
23063
|
] }) })
|
|
23058
23064
|
);
|
|
23059
23065
|
},
|
|
@@ -27281,6 +27287,7 @@ const Layout = {
|
|
|
27281
27287
|
}))
|
|
27282
27288
|
), unflatten$1(a);
|
|
27283
27289
|
}),
|
|
27290
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
27284
27291
|
[e, t, o == null ? void 0 : o.parseVariable]
|
|
27285
27292
|
), findVariable: n };
|
|
27286
27293
|
}, addChildActionSettings = new SchemaSettings({
|
|
@@ -36362,7 +36369,7 @@ function AttachmentList(e) {
|
|
|
36362
36369
|
function Uploader(o) {
|
|
36363
36370
|
var n = o, { rules: e } = n, t = K(n, ["rules"]);
|
|
36364
36371
|
const { disabled: r, multiple: i, value: a, onChange: l, toValueItem: c = toValueItem } = t, [u, d] = useState([]), { t: p } = useTranslation(), { componentCls: m } = useStyles$8(), h = useField(), g = useUploadProps(t), f = useBeforeUpload(e);
|
|
36365
|
-
|
|
36372
|
+
useEffect(() => {
|
|
36366
36373
|
u.length ? h.setFeedback({
|
|
36367
36374
|
type: "error",
|
|
36368
36375
|
code: "ValidateError",
|
|
@@ -38331,6 +38338,9 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
38331
38338
|
.ant-table-small .ant-table-cell {
|
|
38332
38339
|
padding: 8px ${C.paddingXS}px;
|
|
38333
38340
|
}
|
|
38341
|
+
.ant-table-cell-fix-right {
|
|
38342
|
+
padding: 8px 16px !important;
|
|
38343
|
+
}
|
|
38334
38344
|
}
|
|
38335
38345
|
}
|
|
38336
38346
|
}
|
|
@@ -41457,22 +41467,16 @@ const MarkdownEditor = (e) => {
|
|
|
41457
41467
|
return t - 2 * e.paddingLG;
|
|
41458
41468
|
}, MarkdownVoid = withDynamicSchemaProps(
|
|
41459
41469
|
observer$1((e) => {
|
|
41460
|
-
const { isDarkTheme: t } = useGlobalTheme(), { componentCls: o, hashId: n } = useStyles$4({ isDarkTheme: t }), { content: r, className: i } = e, a = useField(), l = useFieldSchema(), { dn: c } = useDesignable(), { onSave: u, onCancel: d, form: p } = e, m = useCollectionRecord(), [h, g] = useState(""), f = useVariables(), C = useLocalVariables(), { engine: S } = (l == null ? void 0 : l["x-decorator-props"]) || {}, [b, y] = useState(!1)
|
|
41461
|
-
useEffect(() => {
|
|
41470
|
+
const { isDarkTheme: t } = useGlobalTheme(), { componentCls: o, hashId: n } = useStyles$4({ isDarkTheme: t }), { content: r, className: i } = e, a = useField(), l = useFieldSchema(), { dn: c } = useDesignable(), { onSave: u, onCancel: d, form: p } = e, m = useCollectionRecord(), [h, g] = useState(""), f = useVariables(), C = useLocalVariables(), { engine: S } = (l == null ? void 0 : l["x-decorator-props"]) || {}, [b, y] = useState(!1);
|
|
41471
|
+
useCompile(), useEffect(() => {
|
|
41462
41472
|
y(!0), V(void 0, null, function* () {
|
|
41463
41473
|
setTimeout(() => V(void 0, null, function* () {
|
|
41464
|
-
const
|
|
41465
|
-
|
|
41466
|
-
r,
|
|
41467
|
-
v(f),
|
|
41468
|
-
v(C),
|
|
41469
|
-
parseMarkdown
|
|
41470
|
-
);
|
|
41471
|
-
g(A);
|
|
41474
|
+
const k = yield getRenderContent(S, r, f, C, parseMarkdown);
|
|
41475
|
+
g(k);
|
|
41472
41476
|
})), y(!1);
|
|
41473
41477
|
});
|
|
41474
41478
|
}, [r, f, C, S]);
|
|
41475
|
-
const
|
|
41479
|
+
const v = useMarkdownHeight(), I = useVariableOptions({
|
|
41476
41480
|
collectionField: { uiSchema: l },
|
|
41477
41481
|
form: p,
|
|
41478
41482
|
record: m,
|
|
@@ -41484,20 +41488,20 @@ const MarkdownEditor = (e) => {
|
|
|
41484
41488
|
}, []), b ? /* @__PURE__ */ jsx(Spin, {}) : a != null && a.editable ? /* @__PURE__ */ jsx(
|
|
41485
41489
|
MarkdownEditor,
|
|
41486
41490
|
F(x({
|
|
41487
|
-
scope:
|
|
41491
|
+
scope: I
|
|
41488
41492
|
}, e), {
|
|
41489
41493
|
className: !0,
|
|
41490
41494
|
defaultValue: r,
|
|
41491
41495
|
onCancel: () => {
|
|
41492
41496
|
a.editable = !1, d == null || d();
|
|
41493
41497
|
},
|
|
41494
|
-
onSubmit: (
|
|
41495
|
-
var
|
|
41496
|
-
a.editable = !1, (
|
|
41498
|
+
onSubmit: (w) => V(void 0, null, function* () {
|
|
41499
|
+
var k;
|
|
41500
|
+
a.editable = !1, (k = l["x-component-props"]) != null || (l["x-component-props"] = {}), l["x-component-props"].content = w, a.componentProps.content = w, u == null || u(l), c.emit("patch", {
|
|
41497
41501
|
schema: {
|
|
41498
41502
|
"x-uid": l["x-uid"],
|
|
41499
41503
|
"x-component-props": {
|
|
41500
|
-
content:
|
|
41504
|
+
content: w
|
|
41501
41505
|
}
|
|
41502
41506
|
}
|
|
41503
41507
|
});
|
|
@@ -41507,7 +41511,7 @@ const MarkdownEditor = (e) => {
|
|
|
41507
41511
|
"div",
|
|
41508
41512
|
{
|
|
41509
41513
|
className: cls([o, n, "nb-markdown nb-markdown-default nb-markdown-table", i]),
|
|
41510
|
-
style: F(x({}, e.style), { height:
|
|
41514
|
+
style: F(x({}, e.style), { height: v || "100%", overflowY: v ? "auto" : "null" }),
|
|
41511
41515
|
dangerouslySetInnerHTML: { __html: h }
|
|
41512
41516
|
}
|
|
41513
41517
|
);
|