caplink-saas-ui-shared-component-library 0.4.5 → 0.4.6
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/components/dag/ui/dag-container.d.ts +2 -0
- package/dist/components/dag/ui/dag-sidebar/dag-sidebar-header.d.ts +5 -0
- package/dist/components/dag/ui/dag-sidebar/dag-sidebar.d.ts +8 -0
- package/dist/components/dag/ui/dag-sidebar/index.d.ts +5 -0
- package/dist/components/dag/ui/dag.d.ts +7 -0
- package/dist/components/dag/ui/defaults/default-edge.d.ts +3 -0
- package/dist/components/dag/ui/defaults/default-node.d.ts +7 -0
- package/dist/components/dag/ui/defaults/index.d.ts +5 -0
- package/dist/components/dag/ui/index.d.ts +5 -0
- package/dist/components/dag/ui/search-node/index.d.ts +4 -0
- package/dist/components/dag/ui/search-node/search-node.d.ts +6 -0
- package/dist/components/spreadsheet/model/matrix.d.ts +4 -4
- package/dist/components/spreadsheet/model/spreadsheet.d.ts +3 -2
- package/dist/index.d.ts +12 -1
- package/dist/index.es.js +10781 -4346
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +102 -60
- package/dist/index.umd.js.map +1 -1
- package/dist/shared/lib/use-select-on-focus.d.ts +1 -1
- package/dist/shared/ui/button.d.ts +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
|
|
3
|
+
export type DagSidebarProps = PropsWithChildren<{
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onOpen: () => void;
|
|
6
|
+
closedTitle?: string;
|
|
7
|
+
}>;
|
|
8
|
+
export declare function DagSidebar(props: DagSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactFlowProps } from '@xyflow/react';
|
|
2
|
+
|
|
3
|
+
export type DagProps = {
|
|
4
|
+
initialNodes?: ReactFlowProps['nodes'];
|
|
5
|
+
initialEdges?: ReactFlowProps['edges'];
|
|
6
|
+
};
|
|
7
|
+
export declare function Dag(props: DagProps & Omit<ReactFlowProps, 'nodes' | 'edges'>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NodeProps, Node } from '@xyflow/react';
|
|
2
|
+
|
|
3
|
+
export type NodeDataProps = {
|
|
4
|
+
content: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
} & Record<string, unknown>;
|
|
7
|
+
export declare function DefaultNode({ id, data }: NodeProps<Node<NodeDataProps>>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -34,16 +34,16 @@ export declare function getPoint<T>(params: {
|
|
|
34
34
|
/** Checks if the source and target point are equal */
|
|
35
35
|
export declare function isSamePoint(source: Point, target: Point): boolean;
|
|
36
36
|
/** Returns whether given point exists in given range */
|
|
37
|
-
export declare function hasPointInRange(
|
|
37
|
+
export declare function hasPointInRange(pointsRange: PointRange[], point: Point): boolean;
|
|
38
38
|
/** Determines whether all columns are selected */
|
|
39
39
|
export declare function hasEntireColumns(params: {
|
|
40
40
|
matrix: Matrix<unknown>;
|
|
41
|
-
|
|
42
|
-
}):
|
|
41
|
+
pointsRange: PointRange[];
|
|
42
|
+
}): true | undefined;
|
|
43
43
|
/** Determines which row is entirely selected in given selection */
|
|
44
44
|
export declare function hasEntireRows(params: {
|
|
45
45
|
matrix: Matrix<unknown>;
|
|
46
|
-
|
|
46
|
+
pointsRange: PointRange[];
|
|
47
47
|
row: number;
|
|
48
48
|
}): boolean;
|
|
49
49
|
/** Converts string value into an matrix */
|
|
@@ -60,6 +60,7 @@ export type DataEditor = {
|
|
|
60
60
|
export type DataViewer = {
|
|
61
61
|
width: number;
|
|
62
62
|
mode: Mode;
|
|
63
|
+
setMode?: (mode: Mode) => void;
|
|
63
64
|
/** Data viewer current value */
|
|
64
65
|
value?: unknown;
|
|
65
66
|
column: Column;
|
|
@@ -140,8 +141,8 @@ export type Context = {
|
|
|
140
141
|
hasSomeEntireRow?: boolean;
|
|
141
142
|
/** Whether last row is highlighted */
|
|
142
143
|
highlightLastRow?: boolean;
|
|
143
|
-
|
|
144
|
-
|
|
144
|
+
pointsRange: Matrix.PointRange[];
|
|
145
|
+
setPointsRange: (pointRange: Matrix.PointRange[]) => void;
|
|
145
146
|
containerDimensions: Dimensions;
|
|
146
147
|
setContainerDimensions: (dimensions: Dimensions) => void;
|
|
147
148
|
onPaste: (point: Matrix.Point, event: ClipboardEvent) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,11 +2,22 @@ import { Spreadsheet } from './components/spreadsheet/ui';
|
|
|
2
2
|
import { FileUploader, FileUploaderProps } from './components/file-uploader/ui';
|
|
3
3
|
import { ImageUploader, ImageUploaderProps } from './components/image-uploader/ui';
|
|
4
4
|
import { MatrixTypes, SpreadsheetTypes } from './types';
|
|
5
|
+
import { Dag, DagContainer, DagProps } from './components/dag/ui';
|
|
6
|
+
import { DagSidebar, DagSidebarHeader, DagSidebarHeaderProps, DagSidebarProps } from './components/dag/ui/dag-sidebar';
|
|
7
|
+
import { DefaultEdge, DefaultNode, NodeDataProps } from './components/dag/ui/defaults';
|
|
8
|
+
import { SearchNode, SearchNodeProps } from './components/dag/ui/search-node';
|
|
5
9
|
|
|
6
10
|
export declare const CapLink: {
|
|
7
11
|
Spreadsheet: typeof Spreadsheet;
|
|
8
12
|
FileUploader: typeof FileUploader;
|
|
9
13
|
WithPortalProvider: ({ children }: import('./components/spreadsheet/lib/with-portal-provider').IWithPortalProvider) => import("react/jsx-runtime").JSX.Element;
|
|
10
14
|
ImageUploader: typeof ImageUploader;
|
|
15
|
+
Dag: typeof Dag;
|
|
16
|
+
DagContainer: typeof DagContainer;
|
|
17
|
+
DagSidebar: typeof DagSidebar;
|
|
18
|
+
DagSidebarHeader: typeof DagSidebarHeader;
|
|
19
|
+
DefaultNode: typeof DefaultNode;
|
|
20
|
+
DefaultEdge: typeof DefaultEdge;
|
|
21
|
+
SearchNode: typeof SearchNode;
|
|
11
22
|
};
|
|
12
|
-
export type { FileUploaderProps, ImageUploaderProps, MatrixTypes, SpreadsheetTypes };
|
|
23
|
+
export type { FileUploaderProps, ImageUploaderProps, MatrixTypes, SpreadsheetTypes, DagProps, DagSidebarHeaderProps, DagSidebarProps, NodeDataProps, SearchNodeProps };
|