@gisce/react-ooui 1.2.0-rc.81 → 1.2.0-rc.82
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 +163 -175
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/react-ooui.umd.js +2 -2
- package/dist/react-ooui.umd.js.map +1 -1
- package/dist/widgets/views/searchFilter/SearchField.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/widgets/views/searchFilter/SearchField.tsx +9 -23
package/dist/react-ooui.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React$s from "react";
|
|
2
2
|
import React__default, { useContext, useState as useState$1, useEffect, useRef, cloneElement as cloneElement$1, forwardRef, useImperativeHandle, createElement, useMemo as useMemo$3, useLayoutEffect as useLayoutEffect$3, useCallback } from "react";
|
|
3
3
|
import { Tooltip as Tooltip$3, theme as theme$1, Typography as Typography$2, Form as Form$3, Row, Col, Modal, Button as Button$1, Dropdown, Menu, Spin, Divider, Space, Input as Input$3, Select, Checkbox, Alert, Timeline as Timeline$1, Statistic, Card, Tag as Tag$1, message, DatePicker as DatePicker$1, TimePicker, InputNumber, Progress, Pagination, Tabs, Popover, Radio as Radio$1, Switch as Switch$1, Steps as Steps$1, Layout } from "antd";
|
|
4
|
-
import { Label as Label$1, Field as Field$2, Tree as Tree$1, Reference as Reference$1, Selection as Selection$1, Many2one as Many2one$1, Boolean as Boolean$2, Container as Container$1, parseContext, Form as Form$4, Integer as Integer$1, SearchFilter as SearchFilter$1, transformDomainForChildWidget, graphProcessor, parseGraph, graphFieldUtils } from "@gisce/ooui";
|
|
4
|
+
import { Label as Label$1, Field as Field$2, Tree as Tree$1, Reference as Reference$1, Selection as Selection$1, Many2one as Many2one$1, Boolean as Boolean$2, Container as Container$1, parseContext, Form as Form$4, Integer as Integer$1, SearchFieldTypes, SearchFilter as SearchFilter$1, transformDomainForChildWidget, graphProcessor, parseGraph, graphFieldUtils } from "@gisce/ooui";
|
|
5
5
|
import * as AntIcons from "@ant-design/icons";
|
|
6
6
|
import AntIcons__default, { QuestionCircleOutlined, ExclamationCircleOutlined, LoadingOutlined, DownOutlined, WarningOutlined, CloseOutlined, CheckOutlined as CheckOutlined$4, TranslationOutlined, FolderOpenOutlined, DownloadOutlined, ClearOutlined, StarFilled, StarOutlined, UpOutlined, SearchOutlined, RightCircleOutlined, ThunderboltOutlined, PrinterOutlined, EnterOutlined as EnterOutlined$4, PlusSquareOutlined, MinusSquareOutlined, FileAddOutlined, AlignLeftOutlined, ApiOutlined, DeleteOutlined, LeftOutlined, RightOutlined, EyeOutlined, FormOutlined, TableOutlined, AreaChartOutlined, CalendarOutlined, LinkOutlined, SaveOutlined, CopyOutlined as CopyOutlined$4, InfoCircleOutlined, ReloadOutlined, EditOutlined as EditOutlined$4, FilterOutlined, CloseCircleFilled as CloseCircleFilled$4, BorderOuterOutlined, SettingOutlined, ExportOutlined } from "@ant-design/icons";
|
|
7
7
|
import { Interweave } from "interweave";
|
|
@@ -3926,18 +3926,18 @@ var TextArea$2 = /* @__PURE__ */ React__default.forwardRef(function(e, t) {
|
|
|
3926
3926
|
M(""), G(), resolveOnChange(C.current.textArea, ee, l);
|
|
3927
3927
|
}, le = fixControlledValue(I);
|
|
3928
3928
|
!z && X && o == null && (le = fixEmojiLength(le, u));
|
|
3929
|
-
var oe = p,
|
|
3929
|
+
var oe = p, ae;
|
|
3930
3930
|
if (b) {
|
|
3931
3931
|
var de = _toConsumableArray(le).length;
|
|
3932
|
-
_typeof$4(b) === "object" ?
|
|
3932
|
+
_typeof$4(b) === "object" ? ae = b.formatter({
|
|
3933
3933
|
value: le,
|
|
3934
3934
|
count: de,
|
|
3935
3935
|
maxLength: u
|
|
3936
|
-
}) :
|
|
3936
|
+
}) : ae = "".concat(de).concat(X ? " / ".concat(u) : ""), oe = /* @__PURE__ */ jsxs(Fragment, {
|
|
3937
3937
|
children: [oe, /* @__PURE__ */ jsx("span", {
|
|
3938
3938
|
className: classNames("".concat(m, "-data-count"), _ == null ? void 0 : _.count),
|
|
3939
3939
|
style: w == null ? void 0 : w.count,
|
|
3940
|
-
children:
|
|
3940
|
+
children: ae
|
|
3941
3941
|
})]
|
|
3942
3942
|
});
|
|
3943
3943
|
}
|
|
@@ -3960,7 +3960,7 @@ var TextArea$2 = /* @__PURE__ */ React__default.forwardRef(function(e, t) {
|
|
|
3960
3960
|
} : {}),
|
|
3961
3961
|
dataAttrs: {
|
|
3962
3962
|
affixWrapper: {
|
|
3963
|
-
"data-count": typeof
|
|
3963
|
+
"data-count": typeof ae == "string" ? ae : void 0
|
|
3964
3964
|
}
|
|
3965
3965
|
},
|
|
3966
3966
|
hidden: $,
|
|
@@ -5877,12 +5877,12 @@ var required$1 = function(t, r, n, o, a, s) {
|
|
|
5877
5877
|
}, pattern$2 = {
|
|
5878
5878
|
email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
|
|
5879
5879
|
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
|
|
5880
|
-
}, types$
|
|
5880
|
+
}, types$1 = {
|
|
5881
5881
|
integer: function(t) {
|
|
5882
|
-
return types$
|
|
5882
|
+
return types$1.number(t) && parseInt(t, 10) === t;
|
|
5883
5883
|
},
|
|
5884
5884
|
float: function(t) {
|
|
5885
|
-
return types$
|
|
5885
|
+
return types$1.number(t) && !types$1.integer(t);
|
|
5886
5886
|
},
|
|
5887
5887
|
array: function(t) {
|
|
5888
5888
|
return Array.isArray(t);
|
|
@@ -5903,7 +5903,7 @@ var required$1 = function(t, r, n, o, a, s) {
|
|
|
5903
5903
|
return isNaN(t) ? !1 : typeof t == "number";
|
|
5904
5904
|
},
|
|
5905
5905
|
object: function(t) {
|
|
5906
|
-
return typeof t == "object" && !types$
|
|
5906
|
+
return typeof t == "object" && !types$1.array(t);
|
|
5907
5907
|
},
|
|
5908
5908
|
method: function(t) {
|
|
5909
5909
|
return typeof t == "function";
|
|
@@ -5923,7 +5923,7 @@ var required$1 = function(t, r, n, o, a, s) {
|
|
|
5923
5923
|
return;
|
|
5924
5924
|
}
|
|
5925
5925
|
var s = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], l = t.type;
|
|
5926
|
-
s.indexOf(l) > -1 ? types$
|
|
5926
|
+
s.indexOf(l) > -1 ? types$1[l](r) || o.push(format$1(a.messages.types[l], t.fullField, t.type)) : l && typeof r !== t.type && o.push(format$1(a.messages.types[l], t.fullField, t.type));
|
|
5927
5927
|
}, range = function(t, r, n, o, a) {
|
|
5928
5928
|
var s = typeof t.len == "number", l = typeof t.min == "number", c = typeof t.max == "number", u = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, d = r, f = null, p = typeof r == "number", y = typeof r == "string", m = Array.isArray(r);
|
|
5929
5929
|
if (p ? f = "number" : y ? f = "string" : m && (f = "array"), !f)
|
|
@@ -9257,11 +9257,11 @@ function useStatus(e, t, r, n) {
|
|
|
9257
9257
|
function V() {
|
|
9258
9258
|
L(STATUS_NONE, !0), z(null, !0);
|
|
9259
9259
|
}
|
|
9260
|
-
function F(
|
|
9260
|
+
function F(ae) {
|
|
9261
9261
|
var de = K();
|
|
9262
|
-
if (!(
|
|
9262
|
+
if (!(ae && !ae.deadline && ae.target !== de)) {
|
|
9263
9263
|
var ge = H.current, $e;
|
|
9264
|
-
D === STATUS_APPEAR && ge ? $e = _ == null ? void 0 : _(de,
|
|
9264
|
+
D === STATUS_APPEAR && ge ? $e = _ == null ? void 0 : _(de, ae) : D === STATUS_ENTER && ge ? $e = w == null ? void 0 : w(de, ae) : D === STATUS_LEAVE && ge && ($e = P == null ? void 0 : P(de, ae)), D !== STATUS_NONE && ge && $e !== !1 && V();
|
|
9265
9265
|
}
|
|
9266
9266
|
}
|
|
9267
9267
|
var k = useDomMotionEvents(F), G = _slicedToArray(k, 1), X = G[0], Q = function(de) {
|
|
@@ -9278,8 +9278,8 @@ function useStatus(e, t, r, n) {
|
|
|
9278
9278
|
}
|
|
9279
9279
|
}, A = React$s.useMemo(function() {
|
|
9280
9280
|
return Q(D);
|
|
9281
|
-
}, [D]), T = useStepQueue(D, !e, function(
|
|
9282
|
-
if (
|
|
9281
|
+
}, [D]), T = useStepQueue(D, !e, function(ae) {
|
|
9282
|
+
if (ae === STEP_PREPARE) {
|
|
9283
9283
|
var de = A[STEP_PREPARE];
|
|
9284
9284
|
return de ? de(K()) : SkipStep;
|
|
9285
9285
|
}
|
|
@@ -9295,10 +9295,10 @@ function useStatus(e, t, r, n) {
|
|
|
9295
9295
|
}), U = _slicedToArray(T, 2), J = U[0], ne = U[1], Z = isActive(ne);
|
|
9296
9296
|
H.current = Z, useIsomorphicLayoutEffect(function() {
|
|
9297
9297
|
M(t);
|
|
9298
|
-
var
|
|
9298
|
+
var ae = Y.current;
|
|
9299
9299
|
Y.current = !0;
|
|
9300
9300
|
var de;
|
|
9301
|
-
!
|
|
9301
|
+
!ae && t && l && (de = STATUS_APPEAR), ae && t && a && (de = STATUS_ENTER), (ae && !t && u || !ae && f && !t && u) && (de = STATUS_LEAVE);
|
|
9302
9302
|
var ge = Q(de);
|
|
9303
9303
|
de && (e || ge[STEP_PREPARE]) ? (L(de), J()) : L(STATUS_NONE);
|
|
9304
9304
|
}, [t]), useEffect(function() {
|
|
@@ -9621,7 +9621,7 @@ style$4.default = _default$s;
|
|
|
9621
9621
|
parentContext: Z,
|
|
9622
9622
|
iconPrefixCls: le,
|
|
9623
9623
|
theme: oe,
|
|
9624
|
-
componentDisabled:
|
|
9624
|
+
componentDisabled: ae
|
|
9625
9625
|
} = W;
|
|
9626
9626
|
process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "production" && (0, c.default)(T === void 0, "ConfigProvider", "`dropdownMatchSelectWidth` is deprecated. Please use `popupMatchSelectWidth` instead.");
|
|
9627
9627
|
const de = l.useCallback((Ce, te) => {
|
|
@@ -9687,8 +9687,8 @@ style$4.default = _default$s;
|
|
|
9687
9687
|
}, [se]);
|
|
9688
9688
|
return oe && (Se = /* @__PURE__ */ l.createElement(y.DesignTokenContext.Provider, {
|
|
9689
9689
|
value: je
|
|
9690
|
-
}, Se)),
|
|
9691
|
-
disabled:
|
|
9690
|
+
}, Se)), ae !== void 0 && (Se = /* @__PURE__ */ l.createElement(g.DisabledContextProvider, {
|
|
9691
|
+
disabled: ae
|
|
9692
9692
|
}, Se)), /* @__PURE__ */ l.createElement(h.ConfigContext.Provider, {
|
|
9693
9693
|
value: he
|
|
9694
9694
|
}, Se);
|
|
@@ -12818,11 +12818,11 @@ function require_stream_readable() {
|
|
|
12818
12818
|
function oe() {
|
|
12819
12819
|
c("onend"), A.end();
|
|
12820
12820
|
}
|
|
12821
|
-
var
|
|
12822
|
-
A.on("drain",
|
|
12821
|
+
var ae = Y(U);
|
|
12822
|
+
A.on("drain", ae);
|
|
12823
12823
|
var de = !1;
|
|
12824
12824
|
function ge() {
|
|
12825
|
-
c("cleanup"), A.removeListener("close", ee), A.removeListener("finish", se), A.removeListener("drain",
|
|
12825
|
+
c("cleanup"), A.removeListener("close", ee), A.removeListener("finish", se), A.removeListener("drain", ae), A.removeListener("error", _e), A.removeListener("unpipe", le), U.removeListener("end", oe), U.removeListener("end", me), U.removeListener("data", $e), de = !0, J.awaitDrain && (!A._writableState || A._writableState.needDrain) && ae();
|
|
12826
12826
|
}
|
|
12827
12827
|
U.on("data", $e);
|
|
12828
12828
|
function $e(Ee) {
|
|
@@ -16104,7 +16104,7 @@ const transformPlainMany2Ones = ({
|
|
|
16104
16104
|
context: u
|
|
16105
16105
|
});
|
|
16106
16106
|
if (q(Z.length), d == null || d(Z.length), Z.length > 0) {
|
|
16107
|
-
const le = Z.map((_e) => _e == null ? void 0 : _e[0]), { colors: oe } = getTree(f),
|
|
16107
|
+
const le = Z.map((_e) => _e == null ? void 0 : _e[0]), { colors: oe } = getTree(f), ae = await ConnectionProvider.getHandler().readEvalUiObjects({
|
|
16108
16108
|
model: t,
|
|
16109
16109
|
ids: le,
|
|
16110
16110
|
arch: f == null ? void 0 : f.arch,
|
|
@@ -16113,8 +16113,8 @@ const transformPlainMany2Ones = ({
|
|
|
16113
16113
|
attrs: oe && {
|
|
16114
16114
|
colors: oe
|
|
16115
16115
|
}
|
|
16116
|
-
}), de =
|
|
16117
|
-
V.current = [...de], K(getColorMap(
|
|
16116
|
+
}), de = ae[0];
|
|
16117
|
+
V.current = [...de], K(getColorMap(ae[1]));
|
|
16118
16118
|
const ge = de.map((_e) => _e.id), $e = y !== void 0 ? sortResults({
|
|
16119
16119
|
resultsToSort: de,
|
|
16120
16120
|
sorter: y,
|
|
@@ -16138,8 +16138,8 @@ const transformPlainMany2Ones = ({
|
|
|
16138
16138
|
d
|
|
16139
16139
|
]), X = useCallback(
|
|
16140
16140
|
async (Z) => {
|
|
16141
|
-
const { params: le, newOffset: oe } = Z || {},
|
|
16142
|
-
params:
|
|
16141
|
+
const { params: le, newOffset: oe } = Z || {}, ae = mergeParams(le || w, v), { colors: de } = getTree(f), { totalItems: ge, results: $e, attrsEvaluated: _e } = await ConnectionProvider.getHandler().searchForTree({
|
|
16142
|
+
params: ae,
|
|
16143
16143
|
limit: H.current,
|
|
16144
16144
|
offset: oe || L,
|
|
16145
16145
|
model: t,
|
|
@@ -16223,8 +16223,8 @@ const transformPlainMany2Ones = ({
|
|
|
16223
16223
|
[m, k, f, p, F]
|
|
16224
16224
|
), T = useCallback(
|
|
16225
16225
|
(Z) => {
|
|
16226
|
-
const { params: le, searchValues: oe, limit:
|
|
16227
|
-
S || (r == null || r(void 0), n == null || n([]), P == null || P(oe), o == null || o(le), a == null || a(!1), I(!0), C(void 0), D(1),
|
|
16226
|
+
const { params: le, searchValues: oe, limit: ae, offset: de } = Z;
|
|
16227
|
+
S || (r == null || r(void 0), n == null || n([]), P == null || P(oe), o == null || o(le), a == null || a(!1), I(!0), C(void 0), D(1), ae && (H.current = ae, _ == null || _(ae)), de && N(de), Q({
|
|
16228
16228
|
params: le,
|
|
16229
16229
|
newOffset: de
|
|
16230
16230
|
}));
|
|
@@ -16320,13 +16320,13 @@ const transformPlainMany2Ones = ({
|
|
|
16320
16320
|
}, [p]), useEffect(() => {
|
|
16321
16321
|
ne(E !== void 0 ? E : DEFAULT_SEARCH_LIMIT$1);
|
|
16322
16322
|
}, [E]), useEffect(() => {
|
|
16323
|
-
a.length === 1 ? A(a[0]) : a.length > 1 && A(a.filter((
|
|
16323
|
+
a.length === 1 ? A(a[0]) : a.length > 1 && A(a.filter((ae) => ae.view_id !== r.view_id)[0]);
|
|
16324
16324
|
}, [a]), useEffect(() => {
|
|
16325
|
-
(Q == null ? void 0 : Q.view_id) === r.view_id && a.length > 1 && A(a.filter((
|
|
16325
|
+
(Q == null ? void 0 : Q.view_id) === r.view_id && a.length > 1 && A(a.filter((ae) => ae.view_id !== r.view_id)[0]);
|
|
16326
16326
|
}, [r]);
|
|
16327
16327
|
const oe = async () => {
|
|
16328
|
-
var
|
|
16329
|
-
return await ((
|
|
16328
|
+
var ae;
|
|
16329
|
+
return await ((ae = s.current) == null ? void 0 : ae.submitForm());
|
|
16330
16330
|
};
|
|
16331
16331
|
return /* @__PURE__ */ jsx(ActionViewContext.Provider, {
|
|
16332
16332
|
value: {
|
|
@@ -16789,7 +16789,7 @@ function Form(e, t) {
|
|
|
16789
16789
|
setFormHasChanges: Z = void 0,
|
|
16790
16790
|
setCurrentId: le = void 0,
|
|
16791
16791
|
setFormIsLoading: oe = void 0,
|
|
16792
|
-
setAttachments:
|
|
16792
|
+
setAttachments: ae = void 0,
|
|
16793
16793
|
title: de = void 0,
|
|
16794
16794
|
setTitle: ge = void 0
|
|
16795
16795
|
} = ($ ? J : {}) || {}, $e = useContext(ContentRootContext), {
|
|
@@ -16820,12 +16820,12 @@ function Form(e, t) {
|
|
|
16820
16820
|
elementHasLostFocus: !0
|
|
16821
16821
|
}), H(!1));
|
|
16822
16822
|
}, [K]);
|
|
16823
|
-
const se = (
|
|
16824
|
-
Z == null || Z(!1), ne == null || ne(!1), a == null || a(
|
|
16823
|
+
const se = (ie, re, pe) => {
|
|
16824
|
+
Z == null || Z(!1), ne == null || ne(!1), a == null || a(ie, re, pe), le == null || le(ie);
|
|
16825
16825
|
}, me = () => {
|
|
16826
16826
|
ne == null || ne(!1), o == null || o();
|
|
16827
|
-
}, Ee = (
|
|
16828
|
-
ne == null || ne(!1), u == null || u(
|
|
16827
|
+
}, Ee = (ie) => {
|
|
16828
|
+
ne == null || ne(!1), u == null || u(ie);
|
|
16829
16829
|
};
|
|
16830
16830
|
function he() {
|
|
16831
16831
|
return n || V.current;
|
|
@@ -16834,29 +16834,29 @@ function Form(e, t) {
|
|
|
16834
16834
|
return B;
|
|
16835
16835
|
}
|
|
16836
16836
|
function Se() {
|
|
16837
|
-
const
|
|
16837
|
+
const ie = {
|
|
16838
16838
|
...ue(B),
|
|
16839
16839
|
...te()
|
|
16840
16840
|
};
|
|
16841
|
-
for (const re in
|
|
16842
|
-
|
|
16843
|
-
return
|
|
16841
|
+
for (const re in ie)
|
|
16842
|
+
ie[re] === void 0 && delete ie[re];
|
|
16843
|
+
return ie;
|
|
16844
16844
|
}
|
|
16845
16845
|
function Ie() {
|
|
16846
|
-
const
|
|
16846
|
+
const ie = Se(), re = Me();
|
|
16847
16847
|
let pe = {};
|
|
16848
|
-
return Object.keys(
|
|
16849
|
-
const Pe =
|
|
16848
|
+
return Object.keys(ie).forEach((ye) => {
|
|
16849
|
+
const Pe = ie[ye];
|
|
16850
16850
|
re[ye] && re[ye].type === "many2one" && Pe && Array.isArray(Pe) && Pe.length === 2 ? pe[ye] = Pe[0] : re[ye] && (re[ye].type === "one2many" || re[ye].type === "many2many") && Pe && Pe.items ? pe[ye] = Pe.items.filter((qe) => qe.operation !== "pendingRemove").map((qe) => qe.id) : pe[ye] = Pe;
|
|
16851
16851
|
}), pe;
|
|
16852
16852
|
}
|
|
16853
16853
|
function je() {
|
|
16854
|
-
const
|
|
16854
|
+
const ie = {
|
|
16855
16855
|
...ue(B)
|
|
16856
16856
|
};
|
|
16857
|
-
for (const re in
|
|
16858
|
-
|
|
16859
|
-
return
|
|
16857
|
+
for (const re in ie)
|
|
16858
|
+
ie[re] === void 0 && delete ie[re];
|
|
16859
|
+
return ie;
|
|
16860
16860
|
}
|
|
16861
16861
|
function Ce() {
|
|
16862
16862
|
return {
|
|
@@ -16873,11 +16873,11 @@ function Form(e, t) {
|
|
|
16873
16873
|
...ee
|
|
16874
16874
|
};
|
|
16875
16875
|
}
|
|
16876
|
-
const fe = async (
|
|
16876
|
+
const fe = async (ie) => {
|
|
16877
16877
|
const re = he() ? C == null ? void 0 : C.context : {};
|
|
16878
16878
|
return await ConnectionProvider.getHandler().defaultGet({
|
|
16879
16879
|
model: r,
|
|
16880
|
-
fields:
|
|
16880
|
+
fields: ie,
|
|
16881
16881
|
context: {
|
|
16882
16882
|
...g,
|
|
16883
16883
|
...re
|
|
@@ -16888,19 +16888,19 @@ function Form(e, t) {
|
|
|
16888
16888
|
source: F.current,
|
|
16889
16889
|
target: ue(B),
|
|
16890
16890
|
fields: B
|
|
16891
|
-
})).length !== 0, ue = (
|
|
16891
|
+
})).length !== 0, ue = (ie) => {
|
|
16892
16892
|
const re = D.getFieldsValue(!0);
|
|
16893
|
-
return processValues(re,
|
|
16894
|
-
}, Re = (
|
|
16893
|
+
return processValues(re, ie);
|
|
16894
|
+
}, Re = (ie, re) => {
|
|
16895
16895
|
Be({
|
|
16896
16896
|
values: {
|
|
16897
16897
|
...processValues(D.getFieldsValue(!0), B),
|
|
16898
|
-
[
|
|
16898
|
+
[ie]: re
|
|
16899
16899
|
},
|
|
16900
16900
|
fields: B,
|
|
16901
16901
|
reset: !1
|
|
16902
16902
|
});
|
|
16903
|
-
}, we = (
|
|
16903
|
+
}, we = (ie) => D.getFieldsValue(!0)[ie];
|
|
16904
16904
|
async function ce() {
|
|
16905
16905
|
try {
|
|
16906
16906
|
return await D.validateFields(), !1;
|
|
@@ -16910,16 +16910,16 @@ function Form(e, t) {
|
|
|
16910
16910
|
}
|
|
16911
16911
|
const xe = async () => {
|
|
16912
16912
|
M(void 0), oe == null || oe(!0);
|
|
16913
|
-
let
|
|
16913
|
+
let ie;
|
|
16914
16914
|
try {
|
|
16915
|
-
m ?
|
|
16915
|
+
m ? ie = {
|
|
16916
16916
|
arch: m.arch,
|
|
16917
16917
|
fields: m.fields
|
|
16918
|
-
} :
|
|
16918
|
+
} : ie = await ke();
|
|
16919
16919
|
const {
|
|
16920
16920
|
fields: re,
|
|
16921
16921
|
arch: pe
|
|
16922
|
-
} =
|
|
16922
|
+
} = ie;
|
|
16923
16923
|
q(re), N(pe), await Ae({
|
|
16924
16924
|
fields: re,
|
|
16925
16925
|
arch: pe
|
|
@@ -16927,9 +16927,9 @@ function Form(e, t) {
|
|
|
16927
16927
|
} catch (re) {
|
|
16928
16928
|
M(re != null && re.message ? re.message + re.stack : re), oe == null || oe(!1);
|
|
16929
16929
|
}
|
|
16930
|
-
}, Ae = async (
|
|
16930
|
+
}, Ae = async (ie) => {
|
|
16931
16931
|
let re, pe, ye, Pe;
|
|
16932
|
-
oe == null || oe(!0), M(void 0),
|
|
16932
|
+
oe == null || oe(!0), M(void 0), ie ? (pe = ie.fields, ye = ie.arch) : (pe = B, ye = L), y ? re = y : {
|
|
16933
16933
|
values: re,
|
|
16934
16934
|
defaultGetCalled: Pe
|
|
16935
16935
|
} = await Je({
|
|
@@ -16948,21 +16948,21 @@ function Form(e, t) {
|
|
|
16948
16948
|
arch: ye,
|
|
16949
16949
|
values: re
|
|
16950
16950
|
}), oe == null || oe(!1), Z == null || Z(!1), Pe && H(!0);
|
|
16951
|
-
}, Oe = async () => new Promise(async (
|
|
16951
|
+
}, Oe = async () => new Promise(async (ie) => {
|
|
16952
16952
|
ve() ? showDialog$6({
|
|
16953
16953
|
lang: S,
|
|
16954
16954
|
onOk: () => {
|
|
16955
|
-
me == null || me(),
|
|
16955
|
+
me == null || me(), ie(!0);
|
|
16956
16956
|
},
|
|
16957
16957
|
onCancel: () => {
|
|
16958
|
-
|
|
16958
|
+
ie(!1);
|
|
16959
16959
|
}
|
|
16960
|
-
}) : (me == null || me(),
|
|
16960
|
+
}) : (me == null || me(), ie(!0));
|
|
16961
16961
|
}), ke = async () => {
|
|
16962
16962
|
if (l) {
|
|
16963
|
-
const
|
|
16963
|
+
const ie = await ConnectionProvider.getHandler().getActionStringForModel(r);
|
|
16964
16964
|
return (await ConnectionProvider.getHandler().getViewsForAction({
|
|
16965
|
-
action:
|
|
16965
|
+
action: ie,
|
|
16966
16966
|
context: g
|
|
16967
16967
|
})).views.get("form");
|
|
16968
16968
|
}
|
|
@@ -16972,14 +16972,14 @@ function Form(e, t) {
|
|
|
16972
16972
|
context: g
|
|
16973
16973
|
});
|
|
16974
16974
|
}, Be = ({
|
|
16975
|
-
values:
|
|
16975
|
+
values: ie,
|
|
16976
16976
|
fields: re,
|
|
16977
16977
|
reset: pe,
|
|
16978
16978
|
isDefaultGet: ye = !1
|
|
16979
16979
|
}) => {
|
|
16980
16980
|
const qe = {
|
|
16981
16981
|
...pe ? {} : D.getFieldsValue(!0),
|
|
16982
|
-
...
|
|
16982
|
+
...ie
|
|
16983
16983
|
}, st = processValues(qe, re), Qe = Object.keys(re).map((He) => {
|
|
16984
16984
|
const lt = st[He] !== void 0 ? st[He] : void 0;
|
|
16985
16985
|
return {
|
|
@@ -16990,7 +16990,7 @@ function Form(e, t) {
|
|
|
16990
16990
|
});
|
|
16991
16991
|
ye || (k.current = st), D.setFields(Qe);
|
|
16992
16992
|
}, Je = async ({
|
|
16993
|
-
fields:
|
|
16993
|
+
fields: ie,
|
|
16994
16994
|
arch: re
|
|
16995
16995
|
}) => {
|
|
16996
16996
|
let pe = {}, ye = !1;
|
|
@@ -16998,7 +16998,7 @@ function Form(e, t) {
|
|
|
16998
16998
|
pe = (await ConnectionProvider.getHandler().readObjects({
|
|
16999
16999
|
model: r,
|
|
17000
17000
|
ids: [he()],
|
|
17001
|
-
fields:
|
|
17001
|
+
fields: ie,
|
|
17002
17002
|
context: g
|
|
17003
17003
|
}))[0];
|
|
17004
17004
|
const Pe = await ConnectionProvider.getHandler().search({
|
|
@@ -17007,17 +17007,17 @@ function Form(e, t) {
|
|
|
17007
17007
|
context: Ce(),
|
|
17008
17008
|
model: "ir.attachment"
|
|
17009
17009
|
});
|
|
17010
|
-
|
|
17010
|
+
ae == null || ae(Pe);
|
|
17011
17011
|
} else
|
|
17012
|
-
|
|
17012
|
+
ae == null || ae([]), pe = await fe(ie), ye = !0;
|
|
17013
17013
|
return {
|
|
17014
17014
|
values: pe,
|
|
17015
17015
|
defaultGetCalled: ye
|
|
17016
17016
|
};
|
|
17017
|
-
}, rt = async (
|
|
17017
|
+
}, rt = async (ie) => {
|
|
17018
17018
|
const {
|
|
17019
17019
|
callOnSubmitSucceed: re = !0
|
|
17020
|
-
} =
|
|
17020
|
+
} = ie || {};
|
|
17021
17021
|
if (he()) {
|
|
17022
17022
|
const pe = getTouchedValues({
|
|
17023
17023
|
source: F.current,
|
|
@@ -17053,16 +17053,16 @@ function Form(e, t) {
|
|
|
17053
17053
|
V.current = ye, F.current = pe;
|
|
17054
17054
|
}
|
|
17055
17055
|
h && await h([he()]), !b && re && (se == null || se(he(), Se(), je()));
|
|
17056
|
-
}, nt = async (
|
|
17056
|
+
}, nt = async (ie) => {
|
|
17057
17057
|
const {
|
|
17058
17058
|
callOnSubmitSucceed: re = !0
|
|
17059
|
-
} =
|
|
17059
|
+
} = ie || {};
|
|
17060
17060
|
!b && re && (se == null || se(he(), Se(), je()));
|
|
17061
|
-
}, Le = async (
|
|
17061
|
+
}, Le = async (ie) => {
|
|
17062
17062
|
let re = !1;
|
|
17063
17063
|
const {
|
|
17064
17064
|
callOnSubmitSucceed: pe = !0
|
|
17065
|
-
} =
|
|
17065
|
+
} = ie || {};
|
|
17066
17066
|
if (X.current = !0, M(void 0), !ve() && he() && pe)
|
|
17067
17067
|
return X.current = !1, Z == null || Z(!1), me == null || me(), {
|
|
17068
17068
|
succeed: !0,
|
|
@@ -17075,7 +17075,7 @@ function Form(e, t) {
|
|
|
17075
17075
|
};
|
|
17076
17076
|
O(!0), ne == null || ne(!0);
|
|
17077
17077
|
try {
|
|
17078
|
-
p === "api" ? await rt(
|
|
17078
|
+
p === "api" ? await rt(ie) : await nt(ie), f && (V.current = void 0, Be({
|
|
17079
17079
|
values: {},
|
|
17080
17080
|
fields: B,
|
|
17081
17081
|
reset: !0
|
|
@@ -17090,21 +17090,21 @@ function Form(e, t) {
|
|
|
17090
17090
|
id: he()
|
|
17091
17091
|
};
|
|
17092
17092
|
}, Ve = ({
|
|
17093
|
-
fields:
|
|
17093
|
+
fields: ie,
|
|
17094
17094
|
arch: re,
|
|
17095
17095
|
values: pe
|
|
17096
17096
|
}) => {
|
|
17097
17097
|
var Pe;
|
|
17098
|
-
const ye = new Form$4(
|
|
17098
|
+
const ye = new Form$4(ie);
|
|
17099
17099
|
ye.parse(re, {
|
|
17100
17100
|
readOnly: d,
|
|
17101
17101
|
values: convertToPlain2ManyValues({
|
|
17102
17102
|
...pe,
|
|
17103
17103
|
...te()
|
|
17104
|
-
},
|
|
17104
|
+
}, ie)
|
|
17105
17105
|
}), j(ye), ye.string && ye.string !== de && (ge == null || ge(ye.string)), z && ye.string && ((Pe = z.setTitle) == null || Pe.call(z, ye.string));
|
|
17106
17106
|
}, ze = async ({
|
|
17107
|
-
elementHasLostFocus:
|
|
17107
|
+
elementHasLostFocus: ie = !1
|
|
17108
17108
|
}) => {
|
|
17109
17109
|
if (X.current)
|
|
17110
17110
|
return;
|
|
@@ -17118,24 +17118,24 @@ function Form(e, t) {
|
|
|
17118
17118
|
changedFields: pe,
|
|
17119
17119
|
formOoui: C,
|
|
17120
17120
|
types: ["text", "codeeditor", "email", "url", "char", "float", "float_time", "integer", "many2one"]
|
|
17121
|
-
}) &&
|
|
17121
|
+
}) && ie !== !0)
|
|
17122
17122
|
return;
|
|
17123
17123
|
{
|
|
17124
17124
|
const ye = processValues(D.getFieldsValue(!0), B);
|
|
17125
17125
|
k.current = ye, c == null || c(ye), Z == null || Z(!0), Ye(pe);
|
|
17126
17126
|
}
|
|
17127
17127
|
}
|
|
17128
|
-
}, Ue = debounce_1(ze, 100), Ye = async (
|
|
17128
|
+
}, Ue = debounce_1(ze, 100), Ye = async (ie) => {
|
|
17129
17129
|
try {
|
|
17130
|
-
for (let re = 0; re <
|
|
17131
|
-
const pe =
|
|
17130
|
+
for (let re = 0; re < ie.length; re += 1) {
|
|
17131
|
+
const pe = ie[re];
|
|
17132
17132
|
await ot(pe);
|
|
17133
17133
|
}
|
|
17134
17134
|
} catch (re) {
|
|
17135
17135
|
showDialog$8(re);
|
|
17136
17136
|
}
|
|
17137
|
-
}, ot = async (
|
|
17138
|
-
const re = C == null ? void 0 : C.onChangeFields[
|
|
17137
|
+
}, ot = async (ie) => {
|
|
17138
|
+
const re = C == null ? void 0 : C.onChangeFields[ie];
|
|
17139
17139
|
if (!re) {
|
|
17140
17140
|
Ve({
|
|
17141
17141
|
fields: B,
|
|
@@ -17198,12 +17198,12 @@ function Form(e, t) {
|
|
|
17198
17198
|
}
|
|
17199
17199
|
};
|
|
17200
17200
|
async function dt({
|
|
17201
|
-
action:
|
|
17201
|
+
action: ie,
|
|
17202
17202
|
context: re
|
|
17203
17203
|
}) {
|
|
17204
17204
|
const pe = await ConnectionProvider.getHandler().execute({
|
|
17205
17205
|
model: r,
|
|
17206
|
-
action:
|
|
17206
|
+
action: ie,
|
|
17207
17207
|
payload: [he()],
|
|
17208
17208
|
context: {
|
|
17209
17209
|
...re,
|
|
@@ -17221,7 +17221,7 @@ function Form(e, t) {
|
|
|
17221
17221
|
context: pe.context,
|
|
17222
17222
|
fields: B,
|
|
17223
17223
|
values: Se()
|
|
17224
|
-
})), await
|
|
17224
|
+
})), await it({
|
|
17225
17225
|
actionData: pe,
|
|
17226
17226
|
context: {
|
|
17227
17227
|
...re,
|
|
@@ -17232,37 +17232,37 @@ function Form(e, t) {
|
|
|
17232
17232
|
await Ae();
|
|
17233
17233
|
}
|
|
17234
17234
|
async function Ke({
|
|
17235
|
-
action:
|
|
17235
|
+
action: ie
|
|
17236
17236
|
}) {
|
|
17237
17237
|
const re = await ConnectionProvider.getHandler().executeWorkflow({
|
|
17238
17238
|
model: r,
|
|
17239
|
-
action:
|
|
17239
|
+
action: ie,
|
|
17240
17240
|
payload: he()
|
|
17241
17241
|
});
|
|
17242
17242
|
re.type && re.type === "ir.actions.act_window_close" ? se == null || se(he(), Se(), je()) : await Ae();
|
|
17243
17243
|
}
|
|
17244
17244
|
async function et({
|
|
17245
|
-
action:
|
|
17245
|
+
action: ie,
|
|
17246
17246
|
context: re
|
|
17247
17247
|
}) {
|
|
17248
17248
|
const pe = (await ConnectionProvider.getHandler().readObjects({
|
|
17249
17249
|
model: "ir.actions.actions",
|
|
17250
|
-
ids: [parseInt(
|
|
17250
|
+
ids: [parseInt(ie)],
|
|
17251
17251
|
context: g
|
|
17252
17252
|
}))[0];
|
|
17253
|
-
await
|
|
17253
|
+
await it({
|
|
17254
17254
|
actionData: pe,
|
|
17255
17255
|
context: re
|
|
17256
17256
|
});
|
|
17257
17257
|
}
|
|
17258
|
-
async function
|
|
17259
|
-
actionData:
|
|
17258
|
+
async function it({
|
|
17259
|
+
actionData: ie,
|
|
17260
17260
|
context: re
|
|
17261
17261
|
}) {
|
|
17262
17262
|
const {
|
|
17263
17263
|
closeParent: pe
|
|
17264
17264
|
} = await (_e == null ? void 0 : _e({
|
|
17265
|
-
actionData:
|
|
17265
|
+
actionData: ie,
|
|
17266
17266
|
fields: B,
|
|
17267
17267
|
values: Se(),
|
|
17268
17268
|
context: {
|
|
@@ -17281,12 +17281,12 @@ function Form(e, t) {
|
|
|
17281
17281
|
elementHasLostFocus: !0
|
|
17282
17282
|
});
|
|
17283
17283
|
}
|
|
17284
|
-
async function
|
|
17285
|
-
type:
|
|
17284
|
+
async function at({
|
|
17285
|
+
type: ie,
|
|
17286
17286
|
action: re,
|
|
17287
17287
|
context: pe
|
|
17288
17288
|
}) {
|
|
17289
|
-
if (
|
|
17289
|
+
if (ie === "cancel") {
|
|
17290
17290
|
me == null || me();
|
|
17291
17291
|
return;
|
|
17292
17292
|
}
|
|
@@ -17297,12 +17297,12 @@ function Form(e, t) {
|
|
|
17297
17297
|
try {
|
|
17298
17298
|
(ve() || he() === void 0) && await Le({
|
|
17299
17299
|
callOnSubmitSucceed: !1
|
|
17300
|
-
}),
|
|
17300
|
+
}), ie === "object" ? await dt({
|
|
17301
17301
|
action: re,
|
|
17302
17302
|
context: pe
|
|
17303
|
-
}) :
|
|
17303
|
+
}) : ie === "workflow" ? await Ke({
|
|
17304
17304
|
action: re
|
|
17305
|
-
}) :
|
|
17305
|
+
}) : ie === "action" && await et({
|
|
17306
17306
|
action: re,
|
|
17307
17307
|
context: pe
|
|
17308
17308
|
});
|
|
@@ -17320,7 +17320,7 @@ function Form(e, t) {
|
|
|
17320
17320
|
activeModel: r,
|
|
17321
17321
|
setFieldValue: Re,
|
|
17322
17322
|
getFieldValue: we,
|
|
17323
|
-
executeButtonAction:
|
|
17323
|
+
executeButtonAction: at,
|
|
17324
17324
|
getContext: Ce,
|
|
17325
17325
|
submitForm: Le,
|
|
17326
17326
|
fetchValues: Ae,
|
|
@@ -17366,15 +17366,15 @@ function Form(e, t) {
|
|
|
17366
17366
|
});
|
|
17367
17367
|
return x ? /* @__PURE__ */ jsx(Measure, {
|
|
17368
17368
|
bounds: !0,
|
|
17369
|
-
onResize: (
|
|
17369
|
+
onResize: (ie) => {
|
|
17370
17370
|
var re;
|
|
17371
|
-
W((re =
|
|
17371
|
+
W((re = ie.bounds) == null ? void 0 : re.width);
|
|
17372
17372
|
},
|
|
17373
17373
|
children: ({
|
|
17374
|
-
measureRef:
|
|
17374
|
+
measureRef: ie
|
|
17375
17375
|
}) => /* @__PURE__ */ jsxs("div", {
|
|
17376
17376
|
className: "pb-2",
|
|
17377
|
-
ref:
|
|
17377
|
+
ref: ie,
|
|
17378
17378
|
children: [I && /* @__PURE__ */ jsx(ErrorAlert, {
|
|
17379
17379
|
className: "mt-10 mb-20",
|
|
17380
17380
|
error: I
|
|
@@ -17711,19 +17711,7 @@ const {
|
|
|
17711
17711
|
&.ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
17712
17712
|
background-color: ${mapToken$1.colorPrimaryBg};
|
|
17713
17713
|
}
|
|
17714
|
-
|
|
17715
|
-
text: "text",
|
|
17716
|
-
many2one: "many2one",
|
|
17717
|
-
char: "char",
|
|
17718
|
-
boolean: "boolean",
|
|
17719
|
-
selection: "selection",
|
|
17720
|
-
float: "float",
|
|
17721
|
-
float_time: "float_time",
|
|
17722
|
-
progressbar: "progressbar",
|
|
17723
|
-
integer: "integer",
|
|
17724
|
-
date: "date",
|
|
17725
|
-
datetime: "datetime"
|
|
17726
|
-
};
|
|
17714
|
+
`;
|
|
17727
17715
|
function SearchField(e) {
|
|
17728
17716
|
const {
|
|
17729
17717
|
field: t
|
|
@@ -17733,7 +17721,7 @@ function SearchField(e) {
|
|
|
17733
17721
|
t: r
|
|
17734
17722
|
} = useContext(LocaleContext$1);
|
|
17735
17723
|
switch (t.type) {
|
|
17736
|
-
case
|
|
17724
|
+
case SearchFieldTypes.boolean: {
|
|
17737
17725
|
const o = new Selection$1({
|
|
17738
17726
|
name: t._id,
|
|
17739
17727
|
string: t.label,
|
|
@@ -17745,27 +17733,27 @@ function SearchField(e) {
|
|
|
17745
17733
|
showLabel: !0
|
|
17746
17734
|
});
|
|
17747
17735
|
}
|
|
17748
|
-
case
|
|
17749
|
-
case
|
|
17750
|
-
case
|
|
17751
|
-
case
|
|
17736
|
+
case SearchFieldTypes.float:
|
|
17737
|
+
case SearchFieldTypes.progressbar:
|
|
17738
|
+
case SearchFieldTypes.float_time:
|
|
17739
|
+
case SearchFieldTypes.integer:
|
|
17752
17740
|
return /* @__PURE__ */ jsx(PairFields, {
|
|
17753
17741
|
ooui: t,
|
|
17754
17742
|
showLabel: !0
|
|
17755
17743
|
});
|
|
17756
|
-
case
|
|
17744
|
+
case SearchFieldTypes.date:
|
|
17757
17745
|
return /* @__PURE__ */ jsx(DateRangePicker, {
|
|
17758
17746
|
ooui: t,
|
|
17759
17747
|
layout: "vertical",
|
|
17760
17748
|
showLabel: !0
|
|
17761
17749
|
});
|
|
17762
|
-
case
|
|
17750
|
+
case SearchFieldTypes.datetime:
|
|
17763
17751
|
return /* @__PURE__ */ jsx(DateTimeRangePicker, {
|
|
17764
17752
|
ooui: t,
|
|
17765
17753
|
layout: "vertical",
|
|
17766
17754
|
showLabel: !0
|
|
17767
17755
|
});
|
|
17768
|
-
case
|
|
17756
|
+
case SearchFieldTypes.selection:
|
|
17769
17757
|
return /* @__PURE__ */ jsx(MultiSelection, {
|
|
17770
17758
|
layout: "vertical",
|
|
17771
17759
|
ooui: t,
|
|
@@ -18771,7 +18759,7 @@ function SearchTree(e, t) {
|
|
|
18771
18759
|
submit: Z,
|
|
18772
18760
|
clear: le,
|
|
18773
18761
|
fetchResults: oe,
|
|
18774
|
-
tableRefreshing:
|
|
18762
|
+
tableRefreshing: ae,
|
|
18775
18763
|
searchFilterLoading: de,
|
|
18776
18764
|
searchError: ge,
|
|
18777
18765
|
page: $e,
|
|
@@ -18916,7 +18904,7 @@ function SearchTree(e, t) {
|
|
|
18916
18904
|
treeView: $,
|
|
18917
18905
|
results: ee(),
|
|
18918
18906
|
onRequestPageChange: se,
|
|
18919
|
-
loading:
|
|
18907
|
+
loading: ae,
|
|
18920
18908
|
onRowClicked: te,
|
|
18921
18909
|
scrollY: l || ve(),
|
|
18922
18910
|
colorsForResults: he,
|
|
@@ -19895,7 +19883,7 @@ function useAlign(e, t, r, n, o, a, s) {
|
|
|
19895
19883
|
var ne = toNum(Math.round(W / parseFloat(M) * 1e3) / 1e3), Z = toNum(Math.round(Y / parseFloat(C) * 1e3) / 1e3);
|
|
19896
19884
|
if (ne === 0 || Z === 0 || isDOM(r) && !isVisible(r))
|
|
19897
19885
|
return;
|
|
19898
|
-
var le = P.offset, oe = P.targetOffset,
|
|
19886
|
+
var le = P.offset, oe = P.targetOffset, ae = getNumberOffset(O, le), de = _slicedToArray(ae, 2), ge = de[0], $e = de[1], _e = getNumberOffset(S, oe), ee = _slicedToArray(_e, 2), se = ee[0], me = ee[1];
|
|
19899
19887
|
S.x -= se, S.y -= me;
|
|
19900
19888
|
var Ee = P.points || [], he = _slicedToArray(Ee, 2), Me = he[0], Se = he[1], Ie = splitPoints(Se), je = splitPoints(Me), Ce = getAlignPoint(S, Ie), te = getAlignPoint(O, je), fe = _objectSpread2$2({}, P), ve = Ce.x - te.x + ge, ue = Ce.y - te.y + $e, Re = We(ve, ue), we = We(ve, ue, T), ce = getAlignPoint(S, ["t", "l"]), xe = getAlignPoint(O, ["t", "l"]), Ae = getAlignPoint(S, ["b", "r"]), Oe = getAlignPoint(O, ["b", "r"]), ke = P.overflow || {}, Be = ke.adjustX, Je = ke.adjustY, rt = ke.shiftX, nt = ke.shiftY, Le = function(Ge) {
|
|
19901
19889
|
return typeof Ge == "boolean" ? Ge : Ge >= 0;
|
|
@@ -19905,25 +19893,25 @@ function useAlign(e, t, r, n, o, a, s) {
|
|
|
19905
19893
|
if (ot && je[0] === "t" && (ze > J.bottom || y.current.bt)) {
|
|
19906
19894
|
var Ke = ue;
|
|
19907
19895
|
dt ? Ke -= Y - K : Ke = ce.y - Oe.y - $e;
|
|
19908
|
-
var et = We(ve, Ke),
|
|
19909
|
-
et > Re || et === Re && (!Q ||
|
|
19896
|
+
var et = We(ve, Ke), it = We(ve, Ke, T);
|
|
19897
|
+
et > Re || et === Re && (!Q || it >= we) ? (y.current.bt = !0, ue = Ke, fe.points = [reversePoints(je, 0), reversePoints(Ie, 0)]) : y.current.bt = !1;
|
|
19910
19898
|
}
|
|
19911
19899
|
if (ot && je[0] === "b" && (Ve < J.top || y.current.tb)) {
|
|
19912
19900
|
var Xe = ue;
|
|
19913
19901
|
dt ? Xe += Y - K : Xe = Ae.y - xe.y - $e;
|
|
19914
|
-
var
|
|
19915
|
-
|
|
19902
|
+
var at = We(ve, Xe), ft = We(ve, Xe, T);
|
|
19903
|
+
at > Re || at === Re && (!Q || ft >= we) ? (y.current.tb = !0, ue = Xe, fe.points = [reversePoints(je, 0), reversePoints(Ie, 0)]) : y.current.tb = !1;
|
|
19916
19904
|
}
|
|
19917
|
-
var pt = Le(Be),
|
|
19905
|
+
var pt = Le(Be), ie = je[1] === Ie[1];
|
|
19918
19906
|
if (pt && je[1] === "l" && (Ye > J.right || y.current.rl)) {
|
|
19919
19907
|
var re = ve;
|
|
19920
|
-
|
|
19908
|
+
ie ? re -= W - H : re = ce.x - Oe.x - ge;
|
|
19921
19909
|
var pe = We(re, ue), ye = We(re, ue, T);
|
|
19922
19910
|
pe > Re || pe === Re && (!Q || ye >= we) ? (y.current.rl = !0, ve = re, fe.points = [reversePoints(je, 1), reversePoints(Ie, 1)]) : y.current.rl = !1;
|
|
19923
19911
|
}
|
|
19924
19912
|
if (pt && je[1] === "r" && (Ue < J.left || y.current.lr)) {
|
|
19925
19913
|
var Pe = ve;
|
|
19926
|
-
|
|
19914
|
+
ie ? Pe += W - H : Pe = Ae.x - xe.x - ge;
|
|
19927
19915
|
var qe = We(Pe, ue), st = We(Pe, ue, T);
|
|
19928
19916
|
qe > Re || qe === Re && (!Q || st >= we) ? (y.current.lr = !0, ve = Pe, fe.points = [reversePoints(je, 1), reversePoints(Ie, 1)]) : y.current.lr = !1;
|
|
19929
19917
|
}
|
|
@@ -20147,10 +20135,10 @@ function generateTrigger() {
|
|
|
20147
20135
|
useLayoutEffect$2(function() {
|
|
20148
20136
|
oe(isMobile());
|
|
20149
20137
|
}, []);
|
|
20150
|
-
var
|
|
20138
|
+
var ae = React$s.useRef({}), de = React$s.useContext(TriggerContext), ge = React$s.useMemo(function() {
|
|
20151
20139
|
return {
|
|
20152
20140
|
registerSubPopup: function(Te, Fe) {
|
|
20153
|
-
|
|
20141
|
+
ae.current[Te] = Fe, de == null || de.registerSubPopup(Te, Fe);
|
|
20154
20142
|
}
|
|
20155
20143
|
};
|
|
20156
20144
|
}, [de]), $e = useId(), _e = React$s.useState(null), ee = _slicedToArray(_e, 2), se = ee[0], me = ee[1], Ee = useEvent$2(function(be) {
|
|
@@ -20159,7 +20147,7 @@ function generateTrigger() {
|
|
|
20159
20147
|
isDOM(be) && Se !== be && Ie(be);
|
|
20160
20148
|
}), Ce = React$s.Children.only(s), te = (Ce == null ? void 0 : Ce.props) || {}, fe = {}, ve = useEvent$2(function(be) {
|
|
20161
20149
|
var Te, Fe, Ne = Se;
|
|
20162
|
-
return (Ne == null ? void 0 : Ne.contains(be)) || ((Te = getShadowRoot(Ne)) === null || Te === void 0 ? void 0 : Te.host) === be || be === Ne || (se == null ? void 0 : se.contains(be)) || ((Fe = getShadowRoot(se)) === null || Fe === void 0 ? void 0 : Fe.host) === be || be === se || Object.values(
|
|
20150
|
+
return (Ne == null ? void 0 : Ne.contains(be)) || ((Te = getShadowRoot(Ne)) === null || Te === void 0 ? void 0 : Te.host) === be || be === Ne || (se == null ? void 0 : se.contains(be)) || ((Fe = getShadowRoot(se)) === null || Fe === void 0 ? void 0 : Fe.host) === be || be === se || Object.values(ae.current).some(function(De) {
|
|
20163
20151
|
return (De == null ? void 0 : De.contains(be)) || be === De;
|
|
20164
20152
|
});
|
|
20165
20153
|
}), ue = getMotion(a, V, G, k), Re = getMotion(a, F, Q, X), we = React$s.useState(p || !1), ce = _slicedToArray(we, 2), xe = ce[0], Ae = ce[1], Oe = f != null ? f : xe, ke = useEvent$2(function(be) {
|
|
@@ -20187,7 +20175,7 @@ function generateTrigger() {
|
|
|
20187
20175
|
useLayoutEffect$2(function() {
|
|
20188
20176
|
(!ot.current || Oe) && Ye(!0), ot.current = !0;
|
|
20189
20177
|
}, [Oe]);
|
|
20190
|
-
var dt = React$s.useState(null), Ke = _slicedToArray(dt, 2), et = Ke[0],
|
|
20178
|
+
var dt = React$s.useState(null), Ke = _slicedToArray(dt, 2), et = Ke[0], it = Ke[1], Xe = React$s.useState([0, 0]), at = _slicedToArray(Xe, 2), ft = at[0], pt = at[1], ie = function(Te) {
|
|
20191
20179
|
pt([Te.clientX, Te.clientY]);
|
|
20192
20180
|
}, re = useAlign(Oe, se, Y ? ft : Se, j, L, N, K), pe = _slicedToArray(re, 9), ye = pe[0], Pe = pe[1], qe = pe[2], st = pe[3], Qe = pe[4], He = pe[5], lt = pe[6], mt = pe[7], ct = pe[8], tt = useEvent$2(function() {
|
|
20193
20181
|
Ue || ct();
|
|
@@ -20210,13 +20198,13 @@ function generateTrigger() {
|
|
|
20210
20198
|
Ye(!1), ct(), m == null || m(Te);
|
|
20211
20199
|
}, _t = function() {
|
|
20212
20200
|
return new Promise(function(Te) {
|
|
20213
|
-
|
|
20201
|
+
it(function() {
|
|
20214
20202
|
return Te;
|
|
20215
20203
|
});
|
|
20216
20204
|
});
|
|
20217
20205
|
};
|
|
20218
20206
|
useLayoutEffect$2(function() {
|
|
20219
|
-
et && (ct(), et(),
|
|
20207
|
+
et && (ct(), et(), it(null));
|
|
20220
20208
|
}, [et]);
|
|
20221
20209
|
var Ot = React$s.useState(0), bt = _slicedToArray(Ot, 2), Pt = bt[0], At = bt[1], jt = React$s.useState(0), $t = _slicedToArray(jt, 2), Mt = $t[0], It = $t[1], Ft = function(Te, Fe) {
|
|
20222
20210
|
if (tt(), q) {
|
|
@@ -20234,14 +20222,14 @@ function generateTrigger() {
|
|
|
20234
20222
|
}, vt = ut.has("click"), gt = Ge.has("click") || Ge.has("contextMenu");
|
|
20235
20223
|
(vt || gt) && (fe.onClick = function(be) {
|
|
20236
20224
|
var Te;
|
|
20237
|
-
Be.current && gt ? Le(!1) : !Be.current && vt && (
|
|
20225
|
+
Be.current && gt ? Le(!1) : !Be.current && vt && (ie(be), Le(!0));
|
|
20238
20226
|
for (var Fe = arguments.length, Ne = new Array(Fe > 1 ? Fe - 1 : 0), De = 1; De < Fe; De++)
|
|
20239
20227
|
Ne[De - 1] = arguments[De];
|
|
20240
20228
|
(Te = te.onClick) === null || Te === void 0 || Te.call.apply(Te, [te, be].concat(Ne));
|
|
20241
20229
|
}), useWinClick(Oe, gt, Se, se, $, w, ve, Le);
|
|
20242
20230
|
var Dt = ut.has("hover"), Nt = Ge.has("hover"), St, Ct;
|
|
20243
20231
|
Dt && (Ze("onMouseEnter", !0, h, function(be) {
|
|
20244
|
-
|
|
20232
|
+
ie(be);
|
|
20245
20233
|
}), St = function() {
|
|
20246
20234
|
Le(!0, h);
|
|
20247
20235
|
}, Y && (fe.onMouseMove = function(be) {
|
|
@@ -20251,7 +20239,7 @@ function generateTrigger() {
|
|
|
20251
20239
|
Le(!1, g);
|
|
20252
20240
|
}), ut.has("focus") && Ze("onFocus", !0, v), Ge.has("focus") && Ze("onBlur", !1, x), ut.has("contextMenu") && (fe.onContextMenu = function(be) {
|
|
20253
20241
|
var Te;
|
|
20254
|
-
|
|
20242
|
+
ie(be), Le(!0), be.preventDefault();
|
|
20255
20243
|
for (var Fe = arguments.length, Ne = new Array(Fe > 1 ? Fe - 1 : 0), De = 1; De < Fe; De++)
|
|
20256
20244
|
Ne[De - 1] = arguments[De];
|
|
20257
20245
|
(Te = te.onContextMenu) === null || Te === void 0 || Te.call.apply(Te, [te, be].concat(Ne));
|
|
@@ -22005,19 +21993,19 @@ const Tooltip = /* @__PURE__ */ React$a.forwardRef((e, t) => {
|
|
|
22005
21993
|
process.env.NODE_ENV !== "production" && (0, _warning$2.default)(!1, "Tooltip", "`forcePopupAlign` is align to `forceAlign` instead."), O();
|
|
22006
21994
|
}
|
|
22007
21995
|
})), process.env.NODE_ENV !== "production" && ([["visible", "open"], ["defaultVisible", "defaultOpen"], ["onVisibleChange", "onOpenChange"], ["afterVisibleChange", "afterOpenChange"], ["arrowPointAtCenter", "arrow"]].forEach((oe) => {
|
|
22008
|
-
let [
|
|
22009
|
-
process.env.NODE_ENV !== "production" && (0, _warning$2.default)(!(
|
|
21996
|
+
let [ae, de] = oe;
|
|
21997
|
+
process.env.NODE_ENV !== "production" && (0, _warning$2.default)(!(ae in e), "Tooltip", `\`${ae}\` is deprecated, please use \`${de}\` instead.`);
|
|
22010
21998
|
}), process.env.NODE_ENV !== "production" && (0, _warning$2.default)(!y || typeof y == "boolean", "Tooltip", "`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."), process.env.NODE_ENV !== "production" && (0, _warning$2.default)(!m || typeof m == "boolean" || !("arrowPointAtCenter" in m), "Tooltip", "`arrowPointAtCenter` in `arrow` is deprecated, please use `pointAtCenter` instead."));
|
|
22011
21999
|
const [I, M] = (0, _useMergedState$1.default)(!1, {
|
|
22012
22000
|
value: (r = e.open) !== null && r !== void 0 ? r : e.visible,
|
|
22013
22001
|
defaultValue: (n = e.defaultOpen) !== null && n !== void 0 ? n : e.defaultVisible
|
|
22014
22002
|
}), C = !h && !b && h !== 0, j = (oe) => {
|
|
22015
|
-
var
|
|
22016
|
-
M(C ? !1 : oe), C || ((
|
|
22003
|
+
var ae, de;
|
|
22004
|
+
M(C ? !1 : oe), C || ((ae = e.onOpenChange) === null || ae === void 0 || ae.call(e, oe), (de = e.onVisibleChange) === null || de === void 0 || de.call(e, oe));
|
|
22017
22005
|
}, D = React$a.useMemo(() => {
|
|
22018
|
-
var oe,
|
|
22006
|
+
var oe, ae;
|
|
22019
22007
|
let de = v;
|
|
22020
|
-
return typeof m == "object" && (de = (
|
|
22008
|
+
return typeof m == "object" && (de = (ae = (oe = m.pointAtCenter) !== null && oe !== void 0 ? oe : m.arrowPointAtCenter) !== null && ae !== void 0 ? ae : v), g || (0, _placements.default)({
|
|
22021
22009
|
arrowPointAtCenter: de,
|
|
22022
22010
|
autoAdjustOverflow: x,
|
|
22023
22011
|
arrowWidth: $ ? _.sizePopupArrow : 0,
|
|
@@ -23057,13 +23045,13 @@ const ELLIPSIS_STR = "...", Base = /* @__PURE__ */ React$1.forwardRef((e, t) =>
|
|
|
23057
23045
|
React$1.useEffect(() => K, []);
|
|
23058
23046
|
const [V, F] = React$1.useState(!1), [k, G] = React$1.useState(!1), [X, Q] = React$1.useState(!1), [A, T] = React$1.useState(!1), [U, J] = React$1.useState(!1), [ne, Z] = React$1.useState(!0), [le, oe] = (0, _useMergedConfig.default)(f, {
|
|
23059
23047
|
expandable: !1
|
|
23060
|
-
}),
|
|
23048
|
+
}), ae = le && !X, {
|
|
23061
23049
|
rows: de = 1
|
|
23062
|
-
} = oe, ge = React$1.useMemo(() => !
|
|
23050
|
+
} = oe, ge = React$1.useMemo(() => !ae || oe.suffix !== void 0 || oe.onEllipsis || oe.expandable || S || N, [ae, oe, S, N]);
|
|
23063
23051
|
(0, _useLayoutEffect.default)(() => {
|
|
23064
23052
|
le && !ge && (F((0, _styleChecker.isStyleSupport)("webkitLineClamp")), G((0, _styleChecker.isStyleSupport)("textOverflow")));
|
|
23065
23053
|
}, [ge, le]);
|
|
23066
|
-
const $e = React$1.useMemo(() => ge ? !1 : de === 1 ? k : V, [ge, k, V]), _e =
|
|
23054
|
+
const $e = React$1.useMemo(() => ge ? !1 : de === 1 ? k : V, [ge, k, V]), _e = ae && ($e ? U : A), ee = ae && de === 1 && $e, se = ae && de > 1 && $e, me = (ce) => {
|
|
23067
23055
|
var xe;
|
|
23068
23056
|
Q(!0), (xe = oe.onExpand) === null || xe === void 0 || xe.call(oe, ce);
|
|
23069
23057
|
}, [Ee, he] = React$1.useState(0), [Me, Se] = React$1.useState(0), Ie = (ce, xe) => {
|
|
@@ -23084,7 +23072,7 @@ const ELLIPSIS_STR = "...", Base = /* @__PURE__ */ React$1.forwardRef((e, t) =>
|
|
|
23084
23072
|
}
|
|
23085
23073
|
}, [le, $e, d, se, ne]), React$1.useEffect(() => {
|
|
23086
23074
|
const ce = $.current;
|
|
23087
|
-
if (typeof IntersectionObserver > "u" || !ce || !$e || !
|
|
23075
|
+
if (typeof IntersectionObserver > "u" || !ce || !$e || !ae)
|
|
23088
23076
|
return;
|
|
23089
23077
|
const xe = new IntersectionObserver(() => {
|
|
23090
23078
|
Z(!!ce.offsetParent);
|
|
@@ -23092,7 +23080,7 @@ const ELLIPSIS_STR = "...", Base = /* @__PURE__ */ React$1.forwardRef((e, t) =>
|
|
|
23092
23080
|
return xe.observe(ce), () => {
|
|
23093
23081
|
xe.disconnect();
|
|
23094
23082
|
};
|
|
23095
|
-
}, [$e,
|
|
23083
|
+
}, [$e, ae]);
|
|
23096
23084
|
let Ce = {};
|
|
23097
23085
|
oe.tooltip === !0 ? Ce = {
|
|
23098
23086
|
title: (r = E.text) !== null && r !== void 0 ? r : d
|
|
@@ -23184,17 +23172,17 @@ const ELLIPSIS_STR = "...", Base = /* @__PURE__ */ React$1.forwardRef((e, t) =>
|
|
|
23184
23172
|
}, ELLIPSIS_STR), oe.suffix, Re(ce)];
|
|
23185
23173
|
return /* @__PURE__ */ React$1.createElement(_rcResizeObserver.default, {
|
|
23186
23174
|
onResize: Ie,
|
|
23187
|
-
disabled: !
|
|
23175
|
+
disabled: !ae || $e
|
|
23188
23176
|
}, (ce) => /* @__PURE__ */ React$1.createElement(_EllipsisTooltip.default, {
|
|
23189
23177
|
tooltipProps: Ce,
|
|
23190
|
-
enabledEllipsis:
|
|
23178
|
+
enabledEllipsis: ae,
|
|
23191
23179
|
isEllipsis: _e
|
|
23192
23180
|
}, /* @__PURE__ */ React$1.createElement(_Typography.default, Object.assign({
|
|
23193
23181
|
className: (0, _classnames.default)({
|
|
23194
23182
|
[`${w}-${c}`]: c,
|
|
23195
23183
|
[`${w}-disabled`]: u,
|
|
23196
23184
|
[`${w}-ellipsis`]: le,
|
|
23197
|
-
[`${w}-single-line`]:
|
|
23185
|
+
[`${w}-single-line`]: ae && de === 1,
|
|
23198
23186
|
[`${w}-ellipsis-single-line`]: ee,
|
|
23199
23187
|
[`${w}-ellipsis-multiple-line`]: se
|
|
23200
23188
|
}, s),
|
|
@@ -23209,7 +23197,7 @@ const ELLIPSIS_STR = "...", Base = /* @__PURE__ */ React$1.forwardRef((e, t) =>
|
|
|
23209
23197
|
"aria-label": te == null ? void 0 : te.toString(),
|
|
23210
23198
|
title: h
|
|
23211
23199
|
}, P), /* @__PURE__ */ React$1.createElement(_Ellipsis.default, {
|
|
23212
|
-
enabledMeasure:
|
|
23200
|
+
enabledMeasure: ae && !$e,
|
|
23213
23201
|
text: d,
|
|
23214
23202
|
rows: de,
|
|
23215
23203
|
width: Ee,
|
|
@@ -24195,7 +24183,7 @@ const One2manyInput = (e) => {
|
|
|
24195
24183
|
c > 0 && (s === "form" ? ge(() => {
|
|
24196
24184
|
u(c - 1);
|
|
24197
24185
|
}) : u(c - 1));
|
|
24198
|
-
},
|
|
24186
|
+
}, ae = () => {
|
|
24199
24187
|
const te = Q.length;
|
|
24200
24188
|
c < te - 1 && (s === "form" ? ge(() => {
|
|
24201
24189
|
u(c + 1);
|
|
@@ -24472,7 +24460,7 @@ const One2manyInput = (e) => {
|
|
|
24472
24460
|
onCreateItem: _e,
|
|
24473
24461
|
onToggleViewMode: le,
|
|
24474
24462
|
onPreviousItem: oe,
|
|
24475
|
-
onNextItem:
|
|
24463
|
+
onNextItem: ae,
|
|
24476
24464
|
onSearchItem: ee,
|
|
24477
24465
|
selectedRowKeys: j,
|
|
24478
24466
|
showCreateButton: ((Ce = o.get("form")) == null ? void 0 : Ce.fields) !== void 0,
|
|
@@ -27291,7 +27279,7 @@ function ActionView(e, t) {
|
|
|
27291
27279
|
v(ee), Q == null || Q(ee);
|
|
27292
27280
|
}
|
|
27293
27281
|
useImperativeHandle(t, () => ({
|
|
27294
|
-
canWeClose:
|
|
27282
|
+
canWeClose: ae
|
|
27295
27283
|
}));
|
|
27296
27284
|
const oe = async () => {
|
|
27297
27285
|
w(!0);
|
|
@@ -27364,14 +27352,14 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
27364
27352
|
};
|
|
27365
27353
|
l({
|
|
27366
27354
|
tabKey: c,
|
|
27367
|
-
canWeClose:
|
|
27355
|
+
canWeClose: ae
|
|
27368
27356
|
}), useEffect(() => {
|
|
27369
27357
|
const ee = x.find((me) => me.type === "tree"), se = x.find((me) => u.id ? me.type === u.type && me.view_id === u.id : me.type === u.type);
|
|
27370
27358
|
le(se || ee), p ? A == null || A(P) : (Z(void 0), C(void 0)), oe();
|
|
27371
27359
|
}, [n, a, p]), useEffect(() => {
|
|
27372
27360
|
U === c && (A == null || A(S), Q == null || Q(g));
|
|
27373
27361
|
}, [T, U]);
|
|
27374
|
-
async function
|
|
27362
|
+
async function ae() {
|
|
27375
27363
|
return g && g.type === "form" ? await k.current.cancelUnsavedChanges() : !0;
|
|
27376
27364
|
}
|
|
27377
27365
|
async function de() {
|