@devtable/dashboard 7.5.2 → 7.6.0

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.
@@ -0,0 +1,8 @@
1
+ import _ from 'lodash';
2
+ import { Edge } from 'reactflow';
3
+ import { DashboardModelInstance } from '~/model';
4
+ import { TFlowNode } from './types';
5
+ export declare function makeEdges(model: DashboardModelInstance, staticNodeMap: _.Dictionary<TFlowNode>): {
6
+ edges: Edge<any>[];
7
+ edgeNodes: never[];
8
+ };
@@ -0,0 +1,5 @@
1
+ import { DashboardModelInstance } from '~/model';
2
+ export declare function makeNodesAndEdges(model: DashboardModelInstance): {
3
+ nodes: import("./types").TFlowNode[];
4
+ edges: import("reactflow").Edge<any>[];
5
+ };
@@ -0,0 +1,21 @@
1
+ export declare function calc(index: number, unit: number, gap: number): number;
2
+ export declare function calcTotal(count: number, unit: number, gap: number): number;
3
+ export declare const FilterWidth = 200;
4
+ export declare const FilterHeight = 40;
5
+ export declare const FilterPaddingT = 40;
6
+ export declare const FilterPaddingB = 25;
7
+ export declare const FilterPaddingL = 25;
8
+ export declare const FilterPaddingR = 25;
9
+ export declare const FilterGap = 25;
10
+ export declare const ViewPaddingX = 25;
11
+ export declare const ViewPaddingT = 40;
12
+ export declare const ViewPaddingB = 25;
13
+ export declare const ViewPaddingY: number;
14
+ export declare const ViewWidth = 350;
15
+ export declare const ViewHeight = 150;
16
+ export declare const ViewGapX = 150;
17
+ export declare const ViewGapY = 150;
18
+ export declare const PanelWidth = 300;
19
+ export declare const PanelHeight = 40;
20
+ export declare const PanelGapX = 25;
21
+ export declare const PanelGapY = 25;
@@ -0,0 +1,3 @@
1
+ import { DashboardModelInstance } from '~/model';
2
+ import { TFlowNode } from './types';
3
+ export declare function makeNodes(model: DashboardModelInstance): TFlowNode[];
@@ -0,0 +1,12 @@
1
+ import { Edge } from 'reactflow';
2
+ import { TFlowNode } from './types';
3
+ interface ICommonProps {
4
+ nodeMap: Record<string, TFlowNode>;
5
+ nodes: TFlowNode[];
6
+ edges: Edge[];
7
+ }
8
+ export declare function reposition({ nodeMap, nodes, edges }: ICommonProps): {
9
+ nodes: TFlowNode[];
10
+ edges: Edge<any>[];
11
+ };
12
+ export {};
@@ -0,0 +1,12 @@
1
+ import { CSSProperties } from 'react';
2
+ import { Node } from 'reactflow';
3
+ export declare type TFlowNode_View = Node & {
4
+ _node_type: 'view-root';
5
+ _view_level: number;
6
+ _sub_view_ids: string[];
7
+ style: CSSProperties;
8
+ };
9
+ export declare type TFlowNode_Default = Node & {
10
+ _node_type: 'filter-root' | 'filter' | 'open-link-root' | 'panel';
11
+ };
12
+ export declare type TFlowNode = TFlowNode_View | TFlowNode_Default;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ interface IInteractionsViewerModal {
3
+ opened: boolean;
4
+ close: () => void;
5
+ }
6
+ export declare const InteractionsViewerModal: (({ opened, close }: IInteractionsViewerModal) => JSX.Element) & {
7
+ displayName: string;
8
+ };
9
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { Position } from 'reactflow';
3
+ export declare const InteractionNode: import("react").MemoExoticComponent<({ data, isConnectable, sourcePosition, targetPosition, ...rest }: {
4
+ data: any;
5
+ isConnectable: boolean;
6
+ sourcePosition?: Position | undefined;
7
+ targetPosition?: Position | undefined;
8
+ }) => JSX.Element>;
@@ -0,0 +1,4 @@
1
+ import { ReactNode } from 'react';
2
+ import { TInteraction, TInteractionLine } from './types';
3
+ export declare const IconMap: Record<string, ReactNode>;
4
+ export declare function getInteractionLines(interactions: TInteraction[]): TInteractionLine[];
@@ -0,0 +1,23 @@
1
+ import { ReactNode } from 'react';
2
+ export declare type TInteraction = {
3
+ schemaRef: 'builtin:op:open-link';
4
+ urlTemplate: string;
5
+ shortURLTemplate: string;
6
+ } | {
7
+ schemaRef: 'builtin:op:set_filter_values';
8
+ filters: {
9
+ key: string;
10
+ label: string;
11
+ }[];
12
+ } | {
13
+ schemaRef: 'builtin:op:clear_filter_values';
14
+ filters: {
15
+ key: string;
16
+ label: string;
17
+ }[];
18
+ };
19
+ export declare type TInteractionLine = {
20
+ key: string;
21
+ icon: ReactNode;
22
+ text: ReactNode;
23
+ };
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const InteractionsViewer: (() => JSX.Element) & {
3
+ displayName: string;
4
+ };
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .filter-settings-tabs{width:100%;height:100%}.filter-settings-tabs .mantine-Tabs-panel{height:calc(100% - 25px)}.filter-settings-tabs .mantine-Tabs-tabsListWrapper{flex:0}.filter-settings-tabs .mantine-Tabs-body{flex:1;overflow:scroll}.panel-root{height:100%;width:100%;max-width:100%;background:transparent;border-radius:4px;position:relative}.panel-settings-tabs{width:100%;height:100%}.panel-settings-tabs .mantine-Tabs-panel{height:calc(100% - 25px)}.panel-settings-tabs .mantine-Tabs-tabsListWrapper{flex:0}.panel-settings-tabs .mantine-Tabs-body{flex:1;overflow:scroll}.viz-root{width:100%;overflow:scroll;flex-grow:1;background-color:#fff}.panel-dropdown-target{text-align:center;transition:background-color .3s ease}.panel-dropdown-target:hover{cursor:pointer;background-color:#6464640d}.react-grid-item{padding:0}.remove-panel{position:absolute;right:2px;top:0;cursor:pointer}.code-textarea textarea{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.dashboard-root{overflow:scroll;overflow-x:hidden;padding:0 0 10px;height:100%}.dashboard-sticky-area{z-index:100;background:white;margin:0;padding:0 10px}.mantine-RichTextEditor-root{overflow-y:scroll!important;-ms-overflow-style:initial!important}*:not(.mantine-RichTextEditor-root):not([data-enable-scrollbar])::-webkit-scrollbar{width:0!important;height:0!important}*:not([data-enable-scrollbar]){overflow:-moz-scrollbars-none;-ms-overflow-style:none}.minimal-monaco-editor{border-radius:4px;overflow:hidden;background-color:#1e1e1e;padding-top:14px}
1
+ .react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1;cursor:-webkit-grab;cursor:grab}.react-flow__pane.selection{cursor:pointer}.react-flow__pane.dragging{cursor:-webkit-grabbing;cursor:grabbing}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow .react-flow__edges{pointer-events:none;overflow:visible}.react-flow__edge-path,.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.react-flow__edge{pointer-events:visibleStroke;cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;-webkit-animation:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge:focus .react-flow__edge-path,.react-flow__edge:focus-visible .react-flow__edge-path{stroke:#555}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-textbg{fill:#fff}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;-webkit-animation:dashdraw .5s linear infinite;animation:dashdraw .5s linear infinite}.react-flow__connectionline{z-index:1001}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:-webkit-grab;cursor:grab}.react-flow__node.dragging{cursor:-webkit-grabbing;cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:-webkit-grab;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background:#1a192b;border:1px solid white;border-radius:100%}.react-flow__handle.connectable{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:-4px;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{top:50%;left:-4px;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.center{left:50%;transform:translate(-50%)}.react-flow__attribution{font-size:10px;background:rgba(255,255,255,.5);padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@-webkit-keyframes dashdraw{0%{stroke-dashoffset:10}}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-default,.react-flow__node-input,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:3px;width:150px;font-size:12px;color:#222;text-align:center;border-width:1px;border-style:solid;border-color:#1a192b;background-color:#fff}.react-flow__node-default.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background-color:#f0f0f040}.react-flow__nodesselection-rect,.react-flow__selection{background:rgba(0,89,220,.08);border:1px dotted rgba(0,89,220,.8)}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls{box-shadow:0 0 2px 1px #00000014}.react-flow__controls-button{border:none;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:5px}.react-flow__controls-button:hover{background:#f4f4f4}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px}.react-flow__minimap{background-color:#fff}.react-flow__node-interaction{padding:10px;border-radius:3px;width:150px;font-size:12px;color:#222;text-align:center;border-width:1px;border-style:solid;border-color:#1a192b;background-color:#fff}.filter-settings-tabs{width:100%;height:100%}.filter-settings-tabs .mantine-Tabs-panel{height:calc(100% - 25px)}.filter-settings-tabs .mantine-Tabs-tabsListWrapper{flex:0}.filter-settings-tabs .mantine-Tabs-body{flex:1;overflow:scroll}.panel-root{height:100%;width:100%;max-width:100%;background:transparent;border-radius:4px;position:relative}.panel-settings-tabs{width:100%;height:100%}.panel-settings-tabs .mantine-Tabs-panel{height:calc(100% - 25px)}.panel-settings-tabs .mantine-Tabs-tabsListWrapper{flex:0}.panel-settings-tabs .mantine-Tabs-body{flex:1;overflow:scroll}.viz-root{width:100%;overflow:scroll;flex-grow:1;background-color:#fff}.panel-dropdown-target{text-align:center;transition:background-color .3s ease}.panel-dropdown-target:hover{cursor:pointer;background-color:#6464640d}.react-grid-item{padding:0}.remove-panel{position:absolute;right:2px;top:0;cursor:pointer}.code-textarea textarea{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.dashboard-root{overflow:scroll;overflow-x:hidden;padding:0 0 10px;height:100%}.dashboard-sticky-area{z-index:100;background:white;margin:0;padding:0 10px}.mantine-RichTextEditor-root{overflow-y:scroll!important;-ms-overflow-style:initial!important}*:not(.mantine-RichTextEditor-root):not([data-enable-scrollbar])::-webkit-scrollbar{width:0!important;height:0!important}*:not([data-enable-scrollbar]){overflow:-moz-scrollbars-none;-ms-overflow-style:none}.minimal-monaco-editor{border-radius:4px;overflow:hidden;background-color:#1e1e1e;padding-top:14px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtable/dashboard",
3
- "version": "7.5.2",
3
+ "version": "7.6.0",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -36,7 +36,8 @@
36
36
  "file-saver": "2.0.5",
37
37
  "performant-array-to-tree": "1.11.0",
38
38
  "popmotion": "^11.0.3",
39
- "rc-tree-select": "5.5.5"
39
+ "rc-tree-select": "5.5.5",
40
+ "reactflow": "^11.5.3"
40
41
  },
41
42
  "devDependencies": {
42
43
  "@mantine/core": "5.9.5",