@gisce/react-ooui 1.1.56-rc.2 → 1.1.56
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/dist/react-ooui.es.js +78 -78
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/react-ooui.umd.js +6 -6
- package/dist/react-ooui.umd.js.map +1 -1
- package/dist/widgets/custom/Tag.d.ts.map +1 -1
- package/dist/widgets/views/Form.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/widgets/custom/Tag.tsx +2 -2
- package/src/widgets/views/Form.tsx +4 -2
package/dist/react-ooui.es.js
CHANGED
|
@@ -7924,8 +7924,8 @@ function requireClearableLabeledInput() {
|
|
|
7924
7924
|
return {
|
|
7925
7925
|
resizableTextArea: (te = Y.current) === null || te === void 0 ? void 0 : te.resizableTextArea,
|
|
7926
7926
|
focus: function(se) {
|
|
7927
|
-
var
|
|
7928
|
-
(0, y.triggerFocus)((Se = (
|
|
7927
|
+
var _e, Se;
|
|
7928
|
+
(0, y.triggerFocus)((Se = (_e = Y.current) === null || _e === void 0 ? void 0 : _e.resizableTextArea) === null || Se === void 0 ? void 0 : Se.textArea, se);
|
|
7929
7929
|
},
|
|
7930
7930
|
blur: function() {
|
|
7931
7931
|
var se;
|
|
@@ -9772,8 +9772,8 @@ function require_stream_readable() {
|
|
|
9772
9772
|
Q.pipesCount += 1, l("pipe count=%d opts=%j", Q.pipesCount, P);
|
|
9773
9773
|
var ee = (!P || P.end !== !1) && F !== process.stdout && F !== process.stderr, J = ee ? te : me;
|
|
9774
9774
|
Q.endEmitted ? process.nextTick(J) : G.once("end", J), F.on("unpipe", ie);
|
|
9775
|
-
function ie(
|
|
9776
|
-
l("onunpipe"),
|
|
9775
|
+
function ie(be, de) {
|
|
9776
|
+
l("onunpipe"), be === G && de && de.hasUnpiped === !1 && (de.hasUnpiped = !0, _e());
|
|
9777
9777
|
}
|
|
9778
9778
|
function te() {
|
|
9779
9779
|
l("onend"), F.end();
|
|
@@ -9781,17 +9781,17 @@ function require_stream_readable() {
|
|
|
9781
9781
|
var oe = Y(G);
|
|
9782
9782
|
F.on("drain", oe);
|
|
9783
9783
|
var se = !1;
|
|
9784
|
-
function
|
|
9784
|
+
function _e() {
|
|
9785
9785
|
l("cleanup"), F.removeListener("close", ge), F.removeListener("finish", fe), F.removeListener("drain", oe), F.removeListener("error", ae), F.removeListener("unpipe", ie), G.removeListener("end", te), G.removeListener("end", me), G.removeListener("data", Se), se = !0, Q.awaitDrain && (!F._writableState || F._writableState.needDrain) && oe();
|
|
9786
9786
|
}
|
|
9787
9787
|
G.on("data", Se);
|
|
9788
|
-
function Se(
|
|
9788
|
+
function Se(be) {
|
|
9789
9789
|
l("ondata");
|
|
9790
|
-
var de = F.write(
|
|
9790
|
+
var de = F.write(be);
|
|
9791
9791
|
l("dest.write", de), de === !1 && ((Q.pipesCount === 1 && Q.pipes === F || Q.pipesCount > 1 && Z(Q.pipes, F) !== -1) && !se && (l("false write response, pause", Q.awaitDrain), Q.awaitDrain++), G.pause());
|
|
9792
9792
|
}
|
|
9793
|
-
function ae(
|
|
9794
|
-
l("onerror",
|
|
9793
|
+
function ae(be) {
|
|
9794
|
+
l("onerror", be), me(), F.removeListener("error", ae), t(F, "error") === 0 && C(F, be);
|
|
9795
9795
|
}
|
|
9796
9796
|
k(F, "error", ae);
|
|
9797
9797
|
function ge() {
|
|
@@ -13060,12 +13060,12 @@ const transformPlainMany2Ones = ({
|
|
|
13060
13060
|
}
|
|
13061
13061
|
}), se = oe[0];
|
|
13062
13062
|
B.current = [...se], K(getColorMap(oe[1]));
|
|
13063
|
-
const
|
|
13063
|
+
const _e = se.map((ae) => ae.id), Se = h !== void 0 ? sortResults({
|
|
13064
13064
|
resultsToSort: se,
|
|
13065
13065
|
sorter: h,
|
|
13066
13066
|
fields: { ...f.fields, ...p.fields }
|
|
13067
13067
|
}) : [...B.current];
|
|
13068
|
-
S(Se),
|
|
13068
|
+
S(Se), _e.length > 0 ? y == null || y(0) : y == null || y(void 0);
|
|
13069
13069
|
} else
|
|
13070
13070
|
S([]), y == null || y(void 0);
|
|
13071
13071
|
l.current = !0;
|
|
@@ -13083,7 +13083,7 @@ const transformPlainMany2Ones = ({
|
|
|
13083
13083
|
d
|
|
13084
13084
|
]), X = useCallback(
|
|
13085
13085
|
async (J) => {
|
|
13086
|
-
const { params: ie, newOffset: te } = J || {}, oe = mergeParams(ie || O, g), { colors: se } = getTree(f), { totalItems:
|
|
13086
|
+
const { params: ie, newOffset: te } = J || {}, oe = mergeParams(ie || O, g), { colors: se } = getTree(f), { totalItems: _e, results: Se, attrsEvaluated: ae } = await ConnectionProvider.getHandler().searchForTree({
|
|
13087
13087
|
params: oe,
|
|
13088
13088
|
limit: U.current,
|
|
13089
13089
|
offset: te || N,
|
|
@@ -13100,12 +13100,12 @@ const transformPlainMany2Ones = ({
|
|
|
13100
13100
|
}) : [...B.current];
|
|
13101
13101
|
if (S(ge), m && ge.length > 0) {
|
|
13102
13102
|
const me = ge.findIndex(
|
|
13103
|
-
(
|
|
13103
|
+
(be) => x === be.id
|
|
13104
13104
|
);
|
|
13105
13105
|
me === -1 ? y == null || y(0) : y == null || y(me);
|
|
13106
13106
|
} else
|
|
13107
13107
|
y == null || y(void 0);
|
|
13108
|
-
const fe = await
|
|
13108
|
+
const fe = await _e;
|
|
13109
13109
|
W(fe), d == null || d(fe);
|
|
13110
13110
|
},
|
|
13111
13111
|
[
|
|
@@ -13671,7 +13671,7 @@ function Form(e, t) {
|
|
|
13671
13671
|
setFormIsLoading: te = void 0,
|
|
13672
13672
|
setAttachments: oe = void 0,
|
|
13673
13673
|
title: se = void 0,
|
|
13674
|
-
setTitle:
|
|
13674
|
+
setTitle: _e = void 0
|
|
13675
13675
|
} = (b ? Q : {}) || {}, Se = useContext(ContentRootContext), {
|
|
13676
13676
|
processAction: ae,
|
|
13677
13677
|
globalValues: ge
|
|
@@ -13704,7 +13704,7 @@ function Form(e, t) {
|
|
|
13704
13704
|
J == null || J(!1), ee == null || ee(!1), o == null || o(ne, re, ue), ie == null || ie(ne);
|
|
13705
13705
|
}, me = () => {
|
|
13706
13706
|
ee == null || ee(!1), a == null || a();
|
|
13707
|
-
},
|
|
13707
|
+
}, be = (ne) => {
|
|
13708
13708
|
ee == null || ee(!1), c == null || c(ne);
|
|
13709
13709
|
};
|
|
13710
13710
|
function de() {
|
|
@@ -13764,7 +13764,7 @@ function Form(e, t) {
|
|
|
13764
13764
|
},
|
|
13765
13765
|
extraValues: C
|
|
13766
13766
|
});
|
|
13767
|
-
},
|
|
13767
|
+
}, xe = () => Object.keys(getTouchedValues({
|
|
13768
13768
|
source: S.current,
|
|
13769
13769
|
target: pe(I),
|
|
13770
13770
|
fields: I
|
|
@@ -13829,7 +13829,7 @@ function Form(e, t) {
|
|
|
13829
13829
|
values: re
|
|
13830
13830
|
}), te == null || te(!1), J == null || J(!1), Ce && U(!0);
|
|
13831
13831
|
}, $e = async () => new Promise(async (ne) => {
|
|
13832
|
-
|
|
13832
|
+
xe() ? showDialog$6({
|
|
13833
13833
|
lang: w,
|
|
13834
13834
|
onOk: () => {
|
|
13835
13835
|
me == null || me(), ne(!0);
|
|
@@ -13943,7 +13943,7 @@ function Form(e, t) {
|
|
|
13943
13943
|
const {
|
|
13944
13944
|
callOnSubmitSucceed: ue = !0
|
|
13945
13945
|
} = ne || {};
|
|
13946
|
-
if (X.current = !0, q(void 0), !
|
|
13946
|
+
if (X.current = !0, q(void 0), !xe() && de() && ue)
|
|
13947
13947
|
return X.current = !1, J == null || J(!1), me == null || me(), {
|
|
13948
13948
|
succeed: !0,
|
|
13949
13949
|
id: de()
|
|
@@ -13961,7 +13961,7 @@ function Form(e, t) {
|
|
|
13961
13961
|
reset: !0
|
|
13962
13962
|
})), await ke(), re = !0;
|
|
13963
13963
|
} catch (ce) {
|
|
13964
|
-
X.current = !1, T(!1), ee == null || ee(!1),
|
|
13964
|
+
X.current = !1, T(!1), ee == null || ee(!1), be == null || be(ce), message$1.error(k("errorWhileSavingForm")), q(ce != null && ce.message ? ce.message : ce);
|
|
13965
13965
|
} finally {
|
|
13966
13966
|
X.current = !1, ee == null || ee(!1), T(!1);
|
|
13967
13967
|
}
|
|
@@ -13982,7 +13982,7 @@ function Form(e, t) {
|
|
|
13982
13982
|
...ue,
|
|
13983
13983
|
...le()
|
|
13984
13984
|
}
|
|
13985
|
-
}), D(ce), ce.string && ce.string !== se && (
|
|
13985
|
+
}), D(ce), ce.string && ce.string !== se && (_e == null || _e(ce.string)), z && ce.string && ((Ce = z.setTitle) == null || Ce.call(z, ce.string));
|
|
13986
13986
|
}, je = async ({
|
|
13987
13987
|
elementHasLostFocus: ne = !1
|
|
13988
13988
|
}) => {
|
|
@@ -14175,7 +14175,7 @@ function Form(e, t) {
|
|
|
14175
14175
|
return;
|
|
14176
14176
|
}
|
|
14177
14177
|
try {
|
|
14178
|
-
await Ie({
|
|
14178
|
+
xe() && await Ie({
|
|
14179
14179
|
callOnSubmitSucceed: !1
|
|
14180
14180
|
}), ne === "object" ? await Ge({
|
|
14181
14181
|
action: re,
|
|
@@ -14204,7 +14204,7 @@ function Form(e, t) {
|
|
|
14204
14204
|
getContext: Pe,
|
|
14205
14205
|
submitForm: Ie,
|
|
14206
14206
|
fetchValues: ke,
|
|
14207
|
-
formHasChanges:
|
|
14207
|
+
formHasChanges: xe,
|
|
14208
14208
|
elementHasLostFocus: Ze,
|
|
14209
14209
|
children: /* @__PURE__ */ jsx(Form$3, {
|
|
14210
14210
|
form: j,
|
|
@@ -17915,13 +17915,13 @@ function SearchTree(e, t) {
|
|
|
17915
17915
|
fetchResults: te,
|
|
17916
17916
|
tableRefreshing: oe,
|
|
17917
17917
|
searchFilterLoading: se,
|
|
17918
|
-
searchError:
|
|
17918
|
+
searchError: _e,
|
|
17919
17919
|
page: Se,
|
|
17920
17920
|
offset: ae,
|
|
17921
17921
|
getResults: ge,
|
|
17922
17922
|
requestPageChange: fe,
|
|
17923
17923
|
changeSort: me,
|
|
17924
|
-
fetchChildrenForRecord:
|
|
17924
|
+
fetchChildrenForRecord: be,
|
|
17925
17925
|
colorsForResults: de,
|
|
17926
17926
|
totalItems: Te
|
|
17927
17927
|
} = useSearch({
|
|
@@ -18027,7 +18027,7 @@ function SearchTree(e, t) {
|
|
|
18027
18027
|
const Ee = ge().filter((Fe) => ve.includes(Fe.id));
|
|
18028
18028
|
H == null || H(Ee), p == null || p(ve);
|
|
18029
18029
|
}
|
|
18030
|
-
function
|
|
18030
|
+
function xe() {
|
|
18031
18031
|
return b != null && b.isExpandable ? $ - 160 : $ - (T + 210);
|
|
18032
18032
|
}
|
|
18033
18033
|
const pe = () => !b || !O ? null : /* @__PURE__ */ jsxs(Fragment, {
|
|
@@ -18045,7 +18045,7 @@ function SearchTree(e, t) {
|
|
|
18045
18045
|
onSubmit: J,
|
|
18046
18046
|
onLimitChange: Re,
|
|
18047
18047
|
setSearchFilterHeight: A,
|
|
18048
|
-
searchError:
|
|
18048
|
+
searchError: _e,
|
|
18049
18049
|
searchVisible: B,
|
|
18050
18050
|
searchValues: P
|
|
18051
18051
|
}), /* @__PURE__ */ jsx(Tree, {
|
|
@@ -18058,7 +18058,7 @@ function SearchTree(e, t) {
|
|
|
18058
18058
|
onRequestPageChange: fe,
|
|
18059
18059
|
loading: oe,
|
|
18060
18060
|
onRowClicked: le,
|
|
18061
|
-
scrollY: u ||
|
|
18061
|
+
scrollY: u || xe(),
|
|
18062
18062
|
colorsForResults: de,
|
|
18063
18063
|
rowSelection: {
|
|
18064
18064
|
selectedRowKeys: Y == null ? void 0 : Y.map((ve) => ve.id),
|
|
@@ -18066,11 +18066,11 @@ function SearchTree(e, t) {
|
|
|
18066
18066
|
},
|
|
18067
18067
|
sorter: M,
|
|
18068
18068
|
onChangeSort: me,
|
|
18069
|
-
onFetchChildrenForRecord: b.isExpandable ?
|
|
18069
|
+
onFetchChildrenForRecord: b.isExpandable ? be : void 0,
|
|
18070
18070
|
childField: b.field_parent,
|
|
18071
18071
|
rootTree: d
|
|
18072
18072
|
})]
|
|
18073
|
-
}), ye = w ||
|
|
18073
|
+
}), ye = w || _e;
|
|
18074
18074
|
return ye ? /* @__PURE__ */ jsx(Alert, {
|
|
18075
18075
|
className: "mt-10",
|
|
18076
18076
|
message: ye,
|
|
@@ -20582,8 +20582,8 @@ function requireTooltip() {
|
|
|
20582
20582
|
autoAdjustOverflow: ie
|
|
20583
20583
|
});
|
|
20584
20584
|
}, N = function(ee, J) {
|
|
20585
|
-
var ie = j(), te = Object.keys(ie).filter(function(
|
|
20586
|
-
return ie[
|
|
20585
|
+
var ie = j(), te = Object.keys(ie).filter(function(_e) {
|
|
20586
|
+
return ie[_e].points[0] === J.points[0] && ie[_e].points[1] === J.points[1];
|
|
20587
20587
|
})[0];
|
|
20588
20588
|
if (!!te) {
|
|
20589
20589
|
var oe = ee.getBoundingClientRect(), se = {
|
|
@@ -21125,28 +21125,28 @@ function requireBase() {
|
|
|
21125
21125
|
}, {
|
|
21126
21126
|
key: "renderContent",
|
|
21127
21127
|
value: function() {
|
|
21128
|
-
var B = this, S = this.state, M = S.ellipsisContent, V = S.isEllipsis, X = S.expanded, Z = this.props, F = Z.component, P = Z.children, G = Z.className, Q = Z.type, ee = Z.disabled, J = Z.style, ie = D(Z, ["component", "children", "className", "type", "disabled", "style"]), te = this.context.direction, oe = this.getEllipsis(), se = oe.rows,
|
|
21128
|
+
var B = this, S = this.state, M = S.ellipsisContent, V = S.isEllipsis, X = S.expanded, Z = this.props, F = Z.component, P = Z.children, G = Z.className, Q = Z.type, ee = Z.disabled, J = Z.style, ie = D(Z, ["component", "children", "className", "type", "disabled", "style"]), te = this.context.direction, oe = this.getEllipsis(), se = oe.rows, _e = oe.suffix, Se = oe.tooltip, ae = this.getPrefixCls(), ge = (0, y.default)(ie, ["prefixCls", "editable", "copyable", "ellipsis", "mark", "code", "delete", "underline", "strong", "keyboard"].concat((0, a.default)(b.configConsumerProps))), fe = this.canUseCSSEllipsis(), me = se === 1 && fe, be = se && se > 1 && fe, de = P;
|
|
21129
21129
|
if (se && V && !X && !fe) {
|
|
21130
21130
|
var Te = ie.title, we = Te || "";
|
|
21131
21131
|
!Te && (typeof P == "string" || typeof P == "number") && (we = String(P)), we = we == null ? void 0 : we.slice(String(M || "").length), de = /* @__PURE__ */ f.createElement(f.Fragment, null, M, /* @__PURE__ */ f.createElement("span", {
|
|
21132
21132
|
title: we,
|
|
21133
21133
|
"aria-hidden": "true"
|
|
21134
|
-
}, I),
|
|
21134
|
+
}, I), _e), Se && (de = /* @__PURE__ */ f.createElement(T.default, {
|
|
21135
21135
|
title: Se === !0 ? P : Se
|
|
21136
21136
|
}, /* @__PURE__ */ f.createElement("span", null, de)));
|
|
21137
21137
|
} else
|
|
21138
|
-
de = /* @__PURE__ */ f.createElement(f.Fragment, null, P,
|
|
21138
|
+
de = /* @__PURE__ */ f.createElement(f.Fragment, null, P, _e);
|
|
21139
21139
|
return de = L(this.props, de), /* @__PURE__ */ f.createElement(C.default, {
|
|
21140
21140
|
componentName: "Text"
|
|
21141
21141
|
}, function(Oe) {
|
|
21142
|
-
var Re, Pe = Oe.edit, le = Oe.copy, he = Oe.copied,
|
|
21143
|
-
return B.editStr = Pe, B.copyStr = le, B.copiedStr = he, B.expandStr =
|
|
21142
|
+
var Re, Pe = Oe.edit, le = Oe.copy, he = Oe.copied, xe = Oe.expand;
|
|
21143
|
+
return B.editStr = Pe, B.copyStr = le, B.copiedStr = he, B.expandStr = xe, /* @__PURE__ */ f.createElement(x.default, {
|
|
21144
21144
|
onResize: B.resizeOnNextFrame,
|
|
21145
21145
|
disabled: !se
|
|
21146
21146
|
}, /* @__PURE__ */ f.createElement(A.default, (0, s.default)({
|
|
21147
|
-
className: (0, p.default)((Re = {}, (0, n.default)(Re, "".concat(ae, "-").concat(Q), Q), (0, n.default)(Re, "".concat(ae, "-disabled"), ee), (0, n.default)(Re, "".concat(ae, "-ellipsis"), se), (0, n.default)(Re, "".concat(ae, "-ellipsis-single-line"), me), (0, n.default)(Re, "".concat(ae, "-ellipsis-multiple-line"),
|
|
21147
|
+
className: (0, p.default)((Re = {}, (0, n.default)(Re, "".concat(ae, "-").concat(Q), Q), (0, n.default)(Re, "".concat(ae, "-disabled"), ee), (0, n.default)(Re, "".concat(ae, "-ellipsis"), se), (0, n.default)(Re, "".concat(ae, "-ellipsis-single-line"), me), (0, n.default)(Re, "".concat(ae, "-ellipsis-multiple-line"), be), Re), G),
|
|
21148
21148
|
style: (0, s.default)((0, s.default)({}, J), {
|
|
21149
|
-
WebkitLineClamp:
|
|
21149
|
+
WebkitLineClamp: be ? se : void 0
|
|
21150
21150
|
}),
|
|
21151
21151
|
component: F,
|
|
21152
21152
|
ref: B.contentRef,
|
|
@@ -22073,21 +22073,21 @@ const One2manyInput = (e) => {
|
|
|
22073
22073
|
J();
|
|
22074
22074
|
}, [y]);
|
|
22075
22075
|
const G = (le) => {
|
|
22076
|
-
var he,
|
|
22076
|
+
var he, xe;
|
|
22077
22077
|
r == null || r({
|
|
22078
|
-
fields: ((he = a.get("form")) == null ? void 0 : he.fields) || ((
|
|
22078
|
+
fields: ((he = a.get("form")) == null ? void 0 : he.fields) || ((xe = a.get("tree")) == null ? void 0 : xe.fields),
|
|
22079
22079
|
items: filterDuplicateItems(le)
|
|
22080
22080
|
});
|
|
22081
22081
|
}, Q = async () => {
|
|
22082
22082
|
await ee(), l > Z.length - 1 && l !== 0 && c(0);
|
|
22083
22083
|
}, ee = async (le) => {
|
|
22084
|
-
var he,
|
|
22084
|
+
var he, xe, pe;
|
|
22085
22085
|
C(!0), x(!1), k(void 0);
|
|
22086
22086
|
try {
|
|
22087
22087
|
const [ye, ve] = await readObjectValues({
|
|
22088
22088
|
treeView: {
|
|
22089
22089
|
arch: (he = a.get("tree")) == null ? void 0 : he.arch,
|
|
22090
|
-
fields: (
|
|
22090
|
+
fields: (xe = a.get("tree")) == null ? void 0 : xe.fields
|
|
22091
22091
|
},
|
|
22092
22092
|
formView: {
|
|
22093
22093
|
fields: ((pe = a.get("form")) == null ? void 0 : pe.fields) || {}
|
|
@@ -22126,16 +22126,16 @@ const One2manyInput = (e) => {
|
|
|
22126
22126
|
}
|
|
22127
22127
|
const ie = () => {
|
|
22128
22128
|
const le = Array.from(a.keys()), he = le[(le.indexOf(s) + 1) % le.length];
|
|
22129
|
-
s === "form" ?
|
|
22129
|
+
s === "form" ? _e(() => {
|
|
22130
22130
|
u(he);
|
|
22131
22131
|
}) : u(he);
|
|
22132
22132
|
}, te = () => {
|
|
22133
|
-
l > 0 && (s === "form" ?
|
|
22133
|
+
l > 0 && (s === "form" ? _e(() => {
|
|
22134
22134
|
c(l - 1);
|
|
22135
22135
|
}) : c(l - 1));
|
|
22136
22136
|
}, oe = () => {
|
|
22137
22137
|
const le = Z.length;
|
|
22138
|
-
l < le - 1 && (s === "form" ?
|
|
22138
|
+
l < le - 1 && (s === "form" ? _e(() => {
|
|
22139
22139
|
c(l + 1);
|
|
22140
22140
|
}) : c(l + 1));
|
|
22141
22141
|
}, se = async () => {
|
|
@@ -22147,7 +22147,7 @@ const One2manyInput = (e) => {
|
|
|
22147
22147
|
...v == null ? void 0 : v(),
|
|
22148
22148
|
...S
|
|
22149
22149
|
}
|
|
22150
|
-
}))[0],
|
|
22150
|
+
}))[0], xe = (await ConnectionProvider.getHandler().readObjects({
|
|
22151
22151
|
model: B,
|
|
22152
22152
|
ids: [le],
|
|
22153
22153
|
fields: a.get("tree").fields,
|
|
@@ -22159,10 +22159,10 @@ const One2manyInput = (e) => {
|
|
|
22159
22159
|
...ye,
|
|
22160
22160
|
operation: "original",
|
|
22161
22161
|
values: he,
|
|
22162
|
-
treeValues:
|
|
22162
|
+
treeValues: xe
|
|
22163
22163
|
} : ye);
|
|
22164
22164
|
G(pe);
|
|
22165
|
-
},
|
|
22165
|
+
}, _e = (le) => {
|
|
22166
22166
|
g ? showDialog$6({
|
|
22167
22167
|
lang: _,
|
|
22168
22168
|
onOk: () => {
|
|
@@ -22192,7 +22192,7 @@ const One2manyInput = (e) => {
|
|
|
22192
22192
|
let he;
|
|
22193
22193
|
le && f && (he = {
|
|
22194
22194
|
[le]: f
|
|
22195
|
-
}), s === "form" ?
|
|
22195
|
+
}), s === "form" ? _e(() => {
|
|
22196
22196
|
L(!0), $({
|
|
22197
22197
|
defaultValues: he
|
|
22198
22198
|
}), E(!0);
|
|
@@ -22200,7 +22200,7 @@ const One2manyInput = (e) => {
|
|
|
22200
22200
|
defaultValues: he
|
|
22201
22201
|
}), E(!0));
|
|
22202
22202
|
}, ge = async () => {
|
|
22203
|
-
s === "form" ?
|
|
22203
|
+
s === "form" ? _e(() => {
|
|
22204
22204
|
A(!0);
|
|
22205
22205
|
}) : A(!0);
|
|
22206
22206
|
}, fe = async () => {
|
|
@@ -22222,27 +22222,27 @@ const One2manyInput = (e) => {
|
|
|
22222
22222
|
const le = Z.filter((he) => D.includes(he.id));
|
|
22223
22223
|
C(!0), x(!1), k(void 0);
|
|
22224
22224
|
try {
|
|
22225
|
-
const he = le.map((pe) => pe.id),
|
|
22225
|
+
const he = le.map((pe) => pe.id), xe = o.filter((pe) => !(he.includes(pe.id) && pe.id < 0)).map((pe) => he.includes(pe.id) ? {
|
|
22226
22226
|
...pe,
|
|
22227
22227
|
operation: "pendingRemove"
|
|
22228
22228
|
} : pe);
|
|
22229
|
-
G(
|
|
22229
|
+
G(xe);
|
|
22230
22230
|
} catch (he) {
|
|
22231
22231
|
k(he);
|
|
22232
22232
|
}
|
|
22233
22233
|
c(0), C(!1);
|
|
22234
|
-
},
|
|
22234
|
+
}, be = (le, he, xe) => {
|
|
22235
22235
|
let pe;
|
|
22236
22236
|
if (le)
|
|
22237
22237
|
pe = o.map((ye) => ye.id === le ? {
|
|
22238
22238
|
id: le,
|
|
22239
22239
|
operation: le > 0 ? "pendingUpdate" : "pendingCreate",
|
|
22240
22240
|
values: {
|
|
22241
|
-
...
|
|
22241
|
+
...xe,
|
|
22242
22242
|
id: le
|
|
22243
22243
|
},
|
|
22244
22244
|
treeValues: {
|
|
22245
|
-
...
|
|
22245
|
+
...xe,
|
|
22246
22246
|
id: le
|
|
22247
22247
|
}
|
|
22248
22248
|
} : ye);
|
|
@@ -22252,11 +22252,11 @@ const One2manyInput = (e) => {
|
|
|
22252
22252
|
id: ye,
|
|
22253
22253
|
operation: "pendingCreate",
|
|
22254
22254
|
values: {
|
|
22255
|
-
...
|
|
22255
|
+
...xe,
|
|
22256
22256
|
id: ye
|
|
22257
22257
|
},
|
|
22258
22258
|
treeValues: {
|
|
22259
|
-
...
|
|
22259
|
+
...xe,
|
|
22260
22260
|
id: ye
|
|
22261
22261
|
}
|
|
22262
22262
|
});
|
|
@@ -22266,15 +22266,15 @@ const One2manyInput = (e) => {
|
|
|
22266
22266
|
const {
|
|
22267
22267
|
id: he
|
|
22268
22268
|
} = le;
|
|
22269
|
-
let
|
|
22269
|
+
let xe = o;
|
|
22270
22270
|
const pe = o.find((ye) => ye.id === he);
|
|
22271
|
-
(pe == null ? void 0 : pe.values) === void 0 && (
|
|
22271
|
+
(pe == null ? void 0 : pe.values) === void 0 && (xe = await ee("form")), $(xe.find((ye) => ye.id === he)), L(!1), E(!0);
|
|
22272
22272
|
}, Te = async (le) => {
|
|
22273
22273
|
C(!0);
|
|
22274
22274
|
let he = o;
|
|
22275
|
-
const
|
|
22275
|
+
const xe = le.filter((pe) => !o.find((ye) => ye.id === pe));
|
|
22276
22276
|
try {
|
|
22277
|
-
for (const pe of
|
|
22277
|
+
for (const pe of xe) {
|
|
22278
22278
|
const ye = (await ConnectionProvider.getHandler().readObjects({
|
|
22279
22279
|
model: B,
|
|
22280
22280
|
ids: [pe],
|
|
@@ -22316,7 +22316,7 @@ const One2manyInput = (e) => {
|
|
|
22316
22316
|
}
|
|
22317
22317
|
}
|
|
22318
22318
|
const Oe = () => {
|
|
22319
|
-
var he,
|
|
22319
|
+
var he, xe, pe, ye;
|
|
22320
22320
|
if (s === "form")
|
|
22321
22321
|
return Z.length === 0 ? m("noCurrentEntries") : s !== F.current && o.some((ve) => !ve.values) ? /* @__PURE__ */ jsx(Spin, {}) : /* @__PURE__ */ jsx(Form$1, {
|
|
22322
22322
|
formView: a.get("form"),
|
|
@@ -22326,7 +22326,7 @@ const One2manyInput = (e) => {
|
|
|
22326
22326
|
...S
|
|
22327
22327
|
},
|
|
22328
22328
|
model: B,
|
|
22329
|
-
id: (
|
|
22329
|
+
id: (xe = Z[l]) == null ? void 0 : xe.id,
|
|
22330
22330
|
submitMode: "values",
|
|
22331
22331
|
onFieldsChange: (ve) => {
|
|
22332
22332
|
var ke;
|
|
@@ -22423,7 +22423,7 @@ const One2manyInput = (e) => {
|
|
|
22423
22423
|
values: q == null ? void 0 : q.values,
|
|
22424
22424
|
defaultValues: q == null ? void 0 : q.defaultValues,
|
|
22425
22425
|
visible: w,
|
|
22426
|
-
onSubmitSucceed:
|
|
22426
|
+
onSubmitSucceed: be,
|
|
22427
22427
|
parentContext: {
|
|
22428
22428
|
...v == null ? void 0 : v(),
|
|
22429
22429
|
...S
|
|
@@ -24843,20 +24843,20 @@ function ActionView(e, t) {
|
|
|
24843
24843
|
O(!0);
|
|
24844
24844
|
const ae = [];
|
|
24845
24845
|
for (const fe of o) {
|
|
24846
|
-
const [me,
|
|
24846
|
+
const [me, be] = fe;
|
|
24847
24847
|
let de;
|
|
24848
24848
|
try {
|
|
24849
|
-
|
|
24849
|
+
be !== "dashboard" && (de = await ConnectionProvider.getHandler().getView({
|
|
24850
24850
|
model: n,
|
|
24851
|
-
type:
|
|
24851
|
+
type: be,
|
|
24852
24852
|
id: me,
|
|
24853
24853
|
context: a
|
|
24854
24854
|
}));
|
|
24855
24855
|
} catch (Te) {
|
|
24856
|
-
console.error(`${n} - ${
|
|
24856
|
+
console.error(`${n} - ${be}\xA0- ${JSON.stringify(Te, null, 2)}`);
|
|
24857
24857
|
continue;
|
|
24858
24858
|
}
|
|
24859
|
-
switch (
|
|
24859
|
+
switch (be) {
|
|
24860
24860
|
case "dashboard": {
|
|
24861
24861
|
const Te = o.find((Oe) => {
|
|
24862
24862
|
const [, Re] = Oe;
|
|
@@ -24883,7 +24883,7 @@ function ActionView(e, t) {
|
|
|
24883
24883
|
case "form": {
|
|
24884
24884
|
ae.push({
|
|
24885
24885
|
...de,
|
|
24886
|
-
type:
|
|
24886
|
+
type: be
|
|
24887
24887
|
});
|
|
24888
24888
|
break;
|
|
24889
24889
|
}
|
|
@@ -24891,14 +24891,14 @@ function ActionView(e, t) {
|
|
|
24891
24891
|
ae.push({
|
|
24892
24892
|
...de,
|
|
24893
24893
|
isExpandable: y,
|
|
24894
|
-
type:
|
|
24894
|
+
type: be
|
|
24895
24895
|
});
|
|
24896
24896
|
break;
|
|
24897
24897
|
}
|
|
24898
24898
|
case "graph": {
|
|
24899
24899
|
ae.push({
|
|
24900
24900
|
...de,
|
|
24901
|
-
type:
|
|
24901
|
+
type: be
|
|
24902
24902
|
});
|
|
24903
24903
|
break;
|
|
24904
24904
|
}
|
|
@@ -24924,17 +24924,17 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
24924
24924
|
G === l && (m.type === "form" && !await M.current.cancelUnsavedChanges() || Y(!0));
|
|
24925
24925
|
}
|
|
24926
24926
|
async function se(ae) {
|
|
24927
|
-
var
|
|
24927
|
+
var be;
|
|
24928
24928
|
K(!0);
|
|
24929
24929
|
const ge = D.findIndex((de) => de.id === ae);
|
|
24930
24930
|
let fe;
|
|
24931
24931
|
if (ge === -1) {
|
|
24932
24932
|
try {
|
|
24933
|
-
fe = (
|
|
24933
|
+
fe = (be = await ConnectionProvider.getHandler().readObjects({
|
|
24934
24934
|
model: n,
|
|
24935
24935
|
ids: [ae],
|
|
24936
24936
|
context: a
|
|
24937
|
-
})) == null ? void 0 :
|
|
24937
|
+
})) == null ? void 0 : be[0];
|
|
24938
24938
|
} catch {
|
|
24939
24939
|
}
|
|
24940
24940
|
if (!fe) {
|
|
@@ -24961,7 +24961,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
24961
24961
|
res_id: ae
|
|
24962
24962
|
});
|
|
24963
24963
|
}
|
|
24964
|
-
function
|
|
24964
|
+
function _e() {
|
|
24965
24965
|
return x.map((ae) => {
|
|
24966
24966
|
switch (ae.type) {
|
|
24967
24967
|
case "form":
|
|
@@ -25047,7 +25047,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
25047
25047
|
searchTreeNameSearch: U,
|
|
25048
25048
|
goToResourceId: se,
|
|
25049
25049
|
limit: _,
|
|
25050
|
-
children: [
|
|
25050
|
+
children: [_e(), /* @__PURE__ */ jsx(GoToResourceModal, {
|
|
25051
25051
|
visible: z,
|
|
25052
25052
|
onIdSubmitted: se,
|
|
25053
25053
|
isSearching: H,
|