@charlesgomes/leafcode-shared-lib-react 1.0.82 → 1.0.84

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 CHANGED
@@ -2,10 +2,9 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
3
  import react__default, { ReactNode as ReactNode$1, InputHTMLAttributes, JSX } from 'react';
4
4
  import { FieldError } from 'react-hook-form';
5
- import { FilterMatchMode } from 'primereact/api';
6
- export { FilterMatchMode, FilterOperator } from 'primereact/api';
7
5
  export { DataTableProps } from 'primereact/datatable';
8
6
  export { ColumnProps } from 'primereact/column';
7
+ export { FilterMatchMode, FilterOperator } from 'primereact/api';
9
8
 
10
9
  interface ButtonProps {
11
10
  disabled?: boolean;
@@ -208,7 +207,7 @@ interface IItemProps {
208
207
 
209
208
  declare const DateFilterTemplate: (options: any, mask?: (value: Date) => string) => react_jsx_runtime.JSX.Element;
210
209
  declare const DateTimeFilterTemplate: (options: any, mask?: (date: Date) => string) => react_jsx_runtime.JSX.Element;
211
- declare const ValueFilterTemplate: (options: any, mask?: (value: any) => string | number) => react_jsx_runtime.JSX.Element;
210
+ declare const ValueFilterTemplate: (options: any, mask?: (value: any) => string | number) => false | react_jsx_runtime.JSX.Element;
212
211
  declare const SelectFilterTemplate: (options: any, isLanguagePtBr?: boolean, items?: IItemProps[]) => react_jsx_runtime.JSX.Element;
213
212
  declare const CustomFilterElement: (options: any, isLanguagePtBr?: boolean) => false | react_jsx_runtime.JSX.Element;
214
213
 
@@ -219,24 +218,26 @@ declare const customMatchModes: {
219
218
  notEmpty: string;
220
219
  dateBeforeAndEquals: string;
221
220
  dateAfterAndEquals: string;
221
+ any: string;
222
+ none: string;
222
223
  };
223
- declare const getDefaultFilterMatchOptionsString: (isLanguagePtBr?: boolean, isNullable?: boolean) => {
224
+ declare const getDefaultFilterMatchOptionsString: (isLanguagePtBr?: boolean, isNullable?: boolean, isCollection?: boolean) => {
224
225
  label: string;
225
226
  value: string;
226
227
  }[];
227
- declare const getDefaultFilterMatchOptionsNumber: (isLanguagePtBr?: boolean, isNullable?: boolean) => {
228
+ declare const getDefaultFilterMatchOptionsNumber: (isLanguagePtBr?: boolean, isNullable?: boolean, isCollection?: boolean) => {
228
229
  label: string;
229
230
  value: string;
230
231
  }[];
231
- declare const getDefaultFilterMatchOptionsStringArray: (isLanguagePtBr?: boolean) => {
232
+ declare const getDefaultFilterMatchOptionsStringArray: (isLanguagePtBr?: boolean, isNullable?: boolean, isCollection?: boolean) => {
232
233
  label: string;
233
- value: FilterMatchMode;
234
+ value: string;
234
235
  }[];
235
- declare const getDefaultFilterMatchOptionsDate: (isLanguagePtBr: boolean, isNullable?: boolean) => {
236
+ declare const getDefaultFilterMatchOptionsDate: (isLanguagePtBr: boolean, isNullable?: boolean, isCollection?: boolean) => {
236
237
  label: string;
237
238
  value: string;
238
239
  }[];
239
- declare const getDefaultFilterMatchOptionsEnum: (isLanguagePtBr: boolean, isNullable?: boolean) => {
240
+ declare const getDefaultFilterMatchOptionsEnum: (isLanguagePtBr: boolean, isNullable?: boolean, isCollection?: boolean) => {
240
241
  label: string;
241
242
  value: string;
242
243
  }[];
@@ -244,6 +245,10 @@ declare const getNullable: (isLanguagePtBr: boolean) => {
244
245
  label: string;
245
246
  value: string;
246
247
  }[];
248
+ declare const getNullableCollection: (isLanguagePtBr: boolean) => {
249
+ label: string;
250
+ value: string;
251
+ }[];
247
252
 
248
253
  declare const mapPrimeToBackendFilters: (filters: any, globalFilterFields: string[]) => {
249
254
  and: any[];
@@ -262,6 +267,7 @@ declare const getUrlParams: (sortFieldInitial: string, sortOrderInitial: 1 | -1)
262
267
  };
263
268
  type SortingResult = any[];
264
269
  declare function buildSortingWithFilters(filters: Record<string, any>, sortField?: string, order?: number): SortingResult;
270
+ declare const isSpecialMatchMode: (matchMode?: string) => boolean;
265
271
 
266
272
  interface LeafcodeTheme {
267
273
  colors: {
@@ -354,4 +360,4 @@ declare const LeafcodeThemeProvider: ({ children, theme, }: LeafcodeThemeProvide
354
360
 
355
361
  declare const defaultTheme: LeafcodeTheme;
356
362
 
357
- export { Button, type ColumnCustom, CustomFilterElement, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, Input, InputAutoComplete, type InputAutoCompleteProps, InputSelect, LeafcodeThemeProvider, ModalBase, type PaginatedResponse$1 as PaginatedResponse, SelectFilterTemplate, type ServiceParams, TextArea, ValueFilterTemplate, buildDynamicCampoFilters, buildSortingWithFilters, customMatchModes, defaultTheme, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsEnum, getDefaultFilterMatchOptionsNumber, getDefaultFilterMatchOptionsString, getDefaultFilterMatchOptionsStringArray, getNullable, getUrlParams, mapPrimeToBackendFilters };
363
+ export { Button, type ColumnCustom, CustomFilterElement, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, Input, InputAutoComplete, type InputAutoCompleteProps, InputSelect, LeafcodeThemeProvider, ModalBase, type PaginatedResponse$1 as PaginatedResponse, SelectFilterTemplate, type ServiceParams, TextArea, ValueFilterTemplate, buildDynamicCampoFilters, buildSortingWithFilters, customMatchModes, defaultTheme, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsEnum, getDefaultFilterMatchOptionsNumber, getDefaultFilterMatchOptionsString, getDefaultFilterMatchOptionsStringArray, getNullable, getNullableCollection, getUrlParams, isSpecialMatchMode, mapPrimeToBackendFilters };
package/dist/index.d.ts CHANGED
@@ -2,10 +2,9 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
3
  import react__default, { ReactNode as ReactNode$1, InputHTMLAttributes, JSX } from 'react';
4
4
  import { FieldError } from 'react-hook-form';
5
- import { FilterMatchMode } from 'primereact/api';
6
- export { FilterMatchMode, FilterOperator } from 'primereact/api';
7
5
  export { DataTableProps } from 'primereact/datatable';
8
6
  export { ColumnProps } from 'primereact/column';
7
+ export { FilterMatchMode, FilterOperator } from 'primereact/api';
9
8
 
10
9
  interface ButtonProps {
11
10
  disabled?: boolean;
@@ -208,7 +207,7 @@ interface IItemProps {
208
207
 
209
208
  declare const DateFilterTemplate: (options: any, mask?: (value: Date) => string) => react_jsx_runtime.JSX.Element;
210
209
  declare const DateTimeFilterTemplate: (options: any, mask?: (date: Date) => string) => react_jsx_runtime.JSX.Element;
211
- declare const ValueFilterTemplate: (options: any, mask?: (value: any) => string | number) => react_jsx_runtime.JSX.Element;
210
+ declare const ValueFilterTemplate: (options: any, mask?: (value: any) => string | number) => false | react_jsx_runtime.JSX.Element;
212
211
  declare const SelectFilterTemplate: (options: any, isLanguagePtBr?: boolean, items?: IItemProps[]) => react_jsx_runtime.JSX.Element;
213
212
  declare const CustomFilterElement: (options: any, isLanguagePtBr?: boolean) => false | react_jsx_runtime.JSX.Element;
214
213
 
@@ -219,24 +218,26 @@ declare const customMatchModes: {
219
218
  notEmpty: string;
220
219
  dateBeforeAndEquals: string;
221
220
  dateAfterAndEquals: string;
221
+ any: string;
222
+ none: string;
222
223
  };
223
- declare const getDefaultFilterMatchOptionsString: (isLanguagePtBr?: boolean, isNullable?: boolean) => {
224
+ declare const getDefaultFilterMatchOptionsString: (isLanguagePtBr?: boolean, isNullable?: boolean, isCollection?: boolean) => {
224
225
  label: string;
225
226
  value: string;
226
227
  }[];
227
- declare const getDefaultFilterMatchOptionsNumber: (isLanguagePtBr?: boolean, isNullable?: boolean) => {
228
+ declare const getDefaultFilterMatchOptionsNumber: (isLanguagePtBr?: boolean, isNullable?: boolean, isCollection?: boolean) => {
228
229
  label: string;
229
230
  value: string;
230
231
  }[];
231
- declare const getDefaultFilterMatchOptionsStringArray: (isLanguagePtBr?: boolean) => {
232
+ declare const getDefaultFilterMatchOptionsStringArray: (isLanguagePtBr?: boolean, isNullable?: boolean, isCollection?: boolean) => {
232
233
  label: string;
233
- value: FilterMatchMode;
234
+ value: string;
234
235
  }[];
235
- declare const getDefaultFilterMatchOptionsDate: (isLanguagePtBr: boolean, isNullable?: boolean) => {
236
+ declare const getDefaultFilterMatchOptionsDate: (isLanguagePtBr: boolean, isNullable?: boolean, isCollection?: boolean) => {
236
237
  label: string;
237
238
  value: string;
238
239
  }[];
239
- declare const getDefaultFilterMatchOptionsEnum: (isLanguagePtBr: boolean, isNullable?: boolean) => {
240
+ declare const getDefaultFilterMatchOptionsEnum: (isLanguagePtBr: boolean, isNullable?: boolean, isCollection?: boolean) => {
240
241
  label: string;
241
242
  value: string;
242
243
  }[];
@@ -244,6 +245,10 @@ declare const getNullable: (isLanguagePtBr: boolean) => {
244
245
  label: string;
245
246
  value: string;
246
247
  }[];
248
+ declare const getNullableCollection: (isLanguagePtBr: boolean) => {
249
+ label: string;
250
+ value: string;
251
+ }[];
247
252
 
248
253
  declare const mapPrimeToBackendFilters: (filters: any, globalFilterFields: string[]) => {
249
254
  and: any[];
@@ -262,6 +267,7 @@ declare const getUrlParams: (sortFieldInitial: string, sortOrderInitial: 1 | -1)
262
267
  };
263
268
  type SortingResult = any[];
264
269
  declare function buildSortingWithFilters(filters: Record<string, any>, sortField?: string, order?: number): SortingResult;
270
+ declare const isSpecialMatchMode: (matchMode?: string) => boolean;
265
271
 
266
272
  interface LeafcodeTheme {
267
273
  colors: {
@@ -354,4 +360,4 @@ declare const LeafcodeThemeProvider: ({ children, theme, }: LeafcodeThemeProvide
354
360
 
355
361
  declare const defaultTheme: LeafcodeTheme;
356
362
 
357
- export { Button, type ColumnCustom, CustomFilterElement, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, Input, InputAutoComplete, type InputAutoCompleteProps, InputSelect, LeafcodeThemeProvider, ModalBase, type PaginatedResponse$1 as PaginatedResponse, SelectFilterTemplate, type ServiceParams, TextArea, ValueFilterTemplate, buildDynamicCampoFilters, buildSortingWithFilters, customMatchModes, defaultTheme, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsEnum, getDefaultFilterMatchOptionsNumber, getDefaultFilterMatchOptionsString, getDefaultFilterMatchOptionsStringArray, getNullable, getUrlParams, mapPrimeToBackendFilters };
363
+ export { Button, type ColumnCustom, CustomFilterElement, DataTableAdvancedFilter, DateFilterTemplate, DateTimeFilterTemplate, type IDataTableProps, type IItemProps, Input, InputAutoComplete, type InputAutoCompleteProps, InputSelect, LeafcodeThemeProvider, ModalBase, type PaginatedResponse$1 as PaginatedResponse, SelectFilterTemplate, type ServiceParams, TextArea, ValueFilterTemplate, buildDynamicCampoFilters, buildSortingWithFilters, customMatchModes, defaultTheme, getDefaultFilterMatchOptionsDate, getDefaultFilterMatchOptionsEnum, getDefaultFilterMatchOptionsNumber, getDefaultFilterMatchOptionsString, getDefaultFilterMatchOptionsStringArray, getNullable, getNullableCollection, getUrlParams, isSpecialMatchMode, mapPrimeToBackendFilters };