@gisce/react-ooui 1.2.0-rc.54 → 1.2.0-rc.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 +122 -122
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/react-ooui.umd.js +7 -7
- package/dist/react-ooui.umd.js.map +1 -1
- package/dist/widgets/base/one2many/One2manyInput.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/widgets/base/one2many/One2manyInput.tsx +14 -10
package/dist/react-ooui.es.js
CHANGED
|
@@ -6629,19 +6629,19 @@ function useStatus(e, t, r, n) {
|
|
|
6629
6629
|
function K(te) {
|
|
6630
6630
|
var re = H();
|
|
6631
6631
|
if (!(te && !te.deadline && te.target !== re)) {
|
|
6632
|
-
var
|
|
6633
|
-
F === STATUS_APPEAR &&
|
|
6632
|
+
var se = Y.current, ye;
|
|
6633
|
+
F === STATUS_APPEAR && se ? ye = C == null ? void 0 : C(re, te) : F === STATUS_ENTER && se ? ye = w == null ? void 0 : w(re, te) : F === STATUS_LEAVE && se && (ye = I == null ? void 0 : I(re, te)), F !== STATUS_NONE && se && ye !== !1 && (k(STATUS_NONE, !0), U(null, !0));
|
|
6634
6634
|
}
|
|
6635
6635
|
}
|
|
6636
6636
|
var D = useDomMotionEvents(K), V = _slicedToArray(D, 1), z = V[0], J = React$n.useMemo(function() {
|
|
6637
|
-
var te, re,
|
|
6637
|
+
var te, re, se;
|
|
6638
6638
|
switch (F) {
|
|
6639
6639
|
case STATUS_APPEAR:
|
|
6640
6640
|
return te = {}, _defineProperty$1(te, STEP_PREPARE, p), _defineProperty$1(te, STEP_START, y), _defineProperty$1(te, STEP_ACTIVE, g), te;
|
|
6641
6641
|
case STATUS_ENTER:
|
|
6642
6642
|
return re = {}, _defineProperty$1(re, STEP_PREPARE, v), _defineProperty$1(re, STEP_START, x), _defineProperty$1(re, STEP_ACTIVE, _), re;
|
|
6643
6643
|
case STATUS_LEAVE:
|
|
6644
|
-
return
|
|
6644
|
+
return se = {}, _defineProperty$1(se, STEP_PREPARE, h), _defineProperty$1(se, STEP_START, m), _defineProperty$1(se, STEP_ACTIVE, b), se;
|
|
6645
6645
|
default:
|
|
6646
6646
|
return {};
|
|
6647
6647
|
}
|
|
@@ -6651,8 +6651,8 @@ function useStatus(e, t, r, n) {
|
|
|
6651
6651
|
return re ? re(H()) : SkipStep;
|
|
6652
6652
|
}
|
|
6653
6653
|
if (G in J) {
|
|
6654
|
-
var
|
|
6655
|
-
U(((
|
|
6654
|
+
var se;
|
|
6655
|
+
U(((se = J[G]) === null || se === void 0 ? void 0 : se.call(J, H(), null)) || null);
|
|
6656
6656
|
}
|
|
6657
6657
|
return G === STEP_ACTIVE && (z(H()), d > 0 && (clearTimeout(W.current), W.current = setTimeout(function() {
|
|
6658
6658
|
K({
|
|
@@ -8260,7 +8260,7 @@ function requireNotification() {
|
|
|
8260
8260
|
}, U.icon) : K && (re = /* @__PURE__ */ v.createElement(N[K] || null, {
|
|
8261
8261
|
className: "".concat(L, "-icon ").concat(L, "-icon-").concat(K)
|
|
8262
8262
|
}));
|
|
8263
|
-
var
|
|
8263
|
+
var se = /* @__PURE__ */ v.createElement("span", {
|
|
8264
8264
|
className: "".concat(L, "-close-x")
|
|
8265
8265
|
}, ee || /* @__PURE__ */ v.createElement(l.default, {
|
|
8266
8266
|
className: "".concat(L, "-close-icon")
|
|
@@ -8282,7 +8282,7 @@ function requireNotification() {
|
|
|
8282
8282
|
}, z) : null)),
|
|
8283
8283
|
duration: te,
|
|
8284
8284
|
closable: !0,
|
|
8285
|
-
closeIcon:
|
|
8285
|
+
closeIcon: se,
|
|
8286
8286
|
onClose: J,
|
|
8287
8287
|
onClick: Q,
|
|
8288
8288
|
key: T,
|
|
@@ -8503,10 +8503,10 @@ function requireConfigProvider() {
|
|
|
8503
8503
|
};
|
|
8504
8504
|
e.globalConfig = O;
|
|
8505
8505
|
var M = function(F) {
|
|
8506
|
-
var k, j, q = F.children, B = F.csp, U = F.autoInsertSpaceInButton, L = F.form, W = F.locale, H = F.componentSize, Y = F.direction, K = F.space, D = F.virtual, V = F.dropdownMatchSelectWidth, z = F.legacyLocale, J = F.parentContext, Q = F.iconPrefixCls, T = F.componentDisabled, E = u.useCallback(function(re,
|
|
8506
|
+
var k, j, q = F.children, B = F.csp, U = F.autoInsertSpaceInButton, L = F.form, W = F.locale, H = F.componentSize, Y = F.direction, K = F.space, D = F.virtual, V = F.dropdownMatchSelectWidth, z = F.legacyLocale, J = F.parentContext, Q = F.iconPrefixCls, T = F.componentDisabled, E = u.useCallback(function(re, se) {
|
|
8507
8507
|
var ye = F.prefixCls;
|
|
8508
|
-
if (
|
|
8509
|
-
return
|
|
8508
|
+
if (se)
|
|
8509
|
+
return se;
|
|
8510
8510
|
var xe = ye || J.getPrefixCls("");
|
|
8511
8511
|
return re ? "".concat(xe, "-").concat(re) : xe;
|
|
8512
8512
|
}, [J.getPrefixCls, F.prefixCls]), G = (0, n.default)((0, n.default)({}, J), {
|
|
@@ -8520,15 +8520,15 @@ function requireConfigProvider() {
|
|
|
8520
8520
|
getPrefixCls: E
|
|
8521
8521
|
});
|
|
8522
8522
|
g.forEach(function(re) {
|
|
8523
|
-
var
|
|
8524
|
-
|
|
8523
|
+
var se = F[re];
|
|
8524
|
+
se && (G[re] = se);
|
|
8525
8525
|
});
|
|
8526
8526
|
var Z = (0, s.default)(function() {
|
|
8527
8527
|
return G;
|
|
8528
|
-
}, G, function(re,
|
|
8529
|
-
var ye = Object.keys(re), xe = Object.keys(
|
|
8528
|
+
}, G, function(re, se) {
|
|
8529
|
+
var ye = Object.keys(re), xe = Object.keys(se);
|
|
8530
8530
|
return ye.length !== xe.length || ye.some(function(Se) {
|
|
8531
|
-
return re[Se] !==
|
|
8531
|
+
return re[Se] !== se[Se];
|
|
8532
8532
|
});
|
|
8533
8533
|
}), ee = u.useMemo(function() {
|
|
8534
8534
|
return {
|
|
@@ -9160,14 +9160,14 @@ function hasPrefixSuffix(e) {
|
|
|
9160
9160
|
}
|
|
9161
9161
|
}
|
|
9162
9162
|
var $ = /* @__PURE__ */ (0, d.forwardRef)(function(O, M) {
|
|
9163
|
-
var A, P, N, F = O.prefixCls, k = O.bordered, j = k === void 0 ? !0 : k, q = O.status, B = O.size, U = O.disabled, L = O.onBlur, W = O.onFocus, H = O.suffix, Y = O.allowClear, K = O.addonAfter, D = O.addonBefore, V = O.className, z = O.onChange, J = b(O, ["prefixCls", "bordered", "status", "size", "disabled", "onBlur", "onFocus", "suffix", "allowClear", "addonAfter", "addonBefore", "className", "onChange"]), Q = d.default.useContext(f.ConfigContext), T = Q.getPrefixCls, E = Q.direction, G = Q.input, Z = T("input", F), ee = (0, d.useRef)(null), X = (0, y.useCompactItemContext)(Z, E), te = X.compactSize, re = X.compactItemClassnames,
|
|
9163
|
+
var A, P, N, F = O.prefixCls, k = O.bordered, j = k === void 0 ? !0 : k, q = O.status, B = O.size, U = O.disabled, L = O.onBlur, W = O.onFocus, H = O.suffix, Y = O.allowClear, K = O.addonAfter, D = O.addonBefore, V = O.className, z = O.onChange, J = b(O, ["prefixCls", "bordered", "status", "size", "disabled", "onBlur", "onFocus", "suffix", "allowClear", "addonAfter", "addonBefore", "className", "onChange"]), Q = d.default.useContext(f.ConfigContext), T = Q.getPrefixCls, E = Q.direction, G = Q.input, Z = T("input", F), ee = (0, d.useRef)(null), X = (0, y.useCompactItemContext)(Z, E), te = X.compactSize, re = X.compactItemClassnames, se = d.default.useContext(v.default), ye = te || B || se, xe = d.default.useContext(p.default), Se = U != null ? U : xe, ie = (0, d.useContext)(h.FormItemInputContext), me = ie.status, ue = ie.hasFeedback, ve = ie.feedbackIcon, pe = (0, x.getMergedStatus)(me, q), le = (0, _.hasPrefixSuffix)(O) || !!ue, ge = (0, d.useRef)(le);
|
|
9164
9164
|
(0, d.useEffect)(function() {
|
|
9165
9165
|
var Ce;
|
|
9166
9166
|
le && !ge.current && process.env.NODE_ENV !== "production" && (0, m.default)(document.activeElement === ((Ce = ee.current) === null || Ce === void 0 ? void 0 : Ce.input), "Input", "When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"), ge.current = le;
|
|
9167
9167
|
}, [le]);
|
|
9168
9168
|
var $e = (0, g.default)(ee, !0), ke = function(we) {
|
|
9169
9169
|
$e(), L == null || L(we);
|
|
9170
|
-
},
|
|
9170
|
+
}, oe = function(we) {
|
|
9171
9171
|
$e(), W == null || W(we);
|
|
9172
9172
|
}, de = function(we) {
|
|
9173
9173
|
$e(), z == null || z(we);
|
|
@@ -9181,7 +9181,7 @@ function hasPrefixSuffix(e) {
|
|
|
9181
9181
|
}, J, {
|
|
9182
9182
|
disabled: Se || void 0,
|
|
9183
9183
|
onBlur: ke,
|
|
9184
|
-
onFocus:
|
|
9184
|
+
onFocus: oe,
|
|
9185
9185
|
suffix: be,
|
|
9186
9186
|
allowClear: _e,
|
|
9187
9187
|
className: (0, u.default)(V, re),
|
|
@@ -9224,9 +9224,9 @@ function hasPrefixSuffix(e) {
|
|
|
9224
9224
|
return S ? P = C(M, A) : (0, u.default)(O || "").length < M.length && (0, u.default)(M || "").length > A && (P = O), P;
|
|
9225
9225
|
}
|
|
9226
9226
|
var I = /* @__PURE__ */ p.forwardRef(function(S, O) {
|
|
9227
|
-
var M, A = S.prefixCls, P = S.bordered, N = P === void 0 ? !0 : P, F = S.showCount, k = F === void 0 ? !1 : F, j = S.maxLength, q = S.className, B = S.style, U = S.size, L = S.disabled, W = S.onCompositionStart, H = S.onCompositionEnd, Y = S.onChange, K = S.status, D = b(S, ["prefixCls", "bordered", "showCount", "maxLength", "className", "style", "size", "disabled", "onCompositionStart", "onCompositionEnd", "onChange", "status"]), V = p.useContext(v.ConfigContext), z = V.getPrefixCls, J = V.direction, Q = p.useContext(y.default), T = p.useContext(h.default), E = L != null ? L : T, G = p.useContext(x.FormItemInputContext), Z = G.status, ee = G.hasFeedback, X = G.isFormItemInput, te = G.feedbackIcon, re = (0, m.getMergedStatus)(Z, K),
|
|
9227
|
+
var M, A = S.prefixCls, P = S.bordered, N = P === void 0 ? !0 : P, F = S.showCount, k = F === void 0 ? !1 : F, j = S.maxLength, q = S.className, B = S.style, U = S.size, L = S.disabled, W = S.onCompositionStart, H = S.onCompositionEnd, Y = S.onChange, K = S.status, D = b(S, ["prefixCls", "bordered", "showCount", "maxLength", "className", "style", "size", "disabled", "onCompositionStart", "onCompositionEnd", "onChange", "status"]), V = p.useContext(v.ConfigContext), z = V.getPrefixCls, J = V.direction, Q = p.useContext(y.default), T = p.useContext(h.default), E = L != null ? L : T, G = p.useContext(x.FormItemInputContext), Z = G.status, ee = G.hasFeedback, X = G.isFormItemInput, te = G.feedbackIcon, re = (0, m.getMergedStatus)(Z, K), se = p.useRef(null), ye = p.useRef(null), xe = p.useState(!1), Se = (0, s.default)(xe, 2), ie = Se[0], me = Se[1], ue = p.useRef(), ve = p.useRef(0), pe = (0, d.default)(D.defaultValue, {
|
|
9228
9228
|
value: D.value
|
|
9229
|
-
}), le = (0, s.default)(pe, 2), ge = le[0], $e = le[1], ke = D.hidden,
|
|
9229
|
+
}), le = (0, s.default)(pe, 2), ge = le[0], $e = le[1], ke = D.hidden, oe = function(Ee, Pe) {
|
|
9230
9230
|
D.value === void 0 && ($e(Ee), Pe == null || Pe());
|
|
9231
9231
|
}, de = Number(j) > 0, be = function(Ee) {
|
|
9232
9232
|
me(!0), ue.current = ge, ve.current = Ee.currentTarget.selectionStart, W == null || W(Ee);
|
|
@@ -9238,29 +9238,29 @@ function hasPrefixSuffix(e) {
|
|
|
9238
9238
|
var Ve = ve.current >= j + 1 || ve.current === ((Pe = ue.current) === null || Pe === void 0 ? void 0 : Pe.length);
|
|
9239
9239
|
De = w(Ve, ue.current, De, j);
|
|
9240
9240
|
}
|
|
9241
|
-
De !== ge && (
|
|
9241
|
+
De !== ge && (oe(De), (0, _.resolveOnChange)(Ee.currentTarget, Ee, Y, De)), H == null || H(Ee);
|
|
9242
9242
|
}, Ce = function(Ee) {
|
|
9243
9243
|
var Pe = Ee.target.value;
|
|
9244
9244
|
if (!ie && de) {
|
|
9245
9245
|
var De = Ee.target.selectionStart >= j + 1 || Ee.target.selectionStart === Pe.length || !Ee.target.selectionStart;
|
|
9246
9246
|
Pe = w(De, ge, Pe, j);
|
|
9247
9247
|
}
|
|
9248
|
-
|
|
9248
|
+
oe(Pe), (0, _.resolveOnChange)(Ee.currentTarget, Ee, Y, Pe);
|
|
9249
9249
|
}, we = function(Ee) {
|
|
9250
9250
|
var Pe, De, Ve;
|
|
9251
|
-
|
|
9251
|
+
oe(""), (Pe = se.current) === null || Pe === void 0 || Pe.focus(), (0, _.resolveOnChange)((Ve = (De = se.current) === null || De === void 0 ? void 0 : De.resizableTextArea) === null || Ve === void 0 ? void 0 : Ve.textArea, Ee, Y);
|
|
9252
9252
|
}, Ae = z("input", A);
|
|
9253
9253
|
p.useImperativeHandle(O, function() {
|
|
9254
9254
|
var qe;
|
|
9255
9255
|
return {
|
|
9256
|
-
resizableTextArea: (qe =
|
|
9256
|
+
resizableTextArea: (qe = se.current) === null || qe === void 0 ? void 0 : qe.resizableTextArea,
|
|
9257
9257
|
focus: function(Pe) {
|
|
9258
9258
|
var De, Ve;
|
|
9259
|
-
(0, _.triggerFocus)((Ve = (De =
|
|
9259
|
+
(0, _.triggerFocus)((Ve = (De = se.current) === null || De === void 0 ? void 0 : De.resizableTextArea) === null || Ve === void 0 ? void 0 : Ve.textArea, Pe);
|
|
9260
9260
|
},
|
|
9261
9261
|
blur: function() {
|
|
9262
9262
|
var Pe;
|
|
9263
|
-
return (Pe =
|
|
9263
|
+
return (Pe = se.current) === null || Pe === void 0 ? void 0 : Pe.blur();
|
|
9264
9264
|
}
|
|
9265
9265
|
};
|
|
9266
9266
|
});
|
|
@@ -9274,7 +9274,7 @@ function hasPrefixSuffix(e) {
|
|
|
9274
9274
|
onCompositionStart: be,
|
|
9275
9275
|
onChange: Ce,
|
|
9276
9276
|
onCompositionEnd: _e,
|
|
9277
|
-
ref:
|
|
9277
|
+
ref: se
|
|
9278
9278
|
})), Me = (0, _.fixControlledValue)(ge);
|
|
9279
9279
|
!ie && de && (D.value === null || D.value === void 0) && (Me = C(Me, j));
|
|
9280
9280
|
var Ie = /* @__PURE__ */ p.createElement(g.default, (0, o.default)({
|
|
@@ -11121,11 +11121,11 @@ function require_stream_readable() {
|
|
|
11121
11121
|
function re() {
|
|
11122
11122
|
l("onend"), T.end();
|
|
11123
11123
|
}
|
|
11124
|
-
var
|
|
11125
|
-
T.on("drain",
|
|
11124
|
+
var se = L(G);
|
|
11125
|
+
T.on("drain", se);
|
|
11126
11126
|
var ye = !1;
|
|
11127
11127
|
function xe() {
|
|
11128
|
-
l("cleanup"), T.removeListener("close", me), T.removeListener("finish", ue), T.removeListener("drain",
|
|
11128
|
+
l("cleanup"), T.removeListener("close", me), T.removeListener("finish", ue), T.removeListener("drain", se), T.removeListener("error", ie), T.removeListener("unpipe", te), G.removeListener("end", re), G.removeListener("end", ve), G.removeListener("data", Se), ye = !0, Z.awaitDrain && (!T._writableState || T._writableState.needDrain) && se();
|
|
11129
11129
|
}
|
|
11130
11130
|
G.on("data", Se);
|
|
11131
11131
|
function Se(pe) {
|
|
@@ -14375,7 +14375,7 @@ const DEFAULT_SEARCH_LIMIT$1 = 80, useSearch = (e) => {
|
|
|
14375
14375
|
context: c
|
|
14376
14376
|
});
|
|
14377
14377
|
if (B(X.length), d == null || d(X.length), X.length > 0) {
|
|
14378
|
-
const te = X.map((ie) => ie == null ? void 0 : ie[0]), { colors: re } = getTree(f),
|
|
14378
|
+
const te = X.map((ie) => ie == null ? void 0 : ie[0]), { colors: re } = getTree(f), se = await ConnectionProvider.getHandler().readEvalUiObjects({
|
|
14379
14379
|
model: t,
|
|
14380
14380
|
ids: te,
|
|
14381
14381
|
arch: f == null ? void 0 : f.arch,
|
|
@@ -14384,8 +14384,8 @@ const DEFAULT_SEARCH_LIMIT$1 = 80, useSearch = (e) => {
|
|
|
14384
14384
|
attrs: re && {
|
|
14385
14385
|
colors: re
|
|
14386
14386
|
}
|
|
14387
|
-
}), ye =
|
|
14388
|
-
K.current = [...ye], H(getColorMap(
|
|
14387
|
+
}), ye = se[0];
|
|
14388
|
+
K.current = [...ye], H(getColorMap(se[1]));
|
|
14389
14389
|
const xe = ye.map((ie) => ie.id), Se = v !== void 0 ? sortResults({
|
|
14390
14390
|
resultsToSort: ye,
|
|
14391
14391
|
sorter: v,
|
|
@@ -14409,8 +14409,8 @@ const DEFAULT_SEARCH_LIMIT$1 = 80, useSearch = (e) => {
|
|
|
14409
14409
|
d
|
|
14410
14410
|
]), J = useCallback(
|
|
14411
14411
|
async (X) => {
|
|
14412
|
-
const { params: te, newOffset: re } = X || {},
|
|
14413
|
-
params:
|
|
14412
|
+
const { params: te, newOffset: re } = X || {}, se = mergeParams(te || w, g), { colors: ye } = getTree(f), { totalItems: xe, results: Se, attrsEvaluated: ie } = await ConnectionProvider.getHandler().searchForTree({
|
|
14413
|
+
params: se,
|
|
14414
14414
|
limit: Y.current,
|
|
14415
14415
|
offset: re || k,
|
|
14416
14416
|
model: t,
|
|
@@ -14494,8 +14494,8 @@ const DEFAULT_SEARCH_LIMIT$1 = 80, useSearch = (e) => {
|
|
|
14494
14494
|
[h, V, f, p, D]
|
|
14495
14495
|
), E = useCallback(
|
|
14496
14496
|
(X) => {
|
|
14497
|
-
const { params: te, searchValues: re, limit:
|
|
14498
|
-
$ || (r == null || r(void 0), n == null || n([]), I == null || I(re), a == null || a(te), o == null || o(!1), M(!0), P(void 0), F(1),
|
|
14497
|
+
const { params: te, searchValues: re, limit: se, offset: ye } = X;
|
|
14498
|
+
$ || (r == null || r(void 0), n == null || n([]), I == null || I(re), a == null || a(te), o == null || o(!1), M(!0), P(void 0), F(1), se && (Y.current = se, C == null || C(se)), ye && j(ye), Q({
|
|
14499
14499
|
params: te,
|
|
14500
14500
|
newOffset: ye
|
|
14501
14501
|
}));
|
|
@@ -14591,13 +14591,13 @@ const DEFAULT_SEARCH_LIMIT$1 = 80, useSearch = (e) => {
|
|
|
14591
14591
|
}, [p]), useEffect(() => {
|
|
14592
14592
|
ee(S !== void 0 ? S : DEFAULT_SEARCH_LIMIT$1);
|
|
14593
14593
|
}, [S]), useEffect(() => {
|
|
14594
|
-
o.length === 1 ? T(o[0]) : o.length > 1 && T(o.filter((
|
|
14594
|
+
o.length === 1 ? T(o[0]) : o.length > 1 && T(o.filter((se) => se.view_id !== r.view_id)[0]);
|
|
14595
14595
|
}, [o]), useEffect(() => {
|
|
14596
|
-
(Q == null ? void 0 : Q.view_id) === r.view_id && o.length > 1 && T(o.filter((
|
|
14596
|
+
(Q == null ? void 0 : Q.view_id) === r.view_id && o.length > 1 && T(o.filter((se) => se.view_id !== r.view_id)[0]);
|
|
14597
14597
|
}, [r]);
|
|
14598
14598
|
const re = async () => {
|
|
14599
|
-
var
|
|
14600
|
-
return await ((
|
|
14599
|
+
var se;
|
|
14600
|
+
return await ((se = s.current) == null ? void 0 : se.submitForm());
|
|
14601
14601
|
};
|
|
14602
14602
|
return /* @__PURE__ */ jsx(ActionViewContext.Provider, {
|
|
14603
14603
|
value: {
|
|
@@ -14995,7 +14995,7 @@ function Form(e, t) {
|
|
|
14995
14995
|
setFormHasChanges: X = void 0,
|
|
14996
14996
|
setCurrentId: te = void 0,
|
|
14997
14997
|
setFormIsLoading: re = void 0,
|
|
14998
|
-
setAttachments:
|
|
14998
|
+
setAttachments: se = void 0,
|
|
14999
14999
|
title: ye = void 0,
|
|
15000
15000
|
setTitle: xe = void 0
|
|
15001
15001
|
} = (b ? Z : {}) || {}, Se = useContext(ContentRootContext), {
|
|
@@ -15056,7 +15056,7 @@ function Form(e, t) {
|
|
|
15056
15056
|
ne[fe] && ne[fe].type === "many2one" && Oe && Array.isArray(Oe) && Oe.length === 2 ? ce[fe] = Oe[0] : ne[fe] && (ne[fe].type === "one2many" || ne[fe].type === "many2many") && Oe && Oe.items ? ce[fe] = Oe.items.filter((ze) => ze.operation !== "pendingRemove").map((ze) => ze.id) : ce[fe] = Oe;
|
|
15057
15057
|
}), ce;
|
|
15058
15058
|
}
|
|
15059
|
-
function
|
|
15059
|
+
function oe() {
|
|
15060
15060
|
const ae = {
|
|
15061
15061
|
...we(q)
|
|
15062
15062
|
};
|
|
@@ -15217,9 +15217,9 @@ function Form(e, t) {
|
|
|
15217
15217
|
context: de(),
|
|
15218
15218
|
model: "ir.attachment"
|
|
15219
15219
|
});
|
|
15220
|
-
|
|
15220
|
+
se == null || se(Oe);
|
|
15221
15221
|
} else
|
|
15222
|
-
|
|
15222
|
+
se == null || se([]), ce = await _e(ae), fe = !0;
|
|
15223
15223
|
return {
|
|
15224
15224
|
values: ce,
|
|
15225
15225
|
defaultGetCalled: fe
|
|
@@ -15262,12 +15262,12 @@ function Form(e, t) {
|
|
|
15262
15262
|
});
|
|
15263
15263
|
K.current = fe, D.current = ce;
|
|
15264
15264
|
}
|
|
15265
|
-
y && await y([le()]), !x && ne && (ue == null || ue(le(), $e(),
|
|
15265
|
+
y && await y([le()]), !x && ne && (ue == null || ue(le(), $e(), oe()));
|
|
15266
15266
|
}, Ve = async (ae) => {
|
|
15267
15267
|
const {
|
|
15268
15268
|
callOnSubmitSucceed: ne = !0
|
|
15269
15269
|
} = ae || {};
|
|
15270
|
-
!x && ne && (ue == null || ue(le(), $e(),
|
|
15270
|
+
!x && ne && (ue == null || ue(le(), $e(), oe()));
|
|
15271
15271
|
}, Xe = async (ae) => {
|
|
15272
15272
|
let ne = !1;
|
|
15273
15273
|
const {
|
|
@@ -15422,9 +15422,9 @@ function Form(e, t) {
|
|
|
15422
15422
|
}
|
|
15423
15423
|
});
|
|
15424
15424
|
if (typeof ce == "object" && ce !== null && Object.keys(ce).length === 0 && x)
|
|
15425
|
-
ue == null || ue(le(), $e(),
|
|
15425
|
+
ue == null || ue(le(), $e(), oe());
|
|
15426
15426
|
else if (ce.type && ce.type === "ir.actions.act_window_close")
|
|
15427
|
-
ue == null || ue(le(), $e(),
|
|
15427
|
+
ue == null || ue(le(), $e(), oe());
|
|
15428
15428
|
else if (ce.type) {
|
|
15429
15429
|
let fe = {};
|
|
15430
15430
|
ce.context && (fe = parseContext({
|
|
@@ -15449,7 +15449,7 @@ function Form(e, t) {
|
|
|
15449
15449
|
action: ae,
|
|
15450
15450
|
payload: le()
|
|
15451
15451
|
});
|
|
15452
|
-
ne.type && ne.type === "ir.actions.act_window_close" ? ue == null || ue(le(), $e(),
|
|
15452
|
+
ne.type && ne.type === "ir.actions.act_window_close" ? ue == null || ue(le(), $e(), oe()) : await Ne();
|
|
15453
15453
|
}
|
|
15454
15454
|
async function ot({
|
|
15455
15455
|
action: ae,
|
|
@@ -15484,7 +15484,7 @@ function Form(e, t) {
|
|
|
15484
15484
|
Ne();
|
|
15485
15485
|
}
|
|
15486
15486
|
})) || {};
|
|
15487
|
-
!b && ce && (ue == null || ue(le(), $e(),
|
|
15487
|
+
!b && ce && (ue == null || ue(le(), $e(), oe()));
|
|
15488
15488
|
}
|
|
15489
15489
|
function mt() {
|
|
15490
15490
|
et({
|
|
@@ -16667,7 +16667,7 @@ function SearchTree(e, t) {
|
|
|
16667
16667
|
submit: X,
|
|
16668
16668
|
clear: te,
|
|
16669
16669
|
fetchResults: re,
|
|
16670
|
-
tableRefreshing:
|
|
16670
|
+
tableRefreshing: se,
|
|
16671
16671
|
searchFilterLoading: ye,
|
|
16672
16672
|
searchError: xe,
|
|
16673
16673
|
page: Se,
|
|
@@ -16739,7 +16739,7 @@ function SearchTree(e, t) {
|
|
|
16739
16739
|
useEffect(() => {
|
|
16740
16740
|
$e();
|
|
16741
16741
|
}, [r]);
|
|
16742
|
-
const
|
|
16742
|
+
const oe = (Fe) => {
|
|
16743
16743
|
ee == null || ee(Fe);
|
|
16744
16744
|
}, de = async (Fe) => {
|
|
16745
16745
|
const {
|
|
@@ -16799,7 +16799,7 @@ function SearchTree(e, t) {
|
|
|
16799
16799
|
offset: ie,
|
|
16800
16800
|
isSearching: ye,
|
|
16801
16801
|
onSubmit: X,
|
|
16802
|
-
onLimitChange:
|
|
16802
|
+
onLimitChange: oe,
|
|
16803
16803
|
setSearchFilterHeight: M,
|
|
16804
16804
|
searchError: xe,
|
|
16805
16805
|
searchVisible: K,
|
|
@@ -16812,7 +16812,7 @@ function SearchTree(e, t) {
|
|
|
16812
16812
|
treeView: b,
|
|
16813
16813
|
results: me(),
|
|
16814
16814
|
onRequestPageChange: ue,
|
|
16815
|
-
loading:
|
|
16815
|
+
loading: se,
|
|
16816
16816
|
onRowClicked: be,
|
|
16817
16817
|
scrollY: u || Ce(),
|
|
16818
16818
|
colorsForResults: le,
|
|
@@ -19858,17 +19858,17 @@ placements$1.default = _default$1;
|
|
|
19858
19858
|
return ge[de].points[0] === ((be = le.points) === null || be === void 0 ? void 0 : be[0]) && ge[de].points[1] === ((_e = le.points) === null || _e === void 0 ? void 0 : _e[1]);
|
|
19859
19859
|
});
|
|
19860
19860
|
if (!!$e) {
|
|
19861
|
-
var ke = pe.getBoundingClientRect(),
|
|
19861
|
+
var ke = pe.getBoundingClientRect(), oe = {
|
|
19862
19862
|
top: "50%",
|
|
19863
19863
|
left: "50%"
|
|
19864
19864
|
};
|
|
19865
|
-
/top|Bottom/.test($e) ?
|
|
19865
|
+
/top|Bottom/.test($e) ? oe.top = "".concat(ke.height - le.offset[1], "px") : /Top|bottom/.test($e) && (oe.top = "".concat(-le.offset[1], "px")), /left|Right/.test($e) ? oe.left = "".concat(ke.width - le.offset[0], "px") : /right|Left/.test($e) && (oe.left = "".concat(-le.offset[0], "px")), pe.style.transformOrigin = "".concat(oe.left, " ").concat(oe.top);
|
|
19866
19866
|
}
|
|
19867
19867
|
}, L = function() {
|
|
19868
19868
|
var pe = w.title, le = w.overlay;
|
|
19869
19869
|
return pe === 0 ? pe : le || pe || "";
|
|
19870
|
-
}, W = w.getPopupContainer, H = w.placement, Y = H === void 0 ? "top" : H, K = w.mouseEnterDelay, D = K === void 0 ? 0.1 : K, V = w.mouseLeaveDelay, z = V === void 0 ? 0.1 : V, J = x(w, ["getPopupContainer", "placement", "mouseEnterDelay", "mouseLeaveDelay"]), Q = w.prefixCls, T = w.openClassName, E = w.getTooltipContainer, G = w.overlayClassName, Z = w.color, ee = w.overlayInnerStyle, X = w.children, te = M("tooltip", Q), re = M(),
|
|
19871
|
-
!("open" in w) && !("visible" in w) && j() && (
|
|
19870
|
+
}, W = w.getPopupContainer, H = w.placement, Y = H === void 0 ? "top" : H, K = w.mouseEnterDelay, D = K === void 0 ? 0.1 : K, V = w.mouseLeaveDelay, z = V === void 0 ? 0.1 : V, J = x(w, ["getPopupContainer", "placement", "mouseEnterDelay", "mouseLeaveDelay"]), Q = w.prefixCls, T = w.openClassName, E = w.getTooltipContainer, G = w.overlayClassName, Z = w.color, ee = w.overlayInnerStyle, X = w.children, te = M("tooltip", Q), re = M(), se = F;
|
|
19871
|
+
!("open" in w) && !("visible" in w) && j() && (se = !1);
|
|
19872
19872
|
var ye = _((0, h.isValidElement)(X) && !(0, h.isFragment)(X) ? X : /* @__PURE__ */ c.createElement("span", null, X), te), xe = ye.props, Se = !xe.className || typeof xe.className == "string" ? (0, s.default)(xe.className, (0, n.default)({}, T || "".concat(te, "-open"), !0)) : xe.className, ie = (0, s.default)(G, ($ = {}, (0, n.default)($, "".concat(te, "-rtl"), A === "rtl"), (0, n.default)($, "".concat(te, "-").concat(Z), Z && g.test(Z)), $)), me = ee, ue = {};
|
|
19873
19873
|
return Z && !g.test(Z) && (me = (0, o.default)((0, o.default)({}, ee), {
|
|
19874
19874
|
background: Z
|
|
@@ -19884,7 +19884,7 @@ placements$1.default = _default$1;
|
|
|
19884
19884
|
ref: I,
|
|
19885
19885
|
builtinPlacements: B(),
|
|
19886
19886
|
overlay: L(),
|
|
19887
|
-
visible:
|
|
19887
|
+
visible: se,
|
|
19888
19888
|
onVisibleChange: q,
|
|
19889
19889
|
onPopupAlign: U,
|
|
19890
19890
|
overlayInnerStyle: me,
|
|
@@ -19896,7 +19896,7 @@ placements$1.default = _default$1;
|
|
|
19896
19896
|
motionName: (0, p.getTransitionName)(re, "zoom-big-fast", w.transitionName),
|
|
19897
19897
|
motionDeadline: 1e3
|
|
19898
19898
|
}
|
|
19899
|
-
}),
|
|
19899
|
+
}), se ? (0, h.cloneElement)(ye, {
|
|
19900
19900
|
className: Se
|
|
19901
19901
|
}) : ye);
|
|
19902
19902
|
});
|
|
@@ -20100,8 +20100,8 @@ var Ellipsis = {};
|
|
|
20100
20100
|
te <= re ? (W(x), M(!1)) : W(h);
|
|
20101
20101
|
} else if (L === h)
|
|
20102
20102
|
if (F !== j) {
|
|
20103
|
-
var
|
|
20104
|
-
F === j - 1 ? Se = F :
|
|
20103
|
+
var se = ((X = z.current) === null || X === void 0 ? void 0 : X.offsetHeight) || 0, ye = O * K, xe = F, Se = j;
|
|
20104
|
+
F === j - 1 ? Se = F : se <= ye ? xe = k : Se = k;
|
|
20105
20105
|
var ie = Math.ceil((xe + Se) / 2);
|
|
20106
20106
|
q([xe, ie, Se]);
|
|
20107
20107
|
} else
|
|
@@ -20185,16 +20185,16 @@ var EllipsisTooltip = {};
|
|
|
20185
20185
|
return L === !1 ? [!1, !1] : Array.isArray(L) ? L : [L];
|
|
20186
20186
|
}
|
|
20187
20187
|
var q = "...", B = /* @__PURE__ */ g.forwardRef(function(L, W) {
|
|
20188
|
-
var H, Y, K, D = L.prefixCls, V = L.className, z = L.style, J = L.type, Q = L.disabled, T = L.children, E = L.ellipsis, G = L.editable, Z = L.copyable, ee = L.component, X = L.title, te = N(L, ["prefixCls", "className", "style", "type", "disabled", "children", "ellipsis", "editable", "copyable", "component", "title"]), re = g.useContext(_.ConfigContext),
|
|
20188
|
+
var H, Y, K, D = L.prefixCls, V = L.className, z = L.style, J = L.type, Q = L.disabled, T = L.children, E = L.ellipsis, G = L.editable, Z = L.copyable, ee = L.component, X = L.title, te = N(L, ["prefixCls", "className", "style", "type", "disabled", "children", "ellipsis", "editable", "copyable", "component", "title"]), re = g.useContext(_.ConfigContext), se = re.getPrefixCls, ye = re.direction, xe = (0, b.useLocaleReceiver)("Text")[0], Se = g.useRef(null), ie = g.useRef(null), me = se("typography", D), ue = (0, x.default)(te, ["mark", "code", "delete", "underline", "strong", "keyboard", "italic"]), ve = (0, S.default)(G), pe = (0, s.default)(ve, 2), le = pe[0], ge = pe[1], $e = (0, y.default)(!1, {
|
|
20189
20189
|
value: ge.editing
|
|
20190
|
-
}), ke = (0, s.default)($e, 2),
|
|
20190
|
+
}), ke = (0, s.default)($e, 2), oe = ke[0], de = ke[1], be = ge.triggerType, _e = be === void 0 ? ["icon"] : be, Ce = function(he) {
|
|
20191
20191
|
var Te;
|
|
20192
20192
|
he && ((Te = ge.onStart) === null || Te === void 0 || Te.call(ge)), de(he);
|
|
20193
20193
|
};
|
|
20194
20194
|
(0, O.default)(function() {
|
|
20195
20195
|
var Re;
|
|
20196
|
-
|
|
20197
|
-
}, [
|
|
20196
|
+
oe || (Re = ie.current) === null || Re === void 0 || Re.focus();
|
|
20197
|
+
}, [oe]);
|
|
20198
20198
|
var we = function(he) {
|
|
20199
20199
|
he == null || he.preventDefault(), Ce(!0);
|
|
20200
20200
|
}, Ae = function(he) {
|
|
@@ -20278,7 +20278,7 @@ var EllipsisTooltip = {};
|
|
|
20278
20278
|
return Ke.title;
|
|
20279
20279
|
}
|
|
20280
20280
|
}, [Ge, He, X, Ke.title, bt]);
|
|
20281
|
-
if (
|
|
20281
|
+
if (oe)
|
|
20282
20282
|
return /* @__PURE__ */ g.createElement($.default, {
|
|
20283
20283
|
value: (K = ge.text) !== null && K !== void 0 ? K : typeof T == "string" ? T : "",
|
|
20284
20284
|
onSave: Ae,
|
|
@@ -21223,7 +21223,7 @@ const One2manyInput = (e) => {
|
|
|
21223
21223
|
domain: K
|
|
21224
21224
|
} = n, D = n.type === "many2many", {
|
|
21225
21225
|
id: V
|
|
21226
|
-
} = n, z = o.filter((
|
|
21226
|
+
} = n, z = o.filter((oe) => (oe.values || oe.treeValues) && oe.operation !== "pendingRemove"), J = useRef();
|
|
21227
21227
|
useEffect(() => {
|
|
21228
21228
|
if (J.current !== s) {
|
|
21229
21229
|
J.current = s, Q();
|
|
@@ -21232,20 +21232,20 @@ const One2manyInput = (e) => {
|
|
|
21232
21232
|
Q();
|
|
21233
21233
|
}, [o, s]);
|
|
21234
21234
|
const Q = useCallback(() => {
|
|
21235
|
-
(s === "form" && o.some((
|
|
21235
|
+
(s === "form" && o.some((oe) => !oe.values) || s === "tree" && o.some((oe) => !oe.treeValues)) && E();
|
|
21236
21236
|
}, [o, s]);
|
|
21237
21237
|
useEffect(() => {
|
|
21238
21238
|
Z();
|
|
21239
21239
|
}, [y]);
|
|
21240
|
-
const T = (
|
|
21240
|
+
const T = (oe) => {
|
|
21241
21241
|
var de, be;
|
|
21242
21242
|
r == null || r({
|
|
21243
21243
|
fields: ((de = a.get("form")) == null ? void 0 : de.fields) || ((be = a.get("tree")) == null ? void 0 : be.fields),
|
|
21244
|
-
items: filterDuplicateItems(
|
|
21244
|
+
items: filterDuplicateItems(oe)
|
|
21245
21245
|
});
|
|
21246
21246
|
}, E = async () => {
|
|
21247
21247
|
await G(), l > z.length - 1 && l !== 0 && c(0);
|
|
21248
|
-
}, G = async (
|
|
21248
|
+
}, G = async (oe) => {
|
|
21249
21249
|
var de;
|
|
21250
21250
|
C(!0), _(!1), I(void 0);
|
|
21251
21251
|
try {
|
|
@@ -21258,7 +21258,7 @@ const One2manyInput = (e) => {
|
|
|
21258
21258
|
...h == null ? void 0 : h(),
|
|
21259
21259
|
...Y
|
|
21260
21260
|
},
|
|
21261
|
-
currentView:
|
|
21261
|
+
currentView: oe || s
|
|
21262
21262
|
});
|
|
21263
21263
|
return L.current || (L.current = be.map((_e) => _e.id)), T(be), be;
|
|
21264
21264
|
} catch (be) {
|
|
@@ -21285,23 +21285,23 @@ const One2manyInput = (e) => {
|
|
|
21285
21285
|
})));
|
|
21286
21286
|
}
|
|
21287
21287
|
const ee = () => {
|
|
21288
|
-
const
|
|
21289
|
-
s === "form" ?
|
|
21288
|
+
const oe = Array.from(a.keys()), de = oe[(oe.indexOf(s) + 1) % oe.length];
|
|
21289
|
+
s === "form" ? se(() => {
|
|
21290
21290
|
u(de);
|
|
21291
21291
|
}) : u(de);
|
|
21292
21292
|
}, X = () => {
|
|
21293
|
-
l > 0 && (s === "form" ?
|
|
21293
|
+
l > 0 && (s === "form" ? se(() => {
|
|
21294
21294
|
c(l - 1);
|
|
21295
21295
|
}) : c(l - 1));
|
|
21296
21296
|
}, te = () => {
|
|
21297
|
-
const
|
|
21298
|
-
l <
|
|
21297
|
+
const oe = z.length;
|
|
21298
|
+
l < oe - 1 && (s === "form" ? se(() => {
|
|
21299
21299
|
c(l + 1);
|
|
21300
21300
|
}) : c(l + 1));
|
|
21301
21301
|
}, re = async () => {
|
|
21302
|
-
const
|
|
21302
|
+
const oe = z[l].id, de = (await ConnectionProvider.getHandler().readObjects({
|
|
21303
21303
|
model: H,
|
|
21304
|
-
ids: [
|
|
21304
|
+
ids: [oe],
|
|
21305
21305
|
fields: a.get("form").fields,
|
|
21306
21306
|
context: {
|
|
21307
21307
|
...h == null ? void 0 : h(),
|
|
@@ -21309,26 +21309,26 @@ const One2manyInput = (e) => {
|
|
|
21309
21309
|
}
|
|
21310
21310
|
}))[0], be = (await ConnectionProvider.getHandler().readObjects({
|
|
21311
21311
|
model: H,
|
|
21312
|
-
ids: [
|
|
21312
|
+
ids: [oe],
|
|
21313
21313
|
fields: a.get("tree").fields,
|
|
21314
21314
|
context: {
|
|
21315
21315
|
...h == null ? void 0 : h(),
|
|
21316
21316
|
...Y
|
|
21317
21317
|
}
|
|
21318
|
-
}))[0], _e = o.map((Ce) => Ce.id ===
|
|
21318
|
+
}))[0], _e = o.map((Ce) => Ce.id === oe ? {
|
|
21319
21319
|
...Ce,
|
|
21320
21320
|
operation: "original",
|
|
21321
21321
|
values: de,
|
|
21322
21322
|
treeValues: be
|
|
21323
21323
|
} : Ce);
|
|
21324
21324
|
T(_e);
|
|
21325
|
-
},
|
|
21325
|
+
}, se = (oe) => {
|
|
21326
21326
|
g ? showDialog$6({
|
|
21327
21327
|
lang: x,
|
|
21328
21328
|
onOk: () => {
|
|
21329
|
-
re(),
|
|
21329
|
+
re(), oe(), _(!1);
|
|
21330
21330
|
}
|
|
21331
|
-
}) :
|
|
21331
|
+
}) : oe();
|
|
21332
21332
|
}, ye = () => {
|
|
21333
21333
|
if (D) {
|
|
21334
21334
|
showDialog$1({
|
|
@@ -21347,12 +21347,12 @@ const One2manyInput = (e) => {
|
|
|
21347
21347
|
});
|
|
21348
21348
|
}, xe = async () => {
|
|
21349
21349
|
const {
|
|
21350
|
-
inv_field:
|
|
21350
|
+
inv_field: oe
|
|
21351
21351
|
} = n;
|
|
21352
21352
|
let de;
|
|
21353
|
-
|
|
21354
|
-
[
|
|
21355
|
-
}), s === "form" ?
|
|
21353
|
+
oe && f && (de = {
|
|
21354
|
+
[oe]: f
|
|
21355
|
+
}), s === "form" ? se(() => {
|
|
21356
21356
|
j(!0), P({
|
|
21357
21357
|
defaultValues: de
|
|
21358
21358
|
}), S(!0);
|
|
@@ -21360,29 +21360,29 @@ const One2manyInput = (e) => {
|
|
|
21360
21360
|
defaultValues: de
|
|
21361
21361
|
}), S(!0));
|
|
21362
21362
|
}, Se = async () => {
|
|
21363
|
-
s === "form" ?
|
|
21363
|
+
s === "form" ? se(() => {
|
|
21364
21364
|
M(!0);
|
|
21365
21365
|
}) : M(!0);
|
|
21366
21366
|
}, ie = async () => {
|
|
21367
21367
|
C(!0), _(!1), I(void 0);
|
|
21368
21368
|
try {
|
|
21369
21369
|
if (z[l].id > 0) {
|
|
21370
|
-
const
|
|
21370
|
+
const oe = o.map((de) => de.id === z[l].id ? {
|
|
21371
21371
|
...de,
|
|
21372
21372
|
operation: "pendingRemove"
|
|
21373
21373
|
} : de);
|
|
21374
|
-
T(
|
|
21374
|
+
T(oe);
|
|
21375
21375
|
} else
|
|
21376
|
-
T(o.filter((
|
|
21377
|
-
} catch (
|
|
21378
|
-
I(
|
|
21376
|
+
T(o.filter((oe) => oe.id !== z[l].id));
|
|
21377
|
+
} catch (oe) {
|
|
21378
|
+
I(oe);
|
|
21379
21379
|
}
|
|
21380
21380
|
c(0), C(!1);
|
|
21381
21381
|
}, me = async () => {
|
|
21382
|
-
const
|
|
21382
|
+
const oe = z.filter((de) => N.includes(de.id));
|
|
21383
21383
|
C(!0), _(!1), I(void 0);
|
|
21384
21384
|
try {
|
|
21385
|
-
const de =
|
|
21385
|
+
const de = oe.map((_e) => _e.id), be = o.filter((_e) => !(de.includes(_e.id) && _e.id < 0)).map((_e) => de.includes(_e.id) ? {
|
|
21386
21386
|
..._e,
|
|
21387
21387
|
operation: "pendingRemove"
|
|
21388
21388
|
} : _e);
|
|
@@ -21391,19 +21391,19 @@ const One2manyInput = (e) => {
|
|
|
21391
21391
|
I(de);
|
|
21392
21392
|
}
|
|
21393
21393
|
c(0), C(!1);
|
|
21394
|
-
}, ue = (
|
|
21394
|
+
}, ue = (oe, de, be) => {
|
|
21395
21395
|
let _e;
|
|
21396
|
-
if (
|
|
21397
|
-
_e = o.map((Ce) => Ce.id ===
|
|
21398
|
-
id:
|
|
21399
|
-
operation:
|
|
21396
|
+
if (oe)
|
|
21397
|
+
_e = o.map((Ce) => Ce.id === oe ? {
|
|
21398
|
+
id: oe,
|
|
21399
|
+
operation: oe > 0 ? "pendingUpdate" : "pendingCreate",
|
|
21400
21400
|
values: {
|
|
21401
21401
|
...be,
|
|
21402
|
-
id:
|
|
21402
|
+
id: oe
|
|
21403
21403
|
},
|
|
21404
21404
|
treeValues: {
|
|
21405
21405
|
...be,
|
|
21406
|
-
id:
|
|
21406
|
+
id: oe
|
|
21407
21407
|
}
|
|
21408
21408
|
} : Ce);
|
|
21409
21409
|
else {
|
|
@@ -21422,17 +21422,17 @@ const One2manyInput = (e) => {
|
|
|
21422
21422
|
});
|
|
21423
21423
|
}
|
|
21424
21424
|
T(_e), k || S(!1);
|
|
21425
|
-
}, ve = async (
|
|
21425
|
+
}, ve = async (oe) => {
|
|
21426
21426
|
const {
|
|
21427
21427
|
id: de
|
|
21428
|
-
} =
|
|
21428
|
+
} = oe;
|
|
21429
21429
|
let be = o;
|
|
21430
21430
|
const _e = o.find((Ce) => Ce.id === de);
|
|
21431
21431
|
(_e == null ? void 0 : _e.values) === void 0 && (be = await G("form")), P(be.find((Ce) => Ce.id === de)), j(!1), S(!0);
|
|
21432
|
-
}, pe = async (
|
|
21432
|
+
}, pe = async (oe) => {
|
|
21433
21433
|
C(!0);
|
|
21434
21434
|
let de = o;
|
|
21435
|
-
const be =
|
|
21435
|
+
const be = oe.filter((_e) => !o.find((Ce) => Ce.id === _e));
|
|
21436
21436
|
try {
|
|
21437
21437
|
for (const _e of be) {
|
|
21438
21438
|
const Ce = (await ConnectionProvider.getHandler().readObjects({
|
|
@@ -21467,11 +21467,11 @@ const One2manyInput = (e) => {
|
|
|
21467
21467
|
}
|
|
21468
21468
|
};
|
|
21469
21469
|
function le() {
|
|
21470
|
-
const
|
|
21470
|
+
const oe = ViewObjects[s];
|
|
21471
21471
|
if (s === "graph")
|
|
21472
21472
|
return parseGraph(a.get("graph").arch).string;
|
|
21473
21473
|
{
|
|
21474
|
-
const de = new
|
|
21474
|
+
const de = new oe(a.get(s).fields);
|
|
21475
21475
|
return de.parse(a.get(s).arch), de.string;
|
|
21476
21476
|
}
|
|
21477
21477
|
}
|
|
@@ -21506,20 +21506,20 @@ const One2manyInput = (e) => {
|
|
|
21506
21506
|
},
|
|
21507
21507
|
readOnly: W
|
|
21508
21508
|
});
|
|
21509
|
-
|
|
21509
|
+
let oe = [];
|
|
21510
|
+
if (z.some((we) => we.treeValues) && (oe = B ? sortResults({
|
|
21510
21511
|
resultsToSort: z.map((we) => we.treeValues),
|
|
21511
21512
|
sorter: B,
|
|
21512
21513
|
fields: {
|
|
21513
21514
|
...a.get("tree").fields,
|
|
21514
21515
|
...((_e = a.get("form")) == null ? void 0 : _e.fields) || {}
|
|
21515
21516
|
}
|
|
21516
|
-
}) : z.map((we) => we.treeValues)
|
|
21517
|
-
if (s === "tree")
|
|
21517
|
+
}) : z.map((we) => we.treeValues)), s === "tree")
|
|
21518
21518
|
return /* @__PURE__ */ jsx(Tree, {
|
|
21519
21519
|
total: z.length,
|
|
21520
21520
|
limit: z.length,
|
|
21521
21521
|
treeView: a.get("tree"),
|
|
21522
|
-
results:
|
|
21522
|
+
results: oe,
|
|
21523
21523
|
loading: b,
|
|
21524
21524
|
onRowClicked: ((Ce = a.get("form")) == null ? void 0 : Ce.fields) !== void 0 ? ve : void 0,
|
|
21525
21525
|
showPagination: !1,
|
|
@@ -21600,8 +21600,8 @@ const One2manyInput = (e) => {
|
|
|
21600
21600
|
...Y
|
|
21601
21601
|
},
|
|
21602
21602
|
visible: O,
|
|
21603
|
-
onSelectValues: async (
|
|
21604
|
-
M(!1), pe(
|
|
21603
|
+
onSelectValues: async (oe) => {
|
|
21604
|
+
M(!1), pe(oe);
|
|
21605
21605
|
},
|
|
21606
21606
|
onCloseModal: () => {
|
|
21607
21607
|
M(!1);
|
|
@@ -26872,7 +26872,7 @@ function ActionView(e, t) {
|
|
|
26872
26872
|
openAction: Z
|
|
26873
26873
|
} = J || {};
|
|
26874
26874
|
useHotkeys("ctrl+g,command+g", (ie) => {
|
|
26875
|
-
ie.preventDefault(),
|
|
26875
|
+
ie.preventDefault(), se();
|
|
26876
26876
|
}, [G, E, m, A, N]);
|
|
26877
26877
|
function ee(ie) {
|
|
26878
26878
|
S(ie), T == null || T(ie);
|
|
@@ -26903,8 +26903,8 @@ function ActionView(e, t) {
|
|
|
26903
26903
|
switch (pe) {
|
|
26904
26904
|
case "dashboard": {
|
|
26905
26905
|
const ge = o.find((ke) => {
|
|
26906
|
-
const [,
|
|
26907
|
-
return
|
|
26906
|
+
const [, oe] = ke;
|
|
26907
|
+
return oe === "form";
|
|
26908
26908
|
});
|
|
26909
26909
|
let $e;
|
|
26910
26910
|
ge && ($e = {
|
|
@@ -26964,7 +26964,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
26964
26964
|
async function re() {
|
|
26965
26965
|
return m.type === "form" ? await V.current.cancelUnsavedChanges() : !0;
|
|
26966
26966
|
}
|
|
26967
|
-
async function
|
|
26967
|
+
async function se() {
|
|
26968
26968
|
G === l && (m.type === "form" && !await V.current.cancelUnsavedChanges() || L(!0));
|
|
26969
26969
|
}
|
|
26970
26970
|
async function ye(ie) {
|