@steedos-widgets/reactflow 1.0.42 → 1.1.0-beta.1

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@steedos-widgets/reactflow",
3
3
  "private": false,
4
- "version": "1.0.42",
4
+ "version": "1.1.0-beta.1",
5
5
  "main": "dist/reactflow.cjs.js",
6
6
  "module": "dist/reactflow.esm.js",
7
7
  "unpkg": "dist/reactflow.umd.js",
@@ -49,8 +49,8 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@rollup/plugin-replace": "^5.0.2",
52
- "@steedos-widgets/amis-lib": "1.0.42",
52
+ "@steedos-widgets/amis-lib": "1.1.0-beta.1",
53
53
  "reactflow": "^11.5.6"
54
54
  },
55
- "gitHead": "276dc1debcf751da8053c54bdfcec9561ba5ed9e"
55
+ "gitHead": "7a5beff69165a6d5e2536678ad757bbb27f5f589"
56
56
  }
@@ -1,25 +0,0 @@
1
- {
2
- "packages": [
3
- {
4
- "package": "@steedos-widgets/reactflow",
5
- "urls": [
6
- "http://127.0.0.1:8080/@steedos-widgets/reactflow/dist/reactflow.umd.js",
7
- "http://127.0.0.1:8080/@steedos-widgets/reactflow/dist/reactflow.umd.css"
8
- ],
9
- "library": "BuilderReactFlow"
10
- }
11
- ],
12
- "components": [
13
- {
14
- "exportName": "BuilderReactFlowMeta",
15
- "npm": {
16
- "package": "@steedos-widgets/reactflow"
17
- },
18
- "url": "http://127.0.0.1:8080/@steedos-widgets/reactflow/dist/meta.js",
19
- "urls": {
20
- "default": "http://127.0.0.1:8080/@steedos-widgets/reactflow/dist/meta.js",
21
- "design": "http://127.0.0.1:8080/@steedos-widgets/reactflow/dist/meta.js"
22
- }
23
- }
24
- ]
25
- }
package/dist/assets.json DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "packages": [
3
- {
4
- "package": "@steedos-widgets/reactflow",
5
- "urls": [
6
- "https://unpkg.com/@steedos-widgets/reactflow@1.0.39/dist/reactflow.umd.js",
7
- "https://unpkg.com/@steedos-widgets/reactflow@1.0.39/dist/reactflow.umd.css"
8
- ],
9
- "library": "BuilderReactFlow"
10
- }
11
- ],
12
- "components": [
13
- {
14
- "exportName": "BuilderReactFlowMeta",
15
- "npm": {
16
- "package": "@steedos-widgets/reactflow"
17
- },
18
- "url": "https://unpkg.com/@steedos-widgets/reactflow@1.0.39/dist/meta.js",
19
- "urls": {
20
- "default": "https://unpkg.com/@steedos-widgets/reactflow@1.0.39/dist/meta.js",
21
- "design": "https://unpkg.com/@steedos-widgets/reactflow@1.0.39/dist/meta.js"
22
- }
23
- }
24
- ]
25
- }
@@ -1,20 +0,0 @@
1
- /// <reference types="react" />
2
- import 'reactflow/dist/style.css';
3
- import './ReactFlow.css';
4
- export declare const AmisReactFlow: ({ dispatchEvent: amisDispatchEvent, wrapperClassName, data: amisData, env, store, topStore, rootStore, scope, id, render, getValue, setValue, value, config, ...props }: {
5
- [x: string]: any;
6
- dispatchEvent: any;
7
- wrapperClassName: any;
8
- data: any;
9
- env: any;
10
- store: any;
11
- topStore: any;
12
- rootStore: any;
13
- scope: any;
14
- id: any;
15
- render: any;
16
- getValue: any;
17
- setValue: any;
18
- value: any;
19
- config: any;
20
- }) => JSX.Element;
@@ -1 +0,0 @@
1
- export * from './ReactFlow';
package/dist/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from './components';
2
- import ReactFlow from 'reactflow';
3
- export { ReactFlow };
package/dist/meta.d.ts DELETED
@@ -1,9 +0,0 @@
1
- declare const _default: {
2
- componentList: {
3
- title: string;
4
- icon: string;
5
- children: any[];
6
- }[];
7
- components: any[];
8
- };
9
- export default _default;
package/dist/meta.js DELETED
@@ -1,183 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
- typeof define === 'function' && define.amd ? define(factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.BuilderReactFlowMeta = factory());
5
- })(this, (function () { 'use strict';
6
-
7
- /******************************************************************************
8
- Copyright (c) Microsoft Corporation.
9
-
10
- Permission to use, copy, modify, and/or distribute this software for any
11
- purpose with or without fee is hereby granted.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
- PERFORMANCE OF THIS SOFTWARE.
20
- ***************************************************************************** */
21
-
22
- var __assign = function() {
23
- __assign = Object.assign || function __assign(t) {
24
- for (var s, i = 1, n = arguments.length; i < n; i++) {
25
- s = arguments[i];
26
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
27
- }
28
- return t;
29
- };
30
- return __assign.apply(this, arguments);
31
- };
32
-
33
- var config = {
34
- group: "华炎魔方-原子组件",
35
- componentName: "AmisReactFlow",
36
- title: "流程图",
37
- docUrl: "",
38
- screenshot: "",
39
- npm: {
40
- package: "@steedos-widgets/reactflow",
41
- version: "{{version}}",
42
- exportName: "AmisReactFlow",
43
- main: "",
44
- destructuring: true,
45
- subName: ""
46
- },
47
- props: [],
48
- preview: {},
49
- targets: ["steedos__RecordPage", "steedos__AppPage", "steedos__HomePage"],
50
- engines: ["amis"],
51
- // settings for amis.
52
- amis: {
53
- name: 'steedos-react-flow',
54
- icon: "fa-fw fa fa-list-alt"
55
- }
56
- };
57
- var ReactFlow = __assign(__assign({}, config), { snippets: [
58
- {
59
- title: config.title,
60
- screenshot: "",
61
- schema: {
62
- componentName: config.componentName,
63
- props: config.preview
64
- }
65
- }
66
- ], amis: {
67
- render: {
68
- type: config.amis.name,
69
- usage: "renderer",
70
- weight: 1,
71
- framework: "react"
72
- },
73
- plugin: {
74
- rendererName: config.amis.name,
75
- $schema: '/schemas/UnkownSchema.json',
76
- name: config.title,
77
- description: config.title,
78
- tags: [config.group],
79
- order: -9999,
80
- icon: config.amis.icon,
81
- scaffold: {
82
- type: config.amis.name,
83
- name: "flow_chart",
84
- wrapperClassName: "w-full h-full",
85
- config: JSON.stringify({
86
- nodes: [
87
- {
88
- id: 'start',
89
- data: { label: '开始' },
90
- position: { x: 0, y: 0 },
91
- type: 'input',
92
- },
93
- {
94
- id: 'end',
95
- data: { label: '结束' },
96
- position: { x: 100, y: 100 },
97
- },
98
- ],
99
- "edges": [
100
- {
101
- "id": "start-end",
102
- "source": "start",
103
- "target": "end",
104
- "label": "",
105
- "type": "step"
106
- }
107
- ]
108
- })
109
- },
110
- previewSchema: {
111
- type: config.amis.name,
112
- },
113
- panelTitle: "设置",
114
- panelControls: [
115
- {
116
- type: "editor",
117
- "language": "json",
118
- name: "config",
119
- label: "ReactFlow 配置",
120
- pipeOut: function (value) {
121
- try {
122
- return value ? JSON.parse(value) : null;
123
- }
124
- catch (e) {
125
- }
126
- return value;
127
- }
128
- },
129
- {
130
- type: "editor",
131
- "language": "javascript",
132
- name: "dataFilter",
133
- label: "数据加工",
134
- description: "如果后端没有直接返回 ReactFlow 配置,可以自己写一段函数来包装。\
135
- 签名:(config, ReactFlow, data) => config \
136
- "
137
- },
138
- {
139
- type: "text",
140
- name: "wrapperClassName",
141
- label: "CSS类名"
142
- },
143
- ],
144
- events: [{
145
- eventName: "eventClick",
146
- eventLabel: 'eventClick',
147
- description: 'Click on an event.',
148
- dataSchema: [{
149
- type: "object",
150
- properties: {
151
- "event.data.name": {
152
- type: "string",
153
- title: "name"
154
- },
155
- }
156
- }]
157
- }],
158
- },
159
- } });
160
-
161
- /*
162
- * @Author: baozhoutao@steedos.com
163
- * @Date: 2022-08-31 16:32:35
164
- * @LastEditors: baozhoutao@steedos.com
165
- * @LastEditTime: 2022-09-01 18:46:29
166
- * @Description:
167
- */
168
- var components = [ReactFlow];
169
- var componentList = [
170
- {
171
- title: "华炎魔方",
172
- icon: "",
173
- children: [ReactFlow]
174
- }
175
- ];
176
- var meta = {
177
- componentList: componentList,
178
- components: components
179
- };
180
-
181
- return meta;
182
-
183
- }));
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;
@@ -1,303 +0,0 @@
1
- /* this gets exported as style.css and can be used for the default theming */
2
- /* these are the necessary styles for React Flow, they get used by base.css and style.css */
3
- .react-flow__container {
4
- position: absolute;
5
- width: 100%;
6
- height: 100%;
7
- top: 0;
8
- left: 0;
9
- }
10
- .react-flow__pane {
11
- z-index: 1;
12
- cursor: -webkit-grab;
13
- cursor: grab;
14
- }
15
- .react-flow__pane.selection {
16
- cursor: pointer;
17
- }
18
- .react-flow__pane.dragging {
19
- cursor: -webkit-grabbing;
20
- cursor: grabbing;
21
- }
22
- .react-flow__viewport {
23
- transform-origin: 0 0;
24
- z-index: 2;
25
- pointer-events: none;
26
- }
27
- .react-flow__renderer {
28
- z-index: 4;
29
- }
30
- .react-flow__selection {
31
- z-index: 6;
32
- }
33
- .react-flow__nodesselection-rect:focus,
34
- .react-flow__nodesselection-rect:focus-visible {
35
- outline: none;
36
- }
37
- .react-flow .react-flow__edges {
38
- pointer-events: none;
39
- overflow: visible;
40
- }
41
- .react-flow__edge-path,
42
- .react-flow__connection-path {
43
- stroke: #b1b1b7;
44
- stroke-width: 1;
45
- fill: none;
46
- }
47
- .react-flow__edge {
48
- pointer-events: visibleStroke;
49
- cursor: pointer;
50
- }
51
- .react-flow__edge.animated path {
52
- stroke-dasharray: 5;
53
- -webkit-animation: dashdraw 0.5s linear infinite;
54
- animation: dashdraw 0.5s linear infinite;
55
- }
56
- .react-flow__edge.animated path.react-flow__edge-interaction {
57
- stroke-dasharray: none;
58
- -webkit-animation: none;
59
- animation: none;
60
- }
61
- .react-flow__edge.inactive {
62
- pointer-events: none;
63
- }
64
- .react-flow__edge.selected,
65
- .react-flow__edge:focus,
66
- .react-flow__edge:focus-visible {
67
- outline: none;
68
- }
69
- .react-flow__edge.selected .react-flow__edge-path,
70
- .react-flow__edge:focus .react-flow__edge-path,
71
- .react-flow__edge:focus-visible .react-flow__edge-path {
72
- stroke: #555;
73
- }
74
- .react-flow__edge-textwrapper {
75
- pointer-events: all;
76
- }
77
- .react-flow__edge-textbg {
78
- fill: white;
79
- }
80
- .react-flow__edge .react-flow__edge-text {
81
- pointer-events: none;
82
- -webkit-user-select: none;
83
- -moz-user-select: none;
84
- user-select: none;
85
- }
86
- .react-flow__connection {
87
- pointer-events: none;
88
- }
89
- .react-flow__connection .animated {
90
- stroke-dasharray: 5;
91
- -webkit-animation: dashdraw 0.5s linear infinite;
92
- animation: dashdraw 0.5s linear infinite;
93
- }
94
- .react-flow__connectionline {
95
- z-index: 1001;
96
- }
97
- .react-flow__nodes {
98
- pointer-events: none;
99
- transform-origin: 0 0;
100
- }
101
- .react-flow__node {
102
- position: absolute;
103
- -webkit-user-select: none;
104
- -moz-user-select: none;
105
- user-select: none;
106
- pointer-events: all;
107
- transform-origin: 0 0;
108
- box-sizing: border-box;
109
- cursor: -webkit-grab;
110
- cursor: grab;
111
- }
112
- .react-flow__node.dragging {
113
- cursor: -webkit-grabbing;
114
- cursor: grabbing;
115
- }
116
- .react-flow__nodesselection {
117
- z-index: 3;
118
- transform-origin: left top;
119
- pointer-events: none;
120
- }
121
- .react-flow__nodesselection-rect {
122
- position: absolute;
123
- pointer-events: all;
124
- cursor: -webkit-grab;
125
- cursor: grab;
126
- }
127
- .react-flow__handle {
128
- position: absolute;
129
- pointer-events: none;
130
- min-width: 5px;
131
- min-height: 5px;
132
- width: 6px;
133
- height: 6px;
134
- background: #1a192b;
135
- border: 1px solid white;
136
- border-radius: 100%;
137
- }
138
- .react-flow__handle.connectable {
139
- pointer-events: all;
140
- cursor: crosshair;
141
- }
142
- .react-flow__handle-bottom {
143
- top: auto;
144
- left: 50%;
145
- bottom: -4px;
146
- transform: translate(-50%, 0);
147
- }
148
- .react-flow__handle-top {
149
- left: 50%;
150
- top: -4px;
151
- transform: translate(-50%, 0);
152
- }
153
- .react-flow__handle-left {
154
- top: 50%;
155
- left: -4px;
156
- transform: translate(0, -50%);
157
- }
158
- .react-flow__handle-right {
159
- right: -4px;
160
- top: 50%;
161
- transform: translate(0, -50%);
162
- }
163
- .react-flow__edgeupdater {
164
- cursor: move;
165
- pointer-events: all;
166
- }
167
- .react-flow__panel {
168
- position: absolute;
169
- z-index: 5;
170
- margin: 15px;
171
- }
172
- .react-flow__panel.top {
173
- top: 0;
174
- }
175
- .react-flow__panel.bottom {
176
- bottom: 0;
177
- }
178
- .react-flow__panel.left {
179
- left: 0;
180
- }
181
- .react-flow__panel.right {
182
- right: 0;
183
- }
184
- .react-flow__panel.center {
185
- left: 50%;
186
- transform: translateX(-50%);
187
- }
188
- .react-flow__attribution {
189
- font-size: 10px;
190
- background: rgba(255, 255, 255, 0.5);
191
- padding: 2px 3px;
192
- margin: 0;
193
- }
194
- .react-flow__attribution a {
195
- text-decoration: none;
196
- color: #999;
197
- }
198
- @-webkit-keyframes dashdraw {
199
- from {
200
- stroke-dashoffset: 10;
201
- }
202
- }
203
- @keyframes dashdraw {
204
- from {
205
- stroke-dashoffset: 10;
206
- }
207
- }
208
- .react-flow__edgelabel-renderer {
209
- position: absolute;
210
- width: 100%;
211
- height: 100%;
212
- pointer-events: none;
213
- -webkit-user-select: none;
214
- -moz-user-select: none;
215
- user-select: none;
216
- }
217
- .react-flow__edge.updating .react-flow__edge-path {
218
- stroke: #777;
219
- }
220
- .react-flow__edge-text {
221
- font-size: 10px;
222
- }
223
- .react-flow__node.selectable:focus,
224
- .react-flow__node.selectable:focus-visible {
225
- outline: none;
226
- }
227
- .react-flow__node-default,
228
- .react-flow__node-input,
229
- .react-flow__node-output,
230
- .react-flow__node-group {
231
- padding: 10px;
232
- border-radius: 3px;
233
- width: 150px;
234
- font-size: 12px;
235
- color: #222;
236
- text-align: center;
237
- border-width: 1px;
238
- border-style: solid;
239
- border-color: #1a192b;
240
- background-color: white;
241
- }
242
- .react-flow__node-default.selectable:hover, .react-flow__node-input.selectable:hover, .react-flow__node-output.selectable:hover, .react-flow__node-group.selectable:hover {
243
- box-shadow: 0 1px 4px 1px rgba(0, 0, 0, 0.08);
244
- }
245
- .react-flow__node-default.selectable.selected,
246
- .react-flow__node-default.selectable:focus,
247
- .react-flow__node-default.selectable:focus-visible,
248
- .react-flow__node-input.selectable.selected,
249
- .react-flow__node-input.selectable:focus,
250
- .react-flow__node-input.selectable:focus-visible,
251
- .react-flow__node-output.selectable.selected,
252
- .react-flow__node-output.selectable:focus,
253
- .react-flow__node-output.selectable:focus-visible,
254
- .react-flow__node-group.selectable.selected,
255
- .react-flow__node-group.selectable:focus,
256
- .react-flow__node-group.selectable:focus-visible {
257
- box-shadow: 0 0 0 0.5px #1a192b;
258
- }
259
- .react-flow__node-group {
260
- background-color: rgba(240, 240, 240, 0.25);
261
- }
262
- .react-flow__nodesselection-rect,
263
- .react-flow__selection {
264
- background: rgba(0, 89, 220, 0.08);
265
- border: 1px dotted rgba(0, 89, 220, 0.8);
266
- }
267
- .react-flow__nodesselection-rect:focus,
268
- .react-flow__nodesselection-rect:focus-visible,
269
- .react-flow__selection:focus,
270
- .react-flow__selection:focus-visible {
271
- outline: none;
272
- }
273
- .react-flow__controls {
274
- box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.08);
275
- }
276
- .react-flow__controls-button {
277
- border: none;
278
- background: #fefefe;
279
- border-bottom: 1px solid #eee;
280
- box-sizing: content-box;
281
- display: flex;
282
- justify-content: center;
283
- align-items: center;
284
- width: 16px;
285
- height: 16px;
286
- cursor: pointer;
287
- -webkit-user-select: none;
288
- -moz-user-select: none;
289
- user-select: none;
290
- padding: 5px;
291
- }
292
- .react-flow__controls-button:hover {
293
- background: #f4f4f4;
294
- }
295
- .react-flow__controls-button svg {
296
- width: 100%;
297
- max-width: 12px;
298
- max-height: 12px;
299
- }
300
- .react-flow__minimap {
301
- background-color: #fff;
302
- }
303
-