flowstudio 0.0.14 → 0.0.18
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/README.md +2 -2
- package/dist/ai_creator.d.ts +1 -0
- package/dist/ai_creator.js +140 -0
- package/dist/ai_creator.js.map +1 -0
- package/dist/app_analytics.d.ts +1 -0
- package/dist/app_analytics.js +81 -0
- package/dist/app_analytics.js.map +1 -0
- package/dist/app_details.d.ts +1 -0
- package/dist/app_details.js +84 -0
- package/dist/app_details.js.map +1 -0
- package/dist/app_layout.js +11 -0
- package/dist/app_layout.js.map +1 -0
- package/dist/app_settings.d.ts +1 -0
- package/dist/app_settings.js +15 -0
- package/dist/app_settings.js.map +1 -0
- package/dist/components/combo_box/index.d.ts +1 -0
- package/dist/components/combo_box/index.js +118 -33
- package/dist/components/combo_box/index.js.map +1 -1
- package/dist/components/date_picker/index.d.ts +1 -0
- package/dist/components/date_picker/index.js +46 -0
- package/dist/components/date_picker/index.js.map +1 -0
- package/dist/components/gtable.d.ts +15 -0
- package/dist/components/gtable.js +122 -0
- package/dist/components/gtable.js.map +1 -0
- package/dist/components/mention_input/index.d.ts +1 -0
- package/dist/components/mention_input/index.js +125 -0
- package/dist/components/mention_input/index.js.map +1 -0
- package/dist/components/paginator_table.d.ts +7 -0
- package/dist/components/paginator_table.js +38 -0
- package/dist/components/paginator_table.js.map +1 -0
- package/dist/components/sheet/index.d.ts +1 -1
- package/dist/components/sheet/index.js +3 -3
- package/dist/components/sheet/index.js.map +1 -1
- package/dist/context.d.ts +1 -0
- package/dist/context.js +7 -0
- package/dist/context.js.map +1 -0
- package/dist/envs.d.ts +2 -0
- package/dist/envs.js +135 -0
- package/dist/envs.js.map +1 -0
- package/dist/functions.d.ts +5 -0
- package/dist/functions.js +204 -0
- package/dist/functions.js.map +1 -0
- package/dist/getcode.d.ts +1 -0
- package/dist/getcode.js +8 -0
- package/dist/getcode.js.map +1 -0
- package/dist/home.d.ts +1 -0
- package/dist/home.js +47 -0
- package/dist/home.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +157 -3
- package/dist/index.js.map +1 -1
- package/dist/new_project.d.ts +1 -0
- package/dist/new_project.js +101 -0
- package/dist/new_project.js.map +1 -0
- package/dist/node.d.ts +3 -0
- package/dist/node.js +219 -0
- package/dist/node.js.map +1 -0
- package/dist/project_widget.d.ts +1 -0
- package/dist/project_widget.js +23 -0
- package/dist/project_widget.js.map +1 -0
- package/dist/simulator.d.ts +1 -0
- package/dist/simulator.js +73 -0
- package/dist/simulator.js.map +1 -0
- package/dist/studio_pane.d.ts +1 -0
- package/dist/studio_pane.js +309 -0
- package/dist/studio_pane.js.map +1 -0
- package/dist/top_center_panel.d.ts +1 -0
- package/dist/top_center_panel.js +9 -0
- package/dist/top_center_panel.js.map +1 -0
- package/dist/top_left_panel.d.ts +1 -0
- package/dist/top_left_panel.js +46 -0
- package/dist/top_left_panel.js.map +1 -0
- package/dist/top_right_panel.d.ts +1 -0
- package/dist/top_right_panel.js +80 -0
- package/dist/top_right_panel.js.map +1 -0
- package/dist/triggers.d.ts +2 -0
- package/dist/triggers.js +156 -0
- package/dist/triggers.js.map +1 -0
- package/dist/zustand/store.d.ts +465 -285
- package/dist/zustand/store.js +33 -37
- package/dist/zustand/store.js.map +1 -1
- package/package.json +33 -13
- package/src/components/date_picker/style.css +204 -0
- package/src/components/sheet/style.css +5 -5
- package/src/studio.css +19 -0
- package/src/styes/date_picker.css +204 -0
- package/src/styes/sheet.css +155 -0
- package/src/styes/studio.css +19 -0
- package/dist/components/app_layout.js +0 -14
- package/dist/components/app_layout.js.map +0 -1
- package/dist/components/app_settings/data_sources.d.ts +0 -1
- package/dist/components/app_settings/data_sources.js +0 -57
- package/dist/components/app_settings/data_sources.js.map +0 -1
- package/dist/components/app_settings/deploy.d.ts +0 -1
- package/dist/components/app_settings/deploy.js +0 -14
- package/dist/components/app_settings/deploy.js.map +0 -1
- package/dist/components/app_settings/index.d.ts +0 -1
- package/dist/components/app_settings/index.js +0 -53
- package/dist/components/app_settings/index.js.map +0 -1
- package/dist/components/app_settings/service_providers.d.ts +0 -1
- package/dist/components/app_settings/service_providers.js +0 -17
- package/dist/components/app_settings/service_providers.js.map +0 -1
- package/dist/components/app_settings/simulator.d.ts +0 -1
- package/dist/components/app_settings/simulator.js +0 -34
- package/dist/components/app_settings/simulator.js.map +0 -1
- package/dist/components/context.d.ts +0 -1
- package/dist/components/context.js +0 -19
- package/dist/components/context.js.map +0 -1
- package/dist/components/dock_panel.d.ts +0 -2
- package/dist/components/dock_panel.js +0 -46
- package/dist/components/dock_panel.js.map +0 -1
- package/dist/components/end.d.ts +0 -1
- package/dist/components/end.js +0 -6
- package/dist/components/end.js.map +0 -1
- package/dist/components/input.d.ts +0 -1
- package/dist/components/input.js +0 -11
- package/dist/components/input.js.map +0 -1
- package/dist/components/normal.d.ts +0 -1
- package/dist/components/normal.js +0 -6
- package/dist/components/normal.js.map +0 -1
- package/dist/components/start.d.ts +0 -1
- package/dist/components/start.js +0 -13
- package/dist/components/start.js.map +0 -1
- package/dist/components/studio/index.d.ts +0 -1
- package/dist/components/studio/index.js +0 -78
- package/dist/components/studio/index.js.map +0 -1
- package/dist/components/xnode.d.ts +0 -2
- package/dist/components/xnode.js +0 -28
- package/dist/components/xnode.js.map +0 -1
- package/dist/service_providers.json +0 -74
- package/dist/styles/sheet.css +0 -155
- package/src/styles/combo_box.css +0 -10
- package/src/styles/sheet.css +0 -155
- /package/dist/{components/app_layout.d.ts → app_layout.d.ts} +0 -0
- /package/{dist/styles/combo_box.css → src/components/combo_box/style.css} +0 -0
package/dist/components/start.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button, Card, TextArea, Flex, Badge, Text, Popover, Box, } from "@radix-ui/themes";
|
|
3
|
-
import InputNode from "./input";
|
|
4
|
-
import { CiMenuKebab } from "react-icons/ci";
|
|
5
|
-
import XNode from "./xnode";
|
|
6
|
-
export default function StartNode({ data }) {
|
|
7
|
-
return (_jsx(XNode, { id: data.id, type: 'start', data: { message: data.message }, inputs: data.inputs, fns: [
|
|
8
|
-
{ type: 'system', functions: ['Source Finder', 'Session GET'] },
|
|
9
|
-
{ type: 'custom', functions: ['Account Checker'] }
|
|
10
|
-
] }));
|
|
11
|
-
return (_jsxs(Card, { children: [_jsx(Box, { children: _jsxs(Flex, { width: '100%', align: 'center', justify: 'between', children: [_jsx(Text, { children: "Start" }), _jsxs(Popover.Root, { children: [_jsx(Popover.Trigger, { children: _jsx(Button, { size: '1', "aria-label": 'Options', variant: 'outline', children: _jsx(CiMenuKebab, {}) }) }), _jsx(Popover.Content, { maxWidth: '150px' })] })] }) }), _jsx(Box, { children: _jsxs(Flex, { direction: 'column', children: [_jsx(TextArea, { rows: 6, size: '1', className: "nodrag", placeholder: 'Message', defaultValue: data.message }), _jsxs(Flex, { direction: 'column', children: [_jsx(InputNode, { id: 1, y: 50 }), _jsx(InputNode, { id: 2, y: 130 })] }), _jsx(Flex, { wrap: 'wrap', children: _jsx(Badge, { size: '1', color: 'green', children: "fn (1)" }) })] }) })] }));
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=start.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"start.js","sourceRoot":"","sources":["../../src/components/start.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAc,OAAO,EAAE,GAAG,GAAI,MAAM,kBAAkB,CAAC;AACzG,OAAO,SAAS,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,MAAM,SAAS,CAAC;AAG5B,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAAE,IAAI,EAAO;IAC3C,OAAO,CACP,KAAC,KAAK,IACF,E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,IAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,uBAAgB,GAC7C,IACJ,GACL,IACH,CACV,CAAA;AACL,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function Studio({ apiKey, theme, accent }: any): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box } from '@radix-ui/themes';
|
|
3
|
-
// import ThemeLayout from '../layouts/ThemeLayout'
|
|
4
|
-
import { ReactFlow, useNodesState, useEdgesState, addEdge, MiniMap, Controls, Background, Panel, SmoothStepEdge } from '@xyflow/react';
|
|
5
|
-
import DockPanel from '../../components/dock_panel';
|
|
6
|
-
import StartNode from '../../components/start';
|
|
7
|
-
import EndNode from '../../components/end';
|
|
8
|
-
import NormalNode from '../../components/normal';
|
|
9
|
-
import InputNode from '../../components/input';
|
|
10
|
-
import { useConfigStore } from '../../zustand/store';
|
|
11
|
-
import AppLayout from "../app_layout";
|
|
12
|
-
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
13
|
-
export default function Studio({ apiKey, theme, accent }) {
|
|
14
|
-
const identifier = '987654321';
|
|
15
|
-
const { appTheme } = useConfigStore();
|
|
16
|
-
////////////////// Nodes Management (React Flow) /////////////////////////////
|
|
17
|
-
const { nodesData, setNodesData, edgesData, setEdgesData } = useConfigStore();
|
|
18
|
-
const nodeTypes = useMemo(() => ({ startNode: StartNode, normalNode: NormalNode, endNode: EndNode, inputNode: InputNode }), []);
|
|
19
|
-
const [nodes, setNodes, onNodesChange] = useNodesState(nodesData);
|
|
20
|
-
const [edges, setEdges, onEdgesChange] = useEdgesState(edgesData);
|
|
21
|
-
const onConnect = useCallback((params) => setEdges((eds) => addEdge(params, eds)), [setEdges]);
|
|
22
|
-
const CustomSmoothstepEdge = ({ data, ...props }) => {
|
|
23
|
-
return _jsx(SmoothStepEdge, { ...props, data: data });
|
|
24
|
-
};
|
|
25
|
-
const edgeUpdateSuccessful = useRef(true);
|
|
26
|
-
const onEdgeUpdateStart = useCallback(() => {
|
|
27
|
-
edgeUpdateSuccessful.current = false;
|
|
28
|
-
}, []);
|
|
29
|
-
const onEdgeUpdate = useCallback((oldEdge, newConnection) => {
|
|
30
|
-
edgeUpdateSuccessful.current = true;
|
|
31
|
-
// setEdges((els:any) => updateEdge(oldEdge, newConnection, els));
|
|
32
|
-
}, []);
|
|
33
|
-
const onEdgeUpdateEnd = useCallback((_, edge) => {
|
|
34
|
-
if (!edgeUpdateSuccessful.current) {
|
|
35
|
-
setEdges((eds) => eds.filter((e) => e.id !== edge.id));
|
|
36
|
-
}
|
|
37
|
-
edgeUpdateSuccessful.current = true;
|
|
38
|
-
}, []);
|
|
39
|
-
useEffect(() => {
|
|
40
|
-
if (nodes) {
|
|
41
|
-
setNodesData(nodes);
|
|
42
|
-
}
|
|
43
|
-
}, [onNodesChange]);
|
|
44
|
-
useEffect(() => {
|
|
45
|
-
if (edges) {
|
|
46
|
-
setEdgesData(edges);
|
|
47
|
-
}
|
|
48
|
-
}, [onEdgesChange]);
|
|
49
|
-
// const getNodeId = () => `randomnode_${+new Date()}`;
|
|
50
|
-
// const onAdd = useCallback(() => {
|
|
51
|
-
// const newNode = {
|
|
52
|
-
// id: getNodeId(),
|
|
53
|
-
// data: { label: 'Added node' },
|
|
54
|
-
// position: {
|
|
55
|
-
// x: Math.random() * window.innerWidth - 100,
|
|
56
|
-
// y: Math.random() * window.innerHeight,
|
|
57
|
-
// },
|
|
58
|
-
// };
|
|
59
|
-
// setNodes((nds) => nds.concat(newNode));
|
|
60
|
-
// }, [setNodes]);
|
|
61
|
-
////////////////// For Context Menu /////////////////////////////
|
|
62
|
-
const [showContextMenu, setShowContextMenu] = useState(false);
|
|
63
|
-
const [contextMenuPosition, setContextMenuPosition] = useState({ x: 0, y: 0 });
|
|
64
|
-
const handleContextMenu = (event) => {
|
|
65
|
-
event.preventDefault(); // Prevent default context menu
|
|
66
|
-
const clickX = event.clientX;
|
|
67
|
-
const clickY = event.clientY;
|
|
68
|
-
setContextMenuPosition({ x: clickX, y: clickY });
|
|
69
|
-
setShowContextMenu(true);
|
|
70
|
-
};
|
|
71
|
-
// const cardBackground = useColorModeValue('rgba(255,255,255,.8)', 'hsla(0,0%,0%,.80)')
|
|
72
|
-
return (_jsx(AppLayout, { theme: theme, accent: accent, children: _jsx(Box, { position: 'absolute', top: '0', right: '0', bottom: '0', left: '0', style: {}, children: _jsx(Box, { position: 'relative', style: { width: '100%', height: '100%', contain: 'paint', willChange: 'transform', transform: 'translate(0)', position: 'relative' }, children: _jsxs(ReactFlow, { nodes: nodes, edges: edges, onNodesChange: onNodesChange, onEdgesChange: onEdgesChange, onConnect: onConnect, nodeTypes: nodeTypes, snapToGrid: true,
|
|
73
|
-
// onEdgeUpdate={onEdgeUpdate}
|
|
74
|
-
// onEdgeUpdateStart={onEdgeUpdateStart}
|
|
75
|
-
// onEdgeUpdateEnd={onEdgeUpdateEnd}
|
|
76
|
-
attributionPosition: "top-right", edgeTypes: { default: CustomSmoothstepEdge }, fitView: true, minZoom: 0.2, maxZoom: 1, colorMode: appTheme, children: [_jsx(Controls, {}), _jsx(MiniMap, {}), _jsx(Background, { gap: 12, size: 1 }), _jsxs(Panel, { position: "top-center", children: [" ", _jsx(DockPanel, { projectIdentifier: identifier })] })] }) }) }) }));
|
|
77
|
-
}
|
|
78
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/studio/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAQ,MAAM,kBAAkB,CAAA;AAC5C,mDAAmD;AACnD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,cAAc,EAAC,MAAM,eAAe,CAAC;A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EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,IAAI;oBAChB,8BAA8B;oBAC9B,wCAAwC;oBACxC,oCAAoC;oBACpC,mBAAmB,EAAE,WAAW,EAChC,SAAS,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE,EAC5C,OAAO,QACP,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,CAAC,EACV,SAAS,EAAE,QAAQ,aAEnB,KAAC,QAAQ,KAAG,EACZ,KAAC,OAAO,KAAG,EACX,KAAC,UAAU,IAAC,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,GAAI,EAChC,MAAC,KAAK,IAAC,QAAQ,EAAC,YAAY,kBAAE,KAAC,SAAS,IAAC,iBAAiB,EAAE,UAAU,GAAI,IAAQ,IACxE,GAEZ,GACI,GACM,CACf,CAAA;AACD,CAAC"}
|
package/dist/components/xnode.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { Button, Card, Flex, Badge, Text, Popover, TextField, TextArea, Inset, } from "@radix-ui/themes";
|
|
4
|
-
import { CiMenuKebab } from "react-icons/ci";
|
|
5
|
-
import { Handle, Position } from "@xyflow/react";
|
|
6
|
-
import { BiPlus, BiTrash } from "react-icons/bi";
|
|
7
|
-
import { useConfigStore } from "../zustand/store";
|
|
8
|
-
// Constants
|
|
9
|
-
const color_start = '#009688';
|
|
10
|
-
const color_normal = '#2196f3';
|
|
11
|
-
const color_end = '#ff5c4d';
|
|
12
|
-
export default function XNode({ id = 0, data, fns = [], inputs = [], type = 'normal' }) {
|
|
13
|
-
const { stateType, setStateType } = useConfigStore();
|
|
14
|
-
return (_jsx(Card, { style: { overflow: 'unset', contain: 'layout' }, children: _jsx(Inset, { style: { overflow: 'unset' }, children: _jsxs(Flex, { direction: 'column', gap: '3', children: [_jsxs(Flex, { width: '100%', align: 'center', justify: 'between', p: '1', className: "drag-handle", style: { backgroundColor: type == 'start' ? color_start : type == 'normal' ? color_normal : type == 'end' ? color_end : color_normal, borderTopLeftRadius: 7, borderTopRightRadius: 7 }, children: [_jsx(Text, { size: '2', ml: '1', children: type == 'start' ? 'Start' : type == 'normal' ? 'Normal' : type == 'end' ? 'End' : 'Normal' }), _jsxs(Popover.Root, { children: [_jsx(Popover.Trigger, { children: _jsx(Button, { size: '1', variant: 'soft', "aria-label": 'Options', children: _jsx(CiMenuKebab, {}) }) }), _jsx(Popover.Content, { size: '1', align: "end", children: _jsxs(Flex, { direction: 'column', gap: '3', children: [_jsx(Button, { variant: 'ghost', size: '1', onClick: () => { }, children: "Change Node" }), _jsx(Button, { variant: 'ghost', size: '1', onClick: () => { }, color: 'red', children: "Delete Node" })] }) })] })] }), _jsxs(Flex, { direction: 'column', gap: '3', px: '3', children: [stateType == 'build' ?
|
|
15
|
-
_jsx(TextArea, { size: '1', className: "nodrag", placeholder: 'Message', defaultValue: (data === null || data === void 0 ? void 0 : data.message) || '' })
|
|
16
|
-
: _jsx(Text, { size: '1', color: 'gray', style: { maxWidth: '180px', textWrap: 'wrap' }, children: data === null || data === void 0 ? void 0 : data.message }), type != 'end' && inputs.length > 0 &&
|
|
17
|
-
_jsx(Flex, { direction: 'column', gap: '2', children: inputs.map((val, ind) => (_jsx(InputNode, { identifier: ind, id: val.id, parentType: type, type: val.type, text: val.text, inputType: val.inputType, allowDrag: inputs.length > 1, allowInsert: inputs.length == (ind + 1) }, ind))) })] }), _jsxs(Flex, { width: '100%', align: 'center', px: '2', pb: '2', children: [_jsx(Flex, { flexGrow: '1', children: fns.length > 0 &&
|
|
18
|
-
_jsx(Flex, { wrap: 'wrap', gap: '2', children: fns.map((val, ind) => (_jsxs(Badge, { size: '1', color: val.type == 'system' ? 'green' : 'purple', children: ["fn (", val.functions.length, ")"] }, ind))) }) }), _jsx(Flex, { flexShrink: '0', children: _jsx(Text, { size: '1', children: "1pg (50)" }) })] }), type != 'start' &&
|
|
19
|
-
_jsx(Handle, { type: "target", position: Position.Left, id: "g", style: { left: -6, background: type == 'normal' ? color_normal : type == 'end' ? color_end : color_normal, borderColor: '#fff', borderWidth: 1, width: 10, height: 15, borderRadius: 3, zIndex: 10 } })] }) }) }));
|
|
20
|
-
}
|
|
21
|
-
export function InputNode({ identifier, id = 0, parentType, type = 'choice', text = '', inputType = 'text', allowDrag = false, allowInsert = false }) {
|
|
22
|
-
const [show, setShow] = useState(false);
|
|
23
|
-
const handleClick = () => setShow(!show);
|
|
24
|
-
return (_jsxs(Flex, { position: 'relative', gap: '0', align: 'center', style: { zIndex: 20 }, children: [_jsxs(Flex, { width: '100%', direction: 'column', align: 'end', children: [_jsxs(Flex, { width: '100%', align: 'center', children: [allowDrag && _jsx(Flex, { gap: '1', children: _jsx(Button, { size: '1', variant: 'soft', style: { borderTopRightRadius: 0, borderBottomRightRadius: 0 }, children: id }) }), _jsx(TextField.Root, { type: inputType, defaultValue: text, id: 'text_value', placeholder: type == 'choice' ? 'Option Text' : inputType == 'number' ? '0' : 'User Input', autoComplete: 'off', style: { width: '100%' }, children: identifier != 0 &&
|
|
25
|
-
_jsx(TextField.Slot, { side: 'right', pr: '1', children: _jsx(Button, { color: 'red', "aria-label": 'close', size: '1', variant: 'soft', onClick: handleClick, style: { width: 20, padding: 4 }, children: _jsx(BiTrash, { size: 20 }) }) }) })] }), allowInsert &&
|
|
26
|
-
_jsx(Button, { "aria-label": 'Add', size: '1', style: { borderTopLeftRadius: 0, borderTopRightRadius: 0, marginRight: 5 }, children: _jsx(BiPlus, {}) })] }), _jsx(Handle, { type: "source", position: Position.Right, isConnectable: true, id: id, style: { right: -19, background: parentType == 'start' ? color_start : parentType == 'normal' ? color_normal : parentType == 'end' ? color_end : color_normal, borderColor: '#fff', borderWidth: 1, width: 10, height: 15, borderRadius: 3, position: 'absolute', top: 16, zIndex: 20 } })] }));
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=xnode.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"xnode.js","sourceRoot":"","sources":["../../src/components/xnode.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAG,IAAI,EAAE,KAAK,EAAE,IAAI,EAAc,OAAO,EAAE,SAAS,EAAO,QAAQ,EAAE,KAAK,GAAI,MAAM,kBAAkB,CAAC;AAC5H,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,YAAY;AACZ,MAAM,WAAW,GAAG,SAAS,CAAA;AAC7B,MAAM,YAAY,GAAG,SAAS,CAAA;AAC9B,MAAM,SAAS,GAAG,SAAS,CAAA;AAE3B,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE,EAAE,IAAI,GAAG,QAAQ,EAAO;IACvF,MAAM,EAAC,SAAS,EAAE,YAAY,EAAC,GAAG,cAAc,EAAE,CAAA;IAElD,OAAO,CACH,KAAC,IAAI,IAAC,KAAK,EAAE,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,EAAC,QAAQ,EAAC,YAG7C,KAAC,KAAK,IAAC,KAAK,EAAE,EAAC,QAAQ,EAAC,OAAO,EAAC,YAChC,MAAC,IAAI,IAAC,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,aAC/B,MAAC,IAAI,IAA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
|
8
|
-
"ussd_map": {
|
|
9
|
-
"id": "sessionid",
|
|
10
|
-
"mode": "mode",
|
|
11
|
-
"user_input": "userdata",
|
|
12
|
-
"meta": {
|
|
13
|
-
"mno": "network",
|
|
14
|
-
"msisdn": "msisdn",
|
|
15
|
-
"username": "",
|
|
16
|
-
"trafficid": "",
|
|
17
|
-
"other": ""
|
|
18
|
-
},
|
|
19
|
-
"response_prefix": "",
|
|
20
|
-
"response_suffix": "",
|
|
21
|
-
"nl_char": "^"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"identifier": "1235",
|
|
26
|
-
"type": "sms",
|
|
27
|
-
"name": "IT Consortium",
|
|
28
|
-
"ips": ["::2"],
|
|
29
|
-
"ussd_short_code": "887*4445",
|
|
30
|
-
"ussd_map": {
|
|
31
|
-
"id": "sessionid",
|
|
32
|
-
"mode": "requestType",
|
|
33
|
-
"user_input": "userdata",
|
|
34
|
-
"meta": {
|
|
35
|
-
"mno": "operator",
|
|
36
|
-
"msisdn": "msisdn",
|
|
37
|
-
"username": "",
|
|
38
|
-
"trafficid": "",
|
|
39
|
-
"other": ""
|
|
40
|
-
},
|
|
41
|
-
"response_prefix": "",
|
|
42
|
-
"response_suffix": "",
|
|
43
|
-
"nl_char": "^"
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"identifier": "1236",
|
|
48
|
-
"type": "payment",
|
|
49
|
-
"name": "Hubtel",
|
|
50
|
-
"ips": ["::3"],
|
|
51
|
-
"ussd_short_code": ""
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"identifier": "1237",
|
|
55
|
-
"type": "sms",
|
|
56
|
-
"name": "Twilio",
|
|
57
|
-
"ips": ["::3"],
|
|
58
|
-
"ussd_short_code": ""
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"identifier": "1238",
|
|
62
|
-
"type": "sms",
|
|
63
|
-
"name": "Africas Talking",
|
|
64
|
-
"ips": ["::3"],
|
|
65
|
-
"ussd_short_code": ""
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"identifier": "1237",
|
|
69
|
-
"type": "sms",
|
|
70
|
-
"name": "Twilio",
|
|
71
|
-
"ips": ["::3"],
|
|
72
|
-
"ussd_short_code": ""
|
|
73
|
-
}
|
|
74
|
-
]
|
package/dist/styles/sheet.css
DELETED
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
/* SlidingDialog.css */
|
|
2
|
-
/* .dialog-overlay {
|
|
3
|
-
position: fixed;
|
|
4
|
-
inset: 0;
|
|
5
|
-
background: rgba(0, 0, 0, 0.5);
|
|
6
|
-
animation: overlayShow 300ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
7
|
-
} */
|
|
8
|
-
|
|
9
|
-
.dialog-content {
|
|
10
|
-
/* background: white; */
|
|
11
|
-
position: fixed;
|
|
12
|
-
/* width: 300px; */
|
|
13
|
-
height: 100%;
|
|
14
|
-
overflow: auto;
|
|
15
|
-
box-shadow: 0 10px 38px -10px rgba(0, 0, 0, 0.35);
|
|
16
|
-
outline: none;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.dialog-close {
|
|
20
|
-
position: absolute;
|
|
21
|
-
top: 10px;
|
|
22
|
-
right: 10px;
|
|
23
|
-
background: none;
|
|
24
|
-
border: none;
|
|
25
|
-
font-size: 20px;
|
|
26
|
-
cursor: pointer;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@keyframes slideInFromRight {
|
|
30
|
-
from {
|
|
31
|
-
transform: translateX(100%);
|
|
32
|
-
}
|
|
33
|
-
to {
|
|
34
|
-
transform: translateX(0);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
@keyframes slideOutToRight {
|
|
39
|
-
from {
|
|
40
|
-
transform: translateX(0);
|
|
41
|
-
}
|
|
42
|
-
to {
|
|
43
|
-
transform: translateX(100%);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
@keyframes slideInFromLeft {
|
|
48
|
-
from {
|
|
49
|
-
transform: translateX(-100%);
|
|
50
|
-
}
|
|
51
|
-
to {
|
|
52
|
-
transform: translateX(0);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
@keyframes slideOutToLeft {
|
|
57
|
-
from {
|
|
58
|
-
transform: translateX(0);
|
|
59
|
-
}
|
|
60
|
-
to {
|
|
61
|
-
transform: translateX(-100%);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
@keyframes slideInFromTop {
|
|
66
|
-
from {
|
|
67
|
-
transform: translateY(-100%);
|
|
68
|
-
}
|
|
69
|
-
to {
|
|
70
|
-
transform: translateY(0);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
@keyframes slideOutToTop {
|
|
75
|
-
from {
|
|
76
|
-
transform: translateY(0);
|
|
77
|
-
}
|
|
78
|
-
to {
|
|
79
|
-
transform: translateY(-100%);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
@keyframes slideInFromBottom {
|
|
84
|
-
from {
|
|
85
|
-
transform: translateY(100%);
|
|
86
|
-
}
|
|
87
|
-
to {
|
|
88
|
-
transform: translateY(0);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
@keyframes slideOutToBottom {
|
|
93
|
-
from {
|
|
94
|
-
transform: translateY(0);
|
|
95
|
-
}
|
|
96
|
-
to {
|
|
97
|
-
transform: translateY(100%);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.slide-in-right {
|
|
102
|
-
top: 0;
|
|
103
|
-
right: 0;
|
|
104
|
-
animation: slideInFromRight 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.slide-out-right {
|
|
108
|
-
top: 0;
|
|
109
|
-
right: 0;
|
|
110
|
-
animation: slideOutToRight 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.slide-in-left {
|
|
114
|
-
top: 0;
|
|
115
|
-
left: 0;
|
|
116
|
-
animation: slideInFromLeft 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.slide-out-left {
|
|
120
|
-
top: 0;
|
|
121
|
-
left: 0;
|
|
122
|
-
animation: slideOutToLeft 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.slide-in-top {
|
|
126
|
-
top: 0;
|
|
127
|
-
left: 0;
|
|
128
|
-
width: 100%;
|
|
129
|
-
height: auto;
|
|
130
|
-
animation: slideInFromTop 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.slide-out-top {
|
|
134
|
-
top: 0;
|
|
135
|
-
left: 0;
|
|
136
|
-
width: 100%;
|
|
137
|
-
height: auto;
|
|
138
|
-
animation: slideOutToTop 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.slide-in-bottom {
|
|
142
|
-
bottom: 0;
|
|
143
|
-
left: 0;
|
|
144
|
-
width: 100%;
|
|
145
|
-
height: auto;
|
|
146
|
-
animation: slideInFromBottom 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.slide-out-bottom {
|
|
150
|
-
bottom: 0;
|
|
151
|
-
left: 0;
|
|
152
|
-
width: 100%;
|
|
153
|
-
height: auto;
|
|
154
|
-
animation: slideOutToBottom 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
155
|
-
}
|
package/src/styles/combo_box.css
DELETED
package/src/styles/sheet.css
DELETED
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
/* SlidingDialog.css */
|
|
2
|
-
/* .dialog-overlay {
|
|
3
|
-
position: fixed;
|
|
4
|
-
inset: 0;
|
|
5
|
-
background: rgba(0, 0, 0, 0.5);
|
|
6
|
-
animation: overlayShow 300ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
7
|
-
} */
|
|
8
|
-
|
|
9
|
-
.dialog-content {
|
|
10
|
-
/* background: white; */
|
|
11
|
-
position: fixed;
|
|
12
|
-
/* width: 300px; */
|
|
13
|
-
height: 100%;
|
|
14
|
-
overflow: auto;
|
|
15
|
-
box-shadow: 0 10px 38px -10px rgba(0, 0, 0, 0.35);
|
|
16
|
-
outline: none;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.dialog-close {
|
|
20
|
-
position: absolute;
|
|
21
|
-
top: 10px;
|
|
22
|
-
right: 10px;
|
|
23
|
-
background: none;
|
|
24
|
-
border: none;
|
|
25
|
-
font-size: 20px;
|
|
26
|
-
cursor: pointer;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@keyframes slideInFromRight {
|
|
30
|
-
from {
|
|
31
|
-
transform: translateX(100%);
|
|
32
|
-
}
|
|
33
|
-
to {
|
|
34
|
-
transform: translateX(0);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
@keyframes slideOutToRight {
|
|
39
|
-
from {
|
|
40
|
-
transform: translateX(0);
|
|
41
|
-
}
|
|
42
|
-
to {
|
|
43
|
-
transform: translateX(100%);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
@keyframes slideInFromLeft {
|
|
48
|
-
from {
|
|
49
|
-
transform: translateX(-100%);
|
|
50
|
-
}
|
|
51
|
-
to {
|
|
52
|
-
transform: translateX(0);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
@keyframes slideOutToLeft {
|
|
57
|
-
from {
|
|
58
|
-
transform: translateX(0);
|
|
59
|
-
}
|
|
60
|
-
to {
|
|
61
|
-
transform: translateX(-100%);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
@keyframes slideInFromTop {
|
|
66
|
-
from {
|
|
67
|
-
transform: translateY(-100%);
|
|
68
|
-
}
|
|
69
|
-
to {
|
|
70
|
-
transform: translateY(0);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
@keyframes slideOutToTop {
|
|
75
|
-
from {
|
|
76
|
-
transform: translateY(0);
|
|
77
|
-
}
|
|
78
|
-
to {
|
|
79
|
-
transform: translateY(-100%);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
@keyframes slideInFromBottom {
|
|
84
|
-
from {
|
|
85
|
-
transform: translateY(100%);
|
|
86
|
-
}
|
|
87
|
-
to {
|
|
88
|
-
transform: translateY(0);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
@keyframes slideOutToBottom {
|
|
93
|
-
from {
|
|
94
|
-
transform: translateY(0);
|
|
95
|
-
}
|
|
96
|
-
to {
|
|
97
|
-
transform: translateY(100%);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.slide-in-right {
|
|
102
|
-
top: 0;
|
|
103
|
-
right: 0;
|
|
104
|
-
animation: slideInFromRight 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.slide-out-right {
|
|
108
|
-
top: 0;
|
|
109
|
-
right: 0;
|
|
110
|
-
animation: slideOutToRight 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.slide-in-left {
|
|
114
|
-
top: 0;
|
|
115
|
-
left: 0;
|
|
116
|
-
animation: slideInFromLeft 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.slide-out-left {
|
|
120
|
-
top: 0;
|
|
121
|
-
left: 0;
|
|
122
|
-
animation: slideOutToLeft 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.slide-in-top {
|
|
126
|
-
top: 0;
|
|
127
|
-
left: 0;
|
|
128
|
-
width: 100%;
|
|
129
|
-
height: auto;
|
|
130
|
-
animation: slideInFromTop 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.slide-out-top {
|
|
134
|
-
top: 0;
|
|
135
|
-
left: 0;
|
|
136
|
-
width: 100%;
|
|
137
|
-
height: auto;
|
|
138
|
-
animation: slideOutToTop 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.slide-in-bottom {
|
|
142
|
-
bottom: 0;
|
|
143
|
-
left: 0;
|
|
144
|
-
width: 100%;
|
|
145
|
-
height: auto;
|
|
146
|
-
animation: slideInFromBottom 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.slide-out-bottom {
|
|
150
|
-
bottom: 0;
|
|
151
|
-
left: 0;
|
|
152
|
-
width: 100%;
|
|
153
|
-
height: auto;
|
|
154
|
-
animation: slideOutToBottom 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
155
|
-
}
|
|
File without changes
|
|
File without changes
|