@nocobase/client 1.6.34 → 1.6.36
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 +518 -508
- package/lib/index.js +77 -77
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -8767,7 +8767,7 @@ const SchemaInitializerSubMenuContext = React.createContext({}), SchemaInitializ
|
|
|
8767
8767
|
/* @__PURE__ */ jsx(Button, { type: "primary", href: "https://github.com/nocobase/nocobase/issues", target: "_blank", children: n("Feedback") }, "feedback"),
|
|
8768
8768
|
/* @__PURE__ */ jsx(Button, { loading: o, onClick: r, children: n("Download logs") }, "log")
|
|
8769
8769
|
],
|
|
8770
|
-
children: /* @__PURE__ */ jsx(Paragraph, { copyable:
|
|
8770
|
+
children: /* @__PURE__ */ jsx(Paragraph, { copyable: { text: e.stack }, children: /* @__PURE__ */ jsx(Text$1, { type: "danger", style: { whiteSpace: "pre-line", textAlign: "center" }, children: e.stack }) })
|
|
8771
8771
|
}
|
|
8772
8772
|
) });
|
|
8773
8773
|
};
|
|
@@ -9210,7 +9210,7 @@ function addAppVersion(e, t) {
|
|
|
9210
9210
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
9211
9211
|
}), e;
|
|
9212
9212
|
}
|
|
9213
|
-
const name = "@nocobase/client", version = "1.6.
|
|
9213
|
+
const name = "@nocobase/client", version = "1.6.36", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
9214
9214
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
9215
9215
|
"@ant-design/cssinjs": "^1.11.1",
|
|
9216
9216
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -9231,9 +9231,9 @@ const name = "@nocobase/client", version = "1.6.34", license = "AGPL-3.0", main
|
|
|
9231
9231
|
"@formily/reactive-react": "^2.2.27",
|
|
9232
9232
|
"@formily/shared": "^2.2.27",
|
|
9233
9233
|
"@formily/validator": "^2.2.27",
|
|
9234
|
-
"@nocobase/evaluators": "1.6.
|
|
9235
|
-
"@nocobase/sdk": "1.6.
|
|
9236
|
-
"@nocobase/utils": "1.6.
|
|
9234
|
+
"@nocobase/evaluators": "1.6.36",
|
|
9235
|
+
"@nocobase/sdk": "1.6.36",
|
|
9236
|
+
"@nocobase/utils": "1.6.36",
|
|
9237
9237
|
ahooks: "^3.7.2",
|
|
9238
9238
|
antd: "5.12.8",
|
|
9239
9239
|
"antd-style": "3.7.1",
|
|
@@ -10351,9 +10351,9 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10351
10351
|
}, [S, l, o, c, e.showDel, a]);
|
|
10352
10352
|
}, SortableRow$1 = (e) => {
|
|
10353
10353
|
var m, g, f, C, b, S;
|
|
10354
|
-
const { token: t } = useToken$1(), n = (m = e["data-row-key"]) == null ? void 0 : m.toString(), { setNodeRef: o,
|
|
10354
|
+
const { token: t } = useToken$1(), n = (m = e["data-row-key"]) == null ? void 0 : m.toString(), { setNodeRef: o, active: r, over: i } = useSortable({
|
|
10355
10355
|
id: n
|
|
10356
|
-
}), h = e, { rowIndex: l } = h, c = Y(h, ["rowIndex"]), u = useMemo(() => {
|
|
10356
|
+
}), a = (i == null ? void 0 : i.id) == n, h = e, { rowIndex: l } = h, c = Y(h, ["rowIndex"]), u = useMemo(() => {
|
|
10357
10357
|
const y = new TinyColor(t.colorSettings).setAlpha(0.6).toHex8String();
|
|
10358
10358
|
return {
|
|
10359
10359
|
topActiveClass: css`
|
|
@@ -10367,15 +10367,15 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10367
10367
|
}
|
|
10368
10368
|
`
|
|
10369
10369
|
};
|
|
10370
|
-
}, [t.colorSettings]), d = ((f = (g =
|
|
10370
|
+
}, [t.colorSettings]), d = ((f = (g = r == null ? void 0 : r.data.current) == null ? void 0 : g.sortable.index) != null ? f : -1) > ((S = (b = (C = i == null ? void 0 : i.data.current) == null ? void 0 : C.sortable) == null ? void 0 : b.index) != null ? S : -1) ? u.topActiveClass : u.bottomActiveClass;
|
|
10371
10371
|
return /* @__PURE__ */ jsx(
|
|
10372
10372
|
"tr",
|
|
10373
10373
|
P(x({
|
|
10374
10374
|
ref: (y) => {
|
|
10375
|
-
(
|
|
10375
|
+
(r == null ? void 0 : r.id) !== n && o(y);
|
|
10376
10376
|
}
|
|
10377
10377
|
}, c), {
|
|
10378
|
-
className: cls(e.className, { [d]:
|
|
10378
|
+
className: cls(e.className, { [d]: r && a })
|
|
10379
10379
|
})
|
|
10380
10380
|
);
|
|
10381
10381
|
}, SortHandle$2 = (e) => {
|
|
@@ -10658,7 +10658,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10658
10658
|
"onClickRow",
|
|
10659
10659
|
"value"
|
|
10660
10660
|
]), y = useArrayField$1(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), T = ((Ce = v == null ? void 0 : v.parent) == null ? void 0 : Ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: O } = T, j = useMemoizedFn(S.onRowDragEnd || (() => {
|
|
10661
|
-
})), N = usePaginationProps$3(n, i, e), B = useTableColumns$2(S, N), [w, M] = useState(() => D ? O : []), [$, k] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [z,
|
|
10661
|
+
})), N = usePaginationProps$3(n, i, e), B = useTableColumns$2(S, N), [w, M] = useState(() => D ? O : []), [$, k] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [z, L] = useState([]), q = (p == null ? void 0 : p.type) !== "none", E = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
|
|
10662
10662
|
& > td {
|
|
10663
10663
|
background-color: ${t.controlItemBgActive} !important;
|
|
10664
10664
|
}
|
|
@@ -10674,7 +10674,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10674
10674
|
}, [U == null ? void 0 : U.field]);
|
|
10675
10675
|
const H = useMemo(() => C ? G : "", [G, C]), J = useMemo(() => C ? (Q, te) => ({
|
|
10676
10676
|
onClick: (oe) => {
|
|
10677
|
-
isPortalInBody(oe.target) || C(Q,
|
|
10677
|
+
isPortalInBody(oe.target) || C(Q, L, z);
|
|
10678
10678
|
},
|
|
10679
10679
|
rowIndex: te,
|
|
10680
10680
|
record: Q
|
|
@@ -10691,10 +10691,10 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10691
10691
|
return W(Q);
|
|
10692
10692
|
if (Q.key)
|
|
10693
10693
|
return Q.key;
|
|
10694
|
-
if (
|
|
10695
|
-
return
|
|
10694
|
+
if (E.current.has(Q))
|
|
10695
|
+
return E.current.get(Q);
|
|
10696
10696
|
const te = uid();
|
|
10697
|
-
return
|
|
10697
|
+
return E.current.set(Q, te), te;
|
|
10698
10698
|
}, []), W = useCallback(
|
|
10699
10699
|
(Q) => {
|
|
10700
10700
|
var te;
|
|
@@ -11425,12 +11425,12 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11425
11425
|
recordData: $,
|
|
11426
11426
|
sourceId: k,
|
|
11427
11427
|
collection: z,
|
|
11428
|
-
puid:
|
|
11428
|
+
puid: L
|
|
11429
11429
|
}) => {
|
|
11430
11430
|
const q = c.getFilterByTK(u || l, $);
|
|
11431
11431
|
return getPopupPathFromParams({
|
|
11432
11432
|
popupuid: M,
|
|
11433
|
-
puid:
|
|
11433
|
+
puid: L,
|
|
11434
11434
|
collection: z,
|
|
11435
11435
|
filterbytk: q,
|
|
11436
11436
|
sourceid: k,
|
|
@@ -11455,27 +11455,27 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11455
11455
|
} = {}) => {
|
|
11456
11456
|
if (!f())
|
|
11457
11457
|
return I == null ? void 0 : I(!0);
|
|
11458
|
-
const
|
|
11458
|
+
const L = z || o, q = L == null ? void 0 : L["x-uid"], E = y(M);
|
|
11459
11459
|
w = w || (i == null ? void 0 : i.data);
|
|
11460
11460
|
const G = R({
|
|
11461
11461
|
popupUid: q,
|
|
11462
11462
|
recordData: w,
|
|
11463
|
-
sourceId:
|
|
11463
|
+
sourceId: E,
|
|
11464
11464
|
collection: $,
|
|
11465
11465
|
puid: k
|
|
11466
11466
|
});
|
|
11467
11467
|
let U = n.pathname;
|
|
11468
11468
|
if (_.last(U) === "/" && (U = U.slice(0, -1)), storePopupContext(q, {
|
|
11469
|
-
schema:
|
|
11469
|
+
schema: L,
|
|
11470
11470
|
record: new CollectionRecord({ isNew: !1, data: w }),
|
|
11471
11471
|
parentRecord: M ? new CollectionRecord({ isNew: !1, data: M }) : a,
|
|
11472
11472
|
service: g(),
|
|
11473
11473
|
dataSource: r,
|
|
11474
11474
|
collection: l == null ? void 0 : l.name,
|
|
11475
11475
|
association: u,
|
|
11476
|
-
sourceId:
|
|
11476
|
+
sourceId: E,
|
|
11477
11477
|
tableBlockContext: P(x({}, F), { collection: l == null ? void 0 : l.name, blockData: v })
|
|
11478
|
-
}), b(T(), z),
|
|
11478
|
+
}), b(T(), z), L.properties) {
|
|
11479
11479
|
const H = h + 1;
|
|
11480
11480
|
if (getPopupLayerState(H))
|
|
11481
11481
|
return;
|
|
@@ -11483,7 +11483,7 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11483
11483
|
} else
|
|
11484
11484
|
console.error(
|
|
11485
11485
|
`[NocoBase] The popup schema is invalid, please check the schema:
|
|
11486
|
-
${JSON.stringify(
|
|
11486
|
+
${JSON.stringify(L, null, 2)}`
|
|
11487
11487
|
);
|
|
11488
11488
|
},
|
|
11489
11489
|
[
|
|
@@ -13034,26 +13034,26 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13034
13034
|
config: {}
|
|
13035
13035
|
}, l = {}, c = {}, u = {}, d = [], p = {}, m = {}, h = {}, g = 1, f = 1;
|
|
13036
13036
|
function C(k) {
|
|
13037
|
-
var z,
|
|
13037
|
+
var z, L;
|
|
13038
13038
|
for (z = 0; z < k.length; z++)
|
|
13039
|
-
if (
|
|
13039
|
+
if (L = k[z], L === ".")
|
|
13040
13040
|
k.splice(z, 1), z -= 1;
|
|
13041
|
-
else if (
|
|
13041
|
+
else if (L === "..") {
|
|
13042
13042
|
if (z === 0 || z === 1 && k[2] === ".." || k[z - 1] === "..")
|
|
13043
13043
|
continue;
|
|
13044
13044
|
z > 0 && (k.splice(z - 1, 2), z -= 2);
|
|
13045
13045
|
}
|
|
13046
13046
|
}
|
|
13047
|
-
function b(k, z,
|
|
13048
|
-
var q,
|
|
13049
|
-
if (k && (k = k.split("/"), K = k.length - 1, a.nodeIdCompat && jsSuffixRegExp.test(k[K]) && (k[K] = k[K].replace(jsSuffixRegExp, "")), k[0].charAt(0) === "." && re && (ne = re.slice(0, re.length - 1), k = ne.concat(k)), C(k), k = k.join("/")),
|
|
13047
|
+
function b(k, z, L) {
|
|
13048
|
+
var q, E, G, U, H, J, K, W, X, ee, Z, ne, re = z && z.split("/"), se = a.map, le = se && se["*"];
|
|
13049
|
+
if (k && (k = k.split("/"), K = k.length - 1, a.nodeIdCompat && jsSuffixRegExp.test(k[K]) && (k[K] = k[K].replace(jsSuffixRegExp, "")), k[0].charAt(0) === "." && re && (ne = re.slice(0, re.length - 1), k = ne.concat(k)), C(k), k = k.join("/")), L && se && (re || le)) {
|
|
13050
13050
|
G = k.split("/");
|
|
13051
13051
|
e:
|
|
13052
13052
|
for (U = G.length; U > 0; U -= 1) {
|
|
13053
13053
|
if (J = G.slice(0, U).join("/"), re) {
|
|
13054
13054
|
for (H = re.length; H > 0; H -= 1)
|
|
13055
|
-
if (
|
|
13056
|
-
W =
|
|
13055
|
+
if (E = getOwn(se, re.slice(0, H).join("/")), E && (E = getOwn(E, J), E)) {
|
|
13056
|
+
W = E, X = U;
|
|
13057
13057
|
break e;
|
|
13058
13058
|
}
|
|
13059
13059
|
}
|
|
@@ -13077,36 +13077,36 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13077
13077
|
})([k]), !0;
|
|
13078
13078
|
}
|
|
13079
13079
|
function v(k) {
|
|
13080
|
-
var z,
|
|
13081
|
-
return
|
|
13080
|
+
var z, L = k ? k.indexOf("!") : -1;
|
|
13081
|
+
return L > -1 && (z = k.substring(0, L), k = k.substring(L + 1, k.length)), [z, k];
|
|
13082
13082
|
}
|
|
13083
|
-
function F(k, z,
|
|
13084
|
-
var
|
|
13085
|
-
return k || (X = !1, k = "_@r" + (g += 1)), H = v(k), J = H[0], k = H[1], J && (J = b(J, K, q), G = getOwn(p, J)), k && (J ?
|
|
13083
|
+
function F(k, z, L, q) {
|
|
13084
|
+
var E, G, U, H, J = null, K = z ? z.name : null, W = k, X = !0, ee = "";
|
|
13085
|
+
return k || (X = !1, k = "_@r" + (g += 1)), H = v(k), J = H[0], k = H[1], J && (J = b(J, K, q), G = getOwn(p, J)), k && (J ? L ? ee = k : G && G.normalize ? ee = G.normalize(k, function(Z) {
|
|
13086
13086
|
return b(Z, K, q);
|
|
13087
|
-
}) : ee = k.indexOf("!") === -1 ? b(k, K, q) : k : (ee = b(k, K, q), H = v(ee), J = H[0], ee = H[1],
|
|
13087
|
+
}) : ee = k.indexOf("!") === -1 ? b(k, K, q) : k : (ee = b(k, K, q), H = v(ee), J = H[0], ee = H[1], L = !0, E = o.nameToUrl(ee))), U = J && !G && !L ? "_unnormalized" + (f += 1) : "", {
|
|
13088
13088
|
prefix: J,
|
|
13089
13089
|
name: ee,
|
|
13090
13090
|
parentMap: z,
|
|
13091
13091
|
unnormalized: !!U,
|
|
13092
|
-
url:
|
|
13092
|
+
url: E,
|
|
13093
13093
|
originalName: W,
|
|
13094
13094
|
isDefine: X,
|
|
13095
13095
|
id: (J ? J + "!" + ee : ee) + U
|
|
13096
13096
|
};
|
|
13097
13097
|
}
|
|
13098
13098
|
function I(k) {
|
|
13099
|
-
var z = k.id,
|
|
13100
|
-
return
|
|
13099
|
+
var z = k.id, L = getOwn(l, z);
|
|
13100
|
+
return L || (L = l[z] = new o.Module(k)), L;
|
|
13101
13101
|
}
|
|
13102
|
-
function R(k, z,
|
|
13103
|
-
var q = k.id,
|
|
13104
|
-
hasProp(p, q) && (!
|
|
13102
|
+
function R(k, z, L) {
|
|
13103
|
+
var q = k.id, E = getOwn(l, q);
|
|
13104
|
+
hasProp(p, q) && (!E || E.defineEmitComplete) ? z === "defined" && L(p[q]) : (E = I(k), E.error && z === "error" ? L(E.error) : E.on(z, L));
|
|
13105
13105
|
}
|
|
13106
13106
|
function T(k, z) {
|
|
13107
|
-
var
|
|
13108
|
-
z ? z(k) : (each(
|
|
13109
|
-
var G = getOwn(l,
|
|
13107
|
+
var L = k.requireModules, q = !1;
|
|
13108
|
+
z ? z(k) : (each(L, function(E) {
|
|
13109
|
+
var G = getOwn(l, E);
|
|
13110
13110
|
G && (G.error = k, G.events.error && (q = !0, G.emit("error", k)));
|
|
13111
13111
|
}), q || req.onError(k));
|
|
13112
13112
|
}
|
|
@@ -13138,26 +13138,26 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13138
13138
|
function O(k) {
|
|
13139
13139
|
delete l[k], delete c[k];
|
|
13140
13140
|
}
|
|
13141
|
-
function j(k, z,
|
|
13141
|
+
function j(k, z, L) {
|
|
13142
13142
|
var q = k.map.id;
|
|
13143
|
-
k.error ? k.emit("error", k.error) : (z[q] = !0, each(k.depMaps, function(
|
|
13144
|
-
var U =
|
|
13145
|
-
H && !k.depMatched[G] && !
|
|
13146
|
-
}),
|
|
13143
|
+
k.error ? k.emit("error", k.error) : (z[q] = !0, each(k.depMaps, function(E, G) {
|
|
13144
|
+
var U = E.id, H = getOwn(l, U);
|
|
13145
|
+
H && !k.depMatched[G] && !L[U] && (getOwn(z, U) ? (k.defineDep(G, p[U]), k.check()) : j(H, z, L));
|
|
13146
|
+
}), L[q] = !0);
|
|
13147
13147
|
}
|
|
13148
13148
|
function N() {
|
|
13149
|
-
var k, z,
|
|
13149
|
+
var k, z, L = a.waitSeconds * 1e3, q = L && o.startTime + L < (/* @__PURE__ */ new Date()).getTime(), E = [], G = [], U = !1, H = !0;
|
|
13150
13150
|
if (!t) {
|
|
13151
13151
|
if (t = !0, eachProp(c, function(J) {
|
|
13152
13152
|
var K = J.map, W = K.id;
|
|
13153
13153
|
if (J.enabled && (K.isDefine || G.push(J), !J.error)) {
|
|
13154
13154
|
if (!J.inited && q)
|
|
13155
|
-
y(W) ? (z = !0, U = !0) : (
|
|
13155
|
+
y(W) ? (z = !0, U = !0) : (E.push(W), S(W));
|
|
13156
13156
|
else if (!J.inited && J.fetched && K.isDefine && (U = !0, !K.prefix))
|
|
13157
13157
|
return H = !1;
|
|
13158
13158
|
}
|
|
13159
|
-
}), q &&
|
|
13160
|
-
return k = makeError("timeout", "Load timeout for modules: " +
|
|
13159
|
+
}), q && E.length)
|
|
13160
|
+
return k = makeError("timeout", "Load timeout for modules: " + E, null, E), k.contextName = o.contextName, T(k);
|
|
13161
13161
|
H && each(G, function(J) {
|
|
13162
13162
|
j(J, {}, {});
|
|
13163
13163
|
}), (!q || z) && U && (isBrowser || isWebWorker) && !i && (i = setTimeout(function() {
|
|
@@ -13168,10 +13168,10 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13168
13168
|
n = function(k) {
|
|
13169
13169
|
this.events = getOwn(u, k.id) || {}, this.map = k, this.shim = getOwn(a.shim, k.id), this.depExports = [], this.depMaps = [], this.depMatched = [], this.pluginMaps = {}, this.depCount = 0;
|
|
13170
13170
|
}, n.prototype = {
|
|
13171
|
-
init: function(k, z,
|
|
13172
|
-
q = q || {}, !this.inited && (this.factory = z,
|
|
13173
|
-
this.emit("error",
|
|
13174
|
-
})), this.depMaps = k && k.slice(0), this.errback =
|
|
13171
|
+
init: function(k, z, L, q) {
|
|
13172
|
+
q = q || {}, !this.inited && (this.factory = z, L ? this.on("error", L) : this.events.error && (L = bind(this, function(E) {
|
|
13173
|
+
this.emit("error", E);
|
|
13174
|
+
})), this.depMaps = k && k.slice(0), this.errback = L, this.inited = !0, this.ignore = q.ignore, q.enabled || this.enabled ? this.enable() : this.check());
|
|
13175
13175
|
},
|
|
13176
13176
|
defineDep: function(k, z) {
|
|
13177
13177
|
this.depMatched[k] || (this.depMatched[k] = !0, this.depCount -= 1, this.depExports[k] = z);
|
|
@@ -13200,9 +13200,9 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13200
13200
|
*/
|
|
13201
13201
|
check: function() {
|
|
13202
13202
|
if (!(!this.enabled || this.enabling)) {
|
|
13203
|
-
var k, z,
|
|
13203
|
+
var k, z, L = this.map.id, q = this.depExports, E = this.exports, G = this.factory;
|
|
13204
13204
|
if (!this.inited)
|
|
13205
|
-
hasProp(o.defQueueMap,
|
|
13205
|
+
hasProp(o.defQueueMap, L) || this.fetch();
|
|
13206
13206
|
else if (this.error)
|
|
13207
13207
|
this.emit("error", this.error);
|
|
13208
13208
|
else if (!this.defining) {
|
|
@@ -13210,32 +13210,32 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13210
13210
|
if (isFunction(G)) {
|
|
13211
13211
|
if (this.events.error && this.map.isDefine || req.onError !== defaultOnError)
|
|
13212
13212
|
try {
|
|
13213
|
-
|
|
13213
|
+
E = o.execCb(L, G, q, E);
|
|
13214
13214
|
} catch (H) {
|
|
13215
13215
|
k = H;
|
|
13216
13216
|
}
|
|
13217
13217
|
else
|
|
13218
|
-
|
|
13219
|
-
if (this.map.isDefine &&
|
|
13218
|
+
E = o.execCb(L, G, q, E);
|
|
13219
|
+
if (this.map.isDefine && E === void 0 && (z = this.module, z ? E = z.exports : this.usingExports && (E = this.exports)), k)
|
|
13220
13220
|
return k.requireMap = this.map, k.requireModules = this.map.isDefine ? [this.map.id] : null, k.requireType = this.map.isDefine ? "define" : "require", T(this.error = k);
|
|
13221
13221
|
} else
|
|
13222
|
-
|
|
13223
|
-
if (this.exports =
|
|
13222
|
+
E = G;
|
|
13223
|
+
if (this.exports = E, this.map.isDefine && !this.ignore && (p[L] = E, req.onResourceLoad)) {
|
|
13224
13224
|
var U = [];
|
|
13225
13225
|
each(this.depMaps, function(H) {
|
|
13226
13226
|
U.push(H.normalizedMap || H);
|
|
13227
13227
|
}), req.onResourceLoad(o, this.map, U);
|
|
13228
13228
|
}
|
|
13229
|
-
O(
|
|
13229
|
+
O(L), this.defined = !0;
|
|
13230
13230
|
}
|
|
13231
13231
|
this.defining = !1, this.defined && !this.defineEmitted && (this.defineEmitted = !0, this.emit("defined", this.exports), this.defineEmitComplete = !0);
|
|
13232
13232
|
}
|
|
13233
13233
|
}
|
|
13234
13234
|
},
|
|
13235
13235
|
callPlugin: function() {
|
|
13236
|
-
var k = this.map, z = k.id,
|
|
13237
|
-
this.depMaps.push(
|
|
13238
|
-
var
|
|
13236
|
+
var k = this.map, z = k.id, L = F(k.prefix);
|
|
13237
|
+
this.depMaps.push(L), R(L, "defined", bind(this, function(q) {
|
|
13238
|
+
var E, G, U, H = getOwn(h, this.map.id), J = this.map.name, K = this.map.parentMap ? this.map.parentMap.name : null, W = o.makeRequire(k.parentMap, {
|
|
13239
13239
|
enableBuildCallback: !0
|
|
13240
13240
|
});
|
|
13241
13241
|
if (this.map.unnormalized) {
|
|
@@ -13265,17 +13265,17 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13265
13265
|
this.map.url = o.nameToUrl(H), this.load();
|
|
13266
13266
|
return;
|
|
13267
13267
|
}
|
|
13268
|
-
|
|
13268
|
+
E = bind(this, function(X) {
|
|
13269
13269
|
this.init([], function() {
|
|
13270
13270
|
return X;
|
|
13271
13271
|
}, null, {
|
|
13272
13272
|
enabled: !0
|
|
13273
13273
|
});
|
|
13274
|
-
}),
|
|
13274
|
+
}), E.error = bind(this, function(X) {
|
|
13275
13275
|
this.inited = !0, this.error = X, X.requireModules = [z], eachProp(l, function(ee) {
|
|
13276
13276
|
ee.map.id.indexOf(z + "_unnormalized") === 0 && O(ee.map.id);
|
|
13277
13277
|
}), T(X);
|
|
13278
|
-
}),
|
|
13278
|
+
}), E.fromText = bind(this, function(X, ee) {
|
|
13279
13279
|
var Z = k.name, ne = F(Z), re = useInteractive;
|
|
13280
13280
|
ee && (X = ee), re && (useInteractive = !1), I(ne), hasProp(a.config, z) && (a.config[Z] = a.config[z]);
|
|
13281
13281
|
try {
|
|
@@ -13288,21 +13288,21 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13288
13288
|
[z]
|
|
13289
13289
|
));
|
|
13290
13290
|
}
|
|
13291
|
-
re && (useInteractive = !0), this.depMaps.push(ne), o.completeLoad(Z), W([Z],
|
|
13292
|
-
}), q.load(k.name, W,
|
|
13293
|
-
})), o.enable(
|
|
13291
|
+
re && (useInteractive = !0), this.depMaps.push(ne), o.completeLoad(Z), W([Z], E);
|
|
13292
|
+
}), q.load(k.name, W, E, a);
|
|
13293
|
+
})), o.enable(L, this), this.pluginMaps[L.id] = L;
|
|
13294
13294
|
},
|
|
13295
13295
|
enable: function() {
|
|
13296
13296
|
c[this.map.id] = this, this.enabled = !0, this.enabling = !0, each(this.depMaps, bind(this, function(k, z) {
|
|
13297
|
-
var
|
|
13297
|
+
var L, q, E;
|
|
13298
13298
|
if (typeof k == "string") {
|
|
13299
13299
|
if (k = F(
|
|
13300
13300
|
k,
|
|
13301
13301
|
this.map.isDefine ? this.map : this.map.parentMap,
|
|
13302
13302
|
!1,
|
|
13303
13303
|
!this.skipMap
|
|
13304
|
-
), this.depMaps[z] = k,
|
|
13305
|
-
this.depExports[z] =
|
|
13304
|
+
), this.depMaps[z] = k, E = getOwn(r, k.id), E) {
|
|
13305
|
+
this.depExports[z] = E(this);
|
|
13306
13306
|
return;
|
|
13307
13307
|
}
|
|
13308
13308
|
this.depCount += 1, R(k, "defined", bind(this, function(G) {
|
|
@@ -13311,27 +13311,27 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13311
13311
|
this.emit("error", G);
|
|
13312
13312
|
}));
|
|
13313
13313
|
}
|
|
13314
|
-
|
|
13314
|
+
L = k.id, q = l[L], !hasProp(r, L) && q && !q.enabled && o.enable(k, this);
|
|
13315
13315
|
})), eachProp(this.pluginMaps, bind(this, function(k) {
|
|
13316
13316
|
var z = getOwn(l, k.id);
|
|
13317
13317
|
z && !z.enabled && o.enable(k, this);
|
|
13318
13318
|
})), this.enabling = !1, this.check();
|
|
13319
13319
|
},
|
|
13320
13320
|
on: function(k, z) {
|
|
13321
|
-
var
|
|
13322
|
-
|
|
13321
|
+
var L = this.events[k];
|
|
13322
|
+
L || (L = this.events[k] = []), L.push(z);
|
|
13323
13323
|
},
|
|
13324
13324
|
emit: function(k, z) {
|
|
13325
|
-
each(this.events[k], function(
|
|
13326
|
-
|
|
13325
|
+
each(this.events[k], function(L) {
|
|
13326
|
+
L(z);
|
|
13327
13327
|
}), k === "error" && delete this.events[k];
|
|
13328
13328
|
}
|
|
13329
13329
|
};
|
|
13330
13330
|
function B(k) {
|
|
13331
13331
|
hasProp(p, k[0]) || I(F(k[0], null, !0)).init(k[1], k[2]);
|
|
13332
13332
|
}
|
|
13333
|
-
function w(k, z,
|
|
13334
|
-
k.detachEvent && !isOpera ? q && k.detachEvent(q, z) : k.removeEventListener(
|
|
13333
|
+
function w(k, z, L, q) {
|
|
13334
|
+
k.detachEvent && !isOpera ? q && k.detachEvent(q, z) : k.removeEventListener(L, z, !1);
|
|
13335
13335
|
}
|
|
13336
13336
|
function M(k) {
|
|
13337
13337
|
var z = k.currentTarget || k.srcElement;
|
|
@@ -13368,51 +13368,51 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13368
13368
|
configure: function(k) {
|
|
13369
13369
|
if (k.baseUrl && k.baseUrl.charAt(k.baseUrl.length - 1) !== "/" && (k.baseUrl += "/"), typeof k.urlArgs == "string") {
|
|
13370
13370
|
var z = k.urlArgs;
|
|
13371
|
-
k.urlArgs = function(
|
|
13371
|
+
k.urlArgs = function(E, G) {
|
|
13372
13372
|
return (G.indexOf("?") === -1 ? "?" : "&") + z;
|
|
13373
13373
|
};
|
|
13374
13374
|
}
|
|
13375
|
-
var
|
|
13375
|
+
var L = a.shim, q = {
|
|
13376
13376
|
paths: !0,
|
|
13377
13377
|
bundles: !0,
|
|
13378
13378
|
config: !0,
|
|
13379
13379
|
map: !0
|
|
13380
13380
|
};
|
|
13381
|
-
eachProp(k, function(
|
|
13382
|
-
q[G] ? (a[G] || (a[G] = {}), mixin(a[G],
|
|
13383
|
-
}), k.bundles && eachProp(k.bundles, function(
|
|
13384
|
-
each(
|
|
13381
|
+
eachProp(k, function(E, G) {
|
|
13382
|
+
q[G] ? (a[G] || (a[G] = {}), mixin(a[G], E, !0, !0)) : a[G] = E;
|
|
13383
|
+
}), k.bundles && eachProp(k.bundles, function(E, G) {
|
|
13384
|
+
each(E, function(U) {
|
|
13385
13385
|
U !== G && (h[U] = G);
|
|
13386
13386
|
});
|
|
13387
|
-
}), k.shim && (eachProp(k.shim, function(
|
|
13388
|
-
isArray(
|
|
13389
|
-
deps:
|
|
13390
|
-
}), (
|
|
13391
|
-
}), a.shim =
|
|
13387
|
+
}), k.shim && (eachProp(k.shim, function(E, G) {
|
|
13388
|
+
isArray(E) && (E = {
|
|
13389
|
+
deps: E
|
|
13390
|
+
}), (E.exports || E.init) && !E.exportsFn && (E.exportsFn = o.makeShimExports(E)), L[G] = E;
|
|
13391
|
+
}), a.shim = L), k.packages && each(k.packages, function(E) {
|
|
13392
13392
|
var G, U;
|
|
13393
|
-
|
|
13394
|
-
}), eachProp(l, function(
|
|
13395
|
-
!
|
|
13393
|
+
E = typeof E == "string" ? { name: E } : E, U = E.name, G = E.location, G && (a.paths[U] = E.location), a.pkgs[U] = E.name + "/" + (E.main || "main").replace(currDirRegExp, "").replace(jsSuffixRegExp, "");
|
|
13394
|
+
}), eachProp(l, function(E, G) {
|
|
13395
|
+
!E.inited && !E.map.unnormalized && (E.map = F(G, null, !0));
|
|
13396
13396
|
}), (k.deps || k.callback) && o.require(k.deps || [], k.callback);
|
|
13397
13397
|
},
|
|
13398
13398
|
makeShimExports: function(k) {
|
|
13399
13399
|
function z() {
|
|
13400
|
-
var
|
|
13401
|
-
return k.init && (
|
|
13400
|
+
var L;
|
|
13401
|
+
return k.init && (L = k.init.apply(global, arguments)), L || k.exports && getGlobal(k.exports);
|
|
13402
13402
|
}
|
|
13403
13403
|
return z;
|
|
13404
13404
|
},
|
|
13405
13405
|
makeRequire: function(k, z) {
|
|
13406
13406
|
z = z || {};
|
|
13407
|
-
function
|
|
13407
|
+
function L(q, E, G) {
|
|
13408
13408
|
var U, H, J;
|
|
13409
|
-
return z.enableBuildCallback &&
|
|
13410
|
-
$(), J = I(F(null, k)), J.skipMap = z.skipMap, J.init(q,
|
|
13409
|
+
return z.enableBuildCallback && E && isFunction(E) && (E.__requireJsBuild = !0), typeof q == "string" ? isFunction(E) ? T(makeError("requireargs", "Invalid require call"), G) : k && hasProp(r, q) ? r[q](l[k.id]) : req.get ? req.get(o, q, k, L) : (H = F(q, k, !1, !0), U = H.id, hasProp(p, U) ? p[U] : T(makeError("notloaded", 'Module name "' + U + '" has not been loaded yet for context: ' + e + (k ? "" : ". Use require([])")))) : ($(), o.nextTick(function() {
|
|
13410
|
+
$(), J = I(F(null, k)), J.skipMap = z.skipMap, J.init(q, E, G, {
|
|
13411
13411
|
enabled: !0
|
|
13412
13412
|
}), N();
|
|
13413
|
-
}),
|
|
13413
|
+
}), L);
|
|
13414
13414
|
}
|
|
13415
|
-
return mixin(
|
|
13415
|
+
return mixin(L, {
|
|
13416
13416
|
isBrowser,
|
|
13417
13417
|
/**
|
|
13418
13418
|
* Converts a module name + .extension into an URL path.
|
|
@@ -13420,12 +13420,12 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13420
13420
|
* plain URLs like nameToUrl.
|
|
13421
13421
|
*/
|
|
13422
13422
|
toUrl: function(q) {
|
|
13423
|
-
var
|
|
13424
|
-
return G !== -1 && (!H || G > 1) && (
|
|
13423
|
+
var E, G = q.lastIndexOf("."), U = q.split("/")[0], H = U === "." || U === "..";
|
|
13424
|
+
return G !== -1 && (!H || G > 1) && (E = q.substring(G, q.length), q = q.substring(0, G)), o.nameToUrl(b(
|
|
13425
13425
|
q,
|
|
13426
13426
|
k && k.id,
|
|
13427
13427
|
!0
|
|
13428
|
-
),
|
|
13428
|
+
), E, !0);
|
|
13429
13429
|
},
|
|
13430
13430
|
defined: function(q) {
|
|
13431
13431
|
return hasProp(p, F(q, k, !1, !0).id);
|
|
@@ -13433,13 +13433,13 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13433
13433
|
specified: function(q) {
|
|
13434
13434
|
return q = F(q, k, !1, !0).id, hasProp(p, q) || hasProp(l, q);
|
|
13435
13435
|
}
|
|
13436
|
-
}), k || (
|
|
13436
|
+
}), k || (L.undef = function(q) {
|
|
13437
13437
|
D();
|
|
13438
|
-
var
|
|
13439
|
-
G.undefed = !0, S(q), delete p[q], delete m[
|
|
13438
|
+
var E = F(q, k, !0), G = getOwn(l, q);
|
|
13439
|
+
G.undefed = !0, S(q), delete p[q], delete m[E.url], delete u[q], eachReverse(d, function(U, H) {
|
|
13440
13440
|
U[0] === q && d.splice(H, 1);
|
|
13441
13441
|
}), delete o.defQueueMap[q], G && (G.events.defined && (u[q] = G.events), O(q));
|
|
13442
|
-
}),
|
|
13442
|
+
}), L;
|
|
13443
13443
|
},
|
|
13444
13444
|
/**
|
|
13445
13445
|
* Called to enable a module if it is still in the registry
|
|
@@ -13458,15 +13458,15 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13458
13458
|
* @param {String} moduleName the name of the module to potentially complete.
|
|
13459
13459
|
*/
|
|
13460
13460
|
completeLoad: function(k) {
|
|
13461
|
-
var z,
|
|
13461
|
+
var z, L, q, E = getOwn(a.shim, k) || {}, G = E.exports;
|
|
13462
13462
|
for (D(); d.length; ) {
|
|
13463
|
-
if (
|
|
13464
|
-
if (
|
|
13463
|
+
if (L = d.shift(), L[0] === null) {
|
|
13464
|
+
if (L[0] = k, z)
|
|
13465
13465
|
break;
|
|
13466
13466
|
z = !0;
|
|
13467
13467
|
} else
|
|
13468
|
-
|
|
13469
|
-
B(
|
|
13468
|
+
L[0] === k && (z = !0);
|
|
13469
|
+
B(L);
|
|
13470
13470
|
}
|
|
13471
13471
|
if (o.defQueueMap = {}, q = getOwn(l, k), !z && !hasProp(p, k) && q && !q.inited) {
|
|
13472
13472
|
if (a.enforceDefine && (!G || !getGlobal(G)))
|
|
@@ -13476,7 +13476,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13476
13476
|
null,
|
|
13477
13477
|
[k]
|
|
13478
13478
|
));
|
|
13479
|
-
B([k,
|
|
13479
|
+
B([k, E.deps || [], E.exportsFn]);
|
|
13480
13480
|
}
|
|
13481
13481
|
N();
|
|
13482
13482
|
},
|
|
@@ -13487,19 +13487,19 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13487
13487
|
* it is assumed to have already been normalized. This is an
|
|
13488
13488
|
* internal API, not a public one. Use toUrl for the public API.
|
|
13489
13489
|
*/
|
|
13490
|
-
nameToUrl: function(k, z,
|
|
13491
|
-
var q,
|
|
13490
|
+
nameToUrl: function(k, z, L) {
|
|
13491
|
+
var q, E, G, U, H, J, K, W = getOwn(a.pkgs, k);
|
|
13492
13492
|
if (W && (k = W), K = getOwn(h, k), K)
|
|
13493
|
-
return o.nameToUrl(K, z,
|
|
13493
|
+
return o.nameToUrl(K, z, L);
|
|
13494
13494
|
if (req.jsExtRegExp.test(k))
|
|
13495
13495
|
H = k + (z || "");
|
|
13496
13496
|
else {
|
|
13497
|
-
for (q = a.paths,
|
|
13498
|
-
if (U =
|
|
13499
|
-
isArray(J) && (J = J[0]),
|
|
13497
|
+
for (q = a.paths, E = k.split("/"), G = E.length; G > 0; G -= 1)
|
|
13498
|
+
if (U = E.slice(0, G).join("/"), J = getOwn(q, U), J) {
|
|
13499
|
+
isArray(J) && (J = J[0]), E.splice(0, G, J);
|
|
13500
13500
|
break;
|
|
13501
13501
|
}
|
|
13502
|
-
H =
|
|
13502
|
+
H = E.join("/"), H += z || (/^data\:|^blob\:|\?/.test(H) || L ? "" : ".js"), H = (H.charAt(0) === "/" || H.match(/^[\w\+\.\-]+:/) ? "" : a.baseUrl) + H;
|
|
13503
13503
|
}
|
|
13504
13504
|
return a.urlArgs && !/^blob\:/.test(H) ? H + a.urlArgs(k, H) : H;
|
|
13505
13505
|
},
|
|
@@ -13515,8 +13515,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13515
13515
|
*
|
|
13516
13516
|
* @private
|
|
13517
13517
|
*/
|
|
13518
|
-
execCb: function(k, z,
|
|
13519
|
-
return z.apply(q,
|
|
13518
|
+
execCb: function(k, z, L, q) {
|
|
13519
|
+
return z.apply(q, L);
|
|
13520
13520
|
},
|
|
13521
13521
|
/**
|
|
13522
13522
|
* callback for script loads, used to check status of loading.
|
|
@@ -13537,13 +13537,13 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13537
13537
|
onScriptError: function(k) {
|
|
13538
13538
|
var z = M(k);
|
|
13539
13539
|
if (!y(z.id)) {
|
|
13540
|
-
var
|
|
13541
|
-
return eachProp(l, function(q,
|
|
13542
|
-
|
|
13540
|
+
var L = [];
|
|
13541
|
+
return eachProp(l, function(q, E) {
|
|
13542
|
+
E.indexOf("_@r") !== 0 && each(q.depMaps, function(G) {
|
|
13543
13543
|
if (G.id === z.id)
|
|
13544
|
-
return
|
|
13544
|
+
return L.push(E), !0;
|
|
13545
13545
|
});
|
|
13546
|
-
}), T(makeError("scripterror", 'Script error for "' + z.id + (
|
|
13546
|
+
}), T(makeError("scripterror", 'Script error for "' + z.id + (L.length ? '", needed by: ' + L.join(", ") : '"'), k, [z.id]));
|
|
13547
13547
|
}
|
|
13548
13548
|
}
|
|
13549
13549
|
}, o.require = o.makeRequire(), o;
|
|
@@ -15169,14 +15169,14 @@ GridColContext.displayName = "GridColContext";
|
|
|
15169
15169
|
const GridContext = createContext({});
|
|
15170
15170
|
GridContext.displayName = "GridContext";
|
|
15171
15171
|
const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow = (e) => e["x-component"] === "Grid.Row", ColDivider = (e) => {
|
|
15172
|
-
var
|
|
15172
|
+
var I, R, T;
|
|
15173
15173
|
const { token: t } = useToken$1(), n = useRef(null), { dn: o, designable: r } = useDesignable(), { isOver: i, setNodeRef: a } = useDroppable({
|
|
15174
15174
|
id: e.id,
|
|
15175
15175
|
data: e.data,
|
|
15176
15176
|
disabled: !r
|
|
15177
15177
|
}), l = useRef(), c = useMemo(() => i ? {
|
|
15178
15178
|
backgroundColor: new TinyColor(t.colorSettings).setAlpha(0.1).toHex8String()
|
|
15179
|
-
} : {}, [i]), d = (
|
|
15179
|
+
} : {}, [i]), d = (T = (R = (I = useDndContext().active) == null ? void 0 : I.data.current) == null ? void 0 : R.schema) == null ? void 0 : T.parent, p = useMemo(
|
|
15180
15180
|
() => d ? Object.keys(d.properties).length : 0,
|
|
15181
15181
|
[d]
|
|
15182
15182
|
);
|
|
@@ -15185,46 +15185,51 @@ const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow =
|
|
|
15185
15185
|
if (e.first)
|
|
15186
15186
|
m = d !== e.cols[0];
|
|
15187
15187
|
else {
|
|
15188
|
-
const
|
|
15189
|
-
m = d !==
|
|
15190
|
-
}
|
|
15191
|
-
const h = e.cols[e.index], g = e.cols[e.index + 1], {
|
|
15192
|
-
attributes:
|
|
15193
|
-
listeners:
|
|
15194
|
-
setNodeRef:
|
|
15195
|
-
isDragging:
|
|
15188
|
+
const D = e.cols[e.index], O = e.cols[e.index + 1];
|
|
15189
|
+
m = d !== D && O !== d;
|
|
15190
|
+
}
|
|
15191
|
+
const h = e.cols[e.index], g = e.cols[e.index + 1], f = e.first || e.last || !r, {
|
|
15192
|
+
attributes: C,
|
|
15193
|
+
listeners: b,
|
|
15194
|
+
setNodeRef: S,
|
|
15195
|
+
isDragging: y
|
|
15196
15196
|
} = useDraggable({
|
|
15197
|
-
disabled:
|
|
15197
|
+
disabled: f,
|
|
15198
15198
|
id: e.id,
|
|
15199
15199
|
data: {
|
|
15200
15200
|
dividerRef: l,
|
|
15201
15201
|
prevSchema: h,
|
|
15202
15202
|
nextSchema: g
|
|
15203
|
+
},
|
|
15204
|
+
attributes: {
|
|
15205
|
+
tabIndex: f ? -1 : 0
|
|
15203
15206
|
}
|
|
15204
|
-
}), [
|
|
15207
|
+
}), [v, F] = useState([0, 0]);
|
|
15205
15208
|
return useDndMonitor({
|
|
15206
|
-
onDragStart(
|
|
15207
|
-
|
|
15209
|
+
onDragStart(D) {
|
|
15210
|
+
var w, M, $;
|
|
15211
|
+
const O = ($ = (M = (w = D.active) == null ? void 0 : w.data) == null ? void 0 : M.current) == null ? void 0 : $.dividerRef;
|
|
15212
|
+
if (!O || !r)
|
|
15208
15213
|
return;
|
|
15209
|
-
n.current =
|
|
15210
|
-
const
|
|
15211
|
-
|
|
15214
|
+
n.current = D.active.id;
|
|
15215
|
+
const j = O.current, N = j.previousElementSibling, B = j.nextElementSibling;
|
|
15216
|
+
F([N.clientWidth, B.clientWidth]);
|
|
15212
15217
|
},
|
|
15213
|
-
onDragMove(
|
|
15214
|
-
if (!r || !
|
|
15218
|
+
onDragMove(D) {
|
|
15219
|
+
if (!r || !y)
|
|
15215
15220
|
return;
|
|
15216
|
-
n.current ===
|
|
15217
|
-
const
|
|
15218
|
-
|
|
15221
|
+
n.current === D.active.id && (n.current = n.current + "_move");
|
|
15222
|
+
const O = l.current, j = O.previousElementSibling, N = O.nextElementSibling;
|
|
15223
|
+
j.style.width = `${v[0] + D.delta.x}px`, N.style.width = `${v[1] - D.delta.x}px`;
|
|
15219
15224
|
},
|
|
15220
|
-
onDragEnd(
|
|
15221
|
-
var
|
|
15222
|
-
if (!r || !n.current || (
|
|
15225
|
+
onDragEnd(D) {
|
|
15226
|
+
var $;
|
|
15227
|
+
if (!r || !n.current || ($ = n.current) != null && $.startsWith(D.active.id) && !n.current.endsWith("_move") || v[0] <= 0 || v[1] <= 0 || (F([0, 0]), !h || !g))
|
|
15223
15228
|
return;
|
|
15224
|
-
const
|
|
15229
|
+
const O = l.current, j = O.previousElementSibling, N = O.nextElementSibling;
|
|
15225
15230
|
h["x-component-props"] = h["x-component-props"] || {}, g["x-component-props"] = g["x-component-props"] || {};
|
|
15226
|
-
const
|
|
15227
|
-
_.set(h, "x-component-props.width",
|
|
15231
|
+
const B = O.clientWidth * (e.cols.length + 1) / e.cols.length, w = (100 * (j.getBoundingClientRect().width + B) / O.parentElement.clientWidth).toFixed(2), M = (100 * (N.getBoundingClientRect().width + B) / O.parentElement.clientWidth).toFixed(2);
|
|
15232
|
+
_.set(h, "x-component-props.width", w), _.set(g, "x-component-props.width", M), o.emit("batchPatch", {
|
|
15228
15233
|
schemas: [
|
|
15229
15234
|
{
|
|
15230
15235
|
"x-uid": h["x-uid"],
|
|
@@ -15240,16 +15245,16 @@ const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow =
|
|
|
15240
15245
|
}), /* @__PURE__ */ jsx(
|
|
15241
15246
|
"div",
|
|
15242
15247
|
{
|
|
15243
|
-
ref: (
|
|
15244
|
-
m && (a(
|
|
15248
|
+
ref: (D) => {
|
|
15249
|
+
m && (a(D), l.current = D);
|
|
15245
15250
|
},
|
|
15246
15251
|
className: cls("nb-col-divider", "ColDivider"),
|
|
15247
15252
|
style: c,
|
|
15248
15253
|
children: /* @__PURE__ */ jsx(
|
|
15249
15254
|
"div",
|
|
15250
15255
|
P(x(x({
|
|
15251
|
-
ref:
|
|
15252
|
-
},
|
|
15256
|
+
ref: S
|
|
15257
|
+
}, b), C), {
|
|
15253
15258
|
className: e.first || e.last || !r ? null : "DraggableNode"
|
|
15254
15259
|
})
|
|
15255
15260
|
)
|
|
@@ -15538,9 +15543,9 @@ const useTableBlockProps = () => {
|
|
|
15538
15543
|
),
|
|
15539
15544
|
onChange: useCallback(
|
|
15540
15545
|
({ current: S, pageSize: y }, v, F) => {
|
|
15541
|
-
var O, j, N, B, w, M, $, k, z,
|
|
15546
|
+
var O, j, N, B, w, M, $, k, z, L;
|
|
15542
15547
|
const I = (N = (j = (O = t.parent) == null ? void 0 : O["x-decorator-props"]) == null ? void 0 : j.params) == null ? void 0 : N.sort, R = F.order ? F.order === "ascend" ? [F.field] : [`-${F.field}`] : I || i.dragSortBy, T = y || ((M = (w = (B = t.parent) == null ? void 0 : B["x-decorator-props"]) == null ? void 0 : w.params) == null ? void 0 : M.pageSize), D = P(x({}, (z = (k = ($ = a.current) == null ? void 0 : $.service) == null ? void 0 : k.params) == null ? void 0 : z[0]), { page: S || 1, pageSize: T });
|
|
15543
|
-
R && (D.sort = R), (
|
|
15548
|
+
R && (D.sort = R), (L = a.current) == null || L.service.run(D);
|
|
15544
15549
|
},
|
|
15545
15550
|
[t.parent]
|
|
15546
15551
|
),
|
|
@@ -15553,13 +15558,13 @@ const useTableBlockProps = () => {
|
|
|
15553
15558
|
}
|
|
15554
15559
|
const T = R.find((D) => D.uid === t.parent["x-uid"]);
|
|
15555
15560
|
R.forEach((D) => {
|
|
15556
|
-
var $, k, z,
|
|
15561
|
+
var $, k, z, L;
|
|
15557
15562
|
const O = F.find((q) => q.uid === D.uid);
|
|
15558
15563
|
if (!O)
|
|
15559
15564
|
return;
|
|
15560
15565
|
const j = getSourceKey(T, O.field) || i.rowKey || "id", N = [S[j]], B = (($ = D.service.params) == null ? void 0 : $[0]) || {}, w = ((z = (k = D.service.params) == null ? void 0 : k[1]) == null ? void 0 : z.filters) || {};
|
|
15561
15566
|
if (v.includes(S[i.rowKey])) {
|
|
15562
|
-
if ((
|
|
15567
|
+
if ((L = D.clearSelection) == null || L.call(D), D.dataLoadingMode === "manual")
|
|
15563
15568
|
return D.clearData();
|
|
15564
15569
|
delete w[I];
|
|
15565
15570
|
} else
|
|
@@ -15965,10 +15970,10 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
|
|
|
15965
15970
|
var a, l, c, u, d, p, m, h, g, f, C, b, S, y, v, F;
|
|
15966
15971
|
const e = useField(), t = useTableSelectorContext(), n = useFieldSchema(), { getCollectionJoinField: o } = useCollectionManager_deprecated(), r = recursiveParent$1(n, "CollectionField"), i = o(r == null ? void 0 : r["x-collection-field"]);
|
|
15967
15972
|
return useEffect(() => {
|
|
15968
|
-
var R, T, D, O, j, N, B, w, M, $, k, z,
|
|
15973
|
+
var R, T, D, O, j, N, B, w, M, $, k, z, L;
|
|
15969
15974
|
if (!((R = t == null ? void 0 : t.service) != null && R.loading)) {
|
|
15970
|
-
const q = (D = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : D.data.map((
|
|
15971
|
-
e.value = q, (O = e == null ? void 0 : e.setInitialValue) == null || O.call(e, q), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (B = (N = (j = t == null ? void 0 : t.service) == null ? void 0 : j.data) == null ? void 0 : N.meta) == null ? void 0 : B.pageSize, e.componentProps.pagination.total = ($ = (M = (w = t == null ? void 0 : t.service) == null ? void 0 : w.data) == null ? void 0 : M.meta) == null ? void 0 : $.count, e.componentProps.pagination.current = (
|
|
15975
|
+
const q = (D = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : D.data.map((E) => E);
|
|
15976
|
+
e.value = q, (O = e == null ? void 0 : e.setInitialValue) == null || O.call(e, q), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (B = (N = (j = t == null ? void 0 : t.service) == null ? void 0 : j.data) == null ? void 0 : N.meta) == null ? void 0 : B.pageSize, e.componentProps.pagination.total = ($ = (M = (w = t == null ? void 0 : t.service) == null ? void 0 : w.data) == null ? void 0 : M.meta) == null ? void 0 : $.count, e.componentProps.pagination.current = (L = (z = (k = t == null ? void 0 : t.service) == null ? void 0 : k.data) == null ? void 0 : z.meta) == null ? void 0 : L.page;
|
|
15972
15977
|
}
|
|
15973
15978
|
}, [
|
|
15974
15979
|
i == null ? void 0 : i.foreignKey,
|
|
@@ -17002,11 +17007,10 @@ const useFormItemInitializerFields = (e) => {
|
|
|
17002
17007
|
var u;
|
|
17003
17008
|
const { name: t, currentFields: n } = useCollection_deprecated(), { getInterface: o, getCollection: r } = useCollectionManager_deprecated(), i = useForm(), { readPretty: a = i.readPretty, block: l = "Form" } = e || {}, c = useRemoveGridFormItem();
|
|
17004
17009
|
return (u = n == null ? void 0 : n.filter((d) => !d.inherit && (d == null ? void 0 : d.interface) && d.interface !== "snapshot" && d.type !== "sequence")) == null ? void 0 : u.map((d) => {
|
|
17005
|
-
var h, g
|
|
17010
|
+
var h, g;
|
|
17006
17011
|
const p = o(d.interface), m = {
|
|
17007
17012
|
type: "string",
|
|
17008
17013
|
name: d.name,
|
|
17009
|
-
title: ((h = d == null ? void 0 : d.uiSchema) == null ? void 0 : h.title) || d.name,
|
|
17010
17014
|
// 'x-designer': 'FormItem.Designer',
|
|
17011
17015
|
"x-toolbar": "FormItemSchemaToolbar",
|
|
17012
17016
|
"x-settings": "fieldSettings:FormItem",
|
|
@@ -17015,14 +17019,14 @@ const useFormItemInitializerFields = (e) => {
|
|
|
17015
17019
|
"x-collection-field": `${t}.${d.name}`
|
|
17016
17020
|
};
|
|
17017
17021
|
return {
|
|
17018
|
-
name: ((
|
|
17022
|
+
name: ((h = d == null ? void 0 : d.uiSchema) == null ? void 0 : h.title) || d.name,
|
|
17019
17023
|
type: "item",
|
|
17020
|
-
title: ((
|
|
17024
|
+
title: ((g = d == null ? void 0 : d.uiSchema) == null ? void 0 : g.title) || d.name,
|
|
17021
17025
|
Component: "CollectionFieldInitializer",
|
|
17022
17026
|
remove: c,
|
|
17023
|
-
schemaInitialize: (
|
|
17024
|
-
var
|
|
17025
|
-
(
|
|
17027
|
+
schemaInitialize: (f) => {
|
|
17028
|
+
var C;
|
|
17029
|
+
(C = p == null ? void 0 : p.schemaInitialize) == null || C.call(p, f, {
|
|
17026
17030
|
field: d,
|
|
17027
17031
|
block: l,
|
|
17028
17032
|
readPretty: a,
|
|
@@ -18060,7 +18064,7 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
18060
18064
|
})
|
|
18061
18065
|
)
|
|
18062
18066
|
};
|
|
18063
|
-
}, [v, (J = $ == null ? void 0 : $.cols) == null ? void 0 : J.length]),
|
|
18067
|
+
}, [v, (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": v("drag-handler") }) }), [u, v, C]), q = useMemo(() => {
|
|
18064
18068
|
var K;
|
|
18065
18069
|
if (o === !1)
|
|
18066
18070
|
return null;
|
|
@@ -18068,7 +18072,7 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
18068
18072
|
return w(z);
|
|
18069
18073
|
if (k != null && k.InitializerComponent || k != null && k.renderSchemaInitializer)
|
|
18070
18074
|
return k != null && k.InitializerComponent ? /* @__PURE__ */ jsx(k.InitializerComponent, x({}, z)) : (K = k.renderSchemaInitializer) == null ? void 0 : K.call(k, z);
|
|
18071
|
-
}, [k, o, z, M, w]),
|
|
18075
|
+
}, [k, o, z, M, w]), E = useMemo(() => r !== !1 && B ? N() : null, [B, N, r]), G = useRef(null), U = "hidden";
|
|
18072
18076
|
useEffect(() => {
|
|
18073
18077
|
const K = G.current;
|
|
18074
18078
|
let W = K == null ? void 0 : K.parentElement;
|
|
@@ -18108,9 +18112,9 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
18108
18112
|
j[1] && /* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: `${y("Reference template")}: ${`${j[1]}` || y("Untitled")}` })
|
|
18109
18113
|
] }) }),
|
|
18110
18114
|
/* @__PURE__ */ jsx("div", { className: cls("toolbar-icons", a), style: l, children: /* @__PURE__ */ jsxs(Space$1, { size: 3, align: "center", className: d, style: p, children: [
|
|
18111
|
-
|
|
18115
|
+
L,
|
|
18112
18116
|
/* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: O, children: q }),
|
|
18113
|
-
|
|
18117
|
+
E
|
|
18114
18118
|
] }) })
|
|
18115
18119
|
]
|
|
18116
18120
|
}
|
|
@@ -18204,10 +18208,10 @@ const SchemaToolbarErrorFallback = (e) => {
|
|
|
18204
18208
|
[t, p]
|
|
18205
18209
|
), v = useCallback(
|
|
18206
18210
|
(w, M = !1, $) => {
|
|
18207
|
-
var
|
|
18211
|
+
var L;
|
|
18208
18212
|
if (!w)
|
|
18209
18213
|
return [];
|
|
18210
|
-
const k = (
|
|
18214
|
+
const k = (L = p($)) == null ? void 0 : L.getCollection(w);
|
|
18211
18215
|
return (k == null ? void 0 : k.getChildrenCollections(M)) || [];
|
|
18212
18216
|
},
|
|
18213
18217
|
[t, p]
|
|
@@ -18222,19 +18226,19 @@ const SchemaToolbarErrorFallback = (e) => {
|
|
|
18222
18226
|
var ee;
|
|
18223
18227
|
const {
|
|
18224
18228
|
association: z = !1,
|
|
18225
|
-
cached:
|
|
18229
|
+
cached: L = {},
|
|
18226
18230
|
collectionNames: q = [w],
|
|
18227
|
-
maxDepth:
|
|
18231
|
+
maxDepth: E = 1,
|
|
18228
18232
|
allowAllTypes: G = !1,
|
|
18229
18233
|
exceptInterfaces: U = [],
|
|
18230
18234
|
prefixFieldValue: H = "",
|
|
18231
18235
|
usePrefix: J = !1,
|
|
18232
18236
|
dataSource: K
|
|
18233
18237
|
} = k || {};
|
|
18234
|
-
if (q.length - 1 >
|
|
18238
|
+
if (q.length - 1 > E)
|
|
18235
18239
|
return;
|
|
18236
|
-
if (
|
|
18237
|
-
return _.cloneDeep(
|
|
18240
|
+
if (L[w])
|
|
18241
|
+
return _.cloneDeep(L[w]);
|
|
18238
18242
|
M && typeof M == "string" && (M = [M]), $ && typeof $ == "string" && ($ = [$]);
|
|
18239
18243
|
const W = b(w, K), X = (ee = W == null ? void 0 : W.filter(
|
|
18240
18244
|
(Z) => Z.interface && !U.includes(Z.interface) && (G || M && M.includes(Z.type) || $ && $.includes(Z.interface) || (z && Z.target && Z.target !== w && Array.isArray(z) ? z.includes(Z.interface) : !1))
|
|
@@ -18245,14 +18249,14 @@ const SchemaToolbarErrorFallback = (e) => {
|
|
|
18245
18249
|
label: f((re = Z == null ? void 0 : Z.uiSchema) == null ? void 0 : re.title) || Z.name
|
|
18246
18250
|
}, Z);
|
|
18247
18251
|
return z && Z.target && (ne.children = q.includes(Z.target) ? [] : I(Z.target, M, $, P(x({}, k), {
|
|
18248
|
-
cached:
|
|
18252
|
+
cached: L,
|
|
18249
18253
|
dataSource: K,
|
|
18250
18254
|
collectionNames: [...q, Z.target],
|
|
18251
18255
|
prefixFieldValue: J ? H ? `${H}.${Z.name}` : Z.name : "",
|
|
18252
18256
|
usePrefix: J
|
|
18253
18257
|
})), !((se = ne.children) != null && se.length)) ? null : ne;
|
|
18254
18258
|
}).filter(Boolean);
|
|
18255
|
-
return
|
|
18259
|
+
return L[w] = X, X;
|
|
18256
18260
|
},
|
|
18257
18261
|
[b]
|
|
18258
18262
|
), R = useCallback(
|
|
@@ -21668,7 +21672,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21668
21672
|
initialValues: c,
|
|
21669
21673
|
width: u = "fit-content",
|
|
21670
21674
|
noRecord: d = !1,
|
|
21671
|
-
ModalContextProvider: p = (
|
|
21675
|
+
ModalContextProvider: p = (E) => /* @__PURE__ */ jsx(Fragment$1, { children: E.children })
|
|
21672
21676
|
} = q, m = Y(q, [
|
|
21673
21677
|
"hidden",
|
|
21674
21678
|
"title",
|
|
@@ -21681,14 +21685,14 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21681
21685
|
"width",
|
|
21682
21686
|
"noRecord",
|
|
21683
21687
|
"ModalContextProvider"
|
|
21684
|
-
]), h = useContext(SchemaOptionsContext), g = useCollection(), f = useAPIClient(), C = useApp(), { theme: b } = useGlobalTheme(), S = useBlockRequestContext(), y = useFormActiveFields(), { locale: v } = useContext(ConfigProvider.ConfigContext), F = useDataSourceManager(), I = useDataSourceKey(), R = useCollectionRecord(), { association: T } = useDataBlockProps() || {}, D = useCurrentRecord(), O = useFormBlockContext(), j = useBlockContext(), { getOperators: N } = useOperators(), B = useLocationSearch(), w = useVariables$1(), { formValue: M, collection: $, parent: k } = useSubFormValue(), z = useCurrentPopupRecord(),
|
|
21688
|
+
]), h = useContext(SchemaOptionsContext), g = useCollection(), f = useAPIClient(), C = useApp(), { theme: b } = useGlobalTheme(), S = useBlockRequestContext(), y = useFormActiveFields(), { locale: v } = useContext(ConfigProvider.ConfigContext), F = useDataSourceManager(), I = useDataSourceKey(), R = useCollectionRecord(), { association: T } = useDataBlockProps() || {}, D = useCurrentRecord(), O = useFormBlockContext(), j = useBlockContext(), { getOperators: N } = useOperators(), B = useLocationSearch(), w = useVariables$1(), { formValue: M, collection: $, parent: k } = useSubFormValue(), z = useCurrentPopupRecord(), L = useParentPopupRecord();
|
|
21685
21689
|
return t ? null : /* @__PURE__ */ jsx(
|
|
21686
21690
|
SchemaSettingsItem,
|
|
21687
21691
|
P(x({
|
|
21688
21692
|
title: n
|
|
21689
21693
|
}, m), {
|
|
21690
21694
|
onClick: () => V(void 0, null, function* () {
|
|
21691
|
-
const
|
|
21695
|
+
const E = l ? yield l() : c, G = _.isFunction(e.schema) ? e.schema() : e.schema;
|
|
21692
21696
|
FormDialog(
|
|
21693
21697
|
{ title: G.title || n, width: u },
|
|
21694
21698
|
() => /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: N(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: w, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: j, children: /* @__PURE__ */ jsx(
|
|
@@ -21697,8 +21701,8 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21697
21701
|
recordData: z == null ? void 0 : z.value,
|
|
21698
21702
|
collection: z == null ? void 0 : z.collection,
|
|
21699
21703
|
parent: {
|
|
21700
|
-
recordData:
|
|
21701
|
-
collection:
|
|
21704
|
+
recordData: L == null ? void 0 : L.value,
|
|
21705
|
+
collection: L == null ? void 0 : L.collection
|
|
21702
21706
|
},
|
|
21703
21707
|
children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : R, children: /* @__PURE__ */ jsx(CurrentRecordContextProvider, P(x({}, D), { children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: O, children: /* @__PURE__ */ jsx(SubFormProvider, { value: { value: M, collection: $, parent: k }, children: /* @__PURE__ */ jsx(
|
|
21704
21708
|
FormActiveFieldsProvider,
|
|
@@ -21744,7 +21748,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21744
21748
|
) }) }) }) }),
|
|
21745
21749
|
b
|
|
21746
21750
|
).open({
|
|
21747
|
-
initialValues:
|
|
21751
|
+
initialValues: E,
|
|
21748
21752
|
effects: i
|
|
21749
21753
|
}).then((U) => (a(U), U)).catch((U) => {
|
|
21750
21754
|
console.error(U);
|
|
@@ -22582,7 +22586,7 @@ const getActionContext = (e) => {
|
|
|
22582
22586
|
var n;
|
|
22583
22587
|
return ((n = e.fieldSchema) == null ? void 0 : n["x-action-context"]) || {};
|
|
22584
22588
|
}, SchemaSettingsDefaultValue = function e(t) {
|
|
22585
|
-
var k, z,
|
|
22589
|
+
var k, z, L;
|
|
22586
22590
|
const n = useFieldSchema(), o = (k = t == null ? void 0 : t.fieldSchema) != null ? k : n, r = useField(), { dn: i } = useDesignable(), { t: a } = useTranslation(), l = useActionContext(), c = getActionContext(l).collection;
|
|
22587
22591
|
let u;
|
|
22588
22592
|
const { getField: d } = useCollection_deprecated(), { getCollectionJoinField: p, getCollectionFields: m, getAllCollectionsInheritChain: h } = useCollectionManager_deprecated(), g = useVariables$1(), f = useLocalVariables$1(), C = useCollection_deprecated(), b = useRecord(), { form: S } = useFormBlockContext(), { getFields: y } = useCollectionFilterOptionsV2(C), { isInSubForm: v, isInSubTable: F } = useFlag() || {}, { name: I } = C, R = useMemo(
|
|
@@ -22590,12 +22594,12 @@ const getActionContext = (e) => {
|
|
|
22590
22594
|
[o, p, d]
|
|
22591
22595
|
), T = _.omit(o, "required");
|
|
22592
22596
|
R != null && R.target && (u = p(
|
|
22593
|
-
`${R.target}.${((
|
|
22597
|
+
`${R.target}.${((L = (z = o["x-component-props"]) == null ? void 0 : z.fieldNames) == null ? void 0 : L.label) || "id"}`
|
|
22594
22598
|
));
|
|
22595
22599
|
const D = (R == null ? void 0 : R.interface) === "m2o" && findParentFieldSchema(o), O = D && p(D == null ? void 0 : D["x-collection-field"]), j = useTableBlockContext(), N = (R == null ? void 0 : R.interface) === "m2m" || (R == null ? void 0 : R.interface) === "mbm" || (O == null ? void 0 : O.type) === "hasMany" && (R == null ? void 0 : R.interface) === "m2o", B = useCallback(
|
|
22596
22600
|
(q) => {
|
|
22597
|
-
const
|
|
22598
|
-
return !(G != null && G.length) &&
|
|
22601
|
+
const E = q.find((U) => U.value === "$nForm"), G = m(I);
|
|
22602
|
+
return !(G != null && G.length) && E && (E.children = formatVariableScop(y())), q;
|
|
22599
22603
|
},
|
|
22600
22604
|
[y, I]
|
|
22601
22605
|
), w = useMemo(() => ({
|
|
@@ -22630,7 +22634,7 @@ const getActionContext = (e) => {
|
|
|
22630
22634
|
localVariables: f,
|
|
22631
22635
|
getAllCollectionsInheritChain: h
|
|
22632
22636
|
}),
|
|
22633
|
-
renderSchemaComponent: function(
|
|
22637
|
+
renderSchemaComponent: function(E) {
|
|
22634
22638
|
const G = useMemo(() => _.cloneDeep(T) || {}, []);
|
|
22635
22639
|
G["x-read-pretty"] = !1, G["x-disabled"] = !1, _.set(G, "x-decorator-props.showTitle", !1);
|
|
22636
22640
|
const U = getFieldDefaultValue(G, R);
|
|
@@ -22652,7 +22656,7 @@ const getActionContext = (e) => {
|
|
|
22652
22656
|
}),
|
|
22653
22657
|
[G, U]
|
|
22654
22658
|
);
|
|
22655
|
-
return _.set(H, "x-component-props.onChange",
|
|
22659
|
+
return _.set(H, "x-component-props.onChange", E.onChange), /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(SchemaComponent, { schema: H }) });
|
|
22656
22660
|
}
|
|
22657
22661
|
}),
|
|
22658
22662
|
title: a("Default value"),
|
|
@@ -22676,11 +22680,11 @@ const getActionContext = (e) => {
|
|
|
22676
22680
|
]), $ = useCallback(
|
|
22677
22681
|
(q) => {
|
|
22678
22682
|
var G, U, H;
|
|
22679
|
-
const
|
|
22683
|
+
const E = {
|
|
22680
22684
|
"x-uid": o["x-uid"]
|
|
22681
22685
|
};
|
|
22682
|
-
o.default = (G = q.default) != null ? G : null, isVariable$1(q.default) || (U = r.setInitialValue) == null || U.call(r, q.default),
|
|
22683
|
-
schema:
|
|
22686
|
+
o.default = (G = q.default) != null ? G : null, isVariable$1(q.default) || (U = r.setInitialValue) == null || U.call(r, q.default), E.default = (H = q.default) != null ? H : null, i.emit("patch", {
|
|
22687
|
+
schema: E,
|
|
22684
22688
|
currentSchema: n
|
|
22685
22689
|
});
|
|
22686
22690
|
},
|
|
@@ -23468,7 +23472,7 @@ const useGetFilterOptions = () => {
|
|
|
23468
23472
|
};
|
|
23469
23473
|
});
|
|
23470
23474
|
}, TableColumnDesigner$1 = (e) => {
|
|
23471
|
-
var j, N, B, w, M, $, k, z,
|
|
23475
|
+
var j, N, B, w, M, $, k, z, L, q, E, G;
|
|
23472
23476
|
const { uiSchema: t, fieldSchema: n, collectionField: o } = e, { form: r } = useFormBlockContext(), { getInterface: i, getCollection: a } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = ((j = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : j.fieldNames) || ((N = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : N.fieldNames), m = useLabelFields$1((B = o == null ? void 0 : o.target) != null ? B : o == null ? void 0 : o.targetCollection), h = useColorFields((w = o == null ? void 0 : o.target) != null ? w : o == null ? void 0 : o.targetCollection), g = i(o == null ? void 0 : o.interface), f = a(o == null ? void 0 : o.target), C = isFileCollection$2(f), b = ["QuickEdit", "FormItem"].includes(n["x-decorator"]), { currentMode: S } = useAssociationFieldContext(), { isAllowToSetDefaultValue: y } = useIsAllowToSetDefaultValue({ collectionField: o, fieldSchema: n }), v = ["datetime", "createdAt", "updatedAt"].includes(o == null ? void 0 : o.interface), F = ["obo", "oho", "o2o", "o2m", "m2m", "m2o", "snapshot"].includes(
|
|
23473
23477
|
o == null ? void 0 : o.interface
|
|
23474
23478
|
), I = useFieldModeOptions({ fieldSchema: n }), R = ((M = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : M.mode) || "Select";
|
|
@@ -23511,7 +23515,7 @@ const useGetFilterOptions = () => {
|
|
|
23511
23515
|
SchemaSettingsDataScope,
|
|
23512
23516
|
{
|
|
23513
23517
|
collectionName: o == null ? void 0 : o.target,
|
|
23514
|
-
defaultFilter: ((
|
|
23518
|
+
defaultFilter: ((L = (z = (k = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : k.service) == null ? void 0 : z.params) == null ? void 0 : L.filter) || {},
|
|
23515
23519
|
form: r,
|
|
23516
23520
|
onSubmit: ({ filter: U }) => {
|
|
23517
23521
|
var J, K;
|
|
@@ -23580,7 +23584,7 @@ const useGetFilterOptions = () => {
|
|
|
23580
23584
|
SchemaSettingsSwitchItem,
|
|
23581
23585
|
{
|
|
23582
23586
|
title: c("Enable link"),
|
|
23583
|
-
checked: ((
|
|
23587
|
+
checked: ((E = n["x-component-props"]) == null ? void 0 : E.enableLink) !== !1,
|
|
23584
23588
|
onChange: (U) => {
|
|
23585
23589
|
n["x-component-props"] = P(x({}, n == null ? void 0 : n["x-component-props"]), {
|
|
23586
23590
|
enableLink: U
|
|
@@ -25552,8 +25556,8 @@ function Input$1(e) {
|
|
|
25552
25556
|
[M.value]: "$",
|
|
25553
25557
|
[M.label]: y("Constant")
|
|
25554
25558
|
} : i ? getTypedConstantOption(B, i, M) : null, [B, i]), k = (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 : {} : {};
|
|
25555
|
-
let
|
|
25556
|
-
t == null ? a ? o && D ?
|
|
25559
|
+
let L;
|
|
25560
|
+
t == null ? a ? o && D ? L = ["$"] : L = [""] : o ? L = ["$"] : L = [" ", B] : L = o ? ["$"] : [" ", B], m && (L = ["$"]), useEffect(() => {
|
|
25557
25561
|
const Z = $ != null ? $ : {}, { component: W } = Z, X = Y(Z, ["component"]), ee = [
|
|
25558
25562
|
...a ? [
|
|
25559
25563
|
{
|
|
@@ -25582,7 +25586,7 @@ function Input$1(e) {
|
|
|
25582
25586
|
}
|
|
25583
25587
|
yield X.loadChildren(X, Z, w), I((ne) => [...ne]);
|
|
25584
25588
|
}
|
|
25585
|
-
}),
|
|
25589
|
+
}), E = useCallback(
|
|
25586
25590
|
(W, X) => {
|
|
25587
25591
|
var ee, Z, ne;
|
|
25588
25592
|
if (W[0] === "$") {
|
|
@@ -25703,8 +25707,8 @@ function Input$1(e) {
|
|
|
25703
25707
|
Cascader$1,
|
|
25704
25708
|
{
|
|
25705
25709
|
options: F,
|
|
25706
|
-
value: w != null ? w :
|
|
25707
|
-
onChange:
|
|
25710
|
+
value: w != null ? w : L,
|
|
25711
|
+
onChange: E,
|
|
25708
25712
|
loadData: q,
|
|
25709
25713
|
changeOnSelect: u,
|
|
25710
25714
|
fieldNames: d,
|
|
@@ -25898,23 +25902,23 @@ function TextArea(e) {
|
|
|
25898
25902
|
), [S, y] = useState(!1), [v, F] = useState(!1), [I, R] = useState(() => renderHTML(p != null ? p : "", b, c)), [T, D] = useState([-1, 0, -1, 0]);
|
|
25899
25903
|
useAntdInputStyle("ant-input");
|
|
25900
25904
|
const { token: O } = theme.useToken(), j = c.join(" "), N = useCallback(
|
|
25901
|
-
(
|
|
25905
|
+
(E) => {
|
|
25902
25906
|
var U;
|
|
25903
|
-
const G = getValue(
|
|
25907
|
+
const G = getValue(E, c);
|
|
25904
25908
|
(U = e.onChange) == null || U.call(e, d ? G.trim() : G);
|
|
25905
25909
|
},
|
|
25906
25910
|
[j, e.onChange, d]
|
|
25907
25911
|
);
|
|
25908
25912
|
useEffect(() => {
|
|
25909
|
-
preloadOptions(r, m).then((
|
|
25910
|
-
f(
|
|
25913
|
+
preloadOptions(r, m).then((E) => {
|
|
25914
|
+
f(E);
|
|
25911
25915
|
}).catch(console.error);
|
|
25912
25916
|
}, [r, JSON.stringify(m)]), useEffect(() => {
|
|
25913
25917
|
R(renderHTML(p != null ? p : "", b, c)), v || D([-1, 0, -1, 0]);
|
|
25914
25918
|
}, [p, b, j]), useEffect(() => {
|
|
25915
25919
|
var U;
|
|
25916
|
-
const { current:
|
|
25917
|
-
if (!
|
|
25920
|
+
const { current: E } = h;
|
|
25921
|
+
if (!E)
|
|
25918
25922
|
return;
|
|
25919
25923
|
const G = new Range();
|
|
25920
25924
|
if (v) {
|
|
@@ -25923,22 +25927,22 @@ function TextArea(e) {
|
|
|
25923
25927
|
const H = (U = window.getSelection) == null ? void 0 : U.call(window);
|
|
25924
25928
|
if (H)
|
|
25925
25929
|
try {
|
|
25926
|
-
const J = Array.from(
|
|
25930
|
+
const J = Array.from(E.childNodes);
|
|
25927
25931
|
J.length && (T[0] === -1 ? T[1] && G.setStartAfter(J[T[1] - 1]) : G.setStart(J[T[0]], T[1]), T[2] === -1 ? T[3] && G.setEndAfter(J[T[3] - 1]) : G.setEnd(J[T[2]], T[3])), G.collapse(!0), H.removeAllRanges(), H.addRange(G);
|
|
25928
25932
|
} catch (J) {
|
|
25929
25933
|
}
|
|
25930
25934
|
} else {
|
|
25931
|
-
const { lastChild: H } =
|
|
25935
|
+
const { lastChild: H } = E;
|
|
25932
25936
|
if (H) {
|
|
25933
25937
|
G.setStartAfter(H), G.setEndAfter(H);
|
|
25934
|
-
const J = Array.from(
|
|
25938
|
+
const J = Array.from(E.childNodes), K = G.startContainer === E ? -1 : J.indexOf(H), W = G.startContainer === E ? -1 : J.indexOf(H);
|
|
25935
25939
|
D([K, G.startOffset, W, G.endOffset]);
|
|
25936
25940
|
}
|
|
25937
25941
|
}
|
|
25938
25942
|
}, [I]);
|
|
25939
25943
|
const B = useCallback(
|
|
25940
|
-
function(
|
|
25941
|
-
const G =
|
|
25944
|
+
function(E) {
|
|
25945
|
+
const G = E.filter((J) => !!J.trim()), { current: U } = h;
|
|
25942
25946
|
if (!U || !G)
|
|
25943
25947
|
return;
|
|
25944
25948
|
U.focus();
|
|
@@ -25949,25 +25953,25 @@ function TextArea(e) {
|
|
|
25949
25953
|
},
|
|
25950
25954
|
[b, N, T]
|
|
25951
25955
|
), w = useCallback(
|
|
25952
|
-
function({ currentTarget:
|
|
25953
|
-
S || (F(!0), D(getCurrentRange(
|
|
25956
|
+
function({ currentTarget: E }) {
|
|
25957
|
+
S || (F(!0), D(getCurrentRange(E)), N(E));
|
|
25954
25958
|
},
|
|
25955
25959
|
[S, N]
|
|
25956
|
-
), M = useCallback(function({ currentTarget:
|
|
25957
|
-
D(getCurrentRange(
|
|
25958
|
-
}, []), $ = useCallback(function(
|
|
25959
|
-
|
|
25960
|
+
), M = useCallback(function({ currentTarget: E }) {
|
|
25961
|
+
D(getCurrentRange(E));
|
|
25962
|
+
}, []), $ = useCallback(function(E) {
|
|
25963
|
+
E.key === "Enter" && E.preventDefault();
|
|
25960
25964
|
}, []), k = useCallback(function() {
|
|
25961
25965
|
y(!0);
|
|
25962
25966
|
}, []), z = useCallback(
|
|
25963
|
-
({ currentTarget:
|
|
25964
|
-
y(!1), F(!0), D(getCurrentRange(
|
|
25967
|
+
({ currentTarget: E }) => {
|
|
25968
|
+
y(!1), F(!0), D(getCurrentRange(E)), N(E);
|
|
25965
25969
|
},
|
|
25966
25970
|
[N]
|
|
25967
|
-
),
|
|
25968
|
-
function(
|
|
25969
|
-
|
|
25970
|
-
const G =
|
|
25971
|
+
), L = useCallback(
|
|
25972
|
+
function(E) {
|
|
25973
|
+
E.preventDefault();
|
|
25974
|
+
const G = E.clipboardData.getData("text/html") || E.clipboardData.getData("text"), U = sanitizeHTML(G, {
|
|
25971
25975
|
allowedTags: ["span"],
|
|
25972
25976
|
allowedAttributes: {
|
|
25973
25977
|
span: ["data-variable", "contenteditable"]
|
|
@@ -25984,7 +25988,7 @@ function TextArea(e) {
|
|
|
25984
25988
|
}
|
|
25985
25989
|
}
|
|
25986
25990
|
}).replace(/\n/g, " ");
|
|
25987
|
-
F(!0), pasteHTML(
|
|
25991
|
+
F(!0), pasteHTML(E.currentTarget, U), D(getCurrentRange(E.currentTarget)), N(E.currentTarget);
|
|
25988
25992
|
},
|
|
25989
25993
|
[N]
|
|
25990
25994
|
), q = e.disabled || C.disabled;
|
|
@@ -26038,7 +26042,7 @@ function TextArea(e) {
|
|
|
26038
26042
|
onInput: w,
|
|
26039
26043
|
onBlur: M,
|
|
26040
26044
|
onKeyDown: $,
|
|
26041
|
-
onPaste:
|
|
26045
|
+
onPaste: L,
|
|
26042
26046
|
onCompositionStart: k,
|
|
26043
26047
|
onCompositionEnd: z,
|
|
26044
26048
|
placeholder: e.placeholder,
|
|
@@ -26283,13 +26287,13 @@ const getVariableComponentWithScope = (e) => (t) => {
|
|
|
26283
26287
|
}), [e]);
|
|
26284
26288
|
return { urlSchema: n, paramsSchema: i, openInNewWindowSchema: a, modeSchema: o, htmlSchema: r };
|
|
26285
26289
|
}, LinkMenuItem = () => {
|
|
26286
|
-
const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { componentCls: o, hashId: r } = useStyles$b(), { urlSchema: i, paramsSchema: a } = useURLAndHTMLSchema(),
|
|
26287
|
-
const
|
|
26290
|
+
const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { componentCls: o, hashId: r } = useStyles$b(), { urlSchema: i, paramsSchema: a, openInNewWindowSchema: l } = useURLAndHTMLSchema(), c = useParentRoute(), { createRoute: u } = useNocoBaseRoutes(), d = useDataSourceManager(), p = useCollectionManager(), m = useCallback(() => V(void 0, null, function* () {
|
|
26291
|
+
const h = yield FormDialog(
|
|
26288
26292
|
e("Add link"),
|
|
26289
26293
|
() => {
|
|
26290
|
-
var
|
|
26291
|
-
const
|
|
26292
|
-
return /* @__PURE__ */ jsx(DataSourceManagerProvider, { dataSourceManager:
|
|
26294
|
+
var v;
|
|
26295
|
+
const y = createMemoryHistory();
|
|
26296
|
+
return /* @__PURE__ */ jsx(DataSourceManagerProvider, { dataSourceManager: d, children: /* @__PURE__ */ jsx(CollectionManagerProvider, { instance: p, dataSource: (v = p == null ? void 0 : p.dataSource) == null ? void 0 : v.key, children: /* @__PURE__ */ jsx(Router, { location: y.location, navigator: y, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: t.scope, components: x({}, t.components), children: /* @__PURE__ */ jsx(FormLayout, { layout: "vertical", children: /* @__PURE__ */ jsx(
|
|
26293
26297
|
SchemaComponent,
|
|
26294
26298
|
{
|
|
26295
26299
|
schema: {
|
|
@@ -26306,7 +26310,8 @@ const getVariableComponentWithScope = (e) => (t) => {
|
|
|
26306
26310
|
"x-decorator": "FormItem"
|
|
26307
26311
|
},
|
|
26308
26312
|
href: i,
|
|
26309
|
-
params: a
|
|
26313
|
+
params: a,
|
|
26314
|
+
openInNewWindow: l
|
|
26310
26315
|
}
|
|
26311
26316
|
}
|
|
26312
26317
|
}
|
|
@@ -26314,20 +26319,21 @@ const getVariableComponentWithScope = (e) => (t) => {
|
|
|
26314
26319
|
},
|
|
26315
26320
|
n
|
|
26316
26321
|
).open({
|
|
26317
|
-
initialValues: {}
|
|
26318
|
-
}), { title:
|
|
26319
|
-
yield
|
|
26322
|
+
initialValues: { openInNewWindow: !0 }
|
|
26323
|
+
}), { title: g, href: f, params: C, icon: b, openInNewWindow: S } = h;
|
|
26324
|
+
yield u({
|
|
26320
26325
|
type: NocoBaseDesktopRouteType.link,
|
|
26321
|
-
title:
|
|
26322
|
-
icon:
|
|
26323
|
-
parentId:
|
|
26326
|
+
title: g,
|
|
26327
|
+
icon: b,
|
|
26328
|
+
parentId: c == null ? void 0 : c.id,
|
|
26324
26329
|
options: {
|
|
26325
|
-
href:
|
|
26326
|
-
params:
|
|
26330
|
+
href: f,
|
|
26331
|
+
params: C,
|
|
26332
|
+
openInNewWindow: S
|
|
26327
26333
|
}
|
|
26328
26334
|
});
|
|
26329
26335
|
}), [t.components, t.scope, e, n]);
|
|
26330
|
-
return /* @__PURE__ */ jsx(SchemaInitializerItem, { title: e("Link"), onClick:
|
|
26336
|
+
return /* @__PURE__ */ jsx(SchemaInitializerItem, { title: e("Link"), onClick: m, className: `${o} ${r}` });
|
|
26331
26337
|
}, useInsertPageSchema = () => {
|
|
26332
26338
|
const e = useAPIClient();
|
|
26333
26339
|
return useCallback(
|
|
@@ -26546,8 +26552,8 @@ const GroupItem$1 = () => {
|
|
|
26546
26552
|
}
|
|
26547
26553
|
);
|
|
26548
26554
|
}, InsertMenuItems$1 = (e) => {
|
|
26549
|
-
const { eventKey: t, title: n, insertPosition: o } = e, { t: r } = useTranslation(), { urlSchema: i, paramsSchema: a } = useURLAndHTMLSchema(),
|
|
26550
|
-
return !
|
|
26555
|
+
const { eventKey: t, title: n, insertPosition: o } = e, { t: r } = useTranslation(), { urlSchema: i, paramsSchema: a, openInNewWindowSchema: l } = useURLAndHTMLSchema(), c = useCurrentRoute(), u = (c == null ? void 0 : c.type) === NocoBaseDesktopRouteType.group, { createRoute: d, moveRoute: p } = useNocoBaseRoutes(), m = useInsertPageSchema();
|
|
26556
|
+
return !u && o === "beforeEnd" ? null : /* @__PURE__ */ jsxs(SchemaSettingsSubMenu, { eventKey: t, title: n, children: [
|
|
26551
26557
|
/* @__PURE__ */ jsx(
|
|
26552
26558
|
SchemaSettingsModalItem,
|
|
26553
26559
|
{
|
|
@@ -26571,19 +26577,19 @@ const GroupItem$1 = () => {
|
|
|
26571
26577
|
}
|
|
26572
26578
|
}
|
|
26573
26579
|
},
|
|
26574
|
-
onSubmit: (
|
|
26575
|
-
var
|
|
26576
|
-
const
|
|
26580
|
+
onSubmit: (f) => V(void 0, [f], function* ({ title: h, icon: g }) {
|
|
26581
|
+
var y;
|
|
26582
|
+
const C = uid(), b = o === "beforeEnd" ? c == null ? void 0 : c.id : c == null ? void 0 : c.parentId, { data: S } = yield d({
|
|
26577
26583
|
type: NocoBaseDesktopRouteType.group,
|
|
26578
|
-
title:
|
|
26579
|
-
icon:
|
|
26584
|
+
title: h,
|
|
26585
|
+
icon: g,
|
|
26580
26586
|
// 'beforeEnd' 表示的是 Insert inner,此时需要把路由插入到当前路由的内部
|
|
26581
|
-
parentId:
|
|
26582
|
-
schemaUid:
|
|
26587
|
+
parentId: b || void 0,
|
|
26588
|
+
schemaUid: C
|
|
26583
26589
|
});
|
|
26584
|
-
insertPositionToMethod$1[o] && (yield
|
|
26585
|
-
sourceId: (
|
|
26586
|
-
targetId:
|
|
26590
|
+
insertPositionToMethod$1[o] && (yield p({
|
|
26591
|
+
sourceId: (y = S == null ? void 0 : S.data) == null ? void 0 : y.id,
|
|
26592
|
+
targetId: c == null ? void 0 : c.id,
|
|
26587
26593
|
sortField: "sort",
|
|
26588
26594
|
method: insertPositionToMethod$1[o]
|
|
26589
26595
|
}));
|
|
@@ -26613,32 +26619,32 @@ const GroupItem$1 = () => {
|
|
|
26613
26619
|
}
|
|
26614
26620
|
}
|
|
26615
26621
|
},
|
|
26616
|
-
onSubmit: (
|
|
26617
|
-
var
|
|
26618
|
-
const
|
|
26622
|
+
onSubmit: (f) => V(void 0, [f], function* ({ title: h, icon: g }) {
|
|
26623
|
+
var I;
|
|
26624
|
+
const C = uid(), b = uid(), S = uid(), y = uid(), v = o === "beforeEnd" ? c == null ? void 0 : c.id : c == null ? void 0 : c.parentId, { data: F } = yield d({
|
|
26619
26625
|
type: NocoBaseDesktopRouteType.page,
|
|
26620
|
-
title:
|
|
26621
|
-
icon:
|
|
26626
|
+
title: h,
|
|
26627
|
+
icon: g,
|
|
26622
26628
|
// 'beforeEnd' 表示的是 Insert inner,此时需要把路由插入到当前路由的内部
|
|
26623
|
-
parentId:
|
|
26624
|
-
schemaUid:
|
|
26625
|
-
menuSchemaUid:
|
|
26629
|
+
parentId: v || void 0,
|
|
26630
|
+
schemaUid: b,
|
|
26631
|
+
menuSchemaUid: C,
|
|
26626
26632
|
enableTabs: !1,
|
|
26627
26633
|
children: [
|
|
26628
26634
|
{
|
|
26629
26635
|
type: NocoBaseDesktopRouteType.tabs,
|
|
26630
|
-
schemaUid:
|
|
26631
|
-
tabSchemaName:
|
|
26636
|
+
schemaUid: S,
|
|
26637
|
+
tabSchemaName: y,
|
|
26632
26638
|
hidden: !0
|
|
26633
26639
|
}
|
|
26634
26640
|
]
|
|
26635
26641
|
});
|
|
26636
|
-
insertPositionToMethod$1[o] && (yield
|
|
26637
|
-
sourceId: (
|
|
26638
|
-
targetId:
|
|
26642
|
+
insertPositionToMethod$1[o] && (yield p({
|
|
26643
|
+
sourceId: (I = F == null ? void 0 : F.data) == null ? void 0 : I.id,
|
|
26644
|
+
targetId: c == null ? void 0 : c.id,
|
|
26639
26645
|
sortField: "sort",
|
|
26640
26646
|
method: insertPositionToMethod$1[o]
|
|
26641
|
-
})),
|
|
26647
|
+
})), m(getPageMenuSchema({ pageSchemaUid: b, tabSchemaUid: S, tabSchemaName: y }));
|
|
26642
26648
|
})
|
|
26643
26649
|
}
|
|
26644
26650
|
),
|
|
@@ -26663,26 +26669,28 @@ const GroupItem$1 = () => {
|
|
|
26663
26669
|
"x-decorator": "FormItem"
|
|
26664
26670
|
},
|
|
26665
26671
|
href: i,
|
|
26666
|
-
params: a
|
|
26672
|
+
params: a,
|
|
26673
|
+
openInNewWindow: l
|
|
26667
26674
|
}
|
|
26668
26675
|
},
|
|
26669
|
-
onSubmit: (
|
|
26670
|
-
var
|
|
26671
|
-
const
|
|
26676
|
+
onSubmit: (S) => V(void 0, [S], function* ({ title: h, icon: g, href: f, params: C, openInNewWindow: b }) {
|
|
26677
|
+
var I;
|
|
26678
|
+
const y = uid(), v = o === "beforeEnd" ? c == null ? void 0 : c.id : c == null ? void 0 : c.parentId, { data: F } = yield d({
|
|
26672
26679
|
type: NocoBaseDesktopRouteType.link,
|
|
26673
|
-
title:
|
|
26674
|
-
icon:
|
|
26680
|
+
title: h,
|
|
26681
|
+
icon: g,
|
|
26675
26682
|
// 'beforeEnd' 表示的是 Insert inner,此时需要把路由插入到当前路由的内部
|
|
26676
|
-
parentId:
|
|
26677
|
-
schemaUid:
|
|
26683
|
+
parentId: v || void 0,
|
|
26684
|
+
schemaUid: y,
|
|
26678
26685
|
options: {
|
|
26679
|
-
href:
|
|
26680
|
-
params:
|
|
26686
|
+
href: f,
|
|
26687
|
+
params: C,
|
|
26688
|
+
openInNewWindow: b
|
|
26681
26689
|
}
|
|
26682
26690
|
});
|
|
26683
|
-
insertPositionToMethod$1[o] && (yield
|
|
26684
|
-
sourceId: (
|
|
26685
|
-
targetId:
|
|
26691
|
+
insertPositionToMethod$1[o] && (yield p({
|
|
26692
|
+
sourceId: (I = F == null ? void 0 : F.data) == null ? void 0 : I.id,
|
|
26693
|
+
targetId: c == null ? void 0 : c.id,
|
|
26686
26694
|
sortField: "sort",
|
|
26687
26695
|
method: insertPositionToMethod$1[o]
|
|
26688
26696
|
}));
|
|
@@ -26708,18 +26716,19 @@ const GroupItem$1 = () => {
|
|
|
26708
26716
|
"x-decorator": "FormItem"
|
|
26709
26717
|
}
|
|
26710
26718
|
}
|
|
26711
|
-
}), [e]), n = useCurrentRoute(), { urlSchema: o, paramsSchema: r } = useURLAndHTMLSchema(),
|
|
26719
|
+
}), [e]), n = useCurrentRoute(), { urlSchema: o, paramsSchema: r, openInNewWindowSchema: i } = useURLAndHTMLSchema(), a = useMemo(() => ({
|
|
26712
26720
|
title: n.title,
|
|
26713
26721
|
icon: n.icon
|
|
26714
26722
|
}), [n.title, n.icon]);
|
|
26715
|
-
n.type === NocoBaseDesktopRouteType.link && (t.properties.href = o, t.properties.params = r, i.href = n.options.href,
|
|
26716
|
-
const { updateRoute:
|
|
26717
|
-
n.id !== void 0 &&
|
|
26718
|
-
title:
|
|
26719
|
-
icon:
|
|
26720
|
-
options:
|
|
26721
|
-
href:
|
|
26722
|
-
params:
|
|
26723
|
+
n.type === NocoBaseDesktopRouteType.link && (t.properties.href = o, t.properties.params = r, t.properties.openInNewWindow = i, a.href = n.options.href, a.params = n.options.params, a.openInNewWindow = n.options.openInNewWindow !== !1);
|
|
26724
|
+
const { updateRoute: l } = useNocoBaseRoutes(), c = useCallback(({ title: u, icon: d, href: p, params: m, openInNewWindow: h }) => {
|
|
26725
|
+
n.id !== void 0 && l(n.id, {
|
|
26726
|
+
title: u,
|
|
26727
|
+
icon: d,
|
|
26728
|
+
options: p || m ? {
|
|
26729
|
+
href: p,
|
|
26730
|
+
params: m,
|
|
26731
|
+
openInNewWindow: h
|
|
26723
26732
|
} : void 0
|
|
26724
26733
|
});
|
|
26725
26734
|
}, []);
|
|
@@ -26729,8 +26738,8 @@ const GroupItem$1 = () => {
|
|
|
26729
26738
|
title: e("Edit"),
|
|
26730
26739
|
eventKey: "edit",
|
|
26731
26740
|
schema: t,
|
|
26732
|
-
initialValues:
|
|
26733
|
-
onSubmit:
|
|
26741
|
+
initialValues: a,
|
|
26742
|
+
onSubmit: c
|
|
26734
26743
|
}
|
|
26735
26744
|
);
|
|
26736
26745
|
}, HiddenMenuItem = () => {
|
|
@@ -27106,43 +27115,43 @@ const useAllAccessDesktopRoutes = () => useContext(AllAccessDesktopRoutesContext
|
|
|
27106
27115
|
const { inHeader: t } = useContext(headerContext);
|
|
27107
27116
|
return /* @__PURE__ */ jsx(RouteContext.Consumer, { children: (n) => n.collapsed && !e.hidden && !t ? /* @__PURE__ */ jsx(Tooltip, { title: e.title, placement: "right", children: e.children }) : e.children });
|
|
27108
27117
|
}, MenuItem = (e) => {
|
|
27109
|
-
var
|
|
27110
|
-
const { item: t } = e, { parseURLAndParams: n } = useParseURLAndParams(), o = useRef(null), r = useLocation();
|
|
27118
|
+
var d;
|
|
27119
|
+
const { item: t } = e, { parseURLAndParams: n } = useParseURLAndParams(), o = useRef(null), r = useLocation(), i = useNavigateNoUpdate(), a = useRouterBasename();
|
|
27111
27120
|
useEffect(() => {
|
|
27112
27121
|
o.current && (o.current.parentElement.parentElement.style.order = 999, o.current.parentElement.parentElement.style.paddingLeft = 0, o.current.parentElement.parentElement.style.padding = 0);
|
|
27113
27122
|
}, []);
|
|
27114
|
-
const
|
|
27115
|
-
(
|
|
27116
|
-
var
|
|
27117
|
-
const
|
|
27118
|
-
|
|
27123
|
+
const l = useCallback(
|
|
27124
|
+
(p) => V(void 0, null, function* () {
|
|
27125
|
+
var f, C, b;
|
|
27126
|
+
const m = (f = t._route.options) == null ? void 0 : f.href, h = (C = t._route.options) == null ? void 0 : C.params, g = (b = t._route.options) == null ? void 0 : b.openInNewWindow;
|
|
27127
|
+
p.preventDefault(), p.stopPropagation();
|
|
27119
27128
|
try {
|
|
27120
|
-
const
|
|
27121
|
-
window.open(
|
|
27122
|
-
} catch (
|
|
27123
|
-
console.error(
|
|
27129
|
+
const S = yield n(m, h || []);
|
|
27130
|
+
g !== !1 ? window.open(S, "_blank") : navigateWithinSelf(m, i, window.location.origin + a);
|
|
27131
|
+
} catch (S) {
|
|
27132
|
+
console.error(S), window.open(m, "_blank");
|
|
27124
27133
|
}
|
|
27125
27134
|
}),
|
|
27126
27135
|
[n, t]
|
|
27127
27136
|
);
|
|
27128
27137
|
if (t._hidden)
|
|
27129
27138
|
return null;
|
|
27130
|
-
const
|
|
27139
|
+
const c = { __route__: t._route };
|
|
27131
27140
|
if (t.key === "x-designer-button")
|
|
27132
27141
|
return /* @__PURE__ */ jsx("div", { ref: o, children: /* @__PURE__ */ jsx(ResetThemeTokenAndKeepAlgorithm, { children: /* @__PURE__ */ jsx(ParentRouteContext.Provider, { value: t._parentRoute, children: /* @__PURE__ */ jsx(NocoBaseRouteContext.Provider, { value: t._route, children: e.children }) }) }) });
|
|
27133
|
-
if (((
|
|
27134
|
-
return /* @__PURE__ */ jsx(ParentRouteContext.Provider, { value: t._parentRoute, children: /* @__PURE__ */ jsx(NocoBaseRouteContext.Provider, { value: t._route, children: /* @__PURE__ */ jsxs(SortableItem, { id: t._route.id, schema:
|
|
27135
|
-
/* @__PURE__ */ jsx("div", { onClick:
|
|
27142
|
+
if (((d = t._route) == null ? void 0 : d.type) === NocoBaseDesktopRouteType.link)
|
|
27143
|
+
return /* @__PURE__ */ jsx(ParentRouteContext.Provider, { value: t._parentRoute, children: /* @__PURE__ */ jsx(NocoBaseRouteContext.Provider, { value: t._route, children: /* @__PURE__ */ jsxs(SortableItem, { id: t._route.id, schema: c, children: [
|
|
27144
|
+
/* @__PURE__ */ jsx("div", { onClick: l, children: /* @__PURE__ */ jsx(Link$1, { to: r.pathname, "aria-label": t.name, children: e.children }) }),
|
|
27136
27145
|
/* @__PURE__ */ jsx(MenuSchemaToolbar, {})
|
|
27137
27146
|
] }) }) });
|
|
27138
|
-
const
|
|
27139
|
-
return /* @__PURE__ */ jsx(ParentRouteContext.Provider, { value: t._parentRoute, children: /* @__PURE__ */ jsx(NocoBaseRouteContext.Provider, { value: t._route, children: /* @__PURE__ */ jsxs(SortableItem, { id: t._route.id, schema:
|
|
27147
|
+
const u = t.redirect || t.path;
|
|
27148
|
+
return /* @__PURE__ */ jsx(ParentRouteContext.Provider, { value: t._parentRoute, children: /* @__PURE__ */ jsx(NocoBaseRouteContext.Provider, { value: t._route, children: /* @__PURE__ */ jsxs(SortableItem, { id: t._route.id, schema: c, children: [
|
|
27140
27149
|
/* @__PURE__ */ jsx(
|
|
27141
27150
|
WithTooltip,
|
|
27142
27151
|
{
|
|
27143
27152
|
title: t.name,
|
|
27144
27153
|
hidden: t._route.type === NocoBaseDesktopRouteType.group || t._depth > 0,
|
|
27145
|
-
children: /* @__PURE__ */ jsx(Link$1, { to:
|
|
27154
|
+
children: /* @__PURE__ */ jsx(Link$1, { to: u, "aria-label": t.name, children: e.children })
|
|
27146
27155
|
}
|
|
27147
27156
|
),
|
|
27148
27157
|
/* @__PURE__ */ jsx(MenuSchemaToolbar, {})
|
|
@@ -27564,14 +27573,14 @@ const useCreateActionProps = () => {
|
|
|
27564
27573
|
return {
|
|
27565
27574
|
onClick() {
|
|
27566
27575
|
return V(this, null, function* () {
|
|
27567
|
-
var z,
|
|
27576
|
+
var z, L, q, E, G, U;
|
|
27568
27577
|
const R = u.map((H) => H.name), {
|
|
27569
27578
|
assignedValues: T = {},
|
|
27570
27579
|
onSuccess: D,
|
|
27571
27580
|
overwriteValues: O,
|
|
27572
27581
|
skipValidator: j,
|
|
27573
27582
|
triggerWorkflows: N
|
|
27574
|
-
} = (z = l == null ? void 0 : l["x-action-settings"]) != null ? z : {}, B = (
|
|
27583
|
+
} = (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: w } = D || {}, M = {}, $ = Object.keys(T).map((H) => V(this, null, function* () {
|
|
27575
27584
|
const J = T[H], K = d(H);
|
|
27576
27585
|
if (isVariable$1(J)) {
|
|
27577
27586
|
const { value: W } = (yield C == null ? void 0 : C.parseVariable(J, b)) || {};
|
|
@@ -27591,7 +27600,7 @@ const useCreateActionProps = () => {
|
|
|
27591
27600
|
});
|
|
27592
27601
|
if (B) {
|
|
27593
27602
|
const H = p();
|
|
27594
|
-
k[(q = H == null ? void 0 : H.name) != null ? q : "parent"] = f, k[(
|
|
27603
|
+
k[(q = H == null ? void 0 : H.name) != null ? q : "parent"] = f, k[(E = H == null ? void 0 : H.foreignKey) != null ? E : "parentId"] = f.id;
|
|
27595
27604
|
}
|
|
27596
27605
|
c.data = t.data || {}, c.data.loading = !0;
|
|
27597
27606
|
try {
|
|
@@ -27754,12 +27763,12 @@ const useCreateActionProps = () => {
|
|
|
27754
27763
|
} = (z = i == null ? void 0 : i["x-action-settings"]) != null ? z : {}, { manualClose: j, redirecting: N, redirectTo: B, successMessage: w, actionAfterSuccess: M } = D || {};
|
|
27755
27764
|
m.data = e.data || {}, m.data.loading = !0;
|
|
27756
27765
|
const $ = {}, k = Object.keys(T).map((q) => V(this, null, function* () {
|
|
27757
|
-
const
|
|
27758
|
-
if (isVariable$1(
|
|
27759
|
-
const { value: U } = (yield g == null ? void 0 : g.parseVariable(
|
|
27766
|
+
const E = T[q], G = C(q);
|
|
27767
|
+
if (isVariable$1(E)) {
|
|
27768
|
+
const { value: U } = (yield g == null ? void 0 : g.parseVariable(E, b)) || {};
|
|
27760
27769
|
U && ($[q] = transformVariableValue(U, { targetCollectionField: G }));
|
|
27761
27770
|
} else
|
|
27762
|
-
|
|
27771
|
+
E !== "" && ($[q] = E);
|
|
27763
27772
|
}));
|
|
27764
27773
|
yield Promise.all(k), (M === "previous" || !M && N !== !0) && (S == null || S(!1)), h.confirm({
|
|
27765
27774
|
title: p("Bulk update"),
|
|
@@ -27767,7 +27776,7 @@ const useCreateActionProps = () => {
|
|
|
27767
27776
|
onOk() {
|
|
27768
27777
|
return V(this, null, function* () {
|
|
27769
27778
|
var G, U, H, J;
|
|
27770
|
-
const { filter: q } = (U = (G = o.params) == null ? void 0 : G[0]) != null ? U : {},
|
|
27779
|
+
const { filter: q } = (U = (G = o.params) == null ? void 0 : G[0]) != null ? U : {}, E = {
|
|
27771
27780
|
values: x({}, $),
|
|
27772
27781
|
filter: q,
|
|
27773
27782
|
forceUpdate: !1
|
|
@@ -27777,11 +27786,11 @@ const useCreateActionProps = () => {
|
|
|
27777
27786
|
message.error(p("Please select the records to be updated")), m.data.loading = !1;
|
|
27778
27787
|
return;
|
|
27779
27788
|
}
|
|
27780
|
-
|
|
27789
|
+
E.filter = { $and: [{ [l || "id"]: { $in: c } }] };
|
|
27781
27790
|
}
|
|
27782
|
-
|
|
27791
|
+
E.filter || (E.forceUpdate = !0);
|
|
27783
27792
|
try {
|
|
27784
|
-
yield t.update(
|
|
27793
|
+
yield t.update(E);
|
|
27785
27794
|
} catch (K) {
|
|
27786
27795
|
} finally {
|
|
27787
27796
|
m.data.loading = !1;
|
|
@@ -27809,7 +27818,7 @@ const useCreateActionProps = () => {
|
|
|
27809
27818
|
return {
|
|
27810
27819
|
onClick() {
|
|
27811
27820
|
return V(this, null, function* () {
|
|
27812
|
-
var q,
|
|
27821
|
+
var q, E, G, U;
|
|
27813
27822
|
const { skipValidator: I, onSuccess: R, requestSettings: T } = (q = o == null ? void 0 : o["x-action-settings"]) != null ? q : {}, { manualClose: D, redirecting: O, redirectTo: j, successMessage: N, actionAfterSuccess: B } = R || {}, w = o == null ? void 0 : o["x-action"];
|
|
27814
27823
|
if (!T.url)
|
|
27815
27824
|
return;
|
|
@@ -27827,7 +27836,7 @@ const useCreateActionProps = () => {
|
|
|
27827
27836
|
});
|
|
27828
27837
|
Object.assign(k, J);
|
|
27829
27838
|
}
|
|
27830
|
-
const
|
|
27839
|
+
const L = {
|
|
27831
27840
|
url: renderTemplate(T.url, { currentRecord: m, currentUser: g }),
|
|
27832
27841
|
method: T.method,
|
|
27833
27842
|
headers: parse(M)({ currentRecord: m, currentUser: g }),
|
|
@@ -27836,7 +27845,7 @@ const useCreateActionProps = () => {
|
|
|
27836
27845
|
};
|
|
27837
27846
|
f.data = c.data || {}, f.data.loading = !0;
|
|
27838
27847
|
try {
|
|
27839
|
-
yield e.request(x({},
|
|
27848
|
+
yield e.request(x({}, L)), f.data.loading = !1, u instanceof TableFieldResource || (G = (E = d == null ? void 0 : d.service) == null ? void 0 : E.refresh) == null || G.call(E), (U = p == null ? void 0 : p.refresh) == null || U.call(p), w === "customize:form:request" && (B === "previous" || !B && O !== !0) && (b == null || b(!1)), N || (message.success(C("Saved successfully")), yield resetFormCorrectly(i), (O && !B || B === "redirect") && j && (isURL(j) ? window.location.href = j : t(j))), D ? S.success({
|
|
27840
27849
|
title: r(N),
|
|
27841
27850
|
onOk: () => V(this, null, function* () {
|
|
27842
27851
|
(O && !B || B === "redirect") && j && (isURL(j) ? window.location.href = j : t(j));
|
|
@@ -27853,14 +27862,14 @@ const useCreateActionProps = () => {
|
|
|
27853
27862
|
return {
|
|
27854
27863
|
onClick(F, I) {
|
|
27855
27864
|
return V(this, null, function* () {
|
|
27856
|
-
var
|
|
27865
|
+
var E;
|
|
27857
27866
|
const {
|
|
27858
27867
|
assignedValues: R = {},
|
|
27859
27868
|
onSuccess: T,
|
|
27860
27869
|
overwriteValues: D,
|
|
27861
27870
|
skipValidator: O,
|
|
27862
27871
|
triggerWorkflows: j
|
|
27863
|
-
} = (
|
|
27872
|
+
} = (E = l == null ? void 0 : l["x-action-settings"]) != null ? E : {}, { manualClose: N, redirecting: B, redirectTo: w, successMessage: M, actionAfterSuccess: $ } = T || {}, k = {}, z = Object.keys(R).map((G) => V(this, null, function* () {
|
|
27864
27873
|
const U = R[G], H = d(G);
|
|
27865
27874
|
if (isVariable$1(U)) {
|
|
27866
27875
|
const { value: J } = (yield b == null ? void 0 : b.parseVariable(U, S)) || {};
|
|
@@ -27869,11 +27878,11 @@ const useCreateActionProps = () => {
|
|
|
27869
27878
|
U !== "" && (k[G] = U);
|
|
27870
27879
|
}));
|
|
27871
27880
|
yield Promise.all(z), O || (yield e.submit());
|
|
27872
|
-
const
|
|
27881
|
+
const L = u.map((G) => G.name), q = getFormValues({
|
|
27873
27882
|
filterByTk: t,
|
|
27874
27883
|
field: n,
|
|
27875
27884
|
form: e,
|
|
27876
|
-
fieldNames:
|
|
27885
|
+
fieldNames: L,
|
|
27877
27886
|
getField: d,
|
|
27878
27887
|
resource: o,
|
|
27879
27888
|
actionFields: (y == null ? void 0 : y("form")) || []
|
|
@@ -28122,25 +28131,25 @@ const useCreateActionProps = () => {
|
|
|
28122
28131
|
var U, H, J, K;
|
|
28123
28132
|
if (!M.find((W) => W.uid === k.uid))
|
|
28124
28133
|
return;
|
|
28125
|
-
const
|
|
28134
|
+
const L = `${$}${t.name}`, q = ((U = k.service.params) == null ? void 0 : U[0]) || {};
|
|
28126
28135
|
(J = (H = k.service.params) == null ? void 0 : H[1]) != null && J.filters || _.set(k.service.params, "[1].filters", {});
|
|
28127
|
-
const
|
|
28136
|
+
const E = k.service.params[1].filters;
|
|
28128
28137
|
if (w.length)
|
|
28129
|
-
L
|
|
28138
|
+
E[L] = {
|
|
28130
28139
|
[S]: w
|
|
28131
28140
|
};
|
|
28132
28141
|
else {
|
|
28133
28142
|
if ((K = k.clearSelection) == null || K.call(k), k.dataLoadingMode === "manual")
|
|
28134
28143
|
return k.clearData();
|
|
28135
|
-
delete L
|
|
28144
|
+
delete E[L];
|
|
28136
28145
|
}
|
|
28137
|
-
const G = mergeFilter([...Object.values(
|
|
28146
|
+
const G = mergeFilter([...Object.values(E), k.defaultFilter]);
|
|
28138
28147
|
return k.doFilter(
|
|
28139
28148
|
P(x({}, q), {
|
|
28140
28149
|
page: 1,
|
|
28141
28150
|
filter: G
|
|
28142
28151
|
}),
|
|
28143
|
-
{ filters:
|
|
28152
|
+
{ filters: E }
|
|
28144
28153
|
);
|
|
28145
28154
|
});
|
|
28146
28155
|
},
|
|
@@ -28162,7 +28171,7 @@ const useCreateActionProps = () => {
|
|
|
28162
28171
|
p = $;
|
|
28163
28172
|
return;
|
|
28164
28173
|
}
|
|
28165
|
-
p = $.filter((
|
|
28174
|
+
p = $.filter((L) => L.label.includes(z));
|
|
28166
28175
|
};
|
|
28167
28176
|
} else
|
|
28168
28177
|
S = `${r}.${C}.$in`, p = (f == null ? void 0 : f.data) || [], m = (w) => {
|
|
@@ -35281,10 +35290,10 @@ const tableBlockSettings = new SchemaSettings({
|
|
|
35281
35290
|
name: "fieldSettings:component:CascadeSelect",
|
|
35282
35291
|
items: [fieldComponent$6, titleField$1, ellipsisSettingsItem, setTheDataScope]
|
|
35283
35292
|
}), SchemaSettingsDateRange = function e(t) {
|
|
35284
|
-
var R, T, D, O, j, N, B, w, M, $, k, z,
|
|
35293
|
+
var R, T, D, O, j, N, B, w, M, $, k, z, L, q, E, G;
|
|
35285
35294
|
const { fieldSchema: n } = t, o = useField(), { dn: r } = useDesignable(), { t: i } = useTranslation(), { getCollectionJoinField: a } = useCollectionManager_deprecated(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, u = a(n == null ? void 0 : n["x-collection-field"]) || {}, d = ((R = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : R.showTime) || ((D = (T = u == null ? void 0 : u.uiSchema) == null ? void 0 : T["x-component-props"]) == null ? void 0 : D.showTime) || !1, p = ((O = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : O.dateFormat) || ((N = (j = u == null ? void 0 : u.uiSchema) == null ? void 0 : j["x-component-props"]) == null ? void 0 : N.dateFormat) || "YYYY-MM-DD", m = ((B = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : B.timeFormat) || ((M = (w = u == null ? void 0 : u.uiSchema) == null ? void 0 : w["x-component-props"]) == null ? void 0 : M.timeFormat) || "HH:mm:ss", h = (($ = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : $.picker) || ((z = (k = u == null ? void 0 : u.uiSchema) == null ? void 0 : k["x-component-props"]) == null ? void 0 : z.picker) || "date";
|
|
35286
35295
|
n["x-read-pretty"] || o.readOnly || o.readPretty;
|
|
35287
|
-
const g = (
|
|
35296
|
+
const g = (L = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : L._minDate, f = (q = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : q._maxDate, C = ((E = u == null ? void 0 : u.uiSchema) == null ? void 0 : E["x-component-props"].gmt) || !1, b = ((G = u == null ? void 0 : u.uiSchema) == null ? void 0 : G["x-component-props"].utc) || !1, S = useRecord(), { form: y } = useFormBlockContext(), v = useCallback(
|
|
35288
35297
|
(U) => /* @__PURE__ */ jsx(
|
|
35289
35298
|
SchemaComponent,
|
|
35290
35299
|
{
|
|
@@ -36745,11 +36754,11 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
36745
36754
|
dataSource: T,
|
|
36746
36755
|
collectionName: N
|
|
36747
36756
|
};
|
|
36748
|
-
const k = y[$], z = y.slice(0, $ + 1).join("."), { fieldPath:
|
|
36757
|
+
const k = y[$], z = y.slice(0, $ + 1).join("."), { fieldPath: L } = getFieldPath$1(z, F), q = r(L, T), E = (M = i(O, T)) == null ? void 0 : M.getPrimaryKey();
|
|
36749
36758
|
if (Array.isArray(I)) {
|
|
36750
36759
|
const G = I.map((U) => {
|
|
36751
|
-
if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[k]) && (U == null ? void 0 : U[
|
|
36752
|
-
const H = `/${O}/${U[q.sourceKey ||
|
|
36760
|
+
if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[k]) && (U == null ? void 0 : U[E]) != null && q != null && q.target) {
|
|
36761
|
+
const H = `/${O}/${U[q.sourceKey || E]}/${k}:${getAction(q.type)}`;
|
|
36753
36762
|
if (hasRequested(H))
|
|
36754
36763
|
return getRequested(H);
|
|
36755
36764
|
const J = o.request({
|
|
@@ -36764,8 +36773,8 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
36764
36773
|
return U == null ? void 0 : U[k];
|
|
36765
36774
|
});
|
|
36766
36775
|
I = removeThroughCollectionFields(_.flatten(yield Promise.all(G)), q);
|
|
36767
|
-
} else if (!(S != null && S.doNotRequest) && shouldToRequest(I[k]) && I[
|
|
36768
|
-
const G = `/${O}/${I[q.sourceKey ||
|
|
36776
|
+
} else if (!(S != null && S.doNotRequest) && shouldToRequest(I[k]) && I[E] != null && (q != null && q.target)) {
|
|
36777
|
+
const G = `/${O}/${I[q.sourceKey || E]}/${k}:${getAction(q.type)}`;
|
|
36769
36778
|
let U = null;
|
|
36770
36779
|
if (hasRequested(G))
|
|
36771
36780
|
U = yield getRequested(G);
|
|
@@ -37236,7 +37245,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37236
37245
|
"onMouseEnter",
|
|
37237
37246
|
"refreshDataBlockRequest",
|
|
37238
37247
|
"confirmTitle"
|
|
37239
|
-
]), v = useDesigner(), F = useField(), I = useFieldSchema(), R = useCompile(), T = useCollectionRecordData(), D = R((U = I["x-component-props"]) == null ? void 0 : U.confirm) || g, O = useMemo(() => (I == null ? void 0 : I["x-linkage-rules"]) || [], [I == null ? void 0 : I["x-linkage-rules"]]), { designable: j } = useDesignable(), N = useComponent(o) || o, B = useVariables$1(), w = useLocalVariables$1({ currentForm: { values: T, readPretty: !1 } }), { visibleWithURL: M, setVisibleWithURL: $ } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: z } = useGetAriaLabelOfAction(l),
|
|
37248
|
+
]), v = useDesigner(), F = useField(), I = useFieldSchema(), R = useCompile(), T = useCollectionRecordData(), D = R((U = I["x-component-props"]) == null ? void 0 : U.confirm) || g, O = useMemo(() => (I == null ? void 0 : I["x-linkage-rules"]) || [], [I == null ? void 0 : I["x-linkage-rules"]]), { designable: j } = useDesignable(), N = useComponent(o) || o, B = useVariables$1(), w = useLocalVariables$1({ currentForm: { values: T, readPretty: !1 } }), { visibleWithURL: M, setVisibleWithURL: $ } = usePopupUtils(), { setSubmitted: k } = useActionContext(), { getAriaLabel: z } = useGetAriaLabelOfAction(l), L = useCollectionParentRecordData(), q = useApp();
|
|
37240
37249
|
useEffect(() => {
|
|
37241
37250
|
F.stateOfLinkageRules && setInitialActionState(F), F.stateOfLinkageRules = {}, O.filter((H) => !H.disabled).forEach((H) => {
|
|
37242
37251
|
var J;
|
|
@@ -37254,7 +37263,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37254
37263
|
});
|
|
37255
37264
|
});
|
|
37256
37265
|
}, [F, O, w, B]);
|
|
37257
|
-
const
|
|
37266
|
+
const E = useCallback(
|
|
37258
37267
|
(H) => {
|
|
37259
37268
|
C == null || C(H);
|
|
37260
37269
|
},
|
|
@@ -37269,7 +37278,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37269
37278
|
field: F,
|
|
37270
37279
|
icon: a,
|
|
37271
37280
|
loading: d,
|
|
37272
|
-
handleMouseEnter:
|
|
37281
|
+
handleMouseEnter: E,
|
|
37273
37282
|
tarComponent: N,
|
|
37274
37283
|
className: i,
|
|
37275
37284
|
type: e.type,
|
|
@@ -37288,7 +37297,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37288
37297
|
setVisibleWithURL: $,
|
|
37289
37298
|
setSubmitted: k,
|
|
37290
37299
|
getAriaLabel: z,
|
|
37291
|
-
parentRecordData:
|
|
37300
|
+
parentRecordData: L,
|
|
37292
37301
|
actionCallback: h
|
|
37293
37302
|
}, y)
|
|
37294
37303
|
);
|
|
@@ -37352,7 +37361,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37352
37361
|
"setSubmitted",
|
|
37353
37362
|
"getAriaLabel",
|
|
37354
37363
|
"parentRecordData"
|
|
37355
|
-
]), [w, M] = useState(!1), { wrapSSR: $, componentCls: k, hashId: z } = useStyles$8(), [
|
|
37364
|
+
]), [w, M] = useState(!1), { wrapSSR: $, componentCls: k, hashId: z } = useStyles$8(), [L, q] = useState(!1), E = 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(R)) || {}, ne = K.disabled || i.disabled || ((de = i.data) == null ? void 0 : de.disabled) || F || Z, re = useMemo(() => {
|
|
37356
37365
|
var ce;
|
|
37357
37366
|
return P(x({}, v), {
|
|
37358
37367
|
opacity: r && (((ce = i == null ? void 0 : i.data) == null ? void 0 : ce.hidden) || !W) && 0.1,
|
|
@@ -37368,7 +37377,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37368
37377
|
buttonStyle: re,
|
|
37369
37378
|
handleMouseEnter: c,
|
|
37370
37379
|
tarComponent: u,
|
|
37371
|
-
designerProps:
|
|
37380
|
+
designerProps: E,
|
|
37372
37381
|
componentCls: k,
|
|
37373
37382
|
hashId: z,
|
|
37374
37383
|
className: d,
|
|
@@ -37398,7 +37407,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37398
37407
|
button: RenderButton(se),
|
|
37399
37408
|
visible: w || T,
|
|
37400
37409
|
setVisible: le,
|
|
37401
|
-
formValueChanged:
|
|
37410
|
+
formValueChanged: L,
|
|
37402
37411
|
setFormValueChanged: q,
|
|
37403
37412
|
openMode: G,
|
|
37404
37413
|
openSize: U,
|
|
@@ -37483,24 +37492,25 @@ const RenderButton = ({
|
|
|
37483
37492
|
confirmTitle: D,
|
|
37484
37493
|
title: O
|
|
37485
37494
|
}) => {
|
|
37486
|
-
const { getDataBlockRequest: j } = useDataBlockRequestGetter(), { t: N } = useTranslation(), { isPopupVisibleControlledByURL: B } = usePopupSettings(), { openPopup: w } = usePopupUtils(), M = useRef(null);
|
|
37487
|
-
|
|
37488
|
-
const
|
|
37489
|
-
(
|
|
37490
|
-
|
|
37495
|
+
const { getDataBlockRequest: j } = useDataBlockRequestGetter(), { t: N } = useTranslation(), { isPopupVisibleControlledByURL: B } = usePopupSettings(), { openPopup: w } = usePopupUtils(), M = useForm(), $ = useRef(null);
|
|
37496
|
+
$.current = w;
|
|
37497
|
+
const k = useCallback(
|
|
37498
|
+
(z, L = !0) => V(void 0, null, function* () {
|
|
37499
|
+
var q;
|
|
37500
|
+
if (!(L && isPortalInBody(z.target)) && (z.preventDefault(), z.stopPropagation(), !i && n)) {
|
|
37491
37501
|
const E = () => {
|
|
37492
|
-
b ? b(
|
|
37493
|
-
var
|
|
37494
|
-
S !== !1 && (T == null || T(!0), (
|
|
37495
|
-
}) : isBulkEditAction(y) || !B() ? (v(!0), F == null || F()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ?
|
|
37502
|
+
b ? b(z, () => {
|
|
37503
|
+
var G, U;
|
|
37504
|
+
S !== !1 && (T == null || T(!0), (U = (G = j()) == null ? void 0 : G.refresh) == null || U.call(G));
|
|
37505
|
+
}) : isBulkEditAction(y) || !B() ? (v(!0), F == null || F()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ? $.current() : (v(!0), F == null || F());
|
|
37496
37506
|
};
|
|
37497
|
-
(I == null ? void 0 : I.enable) !== !1 && (I != null && I.content) ? R.confirm({
|
|
37507
|
+
(I == null ? void 0 : I.enable) !== !1 && (I != null && I.content) ? (yield (q = M == null ? void 0 : M.submit) == null ? void 0 : q.call(M), R.confirm({
|
|
37498
37508
|
title: N(I.title, { title: D || O || (t == null ? void 0 : t.title) }),
|
|
37499
37509
|
content: N(I.content, { title: D || O || (t == null ? void 0 : t.title) }),
|
|
37500
37510
|
onOk: E
|
|
37501
|
-
}) : E();
|
|
37511
|
+
})) : E();
|
|
37502
37512
|
}
|
|
37503
|
-
},
|
|
37513
|
+
}),
|
|
37504
37514
|
[
|
|
37505
37515
|
n,
|
|
37506
37516
|
I == null ? void 0 : I.content,
|
|
@@ -37534,7 +37544,7 @@ const RenderButton = ({
|
|
|
37534
37544
|
buttonStyle: a,
|
|
37535
37545
|
handleMouseEnter: l,
|
|
37536
37546
|
getAriaLabel: g,
|
|
37537
|
-
handleButtonClick:
|
|
37547
|
+
handleButtonClick: k,
|
|
37538
37548
|
tarComponent: c,
|
|
37539
37549
|
componentCls: d,
|
|
37540
37550
|
hashId: p,
|
|
@@ -38112,7 +38122,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
38112
38122
|
}, n), {
|
|
38113
38123
|
headers: b,
|
|
38114
38124
|
params: P(x({
|
|
38115
|
-
|
|
38125
|
+
pageSize: 200
|
|
38116
38126
|
}, n == null ? void 0 : n.params), {
|
|
38117
38127
|
filter: (J = n == null ? void 0 : n.params) == null ? void 0 : J.filter
|
|
38118
38128
|
})
|
|
@@ -38127,7 +38137,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
38127
38137
|
fieldNames: t
|
|
38128
38138
|
}),
|
|
38129
38139
|
[n, t]
|
|
38130
|
-
),
|
|
38140
|
+
), L = useCallback(() => I.current && d ? /* @__PURE__ */ jsx(
|
|
38131
38141
|
d,
|
|
38132
38142
|
{
|
|
38133
38143
|
search: I.current,
|
|
@@ -38151,7 +38161,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
38151
38161
|
(W = n == null ? void 0 : n.params) == null ? void 0 : W.filter
|
|
38152
38162
|
])
|
|
38153
38163
|
}), I.current = K;
|
|
38154
|
-
}),
|
|
38164
|
+
}), E = useMemo(() => {
|
|
38155
38165
|
var ee;
|
|
38156
38166
|
const K = r || i;
|
|
38157
38167
|
if (!((ee = M == null ? void 0 : M.data) != null && ee.length))
|
|
@@ -38176,14 +38186,14 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
38176
38186
|
defaultValue: i
|
|
38177
38187
|
}, f), {
|
|
38178
38188
|
loading: M ? k : !0,
|
|
38179
|
-
options: h(w(
|
|
38180
|
-
rawOptions:
|
|
38189
|
+
options: h(w(E)),
|
|
38190
|
+
rawOptions: E,
|
|
38181
38191
|
dropdownRender: (K) => {
|
|
38182
|
-
const W =
|
|
38192
|
+
const W = E.some((X) => X[t.label] === I.current);
|
|
38183
38193
|
return /* @__PURE__ */ jsx(Fragment$1, { children: v ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
38184
38194
|
!((M == null ? void 0 : M.data.length) === 0 && (I != null && I.current)) && K,
|
|
38185
38195
|
(M == null ? void 0 : M.data.length) > 0 && (I == null ? void 0 : I.current) && !W && /* @__PURE__ */ jsx(Divider$1, { style: { margin: 0 } }),
|
|
38186
|
-
!W && /* @__PURE__ */ jsx(
|
|
38196
|
+
!W && /* @__PURE__ */ jsx(L, {})
|
|
38187
38197
|
] }) : K });
|
|
38188
38198
|
}
|
|
38189
38199
|
})
|
|
@@ -39286,8 +39296,8 @@ const insertPositionToMethod = {
|
|
|
39286
39296
|
}
|
|
39287
39297
|
}), [h, l]), { moveRoute: I } = useNocoBaseRoutes(), R = useCallback(
|
|
39288
39298
|
(B) => V(void 0, [B], function* ({ target: j, position: N }) {
|
|
39289
|
-
var
|
|
39290
|
-
const [w] = ((
|
|
39299
|
+
var L;
|
|
39300
|
+
const [w] = ((L = j == null ? void 0 : j.split) == null ? void 0 : L.call(j, "||")) || [];
|
|
39291
39301
|
if (!w)
|
|
39292
39302
|
return;
|
|
39293
39303
|
const M = findByUid(c, w), $ = createDesignable({
|
|
@@ -40648,8 +40658,8 @@ const AppendsTreeSelect = (e) => {
|
|
|
40648
40658
|
break;
|
|
40649
40659
|
}
|
|
40650
40660
|
if (!$.isLeaf && $.loadChildren) {
|
|
40651
|
-
const
|
|
40652
|
-
|
|
40661
|
+
const L = $.loadChildren($);
|
|
40662
|
+
L != null && L.length && (B.push(...L), $ = L.find((q) => q.value === M.slice(0, k + 1).join(".")));
|
|
40653
40663
|
}
|
|
40654
40664
|
}
|
|
40655
40665
|
}), h((w) => B.reduce((M, $) => Object.assign(M, { [$.value]: $ }), x({}, w)));
|
|
@@ -40739,9 +40749,9 @@ const InternalAssociationSelect$1 = observer$1(
|
|
|
40739
40749
|
const j = uid();
|
|
40740
40750
|
return f.addEffects(j, () => {
|
|
40741
40751
|
onFieldInputValueChange("*", (N) => {
|
|
40742
|
-
var $, k, z,
|
|
40752
|
+
var $, k, z, L, q, E;
|
|
40743
40753
|
const B = filterAnalyses((z = (k = ($ = r.componentProps) == null ? void 0 : $.service) == null ? void 0 : k.params) == null ? void 0 : z.filter) || [], w = getFieldPath(N.address.entire), M = getFieldPath(r.address.entire);
|
|
40744
|
-
B.includes((
|
|
40754
|
+
B.includes((L = N == null ? void 0 : N.props) == null ? void 0 : L.name) && r.value && isEqual(N == null ? void 0 : N.indexes, r == null ? void 0 : r.indexes) && ((q = N == null ? void 0 : N.props) == null ? void 0 : q.name) !== r.props.name && (!((E = r == null ? void 0 : r.indexes) != null && E.length) || isEqual(w, M)) && (r.setValue(null), p(null));
|
|
40745
40755
|
});
|
|
40746
40756
|
}), () => {
|
|
40747
40757
|
f.removeEffects(j);
|
|
@@ -41835,14 +41845,14 @@ const InternalFileManager = (e) => {
|
|
|
41835
41845
|
let M = p(w[y.label]);
|
|
41836
41846
|
if (($ = v == null ? void 0 : v.uiSchema) != null && $.enum)
|
|
41837
41847
|
if (Array.isArray(M))
|
|
41838
|
-
M = M.map((
|
|
41848
|
+
M = M.map((L, q) => {
|
|
41839
41849
|
var G, U;
|
|
41840
|
-
const
|
|
41841
|
-
return
|
|
41850
|
+
const E = (U = (G = v.uiSchema.enum).find) == null ? void 0 : U.call(G, (H) => H.value === L);
|
|
41851
|
+
return E ? /* @__PURE__ */ jsx(Tag, { color: E.color, style: { marginRight: 3 }, children: (E == null ? void 0 : E.label) || L }, q) : /* @__PURE__ */ jsx(Tag, { children: L }, L);
|
|
41842
41852
|
}).reverse();
|
|
41843
41853
|
else {
|
|
41844
|
-
const
|
|
41845
|
-
|
|
41854
|
+
const L = (z = (k = v.uiSchema.enum).find) == null ? void 0 : z.call(k, (q) => q.value === M);
|
|
41855
|
+
L && (M = /* @__PURE__ */ jsx(Tag, { color: L.color, children: L.label }));
|
|
41846
41856
|
}
|
|
41847
41857
|
return (v == null ? void 0 : v.type) === "date" && (M = dayjs(M).format("YYYY-MM-DD")), n ? n({
|
|
41848
41858
|
[y.label]: M || EMPTY,
|
|
@@ -41878,10 +41888,10 @@ const InternalFileManager = (e) => {
|
|
|
41878
41888
|
var $, k, z;
|
|
41879
41889
|
if (B) {
|
|
41880
41890
|
d(!0);
|
|
41881
|
-
const
|
|
41882
|
-
if (d(!1), c(
|
|
41883
|
-
const q = yield T({ parentId: (k = w == null ? void 0 : w.value) == null ? void 0 : k.id }),
|
|
41884
|
-
|
|
41891
|
+
const L = yield T({ parentId: w == null ? void 0 : w.key });
|
|
41892
|
+
if (d(!1), c(L), M === (i == null ? void 0 : i.length) - 1 && (($ = w == null ? void 0 : w.value) != null && $.id)) {
|
|
41893
|
+
const q = yield T({ parentId: (k = w == null ? void 0 : w.value) == null ? void 0 : k.id }), E = [...i];
|
|
41894
|
+
E.splice(M + 1), E[M] = P(x({}, E[M]), { value: w == null ? void 0 : w.value }), E[M + 1] = { key: (z = w == null ? void 0 : w.value) == null ? void 0 : z.id, children: (q == null ? void 0 : q.length) > 0 ? q : null }, a(E), o == null || o(E);
|
|
41885
41895
|
}
|
|
41886
41896
|
}
|
|
41887
41897
|
}), j = (B, w) => V(void 0, null, function* () {
|
|
@@ -41915,7 +41925,7 @@ const InternalFileManager = (e) => {
|
|
|
41915
41925
|
onSearch: (z) => j(z, B),
|
|
41916
41926
|
fieldNames: y,
|
|
41917
41927
|
style: { minWidth: 150 },
|
|
41918
|
-
onChange: (z,
|
|
41928
|
+
onChange: (z, L) => D(z, L, w),
|
|
41919
41929
|
options: u ? [] : R(l),
|
|
41920
41930
|
onDropdownVisibleChange: (z) => O(z, B, w),
|
|
41921
41931
|
notFoundContent: u ? /* @__PURE__ */ jsx(Spin, { size: "small" }) : null
|
|
@@ -42183,10 +42193,10 @@ const InternalNesterCardCss = css`
|
|
|
42183
42193
|
const w = (f == null ? void 0 : f.targetKey) || "id", M = R.map((k) => k[w]).filter(Boolean);
|
|
42184
42194
|
return M.length ? { $and: [{ [`${w}.$ne`]: M }] } : {};
|
|
42185
42195
|
}, j = () => {
|
|
42186
|
-
const { setVisible: w } = useActionContext(), { multiple: M, selectedRows: $, onChange: k, options: z, collectionField:
|
|
42196
|
+
const { setVisible: w } = useActionContext(), { multiple: M, selectedRows: $, onChange: k, options: z, collectionField: L } = useContext(RecordPickerContext);
|
|
42187
42197
|
return {
|
|
42188
42198
|
onClick() {
|
|
42189
|
-
k(M ? unionBy($, z, (
|
|
42199
|
+
k(M ? unionBy($, z, (L == null ? void 0 : L.targetKey) || "id") : ($ == null ? void 0 : $[0]) || null), w(!1);
|
|
42190
42200
|
},
|
|
42191
42201
|
style: {
|
|
42192
42202
|
display: M === !1 ? "none" : "block"
|
|
@@ -43579,14 +43589,14 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43579
43589
|
"loading",
|
|
43580
43590
|
"onClickRow"
|
|
43581
43591
|
]), S = useArrayField(b), y = useFieldSchema(), { size: v = "small" } = (y == null ? void 0 : y["x-component-props"]) || {}, F = useCollection(), R = ((ce = y == null ? void 0 : y.parent) == null ? void 0 : ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: T, allIncludesChildren: D } = R, O = useMemoizedFn(b.onRowDragEnd || (() => {
|
|
43582
|
-
})), j = usePaginationProps$2(n, i), N = useTableColumns$1(b, j), [B, w] = useState(() => T ? D : []), [M, $] = useState(((Ce = S == null ? void 0 : S.data) == null ? void 0 : Ce.selectedRowKeys) || []), [k, z] = useState([]),
|
|
43592
|
+
})), j = usePaginationProps$2(n, i), N = useTableColumns$1(b, j), [B, w] = useState(() => T ? D : []), [M, $] = useState(((Ce = S == null ? void 0 : S.data) == null ? void 0 : Ce.selectedRowKeys) || []), [k, z] = useState([]), L = (p == null ? void 0 : p.type) !== "none", q = useRef(/* @__PURE__ */ new Map()), E = useMemo(() => css`
|
|
43583
43593
|
& > td {
|
|
43584
43594
|
background-color: ${t.controlItemBgActive} !important;
|
|
43585
43595
|
}
|
|
43586
43596
|
&:hover > td {
|
|
43587
43597
|
background-color: ${t.controlItemBgActiveHover} !important;
|
|
43588
43598
|
}
|
|
43589
|
-
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), G = useMemo(() => C ?
|
|
43599
|
+
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), G = useMemo(() => C ? E : "", [E, C]), U = useMemo(() => C ? (Q, te) => ({
|
|
43590
43600
|
onClick: (oe) => {
|
|
43591
43601
|
isPortalInBody(oe.target) || C(Q, z, k);
|
|
43592
43602
|
},
|
|
@@ -43660,14 +43670,14 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43660
43670
|
role: "button",
|
|
43661
43671
|
"aria-label": `table-index-${oe}`,
|
|
43662
43672
|
className: cls(Q ? "checked" : null, rowSelectCheckboxWrapperClass, {
|
|
43663
|
-
[rowSelectCheckboxWrapperClassHover]:
|
|
43673
|
+
[rowSelectCheckboxWrapperClassHover]: L
|
|
43664
43674
|
}),
|
|
43665
43675
|
children: [
|
|
43666
43676
|
/* @__PURE__ */ jsxs("div", { className: cls(Q ? "checked" : null, rowSelectCheckboxContentClass), children: [
|
|
43667
43677
|
l && /* @__PURE__ */ jsx(SortHandle$1, { id: J(te) }),
|
|
43668
43678
|
c && /* @__PURE__ */ jsx(TableIndex$2, { index: oe })
|
|
43669
43679
|
] }),
|
|
43670
|
-
|
|
43680
|
+
L && /* @__PURE__ */ jsx(
|
|
43671
43681
|
"div",
|
|
43672
43682
|
{
|
|
43673
43683
|
className: cls(
|
|
@@ -43692,7 +43702,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43692
43702
|
l,
|
|
43693
43703
|
S,
|
|
43694
43704
|
J,
|
|
43695
|
-
|
|
43705
|
+
L,
|
|
43696
43706
|
ee,
|
|
43697
43707
|
j
|
|
43698
43708
|
]
|
|
@@ -43806,20 +43816,20 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43806
43816
|
var M, $, k;
|
|
43807
43817
|
const { openSize: t } = e, { field: n, options: o, fieldSchema: r } = useAssociationFieldContext(), { t: i } = useTranslation(), [a, l] = useState(!1), [c, u] = useState([]), d = useFieldNames$1(e), p = useFieldSchema(), m = useCompile(), h = useLabelUiSchema$1(o, (d == null ? void 0 : d.label) || "label"), g = useCollectionRecord(), f = useCollection(), { allowSelectExistingRecord: C, allowAddnew: b, allowDisassociation: S } = n.componentProps;
|
|
43808
43818
|
useSubTableSpecialCase({ rootField: n, rootSchema: r });
|
|
43809
|
-
const y = (z,
|
|
43810
|
-
if (
|
|
43819
|
+
const y = (z, L) => {
|
|
43820
|
+
if (L !== void 0 && isArr(n.value) && z !== L)
|
|
43811
43821
|
return action(() => {
|
|
43812
43822
|
const q = n.value[z];
|
|
43813
|
-
return n.value.splice(z, 1), n.value.splice(
|
|
43823
|
+
return n.value.splice(z, 1), n.value.splice(L, 0, q), exchangeArrayState(n, {
|
|
43814
43824
|
fromIndex: z,
|
|
43815
|
-
toIndex:
|
|
43825
|
+
toIndex: L
|
|
43816
43826
|
}), n.onInput(n.value);
|
|
43817
43827
|
});
|
|
43818
43828
|
};
|
|
43819
43829
|
n.move = y;
|
|
43820
|
-
const v = useMemo(() => n.value && Object.keys(n.value).length > 0 ? (Array.isArray(n.value) ? n.value : n.value ? [n.value] : []).filter(Boolean).map((
|
|
43821
|
-
const q =
|
|
43822
|
-
return P(x({},
|
|
43830
|
+
const v = useMemo(() => n.value && Object.keys(n.value).length > 0 ? (Array.isArray(n.value) ? n.value : n.value ? [n.value] : []).filter(Boolean).map((L) => {
|
|
43831
|
+
const q = L == null ? void 0 : L[d.label];
|
|
43832
|
+
return P(x({}, L), {
|
|
43823
43833
|
[d.label]: getLabelFormatValue$1(m(h), m(q))
|
|
43824
43834
|
});
|
|
43825
43835
|
}) : [], [n.value, d == null ? void 0 : d.label]), F = {
|
|
@@ -43835,32 +43845,32 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43835
43845
|
setSelectedRows: u,
|
|
43836
43846
|
collectionField: o
|
|
43837
43847
|
}, I = () => {
|
|
43838
|
-
const { setVisible: z } = useActionContext(), { selectedRows:
|
|
43848
|
+
const { setVisible: z } = useActionContext(), { selectedRows: L, setSelectedRows: q } = useContext(RecordPickerContext);
|
|
43839
43849
|
return {
|
|
43840
43850
|
onClick() {
|
|
43841
43851
|
var G;
|
|
43842
|
-
Array.isArray(n.value) || (n.value = []),
|
|
43843
|
-
const
|
|
43844
|
-
D(
|
|
43852
|
+
Array.isArray(n.value) || (n.value = []), L.forEach((U) => n.value.push(markRecordAsNew(U))), n.onInput(n.value), n.initialValue = n.value, q([]), z(!1);
|
|
43853
|
+
const E = Math.ceil(n.value.length / (((G = n.componentProps) == null ? void 0 : G.pageSize) || 10));
|
|
43854
|
+
D(E);
|
|
43845
43855
|
}
|
|
43846
43856
|
};
|
|
43847
43857
|
}, R = () => {
|
|
43848
|
-
const z = (o == null ? void 0 : o.targetKey) || "id",
|
|
43849
|
-
return
|
|
43858
|
+
const z = (o == null ? void 0 : o.targetKey) || "id", L = (n.value || []).map((E) => E == null ? void 0 : E[z]).filter(Boolean);
|
|
43859
|
+
return L.length ? { $and: [{ [`${z}.$ne`]: L }] } : {};
|
|
43850
43860
|
}, [T, D] = useState(1), [O, j] = useState(((M = n.componentProps) == null ? void 0 : M.pageSize) || 10);
|
|
43851
43861
|
useEffect(() => {
|
|
43852
43862
|
var z;
|
|
43853
43863
|
j((z = n.componentProps) == null ? void 0 : z.pageSize);
|
|
43854
43864
|
}, [($ = n.componentProps) == null ? void 0 : $.pageSize]);
|
|
43855
43865
|
const N = useMemo(() => {
|
|
43856
|
-
var
|
|
43857
|
-
const z = Math.ceil(((
|
|
43866
|
+
var L;
|
|
43867
|
+
const z = Math.ceil(((L = n.value) == null ? void 0 : L.length) / 10);
|
|
43858
43868
|
return {
|
|
43859
43869
|
current: T > z ? z : T,
|
|
43860
43870
|
pageSize: O || 10,
|
|
43861
43871
|
total: n == null ? void 0 : n.value,
|
|
43862
|
-
onChange: (q,
|
|
43863
|
-
D(q), j(
|
|
43872
|
+
onChange: (q, E) => {
|
|
43873
|
+
D(q), j(E), n.componentProps.pageSize = E, n.onInput(n.value);
|
|
43864
43874
|
},
|
|
43865
43875
|
showSizeChanger: !0,
|
|
43866
43876
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
@@ -43872,8 +43882,8 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43872
43882
|
run() {
|
|
43873
43883
|
var q;
|
|
43874
43884
|
z.value = z.value || [], z.value.push(markRecordAsNew({}));
|
|
43875
|
-
const
|
|
43876
|
-
return D(
|
|
43885
|
+
const L = Math.ceil(z.value.length / (((q = z.componentProps) == null ? void 0 : q.pageSize) || 10));
|
|
43886
|
+
return D(L), z.onInput(z.value);
|
|
43877
43887
|
}
|
|
43878
43888
|
};
|
|
43879
43889
|
}, w = () => ({
|
|
@@ -44056,10 +44066,10 @@ const ReadPretty$7 = observer$1(
|
|
|
44056
44066
|
InternalAssociationSelect.displayName = "InternalAssociationSelect";
|
|
44057
44067
|
const AssociationSelect = InternalAssociationSelect;
|
|
44058
44068
|
AssociationSelect.Designer = function e() {
|
|
44059
|
-
var M, $, k, z,
|
|
44069
|
+
var M, $, k, z, L, q, E, G, U, H, J;
|
|
44060
44070
|
const { getCollectionFields: t, getInterface: n, getCollectionJoinField: o, getCollection: r, isTitleField: i } = useCollectionManager_deprecated(), { getField: a } = useCollection_deprecated(), { form: l } = useFormBlockContext(), c = useField(), u = useFieldSchema(), { t: d } = useTranslation(), p = useFilterByTk(), { dn: m, refresh: h, insertAdjacent: g } = useDesignable(), f = useCompile(), C = useIsShowMultipleSwitch(), { isAllowToSetDefaultValue: b } = useIsAllowToSetDefaultValue(), S = a(u.name) || o(u["x-collection-field"]), y = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), F = n(S == null ? void 0 : S.interface), I = (M = F == null ? void 0 : F.validateSchema) == null ? void 0 : M.call(F, u), R = ($ = S == null ? void 0 : S.uiSchema) == null ? void 0 : $.title, T = S != null && S.target ? t(S == null ? void 0 : S.target) : [];
|
|
44061
44071
|
c.title === R || c.title;
|
|
44062
|
-
const D = useSortFields(S == null ? void 0 : S.target), O = ((
|
|
44072
|
+
const D = useSortFields(S == null ? void 0 : S.target), O = ((L = (z = (k = c.componentProps) == null ? void 0 : k.service) == null ? void 0 : z.params) == null ? void 0 : L.sort) || [];
|
|
44063
44073
|
useEffect(() => {
|
|
44064
44074
|
c.readPretty !== u["x-read-pretty"] && (c.readPretty = !!u["x-read-pretty"]);
|
|
44065
44075
|
}, [u["x-read-pretty"]]);
|
|
@@ -44286,7 +44296,7 @@ AssociationSelect.Designer = function e() {
|
|
|
44286
44296
|
SchemaSettingsDataScope,
|
|
44287
44297
|
{
|
|
44288
44298
|
collectionName: S == null ? void 0 : S.target,
|
|
44289
|
-
defaultFilter: ((U = (G = (
|
|
44299
|
+
defaultFilter: ((U = (G = (E = c.componentProps) == null ? void 0 : E.service) == null ? void 0 : G.params) == null ? void 0 : U.filter) || {},
|
|
44290
44300
|
form: l,
|
|
44291
44301
|
onSubmit: ({ filter: K }) => {
|
|
44292
44302
|
K = removeNullCondition(K), _.set(c.componentProps, "service.params.filter", K), u["x-component-props"] = c.componentProps, m.emit("patch", {
|
|
@@ -44564,16 +44574,16 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
44564
44574
|
onSubmit: ($) => {
|
|
44565
44575
|
var q;
|
|
44566
44576
|
const k = [];
|
|
44567
|
-
for (const
|
|
44568
|
-
k.push(_.pickBy(
|
|
44577
|
+
for (const E of $.rules)
|
|
44578
|
+
k.push(_.pickBy(E, _.identity));
|
|
44569
44579
|
const z = {
|
|
44570
44580
|
"x-uid": l["x-uid"]
|
|
44571
44581
|
};
|
|
44572
44582
|
if (["percent"].includes(m == null ? void 0 : m.interface))
|
|
44573
|
-
for (const
|
|
44574
|
-
(
|
|
44575
|
-
const
|
|
44576
|
-
a.validator =
|
|
44583
|
+
for (const E of k)
|
|
44584
|
+
(E.maxValue || E.minValue) && (E.percentMode = !0), E.percentFormat && (E.percentFormats = !0);
|
|
44585
|
+
const L = _.concat([], ((q = m == null ? void 0 : m.uiSchema) == null ? void 0 : q["x-validator"]) || [], k);
|
|
44586
|
+
a.validator = L, l["x-validator"] = k, z["x-validator"] = k, u.emit("patch", {
|
|
44577
44587
|
schema: z
|
|
44578
44588
|
}), d();
|
|
44579
44589
|
}
|
|
@@ -44714,10 +44724,10 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
44714
44724
|
options: v,
|
|
44715
44725
|
value: (M = (w = a == null ? void 0 : a.componentProps) == null ? void 0 : w.fieldNames) == null ? void 0 : M.label,
|
|
44716
44726
|
onChange: ($) => {
|
|
44717
|
-
var
|
|
44727
|
+
var L, q;
|
|
44718
44728
|
const k = {
|
|
44719
44729
|
"x-uid": l["x-uid"]
|
|
44720
|
-
}, z = P(x(x({}, (q = (
|
|
44730
|
+
}, z = P(x(x({}, (q = (L = m == null ? void 0 : m.uiSchema) == null ? void 0 : L["x-component-props"]) == null ? void 0 : q.fieldNames), a.componentProps.fieldNames), {
|
|
44721
44731
|
label: $
|
|
44722
44732
|
});
|
|
44723
44733
|
a.componentProps.fieldNames = z, l["x-component-props"] = l["x-component-props"] || {}, l["x-component-props"].fieldNames = z, k["x-component-props"] = l["x-component-props"], u.emit("patch", {
|
|
@@ -48253,17 +48263,17 @@ const TableActionColumnDesigner = (e) => {
|
|
|
48253
48263
|
);
|
|
48254
48264
|
}, TableBlockDesigner = () => {
|
|
48255
48265
|
var T, D, O, j, N, B, w, M, $, k, z;
|
|
48256
|
-
const { name: e, title: t } = useCollection_deprecated(), { getCollectionField: n, getCollection: o } = useCollectionManager_deprecated(), r = useField(), i = useFieldSchema(), { form: a } = useFormBlockContext(), l = useSortFields(e), { service: c } = useTableBlockContext(), { t: u } = useTranslation(), { dn: d } = useDesignable(), { componentNamePrefix: p } = useBlockTemplateContext(), m = ((D = (T = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : T.params) == null ? void 0 : D.sort) || [], h = ((O = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : O.resource) || ((j = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : j.association), g = !((N = i == null ? void 0 : i["x-decorator-props"]) != null && N.disableTemplate), f = m == null ? void 0 : m.map((
|
|
48257
|
-
field:
|
|
48266
|
+
const { name: e, title: t } = useCollection_deprecated(), { getCollectionField: n, getCollection: o } = useCollectionManager_deprecated(), r = useField(), i = useFieldSchema(), { form: a } = useFormBlockContext(), l = useSortFields(e), { service: c } = useTableBlockContext(), { t: u } = useTranslation(), { dn: d } = useDesignable(), { componentNamePrefix: p } = useBlockTemplateContext(), m = ((D = (T = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : T.params) == null ? void 0 : D.sort) || [], h = ((O = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : O.resource) || ((j = i == null ? void 0 : i["x-decorator-props"]) == null ? void 0 : j.association), g = !((N = i == null ? void 0 : i["x-decorator-props"]) != null && N.disableTemplate), f = m == null ? void 0 : m.map((L) => L != null && L.startsWith("-") ? {
|
|
48267
|
+
field: L.substring(1),
|
|
48258
48268
|
direction: "desc"
|
|
48259
48269
|
} : {
|
|
48260
|
-
field:
|
|
48270
|
+
field: L,
|
|
48261
48271
|
direction: "asc"
|
|
48262
48272
|
}), C = useSchemaTemplate(), b = useCollection_deprecated(), { dragSort: S, resource: y } = r.decoratorProps, v = y && n(y), F = y != null && y.includes(".") ? (B = o(v == null ? void 0 : v.target)) == null ? void 0 : B.tree : !!(b != null && b.tree), I = useCallback(
|
|
48263
|
-
({ filter:
|
|
48264
|
-
|
|
48273
|
+
({ filter: L }) => {
|
|
48274
|
+
L = removeNullCondition(L);
|
|
48265
48275
|
const q = r.decoratorProps.params || {};
|
|
48266
|
-
q.filter =
|
|
48276
|
+
q.filter = L, r.decoratorProps.params = q, i["x-decorator-props"].params = q, d.emit("patch", {
|
|
48267
48277
|
schema: {
|
|
48268
48278
|
"x-uid": i["x-uid"],
|
|
48269
48279
|
"x-decorator-props": i["x-decorator-props"]
|
|
@@ -48281,11 +48291,11 @@ const TableActionColumnDesigner = (e) => {
|
|
|
48281
48291
|
title: u("Tree table"),
|
|
48282
48292
|
defaultChecked: !0,
|
|
48283
48293
|
checked: F ? r.decoratorProps.treeTable : !1,
|
|
48284
|
-
onChange: (
|
|
48285
|
-
var
|
|
48286
|
-
r.decoratorProps.treeTable =
|
|
48287
|
-
const q = P(x({}, (
|
|
48288
|
-
tree:
|
|
48294
|
+
onChange: (L) => {
|
|
48295
|
+
var E;
|
|
48296
|
+
r.decoratorProps.treeTable = L, i["x-decorator-props"].treeTable = L;
|
|
48297
|
+
const q = P(x({}, (E = c.params) == null ? void 0 : E[0]), {
|
|
48298
|
+
tree: L ? !0 : null
|
|
48289
48299
|
});
|
|
48290
48300
|
d.emit("patch", {
|
|
48291
48301
|
schema: i
|
|
@@ -48298,13 +48308,13 @@ const TableActionColumnDesigner = (e) => {
|
|
|
48298
48308
|
{
|
|
48299
48309
|
title: u("Enable drag and drop sorting"),
|
|
48300
48310
|
checked: r.decoratorProps.dragSort,
|
|
48301
|
-
onChange: (
|
|
48302
|
-
|
|
48311
|
+
onChange: (L) => V(void 0, null, function* () {
|
|
48312
|
+
L && v && (yield R.resource("collections.fields", v.collectionName).update({
|
|
48303
48313
|
filterByTk: v.name,
|
|
48304
48314
|
values: {
|
|
48305
48315
|
sortable: !0
|
|
48306
48316
|
}
|
|
48307
|
-
})), r.decoratorProps.dragSort =
|
|
48317
|
+
})), r.decoratorProps.dragSort = L, i["x-decorator-props"].dragSort = L, d.emit("patch", {
|
|
48308
48318
|
schema: {
|
|
48309
48319
|
"x-uid": i["x-uid"],
|
|
48310
48320
|
"x-decorator-props": i["x-decorator-props"]
|
|
@@ -48398,10 +48408,10 @@ const TableActionColumnDesigner = (e) => {
|
|
|
48398
48408
|
}
|
|
48399
48409
|
}
|
|
48400
48410
|
},
|
|
48401
|
-
onSubmit: ({ sort:
|
|
48411
|
+
onSubmit: ({ sort: L }) => {
|
|
48402
48412
|
var G;
|
|
48403
|
-
const q =
|
|
48404
|
-
|
|
48413
|
+
const q = L.map((U) => U.direction === "desc" ? `-${U.field}` : U.field), E = r.decoratorProps.params || {};
|
|
48414
|
+
E.sort = q, r.decoratorProps.params = E, i["x-decorator-props"].params = E, d.emit("patch", {
|
|
48405
48415
|
schema: {
|
|
48406
48416
|
"x-uid": i["x-uid"],
|
|
48407
48417
|
"x-decorator-props": i["x-decorator-props"]
|
|
@@ -48424,10 +48434,10 @@ const TableActionColumnDesigner = (e) => {
|
|
|
48424
48434
|
{ label: "100", value: 100 },
|
|
48425
48435
|
{ label: "200", value: 200 }
|
|
48426
48436
|
],
|
|
48427
|
-
onChange: (
|
|
48428
|
-
var
|
|
48437
|
+
onChange: (L) => {
|
|
48438
|
+
var E;
|
|
48429
48439
|
const q = r.decoratorProps.params || {};
|
|
48430
|
-
q.pageSize =
|
|
48440
|
+
q.pageSize = L, r.decoratorProps.params = q, i["x-decorator-props"].params = q, c.run(P(x({}, (E = c.params) == null ? void 0 : E[0]), { pageSize: L, page: 1 })), d.emit("patch", {
|
|
48431
48441
|
schema: {
|
|
48432
48442
|
"x-uid": i["x-uid"],
|
|
48433
48443
|
"x-decorator-props": i["x-decorator-props"]
|
|
@@ -48446,12 +48456,12 @@ const TableActionColumnDesigner = (e) => {
|
|
|
48446
48456
|
{ label: u("Middle"), value: "middle" },
|
|
48447
48457
|
{ label: u("Small"), value: "small" }
|
|
48448
48458
|
],
|
|
48449
|
-
onChange: (
|
|
48450
|
-
const q = i.reduceProperties((
|
|
48459
|
+
onChange: (L) => {
|
|
48460
|
+
const q = i.reduceProperties((E, G) => {
|
|
48451
48461
|
if (G["x-component"] === "TableV2")
|
|
48452
48462
|
return G;
|
|
48453
48463
|
}, null);
|
|
48454
|
-
q["x-component-props"] = q["x-component-props"] || {}, q["x-component-props"].size =
|
|
48464
|
+
q["x-component-props"] = q["x-component-props"] || {}, q["x-component-props"].size = L, d.emit("patch", {
|
|
48455
48465
|
schema: {
|
|
48456
48466
|
"x-uid": q["x-uid"],
|
|
48457
48467
|
"x-decorator-props": q["x-component-props"]
|
|
@@ -50344,20 +50354,20 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50344
50354
|
})), []), T = useCallback(() => {
|
|
50345
50355
|
const { availableFieldInterfaces: w } = u(o.template) || {}, { exclude: M, include: $ } = w || {}, k = [];
|
|
50346
50356
|
return F.forEach((z) => {
|
|
50347
|
-
var
|
|
50357
|
+
var L;
|
|
50348
50358
|
if (z.key === "systemInfo")
|
|
50349
50359
|
k.push(P(x({}, z), {
|
|
50350
50360
|
children: z.children.filter((q) => q.hidden ? !1 : q.value === "tableoid" ? $ != null && $.length ? $.includes(q.value) : (l == null ? void 0 : l.dialect) === "postgres" : typeof o[q.value] == "boolean" ? o[q.value] : !0)
|
|
50351
50361
|
}));
|
|
50352
50362
|
else {
|
|
50353
50363
|
let q = [];
|
|
50354
|
-
$ != null && $.length ? $.forEach((
|
|
50364
|
+
$ != null && $.length ? $.forEach((E) => {
|
|
50355
50365
|
var U;
|
|
50356
|
-
const G = (U = z == null ? void 0 : z.children) == null ? void 0 : U.find((H) => [
|
|
50366
|
+
const G = (U = z == null ? void 0 : z.children) == null ? void 0 : U.find((H) => [E, E.interface].includes(H.name));
|
|
50357
50367
|
G && q.push(P(x({}, G), {
|
|
50358
|
-
targetScope:
|
|
50368
|
+
targetScope: E == null ? void 0 : E.targetScope
|
|
50359
50369
|
}));
|
|
50360
|
-
}) : M != null && M.length ? q = (
|
|
50370
|
+
}) : M != null && M.length ? q = (L = z == null ? void 0 : z.children) == null ? void 0 : L.filter((E) => !M.includes(E.name)) : q = z == null ? void 0 : z.children, q != null && q.length && k.push(P(x({}, z), {
|
|
50361
50371
|
children: q
|
|
50362
50372
|
}));
|
|
50363
50373
|
}
|
|
@@ -50649,7 +50659,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50649
50659
|
run() {
|
|
50650
50660
|
return V(this, null, function* () {
|
|
50651
50661
|
yield B.submit();
|
|
50652
|
-
const
|
|
50662
|
+
const L = cloneDeep(B.values), q = omit(L, [
|
|
50653
50663
|
"key",
|
|
50654
50664
|
"uiSchemaUid",
|
|
50655
50665
|
"collectionName",
|
|
@@ -51157,12 +51167,12 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51157
51167
|
const w = [];
|
|
51158
51168
|
g.forEach((M) => {
|
|
51159
51169
|
var q;
|
|
51160
|
-
const $ = v(M), z = R(M).map((
|
|
51161
|
-
const G = T(
|
|
51170
|
+
const $ = v(M), z = R(M).map((E) => {
|
|
51171
|
+
const G = T(E, M);
|
|
51162
51172
|
return {
|
|
51163
51173
|
type: "group",
|
|
51164
|
-
key:
|
|
51165
|
-
label: l("Parent collection fields") + l(`(${v(
|
|
51174
|
+
key: E,
|
|
51175
|
+
label: l("Parent collection fields") + l(`(${v(E).title})`),
|
|
51166
51176
|
children: G.filter((U) => !["hasOne", "hasMany", "belongsToMany"].includes(U == null ? void 0 : U.type)).map((U) => {
|
|
51167
51177
|
var H;
|
|
51168
51178
|
return {
|
|
@@ -51171,14 +51181,14 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51171
51181
|
};
|
|
51172
51182
|
})
|
|
51173
51183
|
};
|
|
51174
|
-
}),
|
|
51184
|
+
}), L = (q = $.fields.filter((E) => !["obo", "oho", "m2m", "o2m"].includes(E == null ? void 0 : E.interface))) == null ? void 0 : q.map((E) => {
|
|
51175
51185
|
var G;
|
|
51176
|
-
return { value:
|
|
51186
|
+
return { value: E.name, key: E.name, label: l(((G = E.uiSchema) == null ? void 0 : G.title) || E.name) };
|
|
51177
51187
|
}).concat(z);
|
|
51178
51188
|
w.push({
|
|
51179
51189
|
value: M,
|
|
51180
51190
|
label: l($.title || $.name),
|
|
51181
|
-
children:
|
|
51191
|
+
children: L
|
|
51182
51192
|
});
|
|
51183
51193
|
}), h(w);
|
|
51184
51194
|
}, [g, t]), useEffect(() => {
|
|
@@ -51187,30 +51197,30 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51187
51197
|
if (w) {
|
|
51188
51198
|
u(!1), p([]);
|
|
51189
51199
|
const k = ($ = Object.values((M = w == null ? void 0 : w.data) == null ? void 0 : M.fields)) == null ? void 0 : $.map((z) => {
|
|
51190
|
-
var
|
|
51200
|
+
var L, q;
|
|
51191
51201
|
if (z.source) {
|
|
51192
|
-
const
|
|
51202
|
+
const E = (i == null ? void 0 : i.data.find((G) => G.name === z.name)) || z;
|
|
51193
51203
|
return P(x({}, z), {
|
|
51194
|
-
uiSchema: P(x({}, omit(
|
|
51204
|
+
uiSchema: P(x({}, omit(E.uiSchema, "rawTitle")), { title: ((L = E.uiSchema) == null ? void 0 : L.title) || E.name })
|
|
51195
51205
|
});
|
|
51196
51206
|
} else {
|
|
51197
|
-
const
|
|
51198
|
-
return P(x({},
|
|
51199
|
-
uiSchema: P(x({}, omit(
|
|
51207
|
+
const E = (i == null ? void 0 : i.data.find((G) => G.name === z.name)) || z;
|
|
51208
|
+
return P(x({}, E), {
|
|
51209
|
+
uiSchema: P(x({}, omit(E.uiSchema, "rawTitle")), { title: ((q = E.uiSchema) == null ? void 0 : q.title) || E.name })
|
|
51200
51210
|
});
|
|
51201
51211
|
}
|
|
51202
51212
|
});
|
|
51203
51213
|
S.value = k, setTimeout(() => {
|
|
51204
|
-
var z,
|
|
51205
|
-
p(k), y.setValuesIn("sources", (z = w.data) == null ? void 0 : z.sources), f((
|
|
51214
|
+
var z, L, q;
|
|
51215
|
+
p(k), y.setValuesIn("sources", (z = w.data) == null ? void 0 : z.sources), f((L = w.data) == null ? void 0 : L.sources), b((q = w == null ? void 0 : w.data) == null ? void 0 : q.unsupportedFields);
|
|
51206
51216
|
});
|
|
51207
51217
|
}
|
|
51208
51218
|
}).catch);
|
|
51209
51219
|
}, [t]);
|
|
51210
51220
|
const N = (w, M) => {
|
|
51211
51221
|
d.splice(M, 1, w), p(d), S.value = d.map(($) => {
|
|
51212
|
-
var z,
|
|
51213
|
-
const k = typeof $.source == "string" ? $.source : (q = (
|
|
51222
|
+
var z, L, q;
|
|
51223
|
+
const k = typeof $.source == "string" ? $.source : (q = (L = (z = $.source) == null ? void 0 : z.filter) == null ? void 0 : L.call(z, Boolean)) == null ? void 0 : q.join(".");
|
|
51214
51224
|
return P(x({}, $), {
|
|
51215
51225
|
source: k
|
|
51216
51226
|
});
|
|
@@ -51236,8 +51246,8 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51236
51246
|
options: D(m),
|
|
51237
51247
|
onChange: (k, z) => {
|
|
51238
51248
|
var q;
|
|
51239
|
-
const
|
|
51240
|
-
N(P(x({}, M), { source: k, uiSchema:
|
|
51249
|
+
const L = (q = I(k == null ? void 0 : k[0])) == null ? void 0 : q.find((E) => E.name === last(k));
|
|
51250
|
+
N(P(x({}, M), { source: k, uiSchema: L == null ? void 0 : L.uiSchema }), $);
|
|
51241
51251
|
},
|
|
51242
51252
|
placeholder: l("Select field source")
|
|
51243
51253
|
}
|
|
@@ -51275,12 +51285,12 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51275
51285
|
defaultValue: w,
|
|
51276
51286
|
style: { width: "100%" },
|
|
51277
51287
|
popupMatchSelectWidth: !1,
|
|
51278
|
-
onChange: (
|
|
51279
|
-
var
|
|
51280
|
-
const q = F(
|
|
51281
|
-
N(P(x({}, k), { interface:
|
|
51288
|
+
onChange: (L) => {
|
|
51289
|
+
var E;
|
|
51290
|
+
const q = F(L);
|
|
51291
|
+
N(P(x({}, k), { interface: L, uiSchema: (E = q == null ? void 0 : q.default) == null ? void 0 : E.uiSchema }), $);
|
|
51282
51292
|
},
|
|
51283
|
-
children: z.map((
|
|
51293
|
+
children: z.map((L) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(L.label), children: L.children.map((q) => /* @__PURE__ */ jsx(Select$1.Option, { value: q.name, children: D(q.label) }, q.value)) }, L.key))
|
|
51284
51294
|
}
|
|
51285
51295
|
);
|
|
51286
51296
|
}
|
|
@@ -51297,8 +51307,8 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51297
51307
|
Input$3,
|
|
51298
51308
|
{
|
|
51299
51309
|
defaultValue: ((z = k == null ? void 0 : k.uiSchema) == null ? void 0 : z.title) || w,
|
|
51300
|
-
onChange: (
|
|
51301
|
-
P(x({}, k), { uiSchema: P(x({}, omit(k == null ? void 0 : k.uiSchema, "rawTitle")), { title:
|
|
51310
|
+
onChange: (L) => N(
|
|
51311
|
+
P(x({}, k), { uiSchema: P(x({}, omit(k == null ? void 0 : k.uiSchema, "rawTitle")), { title: L.target.value }) }),
|
|
51302
51312
|
$
|
|
51303
51313
|
)
|
|
51304
51314
|
}
|
|
@@ -51360,7 +51370,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
51360
51370
|
key: F.name,
|
|
51361
51371
|
width: 200,
|
|
51362
51372
|
render: ($, k, z) => {
|
|
51363
|
-
const
|
|
51373
|
+
const L = k[F.name], q = {
|
|
51364
51374
|
type: "object",
|
|
51365
51375
|
properties: {
|
|
51366
51376
|
[F.name]: {
|
|
@@ -51368,7 +51378,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
51368
51378
|
"x-component": D && I ? "CollectionField" : "Input",
|
|
51369
51379
|
"x-read-pretty": !0,
|
|
51370
51380
|
"x-collection-field": I == null ? void 0 : I.join("."),
|
|
51371
|
-
default: F.interface === "json" ? JSON.stringify(
|
|
51381
|
+
default: F.interface === "json" ? JSON.stringify(L) : L
|
|
51372
51382
|
}
|
|
51373
51383
|
}
|
|
51374
51384
|
};
|
|
@@ -51701,7 +51711,7 @@ const AsyncDataProvider = (e) => {
|
|
|
51701
51711
|
style: { width: "100%" },
|
|
51702
51712
|
popupMatchSelectWidth: !1,
|
|
51703
51713
|
onChange: (B) => {
|
|
51704
|
-
var M, $, k, z,
|
|
51714
|
+
var M, $, k, z, L;
|
|
51705
51715
|
const w = p(B);
|
|
51706
51716
|
S(
|
|
51707
51717
|
P(x({}, j), {
|
|
@@ -51709,7 +51719,7 @@ const AsyncDataProvider = (e) => {
|
|
|
51709
51719
|
uiSchema: P(x({}, (M = w == null ? void 0 : w.default) == null ? void 0 : M.uiSchema), {
|
|
51710
51720
|
title: ((k = ($ = w == null ? void 0 : w.default) == null ? void 0 : $.uiSchema) == null ? void 0 : k.title) || ((z = j.uiSchema) == null ? void 0 : z.title)
|
|
51711
51721
|
}),
|
|
51712
|
-
type: (
|
|
51722
|
+
type: (L = w == null ? void 0 : w.default) == null ? void 0 : L.type
|
|
51713
51723
|
}),
|
|
51714
51724
|
O
|
|
51715
51725
|
);
|
|
@@ -60288,11 +60298,11 @@ const ActionInitializerItem = (e) => {
|
|
|
60288
60298
|
(y || W) && g(P(x({}, h == null ? void 0 : h[0]), {
|
|
60289
60299
|
filter: f
|
|
60290
60300
|
})), v(!y), K.stopPropagation();
|
|
60291
|
-
},
|
|
60301
|
+
}, L = (K) => {
|
|
60292
60302
|
K.stopPropagation();
|
|
60293
60303
|
}, q = (K) => {
|
|
60294
60304
|
m(K);
|
|
60295
|
-
},
|
|
60305
|
+
}, E = (J = a.title) != null ? J : (H = i == null ? void 0 : i.uiSchema) == null ? void 0 : H.title;
|
|
60296
60306
|
return t(
|
|
60297
60307
|
/* @__PURE__ */ jsxs(SortableItem, { className: cls(n, o, "nb-block-item", e.className, "SortableItem"), children: [
|
|
60298
60308
|
/* @__PURE__ */ jsx(l, {}),
|
|
@@ -60309,17 +60319,17 @@ const ActionInitializerItem = (e) => {
|
|
|
60309
60319
|
},
|
|
60310
60320
|
gutter: 5,
|
|
60311
60321
|
children: [
|
|
60312
|
-
/* @__PURE__ */ jsx(Col, { title: c(
|
|
60322
|
+
/* @__PURE__ */ jsx(Col, { title: c(E), className: "headerCol", children: y ? /* @__PURE__ */ jsx(
|
|
60313
60323
|
Input$3,
|
|
60314
60324
|
{
|
|
60315
60325
|
bordered: !1,
|
|
60316
60326
|
autoFocus: !0,
|
|
60317
60327
|
placeholder: "Search...",
|
|
60318
60328
|
className: "search",
|
|
60319
|
-
onClick:
|
|
60329
|
+
onClick: L,
|
|
60320
60330
|
onChange: q
|
|
60321
60331
|
}
|
|
60322
|
-
) : c(
|
|
60332
|
+
) : c(E) }),
|
|
60323
60333
|
/* @__PURE__ */ jsx(
|
|
60324
60334
|
Col,
|
|
60325
60335
|
{
|
|
@@ -60747,14 +60757,14 @@ const DataBlockInitializer = (e) => {
|
|
|
60747
60757
|
alwaysRenderMenu: y
|
|
60748
60758
|
} = e, { insert: v, setVisible: F } = useSchemaInitializer(), I = useCompile(), { getTemplateSchemaByMode: R } = useSchemaTemplateManager(), T = useCallback(
|
|
60749
60759
|
(z) => V(void 0, null, function* () {
|
|
60750
|
-
const { item:
|
|
60760
|
+
const { item: L, fromOthersInPopup: q } = z;
|
|
60751
60761
|
if (f)
|
|
60752
60762
|
return f(z);
|
|
60753
|
-
if (
|
|
60754
|
-
const
|
|
60755
|
-
v(t ? t(
|
|
60763
|
+
if (L.template) {
|
|
60764
|
+
const E = yield R(L);
|
|
60765
|
+
v(t ? t(E, { item: L, fromOthersInPopup: q }) : E);
|
|
60756
60766
|
} else
|
|
60757
|
-
n && n({ item:
|
|
60767
|
+
n && n({ item: L, fromOthersInPopup: q });
|
|
60758
60768
|
F(!1);
|
|
60759
60769
|
}),
|
|
60760
60770
|
[R, v, F, n, f, t]
|
|
@@ -60773,14 +60783,14 @@ const DataBlockInitializer = (e) => {
|
|
|
60773
60783
|
currentText: b,
|
|
60774
60784
|
otherText: S
|
|
60775
60785
|
}), O = useGetSchemaInitializerMenuItems(T), j = useMemo(() => O(D, i), [O, D, i]), [N, B] = useState([]), w = useMenuSearch({ data: j, openKeys: N, hideSearch: u }), M = useMemo(() => {
|
|
60776
|
-
let z = w.filter((
|
|
60786
|
+
let z = w.filter((L) => L.key !== "search" && L.key !== "empty");
|
|
60777
60787
|
return p && z.length === 1 ? z = z[0].children : z = w, [
|
|
60778
60788
|
{
|
|
60779
60789
|
key: i,
|
|
60780
60790
|
label: I(a),
|
|
60781
60791
|
icon: typeof r == "string" ? /* @__PURE__ */ jsx(antIcons__default, { type: r }) : r,
|
|
60782
|
-
onClick: (
|
|
60783
|
-
|
|
60792
|
+
onClick: (L) => {
|
|
60793
|
+
L.key === i && T(P(x({}, L), { item: e }));
|
|
60784
60794
|
},
|
|
60785
60795
|
children: z
|
|
60786
60796
|
}
|