@nocobase/client 1.4.27 → 1.4.29
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 +181 -154
- package/lib/index.js +91 -91
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -4301,7 +4301,7 @@ function addAppVersion(e, t) {
|
|
|
4301
4301
|
addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
|
|
4302
4302
|
}), e;
|
|
4303
4303
|
}
|
|
4304
|
-
const name = "@nocobase/client", version$1 = "1.4.
|
|
4304
|
+
const name = "@nocobase/client", version$1 = "1.4.29", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
4305
4305
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
4306
4306
|
"@ant-design/cssinjs": "^1.11.1",
|
|
4307
4307
|
"@ant-design/icons": "^5.1.4",
|
|
@@ -4323,9 +4323,9 @@ const name = "@nocobase/client", version$1 = "1.4.27", license = "AGPL-3.0", mai
|
|
|
4323
4323
|
"@formily/reactive-react": "^2.2.27",
|
|
4324
4324
|
"@formily/shared": "^2.2.27",
|
|
4325
4325
|
"@formily/validator": "^2.2.27",
|
|
4326
|
-
"@nocobase/evaluators": "1.4.
|
|
4327
|
-
"@nocobase/sdk": "1.4.
|
|
4328
|
-
"@nocobase/utils": "1.4.
|
|
4326
|
+
"@nocobase/evaluators": "1.4.29",
|
|
4327
|
+
"@nocobase/sdk": "1.4.29",
|
|
4328
|
+
"@nocobase/utils": "1.4.29",
|
|
4329
4329
|
ahooks: "^3.7.2",
|
|
4330
4330
|
antd: "5.12.8",
|
|
4331
4331
|
"antd-style": "3.7.1",
|
|
@@ -17196,10 +17196,10 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
17196
17196
|
}, [l, T.title, F]);
|
|
17197
17197
|
useEffect(() => {
|
|
17198
17198
|
k.stateOfLinkageRules && setInitialActionState(k), k.stateOfLinkageRules = {}, L.filter((W) => !W.disabled).forEach((W) => {
|
|
17199
|
-
var
|
|
17200
|
-
(
|
|
17199
|
+
var J;
|
|
17200
|
+
(J = W.actions) == null || J.forEach((X) => {
|
|
17201
17201
|
linkageAction({
|
|
17202
|
-
operator:
|
|
17202
|
+
operator: X.operator,
|
|
17203
17203
|
field: k,
|
|
17204
17204
|
condition: W.condition,
|
|
17205
17205
|
variables: R,
|
|
@@ -17309,7 +17309,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
17309
17309
|
"setSubmitted",
|
|
17310
17310
|
"getAriaLabel",
|
|
17311
17311
|
"parentRecordData"
|
|
17312
|
-
]), [$, M] = useState(!1), { wrapSSR: w, componentCls: N, hashId: z } = useStyles$g(), [q, V] = useState(!1), U = n["x-toolbar-props"] || n["x-designer-props"], G = (ue = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : ue.openMode, H = (xe = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : xe.openSize, W = (de = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : de.refreshDataBlockRequest, { modal:
|
|
17312
|
+
]), [$, M] = useState(!1), { wrapSSR: w, componentCls: N, hashId: z } = useStyles$g(), [q, V] = useState(!1), U = n["x-toolbar-props"] || n["x-designer-props"], G = (ue = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : ue.openMode, H = (xe = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : xe.openSize, W = (de = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : de.refreshDataBlockRequest, { modal: J } = App.useApp(), X = useForm(), Y = useACLActionParamsContext(), { run: Q, element: Z, disabled: te } = (T == null ? void 0 : T(A)) || {}, ee = X.disabled || i.disabled || ((pe = i.data) == null ? void 0 : pe.disabled) || k || te, se = useMemo(() => {
|
|
17313
17313
|
var ce;
|
|
17314
17314
|
return v(x({}, P), {
|
|
17315
17315
|
opacity: r && (((ce = i == null ? void 0 : i.data) == null ? void 0 : ce.hidden) || !Y) && 0.1,
|
|
@@ -17341,7 +17341,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
17341
17341
|
setVisible: M,
|
|
17342
17342
|
run: Q,
|
|
17343
17343
|
confirm: f,
|
|
17344
|
-
modal:
|
|
17344
|
+
modal: J,
|
|
17345
17345
|
setSubmitted: L,
|
|
17346
17346
|
confirmTitle: C
|
|
17347
17347
|
};
|
|
@@ -18089,21 +18089,21 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18089
18089
|
}
|
|
18090
18090
|
}
|
|
18091
18091
|
function S(w, N, z) {
|
|
18092
|
-
var q, V, U, G, H, W,
|
|
18093
|
-
if (w && (w = w.split("/"),
|
|
18092
|
+
var q, V, U, G, H, W, J, X, Y, Q, Z, te, ee = N && N.split("/"), se = a.map, ie = se && se["*"];
|
|
18093
|
+
if (w && (w = w.split("/"), J = w.length - 1, a.nodeIdCompat && jsSuffixRegExp.test(w[J]) && (w[J] = w[J].replace(jsSuffixRegExp, "")), w[0].charAt(0) === "." && ee && (te = ee.slice(0, ee.length - 1), w = te.concat(w)), C(w), w = w.join("/")), z && se && (ee || ie)) {
|
|
18094
18094
|
U = w.split("/");
|
|
18095
18095
|
e:
|
|
18096
18096
|
for (G = U.length; G > 0; G -= 1) {
|
|
18097
18097
|
if (W = U.slice(0, G).join("/"), ee) {
|
|
18098
18098
|
for (H = ee.length; H > 0; H -= 1)
|
|
18099
18099
|
if (V = getOwn(se, ee.slice(0, H).join("/")), V && (V = getOwn(V, W), V)) {
|
|
18100
|
-
|
|
18100
|
+
X = V, Y = G;
|
|
18101
18101
|
break e;
|
|
18102
18102
|
}
|
|
18103
18103
|
}
|
|
18104
18104
|
!Q && ie && getOwn(ie, W) && (Q = getOwn(ie, W), Z = G);
|
|
18105
18105
|
}
|
|
18106
|
-
!
|
|
18106
|
+
!X && Q && (X = Q, Y = Z), X && (U.splice(0, Y, X), w = U.join("/"));
|
|
18107
18107
|
}
|
|
18108
18108
|
return q = getOwn(a.pkgs, w), q || w;
|
|
18109
18109
|
}
|
|
@@ -18125,16 +18125,16 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18125
18125
|
return z > -1 && (N = w.substring(0, z), w = w.substring(z + 1, w.length)), [N, w];
|
|
18126
18126
|
}
|
|
18127
18127
|
function P(w, N, z, q) {
|
|
18128
|
-
var V, U, G, H, W = null,
|
|
18129
|
-
return w || (Y = !1, w = "_@r" + (g += 1)), H = F(w), W = H[0], w = H[1], W && (W = S(W,
|
|
18130
|
-
return S(Z,
|
|
18131
|
-
}) : Q = w.indexOf("!") === -1 ? S(w,
|
|
18128
|
+
var V, U, G, H, W = null, J = N ? N.name : null, X = w, Y = !0, Q = "";
|
|
18129
|
+
return w || (Y = !1, w = "_@r" + (g += 1)), H = F(w), W = H[0], w = H[1], W && (W = S(W, J, q), U = getOwn(p, W)), w && (W ? z ? Q = w : U && U.normalize ? Q = U.normalize(w, function(Z) {
|
|
18130
|
+
return S(Z, J, q);
|
|
18131
|
+
}) : Q = w.indexOf("!") === -1 ? S(w, J, q) : w : (Q = S(w, J, q), H = F(Q), W = H[0], Q = H[1], z = !0, V = n.nameToUrl(Q))), G = W && !U && !z ? "_unnormalized" + (f += 1) : "", {
|
|
18132
18132
|
prefix: W,
|
|
18133
18133
|
name: Q,
|
|
18134
18134
|
parentMap: N,
|
|
18135
18135
|
unnormalized: !!G,
|
|
18136
18136
|
url: V,
|
|
18137
|
-
originalName:
|
|
18137
|
+
originalName: X,
|
|
18138
18138
|
isDefine: Y,
|
|
18139
18139
|
id: (W ? W + "!" + Q : Q) + G
|
|
18140
18140
|
};
|
|
@@ -18193,11 +18193,11 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18193
18193
|
var w, N, z = a.waitSeconds * 1e3, q = z && n.startTime + z < (/* @__PURE__ */ new Date()).getTime(), V = [], U = [], G = !1, H = !0;
|
|
18194
18194
|
if (!t) {
|
|
18195
18195
|
if (t = !0, eachProp(c, function(W) {
|
|
18196
|
-
var
|
|
18197
|
-
if (W.enabled && (
|
|
18196
|
+
var J = W.map, X = J.id;
|
|
18197
|
+
if (W.enabled && (J.isDefine || U.push(W), !W.error)) {
|
|
18198
18198
|
if (!W.inited && q)
|
|
18199
|
-
y(
|
|
18200
|
-
else if (!W.inited && W.fetched &&
|
|
18199
|
+
y(X) ? (N = !0, G = !0) : (V.push(X), b(X));
|
|
18200
|
+
else if (!W.inited && W.fetched && J.isDefine && (G = !0, !J.prefix))
|
|
18201
18201
|
return H = !1;
|
|
18202
18202
|
}
|
|
18203
18203
|
}), q && V.length)
|
|
@@ -18279,12 +18279,12 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18279
18279
|
callPlugin: function() {
|
|
18280
18280
|
var w = this.map, N = w.id, z = P(w.prefix);
|
|
18281
18281
|
this.depMaps.push(z), T(z, "defined", bind(this, function(q) {
|
|
18282
|
-
var V, U, G, H = getOwn(h, this.map.id), W = this.map.name,
|
|
18282
|
+
var V, U, G, H = getOwn(h, this.map.id), W = this.map.name, J = this.map.parentMap ? this.map.parentMap.name : null, X = n.makeRequire(w.parentMap, {
|
|
18283
18283
|
enableBuildCallback: !0
|
|
18284
18284
|
});
|
|
18285
18285
|
if (this.map.unnormalized) {
|
|
18286
18286
|
q.normalize && (W = q.normalize(W, function(Y) {
|
|
18287
|
-
return S(Y,
|
|
18287
|
+
return S(Y, J, !0);
|
|
18288
18288
|
}) || ""), U = P(
|
|
18289
18289
|
w.prefix + "!" + W,
|
|
18290
18290
|
this.map.parentMap,
|
|
@@ -18332,8 +18332,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18332
18332
|
[N]
|
|
18333
18333
|
));
|
|
18334
18334
|
}
|
|
18335
|
-
ee && (useInteractive = !0), this.depMaps.push(te), n.completeLoad(Z),
|
|
18336
|
-
}), q.load(w.name,
|
|
18335
|
+
ee && (useInteractive = !0), this.depMaps.push(te), n.completeLoad(Z), X([Z], V);
|
|
18336
|
+
}), q.load(w.name, X, V, a);
|
|
18337
18337
|
})), n.enable(z, this), this.pluginMaps[z.id] = z;
|
|
18338
18338
|
},
|
|
18339
18339
|
enable: function() {
|
|
@@ -18532,9 +18532,9 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18532
18532
|
* internal API, not a public one. Use toUrl for the public API.
|
|
18533
18533
|
*/
|
|
18534
18534
|
nameToUrl: function(w, N, z) {
|
|
18535
|
-
var q, V, U, G, H, W,
|
|
18536
|
-
if (
|
|
18537
|
-
return n.nameToUrl(
|
|
18535
|
+
var q, V, U, G, H, W, J, X = getOwn(a.pkgs, w);
|
|
18536
|
+
if (X && (w = X), J = getOwn(h, w), J)
|
|
18537
|
+
return n.nameToUrl(J, N, z);
|
|
18538
18538
|
if (req.jsExtRegExp.test(w))
|
|
18539
18539
|
H = w + (N || "");
|
|
18540
18540
|
else {
|
|
@@ -19165,7 +19165,7 @@ const useCollectionManager_deprecated = (e) => {
|
|
|
19165
19165
|
if (N[R])
|
|
19166
19166
|
return _.cloneDeep(N[R]);
|
|
19167
19167
|
typeof $ == "string" && ($ = [$]);
|
|
19168
|
-
const
|
|
19168
|
+
const J = S(R, W), X = (Y = J == null ? void 0 : J.filter(
|
|
19169
19169
|
(Q) => Q.interface && !U.includes(Q.interface) && (V || $.includes(Q.type) || (w && Q.target && Q.target !== R && Array.isArray(w) ? w.includes(Q.interface) : !1))
|
|
19170
19170
|
)) == null ? void 0 : Y.map((Q) => {
|
|
19171
19171
|
var te, ee;
|
|
@@ -19181,7 +19181,7 @@ const useCollectionManager_deprecated = (e) => {
|
|
|
19181
19181
|
usePrefix: H
|
|
19182
19182
|
})), !((ee = Z.children) != null && ee.length)) ? null : Z;
|
|
19183
19183
|
}).filter(Boolean);
|
|
19184
|
-
return N[R] =
|
|
19184
|
+
return N[R] = X, X;
|
|
19185
19185
|
},
|
|
19186
19186
|
[S]
|
|
19187
19187
|
), T = useCallback(
|
|
@@ -22114,13 +22114,15 @@ const SchemaSettingsWrapper = (e) => {
|
|
|
22114
22114
|
}
|
|
22115
22115
|
`, TableColumnActionBar$1 = observer$1(
|
|
22116
22116
|
(e) => {
|
|
22117
|
-
const t = useDesigner()
|
|
22118
|
-
|
|
22117
|
+
const t = useDesigner();
|
|
22118
|
+
useFlag();
|
|
22119
|
+
const { designable: o } = useSchemaComponentContext(), { token: n } = useToken();
|
|
22120
|
+
return !o || t.isNullComponent ? e.children : /* @__PURE__ */ jsxs(
|
|
22119
22121
|
SortableItem,
|
|
22120
22122
|
{
|
|
22121
22123
|
className: designerCss$4({
|
|
22122
|
-
margin:
|
|
22123
|
-
padding:
|
|
22124
|
+
margin: `-${n.margin}px -${n.marginXS}px`,
|
|
22125
|
+
padding: `${n.margin}px ${n.marginXS}px`
|
|
22124
22126
|
}),
|
|
22125
22127
|
children: [
|
|
22126
22128
|
/* @__PURE__ */ jsx(t, {}),
|
|
@@ -22161,7 +22163,9 @@ const useColumnSchema$1 = () => {
|
|
|
22161
22163
|
}, [e, t]);
|
|
22162
22164
|
return t ? o : [];
|
|
22163
22165
|
}, TableColumnDecorator$1 = (e) => {
|
|
22164
|
-
const t = useDesigner(), o = useField(), { fieldSchema: n, uiSchema: r, collectionField: i } = useColumnSchema$1(), { designable: a } = useSchemaComponentContext(), l = useCompile()
|
|
22166
|
+
const t = useDesigner(), o = useField(), { fieldSchema: n, uiSchema: r, collectionField: i } = useColumnSchema$1(), { designable: a } = useSchemaComponentContext(), l = useCompile();
|
|
22167
|
+
useFlag();
|
|
22168
|
+
const { token: c } = useToken();
|
|
22165
22169
|
return useLayoutEffect(() => {
|
|
22166
22170
|
o.title || n && r != null && r.title && (o.title = r == null ? void 0 : r.title);
|
|
22167
22171
|
}, [r == null ? void 0 : r.title]), !a || t.isNullComponent ? /* @__PURE__ */ jsxs(CollectionFieldContext.Provider, { value: i, children: [
|
|
@@ -22174,8 +22178,8 @@ const useColumnSchema$1 = () => {
|
|
|
22174
22178
|
SortableItem,
|
|
22175
22179
|
{
|
|
22176
22180
|
className: designerCss$4({
|
|
22177
|
-
margin: c
|
|
22178
|
-
padding: c
|
|
22181
|
+
margin: `-${c.margin}px -${c.marginXS}px`,
|
|
22182
|
+
padding: `${c.margin}px ${c.marginXS}px`
|
|
22179
22183
|
}),
|
|
22180
22184
|
children: /* @__PURE__ */ jsxs(CollectionFieldContext.Provider, { value: i, children: [
|
|
22181
22185
|
/* @__PURE__ */ jsx(t, { fieldSchema: n, uiSchema: r, collectionField: i }),
|
|
@@ -23451,11 +23455,11 @@ const useGetFilterOptions = () => {
|
|
|
23451
23455
|
defaultFilter: ((z = (N = (w = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : w.service) == null ? void 0 : N.params) == null ? void 0 : z.filter) || {},
|
|
23452
23456
|
form: r,
|
|
23453
23457
|
onSubmit: ({ filter: G }) => {
|
|
23454
|
-
var W,
|
|
23458
|
+
var W, J;
|
|
23455
23459
|
G = removeNullCondition(G), set$1(l.componentProps, "service.params.filter", G), o["x-component-props"] = l.componentProps;
|
|
23456
|
-
const H = (
|
|
23457
|
-
l.form.query(`${H.concat("*." + o.name)}`).forEach((
|
|
23458
|
-
|
|
23460
|
+
const H = (J = l.path) == null ? void 0 : J.splice(((W = l.path) == null ? void 0 : W.length) - 1, 1);
|
|
23461
|
+
l.form.query(`${H.concat("*." + o.name)}`).forEach((X) => {
|
|
23462
|
+
X.componentProps.service = X.componentProps.service || { params: {} }, X.componentProps.service.params.filter = G;
|
|
23459
23463
|
}), d.emit("patch", {
|
|
23460
23464
|
schema: {
|
|
23461
23465
|
"x-uid": o["x-uid"],
|
|
@@ -23539,8 +23543,8 @@ const useGetFilterOptions = () => {
|
|
|
23539
23543
|
options: m,
|
|
23540
23544
|
value: p == null ? void 0 : p.label,
|
|
23541
23545
|
onChange: (G) => {
|
|
23542
|
-
var
|
|
23543
|
-
const H = v(x(x({}, (
|
|
23546
|
+
var J, X, Y, Q, Z;
|
|
23547
|
+
const H = v(x(x({}, (X = (J = n == null ? void 0 : n.uiSchema) == null ? void 0 : J["x-component-props"]) == null ? void 0 : X.fieldNames), (Y = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : Y.fieldNames), {
|
|
23544
23548
|
label: G
|
|
23545
23549
|
});
|
|
23546
23550
|
_.set(o, "x-component-props.fieldNames", H);
|
|
@@ -23600,12 +23604,12 @@ const useGetFilterOptions = () => {
|
|
|
23600
23604
|
title: c("Required"),
|
|
23601
23605
|
checked: o.required,
|
|
23602
23606
|
onChange: (G) => {
|
|
23603
|
-
var
|
|
23607
|
+
var J, X;
|
|
23604
23608
|
const H = {
|
|
23605
23609
|
"x-uid": o["x-uid"]
|
|
23606
23610
|
};
|
|
23607
23611
|
o.required = G, H.required = G;
|
|
23608
|
-
const W = (
|
|
23612
|
+
const W = (X = l.path) == null ? void 0 : X.splice(((J = l.path) == null ? void 0 : J.length) - 1, 1);
|
|
23609
23613
|
l.form.query(`${W.concat("*." + o.name)}`).forEach((Y) => {
|
|
23610
23614
|
Y.required = G;
|
|
23611
23615
|
}), d.emit("patch", {
|
|
@@ -23626,10 +23630,10 @@ const useGetFilterOptions = () => {
|
|
|
23626
23630
|
],
|
|
23627
23631
|
value: A,
|
|
23628
23632
|
onChange: (G) => {
|
|
23629
|
-
var
|
|
23633
|
+
var J, X;
|
|
23630
23634
|
const H = {
|
|
23631
23635
|
"x-uid": o["x-uid"]
|
|
23632
|
-
}, W = (
|
|
23636
|
+
}, W = (X = l.path) == null ? void 0 : X.splice(((J = l.path) == null ? void 0 : J.length) - 1, 1);
|
|
23633
23637
|
switch (G) {
|
|
23634
23638
|
case "readonly": {
|
|
23635
23639
|
o["x-read-pretty"] = !1, o["x-disabled"] = !0, H["x-read-pretty"] = !1, H["x-disabled"] = !0, l.form.query(`${W.concat("*." + o.name)}`).forEach((Y) => {
|
|
@@ -23663,10 +23667,10 @@ const useGetFilterOptions = () => {
|
|
|
23663
23667
|
{
|
|
23664
23668
|
fieldSchema: o,
|
|
23665
23669
|
onSubmitCallBack: (G) => {
|
|
23666
|
-
var W,
|
|
23667
|
-
const H = (
|
|
23668
|
-
l.form.query(`${H.concat("*." + o.name)}`).forEach((
|
|
23669
|
-
|
|
23670
|
+
var W, J;
|
|
23671
|
+
const H = (J = l.path) == null ? void 0 : J.splice(((W = l.path) == null ? void 0 : W.length) - 1, 1);
|
|
23672
|
+
l.form.query(`${H.concat("*." + o.name)}`).forEach((X) => {
|
|
23673
|
+
X.componentProps.service = X.componentProps.service || { params: {} }, X.componentProps.service.params.sort = G;
|
|
23670
23674
|
});
|
|
23671
23675
|
}
|
|
23672
23676
|
}
|
|
@@ -24719,10 +24723,10 @@ const useCreateActionProps = () => {
|
|
|
24719
24723
|
skipValidator: L,
|
|
24720
24724
|
triggerWorkflows: O
|
|
24721
24725
|
} = (N = l == null ? void 0 : l["x-action-settings"]) != null ? N : {}, j = (z = i == null ? void 0 : i["x-component-props"]) == null ? void 0 : z.addChild, { successMessage: R } = D || {}, $ = {}, M = Object.keys(A).map((H) => E(this, null, function* () {
|
|
24722
|
-
const W = A[H],
|
|
24726
|
+
const W = A[H], J = d(H);
|
|
24723
24727
|
if (isVariable(W)) {
|
|
24724
|
-
const { value:
|
|
24725
|
-
|
|
24728
|
+
const { value: X } = (yield C == null ? void 0 : C.parseVariable(W, S)) || {};
|
|
24729
|
+
X && ($[H] = transformVariableValue(X, { targetCollectionField: J }));
|
|
24726
24730
|
} else
|
|
24727
24731
|
W != null && W !== "" && ($[H] = W);
|
|
24728
24732
|
}));
|
|
@@ -24925,7 +24929,7 @@ const useCreateActionProps = () => {
|
|
|
24925
24929
|
V.filter || (V.forceUpdate = !0);
|
|
24926
24930
|
try {
|
|
24927
24931
|
yield t.update(V);
|
|
24928
|
-
} catch (
|
|
24932
|
+
} catch (J) {
|
|
24929
24933
|
} finally {
|
|
24930
24934
|
m.data.loading = !1;
|
|
24931
24935
|
}
|
|
@@ -24959,7 +24963,7 @@ const useCreateActionProps = () => {
|
|
|
24959
24963
|
k !== !0 && R === "customize:form:request" && (yield i.submit());
|
|
24960
24964
|
const $ = A.headers ? JSON.parse(A.headers) : {}, M = A.params ? JSON.parse(A.params) : {}, w = A.data ? JSON.parse(A.data) : {};
|
|
24961
24965
|
if (R === "customize:form:request" && ["POST", "PUT", "PATCH"].includes(A.method)) {
|
|
24962
|
-
const H = a.map((
|
|
24966
|
+
const H = a.map((J) => J.name), W = getFormValues({
|
|
24963
24967
|
filterByTk: o,
|
|
24964
24968
|
field: c,
|
|
24965
24969
|
form: i,
|
|
@@ -25280,7 +25284,7 @@ const useCreateActionProps = () => {
|
|
|
25280
25284
|
const { targets: $, uid: M } = findFilterTargets(t);
|
|
25281
25285
|
n().forEach((w) => {
|
|
25282
25286
|
var G, H, W;
|
|
25283
|
-
if (!$.find((
|
|
25287
|
+
if (!$.find((J) => J.uid === w.uid))
|
|
25284
25288
|
return;
|
|
25285
25289
|
const z = `${M}${t.name}`, q = ((G = w.service.params) == null ? void 0 : G[0]) || {};
|
|
25286
25290
|
(W = (H = w.service.params) == null ? void 0 : H[1]) != null && W.filters || _.set(w.service.params, "[1].filters", {});
|
|
@@ -27958,7 +27962,7 @@ function getTypedConstantOption(e, t, o) {
|
|
|
27958
27962
|
};
|
|
27959
27963
|
}
|
|
27960
27964
|
function Input$1(e) {
|
|
27961
|
-
var H, W,
|
|
27965
|
+
var H, W, J;
|
|
27962
27966
|
const {
|
|
27963
27967
|
value: t = "",
|
|
27964
27968
|
onChange: o,
|
|
@@ -27988,10 +27992,10 @@ function Input$1(e) {
|
|
|
27988
27992
|
label: y("Constant"),
|
|
27989
27993
|
[$.value]: "$",
|
|
27990
27994
|
[$.label]: y("Constant")
|
|
27991
|
-
} : i ? getTypedConstantOption(j, i, $) : null, [j, i]), w = (H = M == null ? void 0 : M.component) != null ? H : NullComponent, N = Array.isArray(i) ? (
|
|
27995
|
+
} : i ? getTypedConstantOption(j, i, $) : null, [j, i]), w = (H = M == null ? void 0 : M.component) != null ? H : NullComponent, N = Array.isArray(i) ? (J = (W = i.find((X) => Array.isArray(X) && X[0] === j)) == null ? void 0 : W[1]) != null ? J : {} : {};
|
|
27992
27996
|
let z;
|
|
27993
27997
|
t == null ? a ? n && D ? z = ["$"] : z = [""] : n ? z = ["$"] : z = [" ", j] : z = n ? ["$"] : [" ", j], m && (z = ["$"]), useEffect(() => {
|
|
27994
|
-
const Z = M != null ? M : {}, { component:
|
|
27998
|
+
const Z = M != null ? M : {}, { component: X } = Z, Y = K(Z, ["component"]), Q = [
|
|
27995
27999
|
...a ? [
|
|
27996
28000
|
{
|
|
27997
28001
|
value: "",
|
|
@@ -28005,9 +28009,9 @@ function Input$1(e) {
|
|
|
28005
28009
|
].filter((te) => !te.deprecated || (R == null ? void 0 : R[0]) === te[$.value]);
|
|
28006
28010
|
k(Q);
|
|
28007
28011
|
}, [h, R, M, a]);
|
|
28008
|
-
const q = (
|
|
28012
|
+
const q = (X) => E(this, null, function* () {
|
|
28009
28013
|
var Q;
|
|
28010
|
-
const Y =
|
|
28014
|
+
const Y = X[X.length - 1];
|
|
28011
28015
|
if (!((Q = Y.children) != null && Q.length) && !Y.isLeaf && Y.loadChildren) {
|
|
28012
28016
|
let Z;
|
|
28013
28017
|
if (R && R.length >= 2) {
|
|
@@ -28020,27 +28024,27 @@ function Input$1(e) {
|
|
|
28020
28024
|
yield Y.loadChildren(Y, Z, R), k((te) => [...te]);
|
|
28021
28025
|
}
|
|
28022
28026
|
}), V = useCallback(
|
|
28023
|
-
(
|
|
28027
|
+
(X, Y) => {
|
|
28024
28028
|
var Q, Z, te;
|
|
28025
|
-
if (
|
|
28029
|
+
if (X[0] === "$") {
|
|
28026
28030
|
B(!0), R && o(null, Y);
|
|
28027
28031
|
return;
|
|
28028
28032
|
} else
|
|
28029
28033
|
B(!1);
|
|
28030
|
-
if (
|
|
28034
|
+
if (X[0] === "") {
|
|
28031
28035
|
o(null);
|
|
28032
28036
|
return;
|
|
28033
28037
|
}
|
|
28034
|
-
if (
|
|
28035
|
-
|
|
28038
|
+
if (X[0] === " ") {
|
|
28039
|
+
X[1] ? X[1] !== j && o((te = (Z = (Q = ConstantTypes[X[1]]) == null ? void 0 : Q.default) == null ? void 0 : Z.call(Q)) != null ? te : null, Y) : R && o(null, Y);
|
|
28036
28040
|
return;
|
|
28037
28041
|
}
|
|
28038
|
-
o(`{{${
|
|
28042
|
+
o(`{{${X.join(".")}}}`, Y);
|
|
28039
28043
|
},
|
|
28040
28044
|
[j, R, o]
|
|
28041
28045
|
), U = useCallback(() => {
|
|
28042
|
-
var
|
|
28043
|
-
if (B(!!n), (
|
|
28046
|
+
var X;
|
|
28047
|
+
if (B(!!n), (X = M == null ? void 0 : M.children) != null && X.length) {
|
|
28044
28048
|
const Y = M.children[0].default();
|
|
28045
28049
|
return o(Y);
|
|
28046
28050
|
}
|
|
@@ -28107,10 +28111,10 @@ function Input$1(e) {
|
|
|
28107
28111
|
"aria-label": "variable-tag",
|
|
28108
28112
|
style: { overflow: "hidden" },
|
|
28109
28113
|
className: cx("ant-input", { "ant-input-disabled": G }, f),
|
|
28110
|
-
children: /* @__PURE__ */ jsx(Tag, { contentEditable: !1, color: "blue", children: T.map((
|
|
28114
|
+
children: /* @__PURE__ */ jsx(Tag, { contentEditable: !1, color: "blue", children: T.map((X, Y) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
28111
28115
|
Y ? " / " : "",
|
|
28112
|
-
|
|
28113
|
-
] },
|
|
28116
|
+
X
|
|
28117
|
+
] }, X)) })
|
|
28114
28118
|
}
|
|
28115
28119
|
),
|
|
28116
28120
|
G ? null : /* @__PURE__ */ jsx(
|
|
@@ -29490,8 +29494,8 @@ const getVariableComponentWithScope = (e) => (t) => {
|
|
|
29490
29494
|
name: "dataTemplates",
|
|
29491
29495
|
Component: SchemaSettingsDataTemplates,
|
|
29492
29496
|
useVisible() {
|
|
29493
|
-
const { action: e } = useFormBlockContext();
|
|
29494
|
-
return !e;
|
|
29497
|
+
const { action: e } = useFormBlockContext(), t = useFieldSchema();
|
|
29498
|
+
return !e && (t == null ? void 0 : t["x-acl-action"].includes("create"));
|
|
29495
29499
|
},
|
|
29496
29500
|
useComponentProps() {
|
|
29497
29501
|
const { name: e } = useCollection_deprecated();
|
|
@@ -34172,7 +34176,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
34172
34176
|
), EMPTY$1 = "N/A", InternalRemoteSelect = withDynamicSchemaProps(
|
|
34173
34177
|
connect(
|
|
34174
34178
|
(e) => {
|
|
34175
|
-
var
|
|
34179
|
+
var J, X;
|
|
34176
34180
|
const W = e, {
|
|
34177
34181
|
fieldNames: t = {},
|
|
34178
34182
|
service: o = {},
|
|
@@ -34203,7 +34207,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
34203
34207
|
"dataSource",
|
|
34204
34208
|
"toOptionsItem",
|
|
34205
34209
|
"popupMatchSelectWidth"
|
|
34206
|
-
]), C = useDataSourceKey(), S = useDataSourceHeaders(m || C), [b, y] = useState(!1), F = useRef(!1), P = useFieldSchema(), k = ((
|
|
34210
|
+
]), C = useDataSourceKey(), S = useDataSourceHeaders(m || C), [b, y] = useState(!1), F = useRef(!1), P = useFieldSchema(), k = ((J = P["x-component-props"]) == null ? void 0 : J.addMode) === "quickAdd", { getField: T } = useCollection_deprecated(), A = useRef(null), { getCollectionJoinField: D, getInterface: B } = useCollectionManager_deprecated(), L = P["x-collection-field"] || P.name, O = T(L) || D(L), j = u || (O == null ? void 0 : O.target) && (t == null ? void 0 : t.label) && D(`${O.target}.${t.label}`), R = useMemo(() => {
|
|
34207
34211
|
var Y;
|
|
34208
34212
|
if (j != null && j.interface) {
|
|
34209
34213
|
const Q = B(j.interface), Z = ((Y = Q == null ? void 0 : Q.filterable) == null ? void 0 : Y.operators[0].value) || "$includes";
|
|
@@ -34247,7 +34251,7 @@ const getValues = (e, t) => castArray(e).filter((o) => o != null).map((o) => typ
|
|
|
34247
34251
|
params: v(x({
|
|
34248
34252
|
pageSize: 200
|
|
34249
34253
|
}, o == null ? void 0 : o.params), {
|
|
34250
|
-
filter: (
|
|
34254
|
+
filter: (X = o == null ? void 0 : o.params) == null ? void 0 : X.filter
|
|
34251
34255
|
})
|
|
34252
34256
|
}),
|
|
34253
34257
|
x({
|
|
@@ -37640,46 +37644,69 @@ const defaultModeToComponent = {
|
|
|
37640
37644
|
return /* @__PURE__ */ jsx(AssociationFieldModeContext.Provider, { value: i, children: e.children });
|
|
37641
37645
|
}, useAssociationFieldModeContext = () => React.useContext(AssociationFieldModeContext), AssociationFieldProvider = observer$1(
|
|
37642
37646
|
(e) => {
|
|
37643
|
-
var
|
|
37644
|
-
const t = useField(), o = useCollectionManager(), n = useFieldSchema();
|
|
37647
|
+
var g, f, C;
|
|
37648
|
+
const t = useField(), o = useCollectionManager(), n = useFieldSchema(), r = useAPIClient();
|
|
37645
37649
|
useSchemaComponentContext();
|
|
37646
|
-
const
|
|
37650
|
+
const i = ((g = n["x-component-props"]) == null ? void 0 : g.multiple) !== !1, a = ((f = n["x-component-props"]) == null ? void 0 : f.allowDissociate) !== !1, l = useMemo(
|
|
37647
37651
|
() => o.getCollectionField(n["x-collection-field"]),
|
|
37648
37652
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
37649
37653
|
[n["x-collection-field"], n.name]
|
|
37650
|
-
),
|
|
37654
|
+
), c = useMemo(
|
|
37651
37655
|
() => {
|
|
37652
|
-
var
|
|
37653
|
-
return ((
|
|
37656
|
+
var S;
|
|
37657
|
+
return ((S = o.getCollection(l == null ? void 0 : l.target)) == null ? void 0 : S.template) === "file";
|
|
37654
37658
|
},
|
|
37655
37659
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
37656
37660
|
[n["x-collection-field"]]
|
|
37657
|
-
),
|
|
37661
|
+
), u = useMemo(
|
|
37658
37662
|
() => {
|
|
37659
|
-
var
|
|
37660
|
-
return ((
|
|
37663
|
+
var S;
|
|
37664
|
+
return ((S = n["x-component-props"]) == null ? void 0 : S.mode) || (c ? "FileManager" : "Select");
|
|
37661
37665
|
},
|
|
37662
37666
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
37663
|
-
[(
|
|
37664
|
-
), [
|
|
37667
|
+
[(C = n["x-component-props"]) == null ? void 0 : C.mode]
|
|
37668
|
+
), [d, p] = useState(!t.readPretty), { loading: m, run: h } = useRequest(
|
|
37669
|
+
() => {
|
|
37670
|
+
const S = l.targetKey;
|
|
37671
|
+
if (!n.default || !["Picker", "Select"].includes(u) || !_.isObject(n.default))
|
|
37672
|
+
return Promise.reject(null);
|
|
37673
|
+
const b = Array.isArray(n.default) ? n.default.map((y) => y[S]) : n.default[S];
|
|
37674
|
+
return _.isUndefined(b) || _.isNil(b) || _.isNaN(b) ? Promise.reject(null) : r.request({
|
|
37675
|
+
resource: l.target,
|
|
37676
|
+
action: Array.isArray(b) ? "list" : "get",
|
|
37677
|
+
params: {
|
|
37678
|
+
filter: {
|
|
37679
|
+
[S]: b
|
|
37680
|
+
}
|
|
37681
|
+
}
|
|
37682
|
+
});
|
|
37683
|
+
},
|
|
37684
|
+
{
|
|
37685
|
+
manual: !0,
|
|
37686
|
+
onSuccess(S) {
|
|
37687
|
+
var b;
|
|
37688
|
+
t.initialValue = (b = S == null ? void 0 : S.data) == null ? void 0 : b.data;
|
|
37689
|
+
}
|
|
37690
|
+
}
|
|
37691
|
+
);
|
|
37665
37692
|
return useEffect(() => {
|
|
37666
|
-
var
|
|
37667
|
-
if (
|
|
37668
|
-
|
|
37693
|
+
var S;
|
|
37694
|
+
if (p(!0), !l) {
|
|
37695
|
+
p(!1);
|
|
37669
37696
|
return;
|
|
37670
37697
|
}
|
|
37671
|
-
if (t.value && t.form.__template && ["Nester", "SubTable", "PopoverNester"].includes(
|
|
37672
|
-
var
|
|
37673
|
-
return delete
|
|
37698
|
+
if (["Picker", "Select"].includes(u) && n.default && h(), t.value && t.form.__template && ["Nester", "SubTable", "PopoverNester"].includes(u) && (["belongsTo", "hasOne"].includes(l.type) ? ((S = t.value) != null && S[l.targetKey] && delete t.value[l.targetKey], t.value = x(x({}, t.initialValue), t.value)) : ["belongsToMany", "hasMany"].includes(l.type) && Array.isArray(t.value) && (t.value = t.value.map((b) => {
|
|
37699
|
+
var y;
|
|
37700
|
+
return delete b[l.targetKey], x(x({}, (y = t.initialValue) == null ? void 0 : y[0]), b);
|
|
37674
37701
|
}))), t.value !== null && t.value !== void 0) {
|
|
37675
|
-
["Nester", "PopoverNester"].includes(
|
|
37702
|
+
["Nester", "PopoverNester"].includes(u) && Array.isArray(t.value) && t.value.length === 0 && ["belongsToMany", "hasMany", "belongsToArray"].includes(l.type) && (t.value = [markRecordAsNew({})]), p(!1);
|
|
37676
37703
|
return;
|
|
37677
37704
|
}
|
|
37678
|
-
["Nester"].includes(
|
|
37679
|
-
}, [
|
|
37705
|
+
["Nester"].includes(u) && (["belongsTo", "hasOne"].includes(l.type) ? t.value = {} : ["belongsToMany", "hasMany", "belongsToArray"].includes(l.type) && (t.value = [markRecordAsNew({})])), u === "SubTable" && (t.value = []), p(!1);
|
|
37706
|
+
}, [u, l, t]), d || m ? null : l ? /* @__PURE__ */ jsx(
|
|
37680
37707
|
AssociationFieldContext.Provider,
|
|
37681
37708
|
{
|
|
37682
|
-
value: { options:
|
|
37709
|
+
value: { options: l, field: t, fieldSchema: n, allowMultiple: i, allowDissociate: a, currentMode: u },
|
|
37683
37710
|
children: e.children
|
|
37684
37711
|
}
|
|
37685
37712
|
) : null;
|
|
@@ -38552,7 +38579,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
38552
38579
|
}).join("-") : typeof m == "string" ? oe[m] : (ne = (m != null ? m : H)(oe)) == null ? void 0 : ne.toString();
|
|
38553
38580
|
},
|
|
38554
38581
|
[JSON.stringify(m), H]
|
|
38555
|
-
),
|
|
38582
|
+
), J = useMemo(() => (Array.isArray(b == null ? void 0 : b.value) ? b.value : []).filter(Boolean), [b == null ? void 0 : b.value, (ve = b == null ? void 0 : b.value) == null ? void 0 : ve.length]), X = useMemo(() => (oe) => {
|
|
38556
38583
|
const ne = useCallback((re) => {
|
|
38557
38584
|
var Fe, Pe, Ie, Ae, ke, Te;
|
|
38558
38585
|
if (!re.active || !re.over) {
|
|
@@ -38564,18 +38591,18 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
38564
38591
|
}, []);
|
|
38565
38592
|
return /* @__PURE__ */ jsx(DndContext, { onDragEnd: ne, children: /* @__PURE__ */ jsx("tbody", x({}, oe)) });
|
|
38566
38593
|
}, [b, B]);
|
|
38567
|
-
|
|
38594
|
+
X.displayName = "BodyWrapperComponent";
|
|
38568
38595
|
const Y = useMemo(() => ({
|
|
38569
38596
|
header: {
|
|
38570
38597
|
wrapper: HeaderWrapperComponent,
|
|
38571
38598
|
cell: HeaderCellComponent
|
|
38572
38599
|
},
|
|
38573
38600
|
body: {
|
|
38574
|
-
wrapper:
|
|
38601
|
+
wrapper: X,
|
|
38575
38602
|
row: BodyRowComponent,
|
|
38576
38603
|
cell: BodyCellComponent
|
|
38577
38604
|
}
|
|
38578
|
-
}), [
|
|
38605
|
+
}), [X]), Q = useMemo(() => p, [JSON.stringify(p)]), Z = useMemo(
|
|
38579
38606
|
() => ({
|
|
38580
38607
|
rowSelection: Q ? x({
|
|
38581
38608
|
type: "checkbox",
|
|
@@ -38650,8 +38677,8 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
38650
38677
|
x: "max-content"
|
|
38651
38678
|
}), []), le = useMemo(() => ({
|
|
38652
38679
|
x: "max-content",
|
|
38653
|
-
y:
|
|
38654
|
-
}), [ee, ie,
|
|
38680
|
+
y: J.length > 0 ? ee : void 0
|
|
38681
|
+
}), [ee, ie, J]), ge = useCallback(
|
|
38655
38682
|
(oe) => w.includes(oe[m]) ? U : "",
|
|
38656
38683
|
[w, U, JSON.stringify(m)]
|
|
38657
38684
|
), ue = useCallback(
|
|
@@ -38673,7 +38700,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
38673
38700
|
SortableWrapper: te,
|
|
38674
38701
|
tableSizeRefCallback: se,
|
|
38675
38702
|
defaultRowKey: H,
|
|
38676
|
-
dataSource:
|
|
38703
|
+
dataSource: J
|
|
38677
38704
|
}, S), Z), {
|
|
38678
38705
|
paginationProps: L,
|
|
38679
38706
|
components: Y,
|
|
@@ -38972,19 +38999,19 @@ AssociationSelect.Designer = function e() {
|
|
|
38972
38999
|
useEffect(() => {
|
|
38973
39000
|
c.readPretty !== u["x-read-pretty"] && (c.readPretty = !!u["x-read-pretty"]);
|
|
38974
39001
|
}, [u["x-read-pretty"]]);
|
|
38975
|
-
const L = B == null ? void 0 : B.map((
|
|
38976
|
-
field:
|
|
39002
|
+
const L = B == null ? void 0 : B.map((J) => J.startsWith("-") ? {
|
|
39003
|
+
field: J.substring(1),
|
|
38977
39004
|
direction: "desc"
|
|
38978
39005
|
} : {
|
|
38979
|
-
field:
|
|
39006
|
+
field: J,
|
|
38980
39007
|
direction: "asc"
|
|
38981
39008
|
});
|
|
38982
39009
|
c.readPretty || c.required;
|
|
38983
|
-
const O = A.filter((
|
|
38984
|
-
var
|
|
39010
|
+
const O = A.filter((J) => i(J)).map((J) => {
|
|
39011
|
+
var X;
|
|
38985
39012
|
return {
|
|
38986
|
-
value:
|
|
38987
|
-
label: f((
|
|
39013
|
+
value: J == null ? void 0 : J.name,
|
|
39014
|
+
label: f((X = J == null ? void 0 : J.uiSchema) == null ? void 0 : X.title) || (J == null ? void 0 : J.name)
|
|
38988
39015
|
};
|
|
38989
39016
|
});
|
|
38990
39017
|
let j = "editable";
|
|
@@ -39078,19 +39105,19 @@ AssociationSelect.Designer = function e() {
|
|
|
39078
39105
|
}
|
|
39079
39106
|
}
|
|
39080
39107
|
},
|
|
39081
|
-
onSubmit: (
|
|
39108
|
+
onSubmit: (J) => {
|
|
39082
39109
|
var te;
|
|
39083
|
-
const
|
|
39084
|
-
for (const ee of
|
|
39085
|
-
|
|
39110
|
+
const X = [], Y = (ee) => ee != null && !Number.isNaN(ee);
|
|
39111
|
+
for (const ee of J.rules)
|
|
39112
|
+
X.push(_.pickBy(ee, Y));
|
|
39086
39113
|
const Q = {
|
|
39087
39114
|
"x-uid": u["x-uid"]
|
|
39088
39115
|
};
|
|
39089
39116
|
if (["percent"].includes(b == null ? void 0 : b.interface))
|
|
39090
|
-
for (const ee of
|
|
39117
|
+
for (const ee of X)
|
|
39091
39118
|
(ee.maxValue || ee.minValue) && (ee.percentMode = !0), ee.percentFormat && (ee.percentFormats = !0);
|
|
39092
|
-
const Z = _.concat([], ((te = b == null ? void 0 : b.uiSchema) == null ? void 0 : te["x-validator"]) || [],
|
|
39093
|
-
c.validator = Z, u["x-validator"] =
|
|
39119
|
+
const Z = _.concat([], ((te = b == null ? void 0 : b.uiSchema) == null ? void 0 : te["x-validator"]) || [], X);
|
|
39120
|
+
c.validator = Z, u["x-validator"] = X, Q["x-validator"] = X, m.emit("patch", {
|
|
39094
39121
|
schema: Q
|
|
39095
39122
|
}), h();
|
|
39096
39123
|
}
|
|
@@ -39122,12 +39149,12 @@ AssociationSelect.Designer = function e() {
|
|
|
39122
39149
|
})
|
|
39123
39150
|
}
|
|
39124
39151
|
},
|
|
39125
|
-
onSubmit: (
|
|
39126
|
-
const
|
|
39152
|
+
onSubmit: (J) => {
|
|
39153
|
+
const X = {
|
|
39127
39154
|
"x-uid": u["x-uid"]
|
|
39128
39155
|
};
|
|
39129
|
-
c.value !==
|
|
39130
|
-
schema:
|
|
39156
|
+
c.value !== J.default && (c.value = J.default), u.default = J.default, X.default = J.default, m.emit("patch", {
|
|
39157
|
+
schema: X
|
|
39131
39158
|
}), h();
|
|
39132
39159
|
}
|
|
39133
39160
|
}
|
|
@@ -39138,9 +39165,9 @@ AssociationSelect.Designer = function e() {
|
|
|
39138
39165
|
title: d("Field component"),
|
|
39139
39166
|
options: y,
|
|
39140
39167
|
value: u["x-component"],
|
|
39141
|
-
onChange: (
|
|
39168
|
+
onChange: (J) => {
|
|
39142
39169
|
var Y, Q;
|
|
39143
|
-
const
|
|
39170
|
+
const X = {
|
|
39144
39171
|
name: b == null ? void 0 : b.name,
|
|
39145
39172
|
type: "void",
|
|
39146
39173
|
required: u.required,
|
|
@@ -39150,19 +39177,19 @@ AssociationSelect.Designer = function e() {
|
|
|
39150
39177
|
// 'x-designer': 'FormItem.Designer',
|
|
39151
39178
|
"x-toolbar": "FormItemSchemaToolbar",
|
|
39152
39179
|
"x-settings": "fieldSettings:FormItem",
|
|
39153
|
-
"x-component":
|
|
39180
|
+
"x-component": J,
|
|
39154
39181
|
"x-validator": u["x-validator"],
|
|
39155
39182
|
"x-collection-field": u["x-collection-field"],
|
|
39156
39183
|
"x-decorator-props": u["x-decorator-props"],
|
|
39157
39184
|
"x-component-props": x(x({}, (Y = b == null ? void 0 : b.uiSchema) == null ? void 0 : Y["x-component-props"]), u["x-component-props"])
|
|
39158
39185
|
};
|
|
39159
|
-
(Q = P == null ? void 0 : P.schemaInitialize) == null || Q.call(P,
|
|
39186
|
+
(Q = P == null ? void 0 : P.schemaInitialize) == null || Q.call(P, X, {
|
|
39160
39187
|
field: b,
|
|
39161
39188
|
block: "Form",
|
|
39162
39189
|
readPretty: c.readPretty,
|
|
39163
39190
|
action: p ? "get" : null,
|
|
39164
39191
|
targetCollection: r(b == null ? void 0 : b.target)
|
|
39165
|
-
}),
|
|
39192
|
+
}), J === "CollectionField" && (X.type = "string"), g("beforeBegin", divWrap(X), {
|
|
39166
39193
|
onSuccess: () => {
|
|
39167
39194
|
m.remove(null, {
|
|
39168
39195
|
removeParentsIfNoChildren: !0,
|
|
@@ -39180,12 +39207,12 @@ AssociationSelect.Designer = function e() {
|
|
|
39180
39207
|
{
|
|
39181
39208
|
title: d("Allow multiple"),
|
|
39182
39209
|
checked: ((q = u["x-component-props"]) == null ? void 0 : q.multiple) === void 0 ? !0 : u["x-component-props"].multiple,
|
|
39183
|
-
onChange: (
|
|
39184
|
-
const
|
|
39210
|
+
onChange: (J) => {
|
|
39211
|
+
const X = {
|
|
39185
39212
|
"x-uid": u["x-uid"]
|
|
39186
39213
|
};
|
|
39187
|
-
u["x-component-props"] = u["x-component-props"] || {}, c.componentProps = c.componentProps || {}, u["x-component-props"].multiple =
|
|
39188
|
-
schema:
|
|
39214
|
+
u["x-component-props"] = u["x-component-props"] || {}, c.componentProps = c.componentProps || {}, u["x-component-props"].multiple = J, c.componentProps.multiple = J, X["x-component-props"] = u["x-component-props"], m.emit("patch", {
|
|
39215
|
+
schema: X
|
|
39189
39216
|
}), h();
|
|
39190
39217
|
}
|
|
39191
39218
|
},
|
|
@@ -39197,8 +39224,8 @@ AssociationSelect.Designer = function e() {
|
|
|
39197
39224
|
collectionName: b == null ? void 0 : b.target,
|
|
39198
39225
|
defaultFilter: ((G = (U = (V = c.componentProps) == null ? void 0 : V.service) == null ? void 0 : U.params) == null ? void 0 : G.filter) || {},
|
|
39199
39226
|
form: l,
|
|
39200
|
-
onSubmit: ({ filter:
|
|
39201
|
-
|
|
39227
|
+
onSubmit: ({ filter: J }) => {
|
|
39228
|
+
J = removeNullCondition(J), _.set(c.componentProps, "service.params.filter", J), u["x-component-props"] = c.componentProps, m.emit("patch", {
|
|
39202
39229
|
schema: {
|
|
39203
39230
|
"x-uid": u["x-uid"],
|
|
39204
39231
|
"x-component-props": c.componentProps
|
|
@@ -39281,9 +39308,9 @@ AssociationSelect.Designer = function e() {
|
|
|
39281
39308
|
}
|
|
39282
39309
|
}
|
|
39283
39310
|
},
|
|
39284
|
-
onSubmit: ({ sort:
|
|
39285
|
-
const
|
|
39286
|
-
_.set(c.componentProps, "service.params.sort",
|
|
39311
|
+
onSubmit: ({ sort: J }) => {
|
|
39312
|
+
const X = J.map((Y) => Y.direction === "desc" ? `-${Y.field}` : Y.field);
|
|
39313
|
+
_.set(c.componentProps, "service.params.sort", X), u["x-component-props"] = c.componentProps, m.emit("patch", {
|
|
39287
39314
|
schema: {
|
|
39288
39315
|
"x-uid": u["x-uid"],
|
|
39289
39316
|
"x-component-props": c.componentProps
|
|
@@ -39302,26 +39329,26 @@ AssociationSelect.Designer = function e() {
|
|
|
39302
39329
|
{ label: d("Easy-reading"), value: "read-pretty" }
|
|
39303
39330
|
],
|
|
39304
39331
|
value: j,
|
|
39305
|
-
onChange: (
|
|
39306
|
-
const
|
|
39332
|
+
onChange: (J) => {
|
|
39333
|
+
const X = {
|
|
39307
39334
|
"x-uid": u["x-uid"]
|
|
39308
39335
|
};
|
|
39309
|
-
switch (
|
|
39336
|
+
switch (J) {
|
|
39310
39337
|
case "readonly": {
|
|
39311
|
-
u["x-read-pretty"] = !1, u["x-disabled"] = !0,
|
|
39338
|
+
u["x-read-pretty"] = !1, u["x-disabled"] = !0, X["x-read-pretty"] = !1, X["x-disabled"] = !0, c.readPretty = !1, c.disabled = !0;
|
|
39312
39339
|
break;
|
|
39313
39340
|
}
|
|
39314
39341
|
case "read-pretty": {
|
|
39315
|
-
u["x-read-pretty"] = !0, u["x-disabled"] = !1,
|
|
39342
|
+
u["x-read-pretty"] = !0, u["x-disabled"] = !1, X["x-read-pretty"] = !0, X["x-disabled"] = !1, c.readPretty = !0;
|
|
39316
39343
|
break;
|
|
39317
39344
|
}
|
|
39318
39345
|
default: {
|
|
39319
|
-
u["x-read-pretty"] = !1, u["x-disabled"] = !1,
|
|
39346
|
+
u["x-read-pretty"] = !1, u["x-disabled"] = !1, X["x-read-pretty"] = !1, X["x-disabled"] = !1, c.readPretty = !1, c.disabled = !1;
|
|
39320
39347
|
break;
|
|
39321
39348
|
}
|
|
39322
39349
|
}
|
|
39323
39350
|
m.emit("patch", {
|
|
39324
|
-
schema:
|
|
39351
|
+
schema: X
|
|
39325
39352
|
}), m.refresh();
|
|
39326
39353
|
}
|
|
39327
39354
|
},
|
|
@@ -39333,15 +39360,15 @@ AssociationSelect.Designer = function e() {
|
|
|
39333
39360
|
title: d("Title field"),
|
|
39334
39361
|
options: O,
|
|
39335
39362
|
value: (W = (H = c == null ? void 0 : c.componentProps) == null ? void 0 : H.fieldNames) == null ? void 0 : W.label,
|
|
39336
|
-
onChange: (
|
|
39363
|
+
onChange: (J) => {
|
|
39337
39364
|
var Q, Z;
|
|
39338
|
-
const
|
|
39365
|
+
const X = {
|
|
39339
39366
|
"x-uid": u["x-uid"]
|
|
39340
39367
|
}, Y = v(x(x({}, (Z = (Q = b == null ? void 0 : b.uiSchema) == null ? void 0 : Q["x-component-props"]) == null ? void 0 : Z.fieldNames), c.componentProps.fieldNames), {
|
|
39341
|
-
label:
|
|
39368
|
+
label: J
|
|
39342
39369
|
});
|
|
39343
|
-
c.componentProps.fieldNames = Y, u["x-component-props"] = u["x-component-props"] || {}, u["x-component-props"].fieldNames = Y,
|
|
39344
|
-
schema:
|
|
39370
|
+
c.componentProps.fieldNames = Y, u["x-component-props"] = u["x-component-props"] || {}, u["x-component-props"].fieldNames = Y, X["x-component-props"] = u["x-component-props"], m.emit("patch", {
|
|
39371
|
+
schema: X
|
|
39345
39372
|
}), m.refresh();
|
|
39346
39373
|
}
|
|
39347
39374
|
},
|
|
@@ -57138,9 +57165,9 @@ const ActionInitializerItem = (e) => {
|
|
|
57138
57165
|
}, M = (W) => {
|
|
57139
57166
|
L(W), d(W), p == null || p(W);
|
|
57140
57167
|
}, w = (W) => {
|
|
57141
|
-
var
|
|
57142
|
-
const
|
|
57143
|
-
(b ||
|
|
57168
|
+
var X;
|
|
57169
|
+
const J = (X = h == null ? void 0 : h[0]) == null ? void 0 : X.filter;
|
|
57170
|
+
(b || J) && g(v(x({}, h == null ? void 0 : h[0]), {
|
|
57144
57171
|
filter: void 0
|
|
57145
57172
|
})), y(!b), W.stopPropagation();
|
|
57146
57173
|
}, N = (W) => {
|