@nocobase/client 1.5.6 → 1.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ var Te = (e, t, n) => t in e ? Me(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
11
11
|
je.call(t, n) && Te(e, n, t[n]);
|
|
12
12
|
return e;
|
|
13
13
|
}, P = (e, t) => $e(e, Be(t));
|
|
14
|
-
var
|
|
14
|
+
var W = (e, t) => {
|
|
15
15
|
var n = {};
|
|
16
16
|
for (var o in e)
|
|
17
17
|
De.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
|
|
@@ -58,7 +58,7 @@ import * as ahooks from "ahooks";
|
|
|
58
58
|
import { useSetState, useRequest as useRequest$1, useBoolean, useUpdate, useMemoizedFn, useDeepCompareEffect, useLocalStorageState, useEventListener, useCreation, useDebounce } from "ahooks";
|
|
59
59
|
import * as antd from "antd";
|
|
60
60
|
import { notification, Result, Button, Space as Space$1, Radio as Radio$1, Input as Input$3, Tag, Spin, Select as Select$1, theme as theme$1, App, ConfigProvider, message, Popover, Menu as Menu$1, Modal, Typography, Tooltip, Skeleton, Table as Table$3, Drawer as Drawer$1, Slider, Tree as Tree$2, Alert, Flex, Switch, Divider as Divider$1, Empty, DatePicker as DatePicker$1, Card, Collapse, Badge, Dropdown, Cascader as Cascader$1, Image, InputNumber as InputNumber$1, Tabs as Tabs$1, TreeSelect as TreeSelect$2, Upload as Upload$1, Progress, AutoComplete as AutoComplete$1, Checkbox as Checkbox$1, ColorPicker as ColorPicker$1, List as List$1, Col, QRCode, Pagination as Pagination$1, TimePicker as TimePicker$1, Row, Popconfirm, Layout as Layout$1 } from "antd";
|
|
61
|
-
import _, { filter, get, capitalize, cloneDeep as cloneDeep$1, isArray, every, some, findIndex, set, isObject as isObject$1, isEmpty as isEmpty$1, isString, omit, isEqual, concat, last, clone, debounce, castArray, uniqBy, differenceBy, unionBy, isFunction as isFunction$1, isBoolean, uniq as uniq$2, pick as pick$1 } from "lodash";
|
|
61
|
+
import _, { filter, get, capitalize, cloneDeep as cloneDeep$1, isArray, every, some, findIndex, set, isObject as isObject$1, isEmpty as isEmpty$1, isString, omit, isEqual, concat, last, clone, debounce, castArray, uniqBy, differenceBy, unionBy, isFunction as isFunction$1, isBoolean, toString, uniq as uniq$2, pick as pick$1 } from "lodash";
|
|
62
62
|
import template from "lodash/template";
|
|
63
63
|
import React, { createContext, useContext, useMemo, useRef, useEffect, isValidElement, useCallback, memo, useState, Suspense, useDeferredValue, createElement, Fragment as Fragment$1, startTransition, useLayoutEffect, forwardRef, useImperativeHandle, lazy as lazy$1, createRef } from "react";
|
|
64
64
|
import * as ReactRouterDom from "react-router-dom";
|
|
@@ -4561,7 +4561,7 @@ function toSchema(e) {
|
|
|
4561
4561
|
}) : new Schema(e);
|
|
4562
4562
|
}
|
|
4563
4563
|
const useMemoizedSchema = (e) => useMemo(() => toSchema(e), []), SchemaComponentOnChangeContext = createContext({ onChange: _.noop }), RecursionSchemaComponent = memo((e) => {
|
|
4564
|
-
const m = e, { components: t, scope: n, schema: o, distributed: r, onChange: i } = m, a =
|
|
4564
|
+
const m = e, { components: t, scope: n, schema: o, distributed: r, onChange: i } = m, a = W(m, ["components", "scope", "schema", "distributed", "onChange"]), l = useContext(SchemaComponentContext), c = useMemo(() => toSchema(o), [o]), u = useMemo(
|
|
4565
4565
|
() => P(x({}, l), {
|
|
4566
4566
|
distributed: l.distributed == !1 ? !1 : r,
|
|
4567
4567
|
/**
|
|
@@ -4582,13 +4582,13 @@ const useMemoizedSchema = (e) => useMemo(() => toSchema(e), []), SchemaComponent
|
|
|
4582
4582
|
});
|
|
4583
4583
|
RecursionSchemaComponent.displayName = "RecursionSchemaComponent";
|
|
4584
4584
|
const MemoizedSchemaComponent = memo((e) => {
|
|
4585
|
-
const r = e, { schema: t } = r, n =
|
|
4585
|
+
const r = e, { schema: t } = r, n = W(r, ["schema"]), o = useMemoizedSchema(t);
|
|
4586
4586
|
return /* @__PURE__ */ jsx(RecursionSchemaComponent, P(x({}, n), { schema: o }));
|
|
4587
4587
|
});
|
|
4588
4588
|
MemoizedSchemaComponent.displayName = "MemoizedSchemaComponent";
|
|
4589
4589
|
const SchemaComponent = memo(
|
|
4590
4590
|
(e) => {
|
|
4591
|
-
const o = e, { memoized: t } = o, n =
|
|
4591
|
+
const o = e, { memoized: t } = o, n = W(o, ["memoized"]);
|
|
4592
4592
|
return t ? /* @__PURE__ */ jsx(MemoizedSchemaComponent, x({}, n)) : /* @__PURE__ */ jsx(RecursionSchemaComponent, x({}, n));
|
|
4593
4593
|
}
|
|
4594
4594
|
);
|
|
@@ -6391,7 +6391,7 @@ const DataBlockResourceContext = createContext(null), RerenderDataBlockProvider
|
|
|
6391
6391
|
return /* @__PURE__ */ jsx(r.Component, { name: r.name, allowNull: o, children: e.children });
|
|
6392
6392
|
}, DataBlockProvider = withDynamicSchemaProps(
|
|
6393
6393
|
React.memo((e) => {
|
|
6394
|
-
const c = e, { collection: t, association: n, dataSource: o, children: r, hidden: i } = c, a =
|
|
6394
|
+
const c = e, { collection: t, association: n, dataSource: o, children: r, hidden: i } = c, a = W(c, ["collection", "association", "dataSource", "children", "hidden"]), { dn: l } = useDesignable();
|
|
6395
6395
|
return i ? null : /* @__PURE__ */ jsx(
|
|
6396
6396
|
DataBlockContext.Provider,
|
|
6397
6397
|
{
|
|
@@ -8503,7 +8503,7 @@ Object.keys(antIcons).forEach((e) => {
|
|
|
8503
8503
|
e.endsWith("Outlined") && registerIcon(e, antIcons[e]);
|
|
8504
8504
|
});
|
|
8505
8505
|
const Icon = (e) => {
|
|
8506
|
-
const r = e, { type: t = "", component: n } = r, o =
|
|
8506
|
+
const r = e, { type: t = "", component: n } = r, o = W(r, ["type", "component"]);
|
|
8507
8507
|
if (n)
|
|
8508
8508
|
return /* @__PURE__ */ jsx(antIcons__default, x({ component: n }, o));
|
|
8509
8509
|
if (t && icons.has(t.toLowerCase())) {
|
|
@@ -8575,7 +8575,7 @@ class PluginSettingsManager {
|
|
|
8575
8575
|
const o = this.hasAuth(t), r = this.getSetting(t);
|
|
8576
8576
|
if (n && !o || !r)
|
|
8577
8577
|
return null;
|
|
8578
|
-
const i = 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: a, icon: l, aclSnippet: c } = d, u =
|
|
8578
|
+
const i = 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: a, icon: l, aclSnippet: c } = d, u = W(d, ["title", "icon", "aclSnippet"]);
|
|
8579
8579
|
return P(x({
|
|
8580
8580
|
isTopLevel: t === r.topLevelName
|
|
8581
8581
|
}, u), {
|
|
@@ -8603,7 +8603,7 @@ const ApplicationContext = createContext(null);
|
|
|
8603
8603
|
ApplicationContext.displayName = "ApplicationContext";
|
|
8604
8604
|
const AppComponent = observer(
|
|
8605
8605
|
(n) => {
|
|
8606
|
-
var o = n, { children: e } = o, t =
|
|
8606
|
+
var o = n, { children: e } = o, t = W(o, ["children"]);
|
|
8607
8607
|
var l;
|
|
8608
8608
|
const { app: r } = t, i = useCallback((c, u) => {
|
|
8609
8609
|
console.error(c);
|
|
@@ -8686,7 +8686,7 @@ class RouterManager {
|
|
|
8686
8686
|
if (Object.keys(i).length === 1 && i.children)
|
|
8687
8687
|
r.push(...n(i.children));
|
|
8688
8688
|
else {
|
|
8689
|
-
const a = i, { Component: l, element: c, children: u } = a, d =
|
|
8689
|
+
const a = i, { Component: l, element: c, children: u } = a, d = W(a, ["Component", "element", "children"]);
|
|
8690
8690
|
let p = c;
|
|
8691
8691
|
l && (typeof l == "string" ? p = this.app.renderComponent(l) : p = React.createElement(l));
|
|
8692
8692
|
const m = P(x({}, d), {
|
|
@@ -8715,7 +8715,7 @@ class RouterManager {
|
|
|
8715
8715
|
* @internal
|
|
8716
8716
|
*/
|
|
8717
8717
|
getRouterComponent(t) {
|
|
8718
|
-
const u = this.options, { type: n = "browser" } = u, o =
|
|
8718
|
+
const u = this.options, { type: n = "browser" } = u, o = W(u, ["type"]), i = {
|
|
8719
8719
|
hash: HashRouter,
|
|
8720
8720
|
browser: BrowserRouter,
|
|
8721
8721
|
memory: MemoryRouter
|
|
@@ -8861,7 +8861,7 @@ const useNiceDropdownMaxHeight = (e = []) => {
|
|
|
8861
8861
|
}, FlagContext = React.createContext(null), FlagProvider = (e) => /* @__PURE__ */ jsx(FlagContext.Provider, { value: e, children: e.children }), useFlag = () => useContext(FlagContext) || {}, { ConfigContext } = ConfigProvider, useConfig = () => useContext(ConfigContext), usePrefixCls = (e, t) => {
|
|
8862
8862
|
const { getPrefixCls: n } = useContext(ConfigProvider.ConfigContext) || {};
|
|
8863
8863
|
return "ConfigContext" in ConfigProvider ? (n == null ? void 0 : n(e, t == null ? void 0 : t.prefixCls)) || "" : `ant-${e != null ? e : ""}`;
|
|
8864
|
-
}, useToken = () => theme$1.useToken(), loading
|
|
8864
|
+
}, useToken = () => theme$1.useToken(), loading = (e = "Loading...", t) => q(void 0, null, function* () {
|
|
8865
8865
|
let n = null;
|
|
8866
8866
|
const o = setTimeout(() => {
|
|
8867
8867
|
n = message.loading(e);
|
|
@@ -9124,7 +9124,7 @@ function withInitializer(e) {
|
|
|
9124
9124
|
);
|
|
9125
9125
|
}
|
|
9126
9126
|
const SchemaInitializerSubMenuContext = React.createContext({}), SchemaInitializerMenuProvider = (e) => /* @__PURE__ */ jsx(SchemaInitializerSubMenuContext.Provider, { value: { isInMenu: !0 }, children: e.children }), useSchemaInitializerSubMenuContext = () => React.useContext(SchemaInitializerSubMenuContext), SchemaInitializerMenu = (e) => {
|
|
9127
|
-
const { componentCls: t, hashId: n } = useSchemaInitializerStyles(), l = e, { items: o } = l, r =
|
|
9127
|
+
const { componentCls: t, hashId: n } = useSchemaInitializerStyles(), l = e, { items: o } = l, r = W(l, ["items"]), { token: i } = theme$1.useToken(), a = useMemo(
|
|
9128
9128
|
() => o.map((c) => P(x({}, c), {
|
|
9129
9129
|
popupClassName: `${n} ${t}-menu-sub`
|
|
9130
9130
|
})),
|
|
@@ -9173,7 +9173,7 @@ const SchemaInitializerSubMenuContext = React.createContext({}), SchemaInitializ
|
|
|
9173
9173
|
) });
|
|
9174
9174
|
}, SchemaInitializerSubMenu = (e) => {
|
|
9175
9175
|
var f;
|
|
9176
|
-
const g = e, { children: t, items: n, title: o, name: r, onOpenChange: i, icon: a } = g, l =
|
|
9176
|
+
const g = e, { children: t, items: n, title: o, name: r, onOpenChange: i, icon: a } = 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(() => [
|
|
9177
9177
|
P(x({}, l), {
|
|
9178
9178
|
key: d,
|
|
9179
9179
|
label: c(o),
|
|
@@ -9290,10 +9290,10 @@ const designableStyle = {
|
|
|
9290
9290
|
}
|
|
9291
9291
|
) });
|
|
9292
9292
|
}, WithForm$1 = (e) => {
|
|
9293
|
-
const c = e, { children: t, form: n } = c, o =
|
|
9293
|
+
const c = e, { children: t, form: n } = c, o = W(c, ["children", "form"]), r = useContext(SchemaOptionsContext), i = useContext(SchemaExpressionScopeContext), a = x(x({}, r == null ? void 0 : r.scope), i), l = x({}, r == null ? void 0 : r.components);
|
|
9294
9294
|
return /* @__PURE__ */ jsx(FormProvider$1, P(x({}, o), { form: n, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { components: l, scope: a, children: t }) }));
|
|
9295
9295
|
}, WithoutForm$1 = (e) => {
|
|
9296
|
-
const c = e, { children: t } = c, n =
|
|
9296
|
+
const c = e, { children: t } = c, n = W(c, ["children"]), o = useContext(SchemaOptionsContext), r = useContext(SchemaExpressionScopeContext), i = x(x({}, o == null ? void 0 : o.scope), r), a = x({}, o == null ? void 0 : o.components), l = useMemo(() => createForm(), []);
|
|
9297
9297
|
return /* @__PURE__ */ jsx(FormProvider$1, P(x({}, n), { form: l, children: /* @__PURE__ */ jsx(SchemaComponentOptions, { components: a, scope: i, children: t }) }));
|
|
9298
9298
|
}, FormProvider = (e) => e.form ? /* @__PURE__ */ jsx(WithForm$1, x({}, e)) : /* @__PURE__ */ jsx(WithoutForm$1, x({}, e)), CollectionHistoryContext = createContext({
|
|
9299
9299
|
historyCollections: [],
|
|
@@ -9709,7 +9709,7 @@ class SchemaComponentPlugin extends Plugin {
|
|
|
9709
9709
|
}
|
|
9710
9710
|
}
|
|
9711
9711
|
const TabsContext = React.createContext({}), TabsContextProvider = (n) => {
|
|
9712
|
-
var o = n, { children: e } = o, t =
|
|
9712
|
+
var o = n, { children: e } = o, t = W(o, ["children"]);
|
|
9713
9713
|
return /* @__PURE__ */ jsx(TabsContext.Provider, { value: t, children: e });
|
|
9714
9714
|
}, useTabsContext = () => React.useContext(TabsContext), PopupSettingsContext = React.createContext({
|
|
9715
9715
|
enableURL: !0
|
|
@@ -10183,7 +10183,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10183
10183
|
var m, g, f, C, b, S;
|
|
10184
10184
|
const { token: t } = useToken(), n = (m = e["data-row-key"]) == null ? void 0 : m.toString(), { setNodeRef: o, isOver: r, active: i, over: a } = useSortable({
|
|
10185
10185
|
id: n
|
|
10186
|
-
}), h = e, { rowIndex: l } = h, c =
|
|
10186
|
+
}), h = e, { rowIndex: l } = h, c = W(h, ["rowIndex"]), u = useMemo(() => {
|
|
10187
10187
|
const y = new TinyColor(t.colorSettings).setAlpha(0.6).toHex8String();
|
|
10188
10188
|
return {
|
|
10189
10189
|
topActiveClass: css`
|
|
@@ -10209,12 +10209,12 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10209
10209
|
})
|
|
10210
10210
|
);
|
|
10211
10211
|
}, SortHandle$2 = (e) => {
|
|
10212
|
-
const i = e, { id: t } = i, n =
|
|
10212
|
+
const i = e, { id: t } = i, n = W(i, ["id"]), { listeners: o, setNodeRef: r } = useSortable({
|
|
10213
10213
|
id: t
|
|
10214
10214
|
});
|
|
10215
10215
|
return /* @__PURE__ */ jsx(MenuOutlined, P(x(x({ ref: r }, n), o), { style: { cursor: "grab" } }));
|
|
10216
10216
|
}, TableIndex$3 = (e) => {
|
|
10217
|
-
const o = e, { index: t } = o, n =
|
|
10217
|
+
const o = e, { index: t } = o, n = W(o, ["index"]);
|
|
10218
10218
|
return /* @__PURE__ */ jsx("div", P(x({ className: cls("nb-table-index"), style: { padding: "0 8px 0 16px" } }, n), { children: t }));
|
|
10219
10219
|
}, pageSizeOptions$3 = [5, 10, 20, 50, 100, 200], usePaginationProps$3 = (e, t, n) => {
|
|
10220
10220
|
var S, y, v, F, I, R;
|
|
@@ -10342,7 +10342,7 @@ const BodyRowComponent$1 = React.memo((e) => {
|
|
|
10342
10342
|
});
|
|
10343
10343
|
BodyRowComponent$1.displayName = "BodyRowComponent";
|
|
10344
10344
|
const InternalBodyCellComponent$1 = React.memo((e) => {
|
|
10345
|
-
const p = e, { record: t, schema: n, rowIndex: o, isSubTable: r } = p, i =
|
|
10345
|
+
const p = e, { record: t, schema: n, rowIndex: o, isSubTable: r } = p, i = W(p, ["record", "schema", "rowIndex", "isSubTable"]), a = 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), d = useMemo(() => x(x({}, e.style), l), [e.style, l]);
|
|
10346
10346
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10347
10347
|
!_.isEmpty(a) && /* @__PURE__ */ jsx(GetStyleRules, { record: t, schema: n, onStyleChange: u ? c : _.noop }),
|
|
10348
10348
|
/* @__PURE__ */ jsx("td", P(x({}, i), { className: cls(e.className, cellClass$1), style: d, children: e.children }))
|
|
@@ -10371,7 +10371,7 @@ const TableElementRefContext = createContext(null), useTableElementRef = () => u
|
|
|
10371
10371
|
columns: m,
|
|
10372
10372
|
expandable: h,
|
|
10373
10373
|
field: g
|
|
10374
|
-
} = y, f =
|
|
10374
|
+
} = y, f = W(y, [
|
|
10375
10375
|
"tableHeight",
|
|
10376
10376
|
"SortableWrapper",
|
|
10377
10377
|
"tableSizeRefCallback",
|
|
@@ -10465,7 +10465,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10465
10465
|
withSkeletonComponent(
|
|
10466
10466
|
observer$1((e) => {
|
|
10467
10467
|
var ce, Ce;
|
|
10468
|
-
const { token: t } = useToken(), me = omit(e, ["onBlur", "onFocus"]), { pagination: n, useProps: o } = me, r =
|
|
10468
|
+
const { token: t } = useToken(), me = omit(e, ["onBlur", "onFocus"]), { pagination: n, useProps: o } = me, r = W(me, ["pagination", "useProps"]), he = (o == null ? void 0 : o()) || {}, { pagination: i } = he, a = W(he, ["pagination"]), ge = x(x({}, r), a), {
|
|
10469
10469
|
dragSort: l = !1,
|
|
10470
10470
|
showIndex: c = !0,
|
|
10471
10471
|
onRowSelectionChange: u,
|
|
@@ -10477,7 +10477,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10477
10477
|
loading: f,
|
|
10478
10478
|
onClickRow: C,
|
|
10479
10479
|
value: b
|
|
10480
|
-
} = ge, S =
|
|
10480
|
+
} = ge, S = W(ge, [
|
|
10481
10481
|
"dragSort",
|
|
10482
10482
|
"showIndex",
|
|
10483
10483
|
"onRowSelectionChange",
|
|
@@ -10490,14 +10490,14 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10490
10490
|
"onClickRow",
|
|
10491
10491
|
"value"
|
|
10492
10492
|
]), y = useArrayField$1(S), v = useFieldSchema(), { size: F = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, I = useCollection(), k = ((ce = v == null ? void 0 : v.parent) == null ? void 0 : ce["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: M } = k, z = useMemoizedFn(S.onRowDragEnd || (() => {
|
|
10493
|
-
})), L = usePaginationProps$3(n, i, e), $ = useTableColumns$2(S, L), [w, B] = useState(() => D ? M : []), [j, T] = useState(((Ce = y == null ? void 0 : y.data) == null ? void 0 : Ce.selectedRowKeys) || []), [N, O] = useState([]), V = (p == null ? void 0 : p.type) !== "none", E = useRef(/* @__PURE__ */ new Map()),
|
|
10493
|
+
})), L = usePaginationProps$3(n, i, e), $ = useTableColumns$2(S, L), [w, B] = useState(() => D ? M : []), [j, T] = useState(((Ce = y == null ? void 0 : y.data) == null ? void 0 : Ce.selectedRowKeys) || []), [N, O] = useState([]), V = (p == null ? void 0 : p.type) !== "none", E = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
|
|
10494
10494
|
& > td {
|
|
10495
10495
|
background-color: ${t.controlItemBgActive} !important;
|
|
10496
10496
|
}
|
|
10497
10497
|
&:hover > td {
|
|
10498
10498
|
background-color: ${t.controlItemBgActiveHover} !important;
|
|
10499
10499
|
}
|
|
10500
|
-
`, [t.controlItemBgActive, t.controlItemBgActiveHover]),
|
|
10500
|
+
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), U = useMemo(() => C ? G : "", [G, C]), H = useMemo(() => C ? (re, ee) => ({
|
|
10501
10501
|
onClick: (ne) => {
|
|
10502
10502
|
isPortalInBody(ne.target) || C(re, O, N);
|
|
10503
10503
|
},
|
|
@@ -10511,7 +10511,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10511
10511
|
const re = D ? M : [];
|
|
10512
10512
|
_.isEqual(re, w) || B(re);
|
|
10513
10513
|
}, [D, M]);
|
|
10514
|
-
const
|
|
10514
|
+
const K = useCallback((re) => {
|
|
10515
10515
|
if (m)
|
|
10516
10516
|
return Y(re);
|
|
10517
10517
|
if (re.key)
|
|
@@ -10526,9 +10526,9 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10526
10526
|
return Array.isArray(m) ? m.map((ne) => {
|
|
10527
10527
|
var se;
|
|
10528
10528
|
return ((se = re[ne]) == null ? void 0 : se.toString()) || "";
|
|
10529
|
-
}).join("-") : typeof m == "string" ? re[m] : (ee = (m != null ? m :
|
|
10529
|
+
}).join("-") : typeof m == "string" ? re[m] : (ee = (m != null ? m : K)(re)) == null ? void 0 : ee.toString();
|
|
10530
10530
|
},
|
|
10531
|
-
[JSON.stringify(m),
|
|
10531
|
+
[JSON.stringify(m), K]
|
|
10532
10532
|
), J = useMemo(() => (Array.isArray(b) ? b : []).filter(Boolean), [b, b == null ? void 0 : b.length]), X = useMemo(() => (re) => {
|
|
10533
10533
|
const ee = useCallback((ne) => {
|
|
10534
10534
|
var Ie, Se, ye, ve, Pe, Fe;
|
|
@@ -10628,8 +10628,8 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10628
10628
|
x: "max-content",
|
|
10629
10629
|
y: ie
|
|
10630
10630
|
}), [ie, J]), xe = useCallback(
|
|
10631
|
-
(re) => N.includes(re[m]) ?
|
|
10632
|
-
[N,
|
|
10631
|
+
(re) => N.includes(re[m]) ? U : "",
|
|
10632
|
+
[N, U, JSON.stringify(m)]
|
|
10633
10633
|
), pe = useCallback(
|
|
10634
10634
|
(re, ee) => {
|
|
10635
10635
|
const ne = re ? [...w, ee[I.getPrimaryKey()]] : w.filter((se) => ee[I.getPrimaryKey()] !== se);
|
|
@@ -10649,7 +10649,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10649
10649
|
tableHeight: ie,
|
|
10650
10650
|
SortableWrapper: te,
|
|
10651
10651
|
tableSizeRefCallback: ae,
|
|
10652
|
-
defaultRowKey:
|
|
10652
|
+
defaultRowKey: K,
|
|
10653
10653
|
dataSource: J
|
|
10654
10654
|
}, S), oe), {
|
|
10655
10655
|
paginationProps: L,
|
|
@@ -10780,15 +10780,14 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10780
10780
|
return c ? null : /* @__PURE__ */ jsx(SchemaComponentOptions, { scope: { treeTable: a }, children: /* @__PURE__ */ jsx(FormContext.Provider, { value: d, children: /* @__PURE__ */ jsx(BlockProvider, P(x({ name: e.name || "table" }, e), { params: l, runWhenParamsChanged: !0, children: /* @__PURE__ */ jsx(InternalTableBlockProvider, P(x({}, e), { childrenColumnName: u, params: l })) })) }) });
|
|
10781
10781
|
}), useTableBlockContext = () => useContext(TableBlockContext), useTableBlockContextBasicValue = () => useContext(TableBlockContextBasicValue), ActionContext = createContext({});
|
|
10782
10782
|
ActionContext.displayName = "ActionContext";
|
|
10783
|
-
let loading = !1;
|
|
10784
10783
|
const ActionContextProvider = React.memo(
|
|
10785
10784
|
(e) => {
|
|
10786
10785
|
const [t, n] = useState(!1), { visible: o } = x(x({}, e), e.value), { setSubmitted: r } = x(x({}, e), e.value), i = useBlockServiceInActionButton(), a = useIsSubPageClosedByPageMenu(useFieldSchema());
|
|
10787
|
-
useEffect(() =>
|
|
10788
|
-
|
|
10789
|
-
|
|
10790
|
-
|
|
10791
|
-
}
|
|
10786
|
+
useEffect(() => {
|
|
10787
|
+
q(void 0, null, function* () {
|
|
10788
|
+
o === !1 && i && !i.loading && (t || a) && (i.loading = !0, yield i.refreshAsync(), i.loading = !1, n(!1), r == null || r(!0));
|
|
10789
|
+
});
|
|
10790
|
+
}, [o, i == null ? void 0 : i.refresh, r, a]);
|
|
10792
10791
|
const l = useMemo(() => P(x(x({}, e), e == null ? void 0 : e.value), { submitted: t, setSubmitted: n }), [e, t]);
|
|
10793
10792
|
return /* @__PURE__ */ jsx(ActionContext.Provider, { value: l, children: e.children });
|
|
10794
10793
|
}
|
|
@@ -10908,15 +10907,15 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
10908
10907
|
return I == null ? void 0 : I(!0);
|
|
10909
10908
|
const O = N || o, V = O == null ? void 0 : O["x-uid"], E = y(B);
|
|
10910
10909
|
w = w || (i == null ? void 0 : i.data);
|
|
10911
|
-
const
|
|
10910
|
+
const G = R({
|
|
10912
10911
|
popupUid: V,
|
|
10913
10912
|
recordData: w,
|
|
10914
10913
|
sourceId: E,
|
|
10915
10914
|
collection: j,
|
|
10916
10915
|
puid: T
|
|
10917
10916
|
});
|
|
10918
|
-
let
|
|
10919
|
-
if (_.last(
|
|
10917
|
+
let U = n.pathname;
|
|
10918
|
+
if (_.last(U) === "/" && (U = U.slice(0, -1)), storePopupContext(V, {
|
|
10920
10919
|
schema: O,
|
|
10921
10920
|
record: new CollectionRecord({ isNew: !1, data: w }),
|
|
10922
10921
|
parentRecord: B ? new CollectionRecord({ isNew: !1, data: B }) : a,
|
|
@@ -10930,7 +10929,7 @@ const popupsContextStorage = {}, getStoredPopupContext = (e) => popupsContextSto
|
|
|
10930
10929
|
const H = h + 1;
|
|
10931
10930
|
if (getPopupLayerState(H))
|
|
10932
10931
|
return;
|
|
10933
|
-
t(withSearchParams(`${
|
|
10932
|
+
t(withSearchParams(`${U}${G}`)), setPopupLayerState(H, !0);
|
|
10934
10933
|
} else
|
|
10935
10934
|
console.error(
|
|
10936
10935
|
`[NocoBase] The popup schema is invalid, please check the schema:
|
|
@@ -11427,7 +11426,7 @@ const DrawerErrorFallback = (e) => {
|
|
|
11427
11426
|
ActionDrawerContent.displayName = "ActionDrawerContent";
|
|
11428
11427
|
const InternalActionDrawer = observer$1(
|
|
11429
11428
|
(e) => {
|
|
11430
|
-
const F = e, { footerNodeName: t = "Action.Drawer.Footer", zIndex: n, onClose: o } = F, r =
|
|
11429
|
+
const F = e, { footerNodeName: t = "Action.Drawer.Footer", zIndex: n, onClose: o } = F, r = W(F, ["footerNodeName", "zIndex", "onClose"]), { visible: i, setVisible: a, openSize: l = "middle", drawerProps: c } = useActionContext(), u = useFieldSchema(), d = useField(), { componentCls: p, hashId: m } = useStyles$h(), h = useTabsContext(), g = useZIndexContext(), f = u.reduceProperties((I, R) => R["x-component"] === t ? R : I), { hidden: C } = useCurrentPopupContext(), b = useMemo(() => P(x(x({}, c == null ? void 0 : c.style), r == null ? void 0 : r.style), {
|
|
11431
11430
|
display: C ? "none" : "block"
|
|
11432
11431
|
}), [C, c == null ? void 0 : c.style, r == null ? void 0 : r.style]), S = n || g + (e.level || 0), y = useCallback(
|
|
11433
11432
|
(I) => {
|
|
@@ -11506,7 +11505,7 @@ const useGetAriaLabelOfModal = () => {
|
|
|
11506
11505
|
}
|
|
11507
11506
|
), InternalActionModal = observer$1(
|
|
11508
11507
|
(e) => {
|
|
11509
|
-
const v = e, { footerNodeName: t = "Action.Modal.Footer", width: n, zIndex: o } = v, r =
|
|
11508
|
+
const v = e, { footerNodeName: t = "Action.Modal.Footer", width: n, zIndex: o } = v, r = W(v, ["footerNodeName", "width", "zIndex"]), { visible: i, setVisible: a, openSize: l = "middle", modalProps: c } = useActionContext(), u = n != null ? n : openSizeWidthMap.get(l), d = useFieldSchema(), p = useField(), { token: m } = useToken$1(), h = useTabsContext(), g = useZIndexContext(), f = d.reduceProperties((F, I) => I["x-component"] === t ? I : F), { hidden: C } = useCurrentPopupContext(), b = useMemo(() => ({
|
|
11510
11509
|
mask: {
|
|
11511
11510
|
display: C ? "none" : "block"
|
|
11512
11511
|
},
|
|
@@ -11608,7 +11607,7 @@ const CurrentPopupRecordContext = React.createContext(null), CurrentParentPopupR
|
|
|
11608
11607
|
});
|
|
11609
11608
|
VariablePopupRecordProvider.displayName = "VariablePopupRecordProvider";
|
|
11610
11609
|
const useCurrentPopupRecord = () => React.useContext(CurrentPopupRecordContext), useParentPopupRecord = () => React.useContext(CurrentParentPopupRecordContext), useDef$3 = () => ({}), useProps = (e = {}) => {
|
|
11611
|
-
const i = e, { useProps: t = useDef$3 } = i, n =
|
|
11610
|
+
const i = e, { useProps: t = useDef$3 } = i, n = W(i, ["useProps"]);
|
|
11612
11611
|
let o = t;
|
|
11613
11612
|
typeof t != "function" && (o = useDef$3);
|
|
11614
11613
|
const r = o();
|
|
@@ -11630,7 +11629,7 @@ ActionContainer.Footer = observer$1(
|
|
|
11630
11629
|
const SchemaToolbarContext = createContext({});
|
|
11631
11630
|
SchemaToolbarContext.displayName = "SchemaToolbarContext";
|
|
11632
11631
|
const SchemaToolbarProvider = (e) => {
|
|
11633
|
-
const o = e, { children: t } = o, n =
|
|
11632
|
+
const o = e, { children: t } = o, n = W(o, ["children"]);
|
|
11634
11633
|
return /* @__PURE__ */ jsx(SchemaToolbarContext.Provider, { value: n, children: t });
|
|
11635
11634
|
};
|
|
11636
11635
|
function useSchemaToolbar() {
|
|
@@ -14376,7 +14375,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
14376
14375
|
template: a,
|
|
14377
14376
|
settings: l,
|
|
14378
14377
|
action: c = "list"
|
|
14379
|
-
} = m, u =
|
|
14378
|
+
} = m, u = W(m, [
|
|
14380
14379
|
"formItemInitializers",
|
|
14381
14380
|
"actionInitializers",
|
|
14382
14381
|
"collection",
|
|
@@ -14452,7 +14451,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
14452
14451
|
template: d,
|
|
14453
14452
|
title: p,
|
|
14454
14453
|
settings: m
|
|
14455
|
-
} = C, h =
|
|
14454
|
+
} = C, h = W(C, [
|
|
14456
14455
|
"formItemInitializers",
|
|
14457
14456
|
"actionInitializers",
|
|
14458
14457
|
"collection",
|
|
@@ -14524,7 +14523,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
14524
14523
|
resource: a,
|
|
14525
14524
|
template: l,
|
|
14526
14525
|
settings: c
|
|
14527
|
-
} = m, u =
|
|
14526
|
+
} = m, u = W(m, [
|
|
14528
14527
|
"formItemInitializers",
|
|
14529
14528
|
"actionInitializers",
|
|
14530
14529
|
"collection",
|
|
@@ -14590,7 +14589,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
14590
14589
|
dataSource: c,
|
|
14591
14590
|
blockType: u,
|
|
14592
14591
|
pageSize: d = 20
|
|
14593
|
-
} = h, p =
|
|
14592
|
+
} = h, p = W(h, [
|
|
14594
14593
|
"collection",
|
|
14595
14594
|
"rowKey",
|
|
14596
14595
|
"tableActionInitializers",
|
|
@@ -15157,10 +15156,10 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
15157
15156
|
o || (t == null ? void 0 : t["x-initializer"]),
|
|
15158
15157
|
t == null ? void 0 : t["x-initializer-props"]
|
|
15159
15158
|
), B = useGridRowContext(), j = useGridContext(), T = useMemo(() => {
|
|
15160
|
-
var
|
|
15159
|
+
var K;
|
|
15161
15160
|
return {
|
|
15162
15161
|
insertPosition: "afterEnd",
|
|
15163
|
-
wrap: ((
|
|
15162
|
+
wrap: ((K = B == null ? void 0 : B.cols) == null ? void 0 : K.length) === 1 ? gridRowColWrap : void 0,
|
|
15164
15163
|
Component: (Y) => /* @__PURE__ */ jsx(
|
|
15165
15164
|
PlusOutlined,
|
|
15166
15165
|
P(x({}, Y), {
|
|
@@ -15171,34 +15170,34 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
15171
15170
|
)
|
|
15172
15171
|
};
|
|
15173
15172
|
}, [y, (H = B == null ? void 0 : B.cols) == null ? void 0 : H.length]), N = useMemo(() => u === !1 || f === !1 ? null : /* @__PURE__ */ jsx(DragHandler, { children: /* @__PURE__ */ jsx(DragOutlined, { role: "button", "aria-label": y("drag-handler") }) }), [u, y, f]), O = useMemo(() => {
|
|
15174
|
-
var
|
|
15173
|
+
var K;
|
|
15175
15174
|
if (o === !1)
|
|
15176
15175
|
return null;
|
|
15177
15176
|
if (w)
|
|
15178
15177
|
return $(T);
|
|
15179
15178
|
if (j != null && j.InitializerComponent || j != null && j.renderSchemaInitializer)
|
|
15180
|
-
return j != null && j.InitializerComponent ? /* @__PURE__ */ jsx(j.InitializerComponent, x({}, T)) : (
|
|
15181
|
-
}, [j, o, T, w, $]), V = useMemo(() => r !== !1 && L ? z() : null, [L, z, r]), E = useRef(null),
|
|
15179
|
+
return j != null && j.InitializerComponent ? /* @__PURE__ */ jsx(j.InitializerComponent, x({}, T)) : (K = j.renderSchemaInitializer) == null ? void 0 : K.call(j, T);
|
|
15180
|
+
}, [j, o, T, w, $]), V = useMemo(() => r !== !1 && L ? z() : null, [L, z, r]), E = useRef(null), G = "hidden";
|
|
15182
15181
|
useEffect(() => {
|
|
15183
|
-
const
|
|
15184
|
-
let Y =
|
|
15182
|
+
const K = E.current;
|
|
15183
|
+
let Y = K == null ? void 0 : K.parentElement;
|
|
15185
15184
|
for (; Y && Y.clientHeight === 0; )
|
|
15186
15185
|
Y = Y.parentElement;
|
|
15187
15186
|
if (!Y)
|
|
15188
15187
|
return;
|
|
15189
15188
|
function J() {
|
|
15190
15189
|
var Z;
|
|
15191
|
-
|
|
15190
|
+
K && (K.classList.remove(G), (Z = e.onVisibleChange) == null || Z.call(e, !0));
|
|
15192
15191
|
}
|
|
15193
15192
|
function X() {
|
|
15194
15193
|
var Z;
|
|
15195
|
-
|
|
15194
|
+
K && (K.classList.add(G), (Z = e.onVisibleChange) == null || Z.call(e, !1));
|
|
15196
15195
|
}
|
|
15197
15196
|
return window.getComputedStyle(Y).position === "static" && (Y.style.position = "relative"), Y.addEventListener("mouseenter", J), Y.addEventListener("mouseleave", X), () => {
|
|
15198
15197
|
Y.removeEventListener("mouseenter", J), Y.removeEventListener("mouseleave", X);
|
|
15199
15198
|
};
|
|
15200
15199
|
}, [e.onVisibleChange]);
|
|
15201
|
-
const
|
|
15200
|
+
const U = useMemo(
|
|
15202
15201
|
() => x({
|
|
15203
15202
|
border: c ? "auto" : 0,
|
|
15204
15203
|
background: i ? "auto" : 0
|
|
@@ -15209,8 +15208,8 @@ const useGetAriaLabelOfDesigner = () => {
|
|
|
15209
15208
|
"div",
|
|
15210
15209
|
{
|
|
15211
15210
|
ref: E,
|
|
15212
|
-
className: cls(C, b, m, "schema-toolbar",
|
|
15213
|
-
style:
|
|
15211
|
+
className: cls(C, b, m, "schema-toolbar", G),
|
|
15212
|
+
style: U,
|
|
15214
15213
|
children: [
|
|
15215
15214
|
M && /* @__PURE__ */ jsx("div", { className: "toolbar-title", children: /* @__PURE__ */ jsxs(Space$1, { size: 2, children: [
|
|
15216
15215
|
/* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: R ? `${g(R == null ? void 0 : R.displayName)} > ${M[0]}` : M[0] }, M[0]),
|
|
@@ -15983,7 +15982,7 @@ function RemoveButton(e = {}) {
|
|
|
15983
15982
|
] });
|
|
15984
15983
|
}
|
|
15985
15984
|
function WorkflowSelect(r) {
|
|
15986
|
-
var i = r, { formAction: e, buttonAction: t, actionType: n } = i, o =
|
|
15985
|
+
var i = r, { formAction: e, buttonAction: t, actionType: n } = i, o = W(i, ["formAction", "buttonAction", "actionType"]);
|
|
15987
15986
|
const { t: a } = useTranslation(), l = ArrayTable.useIndex(), { setValuesIn: c } = useForm(), u = useCollection_deprecated(), { getCollection: d } = useCollectionManager_deprecated(), p = useDataSourceKey(), [m, h] = useState(joinCollectionName(p, u.name)), g = useCompile(), f = usePlugin("workflow"), C = f.useTriggersOptions(), b = useMemo(
|
|
15988
15987
|
() => C.filter((y) => typeof y.options.isActionTriggerable == "function" || y.options.isActionTriggerable === !0).map((y) => y.value),
|
|
15989
15988
|
[C]
|
|
@@ -16466,7 +16465,7 @@ const actionSettings = new SchemaSettings({
|
|
|
16466
16465
|
linkageRulesProps: i,
|
|
16467
16466
|
schemaSettings: a = "ActionSettings",
|
|
16468
16467
|
enableDrag: l = !0
|
|
16469
|
-
} = f, c =
|
|
16468
|
+
} = f, c = W(f, [
|
|
16470
16469
|
"modalTip",
|
|
16471
16470
|
"linkageAction",
|
|
16472
16471
|
"removeButtonProps",
|
|
@@ -16574,7 +16573,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
16574
16573
|
}
|
|
16575
16574
|
}), handleError = console.log, Action = withDynamicSchemaProps(
|
|
16576
16575
|
React.memo((e) => {
|
|
16577
|
-
var
|
|
16576
|
+
var G;
|
|
16578
16577
|
const E = useProps(e), {
|
|
16579
16578
|
popover: t,
|
|
16580
16579
|
containerRefKey: n,
|
|
@@ -16594,7 +16593,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
16594
16593
|
onMouseEnter: C,
|
|
16595
16594
|
refreshDataBlockRequest: b,
|
|
16596
16595
|
confirmTitle: S
|
|
16597
|
-
} = E, y =
|
|
16596
|
+
} = E, y = W(E, [
|
|
16598
16597
|
"popover",
|
|
16599
16598
|
"containerRefKey",
|
|
16600
16599
|
"component",
|
|
@@ -16614,15 +16613,15 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
16614
16613
|
"onMouseEnter",
|
|
16615
16614
|
"refreshDataBlockRequest",
|
|
16616
16615
|
"confirmTitle"
|
|
16617
|
-
]), v = useDesigner(), F = useField(), I = useFieldSchema(), R = useCompile(), k = useCollectionRecordData(), D = R((
|
|
16616
|
+
]), v = useDesigner(), F = useField(), I = useFieldSchema(), R = useCompile(), k = useCollectionRecordData(), D = R((G = I["x-component-props"]) == null ? void 0 : G.confirm) || g, M = useMemo(() => (I == null ? void 0 : I["x-linkage-rules"]) || [], [I == null ? void 0 : I["x-linkage-rules"]]), { designable: z } = useDesignable(), L = useComponent(o) || o, $ = useVariables$1(), w = useLocalVariables$1({ currentForm: { values: k, readPretty: !1 } }), { visibleWithURL: B, setVisibleWithURL: j } = usePopupUtils(), { setSubmitted: T } = useActionContext(), { getAriaLabel: N } = useGetAriaLabelOfAction(l), O = useCollectionParentRecordData();
|
|
16618
16617
|
useEffect(() => {
|
|
16619
|
-
F.stateOfLinkageRules && setInitialActionState(F), F.stateOfLinkageRules = {}, M.filter((
|
|
16618
|
+
F.stateOfLinkageRules && setInitialActionState(F), F.stateOfLinkageRules = {}, M.filter((U) => !U.disabled).forEach((U) => {
|
|
16620
16619
|
var H;
|
|
16621
|
-
(H =
|
|
16620
|
+
(H = U.actions) == null || H.forEach((K) => {
|
|
16622
16621
|
linkageAction({
|
|
16623
|
-
operator:
|
|
16622
|
+
operator: K.operator,
|
|
16624
16623
|
field: F,
|
|
16625
|
-
condition:
|
|
16624
|
+
condition: U.condition,
|
|
16626
16625
|
variables: $,
|
|
16627
16626
|
localVariables: w
|
|
16628
16627
|
});
|
|
@@ -16630,8 +16629,8 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
16630
16629
|
});
|
|
16631
16630
|
}, [F, M, w, $]);
|
|
16632
16631
|
const V = useCallback(
|
|
16633
|
-
(
|
|
16634
|
-
C == null || C(
|
|
16632
|
+
(U) => {
|
|
16633
|
+
C == null || C(U);
|
|
16635
16634
|
},
|
|
16636
16635
|
[C]
|
|
16637
16636
|
);
|
|
@@ -16699,7 +16698,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
16699
16698
|
setSubmitted: M,
|
|
16700
16699
|
getAriaLabel: z,
|
|
16701
16700
|
parentRecordData: L
|
|
16702
|
-
} = xe, $ =
|
|
16701
|
+
} = xe, $ = W(xe, [
|
|
16703
16702
|
"containerRefKey",
|
|
16704
16703
|
"fieldSchema",
|
|
16705
16704
|
"designable",
|
|
@@ -16727,7 +16726,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
16727
16726
|
"setSubmitted",
|
|
16728
16727
|
"getAriaLabel",
|
|
16729
16728
|
"parentRecordData"
|
|
16730
|
-
]), [w, B] = useState(!1), { wrapSSR: j, componentCls: T, hashId: N } = useStyles$e(), [O, V] = useState(!1), E = o["x-toolbar-props"] || o["x-designer-props"],
|
|
16729
|
+
]), [w, B] = useState(!1), { wrapSSR: j, componentCls: T, hashId: N } = useStyles$e(), [O, V] = useState(!1), E = o["x-toolbar-props"] || o["x-designer-props"], G = (pe = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : pe.openMode, U = (fe = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : fe.openSize, H = (me = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : me.refreshDataBlockRequest, { modal: K } = App.useApp(), Y = useForm(), J = useACLActionParamsContext(), { run: X, element: Q, disabled: Z } = (I == null ? void 0 : I(R)) || {}, oe = Y.disabled || i.disabled || ((he = i.data) == null ? void 0 : he.disabled) || F || Z, te = useMemo(() => {
|
|
16731
16730
|
var ce;
|
|
16732
16731
|
return P(x({}, v), {
|
|
16733
16732
|
opacity: r && (((ce = i == null ? void 0 : i.data) == null ? void 0 : ce.hidden) || !J) && 0.1,
|
|
@@ -16757,7 +16756,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
16757
16756
|
setVisible: B,
|
|
16758
16757
|
run: X,
|
|
16759
16758
|
confirm: g,
|
|
16760
|
-
modal:
|
|
16759
|
+
modal: K,
|
|
16761
16760
|
setSubmitted: M,
|
|
16762
16761
|
confirmTitle: f,
|
|
16763
16762
|
title: y
|
|
@@ -16775,8 +16774,8 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
16775
16774
|
setVisible: ae,
|
|
16776
16775
|
formValueChanged: O,
|
|
16777
16776
|
setFormValueChanged: V,
|
|
16778
|
-
openMode:
|
|
16779
|
-
openSize:
|
|
16777
|
+
openMode: G,
|
|
16778
|
+
openSize: U,
|
|
16780
16779
|
containerRefKey: n,
|
|
16781
16780
|
fieldSchema: o,
|
|
16782
16781
|
setSubmitted: M,
|
|
@@ -16946,7 +16945,7 @@ const RenderButtonInner = observer$1(
|
|
|
16946
16945
|
Designer: C,
|
|
16947
16946
|
designerProps: b,
|
|
16948
16947
|
title: S
|
|
16949
|
-
} = F, y =
|
|
16948
|
+
} = F, y = W(F, [
|
|
16950
16949
|
"designable",
|
|
16951
16950
|
"field",
|
|
16952
16951
|
"aclCtx",
|
|
@@ -16996,14 +16995,14 @@ RenderButtonInner.displayName = "RenderButtonInner";
|
|
|
16996
16995
|
const ActionBarContext = React.createContext({
|
|
16997
16996
|
container: null
|
|
16998
16997
|
}), ActionBarProvider = (n) => {
|
|
16999
|
-
var o = n, { children: e } = o, t =
|
|
16998
|
+
var o = n, { children: e } = o, t = W(o, ["children"]);
|
|
17000
16999
|
return /* @__PURE__ */ jsx(ActionBarContext.Provider, { value: t, children: e });
|
|
17001
17000
|
}, useActionBarContext = () => useContext(ActionBarContext), Portal = (e) => {
|
|
17002
17001
|
const t = useFieldSchema(), { container: n, parentComponents: o = ["BlockItem", "CardItem"] } = useActionBarContext();
|
|
17003
17002
|
return /* @__PURE__ */ jsx(Fragment, { children: n && o.includes(t.parent["x-component"]) ? createPortal(e.children, n) : e.children });
|
|
17004
17003
|
}, InternalActionBar = (e) => {
|
|
17005
17004
|
var p;
|
|
17006
|
-
const { forceProps: t = {} } = useActionBarContext(), d = x(x({}, useProps(e)), t), { layout: n = "two-columns", style: o, spaceProps: r } = d, i =
|
|
17005
|
+
const { forceProps: t = {} } = useActionBarContext(), d = x(x({}, useProps(e)), t), { layout: n = "two-columns", style: o, spaceProps: r } = d, i = W(d, ["layout", "style", "spaceProps"]), a = useFieldSchema(), { render: l } = useSchemaInitializerRender(a["x-initializer"], a["x-initializer-props"]), { designable: c } = useDesignable();
|
|
17007
17006
|
if (n === "one-column")
|
|
17008
17007
|
return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(DndContext, { children: /* @__PURE__ */ jsxs(
|
|
17009
17008
|
"div",
|
|
@@ -17214,7 +17213,7 @@ const SchemaInitializerItemInternal = () => {
|
|
|
17214
17213
|
const e = useSchemaInitializerItem();
|
|
17215
17214
|
return /* @__PURE__ */ jsx(SchemaInitializerItem, x({}, e));
|
|
17216
17215
|
}, switchStyle = { marginLeft: 20 }, itemStyle = { display: "flex", alignItems: "center", justifyContent: "space-between" }, SchemaInitializerSwitch = (e) => {
|
|
17217
|
-
const i = e, { title: t, checked: n } = i, o =
|
|
17216
|
+
const i = e, { title: t, checked: n } = i, o = W(i, ["title", "checked"]), r = useCompile();
|
|
17218
17217
|
return /* @__PURE__ */ jsx(SchemaInitializerItem, P(x({}, o), { closeInitializerMenuWhenClick: !1, children: /* @__PURE__ */ jsxs("div", { style: itemStyle, children: [
|
|
17219
17218
|
r(t),
|
|
17220
17219
|
/* @__PURE__ */ jsx(Switch, { disabled: e.disabled, style: switchStyle, size: "small", checked: n })
|
|
@@ -17246,7 +17245,7 @@ const SchemaInitializerItemInternal = () => {
|
|
|
17246
17245
|
hideIfNoChildren: c,
|
|
17247
17246
|
componentProps: u,
|
|
17248
17247
|
sort: d
|
|
17249
|
-
} = F, p =
|
|
17248
|
+
} = F, p = W(F, [
|
|
17250
17249
|
"type",
|
|
17251
17250
|
"Component",
|
|
17252
17251
|
"component",
|
|
@@ -17378,7 +17377,7 @@ const useMenuSearch$1 = (e) => {
|
|
|
17378
17377
|
const { items: t } = e;
|
|
17379
17378
|
return t.length === 0 ? null : /* @__PURE__ */ jsx(SchemaInitializerChildren, { children: t });
|
|
17380
17379
|
}, SchemaInitializerActionModalItemComponent = React.forwardRef((e, t) => {
|
|
17381
|
-
const r = e, { onClick: n } = r, o =
|
|
17380
|
+
const r = e, { onClick: n } = r, o = W(r, ["onClick"]);
|
|
17382
17381
|
return /* @__PURE__ */ jsx(SchemaInitializerItem, P(x({ ref: t }, o), { onClick: (i) => n == null ? void 0 : n(i.event, !1) }));
|
|
17383
17382
|
}), SchemaInitializerActionModal = (e) => {
|
|
17384
17383
|
const { title: t, icon: n, width: o, schema: r, buttonText: i, btnStyles: a, isItem: l, component: c, onCancel: u, onSubmit: d } = e, { setVisible: p } = useSchemaInitializer(), m = useCallback(() => {
|
|
@@ -17476,7 +17475,7 @@ const useMenuSearch$1 = (e) => {
|
|
|
17476
17475
|
const e = useSchemaInitializerItem();
|
|
17477
17476
|
return /* @__PURE__ */ jsx(SchemaInitializerActionModal, x({}, e));
|
|
17478
17477
|
}, SchemaInitializerSelect = (e) => {
|
|
17479
|
-
const h = e, { title: t, options: n, value: o, onChange: r, openOnHover: i, onClick: a } = h, l =
|
|
17478
|
+
const h = e, { title: t, options: n, value: o, onChange: r, openOnHover: i, onClick: a } = h, l = W(h, ["title", "options", "value", "onChange", "openOnHover", "onClick"]), [c, u] = useState(!1), d = useCallback(
|
|
17480
17479
|
(...g) => {
|
|
17481
17480
|
u(!1), a == null || a(...g);
|
|
17482
17481
|
},
|
|
@@ -17541,7 +17540,7 @@ const useMenuSearch$1 = (e) => {
|
|
|
17541
17540
|
[e, t]
|
|
17542
17541
|
) };
|
|
17543
17542
|
}, SchemaInitializerButton = React.memo((e) => {
|
|
17544
|
-
const a = e, { style: t, options: n } = a, o =
|
|
17543
|
+
const a = e, { style: t, options: n } = a, o = W(a, ["style", "options"]), r = useCompile(), { getAriaLabel: i } = useGetAriaLabelOfSchemaInitializer();
|
|
17545
17544
|
return /* @__PURE__ */ jsx(
|
|
17546
17545
|
Button,
|
|
17547
17546
|
P(x({
|
|
@@ -17643,7 +17642,7 @@ function useGetSchemaInitializerMenuItems(e) {
|
|
|
17643
17642
|
}
|
|
17644
17643
|
if (i.isMenuType) {
|
|
17645
17644
|
const f = i, { isMenuType: C } = f;
|
|
17646
|
-
return
|
|
17645
|
+
return W(f, ["isMenuType"]);
|
|
17647
17646
|
}
|
|
17648
17647
|
const d = c || u, p = i.key || `${r}-${u}-${a}`, m = (C) => {
|
|
17649
17648
|
C.domEvent.stopPropagation(), C.key === p && (i.onClick ? i.onClick(P(x({}, C), { item: i })) : e == null || e(P(x({}, C), { item: i })));
|
|
@@ -17939,21 +17938,21 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
17939
17938
|
}
|
|
17940
17939
|
}
|
|
17941
17940
|
function b(T, N, O) {
|
|
17942
|
-
var V, E,
|
|
17941
|
+
var V, E, G, U, H, K, Y, J, X, Q, Z, oe, te = N && N.split("/"), ie = a.map, ae = ie && ie["*"];
|
|
17943
17942
|
if (T && (T = T.split("/"), Y = T.length - 1, a.nodeIdCompat && jsSuffixRegExp.test(T[Y]) && (T[Y] = T[Y].replace(jsSuffixRegExp, "")), T[0].charAt(0) === "." && te && (oe = te.slice(0, te.length - 1), T = oe.concat(T)), C(T), T = T.join("/")), O && ie && (te || ae)) {
|
|
17944
|
-
|
|
17943
|
+
G = T.split("/");
|
|
17945
17944
|
e:
|
|
17946
|
-
for (
|
|
17947
|
-
if (
|
|
17945
|
+
for (U = G.length; U > 0; U -= 1) {
|
|
17946
|
+
if (K = G.slice(0, U).join("/"), te) {
|
|
17948
17947
|
for (H = te.length; H > 0; H -= 1)
|
|
17949
|
-
if (E = getOwn(ie, te.slice(0, H).join("/")), E && (E = getOwn(E,
|
|
17950
|
-
J = E, X =
|
|
17948
|
+
if (E = getOwn(ie, te.slice(0, H).join("/")), E && (E = getOwn(E, K), E)) {
|
|
17949
|
+
J = E, X = U;
|
|
17951
17950
|
break e;
|
|
17952
17951
|
}
|
|
17953
17952
|
}
|
|
17954
|
-
!Q && ae && getOwn(ae,
|
|
17953
|
+
!Q && ae && getOwn(ae, K) && (Q = getOwn(ae, K), Z = U);
|
|
17955
17954
|
}
|
|
17956
|
-
!J && Q && (J = Q, X = Z), J && (
|
|
17955
|
+
!J && Q && (J = Q, X = Z), J && (G.splice(0, X, J), T = G.join("/"));
|
|
17957
17956
|
}
|
|
17958
17957
|
return V = getOwn(a.pkgs, T), V || T;
|
|
17959
17958
|
}
|
|
@@ -17975,18 +17974,18 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
17975
17974
|
return O > -1 && (N = T.substring(0, O), T = T.substring(O + 1, T.length)), [N, T];
|
|
17976
17975
|
}
|
|
17977
17976
|
function F(T, N, O, V) {
|
|
17978
|
-
var E,
|
|
17979
|
-
return T || (X = !1, T = "_@r" + (g += 1)), H = v(T),
|
|
17977
|
+
var E, G, U, H, K = null, Y = N ? N.name : null, J = T, X = !0, Q = "";
|
|
17978
|
+
return T || (X = !1, T = "_@r" + (g += 1)), H = v(T), K = H[0], T = H[1], K && (K = b(K, Y, V), G = getOwn(p, K)), T && (K ? O ? Q = T : G && G.normalize ? Q = G.normalize(T, function(Z) {
|
|
17980
17979
|
return b(Z, Y, V);
|
|
17981
|
-
}) : Q = T.indexOf("!") === -1 ? b(T, Y, V) : T : (Q = b(T, Y, V), H = v(Q),
|
|
17982
|
-
prefix:
|
|
17980
|
+
}) : Q = T.indexOf("!") === -1 ? b(T, Y, V) : T : (Q = b(T, Y, V), H = v(Q), K = H[0], Q = H[1], O = !0, E = o.nameToUrl(Q))), U = K && !G && !O ? "_unnormalized" + (f += 1) : "", {
|
|
17981
|
+
prefix: K,
|
|
17983
17982
|
name: Q,
|
|
17984
17983
|
parentMap: N,
|
|
17985
|
-
unnormalized: !!
|
|
17984
|
+
unnormalized: !!U,
|
|
17986
17985
|
url: E,
|
|
17987
17986
|
originalName: J,
|
|
17988
17987
|
isDefine: X,
|
|
17989
|
-
id: (
|
|
17988
|
+
id: (K ? K + "!" + Q : Q) + U
|
|
17990
17989
|
};
|
|
17991
17990
|
}
|
|
17992
17991
|
function I(T) {
|
|
@@ -18000,8 +17999,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18000
17999
|
function k(T, N) {
|
|
18001
18000
|
var O = T.requireModules, V = !1;
|
|
18002
18001
|
N ? N(T) : (each(O, function(E) {
|
|
18003
|
-
var
|
|
18004
|
-
|
|
18002
|
+
var G = getOwn(l, E);
|
|
18003
|
+
G && (G.error = T, G.events.error && (V = !0, G.emit("error", T)));
|
|
18005
18004
|
}), V || req.onError(T));
|
|
18006
18005
|
}
|
|
18007
18006
|
function D() {
|
|
@@ -18034,27 +18033,27 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18034
18033
|
}
|
|
18035
18034
|
function z(T, N, O) {
|
|
18036
18035
|
var V = T.map.id;
|
|
18037
|
-
T.error ? T.emit("error", T.error) : (N[V] = !0, each(T.depMaps, function(E,
|
|
18038
|
-
var
|
|
18039
|
-
H && !T.depMatched[
|
|
18036
|
+
T.error ? T.emit("error", T.error) : (N[V] = !0, each(T.depMaps, function(E, G) {
|
|
18037
|
+
var U = E.id, H = getOwn(l, U);
|
|
18038
|
+
H && !T.depMatched[G] && !O[U] && (getOwn(N, U) ? (T.defineDep(G, p[U]), T.check()) : z(H, N, O));
|
|
18040
18039
|
}), O[V] = !0);
|
|
18041
18040
|
}
|
|
18042
18041
|
function L() {
|
|
18043
|
-
var T, N, O = a.waitSeconds * 1e3, V = O && o.startTime + O < (/* @__PURE__ */ new Date()).getTime(), E = [],
|
|
18042
|
+
var T, N, O = a.waitSeconds * 1e3, V = O && o.startTime + O < (/* @__PURE__ */ new Date()).getTime(), E = [], G = [], U = !1, H = !0;
|
|
18044
18043
|
if (!t) {
|
|
18045
|
-
if (t = !0, eachProp(c, function(
|
|
18046
|
-
var Y =
|
|
18047
|
-
if (
|
|
18048
|
-
if (!
|
|
18049
|
-
y(J) ? (N = !0,
|
|
18050
|
-
else if (!
|
|
18044
|
+
if (t = !0, eachProp(c, function(K) {
|
|
18045
|
+
var Y = K.map, J = Y.id;
|
|
18046
|
+
if (K.enabled && (Y.isDefine || G.push(K), !K.error)) {
|
|
18047
|
+
if (!K.inited && V)
|
|
18048
|
+
y(J) ? (N = !0, U = !0) : (E.push(J), S(J));
|
|
18049
|
+
else if (!K.inited && K.fetched && Y.isDefine && (U = !0, !Y.prefix))
|
|
18051
18050
|
return H = !1;
|
|
18052
18051
|
}
|
|
18053
18052
|
}), V && E.length)
|
|
18054
18053
|
return T = makeError("timeout", "Load timeout for modules: " + E, null, E), T.contextName = o.contextName, k(T);
|
|
18055
|
-
H && each(
|
|
18056
|
-
z(
|
|
18057
|
-
}), (!V || N) &&
|
|
18054
|
+
H && each(G, function(K) {
|
|
18055
|
+
z(K, {}, {});
|
|
18056
|
+
}), (!V || N) && U && (isBrowser || isWebWorker) && !i && (i = setTimeout(function() {
|
|
18058
18057
|
i = 0, L();
|
|
18059
18058
|
}, 50)), t = !1;
|
|
18060
18059
|
}
|
|
@@ -18094,31 +18093,31 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18094
18093
|
*/
|
|
18095
18094
|
check: function() {
|
|
18096
18095
|
if (!(!this.enabled || this.enabling)) {
|
|
18097
|
-
var T, N, O = this.map.id, V = this.depExports, E = this.exports,
|
|
18096
|
+
var T, N, O = this.map.id, V = this.depExports, E = this.exports, G = this.factory;
|
|
18098
18097
|
if (!this.inited)
|
|
18099
18098
|
hasProp(o.defQueueMap, O) || this.fetch();
|
|
18100
18099
|
else if (this.error)
|
|
18101
18100
|
this.emit("error", this.error);
|
|
18102
18101
|
else if (!this.defining) {
|
|
18103
18102
|
if (this.defining = !0, this.depCount < 1 && !this.defined) {
|
|
18104
|
-
if (isFunction(
|
|
18103
|
+
if (isFunction(G)) {
|
|
18105
18104
|
if (this.events.error && this.map.isDefine || req.onError !== defaultOnError)
|
|
18106
18105
|
try {
|
|
18107
|
-
E = o.execCb(O,
|
|
18106
|
+
E = o.execCb(O, G, V, E);
|
|
18108
18107
|
} catch (H) {
|
|
18109
18108
|
T = H;
|
|
18110
18109
|
}
|
|
18111
18110
|
else
|
|
18112
|
-
E = o.execCb(O,
|
|
18111
|
+
E = o.execCb(O, G, V, E);
|
|
18113
18112
|
if (this.map.isDefine && E === void 0 && (N = this.module, N ? E = N.exports : this.usingExports && (E = this.exports)), T)
|
|
18114
18113
|
return T.requireMap = this.map, T.requireModules = this.map.isDefine ? [this.map.id] : null, T.requireType = this.map.isDefine ? "define" : "require", k(this.error = T);
|
|
18115
18114
|
} else
|
|
18116
|
-
E =
|
|
18115
|
+
E = G;
|
|
18117
18116
|
if (this.exports = E, this.map.isDefine && !this.ignore && (p[O] = E, req.onResourceLoad)) {
|
|
18118
|
-
var
|
|
18117
|
+
var U = [];
|
|
18119
18118
|
each(this.depMaps, function(H) {
|
|
18120
|
-
|
|
18121
|
-
}), req.onResourceLoad(o, this.map,
|
|
18119
|
+
U.push(H.normalizedMap || H);
|
|
18120
|
+
}), req.onResourceLoad(o, this.map, U);
|
|
18122
18121
|
}
|
|
18123
18122
|
M(O), this.defined = !0;
|
|
18124
18123
|
}
|
|
@@ -18129,30 +18128,30 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18129
18128
|
callPlugin: function() {
|
|
18130
18129
|
var T = this.map, N = T.id, O = F(T.prefix);
|
|
18131
18130
|
this.depMaps.push(O), R(O, "defined", bind(this, function(V) {
|
|
18132
|
-
var E,
|
|
18131
|
+
var E, G, U, H = getOwn(h, this.map.id), K = this.map.name, Y = this.map.parentMap ? this.map.parentMap.name : null, J = o.makeRequire(T.parentMap, {
|
|
18133
18132
|
enableBuildCallback: !0
|
|
18134
18133
|
});
|
|
18135
18134
|
if (this.map.unnormalized) {
|
|
18136
|
-
V.normalize && (
|
|
18135
|
+
V.normalize && (K = V.normalize(K, function(X) {
|
|
18137
18136
|
return b(X, Y, !0);
|
|
18138
|
-
}) || ""),
|
|
18139
|
-
T.prefix + "!" +
|
|
18137
|
+
}) || ""), G = F(
|
|
18138
|
+
T.prefix + "!" + K,
|
|
18140
18139
|
this.map.parentMap,
|
|
18141
18140
|
!0
|
|
18142
18141
|
), R(
|
|
18143
|
-
|
|
18142
|
+
G,
|
|
18144
18143
|
"defined",
|
|
18145
18144
|
bind(this, function(X) {
|
|
18146
|
-
this.map.normalizedMap =
|
|
18145
|
+
this.map.normalizedMap = G, this.init([], function() {
|
|
18147
18146
|
return X;
|
|
18148
18147
|
}, null, {
|
|
18149
18148
|
enabled: !0,
|
|
18150
18149
|
ignore: !0
|
|
18151
18150
|
});
|
|
18152
18151
|
})
|
|
18153
|
-
),
|
|
18152
|
+
), U = getOwn(l, G.id), U && (this.depMaps.push(G), this.events.error && U.on("error", bind(this, function(X) {
|
|
18154
18153
|
this.emit("error", X);
|
|
18155
|
-
})),
|
|
18154
|
+
})), U.enable());
|
|
18156
18155
|
return;
|
|
18157
18156
|
}
|
|
18158
18157
|
if (H) {
|
|
@@ -18199,10 +18198,10 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18199
18198
|
this.depExports[N] = E(this);
|
|
18200
18199
|
return;
|
|
18201
18200
|
}
|
|
18202
|
-
this.depCount += 1, R(T, "defined", bind(this, function(
|
|
18203
|
-
this.undefed || (this.defineDep(N,
|
|
18204
|
-
})), this.errback ? R(T, "error", bind(this, this.errback)) : this.events.error && R(T, "error", bind(this, function(
|
|
18205
|
-
this.emit("error",
|
|
18201
|
+
this.depCount += 1, R(T, "defined", bind(this, function(G) {
|
|
18202
|
+
this.undefed || (this.defineDep(N, G), this.check());
|
|
18203
|
+
})), this.errback ? R(T, "error", bind(this, this.errback)) : this.events.error && R(T, "error", bind(this, function(G) {
|
|
18204
|
+
this.emit("error", G);
|
|
18206
18205
|
}));
|
|
18207
18206
|
}
|
|
18208
18207
|
O = T.id, V = l[O], !hasProp(r, O) && V && !V.enabled && o.enable(T, this);
|
|
@@ -18262,8 +18261,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18262
18261
|
configure: function(T) {
|
|
18263
18262
|
if (T.baseUrl && T.baseUrl.charAt(T.baseUrl.length - 1) !== "/" && (T.baseUrl += "/"), typeof T.urlArgs == "string") {
|
|
18264
18263
|
var N = T.urlArgs;
|
|
18265
|
-
T.urlArgs = function(E,
|
|
18266
|
-
return (
|
|
18264
|
+
T.urlArgs = function(E, G) {
|
|
18265
|
+
return (G.indexOf("?") === -1 ? "?" : "&") + N;
|
|
18267
18266
|
};
|
|
18268
18267
|
}
|
|
18269
18268
|
var O = a.shim, V = {
|
|
@@ -18272,21 +18271,21 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18272
18271
|
config: !0,
|
|
18273
18272
|
map: !0
|
|
18274
18273
|
};
|
|
18275
|
-
eachProp(T, function(E,
|
|
18276
|
-
V[
|
|
18277
|
-
}), T.bundles && eachProp(T.bundles, function(E,
|
|
18278
|
-
each(E, function(
|
|
18279
|
-
|
|
18274
|
+
eachProp(T, function(E, G) {
|
|
18275
|
+
V[G] ? (a[G] || (a[G] = {}), mixin(a[G], E, !0, !0)) : a[G] = E;
|
|
18276
|
+
}), T.bundles && eachProp(T.bundles, function(E, G) {
|
|
18277
|
+
each(E, function(U) {
|
|
18278
|
+
U !== G && (h[U] = G);
|
|
18280
18279
|
});
|
|
18281
|
-
}), T.shim && (eachProp(T.shim, function(E,
|
|
18280
|
+
}), T.shim && (eachProp(T.shim, function(E, G) {
|
|
18282
18281
|
isArray(E) && (E = {
|
|
18283
18282
|
deps: E
|
|
18284
|
-
}), (E.exports || E.init) && !E.exportsFn && (E.exportsFn = o.makeShimExports(E)), O[
|
|
18283
|
+
}), (E.exports || E.init) && !E.exportsFn && (E.exportsFn = o.makeShimExports(E)), O[G] = E;
|
|
18285
18284
|
}), a.shim = O), T.packages && each(T.packages, function(E) {
|
|
18286
|
-
var
|
|
18287
|
-
E = typeof E == "string" ? { name: E } : E,
|
|
18288
|
-
}), eachProp(l, function(E,
|
|
18289
|
-
!E.inited && !E.map.unnormalized && (E.map = F(
|
|
18285
|
+
var G, U;
|
|
18286
|
+
E = typeof E == "string" ? { name: E } : E, U = E.name, G = E.location, G && (a.paths[U] = E.location), a.pkgs[U] = E.name + "/" + (E.main || "main").replace(currDirRegExp, "").replace(jsSuffixRegExp, "");
|
|
18287
|
+
}), eachProp(l, function(E, G) {
|
|
18288
|
+
!E.inited && !E.map.unnormalized && (E.map = F(G, null, !0));
|
|
18290
18289
|
}), (T.deps || T.callback) && o.require(T.deps || [], T.callback);
|
|
18291
18290
|
},
|
|
18292
18291
|
makeShimExports: function(T) {
|
|
@@ -18298,10 +18297,10 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18298
18297
|
},
|
|
18299
18298
|
makeRequire: function(T, N) {
|
|
18300
18299
|
N = N || {};
|
|
18301
|
-
function O(V, E,
|
|
18302
|
-
var
|
|
18303
|
-
return N.enableBuildCallback && E && isFunction(E) && (E.__requireJsBuild = !0), typeof V == "string" ? isFunction(E) ? k(makeError("requireargs", "Invalid require call"),
|
|
18304
|
-
j(),
|
|
18300
|
+
function O(V, E, G) {
|
|
18301
|
+
var U, H, K;
|
|
18302
|
+
return N.enableBuildCallback && E && isFunction(E) && (E.__requireJsBuild = !0), typeof V == "string" ? isFunction(E) ? k(makeError("requireargs", "Invalid require call"), G) : T && hasProp(r, V) ? r[V](l[T.id]) : req.get ? req.get(o, V, T, O) : (H = F(V, T, !1, !0), U = H.id, hasProp(p, U) ? p[U] : k(makeError("notloaded", 'Module name "' + U + '" has not been loaded yet for context: ' + e + (T ? "" : ". Use require([])")))) : (j(), o.nextTick(function() {
|
|
18303
|
+
j(), K = I(F(null, T)), K.skipMap = N.skipMap, K.init(V, E, G, {
|
|
18305
18304
|
enabled: !0
|
|
18306
18305
|
}), L();
|
|
18307
18306
|
}), O);
|
|
@@ -18314,8 +18313,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18314
18313
|
* plain URLs like nameToUrl.
|
|
18315
18314
|
*/
|
|
18316
18315
|
toUrl: function(V) {
|
|
18317
|
-
var E,
|
|
18318
|
-
return
|
|
18316
|
+
var E, G = V.lastIndexOf("."), U = V.split("/")[0], H = U === "." || U === "..";
|
|
18317
|
+
return G !== -1 && (!H || G > 1) && (E = V.substring(G, V.length), V = V.substring(0, G)), o.nameToUrl(b(
|
|
18319
18318
|
V,
|
|
18320
18319
|
T && T.id,
|
|
18321
18320
|
!0
|
|
@@ -18329,10 +18328,10 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18329
18328
|
}
|
|
18330
18329
|
}), T || (O.undef = function(V) {
|
|
18331
18330
|
D();
|
|
18332
|
-
var E = F(V, T, !0),
|
|
18333
|
-
|
|
18334
|
-
|
|
18335
|
-
}), delete o.defQueueMap[V],
|
|
18331
|
+
var E = F(V, T, !0), G = getOwn(l, V);
|
|
18332
|
+
G.undefed = !0, S(V), delete p[V], delete m[E.url], delete u[V], eachReverse(d, function(U, H) {
|
|
18333
|
+
U[0] === V && d.splice(H, 1);
|
|
18334
|
+
}), delete o.defQueueMap[V], G && (G.events.defined && (u[V] = G.events), M(V));
|
|
18336
18335
|
}), O;
|
|
18337
18336
|
},
|
|
18338
18337
|
/**
|
|
@@ -18352,7 +18351,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18352
18351
|
* @param {String} moduleName the name of the module to potentially complete.
|
|
18353
18352
|
*/
|
|
18354
18353
|
completeLoad: function(T) {
|
|
18355
|
-
var N, O, V, E = getOwn(a.shim, T) || {},
|
|
18354
|
+
var N, O, V, E = getOwn(a.shim, T) || {}, G = E.exports;
|
|
18356
18355
|
for (D(); d.length; ) {
|
|
18357
18356
|
if (O = d.shift(), O[0] === null) {
|
|
18358
18357
|
if (O[0] = T, N)
|
|
@@ -18363,7 +18362,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18363
18362
|
$(O);
|
|
18364
18363
|
}
|
|
18365
18364
|
if (o.defQueueMap = {}, V = getOwn(l, T), !N && !hasProp(p, T) && V && !V.inited) {
|
|
18366
|
-
if (a.enforceDefine && (!
|
|
18365
|
+
if (a.enforceDefine && (!G || !getGlobal(G)))
|
|
18367
18366
|
return y(T) ? void 0 : k(makeError(
|
|
18368
18367
|
"nodefine",
|
|
18369
18368
|
"No define call for " + T,
|
|
@@ -18382,15 +18381,15 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18382
18381
|
* internal API, not a public one. Use toUrl for the public API.
|
|
18383
18382
|
*/
|
|
18384
18383
|
nameToUrl: function(T, N, O) {
|
|
18385
|
-
var V, E,
|
|
18384
|
+
var V, E, G, U, H, K, Y, J = getOwn(a.pkgs, T);
|
|
18386
18385
|
if (J && (T = J), Y = getOwn(h, T), Y)
|
|
18387
18386
|
return o.nameToUrl(Y, N, O);
|
|
18388
18387
|
if (req.jsExtRegExp.test(T))
|
|
18389
18388
|
H = T + (N || "");
|
|
18390
18389
|
else {
|
|
18391
|
-
for (V = a.paths, E = T.split("/"),
|
|
18392
|
-
if (
|
|
18393
|
-
isArray(
|
|
18390
|
+
for (V = a.paths, E = T.split("/"), G = E.length; G > 0; G -= 1)
|
|
18391
|
+
if (U = E.slice(0, G).join("/"), K = getOwn(V, U), K) {
|
|
18392
|
+
isArray(K) && (K = K[0]), E.splice(0, G, K);
|
|
18394
18393
|
break;
|
|
18395
18394
|
}
|
|
18396
18395
|
H = E.join("/"), H += N || (/^data\:|^blob\:|\?/.test(H) || O ? "" : ".js"), H = (H.charAt(0) === "/" || H.match(/^[\w\+\.\-]+:/) ? "" : a.baseUrl) + H;
|
|
@@ -18433,8 +18432,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
18433
18432
|
if (!y(N.id)) {
|
|
18434
18433
|
var O = [];
|
|
18435
18434
|
return eachProp(l, function(V, E) {
|
|
18436
|
-
E.indexOf("_@r") !== 0 && each(V.depMaps, function(
|
|
18437
|
-
if (
|
|
18435
|
+
E.indexOf("_@r") !== 0 && each(V.depMaps, function(G) {
|
|
18436
|
+
if (G.id === N.id)
|
|
18438
18437
|
return O.push(E), !0;
|
|
18439
18438
|
});
|
|
18440
18439
|
}), k(makeError("scripterror", 'Script error for "' + N.id + (O.length ? '", needed by: ' + O.join(", ") : '"'), T, [N.id]));
|
|
@@ -18559,7 +18558,7 @@ const DataSourceApplicationProvider = (o) => {
|
|
|
18559
18558
|
var r = o, {
|
|
18560
18559
|
children: e,
|
|
18561
18560
|
dataSourceManager: t
|
|
18562
|
-
} = r, n =
|
|
18561
|
+
} = r, n = W(r, [
|
|
18563
18562
|
"children",
|
|
18564
18563
|
"dataSourceManager"
|
|
18565
18564
|
]);
|
|
@@ -19056,29 +19055,29 @@ const useCollectionManager_deprecated = (e) => {
|
|
|
19056
19055
|
collectionNames: O = [w],
|
|
19057
19056
|
maxDepth: V = 1,
|
|
19058
19057
|
allowAllTypes: E = !1,
|
|
19059
|
-
exceptInterfaces:
|
|
19060
|
-
prefixFieldValue:
|
|
19058
|
+
exceptInterfaces: G = [],
|
|
19059
|
+
prefixFieldValue: U = "",
|
|
19061
19060
|
usePrefix: H = !1,
|
|
19062
|
-
dataSource:
|
|
19061
|
+
dataSource: K
|
|
19063
19062
|
} = j || {};
|
|
19064
19063
|
if (O.length - 1 > V)
|
|
19065
19064
|
return;
|
|
19066
19065
|
if (N[w])
|
|
19067
19066
|
return _.cloneDeep(N[w]);
|
|
19068
19067
|
typeof B == "string" && (B = [B]);
|
|
19069
|
-
const Y = b(w,
|
|
19070
|
-
(Q) => Q.interface && !
|
|
19068
|
+
const Y = b(w, K), J = (X = Y == null ? void 0 : Y.filter(
|
|
19069
|
+
(Q) => Q.interface && !G.includes(Q.interface) && (E || B.includes(Q.type) || (T && Q.target && Q.target !== w && Array.isArray(T) ? T.includes(Q.interface) : !1))
|
|
19071
19070
|
)) == null ? void 0 : X.map((Q) => {
|
|
19072
19071
|
var oe, te;
|
|
19073
19072
|
const Z = x({
|
|
19074
|
-
value: H &&
|
|
19073
|
+
value: H && U ? `${U}.${Q.name}` : Q.name,
|
|
19075
19074
|
label: f((oe = Q == null ? void 0 : Q.uiSchema) == null ? void 0 : oe.title) || Q.name
|
|
19076
19075
|
}, Q);
|
|
19077
19076
|
return T && Q.target && (Z.children = O.includes(Q.target) ? [] : I(Q.target, B, P(x({}, j), {
|
|
19078
19077
|
cached: N,
|
|
19079
|
-
dataSource:
|
|
19078
|
+
dataSource: K,
|
|
19080
19079
|
collectionNames: [...O, Q.target],
|
|
19081
|
-
prefixFieldValue: H ?
|
|
19080
|
+
prefixFieldValue: H ? U ? `${U}.${Q.name}` : Q.name : "",
|
|
19082
19081
|
usePrefix: H
|
|
19083
19082
|
})), !((te = Z.children) != null && te.length)) ? null : Z;
|
|
19084
19083
|
}).filter(Boolean);
|
|
@@ -19228,7 +19227,7 @@ function FormDialog(e, t, n, o) {
|
|
|
19228
19227
|
open: (p) => q(this, null, function* () {
|
|
19229
19228
|
return r.promise || (r.promise = new Promise((m, h) => q(this, null, function* () {
|
|
19230
19229
|
try {
|
|
19231
|
-
p = yield loading
|
|
19230
|
+
p = yield loading(l.loadingText, () => applyMiddleware(p, r.openMiddlewares)), r.form = r.form || createForm(p);
|
|
19232
19231
|
} catch (g) {
|
|
19233
19232
|
h(g);
|
|
19234
19233
|
}
|
|
@@ -19246,7 +19245,7 @@ function FormDialog(e, t, n, o) {
|
|
|
19246
19245
|
});
|
|
19247
19246
|
},
|
|
19248
19247
|
() => q(this, null, function* () {
|
|
19249
|
-
yield loading
|
|
19248
|
+
yield loading(l.loadingText, () => applyMiddleware(r.form, r.cancelMiddlewares)), d.close();
|
|
19250
19249
|
})
|
|
19251
19250
|
)
|
|
19252
19251
|
);
|
|
@@ -20940,7 +20939,7 @@ function getSelectedIdFilter(e) {
|
|
|
20940
20939
|
} : null;
|
|
20941
20940
|
}
|
|
20942
20941
|
function SelectItem(e) {
|
|
20943
|
-
const a = e, { title: t, options: n, value: o, onChange: r } = a, i =
|
|
20942
|
+
const a = e, { title: t, options: n, value: o, onChange: r } = a, i = W(a, ["title", "options", "value", "onChange"]);
|
|
20944
20943
|
return /* @__PURE__ */ jsx(SchemaSettingsItem, P(x({ title: t }, i), { children: /* @__PURE__ */ jsxs("div", { style: { alignItems: "center", display: "flex", justifyContent: "space-between" }, children: [
|
|
20945
20944
|
t,
|
|
20946
20945
|
/* @__PURE__ */ jsx(
|
|
@@ -20966,7 +20965,7 @@ const Tree = connect(
|
|
|
20966
20965
|
Tree.displayName = "Tree";
|
|
20967
20966
|
const compatibleDataId = (e, t) => e == null ? void 0 : e.map((n) => {
|
|
20968
20967
|
var l;
|
|
20969
|
-
const a = n, { dataId: o } = a, r =
|
|
20968
|
+
const a = n, { dataId: o } = a, r = W(a, ["dataId"]), i = x({}, r);
|
|
20970
20969
|
return o && (i.dataScope = { $and: [{ id: { $eq: o } }] }, i.titleField = (i == null ? void 0 : i.titleField) || ((l = t == null ? void 0 : t[n.collection]) == null ? void 0 : l.titleField) || "id"), i;
|
|
20971
20970
|
}), FormDataTemplates = withDynamicSchemaProps(
|
|
20972
20971
|
observer$1((e) => {
|
|
@@ -22072,7 +22071,7 @@ const SchemaSettingsProvider = (e) => {
|
|
|
22072
22071
|
);
|
|
22073
22072
|
return /* @__PURE__ */ jsx(SchemaSettingsContext.Provider, { value: a, children: t });
|
|
22074
22073
|
}, SchemaSettingsDropdown = React.memo((e) => {
|
|
22075
|
-
const f = e, { title: t, dn: n } = f, o =
|
|
22074
|
+
const f = e, { title: t, dn: n } = f, o = W(f, ["title", "dn"]), [r, i] = useState(!1), { Component: a, getMenuItems: l } = useMenuItem(), c = useNiceDropdownMaxHeight([r]), [u, d] = useState(!1), p = useContext(SchemaToolbarVisibleContext);
|
|
22076
22075
|
useEffect(() => {
|
|
22077
22076
|
p && d(!1);
|
|
22078
22077
|
}, [p]);
|
|
@@ -22291,10 +22290,10 @@ const findGridSchema = (e) => e.reduceProperties((t, n) => {
|
|
|
22291
22290
|
}
|
|
22292
22291
|
);
|
|
22293
22292
|
}, SchemaSettingsSelectItem = (e) => {
|
|
22294
|
-
const a = e, { title: t, options: n, value: o, onChange: r } = a, i =
|
|
22293
|
+
const a = e, { title: t, options: n, value: o, onChange: r } = a, i = W(a, ["title", "options", "value", "onChange"]);
|
|
22295
22294
|
return /* @__PURE__ */ jsx(SchemaSettingsItem, P(x({ title: t }, i), { children: /* @__PURE__ */ jsx(SelectWithTitle, { title: t, defaultValue: o, onChange: r, options: n }) }));
|
|
22296
22295
|
}, SchemaSettingsCascaderItem = (e) => {
|
|
22297
|
-
const a = e, { title: t, options: n, value: o, onChange: r } = a, i =
|
|
22296
|
+
const a = e, { title: t, options: n, value: o, onChange: r } = a, i = W(a, ["title", "options", "value", "onChange"]);
|
|
22298
22297
|
return /* @__PURE__ */ jsx(SchemaSettingsItem, P(x({ title: t }, i), { children: /* @__PURE__ */ jsxs("div", { style: { alignItems: "center", display: "flex", justifyContent: "space-between" }, children: [
|
|
22299
22298
|
t,
|
|
22300
22299
|
/* @__PURE__ */ jsx(
|
|
@@ -22311,7 +22310,7 @@ const findGridSchema = (e) => e.reduceProperties((t, n) => {
|
|
|
22311
22310
|
}, ml32 = { marginLeft: 32 }, MenuItemSwitch = observer$1(({ state: e }) => /* @__PURE__ */ jsx(Switch, { size: "small", checked: e.checked, style: ml32 }));
|
|
22312
22311
|
MenuItemSwitch.displayName = "MenuItemSwitch";
|
|
22313
22312
|
const SchemaSettingsSwitchItem = (e) => {
|
|
22314
|
-
const i = e, { title: t, onChange: n } = i, o =
|
|
22313
|
+
const i = e, { title: t, onChange: n } = i, o = W(i, ["title", "onChange"]), [r] = useState(() => observable({ checked: !!e.checked }));
|
|
22315
22314
|
return /* @__PURE__ */ jsx(
|
|
22316
22315
|
SchemaSettingsItem,
|
|
22317
22316
|
P(x({
|
|
@@ -22327,7 +22326,7 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
22327
22326
|
})
|
|
22328
22327
|
);
|
|
22329
22328
|
}, SchemaSettingsPopupItem = (e) => {
|
|
22330
|
-
const a = e, { schema: t } = a, n =
|
|
22329
|
+
const a = e, { schema: t } = a, n = W(a, ["schema"]), [o, r] = useState(!1), i = useContext(SchemaSettingsContext);
|
|
22331
22330
|
return /* @__PURE__ */ jsxs(ActionContextProvider, { value: { visible: o, setVisible: r }, children: [
|
|
22332
22331
|
/* @__PURE__ */ jsx(
|
|
22333
22332
|
SchemaSettingsItem,
|
|
@@ -22361,7 +22360,7 @@ const SchemaSettingsSwitchItem = (e) => {
|
|
|
22361
22360
|
modalTip: c,
|
|
22362
22361
|
components: u,
|
|
22363
22362
|
scope: d
|
|
22364
|
-
} = w, p =
|
|
22363
|
+
} = w, p = W(w, [
|
|
22365
22364
|
"title",
|
|
22366
22365
|
"onSubmit",
|
|
22367
22366
|
"width",
|
|
@@ -22447,7 +22446,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22447
22446
|
width: u = "fit-content",
|
|
22448
22447
|
noRecord: d = !1,
|
|
22449
22448
|
ModalContextProvider: p = (E) => /* @__PURE__ */ jsx(Fragment, { children: E.children })
|
|
22450
|
-
} = V, m =
|
|
22449
|
+
} = V, m = W(V, [
|
|
22451
22450
|
"hidden",
|
|
22452
22451
|
"title",
|
|
22453
22452
|
"components",
|
|
@@ -22466,9 +22465,9 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22466
22465
|
title: n
|
|
22467
22466
|
}, m), {
|
|
22468
22467
|
onClick: () => q(void 0, null, function* () {
|
|
22469
|
-
const E = l ? yield l() : c,
|
|
22468
|
+
const E = l ? yield l() : c, G = _.isFunction(e.schema) ? e.schema() : e.schema;
|
|
22470
22469
|
FormDialog(
|
|
22471
|
-
{ title:
|
|
22470
|
+
{ title: G.title || n, width: u },
|
|
22472
22471
|
() => /* @__PURE__ */ jsx(p, { children: /* @__PURE__ */ jsx(CollectOperators, { defaultOperators: L(), children: /* @__PURE__ */ jsx(VariablesContext.Provider, { value: w, children: /* @__PURE__ */ jsx(BlockContext.Provider, { value: z, children: /* @__PURE__ */ jsx(
|
|
22473
22472
|
VariablePopupRecordProvider,
|
|
22474
22473
|
{
|
|
@@ -22509,7 +22508,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22509
22508
|
{
|
|
22510
22509
|
components: o,
|
|
22511
22510
|
scope: r,
|
|
22512
|
-
schema:
|
|
22511
|
+
schema: G
|
|
22513
22512
|
}
|
|
22514
22513
|
) }) }) })
|
|
22515
22514
|
}
|
|
@@ -22524,8 +22523,8 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22524
22523
|
).open({
|
|
22525
22524
|
initialValues: E,
|
|
22526
22525
|
effects: i
|
|
22527
|
-
}).then((
|
|
22528
|
-
console.error(
|
|
22526
|
+
}).then((U) => (a(U), U)).catch((U) => {
|
|
22527
|
+
console.error(U);
|
|
22529
22528
|
});
|
|
22530
22529
|
}),
|
|
22531
22530
|
children: e.children || e.title
|
|
@@ -22836,7 +22835,7 @@ const typeComponentMap = {
|
|
|
22836
22835
|
actionModal: SchemaSettingsActionModalItem,
|
|
22837
22836
|
modal: SchemaSettingsModalItem
|
|
22838
22837
|
}, SchemaSettingsChildErrorFallback = (e) => {
|
|
22839
|
-
const o = e, { title: t } = o, n =
|
|
22838
|
+
const o = e, { title: t } = o, n = W(o, ["title"]);
|
|
22840
22839
|
return /* @__PURE__ */ jsx(SchemaSettingsItem, { title: t, children: /* @__PURE__ */ jsx(ErrorFallback.Modal, x({}, n)) });
|
|
22841
22840
|
}, getFallbackComponent = _.memoize((e) => (t) => /* @__PURE__ */ jsx(SchemaSettingsChildErrorFallback, P(x({}, t), { title: e }))), SchemaSettingsChildren = (e) => {
|
|
22842
22841
|
const { children: t } = e, { visible: n } = useSchemaSettings(), o = useRef(!1), r = useFieldComponentName();
|
|
@@ -22872,7 +22871,7 @@ const typeComponentMap = {
|
|
|
22872
22871
|
});
|
|
22873
22872
|
SchemaSettingsIcon.displayName = "SchemaSettingsIcon";
|
|
22874
22873
|
const SchemaSettingsWrapper = React.memo((e) => {
|
|
22875
|
-
const p = e, { items: t, Component: n = SchemaSettingsIcon, name: o, componentProps: r, style: i } = p, a =
|
|
22874
|
+
const p = e, { items: t, Component: n = SchemaSettingsIcon, name: o, componentProps: r, style: i } = p, a = W(p, ["items", "Component", "name", "componentProps", "style"]), { dn: l } = useDesignable(), c = useField(), u = useFieldSchema(), d = useMemo(
|
|
22876
22875
|
() => x({
|
|
22877
22876
|
options: e,
|
|
22878
22877
|
style: i
|
|
@@ -23372,8 +23371,8 @@ const getActionContext = (e) => {
|
|
|
23372
23371
|
));
|
|
23373
23372
|
const D = (R == null ? void 0 : R.interface) === "m2o" && findParentFieldSchema(o), M = D && p(D == null ? void 0 : D["x-collection-field"]), z = useTableBlockContext(), L = (R == null ? void 0 : R.interface) === "m2m" || (R == null ? void 0 : R.interface) === "mbm" || (M == null ? void 0 : M.type) === "hasMany" && (R == null ? void 0 : R.interface) === "m2o", $ = useCallback(
|
|
23374
23373
|
(V) => {
|
|
23375
|
-
const E = V.find((
|
|
23376
|
-
return !(
|
|
23374
|
+
const E = V.find((U) => U.value === "$nForm"), G = m(I);
|
|
23375
|
+
return !(G != null && G.length) && E && (E.children = formatVariableScop(y())), V;
|
|
23377
23376
|
},
|
|
23378
23377
|
[y, I]
|
|
23379
23378
|
), w = useMemo(() => ({
|
|
@@ -23409,26 +23408,26 @@ const getActionContext = (e) => {
|
|
|
23409
23408
|
getAllCollectionsInheritChain: h
|
|
23410
23409
|
}),
|
|
23411
23410
|
renderSchemaComponent: function(E) {
|
|
23412
|
-
const
|
|
23413
|
-
|
|
23414
|
-
const
|
|
23415
|
-
R.target &&
|
|
23411
|
+
const G = useMemo(() => _.cloneDeep(k) || {}, []);
|
|
23412
|
+
G["x-read-pretty"] = !1, G["x-disabled"] = !1, _.set(G, "x-decorator-props.showTitle", !1);
|
|
23413
|
+
const U = getFieldDefaultValue(G, R);
|
|
23414
|
+
R.target && G["x-component-props"] && (G["x-component-props"].mode = "Select"), R != null && R.uiSchema.type && (G.type = R.uiSchema.type), (R == null ? void 0 : R.uiSchema["x-component"]) === "Checkbox" && (_.set(G, "x-component-props.defaultChecked", U), G.type = "void");
|
|
23416
23415
|
const H = useMemo(
|
|
23417
|
-
() => P(x({},
|
|
23416
|
+
() => P(x({}, G || {}), {
|
|
23418
23417
|
"x-decorator": "FormItem",
|
|
23419
|
-
"x-component-props": P(x({},
|
|
23418
|
+
"x-component-props": P(x({}, G["x-component-props"]), {
|
|
23420
23419
|
collectionName: R == null ? void 0 : R.collectionName,
|
|
23421
23420
|
targetField: u,
|
|
23422
|
-
defaultValue: isVariable(
|
|
23421
|
+
defaultValue: isVariable(U) ? "" : U,
|
|
23423
23422
|
style: {
|
|
23424
23423
|
width: "100%",
|
|
23425
23424
|
verticalAlign: "top",
|
|
23426
23425
|
minWidth: "200px"
|
|
23427
23426
|
}
|
|
23428
23427
|
}),
|
|
23429
|
-
default: isVariable(
|
|
23428
|
+
default: isVariable(U) ? "" : U
|
|
23430
23429
|
}),
|
|
23431
|
-
[
|
|
23430
|
+
[G, U]
|
|
23432
23431
|
);
|
|
23433
23432
|
return _.set(H, "x-component-props.onChange", E.onChange), /* @__PURE__ */ jsx(FormProvider, { children: /* @__PURE__ */ jsx(SchemaComponent, { schema: H }) });
|
|
23434
23433
|
}
|
|
@@ -23453,11 +23452,11 @@ const getActionContext = (e) => {
|
|
|
23453
23452
|
g
|
|
23454
23453
|
]), j = useCallback(
|
|
23455
23454
|
(V) => {
|
|
23456
|
-
var
|
|
23455
|
+
var G, U, H;
|
|
23457
23456
|
const E = {
|
|
23458
23457
|
"x-uid": o["x-uid"]
|
|
23459
23458
|
};
|
|
23460
|
-
o.default = (
|
|
23459
|
+
o.default = (G = V.default) != null ? G : null, isVariable(V.default) || (U = r.setInitialValue) == null || U.call(r, V.default), E.default = (H = V.default) != null ? H : null, i.emit("patch", {
|
|
23461
23460
|
schema: E,
|
|
23462
23461
|
currentSchema: n
|
|
23463
23462
|
});
|
|
@@ -24240,15 +24239,15 @@ const useGetFilterOptions = () => {
|
|
|
24240
24239
|
};
|
|
24241
24240
|
});
|
|
24242
24241
|
}, TableColumnDesigner$1 = (e) => {
|
|
24243
|
-
var z, L, $, w, B, j, T, N, O, V, E,
|
|
24242
|
+
var z, L, $, w, B, j, T, N, O, V, E, G;
|
|
24244
24243
|
const { uiSchema: t, fieldSchema: n, collectionField: o } = e, { form: r } = useFormBlockContext(), { getInterface: i, getCollection: a } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = ((z = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : z.fieldNames) || ((L = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : L.fieldNames), m = useLabelFields$1(($ = o == null ? void 0 : o.target) != null ? $ : o == null ? void 0 : o.targetCollection), h = useColorFields((w = o == null ? void 0 : o.target) != null ? w : o == null ? void 0 : o.targetCollection), g = i(o == null ? void 0 : o.interface), f = a(o == null ? void 0 : o.target), C = isFileCollection$2(f), b = ["QuickEdit", "FormItem"].includes(n["x-decorator"]), { currentMode: S } = useAssociationFieldContext(), { isAllowToSetDefaultValue: y } = useIsAllowToSetDefaultValue({ collectionField: o, fieldSchema: n }), v = ["datetime", "createdAt", "updatedAt"].includes(o == null ? void 0 : o.interface), F = ["obo", "oho", "o2o", "o2m", "m2m", "m2o", "snapshot"].includes(
|
|
24245
24244
|
o == null ? void 0 : o.interface
|
|
24246
24245
|
), I = useFieldModeOptions({ fieldSchema: n }), R = ((B = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : B.mode) || "Select";
|
|
24247
24246
|
let k = "editable";
|
|
24248
24247
|
n["x-disabled"] === !0 && (k = "readonly"), n["x-read-pretty"] === !0 && (k = "read-pretty");
|
|
24249
24248
|
const D = F && R === "Select", M = () => {
|
|
24250
|
-
const { name:
|
|
24251
|
-
return /* @__PURE__ */ jsx(SchemaSettingsLinkageRules, x({ category: "style" }, P(x({}, H), { collectionName:
|
|
24249
|
+
const { name: U } = useCollection(), { linkageRulesProps: H } = useSchemaToolbar();
|
|
24250
|
+
return /* @__PURE__ */ jsx(SchemaSettingsLinkageRules, x({ category: "style" }, P(x({}, H), { collectionName: U })));
|
|
24252
24251
|
};
|
|
24253
24252
|
return /* @__PURE__ */ jsxs(GeneralSchemaDesigner, { disableInitializer: !0, children: [
|
|
24254
24253
|
/* @__PURE__ */ jsx(
|
|
@@ -24269,8 +24268,8 @@ const useGetFilterOptions = () => {
|
|
|
24269
24268
|
}
|
|
24270
24269
|
}
|
|
24271
24270
|
},
|
|
24272
|
-
onSubmit: ({ title:
|
|
24273
|
-
|
|
24271
|
+
onSubmit: ({ title: U }) => {
|
|
24272
|
+
U && (l.title = U, u.title = U, d.emit("patch", {
|
|
24274
24273
|
schema: {
|
|
24275
24274
|
"x-uid": u["x-uid"],
|
|
24276
24275
|
title: u.title
|
|
@@ -24285,12 +24284,12 @@ const useGetFilterOptions = () => {
|
|
|
24285
24284
|
collectionName: o == null ? void 0 : o.target,
|
|
24286
24285
|
defaultFilter: ((O = (N = (T = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : T.service) == null ? void 0 : N.params) == null ? void 0 : O.filter) || {},
|
|
24287
24286
|
form: r,
|
|
24288
|
-
onSubmit: ({ filter:
|
|
24289
|
-
var
|
|
24290
|
-
|
|
24291
|
-
const H = (Y = l.path) == null ? void 0 : Y.splice(((
|
|
24287
|
+
onSubmit: ({ filter: U }) => {
|
|
24288
|
+
var K, Y;
|
|
24289
|
+
U = removeNullCondition(U), set(l.componentProps, "service.params.filter", U), n["x-component-props"] = l.componentProps;
|
|
24290
|
+
const H = (Y = l.path) == null ? void 0 : Y.splice(((K = l.path) == null ? void 0 : K.length) - 1, 1);
|
|
24292
24291
|
l.form.query(`${H.concat("*." + n.name)}`).forEach((J) => {
|
|
24293
|
-
J.componentProps.service = J.componentProps.service || { params: {} }, J.componentProps.service.params.filter =
|
|
24292
|
+
J.componentProps.service = J.componentProps.service || { params: {} }, J.componentProps.service.params.filter = U;
|
|
24294
24293
|
}), d.emit("patch", {
|
|
24295
24294
|
schema: {
|
|
24296
24295
|
"x-uid": n["x-uid"],
|
|
@@ -24316,14 +24315,14 @@ const useGetFilterOptions = () => {
|
|
|
24316
24315
|
}
|
|
24317
24316
|
}
|
|
24318
24317
|
},
|
|
24319
|
-
onSubmit: ({ width:
|
|
24318
|
+
onSubmit: ({ width: U }) => {
|
|
24320
24319
|
const H = u["x-component-props"] || {};
|
|
24321
|
-
H.width =
|
|
24322
|
-
const
|
|
24320
|
+
H.width = U;
|
|
24321
|
+
const K = {
|
|
24323
24322
|
"x-uid": u["x-uid"]
|
|
24324
24323
|
};
|
|
24325
|
-
|
|
24326
|
-
schema:
|
|
24324
|
+
K["x-component-props"] = H, u["x-component-props"] = H, l.componentProps.width = U, d.emit("patch", {
|
|
24325
|
+
schema: K
|
|
24327
24326
|
}), d.refresh();
|
|
24328
24327
|
}
|
|
24329
24328
|
}
|
|
@@ -24334,13 +24333,13 @@ const useGetFilterOptions = () => {
|
|
|
24334
24333
|
{
|
|
24335
24334
|
title: c("Sortable"),
|
|
24336
24335
|
checked: l.componentProps.sorter,
|
|
24337
|
-
onChange: (
|
|
24336
|
+
onChange: (U) => {
|
|
24338
24337
|
const H = {
|
|
24339
24338
|
"x-uid": u["x-uid"]
|
|
24340
24339
|
};
|
|
24341
24340
|
u["x-component-props"] = P(x({}, u["x-component-props"]), {
|
|
24342
|
-
sorter:
|
|
24343
|
-
}), H["x-component-props"] = u["x-component-props"], l.componentProps.sorter =
|
|
24341
|
+
sorter: U
|
|
24342
|
+
}), H["x-component-props"] = u["x-component-props"], l.componentProps.sorter = U, d.emit("patch", {
|
|
24344
24343
|
schema: H
|
|
24345
24344
|
}), d.refresh();
|
|
24346
24345
|
}
|
|
@@ -24353,11 +24352,11 @@ const useGetFilterOptions = () => {
|
|
|
24353
24352
|
{
|
|
24354
24353
|
title: c("Enable link"),
|
|
24355
24354
|
checked: ((E = n["x-component-props"]) == null ? void 0 : E.enableLink) !== !1,
|
|
24356
|
-
onChange: (
|
|
24355
|
+
onChange: (U) => {
|
|
24357
24356
|
n["x-component-props"] = P(x({}, n == null ? void 0 : n["x-component-props"]), {
|
|
24358
|
-
enableLink:
|
|
24357
|
+
enableLink: U
|
|
24359
24358
|
}), l.componentProps = P(x({}, n == null ? void 0 : n["x-component-props"]), {
|
|
24360
|
-
enableLink:
|
|
24359
|
+
enableLink: U
|
|
24361
24360
|
}), d.emit("patch", {
|
|
24362
24361
|
schema: {
|
|
24363
24362
|
"x-uid": n["x-uid"],
|
|
@@ -24373,14 +24372,14 @@ const useGetFilterOptions = () => {
|
|
|
24373
24372
|
title: c("Title field"),
|
|
24374
24373
|
options: m,
|
|
24375
24374
|
value: p == null ? void 0 : p.label,
|
|
24376
|
-
onChange: (
|
|
24375
|
+
onChange: (U) => {
|
|
24377
24376
|
var Y, J, X, Q, Z;
|
|
24378
24377
|
const H = P(x(x({}, (J = (Y = o == null ? void 0 : o.uiSchema) == null ? void 0 : Y["x-component-props"]) == null ? void 0 : J.fieldNames), (X = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : X.fieldNames), {
|
|
24379
|
-
label:
|
|
24378
|
+
label: U
|
|
24380
24379
|
});
|
|
24381
24380
|
_.set(n, "x-component-props.fieldNames", H);
|
|
24382
|
-
const
|
|
24383
|
-
l.form.query(`${
|
|
24381
|
+
const K = (Z = l.path) == null ? void 0 : Z.splice(((Q = l.path) == null ? void 0 : Q.length) - 1, 1);
|
|
24382
|
+
l.form.query(`${K.concat("*." + n.name)}`).forEach((oe) => {
|
|
24384
24383
|
oe.componentProps.fieldNames = H;
|
|
24385
24384
|
}), d.emit("patch", {
|
|
24386
24385
|
schema: {
|
|
@@ -24401,11 +24400,11 @@ const useGetFilterOptions = () => {
|
|
|
24401
24400
|
{ label: c("Tag"), value: "Tag" }
|
|
24402
24401
|
].filter(Boolean) : I,
|
|
24403
24402
|
value: R,
|
|
24404
|
-
onChange: (
|
|
24403
|
+
onChange: (U) => {
|
|
24405
24404
|
const H = {
|
|
24406
24405
|
"x-uid": n["x-uid"]
|
|
24407
24406
|
};
|
|
24408
|
-
n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].mode =
|
|
24407
|
+
n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].mode = U, H["x-component-props"] = n["x-component-props"], l.componentProps = l.componentProps || {}, l.componentProps.mode = U, d.emit("patch", {
|
|
24409
24408
|
schema: H
|
|
24410
24409
|
}), d.refresh();
|
|
24411
24410
|
}
|
|
@@ -24417,12 +24416,12 @@ const useGetFilterOptions = () => {
|
|
|
24417
24416
|
{
|
|
24418
24417
|
title: c("Tag color field"),
|
|
24419
24418
|
options: h,
|
|
24420
|
-
value: (
|
|
24421
|
-
onChange: (
|
|
24419
|
+
value: (G = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : G.tagColorField,
|
|
24420
|
+
onChange: (U) => {
|
|
24422
24421
|
const H = {
|
|
24423
24422
|
"x-uid": n["x-uid"]
|
|
24424
24423
|
};
|
|
24425
|
-
n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].tagColorField =
|
|
24424
|
+
n["x-component-props"] = n["x-component-props"] || {}, n["x-component-props"].tagColorField = U, H["x-component-props"] = n["x-component-props"], l.componentProps.tagColorField = U, d.emit("patch", {
|
|
24426
24425
|
schema: H
|
|
24427
24426
|
}), d.refresh();
|
|
24428
24427
|
}
|
|
@@ -24434,15 +24433,15 @@ const useGetFilterOptions = () => {
|
|
|
24434
24433
|
{
|
|
24435
24434
|
title: c("Required"),
|
|
24436
24435
|
checked: n.required,
|
|
24437
|
-
onChange: (
|
|
24436
|
+
onChange: (U) => {
|
|
24438
24437
|
var Y, J;
|
|
24439
24438
|
const H = {
|
|
24440
24439
|
"x-uid": n["x-uid"]
|
|
24441
24440
|
};
|
|
24442
|
-
n.required =
|
|
24443
|
-
const
|
|
24444
|
-
l.form.query(`${
|
|
24445
|
-
X.required =
|
|
24441
|
+
n.required = U, H.required = U;
|
|
24442
|
+
const K = (J = l.path) == null ? void 0 : J.splice(((Y = l.path) == null ? void 0 : Y.length) - 1, 1);
|
|
24443
|
+
l.form.query(`${K.concat("*." + n.name)}`).forEach((X) => {
|
|
24444
|
+
X.required = U;
|
|
24446
24445
|
}), d.emit("patch", {
|
|
24447
24446
|
schema: H
|
|
24448
24447
|
}), d.refresh();
|
|
@@ -24460,26 +24459,26 @@ const useGetFilterOptions = () => {
|
|
|
24460
24459
|
{ label: c("Easy-reading"), value: "read-pretty" }
|
|
24461
24460
|
],
|
|
24462
24461
|
value: k,
|
|
24463
|
-
onChange: (
|
|
24462
|
+
onChange: (U) => {
|
|
24464
24463
|
var Y, J;
|
|
24465
24464
|
const H = {
|
|
24466
24465
|
"x-uid": n["x-uid"]
|
|
24467
|
-
},
|
|
24468
|
-
switch (
|
|
24466
|
+
}, K = (J = l.path) == null ? void 0 : J.splice(((Y = l.path) == null ? void 0 : Y.length) - 1, 1);
|
|
24467
|
+
switch (U) {
|
|
24469
24468
|
case "readonly": {
|
|
24470
|
-
n["x-read-pretty"] = !1, n["x-disabled"] = !0, H["x-read-pretty"] = !1, H["x-disabled"] = !0, l.form.query(`${
|
|
24469
|
+
n["x-read-pretty"] = !1, n["x-disabled"] = !0, H["x-read-pretty"] = !1, H["x-disabled"] = !0, l.form.query(`${K.concat("*." + n.name)}`).forEach((X) => {
|
|
24471
24470
|
X.readonly = !0, X.disabled = !0;
|
|
24472
24471
|
});
|
|
24473
24472
|
break;
|
|
24474
24473
|
}
|
|
24475
24474
|
case "read-pretty": {
|
|
24476
|
-
n["x-read-pretty"] = !0, n["x-disabled"] = !1, H["x-read-pretty"] = !0, H["x-disabled"] = !1, l.form.query(`${
|
|
24475
|
+
n["x-read-pretty"] = !0, n["x-disabled"] = !1, H["x-read-pretty"] = !0, H["x-disabled"] = !1, l.form.query(`${K.concat("*." + n.name)}`).forEach((X) => {
|
|
24477
24476
|
X.readPretty = !0;
|
|
24478
24477
|
});
|
|
24479
24478
|
break;
|
|
24480
24479
|
}
|
|
24481
24480
|
default: {
|
|
24482
|
-
n["x-read-pretty"] = !1, n["x-disabled"] = !1, H["x-read-pretty"] = !1, H["x-disabled"] = !1, l.form.query(`${
|
|
24481
|
+
n["x-read-pretty"] = !1, n["x-disabled"] = !1, H["x-read-pretty"] = !1, H["x-disabled"] = !1, l.form.query(`${K.concat("*." + n.name)}`).forEach((X) => {
|
|
24483
24482
|
X.readPretty = !1, X.disabled + !1;
|
|
24484
24483
|
});
|
|
24485
24484
|
break;
|
|
@@ -24497,11 +24496,11 @@ const useGetFilterOptions = () => {
|
|
|
24497
24496
|
SchemaSettingsSortingRule,
|
|
24498
24497
|
{
|
|
24499
24498
|
fieldSchema: n,
|
|
24500
|
-
onSubmitCallBack: (
|
|
24501
|
-
var
|
|
24502
|
-
const H = (Y = l.path) == null ? void 0 : Y.splice(((
|
|
24499
|
+
onSubmitCallBack: (U) => {
|
|
24500
|
+
var K, Y;
|
|
24501
|
+
const H = (Y = l.path) == null ? void 0 : Y.splice(((K = l.path) == null ? void 0 : K.length) - 1, 1);
|
|
24503
24502
|
l.form.query(`${H.concat("*." + n.name)}`).forEach((J) => {
|
|
24504
|
-
J.componentProps.service = J.componentProps.service || { params: {} }, J.componentProps.service.params.sort =
|
|
24503
|
+
J.componentProps.service = J.componentProps.service || { params: {} }, J.componentProps.service.params.sort = U;
|
|
24505
24504
|
});
|
|
24506
24505
|
}
|
|
24507
24506
|
}
|
|
@@ -25549,7 +25548,7 @@ const useCreateActionProps = () => {
|
|
|
25549
25548
|
return {
|
|
25550
25549
|
onClick() {
|
|
25551
25550
|
return q(this, null, function* () {
|
|
25552
|
-
var N, O, V, E,
|
|
25551
|
+
var N, O, V, E, G, U;
|
|
25553
25552
|
const R = u.map((H) => H.name), {
|
|
25554
25553
|
assignedValues: k = {},
|
|
25555
25554
|
onSuccess: D,
|
|
@@ -25557,12 +25556,12 @@ const useCreateActionProps = () => {
|
|
|
25557
25556
|
skipValidator: z,
|
|
25558
25557
|
triggerWorkflows: L
|
|
25559
25558
|
} = (N = l == null ? void 0 : l["x-action-settings"]) != null ? N : {}, $ = (O = i == null ? void 0 : i["x-component-props"]) == null ? void 0 : O.addChild, { successMessage: w } = D || {}, B = {}, j = Object.keys(k).map((H) => q(this, null, function* () {
|
|
25560
|
-
const
|
|
25561
|
-
if (isVariable(
|
|
25562
|
-
const { value: J } = (yield C == null ? void 0 : C.parseVariable(
|
|
25559
|
+
const K = k[H], Y = d(H);
|
|
25560
|
+
if (isVariable(K)) {
|
|
25561
|
+
const { value: J } = (yield C == null ? void 0 : C.parseVariable(K, b)) || {};
|
|
25563
25562
|
J && (B[H] = transformVariableValue(J, { targetCollectionField: Y }));
|
|
25564
25563
|
} else
|
|
25565
|
-
|
|
25564
|
+
K != null && K !== "" && (B[H] = K);
|
|
25566
25565
|
}));
|
|
25567
25566
|
yield Promise.all(j), z || (yield e.submit());
|
|
25568
25567
|
const T = getFormValues({
|
|
@@ -25584,9 +25583,9 @@ const useCreateActionProps = () => {
|
|
|
25584
25583
|
values: x(x(x({}, T), M), B),
|
|
25585
25584
|
filterKeys: v,
|
|
25586
25585
|
// TODO(refactor): should change to inject by plugin
|
|
25587
|
-
triggerWorkflows: L != null && L.length ? L.map((
|
|
25586
|
+
triggerWorkflows: L != null && L.length ? L.map((K) => [K.workflowKey, K.context].filter(Boolean).join("!")).join(",") : void 0
|
|
25588
25587
|
});
|
|
25589
|
-
if (c.data.loading = !1, c.data.data = H, (
|
|
25588
|
+
if (c.data.loading = !1, c.data.data = H, (U = (G = o == null ? void 0 : o.service) == null ? void 0 : G.refresh) == null || U.call(G), r == null || r(!1), a == null || a(!0), !w)
|
|
25590
25589
|
return;
|
|
25591
25590
|
message.success(h(w));
|
|
25592
25591
|
} catch (H) {
|
|
@@ -25737,10 +25736,10 @@ const useCreateActionProps = () => {
|
|
|
25737
25736
|
} = (N = i == null ? void 0 : i["x-action-settings"]) != null ? N : {}, { manualClose: z, redirecting: L, redirectTo: $, successMessage: w, actionAfterSuccess: B } = D || {};
|
|
25738
25737
|
m.data = e.data || {}, m.data.loading = !0;
|
|
25739
25738
|
const j = {}, T = Object.keys(k).map((V) => q(this, null, function* () {
|
|
25740
|
-
const E = k[V],
|
|
25739
|
+
const E = k[V], G = C(V);
|
|
25741
25740
|
if (isVariable(E)) {
|
|
25742
|
-
const { value:
|
|
25743
|
-
|
|
25741
|
+
const { value: U } = (yield g == null ? void 0 : g.parseVariable(E, b)) || {};
|
|
25742
|
+
U && (j[V] = transformVariableValue(U, { targetCollectionField: G }));
|
|
25744
25743
|
} else
|
|
25745
25744
|
E != null && E !== "" && (j[V] = E);
|
|
25746
25745
|
}));
|
|
@@ -25749,8 +25748,8 @@ const useCreateActionProps = () => {
|
|
|
25749
25748
|
content: p(M === "selected" ? "Update selected data?" : "Update all data?"),
|
|
25750
25749
|
onOk() {
|
|
25751
25750
|
return q(this, null, function* () {
|
|
25752
|
-
var
|
|
25753
|
-
const { filter: V } = (
|
|
25751
|
+
var G, U, H, K;
|
|
25752
|
+
const { filter: V } = (U = (G = o.params) == null ? void 0 : G[0]) != null ? U : {}, E = {
|
|
25754
25753
|
values: x({}, j),
|
|
25755
25754
|
filter: V,
|
|
25756
25755
|
forceUpdate: !1
|
|
@@ -25769,7 +25768,7 @@ const useCreateActionProps = () => {
|
|
|
25769
25768
|
} finally {
|
|
25770
25769
|
m.data.loading = !1;
|
|
25771
25770
|
}
|
|
25772
|
-
t instanceof TableFieldResource || (
|
|
25771
|
+
t instanceof TableFieldResource || (K = (H = n == null ? void 0 : n.service) == null ? void 0 : H.refresh) == null || K.call(H), w && (z ? h.success({
|
|
25773
25772
|
title: d(w),
|
|
25774
25773
|
onOk: () => q(this, null, function* () {
|
|
25775
25774
|
(L && !B || B === "redirect") && $ && (isURL($) ? window.location.href = $ : u($));
|
|
@@ -25792,14 +25791,14 @@ const useCreateActionProps = () => {
|
|
|
25792
25791
|
return {
|
|
25793
25792
|
onClick() {
|
|
25794
25793
|
return q(this, null, function* () {
|
|
25795
|
-
var V, E,
|
|
25794
|
+
var V, E, G, U;
|
|
25796
25795
|
const { skipValidator: I, onSuccess: R, requestSettings: k } = (V = o == null ? void 0 : o["x-action-settings"]) != null ? V : {}, { manualClose: D, redirecting: M, redirectTo: z, successMessage: L, actionAfterSuccess: $ } = R || {}, w = o == null ? void 0 : o["x-action"];
|
|
25797
25796
|
if (!k.url)
|
|
25798
25797
|
return;
|
|
25799
25798
|
I !== !0 && w === "customize:form:request" && (yield i.submit());
|
|
25800
25799
|
const B = k.headers ? JSON.parse(k.headers) : {}, j = k.params ? JSON.parse(k.params) : {}, T = k.data ? JSON.parse(k.data) : {};
|
|
25801
25800
|
if (w === "customize:form:request" && ["POST", "PUT", "PATCH"].includes(k.method)) {
|
|
25802
|
-
const H = a.map((Y) => Y.name),
|
|
25801
|
+
const H = a.map((Y) => Y.name), K = getFormValues({
|
|
25803
25802
|
filterByTk: n,
|
|
25804
25803
|
field: c,
|
|
25805
25804
|
form: i,
|
|
@@ -25808,7 +25807,7 @@ const useCreateActionProps = () => {
|
|
|
25808
25807
|
resource: u,
|
|
25809
25808
|
actionFields: (y == null ? void 0 : y("form")) || []
|
|
25810
25809
|
});
|
|
25811
|
-
Object.assign(T,
|
|
25810
|
+
Object.assign(T, K);
|
|
25812
25811
|
}
|
|
25813
25812
|
const O = {
|
|
25814
25813
|
url: renderTemplate(k.url, { currentRecord: m, currentUser: g }),
|
|
@@ -25819,7 +25818,7 @@ const useCreateActionProps = () => {
|
|
|
25819
25818
|
};
|
|
25820
25819
|
f.data = c.data || {}, f.data.loading = !0;
|
|
25821
25820
|
try {
|
|
25822
|
-
yield e.request(x({}, O)), f.data.loading = !1, u instanceof TableFieldResource || (
|
|
25821
|
+
yield e.request(x({}, O)), f.data.loading = !1, u instanceof TableFieldResource || (G = (E = d == null ? void 0 : d.service) == null ? void 0 : E.refresh) == null || G.call(E), (U = p == null ? void 0 : p.refresh) == null || U.call(p), w === "customize:form:request" && ($ === "previous" || !$ && M !== !0) && (b == null || b(!1)), L || (message.success(C("Saved successfully")), yield resetFormCorrectly(i), (M && !$ || $ === "redirect") && z && (isURL(z) ? window.location.href = z : t(z))), D ? S.success({
|
|
25823
25822
|
title: r(L),
|
|
25824
25823
|
onOk: () => q(this, null, function* () {
|
|
25825
25824
|
(M && !$ || $ === "redirect") && z && (isURL(z) ? window.location.href = z : t(z));
|
|
@@ -25843,16 +25842,16 @@ const useCreateActionProps = () => {
|
|
|
25843
25842
|
overwriteValues: D,
|
|
25844
25843
|
skipValidator: M,
|
|
25845
25844
|
triggerWorkflows: z
|
|
25846
|
-
} = (E = l == null ? void 0 : l["x-action-settings"]) != null ? E : {}, { manualClose: L, redirecting: $, redirectTo: w, successMessage: B, actionAfterSuccess: j } = k || {}, T = {}, N = Object.keys(R).map((
|
|
25847
|
-
const
|
|
25848
|
-
if (isVariable(
|
|
25849
|
-
const { value:
|
|
25850
|
-
|
|
25845
|
+
} = (E = l == null ? void 0 : l["x-action-settings"]) != null ? E : {}, { manualClose: L, redirecting: $, redirectTo: w, successMessage: B, actionAfterSuccess: j } = k || {}, T = {}, N = Object.keys(R).map((G) => q(this, null, function* () {
|
|
25846
|
+
const U = R[G], H = d(G);
|
|
25847
|
+
if (isVariable(U)) {
|
|
25848
|
+
const { value: K } = (yield b == null ? void 0 : b.parseVariable(U, S)) || {};
|
|
25849
|
+
K && (T[G] = transformVariableValue(K, { targetCollectionField: H }));
|
|
25851
25850
|
} else
|
|
25852
|
-
|
|
25851
|
+
U != null && U !== "" && (T[G] = U);
|
|
25853
25852
|
}));
|
|
25854
25853
|
yield Promise.all(N), M || (yield e.submit());
|
|
25855
|
-
const O = u.map((
|
|
25854
|
+
const O = u.map((G) => G.name), V = getFormValues({
|
|
25856
25855
|
filterByTk: t,
|
|
25857
25856
|
field: n,
|
|
25858
25857
|
form: e,
|
|
@@ -25869,7 +25868,7 @@ const useCreateActionProps = () => {
|
|
|
25869
25868
|
}, C), {
|
|
25870
25869
|
updateAssociationValues: g,
|
|
25871
25870
|
// TODO(refactor): should change to inject by plugin
|
|
25872
|
-
triggerWorkflows: z != null && z.length ? z.map((
|
|
25871
|
+
triggerWorkflows: z != null && z.length ? z.map((G) => [G.workflowKey, G.context].filter(Boolean).join("!")).join(",") : void 0
|
|
25873
25872
|
})), h.data.loading = !1, I && (I == null || I()), (j === "previous" || !j && $ !== !0) && (i == null || i(!1)), a == null || a(!1), !B)
|
|
25874
25873
|
return;
|
|
25875
25874
|
L ? f.success({
|
|
@@ -25878,7 +25877,7 @@ const useCreateActionProps = () => {
|
|
|
25878
25877
|
yield e.reset(), ($ && !j || j === "redirect") && w && (isURL(w) ? window.location.href = w : c(w));
|
|
25879
25878
|
})
|
|
25880
25879
|
}) : (message.success(m(B)), ($ && !j || j === "redirect" || j === "redirect") && w && (isURL(w) ? window.location.href = w : c(w)));
|
|
25881
|
-
} catch (
|
|
25880
|
+
} catch (G) {
|
|
25882
25881
|
h.data.loading = !1;
|
|
25883
25882
|
}
|
|
25884
25883
|
});
|
|
@@ -26100,11 +26099,11 @@ const useCreateActionProps = () => {
|
|
|
26100
26099
|
(w) => {
|
|
26101
26100
|
const { targets: B, uid: j } = findFilterTargets(t);
|
|
26102
26101
|
o().forEach((T) => {
|
|
26103
|
-
var
|
|
26102
|
+
var U, H, K;
|
|
26104
26103
|
if (!B.find((Y) => Y.uid === T.uid))
|
|
26105
26104
|
return;
|
|
26106
|
-
const O = `${j}${t.name}`, V = ((
|
|
26107
|
-
(
|
|
26105
|
+
const O = `${j}${t.name}`, V = ((U = T.service.params) == null ? void 0 : U[0]) || {};
|
|
26106
|
+
(K = (H = T.service.params) == null ? void 0 : H[1]) != null && K.filters || _.set(T.service.params, "[1].filters", {});
|
|
26108
26107
|
const E = T.service.params[1].filters;
|
|
26109
26108
|
if (w.length)
|
|
26110
26109
|
E[O] = {
|
|
@@ -26115,11 +26114,11 @@ const useCreateActionProps = () => {
|
|
|
26115
26114
|
return T.clearData();
|
|
26116
26115
|
delete E[O];
|
|
26117
26116
|
}
|
|
26118
|
-
const
|
|
26117
|
+
const G = mergeFilter([...Object.values(E), T.defaultFilter]);
|
|
26119
26118
|
return T.doFilter(
|
|
26120
26119
|
P(x({}, V), {
|
|
26121
26120
|
page: 1,
|
|
26122
|
-
filter:
|
|
26121
|
+
filter: G
|
|
26123
26122
|
}),
|
|
26124
26123
|
{ filters: E }
|
|
26125
26124
|
);
|
|
@@ -26747,7 +26746,10 @@ const UnitConversion = ({ unitConversionType: e }) => {
|
|
|
26747
26746
|
{ value: "0.01", label: "1.00" },
|
|
26748
26747
|
{ value: "0.001", label: "1.000" },
|
|
26749
26748
|
{ value: "0.0001", label: "1.0000" },
|
|
26750
|
-
{ value: "0.00001", label: "1.00000" }
|
|
26749
|
+
{ value: "0.00001", label: "1.00000" },
|
|
26750
|
+
{ value: "0.000001", label: "1.000000" },
|
|
26751
|
+
{ value: "0.0000001", label: "1.0000000" },
|
|
26752
|
+
{ value: "0.00000001", label: "1.00000000" }
|
|
26751
26753
|
]
|
|
26752
26754
|
},
|
|
26753
26755
|
addonBefore: {
|
|
@@ -26878,7 +26880,7 @@ const UnitConversion = ({ unitConversionType: e }) => {
|
|
|
26878
26880
|
/* @__PURE__ */ jsx(DragHandler, {})
|
|
26879
26881
|
] });
|
|
26880
26882
|
}, BlockItemCard = React.forwardRef((o, n) => {
|
|
26881
|
-
var r = o, { children: e } = r, t =
|
|
26883
|
+
var r = o, { children: e } = r, t = W(r, ["children"]);
|
|
26882
26884
|
const { token: i } = useToken$1(), a = useMemo(() => ({ marginBottom: i.marginBlock }), [i.marginBlock]);
|
|
26883
26885
|
return /* @__PURE__ */ jsx(Card, P(x({ ref: n, bordered: !1, style: a }, t), { children: e }));
|
|
26884
26886
|
});
|
|
@@ -27637,7 +27639,7 @@ const jsonCss = css`
|
|
|
27637
27639
|
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
27638
27640
|
`, Json = React.forwardRef(
|
|
27639
27641
|
(a, i) => {
|
|
27640
|
-
var l = a, { value: e, onChange: t, space: n = 2, json5: o = !1 } = l, r =
|
|
27642
|
+
var l = a, { value: e, onChange: t, space: n = 2, json5: o = !1 } = l, r = W(l, ["value", "onChange", "space", "json5"]);
|
|
27641
27643
|
const c = o ? JSON5 : JSON, u = useField(), [d, p] = useState("");
|
|
27642
27644
|
return useEffect(() => {
|
|
27643
27645
|
try {
|
|
@@ -28861,7 +28863,7 @@ const ConstantTypes = {
|
|
|
28861
28863
|
label: '{{t("String")}}',
|
|
28862
28864
|
value: "string",
|
|
28863
28865
|
component: function e(r) {
|
|
28864
|
-
var i = r, { onChange: t, value: n } = i, o =
|
|
28866
|
+
var i = r, { onChange: t, value: n } = i, o = W(i, ["onChange", "value"]);
|
|
28865
28867
|
return /* @__PURE__ */ jsx(Input$3, x({ value: n, onChange: (a) => t(a.target.value) }, o));
|
|
28866
28868
|
},
|
|
28867
28869
|
default() {
|
|
@@ -28872,7 +28874,7 @@ const ConstantTypes = {
|
|
|
28872
28874
|
label: '{{t("Number")}}',
|
|
28873
28875
|
value: "number",
|
|
28874
28876
|
component: function e(r) {
|
|
28875
|
-
var i = r, { onChange: t, value: n } = i, o =
|
|
28877
|
+
var i = r, { onChange: t, value: n } = i, o = W(i, ["onChange", "value"]);
|
|
28876
28878
|
return /* @__PURE__ */ jsx(InputNumber$1, x({ value: n, onChange: t }, o));
|
|
28877
28879
|
},
|
|
28878
28880
|
default() {
|
|
@@ -28883,7 +28885,7 @@ const ConstantTypes = {
|
|
|
28883
28885
|
label: '{{t("Boolean")}}',
|
|
28884
28886
|
value: "boolean",
|
|
28885
28887
|
component: function e(r) {
|
|
28886
|
-
var i = r, { onChange: t, value: n } = i, o =
|
|
28888
|
+
var i = r, { onChange: t, value: n } = i, o = W(i, ["onChange", "value"]);
|
|
28887
28889
|
const { t: a } = useTranslation();
|
|
28888
28890
|
return /* @__PURE__ */ jsx(
|
|
28889
28891
|
Select$1,
|
|
@@ -28908,7 +28910,7 @@ const ConstantTypes = {
|
|
|
28908
28910
|
label: '{{t("Date")}}',
|
|
28909
28911
|
value: "date",
|
|
28910
28912
|
component: function e(r) {
|
|
28911
|
-
var i = r, { onChange: t, value: n } = i, o =
|
|
28913
|
+
var i = r, { onChange: t, value: n } = i, o = W(i, ["onChange", "value"]);
|
|
28912
28914
|
return /* @__PURE__ */ jsx(
|
|
28913
28915
|
DatePicker$1,
|
|
28914
28916
|
x({
|
|
@@ -28965,7 +28967,7 @@ function getTypedConstantOption(e, t, n) {
|
|
|
28965
28967
|
};
|
|
28966
28968
|
}
|
|
28967
28969
|
function Input$1(e) {
|
|
28968
|
-
var H,
|
|
28970
|
+
var H, K, Y;
|
|
28969
28971
|
const {
|
|
28970
28972
|
value: t = "",
|
|
28971
28973
|
onChange: n,
|
|
@@ -28995,10 +28997,10 @@ function Input$1(e) {
|
|
|
28995
28997
|
label: y("Constant"),
|
|
28996
28998
|
[B.value]: "$",
|
|
28997
28999
|
[B.label]: y("Constant")
|
|
28998
|
-
} : i ? getTypedConstantOption($, i, B) : null, [$, i]), T = (H = j == null ? void 0 : j.component) != null ? H : NullComponent, N = Array.isArray(i) ? (Y = (
|
|
29000
|
+
} : i ? getTypedConstantOption($, i, B) : null, [$, i]), T = (H = j == null ? void 0 : j.component) != null ? H : NullComponent, N = Array.isArray(i) ? (Y = (K = i.find((J) => Array.isArray(J) && J[0] === $)) == null ? void 0 : K[1]) != null ? Y : {} : {};
|
|
28999
29001
|
let O;
|
|
29000
29002
|
t == null ? a ? o && D ? O = ["$"] : O = [""] : o ? O = ["$"] : O = [" ", $] : O = o ? ["$"] : [" ", $], m && (O = ["$"]), useEffect(() => {
|
|
29001
|
-
const Z = j != null ? j : {}, { component: J } = Z, X =
|
|
29003
|
+
const Z = j != null ? j : {}, { component: J } = Z, X = W(Z, ["component"]), Q = [
|
|
29002
29004
|
...a ? [
|
|
29003
29005
|
{
|
|
29004
29006
|
value: "",
|
|
@@ -29045,7 +29047,7 @@ function Input$1(e) {
|
|
|
29045
29047
|
n(`{{${J.join(".")}}}`, X);
|
|
29046
29048
|
},
|
|
29047
29049
|
[$, w, n]
|
|
29048
|
-
),
|
|
29050
|
+
), G = useCallback(() => {
|
|
29049
29051
|
var J;
|
|
29050
29052
|
if (M(!!o), (J = j == null ? void 0 : j.children) != null && J.length) {
|
|
29051
29053
|
const X = j.children[0].default();
|
|
@@ -29073,7 +29075,7 @@ function Input$1(e) {
|
|
|
29073
29075
|
I([...F]), k([...Q]);
|
|
29074
29076
|
});
|
|
29075
29077
|
}, [w, F.length]);
|
|
29076
|
-
const
|
|
29078
|
+
const U = e.disabled || v.disabled;
|
|
29077
29079
|
return g(
|
|
29078
29080
|
/* @__PURE__ */ jsxs(Space$1.Compact, { style: l, className: cls(C, f, c), children: [
|
|
29079
29081
|
w ? /* @__PURE__ */ jsxs(
|
|
@@ -29094,7 +29096,7 @@ function Input$1(e) {
|
|
|
29094
29096
|
.ant-input {
|
|
29095
29097
|
overflow: auto;
|
|
29096
29098
|
white-space: nowrap;
|
|
29097
|
-
${
|
|
29099
|
+
${U ? "" : "padding-right: 28px;"}
|
|
29098
29100
|
|
|
29099
29101
|
.ant-tag {
|
|
29100
29102
|
display: inline;
|
|
@@ -29113,21 +29115,21 @@ function Input$1(e) {
|
|
|
29113
29115
|
role: "button",
|
|
29114
29116
|
"aria-label": "variable-tag",
|
|
29115
29117
|
style: { overflow: "hidden" },
|
|
29116
|
-
className: cx("ant-input", { "ant-input-disabled":
|
|
29118
|
+
className: cx("ant-input", { "ant-input-disabled": U }, f),
|
|
29117
29119
|
children: /* @__PURE__ */ jsx(Tag, { color: "blue", children: R.map((J, X) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
29118
29120
|
X ? " / " : "",
|
|
29119
29121
|
J
|
|
29120
29122
|
] }, J)) })
|
|
29121
29123
|
}
|
|
29122
29124
|
),
|
|
29123
|
-
|
|
29125
|
+
U ? null : /* @__PURE__ */ jsx(
|
|
29124
29126
|
"span",
|
|
29125
29127
|
{
|
|
29126
29128
|
role: "button",
|
|
29127
29129
|
"aria-label": "icon-close",
|
|
29128
29130
|
className: cx("clear-button"),
|
|
29129
29131
|
unselectable: "on",
|
|
29130
|
-
onClick:
|
|
29132
|
+
onClick: G,
|
|
29131
29133
|
children: /* @__PURE__ */ jsx(CloseCircleFilled, {})
|
|
29132
29134
|
}
|
|
29133
29135
|
)
|
|
@@ -29152,7 +29154,7 @@ function Input$1(e) {
|
|
|
29152
29154
|
loadData: V,
|
|
29153
29155
|
changeOnSelect: u,
|
|
29154
29156
|
fieldNames: d,
|
|
29155
|
-
disabled:
|
|
29157
|
+
disabled: U,
|
|
29156
29158
|
children: r != null ? r : /* @__PURE__ */ jsx(
|
|
29157
29159
|
XButton,
|
|
29158
29160
|
{
|
|
@@ -29160,7 +29162,7 @@ function Input$1(e) {
|
|
|
29160
29162
|
margin-left: -1px;
|
|
29161
29163
|
`),
|
|
29162
29164
|
type: w ? "primary" : "default",
|
|
29163
|
-
disabled:
|
|
29165
|
+
disabled: U
|
|
29164
29166
|
}
|
|
29165
29167
|
)
|
|
29166
29168
|
}
|
|
@@ -29263,7 +29265,7 @@ function setNativeInputValue(e, t) {
|
|
|
29263
29265
|
);
|
|
29264
29266
|
}
|
|
29265
29267
|
function RawTextArea(e) {
|
|
29266
|
-
const t = useRef(null), m = e, { changeOnSelect: n, component: o = Input$3.TextArea, fieldNames: r, scope: i, buttonClass: a } = m, l =
|
|
29268
|
+
const t = useRef(null), m = e, { changeOnSelect: n, component: o = Input$3.TextArea, fieldNames: r, scope: i, buttonClass: a } = m, l = W(m, ["changeOnSelect", "component", "fieldNames", "scope", "buttonClass"]), c = typeof i == "function" ? i() : i, [u, d] = useState(c || []);
|
|
29267
29269
|
function p(h) {
|
|
29268
29270
|
if (!t.current)
|
|
29269
29271
|
return;
|
|
@@ -29444,22 +29446,22 @@ function TextArea(e) {
|
|
|
29444
29446
|
const E = (V = window.getSelection) == null ? void 0 : V.call(window);
|
|
29445
29447
|
if (E)
|
|
29446
29448
|
try {
|
|
29447
|
-
const
|
|
29448
|
-
|
|
29449
|
-
} catch (
|
|
29449
|
+
const G = Array.from(N.childNodes);
|
|
29450
|
+
G.length && (R[0] === -1 ? R[1] && O.setStartAfter(G[R[1] - 1]) : O.setStart(G[R[0]], R[1]), R[2] === -1 ? R[3] && O.setEndAfter(G[R[3] - 1]) : O.setEnd(G[R[2]], R[3])), O.collapse(!0), E.removeAllRanges(), E.addRange(O);
|
|
29451
|
+
} catch (G) {
|
|
29450
29452
|
}
|
|
29451
29453
|
} else {
|
|
29452
29454
|
const { lastChild: E } = N;
|
|
29453
29455
|
if (E) {
|
|
29454
29456
|
O.setStartAfter(E), O.setEndAfter(E);
|
|
29455
|
-
const
|
|
29456
|
-
k([
|
|
29457
|
+
const G = Array.from(N.childNodes), U = O.startContainer === N ? -1 : G.indexOf(E), H = O.startContainer === N ? -1 : G.indexOf(E);
|
|
29458
|
+
k([U, O.startOffset, H, O.endOffset]);
|
|
29457
29459
|
}
|
|
29458
29460
|
}
|
|
29459
29461
|
}, [F]);
|
|
29460
29462
|
const M = useCallback(
|
|
29461
29463
|
function(N) {
|
|
29462
|
-
const O = N.filter((
|
|
29464
|
+
const O = N.filter((G) => !!G.trim()), { current: V } = m;
|
|
29463
29465
|
if (!V || !O)
|
|
29464
29466
|
return;
|
|
29465
29467
|
V.focus();
|
|
@@ -29497,10 +29499,10 @@ function TextArea(e) {
|
|
|
29497
29499
|
span: ["ant-tag", "ant-tag-*"]
|
|
29498
29500
|
},
|
|
29499
29501
|
transformTags: {
|
|
29500
|
-
span(E,
|
|
29501
|
-
return
|
|
29502
|
+
span(E, G) {
|
|
29503
|
+
return G["data-variable"] ? {
|
|
29502
29504
|
tagName: E,
|
|
29503
|
-
attribs:
|
|
29505
|
+
attribs: G
|
|
29504
29506
|
} : {};
|
|
29505
29507
|
}
|
|
29506
29508
|
}
|
|
@@ -33144,11 +33146,11 @@ const tableBlockSettings = new SchemaSettings({
|
|
|
33144
33146
|
name: "fieldSettings:component:CascadeSelect",
|
|
33145
33147
|
items: [fieldComponent$7, titleField$2, ellipsisSettingsItem]
|
|
33146
33148
|
}), SchemaSettingsDateRange = function e(t) {
|
|
33147
|
-
var R, k, D, M, z, L, $, w, B, j, T, N, O, V, E,
|
|
33149
|
+
var R, k, D, M, z, L, $, w, B, j, T, N, O, V, E, G;
|
|
33148
33150
|
const { fieldSchema: n } = t, o = useField(), { dn: r } = useDesignable(), { t: i } = useTranslation(), { getCollectionJoinField: a } = useCollectionManager_deprecated(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, u = a(n == null ? void 0 : n["x-collection-field"]) || {}, d = ((R = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : R.showTime) || ((D = (k = u == null ? void 0 : u.uiSchema) == null ? void 0 : k["x-component-props"]) == null ? void 0 : D.showTime) || !1, p = ((M = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : M.dateFormat) || ((L = (z = u == null ? void 0 : u.uiSchema) == null ? void 0 : z["x-component-props"]) == null ? void 0 : L.dateFormat) || "YYYY-MM-DD", m = (($ = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : $.timeFormat) || ((B = (w = u == null ? void 0 : u.uiSchema) == null ? void 0 : w["x-component-props"]) == null ? void 0 : B.timeFormat) || "HH:mm:ss", h = ((j = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : j.picker) || ((N = (T = u == null ? void 0 : u.uiSchema) == null ? void 0 : T["x-component-props"]) == null ? void 0 : N.picker) || "date";
|
|
33149
33151
|
n["x-read-pretty"] || o.readOnly || o.readPretty;
|
|
33150
|
-
const g = (O = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : O._minDate, f = (V = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : V._maxDate, C = ((E = u == null ? void 0 : u.uiSchema) == null ? void 0 : E["x-component-props"].gmt) || !1, b = ((
|
|
33151
|
-
(
|
|
33152
|
+
const g = (O = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : O._minDate, f = (V = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : V._maxDate, C = ((E = u == null ? void 0 : u.uiSchema) == null ? void 0 : E["x-component-props"].gmt) || !1, b = ((G = u == null ? void 0 : u.uiSchema) == null ? void 0 : G["x-component-props"].utc) || !1, S = useRecord(), { form: y } = useFormBlockContext(), v = useCallback(
|
|
33153
|
+
(U) => /* @__PURE__ */ jsx(
|
|
33152
33154
|
SchemaComponent,
|
|
33153
33155
|
{
|
|
33154
33156
|
schema: {
|
|
@@ -33174,9 +33176,9 @@ const tableBlockSettings = new SchemaSettings({
|
|
|
33174
33176
|
),
|
|
33175
33177
|
[p, C, h, d, m, b]
|
|
33176
33178
|
), F = useCallback(
|
|
33177
|
-
(
|
|
33179
|
+
(U) => /* @__PURE__ */ jsx(
|
|
33178
33180
|
VariableInput,
|
|
33179
|
-
P(x({},
|
|
33181
|
+
P(x({}, U), {
|
|
33180
33182
|
form: y,
|
|
33181
33183
|
record: S,
|
|
33182
33184
|
noDisabled: !0,
|
|
@@ -33185,12 +33187,12 @@ const tableBlockSettings = new SchemaSettings({
|
|
|
33185
33187
|
),
|
|
33186
33188
|
[n, y, S, v]
|
|
33187
33189
|
);
|
|
33188
|
-
function I(
|
|
33189
|
-
if (
|
|
33190
|
-
if (typeof
|
|
33191
|
-
return
|
|
33192
|
-
if (typeof
|
|
33193
|
-
return I(
|
|
33190
|
+
function I(U) {
|
|
33191
|
+
if (U != null) {
|
|
33192
|
+
if (typeof U == "string")
|
|
33193
|
+
return U;
|
|
33194
|
+
if (typeof U == "object" && Object.prototype.hasOwnProperty.call(U, "value"))
|
|
33195
|
+
return I(U.value);
|
|
33194
33196
|
}
|
|
33195
33197
|
}
|
|
33196
33198
|
return /* @__PURE__ */ jsx(
|
|
@@ -33224,27 +33226,27 @@ const tableBlockSettings = new SchemaSettings({
|
|
|
33224
33226
|
}
|
|
33225
33227
|
}
|
|
33226
33228
|
},
|
|
33227
|
-
onSubmit: (
|
|
33229
|
+
onSubmit: (U) => {
|
|
33228
33230
|
const H = {
|
|
33229
33231
|
"x-uid": n["x-uid"]
|
|
33230
33232
|
};
|
|
33231
33233
|
H["x-component-props"] = o.componentProps || {}, n["x-component-props"] = P(x({}, o.componentProps || {}), {
|
|
33232
|
-
_maxDate: I(
|
|
33233
|
-
_minDate: I(
|
|
33234
|
+
_maxDate: I(U == null ? void 0 : U._maxDate),
|
|
33235
|
+
_minDate: I(U == null ? void 0 : U._minDate)
|
|
33234
33236
|
}), H["x-component-props"] = n["x-component-props"], o.componentProps = n["x-component-props"];
|
|
33235
|
-
const
|
|
33236
|
-
|
|
33237
|
-
const Y =
|
|
33237
|
+
const K = o.path.entire.split(".");
|
|
33238
|
+
K.pop();
|
|
33239
|
+
const Y = K.join(".");
|
|
33238
33240
|
o.query(`${Y}.*[0:].${n.name}`).forEach((J) => {
|
|
33239
33241
|
J.props.name === n.name && J.setComponentProps({
|
|
33240
|
-
_maxDate: I(
|
|
33241
|
-
_minDate: I(
|
|
33242
|
+
_maxDate: I(U == null ? void 0 : U._maxDate),
|
|
33243
|
+
_minDate: I(U == null ? void 0 : U._minDate)
|
|
33242
33244
|
});
|
|
33243
33245
|
}), r.emit("patch", {
|
|
33244
33246
|
schema: H
|
|
33245
33247
|
}), r.refresh();
|
|
33246
33248
|
},
|
|
33247
|
-
ModalContextProvider: (
|
|
33249
|
+
ModalContextProvider: (U) => /* @__PURE__ */ jsx(FlagProvider, { isInSubForm: l, isInSubTable: c, isInFormDataTemplate: !0, children: U.children })
|
|
33248
33250
|
}
|
|
33249
33251
|
);
|
|
33250
33252
|
}, datePickerComponentFieldSettings = new SchemaSettings({
|
|
@@ -34738,6 +34740,12 @@ const useBuiltInVariables = () => {
|
|
|
34738
34740
|
defaultValue: a
|
|
34739
34741
|
}
|
|
34740
34742
|
], [t, e, o, a, r, i]) };
|
|
34743
|
+
}, cache = /* @__PURE__ */ new Map(), cacheLazyLoadedValues = (e, t, n) => {
|
|
34744
|
+
const o = cache.get(e);
|
|
34745
|
+
o ? o[t] = n : cache.set(e, { [t]: n });
|
|
34746
|
+
}, getCachedLazyLoadedValues = (e, t) => {
|
|
34747
|
+
const n = cache.get(e);
|
|
34748
|
+
return n == null ? void 0 : n[t];
|
|
34741
34749
|
}, filterEmptyValues = (e) => Array.isArray(e) ? e.filter((t) => t === 0 || t === !1 || t) : e, TYPE_TO_ACTION = {
|
|
34742
34750
|
hasMany: "list?pageSize=9999",
|
|
34743
34751
|
belongsTo: "get",
|
|
@@ -34777,44 +34785,52 @@ const variablesStore = {}, getFieldPath = (e, t) => {
|
|
|
34777
34785
|
dataSource: k,
|
|
34778
34786
|
collectionName: L
|
|
34779
34787
|
};
|
|
34780
|
-
const T = y[j],
|
|
34788
|
+
const T = y[j], N = y.slice(0, j + 1).join("."), { fieldPath: O } = getFieldPath(N, F), V = r(O, k), E = (B = i(M, k)) == null ? void 0 : B.getPrimaryKey();
|
|
34781
34789
|
if (Array.isArray(I)) {
|
|
34782
|
-
const
|
|
34783
|
-
if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[T]) && (U == null ? void 0 : U[
|
|
34784
|
-
const
|
|
34785
|
-
if (hasRequested(
|
|
34786
|
-
return getRequested(
|
|
34787
|
-
const
|
|
34790
|
+
const G = I.map((U) => {
|
|
34791
|
+
if (!(S != null && S.doNotRequest) && shouldToRequest(U == null ? void 0 : U[T], U, N) && (U == null ? void 0 : U[E]) != null && V != null && V.target) {
|
|
34792
|
+
const H = `/${M}/${U[V.sourceKey || E]}/${T}:${getAction(V.type)}`;
|
|
34793
|
+
if (hasRequested(H))
|
|
34794
|
+
return getRequested(H);
|
|
34795
|
+
const K = o.request({
|
|
34788
34796
|
headers: getDataSourceHeaders(k),
|
|
34789
|
-
url:
|
|
34797
|
+
url: H,
|
|
34790
34798
|
params: {
|
|
34791
34799
|
appends: S == null ? void 0 : S.appends
|
|
34792
34800
|
}
|
|
34793
|
-
}).then((
|
|
34794
|
-
|
|
34801
|
+
}).then((Y) => {
|
|
34802
|
+
clearRequested(H);
|
|
34803
|
+
const J = Y.data.data;
|
|
34804
|
+
return cacheLazyLoadedValues(U, N, J), J;
|
|
34805
|
+
});
|
|
34806
|
+
return stashRequested(H, K), K;
|
|
34795
34807
|
}
|
|
34796
|
-
return U == null ? void 0 : U[T];
|
|
34808
|
+
return getCachedLazyLoadedValues(U, N) || (U == null ? void 0 : U[T]);
|
|
34797
34809
|
});
|
|
34798
|
-
I = removeThroughCollectionFields(_.flatten(yield Promise.all(
|
|
34799
|
-
} else if (!(S != null && S.doNotRequest) && shouldToRequest(I[T]) && I[
|
|
34800
|
-
const
|
|
34810
|
+
I = removeThroughCollectionFields(_.flatten(yield Promise.all(G)), V);
|
|
34811
|
+
} else if (!(S != null && S.doNotRequest) && shouldToRequest(I[T], I, N) && I[E] != null && (V != null && V.target)) {
|
|
34812
|
+
const G = `/${M}/${I[V.sourceKey || E]}/${T}:${getAction(V.type)}`;
|
|
34801
34813
|
let U = null;
|
|
34802
|
-
if (hasRequested(
|
|
34803
|
-
U = yield getRequested(
|
|
34814
|
+
if (hasRequested(G))
|
|
34815
|
+
U = yield getRequested(G);
|
|
34804
34816
|
else {
|
|
34805
|
-
const
|
|
34817
|
+
const K = o.request({
|
|
34806
34818
|
headers: getDataSourceHeaders(k),
|
|
34807
|
-
url:
|
|
34819
|
+
url: G,
|
|
34808
34820
|
params: {
|
|
34809
34821
|
appends: S == null ? void 0 : S.appends
|
|
34810
34822
|
}
|
|
34811
34823
|
});
|
|
34812
|
-
stashRequested(
|
|
34824
|
+
stashRequested(G, K), U = yield K, clearRequested(G);
|
|
34813
34825
|
}
|
|
34814
|
-
|
|
34826
|
+
const H = U.data.data;
|
|
34827
|
+
getCachedLazyLoadedValues(I, N) || cacheLazyLoadedValues(I, N, H), I = removeThroughCollectionFields(H, V);
|
|
34815
34828
|
} else
|
|
34816
|
-
I = removeThroughCollectionFields(
|
|
34817
|
-
|
|
34829
|
+
I = removeThroughCollectionFields(
|
|
34830
|
+
getCachedLazyLoadedValues(I, N) || getValuesByPath(I, T),
|
|
34831
|
+
V
|
|
34832
|
+
);
|
|
34833
|
+
V != null && V.target && (M = V.target);
|
|
34818
34834
|
}
|
|
34819
34835
|
const $ = a(
|
|
34820
34836
|
_.isFunction(I) ? I({ fieldOperator: S == null ? void 0 : S.fieldOperator, isParsingVariable: !0 }) : I
|
|
@@ -34847,9 +34863,9 @@ const variablesStore = {}, getFieldPath = (e, t) => {
|
|
|
34847
34863
|
[c]
|
|
34848
34864
|
), h = useCallback(
|
|
34849
34865
|
/**
|
|
34850
|
-
*
|
|
34851
|
-
* @param str
|
|
34852
|
-
* @param localVariables
|
|
34866
|
+
* Parse the variable string to the actual value
|
|
34867
|
+
* @param str Variable string
|
|
34868
|
+
* @param localVariables Local variables, will be cleared after parsing
|
|
34853
34869
|
* @returns
|
|
34854
34870
|
*/
|
|
34855
34871
|
(C, b, S) => q(void 0, null, function* () {
|
|
@@ -34903,15 +34919,15 @@ const variablesStore = {}, getFieldPath = (e, t) => {
|
|
|
34903
34919
|
};
|
|
34904
34920
|
VariablesProvider.displayName = "VariablesProvider";
|
|
34905
34921
|
const VariablesProvider$1 = VariablesProvider;
|
|
34906
|
-
function shouldToRequest(e) {
|
|
34907
|
-
let
|
|
34908
|
-
return untracked(() => {
|
|
34922
|
+
function shouldToRequest(e, t, n) {
|
|
34923
|
+
let o = !1;
|
|
34924
|
+
return getCachedLazyLoadedValues(t, n) ? !1 : (untracked(() => {
|
|
34909
34925
|
if (JSON.stringify(e) === "[{}]" || JSON.stringify(e) === "{}") {
|
|
34910
|
-
|
|
34926
|
+
o = !0;
|
|
34911
34927
|
return;
|
|
34912
34928
|
}
|
|
34913
|
-
|
|
34914
|
-
}),
|
|
34929
|
+
o = _.isEmpty(e);
|
|
34930
|
+
}), o);
|
|
34915
34931
|
}
|
|
34916
34932
|
function mergeCtxWithLocalVariables(e, t) {
|
|
34917
34933
|
return e = x({}, e), t == null || t.forEach((n) => {
|
|
@@ -35177,7 +35193,7 @@ function addAppVersion(e, t) {
|
|
|
35177
35193
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
35178
35194
|
}), e;
|
|
35179
35195
|
}
|
|
35180
|
-
const name = "@nocobase/client", version = "1.5.
|
|
35196
|
+
const name = "@nocobase/client", version = "1.5.7", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
35181
35197
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
35182
35198
|
"@ant-design/cssinjs": "^1.11.1",
|
|
35183
35199
|
"@ant-design/icons": "^5.1.4",
|
|
@@ -35199,9 +35215,9 @@ const name = "@nocobase/client", version = "1.5.6", license = "AGPL-3.0", main =
|
|
|
35199
35215
|
"@formily/reactive-react": "^2.2.27",
|
|
35200
35216
|
"@formily/shared": "^2.2.27",
|
|
35201
35217
|
"@formily/validator": "^2.2.27",
|
|
35202
|
-
"@nocobase/evaluators": "1.5.
|
|
35203
|
-
"@nocobase/sdk": "1.5.
|
|
35204
|
-
"@nocobase/utils": "1.5.
|
|
35218
|
+
"@nocobase/evaluators": "1.5.7",
|
|
35219
|
+
"@nocobase/sdk": "1.5.7",
|
|
35220
|
+
"@nocobase/utils": "1.5.7",
|
|
35205
35221
|
ahooks: "^3.7.2",
|
|
35206
35222
|
antd: "5.12.8",
|
|
35207
35223
|
"antd-style": "3.7.1",
|
|
@@ -36054,7 +36070,7 @@ const SortableProvider = (e) => {
|
|
|
36054
36070
|
return /* @__PURE__ */ jsx(SortableContext.Provider, { value: a, children: o });
|
|
36055
36071
|
}, getComputedColor = (e) => new TinyColor(e).setAlpha(0.15).toHex8String(), Sortable = (e) => {
|
|
36056
36072
|
var g, f;
|
|
36057
|
-
const h = e, { component: t, overStyle: n, style: o, children: r, openMode: i } = h, a =
|
|
36073
|
+
const h = e, { component: t, overStyle: n, style: o, children: r, openMode: i } = h, a = W(h, ["component", "overStyle", "style", "children", "openMode"]), { token: l } = useToken(), { draggable: c, droppable: u } = useContext(SortableContext), { isOver: d, setNodeRef: p } = u, m = x({}, o);
|
|
36058
36074
|
return d && ((g = c == null ? void 0 : c.active) == null ? void 0 : g.id) !== ((f = u == null ? void 0 : u.over) == null ? void 0 : f.id) && (m[t === "a" ? "color" : "background"] = getComputedColor(l.colorSettings), Object.assign(m, n)), React.createElement(
|
|
36059
36075
|
t || "div",
|
|
36060
36076
|
P(x({
|
|
@@ -36075,7 +36091,7 @@ const SortableProvider = (e) => {
|
|
|
36075
36091
|
return e.id ? e.id : (n = t.address) == null ? void 0 : n.toString();
|
|
36076
36092
|
}, InternalSortableItem = observer$1(
|
|
36077
36093
|
(e) => {
|
|
36078
|
-
const l = useSortableItemProps(e), { schema: t, id: n, eid: o, removeParentsIfNoChildren: r } = l, i =
|
|
36094
|
+
const l = useSortableItemProps(e), { schema: t, id: n, eid: o, removeParentsIfNoChildren: r } = l, i = W(l, ["schema", "id", "eid", "removeParentsIfNoChildren"]), a = useMemo(() => ({
|
|
36079
36095
|
insertAdjacent: "afterEnd",
|
|
36080
36096
|
schema: t,
|
|
36081
36097
|
removeParentsIfNoChildren: r != null ? r : !0
|
|
@@ -36084,7 +36100,7 @@ const SortableProvider = (e) => {
|
|
|
36084
36100
|
},
|
|
36085
36101
|
{ displayName: "InternalSortableItem" }
|
|
36086
36102
|
), SortableItem = React.memo((e) => {
|
|
36087
|
-
const r = e, { component: t } = r, n =
|
|
36103
|
+
const r = e, { component: t } = r, n = W(r, ["component"]), { designable: o } = useDesignable();
|
|
36088
36104
|
return o ? /* @__PURE__ */ jsx(InternalSortableItem, x({}, e)) : React.createElement(
|
|
36089
36105
|
t || "div",
|
|
36090
36106
|
_.omit(n, ["children", "schema", "overStyle", "openMode", "id", "eid", "removeParentsIfNoChildren"]),
|
|
@@ -36155,10 +36171,10 @@ const DragHandler = (e) => {
|
|
|
36155
36171
|
}
|
|
36156
36172
|
});
|
|
36157
36173
|
}, FormComponent$1 = (e) => {
|
|
36158
|
-
const l = e, { form: t, children: n } = l, o =
|
|
36174
|
+
const l = e, { form: t, children: n } = l, o = W(l, ["form", "children"]), r = useField(), i = useFieldSchema(), a = useAttach(t.createVoidField(P(x({}, r.props), { basePath: "" })));
|
|
36159
36175
|
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: a.address, schema: i, onlyRenderProperties: !0 }) })) }) });
|
|
36160
36176
|
}, Def$1 = (e) => e.children, FormDecorator$1 = (e) => {
|
|
36161
|
-
const u = e, { form: t, children: n, disabled: o } = u, r =
|
|
36177
|
+
const u = e, { form: t, children: n, disabled: o } = u, r = W(u, ["form", "children", "disabled"]), i = useField(), a = useFieldSchema(), l = useAttach(t.createVoidField(P(x({}, i.props), { basePath: "" }))), c = useComponent(a["x-component"], Def$1);
|
|
36162
36178
|
return useEffect(() => {
|
|
36163
36179
|
t.disabled = o || i.disabled;
|
|
36164
36180
|
}, [o, i.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({}, i.componentProps), { children: /* @__PURE__ */ jsx(NocoBaseRecursionField, { basePath: l.address, schema: a, onlyRenderProperties: !0 }) })) }) })) }) }) });
|
|
@@ -36171,7 +36187,7 @@ const DragHandler = (e) => {
|
|
|
36171
36187
|
FormBlockContext.displayName = "FormBlockContext";
|
|
36172
36188
|
const Form$1 = observer$1(
|
|
36173
36189
|
(e) => {
|
|
36174
|
-
const p = e, { request: t, effects: n, initialValue: o, useValues: r = useDefaultValues } = p, i =
|
|
36190
|
+
const p = e, { request: t, effects: n, initialValue: o, useValues: r = useDefaultValues } = p, i = W(p, ["request", "effects", "initialValue", "useValues"]), a = useFieldSchema(), l = useField(), c = useMemo(() => createForm({ effects: n }), []), u = r(
|
|
36175
36191
|
{
|
|
36176
36192
|
uid: a["x-uid"],
|
|
36177
36193
|
onSuccess(h) {
|
|
@@ -36326,7 +36342,7 @@ const ReadPrettyInternal = observer$1(
|
|
|
36326
36342
|
},
|
|
36327
36343
|
{ displayName: "SelectReadPretty" }
|
|
36328
36344
|
), ReadPretty$b = withPopupWrapper(ReadPrettyInternal), isEmptyObject = (e) => !isValid(e) || typeof e == "object" && Object.keys(e).length === 0, ObjectSelect = (e) => {
|
|
36329
|
-
const p = e, { value: t, options: n, onChange: o, fieldNames: r, mode: i, loading: a, rawOptions: l, defaultValue: c } = p, u =
|
|
36345
|
+
const p = e, { value: t, options: n, onChange: o, fieldNames: r, mode: i, loading: a, rawOptions: l, defaultValue: c } = p, u = W(p, ["value", "options", "onChange", "fieldNames", "mode", "loading", "rawOptions", "defaultValue"]), d = (m) => {
|
|
36330
36346
|
var f;
|
|
36331
36347
|
if (isEmptyObject(m))
|
|
36332
36348
|
return;
|
|
@@ -36390,7 +36406,7 @@ const ReadPrettyInternal = observer$1(
|
|
|
36390
36406
|
return ((n = t == null ? void 0 : t.label) != null ? n : "").toLowerCase().includes((e || "").toLowerCase());
|
|
36391
36407
|
}, InternalSelect = connect(
|
|
36392
36408
|
(e) => {
|
|
36393
|
-
const d = e, { objectValue: t, loading: n, value: o, rawOptions: r, defaultValue: i } = d, a =
|
|
36409
|
+
const d = e, { objectValue: t, loading: n, value: o, rawOptions: r, defaultValue: i } = d, a = W(d, ["objectValue", "loading", "value", "rawOptions", "defaultValue"]), l = useCompile();
|
|
36394
36410
|
let c = e.multiple ? "multiple" : e.mode;
|
|
36395
36411
|
if (c && !["multiple", "tags"].includes(c) && (c = void 0), t)
|
|
36396
36412
|
return /* @__PURE__ */ jsx(
|
|
@@ -36484,7 +36500,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
36484
36500
|
connect(
|
|
36485
36501
|
(e) => {
|
|
36486
36502
|
var Y, J;
|
|
36487
|
-
const
|
|
36503
|
+
const K = e, {
|
|
36488
36504
|
fieldNames: t = {},
|
|
36489
36505
|
service: n = {},
|
|
36490
36506
|
wait: o = 300,
|
|
@@ -36499,7 +36515,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
36499
36515
|
dataSource: m,
|
|
36500
36516
|
toOptionsItem: h = (X) => X,
|
|
36501
36517
|
popupMatchSelectWidth: g = !1
|
|
36502
|
-
} =
|
|
36518
|
+
} = K, f = W(K, [
|
|
36503
36519
|
"fieldNames",
|
|
36504
36520
|
"service",
|
|
36505
36521
|
"wait",
|
|
@@ -36583,7 +36599,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
36583
36599
|
useEffect(() => {
|
|
36584
36600
|
v.current && N();
|
|
36585
36601
|
}, [V]);
|
|
36586
|
-
const
|
|
36602
|
+
const G = (X) => q(void 0, null, function* () {
|
|
36587
36603
|
var Q;
|
|
36588
36604
|
N({
|
|
36589
36605
|
filter: mergeFilter([
|
|
@@ -36595,7 +36611,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
36595
36611
|
(Q = n == null ? void 0 : n.params) == null ? void 0 : Q.filter
|
|
36596
36612
|
])
|
|
36597
36613
|
}), k.current = X;
|
|
36598
|
-
}),
|
|
36614
|
+
}), U = useMemo(() => {
|
|
36599
36615
|
var oe;
|
|
36600
36616
|
const X = r || i;
|
|
36601
36617
|
if (!((oe = T == null ? void 0 : T.data) != null && oe.length))
|
|
@@ -36612,7 +36628,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
36612
36628
|
filterOption: !1,
|
|
36613
36629
|
filterSort: null,
|
|
36614
36630
|
fieldNames: t,
|
|
36615
|
-
onSearch:
|
|
36631
|
+
onSearch: G,
|
|
36616
36632
|
onDropdownVisibleChange: (X) => {
|
|
36617
36633
|
y(X), k.current = null, X && N(), v.current = !0;
|
|
36618
36634
|
},
|
|
@@ -36621,10 +36637,10 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
36621
36637
|
defaultValue: i
|
|
36622
36638
|
}, f), {
|
|
36623
36639
|
loading: T ? O : !0,
|
|
36624
|
-
options: h(j(
|
|
36625
|
-
rawOptions:
|
|
36640
|
+
options: h(j(U)),
|
|
36641
|
+
rawOptions: U,
|
|
36626
36642
|
dropdownRender: (X) => {
|
|
36627
|
-
const Q =
|
|
36643
|
+
const Q = U.some((Z) => Z[t.label] === k.current);
|
|
36628
36644
|
return /* @__PURE__ */ jsx(Fragment, { children: I ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
36629
36645
|
!((T == null ? void 0 : T.data.length) === 0 && (k != null && k.current)) && X,
|
|
36630
36646
|
(T == null ? void 0 : T.data.length) > 0 && (k == null ? void 0 : k.current) && !Q && /* @__PURE__ */ jsx(Divider$1, { style: { margin: 0 } }),
|
|
@@ -36769,7 +36785,7 @@ const useFormBlockHeight = () => {
|
|
|
36769
36785
|
const e = useDataBlockHeight(), t = useFieldSchema(), { token: n } = theme$1.useToken(), { designable: o } = useDesignable(), { heightProps: r } = useBlockHeightProps() || {}, { title: i } = r || {}, { display: a, enabled: l } = useFormDataTemplates(), c = t.reduceProperties((I, R) => R["x-component"] === "ActionBar" ? R : I), u = Object.keys((c == null ? void 0 : c.properties) || {}).length > 0, d = (F = (v = (y = t == null ? void 0 : t.parent) == null ? void 0 : y["x-decorator"]) == null ? void 0 : v.includes) == null ? void 0 : F.call(v, "FormBlockProvider"), p = u || o ? n.controlHeight + (d ? 1 : 2) * n.marginLG : n.marginLG, m = i ? n.fontSizeLG * n.lineHeightLG + n.padding * 2 - 1 : 0, h = useDataBlockRequestData(), { count: g, pageSize: f } = (h == null ? void 0 : h.meta) || {}, b = g > f ? n.controlHeightSM + 1 * n.paddingLG : 0, S = a && l ? n.controlHeight + 2 * n.padding + n.margin : 0;
|
|
36770
36786
|
return e - p - n.paddingLG - m - b - S;
|
|
36771
36787
|
}, FormComponent = (e) => {
|
|
36772
|
-
const g = e, { form: t, children: n } = g, o =
|
|
36788
|
+
const g = e, { form: t, children: n } = g, o = W(g, ["form", "children"]), r = useField(), i = useFieldSchema(), a = getCardItemSchema == null ? void 0 : getCardItemSchema(i), l = useAttach(t.createVoidField(P(x({}, r.props), { basePath: "" }))), c = useFormBlockHeight(), { token: u } = theme$1.useToken(), {
|
|
36773
36789
|
layout: d = "vertical",
|
|
36774
36790
|
labelAlign: p = "left",
|
|
36775
36791
|
labelWidth: m = 120,
|
|
@@ -36807,7 +36823,7 @@ const useFormBlockHeight = () => {
|
|
|
36807
36823
|
})
|
|
36808
36824
|
) }) });
|
|
36809
36825
|
}, Def = (e) => e.children, FormDecorator = (e) => {
|
|
36810
|
-
const u = e, { form: t, children: n, disabled: o } = u, r =
|
|
36826
|
+
const u = e, { form: t, children: n, disabled: o } = u, r = W(u, ["form", "children", "disabled"]), i = useField(), a = useFieldSchema(), l = useAttach(t.createVoidField(P(x({}, i.props), { basePath: "" }))), c = useComponent(a["x-component"], Def);
|
|
36811
36827
|
return /* @__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({}, i.componentProps), { children: /* @__PURE__ */ jsx(
|
|
36812
36828
|
NocoBaseRecursionField,
|
|
36813
36829
|
{
|
|
@@ -36885,7 +36901,7 @@ const useFormBlockHeight = () => {
|
|
|
36885
36901
|
}
|
|
36886
36902
|
`, Form = withDynamicSchemaProps(
|
|
36887
36903
|
observer$1((e) => {
|
|
36888
|
-
const t = useField(), { token: n } = useToken$1(), c = useProps(e), { form: o, disabled: r } = c, i =
|
|
36904
|
+
const t = useField(), { token: n } = useToken$1(), c = useProps(e), { form: o, disabled: r } = c, i = W(c, ["form", "disabled"]), a = useMemo(() => ({
|
|
36889
36905
|
token: {
|
|
36890
36906
|
// 这里是为了防止区块内部也收到 marginBlock 的影响(marginBlock:区块之间的间距)
|
|
36891
36907
|
// @ts-ignore
|
|
@@ -37994,7 +38010,7 @@ const AppendsTreeSelect = (e) => {
|
|
|
37994
38010
|
filter: a = trueFilter,
|
|
37995
38011
|
rootOption: l,
|
|
37996
38012
|
loadData: c
|
|
37997
|
-
} = z, u =
|
|
38013
|
+
} = z, u = W(z, [
|
|
37998
38014
|
"title",
|
|
37999
38015
|
"value",
|
|
38000
38016
|
"onChange",
|
|
@@ -38101,6 +38117,9 @@ const AppendsTreeSelect = (e) => {
|
|
|
38101
38117
|
loadData: I
|
|
38102
38118
|
}, u)
|
|
38103
38119
|
);
|
|
38120
|
+
}, AssociationFieldAddNewer = (e) => {
|
|
38121
|
+
const t = useContext(SchemaComponentContext);
|
|
38122
|
+
return /* @__PURE__ */ jsx(SchemaComponentContext.Provider, { value: P(x({}, t), { draggable: !0 }), children: /* @__PURE__ */ jsx(Action.Container, x({}, e)) });
|
|
38104
38123
|
}, filterAnalyses = (e) => {
|
|
38105
38124
|
if (!e)
|
|
38106
38125
|
return;
|
|
@@ -38116,7 +38135,7 @@ const AppendsTreeSelect = (e) => {
|
|
|
38116
38135
|
}, InternalAssociationSelect$1 = observer$1(
|
|
38117
38136
|
(e) => {
|
|
38118
38137
|
var R;
|
|
38119
|
-
const I = e, { objectValue: t = !0, addMode: n } = I, o =
|
|
38138
|
+
const I = e, { objectValue: t = !0, addMode: n } = I, o = W(I, ["objectValue", "addMode"]), r = useField(), i = useFieldSchema(), a = useServiceOptions$1((i == null ? void 0 : i["x-component-props"]) || e), { options: l } = useAssociationFieldContext(), c = isVariable(e.value) ? void 0 : e.value, u = Array.isArray(c) ? c.filter(Boolean) : c, [d, p] = useState(u), m = (R = i["x-component-props"]) == null ? void 0 : R.addMode, { t: h } = useTranslation(), { multiple: g } = e, f = useForm(), b = useAPIClient().resource(l.target), S = useCollectionRecordData(), y = useContext(SchemaComponentContext);
|
|
38120
38139
|
useEffect(() => {
|
|
38121
38140
|
const k = isVariable(r.value) ? void 0 : r.value, D = Array.isArray(k) ? k.filter(Boolean) : k;
|
|
38122
38141
|
p(D);
|
|
@@ -38125,7 +38144,7 @@ const AppendsTreeSelect = (e) => {
|
|
|
38125
38144
|
return f.addEffects(k, () => {
|
|
38126
38145
|
onFieldInputValueChange("*", (D) => {
|
|
38127
38146
|
var z, L, $, w, B;
|
|
38128
|
-
(filterAnalyses(($ = (L = (z = r.componentProps) == null ? void 0 : z.service) == null ? void 0 : L.params) == null ? void 0 : $.filter) || []).includes((w = D == null ? void 0 : D.props) == null ? void 0 : w.name) && r.value && isEqual(D == null ? void 0 : D.indexes, r == null ? void 0 : r.indexes) && ((B = D == null ? void 0 : D.props) == null ? void 0 : B.name) !== r.props.name && (r.setValue(
|
|
38147
|
+
(filterAnalyses(($ = (L = (z = r.componentProps) == null ? void 0 : z.service) == null ? void 0 : L.params) == null ? void 0 : $.filter) || []).includes((w = D == null ? void 0 : D.props) == null ? void 0 : w.name) && r.value && isEqual(D == null ? void 0 : D.indexes, r == null ? void 0 : r.indexes) && ((B = D == null ? void 0 : D.props) == null ? void 0 : B.name) !== r.props.name && (r.setValue(null), p(null));
|
|
38129
38148
|
});
|
|
38130
38149
|
}), () => {
|
|
38131
38150
|
f.removeEffects(k);
|
|
@@ -38159,7 +38178,7 @@ const AppendsTreeSelect = (e) => {
|
|
|
38159
38178
|
]
|
|
38160
38179
|
}
|
|
38161
38180
|
);
|
|
38162
|
-
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(Space$1.Compact, { style: { display: "flex" }, children: [
|
|
38181
|
+
return console.log(i), /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(Space$1.Compact, { style: { display: "flex" }, children: [
|
|
38163
38182
|
/* @__PURE__ */ jsx(
|
|
38164
38183
|
RemoteSelect,
|
|
38165
38184
|
P(x({
|
|
@@ -38602,7 +38621,7 @@ function IframePreviewer({ index: e, list: t, onSwitchIndex: n }) {
|
|
|
38602
38621
|
);
|
|
38603
38622
|
}
|
|
38604
38623
|
function InternalUpload(e) {
|
|
38605
|
-
const r = e, { onChange: t } = r, n =
|
|
38624
|
+
const r = e, { onChange: t } = r, n = W(r, ["onChange"]), o = useCallback(
|
|
38606
38625
|
(i) => {
|
|
38607
38626
|
t == null || t(toFileList(i.fileList));
|
|
38608
38627
|
},
|
|
@@ -38721,7 +38740,7 @@ function AttachmentList(e) {
|
|
|
38721
38740
|
] });
|
|
38722
38741
|
}
|
|
38723
38742
|
function Uploader(n) {
|
|
38724
|
-
var o = n, { rules: e } = o, t =
|
|
38743
|
+
var o = n, { rules: e } = o, t = W(o, ["rules"]);
|
|
38725
38744
|
const { disabled: r, multiple: i, value: a, onChange: l, toValueItem: c = toValueItem } = t, [u, d] = useState([]), { t: p } = useTranslation(), { componentCls: m } = useStyles$8(), h = useField(), g = useUploadProps(t), f = useBeforeUpload(e);
|
|
38726
38745
|
useEffect(() => {
|
|
38727
38746
|
u.length ? h.setFeedback({
|
|
@@ -38804,7 +38823,7 @@ Upload.Attachment = withDynamicSchemaProps(connect(Attachment, mapReadPretty(Att
|
|
|
38804
38823
|
});
|
|
38805
38824
|
Upload.Dragger = connect(
|
|
38806
38825
|
(e) => {
|
|
38807
|
-
const c = e, { tipContent: t, onChange: n } = c, o =
|
|
38826
|
+
const c = e, { tipContent: t, onChange: n } = c, o = W(c, ["tipContent", "onChange"]), { wrapSSR: r, hashId: i, componentCls: a } = useStyles$8(), l = useCallback(
|
|
38808
38827
|
(u) => {
|
|
38809
38828
|
n == null || n(toFileList(u.fileList));
|
|
38810
38829
|
},
|
|
@@ -38824,8 +38843,8 @@ Upload.Dragger = connect(
|
|
|
38824
38843
|
Upload.DraggerV2 = withDynamicSchemaProps(
|
|
38825
38844
|
connect(
|
|
38826
38845
|
(n) => {
|
|
38827
|
-
var o = n, { rules: e } = o, t =
|
|
38828
|
-
const { t: r } = useTranslation(), i = r("Click or drag file to this area to upload"), S = useProps(t), { title: a = i } = S, l =
|
|
38846
|
+
var o = n, { rules: e } = o, t = W(o, ["rules"]);
|
|
38847
|
+
const { t: r } = useTranslation(), i = r("Click or drag file to this area to upload"), S = useProps(t), { title: a = i } = S, l = W(S, ["title"]), [c, u] = useState(!1), { wrapSSR: d, hashId: p, componentCls: m } = useStyles$8(), h = useBeforeUpload(e), { size: g, mimetype: f } = e != null ? e : {}, C = useSizeHint(g), b = useCallback(
|
|
38829
38848
|
({ fileList: y }) => {
|
|
38830
38849
|
const { onChange: v } = l;
|
|
38831
38850
|
v == null || v(y), y.some((F) => F.status === "uploading") ? u(!0) : u(!1);
|
|
@@ -38994,7 +39013,7 @@ const schema$1 = {
|
|
|
38994
39013
|
setSelectedRows: o,
|
|
38995
39014
|
selectedRows: r = [],
|
|
38996
39015
|
onChange: i
|
|
38997
|
-
} = useContext(RecordPickerContext), d = useTableSelectorProps$4(), { onRowSelectionChange: a, rowKey: l = "id" } = d, c =
|
|
39016
|
+
} = useContext(RecordPickerContext), d = useTableSelectorProps$4(), { onRowSelectionChange: a, rowKey: l = "id" } = d, c = W(d, ["onRowSelectionChange", "rowKey"]), { setVisible: u } = useActionContext();
|
|
38998
39017
|
return P(x({}, c), {
|
|
38999
39018
|
rowKey: l,
|
|
39000
39019
|
rowSelection: {
|
|
@@ -39011,7 +39030,7 @@ const schema$1 = {
|
|
|
39011
39030
|
});
|
|
39012
39031
|
};
|
|
39013
39032
|
function FileSelector(e) {
|
|
39014
|
-
const y = e, { disabled: t, multiple: n, value: o, onChange: r, action: i, onSelect: a, quickUpload: l, selectFile: c } = y, u =
|
|
39033
|
+
const y = e, { disabled: t, multiple: n, value: o, onChange: r, action: i, onSelect: a, quickUpload: l, selectFile: c } = y, u = W(y, ["disabled", "multiple", "value", "onChange", "action", "onSelect", "quickUpload", "selectFile"]), { wrapSSR: d, hashId: p, componentCls: m } = useStyles$8(), { useFileCollectionStorageRules: h, useAttachmentFieldProps: g } = useExpressionScope(), { t: f } = useTranslation(), C = h(), b = g(), S = c === void 0 && l === void 0;
|
|
39015
39034
|
return d(
|
|
39016
39035
|
/* @__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: [
|
|
39017
39036
|
/* @__PURE__ */ jsx(AttachmentList, { disabled: t, multiple: n, value: o, onChange: r }),
|
|
@@ -39067,7 +39086,7 @@ function FileSelector(e) {
|
|
|
39067
39086
|
}
|
|
39068
39087
|
const InternalFileManager = (e) => {
|
|
39069
39088
|
var D, M;
|
|
39070
|
-
const k = e, { value: t, multiple: n, onChange: o } = k, r =
|
|
39089
|
+
const k = e, { value: t, multiple: n, onChange: o } = k, r = W(k, ["value", "multiple", "onChange"]), i = useFieldSchema(), [a, 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(), F = (z) => {
|
|
39071
39090
|
z.stopPropagation(), z.preventDefault(), m ? d(schema$1.Selector) : i.reduceProperties(($, w) => w["x-component"] === "AssociationField.Selector" ? w : $, null) || i.addProperty("selector", schema$1.Selector), l(!0), u([]);
|
|
39072
39091
|
};
|
|
39073
39092
|
useEffect(() => {
|
|
@@ -39177,8 +39196,8 @@ const InternalFileManager = (e) => {
|
|
|
39177
39196
|
if ((j = v == null ? void 0 : v.uiSchema) != null && j.enum)
|
|
39178
39197
|
if (Array.isArray(B))
|
|
39179
39198
|
B = B.map((O, V) => {
|
|
39180
|
-
var
|
|
39181
|
-
const E = (
|
|
39199
|
+
var G, U;
|
|
39200
|
+
const E = (U = (G = v.uiSchema.enum).find) == null ? void 0 : U.call(G, (H) => H.value === O);
|
|
39182
39201
|
return E ? /* @__PURE__ */ jsx(Tag, { color: E.color, style: { marginRight: 3 }, children: (E == null ? void 0 : E.label) || O }, V) : /* @__PURE__ */ jsx(Tag, { children: O }, O);
|
|
39183
39202
|
}).reverse();
|
|
39184
39203
|
else {
|
|
@@ -39372,7 +39391,7 @@ function transformNestedData(e) {
|
|
|
39372
39391
|
const { parent: l } = o;
|
|
39373
39392
|
n(l);
|
|
39374
39393
|
}
|
|
39375
|
-
const a = o, { parent: r } = a, i =
|
|
39394
|
+
const a = o, { parent: r } = a, i = W(a, ["parent"]);
|
|
39376
39395
|
t.push(i);
|
|
39377
39396
|
}
|
|
39378
39397
|
return e && n(e), t;
|
|
@@ -39454,7 +39473,7 @@ const InternalNesterCss = css`
|
|
|
39454
39473
|
setSelectedRows: o,
|
|
39455
39474
|
selectedRows: r = [],
|
|
39456
39475
|
onChange: i
|
|
39457
|
-
} = useContext(RecordPickerContext), d = useTableSelectorProps$4(), { onRowSelectionChange: a, rowKey: l = "id" } = d, c =
|
|
39476
|
+
} = useContext(RecordPickerContext), d = useTableSelectorProps$4(), { onRowSelectionChange: a, rowKey: l = "id" } = d, c = W(d, ["onRowSelectionChange", "rowKey"]), { setVisible: u } = useActionContext();
|
|
39458
39477
|
return P(x({}, c), {
|
|
39459
39478
|
rowKey: l,
|
|
39460
39479
|
rowSelection: {
|
|
@@ -39472,7 +39491,7 @@ const InternalNesterCss = css`
|
|
|
39472
39491
|
}, InternalPicker = observer$1(
|
|
39473
39492
|
(e) => {
|
|
39474
39493
|
var $;
|
|
39475
|
-
const L = e, { value: t, multiple: n, openSize: o, onChange: r, quickUpload: i, selectFile: a, shouldMountElement: l } = L, c =
|
|
39494
|
+
const L = e, { value: t, multiple: n, openSize: o, onChange: r, quickUpload: i, selectFile: a, shouldMountElement: l } = L, c = W(L, ["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, F] = useState([]), I = useCollectionRecordData(), R = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((B) => {
|
|
39476
39495
|
const j = B == null ? void 0 : B[d.label];
|
|
39477
39496
|
return P(x({}, B), {
|
|
39478
39497
|
[d.label]: getLabelFormatValue$1(b(S), b(j))
|
|
@@ -40509,7 +40528,7 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
40509
40528
|
var g, C, b, S, y, v;
|
|
40510
40529
|
const { isInSubTable: t } = useFlag(), { token: n } = useToken(), o = (g = e["data-row-key"]) == null ? void 0 : g.toString(), { setNodeRef: r, isOver: i, active: a, over: l } = useSortable({
|
|
40511
40530
|
id: o
|
|
40512
|
-
}), f = e, { rowIndex: c } = f, u =
|
|
40531
|
+
}), f = e, { rowIndex: c } = f, u = W(f, ["rowIndex"]), { ref: d, inView: p } = useInView({
|
|
40513
40532
|
threshold: 0,
|
|
40514
40533
|
triggerOnce: !0,
|
|
40515
40534
|
initialInView: t || (c || 0) < INITIAL_ROWS_NUMBER,
|
|
@@ -40540,12 +40559,12 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
40540
40559
|
})
|
|
40541
40560
|
) });
|
|
40542
40561
|
}, SortHandle$1 = (e) => {
|
|
40543
|
-
const i = e, { id: t } = i, n =
|
|
40562
|
+
const i = e, { id: t } = i, n = W(i, ["id"]), { listeners: o, setNodeRef: r } = useSortable({
|
|
40544
40563
|
id: t
|
|
40545
40564
|
});
|
|
40546
40565
|
return /* @__PURE__ */ jsx(MenuOutlined, P(x(x({ ref: r }, n), o), { style: { cursor: "grab" } }));
|
|
40547
40566
|
}, TableIndex$2 = (e) => {
|
|
40548
|
-
const o = e, { index: t } = o, n =
|
|
40567
|
+
const o = e, { index: t } = o, n = W(o, ["index"]);
|
|
40549
40568
|
return /* @__PURE__ */ jsx("div", P(x({ className: cls("nb-table-index"), style: { padding: "0 8px 0 16px" } }, n), { children: t }));
|
|
40550
40569
|
}, pageSizeOptions$1 = [5, 10, 20, 50, 100, 200], usePaginationProps$2 = (e, t) => {
|
|
40551
40570
|
var S, y, v, F, I, R;
|
|
@@ -40652,19 +40671,19 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
40652
40671
|
}, columnOpacityStyle = {
|
|
40653
40672
|
opacity: 0.3
|
|
40654
40673
|
}, HeaderCellComponent = (n) => {
|
|
40655
|
-
var o = n, { columnHidden: e } = o, t =
|
|
40674
|
+
var o = n, { columnHidden: e } = o, t = W(o, ["columnHidden"]);
|
|
40656
40675
|
const { designable: r } = useDesignable();
|
|
40657
40676
|
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) }));
|
|
40658
40677
|
}, BodyRowComponent = (e) => /* @__PURE__ */ jsx(SortableRow, x({}, e)), InternalBodyCellComponent = (e) => {
|
|
40659
40678
|
var m;
|
|
40660
|
-
const { token: t } = useToken(), n = useContext(InViewContext), o = (m = e.className) == null ? void 0 : m.includes("selection-column"), h = e, { record: r, schema: i, rowIndex: a, isSubTable: l } = h, c =
|
|
40679
|
+
const { token: t } = useToken(), n = useContext(InViewContext), o = (m = e.className) == null ? void 0 : m.includes("selection-column"), h = e, { record: r, schema: i, rowIndex: a, isSubTable: l } = h, c = W(h, ["record", "schema", "rowIndex", "isSubTable"]), { valueMap: u } = useSatisfiedActionValues({ formValues: r, category: "style", schema: i }), d = useMemo(() => Object.assign(x({}, e.style), u), [e.style, u]), p = {
|
|
40661
40680
|
height: "1em",
|
|
40662
40681
|
backgroundColor: "rgba(0, 0, 0, 0.06)",
|
|
40663
40682
|
borderRadius: `${t.borderRadiusSM}px`
|
|
40664
40683
|
};
|
|
40665
40684
|
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 }) }));
|
|
40666
40685
|
}, displayNone = { display: "none" }, BodyCellComponent = (n) => {
|
|
40667
|
-
var o = n, { columnHidden: e } = o, t =
|
|
40686
|
+
var o = n, { columnHidden: e } = o, t = W(o, ["columnHidden"]);
|
|
40668
40687
|
const { designable: r } = useDesignable();
|
|
40669
40688
|
return e ? /* @__PURE__ */ jsx("td", { style: r ? columnOpacityStyle : columnHiddenStyle, children: r ? t.children : /* @__PURE__ */ jsx("span", { style: displayNone, children: t.children }) }) : /* @__PURE__ */ jsx(InternalBodyCellComponent, x({}, t));
|
|
40670
40689
|
}, InternalNocoBaseTable = React.memo(
|
|
@@ -40684,7 +40703,7 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
40684
40703
|
columns: m,
|
|
40685
40704
|
expandable: h,
|
|
40686
40705
|
field: g
|
|
40687
|
-
} = b, f =
|
|
40706
|
+
} = b, f = W(b, [
|
|
40688
40707
|
"tableHeight",
|
|
40689
40708
|
"SortableWrapper",
|
|
40690
40709
|
"tableSizeRefCallback",
|
|
@@ -40769,7 +40788,7 @@ InternalNocoBaseTable.displayName = "InternalNocoBaseTable";
|
|
|
40769
40788
|
const Table$1 = withDynamicSchemaProps(
|
|
40770
40789
|
observer$1((e) => {
|
|
40771
40790
|
var ce, Ce, re;
|
|
40772
|
-
const { token: t } = useToken(), me = omit(e, ["onBlur", "onFocus", "value"]), { pagination: n, useProps: o } = me, r =
|
|
40791
|
+
const { token: t } = useToken(), me = omit(e, ["onBlur", "onFocus", "value"]), { pagination: n, useProps: o } = me, r = W(me, ["pagination", "useProps"]), he = (o == null ? void 0 : o()) || {}, { pagination: i } = he, a = W(he, ["pagination"]), ge = x(x({}, r), a), {
|
|
40773
40792
|
dragSort: l = !1,
|
|
40774
40793
|
showIndex: c = !0,
|
|
40775
40794
|
onRowSelectionChange: u,
|
|
@@ -40780,7 +40799,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
40780
40799
|
onExpand: g,
|
|
40781
40800
|
loading: f,
|
|
40782
40801
|
onClickRow: C
|
|
40783
|
-
} = ge, b =
|
|
40802
|
+
} = ge, b = W(ge, [
|
|
40784
40803
|
"dragSort",
|
|
40785
40804
|
"showIndex",
|
|
40786
40805
|
"onRowSelectionChange",
|
|
@@ -40799,7 +40818,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
40799
40818
|
&:hover > td {
|
|
40800
40819
|
background-color: ${t.controlItemBgActiveHover} !important;
|
|
40801
40820
|
}
|
|
40802
|
-
`, [t.controlItemBgActive, t.controlItemBgActiveHover]),
|
|
40821
|
+
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), G = useMemo(() => C ? E : "", [E, C]), U = useMemo(() => C ? (ee, ne) => ({
|
|
40803
40822
|
onClick: (se) => {
|
|
40804
40823
|
isPortalInBody(se.target) || C(ee, N, T);
|
|
40805
40824
|
},
|
|
@@ -40811,14 +40830,14 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
40811
40830
|
}, [k, D]);
|
|
40812
40831
|
const H = useCallback((ee) => {
|
|
40813
40832
|
if (m)
|
|
40814
|
-
return
|
|
40833
|
+
return K(ee);
|
|
40815
40834
|
if (ee.key)
|
|
40816
40835
|
return ee.key;
|
|
40817
40836
|
if (V.current.has(ee))
|
|
40818
40837
|
return V.current.get(ee);
|
|
40819
40838
|
const ne = uid();
|
|
40820
40839
|
return V.current.set(ee, ne), ne;
|
|
40821
|
-
}, []),
|
|
40840
|
+
}, []), K = useCallback(
|
|
40822
40841
|
(ee) => {
|
|
40823
40842
|
var ne;
|
|
40824
40843
|
return Array.isArray(m) ? m.map((se) => {
|
|
@@ -40877,7 +40896,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
40877
40896
|
}),
|
|
40878
40897
|
children: [
|
|
40879
40898
|
/* @__PURE__ */ jsxs("div", { className: cls(ee ? "checked" : null, rowSelectCheckboxContentClass), children: [
|
|
40880
|
-
l && /* @__PURE__ */ jsx(SortHandle$1, { id:
|
|
40899
|
+
l && /* @__PURE__ */ jsx(SortHandle$1, { id: K(ne) }),
|
|
40881
40900
|
c && /* @__PURE__ */ jsx(TableIndex$2, { index: se })
|
|
40882
40901
|
] }),
|
|
40883
40902
|
O && /* @__PURE__ */ jsx(
|
|
@@ -40904,7 +40923,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
40904
40923
|
c,
|
|
40905
40924
|
l,
|
|
40906
40925
|
S,
|
|
40907
|
-
|
|
40926
|
+
K,
|
|
40908
40927
|
O,
|
|
40909
40928
|
Q,
|
|
40910
40929
|
z
|
|
@@ -40915,20 +40934,20 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
40915
40934
|
return l ? React.createElement(
|
|
40916
40935
|
SortableContext$1,
|
|
40917
40936
|
{
|
|
40918
|
-
items: ((se = (ne = S.value) == null ? void 0 : ne.map) == null ? void 0 : se.call(ne,
|
|
40937
|
+
items: ((se = (ne = S.value) == null ? void 0 : ne.map) == null ? void 0 : se.call(ne, K)) || []
|
|
40919
40938
|
},
|
|
40920
40939
|
ee
|
|
40921
40940
|
) : React.createElement(React.Fragment, {}, ee);
|
|
40922
40941
|
},
|
|
40923
|
-
[S, l,
|
|
40942
|
+
[S, l, K]
|
|
40924
40943
|
), { height: te, tableSizeRefCallback: ie } = useTableSize(), ae = useMemo(() => ({
|
|
40925
40944
|
x: "max-content"
|
|
40926
40945
|
}), []), ue = useMemo(() => ({
|
|
40927
40946
|
x: "max-content",
|
|
40928
40947
|
y: Y.length > 0 ? te : void 0
|
|
40929
40948
|
}), [te, ae, Y]), xe = useCallback(
|
|
40930
|
-
(ee) => T.includes(ee[m]) ?
|
|
40931
|
-
[T,
|
|
40949
|
+
(ee) => T.includes(ee[m]) ? G : "",
|
|
40950
|
+
[T, G, JSON.stringify(m)]
|
|
40932
40951
|
), pe = useCallback(
|
|
40933
40952
|
(ee, ne) => {
|
|
40934
40953
|
const se = ee ? [...$, ne[F.getPrimaryKey()]] : $.filter((le) => ne[F.getPrimaryKey()] !== le);
|
|
@@ -40953,7 +40972,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
40953
40972
|
paginationProps: z,
|
|
40954
40973
|
components: X,
|
|
40955
40974
|
onTableChange: d,
|
|
40956
|
-
onRow:
|
|
40975
|
+
onRow: U,
|
|
40957
40976
|
rowClassName: xe,
|
|
40958
40977
|
scroll: ue,
|
|
40959
40978
|
columns: L,
|
|
@@ -41041,14 +41060,14 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
41041
41060
|
const { setVisible: O } = useActionContext(), { selectedRows: V, setSelectedRows: E } = useContext(RecordPickerContext);
|
|
41042
41061
|
return {
|
|
41043
41062
|
onClick() {
|
|
41044
|
-
var
|
|
41063
|
+
var U;
|
|
41045
41064
|
Array.isArray(n.value) || (n.value = []), V.forEach((H) => n.value.push(markRecordAsNew(H))), n.onInput(n.value), n.initialValue = n.value, E([]), O(!1);
|
|
41046
|
-
const
|
|
41047
|
-
D(
|
|
41065
|
+
const G = Math.ceil(n.value.length / (((U = n.componentProps) == null ? void 0 : U.pageSize) || 10));
|
|
41066
|
+
D(G);
|
|
41048
41067
|
}
|
|
41049
41068
|
};
|
|
41050
41069
|
}, R = () => {
|
|
41051
|
-
const O = (o == null ? void 0 : o.targetKey) || "id", V = (n.value || []).map((
|
|
41070
|
+
const O = (o == null ? void 0 : o.targetKey) || "id", V = (n.value || []).map((G) => G == null ? void 0 : G[O]).filter(Boolean);
|
|
41052
41071
|
return V.length ? { $and: [{ [`${O}.$ne`]: V }] } : {};
|
|
41053
41072
|
}, [k, D] = useState(1), [M, z] = useState(((B = n.componentProps) == null ? void 0 : B.pageSize) || 10);
|
|
41054
41073
|
useEffect(() => {
|
|
@@ -41062,8 +41081,8 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
41062
41081
|
current: k > O ? O : k,
|
|
41063
41082
|
pageSize: M || 10,
|
|
41064
41083
|
total: n == null ? void 0 : n.value,
|
|
41065
|
-
onChange: (E,
|
|
41066
|
-
D(E), z(
|
|
41084
|
+
onChange: (E, G) => {
|
|
41085
|
+
D(E), z(G), n.onInput(n.value);
|
|
41067
41086
|
},
|
|
41068
41087
|
showSizeChanger: !0,
|
|
41069
41088
|
pageSizeOptions: ["10", "20", "50", "100"],
|
|
@@ -41178,7 +41197,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
41178
41197
|
), AssociationField = connect(Editable$1, mapReadPretty(ReadPretty$8));
|
|
41179
41198
|
AssociationField.SubTable = SubTable;
|
|
41180
41199
|
AssociationField.Nester = Nester;
|
|
41181
|
-
AssociationField.AddNewer =
|
|
41200
|
+
AssociationField.AddNewer = AssociationFieldAddNewer;
|
|
41182
41201
|
AssociationField.Selector = Action.Container;
|
|
41183
41202
|
AssociationField.Viewer = Action.Container;
|
|
41184
41203
|
AssociationField.InternalSelect = InternalPicker;
|
|
@@ -41264,7 +41283,7 @@ const ReadPretty$7 = observer$1(
|
|
|
41264
41283
|
InternalAssociationSelect.displayName = "InternalAssociationSelect";
|
|
41265
41284
|
const AssociationSelect = InternalAssociationSelect;
|
|
41266
41285
|
AssociationSelect.Designer = function e() {
|
|
41267
|
-
var B, j, T, N, O, V, E,
|
|
41286
|
+
var B, j, T, N, O, V, E, G, U, H, K;
|
|
41268
41287
|
const { getCollectionFields: t, getInterface: n, getCollectionJoinField: o, getCollection: r, isTitleField: i } = useCollectionManager_deprecated(), { getField: a } = useCollection_deprecated(), { form: l } = useFormBlockContext(), c = useField(), u = useFieldSchema(), { t: d } = useTranslation(), p = useFilterByTk(), { dn: m, refresh: h, insertAdjacent: g } = useDesignable(), f = useCompile(), C = useIsShowMultipleSwitch(), { isAllowToSetDefaultValue: b } = useIsAllowToSetDefaultValue(), S = a(u.name) || o(u["x-collection-field"]), y = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), F = n(S == null ? void 0 : S.interface), I = (B = F == null ? void 0 : F.validateSchema) == null ? void 0 : B.call(F, u), R = (j = S == null ? void 0 : S.uiSchema) == null ? void 0 : j.title, k = S != null && S.target ? t(S == null ? void 0 : S.target) : [];
|
|
41269
41288
|
c.title === R || c.title;
|
|
41270
41289
|
const D = useSortFields(S == null ? void 0 : S.target), M = ((O = (N = (T = c.componentProps) == null ? void 0 : T.service) == null ? void 0 : N.params) == null ? void 0 : O.sort) || [];
|
|
@@ -41494,7 +41513,7 @@ AssociationSelect.Designer = function e() {
|
|
|
41494
41513
|
SchemaSettingsDataScope,
|
|
41495
41514
|
{
|
|
41496
41515
|
collectionName: S == null ? void 0 : S.target,
|
|
41497
|
-
defaultFilter: ((
|
|
41516
|
+
defaultFilter: ((U = (G = (E = c.componentProps) == null ? void 0 : E.service) == null ? void 0 : G.params) == null ? void 0 : U.filter) || {},
|
|
41498
41517
|
form: l,
|
|
41499
41518
|
onSubmit: ({ filter: Y }) => {
|
|
41500
41519
|
Y = removeNullCondition(Y), _.set(c.componentProps, "service.params.filter", Y), u["x-component-props"] = c.componentProps, m.emit("patch", {
|
|
@@ -41631,7 +41650,7 @@ AssociationSelect.Designer = function e() {
|
|
|
41631
41650
|
{
|
|
41632
41651
|
title: d("Title field"),
|
|
41633
41652
|
options: L,
|
|
41634
|
-
value: (
|
|
41653
|
+
value: (K = (H = c == null ? void 0 : c.componentProps) == null ? void 0 : H.fieldNames) == null ? void 0 : K.label,
|
|
41635
41654
|
onChange: (Y) => {
|
|
41636
41655
|
var Q, Z;
|
|
41637
41656
|
const J = {
|
|
@@ -41984,7 +42003,7 @@ const AutoComplete = withDynamicSchemaProps(
|
|
|
41984
42003
|
}
|
|
41985
42004
|
};
|
|
41986
42005
|
}), CardItem = (e) => {
|
|
41987
|
-
const p = e, { children: t, name: n, heightMode: o } = p, r =
|
|
42006
|
+
const p = e, { children: t, name: n, heightMode: o } = p, r = W(p, ["children", "name", "heightMode"]), i = useSchemaTemplate(), a = useFieldSchema(), l = a == null ? void 0 : a["x-template-key"], { wrapSSR: c, componentCls: u, hashId: d } = useStyles$7();
|
|
41988
42007
|
return l && !i ? null : c(
|
|
41989
42008
|
/* @__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 })) }) })
|
|
41990
42009
|
);
|
|
@@ -42025,7 +42044,7 @@ const AutoComplete = withDynamicSchemaProps(
|
|
|
42025
42044
|
changeOnSelectLast: c,
|
|
42026
42045
|
changeOnSelect: u,
|
|
42027
42046
|
maxLevel: d
|
|
42028
|
-
} = y, p =
|
|
42047
|
+
} = y, p = W(y, [
|
|
42029
42048
|
"value",
|
|
42030
42049
|
"onChange",
|
|
42031
42050
|
"labelInValue",
|
|
@@ -42153,7 +42172,7 @@ function useCollectionOptions({ filter: e, isTableOid: t }) {
|
|
|
42153
42172
|
}
|
|
42154
42173
|
const CollectionSelect = connect(
|
|
42155
42174
|
(e) => {
|
|
42156
|
-
const a = e, { filter: t } = a, n =
|
|
42175
|
+
const a = e, { filter: t } = a, n = W(a, ["filter"]), o = useCollectionOptions(e), { t: r } = useTranslation(), i = useCallback(
|
|
42157
42176
|
(l, c) => {
|
|
42158
42177
|
var u, d;
|
|
42159
42178
|
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());
|
|
@@ -42198,7 +42217,7 @@ function useDataSourceOptions({ filter: e }) {
|
|
|
42198
42217
|
);
|
|
42199
42218
|
}
|
|
42200
42219
|
const DataSourceSelect = connect((e) => {
|
|
42201
|
-
const a = e, { filter: t } = a, n =
|
|
42220
|
+
const a = e, { filter: t } = a, n = W(a, ["filter"]), o = useDataSourceOptions(e), { t: r } = useTranslation(), i = useCallback(
|
|
42202
42221
|
(l, c) => {
|
|
42203
42222
|
var u, d;
|
|
42204
42223
|
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());
|
|
@@ -42219,7 +42238,7 @@ const DataSourceSelect = connect((e) => {
|
|
|
42219
42238
|
})
|
|
42220
42239
|
);
|
|
42221
42240
|
}), DataSourceCollectionCascaderReadPretty = observer$1((e) => {
|
|
42222
|
-
const t = useDataSourceManager(), n = useCompile(), f = e, { value: o, onChange: r, dataSourceFilter: i, collectionFilter: a } = f, l =
|
|
42241
|
+
const t = useDataSourceManager(), n = useCompile(), f = e, { value: o, onChange: r, dataSourceFilter: i, collectionFilter: a } = f, l = W(f, ["value", "onChange", "dataSourceFilter", "collectionFilter"]), [c, u] = parseCollectionName(o), d = [c, u].filter(Boolean), p = t.getDataSources(), m = useMemo(() => (i ? p.filter(i) : p).map((C) => ({
|
|
42223
42242
|
label: n(C.displayName),
|
|
42224
42243
|
value: C.key,
|
|
42225
42244
|
children: C.collectionManager.collectionInstancesArr.filter(a != null ? a : (b) => !b.hidden).map((b) => ({
|
|
@@ -42236,7 +42255,7 @@ const DataSourceSelect = connect((e) => {
|
|
|
42236
42255
|
})(d, m);
|
|
42237
42256
|
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Tag, { children: g.join(" / ") }) });
|
|
42238
42257
|
}), DataSourceCollectionCascader = connect((e) => {
|
|
42239
|
-
const t = useDataSourceManager(), n = useCompile(), g = e, { value: o, onChange: r, dataSourceFilter: i, collectionFilter: a } = g, l =
|
|
42258
|
+
const t = useDataSourceManager(), n = useCompile(), g = e, { value: o, onChange: r, dataSourceFilter: i, collectionFilter: a } = g, l = W(g, ["value", "onChange", "dataSourceFilter", "collectionFilter"]), [c, u] = parseCollectionName(o), d = [c, u].filter(Boolean), p = t.getDataSources(), m = useMemo(() => (i ? p.filter(i) : p).map((f) => ({
|
|
42240
42259
|
label: n(f.displayName),
|
|
42241
42260
|
value: f.key,
|
|
42242
42261
|
children: f.collectionManager.collectionInstancesArr.filter(a != null ? a : (C) => !C.hidden).map((C) => ({
|
|
@@ -42254,7 +42273,7 @@ const DataSourceSelect = connect((e) => {
|
|
|
42254
42273
|
return /* @__PURE__ */ jsx(Cascader$1, P(x({ showSearch: !0 }, l), { options: m, value: d, onChange: h }));
|
|
42255
42274
|
}, mapReadPretty(DataSourceCollectionCascaderReadPretty)), ColorPicker = connect(
|
|
42256
42275
|
(e) => {
|
|
42257
|
-
const r = e, { value: t, onChange: n } = r, o =
|
|
42276
|
+
const r = e, { value: t, onChange: n } = r, o = W(r, ["value", "onChange"]);
|
|
42258
42277
|
return /* @__PURE__ */ jsx("div", { role: "button", "aria-label": "color-picker-normal", style: { display: "inline-block" }, children: /* @__PURE__ */ jsx(
|
|
42259
42278
|
ColorPicker$1,
|
|
42260
42279
|
P(x({
|
|
@@ -42323,7 +42342,7 @@ const DataSourceSelect = connect((e) => {
|
|
|
42323
42342
|
default: '{{t("Default")}}'
|
|
42324
42343
|
}, ColorSelect = connect(
|
|
42325
42344
|
(e) => {
|
|
42326
|
-
const t = useCompile(), r = e, { colors: n = defaultColors } = r, o =
|
|
42345
|
+
const t = useCompile(), r = e, { colors: n = defaultColors } = r, o = W(r, ["colors"]);
|
|
42327
42346
|
return /* @__PURE__ */ jsx(Select$1, P(x({}, o), { children: Object.keys(n).map((i) => /* @__PURE__ */ jsx(Select$1.Option, { value: i, children: /* @__PURE__ */ jsx(Tag, { color: i, children: t(n[i] || n.default) }) }, i)) }));
|
|
42328
42347
|
},
|
|
42329
42348
|
mapProps((e, t) => P(x({}, e), {
|
|
@@ -42334,7 +42353,7 @@ const DataSourceSelect = connect((e) => {
|
|
|
42334
42353
|
return o[n] ? /* @__PURE__ */ jsx(Tag, { color: n, children: t(o[n] || o.default) }) : null;
|
|
42335
42354
|
})
|
|
42336
42355
|
), Input = (e) => {
|
|
42337
|
-
const o = e, { onChange: t } = o, n =
|
|
42356
|
+
const o = e, { onChange: t } = o, n = W(o, ["onChange"]);
|
|
42338
42357
|
return /* @__PURE__ */ jsx(
|
|
42339
42358
|
"fieldset",
|
|
42340
42359
|
{
|
|
@@ -43091,11 +43110,8 @@ const IconPicker = connect(
|
|
|
43091
43110
|
mapReadPretty((e) => isValid(e.value) ? /* @__PURE__ */ jsx(Icon, { type: e.value }) : /* @__PURE__ */ jsx("div", {}))
|
|
43092
43111
|
);
|
|
43093
43112
|
function countDecimalPlaces(e) {
|
|
43094
|
-
const t =
|
|
43095
|
-
|
|
43096
|
-
return 0;
|
|
43097
|
-
const n = String(t).split(".")[1];
|
|
43098
|
-
return n ? n.length : 0;
|
|
43113
|
+
const t = toString(e);
|
|
43114
|
+
return t.includes(".") ? t.split(".")[1].replace(/0+$/, "").length : 0;
|
|
43099
43115
|
}
|
|
43100
43116
|
const separators = {
|
|
43101
43117
|
"0,0.00": { thousands: ",", decimal: "." },
|
|
@@ -43173,7 +43189,7 @@ function toSafeNumber(e) {
|
|
|
43173
43189
|
return e && (e > Number.MAX_SAFE_INTEGER || e < Number.MIN_SAFE_INTEGER ? new BigNumber(e).toString() : Number(e));
|
|
43174
43190
|
}
|
|
43175
43191
|
const InputNumber = connect((e) => {
|
|
43176
|
-
const i = e, { onChange: t } = i, n =
|
|
43192
|
+
const i = e, { onChange: t } = i, n = W(i, ["onChange"]);
|
|
43177
43193
|
let r = x({
|
|
43178
43194
|
onChange: (a) => {
|
|
43179
43195
|
Number.isNaN(a) ? t(null) : t(toSafeNumber(a));
|
|
@@ -44693,7 +44709,7 @@ const menuItemTitleStyle = {
|
|
|
44693
44709
|
};
|
|
44694
44710
|
Menu.Item = observer$1(
|
|
44695
44711
|
(e) => {
|
|
44696
|
-
const { t } = useMenuTranslation(), { designable: n } = useDesignable(), { pushMenuItem: o } = useCollectMenuItems(), m = e, { icon: r, children: i, hidden: a } = m, l =
|
|
44712
|
+
const { t } = useMenuTranslation(), { designable: n } = useDesignable(), { pushMenuItem: o } = useCollectMenuItems(), m = e, { icon: r, children: i, hidden: a } = m, l = W(m, ["icon", "children", "hidden"]), c = useFieldSchema(), u = useField(), d = useContext(MenuItemDesignerContext), p = useMemo(() => P(x({}, l), {
|
|
44697
44713
|
hidden: n ? !1 : a,
|
|
44698
44714
|
className: menuItemClass,
|
|
44699
44715
|
key: c.name,
|
|
@@ -44759,7 +44775,7 @@ const MenuURLButton = ({ href: e, params: t, icon: n }) => {
|
|
|
44759
44775
|
};
|
|
44760
44776
|
Menu.URL = observer$1(
|
|
44761
44777
|
(e) => {
|
|
44762
|
-
const { pushMenuItem: t } = useCollectMenuItems(), { designable: n } = useDesignable(), d = e, { icon: o, children: r, hidden: i } = d, a =
|
|
44778
|
+
const { pushMenuItem: t } = useCollectMenuItems(), { designable: n } = useDesignable(), d = e, { icon: o, children: r, hidden: i } = d, a = W(d, ["icon", "children", "hidden"]), l = useFieldSchema(), c = useField();
|
|
44763
44779
|
if (!t)
|
|
44764
44780
|
return error("Menu.URL must be wrapped by GetMenuItemsContext.Provider"), null;
|
|
44765
44781
|
const u = useMemo(() => P(x({}, a), {
|
|
@@ -44778,7 +44794,7 @@ Menu.URL = observer$1(
|
|
|
44778
44794
|
);
|
|
44779
44795
|
Menu.SubMenu = observer$1(
|
|
44780
44796
|
(e) => {
|
|
44781
|
-
const { t } = useMenuTranslation(), { designable: n } = useDesignable(), { Component: o, getMenuItems: r } = useMenuItem(), { pushMenuItem: i } = useCollectMenuItems(), f = e, { icon: a, children: l, hidden: c } = f, u =
|
|
44797
|
+
const { t } = useMenuTranslation(), { designable: n } = useDesignable(), { Component: o, getMenuItems: r } = useMenuItem(), { pushMenuItem: i } = useCollectMenuItems(), f = e, { icon: a, children: l, hidden: c } = f, u = W(f, ["icon", "children", "hidden"]), d = useFieldSchema(), p = useField(), m = useContext(MenuModeContext), h = useContext(MenuItemDesignerContext), g = useMemo(() => P(x({}, u), {
|
|
44782
44798
|
hidden: n ? !1 : c,
|
|
44783
44799
|
className: menuItemClass,
|
|
44784
44800
|
key: d.name,
|
|
@@ -44814,7 +44830,7 @@ const useStyles$3 = genStyleHook("nb-menu-item", (e) => {
|
|
|
44814
44830
|
}), Pagination = withDynamicSchemaProps(
|
|
44815
44831
|
observer$1(
|
|
44816
44832
|
(e) => {
|
|
44817
|
-
const r = useProps(e), { hidden: t } = r, n =
|
|
44833
|
+
const r = useProps(e), { hidden: t } = r, n = W(r, ["hidden"]);
|
|
44818
44834
|
return t ? null : /* @__PURE__ */ jsx("div", { onKeyPress: (i) => {
|
|
44819
44835
|
i.key === "Enter" && i.preventDefault();
|
|
44820
44836
|
}, children: /* @__PURE__ */ jsx(Pagination$1, x({}, n)) });
|
|
@@ -44866,7 +44882,7 @@ const useStyles$3 = genStyleHook("nb-menu-item", (e) => {
|
|
|
44866
44882
|
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 * i, 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;
|
|
44867
44883
|
}, PasswordStrength = (e) => isFn(e.children) ? e.children(getStrength(String(e.value || ""))) : /* @__PURE__ */ jsx(Fragment$1, { children: e.children }), Password = connect(
|
|
44868
44884
|
(e) => {
|
|
44869
|
-
const a = e, { value: t, className: n, checkStrength: o } = a, r =
|
|
44885
|
+
const a = e, { value: t, className: n, checkStrength: o } = a, r = W(a, ["value", "className", "checkStrength"]), i = {
|
|
44870
44886
|
position: "absolute",
|
|
44871
44887
|
zIndex: 1,
|
|
44872
44888
|
height: 8,
|
|
@@ -45051,7 +45067,7 @@ const useTableSelectorProps$1 = () => {
|
|
|
45051
45067
|
setSelectedRows: o,
|
|
45052
45068
|
selectedRows: r = [],
|
|
45053
45069
|
onChange: i
|
|
45054
|
-
} = useContext(RecordPickerContext), d = useTableSelectorProps$4(), { onRowSelectionChange: a, rowKey: l = "id" } = d, c =
|
|
45070
|
+
} = useContext(RecordPickerContext), d = useTableSelectorProps$4(), { onRowSelectionChange: a, rowKey: l = "id" } = d, c = W(d, ["onRowSelectionChange", "rowKey"]), { setVisible: u } = useActionContext();
|
|
45055
45071
|
return P(x({}, c), {
|
|
45056
45072
|
rowKey: l,
|
|
45057
45073
|
rowSelection: {
|
|
@@ -45077,7 +45093,7 @@ const useTableSelectorProps$1 = () => {
|
|
|
45077
45093
|
const t = useFieldSchema(), { association: n } = e, { getField: o } = useCollection_deprecated();
|
|
45078
45094
|
return n || o(t.name);
|
|
45079
45095
|
}, InputRecordPicker = (e) => {
|
|
45080
|
-
const v = e, { value: t, multiple: n, onChange: o, quickUpload: r, selectFile: i } = v, a =
|
|
45096
|
+
const v = e, { value: t, multiple: n, onChange: o, quickUpload: r, selectFile: i } = v, a = 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([]);
|
|
45081
45097
|
useEffect(() => {
|
|
45082
45098
|
if (t) {
|
|
45083
45099
|
const F = (Array.isArray(t) ? t : t ? [t] : []).map((I) => {
|
|
@@ -45145,7 +45161,7 @@ const useTableSelectorProps$1 = () => {
|
|
|
45145
45161
|
})
|
|
45146
45162
|
] });
|
|
45147
45163
|
}, RecordPickerProvider = (e) => {
|
|
45148
|
-
const c = e, { multiple: t, onChange: n, selectedRows: o, setSelectedRows: r, options: i, collectionField: a } = c, l =
|
|
45164
|
+
const c = e, { multiple: t, onChange: n, selectedRows: o, setSelectedRows: r, options: i, collectionField: a } = c, l = W(c, ["multiple", "onChange", "selectedRows", "setSelectedRows", "options", "collectionField"]);
|
|
45149
45165
|
return /* @__PURE__ */ jsx(
|
|
45150
45166
|
RecordPickerContext.Provider,
|
|
45151
45167
|
{
|
|
@@ -45992,7 +46008,7 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
|
|
|
45992
46008
|
data: n.value
|
|
45993
46009
|
}), e);
|
|
45994
46010
|
}, SortHandle = (e) => /* @__PURE__ */ jsx(MenuOutlined, x({ className: "drag-handle", style: { cursor: "grab" } }, e)), TableIndex$1 = (e) => {
|
|
45995
|
-
const o = e, { index: t } = o, n =
|
|
46011
|
+
const o = e, { index: t } = o, n = W(o, ["index"]);
|
|
45996
46012
|
return /* @__PURE__ */ jsx("div", P(x({ className: cls("nb-table-index"), style: { padding: "0 8px 0 16px" } }, n), { children: t + 1 }));
|
|
45997
46013
|
}, useDefAction = () => ({
|
|
45998
46014
|
move() {
|
|
@@ -46009,7 +46025,7 @@ const useStyles$2 = genStyleHook("nb-rich-text", (e) => {
|
|
|
46009
46025
|
useDataSource: l = useDefDataSource,
|
|
46010
46026
|
useAction: c = useDefAction,
|
|
46011
46027
|
onChange: u
|
|
46012
|
-
} = C, d =
|
|
46028
|
+
} = C, d = W(C, [
|
|
46013
46029
|
"dragSort",
|
|
46014
46030
|
"showIndex",
|
|
46015
46031
|
"useSelectedRowKeys",
|
|
@@ -46766,14 +46782,14 @@ const TableActionColumnDesigner = (e) => {
|
|
|
46766
46782
|
}
|
|
46767
46783
|
},
|
|
46768
46784
|
onSubmit: ({ sort: O }) => {
|
|
46769
|
-
var
|
|
46770
|
-
const V = O.map((
|
|
46785
|
+
var G;
|
|
46786
|
+
const V = O.map((U) => U.direction === "desc" ? `-${U.field}` : U.field), E = r.decoratorProps.params || {};
|
|
46771
46787
|
E.sort = V, r.decoratorProps.params = E, i["x-decorator-props"].params = E, d.emit("patch", {
|
|
46772
46788
|
schema: {
|
|
46773
46789
|
"x-uid": i["x-uid"],
|
|
46774
46790
|
"x-decorator-props": i["x-decorator-props"]
|
|
46775
46791
|
}
|
|
46776
|
-
}), c.run(P(x({}, (
|
|
46792
|
+
}), c.run(P(x({}, (G = c.params) == null ? void 0 : G[0]), { sort: V }));
|
|
46777
46793
|
}
|
|
46778
46794
|
}
|
|
46779
46795
|
),
|
|
@@ -46814,9 +46830,9 @@ const TableActionColumnDesigner = (e) => {
|
|
|
46814
46830
|
{ label: u("Small"), value: "small" }
|
|
46815
46831
|
],
|
|
46816
46832
|
onChange: (O) => {
|
|
46817
|
-
const V = i.reduceProperties((E,
|
|
46818
|
-
if (
|
|
46819
|
-
return
|
|
46833
|
+
const V = i.reduceProperties((E, G) => {
|
|
46834
|
+
if (G["x-component"] === "TableV2")
|
|
46835
|
+
return G;
|
|
46820
46836
|
}, null);
|
|
46821
46837
|
V["x-component-props"] = V["x-component-props"] || {}, V["x-component-props"].size = O, d.emit("patch", {
|
|
46822
46838
|
schema: {
|
|
@@ -47385,12 +47401,12 @@ const useCollectionFields = (e) => {
|
|
|
47385
47401
|
const t = useCollection();
|
|
47386
47402
|
return useMemo(() => t.getFields(e), [t, e]);
|
|
47387
47403
|
}, collectionTransform = (e, t) => {
|
|
47388
|
-
const a = e, { rawTitle: n, title: o, fields: r = [] } = a, i =
|
|
47404
|
+
const a = e, { rawTitle: n, title: o, fields: r = [] } = a, i = W(a, ["rawTitle", "title", "fields"]);
|
|
47389
47405
|
return P(x({}, i), {
|
|
47390
47406
|
title: n ? o : t.i18n.t(o, { ns: "lm-collections" }),
|
|
47391
47407
|
rawTitle: n || o,
|
|
47392
47408
|
fields: r == null ? void 0 : r.map((u) => {
|
|
47393
|
-
var d = u, { uiSchema: l } = d, c =
|
|
47409
|
+
var d = u, { uiSchema: l } = d, c = W(d, ["uiSchema"]);
|
|
47394
47410
|
if (l != null && l.title) {
|
|
47395
47411
|
const p = l.title;
|
|
47396
47412
|
l.title = l.rawTitle ? p : t.i18n.t(p, { ns: "lm-collections" }), l.rawTitle = l.rawTitle || p;
|
|
@@ -47672,7 +47688,7 @@ const SelfFields = (e) => {
|
|
|
47672
47688
|
});
|
|
47673
47689
|
return /* @__PURE__ */ jsx(SchemaInitializerChildren, { children: a });
|
|
47674
47690
|
}, AssociationCollectionFields = (e) => {
|
|
47675
|
-
const m = e, { filterAssociationField: t, filterSelfField: n = () => !0, getSchema: o } = m, r =
|
|
47691
|
+
const m = e, { filterAssociationField: t, filterSelfField: n = () => !0, getSchema: o } = m, r = W(m, ["filterAssociationField", "filterSelfField", "getSchema"]), { collection: i, t: a, collectionManager: l } = e.context, c = i.getFields(), u = ["o2o", "oho", "obo", "m2o"], d = c.filter((h) => u.includes(h.interface)).filter((h) => n(h, e.context));
|
|
47676
47692
|
if (!d.length)
|
|
47677
47693
|
return null;
|
|
47678
47694
|
const p = d.map((h) => {
|
|
@@ -48677,9 +48693,9 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
48677
48693
|
else {
|
|
48678
48694
|
let V = [];
|
|
48679
48695
|
j != null && j.length ? j.forEach((E) => {
|
|
48680
|
-
var
|
|
48681
|
-
const
|
|
48682
|
-
|
|
48696
|
+
var U;
|
|
48697
|
+
const G = (U = N == null ? void 0 : N.children) == null ? void 0 : U.find((H) => [E, E.interface].includes(H.name));
|
|
48698
|
+
G && V.push(P(x({}, G), {
|
|
48683
48699
|
targetScope: E == null ? void 0 : E.targetScope
|
|
48684
48700
|
}));
|
|
48685
48701
|
}) : B != null && B.length ? V = (O = N == null ? void 0 : N.children) == null ? void 0 : O.filter((E) => !B.includes(E.name)) : V = N == null ? void 0 : N.children, V != null && V.length && T.push(P(x({}, N), {
|
|
@@ -48843,7 +48859,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
48843
48859
|
const t = useRecord(), n = useCollectionParentRecordData();
|
|
48844
48860
|
return /* @__PURE__ */ jsx(EditFieldAction, x({ item: t, parentItem: n }, e));
|
|
48845
48861
|
}, EditFieldAction = (e) => {
|
|
48846
|
-
const I = e, { scope: t, getContainer: n, item: o, parentItem: r, children: i } = I, a =
|
|
48862
|
+
const I = e, { scope: t, getContainer: n, item: o, parentItem: r, children: i } = I, a = W(I, ["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(() => {
|
|
48847
48863
|
var R;
|
|
48848
48864
|
return (o == null ? void 0 : o.fields) || ((R = u(o.collectionName)) == null ? void 0 : R.options.fields.filter((k) => ["string", "bigInt", "integer"].includes(k.type)).map((k) => {
|
|
48849
48865
|
var D;
|
|
@@ -49414,7 +49430,7 @@ const getSchema$4 = (e, t, n) => {
|
|
|
49414
49430
|
const t = useRecord();
|
|
49415
49431
|
return /* @__PURE__ */ jsx(EditCollectionAction, x({ item: t }, e));
|
|
49416
49432
|
}, EditCollectionAction = (e) => {
|
|
49417
|
-
const h = e, { scope: t, getContainer: n, item: o, children: r } = h, i =
|
|
49433
|
+
const h = e, { scope: t, getContainer: n, item: o, children: r } = h, i = W(h, ["scope", "getContainer", "item", "children"]), { getTemplate: a } = useCollectionManager_deprecated(), [l, c] = useState(!1), [u, d] = useState({}), { t: p } = useTranslation(), m = useCompile();
|
|
49418
49434
|
return /* @__PURE__ */ jsx(RecordProvider, { record: o, children: /* @__PURE__ */ jsxs(ActionContextProvider, { value: { visible: l, setVisible: c }, children: [
|
|
49419
49435
|
/* @__PURE__ */ jsx(
|
|
49420
49436
|
"a",
|
|
@@ -49483,22 +49499,22 @@ const getSchema$4 = (e, t, n) => {
|
|
|
49483
49499
|
g.forEach((B) => {
|
|
49484
49500
|
var V;
|
|
49485
49501
|
const j = v(B), N = R(B).map((E) => {
|
|
49486
|
-
const
|
|
49502
|
+
const G = k(E, B);
|
|
49487
49503
|
return {
|
|
49488
49504
|
type: "group",
|
|
49489
49505
|
key: E,
|
|
49490
49506
|
label: l("Parent collection fields") + l(`(${v(E).title})`),
|
|
49491
|
-
children:
|
|
49507
|
+
children: G.filter((U) => !["hasOne", "hasMany", "belongsToMany"].includes(U == null ? void 0 : U.type)).map((U) => {
|
|
49492
49508
|
var H;
|
|
49493
49509
|
return {
|
|
49494
|
-
value:
|
|
49495
|
-
label: l((H =
|
|
49510
|
+
value: U.name,
|
|
49511
|
+
label: l((H = U.uiSchema) == null ? void 0 : H.title)
|
|
49496
49512
|
};
|
|
49497
49513
|
})
|
|
49498
49514
|
};
|
|
49499
49515
|
}), O = (V = j.fields.filter((E) => !["obo", "oho", "m2m", "o2m"].includes(E == null ? void 0 : E.interface))) == null ? void 0 : V.map((E) => {
|
|
49500
|
-
var
|
|
49501
|
-
return { value: E.name, key: E.name, label: l(((
|
|
49516
|
+
var G;
|
|
49517
|
+
return { value: E.name, key: E.name, label: l(((G = E.uiSchema) == null ? void 0 : G.title) || E.name) };
|
|
49502
49518
|
}).concat(N);
|
|
49503
49519
|
w.push({
|
|
49504
49520
|
value: B,
|
|
@@ -49514,12 +49530,12 @@ const getSchema$4 = (e, t, n) => {
|
|
|
49514
49530
|
const T = (j = Object.values((B = w == null ? void 0 : w.data) == null ? void 0 : B.fields)) == null ? void 0 : j.map((N) => {
|
|
49515
49531
|
var O, V;
|
|
49516
49532
|
if (N.source) {
|
|
49517
|
-
const E = (i == null ? void 0 : i.data.find((
|
|
49533
|
+
const E = (i == null ? void 0 : i.data.find((G) => G.name === N.name)) || N;
|
|
49518
49534
|
return P(x({}, N), {
|
|
49519
49535
|
uiSchema: P(x({}, omit(E.uiSchema, "rawTitle")), { title: ((O = E.uiSchema) == null ? void 0 : O.title) || E.name })
|
|
49520
49536
|
});
|
|
49521
49537
|
} else {
|
|
49522
|
-
const E = (i == null ? void 0 : i.data.find((
|
|
49538
|
+
const E = (i == null ? void 0 : i.data.find((G) => G.name === N.name)) || N;
|
|
49523
49539
|
return P(x({}, E), {
|
|
49524
49540
|
uiSchema: P(x({}, omit(E.uiSchema, "rawTitle")), { title: ((V = E.uiSchema) == null ? void 0 : V.title) || E.name })
|
|
49525
49541
|
});
|
|
@@ -49877,7 +49893,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
49877
49893
|
}, AsyncDataContext = createContext(null);
|
|
49878
49894
|
AsyncDataContext.displayName = "AsyncDataContext";
|
|
49879
49895
|
const AsyncDataProvider = (e) => {
|
|
49880
|
-
const a = e, { value: t, request: n, children: o } = a, r =
|
|
49896
|
+
const a = e, { value: t, request: n, children: o } = a, r = W(a, ["value", "request", "children"]), i = useRequest(n, x({}, r));
|
|
49881
49897
|
return t ? /* @__PURE__ */ jsx(AsyncDataContext.Provider, { value: t, children: o }) : /* @__PURE__ */ jsx(AsyncDataContext.Provider, { value: i, children: o });
|
|
49882
49898
|
}, 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 = () => {
|
|
49883
49899
|
const e = useForm(), { sources: t = [] } = e.values, { t: n } = useTranslation(), { getCollection: o, getInheritCollections: r, getParentCollectionFields: i } = useCollectionManager_deprecated(), a = [];
|
|
@@ -50339,7 +50355,7 @@ const AsyncDataProvider = (e) => {
|
|
|
50339
50355
|
}
|
|
50340
50356
|
};
|
|
50341
50357
|
}, DeleteCollectionAction = (e) => {
|
|
50342
|
-
const h = e, { scope: t, getContainer: n, item: o, children: r, isBulk: i, useAction: a } = h, l =
|
|
50358
|
+
const h = e, { scope: t, getContainer: n, item: o, children: r, isBulk: i, useAction: a } = h, l = W(h, ["scope", "getContainer", "item", "children", "isBulk", "useAction"]), { t: c } = useTranslation(), [u, d] = useState(!1), p = () => i ? useBulkDestroyActionAndRefreshCM : a || useDestroyActionAndRefreshCM, m = () => /* @__PURE__ */ jsxs("span", { children: [
|
|
50343
50359
|
/* @__PURE__ */ jsx(ExclamationCircleFilled, { style: { color: "#faad14", marginRight: "12px", fontSize: "22px" } }),
|
|
50344
50360
|
/* @__PURE__ */ jsx("span", { style: { fontSize: "19px" }, children: c("Delete collection") })
|
|
50345
50361
|
] });
|
|
@@ -54808,7 +54824,7 @@ const useBlockContext = () => useContext(BlockContext), useCompatDataBlockParent
|
|
|
54808
54824
|
};
|
|
54809
54825
|
return n.__collection && a && !["oho", "m2o", "obo"].includes(a.interface) && (u.targetCollection = n.__collection), !t && Object.keys(c).length > 0 && (u.filter = c), u;
|
|
54810
54826
|
}, RecordLink = (e) => {
|
|
54811
|
-
const t = useField(), n = useRecord(), l = e, { title: o, to: r } = l, i =
|
|
54827
|
+
const t = useField(), n = useRecord(), l = e, { title: o, to: r } = l, i = W(l, ["title", "to"]), a = template(r || "");
|
|
54812
54828
|
return /* @__PURE__ */ jsx(Link$1, P(x({}, i), { to: a({ record: n || {} }), children: t.title }));
|
|
54813
54829
|
}, ACLContext = createContext({});
|
|
54814
54830
|
ACLContext.displayName = "ACLContext";
|
|
@@ -54886,9 +54902,9 @@ const useACLCustomContext = () => useContext(ACLCustomContext), useACLRolesCheck
|
|
|
54886
54902
|
let o = !1;
|
|
54887
54903
|
return e.ignoreScope && (o = !0), t != null && t["x-acl-ignore-scope"] && (o = !0), (r = t == null ? void 0 : t["x-acl-action-props"]) != null && r.skipScopeCheck && (o = !0), n || (o = !0), o;
|
|
54888
54904
|
}, useAllowedActions = () => {
|
|
54889
|
-
var
|
|
54890
|
-
const e = useResourceActionContext();
|
|
54891
|
-
return (
|
|
54905
|
+
var n, o, r, i;
|
|
54906
|
+
const e = useResourceActionContext(), t = useDataBlockRequest();
|
|
54907
|
+
return ((o = (n = e == null ? void 0 : e.data) == null ? void 0 : n.meta) == null ? void 0 : o.allowedActions) || ((i = (r = t == null ? void 0 : t.data) == null ? void 0 : r.meta) == null ? void 0 : i.allowedActions);
|
|
54892
54908
|
}, useResourceName = () => {
|
|
54893
54909
|
var n;
|
|
54894
54910
|
const e = useResourceActionContext(), t = useDataBlockProps();
|
|
@@ -57781,7 +57797,7 @@ AppLangContext.displayName = "AppLangContext";
|
|
|
57781
57797
|
const useAppLangContext = () => useContext(AppLangContext);
|
|
57782
57798
|
function AntdConfigProvider(e) {
|
|
57783
57799
|
var c;
|
|
57784
|
-
const l = e, { remoteLocale: t } = l, n =
|
|
57800
|
+
const l = e, { remoteLocale: t } = l, n = W(l, ["remoteLocale"]), o = useAPIClient(), { i18n: r } = useTranslation(), { data: i, loading: a } = useRequest(
|
|
57785
57801
|
{
|
|
57786
57802
|
url: "app:getLang",
|
|
57787
57803
|
params: {
|
|
@@ -58906,7 +58922,7 @@ const ActionInitializerItem = (e) => {
|
|
|
58906
58922
|
};
|
|
58907
58923
|
}), { Panel } = Collapse, AssociationFilterItem = withDynamicSchemaProps(
|
|
58908
58924
|
(e) => {
|
|
58909
|
-
var E,
|
|
58925
|
+
var E, G, U, H;
|
|
58910
58926
|
const { wrapSSR: t, componentCls: n, hashId: o } = useStyles(), { token: r } = useToken(), i = AssociationFilter.useAssociationField(), a = useFieldSchema(), l = useDesigner(), c = useCompile(), {
|
|
58911
58927
|
list: u,
|
|
58912
58928
|
onSelected: d,
|
|
@@ -58921,7 +58937,7 @@ const ActionInitializerItem = (e) => {
|
|
|
58921
58937
|
} = useProps(e), [S, y] = useState(!1), v = useMemo(
|
|
58922
58938
|
() => b && (i != null && i.name) ? [i.name] : [],
|
|
58923
58939
|
[i == null ? void 0 : i.name, b]
|
|
58924
|
-
), F = f || (i == null ? void 0 : i.targetKey) || "id", I = C || ((
|
|
58940
|
+
), F = f || (i == null ? void 0 : i.targetKey) || "id", I = C || ((G = (E = a["x-component-props"]) == null ? void 0 : E.fieldNames) == null ? void 0 : G.label) || F, R = {
|
|
58925
58941
|
title: I || F,
|
|
58926
58942
|
key: F
|
|
58927
58943
|
}, [k, D] = useState([]), [M, z] = useState(a.default || []), [L, $] = useState(!0), w = useLabelUiSchema(i, (R == null ? void 0 : R.title) || "label");
|
|
@@ -58929,21 +58945,21 @@ const ActionInitializerItem = (e) => {
|
|
|
58929
58945
|
a.default && (d(a.default), z(a.default));
|
|
58930
58946
|
}, [a.default, d]), !i)
|
|
58931
58947
|
return null;
|
|
58932
|
-
const B = (
|
|
58933
|
-
D(
|
|
58934
|
-
}, j = (
|
|
58935
|
-
z(
|
|
58936
|
-
}, T = (
|
|
58948
|
+
const B = (K) => {
|
|
58949
|
+
D(K), $(!1);
|
|
58950
|
+
}, j = (K) => {
|
|
58951
|
+
z(K), d(K), p == null || p(K);
|
|
58952
|
+
}, T = (K) => {
|
|
58937
58953
|
var J;
|
|
58938
58954
|
const Y = (J = h == null ? void 0 : h[0]) == null ? void 0 : J.filter;
|
|
58939
58955
|
(S || Y) && g(P(x({}, h == null ? void 0 : h[0]), {
|
|
58940
58956
|
filter: void 0
|
|
58941
|
-
})), y(!S),
|
|
58942
|
-
}, N = (
|
|
58943
|
-
|
|
58944
|
-
}, O = (
|
|
58945
|
-
m(
|
|
58946
|
-
}, V = (H = a.title) != null ? H : (
|
|
58957
|
+
})), y(!S), K.stopPropagation();
|
|
58958
|
+
}, N = (K) => {
|
|
58959
|
+
K.stopPropagation();
|
|
58960
|
+
}, O = (K) => {
|
|
58961
|
+
m(K);
|
|
58962
|
+
}, V = (H = a.title) != null ? H : (U = i == null ? void 0 : i.uiSchema) == null ? void 0 : U.title;
|
|
58947
58963
|
return t(
|
|
58948
58964
|
/* @__PURE__ */ jsxs(SortableItem, { className: cls(n, o, "nb-block-item", e.className, "SortableItem"), children: [
|
|
58949
58965
|
/* @__PURE__ */ jsx(l, {}),
|
|
@@ -58993,7 +59009,7 @@ const ActionInitializerItem = (e) => {
|
|
|
58993
59009
|
treeData: u,
|
|
58994
59010
|
onSelect: j,
|
|
58995
59011
|
fieldNames: R,
|
|
58996
|
-
titleRender: (
|
|
59012
|
+
titleRender: (K) => /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: getLabelFormatValue(w, c(K[I])) }),
|
|
58997
59013
|
selectedKeys: M,
|
|
58998
59014
|
blockNode: !0
|
|
58999
59015
|
}
|
|
@@ -59210,7 +59226,7 @@ const AssociationFilterDesignerDelete = () => {
|
|
|
59210
59226
|
}
|
|
59211
59227
|
);
|
|
59212
59228
|
}, BlockInitializer = (e) => {
|
|
59213
|
-
const i = e, { item: t, schema: n } = i, o =
|
|
59229
|
+
const i = e, { item: t, schema: n } = i, o = W(i, ["item", "schema"]), { insert: r } = useSchemaInitializer();
|
|
59214
59230
|
return /* @__PURE__ */ jsx(
|
|
59215
59231
|
SchemaInitializerItem,
|
|
59216
59232
|
P(x({}, o), {
|
|
@@ -59222,7 +59238,7 @@ const AssociationFilterDesignerDelete = () => {
|
|
|
59222
59238
|
})
|
|
59223
59239
|
);
|
|
59224
59240
|
}, BlockItemInitializer = () => {
|
|
59225
|
-
const e = useSchemaInitializerItem(), o = e, { schema: t } = o, n =
|
|
59241
|
+
const e = useSchemaInitializerItem(), o = e, { schema: t } = o, n = W(o, ["schema"]);
|
|
59226
59242
|
return /* @__PURE__ */ jsx(BlockInitializer, P(x({}, n), { item: e }));
|
|
59227
59243
|
}, CreateFilterActionInitializer = (e) => {
|
|
59228
59244
|
const t = {
|
|
@@ -59532,7 +59548,7 @@ const DataBlockInitializer = (e) => {
|
|
|
59532
59548
|
}
|
|
59533
59549
|
};
|
|
59534
59550
|
}, RecordAssociationBlockInitializer = () => {
|
|
59535
|
-
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = p, r =
|
|
59551
|
+
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = p, r = W(p, ["onCreateBlockSchema", "componentType", "createBlockSchema"]), { insert: i } = useSchemaInitializer(), { getTemplateSchemaByMode: a } = useSchemaTemplateManager(), { getCollection: l } = useCollectionManager_deprecated(), c = e.field, u = l(c.target), d = `${c.collectionName}.${c.name}`;
|
|
59536
59552
|
return /* @__PURE__ */ jsx(
|
|
59537
59553
|
SchemaInitializerItem,
|
|
59538
59554
|
P(x({
|
|
@@ -59628,7 +59644,7 @@ function createDetailsWithPaginationUISchema(e) {
|
|
|
59628
59644
|
};
|
|
59629
59645
|
}
|
|
59630
59646
|
const RecordAssociationDetailsBlockInitializer = () => {
|
|
59631
|
-
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = p, r =
|
|
59647
|
+
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = p, r = W(p, ["onCreateBlockSchema", "componentType", "createBlockSchema"]), { insert: i } = useSchemaInitializer(), { getTemplateSchemaByMode: a } = useSchemaTemplateManager(), { getCollection: l } = useCollectionManager_deprecated(), c = e.field, u = l(c.target), d = `${c.collectionName}.${c.name}`;
|
|
59632
59648
|
return /* @__PURE__ */ jsx(
|
|
59633
59649
|
SchemaInitializerItem,
|
|
59634
59650
|
P(x({
|
|
@@ -59714,7 +59730,7 @@ function createCreateFormBlockUISchema(e) {
|
|
|
59714
59730
|
};
|
|
59715
59731
|
}
|
|
59716
59732
|
const RecordAssociationFormBlockInitializer = () => {
|
|
59717
|
-
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = p, r =
|
|
59733
|
+
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = p, r = W(p, ["onCreateBlockSchema", "componentType", "createBlockSchema"]), { insert: i } = useSchemaInitializer(), { getCollection: a } = useCollectionManager_deprecated(), { getTemplateSchemaByMode: l } = useSchemaTemplateManager(), c = e.field, u = c.target, d = useMemo(() => a(u), [u]);
|
|
59718
59734
|
return /* @__PURE__ */ jsx(
|
|
59719
59735
|
SchemaInitializerItem,
|
|
59720
59736
|
P(x({
|
|
@@ -59846,7 +59862,7 @@ const createGridCardBlockUISchema = (e) => {
|
|
|
59846
59862
|
}
|
|
59847
59863
|
};
|
|
59848
59864
|
}, RecordAssociationGridCardBlockInitializer = () => {
|
|
59849
|
-
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = p, r =
|
|
59865
|
+
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = p, r = W(p, ["onCreateBlockSchema", "componentType", "createBlockSchema"]), { insert: i } = useSchemaInitializer(), { getTemplateSchemaByMode: a } = useSchemaTemplateManager(), { getCollection: l } = useCollectionManager_deprecated(), c = e.field, u = l(c.target), d = `${c.collectionName}.${c.name}`;
|
|
59850
59866
|
return /* @__PURE__ */ jsx(
|
|
59851
59867
|
SchemaInitializerItem,
|
|
59852
59868
|
P(x({
|
|
@@ -59951,7 +59967,7 @@ const createListBlockUISchema = (e) => {
|
|
|
59951
59967
|
}
|
|
59952
59968
|
};
|
|
59953
59969
|
}, RecordAssociationListBlockInitializer = () => {
|
|
59954
|
-
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = p, r =
|
|
59970
|
+
const e = useSchemaInitializerItem(), p = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = p, r = W(p, ["onCreateBlockSchema", "componentType", "createBlockSchema"]), { insert: i } = useSchemaInitializer(), { getTemplateSchemaByMode: a } = useSchemaTemplateManager(), { getCollection: l } = useCollectionManager_deprecated(), c = e.field, u = l(c.target), d = `${c.collectionName}.${c.name}`;
|
|
59955
59971
|
return /* @__PURE__ */ jsx(
|
|
59956
59972
|
SchemaInitializerItem,
|
|
59957
59973
|
P(x({
|
|
@@ -60040,7 +60056,7 @@ function createDetailsUISchema(e) {
|
|
|
60040
60056
|
});
|
|
60041
60057
|
}
|
|
60042
60058
|
const RecordReadPrettyAssociationFormBlockInitializer = () => {
|
|
60043
|
-
const e = useSchemaInitializerItem(), m = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = m, r =
|
|
60059
|
+
const e = useSchemaInitializerItem(), m = e, { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = m, r = W(m, ["onCreateBlockSchema", "componentType", "createBlockSchema"]), { insert: i } = useSchemaInitializer(), { getCollection: a } = useCollectionManager_deprecated(), { getTemplateSchemaByMode: l } = useSchemaTemplateManager(), c = e.field, u = c.target, d = a(u), p = `${c.collectionName}.${c.name}`;
|
|
60044
60060
|
return /* @__PURE__ */ jsx(
|
|
60045
60061
|
SchemaInitializerItem,
|
|
60046
60062
|
P(x({
|
|
@@ -60720,7 +60736,7 @@ const SelectActionInitializer = (e) => {
|
|
|
60720
60736
|
}, commonOptions$i),
|
|
60721
60737
|
readPrettyFormItemInitializers_deprecated
|
|
60722
60738
|
), RecordReadPrettyFormBlockInitializer = () => {
|
|
60723
|
-
const l = useSchemaInitializerItem(), { icon: t = !0, targetCollection: n } = l, o =
|
|
60739
|
+
const l = useSchemaInitializerItem(), { icon: t = !0, targetCollection: n } = l, o = W(l, ["icon", "targetCollection"]), r = useCollection_deprecated(), i = n || r, { createSingleDetailsSchema: a } = useCreateSingleDetailsSchema();
|
|
60724
60740
|
return /* @__PURE__ */ jsx(
|
|
60725
60741
|
SchemaInitializerItem,
|
|
60726
60742
|
P(x({
|
|
@@ -60921,7 +60937,7 @@ function createEditFormBlockUISchema(e) {
|
|
|
60921
60937
|
});
|
|
60922
60938
|
}
|
|
60923
60939
|
const RecordFormBlockInitializer = () => {
|
|
60924
|
-
const u = useSchemaInitializerItem(), { targetCollection: t } = u, n =
|
|
60940
|
+
const u = useSchemaInitializerItem(), { targetCollection: t } = u, n = W(u, ["targetCollection"]), { insert: o } = useSchemaInitializer(), { getTemplateSchemaByMode: r } = useSchemaTemplateManager(), i = useCollection_deprecated(), a = t || i, { createEditFormBlock: l, templateWrap: c } = useCreateEditFormBlock();
|
|
60925
60941
|
return /* @__PURE__ */ jsx(
|
|
60926
60942
|
SchemaInitializerItem,
|
|
60927
60943
|
P(x({
|
|
@@ -61593,7 +61609,7 @@ const commonOptions$h = {
|
|
|
61593
61609
|
}
|
|
61594
61610
|
};
|
|
61595
61611
|
}, TableSelectorInitializer = () => {
|
|
61596
|
-
const l = useSchemaInitializerItem(), { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = l, r =
|
|
61612
|
+
const l = useSchemaInitializerItem(), { onCreateBlockSchema: t, componentType: n, createBlockSchema: o } = l, r = W(l, ["onCreateBlockSchema", "componentType", "createBlockSchema"]), { insert: i } = useSchemaInitializer(), a = useCollection_deprecated();
|
|
61597
61613
|
return /* @__PURE__ */ jsx(
|
|
61598
61614
|
SchemaInitializerItem,
|
|
61599
61615
|
P(x({
|
|
@@ -61618,7 +61634,7 @@ const commonOptions$h = {
|
|
|
61618
61634
|
{
|
|
61619
61635
|
title: e("Column width"),
|
|
61620
61636
|
component: React.forwardRef((r, i) => {
|
|
61621
|
-
const u = r, { children: a, onClick: l } = u, c =
|
|
61637
|
+
const u = r, { children: a, onClick: l } = u, c = W(u, ["children", "onClick"]);
|
|
61622
61638
|
return /* @__PURE__ */ jsx(
|
|
61623
61639
|
SchemaInitializerItem,
|
|
61624
61640
|
P(x({
|
|
@@ -62736,7 +62752,7 @@ const commonOptions$h = {
|
|
|
62736
62752
|
}, r = useSchemaInitializerItem();
|
|
62737
62753
|
return /* @__PURE__ */ jsx(BlockInitializer, P(x({}, r), { schema: o, item: r }));
|
|
62738
62754
|
}, useTableSelectorProps = () => {
|
|
62739
|
-
const { setSelectedRows: e } = useContext(RecordPickerContext), r = useTableSelectorProps$4(), { onRowSelectionChange: t, rowKey: n = "id" } = r, o =
|
|
62755
|
+
const { setSelectedRows: e } = useContext(RecordPickerContext), r = useTableSelectorProps$4(), { onRowSelectionChange: t, rowKey: n = "id" } = r, o = W(r, ["onRowSelectionChange", "rowKey"]);
|
|
62740
62756
|
return P(x({}, o), {
|
|
62741
62757
|
rowKey: n,
|
|
62742
62758
|
rowSelection: {
|