@nocobase/client 1.6.9 → 1.6.10
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
|
@@ -9161,7 +9161,7 @@ function addAppVersion(e, t) {
|
|
|
9161
9161
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
9162
9162
|
}), e;
|
|
9163
9163
|
}
|
|
9164
|
-
const name = "@nocobase/client", version = "1.6.
|
|
9164
|
+
const name = "@nocobase/client", version = "1.6.10", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
9165
9165
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
9166
9166
|
"@ant-design/cssinjs": "^1.11.1",
|
|
9167
9167
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -9183,9 +9183,9 @@ const name = "@nocobase/client", version = "1.6.9", license = "AGPL-3.0", main =
|
|
|
9183
9183
|
"@formily/reactive-react": "^2.2.27",
|
|
9184
9184
|
"@formily/shared": "^2.2.27",
|
|
9185
9185
|
"@formily/validator": "^2.2.27",
|
|
9186
|
-
"@nocobase/evaluators": "1.6.
|
|
9187
|
-
"@nocobase/sdk": "1.6.
|
|
9188
|
-
"@nocobase/utils": "1.6.
|
|
9186
|
+
"@nocobase/evaluators": "1.6.10",
|
|
9187
|
+
"@nocobase/sdk": "1.6.10",
|
|
9188
|
+
"@nocobase/utils": "1.6.10",
|
|
9189
9189
|
ahooks: "^3.7.2",
|
|
9190
9190
|
antd: "5.12.8",
|
|
9191
9191
|
"antd-style": "3.7.1",
|
|
@@ -10636,24 +10636,24 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10636
10636
|
const Q = D ? N : [];
|
|
10637
10637
|
_.isEqual(Q, R) || M(Q);
|
|
10638
10638
|
}, [D, N]);
|
|
10639
|
-
const
|
|
10639
|
+
const K = useCallback((Q) => {
|
|
10640
10640
|
if (m)
|
|
10641
|
-
return
|
|
10641
|
+
return W(Q);
|
|
10642
10642
|
if (Q.key)
|
|
10643
10643
|
return Q.key;
|
|
10644
10644
|
if (q.current.has(Q))
|
|
10645
10645
|
return q.current.get(Q);
|
|
10646
10646
|
const te = uid();
|
|
10647
10647
|
return q.current.set(Q, te), te;
|
|
10648
|
-
}, []),
|
|
10648
|
+
}, []), W = useCallback(
|
|
10649
10649
|
(Q) => {
|
|
10650
10650
|
var te;
|
|
10651
10651
|
return Array.isArray(m) ? m.map((oe) => {
|
|
10652
10652
|
var ie;
|
|
10653
10653
|
return ((ie = Q[oe]) == null ? void 0 : ie.toString()) || "";
|
|
10654
|
-
}).join("-") : typeof m == "string" ? Q[m] : (te = (m != null ? m :
|
|
10654
|
+
}).join("-") : typeof m == "string" ? Q[m] : (te = (m != null ? m : K)(Q)) == null ? void 0 : te.toString();
|
|
10655
10655
|
},
|
|
10656
|
-
[JSON.stringify(m),
|
|
10656
|
+
[JSON.stringify(m), K]
|
|
10657
10657
|
), X = useMemo(() => (Array.isArray(b) ? b : []).filter(Boolean), [b, b == null ? void 0 : b.length]), ee = useMemo(() => (Q) => {
|
|
10658
10658
|
const te = useCallback((oe) => {
|
|
10659
10659
|
var Se, ye, ve, Pe, Fe, Ie;
|
|
@@ -10708,7 +10708,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10708
10708
|
}),
|
|
10709
10709
|
children: [
|
|
10710
10710
|
/* @__PURE__ */ jsxs("div", { className: cls(Q ? "checked" : null, rowSelectCheckboxContentClass$1), children: [
|
|
10711
|
-
l && /* @__PURE__ */ jsx(SortHandle$2, { id:
|
|
10711
|
+
l && /* @__PURE__ */ jsx(SortHandle$2, { id: W(te) }),
|
|
10712
10712
|
c && /* @__PURE__ */ jsx(TableIndex$3, { index: oe })
|
|
10713
10713
|
] }),
|
|
10714
10714
|
E && /* @__PURE__ */ jsx(
|
|
@@ -10735,7 +10735,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10735
10735
|
c,
|
|
10736
10736
|
l,
|
|
10737
10737
|
v,
|
|
10738
|
-
|
|
10738
|
+
W,
|
|
10739
10739
|
E,
|
|
10740
10740
|
ne,
|
|
10741
10741
|
O,
|
|
@@ -10747,12 +10747,12 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10747
10747
|
return l ? React.createElement(
|
|
10748
10748
|
SortableContext$1,
|
|
10749
10749
|
{
|
|
10750
|
-
items: ((te = b == null ? void 0 : b.map) == null ? void 0 : te.call(b,
|
|
10750
|
+
items: ((te = b == null ? void 0 : b.map) == null ? void 0 : te.call(b, W)) || []
|
|
10751
10751
|
},
|
|
10752
10752
|
Q
|
|
10753
10753
|
) : React.createElement(React.Fragment, {}, Q);
|
|
10754
10754
|
},
|
|
10755
|
-
[l,
|
|
10755
|
+
[l, W]
|
|
10756
10756
|
// Don't put 'value' in dependencies, otherwise it will cause the dropdown component to disappear immediately when adding association fields to the table
|
|
10757
10757
|
), { height: le, tableSizeRefCallback: ue } = useTableSize(), fe = useMemo(() => ({
|
|
10758
10758
|
x: "max-content",
|
|
@@ -10779,7 +10779,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10779
10779
|
tableHeight: le,
|
|
10780
10780
|
SortableWrapper: se,
|
|
10781
10781
|
tableSizeRefCallback: ue,
|
|
10782
|
-
defaultRowKey:
|
|
10782
|
+
defaultRowKey: K,
|
|
10783
10783
|
dataSource: X
|
|
10784
10784
|
}, S), re), {
|
|
10785
10785
|
paginationProps: O,
|
|
@@ -12957,21 +12957,21 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
12957
12957
|
}
|
|
12958
12958
|
}
|
|
12959
12959
|
function b(T, z, L) {
|
|
12960
|
-
var E, q, G, U, H, J,
|
|
12961
|
-
if (T && (T = T.split("/"),
|
|
12960
|
+
var E, q, G, U, H, J, K, W, X, ee, Z, ne, re = z && z.split("/"), se = a.map, le = se && se["*"];
|
|
12961
|
+
if (T && (T = T.split("/"), K = T.length - 1, a.nodeIdCompat && jsSuffixRegExp.test(T[K]) && (T[K] = T[K].replace(jsSuffixRegExp, "")), T[0].charAt(0) === "." && re && (ne = re.slice(0, re.length - 1), T = ne.concat(T)), C(T), T = T.join("/")), L && se && (re || le)) {
|
|
12962
12962
|
G = T.split("/");
|
|
12963
12963
|
e:
|
|
12964
12964
|
for (U = G.length; U > 0; U -= 1) {
|
|
12965
12965
|
if (J = G.slice(0, U).join("/"), re) {
|
|
12966
12966
|
for (H = re.length; H > 0; H -= 1)
|
|
12967
12967
|
if (q = getOwn(se, re.slice(0, H).join("/")), q && (q = getOwn(q, J), q)) {
|
|
12968
|
-
|
|
12968
|
+
W = q, X = U;
|
|
12969
12969
|
break e;
|
|
12970
12970
|
}
|
|
12971
12971
|
}
|
|
12972
12972
|
!ee && le && getOwn(le, J) && (ee = getOwn(le, J), Z = U);
|
|
12973
12973
|
}
|
|
12974
|
-
!
|
|
12974
|
+
!W && ee && (W = ee, X = Z), W && (G.splice(0, X, W), T = G.join("/"));
|
|
12975
12975
|
}
|
|
12976
12976
|
return E = getOwn(a.pkgs, T), E || T;
|
|
12977
12977
|
}
|
|
@@ -12993,16 +12993,16 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
12993
12993
|
return L > -1 && (z = T.substring(0, L), T = T.substring(L + 1, T.length)), [z, T];
|
|
12994
12994
|
}
|
|
12995
12995
|
function F(T, z, L, E) {
|
|
12996
|
-
var q, G, U, H, J = null,
|
|
12997
|
-
return T || (X = !1, T = "_@r" + (g += 1)), H = y(T), J = H[0], T = H[1], J && (J = b(J,
|
|
12998
|
-
return b(Z,
|
|
12999
|
-
}) : ee = T.indexOf("!") === -1 ? b(T,
|
|
12996
|
+
var q, G, U, H, J = null, K = z ? z.name : null, W = T, X = !0, ee = "";
|
|
12997
|
+
return T || (X = !1, T = "_@r" + (g += 1)), H = y(T), J = H[0], T = H[1], J && (J = b(J, K, E), G = getOwn(p, J)), T && (J ? L ? ee = T : G && G.normalize ? ee = G.normalize(T, function(Z) {
|
|
12998
|
+
return b(Z, K, E);
|
|
12999
|
+
}) : ee = T.indexOf("!") === -1 ? b(T, K, E) : T : (ee = b(T, K, E), H = y(ee), J = H[0], ee = H[1], L = !0, q = o.nameToUrl(ee))), U = J && !G && !L ? "_unnormalized" + (f += 1) : "", {
|
|
13000
13000
|
prefix: J,
|
|
13001
13001
|
name: ee,
|
|
13002
13002
|
parentMap: z,
|
|
13003
13003
|
unnormalized: !!U,
|
|
13004
13004
|
url: q,
|
|
13005
|
-
originalName:
|
|
13005
|
+
originalName: W,
|
|
13006
13006
|
isDefine: X,
|
|
13007
13007
|
id: (J ? J + "!" + ee : ee) + U
|
|
13008
13008
|
};
|
|
@@ -13061,11 +13061,11 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13061
13061
|
var T, z, L = a.waitSeconds * 1e3, E = L && o.startTime + L < (/* @__PURE__ */ new Date()).getTime(), q = [], G = [], U = !1, H = !0;
|
|
13062
13062
|
if (!t) {
|
|
13063
13063
|
if (t = !0, eachProp(c, function(J) {
|
|
13064
|
-
var
|
|
13065
|
-
if (J.enabled && (
|
|
13064
|
+
var K = J.map, W = K.id;
|
|
13065
|
+
if (J.enabled && (K.isDefine || G.push(J), !J.error)) {
|
|
13066
13066
|
if (!J.inited && E)
|
|
13067
|
-
v(
|
|
13068
|
-
else if (!J.inited && J.fetched &&
|
|
13067
|
+
v(W) ? (z = !0, U = !0) : (q.push(W), S(W));
|
|
13068
|
+
else if (!J.inited && J.fetched && K.isDefine && (U = !0, !K.prefix))
|
|
13069
13069
|
return H = !1;
|
|
13070
13070
|
}
|
|
13071
13071
|
}), E && q.length)
|
|
@@ -13147,12 +13147,12 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13147
13147
|
callPlugin: function() {
|
|
13148
13148
|
var T = this.map, z = T.id, L = F(T.prefix);
|
|
13149
13149
|
this.depMaps.push(L), w(L, "defined", bind(this, function(E) {
|
|
13150
|
-
var q, G, U, H = getOwn(h, this.map.id), J = this.map.name,
|
|
13150
|
+
var q, G, U, H = getOwn(h, this.map.id), J = this.map.name, K = this.map.parentMap ? this.map.parentMap.name : null, W = o.makeRequire(T.parentMap, {
|
|
13151
13151
|
enableBuildCallback: !0
|
|
13152
13152
|
});
|
|
13153
13153
|
if (this.map.unnormalized) {
|
|
13154
13154
|
E.normalize && (J = E.normalize(J, function(X) {
|
|
13155
|
-
return b(X,
|
|
13155
|
+
return b(X, K, !0);
|
|
13156
13156
|
}) || ""), G = F(
|
|
13157
13157
|
T.prefix + "!" + J,
|
|
13158
13158
|
this.map.parentMap,
|
|
@@ -13200,8 +13200,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13200
13200
|
[z]
|
|
13201
13201
|
));
|
|
13202
13202
|
}
|
|
13203
|
-
re && (useInteractive = !0), this.depMaps.push(ne), o.completeLoad(Z),
|
|
13204
|
-
}), E.load(T.name,
|
|
13203
|
+
re && (useInteractive = !0), this.depMaps.push(ne), o.completeLoad(Z), W([Z], q);
|
|
13204
|
+
}), E.load(T.name, W, q, a);
|
|
13205
13205
|
})), o.enable(L, this), this.pluginMaps[L.id] = L;
|
|
13206
13206
|
},
|
|
13207
13207
|
enable: function() {
|
|
@@ -13400,9 +13400,9 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13400
13400
|
* internal API, not a public one. Use toUrl for the public API.
|
|
13401
13401
|
*/
|
|
13402
13402
|
nameToUrl: function(T, z, L) {
|
|
13403
|
-
var E, q, G, U, H, J,
|
|
13404
|
-
if (
|
|
13405
|
-
return o.nameToUrl(
|
|
13403
|
+
var E, q, G, U, H, J, K, W = getOwn(a.pkgs, T);
|
|
13404
|
+
if (W && (T = W), K = getOwn(h, T), K)
|
|
13405
|
+
return o.nameToUrl(K, z, L);
|
|
13406
13406
|
if (req.jsExtRegExp.test(T))
|
|
13407
13407
|
H = T + (z || "");
|
|
13408
13408
|
else {
|
|
@@ -17978,13 +17978,13 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
17978
17978
|
o || (t == null ? void 0 : t["x-initializer"]),
|
|
17979
17979
|
t == null ? void 0 : t["x-initializer-props"]
|
|
17980
17980
|
), $ = useGridRowContext(), T = useGridContext(), z = useMemo(() => {
|
|
17981
|
-
var
|
|
17981
|
+
var K;
|
|
17982
17982
|
return {
|
|
17983
17983
|
insertPosition: "afterEnd",
|
|
17984
|
-
wrap: ((
|
|
17985
|
-
Component: (
|
|
17984
|
+
wrap: ((K = $ == null ? void 0 : $.cols) == null ? void 0 : K.length) === 1 ? gridRowColWrap : void 0,
|
|
17985
|
+
Component: (W) => /* @__PURE__ */ jsx(
|
|
17986
17986
|
PlusOutlined,
|
|
17987
|
-
P(x({},
|
|
17987
|
+
P(x({}, W), {
|
|
17988
17988
|
role: "button",
|
|
17989
17989
|
"aria-label": y("schema-initializer"),
|
|
17990
17990
|
style: { cursor: "pointer", fontSize: 14 }
|
|
@@ -17992,29 +17992,29 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
17992
17992
|
)
|
|
17993
17993
|
};
|
|
17994
17994
|
}, [y, (J = $ == null ? void 0 : $.cols) == null ? void 0 : J.length]), L = useMemo(() => u === !1 || C === !1 ? null : /* @__PURE__ */ jsx(DragHandler, { children: /* @__PURE__ */ jsx(DragOutlined, { role: "button", "aria-label": y("drag-handler") }) }), [u, y, C]), E = useMemo(() => {
|
|
17995
|
-
var
|
|
17995
|
+
var K;
|
|
17996
17996
|
if (o === !1)
|
|
17997
17997
|
return null;
|
|
17998
17998
|
if (M)
|
|
17999
17999
|
return R(z);
|
|
18000
18000
|
if (T != null && T.InitializerComponent || T != null && T.renderSchemaInitializer)
|
|
18001
|
-
return T != null && T.InitializerComponent ? /* @__PURE__ */ jsx(T.InitializerComponent, x({}, z)) : (
|
|
18001
|
+
return T != null && T.InitializerComponent ? /* @__PURE__ */ jsx(T.InitializerComponent, x({}, z)) : (K = T.renderSchemaInitializer) == null ? void 0 : K.call(T, z);
|
|
18002
18002
|
}, [T, o, z, M, R]), q = useMemo(() => r !== !1 && B ? O() : null, [B, O, r]), G = useRef(null), U = "hidden";
|
|
18003
18003
|
useEffect(() => {
|
|
18004
|
-
const
|
|
18005
|
-
let
|
|
18006
|
-
for (;
|
|
18007
|
-
|
|
18008
|
-
const X = g ||
|
|
18004
|
+
const K = G.current;
|
|
18005
|
+
let W = K == null ? void 0 : K.parentElement;
|
|
18006
|
+
for (; W && W.clientHeight === 0; )
|
|
18007
|
+
W = W.parentElement;
|
|
18008
|
+
const X = g || W;
|
|
18009
18009
|
if (!X)
|
|
18010
18010
|
return;
|
|
18011
18011
|
function ee() {
|
|
18012
18012
|
var ne;
|
|
18013
|
-
|
|
18013
|
+
K && (K.classList.remove(U), (ne = e.onVisibleChange) == null || ne.call(e, !0));
|
|
18014
18014
|
}
|
|
18015
18015
|
function Z() {
|
|
18016
18016
|
var ne;
|
|
18017
|
-
|
|
18017
|
+
K && (K.classList.add(U), (ne = e.onVisibleChange) == null || ne.call(e, !1));
|
|
18018
18018
|
}
|
|
18019
18019
|
return X.addEventListener("mouseenter", ee), X.addEventListener("mouseleave", Z), () => {
|
|
18020
18020
|
X.removeEventListener("mouseenter", ee), X.removeEventListener("mouseleave", Z);
|
|
@@ -18160,14 +18160,14 @@ const SchemaToolbarErrorFallback = (e) => {
|
|
|
18160
18160
|
exceptInterfaces: U = [],
|
|
18161
18161
|
prefixFieldValue: H = "",
|
|
18162
18162
|
usePrefix: J = !1,
|
|
18163
|
-
dataSource:
|
|
18163
|
+
dataSource: K
|
|
18164
18164
|
} = T || {};
|
|
18165
18165
|
if (E.length - 1 > q)
|
|
18166
18166
|
return;
|
|
18167
18167
|
if (L[R])
|
|
18168
18168
|
return _.cloneDeep(L[R]);
|
|
18169
18169
|
M && typeof M == "string" && (M = [M]), $ && typeof $ == "string" && ($ = [$]);
|
|
18170
|
-
const
|
|
18170
|
+
const W = b(R, K), X = (ee = W == null ? void 0 : W.filter(
|
|
18171
18171
|
(Z) => Z.interface && !U.includes(Z.interface) && (G || M && M.includes(Z.type) || $ && $.includes(Z.interface) || (z && Z.target && Z.target !== R && Array.isArray(z) ? z.includes(Z.interface) : !1))
|
|
18172
18172
|
)) == null ? void 0 : ee.map((Z) => {
|
|
18173
18173
|
var re, se;
|
|
@@ -18177,7 +18177,7 @@ const SchemaToolbarErrorFallback = (e) => {
|
|
|
18177
18177
|
}, Z);
|
|
18178
18178
|
return z && Z.target && (ne.children = E.includes(Z.target) ? [] : I(Z.target, M, $, P(x({}, T), {
|
|
18179
18179
|
cached: L,
|
|
18180
|
-
dataSource:
|
|
18180
|
+
dataSource: K,
|
|
18181
18181
|
collectionNames: [...E, Z.target],
|
|
18182
18182
|
prefixFieldValue: J ? H ? `${H}.${Z.name}` : Z.name : "",
|
|
18183
18183
|
usePrefix: J
|
|
@@ -23270,7 +23270,7 @@ const useGetFilterOptions = () => {
|
|
|
23270
23270
|
}
|
|
23271
23271
|
}, i = (l, c, u) => {
|
|
23272
23272
|
const d = [];
|
|
23273
|
-
return l.forEach((p) => {
|
|
23273
|
+
return l == null || l.forEach((p) => {
|
|
23274
23274
|
const m = r(p, c, u);
|
|
23275
23275
|
m && d.push(m);
|
|
23276
23276
|
}), d;
|
|
@@ -23431,11 +23431,11 @@ const useGetFilterOptions = () => {
|
|
|
23431
23431
|
defaultFilter: ((L = (z = (T = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : T.service) == null ? void 0 : z.params) == null ? void 0 : L.filter) || {},
|
|
23432
23432
|
form: r,
|
|
23433
23433
|
onSubmit: ({ filter: U }) => {
|
|
23434
|
-
var J,
|
|
23434
|
+
var J, K;
|
|
23435
23435
|
U = removeNullCondition(U), set(l.componentProps, "service.params.filter", U), n["x-component-props"] = l.componentProps;
|
|
23436
|
-
const H = (
|
|
23437
|
-
l.form.query(`${H.concat("*." + n.name)}`).forEach((
|
|
23438
|
-
|
|
23436
|
+
const H = (K = l.path) == null ? void 0 : K.splice(((J = l.path) == null ? void 0 : J.length) - 1, 1);
|
|
23437
|
+
l.form.query(`${H.concat("*." + n.name)}`).forEach((W) => {
|
|
23438
|
+
W.componentProps.service = W.componentProps.service || { params: {} }, W.componentProps.service.params.filter = U;
|
|
23439
23439
|
}), d.emit("patch", {
|
|
23440
23440
|
schema: {
|
|
23441
23441
|
"x-uid": n["x-uid"],
|
|
@@ -23519,8 +23519,8 @@ const useGetFilterOptions = () => {
|
|
|
23519
23519
|
options: m,
|
|
23520
23520
|
value: p == null ? void 0 : p.label,
|
|
23521
23521
|
onChange: (U) => {
|
|
23522
|
-
var
|
|
23523
|
-
const H = P(x(x({}, (
|
|
23522
|
+
var K, W, X, ee, Z;
|
|
23523
|
+
const H = P(x(x({}, (W = (K = o == null ? void 0 : o.uiSchema) == null ? void 0 : K["x-component-props"]) == null ? void 0 : W.fieldNames), (X = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : X.fieldNames), {
|
|
23524
23524
|
label: U
|
|
23525
23525
|
});
|
|
23526
23526
|
_.set(n, "x-component-props.fieldNames", H);
|
|
@@ -23580,12 +23580,12 @@ const useGetFilterOptions = () => {
|
|
|
23580
23580
|
title: c("Required"),
|
|
23581
23581
|
checked: n.required,
|
|
23582
23582
|
onChange: (U) => {
|
|
23583
|
-
var
|
|
23583
|
+
var K, W;
|
|
23584
23584
|
const H = {
|
|
23585
23585
|
"x-uid": n["x-uid"]
|
|
23586
23586
|
};
|
|
23587
23587
|
n.required = U, H.required = U;
|
|
23588
|
-
const J = (
|
|
23588
|
+
const J = (W = l.path) == null ? void 0 : W.splice(((K = l.path) == null ? void 0 : K.length) - 1, 1);
|
|
23589
23589
|
l.form.query(`${J.concat("*." + n.name)}`).forEach((X) => {
|
|
23590
23590
|
X.required = U;
|
|
23591
23591
|
}), d.emit("patch", {
|
|
@@ -23606,10 +23606,10 @@ const useGetFilterOptions = () => {
|
|
|
23606
23606
|
],
|
|
23607
23607
|
value: k,
|
|
23608
23608
|
onChange: (U) => {
|
|
23609
|
-
var
|
|
23609
|
+
var K, W;
|
|
23610
23610
|
const H = {
|
|
23611
23611
|
"x-uid": n["x-uid"]
|
|
23612
|
-
}, J = (
|
|
23612
|
+
}, J = (W = l.path) == null ? void 0 : W.splice(((K = l.path) == null ? void 0 : K.length) - 1, 1);
|
|
23613
23613
|
switch (U) {
|
|
23614
23614
|
case "readonly": {
|
|
23615
23615
|
n["x-read-pretty"] = !1, n["x-disabled"] = !0, H["x-read-pretty"] = !1, H["x-disabled"] = !0, l.form.query(`${J.concat("*." + n.name)}`).forEach((X) => {
|
|
@@ -23643,10 +23643,10 @@ const useGetFilterOptions = () => {
|
|
|
23643
23643
|
{
|
|
23644
23644
|
fieldSchema: n,
|
|
23645
23645
|
onSubmitCallBack: (U) => {
|
|
23646
|
-
var J,
|
|
23647
|
-
const H = (
|
|
23648
|
-
l.form.query(`${H.concat("*." + n.name)}`).forEach((
|
|
23649
|
-
|
|
23646
|
+
var J, K;
|
|
23647
|
+
const H = (K = l.path) == null ? void 0 : K.splice(((J = l.path) == null ? void 0 : J.length) - 1, 1);
|
|
23648
|
+
l.form.query(`${H.concat("*." + n.name)}`).forEach((W) => {
|
|
23649
|
+
W.componentProps.service = W.componentProps.service || { params: {} }, W.componentProps.service.params.sort = U;
|
|
23650
23650
|
});
|
|
23651
23651
|
}
|
|
23652
23652
|
}
|
|
@@ -25427,7 +25427,7 @@ function getTypedConstantOption(e, t, n) {
|
|
|
25427
25427
|
};
|
|
25428
25428
|
}
|
|
25429
25429
|
function Input$1(e) {
|
|
25430
|
-
var H, J,
|
|
25430
|
+
var H, J, K;
|
|
25431
25431
|
const {
|
|
25432
25432
|
value: t = "",
|
|
25433
25433
|
onChange: n,
|
|
@@ -25457,10 +25457,10 @@ function Input$1(e) {
|
|
|
25457
25457
|
label: v("Constant"),
|
|
25458
25458
|
[M.value]: "$",
|
|
25459
25459
|
[M.label]: v("Constant")
|
|
25460
|
-
} : i ? getTypedConstantOption(B, i, M) : null, [B, i]), T = (H = $ == null ? void 0 : $.component) != null ? H : NullComponent, z = Array.isArray(i) ? (
|
|
25460
|
+
} : i ? getTypedConstantOption(B, i, M) : null, [B, i]), T = (H = $ == null ? void 0 : $.component) != null ? H : NullComponent, z = Array.isArray(i) ? (K = (J = i.find((W) => Array.isArray(W) && W[0] === B)) == null ? void 0 : J[1]) != null ? K : {} : {};
|
|
25461
25461
|
let L;
|
|
25462
25462
|
t == null ? a ? o && D ? L = ["$"] : L = [""] : o ? L = ["$"] : L = [" ", B] : L = o ? ["$"] : [" ", B], m && (L = ["$"]), useEffect(() => {
|
|
25463
|
-
const Z = $ != null ? $ : {}, { component:
|
|
25463
|
+
const Z = $ != null ? $ : {}, { component: W } = Z, X = Y(Z, ["component"]), ee = [
|
|
25464
25464
|
...a ? [
|
|
25465
25465
|
{
|
|
25466
25466
|
value: "",
|
|
@@ -25474,9 +25474,9 @@ function Input$1(e) {
|
|
|
25474
25474
|
].filter((ne) => !ne.deprecated || (R == null ? void 0 : R[0]) === ne[M.value]);
|
|
25475
25475
|
I(ee);
|
|
25476
25476
|
}, [h, R, $, a]);
|
|
25477
|
-
const E = (
|
|
25477
|
+
const E = (W) => V(this, null, function* () {
|
|
25478
25478
|
var ee;
|
|
25479
|
-
const X =
|
|
25479
|
+
const X = W[W.length - 1];
|
|
25480
25480
|
if (!((ee = X.children) != null && ee.length) && !X.isLeaf && X.loadChildren) {
|
|
25481
25481
|
let Z;
|
|
25482
25482
|
if (R && R.length >= 2) {
|
|
@@ -25489,27 +25489,27 @@ function Input$1(e) {
|
|
|
25489
25489
|
yield X.loadChildren(X, Z, R), I((ne) => [...ne]);
|
|
25490
25490
|
}
|
|
25491
25491
|
}), q = useCallback(
|
|
25492
|
-
(
|
|
25492
|
+
(W, X) => {
|
|
25493
25493
|
var ee, Z, ne;
|
|
25494
|
-
if (
|
|
25494
|
+
if (W[0] === "$") {
|
|
25495
25495
|
N(!0), R && n(null, X);
|
|
25496
25496
|
return;
|
|
25497
25497
|
} else
|
|
25498
25498
|
N(!1);
|
|
25499
|
-
if (
|
|
25499
|
+
if (W[0] === "") {
|
|
25500
25500
|
n(null);
|
|
25501
25501
|
return;
|
|
25502
25502
|
}
|
|
25503
|
-
if (
|
|
25504
|
-
|
|
25503
|
+
if (W[0] === " ") {
|
|
25504
|
+
W[1] ? W[1] !== B && n((ne = (Z = (ee = ConstantTypes[W[1]]) == null ? void 0 : ee.default) == null ? void 0 : Z.call(ee)) != null ? ne : null, X) : R && n(null, X);
|
|
25505
25505
|
return;
|
|
25506
25506
|
}
|
|
25507
|
-
n(`{{${
|
|
25507
|
+
n(`{{${W.join(".")}}}`, X);
|
|
25508
25508
|
},
|
|
25509
25509
|
[B, R, n]
|
|
25510
25510
|
), G = useCallback(() => {
|
|
25511
|
-
var
|
|
25512
|
-
if (N(!!o), (
|
|
25511
|
+
var W;
|
|
25512
|
+
if (N(!!o), (W = $ == null ? void 0 : $.children) != null && W.length) {
|
|
25513
25513
|
const X = $.children[0].default();
|
|
25514
25514
|
return n(X);
|
|
25515
25515
|
}
|
|
@@ -25576,10 +25576,10 @@ function Input$1(e) {
|
|
|
25576
25576
|
"aria-label": "variable-tag",
|
|
25577
25577
|
style: { overflow: "hidden" },
|
|
25578
25578
|
className: cx("ant-input", { "ant-input-disabled": U }, f),
|
|
25579
|
-
children: /* @__PURE__ */ jsx(Tag, { color: "blue", children: w.map((
|
|
25579
|
+
children: /* @__PURE__ */ jsx(Tag, { color: "blue", children: w.map((W, X) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
25580
25580
|
X ? " / " : "",
|
|
25581
|
-
|
|
25582
|
-
] },
|
|
25581
|
+
W
|
|
25582
|
+
] }, W)) })
|
|
25583
25583
|
}
|
|
25584
25584
|
),
|
|
25585
25585
|
U ? null : /* @__PURE__ */ jsx(
|
|
@@ -25829,8 +25829,8 @@ function TextArea(e) {
|
|
|
25829
25829
|
const { lastChild: U } = E;
|
|
25830
25830
|
if (U) {
|
|
25831
25831
|
q.setStartAfter(U), q.setEndAfter(U);
|
|
25832
|
-
const H = Array.from(E.childNodes), J = q.startContainer === E ? -1 : H.indexOf(U),
|
|
25833
|
-
D([J, q.startOffset,
|
|
25832
|
+
const H = Array.from(E.childNodes), J = q.startContainer === E ? -1 : H.indexOf(U), K = q.startContainer === E ? -1 : H.indexOf(U);
|
|
25833
|
+
D([J, q.startOffset, K, q.endOffset]);
|
|
25834
25834
|
}
|
|
25835
25835
|
}
|
|
25836
25836
|
}, [I]);
|
|
@@ -26181,12 +26181,13 @@ const getVariableComponentWithScope = (e) => (t) => {
|
|
|
26181
26181
|
}), [e]);
|
|
26182
26182
|
return { urlSchema: n, paramsSchema: i, openInNewWindowSchema: a, modeSchema: o, htmlSchema: r };
|
|
26183
26183
|
}, LinkMenuItem = () => {
|
|
26184
|
-
const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { componentCls: o, hashId: r } = useStyles$b(), { urlSchema: i, paramsSchema: a } = useURLAndHTMLSchema(), l = useParentRoute(), { createRoute: c } = useNocoBaseRoutes(), u = useCallback(() => V(void 0, null, function* () {
|
|
26185
|
-
const
|
|
26184
|
+
const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { componentCls: o, hashId: r } = useStyles$b(), { urlSchema: i, paramsSchema: a } = useURLAndHTMLSchema(), l = useParentRoute(), { createRoute: c } = useNocoBaseRoutes(), u = useDataSourceManager(), d = useCollectionManager(), p = useCallback(() => V(void 0, null, function* () {
|
|
26185
|
+
const m = yield FormDialog(
|
|
26186
26186
|
e("Add link"),
|
|
26187
26187
|
() => {
|
|
26188
|
-
|
|
26189
|
-
|
|
26188
|
+
var S;
|
|
26189
|
+
const b = createMemoryHistory();
|
|
26190
|
+
return /* @__PURE__ */ jsx(DataSourceManagerProvider, { dataSourceManager: u, children: /* @__PURE__ */ jsx(CollectionManagerProvider, { instance: d, dataSource: (S = d == null ? void 0 : d.dataSource) == null ? void 0 : S.key, children: /* @__PURE__ */ jsx(Router, { location: b.location, navigator: b, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: t.scope, components: x({}, t.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
|
|
26190
26191
|
SchemaComponent,
|
|
26191
26192
|
{
|
|
26192
26193
|
schema: {
|
|
@@ -26207,24 +26208,24 @@ const getVariableComponentWithScope = (e) => (t) => {
|
|
|
26207
26208
|
}
|
|
26208
26209
|
}
|
|
26209
26210
|
}
|
|
26210
|
-
) }) }) });
|
|
26211
|
+
) }) }) }) }) });
|
|
26211
26212
|
},
|
|
26212
26213
|
n
|
|
26213
26214
|
).open({
|
|
26214
26215
|
initialValues: {}
|
|
26215
|
-
}), { title:
|
|
26216
|
+
}), { title: h, href: g, params: f, icon: C } = m;
|
|
26216
26217
|
yield c({
|
|
26217
26218
|
type: NocoBaseDesktopRouteType.link,
|
|
26218
|
-
title:
|
|
26219
|
-
icon:
|
|
26219
|
+
title: h,
|
|
26220
|
+
icon: C,
|
|
26220
26221
|
parentId: l == null ? void 0 : l.id,
|
|
26221
26222
|
options: {
|
|
26222
|
-
href:
|
|
26223
|
-
params:
|
|
26223
|
+
href: g,
|
|
26224
|
+
params: f
|
|
26224
26225
|
}
|
|
26225
26226
|
});
|
|
26226
26227
|
}), [t.components, t.scope, e, n]);
|
|
26227
|
-
return /* @__PURE__ */ jsx(SchemaInitializerItem, { title: e("Link"), onClick:
|
|
26228
|
+
return /* @__PURE__ */ jsx(SchemaInitializerItem, { title: e("Link"), onClick: p, className: `${o} ${r}` });
|
|
26228
26229
|
}, useInsertPageSchema = () => {
|
|
26229
26230
|
const e = useAPIClient();
|
|
26230
26231
|
return useCallback(
|
|
@@ -27371,7 +27372,7 @@ function useCollectValuesToSubmit() {
|
|
|
27371
27372
|
const { value: O } = (yield p == null ? void 0 : p.parseVariable(N, m)) || {};
|
|
27372
27373
|
O != null && (S[D] = transformVariableValue(O, { targetCollectionField: j }));
|
|
27373
27374
|
} else
|
|
27374
|
-
N
|
|
27375
|
+
N !== "" && (S[D] = N);
|
|
27375
27376
|
}));
|
|
27376
27377
|
if (yield Promise.all(v), (I = u == null ? void 0 : u["x-component-props"]) == null ? void 0 : I.addChild) {
|
|
27377
27378
|
const D = a();
|
|
@@ -27445,12 +27446,12 @@ const useCreateActionProps = () => {
|
|
|
27445
27446
|
skipValidator: j,
|
|
27446
27447
|
triggerWorkflows: O
|
|
27447
27448
|
} = (z = l == null ? void 0 : l["x-action-settings"]) != null ? z : {}, B = (L = i == null ? void 0 : i["x-component-props"]) == null ? void 0 : L.addChild, { successMessage: R } = D || {}, M = {}, $ = Object.keys(k).map((H) => V(this, null, function* () {
|
|
27448
|
-
const J = k[H],
|
|
27449
|
+
const J = k[H], K = d(H);
|
|
27449
27450
|
if (isVariable$1(J)) {
|
|
27450
|
-
const { value:
|
|
27451
|
-
|
|
27451
|
+
const { value: W } = (yield C == null ? void 0 : C.parseVariable(J, b)) || {};
|
|
27452
|
+
W && (M[H] = transformVariableValue(W, { targetCollectionField: K }));
|
|
27452
27453
|
} else
|
|
27453
|
-
J
|
|
27454
|
+
J !== "" && (M[H] = J);
|
|
27454
27455
|
}));
|
|
27455
27456
|
yield Promise.all($), j || (yield e.submit());
|
|
27456
27457
|
const T = getFormValues({
|
|
@@ -27593,7 +27594,7 @@ const useCreateActionProps = () => {
|
|
|
27593
27594
|
const { value: z } = (yield u == null ? void 0 : u.parseVariable($, d)) || {};
|
|
27594
27595
|
z && (N[M] = transformVariableValue(z, { targetCollectionField: T }));
|
|
27595
27596
|
} else
|
|
27596
|
-
$
|
|
27597
|
+
$ !== "" && (N[M] = $);
|
|
27597
27598
|
}));
|
|
27598
27599
|
yield Promise.all(j), v === !1 && (yield l.submit()), yield e.update({
|
|
27599
27600
|
filterByTk: o,
|
|
@@ -27630,7 +27631,7 @@ const useCreateActionProps = () => {
|
|
|
27630
27631
|
const { value: U } = (yield g == null ? void 0 : g.parseVariable(q, b)) || {};
|
|
27631
27632
|
U && ($[E] = transformVariableValue(U, { targetCollectionField: G }));
|
|
27632
27633
|
} else
|
|
27633
|
-
q
|
|
27634
|
+
q !== "" && ($[E] = q);
|
|
27634
27635
|
}));
|
|
27635
27636
|
yield Promise.all(T), (M === "previous" || !M && O !== !0) && (S == null || S(!1)), h.confirm({
|
|
27636
27637
|
title: p("Bulk update"),
|
|
@@ -27653,7 +27654,7 @@ const useCreateActionProps = () => {
|
|
|
27653
27654
|
q.filter || (q.forceUpdate = !0);
|
|
27654
27655
|
try {
|
|
27655
27656
|
yield t.update(q);
|
|
27656
|
-
} catch (
|
|
27657
|
+
} catch (K) {
|
|
27657
27658
|
} finally {
|
|
27658
27659
|
m.data.loading = !1;
|
|
27659
27660
|
}
|
|
@@ -27687,7 +27688,7 @@ const useCreateActionProps = () => {
|
|
|
27687
27688
|
I !== !0 && R === "customize:form:request" && (yield i.submit());
|
|
27688
27689
|
const M = k.headers ? JSON.parse(k.headers) : {}, $ = k.params ? JSON.parse(k.params) : {}, T = k.data ? JSON.parse(k.data) : {};
|
|
27689
27690
|
if (R === "customize:form:request" && ["POST", "PUT", "PATCH"].includes(k.method)) {
|
|
27690
|
-
const H = a.map((
|
|
27691
|
+
const H = a.map((K) => K.name), J = getFormValues({
|
|
27691
27692
|
filterByTk: n,
|
|
27692
27693
|
field: c,
|
|
27693
27694
|
form: i,
|
|
@@ -27737,7 +27738,7 @@ const useCreateActionProps = () => {
|
|
|
27737
27738
|
const { value: J } = (yield b == null ? void 0 : b.parseVariable(U, S)) || {};
|
|
27738
27739
|
J && (T[G] = transformVariableValue(J, { targetCollectionField: H }));
|
|
27739
27740
|
} else
|
|
27740
|
-
U
|
|
27741
|
+
U !== "" && (T[G] = U);
|
|
27741
27742
|
}));
|
|
27742
27743
|
yield Promise.all(z), N || (yield e.submit());
|
|
27743
27744
|
const L = u.map((G) => G.name), E = getFormValues({
|
|
@@ -27988,8 +27989,8 @@ const useCreateActionProps = () => {
|
|
|
27988
27989
|
(R) => {
|
|
27989
27990
|
const { targets: M, uid: $ } = findFilterTargets(t);
|
|
27990
27991
|
o().forEach((T) => {
|
|
27991
|
-
var U, H, J,
|
|
27992
|
-
if (!M.find((
|
|
27992
|
+
var U, H, J, K;
|
|
27993
|
+
if (!M.find((W) => W.uid === T.uid))
|
|
27993
27994
|
return;
|
|
27994
27995
|
const L = `${$}${t.name}`, E = ((U = T.service.params) == null ? void 0 : U[0]) || {};
|
|
27995
27996
|
(J = (H = T.service.params) == null ? void 0 : H[1]) != null && J.filters || _.set(T.service.params, "[1].filters", {});
|
|
@@ -27999,7 +28000,7 @@ const useCreateActionProps = () => {
|
|
|
27999
28000
|
[S]: R
|
|
28000
28001
|
};
|
|
28001
28002
|
else {
|
|
28002
|
-
if ((
|
|
28003
|
+
if ((K = T.clearSelection) == null || K.call(T), T.dataLoadingMode === "manual")
|
|
28003
28004
|
return T.clearData();
|
|
28004
28005
|
delete q[L];
|
|
28005
28006
|
}
|
|
@@ -34868,6 +34869,9 @@ const tableBlockSettings = new SchemaSettings({
|
|
|
34868
34869
|
return {
|
|
34869
34870
|
name: "allowMultiple",
|
|
34870
34871
|
type: "switch",
|
|
34872
|
+
useVisible() {
|
|
34873
|
+
return useIsAssociationField();
|
|
34874
|
+
},
|
|
34871
34875
|
useComponentProps() {
|
|
34872
34876
|
var u;
|
|
34873
34877
|
const { t: n } = useTranslation(), o = useField(), { fieldSchema: r } = useColumnSchema$1(), i = useFieldSchema(), a = r || i, { dn: l, refresh: c } = useDesignable();
|
|
@@ -35215,9 +35219,9 @@ const tableBlockSettings = new SchemaSettings({
|
|
|
35215
35219
|
}), H["x-component-props"] = n["x-component-props"], o.componentProps = n["x-component-props"];
|
|
35216
35220
|
const J = o.path.entire.split(".");
|
|
35217
35221
|
J.pop();
|
|
35218
|
-
const
|
|
35219
|
-
o.query(`${
|
|
35220
|
-
|
|
35222
|
+
const K = J.join(".");
|
|
35223
|
+
o.query(`${K}.*[0:].${n.name}`).forEach((W) => {
|
|
35224
|
+
W.props.name === n.name && W.setComponentProps({
|
|
35221
35225
|
_maxDate: I(U == null ? void 0 : U._maxDate),
|
|
35222
35226
|
_minDate: I(U == null ? void 0 : U._minDate)
|
|
35223
35227
|
});
|
|
@@ -36557,12 +36561,6 @@ const useBuiltInVariables = () => {
|
|
|
36557
36561
|
defaultValue: a
|
|
36558
36562
|
}
|
|
36559
36563
|
], [t, e, o, a, r, i]) };
|
|
36560
|
-
}, cache = /* @__PURE__ */ new Map(), cacheLazyLoadedValues = (e, t, n) => {
|
|
36561
|
-
const o = cache.get(e);
|
|
36562
|
-
o ? o[t] = n : cache.set(e, { [t]: n });
|
|
36563
|
-
}, getCachedLazyLoadedValues = (e, t) => {
|
|
36564
|
-
const n = cache.get(e);
|
|
36565
|
-
return n == null ? void 0 : n[t];
|
|
36566
36564
|
}, filterEmptyValues = (e) => Array.isArray(e) ? e.filter((t) => t === 0 || t === !1 || t) : e, TYPE_TO_ACTION = {
|
|
36567
36565
|
hasMany: "list?pageSize=9999",
|
|
36568
36566
|
belongsTo: "get",
|
|
@@ -36605,7 +36603,7 @@ const variablesStore = {}, getFieldPath = (e, t) => {
|
|
|
36605
36603
|
const T = v[$], z = v.slice(0, $ + 1).join("."), { fieldPath: L } = getFieldPath(z, F), E = r(L, k), q = (M = i(N, k)) == null ? void 0 : M.getPrimaryKey();
|
|
36606
36604
|
if (Array.isArray(I)) {
|
|
36607
36605
|
const G = I.map((U) => {
|
|
36608
|
-
if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[T]
|
|
36606
|
+
if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[T]) && (U == null ? void 0 : U[q]) != null && E != null && E.target) {
|
|
36609
36607
|
const H = `/${N}/${U[E.sourceKey || q]}/${T}:${getAction(E.type)}`;
|
|
36610
36608
|
if (hasRequested(H))
|
|
36611
36609
|
return getRequested(H);
|
|
@@ -36615,17 +36613,13 @@ const variablesStore = {}, getFieldPath = (e, t) => {
|
|
|
36615
36613
|
params: {
|
|
36616
36614
|
appends: S == null ? void 0 : S.appends
|
|
36617
36615
|
}
|
|
36618
|
-
}).then((
|
|
36619
|
-
clearRequested(H);
|
|
36620
|
-
const K = W.data.data;
|
|
36621
|
-
return cacheLazyLoadedValues(U, z, K), K;
|
|
36622
|
-
});
|
|
36616
|
+
}).then((K) => (clearRequested(H), K.data.data));
|
|
36623
36617
|
return stashRequested(H, J), J;
|
|
36624
36618
|
}
|
|
36625
|
-
return
|
|
36619
|
+
return U == null ? void 0 : U[T];
|
|
36626
36620
|
});
|
|
36627
36621
|
I = removeThroughCollectionFields(_.flatten(yield Promise.all(G)), E);
|
|
36628
|
-
} else if (!(S != null && S.doNotRequest) && shouldToRequest(I[T]
|
|
36622
|
+
} else if (!(S != null && S.doNotRequest) && shouldToRequest(I[T]) && I[q] != null && (E != null && E.target)) {
|
|
36629
36623
|
const G = `/${N}/${I[E.sourceKey || q]}/${T}:${getAction(E.type)}`;
|
|
36630
36624
|
let U = null;
|
|
36631
36625
|
if (hasRequested(G))
|
|
@@ -36641,12 +36635,9 @@ const variablesStore = {}, getFieldPath = (e, t) => {
|
|
|
36641
36635
|
stashRequested(G, J), U = yield J, clearRequested(G);
|
|
36642
36636
|
}
|
|
36643
36637
|
const H = U.data.data;
|
|
36644
|
-
|
|
36638
|
+
I = removeThroughCollectionFields(H, E);
|
|
36645
36639
|
} else
|
|
36646
|
-
I = removeThroughCollectionFields(
|
|
36647
|
-
getCachedLazyLoadedValues(I, z) || getValuesByPath(I, T),
|
|
36648
|
-
E
|
|
36649
|
-
);
|
|
36640
|
+
I = removeThroughCollectionFields(getValuesByPath(I, T), E);
|
|
36650
36641
|
E != null && E.target && (N = E.target);
|
|
36651
36642
|
}
|
|
36652
36643
|
const B = a(
|
|
@@ -36738,13 +36729,13 @@ VariablesProvider.displayName = "VariablesProvider";
|
|
|
36738
36729
|
const VariablesProvider$1 = VariablesProvider;
|
|
36739
36730
|
function shouldToRequest(e, t, n) {
|
|
36740
36731
|
let o = !1;
|
|
36741
|
-
return
|
|
36732
|
+
return untracked(() => {
|
|
36742
36733
|
if (JSON.stringify(e) === "[{}]" || JSON.stringify(e) === "{}") {
|
|
36743
36734
|
o = !0;
|
|
36744
36735
|
return;
|
|
36745
36736
|
}
|
|
36746
36737
|
o = _.isEmpty(e);
|
|
36747
|
-
}), o
|
|
36738
|
+
}), o;
|
|
36748
36739
|
}
|
|
36749
36740
|
function mergeCtxWithLocalVariables(e, t) {
|
|
36750
36741
|
return e = x({}, e), t == null || t.forEach((n) => {
|
|
@@ -37093,10 +37084,10 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37093
37084
|
useEffect(() => {
|
|
37094
37085
|
F.stateOfLinkageRules && setInitialActionState(F), F.stateOfLinkageRules = {}, N.filter((H) => !H.disabled).forEach((H) => {
|
|
37095
37086
|
var J;
|
|
37096
|
-
(J = H.actions) == null || J.forEach((
|
|
37087
|
+
(J = H.actions) == null || J.forEach((K) => {
|
|
37097
37088
|
linkageAction(
|
|
37098
37089
|
{
|
|
37099
|
-
operator:
|
|
37090
|
+
operator: K.operator,
|
|
37100
37091
|
field: F,
|
|
37101
37092
|
condition: H.condition,
|
|
37102
37093
|
variables: B,
|
|
@@ -37205,16 +37196,16 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37205
37196
|
"setSubmitted",
|
|
37206
37197
|
"getAriaLabel",
|
|
37207
37198
|
"parentRecordData"
|
|
37208
|
-
]), [R, M] = useState(!1), { wrapSSR: $, componentCls: T, hashId: z } = useStyles$8(), [L, E] = useState(!1), q = o["x-toolbar-props"] || o["x-designer-props"], G = (me = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : me.openMode, U = (he = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : he.openSize, H = (ge = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ge.refreshDataBlockRequest, { modal: J } = App.useApp(),
|
|
37199
|
+
]), [R, M] = useState(!1), { wrapSSR: $, componentCls: T, hashId: z } = useStyles$8(), [L, E] = useState(!1), q = o["x-toolbar-props"] || o["x-designer-props"], G = (me = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : me.openMode, U = (he = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : he.openSize, H = (ge = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ge.refreshDataBlockRequest, { modal: J } = App.useApp(), K = useForm(), W = useACLActionParamsContext(), { run: X, element: ee, disabled: Z } = (I == null ? void 0 : I(w)) || {}, ne = K.disabled || i.disabled || ((de = i.data) == null ? void 0 : de.disabled) || F || Z, re = useMemo(() => {
|
|
37209
37200
|
var ce;
|
|
37210
37201
|
return P(x({}, y), {
|
|
37211
|
-
opacity: r && (((ce = i == null ? void 0 : i.data) == null ? void 0 : ce.hidden) || !
|
|
37202
|
+
opacity: r && (((ce = i == null ? void 0 : i.data) == null ? void 0 : ce.hidden) || !W) && 0.1,
|
|
37212
37203
|
color: ne ? "rgba(0, 0, 0, 0.25)" : y == null ? void 0 : y.color
|
|
37213
37204
|
});
|
|
37214
|
-
}, [
|
|
37205
|
+
}, [W, r, (pe = i == null ? void 0 : i.data) == null ? void 0 : pe.hidden, y, ne]), se = {
|
|
37215
37206
|
designable: r,
|
|
37216
37207
|
field: i,
|
|
37217
|
-
aclCtx:
|
|
37208
|
+
aclCtx: W,
|
|
37218
37209
|
icon: a,
|
|
37219
37210
|
loading: l,
|
|
37220
37211
|
disabled: ne,
|
|
@@ -37906,7 +37897,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
37906
37897
|
CustomDropdownRender: d,
|
|
37907
37898
|
optionFilter: p,
|
|
37908
37899
|
dataSource: m,
|
|
37909
|
-
toOptionsItem: h = (
|
|
37900
|
+
toOptionsItem: h = (K) => K,
|
|
37910
37901
|
popupMatchSelectWidth: g = !1
|
|
37911
37902
|
} = U, f = Y(U, [
|
|
37912
37903
|
"fieldNames",
|
|
@@ -37924,18 +37915,18 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
37924
37915
|
"toOptionsItem",
|
|
37925
37916
|
"popupMatchSelectWidth"
|
|
37926
37917
|
]), C = useDataSourceKey(), b = useDataSourceHeaders(m || C), S = useRef(!1), v = useFieldSchema(), y = ((H = v["x-component-props"]) == null ? void 0 : H.addMode) === "quickAdd", { getField: F } = useCollection_deprecated(), I = useRef(null), { getCollectionJoinField: w, getInterface: k } = useCollectionManager_deprecated(), D = v["x-collection-field"] || v.name, N = F(D) || w(D), j = u || (N == null ? void 0 : N.target) && (t == null ? void 0 : t.label) && w(`${N.target}.${t.label}`), O = useMemo(() => {
|
|
37927
|
-
var
|
|
37918
|
+
var K;
|
|
37928
37919
|
if (j != null && j.interface) {
|
|
37929
|
-
const
|
|
37920
|
+
const W = k(j.interface), X = ((K = W == null ? void 0 : W.filterable) == null ? void 0 : K.operators[0].value) || "$includes";
|
|
37930
37921
|
return j.type === "string" ? "$includes" : X;
|
|
37931
37922
|
}
|
|
37932
37923
|
return "$includes";
|
|
37933
37924
|
}, [j]), B = useCompile(), R = useCallback(
|
|
37934
|
-
(
|
|
37925
|
+
(K) => {
|
|
37935
37926
|
try {
|
|
37936
|
-
return
|
|
37927
|
+
return K.filter((W) => ["number", "string"].includes(typeof W[t.value]) || !W[t.value]).map((W) => {
|
|
37937
37928
|
var ee;
|
|
37938
|
-
let X = B(
|
|
37929
|
+
let X = B(W[t.label]);
|
|
37939
37930
|
if ((ee = j == null ? void 0 : j.uiSchema) != null && ee.enum)
|
|
37940
37931
|
if (Array.isArray(X))
|
|
37941
37932
|
X = X.map((Z, ne) => {
|
|
@@ -37948,14 +37939,14 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
37948
37939
|
}
|
|
37949
37940
|
return (j == null ? void 0 : j.type) === "date" && (X = dayjs(X).format("YYYY-MM-DD")), c ? c({
|
|
37950
37941
|
[t.label]: X || EMPTY$1,
|
|
37951
|
-
[t.value]:
|
|
37952
|
-
}) : P(x({},
|
|
37942
|
+
[t.value]: W[t.value]
|
|
37943
|
+
}) : P(x({}, W), {
|
|
37953
37944
|
[t.label]: X || EMPTY$1,
|
|
37954
|
-
[t.value]:
|
|
37945
|
+
[t.value]: W[t.value]
|
|
37955
37946
|
});
|
|
37956
37947
|
}).filter(Boolean);
|
|
37957
|
-
} catch (
|
|
37958
|
-
return console.error(
|
|
37948
|
+
} catch (W) {
|
|
37949
|
+
return console.error(W), K;
|
|
37959
37950
|
}
|
|
37960
37951
|
},
|
|
37961
37952
|
[j == null ? void 0 : j.uiSchema, t]
|
|
@@ -37992,25 +37983,25 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
37992
37983
|
useEffect(() => {
|
|
37993
37984
|
S.current && $();
|
|
37994
37985
|
}, [z]);
|
|
37995
|
-
const E = (
|
|
37996
|
-
var
|
|
37986
|
+
const E = (K) => V(void 0, null, function* () {
|
|
37987
|
+
var W;
|
|
37997
37988
|
$({
|
|
37998
37989
|
filter: mergeFilter([
|
|
37999
|
-
|
|
37990
|
+
K ? {
|
|
38000
37991
|
[t.label]: {
|
|
38001
|
-
[O]:
|
|
37992
|
+
[O]: K
|
|
38002
37993
|
}
|
|
38003
37994
|
} : {},
|
|
38004
|
-
(
|
|
37995
|
+
(W = n == null ? void 0 : n.params) == null ? void 0 : W.filter
|
|
38005
37996
|
])
|
|
38006
|
-
}), I.current =
|
|
37997
|
+
}), I.current = K;
|
|
38007
37998
|
}), q = useMemo(() => {
|
|
38008
37999
|
var ee;
|
|
38009
|
-
const
|
|
38000
|
+
const K = r || i;
|
|
38010
38001
|
if (!((ee = M == null ? void 0 : M.data) != null && ee.length))
|
|
38011
|
-
return
|
|
38012
|
-
const
|
|
38013
|
-
return uniqBy(X.concat(
|
|
38002
|
+
return K != null ? Array.isArray(K) ? K : [K] : [];
|
|
38003
|
+
const W = K != null && (Array.isArray(K) ? K.map((Z) => P(x({}, Z), { [t.value]: Z[t.value] || Z })) : [P(x({}, K), { [t.value]: K[t.value] || K })]) || [], X = typeof p == "function" ? M.data.filter(p) : M.data;
|
|
38004
|
+
return uniqBy(X.concat(W != null ? W : []), t.value);
|
|
38014
38005
|
}, [r, i, M == null ? void 0 : M.data, t.value, p]);
|
|
38015
38006
|
return /* @__PURE__ */ jsx(
|
|
38016
38007
|
Select,
|
|
@@ -38021,8 +38012,8 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
38021
38012
|
filterSort: null,
|
|
38022
38013
|
fieldNames: t,
|
|
38023
38014
|
onSearch: E,
|
|
38024
|
-
onDropdownVisibleChange: (
|
|
38025
|
-
I.current = null,
|
|
38015
|
+
onDropdownVisibleChange: (K) => {
|
|
38016
|
+
I.current = null, K && $(), S.current = !0;
|
|
38026
38017
|
},
|
|
38027
38018
|
objectValue: a,
|
|
38028
38019
|
value: r,
|
|
@@ -38031,13 +38022,13 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
38031
38022
|
loading: M ? T : !0,
|
|
38032
38023
|
options: h(R(q)),
|
|
38033
38024
|
rawOptions: q,
|
|
38034
|
-
dropdownRender: (
|
|
38035
|
-
const
|
|
38025
|
+
dropdownRender: (K) => {
|
|
38026
|
+
const W = q.some((X) => X[t.label] === I.current);
|
|
38036
38027
|
return /* @__PURE__ */ jsx(Fragment$1, { children: y ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
38037
|
-
!((M == null ? void 0 : M.data.length) === 0 && (I != null && I.current)) &&
|
|
38038
|
-
(M == null ? void 0 : M.data.length) > 0 && (I == null ? void 0 : I.current) && !
|
|
38039
|
-
!
|
|
38040
|
-
] }) :
|
|
38028
|
+
!((M == null ? void 0 : M.data.length) === 0 && (I != null && I.current)) && K,
|
|
38029
|
+
(M == null ? void 0 : M.data.length) > 0 && (I == null ? void 0 : I.current) && !W && /* @__PURE__ */ jsx(Divider$1, { style: { margin: 0 } }),
|
|
38030
|
+
!W && /* @__PURE__ */ jsx(L, {})
|
|
38031
|
+
] }) : K });
|
|
38041
38032
|
}
|
|
38042
38033
|
})
|
|
38043
38034
|
);
|
|
@@ -41862,9 +41853,9 @@ const useStyles$5 = genStyleHook("nb-association-filter-item", (e) => {
|
|
|
41862
41853
|
}, $ = (J) => {
|
|
41863
41854
|
j(J), d(J), p == null || p(J);
|
|
41864
41855
|
}, T = (J) => {
|
|
41865
|
-
var
|
|
41866
|
-
const
|
|
41867
|
-
(S ||
|
|
41856
|
+
var W;
|
|
41857
|
+
const K = (W = h == null ? void 0 : h[0]) == null ? void 0 : W.filter;
|
|
41858
|
+
(S || K) && g(P(x({}, h == null ? void 0 : h[0]), {
|
|
41868
41859
|
filter: void 0
|
|
41869
41860
|
})), v(!S), J.stopPropagation();
|
|
41870
41861
|
}, z = (J) => {
|
|
@@ -48527,7 +48518,7 @@ const AppendsTreeSelect = (e) => {
|
|
|
48527
48518
|
]
|
|
48528
48519
|
}
|
|
48529
48520
|
);
|
|
48530
|
-
return
|
|
48521
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(Space$1.Compact, { style: { display: "flex" }, children: [
|
|
48531
48522
|
/* @__PURE__ */ jsx(
|
|
48532
48523
|
RemoteSelect,
|
|
48533
48524
|
P(x({
|
|
@@ -50385,7 +50376,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
50385
50376
|
}).join("-") : typeof m == "string" ? Q[m] : (te = (m != null ? m : H)(Q)) == null ? void 0 : te.toString();
|
|
50386
50377
|
},
|
|
50387
50378
|
[JSON.stringify(m), H]
|
|
50388
|
-
),
|
|
50379
|
+
), K = useMemo(() => (Array.isArray(S == null ? void 0 : S.value) ? S.value : []).filter(Boolean), [S == null ? void 0 : S.value, (be = S == null ? void 0 : S.value) == null ? void 0 : be.length]), W = useMemo(() => (Q) => {
|
|
50389
50380
|
const te = useCallback((oe) => {
|
|
50390
50381
|
var Se, ye, ve, Pe, Fe, Ie;
|
|
50391
50382
|
if (!oe.active || !oe.over) {
|
|
@@ -50397,18 +50388,18 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
50397
50388
|
}, []);
|
|
50398
50389
|
return /* @__PURE__ */ jsx(DndContext, { onDragEnd: te, children: /* @__PURE__ */ jsx("tbody", x({}, Q)) });
|
|
50399
50390
|
}, [S, N]);
|
|
50400
|
-
|
|
50391
|
+
W.displayName = "BodyWrapperComponent";
|
|
50401
50392
|
const X = useMemo(() => ({
|
|
50402
50393
|
header: {
|
|
50403
50394
|
wrapper: HeaderWrapperComponent,
|
|
50404
50395
|
cell: HeaderCellComponent
|
|
50405
50396
|
},
|
|
50406
50397
|
body: {
|
|
50407
|
-
wrapper:
|
|
50398
|
+
wrapper: W,
|
|
50408
50399
|
row: BodyRowComponent,
|
|
50409
50400
|
cell: BodyCellComponent
|
|
50410
50401
|
}
|
|
50411
|
-
}), [
|
|
50402
|
+
}), [W]), ee = useMemo(() => p, [JSON.stringify(p)]), Z = useMemo(
|
|
50412
50403
|
() => ({
|
|
50413
50404
|
rowSelection: ee ? x({
|
|
50414
50405
|
type: "checkbox",
|
|
@@ -50483,8 +50474,8 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
50483
50474
|
x: "max-content"
|
|
50484
50475
|
}), []), ue = useMemo(() => ({
|
|
50485
50476
|
x: "max-content",
|
|
50486
|
-
y:
|
|
50487
|
-
}), [re, le,
|
|
50477
|
+
y: K.length > 0 ? re : void 0
|
|
50478
|
+
}), [re, le, K]), fe = useCallback(
|
|
50488
50479
|
(Q) => T.includes(Q[m]) ? G : "",
|
|
50489
50480
|
[T, G, JSON.stringify(m)]
|
|
50490
50481
|
), me = useCallback(
|
|
@@ -50506,7 +50497,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
50506
50497
|
SortableWrapper: ne,
|
|
50507
50498
|
tableSizeRefCallback: se,
|
|
50508
50499
|
defaultRowKey: H,
|
|
50509
|
-
dataSource:
|
|
50500
|
+
dataSource: K
|
|
50510
50501
|
}, b), Z), {
|
|
50511
50502
|
paginationProps: j,
|
|
50512
50503
|
components: X,
|
|
@@ -50829,19 +50820,19 @@ AssociationSelect.Designer = function e() {
|
|
|
50829
50820
|
useEffect(() => {
|
|
50830
50821
|
c.readPretty !== u["x-read-pretty"] && (c.readPretty = !!u["x-read-pretty"]);
|
|
50831
50822
|
}, [u["x-read-pretty"]]);
|
|
50832
|
-
const j = N == null ? void 0 : N.map((
|
|
50833
|
-
field:
|
|
50823
|
+
const j = N == null ? void 0 : N.map((K) => K.startsWith("-") ? {
|
|
50824
|
+
field: K.substring(1),
|
|
50834
50825
|
direction: "desc"
|
|
50835
50826
|
} : {
|
|
50836
|
-
field:
|
|
50827
|
+
field: K,
|
|
50837
50828
|
direction: "asc"
|
|
50838
50829
|
});
|
|
50839
50830
|
c.readPretty || c.required;
|
|
50840
|
-
const O = k.filter((
|
|
50841
|
-
var
|
|
50831
|
+
const O = k.filter((K) => i(K)).map((K) => {
|
|
50832
|
+
var W;
|
|
50842
50833
|
return {
|
|
50843
|
-
value:
|
|
50844
|
-
label: f((
|
|
50834
|
+
value: K == null ? void 0 : K.name,
|
|
50835
|
+
label: f((W = K == null ? void 0 : K.uiSchema) == null ? void 0 : W.title) || (K == null ? void 0 : K.name)
|
|
50845
50836
|
};
|
|
50846
50837
|
});
|
|
50847
50838
|
let B = "editable";
|
|
@@ -50935,19 +50926,19 @@ AssociationSelect.Designer = function e() {
|
|
|
50935
50926
|
}
|
|
50936
50927
|
}
|
|
50937
50928
|
},
|
|
50938
|
-
onSubmit: (
|
|
50929
|
+
onSubmit: (K) => {
|
|
50939
50930
|
var ne;
|
|
50940
|
-
const
|
|
50941
|
-
for (const re of
|
|
50942
|
-
|
|
50931
|
+
const W = [], X = (re) => re != null && !Number.isNaN(re);
|
|
50932
|
+
for (const re of K.rules)
|
|
50933
|
+
W.push(_.pickBy(re, X));
|
|
50943
50934
|
const ee = {
|
|
50944
50935
|
"x-uid": u["x-uid"]
|
|
50945
50936
|
};
|
|
50946
50937
|
if (["percent"].includes(S == null ? void 0 : S.interface))
|
|
50947
|
-
for (const re of
|
|
50938
|
+
for (const re of W)
|
|
50948
50939
|
(re.maxValue || re.minValue) && (re.percentMode = !0), re.percentFormat && (re.percentFormats = !0);
|
|
50949
|
-
const Z = _.concat([], ((ne = S == null ? void 0 : S.uiSchema) == null ? void 0 : ne["x-validator"]) || [],
|
|
50950
|
-
c.validator = Z, u["x-validator"] =
|
|
50940
|
+
const Z = _.concat([], ((ne = S == null ? void 0 : S.uiSchema) == null ? void 0 : ne["x-validator"]) || [], W);
|
|
50941
|
+
c.validator = Z, u["x-validator"] = W, ee["x-validator"] = W, m.emit("patch", {
|
|
50951
50942
|
schema: ee
|
|
50952
50943
|
}), h();
|
|
50953
50944
|
}
|
|
@@ -50979,12 +50970,12 @@ AssociationSelect.Designer = function e() {
|
|
|
50979
50970
|
})
|
|
50980
50971
|
}
|
|
50981
50972
|
},
|
|
50982
|
-
onSubmit: (
|
|
50983
|
-
const
|
|
50973
|
+
onSubmit: (K) => {
|
|
50974
|
+
const W = {
|
|
50984
50975
|
"x-uid": u["x-uid"]
|
|
50985
50976
|
};
|
|
50986
|
-
c.value !==
|
|
50987
|
-
schema:
|
|
50977
|
+
c.value !== K.default && (c.value = K.default), u.default = K.default, W.default = K.default, m.emit("patch", {
|
|
50978
|
+
schema: W
|
|
50988
50979
|
}), h();
|
|
50989
50980
|
}
|
|
50990
50981
|
}
|
|
@@ -50995,9 +50986,9 @@ AssociationSelect.Designer = function e() {
|
|
|
50995
50986
|
title: d("Field component"),
|
|
50996
50987
|
options: v,
|
|
50997
50988
|
value: u["x-component"],
|
|
50998
|
-
onChange: (
|
|
50989
|
+
onChange: (K) => {
|
|
50999
50990
|
var X, ee;
|
|
51000
|
-
const
|
|
50991
|
+
const W = {
|
|
51001
50992
|
name: S == null ? void 0 : S.name,
|
|
51002
50993
|
type: "void",
|
|
51003
50994
|
required: u.required,
|
|
@@ -51007,19 +50998,19 @@ AssociationSelect.Designer = function e() {
|
|
|
51007
50998
|
// 'x-designer': 'FormItem.Designer',
|
|
51008
50999
|
"x-toolbar": "FormItemSchemaToolbar",
|
|
51009
51000
|
"x-settings": "fieldSettings:FormItem",
|
|
51010
|
-
"x-component":
|
|
51001
|
+
"x-component": K,
|
|
51011
51002
|
"x-validator": u["x-validator"],
|
|
51012
51003
|
"x-collection-field": u["x-collection-field"],
|
|
51013
51004
|
"x-decorator-props": u["x-decorator-props"],
|
|
51014
51005
|
"x-component-props": x(x({}, (X = S == null ? void 0 : S.uiSchema) == null ? void 0 : X["x-component-props"]), u["x-component-props"])
|
|
51015
51006
|
};
|
|
51016
|
-
(ee = F == null ? void 0 : F.schemaInitialize) == null || ee.call(F,
|
|
51007
|
+
(ee = F == null ? void 0 : F.schemaInitialize) == null || ee.call(F, W, {
|
|
51017
51008
|
field: S,
|
|
51018
51009
|
block: "Form",
|
|
51019
51010
|
readPretty: c.readPretty,
|
|
51020
51011
|
action: p ? "get" : null,
|
|
51021
51012
|
targetCollection: r(S == null ? void 0 : S.target)
|
|
51022
|
-
}),
|
|
51013
|
+
}), K === "CollectionField" && (W.type = "string"), g("beforeBegin", divWrap(W), {
|
|
51023
51014
|
onSuccess: () => {
|
|
51024
51015
|
m.remove(null, {
|
|
51025
51016
|
removeParentsIfNoChildren: !0,
|
|
@@ -51037,12 +51028,12 @@ AssociationSelect.Designer = function e() {
|
|
|
51037
51028
|
{
|
|
51038
51029
|
title: d("Allow multiple"),
|
|
51039
51030
|
checked: ((E = u["x-component-props"]) == null ? void 0 : E.multiple) === void 0 ? !0 : u["x-component-props"].multiple,
|
|
51040
|
-
onChange: (
|
|
51041
|
-
const
|
|
51031
|
+
onChange: (K) => {
|
|
51032
|
+
const W = {
|
|
51042
51033
|
"x-uid": u["x-uid"]
|
|
51043
51034
|
};
|
|
51044
|
-
u["x-component-props"] = u["x-component-props"] || {}, c.componentProps = c.componentProps || {}, u["x-component-props"].multiple =
|
|
51045
|
-
schema:
|
|
51035
|
+
u["x-component-props"] = u["x-component-props"] || {}, c.componentProps = c.componentProps || {}, u["x-component-props"].multiple = K, c.componentProps.multiple = K, W["x-component-props"] = u["x-component-props"], m.emit("patch", {
|
|
51036
|
+
schema: W
|
|
51046
51037
|
}), h();
|
|
51047
51038
|
}
|
|
51048
51039
|
},
|
|
@@ -51054,8 +51045,8 @@ AssociationSelect.Designer = function e() {
|
|
|
51054
51045
|
collectionName: S == null ? void 0 : S.target,
|
|
51055
51046
|
defaultFilter: ((U = (G = (q = c.componentProps) == null ? void 0 : q.service) == null ? void 0 : G.params) == null ? void 0 : U.filter) || {},
|
|
51056
51047
|
form: l,
|
|
51057
|
-
onSubmit: ({ filter:
|
|
51058
|
-
|
|
51048
|
+
onSubmit: ({ filter: K }) => {
|
|
51049
|
+
K = removeNullCondition(K), _.set(c.componentProps, "service.params.filter", K), u["x-component-props"] = c.componentProps, m.emit("patch", {
|
|
51059
51050
|
schema: {
|
|
51060
51051
|
"x-uid": u["x-uid"],
|
|
51061
51052
|
"x-component-props": c.componentProps
|
|
@@ -51138,9 +51129,9 @@ AssociationSelect.Designer = function e() {
|
|
|
51138
51129
|
}
|
|
51139
51130
|
}
|
|
51140
51131
|
},
|
|
51141
|
-
onSubmit: ({ sort:
|
|
51142
|
-
const
|
|
51143
|
-
_.set(c.componentProps, "service.params.sort",
|
|
51132
|
+
onSubmit: ({ sort: K }) => {
|
|
51133
|
+
const W = K.map((X) => X.direction === "desc" ? `-${X.field}` : X.field);
|
|
51134
|
+
_.set(c.componentProps, "service.params.sort", W), u["x-component-props"] = c.componentProps, m.emit("patch", {
|
|
51144
51135
|
schema: {
|
|
51145
51136
|
"x-uid": u["x-uid"],
|
|
51146
51137
|
"x-component-props": c.componentProps
|
|
@@ -51159,26 +51150,26 @@ AssociationSelect.Designer = function e() {
|
|
|
51159
51150
|
{ label: d("Easy-reading"), value: "read-pretty" }
|
|
51160
51151
|
],
|
|
51161
51152
|
value: B,
|
|
51162
|
-
onChange: (
|
|
51163
|
-
const
|
|
51153
|
+
onChange: (K) => {
|
|
51154
|
+
const W = {
|
|
51164
51155
|
"x-uid": u["x-uid"]
|
|
51165
51156
|
};
|
|
51166
|
-
switch (
|
|
51157
|
+
switch (K) {
|
|
51167
51158
|
case "readonly": {
|
|
51168
|
-
u["x-read-pretty"] = !1, u["x-disabled"] = !0,
|
|
51159
|
+
u["x-read-pretty"] = !1, u["x-disabled"] = !0, W["x-read-pretty"] = !1, W["x-disabled"] = !0, c.readPretty = !1, c.disabled = !0;
|
|
51169
51160
|
break;
|
|
51170
51161
|
}
|
|
51171
51162
|
case "read-pretty": {
|
|
51172
|
-
u["x-read-pretty"] = !0, u["x-disabled"] = !1,
|
|
51163
|
+
u["x-read-pretty"] = !0, u["x-disabled"] = !1, W["x-read-pretty"] = !0, W["x-disabled"] = !1, c.readPretty = !0;
|
|
51173
51164
|
break;
|
|
51174
51165
|
}
|
|
51175
51166
|
default: {
|
|
51176
|
-
u["x-read-pretty"] = !1, u["x-disabled"] = !1,
|
|
51167
|
+
u["x-read-pretty"] = !1, u["x-disabled"] = !1, W["x-read-pretty"] = !1, W["x-disabled"] = !1, c.readPretty = !1, c.disabled = !1;
|
|
51177
51168
|
break;
|
|
51178
51169
|
}
|
|
51179
51170
|
}
|
|
51180
51171
|
m.emit("patch", {
|
|
51181
|
-
schema:
|
|
51172
|
+
schema: W
|
|
51182
51173
|
}), m.refresh();
|
|
51183
51174
|
}
|
|
51184
51175
|
},
|
|
@@ -51190,15 +51181,15 @@ AssociationSelect.Designer = function e() {
|
|
|
51190
51181
|
title: d("Title field"),
|
|
51191
51182
|
options: O,
|
|
51192
51183
|
value: (J = (H = c == null ? void 0 : c.componentProps) == null ? void 0 : H.fieldNames) == null ? void 0 : J.label,
|
|
51193
|
-
onChange: (
|
|
51184
|
+
onChange: (K) => {
|
|
51194
51185
|
var ee, Z;
|
|
51195
|
-
const
|
|
51186
|
+
const W = {
|
|
51196
51187
|
"x-uid": u["x-uid"]
|
|
51197
51188
|
}, X = P(x(x({}, (Z = (ee = S == null ? void 0 : S.uiSchema) == null ? void 0 : ee["x-component-props"]) == null ? void 0 : Z.fieldNames), c.componentProps.fieldNames), {
|
|
51198
|
-
label:
|
|
51189
|
+
label: K
|
|
51199
51190
|
});
|
|
51200
|
-
c.componentProps.fieldNames = X, u["x-component-props"] = u["x-component-props"] || {}, u["x-component-props"].fieldNames = X,
|
|
51201
|
-
schema:
|
|
51191
|
+
c.componentProps.fieldNames = X, u["x-component-props"] = u["x-component-props"] || {}, u["x-component-props"].fieldNames = X, W["x-component-props"] = u["x-component-props"], m.emit("patch", {
|
|
51192
|
+
schema: W
|
|
51202
51193
|
}), m.refresh();
|
|
51203
51194
|
}
|
|
51204
51195
|
},
|