@m4l/components 9.3.20-JT10102025.beta.1 → 9.3.20-JT10102025.beta.2

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.
@@ -12,7 +12,7 @@ class BooleanFilterHelpers {
12
12
  getDefaultFilter(field, fixed) {
13
13
  const defaultOperand1 = field.defaultOperand1;
14
14
  let isSet = false;
15
- if (fixed && defaultOperand1 !== void 0 && typeof defaultOperand1 === "boolean") {
15
+ if (defaultOperand1 !== void 0 && typeof defaultOperand1 === "boolean") {
16
16
  isSet = true;
17
17
  }
18
18
  const defaultFilter = {
@@ -19,7 +19,7 @@ class DateTimeFilterHelpers {
19
19
  const defaultOperand1 = field.defaultOperand1 && field.defaultOperand1 instanceof Date ? field.defaultOperand1 : defaultStartDate;
20
20
  const defaultOperand2 = field.defaultOperand2 && field.defaultOperand2 instanceof Date ? field.defaultOperand2 : defaultEndDate;
21
21
  let isSet = false;
22
- if (fixed && defaultOperand1 !== void 0) {
22
+ if (defaultOperand1 !== void 0) {
23
23
  isSet = true;
24
24
  }
25
25
  return {
@@ -15,12 +15,10 @@ class NumberFilterHelpers {
15
15
  const defaultOperand1 = field.defaultOperand1 ?? null;
16
16
  const defaultOperand2 = field.defaultOperand2 ?? null;
17
17
  let isSet = false;
18
- if (fixed) {
19
- if (["b"].includes(dOperator)) {
20
- isSet = defaultOperand1 !== null && defaultOperand2 !== null ? true : false;
21
- } else {
22
- isSet = defaultOperand1 !== null ? true : false;
23
- }
18
+ if (["b"].includes(dOperator)) {
19
+ isSet = defaultOperand1 !== null && defaultOperand2 !== null ? true : false;
20
+ } else {
21
+ isSet = defaultOperand1 !== null ? true : false;
24
22
  }
25
23
  return {
26
24
  id: 0,
@@ -85,7 +83,9 @@ class NumberFilterHelpers {
85
83
  }
86
84
  return {
87
85
  labelField: filter.field.label ?? getLabel(filter.field.dictionaryId),
88
- labelOperator: getLabel(`${DYNAMIC_FILTER_DICTIONARY_ID}.operator_${filter.operator}`),
86
+ labelOperator: getLabel(
87
+ `${DYNAMIC_FILTER_DICTIONARY_ID}.operator_${filter.operator}`
88
+ ),
89
89
  labelOperands
90
90
  };
91
91
  }
@@ -100,7 +100,10 @@ class NumberFilterHelpers {
100
100
  ),
101
101
  formValueOperand2: Yup.mixed().when(["formValueOperator.id"], {
102
102
  is: "b",
103
- then: Yup.number().typeError(getLabel(DICCTIONARY.error_operand_mustbe_number)).min(Yup.ref("formValueOperand1"), getLabel(DICCTIONARY.error_less_than_start))
103
+ then: Yup.number().typeError(getLabel(DICCTIONARY.error_operand_mustbe_number)).min(
104
+ Yup.ref("formValueOperand1"),
105
+ getLabel(DICCTIONARY.error_less_than_start)
106
+ )
104
107
  })
105
108
  });
106
109
  }
@@ -27,7 +27,7 @@ class SelectAsyncFilterHelpers {
27
27
  let operandsArray = [];
28
28
  if (isMultiple) {
29
29
  dOperator = field.defaultOperator ?? "in";
30
- isSet = fixed ? defaultOperandsArray !== null && defaultOperandsArray.length > 0 ? true : false : false;
30
+ isSet = defaultOperandsArray !== null && defaultOperandsArray.length > 0;
31
31
  if (field.defaultOperandsArray !== void 0 && Array.isArray(field.defaultOperandsArray)) {
32
32
  operandsArray = filterValidOperandsArraySelectAsync(
33
33
  field.defaultOperandsArray,
@@ -36,7 +36,7 @@ class SelectAsyncFilterHelpers {
36
36
  }
37
37
  } else {
38
38
  dOperator = field.defaultOperator ?? "e";
39
- isSet = fixed ? defaultOperand1 ? true : false : false;
39
+ isSet = defaultOperand1 ? true : false;
40
40
  }
41
41
  const defaultCommonFilter = {
42
42
  id: 0,
@@ -26,7 +26,7 @@ class SelectFilterHelpers {
26
26
  let operandsArray = [];
27
27
  if (isMultiple) {
28
28
  dOperator = field.defaultOperator ?? "in";
29
- isSet = fixed ? defaultOperandsArray !== null && defaultOperandsArray.length > 0 ? true : false : false;
29
+ isSet = defaultOperandsArray !== null && defaultOperandsArray.length > 0;
30
30
  if (field.defaultOperandsArray !== void 0 && Array.isArray(field.defaultOperandsArray)) {
31
31
  operandsArray = filterValidOperandsArraySelect(
32
32
  field.defaultOperandsArray
@@ -34,7 +34,7 @@ class SelectFilterHelpers {
34
34
  }
35
35
  } else {
36
36
  dOperator = field.defaultOperator ?? "e";
37
- isSet = fixed ? defaultOperand1 !== null ? true : false : false;
37
+ isSet = defaultOperand1 !== null;
38
38
  }
39
39
  const defaultCommonFilter = {
40
40
  id: 0,
@@ -12,8 +12,8 @@ class StringFilterHelpers {
12
12
  getDefaultFilter(field, fixed) {
13
13
  const defaultOperand1 = field.defaultOperand1;
14
14
  let isSet = false;
15
- if (fixed) {
16
- isSet = defaultOperand1 !== null ? true : false;
15
+ if (defaultOperand1 !== null && typeof defaultOperand1 === "string") {
16
+ isSet = true;
17
17
  }
18
18
  const defaultFilter = {
19
19
  id: 0,
@@ -64,7 +64,9 @@ class StringFilterHelpers {
64
64
  const labelOperands = filter.operand1 !== void 0 ? filter.operand1 + "" : "";
65
65
  return {
66
66
  labelField: filter.field.label ?? getLabel(filter.field.dictionaryId),
67
- labelOperator: getLabel(`${DYNAMIC_FILTER_DICTIONARY_ID}.operator_${filter.operator}`),
67
+ labelOperator: getLabel(
68
+ `${DYNAMIC_FILTER_DICTIONARY_ID}.operator_${filter.operator}`
69
+ ),
68
70
  labelOperands
69
71
  };
70
72
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.3.20-JT10102025.beta.1",
3
+ "version": "9.3.20-JT10102025.beta.2",
4
4
  "license": "UNLICENSED",
5
5
  "description": "M4L Components",
6
6
  "lint-staged": {