@easyvision/easyvision-ui 1.11.0 → 1.13.0

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.cts CHANGED
@@ -53,6 +53,27 @@ interface EasyVisionSelectorProps<V extends string | number = string | number> e
53
53
 
54
54
  declare function EasyVisionSelector<V extends string | number = string | number>({ id, label, options, placeholder, mandatory, defaultValue, confirmMode, confirmLabel, searchable, onChange, onStateChange, className, disabled, persist, clearWhen, }: EasyVisionSelectorProps<V>): react_jsx_runtime.JSX.Element;
55
55
 
56
+ interface SavedFilter {
57
+ name: string;
58
+ filters: Record<string, unknown>;
59
+ search: string[];
60
+ }
61
+ interface SavedFiltersOptions {
62
+ /** localStorage key. Make it unique per table and per account. */
63
+ storageKey: string;
64
+ /**
65
+ * Open with the default saved query when the multifilter starts clean.
66
+ * Default `true`. A host whose page arrived with its own filters (a shared
67
+ * link) says `false`: what the link asks for wins.
68
+ */
69
+ openWithDefault?: boolean;
70
+ /**
71
+ * The text field that holds the search terms. v3 keeps them apart, in
72
+ * `search`; naming the field writes it there and reads it back.
73
+ */
74
+ searchFieldId?: string;
75
+ }
76
+
56
77
  interface DateRangeValue {
57
78
  from?: Date;
58
79
  to?: Date;
@@ -176,6 +197,18 @@ interface MultifilterLabels {
176
197
  addFilter: string;
177
198
  noOptions: string;
178
199
  searchPlaceholder: string;
200
+ /** Saved filters ("Guardados") menu. */
201
+ saved: string;
202
+ noSaved: string;
203
+ saveNamePlaceholder: string;
204
+ nothingToSave: string;
205
+ save: string;
206
+ setDefault: string;
207
+ unsetDefault: string;
208
+ deleteSaved: string;
209
+ /** Icon buttons: "Quitar filtro: Estado", "Quitar Completada". */
210
+ removeFilter: string;
211
+ removeValue: string;
179
212
  }
180
213
  interface MultifilterQuery {
181
214
  where?: Record<string, unknown>;
@@ -236,6 +269,11 @@ interface EasyVisionMultifilterProps extends BaseStatefulProps<MultifilterSnapsh
236
269
  showClearAll?: boolean;
237
270
  labels?: Partial<MultifilterLabels>;
238
271
  className?: string;
272
+ /**
273
+ * Named saved queries ("Guardados"), kept in localStorage under
274
+ * `storageKey`. Off when omitted. See `multifilter/savedFilters.ts`.
275
+ */
276
+ savedFilters?: SavedFiltersOptions;
239
277
  }
240
278
 
241
279
  declare const EasyVisionMultifilter: React.ForwardRefExoticComponent<EasyVisionMultifilterProps & React.RefAttributes<MultifilterHandle>>;
@@ -698,6 +736,10 @@ interface TableLabels {
698
736
  selectedAllBanner: (n: number) => string;
699
737
  selectedCountBanner: (n: number) => string;
700
738
  clearSelection: string;
739
+ /** A row's checkbox: "Seleccionar" + the row's label (`getRowLabel`). */
740
+ selectRow: string;
741
+ previousPage: string;
742
+ nextPage: string;
701
743
  }
702
744
  interface EasyVisionTableProps<T> extends BaseStatefulProps {
703
745
  columns: EasyVisionColumn<T>[];
@@ -754,6 +796,15 @@ interface EasyVisionTableProps<T> extends BaseStatefulProps {
754
796
  * />
755
797
  */
756
798
  ingot?: CreateIngotTableFetcherOptions<T>;
799
+ /**
800
+ * The order the server applies when no sort is chosen (api mode). Its
801
+ * column shows the arrow and `aria-sort` meanwhile; a click on it turns it
802
+ * around, and coming back to it clears the chosen sort.
803
+ */
804
+ defaultSort?: {
805
+ column: string;
806
+ descending: boolean;
807
+ };
757
808
  /**
758
809
  * Fires after each successful API fetch with the freshly loaded rows and total count.
759
810
  * Useful when the page needs to mirror the loaded slice into another store
@@ -770,6 +821,15 @@ interface EasyVisionTableProps<T> extends BaseStatefulProps {
770
821
  * when the page drives its own filter UI separate from a bound multifilter.
771
822
  */
772
823
  refetchSignal?: unknown;
824
+ /**
825
+ * Like `refetchSignal`, but the page stays: for rows that changed under the
826
+ * same query (an edit, a move), not for a new query.
827
+ */
828
+ reloadSignal?: unknown;
829
+ /** The table's accessible name: what a screen reader says it is. */
830
+ ariaLabel?: string;
831
+ /** What a row is called, for its checkbox's name ("Seleccionar Alerta 2"). */
832
+ getRowLabel?: (row: T) => string;
773
833
  /** External `where` to merge into every fetch. Used when the page drives its own filter UI. */
774
834
  externalFilter?: {
775
835
  where?: Record<string, unknown>;
@@ -962,4 +1022,4 @@ declare const getSlice: <K extends SliceKind>(fullId: string) => SliceFor<K> | u
962
1022
  */
963
1023
  declare const defaultCell: (content: ReactNode, title?: string) => ReactNode;
964
1024
 
965
- export { type AccordionItem, type AccordionMode, type ApiFetchParams, type ApiFetchResult, type BaseStatefulProps, type CreateIngotTableFetcherOptions, type CreateLoopbackTableFetcherOptions, type CustomFieldDef, type DateRangeFieldDef, type DateRangeValue, EasyVisionAccordion, EasyVisionAccordionItem, type EasyVisionAccordionItemProps, type EasyVisionAccordionProps, EasyVisionCard, EasyVisionCardContent, EasyVisionCardDescription, EasyVisionCardFooter, EasyVisionCardHeader, EasyVisionCardTitle, type EasyVisionColumn, EasyVisionExportButton, type EasyVisionExportButtonProps, EasyVisionInput, type EasyVisionInputProps, EasyVisionMultifilter, type EasyVisionMultifilterProps, EasyVisionSelector, type EasyVisionSelectorProps, EasyVisionTable, type EasyVisionTableProps, type ExportCellStyle, type ExportCellValue, type ExportColumnSpec, type ExportLabels, type ExportSource, type FieldDef, type IngotFilter, type LoopbackCountResponse, type LoopbackFilter, type LoopbackWhereValue, type MultiSelectFieldDef, type MultifilterConfig, type MultifilterFieldDef, type MultifilterHandle, type MultifilterLabels, type MultifilterQuery, type MultifilterSnapshot, type NumberRangeFieldDef, type NumberRangeValue, type SelectionChange, type SelectorFieldDef, type SelectorOption, type SheetSpec, type TableLabels, type TableMode, type TextFieldDef, buildWorkbook, createIngotTableFetcher, createLoopbackTableFetcher, defaultCell, downloadBlob, easyVisionRegistry, exportSheets, getSlice, matchLoopbackWhere, sanitizeSheetName, toExportColumns, toIngotWhere };
1025
+ export { type AccordionItem, type AccordionMode, type ApiFetchParams, type ApiFetchResult, type BaseStatefulProps, type CreateIngotTableFetcherOptions, type CreateLoopbackTableFetcherOptions, type CustomFieldDef, type DateRangeFieldDef, type DateRangeValue, EasyVisionAccordion, EasyVisionAccordionItem, type EasyVisionAccordionItemProps, type EasyVisionAccordionProps, EasyVisionCard, EasyVisionCardContent, EasyVisionCardDescription, EasyVisionCardFooter, EasyVisionCardHeader, EasyVisionCardTitle, type EasyVisionColumn, EasyVisionExportButton, type EasyVisionExportButtonProps, EasyVisionInput, type EasyVisionInputProps, EasyVisionMultifilter, type EasyVisionMultifilterProps, EasyVisionSelector, type EasyVisionSelectorProps, EasyVisionTable, type EasyVisionTableProps, type ExportCellStyle, type ExportCellValue, type ExportColumnSpec, type ExportLabels, type ExportSource, type FieldDef, type IngotFilter, type LoopbackCountResponse, type LoopbackFilter, type LoopbackWhereValue, type MultiSelectFieldDef, type MultifilterConfig, type MultifilterFieldDef, type MultifilterHandle, type MultifilterLabels, type MultifilterQuery, type MultifilterSnapshot, type NumberRangeFieldDef, type NumberRangeValue, type SavedFilter, type SavedFiltersOptions, type SelectionChange, type SelectorFieldDef, type SelectorOption, type SheetSpec, type TableLabels, type TableMode, type TextFieldDef, buildWorkbook, createIngotTableFetcher, createLoopbackTableFetcher, defaultCell, downloadBlob, easyVisionRegistry, exportSheets, getSlice, matchLoopbackWhere, sanitizeSheetName, toExportColumns, toIngotWhere };
package/dist/index.d.ts CHANGED
@@ -53,6 +53,27 @@ interface EasyVisionSelectorProps<V extends string | number = string | number> e
53
53
 
54
54
  declare function EasyVisionSelector<V extends string | number = string | number>({ id, label, options, placeholder, mandatory, defaultValue, confirmMode, confirmLabel, searchable, onChange, onStateChange, className, disabled, persist, clearWhen, }: EasyVisionSelectorProps<V>): react_jsx_runtime.JSX.Element;
55
55
 
56
+ interface SavedFilter {
57
+ name: string;
58
+ filters: Record<string, unknown>;
59
+ search: string[];
60
+ }
61
+ interface SavedFiltersOptions {
62
+ /** localStorage key. Make it unique per table and per account. */
63
+ storageKey: string;
64
+ /**
65
+ * Open with the default saved query when the multifilter starts clean.
66
+ * Default `true`. A host whose page arrived with its own filters (a shared
67
+ * link) says `false`: what the link asks for wins.
68
+ */
69
+ openWithDefault?: boolean;
70
+ /**
71
+ * The text field that holds the search terms. v3 keeps them apart, in
72
+ * `search`; naming the field writes it there and reads it back.
73
+ */
74
+ searchFieldId?: string;
75
+ }
76
+
56
77
  interface DateRangeValue {
57
78
  from?: Date;
58
79
  to?: Date;
@@ -176,6 +197,18 @@ interface MultifilterLabels {
176
197
  addFilter: string;
177
198
  noOptions: string;
178
199
  searchPlaceholder: string;
200
+ /** Saved filters ("Guardados") menu. */
201
+ saved: string;
202
+ noSaved: string;
203
+ saveNamePlaceholder: string;
204
+ nothingToSave: string;
205
+ save: string;
206
+ setDefault: string;
207
+ unsetDefault: string;
208
+ deleteSaved: string;
209
+ /** Icon buttons: "Quitar filtro: Estado", "Quitar Completada". */
210
+ removeFilter: string;
211
+ removeValue: string;
179
212
  }
180
213
  interface MultifilterQuery {
181
214
  where?: Record<string, unknown>;
@@ -236,6 +269,11 @@ interface EasyVisionMultifilterProps extends BaseStatefulProps<MultifilterSnapsh
236
269
  showClearAll?: boolean;
237
270
  labels?: Partial<MultifilterLabels>;
238
271
  className?: string;
272
+ /**
273
+ * Named saved queries ("Guardados"), kept in localStorage under
274
+ * `storageKey`. Off when omitted. See `multifilter/savedFilters.ts`.
275
+ */
276
+ savedFilters?: SavedFiltersOptions;
239
277
  }
240
278
 
241
279
  declare const EasyVisionMultifilter: React.ForwardRefExoticComponent<EasyVisionMultifilterProps & React.RefAttributes<MultifilterHandle>>;
@@ -698,6 +736,10 @@ interface TableLabels {
698
736
  selectedAllBanner: (n: number) => string;
699
737
  selectedCountBanner: (n: number) => string;
700
738
  clearSelection: string;
739
+ /** A row's checkbox: "Seleccionar" + the row's label (`getRowLabel`). */
740
+ selectRow: string;
741
+ previousPage: string;
742
+ nextPage: string;
701
743
  }
702
744
  interface EasyVisionTableProps<T> extends BaseStatefulProps {
703
745
  columns: EasyVisionColumn<T>[];
@@ -754,6 +796,15 @@ interface EasyVisionTableProps<T> extends BaseStatefulProps {
754
796
  * />
755
797
  */
756
798
  ingot?: CreateIngotTableFetcherOptions<T>;
799
+ /**
800
+ * The order the server applies when no sort is chosen (api mode). Its
801
+ * column shows the arrow and `aria-sort` meanwhile; a click on it turns it
802
+ * around, and coming back to it clears the chosen sort.
803
+ */
804
+ defaultSort?: {
805
+ column: string;
806
+ descending: boolean;
807
+ };
757
808
  /**
758
809
  * Fires after each successful API fetch with the freshly loaded rows and total count.
759
810
  * Useful when the page needs to mirror the loaded slice into another store
@@ -770,6 +821,15 @@ interface EasyVisionTableProps<T> extends BaseStatefulProps {
770
821
  * when the page drives its own filter UI separate from a bound multifilter.
771
822
  */
772
823
  refetchSignal?: unknown;
824
+ /**
825
+ * Like `refetchSignal`, but the page stays: for rows that changed under the
826
+ * same query (an edit, a move), not for a new query.
827
+ */
828
+ reloadSignal?: unknown;
829
+ /** The table's accessible name: what a screen reader says it is. */
830
+ ariaLabel?: string;
831
+ /** What a row is called, for its checkbox's name ("Seleccionar Alerta 2"). */
832
+ getRowLabel?: (row: T) => string;
773
833
  /** External `where` to merge into every fetch. Used when the page drives its own filter UI. */
774
834
  externalFilter?: {
775
835
  where?: Record<string, unknown>;
@@ -962,4 +1022,4 @@ declare const getSlice: <K extends SliceKind>(fullId: string) => SliceFor<K> | u
962
1022
  */
963
1023
  declare const defaultCell: (content: ReactNode, title?: string) => ReactNode;
964
1024
 
965
- export { type AccordionItem, type AccordionMode, type ApiFetchParams, type ApiFetchResult, type BaseStatefulProps, type CreateIngotTableFetcherOptions, type CreateLoopbackTableFetcherOptions, type CustomFieldDef, type DateRangeFieldDef, type DateRangeValue, EasyVisionAccordion, EasyVisionAccordionItem, type EasyVisionAccordionItemProps, type EasyVisionAccordionProps, EasyVisionCard, EasyVisionCardContent, EasyVisionCardDescription, EasyVisionCardFooter, EasyVisionCardHeader, EasyVisionCardTitle, type EasyVisionColumn, EasyVisionExportButton, type EasyVisionExportButtonProps, EasyVisionInput, type EasyVisionInputProps, EasyVisionMultifilter, type EasyVisionMultifilterProps, EasyVisionSelector, type EasyVisionSelectorProps, EasyVisionTable, type EasyVisionTableProps, type ExportCellStyle, type ExportCellValue, type ExportColumnSpec, type ExportLabels, type ExportSource, type FieldDef, type IngotFilter, type LoopbackCountResponse, type LoopbackFilter, type LoopbackWhereValue, type MultiSelectFieldDef, type MultifilterConfig, type MultifilterFieldDef, type MultifilterHandle, type MultifilterLabels, type MultifilterQuery, type MultifilterSnapshot, type NumberRangeFieldDef, type NumberRangeValue, type SelectionChange, type SelectorFieldDef, type SelectorOption, type SheetSpec, type TableLabels, type TableMode, type TextFieldDef, buildWorkbook, createIngotTableFetcher, createLoopbackTableFetcher, defaultCell, downloadBlob, easyVisionRegistry, exportSheets, getSlice, matchLoopbackWhere, sanitizeSheetName, toExportColumns, toIngotWhere };
1025
+ export { type AccordionItem, type AccordionMode, type ApiFetchParams, type ApiFetchResult, type BaseStatefulProps, type CreateIngotTableFetcherOptions, type CreateLoopbackTableFetcherOptions, type CustomFieldDef, type DateRangeFieldDef, type DateRangeValue, EasyVisionAccordion, EasyVisionAccordionItem, type EasyVisionAccordionItemProps, type EasyVisionAccordionProps, EasyVisionCard, EasyVisionCardContent, EasyVisionCardDescription, EasyVisionCardFooter, EasyVisionCardHeader, EasyVisionCardTitle, type EasyVisionColumn, EasyVisionExportButton, type EasyVisionExportButtonProps, EasyVisionInput, type EasyVisionInputProps, EasyVisionMultifilter, type EasyVisionMultifilterProps, EasyVisionSelector, type EasyVisionSelectorProps, EasyVisionTable, type EasyVisionTableProps, type ExportCellStyle, type ExportCellValue, type ExportColumnSpec, type ExportLabels, type ExportSource, type FieldDef, type IngotFilter, type LoopbackCountResponse, type LoopbackFilter, type LoopbackWhereValue, type MultiSelectFieldDef, type MultifilterConfig, type MultifilterFieldDef, type MultifilterHandle, type MultifilterLabels, type MultifilterQuery, type MultifilterSnapshot, type NumberRangeFieldDef, type NumberRangeValue, type SavedFilter, type SavedFiltersOptions, type SelectionChange, type SelectorFieldDef, type SelectorOption, type SheetSpec, type TableLabels, type TableMode, type TextFieldDef, buildWorkbook, createIngotTableFetcher, createLoopbackTableFetcher, defaultCell, downloadBlob, easyVisionRegistry, exportSheets, getSlice, matchLoopbackWhere, sanitizeSheetName, toExportColumns, toIngotWhere };