@gisce/react-ooui 1.1.2 → 1.1.3
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
|
@@ -11376,8 +11376,8 @@ function requireClearableLabeledInput() {
|
|
|
11376
11376
|
return {
|
|
11377
11377
|
resizableTextArea: (oe = z.current) === null || oe === void 0 ? void 0 : oe.resizableTextArea,
|
|
11378
11378
|
focus: function(ae) {
|
|
11379
|
-
var pe,
|
|
11380
|
-
(0, v.triggerFocus)((
|
|
11379
|
+
var pe, me;
|
|
11380
|
+
(0, v.triggerFocus)((me = (pe = z.current) === null || pe === void 0 ? void 0 : pe.resizableTextArea) === null || me === void 0 ? void 0 : me.textArea, ae);
|
|
11381
11381
|
},
|
|
11382
11382
|
blur: function() {
|
|
11383
11383
|
var ae;
|
|
@@ -13234,10 +13234,10 @@ 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", ce), F.removeListener("finish",
|
|
13237
|
+
l("cleanup"), F.removeListener("close", ce), F.removeListener("finish", he), F.removeListener("drain", le), F.removeListener("error", ie), F.removeListener("unpipe", ee), Y.removeListener("end", oe), Y.removeListener("end", ve), Y.removeListener("data", me), ae = !0, Q.awaitDrain && (!F._writableState || F._writableState.needDrain) && le();
|
|
13238
13238
|
}
|
|
13239
|
-
Y.on("data",
|
|
13240
|
-
function
|
|
13239
|
+
Y.on("data", me);
|
|
13240
|
+
function me(xe) {
|
|
13241
13241
|
l("ondata");
|
|
13242
13242
|
var ge = F.write(xe);
|
|
13243
13243
|
l("dest.write", ge), ge === !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());
|
|
@@ -13247,13 +13247,13 @@ function require_stream_readable() {
|
|
|
13247
13247
|
}
|
|
13248
13248
|
E(F, "error", ie);
|
|
13249
13249
|
function ce() {
|
|
13250
|
-
F.removeListener("finish",
|
|
13250
|
+
F.removeListener("finish", he), ve();
|
|
13251
13251
|
}
|
|
13252
13252
|
F.once("close", ce);
|
|
13253
|
-
function
|
|
13253
|
+
function he() {
|
|
13254
13254
|
l("onfinish"), F.removeListener("close", ce), ve();
|
|
13255
13255
|
}
|
|
13256
|
-
F.once("finish",
|
|
13256
|
+
F.once("finish", he);
|
|
13257
13257
|
function ve() {
|
|
13258
13258
|
l("unpipe"), Y.unpipe(F);
|
|
13259
13259
|
}
|
|
@@ -16465,12 +16465,12 @@ const DEFAULT_SEARCH_LIMIT$1 = 80, useSearch = (e) => {
|
|
|
16465
16465
|
}
|
|
16466
16466
|
}), ae = le[0];
|
|
16467
16467
|
H.current = [...ae], Z(getColorMap(le[1]));
|
|
16468
|
-
const pe = ae.map((ie) => ie.id),
|
|
16468
|
+
const pe = ae.map((ie) => ie.id), me = h !== void 0 ? sortResults({
|
|
16469
16469
|
resultsToSort: ae,
|
|
16470
16470
|
sorter: h,
|
|
16471
16471
|
fields: { ...f.fields, ...p.fields }
|
|
16472
16472
|
}) : [...H.current];
|
|
16473
|
-
P(
|
|
16473
|
+
P(me), pe.length > 0 ? v == null || v(0) : v == null || v(void 0);
|
|
16474
16474
|
} else
|
|
16475
16475
|
P([]), v == null || v(void 0);
|
|
16476
16476
|
l.current = !0;
|
|
@@ -16488,7 +16488,7 @@ const DEFAULT_SEARCH_LIMIT$1 = 80, useSearch = (e) => {
|
|
|
16488
16488
|
d
|
|
16489
16489
|
]), K = useCallback(
|
|
16490
16490
|
async (J) => {
|
|
16491
|
-
const { params: ee, newOffset: oe } = J || {}, le = mergeParams(ee || b, g), { colors: ae } = getTree(f), { totalItems: pe, results:
|
|
16491
|
+
const { params: ee, newOffset: oe } = J || {}, le = mergeParams(ee || b, g), { colors: ae } = getTree(f), { totalItems: pe, results: me, attrsEvaluated: ie } = await ConnectionProvider.getHandler().searchForTree({
|
|
16492
16492
|
params: le,
|
|
16493
16493
|
limit: V.current,
|
|
16494
16494
|
offset: oe || q,
|
|
@@ -16497,9 +16497,9 @@ const DEFAULT_SEARCH_LIMIT$1 = 80, useSearch = (e) => {
|
|
|
16497
16497
|
context: u,
|
|
16498
16498
|
attrs: ae && { colors: ae }
|
|
16499
16499
|
});
|
|
16500
|
-
Z(getColorMap(ie)), H.current = [...
|
|
16500
|
+
Z(getColorMap(ie)), H.current = [...me];
|
|
16501
16501
|
const ce = h !== void 0 ? sortResults({
|
|
16502
|
-
resultsToSort:
|
|
16502
|
+
resultsToSort: me,
|
|
16503
16503
|
sorter: h,
|
|
16504
16504
|
fields: { ...f.fields, ...p.fields }
|
|
16505
16505
|
}) : [...H.current];
|
|
@@ -16510,8 +16510,8 @@ const DEFAULT_SEARCH_LIMIT$1 = 80, useSearch = (e) => {
|
|
|
16510
16510
|
ve === -1 ? v == null || v(0) : v == null || v(ve);
|
|
16511
16511
|
} else
|
|
16512
16512
|
v == null || v(void 0);
|
|
16513
|
-
const
|
|
16514
|
-
U(
|
|
16513
|
+
const he = await pe;
|
|
16514
|
+
U(he), d == null || d(he);
|
|
16515
16515
|
},
|
|
16516
16516
|
[
|
|
16517
16517
|
v,
|
|
@@ -17075,7 +17075,7 @@ function Form(e, t) {
|
|
|
17075
17075
|
} = oe || {};
|
|
17076
17076
|
useImperativeHandle(t, () => ({
|
|
17077
17077
|
submitForm: ke,
|
|
17078
|
-
getFields:
|
|
17078
|
+
getFields: he,
|
|
17079
17079
|
getValues: ve,
|
|
17080
17080
|
getPlainValues: xe,
|
|
17081
17081
|
getContext: Te,
|
|
@@ -17099,7 +17099,7 @@ function Form(e, t) {
|
|
|
17099
17099
|
}, [W]);
|
|
17100
17100
|
const pe = (re, te, ue) => {
|
|
17101
17101
|
Q == null || Q(!1), Y == null || Y(!1), a == null || a(re, te, ue), ne == null || ne(re);
|
|
17102
|
-
},
|
|
17102
|
+
}, me = () => {
|
|
17103
17103
|
Y == null || Y(!1), o == null || o();
|
|
17104
17104
|
}, ie = (re) => {
|
|
17105
17105
|
Y == null || Y(!1), u == null || u(re);
|
|
@@ -17107,7 +17107,7 @@ function Form(e, t) {
|
|
|
17107
17107
|
function ce() {
|
|
17108
17108
|
return r || V.current;
|
|
17109
17109
|
}
|
|
17110
|
-
function
|
|
17110
|
+
function he() {
|
|
17111
17111
|
return $;
|
|
17112
17112
|
}
|
|
17113
17113
|
function ve() {
|
|
@@ -17120,7 +17120,7 @@ function Form(e, t) {
|
|
|
17120
17120
|
return re;
|
|
17121
17121
|
}
|
|
17122
17122
|
function xe() {
|
|
17123
|
-
const re = ve(), te =
|
|
17123
|
+
const re = ve(), te = he();
|
|
17124
17124
|
let ue = {};
|
|
17125
17125
|
return Object.keys(re).forEach((fe) => {
|
|
17126
17126
|
const Ce = re[fe];
|
|
@@ -17233,12 +17233,12 @@ function Form(e, t) {
|
|
|
17233
17233
|
de() ? showDialog$6({
|
|
17234
17234
|
lang: E,
|
|
17235
17235
|
onOk: () => {
|
|
17236
|
-
|
|
17236
|
+
me == null || me(), re(!0);
|
|
17237
17237
|
},
|
|
17238
17238
|
onCancel: () => {
|
|
17239
17239
|
re(!1);
|
|
17240
17240
|
}
|
|
17241
|
-
}) : (
|
|
17241
|
+
}) : (me == null || me(), re(!0));
|
|
17242
17242
|
}), Ee = async () => {
|
|
17243
17243
|
if (c) {
|
|
17244
17244
|
const re = await ConnectionProvider.getHandler().getActionStringForModel(n);
|
|
@@ -17345,7 +17345,7 @@ function Form(e, t) {
|
|
|
17345
17345
|
callOnSubmitSucceed: ue = !0
|
|
17346
17346
|
} = re || {};
|
|
17347
17347
|
if (j.current = !0, k(void 0), !de() && ce() && ue)
|
|
17348
|
-
return j.current = !1, Q == null || Q(!1),
|
|
17348
|
+
return j.current = !1, Q == null || Q(!1), me == null || me(), !0;
|
|
17349
17349
|
if (await be())
|
|
17350
17350
|
return j.current = !1, showDialog$5(E), !1;
|
|
17351
17351
|
_(!0), Y == null || Y(!0);
|
|
@@ -17558,7 +17558,7 @@ function Form(e, t) {
|
|
|
17558
17558
|
context: ue
|
|
17559
17559
|
}) {
|
|
17560
17560
|
if (re === "cancel") {
|
|
17561
|
-
|
|
17561
|
+
me == null || me();
|
|
17562
17562
|
return;
|
|
17563
17563
|
}
|
|
17564
17564
|
if (await be()) {
|
|
@@ -17585,7 +17585,7 @@ function Form(e, t) {
|
|
|
17585
17585
|
children: /* @__PURE__ */ jsx(FormProvider$1, {
|
|
17586
17586
|
getValues: ve,
|
|
17587
17587
|
getPlainValues: xe,
|
|
17588
|
-
getFields:
|
|
17588
|
+
getFields: he,
|
|
17589
17589
|
domain: g,
|
|
17590
17590
|
activeId: r,
|
|
17591
17591
|
activeModel: n,
|
|
@@ -18671,10 +18671,10 @@ function SearchTree(e, t) {
|
|
|
18671
18671
|
tableRefreshing: le,
|
|
18672
18672
|
searchFilterLoading: ae,
|
|
18673
18673
|
searchError: pe,
|
|
18674
|
-
page:
|
|
18674
|
+
page: me,
|
|
18675
18675
|
offset: ie,
|
|
18676
18676
|
getResults: ce,
|
|
18677
|
-
requestPageChange:
|
|
18677
|
+
requestPageChange: he,
|
|
18678
18678
|
changeSort: ve,
|
|
18679
18679
|
fetchChildrenForRecord: xe,
|
|
18680
18680
|
colorsForResults: ge,
|
|
@@ -18710,7 +18710,7 @@ function SearchTree(e, t) {
|
|
|
18710
18710
|
}
|
|
18711
18711
|
})), useEffect(() => {
|
|
18712
18712
|
!v || u && (I.current = !1, oe());
|
|
18713
|
-
}, [
|
|
18713
|
+
}, [me, ie, v, u, s]);
|
|
18714
18714
|
const _e = async () => {
|
|
18715
18715
|
x(!1), m(!0), _(void 0), F == null || F(!0);
|
|
18716
18716
|
try {
|
|
@@ -18805,10 +18805,10 @@ function SearchTree(e, t) {
|
|
|
18805
18805
|
}), /* @__PURE__ */ jsx(Tree, {
|
|
18806
18806
|
total: Te,
|
|
18807
18807
|
limit: Q,
|
|
18808
|
-
page:
|
|
18808
|
+
page: me,
|
|
18809
18809
|
treeView: y,
|
|
18810
18810
|
results: ce(),
|
|
18811
|
-
onRequestPageChange:
|
|
18811
|
+
onRequestPageChange: he,
|
|
18812
18812
|
loading: le,
|
|
18813
18813
|
onRowClicked: ye,
|
|
18814
18814
|
scrollY: c || be(),
|
|
@@ -21877,14 +21877,14 @@ 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,
|
|
21881
|
-
if (ae && j && !K && !
|
|
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(), ce = (0, v.default)(ee, ["prefixCls", "editable", "copyable", "ellipsis", "mark", "code", "delete", "underline", "strong", "keyboard"].concat((0, o.default)(y.configConsumerProps))), he = this.canUseCSSEllipsis(), ve = ae === 1 && he, xe = ae && ae > 1 && he, ge = T;
|
|
21881
|
+
if (ae && j && !K && !he) {
|
|
21882
21882
|
var Te = ee.title, _e = Te || "";
|
|
21883
21883
|
!Te && (typeof T == "string" || typeof T == "number") && (_e = String(T)), _e = _e == null ? void 0 : _e.slice(String(A || "").length), ge = /* @__PURE__ */ f.createElement(f.Fragment, null, A, /* @__PURE__ */ f.createElement("span", {
|
|
21884
21884
|
title: _e,
|
|
21885
21885
|
"aria-hidden": "true"
|
|
21886
|
-
}, B), pe),
|
|
21887
|
-
title:
|
|
21886
|
+
}, B), pe), me && (ge = /* @__PURE__ */ f.createElement(S.default, {
|
|
21887
|
+
title: me === !0 ? T : me
|
|
21888
21888
|
}, /* @__PURE__ */ f.createElement("span", null, ge)));
|
|
21889
21889
|
} else
|
|
21890
21890
|
ge = /* @__PURE__ */ f.createElement(f.Fragment, null, T, pe);
|
|
@@ -22818,7 +22818,7 @@ const One2manyInput = (e) => {
|
|
|
22818
22818
|
showDialog$1({
|
|
22819
22819
|
lang: x,
|
|
22820
22820
|
onOk: () => {
|
|
22821
|
-
s === "form" ?
|
|
22821
|
+
s === "form" ? me() : ie();
|
|
22822
22822
|
}
|
|
22823
22823
|
});
|
|
22824
22824
|
return;
|
|
@@ -22826,7 +22826,7 @@ const One2manyInput = (e) => {
|
|
|
22826
22826
|
showDialog$2({
|
|
22827
22827
|
lang: x,
|
|
22828
22828
|
onOk: () => {
|
|
22829
|
-
s === "form" ?
|
|
22829
|
+
s === "form" ? me() : ie();
|
|
22830
22830
|
}
|
|
22831
22831
|
});
|
|
22832
22832
|
}, ae = async () => {
|
|
@@ -22847,7 +22847,7 @@ const One2manyInput = (e) => {
|
|
|
22847
22847
|
s === "form" ? oe(() => {
|
|
22848
22848
|
N(!0);
|
|
22849
22849
|
}) : N(!0);
|
|
22850
|
-
},
|
|
22850
|
+
}, me = async () => {
|
|
22851
22851
|
b(!0), y(!1), w(void 0);
|
|
22852
22852
|
try {
|
|
22853
22853
|
if (K[l].id > 0) {
|
|
@@ -22906,7 +22906,7 @@ const One2manyInput = (e) => {
|
|
|
22906
22906
|
});
|
|
22907
22907
|
}
|
|
22908
22908
|
X(ye), $ || S(!1);
|
|
22909
|
-
},
|
|
22909
|
+
}, he = (se) => {
|
|
22910
22910
|
const {
|
|
22911
22911
|
id: de
|
|
22912
22912
|
} = se;
|
|
@@ -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 ? he : void 0,
|
|
23008
23008
|
showPagination: !1,
|
|
23009
23009
|
rowSelection: {
|
|
23010
23010
|
selectedRowKeys: L,
|
|
@@ -27992,13 +27992,13 @@ function ActionView(e, t) {
|
|
|
27992
27992
|
b(!0);
|
|
27993
27993
|
const ie = [];
|
|
27994
27994
|
for (const ce of a) {
|
|
27995
|
-
const [
|
|
27995
|
+
const [he, ve] = ce;
|
|
27996
27996
|
let xe;
|
|
27997
27997
|
try {
|
|
27998
27998
|
ve !== "dashboard" && (xe = await ConnectionProvider.getHandler().getView({
|
|
27999
27999
|
model: r,
|
|
28000
28000
|
type: ve,
|
|
28001
|
-
id:
|
|
28001
|
+
id: he,
|
|
28002
28002
|
context: o
|
|
28003
28003
|
}));
|
|
28004
28004
|
} catch (ge) {
|
|
@@ -28051,13 +28051,13 @@ function ActionView(e, t) {
|
|
|
28051
28051
|
}
|
|
28052
28052
|
}
|
|
28053
28053
|
if (!u && ie.find((ce) => ce.type === "tree")) {
|
|
28054
|
-
const ce = ie.find((
|
|
28054
|
+
const ce = ie.find((he) => he.type === "tree");
|
|
28055
28055
|
J(ce);
|
|
28056
28056
|
} else if (u) {
|
|
28057
|
-
const ce = ie.find((
|
|
28057
|
+
const ce = ie.find((he) => u.id ? he.type === u.type && he.view_id === u.id : he.type === u.type);
|
|
28058
28058
|
J(ce);
|
|
28059
28059
|
} else {
|
|
28060
|
-
const ce = ie.find((
|
|
28060
|
+
const ce = ie.find((he) => he.type === "form");
|
|
28061
28061
|
J(ce);
|
|
28062
28062
|
}
|
|
28063
28063
|
y(ie), b(!1);
|
|
@@ -28066,7 +28066,7 @@ function ActionView(e, t) {
|
|
|
28066
28066
|
tabKey: l,
|
|
28067
28067
|
canWeClose: oe
|
|
28068
28068
|
}), useEffect(() => {
|
|
28069
|
-
const ie = C.find((
|
|
28069
|
+
const ie = C.find((he) => he.type === "tree"), ce = C.find((he) => u.id ? he.type === u.type && he.view_id === u.id : he.type === u.type);
|
|
28070
28070
|
J(ce || ie), p ? F == null || F(E) : (ne(void 0), D(void 0)), ee();
|
|
28071
28071
|
}, [r, a, p]), useEffect(() => {
|
|
28072
28072
|
Y === l && (F == null || F(w), X == null || X(I));
|
|
@@ -28081,22 +28081,22 @@ function ActionView(e, t) {
|
|
|
28081
28081
|
var xe;
|
|
28082
28082
|
Z(!0);
|
|
28083
28083
|
const ce = M.findIndex((ge) => ge.id === ie);
|
|
28084
|
-
let
|
|
28084
|
+
let he;
|
|
28085
28085
|
if (ce === -1) {
|
|
28086
28086
|
try {
|
|
28087
|
-
|
|
28087
|
+
he = (xe = await ConnectionProvider.getHandler().readObjects({
|
|
28088
28088
|
model: r,
|
|
28089
28089
|
ids: [ie],
|
|
28090
28090
|
context: o
|
|
28091
28091
|
})) == null ? void 0 : xe[0];
|
|
28092
28092
|
} catch {
|
|
28093
28093
|
}
|
|
28094
|
-
if (!
|
|
28094
|
+
if (!he) {
|
|
28095
28095
|
Z(!1), z(!1), showDialog$7(P("idNotFound"));
|
|
28096
28096
|
return;
|
|
28097
28097
|
}
|
|
28098
28098
|
} else
|
|
28099
|
-
|
|
28099
|
+
he = M[ce];
|
|
28100
28100
|
Z(!1), z(!1);
|
|
28101
28101
|
const ve = a.find((ge) => ge[1] === "form");
|
|
28102
28102
|
Q({
|
|
@@ -28167,7 +28167,7 @@ function ActionView(e, t) {
|
|
|
28167
28167
|
}
|
|
28168
28168
|
});
|
|
28169
28169
|
}
|
|
28170
|
-
function
|
|
28170
|
+
function me() {
|
|
28171
28171
|
if (w === void 0 && I.type === "form")
|
|
28172
28172
|
A.current.clearAndReload();
|
|
28173
28173
|
else {
|
|
@@ -28183,7 +28183,7 @@ function ActionView(e, t) {
|
|
|
28183
28183
|
availableViews: C,
|
|
28184
28184
|
formRef: A,
|
|
28185
28185
|
searchTreeRef: j,
|
|
28186
|
-
onNewClicked:
|
|
28186
|
+
onNewClicked: me,
|
|
28187
28187
|
currentId: w,
|
|
28188
28188
|
setCurrentId: ne,
|
|
28189
28189
|
setCurrentItemIndex: D,
|