@nocobase/client 1.9.13 → 1.9.14
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 +718 -686
- package/lib/index.js +60 -60
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ var we = (e, t, n) => t in e ? Ee(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
11
11
|
Ne.call(t, n) && we(e, n, t[n]);
|
|
12
12
|
return e;
|
|
13
13
|
}, P = (e, t) => Oe(e, Ve(t));
|
|
14
|
-
var
|
|
14
|
+
var W = (e, t) => {
|
|
15
15
|
var n = {};
|
|
16
16
|
for (var o in e)
|
|
17
17
|
Be.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
|
|
@@ -4907,7 +4907,7 @@ function toSchema(e) {
|
|
|
4907
4907
|
}
|
|
4908
4908
|
const useMemoizedSchema = (e) => useMemo(() => toSchema(e), []), SchemaComponentOnChangeContext = createContext({ onChange: _.noop }), RecursionSchemaComponent = memo(
|
|
4909
4909
|
(e) => {
|
|
4910
|
-
const h = e, { components: t, scope: n, schema: o, distributed: r, onChange: a, parentSchema: i } = h, l =
|
|
4910
|
+
const h = e, { components: t, scope: n, schema: o, distributed: r, onChange: a, parentSchema: i } = h, l = W(h, ["components", "scope", "schema", "distributed", "onChange", "parentSchema"]), c = useContext(SchemaComponentContext), u = useMemo(() => toSchema(o), [o]), d = useMemo(
|
|
4911
4911
|
() => P(x({}, c), {
|
|
4912
4912
|
distributed: c.distributed == !1 ? !1 : r,
|
|
4913
4913
|
/**
|
|
@@ -4930,14 +4930,14 @@ const useMemoizedSchema = (e) => useMemo(() => toSchema(e), []), SchemaComponent
|
|
|
4930
4930
|
RecursionSchemaComponent.displayName = "RecursionSchemaComponent";
|
|
4931
4931
|
const MemoizedSchemaComponent = memo(
|
|
4932
4932
|
(e) => {
|
|
4933
|
-
const a = e, { schema: t, parentSchema: n } = a, o =
|
|
4933
|
+
const a = e, { schema: t, parentSchema: n } = a, o = W(a, ["schema", "parentSchema"]), r = useMemoizedSchema(t);
|
|
4934
4934
|
return /* @__PURE__ */ jsx(RecursionSchemaComponent, P(x({}, o), { schema: r, parentSchema: n }));
|
|
4935
4935
|
}
|
|
4936
4936
|
);
|
|
4937
4937
|
MemoizedSchemaComponent.displayName = "MemoizedSchemaComponent";
|
|
4938
4938
|
const SchemaComponent = memo(
|
|
4939
4939
|
(e) => {
|
|
4940
|
-
const o = e, { memoized: t } = o, n =
|
|
4940
|
+
const o = e, { memoized: t } = o, n = W(o, ["memoized"]);
|
|
4941
4941
|
return t ? /* @__PURE__ */ jsx(MemoizedSchemaComponent, x({}, n)) : /* @__PURE__ */ jsx(RecursionSchemaComponent, x({}, n));
|
|
4942
4942
|
}
|
|
4943
4943
|
);
|
|
@@ -7899,7 +7899,7 @@ Object.keys(antIcons).forEach((e) => {
|
|
|
7899
7899
|
registerIcon(e, antIcons[e]);
|
|
7900
7900
|
});
|
|
7901
7901
|
const Icon = (e) => {
|
|
7902
|
-
const r = e, { type: t = "", component: n } = r, o =
|
|
7902
|
+
const r = e, { type: t = "", component: n } = r, o = W(r, ["type", "component"]);
|
|
7903
7903
|
if (n)
|
|
7904
7904
|
return /* @__PURE__ */ jsx(antIcons__default, x({ component: n }, o));
|
|
7905
7905
|
if (t && icons.has(t.toLowerCase())) {
|
|
@@ -7971,7 +7971,7 @@ class PluginSettingsManager {
|
|
|
7971
7971
|
const o = this.hasAuth(t), r = this.getSetting(t);
|
|
7972
7972
|
if (n && !o || !r)
|
|
7973
7973
|
return null;
|
|
7974
|
-
const a = Object.keys(r.children || {}).sort((p, m) => p.localeCompare(m)).map((p) => this.get(r.children[p].name, n)).filter(Boolean).sort((p, m) => (p.sort || 0) - (m.sort || 0)), d = r, { title: i, icon: l, aclSnippet: c } = d, u =
|
|
7974
|
+
const a = Object.keys(r.children || {}).sort((p, m) => p.localeCompare(m)).map((p) => this.get(r.children[p].name, n)).filter(Boolean).sort((p, m) => (p.sort || 0) - (m.sort || 0)), d = r, { title: i, icon: l, aclSnippet: c } = d, u = W(d, ["title", "icon", "aclSnippet"]);
|
|
7975
7975
|
return P(x({
|
|
7976
7976
|
isTopLevel: t === r.topLevelName
|
|
7977
7977
|
}, u), {
|
|
@@ -7999,7 +7999,7 @@ const ApplicationContext = createContext(null);
|
|
|
7999
7999
|
ApplicationContext.displayName = "ApplicationContext";
|
|
8000
8000
|
const AppComponent = observer(
|
|
8001
8001
|
(n) => {
|
|
8002
|
-
var o = n, { children: e } = o, t =
|
|
8002
|
+
var o = n, { children: e } = o, t = W(o, ["children"]);
|
|
8003
8003
|
var l;
|
|
8004
8004
|
const { app: r } = t, a = useCallback((c, u) => {
|
|
8005
8005
|
console.error(c);
|
|
@@ -8129,7 +8129,7 @@ class RouterManager {
|
|
|
8129
8129
|
if (Object.keys(a).length === 1 && a.children)
|
|
8130
8130
|
r.push(...n(a.children));
|
|
8131
8131
|
else {
|
|
8132
|
-
const i = a, { Component: l, element: c, children: u } = i, d =
|
|
8132
|
+
const i = a, { Component: l, element: c, children: u } = i, d = W(i, ["Component", "element", "children"]);
|
|
8133
8133
|
let p = c;
|
|
8134
8134
|
l && (typeof l == "string" ? p = this.app.renderComponent(l) : p = React.createElement(l));
|
|
8135
8135
|
const m = P(x({}, d), {
|
|
@@ -8168,7 +8168,7 @@ class RouterManager {
|
|
|
8168
8168
|
* @internal
|
|
8169
8169
|
*/
|
|
8170
8170
|
getRouterComponent(t) {
|
|
8171
|
-
const d = this.options, { type: n = "browser" } = d, o =
|
|
8171
|
+
const d = this.options, { type: n = "browser" } = d, o = W(d, ["type"]), r = {
|
|
8172
8172
|
hash: createHashRouter,
|
|
8173
8173
|
browser: createBrowserRouter,
|
|
8174
8174
|
memory: createMemoryRouter
|
|
@@ -8476,7 +8476,7 @@ function withInitializer(e) {
|
|
|
8476
8476
|
);
|
|
8477
8477
|
}
|
|
8478
8478
|
const SchemaInitializerSubMenuContext = React.createContext({}), SchemaInitializerMenuProvider = (e) => /* @__PURE__ */ jsx(SchemaInitializerSubMenuContext.Provider, { value: { isInMenu: !0 }, children: e.children }), useSchemaInitializerSubMenuContext = () => React.useContext(SchemaInitializerSubMenuContext), SchemaInitializerMenu = (e) => {
|
|
8479
|
-
const { componentCls: t, hashId: n } = useSchemaInitializerStyles(), l = e, { items: o } = l, r =
|
|
8479
|
+
const { componentCls: t, hashId: n } = useSchemaInitializerStyles(), l = e, { items: o } = l, r = W(l, ["items"]), { token: a } = theme.useToken(), i = useMemo(
|
|
8480
8480
|
() => o.map((c) => P(x({}, c), {
|
|
8481
8481
|
popupClassName: `${n} ${t}-menu-sub`
|
|
8482
8482
|
})),
|
|
@@ -8525,7 +8525,7 @@ const SchemaInitializerSubMenuContext = React.createContext({}), SchemaInitializ
|
|
|
8525
8525
|
) });
|
|
8526
8526
|
}, SchemaInitializerSubMenu = (e) => {
|
|
8527
8527
|
var f;
|
|
8528
|
-
const g = e, { children: t, items: n, title: o, name: r, onOpenChange: a, icon: i } = g, l =
|
|
8528
|
+
const g = e, { children: t, items: n, title: o, name: r, onOpenChange: a, icon: i } = g, l = W(g, ["children", "items", "title", "name", "onOpenChange", "icon"]), c = useCompile(), u = useSchemaInitializerItem(), d = useMemo(() => r || (u == null ? void 0 : u.name) || uid(), [r, u]), p = (f = n || t) == null ? void 0 : f.filter((C) => C.useVisible ? C.useVisible() : !0), m = useSchemaInitializerMenuItems(p, r), h = useMemo(() => [
|
|
8529
8529
|
P(x({}, l), {
|
|
8530
8530
|
key: d,
|
|
8531
8531
|
label: c(o),
|
|
@@ -8856,7 +8856,7 @@ function addAppVersion(e, t) {
|
|
|
8856
8856
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
8857
8857
|
}), e;
|
|
8858
8858
|
}
|
|
8859
|
-
const name = "@nocobase/client", version = "1.9.
|
|
8859
|
+
const name = "@nocobase/client", version = "1.9.14", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
8860
8860
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
8861
8861
|
"@ant-design/cssinjs": "^1.11.1",
|
|
8862
8862
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -8877,9 +8877,9 @@ const name = "@nocobase/client", version = "1.9.13", license = "AGPL-3.0", main
|
|
|
8877
8877
|
"@formily/reactive-react": "^2.2.27",
|
|
8878
8878
|
"@formily/shared": "^2.2.27",
|
|
8879
8879
|
"@formily/validator": "^2.2.27",
|
|
8880
|
-
"@nocobase/evaluators": "1.9.
|
|
8881
|
-
"@nocobase/sdk": "1.9.
|
|
8882
|
-
"@nocobase/utils": "1.9.
|
|
8880
|
+
"@nocobase/evaluators": "1.9.14",
|
|
8881
|
+
"@nocobase/sdk": "1.9.14",
|
|
8882
|
+
"@nocobase/utils": "1.9.14",
|
|
8883
8883
|
ahooks: "^3.7.2",
|
|
8884
8884
|
antd: "5.24.2",
|
|
8885
8885
|
"antd-mobile": "^5.41.1",
|
|
@@ -9520,7 +9520,7 @@ const useFieldComponentOptions = () => {
|
|
|
9520
9520
|
e != null && e.title || (e.title = a((l = r == null ? void 0 : r.uiSchema) == null ? void 0 : l.title));
|
|
9521
9521
|
}, [(i = r == null ? void 0 : r.uiSchema) == null ? void 0 : i.title]);
|
|
9522
9522
|
}, useDef$4 = () => ({}), useProps = (e = {}) => {
|
|
9523
|
-
const a = e, { useProps: t = useDef$4 } = a, n =
|
|
9523
|
+
const a = e, { useProps: t = useDef$4 } = a, n = W(a, ["useProps"]);
|
|
9524
9524
|
let o = t;
|
|
9525
9525
|
typeof t != "function" && (o = useDef$4);
|
|
9526
9526
|
const r = o();
|
|
@@ -10161,7 +10161,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10161
10161
|
}, D["x-component-props"]), {
|
|
10162
10162
|
width: R,
|
|
10163
10163
|
schema: D,
|
|
10164
|
-
render: (U, K,
|
|
10164
|
+
render: (U, K, Y) => /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: g, children: /* @__PURE__ */ jsx(
|
|
10165
10165
|
TableCellRender,
|
|
10166
10166
|
{
|
|
10167
10167
|
record: K,
|
|
@@ -10170,7 +10170,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10170
10170
|
filterProperties: f,
|
|
10171
10171
|
schemaToolbarBigger: C,
|
|
10172
10172
|
field: r,
|
|
10173
|
-
index:
|
|
10173
|
+
index: Y
|
|
10174
10174
|
}
|
|
10175
10175
|
) }),
|
|
10176
10176
|
onCell: (U, K) => ({
|
|
@@ -10256,7 +10256,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10256
10256
|
var m, g, f;
|
|
10257
10257
|
const { token: t } = useToken$1(), n = (m = e["data-row-key"]) == null ? void 0 : m.toString(), { setNodeRef: o, active: r, over: a } = useSortable({
|
|
10258
10258
|
id: n
|
|
10259
|
-
}), h = e, { rowIndex: i } = h, l =
|
|
10259
|
+
}), h = e, { rowIndex: i } = h, l = W(h, ["rowIndex"]), c = (a == null ? void 0 : a.id) == n, u = useMemo(() => {
|
|
10260
10260
|
const C = new TinyColor(t.colorSettings).setAlpha(0.6).toHex8String();
|
|
10261
10261
|
return {
|
|
10262
10262
|
topActiveClass: css`
|
|
@@ -10282,12 +10282,12 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10282
10282
|
})
|
|
10283
10283
|
);
|
|
10284
10284
|
}, SortHandle$2 = (e) => {
|
|
10285
|
-
const a = e, { id: t } = a, n =
|
|
10285
|
+
const a = e, { id: t } = a, n = W(a, ["id"]), { listeners: o, setNodeRef: r } = useSortable({
|
|
10286
10286
|
id: t
|
|
10287
10287
|
});
|
|
10288
10288
|
return /* @__PURE__ */ jsx(MenuOutlined, P(x(x({ ref: r }, n), o), { style: { cursor: "grab" } }));
|
|
10289
10289
|
}, TableIndex$3 = (e) => {
|
|
10290
|
-
const o = e, { index: t } = o, n =
|
|
10290
|
+
const o = e, { index: t } = o, n = W(o, ["index"]);
|
|
10291
10291
|
return /* @__PURE__ */ jsx("div", P(x({ className: cls("nb-table-index"), style: { padding: "0 8px 0 16px" } }, n), { children: t }));
|
|
10292
10292
|
}, pageSizeOptions$3 = [5, 10, 20, 50, 100, 200], usePaginationProps$3 = (e, t, n) => {
|
|
10293
10293
|
var S, y, v, I, F, w;
|
|
@@ -10413,7 +10413,7 @@ const BodyRowComponent$1 = React.memo((e) => {
|
|
|
10413
10413
|
});
|
|
10414
10414
|
BodyRowComponent$1.displayName = "BodyRowComponent";
|
|
10415
10415
|
const InternalBodyCellComponent$1 = React.memo((e) => {
|
|
10416
|
-
const p = e, { record: t, schema: n, rowIndex: o, isSubTable: r } = p, a =
|
|
10416
|
+
const p = e, { record: t, schema: n, rowIndex: o, isSubTable: r } = p, a = W(p, ["record", "schema", "rowIndex", "isSubTable"]), i = n == null ? void 0 : n[LinkageRuleDataKeyMap.style], [l, c] = useState({}), u = !!(n != null && n.properties) && Object.values(n.properties).some((m) => m["x-read-pretty"] === !0) || (n == null ? void 0 : n["x-action-column"]) === "actions", d = useMemo(
|
|
10417
10417
|
() => x(x({ overflow: "hidden" }, e.style), l),
|
|
10418
10418
|
[e.style, l]
|
|
10419
10419
|
);
|
|
@@ -10445,7 +10445,7 @@ const TableElementRefContext = createContext(null), useTableElementRef = () => u
|
|
|
10445
10445
|
columns: m,
|
|
10446
10446
|
expandable: h,
|
|
10447
10447
|
field: g
|
|
10448
|
-
} = y, f =
|
|
10448
|
+
} = y, f = W(y, [
|
|
10449
10449
|
"tableHeight",
|
|
10450
10450
|
"SortableWrapper",
|
|
10451
10451
|
"tableSizeRefCallback",
|
|
@@ -10538,8 +10538,8 @@ InternalNocoBaseTable$1.displayName = "InternalNocoBaseTable";
|
|
|
10538
10538
|
const Table$2 = withDynamicSchemaProps(
|
|
10539
10539
|
withSkeletonComponent(
|
|
10540
10540
|
observer$1((e) => {
|
|
10541
|
-
var ye,
|
|
10542
|
-
const { token: t } = useToken$1(),
|
|
10541
|
+
var ye, ae;
|
|
10542
|
+
const { token: t } = useToken$1(), ge = omit(e, ["onBlur", "onFocus"]), { pagination: n, useProps: o } = ge, r = W(ge, ["pagination", "useProps"]), pe = (o == null ? void 0 : o()) || {}, { pagination: a } = pe, i = W(pe, ["pagination"]), be = x(x({}, r), i), {
|
|
10543
10543
|
dragSort: l = !1,
|
|
10544
10544
|
showIndex: c = !0,
|
|
10545
10545
|
onRowSelectionChange: u,
|
|
@@ -10551,7 +10551,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10551
10551
|
loading: f,
|
|
10552
10552
|
onClickRow: C,
|
|
10553
10553
|
value: b
|
|
10554
|
-
} = be, S =
|
|
10554
|
+
} = be, S = W(be, [
|
|
10555
10555
|
"dragSort",
|
|
10556
10556
|
"showIndex",
|
|
10557
10557
|
"onRowSelectionChange",
|
|
@@ -10564,7 +10564,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10564
10564
|
"onClickRow",
|
|
10565
10565
|
"value"
|
|
10566
10566
|
]), y = useArrayField$1(S), v = useFieldSchema(), { size: I = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, F = useCollection(), T = ((ye = v == null ? void 0 : v.parent) == null ? void 0 : ye["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B, enableIndexColumn: N } = T, M = useMemoizedFn(S.onRowDragEnd || (() => {
|
|
10567
|
-
})), j = usePaginationProps$3(n, a, e), R = useTableColumns$3(S, j), [O, $] = useState(() => D ? B : []), [A, E] = useState(((
|
|
10567
|
+
})), j = usePaginationProps$3(n, a, e), R = useTableColumns$3(S, j), [O, $] = useState(() => D ? B : []), [A, E] = useState(((ae = y == null ? void 0 : y.data) == null ? void 0 : ae.selectedRowKeys) || []), [z, L] = useState([]), V = (p == null ? void 0 : p.type) !== "none", G = useRef(/* @__PURE__ */ new Map()), H = useMemo(() => css`
|
|
10568
10568
|
& > td {
|
|
10569
10569
|
background-color: ${t.controlItemBgActive} !important;
|
|
10570
10570
|
}
|
|
@@ -10573,109 +10573,109 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10573
10573
|
}
|
|
10574
10574
|
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), U = useTableBlockContextBasicValue(), K = useRef(b);
|
|
10575
10575
|
K.current = b, useEffect(() => {
|
|
10576
|
-
var
|
|
10577
|
-
U != null && U.field && (U.field.data = ((
|
|
10576
|
+
var ne;
|
|
10577
|
+
U != null && U.field && (U.field.data = ((ne = U.field) == null ? void 0 : ne.data) || {}, U.field.data.clearSelectedRowKeys = () => {
|
|
10578
10578
|
U.field.data.selectedRowKeys = [], E([]);
|
|
10579
10579
|
}, U.field.data.setSelectedRowKeys = E);
|
|
10580
10580
|
}, [U == null ? void 0 : U.field]);
|
|
10581
|
-
const
|
|
10582
|
-
onClick: (
|
|
10583
|
-
isPortalInBody(
|
|
10581
|
+
const Y = useMemo(() => C ? H : "", [H, C]), X = useMemo(() => C ? (ne, oe) => ({
|
|
10582
|
+
onClick: (ie) => {
|
|
10583
|
+
isPortalInBody(ie.target) || C(ne, L, z);
|
|
10584
10584
|
},
|
|
10585
10585
|
rowIndex: oe,
|
|
10586
|
-
record:
|
|
10587
|
-
}) : (
|
|
10586
|
+
record: ne
|
|
10587
|
+
}) : (ne, oe) => ({
|
|
10588
10588
|
rowIndex: oe,
|
|
10589
|
-
record:
|
|
10589
|
+
record: ne
|
|
10590
10590
|
}), [C, z]);
|
|
10591
10591
|
useDeepCompareEffect(() => {
|
|
10592
|
-
const
|
|
10593
|
-
_.isEqual(
|
|
10592
|
+
const ne = D ? B : [];
|
|
10593
|
+
_.isEqual(ne, O) || $(ne);
|
|
10594
10594
|
}, [D, B]);
|
|
10595
|
-
const
|
|
10595
|
+
const Q = useCallback((ne) => {
|
|
10596
10596
|
if (m)
|
|
10597
|
-
return
|
|
10598
|
-
if (
|
|
10599
|
-
return
|
|
10600
|
-
if (G.current.has(
|
|
10601
|
-
return G.current.get(
|
|
10597
|
+
return ee(ne);
|
|
10598
|
+
if (ne.key)
|
|
10599
|
+
return ne.key;
|
|
10600
|
+
if (G.current.has(ne))
|
|
10601
|
+
return G.current.get(ne);
|
|
10602
10602
|
const oe = uid();
|
|
10603
|
-
return G.current.set(
|
|
10604
|
-
}, []),
|
|
10605
|
-
(
|
|
10603
|
+
return G.current.set(ne, oe), oe;
|
|
10604
|
+
}, []), ee = useCallback(
|
|
10605
|
+
(ne) => {
|
|
10606
10606
|
var oe;
|
|
10607
|
-
return Array.isArray(m) ? m.map((
|
|
10608
|
-
var
|
|
10609
|
-
return ((
|
|
10610
|
-
}).join("-") : typeof m == "string" ?
|
|
10607
|
+
return Array.isArray(m) ? m.map((ie) => {
|
|
10608
|
+
var ce;
|
|
10609
|
+
return ((ce = ne[ie]) == null ? void 0 : ce.toString()) || "";
|
|
10610
|
+
}).join("-") : typeof m == "string" ? ne[m] : (oe = (m != null ? m : Q)(ne)) == null ? void 0 : oe.toString();
|
|
10611
10611
|
},
|
|
10612
|
-
[JSON.stringify(m),
|
|
10613
|
-
),
|
|
10614
|
-
const oe = useCallback((
|
|
10612
|
+
[JSON.stringify(m), Q]
|
|
10613
|
+
), J = useMemo(() => (Array.isArray(b) ? b : []).filter(Boolean), [b, b == null ? void 0 : b.length]), Z = useMemo(() => (ne) => {
|
|
10614
|
+
const oe = useCallback((ie) => {
|
|
10615
10615
|
var ve, Pe, Fe, Ie, ke, De, je, Me;
|
|
10616
|
-
if (!
|
|
10616
|
+
if (!ie.active || !ie.over) {
|
|
10617
10617
|
console.warn("move cancel");
|
|
10618
10618
|
return;
|
|
10619
10619
|
}
|
|
10620
|
-
const
|
|
10621
|
-
y.move(
|
|
10620
|
+
const ce = (Fe = (Pe = (ve = ie.active) == null ? void 0 : ve.data.current) == null ? void 0 : Pe.sortable) == null ? void 0 : Fe.index, de = (De = (ke = (Ie = ie.over) == null ? void 0 : Ie.data.current) == null ? void 0 : ke.sortable) == null ? void 0 : De.index, Se = ((je = K.current) == null ? void 0 : je[ce]) || ie.active, Ae = ((Me = K.current) == null ? void 0 : Me[de]) || ie.over;
|
|
10621
|
+
y.move(ce, de), M({ from: Se, to: Ae });
|
|
10622
10622
|
}, []);
|
|
10623
|
-
return /* @__PURE__ */ jsx(DndContext, { onDragEnd: oe, children: /* @__PURE__ */ jsx("tbody", x({},
|
|
10623
|
+
return /* @__PURE__ */ jsx(DndContext, { onDragEnd: oe, children: /* @__PURE__ */ jsx("tbody", x({}, ne)) });
|
|
10624
10624
|
}, [y, M]);
|
|
10625
|
-
|
|
10626
|
-
const
|
|
10625
|
+
Z.displayName = "BodyWrapperComponent";
|
|
10626
|
+
const te = useMemo(() => ({
|
|
10627
10627
|
header: {
|
|
10628
10628
|
wrapper: HeaderWrapperComponent$1,
|
|
10629
10629
|
cell: HeaderCellComponent$1
|
|
10630
10630
|
},
|
|
10631
10631
|
body: {
|
|
10632
|
-
wrapper:
|
|
10632
|
+
wrapper: Z,
|
|
10633
10633
|
row: BodyRowComponent$1,
|
|
10634
10634
|
cell: BodyCellComponent$1
|
|
10635
10635
|
}
|
|
10636
|
-
}), [
|
|
10636
|
+
}), [Z]), re = useMemo(() => p, [JSON.stringify(p)]), se = useMemo(
|
|
10637
10637
|
() => ({
|
|
10638
10638
|
rowSelection: N !== !1 && re ? x({
|
|
10639
10639
|
type: "checkbox",
|
|
10640
10640
|
selectedRowKeys: A,
|
|
10641
|
-
onChange(
|
|
10642
|
-
y.data = y.data || {}, y.data.selectedRowKeys =
|
|
10641
|
+
onChange(ne, oe) {
|
|
10642
|
+
y.data = y.data || {}, y.data.selectedRowKeys = ne, y.data.selectedRowData = oe, E(ne), u == null || u(ne, oe, E);
|
|
10643
10643
|
},
|
|
10644
|
-
onSelect: (
|
|
10645
|
-
var
|
|
10646
|
-
U && (U.field.data = ((
|
|
10644
|
+
onSelect: (ne, oe, ie, ce) => {
|
|
10645
|
+
var de;
|
|
10646
|
+
U && (U.field.data = ((de = U.field) == null ? void 0 : de.data) || {}, U.field.data.selectedRecord = ne, U.field.data.selected = oe);
|
|
10647
10647
|
},
|
|
10648
|
-
getCheckboxProps(
|
|
10648
|
+
getCheckboxProps(ne) {
|
|
10649
10649
|
return {
|
|
10650
10650
|
"aria-label": "checkbox"
|
|
10651
10651
|
};
|
|
10652
10652
|
},
|
|
10653
|
-
renderCell: (
|
|
10653
|
+
renderCell: (ne, oe, ie, ce) => {
|
|
10654
10654
|
if (!l && !c)
|
|
10655
|
-
return
|
|
10656
|
-
const
|
|
10657
|
-
return
|
|
10655
|
+
return ce;
|
|
10656
|
+
const de = j == null ? void 0 : j.current, Se = (j == null ? void 0 : j.pageSize) || 20;
|
|
10657
|
+
return de ? ie = ie + (de - 1) * Se + 1 : ie = ie + 1, oe.__index && (ie = extractIndex(oe.__index)), /* @__PURE__ */ jsxs(
|
|
10658
10658
|
"div",
|
|
10659
10659
|
{
|
|
10660
10660
|
role: "button",
|
|
10661
|
-
"aria-label": `table-index-${
|
|
10662
|
-
className: cls(
|
|
10661
|
+
"aria-label": `table-index-${ie}`,
|
|
10662
|
+
className: cls(ne ? "checked" : null, rowSelectCheckboxWrapperClass$1, {
|
|
10663
10663
|
[rowSelectCheckboxWrapperClassHover$1]: V
|
|
10664
10664
|
}),
|
|
10665
10665
|
children: [
|
|
10666
|
-
/* @__PURE__ */ jsxs("div", { className: cls(
|
|
10667
|
-
l && /* @__PURE__ */ jsx(SortHandle$2, { id:
|
|
10668
|
-
c && /* @__PURE__ */ jsx(TableIndex$3, { index:
|
|
10666
|
+
/* @__PURE__ */ jsxs("div", { className: cls(ne ? "checked" : null, rowSelectCheckboxContentClass$1), children: [
|
|
10667
|
+
l && /* @__PURE__ */ jsx(SortHandle$2, { id: ee(oe) }),
|
|
10668
|
+
c && /* @__PURE__ */ jsx(TableIndex$3, { index: ie })
|
|
10669
10669
|
] }),
|
|
10670
10670
|
V && /* @__PURE__ */ jsx(
|
|
10671
10671
|
"div",
|
|
10672
10672
|
{
|
|
10673
10673
|
className: cls(
|
|
10674
10674
|
"nb-origin-node",
|
|
10675
|
-
|
|
10675
|
+
ne ? "checked" : null,
|
|
10676
10676
|
rowSelectCheckboxCheckedClassHover$1
|
|
10677
10677
|
),
|
|
10678
|
-
children:
|
|
10678
|
+
children: ce
|
|
10679
10679
|
}
|
|
10680
10680
|
)
|
|
10681
10681
|
]
|
|
@@ -10691,62 +10691,62 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10691
10691
|
c,
|
|
10692
10692
|
l,
|
|
10693
10693
|
y,
|
|
10694
|
-
|
|
10694
|
+
ee,
|
|
10695
10695
|
V,
|
|
10696
10696
|
re,
|
|
10697
10697
|
j,
|
|
10698
10698
|
U,
|
|
10699
10699
|
N
|
|
10700
10700
|
]
|
|
10701
|
-
),
|
|
10702
|
-
({ children:
|
|
10703
|
-
var oe,
|
|
10701
|
+
), ue = useCallback(
|
|
10702
|
+
({ children: ne }) => {
|
|
10703
|
+
var oe, ie;
|
|
10704
10704
|
return l ? React.createElement(
|
|
10705
10705
|
SortableContext$1,
|
|
10706
10706
|
{
|
|
10707
|
-
items: ((
|
|
10707
|
+
items: ((ie = (oe = K.current) == null ? void 0 : oe.map) == null ? void 0 : ie.call(oe, ee)) || []
|
|
10708
10708
|
},
|
|
10709
|
-
|
|
10710
|
-
) : React.createElement(React.Fragment, {},
|
|
10709
|
+
ne
|
|
10710
|
+
) : React.createElement(React.Fragment, {}, ne);
|
|
10711
10711
|
},
|
|
10712
|
-
[l,
|
|
10712
|
+
[l, ee]
|
|
10713
10713
|
// Don't put 'value' in dependencies, otherwise it will cause the dropdown component to disappear immediately when adding association fields to the table
|
|
10714
|
-
), { height:
|
|
10714
|
+
), { height: le, tableSizeRefCallback: me } = useTableSize(), xe = useMemo(() => ({
|
|
10715
10715
|
x: "max-content",
|
|
10716
|
-
y:
|
|
10717
|
-
}), [
|
|
10718
|
-
(
|
|
10719
|
-
[z,
|
|
10720
|
-
),
|
|
10721
|
-
(
|
|
10722
|
-
const
|
|
10723
|
-
$(
|
|
10716
|
+
y: le
|
|
10717
|
+
}), [le, J]), Ce = useCallback(
|
|
10718
|
+
(ne) => z.includes(ne[m]) ? Y : "",
|
|
10719
|
+
[z, Y, JSON.stringify(m)]
|
|
10720
|
+
), he = useCallback(
|
|
10721
|
+
(ne, oe) => {
|
|
10722
|
+
const ie = ne ? [...O, oe[F.getPrimaryKey()]] : O.filter((ce) => oe[F.getPrimaryKey()] !== ce);
|
|
10723
|
+
$(ie), g == null || g(ne, oe);
|
|
10724
10724
|
},
|
|
10725
10725
|
[O, g, F]
|
|
10726
|
-
),
|
|
10727
|
-
onExpand:
|
|
10726
|
+
), fe = useMemo(() => ({
|
|
10727
|
+
onExpand: he,
|
|
10728
10728
|
expandedRowKeys: O
|
|
10729
|
-
}), [O,
|
|
10729
|
+
}), [O, he]);
|
|
10730
10730
|
return (
|
|
10731
10731
|
// If spinning is set to undefined, it will cause the subtable to always display loading, so we need to convert it here.
|
|
10732
10732
|
// We use Spin here instead of Table's loading prop because using Spin here reduces unnecessary re-renders.
|
|
10733
10733
|
/* @__PURE__ */ jsx(HighPerformanceSpin, { spinning: !!f, children: /* @__PURE__ */ jsx(BlockRequestLoadingContext.Provider, { value: !1, children: /* @__PURE__ */ jsx(
|
|
10734
10734
|
InternalNocoBaseTable$1,
|
|
10735
10735
|
P(x(x({
|
|
10736
|
-
tableHeight:
|
|
10737
|
-
SortableWrapper:
|
|
10738
|
-
tableSizeRefCallback:
|
|
10739
|
-
defaultRowKey:
|
|
10740
|
-
dataSource:
|
|
10741
|
-
}, S),
|
|
10736
|
+
tableHeight: le,
|
|
10737
|
+
SortableWrapper: ue,
|
|
10738
|
+
tableSizeRefCallback: me,
|
|
10739
|
+
defaultRowKey: Q,
|
|
10740
|
+
dataSource: J
|
|
10741
|
+
}, S), se), {
|
|
10742
10742
|
paginationProps: j,
|
|
10743
|
-
components:
|
|
10743
|
+
components: te,
|
|
10744
10744
|
onTableChange: d,
|
|
10745
|
-
onRow:
|
|
10745
|
+
onRow: X,
|
|
10746
10746
|
rowClassName: Ce,
|
|
10747
|
-
scroll:
|
|
10747
|
+
scroll: xe,
|
|
10748
10748
|
columns: R,
|
|
10749
|
-
expandable:
|
|
10749
|
+
expandable: fe,
|
|
10750
10750
|
field: y,
|
|
10751
10751
|
size: I
|
|
10752
10752
|
})
|
|
@@ -10980,7 +10980,7 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10980
10980
|
[t, p]
|
|
10981
10981
|
), F = useCallback(
|
|
10982
10982
|
(R, O, $, A) => {
|
|
10983
|
-
var
|
|
10983
|
+
var ee;
|
|
10984
10984
|
const {
|
|
10985
10985
|
association: E = !1,
|
|
10986
10986
|
cached: z = {},
|
|
@@ -10990,30 +10990,30 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10990
10990
|
exceptInterfaces: H = [],
|
|
10991
10991
|
prefixFieldValue: U = "",
|
|
10992
10992
|
usePrefix: K = !1,
|
|
10993
|
-
dataSource:
|
|
10993
|
+
dataSource: Y
|
|
10994
10994
|
} = A || {};
|
|
10995
10995
|
if (L.length - 1 > V)
|
|
10996
10996
|
return;
|
|
10997
10997
|
if (z[R])
|
|
10998
10998
|
return _.cloneDeep(z[R]);
|
|
10999
10999
|
O && typeof O == "string" && (O = [O]), $ && typeof $ == "string" && ($ = [$]);
|
|
11000
|
-
const
|
|
11001
|
-
(
|
|
11002
|
-
)) == null ? void 0 :
|
|
11003
|
-
var
|
|
11004
|
-
const
|
|
11005
|
-
value: K && U ? `${U}.${
|
|
11006
|
-
label: f((
|
|
11007
|
-
},
|
|
11008
|
-
return E &&
|
|
11000
|
+
const X = b(R, Y), Q = (ee = X == null ? void 0 : X.filter(
|
|
11001
|
+
(J) => J.interface && !H.includes(J.interface) && (G || O && O.includes(J.type) || $ && $.includes(J.interface) || (E && J.target && J.target !== R && Array.isArray(E) ? E.includes(J.interface) : !1))
|
|
11002
|
+
)) == null ? void 0 : ee.map((J) => {
|
|
11003
|
+
var te, re;
|
|
11004
|
+
const Z = x({
|
|
11005
|
+
value: K && U ? `${U}.${J.name}` : J.name,
|
|
11006
|
+
label: f((te = J == null ? void 0 : J.uiSchema) == null ? void 0 : te.title) || J.name
|
|
11007
|
+
}, J);
|
|
11008
|
+
return E && J.target && (Z.children = L.includes(J.target) ? [] : F(J.target, O, $, P(x({}, A), {
|
|
11009
11009
|
cached: z,
|
|
11010
|
-
dataSource:
|
|
11011
|
-
collectionNames: [...L,
|
|
11012
|
-
prefixFieldValue: K ? U ? `${U}.${
|
|
11010
|
+
dataSource: Y,
|
|
11011
|
+
collectionNames: [...L, J.target],
|
|
11012
|
+
prefixFieldValue: K ? U ? `${U}.${J.name}` : J.name : "",
|
|
11013
11013
|
usePrefix: K
|
|
11014
|
-
})), !((re =
|
|
11014
|
+
})), !((re = Z.children) != null && re.length)) ? null : Z;
|
|
11015
11015
|
}).filter(Boolean);
|
|
11016
|
-
return z[R] =
|
|
11016
|
+
return z[R] = Q, Q;
|
|
11017
11017
|
},
|
|
11018
11018
|
[b]
|
|
11019
11019
|
), w = useCallback(
|
|
@@ -11085,7 +11085,7 @@ function SelectWithTitle(i) {
|
|
|
11085
11085
|
onChange: n,
|
|
11086
11086
|
options: o,
|
|
11087
11087
|
fieldNames: r
|
|
11088
|
-
} = l, a =
|
|
11088
|
+
} = l, a = W(l, [
|
|
11089
11089
|
"title",
|
|
11090
11090
|
"defaultValue",
|
|
11091
11091
|
"onChange",
|
|
@@ -11133,7 +11133,7 @@ const DataSourceApplicationProvider = (o) => {
|
|
|
11133
11133
|
var r = o, {
|
|
11134
11134
|
children: e,
|
|
11135
11135
|
dataSourceManager: t
|
|
11136
|
-
} = r, n =
|
|
11136
|
+
} = r, n = W(r, [
|
|
11137
11137
|
"children",
|
|
11138
11138
|
"dataSourceManager"
|
|
11139
11139
|
]);
|
|
@@ -11610,10 +11610,10 @@ const AllDataBlocksContext = React.createContext({
|
|
|
11610
11610
|
getAllDataBlocks: t
|
|
11611
11611
|
};
|
|
11612
11612
|
}, WithForm$1 = (e) => {
|
|
11613
|
-
const c = e, { children: t, form: n } = c, o =
|
|
11613
|
+
const c = e, { children: t, form: n } = c, o = W(c, ["children", "form"]), r = useContext(SchemaOptionsContext), a = useContext(SchemaExpressionScopeContext), i = x(x({}, r == null ? void 0 : r.scope), a), l = x({}, r == null ? void 0 : r.components);
|
|
11614
11614
|
return /* @__PURE__ */ jsx(FormProvider$1, P(x({}, o), { form: n, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { components: l, scope: i, children: t }) }));
|
|
11615
11615
|
}, WithoutForm$1 = (e) => {
|
|
11616
|
-
const c = e, { children: t } = c, n =
|
|
11616
|
+
const c = e, { children: t } = c, n = W(c, ["children"]), o = useContext(SchemaOptionsContext), r = useContext(SchemaExpressionScopeContext), a = x(x({}, o == null ? void 0 : o.scope), r), i = x({}, o == null ? void 0 : o.components), l = useMemo(() => createForm(), []);
|
|
11617
11617
|
return /* @__PURE__ */ jsx(FormProvider$1, P(x({}, n), { form: l, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { components: i, scope: a, children: t }) }));
|
|
11618
11618
|
}, FormProvider = (e) => e.form ? /* @__PURE__ */ jsx(WithForm$1, x({}, e)) : /* @__PURE__ */ jsx(WithoutForm$1, x({}, e)), CollectionHistoryContext = createContext({
|
|
11619
11619
|
historyCollections: [],
|
|
@@ -12255,7 +12255,7 @@ const designerCss$4 = ({ margin: e = "-18px -16px", padding: t = "18px 16px" } =
|
|
|
12255
12255
|
}, SchemaToolbarContext = createContext({});
|
|
12256
12256
|
SchemaToolbarContext.displayName = "SchemaToolbarContext";
|
|
12257
12257
|
const SchemaToolbarProvider = (e) => {
|
|
12258
|
-
const o = e, { children: t } = o, n =
|
|
12258
|
+
const o = e, { children: t } = o, n = W(o, ["children"]);
|
|
12259
12259
|
return /* @__PURE__ */ jsx(SchemaToolbarContext.Provider, { value: n, children: t });
|
|
12260
12260
|
};
|
|
12261
12261
|
function useSchemaToolbar() {
|
|
@@ -13099,7 +13099,7 @@ const useCurrentUserSettingsMenu = () => {
|
|
|
13099
13099
|
[e, t]
|
|
13100
13100
|
);
|
|
13101
13101
|
}, filterProperties = (e) => e["x-component"] === "Action.Container", FieldLink = (e) => {
|
|
13102
|
-
const d = e, { WrappedComponent: t } = d, n =
|
|
13102
|
+
const d = e, { WrappedComponent: t } = d, n = W(d, ["WrappedComponent"]), o = useFieldSchema(), { openPopup: r } = usePopupUtils(), a = useRef(!1), i = useInsertSchema(), l = useRef(o);
|
|
13103
13103
|
l.current = o;
|
|
13104
13104
|
const c = useCallback(() => l.current, []), u = useCallback(() => {
|
|
13105
13105
|
o.properties || (i(popupSchema), a.current = !0), a.current ? (setTimeout(() => {
|
|
@@ -15592,11 +15592,11 @@ const useGetFilterOptions = () => {
|
|
|
15592
15592
|
defaultFilter: ((z = (E = (A = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : A.service) == null ? void 0 : E.params) == null ? void 0 : z.filter) || {},
|
|
15593
15593
|
form: r,
|
|
15594
15594
|
onSubmit: ({ filter: H }) => {
|
|
15595
|
-
var K,
|
|
15595
|
+
var K, Y;
|
|
15596
15596
|
H = removeNullCondition(H), set(l.componentProps, "service.params.filter", H), n["x-component-props"] = l.componentProps;
|
|
15597
|
-
const U = (
|
|
15598
|
-
l.form.query(`${U.concat("*." + n.name)}`).forEach((
|
|
15599
|
-
|
|
15597
|
+
const U = (Y = l.path) == null ? void 0 : Y.splice(((K = l.path) == null ? void 0 : K.length) - 1, 1);
|
|
15598
|
+
l.form.query(`${U.concat("*." + n.name)}`).forEach((X) => {
|
|
15599
|
+
X.componentProps.service = X.componentProps.service || { params: {} }, X.componentProps.service.params.filter = H;
|
|
15600
15600
|
}), d.emit("patch", {
|
|
15601
15601
|
schema: {
|
|
15602
15602
|
"x-uid": n["x-uid"],
|
|
@@ -15680,14 +15680,14 @@ const useGetFilterOptions = () => {
|
|
|
15680
15680
|
options: m,
|
|
15681
15681
|
value: p == null ? void 0 : p.label,
|
|
15682
15682
|
onChange: (H) => {
|
|
15683
|
-
var
|
|
15684
|
-
const U = P(x(x({}, (
|
|
15683
|
+
var Y, X, Q, ee, J;
|
|
15684
|
+
const U = P(x(x({}, (X = (Y = o == null ? void 0 : o.uiSchema) == null ? void 0 : Y["x-component-props"]) == null ? void 0 : X.fieldNames), (Q = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : Q.fieldNames), {
|
|
15685
15685
|
label: H
|
|
15686
15686
|
});
|
|
15687
15687
|
_.set(n, "x-component-props.fieldNames", U);
|
|
15688
|
-
const K = (
|
|
15689
|
-
l.form.query(`${K.concat("*." + n.name)}`).forEach((
|
|
15690
|
-
|
|
15688
|
+
const K = (J = l.path) == null ? void 0 : J.splice(((ee = l.path) == null ? void 0 : ee.length) - 1, 1);
|
|
15689
|
+
l.form.query(`${K.concat("*." + n.name)}`).forEach((Z) => {
|
|
15690
|
+
Z.componentProps.fieldNames = U;
|
|
15691
15691
|
}), d.emit("patch", {
|
|
15692
15692
|
schema: {
|
|
15693
15693
|
"x-uid": n["x-uid"],
|
|
@@ -15741,14 +15741,14 @@ const useGetFilterOptions = () => {
|
|
|
15741
15741
|
title: c("Required"),
|
|
15742
15742
|
checked: n.required,
|
|
15743
15743
|
onChange: (H) => {
|
|
15744
|
-
var
|
|
15744
|
+
var Y, X;
|
|
15745
15745
|
const U = {
|
|
15746
15746
|
"x-uid": n["x-uid"]
|
|
15747
15747
|
};
|
|
15748
15748
|
n.required = H, U.required = H;
|
|
15749
|
-
const K = (
|
|
15750
|
-
l.form.query(`${K.concat("*." + n.name)}`).forEach((
|
|
15751
|
-
|
|
15749
|
+
const K = (X = l.path) == null ? void 0 : X.splice(((Y = l.path) == null ? void 0 : Y.length) - 1, 1);
|
|
15750
|
+
l.form.query(`${K.concat("*." + n.name)}`).forEach((Q) => {
|
|
15751
|
+
Q.required = H;
|
|
15752
15752
|
}), d.emit("patch", {
|
|
15753
15753
|
schema: U
|
|
15754
15754
|
}), d.refresh();
|
|
@@ -15767,26 +15767,26 @@ const useGetFilterOptions = () => {
|
|
|
15767
15767
|
],
|
|
15768
15768
|
value: T,
|
|
15769
15769
|
onChange: (H) => {
|
|
15770
|
-
var
|
|
15770
|
+
var Y, X;
|
|
15771
15771
|
const U = {
|
|
15772
15772
|
"x-uid": n["x-uid"]
|
|
15773
|
-
}, K = (
|
|
15773
|
+
}, K = (X = l.path) == null ? void 0 : X.splice(((Y = l.path) == null ? void 0 : Y.length) - 1, 1);
|
|
15774
15774
|
switch (H) {
|
|
15775
15775
|
case "readonly": {
|
|
15776
|
-
n["x-read-pretty"] = !1, n["x-disabled"] = !0, U["x-read-pretty"] = !1, U["x-disabled"] = !0, l.form.query(`${K.concat("*." + n.name)}`).forEach((
|
|
15777
|
-
|
|
15776
|
+
n["x-read-pretty"] = !1, n["x-disabled"] = !0, U["x-read-pretty"] = !1, U["x-disabled"] = !0, l.form.query(`${K.concat("*." + n.name)}`).forEach((Q) => {
|
|
15777
|
+
Q.readonly = !0, Q.disabled = !0;
|
|
15778
15778
|
});
|
|
15779
15779
|
break;
|
|
15780
15780
|
}
|
|
15781
15781
|
case "read-pretty": {
|
|
15782
|
-
n["x-read-pretty"] = !0, n["x-disabled"] = !1, U["x-read-pretty"] = !0, U["x-disabled"] = !1, l.form.query(`${K.concat("*." + n.name)}`).forEach((
|
|
15783
|
-
|
|
15782
|
+
n["x-read-pretty"] = !0, n["x-disabled"] = !1, U["x-read-pretty"] = !0, U["x-disabled"] = !1, l.form.query(`${K.concat("*." + n.name)}`).forEach((Q) => {
|
|
15783
|
+
Q.readPretty = !0;
|
|
15784
15784
|
});
|
|
15785
15785
|
break;
|
|
15786
15786
|
}
|
|
15787
15787
|
default: {
|
|
15788
|
-
n["x-read-pretty"] = !1, n["x-disabled"] = !1, U["x-read-pretty"] = !1, U["x-disabled"] = !1, l.form.query(`${K.concat("*." + n.name)}`).forEach((
|
|
15789
|
-
|
|
15788
|
+
n["x-read-pretty"] = !1, n["x-disabled"] = !1, U["x-read-pretty"] = !1, U["x-disabled"] = !1, l.form.query(`${K.concat("*." + n.name)}`).forEach((Q) => {
|
|
15789
|
+
Q.readPretty = !1, Q.disabled + !1;
|
|
15790
15790
|
});
|
|
15791
15791
|
break;
|
|
15792
15792
|
}
|
|
@@ -15804,10 +15804,10 @@ const useGetFilterOptions = () => {
|
|
|
15804
15804
|
{
|
|
15805
15805
|
fieldSchema: n,
|
|
15806
15806
|
onSubmitCallBack: (H) => {
|
|
15807
|
-
var K,
|
|
15808
|
-
const U = (
|
|
15809
|
-
l.form.query(`${U.concat("*." + n.name)}`).forEach((
|
|
15810
|
-
|
|
15807
|
+
var K, Y;
|
|
15808
|
+
const U = (Y = l.path) == null ? void 0 : Y.splice(((K = l.path) == null ? void 0 : K.length) - 1, 1);
|
|
15809
|
+
l.form.query(`${U.concat("*." + n.name)}`).forEach((X) => {
|
|
15810
|
+
X.componentProps.service = X.componentProps.service || { params: {} }, X.componentProps.service.params.sort = H;
|
|
15811
15811
|
});
|
|
15812
15812
|
}
|
|
15813
15813
|
}
|
|
@@ -16537,7 +16537,7 @@ function useFieldComponentName() {
|
|
|
16537
16537
|
return c[u] || u;
|
|
16538
16538
|
}
|
|
16539
16539
|
const SchemaSettingsChildErrorFallback = (e) => {
|
|
16540
|
-
const o = e, { title: t } = o, n =
|
|
16540
|
+
const o = e, { title: t } = o, n = W(o, ["title"]);
|
|
16541
16541
|
return /* @__PURE__ */ jsx(SchemaSettingsItem, { title: t, children: /* @__PURE__ */ jsx(ErrorFallback.Modal, x({}, n)) });
|
|
16542
16542
|
}, getFallbackComponent = _.memoize((e) => (t) => /* @__PURE__ */ jsx(SchemaSettingsChildErrorFallback, P(x({}, t), { title: e }))), SchemaSettingsChildren = (e) => {
|
|
16543
16543
|
const { children: t } = e, { visible: n } = useSchemaSettings(), o = useRef(!1), r = useFieldComponentName();
|
|
@@ -16596,7 +16596,7 @@ const SchemaSettingsChildErrorFallback = (e) => {
|
|
|
16596
16596
|
});
|
|
16597
16597
|
SchemaSettingsIcon.displayName = "SchemaSettingsIcon";
|
|
16598
16598
|
const SchemaSettingsWrapper = React.memo((e) => {
|
|
16599
|
-
const p = e, { items: t, Component: n = SchemaSettingsIcon, name: o, componentProps: r, style: a } = p, i =
|
|
16599
|
+
const p = e, { items: t, Component: n = SchemaSettingsIcon, name: o, componentProps: r, style: a } = p, i = W(p, ["items", "Component", "name", "componentProps", "style"]), { dn: l } = useDesignable(), c = useField(), u = useFieldSchema(), d = useMemo(
|
|
16600
16600
|
() => x({
|
|
16601
16601
|
options: e,
|
|
16602
16602
|
style: a
|
|
@@ -17395,7 +17395,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
17395
17395
|
template: i,
|
|
17396
17396
|
settings: l,
|
|
17397
17397
|
action: c = "list"
|
|
17398
|
-
} = m, u =
|
|
17398
|
+
} = m, u = W(m, [
|
|
17399
17399
|
"formItemInitializers",
|
|
17400
17400
|
"actionInitializers",
|
|
17401
17401
|
"collection",
|
|
@@ -17471,7 +17471,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
17471
17471
|
template: d,
|
|
17472
17472
|
title: p,
|
|
17473
17473
|
settings: m
|
|
17474
|
-
} = C, h =
|
|
17474
|
+
} = C, h = W(C, [
|
|
17475
17475
|
"formItemInitializers",
|
|
17476
17476
|
"actionInitializers",
|
|
17477
17477
|
"collection",
|
|
@@ -17543,7 +17543,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
17543
17543
|
resource: i,
|
|
17544
17544
|
template: l,
|
|
17545
17545
|
settings: c
|
|
17546
|
-
} = m, u =
|
|
17546
|
+
} = m, u = W(m, [
|
|
17547
17547
|
"formItemInitializers",
|
|
17548
17548
|
"actionInitializers",
|
|
17549
17549
|
"collection",
|
|
@@ -17609,7 +17609,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
17609
17609
|
dataSource: c,
|
|
17610
17610
|
blockType: u,
|
|
17611
17611
|
pageSize: d = 20
|
|
17612
|
-
} = h, p =
|
|
17612
|
+
} = h, p = W(h, [
|
|
17613
17613
|
"collection",
|
|
17614
17614
|
"rowKey",
|
|
17615
17615
|
"tableActionInitializers",
|
|
@@ -18181,7 +18181,7 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
18181
18181
|
}
|
|
18182
18182
|
) })) : null;
|
|
18183
18183
|
}, InternalSchemaToolbar = React.memo((e) => {
|
|
18184
|
-
var
|
|
18184
|
+
var Y;
|
|
18185
18185
|
const t = useFieldSchema(), {
|
|
18186
18186
|
title: n,
|
|
18187
18187
|
initializer: o,
|
|
@@ -18212,46 +18212,46 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
18212
18212
|
o || (t == null ? void 0 : t["x-initializer"]),
|
|
18213
18213
|
t == null ? void 0 : t["x-initializer-props"]
|
|
18214
18214
|
), A = useGridRowContext(), E = useGridContext(), z = useMemo(() => {
|
|
18215
|
-
var
|
|
18215
|
+
var X;
|
|
18216
18216
|
return {
|
|
18217
18217
|
insertPosition: "afterEnd",
|
|
18218
|
-
wrap: ((
|
|
18219
|
-
Component: (
|
|
18218
|
+
wrap: ((X = A == null ? void 0 : A.cols) == null ? void 0 : X.length) === 1 ? gridRowColWrap : void 0,
|
|
18219
|
+
Component: (Q) => /* @__PURE__ */ jsx(
|
|
18220
18220
|
PlusOutlined,
|
|
18221
|
-
P(x({},
|
|
18221
|
+
P(x({}, Q), {
|
|
18222
18222
|
role: "button",
|
|
18223
18223
|
"aria-label": v("schema-initializer"),
|
|
18224
18224
|
style: { cursor: "pointer", fontSize: 14 }
|
|
18225
18225
|
})
|
|
18226
18226
|
)
|
|
18227
18227
|
};
|
|
18228
|
-
}, [v, (
|
|
18229
|
-
var
|
|
18228
|
+
}, [v, (Y = A == null ? void 0 : A.cols) == null ? void 0 : Y.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]), V = useMemo(() => {
|
|
18229
|
+
var X;
|
|
18230
18230
|
if (o === !1)
|
|
18231
18231
|
return null;
|
|
18232
18232
|
if ($)
|
|
18233
18233
|
return O(z);
|
|
18234
18234
|
if (E != null && E.InitializerComponent || E != null && E.renderSchemaInitializer)
|
|
18235
|
-
return E != null && E.InitializerComponent ? /* @__PURE__ */ jsx(E.InitializerComponent, x({}, z)) : (
|
|
18235
|
+
return E != null && E.InitializerComponent ? /* @__PURE__ */ jsx(E.InitializerComponent, x({}, z)) : (X = E.renderSchemaInitializer) == null ? void 0 : X.call(E, z);
|
|
18236
18236
|
}, [E, o, z, $, O]), G = useMemo(() => r !== !1 && R ? j() : null, [R, j, r]), H = useRef(null), U = "hidden";
|
|
18237
18237
|
useEffect(() => {
|
|
18238
|
-
const
|
|
18239
|
-
let
|
|
18240
|
-
for (;
|
|
18241
|
-
|
|
18242
|
-
const
|
|
18243
|
-
if (!
|
|
18238
|
+
const X = H.current;
|
|
18239
|
+
let Q = X == null ? void 0 : X.parentElement;
|
|
18240
|
+
for (; Q && Q.clientHeight === 0; )
|
|
18241
|
+
Q = Q.parentElement;
|
|
18242
|
+
const ee = g || Q;
|
|
18243
|
+
if (!ee)
|
|
18244
18244
|
return;
|
|
18245
|
-
function
|
|
18246
|
-
var
|
|
18247
|
-
|
|
18245
|
+
function J() {
|
|
18246
|
+
var te;
|
|
18247
|
+
X && (X.classList.remove(U), (te = e.onVisibleChange) == null || te.call(e, !0));
|
|
18248
18248
|
}
|
|
18249
|
-
function
|
|
18250
|
-
var
|
|
18251
|
-
|
|
18249
|
+
function Z() {
|
|
18250
|
+
var te;
|
|
18251
|
+
X && (X.classList.add(U), (te = e.onVisibleChange) == null || te.call(e, !1));
|
|
18252
18252
|
}
|
|
18253
|
-
return
|
|
18254
|
-
|
|
18253
|
+
return ee.addEventListener("mouseenter", J), ee.addEventListener("mouseleave", Z), () => {
|
|
18254
|
+
ee.removeEventListener("mouseenter", J), ee.removeEventListener("mouseleave", Z);
|
|
18255
18255
|
};
|
|
18256
18256
|
}, [e.onVisibleChange, g]);
|
|
18257
18257
|
const K = useMemo(
|
|
@@ -20272,7 +20272,7 @@ function getSelectedIdFilter(e) {
|
|
|
20272
20272
|
} : null;
|
|
20273
20273
|
}
|
|
20274
20274
|
function SelectItem(e) {
|
|
20275
|
-
const i = e, { title: t, options: n, value: o, onChange: r } = i, a =
|
|
20275
|
+
const i = e, { title: t, options: n, value: o, onChange: r } = i, a = W(i, ["title", "options", "value", "onChange"]);
|
|
20276
20276
|
return /* @__PURE__ */ jsx(SchemaSettingsItem, P(x({ title: t }, a), { children: /* @__PURE__ */ jsxs("div", { style: { alignItems: "center", display: "flex", justifyContent: "space-between" }, children: [
|
|
20277
20277
|
t,
|
|
20278
20278
|
/* @__PURE__ */ jsx(
|
|
@@ -20298,7 +20298,7 @@ const Tree$1 = connect(
|
|
|
20298
20298
|
Tree$1.displayName = "Tree";
|
|
20299
20299
|
const compatibleDataId = (e, t) => e == null ? void 0 : e.map((n) => {
|
|
20300
20300
|
var l;
|
|
20301
|
-
const i = n, { dataId: o } = i, r =
|
|
20301
|
+
const i = n, { dataId: o } = i, r = W(i, ["dataId"]), a = x({}, r);
|
|
20302
20302
|
return o && (a.dataScope = { $and: [{ id: { $eq: o } }] }, a.titleField = (a == null ? void 0 : a.titleField) || ((l = t == null ? void 0 : t[n.collection]) == null ? void 0 : l.titleField) || "id"), a;
|
|
20303
20303
|
}), FormDataTemplates = withDynamicSchemaProps(
|
|
20304
20304
|
observer$1((e) => {
|
|
@@ -21784,7 +21784,7 @@ const SchemaSettingsProvider = (e) => {
|
|
|
21784
21784
|
);
|
|
21785
21785
|
return /* @__PURE__ */ jsx(SchemaSettingsContext.Provider, { value: i, children: t });
|
|
21786
21786
|
}, InternalSchemaSettingsDropdown = React.memo((e) => {
|
|
21787
|
-
const f = e, { title: t, dn: n } = f, o =
|
|
21787
|
+
const f = e, { title: t, dn: n } = f, o = W(f, ["title", "dn"]), [r, a] = useState(!1), { Component: i, getMenuItems: l } = useMenuItem(), c = useNiceDropdownMaxHeight([r]), [u, d] = useState(!1), p = useContext(SchemaToolbarVisibleContext);
|
|
21788
21788
|
useEffect(() => {
|
|
21789
21789
|
p && d(!1);
|
|
21790
21790
|
}, [p]);
|
|
@@ -21821,7 +21821,7 @@ const SchemaSettingsProvider = (e) => {
|
|
|
21821
21821
|
)
|
|
21822
21822
|
] }));
|
|
21823
21823
|
}), InternalSchemaSettingsMenu = React.memo((e) => {
|
|
21824
|
-
const u = e, { title: t, dn: n } = u, o =
|
|
21824
|
+
const u = e, { title: t, dn: n } = u, o = W(u, ["title", "dn"]), [r, a] = useState(!0), { Component: i, getMenuItems: l } = useMenuItem(), c = l(() => e.children);
|
|
21825
21825
|
return /* @__PURE__ */ jsxs(SchemaSettingsProvider, P(x({ visible: r, setVisible: a, dn: n }, o), { children: [
|
|
21826
21826
|
/* @__PURE__ */ jsx(i, {}),
|
|
21827
21827
|
/* @__PURE__ */ jsx(Menu$1, { items: c })
|
|
@@ -22012,10 +22012,10 @@ const findGridSchema = (e) => e.reduceProperties((t, n) => {
|
|
|
22012
22012
|
}
|
|
22013
22013
|
);
|
|
22014
22014
|
}, SchemaSettingsSelectItem = (e) => {
|
|
22015
|
-
const l = e, { title: t, options: n, value: o, onChange: r, optionRender: a } = l, i =
|
|
22015
|
+
const l = e, { title: t, options: n, value: o, onChange: r, optionRender: a } = l, i = W(l, ["title", "options", "value", "onChange", "optionRender"]);
|
|
22016
22016
|
return /* @__PURE__ */ jsx(SchemaSettingsItem, P(x({ title: t }, i), { children: /* @__PURE__ */ jsx(SelectWithTitle, { title: t, defaultValue: o, onChange: r, options: n, optionRender: a }) }));
|
|
22017
22017
|
}, SchemaSettingsCascaderItem = (e) => {
|
|
22018
|
-
const i = e, { title: t, options: n, value: o, onChange: r } = i, a =
|
|
22018
|
+
const i = e, { title: t, options: n, value: o, onChange: r } = i, a = W(i, ["title", "options", "value", "onChange"]);
|
|
22019
22019
|
return /* @__PURE__ */ jsx(SchemaSettingsItem, P(x({ title: t }, a), { children: /* @__PURE__ */ jsxs("div", { style: { alignItems: "center", display: "flex", justifyContent: "space-between" }, children: [
|
|
22020
22020
|
t,
|
|
22021
22021
|
/* @__PURE__ */ jsx(
|
|
@@ -22034,7 +22034,7 @@ const findGridSchema = (e) => e.reduceProperties((t, n) => {
|
|
|
22034
22034
|
}, ml32 = { marginLeft: 32 }, MenuItemSwitch = observer$1(({ state: e }) => /* @__PURE__ */ jsx(Switch, { size: "small", checked: e.checked, style: ml32 }));
|
|
22035
22035
|
MenuItemSwitch.displayName = "MenuItemSwitch";
|
|
22036
22036
|
const SchemaSettingsSwitchItem = (e) => {
|
|
22037
|
-
const a = e, { title: t, onChange: n } = a, o =
|
|
22037
|
+
const a = e, { title: t, onChange: n } = a, o = W(a, ["title", "onChange"]), [r] = useState(() => observable({ checked: !!e.checked }));
|
|
22038
22038
|
return /* @__PURE__ */ jsx(
|
|
22039
22039
|
SchemaSettingsItem,
|
|
22040
22040
|
P(x({
|
|
@@ -22050,7 +22050,7 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
22050
22050
|
})
|
|
22051
22051
|
);
|
|
22052
22052
|
}, SchemaSettingsPopupItem = (e) => {
|
|
22053
|
-
const i = e, { schema: t } = i, n =
|
|
22053
|
+
const i = e, { schema: t } = i, n = W(i, ["schema"]), [o, r] = useState(!1), a = useContext(SchemaSettingsContext);
|
|
22054
22054
|
return /* @__PURE__ */ jsxs(ActionContextProvider, { value: { visible: o, setVisible: r }, children: [
|
|
22055
22055
|
/* @__PURE__ */ jsx(
|
|
22056
22056
|
SchemaSettingsItem,
|
|
@@ -22084,7 +22084,7 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
22084
22084
|
modalTip: c,
|
|
22085
22085
|
components: u,
|
|
22086
22086
|
scope: d
|
|
22087
|
-
} = R, p =
|
|
22087
|
+
} = R, p = W(R, [
|
|
22088
22088
|
"title",
|
|
22089
22089
|
"onSubmit",
|
|
22090
22090
|
"width",
|
|
@@ -22171,7 +22171,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22171
22171
|
noRecord: d = !1,
|
|
22172
22172
|
ModalContextProvider: p = (K) => /* @__PURE__ */ jsx(Fragment$1, { children: K.children }),
|
|
22173
22173
|
dialogRootClassName: m
|
|
22174
|
-
} = U, h =
|
|
22174
|
+
} = U, h = W(U, [
|
|
22175
22175
|
"hidden",
|
|
22176
22176
|
"title",
|
|
22177
22177
|
"components",
|
|
@@ -22191,9 +22191,9 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22191
22191
|
title: n
|
|
22192
22192
|
}, h), {
|
|
22193
22193
|
onClick: () => q(void 0, null, function* () {
|
|
22194
|
-
const K = l ? yield l() : c,
|
|
22194
|
+
const K = l ? yield l() : c, Y = _.isFunction(e.schema) ? e.schema() : e.schema;
|
|
22195
22195
|
FormDialog(
|
|
22196
|
-
{ title:
|
|
22196
|
+
{ title: Y.title || n, width: u, rootClassName: m },
|
|
22197
22197
|
() => /* @__PURE__ */ jsx(VariableScopeContext$1.Provider, { value: E, children: /* @__PURE__ */ jsx(SchemaComponentContext.Provider, { value: A, children: /* @__PURE__ */ jsx(AllDataBlocksContext.Provider, { value: $, children: /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: j(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: O, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: M, children: /* @__PURE__ */ jsx(
|
|
22198
22198
|
VariablePopupRecordProvider,
|
|
22199
22199
|
{
|
|
@@ -22248,7 +22248,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22248
22248
|
{
|
|
22249
22249
|
components: o,
|
|
22250
22250
|
scope: r,
|
|
22251
|
-
schema:
|
|
22251
|
+
schema: Y
|
|
22252
22252
|
}
|
|
22253
22253
|
) }) }) }) })
|
|
22254
22254
|
}
|
|
@@ -22269,8 +22269,8 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22269
22269
|
).open({
|
|
22270
22270
|
initialValues: K,
|
|
22271
22271
|
effects: a
|
|
22272
|
-
}).then((
|
|
22273
|
-
console.error(
|
|
22272
|
+
}).then((X) => (i(X), X)).catch((X) => {
|
|
22273
|
+
console.error(X);
|
|
22274
22274
|
});
|
|
22275
22275
|
}),
|
|
22276
22276
|
children: e.children || e.title
|
|
@@ -22788,7 +22788,7 @@ const HeightMode = {
|
|
|
22788
22788
|
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
22789
22789
|
`, Json = React.forwardRef(
|
|
22790
22790
|
(i, a) => {
|
|
22791
|
-
var l = i, { value: e, onChange: t, space: n = 2, json5: o = !1 } = l, r =
|
|
22791
|
+
var l = i, { value: e, onChange: t, space: n = 2, json5: o = !1 } = l, r = W(l, ["value", "onChange", "space", "json5"]);
|
|
22792
22792
|
const c = o ? JSON5 : JSON, u = useField(), [d, p] = useState("");
|
|
22793
22793
|
return useEffect(() => {
|
|
22794
22794
|
try {
|
|
@@ -23275,7 +23275,7 @@ const qrcodeEleId = "qrcode-scanner", QRCodeScannerInner = ({ visible: e, onClos
|
|
|
23275
23275
|
] });
|
|
23276
23276
|
};
|
|
23277
23277
|
function InputInner(e) {
|
|
23278
|
-
const i = e, { onChange: t, trim: n, enableScan: o } = i, r =
|
|
23278
|
+
const i = e, { onChange: t, trim: n, enableScan: o } = i, r = W(i, ["onChange", "trim", "enableScan"]), a = useCallback(
|
|
23279
23279
|
(l) => {
|
|
23280
23280
|
n && (l.target.value = l.target.value.trim()), t == null || t(l);
|
|
23281
23281
|
},
|
|
@@ -23423,7 +23423,7 @@ const ConstantTypes = {
|
|
|
23423
23423
|
label: '{{t("String")}}',
|
|
23424
23424
|
value: "string",
|
|
23425
23425
|
component: function(r) {
|
|
23426
|
-
var a = r, { onChange: t, value: n } = a, o =
|
|
23426
|
+
var a = r, { onChange: t, value: n } = a, o = W(a, ["onChange", "value"]);
|
|
23427
23427
|
return /* @__PURE__ */ jsx(Input$3, x({ value: n, onChange: (i) => t(i.target.value) }, o));
|
|
23428
23428
|
},
|
|
23429
23429
|
default() {
|
|
@@ -23434,7 +23434,7 @@ const ConstantTypes = {
|
|
|
23434
23434
|
label: '{{t("Number")}}',
|
|
23435
23435
|
value: "number",
|
|
23436
23436
|
component: function(r) {
|
|
23437
|
-
var a = r, { onChange: t, value: n } = a, o =
|
|
23437
|
+
var a = r, { onChange: t, value: n } = a, o = W(a, ["onChange", "value"]);
|
|
23438
23438
|
return /* @__PURE__ */ jsx(InputNumber$1, x({ value: n, onChange: t }, o));
|
|
23439
23439
|
},
|
|
23440
23440
|
default() {
|
|
@@ -23445,7 +23445,7 @@ const ConstantTypes = {
|
|
|
23445
23445
|
label: '{{t("Boolean")}}',
|
|
23446
23446
|
value: "boolean",
|
|
23447
23447
|
component: function(r) {
|
|
23448
|
-
var a = r, { onChange: t, value: n } = a, o =
|
|
23448
|
+
var a = r, { onChange: t, value: n } = a, o = W(a, ["onChange", "value"]);
|
|
23449
23449
|
const { t: i } = useTranslation();
|
|
23450
23450
|
return /* @__PURE__ */ jsx(
|
|
23451
23451
|
Select$1,
|
|
@@ -23470,7 +23470,7 @@ const ConstantTypes = {
|
|
|
23470
23470
|
label: '{{t("Date")}}',
|
|
23471
23471
|
value: "date",
|
|
23472
23472
|
component: function(r) {
|
|
23473
|
-
var a = r, { onChange: t, value: n } = a, o =
|
|
23473
|
+
var a = r, { onChange: t, value: n } = a, o = W(a, ["onChange", "value"]);
|
|
23474
23474
|
return /* @__PURE__ */ jsx(
|
|
23475
23475
|
DatePicker$1,
|
|
23476
23476
|
x({
|
|
@@ -23527,8 +23527,8 @@ function getTypedConstantOption(e, t, n) {
|
|
|
23527
23527
|
};
|
|
23528
23528
|
}
|
|
23529
23529
|
function Input$1(e) {
|
|
23530
|
-
var
|
|
23531
|
-
const
|
|
23530
|
+
var X, Q, ee;
|
|
23531
|
+
const Y = e, {
|
|
23532
23532
|
value: t = "",
|
|
23533
23533
|
onChange: n,
|
|
23534
23534
|
children: o,
|
|
@@ -23542,7 +23542,7 @@ function Input$1(e) {
|
|
|
23542
23542
|
parseOptions: p,
|
|
23543
23543
|
hideVariableButton: m,
|
|
23544
23544
|
constantAbel: h = !0
|
|
23545
|
-
} =
|
|
23545
|
+
} = Y, g = W(Y, [
|
|
23546
23546
|
"value",
|
|
23547
23547
|
"onChange",
|
|
23548
23548
|
"children",
|
|
@@ -23572,10 +23572,10 @@ function Input$1(e) {
|
|
|
23572
23572
|
label: I("Constant"),
|
|
23573
23573
|
[A.value]: "$",
|
|
23574
23574
|
[A.label]: I("Constant")
|
|
23575
|
-
} : a ? getTypedConstantOption(O, a, A) : null : null, [O, a]), z = (
|
|
23575
|
+
} : a ? getTypedConstantOption(O, a, A) : null : null, [O, a]), z = (X = E == null ? void 0 : E.component) != null ? X : NullComponent, L = Array.isArray(a) ? (ee = (Q = a.find((J) => Array.isArray(J) && J[0] === O)) == null ? void 0 : Q[1]) != null ? ee : {} : {};
|
|
23576
23576
|
let V;
|
|
23577
23577
|
t == null ? i ? o && N ? V = ["$"] : V = [""] : o ? V = ["$"] : V = [" ", O] : V = o ? ["$"] : [" ", O], m && (V = ["$"]), useEffect(() => {
|
|
23578
|
-
const re = E != null ? E : {}, { component:
|
|
23578
|
+
const re = E != null ? E : {}, { component: J } = re, Z = W(re, ["component"]), te = [
|
|
23579
23579
|
...i ? [
|
|
23580
23580
|
{
|
|
23581
23581
|
value: "",
|
|
@@ -23584,49 +23584,49 @@ function Input$1(e) {
|
|
|
23584
23584
|
[A.label]: I("Null")
|
|
23585
23585
|
}
|
|
23586
23586
|
] : [],
|
|
23587
|
-
...E ? [v(
|
|
23587
|
+
...E ? [v(Z)] : [],
|
|
23588
23588
|
...f ? [...f] : []
|
|
23589
|
-
].filter((
|
|
23590
|
-
T(
|
|
23589
|
+
].filter((se) => !se.deprecated || ($ == null ? void 0 : $[0]) === se[A.value]);
|
|
23590
|
+
T(te);
|
|
23591
23591
|
}, [f, $, E, i]);
|
|
23592
|
-
const G = (
|
|
23593
|
-
var
|
|
23594
|
-
const
|
|
23595
|
-
if (!((
|
|
23592
|
+
const G = (J) => q(this, null, function* () {
|
|
23593
|
+
var te;
|
|
23594
|
+
const Z = J[J.length - 1];
|
|
23595
|
+
if (!((te = Z.children) != null && te.length) && !Z.isLeaf && Z.loadChildren) {
|
|
23596
23596
|
let re;
|
|
23597
23597
|
if ($ && $.length >= 2) {
|
|
23598
|
-
for (const
|
|
23599
|
-
if (
|
|
23600
|
-
re =
|
|
23598
|
+
for (const se of $)
|
|
23599
|
+
if (se === Z[A.value]) {
|
|
23600
|
+
re = se;
|
|
23601
23601
|
break;
|
|
23602
23602
|
}
|
|
23603
23603
|
}
|
|
23604
|
-
yield
|
|
23604
|
+
yield Z.loadChildren(Z, re, $), T((se) => [...se]);
|
|
23605
23605
|
}
|
|
23606
23606
|
}), H = useCallback(
|
|
23607
|
-
(
|
|
23608
|
-
var
|
|
23609
|
-
if (
|
|
23610
|
-
M(!0), $ && n(null,
|
|
23607
|
+
(J, Z) => {
|
|
23608
|
+
var te, re, se;
|
|
23609
|
+
if (J[0] === "$") {
|
|
23610
|
+
M(!0), $ && n(null, Z);
|
|
23611
23611
|
return;
|
|
23612
23612
|
} else
|
|
23613
23613
|
M(!1);
|
|
23614
|
-
if (
|
|
23614
|
+
if (J[0] === "") {
|
|
23615
23615
|
n(null);
|
|
23616
23616
|
return;
|
|
23617
23617
|
}
|
|
23618
|
-
if (
|
|
23619
|
-
|
|
23618
|
+
if (J[0] === " ") {
|
|
23619
|
+
J[1] ? J[1] !== O && n((se = (re = (te = ConstantTypes[J[1]]) == null ? void 0 : te.default) == null ? void 0 : re.call(te)) != null ? se : null, Z) : $ && n(null, Z);
|
|
23620
23620
|
return;
|
|
23621
23621
|
}
|
|
23622
|
-
n(`{{${
|
|
23622
|
+
n(`{{${J.join(".")}}}`, Z);
|
|
23623
23623
|
},
|
|
23624
23624
|
[O, $, n]
|
|
23625
23625
|
), U = useCallback(() => {
|
|
23626
|
-
var
|
|
23627
|
-
if (M(!!o), (
|
|
23628
|
-
const
|
|
23629
|
-
return n(
|
|
23626
|
+
var J;
|
|
23627
|
+
if (M(!!o), (J = E == null ? void 0 : E.children) != null && J.length) {
|
|
23628
|
+
const Z = E.children[0].default();
|
|
23629
|
+
return n(Z);
|
|
23630
23630
|
}
|
|
23631
23631
|
n(null);
|
|
23632
23632
|
}, [E]);
|
|
@@ -23635,19 +23635,19 @@ function Input$1(e) {
|
|
|
23635
23635
|
var re;
|
|
23636
23636
|
if (!$ || w.length <= 1)
|
|
23637
23637
|
return;
|
|
23638
|
-
let
|
|
23639
|
-
const
|
|
23640
|
-
for (let
|
|
23641
|
-
const
|
|
23638
|
+
let Z = null;
|
|
23639
|
+
const te = [];
|
|
23640
|
+
for (let se = 0; se < $.length; se++) {
|
|
23641
|
+
const ue = $[se];
|
|
23642
23642
|
try {
|
|
23643
|
-
if (
|
|
23643
|
+
if (se === 0 ? Z = w.find((le) => le[A.value] === ue) : (Z.loadChildren && !((re = Z.children) != null && re.length) && (yield Z.loadChildren(Z, ue, $)), Z = Z.children.find((le) => le[A.value] === ue)), !Z)
|
|
23644
23644
|
return;
|
|
23645
|
-
|
|
23646
|
-
} catch (
|
|
23647
|
-
error(
|
|
23645
|
+
te.push(Z[A.label]);
|
|
23646
|
+
} catch (le) {
|
|
23647
|
+
error(le);
|
|
23648
23648
|
}
|
|
23649
23649
|
}
|
|
23650
|
-
T([...w]), B([...
|
|
23650
|
+
T([...w]), B([...te]);
|
|
23651
23651
|
});
|
|
23652
23652
|
}, [$, w.length]);
|
|
23653
23653
|
const K = e.disabled || F.disabled;
|
|
@@ -23692,10 +23692,10 @@ function Input$1(e) {
|
|
|
23692
23692
|
"aria-label": "variable-tag",
|
|
23693
23693
|
style: { overflow: "hidden" },
|
|
23694
23694
|
className: cx("ant-input ant-input-outlined", { "ant-input-disabled": K }, b),
|
|
23695
|
-
children: /* @__PURE__ */ jsx(Tag, { color: "blue", children: D.map((
|
|
23696
|
-
|
|
23697
|
-
|
|
23698
|
-
] },
|
|
23695
|
+
children: /* @__PURE__ */ jsx(Tag, { color: "blue", children: D.map((J, Z) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
23696
|
+
Z ? " / " : "",
|
|
23697
|
+
J
|
|
23698
|
+
] }, J)) })
|
|
23699
23699
|
}
|
|
23700
23700
|
),
|
|
23701
23701
|
K ? null : /* @__PURE__ */ jsx(
|
|
@@ -23845,12 +23845,26 @@ function setNativeInputValue(e, t) {
|
|
|
23845
23845
|
);
|
|
23846
23846
|
}
|
|
23847
23847
|
function RawTextArea(e) {
|
|
23848
|
-
const t = useRef(null),
|
|
23849
|
-
|
|
23848
|
+
const t = useRef(null), h = e, {
|
|
23849
|
+
changeOnSelect: n,
|
|
23850
|
+
component: o = Input$3.TextArea,
|
|
23851
|
+
fieldNames: r,
|
|
23852
|
+
scope: a,
|
|
23853
|
+
buttonClass: i,
|
|
23854
|
+
delimiters: l = ["{{", "}}"]
|
|
23855
|
+
} = h, c = W(h, [
|
|
23856
|
+
"changeOnSelect",
|
|
23857
|
+
"component",
|
|
23858
|
+
"fieldNames",
|
|
23859
|
+
"scope",
|
|
23860
|
+
"buttonClass",
|
|
23861
|
+
"delimiters"
|
|
23862
|
+
]), u = typeof a == "function" ? a() : a, [d, p] = useState(u || []);
|
|
23863
|
+
function m(g) {
|
|
23850
23864
|
if (!t.current)
|
|
23851
23865
|
return;
|
|
23852
|
-
const
|
|
23853
|
-
setNativeInputValue(
|
|
23866
|
+
const f = `${l[0]}${g.join(".")}${l[1]}`, { textArea: C } = t.current.resizableTextArea, b = C.value.slice(0, C.selectionStart) + f + C.value.slice(C.selectionEnd), S = [C.selectionStart, C.selectionStart + f.length];
|
|
23867
|
+
setNativeInputValue(C, b), C.setSelectionRange(...S), C.focus();
|
|
23854
23868
|
}
|
|
23855
23869
|
return /* @__PURE__ */ jsxs(
|
|
23856
23870
|
"div",
|
|
@@ -23862,7 +23876,7 @@ function RawTextArea(e) {
|
|
|
23862
23876
|
}
|
|
23863
23877
|
`,
|
|
23864
23878
|
children: [
|
|
23865
|
-
/* @__PURE__ */ jsx(o, P(x({},
|
|
23879
|
+
/* @__PURE__ */ jsx(o, P(x({}, c), { ref: t })),
|
|
23866
23880
|
/* @__PURE__ */ jsx(
|
|
23867
23881
|
Space$1.Compact,
|
|
23868
23882
|
{
|
|
@@ -23885,11 +23899,11 @@ function RawTextArea(e) {
|
|
|
23885
23899
|
background-color: transparent;
|
|
23886
23900
|
`,
|
|
23887
23901
|
fieldNames: r,
|
|
23888
|
-
options:
|
|
23889
|
-
setOptions:
|
|
23890
|
-
onInsert:
|
|
23902
|
+
options: d,
|
|
23903
|
+
setOptions: p,
|
|
23904
|
+
onInsert: m,
|
|
23891
23905
|
changeOnSelect: n,
|
|
23892
|
-
disabled:
|
|
23906
|
+
disabled: c.disabled
|
|
23893
23907
|
}
|
|
23894
23908
|
)
|
|
23895
23909
|
}
|
|
@@ -24042,8 +24056,8 @@ function TextArea(e) {
|
|
|
24042
24056
|
const { lastChild: U } = V;
|
|
24043
24057
|
if (U) {
|
|
24044
24058
|
G.setStartAfter(U), G.setEndAfter(U);
|
|
24045
|
-
const K = Array.from(V.childNodes),
|
|
24046
|
-
D([
|
|
24059
|
+
const K = Array.from(V.childNodes), Y = G.startContainer === V ? -1 : K.indexOf(U), X = G.startContainer === V ? -1 : K.indexOf(U);
|
|
24060
|
+
D([Y, G.startOffset, X, G.endOffset]);
|
|
24047
24061
|
}
|
|
24048
24062
|
}
|
|
24049
24063
|
}, [F]);
|
|
@@ -25737,7 +25751,7 @@ class SchemaComponentPlugin extends Plugin {
|
|
|
25737
25751
|
}
|
|
25738
25752
|
}
|
|
25739
25753
|
const TabsContext = React.createContext({}), TabsContextProvider = (n) => {
|
|
25740
|
-
var o = n, { children: e } = o, t =
|
|
25754
|
+
var o = n, { children: e } = o, t = W(o, ["children"]);
|
|
25741
25755
|
return /* @__PURE__ */ jsx(TabsContext.Provider, { value: t, children: e });
|
|
25742
25756
|
}, useTabsContext = () => React.useContext(TabsContext), randomNestedSchemaKeyStorage = {}, getRandomNestedSchemaKey = (e) => randomNestedSchemaKeyStorage[e] || (randomNestedSchemaKeyStorage[e] = uid()), deleteRandomNestedSchemaKey = (e) => delete randomNestedSchemaKeyStorage[e], PopupVisibleProviderContext = React.createContext(null), PopupParamsProviderContext = React.createContext(null), AllPopupsPropsProviderContext = React.createContext(null);
|
|
25743
25757
|
PopupVisibleProviderContext.displayName = "PopupVisibleProviderContext";
|
|
@@ -26153,7 +26167,7 @@ const DrawerErrorFallback = (e) => {
|
|
|
26153
26167
|
ActionDrawerContent.displayName = "ActionDrawerContent";
|
|
26154
26168
|
const InternalActionDrawer = observer$1(
|
|
26155
26169
|
(e) => {
|
|
26156
|
-
const F = e, { footerNodeName: t = "Action.Drawer.Footer", zIndex: n, onClose: o } = F, r =
|
|
26170
|
+
const F = e, { footerNodeName: t = "Action.Drawer.Footer", zIndex: n, onClose: o } = F, r = W(F, ["footerNodeName", "zIndex", "onClose"]), { visible: a, setVisible: i, openSize: l = "middle", drawerProps: c } = useActionContext(), u = useFieldSchema(), d = useField(), { t: p } = useTranslation(), { componentCls: m, hashId: h } = useStyles$b(), g = useTabsContext(), f = useZIndexContext(), C = u.reduceProperties((w, T) => T["x-component"] === t ? T : w), { hidden: b } = useCurrentPopupContext(), S = useMemo(() => P(x(x({}, c == null ? void 0 : c.style), r == null ? void 0 : r.style), {
|
|
26157
26171
|
display: b ? "none" : "block"
|
|
26158
26172
|
}), [b, c == null ? void 0 : c.style, r == null ? void 0 : r.style]), y = getZIndex("drawer", n || f, e.level || 0), v = useCallback(
|
|
26159
26173
|
(w) => {
|
|
@@ -26263,7 +26277,7 @@ function useDelayedVisible(e, t = 200) {
|
|
|
26263
26277
|
}
|
|
26264
26278
|
const InternalActionModal = observer$1(
|
|
26265
26279
|
(e) => {
|
|
26266
|
-
const I = e, { footerNodeName: t = "Action.Modal.Footer", width: n, zIndex: o, delay: r = 200 } = I, a =
|
|
26280
|
+
const I = e, { footerNodeName: t = "Action.Modal.Footer", width: n, zIndex: o, delay: r = 200 } = I, a = W(I, ["footerNodeName", "width", "zIndex", "delay"]), { visible: i, setVisible: l, openSize: c = "middle", modalProps: u } = useActionContext(), d = n != null ? n : openSizeWidthMap.get(c), p = useFieldSchema(), m = useField(), { token: h } = useToken(), g = useTabsContext(), f = useZIndexContext(), C = p.reduceProperties((F, w) => w["x-component"] === t ? w : F), { hidden: b } = useCurrentPopupContext(), S = !!C, y = getZIndex("modal", o || f, e.level || 0), v = useDelayedVisible(i, r);
|
|
26267
26281
|
return /* @__PURE__ */ jsx(ActionContextNoRerender, { children: /* @__PURE__ */ jsx(zIndexContext.Provider, { value: y, children: /* @__PURE__ */ jsx(TabsContextProvider, P(x({}, g), { tabBarExtraContent: null, children: /* @__PURE__ */ jsx(
|
|
26268
26282
|
Modal,
|
|
26269
26283
|
P(x(x({
|
|
@@ -26486,7 +26500,7 @@ const SchemaInitializerItemInternal = () => {
|
|
|
26486
26500
|
const e = useSchemaInitializerItem();
|
|
26487
26501
|
return /* @__PURE__ */ jsx(SchemaInitializerItem, x({}, e));
|
|
26488
26502
|
}, switchStyle = { marginLeft: 20 }, itemStyle = { display: "flex", alignItems: "center", justifyContent: "space-between" }, SchemaInitializerSwitch = (e) => {
|
|
26489
|
-
const a = e, { title: t, checked: n } = a, o =
|
|
26503
|
+
const a = e, { title: t, checked: n } = a, o = W(a, ["title", "checked"]), r = useCompile();
|
|
26490
26504
|
return /* @__PURE__ */ jsx(SchemaInitializerItem, P(x({}, o), { closeInitializerMenuWhenClick: !1, children: /* @__PURE__ */ jsxs("div", { style: itemStyle, children: [
|
|
26491
26505
|
r(t),
|
|
26492
26506
|
/* @__PURE__ */ jsx(Switch, { disabled: e.disabled, style: switchStyle, size: "small", checked: n })
|
|
@@ -26518,7 +26532,7 @@ const SchemaInitializerItemInternal = () => {
|
|
|
26518
26532
|
hideIfNoChildren: c,
|
|
26519
26533
|
componentProps: u,
|
|
26520
26534
|
sort: d
|
|
26521
|
-
} = I, p =
|
|
26535
|
+
} = I, p = W(I, [
|
|
26522
26536
|
"type",
|
|
26523
26537
|
"Component",
|
|
26524
26538
|
"component",
|
|
@@ -26650,7 +26664,7 @@ const useMenuSearch$1 = (e) => {
|
|
|
26650
26664
|
const { items: t } = e;
|
|
26651
26665
|
return t.length === 0 ? null : /* @__PURE__ */ jsx(SchemaInitializerChildren, { children: t });
|
|
26652
26666
|
}, SchemaInitializerActionModalItemComponent = React.forwardRef((e, t) => {
|
|
26653
|
-
const r = e, { onClick: n } = r, o =
|
|
26667
|
+
const r = e, { onClick: n } = r, o = W(r, ["onClick"]);
|
|
26654
26668
|
return /* @__PURE__ */ jsx(SchemaInitializerItem, P(x({ ref: t }, o), { onClick: (a) => n == null ? void 0 : n(a.event, !1) }));
|
|
26655
26669
|
}), SchemaInitializerActionModal = (e) => {
|
|
26656
26670
|
const { title: t, icon: n, width: o, schema: r, buttonText: a, btnStyles: i, isItem: l, component: c, onCancel: u, onSubmit: d } = e, { setVisible: p } = useSchemaInitializer(), m = useCallback(() => {
|
|
@@ -26748,7 +26762,7 @@ const useMenuSearch$1 = (e) => {
|
|
|
26748
26762
|
const e = useSchemaInitializerItem();
|
|
26749
26763
|
return /* @__PURE__ */ jsx(SchemaInitializerActionModal, x({}, e));
|
|
26750
26764
|
}, SchemaInitializerSelect = (e) => {
|
|
26751
|
-
const h = e, { title: t, options: n, value: o, onChange: r, openOnHover: a, onClick: i } = h, l =
|
|
26765
|
+
const h = e, { title: t, options: n, value: o, onChange: r, openOnHover: a, onClick: i } = h, l = W(h, ["title", "options", "value", "onChange", "openOnHover", "onClick"]), [c, u] = useState(!1), d = useCallback(
|
|
26752
26766
|
(...g) => {
|
|
26753
26767
|
u(!1), i == null || i(...g);
|
|
26754
26768
|
},
|
|
@@ -26813,7 +26827,7 @@ const useMenuSearch$1 = (e) => {
|
|
|
26813
26827
|
[e, t]
|
|
26814
26828
|
) };
|
|
26815
26829
|
}, SchemaInitializerButton = React.memo((e) => {
|
|
26816
|
-
const i = e, { style: t, options: n } = i, o =
|
|
26830
|
+
const i = e, { style: t, options: n } = i, o = W(i, ["style", "options"]), r = useCompile(), { getAriaLabel: a } = useGetAriaLabelOfSchemaInitializer();
|
|
26817
26831
|
return /* @__PURE__ */ jsx(
|
|
26818
26832
|
Button,
|
|
26819
26833
|
P(x({
|
|
@@ -26915,7 +26929,7 @@ function useGetSchemaInitializerMenuItems(e) {
|
|
|
26915
26929
|
}
|
|
26916
26930
|
if (a.isMenuType) {
|
|
26917
26931
|
const f = a, { isMenuType: C } = f;
|
|
26918
|
-
return
|
|
26932
|
+
return W(f, ["isMenuType"]);
|
|
26919
26933
|
}
|
|
26920
26934
|
const d = c || u, p = a.key || `${r}-${u}-${i}`, m = (C) => {
|
|
26921
26935
|
C.domEvent.stopPropagation(), C.key === p && (a.onClick ? a.onClick(P(x({}, C), { item: a })) : e == null || e(P(x({}, C), { item: a })));
|
|
@@ -27159,21 +27173,21 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27159
27173
|
}
|
|
27160
27174
|
}
|
|
27161
27175
|
function b(A, E, z) {
|
|
27162
|
-
var L, V, G, H, U, K,
|
|
27163
|
-
if (A && (A = A.split("/"),
|
|
27176
|
+
var L, V, G, H, U, K, Y, X, Q, ee, J, Z, te = E && E.split("/"), re = i.map, se = re && re["*"];
|
|
27177
|
+
if (A && (A = A.split("/"), Y = A.length - 1, i.nodeIdCompat && jsSuffixRegExp.test(A[Y]) && (A[Y] = A[Y].replace(jsSuffixRegExp, "")), A[0].charAt(0) === "." && te && (Z = te.slice(0, te.length - 1), A = Z.concat(A)), C(A), A = A.join("/")), z && re && (te || se)) {
|
|
27164
27178
|
G = A.split("/");
|
|
27165
27179
|
e:
|
|
27166
27180
|
for (H = G.length; H > 0; H -= 1) {
|
|
27167
|
-
if (K = G.slice(0, H).join("/"),
|
|
27168
|
-
for (U =
|
|
27169
|
-
if (V = getOwn(re,
|
|
27170
|
-
|
|
27181
|
+
if (K = G.slice(0, H).join("/"), te) {
|
|
27182
|
+
for (U = te.length; U > 0; U -= 1)
|
|
27183
|
+
if (V = getOwn(re, te.slice(0, U).join("/")), V && (V = getOwn(V, K), V)) {
|
|
27184
|
+
X = V, Q = H;
|
|
27171
27185
|
break e;
|
|
27172
27186
|
}
|
|
27173
27187
|
}
|
|
27174
|
-
!
|
|
27188
|
+
!ee && se && getOwn(se, K) && (ee = getOwn(se, K), J = H);
|
|
27175
27189
|
}
|
|
27176
|
-
!
|
|
27190
|
+
!X && ee && (X = ee, Q = J), X && (G.splice(0, Q, X), A = G.join("/"));
|
|
27177
27191
|
}
|
|
27178
27192
|
return L = getOwn(i.pkgs, A), L || A;
|
|
27179
27193
|
}
|
|
@@ -27195,18 +27209,18 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27195
27209
|
return z > -1 && (E = A.substring(0, z), A = A.substring(z + 1, A.length)), [E, A];
|
|
27196
27210
|
}
|
|
27197
27211
|
function I(A, E, z, L) {
|
|
27198
|
-
var V, G, H, U, K = null,
|
|
27199
|
-
return A || (
|
|
27200
|
-
return b(
|
|
27201
|
-
}) :
|
|
27212
|
+
var V, G, H, U, K = null, Y = E ? E.name : null, X = A, Q = !0, ee = "";
|
|
27213
|
+
return A || (Q = !1, A = "_@r" + (g += 1)), U = v(A), K = U[0], A = U[1], K && (K = b(K, Y, L), G = getOwn(p, K)), A && (K ? z ? ee = A : G && G.normalize ? ee = G.normalize(A, function(J) {
|
|
27214
|
+
return b(J, Y, L);
|
|
27215
|
+
}) : ee = A.indexOf("!") === -1 ? b(A, Y, L) : A : (ee = b(A, Y, L), U = v(ee), K = U[0], ee = U[1], z = !0, V = o.nameToUrl(ee))), H = K && !G && !z ? "_unnormalized" + (f += 1) : "", {
|
|
27202
27216
|
prefix: K,
|
|
27203
|
-
name:
|
|
27217
|
+
name: ee,
|
|
27204
27218
|
parentMap: E,
|
|
27205
27219
|
unnormalized: !!H,
|
|
27206
27220
|
url: V,
|
|
27207
|
-
originalName:
|
|
27208
|
-
isDefine:
|
|
27209
|
-
id: (K ? K + "!" +
|
|
27221
|
+
originalName: X,
|
|
27222
|
+
isDefine: Q,
|
|
27223
|
+
id: (K ? K + "!" + ee : ee) + H
|
|
27210
27224
|
};
|
|
27211
27225
|
}
|
|
27212
27226
|
function F(A) {
|
|
@@ -27263,11 +27277,11 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27263
27277
|
var A, E, z = i.waitSeconds * 1e3, L = z && o.startTime + z < (/* @__PURE__ */ new Date()).getTime(), V = [], G = [], H = !1, U = !0;
|
|
27264
27278
|
if (!t) {
|
|
27265
27279
|
if (t = !0, eachProp(c, function(K) {
|
|
27266
|
-
var
|
|
27267
|
-
if (K.enabled && (
|
|
27280
|
+
var Y = K.map, X = Y.id;
|
|
27281
|
+
if (K.enabled && (Y.isDefine || G.push(K), !K.error)) {
|
|
27268
27282
|
if (!K.inited && L)
|
|
27269
|
-
y(
|
|
27270
|
-
else if (!K.inited && K.fetched &&
|
|
27283
|
+
y(X) ? (E = !0, H = !0) : (V.push(X), S(X));
|
|
27284
|
+
else if (!K.inited && K.fetched && Y.isDefine && (H = !0, !Y.prefix))
|
|
27271
27285
|
return U = !1;
|
|
27272
27286
|
}
|
|
27273
27287
|
}), L && V.length)
|
|
@@ -27349,12 +27363,12 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27349
27363
|
callPlugin: function() {
|
|
27350
27364
|
var A = this.map, E = A.id, z = I(A.prefix);
|
|
27351
27365
|
this.depMaps.push(z), w(z, "defined", bind(this, function(L) {
|
|
27352
|
-
var V, G, H, U = getOwn(h, this.map.id), K = this.map.name,
|
|
27366
|
+
var V, G, H, U = getOwn(h, this.map.id), K = this.map.name, Y = this.map.parentMap ? this.map.parentMap.name : null, X = o.makeRequire(A.parentMap, {
|
|
27353
27367
|
enableBuildCallback: !0
|
|
27354
27368
|
});
|
|
27355
27369
|
if (this.map.unnormalized) {
|
|
27356
|
-
L.normalize && (K = L.normalize(K, function(
|
|
27357
|
-
return b(
|
|
27370
|
+
L.normalize && (K = L.normalize(K, function(Q) {
|
|
27371
|
+
return b(Q, Y, !0);
|
|
27358
27372
|
}) || ""), G = I(
|
|
27359
27373
|
A.prefix + "!" + K,
|
|
27360
27374
|
this.map.parentMap,
|
|
@@ -27362,16 +27376,16 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27362
27376
|
), w(
|
|
27363
27377
|
G,
|
|
27364
27378
|
"defined",
|
|
27365
|
-
bind(this, function(
|
|
27379
|
+
bind(this, function(Q) {
|
|
27366
27380
|
this.map.normalizedMap = G, this.init([], function() {
|
|
27367
|
-
return
|
|
27381
|
+
return Q;
|
|
27368
27382
|
}, null, {
|
|
27369
27383
|
enabled: !0,
|
|
27370
27384
|
ignore: !0
|
|
27371
27385
|
});
|
|
27372
27386
|
})
|
|
27373
|
-
), H = getOwn(l, G.id), H && (this.depMaps.push(G), this.events.error && H.on("error", bind(this, function(
|
|
27374
|
-
this.emit("error",
|
|
27387
|
+
), H = getOwn(l, G.id), H && (this.depMaps.push(G), this.events.error && H.on("error", bind(this, function(Q) {
|
|
27388
|
+
this.emit("error", Q);
|
|
27375
27389
|
})), H.enable());
|
|
27376
27390
|
return;
|
|
27377
27391
|
}
|
|
@@ -27379,21 +27393,21 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27379
27393
|
this.map.url = o.nameToUrl(U), this.load();
|
|
27380
27394
|
return;
|
|
27381
27395
|
}
|
|
27382
|
-
V = bind(this, function(
|
|
27396
|
+
V = bind(this, function(Q) {
|
|
27383
27397
|
this.init([], function() {
|
|
27384
|
-
return
|
|
27398
|
+
return Q;
|
|
27385
27399
|
}, null, {
|
|
27386
27400
|
enabled: !0
|
|
27387
27401
|
});
|
|
27388
|
-
}), V.error = bind(this, function(
|
|
27389
|
-
this.inited = !0, this.error =
|
|
27390
|
-
|
|
27391
|
-
}), T(
|
|
27392
|
-
}), V.fromText = bind(this, function(
|
|
27393
|
-
var
|
|
27394
|
-
|
|
27402
|
+
}), V.error = bind(this, function(Q) {
|
|
27403
|
+
this.inited = !0, this.error = Q, Q.requireModules = [E], eachProp(l, function(ee) {
|
|
27404
|
+
ee.map.id.indexOf(E + "_unnormalized") === 0 && B(ee.map.id);
|
|
27405
|
+
}), T(Q);
|
|
27406
|
+
}), V.fromText = bind(this, function(Q, ee) {
|
|
27407
|
+
var J = A.name, Z = I(J), te = useInteractive;
|
|
27408
|
+
ee && (Q = ee), te && (useInteractive = !1), F(Z), hasProp(i.config, E) && (i.config[J] = i.config[E]);
|
|
27395
27409
|
try {
|
|
27396
|
-
req.exec(
|
|
27410
|
+
req.exec(Q);
|
|
27397
27411
|
} catch (re) {
|
|
27398
27412
|
return T(makeError(
|
|
27399
27413
|
"fromtexteval",
|
|
@@ -27402,8 +27416,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27402
27416
|
[E]
|
|
27403
27417
|
));
|
|
27404
27418
|
}
|
|
27405
|
-
|
|
27406
|
-
}), L.load(A.name,
|
|
27419
|
+
te && (useInteractive = !0), this.depMaps.push(Z), o.completeLoad(J), X([J], V);
|
|
27420
|
+
}), L.load(A.name, X, V, i);
|
|
27407
27421
|
})), o.enable(z, this), this.pluginMaps[z.id] = z;
|
|
27408
27422
|
},
|
|
27409
27423
|
enable: function() {
|
|
@@ -27602,9 +27616,9 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27602
27616
|
* internal API, not a public one. Use toUrl for the public API.
|
|
27603
27617
|
*/
|
|
27604
27618
|
nameToUrl: function(A, E, z) {
|
|
27605
|
-
var L, V, G, H, U, K,
|
|
27606
|
-
if (
|
|
27607
|
-
return o.nameToUrl(
|
|
27619
|
+
var L, V, G, H, U, K, Y, X = getOwn(i.pkgs, A);
|
|
27620
|
+
if (X && (A = X), Y = getOwn(h, A), Y)
|
|
27621
|
+
return o.nameToUrl(Y, E, z);
|
|
27608
27622
|
if (req.jsExtRegExp.test(A))
|
|
27609
27623
|
U = A + (E || "");
|
|
27610
27624
|
else {
|
|
@@ -28707,7 +28721,7 @@ const DataBlockResourceContext = createContext(null), RerenderDataBlockProvider
|
|
|
28707
28721
|
return /* @__PURE__ */ jsx(r.Component, { name: r.name, allowNull: o, children: e.children });
|
|
28708
28722
|
}, DataBlockProvider = withDynamicSchemaProps(
|
|
28709
28723
|
React.memo((e) => {
|
|
28710
|
-
const u = e, { collection: t, association: n, dataSource: o, children: r, hidden: a } = u, i =
|
|
28724
|
+
const u = e, { collection: t, association: n, dataSource: o, children: r, hidden: a } = u, i = W(u, ["collection", "association", "dataSource", "children", "hidden"]), { dn: l } = useDesignable(), c = useFieldSchema();
|
|
28711
28725
|
return a ? null : /* @__PURE__ */ jsx(VariableScope, { scopeId: c == null ? void 0 : c["x-uid"], type: "dataBlock", children: /* @__PURE__ */ jsx(
|
|
28712
28726
|
DataBlockContext.Provider,
|
|
28713
28727
|
{
|
|
@@ -29358,8 +29372,8 @@ const Markdown = connect(
|
|
|
29358
29372
|
};
|
|
29359
29373
|
Markdown.Void = MarkdownVoid;
|
|
29360
29374
|
const BlockItemCardContext = createContext({}), BlockItemCard = React.forwardRef((o, n) => {
|
|
29361
|
-
var r = o, { children: e } = r, t =
|
|
29362
|
-
const { token: a } = useToken(), S = t, { title: i, description: l } = S, c =
|
|
29375
|
+
var r = o, { children: e } = r, t = W(r, ["children"]);
|
|
29376
|
+
const { token: a } = useToken(), S = t, { title: i, description: l } = S, c = W(S, ["title", "description"]), u = useMemo(() => ({ marginBottom: a.marginBlock, height: "100%" }), [a.marginBlock]), [d, p] = useState(0), m = useRef(null), { t: h } = useTranslation(), g = useFieldSchema(), f = g == null ? void 0 : g["x-block-linkage-rules"];
|
|
29363
29377
|
useEffect(() => {
|
|
29364
29378
|
const y = setTimeout(() => {
|
|
29365
29379
|
if (m.current) {
|
|
@@ -29566,10 +29580,10 @@ const useCreateActionProps = () => {
|
|
|
29566
29580
|
skipValidator: N,
|
|
29567
29581
|
triggerWorkflows: M
|
|
29568
29582
|
} = (E = l == null ? void 0 : l["x-action-settings"]) != null ? E : {}, j = (z = a == null ? void 0 : a["x-component-props"]) == null ? void 0 : z.addChild, { successMessage: R } = D || {}, O = {}, $ = Object.keys(T).map((U) => q(this, null, function* () {
|
|
29569
|
-
const K = T[U],
|
|
29583
|
+
const K = T[U], Y = d(U);
|
|
29570
29584
|
if (isVariable$1(K)) {
|
|
29571
|
-
const { value:
|
|
29572
|
-
O[U] = transformVariableValue(
|
|
29585
|
+
const { value: X } = (yield C == null ? void 0 : C.parseVariable(K, b)) || {};
|
|
29586
|
+
O[U] = transformVariableValue(X, { targetCollectionField: Y });
|
|
29573
29587
|
} else
|
|
29574
29588
|
K !== "" && (O[U] = K);
|
|
29575
29589
|
}));
|
|
@@ -29796,7 +29810,7 @@ const useCreateActionProps = () => {
|
|
|
29796
29810
|
V.filter || (V.forceUpdate = !0);
|
|
29797
29811
|
try {
|
|
29798
29812
|
yield t.update(V);
|
|
29799
|
-
} catch (
|
|
29813
|
+
} catch (Y) {
|
|
29800
29814
|
} finally {
|
|
29801
29815
|
m.data.loading = !1;
|
|
29802
29816
|
}
|
|
@@ -29830,7 +29844,7 @@ const useCreateActionProps = () => {
|
|
|
29830
29844
|
F !== !0 && R === "customize:form:request" && (yield a.submit());
|
|
29831
29845
|
const O = T.headers ? JSON.parse(T.headers) : {}, $ = T.params ? JSON.parse(T.params) : {}, A = T.data ? JSON.parse(T.data) : {};
|
|
29832
29846
|
if (R === "customize:form:request" && ["POST", "PUT", "PATCH"].includes(T.method)) {
|
|
29833
|
-
const U = i.map((
|
|
29847
|
+
const U = i.map((Y) => Y.name), K = getFormValues({
|
|
29834
29848
|
filterByTk: n,
|
|
29835
29849
|
field: c,
|
|
29836
29850
|
form: a,
|
|
@@ -29883,8 +29897,8 @@ const useCreateActionProps = () => {
|
|
|
29883
29897
|
} = T || {}, A = {}, E = Object.keys(w).map((H) => q(this, null, function* () {
|
|
29884
29898
|
const U = w[H], K = d(H);
|
|
29885
29899
|
if (isVariable$1(U)) {
|
|
29886
|
-
const { value:
|
|
29887
|
-
A[H] = transformVariableValue(
|
|
29900
|
+
const { value: Y } = (yield b == null ? void 0 : b.parseVariable(U, S)) || {};
|
|
29901
|
+
A[H] = transformVariableValue(Y, { targetCollectionField: K });
|
|
29888
29902
|
} else
|
|
29889
29903
|
U !== "" && (A[H] = U);
|
|
29890
29904
|
}));
|
|
@@ -30259,8 +30273,8 @@ const useCreateActionProps = () => {
|
|
|
30259
30273
|
(R) => {
|
|
30260
30274
|
const { targets: O, uid: $ } = findFilterTargets(t);
|
|
30261
30275
|
o().forEach((A) => {
|
|
30262
|
-
var H, U, K,
|
|
30263
|
-
if (!O.find((
|
|
30276
|
+
var H, U, K, Y;
|
|
30277
|
+
if (!O.find((X) => X.uid === A.uid))
|
|
30264
30278
|
return;
|
|
30265
30279
|
const z = `${$}${t.name}`, L = ((H = A.service.params) == null ? void 0 : H[0]) || {};
|
|
30266
30280
|
(K = (U = A.service.params) == null ? void 0 : U[1]) != null && K.filters || _.set(A.service.params, "[1].filters", {});
|
|
@@ -30270,7 +30284,7 @@ const useCreateActionProps = () => {
|
|
|
30270
30284
|
[S]: R
|
|
30271
30285
|
};
|
|
30272
30286
|
else {
|
|
30273
|
-
if ((
|
|
30287
|
+
if ((Y = A.clearSelection) == null || Y.call(A), A.dataLoadingMode === "manual")
|
|
30274
30288
|
return A.clearData();
|
|
30275
30289
|
delete V[z];
|
|
30276
30290
|
}
|
|
@@ -30965,7 +30979,7 @@ const SortableProvider = (e) => {
|
|
|
30965
30979
|
return /* @__PURE__ */ jsx(SortableContext.Provider, { value: i, children: o });
|
|
30966
30980
|
}, getComputedColor = (e) => new TinyColor(e).setAlpha(0.15).toHex8String(), Sortable = (e) => {
|
|
30967
30981
|
var C, b;
|
|
30968
|
-
const f = e, { component: t, overStyle: n, style: o, children: r, openMode: a } = f, i =
|
|
30982
|
+
const f = e, { component: t, overStyle: n, style: o, children: r, openMode: a } = f, i = W(f, ["component", "overStyle", "style", "children", "openMode"]), { token: l } = useToken$1(), { draggable: c, droppable: u } = useContext(SortableContext), { isOver: d, setNodeRef: p } = u, m = x({}, o), h = useFieldSchema(), g = (h == null ? void 0 : h["x-component"]) === "Action.Link" || t === "a";
|
|
30969
30983
|
return d && ((C = c == null ? void 0 : c.active) == null ? void 0 : C.id) !== ((b = u == null ? void 0 : u.over) == null ? void 0 : b.id) && (m[g ? "color" : "background"] = getComputedColor(l.colorSettings), Object.assign(m, n)), React.createElement(
|
|
30970
30984
|
t || "div",
|
|
30971
30985
|
P(x({
|
|
@@ -30986,7 +31000,7 @@ const SortableProvider = (e) => {
|
|
|
30986
31000
|
return e.id ? e.id : (n = t.address) == null ? void 0 : n.toString();
|
|
30987
31001
|
}, InternalSortableItem = observer$1(
|
|
30988
31002
|
(e) => {
|
|
30989
|
-
const l = useSortableItemProps(e), { schema: t, id: n, eid: o, removeParentsIfNoChildren: r } = l, a =
|
|
31003
|
+
const l = useSortableItemProps(e), { schema: t, id: n, eid: o, removeParentsIfNoChildren: r } = l, a = W(l, ["schema", "id", "eid", "removeParentsIfNoChildren"]), i = useMemo(() => {
|
|
30990
31004
|
var c, u, d;
|
|
30991
31005
|
return {
|
|
30992
31006
|
insertAdjacent: "afterEnd",
|
|
@@ -30998,7 +31012,7 @@ const SortableProvider = (e) => {
|
|
|
30998
31012
|
},
|
|
30999
31013
|
{ displayName: "InternalSortableItem" }
|
|
31000
31014
|
), SortableItem = React.memo((e) => {
|
|
31001
|
-
const r = e, { component: t } = r, n =
|
|
31015
|
+
const r = e, { component: t } = r, n = W(r, ["component"]), { designable: o } = useDesignable();
|
|
31002
31016
|
return o ? /* @__PURE__ */ jsx(InternalSortableItem, x({}, e)) : React.createElement(
|
|
31003
31017
|
t || "div",
|
|
31004
31018
|
_.omit(n, ["children", "schema", "overStyle", "openMode", "id", "eid", "removeParentsIfNoChildren"]),
|
|
@@ -31070,7 +31084,7 @@ const DragHandler = (e) => {
|
|
|
31070
31084
|
{ value: "lastYear", label: '{{t("Last Year")}}' },
|
|
31071
31085
|
{ value: "nextYear", label: '{{t("Next Year")}}' }
|
|
31072
31086
|
], SmartDatePicker = (e) => {
|
|
31073
|
-
const r = e, { isRange: t, defaultValue: n } = r, o =
|
|
31087
|
+
const r = e, { isRange: t, defaultValue: n } = r, o = W(r, ["isRange", "defaultValue"]);
|
|
31074
31088
|
return t ? /* @__PURE__ */ jsx(DatePicker.RangePicker, x({}, o)) : /* @__PURE__ */ jsx(DatePicker.FilterWithPicker, x({}, o));
|
|
31075
31089
|
}, DateFilterDynamicComponent = (e) => {
|
|
31076
31090
|
const { value: t, onChange: n } = e, o = useCompile(), { t: r } = useTranslation(), { token: a } = theme.useToken(), [i, l] = useState(!1), c = (d) => {
|
|
@@ -33606,7 +33620,7 @@ const actionSettings = new SchemaSettings({
|
|
|
33606
33620
|
linkageRulesProps: a,
|
|
33607
33621
|
schemaSettings: i = "ActionSettings",
|
|
33608
33622
|
enableDrag: l = !0
|
|
33609
|
-
} = f, c =
|
|
33623
|
+
} = f, c = W(f, [
|
|
33610
33624
|
"modalTip",
|
|
33611
33625
|
"linkageAction",
|
|
33612
33626
|
"removeButtonProps",
|
|
@@ -38125,9 +38139,9 @@ const enabledIndexColumn$1 = {
|
|
|
38125
38139
|
}), U["x-component-props"] = n["x-component-props"], o.componentProps = n["x-component-props"];
|
|
38126
38140
|
const K = o.path.entire.split(".");
|
|
38127
38141
|
K.pop();
|
|
38128
|
-
const
|
|
38129
|
-
o.query(`${
|
|
38130
|
-
|
|
38142
|
+
const Y = K.join(".");
|
|
38143
|
+
o.query(`${Y}.*[0:].${n.name}`).forEach((X) => {
|
|
38144
|
+
X.props.name === n.name && X.setComponentProps({
|
|
38131
38145
|
_maxDate: F(H == null ? void 0 : H._maxDate),
|
|
38132
38146
|
_minDate: F(H == null ? void 0 : H._minDate)
|
|
38133
38147
|
});
|
|
@@ -39548,7 +39562,7 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
39548
39562
|
params: {
|
|
39549
39563
|
appends: S == null ? void 0 : S.appends
|
|
39550
39564
|
}
|
|
39551
|
-
}).then((
|
|
39565
|
+
}).then((Y) => (clearRequested(U), Y.data.data));
|
|
39552
39566
|
return stashRequested(U, K), K;
|
|
39553
39567
|
}
|
|
39554
39568
|
return H == null ? void 0 : H[A];
|
|
@@ -40122,7 +40136,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40122
40136
|
}
|
|
40123
40137
|
}), handleError = console.log, Action = withDynamicSchemaProps(
|
|
40124
40138
|
React.memo((e) => {
|
|
40125
|
-
var
|
|
40139
|
+
var Y;
|
|
40126
40140
|
const K = useProps(e), {
|
|
40127
40141
|
popover: t,
|
|
40128
40142
|
containerRefKey: n,
|
|
@@ -40142,7 +40156,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40142
40156
|
onMouseEnter: C,
|
|
40143
40157
|
refreshDataBlockRequest: b,
|
|
40144
40158
|
confirmTitle: S
|
|
40145
|
-
} = K, y =
|
|
40159
|
+
} = K, y = W(K, [
|
|
40146
40160
|
"popover",
|
|
40147
40161
|
"containerRefKey",
|
|
40148
40162
|
"component",
|
|
@@ -40162,31 +40176,31 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40162
40176
|
"onMouseEnter",
|
|
40163
40177
|
"refreshDataBlockRequest",
|
|
40164
40178
|
"confirmTitle"
|
|
40165
|
-
]), v = useDesigner(), I = useField(), F = useFieldSchema(), w = useCompile(), T = useCollectionRecordData(), D = w((
|
|
40179
|
+
]), v = useDesigner(), I = useField(), F = useFieldSchema(), w = useCompile(), T = useCollectionRecordData(), D = w((Y = F["x-component-props"]) == null ? void 0 : Y.confirm) || g, B = useMemo(
|
|
40166
40180
|
() => {
|
|
40167
|
-
var
|
|
40168
|
-
return ((
|
|
40181
|
+
var X;
|
|
40182
|
+
return ((X = F == null ? void 0 : F["x-linkage-rules"]) == null ? void 0 : X.filter((Q) => !Q.disabled)) || [];
|
|
40169
40183
|
},
|
|
40170
40184
|
[F == null ? void 0 : F["x-linkage-rules"]]
|
|
40171
40185
|
), { designable: N } = useDesignable(), M = useComponent(o) || o, j = useVariables$1(), R = useLocalVariables$1(), { visibleWithURL: O, setVisibleWithURL: $ } = usePopupUtils(), { setSubmitted: A } = useActionContext(), { getAriaLabel: E } = useGetAriaLabelOfAction(l), z = useCollectionParentRecordData(), L = useApp(), { getAllDataBlocks: V } = useAllDataBlocks(), G = useForm();
|
|
40172
40186
|
useEffect(() => {
|
|
40173
40187
|
I.stateOfLinkageRules && setInitialActionState(I);
|
|
40174
|
-
const
|
|
40188
|
+
const X = uid(), Q = [];
|
|
40175
40189
|
return setTimeout(() => {
|
|
40176
|
-
G.addEffects(
|
|
40177
|
-
forEachLinkageRule(B, (
|
|
40178
|
-
|
|
40190
|
+
G.addEffects(X, () => {
|
|
40191
|
+
forEachLinkageRule(B, (ee, J) => {
|
|
40192
|
+
Q.push(
|
|
40179
40193
|
reaction(
|
|
40180
40194
|
() => [getVariableValuesInCondition({ linkageRules: B, localVariables: R })].map((re) => JSON.stringify(re)).join(","),
|
|
40181
40195
|
() => {
|
|
40182
40196
|
I.stateOfLinkageRules = {}, linkageAction(
|
|
40183
40197
|
{
|
|
40184
|
-
operator:
|
|
40198
|
+
operator: ee.operator,
|
|
40185
40199
|
field: I,
|
|
40186
|
-
condition:
|
|
40200
|
+
condition: J.condition,
|
|
40187
40201
|
variables: j,
|
|
40188
40202
|
localVariables: R,
|
|
40189
|
-
conditionType:
|
|
40203
|
+
conditionType: J.conditionType,
|
|
40190
40204
|
variableNameOfLeftCondition: "$nRecord"
|
|
40191
40205
|
},
|
|
40192
40206
|
L.jsonLogic
|
|
@@ -40198,27 +40212,27 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40198
40212
|
});
|
|
40199
40213
|
});
|
|
40200
40214
|
}), () => {
|
|
40201
|
-
G.removeEffects(
|
|
40202
|
-
|
|
40215
|
+
G.removeEffects(X), Q.forEach((ee) => {
|
|
40216
|
+
ee();
|
|
40203
40217
|
});
|
|
40204
40218
|
};
|
|
40205
40219
|
}, [B, T]);
|
|
40206
40220
|
const H = useCallback(
|
|
40207
|
-
(
|
|
40208
|
-
C == null || C(
|
|
40221
|
+
(X) => {
|
|
40222
|
+
C == null || C(X);
|
|
40209
40223
|
},
|
|
40210
40224
|
[C]
|
|
40211
|
-
), U = useMemo(() => c && ((
|
|
40212
|
-
var
|
|
40213
|
-
yield c == null ? void 0 : c(
|
|
40214
|
-
const
|
|
40215
|
-
|
|
40225
|
+
), U = useMemo(() => c && ((X, Q) => q(void 0, null, function* () {
|
|
40226
|
+
var J, Z;
|
|
40227
|
+
yield c == null ? void 0 : c(X, Q);
|
|
40228
|
+
const ee = ((Z = (J = F["x-action-settings"]) == null ? void 0 : J.onSuccess) == null ? void 0 : Z.blocksToRefresh) || [];
|
|
40229
|
+
ee.length > 0 && V().forEach((te) => {
|
|
40216
40230
|
var re;
|
|
40217
|
-
if (
|
|
40231
|
+
if (ee.includes(te.uid))
|
|
40218
40232
|
try {
|
|
40219
|
-
(re =
|
|
40220
|
-
} catch (
|
|
40221
|
-
console.error("Failed to refresh block:",
|
|
40233
|
+
(re = te.service) == null || re.refresh();
|
|
40234
|
+
} catch (se) {
|
|
40235
|
+
console.error("Failed to refresh block:", te.uid, se);
|
|
40222
40236
|
}
|
|
40223
40237
|
});
|
|
40224
40238
|
})), [c, F, V]);
|
|
@@ -40257,8 +40271,8 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40257
40271
|
}),
|
|
40258
40272
|
{ displayName: "Action" }
|
|
40259
40273
|
), InternalAction = observer$1(function e(t) {
|
|
40260
|
-
var
|
|
40261
|
-
const
|
|
40274
|
+
var xe, Ce, he, fe, ge;
|
|
40275
|
+
const me = t, {
|
|
40262
40276
|
containerRefKey: n,
|
|
40263
40277
|
fieldSchema: o,
|
|
40264
40278
|
designable: r,
|
|
@@ -40286,7 +40300,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40286
40300
|
setSubmitted: B,
|
|
40287
40301
|
getAriaLabel: N,
|
|
40288
40302
|
parentRecordData: M
|
|
40289
|
-
} =
|
|
40303
|
+
} = me, j = W(me, [
|
|
40290
40304
|
"containerRefKey",
|
|
40291
40305
|
"fieldSchema",
|
|
40292
40306
|
"designable",
|
|
@@ -40314,24 +40328,24 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40314
40328
|
"setSubmitted",
|
|
40315
40329
|
"getAriaLabel",
|
|
40316
40330
|
"parentRecordData"
|
|
40317
|
-
]), [R, O] = useState(!1), { wrapSSR: $, componentCls: A, hashId: E } = useStyles$8(), [z, L] = useState(!1), V = o["x-toolbar-props"] || o["x-designer-props"], G = (
|
|
40318
|
-
run:
|
|
40319
|
-
element:
|
|
40320
|
-
disabled:
|
|
40321
|
-
loading:
|
|
40322
|
-
} = (F == null ? void 0 : F(w)) || {},
|
|
40323
|
-
var
|
|
40331
|
+
]), [R, O] = useState(!1), { wrapSSR: $, componentCls: A, hashId: E } = useStyles$8(), [z, L] = useState(!1), V = o["x-toolbar-props"] || o["x-designer-props"], G = (xe = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : xe.openMode, H = (Ce = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : Ce.openSize, U = (he = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : he.refreshDataBlockRequest, { modal: K } = App.useApp(), Y = useForm(), X = useACLActionParamsContext(), {
|
|
40332
|
+
run: Q,
|
|
40333
|
+
element: ee,
|
|
40334
|
+
disabled: J,
|
|
40335
|
+
loading: Z
|
|
40336
|
+
} = (F == null ? void 0 : F(w)) || {}, te = Y.disabled || a.disabled || ((fe = a.data) == null ? void 0 : fe.disabled) || I || J, re = useMemo(() => {
|
|
40337
|
+
var pe;
|
|
40324
40338
|
return P(x({}, v), {
|
|
40325
|
-
opacity: r && (((
|
|
40326
|
-
color:
|
|
40339
|
+
opacity: r && (((pe = a == null ? void 0 : a.data) == null ? void 0 : pe.hidden) || !X) && 0.1,
|
|
40340
|
+
color: te ? "rgba(0, 0, 0, 0.25)" : v == null ? void 0 : v.color
|
|
40327
40341
|
});
|
|
40328
|
-
}, [
|
|
40342
|
+
}, [X, r, (ge = a == null ? void 0 : a.data) == null ? void 0 : ge.hidden, v, te]), se = {
|
|
40329
40343
|
designable: r,
|
|
40330
40344
|
field: a,
|
|
40331
|
-
aclCtx:
|
|
40345
|
+
aclCtx: X,
|
|
40332
40346
|
icon: i,
|
|
40333
|
-
loading: typeof
|
|
40334
|
-
disabled:
|
|
40347
|
+
loading: typeof Z == "boolean" ? Z : l,
|
|
40348
|
+
disabled: te,
|
|
40335
40349
|
buttonStyle: re,
|
|
40336
40350
|
handleMouseEnter: c,
|
|
40337
40351
|
tarComponent: u,
|
|
@@ -40347,24 +40361,24 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40347
40361
|
refreshDataBlockRequest: U,
|
|
40348
40362
|
fieldSchema: o,
|
|
40349
40363
|
setVisible: O,
|
|
40350
|
-
run:
|
|
40364
|
+
run: Q,
|
|
40351
40365
|
confirm: g,
|
|
40352
40366
|
modal: K,
|
|
40353
40367
|
setSubmitted: B,
|
|
40354
40368
|
confirmTitle: f,
|
|
40355
40369
|
title: y
|
|
40356
|
-
},
|
|
40357
|
-
(
|
|
40358
|
-
O == null || O(
|
|
40370
|
+
}, ue = useCallback(
|
|
40371
|
+
(pe) => {
|
|
40372
|
+
O == null || O(pe), D == null || D(pe);
|
|
40359
40373
|
},
|
|
40360
40374
|
[D]
|
|
40361
40375
|
);
|
|
40362
|
-
let
|
|
40376
|
+
let le = /* @__PURE__ */ jsx(PopupVisibleProvider, { visible: !1, children: /* @__PURE__ */ jsxs(
|
|
40363
40377
|
ActionContextProvider,
|
|
40364
40378
|
{
|
|
40365
|
-
button: RenderButton(
|
|
40379
|
+
button: RenderButton(se),
|
|
40366
40380
|
visible: R || T,
|
|
40367
|
-
setVisible:
|
|
40381
|
+
setVisible: ue,
|
|
40368
40382
|
formValueChanged: z,
|
|
40369
40383
|
setFormValueChanged: L,
|
|
40370
40384
|
openMode: G,
|
|
@@ -40374,13 +40388,13 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40374
40388
|
setSubmitted: B,
|
|
40375
40389
|
children: [
|
|
40376
40390
|
C && /* @__PURE__ */ jsx(NocoBaseRecursionField, { basePath: a.address, onlyRenderProperties: !0, schema: o }),
|
|
40377
|
-
!C && /* @__PURE__ */ jsx(RenderButton, x({},
|
|
40391
|
+
!C && /* @__PURE__ */ jsx(RenderButton, x({}, se)),
|
|
40378
40392
|
/* @__PURE__ */ jsx(VariablePopupRecordProvider, { children: !C && t.children }),
|
|
40379
|
-
|
|
40393
|
+
ee
|
|
40380
40394
|
]
|
|
40381
40395
|
}
|
|
40382
40396
|
) });
|
|
40383
|
-
return isBulkEditAction(o) && (
|
|
40397
|
+
return isBulkEditAction(o) && (le = /* @__PURE__ */ jsx(TabsContextProvider, { children: le })), $(b ? /* @__PURE__ */ jsx(TreeRecordProvider, { parent: S, children: le }) : le);
|
|
40384
40398
|
});
|
|
40385
40399
|
InternalAction.displayName = "InternalAction";
|
|
40386
40400
|
Action.Popover = function e(t) {
|
|
@@ -40461,23 +40475,23 @@ const RenderButton = ({
|
|
|
40461
40475
|
localVariables: $
|
|
40462
40476
|
}, V = useCallback(
|
|
40463
40477
|
(G, H = !0) => q(void 0, null, function* () {
|
|
40464
|
-
var
|
|
40478
|
+
var Y;
|
|
40465
40479
|
if (H && isPortalInBody(G.target))
|
|
40466
40480
|
return;
|
|
40467
40481
|
G.preventDefault(), G.stopPropagation();
|
|
40468
40482
|
const U = yield getVariableValue(M(F == null ? void 0 : F.title, { title: E(y.title) }), L), K = yield getVariableValue(M(F == null ? void 0 : F.content, { title: E(y.title) }), L);
|
|
40469
40483
|
if (!a && n) {
|
|
40470
|
-
const
|
|
40484
|
+
const X = () => {
|
|
40471
40485
|
b ? b(G, () => {
|
|
40472
|
-
var
|
|
40473
|
-
S !== !1 && (T == null || T(!0), (
|
|
40486
|
+
var Q, ee;
|
|
40487
|
+
S !== !1 && (T == null || T(!0), (ee = (Q = N()) == null ? void 0 : Q.refresh) == null || ee.call(Q));
|
|
40474
40488
|
}) : isBulkEditAction(y) || !j() ? (v(!0), I == null || I()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ? A.current() : (v(!0), I == null || I());
|
|
40475
40489
|
};
|
|
40476
|
-
(F == null ? void 0 : F.enable) !== !1 && (F != null && F.content) ? (yield (
|
|
40490
|
+
(F == null ? void 0 : F.enable) !== !1 && (F != null && F.content) ? (yield (Y = z == null ? void 0 : z.submit) == null ? void 0 : Y.call(z), w.confirm({
|
|
40477
40491
|
title: M(U, { title: D || B || (t == null ? void 0 : t.title) }),
|
|
40478
40492
|
content: M(K, { title: D || B || (t == null ? void 0 : t.title) }),
|
|
40479
|
-
onOk:
|
|
40480
|
-
})) :
|
|
40493
|
+
onOk: X
|
|
40494
|
+
})) : X();
|
|
40481
40495
|
}
|
|
40482
40496
|
}),
|
|
40483
40497
|
[
|
|
@@ -40550,7 +40564,7 @@ const RenderButtonInner = observer$1(
|
|
|
40550
40564
|
title: S,
|
|
40551
40565
|
isLink: y,
|
|
40552
40566
|
onlyIcon: v
|
|
40553
|
-
} = O, I =
|
|
40567
|
+
} = O, I = W(O, [
|
|
40554
40568
|
"designable",
|
|
40555
40569
|
"field",
|
|
40556
40570
|
"aclCtx",
|
|
@@ -40587,7 +40601,7 @@ const RenderButtonInner = observer$1(
|
|
|
40587
40601
|
const T = useMemo(
|
|
40588
40602
|
() => React.forwardRef(
|
|
40589
40603
|
(K, U) => {
|
|
40590
|
-
var
|
|
40604
|
+
var Y = K, { component: z = p || Button, icon: L, onlyIcon: V, children: G } = Y, H = W(Y, ["component", "icon", "onlyIcon", "children"]);
|
|
40591
40605
|
return /* @__PURE__ */ jsxs(z, P(x({ ref: U }, H), { children: [
|
|
40592
40606
|
v ? /* @__PURE__ */ jsx(Tooltip, { title: H.title, children: /* @__PURE__ */ jsx("span", { style: { padding: 3 }, children: L && typeof L == "string" ? /* @__PURE__ */ jsx(Icon, { type: L }) : L }) }) : /* @__PURE__ */ jsx("span", { style: { paddingRight: 3 }, children: L && typeof L == "string" ? /* @__PURE__ */ jsx(Icon, { type: L }) : L }),
|
|
40593
40607
|
v ? G[1] : G
|
|
@@ -40598,7 +40612,7 @@ const RenderButtonInner = observer$1(
|
|
|
40598
40612
|
);
|
|
40599
40613
|
if (!t && (($ = n == null ? void 0 : n.data) != null && $.hidden || !o))
|
|
40600
40614
|
return null;
|
|
40601
|
-
const D = S != null ? S : n == null ? void 0 : n.title, B = typeof D == "string" ? F(D, { ns: NAMESPACE_UI_SCHEMA }) : D, A = l, { opacity: N } = A, M =
|
|
40615
|
+
const D = S != null ? S : n == null ? void 0 : n.title, B = typeof D == "string" ? F(D, { ns: NAMESPACE_UI_SCHEMA }) : D, A = l, { opacity: N } = A, M = W(A, ["opacity"]), j = y && N ? { opacity: N } : void 0, R = v || p ? T : p || Button;
|
|
40602
40616
|
return /* @__PURE__ */ jsxs(
|
|
40603
40617
|
SortableItem,
|
|
40604
40618
|
P(x({
|
|
@@ -40627,14 +40641,14 @@ RenderButtonInner.displayName = "RenderButtonInner";
|
|
|
40627
40641
|
const ActionBarContext = React.createContext({
|
|
40628
40642
|
container: null
|
|
40629
40643
|
}), ActionBarProvider = (n) => {
|
|
40630
|
-
var o = n, { children: e } = o, t =
|
|
40644
|
+
var o = n, { children: e } = o, t = W(o, ["children"]);
|
|
40631
40645
|
return /* @__PURE__ */ jsx(ActionBarContext.Provider, { value: t, children: e });
|
|
40632
40646
|
}, useActionBarContext = () => useContext(ActionBarContext), Portal = (e) => {
|
|
40633
40647
|
const t = useFieldSchema(), { container: n, parentComponents: o = ["BlockItem", "CardItem"] } = useActionBarContext();
|
|
40634
40648
|
return /* @__PURE__ */ jsx(Fragment$1, { children: n && o.includes(t.parent["x-component"]) ? createPortal(e.children, n) : e.children });
|
|
40635
40649
|
}, InternalActionBar = (e) => {
|
|
40636
40650
|
var p;
|
|
40637
|
-
const { forceProps: t = {} } = useActionBarContext(), d = x(x({}, useProps(e)), t), { layout: n = "two-columns", style: o, spaceProps: r } = d, a =
|
|
40651
|
+
const { forceProps: t = {} } = useActionBarContext(), d = x(x({}, useProps(e)), t), { layout: n = "two-columns", style: o, spaceProps: r } = d, a = W(d, ["layout", "style", "spaceProps"]), i = useFieldSchema(), { render: l } = useSchemaInitializerRender(i["x-initializer"], i["x-initializer-props"]), { designable: c } = useDesignable();
|
|
40638
40652
|
if (n === "one-column")
|
|
40639
40653
|
return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(DndContext, { children: /* @__PURE__ */ jsxs(
|
|
40640
40654
|
"div",
|
|
@@ -40706,10 +40720,10 @@ const ActionBarContext = React.createContext({
|
|
|
40706
40720
|
}
|
|
40707
40721
|
});
|
|
40708
40722
|
}, FormComponent$1 = (e) => {
|
|
40709
|
-
const l = e, { form: t, children: n } = l, o =
|
|
40723
|
+
const l = e, { form: t, children: n } = l, o = W(l, ["form", "children"]), r = useField(), a = useFieldSchema(), i = useAttach(t.createVoidField(P(x({}, r.props), { basePath: "" })));
|
|
40710
40724
|
return /* @__PURE__ */ jsx(FieldContext.Provider, { value: void 0, children: /* @__PURE__ */ jsx(FormContext.Provider, { value: t, children: /* @__PURE__ */ jsx(FormLayout, P(x({ layout: "vertical" }, o), { children: /* @__PURE__ */ jsx(NocoBaseRecursionField, { basePath: i.address, schema: a, onlyRenderProperties: !0 }) })) }) });
|
|
40711
40725
|
}, Def$1 = (e) => e.children, FormDecorator$1 = (e) => {
|
|
40712
|
-
const u = e, { form: t, children: n, disabled: o } = u, r =
|
|
40726
|
+
const u = e, { form: t, children: n, disabled: o } = u, r = W(u, ["form", "children", "disabled"]), a = useField(), i = useFieldSchema(), l = useAttach(t.createVoidField(P(x({}, a.props), { basePath: "" }))), c = useComponent(i["x-component"], Def$1);
|
|
40713
40727
|
return useEffect(() => {
|
|
40714
40728
|
t.disabled = o || a.disabled;
|
|
40715
40729
|
}, [o, a.disabled]), /* @__PURE__ */ jsx(ConfigProvider, { componentDisabled: o, children: /* @__PURE__ */ jsx(FieldContext.Provider, { value: void 0, children: /* @__PURE__ */ jsx(FormContext.Provider, { value: t, children: /* @__PURE__ */ jsx(FormLayout, P(x({ layout: "vertical" }, r), { children: /* @__PURE__ */ jsx(FieldContext.Provider, { value: l, children: /* @__PURE__ */ jsx(c, P(x({}, a.componentProps), { children: /* @__PURE__ */ jsx(NocoBaseRecursionField, { basePath: l.address, schema: i, onlyRenderProperties: !0 }) })) }) })) }) }) });
|
|
@@ -40722,7 +40736,7 @@ const ActionBarContext = React.createContext({
|
|
|
40722
40736
|
FormBlockContext.displayName = "FormBlockContext";
|
|
40723
40737
|
const Form$1 = observer$1(
|
|
40724
40738
|
(e) => {
|
|
40725
|
-
const p = e, { request: t, effects: n, initialValue: o, useValues: r = useDefaultValues } = p, a =
|
|
40739
|
+
const p = e, { request: t, effects: n, initialValue: o, useValues: r = useDefaultValues } = p, a = W(p, ["request", "effects", "initialValue", "useValues"]), i = useFieldSchema(), l = useField(), c = useMemo(() => createForm({ effects: n }), []), u = r(
|
|
40726
40740
|
{
|
|
40727
40741
|
uid: i["x-uid"],
|
|
40728
40742
|
onSuccess(h) {
|
|
@@ -40885,7 +40899,7 @@ const ReadPrettyInternal = observer$1(
|
|
|
40885
40899
|
},
|
|
40886
40900
|
{ displayName: "SelectReadPretty" }
|
|
40887
40901
|
), ReadPretty$b = withPopupWrapper(ReadPrettyInternal), isEmptyObject = (e) => !isValid(e) || typeof e == "object" && Object.keys(e).length === 0, ObjectSelect = (e) => {
|
|
40888
|
-
const h = e, { value: t, options: n, onChange: o, fieldNames: r, mode: a, loading: i, rawOptions: l, defaultValue: c } = h, u =
|
|
40902
|
+
const h = e, { value: t, options: n, onChange: o, fieldNames: r, mode: a, loading: i, rawOptions: l, defaultValue: c } = h, u = W(h, ["value", "options", "onChange", "fieldNames", "mode", "loading", "rawOptions", "defaultValue"]), d = isDesktop ? "" : fixKeyboardIssue, p = isDesktop ? void 0 : "topLeft", m = (g) => {
|
|
40889
40903
|
var b;
|
|
40890
40904
|
if (isEmptyObject(g))
|
|
40891
40905
|
return;
|
|
@@ -40955,7 +40969,7 @@ const ReadPrettyInternal = observer$1(
|
|
|
40955
40969
|
}
|
|
40956
40970
|
`, InternalSelect = connect(
|
|
40957
40971
|
(e) => {
|
|
40958
|
-
const m = e, { objectValue: t, loading: n, value: o, rawOptions: r, defaultValue: a } = m, i =
|
|
40972
|
+
const m = e, { objectValue: t, loading: n, value: o, rawOptions: r, defaultValue: a } = m, i = W(m, ["objectValue", "loading", "value", "rawOptions", "defaultValue"]), l = useCompile(), c = isDesktop ? "" : fixKeyboardIssue, u = isDesktop ? void 0 : "topLeft";
|
|
40959
40973
|
let d = e.multiple ? "multiple" : e.mode;
|
|
40960
40974
|
if (d && !["multiple", "tags"].includes(d) && (d = void 0), useEffect(() => {
|
|
40961
40975
|
var h;
|
|
@@ -41058,8 +41072,8 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
41058
41072
|
), EMPTY$1 = "N/A", InternalRemoteSelect = withDynamicSchemaProps(
|
|
41059
41073
|
connect(
|
|
41060
41074
|
(e) => {
|
|
41061
|
-
var
|
|
41062
|
-
const
|
|
41075
|
+
var Q, ee;
|
|
41076
|
+
const X = e, {
|
|
41063
41077
|
fieldNames: t = {},
|
|
41064
41078
|
service: n = {},
|
|
41065
41079
|
wait: o = 300,
|
|
@@ -41072,10 +41086,10 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
41072
41086
|
CustomDropdownRender: d,
|
|
41073
41087
|
optionFilter: p,
|
|
41074
41088
|
dataSource: m,
|
|
41075
|
-
toOptionsItem: h = (
|
|
41089
|
+
toOptionsItem: h = (J) => J,
|
|
41076
41090
|
popupMatchSelectWidth: g = !1,
|
|
41077
41091
|
onSuccess: f
|
|
41078
|
-
} =
|
|
41092
|
+
} = X, C = W(X, [
|
|
41079
41093
|
"fieldNames",
|
|
41080
41094
|
"service",
|
|
41081
41095
|
"wait",
|
|
@@ -41091,39 +41105,39 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
41091
41105
|
"toOptionsItem",
|
|
41092
41106
|
"popupMatchSelectWidth",
|
|
41093
41107
|
"onSuccess"
|
|
41094
|
-
]), b = useDataSourceKey(), S = useDataSourceHeaders(m || b), y = useRef(!1), v = useFieldSchema(), I = ((
|
|
41095
|
-
var
|
|
41108
|
+
]), b = useDataSourceKey(), S = useDataSourceHeaders(m || b), y = useRef(!1), v = useFieldSchema(), I = ((Q = v["x-component-props"]) == null ? void 0 : Q.addMode) === "quickAdd", { getField: F } = useCollection_deprecated(), w = useRef(null), { getCollectionJoinField: T, getInterface: D } = useCollectionManager_deprecated(), B = v["x-collection-field"] || v.name, N = F(B) || T(B), M = u || (N == null ? void 0 : N.target) && (t == null ? void 0 : t.label) && T(`${N.target}.${t.label}`), j = useMemo(() => {
|
|
41109
|
+
var J;
|
|
41096
41110
|
if (M != null && M.interface) {
|
|
41097
|
-
const
|
|
41098
|
-
return M.type === "string" || M.dataType === "string" ? "$includes" :
|
|
41111
|
+
const Z = D(M.interface), te = ((J = Z == null ? void 0 : Z.filterable) == null ? void 0 : J.operators[0].value) || "$includes";
|
|
41112
|
+
return M.type === "string" || M.dataType === "string" ? "$includes" : te;
|
|
41099
41113
|
}
|
|
41100
41114
|
return "$includes";
|
|
41101
41115
|
}, [M]), R = useCompile(), O = useCallback(
|
|
41102
|
-
(
|
|
41116
|
+
(J) => {
|
|
41103
41117
|
try {
|
|
41104
|
-
return
|
|
41105
|
-
var
|
|
41106
|
-
let
|
|
41107
|
-
if ((
|
|
41108
|
-
if (Array.isArray(
|
|
41109
|
-
|
|
41110
|
-
const
|
|
41111
|
-
return
|
|
41118
|
+
return J.filter((Z) => ["number", "string"].includes(typeof Z[t.value]) || !Z[t.value]).map((Z) => {
|
|
41119
|
+
var re;
|
|
41120
|
+
let te = R(Z[t.label]);
|
|
41121
|
+
if ((re = M == null ? void 0 : M.uiSchema) != null && re.enum)
|
|
41122
|
+
if (Array.isArray(te))
|
|
41123
|
+
te = te.map((se, ue) => {
|
|
41124
|
+
const le = M.uiSchema.enum.find((me) => me.value === se);
|
|
41125
|
+
return le ? /* @__PURE__ */ jsx(Tag, { role: "button", color: le.color, style: { marginRight: 3 }, children: (le == null ? void 0 : le.label) || se }, ue) : /* @__PURE__ */ jsx(Tag, { role: "button", children: se }, se);
|
|
41112
41126
|
}).reverse();
|
|
41113
41127
|
else {
|
|
41114
|
-
const
|
|
41115
|
-
|
|
41128
|
+
const se = M.uiSchema.enum.find((ue) => ue.value === te);
|
|
41129
|
+
se && (te = /* @__PURE__ */ jsx(Tag, { role: "button", color: se.color, children: se.label }));
|
|
41116
41130
|
}
|
|
41117
|
-
return (M == null ? void 0 : M.type) === "date" && (
|
|
41118
|
-
[t.label]:
|
|
41119
|
-
[t.value]:
|
|
41120
|
-
}) : P(x({}, omit(
|
|
41121
|
-
[t.label]:
|
|
41122
|
-
[t.value]:
|
|
41131
|
+
return (M == null ? void 0 : M.type) === "date" && (te = dayjs(te).format("YYYY-MM-DD")), c ? c({
|
|
41132
|
+
[t.label]: te || EMPTY$1,
|
|
41133
|
+
[t.value]: Z[t.value]
|
|
41134
|
+
}) : P(x({}, omit(Z, "style")), {
|
|
41135
|
+
[t.label]: te || EMPTY$1,
|
|
41136
|
+
[t.value]: Z[t.value]
|
|
41123
41137
|
});
|
|
41124
41138
|
}).filter(Boolean);
|
|
41125
|
-
} catch (
|
|
41126
|
-
return console.error(
|
|
41139
|
+
} catch (Z) {
|
|
41140
|
+
return console.error(Z), J;
|
|
41127
41141
|
}
|
|
41128
41142
|
},
|
|
41129
41143
|
[M == null ? void 0 : M.uiSchema, t]
|
|
@@ -41135,7 +41149,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
41135
41149
|
params: P(x({
|
|
41136
41150
|
pageSize: 200
|
|
41137
41151
|
}, n == null ? void 0 : n.params), {
|
|
41138
|
-
filter: (
|
|
41152
|
+
filter: (ee = n == null ? void 0 : n.params) == null ? void 0 : ee.filter
|
|
41139
41153
|
})
|
|
41140
41154
|
}),
|
|
41141
41155
|
x({
|
|
@@ -41143,13 +41157,27 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
41143
41157
|
debounceWait: o,
|
|
41144
41158
|
onSuccess: f
|
|
41145
41159
|
}, n.defaultParams ? { defaultParams: [n.defaultParams] } : {})
|
|
41146
|
-
),
|
|
41160
|
+
), {
|
|
41161
|
+
data: z,
|
|
41162
|
+
run: L,
|
|
41163
|
+
loading: V
|
|
41164
|
+
} = useRequest(
|
|
41165
|
+
P(x({
|
|
41166
|
+
action: "get"
|
|
41167
|
+
}, n), {
|
|
41168
|
+
headers: S
|
|
41169
|
+
}),
|
|
41170
|
+
{
|
|
41171
|
+
manual: !0,
|
|
41172
|
+
debounceWait: o
|
|
41173
|
+
}
|
|
41174
|
+
), G = useMemo(
|
|
41147
41175
|
() => JSON.stringify({
|
|
41148
41176
|
service: n,
|
|
41149
41177
|
fieldNames: t
|
|
41150
41178
|
}),
|
|
41151
41179
|
[n, t]
|
|
41152
|
-
),
|
|
41180
|
+
), H = useCallback(() => w.current && d ? /* @__PURE__ */ jsx(
|
|
41153
41181
|
d,
|
|
41154
41182
|
{
|
|
41155
41183
|
search: w.current,
|
|
@@ -41160,27 +41188,31 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
41160
41188
|
) : null, [w.current]);
|
|
41161
41189
|
useEffect(() => {
|
|
41162
41190
|
y.current && A();
|
|
41163
|
-
}, [
|
|
41164
|
-
|
|
41165
|
-
|
|
41191
|
+
}, [G]), useEffect(() => {
|
|
41192
|
+
!i && ($ != null && $.data) && ($ != null && $.data.some((J) => J[t.value] === r) || L({
|
|
41193
|
+
filterByTk: r
|
|
41194
|
+
}));
|
|
41195
|
+
}, [r, $ == null ? void 0 : $.data]);
|
|
41196
|
+
const U = (J) => q(void 0, null, function* () {
|
|
41197
|
+
var Z;
|
|
41166
41198
|
A({
|
|
41167
41199
|
filter: mergeFilter([
|
|
41168
|
-
|
|
41200
|
+
J ? {
|
|
41169
41201
|
[t.label]: {
|
|
41170
|
-
[j]:
|
|
41202
|
+
[j]: J
|
|
41171
41203
|
}
|
|
41172
41204
|
} : {},
|
|
41173
|
-
(
|
|
41205
|
+
(Z = n == null ? void 0 : n.params) == null ? void 0 : Z.filter
|
|
41174
41206
|
])
|
|
41175
|
-
}), w.current =
|
|
41176
|
-
}),
|
|
41177
|
-
var
|
|
41178
|
-
const
|
|
41179
|
-
if (!((
|
|
41180
|
-
return
|
|
41181
|
-
const
|
|
41182
|
-
return uniqBy(
|
|
41183
|
-
}, [r, a, $ == null ? void 0 : $.data, t.value, p]);
|
|
41207
|
+
}), w.current = J;
|
|
41208
|
+
}), K = useMemo(() => {
|
|
41209
|
+
var re;
|
|
41210
|
+
const J = i ? r || a : z == null ? void 0 : z.data;
|
|
41211
|
+
if (!((re = $ == null ? void 0 : $.data) != null && re.length))
|
|
41212
|
+
return J != null ? Array.isArray(J) ? J : [J] : [];
|
|
41213
|
+
const Z = J != null && (Array.isArray(J) ? J.map((se) => P(x({}, se), { [t.value]: se[t.value] || se })) : [P(x({}, J), { [t.value]: J[t.value] || J })]) || [], te = typeof p == "function" ? $.data.filter(p) : $.data;
|
|
41214
|
+
return uniqBy(te.concat(Z != null ? Z : []), t.value);
|
|
41215
|
+
}, [r, a, $ == null ? void 0 : $.data, t.value, p, z == null ? void 0 : z.data]);
|
|
41184
41216
|
return /* @__PURE__ */ jsx(
|
|
41185
41217
|
Select,
|
|
41186
41218
|
P(x({
|
|
@@ -41189,24 +41221,24 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
41189
41221
|
filterOption: !1,
|
|
41190
41222
|
filterSort: null,
|
|
41191
41223
|
fieldNames: t,
|
|
41192
|
-
onSearch:
|
|
41193
|
-
onDropdownVisibleChange: (
|
|
41194
|
-
w.current = null,
|
|
41224
|
+
onSearch: U,
|
|
41225
|
+
onDropdownVisibleChange: (J) => {
|
|
41226
|
+
w.current = null, J && A(), y.current = !0;
|
|
41195
41227
|
},
|
|
41196
41228
|
objectValue: i,
|
|
41197
41229
|
value: r,
|
|
41198
41230
|
defaultValue: a
|
|
41199
41231
|
}, C), {
|
|
41200
41232
|
loading: $ ? E : !0,
|
|
41201
|
-
options: h(O(
|
|
41202
|
-
rawOptions:
|
|
41203
|
-
dropdownRender: (
|
|
41204
|
-
const
|
|
41233
|
+
options: h(O(K)),
|
|
41234
|
+
rawOptions: K,
|
|
41235
|
+
dropdownRender: (J) => {
|
|
41236
|
+
const Z = K.some((te) => te[t.label] === w.current);
|
|
41205
41237
|
return /* @__PURE__ */ jsx(Fragment$1, { children: I ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
41206
|
-
!(($ == null ? void 0 : $.data.length) === 0 && (w != null && w.current)) &&
|
|
41207
|
-
($ == null ? void 0 : $.data.length) > 0 && (w == null ? void 0 : w.current) && !
|
|
41208
|
-
!
|
|
41209
|
-
] }) :
|
|
41238
|
+
!(($ == null ? void 0 : $.data.length) === 0 && (w != null && w.current)) && J,
|
|
41239
|
+
($ == null ? void 0 : $.data.length) > 0 && (w == null ? void 0 : w.current) && !Z && /* @__PURE__ */ jsx(Divider$1, { style: { margin: 0 } }),
|
|
41240
|
+
!Z && /* @__PURE__ */ jsx(H, {})
|
|
41241
|
+
] }) : J });
|
|
41210
41242
|
}
|
|
41211
41243
|
})
|
|
41212
41244
|
);
|
|
@@ -41346,7 +41378,7 @@ const useFormBlockHeight = () => {
|
|
|
41346
41378
|
const e = useDataBlockHeight(), t = useFieldSchema(), { token: n } = theme.useToken(), { designable: o } = useDesignable(), { heightProps: r } = useBlockHeightProps() || {}, { title: a, titleHeight: i } = r || {}, { display: l, enabled: c } = useFormDataTemplates(), u = t.reduceProperties((w, T) => T["x-component"] === "ActionBar" ? T : w), d = Object.keys((u == null ? void 0 : u.properties) || {}).length > 0, p = (F = (I = (v = t == null ? void 0 : t.parent) == null ? void 0 : v["x-decorator"]) == null ? void 0 : I.includes) == null ? void 0 : F.call(I, "FormBlockProvider"), m = d || o ? n.controlHeight + (p ? 1 * n.marginLG : 24 + n.paddingLG) : n.marginLG, h = a ? i : 0, g = useDataBlockRequestData(), { count: f, pageSize: C } = (g == null ? void 0 : g.meta) || {}, S = f > C ? n.controlHeightSM + 24 : 0, y = l && c ? n.controlHeight + 2 * n.padding + n.margin : 0;
|
|
41347
41379
|
return e - m - n.paddingLG - h - S - y;
|
|
41348
41380
|
}, FormComponent = (e) => {
|
|
41349
|
-
const S = e, { form: t, children: n } = S, o =
|
|
41381
|
+
const S = e, { form: t, children: n } = S, o = W(S, ["form", "children"]), r = useField(), a = useFieldSchema(), i = getCardItemSchema == null ? void 0 : getCardItemSchema(a), l = useAttach(t.createVoidField(P(x({}, r.props), { basePath: "" }))), c = useFormBlockHeight(), { token: u } = theme.useToken(), {
|
|
41350
41382
|
layout: d = "vertical",
|
|
41351
41383
|
labelAlign: p = "left",
|
|
41352
41384
|
labelWidth: m = 120,
|
|
@@ -41393,7 +41425,7 @@ const useFormBlockHeight = () => {
|
|
|
41393
41425
|
})
|
|
41394
41426
|
) }) });
|
|
41395
41427
|
}, Def = (e) => e.children, FormDecorator = (e) => {
|
|
41396
|
-
const p = e, { form: t, children: n, disabled: o } = p, r =
|
|
41428
|
+
const p = e, { form: t, children: n, disabled: o } = p, r = W(p, ["form", "children", "disabled"]), a = useField(), i = useFieldSchema(), l = useAttach(t.createVoidField(P(x({}, a.props), { basePath: "" }))), c = useComponent(i["x-component"], Def), { isMobileLayout: u } = useMobileLayout(), d = useMemo(
|
|
41397
41429
|
() => u ? transformMultiColumnToSingleColumn(i) : i,
|
|
41398
41430
|
[i, u]
|
|
41399
41431
|
);
|
|
@@ -41470,7 +41502,7 @@ const useFormBlockHeight = () => {
|
|
|
41470
41502
|
}
|
|
41471
41503
|
`, Form = withDynamicSchemaProps(
|
|
41472
41504
|
observer$1((e) => {
|
|
41473
|
-
const t = useField(), { token: n } = useToken(), c = useProps(e), { form: o, disabled: r } = c, a =
|
|
41505
|
+
const t = useField(), { token: n } = useToken(), c = useProps(e), { form: o, disabled: r } = c, a = W(c, ["form", "disabled"]), i = useMemo(() => ({
|
|
41474
41506
|
token: {
|
|
41475
41507
|
// 这里是为了防止区块内部也收到 marginBlock 的影响(marginBlock:区块之间的间距)
|
|
41476
41508
|
// @ts-ignore
|
|
@@ -42866,7 +42898,7 @@ const menuItemTitleStyle = {
|
|
|
42866
42898
|
};
|
|
42867
42899
|
Menu.Item = observer$1(
|
|
42868
42900
|
(e) => {
|
|
42869
|
-
const { t } = useMenuTranslation(), { pushMenuItem: n } = useCollectMenuItems(), p = e, { icon: o, children: r, hidden: a } = p, i =
|
|
42901
|
+
const { t } = useMenuTranslation(), { pushMenuItem: n } = useCollectMenuItems(), p = e, { icon: o, children: r, hidden: a } = p, i = W(p, ["icon", "children", "hidden"]), l = useFieldSchema(), c = useField(), u = useContext(MenuItemDesignerContext), d = useMemo(() => {
|
|
42870
42902
|
var m;
|
|
42871
42903
|
return P(x({}, i), {
|
|
42872
42904
|
hidden: a,
|
|
@@ -42938,7 +42970,7 @@ const MenuURLButton = ({ href: e, params: t, icon: n }) => {
|
|
|
42938
42970
|
};
|
|
42939
42971
|
Menu.URL = observer$1(
|
|
42940
42972
|
(e) => {
|
|
42941
|
-
const { pushMenuItem: t } = useCollectMenuItems(), { designable: n } = useDesignable(), d = e, { icon: o, children: r, hidden: a } = d, i =
|
|
42973
|
+
const { pushMenuItem: t } = useCollectMenuItems(), { designable: n } = useDesignable(), d = e, { icon: o, children: r, hidden: a } = d, i = W(d, ["icon", "children", "hidden"]), l = useFieldSchema(), c = useField();
|
|
42942
42974
|
if (!t)
|
|
42943
42975
|
return error("Menu.URL must be wrapped by GetMenuItemsContext.Provider"), null;
|
|
42944
42976
|
const u = useMemo(() => P(x({}, i), {
|
|
@@ -42957,7 +42989,7 @@ Menu.URL = observer$1(
|
|
|
42957
42989
|
);
|
|
42958
42990
|
Menu.SubMenu = observer$1(
|
|
42959
42991
|
(e) => {
|
|
42960
|
-
const { t } = useMenuTranslation(), { designable: n } = useDesignable(), { Component: o, getMenuItems: r } = useMenuItem(), { pushMenuItem: a } = useCollectMenuItems(), f = e, { icon: i, children: l, hidden: c } = f, u =
|
|
42992
|
+
const { t } = useMenuTranslation(), { designable: n } = useDesignable(), { Component: o, getMenuItems: r } = useMenuItem(), { pushMenuItem: a } = useCollectMenuItems(), f = e, { icon: i, children: l, hidden: c } = f, u = W(f, ["icon", "children", "hidden"]), d = useFieldSchema(), p = useField(), m = useContext(MenuModeContext), h = useContext(MenuItemDesignerContext), g = useMemo(() => {
|
|
42961
42993
|
var C;
|
|
42962
42994
|
return P(x({}, u), {
|
|
42963
42995
|
hidden: n ? !1 : c,
|
|
@@ -43654,7 +43686,7 @@ const FieldsTreeSelect = (e) => {
|
|
|
43654
43686
|
rootOption: l,
|
|
43655
43687
|
loadData: c,
|
|
43656
43688
|
includeFieldPaths: u
|
|
43657
|
-
} = M, d =
|
|
43689
|
+
} = M, d = W(M, [
|
|
43658
43690
|
"title",
|
|
43659
43691
|
"value",
|
|
43660
43692
|
"onChange",
|
|
@@ -43787,7 +43819,7 @@ function getFieldPath(e) {
|
|
|
43787
43819
|
const InternalAssociationSelect$1 = observer$1(
|
|
43788
43820
|
(e) => {
|
|
43789
43821
|
var B;
|
|
43790
|
-
const D = e, { objectValue: t = !0, addMode: n } = D, o =
|
|
43822
|
+
const D = e, { objectValue: t = !0, addMode: n } = D, o = W(D, ["objectValue", "addMode"]), r = useField(), a = useFieldSchema(), i = useServiceOptions$1((a == null ? void 0 : a["x-component-props"]) || e), { options: l } = useAssociationFieldContext(), c = isVariable$1(e.value) ? void 0 : e.value, u = Array.isArray(c) ? c.filter(Boolean) : c, [d, p] = useState(u), m = (B = a["x-component-props"]) == null ? void 0 : B.addMode, { t: h } = useTranslation(), { multiple: g } = e, f = useForm(), b = useAPIClient().resource(l.target), S = useCollectionRecordData(), y = useContext(SchemaComponentContext), { getCollection: v } = useCollectionManager_deprecated(), I = v(l.target), { filterTargetKey: F } = I;
|
|
43791
43823
|
useEffect(() => {
|
|
43792
43824
|
const N = isVariable$1(r.value) ? void 0 : r.value, M = Array.isArray(N) ? N.filter(Boolean) : N, j = removeIfKeyEmpty(M, F);
|
|
43793
43825
|
p(j), isEqual(r.value, j) || (r.value = j);
|
|
@@ -44349,7 +44381,7 @@ function IframePreviewer({ index: e, list: t, onSwitchIndex: n }) {
|
|
|
44349
44381
|
);
|
|
44350
44382
|
}
|
|
44351
44383
|
function InternalUpload(e) {
|
|
44352
|
-
const r = e, { onChange: t } = r, n =
|
|
44384
|
+
const r = e, { onChange: t } = r, n = W(r, ["onChange"]), o = useCallback(
|
|
44353
44385
|
(a) => {
|
|
44354
44386
|
t == null || t(toFileList(a.fileList));
|
|
44355
44387
|
},
|
|
@@ -44358,7 +44390,7 @@ function InternalUpload(e) {
|
|
|
44358
44390
|
return /* @__PURE__ */ jsx(Upload$1, P(x({}, useUploadProps(n)), { onChange: o }));
|
|
44359
44391
|
}
|
|
44360
44392
|
function ReadPretty$9(i) {
|
|
44361
|
-
var l = i, { value: e, onChange: t, disabled: n, multiple: o, size: r } = l, a =
|
|
44393
|
+
var l = i, { value: e, onChange: t, disabled: n, multiple: o, size: r } = l, a = W(l, ["value", "onChange", "disabled", "multiple", "size"]);
|
|
44362
44394
|
const { wrapSSR: c, hashId: u, componentCls: d } = useStyles$6();
|
|
44363
44395
|
(useUploadStyle.default ? useUploadStyle.default : useUploadStyle)(d);
|
|
44364
44396
|
const { isInTableCell: m } = useFlag(), h = useMemo(() => m ? { display: "inline-block" } : {}, [m]);
|
|
@@ -44497,7 +44529,7 @@ function AttachmentList(e) {
|
|
|
44497
44529
|
] });
|
|
44498
44530
|
}
|
|
44499
44531
|
function Uploader(n) {
|
|
44500
|
-
var o = n, { rules: e } = o, t =
|
|
44532
|
+
var o = n, { rules: e } = o, t = W(o, ["rules"]);
|
|
44501
44533
|
const { disabled: r, multiple: a, value: i, onChange: l, toValueItem: c = toValueItem } = t, [u, d] = useState([]), [p, m] = useState([]), { t: h } = useTranslation(), { componentCls: g } = useStyles$6(), f = useField(), C = useUploadProps(t), b = useBeforeUpload(e);
|
|
44502
44534
|
useEffect(() => {
|
|
44503
44535
|
if (p.length) {
|
|
@@ -44590,7 +44622,7 @@ Upload.Attachment = withDynamicSchemaProps(connect(Attachment, mapReadPretty(Att
|
|
|
44590
44622
|
});
|
|
44591
44623
|
Upload.Dragger = connect(
|
|
44592
44624
|
(e) => {
|
|
44593
|
-
const c = e, { tipContent: t, onChange: n } = c, o =
|
|
44625
|
+
const c = e, { tipContent: t, onChange: n } = c, o = W(c, ["tipContent", "onChange"]), { wrapSSR: r, hashId: a, componentCls: i } = useStyles$6(), l = useCallback(
|
|
44594
44626
|
(u) => {
|
|
44595
44627
|
n == null || n(toFileList(u.fileList));
|
|
44596
44628
|
},
|
|
@@ -44610,8 +44642,8 @@ Upload.Dragger = connect(
|
|
|
44610
44642
|
Upload.DraggerV2 = withDynamicSchemaProps(
|
|
44611
44643
|
connect(
|
|
44612
44644
|
(n) => {
|
|
44613
|
-
var o = n, { rules: e } = o, t =
|
|
44614
|
-
const { t: r } = useTranslation(), a = r("Click or drag file to this area to upload"), S = useProps(t), { title: i = a } = S, l =
|
|
44645
|
+
var o = n, { rules: e } = o, t = W(o, ["rules"]);
|
|
44646
|
+
const { t: r } = useTranslation(), a = r("Click or drag file to this area to upload"), S = useProps(t), { title: i = a } = S, l = W(S, ["title"]), [c, u] = useState(!1), { wrapSSR: d, hashId: p, componentCls: m } = useStyles$6(), h = useBeforeUpload(e), { size: g, mimetype: f } = e != null ? e : {}, C = useSizeHint(g), b = useCallback(
|
|
44615
44647
|
({ fileList: y }) => {
|
|
44616
44648
|
const { onChange: v } = l;
|
|
44617
44649
|
v == null || v(y), y.some((I) => I.status === "uploading") ? u(!0) : u(!1);
|
|
@@ -44780,7 +44812,7 @@ const schema$1 = {
|
|
|
44780
44812
|
setSelectedRows: o,
|
|
44781
44813
|
selectedRows: r = [],
|
|
44782
44814
|
onChange: a
|
|
44783
|
-
} = useContext(RecordPickerContext), d = useTableSelectorProps$4(), { onRowSelectionChange: i, rowKey: l = "id" } = d, c =
|
|
44815
|
+
} = useContext(RecordPickerContext), d = useTableSelectorProps$4(), { onRowSelectionChange: i, rowKey: l = "id" } = d, c = W(d, ["onRowSelectionChange", "rowKey"]), { setVisible: u } = useActionContext();
|
|
44784
44816
|
return P(x({}, c), {
|
|
44785
44817
|
rowKey: l,
|
|
44786
44818
|
rowSelection: {
|
|
@@ -44797,7 +44829,7 @@ const schema$1 = {
|
|
|
44797
44829
|
});
|
|
44798
44830
|
};
|
|
44799
44831
|
function FileSelector(e) {
|
|
44800
|
-
const y = e, { disabled: t, multiple: n, value: o, onChange: r, action: a, onSelect: i, quickUpload: l, selectFile: c } = y, u =
|
|
44832
|
+
const y = e, { disabled: t, multiple: n, value: o, onChange: r, action: a, onSelect: i, quickUpload: l, selectFile: c } = y, u = W(y, ["disabled", "multiple", "value", "onChange", "action", "onSelect", "quickUpload", "selectFile"]), { wrapSSR: d, hashId: p, componentCls: m } = useStyles$6(), { useFileCollectionStorageRules: h, useAttachmentFieldProps: g } = useExpressionScope(), { t: f } = useTranslation(), C = h(), b = g(), S = c === void 0 && l === void 0;
|
|
44801
44833
|
return d(
|
|
44802
44834
|
/* @__PURE__ */ jsx("div", { className: cls(`${m}-wrapper`, `${m}-picture-card-wrapper`, "nb-upload", p), children: /* @__PURE__ */ jsxs("div", { className: cls(`${m}-list`, `${m}-list-picture-card`), children: [
|
|
44803
44835
|
/* @__PURE__ */ jsx(AttachmentList, x({ disabled: t, multiple: n, value: o, onChange: r }, u)),
|
|
@@ -44853,7 +44885,7 @@ function FileSelector(e) {
|
|
|
44853
44885
|
}
|
|
44854
44886
|
const InternalFileManager = (e) => {
|
|
44855
44887
|
var D, B;
|
|
44856
|
-
const T = e, { value: t, multiple: n, onChange: o } = T, r =
|
|
44888
|
+
const T = e, { value: t, multiple: n, onChange: o } = T, r = W(T, ["value", "multiple", "onChange"]), a = useFieldSchema(), [i, l] = useState(!1), [c, u] = useState([]), d = useInsertSchema$1("Selector"), p = useFieldNames$1(e), { designable: m } = useDesignable(), h = useField(), [g, f] = useState([]), { getField: C } = useCollection_deprecated(), b = C(h.props.name), S = useLabelUiSchema$1(b == null ? void 0 : b.target, (p == null ? void 0 : p.label) || "label"), y = useCompile(), { modalProps: v } = useActionContext(), I = (N) => {
|
|
44857
44889
|
N.stopPropagation(), N.preventDefault(), m ? d(schema$1.Selector) : a.reduceProperties((j, R) => R["x-component"] === "AssociationField.Selector" ? R : j, null) || a.addProperty("selector", schema$1.Selector), l(!0), u([]);
|
|
44858
44890
|
};
|
|
44859
44891
|
useEffect(() => {
|
|
@@ -45180,7 +45212,7 @@ function transformNestedData(e) {
|
|
|
45180
45212
|
const { parent: l } = o;
|
|
45181
45213
|
n(l);
|
|
45182
45214
|
}
|
|
45183
|
-
const i = o, { parent: r } = i, a =
|
|
45215
|
+
const i = o, { parent: r } = i, a = W(i, ["parent"]);
|
|
45184
45216
|
t.push(a);
|
|
45185
45217
|
}
|
|
45186
45218
|
return e && n(e), t;
|
|
@@ -45327,7 +45359,7 @@ const useTableSelectorProps$2 = () => {
|
|
|
45327
45359
|
setSelectedRows: o,
|
|
45328
45360
|
selectedRows: r = [],
|
|
45329
45361
|
onChange: a
|
|
45330
|
-
} = useContext(RecordPickerContext), d = useTableSelectorProps$4(), { onRowSelectionChange: i, rowKey: l = "id" } = d, c =
|
|
45362
|
+
} = useContext(RecordPickerContext), d = useTableSelectorProps$4(), { onRowSelectionChange: i, rowKey: l = "id" } = d, c = W(d, ["onRowSelectionChange", "rowKey"]), { setVisible: u } = useActionContext();
|
|
45331
45363
|
return P(x({}, c), {
|
|
45332
45364
|
rowKey: l,
|
|
45333
45365
|
rowSelection: {
|
|
@@ -45345,7 +45377,7 @@ const useTableSelectorProps$2 = () => {
|
|
|
45345
45377
|
}, InternalPicker = observer$1(
|
|
45346
45378
|
(e) => {
|
|
45347
45379
|
var z;
|
|
45348
|
-
const E = e, { value: t, multiple: n, openSize: o, onChange: r, quickUpload: a, selectFile: i, shouldMountElement: l } = E, c =
|
|
45380
|
+
const E = e, { value: t, multiple: n, openSize: o, onChange: r, quickUpload: a, selectFile: i, shouldMountElement: l } = E, c = W(E, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema$1("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), b = useCompile(), S = useLabelUiSchema$1(f, (d == null ? void 0 : d.label) || "label"), y = h["x-add-new"], [v, I] = useState([]), F = useCollectionRecordData(), w = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((V) => {
|
|
45349
45381
|
const G = V == null ? void 0 : V[d.label];
|
|
45350
45382
|
return P(x({}, V), {
|
|
45351
45383
|
[d.label]: getLabelFormatValue$1(b(S), b(G))
|
|
@@ -46111,7 +46143,7 @@ function FinallyButton(h) {
|
|
|
46111
46143
|
linkageFromForm: t,
|
|
46112
46144
|
allowAddToCurrent: n,
|
|
46113
46145
|
props: f
|
|
46114
|
-
} = g, C = f, { onlyIcon: o } = C, r =
|
|
46146
|
+
} = g, C = f, { onlyIcon: o } = C, r = W(C, ["onlyIcon"]), {
|
|
46115
46147
|
componentType: a,
|
|
46116
46148
|
menu: i,
|
|
46117
46149
|
onClick: l,
|
|
@@ -46587,7 +46619,7 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
46587
46619
|
var g, C, b, S, y, v;
|
|
46588
46620
|
const { isInSubTable: t } = useFlag(), { token: n } = useToken$1(), o = (g = e["data-row-key"]) == null ? void 0 : g.toString(), { setNodeRef: r, isOver: a, active: i, over: l } = useSortable({
|
|
46589
46621
|
id: o
|
|
46590
|
-
}), f = e, { rowIndex: c } = f, u =
|
|
46622
|
+
}), f = e, { rowIndex: c } = f, u = W(f, ["rowIndex"]), { ref: d, inView: p } = useInView({
|
|
46591
46623
|
threshold: 0,
|
|
46592
46624
|
triggerOnce: !0,
|
|
46593
46625
|
initialInView: t || (c || 0) < INITIAL_ROWS_NUMBER,
|
|
@@ -46618,12 +46650,12 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
46618
46650
|
})
|
|
46619
46651
|
) });
|
|
46620
46652
|
}, SortHandle$1 = (e) => {
|
|
46621
|
-
const a = e, { id: t } = a, n =
|
|
46653
|
+
const a = e, { id: t } = a, n = W(a, ["id"]), { listeners: o, setNodeRef: r } = useSortable({
|
|
46622
46654
|
id: t
|
|
46623
46655
|
});
|
|
46624
46656
|
return /* @__PURE__ */ jsx(MenuOutlined, P(x(x({ ref: r }, n), o), { style: { cursor: "grab" } }));
|
|
46625
46657
|
}, TableIndex$2 = (e) => {
|
|
46626
|
-
const o = e, { index: t } = o, n =
|
|
46658
|
+
const o = e, { index: t } = o, n = W(o, ["index"]);
|
|
46627
46659
|
return /* @__PURE__ */ jsx("div", P(x({ className: cls("nb-table-index"), style: { padding: "0 8px 0 16px" } }, n), { children: t }));
|
|
46628
46660
|
}, pageSizeOptions$1 = [5, 10, 20, 50, 100, 200], usePaginationProps$2 = (e, t) => {
|
|
46629
46661
|
var S, y, v, I, F, w;
|
|
@@ -46728,19 +46760,19 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
46728
46760
|
}, columnOpacityStyle = {
|
|
46729
46761
|
opacity: 0.3
|
|
46730
46762
|
}, HeaderCellComponent = (n) => {
|
|
46731
|
-
var o = n, { columnHidden: e } = o, t =
|
|
46763
|
+
var o = n, { columnHidden: e } = o, t = W(o, ["columnHidden"]);
|
|
46732
46764
|
const { designable: r } = useDesignable();
|
|
46733
46765
|
return e ? /* @__PURE__ */ jsx("th", { style: r ? columnOpacityStyle : columnHiddenStyle, children: r ? t.children : null }) : /* @__PURE__ */ jsx("th", P(x({}, t), { className: cls(t.className, headerClass) }));
|
|
46734
46766
|
}, BodyRowComponent = (e) => /* @__PURE__ */ jsx(SortableRow, x({}, e)), InternalBodyCellComponent = (e) => {
|
|
46735
46767
|
var m;
|
|
46736
|
-
const { token: t } = useToken$1(), n = useContext(InViewContext), o = (m = e.className) == null ? void 0 : m.includes("selection-column"), h = e, { record: r, schema: a, rowIndex: i, isSubTable: l } = h, c =
|
|
46768
|
+
const { token: t } = useToken$1(), n = useContext(InViewContext), o = (m = e.className) == null ? void 0 : m.includes("selection-column"), h = e, { record: r, schema: a, rowIndex: i, isSubTable: l } = h, c = W(h, ["record", "schema", "rowIndex", "isSubTable"]), { valueMap: u } = useSatisfiedActionValues({ formValues: r, category: "style", schema: a }), d = useMemo(() => Object.assign(x({}, e.style), u), [e.style, u]), p = {
|
|
46737
46769
|
height: "1em",
|
|
46738
46770
|
backgroundColor: "rgba(0, 0, 0, 0.06)",
|
|
46739
46771
|
borderRadius: `${t.borderRadiusSM}px`
|
|
46740
46772
|
};
|
|
46741
46773
|
return /* @__PURE__ */ jsx("td", P(x({}, c), { className: cls(e.className, cellClass), style: d, children: l || n || o ? e.children : /* @__PURE__ */ jsx("div", { style: p }) }));
|
|
46742
46774
|
}, displayNone = { display: "none" }, BodyCellComponent = (n) => {
|
|
46743
|
-
var o = n, { columnHidden: e } = o, t =
|
|
46775
|
+
var o = n, { columnHidden: e } = o, t = W(o, ["columnHidden"]);
|
|
46744
46776
|
const { designable: r } = useDesignable(), a = useCollection();
|
|
46745
46777
|
return e ? /* @__PURE__ */ jsx("td", { style: r ? columnOpacityStyle : columnHiddenStyle, children: r ? t.children : /* @__PURE__ */ jsx("span", { style: displayNone, children: t.children }) }) : /* @__PURE__ */ jsxs(SubFormProvider, { value: { value: t == null ? void 0 : t.record, collection: a, fieldSchema: t.schema }, children: [
|
|
46746
46778
|
/* @__PURE__ */ jsx(InternalBodyCellComponent, x({}, t)),
|
|
@@ -46763,7 +46795,7 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
46763
46795
|
columns: m,
|
|
46764
46796
|
expandable: h,
|
|
46765
46797
|
field: g
|
|
46766
|
-
} = b, f =
|
|
46798
|
+
} = b, f = W(b, [
|
|
46767
46799
|
"tableHeight",
|
|
46768
46800
|
"SortableWrapper",
|
|
46769
46801
|
"tableSizeRefCallback",
|
|
@@ -46841,8 +46873,8 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
46841
46873
|
InternalNocoBaseTable.displayName = "InternalNocoBaseTable";
|
|
46842
46874
|
const Table$1 = withDynamicSchemaProps(
|
|
46843
46875
|
observer$1((e) => {
|
|
46844
|
-
var
|
|
46845
|
-
const { token: t } = useToken$1(),
|
|
46876
|
+
var pe, be, ye;
|
|
46877
|
+
const { token: t } = useToken$1(), he = omit(e, ["onBlur", "onFocus", "value"]), { pagination: n, useProps: o } = he, r = W(he, ["pagination", "useProps"]), fe = (o == null ? void 0 : o()) || {}, { pagination: a } = fe, i = W(fe, ["pagination"]), ge = x(x({}, r), i), {
|
|
46846
46878
|
dragSort: l = !1,
|
|
46847
46879
|
showIndex: c = !0,
|
|
46848
46880
|
onRowSelectionChange: u,
|
|
@@ -46854,7 +46886,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46854
46886
|
loading: f,
|
|
46855
46887
|
onClickRow: C,
|
|
46856
46888
|
enableIndexColumn: b
|
|
46857
|
-
} =
|
|
46889
|
+
} = ge, S = W(ge, [
|
|
46858
46890
|
"dragSort",
|
|
46859
46891
|
"showIndex",
|
|
46860
46892
|
"onRowSelectionChange",
|
|
@@ -46866,7 +46898,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46866
46898
|
"loading",
|
|
46867
46899
|
"onClickRow",
|
|
46868
46900
|
"enableIndexColumn"
|
|
46869
|
-
]), y = useArrayField(S), v = useFieldSchema(), { size: I = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, F = useCollection(), T = ((
|
|
46901
|
+
]), y = useArrayField(S), v = useFieldSchema(), { size: I = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, F = useCollection(), T = ((pe = v == null ? void 0 : v.parent) == null ? void 0 : pe["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B } = T, N = useMemoizedFn(S.onRowDragEnd || (() => {
|
|
46870
46902
|
})), M = usePaginationProps$2(n, a), j = useTableColumns$1(S, M), [R, O] = useState(() => D ? B : []), [$, A] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [E, z] = useState([]), L = (p == null ? void 0 : p.type) !== "none", V = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
|
|
46871
46903
|
& > td {
|
|
46872
46904
|
background-color: ${t.controlItemBgActive} !important;
|
|
@@ -46874,85 +46906,85 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46874
46906
|
&:hover > td {
|
|
46875
46907
|
background-color: ${t.controlItemBgActiveHover} !important;
|
|
46876
46908
|
}
|
|
46877
|
-
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), H = useMemo(() => C ? G : "", [G, C]), U = useMemo(() => C ? (
|
|
46909
|
+
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), H = useMemo(() => C ? G : "", [G, C]), U = useMemo(() => C ? (ae, ne) => ({
|
|
46878
46910
|
onClick: (oe) => {
|
|
46879
|
-
isPortalInBody(oe.target) || C(
|
|
46911
|
+
isPortalInBody(oe.target) || C(ae, z, E);
|
|
46880
46912
|
},
|
|
46881
|
-
rowIndex:
|
|
46913
|
+
rowIndex: ne
|
|
46882
46914
|
}) : null, [C, E]);
|
|
46883
46915
|
useDeepCompareEffect(() => {
|
|
46884
|
-
const
|
|
46885
|
-
_.isEqual(
|
|
46916
|
+
const ae = D ? B : [];
|
|
46917
|
+
_.isEqual(ae, R) || O(ae);
|
|
46886
46918
|
}, [D, B]);
|
|
46887
|
-
const K = useCallback((
|
|
46919
|
+
const K = useCallback((ae) => {
|
|
46888
46920
|
if (m)
|
|
46889
|
-
return
|
|
46890
|
-
if (
|
|
46891
|
-
return
|
|
46892
|
-
if (V.current.has(
|
|
46893
|
-
return V.current.get(
|
|
46894
|
-
const
|
|
46895
|
-
return V.current.set(
|
|
46896
|
-
}, []),
|
|
46897
|
-
(
|
|
46898
|
-
var
|
|
46921
|
+
return Y(ae);
|
|
46922
|
+
if (ae.key)
|
|
46923
|
+
return ae.key;
|
|
46924
|
+
if (V.current.has(ae))
|
|
46925
|
+
return V.current.get(ae);
|
|
46926
|
+
const ne = uid();
|
|
46927
|
+
return V.current.set(ae, ne), ne;
|
|
46928
|
+
}, []), Y = useCallback(
|
|
46929
|
+
(ae) => {
|
|
46930
|
+
var ne;
|
|
46899
46931
|
return Array.isArray(m) ? m.map((oe) => {
|
|
46900
|
-
var
|
|
46901
|
-
return ((
|
|
46902
|
-
}).join("-") : typeof m == "string" ?
|
|
46932
|
+
var ie;
|
|
46933
|
+
return ((ie = ae[oe]) == null ? void 0 : ie.toString()) || "";
|
|
46934
|
+
}).join("-") : typeof m == "string" ? ae[m] : (ne = (m != null ? m : K)(ae)) == null ? void 0 : ne.toString();
|
|
46903
46935
|
},
|
|
46904
46936
|
[JSON.stringify(m), K]
|
|
46905
|
-
),
|
|
46906
|
-
const
|
|
46937
|
+
), X = useMemo(() => (Array.isArray(y == null ? void 0 : y.value) ? y.value : []).filter(Boolean), [y == null ? void 0 : y.value, (ye = y == null ? void 0 : y.value) == null ? void 0 : ye.length]), Q = useMemo(() => (ae) => {
|
|
46938
|
+
const ne = useCallback((oe) => {
|
|
46907
46939
|
var Ae, ve, Pe, Fe, Ie, ke;
|
|
46908
46940
|
if (!oe.active || !oe.over) {
|
|
46909
46941
|
console.warn("move cancel");
|
|
46910
46942
|
return;
|
|
46911
46943
|
}
|
|
46912
|
-
const
|
|
46913
|
-
y.move(
|
|
46944
|
+
const ie = (Pe = (ve = (Ae = oe.active) == null ? void 0 : Ae.data.current) == null ? void 0 : ve.sortable) == null ? void 0 : Pe.index, ce = (ke = (Ie = (Fe = oe.over) == null ? void 0 : Fe.data.current) == null ? void 0 : Ie.sortable) == null ? void 0 : ke.index, de = y.value[ie] || oe.active, Se = y.value[ce] || oe.over;
|
|
46945
|
+
y.move(ie, ce), N({ from: de, to: Se });
|
|
46914
46946
|
}, []);
|
|
46915
|
-
return /* @__PURE__ */ jsx(DndContext, { onDragEnd:
|
|
46947
|
+
return /* @__PURE__ */ jsx(DndContext, { onDragEnd: ne, children: /* @__PURE__ */ jsx("tbody", x({}, ae)) });
|
|
46916
46948
|
}, [y, N]);
|
|
46917
|
-
|
|
46918
|
-
const
|
|
46949
|
+
Q.displayName = "BodyWrapperComponent";
|
|
46950
|
+
const ee = useMemo(() => ({
|
|
46919
46951
|
header: {
|
|
46920
46952
|
wrapper: HeaderWrapperComponent,
|
|
46921
46953
|
cell: HeaderCellComponent
|
|
46922
46954
|
},
|
|
46923
46955
|
body: {
|
|
46924
|
-
wrapper:
|
|
46956
|
+
wrapper: Q,
|
|
46925
46957
|
row: BodyRowComponent,
|
|
46926
46958
|
cell: BodyCellComponent
|
|
46927
46959
|
}
|
|
46928
|
-
}), [
|
|
46960
|
+
}), [Q]), J = useMemo(() => p, [JSON.stringify(p)]), Z = useMemo(
|
|
46929
46961
|
() => ({
|
|
46930
|
-
rowSelection: b &&
|
|
46962
|
+
rowSelection: b && J ? x({
|
|
46931
46963
|
type: "checkbox",
|
|
46932
46964
|
selectedRowKeys: $,
|
|
46933
|
-
onChange(
|
|
46934
|
-
y.data = y.data || {}, y.data.selectedRowKeys =
|
|
46965
|
+
onChange(ae, ne) {
|
|
46966
|
+
y.data = y.data || {}, y.data.selectedRowKeys = ae, y.data.selectedRowData = ne, A(ae), u == null || u(ae, ne);
|
|
46935
46967
|
},
|
|
46936
|
-
getCheckboxProps(
|
|
46968
|
+
getCheckboxProps(ae) {
|
|
46937
46969
|
return {
|
|
46938
46970
|
"aria-label": "checkbox"
|
|
46939
46971
|
};
|
|
46940
46972
|
},
|
|
46941
|
-
renderCell: (
|
|
46973
|
+
renderCell: (ae, ne, oe, ie) => {
|
|
46942
46974
|
if (!l && !c)
|
|
46943
|
-
return
|
|
46944
|
-
const
|
|
46945
|
-
return
|
|
46975
|
+
return ie;
|
|
46976
|
+
const ce = M == null ? void 0 : M.current, de = (M == null ? void 0 : M.pageSize) || 20;
|
|
46977
|
+
return ce ? oe = oe + (ce - 1) * de + 1 : oe = oe + 1, ne.__index && (oe = extractIndex(ne.__index)), /* @__PURE__ */ jsxs(
|
|
46946
46978
|
"div",
|
|
46947
46979
|
{
|
|
46948
46980
|
role: "button",
|
|
46949
46981
|
"aria-label": `table-index-${oe}`,
|
|
46950
|
-
className: cls(
|
|
46982
|
+
className: cls(ae ? "checked" : null, rowSelectCheckboxWrapperClass, {
|
|
46951
46983
|
[rowSelectCheckboxWrapperClassHover]: L
|
|
46952
46984
|
}),
|
|
46953
46985
|
children: [
|
|
46954
|
-
/* @__PURE__ */ jsxs("div", { className: cls(
|
|
46955
|
-
l && /* @__PURE__ */ jsx(SortHandle$1, { id:
|
|
46986
|
+
/* @__PURE__ */ jsxs("div", { className: cls(ae ? "checked" : null, rowSelectCheckboxContentClass), children: [
|
|
46987
|
+
l && /* @__PURE__ */ jsx(SortHandle$1, { id: Y(ne) }),
|
|
46956
46988
|
c && /* @__PURE__ */ jsx(TableIndex$2, { index: oe })
|
|
46957
46989
|
] }),
|
|
46958
46990
|
L && /* @__PURE__ */ jsx(
|
|
@@ -46960,78 +46992,78 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46960
46992
|
{
|
|
46961
46993
|
className: cls(
|
|
46962
46994
|
"nb-origin-node",
|
|
46963
|
-
|
|
46995
|
+
ae ? "checked" : null,
|
|
46964
46996
|
rowSelectCheckboxCheckedClassHover
|
|
46965
46997
|
),
|
|
46966
|
-
children:
|
|
46998
|
+
children: ie
|
|
46967
46999
|
}
|
|
46968
47000
|
)
|
|
46969
47001
|
]
|
|
46970
47002
|
}
|
|
46971
47003
|
);
|
|
46972
47004
|
}
|
|
46973
|
-
},
|
|
47005
|
+
}, J) : void 0
|
|
46974
47006
|
}),
|
|
46975
47007
|
[
|
|
46976
|
-
|
|
47008
|
+
J,
|
|
46977
47009
|
$,
|
|
46978
47010
|
u,
|
|
46979
47011
|
c,
|
|
46980
47012
|
l,
|
|
46981
47013
|
y,
|
|
46982
|
-
|
|
47014
|
+
Y,
|
|
46983
47015
|
L,
|
|
46984
|
-
|
|
47016
|
+
J,
|
|
46985
47017
|
M,
|
|
46986
47018
|
b
|
|
46987
47019
|
]
|
|
46988
|
-
),
|
|
46989
|
-
({ children:
|
|
46990
|
-
var
|
|
47020
|
+
), te = useCallback(
|
|
47021
|
+
({ children: ae }) => {
|
|
47022
|
+
var ne, oe;
|
|
46991
47023
|
return l ? React.createElement(
|
|
46992
47024
|
SortableContext$1,
|
|
46993
47025
|
{
|
|
46994
|
-
items: ((oe = (
|
|
47026
|
+
items: ((oe = (ne = y.value) == null ? void 0 : ne.map) == null ? void 0 : oe.call(ne, Y)) || []
|
|
46995
47027
|
},
|
|
46996
|
-
|
|
46997
|
-
) : React.createElement(React.Fragment, {},
|
|
47028
|
+
ae
|
|
47029
|
+
) : React.createElement(React.Fragment, {}, ae);
|
|
46998
47030
|
},
|
|
46999
|
-
[y, l,
|
|
47000
|
-
), { height: re, tableSizeRefCallback:
|
|
47031
|
+
[y, l, Y]
|
|
47032
|
+
), { height: re, tableSizeRefCallback: se } = useTableSize(), ue = useMemo(() => ({
|
|
47001
47033
|
x: "max-content"
|
|
47002
|
-
}), []),
|
|
47034
|
+
}), []), le = useMemo(() => ({
|
|
47003
47035
|
x: "max-content",
|
|
47004
|
-
y:
|
|
47005
|
-
}), [re,
|
|
47006
|
-
(
|
|
47036
|
+
y: X.length > 0 ? re : void 0
|
|
47037
|
+
}), [re, ue, X]), me = useCallback(
|
|
47038
|
+
(ae) => E.includes(ae[m]) ? H : "",
|
|
47007
47039
|
[E, H, JSON.stringify(m)]
|
|
47008
|
-
),
|
|
47009
|
-
(
|
|
47010
|
-
const oe =
|
|
47011
|
-
O(oe), g == null || g(
|
|
47040
|
+
), xe = useCallback(
|
|
47041
|
+
(ae, ne) => {
|
|
47042
|
+
const oe = ae ? [...R, ne[F.getPrimaryKey()]] : R.filter((ie) => ne[F.getPrimaryKey()] !== ie);
|
|
47043
|
+
O(oe), g == null || g(ae, ne);
|
|
47012
47044
|
},
|
|
47013
47045
|
[R, g, F]
|
|
47014
47046
|
), Ce = useMemo(() => ({
|
|
47015
|
-
onExpand:
|
|
47047
|
+
onExpand: xe,
|
|
47016
47048
|
expandedRowKeys: R
|
|
47017
|
-
}), [R,
|
|
47049
|
+
}), [R, xe]);
|
|
47018
47050
|
return (
|
|
47019
47051
|
// If spinning is set to undefined, it will cause the subtable to always display loading, so we need to convert it here
|
|
47020
47052
|
/* @__PURE__ */ jsx(Spin, { spinning: !!f, children: /* @__PURE__ */ jsx(
|
|
47021
47053
|
InternalNocoBaseTable,
|
|
47022
47054
|
P(x(x({
|
|
47023
47055
|
tableHeight: re,
|
|
47024
|
-
SortableWrapper:
|
|
47025
|
-
tableSizeRefCallback:
|
|
47056
|
+
SortableWrapper: te,
|
|
47057
|
+
tableSizeRefCallback: se,
|
|
47026
47058
|
defaultRowKey: K,
|
|
47027
|
-
dataSource:
|
|
47028
|
-
}, S),
|
|
47059
|
+
dataSource: X
|
|
47060
|
+
}, S), Z), {
|
|
47029
47061
|
paginationProps: M,
|
|
47030
|
-
components:
|
|
47062
|
+
components: ee,
|
|
47031
47063
|
onTableChange: d,
|
|
47032
47064
|
onRow: U,
|
|
47033
|
-
rowClassName:
|
|
47034
|
-
scroll:
|
|
47065
|
+
rowClassName: me,
|
|
47066
|
+
scroll: le,
|
|
47035
47067
|
columns: j,
|
|
47036
47068
|
expandable: Ce,
|
|
47037
47069
|
field: y,
|
|
@@ -47354,19 +47386,19 @@ AssociationSelect.Designer = function e() {
|
|
|
47354
47386
|
useEffect(() => {
|
|
47355
47387
|
c.readPretty !== u["x-read-pretty"] && (c.readPretty = !!u["x-read-pretty"]);
|
|
47356
47388
|
}, [u["x-read-pretty"]]);
|
|
47357
|
-
const N = B == null ? void 0 : B.map((
|
|
47358
|
-
field:
|
|
47389
|
+
const N = B == null ? void 0 : B.map((Y) => Y.startsWith("-") ? {
|
|
47390
|
+
field: Y.substring(1),
|
|
47359
47391
|
direction: "desc"
|
|
47360
47392
|
} : {
|
|
47361
|
-
field:
|
|
47393
|
+
field: Y,
|
|
47362
47394
|
direction: "asc"
|
|
47363
47395
|
});
|
|
47364
47396
|
c.readPretty || c.required;
|
|
47365
|
-
const M = T.filter((
|
|
47366
|
-
var
|
|
47397
|
+
const M = T.filter((Y) => a(Y)).map((Y) => {
|
|
47398
|
+
var X;
|
|
47367
47399
|
return {
|
|
47368
|
-
value:
|
|
47369
|
-
label: f((
|
|
47400
|
+
value: Y == null ? void 0 : Y.name,
|
|
47401
|
+
label: f((X = Y == null ? void 0 : Y.uiSchema) == null ? void 0 : X.title) || (Y == null ? void 0 : Y.name)
|
|
47370
47402
|
};
|
|
47371
47403
|
});
|
|
47372
47404
|
let j = "editable";
|
|
@@ -47460,20 +47492,20 @@ AssociationSelect.Designer = function e() {
|
|
|
47460
47492
|
}
|
|
47461
47493
|
}
|
|
47462
47494
|
},
|
|
47463
|
-
onSubmit: (
|
|
47464
|
-
var
|
|
47465
|
-
const
|
|
47466
|
-
for (const
|
|
47467
|
-
|
|
47468
|
-
const
|
|
47495
|
+
onSubmit: (Y) => {
|
|
47496
|
+
var Z;
|
|
47497
|
+
const X = [], Q = (te) => te != null && !Number.isNaN(te);
|
|
47498
|
+
for (const te of Y.rules)
|
|
47499
|
+
X.push(_.pickBy(te, Q));
|
|
47500
|
+
const ee = {
|
|
47469
47501
|
"x-uid": u["x-uid"]
|
|
47470
47502
|
};
|
|
47471
47503
|
if (["percent"].includes(S == null ? void 0 : S.interface))
|
|
47472
|
-
for (const
|
|
47473
|
-
(
|
|
47474
|
-
const
|
|
47475
|
-
c.validator =
|
|
47476
|
-
schema:
|
|
47504
|
+
for (const te of X)
|
|
47505
|
+
(te.maxValue || te.minValue) && (te.percentMode = !0), te.percentFormat && (te.percentFormats = !0);
|
|
47506
|
+
const J = _.concat([], ((Z = S == null ? void 0 : S.uiSchema) == null ? void 0 : Z["x-validator"]) || [], X);
|
|
47507
|
+
c.validator = J, u["x-validator"] = X, ee["x-validator"] = X, m.emit("patch", {
|
|
47508
|
+
schema: ee
|
|
47477
47509
|
}), h();
|
|
47478
47510
|
}
|
|
47479
47511
|
}
|
|
@@ -47504,12 +47536,12 @@ AssociationSelect.Designer = function e() {
|
|
|
47504
47536
|
})
|
|
47505
47537
|
}
|
|
47506
47538
|
},
|
|
47507
|
-
onSubmit: (
|
|
47508
|
-
const
|
|
47539
|
+
onSubmit: (Y) => {
|
|
47540
|
+
const X = {
|
|
47509
47541
|
"x-uid": u["x-uid"]
|
|
47510
47542
|
};
|
|
47511
|
-
c.value !==
|
|
47512
|
-
schema:
|
|
47543
|
+
c.value !== Y.default && (c.value = Y.default), u.default = Y.default, X.default = Y.default, m.emit("patch", {
|
|
47544
|
+
schema: X
|
|
47513
47545
|
}), h();
|
|
47514
47546
|
}
|
|
47515
47547
|
}
|
|
@@ -47520,9 +47552,9 @@ AssociationSelect.Designer = function e() {
|
|
|
47520
47552
|
title: d("Field component"),
|
|
47521
47553
|
options: y,
|
|
47522
47554
|
value: u["x-component"],
|
|
47523
|
-
onChange: (
|
|
47524
|
-
var
|
|
47525
|
-
const
|
|
47555
|
+
onChange: (Y) => {
|
|
47556
|
+
var Q, ee;
|
|
47557
|
+
const X = {
|
|
47526
47558
|
name: S == null ? void 0 : S.name,
|
|
47527
47559
|
type: "void",
|
|
47528
47560
|
required: u.required,
|
|
@@ -47532,19 +47564,19 @@ AssociationSelect.Designer = function e() {
|
|
|
47532
47564
|
// 'x-designer': 'FormItem.Designer',
|
|
47533
47565
|
"x-toolbar": "FormItemSchemaToolbar",
|
|
47534
47566
|
"x-settings": "fieldSettings:FormItem",
|
|
47535
|
-
"x-component":
|
|
47567
|
+
"x-component": Y,
|
|
47536
47568
|
"x-validator": u["x-validator"],
|
|
47537
47569
|
"x-collection-field": u["x-collection-field"],
|
|
47538
47570
|
"x-decorator-props": u["x-decorator-props"],
|
|
47539
|
-
"x-component-props": x(x({}, (
|
|
47571
|
+
"x-component-props": x(x({}, (Q = S == null ? void 0 : S.uiSchema) == null ? void 0 : Q["x-component-props"]), u["x-component-props"])
|
|
47540
47572
|
};
|
|
47541
|
-
(
|
|
47573
|
+
(ee = I == null ? void 0 : I.schemaInitialize) == null || ee.call(I, X, {
|
|
47542
47574
|
field: S,
|
|
47543
47575
|
block: "Form",
|
|
47544
47576
|
readPretty: c.readPretty,
|
|
47545
47577
|
action: p ? "get" : null,
|
|
47546
47578
|
targetCollection: r(S == null ? void 0 : S.target)
|
|
47547
|
-
}),
|
|
47579
|
+
}), Y === "CollectionField" && (X.type = "string"), g("beforeBegin", divWrap(X), {
|
|
47548
47580
|
onSuccess: () => {
|
|
47549
47581
|
m.remove(null, {
|
|
47550
47582
|
removeParentsIfNoChildren: !0,
|
|
@@ -47562,12 +47594,12 @@ AssociationSelect.Designer = function e() {
|
|
|
47562
47594
|
{
|
|
47563
47595
|
title: d("Allow multiple"),
|
|
47564
47596
|
checked: ((L = u["x-component-props"]) == null ? void 0 : L.multiple) === void 0 ? !0 : u["x-component-props"].multiple,
|
|
47565
|
-
onChange: (
|
|
47566
|
-
const
|
|
47597
|
+
onChange: (Y) => {
|
|
47598
|
+
const X = {
|
|
47567
47599
|
"x-uid": u["x-uid"]
|
|
47568
47600
|
};
|
|
47569
|
-
u["x-component-props"] = u["x-component-props"] || {}, c.componentProps = c.componentProps || {}, u["x-component-props"].multiple =
|
|
47570
|
-
schema:
|
|
47601
|
+
u["x-component-props"] = u["x-component-props"] || {}, c.componentProps = c.componentProps || {}, u["x-component-props"].multiple = Y, c.componentProps.multiple = Y, X["x-component-props"] = u["x-component-props"], m.emit("patch", {
|
|
47602
|
+
schema: X
|
|
47571
47603
|
}), h();
|
|
47572
47604
|
}
|
|
47573
47605
|
},
|
|
@@ -47579,8 +47611,8 @@ AssociationSelect.Designer = function e() {
|
|
|
47579
47611
|
collectionName: S == null ? void 0 : S.target,
|
|
47580
47612
|
defaultFilter: ((H = (G = (V = c.componentProps) == null ? void 0 : V.service) == null ? void 0 : G.params) == null ? void 0 : H.filter) || {},
|
|
47581
47613
|
form: l,
|
|
47582
|
-
onSubmit: ({ filter:
|
|
47583
|
-
|
|
47614
|
+
onSubmit: ({ filter: Y }) => {
|
|
47615
|
+
Y = removeNullCondition(Y), _.set(c.componentProps, "service.params.filter", Y), u["x-component-props"] = c.componentProps, m.emit("patch", {
|
|
47584
47616
|
schema: {
|
|
47585
47617
|
"x-uid": u["x-uid"],
|
|
47586
47618
|
"x-component-props": c.componentProps
|
|
@@ -47663,9 +47695,9 @@ AssociationSelect.Designer = function e() {
|
|
|
47663
47695
|
}
|
|
47664
47696
|
}
|
|
47665
47697
|
},
|
|
47666
|
-
onSubmit: ({ sort:
|
|
47667
|
-
const
|
|
47668
|
-
_.set(c.componentProps, "service.params.sort",
|
|
47698
|
+
onSubmit: ({ sort: Y }) => {
|
|
47699
|
+
const X = Y.map((Q) => Q.direction === "desc" ? `-${Q.field}` : Q.field);
|
|
47700
|
+
_.set(c.componentProps, "service.params.sort", X), u["x-component-props"] = c.componentProps, m.emit("patch", {
|
|
47669
47701
|
schema: {
|
|
47670
47702
|
"x-uid": u["x-uid"],
|
|
47671
47703
|
"x-component-props": c.componentProps
|
|
@@ -47684,26 +47716,26 @@ AssociationSelect.Designer = function e() {
|
|
|
47684
47716
|
{ label: d("Easy-reading"), value: "read-pretty" }
|
|
47685
47717
|
],
|
|
47686
47718
|
value: j,
|
|
47687
|
-
onChange: (
|
|
47688
|
-
const
|
|
47719
|
+
onChange: (Y) => {
|
|
47720
|
+
const X = {
|
|
47689
47721
|
"x-uid": u["x-uid"]
|
|
47690
47722
|
};
|
|
47691
|
-
switch (
|
|
47723
|
+
switch (Y) {
|
|
47692
47724
|
case "readonly": {
|
|
47693
|
-
u["x-read-pretty"] = !1, u["x-disabled"] = !0,
|
|
47725
|
+
u["x-read-pretty"] = !1, u["x-disabled"] = !0, X["x-read-pretty"] = !1, X["x-disabled"] = !0, c.readPretty = !1, c.disabled = !0;
|
|
47694
47726
|
break;
|
|
47695
47727
|
}
|
|
47696
47728
|
case "read-pretty": {
|
|
47697
|
-
u["x-read-pretty"] = !0, u["x-disabled"] = !1,
|
|
47729
|
+
u["x-read-pretty"] = !0, u["x-disabled"] = !1, X["x-read-pretty"] = !0, X["x-disabled"] = !1, c.readPretty = !0;
|
|
47698
47730
|
break;
|
|
47699
47731
|
}
|
|
47700
47732
|
default: {
|
|
47701
|
-
u["x-read-pretty"] = !1, u["x-disabled"] = !1,
|
|
47733
|
+
u["x-read-pretty"] = !1, u["x-disabled"] = !1, X["x-read-pretty"] = !1, X["x-disabled"] = !1, c.readPretty = !1, c.disabled = !1;
|
|
47702
47734
|
break;
|
|
47703
47735
|
}
|
|
47704
47736
|
}
|
|
47705
47737
|
m.emit("patch", {
|
|
47706
|
-
schema:
|
|
47738
|
+
schema: X
|
|
47707
47739
|
}), m.refresh();
|
|
47708
47740
|
}
|
|
47709
47741
|
},
|
|
@@ -47715,15 +47747,15 @@ AssociationSelect.Designer = function e() {
|
|
|
47715
47747
|
title: d("Title field"),
|
|
47716
47748
|
options: M,
|
|
47717
47749
|
value: (K = (U = c == null ? void 0 : c.componentProps) == null ? void 0 : U.fieldNames) == null ? void 0 : K.label,
|
|
47718
|
-
onChange: (
|
|
47719
|
-
var
|
|
47720
|
-
const
|
|
47750
|
+
onChange: (Y) => {
|
|
47751
|
+
var ee, J;
|
|
47752
|
+
const X = {
|
|
47721
47753
|
"x-uid": u["x-uid"]
|
|
47722
|
-
},
|
|
47723
|
-
label:
|
|
47754
|
+
}, Q = P(x(x({}, (J = (ee = S == null ? void 0 : S.uiSchema) == null ? void 0 : ee["x-component-props"]) == null ? void 0 : J.fieldNames), c.componentProps.fieldNames), {
|
|
47755
|
+
label: Y
|
|
47724
47756
|
});
|
|
47725
|
-
c.componentProps.fieldNames =
|
|
47726
|
-
schema:
|
|
47757
|
+
c.componentProps.fieldNames = Q, u["x-component-props"] = u["x-component-props"] || {}, u["x-component-props"].fieldNames = Q, X["x-component-props"] = u["x-component-props"], m.emit("patch", {
|
|
47758
|
+
schema: X
|
|
47727
47759
|
}), m.refresh();
|
|
47728
47760
|
}
|
|
47729
47761
|
},
|
|
@@ -48067,7 +48099,7 @@ const AutoComplete = withDynamicSchemaProps(
|
|
|
48067
48099
|
}
|
|
48068
48100
|
};
|
|
48069
48101
|
}), CardItem = (e) => {
|
|
48070
|
-
const p = e, { children: t, name: n, heightMode: o } = p, r =
|
|
48102
|
+
const p = e, { children: t, name: n, heightMode: o } = p, r = W(p, ["children", "name", "heightMode"]), a = useSchemaTemplate(), i = useFieldSchema(), l = i == null ? void 0 : i["x-template-key"], { wrapSSR: c, componentCls: u, hashId: d } = useStyles$5();
|
|
48071
48103
|
return l && !a ? null : c(
|
|
48072
48104
|
/* @__PURE__ */ jsx(BlockItemError, { children: /* @__PURE__ */ jsx(BlockItem, { name: n, className: `${u} ${d} noco-card-item`, children: /* @__PURE__ */ jsx(BlockItemCard, P(x({}, r), { children: e.children })) }) })
|
|
48073
48105
|
);
|
|
@@ -48108,7 +48140,7 @@ const AutoComplete = withDynamicSchemaProps(
|
|
|
48108
48140
|
changeOnSelectLast: c,
|
|
48109
48141
|
changeOnSelect: u,
|
|
48110
48142
|
maxLevel: d
|
|
48111
|
-
} = y, p =
|
|
48143
|
+
} = y, p = W(y, [
|
|
48112
48144
|
"value",
|
|
48113
48145
|
"onChange",
|
|
48114
48146
|
"labelInValue",
|
|
@@ -48204,7 +48236,7 @@ function useCollectionOptions({ filter: e, isTableOid: t }) {
|
|
|
48204
48236
|
}
|
|
48205
48237
|
const CollectionSelect = connect(
|
|
48206
48238
|
(e) => {
|
|
48207
|
-
const i = e, { filter: t } = i, n =
|
|
48239
|
+
const i = e, { filter: t } = i, n = W(i, ["filter"]), o = useCollectionOptions(e), { t: r } = useTranslation(), a = useCallback(
|
|
48208
48240
|
(l, c) => {
|
|
48209
48241
|
var u, d;
|
|
48210
48242
|
return ((u = c == null ? void 0 : c.label.toLowerCase()) != null ? u : "").includes(l.toLocaleLowerCase()) || ((d = c == null ? void 0 : c.value.toString().toLowerCase()) != null ? d : "").includes(l.toLocaleLowerCase());
|
|
@@ -48249,7 +48281,7 @@ function useDataSourceOptions({ filter: e }) {
|
|
|
48249
48281
|
);
|
|
48250
48282
|
}
|
|
48251
48283
|
const DataSourceSelect = connect((e) => {
|
|
48252
|
-
const i = e, { filter: t } = i, n =
|
|
48284
|
+
const i = e, { filter: t } = i, n = W(i, ["filter"]), o = useDataSourceOptions(e), { t: r } = useTranslation(), a = useCallback(
|
|
48253
48285
|
(l, c) => {
|
|
48254
48286
|
var u, d;
|
|
48255
48287
|
return ((u = c == null ? void 0 : c.label.toLowerCase()) != null ? u : "").includes(l.toLocaleLowerCase()) || ((d = c == null ? void 0 : c.value.toString().toLowerCase()) != null ? d : "").includes(l.toLocaleLowerCase());
|
|
@@ -48270,7 +48302,7 @@ const DataSourceSelect = connect((e) => {
|
|
|
48270
48302
|
})
|
|
48271
48303
|
);
|
|
48272
48304
|
}), DataSourceCollectionCascaderReadPretty = observer$1((e) => {
|
|
48273
|
-
const t = useDataSourceManager(), n = useCompile(), f = e, { value: o, onChange: r, dataSourceFilter: a, collectionFilter: i } = f, l =
|
|
48305
|
+
const t = useDataSourceManager(), n = useCompile(), f = e, { value: o, onChange: r, dataSourceFilter: a, collectionFilter: i } = f, l = W(f, ["value", "onChange", "dataSourceFilter", "collectionFilter"]), [c, u] = parseCollectionName(o), d = [c, u].filter(Boolean), p = t.getDataSources(), m = useMemo(() => (a ? p.filter(a) : p).map((C) => ({
|
|
48274
48306
|
label: n(C.displayName),
|
|
48275
48307
|
value: C.key,
|
|
48276
48308
|
children: C.collectionManager.collectionInstancesArr.filter(i != null ? i : (b) => !b.hidden).map((b) => ({
|
|
@@ -48287,7 +48319,7 @@ const DataSourceSelect = connect((e) => {
|
|
|
48287
48319
|
})(d, m);
|
|
48288
48320
|
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Tag, { children: g.join(" / ") }) });
|
|
48289
48321
|
}), DataSourceCollectionCascader = connect((e) => {
|
|
48290
|
-
const t = useDataSourceManager(), n = useCompile(), g = e, { value: o, onChange: r, dataSourceFilter: a, collectionFilter: i } = g, l =
|
|
48322
|
+
const t = useDataSourceManager(), n = useCompile(), g = e, { value: o, onChange: r, dataSourceFilter: a, collectionFilter: i } = g, l = W(g, ["value", "onChange", "dataSourceFilter", "collectionFilter"]), [c, u] = parseCollectionName(o), d = [c, u].filter(Boolean), p = t.getDataSources(), m = useMemo(() => (a ? p.filter(a) : p).map((f) => ({
|
|
48291
48323
|
label: n(f.displayName),
|
|
48292
48324
|
value: f.key,
|
|
48293
48325
|
children: f.collectionManager.collectionInstancesArr.filter(i != null ? i : (C) => !C.hidden).map((C) => ({
|
|
@@ -48305,7 +48337,7 @@ const DataSourceSelect = connect((e) => {
|
|
|
48305
48337
|
return /* @__PURE__ */ jsx(Cascader$1, P(x({ showSearch: !0 }, l), { options: m, value: d, onChange: h }));
|
|
48306
48338
|
}, mapReadPretty(DataSourceCollectionCascaderReadPretty)), ColorPicker = connect(
|
|
48307
48339
|
(e) => {
|
|
48308
|
-
const r = e, { value: t, onChange: n } = r, o =
|
|
48340
|
+
const r = e, { value: t, onChange: n } = r, o = W(r, ["value", "onChange"]);
|
|
48309
48341
|
return /* @__PURE__ */ jsx("div", { role: "button", "aria-label": "color-picker-normal", style: { display: "inline-block" }, children: /* @__PURE__ */ jsx(
|
|
48310
48342
|
ColorPicker$1,
|
|
48311
48343
|
P(x({
|
|
@@ -48377,7 +48409,7 @@ const DataSourceSelect = connect((e) => {
|
|
|
48377
48409
|
default: '{{t("Default")}}'
|
|
48378
48410
|
}, ColorSelect = connect(
|
|
48379
48411
|
(e) => {
|
|
48380
|
-
const t = useCompile(), r = e, { colors: n = defaultColors } = r, o =
|
|
48412
|
+
const t = useCompile(), r = e, { colors: n = defaultColors } = r, o = W(r, ["colors"]);
|
|
48381
48413
|
return /* @__PURE__ */ jsx(Select$1, P(x({}, o), { children: Object.keys(n).map((a) => /* @__PURE__ */ jsx(Select$1.Option, { value: a, children: /* @__PURE__ */ jsx(Tag, { color: a, children: t(n[a] || n.default) }) }, a)) }));
|
|
48382
48414
|
},
|
|
48383
48415
|
mapProps((e, t) => P(x({}, e), {
|
|
@@ -48388,7 +48420,7 @@ const DataSourceSelect = connect((e) => {
|
|
|
48388
48420
|
return o[n] ? /* @__PURE__ */ jsx(Tag, { color: n, children: t(o[n] || o.default) }) : null;
|
|
48389
48421
|
})
|
|
48390
48422
|
), Input = (e) => {
|
|
48391
|
-
const o = e, { onChange: t } = o, n =
|
|
48423
|
+
const o = e, { onChange: t } = o, n = W(o, ["onChange"]);
|
|
48392
48424
|
return /* @__PURE__ */ jsx(
|
|
48393
48425
|
"fieldset",
|
|
48394
48426
|
{
|
|
@@ -49783,7 +49815,7 @@ function toSafeNumber(e) {
|
|
|
49783
49815
|
return e && (e > Number.MAX_SAFE_INTEGER || e < Number.MIN_SAFE_INTEGER ? new BigNumber(e).toString() : Number(e));
|
|
49784
49816
|
}
|
|
49785
49817
|
const InputNumber = connect((e) => {
|
|
49786
|
-
const a = e, { onChange: t } = a, n =
|
|
49818
|
+
const a = e, { onChange: t } = a, n = W(a, ["onChange"]);
|
|
49787
49819
|
let r = x({
|
|
49788
49820
|
onChange: (i) => {
|
|
49789
49821
|
Number.isNaN(i) ? t(null) : t(toSafeNumber(i));
|
|
@@ -50228,7 +50260,7 @@ const NanoIDInput = Object.assign(
|
|
|
50228
50260
|
), Pagination = withDynamicSchemaProps(
|
|
50229
50261
|
observer$1(
|
|
50230
50262
|
(e) => {
|
|
50231
|
-
const r = useProps(e), { hidden: t } = r, n =
|
|
50263
|
+
const r = useProps(e), { hidden: t } = r, n = W(r, ["hidden"]);
|
|
50232
50264
|
return t ? null : /* @__PURE__ */ jsx("div", { onKeyPress: (a) => {
|
|
50233
50265
|
a.key === "Enter" && a.preventDefault();
|
|
50234
50266
|
}, children: /* @__PURE__ */ jsx(Pagination$1, x({}, n)) });
|
|
@@ -50280,7 +50312,7 @@ const NanoIDInput = Object.assign(
|
|
|
50280
50312
|
return m += 4 * h, n > 0 && (m += 2 * (h - n)), o > 0 && (m += 2 * (h - o)), t !== h && (m += 4 * t), m += 6 * r, m += 2 * a, m += 2 * p(), h === n + o && (m -= h), h === t && (m -= t), m -= l, m -= 2 * c, m -= 3 * u, m = m < 0 ? 0 : m, m = m > 100 ? 100 : m, m >= 80 ? 100 : m >= 60 ? 80 : m >= 40 ? 60 : m >= 20 ? 40 : 20;
|
|
50281
50313
|
}, PasswordStrength = (e) => isFn(e.children) ? e.children(getStrength(String(e.value || ""))) : /* @__PURE__ */ jsx(Fragment, { children: e.children }), Password = connect(
|
|
50282
50314
|
(e) => {
|
|
50283
|
-
const l = e, { value: t, className: n, checkStrength: o, showForgotPassword: r } = l, a =
|
|
50315
|
+
const l = e, { value: t, className: n, checkStrength: o, showForgotPassword: r } = l, a = W(l, ["value", "className", "checkStrength", "showForgotPassword"]), i = {
|
|
50284
50316
|
position: "absolute",
|
|
50285
50317
|
zIndex: 1,
|
|
50286
50318
|
height: 8,
|
|
@@ -50445,7 +50477,7 @@ const useTableSelectorProps$1 = () => {
|
|
|
50445
50477
|
setSelectedRows: o,
|
|
50446
50478
|
selectedRows: r = [],
|
|
50447
50479
|
onChange: a
|
|
50448
|
-
} = useContext(RecordPickerContext), d = useTableSelectorProps$4(), { onRowSelectionChange: i, rowKey: l = "id" } = d, c =
|
|
50480
|
+
} = useContext(RecordPickerContext), d = useTableSelectorProps$4(), { onRowSelectionChange: i, rowKey: l = "id" } = d, c = W(d, ["onRowSelectionChange", "rowKey"]), { setVisible: u } = useActionContext();
|
|
50449
50481
|
return P(x({}, c), {
|
|
50450
50482
|
rowKey: l,
|
|
50451
50483
|
rowSelection: {
|
|
@@ -50471,7 +50503,7 @@ const useTableSelectorProps$1 = () => {
|
|
|
50471
50503
|
const t = useFieldSchema(), { association: n } = e, { getField: o } = useCollection_deprecated();
|
|
50472
50504
|
return n || o(t.name);
|
|
50473
50505
|
}, InputRecordPicker = (e) => {
|
|
50474
|
-
const v = e, { value: t, multiple: n, onChange: o, quickUpload: r, selectFile: a } = v, i =
|
|
50506
|
+
const v = e, { value: t, multiple: n, onChange: o, quickUpload: r, selectFile: a } = v, i = W(v, ["value", "multiple", "onChange", "quickUpload", "selectFile"]), l = useFieldNames(e), [c, u] = useState(!1), d = useFieldSchema(), p = useAssociation(e), m = useCompile(), h = useLabelUiSchema(p, (l == null ? void 0 : l.label) || "label"), g = isShowFilePicker(h), [f, C] = useState([]), [b, S] = useState([]);
|
|
50475
50507
|
useEffect(() => {
|
|
50476
50508
|
if (t) {
|
|
50477
50509
|
const I = (Array.isArray(t) ? t : t ? [t] : []).map((F) => {
|
|
@@ -50540,7 +50572,7 @@ const useTableSelectorProps$1 = () => {
|
|
|
50540
50572
|
})
|
|
50541
50573
|
] });
|
|
50542
50574
|
}, RecordPickerProvider = (e) => {
|
|
50543
|
-
const c = e, { multiple: t, onChange: n, selectedRows: o, setSelectedRows: r, options: a, collectionField: i } = c, l =
|
|
50575
|
+
const c = e, { multiple: t, onChange: n, selectedRows: o, setSelectedRows: r, options: a, collectionField: i } = c, l = W(c, ["multiple", "onChange", "selectedRows", "setSelectedRows", "options", "collectionField"]);
|
|
50544
50576
|
return /* @__PURE__ */ jsx(
|
|
50545
50577
|
RecordPickerContext.Provider,
|
|
50546
50578
|
{
|
|
@@ -51399,7 +51431,7 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
|
|
|
51399
51431
|
data: n.value
|
|
51400
51432
|
}), e);
|
|
51401
51433
|
}, SortHandle = (e) => /* @__PURE__ */ jsx(MenuOutlined, x({ className: "drag-handle", style: { cursor: "grab" } }, e)), TableIndex$1 = (e) => {
|
|
51402
|
-
const o = e, { index: t } = o, n =
|
|
51434
|
+
const o = e, { index: t } = o, n = W(o, ["index"]);
|
|
51403
51435
|
return /* @__PURE__ */ jsx("div", P(x({ className: cls("nb-table-index"), style: { padding: "0 8px 0 16px" } }, n), { children: t + 1 }));
|
|
51404
51436
|
}, useDefAction = () => ({
|
|
51405
51437
|
move() {
|
|
@@ -51416,7 +51448,7 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
|
|
|
51416
51448
|
useDataSource: l = useDefDataSource,
|
|
51417
51449
|
useAction: c = useDefAction,
|
|
51418
51450
|
onChange: u
|
|
51419
|
-
} = C, d =
|
|
51451
|
+
} = C, d = W(C, [
|
|
51420
51452
|
"dragSort",
|
|
51421
51453
|
"showIndex",
|
|
51422
51454
|
"useSelectedRowKeys",
|
|
@@ -52710,7 +52742,7 @@ const UnixTimestamp = connect(
|
|
|
52710
52742
|
const t = useGlobalVariable("$env");
|
|
52711
52743
|
return useMemo(() => t ? [t].filter(Boolean) : e, [t, e]);
|
|
52712
52744
|
}, isVariable = (e) => /{{.*?}}/.test(e), TextAreaWithGlobalScope = connect((e) => {
|
|
52713
|
-
const d = e, { supportsLineBreak: t, password: n, number: o, boolean: r, input: a, expression: i = !0 } = d, l =
|
|
52745
|
+
const d = e, { supportsLineBreak: t, password: n, number: o, boolean: r, input: a, expression: i = !0 } = d, l = W(d, ["supportsLineBreak", "password", "number", "boolean", "input", "expression"]), c = useEnvironmentVariableOptions(e.scope), u = { value: "name", label: "title" };
|
|
52714
52746
|
return t ? /* @__PURE__ */ jsx(RawTextArea, P(x({}, l), { scope: c, fieldNames: u, rows: 3 })) : o ? /* @__PURE__ */ jsx(Variable.Input, P(x({}, e), { scope: c, fieldNames: u })) : n && e.value && !isVariable(e.value) ? /* @__PURE__ */ jsx(Password, P(x({}, l), { autoFocus: !0 })) : r ? /* @__PURE__ */ jsx(Variable.Input, P(x({}, e), { scope: c, fieldNames: u })) : a ? /* @__PURE__ */ jsx(Variable.Input, P(x({}, l), { scope: c, fieldNames: u })) : i ? /* @__PURE__ */ jsx(TextArea, P(x({}, l), { scope: c, fieldNames: u })) : /* @__PURE__ */ jsx(Variable.Input, P(x({}, l), { scope: c, fieldNames: u }));
|
|
52715
52747
|
}, mapReadPretty(Input$2.ReadPretty)), isDrawerTitle = (e) => isNum$1(e) || isStr(e) || isBool(e) || React.isValidElement(e), getDrawerProps = (e) => isDrawerTitle(e) ? {
|
|
52716
52748
|
title: e
|
|
@@ -53166,12 +53198,12 @@ const useCollectionFields = (e) => {
|
|
|
53166
53198
|
const t = useCollection();
|
|
53167
53199
|
return useMemo(() => t.getFields(e), [t, e]);
|
|
53168
53200
|
}, collectionTransform = (e, t) => {
|
|
53169
|
-
const i = e, { rawTitle: n, title: o, fields: r = [] } = i, a =
|
|
53201
|
+
const i = e, { rawTitle: n, title: o, fields: r = [] } = i, a = W(i, ["rawTitle", "title", "fields"]);
|
|
53170
53202
|
return P(x({}, a), {
|
|
53171
53203
|
title: n ? o : t.i18n.t(o, { ns: "lm-collections" }),
|
|
53172
53204
|
rawTitle: n || o,
|
|
53173
53205
|
fields: r == null ? void 0 : r.map((u) => {
|
|
53174
|
-
var d = u, { uiSchema: l } = d, c =
|
|
53206
|
+
var d = u, { uiSchema: l } = d, c = W(d, ["uiSchema"]);
|
|
53175
53207
|
if (l != null && l.title) {
|
|
53176
53208
|
const p = l.title;
|
|
53177
53209
|
l.title = l.rawTitle ? p : t.i18n.t(p, { ns: "lm-collections" }), l.rawTitle = l.rawTitle || p;
|
|
@@ -53453,7 +53485,7 @@ const SelfFields = (e) => {
|
|
|
53453
53485
|
});
|
|
53454
53486
|
return /* @__PURE__ */ jsx(SchemaInitializerChildren, { children: i });
|
|
53455
53487
|
}, AssociationCollectionFields = (e) => {
|
|
53456
|
-
const m = e, { filterAssociationField: t, filterSelfField: n = () => !0, getSchema: o } = m, r =
|
|
53488
|
+
const m = e, { filterAssociationField: t, filterSelfField: n = () => !0, getSchema: o } = m, r = W(m, ["filterAssociationField", "filterSelfField", "getSchema"]), { collection: a, t: i, collectionManager: l } = e.context, c = a.getFields(), u = ["o2o", "oho", "obo", "m2o"], d = c.filter((h) => u.includes(h.interface)).filter((h) => n(h, e.context));
|
|
53457
53489
|
if (!d.length)
|
|
53458
53490
|
return null;
|
|
53459
53491
|
const p = d.map((h) => {
|
|
@@ -54528,19 +54560,19 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
54528
54560
|
{
|
|
54529
54561
|
value: O,
|
|
54530
54562
|
onChange: (U) => {
|
|
54531
|
-
var K,
|
|
54563
|
+
var K, Y;
|
|
54532
54564
|
if (R.key === "tlds" && (j.key === "email" || j.key === "domain")) {
|
|
54533
|
-
const
|
|
54534
|
-
if (
|
|
54565
|
+
const X = U.target.value;
|
|
54566
|
+
if (X === "iana")
|
|
54535
54567
|
F(M.key, "tlds", { allow: !0 });
|
|
54536
|
-
else if (
|
|
54568
|
+
else if (X === "disable")
|
|
54537
54569
|
F(M.key, "tlds", !1);
|
|
54538
|
-
else if (
|
|
54539
|
-
const
|
|
54540
|
-
F(M.key, "tlds", { allow:
|
|
54541
|
-
} else if (
|
|
54542
|
-
const
|
|
54543
|
-
F(M.key, "tlds", { deny:
|
|
54570
|
+
else if (X === "allow") {
|
|
54571
|
+
const Q = (K = M.args) == null ? void 0 : K.tlds, ee = Array.isArray(Q == null ? void 0 : Q.allow) ? Q.allow : [];
|
|
54572
|
+
F(M.key, "tlds", { allow: ee });
|
|
54573
|
+
} else if (X === "deny") {
|
|
54574
|
+
const Q = (Y = M.args) == null ? void 0 : Y.tlds, ee = Array.isArray(Q == null ? void 0 : Q.deny) ? Q.deny : [];
|
|
54575
|
+
F(M.key, "tlds", { deny: ee });
|
|
54544
54576
|
}
|
|
54545
54577
|
} else
|
|
54546
54578
|
F(M.key, R.key, U.target.value);
|
|
@@ -54549,21 +54581,21 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
54549
54581
|
}
|
|
54550
54582
|
),
|
|
54551
54583
|
(L = R.options) == null ? void 0 : L.map((U) => {
|
|
54552
|
-
var K,
|
|
54584
|
+
var K, Y, X;
|
|
54553
54585
|
return U.value === O && U.componentType ? /* @__PURE__ */ jsx("div", { style: { marginTop: c.marginXS }, children: U.componentType === "text" ? (() => {
|
|
54554
|
-
var
|
|
54586
|
+
var ee;
|
|
54555
54587
|
if (R.key === "tlds" && (U.value === "allow" || U.value === "deny")) {
|
|
54556
|
-
const
|
|
54557
|
-
U.value === "allow" ?
|
|
54558
|
-
) ? U.value === "allow" ?
|
|
54588
|
+
const J = (ee = M.args) == null ? void 0 : ee.tlds, Z = Array.isArray(
|
|
54589
|
+
U.value === "allow" ? J == null ? void 0 : J.allow : J == null ? void 0 : J.deny
|
|
54590
|
+
) ? U.value === "allow" ? J.allow : J.deny : [];
|
|
54559
54591
|
return /* @__PURE__ */ jsx(
|
|
54560
54592
|
Select$1,
|
|
54561
54593
|
{
|
|
54562
54594
|
mode: "tags",
|
|
54563
|
-
value:
|
|
54564
|
-
onChange: (
|
|
54595
|
+
value: Z,
|
|
54596
|
+
onChange: (te) => {
|
|
54565
54597
|
const re = Array.from(
|
|
54566
|
-
new Set(
|
|
54598
|
+
new Set(te.map((se) => String(se).trim()).filter(Boolean))
|
|
54567
54599
|
);
|
|
54568
54600
|
U.value === "allow" ? F(M.key, "tlds", { allow: re }) : F(M.key, "tlds", { deny: re });
|
|
54569
54601
|
},
|
|
@@ -54578,7 +54610,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
54578
54610
|
Input$3,
|
|
54579
54611
|
{
|
|
54580
54612
|
value: "",
|
|
54581
|
-
onChange: (
|
|
54613
|
+
onChange: (J) => F(M.key, `${R.key}_${U.value}`, J.target.value),
|
|
54582
54614
|
style: { width: "100%" }
|
|
54583
54615
|
}
|
|
54584
54616
|
);
|
|
@@ -54588,21 +54620,21 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
54588
54620
|
precision: y ? void 0 : 0,
|
|
54589
54621
|
step: y ? 0.1 : 1,
|
|
54590
54622
|
value: ((K = M.args) == null ? void 0 : K[`${R.key}_${U.value}`]) || "",
|
|
54591
|
-
onChange: (
|
|
54623
|
+
onChange: (Q) => F(M.key, `${R.key}_${U.value}`, Q),
|
|
54592
54624
|
style: { width: "100%" }
|
|
54593
54625
|
}
|
|
54594
54626
|
) : U.componentType === "checkbox" ? /* @__PURE__ */ jsx(
|
|
54595
54627
|
Checkbox$1,
|
|
54596
54628
|
{
|
|
54597
|
-
checked: ((
|
|
54598
|
-
onChange: (
|
|
54629
|
+
checked: ((Y = M.args) == null ? void 0 : Y[`${R.key}_${U.value}`]) || !1,
|
|
54630
|
+
onChange: (Q) => F(M.key, `${R.key}_${U.value}`, Q.target.checked),
|
|
54599
54631
|
children: l(U.label)
|
|
54600
54632
|
}
|
|
54601
54633
|
) : U.componentType === "datePicker" ? /* @__PURE__ */ jsx(
|
|
54602
54634
|
DatePicker$1,
|
|
54603
54635
|
{
|
|
54604
|
-
value: (
|
|
54605
|
-
onChange: (
|
|
54636
|
+
value: (X = M.args) != null && X[`${R.key}_${U.value}`] ? dayjs(M.args[`${R.key}_${U.value}`]) : null,
|
|
54637
|
+
onChange: (Q) => F(M.key, `${R.key}_${U.value}`, Q == null ? void 0 : Q.toISOString()),
|
|
54606
54638
|
placeholder: l("Select date"),
|
|
54607
54639
|
style: { width: "100%" }
|
|
54608
54640
|
}
|
|
@@ -55357,7 +55389,7 @@ const supportTypes = ["string", "bigInt", "integer", "uuid", "uid", "nanoid"], S
|
|
|
55357
55389
|
const t = useRecord(), n = useCollectionParentRecordData();
|
|
55358
55390
|
return /* @__PURE__ */ jsx(EditFieldAction, x({ item: t, parentItem: n }, e));
|
|
55359
55391
|
}, EditFieldAction = (e) => {
|
|
55360
|
-
const F = e, { scope: t, getContainer: n, item: o, parentItem: r, children: a } = F, i =
|
|
55392
|
+
const F = e, { scope: t, getContainer: n, item: o, parentItem: r, children: a } = F, i = W(F, ["scope", "getContainer", "item", "parentItem", "children"]), { getInterface: l, collections: c, getCollection: u } = useCollectionManager_deprecated(), [d, p] = useState(!1), [m, h] = useState({}), g = useAPIClient(), { t: f } = useTranslation(), C = useCompile(), [b, S] = useState({}), { isDialect: y } = useDialect(), v = useMemo(() => {
|
|
55361
55393
|
var w;
|
|
55362
55394
|
return (o == null ? void 0 : o.fields) || ((w = u(o.collectionName)) == null ? void 0 : w.options.fields.filter((T) => ["string", "bigInt", "integer"].includes(T.type)).map((T) => {
|
|
55363
55395
|
var D;
|
|
@@ -55928,7 +55960,7 @@ const getSchema$4 = (e, t, n) => {
|
|
|
55928
55960
|
const t = useRecord();
|
|
55929
55961
|
return /* @__PURE__ */ jsx(EditCollectionAction, x({ item: t }, e));
|
|
55930
55962
|
}, EditCollectionAction = (e) => {
|
|
55931
|
-
const h = e, { scope: t, getContainer: n, item: o, children: r } = h, a =
|
|
55963
|
+
const h = e, { scope: t, getContainer: n, item: o, children: r } = h, a = W(h, ["scope", "getContainer", "item", "children"]), { getTemplate: i } = useCollectionManager_deprecated(), [l, c] = useState(!1), [u, d] = useState({}), { t: p } = useTranslation(), m = useCompile();
|
|
55932
55964
|
return /* @__PURE__ */ jsx(RecordProvider, { record: o, children: /* @__PURE__ */ jsxs(ActionContextProvider, { value: { visible: l, setVisible: c }, children: [
|
|
55933
55965
|
/* @__PURE__ */ jsx(
|
|
55934
55966
|
"a",
|
|
@@ -56389,7 +56421,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
56389
56421
|
}, AsyncDataContext = createContext(null);
|
|
56390
56422
|
AsyncDataContext.displayName = "AsyncDataContext";
|
|
56391
56423
|
const AsyncDataProvider = (e) => {
|
|
56392
|
-
const i = e, { value: t, request: n, children: o } = i, r =
|
|
56424
|
+
const i = e, { value: t, request: n, children: o } = i, r = W(i, ["value", "request", "children"]), a = useRequest(n, x({}, r));
|
|
56393
56425
|
return t ? /* @__PURE__ */ jsx(AsyncDataContext.Provider, { value: t, children: o }) : /* @__PURE__ */ jsx(AsyncDataContext.Provider, { value: a, children: o });
|
|
56394
56426
|
}, useAsyncData = () => useContext(AsyncDataContext), inferInterface = (e, t) => e.toLowerCase().includes("id") ? "id" : typeof t == "number" ? Number.isInteger(t) ? "integer" : "number" : typeof t == "boolean" ? "checkbox" : dayjs(t).isValid() ? "datetime" : "input", useSourceFieldsOptions = () => {
|
|
56395
56427
|
const e = useForm(), { sources: t = [] } = e.values, { t: n } = useTranslation(), { getCollection: o, getInheritCollections: r, getParentCollectionFields: a } = useCollectionManager_deprecated(), i = [];
|
|
@@ -56851,7 +56883,7 @@ const AsyncDataProvider = (e) => {
|
|
|
56851
56883
|
}
|
|
56852
56884
|
};
|
|
56853
56885
|
}, DeleteCollectionAction = (e) => {
|
|
56854
|
-
const h = e, { scope: t, getContainer: n, item: o, children: r, isBulk: a, useAction: i } = h, l =
|
|
56886
|
+
const h = e, { scope: t, getContainer: n, item: o, children: r, isBulk: a, useAction: i } = h, l = W(h, ["scope", "getContainer", "item", "children", "isBulk", "useAction"]), { t: c } = useTranslation(), [u, d] = useState(!1), p = () => a ? useBulkDestroyActionAndRefreshCM : i || useDestroyActionAndRefreshCM, m = () => /* @__PURE__ */ jsxs("span", { children: [
|
|
56855
56887
|
/* @__PURE__ */ jsx(ExclamationCircleFilled, { style: { color: "#faad14", marginRight: "12px", fontSize: "22px" } }),
|
|
56856
56888
|
/* @__PURE__ */ jsx("span", { style: { fontSize: "19px" }, children: c("Delete collection") })
|
|
56857
56889
|
] });
|
|
@@ -61276,7 +61308,7 @@ const useBlockContext = () => useContext(BlockContext), useCompatDataBlockParent
|
|
|
61276
61308
|
};
|
|
61277
61309
|
return n.__collection && i && !["oho", "m2o", "obo"].includes(i.interface) && (u.targetCollection = n.__collection), !t && Object.keys(c).length > 0 && (u.filter = c), u;
|
|
61278
61310
|
}, RecordLink = (e) => {
|
|
61279
|
-
const t = useField(), n = useRecord(), l = e, { title: o, to: r } = l, a =
|
|
61311
|
+
const t = useField(), n = useRecord(), l = e, { title: o, to: r } = l, a = W(l, ["title", "to"]), i = template(r || "");
|
|
61280
61312
|
return /* @__PURE__ */ jsx(Link$1, P(x({}, a), { to: i({ record: n || {} }), children: t.title }));
|
|
61281
61313
|
}, ACLContext = createContext({});
|
|
61282
61314
|
ACLContext.displayName = "ACLContext";
|
|
@@ -64246,7 +64278,7 @@ AppLangContext.displayName = "AppLangContext";
|
|
|
64246
64278
|
const useAppLangContext = () => useContext(AppLangContext);
|
|
64247
64279
|
function AntdConfigProvider(e) {
|
|
64248
64280
|
var c;
|
|
64249
|
-
const l = e, { remoteLocale: t } = l, n =
|
|
64281
|
+
const l = e, { remoteLocale: t } = l, n = W(l, ["remoteLocale"]), o = useAPIClient(), { i18n: r } = useTranslation(), { data: a, loading: i } = useRequest(
|
|
64250
64282
|
{
|
|
64251
64283
|
url: "app:getLang",
|
|
64252
64284
|
params: {
|
|
@@ -65114,20 +65146,20 @@ const ActionInitializerItem = (e) => {
|
|
|
65114
65146
|
}, 100);
|
|
65115
65147
|
}, [i.default, d]), !a)
|
|
65116
65148
|
return null;
|
|
65117
|
-
const $ = (
|
|
65118
|
-
B(
|
|
65119
|
-
}, A = (
|
|
65120
|
-
M(
|
|
65121
|
-
}, E = (
|
|
65122
|
-
var
|
|
65123
|
-
const
|
|
65124
|
-
(y ||
|
|
65149
|
+
const $ = (Y) => {
|
|
65150
|
+
B(Y), R(!1);
|
|
65151
|
+
}, A = (Y) => {
|
|
65152
|
+
M(Y), d(Y), p == null || p(Y);
|
|
65153
|
+
}, E = (Y) => {
|
|
65154
|
+
var Q;
|
|
65155
|
+
const X = (Q = h == null ? void 0 : h[0]) == null ? void 0 : Q.filter;
|
|
65156
|
+
(y || X) && g(P(x({}, h == null ? void 0 : h[0]), {
|
|
65125
65157
|
filter: f
|
|
65126
|
-
})), v(!y),
|
|
65127
|
-
}, z = (
|
|
65128
|
-
|
|
65129
|
-
}, L = (
|
|
65130
|
-
m(
|
|
65158
|
+
})), v(!y), Y.stopPropagation();
|
|
65159
|
+
}, z = (Y) => {
|
|
65160
|
+
Y.stopPropagation();
|
|
65161
|
+
}, L = (Y) => {
|
|
65162
|
+
m(Y);
|
|
65131
65163
|
}, V = (K = i.title) != null ? K : (U = a == null ? void 0 : a.uiSchema) == null ? void 0 : U.title;
|
|
65132
65164
|
return t(
|
|
65133
65165
|
/* @__PURE__ */ jsxs(SortableItem, { className: cls(n, o, "nb-block-item", e.className, "SortableItem"), children: [
|
|
@@ -65178,7 +65210,7 @@ const ActionInitializerItem = (e) => {
|
|
|
65178
65210
|
treeData: u,
|
|
65179
65211
|
onSelect: A,
|
|
65180
65212
|
fieldNames: T,
|
|
65181
|
-
titleRender: (
|
|
65213
|
+
titleRender: (Y) => /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: getLabelFormatValue(O, c(Y[w])) }),
|
|
65182
65214
|
selectedKeys: N,
|
|
65183
65215
|
blockNode: !0
|
|
65184
65216
|
}
|
|
@@ -65395,7 +65427,7 @@ const AssociationFilterDesignerDelete = () => {
|
|
|
65395
65427
|
}
|
|
65396
65428
|
);
|
|
65397
65429
|
}, BlockInitializer = (e) => {
|
|
65398
|
-
const a = e, { item: t, schema: n } = a, o =
|
|
65430
|
+
const a = e, { item: t, schema: n } = a, o = W(a, ["item", "schema"]), { insert: r } = useSchemaInitializer();
|
|
65399
65431
|
return /* @__PURE__ */ jsx(
|
|
65400
65432
|
SchemaInitializerItem,
|
|
65401
65433
|
P(x({}, o), {
|
|
@@ -65407,7 +65439,7 @@ const AssociationFilterDesignerDelete = () => {
|
|
|
65407
65439
|
})
|
|
65408
65440
|
);
|
|
65409
65441
|
}, BlockItemInitializer = () => {
|
|
65410
|
-
const e = useSchemaInitializerItem(), o = e, { schema: t } = o, n =
|
|
65442
|
+
const e = useSchemaInitializerItem(), o = e, { schema: t } = o, n = W(o, ["schema"]);
|
|
65411
65443
|
return /* @__PURE__ */ jsx(BlockInitializer, P(x({}, n), { item: e }));
|
|
65412
65444
|
}, CreateFilterActionInitializer = (e) => {
|
|
65413
65445
|
const t = {
|
|
@@ -65746,7 +65778,7 @@ const DataBlockInitializer = (e) => {
|
|
|
65746
65778
|
}
|
|
65747
65779
|
};
|
|
65748
65780
|
}, RecordAssociationBlockInitializer = () => {
|
|
65749
|
-
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = p, r =
|
|
65781
|
+
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = p, r = W(p, ["onCreateBlockSchema", "componentType", "createBlockSchema"]), { insert: a } = useSchemaInitializer(), { getTemplateSchemaByMode: i } = useSchemaTemplateManager(), { getCollection: l } = useCollectionManager_deprecated(), c = e.field, u = l(c.target), d = `${c.collectionName}.${c.name}`;
|
|
65750
65782
|
return /* @__PURE__ */ jsx(
|
|
65751
65783
|
SchemaInitializerItem,
|
|
65752
65784
|
P(x({
|
|
@@ -65840,7 +65872,7 @@ function createDetailsWithPaginationUISchema(e) {
|
|
|
65840
65872
|
};
|
|
65841
65873
|
}
|
|
65842
65874
|
const RecordAssociationDetailsBlockInitializer = () => {
|
|
65843
|
-
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = p, r =
|
|
65875
|
+
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = p, r = W(p, ["onCreateBlockSchema", "componentType", "createBlockSchema"]), { insert: a } = useSchemaInitializer(), { getTemplateSchemaByMode: i } = useSchemaTemplateManager(), { getCollection: l } = useCollectionManager_deprecated(), c = e.field, u = l(c.target), d = `${c.collectionName}.${c.name}`;
|
|
65844
65876
|
return /* @__PURE__ */ jsx(
|
|
65845
65877
|
SchemaInitializerItem,
|
|
65846
65878
|
P(x({
|
|
@@ -65926,7 +65958,7 @@ function createCreateFormBlockUISchema(e) {
|
|
|
65926
65958
|
};
|
|
65927
65959
|
}
|
|
65928
65960
|
const RecordAssociationFormBlockInitializer = () => {
|
|
65929
|
-
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = p, r =
|
|
65961
|
+
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = p, r = W(p, ["onCreateBlockSchema", "componentType", "createBlockSchema"]), { insert: a } = useSchemaInitializer(), { getCollection: i } = useCollectionManager_deprecated(), { getTemplateSchemaByMode: l } = useSchemaTemplateManager(), c = e.field, u = c.target, d = useMemo(() => i(u), [u]);
|
|
65930
65962
|
return /* @__PURE__ */ jsx(
|
|
65931
65963
|
SchemaInitializerItem,
|
|
65932
65964
|
P(x({
|
|
@@ -66054,7 +66086,7 @@ const createGridCardBlockUISchema = (e) => {
|
|
|
66054
66086
|
}
|
|
66055
66087
|
};
|
|
66056
66088
|
}, RecordAssociationGridCardBlockInitializer = () => {
|
|
66057
|
-
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = p, r =
|
|
66089
|
+
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = p, r = W(p, ["onCreateBlockSchema", "componentType", "createBlockSchema"]), { insert: a } = useSchemaInitializer(), { getTemplateSchemaByMode: i } = useSchemaTemplateManager(), { getCollection: l } = useCollectionManager_deprecated(), c = e.field, u = l(c.target), d = `${c.collectionName}.${c.name}`;
|
|
66058
66090
|
return /* @__PURE__ */ jsx(
|
|
66059
66091
|
SchemaInitializerItem,
|
|
66060
66092
|
P(x({
|
|
@@ -66159,7 +66191,7 @@ const createListBlockUISchema = (e) => {
|
|
|
66159
66191
|
}
|
|
66160
66192
|
};
|
|
66161
66193
|
}, RecordAssociationListBlockInitializer = () => {
|
|
66162
|
-
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = p, r =
|
|
66194
|
+
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = p, r = W(p, ["onCreateBlockSchema", "componentType", "createBlockSchema"]), { insert: a } = useSchemaInitializer(), { getTemplateSchemaByMode: i } = useSchemaTemplateManager(), { getCollection: l } = useCollectionManager_deprecated(), c = e.field, u = l(c.target), d = `${c.collectionName}.${c.name}`;
|
|
66163
66195
|
return /* @__PURE__ */ jsx(
|
|
66164
66196
|
SchemaInitializerItem,
|
|
66165
66197
|
P(x({
|
|
@@ -66248,7 +66280,7 @@ function createDetailsUISchema(e) {
|
|
|
66248
66280
|
});
|
|
66249
66281
|
}
|
|
66250
66282
|
const RecordReadPrettyAssociationFormBlockInitializer = () => {
|
|
66251
|
-
const e = useSchemaInitializerItem(), m = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = m, r =
|
|
66283
|
+
const e = useSchemaInitializerItem(), m = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = m, r = W(m, ["onCreateBlockSchema", "componentType", "createBlockSchema"]), { insert: a } = useSchemaInitializer(), { getCollection: i } = useCollectionManager_deprecated(), { getTemplateSchemaByMode: l } = useSchemaTemplateManager(), c = e.field, u = c.target, d = i(u), p = `${c.collectionName}.${c.name}`;
|
|
66252
66284
|
return /* @__PURE__ */ jsx(
|
|
66253
66285
|
SchemaInitializerItem,
|
|
66254
66286
|
P(x({
|
|
@@ -66405,7 +66437,7 @@ const SelectActionInitializer = (e) => {
|
|
|
66405
66437
|
return /* @__PURE__ */ jsx(InitializerWithSwitch, P(x({}, t), { schema: e, item: t, type: "x-action-column" }));
|
|
66406
66438
|
};
|
|
66407
66439
|
function ModalActionSchemaInitializerItem(e) {
|
|
66408
|
-
const d = e, { modalSchema: t = {}, components: n = {} } = d, o =
|
|
66440
|
+
const d = e, { modalSchema: t = {}, components: n = {} } = d, o = W(d, ["modalSchema", "components"]), p = t, { properties: r } = p, a = W(p, ["properties"]), [i, l] = useState(!1), { setVisible: c } = useSchemaInitializer$1(), u = useMemo(() => P(x({
|
|
66409
66441
|
name: uid$1(),
|
|
66410
66442
|
"x-component": "Action.Modal",
|
|
66411
66443
|
"x-component-props": {
|
|
@@ -66704,7 +66736,7 @@ const items = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
66704
66736
|
}, r = useSchemaInitializerItem();
|
|
66705
66737
|
return /* @__PURE__ */ jsx(BlockInitializer, P(x({}, r), { schema: o, item: r }));
|
|
66706
66738
|
}, useTableSelectorProps = () => {
|
|
66707
|
-
const { setSelectedRows: e } = useContext(RecordPickerContext), r = useTableSelectorProps$4(), { onRowSelectionChange: t, rowKey: n = "id" } = r, o =
|
|
66739
|
+
const { setSelectedRows: e } = useContext(RecordPickerContext), r = useTableSelectorProps$4(), { onRowSelectionChange: t, rowKey: n = "id" } = r, o = W(r, ["onRowSelectionChange", "rowKey"]);
|
|
66708
66740
|
return P(x({}, o), {
|
|
66709
66741
|
rowKey: n,
|
|
66710
66742
|
rowSelection: {
|
|
@@ -67168,7 +67200,7 @@ const items = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
67168
67200
|
}, commonOptions$i),
|
|
67169
67201
|
readPrettyFormItemInitializers_deprecated
|
|
67170
67202
|
), RecordReadPrettyFormBlockInitializer = () => {
|
|
67171
|
-
const l = useSchemaInitializerItem(), { icon: t = !0, targetCollection: n } = l, o =
|
|
67203
|
+
const l = useSchemaInitializerItem(), { icon: t = !0, targetCollection: n } = l, o = W(l, ["icon", "targetCollection"]), r = useCollection_deprecated(), a = n || r, { createSingleDetailsSchema: i } = useCreateSingleDetailsSchema();
|
|
67172
67204
|
return /* @__PURE__ */ jsx(
|
|
67173
67205
|
SchemaInitializerItem,
|
|
67174
67206
|
P(x({
|
|
@@ -67369,7 +67401,7 @@ function createEditFormBlockUISchema(e) {
|
|
|
67369
67401
|
});
|
|
67370
67402
|
}
|
|
67371
67403
|
const RecordFormBlockInitializer = () => {
|
|
67372
|
-
const u = useSchemaInitializerItem(), { targetCollection: t } = u, n =
|
|
67404
|
+
const u = useSchemaInitializerItem(), { targetCollection: t } = u, n = W(u, ["targetCollection"]), { insert: o } = useSchemaInitializer(), { getTemplateSchemaByMode: r } = useSchemaTemplateManager(), a = useCollection_deprecated(), i = t || a, { createEditFormBlock: l, templateWrap: c } = useCreateEditFormBlock();
|
|
67373
67405
|
return /* @__PURE__ */ jsx(
|
|
67374
67406
|
SchemaInitializerItem,
|
|
67375
67407
|
P(x({
|
|
@@ -68041,7 +68073,7 @@ const commonOptions$h = {
|
|
|
68041
68073
|
}
|
|
68042
68074
|
};
|
|
68043
68075
|
}, TableSelectorInitializer = () => {
|
|
68044
|
-
const l = useSchemaInitializerItem(), { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = l, r =
|
|
68076
|
+
const l = useSchemaInitializerItem(), { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = l, r = W(l, ["onCreateBlockSchema", "componentType", "createBlockSchema"]), { insert: a } = useSchemaInitializer(), i = useCollection_deprecated();
|
|
68045
68077
|
return /* @__PURE__ */ jsx(
|
|
68046
68078
|
SchemaInitializerItem,
|
|
68047
68079
|
P(x({
|
|
@@ -68066,7 +68098,7 @@ const commonOptions$h = {
|
|
|
68066
68098
|
{
|
|
68067
68099
|
title: e("Column width"),
|
|
68068
68100
|
component: React.forwardRef((r, a) => {
|
|
68069
|
-
const u = r, { children: i, onClick: l } = u, c =
|
|
68101
|
+
const u = r, { children: i, onClick: l } = u, c = W(u, ["children", "onClick"]);
|
|
68070
68102
|
return /* @__PURE__ */ jsx(
|
|
68071
68103
|
SchemaInitializerItem,
|
|
68072
68104
|
P(x({
|