@imj_media/ui 1.6.10 → 1.6.12
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/CHANGELOG.md +31 -0
- package/README.md +1 -1
- package/dist/index.css +1 -1
- package/dist/index.esm.js +12775 -11401
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist/modules/CatalogCard/components/organisms/CatalogCard.d.ts +3 -2
- package/dist/modules/CatalogCard/components/organisms/CatalogCard.d.ts.map +1 -1
- package/dist/modules/CatalogCard/components/organisms/CatalogSupplierCard.d.ts +3 -0
- package/dist/modules/CatalogCard/components/organisms/CatalogSupplierCard.d.ts.map +1 -1
- package/dist/modules/CatalogCard/stories/CatalogCard.stories.d.ts +4 -0
- package/dist/modules/CatalogCard/stories/CatalogCard.stories.d.ts.map +1 -1
- package/dist/modules/CatalogCard/types/index.d.ts +7 -5
- package/dist/modules/CatalogCard/types/index.d.ts.map +1 -1
- package/dist/modules/Ghantt/Ghantt.d.ts +32 -0
- package/dist/modules/Ghantt/Ghantt.d.ts.map +1 -0
- package/dist/modules/Ghantt/GhanttTimelineHeader.d.ts +18 -0
- package/dist/modules/Ghantt/GhanttTimelineHeader.d.ts.map +1 -0
- package/dist/modules/Ghantt/index.d.ts +5 -0
- package/dist/modules/Ghantt/index.d.ts.map +1 -0
- package/dist/modules/Ghantt/mergeGhanttColumns.d.ts +10 -0
- package/dist/modules/Ghantt/mergeGhanttColumns.d.ts.map +1 -0
- package/dist/modules/Ghantt/stories/Ghantt.stories.d.ts +26 -0
- package/dist/modules/Ghantt/stories/Ghantt.stories.d.ts.map +1 -0
- package/dist/modules/RangeBar/components/molecules/RangeBar.d.ts +14 -18
- package/dist/modules/RangeBar/components/molecules/RangeBar.d.ts.map +1 -1
- package/dist/modules/RangeBar/components/organisms/RangeSelector.d.ts +14 -30
- package/dist/modules/RangeBar/components/organisms/RangeSelector.d.ts.map +1 -1
- package/dist/modules/RangeBar/index.d.ts +1 -1
- package/dist/modules/RangeBar/index.d.ts.map +1 -1
- package/dist/modules/RangeBar/stories/RangeBar.stories.d.ts.map +1 -1
- package/dist/modules/RangeBar/types/index.d.ts +48 -0
- package/dist/modules/RangeBar/types/index.d.ts.map +1 -1
- package/dist/modules/Table/components/atoms/GanttCell.d.ts +10 -0
- package/dist/modules/Table/components/atoms/GanttCell.d.ts.map +1 -0
- package/dist/modules/Table/components/atoms/index.d.ts +1 -0
- package/dist/modules/Table/components/atoms/index.d.ts.map +1 -1
- package/dist/modules/Table/components/molecules/CellRenderer.d.ts.map +1 -1
- package/dist/modules/Table/components/molecules/HeaderCell.d.ts.map +1 -1
- package/dist/modules/Table/components/molecules/TableRow.d.ts +3 -1
- package/dist/modules/Table/components/molecules/TableRow.d.ts.map +1 -1
- package/dist/modules/Table/components/organisms/TableBody.d.ts +4 -1
- package/dist/modules/Table/components/organisms/TableBody.d.ts.map +1 -1
- package/dist/modules/Table/components/organisms/TableContent.d.ts.map +1 -1
- package/dist/modules/Table/components/organisms/TableHeader.d.ts +5 -3
- package/dist/modules/Table/components/organisms/TableHeader.d.ts.map +1 -1
- package/dist/modules/Table/utils/cellStyles.d.ts +2 -2
- package/dist/modules/Table/utils/cellStyles.d.ts.map +1 -1
- package/dist/modules/index.d.ts +1 -0
- package/dist/modules/index.d.ts.map +1 -1
- package/dist/shared/ghantt/GhanttConfigContext.d.ts +36 -0
- package/dist/shared/ghantt/GhanttConfigContext.d.ts.map +1 -0
- package/dist/shared/ghantt/GhanttScrollVirtualContext.d.ts +34 -0
- package/dist/shared/ghantt/GhanttScrollVirtualContext.d.ts.map +1 -0
- package/dist/shared/ghantt/GhanttSlotStrip.d.ts +62 -0
- package/dist/shared/ghantt/GhanttSlotStrip.d.ts.map +1 -0
- package/dist/shared/ghantt/GhanttSlotStrip.test.d.ts +2 -0
- package/dist/shared/ghantt/GhanttSlotStrip.test.d.ts.map +1 -0
- package/dist/shared/ghantt/ganttTimeline.d.ts +65 -0
- package/dist/shared/ghantt/ganttTimeline.d.ts.map +1 -0
- package/dist/shared/ghantt/ganttTimeline.test.d.ts +2 -0
- package/dist/shared/ghantt/ganttTimeline.test.d.ts.map +1 -0
- package/dist/shared/ghantt/ghanttHorizontalScroll.d.ts +21 -0
- package/dist/shared/ghantt/ghanttHorizontalScroll.d.ts.map +1 -0
- package/dist/shared/ghantt/ghanttLayoutConstants.d.ts +6 -0
- package/dist/shared/ghantt/ghanttLayoutConstants.d.ts.map +1 -0
- package/dist/shared/ghantt/ghanttModifierWheelZoom.d.ts +92 -0
- package/dist/shared/ghantt/ghanttModifierWheelZoom.d.ts.map +1 -0
- package/dist/shared/ghantt/ghanttModifierWheelZoom.test.d.ts +2 -0
- package/dist/shared/ghantt/ghanttModifierWheelZoom.test.d.ts.map +1 -0
- package/dist/shared/ghantt/ghanttZoomAnchor.d.ts +9 -0
- package/dist/shared/ghantt/ghanttZoomAnchor.d.ts.map +1 -0
- package/dist/shared/ghantt/ghanttZoomAnchor.test.d.ts +2 -0
- package/dist/shared/ghantt/ghanttZoomAnchor.test.d.ts.map +1 -0
- package/dist/shared/ghantt/index.d.ts +11 -0
- package/dist/shared/ghantt/index.d.ts.map +1 -0
- package/dist/shared/ghantt/types.d.ts +94 -0
- package/dist/shared/ghantt/types.d.ts.map +1 -0
- package/dist/shared/types/table.d.ts +30 -2
- package/dist/shared/types/table.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { RefObject, default as React } from 'react';
|
|
1
2
|
import { ColumnConfig, SortConfig, FilterConfig } from '../../../../shared/types/table';
|
|
2
|
-
interface TableHeaderProps<T = unknown> {
|
|
3
|
+
export interface TableHeaderProps<T = unknown> {
|
|
3
4
|
columns: ColumnConfig<T>[];
|
|
5
|
+
/** Anchos medidos en `TableContent` (ResizeObserver sobre `<thead>`). */
|
|
6
|
+
columnWidthsRef?: RefObject<Map<string, number>>;
|
|
4
7
|
sortConfig?: SortConfig;
|
|
5
8
|
filters?: FilterConfig[];
|
|
6
9
|
showSelection?: boolean;
|
|
@@ -24,6 +27,5 @@ interface TableHeaderProps<T = unknown> {
|
|
|
24
27
|
/** Por defecto de bloqueo a nivel tabla; las columnas pueden anular con `lockable`. */
|
|
25
28
|
columnsLockable?: boolean;
|
|
26
29
|
}
|
|
27
|
-
export declare const TableHeader: <T>(
|
|
28
|
-
export {};
|
|
30
|
+
export declare const TableHeader: <T>(props: TableHeaderProps<T> & React.RefAttributes<HTMLTableSectionElement>) => React.ReactElement | null;
|
|
29
31
|
//# sourceMappingURL=TableHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../../../src/modules/Table/components/organisms/TableHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../../../src/modules/Table/components/organisms/TableHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAM9E,MAAM,WAAW,gBAAgB,CAAC,CAAC,GAAG,OAAO;IAC3C,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3B,yEAAyE;IACzE,eAAe,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACjD,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,mBAAmB,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACnF,mBAAmB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IAChE,oGAAoG;IACpG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,uFAAuF;IACvF,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAoKD,eAAO,MAAM,WAAW,EAAuB,CAAC,CAAC,EAC/C,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,uBAAuB,CAAC,KACtE,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC"}
|
|
@@ -31,8 +31,8 @@ export declare const DEFAULT_FLEX_COLUMN_MIN_WIDTH = 300;
|
|
|
31
31
|
export declare const getTableCellProps: (column: ColumnConfig, stickyLeft?: number, stickyRight?: number, isActionsColumn?: boolean, hasColumnMaxWidthAuto?: boolean) => {
|
|
32
32
|
'data-column-id': string;
|
|
33
33
|
style: {
|
|
34
|
-
right?:
|
|
35
|
-
left?:
|
|
34
|
+
right?: string | undefined;
|
|
35
|
+
left?: string | undefined;
|
|
36
36
|
width: string | number | undefined;
|
|
37
37
|
minWidth: number;
|
|
38
38
|
maxWidth: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cellStyles.d.ts","sourceRoot":"","sources":["../../../../src/modules/Table/utils/cellStyles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,mBAAmB,GAC9B,QAAO,SAAqB,EAC5B,oBAAoB,MAAM,EAC1B,SAAS,OAAO,EAChB,eAAe,OAAO,EACtB,YAAY,OAAO,EACnB,eAAe,OAAO,EACtB,kBAAkB,OAAO,EACzB,gBAAgB,OAAO,KACtB,MAyCF,CAAC;AAEF,yGAAyG;AACzG,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAEhD,kNAAkN;AAClN,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,+KAA+K;AAC/K,eAAO,MAAM,6BAA6B,MAAM,CAAC;AAEjD;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,YAAY,EACpB,aAAY,MAAU,EACtB,cAAc,MAAM,EACpB,kBAAkB,OAAO,EACzB,wBAAwB,OAAO;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"cellStyles.d.ts","sourceRoot":"","sources":["../../../../src/modules/Table/utils/cellStyles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,mBAAmB,GAC9B,QAAO,SAAqB,EAC5B,oBAAoB,MAAM,EAC1B,SAAS,OAAO,EAChB,eAAe,OAAO,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Ac,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { GhanttHorizontalScroll } from './ghanttHorizontalScroll';
|
|
3
|
+
import { GhanttTimelineSlot, GhanttUpperSegment } from './ganttTimeline';
|
|
4
|
+
import { GhanttAppearanceProps, GhanttEventsProps, GhanttTimelineProps } from './types';
|
|
5
|
+
/** Eje temporal diario resuelto (misma ventana para cabecera, celdas y % de barras). `endExclusiveMs` es exclusivo. */
|
|
6
|
+
export interface GhanttDayAxis {
|
|
7
|
+
startMs: number;
|
|
8
|
+
endExclusiveMs: number;
|
|
9
|
+
}
|
|
10
|
+
/** Valor del contexto: timeline y opciones compartidas por la columna Gantt (cabecera + celdas). */
|
|
11
|
+
export interface GhanttConfigContextValue<T = unknown> {
|
|
12
|
+
timeline: GhanttTimelineProps;
|
|
13
|
+
appearance: GhanttAppearanceProps;
|
|
14
|
+
events: GhanttEventsProps<T>;
|
|
15
|
+
/**
|
|
16
|
+
* Slots del timeline precalculados por {@link Ghantt} (misma referencia para cabecera y todas las filas).
|
|
17
|
+
* Evita repetir `ghanttBuildTimelineSlots` en cada celda cuando el rango es muy largo.
|
|
18
|
+
*/
|
|
19
|
+
timelineSlots?: readonly GhanttTimelineSlot[];
|
|
20
|
+
/** Segmentos de la planta superior (meses/años) precalculados. */
|
|
21
|
+
upperSegments?: readonly GhanttUpperSegment[];
|
|
22
|
+
/** Presente con `scale: 'day'`: rango ampliado a meses completos para scroll y alineación de barras. */
|
|
23
|
+
dayAxis?: GhanttDayAxis | null;
|
|
24
|
+
/** Scroll horizontal unificado (cabecera = viewport; cuerpo = translate). Solo lo define {@link Ghantt}. */
|
|
25
|
+
horizontalScroll?: GhanttHorizontalScroll | null;
|
|
26
|
+
}
|
|
27
|
+
export declare function GhanttConfigProvider<T>({ value, children, }: {
|
|
28
|
+
value: GhanttConfigContextValue<T>;
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
/**
|
|
32
|
+
* Configuración de la columna Gantt inyectada por el organismo `Ghantt`.
|
|
33
|
+
* Fuera del proveedor devuelve `null`.
|
|
34
|
+
*/
|
|
35
|
+
export declare function useGhanttConfig<T = unknown>(): GhanttConfigContextValue<T> | null;
|
|
36
|
+
//# sourceMappingURL=GhanttConfigContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GhanttConfigContext.d.ts","sourceRoot":"","sources":["../../../src/shared/ghantt/GhanttConfigContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE7F,uHAAuH;AACvH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,oGAAoG;AACpG,MAAM,WAAW,wBAAwB,CAAC,CAAC,GAAG,OAAO;IACnD,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,UAAU,EAAE,qBAAqB,CAAC;IAClC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAC7B;;;OAGG;IACH,aAAa,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAC9C,kEAAkE;IAClE,aAAa,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAC9C,wGAAwG;IACxG,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC/B,4GAA4G;IAC5G,gBAAgB,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAC;CAClD;AAID,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,EACtC,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,wBAAwB,CAAC,CAAC,CAAC,CAAC;IACnC,QAAQ,EAAE,SAAS,CAAC;CACrB,2CAMA;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,GAAG,OAAO,KAAK,wBAAwB,CAAC,CAAC,CAAC,GAAG,IAAI,CAEjF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type GhanttScrollVirtualSlotRange = {
|
|
3
|
+
start: number;
|
|
4
|
+
end: number;
|
|
5
|
+
};
|
|
6
|
+
export interface GhanttScrollVirtualContextValue {
|
|
7
|
+
/** `true` cuando el host calcula la ventana (hora/día/semana con muchos slots). */
|
|
8
|
+
managed: boolean;
|
|
9
|
+
slotRange: GhanttScrollVirtualSlotRange | null;
|
|
10
|
+
}
|
|
11
|
+
/** Referencia estable cuando no hay virtualización por scroll. */
|
|
12
|
+
export declare const GHANTT_SCROLL_VIRTUAL_CTX_IDLE: GhanttScrollVirtualContextValue;
|
|
13
|
+
/**
|
|
14
|
+
* Store externo (`useSyncExternalStore`): actualizar la ventana no re-renderiza el organismo Ghantt
|
|
15
|
+
* ni la tabla completa, solo a los suscriptores (p. ej. cabecera con `GhanttSlotStrip`).
|
|
16
|
+
*/
|
|
17
|
+
export type GhanttScrollVirtualStore = {
|
|
18
|
+
subscribe: (onStoreChange: () => void) => () => void;
|
|
19
|
+
getSnapshot: () => GhanttScrollVirtualContextValue;
|
|
20
|
+
setIdle: () => void;
|
|
21
|
+
/** `managed === true`; `range === null` hasta la primera medición del viewport. */
|
|
22
|
+
setManagedRange: (range: GhanttScrollVirtualSlotRange | null) => void;
|
|
23
|
+
};
|
|
24
|
+
export declare function createGhanttScrollVirtualStore(): GhanttScrollVirtualStore;
|
|
25
|
+
export declare function GhanttScrollVirtualRoot({ store, children, }: {
|
|
26
|
+
store: GhanttScrollVirtualStore;
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
/**
|
|
30
|
+
* Ventana virtual de índices de slots (cabecera). Implementado con `useSyncExternalStore` para no
|
|
31
|
+
* re-renderizar celdas de tabla al hacer scroll horizontal.
|
|
32
|
+
*/
|
|
33
|
+
export declare function useGhanttScrollVirtual(): GhanttScrollVirtualContextValue;
|
|
34
|
+
//# sourceMappingURL=GhanttScrollVirtualContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GhanttScrollVirtualContext.d.ts","sourceRoot":"","sources":["../../../src/shared/ghantt/GhanttScrollVirtualContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAErG,MAAM,MAAM,4BAA4B,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAE1E,MAAM,WAAW,+BAA+B;IAC9C,mFAAmF;IACnF,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,4BAA4B,GAAG,IAAI,CAAC;CAChD;AAED,kEAAkE;AAClE,eAAO,MAAM,8BAA8B,EAAE,+BAG3C,CAAC;AAqBH;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,EAAE,CAAC,aAAa,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;IACrD,WAAW,EAAE,MAAM,+BAA+B,CAAC;IACnD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,mFAAmF;IACnF,eAAe,EAAE,CAAC,KAAK,EAAE,4BAA4B,GAAG,IAAI,KAAK,IAAI,CAAC;CACvE,CAAC;AAEF,wBAAgB,8BAA8B,IAAI,wBAAwB,CAiCzE;AAID,wBAAgB,uBAAuB,CAAC,EACtC,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,wBAAwB,CAAC;IAChC,QAAQ,EAAE,SAAS,CAAC;CACrB,2CAIA;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,+BAA+B,CAWxE"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { GhanttTimelineSlot, GhanttUpperSegment } from './ganttTimeline';
|
|
3
|
+
/** A partir de este número de slots se usa una rejilla CSS (una sola capa) en lugar de un nodo por columna. */
|
|
4
|
+
export declare const GHANTT_DENSE_SLOT_GRID_MIN_SLOTS = 96;
|
|
5
|
+
/**
|
|
6
|
+
* Con escala `hour` / `day` / `week` y al menos tantos slots, la **cabecera** (etiquetas por slot)
|
|
7
|
+
* virtualiza celdas con {@link ghanttScrollVirtualIndexRange}. El **cuerpo** con ancho fijo usa una
|
|
8
|
+
* sola capa CSS (gradiente) para todos los días/semanas; no duplica esa lógica por fila.
|
|
9
|
+
*/
|
|
10
|
+
export declare const GHANTT_SCROLL_VIRTUAL_MIN_SLOTS = 120;
|
|
11
|
+
/** @deprecated Usar {@link GHANTT_SCROLL_VIRTUAL_MIN_SLOTS}. */
|
|
12
|
+
export declare const GHANTT_HOUR_VIRTUAL_MIN_SLOTS = 120;
|
|
13
|
+
/**
|
|
14
|
+
* Rango de índices de slots (misma anchura en px) a renderizar para scroll fluido:
|
|
15
|
+
* ~200–300 slots “activos” anclados al scroll (viewport + colchón hacia ambos lados).
|
|
16
|
+
*/
|
|
17
|
+
export declare function ghanttScrollVirtualIndexRange(scrollLeftPx: number, viewportWidthPx: number, cellPx: number, slotCount: number): {
|
|
18
|
+
start: number;
|
|
19
|
+
end: number;
|
|
20
|
+
};
|
|
21
|
+
/** @deprecated Usar {@link ghanttScrollVirtualIndexRange}. */
|
|
22
|
+
export declare const ghanttHourVirtualIndexRange: typeof ghanttScrollVirtualIndexRange;
|
|
23
|
+
/** Tope usado por {@link ghanttDenseHeaderLabelIndices} (utilidades de muestreo; la cabecera del strip pinta un label por slot). */
|
|
24
|
+
export declare const GHANTT_DENSE_HEADER_MAX_LABELS = 72;
|
|
25
|
+
/**
|
|
26
|
+
* Índices de slot en los que dibujar etiqueta en cabecera densa (inicio + cada ~step + último slot).
|
|
27
|
+
*/
|
|
28
|
+
export declare function ghanttDenseHeaderLabelIndices(slotCount: number, maxLabels: number): number[];
|
|
29
|
+
/**
|
|
30
|
+
* Índices de etiquetas en cabecera densa repartidos **por cada bloque del piso superior** (p. ej. mes),
|
|
31
|
+
* para que al hacer scroll siempre haya etiquetas secundarias en el viewport. Si `upperSpans` no
|
|
32
|
+
* encaja con `totalSlots`, se usa {@link ghanttDenseHeaderLabelIndices} global.
|
|
33
|
+
*/
|
|
34
|
+
export declare function ghanttDenseHeaderLabelIndicesByUpperSpans(totalSlots: number, upperSpans: readonly number[], maxLabels: number): number[];
|
|
35
|
+
export interface GhanttSlotStripProps {
|
|
36
|
+
slots: readonly GhanttTimelineSlot[];
|
|
37
|
+
/** Segmentos mayores (meses, años) para dibujar la rejilla principal. Si se pasan, se ocultan las líneas de los slots individuales. */
|
|
38
|
+
upperSegments?: readonly GhanttUpperSegment[];
|
|
39
|
+
/** `header`: fondo de cabecera; `body`: transparente para heredar fila (selección, hijos, zebra). */
|
|
40
|
+
variant: 'header' | 'body';
|
|
41
|
+
/** Contenido por celda de slot (cabecera con etiquetas). En cuerpo suele omitirse. */
|
|
42
|
+
renderSlot?: (slot: GhanttTimelineSlot) => ReactNode;
|
|
43
|
+
className?: string;
|
|
44
|
+
/** Ancho fijo por slot (px). Suele ir dentro de un contenedor con `overflow-x-auto` en la columna Gantt. */
|
|
45
|
+
slotMinWidthPx?: number;
|
|
46
|
+
/**
|
|
47
|
+
* Umbral para rejilla densa **solo en cuerpo** (gradiente repetido). La cabecera siempre usa una celda por slot.
|
|
48
|
+
* @default {@link GHANTT_DENSE_SLOT_GRID_MIN_SLOTS}
|
|
49
|
+
*/
|
|
50
|
+
densePatternMinSlots?: number;
|
|
51
|
+
}
|
|
52
|
+
/** Ancho de celda en px alineado a píxeles enteros (cabecera, cuerpo y gradiente comparten el mismo valor). */
|
|
53
|
+
export declare function ghanttSnapSlotWidthPx(slotMinWidthPx: number): number;
|
|
54
|
+
/**
|
|
55
|
+
* Líneas verticales entre slots o segmentos mayores.
|
|
56
|
+
* `slotPixelWidth` suele ser {@link ghanttSnapSlotWidthPx}(`columnWidthPx`).
|
|
57
|
+
*/
|
|
58
|
+
export declare function ghanttVerticalSlotGridBackgroundStyle(slotCount: number, slotPixelWidth: number, upperSegments?: readonly GhanttUpperSegment[], hideMinorGrid?: boolean): CSSProperties;
|
|
59
|
+
declare function GhanttSlotStripRoot(props: GhanttSlotStripProps): import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
export declare const GhanttSlotStrip: import('react').MemoExoticComponent<typeof GhanttSlotStripRoot>;
|
|
61
|
+
export {};
|
|
62
|
+
//# sourceMappingURL=GhanttSlotStrip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GhanttSlotStrip.d.ts","sourceRoot":"","sources":["../../../src/shared/ghantt/GhanttSlotStrip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAK9E,+GAA+G;AAC/G,eAAO,MAAM,gCAAgC,KAAK,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,MAAM,CAAC;AAEnD,gEAAgE;AAChE,eAAO,MAAM,6BAA6B,MAAkC,CAAC;AAK7E;;;GAGG;AACH,wBAAg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CA6Cf;AAoQD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,oBAAoB,2CAMvD;AAED,eAAO,MAAM,eAAe,iEAAuD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GhanttSlotStrip.test.d.ts","sourceRoot":"","sources":["../../../src/shared/ghantt/GhanttSlotStrip.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { GhanttTimelineScale } from './types';
|
|
2
|
+
/** Convierte `Date` o ISO/string en timestamp ms. */
|
|
3
|
+
export declare function ghanttParseTime(d: Date | string): number;
|
|
4
|
+
/** Inicio del día local (00:00) para un timestamp. */
|
|
5
|
+
export declare function ghanttStartOfLocalDay(ms: number): number;
|
|
6
|
+
/** Inicio del mes local. */
|
|
7
|
+
export declare function ghanttStartOfLocalMonth(ms: number): number;
|
|
8
|
+
/** Inicio de la hora local (minutos y segundos a 0). */
|
|
9
|
+
export declare function ghanttStartOfLocalHour(ms: number): number;
|
|
10
|
+
/** Suma meses calendario en hora local (mismo día del mes cuando existe). */
|
|
11
|
+
export declare function ghanttAddCalendarMonths(ms: number, delta: number): number;
|
|
12
|
+
export interface GhanttExpandedDayRangeOptions {
|
|
13
|
+
/** Incluye el mes completo **anterior** al mes que contiene `viewStart`. @default true */
|
|
14
|
+
includeLeadingFullMonth?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Rango de eje diario para rejilla y barras: mes anterior completo + meses hasta fin del mes de `viewEnd`.
|
|
18
|
+
* `endExclusiveMs` es el instante 00:00 del día siguiente al último día incluido (intervalo semiabierto).
|
|
19
|
+
*/
|
|
20
|
+
export declare function ghanttResolveExpandedDayRange(viewStart: Date | string, viewEnd: Date | string, options?: GhanttExpandedDayRangeOptions): {
|
|
21
|
+
startMs: number;
|
|
22
|
+
endExclusiveMs: number;
|
|
23
|
+
};
|
|
24
|
+
export interface GhanttTimelineSlot {
|
|
25
|
+
/** Inicio del intervalo del slot (ms). */
|
|
26
|
+
startMs: number;
|
|
27
|
+
/** Etiqueta breve para cabecera. */
|
|
28
|
+
label: string;
|
|
29
|
+
}
|
|
30
|
+
/** Piso superior de la cabecera Gantt (p. ej. meses o años), alineado en ancho con los slots inferiores. */
|
|
31
|
+
export interface GhanttUpperSegment {
|
|
32
|
+
/** Texto visible (mes y año, año, etc.). */
|
|
33
|
+
label: string;
|
|
34
|
+
/** Cuántos slots del piso inferior ocupa (misma suma que `slots.length`). */
|
|
35
|
+
slotSpan: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Agrupa slots consecutivos para el primer piso de la cabecera (alineado con el segundo piso).
|
|
39
|
+
* - `day` / `week`: agrupa por mes–año del inicio de cada slot.
|
|
40
|
+
* - `month`: agrupa por año.
|
|
41
|
+
* - `year`: sin piso superior (solo años en el piso inferior).
|
|
42
|
+
*/
|
|
43
|
+
export declare function ghanttBuildUpperFloorSegments(slots: readonly GhanttTimelineSlot[], scale: GhanttTimelineScale): GhanttUpperSegment[];
|
|
44
|
+
/**
|
|
45
|
+
* Genera slots alineados a `scale` entre `viewStart` y `viewEnd` para rejilla y cabecera.
|
|
46
|
+
* Con `scale: 'day'`, por defecto amplía a meses completos (ver `ghanttResolveExpandedDayRange`).
|
|
47
|
+
*/
|
|
48
|
+
export declare function ghanttBuildTimelineSlots(viewStart: Date | string, viewEnd: Date | string, scale?: GhanttTimelineScale, options?: GhanttExpandedDayRangeOptions): GhanttTimelineSlot[];
|
|
49
|
+
/**
|
|
50
|
+
* Posición horizontal de un intervalo [start,end] dentro del viewport [viewStart,viewEnd] en %.
|
|
51
|
+
* Devuelve `null` si no hay solape.
|
|
52
|
+
*/
|
|
53
|
+
export declare function ghanttBarLayoutPercent(viewStartMs: number, viewEndMs: number, barStartMs: number, barEndMs: number): {
|
|
54
|
+
leftPct: number;
|
|
55
|
+
widthPct: number;
|
|
56
|
+
} | null;
|
|
57
|
+
/**
|
|
58
|
+
* Intervalo temporal que cubren los slots generados (para posicionar barras alineadas a la rejilla).
|
|
59
|
+
* `endExclusiveMs` es exclusivo.
|
|
60
|
+
*/
|
|
61
|
+
export declare function ghanttSlotsTimeExtent(slots: readonly GhanttTimelineSlot[], scale: GhanttTimelineScale): {
|
|
62
|
+
startMs: number;
|
|
63
|
+
endExclusiveMs: number;
|
|
64
|
+
} | null;
|
|
65
|
+
//# sourceMappingURL=ganttTimeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ganttTimeline.d.ts","sourceRoot":"","sources":["../../../src/shared/ghantt/ganttTimeline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,qDAAqD;AACrD,wBAAgB,eAAe,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAgBxD;AAED,sDAAsD;AACtD,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAIxD;AAED,4BAA4B;AAC5B,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAK1D;AAED,wDAAwD;AACxD,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAIzD;AAED,6EAA6E;AAC7E,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAIzE;AAED,MAAM,WAAW,6BAA6B;IAC5C,0FAA0F;IAC1F,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,IAAI,GAAG,MAAM,EACxB,OAAO,EAAE,IAAI,GAAG,MAAM,EACtB,OAAO,CAAC,EAAE,6BAA6B,GACtC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,CAa7C;AAED,MAAM,WAAW,kBAAkB;IACjC,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,4GAA4G;AAC5G,MAAM,WAAW,kBAAkB;IACjC,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,SAAS,kBAAkB,EAAE,EACpC,KAAK,EAAE,mBAAmB,GACzB,kBAAkB,EAAE,CAuDtB;AAKD;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,IAAI,GAAG,MAAM,EACxB,OAAO,EAAE,IAAI,GAAG,MAAM,EACtB,KAAK,GAAE,mBAA2B,EAClC,OAAO,CAAC,EAAE,6BAA6B,GACtC,kBAAkB,EAAE,CA+FtB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,GACf;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAU9C;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,SAAS,kBAAkB,EAAE,EACpC,KAAK,EAAE,mBAAmB,GACzB;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAqBpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ganttTimeline.test.d.ts","sourceRoot":"","sources":["../../../src/shared/ghantt/ganttTimeline.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MutableRefObject, UIEventHandler, WheelEventHandler } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Scroll horizontal compartido: el **viewport** es el de la cabecera; el cuerpo registra nodos
|
|
4
|
+
* que reciben `transform` **en el mismo tick** que el `scroll` (sin esperar a React), para evitar
|
|
5
|
+
* desfase visual entre cabecera y filas.
|
|
6
|
+
*/
|
|
7
|
+
export interface GhanttHorizontalScroll {
|
|
8
|
+
headerViewportRef: MutableRefObject<HTMLDivElement | null>;
|
|
9
|
+
/** Aplica posición con clamp según `scrollWidth` del viewport de cabecera y sincroniza el cuerpo. */
|
|
10
|
+
setScrollLeft: (x: number) => void;
|
|
11
|
+
/** Conectar al `onScroll` del contenedor `overflow-x-auto` de la cabecera. */
|
|
12
|
+
onHeaderViewportScroll: UIEventHandler<HTMLDivElement>;
|
|
13
|
+
/**
|
|
14
|
+
* Rueda horizontal / Shift+rueda vertical sobre la pista Gantt (cuerpo y cabecera).
|
|
15
|
+
* Con `timeline.modifierWheelZoom`, **Cmd/Ctrl + rueda** prioriza el cambio de escala (se hace `preventDefault`).
|
|
16
|
+
*/
|
|
17
|
+
onBodyWheel: WheelEventHandler<HTMLDivElement>;
|
|
18
|
+
/** Nodo cuya `transform` debe seguir al scroll (pista temporal de cada fila). */
|
|
19
|
+
registerBodyTimeline: (el: HTMLElement | null) => () => void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=ghanttHorizontalScroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ghanttHorizontalScroll.d.ts","sourceRoot":"","sources":["../../../src/shared/ghantt/ghanttHorizontalScroll.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEjF;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,iBAAiB,EAAE,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC3D,qGAAqG;IACrG,aAAa,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,8EAA8E;IAC9E,sBAAsB,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;IACvD;;;OAGG;IACH,WAAW,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAC/C,iFAAiF;IACjF,oBAAoB,EAAE,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,KAAK,MAAM,IAAI,CAAC;CAC9D"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Altura total (px) del bloque de **dos filas** de la cabecera temporal del Gantt (alineado con cabecera
|
|
3
|
+
* de tabla en Figma, ~49px). Cada fila ocupa la mitad (`1fr` / `1fr`).
|
|
4
|
+
*/
|
|
5
|
+
export declare const GHANTT_TIMELINE_HEADER_STACK_HEIGHT_PX = 49;
|
|
6
|
+
//# sourceMappingURL=ghanttLayoutConstants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ghanttLayoutConstants.d.ts","sourceRoot":"","sources":["../../../src/shared/ghantt/ghanttLayoutConstants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,sCAAsC,KAAK,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { GhanttTimelineProps, GhanttTimelineScale } from './types';
|
|
2
|
+
/** Inicio del rango global al hacer zoom con modificador (Cmd/Ctrl + rueda). */
|
|
3
|
+
export declare const GHANTT_MODIFIER_ZOOM_GLOBAL_START = "2015-01-01";
|
|
4
|
+
/**
|
|
5
|
+
* Mitad de la ventana en escala `hour` (zoom por modificador / línea local): total ≈ 2× ms.
|
|
6
|
+
* Antes 24 h por lado (48 h); se sube a **100 h** por lado (**200 h** mínimo en cinta) para scroll + virtualización.
|
|
7
|
+
*/
|
|
8
|
+
export declare const GHANTT_MODIFIER_ZOOM_HOUR_HALF_MS: number;
|
|
9
|
+
/** Fin exclusivo del rango global: hasta el fin de 2030. */
|
|
10
|
+
export declare function ghanttModifierZoomGlobalEndExclusive(): string;
|
|
11
|
+
/**
|
|
12
|
+
* Orden de escala con zoom por modificador: de más detalle (índice 0) a más agregada (índice 3).
|
|
13
|
+
* No incluye `year` (solo años en la rejilla): el tope es `month` (mes + año en cada etiqueta).
|
|
14
|
+
*/
|
|
15
|
+
export declare const GHANTT_MODIFIER_ZOOM_ORDER: readonly GhanttTimelineScale[];
|
|
16
|
+
/** Zoom mínimo de ventana (ms) — solo aplica a ventanas locales (p. ej. hora). */
|
|
17
|
+
export declare const GHANTT_MODIFIER_ZOOM_MIN_SPAN_MS = 3600000;
|
|
18
|
+
/** Anchos por slot recomendados (px). */
|
|
19
|
+
export declare function ghanttDefaultColumnWidthForScale(scale: GhanttTimelineScale): number;
|
|
20
|
+
export declare function ghanttModifierZoomScaleIndex(scale: GhanttTimelineScale): number;
|
|
21
|
+
/**
|
|
22
|
+
* Escala según la **duración** visible (ms), con histéresis ligera (p. ej. API sin zoom por modificador).
|
|
23
|
+
*/
|
|
24
|
+
export declare function ghanttInferScaleForSpan(spanMs: number, prev?: GhanttTimelineScale): GhanttTimelineScale;
|
|
25
|
+
/**
|
|
26
|
+
* Construye `viewStart` / `viewEnd` centrados en `centerMs` y acotados al rango global (API genérica).
|
|
27
|
+
* Para la línea completa con zoom por modificador usar {@link ghanttModifierZoomFullTimelineBounds}.
|
|
28
|
+
*/
|
|
29
|
+
export declare function ghanttModifierZoomWindowForScale(scale: GhanttTimelineScale, centerMs: number, globalStartMs: number, globalEndExclusiveMs: number): {
|
|
30
|
+
viewStart: string;
|
|
31
|
+
viewEnd: string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Ventana de timeline con **zoom por modificador**: casi siempre el rango global completo (2015 → fin
|
|
35
|
+
* del año en curso) para que todos los años/períodos sigan presentes en la cinta; solo la **escala**
|
|
36
|
+
* (rejilla) cambia. En **hora** se usa una ventana local centrada en `anchorMs` (no cabe la línea
|
|
37
|
+
* entera a nivel hora en DOM). La ventana horaria total ≈ `2 * GHANTT_MODIFIER_ZOOM_HOUR_HALF_MS` (≥200 h).
|
|
38
|
+
*/
|
|
39
|
+
export declare function ghanttModifierZoomFullTimelineBounds(scale: GhanttTimelineScale, anchorMs: number, prev?: GhanttTimelineProps): {
|
|
40
|
+
viewStart: string;
|
|
41
|
+
viewEnd: string;
|
|
42
|
+
};
|
|
43
|
+
/** Normaliza la línea de tiempo inicial cuando está activo `modifierWheelZoom`. */
|
|
44
|
+
export declare function ghanttModifierZoomNormalizeInitial(t: GhanttTimelineProps): GhanttTimelineProps;
|
|
45
|
+
export interface GhanttModifierZoomWheelInput {
|
|
46
|
+
/** Índice 0..3 en {@link GHANTT_MODIFIER_ZOOM_ORDER} (lo acumula `Ghantt` con la rueda). */
|
|
47
|
+
targetScaleIndex: number;
|
|
48
|
+
ctrlKey: boolean;
|
|
49
|
+
metaKey: boolean;
|
|
50
|
+
altKey: boolean;
|
|
51
|
+
/** Fracción 0..1 sobre el contenido scrollable (instante bajo el puntero). */
|
|
52
|
+
anchorFraction: number;
|
|
53
|
+
}
|
|
54
|
+
/** Límites de ancho de columna (px) para “zoom” dentro de la misma escala antes de cambiar de vista. */
|
|
55
|
+
export declare function ghanttModifierZoomColumnBounds(scale: GhanttTimelineScale): {
|
|
56
|
+
min: number;
|
|
57
|
+
max: number;
|
|
58
|
+
defaultWidth: number;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Calcula el columnWidthPx inicial de nextScale que preserva la misma densidad px/ms
|
|
62
|
+
* que tenia currentWidthPx en currentScale. Forzado dentro de [min,max] de la escala destino.
|
|
63
|
+
*/
|
|
64
|
+
export declare function ghanttContinuousColumnWidth(currentScale: GhanttTimelineScale, currentWidthPx: number, nextScale: GhanttTimelineScale): number;
|
|
65
|
+
export interface GhanttModifierZoomWheelDeltaInput {
|
|
66
|
+
/** Acumulado del batch (`>0` ≈ scroll “abajo” = zoom out / menos detalle). */
|
|
67
|
+
deltaY: number;
|
|
68
|
+
ctrlKey: boolean;
|
|
69
|
+
metaKey: boolean;
|
|
70
|
+
altKey: boolean;
|
|
71
|
+
/** Fracción 0..1 del instante bajo el puntero (scroll tras zoom sigue usándola en `Ghantt`). */
|
|
72
|
+
anchorFraction: number;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Zoom con modificador vía rueda: primero **estrecha o ensancha columnas** en la escala actual;
|
|
76
|
+
* solo al llegar al límite pasa al **siguiente nivel** de escala (p. ej. día → hora al acercar).
|
|
77
|
+
*/
|
|
78
|
+
export declare function ghanttModifierZoomWheelDelta(prev: GhanttTimelineProps, input: GhanttModifierZoomWheelDeltaInput): GhanttTimelineProps | null;
|
|
79
|
+
/**
|
|
80
|
+
* Zoom por modificador: solo cambia la **escala** y mantiene la **cinta completa** (2015 → año actual)
|
|
81
|
+
* salvo en vista **hora** (ventana local). El desplazamiento horizontal sigue el “enfoque” bajo el cursor.
|
|
82
|
+
*/
|
|
83
|
+
export declare function ghanttModifierZoomOnWheel(prev: GhanttTimelineProps, input: GhanttModifierZoomWheelInput): GhanttTimelineProps | null;
|
|
84
|
+
export interface GhanttModifierZoomApplyStepOptions {
|
|
85
|
+
direction: 'in' | 'out';
|
|
86
|
+
anchorFraction?: number;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Un paso **discreto** de escala (API opcional / pruebas).
|
|
90
|
+
*/
|
|
91
|
+
export declare function ghanttModifierZoomApplyStep(prev: GhanttTimelineProps, options: GhanttModifierZoomApplyStepOptions): GhanttTimelineProps | null;
|
|
92
|
+
//# sourceMappingURL=ghanttModifierWheelZoom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ghanttModifierWheelZoom.d.ts","sourceRoot":"","sources":["../../../src/shared/ghantt/ghanttModifierWheelZoom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAOxE,gFAAgF;AAChF,eAAO,MAAM,iCAAiC,eAAe,CAAC;AAK9D;;;GAGG;AACH,eAAO,MAAM,iCAAiC,QAAg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K,EAAE,mBAAmB,GAAG;IAC1E,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;CACtB,CAkBA;AAcD;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,YAAY,EAAE,mBAAmB,EACjC,cAAc,EAAE,MAAM,EACtB,SAAS,EAAE,mBAAmB,GAC7B,MAAM,CAMR;AAaD,MAAM,WAAW,iCAAiC;IAChD,8EAA8E;IAC9E,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,gGAAgG;IAChG,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,mBAAmB,EACzB,KAAK,EAAE,iCAAiC,GACvC,mBAAmB,GAAG,IAAI,CAqD5B;AAMD;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,mBAAmB,EACzB,KAAK,EAAE,4BAA4B,GAClC,mBAAmB,GAAG,IAAI,CAmC5B;AAED,MAAM,WAAW,kCAAkC;IACjD,SAAS,EAAE,IAAI,GAAG,KAAK,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,mBAAmB,EACzB,OAAO,EAAE,kCAAkC,GAC1C,mBAAmB,GAAG,IAAI,CAwC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ghanttModifierWheelZoom.test.d.ts","sourceRoot":"","sources":["../../../src/shared/ghantt/ghanttModifierWheelZoom.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GhanttTimelineScale } from './types';
|
|
2
|
+
import { GhanttTimelineSlot } from './ganttTimeline';
|
|
3
|
+
/**
|
|
4
|
+
* Posición horizontal en px sobre el contenido scrollable (origen = inicio del primer slot),
|
|
5
|
+
* alineada a la misma rejilla que `GhanttSlotStrip` / cabecera.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ghanttContentPixelToAnchorMs(slots: readonly GhanttTimelineSlot[], scale: GhanttTimelineScale, slotWidthPx: number, contentPixel: number): number | null;
|
|
8
|
+
export declare function ghanttAnchorMsToContentPixel(slots: readonly GhanttTimelineSlot[], scale: GhanttTimelineScale, slotWidthPx: number, anchorMs: number): number | null;
|
|
9
|
+
//# sourceMappingURL=ghanttZoomAnchor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ghanttZoomAnchor.d.ts","sourceRoot":"","sources":["../../../src/shared/ghantt/ghanttZoomAnchor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAyB,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAyCjF;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,SAAS,kBAAkB,EAAE,EACpC,KAAK,EAAE,mBAAmB,EAC1B,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,MAAM,GAAG,IAAI,CAmBf;AAED,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,SAAS,kBAAkB,EAAE,EACpC,KAAK,EAAE,mBAAmB,EAC1B,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,GACf,MAAM,GAAG,IAAI,CAgBf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ghanttZoomAnchor.test.d.ts","sourceRoot":"","sources":["../../../src/shared/ghantt/ghanttZoomAnchor.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { GHANTT_TIMELINE_HEADER_STACK_HEIGHT_PX } from './ghanttLayoutConstants';
|
|
2
|
+
export { GhanttConfigProvider, useGhanttConfig, type GhanttConfigContextValue, type GhanttDayAxis, } from './GhanttConfigContext';
|
|
3
|
+
export { createGhanttScrollVirtualStore, GhanttScrollVirtualRoot, GHANTT_SCROLL_VIRTUAL_CTX_IDLE, useGhanttScrollVirtual, type GhanttScrollVirtualContextValue, type GhanttScrollVirtualSlotRange, type GhanttScrollVirtualStore, } from './GhanttScrollVirtualContext';
|
|
4
|
+
export type { GhanttHorizontalScroll } from './ghanttHorizontalScroll';
|
|
5
|
+
export { ghanttAddCalendarMonths, ghanttBuildTimelineSlots, ghanttBuildUpperFloorSegments, ghanttBarLayoutPercent, ghanttParseTime, ghanttResolveExpandedDayRange, ghanttSlotsTimeExtent, ghanttStartOfLocalDay, ghanttStartOfLocalHour, ghanttStartOfLocalMonth, type GhanttExpandedDayRangeOptions, type GhanttTimelineSlot, type GhanttUpperSegment, } from './ganttTimeline';
|
|
6
|
+
export { GHANTT_MODIFIER_ZOOM_GLOBAL_START, GHANTT_MODIFIER_ZOOM_HOUR_HALF_MS, GHANTT_MODIFIER_ZOOM_MIN_SPAN_MS, GHANTT_MODIFIER_ZOOM_ORDER, ghanttDefaultColumnWidthForScale, ghanttInferScaleForSpan, ghanttModifierZoomApplyStep, ghanttModifierZoomFullTimelineBounds, ghanttModifierZoomGlobalEndExclusive, ghanttModifierZoomColumnBounds, ghanttModifierZoomNormalizeInitial, ghanttModifierZoomOnWheel, ghanttModifierZoomScaleIndex, ghanttModifierZoomWheelDelta, ghanttModifierZoomWindowForScale, } from './ghanttModifierWheelZoom';
|
|
7
|
+
export type { GhanttModifierZoomWheelDeltaInput } from './ghanttModifierWheelZoom';
|
|
8
|
+
export type { GhanttColumnDef, GhanttColumnPresentationProps, GhanttDataProps, GhanttTimelineProps, GhanttTimelineScale, GhanttAppearanceProps, GhanttEventsProps, } from './types';
|
|
9
|
+
export { GhanttSlotStrip, GHANTT_DENSE_HEADER_MAX_LABELS, GHANTT_DENSE_SLOT_GRID_MIN_SLOTS, GHANTT_HOUR_VIRTUAL_MIN_SLOTS, GHANTT_SCROLL_VIRTUAL_MIN_SLOTS, ghanttDenseHeaderLabelIndices, ghanttDenseHeaderLabelIndicesByUpperSpans, ghanttHourVirtualIndexRange, ghanttScrollVirtualIndexRange, ghanttSnapSlotWidthPx, ghanttVerticalSlotGridBackgroundStyle, } from './GhanttSlotStrip';
|
|
10
|
+
export { ghanttAnchorMsToContentPixel, ghanttContentPixelToAnchorMs } from './ghanttZoomAnchor';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/ghantt/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sCAAsC,EAAE,MAAM,yBAAyB,CAAC;AACjF,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,KAAK,wBAAwB,EAC7B,KAAK,aAAa,GACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,8BAA8B,EAC9B,uBAAuB,EACvB,8BAA8B,EAC9B,sBAAsB,EACtB,KAAK,+BAA+B,EACpC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,GAC9B,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,6BAA6B,EAC7B,sBAAsB,EACtB,eAAe,EACf,6BAA6B,EAC7B,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,KAAK,6BAA6B,EAClC,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,iCAAiC,EACjC,iCAAiC,EACjC,gCAAgC,EAChC,0BAA0B,EAC1B,gCAAgC,EAChC,uBAAuB,EACvB,2BAA2B,EAC3B,oCAAoC,EACpC,oCAAoC,EACpC,8BAA8B,EAC9B,kCAAkC,EAClC,yBAAyB,EACzB,4BAA4B,EAC5B,4BAA4B,EAC5B,gCAAgC,GACjC,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,iCAAiC,EAAE,MAAM,2BAA2B,CAAC;AACnF,YAAY,EACV,eAAe,EACf,6BAA6B,EAC7B,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,eAAe,EACf,8BAA8B,EAC9B,gCAAgC,EAChC,6BAA6B,EAC7B,+BAA+B,EAC/B,6BAA6B,EAC7B,yCAAyC,EACzC,2BAA2B,EAC3B,6BAA6B,EAC7B,qBAAqB,EACrB,qCAAqC,GACtC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,4BAA4B,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { RowConfig, GhanttBarSegment, GhanttRowValue } from '../types/table';
|
|
3
|
+
export type { GhanttBarSegment, GhanttRowValue } from '../types/table';
|
|
4
|
+
/** Escala de la rejilla temporal (de más detalle a más agregada). */
|
|
5
|
+
export type GhanttTimelineScale = 'hour' | 'day' | 'week' | 'month' | 'year';
|
|
6
|
+
/**
|
|
7
|
+
* Rango temporal visible y rejilla de la columna Gantt.
|
|
8
|
+
*/
|
|
9
|
+
export interface GhanttTimelineProps {
|
|
10
|
+
viewStart: Date | string;
|
|
11
|
+
viewEnd: Date | string;
|
|
12
|
+
scale?: GhanttTimelineScale;
|
|
13
|
+
/**
|
|
14
|
+
* Solo con `scale: 'day'` (o por defecto). Si es `true` (por defecto), la rejilla abarca el **mes
|
|
15
|
+
* calendario completo anterior** al de `viewStart` y hasta el **fin del mes** que contiene `viewEnd`,
|
|
16
|
+
* de modo que p. ej. al centrar abril sigan existiendo todas las columnas de marzo a la izquierda
|
|
17
|
+
* y se vean con **scroll horizontal solo dentro de la columna** Gantt (cabecera + filas sincronizadas).
|
|
18
|
+
*/
|
|
19
|
+
includeLeadingFullMonth?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Ancho mínimo en px **por slot** (día/semana/mes según `scale`). El contenido temporal puede ser
|
|
22
|
+
* más ancho que la columna: el **scroll** es interno a la columna. Si se omite, en vista **`day`**
|
|
23
|
+
* se usa **44**; en `week`/`month`/`hour`/`year` se aplican anchos por defecto del paquete o reparto flex.
|
|
24
|
+
*/
|
|
25
|
+
columnWidthPx?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Si es `true`, **Cmd** (macOS) o **Ctrl** + rueda hace **zoom dentro de la escala** (ancho de columna)
|
|
28
|
+
* y solo al llegar al límite cambia la **vista** (hora → día → semana → mes; sin vista solo-año), sin recortar la
|
|
29
|
+
* línea de tiempo global **2015-01-01** → **1 enero del año siguiente**; el puntero ancla el **scroll**.
|
|
30
|
+
* En **hora** la cinta sigue siendo ventana local. Opcional {@link GhanttEventsProps.onTimelineChange}.
|
|
31
|
+
*/
|
|
32
|
+
modifierWheelZoom?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Ancho máximo en px de la **columna** Gantt si no defines `gantt.column.maxWidth`.
|
|
35
|
+
* @default 560
|
|
36
|
+
*/
|
|
37
|
+
columnMaxWidthPx?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Inicio del rango global para zoom con modificador (sobrescribe 2015-01-01).
|
|
40
|
+
*/
|
|
41
|
+
modifierZoomGlobalStart?: Date | string;
|
|
42
|
+
/**
|
|
43
|
+
* Fin del rango global para zoom con modificador (sobrescribe el fin del año próximo).
|
|
44
|
+
*/
|
|
45
|
+
modifierZoomGlobalEnd?: Date | string;
|
|
46
|
+
}
|
|
47
|
+
export interface GhanttAppearanceProps {
|
|
48
|
+
/** @default 44 */
|
|
49
|
+
trackMinHeightPx?: number;
|
|
50
|
+
trackClassName?: string;
|
|
51
|
+
}
|
|
52
|
+
export interface GhanttEventsProps<T = unknown> {
|
|
53
|
+
onBarClick?: (payload: {
|
|
54
|
+
row: RowConfig<T>;
|
|
55
|
+
bar: GhanttBarSegment;
|
|
56
|
+
}) => void;
|
|
57
|
+
/** Notifica cambios de ventana/escala al usar zoom con modificador (p. ej. para persistir estado). */
|
|
58
|
+
onTimelineChange?: (timeline: GhanttTimelineProps) => void;
|
|
59
|
+
}
|
|
60
|
+
export interface GhanttColumnPresentationProps {
|
|
61
|
+
id?: string;
|
|
62
|
+
header: ReactNode;
|
|
63
|
+
width?: number | string;
|
|
64
|
+
minWidth?: number;
|
|
65
|
+
maxWidth?: number | 'auto';
|
|
66
|
+
lockable?: boolean;
|
|
67
|
+
locked?: boolean;
|
|
68
|
+
placement?: 'start' | 'end';
|
|
69
|
+
/**
|
|
70
|
+
* Clases extra en `<th>` (se combinan con el borde izquierdo que separa esta columna de la anterior).
|
|
71
|
+
*/
|
|
72
|
+
headerClassName?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Clases extra en `<td>` del cuerpo (se combinan con el mismo borde izquierdo que en cabecera).
|
|
75
|
+
*/
|
|
76
|
+
cellClassName?: string;
|
|
77
|
+
}
|
|
78
|
+
export interface GhanttDataProps<T = unknown> {
|
|
79
|
+
/**
|
|
80
|
+
* Campo de la fila (`keyof T`) o función. Con filas genéricas, la función es la forma más explícita.
|
|
81
|
+
*/
|
|
82
|
+
accessor: keyof T | string | ((row: T) => GhanttRowValue | undefined);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Configuración agrupada del organismo `Ghantt` (presentación, datos, tiempo, aspecto, eventos).
|
|
86
|
+
*/
|
|
87
|
+
export interface GhanttColumnDef<T = unknown> {
|
|
88
|
+
column: GhanttColumnPresentationProps;
|
|
89
|
+
data: GhanttDataProps<T>;
|
|
90
|
+
timeline: GhanttTimelineProps;
|
|
91
|
+
appearance?: GhanttAppearanceProps;
|
|
92
|
+
events?: GhanttEventsProps<T>;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|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