@nocobase/client 1.6.33 → 1.6.35
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 +523 -517
- package/lib/index.js +78 -78
- package/package.json +7 -8
package/es/index.mjs
CHANGED
|
@@ -110,13 +110,10 @@ import { createGlobalStyle, useAntdToken, createStyles } from "antd-style";
|
|
|
110
110
|
import { createStyles as vn } from "antd-style";
|
|
111
111
|
import JSON5 from "json5";
|
|
112
112
|
import { usePrefixCls as usePrefixCls$1, dayjsable, formatDayjsValue } from "@formily/antd-v5/esm/__builtins__";
|
|
113
|
-
import * as dndKitAccessibility from "@dnd-kit/accessibility";
|
|
114
113
|
import * as dndKitCore from "@dnd-kit/core";
|
|
115
114
|
import { DndContext as DndContext$1, rectIntersection, DragOverlay, useDroppable, useDndContext, useDndMonitor, useDraggable } from "@dnd-kit/core";
|
|
116
|
-
import * as dndKitModifiers from "@dnd-kit/modifiers";
|
|
117
115
|
import * as dndKitSortable from "@dnd-kit/sortable";
|
|
118
116
|
import { SortableContext as SortableContext$1, useSortable } from "@dnd-kit/sortable";
|
|
119
|
-
import * as dndKitUtilities from "@dnd-kit/utilities";
|
|
120
117
|
import * as formilyJsonSchema from "@formily/json-schema";
|
|
121
118
|
import * as formilyPath from "@formily/path";
|
|
122
119
|
import * as formilyValidator from "@formily/validator";
|
|
@@ -8770,7 +8767,7 @@ const SchemaInitializerSubMenuContext = React.createContext({}), SchemaInitializ
|
|
|
8770
8767
|
/* @__PURE__ */ jsx(Button, { type: "primary", href: "https://github.com/nocobase/nocobase/issues", target: "_blank", children: n("Feedback") }, "feedback"),
|
|
8771
8768
|
/* @__PURE__ */ jsx(Button, { loading: o, onClick: r, children: n("Download logs") }, "log")
|
|
8772
8769
|
],
|
|
8773
|
-
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 }) })
|
|
8774
8771
|
}
|
|
8775
8772
|
) });
|
|
8776
8773
|
};
|
|
@@ -9213,7 +9210,7 @@ function addAppVersion(e, t) {
|
|
|
9213
9210
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
9214
9211
|
}), e;
|
|
9215
9212
|
}
|
|
9216
|
-
const name = "@nocobase/client", version = "1.6.
|
|
9213
|
+
const name = "@nocobase/client", version = "1.6.35", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
9217
9214
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
9218
9215
|
"@ant-design/cssinjs": "^1.11.1",
|
|
9219
9216
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -9221,9 +9218,8 @@ const name = "@nocobase/client", version = "1.6.33", license = "AGPL-3.0", main
|
|
|
9221
9218
|
"@antv/g2plot": "^2.4.18",
|
|
9222
9219
|
"@budibase/handlebars-helpers": "0.14.0",
|
|
9223
9220
|
"@ctrl/tinycolor": "^3.6.0",
|
|
9224
|
-
"@dnd-kit/core": "^
|
|
9225
|
-
"@dnd-kit/
|
|
9226
|
-
"@dnd-kit/sortable": "^6.0.0",
|
|
9221
|
+
"@dnd-kit/core": "^6.0.0",
|
|
9222
|
+
"@dnd-kit/sortable": "^7.0.0",
|
|
9227
9223
|
"@emotion/css": "^11.7.1",
|
|
9228
9224
|
"@formily/antd-v5": "1.1.9",
|
|
9229
9225
|
"@formily/core": "^2.2.27",
|
|
@@ -9235,9 +9231,9 @@ const name = "@nocobase/client", version = "1.6.33", license = "AGPL-3.0", main
|
|
|
9235
9231
|
"@formily/reactive-react": "^2.2.27",
|
|
9236
9232
|
"@formily/shared": "^2.2.27",
|
|
9237
9233
|
"@formily/validator": "^2.2.27",
|
|
9238
|
-
"@nocobase/evaluators": "1.6.
|
|
9239
|
-
"@nocobase/sdk": "1.6.
|
|
9240
|
-
"@nocobase/utils": "1.6.
|
|
9234
|
+
"@nocobase/evaluators": "1.6.35",
|
|
9235
|
+
"@nocobase/sdk": "1.6.35",
|
|
9236
|
+
"@nocobase/utils": "1.6.35",
|
|
9241
9237
|
ahooks: "^3.7.2",
|
|
9242
9238
|
antd: "5.12.8",
|
|
9243
9239
|
"antd-style": "3.7.1",
|
|
@@ -10355,9 +10351,9 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10355
10351
|
}, [S, l, o, c, e.showDel, a]);
|
|
10356
10352
|
}, SortableRow$1 = (e) => {
|
|
10357
10353
|
var m, g, f, C, b, S;
|
|
10358
|
-
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({
|
|
10359
10355
|
id: n
|
|
10360
|
-
}), 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(() => {
|
|
10361
10357
|
const y = new TinyColor(t.colorSettings).setAlpha(0.6).toHex8String();
|
|
10362
10358
|
return {
|
|
10363
10359
|
topActiveClass: css`
|
|
@@ -10371,15 +10367,15 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10371
10367
|
}
|
|
10372
10368
|
`
|
|
10373
10369
|
};
|
|
10374
|
-
}, [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;
|
|
10375
10371
|
return /* @__PURE__ */ jsx(
|
|
10376
10372
|
"tr",
|
|
10377
10373
|
P(x({
|
|
10378
10374
|
ref: (y) => {
|
|
10379
|
-
(
|
|
10375
|
+
(r == null ? void 0 : r.id) !== n && o(y);
|
|
10380
10376
|
}
|
|
10381
10377
|
}, c), {
|
|
10382
|
-
className: cls(e.className, { [d]:
|
|
10378
|
+
className: cls(e.className, { [d]: r && a })
|
|
10383
10379
|
})
|
|
10384
10380
|
);
|
|
10385
10381
|
}, SortHandle$2 = (e) => {
|
|
@@ -10662,7 +10658,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10662
10658
|
"onClickRow",
|
|
10663
10659
|
"value"
|
|
10664
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 || (() => {
|
|
10665
|
-
})), 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`
|
|
10666
10662
|
& > td {
|
|
10667
10663
|
background-color: ${t.controlItemBgActive} !important;
|
|
10668
10664
|
}
|
|
@@ -10678,7 +10674,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10678
10674
|
}, [U == null ? void 0 : U.field]);
|
|
10679
10675
|
const H = useMemo(() => C ? G : "", [G, C]), J = useMemo(() => C ? (Q, te) => ({
|
|
10680
10676
|
onClick: (oe) => {
|
|
10681
|
-
isPortalInBody(oe.target) || C(Q,
|
|
10677
|
+
isPortalInBody(oe.target) || C(Q, L, z);
|
|
10682
10678
|
},
|
|
10683
10679
|
rowIndex: te,
|
|
10684
10680
|
record: Q
|
|
@@ -10695,10 +10691,10 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10695
10691
|
return W(Q);
|
|
10696
10692
|
if (Q.key)
|
|
10697
10693
|
return Q.key;
|
|
10698
|
-
if (
|
|
10699
|
-
return
|
|
10694
|
+
if (E.current.has(Q))
|
|
10695
|
+
return E.current.get(Q);
|
|
10700
10696
|
const te = uid();
|
|
10701
|
-
return
|
|
10697
|
+
return E.current.set(Q, te), te;
|
|
10702
10698
|
}, []), W = useCallback(
|
|
10703
10699
|
(Q) => {
|
|
10704
10700
|
var te;
|
|
@@ -11429,12 +11425,12 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11429
11425
|
recordData: $,
|
|
11430
11426
|
sourceId: k,
|
|
11431
11427
|
collection: z,
|
|
11432
|
-
puid:
|
|
11428
|
+
puid: L
|
|
11433
11429
|
}) => {
|
|
11434
11430
|
const q = c.getFilterByTK(u || l, $);
|
|
11435
11431
|
return getPopupPathFromParams({
|
|
11436
11432
|
popupuid: M,
|
|
11437
|
-
puid:
|
|
11433
|
+
puid: L,
|
|
11438
11434
|
collection: z,
|
|
11439
11435
|
filterbytk: q,
|
|
11440
11436
|
sourceid: k,
|
|
@@ -11459,27 +11455,27 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11459
11455
|
} = {}) => {
|
|
11460
11456
|
if (!f())
|
|
11461
11457
|
return I == null ? void 0 : I(!0);
|
|
11462
|
-
const
|
|
11458
|
+
const L = z || o, q = L == null ? void 0 : L["x-uid"], E = y(M);
|
|
11463
11459
|
w = w || (i == null ? void 0 : i.data);
|
|
11464
11460
|
const G = R({
|
|
11465
11461
|
popupUid: q,
|
|
11466
11462
|
recordData: w,
|
|
11467
|
-
sourceId:
|
|
11463
|
+
sourceId: E,
|
|
11468
11464
|
collection: $,
|
|
11469
11465
|
puid: k
|
|
11470
11466
|
});
|
|
11471
11467
|
let U = n.pathname;
|
|
11472
11468
|
if (_.last(U) === "/" && (U = U.slice(0, -1)), storePopupContext(q, {
|
|
11473
|
-
schema:
|
|
11469
|
+
schema: L,
|
|
11474
11470
|
record: new CollectionRecord({ isNew: !1, data: w }),
|
|
11475
11471
|
parentRecord: M ? new CollectionRecord({ isNew: !1, data: M }) : a,
|
|
11476
11472
|
service: g(),
|
|
11477
11473
|
dataSource: r,
|
|
11478
11474
|
collection: l == null ? void 0 : l.name,
|
|
11479
11475
|
association: u,
|
|
11480
|
-
sourceId:
|
|
11476
|
+
sourceId: E,
|
|
11481
11477
|
tableBlockContext: P(x({}, F), { collection: l == null ? void 0 : l.name, blockData: v })
|
|
11482
|
-
}), b(T(), z),
|
|
11478
|
+
}), b(T(), z), L.properties) {
|
|
11483
11479
|
const H = h + 1;
|
|
11484
11480
|
if (getPopupLayerState(H))
|
|
11485
11481
|
return;
|
|
@@ -11487,7 +11483,7 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
11487
11483
|
} else
|
|
11488
11484
|
console.error(
|
|
11489
11485
|
`[NocoBase] The popup schema is invalid, please check the schema:
|
|
11490
|
-
${JSON.stringify(
|
|
11486
|
+
${JSON.stringify(L, null, 2)}`
|
|
11491
11487
|
);
|
|
11492
11488
|
},
|
|
11493
11489
|
[
|
|
@@ -12947,7 +12943,7 @@ const compose = (...e) => {
|
|
|
12947
12943
|
return (n) => (o) => /* @__PURE__ */ jsx(t, { children: n && /* @__PURE__ */ jsx(n, x({}, o)) });
|
|
12948
12944
|
};
|
|
12949
12945
|
function defineGlobalDeps(e) {
|
|
12950
|
-
e.define("react", () => React), e.define("react-dom", () => ReactDOM__default), e.define("react/jsx-runtime", () => jsxRuntime), e.define("react-router", () => ReactRouter), e.define("react-router-dom", () => ReactRouterDom), e.define("antd", () => antd), e.define("antd-style", () => antdStyle), e.define("@ant-design/icons", () => antIcons), e.define("@ant-design/cssinjs", () => antdCssinjs), e.define("i18next", () => i18next), e.define("react-i18next", () => reactI18next), e.define("@formily/antd-v5", () => formilyAntdV5), e.define("@formily/core", () => formilyCore), e.define("@formily/react", () => formilyReact), e.define("@formily/shared", () => formilyShared), e.define("@formily/json-schema", () => formilyJsonSchema), e.define("@formily/reactive", () => formilyJsonReactive), e.define("@formily/path", () => formilyPath), e.define("@formily/validator", () => formilyValidator), e.define("@formily/reactive-react", () => formilyReactiveReact), e.define("@nocobase/utils", () => nocobaseClientUtils), e.define("@nocobase/utils/client", () => nocobaseClientUtils), e.define("@nocobase/client", () => nocobaseClient), e.define("@nocobase/client/client", () => nocobaseClient), e.define("@nocobase/evaluators", () => nocobaseEvaluators), e.define("@nocobase/evaluators/client", () => nocobaseEvaluators), e.define("@nocobase/sdk", () => nocobaseSDK), e.define("@dnd-kit/
|
|
12946
|
+
e.define("react", () => React), e.define("react-dom", () => ReactDOM__default), e.define("react/jsx-runtime", () => jsxRuntime), e.define("react-router", () => ReactRouter), e.define("react-router-dom", () => ReactRouterDom), e.define("antd", () => antd), e.define("antd-style", () => antdStyle), e.define("@ant-design/icons", () => antIcons), e.define("@ant-design/cssinjs", () => antdCssinjs), e.define("i18next", () => i18next), e.define("react-i18next", () => reactI18next), e.define("@formily/antd-v5", () => formilyAntdV5), e.define("@formily/core", () => formilyCore), e.define("@formily/react", () => formilyReact), e.define("@formily/shared", () => formilyShared), e.define("@formily/json-schema", () => formilyJsonSchema), e.define("@formily/reactive", () => formilyJsonReactive), e.define("@formily/path", () => formilyPath), e.define("@formily/validator", () => formilyValidator), e.define("@formily/reactive-react", () => formilyReactiveReact), e.define("@nocobase/utils", () => nocobaseClientUtils), e.define("@nocobase/utils/client", () => nocobaseClientUtils), e.define("@nocobase/client", () => nocobaseClient), e.define("@nocobase/client/client", () => nocobaseClient), e.define("@nocobase/evaluators", () => nocobaseEvaluators), e.define("@nocobase/evaluators/client", () => nocobaseEvaluators), e.define("@nocobase/sdk", () => nocobaseSDK), e.define("@dnd-kit/core", () => dndKitCore), e.define("@dnd-kit/sortable", () => dndKitSortable), e.define("axios", () => axios), e.define("dayjs", () => dayjs$1), e.define("lodash", () => _), e.define("ahooks", () => ahooks), e.define("@emotion/css", () => emotionCss), e.define("file-saver", () => FileSaver);
|
|
12951
12947
|
}
|
|
12952
12948
|
/* istanbul ignore file -- @preserve */
|
|
12953
12949
|
function getRequireJs() {
|
|
@@ -13038,26 +13034,26 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13038
13034
|
config: {}
|
|
13039
13035
|
}, l = {}, c = {}, u = {}, d = [], p = {}, m = {}, h = {}, g = 1, f = 1;
|
|
13040
13036
|
function C(k) {
|
|
13041
|
-
var z,
|
|
13037
|
+
var z, L;
|
|
13042
13038
|
for (z = 0; z < k.length; z++)
|
|
13043
|
-
if (
|
|
13039
|
+
if (L = k[z], L === ".")
|
|
13044
13040
|
k.splice(z, 1), z -= 1;
|
|
13045
|
-
else if (
|
|
13041
|
+
else if (L === "..") {
|
|
13046
13042
|
if (z === 0 || z === 1 && k[2] === ".." || k[z - 1] === "..")
|
|
13047
13043
|
continue;
|
|
13048
13044
|
z > 0 && (k.splice(z - 1, 2), z -= 2);
|
|
13049
13045
|
}
|
|
13050
13046
|
}
|
|
13051
|
-
function b(k, z,
|
|
13052
|
-
var q,
|
|
13053
|
-
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)) {
|
|
13054
13050
|
G = k.split("/");
|
|
13055
13051
|
e:
|
|
13056
13052
|
for (U = G.length; U > 0; U -= 1) {
|
|
13057
13053
|
if (J = G.slice(0, U).join("/"), re) {
|
|
13058
13054
|
for (H = re.length; H > 0; H -= 1)
|
|
13059
|
-
if (
|
|
13060
|
-
W =
|
|
13055
|
+
if (E = getOwn(se, re.slice(0, H).join("/")), E && (E = getOwn(E, J), E)) {
|
|
13056
|
+
W = E, X = U;
|
|
13061
13057
|
break e;
|
|
13062
13058
|
}
|
|
13063
13059
|
}
|
|
@@ -13081,36 +13077,36 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13081
13077
|
})([k]), !0;
|
|
13082
13078
|
}
|
|
13083
13079
|
function v(k) {
|
|
13084
|
-
var z,
|
|
13085
|
-
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];
|
|
13086
13082
|
}
|
|
13087
|
-
function F(k, z,
|
|
13088
|
-
var
|
|
13089
|
-
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) {
|
|
13090
13086
|
return b(Z, K, q);
|
|
13091
|
-
}) : 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) : "", {
|
|
13092
13088
|
prefix: J,
|
|
13093
13089
|
name: ee,
|
|
13094
13090
|
parentMap: z,
|
|
13095
13091
|
unnormalized: !!U,
|
|
13096
|
-
url:
|
|
13092
|
+
url: E,
|
|
13097
13093
|
originalName: W,
|
|
13098
13094
|
isDefine: X,
|
|
13099
13095
|
id: (J ? J + "!" + ee : ee) + U
|
|
13100
13096
|
};
|
|
13101
13097
|
}
|
|
13102
13098
|
function I(k) {
|
|
13103
|
-
var z = k.id,
|
|
13104
|
-
return
|
|
13099
|
+
var z = k.id, L = getOwn(l, z);
|
|
13100
|
+
return L || (L = l[z] = new o.Module(k)), L;
|
|
13105
13101
|
}
|
|
13106
|
-
function R(k, z,
|
|
13107
|
-
var q = k.id,
|
|
13108
|
-
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));
|
|
13109
13105
|
}
|
|
13110
13106
|
function T(k, z) {
|
|
13111
|
-
var
|
|
13112
|
-
z ? z(k) : (each(
|
|
13113
|
-
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);
|
|
13114
13110
|
G && (G.error = k, G.events.error && (q = !0, G.emit("error", k)));
|
|
13115
13111
|
}), q || req.onError(k));
|
|
13116
13112
|
}
|
|
@@ -13142,26 +13138,26 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13142
13138
|
function O(k) {
|
|
13143
13139
|
delete l[k], delete c[k];
|
|
13144
13140
|
}
|
|
13145
|
-
function j(k, z,
|
|
13141
|
+
function j(k, z, L) {
|
|
13146
13142
|
var q = k.map.id;
|
|
13147
|
-
k.error ? k.emit("error", k.error) : (z[q] = !0, each(k.depMaps, function(
|
|
13148
|
-
var U =
|
|
13149
|
-
H && !k.depMatched[G] && !
|
|
13150
|
-
}),
|
|
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);
|
|
13151
13147
|
}
|
|
13152
13148
|
function N() {
|
|
13153
|
-
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;
|
|
13154
13150
|
if (!t) {
|
|
13155
13151
|
if (t = !0, eachProp(c, function(J) {
|
|
13156
13152
|
var K = J.map, W = K.id;
|
|
13157
13153
|
if (J.enabled && (K.isDefine || G.push(J), !J.error)) {
|
|
13158
13154
|
if (!J.inited && q)
|
|
13159
|
-
y(W) ? (z = !0, U = !0) : (
|
|
13155
|
+
y(W) ? (z = !0, U = !0) : (E.push(W), S(W));
|
|
13160
13156
|
else if (!J.inited && J.fetched && K.isDefine && (U = !0, !K.prefix))
|
|
13161
13157
|
return H = !1;
|
|
13162
13158
|
}
|
|
13163
|
-
}), q &&
|
|
13164
|
-
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);
|
|
13165
13161
|
H && each(G, function(J) {
|
|
13166
13162
|
j(J, {}, {});
|
|
13167
13163
|
}), (!q || z) && U && (isBrowser || isWebWorker) && !i && (i = setTimeout(function() {
|
|
@@ -13172,10 +13168,10 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13172
13168
|
n = function(k) {
|
|
13173
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;
|
|
13174
13170
|
}, n.prototype = {
|
|
13175
|
-
init: function(k, z,
|
|
13176
|
-
q = q || {}, !this.inited && (this.factory = z,
|
|
13177
|
-
this.emit("error",
|
|
13178
|
-
})), 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());
|
|
13179
13175
|
},
|
|
13180
13176
|
defineDep: function(k, z) {
|
|
13181
13177
|
this.depMatched[k] || (this.depMatched[k] = !0, this.depCount -= 1, this.depExports[k] = z);
|
|
@@ -13204,9 +13200,9 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13204
13200
|
*/
|
|
13205
13201
|
check: function() {
|
|
13206
13202
|
if (!(!this.enabled || this.enabling)) {
|
|
13207
|
-
var k, z,
|
|
13203
|
+
var k, z, L = this.map.id, q = this.depExports, E = this.exports, G = this.factory;
|
|
13208
13204
|
if (!this.inited)
|
|
13209
|
-
hasProp(o.defQueueMap,
|
|
13205
|
+
hasProp(o.defQueueMap, L) || this.fetch();
|
|
13210
13206
|
else if (this.error)
|
|
13211
13207
|
this.emit("error", this.error);
|
|
13212
13208
|
else if (!this.defining) {
|
|
@@ -13214,32 +13210,32 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13214
13210
|
if (isFunction(G)) {
|
|
13215
13211
|
if (this.events.error && this.map.isDefine || req.onError !== defaultOnError)
|
|
13216
13212
|
try {
|
|
13217
|
-
|
|
13213
|
+
E = o.execCb(L, G, q, E);
|
|
13218
13214
|
} catch (H) {
|
|
13219
13215
|
k = H;
|
|
13220
13216
|
}
|
|
13221
13217
|
else
|
|
13222
|
-
|
|
13223
|
-
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)
|
|
13224
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);
|
|
13225
13221
|
} else
|
|
13226
|
-
|
|
13227
|
-
if (this.exports =
|
|
13222
|
+
E = G;
|
|
13223
|
+
if (this.exports = E, this.map.isDefine && !this.ignore && (p[L] = E, req.onResourceLoad)) {
|
|
13228
13224
|
var U = [];
|
|
13229
13225
|
each(this.depMaps, function(H) {
|
|
13230
13226
|
U.push(H.normalizedMap || H);
|
|
13231
13227
|
}), req.onResourceLoad(o, this.map, U);
|
|
13232
13228
|
}
|
|
13233
|
-
O(
|
|
13229
|
+
O(L), this.defined = !0;
|
|
13234
13230
|
}
|
|
13235
13231
|
this.defining = !1, this.defined && !this.defineEmitted && (this.defineEmitted = !0, this.emit("defined", this.exports), this.defineEmitComplete = !0);
|
|
13236
13232
|
}
|
|
13237
13233
|
}
|
|
13238
13234
|
},
|
|
13239
13235
|
callPlugin: function() {
|
|
13240
|
-
var k = this.map, z = k.id,
|
|
13241
|
-
this.depMaps.push(
|
|
13242
|
-
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, {
|
|
13243
13239
|
enableBuildCallback: !0
|
|
13244
13240
|
});
|
|
13245
13241
|
if (this.map.unnormalized) {
|
|
@@ -13269,17 +13265,17 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13269
13265
|
this.map.url = o.nameToUrl(H), this.load();
|
|
13270
13266
|
return;
|
|
13271
13267
|
}
|
|
13272
|
-
|
|
13268
|
+
E = bind(this, function(X) {
|
|
13273
13269
|
this.init([], function() {
|
|
13274
13270
|
return X;
|
|
13275
13271
|
}, null, {
|
|
13276
13272
|
enabled: !0
|
|
13277
13273
|
});
|
|
13278
|
-
}),
|
|
13274
|
+
}), E.error = bind(this, function(X) {
|
|
13279
13275
|
this.inited = !0, this.error = X, X.requireModules = [z], eachProp(l, function(ee) {
|
|
13280
13276
|
ee.map.id.indexOf(z + "_unnormalized") === 0 && O(ee.map.id);
|
|
13281
13277
|
}), T(X);
|
|
13282
|
-
}),
|
|
13278
|
+
}), E.fromText = bind(this, function(X, ee) {
|
|
13283
13279
|
var Z = k.name, ne = F(Z), re = useInteractive;
|
|
13284
13280
|
ee && (X = ee), re && (useInteractive = !1), I(ne), hasProp(a.config, z) && (a.config[Z] = a.config[z]);
|
|
13285
13281
|
try {
|
|
@@ -13292,21 +13288,21 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13292
13288
|
[z]
|
|
13293
13289
|
));
|
|
13294
13290
|
}
|
|
13295
|
-
re && (useInteractive = !0), this.depMaps.push(ne), o.completeLoad(Z), W([Z],
|
|
13296
|
-
}), q.load(k.name, W,
|
|
13297
|
-
})), 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;
|
|
13298
13294
|
},
|
|
13299
13295
|
enable: function() {
|
|
13300
13296
|
c[this.map.id] = this, this.enabled = !0, this.enabling = !0, each(this.depMaps, bind(this, function(k, z) {
|
|
13301
|
-
var
|
|
13297
|
+
var L, q, E;
|
|
13302
13298
|
if (typeof k == "string") {
|
|
13303
13299
|
if (k = F(
|
|
13304
13300
|
k,
|
|
13305
13301
|
this.map.isDefine ? this.map : this.map.parentMap,
|
|
13306
13302
|
!1,
|
|
13307
13303
|
!this.skipMap
|
|
13308
|
-
), this.depMaps[z] = k,
|
|
13309
|
-
this.depExports[z] =
|
|
13304
|
+
), this.depMaps[z] = k, E = getOwn(r, k.id), E) {
|
|
13305
|
+
this.depExports[z] = E(this);
|
|
13310
13306
|
return;
|
|
13311
13307
|
}
|
|
13312
13308
|
this.depCount += 1, R(k, "defined", bind(this, function(G) {
|
|
@@ -13315,27 +13311,27 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13315
13311
|
this.emit("error", G);
|
|
13316
13312
|
}));
|
|
13317
13313
|
}
|
|
13318
|
-
|
|
13314
|
+
L = k.id, q = l[L], !hasProp(r, L) && q && !q.enabled && o.enable(k, this);
|
|
13319
13315
|
})), eachProp(this.pluginMaps, bind(this, function(k) {
|
|
13320
13316
|
var z = getOwn(l, k.id);
|
|
13321
13317
|
z && !z.enabled && o.enable(k, this);
|
|
13322
13318
|
})), this.enabling = !1, this.check();
|
|
13323
13319
|
},
|
|
13324
13320
|
on: function(k, z) {
|
|
13325
|
-
var
|
|
13326
|
-
|
|
13321
|
+
var L = this.events[k];
|
|
13322
|
+
L || (L = this.events[k] = []), L.push(z);
|
|
13327
13323
|
},
|
|
13328
13324
|
emit: function(k, z) {
|
|
13329
|
-
each(this.events[k], function(
|
|
13330
|
-
|
|
13325
|
+
each(this.events[k], function(L) {
|
|
13326
|
+
L(z);
|
|
13331
13327
|
}), k === "error" && delete this.events[k];
|
|
13332
13328
|
}
|
|
13333
13329
|
};
|
|
13334
13330
|
function B(k) {
|
|
13335
13331
|
hasProp(p, k[0]) || I(F(k[0], null, !0)).init(k[1], k[2]);
|
|
13336
13332
|
}
|
|
13337
|
-
function w(k, z,
|
|
13338
|
-
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);
|
|
13339
13335
|
}
|
|
13340
13336
|
function M(k) {
|
|
13341
13337
|
var z = k.currentTarget || k.srcElement;
|
|
@@ -13372,51 +13368,51 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13372
13368
|
configure: function(k) {
|
|
13373
13369
|
if (k.baseUrl && k.baseUrl.charAt(k.baseUrl.length - 1) !== "/" && (k.baseUrl += "/"), typeof k.urlArgs == "string") {
|
|
13374
13370
|
var z = k.urlArgs;
|
|
13375
|
-
k.urlArgs = function(
|
|
13371
|
+
k.urlArgs = function(E, G) {
|
|
13376
13372
|
return (G.indexOf("?") === -1 ? "?" : "&") + z;
|
|
13377
13373
|
};
|
|
13378
13374
|
}
|
|
13379
|
-
var
|
|
13375
|
+
var L = a.shim, q = {
|
|
13380
13376
|
paths: !0,
|
|
13381
13377
|
bundles: !0,
|
|
13382
13378
|
config: !0,
|
|
13383
13379
|
map: !0
|
|
13384
13380
|
};
|
|
13385
|
-
eachProp(k, function(
|
|
13386
|
-
q[G] ? (a[G] || (a[G] = {}), mixin(a[G],
|
|
13387
|
-
}), k.bundles && eachProp(k.bundles, function(
|
|
13388
|
-
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) {
|
|
13389
13385
|
U !== G && (h[U] = G);
|
|
13390
13386
|
});
|
|
13391
|
-
}), k.shim && (eachProp(k.shim, function(
|
|
13392
|
-
isArray(
|
|
13393
|
-
deps:
|
|
13394
|
-
}), (
|
|
13395
|
-
}), 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) {
|
|
13396
13392
|
var G, U;
|
|
13397
|
-
|
|
13398
|
-
}), eachProp(l, function(
|
|
13399
|
-
!
|
|
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));
|
|
13400
13396
|
}), (k.deps || k.callback) && o.require(k.deps || [], k.callback);
|
|
13401
13397
|
},
|
|
13402
13398
|
makeShimExports: function(k) {
|
|
13403
13399
|
function z() {
|
|
13404
|
-
var
|
|
13405
|
-
return k.init && (
|
|
13400
|
+
var L;
|
|
13401
|
+
return k.init && (L = k.init.apply(global, arguments)), L || k.exports && getGlobal(k.exports);
|
|
13406
13402
|
}
|
|
13407
13403
|
return z;
|
|
13408
13404
|
},
|
|
13409
13405
|
makeRequire: function(k, z) {
|
|
13410
13406
|
z = z || {};
|
|
13411
|
-
function
|
|
13407
|
+
function L(q, E, G) {
|
|
13412
13408
|
var U, H, J;
|
|
13413
|
-
return z.enableBuildCallback &&
|
|
13414
|
-
$(), 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, {
|
|
13415
13411
|
enabled: !0
|
|
13416
13412
|
}), N();
|
|
13417
|
-
}),
|
|
13413
|
+
}), L);
|
|
13418
13414
|
}
|
|
13419
|
-
return mixin(
|
|
13415
|
+
return mixin(L, {
|
|
13420
13416
|
isBrowser,
|
|
13421
13417
|
/**
|
|
13422
13418
|
* Converts a module name + .extension into an URL path.
|
|
@@ -13424,12 +13420,12 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13424
13420
|
* plain URLs like nameToUrl.
|
|
13425
13421
|
*/
|
|
13426
13422
|
toUrl: function(q) {
|
|
13427
|
-
var
|
|
13428
|
-
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(
|
|
13429
13425
|
q,
|
|
13430
13426
|
k && k.id,
|
|
13431
13427
|
!0
|
|
13432
|
-
),
|
|
13428
|
+
), E, !0);
|
|
13433
13429
|
},
|
|
13434
13430
|
defined: function(q) {
|
|
13435
13431
|
return hasProp(p, F(q, k, !1, !0).id);
|
|
@@ -13437,13 +13433,13 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13437
13433
|
specified: function(q) {
|
|
13438
13434
|
return q = F(q, k, !1, !0).id, hasProp(p, q) || hasProp(l, q);
|
|
13439
13435
|
}
|
|
13440
|
-
}), k || (
|
|
13436
|
+
}), k || (L.undef = function(q) {
|
|
13441
13437
|
D();
|
|
13442
|
-
var
|
|
13443
|
-
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) {
|
|
13444
13440
|
U[0] === q && d.splice(H, 1);
|
|
13445
13441
|
}), delete o.defQueueMap[q], G && (G.events.defined && (u[q] = G.events), O(q));
|
|
13446
|
-
}),
|
|
13442
|
+
}), L;
|
|
13447
13443
|
},
|
|
13448
13444
|
/**
|
|
13449
13445
|
* Called to enable a module if it is still in the registry
|
|
@@ -13462,15 +13458,15 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13462
13458
|
* @param {String} moduleName the name of the module to potentially complete.
|
|
13463
13459
|
*/
|
|
13464
13460
|
completeLoad: function(k) {
|
|
13465
|
-
var z,
|
|
13461
|
+
var z, L, q, E = getOwn(a.shim, k) || {}, G = E.exports;
|
|
13466
13462
|
for (D(); d.length; ) {
|
|
13467
|
-
if (
|
|
13468
|
-
if (
|
|
13463
|
+
if (L = d.shift(), L[0] === null) {
|
|
13464
|
+
if (L[0] = k, z)
|
|
13469
13465
|
break;
|
|
13470
13466
|
z = !0;
|
|
13471
13467
|
} else
|
|
13472
|
-
|
|
13473
|
-
B(
|
|
13468
|
+
L[0] === k && (z = !0);
|
|
13469
|
+
B(L);
|
|
13474
13470
|
}
|
|
13475
13471
|
if (o.defQueueMap = {}, q = getOwn(l, k), !z && !hasProp(p, k) && q && !q.inited) {
|
|
13476
13472
|
if (a.enforceDefine && (!G || !getGlobal(G)))
|
|
@@ -13480,7 +13476,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13480
13476
|
null,
|
|
13481
13477
|
[k]
|
|
13482
13478
|
));
|
|
13483
|
-
B([k,
|
|
13479
|
+
B([k, E.deps || [], E.exportsFn]);
|
|
13484
13480
|
}
|
|
13485
13481
|
N();
|
|
13486
13482
|
},
|
|
@@ -13491,19 +13487,19 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13491
13487
|
* it is assumed to have already been normalized. This is an
|
|
13492
13488
|
* internal API, not a public one. Use toUrl for the public API.
|
|
13493
13489
|
*/
|
|
13494
|
-
nameToUrl: function(k, z,
|
|
13495
|
-
var q,
|
|
13490
|
+
nameToUrl: function(k, z, L) {
|
|
13491
|
+
var q, E, G, U, H, J, K, W = getOwn(a.pkgs, k);
|
|
13496
13492
|
if (W && (k = W), K = getOwn(h, k), K)
|
|
13497
|
-
return o.nameToUrl(K, z,
|
|
13493
|
+
return o.nameToUrl(K, z, L);
|
|
13498
13494
|
if (req.jsExtRegExp.test(k))
|
|
13499
13495
|
H = k + (z || "");
|
|
13500
13496
|
else {
|
|
13501
|
-
for (q = a.paths,
|
|
13502
|
-
if (U =
|
|
13503
|
-
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);
|
|
13504
13500
|
break;
|
|
13505
13501
|
}
|
|
13506
|
-
H =
|
|
13502
|
+
H = E.join("/"), H += z || (/^data\:|^blob\:|\?/.test(H) || L ? "" : ".js"), H = (H.charAt(0) === "/" || H.match(/^[\w\+\.\-]+:/) ? "" : a.baseUrl) + H;
|
|
13507
13503
|
}
|
|
13508
13504
|
return a.urlArgs && !/^blob\:/.test(H) ? H + a.urlArgs(k, H) : H;
|
|
13509
13505
|
},
|
|
@@ -13519,8 +13515,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13519
13515
|
*
|
|
13520
13516
|
* @private
|
|
13521
13517
|
*/
|
|
13522
|
-
execCb: function(k, z,
|
|
13523
|
-
return z.apply(q,
|
|
13518
|
+
execCb: function(k, z, L, q) {
|
|
13519
|
+
return z.apply(q, L);
|
|
13524
13520
|
},
|
|
13525
13521
|
/**
|
|
13526
13522
|
* callback for script loads, used to check status of loading.
|
|
@@ -13541,13 +13537,13 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
13541
13537
|
onScriptError: function(k) {
|
|
13542
13538
|
var z = M(k);
|
|
13543
13539
|
if (!y(z.id)) {
|
|
13544
|
-
var
|
|
13545
|
-
return eachProp(l, function(q,
|
|
13546
|
-
|
|
13540
|
+
var L = [];
|
|
13541
|
+
return eachProp(l, function(q, E) {
|
|
13542
|
+
E.indexOf("_@r") !== 0 && each(q.depMaps, function(G) {
|
|
13547
13543
|
if (G.id === z.id)
|
|
13548
|
-
return
|
|
13544
|
+
return L.push(E), !0;
|
|
13549
13545
|
});
|
|
13550
|
-
}), 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]));
|
|
13551
13547
|
}
|
|
13552
13548
|
}
|
|
13553
13549
|
}, o.require = o.makeRequire(), o;
|
|
@@ -13829,7 +13825,7 @@ function getOperators() {
|
|
|
13829
13825
|
return r == null || r.length === 0 ? !1 : Array.isArray(r) && Array.isArray(i) && r.some((a) => Array.isArray(a)) ? r.some((a) => a.some((l) => i.includes(l))) : r.some((a) => i.includes(a));
|
|
13830
13826
|
},
|
|
13831
13827
|
$noneOf: function(r, i) {
|
|
13832
|
-
return !r ||
|
|
13828
|
+
return !r || r.length === 0 || !i || i.length === 0 ? !0 : (Array.isArray(r) || (r = [r]), Array.isArray(i) || (i = [i]), !i.some((a) => r.includes(a)));
|
|
13833
13829
|
},
|
|
13834
13830
|
$notMatch: function(r, i) {
|
|
13835
13831
|
if (r.length !== i.length)
|
|
@@ -15173,14 +15169,14 @@ GridColContext.displayName = "GridColContext";
|
|
|
15173
15169
|
const GridContext = createContext({});
|
|
15174
15170
|
GridContext.displayName = "GridContext";
|
|
15175
15171
|
const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow = (e) => e["x-component"] === "Grid.Row", ColDivider = (e) => {
|
|
15176
|
-
var
|
|
15172
|
+
var I, R, T;
|
|
15177
15173
|
const { token: t } = useToken$1(), n = useRef(null), { dn: o, designable: r } = useDesignable(), { isOver: i, setNodeRef: a } = useDroppable({
|
|
15178
15174
|
id: e.id,
|
|
15179
15175
|
data: e.data,
|
|
15180
15176
|
disabled: !r
|
|
15181
15177
|
}), l = useRef(), c = useMemo(() => i ? {
|
|
15182
15178
|
backgroundColor: new TinyColor(t.colorSettings).setAlpha(0.1).toHex8String()
|
|
15183
|
-
} : {}, [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(
|
|
15184
15180
|
() => d ? Object.keys(d.properties).length : 0,
|
|
15185
15181
|
[d]
|
|
15186
15182
|
);
|
|
@@ -15189,46 +15185,51 @@ const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow =
|
|
|
15189
15185
|
if (e.first)
|
|
15190
15186
|
m = d !== e.cols[0];
|
|
15191
15187
|
else {
|
|
15192
|
-
const
|
|
15193
|
-
m = d !==
|
|
15194
|
-
}
|
|
15195
|
-
const h = e.cols[e.index], g = e.cols[e.index + 1], {
|
|
15196
|
-
attributes:
|
|
15197
|
-
listeners:
|
|
15198
|
-
setNodeRef:
|
|
15199
|
-
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
|
|
15200
15196
|
} = useDraggable({
|
|
15201
|
-
disabled:
|
|
15197
|
+
disabled: f,
|
|
15202
15198
|
id: e.id,
|
|
15203
15199
|
data: {
|
|
15204
15200
|
dividerRef: l,
|
|
15205
15201
|
prevSchema: h,
|
|
15206
15202
|
nextSchema: g
|
|
15203
|
+
},
|
|
15204
|
+
attributes: {
|
|
15205
|
+
tabIndex: f ? -1 : 0
|
|
15207
15206
|
}
|
|
15208
|
-
}), [
|
|
15207
|
+
}), [v, F] = useState([0, 0]);
|
|
15209
15208
|
return useDndMonitor({
|
|
15210
|
-
onDragStart(
|
|
15211
|
-
|
|
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)
|
|
15212
15213
|
return;
|
|
15213
|
-
n.current =
|
|
15214
|
-
const
|
|
15215
|
-
|
|
15214
|
+
n.current = D.active.id;
|
|
15215
|
+
const j = O.current, N = j.previousElementSibling, B = j.nextElementSibling;
|
|
15216
|
+
F([N.clientWidth, B.clientWidth]);
|
|
15216
15217
|
},
|
|
15217
|
-
onDragMove(
|
|
15218
|
-
if (!r || !
|
|
15218
|
+
onDragMove(D) {
|
|
15219
|
+
if (!r || !y)
|
|
15219
15220
|
return;
|
|
15220
|
-
n.current ===
|
|
15221
|
-
const
|
|
15222
|
-
|
|
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`;
|
|
15223
15224
|
},
|
|
15224
|
-
onDragEnd(
|
|
15225
|
-
var
|
|
15226
|
-
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))
|
|
15227
15228
|
return;
|
|
15228
|
-
const
|
|
15229
|
+
const O = l.current, j = O.previousElementSibling, N = O.nextElementSibling;
|
|
15229
15230
|
h["x-component-props"] = h["x-component-props"] || {}, g["x-component-props"] = g["x-component-props"] || {};
|
|
15230
|
-
const
|
|
15231
|
-
_.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", {
|
|
15232
15233
|
schemas: [
|
|
15233
15234
|
{
|
|
15234
15235
|
"x-uid": h["x-uid"],
|
|
@@ -15244,16 +15245,16 @@ const breakRemoveOnGrid = (e) => e["x-component"] === "Grid", breakRemoveOnRow =
|
|
|
15244
15245
|
}), /* @__PURE__ */ jsx(
|
|
15245
15246
|
"div",
|
|
15246
15247
|
{
|
|
15247
|
-
ref: (
|
|
15248
|
-
m && (a(
|
|
15248
|
+
ref: (D) => {
|
|
15249
|
+
m && (a(D), l.current = D);
|
|
15249
15250
|
},
|
|
15250
15251
|
className: cls("nb-col-divider", "ColDivider"),
|
|
15251
15252
|
style: c,
|
|
15252
15253
|
children: /* @__PURE__ */ jsx(
|
|
15253
15254
|
"div",
|
|
15254
15255
|
P(x(x({
|
|
15255
|
-
ref:
|
|
15256
|
-
},
|
|
15256
|
+
ref: S
|
|
15257
|
+
}, b), C), {
|
|
15257
15258
|
className: e.first || e.last || !r ? null : "DraggableNode"
|
|
15258
15259
|
})
|
|
15259
15260
|
)
|
|
@@ -15542,9 +15543,9 @@ const useTableBlockProps = () => {
|
|
|
15542
15543
|
),
|
|
15543
15544
|
onChange: useCallback(
|
|
15544
15545
|
({ current: S, pageSize: y }, v, F) => {
|
|
15545
|
-
var O, j, N, B, w, M, $, k, z,
|
|
15546
|
+
var O, j, N, B, w, M, $, k, z, L;
|
|
15546
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 });
|
|
15547
|
-
R && (D.sort = R), (
|
|
15548
|
+
R && (D.sort = R), (L = a.current) == null || L.service.run(D);
|
|
15548
15549
|
},
|
|
15549
15550
|
[t.parent]
|
|
15550
15551
|
),
|
|
@@ -15557,13 +15558,13 @@ const useTableBlockProps = () => {
|
|
|
15557
15558
|
}
|
|
15558
15559
|
const T = R.find((D) => D.uid === t.parent["x-uid"]);
|
|
15559
15560
|
R.forEach((D) => {
|
|
15560
|
-
var $, k, z,
|
|
15561
|
+
var $, k, z, L;
|
|
15561
15562
|
const O = F.find((q) => q.uid === D.uid);
|
|
15562
15563
|
if (!O)
|
|
15563
15564
|
return;
|
|
15564
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) || {};
|
|
15565
15566
|
if (v.includes(S[i.rowKey])) {
|
|
15566
|
-
if ((
|
|
15567
|
+
if ((L = D.clearSelection) == null || L.call(D), D.dataLoadingMode === "manual")
|
|
15567
15568
|
return D.clearData();
|
|
15568
15569
|
delete w[I];
|
|
15569
15570
|
} else
|
|
@@ -15969,10 +15970,10 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
|
|
|
15969
15970
|
var a, l, c, u, d, p, m, h, g, f, C, b, S, y, v, F;
|
|
15970
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"]);
|
|
15971
15972
|
return useEffect(() => {
|
|
15972
|
-
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;
|
|
15973
15974
|
if (!((R = t == null ? void 0 : t.service) != null && R.loading)) {
|
|
15974
|
-
const q = (D = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : D.data.map((
|
|
15975
|
-
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;
|
|
15976
15977
|
}
|
|
15977
15978
|
}, [
|
|
15978
15979
|
i == null ? void 0 : i.foreignKey,
|
|
@@ -17006,11 +17007,10 @@ const useFormItemInitializerFields = (e) => {
|
|
|
17006
17007
|
var u;
|
|
17007
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();
|
|
17008
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) => {
|
|
17009
|
-
var h, g
|
|
17010
|
+
var h, g;
|
|
17010
17011
|
const p = o(d.interface), m = {
|
|
17011
17012
|
type: "string",
|
|
17012
17013
|
name: d.name,
|
|
17013
|
-
title: ((h = d == null ? void 0 : d.uiSchema) == null ? void 0 : h.title) || d.name,
|
|
17014
17014
|
// 'x-designer': 'FormItem.Designer',
|
|
17015
17015
|
"x-toolbar": "FormItemSchemaToolbar",
|
|
17016
17016
|
"x-settings": "fieldSettings:FormItem",
|
|
@@ -17019,14 +17019,14 @@ const useFormItemInitializerFields = (e) => {
|
|
|
17019
17019
|
"x-collection-field": `${t}.${d.name}`
|
|
17020
17020
|
};
|
|
17021
17021
|
return {
|
|
17022
|
-
name: ((
|
|
17022
|
+
name: ((h = d == null ? void 0 : d.uiSchema) == null ? void 0 : h.title) || d.name,
|
|
17023
17023
|
type: "item",
|
|
17024
|
-
title: ((
|
|
17024
|
+
title: ((g = d == null ? void 0 : d.uiSchema) == null ? void 0 : g.title) || d.name,
|
|
17025
17025
|
Component: "CollectionFieldInitializer",
|
|
17026
17026
|
remove: c,
|
|
17027
|
-
schemaInitialize: (
|
|
17028
|
-
var
|
|
17029
|
-
(
|
|
17027
|
+
schemaInitialize: (f) => {
|
|
17028
|
+
var C;
|
|
17029
|
+
(C = p == null ? void 0 : p.schemaInitialize) == null || C.call(p, f, {
|
|
17030
17030
|
field: d,
|
|
17031
17031
|
block: l,
|
|
17032
17032
|
readPretty: a,
|
|
@@ -18064,7 +18064,7 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
18064
18064
|
})
|
|
18065
18065
|
)
|
|
18066
18066
|
};
|
|
18067
|
-
}, [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(() => {
|
|
18068
18068
|
var K;
|
|
18069
18069
|
if (o === !1)
|
|
18070
18070
|
return null;
|
|
@@ -18072,7 +18072,7 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
18072
18072
|
return w(z);
|
|
18073
18073
|
if (k != null && k.InitializerComponent || k != null && k.renderSchemaInitializer)
|
|
18074
18074
|
return k != null && k.InitializerComponent ? /* @__PURE__ */ jsx(k.InitializerComponent, x({}, z)) : (K = k.renderSchemaInitializer) == null ? void 0 : K.call(k, z);
|
|
18075
|
-
}, [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";
|
|
18076
18076
|
useEffect(() => {
|
|
18077
18077
|
const K = G.current;
|
|
18078
18078
|
let W = K == null ? void 0 : K.parentElement;
|
|
@@ -18112,9 +18112,9 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
18112
18112
|
j[1] && /* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: `${y("Reference template")}: ${`${j[1]}` || y("Untitled")}` })
|
|
18113
18113
|
] }) }),
|
|
18114
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: [
|
|
18115
|
-
|
|
18115
|
+
L,
|
|
18116
18116
|
/* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: O, children: q }),
|
|
18117
|
-
|
|
18117
|
+
E
|
|
18118
18118
|
] }) })
|
|
18119
18119
|
]
|
|
18120
18120
|
}
|
|
@@ -18208,10 +18208,10 @@ const SchemaToolbarErrorFallback = (e) => {
|
|
|
18208
18208
|
[t, p]
|
|
18209
18209
|
), v = useCallback(
|
|
18210
18210
|
(w, M = !1, $) => {
|
|
18211
|
-
var
|
|
18211
|
+
var L;
|
|
18212
18212
|
if (!w)
|
|
18213
18213
|
return [];
|
|
18214
|
-
const k = (
|
|
18214
|
+
const k = (L = p($)) == null ? void 0 : L.getCollection(w);
|
|
18215
18215
|
return (k == null ? void 0 : k.getChildrenCollections(M)) || [];
|
|
18216
18216
|
},
|
|
18217
18217
|
[t, p]
|
|
@@ -18226,19 +18226,19 @@ const SchemaToolbarErrorFallback = (e) => {
|
|
|
18226
18226
|
var ee;
|
|
18227
18227
|
const {
|
|
18228
18228
|
association: z = !1,
|
|
18229
|
-
cached:
|
|
18229
|
+
cached: L = {},
|
|
18230
18230
|
collectionNames: q = [w],
|
|
18231
|
-
maxDepth:
|
|
18231
|
+
maxDepth: E = 1,
|
|
18232
18232
|
allowAllTypes: G = !1,
|
|
18233
18233
|
exceptInterfaces: U = [],
|
|
18234
18234
|
prefixFieldValue: H = "",
|
|
18235
18235
|
usePrefix: J = !1,
|
|
18236
18236
|
dataSource: K
|
|
18237
18237
|
} = k || {};
|
|
18238
|
-
if (q.length - 1 >
|
|
18238
|
+
if (q.length - 1 > E)
|
|
18239
18239
|
return;
|
|
18240
|
-
if (
|
|
18241
|
-
return _.cloneDeep(
|
|
18240
|
+
if (L[w])
|
|
18241
|
+
return _.cloneDeep(L[w]);
|
|
18242
18242
|
M && typeof M == "string" && (M = [M]), $ && typeof $ == "string" && ($ = [$]);
|
|
18243
18243
|
const W = b(w, K), X = (ee = W == null ? void 0 : W.filter(
|
|
18244
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))
|
|
@@ -18249,14 +18249,14 @@ const SchemaToolbarErrorFallback = (e) => {
|
|
|
18249
18249
|
label: f((re = Z == null ? void 0 : Z.uiSchema) == null ? void 0 : re.title) || Z.name
|
|
18250
18250
|
}, Z);
|
|
18251
18251
|
return z && Z.target && (ne.children = q.includes(Z.target) ? [] : I(Z.target, M, $, P(x({}, k), {
|
|
18252
|
-
cached:
|
|
18252
|
+
cached: L,
|
|
18253
18253
|
dataSource: K,
|
|
18254
18254
|
collectionNames: [...q, Z.target],
|
|
18255
18255
|
prefixFieldValue: J ? H ? `${H}.${Z.name}` : Z.name : "",
|
|
18256
18256
|
usePrefix: J
|
|
18257
18257
|
})), !((se = ne.children) != null && se.length)) ? null : ne;
|
|
18258
18258
|
}).filter(Boolean);
|
|
18259
|
-
return
|
|
18259
|
+
return L[w] = X, X;
|
|
18260
18260
|
},
|
|
18261
18261
|
[b]
|
|
18262
18262
|
), R = useCallback(
|
|
@@ -21672,7 +21672,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21672
21672
|
initialValues: c,
|
|
21673
21673
|
width: u = "fit-content",
|
|
21674
21674
|
noRecord: d = !1,
|
|
21675
|
-
ModalContextProvider: p = (
|
|
21675
|
+
ModalContextProvider: p = (E) => /* @__PURE__ */ jsx(Fragment$1, { children: E.children })
|
|
21676
21676
|
} = q, m = Y(q, [
|
|
21677
21677
|
"hidden",
|
|
21678
21678
|
"title",
|
|
@@ -21685,14 +21685,14 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21685
21685
|
"width",
|
|
21686
21686
|
"noRecord",
|
|
21687
21687
|
"ModalContextProvider"
|
|
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(),
|
|
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();
|
|
21689
21689
|
return t ? null : /* @__PURE__ */ jsx(
|
|
21690
21690
|
SchemaSettingsItem,
|
|
21691
21691
|
P(x({
|
|
21692
21692
|
title: n
|
|
21693
21693
|
}, m), {
|
|
21694
21694
|
onClick: () => V(void 0, null, function* () {
|
|
21695
|
-
const
|
|
21695
|
+
const E = l ? yield l() : c, G = _.isFunction(e.schema) ? e.schema() : e.schema;
|
|
21696
21696
|
FormDialog(
|
|
21697
21697
|
{ title: G.title || n, width: u },
|
|
21698
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(
|
|
@@ -21701,8 +21701,8 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21701
21701
|
recordData: z == null ? void 0 : z.value,
|
|
21702
21702
|
collection: z == null ? void 0 : z.collection,
|
|
21703
21703
|
parent: {
|
|
21704
|
-
recordData:
|
|
21705
|
-
collection:
|
|
21704
|
+
recordData: L == null ? void 0 : L.value,
|
|
21705
|
+
collection: L == null ? void 0 : L.collection
|
|
21706
21706
|
},
|
|
21707
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(
|
|
21708
21708
|
FormActiveFieldsProvider,
|
|
@@ -21748,7 +21748,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
21748
21748
|
) }) }) }) }),
|
|
21749
21749
|
b
|
|
21750
21750
|
).open({
|
|
21751
|
-
initialValues:
|
|
21751
|
+
initialValues: E,
|
|
21752
21752
|
effects: i
|
|
21753
21753
|
}).then((U) => (a(U), U)).catch((U) => {
|
|
21754
21754
|
console.error(U);
|
|
@@ -22586,7 +22586,7 @@ const getActionContext = (e) => {
|
|
|
22586
22586
|
var n;
|
|
22587
22587
|
return ((n = e.fieldSchema) == null ? void 0 : n["x-action-context"]) || {};
|
|
22588
22588
|
}, SchemaSettingsDefaultValue = function e(t) {
|
|
22589
|
-
var k, z,
|
|
22589
|
+
var k, z, L;
|
|
22590
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;
|
|
22591
22591
|
let u;
|
|
22592
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(
|
|
@@ -22594,12 +22594,12 @@ const getActionContext = (e) => {
|
|
|
22594
22594
|
[o, p, d]
|
|
22595
22595
|
), T = _.omit(o, "required");
|
|
22596
22596
|
R != null && R.target && (u = p(
|
|
22597
|
-
`${R.target}.${((
|
|
22597
|
+
`${R.target}.${((L = (z = o["x-component-props"]) == null ? void 0 : z.fieldNames) == null ? void 0 : L.label) || "id"}`
|
|
22598
22598
|
));
|
|
22599
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(
|
|
22600
22600
|
(q) => {
|
|
22601
|
-
const
|
|
22602
|
-
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;
|
|
22603
22603
|
},
|
|
22604
22604
|
[y, I]
|
|
22605
22605
|
), w = useMemo(() => ({
|
|
@@ -22634,7 +22634,7 @@ const getActionContext = (e) => {
|
|
|
22634
22634
|
localVariables: f,
|
|
22635
22635
|
getAllCollectionsInheritChain: h
|
|
22636
22636
|
}),
|
|
22637
|
-
renderSchemaComponent: function(
|
|
22637
|
+
renderSchemaComponent: function(E) {
|
|
22638
22638
|
const G = useMemo(() => _.cloneDeep(T) || {}, []);
|
|
22639
22639
|
G["x-read-pretty"] = !1, G["x-disabled"] = !1, _.set(G, "x-decorator-props.showTitle", !1);
|
|
22640
22640
|
const U = getFieldDefaultValue(G, R);
|
|
@@ -22656,7 +22656,7 @@ const getActionContext = (e) => {
|
|
|
22656
22656
|
}),
|
|
22657
22657
|
[G, U]
|
|
22658
22658
|
);
|
|
22659
|
-
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 }) });
|
|
22660
22660
|
}
|
|
22661
22661
|
}),
|
|
22662
22662
|
title: a("Default value"),
|
|
@@ -22680,11 +22680,11 @@ const getActionContext = (e) => {
|
|
|
22680
22680
|
]), $ = useCallback(
|
|
22681
22681
|
(q) => {
|
|
22682
22682
|
var G, U, H;
|
|
22683
|
-
const
|
|
22683
|
+
const E = {
|
|
22684
22684
|
"x-uid": o["x-uid"]
|
|
22685
22685
|
};
|
|
22686
|
-
o.default = (G = q.default) != null ? G : null, isVariable$1(q.default) || (U = r.setInitialValue) == null || U.call(r, q.default),
|
|
22687
|
-
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,
|
|
22688
22688
|
currentSchema: n
|
|
22689
22689
|
});
|
|
22690
22690
|
},
|
|
@@ -23472,7 +23472,7 @@ const useGetFilterOptions = () => {
|
|
|
23472
23472
|
};
|
|
23473
23473
|
});
|
|
23474
23474
|
}, TableColumnDesigner$1 = (e) => {
|
|
23475
|
-
var j, N, B, w, M, $, k, z,
|
|
23475
|
+
var j, N, B, w, M, $, k, z, L, q, E, G;
|
|
23476
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(
|
|
23477
23477
|
o == null ? void 0 : o.interface
|
|
23478
23478
|
), I = useFieldModeOptions({ fieldSchema: n }), R = ((M = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : M.mode) || "Select";
|
|
@@ -23515,7 +23515,7 @@ const useGetFilterOptions = () => {
|
|
|
23515
23515
|
SchemaSettingsDataScope,
|
|
23516
23516
|
{
|
|
23517
23517
|
collectionName: o == null ? void 0 : o.target,
|
|
23518
|
-
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) || {},
|
|
23519
23519
|
form: r,
|
|
23520
23520
|
onSubmit: ({ filter: U }) => {
|
|
23521
23521
|
var J, K;
|
|
@@ -23584,7 +23584,7 @@ const useGetFilterOptions = () => {
|
|
|
23584
23584
|
SchemaSettingsSwitchItem,
|
|
23585
23585
|
{
|
|
23586
23586
|
title: c("Enable link"),
|
|
23587
|
-
checked: ((
|
|
23587
|
+
checked: ((E = n["x-component-props"]) == null ? void 0 : E.enableLink) !== !1,
|
|
23588
23588
|
onChange: (U) => {
|
|
23589
23589
|
n["x-component-props"] = P(x({}, n == null ? void 0 : n["x-component-props"]), {
|
|
23590
23590
|
enableLink: U
|
|
@@ -25280,7 +25280,7 @@ const Markdown = connect(
|
|
|
25280
25280
|
Markdown.Void = MarkdownVoid;
|
|
25281
25281
|
const BlockItemCardContext = createContext({}), BlockItemCard = React.forwardRef((o, n) => {
|
|
25282
25282
|
var r = o, { children: e } = r, t = Y(r, ["children"]);
|
|
25283
|
-
const { token: i } = useToken(), g = t, { title: a, description: l } = g, c = Y(g, ["title", "description"]), u = useMemo(() => ({ marginBottom: i.marginBlock, height:
|
|
25283
|
+
const { token: i } = useToken(), g = t, { title: a, description: l } = g, c = Y(g, ["title", "description"]), u = useMemo(() => ({ marginBottom: i.marginBlock, height: "100%" }), [i.marginBlock]), [d, p] = useState(0), m = useRef(null);
|
|
25284
25284
|
useEffect(() => {
|
|
25285
25285
|
const f = setTimeout(() => {
|
|
25286
25286
|
if (m.current) {
|
|
@@ -25556,8 +25556,8 @@ function Input$1(e) {
|
|
|
25556
25556
|
[M.value]: "$",
|
|
25557
25557
|
[M.label]: y("Constant")
|
|
25558
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 : {} : {};
|
|
25559
|
-
let
|
|
25560
|
-
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(() => {
|
|
25561
25561
|
const Z = $ != null ? $ : {}, { component: W } = Z, X = Y(Z, ["component"]), ee = [
|
|
25562
25562
|
...a ? [
|
|
25563
25563
|
{
|
|
@@ -25586,7 +25586,7 @@ function Input$1(e) {
|
|
|
25586
25586
|
}
|
|
25587
25587
|
yield X.loadChildren(X, Z, w), I((ne) => [...ne]);
|
|
25588
25588
|
}
|
|
25589
|
-
}),
|
|
25589
|
+
}), E = useCallback(
|
|
25590
25590
|
(W, X) => {
|
|
25591
25591
|
var ee, Z, ne;
|
|
25592
25592
|
if (W[0] === "$") {
|
|
@@ -25707,8 +25707,8 @@ function Input$1(e) {
|
|
|
25707
25707
|
Cascader$1,
|
|
25708
25708
|
{
|
|
25709
25709
|
options: F,
|
|
25710
|
-
value: w != null ? w :
|
|
25711
|
-
onChange:
|
|
25710
|
+
value: w != null ? w : L,
|
|
25711
|
+
onChange: E,
|
|
25712
25712
|
loadData: q,
|
|
25713
25713
|
changeOnSelect: u,
|
|
25714
25714
|
fieldNames: d,
|
|
@@ -25902,23 +25902,23 @@ function TextArea(e) {
|
|
|
25902
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]);
|
|
25903
25903
|
useAntdInputStyle("ant-input");
|
|
25904
25904
|
const { token: O } = theme.useToken(), j = c.join(" "), N = useCallback(
|
|
25905
|
-
(
|
|
25905
|
+
(E) => {
|
|
25906
25906
|
var U;
|
|
25907
|
-
const G = getValue(
|
|
25907
|
+
const G = getValue(E, c);
|
|
25908
25908
|
(U = e.onChange) == null || U.call(e, d ? G.trim() : G);
|
|
25909
25909
|
},
|
|
25910
25910
|
[j, e.onChange, d]
|
|
25911
25911
|
);
|
|
25912
25912
|
useEffect(() => {
|
|
25913
|
-
preloadOptions(r, m).then((
|
|
25914
|
-
f(
|
|
25913
|
+
preloadOptions(r, m).then((E) => {
|
|
25914
|
+
f(E);
|
|
25915
25915
|
}).catch(console.error);
|
|
25916
25916
|
}, [r, JSON.stringify(m)]), useEffect(() => {
|
|
25917
25917
|
R(renderHTML(p != null ? p : "", b, c)), v || D([-1, 0, -1, 0]);
|
|
25918
25918
|
}, [p, b, j]), useEffect(() => {
|
|
25919
25919
|
var U;
|
|
25920
|
-
const { current:
|
|
25921
|
-
if (!
|
|
25920
|
+
const { current: E } = h;
|
|
25921
|
+
if (!E)
|
|
25922
25922
|
return;
|
|
25923
25923
|
const G = new Range();
|
|
25924
25924
|
if (v) {
|
|
@@ -25927,22 +25927,22 @@ function TextArea(e) {
|
|
|
25927
25927
|
const H = (U = window.getSelection) == null ? void 0 : U.call(window);
|
|
25928
25928
|
if (H)
|
|
25929
25929
|
try {
|
|
25930
|
-
const J = Array.from(
|
|
25930
|
+
const J = Array.from(E.childNodes);
|
|
25931
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);
|
|
25932
25932
|
} catch (J) {
|
|
25933
25933
|
}
|
|
25934
25934
|
} else {
|
|
25935
|
-
const { lastChild: H } =
|
|
25935
|
+
const { lastChild: H } = E;
|
|
25936
25936
|
if (H) {
|
|
25937
25937
|
G.setStartAfter(H), G.setEndAfter(H);
|
|
25938
|
-
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);
|
|
25939
25939
|
D([K, G.startOffset, W, G.endOffset]);
|
|
25940
25940
|
}
|
|
25941
25941
|
}
|
|
25942
25942
|
}, [I]);
|
|
25943
25943
|
const B = useCallback(
|
|
25944
|
-
function(
|
|
25945
|
-
const G =
|
|
25944
|
+
function(E) {
|
|
25945
|
+
const G = E.filter((J) => !!J.trim()), { current: U } = h;
|
|
25946
25946
|
if (!U || !G)
|
|
25947
25947
|
return;
|
|
25948
25948
|
U.focus();
|
|
@@ -25953,25 +25953,25 @@ function TextArea(e) {
|
|
|
25953
25953
|
},
|
|
25954
25954
|
[b, N, T]
|
|
25955
25955
|
), w = useCallback(
|
|
25956
|
-
function({ currentTarget:
|
|
25957
|
-
S || (F(!0), D(getCurrentRange(
|
|
25956
|
+
function({ currentTarget: E }) {
|
|
25957
|
+
S || (F(!0), D(getCurrentRange(E)), N(E));
|
|
25958
25958
|
},
|
|
25959
25959
|
[S, N]
|
|
25960
|
-
), M = useCallback(function({ currentTarget:
|
|
25961
|
-
D(getCurrentRange(
|
|
25962
|
-
}, []), $ = useCallback(function(
|
|
25963
|
-
|
|
25960
|
+
), M = useCallback(function({ currentTarget: E }) {
|
|
25961
|
+
D(getCurrentRange(E));
|
|
25962
|
+
}, []), $ = useCallback(function(E) {
|
|
25963
|
+
E.key === "Enter" && E.preventDefault();
|
|
25964
25964
|
}, []), k = useCallback(function() {
|
|
25965
25965
|
y(!0);
|
|
25966
25966
|
}, []), z = useCallback(
|
|
25967
|
-
({ currentTarget:
|
|
25968
|
-
y(!1), F(!0), D(getCurrentRange(
|
|
25967
|
+
({ currentTarget: E }) => {
|
|
25968
|
+
y(!1), F(!0), D(getCurrentRange(E)), N(E);
|
|
25969
25969
|
},
|
|
25970
25970
|
[N]
|
|
25971
|
-
),
|
|
25972
|
-
function(
|
|
25973
|
-
|
|
25974
|
-
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, {
|
|
25975
25975
|
allowedTags: ["span"],
|
|
25976
25976
|
allowedAttributes: {
|
|
25977
25977
|
span: ["data-variable", "contenteditable"]
|
|
@@ -25988,7 +25988,7 @@ function TextArea(e) {
|
|
|
25988
25988
|
}
|
|
25989
25989
|
}
|
|
25990
25990
|
}).replace(/\n/g, " ");
|
|
25991
|
-
F(!0), pasteHTML(
|
|
25991
|
+
F(!0), pasteHTML(E.currentTarget, U), D(getCurrentRange(E.currentTarget)), N(E.currentTarget);
|
|
25992
25992
|
},
|
|
25993
25993
|
[N]
|
|
25994
25994
|
), q = e.disabled || C.disabled;
|
|
@@ -26042,7 +26042,7 @@ function TextArea(e) {
|
|
|
26042
26042
|
onInput: w,
|
|
26043
26043
|
onBlur: M,
|
|
26044
26044
|
onKeyDown: $,
|
|
26045
|
-
onPaste:
|
|
26045
|
+
onPaste: L,
|
|
26046
26046
|
onCompositionStart: k,
|
|
26047
26047
|
onCompositionEnd: z,
|
|
26048
26048
|
placeholder: e.placeholder,
|
|
@@ -26287,13 +26287,13 @@ const getVariableComponentWithScope = (e) => (t) => {
|
|
|
26287
26287
|
}), [e]);
|
|
26288
26288
|
return { urlSchema: n, paramsSchema: i, openInNewWindowSchema: a, modeSchema: o, htmlSchema: r };
|
|
26289
26289
|
}, LinkMenuItem = () => {
|
|
26290
|
-
const { t: e } = useTranslation(), t = useContext(SchemaOptionsContext), { theme: n } = useGlobalTheme(), { componentCls: o, hashId: r } = useStyles$b(), { urlSchema: i, paramsSchema: a } = useURLAndHTMLSchema(),
|
|
26291
|
-
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(
|
|
26292
26292
|
e("Add link"),
|
|
26293
26293
|
() => {
|
|
26294
|
-
var
|
|
26295
|
-
const
|
|
26296
|
-
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(
|
|
26297
26297
|
SchemaComponent,
|
|
26298
26298
|
{
|
|
26299
26299
|
schema: {
|
|
@@ -26310,7 +26310,8 @@ const getVariableComponentWithScope = (e) => (t) => {
|
|
|
26310
26310
|
"x-decorator": "FormItem"
|
|
26311
26311
|
},
|
|
26312
26312
|
href: i,
|
|
26313
|
-
params: a
|
|
26313
|
+
params: a,
|
|
26314
|
+
openInNewWindow: l
|
|
26314
26315
|
}
|
|
26315
26316
|
}
|
|
26316
26317
|
}
|
|
@@ -26318,20 +26319,21 @@ const getVariableComponentWithScope = (e) => (t) => {
|
|
|
26318
26319
|
},
|
|
26319
26320
|
n
|
|
26320
26321
|
).open({
|
|
26321
|
-
initialValues: {}
|
|
26322
|
-
}), { title:
|
|
26323
|
-
yield
|
|
26322
|
+
initialValues: { openInNewWindow: !0 }
|
|
26323
|
+
}), { title: g, href: f, params: C, icon: b, openInNewWindow: S } = h;
|
|
26324
|
+
yield u({
|
|
26324
26325
|
type: NocoBaseDesktopRouteType.link,
|
|
26325
|
-
title:
|
|
26326
|
-
icon:
|
|
26327
|
-
parentId:
|
|
26326
|
+
title: g,
|
|
26327
|
+
icon: b,
|
|
26328
|
+
parentId: c == null ? void 0 : c.id,
|
|
26328
26329
|
options: {
|
|
26329
|
-
href:
|
|
26330
|
-
params:
|
|
26330
|
+
href: f,
|
|
26331
|
+
params: C,
|
|
26332
|
+
openInNewWindow: S
|
|
26331
26333
|
}
|
|
26332
26334
|
});
|
|
26333
26335
|
}), [t.components, t.scope, e, n]);
|
|
26334
|
-
return /* @__PURE__ */ jsx(SchemaInitializerItem, { title: e("Link"), onClick:
|
|
26336
|
+
return /* @__PURE__ */ jsx(SchemaInitializerItem, { title: e("Link"), onClick: m, className: `${o} ${r}` });
|
|
26335
26337
|
}, useInsertPageSchema = () => {
|
|
26336
26338
|
const e = useAPIClient();
|
|
26337
26339
|
return useCallback(
|
|
@@ -26550,8 +26552,8 @@ const GroupItem$1 = () => {
|
|
|
26550
26552
|
}
|
|
26551
26553
|
);
|
|
26552
26554
|
}, InsertMenuItems$1 = (e) => {
|
|
26553
|
-
const { eventKey: t, title: n, insertPosition: o } = e, { t: r } = useTranslation(), { urlSchema: i, paramsSchema: a } = useURLAndHTMLSchema(),
|
|
26554
|
-
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: [
|
|
26555
26557
|
/* @__PURE__ */ jsx(
|
|
26556
26558
|
SchemaSettingsModalItem,
|
|
26557
26559
|
{
|
|
@@ -26575,19 +26577,19 @@ const GroupItem$1 = () => {
|
|
|
26575
26577
|
}
|
|
26576
26578
|
}
|
|
26577
26579
|
},
|
|
26578
|
-
onSubmit: (
|
|
26579
|
-
var
|
|
26580
|
-
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({
|
|
26581
26583
|
type: NocoBaseDesktopRouteType.group,
|
|
26582
|
-
title:
|
|
26583
|
-
icon:
|
|
26584
|
+
title: h,
|
|
26585
|
+
icon: g,
|
|
26584
26586
|
// 'beforeEnd' 表示的是 Insert inner,此时需要把路由插入到当前路由的内部
|
|
26585
|
-
parentId:
|
|
26586
|
-
schemaUid:
|
|
26587
|
+
parentId: b || void 0,
|
|
26588
|
+
schemaUid: C
|
|
26587
26589
|
});
|
|
26588
|
-
insertPositionToMethod$1[o] && (yield
|
|
26589
|
-
sourceId: (
|
|
26590
|
-
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,
|
|
26591
26593
|
sortField: "sort",
|
|
26592
26594
|
method: insertPositionToMethod$1[o]
|
|
26593
26595
|
}));
|
|
@@ -26617,32 +26619,32 @@ const GroupItem$1 = () => {
|
|
|
26617
26619
|
}
|
|
26618
26620
|
}
|
|
26619
26621
|
},
|
|
26620
|
-
onSubmit: (
|
|
26621
|
-
var
|
|
26622
|
-
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({
|
|
26623
26625
|
type: NocoBaseDesktopRouteType.page,
|
|
26624
|
-
title:
|
|
26625
|
-
icon:
|
|
26626
|
+
title: h,
|
|
26627
|
+
icon: g,
|
|
26626
26628
|
// 'beforeEnd' 表示的是 Insert inner,此时需要把路由插入到当前路由的内部
|
|
26627
|
-
parentId:
|
|
26628
|
-
schemaUid:
|
|
26629
|
-
menuSchemaUid:
|
|
26629
|
+
parentId: v || void 0,
|
|
26630
|
+
schemaUid: b,
|
|
26631
|
+
menuSchemaUid: C,
|
|
26630
26632
|
enableTabs: !1,
|
|
26631
26633
|
children: [
|
|
26632
26634
|
{
|
|
26633
26635
|
type: NocoBaseDesktopRouteType.tabs,
|
|
26634
|
-
schemaUid:
|
|
26635
|
-
tabSchemaName:
|
|
26636
|
+
schemaUid: S,
|
|
26637
|
+
tabSchemaName: y,
|
|
26636
26638
|
hidden: !0
|
|
26637
26639
|
}
|
|
26638
26640
|
]
|
|
26639
26641
|
});
|
|
26640
|
-
insertPositionToMethod$1[o] && (yield
|
|
26641
|
-
sourceId: (
|
|
26642
|
-
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,
|
|
26643
26645
|
sortField: "sort",
|
|
26644
26646
|
method: insertPositionToMethod$1[o]
|
|
26645
|
-
})),
|
|
26647
|
+
})), m(getPageMenuSchema({ pageSchemaUid: b, tabSchemaUid: S, tabSchemaName: y }));
|
|
26646
26648
|
})
|
|
26647
26649
|
}
|
|
26648
26650
|
),
|
|
@@ -26667,26 +26669,28 @@ const GroupItem$1 = () => {
|
|
|
26667
26669
|
"x-decorator": "FormItem"
|
|
26668
26670
|
},
|
|
26669
26671
|
href: i,
|
|
26670
|
-
params: a
|
|
26672
|
+
params: a,
|
|
26673
|
+
openInNewWindow: l
|
|
26671
26674
|
}
|
|
26672
26675
|
},
|
|
26673
|
-
onSubmit: (
|
|
26674
|
-
var
|
|
26675
|
-
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({
|
|
26676
26679
|
type: NocoBaseDesktopRouteType.link,
|
|
26677
|
-
title:
|
|
26678
|
-
icon:
|
|
26680
|
+
title: h,
|
|
26681
|
+
icon: g,
|
|
26679
26682
|
// 'beforeEnd' 表示的是 Insert inner,此时需要把路由插入到当前路由的内部
|
|
26680
|
-
parentId:
|
|
26681
|
-
schemaUid:
|
|
26683
|
+
parentId: v || void 0,
|
|
26684
|
+
schemaUid: y,
|
|
26682
26685
|
options: {
|
|
26683
|
-
href:
|
|
26684
|
-
params:
|
|
26686
|
+
href: f,
|
|
26687
|
+
params: C,
|
|
26688
|
+
openInNewWindow: b
|
|
26685
26689
|
}
|
|
26686
26690
|
});
|
|
26687
|
-
insertPositionToMethod$1[o] && (yield
|
|
26688
|
-
sourceId: (
|
|
26689
|
-
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,
|
|
26690
26694
|
sortField: "sort",
|
|
26691
26695
|
method: insertPositionToMethod$1[o]
|
|
26692
26696
|
}));
|
|
@@ -26712,18 +26716,19 @@ const GroupItem$1 = () => {
|
|
|
26712
26716
|
"x-decorator": "FormItem"
|
|
26713
26717
|
}
|
|
26714
26718
|
}
|
|
26715
|
-
}), [e]), n = useCurrentRoute(), { urlSchema: o, paramsSchema: r } = useURLAndHTMLSchema(),
|
|
26719
|
+
}), [e]), n = useCurrentRoute(), { urlSchema: o, paramsSchema: r, openInNewWindowSchema: i } = useURLAndHTMLSchema(), a = useMemo(() => ({
|
|
26716
26720
|
title: n.title,
|
|
26717
26721
|
icon: n.icon
|
|
26718
26722
|
}), [n.title, n.icon]);
|
|
26719
|
-
n.type === NocoBaseDesktopRouteType.link && (t.properties.href = o, t.properties.params = r, i.href = n.options.href,
|
|
26720
|
-
const { updateRoute:
|
|
26721
|
-
n.id !== void 0 &&
|
|
26722
|
-
title:
|
|
26723
|
-
icon:
|
|
26724
|
-
options:
|
|
26725
|
-
href:
|
|
26726
|
-
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
|
|
26727
26732
|
} : void 0
|
|
26728
26733
|
});
|
|
26729
26734
|
}, []);
|
|
@@ -26733,8 +26738,8 @@ const GroupItem$1 = () => {
|
|
|
26733
26738
|
title: e("Edit"),
|
|
26734
26739
|
eventKey: "edit",
|
|
26735
26740
|
schema: t,
|
|
26736
|
-
initialValues:
|
|
26737
|
-
onSubmit:
|
|
26741
|
+
initialValues: a,
|
|
26742
|
+
onSubmit: c
|
|
26738
26743
|
}
|
|
26739
26744
|
);
|
|
26740
26745
|
}, HiddenMenuItem = () => {
|
|
@@ -27110,43 +27115,43 @@ const useAllAccessDesktopRoutes = () => useContext(AllAccessDesktopRoutesContext
|
|
|
27110
27115
|
const { inHeader: t } = useContext(headerContext);
|
|
27111
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 });
|
|
27112
27117
|
}, MenuItem = (e) => {
|
|
27113
|
-
var
|
|
27114
|
-
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();
|
|
27115
27120
|
useEffect(() => {
|
|
27116
27121
|
o.current && (o.current.parentElement.parentElement.style.order = 999, o.current.parentElement.parentElement.style.paddingLeft = 0, o.current.parentElement.parentElement.style.padding = 0);
|
|
27117
27122
|
}, []);
|
|
27118
|
-
const
|
|
27119
|
-
(
|
|
27120
|
-
var
|
|
27121
|
-
const
|
|
27122
|
-
|
|
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();
|
|
27123
27128
|
try {
|
|
27124
|
-
const
|
|
27125
|
-
window.open(
|
|
27126
|
-
} catch (
|
|
27127
|
-
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");
|
|
27128
27133
|
}
|
|
27129
27134
|
}),
|
|
27130
27135
|
[n, t]
|
|
27131
27136
|
);
|
|
27132
27137
|
if (t._hidden)
|
|
27133
27138
|
return null;
|
|
27134
|
-
const
|
|
27139
|
+
const c = { __route__: t._route };
|
|
27135
27140
|
if (t.key === "x-designer-button")
|
|
27136
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 }) }) }) });
|
|
27137
|
-
if (((
|
|
27138
|
-
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:
|
|
27139
|
-
/* @__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 }) }),
|
|
27140
27145
|
/* @__PURE__ */ jsx(MenuSchemaToolbar, {})
|
|
27141
27146
|
] }) }) });
|
|
27142
|
-
const
|
|
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:
|
|
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: [
|
|
27144
27149
|
/* @__PURE__ */ jsx(
|
|
27145
27150
|
WithTooltip,
|
|
27146
27151
|
{
|
|
27147
27152
|
title: t.name,
|
|
27148
27153
|
hidden: t._route.type === NocoBaseDesktopRouteType.group || t._depth > 0,
|
|
27149
|
-
children: /* @__PURE__ */ jsx(Link$1, { to:
|
|
27154
|
+
children: /* @__PURE__ */ jsx(Link$1, { to: u, "aria-label": t.name, children: e.children })
|
|
27150
27155
|
}
|
|
27151
27156
|
),
|
|
27152
27157
|
/* @__PURE__ */ jsx(MenuSchemaToolbar, {})
|
|
@@ -27568,14 +27573,14 @@ const useCreateActionProps = () => {
|
|
|
27568
27573
|
return {
|
|
27569
27574
|
onClick() {
|
|
27570
27575
|
return V(this, null, function* () {
|
|
27571
|
-
var z,
|
|
27576
|
+
var z, L, q, E, G, U;
|
|
27572
27577
|
const R = u.map((H) => H.name), {
|
|
27573
27578
|
assignedValues: T = {},
|
|
27574
27579
|
onSuccess: D,
|
|
27575
27580
|
overwriteValues: O,
|
|
27576
27581
|
skipValidator: j,
|
|
27577
27582
|
triggerWorkflows: N
|
|
27578
|
-
} = (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* () {
|
|
27579
27584
|
const J = T[H], K = d(H);
|
|
27580
27585
|
if (isVariable$1(J)) {
|
|
27581
27586
|
const { value: W } = (yield C == null ? void 0 : C.parseVariable(J, b)) || {};
|
|
@@ -27595,7 +27600,7 @@ const useCreateActionProps = () => {
|
|
|
27595
27600
|
});
|
|
27596
27601
|
if (B) {
|
|
27597
27602
|
const H = p();
|
|
27598
|
-
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;
|
|
27599
27604
|
}
|
|
27600
27605
|
c.data = t.data || {}, c.data.loading = !0;
|
|
27601
27606
|
try {
|
|
@@ -27758,12 +27763,12 @@ const useCreateActionProps = () => {
|
|
|
27758
27763
|
} = (z = i == null ? void 0 : i["x-action-settings"]) != null ? z : {}, { manualClose: j, redirecting: N, redirectTo: B, successMessage: w, actionAfterSuccess: M } = D || {};
|
|
27759
27764
|
m.data = e.data || {}, m.data.loading = !0;
|
|
27760
27765
|
const $ = {}, k = Object.keys(T).map((q) => V(this, null, function* () {
|
|
27761
|
-
const
|
|
27762
|
-
if (isVariable$1(
|
|
27763
|
-
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)) || {};
|
|
27764
27769
|
U && ($[q] = transformVariableValue(U, { targetCollectionField: G }));
|
|
27765
27770
|
} else
|
|
27766
|
-
|
|
27771
|
+
E !== "" && ($[q] = E);
|
|
27767
27772
|
}));
|
|
27768
27773
|
yield Promise.all(k), (M === "previous" || !M && N !== !0) && (S == null || S(!1)), h.confirm({
|
|
27769
27774
|
title: p("Bulk update"),
|
|
@@ -27771,7 +27776,7 @@ const useCreateActionProps = () => {
|
|
|
27771
27776
|
onOk() {
|
|
27772
27777
|
return V(this, null, function* () {
|
|
27773
27778
|
var G, U, H, J;
|
|
27774
|
-
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 = {
|
|
27775
27780
|
values: x({}, $),
|
|
27776
27781
|
filter: q,
|
|
27777
27782
|
forceUpdate: !1
|
|
@@ -27781,11 +27786,11 @@ const useCreateActionProps = () => {
|
|
|
27781
27786
|
message.error(p("Please select the records to be updated")), m.data.loading = !1;
|
|
27782
27787
|
return;
|
|
27783
27788
|
}
|
|
27784
|
-
|
|
27789
|
+
E.filter = { $and: [{ [l || "id"]: { $in: c } }] };
|
|
27785
27790
|
}
|
|
27786
|
-
|
|
27791
|
+
E.filter || (E.forceUpdate = !0);
|
|
27787
27792
|
try {
|
|
27788
|
-
yield t.update(
|
|
27793
|
+
yield t.update(E);
|
|
27789
27794
|
} catch (K) {
|
|
27790
27795
|
} finally {
|
|
27791
27796
|
m.data.loading = !1;
|
|
@@ -27813,7 +27818,7 @@ const useCreateActionProps = () => {
|
|
|
27813
27818
|
return {
|
|
27814
27819
|
onClick() {
|
|
27815
27820
|
return V(this, null, function* () {
|
|
27816
|
-
var q,
|
|
27821
|
+
var q, E, G, U;
|
|
27817
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"];
|
|
27818
27823
|
if (!T.url)
|
|
27819
27824
|
return;
|
|
@@ -27831,7 +27836,7 @@ const useCreateActionProps = () => {
|
|
|
27831
27836
|
});
|
|
27832
27837
|
Object.assign(k, J);
|
|
27833
27838
|
}
|
|
27834
|
-
const
|
|
27839
|
+
const L = {
|
|
27835
27840
|
url: renderTemplate(T.url, { currentRecord: m, currentUser: g }),
|
|
27836
27841
|
method: T.method,
|
|
27837
27842
|
headers: parse(M)({ currentRecord: m, currentUser: g }),
|
|
@@ -27840,7 +27845,7 @@ const useCreateActionProps = () => {
|
|
|
27840
27845
|
};
|
|
27841
27846
|
f.data = c.data || {}, f.data.loading = !0;
|
|
27842
27847
|
try {
|
|
27843
|
-
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({
|
|
27844
27849
|
title: r(N),
|
|
27845
27850
|
onOk: () => V(this, null, function* () {
|
|
27846
27851
|
(O && !B || B === "redirect") && j && (isURL(j) ? window.location.href = j : t(j));
|
|
@@ -27857,14 +27862,14 @@ const useCreateActionProps = () => {
|
|
|
27857
27862
|
return {
|
|
27858
27863
|
onClick(F, I) {
|
|
27859
27864
|
return V(this, null, function* () {
|
|
27860
|
-
var
|
|
27865
|
+
var E;
|
|
27861
27866
|
const {
|
|
27862
27867
|
assignedValues: R = {},
|
|
27863
27868
|
onSuccess: T,
|
|
27864
27869
|
overwriteValues: D,
|
|
27865
27870
|
skipValidator: O,
|
|
27866
27871
|
triggerWorkflows: j
|
|
27867
|
-
} = (
|
|
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* () {
|
|
27868
27873
|
const U = R[G], H = d(G);
|
|
27869
27874
|
if (isVariable$1(U)) {
|
|
27870
27875
|
const { value: J } = (yield b == null ? void 0 : b.parseVariable(U, S)) || {};
|
|
@@ -27873,11 +27878,11 @@ const useCreateActionProps = () => {
|
|
|
27873
27878
|
U !== "" && (k[G] = U);
|
|
27874
27879
|
}));
|
|
27875
27880
|
yield Promise.all(z), O || (yield e.submit());
|
|
27876
|
-
const
|
|
27881
|
+
const L = u.map((G) => G.name), q = getFormValues({
|
|
27877
27882
|
filterByTk: t,
|
|
27878
27883
|
field: n,
|
|
27879
27884
|
form: e,
|
|
27880
|
-
fieldNames:
|
|
27885
|
+
fieldNames: L,
|
|
27881
27886
|
getField: d,
|
|
27882
27887
|
resource: o,
|
|
27883
27888
|
actionFields: (y == null ? void 0 : y("form")) || []
|
|
@@ -28126,25 +28131,25 @@ const useCreateActionProps = () => {
|
|
|
28126
28131
|
var U, H, J, K;
|
|
28127
28132
|
if (!M.find((W) => W.uid === k.uid))
|
|
28128
28133
|
return;
|
|
28129
|
-
const
|
|
28134
|
+
const L = `${$}${t.name}`, q = ((U = k.service.params) == null ? void 0 : U[0]) || {};
|
|
28130
28135
|
(J = (H = k.service.params) == null ? void 0 : H[1]) != null && J.filters || _.set(k.service.params, "[1].filters", {});
|
|
28131
|
-
const
|
|
28136
|
+
const E = k.service.params[1].filters;
|
|
28132
28137
|
if (w.length)
|
|
28133
|
-
L
|
|
28138
|
+
E[L] = {
|
|
28134
28139
|
[S]: w
|
|
28135
28140
|
};
|
|
28136
28141
|
else {
|
|
28137
28142
|
if ((K = k.clearSelection) == null || K.call(k), k.dataLoadingMode === "manual")
|
|
28138
28143
|
return k.clearData();
|
|
28139
|
-
delete L
|
|
28144
|
+
delete E[L];
|
|
28140
28145
|
}
|
|
28141
|
-
const G = mergeFilter([...Object.values(
|
|
28146
|
+
const G = mergeFilter([...Object.values(E), k.defaultFilter]);
|
|
28142
28147
|
return k.doFilter(
|
|
28143
28148
|
P(x({}, q), {
|
|
28144
28149
|
page: 1,
|
|
28145
28150
|
filter: G
|
|
28146
28151
|
}),
|
|
28147
|
-
{ filters:
|
|
28152
|
+
{ filters: E }
|
|
28148
28153
|
);
|
|
28149
28154
|
});
|
|
28150
28155
|
},
|
|
@@ -28166,7 +28171,7 @@ const useCreateActionProps = () => {
|
|
|
28166
28171
|
p = $;
|
|
28167
28172
|
return;
|
|
28168
28173
|
}
|
|
28169
|
-
p = $.filter((
|
|
28174
|
+
p = $.filter((L) => L.label.includes(z));
|
|
28170
28175
|
};
|
|
28171
28176
|
} else
|
|
28172
28177
|
S = `${r}.${C}.$in`, p = (f == null ? void 0 : f.data) || [], m = (w) => {
|
|
@@ -35285,10 +35290,10 @@ const tableBlockSettings = new SchemaSettings({
|
|
|
35285
35290
|
name: "fieldSettings:component:CascadeSelect",
|
|
35286
35291
|
items: [fieldComponent$6, titleField$1, ellipsisSettingsItem, setTheDataScope]
|
|
35287
35292
|
}), SchemaSettingsDateRange = function e(t) {
|
|
35288
|
-
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;
|
|
35289
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";
|
|
35290
35295
|
n["x-read-pretty"] || o.readOnly || o.readPretty;
|
|
35291
|
-
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(
|
|
35292
35297
|
(U) => /* @__PURE__ */ jsx(
|
|
35293
35298
|
SchemaComponent,
|
|
35294
35299
|
{
|
|
@@ -36749,11 +36754,11 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
36749
36754
|
dataSource: T,
|
|
36750
36755
|
collectionName: N
|
|
36751
36756
|
};
|
|
36752
|
-
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();
|
|
36753
36758
|
if (Array.isArray(I)) {
|
|
36754
36759
|
const G = I.map((U) => {
|
|
36755
|
-
if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[k]) && (U == null ? void 0 : U[
|
|
36756
|
-
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)}`;
|
|
36757
36762
|
if (hasRequested(H))
|
|
36758
36763
|
return getRequested(H);
|
|
36759
36764
|
const J = o.request({
|
|
@@ -36768,8 +36773,8 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
36768
36773
|
return U == null ? void 0 : U[k];
|
|
36769
36774
|
});
|
|
36770
36775
|
I = removeThroughCollectionFields(_.flatten(yield Promise.all(G)), q);
|
|
36771
|
-
} else if (!(S != null && S.doNotRequest) && shouldToRequest(I[k]) && I[
|
|
36772
|
-
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)}`;
|
|
36773
36778
|
let U = null;
|
|
36774
36779
|
if (hasRequested(G))
|
|
36775
36780
|
U = yield getRequested(G);
|
|
@@ -37240,7 +37245,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37240
37245
|
"onMouseEnter",
|
|
37241
37246
|
"refreshDataBlockRequest",
|
|
37242
37247
|
"confirmTitle"
|
|
37243
|
-
]), 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();
|
|
37244
37249
|
useEffect(() => {
|
|
37245
37250
|
F.stateOfLinkageRules && setInitialActionState(F), F.stateOfLinkageRules = {}, O.filter((H) => !H.disabled).forEach((H) => {
|
|
37246
37251
|
var J;
|
|
@@ -37258,7 +37263,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37258
37263
|
});
|
|
37259
37264
|
});
|
|
37260
37265
|
}, [F, O, w, B]);
|
|
37261
|
-
const
|
|
37266
|
+
const E = useCallback(
|
|
37262
37267
|
(H) => {
|
|
37263
37268
|
C == null || C(H);
|
|
37264
37269
|
},
|
|
@@ -37273,7 +37278,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37273
37278
|
field: F,
|
|
37274
37279
|
icon: a,
|
|
37275
37280
|
loading: d,
|
|
37276
|
-
handleMouseEnter:
|
|
37281
|
+
handleMouseEnter: E,
|
|
37277
37282
|
tarComponent: N,
|
|
37278
37283
|
className: i,
|
|
37279
37284
|
type: e.type,
|
|
@@ -37292,7 +37297,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37292
37297
|
setVisibleWithURL: $,
|
|
37293
37298
|
setSubmitted: k,
|
|
37294
37299
|
getAriaLabel: z,
|
|
37295
|
-
parentRecordData:
|
|
37300
|
+
parentRecordData: L,
|
|
37296
37301
|
actionCallback: h
|
|
37297
37302
|
}, y)
|
|
37298
37303
|
);
|
|
@@ -37356,7 +37361,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37356
37361
|
"setSubmitted",
|
|
37357
37362
|
"getAriaLabel",
|
|
37358
37363
|
"parentRecordData"
|
|
37359
|
-
]), [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(() => {
|
|
37360
37365
|
var ce;
|
|
37361
37366
|
return P(x({}, v), {
|
|
37362
37367
|
opacity: r && (((ce = i == null ? void 0 : i.data) == null ? void 0 : ce.hidden) || !W) && 0.1,
|
|
@@ -37372,7 +37377,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37372
37377
|
buttonStyle: re,
|
|
37373
37378
|
handleMouseEnter: c,
|
|
37374
37379
|
tarComponent: u,
|
|
37375
|
-
designerProps:
|
|
37380
|
+
designerProps: E,
|
|
37376
37381
|
componentCls: k,
|
|
37377
37382
|
hashId: z,
|
|
37378
37383
|
className: d,
|
|
@@ -37402,7 +37407,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
37402
37407
|
button: RenderButton(se),
|
|
37403
37408
|
visible: w || T,
|
|
37404
37409
|
setVisible: le,
|
|
37405
|
-
formValueChanged:
|
|
37410
|
+
formValueChanged: L,
|
|
37406
37411
|
setFormValueChanged: q,
|
|
37407
37412
|
openMode: G,
|
|
37408
37413
|
openSize: U,
|
|
@@ -37487,24 +37492,25 @@ const RenderButton = ({
|
|
|
37487
37492
|
confirmTitle: D,
|
|
37488
37493
|
title: O
|
|
37489
37494
|
}) => {
|
|
37490
|
-
const { getDataBlockRequest: j } = useDataBlockRequestGetter(), { t: N } = useTranslation(), { isPopupVisibleControlledByURL: B } = usePopupSettings(), { openPopup: w } = usePopupUtils(), M = useRef(null);
|
|
37491
|
-
|
|
37492
|
-
const
|
|
37493
|
-
(
|
|
37494
|
-
|
|
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)) {
|
|
37495
37501
|
const E = () => {
|
|
37496
|
-
b ? b(
|
|
37497
|
-
var
|
|
37498
|
-
S !== !1 && (T == null || T(!0), (
|
|
37499
|
-
}) : 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());
|
|
37500
37506
|
};
|
|
37501
|
-
(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({
|
|
37502
37508
|
title: N(I.title, { title: D || O || (t == null ? void 0 : t.title) }),
|
|
37503
37509
|
content: N(I.content, { title: D || O || (t == null ? void 0 : t.title) }),
|
|
37504
37510
|
onOk: E
|
|
37505
|
-
}) : E();
|
|
37511
|
+
})) : E();
|
|
37506
37512
|
}
|
|
37507
|
-
},
|
|
37513
|
+
}),
|
|
37508
37514
|
[
|
|
37509
37515
|
n,
|
|
37510
37516
|
I == null ? void 0 : I.content,
|
|
@@ -37538,7 +37544,7 @@ const RenderButton = ({
|
|
|
37538
37544
|
buttonStyle: a,
|
|
37539
37545
|
handleMouseEnter: l,
|
|
37540
37546
|
getAriaLabel: g,
|
|
37541
|
-
handleButtonClick:
|
|
37547
|
+
handleButtonClick: k,
|
|
37542
37548
|
tarComponent: c,
|
|
37543
37549
|
componentCls: d,
|
|
37544
37550
|
hashId: p,
|
|
@@ -38116,7 +38122,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
38116
38122
|
}, n), {
|
|
38117
38123
|
headers: b,
|
|
38118
38124
|
params: P(x({
|
|
38119
|
-
|
|
38125
|
+
pageSize: 200
|
|
38120
38126
|
}, n == null ? void 0 : n.params), {
|
|
38121
38127
|
filter: (J = n == null ? void 0 : n.params) == null ? void 0 : J.filter
|
|
38122
38128
|
})
|
|
@@ -38131,7 +38137,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
38131
38137
|
fieldNames: t
|
|
38132
38138
|
}),
|
|
38133
38139
|
[n, t]
|
|
38134
|
-
),
|
|
38140
|
+
), L = useCallback(() => I.current && d ? /* @__PURE__ */ jsx(
|
|
38135
38141
|
d,
|
|
38136
38142
|
{
|
|
38137
38143
|
search: I.current,
|
|
@@ -38155,7 +38161,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
38155
38161
|
(W = n == null ? void 0 : n.params) == null ? void 0 : W.filter
|
|
38156
38162
|
])
|
|
38157
38163
|
}), I.current = K;
|
|
38158
|
-
}),
|
|
38164
|
+
}), E = useMemo(() => {
|
|
38159
38165
|
var ee;
|
|
38160
38166
|
const K = r || i;
|
|
38161
38167
|
if (!((ee = M == null ? void 0 : M.data) != null && ee.length))
|
|
@@ -38180,14 +38186,14 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
38180
38186
|
defaultValue: i
|
|
38181
38187
|
}, f), {
|
|
38182
38188
|
loading: M ? k : !0,
|
|
38183
|
-
options: h(w(
|
|
38184
|
-
rawOptions:
|
|
38189
|
+
options: h(w(E)),
|
|
38190
|
+
rawOptions: E,
|
|
38185
38191
|
dropdownRender: (K) => {
|
|
38186
|
-
const W =
|
|
38192
|
+
const W = E.some((X) => X[t.label] === I.current);
|
|
38187
38193
|
return /* @__PURE__ */ jsx(Fragment$1, { children: v ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
38188
38194
|
!((M == null ? void 0 : M.data.length) === 0 && (I != null && I.current)) && K,
|
|
38189
38195
|
(M == null ? void 0 : M.data.length) > 0 && (I == null ? void 0 : I.current) && !W && /* @__PURE__ */ jsx(Divider$1, { style: { margin: 0 } }),
|
|
38190
|
-
!W && /* @__PURE__ */ jsx(
|
|
38196
|
+
!W && /* @__PURE__ */ jsx(L, {})
|
|
38191
38197
|
] }) : K });
|
|
38192
38198
|
}
|
|
38193
38199
|
})
|
|
@@ -39290,8 +39296,8 @@ const insertPositionToMethod = {
|
|
|
39290
39296
|
}
|
|
39291
39297
|
}), [h, l]), { moveRoute: I } = useNocoBaseRoutes(), R = useCallback(
|
|
39292
39298
|
(B) => V(void 0, [B], function* ({ target: j, position: N }) {
|
|
39293
|
-
var
|
|
39294
|
-
const [w] = ((
|
|
39299
|
+
var L;
|
|
39300
|
+
const [w] = ((L = j == null ? void 0 : j.split) == null ? void 0 : L.call(j, "||")) || [];
|
|
39295
39301
|
if (!w)
|
|
39296
39302
|
return;
|
|
39297
39303
|
const M = findByUid(c, w), $ = createDesignable({
|
|
@@ -40652,8 +40658,8 @@ const AppendsTreeSelect = (e) => {
|
|
|
40652
40658
|
break;
|
|
40653
40659
|
}
|
|
40654
40660
|
if (!$.isLeaf && $.loadChildren) {
|
|
40655
|
-
const
|
|
40656
|
-
|
|
40661
|
+
const L = $.loadChildren($);
|
|
40662
|
+
L != null && L.length && (B.push(...L), $ = L.find((q) => q.value === M.slice(0, k + 1).join(".")));
|
|
40657
40663
|
}
|
|
40658
40664
|
}
|
|
40659
40665
|
}), h((w) => B.reduce((M, $) => Object.assign(M, { [$.value]: $ }), x({}, w)));
|
|
@@ -40743,9 +40749,9 @@ const InternalAssociationSelect$1 = observer$1(
|
|
|
40743
40749
|
const j = uid();
|
|
40744
40750
|
return f.addEffects(j, () => {
|
|
40745
40751
|
onFieldInputValueChange("*", (N) => {
|
|
40746
|
-
var $, k, z,
|
|
40752
|
+
var $, k, z, L, q, E;
|
|
40747
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);
|
|
40748
|
-
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));
|
|
40749
40755
|
});
|
|
40750
40756
|
}), () => {
|
|
40751
40757
|
f.removeEffects(j);
|
|
@@ -41839,14 +41845,14 @@ const InternalFileManager = (e) => {
|
|
|
41839
41845
|
let M = p(w[y.label]);
|
|
41840
41846
|
if (($ = v == null ? void 0 : v.uiSchema) != null && $.enum)
|
|
41841
41847
|
if (Array.isArray(M))
|
|
41842
|
-
M = M.map((
|
|
41848
|
+
M = M.map((L, q) => {
|
|
41843
41849
|
var G, U;
|
|
41844
|
-
const
|
|
41845
|
-
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);
|
|
41846
41852
|
}).reverse();
|
|
41847
41853
|
else {
|
|
41848
|
-
const
|
|
41849
|
-
|
|
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 }));
|
|
41850
41856
|
}
|
|
41851
41857
|
return (v == null ? void 0 : v.type) === "date" && (M = dayjs(M).format("YYYY-MM-DD")), n ? n({
|
|
41852
41858
|
[y.label]: M || EMPTY,
|
|
@@ -41882,10 +41888,10 @@ const InternalFileManager = (e) => {
|
|
|
41882
41888
|
var $, k, z;
|
|
41883
41889
|
if (B) {
|
|
41884
41890
|
d(!0);
|
|
41885
|
-
const
|
|
41886
|
-
if (d(!1), c(
|
|
41887
|
-
const q = yield T({ parentId: (k = w == null ? void 0 : w.value) == null ? void 0 : k.id }),
|
|
41888
|
-
|
|
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);
|
|
41889
41895
|
}
|
|
41890
41896
|
}
|
|
41891
41897
|
}), j = (B, w) => V(void 0, null, function* () {
|
|
@@ -41919,7 +41925,7 @@ const InternalFileManager = (e) => {
|
|
|
41919
41925
|
onSearch: (z) => j(z, B),
|
|
41920
41926
|
fieldNames: y,
|
|
41921
41927
|
style: { minWidth: 150 },
|
|
41922
|
-
onChange: (z,
|
|
41928
|
+
onChange: (z, L) => D(z, L, w),
|
|
41923
41929
|
options: u ? [] : R(l),
|
|
41924
41930
|
onDropdownVisibleChange: (z) => O(z, B, w),
|
|
41925
41931
|
notFoundContent: u ? /* @__PURE__ */ jsx(Spin, { size: "small" }) : null
|
|
@@ -42187,10 +42193,10 @@ const InternalNesterCardCss = css`
|
|
|
42187
42193
|
const w = (f == null ? void 0 : f.targetKey) || "id", M = R.map((k) => k[w]).filter(Boolean);
|
|
42188
42194
|
return M.length ? { $and: [{ [`${w}.$ne`]: M }] } : {};
|
|
42189
42195
|
}, j = () => {
|
|
42190
|
-
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);
|
|
42191
42197
|
return {
|
|
42192
42198
|
onClick() {
|
|
42193
|
-
k(M ? unionBy($, z, (
|
|
42199
|
+
k(M ? unionBy($, z, (L == null ? void 0 : L.targetKey) || "id") : ($ == null ? void 0 : $[0]) || null), w(!1);
|
|
42194
42200
|
},
|
|
42195
42201
|
style: {
|
|
42196
42202
|
display: M === !1 ? "none" : "block"
|
|
@@ -43583,14 +43589,14 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43583
43589
|
"loading",
|
|
43584
43590
|
"onClickRow"
|
|
43585
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 || (() => {
|
|
43586
|
-
})), 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`
|
|
43587
43593
|
& > td {
|
|
43588
43594
|
background-color: ${t.controlItemBgActive} !important;
|
|
43589
43595
|
}
|
|
43590
43596
|
&:hover > td {
|
|
43591
43597
|
background-color: ${t.controlItemBgActiveHover} !important;
|
|
43592
43598
|
}
|
|
43593
|
-
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), G = useMemo(() => C ?
|
|
43599
|
+
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), G = useMemo(() => C ? E : "", [E, C]), U = useMemo(() => C ? (Q, te) => ({
|
|
43594
43600
|
onClick: (oe) => {
|
|
43595
43601
|
isPortalInBody(oe.target) || C(Q, z, k);
|
|
43596
43602
|
},
|
|
@@ -43664,14 +43670,14 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43664
43670
|
role: "button",
|
|
43665
43671
|
"aria-label": `table-index-${oe}`,
|
|
43666
43672
|
className: cls(Q ? "checked" : null, rowSelectCheckboxWrapperClass, {
|
|
43667
|
-
[rowSelectCheckboxWrapperClassHover]:
|
|
43673
|
+
[rowSelectCheckboxWrapperClassHover]: L
|
|
43668
43674
|
}),
|
|
43669
43675
|
children: [
|
|
43670
43676
|
/* @__PURE__ */ jsxs("div", { className: cls(Q ? "checked" : null, rowSelectCheckboxContentClass), children: [
|
|
43671
43677
|
l && /* @__PURE__ */ jsx(SortHandle$1, { id: J(te) }),
|
|
43672
43678
|
c && /* @__PURE__ */ jsx(TableIndex$2, { index: oe })
|
|
43673
43679
|
] }),
|
|
43674
|
-
|
|
43680
|
+
L && /* @__PURE__ */ jsx(
|
|
43675
43681
|
"div",
|
|
43676
43682
|
{
|
|
43677
43683
|
className: cls(
|
|
@@ -43696,7 +43702,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43696
43702
|
l,
|
|
43697
43703
|
S,
|
|
43698
43704
|
J,
|
|
43699
|
-
|
|
43705
|
+
L,
|
|
43700
43706
|
ee,
|
|
43701
43707
|
j
|
|
43702
43708
|
]
|
|
@@ -43810,20 +43816,20 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43810
43816
|
var M, $, k;
|
|
43811
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;
|
|
43812
43818
|
useSubTableSpecialCase({ rootField: n, rootSchema: r });
|
|
43813
|
-
const y = (z,
|
|
43814
|
-
if (
|
|
43819
|
+
const y = (z, L) => {
|
|
43820
|
+
if (L !== void 0 && isArr(n.value) && z !== L)
|
|
43815
43821
|
return action(() => {
|
|
43816
43822
|
const q = n.value[z];
|
|
43817
|
-
return n.value.splice(z, 1), n.value.splice(
|
|
43823
|
+
return n.value.splice(z, 1), n.value.splice(L, 0, q), exchangeArrayState(n, {
|
|
43818
43824
|
fromIndex: z,
|
|
43819
|
-
toIndex:
|
|
43825
|
+
toIndex: L
|
|
43820
43826
|
}), n.onInput(n.value);
|
|
43821
43827
|
});
|
|
43822
43828
|
};
|
|
43823
43829
|
n.move = y;
|
|
43824
|
-
const v = useMemo(() => n.value && Object.keys(n.value).length > 0 ? (Array.isArray(n.value) ? n.value : n.value ? [n.value] : []).filter(Boolean).map((
|
|
43825
|
-
const q =
|
|
43826
|
-
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), {
|
|
43827
43833
|
[d.label]: getLabelFormatValue$1(m(h), m(q))
|
|
43828
43834
|
});
|
|
43829
43835
|
}) : [], [n.value, d == null ? void 0 : d.label]), F = {
|
|
@@ -43839,32 +43845,32 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43839
43845
|
setSelectedRows: u,
|
|
43840
43846
|
collectionField: o
|
|
43841
43847
|
}, I = () => {
|
|
43842
|
-
const { setVisible: z } = useActionContext(), { selectedRows:
|
|
43848
|
+
const { setVisible: z } = useActionContext(), { selectedRows: L, setSelectedRows: q } = useContext(RecordPickerContext);
|
|
43843
43849
|
return {
|
|
43844
43850
|
onClick() {
|
|
43845
43851
|
var G;
|
|
43846
|
-
Array.isArray(n.value) || (n.value = []),
|
|
43847
|
-
const
|
|
43848
|
-
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);
|
|
43849
43855
|
}
|
|
43850
43856
|
};
|
|
43851
43857
|
}, R = () => {
|
|
43852
|
-
const z = (o == null ? void 0 : o.targetKey) || "id",
|
|
43853
|
-
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 }] } : {};
|
|
43854
43860
|
}, [T, D] = useState(1), [O, j] = useState(((M = n.componentProps) == null ? void 0 : M.pageSize) || 10);
|
|
43855
43861
|
useEffect(() => {
|
|
43856
43862
|
var z;
|
|
43857
43863
|
j((z = n.componentProps) == null ? void 0 : z.pageSize);
|
|
43858
43864
|
}, [($ = n.componentProps) == null ? void 0 : $.pageSize]);
|
|
43859
43865
|
const N = useMemo(() => {
|
|
43860
|
-
var
|
|
43861
|
-
const z = Math.ceil(((
|
|
43866
|
+
var L;
|
|
43867
|
+
const z = Math.ceil(((L = n.value) == null ? void 0 : L.length) / 10);
|
|
43862
43868
|
return {
|
|
43863
43869
|
current: T > z ? z : T,
|
|
43864
43870
|
pageSize: O || 10,
|
|
43865
43871
|
total: n == null ? void 0 : n.value,
|
|
43866
|
-
onChange: (q,
|
|
43867
|
-
D(q), j(
|
|
43872
|
+
onChange: (q, E) => {
|
|
43873
|
+
D(q), j(E), n.componentProps.pageSize = E, n.onInput(n.value);
|
|
43868
43874
|
},
|
|
43869
43875
|
showSizeChanger: !0,
|
|
43870
43876
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
@@ -43876,8 +43882,8 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
43876
43882
|
run() {
|
|
43877
43883
|
var q;
|
|
43878
43884
|
z.value = z.value || [], z.value.push(markRecordAsNew({}));
|
|
43879
|
-
const
|
|
43880
|
-
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);
|
|
43881
43887
|
}
|
|
43882
43888
|
};
|
|
43883
43889
|
}, w = () => ({
|
|
@@ -44060,10 +44066,10 @@ const ReadPretty$7 = observer$1(
|
|
|
44060
44066
|
InternalAssociationSelect.displayName = "InternalAssociationSelect";
|
|
44061
44067
|
const AssociationSelect = InternalAssociationSelect;
|
|
44062
44068
|
AssociationSelect.Designer = function e() {
|
|
44063
|
-
var M, $, k, z,
|
|
44069
|
+
var M, $, k, z, L, q, E, G, U, H, J;
|
|
44064
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) : [];
|
|
44065
44071
|
c.title === R || c.title;
|
|
44066
|
-
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) || [];
|
|
44067
44073
|
useEffect(() => {
|
|
44068
44074
|
c.readPretty !== u["x-read-pretty"] && (c.readPretty = !!u["x-read-pretty"]);
|
|
44069
44075
|
}, [u["x-read-pretty"]]);
|
|
@@ -44290,7 +44296,7 @@ AssociationSelect.Designer = function e() {
|
|
|
44290
44296
|
SchemaSettingsDataScope,
|
|
44291
44297
|
{
|
|
44292
44298
|
collectionName: S == null ? void 0 : S.target,
|
|
44293
|
-
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) || {},
|
|
44294
44300
|
form: l,
|
|
44295
44301
|
onSubmit: ({ filter: K }) => {
|
|
44296
44302
|
K = removeNullCondition(K), _.set(c.componentProps, "service.params.filter", K), u["x-component-props"] = c.componentProps, m.emit("patch", {
|
|
@@ -44568,16 +44574,16 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
44568
44574
|
onSubmit: ($) => {
|
|
44569
44575
|
var q;
|
|
44570
44576
|
const k = [];
|
|
44571
|
-
for (const
|
|
44572
|
-
k.push(_.pickBy(
|
|
44577
|
+
for (const E of $.rules)
|
|
44578
|
+
k.push(_.pickBy(E, _.identity));
|
|
44573
44579
|
const z = {
|
|
44574
44580
|
"x-uid": l["x-uid"]
|
|
44575
44581
|
};
|
|
44576
44582
|
if (["percent"].includes(m == null ? void 0 : m.interface))
|
|
44577
|
-
for (const
|
|
44578
|
-
(
|
|
44579
|
-
const
|
|
44580
|
-
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", {
|
|
44581
44587
|
schema: z
|
|
44582
44588
|
}), d();
|
|
44583
44589
|
}
|
|
@@ -44718,10 +44724,10 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
44718
44724
|
options: v,
|
|
44719
44725
|
value: (M = (w = a == null ? void 0 : a.componentProps) == null ? void 0 : w.fieldNames) == null ? void 0 : M.label,
|
|
44720
44726
|
onChange: ($) => {
|
|
44721
|
-
var
|
|
44727
|
+
var L, q;
|
|
44722
44728
|
const k = {
|
|
44723
44729
|
"x-uid": l["x-uid"]
|
|
44724
|
-
}, 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), {
|
|
44725
44731
|
label: $
|
|
44726
44732
|
});
|
|
44727
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", {
|
|
@@ -48257,17 +48263,17 @@ const TableActionColumnDesigner = (e) => {
|
|
|
48257
48263
|
);
|
|
48258
48264
|
}, TableBlockDesigner = () => {
|
|
48259
48265
|
var T, D, O, j, N, B, w, M, $, k, z;
|
|
48260
|
-
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((
|
|
48261
|
-
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),
|
|
48262
48268
|
direction: "desc"
|
|
48263
48269
|
} : {
|
|
48264
|
-
field:
|
|
48270
|
+
field: L,
|
|
48265
48271
|
direction: "asc"
|
|
48266
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(
|
|
48267
|
-
({ filter:
|
|
48268
|
-
|
|
48273
|
+
({ filter: L }) => {
|
|
48274
|
+
L = removeNullCondition(L);
|
|
48269
48275
|
const q = r.decoratorProps.params || {};
|
|
48270
|
-
q.filter =
|
|
48276
|
+
q.filter = L, r.decoratorProps.params = q, i["x-decorator-props"].params = q, d.emit("patch", {
|
|
48271
48277
|
schema: {
|
|
48272
48278
|
"x-uid": i["x-uid"],
|
|
48273
48279
|
"x-decorator-props": i["x-decorator-props"]
|
|
@@ -48285,11 +48291,11 @@ const TableActionColumnDesigner = (e) => {
|
|
|
48285
48291
|
title: u("Tree table"),
|
|
48286
48292
|
defaultChecked: !0,
|
|
48287
48293
|
checked: F ? r.decoratorProps.treeTable : !1,
|
|
48288
|
-
onChange: (
|
|
48289
|
-
var
|
|
48290
|
-
r.decoratorProps.treeTable =
|
|
48291
|
-
const q = P(x({}, (
|
|
48292
|
-
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
|
|
48293
48299
|
});
|
|
48294
48300
|
d.emit("patch", {
|
|
48295
48301
|
schema: i
|
|
@@ -48302,13 +48308,13 @@ const TableActionColumnDesigner = (e) => {
|
|
|
48302
48308
|
{
|
|
48303
48309
|
title: u("Enable drag and drop sorting"),
|
|
48304
48310
|
checked: r.decoratorProps.dragSort,
|
|
48305
|
-
onChange: (
|
|
48306
|
-
|
|
48311
|
+
onChange: (L) => V(void 0, null, function* () {
|
|
48312
|
+
L && v && (yield R.resource("collections.fields", v.collectionName).update({
|
|
48307
48313
|
filterByTk: v.name,
|
|
48308
48314
|
values: {
|
|
48309
48315
|
sortable: !0
|
|
48310
48316
|
}
|
|
48311
|
-
})), r.decoratorProps.dragSort =
|
|
48317
|
+
})), r.decoratorProps.dragSort = L, i["x-decorator-props"].dragSort = L, d.emit("patch", {
|
|
48312
48318
|
schema: {
|
|
48313
48319
|
"x-uid": i["x-uid"],
|
|
48314
48320
|
"x-decorator-props": i["x-decorator-props"]
|
|
@@ -48402,10 +48408,10 @@ const TableActionColumnDesigner = (e) => {
|
|
|
48402
48408
|
}
|
|
48403
48409
|
}
|
|
48404
48410
|
},
|
|
48405
|
-
onSubmit: ({ sort:
|
|
48411
|
+
onSubmit: ({ sort: L }) => {
|
|
48406
48412
|
var G;
|
|
48407
|
-
const q =
|
|
48408
|
-
|
|
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", {
|
|
48409
48415
|
schema: {
|
|
48410
48416
|
"x-uid": i["x-uid"],
|
|
48411
48417
|
"x-decorator-props": i["x-decorator-props"]
|
|
@@ -48428,10 +48434,10 @@ const TableActionColumnDesigner = (e) => {
|
|
|
48428
48434
|
{ label: "100", value: 100 },
|
|
48429
48435
|
{ label: "200", value: 200 }
|
|
48430
48436
|
],
|
|
48431
|
-
onChange: (
|
|
48432
|
-
var
|
|
48437
|
+
onChange: (L) => {
|
|
48438
|
+
var E;
|
|
48433
48439
|
const q = r.decoratorProps.params || {};
|
|
48434
|
-
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", {
|
|
48435
48441
|
schema: {
|
|
48436
48442
|
"x-uid": i["x-uid"],
|
|
48437
48443
|
"x-decorator-props": i["x-decorator-props"]
|
|
@@ -48450,12 +48456,12 @@ const TableActionColumnDesigner = (e) => {
|
|
|
48450
48456
|
{ label: u("Middle"), value: "middle" },
|
|
48451
48457
|
{ label: u("Small"), value: "small" }
|
|
48452
48458
|
],
|
|
48453
|
-
onChange: (
|
|
48454
|
-
const q = i.reduceProperties((
|
|
48459
|
+
onChange: (L) => {
|
|
48460
|
+
const q = i.reduceProperties((E, G) => {
|
|
48455
48461
|
if (G["x-component"] === "TableV2")
|
|
48456
48462
|
return G;
|
|
48457
48463
|
}, null);
|
|
48458
|
-
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", {
|
|
48459
48465
|
schema: {
|
|
48460
48466
|
"x-uid": q["x-uid"],
|
|
48461
48467
|
"x-decorator-props": q["x-component-props"]
|
|
@@ -50348,20 +50354,20 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50348
50354
|
})), []), T = useCallback(() => {
|
|
50349
50355
|
const { availableFieldInterfaces: w } = u(o.template) || {}, { exclude: M, include: $ } = w || {}, k = [];
|
|
50350
50356
|
return F.forEach((z) => {
|
|
50351
|
-
var
|
|
50357
|
+
var L;
|
|
50352
50358
|
if (z.key === "systemInfo")
|
|
50353
50359
|
k.push(P(x({}, z), {
|
|
50354
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)
|
|
50355
50361
|
}));
|
|
50356
50362
|
else {
|
|
50357
50363
|
let q = [];
|
|
50358
|
-
$ != null && $.length ? $.forEach((
|
|
50364
|
+
$ != null && $.length ? $.forEach((E) => {
|
|
50359
50365
|
var U;
|
|
50360
|
-
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));
|
|
50361
50367
|
G && q.push(P(x({}, G), {
|
|
50362
|
-
targetScope:
|
|
50368
|
+
targetScope: E == null ? void 0 : E.targetScope
|
|
50363
50369
|
}));
|
|
50364
|
-
}) : 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), {
|
|
50365
50371
|
children: q
|
|
50366
50372
|
}));
|
|
50367
50373
|
}
|
|
@@ -50653,7 +50659,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
50653
50659
|
run() {
|
|
50654
50660
|
return V(this, null, function* () {
|
|
50655
50661
|
yield B.submit();
|
|
50656
|
-
const
|
|
50662
|
+
const L = cloneDeep(B.values), q = omit(L, [
|
|
50657
50663
|
"key",
|
|
50658
50664
|
"uiSchemaUid",
|
|
50659
50665
|
"collectionName",
|
|
@@ -51161,12 +51167,12 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51161
51167
|
const w = [];
|
|
51162
51168
|
g.forEach((M) => {
|
|
51163
51169
|
var q;
|
|
51164
|
-
const $ = v(M), z = R(M).map((
|
|
51165
|
-
const G = T(
|
|
51170
|
+
const $ = v(M), z = R(M).map((E) => {
|
|
51171
|
+
const G = T(E, M);
|
|
51166
51172
|
return {
|
|
51167
51173
|
type: "group",
|
|
51168
|
-
key:
|
|
51169
|
-
label: l("Parent collection fields") + l(`(${v(
|
|
51174
|
+
key: E,
|
|
51175
|
+
label: l("Parent collection fields") + l(`(${v(E).title})`),
|
|
51170
51176
|
children: G.filter((U) => !["hasOne", "hasMany", "belongsToMany"].includes(U == null ? void 0 : U.type)).map((U) => {
|
|
51171
51177
|
var H;
|
|
51172
51178
|
return {
|
|
@@ -51175,14 +51181,14 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51175
51181
|
};
|
|
51176
51182
|
})
|
|
51177
51183
|
};
|
|
51178
|
-
}),
|
|
51184
|
+
}), L = (q = $.fields.filter((E) => !["obo", "oho", "m2m", "o2m"].includes(E == null ? void 0 : E.interface))) == null ? void 0 : q.map((E) => {
|
|
51179
51185
|
var G;
|
|
51180
|
-
return { value:
|
|
51186
|
+
return { value: E.name, key: E.name, label: l(((G = E.uiSchema) == null ? void 0 : G.title) || E.name) };
|
|
51181
51187
|
}).concat(z);
|
|
51182
51188
|
w.push({
|
|
51183
51189
|
value: M,
|
|
51184
51190
|
label: l($.title || $.name),
|
|
51185
|
-
children:
|
|
51191
|
+
children: L
|
|
51186
51192
|
});
|
|
51187
51193
|
}), h(w);
|
|
51188
51194
|
}, [g, t]), useEffect(() => {
|
|
@@ -51191,30 +51197,30 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51191
51197
|
if (w) {
|
|
51192
51198
|
u(!1), p([]);
|
|
51193
51199
|
const k = ($ = Object.values((M = w == null ? void 0 : w.data) == null ? void 0 : M.fields)) == null ? void 0 : $.map((z) => {
|
|
51194
|
-
var
|
|
51200
|
+
var L, q;
|
|
51195
51201
|
if (z.source) {
|
|
51196
|
-
const
|
|
51202
|
+
const E = (i == null ? void 0 : i.data.find((G) => G.name === z.name)) || z;
|
|
51197
51203
|
return P(x({}, z), {
|
|
51198
|
-
uiSchema: P(x({}, omit(
|
|
51204
|
+
uiSchema: P(x({}, omit(E.uiSchema, "rawTitle")), { title: ((L = E.uiSchema) == null ? void 0 : L.title) || E.name })
|
|
51199
51205
|
});
|
|
51200
51206
|
} else {
|
|
51201
|
-
const
|
|
51202
|
-
return P(x({},
|
|
51203
|
-
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 })
|
|
51204
51210
|
});
|
|
51205
51211
|
}
|
|
51206
51212
|
});
|
|
51207
51213
|
S.value = k, setTimeout(() => {
|
|
51208
|
-
var z,
|
|
51209
|
-
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);
|
|
51210
51216
|
});
|
|
51211
51217
|
}
|
|
51212
51218
|
}).catch);
|
|
51213
51219
|
}, [t]);
|
|
51214
51220
|
const N = (w, M) => {
|
|
51215
51221
|
d.splice(M, 1, w), p(d), S.value = d.map(($) => {
|
|
51216
|
-
var z,
|
|
51217
|
-
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(".");
|
|
51218
51224
|
return P(x({}, $), {
|
|
51219
51225
|
source: k
|
|
51220
51226
|
});
|
|
@@ -51240,8 +51246,8 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51240
51246
|
options: D(m),
|
|
51241
51247
|
onChange: (k, z) => {
|
|
51242
51248
|
var q;
|
|
51243
|
-
const
|
|
51244
|
-
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 }), $);
|
|
51245
51251
|
},
|
|
51246
51252
|
placeholder: l("Select field source")
|
|
51247
51253
|
}
|
|
@@ -51279,12 +51285,12 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51279
51285
|
defaultValue: w,
|
|
51280
51286
|
style: { width: "100%" },
|
|
51281
51287
|
popupMatchSelectWidth: !1,
|
|
51282
|
-
onChange: (
|
|
51283
|
-
var
|
|
51284
|
-
const q = F(
|
|
51285
|
-
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 }), $);
|
|
51286
51292
|
},
|
|
51287
|
-
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))
|
|
51288
51294
|
}
|
|
51289
51295
|
);
|
|
51290
51296
|
}
|
|
@@ -51301,8 +51307,8 @@ const getSchema$4 = (e, t, n) => {
|
|
|
51301
51307
|
Input$3,
|
|
51302
51308
|
{
|
|
51303
51309
|
defaultValue: ((z = k == null ? void 0 : k.uiSchema) == null ? void 0 : z.title) || w,
|
|
51304
|
-
onChange: (
|
|
51305
|
-
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 }) }),
|
|
51306
51312
|
$
|
|
51307
51313
|
)
|
|
51308
51314
|
}
|
|
@@ -51364,7 +51370,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
51364
51370
|
key: F.name,
|
|
51365
51371
|
width: 200,
|
|
51366
51372
|
render: ($, k, z) => {
|
|
51367
|
-
const
|
|
51373
|
+
const L = k[F.name], q = {
|
|
51368
51374
|
type: "object",
|
|
51369
51375
|
properties: {
|
|
51370
51376
|
[F.name]: {
|
|
@@ -51372,7 +51378,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
51372
51378
|
"x-component": D && I ? "CollectionField" : "Input",
|
|
51373
51379
|
"x-read-pretty": !0,
|
|
51374
51380
|
"x-collection-field": I == null ? void 0 : I.join("."),
|
|
51375
|
-
default: F.interface === "json" ? JSON.stringify(
|
|
51381
|
+
default: F.interface === "json" ? JSON.stringify(L) : L
|
|
51376
51382
|
}
|
|
51377
51383
|
}
|
|
51378
51384
|
};
|
|
@@ -51705,7 +51711,7 @@ const AsyncDataProvider = (e) => {
|
|
|
51705
51711
|
style: { width: "100%" },
|
|
51706
51712
|
popupMatchSelectWidth: !1,
|
|
51707
51713
|
onChange: (B) => {
|
|
51708
|
-
var M, $, k, z,
|
|
51714
|
+
var M, $, k, z, L;
|
|
51709
51715
|
const w = p(B);
|
|
51710
51716
|
S(
|
|
51711
51717
|
P(x({}, j), {
|
|
@@ -51713,7 +51719,7 @@ const AsyncDataProvider = (e) => {
|
|
|
51713
51719
|
uiSchema: P(x({}, (M = w == null ? void 0 : w.default) == null ? void 0 : M.uiSchema), {
|
|
51714
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)
|
|
51715
51721
|
}),
|
|
51716
|
-
type: (
|
|
51722
|
+
type: (L = w == null ? void 0 : w.default) == null ? void 0 : L.type
|
|
51717
51723
|
}),
|
|
51718
51724
|
O
|
|
51719
51725
|
);
|
|
@@ -60292,11 +60298,11 @@ const ActionInitializerItem = (e) => {
|
|
|
60292
60298
|
(y || W) && g(P(x({}, h == null ? void 0 : h[0]), {
|
|
60293
60299
|
filter: f
|
|
60294
60300
|
})), v(!y), K.stopPropagation();
|
|
60295
|
-
},
|
|
60301
|
+
}, L = (K) => {
|
|
60296
60302
|
K.stopPropagation();
|
|
60297
60303
|
}, q = (K) => {
|
|
60298
60304
|
m(K);
|
|
60299
|
-
},
|
|
60305
|
+
}, E = (J = a.title) != null ? J : (H = i == null ? void 0 : i.uiSchema) == null ? void 0 : H.title;
|
|
60300
60306
|
return t(
|
|
60301
60307
|
/* @__PURE__ */ jsxs(SortableItem, { className: cls(n, o, "nb-block-item", e.className, "SortableItem"), children: [
|
|
60302
60308
|
/* @__PURE__ */ jsx(l, {}),
|
|
@@ -60313,17 +60319,17 @@ const ActionInitializerItem = (e) => {
|
|
|
60313
60319
|
},
|
|
60314
60320
|
gutter: 5,
|
|
60315
60321
|
children: [
|
|
60316
|
-
/* @__PURE__ */ jsx(Col, { title: c(
|
|
60322
|
+
/* @__PURE__ */ jsx(Col, { title: c(E), className: "headerCol", children: y ? /* @__PURE__ */ jsx(
|
|
60317
60323
|
Input$3,
|
|
60318
60324
|
{
|
|
60319
60325
|
bordered: !1,
|
|
60320
60326
|
autoFocus: !0,
|
|
60321
60327
|
placeholder: "Search...",
|
|
60322
60328
|
className: "search",
|
|
60323
|
-
onClick:
|
|
60329
|
+
onClick: L,
|
|
60324
60330
|
onChange: q
|
|
60325
60331
|
}
|
|
60326
|
-
) : c(
|
|
60332
|
+
) : c(E) }),
|
|
60327
60333
|
/* @__PURE__ */ jsx(
|
|
60328
60334
|
Col,
|
|
60329
60335
|
{
|
|
@@ -60751,14 +60757,14 @@ const DataBlockInitializer = (e) => {
|
|
|
60751
60757
|
alwaysRenderMenu: y
|
|
60752
60758
|
} = e, { insert: v, setVisible: F } = useSchemaInitializer(), I = useCompile(), { getTemplateSchemaByMode: R } = useSchemaTemplateManager(), T = useCallback(
|
|
60753
60759
|
(z) => V(void 0, null, function* () {
|
|
60754
|
-
const { item:
|
|
60760
|
+
const { item: L, fromOthersInPopup: q } = z;
|
|
60755
60761
|
if (f)
|
|
60756
60762
|
return f(z);
|
|
60757
|
-
if (
|
|
60758
|
-
const
|
|
60759
|
-
v(t ? t(
|
|
60763
|
+
if (L.template) {
|
|
60764
|
+
const E = yield R(L);
|
|
60765
|
+
v(t ? t(E, { item: L, fromOthersInPopup: q }) : E);
|
|
60760
60766
|
} else
|
|
60761
|
-
n && n({ item:
|
|
60767
|
+
n && n({ item: L, fromOthersInPopup: q });
|
|
60762
60768
|
F(!1);
|
|
60763
60769
|
}),
|
|
60764
60770
|
[R, v, F, n, f, t]
|
|
@@ -60777,14 +60783,14 @@ const DataBlockInitializer = (e) => {
|
|
|
60777
60783
|
currentText: b,
|
|
60778
60784
|
otherText: S
|
|
60779
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(() => {
|
|
60780
|
-
let z = w.filter((
|
|
60786
|
+
let z = w.filter((L) => L.key !== "search" && L.key !== "empty");
|
|
60781
60787
|
return p && z.length === 1 ? z = z[0].children : z = w, [
|
|
60782
60788
|
{
|
|
60783
60789
|
key: i,
|
|
60784
60790
|
label: I(a),
|
|
60785
60791
|
icon: typeof r == "string" ? /* @__PURE__ */ jsx(antIcons__default, { type: r }) : r,
|
|
60786
|
-
onClick: (
|
|
60787
|
-
|
|
60792
|
+
onClick: (L) => {
|
|
60793
|
+
L.key === i && T(P(x({}, L), { item: e }));
|
|
60788
60794
|
},
|
|
60789
60795
|
children: z
|
|
60790
60796
|
}
|