@charlesgomes/leafcode-shared-lib-react 1.0.64 → 1.0.65
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/index.d.mts +9 -7
- package/dist/index.d.ts +9 -7
- package/dist/index.js +83 -75
- package/dist/index.mjs +82 -74
- package/dist/styles/input.css +10 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -201,8 +201,10 @@ declare const customMatchModes: {
|
|
|
201
201
|
notEndsWith: string;
|
|
202
202
|
empty: string;
|
|
203
203
|
notEmpty: string;
|
|
204
|
+
dateBeforeAndEquals: string;
|
|
205
|
+
dateAfterAndEquals: string;
|
|
204
206
|
};
|
|
205
|
-
declare const getDefaultFilterMatchOptionsString: (isLanguagePtBr?: boolean) => {
|
|
207
|
+
declare const getDefaultFilterMatchOptionsString: (isLanguagePtBr?: boolean, isNullable?: boolean) => {
|
|
206
208
|
label: string;
|
|
207
209
|
value: string;
|
|
208
210
|
}[];
|
|
@@ -210,17 +212,17 @@ declare const getDefaultFilterMatchOptionsStringArray: (isLanguagePtBr?: boolean
|
|
|
210
212
|
label: string;
|
|
211
213
|
value: FilterMatchMode;
|
|
212
214
|
}[];
|
|
213
|
-
declare const getDefaultFilterMatchOptionsDate: (isLanguagePtBr: boolean) => {
|
|
215
|
+
declare const getDefaultFilterMatchOptionsDate: (isLanguagePtBr: boolean, isNullable?: boolean) => {
|
|
214
216
|
label: string;
|
|
215
|
-
value:
|
|
217
|
+
value: string;
|
|
216
218
|
}[];
|
|
217
|
-
declare const getDefaultFilterMatchOptionsEnum: (isLanguagePtBr: boolean) => {
|
|
219
|
+
declare const getDefaultFilterMatchOptionsEnum: (isLanguagePtBr: boolean, isNullable?: boolean) => {
|
|
218
220
|
label: string;
|
|
219
221
|
value: string;
|
|
220
222
|
}[];
|
|
221
|
-
declare const
|
|
223
|
+
declare const getNullable: (isLanguagePtBr: boolean) => {
|
|
222
224
|
label: string;
|
|
223
|
-
value:
|
|
225
|
+
value: string;
|
|
224
226
|
}[];
|
|
225
227
|
|
|
226
228
|
declare const mapPrimeToBackendFilters: (filters: any, globalFilterFields: string[]) => {
|
|
@@ -329,4 +331,4 @@ declare const LeafcodeThemeProvider: ({ children, theme, }: LeafcodeThemeProvide
|
|
|
329
331
|
|
|
330
332
|
declare const defaultTheme: LeafcodeTheme;
|
|
331
333
|
|
|
332
|
-
export { Button, type ColumnCustom, CustomFilterElement, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, Input, InputAutoComplete, InputSelect, LeafcodeThemeProvider, ModalBase, SelectFilterTemplate, TextArea, ValueFilterTemplate, buildDynamicCampoFilters, buildSortingWithFilters, customMatchModes, defaultTheme, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsEnum,
|
|
334
|
+
export { Button, type ColumnCustom, CustomFilterElement, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, Input, InputAutoComplete, InputSelect, LeafcodeThemeProvider, ModalBase, SelectFilterTemplate, TextArea, ValueFilterTemplate, buildDynamicCampoFilters, buildSortingWithFilters, customMatchModes, defaultTheme, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsEnum, getDefaultFilterMatchOptionsString, getDefaultFilterMatchOptionsStringArray, getNullable, getUrlParams, mapPrimeToBackendFilters };
|
package/dist/index.d.ts
CHANGED
|
@@ -201,8 +201,10 @@ declare const customMatchModes: {
|
|
|
201
201
|
notEndsWith: string;
|
|
202
202
|
empty: string;
|
|
203
203
|
notEmpty: string;
|
|
204
|
+
dateBeforeAndEquals: string;
|
|
205
|
+
dateAfterAndEquals: string;
|
|
204
206
|
};
|
|
205
|
-
declare const getDefaultFilterMatchOptionsString: (isLanguagePtBr?: boolean) => {
|
|
207
|
+
declare const getDefaultFilterMatchOptionsString: (isLanguagePtBr?: boolean, isNullable?: boolean) => {
|
|
206
208
|
label: string;
|
|
207
209
|
value: string;
|
|
208
210
|
}[];
|
|
@@ -210,17 +212,17 @@ declare const getDefaultFilterMatchOptionsStringArray: (isLanguagePtBr?: boolean
|
|
|
210
212
|
label: string;
|
|
211
213
|
value: FilterMatchMode;
|
|
212
214
|
}[];
|
|
213
|
-
declare const getDefaultFilterMatchOptionsDate: (isLanguagePtBr: boolean) => {
|
|
215
|
+
declare const getDefaultFilterMatchOptionsDate: (isLanguagePtBr: boolean, isNullable?: boolean) => {
|
|
214
216
|
label: string;
|
|
215
|
-
value:
|
|
217
|
+
value: string;
|
|
216
218
|
}[];
|
|
217
|
-
declare const getDefaultFilterMatchOptionsEnum: (isLanguagePtBr: boolean) => {
|
|
219
|
+
declare const getDefaultFilterMatchOptionsEnum: (isLanguagePtBr: boolean, isNullable?: boolean) => {
|
|
218
220
|
label: string;
|
|
219
221
|
value: string;
|
|
220
222
|
}[];
|
|
221
|
-
declare const
|
|
223
|
+
declare const getNullable: (isLanguagePtBr: boolean) => {
|
|
222
224
|
label: string;
|
|
223
|
-
value:
|
|
225
|
+
value: string;
|
|
224
226
|
}[];
|
|
225
227
|
|
|
226
228
|
declare const mapPrimeToBackendFilters: (filters: any, globalFilterFields: string[]) => {
|
|
@@ -329,4 +331,4 @@ declare const LeafcodeThemeProvider: ({ children, theme, }: LeafcodeThemeProvide
|
|
|
329
331
|
|
|
330
332
|
declare const defaultTheme: LeafcodeTheme;
|
|
331
333
|
|
|
332
|
-
export { Button, type ColumnCustom, CustomFilterElement, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, Input, InputAutoComplete, InputSelect, LeafcodeThemeProvider, ModalBase, SelectFilterTemplate, TextArea, ValueFilterTemplate, buildDynamicCampoFilters, buildSortingWithFilters, customMatchModes, defaultTheme, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsEnum,
|
|
334
|
+
export { Button, type ColumnCustom, CustomFilterElement, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, Input, InputAutoComplete, InputSelect, LeafcodeThemeProvider, ModalBase, SelectFilterTemplate, TextArea, ValueFilterTemplate, buildDynamicCampoFilters, buildSortingWithFilters, customMatchModes, defaultTheme, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsEnum, getDefaultFilterMatchOptionsString, getDefaultFilterMatchOptionsStringArray, getNullable, getUrlParams, mapPrimeToBackendFilters };
|
package/dist/index.js
CHANGED
|
@@ -51,9 +51,9 @@ __export(index_exports, {
|
|
|
51
51
|
defaultTheme: () => defaultTheme,
|
|
52
52
|
getDefaultFilterMatchOptionsDate: () => getDefaultFilterMatchOptionsDate,
|
|
53
53
|
getDefaultFilterMatchOptionsEnum: () => getDefaultFilterMatchOptionsEnum,
|
|
54
|
-
getDefaultFilterMatchOptionsEnumNotNullable: () => getDefaultFilterMatchOptionsEnumNotNullable,
|
|
55
54
|
getDefaultFilterMatchOptionsString: () => getDefaultFilterMatchOptionsString,
|
|
56
55
|
getDefaultFilterMatchOptionsStringArray: () => getDefaultFilterMatchOptionsStringArray,
|
|
56
|
+
getNullable: () => getNullable,
|
|
57
57
|
getUrlParams: () => getUrlParams,
|
|
58
58
|
mapPrimeToBackendFilters: () => mapPrimeToBackendFilters
|
|
59
59
|
});
|
|
@@ -328,6 +328,9 @@ var InputBase = ({
|
|
|
328
328
|
"--label-line": theme.colors.light,
|
|
329
329
|
"--input-border": theme.components.input.colors.border,
|
|
330
330
|
"--input-bg": theme.components.input.colors.background,
|
|
331
|
+
"--autofill-box-shadow": theme.components.input.colors.background,
|
|
332
|
+
"--autofill-text-color": theme.components.input.colors.text,
|
|
333
|
+
"--autofill-border": theme.components.input.colors.focusBorder,
|
|
331
334
|
"--input-text-color": theme.components.input.colors.text,
|
|
332
335
|
"--input-placeholder": theme.components.input.colors.placeholder,
|
|
333
336
|
"--input-focus-border": theme.components.input.colors.focusBorder,
|
|
@@ -425,6 +428,8 @@ var TextAreaBase = ({
|
|
|
425
428
|
"--label-line": theme.colors.light,
|
|
426
429
|
"--input-border": theme.components.input.colors.border,
|
|
427
430
|
"--input-bg": theme.components.input.colors.background,
|
|
431
|
+
"--autofill-box-shadow": theme.components.input.colors.background,
|
|
432
|
+
"--autofill-text-color": theme.components.input.colors.text,
|
|
428
433
|
"--input-text-color": theme.components.input.colors.text,
|
|
429
434
|
"--input-placeholder": theme.components.input.colors.placeholder,
|
|
430
435
|
"--input-focus-border": theme.components.input.colors.focusBorder,
|
|
@@ -1785,7 +1790,7 @@ var ValueFilterTemplate = (options, mask) => {
|
|
|
1785
1790
|
return;
|
|
1786
1791
|
}
|
|
1787
1792
|
const valueToFilter = mask ? mask(rawValue) : rawValue;
|
|
1788
|
-
options.filterCallback(valueToFilter, options.index);
|
|
1793
|
+
options.filterCallback(String(valueToFilter), options.index);
|
|
1789
1794
|
};
|
|
1790
1795
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1791
1796
|
import_inputnumber.InputNumber,
|
|
@@ -1936,50 +1941,47 @@ var customMatchModes = {
|
|
|
1936
1941
|
notStartsWith: "notStartsWith",
|
|
1937
1942
|
notEndsWith: "notEndsWith",
|
|
1938
1943
|
empty: "empty",
|
|
1939
|
-
notEmpty: "notEmpty"
|
|
1944
|
+
notEmpty: "notEmpty",
|
|
1945
|
+
dateBeforeAndEquals: "dateBeforeAndEquals",
|
|
1946
|
+
dateAfterAndEquals: "dateAfterAndEquals"
|
|
1947
|
+
};
|
|
1948
|
+
var getDefaultFilterMatchOptionsString = (isLanguagePtBr = true, isNullable = true) => {
|
|
1949
|
+
const baseOptions = [
|
|
1950
|
+
{
|
|
1951
|
+
label: isLanguagePtBr ? "Cont\xE9m" : "Contains",
|
|
1952
|
+
value: import_api3.FilterMatchMode.CONTAINS
|
|
1953
|
+
},
|
|
1954
|
+
{
|
|
1955
|
+
label: isLanguagePtBr ? "N\xE3o cont\xE9m" : "Does not contain",
|
|
1956
|
+
value: import_api3.FilterMatchMode.NOT_CONTAINS
|
|
1957
|
+
},
|
|
1958
|
+
{
|
|
1959
|
+
label: isLanguagePtBr ? "Igual" : "Equals",
|
|
1960
|
+
value: import_api3.FilterMatchMode.EQUALS
|
|
1961
|
+
},
|
|
1962
|
+
{
|
|
1963
|
+
label: isLanguagePtBr ? "Diferente" : "Not equals",
|
|
1964
|
+
value: import_api3.FilterMatchMode.NOT_EQUALS
|
|
1965
|
+
},
|
|
1966
|
+
{
|
|
1967
|
+
label: isLanguagePtBr ? "Come\xE7a com" : "Starts with",
|
|
1968
|
+
value: import_api3.FilterMatchMode.STARTS_WITH
|
|
1969
|
+
},
|
|
1970
|
+
{
|
|
1971
|
+
label: isLanguagePtBr ? "N\xE3o come\xE7a com" : "Does not start with",
|
|
1972
|
+
value: customMatchModes.notStartsWith
|
|
1973
|
+
},
|
|
1974
|
+
{
|
|
1975
|
+
label: isLanguagePtBr ? "Termina com" : "Ends with",
|
|
1976
|
+
value: import_api3.FilterMatchMode.ENDS_WITH
|
|
1977
|
+
},
|
|
1978
|
+
{
|
|
1979
|
+
label: isLanguagePtBr ? "N\xE3o termina com" : "Does not end with",
|
|
1980
|
+
value: customMatchModes.notEndsWith
|
|
1981
|
+
}
|
|
1982
|
+
];
|
|
1983
|
+
return isNullable ? [...baseOptions, ...getNullable(isLanguagePtBr)] : baseOptions;
|
|
1940
1984
|
};
|
|
1941
|
-
var getDefaultFilterMatchOptionsString = (isLanguagePtBr = true) => [
|
|
1942
|
-
{
|
|
1943
|
-
label: isLanguagePtBr ? "Cont\xE9m" : "Contains",
|
|
1944
|
-
value: import_api3.FilterMatchMode.CONTAINS
|
|
1945
|
-
},
|
|
1946
|
-
{
|
|
1947
|
-
label: isLanguagePtBr ? "N\xE3o cont\xE9m" : "Does not contain",
|
|
1948
|
-
value: import_api3.FilterMatchMode.NOT_CONTAINS
|
|
1949
|
-
},
|
|
1950
|
-
{
|
|
1951
|
-
label: isLanguagePtBr ? "Igual" : "Equals",
|
|
1952
|
-
value: import_api3.FilterMatchMode.EQUALS
|
|
1953
|
-
},
|
|
1954
|
-
{
|
|
1955
|
-
label: isLanguagePtBr ? "Diferente" : "Not equals",
|
|
1956
|
-
value: import_api3.FilterMatchMode.NOT_EQUALS
|
|
1957
|
-
},
|
|
1958
|
-
{
|
|
1959
|
-
label: isLanguagePtBr ? "Come\xE7a com" : "Starts with",
|
|
1960
|
-
value: import_api3.FilterMatchMode.STARTS_WITH
|
|
1961
|
-
},
|
|
1962
|
-
{
|
|
1963
|
-
label: isLanguagePtBr ? "N\xE3o come\xE7a com" : "Does not start with",
|
|
1964
|
-
value: customMatchModes.notStartsWith
|
|
1965
|
-
},
|
|
1966
|
-
{
|
|
1967
|
-
label: isLanguagePtBr ? "Termina com" : "Ends with",
|
|
1968
|
-
value: import_api3.FilterMatchMode.ENDS_WITH
|
|
1969
|
-
},
|
|
1970
|
-
{
|
|
1971
|
-
label: isLanguagePtBr ? "N\xE3o termina com" : "Does not end with",
|
|
1972
|
-
value: customMatchModes.notEndsWith
|
|
1973
|
-
},
|
|
1974
|
-
{
|
|
1975
|
-
label: isLanguagePtBr ? "Vazio" : "Empty",
|
|
1976
|
-
value: customMatchModes.empty
|
|
1977
|
-
},
|
|
1978
|
-
{
|
|
1979
|
-
label: isLanguagePtBr ? "N\xE3o Vazio" : "NotEmpty",
|
|
1980
|
-
value: customMatchModes.notEmpty
|
|
1981
|
-
}
|
|
1982
|
-
];
|
|
1983
1985
|
var getDefaultFilterMatchOptionsStringArray = (isLanguagePtBr = true) => [
|
|
1984
1986
|
{
|
|
1985
1987
|
label: isLanguagePtBr ? "Cont\xE9m" : "Contains",
|
|
@@ -1990,25 +1992,41 @@ var getDefaultFilterMatchOptionsStringArray = (isLanguagePtBr = true) => [
|
|
|
1990
1992
|
value: import_api3.FilterMatchMode.NOT_CONTAINS
|
|
1991
1993
|
}
|
|
1992
1994
|
];
|
|
1993
|
-
var getDefaultFilterMatchOptionsDate = (isLanguagePtBr) =>
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
1995
|
+
var getDefaultFilterMatchOptionsDate = (isLanguagePtBr, isNullable = true) => {
|
|
1996
|
+
const baseOptions = [
|
|
1997
|
+
{
|
|
1998
|
+
label: isLanguagePtBr ? "Data anterior a" : "Date before",
|
|
1999
|
+
value: import_api3.FilterMatchMode.DATE_BEFORE
|
|
2000
|
+
},
|
|
2001
|
+
{
|
|
2002
|
+
label: isLanguagePtBr ? "Data anterior ou igual a" : "Date prior to or equal to",
|
|
2003
|
+
value: customMatchModes.dateBeforeAndEquals
|
|
2004
|
+
},
|
|
2005
|
+
{
|
|
2006
|
+
label: isLanguagePtBr ? "Data posterior a" : "Date after",
|
|
2007
|
+
value: import_api3.FilterMatchMode.DATE_AFTER
|
|
2008
|
+
},
|
|
2009
|
+
{
|
|
2010
|
+
label: isLanguagePtBr ? "Data posterior ou igual a" : "Date later than or equal to",
|
|
2011
|
+
value: customMatchModes.dateAfterAndEquals
|
|
2012
|
+
}
|
|
2013
|
+
];
|
|
2014
|
+
return isNullable ? [...baseOptions, ...getNullable(isLanguagePtBr)] : baseOptions;
|
|
2015
|
+
};
|
|
2016
|
+
var getDefaultFilterMatchOptionsEnum = (isLanguagePtBr, isNullable = true) => {
|
|
2017
|
+
const baseOptions = [
|
|
2018
|
+
{
|
|
2019
|
+
label: isLanguagePtBr ? "Igual" : "Equals",
|
|
2020
|
+
value: import_api3.FilterMatchMode.EQUALS
|
|
2021
|
+
},
|
|
2022
|
+
{
|
|
2023
|
+
label: isLanguagePtBr ? "Diferente" : "Not equals",
|
|
2024
|
+
value: import_api3.FilterMatchMode.NOT_EQUALS
|
|
2025
|
+
}
|
|
2026
|
+
];
|
|
2027
|
+
return isNullable ? [...baseOptions, ...getNullable(isLanguagePtBr)] : baseOptions;
|
|
2028
|
+
};
|
|
2029
|
+
var getNullable = (isLanguagePtBr) => [
|
|
2012
2030
|
{
|
|
2013
2031
|
label: isLanguagePtBr ? "Vazio" : "Empty",
|
|
2014
2032
|
value: customMatchModes.empty
|
|
@@ -2018,16 +2036,6 @@ var getDefaultFilterMatchOptionsEnum = (isLanguagePtBr) => [
|
|
|
2018
2036
|
value: customMatchModes.notEmpty
|
|
2019
2037
|
}
|
|
2020
2038
|
];
|
|
2021
|
-
var getDefaultFilterMatchOptionsEnumNotNullable = (isLanguagePtBr) => [
|
|
2022
|
-
{
|
|
2023
|
-
label: isLanguagePtBr ? "Igual" : "Equals",
|
|
2024
|
-
value: import_api3.FilterMatchMode.EQUALS
|
|
2025
|
-
},
|
|
2026
|
-
{
|
|
2027
|
-
label: isLanguagePtBr ? "Diferente" : "Not equals",
|
|
2028
|
-
value: import_api3.FilterMatchMode.NOT_EQUALS
|
|
2029
|
-
}
|
|
2030
|
-
];
|
|
2031
2039
|
|
|
2032
2040
|
// src/components/DataTableAdvancedFilter/utils/DataTableUtils.tsx
|
|
2033
2041
|
var import_api4 = require("primereact/api");
|
|
@@ -2336,9 +2344,9 @@ var import_api5 = require("primereact/api");
|
|
|
2336
2344
|
defaultTheme,
|
|
2337
2345
|
getDefaultFilterMatchOptionsDate,
|
|
2338
2346
|
getDefaultFilterMatchOptionsEnum,
|
|
2339
|
-
getDefaultFilterMatchOptionsEnumNotNullable,
|
|
2340
2347
|
getDefaultFilterMatchOptionsString,
|
|
2341
2348
|
getDefaultFilterMatchOptionsStringArray,
|
|
2349
|
+
getNullable,
|
|
2342
2350
|
getUrlParams,
|
|
2343
2351
|
mapPrimeToBackendFilters
|
|
2344
2352
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -270,6 +270,9 @@ var InputBase = ({
|
|
|
270
270
|
"--label-line": theme.colors.light,
|
|
271
271
|
"--input-border": theme.components.input.colors.border,
|
|
272
272
|
"--input-bg": theme.components.input.colors.background,
|
|
273
|
+
"--autofill-box-shadow": theme.components.input.colors.background,
|
|
274
|
+
"--autofill-text-color": theme.components.input.colors.text,
|
|
275
|
+
"--autofill-border": theme.components.input.colors.focusBorder,
|
|
273
276
|
"--input-text-color": theme.components.input.colors.text,
|
|
274
277
|
"--input-placeholder": theme.components.input.colors.placeholder,
|
|
275
278
|
"--input-focus-border": theme.components.input.colors.focusBorder,
|
|
@@ -367,6 +370,8 @@ var TextAreaBase = ({
|
|
|
367
370
|
"--label-line": theme.colors.light,
|
|
368
371
|
"--input-border": theme.components.input.colors.border,
|
|
369
372
|
"--input-bg": theme.components.input.colors.background,
|
|
373
|
+
"--autofill-box-shadow": theme.components.input.colors.background,
|
|
374
|
+
"--autofill-text-color": theme.components.input.colors.text,
|
|
370
375
|
"--input-text-color": theme.components.input.colors.text,
|
|
371
376
|
"--input-placeholder": theme.components.input.colors.placeholder,
|
|
372
377
|
"--input-focus-border": theme.components.input.colors.focusBorder,
|
|
@@ -1736,7 +1741,7 @@ var ValueFilterTemplate = (options, mask) => {
|
|
|
1736
1741
|
return;
|
|
1737
1742
|
}
|
|
1738
1743
|
const valueToFilter = mask ? mask(rawValue) : rawValue;
|
|
1739
|
-
options.filterCallback(valueToFilter, options.index);
|
|
1744
|
+
options.filterCallback(String(valueToFilter), options.index);
|
|
1740
1745
|
};
|
|
1741
1746
|
return /* @__PURE__ */ jsx18(
|
|
1742
1747
|
InputNumber,
|
|
@@ -1887,50 +1892,47 @@ var customMatchModes = {
|
|
|
1887
1892
|
notStartsWith: "notStartsWith",
|
|
1888
1893
|
notEndsWith: "notEndsWith",
|
|
1889
1894
|
empty: "empty",
|
|
1890
|
-
notEmpty: "notEmpty"
|
|
1895
|
+
notEmpty: "notEmpty",
|
|
1896
|
+
dateBeforeAndEquals: "dateBeforeAndEquals",
|
|
1897
|
+
dateAfterAndEquals: "dateAfterAndEquals"
|
|
1898
|
+
};
|
|
1899
|
+
var getDefaultFilterMatchOptionsString = (isLanguagePtBr = true, isNullable = true) => {
|
|
1900
|
+
const baseOptions = [
|
|
1901
|
+
{
|
|
1902
|
+
label: isLanguagePtBr ? "Cont\xE9m" : "Contains",
|
|
1903
|
+
value: FilterMatchMode3.CONTAINS
|
|
1904
|
+
},
|
|
1905
|
+
{
|
|
1906
|
+
label: isLanguagePtBr ? "N\xE3o cont\xE9m" : "Does not contain",
|
|
1907
|
+
value: FilterMatchMode3.NOT_CONTAINS
|
|
1908
|
+
},
|
|
1909
|
+
{
|
|
1910
|
+
label: isLanguagePtBr ? "Igual" : "Equals",
|
|
1911
|
+
value: FilterMatchMode3.EQUALS
|
|
1912
|
+
},
|
|
1913
|
+
{
|
|
1914
|
+
label: isLanguagePtBr ? "Diferente" : "Not equals",
|
|
1915
|
+
value: FilterMatchMode3.NOT_EQUALS
|
|
1916
|
+
},
|
|
1917
|
+
{
|
|
1918
|
+
label: isLanguagePtBr ? "Come\xE7a com" : "Starts with",
|
|
1919
|
+
value: FilterMatchMode3.STARTS_WITH
|
|
1920
|
+
},
|
|
1921
|
+
{
|
|
1922
|
+
label: isLanguagePtBr ? "N\xE3o come\xE7a com" : "Does not start with",
|
|
1923
|
+
value: customMatchModes.notStartsWith
|
|
1924
|
+
},
|
|
1925
|
+
{
|
|
1926
|
+
label: isLanguagePtBr ? "Termina com" : "Ends with",
|
|
1927
|
+
value: FilterMatchMode3.ENDS_WITH
|
|
1928
|
+
},
|
|
1929
|
+
{
|
|
1930
|
+
label: isLanguagePtBr ? "N\xE3o termina com" : "Does not end with",
|
|
1931
|
+
value: customMatchModes.notEndsWith
|
|
1932
|
+
}
|
|
1933
|
+
];
|
|
1934
|
+
return isNullable ? [...baseOptions, ...getNullable(isLanguagePtBr)] : baseOptions;
|
|
1891
1935
|
};
|
|
1892
|
-
var getDefaultFilterMatchOptionsString = (isLanguagePtBr = true) => [
|
|
1893
|
-
{
|
|
1894
|
-
label: isLanguagePtBr ? "Cont\xE9m" : "Contains",
|
|
1895
|
-
value: FilterMatchMode3.CONTAINS
|
|
1896
|
-
},
|
|
1897
|
-
{
|
|
1898
|
-
label: isLanguagePtBr ? "N\xE3o cont\xE9m" : "Does not contain",
|
|
1899
|
-
value: FilterMatchMode3.NOT_CONTAINS
|
|
1900
|
-
},
|
|
1901
|
-
{
|
|
1902
|
-
label: isLanguagePtBr ? "Igual" : "Equals",
|
|
1903
|
-
value: FilterMatchMode3.EQUALS
|
|
1904
|
-
},
|
|
1905
|
-
{
|
|
1906
|
-
label: isLanguagePtBr ? "Diferente" : "Not equals",
|
|
1907
|
-
value: FilterMatchMode3.NOT_EQUALS
|
|
1908
|
-
},
|
|
1909
|
-
{
|
|
1910
|
-
label: isLanguagePtBr ? "Come\xE7a com" : "Starts with",
|
|
1911
|
-
value: FilterMatchMode3.STARTS_WITH
|
|
1912
|
-
},
|
|
1913
|
-
{
|
|
1914
|
-
label: isLanguagePtBr ? "N\xE3o come\xE7a com" : "Does not start with",
|
|
1915
|
-
value: customMatchModes.notStartsWith
|
|
1916
|
-
},
|
|
1917
|
-
{
|
|
1918
|
-
label: isLanguagePtBr ? "Termina com" : "Ends with",
|
|
1919
|
-
value: FilterMatchMode3.ENDS_WITH
|
|
1920
|
-
},
|
|
1921
|
-
{
|
|
1922
|
-
label: isLanguagePtBr ? "N\xE3o termina com" : "Does not end with",
|
|
1923
|
-
value: customMatchModes.notEndsWith
|
|
1924
|
-
},
|
|
1925
|
-
{
|
|
1926
|
-
label: isLanguagePtBr ? "Vazio" : "Empty",
|
|
1927
|
-
value: customMatchModes.empty
|
|
1928
|
-
},
|
|
1929
|
-
{
|
|
1930
|
-
label: isLanguagePtBr ? "N\xE3o Vazio" : "NotEmpty",
|
|
1931
|
-
value: customMatchModes.notEmpty
|
|
1932
|
-
}
|
|
1933
|
-
];
|
|
1934
1936
|
var getDefaultFilterMatchOptionsStringArray = (isLanguagePtBr = true) => [
|
|
1935
1937
|
{
|
|
1936
1938
|
label: isLanguagePtBr ? "Cont\xE9m" : "Contains",
|
|
@@ -1941,25 +1943,41 @@ var getDefaultFilterMatchOptionsStringArray = (isLanguagePtBr = true) => [
|
|
|
1941
1943
|
value: FilterMatchMode3.NOT_CONTAINS
|
|
1942
1944
|
}
|
|
1943
1945
|
];
|
|
1944
|
-
var getDefaultFilterMatchOptionsDate = (isLanguagePtBr) =>
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1946
|
+
var getDefaultFilterMatchOptionsDate = (isLanguagePtBr, isNullable = true) => {
|
|
1947
|
+
const baseOptions = [
|
|
1948
|
+
{
|
|
1949
|
+
label: isLanguagePtBr ? "Data anterior a" : "Date before",
|
|
1950
|
+
value: FilterMatchMode3.DATE_BEFORE
|
|
1951
|
+
},
|
|
1952
|
+
{
|
|
1953
|
+
label: isLanguagePtBr ? "Data anterior ou igual a" : "Date prior to or equal to",
|
|
1954
|
+
value: customMatchModes.dateBeforeAndEquals
|
|
1955
|
+
},
|
|
1956
|
+
{
|
|
1957
|
+
label: isLanguagePtBr ? "Data posterior a" : "Date after",
|
|
1958
|
+
value: FilterMatchMode3.DATE_AFTER
|
|
1959
|
+
},
|
|
1960
|
+
{
|
|
1961
|
+
label: isLanguagePtBr ? "Data posterior ou igual a" : "Date later than or equal to",
|
|
1962
|
+
value: customMatchModes.dateAfterAndEquals
|
|
1963
|
+
}
|
|
1964
|
+
];
|
|
1965
|
+
return isNullable ? [...baseOptions, ...getNullable(isLanguagePtBr)] : baseOptions;
|
|
1966
|
+
};
|
|
1967
|
+
var getDefaultFilterMatchOptionsEnum = (isLanguagePtBr, isNullable = true) => {
|
|
1968
|
+
const baseOptions = [
|
|
1969
|
+
{
|
|
1970
|
+
label: isLanguagePtBr ? "Igual" : "Equals",
|
|
1971
|
+
value: FilterMatchMode3.EQUALS
|
|
1972
|
+
},
|
|
1973
|
+
{
|
|
1974
|
+
label: isLanguagePtBr ? "Diferente" : "Not equals",
|
|
1975
|
+
value: FilterMatchMode3.NOT_EQUALS
|
|
1976
|
+
}
|
|
1977
|
+
];
|
|
1978
|
+
return isNullable ? [...baseOptions, ...getNullable(isLanguagePtBr)] : baseOptions;
|
|
1979
|
+
};
|
|
1980
|
+
var getNullable = (isLanguagePtBr) => [
|
|
1963
1981
|
{
|
|
1964
1982
|
label: isLanguagePtBr ? "Vazio" : "Empty",
|
|
1965
1983
|
value: customMatchModes.empty
|
|
@@ -1969,16 +1987,6 @@ var getDefaultFilterMatchOptionsEnum = (isLanguagePtBr) => [
|
|
|
1969
1987
|
value: customMatchModes.notEmpty
|
|
1970
1988
|
}
|
|
1971
1989
|
];
|
|
1972
|
-
var getDefaultFilterMatchOptionsEnumNotNullable = (isLanguagePtBr) => [
|
|
1973
|
-
{
|
|
1974
|
-
label: isLanguagePtBr ? "Igual" : "Equals",
|
|
1975
|
-
value: FilterMatchMode3.EQUALS
|
|
1976
|
-
},
|
|
1977
|
-
{
|
|
1978
|
-
label: isLanguagePtBr ? "Diferente" : "Not equals",
|
|
1979
|
-
value: FilterMatchMode3.NOT_EQUALS
|
|
1980
|
-
}
|
|
1981
|
-
];
|
|
1982
1990
|
|
|
1983
1991
|
// src/components/DataTableAdvancedFilter/utils/DataTableUtils.tsx
|
|
1984
1992
|
import { FilterMatchMode as FilterMatchMode4, FilterOperator } from "primereact/api";
|
|
@@ -2286,9 +2294,9 @@ export {
|
|
|
2286
2294
|
defaultTheme,
|
|
2287
2295
|
getDefaultFilterMatchOptionsDate,
|
|
2288
2296
|
getDefaultFilterMatchOptionsEnum,
|
|
2289
|
-
getDefaultFilterMatchOptionsEnumNotNullable,
|
|
2290
2297
|
getDefaultFilterMatchOptionsString,
|
|
2291
2298
|
getDefaultFilterMatchOptionsStringArray,
|
|
2299
|
+
getNullable,
|
|
2292
2300
|
getUrlParams,
|
|
2293
2301
|
mapPrimeToBackendFilters
|
|
2294
2302
|
};
|
package/dist/styles/input.css
CHANGED
|
@@ -88,14 +88,22 @@
|
|
|
88
88
|
|
|
89
89
|
input:-webkit-autofill {
|
|
90
90
|
-webkit-box-shadow: 0 0 0 30px
|
|
91
|
-
light-dark(
|
|
91
|
+
light-dark(
|
|
92
|
+
var(--autofill-box-shadow, #fff),
|
|
93
|
+
var(--autofill-box-shadow, #fff)
|
|
94
|
+
)
|
|
95
|
+
inset !important;
|
|
92
96
|
-webkit-text-fill-color: var(--autofill-text-color, #070707) !important;
|
|
93
97
|
border: 1px solid var(--autofill-border, #ffffff);
|
|
94
98
|
}
|
|
95
99
|
|
|
96
100
|
input:-webkit-autofill:focus {
|
|
97
101
|
-webkit-box-shadow: 0 0 0 30px
|
|
98
|
-
light-dark(
|
|
102
|
+
light-dark(
|
|
103
|
+
var(--autofill-box-shadow, #fff),
|
|
104
|
+
var(--autofill-box-shadow, #fff)
|
|
105
|
+
)
|
|
106
|
+
inset !important;
|
|
99
107
|
-webkit-text-fill-color: var(--autofill-text-color, #070707) !important;
|
|
100
108
|
border: 1px solid var(--autofill-border, #ffffff);
|
|
101
109
|
}
|