@majoo-ui/react 1.60.16-rc.2 → 1.60.16-rc.4
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/components/index.d.ts +1 -0
- package/components/scrollSync/ScrollSync.d.ts +45 -0
- package/components/scrollSync/ScrollSyncNode.d.ts +32 -0
- package/components/scrollSync/index.d.ts +2 -0
- package/components/scrollSync/utils.d.ts +3 -0
- package/components/table/Table.d.ts +5 -1
- package/index.esm.js +553 -292
- package/index.umd.js +605 -331
- package/package.json +1 -1
package/components/index.d.ts
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { ScrollConfig } from './ScrollSyncNode';
|
|
3
|
+
export interface ScrollSyncProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
/**syncing enable control */
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/** In case we want scroll to be proportionally applied regardless of the width and/or height*/
|
|
8
|
+
proportional?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* node should be scrollable
|
|
12
|
+
*/
|
|
13
|
+
declare type Node = (EventTarget & HTMLElement) | null;
|
|
14
|
+
/**
|
|
15
|
+
* node should be scrollable
|
|
16
|
+
*/
|
|
17
|
+
interface SyncableElement {
|
|
18
|
+
node: Node;
|
|
19
|
+
scroll: ScrollConfig;
|
|
20
|
+
}
|
|
21
|
+
interface ScrollingSyncerContextValues {
|
|
22
|
+
/**
|
|
23
|
+
* register node to be synced with other scrolled nodes
|
|
24
|
+
*/
|
|
25
|
+
registerNode: (node: SyncableElement, groups: string[]) => void;
|
|
26
|
+
/**
|
|
27
|
+
* unregister node to stop syncing with other scrolled nodes
|
|
28
|
+
*/
|
|
29
|
+
unregisterNode: (node: SyncableElement, group: string[]) => void;
|
|
30
|
+
/**
|
|
31
|
+
* scroll handler for each node.onScroll
|
|
32
|
+
*/
|
|
33
|
+
onScroll: (e: React.UIEvent<HTMLElement>, groups: string[]) => void;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* ScrollingSyncerContext is the context to be handling scrolled nodes
|
|
37
|
+
*/
|
|
38
|
+
export declare const ScrollingSyncerContext: React.Context<ScrollingSyncerContextValues>;
|
|
39
|
+
/**
|
|
40
|
+
* ScrollSync component is a context based component,
|
|
41
|
+
* that wrappes children to be .Provided with context utils and eventsHandlers
|
|
42
|
+
* @param props ScrollSyncProps
|
|
43
|
+
*/
|
|
44
|
+
export declare const ScrollSync: FC<ScrollSyncProps>;
|
|
45
|
+
export default ScrollSync;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* ScrollSyncNode Component
|
|
4
|
+
*
|
|
5
|
+
* Wrap your content in it to keep its scroll position in sync with other panes
|
|
6
|
+
*/
|
|
7
|
+
export declare type ScrollConfig = 'all' | 'vertical-only' | 'horizontal-only';
|
|
8
|
+
export declare type LockAxis = 'X' | 'Y' | 'XY' | null;
|
|
9
|
+
interface ScrollSyncNodeProps {
|
|
10
|
+
/**
|
|
11
|
+
* Children
|
|
12
|
+
*/
|
|
13
|
+
children: React.ReactElement;
|
|
14
|
+
/**
|
|
15
|
+
* Groups to make the children attached to
|
|
16
|
+
*/
|
|
17
|
+
group?: string | string[];
|
|
18
|
+
/**
|
|
19
|
+
* If the scrolling is enabled or not
|
|
20
|
+
*/
|
|
21
|
+
scroll?: ScrollConfig;
|
|
22
|
+
/**
|
|
23
|
+
* Prevent scroll on current node if axis is locked
|
|
24
|
+
*/
|
|
25
|
+
selfLockAxis?: LockAxis;
|
|
26
|
+
/**
|
|
27
|
+
* Callback for scroll handling
|
|
28
|
+
*/
|
|
29
|
+
onScroll?: (e: React.UIEvent<HTMLElement>) => void;
|
|
30
|
+
}
|
|
31
|
+
export declare const ScrollSyncNode: React.ForwardRefExoticComponent<ScrollSyncNodeProps & React.RefAttributes<EventTarget & HTMLElement>>;
|
|
32
|
+
export default ScrollSyncNode;
|
|
@@ -1277,6 +1277,10 @@ export interface TableProps {
|
|
|
1277
1277
|
* Additional styles css.
|
|
1278
1278
|
*/
|
|
1279
1279
|
css?: CSS;
|
|
1280
|
+
/**
|
|
1281
|
+
* Additional outer container styles css.
|
|
1282
|
+
*/
|
|
1283
|
+
outerContainerCss?: CSS;
|
|
1280
1284
|
/**
|
|
1281
1285
|
* Table header css styling.
|
|
1282
1286
|
*/
|
|
@@ -1415,7 +1419,7 @@ export interface TableProps {
|
|
|
1415
1419
|
*/
|
|
1416
1420
|
additionalHeader?: React.ReactNode;
|
|
1417
1421
|
}
|
|
1418
|
-
export declare function Table({ columns, data: rawData, keyId, pageIndex: controlledPageIndex, totalPage, totalData, fetchData, hideDataInfo, rowsPerPageOptions, emptyDataMessage, customEmptyDataProps: emptyDataProps, isLoading, css, headerCss, hideHeader, onSelectedChange, isInfiniteScroll, hasMoreItems, rowLimit, cellAlign, selectedIds, rowGroup, decoration, hiddenColumns, columnOrder, customRowsStyle, isMobileLayout, showDuplicatedData, onRowClick, hidePagination, searchQuery, additionalExceptionIds, onExpand, id, onColumnChange, virtualized, withoutLimit, additionalHeader, }: TableProps): JSX.Element;
|
|
1422
|
+
export declare function Table({ columns, data: rawData, keyId, pageIndex: controlledPageIndex, totalPage, totalData, fetchData, hideDataInfo, rowsPerPageOptions, emptyDataMessage, customEmptyDataProps: emptyDataProps, isLoading, css, headerCss, hideHeader, onSelectedChange, isInfiniteScroll, hasMoreItems, rowLimit, cellAlign, selectedIds, rowGroup, decoration, hiddenColumns, columnOrder, customRowsStyle, isMobileLayout, showDuplicatedData, onRowClick, hidePagination, searchQuery, additionalExceptionIds, onExpand, id, onColumnChange, virtualized, withoutLimit, additionalHeader, outerContainerCss, }: TableProps): JSX.Element;
|
|
1419
1423
|
export interface TableColumnProps {
|
|
1420
1424
|
/**
|
|
1421
1425
|
* Required if accessor is a function<br/>
|