componentes-sinco 1.0.26 → 1.0.28
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.cjs +2884 -1296
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +184 -29
- package/dist/index.d.ts +184 -29
- package/dist/index.js +2935 -1359
- package/dist/index.js.map +1 -1
- package/package.json +11 -7
- package/dist/create-KZGO2OZA.svg +0 -18
- package/dist/empty-3NEKE7WO.svg +0 -13
- package/dist/error-RUCZUXDN.svg +0 -5
- package/dist/search-OKSCVF2W.svg +0 -12
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,35 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ComponentType, ReactNode } from 'react';
|
|
3
|
+
import * as _mui_material from '@mui/material';
|
|
4
|
+
import { SxProps } from '@mui/material';
|
|
3
5
|
import * as Muicon from '@mui/icons-material';
|
|
4
6
|
import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
|
|
5
|
-
import * as _mui_material from '@mui/material';
|
|
6
7
|
import dayjs, { Dayjs } from 'dayjs';
|
|
7
8
|
import * as _mui_material_styles from '@mui/material/styles';
|
|
8
9
|
|
|
10
|
+
interface UploadedFile {
|
|
11
|
+
name: string;
|
|
12
|
+
size: number;
|
|
13
|
+
type: string;
|
|
14
|
+
progress: number;
|
|
15
|
+
uploadError?: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface AdjuntarProps<T> {
|
|
18
|
+
sx?: SxProps;
|
|
19
|
+
files?: T[];
|
|
20
|
+
error?: boolean;
|
|
21
|
+
compact?: boolean;
|
|
22
|
+
maxSize?: number;
|
|
23
|
+
fileAccepted?: string;
|
|
24
|
+
onChange?: (archivos: File[]) => void;
|
|
25
|
+
onLoading?: boolean;
|
|
26
|
+
downloadAction?: (name: string) => void;
|
|
27
|
+
deleteAction?: (name: string) => Promise<void> | void;
|
|
28
|
+
initialFiles?: UploadedFile[];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare const Attachment: ({ sx, compact, error, maxSize, fileAccepted, onLoading, onChange, downloadAction, deleteAction, initialFiles, }: AdjuntarProps<any>) => React__default.JSX.Element;
|
|
32
|
+
|
|
9
33
|
type ReplyPalette$1 = "primary" | "secondary" | "warning" | "info" | "success" | "error" | any;
|
|
10
34
|
type ReplyTextPalette = "primary" | "secondary" | "disabled";
|
|
11
35
|
type ReplyVariants = "outlined" | "filled" | "standard";
|
|
@@ -80,6 +104,8 @@ interface DrawerProps<T> {
|
|
|
80
104
|
anchor?: "left" | "right";
|
|
81
105
|
width?: string;
|
|
82
106
|
open?: boolean;
|
|
107
|
+
setOpen?: any;
|
|
108
|
+
chipFilters?: any[];
|
|
83
109
|
}
|
|
84
110
|
|
|
85
111
|
type ToastType = 'success' | 'error' | 'warning' | 'info';
|
|
@@ -106,7 +132,7 @@ declare const ToastProgress: (timeProgress: number) => {
|
|
|
106
132
|
progressToast: number;
|
|
107
133
|
};
|
|
108
134
|
|
|
109
|
-
declare function SCDrawer<T>({ title, arrayElements, actions, buttonDrawer, colorTitle, anchor, width, open, }: DrawerProps<T>): React__default.JSX.Element;
|
|
135
|
+
declare function SCDrawer<T>({ title, arrayElements, actions, buttonDrawer, colorTitle, anchor, width, open, setOpen, chipFilters, }: DrawerProps<T>): React__default.JSX.Element;
|
|
110
136
|
|
|
111
137
|
interface FooterActionsProperties {
|
|
112
138
|
label?: React.ReactNode;
|
|
@@ -150,6 +176,7 @@ interface ModalProps {
|
|
|
150
176
|
fn: () => void;
|
|
151
177
|
disabled?: boolean;
|
|
152
178
|
}[];
|
|
179
|
+
setOpen?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
153
180
|
buttonModal?: {
|
|
154
181
|
icon?: string;
|
|
155
182
|
text?: string;
|
|
@@ -164,7 +191,7 @@ declare const getIconComponent: (iconName?: string) => React.ElementType;
|
|
|
164
191
|
declare const getModalColor: (state: string) => string;
|
|
165
192
|
declare const getButtonColor: (state: string) => 'inherit' | 'info' | 'error' | 'warning';
|
|
166
193
|
|
|
167
|
-
declare const SCModal: ({ buttonModal, state, open, title, description, action, }: ModalProps) => React__default.JSX.Element;
|
|
194
|
+
declare const SCModal: ({ buttonModal, state, open, setOpen, title, description, action, }: ModalProps) => React__default.JSX.Element;
|
|
168
195
|
|
|
169
196
|
interface MultiSelectProps<T> {
|
|
170
197
|
textButton?: string;
|
|
@@ -283,6 +310,33 @@ interface SCTextFieldProps {
|
|
|
283
310
|
|
|
284
311
|
declare const SCTextField: ({ title, iconTitle, infoTitle, label, placeholder, infoElement, iconInputStart, iconInputEnd, maxLength, variant, format, disabled, required, size, width, color, background, setState, state, onChange, onBlur, onKeyDown, }: SCTextFieldProps) => React__default.JSX.Element;
|
|
285
312
|
|
|
313
|
+
interface SCCalendarSwipeableProps {
|
|
314
|
+
background?: string;
|
|
315
|
+
setState: React__default.Dispatch<React__default.SetStateAction<string>>;
|
|
316
|
+
state: string | any;
|
|
317
|
+
}
|
|
318
|
+
declare const SCCalendarSwipeable: ({ background, setState, state, }: SCCalendarSwipeableProps) => React__default.JSX.Element;
|
|
319
|
+
|
|
320
|
+
interface SCDataGridInitialProps<T> {
|
|
321
|
+
data: T[];
|
|
322
|
+
columns: any;
|
|
323
|
+
rowsTable?: number;
|
|
324
|
+
checkboxSelection?: boolean;
|
|
325
|
+
width?: string | number;
|
|
326
|
+
maxHeight?: number;
|
|
327
|
+
density?: "compact" | "standard" | "comfortable";
|
|
328
|
+
groupColumns?: (item: any) => {
|
|
329
|
+
textGroup1?: string;
|
|
330
|
+
valueGroup1?: string;
|
|
331
|
+
textGroup2?: string;
|
|
332
|
+
valueGroup2?: string;
|
|
333
|
+
headerNameFirstColumn?: string;
|
|
334
|
+
fieldFirstColumn?: string;
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
declare function SCDataGridInitial<T>({ data, columns, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }: SCDataGridInitialProps<T>): React__default.JSX.Element;
|
|
338
|
+
declare const SCDataGrid: React__default.MemoExoticComponent<typeof SCDataGridInitial>;
|
|
339
|
+
|
|
286
340
|
interface SCAutocompleteProps<T> {
|
|
287
341
|
label?: string;
|
|
288
342
|
data: T[];
|
|
@@ -310,26 +364,6 @@ interface SCAutocompleteProps<T> {
|
|
|
310
364
|
}
|
|
311
365
|
declare function SCAutocomplete<T>({ label, data, columnGroup, getItemValue, typeFormat, checkMassive, deleteType, fnAplicar, required, disabled, background, setState, state, inputChange, maxCheck, }: SCAutocompleteProps<T>): React__default.JSX.Element;
|
|
312
366
|
|
|
313
|
-
interface SCCalendarSwipeableProps {
|
|
314
|
-
background?: string;
|
|
315
|
-
setState: React__default.Dispatch<React__default.SetStateAction<string>>;
|
|
316
|
-
state: string | any;
|
|
317
|
-
}
|
|
318
|
-
declare const SCCalendarSwipeable: ({ background, setState, state, }: SCCalendarSwipeableProps) => React__default.JSX.Element;
|
|
319
|
-
|
|
320
|
-
interface SCDataGridInitialProps {
|
|
321
|
-
data: any;
|
|
322
|
-
columns: any;
|
|
323
|
-
groupColumns?: any;
|
|
324
|
-
rowsTable?: number;
|
|
325
|
-
checkboxSelection?: boolean;
|
|
326
|
-
width?: string | number;
|
|
327
|
-
maxHeight?: number;
|
|
328
|
-
density?: "compact" | "standard" | "comfortable";
|
|
329
|
-
}
|
|
330
|
-
declare const SCDataGridInitial: ({ data, columns, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }: SCDataGridInitialProps) => React__default.JSX.Element;
|
|
331
|
-
declare const SCDataGrid: React__default.MemoExoticComponent<({ data, columns, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }: SCDataGridInitialProps) => React__default.JSX.Element>;
|
|
332
|
-
|
|
333
367
|
type EmptyStateStates = 'create' | 'error' | 'noResult' | 'search';
|
|
334
368
|
type EmptyStateSize = 'small' | 'large';
|
|
335
369
|
interface EmptyStateProperties {
|
|
@@ -395,6 +429,23 @@ interface SCDialogProps {
|
|
|
395
429
|
}
|
|
396
430
|
declare const SCDialog: ({ title, iconTitle, subtitle, content, actions, buttonDialog, disableClose, dividers, widthContent, heightContent, background, setShow, show }: SCDialogProps) => React__default.JSX.Element;
|
|
397
431
|
|
|
432
|
+
interface Option$2 {
|
|
433
|
+
title?: string;
|
|
434
|
+
subtitle?: any;
|
|
435
|
+
description?: any;
|
|
436
|
+
iconLeftColor?: 'inherit' | 'action' | 'disabled' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
|
|
437
|
+
iconLeft?: any | React__default.ReactNode | React__default.ReactElement | React__default.ElementType | null;
|
|
438
|
+
iconRightColor?: 'inherit' | 'action' | 'disabled' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
|
|
439
|
+
iconRight?: any | React__default.ReactNode | React__default.ReactElement | React__default.ElementType | null;
|
|
440
|
+
divider?: boolean;
|
|
441
|
+
disable?: boolean;
|
|
442
|
+
fn?: any;
|
|
443
|
+
}
|
|
444
|
+
interface SCListContentProps {
|
|
445
|
+
options: Option$2[];
|
|
446
|
+
}
|
|
447
|
+
declare const SCListContent: ({ options }: SCListContentProps) => React__default.JSX.Element;
|
|
448
|
+
|
|
398
449
|
interface Option$1 {
|
|
399
450
|
name?: string;
|
|
400
451
|
iconLeft?: any | React__default.ReactNode | React__default.ReactElement | React__default.ElementType | null;
|
|
@@ -413,6 +464,23 @@ interface SCMenuProps {
|
|
|
413
464
|
}
|
|
414
465
|
declare const SCMenu: ({ header, options, defaultOption, disable, widthMenu, heightMenu, widthPage }: SCMenuProps) => React__default.JSX.Element;
|
|
415
466
|
|
|
467
|
+
interface BasicMenuProps {
|
|
468
|
+
open?: boolean;
|
|
469
|
+
onClose?: () => void;
|
|
470
|
+
button?: {
|
|
471
|
+
icon?: string;
|
|
472
|
+
text?: string;
|
|
473
|
+
color?: ReplyPalette$1;
|
|
474
|
+
variant?: RepplyButtonVariants;
|
|
475
|
+
iconPosition?: 'left' | 'right';
|
|
476
|
+
size?: "small" | "medium" | "large";
|
|
477
|
+
};
|
|
478
|
+
anchorEl?: null | HTMLElement;
|
|
479
|
+
handleClick?: (event: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
480
|
+
options?: [];
|
|
481
|
+
}
|
|
482
|
+
declare const BasicMenu: ({ open, onClose, button, anchorEl, handleClick, options }: BasicMenuProps) => React__default.JSX.Element;
|
|
483
|
+
|
|
416
484
|
interface SCSelectProps<T> {
|
|
417
485
|
label?: string;
|
|
418
486
|
data: T[];
|
|
@@ -424,10 +492,9 @@ interface SCSelectProps<T> {
|
|
|
424
492
|
width?: string;
|
|
425
493
|
size?: "small" | "medium";
|
|
426
494
|
variant?: "outlined" | "filled" | "standard";
|
|
427
|
-
|
|
495
|
+
background?: string;
|
|
428
496
|
required?: boolean;
|
|
429
497
|
disabled?: boolean;
|
|
430
|
-
background?: string;
|
|
431
498
|
fnAplicar?: () => void | React__default.ReactNode;
|
|
432
499
|
setState: React__default.Dispatch<React__default.SetStateAction<any>>;
|
|
433
500
|
state: {
|
|
@@ -435,7 +502,7 @@ interface SCSelectProps<T> {
|
|
|
435
502
|
textValue: string;
|
|
436
503
|
};
|
|
437
504
|
}
|
|
438
|
-
declare function SCSelect<T>({ label, data, getItemValue, width, size, variant,
|
|
505
|
+
declare function SCSelect<T>({ label, data, getItemValue, width, size, variant, background, required, disabled, setState, state, }: SCSelectProps<T>): React__default.JSX.Element;
|
|
439
506
|
|
|
440
507
|
interface Option {
|
|
441
508
|
name?: string;
|
|
@@ -458,12 +525,13 @@ interface SCTabsProps {
|
|
|
458
525
|
declare const SCTabs: ({ options, defaultOption, typeIcon, background, iconPosition, colorTab, orientation, variant, scrollButtons, children }: SCTabsProps) => React__default.JSX.Element;
|
|
459
526
|
|
|
460
527
|
type CalendarView = 'month' | 'week' | 'day';
|
|
528
|
+
type EventState = 'En progreso' | 'Finalizada' | 'Vencida' | 'Asignada' | 'Aplazada' | 'Generada';
|
|
461
529
|
interface CalendarEvent {
|
|
462
530
|
id: string;
|
|
463
531
|
title: string;
|
|
464
532
|
start: dayjs.Dayjs;
|
|
465
533
|
end: dayjs.Dayjs;
|
|
466
|
-
state:
|
|
534
|
+
state: EventState;
|
|
467
535
|
}
|
|
468
536
|
interface CalendarProps {
|
|
469
537
|
events: CalendarEvent[];
|
|
@@ -471,14 +539,101 @@ interface CalendarProps {
|
|
|
471
539
|
toolbar?: React.ReactNode;
|
|
472
540
|
onDayClick?: (date: dayjs.Dayjs) => void;
|
|
473
541
|
onMoreClick?: (date: dayjs.Dayjs, events: CalendarEvent[]) => void;
|
|
474
|
-
onViewChange?: (view: CalendarView) => void;
|
|
475
542
|
onEventClick?: (event: CalendarEvent, date?: dayjs.Dayjs) => void;
|
|
543
|
+
onViewChange?: (view: CalendarView) => void;
|
|
544
|
+
onDateChange?: (date: dayjs.Dayjs) => void;
|
|
545
|
+
onEventHover?: (event: CalendarEvent) => React.ReactNode;
|
|
546
|
+
onNavigate?: (action: 'TODAY' | 'PREV' | 'NEXT') => void;
|
|
547
|
+
isLoading?: boolean;
|
|
548
|
+
startHour?: number;
|
|
549
|
+
endHour?: number;
|
|
476
550
|
}
|
|
477
551
|
|
|
478
552
|
declare const Calendar: React__default.FC<CalendarProps>;
|
|
479
553
|
|
|
554
|
+
declare const CALENDAR_CONSTANTS: {
|
|
555
|
+
readonly GRID_TEMPLATE: "repeat(7, minmax(150px, 1fr))";
|
|
556
|
+
readonly DAY_HEIGHT: 60;
|
|
557
|
+
readonly SIDEBAR_WIDTH: 47;
|
|
558
|
+
readonly MIN_CELL_HEIGHT: 120;
|
|
559
|
+
readonly DEFAULT_START_HOUR: 0;
|
|
560
|
+
readonly DEFAULT_END_HOUR: 23;
|
|
561
|
+
readonly DRAWER_WIDTH: "350px";
|
|
562
|
+
readonly MAX_VISIBLE_EVENTS: 2;
|
|
563
|
+
readonly MIN_WIDTH: "1050px";
|
|
564
|
+
readonly LOADING_SPINNER_SIZE: "60px";
|
|
565
|
+
readonly LOADING_CONTAINER_HEIGHT: "450px";
|
|
566
|
+
readonly DAY_CIRCLE_SIZE: 24;
|
|
567
|
+
};
|
|
568
|
+
|
|
569
|
+
type NavigationAction = 'PREV' | 'NEXT' | 'TODAY';
|
|
570
|
+
declare const useCalendarNavigation: (initialDate?: dayjs.Dayjs, onDateChange?: ((date: dayjs.Dayjs) => void) | undefined) => {
|
|
571
|
+
currentDate: dayjs.Dayjs;
|
|
572
|
+
setCurrentDate: React$1.Dispatch<React$1.SetStateAction<dayjs.Dayjs>>;
|
|
573
|
+
navigateDate: (action: NavigationAction, view: CalendarView) => void;
|
|
574
|
+
};
|
|
575
|
+
|
|
576
|
+
type CellBorderType = 'full' | 'start' | 'end' | 'middle' | 'none';
|
|
577
|
+
declare const filterEventsForDay: (events: CalendarEvent[], day: Dayjs) => CalendarEvent[];
|
|
578
|
+
declare const getCellBorderType: (cellHour: number, dayEvents: CalendarEvent[]) => CellBorderType;
|
|
579
|
+
declare const clampEventToVisibleRange: (event: CalendarEvent, currentDate: Dayjs, startHour: number, endHour: number) => {
|
|
580
|
+
startMinutes: number;
|
|
581
|
+
durationMinutes: number;
|
|
582
|
+
clampedStart: dayjs.Dayjs;
|
|
583
|
+
clampedEnd: dayjs.Dayjs;
|
|
584
|
+
};
|
|
585
|
+
|
|
586
|
+
interface DayEventsListProps {
|
|
587
|
+
events: CalendarEvent[];
|
|
588
|
+
day: dayjs.Dayjs;
|
|
589
|
+
onEventClick?: (event: CalendarEvent, date?: dayjs.Dayjs) => void;
|
|
590
|
+
onEventHover?: (event: CalendarEvent) => React__default.ReactNode;
|
|
591
|
+
}
|
|
592
|
+
declare const DayEventsList: React__default.FC<DayEventsListProps>;
|
|
593
|
+
|
|
594
|
+
interface SCTimeProps {
|
|
595
|
+
label?: string;
|
|
596
|
+
required?: boolean;
|
|
597
|
+
disabled?: boolean;
|
|
598
|
+
background?: string;
|
|
599
|
+
timeStep?: number;
|
|
600
|
+
state: Dayjs | null;
|
|
601
|
+
setState: (value: Dayjs | null) => void;
|
|
602
|
+
}
|
|
603
|
+
declare const SCTime: ({ label, required, disabled, background, timeStep, state, setState, }: SCTimeProps) => React__default.JSX.Element;
|
|
604
|
+
|
|
605
|
+
interface SCCardProps {
|
|
606
|
+
title?: string;
|
|
607
|
+
subtitle?: string;
|
|
608
|
+
iconTitle?: React__default.ReactNode | React__default.ReactElement | keyof typeof Muicon;
|
|
609
|
+
actionsTitle?: any;
|
|
610
|
+
image?: any;
|
|
611
|
+
content?: any;
|
|
612
|
+
actions?: {
|
|
613
|
+
text?: string;
|
|
614
|
+
fn: () => void;
|
|
615
|
+
disabled?: boolean;
|
|
616
|
+
}[];
|
|
617
|
+
expand?: {
|
|
618
|
+
type?: 'icon' | 'text';
|
|
619
|
+
position?: 'top' | 'bottom';
|
|
620
|
+
content?: string;
|
|
621
|
+
};
|
|
622
|
+
}
|
|
623
|
+
declare const SCCard: ({ title, image, iconTitle, actionsTitle, subtitle, content, actions, expand }: SCCardProps) => React__default.JSX.Element;
|
|
624
|
+
|
|
625
|
+
interface SCActivityCalendarProps {
|
|
626
|
+
background?: string;
|
|
627
|
+
setState: React__default.Dispatch<React__default.SetStateAction<string>>;
|
|
628
|
+
state: string | any;
|
|
629
|
+
events: any[];
|
|
630
|
+
fn?: any;
|
|
631
|
+
configRangeHour?: string;
|
|
632
|
+
}
|
|
633
|
+
declare const SCActivityCalendar: ({ background, setState, state, events, fn, configRangeHour, }: SCActivityCalendarProps) => React__default.JSX.Element;
|
|
634
|
+
|
|
480
635
|
declare const SincoTheme: _mui_material_styles.Theme;
|
|
481
636
|
declare let AdproSincoTheme: _mui_material_styles.Theme;
|
|
482
637
|
declare let ADCSincoTheme: _mui_material_styles.Theme;
|
|
483
638
|
|
|
484
|
-
export { ADCSincoTheme, AdproSincoTheme, Calendar, type CalendarEvent, type CalendarProps, type CalendarView, EmptyState, type EmptyStateProperties, type EmptyStateSize, type EmptyStateStates, FooterAction, type FooterActionsProperties, type ModalProps, type ModalStates, MultiSelect, type MultiSelectProps, PageHeader, type PageheaderProperties, type ReplyPalette$1 as ReplyPalette, type ReplyTextPalette, type ReplyVariants, type RepplyButtonVariants, SCAutocomplete, SCCalendarSwipeable, SCDataGrid, SCDataGridInitial, SCDateRange, SCDialog, SCDrawer, SCMenu, SCModal, SCSelect, SCTabs, SCTextArea, type SCTextAreaProps, SCTextField, type SCTextFieldProps, SCToastNotification, SincoTheme, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, getButtonColor, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useFilteredItems, useMultiSelectHandlers, useProgress };
|
|
639
|
+
export { ADCSincoTheme, AdproSincoTheme, Attachment, BasicMenu, type BasicMenuProps, CALENDAR_CONSTANTS, Calendar, type CalendarEvent, type CalendarProps, type CalendarView, type CellBorderType, DayEventsList, EmptyState, type EmptyStateProperties, type EmptyStateSize, type EmptyStateStates, type EventState, FooterAction, type FooterActionsProperties, type ModalProps, type ModalStates, MultiSelect, type MultiSelectProps, type NavigationAction, PageHeader, type PageheaderProperties, type ReplyPalette$1 as ReplyPalette, type ReplyTextPalette, type ReplyVariants, type RepplyButtonVariants, SCActivityCalendar, SCAutocomplete, SCCalendarSwipeable, SCCard, SCDataGrid, SCDataGridInitial, SCDateRange, SCDialog, SCDrawer, SCListContent, SCMenu, SCModal, SCSelect, SCTabs, SCTextArea, type SCTextAreaProps, SCTextField, type SCTextFieldProps, SCTime, SCToastNotification, SincoTheme, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, clampEventToVisibleRange, filterEventsForDay, getButtonColor, getCellBorderType, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useCalendarNavigation, useFilteredItems, useMultiSelectHandlers, useProgress };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,35 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ComponentType, ReactNode } from 'react';
|
|
3
|
+
import * as _mui_material from '@mui/material';
|
|
4
|
+
import { SxProps } from '@mui/material';
|
|
3
5
|
import * as Muicon from '@mui/icons-material';
|
|
4
6
|
import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
|
|
5
|
-
import * as _mui_material from '@mui/material';
|
|
6
7
|
import dayjs, { Dayjs } from 'dayjs';
|
|
7
8
|
import * as _mui_material_styles from '@mui/material/styles';
|
|
8
9
|
|
|
10
|
+
interface UploadedFile {
|
|
11
|
+
name: string;
|
|
12
|
+
size: number;
|
|
13
|
+
type: string;
|
|
14
|
+
progress: number;
|
|
15
|
+
uploadError?: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface AdjuntarProps<T> {
|
|
18
|
+
sx?: SxProps;
|
|
19
|
+
files?: T[];
|
|
20
|
+
error?: boolean;
|
|
21
|
+
compact?: boolean;
|
|
22
|
+
maxSize?: number;
|
|
23
|
+
fileAccepted?: string;
|
|
24
|
+
onChange?: (archivos: File[]) => void;
|
|
25
|
+
onLoading?: boolean;
|
|
26
|
+
downloadAction?: (name: string) => void;
|
|
27
|
+
deleteAction?: (name: string) => Promise<void> | void;
|
|
28
|
+
initialFiles?: UploadedFile[];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare const Attachment: ({ sx, compact, error, maxSize, fileAccepted, onLoading, onChange, downloadAction, deleteAction, initialFiles, }: AdjuntarProps<any>) => React__default.JSX.Element;
|
|
32
|
+
|
|
9
33
|
type ReplyPalette$1 = "primary" | "secondary" | "warning" | "info" | "success" | "error" | any;
|
|
10
34
|
type ReplyTextPalette = "primary" | "secondary" | "disabled";
|
|
11
35
|
type ReplyVariants = "outlined" | "filled" | "standard";
|
|
@@ -80,6 +104,8 @@ interface DrawerProps<T> {
|
|
|
80
104
|
anchor?: "left" | "right";
|
|
81
105
|
width?: string;
|
|
82
106
|
open?: boolean;
|
|
107
|
+
setOpen?: any;
|
|
108
|
+
chipFilters?: any[];
|
|
83
109
|
}
|
|
84
110
|
|
|
85
111
|
type ToastType = 'success' | 'error' | 'warning' | 'info';
|
|
@@ -106,7 +132,7 @@ declare const ToastProgress: (timeProgress: number) => {
|
|
|
106
132
|
progressToast: number;
|
|
107
133
|
};
|
|
108
134
|
|
|
109
|
-
declare function SCDrawer<T>({ title, arrayElements, actions, buttonDrawer, colorTitle, anchor, width, open, }: DrawerProps<T>): React__default.JSX.Element;
|
|
135
|
+
declare function SCDrawer<T>({ title, arrayElements, actions, buttonDrawer, colorTitle, anchor, width, open, setOpen, chipFilters, }: DrawerProps<T>): React__default.JSX.Element;
|
|
110
136
|
|
|
111
137
|
interface FooterActionsProperties {
|
|
112
138
|
label?: React.ReactNode;
|
|
@@ -150,6 +176,7 @@ interface ModalProps {
|
|
|
150
176
|
fn: () => void;
|
|
151
177
|
disabled?: boolean;
|
|
152
178
|
}[];
|
|
179
|
+
setOpen?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
153
180
|
buttonModal?: {
|
|
154
181
|
icon?: string;
|
|
155
182
|
text?: string;
|
|
@@ -164,7 +191,7 @@ declare const getIconComponent: (iconName?: string) => React.ElementType;
|
|
|
164
191
|
declare const getModalColor: (state: string) => string;
|
|
165
192
|
declare const getButtonColor: (state: string) => 'inherit' | 'info' | 'error' | 'warning';
|
|
166
193
|
|
|
167
|
-
declare const SCModal: ({ buttonModal, state, open, title, description, action, }: ModalProps) => React__default.JSX.Element;
|
|
194
|
+
declare const SCModal: ({ buttonModal, state, open, setOpen, title, description, action, }: ModalProps) => React__default.JSX.Element;
|
|
168
195
|
|
|
169
196
|
interface MultiSelectProps<T> {
|
|
170
197
|
textButton?: string;
|
|
@@ -283,6 +310,33 @@ interface SCTextFieldProps {
|
|
|
283
310
|
|
|
284
311
|
declare const SCTextField: ({ title, iconTitle, infoTitle, label, placeholder, infoElement, iconInputStart, iconInputEnd, maxLength, variant, format, disabled, required, size, width, color, background, setState, state, onChange, onBlur, onKeyDown, }: SCTextFieldProps) => React__default.JSX.Element;
|
|
285
312
|
|
|
313
|
+
interface SCCalendarSwipeableProps {
|
|
314
|
+
background?: string;
|
|
315
|
+
setState: React__default.Dispatch<React__default.SetStateAction<string>>;
|
|
316
|
+
state: string | any;
|
|
317
|
+
}
|
|
318
|
+
declare const SCCalendarSwipeable: ({ background, setState, state, }: SCCalendarSwipeableProps) => React__default.JSX.Element;
|
|
319
|
+
|
|
320
|
+
interface SCDataGridInitialProps<T> {
|
|
321
|
+
data: T[];
|
|
322
|
+
columns: any;
|
|
323
|
+
rowsTable?: number;
|
|
324
|
+
checkboxSelection?: boolean;
|
|
325
|
+
width?: string | number;
|
|
326
|
+
maxHeight?: number;
|
|
327
|
+
density?: "compact" | "standard" | "comfortable";
|
|
328
|
+
groupColumns?: (item: any) => {
|
|
329
|
+
textGroup1?: string;
|
|
330
|
+
valueGroup1?: string;
|
|
331
|
+
textGroup2?: string;
|
|
332
|
+
valueGroup2?: string;
|
|
333
|
+
headerNameFirstColumn?: string;
|
|
334
|
+
fieldFirstColumn?: string;
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
declare function SCDataGridInitial<T>({ data, columns, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }: SCDataGridInitialProps<T>): React__default.JSX.Element;
|
|
338
|
+
declare const SCDataGrid: React__default.MemoExoticComponent<typeof SCDataGridInitial>;
|
|
339
|
+
|
|
286
340
|
interface SCAutocompleteProps<T> {
|
|
287
341
|
label?: string;
|
|
288
342
|
data: T[];
|
|
@@ -310,26 +364,6 @@ interface SCAutocompleteProps<T> {
|
|
|
310
364
|
}
|
|
311
365
|
declare function SCAutocomplete<T>({ label, data, columnGroup, getItemValue, typeFormat, checkMassive, deleteType, fnAplicar, required, disabled, background, setState, state, inputChange, maxCheck, }: SCAutocompleteProps<T>): React__default.JSX.Element;
|
|
312
366
|
|
|
313
|
-
interface SCCalendarSwipeableProps {
|
|
314
|
-
background?: string;
|
|
315
|
-
setState: React__default.Dispatch<React__default.SetStateAction<string>>;
|
|
316
|
-
state: string | any;
|
|
317
|
-
}
|
|
318
|
-
declare const SCCalendarSwipeable: ({ background, setState, state, }: SCCalendarSwipeableProps) => React__default.JSX.Element;
|
|
319
|
-
|
|
320
|
-
interface SCDataGridInitialProps {
|
|
321
|
-
data: any;
|
|
322
|
-
columns: any;
|
|
323
|
-
groupColumns?: any;
|
|
324
|
-
rowsTable?: number;
|
|
325
|
-
checkboxSelection?: boolean;
|
|
326
|
-
width?: string | number;
|
|
327
|
-
maxHeight?: number;
|
|
328
|
-
density?: "compact" | "standard" | "comfortable";
|
|
329
|
-
}
|
|
330
|
-
declare const SCDataGridInitial: ({ data, columns, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }: SCDataGridInitialProps) => React__default.JSX.Element;
|
|
331
|
-
declare const SCDataGrid: React__default.MemoExoticComponent<({ data, columns, groupColumns, rowsTable, checkboxSelection, width, maxHeight, density }: SCDataGridInitialProps) => React__default.JSX.Element>;
|
|
332
|
-
|
|
333
367
|
type EmptyStateStates = 'create' | 'error' | 'noResult' | 'search';
|
|
334
368
|
type EmptyStateSize = 'small' | 'large';
|
|
335
369
|
interface EmptyStateProperties {
|
|
@@ -395,6 +429,23 @@ interface SCDialogProps {
|
|
|
395
429
|
}
|
|
396
430
|
declare const SCDialog: ({ title, iconTitle, subtitle, content, actions, buttonDialog, disableClose, dividers, widthContent, heightContent, background, setShow, show }: SCDialogProps) => React__default.JSX.Element;
|
|
397
431
|
|
|
432
|
+
interface Option$2 {
|
|
433
|
+
title?: string;
|
|
434
|
+
subtitle?: any;
|
|
435
|
+
description?: any;
|
|
436
|
+
iconLeftColor?: 'inherit' | 'action' | 'disabled' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
|
|
437
|
+
iconLeft?: any | React__default.ReactNode | React__default.ReactElement | React__default.ElementType | null;
|
|
438
|
+
iconRightColor?: 'inherit' | 'action' | 'disabled' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
|
|
439
|
+
iconRight?: any | React__default.ReactNode | React__default.ReactElement | React__default.ElementType | null;
|
|
440
|
+
divider?: boolean;
|
|
441
|
+
disable?: boolean;
|
|
442
|
+
fn?: any;
|
|
443
|
+
}
|
|
444
|
+
interface SCListContentProps {
|
|
445
|
+
options: Option$2[];
|
|
446
|
+
}
|
|
447
|
+
declare const SCListContent: ({ options }: SCListContentProps) => React__default.JSX.Element;
|
|
448
|
+
|
|
398
449
|
interface Option$1 {
|
|
399
450
|
name?: string;
|
|
400
451
|
iconLeft?: any | React__default.ReactNode | React__default.ReactElement | React__default.ElementType | null;
|
|
@@ -413,6 +464,23 @@ interface SCMenuProps {
|
|
|
413
464
|
}
|
|
414
465
|
declare const SCMenu: ({ header, options, defaultOption, disable, widthMenu, heightMenu, widthPage }: SCMenuProps) => React__default.JSX.Element;
|
|
415
466
|
|
|
467
|
+
interface BasicMenuProps {
|
|
468
|
+
open?: boolean;
|
|
469
|
+
onClose?: () => void;
|
|
470
|
+
button?: {
|
|
471
|
+
icon?: string;
|
|
472
|
+
text?: string;
|
|
473
|
+
color?: ReplyPalette$1;
|
|
474
|
+
variant?: RepplyButtonVariants;
|
|
475
|
+
iconPosition?: 'left' | 'right';
|
|
476
|
+
size?: "small" | "medium" | "large";
|
|
477
|
+
};
|
|
478
|
+
anchorEl?: null | HTMLElement;
|
|
479
|
+
handleClick?: (event: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
480
|
+
options?: [];
|
|
481
|
+
}
|
|
482
|
+
declare const BasicMenu: ({ open, onClose, button, anchorEl, handleClick, options }: BasicMenuProps) => React__default.JSX.Element;
|
|
483
|
+
|
|
416
484
|
interface SCSelectProps<T> {
|
|
417
485
|
label?: string;
|
|
418
486
|
data: T[];
|
|
@@ -424,10 +492,9 @@ interface SCSelectProps<T> {
|
|
|
424
492
|
width?: string;
|
|
425
493
|
size?: "small" | "medium";
|
|
426
494
|
variant?: "outlined" | "filled" | "standard";
|
|
427
|
-
|
|
495
|
+
background?: string;
|
|
428
496
|
required?: boolean;
|
|
429
497
|
disabled?: boolean;
|
|
430
|
-
background?: string;
|
|
431
498
|
fnAplicar?: () => void | React__default.ReactNode;
|
|
432
499
|
setState: React__default.Dispatch<React__default.SetStateAction<any>>;
|
|
433
500
|
state: {
|
|
@@ -435,7 +502,7 @@ interface SCSelectProps<T> {
|
|
|
435
502
|
textValue: string;
|
|
436
503
|
};
|
|
437
504
|
}
|
|
438
|
-
declare function SCSelect<T>({ label, data, getItemValue, width, size, variant,
|
|
505
|
+
declare function SCSelect<T>({ label, data, getItemValue, width, size, variant, background, required, disabled, setState, state, }: SCSelectProps<T>): React__default.JSX.Element;
|
|
439
506
|
|
|
440
507
|
interface Option {
|
|
441
508
|
name?: string;
|
|
@@ -458,12 +525,13 @@ interface SCTabsProps {
|
|
|
458
525
|
declare const SCTabs: ({ options, defaultOption, typeIcon, background, iconPosition, colorTab, orientation, variant, scrollButtons, children }: SCTabsProps) => React__default.JSX.Element;
|
|
459
526
|
|
|
460
527
|
type CalendarView = 'month' | 'week' | 'day';
|
|
528
|
+
type EventState = 'En progreso' | 'Finalizada' | 'Vencida' | 'Asignada' | 'Aplazada' | 'Generada';
|
|
461
529
|
interface CalendarEvent {
|
|
462
530
|
id: string;
|
|
463
531
|
title: string;
|
|
464
532
|
start: dayjs.Dayjs;
|
|
465
533
|
end: dayjs.Dayjs;
|
|
466
|
-
state:
|
|
534
|
+
state: EventState;
|
|
467
535
|
}
|
|
468
536
|
interface CalendarProps {
|
|
469
537
|
events: CalendarEvent[];
|
|
@@ -471,14 +539,101 @@ interface CalendarProps {
|
|
|
471
539
|
toolbar?: React.ReactNode;
|
|
472
540
|
onDayClick?: (date: dayjs.Dayjs) => void;
|
|
473
541
|
onMoreClick?: (date: dayjs.Dayjs, events: CalendarEvent[]) => void;
|
|
474
|
-
onViewChange?: (view: CalendarView) => void;
|
|
475
542
|
onEventClick?: (event: CalendarEvent, date?: dayjs.Dayjs) => void;
|
|
543
|
+
onViewChange?: (view: CalendarView) => void;
|
|
544
|
+
onDateChange?: (date: dayjs.Dayjs) => void;
|
|
545
|
+
onEventHover?: (event: CalendarEvent) => React.ReactNode;
|
|
546
|
+
onNavigate?: (action: 'TODAY' | 'PREV' | 'NEXT') => void;
|
|
547
|
+
isLoading?: boolean;
|
|
548
|
+
startHour?: number;
|
|
549
|
+
endHour?: number;
|
|
476
550
|
}
|
|
477
551
|
|
|
478
552
|
declare const Calendar: React__default.FC<CalendarProps>;
|
|
479
553
|
|
|
554
|
+
declare const CALENDAR_CONSTANTS: {
|
|
555
|
+
readonly GRID_TEMPLATE: "repeat(7, minmax(150px, 1fr))";
|
|
556
|
+
readonly DAY_HEIGHT: 60;
|
|
557
|
+
readonly SIDEBAR_WIDTH: 47;
|
|
558
|
+
readonly MIN_CELL_HEIGHT: 120;
|
|
559
|
+
readonly DEFAULT_START_HOUR: 0;
|
|
560
|
+
readonly DEFAULT_END_HOUR: 23;
|
|
561
|
+
readonly DRAWER_WIDTH: "350px";
|
|
562
|
+
readonly MAX_VISIBLE_EVENTS: 2;
|
|
563
|
+
readonly MIN_WIDTH: "1050px";
|
|
564
|
+
readonly LOADING_SPINNER_SIZE: "60px";
|
|
565
|
+
readonly LOADING_CONTAINER_HEIGHT: "450px";
|
|
566
|
+
readonly DAY_CIRCLE_SIZE: 24;
|
|
567
|
+
};
|
|
568
|
+
|
|
569
|
+
type NavigationAction = 'PREV' | 'NEXT' | 'TODAY';
|
|
570
|
+
declare const useCalendarNavigation: (initialDate?: dayjs.Dayjs, onDateChange?: ((date: dayjs.Dayjs) => void) | undefined) => {
|
|
571
|
+
currentDate: dayjs.Dayjs;
|
|
572
|
+
setCurrentDate: React$1.Dispatch<React$1.SetStateAction<dayjs.Dayjs>>;
|
|
573
|
+
navigateDate: (action: NavigationAction, view: CalendarView) => void;
|
|
574
|
+
};
|
|
575
|
+
|
|
576
|
+
type CellBorderType = 'full' | 'start' | 'end' | 'middle' | 'none';
|
|
577
|
+
declare const filterEventsForDay: (events: CalendarEvent[], day: Dayjs) => CalendarEvent[];
|
|
578
|
+
declare const getCellBorderType: (cellHour: number, dayEvents: CalendarEvent[]) => CellBorderType;
|
|
579
|
+
declare const clampEventToVisibleRange: (event: CalendarEvent, currentDate: Dayjs, startHour: number, endHour: number) => {
|
|
580
|
+
startMinutes: number;
|
|
581
|
+
durationMinutes: number;
|
|
582
|
+
clampedStart: dayjs.Dayjs;
|
|
583
|
+
clampedEnd: dayjs.Dayjs;
|
|
584
|
+
};
|
|
585
|
+
|
|
586
|
+
interface DayEventsListProps {
|
|
587
|
+
events: CalendarEvent[];
|
|
588
|
+
day: dayjs.Dayjs;
|
|
589
|
+
onEventClick?: (event: CalendarEvent, date?: dayjs.Dayjs) => void;
|
|
590
|
+
onEventHover?: (event: CalendarEvent) => React__default.ReactNode;
|
|
591
|
+
}
|
|
592
|
+
declare const DayEventsList: React__default.FC<DayEventsListProps>;
|
|
593
|
+
|
|
594
|
+
interface SCTimeProps {
|
|
595
|
+
label?: string;
|
|
596
|
+
required?: boolean;
|
|
597
|
+
disabled?: boolean;
|
|
598
|
+
background?: string;
|
|
599
|
+
timeStep?: number;
|
|
600
|
+
state: Dayjs | null;
|
|
601
|
+
setState: (value: Dayjs | null) => void;
|
|
602
|
+
}
|
|
603
|
+
declare const SCTime: ({ label, required, disabled, background, timeStep, state, setState, }: SCTimeProps) => React__default.JSX.Element;
|
|
604
|
+
|
|
605
|
+
interface SCCardProps {
|
|
606
|
+
title?: string;
|
|
607
|
+
subtitle?: string;
|
|
608
|
+
iconTitle?: React__default.ReactNode | React__default.ReactElement | keyof typeof Muicon;
|
|
609
|
+
actionsTitle?: any;
|
|
610
|
+
image?: any;
|
|
611
|
+
content?: any;
|
|
612
|
+
actions?: {
|
|
613
|
+
text?: string;
|
|
614
|
+
fn: () => void;
|
|
615
|
+
disabled?: boolean;
|
|
616
|
+
}[];
|
|
617
|
+
expand?: {
|
|
618
|
+
type?: 'icon' | 'text';
|
|
619
|
+
position?: 'top' | 'bottom';
|
|
620
|
+
content?: string;
|
|
621
|
+
};
|
|
622
|
+
}
|
|
623
|
+
declare const SCCard: ({ title, image, iconTitle, actionsTitle, subtitle, content, actions, expand }: SCCardProps) => React__default.JSX.Element;
|
|
624
|
+
|
|
625
|
+
interface SCActivityCalendarProps {
|
|
626
|
+
background?: string;
|
|
627
|
+
setState: React__default.Dispatch<React__default.SetStateAction<string>>;
|
|
628
|
+
state: string | any;
|
|
629
|
+
events: any[];
|
|
630
|
+
fn?: any;
|
|
631
|
+
configRangeHour?: string;
|
|
632
|
+
}
|
|
633
|
+
declare const SCActivityCalendar: ({ background, setState, state, events, fn, configRangeHour, }: SCActivityCalendarProps) => React__default.JSX.Element;
|
|
634
|
+
|
|
480
635
|
declare const SincoTheme: _mui_material_styles.Theme;
|
|
481
636
|
declare let AdproSincoTheme: _mui_material_styles.Theme;
|
|
482
637
|
declare let ADCSincoTheme: _mui_material_styles.Theme;
|
|
483
638
|
|
|
484
|
-
export { ADCSincoTheme, AdproSincoTheme, Calendar, type CalendarEvent, type CalendarProps, type CalendarView, EmptyState, type EmptyStateProperties, type EmptyStateSize, type EmptyStateStates, FooterAction, type FooterActionsProperties, type ModalProps, type ModalStates, MultiSelect, type MultiSelectProps, PageHeader, type PageheaderProperties, type ReplyPalette$1 as ReplyPalette, type ReplyTextPalette, type ReplyVariants, type RepplyButtonVariants, SCAutocomplete, SCCalendarSwipeable, SCDataGrid, SCDataGridInitial, SCDateRange, SCDialog, SCDrawer, SCMenu, SCModal, SCSelect, SCTabs, SCTextArea, type SCTextAreaProps, SCTextField, type SCTextFieldProps, SCToastNotification, SincoTheme, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, getButtonColor, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useFilteredItems, useMultiSelectHandlers, useProgress };
|
|
639
|
+
export { ADCSincoTheme, AdproSincoTheme, Attachment, BasicMenu, type BasicMenuProps, CALENDAR_CONSTANTS, Calendar, type CalendarEvent, type CalendarProps, type CalendarView, type CellBorderType, DayEventsList, EmptyState, type EmptyStateProperties, type EmptyStateSize, type EmptyStateStates, type EventState, FooterAction, type FooterActionsProperties, type ModalProps, type ModalStates, MultiSelect, type MultiSelectProps, type NavigationAction, PageHeader, type PageheaderProperties, type ReplyPalette$1 as ReplyPalette, type ReplyTextPalette, type ReplyVariants, type RepplyButtonVariants, SCActivityCalendar, SCAutocomplete, SCCalendarSwipeable, SCCard, SCDataGrid, SCDataGridInitial, SCDateRange, SCDialog, SCDrawer, SCListContent, SCMenu, SCModal, SCSelect, SCTabs, SCTextArea, type SCTextAreaProps, SCTextField, type SCTextFieldProps, SCTime, SCToastNotification, SincoTheme, type ToastBaseProperties, ToastProgress, type ToastType, capitalize, clampEventToVisibleRange, filterEventsForDay, getButtonColor, getCellBorderType, getIcon, getIconComponent, getIconMultiSelect, getModalColor, modalStateConfig, useCalendarNavigation, useFilteredItems, useMultiSelectHandlers, useProgress };
|