@gisce/react-ooui 1.2.0-rc.77 → 1.2.0-rc.78
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
CHANGED
|
@@ -1317,14 +1317,14 @@ function requireReactIs_development() {
|
|
|
1317
1317
|
case f:
|
|
1318
1318
|
return Z;
|
|
1319
1319
|
default:
|
|
1320
|
-
var
|
|
1321
|
-
switch (
|
|
1320
|
+
var te = Z && Z.$$typeof;
|
|
1321
|
+
switch (te) {
|
|
1322
1322
|
case u:
|
|
1323
1323
|
case d:
|
|
1324
1324
|
case m:
|
|
1325
1325
|
case g:
|
|
1326
1326
|
case s:
|
|
1327
|
-
return
|
|
1327
|
+
return te;
|
|
1328
1328
|
default:
|
|
1329
1329
|
return z;
|
|
1330
1330
|
}
|
|
@@ -6625,18 +6625,18 @@ function useStatus(e, t, r, n) {
|
|
|
6625
6625
|
return r();
|
|
6626
6626
|
}
|
|
6627
6627
|
var G = useRef(!1);
|
|
6628
|
-
function B(
|
|
6628
|
+
function B(ee) {
|
|
6629
6629
|
var re = H();
|
|
6630
|
-
if (!(
|
|
6631
|
-
var se = G.current,
|
|
6632
|
-
F === STATUS_APPEAR && se ?
|
|
6630
|
+
if (!(ee && !ee.deadline && ee.target !== re)) {
|
|
6631
|
+
var se = G.current, ye;
|
|
6632
|
+
F === STATUS_APPEAR && se ? ye = C == null ? void 0 : C(re, ee) : F === STATUS_ENTER && se ? ye = w == null ? void 0 : w(re, ee) : F === STATUS_LEAVE && se && (ye = D == null ? void 0 : D(re, ee)), F !== STATUS_NONE && se && ye !== !1 && (k(STATUS_NONE, !0), W(null, !0));
|
|
6633
6633
|
}
|
|
6634
6634
|
}
|
|
6635
6635
|
var I = useDomMotionEvents(B), q = _slicedToArray(I, 1), K = q[0], Q = React$n.useMemo(function() {
|
|
6636
|
-
var
|
|
6636
|
+
var ee, re, se;
|
|
6637
6637
|
switch (F) {
|
|
6638
6638
|
case STATUS_APPEAR:
|
|
6639
|
-
return
|
|
6639
|
+
return ee = {}, _defineProperty$1(ee, STEP_PREPARE, p), _defineProperty$1(ee, STEP_START, y), _defineProperty$1(ee, STEP_ACTIVE, v), ee;
|
|
6640
6640
|
case STATUS_ENTER:
|
|
6641
6641
|
return re = {}, _defineProperty$1(re, STEP_PREPARE, g), _defineProperty$1(re, STEP_START, x), _defineProperty$1(re, STEP_ACTIVE, _), re;
|
|
6642
6642
|
case STATUS_LEAVE:
|
|
@@ -6644,8 +6644,8 @@ function useStatus(e, t, r, n) {
|
|
|
6644
6644
|
default:
|
|
6645
6645
|
return {};
|
|
6646
6646
|
}
|
|
6647
|
-
}, [F]), X = useStepQueue(F, function(
|
|
6648
|
-
if (
|
|
6647
|
+
}, [F]), X = useStepQueue(F, function(ee) {
|
|
6648
|
+
if (ee === STEP_PREPARE) {
|
|
6649
6649
|
var re = Q[STEP_PREPARE];
|
|
6650
6650
|
return re ? re(H()) : SkipStep;
|
|
6651
6651
|
}
|
|
@@ -6661,10 +6661,10 @@ function useStatus(e, t, r, n) {
|
|
|
6661
6661
|
}), E = _slicedToArray(X, 2), T = E[0], z = E[1], Z = isActive(z);
|
|
6662
6662
|
G.current = Z, useIsomorphicLayoutEffect(function() {
|
|
6663
6663
|
A(t);
|
|
6664
|
-
var
|
|
6664
|
+
var ee = L.current;
|
|
6665
6665
|
if (L.current = !0, !!e) {
|
|
6666
6666
|
var re;
|
|
6667
|
-
!
|
|
6667
|
+
!ee && t && u && (re = STATUS_APPEAR), ee && t && o && (re = STATUS_ENTER), (ee && !t && c || !ee && f && !t && c) && (re = STATUS_LEAVE), re && (k(re), T());
|
|
6668
6668
|
}
|
|
6669
6669
|
}, [t]), useEffect(function() {
|
|
6670
6670
|
(F === STATUS_APPEAR && !u || F === STATUS_ENTER && !o || F === STATUS_LEAVE && !c) && k(STATUS_NONE);
|
|
@@ -6673,9 +6673,9 @@ function useStatus(e, t, r, n) {
|
|
|
6673
6673
|
L.current = !1, clearTimeout(U.current);
|
|
6674
6674
|
};
|
|
6675
6675
|
}, []);
|
|
6676
|
-
var
|
|
6676
|
+
var te = React$n.useRef(!1);
|
|
6677
6677
|
useEffect(function() {
|
|
6678
|
-
M && (
|
|
6678
|
+
M && (te.current = !0), M !== void 0 && F === STATUS_NONE && ((te.current || M) && ($ == null || $(M)), te.current = !0);
|
|
6679
6679
|
}, [M, F]);
|
|
6680
6680
|
var J = Y;
|
|
6681
6681
|
return Q[STEP_PREPARE] && z === STEP_START && (J = _objectSpread2$g({
|
|
@@ -8218,19 +8218,19 @@ function requireNotification() {
|
|
|
8218
8218
|
return H;
|
|
8219
8219
|
}
|
|
8220
8220
|
function O(W, L) {
|
|
8221
|
-
var U = W.placement, H = U === void 0 ? w : U, G = W.top, B = W.bottom, I = W.getContainer, q = I === void 0 ? D : I, K = W.prefixCls, Q = (0, m.globalConfig)(), X = Q.getPrefixCls, E = Q.getIconPrefixCls, T = X("notification", K || C), z = E(), Z = "".concat(T, "-").concat(H),
|
|
8222
|
-
if (
|
|
8223
|
-
Promise.resolve(
|
|
8221
|
+
var U = W.placement, H = U === void 0 ? w : U, G = W.top, B = W.bottom, I = W.getContainer, q = I === void 0 ? D : I, K = W.prefixCls, Q = (0, m.globalConfig)(), X = Q.getPrefixCls, E = Q.getIconPrefixCls, T = X("notification", K || C), z = E(), Z = "".concat(T, "-").concat(H), te = h[Z];
|
|
8222
|
+
if (te) {
|
|
8223
|
+
Promise.resolve(te).then(function(ee) {
|
|
8224
8224
|
L({
|
|
8225
8225
|
prefixCls: "".concat(T, "-notice"),
|
|
8226
8226
|
iconPrefixCls: z,
|
|
8227
|
-
instance:
|
|
8227
|
+
instance: ee
|
|
8228
8228
|
});
|
|
8229
8229
|
});
|
|
8230
8230
|
return;
|
|
8231
8231
|
}
|
|
8232
8232
|
var J = (0, f.default)("".concat(T, "-").concat(H), (0, o.default)({}, "".concat(T, "-rtl"), S === !0));
|
|
8233
|
-
h[Z] = new Promise(function(
|
|
8233
|
+
h[Z] = new Promise(function(ee) {
|
|
8234
8234
|
p.default.newInstance({
|
|
8235
8235
|
prefixCls: T,
|
|
8236
8236
|
className: J,
|
|
@@ -8238,7 +8238,7 @@ function requireNotification() {
|
|
|
8238
8238
|
getContainer: q,
|
|
8239
8239
|
maxCount: P
|
|
8240
8240
|
}, function(re) {
|
|
8241
|
-
|
|
8241
|
+
ee(re), L({
|
|
8242
8242
|
prefixCls: "".concat(T, "-notice"),
|
|
8243
8243
|
iconPrefixCls: z,
|
|
8244
8244
|
instance: re
|
|
@@ -8253,7 +8253,7 @@ function requireNotification() {
|
|
|
8253
8253
|
warning: c.default
|
|
8254
8254
|
};
|
|
8255
8255
|
function F(W, L, U) {
|
|
8256
|
-
var H = W.duration, G = W.icon, B = W.type, I = W.description, q = W.message, K = W.btn, Q = W.onClose, X = W.onClick, E = W.key, T = W.style, z = W.className, Z = W.closeIcon,
|
|
8256
|
+
var H = W.duration, G = W.icon, B = W.type, I = W.description, q = W.message, K = W.btn, Q = W.onClose, X = W.onClick, E = W.key, T = W.style, z = W.className, Z = W.closeIcon, te = Z === void 0 ? $ : Z, J = W.props, ee = H === void 0 ? v : H, re = null;
|
|
8257
8257
|
G ? re = /* @__PURE__ */ g.createElement("span", {
|
|
8258
8258
|
className: "".concat(L, "-icon")
|
|
8259
8259
|
}, W.icon) : B && (re = /* @__PURE__ */ g.createElement(N[B] || null, {
|
|
@@ -8261,9 +8261,9 @@ function requireNotification() {
|
|
|
8261
8261
|
}));
|
|
8262
8262
|
var se = /* @__PURE__ */ g.createElement("span", {
|
|
8263
8263
|
className: "".concat(L, "-close-x")
|
|
8264
|
-
},
|
|
8264
|
+
}, te || /* @__PURE__ */ g.createElement(l.default, {
|
|
8265
8265
|
className: "".concat(L, "-close-icon")
|
|
8266
|
-
})),
|
|
8266
|
+
})), ye = !I && re ? /* @__PURE__ */ g.createElement("span", {
|
|
8267
8267
|
className: "".concat(L, "-message-single-line-auto-margin")
|
|
8268
8268
|
}) : null;
|
|
8269
8269
|
return {
|
|
@@ -8274,12 +8274,12 @@ function requireNotification() {
|
|
|
8274
8274
|
role: "alert"
|
|
8275
8275
|
}, re, /* @__PURE__ */ g.createElement("div", {
|
|
8276
8276
|
className: "".concat(L, "-message")
|
|
8277
|
-
},
|
|
8277
|
+
}, ye, q), /* @__PURE__ */ g.createElement("div", {
|
|
8278
8278
|
className: "".concat(L, "-description")
|
|
8279
8279
|
}, I), K ? /* @__PURE__ */ g.createElement("span", {
|
|
8280
8280
|
className: "".concat(L, "-btn")
|
|
8281
8281
|
}, K) : null)),
|
|
8282
|
-
duration:
|
|
8282
|
+
duration: ee,
|
|
8283
8283
|
closable: !0,
|
|
8284
8284
|
closeIcon: se,
|
|
8285
8285
|
onClose: Q,
|
|
@@ -8503,11 +8503,11 @@ function requireConfigProvider() {
|
|
|
8503
8503
|
e.globalConfig = P;
|
|
8504
8504
|
var M = function(F) {
|
|
8505
8505
|
var k, j, V = F.children, Y = F.csp, W = F.autoInsertSpaceInButton, L = F.form, U = F.locale, H = F.componentSize, G = F.direction, B = F.space, I = F.virtual, q = F.dropdownMatchSelectWidth, K = F.legacyLocale, Q = F.parentContext, X = F.iconPrefixCls, E = F.componentDisabled, T = u.useCallback(function(re, se) {
|
|
8506
|
-
var
|
|
8506
|
+
var ye = F.prefixCls;
|
|
8507
8507
|
if (se)
|
|
8508
8508
|
return se;
|
|
8509
|
-
var
|
|
8510
|
-
return re ? "".concat(
|
|
8509
|
+
var _e = ye || Q.getPrefixCls("");
|
|
8510
|
+
return re ? "".concat(_e, "-").concat(re) : _e;
|
|
8511
8511
|
}, [Q.getPrefixCls, F.prefixCls]), z = (0, n.default)((0, n.default)({}, Q), {
|
|
8512
8512
|
csp: Y,
|
|
8513
8513
|
autoInsertSpaceInButton: W,
|
|
@@ -8525,23 +8525,23 @@ function requireConfigProvider() {
|
|
|
8525
8525
|
var Z = (0, s.default)(function() {
|
|
8526
8526
|
return z;
|
|
8527
8527
|
}, z, function(re, se) {
|
|
8528
|
-
var
|
|
8529
|
-
return
|
|
8530
|
-
return re[
|
|
8528
|
+
var ye = Object.keys(re), _e = Object.keys(se);
|
|
8529
|
+
return ye.length !== _e.length || ye.some(function($e) {
|
|
8530
|
+
return re[$e] !== se[$e];
|
|
8531
8531
|
});
|
|
8532
|
-
}),
|
|
8532
|
+
}), te = u.useMemo(function() {
|
|
8533
8533
|
return {
|
|
8534
8534
|
prefixCls: X,
|
|
8535
8535
|
csp: Y
|
|
8536
8536
|
};
|
|
8537
|
-
}, [X, Y]), J = V,
|
|
8538
|
-
return U && (
|
|
8539
|
-
validateMessages:
|
|
8537
|
+
}, [X, Y]), J = V, ee = {};
|
|
8538
|
+
return U && (ee = ((k = U.Form) === null || k === void 0 ? void 0 : k.defaultValidateMessages) || ((j = d.default.Form) === null || j === void 0 ? void 0 : j.defaultValidateMessages) || {}), L && L.validateMessages && (ee = (0, n.default)((0, n.default)({}, ee), L.validateMessages)), Object.keys(ee).length > 0 && (J = /* @__PURE__ */ u.createElement(o.FormProvider, {
|
|
8539
|
+
validateMessages: ee
|
|
8540
8540
|
}, V)), U && (J = /* @__PURE__ */ u.createElement(l.default, {
|
|
8541
8541
|
locale: U,
|
|
8542
8542
|
_ANT_MARK__: l.ANT_MARK
|
|
8543
8543
|
}, J)), (X || Y) && (J = /* @__PURE__ */ u.createElement(a.default.Provider, {
|
|
8544
|
-
value:
|
|
8544
|
+
value: te
|
|
8545
8545
|
}, J)), H && (J = /* @__PURE__ */ u.createElement(x.SizeContextProvider, {
|
|
8546
8546
|
size: H
|
|
8547
8547
|
}, J)), E !== void 0 && (J = /* @__PURE__ */ u.createElement(y.DisabledContextProvider, {
|
|
@@ -9159,32 +9159,32 @@ function hasPrefixSuffix(e) {
|
|
|
9159
9159
|
}
|
|
9160
9160
|
}
|
|
9161
9161
|
var $ = /* @__PURE__ */ (0, d.forwardRef)(function(P, M) {
|
|
9162
|
-
var A, O, N, F = P.prefixCls, k = P.bordered, j = k === void 0 ? !0 : k, V = P.status, Y = P.size, W = P.disabled, L = P.onBlur, U = P.onFocus, H = P.suffix, G = P.allowClear, B = P.addonAfter, I = P.addonBefore, q = P.className, K = P.onChange, Q = b(P, ["prefixCls", "bordered", "status", "size", "disabled", "onBlur", "onFocus", "suffix", "allowClear", "addonAfter", "addonBefore", "className", "onChange"]), X = d.default.useContext(f.ConfigContext), E = X.getPrefixCls, T = X.direction, z = X.input, Z = E("input", F),
|
|
9162
|
+
var A, O, N, F = P.prefixCls, k = P.bordered, j = k === void 0 ? !0 : k, V = P.status, Y = P.size, W = P.disabled, L = P.onBlur, U = P.onFocus, H = P.suffix, G = P.allowClear, B = P.addonAfter, I = P.addonBefore, q = P.className, K = P.onChange, Q = b(P, ["prefixCls", "bordered", "status", "size", "disabled", "onBlur", "onFocus", "suffix", "allowClear", "addonAfter", "addonBefore", "className", "onChange"]), X = d.default.useContext(f.ConfigContext), E = X.getPrefixCls, T = X.direction, z = X.input, Z = E("input", F), te = (0, d.useRef)(null), J = (0, y.useCompactItemContext)(Z, T), ee = J.compactSize, re = J.compactItemClassnames, se = d.default.useContext(g.default), ye = ee || Y || se, _e = d.default.useContext(p.default), $e = W != null ? W : _e, Se = (0, d.useContext)(m.FormItemInputContext), ie = Se.status, ue = Se.hasFeedback, de = Se.feedbackIcon, fe = (0, x.getMergedStatus)(ie, V), oe = (0, _.hasPrefixSuffix)(P) || !!ue, pe = (0, d.useRef)(oe);
|
|
9163
9163
|
(0, d.useEffect)(function() {
|
|
9164
|
-
var
|
|
9165
|
-
oe && !
|
|
9164
|
+
var be;
|
|
9165
|
+
oe && !pe.current && process.env.NODE_ENV !== "production" && (0, h.default)(document.activeElement === ((be = te.current) === null || be === void 0 ? void 0 : be.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"), pe.current = oe;
|
|
9166
9166
|
}, [oe]);
|
|
9167
|
-
var
|
|
9168
|
-
|
|
9169
|
-
}, Ee = function(
|
|
9170
|
-
|
|
9171
|
-
},
|
|
9172
|
-
|
|
9173
|
-
}, le = (ue || H) && /* @__PURE__ */ d.default.createElement(d.default.Fragment, null, H, ue &&
|
|
9174
|
-
return (0, o.default)(G) === "object" && (G == null ? void 0 : G.clearIcon) ?
|
|
9167
|
+
var we = (0, v.default)(te, !0), ke = function(he) {
|
|
9168
|
+
we(), L == null || L(he);
|
|
9169
|
+
}, Ee = function(he) {
|
|
9170
|
+
we(), U == null || U(he);
|
|
9171
|
+
}, Me = function(he) {
|
|
9172
|
+
we(), K == null || K(he);
|
|
9173
|
+
}, le = (ue || H) && /* @__PURE__ */ d.default.createElement(d.default.Fragment, null, H, ue && de), ve;
|
|
9174
|
+
return (0, o.default)(G) === "object" && (G == null ? void 0 : G.clearIcon) ? ve = G : G && (ve = {
|
|
9175
9175
|
clearIcon: /* @__PURE__ */ d.default.createElement(s.default, null)
|
|
9176
9176
|
}), /* @__PURE__ */ d.default.createElement(l.default, (0, a.default)({
|
|
9177
|
-
ref: (0, c.composeRef)(M,
|
|
9177
|
+
ref: (0, c.composeRef)(M, te),
|
|
9178
9178
|
prefixCls: Z,
|
|
9179
9179
|
autoComplete: z == null ? void 0 : z.autoComplete
|
|
9180
9180
|
}, Q, {
|
|
9181
|
-
disabled:
|
|
9182
|
-
onBlur:
|
|
9181
|
+
disabled: $e || void 0,
|
|
9182
|
+
onBlur: ke,
|
|
9183
9183
|
onFocus: Ee,
|
|
9184
9184
|
suffix: le,
|
|
9185
|
-
allowClear:
|
|
9185
|
+
allowClear: ve,
|
|
9186
9186
|
className: (0, u.default)(q, re),
|
|
9187
|
-
onChange:
|
|
9187
|
+
onChange: Me,
|
|
9188
9188
|
addonAfter: B && /* @__PURE__ */ d.default.createElement(y.NoCompactStyle, null, /* @__PURE__ */ d.default.createElement(m.NoFormStyle, {
|
|
9189
9189
|
override: !0,
|
|
9190
9190
|
status: !0
|
|
@@ -9193,10 +9193,10 @@ function hasPrefixSuffix(e) {
|
|
|
9193
9193
|
override: !0,
|
|
9194
9194
|
status: !0
|
|
9195
9195
|
}, I)),
|
|
9196
|
-
inputClassName: (0, u.default)((A = {}, (0, n.default)(A, "".concat(Z, "-sm"),
|
|
9197
|
-
affixWrapperClassName: (0, u.default)((O = {}, (0, n.default)(O, "".concat(Z, "-affix-wrapper-sm"),
|
|
9196
|
+
inputClassName: (0, u.default)((A = {}, (0, n.default)(A, "".concat(Z, "-sm"), ye === "small"), (0, n.default)(A, "".concat(Z, "-lg"), ye === "large"), (0, n.default)(A, "".concat(Z, "-rtl"), T === "rtl"), (0, n.default)(A, "".concat(Z, "-borderless"), !j), A), !oe && (0, x.getStatusClassNames)(Z, fe)),
|
|
9197
|
+
affixWrapperClassName: (0, u.default)((O = {}, (0, n.default)(O, "".concat(Z, "-affix-wrapper-sm"), ye === "small"), (0, n.default)(O, "".concat(Z, "-affix-wrapper-lg"), ye === "large"), (0, n.default)(O, "".concat(Z, "-affix-wrapper-rtl"), T === "rtl"), (0, n.default)(O, "".concat(Z, "-affix-wrapper-borderless"), !j), O), (0, x.getStatusClassNames)("".concat(Z, "-affix-wrapper"), fe, ue)),
|
|
9198
9198
|
wrapperClassName: (0, u.default)((0, n.default)({}, "".concat(Z, "-group-rtl"), T === "rtl")),
|
|
9199
|
-
groupClassName: (0, u.default)((N = {}, (0, n.default)(N, "".concat(Z, "-group-wrapper-sm"),
|
|
9199
|
+
groupClassName: (0, u.default)((N = {}, (0, n.default)(N, "".concat(Z, "-group-wrapper-sm"), ye === "small"), (0, n.default)(N, "".concat(Z, "-group-wrapper-lg"), ye === "large"), (0, n.default)(N, "".concat(Z, "-group-wrapper-rtl"), T === "rtl"), N), (0, x.getStatusClassNames)("".concat(Z, "-group-wrapper"), fe, ue))
|
|
9200
9200
|
}));
|
|
9201
9201
|
}), S = $;
|
|
9202
9202
|
e.default = S;
|
|
@@ -9223,29 +9223,29 @@ function hasPrefixSuffix(e) {
|
|
|
9223
9223
|
return S ? O = C(M, A) : (0, u.default)(P || "").length < M.length && (0, u.default)(M || "").length > A && (O = P), O;
|
|
9224
9224
|
}
|
|
9225
9225
|
var D = /* @__PURE__ */ p.forwardRef(function(S, P) {
|
|
9226
|
-
var M, A = S.prefixCls, O = S.bordered, N = O === void 0 ? !0 : O, F = S.showCount, k = F === void 0 ? !1 : F, j = S.maxLength, V = S.className, Y = S.style, W = S.size, L = S.disabled, U = S.onCompositionStart, H = S.onCompositionEnd, G = S.onChange, B = S.status, I = b(S, ["prefixCls", "bordered", "showCount", "maxLength", "className", "style", "size", "disabled", "onCompositionStart", "onCompositionEnd", "onChange", "status"]), q = p.useContext(g.ConfigContext), K = q.getPrefixCls, Q = q.direction, X = p.useContext(y.default), E = p.useContext(m.default), T = L != null ? L : E, z = p.useContext(x.FormItemInputContext), Z = z.status,
|
|
9226
|
+
var M, A = S.prefixCls, O = S.bordered, N = O === void 0 ? !0 : O, F = S.showCount, k = F === void 0 ? !1 : F, j = S.maxLength, V = S.className, Y = S.style, W = S.size, L = S.disabled, U = S.onCompositionStart, H = S.onCompositionEnd, G = S.onChange, B = S.status, I = b(S, ["prefixCls", "bordered", "showCount", "maxLength", "className", "style", "size", "disabled", "onCompositionStart", "onCompositionEnd", "onChange", "status"]), q = p.useContext(g.ConfigContext), K = q.getPrefixCls, Q = q.direction, X = p.useContext(y.default), E = p.useContext(m.default), T = L != null ? L : E, z = p.useContext(x.FormItemInputContext), Z = z.status, te = z.hasFeedback, J = z.isFormItemInput, ee = z.feedbackIcon, re = (0, h.getMergedStatus)(Z, B), se = p.useRef(null), ye = p.useRef(null), _e = p.useState(!1), $e = (0, s.default)(_e, 2), Se = $e[0], ie = $e[1], ue = p.useRef(), de = p.useRef(0), fe = (0, d.default)(I.defaultValue, {
|
|
9227
9227
|
value: I.value
|
|
9228
|
-
}), oe = (0, s.default)(
|
|
9229
|
-
I.value === void 0 && (
|
|
9230
|
-
},
|
|
9231
|
-
|
|
9232
|
-
},
|
|
9228
|
+
}), oe = (0, s.default)(fe, 2), pe = oe[0], we = oe[1], ke = I.hidden, Ee = function(Fe, Pe) {
|
|
9229
|
+
I.value === void 0 && (we(Fe), Pe == null || Pe());
|
|
9230
|
+
}, Me = Number(j) > 0, le = function(Fe) {
|
|
9231
|
+
ie(!0), ue.current = pe, de.current = Fe.currentTarget.selectionStart, U == null || U(Fe);
|
|
9232
|
+
}, ve = function(Fe) {
|
|
9233
9233
|
var Pe;
|
|
9234
|
-
|
|
9234
|
+
ie(!1);
|
|
9235
9235
|
var De = Fe.currentTarget.value;
|
|
9236
|
-
if (
|
|
9237
|
-
var Le =
|
|
9236
|
+
if (Me) {
|
|
9237
|
+
var Le = de.current >= j + 1 || de.current === ((Pe = ue.current) === null || Pe === void 0 ? void 0 : Pe.length);
|
|
9238
9238
|
De = w(Le, ue.current, De, j);
|
|
9239
9239
|
}
|
|
9240
|
-
De !==
|
|
9241
|
-
},
|
|
9240
|
+
De !== pe && (Ee(De), (0, _.resolveOnChange)(Fe.currentTarget, Fe, G, De)), H == null || H(Fe);
|
|
9241
|
+
}, be = function(Fe) {
|
|
9242
9242
|
var Pe = Fe.target.value;
|
|
9243
|
-
if (!
|
|
9243
|
+
if (!Se && Me) {
|
|
9244
9244
|
var De = Fe.target.selectionStart >= j + 1 || Fe.target.selectionStart === Pe.length || !Fe.target.selectionStart;
|
|
9245
|
-
Pe = w(De,
|
|
9245
|
+
Pe = w(De, pe, Pe, j);
|
|
9246
9246
|
}
|
|
9247
9247
|
Ee(Pe), (0, _.resolveOnChange)(Fe.currentTarget, Fe, G, Pe);
|
|
9248
|
-
},
|
|
9248
|
+
}, he = function(Fe) {
|
|
9249
9249
|
var Pe, De, Le;
|
|
9250
9250
|
Ee(""), (Pe = se.current) === null || Pe === void 0 || Pe.focus(), (0, _.resolveOnChange)((Le = (De = se.current) === null || De === void 0 ? void 0 : De.resizableTextArea) === null || Le === void 0 ? void 0 : Le.textArea, Fe, G);
|
|
9251
9251
|
}, xe = K("input", A);
|
|
@@ -9263,7 +9263,7 @@ function hasPrefixSuffix(e) {
|
|
|
9263
9263
|
}
|
|
9264
9264
|
};
|
|
9265
9265
|
});
|
|
9266
|
-
var
|
|
9266
|
+
var Ce = /* @__PURE__ */ p.createElement(c.default, (0, o.default)({}, (0, f.default)(I, ["allowClear"]), {
|
|
9267
9267
|
disabled: T,
|
|
9268
9268
|
className: (0, l.default)((M = {}, (0, a.default)(M, "".concat(xe, "-borderless"), !N), (0, a.default)(M, V, V && !k), (0, a.default)(M, "".concat(xe, "-sm"), X === "small" || W === "small"), (0, a.default)(M, "".concat(xe, "-lg"), X === "large" || W === "large"), M), (0, h.getStatusClassNames)(xe, re)),
|
|
9269
9269
|
style: k ? {
|
|
@@ -9271,11 +9271,11 @@ function hasPrefixSuffix(e) {
|
|
|
9271
9271
|
} : Y,
|
|
9272
9272
|
prefixCls: xe,
|
|
9273
9273
|
onCompositionStart: le,
|
|
9274
|
-
onChange:
|
|
9275
|
-
onCompositionEnd:
|
|
9274
|
+
onChange: be,
|
|
9275
|
+
onCompositionEnd: ve,
|
|
9276
9276
|
ref: se
|
|
9277
|
-
})), Ae = (0, _.fixControlledValue)(
|
|
9278
|
-
!
|
|
9277
|
+
})), Ae = (0, _.fixControlledValue)(pe);
|
|
9278
|
+
!Se && Me && (I.value === null || I.value === void 0) && (Ae = C(Ae, j));
|
|
9279
9279
|
var Ve = /* @__PURE__ */ p.createElement(v.default, (0, o.default)({
|
|
9280
9280
|
disabled: T
|
|
9281
9281
|
}, I, {
|
|
@@ -9283,27 +9283,27 @@ function hasPrefixSuffix(e) {
|
|
|
9283
9283
|
direction: Q,
|
|
9284
9284
|
inputType: "text",
|
|
9285
9285
|
value: Ae,
|
|
9286
|
-
element:
|
|
9287
|
-
handleReset:
|
|
9288
|
-
ref:
|
|
9286
|
+
element: Ce,
|
|
9287
|
+
handleReset: he,
|
|
9288
|
+
ref: ye,
|
|
9289
9289
|
bordered: N,
|
|
9290
9290
|
status: B,
|
|
9291
9291
|
style: k ? void 0 : Y
|
|
9292
9292
|
}));
|
|
9293
|
-
if (k ||
|
|
9293
|
+
if (k || te) {
|
|
9294
9294
|
var Ie, je = (0, u.default)(Ae).length, Ke = "";
|
|
9295
9295
|
return (0, n.default)(k) === "object" ? Ke = k.formatter({
|
|
9296
9296
|
value: Ae,
|
|
9297
9297
|
count: je,
|
|
9298
9298
|
maxLength: j
|
|
9299
|
-
}) : Ke = "".concat(je).concat(
|
|
9300
|
-
hidden:
|
|
9301
|
-
className: (0, l.default)("".concat(xe, "-textarea"), (Ie = {}, (0, a.default)(Ie, "".concat(xe, "-textarea-rtl"), Q === "rtl"), (0, a.default)(Ie, "".concat(xe, "-textarea-show-count"), k), (0, a.default)(Ie, "".concat(xe, "-textarea-in-form-item"), J), Ie), (0, h.getStatusClassNames)("".concat(xe, "-textarea"), re,
|
|
9299
|
+
}) : Ke = "".concat(je).concat(Me ? " / ".concat(j) : ""), /* @__PURE__ */ p.createElement("div", {
|
|
9300
|
+
hidden: ke,
|
|
9301
|
+
className: (0, l.default)("".concat(xe, "-textarea"), (Ie = {}, (0, a.default)(Ie, "".concat(xe, "-textarea-rtl"), Q === "rtl"), (0, a.default)(Ie, "".concat(xe, "-textarea-show-count"), k), (0, a.default)(Ie, "".concat(xe, "-textarea-in-form-item"), J), Ie), (0, h.getStatusClassNames)("".concat(xe, "-textarea"), re, te), V),
|
|
9302
9302
|
style: Y,
|
|
9303
9303
|
"data-count": Ke
|
|
9304
|
-
}, Ve,
|
|
9304
|
+
}, Ve, te && /* @__PURE__ */ p.createElement("span", {
|
|
9305
9305
|
className: "".concat(xe, "-textarea-suffix")
|
|
9306
|
-
},
|
|
9306
|
+
}, ee));
|
|
9307
9307
|
}
|
|
9308
9308
|
return Ve;
|
|
9309
9309
|
}), $ = D;
|
|
@@ -10441,14 +10441,14 @@ function require_stream_writable() {
|
|
|
10441
10441
|
q.length += z;
|
|
10442
10442
|
var Z = q.length < q.highWaterMark;
|
|
10443
10443
|
if (Z || (q.needDrain = !0), q.writing || q.corked) {
|
|
10444
|
-
var
|
|
10444
|
+
var te = q.lastBufferedRequest;
|
|
10445
10445
|
q.lastBufferedRequest = {
|
|
10446
10446
|
chunk: Q,
|
|
10447
10447
|
encoding: X,
|
|
10448
10448
|
isBuf: K,
|
|
10449
10449
|
callback: E,
|
|
10450
10450
|
next: null
|
|
10451
|
-
},
|
|
10451
|
+
}, te ? te.next = q.lastBufferedRequest : q.bufferedRequest = q.lastBufferedRequest, q.bufferedRequestCount += 1;
|
|
10452
10452
|
} else
|
|
10453
10453
|
O(I, q, !1, z, Q, X, E);
|
|
10454
10454
|
return Z;
|
|
@@ -10490,8 +10490,8 @@ function require_stream_writable() {
|
|
|
10490
10490
|
X.allBuffers = z, O(I, q, !0, q.length, X, "", E.finish), q.pendingcb++, q.lastBufferedRequest = null, E.next ? (q.corkedRequestsFree = E.next, E.next = null) : q.corkedRequestsFree = new e(q), q.bufferedRequestCount = 0;
|
|
10491
10491
|
} else {
|
|
10492
10492
|
for (; K; ) {
|
|
10493
|
-
var Z = K.chunk,
|
|
10494
|
-
if (O(I, q, !1,
|
|
10493
|
+
var Z = K.chunk, te = K.encoding, J = K.callback, ee = q.objectMode ? 1 : Z.length;
|
|
10494
|
+
if (O(I, q, !1, ee, Z, te, J), K = K.next, q.bufferedRequestCount--, q.writing)
|
|
10495
10495
|
break;
|
|
10496
10496
|
}
|
|
10497
10497
|
K === null && (q.lastBufferedRequest = null);
|
|
@@ -11019,15 +11019,15 @@ function require_stream_readable() {
|
|
|
11019
11019
|
}, S.prototype.unshift = function(E) {
|
|
11020
11020
|
return P(this, E, null, !0, !1);
|
|
11021
11021
|
};
|
|
11022
|
-
function P(E, T, z, Z,
|
|
11022
|
+
function P(E, T, z, Z, te) {
|
|
11023
11023
|
l("readableAddChunk", T);
|
|
11024
11024
|
var J = E._readableState;
|
|
11025
11025
|
if (T === null)
|
|
11026
11026
|
J.reading = !1, k(E, J);
|
|
11027
11027
|
else {
|
|
11028
|
-
var
|
|
11029
|
-
if (
|
|
11030
|
-
C(E,
|
|
11028
|
+
var ee;
|
|
11029
|
+
if (te || (ee = A(J, T)), ee)
|
|
11030
|
+
C(E, ee);
|
|
11031
11031
|
else if (J.objectMode || T && T.length > 0)
|
|
11032
11032
|
if (typeof T != "string" && !J.objectMode && Object.getPrototypeOf(T) !== n.prototype && (T = o(T)), Z)
|
|
11033
11033
|
J.endEmitted ? C(E, new h()) : M(E, J, T, !0);
|
|
@@ -11076,8 +11076,8 @@ function require_stream_readable() {
|
|
|
11076
11076
|
return T.length === 0 && K(this), null;
|
|
11077
11077
|
var Z = T.needReadable;
|
|
11078
11078
|
l("need readable", Z), (T.length === 0 || T.length - E < T.highWaterMark) && (Z = !0, l("length less than watermark", Z)), T.ended || T.reading ? (Z = !1, l("reading or ended", Z)) : Z && (l("do read"), T.reading = !0, T.sync = !0, T.length === 0 && (T.needReadable = !0), this._read(T.highWaterMark), T.sync = !1, T.reading || (E = F(z, T)));
|
|
11079
|
-
var
|
|
11080
|
-
return E > 0 ?
|
|
11079
|
+
var te;
|
|
11080
|
+
return E > 0 ? te = q(E, T) : te = null, te === null ? (T.needReadable = T.length <= T.highWaterMark, E = 0) : (T.length -= E, T.awaitDrain = 0), T.length === 0 && (T.ended || (T.needReadable = !0), z !== E && T.ended && K(this)), te !== null && this.emit("data", te), te;
|
|
11081
11081
|
};
|
|
11082
11082
|
function k(E, T) {
|
|
11083
11083
|
if (l("onEofChunk"), !T.ended) {
|
|
@@ -11123,39 +11123,39 @@ function require_stream_readable() {
|
|
|
11123
11123
|
break;
|
|
11124
11124
|
}
|
|
11125
11125
|
Z.pipesCount += 1, l("pipe count=%d opts=%j", Z.pipesCount, T);
|
|
11126
|
-
var
|
|
11127
|
-
Z.endEmitted ? process.nextTick(J) : z.once("end", J), E.on("unpipe",
|
|
11128
|
-
function
|
|
11129
|
-
l("onunpipe"),
|
|
11126
|
+
var te = (!T || T.end !== !1) && E !== process.stdout && E !== process.stderr, J = te ? re : de;
|
|
11127
|
+
Z.endEmitted ? process.nextTick(J) : z.once("end", J), E.on("unpipe", ee);
|
|
11128
|
+
function ee(fe, oe) {
|
|
11129
|
+
l("onunpipe"), fe === z && oe && oe.hasUnpiped === !1 && (oe.hasUnpiped = !0, _e());
|
|
11130
11130
|
}
|
|
11131
11131
|
function re() {
|
|
11132
11132
|
l("onend"), E.end();
|
|
11133
11133
|
}
|
|
11134
11134
|
var se = L(z);
|
|
11135
11135
|
E.on("drain", se);
|
|
11136
|
-
var
|
|
11137
|
-
function
|
|
11138
|
-
l("cleanup"), E.removeListener("close",
|
|
11136
|
+
var ye = !1;
|
|
11137
|
+
function _e() {
|
|
11138
|
+
l("cleanup"), E.removeListener("close", ie), E.removeListener("finish", ue), E.removeListener("drain", se), E.removeListener("error", Se), E.removeListener("unpipe", ee), z.removeListener("end", re), z.removeListener("end", de), z.removeListener("data", $e), ye = !0, Z.awaitDrain && (!E._writableState || E._writableState.needDrain) && se();
|
|
11139
11139
|
}
|
|
11140
|
-
z.on("data",
|
|
11141
|
-
function
|
|
11140
|
+
z.on("data", $e);
|
|
11141
|
+
function $e(fe) {
|
|
11142
11142
|
l("ondata");
|
|
11143
|
-
var oe = E.write(
|
|
11144
|
-
l("dest.write", oe), oe === !1 && ((Z.pipesCount === 1 && Z.pipes === E || Z.pipesCount > 1 && X(Z.pipes, E) !== -1) && !
|
|
11143
|
+
var oe = E.write(fe);
|
|
11144
|
+
l("dest.write", oe), oe === !1 && ((Z.pipesCount === 1 && Z.pipes === E || Z.pipesCount > 1 && X(Z.pipes, E) !== -1) && !ye && (l("false write response, pause", Z.awaitDrain), Z.awaitDrain++), z.pause());
|
|
11145
11145
|
}
|
|
11146
|
-
function
|
|
11147
|
-
l("onerror",
|
|
11146
|
+
function Se(fe) {
|
|
11147
|
+
l("onerror", fe), de(), E.removeListener("error", Se), t(E, "error") === 0 && C(E, fe);
|
|
11148
11148
|
}
|
|
11149
|
-
D(E, "error",
|
|
11150
|
-
function
|
|
11151
|
-
E.removeListener("finish", ue),
|
|
11149
|
+
D(E, "error", Se);
|
|
11150
|
+
function ie() {
|
|
11151
|
+
E.removeListener("finish", ue), de();
|
|
11152
11152
|
}
|
|
11153
|
-
E.once("close",
|
|
11153
|
+
E.once("close", ie);
|
|
11154
11154
|
function ue() {
|
|
11155
|
-
l("onfinish"), E.removeListener("close",
|
|
11155
|
+
l("onfinish"), E.removeListener("close", ie), de();
|
|
11156
11156
|
}
|
|
11157
11157
|
E.once("finish", ue);
|
|
11158
|
-
function
|
|
11158
|
+
function de() {
|
|
11159
11159
|
l("unpipe"), z.unpipe(E);
|
|
11160
11160
|
}
|
|
11161
11161
|
return E.emit("pipe", z), Z.flowing || (l("pipe resume"), z.resume()), E;
|
|
@@ -11175,16 +11175,16 @@ function require_stream_readable() {
|
|
|
11175
11175
|
if (T.pipesCount === 1)
|
|
11176
11176
|
return E && E !== T.pipes ? this : (E || (E = T.pipes), T.pipes = null, T.pipesCount = 0, T.flowing = !1, E && E.emit("unpipe", this, z), this);
|
|
11177
11177
|
if (!E) {
|
|
11178
|
-
var Z = T.pipes,
|
|
11178
|
+
var Z = T.pipes, te = T.pipesCount;
|
|
11179
11179
|
T.pipes = null, T.pipesCount = 0, T.flowing = !1;
|
|
11180
|
-
for (var J = 0; J <
|
|
11180
|
+
for (var J = 0; J < te; J++)
|
|
11181
11181
|
Z[J].emit("unpipe", this, {
|
|
11182
11182
|
hasUnpiped: !1
|
|
11183
11183
|
});
|
|
11184
11184
|
return this;
|
|
11185
11185
|
}
|
|
11186
|
-
var
|
|
11187
|
-
return
|
|
11186
|
+
var ee = X(T.pipes, E);
|
|
11187
|
+
return ee === -1 ? this : (T.pipes.splice(ee, 1), T.pipesCount -= 1, T.pipesCount === 1 && (T.pipes = T.pipes[0]), E.emit("unpipe", this, z), this);
|
|
11188
11188
|
}, S.prototype.on = function(E, T) {
|
|
11189
11189
|
var z = r.prototype.on.call(this, E, T), Z = this._readableState;
|
|
11190
11190
|
return E === "data" ? (Z.readableListening = this.listenerCount("readable") > 0, Z.flowing !== !1 && this.resume()) : E === "readable" && !Z.endEmitted && !Z.readableListening && (Z.readableListening = Z.needReadable = !0, Z.flowing = !1, Z.emittedReadable = !1, l("on readable", Z.length, Z.reading), Z.length ? j(this) : Z.reading || process.nextTick(H, this)), z;
|
|
@@ -11224,26 +11224,26 @@ function require_stream_readable() {
|
|
|
11224
11224
|
var T = this, z = this._readableState, Z = !1;
|
|
11225
11225
|
E.on("end", function() {
|
|
11226
11226
|
if (l("wrapped end"), z.decoder && !z.ended) {
|
|
11227
|
-
var
|
|
11228
|
-
|
|
11227
|
+
var ee = z.decoder.end();
|
|
11228
|
+
ee && ee.length && T.push(ee);
|
|
11229
11229
|
}
|
|
11230
11230
|
T.push(null);
|
|
11231
|
-
}), E.on("data", function(
|
|
11232
|
-
if (l("wrapped data"), z.decoder && (
|
|
11233
|
-
var re = T.push(
|
|
11231
|
+
}), E.on("data", function(ee) {
|
|
11232
|
+
if (l("wrapped data"), z.decoder && (ee = z.decoder.write(ee)), !(z.objectMode && ee == null) && !(!z.objectMode && (!ee || !ee.length))) {
|
|
11233
|
+
var re = T.push(ee);
|
|
11234
11234
|
re || (Z = !0, E.pause());
|
|
11235
11235
|
}
|
|
11236
11236
|
});
|
|
11237
|
-
for (var
|
|
11238
|
-
this[
|
|
11237
|
+
for (var te in E)
|
|
11238
|
+
this[te] === void 0 && typeof E[te] == "function" && (this[te] = function(re) {
|
|
11239
11239
|
return function() {
|
|
11240
11240
|
return E[re].apply(E, arguments);
|
|
11241
11241
|
};
|
|
11242
|
-
}(
|
|
11242
|
+
}(te));
|
|
11243
11243
|
for (var J = 0; J < w.length; J++)
|
|
11244
11244
|
E.on(w[J], this.emit.bind(this, w[J]));
|
|
11245
|
-
return this._read = function(
|
|
11246
|
-
l("wrapped _read",
|
|
11245
|
+
return this._read = function(ee) {
|
|
11246
|
+
l("wrapped _read", ee), Z && (Z = !1, E.resume());
|
|
11247
11247
|
}, this;
|
|
11248
11248
|
}, typeof Symbol == "function" && (S.prototype[Symbol.asyncIterator] = function() {
|
|
11249
11249
|
return _ === void 0 && (_ = requireAsync_iterator()), _(this);
|
|
@@ -14412,23 +14412,23 @@ const transformPlainMany2Ones = ({
|
|
|
14412
14412
|
context: c
|
|
14413
14413
|
});
|
|
14414
14414
|
if (Y(J.length), d == null || d(J.length), J.length > 0) {
|
|
14415
|
-
const
|
|
14415
|
+
const ee = J.map((Se) => Se == null ? void 0 : Se[0]), { colors: re } = getTree(f), se = await ConnectionProvider.getHandler().readEvalUiObjects({
|
|
14416
14416
|
model: t,
|
|
14417
|
-
ids:
|
|
14417
|
+
ids: ee,
|
|
14418
14418
|
arch: f == null ? void 0 : f.arch,
|
|
14419
14419
|
fields: f.field_parent ? { ...f.fields, [f.field_parent]: {} } : f.fields,
|
|
14420
14420
|
context: c,
|
|
14421
14421
|
attrs: re && {
|
|
14422
14422
|
colors: re
|
|
14423
14423
|
}
|
|
14424
|
-
}),
|
|
14425
|
-
B.current = [...
|
|
14426
|
-
const
|
|
14427
|
-
resultsToSort:
|
|
14424
|
+
}), ye = se[0];
|
|
14425
|
+
B.current = [...ye], H(getColorMap(se[1]));
|
|
14426
|
+
const _e = ye.map((Se) => Se.id), $e = g !== void 0 ? sortResults({
|
|
14427
|
+
resultsToSort: ye,
|
|
14428
14428
|
sorter: g,
|
|
14429
14429
|
fields: { ...f.fields, ...p.fields }
|
|
14430
14430
|
}) : [...B.current];
|
|
14431
|
-
I(
|
|
14431
|
+
I($e), _e.length > 0 ? y == null || y(0) : y == null || y(void 0);
|
|
14432
14432
|
} else
|
|
14433
14433
|
I([]), y == null || y(void 0);
|
|
14434
14434
|
l.current = !0;
|
|
@@ -14446,29 +14446,29 @@ const transformPlainMany2Ones = ({
|
|
|
14446
14446
|
d
|
|
14447
14447
|
]), Q = useCallback(
|
|
14448
14448
|
async (J) => {
|
|
14449
|
-
const { params:
|
|
14449
|
+
const { params: ee, newOffset: re } = J || {}, se = mergeParams(ee || w, v), { colors: ye } = getTree(f), { totalItems: _e, results: $e, attrsEvaluated: Se } = await ConnectionProvider.getHandler().searchForTree({
|
|
14450
14450
|
params: se,
|
|
14451
14451
|
limit: G.current,
|
|
14452
14452
|
offset: re || k,
|
|
14453
14453
|
model: t,
|
|
14454
14454
|
fields: f.field_parent ? { ...f.fields, [f.field_parent]: {} } : f.fields,
|
|
14455
14455
|
context: c,
|
|
14456
|
-
attrs:
|
|
14456
|
+
attrs: ye && { colors: ye }
|
|
14457
14457
|
});
|
|
14458
|
-
H(getColorMap(
|
|
14459
|
-
const
|
|
14460
|
-
resultsToSort:
|
|
14458
|
+
H(getColorMap(Se)), B.current = [...$e];
|
|
14459
|
+
const ie = g !== void 0 ? sortResults({
|
|
14460
|
+
resultsToSort: $e,
|
|
14461
14461
|
sorter: g,
|
|
14462
14462
|
fields: { ...f.fields, ...p.fields }
|
|
14463
14463
|
}) : [...B.current];
|
|
14464
|
-
if (I(
|
|
14465
|
-
const
|
|
14466
|
-
(
|
|
14464
|
+
if (I(ie), h && ie.length > 0) {
|
|
14465
|
+
const de = ie.findIndex(
|
|
14466
|
+
(fe) => _ === fe.id
|
|
14467
14467
|
);
|
|
14468
|
-
|
|
14468
|
+
de === -1 ? y == null || y(0) : y == null || y(de);
|
|
14469
14469
|
} else
|
|
14470
14470
|
y == null || y(void 0);
|
|
14471
|
-
const ue = await
|
|
14471
|
+
const ue = await _e;
|
|
14472
14472
|
Y(ue), d == null || d(ue);
|
|
14473
14473
|
},
|
|
14474
14474
|
[
|
|
@@ -14491,8 +14491,8 @@ const transformPlainMany2Ones = ({
|
|
|
14491
14491
|
async (J) => {
|
|
14492
14492
|
try {
|
|
14493
14493
|
S(!0), s == null || s(!0), u && !l.current ? await K() : await Q(J);
|
|
14494
|
-
} catch (
|
|
14495
|
-
O(
|
|
14494
|
+
} catch (ee) {
|
|
14495
|
+
O(ee.message);
|
|
14496
14496
|
} finally {
|
|
14497
14497
|
S(!1), M(!1), s == null || s(!1);
|
|
14498
14498
|
}
|
|
@@ -14521,20 +14521,20 @@ const transformPlainMany2Ones = ({
|
|
|
14521
14521
|
), E = useCallback(
|
|
14522
14522
|
(J) => {
|
|
14523
14523
|
m == null || m(J);
|
|
14524
|
-
const
|
|
14524
|
+
const ee = J !== void 0 ? sortResults({
|
|
14525
14525
|
resultsToSort: q(),
|
|
14526
14526
|
sorter: J,
|
|
14527
14527
|
fields: { ...f.fields, ...p.fields }
|
|
14528
14528
|
}) : [...B.current];
|
|
14529
|
-
I(
|
|
14529
|
+
I(ee);
|
|
14530
14530
|
},
|
|
14531
14531
|
[m, q, f, p, I]
|
|
14532
14532
|
), T = useCallback(
|
|
14533
14533
|
(J) => {
|
|
14534
|
-
const { params:
|
|
14535
|
-
$ || (r == null || r(void 0), n == null || n([]), D == null || D(re), a == null || a(
|
|
14536
|
-
params:
|
|
14537
|
-
newOffset:
|
|
14534
|
+
const { params: ee, searchValues: re, limit: se, offset: ye } = J;
|
|
14535
|
+
$ || (r == null || r(void 0), n == null || n([]), D == null || D(re), a == null || a(ee), o == null || o(!1), M(!0), O(void 0), F(1), se && (G.current = se, C == null || C(se)), ye && j(ye), X({
|
|
14536
|
+
params: ee,
|
|
14537
|
+
newOffset: ye
|
|
14538
14538
|
}));
|
|
14539
14539
|
},
|
|
14540
14540
|
[
|
|
@@ -14566,11 +14566,11 @@ const transformPlainMany2Ones = ({
|
|
|
14566
14566
|
F,
|
|
14567
14567
|
C,
|
|
14568
14568
|
b
|
|
14569
|
-
]),
|
|
14569
|
+
]), te = useCallback(
|
|
14570
14570
|
async (J) => {
|
|
14571
|
-
const
|
|
14571
|
+
const ee = J[(f == null ? void 0 : f.field_parent) || "child_id"], re = await ConnectionProvider.getHandler().readObjects({
|
|
14572
14572
|
model: t,
|
|
14573
|
-
ids:
|
|
14573
|
+
ids: ee,
|
|
14574
14574
|
fields: f.field_parent ? { ...f.fields, [f.field_parent]: {} } : f.fields,
|
|
14575
14575
|
context: c
|
|
14576
14576
|
});
|
|
@@ -14591,7 +14591,7 @@ const transformPlainMany2Ones = ({
|
|
|
14591
14591
|
getResults: q,
|
|
14592
14592
|
requestPageChange: z,
|
|
14593
14593
|
changeSort: E,
|
|
14594
|
-
fetchChildrenForRecord:
|
|
14594
|
+
fetchChildrenForRecord: te,
|
|
14595
14595
|
colorsForResults: U,
|
|
14596
14596
|
totalItems: V
|
|
14597
14597
|
};
|
|
@@ -14622,11 +14622,11 @@ const transformPlainMany2Ones = ({
|
|
|
14622
14622
|
setSearchTreeNameSearch: D,
|
|
14623
14623
|
goToResourceId: $,
|
|
14624
14624
|
limit: S
|
|
14625
|
-
} = e, [P, M] = useState$1(!1), [A, O] = useState$1(!1), [N, F] = useState$1(!1), [k, j] = useState$1(!0), [V, Y] = useState$1(!0), [W, L] = useState$1([]), [U, H] = useState$1(!1), [G, B] = useState$1([]), [I, q] = useState$1(!1), [K, Q] = useState$1(!0), [X, E] = useState$1(), [T, z] = useState$1({}), [Z,
|
|
14625
|
+
} = e, [P, M] = useState$1(!1), [A, O] = useState$1(!1), [N, F] = useState$1(!1), [k, j] = useState$1(!0), [V, Y] = useState$1(!0), [W, L] = useState$1([]), [U, H] = useState$1(!1), [G, B] = useState$1([]), [I, q] = useState$1(!1), [K, Q] = useState$1(!0), [X, E] = useState$1(), [T, z] = useState$1({}), [Z, te] = useState$1(S !== void 0 ? S : DEFAULT_SEARCH_LIMIT$1), [J, ee] = useState$1(n);
|
|
14626
14626
|
useEffect(() => {
|
|
14627
14627
|
p && p.length > 0 && !g && (m == null || m(0), d == null || d(p[0].id));
|
|
14628
14628
|
}, [p]), useEffect(() => {
|
|
14629
|
-
|
|
14629
|
+
te(S !== void 0 ? S : DEFAULT_SEARCH_LIMIT$1);
|
|
14630
14630
|
}, [S]), useEffect(() => {
|
|
14631
14631
|
o.length === 1 ? E(o[0]) : o.length > 1 && E(o.filter((se) => se.view_id !== r.view_id)[0]);
|
|
14632
14632
|
}, [o]), useEffect(() => {
|
|
@@ -14687,8 +14687,8 @@ const transformPlainMany2Ones = ({
|
|
|
14687
14687
|
searchValues: T,
|
|
14688
14688
|
setSearchValues: z,
|
|
14689
14689
|
limit: Z,
|
|
14690
|
-
setLimit:
|
|
14691
|
-
setTitle:
|
|
14690
|
+
setLimit: te,
|
|
14691
|
+
setTitle: ee
|
|
14692
14692
|
},
|
|
14693
14693
|
children: t
|
|
14694
14694
|
});
|
|
@@ -15093,23 +15093,23 @@ function Form(e, t) {
|
|
|
15093
15093
|
activeId: T,
|
|
15094
15094
|
getPlainValues: z
|
|
15095
15095
|
} = E || {}, Z = useContext(ActionViewContext), {
|
|
15096
|
-
setFormIsSaving:
|
|
15096
|
+
setFormIsSaving: te = void 0,
|
|
15097
15097
|
setFormHasChanges: J = void 0,
|
|
15098
|
-
setCurrentId:
|
|
15098
|
+
setCurrentId: ee = void 0,
|
|
15099
15099
|
setFormIsLoading: re = void 0,
|
|
15100
15100
|
setAttachments: se = void 0,
|
|
15101
|
-
title:
|
|
15102
|
-
setTitle:
|
|
15103
|
-
} = (b ? Z : {}) || {},
|
|
15104
|
-
processAction:
|
|
15105
|
-
globalValues:
|
|
15106
|
-
} =
|
|
15101
|
+
title: ye = void 0,
|
|
15102
|
+
setTitle: _e = void 0
|
|
15103
|
+
} = (b ? Z : {}) || {}, $e = useContext(ContentRootContext), {
|
|
15104
|
+
processAction: Se,
|
|
15105
|
+
globalValues: ie
|
|
15106
|
+
} = $e || {};
|
|
15107
15107
|
useImperativeHandle(t, () => ({
|
|
15108
15108
|
submitForm: Le,
|
|
15109
|
-
getFields:
|
|
15110
|
-
getValues:
|
|
15111
|
-
getPlainValues:
|
|
15112
|
-
getContext:
|
|
15109
|
+
getFields: pe,
|
|
15110
|
+
getValues: we,
|
|
15111
|
+
getPlainValues: ke,
|
|
15112
|
+
getContext: Me,
|
|
15113
15113
|
fetchValues: Ie,
|
|
15114
15114
|
cancelUnsavedChanges: je,
|
|
15115
15115
|
clearAndReload: () => {
|
|
@@ -15129,44 +15129,44 @@ function Form(e, t) {
|
|
|
15129
15129
|
}), G(!1));
|
|
15130
15130
|
}, [H]);
|
|
15131
15131
|
const ue = (ae, ne, ce) => {
|
|
15132
|
-
J == null || J(!1),
|
|
15133
|
-
},
|
|
15134
|
-
|
|
15135
|
-
},
|
|
15136
|
-
|
|
15132
|
+
J == null || J(!1), te == null || te(!1), o == null || o(ae, ne, ce), ee == null || ee(ae);
|
|
15133
|
+
}, de = () => {
|
|
15134
|
+
te == null || te(!1), a == null || a();
|
|
15135
|
+
}, fe = (ae) => {
|
|
15136
|
+
te == null || te(!1), c == null || c(ae);
|
|
15137
15137
|
};
|
|
15138
15138
|
function oe() {
|
|
15139
15139
|
return n || B.current;
|
|
15140
15140
|
}
|
|
15141
|
-
function
|
|
15141
|
+
function pe() {
|
|
15142
15142
|
return V;
|
|
15143
15143
|
}
|
|
15144
|
-
function
|
|
15144
|
+
function we() {
|
|
15145
15145
|
const ae = {
|
|
15146
|
-
...
|
|
15146
|
+
...he(V),
|
|
15147
15147
|
...le()
|
|
15148
15148
|
};
|
|
15149
15149
|
for (const ne in ae)
|
|
15150
15150
|
ae[ne] === void 0 && delete ae[ne];
|
|
15151
15151
|
return ae;
|
|
15152
15152
|
}
|
|
15153
|
-
function
|
|
15154
|
-
const ae =
|
|
15153
|
+
function ke() {
|
|
15154
|
+
const ae = we(), ne = pe();
|
|
15155
15155
|
let ce = {};
|
|
15156
|
-
return Object.keys(ae).forEach((
|
|
15157
|
-
const Oe = ae[
|
|
15158
|
-
ne[
|
|
15156
|
+
return Object.keys(ae).forEach((me) => {
|
|
15157
|
+
const Oe = ae[me];
|
|
15158
|
+
ne[me] && ne[me].type === "many2one" && Oe && Array.isArray(Oe) && Oe.length === 2 ? ce[me] = Oe[0] : ne[me] && (ne[me].type === "one2many" || ne[me].type === "many2many") && Oe && Oe.items ? ce[me] = Oe.items.filter((Ye) => Ye.operation !== "pendingRemove").map((Ye) => Ye.id) : ce[me] = Oe;
|
|
15159
15159
|
}), ce;
|
|
15160
15160
|
}
|
|
15161
15161
|
function Ee() {
|
|
15162
15162
|
const ae = {
|
|
15163
|
-
...
|
|
15163
|
+
...he(V)
|
|
15164
15164
|
};
|
|
15165
15165
|
for (const ne in ae)
|
|
15166
15166
|
ae[ne] === void 0 && delete ae[ne];
|
|
15167
15167
|
return ae;
|
|
15168
15168
|
}
|
|
15169
|
-
function
|
|
15169
|
+
function Me() {
|
|
15170
15170
|
return {
|
|
15171
15171
|
...h,
|
|
15172
15172
|
...O == null ? void 0 : O.context
|
|
@@ -15178,10 +15178,10 @@ function Form(e, t) {
|
|
|
15178
15178
|
active_id: oe(),
|
|
15179
15179
|
active_ids: [oe()],
|
|
15180
15180
|
parent_id: T,
|
|
15181
|
-
...
|
|
15181
|
+
...ie
|
|
15182
15182
|
};
|
|
15183
15183
|
}
|
|
15184
|
-
const
|
|
15184
|
+
const ve = async (ae) => {
|
|
15185
15185
|
const ne = oe() ? O == null ? void 0 : O.context : {};
|
|
15186
15186
|
return await ConnectionProvider.getHandler().defaultGet({
|
|
15187
15187
|
model: r,
|
|
@@ -15192,11 +15192,11 @@ function Form(e, t) {
|
|
|
15192
15192
|
},
|
|
15193
15193
|
extraValues: C
|
|
15194
15194
|
});
|
|
15195
|
-
},
|
|
15195
|
+
}, be = () => Object.keys(getTouchedValues({
|
|
15196
15196
|
source: I.current,
|
|
15197
|
-
target:
|
|
15197
|
+
target: he(V),
|
|
15198
15198
|
fields: V
|
|
15199
|
-
})).length !== 0,
|
|
15199
|
+
})).length !== 0, he = (ae) => {
|
|
15200
15200
|
const ne = F.getFieldsValue(!0);
|
|
15201
15201
|
return processValues(ne, ae);
|
|
15202
15202
|
}, xe = (ae, ne) => {
|
|
@@ -15208,7 +15208,7 @@ function Form(e, t) {
|
|
|
15208
15208
|
fields: V,
|
|
15209
15209
|
reset: !1
|
|
15210
15210
|
});
|
|
15211
|
-
},
|
|
15211
|
+
}, Ce = (ae) => F.getFieldsValue(!0)[ae];
|
|
15212
15212
|
async function Ae() {
|
|
15213
15213
|
try {
|
|
15214
15214
|
return await F.validateFields(), !1;
|
|
@@ -15236,13 +15236,13 @@ function Form(e, t) {
|
|
|
15236
15236
|
A(ne != null && ne.message ? ne.message + ne.stack : ne), re == null || re(!1);
|
|
15237
15237
|
}
|
|
15238
15238
|
}, Ie = async (ae) => {
|
|
15239
|
-
let ne, ce,
|
|
15240
|
-
re == null || re(!0), A(void 0), ae ? (ce = ae.fields,
|
|
15239
|
+
let ne, ce, me, Oe;
|
|
15240
|
+
re == null || re(!0), A(void 0), ae ? (ce = ae.fields, me = ae.arch) : (ce = V, me = k), g ? ne = g : {
|
|
15241
15241
|
values: ne,
|
|
15242
15242
|
defaultGetCalled: Oe
|
|
15243
15243
|
} = await Fe({
|
|
15244
15244
|
fields: ce,
|
|
15245
|
-
arch:
|
|
15245
|
+
arch: me
|
|
15246
15246
|
}), v && (ne = {
|
|
15247
15247
|
...getValuesForDomain(v),
|
|
15248
15248
|
...ne
|
|
@@ -15253,19 +15253,19 @@ function Form(e, t) {
|
|
|
15253
15253
|
isDefaultGet: Oe
|
|
15254
15254
|
}), Xe({
|
|
15255
15255
|
fields: ce,
|
|
15256
|
-
arch:
|
|
15256
|
+
arch: me,
|
|
15257
15257
|
values: ne
|
|
15258
15258
|
}), re == null || re(!1), J == null || J(!1), Oe && G(!0);
|
|
15259
15259
|
}, je = async () => new Promise(async (ae) => {
|
|
15260
|
-
|
|
15260
|
+
be() ? showDialog$6({
|
|
15261
15261
|
lang: $,
|
|
15262
15262
|
onOk: () => {
|
|
15263
|
-
|
|
15263
|
+
de == null || de(), ae(!0);
|
|
15264
15264
|
},
|
|
15265
15265
|
onCancel: () => {
|
|
15266
15266
|
ae(!1);
|
|
15267
15267
|
}
|
|
15268
|
-
}) : (
|
|
15268
|
+
}) : (de == null || de(), ae(!0));
|
|
15269
15269
|
}), Ke = async () => {
|
|
15270
15270
|
if (u) {
|
|
15271
15271
|
const ae = await ConnectionProvider.getHandler().getActionStringForModel(r);
|
|
@@ -15283,7 +15283,7 @@ function Form(e, t) {
|
|
|
15283
15283
|
values: ae,
|
|
15284
15284
|
fields: ne,
|
|
15285
15285
|
reset: ce,
|
|
15286
|
-
isDefaultGet:
|
|
15286
|
+
isDefaultGet: me = !1
|
|
15287
15287
|
}) => {
|
|
15288
15288
|
const Ye = {
|
|
15289
15289
|
...ce ? {} : F.getFieldsValue(!0),
|
|
@@ -15296,12 +15296,12 @@ function Form(e, t) {
|
|
|
15296
15296
|
value: gt
|
|
15297
15297
|
};
|
|
15298
15298
|
});
|
|
15299
|
-
|
|
15299
|
+
me || (q.current = Ze), F.setFields(st);
|
|
15300
15300
|
}, Fe = async ({
|
|
15301
15301
|
fields: ae,
|
|
15302
15302
|
arch: ne
|
|
15303
15303
|
}) => {
|
|
15304
|
-
let ce = {},
|
|
15304
|
+
let ce = {}, me = !1;
|
|
15305
15305
|
if (oe()) {
|
|
15306
15306
|
ce = (await ConnectionProvider.getHandler().readObjects({
|
|
15307
15307
|
model: r,
|
|
@@ -15312,15 +15312,15 @@ function Form(e, t) {
|
|
|
15312
15312
|
const Oe = await ConnectionProvider.getHandler().search({
|
|
15313
15313
|
params: [["res_model", "=", r], ["res_id", "=", oe()]],
|
|
15314
15314
|
fields: ["id", "name"],
|
|
15315
|
-
context:
|
|
15315
|
+
context: Me(),
|
|
15316
15316
|
model: "ir.attachment"
|
|
15317
15317
|
});
|
|
15318
15318
|
se == null || se(Oe);
|
|
15319
15319
|
} else
|
|
15320
|
-
se == null || se([]), ce = await
|
|
15320
|
+
se == null || se([]), ce = await ve(ae), me = !0;
|
|
15321
15321
|
return {
|
|
15322
15322
|
values: ce,
|
|
15323
|
-
defaultGetCalled:
|
|
15323
|
+
defaultGetCalled: me
|
|
15324
15324
|
};
|
|
15325
15325
|
}, Pe = async (ae) => {
|
|
15326
15326
|
const {
|
|
@@ -15329,7 +15329,7 @@ function Form(e, t) {
|
|
|
15329
15329
|
if (oe()) {
|
|
15330
15330
|
const ce = getTouchedValues({
|
|
15331
15331
|
source: I.current,
|
|
15332
|
-
target:
|
|
15332
|
+
target: he(V),
|
|
15333
15333
|
fields: V
|
|
15334
15334
|
});
|
|
15335
15335
|
await ConnectionProvider.getHandler().update({
|
|
@@ -15344,9 +15344,9 @@ function Form(e, t) {
|
|
|
15344
15344
|
...h,
|
|
15345
15345
|
...O == null ? void 0 : O.context
|
|
15346
15346
|
}
|
|
15347
|
-
}), I.current =
|
|
15347
|
+
}), I.current = he(V);
|
|
15348
15348
|
} else {
|
|
15349
|
-
const ce =
|
|
15349
|
+
const ce = he(V), me = await ConnectionProvider.getHandler().create({
|
|
15350
15350
|
model: r,
|
|
15351
15351
|
values: {
|
|
15352
15352
|
...ce,
|
|
@@ -15358,21 +15358,21 @@ function Form(e, t) {
|
|
|
15358
15358
|
...O == null ? void 0 : O.context
|
|
15359
15359
|
}
|
|
15360
15360
|
});
|
|
15361
|
-
B.current =
|
|
15361
|
+
B.current = me, I.current = ce;
|
|
15362
15362
|
}
|
|
15363
|
-
y && await y([oe()]), !x && ne && (ue == null || ue(oe(),
|
|
15363
|
+
y && await y([oe()]), !x && ne && (ue == null || ue(oe(), we(), Ee()));
|
|
15364
15364
|
}, De = async (ae) => {
|
|
15365
15365
|
const {
|
|
15366
15366
|
callOnSubmitSucceed: ne = !0
|
|
15367
15367
|
} = ae || {};
|
|
15368
|
-
!x && ne && (ue == null || ue(oe(),
|
|
15368
|
+
!x && ne && (ue == null || ue(oe(), we(), Ee()));
|
|
15369
15369
|
}, Le = async (ae) => {
|
|
15370
15370
|
let ne = !1;
|
|
15371
15371
|
const {
|
|
15372
15372
|
callOnSubmitSucceed: ce = !0
|
|
15373
15373
|
} = ae || {};
|
|
15374
|
-
if (Q.current = !0, A(void 0), !
|
|
15375
|
-
return Q.current = !1, J == null || J(!1),
|
|
15374
|
+
if (Q.current = !0, A(void 0), !be() && oe() && ce)
|
|
15375
|
+
return Q.current = !1, J == null || J(!1), de == null || de(), {
|
|
15376
15376
|
succeed: !0,
|
|
15377
15377
|
id: oe()
|
|
15378
15378
|
};
|
|
@@ -15381,17 +15381,17 @@ function Form(e, t) {
|
|
|
15381
15381
|
succeed: !1,
|
|
15382
15382
|
id: oe()
|
|
15383
15383
|
};
|
|
15384
|
-
P(!0),
|
|
15384
|
+
P(!0), te == null || te(!0);
|
|
15385
15385
|
try {
|
|
15386
15386
|
p === "api" ? await Pe(ae) : await De(ae), f && (B.current = void 0, qe({
|
|
15387
15387
|
values: {},
|
|
15388
15388
|
fields: V,
|
|
15389
15389
|
reset: !0
|
|
15390
15390
|
})), await Ie(), ne = !0, message$1.success(D("savedRegisters"));
|
|
15391
|
-
} catch (
|
|
15392
|
-
Q.current = !1, P(!1),
|
|
15391
|
+
} catch (me) {
|
|
15392
|
+
Q.current = !1, P(!1), te == null || te(!1), fe == null || fe(me), message$1.error(D("errorWhileSavingForm")), A(me != null && me.message ? me.message : me);
|
|
15393
15393
|
} finally {
|
|
15394
|
-
Q.current = !1,
|
|
15394
|
+
Q.current = !1, te == null || te(!1), P(!1);
|
|
15395
15395
|
}
|
|
15396
15396
|
return {
|
|
15397
15397
|
succeed: ne,
|
|
@@ -15403,14 +15403,14 @@ function Form(e, t) {
|
|
|
15403
15403
|
values: ce
|
|
15404
15404
|
}) => {
|
|
15405
15405
|
var Oe;
|
|
15406
|
-
const
|
|
15407
|
-
|
|
15406
|
+
const me = new Form$4(ae);
|
|
15407
|
+
me.parse(ne, {
|
|
15408
15408
|
readOnly: d,
|
|
15409
15409
|
values: convertToPlain2ManyValues({
|
|
15410
15410
|
...ce,
|
|
15411
15411
|
...le()
|
|
15412
15412
|
}, ae)
|
|
15413
|
-
}), N(
|
|
15413
|
+
}), N(me), me.string && me.string !== ye && (_e == null || _e(me.string)), W && me.string && ((Oe = W.setTitle) == null || Oe.call(W, me.string));
|
|
15414
15414
|
}, Qe = async ({
|
|
15415
15415
|
elementHasLostFocus: ae = !1
|
|
15416
15416
|
}) => {
|
|
@@ -15418,7 +15418,7 @@ function Form(e, t) {
|
|
|
15418
15418
|
return;
|
|
15419
15419
|
const ne = getTouchedValues({
|
|
15420
15420
|
source: q.current,
|
|
15421
|
-
target:
|
|
15421
|
+
target: he(V),
|
|
15422
15422
|
fields: V
|
|
15423
15423
|
}), ce = Object.keys(ne);
|
|
15424
15424
|
if (ce.length !== 0) {
|
|
@@ -15429,8 +15429,8 @@ function Form(e, t) {
|
|
|
15429
15429
|
}) && ae !== !0)
|
|
15430
15430
|
return;
|
|
15431
15431
|
{
|
|
15432
|
-
const
|
|
15433
|
-
q.current =
|
|
15432
|
+
const me = processValues(F.getFieldsValue(!0), V);
|
|
15433
|
+
q.current = me, l == null || l(me), J == null || J(!0), nt(ce);
|
|
15434
15434
|
}
|
|
15435
15435
|
}
|
|
15436
15436
|
}, dt = debounce_1(Qe, 100), nt = async (ae) => {
|
|
@@ -15448,13 +15448,13 @@ function Form(e, t) {
|
|
|
15448
15448
|
Xe({
|
|
15449
15449
|
fields: V,
|
|
15450
15450
|
arch: k,
|
|
15451
|
-
values:
|
|
15451
|
+
values: he(V)
|
|
15452
15452
|
});
|
|
15453
15453
|
return;
|
|
15454
15454
|
}
|
|
15455
15455
|
const ce = getOnChangePayload({
|
|
15456
15456
|
values: {
|
|
15457
|
-
...
|
|
15457
|
+
...he(V),
|
|
15458
15458
|
context: {
|
|
15459
15459
|
...h,
|
|
15460
15460
|
...O == null ? void 0 : O.context
|
|
@@ -15462,17 +15462,17 @@ function Form(e, t) {
|
|
|
15462
15462
|
},
|
|
15463
15463
|
parentValues: z == null ? void 0 : z(),
|
|
15464
15464
|
onChangeFieldActionArgs: ne.args
|
|
15465
|
-
}),
|
|
15465
|
+
}), me = await ConnectionProvider.getHandler().executeOnChange({
|
|
15466
15466
|
model: r,
|
|
15467
15467
|
action: ne.method,
|
|
15468
15468
|
ids: oe() ? [oe()] : [],
|
|
15469
15469
|
payload: ce,
|
|
15470
15470
|
fields: V
|
|
15471
15471
|
});
|
|
15472
|
-
if (
|
|
15472
|
+
if (me.value) {
|
|
15473
15473
|
const Oe = {
|
|
15474
|
-
...
|
|
15475
|
-
...
|
|
15474
|
+
...he(V),
|
|
15475
|
+
...me.value
|
|
15476
15476
|
};
|
|
15477
15477
|
Xe({
|
|
15478
15478
|
fields: V,
|
|
@@ -15484,24 +15484,24 @@ function Form(e, t) {
|
|
|
15484
15484
|
reset: !1
|
|
15485
15485
|
});
|
|
15486
15486
|
}
|
|
15487
|
-
if (
|
|
15487
|
+
if (me.warning && me.warning.title && me.warning.message && !K.current) {
|
|
15488
15488
|
const {
|
|
15489
15489
|
title: Oe,
|
|
15490
15490
|
message: Ye
|
|
15491
|
-
} =
|
|
15491
|
+
} = me.warning;
|
|
15492
15492
|
K.current = !0, showDialog$4(Oe, Ye, () => {
|
|
15493
15493
|
K.current = !1;
|
|
15494
15494
|
});
|
|
15495
15495
|
}
|
|
15496
|
-
if (
|
|
15496
|
+
if (me.domain && Object.keys(me.domain).length > 0) {
|
|
15497
15497
|
const Oe = mergeFieldsDomain({
|
|
15498
|
-
fieldsDomain:
|
|
15498
|
+
fieldsDomain: me.domain,
|
|
15499
15499
|
fields: V
|
|
15500
15500
|
});
|
|
15501
15501
|
Xe({
|
|
15502
15502
|
fields: Oe,
|
|
15503
15503
|
arch: k,
|
|
15504
|
-
values:
|
|
15504
|
+
values: he(Oe)
|
|
15505
15505
|
}), Y(Oe);
|
|
15506
15506
|
}
|
|
15507
15507
|
};
|
|
@@ -15520,20 +15520,20 @@ function Form(e, t) {
|
|
|
15520
15520
|
}
|
|
15521
15521
|
});
|
|
15522
15522
|
if (typeof ce == "object" && ce !== null && Object.keys(ce).length === 0 && x)
|
|
15523
|
-
ue == null || ue(oe(),
|
|
15523
|
+
ue == null || ue(oe(), we(), Ee());
|
|
15524
15524
|
else if (ce.type && ce.type === "ir.actions.act_window_close")
|
|
15525
|
-
ue == null || ue(oe(),
|
|
15525
|
+
ue == null || ue(oe(), we(), Ee());
|
|
15526
15526
|
else if (ce.type) {
|
|
15527
|
-
let
|
|
15528
|
-
ce.context && (
|
|
15527
|
+
let me = {};
|
|
15528
|
+
ce.context && (me = parseContext({
|
|
15529
15529
|
context: ce.context,
|
|
15530
15530
|
fields: V,
|
|
15531
|
-
values:
|
|
15531
|
+
values: we()
|
|
15532
15532
|
})), await et({
|
|
15533
15533
|
actionData: ce,
|
|
15534
15534
|
context: {
|
|
15535
15535
|
...ne,
|
|
15536
|
-
...
|
|
15536
|
+
...me
|
|
15537
15537
|
}
|
|
15538
15538
|
});
|
|
15539
15539
|
} else
|
|
@@ -15547,7 +15547,7 @@ function Form(e, t) {
|
|
|
15547
15547
|
action: ae,
|
|
15548
15548
|
payload: oe()
|
|
15549
15549
|
});
|
|
15550
|
-
ne.type && ne.type === "ir.actions.act_window_close" ? ue == null || ue(oe(),
|
|
15550
|
+
ne.type && ne.type === "ir.actions.act_window_close" ? ue == null || ue(oe(), we(), Ee()) : await Ie();
|
|
15551
15551
|
}
|
|
15552
15552
|
async function it({
|
|
15553
15553
|
action: ae,
|
|
@@ -15569,10 +15569,10 @@ function Form(e, t) {
|
|
|
15569
15569
|
}) {
|
|
15570
15570
|
const {
|
|
15571
15571
|
closeParent: ce
|
|
15572
|
-
} = await (
|
|
15572
|
+
} = await (Se == null ? void 0 : Se({
|
|
15573
15573
|
actionData: ae,
|
|
15574
15574
|
fields: V,
|
|
15575
|
-
values:
|
|
15575
|
+
values: we(),
|
|
15576
15576
|
context: {
|
|
15577
15577
|
...h,
|
|
15578
15578
|
...O == null ? void 0 : O.context,
|
|
@@ -15582,7 +15582,7 @@ function Form(e, t) {
|
|
|
15582
15582
|
Ie();
|
|
15583
15583
|
}
|
|
15584
15584
|
})) || {};
|
|
15585
|
-
!b && ce && (ue == null || ue(oe(),
|
|
15585
|
+
!b && ce && (ue == null || ue(oe(), we(), Ee()));
|
|
15586
15586
|
}
|
|
15587
15587
|
function ht() {
|
|
15588
15588
|
Qe({
|
|
@@ -15595,7 +15595,7 @@ function Form(e, t) {
|
|
|
15595
15595
|
context: ce
|
|
15596
15596
|
}) {
|
|
15597
15597
|
if (ae === "cancel") {
|
|
15598
|
-
|
|
15598
|
+
de == null || de();
|
|
15599
15599
|
return;
|
|
15600
15600
|
}
|
|
15601
15601
|
if (await Ae()) {
|
|
@@ -15603,7 +15603,7 @@ function Form(e, t) {
|
|
|
15603
15603
|
return;
|
|
15604
15604
|
}
|
|
15605
15605
|
try {
|
|
15606
|
-
(
|
|
15606
|
+
(be() || oe() === void 0) && await Le({
|
|
15607
15607
|
callOnSubmitSucceed: !1
|
|
15608
15608
|
}), ae === "object" ? await ft({
|
|
15609
15609
|
action: ne,
|
|
@@ -15614,25 +15614,25 @@ function Form(e, t) {
|
|
|
15614
15614
|
action: ne,
|
|
15615
15615
|
context: ce
|
|
15616
15616
|
});
|
|
15617
|
-
} catch (
|
|
15618
|
-
showDialog$8(
|
|
15617
|
+
} catch (me) {
|
|
15618
|
+
showDialog$8(me);
|
|
15619
15619
|
}
|
|
15620
15620
|
}
|
|
15621
15621
|
const ot = () => !O && !M ? /* @__PURE__ */ jsx(Spin, {}) : !r && !m || !_ ? null : /* @__PURE__ */ jsx(Fragment, {
|
|
15622
15622
|
children: /* @__PURE__ */ jsx(FormProvider$2, {
|
|
15623
|
-
getValues:
|
|
15624
|
-
getPlainValues:
|
|
15625
|
-
getFields:
|
|
15623
|
+
getValues: we,
|
|
15624
|
+
getPlainValues: ke,
|
|
15625
|
+
getFields: pe,
|
|
15626
15626
|
domain: v,
|
|
15627
15627
|
activeId: n,
|
|
15628
15628
|
activeModel: r,
|
|
15629
15629
|
setFieldValue: xe,
|
|
15630
|
-
getFieldValue:
|
|
15630
|
+
getFieldValue: Ce,
|
|
15631
15631
|
executeButtonAction: mt,
|
|
15632
|
-
getContext:
|
|
15632
|
+
getContext: Me,
|
|
15633
15633
|
submitForm: Le,
|
|
15634
15634
|
fetchValues: Ie,
|
|
15635
|
-
formHasChanges:
|
|
15635
|
+
formHasChanges: be,
|
|
15636
15636
|
elementHasLostFocus: ht,
|
|
15637
15637
|
children: /* @__PURE__ */ jsx(Form$3, {
|
|
15638
15638
|
form: F,
|
|
@@ -19334,22 +19334,22 @@ function SearchTree(e, t) {
|
|
|
19334
19334
|
searchValues: T = {},
|
|
19335
19335
|
setSearchValues: z = void 0,
|
|
19336
19336
|
limit: Z = DEFAULT_SEARCH_LIMIT$1,
|
|
19337
|
-
setLimit:
|
|
19337
|
+
setLimit: te = void 0
|
|
19338
19338
|
} = (d ? k : {}) || {}, {
|
|
19339
19339
|
submit: J,
|
|
19340
|
-
clear:
|
|
19340
|
+
clear: ee,
|
|
19341
19341
|
fetchResults: re,
|
|
19342
19342
|
tableRefreshing: se,
|
|
19343
|
-
searchFilterLoading:
|
|
19344
|
-
searchError:
|
|
19345
|
-
page:
|
|
19346
|
-
offset:
|
|
19347
|
-
getResults:
|
|
19343
|
+
searchFilterLoading: ye,
|
|
19344
|
+
searchError: _e,
|
|
19345
|
+
page: $e,
|
|
19346
|
+
offset: Se,
|
|
19347
|
+
getResults: ie,
|
|
19348
19348
|
requestPageChange: ue,
|
|
19349
|
-
changeSort:
|
|
19350
|
-
fetchChildrenForRecord:
|
|
19349
|
+
changeSort: de,
|
|
19350
|
+
fetchChildrenForRecord: fe,
|
|
19351
19351
|
colorsForResults: oe,
|
|
19352
|
-
totalItems:
|
|
19352
|
+
totalItems: pe
|
|
19353
19353
|
} = useSearch({
|
|
19354
19354
|
model: v,
|
|
19355
19355
|
setSearchTreeNameSearch: X,
|
|
@@ -19373,7 +19373,7 @@ function SearchTree(e, t) {
|
|
|
19373
19373
|
currentId: Y,
|
|
19374
19374
|
setActionViewTotalItems: Q,
|
|
19375
19375
|
limit: Z,
|
|
19376
|
-
setLimit:
|
|
19376
|
+
setLimit: te
|
|
19377
19377
|
});
|
|
19378
19378
|
useImperativeHandle(t, () => ({
|
|
19379
19379
|
refreshResults: () => {
|
|
@@ -19383,20 +19383,20 @@ function SearchTree(e, t) {
|
|
|
19383
19383
|
getDomain: () => l
|
|
19384
19384
|
})), useEffect(() => {
|
|
19385
19385
|
!y || c && (h.current = !1, re());
|
|
19386
|
-
}, [
|
|
19387
|
-
const
|
|
19386
|
+
}, [$e, Se, y, c, s]);
|
|
19387
|
+
const we = async () => {
|
|
19388
19388
|
x(!1), m(!0), S(void 0), E == null || E(!0);
|
|
19389
19389
|
try {
|
|
19390
|
-
await
|
|
19391
|
-
} catch (
|
|
19392
|
-
S(
|
|
19390
|
+
await ke(), x(!0);
|
|
19391
|
+
} catch (Ce) {
|
|
19392
|
+
S(Ce);
|
|
19393
19393
|
} finally {
|
|
19394
19394
|
m(!1), E == null || E(!1);
|
|
19395
19395
|
}
|
|
19396
|
-
},
|
|
19396
|
+
}, ke = async () => {
|
|
19397
19397
|
_(r);
|
|
19398
|
-
let
|
|
19399
|
-
n || (
|
|
19398
|
+
let Ce = n;
|
|
19399
|
+
n || (Ce = await ConnectionProvider.getHandler().getView({
|
|
19400
19400
|
model: r,
|
|
19401
19401
|
type: "form",
|
|
19402
19402
|
context: f
|
|
@@ -19406,17 +19406,17 @@ function SearchTree(e, t) {
|
|
|
19406
19406
|
model: r,
|
|
19407
19407
|
type: "tree",
|
|
19408
19408
|
context: f
|
|
19409
|
-
})), D(
|
|
19409
|
+
})), D(Ce), C(Ae);
|
|
19410
19410
|
};
|
|
19411
19411
|
useEffect(() => {
|
|
19412
|
-
|
|
19412
|
+
we();
|
|
19413
19413
|
}, [r]);
|
|
19414
|
-
const Ee = (
|
|
19415
|
-
|
|
19416
|
-
},
|
|
19414
|
+
const Ee = (Ce) => {
|
|
19415
|
+
te == null || te(Ce);
|
|
19416
|
+
}, Me = async (Ce) => {
|
|
19417
19417
|
const {
|
|
19418
19418
|
id: Ae
|
|
19419
|
-
} =
|
|
19419
|
+
} = Ce;
|
|
19420
19420
|
A.current || (A.current = await ConnectionProvider.getHandler().treeButOpen({
|
|
19421
19421
|
id: b.view_id,
|
|
19422
19422
|
model: v,
|
|
@@ -19428,17 +19428,17 @@ function SearchTree(e, t) {
|
|
|
19428
19428
|
fields: b.fields,
|
|
19429
19429
|
values: {
|
|
19430
19430
|
active_id: Ae,
|
|
19431
|
-
...
|
|
19431
|
+
...Ce
|
|
19432
19432
|
},
|
|
19433
19433
|
context: f
|
|
19434
19434
|
}));
|
|
19435
|
-
}, le = async (
|
|
19435
|
+
}, le = async (Ce) => {
|
|
19436
19436
|
const {
|
|
19437
19437
|
id: Ae
|
|
19438
|
-
} =
|
|
19438
|
+
} = Ce;
|
|
19439
19439
|
if (b != null && b.isExpandable) {
|
|
19440
19440
|
try {
|
|
19441
|
-
await
|
|
19441
|
+
await Me(Ce);
|
|
19442
19442
|
} catch (Ve) {
|
|
19443
19443
|
showDialog$8(Ve);
|
|
19444
19444
|
}
|
|
@@ -19451,14 +19451,14 @@ function SearchTree(e, t) {
|
|
|
19451
19451
|
treeView: b
|
|
19452
19452
|
});
|
|
19453
19453
|
};
|
|
19454
|
-
function
|
|
19455
|
-
const Ae =
|
|
19456
|
-
U == null || U(Ae), p == null || p(
|
|
19454
|
+
function ve(Ce) {
|
|
19455
|
+
const Ae = ie().filter((Ve) => Ce.includes(Ve.id));
|
|
19456
|
+
U == null || U(Ae), p == null || p(Ce);
|
|
19457
19457
|
}
|
|
19458
|
-
function
|
|
19458
|
+
function be() {
|
|
19459
19459
|
return b != null && b.isExpandable ? O - 160 : O - (P + 210);
|
|
19460
19460
|
}
|
|
19461
|
-
const
|
|
19461
|
+
const he = () => !b || !w ? null : /* @__PURE__ */ jsxs(Fragment, {
|
|
19462
19462
|
children: [/* @__PURE__ */ jsx(SearchFilter, {
|
|
19463
19463
|
fields: {
|
|
19464
19464
|
...b.fields,
|
|
@@ -19466,39 +19466,39 @@ function SearchTree(e, t) {
|
|
|
19466
19466
|
},
|
|
19467
19467
|
searchFields: mergeSearchFields([w.search_fields, b.search_fields]),
|
|
19468
19468
|
formXml: w.arch,
|
|
19469
|
-
onClear:
|
|
19469
|
+
onClear: ee,
|
|
19470
19470
|
limit: Z,
|
|
19471
|
-
offset:
|
|
19472
|
-
isSearching:
|
|
19471
|
+
offset: Se,
|
|
19472
|
+
isSearching: ye,
|
|
19473
19473
|
onSubmit: J,
|
|
19474
19474
|
onLimitChange: Ee,
|
|
19475
19475
|
setSearchFilterHeight: M,
|
|
19476
|
-
searchError:
|
|
19476
|
+
searchError: _e,
|
|
19477
19477
|
searchVisible: B,
|
|
19478
19478
|
searchValues: T
|
|
19479
19479
|
}), /* @__PURE__ */ jsx(Tree, {
|
|
19480
19480
|
context: f,
|
|
19481
|
-
total:
|
|
19481
|
+
total: pe,
|
|
19482
19482
|
limit: Z,
|
|
19483
|
-
page:
|
|
19483
|
+
page: $e,
|
|
19484
19484
|
treeView: b,
|
|
19485
|
-
results:
|
|
19485
|
+
results: ie(),
|
|
19486
19486
|
onRequestPageChange: ue,
|
|
19487
19487
|
loading: se,
|
|
19488
19488
|
onRowClicked: le,
|
|
19489
|
-
scrollY: u ||
|
|
19489
|
+
scrollY: u || be(),
|
|
19490
19490
|
colorsForResults: oe,
|
|
19491
19491
|
rowSelection: {
|
|
19492
|
-
selectedRowKeys: L == null ? void 0 : L.map((
|
|
19493
|
-
onChange:
|
|
19492
|
+
selectedRowKeys: L == null ? void 0 : L.map((Ce) => Ce.id),
|
|
19493
|
+
onChange: ve
|
|
19494
19494
|
},
|
|
19495
19495
|
sorter: q,
|
|
19496
|
-
onChangeSort:
|
|
19497
|
-
onFetchChildrenForRecord: b.isExpandable ?
|
|
19496
|
+
onChangeSort: de,
|
|
19497
|
+
onFetchChildrenForRecord: b.isExpandable ? fe : void 0,
|
|
19498
19498
|
childField: b.field_parent,
|
|
19499
19499
|
rootTree: d
|
|
19500
19500
|
})]
|
|
19501
|
-
}), xe = $ ||
|
|
19501
|
+
}), xe = $ || _e;
|
|
19502
19502
|
return xe ? /* @__PURE__ */ jsx(Alert, {
|
|
19503
19503
|
className: "mt-10",
|
|
19504
19504
|
message: xe,
|
|
@@ -19508,7 +19508,7 @@ function SearchTree(e, t) {
|
|
|
19508
19508
|
style: c ? {} : {
|
|
19509
19509
|
display: "none"
|
|
19510
19510
|
},
|
|
19511
|
-
children: g ? /* @__PURE__ */ jsx(Spin, {}) :
|
|
19511
|
+
children: g ? /* @__PURE__ */ jsx(Spin, {}) : he()
|
|
19512
19512
|
});
|
|
19513
19513
|
}
|
|
19514
19514
|
const SearchTree$1 = forwardRef(SearchTree), SearchModal = (e) => {
|
|
@@ -21623,8 +21623,8 @@ var PopupInner = /* @__PURE__ */ React$n.forwardRef(function(e, t) {
|
|
|
21623
21623
|
(z = C.current) === null || z === void 0 || z.forceAlign();
|
|
21624
21624
|
}
|
|
21625
21625
|
function q(z, Z) {
|
|
21626
|
-
var
|
|
21627
|
-
S !==
|
|
21626
|
+
var te = m(Z);
|
|
21627
|
+
S !== te && P(te), H(function(J) {
|
|
21628
21628
|
return J + 1;
|
|
21629
21629
|
}), V === "align" && (y == null || y(z, Z));
|
|
21630
21630
|
}
|
|
@@ -21637,8 +21637,8 @@ var PopupInner = /* @__PURE__ */ React$n.forwardRef(function(e, t) {
|
|
|
21637
21637
|
var K = _objectSpread2$g({}, getMotion(e));
|
|
21638
21638
|
["onAppearEnd", "onEnterEnd", "onLeaveEnd"].forEach(function(z) {
|
|
21639
21639
|
var Z = K[z];
|
|
21640
|
-
K[z] = function(
|
|
21641
|
-
return Y(), Z == null ? void 0 : Z(
|
|
21640
|
+
K[z] = function(te, J) {
|
|
21641
|
+
return Y(), Z == null ? void 0 : Z(te, J);
|
|
21642
21642
|
};
|
|
21643
21643
|
});
|
|
21644
21644
|
function Q() {
|
|
@@ -21676,7 +21676,7 @@ var PopupInner = /* @__PURE__ */ React$n.forwardRef(function(e, t) {
|
|
|
21676
21676
|
removeOnLeave: c,
|
|
21677
21677
|
forceRender: d,
|
|
21678
21678
|
children: function(z, Z) {
|
|
21679
|
-
var
|
|
21679
|
+
var te = z.className, J = z.style, ee = classNames(n, a, S, te);
|
|
21680
21680
|
return /* @__PURE__ */ jsx(RcAlign, {
|
|
21681
21681
|
target: B(),
|
|
21682
21682
|
ref: C,
|
|
@@ -21686,7 +21686,7 @@ var PopupInner = /* @__PURE__ */ React$n.forwardRef(function(e, t) {
|
|
|
21686
21686
|
onAlign: q,
|
|
21687
21687
|
children: /* @__PURE__ */ jsx("div", {
|
|
21688
21688
|
ref: Z,
|
|
21689
|
-
className:
|
|
21689
|
+
className: ee,
|
|
21690
21690
|
onMouseEnter: x,
|
|
21691
21691
|
onMouseLeave: h,
|
|
21692
21692
|
onMouseDownCapture: v,
|
|
@@ -22504,44 +22504,44 @@ placements$1.default = _default$1;
|
|
|
22504
22504
|
}
|
|
22505
22505
|
var b = /* @__PURE__ */ c.forwardRef(function(w, D) {
|
|
22506
22506
|
var $, S = c.useContext(d.ConfigContext), P = S.getPopupContainer, M = S.getPrefixCls, A = S.direction;
|
|
22507
|
-
process.env.NODE_ENV !== "production" && [["visible", "open"], ["defaultVisible", "defaultOpen"], ["onVisibleChange", "onOpenChange"], ["afterVisibleChange", "afterOpenChange"]].forEach(function(
|
|
22508
|
-
var
|
|
22509
|
-
process.env.NODE_ENV !== "production" && (0, y.default)(!(oe in w), "Tooltip", "`".concat(oe, "` is deprecated which will be removed in next major version, please use `").concat(
|
|
22507
|
+
process.env.NODE_ENV !== "production" && [["visible", "open"], ["defaultVisible", "defaultOpen"], ["onVisibleChange", "onOpenChange"], ["afterVisibleChange", "afterOpenChange"]].forEach(function(de) {
|
|
22508
|
+
var fe = (0, a.default)(de, 2), oe = fe[0], pe = fe[1];
|
|
22509
|
+
process.env.NODE_ENV !== "production" && (0, y.default)(!(oe in w), "Tooltip", "`".concat(oe, "` is deprecated which will be removed in next major version, please use `").concat(pe, "` instead."));
|
|
22510
22510
|
});
|
|
22511
22511
|
var O = (0, l.default)(!1, {
|
|
22512
22512
|
value: w.open !== void 0 ? w.open : w.visible,
|
|
22513
22513
|
defaultValue: w.defaultOpen !== void 0 ? w.defaultOpen : w.defaultVisible
|
|
22514
22514
|
}), N = (0, a.default)(O, 2), F = N[0], k = N[1], j = function() {
|
|
22515
|
-
var
|
|
22516
|
-
return !
|
|
22517
|
-
}, V = function(
|
|
22518
|
-
var oe,
|
|
22519
|
-
k(j() ? !1 :
|
|
22515
|
+
var fe = w.title, oe = w.overlay;
|
|
22516
|
+
return !fe && !oe && fe !== 0;
|
|
22517
|
+
}, V = function(fe) {
|
|
22518
|
+
var oe, pe;
|
|
22519
|
+
k(j() ? !1 : fe), j() || ((oe = w.onOpenChange) === null || oe === void 0 || oe.call(w, fe), (pe = w.onVisibleChange) === null || pe === void 0 || pe.call(w, fe));
|
|
22520
22520
|
}, Y = function() {
|
|
22521
|
-
var
|
|
22522
|
-
return
|
|
22523
|
-
arrowPointAtCenter:
|
|
22524
|
-
autoAdjustOverflow:
|
|
22521
|
+
var fe = w.builtinPlacements, oe = w.arrowPointAtCenter, pe = oe === void 0 ? !1 : oe, we = w.autoAdjustOverflow, ke = we === void 0 ? !0 : we;
|
|
22522
|
+
return fe || (0, g.default)({
|
|
22523
|
+
arrowPointAtCenter: pe,
|
|
22524
|
+
autoAdjustOverflow: ke
|
|
22525
22525
|
});
|
|
22526
|
-
}, W = function(
|
|
22527
|
-
var
|
|
22528
|
-
var le,
|
|
22529
|
-
return
|
|
22526
|
+
}, W = function(fe, oe) {
|
|
22527
|
+
var pe = Y(), we = Object.keys(pe).find(function(Me) {
|
|
22528
|
+
var le, ve;
|
|
22529
|
+
return pe[Me].points[0] === ((le = oe.points) === null || le === void 0 ? void 0 : le[0]) && pe[Me].points[1] === ((ve = oe.points) === null || ve === void 0 ? void 0 : ve[1]);
|
|
22530
22530
|
});
|
|
22531
|
-
if (
|
|
22532
|
-
var
|
|
22531
|
+
if (!!we) {
|
|
22532
|
+
var ke = fe.getBoundingClientRect(), Ee = {
|
|
22533
22533
|
top: "50%",
|
|
22534
22534
|
left: "50%"
|
|
22535
22535
|
};
|
|
22536
|
-
/top|Bottom/.test(
|
|
22536
|
+
/top|Bottom/.test(we) ? Ee.top = "".concat(ke.height - oe.offset[1], "px") : /Top|bottom/.test(we) && (Ee.top = "".concat(-oe.offset[1], "px")), /left|Right/.test(we) ? Ee.left = "".concat(ke.width - oe.offset[0], "px") : /right|Left/.test(we) && (Ee.left = "".concat(-oe.offset[0], "px")), fe.style.transformOrigin = "".concat(Ee.left, " ").concat(Ee.top);
|
|
22537
22537
|
}
|
|
22538
22538
|
}, L = function() {
|
|
22539
|
-
var
|
|
22540
|
-
return
|
|
22541
|
-
}, U = w.getPopupContainer, H = w.placement, G = H === void 0 ? "top" : H, B = w.mouseEnterDelay, I = B === void 0 ? 0.1 : B, q = w.mouseLeaveDelay, K = q === void 0 ? 0.1 : q, Q = x(w, ["getPopupContainer", "placement", "mouseEnterDelay", "mouseLeaveDelay"]), X = w.prefixCls, E = w.openClassName, T = w.getTooltipContainer, z = w.overlayClassName, Z = w.color,
|
|
22539
|
+
var fe = w.title, oe = w.overlay;
|
|
22540
|
+
return fe === 0 ? fe : oe || fe || "";
|
|
22541
|
+
}, U = w.getPopupContainer, H = w.placement, G = H === void 0 ? "top" : H, B = w.mouseEnterDelay, I = B === void 0 ? 0.1 : B, q = w.mouseLeaveDelay, K = q === void 0 ? 0.1 : q, Q = x(w, ["getPopupContainer", "placement", "mouseEnterDelay", "mouseLeaveDelay"]), X = w.prefixCls, E = w.openClassName, T = w.getTooltipContainer, z = w.overlayClassName, Z = w.color, te = w.overlayInnerStyle, J = w.children, ee = M("tooltip", X), re = M(), se = F;
|
|
22542
22542
|
!("open" in w) && !("visible" in w) && j() && (se = !1);
|
|
22543
|
-
var
|
|
22544
|
-
return Z && !v.test(Z) && (
|
|
22543
|
+
var ye = _((0, m.isValidElement)(J) && !(0, m.isFragment)(J) ? J : /* @__PURE__ */ c.createElement("span", null, J), ee), _e = ye.props, $e = !_e.className || typeof _e.className == "string" ? (0, s.default)(_e.className, (0, n.default)({}, E || "".concat(ee, "-open"), !0)) : _e.className, Se = (0, s.default)(z, ($ = {}, (0, n.default)($, "".concat(ee, "-rtl"), A === "rtl"), (0, n.default)($, "".concat(ee, "-").concat(Z), Z && v.test(Z)), $)), ie = te, ue = {};
|
|
22544
|
+
return Z && !v.test(Z) && (ie = (0, o.default)((0, o.default)({}, te), {
|
|
22545
22545
|
background: Z
|
|
22546
22546
|
}), ue = {
|
|
22547
22547
|
"--antd-arrow-background-color": Z
|
|
@@ -22549,8 +22549,8 @@ placements$1.default = _default$1;
|
|
|
22549
22549
|
placement: G,
|
|
22550
22550
|
mouseEnterDelay: I,
|
|
22551
22551
|
mouseLeaveDelay: K,
|
|
22552
|
-
prefixCls:
|
|
22553
|
-
overlayClassName:
|
|
22552
|
+
prefixCls: ee,
|
|
22553
|
+
overlayClassName: Se,
|
|
22554
22554
|
getTooltipContainer: U || T || P,
|
|
22555
22555
|
ref: D,
|
|
22556
22556
|
builtinPlacements: Y(),
|
|
@@ -22558,18 +22558,18 @@ placements$1.default = _default$1;
|
|
|
22558
22558
|
visible: se,
|
|
22559
22559
|
onVisibleChange: V,
|
|
22560
22560
|
onPopupAlign: W,
|
|
22561
|
-
overlayInnerStyle:
|
|
22561
|
+
overlayInnerStyle: ie,
|
|
22562
22562
|
arrowContent: /* @__PURE__ */ c.createElement("span", {
|
|
22563
|
-
className: "".concat(
|
|
22563
|
+
className: "".concat(ee, "-arrow-content"),
|
|
22564
22564
|
style: ue
|
|
22565
22565
|
}),
|
|
22566
22566
|
motion: {
|
|
22567
22567
|
motionName: (0, p.getTransitionName)(re, "zoom-big-fast", w.transitionName),
|
|
22568
22568
|
motionDeadline: 1e3
|
|
22569
22569
|
}
|
|
22570
|
-
}), se ? (0, m.cloneElement)(
|
|
22571
|
-
className:
|
|
22572
|
-
}) :
|
|
22570
|
+
}), se ? (0, m.cloneElement)(ye, {
|
|
22571
|
+
className: $e
|
|
22572
|
+
}) : ye);
|
|
22573
22573
|
});
|
|
22574
22574
|
process.env.NODE_ENV !== "production" && (b.displayName = "Tooltip");
|
|
22575
22575
|
var C = b;
|
|
@@ -22638,8 +22638,8 @@ EnterOutlined$2.default = _default;
|
|
|
22638
22638
|
}, B = function() {
|
|
22639
22639
|
$(Y.trim());
|
|
22640
22640
|
}, I = function(E) {
|
|
22641
|
-
var T = E.keyCode, z = E.ctrlKey, Z = E.altKey,
|
|
22642
|
-
k.current === T && !F.current && !z && !Z && !
|
|
22641
|
+
var T = E.keyCode, z = E.ctrlKey, Z = E.altKey, te = E.metaKey, J = E.shiftKey;
|
|
22642
|
+
k.current === T && !F.current && !z && !Z && !te && !J && (T === u.default.ENTER ? (B(), P == null || P()) : T === u.default.ESC && S());
|
|
22643
22643
|
}, q = function() {
|
|
22644
22644
|
B();
|
|
22645
22645
|
}, K = M ? "".concat(y, "-").concat(M) : "", Q = (0, s.default)(y, "".concat(y, "-edit-content"), (0, n.default)({}, "".concat(y, "-rtl"), _ === "rtl"), h, K);
|
|
@@ -22761,20 +22761,20 @@ var Ellipsis = {};
|
|
|
22761
22761
|
(0, u.default)(function() {
|
|
22762
22762
|
C && $ && S && X && (U(g), V([0, Math.ceil(X / 2), X]));
|
|
22763
22763
|
}, [C, $, S, D, X, P]), (0, u.default)(function() {
|
|
22764
|
-
var
|
|
22765
|
-
L === g && I(((
|
|
22764
|
+
var te;
|
|
22765
|
+
L === g && I(((te = q.current) === null || te === void 0 ? void 0 : te.offsetHeight) || 0);
|
|
22766
22766
|
}, [L]), (0, u.default)(function() {
|
|
22767
|
-
var
|
|
22767
|
+
var te, J;
|
|
22768
22768
|
if (B) {
|
|
22769
22769
|
if (L === g) {
|
|
22770
|
-
var
|
|
22771
|
-
|
|
22770
|
+
var ee = ((te = K.current) === null || te === void 0 ? void 0 : te.offsetHeight) || 0, re = P * B;
|
|
22771
|
+
ee <= re ? (U(x), M(!1)) : U(m);
|
|
22772
22772
|
} else if (L === m)
|
|
22773
22773
|
if (F !== j) {
|
|
22774
|
-
var se = ((J = K.current) === null || J === void 0 ? void 0 : J.offsetHeight) || 0,
|
|
22775
|
-
F === j - 1 ?
|
|
22776
|
-
var
|
|
22777
|
-
V([
|
|
22774
|
+
var se = ((J = K.current) === null || J === void 0 ? void 0 : J.offsetHeight) || 0, ye = P * B, _e = F, $e = j;
|
|
22775
|
+
F === j - 1 ? $e = F : se <= ye ? _e = k : $e = k;
|
|
22776
|
+
var Se = Math.ceil((_e + $e) / 2);
|
|
22777
|
+
V([_e, Se, $e]);
|
|
22778
22778
|
} else
|
|
22779
22779
|
U(y), M(!0);
|
|
22780
22780
|
}
|
|
@@ -22784,10 +22784,10 @@ var Ellipsis = {};
|
|
|
22784
22784
|
whiteSpace: "normal",
|
|
22785
22785
|
margin: 0,
|
|
22786
22786
|
padding: 0
|
|
22787
|
-
}, z = function(J,
|
|
22787
|
+
}, z = function(J, ee, re) {
|
|
22788
22788
|
return /* @__PURE__ */ l.createElement("span", {
|
|
22789
22789
|
"aria-hidden": !0,
|
|
22790
|
-
ref:
|
|
22790
|
+
ref: ee,
|
|
22791
22791
|
style: (0, n.default)({
|
|
22792
22792
|
position: "fixed",
|
|
22793
22793
|
display: "block",
|
|
@@ -22799,9 +22799,9 @@ var Ellipsis = {};
|
|
|
22799
22799
|
fontSize: Math.floor(S / 2) * 2
|
|
22800
22800
|
}, re)
|
|
22801
22801
|
}, J);
|
|
22802
|
-
}, Z = function(J,
|
|
22802
|
+
}, Z = function(J, ee) {
|
|
22803
22803
|
var re = f(Q, J);
|
|
22804
|
-
return z(w(re, !0),
|
|
22804
|
+
return z(w(re, !0), ee, T);
|
|
22805
22805
|
};
|
|
22806
22806
|
return /* @__PURE__ */ l.createElement(l.Fragment, null, E, C && L !== y && L !== x && /* @__PURE__ */ l.createElement(l.Fragment, null, z("lg", q, {
|
|
22807
22807
|
wordBreak: "keep-all",
|
|
@@ -22856,38 +22856,38 @@ var EllipsisTooltip = {};
|
|
|
22856
22856
|
return L === !1 ? [!1, !1] : Array.isArray(L) ? L : [L];
|
|
22857
22857
|
}
|
|
22858
22858
|
var V = "...", Y = /* @__PURE__ */ v.forwardRef(function(L, U) {
|
|
22859
|
-
var H, G, B, I = L.prefixCls, q = L.className, K = L.style, Q = L.type, X = L.disabled, E = L.children, T = L.ellipsis, z = L.editable, Z = L.copyable,
|
|
22860
|
-
value:
|
|
22861
|
-
}),
|
|
22859
|
+
var H, G, B, I = L.prefixCls, q = L.className, K = L.style, Q = L.type, X = L.disabled, E = L.children, T = L.ellipsis, z = L.editable, Z = L.copyable, te = L.component, J = L.title, ee = N(L, ["prefixCls", "className", "style", "type", "disabled", "children", "ellipsis", "editable", "copyable", "component", "title"]), re = v.useContext(_.ConfigContext), se = re.getPrefixCls, ye = re.direction, _e = (0, b.useLocaleReceiver)("Text")[0], $e = v.useRef(null), Se = v.useRef(null), ie = se("typography", I), ue = (0, x.default)(ee, ["mark", "code", "delete", "underline", "strong", "keyboard", "italic"]), de = (0, S.default)(z), fe = (0, s.default)(de, 2), oe = fe[0], pe = fe[1], we = (0, y.default)(!1, {
|
|
22860
|
+
value: pe.editing
|
|
22861
|
+
}), ke = (0, s.default)(we, 2), Ee = ke[0], Me = ke[1], le = pe.triggerType, ve = le === void 0 ? ["icon"] : le, be = function(ge) {
|
|
22862
22862
|
var Te;
|
|
22863
|
-
|
|
22863
|
+
ge && ((Te = pe.onStart) === null || Te === void 0 || Te.call(pe)), Me(ge);
|
|
22864
22864
|
};
|
|
22865
22865
|
(0, P.default)(function() {
|
|
22866
22866
|
var Re;
|
|
22867
|
-
Ee || (Re =
|
|
22867
|
+
Ee || (Re = Se.current) === null || Re === void 0 || Re.focus();
|
|
22868
22868
|
}, [Ee]);
|
|
22869
|
-
var
|
|
22870
|
-
|
|
22871
|
-
}, xe = function(
|
|
22869
|
+
var he = function(ge) {
|
|
22870
|
+
ge == null || ge.preventDefault(), be(!0);
|
|
22871
|
+
}, xe = function(ge) {
|
|
22872
22872
|
var Te;
|
|
22873
|
-
(Te =
|
|
22874
|
-
},
|
|
22875
|
-
var
|
|
22876
|
-
(
|
|
22873
|
+
(Te = pe.onChange) === null || Te === void 0 || Te.call(pe, ge), be(!1);
|
|
22874
|
+
}, Ce = function() {
|
|
22875
|
+
var ge;
|
|
22876
|
+
(ge = pe.onCancel) === null || ge === void 0 || ge.call(pe), be(!1);
|
|
22877
22877
|
}, Ae = (0, S.default)(Z), Ve = (0, s.default)(Ae, 2), Ie = Ve[0], je = Ve[1], Ke = v.useState(!1), qe = (0, s.default)(Ke, 2), Fe = qe[0], Pe = qe[1], De = v.useRef(), Le = {};
|
|
22878
22878
|
je.format && (Le.format = je.format);
|
|
22879
22879
|
var Xe = function() {
|
|
22880
22880
|
window.clearTimeout(De.current);
|
|
22881
|
-
}, Qe = function(
|
|
22881
|
+
}, Qe = function(ge) {
|
|
22882
22882
|
var Te;
|
|
22883
|
-
|
|
22883
|
+
ge == null || ge.preventDefault(), ge == null || ge.stopPropagation(), (0, f.default)(je.text || String(E) || "", Le), Pe(!0), Xe(), De.current = window.setTimeout(function() {
|
|
22884
22884
|
Pe(!1);
|
|
22885
|
-
}, 3e3), (Te = je.onCopy) === null || Te === void 0 || Te.call(je,
|
|
22885
|
+
}, 3e3), (Te = je.onCopy) === null || Te === void 0 || Te.call(je, ge);
|
|
22886
22886
|
};
|
|
22887
22887
|
v.useEffect(function() {
|
|
22888
22888
|
return Xe;
|
|
22889
22889
|
}, []);
|
|
22890
|
-
var dt = v.useState(!1), nt = (0, s.default)(dt, 2), at = nt[0], ft = nt[1], pt = v.useState(!1), it = (0, s.default)(pt, 2), et = it[0], ht = it[1], mt = v.useState(!1), ot = (0, s.default)(mt, 2), vt = ot[0], ae = ot[1], ne = v.useState(!1), ce = (0, s.default)(ne, 2),
|
|
22890
|
+
var dt = v.useState(!1), nt = (0, s.default)(dt, 2), at = nt[0], ft = nt[1], pt = v.useState(!1), it = (0, s.default)(pt, 2), et = it[0], ht = it[1], mt = v.useState(!1), ot = (0, s.default)(mt, 2), vt = ot[0], ae = ot[1], ne = v.useState(!1), ce = (0, s.default)(ne, 2), me = ce[0], Oe = ce[1], Ye = v.useState(!1), Ze = (0, s.default)(Ye, 2), st = Ze[0], tt = Ze[1], gt = v.useState(!0), yt = (0, s.default)(gt, 2), St = yt[0], $t = yt[1], Rt = (0, S.default)(T, {
|
|
22891
22891
|
expandable: !1
|
|
22892
22892
|
}), _t = (0, s.default)(Rt, 2), ze = _t[0], Ne = _t[1], Be = ze && !vt, xt = Ne.rows, Je = xt === void 0 ? 1 : xt, lt = v.useMemo(function() {
|
|
22893
22893
|
return !Be || Ne.suffix !== void 0 || Ne.onEllipsis || Ne.expandable || oe || Ie;
|
|
@@ -22897,40 +22897,40 @@ var EllipsisTooltip = {};
|
|
|
22897
22897
|
}, [lt, ze]);
|
|
22898
22898
|
var He = v.useMemo(function() {
|
|
22899
22899
|
return lt ? !1 : Je === 1 ? et : at;
|
|
22900
|
-
}, [lt, et, at]), bt = Be && (He ? st :
|
|
22900
|
+
}, [lt, et, at]), bt = Be && (He ? st : me), Tt = Be && Je === 1 && He, ut = Be && Je > 1 && He, Et = function(ge) {
|
|
22901
22901
|
var Te;
|
|
22902
|
-
ae(!0), (Te = Ne.onExpand) === null || Te === void 0 || Te.call(Ne,
|
|
22903
|
-
}, Ot = v.useState(0), Ct = (0, s.default)(Ot, 2), Pt = Ct[0], Ft = Ct[1], At = v.useState(0), wt = (0, s.default)(At, 2), Mt = wt[0], kt = wt[1], It = function(
|
|
22904
|
-
var We =
|
|
22902
|
+
ae(!0), (Te = Ne.onExpand) === null || Te === void 0 || Te.call(Ne, ge);
|
|
22903
|
+
}, Ot = v.useState(0), Ct = (0, s.default)(Ot, 2), Pt = Ct[0], Ft = Ct[1], At = v.useState(0), wt = (0, s.default)(At, 2), Mt = wt[0], kt = wt[1], It = function(ge, Te) {
|
|
22904
|
+
var We = ge.offsetWidth, Ue;
|
|
22905
22905
|
Ft(We), kt(parseInt((Ue = window.getComputedStyle) === null || Ue === void 0 ? void 0 : Ue.call(window, Te).fontSize, 10) || 0);
|
|
22906
|
-
}, Dt = function(
|
|
22906
|
+
}, Dt = function(ge) {
|
|
22907
22907
|
var Te;
|
|
22908
|
-
Oe(
|
|
22908
|
+
Oe(ge), me !== ge && ((Te = Ne.onEllipsis) === null || Te === void 0 || Te.call(Ne, ge));
|
|
22909
22909
|
};
|
|
22910
22910
|
v.useEffect(function() {
|
|
22911
|
-
var Re =
|
|
22911
|
+
var Re = $e.current;
|
|
22912
22912
|
if (ze && He && Re) {
|
|
22913
|
-
var
|
|
22914
|
-
st !==
|
|
22913
|
+
var ge = ut ? Re.offsetHeight < Re.scrollHeight : Re.offsetWidth < Re.scrollWidth;
|
|
22914
|
+
st !== ge && tt(ge);
|
|
22915
22915
|
}
|
|
22916
22916
|
}, [ze, He, E, ut, St]), v.useEffect(function() {
|
|
22917
|
-
var Re =
|
|
22917
|
+
var Re = $e.current;
|
|
22918
22918
|
if (!(typeof IntersectionObserver > "u" || !Re || !He || !Be)) {
|
|
22919
|
-
var
|
|
22919
|
+
var ge = new IntersectionObserver(function() {
|
|
22920
22920
|
$t(!!Re.offsetParent);
|
|
22921
22921
|
});
|
|
22922
|
-
return
|
|
22923
|
-
|
|
22922
|
+
return ge.observe(Re), function() {
|
|
22923
|
+
ge.disconnect();
|
|
22924
22924
|
};
|
|
22925
22925
|
}
|
|
22926
22926
|
}, [He, Be]);
|
|
22927
22927
|
var Ge = {};
|
|
22928
22928
|
Ne.tooltip === !0 ? Ge = {
|
|
22929
|
-
title: (H =
|
|
22929
|
+
title: (H = pe.text) !== null && H !== void 0 ? H : E
|
|
22930
22930
|
} : /* @__PURE__ */ v.isValidElement(Ne.tooltip) ? Ge = {
|
|
22931
22931
|
title: Ne.tooltip
|
|
22932
22932
|
} : (0, o.default)(Ne.tooltip) === "object" ? Ge = (0, a.default)({
|
|
22933
|
-
title: (G =
|
|
22933
|
+
title: (G = pe.text) !== null && G !== void 0 ? G : E
|
|
22934
22934
|
}, Ne.tooltip) : Ge = {
|
|
22935
22935
|
title: Ne.tooltip
|
|
22936
22936
|
};
|
|
@@ -22939,8 +22939,8 @@ var EllipsisTooltip = {};
|
|
|
22939
22939
|
return ["string", "number"].includes((0, o.default)(Te));
|
|
22940
22940
|
};
|
|
22941
22941
|
if (!(!ze || He)) {
|
|
22942
|
-
if (Re(
|
|
22943
|
-
return
|
|
22942
|
+
if (Re(pe.text))
|
|
22943
|
+
return pe.text;
|
|
22944
22944
|
if (Re(E))
|
|
22945
22945
|
return E;
|
|
22946
22946
|
if (Re(J))
|
|
@@ -22951,84 +22951,84 @@ var EllipsisTooltip = {};
|
|
|
22951
22951
|
}, [ze, He, J, Ge.title, bt]);
|
|
22952
22952
|
if (Ee)
|
|
22953
22953
|
return /* @__PURE__ */ v.createElement($.default, {
|
|
22954
|
-
value: (B =
|
|
22954
|
+
value: (B = pe.text) !== null && B !== void 0 ? B : typeof E == "string" ? E : "",
|
|
22955
22955
|
onSave: xe,
|
|
22956
|
-
onCancel:
|
|
22957
|
-
onEnd:
|
|
22958
|
-
prefixCls:
|
|
22956
|
+
onCancel: Ce,
|
|
22957
|
+
onEnd: pe.onEnd,
|
|
22958
|
+
prefixCls: ie,
|
|
22959
22959
|
className: q,
|
|
22960
22960
|
style: K,
|
|
22961
|
-
direction:
|
|
22962
|
-
component:
|
|
22963
|
-
maxLength:
|
|
22964
|
-
autoSize:
|
|
22965
|
-
enterIcon:
|
|
22961
|
+
direction: ye,
|
|
22962
|
+
component: te,
|
|
22963
|
+
maxLength: pe.maxLength,
|
|
22964
|
+
autoSize: pe.autoSize,
|
|
22965
|
+
enterIcon: pe.enterIcon
|
|
22966
22966
|
});
|
|
22967
22967
|
var jt = function() {
|
|
22968
|
-
var
|
|
22969
|
-
if (!
|
|
22968
|
+
var ge = Ne.expandable, Te = Ne.symbol;
|
|
22969
|
+
if (!ge)
|
|
22970
22970
|
return null;
|
|
22971
22971
|
var We;
|
|
22972
|
-
return Te ? We = Te : We =
|
|
22972
|
+
return Te ? We = Te : We = _e.expand, /* @__PURE__ */ v.createElement("a", {
|
|
22973
22973
|
key: "expand",
|
|
22974
|
-
className: "".concat(
|
|
22974
|
+
className: "".concat(ie, "-expand"),
|
|
22975
22975
|
onClick: Et,
|
|
22976
|
-
"aria-label":
|
|
22976
|
+
"aria-label": _e.expand
|
|
22977
22977
|
}, We);
|
|
22978
22978
|
}, Nt = function() {
|
|
22979
22979
|
if (!!oe) {
|
|
22980
|
-
var
|
|
22981
|
-
return
|
|
22980
|
+
var ge = pe.icon, Te = pe.tooltip, We = (0, g.default)(Te)[0] || _e.edit, Ue = typeof We == "string" ? We : "";
|
|
22981
|
+
return ve.includes("icon") ? /* @__PURE__ */ v.createElement(D.default, {
|
|
22982
22982
|
key: "edit",
|
|
22983
22983
|
title: Te === !1 ? "" : We
|
|
22984
22984
|
}, /* @__PURE__ */ v.createElement(C.default, {
|
|
22985
|
-
ref:
|
|
22986
|
-
className: "".concat(
|
|
22987
|
-
onClick:
|
|
22985
|
+
ref: Se,
|
|
22986
|
+
className: "".concat(ie, "-edit"),
|
|
22987
|
+
onClick: he,
|
|
22988
22988
|
"aria-label": Ue
|
|
22989
|
-
},
|
|
22989
|
+
}, ge || /* @__PURE__ */ v.createElement(c.default, {
|
|
22990
22990
|
role: "button"
|
|
22991
22991
|
}))) : null;
|
|
22992
22992
|
}
|
|
22993
22993
|
}, Lt = function() {
|
|
22994
22994
|
if (!!Ie) {
|
|
22995
|
-
var
|
|
22995
|
+
var ge = je.tooltips, Te = je.icon, We = j(ge), Ue = j(Te), rt = Fe ? k(We[1], _e.copied) : k(We[0], _e.copy), Wt = Fe ? _e.copied : _e.copy, Ut = typeof rt == "string" ? rt : Wt;
|
|
22996
22996
|
return /* @__PURE__ */ v.createElement(D.default, {
|
|
22997
22997
|
key: "copy",
|
|
22998
22998
|
title: rt
|
|
22999
22999
|
}, /* @__PURE__ */ v.createElement(C.default, {
|
|
23000
|
-
className: (0, d.default)("".concat(
|
|
23000
|
+
className: (0, d.default)("".concat(ie, "-copy"), Fe && "".concat(ie, "-copy-success")),
|
|
23001
23001
|
onClick: Qe,
|
|
23002
23002
|
"aria-label": Ut
|
|
23003
23003
|
}, Fe ? k(Ue[1], /* @__PURE__ */ v.createElement(u.default, null), !0) : k(Ue[0], /* @__PURE__ */ v.createElement(l.default, null), !0)));
|
|
23004
23004
|
}
|
|
23005
|
-
}, Vt = function(
|
|
23006
|
-
return [
|
|
23007
|
-
}, qt = function(
|
|
23008
|
-
return [
|
|
23005
|
+
}, Vt = function(ge) {
|
|
23006
|
+
return [ge && jt(), Nt(), Lt()];
|
|
23007
|
+
}, qt = function(ge) {
|
|
23008
|
+
return [ge && /* @__PURE__ */ v.createElement("span", {
|
|
23009
23009
|
"aria-hidden": !0,
|
|
23010
23010
|
key: "ellipsis"
|
|
23011
|
-
}, V), Ne.suffix, Vt(
|
|
23011
|
+
}, V), Ne.suffix, Vt(ge)];
|
|
23012
23012
|
};
|
|
23013
23013
|
return /* @__PURE__ */ v.createElement(p.default, {
|
|
23014
23014
|
onResize: It,
|
|
23015
23015
|
disabled: !Be || He
|
|
23016
23016
|
}, function(Re) {
|
|
23017
|
-
var
|
|
23017
|
+
var ge;
|
|
23018
23018
|
return /* @__PURE__ */ v.createElement(O.default, {
|
|
23019
23019
|
tooltipProps: Ge,
|
|
23020
23020
|
enabledEllipsis: Be,
|
|
23021
23021
|
isEllipsis: bt
|
|
23022
23022
|
}, /* @__PURE__ */ v.createElement(M.default, (0, a.default)({
|
|
23023
|
-
className: (0, d.default)((
|
|
23023
|
+
className: (0, d.default)((ge = {}, (0, n.default)(ge, "".concat(ie, "-").concat(Q), Q), (0, n.default)(ge, "".concat(ie, "-disabled"), X), (0, n.default)(ge, "".concat(ie, "-ellipsis"), ze), (0, n.default)(ge, "".concat(ie, "-single-line"), Be && Je === 1), (0, n.default)(ge, "".concat(ie, "-ellipsis-single-line"), Tt), (0, n.default)(ge, "".concat(ie, "-ellipsis-multiple-line"), ut), ge), q),
|
|
23024
23024
|
prefixCls: I,
|
|
23025
23025
|
style: (0, a.default)((0, a.default)({}, K), {
|
|
23026
23026
|
WebkitLineClamp: ut ? Je : void 0
|
|
23027
23027
|
}),
|
|
23028
|
-
component:
|
|
23029
|
-
ref: (0, h.composeRef)(Re,
|
|
23030
|
-
direction:
|
|
23031
|
-
onClick:
|
|
23028
|
+
component: te,
|
|
23029
|
+
ref: (0, h.composeRef)(Re, $e, U),
|
|
23030
|
+
direction: ye,
|
|
23031
|
+
onClick: ve.includes("text") ? he : void 0,
|
|
23032
23032
|
"aria-label": ct == null ? void 0 : ct.toString(),
|
|
23033
23033
|
title: J
|
|
23034
23034
|
}, ue), /* @__PURE__ */ v.createElement(A.default, {
|
|
@@ -23906,7 +23906,7 @@ function filterDuplicateItems(e) {
|
|
|
23906
23906
|
});
|
|
23907
23907
|
}
|
|
23908
23908
|
const One2manyInput = (e) => {
|
|
23909
|
-
var
|
|
23909
|
+
var Me;
|
|
23910
23910
|
const {
|
|
23911
23911
|
value: t,
|
|
23912
23912
|
onChange: r,
|
|
@@ -23950,24 +23950,24 @@ const One2manyInput = (e) => {
|
|
|
23950
23950
|
J();
|
|
23951
23951
|
}, [y]);
|
|
23952
23952
|
const z = (le) => {
|
|
23953
|
-
var
|
|
23953
|
+
var ve, be;
|
|
23954
23954
|
r == null || r({
|
|
23955
|
-
fields: ((
|
|
23955
|
+
fields: ((ve = a.get("form")) == null ? void 0 : ve.fields) || ((be = a.get("tree")) == null ? void 0 : be.fields),
|
|
23956
23956
|
items: filterDuplicateItems(le)
|
|
23957
23957
|
});
|
|
23958
23958
|
}, Z = async () => {
|
|
23959
|
-
await
|
|
23960
|
-
},
|
|
23961
|
-
var
|
|
23959
|
+
await te(), l > X.length - 1 && l !== 0 && c(0);
|
|
23960
|
+
}, te = async (le) => {
|
|
23961
|
+
var ve, be, he;
|
|
23962
23962
|
C(!0), _(!1), D(void 0);
|
|
23963
23963
|
try {
|
|
23964
|
-
const [xe,
|
|
23964
|
+
const [xe, Ce] = await readObjectValues({
|
|
23965
23965
|
treeView: {
|
|
23966
|
-
arch: (
|
|
23967
|
-
fields: (
|
|
23966
|
+
arch: (ve = a.get("tree")) == null ? void 0 : ve.arch,
|
|
23967
|
+
fields: (be = a.get("tree")) == null ? void 0 : be.fields
|
|
23968
23968
|
},
|
|
23969
23969
|
formView: {
|
|
23970
|
-
fields: ((
|
|
23970
|
+
fields: ((he = a.get("form")) == null ? void 0 : he.fields) || {}
|
|
23971
23971
|
},
|
|
23972
23972
|
model: B,
|
|
23973
23973
|
items: o,
|
|
@@ -23977,7 +23977,7 @@ const One2manyInput = (e) => {
|
|
|
23977
23977
|
},
|
|
23978
23978
|
currentView: le || s
|
|
23979
23979
|
});
|
|
23980
|
-
return L.current || (L.current = xe.map((Ae) => Ae.id)), (s || le) === "tree" &&
|
|
23980
|
+
return L.current || (L.current = xe.map((Ae) => Ae.id)), (s || le) === "tree" && Ce && H(Ce), z(xe), xe;
|
|
23981
23981
|
} catch (xe) {
|
|
23982
23982
|
D(xe);
|
|
23983
23983
|
} finally {
|
|
@@ -24001,22 +24001,22 @@ const One2manyInput = (e) => {
|
|
|
24001
24001
|
widgetFieldName: Q
|
|
24002
24002
|
})));
|
|
24003
24003
|
}
|
|
24004
|
-
const
|
|
24005
|
-
const le = Array.from(a.keys()),
|
|
24006
|
-
s === "form" ?
|
|
24007
|
-
u(
|
|
24008
|
-
}) : u(
|
|
24004
|
+
const ee = () => {
|
|
24005
|
+
const le = Array.from(a.keys()), ve = le[(le.indexOf(s) + 1) % le.length];
|
|
24006
|
+
s === "form" ? _e(() => {
|
|
24007
|
+
u(ve);
|
|
24008
|
+
}) : u(ve);
|
|
24009
24009
|
}, re = () => {
|
|
24010
|
-
l > 0 && (s === "form" ?
|
|
24010
|
+
l > 0 && (s === "form" ? _e(() => {
|
|
24011
24011
|
c(l - 1);
|
|
24012
24012
|
}) : c(l - 1));
|
|
24013
24013
|
}, se = () => {
|
|
24014
24014
|
const le = X.length;
|
|
24015
|
-
l < le - 1 && (s === "form" ?
|
|
24015
|
+
l < le - 1 && (s === "form" ? _e(() => {
|
|
24016
24016
|
c(l + 1);
|
|
24017
24017
|
}) : c(l + 1));
|
|
24018
|
-
},
|
|
24019
|
-
const le = X[l].id,
|
|
24018
|
+
}, ye = async () => {
|
|
24019
|
+
const le = X[l].id, ve = (await ConnectionProvider.getHandler().readObjects({
|
|
24020
24020
|
model: B,
|
|
24021
24021
|
ids: [le],
|
|
24022
24022
|
fields: a.get("form").fields,
|
|
@@ -24024,7 +24024,7 @@ const One2manyInput = (e) => {
|
|
|
24024
24024
|
...m == null ? void 0 : m(),
|
|
24025
24025
|
...I
|
|
24026
24026
|
}
|
|
24027
|
-
}))[0],
|
|
24027
|
+
}))[0], be = (await ConnectionProvider.getHandler().readObjects({
|
|
24028
24028
|
model: B,
|
|
24029
24029
|
ids: [le],
|
|
24030
24030
|
fields: a.get("tree").fields,
|
|
@@ -24032,26 +24032,26 @@ const One2manyInput = (e) => {
|
|
|
24032
24032
|
...m == null ? void 0 : m(),
|
|
24033
24033
|
...I
|
|
24034
24034
|
}
|
|
24035
|
-
}))[0],
|
|
24035
|
+
}))[0], he = o.map((xe) => xe.id === le ? {
|
|
24036
24036
|
...xe,
|
|
24037
24037
|
operation: "original",
|
|
24038
|
-
values:
|
|
24039
|
-
treeValues:
|
|
24038
|
+
values: ve,
|
|
24039
|
+
treeValues: be
|
|
24040
24040
|
} : xe);
|
|
24041
|
-
z(
|
|
24042
|
-
},
|
|
24041
|
+
z(he);
|
|
24042
|
+
}, _e = (le) => {
|
|
24043
24043
|
v ? showDialog$6({
|
|
24044
24044
|
lang: x,
|
|
24045
24045
|
onOk: () => {
|
|
24046
|
-
|
|
24046
|
+
ye(), le(), _(!1);
|
|
24047
24047
|
}
|
|
24048
24048
|
}) : le();
|
|
24049
|
-
},
|
|
24049
|
+
}, $e = () => {
|
|
24050
24050
|
if (K) {
|
|
24051
24051
|
showDialog$1({
|
|
24052
24052
|
lang: x,
|
|
24053
24053
|
onOk: () => {
|
|
24054
|
-
s === "form" ? ue() :
|
|
24054
|
+
s === "form" ? ue() : de();
|
|
24055
24055
|
}
|
|
24056
24056
|
});
|
|
24057
24057
|
return;
|
|
@@ -24059,35 +24059,35 @@ const One2manyInput = (e) => {
|
|
|
24059
24059
|
showDialog$2({
|
|
24060
24060
|
lang: x,
|
|
24061
24061
|
onOk: () => {
|
|
24062
|
-
s === "form" ? ue() :
|
|
24062
|
+
s === "form" ? ue() : de();
|
|
24063
24063
|
}
|
|
24064
24064
|
});
|
|
24065
|
-
},
|
|
24065
|
+
}, Se = async () => {
|
|
24066
24066
|
const {
|
|
24067
24067
|
inv_field: le
|
|
24068
24068
|
} = n;
|
|
24069
|
-
let
|
|
24070
|
-
le && f && (
|
|
24069
|
+
let ve;
|
|
24070
|
+
le && f && (ve = {
|
|
24071
24071
|
[le]: f
|
|
24072
|
-
}), s === "form" ?
|
|
24072
|
+
}), s === "form" ? _e(() => {
|
|
24073
24073
|
j(!0), O({
|
|
24074
|
-
defaultValues:
|
|
24074
|
+
defaultValues: ve
|
|
24075
24075
|
}), S(!0);
|
|
24076
24076
|
}) : (j(!0), O({
|
|
24077
|
-
defaultValues:
|
|
24077
|
+
defaultValues: ve
|
|
24078
24078
|
}), S(!0));
|
|
24079
|
-
},
|
|
24080
|
-
s === "form" ?
|
|
24079
|
+
}, ie = async () => {
|
|
24080
|
+
s === "form" ? _e(() => {
|
|
24081
24081
|
M(!0);
|
|
24082
24082
|
}) : M(!0);
|
|
24083
24083
|
}, ue = async () => {
|
|
24084
24084
|
C(!0), _(!1), D(void 0);
|
|
24085
24085
|
try {
|
|
24086
24086
|
if (X[l].id > 0) {
|
|
24087
|
-
const le = o.map((
|
|
24088
|
-
...
|
|
24087
|
+
const le = o.map((ve) => ve.id === X[l].id ? {
|
|
24088
|
+
...ve,
|
|
24089
24089
|
operation: "pendingRemove"
|
|
24090
|
-
} :
|
|
24090
|
+
} : ve);
|
|
24091
24091
|
z(le);
|
|
24092
24092
|
} else
|
|
24093
24093
|
z(o.filter((le) => le.id !== X[l].id));
|
|
@@ -24095,127 +24095,127 @@ const One2manyInput = (e) => {
|
|
|
24095
24095
|
D(le);
|
|
24096
24096
|
}
|
|
24097
24097
|
c(0), C(!1);
|
|
24098
|
-
},
|
|
24099
|
-
const le = X.filter((
|
|
24098
|
+
}, de = async () => {
|
|
24099
|
+
const le = X.filter((ve) => N.includes(ve.id));
|
|
24100
24100
|
C(!0), _(!1), D(void 0);
|
|
24101
24101
|
try {
|
|
24102
|
-
const
|
|
24103
|
-
...
|
|
24102
|
+
const ve = le.map((he) => he.id), be = o.filter((he) => !(ve.includes(he.id) && he.id < 0)).map((he) => ve.includes(he.id) ? {
|
|
24103
|
+
...he,
|
|
24104
24104
|
operation: "pendingRemove"
|
|
24105
|
-
} :
|
|
24106
|
-
z(
|
|
24107
|
-
} catch (
|
|
24108
|
-
D(
|
|
24105
|
+
} : he);
|
|
24106
|
+
z(be);
|
|
24107
|
+
} catch (ve) {
|
|
24108
|
+
D(ve);
|
|
24109
24109
|
}
|
|
24110
24110
|
c(0), C(!1);
|
|
24111
|
-
},
|
|
24112
|
-
let
|
|
24111
|
+
}, fe = (le, ve, be) => {
|
|
24112
|
+
let he;
|
|
24113
24113
|
if (le)
|
|
24114
|
-
|
|
24114
|
+
he = o.map((xe) => xe.id === le ? {
|
|
24115
24115
|
id: le,
|
|
24116
24116
|
operation: le > 0 ? "pendingUpdate" : "pendingCreate",
|
|
24117
24117
|
values: {
|
|
24118
|
-
...
|
|
24118
|
+
...be,
|
|
24119
24119
|
id: le
|
|
24120
24120
|
},
|
|
24121
24121
|
treeValues: {
|
|
24122
|
-
...
|
|
24122
|
+
...be,
|
|
24123
24123
|
id: le
|
|
24124
24124
|
}
|
|
24125
24125
|
} : xe);
|
|
24126
24126
|
else {
|
|
24127
24127
|
const xe = getNextPendingId(o);
|
|
24128
|
-
|
|
24128
|
+
he = o.concat({
|
|
24129
24129
|
id: xe,
|
|
24130
24130
|
operation: "pendingCreate",
|
|
24131
24131
|
values: {
|
|
24132
|
-
...
|
|
24132
|
+
...be,
|
|
24133
24133
|
id: xe
|
|
24134
24134
|
},
|
|
24135
24135
|
treeValues: {
|
|
24136
|
-
...
|
|
24136
|
+
...be,
|
|
24137
24137
|
id: xe
|
|
24138
24138
|
}
|
|
24139
24139
|
});
|
|
24140
24140
|
}
|
|
24141
|
-
z(
|
|
24141
|
+
z(he), k || S(!1);
|
|
24142
24142
|
}, oe = async (le) => {
|
|
24143
24143
|
const {
|
|
24144
|
-
id:
|
|
24144
|
+
id: ve
|
|
24145
24145
|
} = le;
|
|
24146
|
-
let
|
|
24147
|
-
const
|
|
24148
|
-
(
|
|
24149
|
-
},
|
|
24146
|
+
let be = o;
|
|
24147
|
+
const he = o.find((xe) => xe.id === ve);
|
|
24148
|
+
(he == null ? void 0 : he.values) === void 0 && (be = await te("form")), O(be.find((xe) => xe.id === ve)), j(!1), S(!0);
|
|
24149
|
+
}, pe = async (le) => {
|
|
24150
24150
|
C(!0);
|
|
24151
|
-
let
|
|
24152
|
-
const
|
|
24151
|
+
let ve = o;
|
|
24152
|
+
const be = le.filter((he) => !o.find((xe) => xe.id === he));
|
|
24153
24153
|
try {
|
|
24154
|
-
for (const
|
|
24154
|
+
for (const he of be) {
|
|
24155
24155
|
const xe = (await ConnectionProvider.getHandler().readObjects({
|
|
24156
24156
|
model: B,
|
|
24157
|
-
ids: [
|
|
24157
|
+
ids: [he],
|
|
24158
24158
|
fields: a.get("form").fields,
|
|
24159
24159
|
context: {
|
|
24160
24160
|
...m == null ? void 0 : m(),
|
|
24161
24161
|
...I
|
|
24162
24162
|
}
|
|
24163
|
-
}))[0],
|
|
24163
|
+
}))[0], Ce = (await ConnectionProvider.getHandler().readObjects({
|
|
24164
24164
|
model: B,
|
|
24165
|
-
ids: [
|
|
24165
|
+
ids: [he],
|
|
24166
24166
|
fields: a.get("tree").fields,
|
|
24167
24167
|
context: {
|
|
24168
24168
|
...m == null ? void 0 : m(),
|
|
24169
24169
|
...I
|
|
24170
24170
|
}
|
|
24171
24171
|
}))[0];
|
|
24172
|
-
|
|
24173
|
-
id:
|
|
24172
|
+
ve.push({
|
|
24173
|
+
id: he,
|
|
24174
24174
|
operation: "pendingLink",
|
|
24175
24175
|
values: xe,
|
|
24176
|
-
treeValues:
|
|
24176
|
+
treeValues: Ce
|
|
24177
24177
|
});
|
|
24178
24178
|
}
|
|
24179
|
-
z(
|
|
24180
|
-
} catch (
|
|
24181
|
-
D(
|
|
24179
|
+
z(ve);
|
|
24180
|
+
} catch (he) {
|
|
24181
|
+
D(he);
|
|
24182
24182
|
} finally {
|
|
24183
24183
|
C(!1);
|
|
24184
24184
|
}
|
|
24185
24185
|
};
|
|
24186
|
-
function
|
|
24186
|
+
function we() {
|
|
24187
24187
|
const le = ViewObjects[s];
|
|
24188
24188
|
if (s === "graph")
|
|
24189
24189
|
return parseGraph(a.get("graph").arch).string;
|
|
24190
24190
|
{
|
|
24191
|
-
const
|
|
24192
|
-
return
|
|
24191
|
+
const ve = new le(a.get(s).fields);
|
|
24192
|
+
return ve.parse(a.get(s).arch), ve.string;
|
|
24193
24193
|
}
|
|
24194
24194
|
}
|
|
24195
|
-
const
|
|
24196
|
-
var
|
|
24195
|
+
const ke = () => {
|
|
24196
|
+
var ve, be, he, xe;
|
|
24197
24197
|
if (s === "form")
|
|
24198
|
-
return X.length === 0 ? h("noCurrentEntries") : s !== E.current && o.some((
|
|
24198
|
+
return X.length === 0 ? h("noCurrentEntries") : s !== E.current && o.some((Ce) => !Ce.values) ? /* @__PURE__ */ jsx(Spin, {}) : /* @__PURE__ */ jsx(Form$1, {
|
|
24199
24199
|
formView: a.get("form"),
|
|
24200
|
-
values: (
|
|
24200
|
+
values: (ve = X[l]) == null ? void 0 : ve.values,
|
|
24201
24201
|
parentContext: {
|
|
24202
24202
|
...m == null ? void 0 : m(),
|
|
24203
24203
|
...I
|
|
24204
24204
|
},
|
|
24205
24205
|
model: B,
|
|
24206
|
-
id: (
|
|
24206
|
+
id: (be = X[l]) == null ? void 0 : be.id,
|
|
24207
24207
|
submitMode: "values",
|
|
24208
|
-
onFieldsChange: (
|
|
24208
|
+
onFieldsChange: (Ce) => {
|
|
24209
24209
|
var Ie;
|
|
24210
24210
|
const Ae = (Ie = X[l]) == null ? void 0 : Ie.id, Ve = o.map((je) => je.id === Ae ? {
|
|
24211
24211
|
...je,
|
|
24212
24212
|
operation: je.operation === "original" ? "pendingUpdate" : je.operation,
|
|
24213
24213
|
values: {
|
|
24214
|
-
...
|
|
24214
|
+
...Ce,
|
|
24215
24215
|
id: Ae
|
|
24216
24216
|
},
|
|
24217
24217
|
treeValues: {
|
|
24218
|
-
...
|
|
24218
|
+
...Ce,
|
|
24219
24219
|
id: Ae
|
|
24220
24220
|
}
|
|
24221
24221
|
} : je);
|
|
@@ -24224,14 +24224,14 @@ const One2manyInput = (e) => {
|
|
|
24224
24224
|
readOnly: G
|
|
24225
24225
|
});
|
|
24226
24226
|
let le = [];
|
|
24227
|
-
if (X.some((
|
|
24228
|
-
resultsToSort: X.map((
|
|
24227
|
+
if (X.some((Ce) => Ce.treeValues) && (le = Y ? sortResults({
|
|
24228
|
+
resultsToSort: X.map((Ce) => Ce.treeValues),
|
|
24229
24229
|
sorter: Y,
|
|
24230
24230
|
fields: {
|
|
24231
24231
|
...a.get("tree").fields,
|
|
24232
|
-
...((
|
|
24232
|
+
...((he = a.get("form")) == null ? void 0 : he.fields) || {}
|
|
24233
24233
|
}
|
|
24234
|
-
}) : X.map((
|
|
24234
|
+
}) : X.map((Ce) => Ce.treeValues)), s === "tree")
|
|
24235
24235
|
return /* @__PURE__ */ jsx(Tree, {
|
|
24236
24236
|
total: X.length,
|
|
24237
24237
|
limit: X.length,
|
|
@@ -24253,11 +24253,11 @@ const One2manyInput = (e) => {
|
|
|
24253
24253
|
colorsForResults: U
|
|
24254
24254
|
});
|
|
24255
24255
|
if (s === "graph") {
|
|
24256
|
-
const
|
|
24256
|
+
const Ce = [[`${n.inv_field}`, "=", f]];
|
|
24257
24257
|
return /* @__PURE__ */ jsx(Graph, {
|
|
24258
24258
|
view_id: a.get("graph").view_id,
|
|
24259
24259
|
model: n.relation,
|
|
24260
|
-
domain:
|
|
24260
|
+
domain: Ce,
|
|
24261
24261
|
context: {
|
|
24262
24262
|
...m == null ? void 0 : m(),
|
|
24263
24263
|
...I
|
|
@@ -24277,22 +24277,22 @@ const One2manyInput = (e) => {
|
|
|
24277
24277
|
return b ? /* @__PURE__ */ jsx(Spin, {}) : /* @__PURE__ */ jsxs(Fragment, {
|
|
24278
24278
|
children: [/* @__PURE__ */ jsx(One2manyTopBar, {
|
|
24279
24279
|
mode: s,
|
|
24280
|
-
title:
|
|
24280
|
+
title: we(),
|
|
24281
24281
|
readOnly: G,
|
|
24282
24282
|
isMany2Many: K,
|
|
24283
24283
|
formHasChanges: v,
|
|
24284
24284
|
totalItems: X.length,
|
|
24285
24285
|
currentItemIndex: l,
|
|
24286
|
-
onDelete:
|
|
24287
|
-
onCreateItem:
|
|
24288
|
-
onToggleViewMode:
|
|
24286
|
+
onDelete: $e,
|
|
24287
|
+
onCreateItem: Se,
|
|
24288
|
+
onToggleViewMode: ee,
|
|
24289
24289
|
onPreviousItem: re,
|
|
24290
24290
|
onNextItem: se,
|
|
24291
|
-
onSearchItem:
|
|
24291
|
+
onSearchItem: ie,
|
|
24292
24292
|
selectedRowKeys: N,
|
|
24293
|
-
showCreateButton: ((
|
|
24293
|
+
showCreateButton: ((Me = a.get("form")) == null ? void 0 : Me.fields) !== void 0,
|
|
24294
24294
|
showToggleButton: a.size > 1
|
|
24295
|
-
}),
|
|
24295
|
+
}), ke(), /* @__PURE__ */ jsx(FormModal, {
|
|
24296
24296
|
formView: a.get("form"),
|
|
24297
24297
|
model: B,
|
|
24298
24298
|
id: A == null ? void 0 : A.id,
|
|
@@ -24300,7 +24300,7 @@ const One2manyInput = (e) => {
|
|
|
24300
24300
|
values: A == null ? void 0 : A.values,
|
|
24301
24301
|
defaultValues: A == null ? void 0 : A.defaultValues,
|
|
24302
24302
|
visible: $,
|
|
24303
|
-
onSubmitSucceed:
|
|
24303
|
+
onSubmitSucceed: fe,
|
|
24304
24304
|
parentContext: {
|
|
24305
24305
|
...m == null ? void 0 : m(),
|
|
24306
24306
|
...I
|
|
@@ -24319,7 +24319,7 @@ const One2manyInput = (e) => {
|
|
|
24319
24319
|
},
|
|
24320
24320
|
visible: P,
|
|
24321
24321
|
onSelectValues: async (le) => {
|
|
24322
|
-
M(!1),
|
|
24322
|
+
M(!1), pe(le);
|
|
24323
24323
|
},
|
|
24324
24324
|
onCloseModal: () => {
|
|
24325
24325
|
M(!1);
|
|
@@ -27028,126 +27028,127 @@ function ActionView(e, t) {
|
|
|
27028
27028
|
setCurrentId: E,
|
|
27029
27029
|
tabs: T,
|
|
27030
27030
|
activeKey: z,
|
|
27031
|
-
openAction: Z
|
|
27031
|
+
openAction: Z,
|
|
27032
|
+
onRemoveTab: te
|
|
27032
27033
|
} = Q || {};
|
|
27033
27034
|
useHotkeys("ctrl+g,command+g", (ie) => {
|
|
27034
|
-
ie.preventDefault(),
|
|
27035
|
+
ie.preventDefault(), ye();
|
|
27035
27036
|
}, [z, T, h, A, N]);
|
|
27036
|
-
function
|
|
27037
|
+
function J(ie) {
|
|
27037
27038
|
S(ie), E == null || E(ie);
|
|
27038
27039
|
}
|
|
27039
|
-
function
|
|
27040
|
+
function ee(ie) {
|
|
27040
27041
|
v(ie), X == null || X(ie);
|
|
27041
27042
|
}
|
|
27042
27043
|
useImperativeHandle(t, () => ({
|
|
27043
|
-
canWeClose:
|
|
27044
|
+
canWeClose: se
|
|
27044
27045
|
}));
|
|
27045
|
-
const
|
|
27046
|
+
const re = async () => {
|
|
27046
27047
|
w(!0);
|
|
27047
27048
|
const ie = [];
|
|
27048
|
-
for (const
|
|
27049
|
-
const [
|
|
27050
|
-
let
|
|
27049
|
+
for (const de of o) {
|
|
27050
|
+
const [fe, oe] = de;
|
|
27051
|
+
let pe;
|
|
27051
27052
|
try {
|
|
27052
|
-
|
|
27053
|
+
oe !== "dashboard" && (pe = await ConnectionProvider.getHandler().getView({
|
|
27053
27054
|
model: n,
|
|
27054
|
-
type:
|
|
27055
|
-
id:
|
|
27055
|
+
type: oe,
|
|
27056
|
+
id: fe,
|
|
27056
27057
|
context: a
|
|
27057
27058
|
}));
|
|
27058
|
-
} catch (
|
|
27059
|
-
console.error(`${n} - ${
|
|
27059
|
+
} catch (we) {
|
|
27060
|
+
console.error(`${n} - ${oe}\xA0- ${JSON.stringify(we, null, 2)}`);
|
|
27060
27061
|
continue;
|
|
27061
27062
|
}
|
|
27062
|
-
switch (
|
|
27063
|
+
switch (oe) {
|
|
27063
27064
|
case "dashboard": {
|
|
27064
|
-
const
|
|
27065
|
-
const [,
|
|
27066
|
-
return
|
|
27065
|
+
const we = o.find((Ee) => {
|
|
27066
|
+
const [, Me] = Ee;
|
|
27067
|
+
return Me === "form";
|
|
27067
27068
|
});
|
|
27068
|
-
let
|
|
27069
|
-
|
|
27069
|
+
let ke;
|
|
27070
|
+
we && (ke = {
|
|
27070
27071
|
action_id: g,
|
|
27071
27072
|
action_type: m,
|
|
27072
27073
|
name: s,
|
|
27073
27074
|
res_id: a.active_id,
|
|
27074
27075
|
res_model: n,
|
|
27075
|
-
view_id:
|
|
27076
|
-
view_type:
|
|
27076
|
+
view_id: we[0],
|
|
27077
|
+
view_type: we[1]
|
|
27077
27078
|
}), ie.push({
|
|
27078
27079
|
type: "dashboard",
|
|
27079
27080
|
id: a.active_id,
|
|
27080
27081
|
model: n,
|
|
27081
27082
|
context: a,
|
|
27082
|
-
configAction:
|
|
27083
|
+
configAction: ke
|
|
27083
27084
|
});
|
|
27084
27085
|
break;
|
|
27085
27086
|
}
|
|
27086
27087
|
case "form": {
|
|
27087
27088
|
ie.push({
|
|
27088
|
-
...
|
|
27089
|
-
type:
|
|
27089
|
+
...pe,
|
|
27090
|
+
type: oe
|
|
27090
27091
|
});
|
|
27091
27092
|
break;
|
|
27092
27093
|
}
|
|
27093
27094
|
case "tree": {
|
|
27094
27095
|
ie.push({
|
|
27095
|
-
...
|
|
27096
|
+
...pe,
|
|
27096
27097
|
isExpandable: y,
|
|
27097
|
-
type:
|
|
27098
|
+
type: oe
|
|
27098
27099
|
});
|
|
27099
27100
|
break;
|
|
27100
27101
|
}
|
|
27101
27102
|
case "graph": {
|
|
27102
27103
|
ie.push({
|
|
27103
|
-
...
|
|
27104
|
-
type:
|
|
27104
|
+
...pe,
|
|
27105
|
+
type: oe
|
|
27105
27106
|
});
|
|
27106
27107
|
break;
|
|
27107
27108
|
}
|
|
27108
27109
|
}
|
|
27109
27110
|
}
|
|
27110
|
-
let
|
|
27111
|
-
!c && ie.find((
|
|
27112
|
-
Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`),
|
|
27111
|
+
let ue;
|
|
27112
|
+
!c && ie.find((de) => de.type === "tree") ? ue = ie.find((fe) => fe.type === "tree") : c ? ue = ie.find((fe) => c.id ? fe.type === c.type && fe.view_id === c.id : fe.type === c.type) : ue = ie.find((fe) => fe.type === "form"), ue || (showDialog$8(`Error determining the first view to show for model ${n}.
|
|
27113
|
+
Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`), te == null || te(l)), ee(ue), b(ie), w(!1);
|
|
27113
27114
|
};
|
|
27114
27115
|
u({
|
|
27115
27116
|
tabKey: l,
|
|
27116
|
-
canWeClose:
|
|
27117
|
+
canWeClose: se
|
|
27117
27118
|
}), useEffect(() => {
|
|
27118
|
-
const ie = _.find((
|
|
27119
|
-
|
|
27119
|
+
const ie = _.find((de) => de.type === "tree"), ue = _.find((de) => c.id ? de.type === c.type && de.view_id === c.id : de.type === c.type);
|
|
27120
|
+
ee(ue || ie), p ? E == null || E(D) : (J(void 0), O(void 0)), re();
|
|
27120
27121
|
}, [n, o, p]), useEffect(() => {
|
|
27121
27122
|
z === l && (E == null || E($), X == null || X(h));
|
|
27122
27123
|
}, [T, z]);
|
|
27123
|
-
async function re() {
|
|
27124
|
-
return h.type === "form" ? await q.current.cancelUnsavedChanges() : !0;
|
|
27125
|
-
}
|
|
27126
27124
|
async function se() {
|
|
27125
|
+
return h && h.type === "form" ? await q.current.cancelUnsavedChanges() : !0;
|
|
27126
|
+
}
|
|
27127
|
+
async function ye() {
|
|
27127
27128
|
z === l && (h.type === "form" && !await q.current.cancelUnsavedChanges() || L(!0));
|
|
27128
27129
|
}
|
|
27129
27130
|
async function _e(ie) {
|
|
27130
|
-
var
|
|
27131
|
+
var oe;
|
|
27131
27132
|
H(!0);
|
|
27132
|
-
const
|
|
27133
|
-
let
|
|
27134
|
-
if (
|
|
27133
|
+
const ue = N.findIndex((pe) => pe.id === ie);
|
|
27134
|
+
let de;
|
|
27135
|
+
if (ue === -1) {
|
|
27135
27136
|
try {
|
|
27136
|
-
|
|
27137
|
+
de = (oe = await ConnectionProvider.getHandler().readObjects({
|
|
27137
27138
|
model: n,
|
|
27138
27139
|
ids: [ie],
|
|
27139
27140
|
context: a
|
|
27140
|
-
})) == null ? void 0 :
|
|
27141
|
+
})) == null ? void 0 : oe[0];
|
|
27141
27142
|
} catch {
|
|
27142
27143
|
}
|
|
27143
|
-
if (!
|
|
27144
|
+
if (!de) {
|
|
27144
27145
|
H(!1), L(!1), showDialog$7(I("idNotFound"));
|
|
27145
27146
|
return;
|
|
27146
27147
|
}
|
|
27147
27148
|
} else
|
|
27148
|
-
|
|
27149
|
+
de = N[ue];
|
|
27149
27150
|
H(!1), L(!1);
|
|
27150
|
-
const
|
|
27151
|
+
const fe = o.find((pe) => pe[1] === "form");
|
|
27151
27152
|
Z({
|
|
27152
27153
|
domain: [],
|
|
27153
27154
|
context: a,
|
|
@@ -27156,7 +27157,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
27156
27157
|
title: s,
|
|
27157
27158
|
target: "current",
|
|
27158
27159
|
initialView: {
|
|
27159
|
-
id:
|
|
27160
|
+
id: fe == null ? void 0 : fe[0],
|
|
27160
27161
|
type: "form"
|
|
27161
27162
|
},
|
|
27162
27163
|
action_id: g,
|
|
@@ -27164,7 +27165,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
27164
27165
|
res_id: ie
|
|
27165
27166
|
});
|
|
27166
27167
|
}
|
|
27167
|
-
function
|
|
27168
|
+
function $e() {
|
|
27168
27169
|
return _.map((ie) => {
|
|
27169
27170
|
switch (ie.type) {
|
|
27170
27171
|
case "form":
|
|
@@ -27189,15 +27190,15 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
27189
27190
|
model: n,
|
|
27190
27191
|
context: a,
|
|
27191
27192
|
domain: r,
|
|
27192
|
-
formView: _.find((
|
|
27193
|
+
formView: _.find((ue) => ue.type === "form"),
|
|
27193
27194
|
treeView: ie,
|
|
27194
27195
|
searchTreeRef: K,
|
|
27195
27196
|
searchTreeNameSearch: G,
|
|
27196
27197
|
availableViews: _,
|
|
27197
27198
|
results: N,
|
|
27198
27199
|
setCurrentItemIndex: O,
|
|
27199
|
-
setCurrentId:
|
|
27200
|
-
setCurrentView:
|
|
27200
|
+
setCurrentId: J,
|
|
27201
|
+
setCurrentView: ee
|
|
27201
27202
|
}, `${ie.type}-${ie.view_id}`);
|
|
27202
27203
|
case "graph":
|
|
27203
27204
|
return /* @__PURE__ */ jsx(GraphActionView, {
|
|
@@ -27206,8 +27207,8 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
27206
27207
|
model: n,
|
|
27207
27208
|
context: a,
|
|
27208
27209
|
domain: r,
|
|
27209
|
-
treeView: _.find((
|
|
27210
|
-
formView: _.find((
|
|
27210
|
+
treeView: _.find((ue) => ue.type === "tree"),
|
|
27211
|
+
formView: _.find((ue) => ue.type === "form")
|
|
27211
27212
|
}, `${ie.type}-${ie.view_id}`);
|
|
27212
27213
|
case "dashboard":
|
|
27213
27214
|
return /* @__PURE__ */ jsx(DashboardActionView, {
|
|
@@ -27220,21 +27221,21 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
27220
27221
|
if ($ === void 0 && h.type === "form")
|
|
27221
27222
|
q.current.clearAndReload();
|
|
27222
27223
|
else {
|
|
27223
|
-
|
|
27224
|
-
const ie = _.find((
|
|
27225
|
-
|
|
27224
|
+
J(void 0);
|
|
27225
|
+
const ie = _.find((ue) => ue.type === "form");
|
|
27226
|
+
ee(ie);
|
|
27226
27227
|
}
|
|
27227
27228
|
}
|
|
27228
27229
|
return C ? /* @__PURE__ */ jsx(Spin, {}) : h ? /* @__PURE__ */ jsxs(ActionViewProvider, {
|
|
27229
27230
|
title: s,
|
|
27230
27231
|
currentView: h,
|
|
27231
|
-
setCurrentView:
|
|
27232
|
+
setCurrentView: ee,
|
|
27232
27233
|
availableViews: _,
|
|
27233
27234
|
formRef: q,
|
|
27234
27235
|
searchTreeRef: K,
|
|
27235
27236
|
onNewClicked: Se,
|
|
27236
27237
|
currentId: $,
|
|
27237
|
-
setCurrentId:
|
|
27238
|
+
setCurrentId: J,
|
|
27238
27239
|
setCurrentItemIndex: O,
|
|
27239
27240
|
currentItemIndex: A,
|
|
27240
27241
|
results: N,
|
|
@@ -27250,7 +27251,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
27250
27251
|
searchTreeNameSearch: G,
|
|
27251
27252
|
goToResourceId: _e,
|
|
27252
27253
|
limit: x,
|
|
27253
|
-
children: [
|
|
27254
|
+
children: [$e(), /* @__PURE__ */ jsx(GoToResourceModal, {
|
|
27254
27255
|
visible: W,
|
|
27255
27256
|
onIdSubmitted: _e,
|
|
27256
27257
|
isSearching: U,
|
|
@@ -27456,7 +27457,7 @@ function DashboardTree(e) {
|
|
|
27456
27457
|
colors: z
|
|
27457
27458
|
} = getTree(m), {
|
|
27458
27459
|
totalItems: Z,
|
|
27459
|
-
results:
|
|
27460
|
+
results: te,
|
|
27460
27461
|
attrsEvaluated: J
|
|
27461
27462
|
} = await ConnectionProvider.getHandler().searchForTree({
|
|
27462
27463
|
params: T,
|
|
@@ -27468,10 +27469,10 @@ function DashboardTree(e) {
|
|
|
27468
27469
|
attrs: z && {
|
|
27469
27470
|
colors: z
|
|
27470
27471
|
}
|
|
27471
|
-
}),
|
|
27472
|
-
S(
|
|
27472
|
+
}), ee = await Z;
|
|
27473
|
+
S(ee), O(getColorMap(J));
|
|
27473
27474
|
const re = sortResults({
|
|
27474
|
-
resultsToSort:
|
|
27475
|
+
resultsToSort: te,
|
|
27475
27476
|
sorter: N,
|
|
27476
27477
|
fields: {
|
|
27477
27478
|
...m.fields,
|
|
@@ -27815,13 +27816,13 @@ function Dashboard(e, t) {
|
|
|
27815
27816
|
actionId: T,
|
|
27816
27817
|
actionType: z,
|
|
27817
27818
|
title: Z,
|
|
27818
|
-
model:
|
|
27819
|
+
model: te
|
|
27819
27820
|
} = P, J = {
|
|
27820
27821
|
action_id: T,
|
|
27821
27822
|
action_type: z,
|
|
27822
27823
|
name: Z,
|
|
27823
27824
|
res_id: K.id,
|
|
27824
|
-
res_model:
|
|
27825
|
+
res_model: te,
|
|
27825
27826
|
view_id: X,
|
|
27826
27827
|
view_type: E
|
|
27827
27828
|
};
|