mobigrid-module 1.1.3 → 1.1.5

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/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # mobigrid-module
2
+
3
+ A flexible and customizable data table interface module with advanced filtering, column management, and action handling capabilities.
4
+
5
+ ## Configuration Structure
6
+
7
+ The configuration object defines the structure and behavior of a data table interface. It includes filters, columns, actions, and other settings.
8
+
9
+ ### Main Properties
10
+
11
+ - **title**: The title of the configuration
12
+ - **data_url**: API endpoint for fetching data
13
+ - **Filters**: Array of filter groups for data filtering
14
+ - **columns**: Defines the table columns and their properties
15
+ - **extractColumns**: Columns used for data export
16
+ - **detailsColumns**: Columns shown in detail view
17
+
18
+ ### Filter Types
19
+
20
+ - **Select**: Dropdown with options (static or dynamic from urlSource)
21
+ - **Text**: Basic text input
22
+ - **Date**: Date picker input
23
+ - **Export**: Export functionality
24
+ - **Button**: Action buttons (e.g., search)
25
+
26
+ ### Column Properties
27
+
28
+ - **title**: Column header text
29
+ - **key**: Data field identifier
30
+ - **type**: Data type (date, money, dropdown, etc.)
31
+ - **pattern**: Format pattern (for dates)
32
+ - **actions**: Available actions for dropdown columns
33
+
34
+ ### Additional Settings
35
+
36
+ - **max_diff**: Maximum difference value
37
+ - **pagesNum**: Number of pages
38
+ - **service_path**: Service implementation path
39
+ - **authorized_profiles**: Allowed user profile IDs
40
+ - **modal_size**: Size of modal windows
41
+ - **components**: Required component names
42
+
43
+ ## Example Configuration
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobigrid-module",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "index.tsx",
@@ -1,8 +0,0 @@
1
- import React from "react";
2
- interface TableProps {
3
- data: any[];
4
- columns: any[];
5
- isLoading: boolean;
6
- }
7
- export declare function CustomTable({ data, columns, isLoading }: TableProps): React.JSX.Element;
8
- export {};
@@ -1,8 +0,0 @@
1
- import React from "react";
2
- interface PaginationProps {
3
- currentPage: number;
4
- totalPages: number;
5
- onPageChange: (page: number) => void;
6
- }
7
- export default function ({ currentPage, totalPages, onPageChange, }: PaginationProps): React.JSX.Element;
8
- export {};
@@ -1,6 +0,0 @@
1
- import { IconProps as FeatherIconProps } from 'react-feather';
2
- interface IconProps extends Omit<FeatherIconProps, 'ref'> {
3
- name: string;
4
- }
5
- declare const Icon: ({ name, ...props }: IconProps) => JSX.Element | null;
6
- export default Icon;
@@ -1,2 +0,0 @@
1
- import React from "react";
2
- export default function InvalidConfig(): React.JSX.Element;
@@ -1,13 +0,0 @@
1
- import * as React from "react";
2
- interface PageHeaderProps {
3
- title: string;
4
- filters: any;
5
- configFilters: any;
6
- setFilters: (filters: any) => void;
7
- onSearch: () => void;
8
- count: number;
9
- isLoading: boolean;
10
- setCurrentPage: (page: number) => void;
11
- }
12
- export declare function PageHeader({ title, filters, setFilters, configFilters, onSearch, count, isLoading, setCurrentPage, }: PageHeaderProps): React.JSX.Element;
13
- export {};
@@ -1,2 +0,0 @@
1
- import React from "react";
2
- export default function LoadingConfig(): React.JSX.Element;
@@ -1,8 +0,0 @@
1
- import * as React from "react";
2
- import { type VariantProps } from "class-variance-authority";
3
- declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
4
- variant?: "default" | "destructive" | null | undefined;
5
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
6
- declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
7
- declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
8
- export { Alert, AlertTitle, AlertDescription };
@@ -1,11 +0,0 @@
1
- import * as React from "react";
2
- import { type VariantProps } from "class-variance-authority";
3
- declare const buttonVariants: (props?: ({
4
- variant?: "default" | "destructive" | "link" | "outline" | "secondary" | "ghost" | null | undefined;
5
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
- export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
- asChild?: boolean;
9
- }
10
- declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
11
- export { Button, buttonVariants };
@@ -1,8 +0,0 @@
1
- import * as React from "react";
2
- import { DayPicker } from "react-day-picker";
3
- export type CalendarProps = React.ComponentProps<typeof DayPicker>;
4
- declare function Calendar({ className, classNames, showOutsideDays, ...props }: CalendarProps): React.JSX.Element;
5
- declare namespace Calendar {
6
- var displayName: string;
7
- }
8
- export { Calendar };
@@ -1,7 +0,0 @@
1
- import * as React from "react";
2
- import { DateRange } from "react-day-picker";
3
- export declare function DatePickerWithRange({ className, dateFrom, dateTo, handleDateChange, }: React.HTMLAttributes<HTMLDivElement> & {
4
- dateFrom?: Date;
5
- dateTo?: Date;
6
- handleDateChange?: (range: DateRange | undefined) => void;
7
- }): React.JSX.Element;
@@ -1,19 +0,0 @@
1
- import * as React from "react";
2
- import * as DialogPrimitive from "@radix-ui/react-dialog";
3
- declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
4
- declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
- declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
6
- declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
7
- declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
- declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
- declare const DialogHeader: {
10
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
11
- displayName: string;
12
- };
13
- declare const DialogFooter: {
14
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
15
- displayName: string;
16
- };
17
- declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
18
- declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
19
- export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
@@ -1,3 +0,0 @@
1
- import * as React from "react";
2
- declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
3
- export { Input };
@@ -1,28 +0,0 @@
1
- import * as React from "react";
2
- import { ButtonProps } from "./button";
3
- declare const Pagination: {
4
- ({ className, ...props }: React.ComponentProps<"nav">): React.JSX.Element;
5
- displayName: string;
6
- };
7
- declare const PaginationContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
8
- declare const PaginationItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
9
- type PaginationLinkProps = {
10
- isActive?: boolean;
11
- } & Pick<ButtonProps, "size"> & React.ComponentProps<"a">;
12
- declare const PaginationLink: {
13
- ({ className, isActive, size, ...props }: PaginationLinkProps): React.JSX.Element;
14
- displayName: string;
15
- };
16
- declare const PaginationPrevious: {
17
- ({ className, ...props }: React.ComponentProps<typeof PaginationLink>): React.JSX.Element;
18
- displayName: string;
19
- };
20
- declare const PaginationNext: {
21
- ({ className, ...props }: React.ComponentProps<typeof PaginationLink>): React.JSX.Element;
22
- displayName: string;
23
- };
24
- declare const PaginationEllipsis: {
25
- ({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
26
- displayName: string;
27
- };
28
- export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, };
@@ -1,7 +0,0 @@
1
- import * as React from "react";
2
- import * as PopoverPrimitive from "@radix-ui/react-popover";
3
- declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
4
- declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
- declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
6
- declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
- export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
@@ -1,13 +0,0 @@
1
- import * as React from "react";
2
- import * as SelectPrimitive from "@radix-ui/react-select";
3
- declare const Select: React.FC<SelectPrimitive.SelectProps>;
4
- declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
5
- declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
6
- declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
- declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
- declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
- declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
- declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
- declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
- declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
- export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
@@ -1,5 +0,0 @@
1
- import React from "react";
2
- import { Toaster as Sonner } from "sonner";
3
- type ToasterProps = React.ComponentProps<typeof Sonner>;
4
- declare const Toaster: ({ ...props }: ToasterProps) => React.JSX.Element;
5
- export { Toaster };
@@ -1,10 +0,0 @@
1
- import * as React from "react";
2
- declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
3
- declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
4
- declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
5
- declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
6
- declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
7
- declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
8
- declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
9
- declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
10
- export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
package/dist/index.d.ts DELETED
@@ -1,9 +0,0 @@
1
- import React from "react";
2
- interface ContainerProps {
3
- configUrl: string;
4
- preJsUrl: string;
5
- itemsPerPage?: number;
6
- children?: React.ReactNode;
7
- }
8
- declare const MobigridModule: ({ configUrl, preJsUrl, itemsPerPage, children, }: ContainerProps) => React.JSX.Element;
9
- export { MobigridModule as default };