@apia/api 4.0.47 → 4.0.58
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/LICENSE.md +6 -0
- package/dist/index.d.ts +16 -16
- package/dist/index.js +265 -122
- package/dist/index.js.map +1 -1
- package/package.json +12 -11
package/LICENSE.md
ADDED
package/dist/index.d.ts
CHANGED
|
@@ -303,6 +303,21 @@ type TFilter = {
|
|
|
303
303
|
icon?: string;
|
|
304
304
|
};
|
|
305
305
|
|
|
306
|
+
declare class Filter {
|
|
307
|
+
protected tableName?: string;
|
|
308
|
+
filterState: TFilter;
|
|
309
|
+
focus(): void;
|
|
310
|
+
constructor(properties: TFilter);
|
|
311
|
+
getInputRenderer(): react.JSX.Element;
|
|
312
|
+
getSelectRenderer(): react.JSX.Element;
|
|
313
|
+
getRangeRenderer(): react.JSX.Element;
|
|
314
|
+
getDateRenderer(): react.JSX.Element;
|
|
315
|
+
getDoubleRenderer(): react.JSX.Element;
|
|
316
|
+
Component: (() => react.JSX.Element) & {
|
|
317
|
+
displayName: string;
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
|
|
306
321
|
type TFilterTypesElementConditions = {
|
|
307
322
|
onChange: string;
|
|
308
323
|
readonly: boolean;
|
|
@@ -324,21 +339,6 @@ type TFilterTypesElementConditions = {
|
|
|
324
339
|
};
|
|
325
340
|
};
|
|
326
341
|
|
|
327
|
-
declare class Filter {
|
|
328
|
-
protected tableName?: string;
|
|
329
|
-
filterState: TFilter;
|
|
330
|
-
focus(): void;
|
|
331
|
-
constructor(properties: TFilter);
|
|
332
|
-
getInputRenderer(): react.JSX.Element;
|
|
333
|
-
getSelectRenderer(): react.JSX.Element;
|
|
334
|
-
getRangeRenderer(): react.JSX.Element;
|
|
335
|
-
getDateRenderer(): react.JSX.Element;
|
|
336
|
-
getDoubleRenderer(): react.JSX.Element;
|
|
337
|
-
Component: (() => react.JSX.Element) & {
|
|
338
|
-
displayName: string;
|
|
339
|
-
};
|
|
340
|
-
}
|
|
341
|
-
|
|
342
342
|
type TableControllerState = {
|
|
343
343
|
finishedFirstLoad: boolean;
|
|
344
344
|
columns: Map<string, TResponsiveTableColumn>;
|
|
@@ -426,7 +426,7 @@ declare class QueryController {
|
|
|
426
426
|
conditions: TFilterTypesElementConditions[];
|
|
427
427
|
constructor(ajaxUrl: string);
|
|
428
428
|
protected actualRefreshMethod(serverFirstRefresh?: boolean): Promise<void>;
|
|
429
|
-
protected areRequiredFilters():
|
|
429
|
+
protected areRequiredFilters(): false | Filter[];
|
|
430
430
|
protected buildTableController(): TableController;
|
|
431
431
|
clearFilters(): Promise<void>;
|
|
432
432
|
private timeout;
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,10 @@ import { jsx, jsxs, Fragment } from '@apia/theme/jsx-runtime';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { createContext, useState, useCallback, useEffect, useId, useRef, useMemo } from 'react';
|
|
4
4
|
import { Box, Label, spacing, getVariant, Input as Input$1, Select as Select$1, Spinner } from '@apia/theme';
|
|
5
|
-
import { debugDispatcher, parseXmlAsync, arrayOrArray, EventEmitter, useMount, encrypt, noNaN, getIndex, getLabel, StatefulEmitter, focus, focusSelector, useLatest, useIntermediateValue, formatMessage,
|
|
5
|
+
import { debugDispatcher, parseXmlAsync, arrayOrArray, EventEmitter, useMount, encrypt, noNaN, getIndex, getLabel, StatefulEmitter, focus, focusSelector, useLatest, useIntermediateValue, formatMessage, uniqueId as uniqueId$1, getDateFormat, Mutex } from '@apia/util';
|
|
6
6
|
import { notify, getNotificationMessageObj, dispatchNotifications } from '@apia/notifications';
|
|
7
7
|
import { classToValidate, Checkbox, FileInput, classToValidationFunction, Input, Radio, Select, Textarea, useFormContext, validationsStore, hasSucceedFormValidation, Form } from '@apia/validations';
|
|
8
|
-
import { Accordion, AccordionItem, useModal, LabelBox, SimpleButton, ApiaUtil, Modal, ProgressBar, DateInput, AutocompleteController, Autocomplete, IconButton } from '@apia/components';
|
|
8
|
+
import { Accordion, AccordionItem, useModal, LabelBox, SimpleButton, ApiaUtil, Modal, ProgressBar, RequiredMark, DateInput, AutocompleteController, Autocomplete, IconButton } from '@apia/components';
|
|
9
9
|
import axios, { AxiosError } from 'axios';
|
|
10
10
|
import merge from 'lodash-es/merge';
|
|
11
11
|
import QueryString from 'qs';
|
|
@@ -3244,7 +3244,7 @@ const RangeFilterRenderer = observer(({ state }) => {
|
|
|
3244
3244
|
const lastEmittedMultiplier = useRef(1);
|
|
3245
3245
|
if (lastEmittedLow.current !== state.value) {
|
|
3246
3246
|
lastEmittedLow.current = state.value;
|
|
3247
|
-
lastEmittedHigh.current = state.
|
|
3247
|
+
lastEmittedHigh.current = state.filterToValue || "";
|
|
3248
3248
|
}
|
|
3249
3249
|
const emitLow = (currentValue) => {
|
|
3250
3250
|
const numberValue = currentValue ?? "";
|
|
@@ -3265,11 +3265,11 @@ const RangeFilterRenderer = observer(({ state }) => {
|
|
|
3265
3265
|
lastEmittedHigh.current = numberValue;
|
|
3266
3266
|
lastEmittedMultiplier.current = multiplier.current;
|
|
3267
3267
|
const emitValue = numberValue;
|
|
3268
|
-
state.
|
|
3268
|
+
state.filterToValue = String(emitValue);
|
|
3269
3269
|
state.multiplier = multiplier.current;
|
|
3270
3270
|
};
|
|
3271
3271
|
const [lowValue, setLowValue] = useIntermediateValue(state.value);
|
|
3272
|
-
const [highValue, setHighValue] = useIntermediateValue(state.
|
|
3272
|
+
const [highValue, setHighValue] = useIntermediateValue(state.filterToValue);
|
|
3273
3273
|
const [unit, setUnit] = useIntermediateValue(state.multiplier);
|
|
3274
3274
|
return /* @__PURE__ */ jsxs(
|
|
3275
3275
|
Box,
|
|
@@ -3301,6 +3301,7 @@ const RangeFilterRenderer = observer(({ state }) => {
|
|
|
3301
3301
|
Input$1,
|
|
3302
3302
|
{
|
|
3303
3303
|
disabled: state.readonly,
|
|
3304
|
+
required: state.required,
|
|
3304
3305
|
onChange: ({ target: { value: currentValue } }) => {
|
|
3305
3306
|
setHighValue(currentValue);
|
|
3306
3307
|
emitHigh(currentValue);
|
|
@@ -3339,40 +3340,95 @@ const RangeFilterRenderer = observer(({ state }) => {
|
|
|
3339
3340
|
);
|
|
3340
3341
|
});
|
|
3341
3342
|
|
|
3342
|
-
const
|
|
3343
|
-
|
|
3344
|
-
|
|
3343
|
+
const FilterLabel = ({
|
|
3344
|
+
state,
|
|
3345
|
+
labelOverride,
|
|
3346
|
+
isDate,
|
|
3347
|
+
className,
|
|
3348
|
+
title
|
|
3349
|
+
}) => {
|
|
3350
|
+
const text = React__default.useMemo(() => {
|
|
3351
|
+
const base = labelOverride ?? state?.title ?? "";
|
|
3352
|
+
if (isDate && state?.filterToId && !state.hideToFilter) {
|
|
3353
|
+
try {
|
|
3354
|
+
return formatMessage(window.LBL_DATE_FILTER_FROM_TXT, { TOK1: base });
|
|
3355
|
+
} catch {
|
|
3356
|
+
return base;
|
|
3357
|
+
}
|
|
3358
|
+
}
|
|
3359
|
+
return base;
|
|
3360
|
+
}, [labelOverride, state, isDate]);
|
|
3361
|
+
const showRequiredBefore = !!(state?.required && window.SHOW_REQUIRED_POSITION !== "0");
|
|
3362
|
+
const showRequiredAfter = !!(state?.required && window.SHOW_REQUIRED_POSITION === "0");
|
|
3363
|
+
return /* @__PURE__ */ jsxs(
|
|
3364
|
+
Box,
|
|
3345
3365
|
{
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3366
|
+
className: `filterLabel ${className ?? ""}`,
|
|
3367
|
+
title,
|
|
3368
|
+
sx: { display: "flex", flexDirection: "row" },
|
|
3369
|
+
children: [
|
|
3370
|
+
showRequiredBefore && /* @__PURE__ */ jsx(RequiredMark, { isRequired: true, sx: { zIndex: 1 } }),
|
|
3371
|
+
/* @__PURE__ */ jsx(Box, { as: "span", children: text }),
|
|
3372
|
+
showRequiredAfter && /* @__PURE__ */ jsx(RequiredMark, { isRequired: true, sx: { zIndex: 1 } })
|
|
3373
|
+
]
|
|
3352
3374
|
}
|
|
3353
3375
|
);
|
|
3376
|
+
};
|
|
3377
|
+
|
|
3378
|
+
const SelectFilterRenderer = observer(({ state }) => {
|
|
3379
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3380
|
+
/* @__PURE__ */ jsx(FilterLabel, { state, isDate: true }),
|
|
3381
|
+
/* @__PURE__ */ jsx(
|
|
3382
|
+
Select$1,
|
|
3383
|
+
{
|
|
3384
|
+
className: "filter__query",
|
|
3385
|
+
sx: {
|
|
3386
|
+
"&.filter__query.filter__query:not([disabled])": {
|
|
3387
|
+
borderLeft: state.required ? "4px solid" : void 0,
|
|
3388
|
+
borderLeftColor: state.required ? "palette.error.main" : void 0
|
|
3389
|
+
}
|
|
3390
|
+
},
|
|
3391
|
+
disabled: state.readonly,
|
|
3392
|
+
value: state.value,
|
|
3393
|
+
onChange: (ev) => {
|
|
3394
|
+
state.value = ev.target.value;
|
|
3395
|
+
},
|
|
3396
|
+
children: arrayOrArray(state.options).map((c) => /* @__PURE__ */ jsx("option", { value: c.value, children: c.label }, c.value))
|
|
3397
|
+
}
|
|
3398
|
+
)
|
|
3399
|
+
] });
|
|
3354
3400
|
});
|
|
3355
3401
|
|
|
3356
3402
|
const InputFilterRenderer = observer(({ state }) => {
|
|
3357
3403
|
const { onFilterBlur, onFilterPressEnter } = useResponsiveTableContext();
|
|
3358
|
-
return /* @__PURE__ */
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3404
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3405
|
+
/* @__PURE__ */ jsx(FilterLabel, { state, isDate: true }),
|
|
3406
|
+
/* @__PURE__ */ jsx(
|
|
3407
|
+
Input$1,
|
|
3408
|
+
{
|
|
3409
|
+
className: "filter__query",
|
|
3410
|
+
sx: {
|
|
3411
|
+
"&.filter__query.filter__query:not([disabled])": {
|
|
3412
|
+
borderLeft: state.required ? "4px solid" : void 0,
|
|
3413
|
+
borderLeftColor: state.required ? "palette.error.main" : void 0
|
|
3414
|
+
}
|
|
3415
|
+
},
|
|
3416
|
+
disabled: state.readonly,
|
|
3417
|
+
value: state.value,
|
|
3418
|
+
onChange: (ev) => {
|
|
3419
|
+
state.value = ev.target.value;
|
|
3420
|
+
},
|
|
3421
|
+
onKeyDown: (ev) => {
|
|
3422
|
+
if (ev.code === "Enter") {
|
|
3423
|
+
onFilterPressEnter?.(state);
|
|
3424
|
+
}
|
|
3425
|
+
},
|
|
3426
|
+
onBlur: () => {
|
|
3427
|
+
onFilterBlur?.(state);
|
|
3369
3428
|
}
|
|
3370
|
-
},
|
|
3371
|
-
onBlur: () => {
|
|
3372
|
-
onFilterBlur?.(state);
|
|
3373
3429
|
}
|
|
3374
|
-
|
|
3375
|
-
);
|
|
3430
|
+
)
|
|
3431
|
+
] });
|
|
3376
3432
|
});
|
|
3377
3433
|
|
|
3378
3434
|
const dateFormat = getDateFormat();
|
|
@@ -3386,40 +3442,91 @@ function controlDatesOrder(first, last) {
|
|
|
3386
3442
|
}
|
|
3387
3443
|
const DateFilterRenderer = observer(({ state }) => {
|
|
3388
3444
|
const { onFilterBlur, onFilterChange } = useResponsiveTableContext();
|
|
3445
|
+
const idFrom = uniqueId$1("date_from_");
|
|
3446
|
+
const idTo = uniqueId$1("date_to_");
|
|
3389
3447
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3390
|
-
/* @__PURE__ */ jsx(
|
|
3391
|
-
TOK1: state.title ?? ""
|
|
3392
|
-
}) : state.title }),
|
|
3448
|
+
/* @__PURE__ */ jsx(FilterLabel, { state, isDate: true }),
|
|
3393
3449
|
/* @__PURE__ */ jsx(
|
|
3394
3450
|
DateInput,
|
|
3395
3451
|
{
|
|
3452
|
+
id: idFrom,
|
|
3453
|
+
className: "filter__query date_from",
|
|
3454
|
+
sx: {
|
|
3455
|
+
"&.filter__query.filter__query:not([disabled])": {
|
|
3456
|
+
borderLeft: state.required ? "4px solid" : void 0,
|
|
3457
|
+
borderLeftColor: state.required ? "palette.error.main" : void 0
|
|
3458
|
+
}
|
|
3459
|
+
},
|
|
3396
3460
|
disabled: state.readonly,
|
|
3397
3461
|
value: state.value,
|
|
3398
3462
|
onChange: (date) => {
|
|
3399
|
-
|
|
3400
|
-
|
|
3463
|
+
const result = controlDatesOrder(
|
|
3464
|
+
date ?? "",
|
|
3465
|
+
state.filterToValue ?? ""
|
|
3466
|
+
);
|
|
3467
|
+
if (result) {
|
|
3468
|
+
state.value = date ?? "";
|
|
3469
|
+
onFilterChange?.(state);
|
|
3470
|
+
} else {
|
|
3471
|
+
state.value = void 0;
|
|
3472
|
+
onFilterChange?.({
|
|
3473
|
+
...state,
|
|
3474
|
+
currentValue: "",
|
|
3475
|
+
deleteFiltersTimestamp: void 0,
|
|
3476
|
+
changeFiltersTimestamp: void 0
|
|
3477
|
+
});
|
|
3478
|
+
const a = document.querySelector(`#${idFrom}`);
|
|
3479
|
+
if (a) {
|
|
3480
|
+
a.click();
|
|
3481
|
+
}
|
|
3482
|
+
ApiaUtil.instance.notifications.notify({
|
|
3483
|
+
message: window.MSG_FEC_FIN_MAY_FEC_INI,
|
|
3484
|
+
type: "warning"
|
|
3485
|
+
});
|
|
3486
|
+
}
|
|
3401
3487
|
},
|
|
3402
3488
|
onBlur: () => {
|
|
3403
|
-
onFilterBlur?.(
|
|
3489
|
+
onFilterBlur?.({
|
|
3490
|
+
...state,
|
|
3491
|
+
currentValue: state.value
|
|
3492
|
+
});
|
|
3404
3493
|
}
|
|
3405
3494
|
}
|
|
3406
3495
|
),
|
|
3407
3496
|
(state?.isAdditional || state.group) && state?.filterToId && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3408
|
-
/* @__PURE__ */ jsx(
|
|
3409
|
-
TOK1: state.title ?? ""
|
|
3410
|
-
}) }),
|
|
3497
|
+
/* @__PURE__ */ jsx(FilterLabel, { state, isDate: true }),
|
|
3411
3498
|
/* @__PURE__ */ jsx(
|
|
3412
3499
|
DateInput,
|
|
3413
3500
|
{
|
|
3501
|
+
id: idTo,
|
|
3502
|
+
className: "filter__query date_to",
|
|
3503
|
+
sx: {
|
|
3504
|
+
"&.filter__query.filter__query:not([disabled])": {
|
|
3505
|
+
borderLeft: state.required ? "4px solid" : void 0,
|
|
3506
|
+
borderLeftColor: state.required ? "palette.error.main" : void 0
|
|
3507
|
+
}
|
|
3508
|
+
},
|
|
3414
3509
|
disabled: state.readonly,
|
|
3415
3510
|
value: state.filterToValue,
|
|
3416
3511
|
onChange: (date) => {
|
|
3417
|
-
const result = controlDatesOrder(state.value, date);
|
|
3512
|
+
const result = controlDatesOrder(state.value, date ?? "");
|
|
3418
3513
|
if (result) {
|
|
3419
|
-
state.filterToValue = date;
|
|
3514
|
+
state.filterToValue = date ?? "";
|
|
3420
3515
|
onFilterChange?.(state);
|
|
3421
3516
|
} else {
|
|
3422
3517
|
state.filterToValue = void 0;
|
|
3518
|
+
onFilterChange?.({
|
|
3519
|
+
...state,
|
|
3520
|
+
currentValue: "",
|
|
3521
|
+
deleteFiltersTimestamp: void 0,
|
|
3522
|
+
changeFiltersTimestamp: void 0
|
|
3523
|
+
});
|
|
3524
|
+
const a = document.querySelector(
|
|
3525
|
+
`#${idTo}`
|
|
3526
|
+
);
|
|
3527
|
+
if (a) {
|
|
3528
|
+
a.click();
|
|
3529
|
+
}
|
|
3423
3530
|
ApiaUtil.instance.notifications.notify({
|
|
3424
3531
|
message: window.MSG_FEC_FIN_MAY_FEC_INI,
|
|
3425
3532
|
type: "warning"
|
|
@@ -3427,7 +3534,10 @@ const DateFilterRenderer = observer(({ state }) => {
|
|
|
3427
3534
|
}
|
|
3428
3535
|
},
|
|
3429
3536
|
onBlur: () => {
|
|
3430
|
-
onFilterBlur?.(
|
|
3537
|
+
onFilterBlur?.({
|
|
3538
|
+
...state,
|
|
3539
|
+
currentValue: state.filterToValue
|
|
3540
|
+
});
|
|
3431
3541
|
}
|
|
3432
3542
|
}
|
|
3433
3543
|
)
|
|
@@ -3671,6 +3781,7 @@ class TableController {
|
|
|
3671
3781
|
...props,
|
|
3672
3782
|
columns,
|
|
3673
3783
|
rows: rows ?? [],
|
|
3784
|
+
sx: { ".filterLabel": { display: "none" } },
|
|
3674
3785
|
filters: useMemo(() => this.parseFilters(), [this.state.filters]),
|
|
3675
3786
|
FiltersRenderer: useCallback(
|
|
3676
3787
|
(filterId) => this.state.filters.get(filterId).Component,
|
|
@@ -3854,7 +3965,8 @@ class QueryController {
|
|
|
3854
3965
|
}
|
|
3855
3966
|
async actualRefreshMethod(serverFirstRefresh) {
|
|
3856
3967
|
const newValues = this.getFiltersValuesMap();
|
|
3857
|
-
|
|
3968
|
+
const required = this.areRequiredFilters();
|
|
3969
|
+
if (!required) {
|
|
3858
3970
|
await this.mutex.acquire();
|
|
3859
3971
|
try {
|
|
3860
3972
|
this.tableController.state.finishedFirstLoad = false;
|
|
@@ -3876,11 +3988,28 @@ class QueryController {
|
|
|
3876
3988
|
this.mutex.release();
|
|
3877
3989
|
}
|
|
3878
3990
|
}
|
|
3991
|
+
if (required) {
|
|
3992
|
+
const names = required.map(
|
|
3993
|
+
(f) => f.filterState.title ?? f.filterState.column ?? f.filterState.id ?? ""
|
|
3994
|
+
).filter(Boolean).join(", ");
|
|
3995
|
+
ApiaUtil.instance.notifications.notify({
|
|
3996
|
+
message: getLabel("msgQryFilterRequiredList", {
|
|
3997
|
+
text: { TOK1: names }
|
|
3998
|
+
}).text,
|
|
3999
|
+
type: "warning"
|
|
4000
|
+
});
|
|
4001
|
+
}
|
|
3879
4002
|
}
|
|
3880
4003
|
areRequiredFilters() {
|
|
3881
|
-
|
|
4004
|
+
const requiredFilters = [
|
|
4005
|
+
...this.tableController.state.filters.values()
|
|
4006
|
+
].filter(
|
|
3882
4007
|
(c) => c.filterState.required && !c.filterState.value && !c.filterState.isHidden
|
|
3883
4008
|
);
|
|
4009
|
+
if (requiredFilters.length > 0) {
|
|
4010
|
+
return requiredFilters;
|
|
4011
|
+
}
|
|
4012
|
+
return false;
|
|
3884
4013
|
}
|
|
3885
4014
|
buildTableController() {
|
|
3886
4015
|
return new TableController();
|
|
@@ -4073,7 +4202,7 @@ class QueryController {
|
|
|
4073
4202
|
filterToId: f?.filterToId ?? f.type == "D" ? `filter${String(i + 1)}i` : void 0,
|
|
4074
4203
|
// Id generado en APIA
|
|
4075
4204
|
value: f.currentValue,
|
|
4076
|
-
avoidLabel: f.type === "D" || f.type === "date" ? true : false,
|
|
4205
|
+
avoidLabel: f.type === "D" || f.type === "date" || f.type === "S" || arrayOrArray(f?.filterOption).length > 0 || f.type === "N" ? true : false,
|
|
4077
4206
|
filterToValue: f?.filterToValue,
|
|
4078
4207
|
column: f.column,
|
|
4079
4208
|
isAdditional: f.asAdditional,
|
|
@@ -4093,7 +4222,7 @@ class QueryController {
|
|
|
4093
4222
|
] : void 0,
|
|
4094
4223
|
placeholder: f.title,
|
|
4095
4224
|
readonly: f.readonly,
|
|
4096
|
-
required: f.required === "true",
|
|
4225
|
+
required: f.required === "true" || f.required === "1" || f.dateRequired === "1",
|
|
4097
4226
|
runAutomatically: typedResponse?.filters.runFiltersAutomatically || f.detectOnChange
|
|
4098
4227
|
};
|
|
4099
4228
|
return filter;
|
|
@@ -4261,87 +4390,98 @@ const AdditionalFiltersComponent = observer(
|
|
|
4261
4390
|
return [...byGroup.values()];
|
|
4262
4391
|
})();
|
|
4263
4392
|
return /* @__PURE__ */ jsx(
|
|
4264
|
-
|
|
4393
|
+
Box,
|
|
4265
4394
|
{
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
{
|
|
4280
|
-
id: "Additional",
|
|
4281
|
-
buttonProps: {
|
|
4282
|
-
ariaLabel: window.ADDITIONAL_FILTERS_LABEL,
|
|
4283
|
-
label: window.ADDITIONAL_FILTERS_LABEL
|
|
4284
|
-
},
|
|
4285
|
-
children: /* @__PURE__ */ jsx(Additional, {})
|
|
4286
|
-
}
|
|
4287
|
-
),
|
|
4288
|
-
groupFilters.length > 0 && /* @__PURE__ */ jsx(Fragment, { children: groupFilters.map((g) => /* @__PURE__ */ jsx(
|
|
4289
|
-
AccordionItem,
|
|
4290
|
-
{
|
|
4291
|
-
id: `Group_${g.filterState.group}`,
|
|
4292
|
-
buttonProps: {
|
|
4293
|
-
ariaLabel: getLabel(`${g.filterState.group}`).text,
|
|
4294
|
-
label: getLabel(`${g.filterState.group}`).text
|
|
4295
|
-
},
|
|
4296
|
-
children: /* @__PURE__ */ jsxs(
|
|
4297
|
-
Box,
|
|
4395
|
+
sx: {
|
|
4396
|
+
".requiredMark": { display: "none" },
|
|
4397
|
+
".filter__query": {
|
|
4398
|
+
border: "1px solid #c6c6c6!important"
|
|
4399
|
+
}
|
|
4400
|
+
},
|
|
4401
|
+
children: /* @__PURE__ */ jsx(
|
|
4402
|
+
TableContextReproducer,
|
|
4403
|
+
{
|
|
4404
|
+
tableName: queryController.tableController.getTableName(),
|
|
4405
|
+
children: /* @__PURE__ */ jsxs(Accordion, { className: "additionalFiltersContent", singleExpand: true, children: [
|
|
4406
|
+
hasFilters && /* @__PURE__ */ jsx(
|
|
4407
|
+
AccordionItem,
|
|
4298
4408
|
{
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4409
|
+
id: "Responsive",
|
|
4410
|
+
defaultExpanded: true,
|
|
4411
|
+
buttonProps: { ariaLabel: filterTitle, label: filterTitle },
|
|
4412
|
+
children: /* @__PURE__ */ jsx(Responsive, {})
|
|
4413
|
+
}
|
|
4414
|
+
),
|
|
4415
|
+
hasAdditional && /* @__PURE__ */ jsx(
|
|
4416
|
+
AccordionItem,
|
|
4417
|
+
{
|
|
4418
|
+
id: "Additional",
|
|
4419
|
+
buttonProps: {
|
|
4420
|
+
ariaLabel: window.ADDITIONAL_FILTERS_LABEL,
|
|
4421
|
+
label: window.ADDITIONAL_FILTERS_LABEL
|
|
4305
4422
|
},
|
|
4306
|
-
children:
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4423
|
+
children: /* @__PURE__ */ jsx(Additional, {})
|
|
4424
|
+
}
|
|
4425
|
+
),
|
|
4426
|
+
groupFilters.length > 0 && /* @__PURE__ */ jsx(Fragment, { children: groupFilters.map((g) => /* @__PURE__ */ jsx(
|
|
4427
|
+
AccordionItem,
|
|
4428
|
+
{
|
|
4429
|
+
id: `Group_${g.filterState.group}`,
|
|
4430
|
+
buttonProps: {
|
|
4431
|
+
ariaLabel: getLabel(`${g.filterState.group}`).text,
|
|
4432
|
+
label: getLabel(`${g.filterState.group}`).text
|
|
4433
|
+
},
|
|
4434
|
+
children: /* @__PURE__ */ jsxs(
|
|
4435
|
+
Box,
|
|
4436
|
+
{
|
|
4437
|
+
sx: {
|
|
4438
|
+
display: "flex",
|
|
4439
|
+
flexDirection: "column",
|
|
4440
|
+
alignItems: "end",
|
|
4441
|
+
gap: 3,
|
|
4442
|
+
width: "100%"
|
|
4312
4443
|
},
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4444
|
+
children: [
|
|
4445
|
+
/* @__PURE__ */ jsx(
|
|
4446
|
+
Grouped,
|
|
4447
|
+
{
|
|
4448
|
+
tableName: queryController.tableController.getTableName(),
|
|
4449
|
+
group: g.filterState?.group ?? ""
|
|
4450
|
+
},
|
|
4451
|
+
g.filterState.group
|
|
4452
|
+
),
|
|
4453
|
+
g.filterState.addFilter && /* @__PURE__ */ jsx(
|
|
4454
|
+
SimpleButton,
|
|
4455
|
+
{
|
|
4456
|
+
variant: "outline-sm",
|
|
4457
|
+
onClick: g.filterState.addFilter,
|
|
4458
|
+
children: getLabel("lblAddFil").text
|
|
4459
|
+
}
|
|
4460
|
+
)
|
|
4461
|
+
]
|
|
4462
|
+
}
|
|
4463
|
+
)
|
|
4464
|
+
}
|
|
4465
|
+
)) }),
|
|
4466
|
+
hasSortable && /* @__PURE__ */ jsx(
|
|
4467
|
+
AccordionItem,
|
|
4468
|
+
{
|
|
4469
|
+
id: "Sort",
|
|
4470
|
+
buttonProps: { ariaLabel: sortTitle, label: sortTitle },
|
|
4471
|
+
children: /* @__PURE__ */ jsx(Sort, {})
|
|
4472
|
+
}
|
|
4473
|
+
),
|
|
4474
|
+
hasFilters && !queryController.structure?.hideFilterTypes && /* @__PURE__ */ jsx(
|
|
4475
|
+
AccordionItem,
|
|
4476
|
+
{
|
|
4477
|
+
id: "FilterTypes",
|
|
4478
|
+
buttonProps: { ariaLabel: filterTypes, label: filterTypes },
|
|
4479
|
+
children: /* @__PURE__ */ jsx(FilterTypesComponent, { queryController })
|
|
4324
4480
|
}
|
|
4325
4481
|
)
|
|
4326
|
-
}
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
AccordionItem,
|
|
4330
|
-
{
|
|
4331
|
-
id: "Sort",
|
|
4332
|
-
buttonProps: { ariaLabel: sortTitle, label: sortTitle },
|
|
4333
|
-
children: /* @__PURE__ */ jsx(Sort, {})
|
|
4334
|
-
}
|
|
4335
|
-
),
|
|
4336
|
-
hasFilters && !queryController.structure?.hideFilterTypes && /* @__PURE__ */ jsx(
|
|
4337
|
-
AccordionItem,
|
|
4338
|
-
{
|
|
4339
|
-
id: "FilterTypes",
|
|
4340
|
-
buttonProps: { ariaLabel: filterTypes, label: filterTypes },
|
|
4341
|
-
children: /* @__PURE__ */ jsx(FilterTypesComponent, { queryController })
|
|
4342
|
-
}
|
|
4343
|
-
)
|
|
4344
|
-
] })
|
|
4482
|
+
] })
|
|
4483
|
+
}
|
|
4484
|
+
)
|
|
4345
4485
|
}
|
|
4346
4486
|
);
|
|
4347
4487
|
}
|
|
@@ -4398,7 +4538,7 @@ class AdditionalFiltersModal {
|
|
|
4398
4538
|
},
|
|
4399
4539
|
draggable: true,
|
|
4400
4540
|
variant: "layout.common.modals.apiaFinder.additionalFiltersModal",
|
|
4401
|
-
size: "
|
|
4541
|
+
size: "lg"
|
|
4402
4542
|
};
|
|
4403
4543
|
}
|
|
4404
4544
|
async openModal(properties) {
|
|
@@ -4430,6 +4570,7 @@ const NavBarRenderer = observer(
|
|
|
4430
4570
|
onClick: () => {
|
|
4431
4571
|
queryController.refresh();
|
|
4432
4572
|
},
|
|
4573
|
+
"data-test-id": "btn_search",
|
|
4433
4574
|
children: queryController.tableController.state.isLoading ? /* @__PURE__ */ jsx(Spinner, { sx: { color: "white", height: "17px" } }) : getLabel("btnSearch").text
|
|
4434
4575
|
}
|
|
4435
4576
|
),
|
|
@@ -4441,6 +4582,7 @@ const NavBarRenderer = observer(
|
|
|
4441
4582
|
onClick: async () => {
|
|
4442
4583
|
additionalFiltersController.openModal();
|
|
4443
4584
|
},
|
|
4585
|
+
"data-test-id": "btn-additional-filters",
|
|
4444
4586
|
children: getLabel("titAdmAdtFilter").text
|
|
4445
4587
|
}
|
|
4446
4588
|
),
|
|
@@ -4450,6 +4592,7 @@ const NavBarRenderer = observer(
|
|
|
4450
4592
|
size: "sm",
|
|
4451
4593
|
variant: "outline",
|
|
4452
4594
|
onClick: () => queryController.clearFilters(),
|
|
4595
|
+
"data-test-id": "btn-clear-filters",
|
|
4453
4596
|
children: getLabel("btnClearFilter").text
|
|
4454
4597
|
}
|
|
4455
4598
|
)
|