@nocobase/client 1.9.15 → 1.9.17
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 +1009 -888
- package/es/schema-component/antd/input/EllipsisWithTooltip.d.ts +1 -0
- package/es/schema-component/antd/remote-select/RemoteSelect.d.ts +1 -3
- package/lib/index.js +77 -70
- package/lib/locale/de-DE.json +1153 -849
- package/lib/locale/en-US.json +1152 -852
- package/lib/locale/es-ES.json +1184 -772
- package/lib/locale/fr-FR.json +1160 -792
- package/lib/locale/it-IT.json +1151 -1045
- package/lib/locale/ja-JP.json +1176 -1010
- package/lib/locale/ko-KR.json +1177 -890
- package/lib/locale/nl-NL.json +1210 -1071
- package/lib/locale/pt-BR.json +1243 -767
- package/lib/locale/ru-RU.json +1178 -597
- package/lib/locale/tr-TR.json +1169 -584
- package/lib/locale/uk-UA.json +1183 -796
- package/lib/locale/zh-CN.json +1152 -1135
- package/lib/locale/zh-TW.json +1157 -883
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -7213,8 +7213,8 @@ const collectFieldStateOfLinkageRules = ({
|
|
|
7213
7213
|
});
|
|
7214
7214
|
try {
|
|
7215
7215
|
return f(E, x({ now: () => (/* @__PURE__ */ new Date()).toString() }, z));
|
|
7216
|
-
} catch (
|
|
7217
|
-
console.error(
|
|
7216
|
+
} catch (V) {
|
|
7217
|
+
console.error(V);
|
|
7218
7218
|
}
|
|
7219
7219
|
} else
|
|
7220
7220
|
return (t == null ? void 0 : t.mode) === "constant" ? (A = t == null ? void 0 : t.value) != null ? A : t : null;
|
|
@@ -8857,7 +8857,7 @@ function addAppVersion(e, t) {
|
|
|
8857
8857
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
8858
8858
|
}), e;
|
|
8859
8859
|
}
|
|
8860
|
-
const name = "@nocobase/client", version = "1.9.
|
|
8860
|
+
const name = "@nocobase/client", version = "1.9.17", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
8861
8861
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
8862
8862
|
"@ant-design/cssinjs": "^1.11.1",
|
|
8863
8863
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -8878,9 +8878,9 @@ const name = "@nocobase/client", version = "1.9.15", license = "AGPL-3.0", main
|
|
|
8878
8878
|
"@formily/reactive-react": "^2.2.27",
|
|
8879
8879
|
"@formily/shared": "^2.2.27",
|
|
8880
8880
|
"@formily/validator": "^2.2.27",
|
|
8881
|
-
"@nocobase/evaluators": "1.9.
|
|
8882
|
-
"@nocobase/sdk": "1.9.
|
|
8883
|
-
"@nocobase/utils": "1.9.
|
|
8881
|
+
"@nocobase/evaluators": "1.9.17",
|
|
8882
|
+
"@nocobase/sdk": "1.9.17",
|
|
8883
|
+
"@nocobase/utils": "1.9.17",
|
|
8884
8884
|
ahooks: "^3.7.2",
|
|
8885
8885
|
antd: "5.24.2",
|
|
8886
8886
|
"antd-mobile": "^5.41.1",
|
|
@@ -10138,11 +10138,11 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10138
10138
|
${o.paddingSM}px;
|
|
10139
10139
|
}
|
|
10140
10140
|
`, [o.paddingContentVerticalLG, o.marginSM, o.margin]), b = useCollection(), S = useMemo(() => withTooltipComponent(NocoBaseRecursionField), []), y = useMemo(() => (d == null ? void 0 : d.map((D) => {
|
|
10141
|
-
var z,
|
|
10141
|
+
var z, V, L, G, H;
|
|
10142
10142
|
const B = D.reduceProperties((U, K) => {
|
|
10143
10143
|
if (isCollectionFieldComponent(K))
|
|
10144
10144
|
return U.concat([K]);
|
|
10145
|
-
}, []), N = (B == null ? void 0 : B.length) > 0 ? B[0].name : D.name, M = D["x-uid"] || D.name, j = !!((z = D["x-component-props"]) != null && z.columnHidden), R = ((
|
|
10145
|
+
}, []), N = (B == null ? void 0 : B.length) > 0 ? B[0].name : D.name, M = D["x-uid"] || D.name, j = !!((z = D["x-component-props"]) != null && z.columnHidden), R = ((V = D["x-component-props"]) == null ? void 0 : V.width) || 100, O = (L = D["x-component-props"]) == null ? void 0 : L.fixed, { uiSchema: $, defaultValue: A, interface: E } = (b == null ? void 0 : b.getField(N)) || {};
|
|
10146
10146
|
return D.title = n(D == null ? void 0 : D.title, { ns: NAMESPACE_UI_SCHEMA }), $ && ($.default = A), P(x({
|
|
10147
10147
|
title: /* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: g, children: /* @__PURE__ */ jsx(
|
|
10148
10148
|
S,
|
|
@@ -10540,7 +10540,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10540
10540
|
withSkeletonComponent(
|
|
10541
10541
|
observer$1((e) => {
|
|
10542
10542
|
var ye, ae;
|
|
10543
|
-
const { token: t } = useToken$1(),
|
|
10543
|
+
const { token: t } = useToken$1(), Ce = omit(e, ["onBlur", "onFocus"]), { pagination: n, useProps: o } = Ce, r = W(Ce, ["pagination", "useProps"]), fe = (o == null ? void 0 : o()) || {}, { pagination: a } = fe, i = W(fe, ["pagination"]), be = x(x({}, r), i), {
|
|
10544
10544
|
dragSort: l = !1,
|
|
10545
10545
|
showIndex: c = !0,
|
|
10546
10546
|
onRowSelectionChange: u,
|
|
@@ -10565,7 +10565,7 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10565
10565
|
"onClickRow",
|
|
10566
10566
|
"value"
|
|
10567
10567
|
]), y = useArrayField$1(S), v = useFieldSchema(), { size: I = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, F = useCollection(), T = ((ye = v == null ? void 0 : v.parent) == null ? void 0 : ye["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B, enableIndexColumn: N } = T, M = useMemoizedFn(S.onRowDragEnd || (() => {
|
|
10568
|
-
})), j = usePaginationProps$3(n, a, e), R = useTableColumns$3(S, j), [O, $] = useState(() => D ? B : []), [A, E] = useState(((ae = y == null ? void 0 : y.data) == null ? void 0 : ae.selectedRowKeys) || []), [z,
|
|
10568
|
+
})), j = usePaginationProps$3(n, a, e), R = useTableColumns$3(S, j), [O, $] = useState(() => D ? B : []), [A, E] = useState(((ae = y == null ? void 0 : y.data) == null ? void 0 : ae.selectedRowKeys) || []), [z, V] = useState([]), L = (p == null ? void 0 : p.type) !== "none", G = useRef(/* @__PURE__ */ new Map()), H = useMemo(() => css`
|
|
10569
10569
|
& > td {
|
|
10570
10570
|
background-color: ${t.controlItemBgActive} !important;
|
|
10571
10571
|
}
|
|
@@ -10574,180 +10574,180 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
10574
10574
|
}
|
|
10575
10575
|
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), U = useTableBlockContextBasicValue(), K = useRef(b);
|
|
10576
10576
|
K.current = b, useEffect(() => {
|
|
10577
|
-
var
|
|
10578
|
-
U != null && U.field && (U.field.data = ((
|
|
10577
|
+
var ee;
|
|
10578
|
+
U != null && U.field && (U.field.data = ((ee = U.field) == null ? void 0 : ee.data) || {}, U.field.data.clearSelectedRowKeys = () => {
|
|
10579
10579
|
U.field.data.selectedRowKeys = [], E([]);
|
|
10580
10580
|
}, U.field.data.setSelectedRowKeys = E);
|
|
10581
10581
|
}, [U == null ? void 0 : U.field]);
|
|
10582
|
-
const Y = useMemo(() => C ? H : "", [H, C]), X = useMemo(() => C ? (
|
|
10583
|
-
onClick: (
|
|
10584
|
-
isPortalInBody(
|
|
10582
|
+
const Y = useMemo(() => C ? H : "", [H, C]), X = useMemo(() => C ? (ee, oe) => ({
|
|
10583
|
+
onClick: (le) => {
|
|
10584
|
+
isPortalInBody(le.target) || C(ee, V, z);
|
|
10585
10585
|
},
|
|
10586
10586
|
rowIndex: oe,
|
|
10587
|
-
record:
|
|
10588
|
-
}) : (
|
|
10587
|
+
record: ee
|
|
10588
|
+
}) : (ee, oe) => ({
|
|
10589
10589
|
rowIndex: oe,
|
|
10590
|
-
record:
|
|
10590
|
+
record: ee
|
|
10591
10591
|
}), [C, z]);
|
|
10592
10592
|
useDeepCompareEffect(() => {
|
|
10593
|
-
const
|
|
10594
|
-
_.isEqual(
|
|
10593
|
+
const ee = D ? B : [];
|
|
10594
|
+
_.isEqual(ee, O) || $(ee);
|
|
10595
10595
|
}, [D, B]);
|
|
10596
|
-
const
|
|
10596
|
+
const J = useCallback((ee) => {
|
|
10597
10597
|
if (m)
|
|
10598
|
-
return ee
|
|
10599
|
-
if (
|
|
10600
|
-
return
|
|
10601
|
-
if (G.current.has(
|
|
10602
|
-
return G.current.get(
|
|
10598
|
+
return Z(ee);
|
|
10599
|
+
if (ee.key)
|
|
10600
|
+
return ee.key;
|
|
10601
|
+
if (G.current.has(ee))
|
|
10602
|
+
return G.current.get(ee);
|
|
10603
10603
|
const oe = uid();
|
|
10604
|
-
return G.current.set(
|
|
10605
|
-
}, []),
|
|
10606
|
-
(
|
|
10604
|
+
return G.current.set(ee, oe), oe;
|
|
10605
|
+
}, []), Z = useCallback(
|
|
10606
|
+
(ee) => {
|
|
10607
10607
|
var oe;
|
|
10608
|
-
return Array.isArray(m) ? m.map((
|
|
10609
|
-
var
|
|
10610
|
-
return ((
|
|
10611
|
-
}).join("-") : typeof m == "string" ?
|
|
10608
|
+
return Array.isArray(m) ? m.map((le) => {
|
|
10609
|
+
var me;
|
|
10610
|
+
return ((me = ee[le]) == null ? void 0 : me.toString()) || "";
|
|
10611
|
+
}).join("-") : typeof m == "string" ? ee[m] : (oe = (m != null ? m : J)(ee)) == null ? void 0 : oe.toString();
|
|
10612
10612
|
},
|
|
10613
|
-
[JSON.stringify(m),
|
|
10614
|
-
),
|
|
10615
|
-
const oe = useCallback((
|
|
10613
|
+
[JSON.stringify(m), J]
|
|
10614
|
+
), Q = useMemo(() => (Array.isArray(b) ? b : []).filter(Boolean), [b, b == null ? void 0 : b.length]), ne = useMemo(() => (ee) => {
|
|
10615
|
+
const oe = useCallback((le) => {
|
|
10616
10616
|
var ve, Pe, Fe, Ie, ke, De, je, Me;
|
|
10617
|
-
if (!
|
|
10617
|
+
if (!le.active || !le.over) {
|
|
10618
10618
|
console.warn("move cancel");
|
|
10619
10619
|
return;
|
|
10620
10620
|
}
|
|
10621
|
-
const
|
|
10622
|
-
y.move(
|
|
10621
|
+
const me = (Fe = (Pe = (ve = le.active) == null ? void 0 : ve.data.current) == null ? void 0 : Pe.sortable) == null ? void 0 : Fe.index, xe = (De = (ke = (Ie = le.over) == null ? void 0 : Ie.data.current) == null ? void 0 : ke.sortable) == null ? void 0 : De.index, Se = ((je = K.current) == null ? void 0 : je[me]) || le.active, Ae = ((Me = K.current) == null ? void 0 : Me[xe]) || le.over;
|
|
10622
|
+
y.move(me, xe), M({ from: Se, to: Ae });
|
|
10623
10623
|
}, []);
|
|
10624
|
-
return /* @__PURE__ */ jsx(DndContext, { onDragEnd: oe, children: /* @__PURE__ */ jsx("tbody", x({},
|
|
10624
|
+
return /* @__PURE__ */ jsx(DndContext, { onDragEnd: oe, children: /* @__PURE__ */ jsx("tbody", x({}, ee)) });
|
|
10625
10625
|
}, [y, M]);
|
|
10626
|
-
|
|
10626
|
+
ne.displayName = "BodyWrapperComponent";
|
|
10627
10627
|
const te = useMemo(() => ({
|
|
10628
10628
|
header: {
|
|
10629
10629
|
wrapper: HeaderWrapperComponent$1,
|
|
10630
10630
|
cell: HeaderCellComponent$1
|
|
10631
10631
|
},
|
|
10632
10632
|
body: {
|
|
10633
|
-
wrapper:
|
|
10633
|
+
wrapper: ne,
|
|
10634
10634
|
row: BodyRowComponent$1,
|
|
10635
10635
|
cell: BodyCellComponent$1
|
|
10636
10636
|
}
|
|
10637
|
-
}), [
|
|
10637
|
+
}), [ne]), se = useMemo(() => p, [JSON.stringify(p)]), ce = useMemo(
|
|
10638
10638
|
() => ({
|
|
10639
|
-
rowSelection: N !== !1 &&
|
|
10639
|
+
rowSelection: N !== !1 && se ? x({
|
|
10640
10640
|
type: "checkbox",
|
|
10641
10641
|
selectedRowKeys: A,
|
|
10642
|
-
onChange(
|
|
10643
|
-
y.data = y.data || {}, y.data.selectedRowKeys =
|
|
10642
|
+
onChange(ee, oe) {
|
|
10643
|
+
y.data = y.data || {}, y.data.selectedRowKeys = ee, y.data.selectedRowData = oe, E(ee), u == null || u(ee, oe, E);
|
|
10644
10644
|
},
|
|
10645
|
-
onSelect: (
|
|
10646
|
-
var
|
|
10647
|
-
U && (U.field.data = ((
|
|
10645
|
+
onSelect: (ee, oe, le, me) => {
|
|
10646
|
+
var xe;
|
|
10647
|
+
U && (U.field.data = ((xe = U.field) == null ? void 0 : xe.data) || {}, U.field.data.selectedRecord = ee, U.field.data.selected = oe);
|
|
10648
10648
|
},
|
|
10649
|
-
getCheckboxProps(
|
|
10649
|
+
getCheckboxProps(ee) {
|
|
10650
10650
|
return {
|
|
10651
10651
|
"aria-label": "checkbox"
|
|
10652
10652
|
};
|
|
10653
10653
|
},
|
|
10654
|
-
renderCell: (
|
|
10654
|
+
renderCell: (ee, oe, le, me) => {
|
|
10655
10655
|
if (!l && !c)
|
|
10656
|
-
return
|
|
10657
|
-
const
|
|
10658
|
-
return
|
|
10656
|
+
return me;
|
|
10657
|
+
const xe = j == null ? void 0 : j.current, Se = (j == null ? void 0 : j.pageSize) || 20;
|
|
10658
|
+
return xe ? le = le + (xe - 1) * Se + 1 : le = le + 1, oe.__index && (le = extractIndex(oe.__index)), /* @__PURE__ */ jsxs(
|
|
10659
10659
|
"div",
|
|
10660
10660
|
{
|
|
10661
10661
|
role: "button",
|
|
10662
|
-
"aria-label": `table-index-${
|
|
10663
|
-
className: cls(
|
|
10664
|
-
[rowSelectCheckboxWrapperClassHover$1]:
|
|
10662
|
+
"aria-label": `table-index-${le}`,
|
|
10663
|
+
className: cls(ee ? "checked" : null, rowSelectCheckboxWrapperClass$1, {
|
|
10664
|
+
[rowSelectCheckboxWrapperClassHover$1]: L
|
|
10665
10665
|
}),
|
|
10666
10666
|
children: [
|
|
10667
|
-
/* @__PURE__ */ jsxs("div", { className: cls(
|
|
10668
|
-
l && /* @__PURE__ */ jsx(SortHandle$2, { id:
|
|
10669
|
-
c && /* @__PURE__ */ jsx(TableIndex$3, { index:
|
|
10667
|
+
/* @__PURE__ */ jsxs("div", { className: cls(ee ? "checked" : null, rowSelectCheckboxContentClass$1), children: [
|
|
10668
|
+
l && /* @__PURE__ */ jsx(SortHandle$2, { id: Z(oe) }),
|
|
10669
|
+
c && /* @__PURE__ */ jsx(TableIndex$3, { index: le })
|
|
10670
10670
|
] }),
|
|
10671
|
-
|
|
10671
|
+
L && /* @__PURE__ */ jsx(
|
|
10672
10672
|
"div",
|
|
10673
10673
|
{
|
|
10674
10674
|
className: cls(
|
|
10675
10675
|
"nb-origin-node",
|
|
10676
|
-
|
|
10676
|
+
ee ? "checked" : null,
|
|
10677
10677
|
rowSelectCheckboxCheckedClassHover$1
|
|
10678
10678
|
),
|
|
10679
|
-
children:
|
|
10679
|
+
children: me
|
|
10680
10680
|
}
|
|
10681
10681
|
)
|
|
10682
10682
|
]
|
|
10683
10683
|
}
|
|
10684
10684
|
);
|
|
10685
10685
|
}
|
|
10686
|
-
},
|
|
10686
|
+
}, se) : void 0
|
|
10687
10687
|
}),
|
|
10688
10688
|
[
|
|
10689
|
-
|
|
10689
|
+
se,
|
|
10690
10690
|
A,
|
|
10691
10691
|
u,
|
|
10692
10692
|
c,
|
|
10693
10693
|
l,
|
|
10694
10694
|
y,
|
|
10695
|
-
|
|
10696
|
-
|
|
10697
|
-
|
|
10695
|
+
Z,
|
|
10696
|
+
L,
|
|
10697
|
+
se,
|
|
10698
10698
|
j,
|
|
10699
10699
|
U,
|
|
10700
10700
|
N
|
|
10701
10701
|
]
|
|
10702
|
-
),
|
|
10703
|
-
({ children:
|
|
10704
|
-
var oe,
|
|
10702
|
+
), ie = useCallback(
|
|
10703
|
+
({ children: ee }) => {
|
|
10704
|
+
var oe, le;
|
|
10705
10705
|
return l ? React.createElement(
|
|
10706
10706
|
SortableContext$1,
|
|
10707
10707
|
{
|
|
10708
|
-
items: ((
|
|
10708
|
+
items: ((le = (oe = K.current) == null ? void 0 : oe.map) == null ? void 0 : le.call(oe, Z)) || []
|
|
10709
10709
|
},
|
|
10710
|
-
|
|
10711
|
-
) : React.createElement(React.Fragment, {},
|
|
10710
|
+
ee
|
|
10711
|
+
) : React.createElement(React.Fragment, {}, ee);
|
|
10712
10712
|
},
|
|
10713
|
-
[l,
|
|
10713
|
+
[l, Z]
|
|
10714
10714
|
// Don't put 'value' in dependencies, otherwise it will cause the dropdown component to disappear immediately when adding association fields to the table
|
|
10715
|
-
), { height:
|
|
10715
|
+
), { height: re, tableSizeRefCallback: de } = useTableSize(), pe = useMemo(() => ({
|
|
10716
10716
|
x: "max-content",
|
|
10717
|
-
y:
|
|
10718
|
-
}), [
|
|
10719
|
-
(
|
|
10717
|
+
y: re
|
|
10718
|
+
}), [re, Q]), ue = useCallback(
|
|
10719
|
+
(ee) => z.includes(ee[m]) ? Y : "",
|
|
10720
10720
|
[z, Y, JSON.stringify(m)]
|
|
10721
|
-
),
|
|
10722
|
-
(
|
|
10723
|
-
const
|
|
10724
|
-
$(
|
|
10721
|
+
), ge = useCallback(
|
|
10722
|
+
(ee, oe) => {
|
|
10723
|
+
const le = ee ? [...O, oe[F.getPrimaryKey()]] : O.filter((me) => oe[F.getPrimaryKey()] !== me);
|
|
10724
|
+
$(le), g == null || g(ee, oe);
|
|
10725
10725
|
},
|
|
10726
10726
|
[O, g, F]
|
|
10727
|
-
),
|
|
10728
|
-
onExpand:
|
|
10727
|
+
), he = useMemo(() => ({
|
|
10728
|
+
onExpand: ge,
|
|
10729
10729
|
expandedRowKeys: O
|
|
10730
|
-
}), [O,
|
|
10730
|
+
}), [O, ge]);
|
|
10731
10731
|
return (
|
|
10732
10732
|
// If spinning is set to undefined, it will cause the subtable to always display loading, so we need to convert it here.
|
|
10733
10733
|
// We use Spin here instead of Table's loading prop because using Spin here reduces unnecessary re-renders.
|
|
10734
10734
|
/* @__PURE__ */ jsx(HighPerformanceSpin, { spinning: !!f, children: /* @__PURE__ */ jsx(BlockRequestLoadingContext.Provider, { value: !1, children: /* @__PURE__ */ jsx(
|
|
10735
10735
|
InternalNocoBaseTable$1,
|
|
10736
10736
|
P(x(x({
|
|
10737
|
-
tableHeight:
|
|
10738
|
-
SortableWrapper:
|
|
10739
|
-
tableSizeRefCallback:
|
|
10740
|
-
defaultRowKey:
|
|
10741
|
-
dataSource:
|
|
10742
|
-
}, S),
|
|
10737
|
+
tableHeight: re,
|
|
10738
|
+
SortableWrapper: ie,
|
|
10739
|
+
tableSizeRefCallback: de,
|
|
10740
|
+
defaultRowKey: J,
|
|
10741
|
+
dataSource: Q
|
|
10742
|
+
}, S), ce), {
|
|
10743
10743
|
paginationProps: j,
|
|
10744
10744
|
components: te,
|
|
10745
10745
|
onTableChange: d,
|
|
10746
10746
|
onRow: X,
|
|
10747
|
-
rowClassName:
|
|
10748
|
-
scroll:
|
|
10747
|
+
rowClassName: ue,
|
|
10748
|
+
scroll: pe,
|
|
10749
10749
|
columns: R,
|
|
10750
|
-
expandable:
|
|
10750
|
+
expandable: he,
|
|
10751
10751
|
field: y,
|
|
10752
10752
|
size: I
|
|
10753
10753
|
})
|
|
@@ -10981,40 +10981,40 @@ const InternalTableBlockProvider = (e) => {
|
|
|
10981
10981
|
[t, p]
|
|
10982
10982
|
), F = useCallback(
|
|
10983
10983
|
(R, O, $, A) => {
|
|
10984
|
-
var
|
|
10984
|
+
var Z;
|
|
10985
10985
|
const {
|
|
10986
10986
|
association: E = !1,
|
|
10987
10987
|
cached: z = {},
|
|
10988
|
-
collectionNames:
|
|
10989
|
-
maxDepth:
|
|
10988
|
+
collectionNames: V = [R],
|
|
10989
|
+
maxDepth: L = 1,
|
|
10990
10990
|
allowAllTypes: G = !1,
|
|
10991
10991
|
exceptInterfaces: H = [],
|
|
10992
10992
|
prefixFieldValue: U = "",
|
|
10993
10993
|
usePrefix: K = !1,
|
|
10994
10994
|
dataSource: Y
|
|
10995
10995
|
} = A || {};
|
|
10996
|
-
if (
|
|
10996
|
+
if (V.length - 1 > L)
|
|
10997
10997
|
return;
|
|
10998
10998
|
if (z[R])
|
|
10999
10999
|
return _.cloneDeep(z[R]);
|
|
11000
11000
|
O && typeof O == "string" && (O = [O]), $ && typeof $ == "string" && ($ = [$]);
|
|
11001
|
-
const X = b(R, Y),
|
|
11002
|
-
(
|
|
11003
|
-
)) == null ? void 0 :
|
|
11004
|
-
var te,
|
|
11005
|
-
const
|
|
11006
|
-
value: K && U ? `${U}.${
|
|
11007
|
-
label: f((te =
|
|
11008
|
-
},
|
|
11009
|
-
return E &&
|
|
11001
|
+
const X = b(R, Y), J = (Z = X == null ? void 0 : X.filter(
|
|
11002
|
+
(Q) => Q.interface && !H.includes(Q.interface) && (G || O && O.includes(Q.type) || $ && $.includes(Q.interface) || (E && Q.target && Q.target !== R && Array.isArray(E) ? E.includes(Q.interface) : !1))
|
|
11003
|
+
)) == null ? void 0 : Z.map((Q) => {
|
|
11004
|
+
var te, se;
|
|
11005
|
+
const ne = x({
|
|
11006
|
+
value: K && U ? `${U}.${Q.name}` : Q.name,
|
|
11007
|
+
label: f((te = Q == null ? void 0 : Q.uiSchema) == null ? void 0 : te.title) || Q.name
|
|
11008
|
+
}, Q);
|
|
11009
|
+
return E && Q.target && (ne.children = V.includes(Q.target) ? [] : F(Q.target, O, $, P(x({}, A), {
|
|
11010
11010
|
cached: z,
|
|
11011
11011
|
dataSource: Y,
|
|
11012
|
-
collectionNames: [...
|
|
11013
|
-
prefixFieldValue: K ? U ? `${U}.${
|
|
11012
|
+
collectionNames: [...V, Q.target],
|
|
11013
|
+
prefixFieldValue: K ? U ? `${U}.${Q.name}` : Q.name : "",
|
|
11014
11014
|
usePrefix: K
|
|
11015
|
-
})), !((
|
|
11015
|
+
})), !((se = ne.children) != null && se.length)) ? null : ne;
|
|
11016
11016
|
}).filter(Boolean);
|
|
11017
|
-
return z[R] =
|
|
11017
|
+
return z[R] = J, J;
|
|
11018
11018
|
},
|
|
11019
11019
|
[b]
|
|
11020
11020
|
), w = useCallback(
|
|
@@ -11290,12 +11290,12 @@ const popupsContextStorage = {}, defaultPopupsContextStorage = {}, getStoredPopu
|
|
|
11290
11290
|
collection: E,
|
|
11291
11291
|
puid: z
|
|
11292
11292
|
}) => {
|
|
11293
|
-
const
|
|
11293
|
+
const V = c.getFilterByTK(u || l, $);
|
|
11294
11294
|
return getPopupPathFromParams({
|
|
11295
11295
|
popupuid: O,
|
|
11296
11296
|
puid: z,
|
|
11297
11297
|
collection: E,
|
|
11298
|
-
filterbytk:
|
|
11298
|
+
filterbytk: V,
|
|
11299
11299
|
sourceid: A,
|
|
11300
11300
|
tab: R
|
|
11301
11301
|
});
|
|
@@ -11318,17 +11318,17 @@ const popupsContextStorage = {}, defaultPopupsContextStorage = {}, getStoredPopu
|
|
|
11318
11318
|
} = {}) => {
|
|
11319
11319
|
if (!f())
|
|
11320
11320
|
return F == null ? void 0 : F(!0);
|
|
11321
|
-
const z = E || o,
|
|
11321
|
+
const z = E || o, V = z == null ? void 0 : z["x-uid"], L = y(O);
|
|
11322
11322
|
R = R || (a == null ? void 0 : a.data);
|
|
11323
11323
|
const G = w({
|
|
11324
|
-
popupUid:
|
|
11324
|
+
popupUid: V,
|
|
11325
11325
|
recordData: R,
|
|
11326
|
-
sourceId:
|
|
11326
|
+
sourceId: L,
|
|
11327
11327
|
collection: $,
|
|
11328
11328
|
puid: A
|
|
11329
11329
|
});
|
|
11330
11330
|
let H = n.pathname;
|
|
11331
|
-
if (_.last(H) === "/" && (H = H.slice(0, -1)), storePopupContext(
|
|
11331
|
+
if (_.last(H) === "/" && (H = H.slice(0, -1)), storePopupContext(V, {
|
|
11332
11332
|
schema: z,
|
|
11333
11333
|
record: new CollectionRecord({ isNew: !1, data: R }),
|
|
11334
11334
|
parentRecord: O ? new CollectionRecord({ isNew: !1, data: O }) : i,
|
|
@@ -11336,7 +11336,7 @@ const popupsContextStorage = {}, defaultPopupsContextStorage = {}, getStoredPopu
|
|
|
11336
11336
|
dataSource: r,
|
|
11337
11337
|
collection: l == null ? void 0 : l.name,
|
|
11338
11338
|
association: u,
|
|
11339
|
-
sourceId:
|
|
11339
|
+
sourceId: L,
|
|
11340
11340
|
tableBlockContext: P(x({}, I), { collection: l == null ? void 0 : l.name, blockData: v })
|
|
11341
11341
|
}), b(T(), E), z.properties) {
|
|
11342
11342
|
const U = h + 1;
|
|
@@ -14089,13 +14089,13 @@ const ParentCollectionProvider = (e) => {
|
|
|
14089
14089
|
record: i
|
|
14090
14090
|
}) => {
|
|
14091
14091
|
var E, z;
|
|
14092
|
-
const l = useApp(), c = ((E = l == null ? void 0 : l.getVariables) == null ? void 0 : E.call(l).map((
|
|
14093
|
-
const { visible:
|
|
14092
|
+
const l = useApp(), c = ((E = l == null ? void 0 : l.getVariables) == null ? void 0 : E.call(l).map((V) => {
|
|
14093
|
+
const { visible: L = !0, option: G } = V.useOption();
|
|
14094
14094
|
return {
|
|
14095
|
-
visible:
|
|
14095
|
+
visible: L,
|
|
14096
14096
|
option: G
|
|
14097
14097
|
};
|
|
14098
|
-
}).filter(({ visible:
|
|
14098
|
+
}).filter(({ visible: V }) => V)) || [], { filterVariables: u = () => !0 } = useVariables$1() || {}, d = (z = i == null ? void 0 : i.__parent) == null ? void 0 : z.__collectionName, { currentUserSettings: p } = useCurrentUserVariable({
|
|
14099
14099
|
maxDepth: 3,
|
|
14100
14100
|
uiSchema: n,
|
|
14101
14101
|
collectionField: e,
|
|
@@ -14182,7 +14182,7 @@ const ParentCollectionProvider = (e) => {
|
|
|
14182
14182
|
D,
|
|
14183
14183
|
$,
|
|
14184
14184
|
O
|
|
14185
|
-
]), ...c.map(({ option:
|
|
14185
|
+
]), ...c.map(({ option: V }) => V)];
|
|
14186
14186
|
}, VariableInput = (e) => {
|
|
14187
14187
|
const {
|
|
14188
14188
|
value: t,
|
|
@@ -14566,7 +14566,7 @@ const getActionContext = (e) => {
|
|
|
14566
14566
|
var n;
|
|
14567
14567
|
return ((n = e.fieldSchema) == null ? void 0 : n["x-action-context"]) || {};
|
|
14568
14568
|
}, SchemaSettingsDefaultValue = function(t) {
|
|
14569
|
-
var E, z,
|
|
14569
|
+
var E, z, V;
|
|
14570
14570
|
const n = useFieldSchema(), o = (E = t == null ? void 0 : t.fieldSchema) != null ? E : n, r = useField(), { dn: a } = useDesignable(), { t: i } = useTranslation(), l = useActionContext(), c = getActionContext(l).collection;
|
|
14571
14571
|
let u;
|
|
14572
14572
|
const { getField: d } = useCollection_deprecated(), { getCollectionJoinField: p, getCollectionFields: m, getAllCollectionsInheritChain: h } = useCollectionManager_deprecated(), g = useVariables$1(), f = useLocalVariables$1(), C = useCollection_deprecated(), b = useRecord(), { form: S, type: y } = useFormBlockContext(), { getFields: v } = useCollectionFilterOptionsV2(C), { isInSubForm: I, isInSubTable: F } = useFlag() || {}, { name: w } = C, T = useMemo(
|
|
@@ -14574,21 +14574,21 @@ const getActionContext = (e) => {
|
|
|
14574
14574
|
[o, p, d]
|
|
14575
14575
|
), D = _.omit(o, "required");
|
|
14576
14576
|
T != null && T.target && (u = p(
|
|
14577
|
-
`${T.target}.${((
|
|
14577
|
+
`${T.target}.${((V = (z = o["x-component-props"]) == null ? void 0 : z.fieldNames) == null ? void 0 : V.label) || "id"}`
|
|
14578
14578
|
));
|
|
14579
14579
|
const B = (T == null ? void 0 : T.interface) === "m2o" && findParentFieldSchema(o), N = B && p(B == null ? void 0 : B["x-collection-field"]), M = useTableBlockContext(), j = (T == null ? void 0 : T.interface) === "m2m" || (T == null ? void 0 : T.interface) === "mbm" || (N == null ? void 0 : N.type) === "hasMany" && (T == null ? void 0 : T.interface) === "m2o", R = useCallback(
|
|
14580
|
-
(
|
|
14581
|
-
const G =
|
|
14582
|
-
return !(H != null && H.length) && G && (G.children = formatVariableScop(v())),
|
|
14580
|
+
(L) => {
|
|
14581
|
+
const G = L.find((U) => U.value === "$nForm"), H = m(w);
|
|
14582
|
+
return !(H != null && H.length) && G && (G.children = formatVariableScop(v())), L;
|
|
14583
14583
|
},
|
|
14584
14584
|
[v, w]
|
|
14585
14585
|
), O = useMemo(() => ({
|
|
14586
14586
|
ArrayCollapse: ArrayCollapse$2,
|
|
14587
14587
|
FormLayout,
|
|
14588
|
-
VariableInput: (
|
|
14588
|
+
VariableInput: (L) => /* @__PURE__ */ jsx(SchemaComponentContext.Provider, { value: { designable: !1 }, children: /* @__PURE__ */ jsx(
|
|
14589
14589
|
VariableInput,
|
|
14590
|
-
P(x({},
|
|
14591
|
-
value:
|
|
14590
|
+
P(x({}, L), {
|
|
14591
|
+
value: L.value || void 0,
|
|
14592
14592
|
hideVariableButton: t == null ? void 0 : t.hideVariableButton
|
|
14593
14593
|
})
|
|
14594
14594
|
) })
|
|
@@ -14661,12 +14661,12 @@ const getActionContext = (e) => {
|
|
|
14661
14661
|
u,
|
|
14662
14662
|
g
|
|
14663
14663
|
]), A = useCallback(
|
|
14664
|
-
(
|
|
14664
|
+
(L) => {
|
|
14665
14665
|
var H, U, K;
|
|
14666
14666
|
const G = {
|
|
14667
14667
|
"x-uid": o["x-uid"]
|
|
14668
14668
|
};
|
|
14669
|
-
o.default = (H =
|
|
14669
|
+
o.default = (H = L.default) != null ? H : null, isVariable$1(L.default) || (b.__isNewRecord__ || y === "create") && ((U = r.setInitialValue) == null || U.call(r, L.default)), G.default = (K = L.default) != null ? K : null, a.emit("patch", {
|
|
14670
14670
|
schema: G,
|
|
14671
14671
|
currentSchema: n
|
|
14672
14672
|
});
|
|
@@ -14681,14 +14681,14 @@ const getActionContext = (e) => {
|
|
|
14681
14681
|
width: 800,
|
|
14682
14682
|
schema: $,
|
|
14683
14683
|
onSubmit: A,
|
|
14684
|
-
ModalContextProvider: (
|
|
14684
|
+
ModalContextProvider: (L) => /* @__PURE__ */ jsx(
|
|
14685
14685
|
FlagProvider,
|
|
14686
14686
|
{
|
|
14687
14687
|
isInSubForm: I,
|
|
14688
14688
|
isInSubTable: F,
|
|
14689
14689
|
isInSetDefaultValueDialog: !0,
|
|
14690
14690
|
collectionField: T,
|
|
14691
|
-
children:
|
|
14691
|
+
children: L.children
|
|
14692
14692
|
}
|
|
14693
14693
|
)
|
|
14694
14694
|
}
|
|
@@ -15550,7 +15550,7 @@ const useGetFilterOptions = () => {
|
|
|
15550
15550
|
};
|
|
15551
15551
|
});
|
|
15552
15552
|
}, TableColumnDesigner$1 = (e) => {
|
|
15553
|
-
var N, M, j, R, O, $, A, E, z,
|
|
15553
|
+
var N, M, j, R, O, $, A, E, z, V, L, G;
|
|
15554
15554
|
const { uiSchema: t, fieldSchema: n, collectionField: o } = e, { form: r } = useFormBlockContext(), { getInterface: a, getCollection: i } = useCollectionManager_deprecated(), l = useField(), { t: c } = useTranslation(), u = useFieldSchema(), { dn: d } = useDesignable(), p = ((N = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : N.fieldNames) || ((M = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : M.fieldNames), m = useLabelFields$1((j = o == null ? void 0 : o.target) != null ? j : o == null ? void 0 : o.targetCollection), h = useColorFields((R = o == null ? void 0 : o.target) != null ? R : o == null ? void 0 : o.targetCollection), g = a(o == null ? void 0 : o.interface), f = i(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), I = ["obo", "oho", "o2o", "o2m", "m2m", "m2o", "snapshot"].includes(
|
|
15555
15555
|
o == null ? void 0 : o.interface
|
|
15556
15556
|
), F = useFieldModeOptions({ fieldSchema: n }), w = ((O = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : O.mode) || "Select";
|
|
@@ -15619,7 +15619,7 @@ const useGetFilterOptions = () => {
|
|
|
15619
15619
|
title: c("Column width"),
|
|
15620
15620
|
properties: {
|
|
15621
15621
|
width: {
|
|
15622
|
-
default: ((
|
|
15622
|
+
default: ((V = u == null ? void 0 : u["x-component-props"]) == null ? void 0 : V.width) || 100,
|
|
15623
15623
|
"x-decorator": "FormItem",
|
|
15624
15624
|
"x-component": "InputNumber",
|
|
15625
15625
|
"x-component-props": {}
|
|
@@ -15662,7 +15662,7 @@ const useGetFilterOptions = () => {
|
|
|
15662
15662
|
SchemaSettingsSwitchItem,
|
|
15663
15663
|
{
|
|
15664
15664
|
title: c("Enable link"),
|
|
15665
|
-
checked: ((
|
|
15665
|
+
checked: ((L = n["x-component-props"]) == null ? void 0 : L.enableLink) !== !1,
|
|
15666
15666
|
onChange: (H) => {
|
|
15667
15667
|
n["x-component-props"] = P(x({}, n == null ? void 0 : n["x-component-props"]), {
|
|
15668
15668
|
enableLink: H
|
|
@@ -15684,14 +15684,14 @@ const useGetFilterOptions = () => {
|
|
|
15684
15684
|
options: m,
|
|
15685
15685
|
value: p == null ? void 0 : p.label,
|
|
15686
15686
|
onChange: (H) => {
|
|
15687
|
-
var Y, X,
|
|
15688
|
-
const U = P(x(x({}, (X = (Y = o == null ? void 0 : o.uiSchema) == null ? void 0 : Y["x-component-props"]) == null ? void 0 : X.fieldNames), (
|
|
15687
|
+
var Y, X, J, Z, Q;
|
|
15688
|
+
const U = P(x(x({}, (X = (Y = o == null ? void 0 : o.uiSchema) == null ? void 0 : Y["x-component-props"]) == null ? void 0 : X.fieldNames), (J = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : J.fieldNames), {
|
|
15689
15689
|
label: H
|
|
15690
15690
|
});
|
|
15691
15691
|
_.set(n, "x-component-props.fieldNames", U);
|
|
15692
|
-
const K = (
|
|
15693
|
-
l.form.query(`${K.concat("*." + n.name)}`).forEach((
|
|
15694
|
-
|
|
15692
|
+
const K = (Q = l.path) == null ? void 0 : Q.splice(((Z = l.path) == null ? void 0 : Z.length) - 1, 1);
|
|
15693
|
+
l.form.query(`${K.concat("*." + n.name)}`).forEach((ne) => {
|
|
15694
|
+
ne.componentProps.fieldNames = U;
|
|
15695
15695
|
}), d.emit("patch", {
|
|
15696
15696
|
schema: {
|
|
15697
15697
|
"x-uid": n["x-uid"],
|
|
@@ -15751,8 +15751,8 @@ const useGetFilterOptions = () => {
|
|
|
15751
15751
|
};
|
|
15752
15752
|
n.required = H, U.required = H;
|
|
15753
15753
|
const K = (X = l.path) == null ? void 0 : X.splice(((Y = l.path) == null ? void 0 : Y.length) - 1, 1);
|
|
15754
|
-
l.form.query(`${K.concat("*." + n.name)}`).forEach((
|
|
15755
|
-
|
|
15754
|
+
l.form.query(`${K.concat("*." + n.name)}`).forEach((J) => {
|
|
15755
|
+
J.required = H;
|
|
15756
15756
|
}), d.emit("patch", {
|
|
15757
15757
|
schema: U
|
|
15758
15758
|
}), d.refresh();
|
|
@@ -15777,20 +15777,20 @@ const useGetFilterOptions = () => {
|
|
|
15777
15777
|
}, K = (X = l.path) == null ? void 0 : X.splice(((Y = l.path) == null ? void 0 : Y.length) - 1, 1);
|
|
15778
15778
|
switch (H) {
|
|
15779
15779
|
case "readonly": {
|
|
15780
|
-
n["x-read-pretty"] = !1, n["x-disabled"] = !0, U["x-read-pretty"] = !1, U["x-disabled"] = !0, l.form.query(`${K.concat("*." + n.name)}`).forEach((
|
|
15781
|
-
|
|
15780
|
+
n["x-read-pretty"] = !1, n["x-disabled"] = !0, U["x-read-pretty"] = !1, U["x-disabled"] = !0, l.form.query(`${K.concat("*." + n.name)}`).forEach((J) => {
|
|
15781
|
+
J.readonly = !0, J.disabled = !0;
|
|
15782
15782
|
});
|
|
15783
15783
|
break;
|
|
15784
15784
|
}
|
|
15785
15785
|
case "read-pretty": {
|
|
15786
|
-
n["x-read-pretty"] = !0, n["x-disabled"] = !1, U["x-read-pretty"] = !0, U["x-disabled"] = !1, l.form.query(`${K.concat("*." + n.name)}`).forEach((
|
|
15787
|
-
|
|
15786
|
+
n["x-read-pretty"] = !0, n["x-disabled"] = !1, U["x-read-pretty"] = !0, U["x-disabled"] = !1, l.form.query(`${K.concat("*." + n.name)}`).forEach((J) => {
|
|
15787
|
+
J.readPretty = !0;
|
|
15788
15788
|
});
|
|
15789
15789
|
break;
|
|
15790
15790
|
}
|
|
15791
15791
|
default: {
|
|
15792
|
-
n["x-read-pretty"] = !1, n["x-disabled"] = !1, U["x-read-pretty"] = !1, U["x-disabled"] = !1, l.form.query(`${K.concat("*." + n.name)}`).forEach((
|
|
15793
|
-
|
|
15792
|
+
n["x-read-pretty"] = !1, n["x-disabled"] = !1, U["x-read-pretty"] = !1, U["x-disabled"] = !1, l.form.query(`${K.concat("*." + n.name)}`).forEach((J) => {
|
|
15793
|
+
J.readPretty = !1, J.disabled + !1;
|
|
15794
15794
|
});
|
|
15795
15795
|
break;
|
|
15796
15796
|
}
|
|
@@ -18220,16 +18220,16 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
18220
18220
|
return {
|
|
18221
18221
|
insertPosition: "afterEnd",
|
|
18222
18222
|
wrap: ((X = A == null ? void 0 : A.cols) == null ? void 0 : X.length) === 1 ? gridRowColWrap : void 0,
|
|
18223
|
-
Component: (
|
|
18223
|
+
Component: (J) => /* @__PURE__ */ jsx(
|
|
18224
18224
|
PlusOutlined,
|
|
18225
|
-
P(x({},
|
|
18225
|
+
P(x({}, J), {
|
|
18226
18226
|
role: "button",
|
|
18227
18227
|
"aria-label": v("schema-initializer"),
|
|
18228
18228
|
style: { cursor: "pointer", fontSize: 14 }
|
|
18229
18229
|
})
|
|
18230
18230
|
)
|
|
18231
18231
|
};
|
|
18232
|
-
}, [v, (Y = A == null ? void 0 : A.cols) == null ? void 0 : Y.length]),
|
|
18232
|
+
}, [v, (Y = A == null ? void 0 : A.cols) == null ? void 0 : Y.length]), V = useMemo(() => u === !1 || C === !1 ? null : /* @__PURE__ */ jsx(DragHandler, { children: /* @__PURE__ */ jsx(DragOutlined, { role: "button", "aria-label": v("drag-handler") }) }), [u, v, C]), L = useMemo(() => {
|
|
18233
18233
|
var X;
|
|
18234
18234
|
if (o === !1)
|
|
18235
18235
|
return null;
|
|
@@ -18240,22 +18240,22 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
18240
18240
|
}, [E, o, z, $, O]), G = useMemo(() => r !== !1 && R ? j() : null, [R, j, r]), H = useRef(null), U = "hidden";
|
|
18241
18241
|
useEffect(() => {
|
|
18242
18242
|
const X = H.current;
|
|
18243
|
-
let
|
|
18244
|
-
for (;
|
|
18245
|
-
|
|
18246
|
-
const
|
|
18247
|
-
if (!
|
|
18243
|
+
let J = X == null ? void 0 : X.parentElement;
|
|
18244
|
+
for (; J && J.clientHeight === 0; )
|
|
18245
|
+
J = J.parentElement;
|
|
18246
|
+
const Z = g || J;
|
|
18247
|
+
if (!Z)
|
|
18248
18248
|
return;
|
|
18249
|
-
function
|
|
18249
|
+
function Q() {
|
|
18250
18250
|
var te;
|
|
18251
18251
|
X && (X.classList.remove(U), (te = e.onVisibleChange) == null || te.call(e, !0));
|
|
18252
18252
|
}
|
|
18253
|
-
function
|
|
18253
|
+
function ne() {
|
|
18254
18254
|
var te;
|
|
18255
18255
|
X && (X.classList.add(U), (te = e.onVisibleChange) == null || te.call(e, !1));
|
|
18256
18256
|
}
|
|
18257
|
-
return
|
|
18258
|
-
|
|
18257
|
+
return Z.addEventListener("mouseenter", Q), Z.addEventListener("mouseleave", ne), () => {
|
|
18258
|
+
Z.removeEventListener("mouseenter", Q), Z.removeEventListener("mouseleave", ne);
|
|
18259
18259
|
};
|
|
18260
18260
|
}, [e.onVisibleChange, g]);
|
|
18261
18261
|
const K = useMemo(
|
|
@@ -18277,8 +18277,8 @@ const useStyles$g = genStyleHook("nb-schema-toolbar", (e) => {
|
|
|
18277
18277
|
M[1] && /* @__PURE__ */ jsx("span", { className: "toolbar-title-tag", children: `${B.current}: ${`${M[1]}` || y("Untitled")}` })
|
|
18278
18278
|
] }) }),
|
|
18279
18279
|
/* @__PURE__ */ jsx("div", { className: cls("toolbar-icons", i), style: l, children: /* @__PURE__ */ jsxs(Space$1, { size: 3, align: "center", className: d, style: p, children: [
|
|
18280
|
-
|
|
18281
|
-
/* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: N, children:
|
|
18280
|
+
V,
|
|
18281
|
+
/* @__PURE__ */ jsx(RefreshComponentProvider, { refresh: N, children: L }),
|
|
18282
18282
|
G
|
|
18283
18283
|
] }) })
|
|
18284
18284
|
]
|
|
@@ -19010,7 +19010,7 @@ const useTableBlockProps = () => {
|
|
|
19010
19010
|
const T = w.find((D) => D.uid === t.parent["x-uid"]);
|
|
19011
19011
|
w.forEach((D) => {
|
|
19012
19012
|
var $, A, E, z;
|
|
19013
|
-
const B = I.find((
|
|
19013
|
+
const B = I.find((V) => V.uid === D.uid);
|
|
19014
19014
|
if (!B)
|
|
19015
19015
|
return;
|
|
19016
19016
|
const N = getSourceKey(T, B.field) || a.rowKey || "id", M = [S[N]], j = (($ = D.service.params) == null ? void 0 : $[0]) || {}, R = ((E = (A = D.service.params) == null ? void 0 : A[1]) == null ? void 0 : E.filters) || {};
|
|
@@ -19029,7 +19029,7 @@ const useTableBlockProps = () => {
|
|
|
19029
19029
|
]
|
|
19030
19030
|
};
|
|
19031
19031
|
const O = mergeFilter([
|
|
19032
|
-
...Object.values(R).map((
|
|
19032
|
+
...Object.values(R).map((V) => removeNullCondition(V)),
|
|
19033
19033
|
D.defaultFilter
|
|
19034
19034
|
]);
|
|
19035
19035
|
return D.doFilter(
|
|
@@ -19394,8 +19394,8 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
|
|
|
19394
19394
|
return useEffect(() => {
|
|
19395
19395
|
var w, T, D, B, N, M, j, R, O, $, A, E, z;
|
|
19396
19396
|
if (!((w = t == null ? void 0 : t.service) != null && w.loading)) {
|
|
19397
|
-
const
|
|
19398
|
-
e.value =
|
|
19397
|
+
const V = (D = (T = t == null ? void 0 : t.service) == null ? void 0 : T.data) == null ? void 0 : D.data.map((L) => L);
|
|
19398
|
+
e.value = V, (B = e == null ? void 0 : e.setInitialValue) == null || B.call(e, V), e.data = e.data || {}, e.data.selectedRowKeys = [], e.componentProps.pagination = e.componentProps.pagination || {}, e.componentProps.pagination.pageSize = (j = (M = (N = t == null ? void 0 : t.service) == null ? void 0 : N.data) == null ? void 0 : M.meta) == null ? void 0 : j.pageSize, e.componentProps.pagination.total = ($ = (O = (R = t == null ? void 0 : t.service) == null ? void 0 : R.data) == null ? void 0 : O.meta) == null ? void 0 : $.count, e.componentProps.pagination.current = (z = (E = (A = t == null ? void 0 : t.service) == null ? void 0 : A.data) == null ? void 0 : E.meta) == null ? void 0 : z.page;
|
|
19399
19399
|
}
|
|
19400
19400
|
}, [
|
|
19401
19401
|
a == null ? void 0 : a.foreignKey,
|
|
@@ -20637,7 +20637,98 @@ const EnableChildCollections = withDynamicSchemaProps(
|
|
|
20637
20637
|
);
|
|
20638
20638
|
},
|
|
20639
20639
|
{ displayName: "ChildDynamicComponent" }
|
|
20640
|
-
),
|
|
20640
|
+
), DateScopeComponent = (e) => {
|
|
20641
|
+
var g, f, C, b, S, y, v, I, F, w, T, D, B, N;
|
|
20642
|
+
const t = useFieldSchema(), { getCollectionJoinField: n } = useCollectionManager_deprecated(), o = n(t == null ? void 0 : t["x-collection-field"]) || {}, r = ((g = o == null ? void 0 : o.uiSchema) == null ? void 0 : g["x-component-props"].gmt) || !1, a = ((f = o == null ? void 0 : o.uiSchema) == null ? void 0 : f["x-component-props"].utc) || !1, { form: i } = useFormBlockContext(), l = useRecord(), c = ((C = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : C.showTime) || ((S = (b = o == null ? void 0 : o.uiSchema) == null ? void 0 : b["x-component-props"]) == null ? void 0 : S.showTime) || !1, u = ((y = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : y.dateFormat) || ((I = (v = o == null ? void 0 : o.uiSchema) == null ? void 0 : v["x-component-props"]) == null ? void 0 : I.dateFormat) || "YYYY-MM-DD", d = ((F = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : F.timeFormat) || ((T = (w = o == null ? void 0 : o.uiSchema) == null ? void 0 : w["x-component-props"]) == null ? void 0 : T.timeFormat) || "HH:mm:ss", p = ((D = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : D.picker) || ((N = (B = o == null ? void 0 : o.uiSchema) == null ? void 0 : B["x-component-props"]) == null ? void 0 : N.picker) || "date", m = useCallback(
|
|
20643
|
+
(M) => /* @__PURE__ */ jsx(
|
|
20644
|
+
SchemaComponent,
|
|
20645
|
+
{
|
|
20646
|
+
schema: {
|
|
20647
|
+
"x-component": "DatePicker",
|
|
20648
|
+
"x-component-props": {
|
|
20649
|
+
dateFormat: u,
|
|
20650
|
+
timeFormat: d,
|
|
20651
|
+
gmt: r,
|
|
20652
|
+
utc: a,
|
|
20653
|
+
picker: p,
|
|
20654
|
+
showTime: c,
|
|
20655
|
+
placeholder: '{{t("Please select time or variable")}}',
|
|
20656
|
+
style: {
|
|
20657
|
+
minWidth: 250
|
|
20658
|
+
}
|
|
20659
|
+
},
|
|
20660
|
+
name: "value",
|
|
20661
|
+
"x-read-pretty": !1,
|
|
20662
|
+
"x-validator": void 0,
|
|
20663
|
+
"x-decorator": void 0
|
|
20664
|
+
}
|
|
20665
|
+
}
|
|
20666
|
+
),
|
|
20667
|
+
[u, r, p, c, d, a]
|
|
20668
|
+
), h = useCallback(
|
|
20669
|
+
(M) => /* @__PURE__ */ jsx(FlagProvider, { collectionField: o, children: /* @__PURE__ */ jsx(
|
|
20670
|
+
VariableInput,
|
|
20671
|
+
P(x({}, M), {
|
|
20672
|
+
form: i,
|
|
20673
|
+
record: l,
|
|
20674
|
+
noDisabled: !0,
|
|
20675
|
+
style: { minWidth: "250px" },
|
|
20676
|
+
renderSchemaComponent: m
|
|
20677
|
+
})
|
|
20678
|
+
) }),
|
|
20679
|
+
[t, i, l, m]
|
|
20680
|
+
);
|
|
20681
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
20682
|
+
SchemaComponent,
|
|
20683
|
+
{
|
|
20684
|
+
schema: {
|
|
20685
|
+
type: "object",
|
|
20686
|
+
"x-component": "FormLayout",
|
|
20687
|
+
"x-component-props": {
|
|
20688
|
+
layout: "horizontal",
|
|
20689
|
+
labelStyle: {
|
|
20690
|
+
marginTop: "6px"
|
|
20691
|
+
},
|
|
20692
|
+
labelCol: 2,
|
|
20693
|
+
wrapperCol: 24
|
|
20694
|
+
},
|
|
20695
|
+
properties: {
|
|
20696
|
+
_minDate: {
|
|
20697
|
+
type: "string",
|
|
20698
|
+
title: '{{t("Min")}}',
|
|
20699
|
+
"x-decorator": "FormItem",
|
|
20700
|
+
"x-decorator-props": {
|
|
20701
|
+
labelCol: 4,
|
|
20702
|
+
wrapperCol: 20,
|
|
20703
|
+
labelAlign: "left"
|
|
20704
|
+
},
|
|
20705
|
+
"x-component": h,
|
|
20706
|
+
"x-component-props": {
|
|
20707
|
+
name: "_minDate"
|
|
20708
|
+
}
|
|
20709
|
+
//日期和使用变量设置的默认值不同
|
|
20710
|
+
// default: isVariable(minDateDefaultValue) ? minDateDefaultValue : { value: minDateDefaultValue },
|
|
20711
|
+
},
|
|
20712
|
+
_maxDate: {
|
|
20713
|
+
type: "string",
|
|
20714
|
+
title: '{{t("Max")}}',
|
|
20715
|
+
"x-decorator": "FormItem",
|
|
20716
|
+
"x-decorator-props": {
|
|
20717
|
+
labelCol: 4,
|
|
20718
|
+
wrapperCol: 20,
|
|
20719
|
+
labelAlign: "left"
|
|
20720
|
+
},
|
|
20721
|
+
"x-component": h,
|
|
20722
|
+
"x-component-props": {
|
|
20723
|
+
name: "_maxDate"
|
|
20724
|
+
}
|
|
20725
|
+
// default: isVariable(maxDateDefaultValue) ? maxDateDefaultValue : { value: maxDateDefaultValue },
|
|
20726
|
+
}
|
|
20727
|
+
}
|
|
20728
|
+
}
|
|
20729
|
+
}
|
|
20730
|
+
) });
|
|
20731
|
+
}, RemoveActionContext = createContext(null);
|
|
20641
20732
|
RemoveActionContext.displayName = "RemoveActionContext";
|
|
20642
20733
|
const FilterContext$2 = createContext(null);
|
|
20643
20734
|
FilterContext$2.displayName = "FilterContext";
|
|
@@ -20682,6 +20773,25 @@ const DynamicComponent$1 = (e) => {
|
|
|
20682
20773
|
onChange: e == null ? void 0 : e.onChange,
|
|
20683
20774
|
renderSchemaComponent: a
|
|
20684
20775
|
}) : a() });
|
|
20776
|
+
}, OptionsComponent = (e) => {
|
|
20777
|
+
const { fieldValue: t, setValue: n, schema: o } = e, r = useCallback(
|
|
20778
|
+
(a) => {
|
|
20779
|
+
n({
|
|
20780
|
+
value: a
|
|
20781
|
+
});
|
|
20782
|
+
},
|
|
20783
|
+
[n]
|
|
20784
|
+
);
|
|
20785
|
+
return /* @__PURE__ */ jsx(
|
|
20786
|
+
Select$1,
|
|
20787
|
+
{
|
|
20788
|
+
style: { minWidth: 200, maxWidth: 500 },
|
|
20789
|
+
onChange: r,
|
|
20790
|
+
value: t == null ? void 0 : t.value,
|
|
20791
|
+
mode: "multiple",
|
|
20792
|
+
options: (o == null ? void 0 : o.enum) || []
|
|
20793
|
+
}
|
|
20794
|
+
);
|
|
20685
20795
|
}, { Option } = Select$1, ValueDynamicComponent = (e) => {
|
|
20686
20796
|
const { fieldValue: t, schema: n, setValue: o, collectionName: r, inputModes: a } = e, [i, l] = useState((t == null ? void 0 : t.mode) || "constant"), { t: c } = useTranslation(), { form: u } = useFormBlockContext(), d = useRecord(), p = useVariableOptions({
|
|
20687
20797
|
collectionField: { uiSchema: n },
|
|
@@ -20803,25 +20913,6 @@ const DynamicComponent$1 = (e) => {
|
|
|
20803
20913
|
),
|
|
20804
20914
|
y[i]
|
|
20805
20915
|
] });
|
|
20806
|
-
}, OptionsComponent = (e) => {
|
|
20807
|
-
const { fieldValue: t, setValue: n, schema: o } = e, r = useCallback(
|
|
20808
|
-
(a) => {
|
|
20809
|
-
n({
|
|
20810
|
-
value: a
|
|
20811
|
-
});
|
|
20812
|
-
},
|
|
20813
|
-
[n]
|
|
20814
|
-
);
|
|
20815
|
-
return /* @__PURE__ */ jsx(
|
|
20816
|
-
Select$1,
|
|
20817
|
-
{
|
|
20818
|
-
style: { minWidth: 200, maxWidth: 500 },
|
|
20819
|
-
onChange: r,
|
|
20820
|
-
value: t == null ? void 0 : t.value,
|
|
20821
|
-
mode: "multiple",
|
|
20822
|
-
options: (o == null ? void 0 : o.enum) || []
|
|
20823
|
-
}
|
|
20824
|
-
);
|
|
20825
20916
|
}, findOption$1 = (e = [], t) => {
|
|
20826
20917
|
var r;
|
|
20827
20918
|
let n = t, o;
|
|
@@ -20878,97 +20969,6 @@ const DynamicComponent$1 = (e) => {
|
|
|
20878
20969
|
t.data.value = r, t.value = P(x({}, t.value), { value: r });
|
|
20879
20970
|
}
|
|
20880
20971
|
});
|
|
20881
|
-
}, DateScopeComponent = (e) => {
|
|
20882
|
-
var g, f, C, b, S, y, v, I, F, w, T, D, B, N;
|
|
20883
|
-
const t = useFieldSchema(), { getCollectionJoinField: n } = useCollectionManager_deprecated(), o = n(t == null ? void 0 : t["x-collection-field"]) || {}, r = ((g = o == null ? void 0 : o.uiSchema) == null ? void 0 : g["x-component-props"].gmt) || !1, a = ((f = o == null ? void 0 : o.uiSchema) == null ? void 0 : f["x-component-props"].utc) || !1, { form: i } = useFormBlockContext(), l = useRecord(), c = ((C = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : C.showTime) || ((S = (b = o == null ? void 0 : o.uiSchema) == null ? void 0 : b["x-component-props"]) == null ? void 0 : S.showTime) || !1, u = ((y = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : y.dateFormat) || ((I = (v = o == null ? void 0 : o.uiSchema) == null ? void 0 : v["x-component-props"]) == null ? void 0 : I.dateFormat) || "YYYY-MM-DD", d = ((F = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : F.timeFormat) || ((T = (w = o == null ? void 0 : o.uiSchema) == null ? void 0 : w["x-component-props"]) == null ? void 0 : T.timeFormat) || "HH:mm:ss", p = ((D = t == null ? void 0 : t["x-component-props"]) == null ? void 0 : D.picker) || ((N = (B = o == null ? void 0 : o.uiSchema) == null ? void 0 : B["x-component-props"]) == null ? void 0 : N.picker) || "date", m = useCallback(
|
|
20884
|
-
(M) => /* @__PURE__ */ jsx(
|
|
20885
|
-
SchemaComponent,
|
|
20886
|
-
{
|
|
20887
|
-
schema: {
|
|
20888
|
-
"x-component": "DatePicker",
|
|
20889
|
-
"x-component-props": {
|
|
20890
|
-
dateFormat: u,
|
|
20891
|
-
timeFormat: d,
|
|
20892
|
-
gmt: r,
|
|
20893
|
-
utc: a,
|
|
20894
|
-
picker: p,
|
|
20895
|
-
showTime: c,
|
|
20896
|
-
placeholder: '{{t("Please select time or variable")}}',
|
|
20897
|
-
style: {
|
|
20898
|
-
minWidth: 250
|
|
20899
|
-
}
|
|
20900
|
-
},
|
|
20901
|
-
name: "value",
|
|
20902
|
-
"x-read-pretty": !1,
|
|
20903
|
-
"x-validator": void 0,
|
|
20904
|
-
"x-decorator": void 0
|
|
20905
|
-
}
|
|
20906
|
-
}
|
|
20907
|
-
),
|
|
20908
|
-
[u, r, p, c, d, a]
|
|
20909
|
-
), h = useCallback(
|
|
20910
|
-
(M) => /* @__PURE__ */ jsx(FlagProvider, { collectionField: o, children: /* @__PURE__ */ jsx(
|
|
20911
|
-
VariableInput,
|
|
20912
|
-
P(x({}, M), {
|
|
20913
|
-
form: i,
|
|
20914
|
-
record: l,
|
|
20915
|
-
noDisabled: !0,
|
|
20916
|
-
style: { minWidth: "250px" },
|
|
20917
|
-
renderSchemaComponent: m
|
|
20918
|
-
})
|
|
20919
|
-
) }),
|
|
20920
|
-
[t, i, l, m]
|
|
20921
|
-
);
|
|
20922
|
-
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
20923
|
-
SchemaComponent,
|
|
20924
|
-
{
|
|
20925
|
-
schema: {
|
|
20926
|
-
type: "object",
|
|
20927
|
-
"x-component": "FormLayout",
|
|
20928
|
-
"x-component-props": {
|
|
20929
|
-
layout: "horizontal",
|
|
20930
|
-
labelStyle: {
|
|
20931
|
-
marginTop: "6px"
|
|
20932
|
-
},
|
|
20933
|
-
labelCol: 2,
|
|
20934
|
-
wrapperCol: 24
|
|
20935
|
-
},
|
|
20936
|
-
properties: {
|
|
20937
|
-
_minDate: {
|
|
20938
|
-
type: "string",
|
|
20939
|
-
title: '{{t("Min")}}',
|
|
20940
|
-
"x-decorator": "FormItem",
|
|
20941
|
-
"x-decorator-props": {
|
|
20942
|
-
labelCol: 4,
|
|
20943
|
-
wrapperCol: 20,
|
|
20944
|
-
labelAlign: "left"
|
|
20945
|
-
},
|
|
20946
|
-
"x-component": h,
|
|
20947
|
-
"x-component-props": {
|
|
20948
|
-
name: "_minDate"
|
|
20949
|
-
}
|
|
20950
|
-
//日期和使用变量设置的默认值不同
|
|
20951
|
-
// default: isVariable(minDateDefaultValue) ? minDateDefaultValue : { value: minDateDefaultValue },
|
|
20952
|
-
},
|
|
20953
|
-
_maxDate: {
|
|
20954
|
-
type: "string",
|
|
20955
|
-
title: '{{t("Max")}}',
|
|
20956
|
-
"x-decorator": "FormItem",
|
|
20957
|
-
"x-decorator-props": {
|
|
20958
|
-
labelCol: 4,
|
|
20959
|
-
wrapperCol: 20,
|
|
20960
|
-
labelAlign: "left"
|
|
20961
|
-
},
|
|
20962
|
-
"x-component": h,
|
|
20963
|
-
"x-component-props": {
|
|
20964
|
-
name: "_maxDate"
|
|
20965
|
-
}
|
|
20966
|
-
// default: isVariable(maxDateDefaultValue) ? maxDateDefaultValue : { value: maxDateDefaultValue },
|
|
20967
|
-
}
|
|
20968
|
-
}
|
|
20969
|
-
}
|
|
20970
|
-
}
|
|
20971
|
-
) });
|
|
20972
20972
|
}, FormFieldLinkageRuleAction = observer$1(
|
|
20973
20973
|
(e) => {
|
|
20974
20974
|
const { value: t, options: n, collectionName: o } = e, { t: r } = useTranslation(), a = useCompile(), i = useContext(RemoveActionContext), l = useFlag(), {
|
|
@@ -21028,11 +21028,7 @@ const DynamicComponent$1 = (e) => {
|
|
|
21028
21028
|
},
|
|
21029
21029
|
placeholder: r("Select field"),
|
|
21030
21030
|
treeNodeFilterProp: "title",
|
|
21031
|
-
|
|
21032
|
-
.ant-select-tree-list-holder > div {
|
|
21033
|
-
overflow-y: auto !important;
|
|
21034
|
-
}
|
|
21035
|
-
`
|
|
21031
|
+
virtual: !1
|
|
21036
21032
|
}
|
|
21037
21033
|
),
|
|
21038
21034
|
/* @__PURE__ */ jsx(
|
|
@@ -22188,7 +22184,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22188
22184
|
"noRecord",
|
|
22189
22185
|
"ModalContextProvider",
|
|
22190
22186
|
"dialogRootClassName"
|
|
22191
|
-
]), g = useContext(SchemaOptionsContext), f = useCollection(), C = useAPIClient(), b = useApp(), { theme: S } = useGlobalTheme(), y = useBlockRequestContext(), v = useFormActiveFields(), { locale: I } = useContext(ConfigProvider.ConfigContext), F = useDataSourceManager(), w = useDataSourceKey(), T = useCollectionRecord(), { association: D } = useDataBlockProps() || {}, B = useCurrentRecord(), N = useFormBlockContext(), M = useBlockContext(), { getOperators: j } = useOperators(), R = useLocationSearch(), O = useVariables$1(), $ = useContext(AllDataBlocksContext), A = useContext(SchemaComponentContext), E = useContext(VariableScopeContext$1), { formValue: z, collection:
|
|
22187
|
+
]), g = useContext(SchemaOptionsContext), f = useCollection(), C = useAPIClient(), b = useApp(), { theme: S } = useGlobalTheme(), y = useBlockRequestContext(), v = useFormActiveFields(), { locale: I } = useContext(ConfigProvider.ConfigContext), F = useDataSourceManager(), w = useDataSourceKey(), T = useCollectionRecord(), { association: D } = useDataBlockProps() || {}, B = useCurrentRecord(), N = useFormBlockContext(), M = useBlockContext(), { getOperators: j } = useOperators(), R = useLocationSearch(), O = useVariables$1(), $ = useContext(AllDataBlocksContext), A = useContext(SchemaComponentContext), E = useContext(VariableScopeContext$1), { formValue: z, collection: V, parent: L } = useSubFormValue(), G = useCurrentPopupRecord(), H = useParentPopupRecord();
|
|
22192
22188
|
return t ? null : /* @__PURE__ */ jsx(
|
|
22193
22189
|
SchemaSettingsItem,
|
|
22194
22190
|
P(x({
|
|
@@ -22210,7 +22206,7 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22210
22206
|
children: /* @__PURE__ */ jsx(CollectionRecordProvider, { record: d ? null : T, children: /* @__PURE__ */ jsx(CurrentRecordContextProvider, P(x({}, B), { children: /* @__PURE__ */ jsx(FormBlockContext$1.Provider, { value: N, children: /* @__PURE__ */ jsx(
|
|
22211
22207
|
SubFormProvider,
|
|
22212
22208
|
{
|
|
22213
|
-
value: { value: z, collection:
|
|
22209
|
+
value: { value: z, collection: V, parent: L },
|
|
22214
22210
|
children: /* @__PURE__ */ jsx(
|
|
22215
22211
|
FormActiveFieldsProvider,
|
|
22216
22212
|
{
|
|
@@ -22410,11 +22406,11 @@ const SchemaSettingsModalItem = (e) => {
|
|
|
22410
22406
|
[n, c, u, y, g, f, p, h, T, r]
|
|
22411
22407
|
), M = useMemo(() => ({ ArrayCollapse: ArrayCollapse$2, FormLayout }), []), j = useCallback(
|
|
22412
22408
|
(O) => {
|
|
22413
|
-
var
|
|
22409
|
+
var V;
|
|
22414
22410
|
const $ = [];
|
|
22415
|
-
for (const
|
|
22416
|
-
$.push(_.omit(_.pickBy(
|
|
22417
|
-
const A = y["x-component"] === "BlockTemplate" && ((
|
|
22411
|
+
for (const L of O.fieldReaction.rules)
|
|
22412
|
+
$.push(_.omit(_.pickBy(L, _.identity), ["conditionBasic", "conditionAdvanced"]));
|
|
22413
|
+
const A = y["x-component"] === "BlockTemplate" && ((V = y["x-component-props"]) == null ? void 0 : V.templateId), z = {
|
|
22418
22414
|
"x-uid": b !== LinkageRuleCategory.block ? A && m(A).uid || y["x-uid"] : c["x-uid"]
|
|
22419
22415
|
};
|
|
22420
22416
|
y[w] = $, z[w] = $, c[w] = $, d.emit("patch", {
|
|
@@ -22891,7 +22887,7 @@ const getContentWidth = (e) => {
|
|
|
22891
22887
|
onOpenChange: (g) => {
|
|
22892
22888
|
i(o && g);
|
|
22893
22889
|
},
|
|
22894
|
-
content: /* @__PURE__ */ jsx("div", { style: popoverStyle$1, children: e.popoverContent || e.children }),
|
|
22890
|
+
content: /* @__PURE__ */ jsx("div", { style: x(x({}, popoverStyle$1), (e == null ? void 0 : e.style) || {}), children: e.popoverContent || e.children }),
|
|
22895
22891
|
children: d
|
|
22896
22892
|
}
|
|
22897
22893
|
);
|
|
@@ -23531,8 +23527,8 @@ function getTypedConstantOption(e, t, n) {
|
|
|
23531
23527
|
};
|
|
23532
23528
|
}
|
|
23533
23529
|
function Input$1(e) {
|
|
23534
|
-
var
|
|
23535
|
-
const
|
|
23530
|
+
var ne, te, se, ce;
|
|
23531
|
+
const Q = e, {
|
|
23536
23532
|
value: t = "",
|
|
23537
23533
|
onChange: n,
|
|
23538
23534
|
children: o,
|
|
@@ -23546,7 +23542,7 @@ function Input$1(e) {
|
|
|
23546
23542
|
parseOptions: p,
|
|
23547
23543
|
hideVariableButton: m,
|
|
23548
23544
|
constantAbel: h = !0
|
|
23549
|
-
} =
|
|
23545
|
+
} = Q, g = W(Q, [
|
|
23550
23546
|
"value",
|
|
23551
23547
|
"onChange",
|
|
23552
23548
|
"children",
|
|
@@ -23564,101 +23560,104 @@ function Input$1(e) {
|
|
|
23564
23560
|
useAntdInputStyle(`${y}-input`);
|
|
23565
23561
|
const v = useCompile(), { t: I } = useTranslation(), F = useForm(), [w, T] = React.useState([]), [D, B] = React.useState([]), [N, M] = React.useState(
|
|
23566
23562
|
m || !!(o && t != null)
|
|
23567
|
-
), j = useMemo(() => parseValue(t, p), [p, t]),
|
|
23563
|
+
), [j, R] = React.useState(null), O = useMemo(() => parseValue(t, p), [p, t]), $ = typeof O == "string", A = $ ? O : "", E = $ ? null : O, z = Object.assign(
|
|
23568
23564
|
{
|
|
23569
23565
|
label: "label",
|
|
23570
23566
|
value: "value",
|
|
23571
23567
|
children: "children"
|
|
23572
23568
|
},
|
|
23573
23569
|
d != null ? d : {}
|
|
23574
|
-
),
|
|
23570
|
+
), V = useMemo(() => h ? o ? {
|
|
23575
23571
|
value: "$",
|
|
23576
23572
|
label: I("Constant"),
|
|
23577
|
-
[
|
|
23578
|
-
[
|
|
23579
|
-
} : a ? getTypedConstantOption(
|
|
23580
|
-
let
|
|
23581
|
-
t == null ? i ? o && N ?
|
|
23582
|
-
const
|
|
23573
|
+
[z.value]: "$",
|
|
23574
|
+
[z.label]: I("Constant")
|
|
23575
|
+
} : a ? getTypedConstantOption(A, a, z) : null : null, [A, a]), L = (ne = V == null ? void 0 : V.component) != null ? ne : NullComponent, G = Array.isArray(a) ? (se = (te = a.find((ie) => Array.isArray(ie) && ie[0] === A)) == null ? void 0 : te[1]) != null ? se : {} : {};
|
|
23576
|
+
let H;
|
|
23577
|
+
t == null ? i ? o && N ? H = ["$"] : H = [""] : o ? H = ["$"] : H = [" ", A] : H = o ? ["$"] : [" ", A], m && (H = ["$"]), useEffect(() => {
|
|
23578
|
+
const pe = V != null ? V : {}, { component: ie } = pe, re = W(pe, ["component"]), de = [
|
|
23583
23579
|
...i ? [
|
|
23584
23580
|
{
|
|
23585
23581
|
value: "",
|
|
23586
23582
|
label: I("Null"),
|
|
23587
|
-
[
|
|
23588
|
-
[
|
|
23583
|
+
[z.value]: "",
|
|
23584
|
+
[z.label]: I("Null")
|
|
23589
23585
|
}
|
|
23590
23586
|
] : [],
|
|
23591
|
-
...
|
|
23587
|
+
...V ? [v(re)] : [],
|
|
23592
23588
|
...f ? [...f] : []
|
|
23593
|
-
].filter((
|
|
23594
|
-
T(
|
|
23595
|
-
}, [f,
|
|
23596
|
-
const
|
|
23597
|
-
var
|
|
23598
|
-
const
|
|
23599
|
-
if (!((
|
|
23600
|
-
|
|
23601
|
-
|
|
23602
|
-
|
|
23603
|
-
|
|
23604
|
-
|
|
23589
|
+
].filter((ue) => !ue.deprecated || (E == null ? void 0 : E[0]) === ue[z.value]);
|
|
23590
|
+
T(de);
|
|
23591
|
+
}, [f, E, V, i]);
|
|
23592
|
+
const U = (ie) => q(this, null, function* () {
|
|
23593
|
+
var de;
|
|
23594
|
+
const re = ie[ie.length - 1];
|
|
23595
|
+
if (!((de = re.children) != null && de.length) && !re.isLeaf && re.loadChildren) {
|
|
23596
|
+
ie.length && R(ie.map((ue) => ue == null ? void 0 : ue[z.value]));
|
|
23597
|
+
let pe;
|
|
23598
|
+
if (E && E.length >= 2) {
|
|
23599
|
+
for (const ue of E)
|
|
23600
|
+
if (ue === re[z.value]) {
|
|
23601
|
+
pe = ue;
|
|
23605
23602
|
break;
|
|
23606
23603
|
}
|
|
23607
23604
|
}
|
|
23608
|
-
yield
|
|
23605
|
+
yield re.loadChildren(re, pe, E), T((ue) => [...ue]);
|
|
23609
23606
|
}
|
|
23610
|
-
}),
|
|
23611
|
-
(
|
|
23612
|
-
var
|
|
23613
|
-
if (
|
|
23614
|
-
M(!0),
|
|
23607
|
+
}), K = useCallback(
|
|
23608
|
+
(ie, re) => {
|
|
23609
|
+
var de, pe, ue;
|
|
23610
|
+
if (R(null), ie[0] === "$") {
|
|
23611
|
+
M(!0), E && n(null, re);
|
|
23615
23612
|
return;
|
|
23616
23613
|
} else
|
|
23617
23614
|
M(!1);
|
|
23618
|
-
if (
|
|
23615
|
+
if (ie[0] === "") {
|
|
23619
23616
|
n(null);
|
|
23620
23617
|
return;
|
|
23621
23618
|
}
|
|
23622
|
-
if (
|
|
23623
|
-
|
|
23619
|
+
if (ie[0] === " ") {
|
|
23620
|
+
ie[1] ? ie[1] !== A && n((ue = (pe = (de = ConstantTypes[ie[1]]) == null ? void 0 : de.default) == null ? void 0 : pe.call(de)) != null ? ue : null, re) : E && n(null, re);
|
|
23624
23621
|
return;
|
|
23625
23622
|
}
|
|
23626
|
-
n(`{{${
|
|
23623
|
+
n(`{{${ie.join(".")}}}`, re);
|
|
23627
23624
|
},
|
|
23628
|
-
[
|
|
23629
|
-
),
|
|
23630
|
-
var
|
|
23631
|
-
if (M(!!o), (
|
|
23632
|
-
const
|
|
23633
|
-
return n(
|
|
23625
|
+
[A, E, n]
|
|
23626
|
+
), Y = useCallback(() => {
|
|
23627
|
+
var ie;
|
|
23628
|
+
if (M(!!o), (ie = V == null ? void 0 : V.children) != null && ie.length) {
|
|
23629
|
+
const re = V.children[0].default();
|
|
23630
|
+
return n(re);
|
|
23634
23631
|
}
|
|
23635
|
-
n(null);
|
|
23636
|
-
}, [
|
|
23632
|
+
n(null), R(null);
|
|
23633
|
+
}, [V]), X = useCallback((ie) => {
|
|
23634
|
+
ie || R(null);
|
|
23635
|
+
}, []);
|
|
23637
23636
|
useEffect(() => {
|
|
23638
23637
|
q(this, null, function* () {
|
|
23639
|
-
var
|
|
23640
|
-
if (
|
|
23638
|
+
var pe;
|
|
23639
|
+
if (!E || w.length <= 1)
|
|
23641
23640
|
return;
|
|
23642
|
-
let
|
|
23643
|
-
const
|
|
23644
|
-
for (let
|
|
23645
|
-
const
|
|
23641
|
+
let re = null;
|
|
23642
|
+
const de = [];
|
|
23643
|
+
for (let ue = 0; ue < E.length; ue++) {
|
|
23644
|
+
const ge = E[ue];
|
|
23646
23645
|
try {
|
|
23647
|
-
if (
|
|
23646
|
+
if (ue === 0 ? re = w.find((he) => he[z.value] === ge) : (re.loadChildren && !((pe = re.children) != null && pe.length) && (yield re.loadChildren(re, ge, E)), re = re.children.find((he) => he[z.value] === ge)), !re)
|
|
23648
23647
|
return;
|
|
23649
|
-
|
|
23650
|
-
} catch (
|
|
23651
|
-
error(
|
|
23648
|
+
de.push(re[z.label]);
|
|
23649
|
+
} catch (he) {
|
|
23650
|
+
error(he);
|
|
23652
23651
|
}
|
|
23653
23652
|
}
|
|
23654
|
-
T([...w]), B([...
|
|
23653
|
+
T([...w]), B([...de]);
|
|
23655
23654
|
});
|
|
23656
|
-
}, [
|
|
23657
|
-
const
|
|
23655
|
+
}, [E, w.length]);
|
|
23656
|
+
const J = e.disabled || F.disabled, Z = (ce = E != null ? E : j) != null ? ce : H;
|
|
23658
23657
|
return C(
|
|
23659
23658
|
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
23660
23659
|
/* @__PURE__ */ jsxs(Space$1.Compact, { style: l, className: cls(S, b, c), children: [
|
|
23661
|
-
|
|
23660
|
+
E ? /* @__PURE__ */ jsxs(
|
|
23662
23661
|
"div",
|
|
23663
23662
|
{
|
|
23664
23663
|
className: cx(
|
|
@@ -23676,7 +23675,7 @@ function Input$1(e) {
|
|
|
23676
23675
|
.ant-input {
|
|
23677
23676
|
overflow: auto;
|
|
23678
23677
|
white-space: nowrap;
|
|
23679
|
-
${
|
|
23678
|
+
${J ? "" : "padding-right: 28px;"}
|
|
23680
23679
|
|
|
23681
23680
|
.ant-tag {
|
|
23682
23681
|
display: inline;
|
|
@@ -23695,32 +23694,32 @@ function Input$1(e) {
|
|
|
23695
23694
|
role: "button",
|
|
23696
23695
|
"aria-label": "variable-tag",
|
|
23697
23696
|
style: { overflow: "hidden" },
|
|
23698
|
-
className: cx("ant-input ant-input-outlined", { "ant-input-disabled":
|
|
23699
|
-
children: /* @__PURE__ */ jsx(Tag, { color: "blue", children: D.map((
|
|
23700
|
-
|
|
23701
|
-
|
|
23702
|
-
] },
|
|
23697
|
+
className: cx("ant-input ant-input-outlined", { "ant-input-disabled": J }, b),
|
|
23698
|
+
children: /* @__PURE__ */ jsx(Tag, { color: "blue", children: D.map((ie, re) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
23699
|
+
re ? " / " : "",
|
|
23700
|
+
ie
|
|
23701
|
+
] }, ie)) })
|
|
23703
23702
|
}
|
|
23704
23703
|
),
|
|
23705
|
-
|
|
23704
|
+
J ? null : /* @__PURE__ */ jsx(
|
|
23706
23705
|
"span",
|
|
23707
23706
|
{
|
|
23708
23707
|
role: "button",
|
|
23709
23708
|
"aria-label": "icon-close",
|
|
23710
23709
|
className: cx("clear-button"),
|
|
23711
23710
|
unselectable: "on",
|
|
23712
|
-
onClick:
|
|
23711
|
+
onClick: Y,
|
|
23713
23712
|
children: /* @__PURE__ */ jsx(CloseCircleFilled, {})
|
|
23714
23713
|
}
|
|
23715
23714
|
)
|
|
23716
23715
|
]
|
|
23717
23716
|
}
|
|
23718
|
-
) : /* @__PURE__ */ jsx("div", { style: { flex: 1 }, children: o && (N || !i) ? o :
|
|
23719
|
-
|
|
23717
|
+
) : /* @__PURE__ */ jsx("div", { style: { flex: 1 }, children: o && (N || !i) ? o : L ? /* @__PURE__ */ jsx(
|
|
23718
|
+
L,
|
|
23720
23719
|
P(x({
|
|
23721
23720
|
role: "button",
|
|
23722
23721
|
"aria-label": "variable-constant"
|
|
23723
|
-
},
|
|
23722
|
+
}, G), {
|
|
23724
23723
|
value: t,
|
|
23725
23724
|
onChange: n
|
|
23726
23725
|
})
|
|
@@ -23729,20 +23728,21 @@ function Input$1(e) {
|
|
|
23729
23728
|
Cascader$1,
|
|
23730
23729
|
{
|
|
23731
23730
|
options: w,
|
|
23732
|
-
value:
|
|
23733
|
-
onChange:
|
|
23734
|
-
loadData:
|
|
23731
|
+
value: Z,
|
|
23732
|
+
onChange: K,
|
|
23733
|
+
loadData: U,
|
|
23735
23734
|
changeOnSelect: u != null ? u : !0,
|
|
23736
23735
|
fieldNames: d,
|
|
23737
|
-
disabled:
|
|
23736
|
+
disabled: J,
|
|
23737
|
+
onDropdownVisibleChange: X,
|
|
23738
23738
|
children: r != null ? r : /* @__PURE__ */ jsx(
|
|
23739
23739
|
XButton,
|
|
23740
23740
|
{
|
|
23741
23741
|
className: css(`
|
|
23742
23742
|
margin-left: -1px;
|
|
23743
23743
|
`),
|
|
23744
|
-
type:
|
|
23745
|
-
disabled:
|
|
23744
|
+
type: E ? "primary" : "default",
|
|
23745
|
+
disabled: J
|
|
23746
23746
|
}
|
|
23747
23747
|
)
|
|
23748
23748
|
}
|
|
@@ -24027,23 +24027,23 @@ function TextArea(e) {
|
|
|
24027
24027
|
), [S, y] = useState(!1), [v, I] = useState(!1), [F, w] = useState(() => renderHTML(p != null ? p : "", b, c)), [T, D] = useState([-1, 0, -1, 0]);
|
|
24028
24028
|
useAntdInputStyle("ant-input");
|
|
24029
24029
|
const { token: B } = theme.useToken(), N = c.join(" "), M = useCallback(
|
|
24030
|
-
(
|
|
24030
|
+
(L) => {
|
|
24031
24031
|
var H;
|
|
24032
|
-
const G = getValue(
|
|
24032
|
+
const G = getValue(L, c);
|
|
24033
24033
|
(H = e.onChange) == null || H.call(e, d ? G.trim() : G);
|
|
24034
24034
|
},
|
|
24035
24035
|
[N, e.onChange, d]
|
|
24036
24036
|
);
|
|
24037
24037
|
useEffect(() => {
|
|
24038
|
-
preloadOptions(r, m).then((
|
|
24039
|
-
f(
|
|
24038
|
+
preloadOptions(r, m).then((L) => {
|
|
24039
|
+
f(L);
|
|
24040
24040
|
}).catch(console.error);
|
|
24041
24041
|
}, [r, JSON.stringify(m)]), useEffect(() => {
|
|
24042
24042
|
w(renderHTML(p != null ? p : "", b, c)), v || D([-1, 0, -1, 0]);
|
|
24043
24043
|
}, [p, b, N]), useEffect(() => {
|
|
24044
24044
|
var H;
|
|
24045
|
-
const { current:
|
|
24046
|
-
if (!
|
|
24045
|
+
const { current: L } = h;
|
|
24046
|
+
if (!L)
|
|
24047
24047
|
return;
|
|
24048
24048
|
const G = new Range();
|
|
24049
24049
|
if (v) {
|
|
@@ -24052,22 +24052,22 @@ function TextArea(e) {
|
|
|
24052
24052
|
const U = (H = window.getSelection) == null ? void 0 : H.call(window);
|
|
24053
24053
|
if (U)
|
|
24054
24054
|
try {
|
|
24055
|
-
const K = Array.from(
|
|
24055
|
+
const K = Array.from(L.childNodes);
|
|
24056
24056
|
K.length && (T[0] === -1 ? T[1] && G.setStartAfter(K[T[1] - 1]) : G.setStart(K[T[0]], T[1]), T[2] === -1 ? T[3] && G.setEndAfter(K[T[3] - 1]) : G.setEnd(K[T[2]], T[3])), G.collapse(!0), U.removeAllRanges(), U.addRange(G);
|
|
24057
24057
|
} catch (K) {
|
|
24058
24058
|
}
|
|
24059
24059
|
} else {
|
|
24060
|
-
const { lastChild: U } =
|
|
24060
|
+
const { lastChild: U } = L;
|
|
24061
24061
|
if (U) {
|
|
24062
24062
|
G.setStartAfter(U), G.setEndAfter(U);
|
|
24063
|
-
const K = Array.from(
|
|
24063
|
+
const K = Array.from(L.childNodes), Y = G.startContainer === L ? -1 : K.indexOf(U), X = G.startContainer === L ? -1 : K.indexOf(U);
|
|
24064
24064
|
D([Y, G.startOffset, X, G.endOffset]);
|
|
24065
24065
|
}
|
|
24066
24066
|
}
|
|
24067
24067
|
}, [F]);
|
|
24068
24068
|
const j = useCallback(
|
|
24069
|
-
function(
|
|
24070
|
-
const G =
|
|
24069
|
+
function(L) {
|
|
24070
|
+
const G = L.filter((K) => !!K.trim()), { current: H } = h;
|
|
24071
24071
|
if (!H || !G)
|
|
24072
24072
|
return;
|
|
24073
24073
|
H.focus();
|
|
@@ -24078,25 +24078,25 @@ function TextArea(e) {
|
|
|
24078
24078
|
},
|
|
24079
24079
|
[b, M, T]
|
|
24080
24080
|
), R = useCallback(
|
|
24081
|
-
function({ currentTarget:
|
|
24082
|
-
S || (I(!0), D(getCurrentRange(
|
|
24081
|
+
function({ currentTarget: L }) {
|
|
24082
|
+
S || (I(!0), D(getCurrentRange(L)), M(L));
|
|
24083
24083
|
},
|
|
24084
24084
|
[S, M]
|
|
24085
|
-
), O = useCallback(function({ currentTarget:
|
|
24086
|
-
D(getCurrentRange(
|
|
24087
|
-
}, []), $ = useCallback(function(
|
|
24088
|
-
|
|
24085
|
+
), O = useCallback(function({ currentTarget: L }) {
|
|
24086
|
+
D(getCurrentRange(L));
|
|
24087
|
+
}, []), $ = useCallback(function(L) {
|
|
24088
|
+
L.key === "Enter" && L.preventDefault();
|
|
24089
24089
|
}, []), A = useCallback(function() {
|
|
24090
24090
|
y(!0);
|
|
24091
24091
|
}, []), E = useCallback(
|
|
24092
|
-
({ currentTarget:
|
|
24093
|
-
y(!1), I(!0), D(getCurrentRange(
|
|
24092
|
+
({ currentTarget: L }) => {
|
|
24093
|
+
y(!1), I(!0), D(getCurrentRange(L)), M(L);
|
|
24094
24094
|
},
|
|
24095
24095
|
[M]
|
|
24096
24096
|
), z = useCallback(
|
|
24097
|
-
function(
|
|
24098
|
-
|
|
24099
|
-
const G =
|
|
24097
|
+
function(L) {
|
|
24098
|
+
L.preventDefault();
|
|
24099
|
+
const G = L.clipboardData.getData("text/html") || L.clipboardData.getData("text"), H = sanitizeHTML(G, {
|
|
24100
24100
|
allowedTags: ["span"],
|
|
24101
24101
|
allowedAttributes: {
|
|
24102
24102
|
span: ["data-variable", "contenteditable"]
|
|
@@ -24113,10 +24113,10 @@ function TextArea(e) {
|
|
|
24113
24113
|
}
|
|
24114
24114
|
}
|
|
24115
24115
|
}).replace(/\n/g, " ");
|
|
24116
|
-
I(!0), pasteHTML(
|
|
24116
|
+
I(!0), pasteHTML(L.currentTarget, H), D(getCurrentRange(L.currentTarget)), M(L.currentTarget);
|
|
24117
24117
|
},
|
|
24118
24118
|
[M]
|
|
24119
|
-
),
|
|
24119
|
+
), V = e.disabled || C.disabled;
|
|
24120
24120
|
return t(
|
|
24121
24121
|
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
24122
24122
|
/* @__PURE__ */ jsxs(
|
|
@@ -24176,7 +24176,7 @@ function TextArea(e) {
|
|
|
24176
24176
|
className: cx(
|
|
24177
24177
|
n,
|
|
24178
24178
|
"ant-input ant-input-outlined",
|
|
24179
|
-
{ "ant-input-disabled":
|
|
24179
|
+
{ "ant-input-disabled": V },
|
|
24180
24180
|
// NOTE: `pre-wrap` here for avoid the ` ` (\x160) issue when paste content, we need normal space (\x32).
|
|
24181
24181
|
css`
|
|
24182
24182
|
min-height: ${B.controlHeight}px;
|
|
@@ -24198,7 +24198,7 @@ function TextArea(e) {
|
|
|
24198
24198
|
`
|
|
24199
24199
|
),
|
|
24200
24200
|
ref: h,
|
|
24201
|
-
contentEditable: !
|
|
24201
|
+
contentEditable: !V,
|
|
24202
24202
|
dangerouslySetInnerHTML: { __html: F }
|
|
24203
24203
|
}
|
|
24204
24204
|
),
|
|
@@ -24210,7 +24210,7 @@ function TextArea(e) {
|
|
|
24210
24210
|
onInsert: j,
|
|
24211
24211
|
changeOnSelect: a,
|
|
24212
24212
|
fieldNames: l || defaultFieldNames$2,
|
|
24213
|
-
disabled:
|
|
24213
|
+
disabled: V
|
|
24214
24214
|
}
|
|
24215
24215
|
)
|
|
24216
24216
|
]
|
|
@@ -27177,23 +27177,23 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27177
27177
|
}
|
|
27178
27178
|
}
|
|
27179
27179
|
function b(A, E, z) {
|
|
27180
|
-
var
|
|
27181
|
-
if (A && (A = A.split("/"), Y = A.length - 1, i.nodeIdCompat && jsSuffixRegExp.test(A[Y]) && (A[Y] = A[Y].replace(jsSuffixRegExp, "")), A[0].charAt(0) === "." && te && (
|
|
27180
|
+
var V, L, G, H, U, K, Y, X, J, Z, Q, ne, te = E && E.split("/"), se = i.map, ce = se && se["*"];
|
|
27181
|
+
if (A && (A = A.split("/"), Y = A.length - 1, i.nodeIdCompat && jsSuffixRegExp.test(A[Y]) && (A[Y] = A[Y].replace(jsSuffixRegExp, "")), A[0].charAt(0) === "." && te && (ne = te.slice(0, te.length - 1), A = ne.concat(A)), C(A), A = A.join("/")), z && se && (te || ce)) {
|
|
27182
27182
|
G = A.split("/");
|
|
27183
27183
|
e:
|
|
27184
27184
|
for (H = G.length; H > 0; H -= 1) {
|
|
27185
27185
|
if (K = G.slice(0, H).join("/"), te) {
|
|
27186
27186
|
for (U = te.length; U > 0; U -= 1)
|
|
27187
|
-
if (
|
|
27188
|
-
X =
|
|
27187
|
+
if (L = getOwn(se, te.slice(0, U).join("/")), L && (L = getOwn(L, K), L)) {
|
|
27188
|
+
X = L, J = H;
|
|
27189
27189
|
break e;
|
|
27190
27190
|
}
|
|
27191
27191
|
}
|
|
27192
|
-
!
|
|
27192
|
+
!Z && ce && getOwn(ce, K) && (Z = getOwn(ce, K), Q = H);
|
|
27193
27193
|
}
|
|
27194
|
-
!X &&
|
|
27194
|
+
!X && Z && (X = Z, J = Q), X && (G.splice(0, J, X), A = G.join("/"));
|
|
27195
27195
|
}
|
|
27196
|
-
return
|
|
27196
|
+
return V = getOwn(i.pkgs, A), V || A;
|
|
27197
27197
|
}
|
|
27198
27198
|
function S(A) {
|
|
27199
27199
|
isBrowser && each(scripts(), function(E) {
|
|
@@ -27212,19 +27212,19 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27212
27212
|
var E, z = A ? A.indexOf("!") : -1;
|
|
27213
27213
|
return z > -1 && (E = A.substring(0, z), A = A.substring(z + 1, A.length)), [E, A];
|
|
27214
27214
|
}
|
|
27215
|
-
function I(A, E, z,
|
|
27216
|
-
var
|
|
27217
|
-
return A || (
|
|
27218
|
-
return b(
|
|
27219
|
-
}) :
|
|
27215
|
+
function I(A, E, z, V) {
|
|
27216
|
+
var L, G, H, U, K = null, Y = E ? E.name : null, X = A, J = !0, Z = "";
|
|
27217
|
+
return A || (J = !1, A = "_@r" + (g += 1)), U = v(A), K = U[0], A = U[1], K && (K = b(K, Y, V), G = getOwn(p, K)), A && (K ? z ? Z = A : G && G.normalize ? Z = G.normalize(A, function(Q) {
|
|
27218
|
+
return b(Q, Y, V);
|
|
27219
|
+
}) : Z = A.indexOf("!") === -1 ? b(A, Y, V) : A : (Z = b(A, Y, V), U = v(Z), K = U[0], Z = U[1], z = !0, L = o.nameToUrl(Z))), H = K && !G && !z ? "_unnormalized" + (f += 1) : "", {
|
|
27220
27220
|
prefix: K,
|
|
27221
|
-
name:
|
|
27221
|
+
name: Z,
|
|
27222
27222
|
parentMap: E,
|
|
27223
27223
|
unnormalized: !!H,
|
|
27224
|
-
url:
|
|
27224
|
+
url: L,
|
|
27225
27225
|
originalName: X,
|
|
27226
|
-
isDefine:
|
|
27227
|
-
id: (K ? K + "!" +
|
|
27226
|
+
isDefine: J,
|
|
27227
|
+
id: (K ? K + "!" + Z : Z) + H
|
|
27228
27228
|
};
|
|
27229
27229
|
}
|
|
27230
27230
|
function F(A) {
|
|
@@ -27232,15 +27232,15 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27232
27232
|
return z || (z = l[E] = new o.Module(A)), z;
|
|
27233
27233
|
}
|
|
27234
27234
|
function w(A, E, z) {
|
|
27235
|
-
var
|
|
27236
|
-
hasProp(p,
|
|
27235
|
+
var V = A.id, L = getOwn(l, V);
|
|
27236
|
+
hasProp(p, V) && (!L || L.defineEmitComplete) ? E === "defined" && z(p[V]) : (L = F(A), L.error && E === "error" ? z(L.error) : L.on(E, z));
|
|
27237
27237
|
}
|
|
27238
27238
|
function T(A, E) {
|
|
27239
|
-
var z = A.requireModules,
|
|
27240
|
-
E ? E(A) : (each(z, function(
|
|
27241
|
-
var G = getOwn(l,
|
|
27242
|
-
G && (G.error = A, G.events.error && (
|
|
27243
|
-
}),
|
|
27239
|
+
var z = A.requireModules, V = !1;
|
|
27240
|
+
E ? E(A) : (each(z, function(L) {
|
|
27241
|
+
var G = getOwn(l, L);
|
|
27242
|
+
G && (G.error = A, G.events.error && (V = !0, G.emit("error", A)));
|
|
27243
|
+
}), V || req.onError(A));
|
|
27244
27244
|
}
|
|
27245
27245
|
function D() {
|
|
27246
27246
|
globalDefQueue.length && (each(globalDefQueue, function(A) {
|
|
@@ -27271,28 +27271,28 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27271
27271
|
delete l[A], delete c[A];
|
|
27272
27272
|
}
|
|
27273
27273
|
function N(A, E, z) {
|
|
27274
|
-
var
|
|
27275
|
-
A.error ? A.emit("error", A.error) : (E[
|
|
27276
|
-
var H =
|
|
27274
|
+
var V = A.map.id;
|
|
27275
|
+
A.error ? A.emit("error", A.error) : (E[V] = !0, each(A.depMaps, function(L, G) {
|
|
27276
|
+
var H = L.id, U = getOwn(l, H);
|
|
27277
27277
|
U && !A.depMatched[G] && !z[H] && (getOwn(E, H) ? (A.defineDep(G, p[H]), A.check()) : N(U, E, z));
|
|
27278
|
-
}), z[
|
|
27278
|
+
}), z[V] = !0);
|
|
27279
27279
|
}
|
|
27280
27280
|
function M() {
|
|
27281
|
-
var A, E, z = i.waitSeconds * 1e3,
|
|
27281
|
+
var A, E, z = i.waitSeconds * 1e3, V = z && o.startTime + z < (/* @__PURE__ */ new Date()).getTime(), L = [], G = [], H = !1, U = !0;
|
|
27282
27282
|
if (!t) {
|
|
27283
27283
|
if (t = !0, eachProp(c, function(K) {
|
|
27284
27284
|
var Y = K.map, X = Y.id;
|
|
27285
27285
|
if (K.enabled && (Y.isDefine || G.push(K), !K.error)) {
|
|
27286
|
-
if (!K.inited &&
|
|
27287
|
-
y(X) ? (E = !0, H = !0) : (
|
|
27286
|
+
if (!K.inited && V)
|
|
27287
|
+
y(X) ? (E = !0, H = !0) : (L.push(X), S(X));
|
|
27288
27288
|
else if (!K.inited && K.fetched && Y.isDefine && (H = !0, !Y.prefix))
|
|
27289
27289
|
return U = !1;
|
|
27290
27290
|
}
|
|
27291
|
-
}),
|
|
27292
|
-
return A = makeError("timeout", "Load timeout for modules: " +
|
|
27291
|
+
}), V && L.length)
|
|
27292
|
+
return A = makeError("timeout", "Load timeout for modules: " + L, null, L), A.contextName = o.contextName, T(A);
|
|
27293
27293
|
U && each(G, function(K) {
|
|
27294
27294
|
N(K, {}, {});
|
|
27295
|
-
}), (!
|
|
27295
|
+
}), (!V || E) && H && (isBrowser || isWebWorker) && !a && (a = setTimeout(function() {
|
|
27296
27296
|
a = 0, M();
|
|
27297
27297
|
}, 50)), t = !1;
|
|
27298
27298
|
}
|
|
@@ -27300,10 +27300,10 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27300
27300
|
n = function(A) {
|
|
27301
27301
|
this.events = getOwn(u, A.id) || {}, this.map = A, this.shim = getOwn(i.shim, A.id), this.depExports = [], this.depMaps = [], this.depMatched = [], this.pluginMaps = {}, this.depCount = 0;
|
|
27302
27302
|
}, n.prototype = {
|
|
27303
|
-
init: function(A, E, z,
|
|
27304
|
-
|
|
27305
|
-
this.emit("error",
|
|
27306
|
-
})), this.depMaps = A && A.slice(0), this.errback = z, this.inited = !0, this.ignore =
|
|
27303
|
+
init: function(A, E, z, V) {
|
|
27304
|
+
V = V || {}, !this.inited && (this.factory = E, z ? this.on("error", z) : this.events.error && (z = bind(this, function(L) {
|
|
27305
|
+
this.emit("error", L);
|
|
27306
|
+
})), this.depMaps = A && A.slice(0), this.errback = z, this.inited = !0, this.ignore = V.ignore, V.enabled || this.enabled ? this.enable() : this.check());
|
|
27307
27307
|
},
|
|
27308
27308
|
defineDep: function(A, E) {
|
|
27309
27309
|
this.depMatched[A] || (this.depMatched[A] = !0, this.depCount -= 1, this.depExports[A] = E);
|
|
@@ -27332,7 +27332,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27332
27332
|
*/
|
|
27333
27333
|
check: function() {
|
|
27334
27334
|
if (!(!this.enabled || this.enabling)) {
|
|
27335
|
-
var A, E, z = this.map.id,
|
|
27335
|
+
var A, E, z = this.map.id, V = this.depExports, L = this.exports, G = this.factory;
|
|
27336
27336
|
if (!this.inited)
|
|
27337
27337
|
hasProp(o.defQueueMap, z) || this.fetch();
|
|
27338
27338
|
else if (this.error)
|
|
@@ -27342,17 +27342,17 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27342
27342
|
if (isFunction(G)) {
|
|
27343
27343
|
if (this.events.error && this.map.isDefine || req.onError !== defaultOnError)
|
|
27344
27344
|
try {
|
|
27345
|
-
|
|
27345
|
+
L = o.execCb(z, G, V, L);
|
|
27346
27346
|
} catch (U) {
|
|
27347
27347
|
A = U;
|
|
27348
27348
|
}
|
|
27349
27349
|
else
|
|
27350
|
-
|
|
27351
|
-
if (this.map.isDefine &&
|
|
27350
|
+
L = o.execCb(z, G, V, L);
|
|
27351
|
+
if (this.map.isDefine && L === void 0 && (E = this.module, E ? L = E.exports : this.usingExports && (L = this.exports)), A)
|
|
27352
27352
|
return A.requireMap = this.map, A.requireModules = this.map.isDefine ? [this.map.id] : null, A.requireType = this.map.isDefine ? "define" : "require", T(this.error = A);
|
|
27353
27353
|
} else
|
|
27354
|
-
|
|
27355
|
-
if (this.exports =
|
|
27354
|
+
L = G;
|
|
27355
|
+
if (this.exports = L, this.map.isDefine && !this.ignore && (p[z] = L, req.onResourceLoad)) {
|
|
27356
27356
|
var H = [];
|
|
27357
27357
|
each(this.depMaps, function(U) {
|
|
27358
27358
|
H.push(U.normalizedMap || U);
|
|
@@ -27366,13 +27366,13 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27366
27366
|
},
|
|
27367
27367
|
callPlugin: function() {
|
|
27368
27368
|
var A = this.map, E = A.id, z = I(A.prefix);
|
|
27369
|
-
this.depMaps.push(z), w(z, "defined", bind(this, function(
|
|
27370
|
-
var
|
|
27369
|
+
this.depMaps.push(z), w(z, "defined", bind(this, function(V) {
|
|
27370
|
+
var L, G, H, U = getOwn(h, this.map.id), K = this.map.name, Y = this.map.parentMap ? this.map.parentMap.name : null, X = o.makeRequire(A.parentMap, {
|
|
27371
27371
|
enableBuildCallback: !0
|
|
27372
27372
|
});
|
|
27373
27373
|
if (this.map.unnormalized) {
|
|
27374
|
-
|
|
27375
|
-
return b(
|
|
27374
|
+
V.normalize && (K = V.normalize(K, function(J) {
|
|
27375
|
+
return b(J, Y, !0);
|
|
27376
27376
|
}) || ""), G = I(
|
|
27377
27377
|
A.prefix + "!" + K,
|
|
27378
27378
|
this.map.parentMap,
|
|
@@ -27380,16 +27380,16 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27380
27380
|
), w(
|
|
27381
27381
|
G,
|
|
27382
27382
|
"defined",
|
|
27383
|
-
bind(this, function(
|
|
27383
|
+
bind(this, function(J) {
|
|
27384
27384
|
this.map.normalizedMap = G, this.init([], function() {
|
|
27385
|
-
return
|
|
27385
|
+
return J;
|
|
27386
27386
|
}, null, {
|
|
27387
27387
|
enabled: !0,
|
|
27388
27388
|
ignore: !0
|
|
27389
27389
|
});
|
|
27390
27390
|
})
|
|
27391
|
-
), H = getOwn(l, G.id), H && (this.depMaps.push(G), this.events.error && H.on("error", bind(this, function(
|
|
27392
|
-
this.emit("error",
|
|
27391
|
+
), H = getOwn(l, G.id), H && (this.depMaps.push(G), this.events.error && H.on("error", bind(this, function(J) {
|
|
27392
|
+
this.emit("error", J);
|
|
27393
27393
|
})), H.enable());
|
|
27394
27394
|
return;
|
|
27395
27395
|
}
|
|
@@ -27397,44 +27397,44 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27397
27397
|
this.map.url = o.nameToUrl(U), this.load();
|
|
27398
27398
|
return;
|
|
27399
27399
|
}
|
|
27400
|
-
|
|
27400
|
+
L = bind(this, function(J) {
|
|
27401
27401
|
this.init([], function() {
|
|
27402
|
-
return
|
|
27402
|
+
return J;
|
|
27403
27403
|
}, null, {
|
|
27404
27404
|
enabled: !0
|
|
27405
27405
|
});
|
|
27406
|
-
}),
|
|
27407
|
-
this.inited = !0, this.error =
|
|
27408
|
-
|
|
27409
|
-
}), T(
|
|
27410
|
-
}),
|
|
27411
|
-
var
|
|
27412
|
-
|
|
27406
|
+
}), L.error = bind(this, function(J) {
|
|
27407
|
+
this.inited = !0, this.error = J, J.requireModules = [E], eachProp(l, function(Z) {
|
|
27408
|
+
Z.map.id.indexOf(E + "_unnormalized") === 0 && B(Z.map.id);
|
|
27409
|
+
}), T(J);
|
|
27410
|
+
}), L.fromText = bind(this, function(J, Z) {
|
|
27411
|
+
var Q = A.name, ne = I(Q), te = useInteractive;
|
|
27412
|
+
Z && (J = Z), te && (useInteractive = !1), F(ne), hasProp(i.config, E) && (i.config[Q] = i.config[E]);
|
|
27413
27413
|
try {
|
|
27414
|
-
req.exec(
|
|
27415
|
-
} catch (
|
|
27414
|
+
req.exec(J);
|
|
27415
|
+
} catch (se) {
|
|
27416
27416
|
return T(makeError(
|
|
27417
27417
|
"fromtexteval",
|
|
27418
|
-
"fromText eval for " + E + " failed: " +
|
|
27419
|
-
|
|
27418
|
+
"fromText eval for " + E + " failed: " + se,
|
|
27419
|
+
se,
|
|
27420
27420
|
[E]
|
|
27421
27421
|
));
|
|
27422
27422
|
}
|
|
27423
|
-
te && (useInteractive = !0), this.depMaps.push(
|
|
27424
|
-
}),
|
|
27423
|
+
te && (useInteractive = !0), this.depMaps.push(ne), o.completeLoad(Q), X([Q], L);
|
|
27424
|
+
}), V.load(A.name, X, L, i);
|
|
27425
27425
|
})), o.enable(z, this), this.pluginMaps[z.id] = z;
|
|
27426
27426
|
},
|
|
27427
27427
|
enable: function() {
|
|
27428
27428
|
c[this.map.id] = this, this.enabled = !0, this.enabling = !0, each(this.depMaps, bind(this, function(A, E) {
|
|
27429
|
-
var z,
|
|
27429
|
+
var z, V, L;
|
|
27430
27430
|
if (typeof A == "string") {
|
|
27431
27431
|
if (A = I(
|
|
27432
27432
|
A,
|
|
27433
27433
|
this.map.isDefine ? this.map : this.map.parentMap,
|
|
27434
27434
|
!1,
|
|
27435
27435
|
!this.skipMap
|
|
27436
|
-
), this.depMaps[E] = A,
|
|
27437
|
-
this.depExports[E] =
|
|
27436
|
+
), this.depMaps[E] = A, L = getOwn(r, A.id), L) {
|
|
27437
|
+
this.depExports[E] = L(this);
|
|
27438
27438
|
return;
|
|
27439
27439
|
}
|
|
27440
27440
|
this.depCount += 1, w(A, "defined", bind(this, function(G) {
|
|
@@ -27443,7 +27443,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27443
27443
|
this.emit("error", G);
|
|
27444
27444
|
}));
|
|
27445
27445
|
}
|
|
27446
|
-
z = A.id,
|
|
27446
|
+
z = A.id, V = l[z], !hasProp(r, z) && V && !V.enabled && o.enable(A, this);
|
|
27447
27447
|
})), eachProp(this.pluginMaps, bind(this, function(A) {
|
|
27448
27448
|
var E = getOwn(l, A.id);
|
|
27449
27449
|
E && !E.enabled && o.enable(A, this);
|
|
@@ -27462,8 +27462,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27462
27462
|
function j(A) {
|
|
27463
27463
|
hasProp(p, A[0]) || F(I(A[0], null, !0)).init(A[1], A[2]);
|
|
27464
27464
|
}
|
|
27465
|
-
function R(A, E, z,
|
|
27466
|
-
A.detachEvent && !isOpera ?
|
|
27465
|
+
function R(A, E, z, V) {
|
|
27466
|
+
A.detachEvent && !isOpera ? V && A.detachEvent(V, E) : A.removeEventListener(z, E, !1);
|
|
27467
27467
|
}
|
|
27468
27468
|
function O(A) {
|
|
27469
27469
|
var E = A.currentTarget || A.srcElement;
|
|
@@ -27500,31 +27500,31 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27500
27500
|
configure: function(A) {
|
|
27501
27501
|
if (A.baseUrl && A.baseUrl.charAt(A.baseUrl.length - 1) !== "/" && (A.baseUrl += "/"), typeof A.urlArgs == "string") {
|
|
27502
27502
|
var E = A.urlArgs;
|
|
27503
|
-
A.urlArgs = function(
|
|
27503
|
+
A.urlArgs = function(L, G) {
|
|
27504
27504
|
return (G.indexOf("?") === -1 ? "?" : "&") + E;
|
|
27505
27505
|
};
|
|
27506
27506
|
}
|
|
27507
|
-
var z = i.shim,
|
|
27507
|
+
var z = i.shim, V = {
|
|
27508
27508
|
paths: !0,
|
|
27509
27509
|
bundles: !0,
|
|
27510
27510
|
config: !0,
|
|
27511
27511
|
map: !0
|
|
27512
27512
|
};
|
|
27513
|
-
eachProp(A, function(
|
|
27514
|
-
|
|
27515
|
-
}), A.bundles && eachProp(A.bundles, function(
|
|
27516
|
-
each(
|
|
27513
|
+
eachProp(A, function(L, G) {
|
|
27514
|
+
V[G] ? (i[G] || (i[G] = {}), mixin(i[G], L, !0, !0)) : i[G] = L;
|
|
27515
|
+
}), A.bundles && eachProp(A.bundles, function(L, G) {
|
|
27516
|
+
each(L, function(H) {
|
|
27517
27517
|
H !== G && (h[H] = G);
|
|
27518
27518
|
});
|
|
27519
|
-
}), A.shim && (eachProp(A.shim, function(
|
|
27520
|
-
isArray(
|
|
27521
|
-
deps:
|
|
27522
|
-
}), (
|
|
27523
|
-
}), i.shim = z), A.packages && each(A.packages, function(
|
|
27519
|
+
}), A.shim && (eachProp(A.shim, function(L, G) {
|
|
27520
|
+
isArray(L) && (L = {
|
|
27521
|
+
deps: L
|
|
27522
|
+
}), (L.exports || L.init) && !L.exportsFn && (L.exportsFn = o.makeShimExports(L)), z[G] = L;
|
|
27523
|
+
}), i.shim = z), A.packages && each(A.packages, function(L) {
|
|
27524
27524
|
var G, H;
|
|
27525
|
-
|
|
27526
|
-
}), eachProp(l, function(
|
|
27527
|
-
!
|
|
27525
|
+
L = typeof L == "string" ? { name: L } : L, H = L.name, G = L.location, G && (i.paths[H] = L.location), i.pkgs[H] = L.name + "/" + (L.main || "main").replace(currDirRegExp, "").replace(jsSuffixRegExp, "");
|
|
27526
|
+
}), eachProp(l, function(L, G) {
|
|
27527
|
+
!L.inited && !L.map.unnormalized && (L.map = I(G, null, !0));
|
|
27528
27528
|
}), (A.deps || A.callback) && o.require(A.deps || [], A.callback);
|
|
27529
27529
|
},
|
|
27530
27530
|
makeShimExports: function(A) {
|
|
@@ -27536,10 +27536,10 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27536
27536
|
},
|
|
27537
27537
|
makeRequire: function(A, E) {
|
|
27538
27538
|
E = E || {};
|
|
27539
|
-
function z(
|
|
27539
|
+
function z(V, L, G) {
|
|
27540
27540
|
var H, U, K;
|
|
27541
|
-
return E.enableBuildCallback &&
|
|
27542
|
-
$(), K = F(I(null, A)), K.skipMap = E.skipMap, K.init(
|
|
27541
|
+
return E.enableBuildCallback && L && isFunction(L) && (L.__requireJsBuild = !0), typeof V == "string" ? isFunction(L) ? T(makeError("requireargs", "Invalid require call"), G) : A && hasProp(r, V) ? r[V](l[A.id]) : req.get ? req.get(o, V, A, z) : (U = I(V, A, !1, !0), H = U.id, hasProp(p, H) ? p[H] : T(makeError("notloaded", 'Module name "' + H + '" has not been loaded yet for context: ' + e + (A ? "" : ". Use require([])")))) : ($(), o.nextTick(function() {
|
|
27542
|
+
$(), K = F(I(null, A)), K.skipMap = E.skipMap, K.init(V, L, G, {
|
|
27543
27543
|
enabled: !0
|
|
27544
27544
|
}), M();
|
|
27545
27545
|
}), z);
|
|
@@ -27551,26 +27551,26 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27551
27551
|
* *Requires* the use of a module name. It does not support using
|
|
27552
27552
|
* plain URLs like nameToUrl.
|
|
27553
27553
|
*/
|
|
27554
|
-
toUrl: function(
|
|
27555
|
-
var
|
|
27556
|
-
return G !== -1 && (!U || G > 1) && (
|
|
27557
|
-
|
|
27554
|
+
toUrl: function(V) {
|
|
27555
|
+
var L, G = V.lastIndexOf("."), H = V.split("/")[0], U = H === "." || H === "..";
|
|
27556
|
+
return G !== -1 && (!U || G > 1) && (L = V.substring(G, V.length), V = V.substring(0, G)), o.nameToUrl(b(
|
|
27557
|
+
V,
|
|
27558
27558
|
A && A.id,
|
|
27559
27559
|
!0
|
|
27560
|
-
),
|
|
27560
|
+
), L, !0);
|
|
27561
27561
|
},
|
|
27562
|
-
defined: function(
|
|
27563
|
-
return hasProp(p, I(
|
|
27562
|
+
defined: function(V) {
|
|
27563
|
+
return hasProp(p, I(V, A, !1, !0).id);
|
|
27564
27564
|
},
|
|
27565
|
-
specified: function(
|
|
27566
|
-
return
|
|
27565
|
+
specified: function(V) {
|
|
27566
|
+
return V = I(V, A, !1, !0).id, hasProp(p, V) || hasProp(l, V);
|
|
27567
27567
|
}
|
|
27568
|
-
}), A || (z.undef = function(
|
|
27568
|
+
}), A || (z.undef = function(V) {
|
|
27569
27569
|
D();
|
|
27570
|
-
var
|
|
27571
|
-
G.undefed = !0, S(
|
|
27572
|
-
H[0] ===
|
|
27573
|
-
}), delete o.defQueueMap[
|
|
27570
|
+
var L = I(V, A, !0), G = getOwn(l, V);
|
|
27571
|
+
G.undefed = !0, S(V), delete p[V], delete m[L.url], delete u[V], eachReverse(d, function(H, U) {
|
|
27572
|
+
H[0] === V && d.splice(U, 1);
|
|
27573
|
+
}), delete o.defQueueMap[V], G && (G.events.defined && (u[V] = G.events), B(V));
|
|
27574
27574
|
}), z;
|
|
27575
27575
|
},
|
|
27576
27576
|
/**
|
|
@@ -27590,7 +27590,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27590
27590
|
* @param {String} moduleName the name of the module to potentially complete.
|
|
27591
27591
|
*/
|
|
27592
27592
|
completeLoad: function(A) {
|
|
27593
|
-
var E, z,
|
|
27593
|
+
var E, z, V, L = getOwn(i.shim, A) || {}, G = L.exports;
|
|
27594
27594
|
for (D(); d.length; ) {
|
|
27595
27595
|
if (z = d.shift(), z[0] === null) {
|
|
27596
27596
|
if (z[0] = A, E)
|
|
@@ -27600,7 +27600,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27600
27600
|
z[0] === A && (E = !0);
|
|
27601
27601
|
j(z);
|
|
27602
27602
|
}
|
|
27603
|
-
if (o.defQueueMap = {},
|
|
27603
|
+
if (o.defQueueMap = {}, V = getOwn(l, A), !E && !hasProp(p, A) && V && !V.inited) {
|
|
27604
27604
|
if (i.enforceDefine && (!G || !getGlobal(G)))
|
|
27605
27605
|
return y(A) ? void 0 : T(makeError(
|
|
27606
27606
|
"nodefine",
|
|
@@ -27608,7 +27608,7 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27608
27608
|
null,
|
|
27609
27609
|
[A]
|
|
27610
27610
|
));
|
|
27611
|
-
j([A,
|
|
27611
|
+
j([A, L.deps || [], L.exportsFn]);
|
|
27612
27612
|
}
|
|
27613
27613
|
M();
|
|
27614
27614
|
},
|
|
@@ -27620,18 +27620,18 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27620
27620
|
* internal API, not a public one. Use toUrl for the public API.
|
|
27621
27621
|
*/
|
|
27622
27622
|
nameToUrl: function(A, E, z) {
|
|
27623
|
-
var
|
|
27623
|
+
var V, L, G, H, U, K, Y, X = getOwn(i.pkgs, A);
|
|
27624
27624
|
if (X && (A = X), Y = getOwn(h, A), Y)
|
|
27625
27625
|
return o.nameToUrl(Y, E, z);
|
|
27626
27626
|
if (req.jsExtRegExp.test(A))
|
|
27627
27627
|
U = A + (E || "");
|
|
27628
27628
|
else {
|
|
27629
|
-
for (
|
|
27630
|
-
if (H =
|
|
27631
|
-
isArray(K) && (K = K[0]),
|
|
27629
|
+
for (V = i.paths, L = A.split("/"), G = L.length; G > 0; G -= 1)
|
|
27630
|
+
if (H = L.slice(0, G).join("/"), K = getOwn(V, H), K) {
|
|
27631
|
+
isArray(K) && (K = K[0]), L.splice(0, G, K);
|
|
27632
27632
|
break;
|
|
27633
27633
|
}
|
|
27634
|
-
U =
|
|
27634
|
+
U = L.join("/"), U += E || (/^data\:|^blob\:|\?/.test(U) || z ? "" : ".js"), U = (U.charAt(0) === "/" || U.match(/^[\w\+\.\-]+:/) ? "" : i.baseUrl) + U;
|
|
27635
27635
|
}
|
|
27636
27636
|
return i.urlArgs && !/^blob\:/.test(U) ? U + i.urlArgs(A, U) : U;
|
|
27637
27637
|
},
|
|
@@ -27647,8 +27647,8 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27647
27647
|
*
|
|
27648
27648
|
* @private
|
|
27649
27649
|
*/
|
|
27650
|
-
execCb: function(A, E, z,
|
|
27651
|
-
return E.apply(
|
|
27650
|
+
execCb: function(A, E, z, V) {
|
|
27651
|
+
return E.apply(V, z);
|
|
27652
27652
|
},
|
|
27653
27653
|
/**
|
|
27654
27654
|
* callback for script loads, used to check status of loading.
|
|
@@ -27670,10 +27670,10 @@ https://requirejs.org/docs/errors.html#` + e);
|
|
|
27670
27670
|
var E = O(A);
|
|
27671
27671
|
if (!y(E.id)) {
|
|
27672
27672
|
var z = [];
|
|
27673
|
-
return eachProp(l, function(
|
|
27674
|
-
|
|
27673
|
+
return eachProp(l, function(V, L) {
|
|
27674
|
+
L.indexOf("_@r") !== 0 && each(V.depMaps, function(G) {
|
|
27675
27675
|
if (G.id === E.id)
|
|
27676
|
-
return z.push(
|
|
27676
|
+
return z.push(L), !0;
|
|
27677
27677
|
});
|
|
27678
27678
|
}), T(makeError("scripterror", 'Script error for "' + E.id + (z.length ? '", needed by: ' + z.join(", ") : '"'), A, [E.id]));
|
|
27679
27679
|
}
|
|
@@ -29576,7 +29576,7 @@ const useCreateActionProps = () => {
|
|
|
29576
29576
|
return {
|
|
29577
29577
|
onClick() {
|
|
29578
29578
|
return q(this, null, function* () {
|
|
29579
|
-
var E, z,
|
|
29579
|
+
var E, z, V, L, G, H;
|
|
29580
29580
|
const w = u.map((U) => U.name), {
|
|
29581
29581
|
assignedValues: T = {},
|
|
29582
29582
|
onSuccess: D,
|
|
@@ -29603,7 +29603,7 @@ const useCreateActionProps = () => {
|
|
|
29603
29603
|
});
|
|
29604
29604
|
if (j) {
|
|
29605
29605
|
const U = p();
|
|
29606
|
-
A[(
|
|
29606
|
+
A[(V = U == null ? void 0 : U.name) != null ? V : "parent"] = f, A[(L = U == null ? void 0 : U.foreignKey) != null ? L : "parentId"] = f.id;
|
|
29607
29607
|
}
|
|
29608
29608
|
c.data = t.data || {}, c.data.loading = !0;
|
|
29609
29609
|
try {
|
|
@@ -29733,10 +29733,10 @@ const useCreateActionProps = () => {
|
|
|
29733
29733
|
successMessage: B,
|
|
29734
29734
|
actionAfterSuccess: N
|
|
29735
29735
|
} = v || {}, M = {}, j = Object.keys(y).map((E) => q(this, null, function* () {
|
|
29736
|
-
const z = y[E],
|
|
29736
|
+
const z = y[E], V = g(E);
|
|
29737
29737
|
if (isVariable$1(z)) {
|
|
29738
|
-
const { value:
|
|
29739
|
-
M[E] = transformVariableValue(
|
|
29738
|
+
const { value: L } = (yield p == null ? void 0 : p.parseVariable(z, m)) || {};
|
|
29739
|
+
M[E] = transformVariableValue(L, { targetCollectionField: V });
|
|
29740
29740
|
} else
|
|
29741
29741
|
z !== "" && (M[E] = z);
|
|
29742
29742
|
}));
|
|
@@ -29747,7 +29747,7 @@ const useCreateActionProps = () => {
|
|
|
29747
29747
|
filterByTk: r,
|
|
29748
29748
|
values: x({}, M),
|
|
29749
29749
|
// TODO(refactor): should change to inject by plugin
|
|
29750
|
-
triggerWorkflows: F != null && F.length ? F.map((
|
|
29750
|
+
triggerWorkflows: F != null && F.length ? F.map((V) => [V.workflowKey, V.context].filter(Boolean).join("!")).join(",") : void 0
|
|
29751
29751
|
});
|
|
29752
29752
|
let z = D;
|
|
29753
29753
|
if (D && (z = yield getVariableValue(D, {
|
|
@@ -29785,13 +29785,13 @@ const useCreateActionProps = () => {
|
|
|
29785
29785
|
updateMode: B
|
|
29786
29786
|
} = (E = a == null ? void 0 : a["x-action-settings"]) != null ? E : {}, { manualClose: N, redirecting: M, redirectTo: j, successMessage: R, actionAfterSuccess: O } = D || {};
|
|
29787
29787
|
m.data = e.data || {}, m.data.loading = !0;
|
|
29788
|
-
const $ = {}, A = Object.keys(T).map((
|
|
29789
|
-
const
|
|
29790
|
-
if (isVariable$1(
|
|
29791
|
-
const { value: H } = (yield g == null ? void 0 : g.parseVariable(
|
|
29792
|
-
$[
|
|
29788
|
+
const $ = {}, A = Object.keys(T).map((V) => q(this, null, function* () {
|
|
29789
|
+
const L = T[V], G = C(V);
|
|
29790
|
+
if (isVariable$1(L)) {
|
|
29791
|
+
const { value: H } = (yield g == null ? void 0 : g.parseVariable(L, b)) || {};
|
|
29792
|
+
$[V] = transformVariableValue(H, { targetCollectionField: G });
|
|
29793
29793
|
} else
|
|
29794
|
-
|
|
29794
|
+
L !== "" && ($[V] = L);
|
|
29795
29795
|
}));
|
|
29796
29796
|
yield Promise.all(A), (O === "previous" || !O && M !== !0) && (S == null || S(!1)), h.confirm({
|
|
29797
29797
|
title: p("Bulk update"),
|
|
@@ -29799,9 +29799,9 @@ const useCreateActionProps = () => {
|
|
|
29799
29799
|
onOk() {
|
|
29800
29800
|
return q(this, null, function* () {
|
|
29801
29801
|
var G, H, U, K;
|
|
29802
|
-
const { filter:
|
|
29802
|
+
const { filter: V } = (H = (G = o.params) == null ? void 0 : G[0]) != null ? H : {}, L = {
|
|
29803
29803
|
values: x({}, $),
|
|
29804
|
-
filter:
|
|
29804
|
+
filter: V,
|
|
29805
29805
|
forceUpdate: !1
|
|
29806
29806
|
};
|
|
29807
29807
|
if (B === "selected") {
|
|
@@ -29809,11 +29809,11 @@ const useCreateActionProps = () => {
|
|
|
29809
29809
|
message.error(p("Please select the records to be updated")), m.data.loading = !1;
|
|
29810
29810
|
return;
|
|
29811
29811
|
}
|
|
29812
|
-
|
|
29812
|
+
L.filter = { $and: [{ [l || "id"]: { $in: c } }] };
|
|
29813
29813
|
}
|
|
29814
|
-
|
|
29814
|
+
L.filter || (L.forceUpdate = !0);
|
|
29815
29815
|
try {
|
|
29816
|
-
yield t.update(
|
|
29816
|
+
yield t.update(L);
|
|
29817
29817
|
} catch (Y) {
|
|
29818
29818
|
} finally {
|
|
29819
29819
|
m.data.loading = !1;
|
|
@@ -29841,8 +29841,8 @@ const useCreateActionProps = () => {
|
|
|
29841
29841
|
return {
|
|
29842
29842
|
onClick() {
|
|
29843
29843
|
return q(this, null, function* () {
|
|
29844
|
-
var
|
|
29845
|
-
const { skipValidator: F, onSuccess: w, requestSettings: T } = (
|
|
29844
|
+
var V, L, G, H;
|
|
29845
|
+
const { skipValidator: F, onSuccess: w, requestSettings: T } = (V = o == null ? void 0 : o["x-action-settings"]) != null ? V : {}, { manualClose: D, redirecting: B, redirectTo: N, successMessage: M, actionAfterSuccess: j } = w || {}, R = o == null ? void 0 : o["x-action"];
|
|
29846
29846
|
if (!T.url)
|
|
29847
29847
|
return;
|
|
29848
29848
|
F !== !0 && R === "customize:form:request" && (yield a.submit());
|
|
@@ -29868,7 +29868,7 @@ const useCreateActionProps = () => {
|
|
|
29868
29868
|
};
|
|
29869
29869
|
f.data = c.data || {}, f.data.loading = !0;
|
|
29870
29870
|
try {
|
|
29871
|
-
yield e.request(x({}, z)), f.data.loading = !1, u instanceof TableFieldResource || (G = (
|
|
29871
|
+
yield e.request(x({}, z)), f.data.loading = !1, u instanceof TableFieldResource || (G = (L = d == null ? void 0 : d.service) == null ? void 0 : L.refresh) == null || G.call(L), (H = p == null ? void 0 : p.refresh) == null || H.call(p), R === "customize:form:request" && (j === "previous" || !j && B !== !0) && (b == null || b(!1)), M || (message.success(C("Saved successfully")), yield resetFormCorrectly(a), (B && !j || j === "redirect") && N && (isURL(N) ? window.location.href = N : t(N))), D ? S.success({
|
|
29872
29872
|
title: r(M),
|
|
29873
29873
|
onOk: () => q(this, null, function* () {
|
|
29874
29874
|
(B && !j || j === "redirect") && N && (isURL(N) ? window.location.href = N : t(N));
|
|
@@ -29885,14 +29885,14 @@ const useCreateActionProps = () => {
|
|
|
29885
29885
|
return {
|
|
29886
29886
|
onClick(I, F) {
|
|
29887
29887
|
return q(this, null, function* () {
|
|
29888
|
-
var
|
|
29888
|
+
var L, G;
|
|
29889
29889
|
const {
|
|
29890
29890
|
assignedValues: w = {},
|
|
29891
29891
|
onSuccess: T,
|
|
29892
29892
|
overwriteValues: D,
|
|
29893
29893
|
skipValidator: B,
|
|
29894
29894
|
triggerWorkflows: N
|
|
29895
|
-
} = (
|
|
29895
|
+
} = (L = l == null ? void 0 : l["x-action-settings"]) != null ? L : {}, {
|
|
29896
29896
|
manualClose: M,
|
|
29897
29897
|
redirecting: j,
|
|
29898
29898
|
redirectTo: R,
|
|
@@ -29907,7 +29907,7 @@ const useCreateActionProps = () => {
|
|
|
29907
29907
|
U !== "" && (A[H] = U);
|
|
29908
29908
|
}));
|
|
29909
29909
|
yield Promise.all(E), B || (yield e.submit());
|
|
29910
|
-
const z = u.map((H) => H.name),
|
|
29910
|
+
const z = u.map((H) => H.name), V = getFormValues({
|
|
29911
29911
|
filterByTk: t,
|
|
29912
29912
|
field: n,
|
|
29913
29913
|
form: e,
|
|
@@ -29920,7 +29920,7 @@ const useCreateActionProps = () => {
|
|
|
29920
29920
|
try {
|
|
29921
29921
|
const H = yield o.update(P(x({
|
|
29922
29922
|
filterByTk: t,
|
|
29923
|
-
values: x(x(x({},
|
|
29923
|
+
values: x(x(x({}, V), D), A)
|
|
29924
29924
|
}, C), {
|
|
29925
29925
|
updateAssociationValues: g,
|
|
29926
29926
|
// TODO(refactor): should change to inject by plugin
|
|
@@ -30280,25 +30280,25 @@ const useCreateActionProps = () => {
|
|
|
30280
30280
|
var H, U, K, Y;
|
|
30281
30281
|
if (!O.find((X) => X.uid === A.uid))
|
|
30282
30282
|
return;
|
|
30283
|
-
const z = `${$}${t.name}`,
|
|
30283
|
+
const z = `${$}${t.name}`, V = ((H = A.service.params) == null ? void 0 : H[0]) || {};
|
|
30284
30284
|
(K = (U = A.service.params) == null ? void 0 : U[1]) != null && K.filters || _.set(A.service.params, "[1].filters", {});
|
|
30285
|
-
const
|
|
30285
|
+
const L = A.service.params[1].filters;
|
|
30286
30286
|
if (R.length)
|
|
30287
|
-
|
|
30287
|
+
L[z] = {
|
|
30288
30288
|
[S]: R
|
|
30289
30289
|
};
|
|
30290
30290
|
else {
|
|
30291
30291
|
if ((Y = A.clearSelection) == null || Y.call(A), A.dataLoadingMode === "manual")
|
|
30292
30292
|
return A.clearData();
|
|
30293
|
-
delete
|
|
30293
|
+
delete L[z];
|
|
30294
30294
|
}
|
|
30295
|
-
const G = mergeFilter([...Object.values(
|
|
30295
|
+
const G = mergeFilter([...Object.values(L), A.defaultFilter]);
|
|
30296
30296
|
return A.doFilter(
|
|
30297
|
-
P(x({},
|
|
30297
|
+
P(x({}, V), {
|
|
30298
30298
|
page: 1,
|
|
30299
30299
|
filter: G
|
|
30300
30300
|
}),
|
|
30301
|
-
{ filters:
|
|
30301
|
+
{ filters: L }
|
|
30302
30302
|
);
|
|
30303
30303
|
});
|
|
30304
30304
|
},
|
|
@@ -32011,13 +32011,15 @@ const formItemWrapCss = css`
|
|
|
32011
32011
|
}
|
|
32012
32012
|
`, FormItem = withDynamicSchemaProps(
|
|
32013
32013
|
observer$1((e) => {
|
|
32014
|
-
var
|
|
32014
|
+
var d, p, m, h;
|
|
32015
32015
|
useEnsureOperatorsValid();
|
|
32016
32016
|
const t = useField(), n = useFieldSchema(), { addActiveFieldName: o } = useFormActiveFields() || {}, { wrapperStyle: r } = useDataFormItemProps(), { t: a } = useTranslation();
|
|
32017
|
-
useParseDefaultValue(), useLazyLoadDisplayAssociationFieldsOfForm(), useLinkageRulesForSubTableOrSubForm()
|
|
32017
|
+
useParseDefaultValue(), useLazyLoadDisplayAssociationFieldsOfForm(), useLinkageRulesForSubTableOrSubForm();
|
|
32018
|
+
const { isInSubTable: i } = useFlag();
|
|
32019
|
+
useEffect(() => {
|
|
32018
32020
|
o == null || o(n.name);
|
|
32019
32021
|
}, [o, n.name]), t.title = t.title && a(t.title, { ns: NAMESPACE_UI_SCHEMA });
|
|
32020
|
-
const
|
|
32022
|
+
const l = (p = (d = n["x-decorator-props"]) == null ? void 0 : d.showTitle) != null ? p : !0, c = useMemo(() => {
|
|
32021
32023
|
if (t.description && t.description !== "")
|
|
32022
32024
|
return typeof t.description == "string" ? /* @__PURE__ */ jsx(
|
|
32023
32025
|
"div",
|
|
@@ -32028,27 +32030,41 @@ const formItemWrapCss = css`
|
|
|
32028
32030
|
}
|
|
32029
32031
|
}
|
|
32030
32032
|
) : t.description;
|
|
32031
|
-
}, [t.description]),
|
|
32032
|
-
[formItemLabelCss]:
|
|
32033
|
-
}), [
|
|
32034
|
-
return (
|
|
32033
|
+
}, [t.description]), u = useMemo(() => cx(formItemWrapCss, {
|
|
32034
|
+
[formItemLabelCss]: l === !1
|
|
32035
|
+
}), [l]);
|
|
32036
|
+
return (m = t.data) != null && m.hidden ? null : /* @__PURE__ */ jsx(VariableScope, { scopeId: n == null ? void 0 : n["x-uid"], type: "formItem", children: /* @__PURE__ */ jsx(CollectionFieldProvider, { allowNull: !0, children: /* @__PURE__ */ jsx(
|
|
32035
32037
|
BlockItem,
|
|
32036
32038
|
{
|
|
32037
32039
|
className: cx(
|
|
32038
32040
|
"nb-form-item",
|
|
32039
32041
|
css`
|
|
32040
32042
|
.ant-formily-item-layout-horizontal .ant-formily-item-control {
|
|
32041
|
-
max-width: ${
|
|
32043
|
+
max-width: ${l === !1 || n["x-component"] !== "CollectionField" ? "100% !important" : null};
|
|
32042
32044
|
}
|
|
32043
32045
|
`
|
|
32044
32046
|
),
|
|
32045
32047
|
children: /* @__PURE__ */ jsx(ACLCollectionFieldProvider, { children: /* @__PURE__ */ jsx(
|
|
32046
32048
|
FormItem$1,
|
|
32047
32049
|
P(x({
|
|
32048
|
-
className:
|
|
32050
|
+
className: u
|
|
32049
32051
|
}, e), {
|
|
32050
|
-
extra:
|
|
32051
|
-
wrapperStyle: x(x({}, r.backgroundColor ? { paddingLeft: "5px", paddingRight: "5px" } : {}), r)
|
|
32052
|
+
extra: c,
|
|
32053
|
+
wrapperStyle: x(x({}, r.backgroundColor ? { paddingLeft: "5px", paddingRight: "5px" } : {}), r),
|
|
32054
|
+
feedbackText: i && ((h = t.errors) != null && h.length) ? /* @__PURE__ */ jsx(
|
|
32055
|
+
EllipsisWithTooltip,
|
|
32056
|
+
{
|
|
32057
|
+
ellipsis: !0,
|
|
32058
|
+
style: {
|
|
32059
|
+
color: "red",
|
|
32060
|
+
maxWidth: 300,
|
|
32061
|
+
whiteSpace: "normal",
|
|
32062
|
+
wordBreak: "break-word",
|
|
32063
|
+
width: "100%"
|
|
32064
|
+
},
|
|
32065
|
+
children: /* @__PURE__ */ jsx("div", { style: { cursor: "pointer" }, children: t.errors.map((g) => g.messages).join(", ") })
|
|
32066
|
+
}
|
|
32067
|
+
) : null
|
|
32052
32068
|
})
|
|
32053
32069
|
) })
|
|
32054
32070
|
}
|
|
@@ -38053,10 +38069,10 @@ const enabledIndexColumn$1 = {
|
|
|
38053
38069
|
name: "fieldSettings:component:CascadeSelect",
|
|
38054
38070
|
items: [fieldComponent$6, titleField$1, ellipsisSettingsItem, setTheDataScope]
|
|
38055
38071
|
}), SchemaSettingsDateRange = function e(t) {
|
|
38056
|
-
var w, T, D, B, N, M, j, R, O, $, A, E, z,
|
|
38072
|
+
var w, T, D, B, N, M, j, R, O, $, A, E, z, V, L, G;
|
|
38057
38073
|
const { fieldSchema: n } = t, o = useField(), { dn: r } = useDesignable(), { t: a } = useTranslation(), { getCollectionJoinField: i } = useCollectionManager_deprecated(), { isInSubForm: l, isInSubTable: c } = useFlag() || {}, u = i(n == null ? void 0 : n["x-collection-field"]) || {}, d = ((w = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : w.showTime) || ((D = (T = u == null ? void 0 : u.uiSchema) == null ? void 0 : T["x-component-props"]) == null ? void 0 : D.showTime) || !1, p = ((B = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : B.dateFormat) || ((M = (N = u == null ? void 0 : u.uiSchema) == null ? void 0 : N["x-component-props"]) == null ? void 0 : M.dateFormat) || "YYYY-MM-DD", m = ((j = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : j.timeFormat) || ((O = (R = u == null ? void 0 : u.uiSchema) == null ? void 0 : R["x-component-props"]) == null ? void 0 : O.timeFormat) || "HH:mm:ss", h = (($ = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : $.picker) || ((E = (A = u == null ? void 0 : u.uiSchema) == null ? void 0 : A["x-component-props"]) == null ? void 0 : E.picker) || "date";
|
|
38058
38074
|
n["x-read-pretty"] || o.readOnly || o.readPretty;
|
|
38059
|
-
const g = (z = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : z._minDate, f = (
|
|
38075
|
+
const g = (z = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : z._minDate, f = (V = n == null ? void 0 : n["x-component-props"]) == null ? void 0 : V._maxDate, C = ((L = u == null ? void 0 : u.uiSchema) == null ? void 0 : L["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(
|
|
38060
38076
|
(H) => /* @__PURE__ */ jsx(
|
|
38061
38077
|
SchemaComponent,
|
|
38062
38078
|
{
|
|
@@ -39553,11 +39569,11 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
39553
39569
|
};
|
|
39554
39570
|
if (_.isFunction(F))
|
|
39555
39571
|
break;
|
|
39556
|
-
const A = y[$], E = y.slice(0, $ + 1).join("."), { fieldPath: z } = getFieldPath$1(E, I),
|
|
39572
|
+
const A = y[$], E = y.slice(0, $ + 1).join("."), { fieldPath: z } = getFieldPath$1(E, I), V = r(z, T), L = (O = a(B, T)) == null ? void 0 : O.getPrimaryKey();
|
|
39557
39573
|
if (Array.isArray(F)) {
|
|
39558
39574
|
const G = F.map((H) => {
|
|
39559
|
-
if (!(S != null && S.doNotRequest) && shouldToRequest(H == null ? void 0 : H[A], H, E) && (H == null ? void 0 : H[
|
|
39560
|
-
const U = `/${B}/${H[
|
|
39575
|
+
if (!(S != null && S.doNotRequest) && shouldToRequest(H == null ? void 0 : H[A], H, E) && (H == null ? void 0 : H[L]) != null && V != null && V.target) {
|
|
39576
|
+
const U = `/${B}/${H[V.sourceKey || L]}/${A}:${getAction(V.type)}`;
|
|
39561
39577
|
if (hasRequested(U))
|
|
39562
39578
|
return getRequested(U);
|
|
39563
39579
|
const K = o.request({
|
|
@@ -39571,9 +39587,9 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
39571
39587
|
}
|
|
39572
39588
|
return H == null ? void 0 : H[A];
|
|
39573
39589
|
});
|
|
39574
|
-
F = removeThroughCollectionFields(_.flatten(yield Promise.all(G)),
|
|
39575
|
-
} else if (!(S != null && S.doNotRequest) && shouldToRequest(F[A], F, E) && F[
|
|
39576
|
-
const G = `/${B}/${F[
|
|
39590
|
+
F = removeThroughCollectionFields(_.flatten(yield Promise.all(G)), V);
|
|
39591
|
+
} else if (!(S != null && S.doNotRequest) && shouldToRequest(F[A], F, E) && F[L] != null && (V != null && V.target)) {
|
|
39592
|
+
const G = `/${B}/${F[V.sourceKey || L]}/${A}:${getAction(V.type)}`;
|
|
39577
39593
|
let H = null;
|
|
39578
39594
|
if (hasRequested(G))
|
|
39579
39595
|
H = yield getRequested(G);
|
|
@@ -39588,10 +39604,10 @@ const variablesStore = {}, getFieldPath$1 = (e, t) => {
|
|
|
39588
39604
|
stashRequested(G, K), H = yield K, clearRequested(G);
|
|
39589
39605
|
}
|
|
39590
39606
|
const U = H.data.data;
|
|
39591
|
-
F = removeThroughCollectionFields(U,
|
|
39607
|
+
F = removeThroughCollectionFields(U, V);
|
|
39592
39608
|
} else
|
|
39593
|
-
F = removeThroughCollectionFields(getValuesByPath(F, A),
|
|
39594
|
-
|
|
39609
|
+
F = removeThroughCollectionFields(getValuesByPath(F, A), V);
|
|
39610
|
+
V != null && V.target && (B = V.target);
|
|
39595
39611
|
}
|
|
39596
39612
|
const j = i(
|
|
39597
39613
|
_.isFunction(F) ? yield F({
|
|
@@ -40183,31 +40199,31 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40183
40199
|
]), v = useDesigner(), I = useField(), F = useFieldSchema(), w = useCompile(), T = useCollectionRecordData(), D = w((Y = F["x-component-props"]) == null ? void 0 : Y.confirm) || g, B = useMemo(
|
|
40184
40200
|
() => {
|
|
40185
40201
|
var X;
|
|
40186
|
-
return ((X = F == null ? void 0 : F["x-linkage-rules"]) == null ? void 0 : X.filter((
|
|
40202
|
+
return ((X = F == null ? void 0 : F["x-linkage-rules"]) == null ? void 0 : X.filter((J) => !J.disabled)) || [];
|
|
40187
40203
|
},
|
|
40188
40204
|
[F == null ? void 0 : F["x-linkage-rules"]]
|
|
40189
|
-
), { designable: N } = useDesignable(), M = useComponent(o) || o, j = useVariables$1(), R = useLocalVariables$1(), { visibleWithURL: O, setVisibleWithURL: $ } = usePopupUtils(), { setSubmitted: A } = useActionContext(), { getAriaLabel: E } = useGetAriaLabelOfAction(l), z = useCollectionParentRecordData(),
|
|
40205
|
+
), { designable: N } = useDesignable(), M = useComponent(o) || o, j = useVariables$1(), R = useLocalVariables$1(), { visibleWithURL: O, setVisibleWithURL: $ } = usePopupUtils(), { setSubmitted: A } = useActionContext(), { getAriaLabel: E } = useGetAriaLabelOfAction(l), z = useCollectionParentRecordData(), V = useApp(), { getAllDataBlocks: L } = useAllDataBlocks(), G = useForm();
|
|
40190
40206
|
useEffect(() => {
|
|
40191
40207
|
I.stateOfLinkageRules && setInitialActionState(I);
|
|
40192
|
-
const X = uid(),
|
|
40208
|
+
const X = uid(), J = [];
|
|
40193
40209
|
return setTimeout(() => {
|
|
40194
40210
|
G.addEffects(X, () => {
|
|
40195
|
-
forEachLinkageRule(B, (
|
|
40196
|
-
|
|
40211
|
+
forEachLinkageRule(B, (Z, Q) => {
|
|
40212
|
+
J.push(
|
|
40197
40213
|
reaction(
|
|
40198
|
-
() => [getVariableValuesInCondition({ linkageRules: B, localVariables: R })].map((
|
|
40214
|
+
() => [getVariableValuesInCondition({ linkageRules: B, localVariables: R })].map((se) => JSON.stringify(se)).join(","),
|
|
40199
40215
|
() => {
|
|
40200
40216
|
I.stateOfLinkageRules = {}, linkageAction(
|
|
40201
40217
|
{
|
|
40202
|
-
operator:
|
|
40218
|
+
operator: Z.operator,
|
|
40203
40219
|
field: I,
|
|
40204
|
-
condition:
|
|
40220
|
+
condition: Q.condition,
|
|
40205
40221
|
variables: j,
|
|
40206
40222
|
localVariables: R,
|
|
40207
|
-
conditionType:
|
|
40223
|
+
conditionType: Q.conditionType,
|
|
40208
40224
|
variableNameOfLeftCondition: "$nRecord"
|
|
40209
40225
|
},
|
|
40210
|
-
|
|
40226
|
+
V.jsonLogic
|
|
40211
40227
|
);
|
|
40212
40228
|
},
|
|
40213
40229
|
{ fireImmediately: !0, equals: isEqual }
|
|
@@ -40216,8 +40232,8 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40216
40232
|
});
|
|
40217
40233
|
});
|
|
40218
40234
|
}), () => {
|
|
40219
|
-
G.removeEffects(X),
|
|
40220
|
-
|
|
40235
|
+
G.removeEffects(X), J.forEach((Z) => {
|
|
40236
|
+
Z();
|
|
40221
40237
|
});
|
|
40222
40238
|
};
|
|
40223
40239
|
}, [B, T]);
|
|
@@ -40226,20 +40242,20 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40226
40242
|
C == null || C(X);
|
|
40227
40243
|
},
|
|
40228
40244
|
[C]
|
|
40229
|
-
), U = useMemo(() => c && ((X,
|
|
40230
|
-
var
|
|
40231
|
-
yield c == null ? void 0 : c(X,
|
|
40232
|
-
const
|
|
40233
|
-
|
|
40234
|
-
var
|
|
40235
|
-
if (
|
|
40245
|
+
), U = useMemo(() => c && ((X, J) => q(void 0, null, function* () {
|
|
40246
|
+
var Q, ne;
|
|
40247
|
+
yield c == null ? void 0 : c(X, J);
|
|
40248
|
+
const Z = ((ne = (Q = F["x-action-settings"]) == null ? void 0 : Q.onSuccess) == null ? void 0 : ne.blocksToRefresh) || [];
|
|
40249
|
+
Z.length > 0 && L().forEach((te) => {
|
|
40250
|
+
var se;
|
|
40251
|
+
if (Z.includes(te.uid))
|
|
40236
40252
|
try {
|
|
40237
|
-
(
|
|
40238
|
-
} catch (
|
|
40239
|
-
console.error("Failed to refresh block:", te.uid,
|
|
40253
|
+
(se = te.service) == null || se.refresh();
|
|
40254
|
+
} catch (ce) {
|
|
40255
|
+
console.error("Failed to refresh block:", te.uid, ce);
|
|
40240
40256
|
}
|
|
40241
40257
|
});
|
|
40242
|
-
})), [c, F,
|
|
40258
|
+
})), [c, F, L]);
|
|
40243
40259
|
return /* @__PURE__ */ jsx(VariableScope, { scopeId: F == null ? void 0 : F["x-uid"], type: "action", children: /* @__PURE__ */ jsx(
|
|
40244
40260
|
InternalAction,
|
|
40245
40261
|
x({
|
|
@@ -40275,8 +40291,8 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40275
40291
|
}),
|
|
40276
40292
|
{ displayName: "Action" }
|
|
40277
40293
|
), InternalAction = observer$1(function e(t) {
|
|
40278
|
-
var
|
|
40279
|
-
const
|
|
40294
|
+
var pe, ue, ge, he, Ce;
|
|
40295
|
+
const de = t, {
|
|
40280
40296
|
containerRefKey: n,
|
|
40281
40297
|
fieldSchema: o,
|
|
40282
40298
|
designable: r,
|
|
@@ -40304,7 +40320,7 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40304
40320
|
setSubmitted: B,
|
|
40305
40321
|
getAriaLabel: N,
|
|
40306
40322
|
parentRecordData: M
|
|
40307
|
-
} =
|
|
40323
|
+
} = de, j = W(de, [
|
|
40308
40324
|
"containerRefKey",
|
|
40309
40325
|
"fieldSchema",
|
|
40310
40326
|
"designable",
|
|
@@ -40332,28 +40348,28 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40332
40348
|
"setSubmitted",
|
|
40333
40349
|
"getAriaLabel",
|
|
40334
40350
|
"parentRecordData"
|
|
40335
|
-
]), [R, O] = useState(!1), { wrapSSR: $, componentCls: A, hashId: E } = useStyles$8(), [z,
|
|
40336
|
-
run:
|
|
40337
|
-
element:
|
|
40338
|
-
disabled:
|
|
40339
|
-
loading:
|
|
40340
|
-
} = (F == null ? void 0 : F(w)) || {}, te = Y.disabled || a.disabled || ((
|
|
40341
|
-
var
|
|
40351
|
+
]), [R, O] = useState(!1), { wrapSSR: $, componentCls: A, hashId: E } = useStyles$8(), [z, V] = useState(!1), L = o["x-toolbar-props"] || o["x-designer-props"], G = (pe = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : pe.openMode, H = (ue = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ue.openSize, U = (ge = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : ge.refreshDataBlockRequest, { modal: K } = App.useApp(), Y = useForm(), X = useACLActionParamsContext(), {
|
|
40352
|
+
run: J,
|
|
40353
|
+
element: Z,
|
|
40354
|
+
disabled: Q,
|
|
40355
|
+
loading: ne
|
|
40356
|
+
} = (F == null ? void 0 : F(w)) || {}, te = Y.disabled || a.disabled || ((he = a.data) == null ? void 0 : he.disabled) || I || Q, se = useMemo(() => {
|
|
40357
|
+
var fe;
|
|
40342
40358
|
return P(x({}, v), {
|
|
40343
|
-
opacity: r && (((
|
|
40359
|
+
opacity: r && (((fe = a == null ? void 0 : a.data) == null ? void 0 : fe.hidden) || !X) && 0.1,
|
|
40344
40360
|
color: te ? "rgba(0, 0, 0, 0.25)" : v == null ? void 0 : v.color
|
|
40345
40361
|
});
|
|
40346
|
-
}, [X, r, (
|
|
40362
|
+
}, [X, r, (Ce = a == null ? void 0 : a.data) == null ? void 0 : Ce.hidden, v, te]), ce = {
|
|
40347
40363
|
designable: r,
|
|
40348
40364
|
field: a,
|
|
40349
40365
|
aclCtx: X,
|
|
40350
40366
|
icon: i,
|
|
40351
|
-
loading: typeof
|
|
40367
|
+
loading: typeof ne == "boolean" ? ne : l,
|
|
40352
40368
|
disabled: te,
|
|
40353
|
-
buttonStyle:
|
|
40369
|
+
buttonStyle: se,
|
|
40354
40370
|
handleMouseEnter: c,
|
|
40355
40371
|
tarComponent: u,
|
|
40356
|
-
designerProps:
|
|
40372
|
+
designerProps: L,
|
|
40357
40373
|
componentCls: A,
|
|
40358
40374
|
hashId: E,
|
|
40359
40375
|
className: d,
|
|
@@ -40365,26 +40381,26 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40365
40381
|
refreshDataBlockRequest: U,
|
|
40366
40382
|
fieldSchema: o,
|
|
40367
40383
|
setVisible: O,
|
|
40368
|
-
run:
|
|
40384
|
+
run: J,
|
|
40369
40385
|
confirm: g,
|
|
40370
40386
|
modal: K,
|
|
40371
40387
|
setSubmitted: B,
|
|
40372
40388
|
confirmTitle: f,
|
|
40373
40389
|
title: y
|
|
40374
|
-
},
|
|
40375
|
-
(
|
|
40376
|
-
O == null || O(
|
|
40390
|
+
}, ie = useCallback(
|
|
40391
|
+
(fe) => {
|
|
40392
|
+
O == null || O(fe), D == null || D(fe);
|
|
40377
40393
|
},
|
|
40378
40394
|
[D]
|
|
40379
40395
|
);
|
|
40380
|
-
let
|
|
40396
|
+
let re = /* @__PURE__ */ jsx(PopupVisibleProvider, { visible: !1, children: /* @__PURE__ */ jsxs(
|
|
40381
40397
|
ActionContextProvider,
|
|
40382
40398
|
{
|
|
40383
|
-
button: RenderButton(
|
|
40399
|
+
button: RenderButton(ce),
|
|
40384
40400
|
visible: R || T,
|
|
40385
|
-
setVisible:
|
|
40401
|
+
setVisible: ie,
|
|
40386
40402
|
formValueChanged: z,
|
|
40387
|
-
setFormValueChanged:
|
|
40403
|
+
setFormValueChanged: V,
|
|
40388
40404
|
openMode: G,
|
|
40389
40405
|
openSize: H,
|
|
40390
40406
|
containerRefKey: n,
|
|
@@ -40392,13 +40408,13 @@ const ActionLink = withDynamicSchemaProps(
|
|
|
40392
40408
|
setSubmitted: B,
|
|
40393
40409
|
children: [
|
|
40394
40410
|
C && /* @__PURE__ */ jsx(NocoBaseRecursionField, { basePath: a.address, onlyRenderProperties: !0, schema: o }),
|
|
40395
|
-
!C && /* @__PURE__ */ jsx(RenderButton, x({},
|
|
40411
|
+
!C && /* @__PURE__ */ jsx(RenderButton, x({}, ce)),
|
|
40396
40412
|
/* @__PURE__ */ jsx(VariablePopupRecordProvider, { children: !C && t.children }),
|
|
40397
|
-
|
|
40413
|
+
Z
|
|
40398
40414
|
]
|
|
40399
40415
|
}
|
|
40400
40416
|
) });
|
|
40401
|
-
return isBulkEditAction(o) && (
|
|
40417
|
+
return isBulkEditAction(o) && (re = /* @__PURE__ */ jsx(TabsContextProvider, { children: re })), $(b ? /* @__PURE__ */ jsx(TreeRecordProvider, { parent: S, children: re }) : re);
|
|
40402
40418
|
});
|
|
40403
40419
|
InternalAction.displayName = "InternalAction";
|
|
40404
40420
|
Action.Popover = function e(t) {
|
|
@@ -40474,21 +40490,21 @@ const RenderButton = ({
|
|
|
40474
40490
|
}) => {
|
|
40475
40491
|
const { getDataBlockRequest: N } = useDataBlockRequestGetter(), { t: M } = useTranslation(), { isPopupVisibleControlledByURL: j } = usePopupSettings(), { openPopup: R } = usePopupUtils(), O = useVariables$1(), $ = useLocalVariables$1(), A = useRef(null), E = useCompile(), z = useForm();
|
|
40476
40492
|
A.current = R;
|
|
40477
|
-
const
|
|
40493
|
+
const V = {
|
|
40478
40494
|
variables: O,
|
|
40479
40495
|
localVariables: $
|
|
40480
|
-
},
|
|
40496
|
+
}, L = useCallback(
|
|
40481
40497
|
(G, H = !0) => q(void 0, null, function* () {
|
|
40482
40498
|
var Y;
|
|
40483
40499
|
if (H && isPortalInBody(G.target))
|
|
40484
40500
|
return;
|
|
40485
40501
|
G.preventDefault(), G.stopPropagation();
|
|
40486
|
-
const U = yield getVariableValue(M(F == null ? void 0 : F.title, { title: E(y.title) }),
|
|
40502
|
+
const U = yield getVariableValue(M(F == null ? void 0 : F.title, { title: E(y.title) }), V), K = yield getVariableValue(M(F == null ? void 0 : F.content, { title: E(y.title) }), V);
|
|
40487
40503
|
if (!a && n) {
|
|
40488
40504
|
const X = () => {
|
|
40489
40505
|
b ? b(G, () => {
|
|
40490
|
-
var
|
|
40491
|
-
S !== !1 && (T == null || T(!0), (
|
|
40506
|
+
var J, Z;
|
|
40507
|
+
S !== !1 && (T == null || T(!0), (Z = (J = N()) == null ? void 0 : J.refresh) == null || Z.call(J));
|
|
40492
40508
|
}) : isBulkEditAction(y) || !j() ? (v(!0), I == null || I()) : ["view", "update", "create", "customize:popup"].includes(y["x-action"]) && y["x-uid"] ? A.current() : (v(!0), I == null || I());
|
|
40493
40509
|
};
|
|
40494
40510
|
(F == null ? void 0 : F.enable) !== !1 && (F != null && F.content) ? (yield (Y = z == null ? void 0 : z.submit) == null ? void 0 : Y.call(z), w.confirm({
|
|
@@ -40531,7 +40547,7 @@ const RenderButton = ({
|
|
|
40531
40547
|
buttonStyle: i,
|
|
40532
40548
|
handleMouseEnter: l,
|
|
40533
40549
|
getAriaLabel: g,
|
|
40534
|
-
handleButtonClick:
|
|
40550
|
+
handleButtonClick: L,
|
|
40535
40551
|
tarComponent: c,
|
|
40536
40552
|
componentCls: d,
|
|
40537
40553
|
hashId: p,
|
|
@@ -40591,8 +40607,8 @@ const RenderButtonInner = observer$1(
|
|
|
40591
40607
|
"onlyIcon"
|
|
40592
40608
|
]), { t: F } = useTranslation(), w = useCallback(
|
|
40593
40609
|
debounce$1(
|
|
40594
|
-
(z,
|
|
40595
|
-
d(z,
|
|
40610
|
+
(z, V = !0) => {
|
|
40611
|
+
d(z, V);
|
|
40596
40612
|
},
|
|
40597
40613
|
300,
|
|
40598
40614
|
{ leading: !0, trailing: !1 }
|
|
@@ -40605,9 +40621,9 @@ const RenderButtonInner = observer$1(
|
|
|
40605
40621
|
const T = useMemo(
|
|
40606
40622
|
() => React.forwardRef(
|
|
40607
40623
|
(K, U) => {
|
|
40608
|
-
var Y = K, { component: z = p || Button, icon:
|
|
40624
|
+
var Y = K, { component: z = p || Button, icon: V, onlyIcon: L, children: G } = Y, H = W(Y, ["component", "icon", "onlyIcon", "children"]);
|
|
40609
40625
|
return /* @__PURE__ */ jsxs(z, P(x({ ref: U }, H), { children: [
|
|
40610
|
-
v ? /* @__PURE__ */ jsx(Tooltip, { title: H.title, children: /* @__PURE__ */ jsx("span", { style: { padding: 3 }, children:
|
|
40626
|
+
v ? /* @__PURE__ */ jsx(Tooltip, { title: H.title, children: /* @__PURE__ */ jsx("span", { style: { padding: 3 }, children: V && typeof V == "string" ? /* @__PURE__ */ jsx(Icon, { type: V }) : V }) }) : /* @__PURE__ */ jsx("span", { style: { paddingRight: 3 }, children: V && typeof V == "string" ? /* @__PURE__ */ jsx(Icon, { type: V }) : V }),
|
|
40611
40627
|
v ? G[1] : G
|
|
40612
40628
|
] }));
|
|
40613
40629
|
}
|
|
@@ -40961,7 +40977,54 @@ const ReadPrettyInternal = observer$1(
|
|
|
40961
40977
|
})
|
|
40962
40978
|
)
|
|
40963
40979
|
),
|
|
40964
|
-
maxTagCount: "responsive"
|
|
40980
|
+
maxTagCount: "responsive",
|
|
40981
|
+
maxTagPlaceholder: (g) => /* @__PURE__ */ jsxs(
|
|
40982
|
+
Tooltip,
|
|
40983
|
+
{
|
|
40984
|
+
title: /* @__PURE__ */ jsx(
|
|
40985
|
+
"div",
|
|
40986
|
+
{
|
|
40987
|
+
style: {
|
|
40988
|
+
display: "flex",
|
|
40989
|
+
flexWrap: "wrap",
|
|
40990
|
+
gap: 6,
|
|
40991
|
+
maxWidth: "100%"
|
|
40992
|
+
},
|
|
40993
|
+
children: g.map((f) => /* @__PURE__ */ jsx(
|
|
40994
|
+
Tag,
|
|
40995
|
+
{
|
|
40996
|
+
style: {
|
|
40997
|
+
margin: 0,
|
|
40998
|
+
background: "#fafafa",
|
|
40999
|
+
border: "1px solid #d9d9d9",
|
|
41000
|
+
whiteSpace: "normal",
|
|
41001
|
+
wordBreak: "break-word",
|
|
41002
|
+
maxWidth: "100%"
|
|
41003
|
+
},
|
|
41004
|
+
children: f.label
|
|
41005
|
+
},
|
|
41006
|
+
f.value
|
|
41007
|
+
))
|
|
41008
|
+
}
|
|
41009
|
+
),
|
|
41010
|
+
overlayInnerStyle: {
|
|
41011
|
+
background: "#fff",
|
|
41012
|
+
color: "#000",
|
|
41013
|
+
padding: 8,
|
|
41014
|
+
maxWidth: "100%"
|
|
41015
|
+
},
|
|
41016
|
+
color: "#fff",
|
|
41017
|
+
overlayStyle: {
|
|
41018
|
+
pointerEvents: "auto",
|
|
41019
|
+
maxWidth: 300
|
|
41020
|
+
},
|
|
41021
|
+
children: [
|
|
41022
|
+
"+",
|
|
41023
|
+
g.length,
|
|
41024
|
+
"..."
|
|
41025
|
+
]
|
|
41026
|
+
}
|
|
41027
|
+
)
|
|
40965
41028
|
}, u)
|
|
40966
41029
|
);
|
|
40967
41030
|
}, filterOption = (e, t) => {
|
|
@@ -41026,7 +41089,54 @@ const ReadPrettyInternal = observer$1(
|
|
|
41026
41089
|
(g = e.onChange) == null || g.call(e, h === void 0 ? null : h);
|
|
41027
41090
|
},
|
|
41028
41091
|
mode: d,
|
|
41029
|
-
maxTagCount: "responsive"
|
|
41092
|
+
maxTagCount: "responsive",
|
|
41093
|
+
maxTagPlaceholder: (h) => /* @__PURE__ */ jsxs(
|
|
41094
|
+
Tooltip,
|
|
41095
|
+
{
|
|
41096
|
+
title: /* @__PURE__ */ jsx(
|
|
41097
|
+
"div",
|
|
41098
|
+
{
|
|
41099
|
+
style: {
|
|
41100
|
+
display: "flex",
|
|
41101
|
+
flexWrap: "wrap",
|
|
41102
|
+
gap: 6,
|
|
41103
|
+
maxWidth: "100%"
|
|
41104
|
+
},
|
|
41105
|
+
children: h.map((g) => /* @__PURE__ */ jsx(
|
|
41106
|
+
Tag,
|
|
41107
|
+
{
|
|
41108
|
+
style: {
|
|
41109
|
+
margin: 0,
|
|
41110
|
+
background: "#fafafa",
|
|
41111
|
+
border: "1px solid #d9d9d9",
|
|
41112
|
+
whiteSpace: "normal",
|
|
41113
|
+
wordBreak: "break-word",
|
|
41114
|
+
maxWidth: "100%"
|
|
41115
|
+
},
|
|
41116
|
+
children: g.label
|
|
41117
|
+
},
|
|
41118
|
+
g.value
|
|
41119
|
+
))
|
|
41120
|
+
}
|
|
41121
|
+
),
|
|
41122
|
+
overlayInnerStyle: {
|
|
41123
|
+
background: "#fff",
|
|
41124
|
+
color: "#000",
|
|
41125
|
+
padding: 8,
|
|
41126
|
+
maxWidth: "100%"
|
|
41127
|
+
},
|
|
41128
|
+
color: "#fff",
|
|
41129
|
+
overlayStyle: {
|
|
41130
|
+
pointerEvents: "auto",
|
|
41131
|
+
maxWidth: 300
|
|
41132
|
+
},
|
|
41133
|
+
children: [
|
|
41134
|
+
"+",
|
|
41135
|
+
h.length,
|
|
41136
|
+
"..."
|
|
41137
|
+
]
|
|
41138
|
+
}
|
|
41139
|
+
)
|
|
41030
41140
|
})
|
|
41031
41141
|
);
|
|
41032
41142
|
},
|
|
@@ -41076,7 +41186,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
41076
41186
|
), EMPTY$1 = "N/A", InternalRemoteSelect = withDynamicSchemaProps(
|
|
41077
41187
|
connect(
|
|
41078
41188
|
(e) => {
|
|
41079
|
-
var
|
|
41189
|
+
var J, Z;
|
|
41080
41190
|
const X = e, {
|
|
41081
41191
|
fieldNames: t = {},
|
|
41082
41192
|
service: n = {},
|
|
@@ -41090,7 +41200,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
41090
41200
|
CustomDropdownRender: d,
|
|
41091
41201
|
optionFilter: p,
|
|
41092
41202
|
dataSource: m,
|
|
41093
|
-
toOptionsItem: h = (
|
|
41203
|
+
toOptionsItem: h = (Q) => Q,
|
|
41094
41204
|
popupMatchSelectWidth: g = !1,
|
|
41095
41205
|
onSuccess: f
|
|
41096
41206
|
} = X, C = W(X, [
|
|
@@ -41109,39 +41219,39 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
41109
41219
|
"toOptionsItem",
|
|
41110
41220
|
"popupMatchSelectWidth",
|
|
41111
41221
|
"onSuccess"
|
|
41112
|
-
]), b = useDataSourceKey(), S = useDataSourceHeaders(m || b), y = useRef(!1), v = useFieldSchema(), I = ((
|
|
41113
|
-
var
|
|
41222
|
+
]), b = useDataSourceKey(), S = useDataSourceHeaders(m || b), y = useRef(!1), v = useFieldSchema(), I = ((J = v["x-component-props"]) == null ? void 0 : J.addMode) === "quickAdd", { getField: F } = useCollection_deprecated(), w = useRef(null), { getCollectionJoinField: T, getInterface: D } = useCollectionManager_deprecated(), B = v["x-collection-field"] || v.name, N = F(B) || T(B), M = u || (N == null ? void 0 : N.target) && (t == null ? void 0 : t.label) && T(`${N.target}.${t.label}`), j = useMemo(() => {
|
|
41223
|
+
var Q;
|
|
41114
41224
|
if (M != null && M.interface) {
|
|
41115
|
-
const
|
|
41225
|
+
const ne = D(M.interface), te = ((Q = ne == null ? void 0 : ne.filterable) == null ? void 0 : Q.operators[0].value) || "$includes";
|
|
41116
41226
|
return M.type === "string" || M.dataType === "string" ? "$includes" : te;
|
|
41117
41227
|
}
|
|
41118
41228
|
return "$includes";
|
|
41119
41229
|
}, [M]), R = useCompile(), O = useCallback(
|
|
41120
|
-
(
|
|
41230
|
+
(Q) => {
|
|
41121
41231
|
try {
|
|
41122
|
-
return
|
|
41123
|
-
var
|
|
41124
|
-
let te = R(
|
|
41125
|
-
if ((
|
|
41232
|
+
return Q.filter((ne) => ["number", "string"].includes(typeof ne[t.value]) || !ne[t.value]).map((ne) => {
|
|
41233
|
+
var se;
|
|
41234
|
+
let te = R(ne[t.label]);
|
|
41235
|
+
if ((se = M == null ? void 0 : M.uiSchema) != null && se.enum)
|
|
41126
41236
|
if (Array.isArray(te))
|
|
41127
|
-
te = te.map((
|
|
41128
|
-
const
|
|
41129
|
-
return
|
|
41237
|
+
te = te.map((ce, ie) => {
|
|
41238
|
+
const re = M.uiSchema.enum.find((de) => de.value === ce);
|
|
41239
|
+
return re ? /* @__PURE__ */ jsx(Tag, { role: "button", color: re.color, style: { marginRight: 3 }, children: (re == null ? void 0 : re.label) || ce }, ie) : /* @__PURE__ */ jsx(Tag, { role: "button", children: ce }, ce);
|
|
41130
41240
|
}).reverse();
|
|
41131
41241
|
else {
|
|
41132
|
-
const
|
|
41133
|
-
|
|
41242
|
+
const ce = M.uiSchema.enum.find((ie) => ie.value === te);
|
|
41243
|
+
ce && (te = /* @__PURE__ */ jsx(Tag, { role: "button", color: ce.color, children: ce.label }));
|
|
41134
41244
|
}
|
|
41135
41245
|
return (M == null ? void 0 : M.type) === "date" && (te = dayjs(te).format("YYYY-MM-DD")), c ? c({
|
|
41136
41246
|
[t.label]: te || EMPTY$1,
|
|
41137
|
-
[t.value]:
|
|
41138
|
-
}) : P(x({}, omit(
|
|
41247
|
+
[t.value]: ne[t.value]
|
|
41248
|
+
}) : P(x({}, omit(ne, "style")), {
|
|
41139
41249
|
[t.label]: te || EMPTY$1,
|
|
41140
|
-
[t.value]:
|
|
41250
|
+
[t.value]: ne[t.value]
|
|
41141
41251
|
});
|
|
41142
41252
|
}).filter(Boolean);
|
|
41143
|
-
} catch (
|
|
41144
|
-
return console.error(
|
|
41253
|
+
} catch (ne) {
|
|
41254
|
+
return console.error(ne), Q;
|
|
41145
41255
|
}
|
|
41146
41256
|
},
|
|
41147
41257
|
[M == null ? void 0 : M.uiSchema, t]
|
|
@@ -41153,7 +41263,7 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
41153
41263
|
params: P(x({
|
|
41154
41264
|
pageSize: 200
|
|
41155
41265
|
}, n == null ? void 0 : n.params), {
|
|
41156
|
-
filter: (
|
|
41266
|
+
filter: (Z = n == null ? void 0 : n.params) == null ? void 0 : Z.filter
|
|
41157
41267
|
})
|
|
41158
41268
|
}),
|
|
41159
41269
|
x({
|
|
@@ -41163,8 +41273,8 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
41163
41273
|
}, n.defaultParams ? { defaultParams: [n.defaultParams] } : {})
|
|
41164
41274
|
), {
|
|
41165
41275
|
data: z,
|
|
41166
|
-
run:
|
|
41167
|
-
loading:
|
|
41276
|
+
run: V,
|
|
41277
|
+
loading: L
|
|
41168
41278
|
} = useRequest(
|
|
41169
41279
|
P(x({
|
|
41170
41280
|
action: "get"
|
|
@@ -41193,29 +41303,29 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
41193
41303
|
useEffect(() => {
|
|
41194
41304
|
y.current && A();
|
|
41195
41305
|
}, [G]), useEffect(() => {
|
|
41196
|
-
!i && ($ != null && $.data) && ($ != null && $.data.some((
|
|
41306
|
+
!i && ($ != null && $.data) && ($ != null && $.data.some((Q) => Q[t.value] === r) || V({
|
|
41197
41307
|
filterByTk: r
|
|
41198
41308
|
}));
|
|
41199
41309
|
}, [r, $ == null ? void 0 : $.data]);
|
|
41200
|
-
const U = (
|
|
41201
|
-
var
|
|
41310
|
+
const U = (Q) => q(void 0, null, function* () {
|
|
41311
|
+
var ne;
|
|
41202
41312
|
A({
|
|
41203
41313
|
filter: mergeFilter([
|
|
41204
|
-
|
|
41314
|
+
Q ? {
|
|
41205
41315
|
[t.label]: {
|
|
41206
|
-
[j]:
|
|
41316
|
+
[j]: Q
|
|
41207
41317
|
}
|
|
41208
41318
|
} : {},
|
|
41209
|
-
(
|
|
41319
|
+
(ne = n == null ? void 0 : n.params) == null ? void 0 : ne.filter
|
|
41210
41320
|
])
|
|
41211
|
-
}), w.current =
|
|
41321
|
+
}), w.current = Q;
|
|
41212
41322
|
}), K = useMemo(() => {
|
|
41213
|
-
var
|
|
41214
|
-
const
|
|
41215
|
-
if (!((
|
|
41216
|
-
return
|
|
41217
|
-
const
|
|
41218
|
-
return uniqBy(te.concat(
|
|
41323
|
+
var se;
|
|
41324
|
+
const Q = i ? r || a : z == null ? void 0 : z.data;
|
|
41325
|
+
if (!((se = $ == null ? void 0 : $.data) != null && se.length))
|
|
41326
|
+
return Q != null ? Array.isArray(Q) ? Q : [Q] : [];
|
|
41327
|
+
const ne = Q != null && (Array.isArray(Q) ? Q.map((ce) => P(x({}, ce), { [t.value]: ce[t.value] || ce })) : [P(x({}, Q), { [t.value]: Q[t.value] || Q })]) || [], te = typeof p == "function" ? $.data.filter(p) : $.data;
|
|
41328
|
+
return uniqBy(te.concat(ne != null ? ne : []), t.value);
|
|
41219
41329
|
}, [r, a, $ == null ? void 0 : $.data, t.value, p, z == null ? void 0 : z.data]);
|
|
41220
41330
|
return /* @__PURE__ */ jsx(
|
|
41221
41331
|
Select,
|
|
@@ -41226,8 +41336,8 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
41226
41336
|
filterSort: null,
|
|
41227
41337
|
fieldNames: t,
|
|
41228
41338
|
onSearch: U,
|
|
41229
|
-
onDropdownVisibleChange: (
|
|
41230
|
-
w.current = null,
|
|
41339
|
+
onDropdownVisibleChange: (Q) => {
|
|
41340
|
+
w.current = null, Q && A(), y.current = !0;
|
|
41231
41341
|
},
|
|
41232
41342
|
objectValue: i,
|
|
41233
41343
|
value: r,
|
|
@@ -41236,13 +41346,13 @@ const getValues = (e, t) => castArray(e).filter((n) => n != null).map((n) => typ
|
|
|
41236
41346
|
loading: $ ? E : !0,
|
|
41237
41347
|
options: h(O(K)),
|
|
41238
41348
|
rawOptions: K,
|
|
41239
|
-
dropdownRender: (
|
|
41240
|
-
const
|
|
41349
|
+
dropdownRender: (Q) => {
|
|
41350
|
+
const ne = K.some((te) => te[t.label] === w.current);
|
|
41241
41351
|
return /* @__PURE__ */ jsx(Fragment$1, { children: I ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
41242
|
-
!(($ == null ? void 0 : $.data.length) === 0 && (w != null && w.current)) &&
|
|
41243
|
-
($ == null ? void 0 : $.data.length) > 0 && (w == null ? void 0 : w.current) && !
|
|
41244
|
-
!
|
|
41245
|
-
] }) :
|
|
41352
|
+
!(($ == null ? void 0 : $.data.length) === 0 && (w != null && w.current)) && Q,
|
|
41353
|
+
($ == null ? void 0 : $.data.length) > 0 && (w == null ? void 0 : w.current) && !ne && /* @__PURE__ */ jsx(Divider$1, { style: { margin: 0 } }),
|
|
41354
|
+
!ne && /* @__PURE__ */ jsx(H, {})
|
|
41355
|
+
] }) : Q });
|
|
41246
41356
|
}
|
|
41247
41357
|
})
|
|
41248
41358
|
);
|
|
@@ -43746,8 +43856,8 @@ const FieldsTreeSelect = (e) => {
|
|
|
43746
43856
|
break;
|
|
43747
43857
|
}
|
|
43748
43858
|
if (!A.isLeaf && A.loadChildren) {
|
|
43749
|
-
const
|
|
43750
|
-
|
|
43859
|
+
const V = A.loadChildren(A);
|
|
43860
|
+
V != null && V.length && (R.push(...V), A = V.find((L) => L.value === $.slice(0, E + 1).join(".")));
|
|
43751
43861
|
}
|
|
43752
43862
|
}
|
|
43753
43863
|
}), g((O) => R.reduce(($, A) => Object.assign($, { [A.value]: A }), x({}, O)));
|
|
@@ -43839,9 +43949,9 @@ const InternalAssociationSelect$1 = observer$1(
|
|
|
43839
43949
|
const N = uid();
|
|
43840
43950
|
return f.addEffects(N, () => {
|
|
43841
43951
|
onFieldInputValueChange("*", (M) => {
|
|
43842
|
-
var $, A, E, z,
|
|
43952
|
+
var $, A, E, z, V, L;
|
|
43843
43953
|
const j = filterAnalyses((E = (A = ($ = r.componentProps) == null ? void 0 : $.service) == null ? void 0 : A.params) == null ? void 0 : E.filter) || [], R = getFieldPath(M.address.entire), O = getFieldPath(r.address.entire);
|
|
43844
|
-
j.includes((z = M == null ? void 0 : M.props) == null ? void 0 : z.name) && r.value && isEqual(M == null ? void 0 : M.indexes, r == null ? void 0 : r.indexes) && ((
|
|
43954
|
+
j.includes((z = M == null ? void 0 : M.props) == null ? void 0 : z.name) && r.value && isEqual(M == null ? void 0 : M.indexes, r == null ? void 0 : r.indexes) && ((V = M == null ? void 0 : M.props) == null ? void 0 : V.name) !== r.props.name && (!((L = r == null ? void 0 : r.indexes) != null && L.length) || isEqual(R, O)) && (r.setValue(null), p(null));
|
|
43845
43955
|
});
|
|
43846
43956
|
}), () => {
|
|
43847
43957
|
f.removeEffects(N);
|
|
@@ -45006,13 +45116,13 @@ const InternalFileManager = (e) => {
|
|
|
45006
45116
|
let O = p(R[y.label]);
|
|
45007
45117
|
if (($ = v == null ? void 0 : v.uiSchema) != null && $.enum)
|
|
45008
45118
|
if (Array.isArray(O))
|
|
45009
|
-
O = O.map((z,
|
|
45119
|
+
O = O.map((z, V) => {
|
|
45010
45120
|
var G, H;
|
|
45011
|
-
const
|
|
45012
|
-
return
|
|
45121
|
+
const L = (H = (G = v.uiSchema.enum).find) == null ? void 0 : H.call(G, (U) => U.value === z);
|
|
45122
|
+
return L ? /* @__PURE__ */ jsx(Tag, { color: L.color, style: { marginRight: 3 }, children: (L == null ? void 0 : L.label) || z }, V) : /* @__PURE__ */ jsx(Tag, { children: z }, z);
|
|
45013
45123
|
}).reverse();
|
|
45014
45124
|
else {
|
|
45015
|
-
const z = (E = (A = v.uiSchema.enum).find) == null ? void 0 : E.call(A, (
|
|
45125
|
+
const z = (E = (A = v.uiSchema.enum).find) == null ? void 0 : E.call(A, (V) => V.value === O);
|
|
45016
45126
|
z && (O = /* @__PURE__ */ jsx(Tag, { color: z.color, children: z.label }));
|
|
45017
45127
|
}
|
|
45018
45128
|
return (v == null ? void 0 : v.type) === "date" && (O = dayjs(O).format("YYYY-MM-DD")), n ? n({
|
|
@@ -45051,8 +45161,8 @@ const InternalFileManager = (e) => {
|
|
|
45051
45161
|
d(!0);
|
|
45052
45162
|
const z = yield T({ parentId: R == null ? void 0 : R.key });
|
|
45053
45163
|
if (d(!1), c(z), O === (a == null ? void 0 : a.length) - 1 && (($ = R == null ? void 0 : R.value) != null && $.id)) {
|
|
45054
|
-
const
|
|
45055
|
-
|
|
45164
|
+
const V = yield T({ parentId: (A = R == null ? void 0 : R.value) == null ? void 0 : A.id }), L = [...a];
|
|
45165
|
+
L.splice(O + 1), L[O] = P(x({}, L[O]), { value: R == null ? void 0 : R.value }), L[O + 1] = { key: (E = R == null ? void 0 : R.value) == null ? void 0 : E.id, children: (V == null ? void 0 : V.length) > 0 ? V : null }, i(L), o == null || o(L);
|
|
45056
45166
|
}
|
|
45057
45167
|
}
|
|
45058
45168
|
}), N = (j, R) => q(void 0, null, function* () {
|
|
@@ -45389,9 +45499,9 @@ const useTableSelectorProps$2 = () => {
|
|
|
45389
45499
|
}, InternalPicker = observer$1(
|
|
45390
45500
|
(e) => {
|
|
45391
45501
|
var z;
|
|
45392
|
-
const E = e, { value: t, multiple: n, openSize: o, onChange: r, quickUpload: a, selectFile: i, shouldMountElement: l } = E, c = W(E, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema$1("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), b = useCompile(), S = useLabelUiSchema$1(f, (d == null ? void 0 : d.label) || "label"), y = h["x-add-new"], [v, I] = useState([]), F = useCollectionRecordData(), w = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((
|
|
45393
|
-
const G =
|
|
45394
|
-
return P(x({},
|
|
45502
|
+
const E = e, { value: t, multiple: n, openSize: o, onChange: r, quickUpload: a, selectFile: i, shouldMountElement: l } = E, c = W(E, ["value", "multiple", "openSize", "onChange", "quickUpload", "selectFile", "shouldMountElement"]), u = useField(), d = useFieldNames$1(e), [p, m] = useState(!1), h = useFieldSchema(), g = useInsertSchema$1("Selector"), { options: f } = useAssociationFieldContext(), { collectionName: C } = useFormBlockContext(), b = useCompile(), S = useLabelUiSchema$1(f, (d == null ? void 0 : d.label) || "label"), y = h["x-add-new"], [v, I] = useState([]), F = useCollectionRecordData(), w = useMemo(() => t && Object.keys(t).length > 0 ? (Array.isArray(t) ? t : t ? [t] : []).filter(Boolean).map((L) => {
|
|
45503
|
+
const G = L == null ? void 0 : L[d.label];
|
|
45504
|
+
return P(x({}, L), {
|
|
45395
45505
|
[d.label]: getLabelFormatValue$1(b(S), b(G))
|
|
45396
45506
|
});
|
|
45397
45507
|
}) : [], [t == null ? void 0 : t.length, d.label]), T = {
|
|
@@ -45408,29 +45518,29 @@ const useTableSelectorProps$2 = () => {
|
|
|
45408
45518
|
collectionField: f,
|
|
45409
45519
|
currentFormCollection: C
|
|
45410
45520
|
}, { isMobileLayout: D } = useMobileLayout(), B = () => {
|
|
45411
|
-
var
|
|
45412
|
-
return n == null ? null : Array.isArray(t) ? (
|
|
45521
|
+
var V;
|
|
45522
|
+
return n == null ? null : Array.isArray(t) ? (V = t.filter(Boolean)) == null ? void 0 : V.map((L) => L == null ? void 0 : L[d.value]) : t == null ? void 0 : t[d.value];
|
|
45413
45523
|
}, N = () => {
|
|
45414
|
-
var
|
|
45415
|
-
return n == null ? null : Array.isArray(t) ? (
|
|
45416
|
-
[d.label]: b(
|
|
45417
|
-
[d.value]:
|
|
45524
|
+
var V;
|
|
45525
|
+
return n == null ? null : Array.isArray(t) ? (V = t.filter(Boolean)) == null ? void 0 : V.map((L) => ({
|
|
45526
|
+
[d.label]: b(L == null ? void 0 : L[d.label]),
|
|
45527
|
+
[d.value]: L == null ? void 0 : L[d.value]
|
|
45418
45528
|
})) : [{ [d.label]: b(t == null ? void 0 : t[d.label]), [d.value]: t == null ? void 0 : t[d.value] }];
|
|
45419
45529
|
}, M = () => {
|
|
45420
|
-
const
|
|
45421
|
-
return
|
|
45530
|
+
const V = (f == null ? void 0 : f.targetKey) || "id", L = w.map((H) => H[V]).filter(Boolean);
|
|
45531
|
+
return L.length ? { $and: [{ [`${V}.$ne`]: L }] } : {};
|
|
45422
45532
|
};
|
|
45423
45533
|
useEffect(() => {
|
|
45424
45534
|
t || I([]);
|
|
45425
45535
|
}, [t]);
|
|
45426
45536
|
const j = () => {
|
|
45427
|
-
const { setVisible:
|
|
45537
|
+
const { setVisible: V } = useActionContext(), { multiple: L, selectedRows: G, onChange: H, options: U, collectionField: K } = useContext(RecordPickerContext);
|
|
45428
45538
|
return {
|
|
45429
45539
|
onClick() {
|
|
45430
|
-
H(
|
|
45540
|
+
H(L ? unionBy(G, U, (K == null ? void 0 : K.targetKey) || "id") : (G == null ? void 0 : G[0]) || null), V(!1);
|
|
45431
45541
|
},
|
|
45432
45542
|
style: {
|
|
45433
|
-
display:
|
|
45543
|
+
display: L === !1 ? "none" : "block"
|
|
45434
45544
|
}
|
|
45435
45545
|
};
|
|
45436
45546
|
}, R = useMemo(
|
|
@@ -45459,23 +45569,23 @@ const useTableSelectorProps$2 = () => {
|
|
|
45459
45569
|
}, c), {
|
|
45460
45570
|
mode: n ? "multiple" : e.mode,
|
|
45461
45571
|
fieldNames: d,
|
|
45462
|
-
onDropdownVisibleChange: (
|
|
45572
|
+
onDropdownVisibleChange: (V) => {
|
|
45463
45573
|
g(schema$1.Selector), m(!0);
|
|
45464
45574
|
},
|
|
45465
45575
|
allowClear: !0,
|
|
45466
|
-
onChange: (
|
|
45467
|
-
if (
|
|
45468
|
-
if (Array.isArray(
|
|
45469
|
-
if (!
|
|
45576
|
+
onChange: (V) => {
|
|
45577
|
+
if (V) {
|
|
45578
|
+
if (Array.isArray(V)) {
|
|
45579
|
+
if (!V.length) {
|
|
45470
45580
|
r([]), I([]);
|
|
45471
45581
|
return;
|
|
45472
45582
|
}
|
|
45473
|
-
const
|
|
45474
|
-
r(
|
|
45583
|
+
const L = w == null ? void 0 : w.filter((G) => V.includes(G[d.value]));
|
|
45584
|
+
r(L), I(L);
|
|
45475
45585
|
}
|
|
45476
45586
|
} else {
|
|
45477
|
-
const
|
|
45478
|
-
r(
|
|
45587
|
+
const L = n ? [] : null;
|
|
45588
|
+
r(L), I(L);
|
|
45479
45589
|
}
|
|
45480
45590
|
},
|
|
45481
45591
|
options: N(),
|
|
@@ -45489,7 +45599,7 @@ const useTableSelectorProps$2 = () => {
|
|
|
45489
45599
|
onlyRenderProperties: !0,
|
|
45490
45600
|
basePath: u.address,
|
|
45491
45601
|
schema: h,
|
|
45492
|
-
filterProperties: (
|
|
45602
|
+
filterProperties: (V) => V["x-component"] === "Action"
|
|
45493
45603
|
}
|
|
45494
45604
|
) }) })
|
|
45495
45605
|
] }),
|
|
@@ -45508,7 +45618,7 @@ const useTableSelectorProps$2 = () => {
|
|
|
45508
45618
|
onlyRenderProperties: !0,
|
|
45509
45619
|
basePath: u.address,
|
|
45510
45620
|
schema: O,
|
|
45511
|
-
filterProperties: (
|
|
45621
|
+
filterProperties: (V) => V["x-component"] === "AssociationField.Selector"
|
|
45512
45622
|
}
|
|
45513
45623
|
) }) }) }) }) }))
|
|
45514
45624
|
}
|
|
@@ -45799,10 +45909,21 @@ const getSourceData = (e, t) => {
|
|
|
45799
45909
|
.ant-table-tbody .nb-column-initializer {
|
|
45800
45910
|
min-width: 40px !important;
|
|
45801
45911
|
}
|
|
45912
|
+
.ant-formily-item-feedback-layout-terse {
|
|
45913
|
+
margin-bottom: 0px;
|
|
45914
|
+
}
|
|
45915
|
+
.ant-formily-item-error-help {
|
|
45916
|
+
box-shadow: none !important;
|
|
45917
|
+
background: none !important;
|
|
45918
|
+
overflow-x: hidden;
|
|
45919
|
+
}
|
|
45920
|
+
.ant-formily-item-control:has(.ant-formily-item-error-help) .ant-formily-item-control-content-component {
|
|
45921
|
+
margin-bottom: 13px !important;
|
|
45922
|
+
}
|
|
45802
45923
|
`,
|
|
45803
45924
|
layout: "vertical",
|
|
45804
45925
|
bordered: !1,
|
|
45805
|
-
feedbackLayout: "
|
|
45926
|
+
feedbackLayout: "terse",
|
|
45806
45927
|
children: /* @__PURE__ */ jsx(
|
|
45807
45928
|
SchemaOptionsContext.Provider,
|
|
45808
45929
|
{
|
|
@@ -46885,8 +47006,8 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
46885
47006
|
InternalNocoBaseTable.displayName = "InternalNocoBaseTable";
|
|
46886
47007
|
const Table$1 = withDynamicSchemaProps(
|
|
46887
47008
|
observer$1((e) => {
|
|
46888
|
-
var
|
|
46889
|
-
const { token: t } = useToken$1(),
|
|
47009
|
+
var fe, be, ye;
|
|
47010
|
+
const { token: t } = useToken$1(), ge = omit(e, ["onBlur", "onFocus", "value"]), { pagination: n, useProps: o } = ge, r = W(ge, ["pagination", "useProps"]), he = (o == null ? void 0 : o()) || {}, { pagination: a } = he, i = W(he, ["pagination"]), Ce = x(x({}, r), i), {
|
|
46890
47011
|
dragSort: l = !1,
|
|
46891
47012
|
showIndex: c = !0,
|
|
46892
47013
|
onRowSelectionChange: u,
|
|
@@ -46898,7 +47019,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46898
47019
|
loading: f,
|
|
46899
47020
|
onClickRow: C,
|
|
46900
47021
|
enableIndexColumn: b
|
|
46901
|
-
} =
|
|
47022
|
+
} = Ce, S = W(Ce, [
|
|
46902
47023
|
"dragSort",
|
|
46903
47024
|
"showIndex",
|
|
46904
47025
|
"onRowSelectionChange",
|
|
@@ -46910,19 +47031,19 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46910
47031
|
"loading",
|
|
46911
47032
|
"onClickRow",
|
|
46912
47033
|
"enableIndexColumn"
|
|
46913
|
-
]), y = useArrayField(S), v = useFieldSchema(), { size: I = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, F = useCollection(), T = ((
|
|
46914
|
-
})), M = usePaginationProps$2(n, a), j = useTableColumns$1(S, M), [R, O] = useState(() => D ? B : []), [$, A] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [E, z] = useState([]),
|
|
47034
|
+
]), y = useArrayField(S), v = useFieldSchema(), { size: I = "small" } = (v == null ? void 0 : v["x-component-props"]) || {}, F = useCollection(), T = ((fe = v == null ? void 0 : v.parent) == null ? void 0 : fe["x-decorator"]) === "TableSelectorProvider" ? useTableSelectorContext() : useTableBlockContext(), { expandFlag: D, allIncludesChildren: B } = T, N = useMemoizedFn(S.onRowDragEnd || (() => {
|
|
47035
|
+
})), M = usePaginationProps$2(n, a), j = useTableColumns$1(S, M), [R, O] = useState(() => D ? B : []), [$, A] = useState(((be = y == null ? void 0 : y.data) == null ? void 0 : be.selectedRowKeys) || []), [E, z] = useState([]), V = (p == null ? void 0 : p.type) !== "none", L = useRef(/* @__PURE__ */ new Map()), G = useMemo(() => css`
|
|
46915
47036
|
& > td {
|
|
46916
47037
|
background-color: ${t.controlItemBgActive} !important;
|
|
46917
47038
|
}
|
|
46918
47039
|
&:hover > td {
|
|
46919
47040
|
background-color: ${t.controlItemBgActiveHover} !important;
|
|
46920
47041
|
}
|
|
46921
|
-
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), H = useMemo(() => C ? G : "", [G, C]), U = useMemo(() => C ? (ae,
|
|
47042
|
+
`, [t.controlItemBgActive, t.controlItemBgActiveHover]), H = useMemo(() => C ? G : "", [G, C]), U = useMemo(() => C ? (ae, ee) => ({
|
|
46922
47043
|
onClick: (oe) => {
|
|
46923
47044
|
isPortalInBody(oe.target) || C(ae, z, E);
|
|
46924
47045
|
},
|
|
46925
|
-
rowIndex:
|
|
47046
|
+
rowIndex: ee
|
|
46926
47047
|
}) : null, [C, E]);
|
|
46927
47048
|
useDeepCompareEffect(() => {
|
|
46928
47049
|
const ae = D ? B : [];
|
|
@@ -46933,73 +47054,73 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
46933
47054
|
return Y(ae);
|
|
46934
47055
|
if (ae.key)
|
|
46935
47056
|
return ae.key;
|
|
46936
|
-
if (
|
|
46937
|
-
return
|
|
46938
|
-
const
|
|
46939
|
-
return
|
|
47057
|
+
if (L.current.has(ae))
|
|
47058
|
+
return L.current.get(ae);
|
|
47059
|
+
const ee = uid();
|
|
47060
|
+
return L.current.set(ae, ee), ee;
|
|
46940
47061
|
}, []), Y = useCallback(
|
|
46941
47062
|
(ae) => {
|
|
46942
|
-
var
|
|
47063
|
+
var ee;
|
|
46943
47064
|
return Array.isArray(m) ? m.map((oe) => {
|
|
46944
|
-
var
|
|
46945
|
-
return ((
|
|
46946
|
-
}).join("-") : typeof m == "string" ? ae[m] : (
|
|
47065
|
+
var le;
|
|
47066
|
+
return ((le = ae[oe]) == null ? void 0 : le.toString()) || "";
|
|
47067
|
+
}).join("-") : typeof m == "string" ? ae[m] : (ee = (m != null ? m : K)(ae)) == null ? void 0 : ee.toString();
|
|
46947
47068
|
},
|
|
46948
47069
|
[JSON.stringify(m), K]
|
|
46949
|
-
), X = useMemo(() => (Array.isArray(y == null ? void 0 : y.value) ? y.value : []).filter(Boolean), [y == null ? void 0 : y.value, (ye = y == null ? void 0 : y.value) == null ? void 0 : ye.length]),
|
|
46950
|
-
const
|
|
47070
|
+
), X = useMemo(() => (Array.isArray(y == null ? void 0 : y.value) ? y.value : []).filter(Boolean), [y == null ? void 0 : y.value, (ye = y == null ? void 0 : y.value) == null ? void 0 : ye.length]), J = useMemo(() => (ae) => {
|
|
47071
|
+
const ee = useCallback((oe) => {
|
|
46951
47072
|
var Ae, ve, Pe, Fe, Ie, ke;
|
|
46952
47073
|
if (!oe.active || !oe.over) {
|
|
46953
47074
|
console.warn("move cancel");
|
|
46954
47075
|
return;
|
|
46955
47076
|
}
|
|
46956
|
-
const
|
|
46957
|
-
y.move(
|
|
47077
|
+
const le = (Pe = (ve = (Ae = oe.active) == null ? void 0 : Ae.data.current) == null ? void 0 : ve.sortable) == null ? void 0 : Pe.index, me = (ke = (Ie = (Fe = oe.over) == null ? void 0 : Fe.data.current) == null ? void 0 : Ie.sortable) == null ? void 0 : ke.index, xe = y.value[le] || oe.active, Se = y.value[me] || oe.over;
|
|
47078
|
+
y.move(le, me), N({ from: xe, to: Se });
|
|
46958
47079
|
}, []);
|
|
46959
|
-
return /* @__PURE__ */ jsx(DndContext, { onDragEnd:
|
|
47080
|
+
return /* @__PURE__ */ jsx(DndContext, { onDragEnd: ee, children: /* @__PURE__ */ jsx("tbody", x({}, ae)) });
|
|
46960
47081
|
}, [y, N]);
|
|
46961
|
-
|
|
46962
|
-
const
|
|
47082
|
+
J.displayName = "BodyWrapperComponent";
|
|
47083
|
+
const Z = useMemo(() => ({
|
|
46963
47084
|
header: {
|
|
46964
47085
|
wrapper: HeaderWrapperComponent,
|
|
46965
47086
|
cell: HeaderCellComponent
|
|
46966
47087
|
},
|
|
46967
47088
|
body: {
|
|
46968
|
-
wrapper:
|
|
47089
|
+
wrapper: J,
|
|
46969
47090
|
row: BodyRowComponent,
|
|
46970
47091
|
cell: BodyCellComponent
|
|
46971
47092
|
}
|
|
46972
|
-
}), [
|
|
47093
|
+
}), [J]), Q = useMemo(() => p, [JSON.stringify(p)]), ne = useMemo(
|
|
46973
47094
|
() => ({
|
|
46974
|
-
rowSelection: b &&
|
|
47095
|
+
rowSelection: b && Q ? x({
|
|
46975
47096
|
type: "checkbox",
|
|
46976
47097
|
selectedRowKeys: $,
|
|
46977
|
-
onChange(ae,
|
|
46978
|
-
y.data = y.data || {}, y.data.selectedRowKeys = ae, y.data.selectedRowData =
|
|
47098
|
+
onChange(ae, ee) {
|
|
47099
|
+
y.data = y.data || {}, y.data.selectedRowKeys = ae, y.data.selectedRowData = ee, A(ae), u == null || u(ae, ee);
|
|
46979
47100
|
},
|
|
46980
47101
|
getCheckboxProps(ae) {
|
|
46981
47102
|
return {
|
|
46982
47103
|
"aria-label": "checkbox"
|
|
46983
47104
|
};
|
|
46984
47105
|
},
|
|
46985
|
-
renderCell: (ae,
|
|
47106
|
+
renderCell: (ae, ee, oe, le) => {
|
|
46986
47107
|
if (!l && !c)
|
|
46987
|
-
return
|
|
46988
|
-
const
|
|
46989
|
-
return
|
|
47108
|
+
return le;
|
|
47109
|
+
const me = M == null ? void 0 : M.current, xe = (M == null ? void 0 : M.pageSize) || 20;
|
|
47110
|
+
return me ? oe = oe + (me - 1) * xe + 1 : oe = oe + 1, ee.__index && (oe = extractIndex(ee.__index)), /* @__PURE__ */ jsxs(
|
|
46990
47111
|
"div",
|
|
46991
47112
|
{
|
|
46992
47113
|
role: "button",
|
|
46993
47114
|
"aria-label": `table-index-${oe}`,
|
|
46994
47115
|
className: cls(ae ? "checked" : null, rowSelectCheckboxWrapperClass, {
|
|
46995
|
-
[rowSelectCheckboxWrapperClassHover]:
|
|
47116
|
+
[rowSelectCheckboxWrapperClassHover]: V
|
|
46996
47117
|
}),
|
|
46997
47118
|
children: [
|
|
46998
47119
|
/* @__PURE__ */ jsxs("div", { className: cls(ae ? "checked" : null, rowSelectCheckboxContentClass), children: [
|
|
46999
|
-
l && /* @__PURE__ */ jsx(SortHandle$1, { id: Y(
|
|
47120
|
+
l && /* @__PURE__ */ jsx(SortHandle$1, { id: Y(ee) }),
|
|
47000
47121
|
c && /* @__PURE__ */ jsx(TableIndex$2, { index: oe })
|
|
47001
47122
|
] }),
|
|
47002
|
-
|
|
47123
|
+
V && /* @__PURE__ */ jsx(
|
|
47003
47124
|
"div",
|
|
47004
47125
|
{
|
|
47005
47126
|
className: cls(
|
|
@@ -47007,77 +47128,77 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
47007
47128
|
ae ? "checked" : null,
|
|
47008
47129
|
rowSelectCheckboxCheckedClassHover
|
|
47009
47130
|
),
|
|
47010
|
-
children:
|
|
47131
|
+
children: le
|
|
47011
47132
|
}
|
|
47012
47133
|
)
|
|
47013
47134
|
]
|
|
47014
47135
|
}
|
|
47015
47136
|
);
|
|
47016
47137
|
}
|
|
47017
|
-
},
|
|
47138
|
+
}, Q) : void 0
|
|
47018
47139
|
}),
|
|
47019
47140
|
[
|
|
47020
|
-
|
|
47141
|
+
Q,
|
|
47021
47142
|
$,
|
|
47022
47143
|
u,
|
|
47023
47144
|
c,
|
|
47024
47145
|
l,
|
|
47025
47146
|
y,
|
|
47026
47147
|
Y,
|
|
47027
|
-
|
|
47028
|
-
|
|
47148
|
+
V,
|
|
47149
|
+
Q,
|
|
47029
47150
|
M,
|
|
47030
47151
|
b
|
|
47031
47152
|
]
|
|
47032
47153
|
), te = useCallback(
|
|
47033
47154
|
({ children: ae }) => {
|
|
47034
|
-
var
|
|
47155
|
+
var ee, oe;
|
|
47035
47156
|
return l ? React.createElement(
|
|
47036
47157
|
SortableContext$1,
|
|
47037
47158
|
{
|
|
47038
|
-
items: ((oe = (
|
|
47159
|
+
items: ((oe = (ee = y.value) == null ? void 0 : ee.map) == null ? void 0 : oe.call(ee, Y)) || []
|
|
47039
47160
|
},
|
|
47040
47161
|
ae
|
|
47041
47162
|
) : React.createElement(React.Fragment, {}, ae);
|
|
47042
47163
|
},
|
|
47043
47164
|
[y, l, Y]
|
|
47044
|
-
), { height:
|
|
47165
|
+
), { height: se, tableSizeRefCallback: ce } = useTableSize(), ie = useMemo(() => ({
|
|
47045
47166
|
x: "max-content"
|
|
47046
|
-
}), []),
|
|
47167
|
+
}), []), re = useMemo(() => ({
|
|
47047
47168
|
x: "max-content",
|
|
47048
|
-
y: X.length > 0 ?
|
|
47049
|
-
}), [
|
|
47169
|
+
y: X.length > 0 ? se : void 0
|
|
47170
|
+
}), [se, ie, X]), de = useCallback(
|
|
47050
47171
|
(ae) => E.includes(ae[m]) ? H : "",
|
|
47051
47172
|
[E, H, JSON.stringify(m)]
|
|
47052
|
-
),
|
|
47053
|
-
(ae,
|
|
47054
|
-
const oe = ae ? [...R,
|
|
47055
|
-
O(oe), g == null || g(ae,
|
|
47173
|
+
), pe = useCallback(
|
|
47174
|
+
(ae, ee) => {
|
|
47175
|
+
const oe = ae ? [...R, ee[F.getPrimaryKey()]] : R.filter((le) => ee[F.getPrimaryKey()] !== le);
|
|
47176
|
+
O(oe), g == null || g(ae, ee);
|
|
47056
47177
|
},
|
|
47057
47178
|
[R, g, F]
|
|
47058
|
-
),
|
|
47059
|
-
onExpand:
|
|
47179
|
+
), ue = useMemo(() => ({
|
|
47180
|
+
onExpand: pe,
|
|
47060
47181
|
expandedRowKeys: R
|
|
47061
|
-
}), [R,
|
|
47182
|
+
}), [R, pe]);
|
|
47062
47183
|
return (
|
|
47063
47184
|
// If spinning is set to undefined, it will cause the subtable to always display loading, so we need to convert it here
|
|
47064
47185
|
/* @__PURE__ */ jsx(Spin, { spinning: !!f, children: /* @__PURE__ */ jsx(
|
|
47065
47186
|
InternalNocoBaseTable,
|
|
47066
47187
|
P(x(x({
|
|
47067
|
-
tableHeight:
|
|
47188
|
+
tableHeight: se,
|
|
47068
47189
|
SortableWrapper: te,
|
|
47069
|
-
tableSizeRefCallback:
|
|
47190
|
+
tableSizeRefCallback: ce,
|
|
47070
47191
|
defaultRowKey: K,
|
|
47071
47192
|
dataSource: X
|
|
47072
|
-
}, S),
|
|
47193
|
+
}, S), ne), {
|
|
47073
47194
|
paginationProps: M,
|
|
47074
|
-
components:
|
|
47195
|
+
components: Z,
|
|
47075
47196
|
onTableChange: d,
|
|
47076
47197
|
onRow: U,
|
|
47077
|
-
rowClassName:
|
|
47078
|
-
scroll:
|
|
47198
|
+
rowClassName: de,
|
|
47199
|
+
scroll: re,
|
|
47079
47200
|
columns: j,
|
|
47080
|
-
expandable:
|
|
47201
|
+
expandable: ue,
|
|
47081
47202
|
field: y,
|
|
47082
47203
|
size: I
|
|
47083
47204
|
})
|
|
@@ -47140,20 +47261,20 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
47140
47261
|
var A, E, z;
|
|
47141
47262
|
const { openSize: t } = e, { field: n, options: o, fieldSchema: r } = useAssociationFieldContext(), { t: a } = useTranslation(), [i, l] = useState(!1), [c, u] = useState([]), d = useFieldNames$1(e), p = useFieldSchema(), m = useCompile(), h = useLabelUiSchema$1(o, (d == null ? void 0 : d.label) || "label"), g = useCollectionRecord(), f = useCollection(), { allowSelectExistingRecord: C, allowAddnew: b, allowDisassociation: S, enableIndexColumn: y } = n.componentProps;
|
|
47142
47263
|
useSubTableSpecialCase({ rootField: n, rootSchema: r });
|
|
47143
|
-
const v = (
|
|
47144
|
-
if (
|
|
47264
|
+
const v = (V, L) => {
|
|
47265
|
+
if (L !== void 0 && isArr(n.value) && V !== L)
|
|
47145
47266
|
return action(() => {
|
|
47146
|
-
const G = n.value[
|
|
47147
|
-
return n.value.splice(
|
|
47148
|
-
fromIndex:
|
|
47149
|
-
toIndex:
|
|
47267
|
+
const G = n.value[V];
|
|
47268
|
+
return n.value.splice(V, 1), n.value.splice(L, 0, G), exchangeArrayState(n, {
|
|
47269
|
+
fromIndex: V,
|
|
47270
|
+
toIndex: L
|
|
47150
47271
|
}), n.onInput(n.value);
|
|
47151
47272
|
});
|
|
47152
47273
|
};
|
|
47153
47274
|
n.move = v;
|
|
47154
|
-
const I = useMemo(() => n.value && Object.keys(n.value).length > 0 ? (Array.isArray(n.value) ? n.value : n.value ? [n.value] : []).filter(Boolean).map((
|
|
47155
|
-
const G =
|
|
47156
|
-
return P(x({},
|
|
47275
|
+
const I = useMemo(() => n.value && Object.keys(n.value).length > 0 ? (Array.isArray(n.value) ? n.value : n.value ? [n.value] : []).filter(Boolean).map((L) => {
|
|
47276
|
+
const G = L == null ? void 0 : L[d.label];
|
|
47277
|
+
return P(x({}, L), {
|
|
47157
47278
|
[d.label]: getLabelFormatValue$1(m(h), m(G))
|
|
47158
47279
|
});
|
|
47159
47280
|
}) : [], [n.value, d == null ? void 0 : d.label]), F = {
|
|
@@ -47169,28 +47290,28 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
47169
47290
|
setSelectedRows: u,
|
|
47170
47291
|
collectionField: o
|
|
47171
47292
|
}, w = () => {
|
|
47172
|
-
const { setVisible:
|
|
47293
|
+
const { setVisible: V } = useActionContext(), { selectedRows: L, setSelectedRows: G } = useContext(RecordPickerContext);
|
|
47173
47294
|
return {
|
|
47174
47295
|
onClick() {
|
|
47175
47296
|
var U;
|
|
47176
|
-
Array.isArray(n.value) || (n.value = []),
|
|
47297
|
+
Array.isArray(n.value) || (n.value = []), L.forEach((K) => n.value.push(markRecordAsNew(K))), n.onInput(n.value), n.initialValue = n.value, G([]), V(!1);
|
|
47177
47298
|
const H = Math.ceil(n.value.length / (((U = n.componentProps) == null ? void 0 : U.pageSize) || 10));
|
|
47178
47299
|
B(H);
|
|
47179
47300
|
}
|
|
47180
47301
|
};
|
|
47181
47302
|
}, T = () => {
|
|
47182
|
-
const
|
|
47183
|
-
return
|
|
47303
|
+
const V = (o == null ? void 0 : o.targetKey) || "id", L = (n.value || []).map((H) => H == null ? void 0 : H[V]).filter(Boolean);
|
|
47304
|
+
return L.length ? { $and: [{ [`${V}.$ne`]: L }] } : {};
|
|
47184
47305
|
}, [D, B] = useState(1), [N, M] = useState(((A = n.componentProps) == null ? void 0 : A.pageSize) || 10), { setFormValueChanged: j } = useActionContext();
|
|
47185
47306
|
useEffect(() => {
|
|
47186
|
-
var
|
|
47187
|
-
M((
|
|
47307
|
+
var V;
|
|
47308
|
+
M((V = n.componentProps) == null ? void 0 : V.pageSize);
|
|
47188
47309
|
}, [(E = n.componentProps) == null ? void 0 : E.pageSize]);
|
|
47189
47310
|
const R = useMemo(() => {
|
|
47190
|
-
var
|
|
47191
|
-
const
|
|
47311
|
+
var L;
|
|
47312
|
+
const V = Math.ceil(((L = n.value) == null ? void 0 : L.length) / 10);
|
|
47192
47313
|
return {
|
|
47193
|
-
current: D >
|
|
47314
|
+
current: D > V ? V : D,
|
|
47194
47315
|
pageSize: N || 10,
|
|
47195
47316
|
total: n == null ? void 0 : n.value,
|
|
47196
47317
|
onChange: (G, H) => {
|
|
@@ -47201,13 +47322,13 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
47201
47322
|
hideOnSinglePage: !1
|
|
47202
47323
|
};
|
|
47203
47324
|
}, [(z = n.value) == null ? void 0 : z.length, N, D]), O = () => {
|
|
47204
|
-
const { field:
|
|
47325
|
+
const { field: V } = useAssociationFieldContext();
|
|
47205
47326
|
return {
|
|
47206
47327
|
run() {
|
|
47207
47328
|
var G;
|
|
47208
|
-
|
|
47209
|
-
const
|
|
47210
|
-
return B(
|
|
47329
|
+
V.value = V.value || [], V.value.push(markRecordAsNew({}));
|
|
47330
|
+
const L = Math.ceil(V.value.length / (((G = V.componentProps) == null ? void 0 : G.pageSize) || 10));
|
|
47331
|
+
return B(L), V.onInput(V.value);
|
|
47211
47332
|
}
|
|
47212
47333
|
};
|
|
47213
47334
|
}, $ = () => ({
|
|
@@ -47224,7 +47345,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
47224
47345
|
field: n,
|
|
47225
47346
|
showIndex: !0,
|
|
47226
47347
|
dragSort: !1,
|
|
47227
|
-
showDel: n.editable && (b !== !1 || C !== !1 || S !== !1) ? (
|
|
47348
|
+
showDel: n.editable && (b !== !1 || C !== !1 || S !== !1) ? (V) => n.editable ? S !== !1 ? !0 : V == null ? void 0 : V.__isNewRecord__ : !1 : !1,
|
|
47228
47349
|
pagination: R,
|
|
47229
47350
|
rowSelection: { type: "none", hideSelectAll: !0 },
|
|
47230
47351
|
isSubTable: !0,
|
|
@@ -47292,7 +47413,7 @@ const Table$1 = withDynamicSchemaProps(
|
|
|
47292
47413
|
onlyRenderProperties: !0,
|
|
47293
47414
|
basePath: n.address,
|
|
47294
47415
|
schema: p.parent,
|
|
47295
|
-
filterProperties: (
|
|
47416
|
+
filterProperties: (V) => V["x-component"] === "AssociationField.Selector"
|
|
47296
47417
|
}
|
|
47297
47418
|
)
|
|
47298
47419
|
}
|
|
@@ -47391,7 +47512,7 @@ const ReadPretty$6 = observer$1(
|
|
|
47391
47512
|
InternalAssociationSelect.displayName = "InternalAssociationSelect";
|
|
47392
47513
|
const AssociationSelect = InternalAssociationSelect;
|
|
47393
47514
|
AssociationSelect.Designer = function e() {
|
|
47394
|
-
var O, $, A, E, z,
|
|
47515
|
+
var O, $, A, E, z, V, L, G, H, U, K;
|
|
47395
47516
|
const { getCollectionFields: t, getInterface: n, getCollectionJoinField: o, getCollection: r, isTitleField: a } = useCollectionManager_deprecated(), { getField: i } = 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 = i(u.name) || o(u["x-collection-field"]), y = useFieldComponentOptions(), v = c.address.segments.includes("__form_grid"), I = n(S == null ? void 0 : S.interface), F = (O = I == null ? void 0 : I.validateSchema) == null ? void 0 : O.call(I, u), w = ($ = S == null ? void 0 : S.uiSchema) == null ? void 0 : $.title, T = S != null && S.target ? t(S == null ? void 0 : S.target) : [];
|
|
47396
47517
|
c.title === w || c.title;
|
|
47397
47518
|
const D = useSortFields(S == null ? void 0 : S.target), B = ((z = (E = (A = c.componentProps) == null ? void 0 : A.service) == null ? void 0 : E.params) == null ? void 0 : z.sort) || [];
|
|
@@ -47505,19 +47626,19 @@ AssociationSelect.Designer = function e() {
|
|
|
47505
47626
|
}
|
|
47506
47627
|
},
|
|
47507
47628
|
onSubmit: (Y) => {
|
|
47508
|
-
var
|
|
47509
|
-
const X = [],
|
|
47629
|
+
var ne;
|
|
47630
|
+
const X = [], J = (te) => te != null && !Number.isNaN(te);
|
|
47510
47631
|
for (const te of Y.rules)
|
|
47511
|
-
X.push(_.pickBy(te,
|
|
47512
|
-
const
|
|
47632
|
+
X.push(_.pickBy(te, J));
|
|
47633
|
+
const Z = {
|
|
47513
47634
|
"x-uid": u["x-uid"]
|
|
47514
47635
|
};
|
|
47515
47636
|
if (["percent"].includes(S == null ? void 0 : S.interface))
|
|
47516
47637
|
for (const te of X)
|
|
47517
47638
|
(te.maxValue || te.minValue) && (te.percentMode = !0), te.percentFormat && (te.percentFormats = !0);
|
|
47518
|
-
const
|
|
47519
|
-
c.validator =
|
|
47520
|
-
schema:
|
|
47639
|
+
const Q = _.concat([], ((ne = S == null ? void 0 : S.uiSchema) == null ? void 0 : ne["x-validator"]) || [], X);
|
|
47640
|
+
c.validator = Q, u["x-validator"] = X, Z["x-validator"] = X, m.emit("patch", {
|
|
47641
|
+
schema: Z
|
|
47521
47642
|
}), h();
|
|
47522
47643
|
}
|
|
47523
47644
|
}
|
|
@@ -47565,7 +47686,7 @@ AssociationSelect.Designer = function e() {
|
|
|
47565
47686
|
options: y,
|
|
47566
47687
|
value: u["x-component"],
|
|
47567
47688
|
onChange: (Y) => {
|
|
47568
|
-
var
|
|
47689
|
+
var J, Z;
|
|
47569
47690
|
const X = {
|
|
47570
47691
|
name: S == null ? void 0 : S.name,
|
|
47571
47692
|
type: "void",
|
|
@@ -47580,9 +47701,9 @@ AssociationSelect.Designer = function e() {
|
|
|
47580
47701
|
"x-validator": u["x-validator"],
|
|
47581
47702
|
"x-collection-field": u["x-collection-field"],
|
|
47582
47703
|
"x-decorator-props": u["x-decorator-props"],
|
|
47583
|
-
"x-component-props": x(x({}, (
|
|
47704
|
+
"x-component-props": x(x({}, (J = S == null ? void 0 : S.uiSchema) == null ? void 0 : J["x-component-props"]), u["x-component-props"])
|
|
47584
47705
|
};
|
|
47585
|
-
(
|
|
47706
|
+
(Z = I == null ? void 0 : I.schemaInitialize) == null || Z.call(I, X, {
|
|
47586
47707
|
field: S,
|
|
47587
47708
|
block: "Form",
|
|
47588
47709
|
readPretty: c.readPretty,
|
|
@@ -47605,7 +47726,7 @@ AssociationSelect.Designer = function e() {
|
|
|
47605
47726
|
SchemaSettingsSwitchItem,
|
|
47606
47727
|
{
|
|
47607
47728
|
title: d("Allow multiple"),
|
|
47608
|
-
checked: ((
|
|
47729
|
+
checked: ((V = u["x-component-props"]) == null ? void 0 : V.multiple) === void 0 ? !0 : u["x-component-props"].multiple,
|
|
47609
47730
|
onChange: (Y) => {
|
|
47610
47731
|
const X = {
|
|
47611
47732
|
"x-uid": u["x-uid"]
|
|
@@ -47621,7 +47742,7 @@ AssociationSelect.Designer = function e() {
|
|
|
47621
47742
|
SchemaSettingsDataScope,
|
|
47622
47743
|
{
|
|
47623
47744
|
collectionName: S == null ? void 0 : S.target,
|
|
47624
|
-
defaultFilter: ((H = (G = (
|
|
47745
|
+
defaultFilter: ((H = (G = (L = c.componentProps) == null ? void 0 : L.service) == null ? void 0 : G.params) == null ? void 0 : H.filter) || {},
|
|
47625
47746
|
form: l,
|
|
47626
47747
|
onSubmit: ({ filter: Y }) => {
|
|
47627
47748
|
Y = removeNullCondition(Y), _.set(c.componentProps, "service.params.filter", Y), u["x-component-props"] = c.componentProps, m.emit("patch", {
|
|
@@ -47708,7 +47829,7 @@ AssociationSelect.Designer = function e() {
|
|
|
47708
47829
|
}
|
|
47709
47830
|
},
|
|
47710
47831
|
onSubmit: ({ sort: Y }) => {
|
|
47711
|
-
const X = Y.map((
|
|
47832
|
+
const X = Y.map((J) => J.direction === "desc" ? `-${J.field}` : J.field);
|
|
47712
47833
|
_.set(c.componentProps, "service.params.sort", X), u["x-component-props"] = c.componentProps, m.emit("patch", {
|
|
47713
47834
|
schema: {
|
|
47714
47835
|
"x-uid": u["x-uid"],
|
|
@@ -47760,13 +47881,13 @@ AssociationSelect.Designer = function e() {
|
|
|
47760
47881
|
options: M,
|
|
47761
47882
|
value: (K = (U = c == null ? void 0 : c.componentProps) == null ? void 0 : U.fieldNames) == null ? void 0 : K.label,
|
|
47762
47883
|
onChange: (Y) => {
|
|
47763
|
-
var
|
|
47884
|
+
var Z, Q;
|
|
47764
47885
|
const X = {
|
|
47765
47886
|
"x-uid": u["x-uid"]
|
|
47766
|
-
},
|
|
47887
|
+
}, J = P(x(x({}, (Q = (Z = S == null ? void 0 : S.uiSchema) == null ? void 0 : Z["x-component-props"]) == null ? void 0 : Q.fieldNames), c.componentProps.fieldNames), {
|
|
47767
47888
|
label: Y
|
|
47768
47889
|
});
|
|
47769
|
-
c.componentProps.fieldNames =
|
|
47890
|
+
c.componentProps.fieldNames = J, u["x-component-props"] = u["x-component-props"] || {}, u["x-component-props"].fieldNames = J, X["x-component-props"] = u["x-component-props"], m.emit("patch", {
|
|
47770
47891
|
schema: X
|
|
47771
47892
|
}), m.refresh();
|
|
47772
47893
|
}
|
|
@@ -47897,17 +48018,17 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
47897
48018
|
}
|
|
47898
48019
|
},
|
|
47899
48020
|
onSubmit: ($) => {
|
|
47900
|
-
var
|
|
48021
|
+
var V;
|
|
47901
48022
|
const A = [];
|
|
47902
|
-
for (const
|
|
47903
|
-
A.push(_.pickBy(
|
|
48023
|
+
for (const L of $.rules)
|
|
48024
|
+
A.push(_.pickBy(L, _.identity));
|
|
47904
48025
|
const E = {
|
|
47905
48026
|
"x-uid": l["x-uid"]
|
|
47906
48027
|
};
|
|
47907
48028
|
if (["percent"].includes(m == null ? void 0 : m.interface))
|
|
47908
|
-
for (const
|
|
47909
|
-
(
|
|
47910
|
-
const z = _.concat([], ((
|
|
48029
|
+
for (const L of A)
|
|
48030
|
+
(L.maxValue || L.minValue) && (L.percentMode = !0), L.percentFormat && (L.percentFormats = !0);
|
|
48031
|
+
const z = _.concat([], ((V = m == null ? void 0 : m.uiSchema) == null ? void 0 : V["x-validator"]) || [], A);
|
|
47911
48032
|
i.validator = z, l["x-validator"] = A, E["x-validator"] = A, u.emit("patch", {
|
|
47912
48033
|
schema: E
|
|
47913
48034
|
}), d();
|
|
@@ -48049,10 +48170,10 @@ AssociationSelect.FilterDesigner = function e() {
|
|
|
48049
48170
|
options: v,
|
|
48050
48171
|
value: (O = (R = i == null ? void 0 : i.componentProps) == null ? void 0 : R.fieldNames) == null ? void 0 : O.label,
|
|
48051
48172
|
onChange: ($) => {
|
|
48052
|
-
var z,
|
|
48173
|
+
var z, V;
|
|
48053
48174
|
const A = {
|
|
48054
48175
|
"x-uid": l["x-uid"]
|
|
48055
|
-
}, E = P(x(x({}, (
|
|
48176
|
+
}, E = P(x(x({}, (V = (z = m == null ? void 0 : m.uiSchema) == null ? void 0 : z["x-component-props"]) == null ? void 0 : V.fieldNames), i.componentProps.fieldNames), {
|
|
48056
48177
|
label: $
|
|
48057
48178
|
});
|
|
48058
48179
|
i.componentProps.fieldNames = E, l["x-component-props"] = l["x-component-props"] || {}, l["x-component-props"].fieldNames = E, A["x-component-props"] = l["x-component-props"], u.emit("patch", {
|
|
@@ -52237,14 +52358,14 @@ const TableActionColumnDesigner = (e) => {
|
|
|
52237
52358
|
}
|
|
52238
52359
|
},
|
|
52239
52360
|
onSubmit: ({ sort: A }) => {
|
|
52240
|
-
var
|
|
52241
|
-
const E = A.map((
|
|
52361
|
+
var V;
|
|
52362
|
+
const E = A.map((L) => L.direction === "desc" ? `-${L.field}` : L.field), z = r.decoratorProps.params || {};
|
|
52242
52363
|
z.sort = E, r.decoratorProps.params = z, a["x-decorator-props"].params = z, d.emit("patch", {
|
|
52243
52364
|
schema: {
|
|
52244
52365
|
"x-uid": a["x-uid"],
|
|
52245
52366
|
"x-decorator-props": a["x-decorator-props"]
|
|
52246
52367
|
}
|
|
52247
|
-
}), c.run(P(x({}, (
|
|
52368
|
+
}), c.run(P(x({}, (V = c.params) == null ? void 0 : V[0]), { sort: E }));
|
|
52248
52369
|
}
|
|
52249
52370
|
}
|
|
52250
52371
|
),
|
|
@@ -52285,9 +52406,9 @@ const TableActionColumnDesigner = (e) => {
|
|
|
52285
52406
|
{ label: u("Small"), value: "small" }
|
|
52286
52407
|
],
|
|
52287
52408
|
onChange: (A) => {
|
|
52288
|
-
const E = a.reduceProperties((z,
|
|
52289
|
-
if (
|
|
52290
|
-
return
|
|
52409
|
+
const E = a.reduceProperties((z, V) => {
|
|
52410
|
+
if (V["x-component"] === "TableV2")
|
|
52411
|
+
return V;
|
|
52291
52412
|
}, null);
|
|
52292
52413
|
E["x-component-props"] = E["x-component-props"] || {}, E["x-component-props"].size = A, d.emit("patch", {
|
|
52293
52414
|
schema: {
|
|
@@ -54418,7 +54539,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
54418
54539
|
if (Array.isArray(E))
|
|
54419
54540
|
return E.filter(Boolean);
|
|
54420
54541
|
const z = String(E != null ? E : "").trim();
|
|
54421
|
-
return z ? z.split(/[\s,]+/).map((
|
|
54542
|
+
return z ? z.split(/[\s,]+/).map((V) => V.trim()).filter(Boolean) : [];
|
|
54422
54543
|
}, $ = R.tlds;
|
|
54423
54544
|
let A = "iana";
|
|
54424
54545
|
if ($ === "iana" || $ === !0 || $ === "true" ? A = "iana" : $ === "disable" || $ === !1 || $ === "false" ? A = "disable" : $ === "allow" ? A = "allow" : $ === "deny" ? A = "deny" : $ && typeof $ == "object" && ($.allow === !0 ? A = "iana" : Array.isArray($.allow) ? A = "allow" : Array.isArray($.deny) ? A = "deny" : A = "iana"), A === "iana")
|
|
@@ -54485,11 +54606,11 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
54485
54606
|
return;
|
|
54486
54607
|
let E = !1;
|
|
54487
54608
|
A.params.forEach((z) => {
|
|
54488
|
-
var
|
|
54609
|
+
var L, G;
|
|
54489
54610
|
if (!z.required)
|
|
54490
54611
|
return;
|
|
54491
|
-
const
|
|
54492
|
-
b(z.componentType,
|
|
54612
|
+
const V = (G = (L = $.args) == null ? void 0 : L[z.key]) != null ? G : z.defaultValue;
|
|
54613
|
+
b(z.componentType, V) && (M = !0, E = !0);
|
|
54493
54614
|
}), E && j.push($.key);
|
|
54494
54615
|
});
|
|
54495
54616
|
} catch ($) {
|
|
@@ -54528,10 +54649,10 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
54528
54649
|
if (A.key === M) {
|
|
54529
54650
|
let z = P(x({}, A.args), { [j]: R });
|
|
54530
54651
|
z = f(A.name, z);
|
|
54531
|
-
const
|
|
54652
|
+
const V = S.find((L) => L.key === A.name);
|
|
54532
54653
|
return P(x({}, A), {
|
|
54533
54654
|
args: z,
|
|
54534
|
-
paramsType: (E =
|
|
54655
|
+
paramsType: (E = V == null ? void 0 : V.paramsType) != null ? E : A.paramsType
|
|
54535
54656
|
});
|
|
54536
54657
|
}
|
|
54537
54658
|
return A;
|
|
@@ -54546,7 +54667,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
54546
54667
|
}, T = (M) => {
|
|
54547
54668
|
const j = S.find((R) => R.key === M.name);
|
|
54548
54669
|
return j ? !j.hasValue || j.params.length === 0 ? /* @__PURE__ */ jsx("div", { style: { color: c.colorTextSecondary }, children: l("This validation rule has no additional parameters") }) : /* @__PURE__ */ jsx(Form$2, { size: "small", children: j.params.map((R) => {
|
|
54549
|
-
var A, E, z,
|
|
54670
|
+
var A, E, z, V, L, G, H;
|
|
54550
54671
|
let O = (E = (A = M.args) == null ? void 0 : A[R.key]) != null ? E : R.defaultValue;
|
|
54551
54672
|
R.componentType === "radio" && R.key === "tlds" && (j.key === "email" || j.key === "domain") && (O = C(M.args));
|
|
54552
54673
|
const $ = !!R.required && b(R.componentType, O);
|
|
@@ -54580,11 +54701,11 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
54580
54701
|
else if (X === "disable")
|
|
54581
54702
|
F(M.key, "tlds", !1);
|
|
54582
54703
|
else if (X === "allow") {
|
|
54583
|
-
const
|
|
54584
|
-
F(M.key, "tlds", { allow:
|
|
54704
|
+
const J = (K = M.args) == null ? void 0 : K.tlds, Z = Array.isArray(J == null ? void 0 : J.allow) ? J.allow : [];
|
|
54705
|
+
F(M.key, "tlds", { allow: Z });
|
|
54585
54706
|
} else if (X === "deny") {
|
|
54586
|
-
const
|
|
54587
|
-
F(M.key, "tlds", { deny:
|
|
54707
|
+
const J = (Y = M.args) == null ? void 0 : Y.tlds, Z = Array.isArray(J == null ? void 0 : J.deny) ? J.deny : [];
|
|
54708
|
+
F(M.key, "tlds", { deny: Z });
|
|
54588
54709
|
}
|
|
54589
54710
|
} else
|
|
54590
54711
|
F(M.key, R.key, U.target.value);
|
|
@@ -54592,24 +54713,24 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
54592
54713
|
children: (z = R.options) == null ? void 0 : z.map((U) => /* @__PURE__ */ jsx(Radio$1, { value: U.value, children: l(U.label) }, U.value))
|
|
54593
54714
|
}
|
|
54594
54715
|
),
|
|
54595
|
-
(
|
|
54716
|
+
(V = R.options) == null ? void 0 : V.map((U) => {
|
|
54596
54717
|
var K, Y, X;
|
|
54597
54718
|
return U.value === O && U.componentType ? /* @__PURE__ */ jsx("div", { style: { marginTop: c.marginXS }, children: U.componentType === "text" ? (() => {
|
|
54598
|
-
var
|
|
54719
|
+
var Z;
|
|
54599
54720
|
if (R.key === "tlds" && (U.value === "allow" || U.value === "deny")) {
|
|
54600
|
-
const
|
|
54601
|
-
U.value === "allow" ?
|
|
54602
|
-
) ? U.value === "allow" ?
|
|
54721
|
+
const Q = (Z = M.args) == null ? void 0 : Z.tlds, ne = Array.isArray(
|
|
54722
|
+
U.value === "allow" ? Q == null ? void 0 : Q.allow : Q == null ? void 0 : Q.deny
|
|
54723
|
+
) ? U.value === "allow" ? Q.allow : Q.deny : [];
|
|
54603
54724
|
return /* @__PURE__ */ jsx(
|
|
54604
54725
|
Select$1,
|
|
54605
54726
|
{
|
|
54606
54727
|
mode: "tags",
|
|
54607
|
-
value:
|
|
54728
|
+
value: ne,
|
|
54608
54729
|
onChange: (te) => {
|
|
54609
|
-
const
|
|
54610
|
-
new Set(te.map((
|
|
54730
|
+
const se = Array.from(
|
|
54731
|
+
new Set(te.map((ce) => String(ce).trim()).filter(Boolean))
|
|
54611
54732
|
);
|
|
54612
|
-
U.value === "allow" ? F(M.key, "tlds", { allow:
|
|
54733
|
+
U.value === "allow" ? F(M.key, "tlds", { allow: se }) : F(M.key, "tlds", { deny: se });
|
|
54613
54734
|
},
|
|
54614
54735
|
tokenSeparators: [",", " ", `
|
|
54615
54736
|
`, " "],
|
|
@@ -54622,7 +54743,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
54622
54743
|
Input$3,
|
|
54623
54744
|
{
|
|
54624
54745
|
value: "",
|
|
54625
|
-
onChange: (
|
|
54746
|
+
onChange: (Q) => F(M.key, `${R.key}_${U.value}`, Q.target.value),
|
|
54626
54747
|
style: { width: "100%" }
|
|
54627
54748
|
}
|
|
54628
54749
|
);
|
|
@@ -54632,21 +54753,21 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
54632
54753
|
precision: y ? void 0 : 0,
|
|
54633
54754
|
step: y ? 0.1 : 1,
|
|
54634
54755
|
value: ((K = M.args) == null ? void 0 : K[`${R.key}_${U.value}`]) || "",
|
|
54635
|
-
onChange: (
|
|
54756
|
+
onChange: (J) => F(M.key, `${R.key}_${U.value}`, J),
|
|
54636
54757
|
style: { width: "100%" }
|
|
54637
54758
|
}
|
|
54638
54759
|
) : U.componentType === "checkbox" ? /* @__PURE__ */ jsx(
|
|
54639
54760
|
Checkbox$1,
|
|
54640
54761
|
{
|
|
54641
54762
|
checked: ((Y = M.args) == null ? void 0 : Y[`${R.key}_${U.value}`]) || !1,
|
|
54642
|
-
onChange: (
|
|
54763
|
+
onChange: (J) => F(M.key, `${R.key}_${U.value}`, J.target.checked),
|
|
54643
54764
|
children: l(U.label)
|
|
54644
54765
|
}
|
|
54645
54766
|
) : U.componentType === "datePicker" ? /* @__PURE__ */ jsx(
|
|
54646
54767
|
DatePicker$1,
|
|
54647
54768
|
{
|
|
54648
54769
|
value: (X = M.args) != null && X[`${R.key}_${U.value}`] ? dayjs(M.args[`${R.key}_${U.value}`]) : null,
|
|
54649
|
-
onChange: (
|
|
54770
|
+
onChange: (J) => F(M.key, `${R.key}_${U.value}`, J == null ? void 0 : J.toISOString()),
|
|
54650
54771
|
placeholder: l("Select date"),
|
|
54651
54772
|
style: { width: "100%" }
|
|
54652
54773
|
}
|
|
@@ -54661,7 +54782,7 @@ const useCurrentAppInfo = () => useContext(CurrentAppInfoContext), CurrentAppInf
|
|
|
54661
54782
|
placeholder: l("Please select"),
|
|
54662
54783
|
style: { width: "100%", height: "100%" },
|
|
54663
54784
|
allowClear: !0,
|
|
54664
|
-
children: (
|
|
54785
|
+
children: (L = R.options) == null ? void 0 : L.map((U) => /* @__PURE__ */ jsx(Select$1.Option, { value: U.value, children: l(U.label) }, U.value))
|
|
54665
54786
|
}
|
|
54666
54787
|
),
|
|
54667
54788
|
(G = R.options) == null ? void 0 : G.map((U) => U.value === O && U.componentType ? /* @__PURE__ */ jsx(Fragment$1, {}) : null)
|
|
@@ -55230,18 +55351,18 @@ const supportTypes = ["string", "bigInt", "integer", "uuid", "uid", "nanoid"], S
|
|
|
55230
55351
|
var z;
|
|
55231
55352
|
if (E.key === "systemInfo")
|
|
55232
55353
|
A.push(P(x({}, E), {
|
|
55233
|
-
children: E.children.filter((
|
|
55354
|
+
children: E.children.filter((V) => V.hidden ? !1 : V.value === "tableoid" ? $ != null && $.length ? $.includes(V.value) : (l == null ? void 0 : l.dialect) === "postgres" : typeof o[V.value] == "boolean" ? o[V.value] : !0)
|
|
55234
55355
|
}));
|
|
55235
55356
|
else {
|
|
55236
|
-
let
|
|
55237
|
-
$ != null && $.length ? $.forEach((
|
|
55357
|
+
let V = [];
|
|
55358
|
+
$ != null && $.length ? $.forEach((L) => {
|
|
55238
55359
|
var H;
|
|
55239
|
-
const G = (H = E == null ? void 0 : E.children) == null ? void 0 : H.find((U) => [
|
|
55240
|
-
G &&
|
|
55241
|
-
targetScope:
|
|
55360
|
+
const G = (H = E == null ? void 0 : E.children) == null ? void 0 : H.find((U) => [L, L.interface].includes(U.name));
|
|
55361
|
+
G && V.push(P(x({}, G), {
|
|
55362
|
+
targetScope: L == null ? void 0 : L.targetScope
|
|
55242
55363
|
}));
|
|
55243
|
-
}) : O != null && O.length ?
|
|
55244
|
-
children:
|
|
55364
|
+
}) : O != null && O.length ? V = (z = E == null ? void 0 : E.children) == null ? void 0 : z.filter((L) => !O.includes(L.name)) : V = E == null ? void 0 : E.children, V != null && V.length && A.push(P(x({}, E), {
|
|
55365
|
+
children: V
|
|
55245
55366
|
}));
|
|
55246
55367
|
}
|
|
55247
55368
|
}), A;
|
|
@@ -55532,7 +55653,7 @@ const supportTypes = ["string", "bigInt", "integer", "uuid", "uid", "nanoid"], S
|
|
|
55532
55653
|
run() {
|
|
55533
55654
|
return q(this, null, function* () {
|
|
55534
55655
|
yield j.submit();
|
|
55535
|
-
const z = cloneDeep(j.values),
|
|
55656
|
+
const z = cloneDeep(j.values), V = omit(z, [
|
|
55536
55657
|
"key",
|
|
55537
55658
|
"uiSchemaUid",
|
|
55538
55659
|
"collectionName",
|
|
@@ -55545,7 +55666,7 @@ const supportTypes = ["string", "bigInt", "integer", "uuid", "uid", "nanoid"], S
|
|
|
55545
55666
|
// 'reverseField.uiSchemaUid',
|
|
55546
55667
|
]);
|
|
55547
55668
|
yield A.create({
|
|
55548
|
-
values:
|
|
55669
|
+
values: V
|
|
55549
55670
|
}), yield j.reset(), yield O(), yield R(), $.setVisible(!1);
|
|
55550
55671
|
});
|
|
55551
55672
|
}
|
|
@@ -56039,13 +56160,13 @@ const getSchema$4 = (e, t, n) => {
|
|
|
56039
56160
|
useEffect(() => {
|
|
56040
56161
|
const R = [];
|
|
56041
56162
|
g.forEach((O) => {
|
|
56042
|
-
var
|
|
56043
|
-
const $ = v(O), E = w(O).map((
|
|
56044
|
-
const G = T(
|
|
56163
|
+
var V;
|
|
56164
|
+
const $ = v(O), E = w(O).map((L) => {
|
|
56165
|
+
const G = T(L, O);
|
|
56045
56166
|
return {
|
|
56046
56167
|
type: "group",
|
|
56047
|
-
key:
|
|
56048
|
-
label: l("Parent collection fields") + l(`(${v(
|
|
56168
|
+
key: L,
|
|
56169
|
+
label: l("Parent collection fields") + l(`(${v(L).title})`),
|
|
56049
56170
|
children: G.filter((H) => !["hasOne", "hasMany", "belongsToMany"].includes(H == null ? void 0 : H.type)).map((H) => {
|
|
56050
56171
|
var U;
|
|
56051
56172
|
return {
|
|
@@ -56054,9 +56175,9 @@ const getSchema$4 = (e, t, n) => {
|
|
|
56054
56175
|
};
|
|
56055
56176
|
})
|
|
56056
56177
|
};
|
|
56057
|
-
}), z = (
|
|
56178
|
+
}), z = (V = $.fields.filter((L) => !["obo", "oho", "m2m", "o2m"].includes(L == null ? void 0 : L.interface))) == null ? void 0 : V.map((L) => {
|
|
56058
56179
|
var G;
|
|
56059
|
-
return { value:
|
|
56180
|
+
return { value: L.name, key: L.name, label: l(((G = L.uiSchema) == null ? void 0 : G.title) || L.name) };
|
|
56060
56181
|
}).concat(E);
|
|
56061
56182
|
R.push({
|
|
56062
56183
|
value: O,
|
|
@@ -56070,21 +56191,21 @@ const getSchema$4 = (e, t, n) => {
|
|
|
56070
56191
|
if (R) {
|
|
56071
56192
|
u(!1), p([]);
|
|
56072
56193
|
const A = ($ = Object.values((O = R == null ? void 0 : R.data) == null ? void 0 : O.fields)) == null ? void 0 : $.map((E) => {
|
|
56073
|
-
var
|
|
56194
|
+
var V, L;
|
|
56074
56195
|
const z = (a == null ? void 0 : a.data.find((G) => G.name === E.name)) || E;
|
|
56075
56196
|
if (!(z != null && z.uiSchema)) {
|
|
56076
56197
|
const G = I(E.interface);
|
|
56077
56198
|
z.uiSchema = (G == null ? void 0 : G.default.uiSchema) || {};
|
|
56078
56199
|
}
|
|
56079
56200
|
return E.source ? P(x({}, E), {
|
|
56080
|
-
uiSchema: P(x({}, omit(z.uiSchema, "rawTitle")), { title: ((L = z.uiSchema) == null ? void 0 : L.title) || z.name })
|
|
56081
|
-
}) : P(x({}, z), {
|
|
56082
56201
|
uiSchema: P(x({}, omit(z.uiSchema, "rawTitle")), { title: ((V = z.uiSchema) == null ? void 0 : V.title) || z.name })
|
|
56202
|
+
}) : P(x({}, z), {
|
|
56203
|
+
uiSchema: P(x({}, omit(z.uiSchema, "rawTitle")), { title: ((L = z.uiSchema) == null ? void 0 : L.title) || z.name })
|
|
56083
56204
|
});
|
|
56084
56205
|
});
|
|
56085
56206
|
S.value = A, setTimeout(() => {
|
|
56086
|
-
var E, z,
|
|
56087
|
-
p(A), y.setValuesIn("sources", (E = R.data) == null ? void 0 : E.sources), f((z = R.data) == null ? void 0 : z.sources), b((
|
|
56207
|
+
var E, z, V;
|
|
56208
|
+
p(A), y.setValuesIn("sources", (E = R.data) == null ? void 0 : E.sources), f((z = R.data) == null ? void 0 : z.sources), b((V = R == null ? void 0 : R.data) == null ? void 0 : V.unsupportedFields);
|
|
56088
56209
|
});
|
|
56089
56210
|
}
|
|
56090
56211
|
}).catch);
|
|
@@ -56092,8 +56213,8 @@ const getSchema$4 = (e, t, n) => {
|
|
|
56092
56213
|
const M = (R, O) => {
|
|
56093
56214
|
const $ = _.cloneDeep(d);
|
|
56094
56215
|
$[O] = R, p($), S.value = $.map((A) => {
|
|
56095
|
-
var z,
|
|
56096
|
-
const E = typeof A.source == "string" ? A.source : (
|
|
56216
|
+
var z, V, L;
|
|
56217
|
+
const E = typeof A.source == "string" ? A.source : (L = (V = (z = A.source) == null ? void 0 : z.filter) == null ? void 0 : V.call(z, Boolean)) == null ? void 0 : L.join(".");
|
|
56097
56218
|
return P(x({}, A), {
|
|
56098
56219
|
source: E
|
|
56099
56220
|
});
|
|
@@ -56118,8 +56239,8 @@ const getSchema$4 = (e, t, n) => {
|
|
|
56118
56239
|
style: { width: "100%" },
|
|
56119
56240
|
options: D(m),
|
|
56120
56241
|
onChange: (A, E) => {
|
|
56121
|
-
var
|
|
56122
|
-
const z = (
|
|
56242
|
+
var V;
|
|
56243
|
+
const z = (V = F(A == null ? void 0 : A[0])) == null ? void 0 : V.find((L) => L.name === last(A));
|
|
56123
56244
|
M(P(x({}, O), { source: A, uiSchema: z == null ? void 0 : z.uiSchema }), $);
|
|
56124
56245
|
},
|
|
56125
56246
|
placeholder: l("Select field source")
|
|
@@ -56161,7 +56282,7 @@ const getSchema$4 = (e, t, n) => {
|
|
|
56161
56282
|
onChange: (z) => {
|
|
56162
56283
|
M(P(x({}, A), { interface: z }), $);
|
|
56163
56284
|
},
|
|
56164
|
-
children: E.map((z) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(z.label), children: z.children.map((
|
|
56285
|
+
children: E.map((z) => /* @__PURE__ */ jsx(Select$1.OptGroup, { label: D(z.label), children: z.children.map((V) => /* @__PURE__ */ jsx(Select$1.Option, { value: V.name, children: D(V.label) }, V.value)) }, z.key))
|
|
56165
56286
|
}
|
|
56166
56287
|
);
|
|
56167
56288
|
}
|
|
@@ -56241,7 +56362,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
56241
56362
|
key: I.name,
|
|
56242
56363
|
width: 200,
|
|
56243
56364
|
render: ($, A, E) => {
|
|
56244
|
-
const z = A[I.name],
|
|
56365
|
+
const z = A[I.name], V = {
|
|
56245
56366
|
type: "object",
|
|
56246
56367
|
properties: {
|
|
56247
56368
|
[I.name]: {
|
|
@@ -56253,7 +56374,7 @@ const mapFields = ["lineString", "point", "circle", "polygon"], PreviewTable$1 =
|
|
|
56253
56374
|
}
|
|
56254
56375
|
}
|
|
56255
56376
|
};
|
|
56256
|
-
return /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(RecursionField, { schema:
|
|
56377
|
+
return /* @__PURE__ */ jsx(EllipsisWithTooltip, { ellipsis: !0, children: /* @__PURE__ */ jsx(RecursionField, { schema: V, name: E, onlyRenderProperties: !0 }) });
|
|
56257
56378
|
}
|
|
56258
56379
|
};
|
|
56259
56380
|
});
|
|
@@ -65163,16 +65284,16 @@ const ActionInitializerItem = (e) => {
|
|
|
65163
65284
|
}, A = (Y) => {
|
|
65164
65285
|
M(Y), d(Y), p == null || p(Y);
|
|
65165
65286
|
}, E = (Y) => {
|
|
65166
|
-
var
|
|
65167
|
-
const X = (
|
|
65287
|
+
var J;
|
|
65288
|
+
const X = (J = h == null ? void 0 : h[0]) == null ? void 0 : J.filter;
|
|
65168
65289
|
(y || X) && g(P(x({}, h == null ? void 0 : h[0]), {
|
|
65169
65290
|
filter: f
|
|
65170
65291
|
})), v(!y), Y.stopPropagation();
|
|
65171
65292
|
}, z = (Y) => {
|
|
65172
65293
|
Y.stopPropagation();
|
|
65173
|
-
},
|
|
65294
|
+
}, V = (Y) => {
|
|
65174
65295
|
m(Y);
|
|
65175
|
-
},
|
|
65296
|
+
}, L = (K = i.title) != null ? K : (U = a == null ? void 0 : a.uiSchema) == null ? void 0 : U.title;
|
|
65176
65297
|
return t(
|
|
65177
65298
|
/* @__PURE__ */ jsxs(SortableItem, { className: cls(n, o, "nb-block-item", e.className, "SortableItem"), children: [
|
|
65178
65299
|
/* @__PURE__ */ jsx(l, {}),
|
|
@@ -65189,7 +65310,7 @@ const ActionInitializerItem = (e) => {
|
|
|
65189
65310
|
},
|
|
65190
65311
|
gutter: 5,
|
|
65191
65312
|
children: [
|
|
65192
|
-
/* @__PURE__ */ jsx(Col, { title: c(
|
|
65313
|
+
/* @__PURE__ */ jsx(Col, { title: c(L), className: "headerCol", children: y ? /* @__PURE__ */ jsx(
|
|
65193
65314
|
Input$3,
|
|
65194
65315
|
{
|
|
65195
65316
|
bordered: !1,
|
|
@@ -65197,9 +65318,9 @@ const ActionInitializerItem = (e) => {
|
|
|
65197
65318
|
placeholder: "Search...",
|
|
65198
65319
|
className: "search",
|
|
65199
65320
|
onClick: z,
|
|
65200
|
-
onChange:
|
|
65321
|
+
onChange: V
|
|
65201
65322
|
}
|
|
65202
|
-
) : c(
|
|
65323
|
+
) : c(L) }),
|
|
65203
65324
|
/* @__PURE__ */ jsx(
|
|
65204
65325
|
Col,
|
|
65205
65326
|
{
|
|
@@ -65646,14 +65767,14 @@ const DataBlockInitializer = (e) => {
|
|
|
65646
65767
|
componentType: o,
|
|
65647
65768
|
menuName: a
|
|
65648
65769
|
});
|
|
65649
|
-
const { item:
|
|
65770
|
+
const { item: V, fromOthersInPopup: L } = z;
|
|
65650
65771
|
if (f)
|
|
65651
65772
|
return f(z);
|
|
65652
|
-
if (
|
|
65653
|
-
const G = yield w(
|
|
65654
|
-
v(t ? t(G, { item:
|
|
65773
|
+
if (V.template) {
|
|
65774
|
+
const G = yield w(V);
|
|
65775
|
+
v(t ? t(G, { item: V, fromOthersInPopup: L }) : G);
|
|
65655
65776
|
} else
|
|
65656
|
-
|
|
65777
|
+
V.schemaInsertor ? yield V.schemaInsertor(v, { item: V, name: a, fromOthersInPopup: L }) : n && n({ item: V, fromOthersInPopup: L });
|
|
65657
65778
|
I(!1);
|
|
65658
65779
|
}),
|
|
65659
65780
|
[
|
|
@@ -65682,14 +65803,14 @@ const DataBlockInitializer = (e) => {
|
|
|
65682
65803
|
currentText: b,
|
|
65683
65804
|
otherText: S
|
|
65684
65805
|
}), N = useGetSchemaInitializerMenuItems(D), M = useMemo(() => N(B, a), [N, B, a]), [j, R] = useState([]), O = useMenuSearch({ data: M, openKeys: j, hideSearch: u }), $ = useMemo(() => {
|
|
65685
|
-
let z = O.filter((
|
|
65806
|
+
let z = O.filter((V) => V.key !== "search" && V.key !== "empty");
|
|
65686
65807
|
return p && z.length === 1 ? z = z[0].children : z = O, [
|
|
65687
65808
|
{
|
|
65688
65809
|
key: a,
|
|
65689
65810
|
label: F(i),
|
|
65690
65811
|
icon: typeof r == "string" ? /* @__PURE__ */ jsx(antIcons__default, { type: r }) : r,
|
|
65691
|
-
onClick: (
|
|
65692
|
-
|
|
65812
|
+
onClick: (V) => {
|
|
65813
|
+
V.key === a && D(P(x({}, V), { item: e }));
|
|
65693
65814
|
},
|
|
65694
65815
|
children: z
|
|
65695
65816
|
}
|