@gisce/react-ooui 1.1.5 → 1.1.6
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
|
@@ -13222,10 +13222,10 @@ function require_stream_readable() {
|
|
|
13222
13222
|
break;
|
|
13223
13223
|
}
|
|
13224
13224
|
Q.pipesCount += 1, l("pipe count=%d opts=%j", Q.pipesCount, T);
|
|
13225
|
-
var ne = (!T || T.end !== !1) && F !== process.stdout && F !== process.stderr, J = ne ? oe :
|
|
13225
|
+
var ne = (!T || T.end !== !1) && F !== process.stdout && F !== process.stderr, J = ne ? oe : he;
|
|
13226
13226
|
Q.endEmitted ? process.nextTick(J) : Y.once("end", J), F.on("unpipe", ee);
|
|
13227
|
-
function ee(xe,
|
|
13228
|
-
l("onunpipe"), xe === Y &&
|
|
13227
|
+
function ee(xe, ve) {
|
|
13228
|
+
l("onunpipe"), xe === Y && ve && ve.hasUnpiped === !1 && (ve.hasUnpiped = !0, pe());
|
|
13229
13229
|
}
|
|
13230
13230
|
function oe() {
|
|
13231
13231
|
l("onend"), F.end();
|
|
@@ -13234,27 +13234,27 @@ function require_stream_readable() {
|
|
|
13234
13234
|
F.on("drain", le);
|
|
13235
13235
|
var ae = !1;
|
|
13236
13236
|
function pe() {
|
|
13237
|
-
l("cleanup"), F.removeListener("close",
|
|
13237
|
+
l("cleanup"), F.removeListener("close", de), F.removeListener("finish", Ie), F.removeListener("drain", le), F.removeListener("error", ie), F.removeListener("unpipe", ee), Y.removeListener("end", oe), Y.removeListener("end", he), Y.removeListener("data", me), ae = !0, Q.awaitDrain && (!F._writableState || F._writableState.needDrain) && le();
|
|
13238
13238
|
}
|
|
13239
13239
|
Y.on("data", me);
|
|
13240
13240
|
function me(xe) {
|
|
13241
13241
|
l("ondata");
|
|
13242
|
-
var
|
|
13243
|
-
l("dest.write",
|
|
13242
|
+
var ve = F.write(xe);
|
|
13243
|
+
l("dest.write", ve), ve === !1 && ((Q.pipesCount === 1 && Q.pipes === F || Q.pipesCount > 1 && X(Q.pipes, F) !== -1) && !ae && (l("false write response, pause", Q.awaitDrain), Q.awaitDrain++), Y.pause());
|
|
13244
13244
|
}
|
|
13245
13245
|
function ie(xe) {
|
|
13246
|
-
l("onerror", xe),
|
|
13246
|
+
l("onerror", xe), he(), F.removeListener("error", ie), t(F, "error") === 0 && O(F, xe);
|
|
13247
13247
|
}
|
|
13248
13248
|
E(F, "error", ie);
|
|
13249
|
-
function
|
|
13250
|
-
F.removeListener("finish",
|
|
13249
|
+
function de() {
|
|
13250
|
+
F.removeListener("finish", Ie), he();
|
|
13251
13251
|
}
|
|
13252
|
-
F.once("close",
|
|
13253
|
-
function
|
|
13254
|
-
l("onfinish"), F.removeListener("close",
|
|
13252
|
+
F.once("close", de);
|
|
13253
|
+
function Ie() {
|
|
13254
|
+
l("onfinish"), F.removeListener("close", de), he();
|
|
13255
13255
|
}
|
|
13256
|
-
F.once("finish",
|
|
13257
|
-
function
|
|
13256
|
+
F.once("finish", Ie);
|
|
13257
|
+
function he() {
|
|
13258
13258
|
l("unpipe"), Y.unpipe(F);
|
|
13259
13259
|
}
|
|
13260
13260
|
return F.emit("pipe", Y), Q.flowing || (l("pipe resume"), Y.resume()), F;
|
|
@@ -16498,20 +16498,20 @@ const DEFAULT_SEARCH_LIMIT$1 = 80, useSearch = (e) => {
|
|
|
16498
16498
|
attrs: ae && { colors: ae }
|
|
16499
16499
|
});
|
|
16500
16500
|
Z(getColorMap(ie)), H.current = [...me];
|
|
16501
|
-
const
|
|
16501
|
+
const de = h !== void 0 ? sortResults({
|
|
16502
16502
|
resultsToSort: me,
|
|
16503
16503
|
sorter: h,
|
|
16504
16504
|
fields: { ...f.fields, ...p.fields }
|
|
16505
16505
|
}) : [...H.current];
|
|
16506
|
-
if (P(
|
|
16507
|
-
const
|
|
16506
|
+
if (P(de), I && de.length > 0) {
|
|
16507
|
+
const he = de.findIndex(
|
|
16508
16508
|
(xe) => C === xe.id
|
|
16509
16509
|
);
|
|
16510
|
-
|
|
16510
|
+
he === -1 ? v == null || v(0) : v == null || v(he);
|
|
16511
16511
|
} else
|
|
16512
16512
|
v == null || v(void 0);
|
|
16513
|
-
const
|
|
16514
|
-
U(
|
|
16513
|
+
const Ie = await pe;
|
|
16514
|
+
U(Ie), d == null || d(Ie);
|
|
16515
16515
|
},
|
|
16516
16516
|
[
|
|
16517
16517
|
v,
|
|
@@ -17075,12 +17075,12 @@ function Form(e, t) {
|
|
|
17075
17075
|
} = oe || {};
|
|
17076
17076
|
useImperativeHandle(t, () => ({
|
|
17077
17077
|
submitForm: ke,
|
|
17078
|
-
getFields:
|
|
17079
|
-
getValues:
|
|
17078
|
+
getFields: Ie,
|
|
17079
|
+
getValues: he,
|
|
17080
17080
|
getPlainValues: xe,
|
|
17081
17081
|
getContext: Te,
|
|
17082
17082
|
fetchValues: Re,
|
|
17083
|
-
cancelUnsavedChanges:
|
|
17083
|
+
cancelUnsavedChanges: _e,
|
|
17084
17084
|
clearAndReload: () => {
|
|
17085
17085
|
V.current = void 0, D(void 0), Fe();
|
|
17086
17086
|
}
|
|
@@ -17104,32 +17104,32 @@ function Form(e, t) {
|
|
|
17104
17104
|
}, ie = (re) => {
|
|
17105
17105
|
Y == null || Y(!1), u == null || u(re);
|
|
17106
17106
|
};
|
|
17107
|
-
function
|
|
17107
|
+
function de() {
|
|
17108
17108
|
return r || V.current;
|
|
17109
17109
|
}
|
|
17110
|
-
function
|
|
17110
|
+
function Ie() {
|
|
17111
17111
|
return $;
|
|
17112
17112
|
}
|
|
17113
|
-
function
|
|
17113
|
+
function he() {
|
|
17114
17114
|
const re = {
|
|
17115
|
-
...
|
|
17116
|
-
...
|
|
17115
|
+
...ge($),
|
|
17116
|
+
...be()
|
|
17117
17117
|
};
|
|
17118
17118
|
for (const te in re)
|
|
17119
17119
|
re[te] === void 0 && delete re[te];
|
|
17120
17120
|
return re;
|
|
17121
17121
|
}
|
|
17122
17122
|
function xe() {
|
|
17123
|
-
const re =
|
|
17123
|
+
const re = he(), te = Ie();
|
|
17124
17124
|
let ue = {};
|
|
17125
17125
|
return Object.keys(re).forEach((fe) => {
|
|
17126
17126
|
const Ce = re[fe];
|
|
17127
17127
|
te[fe] && te[fe].type === "many2one" && Ce && Array.isArray(Ce) && Ce.length === 2 ? ue[fe] = Ce[0] : te[fe] && (te[fe].type === "one2many" || te[fe].type === "many2many") && Ce && Ce.items ? ue[fe] = Ce.items.filter((Pe) => Pe.operation !== "pendingRemove").map((Pe) => Pe.id) : ue[fe] = Ce;
|
|
17128
17128
|
}), ue;
|
|
17129
17129
|
}
|
|
17130
|
-
function
|
|
17130
|
+
function ve() {
|
|
17131
17131
|
const re = {
|
|
17132
|
-
...
|
|
17132
|
+
...ge($)
|
|
17133
17133
|
};
|
|
17134
17134
|
for (const te in re)
|
|
17135
17135
|
re[te] === void 0 && delete re[te];
|
|
@@ -17141,17 +17141,17 @@ function Form(e, t) {
|
|
|
17141
17141
|
...N == null ? void 0 : N.context
|
|
17142
17142
|
};
|
|
17143
17143
|
}
|
|
17144
|
-
function
|
|
17144
|
+
function be() {
|
|
17145
17145
|
return {
|
|
17146
|
-
id:
|
|
17147
|
-
active_id:
|
|
17148
|
-
active_ids: [
|
|
17146
|
+
id: de(),
|
|
17147
|
+
active_id: de(),
|
|
17148
|
+
active_ids: [de()],
|
|
17149
17149
|
parent_id: F,
|
|
17150
17150
|
...ae
|
|
17151
17151
|
};
|
|
17152
17152
|
}
|
|
17153
17153
|
const se = async (re) => {
|
|
17154
|
-
const te =
|
|
17154
|
+
const te = de() ? N == null ? void 0 : N.context : {};
|
|
17155
17155
|
return await ConnectionProvider.getHandler().defaultGet({
|
|
17156
17156
|
model: n,
|
|
17157
17157
|
fields: re,
|
|
@@ -17161,11 +17161,11 @@ function Form(e, t) {
|
|
|
17161
17161
|
},
|
|
17162
17162
|
extraValues: O
|
|
17163
17163
|
});
|
|
17164
|
-
},
|
|
17164
|
+
}, ce = () => Object.keys(getTouchedValues({
|
|
17165
17165
|
source: H.current,
|
|
17166
|
-
target:
|
|
17166
|
+
target: ge($),
|
|
17167
17167
|
fields: $
|
|
17168
|
-
})).length !== 0,
|
|
17168
|
+
})).length !== 0, ge = (re) => {
|
|
17169
17169
|
const te = M.getFieldsValue(!0);
|
|
17170
17170
|
return processValues(te, re);
|
|
17171
17171
|
}, ye = (re, te) => {
|
|
@@ -17178,7 +17178,7 @@ function Form(e, t) {
|
|
|
17178
17178
|
reset: !1
|
|
17179
17179
|
});
|
|
17180
17180
|
}, Oe = (re) => M.getFieldsValue(!0)[re];
|
|
17181
|
-
async function
|
|
17181
|
+
async function Se() {
|
|
17182
17182
|
try {
|
|
17183
17183
|
return await M.validateFields(), !1;
|
|
17184
17184
|
} catch {
|
|
@@ -17227,10 +17227,10 @@ function Form(e, t) {
|
|
|
17227
17227
|
}), J == null || J(!1), Q == null || Q(!1), Ce && Z(!0);
|
|
17228
17228
|
};
|
|
17229
17229
|
function we(re, te) {
|
|
17230
|
-
H.current[re] = te, Q == null || Q(
|
|
17230
|
+
H.current[re] = te, Q == null || Q(ce());
|
|
17231
17231
|
}
|
|
17232
|
-
const
|
|
17233
|
-
|
|
17232
|
+
const _e = async () => new Promise(async (re) => {
|
|
17233
|
+
ce() ? showDialog$6({
|
|
17234
17234
|
lang: E,
|
|
17235
17235
|
onOk: () => {
|
|
17236
17236
|
me == null || me(), re(!0);
|
|
@@ -17275,15 +17275,15 @@ function Form(e, t) {
|
|
|
17275
17275
|
arch: te
|
|
17276
17276
|
}) => {
|
|
17277
17277
|
let ue = {}, fe = !1;
|
|
17278
|
-
if (
|
|
17278
|
+
if (de()) {
|
|
17279
17279
|
ue = (await ConnectionProvider.getHandler().readObjects({
|
|
17280
17280
|
model: n,
|
|
17281
|
-
ids: [
|
|
17281
|
+
ids: [de()],
|
|
17282
17282
|
fields: re,
|
|
17283
17283
|
context: I
|
|
17284
17284
|
}))[0];
|
|
17285
17285
|
const Ce = await ConnectionProvider.getHandler().search({
|
|
17286
|
-
params: [["res_model", "=", n], ["res_id", "=",
|
|
17286
|
+
params: [["res_model", "=", n], ["res_id", "=", de()]],
|
|
17287
17287
|
fields: ["id", "name"],
|
|
17288
17288
|
context: Te(),
|
|
17289
17289
|
model: "ir.attachment"
|
|
@@ -17299,15 +17299,15 @@ function Form(e, t) {
|
|
|
17299
17299
|
const {
|
|
17300
17300
|
callOnSubmitSucceed: te = !0
|
|
17301
17301
|
} = re || {};
|
|
17302
|
-
if (
|
|
17302
|
+
if (de()) {
|
|
17303
17303
|
const ue = getTouchedValues({
|
|
17304
17304
|
source: H.current,
|
|
17305
|
-
target:
|
|
17305
|
+
target: ge($),
|
|
17306
17306
|
fields: $
|
|
17307
17307
|
});
|
|
17308
17308
|
await ConnectionProvider.getHandler().update({
|
|
17309
17309
|
model: n,
|
|
17310
|
-
id:
|
|
17310
|
+
id: de(),
|
|
17311
17311
|
values: {
|
|
17312
17312
|
...ue,
|
|
17313
17313
|
...b
|
|
@@ -17317,9 +17317,9 @@ function Form(e, t) {
|
|
|
17317
17317
|
...I,
|
|
17318
17318
|
...N == null ? void 0 : N.context
|
|
17319
17319
|
}
|
|
17320
|
-
}), H.current =
|
|
17320
|
+
}), H.current = ge($);
|
|
17321
17321
|
} else {
|
|
17322
|
-
const ue =
|
|
17322
|
+
const ue = ge($), fe = await ConnectionProvider.getHandler().create({
|
|
17323
17323
|
model: n,
|
|
17324
17324
|
values: {
|
|
17325
17325
|
...ue,
|
|
@@ -17333,20 +17333,20 @@ function Form(e, t) {
|
|
|
17333
17333
|
});
|
|
17334
17334
|
V.current = fe, H.current = ue;
|
|
17335
17335
|
}
|
|
17336
|
-
v && await v([
|
|
17336
|
+
v && await v([de()]), !x && te && (pe == null || pe(de(), he(), ve()));
|
|
17337
17337
|
}, je = async (re) => {
|
|
17338
17338
|
const {
|
|
17339
17339
|
callOnSubmitSucceed: te = !0
|
|
17340
17340
|
} = re || {};
|
|
17341
|
-
!x && te && (pe == null || pe(
|
|
17341
|
+
!x && te && (pe == null || pe(de(), he(), ve()));
|
|
17342
17342
|
}, ke = async (re) => {
|
|
17343
17343
|
let te = !1;
|
|
17344
17344
|
const {
|
|
17345
17345
|
callOnSubmitSucceed: ue = !0
|
|
17346
17346
|
} = re || {};
|
|
17347
|
-
if (j.current = !0, k(void 0), !
|
|
17347
|
+
if (j.current = !0, k(void 0), !ce() && de() && ue)
|
|
17348
17348
|
return j.current = !1, Q == null || Q(!1), me == null || me(), !0;
|
|
17349
|
-
if (await
|
|
17349
|
+
if (await Se())
|
|
17350
17350
|
return j.current = !1, showDialog$5(E), !1;
|
|
17351
17351
|
_(!0), Y == null || Y(!0);
|
|
17352
17352
|
try {
|
|
@@ -17372,7 +17372,7 @@ function Form(e, t) {
|
|
|
17372
17372
|
readOnly: d,
|
|
17373
17373
|
values: {
|
|
17374
17374
|
...ue,
|
|
17375
|
-
...
|
|
17375
|
+
...be()
|
|
17376
17376
|
}
|
|
17377
17377
|
}), D(fe), U && fe.string && ((Ce = U.setTitle) == null || Ce.call(U, fe.string));
|
|
17378
17378
|
}, De = async ({
|
|
@@ -17382,7 +17382,7 @@ function Form(e, t) {
|
|
|
17382
17382
|
return;
|
|
17383
17383
|
const te = getTouchedValues({
|
|
17384
17384
|
source: P.current,
|
|
17385
|
-
target:
|
|
17385
|
+
target: ge($),
|
|
17386
17386
|
fields: $
|
|
17387
17387
|
}), ue = Object.keys(te);
|
|
17388
17388
|
if (ue.length !== 0) {
|
|
@@ -17412,13 +17412,13 @@ function Form(e, t) {
|
|
|
17412
17412
|
Me({
|
|
17413
17413
|
fields: $,
|
|
17414
17414
|
arch: L,
|
|
17415
|
-
values:
|
|
17415
|
+
values: ge($)
|
|
17416
17416
|
});
|
|
17417
17417
|
return;
|
|
17418
17418
|
}
|
|
17419
17419
|
const ue = getOnChangePayload({
|
|
17420
17420
|
values: {
|
|
17421
|
-
...
|
|
17421
|
+
...ge($),
|
|
17422
17422
|
context: {
|
|
17423
17423
|
...I,
|
|
17424
17424
|
...N == null ? void 0 : N.context
|
|
@@ -17428,13 +17428,13 @@ function Form(e, t) {
|
|
|
17428
17428
|
}), fe = await ConnectionProvider.getHandler().executeOnChange({
|
|
17429
17429
|
model: n,
|
|
17430
17430
|
action: te.method,
|
|
17431
|
-
ids:
|
|
17431
|
+
ids: de() ? [de()] : [],
|
|
17432
17432
|
payload: ue,
|
|
17433
17433
|
fields: $
|
|
17434
17434
|
});
|
|
17435
17435
|
if (fe.value) {
|
|
17436
17436
|
const Ce = {
|
|
17437
|
-
...
|
|
17437
|
+
...ge($),
|
|
17438
17438
|
...fe.value
|
|
17439
17439
|
};
|
|
17440
17440
|
Me({
|
|
@@ -17464,7 +17464,7 @@ function Form(e, t) {
|
|
|
17464
17464
|
Me({
|
|
17465
17465
|
fields: Ce,
|
|
17466
17466
|
arch: L,
|
|
17467
|
-
values:
|
|
17467
|
+
values: ge(Ce)
|
|
17468
17468
|
}), B(Ce);
|
|
17469
17469
|
}
|
|
17470
17470
|
};
|
|
@@ -17475,7 +17475,7 @@ function Form(e, t) {
|
|
|
17475
17475
|
const ue = await ConnectionProvider.getHandler().execute({
|
|
17476
17476
|
model: n,
|
|
17477
17477
|
action: re,
|
|
17478
|
-
payload: [
|
|
17478
|
+
payload: [de()],
|
|
17479
17479
|
context: {
|
|
17480
17480
|
...te,
|
|
17481
17481
|
...N == null ? void 0 : N.context,
|
|
@@ -17483,15 +17483,15 @@ function Form(e, t) {
|
|
|
17483
17483
|
}
|
|
17484
17484
|
});
|
|
17485
17485
|
if (typeof ue == "object" && ue !== null && Object.keys(ue).length === 0 && x)
|
|
17486
|
-
pe == null || pe(
|
|
17486
|
+
pe == null || pe(de(), he(), ve());
|
|
17487
17487
|
else if (ue.type && ue.type === "ir.actions.act_window_close")
|
|
17488
|
-
pe == null || pe(
|
|
17488
|
+
pe == null || pe(de(), he(), ve());
|
|
17489
17489
|
else if (ue.type) {
|
|
17490
17490
|
let fe = {};
|
|
17491
17491
|
ue.context && (fe = parseContext({
|
|
17492
17492
|
context: ue.context,
|
|
17493
17493
|
fields: $,
|
|
17494
|
-
values:
|
|
17494
|
+
values: he()
|
|
17495
17495
|
})), await $e({
|
|
17496
17496
|
actionData: ue,
|
|
17497
17497
|
context: {
|
|
@@ -17508,9 +17508,9 @@ function Form(e, t) {
|
|
|
17508
17508
|
const te = await ConnectionProvider.getHandler().executeWorkflow({
|
|
17509
17509
|
model: n,
|
|
17510
17510
|
action: re,
|
|
17511
|
-
payload:
|
|
17511
|
+
payload: de()
|
|
17512
17512
|
});
|
|
17513
|
-
te.type && te.type === "ir.actions.act_window_close" ? pe == null || pe(
|
|
17513
|
+
te.type && te.type === "ir.actions.act_window_close" ? pe == null || pe(de(), he(), ve()) : await Re();
|
|
17514
17514
|
}
|
|
17515
17515
|
async function Ge({
|
|
17516
17516
|
action: re,
|
|
@@ -17535,7 +17535,7 @@ function Form(e, t) {
|
|
|
17535
17535
|
} = await (le == null ? void 0 : le({
|
|
17536
17536
|
actionData: re,
|
|
17537
17537
|
fields: $,
|
|
17538
|
-
values:
|
|
17538
|
+
values: he(),
|
|
17539
17539
|
context: {
|
|
17540
17540
|
...I,
|
|
17541
17541
|
...N == null ? void 0 : N.context,
|
|
@@ -17545,7 +17545,7 @@ function Form(e, t) {
|
|
|
17545
17545
|
Re();
|
|
17546
17546
|
}
|
|
17547
17547
|
})) || {};
|
|
17548
|
-
!y && ue && (pe == null || pe(
|
|
17548
|
+
!y && ue && (pe == null || pe(de(), he(), ve()));
|
|
17549
17549
|
}
|
|
17550
17550
|
function Ye() {
|
|
17551
17551
|
De({
|
|
@@ -17561,7 +17561,7 @@ function Form(e, t) {
|
|
|
17561
17561
|
me == null || me();
|
|
17562
17562
|
return;
|
|
17563
17563
|
}
|
|
17564
|
-
if (await
|
|
17564
|
+
if (await Se()) {
|
|
17565
17565
|
showDialog$5(E);
|
|
17566
17566
|
return;
|
|
17567
17567
|
}
|
|
@@ -17583,9 +17583,9 @@ function Form(e, t) {
|
|
|
17583
17583
|
}
|
|
17584
17584
|
const Ze = () => !N && !S ? /* @__PURE__ */ jsx(Spin, {}) : !n && !m || !C ? null : /* @__PURE__ */ jsx(Fragment, {
|
|
17585
17585
|
children: /* @__PURE__ */ jsx(FormProvider$1, {
|
|
17586
|
-
getValues:
|
|
17586
|
+
getValues: he,
|
|
17587
17587
|
getPlainValues: xe,
|
|
17588
|
-
getFields:
|
|
17588
|
+
getFields: Ie,
|
|
17589
17589
|
domain: g,
|
|
17590
17590
|
activeId: r,
|
|
17591
17591
|
activeModel: n,
|
|
@@ -17596,7 +17596,7 @@ function Form(e, t) {
|
|
|
17596
17596
|
setOriginalValue: we,
|
|
17597
17597
|
submitForm: ke,
|
|
17598
17598
|
fetchValues: Re,
|
|
17599
|
-
formHasChanges:
|
|
17599
|
+
formHasChanges: ce,
|
|
17600
17600
|
elementHasLostFocus: Ye,
|
|
17601
17601
|
children: /* @__PURE__ */ jsx(Form$3, {
|
|
17602
17602
|
form: M,
|
|
@@ -17620,7 +17620,7 @@ function Form(e, t) {
|
|
|
17620
17620
|
icon: /* @__PURE__ */ jsx(CloseOutlined$3, {}),
|
|
17621
17621
|
disabled: w,
|
|
17622
17622
|
onClick: async () => {
|
|
17623
|
-
await
|
|
17623
|
+
await _e();
|
|
17624
17624
|
},
|
|
17625
17625
|
children: "Cancel"
|
|
17626
17626
|
}), /* @__PURE__ */ jsx(Button$1, {
|
|
@@ -18673,11 +18673,11 @@ function SearchTree(e, t) {
|
|
|
18673
18673
|
searchError: pe,
|
|
18674
18674
|
page: me,
|
|
18675
18675
|
offset: ie,
|
|
18676
|
-
getResults:
|
|
18677
|
-
requestPageChange:
|
|
18678
|
-
changeSort:
|
|
18676
|
+
getResults: de,
|
|
18677
|
+
requestPageChange: Ie,
|
|
18678
|
+
changeSort: he,
|
|
18679
18679
|
fetchChildrenForRecord: xe,
|
|
18680
|
-
colorsForResults:
|
|
18680
|
+
colorsForResults: ve,
|
|
18681
18681
|
totalItems: Te
|
|
18682
18682
|
} = useSearch({
|
|
18683
18683
|
model: g,
|
|
@@ -18711,7 +18711,7 @@ function SearchTree(e, t) {
|
|
|
18711
18711
|
})), useEffect(() => {
|
|
18712
18712
|
!v || u && (I.current = !1, oe());
|
|
18713
18713
|
}, [me, ie, v, u, s]);
|
|
18714
|
-
const
|
|
18714
|
+
const be = async () => {
|
|
18715
18715
|
x(!1), m(!0), _(void 0), F == null || F(!0);
|
|
18716
18716
|
try {
|
|
18717
18717
|
await se(), x(!0);
|
|
@@ -18728,21 +18728,21 @@ function SearchTree(e, t) {
|
|
|
18728
18728
|
type: "form",
|
|
18729
18729
|
context: f
|
|
18730
18730
|
}));
|
|
18731
|
-
let
|
|
18732
|
-
o || (
|
|
18731
|
+
let _e = o;
|
|
18732
|
+
o || (_e = await ConnectionProvider.getHandler().getView({
|
|
18733
18733
|
model: n,
|
|
18734
18734
|
type: "tree",
|
|
18735
18735
|
context: f
|
|
18736
|
-
})), E(we), O(
|
|
18736
|
+
})), E(we), O(_e);
|
|
18737
18737
|
};
|
|
18738
18738
|
useEffect(() => {
|
|
18739
|
-
|
|
18739
|
+
be();
|
|
18740
18740
|
}, [n]);
|
|
18741
|
-
const
|
|
18741
|
+
const ce = (we) => {
|
|
18742
18742
|
ne == null || ne(we);
|
|
18743
|
-
},
|
|
18743
|
+
}, ge = async (we) => {
|
|
18744
18744
|
const {
|
|
18745
|
-
id:
|
|
18745
|
+
id: _e
|
|
18746
18746
|
} = we;
|
|
18747
18747
|
N.current || (N.current = await ConnectionProvider.getHandler().treeButOpen({
|
|
18748
18748
|
id: y.view_id,
|
|
@@ -18754,35 +18754,35 @@ function SearchTree(e, t) {
|
|
|
18754
18754
|
actionData: Ee,
|
|
18755
18755
|
fields: y.fields,
|
|
18756
18756
|
values: {
|
|
18757
|
-
active_id:
|
|
18757
|
+
active_id: _e,
|
|
18758
18758
|
...we
|
|
18759
18759
|
},
|
|
18760
18760
|
context: f
|
|
18761
18761
|
}));
|
|
18762
18762
|
}, ye = async (we) => {
|
|
18763
18763
|
const {
|
|
18764
|
-
id:
|
|
18764
|
+
id: _e
|
|
18765
18765
|
} = we;
|
|
18766
18766
|
if (y != null && y.isExpandable) {
|
|
18767
18767
|
try {
|
|
18768
|
-
await
|
|
18768
|
+
await ge(we);
|
|
18769
18769
|
} catch (Ee) {
|
|
18770
18770
|
showDialog$8(Ee);
|
|
18771
18771
|
}
|
|
18772
18772
|
return;
|
|
18773
18773
|
}
|
|
18774
18774
|
a({
|
|
18775
|
-
id:
|
|
18775
|
+
id: _e,
|
|
18776
18776
|
model: g,
|
|
18777
18777
|
formView: b,
|
|
18778
18778
|
treeView: y
|
|
18779
18779
|
});
|
|
18780
18780
|
};
|
|
18781
18781
|
function Oe(we) {
|
|
18782
|
-
const
|
|
18783
|
-
W == null || W(
|
|
18782
|
+
const _e = de().filter((Ee) => we.includes(Ee.id));
|
|
18783
|
+
W == null || W(_e), p == null || p(we);
|
|
18784
18784
|
}
|
|
18785
|
-
function
|
|
18785
|
+
function Se() {
|
|
18786
18786
|
return y != null && y.isExpandable ? D - 160 : D - (S + 210);
|
|
18787
18787
|
}
|
|
18788
18788
|
const Fe = () => !y || !b ? null : /* @__PURE__ */ jsxs(Fragment, {
|
|
@@ -18797,7 +18797,7 @@ function SearchTree(e, t) {
|
|
|
18797
18797
|
offset: ie,
|
|
18798
18798
|
isSearching: ae,
|
|
18799
18799
|
onSubmit: J,
|
|
18800
|
-
onLimitChange:
|
|
18800
|
+
onLimitChange: ce,
|
|
18801
18801
|
setSearchFilterHeight: k,
|
|
18802
18802
|
searchError: pe,
|
|
18803
18803
|
searchVisible: H,
|
|
@@ -18807,18 +18807,18 @@ function SearchTree(e, t) {
|
|
|
18807
18807
|
limit: Q,
|
|
18808
18808
|
page: me,
|
|
18809
18809
|
treeView: y,
|
|
18810
|
-
results:
|
|
18811
|
-
onRequestPageChange:
|
|
18810
|
+
results: de(),
|
|
18811
|
+
onRequestPageChange: Ie,
|
|
18812
18812
|
loading: le,
|
|
18813
18813
|
onRowClicked: ye,
|
|
18814
|
-
scrollY: c ||
|
|
18815
|
-
colorsForResults:
|
|
18814
|
+
scrollY: c || Se(),
|
|
18815
|
+
colorsForResults: ve,
|
|
18816
18816
|
rowSelection: {
|
|
18817
18817
|
selectedRowKeys: z == null ? void 0 : z.map((we) => we.id),
|
|
18818
18818
|
onChange: Oe
|
|
18819
18819
|
},
|
|
18820
18820
|
sorter: A,
|
|
18821
|
-
onChangeSort:
|
|
18821
|
+
onChangeSort: he,
|
|
18822
18822
|
onFetchChildrenForRecord: y.isExpandable ? xe : void 0,
|
|
18823
18823
|
childField: y.field_parent
|
|
18824
18824
|
})]
|
|
@@ -21877,33 +21877,33 @@ function requireBase() {
|
|
|
21877
21877
|
}, {
|
|
21878
21878
|
key: "renderContent",
|
|
21879
21879
|
value: function() {
|
|
21880
|
-
var H = this, P = this.state, A = P.ellipsisContent, j = P.isEllipsis, K = P.expanded, X = this.props, F = X.component, T = X.children, Y = X.className, Q = X.type, ne = X.disabled, J = X.style, ee = M(X, ["component", "children", "className", "type", "disabled", "style"]), oe = this.context.direction, le = this.getEllipsis(), ae = le.rows, pe = le.suffix, me = le.tooltip, ie = this.getPrefixCls(),
|
|
21881
|
-
if (ae && j && !K && !
|
|
21882
|
-
var Te = ee.title,
|
|
21883
|
-
!Te && (typeof T == "string" || typeof T == "number") && (
|
|
21884
|
-
title:
|
|
21880
|
+
var H = this, P = this.state, A = P.ellipsisContent, j = P.isEllipsis, K = P.expanded, X = this.props, F = X.component, T = X.children, Y = X.className, Q = X.type, ne = X.disabled, J = X.style, ee = M(X, ["component", "children", "className", "type", "disabled", "style"]), oe = this.context.direction, le = this.getEllipsis(), ae = le.rows, pe = le.suffix, me = le.tooltip, ie = this.getPrefixCls(), de = (0, v.default)(ee, ["prefixCls", "editable", "copyable", "ellipsis", "mark", "code", "delete", "underline", "strong", "keyboard"].concat((0, o.default)(y.configConsumerProps))), Ie = this.canUseCSSEllipsis(), he = ae === 1 && Ie, xe = ae && ae > 1 && Ie, ve = T;
|
|
21881
|
+
if (ae && j && !K && !Ie) {
|
|
21882
|
+
var Te = ee.title, be = Te || "";
|
|
21883
|
+
!Te && (typeof T == "string" || typeof T == "number") && (be = String(T)), be = be == null ? void 0 : be.slice(String(A || "").length), ve = /* @__PURE__ */ f.createElement(f.Fragment, null, A, /* @__PURE__ */ f.createElement("span", {
|
|
21884
|
+
title: be,
|
|
21885
21885
|
"aria-hidden": "true"
|
|
21886
|
-
}, B), pe), me && (
|
|
21886
|
+
}, B), pe), me && (ve = /* @__PURE__ */ f.createElement(S.default, {
|
|
21887
21887
|
title: me === !0 ? T : me
|
|
21888
|
-
}, /* @__PURE__ */ f.createElement("span", null,
|
|
21888
|
+
}, /* @__PURE__ */ f.createElement("span", null, ve)));
|
|
21889
21889
|
} else
|
|
21890
|
-
|
|
21891
|
-
return
|
|
21890
|
+
ve = /* @__PURE__ */ f.createElement(f.Fragment, null, T, pe);
|
|
21891
|
+
return ve = $(this.props, ve), /* @__PURE__ */ f.createElement(O.default, {
|
|
21892
21892
|
componentName: "Text"
|
|
21893
21893
|
}, function(se) {
|
|
21894
|
-
var
|
|
21895
|
-
return H.editStr =
|
|
21894
|
+
var ce, ge = se.edit, ye = se.copy, Oe = se.copied, Se = se.expand;
|
|
21895
|
+
return H.editStr = ge, H.copyStr = ye, H.copiedStr = Oe, H.expandStr = Se, /* @__PURE__ */ f.createElement(C.default, {
|
|
21896
21896
|
onResize: H.resizeOnNextFrame,
|
|
21897
21897
|
disabled: !ae
|
|
21898
21898
|
}, /* @__PURE__ */ f.createElement(k.default, (0, s.default)({
|
|
21899
|
-
className: (0, p.default)((
|
|
21899
|
+
className: (0, p.default)((ce = {}, (0, r.default)(ce, "".concat(ie, "-").concat(Q), Q), (0, r.default)(ce, "".concat(ie, "-disabled"), ne), (0, r.default)(ce, "".concat(ie, "-ellipsis"), ae), (0, r.default)(ce, "".concat(ie, "-ellipsis-single-line"), he), (0, r.default)(ce, "".concat(ie, "-ellipsis-multiple-line"), xe), ce), Y),
|
|
21900
21900
|
style: (0, s.default)((0, s.default)({}, J), {
|
|
21901
21901
|
WebkitLineClamp: xe ? ae : void 0
|
|
21902
21902
|
}),
|
|
21903
21903
|
component: F,
|
|
21904
21904
|
ref: H.contentRef,
|
|
21905
21905
|
direction: oe
|
|
21906
|
-
},
|
|
21906
|
+
}, de), ve, H.renderOperations()));
|
|
21907
21907
|
});
|
|
21908
21908
|
}
|
|
21909
21909
|
}, {
|
|
@@ -22688,7 +22688,7 @@ function filterDuplicateItems(e) {
|
|
|
22688
22688
|
});
|
|
22689
22689
|
}
|
|
22690
22690
|
const One2manyInput = (e) => {
|
|
22691
|
-
var
|
|
22691
|
+
var be;
|
|
22692
22692
|
const {
|
|
22693
22693
|
value: t,
|
|
22694
22694
|
onChange: n,
|
|
@@ -22724,9 +22724,9 @@ const One2manyInput = (e) => {
|
|
|
22724
22724
|
Y();
|
|
22725
22725
|
}, [v]);
|
|
22726
22726
|
const X = (se) => {
|
|
22727
|
-
var
|
|
22727
|
+
var ce, ge;
|
|
22728
22728
|
n == null || n({
|
|
22729
|
-
fields: ((
|
|
22729
|
+
fields: ((ce = o.get("form")) == null ? void 0 : ce.fields) || ((ge = o.get("tree")) == null ? void 0 : ge.fields),
|
|
22730
22730
|
items: filterDuplicateItems(se)
|
|
22731
22731
|
});
|
|
22732
22732
|
}, F = async () => {
|
|
@@ -22735,7 +22735,7 @@ const One2manyInput = (e) => {
|
|
|
22735
22735
|
var se;
|
|
22736
22736
|
b(!0), y(!1), w(void 0);
|
|
22737
22737
|
try {
|
|
22738
|
-
const
|
|
22738
|
+
const ce = await readObjectValues({
|
|
22739
22739
|
treeFields: o.get("tree").fields,
|
|
22740
22740
|
formFields: ((se = o.get("form")) == null ? void 0 : se.fields) || {},
|
|
22741
22741
|
model: V,
|
|
@@ -22745,9 +22745,9 @@ const One2manyInput = (e) => {
|
|
|
22745
22745
|
...H
|
|
22746
22746
|
}
|
|
22747
22747
|
});
|
|
22748
|
-
W.current || (W.current =
|
|
22749
|
-
} catch (
|
|
22750
|
-
w(
|
|
22748
|
+
W.current || (W.current = ce.map((ge) => ge.id)), X(ce);
|
|
22749
|
+
} catch (ce) {
|
|
22750
|
+
w(ce);
|
|
22751
22751
|
} finally {
|
|
22752
22752
|
b(!1);
|
|
22753
22753
|
}
|
|
@@ -22769,10 +22769,10 @@ const One2manyInput = (e) => {
|
|
|
22769
22769
|
})));
|
|
22770
22770
|
}
|
|
22771
22771
|
const Q = () => {
|
|
22772
|
-
const se = Array.from(o.keys()),
|
|
22772
|
+
const se = Array.from(o.keys()), ce = se[(se.indexOf(s) + 1) % se.length];
|
|
22773
22773
|
s === "form" ? oe(() => {
|
|
22774
|
-
c(
|
|
22775
|
-
}) : c(
|
|
22774
|
+
c(ce);
|
|
22775
|
+
}) : c(ce);
|
|
22776
22776
|
}, ne = () => {
|
|
22777
22777
|
l > 0 && (s === "form" ? oe(() => {
|
|
22778
22778
|
u(l - 1);
|
|
@@ -22783,7 +22783,7 @@ const One2manyInput = (e) => {
|
|
|
22783
22783
|
u(l + 1);
|
|
22784
22784
|
}) : u(l + 1));
|
|
22785
22785
|
}, ee = async () => {
|
|
22786
|
-
const se = K[l].id,
|
|
22786
|
+
const se = K[l].id, ce = (await ConnectionProvider.getHandler().readObjects({
|
|
22787
22787
|
model: V,
|
|
22788
22788
|
ids: [se],
|
|
22789
22789
|
fields: o.get("form").fields,
|
|
@@ -22791,7 +22791,7 @@ const One2manyInput = (e) => {
|
|
|
22791
22791
|
...m == null ? void 0 : m(),
|
|
22792
22792
|
...H
|
|
22793
22793
|
}
|
|
22794
|
-
}))[0],
|
|
22794
|
+
}))[0], ge = (await ConnectionProvider.getHandler().readObjects({
|
|
22795
22795
|
model: V,
|
|
22796
22796
|
ids: [se],
|
|
22797
22797
|
fields: o.get("tree").fields,
|
|
@@ -22802,8 +22802,8 @@ const One2manyInput = (e) => {
|
|
|
22802
22802
|
}))[0], ye = a.map((Oe) => Oe.id === se ? {
|
|
22803
22803
|
...Oe,
|
|
22804
22804
|
operation: "original",
|
|
22805
|
-
values:
|
|
22806
|
-
treeValues:
|
|
22805
|
+
values: ce,
|
|
22806
|
+
treeValues: ge
|
|
22807
22807
|
} : Oe);
|
|
22808
22808
|
X(ye);
|
|
22809
22809
|
}, oe = (se) => {
|
|
@@ -22833,15 +22833,15 @@ const One2manyInput = (e) => {
|
|
|
22833
22833
|
const {
|
|
22834
22834
|
inv_field: se
|
|
22835
22835
|
} = r;
|
|
22836
|
-
let
|
|
22837
|
-
se && f && (
|
|
22836
|
+
let ce;
|
|
22837
|
+
se && f && (ce = {
|
|
22838
22838
|
[se]: f
|
|
22839
22839
|
}), s === "form" ? oe(() => {
|
|
22840
22840
|
B(!0), M({
|
|
22841
|
-
defaultValues:
|
|
22841
|
+
defaultValues: ce
|
|
22842
22842
|
}), S(!0);
|
|
22843
22843
|
}) : (B(!0), M({
|
|
22844
|
-
defaultValues:
|
|
22844
|
+
defaultValues: ce
|
|
22845
22845
|
}), S(!0));
|
|
22846
22846
|
}, pe = async () => {
|
|
22847
22847
|
s === "form" ? oe(() => {
|
|
@@ -22851,10 +22851,10 @@ const One2manyInput = (e) => {
|
|
|
22851
22851
|
b(!0), y(!1), w(void 0);
|
|
22852
22852
|
try {
|
|
22853
22853
|
if (K[l].id > 0) {
|
|
22854
|
-
const se = a.map((
|
|
22855
|
-
...
|
|
22854
|
+
const se = a.map((ce) => ce.id === K[l].id ? {
|
|
22855
|
+
...ce,
|
|
22856
22856
|
operation: "pendingRemove"
|
|
22857
|
-
} :
|
|
22857
|
+
} : ce);
|
|
22858
22858
|
X(se);
|
|
22859
22859
|
} else
|
|
22860
22860
|
X(a.filter((se) => se.id !== K[l].id));
|
|
@@ -22863,30 +22863,30 @@ const One2manyInput = (e) => {
|
|
|
22863
22863
|
}
|
|
22864
22864
|
u(0), b(!1);
|
|
22865
22865
|
}, ie = async () => {
|
|
22866
|
-
const se = K.filter((
|
|
22866
|
+
const se = K.filter((ce) => L.includes(ce.id));
|
|
22867
22867
|
b(!0), y(!1), w(void 0);
|
|
22868
22868
|
try {
|
|
22869
|
-
const
|
|
22869
|
+
const ce = se.map((ye) => ye.id), ge = a.filter((ye) => !(ce.includes(ye.id) && ye.id < 0)).map((ye) => ce.includes(ye.id) ? {
|
|
22870
22870
|
...ye,
|
|
22871
22871
|
operation: "pendingRemove"
|
|
22872
22872
|
} : ye);
|
|
22873
|
-
X(
|
|
22874
|
-
} catch (
|
|
22875
|
-
w(
|
|
22873
|
+
X(ge);
|
|
22874
|
+
} catch (ce) {
|
|
22875
|
+
w(ce);
|
|
22876
22876
|
}
|
|
22877
22877
|
u(0), b(!1);
|
|
22878
|
-
},
|
|
22878
|
+
}, de = (se, ce, ge) => {
|
|
22879
22879
|
let ye;
|
|
22880
22880
|
if (se)
|
|
22881
22881
|
ye = a.map((Oe) => Oe.id === se ? {
|
|
22882
22882
|
id: se,
|
|
22883
22883
|
operation: se > 0 ? "pendingUpdate" : "pendingCreate",
|
|
22884
22884
|
values: {
|
|
22885
|
-
...
|
|
22885
|
+
...ge,
|
|
22886
22886
|
id: se
|
|
22887
22887
|
},
|
|
22888
22888
|
treeValues: {
|
|
22889
|
-
...
|
|
22889
|
+
...ge,
|
|
22890
22890
|
id: se
|
|
22891
22891
|
}
|
|
22892
22892
|
} : Oe);
|
|
@@ -22896,27 +22896,27 @@ const One2manyInput = (e) => {
|
|
|
22896
22896
|
id: Oe,
|
|
22897
22897
|
operation: "pendingCreate",
|
|
22898
22898
|
values: {
|
|
22899
|
-
...
|
|
22899
|
+
...ge,
|
|
22900
22900
|
id: Oe
|
|
22901
22901
|
},
|
|
22902
22902
|
treeValues: {
|
|
22903
|
-
...
|
|
22903
|
+
...ge,
|
|
22904
22904
|
id: Oe
|
|
22905
22905
|
}
|
|
22906
22906
|
});
|
|
22907
22907
|
}
|
|
22908
22908
|
X(ye), $ || S(!1);
|
|
22909
|
-
},
|
|
22909
|
+
}, Ie = (se) => {
|
|
22910
22910
|
const {
|
|
22911
|
-
id:
|
|
22911
|
+
id: ce
|
|
22912
22912
|
} = se;
|
|
22913
|
-
M(a.find((
|
|
22914
|
-
},
|
|
22913
|
+
M(a.find((ge) => ge.id === ce)), B(!1), S(!0);
|
|
22914
|
+
}, he = async (se) => {
|
|
22915
22915
|
b(!0);
|
|
22916
|
-
let
|
|
22917
|
-
const
|
|
22916
|
+
let ce = a;
|
|
22917
|
+
const ge = se.filter((ye) => !a.find((Oe) => Oe.id === ye));
|
|
22918
22918
|
try {
|
|
22919
|
-
for (const ye of
|
|
22919
|
+
for (const ye of ge) {
|
|
22920
22920
|
const Oe = (await ConnectionProvider.getHandler().readObjects({
|
|
22921
22921
|
model: V,
|
|
22922
22922
|
ids: [ye],
|
|
@@ -22925,7 +22925,7 @@ const One2manyInput = (e) => {
|
|
|
22925
22925
|
...m == null ? void 0 : m(),
|
|
22926
22926
|
...H
|
|
22927
22927
|
}
|
|
22928
|
-
}))[0],
|
|
22928
|
+
}))[0], Se = (await ConnectionProvider.getHandler().readObjects({
|
|
22929
22929
|
model: V,
|
|
22930
22930
|
ids: [ye],
|
|
22931
22931
|
fields: o.get("tree").fields,
|
|
@@ -22934,14 +22934,14 @@ const One2manyInput = (e) => {
|
|
|
22934
22934
|
...H
|
|
22935
22935
|
}
|
|
22936
22936
|
}))[0];
|
|
22937
|
-
|
|
22937
|
+
ce.push({
|
|
22938
22938
|
id: ye,
|
|
22939
22939
|
operation: "pendingLink",
|
|
22940
22940
|
values: Oe,
|
|
22941
|
-
treeValues:
|
|
22941
|
+
treeValues: Se
|
|
22942
22942
|
});
|
|
22943
22943
|
}
|
|
22944
|
-
X(
|
|
22944
|
+
X(ce);
|
|
22945
22945
|
} catch (ye) {
|
|
22946
22946
|
w(ye);
|
|
22947
22947
|
} finally {
|
|
@@ -22953,50 +22953,50 @@ const One2manyInput = (e) => {
|
|
|
22953
22953
|
if (s === "graph")
|
|
22954
22954
|
return parseGraph(o.get("graph").arch).string;
|
|
22955
22955
|
{
|
|
22956
|
-
const
|
|
22957
|
-
return
|
|
22956
|
+
const ce = new se(o.get(s).fields);
|
|
22957
|
+
return ce.parse(o.get(s).arch), ce.string;
|
|
22958
22958
|
}
|
|
22959
22959
|
}
|
|
22960
|
-
const
|
|
22961
|
-
var
|
|
22960
|
+
const ve = () => {
|
|
22961
|
+
var ce, ge, ye, Oe;
|
|
22962
22962
|
if (s === "form")
|
|
22963
22963
|
return K.length === 0 ? I("noCurrentEntries") : /* @__PURE__ */ jsx(Form$1, {
|
|
22964
22964
|
formView: o.get("form"),
|
|
22965
|
-
values: (
|
|
22965
|
+
values: (ce = K[l]) == null ? void 0 : ce.values,
|
|
22966
22966
|
parentContext: {
|
|
22967
22967
|
...m == null ? void 0 : m(),
|
|
22968
22968
|
...H
|
|
22969
22969
|
},
|
|
22970
22970
|
ref: g,
|
|
22971
22971
|
model: V,
|
|
22972
|
-
id: (
|
|
22972
|
+
id: (ge = K[l]) == null ? void 0 : ge.id,
|
|
22973
22973
|
submitMode: "values",
|
|
22974
|
-
onFieldsChange: (
|
|
22974
|
+
onFieldsChange: (Se) => {
|
|
22975
22975
|
var we;
|
|
22976
|
-
const Fe = (we = K[l]) == null ? void 0 : we.id, Re = a.map((
|
|
22977
|
-
...
|
|
22978
|
-
operation:
|
|
22976
|
+
const Fe = (we = K[l]) == null ? void 0 : we.id, Re = a.map((_e) => _e.id === Fe ? {
|
|
22977
|
+
..._e,
|
|
22978
|
+
operation: _e.operation === "original" ? "pendingUpdate" : _e.operation,
|
|
22979
22979
|
values: {
|
|
22980
|
-
...
|
|
22980
|
+
...Se,
|
|
22981
22981
|
id: Fe
|
|
22982
22982
|
},
|
|
22983
22983
|
treeValues: {
|
|
22984
|
-
...
|
|
22984
|
+
...Se,
|
|
22985
22985
|
id: Fe
|
|
22986
22986
|
}
|
|
22987
|
-
} :
|
|
22987
|
+
} : _e);
|
|
22988
22988
|
X(Re), y(!0);
|
|
22989
22989
|
},
|
|
22990
22990
|
readOnly: Z
|
|
22991
22991
|
});
|
|
22992
22992
|
const se = G ? sortResults({
|
|
22993
|
-
resultsToSort: K.map((
|
|
22993
|
+
resultsToSort: K.map((Se) => Se.treeValues),
|
|
22994
22994
|
sorter: G,
|
|
22995
22995
|
fields: {
|
|
22996
22996
|
...o.get("tree").fields,
|
|
22997
22997
|
...((ye = o.get("form")) == null ? void 0 : ye.fields) || {}
|
|
22998
22998
|
}
|
|
22999
|
-
}) : K.map((
|
|
22999
|
+
}) : K.map((Se) => Se.treeValues);
|
|
23000
23000
|
if (s === "tree")
|
|
23001
23001
|
return /* @__PURE__ */ jsx(Tree, {
|
|
23002
23002
|
total: K.length,
|
|
@@ -23004,7 +23004,7 @@ const One2manyInput = (e) => {
|
|
|
23004
23004
|
treeView: o.get("tree"),
|
|
23005
23005
|
results: se,
|
|
23006
23006
|
loading: O,
|
|
23007
|
-
onRowClicked: ((Oe = o.get("form")) == null ? void 0 : Oe.fields) !== void 0 ?
|
|
23007
|
+
onRowClicked: ((Oe = o.get("form")) == null ? void 0 : Oe.fields) !== void 0 ? Ie : void 0,
|
|
23008
23008
|
showPagination: !1,
|
|
23009
23009
|
rowSelection: {
|
|
23010
23010
|
selectedRowKeys: L,
|
|
@@ -23014,11 +23014,11 @@ const One2manyInput = (e) => {
|
|
|
23014
23014
|
onChangeSort: z
|
|
23015
23015
|
});
|
|
23016
23016
|
if (s === "graph") {
|
|
23017
|
-
const
|
|
23017
|
+
const Se = [[`${r.inv_field}`, "=", f]];
|
|
23018
23018
|
return /* @__PURE__ */ jsx(Graph, {
|
|
23019
23019
|
view_id: o.get("graph").view_id,
|
|
23020
23020
|
model: r.relation,
|
|
23021
|
-
domain:
|
|
23021
|
+
domain: Se,
|
|
23022
23022
|
context: {
|
|
23023
23023
|
...m == null ? void 0 : m(),
|
|
23024
23024
|
...H
|
|
@@ -23051,9 +23051,9 @@ const One2manyInput = (e) => {
|
|
|
23051
23051
|
onNextItem: J,
|
|
23052
23052
|
onSearchItem: pe,
|
|
23053
23053
|
selectedRowKeys: L,
|
|
23054
|
-
showCreateButton: ((
|
|
23054
|
+
showCreateButton: ((be = o.get("form")) == null ? void 0 : be.fields) !== void 0,
|
|
23055
23055
|
showToggleButton: o.size > 1
|
|
23056
|
-
}),
|
|
23056
|
+
}), ve(), /* @__PURE__ */ jsx(FormModal, {
|
|
23057
23057
|
formView: o.get("form"),
|
|
23058
23058
|
model: V,
|
|
23059
23059
|
id: D == null ? void 0 : D.id,
|
|
@@ -23061,7 +23061,7 @@ const One2manyInput = (e) => {
|
|
|
23061
23061
|
values: D == null ? void 0 : D.values,
|
|
23062
23062
|
defaultValues: D == null ? void 0 : D.defaultValues,
|
|
23063
23063
|
visible: _,
|
|
23064
|
-
onSubmitSucceed:
|
|
23064
|
+
onSubmitSucceed: de,
|
|
23065
23065
|
parentContext: {
|
|
23066
23066
|
...m == null ? void 0 : m(),
|
|
23067
23067
|
...H
|
|
@@ -23080,7 +23080,7 @@ const One2manyInput = (e) => {
|
|
|
23080
23080
|
},
|
|
23081
23081
|
visible: k,
|
|
23082
23082
|
onSelectValues: async (se) => {
|
|
23083
|
-
N(!1),
|
|
23083
|
+
N(!1), he(se);
|
|
23084
23084
|
},
|
|
23085
23085
|
onCloseModal: () => {
|
|
23086
23086
|
N(!1);
|
|
@@ -27991,83 +27991,75 @@ function ActionView(e, t) {
|
|
|
27991
27991
|
const ee = async () => {
|
|
27992
27992
|
b(!0);
|
|
27993
27993
|
const ie = [];
|
|
27994
|
-
for (const
|
|
27995
|
-
const [he,
|
|
27996
|
-
let
|
|
27994
|
+
for (const Ie of a) {
|
|
27995
|
+
const [he, xe] = Ie;
|
|
27996
|
+
let ve;
|
|
27997
27997
|
try {
|
|
27998
|
-
|
|
27998
|
+
xe !== "dashboard" && (ve = await ConnectionProvider.getHandler().getView({
|
|
27999
27999
|
model: r,
|
|
28000
|
-
type:
|
|
28000
|
+
type: xe,
|
|
28001
28001
|
id: he,
|
|
28002
28002
|
context: o
|
|
28003
28003
|
}));
|
|
28004
|
-
} catch (
|
|
28005
|
-
console.error(`${r} - ${
|
|
28004
|
+
} catch (Te) {
|
|
28005
|
+
console.error(`${r} - ${xe}\xA0- ${JSON.stringify(Te, null, 2)}`);
|
|
28006
28006
|
continue;
|
|
28007
28007
|
}
|
|
28008
|
-
switch (
|
|
28008
|
+
switch (xe) {
|
|
28009
28009
|
case "dashboard": {
|
|
28010
|
-
const
|
|
28011
|
-
const [,
|
|
28012
|
-
return
|
|
28010
|
+
const Te = a.find((se) => {
|
|
28011
|
+
const [, ce] = se;
|
|
28012
|
+
return ce === "form";
|
|
28013
28013
|
});
|
|
28014
|
-
let
|
|
28015
|
-
|
|
28014
|
+
let be;
|
|
28015
|
+
Te && (be = {
|
|
28016
28016
|
action_id: h,
|
|
28017
28017
|
action_type: m,
|
|
28018
28018
|
name: s,
|
|
28019
28019
|
res_id: o.active_id,
|
|
28020
28020
|
res_model: r,
|
|
28021
|
-
view_id:
|
|
28022
|
-
view_type:
|
|
28021
|
+
view_id: Te[0],
|
|
28022
|
+
view_type: Te[1]
|
|
28023
28023
|
}), ie.push({
|
|
28024
28024
|
type: "dashboard",
|
|
28025
28025
|
id: o.active_id,
|
|
28026
28026
|
model: r,
|
|
28027
28027
|
context: o,
|
|
28028
|
-
configAction:
|
|
28028
|
+
configAction: be
|
|
28029
28029
|
});
|
|
28030
28030
|
break;
|
|
28031
28031
|
}
|
|
28032
28032
|
case "form": {
|
|
28033
28033
|
ie.push({
|
|
28034
|
-
...
|
|
28034
|
+
...ve
|
|
28035
28035
|
});
|
|
28036
28036
|
break;
|
|
28037
28037
|
}
|
|
28038
28038
|
case "tree": {
|
|
28039
28039
|
ie.push({
|
|
28040
|
-
...
|
|
28040
|
+
...ve,
|
|
28041
28041
|
isExpandable: v
|
|
28042
28042
|
});
|
|
28043
28043
|
break;
|
|
28044
28044
|
}
|
|
28045
28045
|
case "graph": {
|
|
28046
28046
|
ie.push({
|
|
28047
|
-
...
|
|
28047
|
+
...ve
|
|
28048
28048
|
});
|
|
28049
28049
|
break;
|
|
28050
28050
|
}
|
|
28051
28051
|
}
|
|
28052
28052
|
}
|
|
28053
|
-
|
|
28054
|
-
|
|
28055
|
-
|
|
28056
|
-
} else if (u) {
|
|
28057
|
-
const ce = ie.find((he) => u.id ? he.type === u.type && he.view_id === u.id : he.type === u.type);
|
|
28058
|
-
J(ce);
|
|
28059
|
-
} else {
|
|
28060
|
-
const ce = ie.find((he) => he.type === "form");
|
|
28061
|
-
J(ce);
|
|
28062
|
-
}
|
|
28063
|
-
y(ie), b(!1);
|
|
28053
|
+
let de;
|
|
28054
|
+
!u && ie.find((Ie) => Ie.type === "tree") ? de = ie.find((he) => he.type === "tree") : u ? de = ie.find((he) => u.id ? he.type === u.type && he.view_id === u.id : he.type === u.type) : de = ie.find((he) => he.type === "form"), de || showDialog$8(`Error determining the first view to show.
|
|
28055
|
+
Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`), J(de), y(ie), b(!1);
|
|
28064
28056
|
};
|
|
28065
28057
|
c({
|
|
28066
28058
|
tabKey: l,
|
|
28067
28059
|
canWeClose: oe
|
|
28068
28060
|
}), useEffect(() => {
|
|
28069
|
-
const ie = C.find((
|
|
28070
|
-
J(
|
|
28061
|
+
const ie = C.find((Ie) => Ie.type === "tree"), de = C.find((Ie) => u.id ? Ie.type === u.type && Ie.view_id === u.id : Ie.type === u.type);
|
|
28062
|
+
J(de || ie), p ? F == null || F(E) : (ne(void 0), D(void 0)), ee();
|
|
28071
28063
|
}, [r, a, p]), useEffect(() => {
|
|
28072
28064
|
Y === l && (F == null || F(w), X == null || X(I));
|
|
28073
28065
|
}, [T, Y]);
|
|
@@ -28080,25 +28072,25 @@ function ActionView(e, t) {
|
|
|
28080
28072
|
async function ae(ie) {
|
|
28081
28073
|
var xe;
|
|
28082
28074
|
Z(!0);
|
|
28083
|
-
const
|
|
28084
|
-
let
|
|
28085
|
-
if (
|
|
28075
|
+
const de = M.findIndex((ve) => ve.id === ie);
|
|
28076
|
+
let Ie;
|
|
28077
|
+
if (de === -1) {
|
|
28086
28078
|
try {
|
|
28087
|
-
|
|
28079
|
+
Ie = (xe = await ConnectionProvider.getHandler().readObjects({
|
|
28088
28080
|
model: r,
|
|
28089
28081
|
ids: [ie],
|
|
28090
28082
|
context: o
|
|
28091
28083
|
})) == null ? void 0 : xe[0];
|
|
28092
28084
|
} catch {
|
|
28093
28085
|
}
|
|
28094
|
-
if (!
|
|
28086
|
+
if (!Ie) {
|
|
28095
28087
|
Z(!1), z(!1), showDialog$7(P("idNotFound"));
|
|
28096
28088
|
return;
|
|
28097
28089
|
}
|
|
28098
28090
|
} else
|
|
28099
|
-
|
|
28091
|
+
Ie = M[de];
|
|
28100
28092
|
Z(!1), z(!1);
|
|
28101
|
-
const
|
|
28093
|
+
const he = a.find((ve) => ve[1] === "form");
|
|
28102
28094
|
Q({
|
|
28103
28095
|
domain: [],
|
|
28104
28096
|
context: o,
|
|
@@ -28107,7 +28099,7 @@ function ActionView(e, t) {
|
|
|
28107
28099
|
title: s,
|
|
28108
28100
|
target: "current",
|
|
28109
28101
|
initialView: {
|
|
28110
|
-
id:
|
|
28102
|
+
id: he == null ? void 0 : he[0],
|
|
28111
28103
|
type: "form"
|
|
28112
28104
|
},
|
|
28113
28105
|
action_id: h,
|
|
@@ -28140,7 +28132,7 @@ function ActionView(e, t) {
|
|
|
28140
28132
|
model: r,
|
|
28141
28133
|
context: o,
|
|
28142
28134
|
domain: n,
|
|
28143
|
-
formView: C.find((
|
|
28135
|
+
formView: C.find((de) => de.type === "form"),
|
|
28144
28136
|
treeView: ie,
|
|
28145
28137
|
searchTreeRef: j,
|
|
28146
28138
|
searchTreeNameSearch: V,
|
|
@@ -28157,8 +28149,8 @@ function ActionView(e, t) {
|
|
|
28157
28149
|
model: r,
|
|
28158
28150
|
context: o,
|
|
28159
28151
|
domain: n,
|
|
28160
|
-
treeView: C.find((
|
|
28161
|
-
formView: C.find((
|
|
28152
|
+
treeView: C.find((de) => de.type === "tree"),
|
|
28153
|
+
formView: C.find((de) => de.type === "form")
|
|
28162
28154
|
}, `${ie.type}-${ie.view_id}`);
|
|
28163
28155
|
case "dashboard":
|
|
28164
28156
|
return /* @__PURE__ */ jsx(DashboardActionView, {
|
|
@@ -28172,7 +28164,7 @@ function ActionView(e, t) {
|
|
|
28172
28164
|
A.current.clearAndReload();
|
|
28173
28165
|
else {
|
|
28174
28166
|
ne(void 0);
|
|
28175
|
-
const ie = C.find((
|
|
28167
|
+
const ie = C.find((de) => de.type === "form");
|
|
28176
28168
|
J(ie);
|
|
28177
28169
|
}
|
|
28178
28170
|
}
|