@archbase/advanced 3.0.8 → 3.0.9
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/archbase-advanced-3.0.9.tgz +0 -0
- package/dist/index.js +403 -407
- package/package.json +5 -6
- package/dist/archbase-advanced-3.0.8.tgz +0 -0
package/dist/index.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { jsx as n, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import y, { Component as v, useState as $, Fragment as Ie, useRef as
|
|
3
|
-
import { ArchbaseError as te, getI18nextInstance as m, ltrim as ie, detectDataSourceVersion as
|
|
4
|
-
import { Modal as
|
|
5
|
-
import { DatePickerInput as
|
|
6
|
-
import { IconSearch as le, IconFilterSearch as
|
|
7
|
-
import { uniqueId as
|
|
8
|
-
import
|
|
2
|
+
import y, { Component as v, useState as $, Fragment as Ie, useRef as Ae, useEffect as ge } from "react";
|
|
3
|
+
import { ArchbaseError as te, getI18nextInstance as m, ltrim as ie, detectDataSourceVersion as U, useArchbaseTheme as Pe, processErrorMessage as he, processDetailErrorMessage as ce, useArchbaseTranslation as Xe, builder as C, emit as Ze } from "@archbase/core";
|
|
4
|
+
import { Modal as et, Group as M, Button as w, Checkbox as z, Switch as Le, MultiSelect as tt, Accordion as k, Space as E, Text as x, Grid as R, Card as re, Tooltip as f, ActionIcon as F, ScrollArea as Fe, Menu as q, Radio as pe, Badge as it, Paper as ke, Box as Ve, useMantineColorScheme as Be, TextInput as qe, Popover as _, Input as rt, Flex as st } from "@mantine/core";
|
|
5
|
+
import { DatePickerInput as W, TimeInput as $e } from "@mantine/dates";
|
|
6
|
+
import { IconSearch as le, IconFilterSearch as Me, IconArrowDown as ve, IconArrowUp as Se, IconPlus as nt, IconTrash as We, IconDeviceFloppy as ue, IconRefresh as ye, IconDoorExit as at, IconCalendarEvent as lt, IconCalendarMonth as ot, IconCalendarWeek as dt, IconCalendar as ze, IconFilterOff as ht, IconSubtask as ct, IconFilter as pt, IconDownload as ut, IconPrinter as mt, IconSortAscendingLetters as ft, IconSortDescendingLetters as gt, IconFilterX as Ft } from "@tabler/icons-react";
|
|
7
|
+
import { uniqueId as j, cloneDeep as me } from "lodash";
|
|
8
|
+
import bt from "lodash/debounce";
|
|
9
9
|
import oe from "react-addons-shallow-compare";
|
|
10
|
-
import { ArchbaseEdit as
|
|
11
|
-
import { useDebouncedValue as
|
|
12
|
-
import { endOfMonth as
|
|
13
|
-
import
|
|
14
|
-
import { v4 as
|
|
15
|
-
import { ArchbaseForm as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
const S = -2, Z = -1, ee = "normal", T = "quick", se = "advanced", Fi = "null", bi = "notNull", Ci = "contains", vi = "startsWith", Si = "endsWith", yi = "=", wi = "!=", xi = ">", Ii = "<", ki = ">=", Ti = "<=", Oi = "between", Ri = "inList", Ei = "notInList";
|
|
10
|
+
import { ArchbaseEdit as Ct, ArchbaseDialog as A, ArchbaseDateTimePickerRange as Ge, ArchbaseDateTimePickerEdit as Qe, ArchbaseSelect as be, ArchbaseSelectItem as Ce, ArchbaseList as de, ArchbaseSwitch as vt } from "@archbase/components";
|
|
11
|
+
import { useDebouncedValue as Ue } from "@mantine/hooks";
|
|
12
|
+
import { endOfMonth as St, formatISO as Te } from "date-fns";
|
|
13
|
+
import yt from "react-date-object";
|
|
14
|
+
import { v4 as wt } from "uuid";
|
|
15
|
+
import { ArchbaseForm as je } from "@archbase/layout";
|
|
16
|
+
import { ArchbaseDataSource as Y } from "@archbase/data";
|
|
17
|
+
import { Calendar as xt } from "react-multi-date-picker";
|
|
18
|
+
const S = -2, Z = -1, ee = "normal", O = "quick", se = "advanced", oi = "null", di = "notNull", hi = "contains", ci = "startsWith", pi = "endsWith", ui = "=", mi = "!=", fi = ">", gi = "<", Fi = ">=", bi = "<=", Ci = "between", vi = "inList", Si = "notInList";
|
|
20
19
|
class ne {
|
|
21
20
|
_id;
|
|
22
21
|
_companyId;
|
|
@@ -99,7 +98,7 @@ class ne {
|
|
|
99
98
|
return e.id !== void 0 && t.setId(e.id), e.companyId !== void 0 && t.setCompanyId(e.companyId), e.filter && t.setFilter(e.filter), typeof e.name == "string" && t.setName(e.name), typeof e.viewName == "string" && t.setViewName(e.viewName), typeof e.componentName == "string" && t.setComponentName(e.componentName), typeof e.userName == "string" && t.setUserName(e.userName), typeof e.shared == "boolean" && t.setShared(e.shared), typeof e.code == "string" && t.setCode(e.code), typeof e.isNewFilter == "boolean" && t.setIsNewFilter(e.isNewFilter), t;
|
|
100
99
|
}
|
|
101
100
|
}
|
|
102
|
-
function
|
|
101
|
+
function It({
|
|
103
102
|
sortable: d = !0,
|
|
104
103
|
quickFilter: e = !0,
|
|
105
104
|
quickFilterSort: t = !1,
|
|
@@ -107,7 +106,7 @@ function Nt({
|
|
|
107
106
|
}) {
|
|
108
107
|
return null;
|
|
109
108
|
}
|
|
110
|
-
class
|
|
109
|
+
class kt extends v {
|
|
111
110
|
static get componentName() {
|
|
112
111
|
return "FilterFieldValue";
|
|
113
112
|
}
|
|
@@ -115,30 +114,30 @@ class At extends v {
|
|
|
115
114
|
return null;
|
|
116
115
|
}
|
|
117
116
|
}
|
|
118
|
-
function
|
|
117
|
+
function Tt({ children: d }) {
|
|
119
118
|
return /* @__PURE__ */ n("div", { children: d });
|
|
120
119
|
}
|
|
121
|
-
const
|
|
120
|
+
const Ye = (d) => {
|
|
122
121
|
let e = "", t = !1;
|
|
123
122
|
return d.sort.sortFields.forEach(
|
|
124
123
|
(i) => {
|
|
125
124
|
i.selected && (t && (e += ", "), e += i.label + "(" + (i.asc_desc === "asc" ? "A" : "D") + ")", t = !0);
|
|
126
125
|
}
|
|
127
126
|
), e;
|
|
128
|
-
},
|
|
127
|
+
}, He = (d) => {
|
|
129
128
|
let e = [];
|
|
130
129
|
return y.Children.toArray(d).forEach(function(i) {
|
|
131
130
|
i && i.type && i.type.componentName === "QueryFields" && i.props.children && y.Children.toArray(i.props.children).forEach(function(s, a) {
|
|
132
131
|
let l = [];
|
|
133
132
|
y.Children.toArray(s.props.children).forEach(function(o) {
|
|
134
|
-
l.push(/* @__PURE__ */ n(
|
|
133
|
+
l.push(/* @__PURE__ */ n(kt, { ...o.props }, "fld" + a));
|
|
135
134
|
}), e.push(
|
|
136
|
-
/* @__PURE__ */ n(
|
|
135
|
+
/* @__PURE__ */ n(It, { ...s.props, children: l }, "fld" + a)
|
|
137
136
|
);
|
|
138
137
|
});
|
|
139
|
-
}), /* @__PURE__ */ n(
|
|
138
|
+
}), /* @__PURE__ */ n(Tt, { children: e });
|
|
140
139
|
}, I = (d) => {
|
|
141
|
-
let e = [], t =
|
|
140
|
+
let e = [], t = He(d.children);
|
|
142
141
|
return t && y.Children.toArray(t).forEach((r) => {
|
|
143
142
|
r.type && r.type.componentName === "FilterFields" && r.props.children && y.Children.toArray(r.props.children).forEach((a) => {
|
|
144
143
|
if (a.type && a.type.componentName !== "FilterField")
|
|
@@ -166,11 +165,11 @@ const Xe = (d) => {
|
|
|
166
165
|
});
|
|
167
166
|
});
|
|
168
167
|
}), e;
|
|
169
|
-
},
|
|
168
|
+
}, yi = (d, e) => {
|
|
170
169
|
for (var t = 0; t < e.length; t++)
|
|
171
170
|
if (e[t].name === d)
|
|
172
171
|
return e[t].nameSql;
|
|
173
|
-
},
|
|
172
|
+
}, wi = (d, e) => {
|
|
174
173
|
for (var t = 0; t < e.length; t++)
|
|
175
174
|
if (e[t].name === d)
|
|
176
175
|
return e[t].listValues;
|
|
@@ -190,7 +189,7 @@ const Xe = (d) => {
|
|
|
190
189
|
searchField: void 0
|
|
191
190
|
});
|
|
192
191
|
}), e;
|
|
193
|
-
},
|
|
192
|
+
}, Ot = (d) => {
|
|
194
193
|
let e = [];
|
|
195
194
|
return d && d.forEach((t, i) => {
|
|
196
195
|
t.quickFilterSort === !0 && e.push({
|
|
@@ -201,17 +200,17 @@ const Xe = (d) => {
|
|
|
201
200
|
asc_desc: "asc"
|
|
202
201
|
});
|
|
203
202
|
}), e;
|
|
204
|
-
},
|
|
203
|
+
}, Rt = (d) => {
|
|
205
204
|
let e = "", t = !1;
|
|
206
205
|
return d.forEach(function(i) {
|
|
207
206
|
i.quickFilterSort === !0 && (t && (e += ","), e += i.name, t = !0);
|
|
208
207
|
}), e;
|
|
209
|
-
},
|
|
208
|
+
}, xi = (d) => {
|
|
210
209
|
let e = "", t = !1;
|
|
211
210
|
return d.forEach((i) => {
|
|
212
211
|
i.selected && t && (e += ","), e += i.name, t = !0;
|
|
213
212
|
}), e;
|
|
214
|
-
},
|
|
213
|
+
}, Et = (d, e) => {
|
|
215
214
|
let t = [];
|
|
216
215
|
return e && (e.forEach(function(i, r) {
|
|
217
216
|
let s = !1, a = "asc", l = r;
|
|
@@ -227,14 +226,14 @@ const Xe = (d) => {
|
|
|
227
226
|
}), t = t.sort(function(i, r) {
|
|
228
227
|
return i.order - r.order;
|
|
229
228
|
})), t;
|
|
230
|
-
},
|
|
229
|
+
}, P = (d, e) => {
|
|
231
230
|
let t = "", i = !1;
|
|
232
231
|
return d && d.filter && (!d.filter.selectedFields || d.filter.selectedFields.length === 0 ? e.forEach((r) => {
|
|
233
232
|
r.quickFilter === !0 && (i && (t = t + ","), t += r.name), i = !0;
|
|
234
233
|
}) : d.filter.selectedFields.forEach((r) => {
|
|
235
234
|
i && (t += ","), t += r.name, i = !0;
|
|
236
235
|
})), t;
|
|
237
|
-
},
|
|
236
|
+
}, H = () => ({
|
|
238
237
|
id: 0,
|
|
239
238
|
name: "",
|
|
240
239
|
viewName: "",
|
|
@@ -253,7 +252,7 @@ const Xe = (d) => {
|
|
|
253
252
|
sortFields: [],
|
|
254
253
|
activeIndex: -1
|
|
255
254
|
}
|
|
256
|
-
}),
|
|
255
|
+
}), _t = [
|
|
257
256
|
{
|
|
258
257
|
name: "null",
|
|
259
258
|
label: "Em branco",
|
|
@@ -324,7 +323,7 @@ const Xe = (d) => {
|
|
|
324
323
|
label: "Fora da lista",
|
|
325
324
|
dataTypes: ["string", "number", "date", "time"]
|
|
326
325
|
}
|
|
327
|
-
],
|
|
326
|
+
], Ii = [
|
|
328
327
|
{
|
|
329
328
|
name: "and",
|
|
330
329
|
label: "E"
|
|
@@ -333,7 +332,7 @@ const Xe = (d) => {
|
|
|
333
332
|
name: "or",
|
|
334
333
|
label: "Ou"
|
|
335
334
|
}
|
|
336
|
-
],
|
|
335
|
+
], N = (d, e) => {
|
|
337
336
|
let t = I(d), i = {
|
|
338
337
|
id: -1,
|
|
339
338
|
name: "",
|
|
@@ -354,12 +353,12 @@ const Xe = (d) => {
|
|
|
354
353
|
activeIndex: -1
|
|
355
354
|
}
|
|
356
355
|
};
|
|
357
|
-
return i.filter.selectedFields = ae(t), i.filter.quickFilterFieldsText =
|
|
356
|
+
return i.filter.selectedFields = ae(t), i.filter.quickFilterFieldsText = P(null, t), i.sort.sortFields = Et([], t), i.sort.quickFilterSort = Rt(t), i;
|
|
358
357
|
};
|
|
359
|
-
function
|
|
358
|
+
function ki({ children: d }) {
|
|
360
359
|
return /* @__PURE__ */ n("div", { children: d });
|
|
361
360
|
}
|
|
362
|
-
function
|
|
361
|
+
function Ti({
|
|
363
362
|
sortable: d = !0,
|
|
364
363
|
quickFilter: e = !0,
|
|
365
364
|
quickFilterSort: t = !1,
|
|
@@ -369,7 +368,7 @@ function Li({
|
|
|
369
368
|
}) {
|
|
370
369
|
return null;
|
|
371
370
|
}
|
|
372
|
-
class
|
|
371
|
+
class Oi extends v {
|
|
373
372
|
static get componentName() {
|
|
374
373
|
return "QueryFieldValue";
|
|
375
374
|
}
|
|
@@ -377,7 +376,7 @@ class Vi extends v {
|
|
|
377
376
|
return null;
|
|
378
377
|
}
|
|
379
378
|
}
|
|
380
|
-
const
|
|
379
|
+
const Dt = ({
|
|
381
380
|
title: d,
|
|
382
381
|
id: e,
|
|
383
382
|
onClickCancel: t,
|
|
@@ -386,27 +385,27 @@ const qt = ({
|
|
|
386
385
|
placeholder: s,
|
|
387
386
|
variant: a
|
|
388
387
|
}) => {
|
|
389
|
-
const [l, h] = $(), [o, c] = $(!0), u = (b,
|
|
388
|
+
const [l, h] = $(), [o, c] = $(!0), u = (b, T) => {
|
|
390
389
|
if (b === "btnOK") {
|
|
391
390
|
if (!l || l === "") {
|
|
392
|
-
|
|
391
|
+
A.showWarning("Informe o nome do filtro.");
|
|
393
392
|
return;
|
|
394
393
|
}
|
|
395
394
|
i && i(l, o);
|
|
396
395
|
} else
|
|
397
|
-
b === "btnCancel" && t && t(
|
|
396
|
+
b === "btnCancel" && t && t(T);
|
|
398
397
|
};
|
|
399
|
-
return /* @__PURE__ */ p(
|
|
398
|
+
return /* @__PURE__ */ p(et, { title: d, id: e, opened: r === e, onClose: () => {
|
|
400
399
|
t && t();
|
|
401
400
|
}, children: [
|
|
402
|
-
/* @__PURE__ */ p(
|
|
401
|
+
/* @__PURE__ */ p(M, { children: [
|
|
403
402
|
/* @__PURE__ */ n(w, { variant: a, onClick: (b) => u("btnOK", b), children: "OK" }),
|
|
404
403
|
" ",
|
|
405
404
|
/* @__PURE__ */ n(w, { variant: a, color: "red", onClick: (b) => u("btnCancel", b), children: "Fechar" })
|
|
406
405
|
] }),
|
|
407
|
-
/* @__PURE__ */ p(
|
|
406
|
+
/* @__PURE__ */ p(je, { children: [
|
|
408
407
|
/* @__PURE__ */ n(
|
|
409
|
-
|
|
408
|
+
Ct,
|
|
410
409
|
{
|
|
411
410
|
placeholder: s,
|
|
412
411
|
style: { width: "100%" },
|
|
@@ -414,7 +413,7 @@ const qt = ({
|
|
|
414
413
|
}
|
|
415
414
|
),
|
|
416
415
|
/* @__PURE__ */ n(
|
|
417
|
-
|
|
416
|
+
z,
|
|
418
417
|
{
|
|
419
418
|
onChange: (b) => c(b.currentTarget.checked),
|
|
420
419
|
label: m().t("archbase:Filtro compartilhado ?")
|
|
@@ -422,7 +421,7 @@ const qt = ({
|
|
|
422
421
|
)
|
|
423
422
|
] })
|
|
424
423
|
] });
|
|
425
|
-
},
|
|
424
|
+
}, Oe = (() => {
|
|
426
425
|
const d = (i, r) => r++ && [...Array(r - i)].map((s, a) => String.fromCharCode(i + a)), e = {
|
|
427
426
|
num: d(48, 57),
|
|
428
427
|
alphaLower: d(97, 122),
|
|
@@ -436,7 +435,7 @@ const qt = ({
|
|
|
436
435
|
}
|
|
437
436
|
return Object.assign((i, ...r) => [...t(i, r.flat())].join(""), e);
|
|
438
437
|
})();
|
|
439
|
-
class
|
|
438
|
+
class Nt extends v {
|
|
440
439
|
static defaultProps = {
|
|
441
440
|
operators: [
|
|
442
441
|
{
|
|
@@ -526,8 +525,8 @@ class Mt extends v {
|
|
|
526
525
|
prefixId;
|
|
527
526
|
// declare context: React.ContextType<typeof ArchbaseAppContext>
|
|
528
527
|
constructor(e) {
|
|
529
|
-
super(e), this.prefixId =
|
|
530
|
-
const t = this.createSchema(), i = e.currentFilter ? e.currentFilter :
|
|
528
|
+
super(e), this.prefixId = Oe(12, Oe.alphaLower);
|
|
529
|
+
const t = this.createSchema(), i = e.currentFilter ? e.currentFilter : H(), r = e.currentFilter ? e.activeFilterIndex : 0, s = this.createFilterFields(e, t, i);
|
|
531
530
|
this.state = {
|
|
532
531
|
simpleFields: s,
|
|
533
532
|
currentFilter: i,
|
|
@@ -538,7 +537,7 @@ class Mt extends v {
|
|
|
538
537
|
}
|
|
539
538
|
shouldComponentUpdate = (e, t) => oe(this, e, t);
|
|
540
539
|
UNSAFE_componentWillReceiveProps = (e) => {
|
|
541
|
-
const t = this.createSchema(), i = e.currentFilter ? e.currentFilter :
|
|
540
|
+
const t = this.createSchema(), i = e.currentFilter ? e.currentFilter : H(), r = e.currentFilter ? e.activeFilterIndex : 0, s = this.createFilterFields(e, t, i);
|
|
542
541
|
this.setState({
|
|
543
542
|
...this.state,
|
|
544
543
|
simpleFields: s,
|
|
@@ -769,61 +768,57 @@ class Mt extends v {
|
|
|
769
768
|
let u = c.value && c.value !== "" ? c.value : null;
|
|
770
769
|
u = c.value2 && c.value2 !== "" ? `${u} a ${c.value2}` : u, s.push(
|
|
771
770
|
/* @__PURE__ */ p(
|
|
772
|
-
|
|
771
|
+
k.Item,
|
|
773
772
|
{
|
|
774
|
-
|
|
773
|
+
value: this.prefixId + "_" + h,
|
|
775
774
|
id: this.prefixId + "_" + h,
|
|
776
|
-
|
|
775
|
+
className: c.disabled === !0 ? "simple-filter-disabled" : "simple-filter-enabled",
|
|
777
776
|
children: [
|
|
778
777
|
/* @__PURE__ */ n(
|
|
779
|
-
|
|
778
|
+
k.Control,
|
|
780
779
|
{
|
|
781
780
|
className: c.disabled === !0 ? "simple-filter-disabled" : "simple-filter-enabled",
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
F.currentTarget.checked,
|
|
796
|
-
c,
|
|
797
|
-
this.prefixId + "_" + h
|
|
798
|
-
)
|
|
799
|
-
}
|
|
800
|
-
),
|
|
801
|
-
/* @__PURE__ */ n(R, { w: "sm" }),
|
|
802
|
-
/* @__PURE__ */ n(x, { c: this.props.colorScheme === "dark" ? "white" : "black", children: m().t(l.label) }),
|
|
803
|
-
/* @__PURE__ */ n(
|
|
804
|
-
Ae,
|
|
805
|
-
{
|
|
806
|
-
field: l.name,
|
|
807
|
-
options: this.getOperators(l.name),
|
|
808
|
-
value: c.operator,
|
|
809
|
-
className: "custom-select-operator",
|
|
810
|
-
style: {
|
|
811
|
-
color: this.props.theme.colors.blue[5],
|
|
812
|
-
backgroundColor: "transparent"
|
|
813
|
-
},
|
|
814
|
-
disabled: !0,
|
|
815
|
-
handleOnChange: (F) => this.onOperatorChanged(c, F),
|
|
816
|
-
level: 0
|
|
817
|
-
}
|
|
781
|
+
disabled: c.disabled,
|
|
782
|
+
children: /* @__PURE__ */ p("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
783
|
+
/* @__PURE__ */ n(
|
|
784
|
+
z,
|
|
785
|
+
{
|
|
786
|
+
checked: !c.disabled,
|
|
787
|
+
width: "24px",
|
|
788
|
+
style: { margin: 0, cursor: "pointer" },
|
|
789
|
+
onChange: (g) => this.onDisabledChanged(
|
|
790
|
+
g.currentTarget.checked,
|
|
791
|
+
g.currentTarget.checked,
|
|
792
|
+
c,
|
|
793
|
+
this.prefixId + "_" + h
|
|
818
794
|
),
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
795
|
+
onClick: (g) => g.stopPropagation()
|
|
796
|
+
}
|
|
797
|
+
),
|
|
798
|
+
/* @__PURE__ */ n(E, { w: "sm" }),
|
|
799
|
+
/* @__PURE__ */ n(x, { c: this.props.colorScheme === "dark" ? "white" : "black", children: m().t(l.label) }),
|
|
800
|
+
/* @__PURE__ */ n(
|
|
801
|
+
Ee,
|
|
802
|
+
{
|
|
803
|
+
field: l.name,
|
|
804
|
+
options: this.getOperators(l.name),
|
|
805
|
+
value: c.operator,
|
|
806
|
+
className: "custom-select-operator",
|
|
807
|
+
style: {
|
|
808
|
+
color: this.props.theme.colors.blue[5],
|
|
809
|
+
backgroundColor: "transparent"
|
|
810
|
+
},
|
|
811
|
+
disabled: !0,
|
|
812
|
+
handleOnChange: (g) => this.onOperatorChanged(c, g),
|
|
813
|
+
level: 0
|
|
814
|
+
}
|
|
815
|
+
),
|
|
816
|
+
/* @__PURE__ */ n(x, { style: { fontSize: "12px" }, c: "blue", children: u })
|
|
817
|
+
] })
|
|
823
818
|
}
|
|
824
819
|
),
|
|
825
820
|
/* @__PURE__ */ n(
|
|
826
|
-
|
|
821
|
+
k.Panel,
|
|
827
822
|
{
|
|
828
823
|
className: c.disabled === !0 ? "simple-filter-disabled" : "simple-filter-enabled",
|
|
829
824
|
children: /* @__PURE__ */ p(
|
|
@@ -836,7 +831,7 @@ class Mt extends v {
|
|
|
836
831
|
},
|
|
837
832
|
children: [
|
|
838
833
|
/* @__PURE__ */ n(
|
|
839
|
-
|
|
834
|
+
Ee,
|
|
840
835
|
{
|
|
841
836
|
field: l.name,
|
|
842
837
|
options: this.getOperators(l.name),
|
|
@@ -846,12 +841,12 @@ class Mt extends v {
|
|
|
846
841
|
color: this.props.colorScheme === "dark" ? "white" : "black"
|
|
847
842
|
},
|
|
848
843
|
disabled: l.disabled,
|
|
849
|
-
handleOnChange: (
|
|
844
|
+
handleOnChange: (g) => this.onOperatorChanged(c, g),
|
|
850
845
|
level: 0
|
|
851
846
|
}
|
|
852
847
|
),
|
|
853
848
|
/* @__PURE__ */ n(
|
|
854
|
-
|
|
849
|
+
Re,
|
|
855
850
|
{
|
|
856
851
|
field: l.name,
|
|
857
852
|
dataType: l.dataType,
|
|
@@ -862,7 +857,7 @@ class Mt extends v {
|
|
|
862
857
|
searchField: l.searchField,
|
|
863
858
|
disabled: c.disabled,
|
|
864
859
|
className: "rule-value",
|
|
865
|
-
handleOnChange: (
|
|
860
|
+
handleOnChange: (g) => this.onValueChanged(c, g),
|
|
866
861
|
onSearchButtonClick: e.onSearchButtonClick,
|
|
867
862
|
searchComponent: l.searchComponent,
|
|
868
863
|
level: 0
|
|
@@ -871,7 +866,7 @@ class Mt extends v {
|
|
|
871
866
|
),
|
|
872
867
|
" ",
|
|
873
868
|
c.operator === "between" && c.dataType !== "date" && c.dataType !== "date_time" && c.dataType !== "time" ? /* @__PURE__ */ n(
|
|
874
|
-
|
|
869
|
+
Re,
|
|
875
870
|
{
|
|
876
871
|
field: l.name,
|
|
877
872
|
dataType: c.dataType,
|
|
@@ -881,7 +876,7 @@ class Mt extends v {
|
|
|
881
876
|
searchField: l.searchField,
|
|
882
877
|
disabled: c.disabled,
|
|
883
878
|
className: "rule-value",
|
|
884
|
-
handleOnChange: (
|
|
879
|
+
handleOnChange: (g) => this.onValue2Changed(c, g),
|
|
885
880
|
onSearchButtonClick: e.onSearchButtonClick,
|
|
886
881
|
searchComponent: l.searchComponent,
|
|
887
882
|
level: 0
|
|
@@ -899,8 +894,8 @@ class Mt extends v {
|
|
|
899
894
|
)
|
|
900
895
|
);
|
|
901
896
|
}), s.sort((l, h) => l.props.disabled && h.props.disabled ? 0 : l.props.disabled ? -1 : 1), this.props.allowSort === !0 && s.push(
|
|
902
|
-
/* @__PURE__ */ p(
|
|
903
|
-
/* @__PURE__ */ n(
|
|
897
|
+
/* @__PURE__ */ p(k.Item, { value: this.prefixId + "_sort", children: [
|
|
898
|
+
/* @__PURE__ */ n(k.Control, { children: /* @__PURE__ */ p(
|
|
904
899
|
"div",
|
|
905
900
|
{
|
|
906
901
|
style: {
|
|
@@ -911,10 +906,10 @@ class Mt extends v {
|
|
|
911
906
|
padding: "4px"
|
|
912
907
|
},
|
|
913
908
|
children: [
|
|
914
|
-
/* @__PURE__ */ n(
|
|
915
|
-
/* @__PURE__ */ n(
|
|
909
|
+
/* @__PURE__ */ n(Me, { size: 30, color: this.getColor("green") }),
|
|
910
|
+
/* @__PURE__ */ n(E, { w: "md" }),
|
|
916
911
|
"Ordenação",
|
|
917
|
-
/* @__PURE__ */ n(
|
|
912
|
+
/* @__PURE__ */ n(E, { w: "md" }),
|
|
918
913
|
/* @__PURE__ */ n(
|
|
919
914
|
x,
|
|
920
915
|
{
|
|
@@ -928,24 +923,23 @@ class Mt extends v {
|
|
|
928
923
|
whiteSpace: "normal",
|
|
929
924
|
fontSize: "12px"
|
|
930
925
|
},
|
|
931
|
-
children:
|
|
926
|
+
children: Ye(i)
|
|
932
927
|
},
|
|
933
|
-
"
|
|
934
|
-
)
|
|
935
|
-
/* @__PURE__ */ n(Et, { children: ({ expanded: l }) => l ? /* @__PURE__ */ n(dt, {}) : /* @__PURE__ */ n(ht, {}) })
|
|
928
|
+
"txto_sort"
|
|
929
|
+
)
|
|
936
930
|
]
|
|
937
931
|
}
|
|
938
|
-
) })
|
|
939
|
-
/* @__PURE__ */ n(
|
|
932
|
+
) }),
|
|
933
|
+
/* @__PURE__ */ n(k.Panel, { children: /* @__PURE__ */ n(R, { children: /* @__PURE__ */ n(R.Col, { span: 12, style: { padding: 13 }, children: /* @__PURE__ */ n(
|
|
940
934
|
"div",
|
|
941
935
|
{
|
|
942
936
|
style: {
|
|
943
937
|
height: "auto"
|
|
944
938
|
},
|
|
945
939
|
children: /* @__PURE__ */ p(re, { withBorder: !0, shadow: "sm", radius: "md", children: [
|
|
946
|
-
/* @__PURE__ */ n(re.Section, { withBorder: !0, inheritPadding: !0, py: "xs", children: /* @__PURE__ */ p(
|
|
947
|
-
/* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: "Para baixo", children: /* @__PURE__ */ n(
|
|
948
|
-
/* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: "Para cima", children: /* @__PURE__ */ n(
|
|
940
|
+
/* @__PURE__ */ n(re.Section, { withBorder: !0, inheritPadding: !0, py: "xs", children: /* @__PURE__ */ p(M, { children: [
|
|
941
|
+
/* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: "Para baixo", children: /* @__PURE__ */ n(F, { id: "btnFilterSortDown", onClick: this.onSortDown, children: /* @__PURE__ */ n(ve, {}) }) }),
|
|
942
|
+
/* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: "Para cima", children: /* @__PURE__ */ n(F, { id: "btnFilterSortUp", onClick: this.onSortUp, children: /* @__PURE__ */ n(Se, {}) }) }),
|
|
949
943
|
/* @__PURE__ */ n(x, { children: "Ordenação" })
|
|
950
944
|
] }) }),
|
|
951
945
|
/* @__PURE__ */ n(
|
|
@@ -957,14 +951,14 @@ class Mt extends v {
|
|
|
957
951
|
dataSource: (
|
|
958
952
|
// 🔄 MIGRAÇÃO V1/V2: DataSource com compatibilidade
|
|
959
953
|
(() => {
|
|
960
|
-
const l = new
|
|
954
|
+
const l = new Y("dsSortFields", {
|
|
961
955
|
records: i.sort.sortFields,
|
|
962
956
|
grandTotalRecords: i.sort.sortFields.length,
|
|
963
957
|
currentPage: 0,
|
|
964
958
|
totalPages: 0,
|
|
965
959
|
pageSize: 999999
|
|
966
960
|
});
|
|
967
|
-
return
|
|
961
|
+
return U(l), l;
|
|
968
962
|
})()
|
|
969
963
|
),
|
|
970
964
|
dataFieldId: "name",
|
|
@@ -983,30 +977,32 @@ class Mt extends v {
|
|
|
983
977
|
] })
|
|
984
978
|
}
|
|
985
979
|
) }) }) })
|
|
986
|
-
] }, "
|
|
980
|
+
] }, "flk_sort")
|
|
987
981
|
), s;
|
|
988
982
|
};
|
|
989
983
|
render = () => {
|
|
990
984
|
const e = [], t = [];
|
|
991
985
|
return this.state.simpleFields.forEach((i) => {
|
|
992
|
-
i.props.
|
|
986
|
+
const r = i.props.className?.includes("simple-filter-disabled"), s = i.props.value === this.prefixId + "_sort";
|
|
987
|
+
!r && !s && (e.push(i), t.push(i.props.value));
|
|
993
988
|
}), this.state.simpleFields.forEach((i) => {
|
|
994
|
-
i.props.
|
|
989
|
+
i.props.value === this.prefixId + "_sort" && (e.push(i), t.push(i.props.value));
|
|
995
990
|
}), this.state.simpleFields.forEach((i) => {
|
|
996
|
-
|
|
991
|
+
const r = i.props.className?.includes("simple-filter-disabled"), s = i.props.value === this.prefixId + "_sort";
|
|
992
|
+
r && !s && e.push(i);
|
|
997
993
|
}), /* @__PURE__ */ n(Ie, { children: /* @__PURE__ */ n(
|
|
998
|
-
|
|
994
|
+
k,
|
|
999
995
|
{
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
preExpanded: t,
|
|
996
|
+
multiple: !0,
|
|
997
|
+
defaultValue: t,
|
|
1003
998
|
id: "acc1",
|
|
999
|
+
variant: "separated",
|
|
1004
1000
|
children: e.map((i, r) => /* @__PURE__ */ n(Ie, { children: i }, r))
|
|
1005
1001
|
}
|
|
1006
1002
|
) });
|
|
1007
1003
|
};
|
|
1008
1004
|
}
|
|
1009
|
-
class
|
|
1005
|
+
class Re extends y.Component {
|
|
1010
1006
|
constructor(e) {
|
|
1011
1007
|
super(e);
|
|
1012
1008
|
}
|
|
@@ -1056,7 +1052,7 @@ class Ne extends y.Component {
|
|
|
1056
1052
|
if (t) {
|
|
1057
1053
|
if (t === "date")
|
|
1058
1054
|
return i === "between" ? (o === "" && c === "" ? o = "" : o = [o, c], /* @__PURE__ */ n(
|
|
1059
|
-
|
|
1055
|
+
W,
|
|
1060
1056
|
{
|
|
1061
1057
|
type: "range",
|
|
1062
1058
|
disabled: e,
|
|
@@ -1065,7 +1061,7 @@ class Ne extends y.Component {
|
|
|
1065
1061
|
onChange: (u) => h(u)
|
|
1066
1062
|
}
|
|
1067
1063
|
)) : i === "notInList" || i === "inList" ? /* @__PURE__ */ n(
|
|
1068
|
-
|
|
1064
|
+
W,
|
|
1069
1065
|
{
|
|
1070
1066
|
type: "multiple",
|
|
1071
1067
|
disabled: e,
|
|
@@ -1074,7 +1070,7 @@ class Ne extends y.Component {
|
|
|
1074
1070
|
onChange: (u) => h(u)
|
|
1075
1071
|
}
|
|
1076
1072
|
) : /* @__PURE__ */ n(
|
|
1077
|
-
|
|
1073
|
+
W,
|
|
1078
1074
|
{
|
|
1079
1075
|
disabled: e,
|
|
1080
1076
|
value: o,
|
|
@@ -1086,7 +1082,7 @@ class Ne extends y.Component {
|
|
|
1086
1082
|
if (i === "between") {
|
|
1087
1083
|
const u = o === "" && c === "" ? [null, null] : [new Date(o), new Date(c)];
|
|
1088
1084
|
return /* @__PURE__ */ n(
|
|
1089
|
-
|
|
1085
|
+
Ge,
|
|
1090
1086
|
{
|
|
1091
1087
|
disabled: e,
|
|
1092
1088
|
value: u,
|
|
@@ -1098,7 +1094,7 @@ class Ne extends y.Component {
|
|
|
1098
1094
|
);
|
|
1099
1095
|
} else
|
|
1100
1096
|
return /* @__PURE__ */ n(
|
|
1101
|
-
|
|
1097
|
+
Qe,
|
|
1102
1098
|
{
|
|
1103
1099
|
disabled: e,
|
|
1104
1100
|
value: o ? new Date(o) : null,
|
|
@@ -1111,7 +1107,7 @@ class Ne extends y.Component {
|
|
|
1111
1107
|
else {
|
|
1112
1108
|
if (t === "time")
|
|
1113
1109
|
return o === "" && c === "" ? o = "" : o = o + " - " + c, /* @__PURE__ */ n(
|
|
1114
|
-
|
|
1110
|
+
$e,
|
|
1115
1111
|
{
|
|
1116
1112
|
disabled: e,
|
|
1117
1113
|
style: { width: "100%" },
|
|
@@ -1130,7 +1126,7 @@ class Ne extends y.Component {
|
|
|
1130
1126
|
justifyContent: "center"
|
|
1131
1127
|
},
|
|
1132
1128
|
children: /* @__PURE__ */ n(
|
|
1133
|
-
|
|
1129
|
+
Le,
|
|
1134
1130
|
{
|
|
1135
1131
|
checked: o,
|
|
1136
1132
|
onChange: (u) => h(u.currentTarget.checked)
|
|
@@ -1141,11 +1137,11 @@ class Ne extends y.Component {
|
|
|
1141
1137
|
if (a && a.length > 0 && (i === "notInList" || i === "inList")) {
|
|
1142
1138
|
const u = this.convertValueCombobox(o, t);
|
|
1143
1139
|
return /* @__PURE__ */ n(
|
|
1144
|
-
|
|
1140
|
+
tt,
|
|
1145
1141
|
{
|
|
1146
1142
|
disabled: e,
|
|
1147
1143
|
style: { width: "100%" },
|
|
1148
|
-
onChange: (
|
|
1144
|
+
onChange: (g) => h(g),
|
|
1149
1145
|
value: u,
|
|
1150
1146
|
data: a
|
|
1151
1147
|
}
|
|
@@ -1171,7 +1167,7 @@ class Ne extends y.Component {
|
|
|
1171
1167
|
))
|
|
1172
1168
|
}
|
|
1173
1169
|
) : /* @__PURE__ */ n(
|
|
1174
|
-
|
|
1170
|
+
J,
|
|
1175
1171
|
{
|
|
1176
1172
|
onChange: (u) => h(u),
|
|
1177
1173
|
disabled: e,
|
|
@@ -1196,7 +1192,7 @@ class Ne extends y.Component {
|
|
|
1196
1192
|
}
|
|
1197
1193
|
} else
|
|
1198
1194
|
return /* @__PURE__ */ n(
|
|
1199
|
-
|
|
1195
|
+
J,
|
|
1200
1196
|
{
|
|
1201
1197
|
onChange: (u) => h(u),
|
|
1202
1198
|
disabled: e,
|
|
@@ -1220,7 +1216,7 @@ class Ne extends y.Component {
|
|
|
1220
1216
|
);
|
|
1221
1217
|
};
|
|
1222
1218
|
}
|
|
1223
|
-
class
|
|
1219
|
+
class Ee extends y.Component {
|
|
1224
1220
|
static get componentName() {
|
|
1225
1221
|
return "ValueSelector";
|
|
1226
1222
|
}
|
|
@@ -1260,17 +1256,17 @@ class Ae extends y.Component {
|
|
|
1260
1256
|
);
|
|
1261
1257
|
};
|
|
1262
1258
|
}
|
|
1263
|
-
class
|
|
1259
|
+
class At extends v {
|
|
1264
1260
|
// declare context: React.ContextType<typeof ArchbaseAppContext>
|
|
1265
1261
|
constructor(e) {
|
|
1266
1262
|
super(e);
|
|
1267
|
-
const t = new
|
|
1263
|
+
const t = new Y("dsSortFields", {
|
|
1268
1264
|
records: this.props.persistenceDelegator.getFilters(),
|
|
1269
1265
|
grandTotalRecords: this.props.persistenceDelegator.getFilters().length,
|
|
1270
1266
|
currentPage: 0,
|
|
1271
1267
|
totalPages: 0,
|
|
1272
1268
|
pageSize: 999999
|
|
1273
|
-
}), i =
|
|
1269
|
+
}), i = U(t) === "V2";
|
|
1274
1270
|
this.state = {
|
|
1275
1271
|
modalOpen: "",
|
|
1276
1272
|
activeFilterIndex: e.activeFilterIndex,
|
|
@@ -1284,13 +1280,13 @@ class Wt extends v {
|
|
|
1284
1280
|
}
|
|
1285
1281
|
shouldComponentUpdate = (e, t) => oe(this, e, t);
|
|
1286
1282
|
UNSAFE_componentWillReceiveProps = (e) => {
|
|
1287
|
-
const t = new
|
|
1283
|
+
const t = new Y("dsSortFields", {
|
|
1288
1284
|
records: this.props.persistenceDelegator.getFilters(),
|
|
1289
1285
|
grandTotalRecords: this.props.persistenceDelegator.getFilters().length,
|
|
1290
1286
|
currentPage: 0,
|
|
1291
1287
|
totalPages: 0,
|
|
1292
1288
|
pageSize: 999999
|
|
1293
|
-
}), i =
|
|
1289
|
+
}), i = U(t) === "V2";
|
|
1294
1290
|
this.setState({
|
|
1295
1291
|
...this.state,
|
|
1296
1292
|
fields: I(e),
|
|
@@ -1320,15 +1316,15 @@ class Wt extends v {
|
|
|
1320
1316
|
render = () => {
|
|
1321
1317
|
let e = "normal";
|
|
1322
1318
|
return this.props.currentFilter && (e = this.props.currentFilter.filter.filterType), /* @__PURE__ */ n(Fe, { h: this.props.height, w: this.props.width, children: /* @__PURE__ */ p("div", { style: { width: "98%" }, children: [
|
|
1323
|
-
/* @__PURE__ */ n(
|
|
1319
|
+
/* @__PURE__ */ n(k, { variant: "contained", multiple: !1, defaultValue: "filters", children: /* @__PURE__ */ p(k.Item, { value: "filters", children: [
|
|
1324
1320
|
/* @__PURE__ */ n(
|
|
1325
|
-
|
|
1321
|
+
k.Control,
|
|
1326
1322
|
{
|
|
1327
|
-
icon: /* @__PURE__ */ n(
|
|
1323
|
+
icon: /* @__PURE__ */ n(Me, { size: 24, color: this.getColor("red") }),
|
|
1328
1324
|
children: /* @__PURE__ */ n(x, { style: { fontWeight: "bold" }, children: `${m().t("archbase:Filtros salvos")}` })
|
|
1329
1325
|
}
|
|
1330
1326
|
),
|
|
1331
|
-
/* @__PURE__ */ n(
|
|
1327
|
+
/* @__PURE__ */ n(k.Panel, { children: /* @__PURE__ */ n(
|
|
1332
1328
|
de,
|
|
1333
1329
|
{
|
|
1334
1330
|
height: "105px",
|
|
@@ -1336,18 +1332,18 @@ class Wt extends v {
|
|
|
1336
1332
|
dataSource: this.state.dataSource,
|
|
1337
1333
|
onSelectListItem: this.onSelectItem,
|
|
1338
1334
|
style: { borderRadius: "6px", marginBottom: "4px", padding: "10px" },
|
|
1339
|
-
component: { type:
|
|
1335
|
+
component: { type: Lt, props: {} }
|
|
1340
1336
|
}
|
|
1341
1337
|
) })
|
|
1342
1338
|
] }) }),
|
|
1343
1339
|
/* @__PURE__ */ p("div", { className: "filter-apply", children: [
|
|
1344
|
-
/* @__PURE__ */ p(
|
|
1340
|
+
/* @__PURE__ */ p(M, { gap: "xs", children: [
|
|
1345
1341
|
/* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: `${m().t("archbase:Novo filtro")}`, children: /* @__PURE__ */ n(
|
|
1346
1342
|
w,
|
|
1347
1343
|
{
|
|
1348
1344
|
id: "btnNew",
|
|
1349
1345
|
variant: this.props.variant,
|
|
1350
|
-
leftSection: /* @__PURE__ */ n(
|
|
1346
|
+
leftSection: /* @__PURE__ */ n(nt, {}),
|
|
1351
1347
|
onClick: (t) => this.props.onActionClick && this.props.onActionClick("new"),
|
|
1352
1348
|
children: m().t("archbase:New")
|
|
1353
1349
|
}
|
|
@@ -1359,26 +1355,26 @@ class Wt extends v {
|
|
|
1359
1355
|
color: "red",
|
|
1360
1356
|
variant: this.props.variant,
|
|
1361
1357
|
disabled: this.props.currentFilter && (!this.props.currentFilter.id || this.props.currentFilter.id <= 0),
|
|
1362
|
-
leftSection: /* @__PURE__ */ n(
|
|
1358
|
+
leftSection: /* @__PURE__ */ n(We, {}),
|
|
1363
1359
|
onClick: (t) => this.props.onActionClick && this.props.onActionClick("remove"),
|
|
1364
1360
|
children: m().t("archbase:Remover")
|
|
1365
1361
|
}
|
|
1366
1362
|
) })
|
|
1367
1363
|
] }),
|
|
1368
|
-
/* @__PURE__ */ p(
|
|
1364
|
+
/* @__PURE__ */ p(M, { gap: "xs", children: [
|
|
1369
1365
|
/* @__PURE__ */ p(
|
|
1370
|
-
|
|
1366
|
+
q,
|
|
1371
1367
|
{
|
|
1372
1368
|
shadow: "md",
|
|
1373
1369
|
width: 200,
|
|
1374
1370
|
withinPortal: !0,
|
|
1375
1371
|
disabled: this.props.activeFilterIndex === S,
|
|
1376
1372
|
children: [
|
|
1377
|
-
/* @__PURE__ */ n(
|
|
1378
|
-
/* @__PURE__ */ p(
|
|
1379
|
-
/* @__PURE__ */ n(
|
|
1373
|
+
/* @__PURE__ */ n(q.Target, { children: /* @__PURE__ */ n(w, { variant: this.props.variant, leftSection: /* @__PURE__ */ n(ue, {}), children: `${m().t("archbase:Save")}` }) }),
|
|
1374
|
+
/* @__PURE__ */ p(q.Dropdown, { children: [
|
|
1375
|
+
/* @__PURE__ */ n(q.Label, { children: `${m().t("archbase:Filter")}` }),
|
|
1380
1376
|
/* @__PURE__ */ n(
|
|
1381
|
-
|
|
1377
|
+
q.Item,
|
|
1382
1378
|
{
|
|
1383
1379
|
onClick: () => this.onSelectMenuItem("mnuItemSalvar"),
|
|
1384
1380
|
disabled: this.props.activeFilterIndex === S,
|
|
@@ -1387,7 +1383,7 @@ class Wt extends v {
|
|
|
1387
1383
|
}
|
|
1388
1384
|
),
|
|
1389
1385
|
/* @__PURE__ */ n(
|
|
1390
|
-
|
|
1386
|
+
q.Item,
|
|
1391
1387
|
{
|
|
1392
1388
|
onClick: () => this.onSelectMenuItem("mnuItemSalvarComo"),
|
|
1393
1389
|
disabled: this.props.activeFilterIndex === S,
|
|
@@ -1418,7 +1414,7 @@ class Wt extends v {
|
|
|
1418
1414
|
id: "btnClose",
|
|
1419
1415
|
variant: this.props.variant,
|
|
1420
1416
|
color: "green",
|
|
1421
|
-
leftSection: /* @__PURE__ */ n(
|
|
1417
|
+
leftSection: /* @__PURE__ */ n(at, {}),
|
|
1422
1418
|
onClick: (t) => this.props.onActionClick && this.props.onActionClick("close"),
|
|
1423
1419
|
children: `${m().t("archbase:Close")}`
|
|
1424
1420
|
}
|
|
@@ -1433,18 +1429,18 @@ class Wt extends v {
|
|
|
1433
1429
|
label: `${m().t("archbase:Selecione o tipo do filtro")}`,
|
|
1434
1430
|
withAsterisk: !0,
|
|
1435
1431
|
onChange: (t) => this.onChangeFilterType(t === "normal" ? 0 : 1),
|
|
1436
|
-
children: /* @__PURE__ */ p(
|
|
1432
|
+
children: /* @__PURE__ */ p(M, { mt: "xs", children: [
|
|
1437
1433
|
/* @__PURE__ */ n(pe, { value: "normal", label: `${m().t("archbase:Simples")}` }),
|
|
1438
1434
|
/* @__PURE__ */ n(pe, { value: "advanced", label: `${m().t("archbase:Avançado")}` })
|
|
1439
1435
|
] })
|
|
1440
1436
|
}
|
|
1441
1437
|
) : null,
|
|
1442
1438
|
e === ee ? /* @__PURE__ */ n(
|
|
1443
|
-
|
|
1439
|
+
Nt,
|
|
1444
1440
|
{
|
|
1445
1441
|
allowSort: !0,
|
|
1446
1442
|
update: this.props.update,
|
|
1447
|
-
operators:
|
|
1443
|
+
operators: _t,
|
|
1448
1444
|
currentFilter: this.props.currentFilter,
|
|
1449
1445
|
activeFilterIndex: this.props.activeFilterIndex,
|
|
1450
1446
|
onFilterChanged: this.props.onFilterChanged,
|
|
@@ -1453,7 +1449,7 @@ class Wt extends v {
|
|
|
1453
1449
|
}
|
|
1454
1450
|
) : null,
|
|
1455
1451
|
e === se ? /* @__PURE__ */ n(
|
|
1456
|
-
|
|
1452
|
+
Pt,
|
|
1457
1453
|
{
|
|
1458
1454
|
isOpen: this.state.expandedFilter,
|
|
1459
1455
|
update: this.props.update,
|
|
@@ -1464,13 +1460,13 @@ class Wt extends v {
|
|
|
1464
1460
|
onSearchButtonClick: this.props.onSearchButtonClick,
|
|
1465
1461
|
currentFilter: this.props.currentFilter,
|
|
1466
1462
|
activeFilterIndex: this.props.activeFilterIndex,
|
|
1467
|
-
children:
|
|
1463
|
+
children: He(this.props.children)
|
|
1468
1464
|
}
|
|
1469
1465
|
) : null
|
|
1470
1466
|
] }) });
|
|
1471
1467
|
};
|
|
1472
1468
|
}
|
|
1473
|
-
class
|
|
1469
|
+
class Pt extends v {
|
|
1474
1470
|
static defaultProps = {
|
|
1475
1471
|
isOpen: !1
|
|
1476
1472
|
};
|
|
@@ -1490,21 +1486,21 @@ class zt extends v {
|
|
|
1490
1486
|
render() {
|
|
1491
1487
|
return /* @__PURE__ */ p("div", { style: { padding: "10px", width: this.props.width }, children: [
|
|
1492
1488
|
/* @__PURE__ */ n(
|
|
1493
|
-
|
|
1489
|
+
Mt,
|
|
1494
1490
|
{
|
|
1495
1491
|
onFilterChanged: this.props.onFilterChanged,
|
|
1496
1492
|
width: "100%",
|
|
1497
1493
|
horizontal: !1,
|
|
1498
1494
|
currentFilter: this.props.currentFilter,
|
|
1499
1495
|
activeFilterIndex: this.props.activeFilterIndex,
|
|
1500
|
-
id: `advanced${
|
|
1496
|
+
id: `advanced${j()}`,
|
|
1501
1497
|
border: "none",
|
|
1502
1498
|
variant: this.props.variant,
|
|
1503
1499
|
children: this.props.children
|
|
1504
1500
|
}
|
|
1505
1501
|
),
|
|
1506
1502
|
/* @__PURE__ */ n(
|
|
1507
|
-
|
|
1503
|
+
Dt,
|
|
1508
1504
|
{
|
|
1509
1505
|
id: "modalSaveFilter",
|
|
1510
1506
|
title: `${m().t("archbase:Salvar filtro")}`,
|
|
@@ -1515,7 +1511,7 @@ class zt extends v {
|
|
|
1515
1511
|
] });
|
|
1516
1512
|
}
|
|
1517
1513
|
}
|
|
1518
|
-
class
|
|
1514
|
+
class Lt extends v {
|
|
1519
1515
|
static defaultProps = {
|
|
1520
1516
|
disabled: !1,
|
|
1521
1517
|
active: !0
|
|
@@ -1539,13 +1535,13 @@ class Gt extends v {
|
|
|
1539
1535
|
};
|
|
1540
1536
|
return this.props.active && (i += " active", r = { ...r, border: "1px dashed blue", fontWeight: "bold" }), this.props.recordData.disabled && (i += " disabled"), /* @__PURE__ */ p("div", { className: i, style: r, onClick: this.onClick, children: [
|
|
1541
1537
|
/* @__PURE__ */ n(x, { style: { cursor: "pointer" }, children: m().t(this.props.recordData.name) }),
|
|
1542
|
-
/* @__PURE__ */ n(
|
|
1538
|
+
/* @__PURE__ */ n(it, { style: { cursor: "pointer", maxWidth: "100px", fontWeight: "bold" }, color: e, children: t })
|
|
1543
1539
|
] });
|
|
1544
1540
|
};
|
|
1545
1541
|
}
|
|
1546
|
-
class
|
|
1542
|
+
class Vt extends v {
|
|
1547
1543
|
constructor(e) {
|
|
1548
|
-
super(e), me(ae(e.fields)), me(
|
|
1544
|
+
super(e), me(ae(e.fields)), me(Ot(e.fields)), this.state = {
|
|
1549
1545
|
selectedFields: [...e.selectedOptions],
|
|
1550
1546
|
sortFields: [...e.sort],
|
|
1551
1547
|
allChecked: !1,
|
|
@@ -1557,14 +1553,14 @@ class Qt extends v {
|
|
|
1557
1553
|
}
|
|
1558
1554
|
// 🔄 MIGRAÇÃO V1/V2: Helper para criar DataSource com compatibilidade
|
|
1559
1555
|
createCompatibleDataSource = (e) => {
|
|
1560
|
-
const t = new
|
|
1556
|
+
const t = new Y("dsSortFields", {
|
|
1561
1557
|
records: e,
|
|
1562
1558
|
grandTotalRecords: e.length,
|
|
1563
1559
|
currentPage: 0,
|
|
1564
1560
|
totalPages: 0,
|
|
1565
1561
|
pageSize: 999999
|
|
1566
1562
|
});
|
|
1567
|
-
return
|
|
1563
|
+
return U(t) !== "V2" && this.setState({
|
|
1568
1564
|
...this.state,
|
|
1569
1565
|
forceUpdateCounter: this.state.forceUpdateCounter + 1
|
|
1570
1566
|
}), t;
|
|
@@ -1580,7 +1576,7 @@ class Qt extends v {
|
|
|
1580
1576
|
return this.state.selectedFields.forEach((i) => {
|
|
1581
1577
|
e.name === i.name && (t = !0);
|
|
1582
1578
|
}), /* @__PURE__ */ n(
|
|
1583
|
-
|
|
1579
|
+
z,
|
|
1584
1580
|
{
|
|
1585
1581
|
label: e.label,
|
|
1586
1582
|
checked: t,
|
|
@@ -1681,9 +1677,9 @@ class Qt extends v {
|
|
|
1681
1677
|
id: this.props.id,
|
|
1682
1678
|
style: { width: this.props.width, display: "grid", justifyContent: "center", height: "460px" },
|
|
1683
1679
|
children: [
|
|
1684
|
-
/* @__PURE__ */ p(
|
|
1680
|
+
/* @__PURE__ */ p(je, { children: [
|
|
1685
1681
|
/* @__PURE__ */ p(
|
|
1686
|
-
|
|
1682
|
+
R,
|
|
1687
1683
|
{
|
|
1688
1684
|
style: {
|
|
1689
1685
|
paddingBottom: "10px",
|
|
@@ -1702,7 +1698,7 @@ class Qt extends v {
|
|
|
1702
1698
|
children: [
|
|
1703
1699
|
/* @__PURE__ */ n(x, { style: { fontWeight: "700" }, children: m().t("archbase:Selecione os campos p/ o filtro rápido:") }),
|
|
1704
1700
|
/* @__PURE__ */ n(
|
|
1705
|
-
|
|
1701
|
+
z,
|
|
1706
1702
|
{
|
|
1707
1703
|
checked: this.state.allChecked,
|
|
1708
1704
|
style: { cursor: "pointer" },
|
|
@@ -1713,11 +1709,11 @@ class Qt extends v {
|
|
|
1713
1709
|
]
|
|
1714
1710
|
}
|
|
1715
1711
|
),
|
|
1716
|
-
/* @__PURE__ */ n(
|
|
1712
|
+
/* @__PURE__ */ n(R.Col, { children: /* @__PURE__ */ n(Fe, { h: "128px", children: /* @__PURE__ */ n(Ve, { children: this.renderCheckboxFields() }) }) })
|
|
1717
1713
|
]
|
|
1718
1714
|
}
|
|
1719
1715
|
),
|
|
1720
|
-
/* @__PURE__ */ n(
|
|
1716
|
+
/* @__PURE__ */ n(R, { children: /* @__PURE__ */ n(R.Col, { style: { padding: 13 }, children: /* @__PURE__ */ p(
|
|
1721
1717
|
"div",
|
|
1722
1718
|
{
|
|
1723
1719
|
className: "sort-group-container",
|
|
@@ -1727,8 +1723,8 @@ class Qt extends v {
|
|
|
1727
1723
|
children: [
|
|
1728
1724
|
/* @__PURE__ */ p("div", { className: "sort-header", children: [
|
|
1729
1725
|
/* @__PURE__ */ p("div", { style: { display: "flex" }, children: [
|
|
1730
|
-
/* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: "Para baixo", children: /* @__PURE__ */ n(
|
|
1731
|
-
/* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: "Para cima", children: /* @__PURE__ */ n(
|
|
1726
|
+
/* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: "Para baixo", children: /* @__PURE__ */ n(F, { id: "btnFilterSortDown", onClick: this.onSortDown, children: /* @__PURE__ */ n(ve, {}) }) }),
|
|
1727
|
+
/* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: "Para cima", children: /* @__PURE__ */ n(F, { id: "btnFilterSortUp", onClick: this.onSortUp, children: /* @__PURE__ */ n(Se, {}) }) })
|
|
1732
1728
|
] }),
|
|
1733
1729
|
/* @__PURE__ */ n(x, { children: m().t("archbase:Ordenação") })
|
|
1734
1730
|
] }),
|
|
@@ -1778,7 +1774,7 @@ class Qt extends v {
|
|
|
1778
1774
|
children: "Aplicar"
|
|
1779
1775
|
}
|
|
1780
1776
|
),
|
|
1781
|
-
/* @__PURE__ */ n(
|
|
1777
|
+
/* @__PURE__ */ n(E, { w: "sm" }),
|
|
1782
1778
|
/* @__PURE__ */ n(w, { variant: this.props.variant, color: "red", onClick: this.props.onCancelSelectFields, children: "Cancela" })
|
|
1783
1779
|
]
|
|
1784
1780
|
}
|
|
@@ -1788,8 +1784,8 @@ class Qt extends v {
|
|
|
1788
1784
|
this.props.key
|
|
1789
1785
|
);
|
|
1790
1786
|
}
|
|
1791
|
-
const
|
|
1792
|
-
class
|
|
1787
|
+
const Bt = ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"], qt = ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"];
|
|
1788
|
+
class $t extends v {
|
|
1793
1789
|
dateRef;
|
|
1794
1790
|
constructor(e) {
|
|
1795
1791
|
super(e), this.state = { value: void 0, selectRangeType: "range" }, this.dateRef = y.createRef();
|
|
@@ -1807,13 +1803,13 @@ class Yt extends v {
|
|
|
1807
1803
|
style: { width: this.props.width, display: "grid", justifyContent: "center", height: "344px" },
|
|
1808
1804
|
children: [
|
|
1809
1805
|
/* @__PURE__ */ n("div", { style: { display: "flex", justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ n(
|
|
1810
|
-
|
|
1806
|
+
xt,
|
|
1811
1807
|
{
|
|
1812
1808
|
ref: this.dateRef,
|
|
1813
1809
|
value: this.state.value,
|
|
1814
1810
|
shadow: !1,
|
|
1815
|
-
weekDays:
|
|
1816
|
-
months:
|
|
1811
|
+
weekDays: Bt,
|
|
1812
|
+
months: qt,
|
|
1817
1813
|
weekPicker: this.state.selectRangeType === "week",
|
|
1818
1814
|
onlyMonthPicker: this.state.selectRangeType === "month",
|
|
1819
1815
|
range: this.state.selectRangeType === "week" || this.state.selectRangeType === "month" || this.state.selectRangeType === "range",
|
|
@@ -1824,7 +1820,7 @@ class Yt extends v {
|
|
|
1824
1820
|
}
|
|
1825
1821
|
) }),
|
|
1826
1822
|
/* @__PURE__ */ p(
|
|
1827
|
-
|
|
1823
|
+
Ve,
|
|
1828
1824
|
{
|
|
1829
1825
|
style: {
|
|
1830
1826
|
display: "flex",
|
|
@@ -1837,47 +1833,47 @@ class Yt extends v {
|
|
|
1837
1833
|
children: [
|
|
1838
1834
|
/* @__PURE__ */ p("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
1839
1835
|
/* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: `${m().t("archbase:Intervalo")}`, children: /* @__PURE__ */ n(
|
|
1840
|
-
|
|
1836
|
+
F,
|
|
1841
1837
|
{
|
|
1842
1838
|
variant: this.props.variant,
|
|
1843
1839
|
size: "lg",
|
|
1844
1840
|
color: "var(--mantine-primary-color-filled)",
|
|
1845
1841
|
onClick: () => this.setState({ ...this.state, selectRangeType: "range" }),
|
|
1846
1842
|
style: { width: "36px", height: "36px", marginRight: 2 },
|
|
1847
|
-
children: /* @__PURE__ */ n(
|
|
1843
|
+
children: /* @__PURE__ */ n(lt, { size: "1.4rem" })
|
|
1848
1844
|
}
|
|
1849
1845
|
) }),
|
|
1850
1846
|
/* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: `${m().t("archbase:Mês")}`, children: /* @__PURE__ */ n(
|
|
1851
|
-
|
|
1847
|
+
F,
|
|
1852
1848
|
{
|
|
1853
1849
|
variant: this.props.variant,
|
|
1854
1850
|
size: "lg",
|
|
1855
1851
|
color: "var(--mantine-primary-color-filled)",
|
|
1856
1852
|
onClick: () => this.setState({ ...this.state, selectRangeType: "month" }),
|
|
1857
1853
|
style: { width: "36px", height: "36px", marginRight: 2 },
|
|
1858
|
-
children: /* @__PURE__ */ n(
|
|
1854
|
+
children: /* @__PURE__ */ n(ot, { size: "1.4rem" })
|
|
1859
1855
|
}
|
|
1860
1856
|
) }),
|
|
1861
1857
|
/* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: `${m().t("archbase:Semana")}`, children: /* @__PURE__ */ n(
|
|
1862
|
-
|
|
1858
|
+
F,
|
|
1863
1859
|
{
|
|
1864
1860
|
variant: this.props.variant,
|
|
1865
1861
|
size: "lg",
|
|
1866
1862
|
color: "var(--mantine-primary-color-filled)",
|
|
1867
1863
|
onClick: () => this.setState({ ...this.state, selectRangeType: "week" }),
|
|
1868
1864
|
style: { width: "36px", height: "36px", marginRight: 2 },
|
|
1869
|
-
children: /* @__PURE__ */ n(
|
|
1865
|
+
children: /* @__PURE__ */ n(dt, { size: "1.4rem" })
|
|
1870
1866
|
}
|
|
1871
1867
|
) }),
|
|
1872
1868
|
/* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: `${m().t("archbase:Dia")}`, children: /* @__PURE__ */ n(
|
|
1873
|
-
|
|
1869
|
+
F,
|
|
1874
1870
|
{
|
|
1875
1871
|
variant: this.props.variant,
|
|
1876
1872
|
size: "lg",
|
|
1877
1873
|
color: "var(--mantine-primary-color-filled)",
|
|
1878
1874
|
onClick: () => this.setState({ ...this.state, selectRangeType: "day" }),
|
|
1879
1875
|
style: { width: "36px", height: "36px", marginRight: 2 },
|
|
1880
|
-
children: /* @__PURE__ */ n(
|
|
1876
|
+
children: /* @__PURE__ */ n(ze, { size: "1.4rem" })
|
|
1881
1877
|
}
|
|
1882
1878
|
) })
|
|
1883
1879
|
] }),
|
|
@@ -1890,7 +1886,7 @@ class Yt extends v {
|
|
|
1890
1886
|
children: "Aplicar"
|
|
1891
1887
|
}
|
|
1892
1888
|
),
|
|
1893
|
-
/* @__PURE__ */ n(
|
|
1889
|
+
/* @__PURE__ */ n(E, { w: "sm" }),
|
|
1894
1890
|
/* @__PURE__ */ n(w, { variant: this.props.variant, color: "red", onClick: this.props.onCancelSelectRange, children: "Cancela" })
|
|
1895
1891
|
] })
|
|
1896
1892
|
]
|
|
@@ -1901,7 +1897,7 @@ class Yt extends v {
|
|
|
1901
1897
|
this.props.key
|
|
1902
1898
|
);
|
|
1903
1899
|
}
|
|
1904
|
-
const
|
|
1900
|
+
const J = ({
|
|
1905
1901
|
onActionSearchExecute: d,
|
|
1906
1902
|
icon: e,
|
|
1907
1903
|
disabled: t,
|
|
@@ -1914,50 +1910,50 @@ const H = ({
|
|
|
1914
1910
|
keyProp: o,
|
|
1915
1911
|
readOnly: c,
|
|
1916
1912
|
innerRef: u,
|
|
1917
|
-
onFocus:
|
|
1913
|
+
onFocus: g,
|
|
1918
1914
|
onKeyDown: b,
|
|
1919
|
-
tooltipIconSearch:
|
|
1920
|
-
variant:
|
|
1915
|
+
tooltipIconSearch: T = "Clique aqui para Localizar",
|
|
1916
|
+
variant: L = "filled"
|
|
1921
1917
|
}) => {
|
|
1922
|
-
const [
|
|
1918
|
+
const [V, K] = $(s), [G] = Ue(V, 500), Q = Ae(!1), B = Pe(), { colorScheme: X } = Be();
|
|
1923
1919
|
return ge(() => {
|
|
1924
|
-
|
|
1920
|
+
K(s);
|
|
1925
1921
|
}, [s]), ge(() => {
|
|
1926
|
-
|
|
1927
|
-
}, [
|
|
1928
|
-
|
|
1922
|
+
G !== s && Q.current && a(G), Q.current = !1;
|
|
1923
|
+
}, [G, s, a]), /* @__PURE__ */ n(
|
|
1924
|
+
qe,
|
|
1929
1925
|
{
|
|
1930
1926
|
label: i,
|
|
1931
1927
|
error: r,
|
|
1932
|
-
value:
|
|
1928
|
+
value: V,
|
|
1933
1929
|
ref: u,
|
|
1934
1930
|
w: "100%",
|
|
1935
1931
|
readOnly: c,
|
|
1936
|
-
onFocus:
|
|
1932
|
+
onFocus: g,
|
|
1937
1933
|
onKeyDown: b,
|
|
1938
1934
|
placeholder: h,
|
|
1939
1935
|
style: l,
|
|
1940
1936
|
disabled: t,
|
|
1941
|
-
rightSection: d ? /* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label:
|
|
1942
|
-
|
|
1937
|
+
rightSection: d ? /* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: T, children: /* @__PURE__ */ n(
|
|
1938
|
+
F,
|
|
1943
1939
|
{
|
|
1944
1940
|
style: {
|
|
1945
|
-
backgroundColor:
|
|
1941
|
+
backgroundColor: L === "filled" ? X === "dark" ? B.colors[B.primaryColor][5] : B.colors[B.primaryColor][6] : void 0
|
|
1946
1942
|
},
|
|
1947
1943
|
tabIndex: -1,
|
|
1948
|
-
variant:
|
|
1944
|
+
variant: L,
|
|
1949
1945
|
onClick: d,
|
|
1950
1946
|
children: e
|
|
1951
1947
|
}
|
|
1952
1948
|
) }) : null,
|
|
1953
|
-
onChange: (
|
|
1954
|
-
|
|
1949
|
+
onChange: (D) => {
|
|
1950
|
+
K(D.target.value), Q.current = !0;
|
|
1955
1951
|
}
|
|
1956
1952
|
},
|
|
1957
1953
|
o
|
|
1958
1954
|
);
|
|
1959
1955
|
};
|
|
1960
|
-
class
|
|
1956
|
+
class Ri extends v {
|
|
1961
1957
|
static defaultProps = {
|
|
1962
1958
|
showClearButton: !0,
|
|
1963
1959
|
showToggleButton: !0,
|
|
@@ -1978,7 +1974,7 @@ class Bi extends v {
|
|
|
1978
1974
|
// declare context: React.ContextType<typeof ArchbaseAppContext>;
|
|
1979
1975
|
constructor(e) {
|
|
1980
1976
|
super(e), this.refEdit = y.createRef(), this.toggleFilterButtonRef = y.createRef(), this.state = {
|
|
1981
|
-
currentFilter: this.props.currentFilter ? this.props.currentFilter :
|
|
1977
|
+
currentFilter: this.props.currentFilter ? this.props.currentFilter : N(e, O),
|
|
1982
1978
|
modalOpen: "",
|
|
1983
1979
|
modalSearchField: "",
|
|
1984
1980
|
isOpenSelectRange: !1,
|
|
@@ -1991,7 +1987,7 @@ class Bi extends v {
|
|
|
1991
1987
|
shouldComponentUpdate = (e, t) => oe(this, e, t);
|
|
1992
1988
|
UNSAFE_componentWillReceiveProps = (e) => {
|
|
1993
1989
|
let t = e.currentFilter, i = e.activeFilterIndex;
|
|
1994
|
-
t || (e.persistenceDelegator && e.persistenceDelegator.getFilters().length > 0 ? (t = JSON.parse(e.persistenceDelegator.getFirstFilter().filter), i = 0) : (t =
|
|
1990
|
+
t || (e.persistenceDelegator && e.persistenceDelegator.getFilters().length > 0 ? (t = JSON.parse(e.persistenceDelegator.getFirstFilter().filter), i = 0) : (t = N(e, O), i = S)), this.setState({
|
|
1995
1991
|
...this.state,
|
|
1996
1992
|
currentFilter: t,
|
|
1997
1993
|
modalOpen: "",
|
|
@@ -2015,10 +2011,10 @@ class Bi extends v {
|
|
|
2015
2011
|
isOpenSelectFields: !1
|
|
2016
2012
|
},
|
|
2017
2013
|
() => {
|
|
2018
|
-
if (!this.state.currentFilter || this.state.currentFilter.filter.filterType ===
|
|
2014
|
+
if (!this.state.currentFilter || this.state.currentFilter.filter.filterType === O) {
|
|
2019
2015
|
const t = this.props.persistenceDelegator.getFirstFilter();
|
|
2020
2016
|
if (t) {
|
|
2021
|
-
const i = t.filter ? JSON.parse(t.filter) :
|
|
2017
|
+
const i = t.filter ? JSON.parse(t.filter) : H();
|
|
2022
2018
|
this.onChangeSelectedFilter(i, 0);
|
|
2023
2019
|
} else
|
|
2024
2020
|
this.addNewFilter();
|
|
@@ -2028,7 +2024,7 @@ class Bi extends v {
|
|
|
2028
2024
|
};
|
|
2029
2025
|
clearFilter = () => {
|
|
2030
2026
|
this.props.onToggleExpandedFilter && this.props.onToggleExpandedFilter(!1);
|
|
2031
|
-
const e =
|
|
2027
|
+
const e = N(this.props, O);
|
|
2032
2028
|
this.setState(
|
|
2033
2029
|
{
|
|
2034
2030
|
...this.state,
|
|
@@ -2051,7 +2047,7 @@ class Bi extends v {
|
|
|
2051
2047
|
};
|
|
2052
2048
|
changeQuickFilter = (e) => {
|
|
2053
2049
|
let t = this.state.currentFilter;
|
|
2054
|
-
t && t.filter && t.filter.filterType !==
|
|
2050
|
+
t && t.filter && t.filter.filterType !== O && (t = N(this.props, O)), t.filter.quickFilterText = e, t.filter.quickFilterFieldsText = P(t, I(this.props)), this.setState({
|
|
2055
2051
|
...this.state,
|
|
2056
2052
|
currentFilter: t,
|
|
2057
2053
|
expandedFilter: !1,
|
|
@@ -2103,17 +2099,17 @@ class Bi extends v {
|
|
|
2103
2099
|
}
|
|
2104
2100
|
};
|
|
2105
2101
|
onSaveFilter = (e) => {
|
|
2106
|
-
e === "mnuItemSalvar" && this.state.currentFilter && this.state.currentFilter.id && this.state.currentFilter.id !== S && this.state.currentFilter.id !== Z ?
|
|
2102
|
+
e === "mnuItemSalvar" && this.state.currentFilter && this.state.currentFilter.id && this.state.currentFilter.id !== S && this.state.currentFilter.id !== Z ? A.showConfirmDialogYesNo(
|
|
2107
2103
|
`${m().t("archbase:Confirme")}`,
|
|
2108
2104
|
`${m().t("archbase:Deseja salvar o Filtro ?")}`,
|
|
2109
2105
|
() => {
|
|
2110
2106
|
const t = this.state.currentFilter;
|
|
2111
|
-
t.filter.quickFilterFieldsText =
|
|
2107
|
+
t.filter.quickFilterFieldsText = P(t, I(this.props));
|
|
2112
2108
|
const i = this.props.persistenceDelegator.getFilterById(
|
|
2113
2109
|
t.id
|
|
2114
2110
|
);
|
|
2115
2111
|
i && (i.setFilter(t), this.props.persistenceDelegator.saveFilter(i, (r) => {
|
|
2116
|
-
r &&
|
|
2112
|
+
r && A.showErrorWithDetails(
|
|
2117
2113
|
`${m().t("archbase:Warning")}`,
|
|
2118
2114
|
he(r),
|
|
2119
2115
|
ce(r)
|
|
@@ -2122,17 +2118,17 @@ class Bi extends v {
|
|
|
2122
2118
|
},
|
|
2123
2119
|
() => {
|
|
2124
2120
|
}
|
|
2125
|
-
) : (e === "mnuItemSalvar" || e === "mnuItemSalvarComo") && this.state.currentFilter && (this.inputValue = "",
|
|
2121
|
+
) : (e === "mnuItemSalvar" || e === "mnuItemSalvarComo") && this.state.currentFilter && (this.inputValue = "", A.showInputDialog(
|
|
2126
2122
|
`${m().t("archbase:Salvar como...")}`,
|
|
2127
2123
|
`${m().t("archbase:Informe um nome para o fitro...")}`,
|
|
2128
2124
|
`${m().t("archbase:Confirme")}`,
|
|
2129
2125
|
(t) => this.inputValue = t.target.value,
|
|
2130
2126
|
() => {
|
|
2131
2127
|
const t = this.state.currentFilter;
|
|
2132
|
-
t.filter.quickFilterFieldsText =
|
|
2128
|
+
t.filter.quickFilterFieldsText = P(t, I(this.props));
|
|
2133
2129
|
const i = ne.createInstanceWithValues({
|
|
2134
2130
|
filter: t,
|
|
2135
|
-
id:
|
|
2131
|
+
id: wt(),
|
|
2136
2132
|
name: this.inputValue,
|
|
2137
2133
|
componentName: this.props.id,
|
|
2138
2134
|
userName: this.props.userName,
|
|
@@ -2141,7 +2137,7 @@ class Bi extends v {
|
|
|
2141
2137
|
isNewFilter: !0
|
|
2142
2138
|
});
|
|
2143
2139
|
this.props.persistenceDelegator.addNewFilter(i, (r, s) => {
|
|
2144
|
-
r ?
|
|
2140
|
+
r ? A.showErrorWithDetails(
|
|
2145
2141
|
`${m().t("archbase:Warning")}`,
|
|
2146
2142
|
he(r),
|
|
2147
2143
|
ce(r)
|
|
@@ -2158,7 +2154,7 @@ class Bi extends v {
|
|
|
2158
2154
|
};
|
|
2159
2155
|
onChangeFilterType = (e) => {
|
|
2160
2156
|
const t = this.state.currentFilter;
|
|
2161
|
-
t.filter.filterType = e === 0 ? ee : se, t.filter.quickFilterFieldsText =
|
|
2157
|
+
t.filter.filterType = e === 0 ? ee : se, t.filter.quickFilterFieldsText = P(t, I(this.props)), this.setState({ ...this.state, currentFilter: t, update: Math.random() }), this.props.onFilterChanged && this.props.onFilterChanged(t, this.state.activeFilterIndex);
|
|
2162
2158
|
};
|
|
2163
2159
|
onChangeSelectedFilter = (e, t) => {
|
|
2164
2160
|
this.props.onSelectedFilter && this.props.onSelectedFilter(e, t);
|
|
@@ -2174,7 +2170,7 @@ class Bi extends v {
|
|
|
2174
2170
|
});
|
|
2175
2171
|
};
|
|
2176
2172
|
addNewFilter = () => {
|
|
2177
|
-
const e =
|
|
2173
|
+
const e = N(this.props, ee);
|
|
2178
2174
|
this.setState({
|
|
2179
2175
|
...this.state,
|
|
2180
2176
|
currentFilter: e,
|
|
@@ -2185,14 +2181,14 @@ class Bi extends v {
|
|
|
2185
2181
|
e === "new" ? this.addNewFilter() : e === "remove" ? this.removeFilter() : e === "apply" ? this.onSearchClick() : e === "close" && this.onCloseFilterClick();
|
|
2186
2182
|
};
|
|
2187
2183
|
removeFilter = () => {
|
|
2188
|
-
|
|
2184
|
+
A.showConfirmDialogYesNo(
|
|
2189
2185
|
`${m().t("archbase:Confirme")}`,
|
|
2190
2186
|
`${m().t("archbase:Deseja remover o Filtro ?")}`,
|
|
2191
2187
|
() => {
|
|
2192
2188
|
const e = this.state.currentFilter, t = this.props.persistenceDelegator.getFilterById(e.id);
|
|
2193
2189
|
t && this.props.persistenceDelegator.removeFilterBy(t, (i) => {
|
|
2194
2190
|
if (i && i !== null)
|
|
2195
|
-
|
|
2191
|
+
A.showErrorWithDetails(
|
|
2196
2192
|
`${m().t("archbase:Warning")}`,
|
|
2197
2193
|
he(i),
|
|
2198
2194
|
ce(i)
|
|
@@ -2200,7 +2196,7 @@ class Bi extends v {
|
|
|
2200
2196
|
else {
|
|
2201
2197
|
const r = this.props.persistenceDelegator.getFirstFilter();
|
|
2202
2198
|
if (r) {
|
|
2203
|
-
const s =
|
|
2199
|
+
const s = H();
|
|
2204
2200
|
s.id = r.id, s.name = r.name, s.viewName = r.viewName, s.filter = JSON.parse(r.filter || ""), this.onChangeSelectedFilter(s, 0);
|
|
2205
2201
|
} else
|
|
2206
2202
|
this.addNewFilter();
|
|
@@ -2262,8 +2258,8 @@ class Bi extends v {
|
|
|
2262
2258
|
onConfirmSelectRange = (e, t) => {
|
|
2263
2259
|
let i = "";
|
|
2264
2260
|
if (t === "month") {
|
|
2265
|
-
const s = e[0].toString(), a = new
|
|
2266
|
-
date:
|
|
2261
|
+
const s = e[0].toString(), a = new yt({
|
|
2262
|
+
date: St(e[1].toDate()),
|
|
2267
2263
|
format: "DD/MM/YYYY"
|
|
2268
2264
|
}).toString();
|
|
2269
2265
|
i = `${s}:${a}`;
|
|
@@ -2277,7 +2273,7 @@ class Bi extends v {
|
|
|
2277
2273
|
});
|
|
2278
2274
|
}
|
|
2279
2275
|
let r = this.state.currentFilter;
|
|
2280
|
-
r && r.filter && r.filter.filterType !==
|
|
2276
|
+
r && r.filter && r.filter.filterType !== O && (r = N(this.props, O)), r.filter.quickFilterText = i, r.filter.quickFilterFieldsText = P(r, I(this.props)), this.setState(
|
|
2281
2277
|
{
|
|
2282
2278
|
...this.state,
|
|
2283
2279
|
currentFilter: r,
|
|
@@ -2317,7 +2313,7 @@ class Bi extends v {
|
|
|
2317
2313
|
};
|
|
2318
2314
|
onConfirmSelectFields = (e, t, i) => {
|
|
2319
2315
|
let r = this.state.currentFilter;
|
|
2320
|
-
r && r.filter && r.filter.filterType !==
|
|
2316
|
+
r && r.filter && r.filter.filterType !== O && (r = N(this.props, O)), r.filter.selectedFields = e, r.filter.quickFilterFieldsText = P(r, I(this.props)), r.sort.sortFields = t, r.sort.activeIndex = i, r.sort.quickFilterSort = this.getSortString(r), this.setState(
|
|
2321
2317
|
{
|
|
2322
2318
|
...this.state,
|
|
2323
2319
|
isOpenSelectFields: !1,
|
|
@@ -2450,7 +2446,7 @@ class Bi extends v {
|
|
|
2450
2446
|
children: [
|
|
2451
2447
|
/* @__PURE__ */ p("div", { style: { display: "flex", width: "100%" }, children: [
|
|
2452
2448
|
/* @__PURE__ */ n(
|
|
2453
|
-
|
|
2449
|
+
J,
|
|
2454
2450
|
{
|
|
2455
2451
|
onChange: (s) => this.onChangeQuickFilter(s),
|
|
2456
2452
|
innerRef: this.refEdit,
|
|
@@ -2494,7 +2490,7 @@ class Bi extends v {
|
|
|
2494
2490
|
)
|
|
2495
2491
|
] }),
|
|
2496
2492
|
/* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: "Filtrar", children: /* @__PURE__ */ n(
|
|
2497
|
-
|
|
2493
|
+
F,
|
|
2498
2494
|
{
|
|
2499
2495
|
variant: this.props.variant,
|
|
2500
2496
|
size: "lg",
|
|
@@ -2507,7 +2503,7 @@ class Bi extends v {
|
|
|
2507
2503
|
}
|
|
2508
2504
|
) }),
|
|
2509
2505
|
this.props.showClearButton ? /* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: "Limpar filtro", children: /* @__PURE__ */ n(
|
|
2510
|
-
|
|
2506
|
+
F,
|
|
2511
2507
|
{
|
|
2512
2508
|
variant: this.props.variant,
|
|
2513
2509
|
size: "lg",
|
|
@@ -2516,11 +2512,11 @@ class Bi extends v {
|
|
|
2516
2512
|
onClick: () => {
|
|
2517
2513
|
this.clearFilter();
|
|
2518
2514
|
},
|
|
2519
|
-
children: /* @__PURE__ */ n(
|
|
2515
|
+
children: /* @__PURE__ */ n(ht, { size: "1.4rem" })
|
|
2520
2516
|
}
|
|
2521
2517
|
) }) : null,
|
|
2522
2518
|
/* @__PURE__ */ p(
|
|
2523
|
-
|
|
2519
|
+
_,
|
|
2524
2520
|
{
|
|
2525
2521
|
width: this.props.width,
|
|
2526
2522
|
position: "bottom-end",
|
|
@@ -2530,19 +2526,19 @@ class Bi extends v {
|
|
|
2530
2526
|
opened: this.state.modalOpen === "selectDate",
|
|
2531
2527
|
withinPortal: !0,
|
|
2532
2528
|
children: [
|
|
2533
|
-
/* @__PURE__ */ n(
|
|
2534
|
-
|
|
2529
|
+
/* @__PURE__ */ n(_.Target, { children: /* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: `${m().t("archbase:Selecionar período")}`, children: /* @__PURE__ */ n(
|
|
2530
|
+
F,
|
|
2535
2531
|
{
|
|
2536
2532
|
variant: this.props.variant,
|
|
2537
2533
|
size: "lg",
|
|
2538
2534
|
color: "var(--mantine-primary-color-filled)",
|
|
2539
2535
|
onClick: () => this.setState({ ...this.state, modalOpen: "selectDate" }),
|
|
2540
2536
|
style: { width: "36px", height: "36px", marginRight: 2 },
|
|
2541
|
-
children: /* @__PURE__ */ n(
|
|
2537
|
+
children: /* @__PURE__ */ n(ze, { size: "1.4rem" })
|
|
2542
2538
|
}
|
|
2543
2539
|
) }) }),
|
|
2544
|
-
/* @__PURE__ */ n(
|
|
2545
|
-
|
|
2540
|
+
/* @__PURE__ */ n(_.Dropdown, { children: /* @__PURE__ */ n(
|
|
2541
|
+
$t,
|
|
2546
2542
|
{
|
|
2547
2543
|
selectRangeType: this.state.selectRangeType,
|
|
2548
2544
|
onConfirmSelectRange: this.onConfirmSelectRange,
|
|
@@ -2555,7 +2551,7 @@ class Bi extends v {
|
|
|
2555
2551
|
}
|
|
2556
2552
|
),
|
|
2557
2553
|
/* @__PURE__ */ p(
|
|
2558
|
-
|
|
2554
|
+
_,
|
|
2559
2555
|
{
|
|
2560
2556
|
width: this.props.width,
|
|
2561
2557
|
position: "bottom-end",
|
|
@@ -2565,8 +2561,8 @@ class Bi extends v {
|
|
|
2565
2561
|
onClose: () => this.setState({ ...this.state, isOpenSelectFields: !1 }),
|
|
2566
2562
|
withinPortal: !0,
|
|
2567
2563
|
children: [
|
|
2568
|
-
/* @__PURE__ */ n(
|
|
2569
|
-
|
|
2564
|
+
/* @__PURE__ */ n(_.Target, { children: /* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: `${m().t("archbase:Selecionar campos filtro rápido")}`, children: /* @__PURE__ */ n(
|
|
2565
|
+
F,
|
|
2570
2566
|
{
|
|
2571
2567
|
variant: this.props.variant,
|
|
2572
2568
|
size: "lg",
|
|
@@ -2575,13 +2571,13 @@ class Bi extends v {
|
|
|
2575
2571
|
this.selectFields();
|
|
2576
2572
|
},
|
|
2577
2573
|
style: { width: "36px", height: "36px", marginRight: 2 },
|
|
2578
|
-
children: /* @__PURE__ */ n(
|
|
2574
|
+
children: /* @__PURE__ */ n(ct, { size: "1.4rem" })
|
|
2579
2575
|
}
|
|
2580
2576
|
) }) }),
|
|
2581
|
-
/* @__PURE__ */ n(
|
|
2582
|
-
|
|
2577
|
+
/* @__PURE__ */ n(_.Dropdown, { children: /* @__PURE__ */ n(
|
|
2578
|
+
Vt,
|
|
2583
2579
|
{
|
|
2584
|
-
id: `filrsep${
|
|
2580
|
+
id: `filrsep${j()}`,
|
|
2585
2581
|
currentFilter: this.state.currentFilter,
|
|
2586
2582
|
selectedOptions: this.state.currentFilter.filter.selectedFields || [],
|
|
2587
2583
|
sort: this.state.currentFilter.sort.sortFields || [],
|
|
@@ -2591,13 +2587,13 @@ class Bi extends v {
|
|
|
2591
2587
|
width: `calc(${this.props.width} - 2rem)`,
|
|
2592
2588
|
variant: this.props.variant
|
|
2593
2589
|
},
|
|
2594
|
-
`kfilrsep${
|
|
2590
|
+
`kfilrsep${j()}`
|
|
2595
2591
|
) })
|
|
2596
2592
|
]
|
|
2597
2593
|
}
|
|
2598
2594
|
),
|
|
2599
2595
|
this.props.showToggleButton ? /* @__PURE__ */ p(
|
|
2600
|
-
|
|
2596
|
+
_,
|
|
2601
2597
|
{
|
|
2602
2598
|
width: this.props.detailsWidth,
|
|
2603
2599
|
position: "bottom-end",
|
|
@@ -2607,8 +2603,8 @@ class Bi extends v {
|
|
|
2607
2603
|
zIndex: 199,
|
|
2608
2604
|
withinPortal: !0,
|
|
2609
2605
|
children: [
|
|
2610
|
-
/* @__PURE__ */ n(
|
|
2611
|
-
|
|
2606
|
+
/* @__PURE__ */ n(_.Target, { children: /* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: `${m().t("archbase:Filtro avançado")}`, children: /* @__PURE__ */ n(
|
|
2607
|
+
F,
|
|
2612
2608
|
{
|
|
2613
2609
|
variant: this.props.variant,
|
|
2614
2610
|
ref: this.toggleFilterButtonRef,
|
|
@@ -2618,11 +2614,11 @@ class Bi extends v {
|
|
|
2618
2614
|
this.toggleExpandedFilter();
|
|
2619
2615
|
},
|
|
2620
2616
|
style: { width: "36px", height: "36px", marginRight: 2 },
|
|
2621
|
-
children: /* @__PURE__ */ n(
|
|
2617
|
+
children: /* @__PURE__ */ n(pt, { size: "1.4rem" })
|
|
2622
2618
|
}
|
|
2623
2619
|
) }) }),
|
|
2624
|
-
/* @__PURE__ */ n(
|
|
2625
|
-
|
|
2620
|
+
/* @__PURE__ */ n(_.Dropdown, { children: /* @__PURE__ */ n(
|
|
2621
|
+
At,
|
|
2626
2622
|
{
|
|
2627
2623
|
update: this.state.update,
|
|
2628
2624
|
currentFilter: this.state.currentFilter,
|
|
@@ -2646,7 +2642,7 @@ class Bi extends v {
|
|
|
2646
2642
|
}
|
|
2647
2643
|
) : null,
|
|
2648
2644
|
this.props.showExportButton ? /* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: "Exportar", children: /* @__PURE__ */ n(
|
|
2649
|
-
|
|
2645
|
+
F,
|
|
2650
2646
|
{
|
|
2651
2647
|
variant: this.props.variant,
|
|
2652
2648
|
size: "lg",
|
|
@@ -2655,11 +2651,11 @@ class Bi extends v {
|
|
|
2655
2651
|
onClick: () => {
|
|
2656
2652
|
this.props.onExport && this.props.onExport();
|
|
2657
2653
|
},
|
|
2658
|
-
children: /* @__PURE__ */ n(
|
|
2654
|
+
children: /* @__PURE__ */ n(ut, { size: "1.4rem" })
|
|
2659
2655
|
}
|
|
2660
2656
|
) }) : null,
|
|
2661
2657
|
this.props.showPrintButton ? /* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: "Imprimir", children: /* @__PURE__ */ n(
|
|
2662
|
-
|
|
2658
|
+
F,
|
|
2663
2659
|
{
|
|
2664
2660
|
variant: this.props.variant,
|
|
2665
2661
|
size: "lg",
|
|
@@ -2668,7 +2664,7 @@ class Bi extends v {
|
|
|
2668
2664
|
onClick: () => {
|
|
2669
2665
|
this.props.onPrint && this.props.onPrint();
|
|
2670
2666
|
},
|
|
2671
|
-
children: /* @__PURE__ */ n(
|
|
2667
|
+
children: /* @__PURE__ */ n(mt, { size: "1.4rem" })
|
|
2672
2668
|
}
|
|
2673
2669
|
) }) : null
|
|
2674
2670
|
]
|
|
@@ -2680,7 +2676,7 @@ class Bi extends v {
|
|
|
2680
2676
|
);
|
|
2681
2677
|
};
|
|
2682
2678
|
}
|
|
2683
|
-
class
|
|
2679
|
+
class Mt extends v {
|
|
2684
2680
|
static defaultProps = {
|
|
2685
2681
|
operators: [
|
|
2686
2682
|
{
|
|
@@ -2776,7 +2772,7 @@ class Ht extends v {
|
|
|
2776
2772
|
constructor(e) {
|
|
2777
2773
|
super(e), this.state = {
|
|
2778
2774
|
modalOpen: "",
|
|
2779
|
-
currentFilter: e.currentFilter ? e.currentFilter :
|
|
2775
|
+
currentFilter: e.currentFilter ? e.currentFilter : H(),
|
|
2780
2776
|
activeFilterIndex: e.currentFilter ? e.activeFilterIndex : -1,
|
|
2781
2777
|
schema: this.createSchema(),
|
|
2782
2778
|
// 🔄 MIGRAÇÃO V1/V2: Inicializar contador de forceUpdate
|
|
@@ -2786,14 +2782,14 @@ class Ht extends v {
|
|
|
2786
2782
|
shouldComponentUpdate = (e, t) => oe(this, e, t);
|
|
2787
2783
|
// 🔄 MIGRAÇÃO V1/V2: Helper para criar DataSource com compatibilidade
|
|
2788
2784
|
createCompatibleDataSource = (e) => {
|
|
2789
|
-
const t = new
|
|
2785
|
+
const t = new Y("dsSortFields", {
|
|
2790
2786
|
records: e,
|
|
2791
2787
|
grandTotalRecords: e.length,
|
|
2792
2788
|
currentPage: 0,
|
|
2793
2789
|
totalPages: 0,
|
|
2794
2790
|
pageSize: 999999
|
|
2795
2791
|
});
|
|
2796
|
-
return
|
|
2792
|
+
return U(t) !== "V2" && this.setState({
|
|
2797
2793
|
...this.state,
|
|
2798
2794
|
forceUpdateCounter: this.state.forceUpdateCounter + 1
|
|
2799
2795
|
}), t;
|
|
@@ -2812,14 +2808,14 @@ class Ht extends v {
|
|
|
2812
2808
|
};
|
|
2813
2809
|
UNSAFE_componentWillReceiveProps = (e) => {
|
|
2814
2810
|
let t = e.currentFilter, i = e.activeFilterIndex;
|
|
2815
|
-
(!t || !t.hasOwnProperty("filter")) && (t =
|
|
2811
|
+
(!t || !t.hasOwnProperty("filter")) && (t = N(e, se), i = -1), this.setState({
|
|
2816
2812
|
...this.state,
|
|
2817
2813
|
currentFilter: t,
|
|
2818
2814
|
activeFilterIndex: i
|
|
2819
2815
|
});
|
|
2820
2816
|
};
|
|
2821
2817
|
createRuleGroup = () => ({
|
|
2822
|
-
id: `g-${
|
|
2818
|
+
id: `g-${j()}`,
|
|
2823
2819
|
rules: [],
|
|
2824
2820
|
condition: this.props.conditions[0].name
|
|
2825
2821
|
});
|
|
@@ -2978,7 +2974,7 @@ class Ht extends v {
|
|
|
2978
2974
|
createRule = () => {
|
|
2979
2975
|
const { operators: e } = this.state.schema, t = this.getFields(this.props);
|
|
2980
2976
|
return {
|
|
2981
|
-
id: `r-${
|
|
2977
|
+
id: `r-${j()}`,
|
|
2982
2978
|
field: t[0].name,
|
|
2983
2979
|
fieldSql: t[0].nameSql,
|
|
2984
2980
|
dataType: t[0].dataType,
|
|
@@ -3086,7 +3082,7 @@ class Ht extends v {
|
|
|
3086
3082
|
overflowX: "hidden"
|
|
3087
3083
|
},
|
|
3088
3084
|
children: [
|
|
3089
|
-
/* @__PURE__ */ n("div", { style: { width: this.props.width, overflow: "hidden" }, children: /* @__PURE__ */ n(
|
|
3085
|
+
/* @__PURE__ */ n("div", { style: { width: this.props.width, overflow: "hidden" }, children: /* @__PURE__ */ n(R, { children: /* @__PURE__ */ n(R.Col, { span: 12, children: /* @__PURE__ */ n(
|
|
3090
3086
|
xe,
|
|
3091
3087
|
{
|
|
3092
3088
|
rules: this.state.currentFilter.filter.rules,
|
|
@@ -3098,18 +3094,18 @@ class Ht extends v {
|
|
|
3098
3094
|
variant: this.props.variant
|
|
3099
3095
|
}
|
|
3100
3096
|
) }) }) }),
|
|
3101
|
-
this.props.allowSort === !0 ? /* @__PURE__ */ n(
|
|
3097
|
+
this.props.allowSort === !0 ? /* @__PURE__ */ n(R, { children: /* @__PURE__ */ n(R.Col, { span: 12, style: { padding: 13 }, children: /* @__PURE__ */ n(
|
|
3102
3098
|
"div",
|
|
3103
3099
|
{
|
|
3104
3100
|
style: {
|
|
3105
3101
|
height: "auto"
|
|
3106
3102
|
},
|
|
3107
3103
|
children: /* @__PURE__ */ p(re, { withBorder: !0, shadow: "sm", radius: "md", children: [
|
|
3108
|
-
/* @__PURE__ */ n(re.Section, { withBorder: !0, inheritPadding: !0, py: "xs", children: /* @__PURE__ */ p(
|
|
3109
|
-
/* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: "Para baixo", children: /* @__PURE__ */ n(
|
|
3110
|
-
/* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: "Para cima", children: /* @__PURE__ */ n(
|
|
3104
|
+
/* @__PURE__ */ n(re.Section, { withBorder: !0, inheritPadding: !0, py: "xs", children: /* @__PURE__ */ p(M, { children: [
|
|
3105
|
+
/* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: "Para baixo", children: /* @__PURE__ */ n(F, { id: "btnFilterSortDown", onClick: this.onSortDown, children: /* @__PURE__ */ n(ve, {}) }) }),
|
|
3106
|
+
/* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: "Para cima", children: /* @__PURE__ */ n(F, { id: "btnFilterSortUp", onClick: this.onSortUp, children: /* @__PURE__ */ n(Se, {}) }) }),
|
|
3111
3107
|
/* @__PURE__ */ n(x, { children: "Ordenação" }),
|
|
3112
|
-
/* @__PURE__ */ n(
|
|
3108
|
+
/* @__PURE__ */ n(E, { w: "md" }),
|
|
3113
3109
|
/* @__PURE__ */ n(
|
|
3114
3110
|
x,
|
|
3115
3111
|
{
|
|
@@ -3123,7 +3119,7 @@ class Ht extends v {
|
|
|
3123
3119
|
whiteSpace: "normal",
|
|
3124
3120
|
fontSize: "12px"
|
|
3125
3121
|
},
|
|
3126
|
-
children:
|
|
3122
|
+
children: Ye(this.state.currentFilter)
|
|
3127
3123
|
},
|
|
3128
3124
|
"txto_9899"
|
|
3129
3125
|
)
|
|
@@ -3225,7 +3221,7 @@ class we extends v {
|
|
|
3225
3221
|
onClick: this.onClick,
|
|
3226
3222
|
children: [
|
|
3227
3223
|
/* @__PURE__ */ n(
|
|
3228
|
-
|
|
3224
|
+
z,
|
|
3229
3225
|
{
|
|
3230
3226
|
label: /* @__PURE__ */ n(x, { color: i, children: m().t(this.props.recordData.label) }),
|
|
3231
3227
|
checked: this.state.selected,
|
|
@@ -3234,15 +3230,15 @@ class we extends v {
|
|
|
3234
3230
|
}
|
|
3235
3231
|
),
|
|
3236
3232
|
/* @__PURE__ */ p("div", { style: { height: "100%", display: "flex", alignItems: "center" }, children: [
|
|
3237
|
-
/* @__PURE__ */ n(
|
|
3233
|
+
/* @__PURE__ */ n(E, { w: "md" }),
|
|
3238
3234
|
this.isAsc() ? /* @__PURE__ */ n(
|
|
3239
|
-
|
|
3235
|
+
ft,
|
|
3240
3236
|
{
|
|
3241
3237
|
style: { cursor: "pointer" },
|
|
3242
3238
|
onDoubleClick: this.onDoubleClick
|
|
3243
3239
|
}
|
|
3244
3240
|
) : /* @__PURE__ */ n(
|
|
3245
|
-
|
|
3241
|
+
gt,
|
|
3246
3242
|
{
|
|
3247
3243
|
style: { cursor: "pointer" },
|
|
3248
3244
|
onDoubleClick: this.onDoubleClick
|
|
@@ -3297,7 +3293,7 @@ class xe extends v {
|
|
|
3297
3293
|
},
|
|
3298
3294
|
children: [
|
|
3299
3295
|
/* @__PURE__ */ n(
|
|
3300
|
-
|
|
3296
|
+
Le,
|
|
3301
3297
|
{
|
|
3302
3298
|
size: "md",
|
|
3303
3299
|
color: "teal",
|
|
@@ -3307,7 +3303,7 @@ class xe extends v {
|
|
|
3307
3303
|
checked: t === "and"
|
|
3308
3304
|
}
|
|
3309
3305
|
),
|
|
3310
|
-
/* @__PURE__ */ n(
|
|
3306
|
+
/* @__PURE__ */ n(E, { w: "md" }),
|
|
3311
3307
|
/* @__PURE__ */ p(w.Group, { children: [
|
|
3312
3308
|
/* @__PURE__ */ n(
|
|
3313
3309
|
fe,
|
|
@@ -3358,7 +3354,7 @@ class xe extends v {
|
|
|
3358
3354
|
},
|
|
3359
3355
|
h.id
|
|
3360
3356
|
) : /* @__PURE__ */ n(
|
|
3361
|
-
|
|
3357
|
+
Wt,
|
|
3362
3358
|
{
|
|
3363
3359
|
id: h.id,
|
|
3364
3360
|
field: h.field,
|
|
@@ -3401,7 +3397,7 @@ class xe extends v {
|
|
|
3401
3397
|
e.preventDefault(), e.stopPropagation(), this.props.schema.onGroupRemove(this.props.id, this.props.parentId);
|
|
3402
3398
|
}
|
|
3403
3399
|
}
|
|
3404
|
-
class
|
|
3400
|
+
class Wt extends v {
|
|
3405
3401
|
static defaultProps = {
|
|
3406
3402
|
id: null,
|
|
3407
3403
|
parentId: null,
|
|
@@ -3449,22 +3445,22 @@ class Jt extends v {
|
|
|
3449
3445
|
onSearchButtonClick: a,
|
|
3450
3446
|
schema: { fields: l, getOperators: h, getLevel: o }
|
|
3451
3447
|
} = this.props;
|
|
3452
|
-
let c = this.getDataType(e, l), u = this.getSearchField(e, l),
|
|
3448
|
+
let c = this.getDataType(e, l), u = this.getSearchField(e, l), g = i === "between" && c !== "date" && c !== "date_time" && c !== "time";
|
|
3453
3449
|
var b = o(this.props.id);
|
|
3454
|
-
let
|
|
3455
|
-
const { colorScheme:
|
|
3450
|
+
let T = this.getFieldValues(e, l);
|
|
3451
|
+
const { colorScheme: L } = Be();
|
|
3456
3452
|
return /* @__PURE__ */ p("li", { className: "rule-container", children: [
|
|
3457
3453
|
/* @__PURE__ */ n(
|
|
3458
|
-
|
|
3454
|
+
z,
|
|
3459
3455
|
{
|
|
3460
3456
|
label: "",
|
|
3461
3457
|
checked: !t,
|
|
3462
3458
|
style: { cursor: "pointer" },
|
|
3463
|
-
onChange: (
|
|
3459
|
+
onChange: (V) => this.onDisabledChanged(V.currentTarget.checked)
|
|
3464
3460
|
}
|
|
3465
3461
|
),
|
|
3466
3462
|
/* @__PURE__ */ n(
|
|
3467
|
-
|
|
3463
|
+
De,
|
|
3468
3464
|
{
|
|
3469
3465
|
options: l,
|
|
3470
3466
|
value: e,
|
|
@@ -3476,7 +3472,7 @@ class Jt extends v {
|
|
|
3476
3472
|
}
|
|
3477
3473
|
),
|
|
3478
3474
|
/* @__PURE__ */ n(
|
|
3479
|
-
|
|
3475
|
+
De,
|
|
3480
3476
|
{
|
|
3481
3477
|
field: e,
|
|
3482
3478
|
options: h(e),
|
|
@@ -3488,42 +3484,42 @@ class Jt extends v {
|
|
|
3488
3484
|
}
|
|
3489
3485
|
),
|
|
3490
3486
|
/* @__PURE__ */ n(
|
|
3491
|
-
|
|
3487
|
+
_e,
|
|
3492
3488
|
{
|
|
3493
3489
|
field: e,
|
|
3494
3490
|
dataType: c,
|
|
3495
3491
|
operator: i,
|
|
3496
3492
|
value: r,
|
|
3497
3493
|
value2: s,
|
|
3498
|
-
listValues:
|
|
3494
|
+
listValues: T,
|
|
3499
3495
|
disabled: t,
|
|
3500
3496
|
searchField: u,
|
|
3501
3497
|
className: "rule-value",
|
|
3502
3498
|
handleOnChange: this.onValueChanged,
|
|
3503
3499
|
onSearchButtonClick: a,
|
|
3504
3500
|
level: b,
|
|
3505
|
-
twoFields:
|
|
3501
|
+
twoFields: g
|
|
3506
3502
|
}
|
|
3507
3503
|
),
|
|
3508
3504
|
" ",
|
|
3509
3505
|
i === "between" && c !== "date" && c !== "date_time" && c !== "time" ? /* @__PURE__ */ n(
|
|
3510
|
-
|
|
3506
|
+
_e,
|
|
3511
3507
|
{
|
|
3512
3508
|
field: e,
|
|
3513
3509
|
dataType: c,
|
|
3514
3510
|
operator: i,
|
|
3515
3511
|
value: s,
|
|
3516
|
-
listValues:
|
|
3512
|
+
listValues: T,
|
|
3517
3513
|
disabled: t,
|
|
3518
3514
|
searchField: u,
|
|
3519
3515
|
className: "rule-value",
|
|
3520
3516
|
handleOnChange: this.onValue2Changed,
|
|
3521
3517
|
onSearchButtonClick: a,
|
|
3522
3518
|
level: b,
|
|
3523
|
-
twoFields:
|
|
3519
|
+
twoFields: g
|
|
3524
3520
|
}
|
|
3525
3521
|
) : "",
|
|
3526
|
-
/* @__PURE__ */ n(
|
|
3522
|
+
/* @__PURE__ */ n(F, { id: `btnRemoveRule_${e}`, onClick: this.removeRule, children: /* @__PURE__ */ n(We, { color: "blue" }) })
|
|
3527
3523
|
] });
|
|
3528
3524
|
};
|
|
3529
3525
|
onDisabledChanged = (e) => {
|
|
@@ -3588,10 +3584,10 @@ class fe extends v {
|
|
|
3588
3584
|
);
|
|
3589
3585
|
};
|
|
3590
3586
|
}
|
|
3591
|
-
class
|
|
3587
|
+
class _e extends v {
|
|
3592
3588
|
onInput;
|
|
3593
3589
|
constructor(e) {
|
|
3594
|
-
super(e), this.onInput =
|
|
3590
|
+
super(e), this.onInput = bt(e.handleOnChange, 300);
|
|
3595
3591
|
}
|
|
3596
3592
|
static get componentName() {
|
|
3597
3593
|
return "ValueEditor";
|
|
@@ -3629,7 +3625,7 @@ class Pe extends v {
|
|
|
3629
3625
|
if (t) {
|
|
3630
3626
|
if (t === "date")
|
|
3631
3627
|
return i === "between" ? (l === "" && h === "" ? l = "" : l = [l, h], /* @__PURE__ */ n(
|
|
3632
|
-
|
|
3628
|
+
W,
|
|
3633
3629
|
{
|
|
3634
3630
|
type: "range",
|
|
3635
3631
|
disabled: e,
|
|
@@ -3638,7 +3634,7 @@ class Pe extends v {
|
|
|
3638
3634
|
onChange: (o) => this.onInput(o)
|
|
3639
3635
|
}
|
|
3640
3636
|
)) : i === "notInList" || i === "inList" ? /* @__PURE__ */ n(
|
|
3641
|
-
|
|
3637
|
+
W,
|
|
3642
3638
|
{
|
|
3643
3639
|
type: "multiple",
|
|
3644
3640
|
disabled: e,
|
|
@@ -3647,7 +3643,7 @@ class Pe extends v {
|
|
|
3647
3643
|
onChange: (o) => this.onInput(o)
|
|
3648
3644
|
}
|
|
3649
3645
|
) : /* @__PURE__ */ n(
|
|
3650
|
-
|
|
3646
|
+
W,
|
|
3651
3647
|
{
|
|
3652
3648
|
disabled: e,
|
|
3653
3649
|
value: l,
|
|
@@ -3659,7 +3655,7 @@ class Pe extends v {
|
|
|
3659
3655
|
if (i === "between") {
|
|
3660
3656
|
const o = l === "" && h === "" ? [null, null] : [new Date(l), new Date(h)];
|
|
3661
3657
|
return /* @__PURE__ */ n(
|
|
3662
|
-
|
|
3658
|
+
Ge,
|
|
3663
3659
|
{
|
|
3664
3660
|
disabled: e,
|
|
3665
3661
|
value: o,
|
|
@@ -3671,7 +3667,7 @@ class Pe extends v {
|
|
|
3671
3667
|
);
|
|
3672
3668
|
} else
|
|
3673
3669
|
return /* @__PURE__ */ n(
|
|
3674
|
-
|
|
3670
|
+
Qe,
|
|
3675
3671
|
{
|
|
3676
3672
|
disabled: e,
|
|
3677
3673
|
value: l ? new Date(l) : null,
|
|
@@ -3684,7 +3680,7 @@ class Pe extends v {
|
|
|
3684
3680
|
else {
|
|
3685
3681
|
if (t === "time")
|
|
3686
3682
|
return l === "" && h === "" ? l = "" : l = l + " - " + h, /* @__PURE__ */ n(
|
|
3687
|
-
|
|
3683
|
+
$e,
|
|
3688
3684
|
{
|
|
3689
3685
|
disabled: e,
|
|
3690
3686
|
width: this.props.twoFields ? "128px" : "260px",
|
|
@@ -3694,7 +3690,7 @@ class Pe extends v {
|
|
|
3694
3690
|
);
|
|
3695
3691
|
if (t === "boolean")
|
|
3696
3692
|
return /* @__PURE__ */ n(
|
|
3697
|
-
|
|
3693
|
+
vt,
|
|
3698
3694
|
{
|
|
3699
3695
|
isChecked: l,
|
|
3700
3696
|
onChangeValue: (o, c) => this.onInput(o === !0)
|
|
@@ -3743,7 +3739,7 @@ class Pe extends v {
|
|
|
3743
3739
|
))
|
|
3744
3740
|
}
|
|
3745
3741
|
) : /* @__PURE__ */ n(
|
|
3746
|
-
|
|
3742
|
+
J,
|
|
3747
3743
|
{
|
|
3748
3744
|
onChange: (o) => this.onInput(o),
|
|
3749
3745
|
disabled: e,
|
|
@@ -3768,7 +3764,7 @@ class Pe extends v {
|
|
|
3768
3764
|
}
|
|
3769
3765
|
} else
|
|
3770
3766
|
return /* @__PURE__ */ n(
|
|
3771
|
-
|
|
3767
|
+
J,
|
|
3772
3768
|
{
|
|
3773
3769
|
onChange: (o) => this.onInput(o),
|
|
3774
3770
|
disabled: e,
|
|
@@ -3792,7 +3788,7 @@ class Pe extends v {
|
|
|
3792
3788
|
);
|
|
3793
3789
|
};
|
|
3794
3790
|
}
|
|
3795
|
-
class
|
|
3791
|
+
class De extends v {
|
|
3796
3792
|
static get componentName() {
|
|
3797
3793
|
return "ValueSelector";
|
|
3798
3794
|
}
|
|
@@ -3839,22 +3835,22 @@ class Le extends v {
|
|
|
3839
3835
|
);
|
|
3840
3836
|
};
|
|
3841
3837
|
}
|
|
3842
|
-
class
|
|
3838
|
+
class Ei extends v {
|
|
3843
3839
|
render = () => {
|
|
3844
3840
|
const { style: e, when: t, inputValue: i, children: r, classNameFeedback: s } = this.props;
|
|
3845
3841
|
return t && i && t(i) === !0 ? /* @__PURE__ */ n("div", { style: e, className: s, children: r }) : null;
|
|
3846
3842
|
};
|
|
3847
3843
|
}
|
|
3848
|
-
class
|
|
3844
|
+
class _i extends v {
|
|
3849
3845
|
render = () => {
|
|
3850
3846
|
const { theme: e, colorScheme: t, onSearchClick: i, variant: r } = this.props;
|
|
3851
3847
|
return /* @__PURE__ */ n(
|
|
3852
|
-
|
|
3848
|
+
rt,
|
|
3853
3849
|
{
|
|
3854
3850
|
placeholder: this.props.placeholder,
|
|
3855
3851
|
style: { width: "100%" },
|
|
3856
3852
|
rightSection: /* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: "Localizar", children: /* @__PURE__ */ n(
|
|
3857
|
-
|
|
3853
|
+
F,
|
|
3858
3854
|
{
|
|
3859
3855
|
style: {
|
|
3860
3856
|
backgroundColor: t === "dark" ? e.colors[e.primaryColor][5] : e.colors[e.primaryColor][6]
|
|
@@ -3869,68 +3865,68 @@ class qi extends v {
|
|
|
3869
3865
|
);
|
|
3870
3866
|
};
|
|
3871
3867
|
}
|
|
3872
|
-
function
|
|
3868
|
+
function zt(d, e) {
|
|
3873
3869
|
const t = [];
|
|
3874
3870
|
return d.forEach((i) => {
|
|
3875
3871
|
t.push(C.eq(i, `^*${e}*`));
|
|
3876
|
-
}),
|
|
3872
|
+
}), Ze(C.or(...t));
|
|
3877
3873
|
}
|
|
3878
|
-
function
|
|
3874
|
+
function Di({
|
|
3879
3875
|
searchableFields: d,
|
|
3880
3876
|
onFilter: e,
|
|
3881
3877
|
minFilterValueLength: t,
|
|
3882
3878
|
options: i
|
|
3883
3879
|
}) {
|
|
3884
|
-
const { t: r } =
|
|
3880
|
+
const { t: r } = Xe(), [s, a] = $(""), [l, h] = Ue(s, 500), [o, c] = $(""), [u, g] = $(""), b = Pe(), T = Ae(!1);
|
|
3885
3881
|
ge(() => {
|
|
3886
|
-
if (l.length < t && !
|
|
3887
|
-
const
|
|
3888
|
-
c(
|
|
3882
|
+
if (l.length < t && !T.current && (e("", ""), c(""), g(""), T.current = !0), l.length >= t && l !== u) {
|
|
3883
|
+
const D = zt(d, l);
|
|
3884
|
+
c(D), T.current = !1, g(l), h(), e(D, l);
|
|
3889
3885
|
}
|
|
3890
3886
|
}, [l, t, e, d]);
|
|
3891
|
-
function
|
|
3892
|
-
e(
|
|
3887
|
+
function L(D, Ke) {
|
|
3888
|
+
e(D, Ke);
|
|
3893
3889
|
}
|
|
3894
|
-
const
|
|
3895
|
-
return /* @__PURE__ */ p(
|
|
3890
|
+
const V = i && i.inputProps ? i.inputProps : { miw: 240 }, K = i && i.buttonRefreshProps ? i.buttonRefreshProps : { color: b.primaryColor, variant: "filled" }, G = i && i.buttonClearProps ? i.buttonClearProps : { color: b.primaryColor, variant: "filled" }, Q = i && i.iconRefreshProps ? i.iconRefreshProps : { size: "1.5rem", color: "white" }, B = i && i.iconRefreshProps ? i.iconRefreshProps : { size: "1.5rem", color: "white" }, X = i && i.spacing ? i.spacing : 5;
|
|
3891
|
+
return /* @__PURE__ */ p(st, { justify: "space-between", align: "center", children: [
|
|
3896
3892
|
/* @__PURE__ */ n(
|
|
3897
|
-
|
|
3893
|
+
qe,
|
|
3898
3894
|
{
|
|
3899
3895
|
rightSection: /* @__PURE__ */ n(le, {}),
|
|
3900
3896
|
variant: "filled",
|
|
3901
3897
|
defaultValue: s,
|
|
3902
|
-
onChange: (
|
|
3903
|
-
...
|
|
3898
|
+
onChange: (D) => a(D.currentTarget.value),
|
|
3899
|
+
...V
|
|
3904
3900
|
}
|
|
3905
3901
|
),
|
|
3906
|
-
/* @__PURE__ */ n(
|
|
3902
|
+
/* @__PURE__ */ n(E, { w: X }),
|
|
3907
3903
|
/* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: `${r("archbase:Refresh")}`, children: /* @__PURE__ */ n(
|
|
3908
|
-
|
|
3904
|
+
F,
|
|
3909
3905
|
{
|
|
3910
3906
|
color: "var(--mantine-primary-color-filled)",
|
|
3911
|
-
onClick: () =>
|
|
3907
|
+
onClick: () => L(o, u),
|
|
3912
3908
|
style: { height: "36px", width: "36px" },
|
|
3913
|
-
...
|
|
3914
|
-
children: /* @__PURE__ */ n(ye, { ...
|
|
3909
|
+
...K,
|
|
3910
|
+
children: /* @__PURE__ */ n(ye, { ...Q })
|
|
3915
3911
|
}
|
|
3916
3912
|
) }),
|
|
3917
|
-
/* @__PURE__ */ n(
|
|
3913
|
+
/* @__PURE__ */ n(E, { w: X }),
|
|
3918
3914
|
/* @__PURE__ */ n(f, { withinPortal: !0, withArrow: !0, label: `${r("archbase:ClearFilter")}`, children: /* @__PURE__ */ n(
|
|
3919
|
-
|
|
3915
|
+
F,
|
|
3920
3916
|
{
|
|
3921
3917
|
color: "var(--mantine-primary-color-filled)",
|
|
3922
|
-
onClick: () =>
|
|
3918
|
+
onClick: () => L("", ""),
|
|
3923
3919
|
style: { height: "36px", width: "36px" },
|
|
3924
|
-
...
|
|
3925
|
-
children: /* @__PURE__ */ n(
|
|
3920
|
+
...G,
|
|
3921
|
+
children: /* @__PURE__ */ n(Ft, { ...B })
|
|
3926
3922
|
}
|
|
3927
3923
|
) })
|
|
3928
3924
|
] });
|
|
3929
3925
|
}
|
|
3930
|
-
function
|
|
3926
|
+
function Ni(d) {
|
|
3931
3927
|
const e = [];
|
|
3932
3928
|
if (d.filter.rules) {
|
|
3933
|
-
const t =
|
|
3929
|
+
const t = Je(d.filter.condition, d.filter.rules);
|
|
3934
3930
|
return d.sort && d.sort.sortFields && d.sort.sortFields.forEach((i) => {
|
|
3935
3931
|
i.selected && e.push(i.name + ":" + i.asc_desc);
|
|
3936
3932
|
}), {
|
|
@@ -3940,25 +3936,25 @@ function Wi(d) {
|
|
|
3940
3936
|
}
|
|
3941
3937
|
return null;
|
|
3942
3938
|
}
|
|
3943
|
-
function
|
|
3939
|
+
function Je(d, e) {
|
|
3944
3940
|
let t = C.and;
|
|
3945
3941
|
d === "or" && (t = C.or);
|
|
3946
3942
|
const i = [];
|
|
3947
3943
|
return e.forEach((r) => {
|
|
3948
3944
|
if (r.field && !r.disabled) {
|
|
3949
3945
|
let s = r.value, a = r.value2;
|
|
3950
|
-
s && s !== "" && (typeof s == "number" || s instanceof Date) && (r.dataType === "date" || r.dataType === "date_time") && (s =
|
|
3946
|
+
s && s !== "" && (typeof s == "number" || s instanceof Date) && (r.dataType === "date" || r.dataType === "date_time") && (s = Ne(r, s)), a && a !== "" && (typeof a == "number" || a instanceof Date) && (r.dataType === "date" || r.dataType === "date_time") && (a = Ne(r, a)), r.operator === "null" ? i.push(C.eq(r.field, "null")) : r.operator === "notNull" ? i.push(C.neq(r.field, "null")) : r.operator === "contains" && s && s !== "" ? i.push(C.eq(r.field, `^*${s}*`)) : r.operator === "startsWith" && s && s !== "" ? i.push(C.eq(r.field, `^${s}*`)) : r.operator === "endsWith" && s && s !== "" && (typeof s == "string" || typeof s == "number") ? i.push(C.eq(r.field, `^*${s}`)) : r.operator === "=" && s && s !== "" && (typeof s == "string" || typeof s == "number") ? i.push(C.eq(r.field, s)) : r.operator === "!=" && s && s !== "" && (typeof s == "string" || typeof s == "number") ? i.push(C.neq(r.field, s)) : r.operator === "<" && s && s !== "" && (typeof s == "string" || typeof s == "number") ? i.push(C.lt(r.field, s)) : r.operator === ">" && s && s !== "" && (typeof s == "string" || typeof s == "number") ? i.push(C.gt(r.field, s)) : r.operator === "<=" && s && s !== "" && (typeof s == "string" || typeof s == "number") ? i.push(C.le(r.field, s)) : r.operator === ">=" && s && s !== "" && (typeof s == "string" || typeof s == "number") ? i.push(C.ge(r.field, s)) : r.operator === "between" && s && s !== "" && a && a !== "" && (typeof s == "string" || typeof s == "number") && (typeof a == "string" || typeof a == "number") ? i.push(C.bt(r.field, s, a)) : r.operator === "notBetween" && s && s !== "" && a && a !== "" && (typeof s == "string" || typeof s == "number") && (typeof a == "string" || typeof a == "number") ? i.push(C.nb(r.field, s, a)) : r.operator === "inList" && s && s !== "" && Array.isArray(s) ? i.push(C.in(r.field, s)) : r.operator === "notInList" && s && s !== "" && Array.isArray(s) && i.push(C.out(r.field, s));
|
|
3951
3947
|
}
|
|
3952
|
-
r.rules && !r.disabled && i.push(
|
|
3948
|
+
r.rules && !r.disabled && i.push(Je(r.condition, r.rules));
|
|
3953
3949
|
}), t(...i);
|
|
3954
3950
|
}
|
|
3955
|
-
function
|
|
3951
|
+
function Ne(d, e) {
|
|
3956
3952
|
if (d.dataType === "date")
|
|
3957
3953
|
return Te(e, { representation: "date" });
|
|
3958
3954
|
if (d.dataType === "date_time")
|
|
3959
3955
|
return Te(e, { representation: "complete" });
|
|
3960
3956
|
}
|
|
3961
|
-
class
|
|
3957
|
+
class Gt {
|
|
3962
3958
|
query;
|
|
3963
3959
|
constructor() {
|
|
3964
3960
|
this.query = "";
|
|
@@ -3985,67 +3981,67 @@ class Xt {
|
|
|
3985
3981
|
return t === "date" || t === "date_time" ? `"${e}"` : t === "number" ? e : `"${e}"`;
|
|
3986
3982
|
}
|
|
3987
3983
|
}
|
|
3988
|
-
const
|
|
3984
|
+
const Ai = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3989
3985
|
__proto__: null,
|
|
3990
|
-
default:
|
|
3991
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3986
|
+
default: Gt
|
|
3987
|
+
}, Symbol.toStringTag, { value: "Module" })), Pi = "3.0.0", Li = "3.0.0";
|
|
3992
3988
|
export {
|
|
3993
3989
|
se as ADVANCED,
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
3990
|
+
Mt as ArchbaseAdvancedFilter,
|
|
3991
|
+
Li as ArchbaseAdvancedVersion,
|
|
3992
|
+
At as ArchbaseCompositeFilter,
|
|
3993
|
+
Pt as ArchbaseDetailedFilter,
|
|
3994
|
+
Ei as ArchbaseFeedback,
|
|
3995
|
+
Vt as ArchbaseFilterSelectFields,
|
|
3996
|
+
$t as ArchbaseFilterSelectRange,
|
|
3997
|
+
Di as ArchbaseGlobalFilter,
|
|
3998
|
+
_i as ArchbaseInputSearch,
|
|
3999
|
+
Pi as ArchbaseKanbanVersion,
|
|
4000
|
+
Ri as ArchbaseQueryBuilder,
|
|
4001
|
+
Dt as ArchbaseSaveFilter,
|
|
4002
|
+
Nt as ArchbaseSimpleFilter,
|
|
4007
4003
|
we as CustomSortItem,
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4004
|
+
It as FilterField,
|
|
4005
|
+
kt as FilterFieldValue,
|
|
4006
|
+
Tt as FilterFields,
|
|
4007
|
+
Ai as GraphQLQueryBuilder,
|
|
4012
4008
|
Z as NEW_FILTER_INDEX,
|
|
4013
4009
|
ee as NORMAL,
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4010
|
+
Ci as OP_BETWEEN,
|
|
4011
|
+
hi as OP_CONTAINS,
|
|
4012
|
+
pi as OP_ENDSWITH,
|
|
4013
|
+
ui as OP_EQUALS,
|
|
4014
|
+
fi as OP_GREATER,
|
|
4015
|
+
Fi as OP_GREATER_OR_EQUAL,
|
|
4016
|
+
vi as OP_IN_LIST,
|
|
4017
|
+
gi as OP_LESS,
|
|
4018
|
+
bi as OP_LESS_OR_EQUAL,
|
|
4019
|
+
mi as OP_NOT_EQUALS,
|
|
4020
|
+
Si as OP_NOT_IN_LIST,
|
|
4021
|
+
di as OP_NOT_NULL,
|
|
4022
|
+
oi as OP_NULL,
|
|
4023
|
+
ci as OP_STARTSWITH,
|
|
4024
|
+
O as QUICK,
|
|
4029
4025
|
S as QUICK_FILTER_INDEX,
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4026
|
+
Ti as QueryField,
|
|
4027
|
+
Oi as QueryFieldValue,
|
|
4028
|
+
ki as QueryFields,
|
|
4033
4029
|
ne as QueryFilterEntity,
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4030
|
+
_e as ValueEditor,
|
|
4031
|
+
Ni as buildFrom,
|
|
4032
|
+
He as convertQueryFields,
|
|
4033
|
+
Ii as defaultConditions,
|
|
4034
|
+
_t as defaultOperators,
|
|
4035
|
+
H as getDefaultEmptyFilter,
|
|
4036
|
+
N as getDefaultFilter,
|
|
4037
|
+
yi as getFieldSql,
|
|
4038
|
+
wi as getFieldValues,
|
|
4043
4039
|
I as getFields,
|
|
4044
4040
|
ae as getQuickFields,
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4041
|
+
Ot as getQuickFieldsSort,
|
|
4042
|
+
P as getQuickFilterFields,
|
|
4043
|
+
Rt as getQuickFilterSort,
|
|
4044
|
+
xi as getQuickFilterSortBySelectedFields,
|
|
4045
|
+
Ye as getSortString,
|
|
4046
|
+
Et as mergeSortWithFields
|
|
4051
4047
|
};
|