@nokecy/qc-ui 0.0.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/README.md +23 -0
- package/dist/cjs/ag-grid-plus/ag-gridPlus.d.ts +5 -0
- package/dist/cjs/ag-grid-plus/ag-gridPlus.js +191 -0
- package/dist/cjs/ag-grid-plus/global.scss +65 -0
- package/dist/cjs/ag-grid-plus/gridManager/index.d.ts +8 -0
- package/dist/cjs/ag-grid-plus/gridManager/index.js +51 -0
- package/dist/cjs/ag-grid-plus/index.d.ts +3 -0
- package/dist/cjs/ag-grid-plus/index.js +23 -0
- package/dist/cjs/ag-grid-plus/interface.d.ts +25 -0
- package/dist/cjs/ag-grid-plus/interface.js +17 -0
- package/dist/cjs/ag-grid-plus/queryForm/index.d.ts +10 -0
- package/dist/cjs/ag-grid-plus/queryForm/index.js +210 -0
- package/dist/cjs/ag-grid-plus/queryForm/index.less +48 -0
- package/dist/cjs/ag-grid-plus/queryForm/queryForm.d.ts +3 -0
- package/dist/cjs/ag-grid-plus/queryForm/queryForm.js +110 -0
- package/dist/cjs/array-table/index.d.ts +10 -0
- package/dist/cjs/array-table/index.js +205 -0
- package/dist/cjs/dashboard/dashboard/components/index.d.ts +2 -0
- package/dist/cjs/dashboard/dashboard/components/index.js +15 -0
- package/dist/cjs/dashboard/dashboard/components/modal/index.d.ts +3 -0
- package/dist/cjs/dashboard/dashboard/components/modal/index.js +26 -0
- package/dist/cjs/dashboard/dashboard/components/toolbar/index.d.ts +11 -0
- package/dist/cjs/dashboard/dashboard/components/toolbar/index.js +37 -0
- package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.d.ts +1 -0
- package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.js +3 -0
- package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.less +49 -0
- package/dist/cjs/dashboard/dashboard/index.d.ts +62 -0
- package/dist/cjs/dashboard/dashboard/index.js +603 -0
- package/dist/cjs/dashboard/dashboard/index.less +173 -0
- package/dist/cjs/dashboard/dashboard/service.d.ts +8 -0
- package/dist/cjs/dashboard/dashboard/service.js +114 -0
- package/dist/cjs/dashboard/dashboard/utils.d.ts +9 -0
- package/dist/cjs/dashboard/dashboard/utils.js +126 -0
- package/dist/cjs/dashboard/index.d.ts +3 -0
- package/dist/cjs/dashboard/index.js +30 -0
- package/dist/cjs/dashboard/utils.d.ts +24 -0
- package/dist/cjs/dashboard/utils.js +162 -0
- package/dist/cjs/dashboard/widget/index.d.ts +13 -0
- package/dist/cjs/dashboard/widget/index.js +79 -0
- package/dist/cjs/dashboard/widget/index.less +7 -0
- package/dist/cjs/dashboard/widget/selector/index.d.ts +4 -0
- package/dist/cjs/dashboard/widget/selector/index.js +271 -0
- package/dist/cjs/dashboard/widget/selector/index.less +434 -0
- package/dist/cjs/dashboard/widget/utils.d.ts +4 -0
- package/dist/cjs/dashboard/widget/utils.js +116 -0
- package/dist/cjs/elsaFlow/config-graph.d.ts +1 -0
- package/dist/cjs/elsaFlow/config-graph.js +57 -0
- package/dist/cjs/elsaFlow/index.d.ts +6 -0
- package/dist/cjs/elsaFlow/index.js +199 -0
- package/dist/cjs/elsaFlow/react-edge/edge1.d.ts +4 -0
- package/dist/cjs/elsaFlow/react-edge/edge1.js +31 -0
- package/dist/cjs/elsaFlow/react-edge/edge1.less +0 -0
- package/dist/cjs/elsaFlow/react-edge/edge2.d.ts +4 -0
- package/dist/cjs/elsaFlow/react-edge/edge2.js +31 -0
- package/dist/cjs/elsaFlow/react-edge/edge2.less +0 -0
- package/dist/cjs/elsaFlow/react-node/node1.d.ts +4 -0
- package/dist/cjs/elsaFlow/react-node/node1.js +28 -0
- package/dist/cjs/elsaFlow/react-node/node1.less +11 -0
- package/dist/cjs/elsaFlow/react-node/node2.d.ts +4 -0
- package/dist/cjs/elsaFlow/react-node/node2.js +28 -0
- package/dist/cjs/elsaFlow/react-node/node2.less +11 -0
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/index.js +37 -0
- package/dist/esm/ag-grid-plus/ag-gridPlus.d.ts +5 -0
- package/dist/esm/ag-grid-plus/ag-gridPlus.js +169 -0
- package/dist/esm/ag-grid-plus/global.scss +65 -0
- package/dist/esm/ag-grid-plus/gridManager/index.d.ts +8 -0
- package/dist/esm/ag-grid-plus/gridManager/index.js +44 -0
- package/dist/esm/ag-grid-plus/index.d.ts +3 -0
- package/dist/esm/ag-grid-plus/index.js +3 -0
- package/dist/esm/ag-grid-plus/interface.d.ts +25 -0
- package/dist/esm/ag-grid-plus/interface.js +9 -0
- package/dist/esm/ag-grid-plus/queryForm/index.d.ts +10 -0
- package/dist/esm/ag-grid-plus/queryForm/index.js +189 -0
- package/dist/esm/ag-grid-plus/queryForm/index.less +48 -0
- package/dist/esm/ag-grid-plus/queryForm/queryForm.d.ts +3 -0
- package/dist/esm/ag-grid-plus/queryForm/queryForm.js +92 -0
- package/dist/esm/array-table/index.d.ts +10 -0
- package/dist/esm/array-table/index.js +179 -0
- package/dist/esm/dashboard/dashboard/components/index.d.ts +2 -0
- package/dist/esm/dashboard/dashboard/components/index.js +2 -0
- package/dist/esm/dashboard/dashboard/components/modal/index.d.ts +3 -0
- package/dist/esm/dashboard/dashboard/components/modal/index.js +17 -0
- package/dist/esm/dashboard/dashboard/components/toolbar/index.d.ts +11 -0
- package/dist/esm/dashboard/dashboard/components/toolbar/index.js +24 -0
- package/dist/esm/dashboard/dashboard/components/toolbar/style/index.d.ts +1 -0
- package/dist/esm/dashboard/dashboard/components/toolbar/style/index.js +1 -0
- package/dist/esm/dashboard/dashboard/components/toolbar/style/index.less +49 -0
- package/dist/esm/dashboard/dashboard/index.d.ts +62 -0
- package/dist/esm/dashboard/dashboard/index.js +571 -0
- package/dist/esm/dashboard/dashboard/index.less +173 -0
- package/dist/esm/dashboard/dashboard/service.d.ts +8 -0
- package/dist/esm/dashboard/dashboard/service.js +102 -0
- package/dist/esm/dashboard/dashboard/utils.d.ts +9 -0
- package/dist/esm/dashboard/dashboard/utils.js +106 -0
- package/dist/esm/dashboard/index.d.ts +3 -0
- package/dist/esm/dashboard/index.js +3 -0
- package/dist/esm/dashboard/utils.d.ts +24 -0
- package/dist/esm/dashboard/utils.js +142 -0
- package/dist/esm/dashboard/widget/index.d.ts +13 -0
- package/dist/esm/dashboard/widget/index.js +59 -0
- package/dist/esm/dashboard/widget/index.less +7 -0
- package/dist/esm/dashboard/widget/selector/index.d.ts +4 -0
- package/dist/esm/dashboard/widget/selector/index.js +249 -0
- package/dist/esm/dashboard/widget/selector/index.less +434 -0
- package/dist/esm/dashboard/widget/utils.d.ts +4 -0
- package/dist/esm/dashboard/widget/utils.js +88 -0
- package/dist/esm/elsaFlow/config-graph.d.ts +1 -0
- package/dist/esm/elsaFlow/config-graph.js +42 -0
- package/dist/esm/elsaFlow/index.d.ts +6 -0
- package/dist/esm/elsaFlow/index.js +189 -0
- package/dist/esm/elsaFlow/react-edge/edge1.d.ts +4 -0
- package/dist/esm/elsaFlow/react-edge/edge1.js +18 -0
- package/dist/esm/elsaFlow/react-edge/edge1.less +0 -0
- package/dist/esm/elsaFlow/react-edge/edge2.d.ts +4 -0
- package/dist/esm/elsaFlow/react-edge/edge2.js +18 -0
- package/dist/esm/elsaFlow/react-edge/edge2.less +0 -0
- package/dist/esm/elsaFlow/react-node/node1.d.ts +4 -0
- package/dist/esm/elsaFlow/react-node/node1.js +16 -0
- package/dist/esm/elsaFlow/react-node/node1.less +11 -0
- package/dist/esm/elsaFlow/react-node/node2.d.ts +4 -0
- package/dist/esm/elsaFlow/react-node/node2.js +16 -0
- package/dist/esm/elsaFlow/react-node/node2.less +11 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +5 -0
- package/dist/umd/qc-ui.min.css +1 -0
- package/dist/umd/qc-ui.min.js +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
@import '~react-grid-layout/css/styles.css';
|
|
2
|
+
|
|
3
|
+
.react-resizable {
|
|
4
|
+
|
|
5
|
+
position: relative;
|
|
6
|
+
}
|
|
7
|
+
.react-resizable-handle {
|
|
8
|
+
position: absolute;
|
|
9
|
+
width: 20px;
|
|
10
|
+
height: 20px;
|
|
11
|
+
background-repeat: no-repeat;
|
|
12
|
+
background-origin: content-box;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+');
|
|
15
|
+
background-position: bottom right;
|
|
16
|
+
padding: 0 3px 3px 0;
|
|
17
|
+
display:none;
|
|
18
|
+
}
|
|
19
|
+
.react-resizable-handle-sw {
|
|
20
|
+
bottom: 0;
|
|
21
|
+
left: 0;
|
|
22
|
+
cursor: sw-resize;
|
|
23
|
+
transform: rotate(90deg);
|
|
24
|
+
}
|
|
25
|
+
.react-resizable-handle-se {
|
|
26
|
+
bottom: 0;
|
|
27
|
+
right: 0;
|
|
28
|
+
cursor: se-resize;
|
|
29
|
+
}
|
|
30
|
+
.react-resizable-handle-nw {
|
|
31
|
+
top: 0;
|
|
32
|
+
left: 0;
|
|
33
|
+
cursor: nw-resize;
|
|
34
|
+
transform: rotate(180deg);
|
|
35
|
+
}
|
|
36
|
+
.react-resizable-handle-ne {
|
|
37
|
+
top: 0;
|
|
38
|
+
right: 0;
|
|
39
|
+
cursor: ne-resize;
|
|
40
|
+
transform: rotate(270deg);
|
|
41
|
+
}
|
|
42
|
+
.react-resizable-handle-w,
|
|
43
|
+
.react-resizable-handle-e {
|
|
44
|
+
top: 50%;
|
|
45
|
+
margin-top: -10px;
|
|
46
|
+
cursor: ew-resize;
|
|
47
|
+
}
|
|
48
|
+
.react-resizable-handle-w {
|
|
49
|
+
left: 0;
|
|
50
|
+
transform: rotate(135deg);
|
|
51
|
+
}
|
|
52
|
+
.react-resizable-handle-e {
|
|
53
|
+
right: 0;
|
|
54
|
+
transform: rotate(315deg);
|
|
55
|
+
}
|
|
56
|
+
.react-resizable-handle-n,
|
|
57
|
+
.react-resizable-handle-s {
|
|
58
|
+
left: 50%;
|
|
59
|
+
margin-left: -10px;
|
|
60
|
+
cursor: ns-resize;
|
|
61
|
+
}
|
|
62
|
+
.react-resizable-handle-n {
|
|
63
|
+
top: 0;
|
|
64
|
+
transform: rotate(225deg);
|
|
65
|
+
}
|
|
66
|
+
.react-resizable-handle-s {
|
|
67
|
+
bottom: 0;
|
|
68
|
+
transform: rotate(45deg);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:root{
|
|
72
|
+
--primary-color:blue;
|
|
73
|
+
--component-background:#fff;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
.react-grid-item > .react-resizable-handle {
|
|
78
|
+
z-index: 1;
|
|
79
|
+
}
|
|
80
|
+
.react-dashboard-item-edit{
|
|
81
|
+
.react-resizable-handle {
|
|
82
|
+
display:block;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.react-dashboard-full {
|
|
87
|
+
width: 100%;
|
|
88
|
+
height: 100%;
|
|
89
|
+
}
|
|
90
|
+
.react-dashboard-aligncenter {
|
|
91
|
+
display: flex;
|
|
92
|
+
justify-content: center;
|
|
93
|
+
align-items: center;
|
|
94
|
+
}
|
|
95
|
+
//空页面样式
|
|
96
|
+
.react-dashboard-emptyContent {
|
|
97
|
+
// min-height: calc(100vh - 50px - 41px - 50px - 10px - 22px);
|
|
98
|
+
display: flex;
|
|
99
|
+
justify-content: center;
|
|
100
|
+
align-items: center;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
.react-dashboard-item {
|
|
105
|
+
position: relative;
|
|
106
|
+
// overflow: hidden;
|
|
107
|
+
// border:1px solid rgba(128,128,128,0.3);
|
|
108
|
+
.react-dashboard-mask {
|
|
109
|
+
position: absolute;
|
|
110
|
+
top: 0;
|
|
111
|
+
left: 0;
|
|
112
|
+
z-index: 1;
|
|
113
|
+
width: 100%;
|
|
114
|
+
height: 100%;
|
|
115
|
+
background: rgba(0, 0, 0, 0);
|
|
116
|
+
cursor: move;
|
|
117
|
+
transition: all 0.3s;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.react-dashboard-configicon {
|
|
121
|
+
position: absolute;
|
|
122
|
+
top: 0;
|
|
123
|
+
right: 30px;
|
|
124
|
+
z-index: 1;
|
|
125
|
+
display: none;
|
|
126
|
+
width: 30px;
|
|
127
|
+
height: 30px;
|
|
128
|
+
color: #fff;
|
|
129
|
+
font-weight: bold;
|
|
130
|
+
font-size: 16px;
|
|
131
|
+
line-height: 30px;
|
|
132
|
+
text-align: center;
|
|
133
|
+
background: var(--primary-color);
|
|
134
|
+
border-radius: var(--card-border-radius) 0 0 var(--card-border-radius);
|
|
135
|
+
cursor: pointer;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.react-dashboard-deleteicon {
|
|
139
|
+
position: absolute;
|
|
140
|
+
top: 0;
|
|
141
|
+
right: 0;
|
|
142
|
+
z-index: 1;
|
|
143
|
+
display: none;
|
|
144
|
+
width: 30px;
|
|
145
|
+
height: 30px;
|
|
146
|
+
color: #fff;
|
|
147
|
+
font-size: 16px;
|
|
148
|
+
line-height: 30px;
|
|
149
|
+
text-align: center;
|
|
150
|
+
background: #f5222d;
|
|
151
|
+
border-radius: var(--card-border-radius);
|
|
152
|
+
cursor: pointer;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.react-dashboard-configicon + .react-dashboard-deleteicon {
|
|
156
|
+
border-radius: 0 var(--card-border-radius) var(--card-border-radius) 0;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&:hover {
|
|
160
|
+
.react-dashboard-mask {
|
|
161
|
+
background: rgba(0, 0, 0, 0.05);
|
|
162
|
+
transition: all 0.3s;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.react-dashboard-configicon {
|
|
166
|
+
display: block;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.react-dashboard-deleteicon {
|
|
170
|
+
display: block;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface payloadProps {
|
|
2
|
+
id: string;
|
|
3
|
+
data?: object;
|
|
4
|
+
}
|
|
5
|
+
export declare function fetch(payload: payloadProps): Promise<string | null | undefined>;
|
|
6
|
+
export declare function update(payload: payloadProps): Promise<string | null | undefined>;
|
|
7
|
+
export declare function removeWidgetApi(params: any): Promise<string | null>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.fetch = fetch;
|
|
7
|
+
exports.removeWidgetApi = removeWidgetApi;
|
|
8
|
+
exports.update = update;
|
|
9
|
+
|
|
10
|
+
var _utils = require("./utils");
|
|
11
|
+
|
|
12
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
13
|
+
|
|
14
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
15
|
+
|
|
16
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
17
|
+
|
|
18
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
19
|
+
|
|
20
|
+
// 获取仪表板信息
|
|
21
|
+
function fetch(_x) {
|
|
22
|
+
return _fetch.apply(this, arguments);
|
|
23
|
+
} // 修改仪表板信息
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
function _fetch() {
|
|
27
|
+
_fetch = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(payload) {
|
|
28
|
+
var id, url;
|
|
29
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
30
|
+
while (1) {
|
|
31
|
+
switch (_context.prev = _context.next) {
|
|
32
|
+
case 0:
|
|
33
|
+
id = payload.id;
|
|
34
|
+
url = '/accountUserSelf/getUserData';
|
|
35
|
+
|
|
36
|
+
if (id) {
|
|
37
|
+
_context.next = 4;
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return _context.abrupt("return");
|
|
42
|
+
|
|
43
|
+
case 4:
|
|
44
|
+
return _context.abrupt("return", (0, _utils.request)(url, {
|
|
45
|
+
method: 'GET',
|
|
46
|
+
data: {
|
|
47
|
+
dataId: id,
|
|
48
|
+
dataType: 'dashboard'
|
|
49
|
+
}
|
|
50
|
+
}));
|
|
51
|
+
|
|
52
|
+
case 5:
|
|
53
|
+
case "end":
|
|
54
|
+
return _context.stop();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}, _callee);
|
|
58
|
+
}));
|
|
59
|
+
return _fetch.apply(this, arguments);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function update(_x2) {
|
|
63
|
+
return _update.apply(this, arguments);
|
|
64
|
+
} //删除小程序信息
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
function _update() {
|
|
68
|
+
_update = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(payload) {
|
|
69
|
+
var id, data, url;
|
|
70
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
71
|
+
while (1) {
|
|
72
|
+
switch (_context2.prev = _context2.next) {
|
|
73
|
+
case 0:
|
|
74
|
+
id = payload.id, data = payload.data;
|
|
75
|
+
url = '/accountUserSelf/setUserData';
|
|
76
|
+
|
|
77
|
+
if (id) {
|
|
78
|
+
_context2.next = 4;
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return _context2.abrupt("return");
|
|
83
|
+
|
|
84
|
+
case 4:
|
|
85
|
+
return _context2.abrupt("return", (0, _utils.request)(url, {
|
|
86
|
+
method: 'POST',
|
|
87
|
+
data: {
|
|
88
|
+
dataId: id,
|
|
89
|
+
dataType: 'dashboard',
|
|
90
|
+
bigData: JSON.stringify(data)
|
|
91
|
+
}
|
|
92
|
+
}));
|
|
93
|
+
|
|
94
|
+
case 5:
|
|
95
|
+
case "end":
|
|
96
|
+
return _context2.stop();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}, _callee2);
|
|
100
|
+
}));
|
|
101
|
+
return _update.apply(this, arguments);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function removeWidgetApi(params) {
|
|
105
|
+
var widgetKey = params.widgetKey;
|
|
106
|
+
var url = '/accountUserSelf/delUserData';
|
|
107
|
+
return (0, _utils.request)(url, {
|
|
108
|
+
method: 'DELETE',
|
|
109
|
+
data: {
|
|
110
|
+
dataId: widgetKey,
|
|
111
|
+
dataType: 'widget'
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const request: (url: string, options: any) => Promise<string | null>;
|
|
2
|
+
/**
|
|
3
|
+
*复制字符串到系统剪切板
|
|
4
|
+
*
|
|
5
|
+
* @param {*} str
|
|
6
|
+
*/
|
|
7
|
+
export declare const copy: (str: string) => void;
|
|
8
|
+
export declare const formatLayout: (layout: any) => any;
|
|
9
|
+
export declare const calcMinAndMax: (data: any, widgets: any) => any;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.request = exports.formatLayout = exports.copy = exports.calcMinAndMax = void 0;
|
|
9
|
+
|
|
10
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
15
|
+
|
|
16
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
17
|
+
|
|
18
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
19
|
+
|
|
20
|
+
var request = /*#__PURE__*/function () {
|
|
21
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(url, options) {
|
|
22
|
+
var method, _options$data, dataId, dataType, bigData, res;
|
|
23
|
+
|
|
24
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
25
|
+
while (1) {
|
|
26
|
+
switch (_context.prev = _context.next) {
|
|
27
|
+
case 0:
|
|
28
|
+
method = options.method, _options$data = options.data, dataId = _options$data.dataId, dataType = _options$data.dataType, bigData = _options$data.bigData;
|
|
29
|
+
_context.t0 = method;
|
|
30
|
+
_context.next = _context.t0 === 'POST' ? 4 : _context.t0 === 'GET' ? 6 : _context.t0 === 'DELETE' ? 8 : 9;
|
|
31
|
+
break;
|
|
32
|
+
|
|
33
|
+
case 4:
|
|
34
|
+
localStorage.setItem("".concat(dataId, "-").concat(dataType), bigData);
|
|
35
|
+
return _context.abrupt("break", 9);
|
|
36
|
+
|
|
37
|
+
case 6:
|
|
38
|
+
res = localStorage.getItem("".concat(dataId, "-").concat(dataType));
|
|
39
|
+
return _context.abrupt("break", 9);
|
|
40
|
+
|
|
41
|
+
case 8:
|
|
42
|
+
localStorage.removeItem("".concat(dataId, "-").concat(dataType));
|
|
43
|
+
|
|
44
|
+
case 9:
|
|
45
|
+
res = localStorage.getItem("".concat(dataId, "-").concat(dataType));
|
|
46
|
+
return _context.abrupt("return", res);
|
|
47
|
+
|
|
48
|
+
case 11:
|
|
49
|
+
case "end":
|
|
50
|
+
return _context.stop();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}, _callee);
|
|
54
|
+
}));
|
|
55
|
+
|
|
56
|
+
return function request(_x, _x2) {
|
|
57
|
+
return _ref.apply(this, arguments);
|
|
58
|
+
};
|
|
59
|
+
}();
|
|
60
|
+
/**
|
|
61
|
+
*复制字符串到系统剪切板
|
|
62
|
+
*
|
|
63
|
+
* @param {*} str
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
exports.request = request;
|
|
68
|
+
|
|
69
|
+
var copy = function copy(str) {
|
|
70
|
+
var save = function save(e) {
|
|
71
|
+
e.clipboardData.setData('text/plain', str);
|
|
72
|
+
e.preventDefault(); //阻止默认行为
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
document.addEventListener('copy', save);
|
|
76
|
+
document.execCommand('copy');
|
|
77
|
+
setTimeout(function () {
|
|
78
|
+
document.removeEventListener('copy', save);
|
|
79
|
+
}, 1000);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
exports.copy = copy;
|
|
83
|
+
|
|
84
|
+
var formatLayout = function formatLayout(layout) {
|
|
85
|
+
var data = _lodash.default.cloneDeep(layout);
|
|
86
|
+
|
|
87
|
+
data.forEach(function (item) {
|
|
88
|
+
delete item.minW;
|
|
89
|
+
delete item.maxW;
|
|
90
|
+
delete item.minH;
|
|
91
|
+
delete item.maxH;
|
|
92
|
+
delete item.moved;
|
|
93
|
+
delete item.static;
|
|
94
|
+
});
|
|
95
|
+
return data;
|
|
96
|
+
}; //添加最大最小值
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
exports.formatLayout = formatLayout;
|
|
100
|
+
|
|
101
|
+
var calcMinAndMax = function calcMinAndMax(data, widgets) {
|
|
102
|
+
data.map(function (item, index) {
|
|
103
|
+
var key = item.i.split('-')[0];
|
|
104
|
+
|
|
105
|
+
if (!key) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
var _widgets$key = widgets[key],
|
|
110
|
+
_widgets$key$minW = _widgets$key.minW,
|
|
111
|
+
minW = _widgets$key$minW === void 0 ? 1 : _widgets$key$minW,
|
|
112
|
+
_widgets$key$maxW = _widgets$key.maxW,
|
|
113
|
+
maxW = _widgets$key$maxW === void 0 ? 12 : _widgets$key$maxW,
|
|
114
|
+
_widgets$key$minH = _widgets$key.minH,
|
|
115
|
+
minH = _widgets$key$minH === void 0 ? 1 : _widgets$key$minH,
|
|
116
|
+
_widgets$key$maxH = _widgets$key.maxH,
|
|
117
|
+
maxH = _widgets$key$maxH === void 0 ? 100 : _widgets$key$maxH;
|
|
118
|
+
item.minW = minW;
|
|
119
|
+
item.maxW = maxW;
|
|
120
|
+
item.minH = minH;
|
|
121
|
+
item.maxH = maxH;
|
|
122
|
+
});
|
|
123
|
+
return data;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
exports.calcMinAndMax = calcMinAndMax;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
var _exportNames = {};
|
|
9
|
+
exports.default = void 0;
|
|
10
|
+
|
|
11
|
+
var _dashboard = _interopRequireWildcard(require("./dashboard"));
|
|
12
|
+
|
|
13
|
+
Object.keys(_dashboard).forEach(function (key) {
|
|
14
|
+
if (key === "default" || key === "__esModule") return;
|
|
15
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
16
|
+
if (key in exports && exports[key] === _dashboard[key]) return;
|
|
17
|
+
Object.defineProperty(exports, key, {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function get() {
|
|
20
|
+
return _dashboard[key];
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
26
|
+
|
|
27
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
28
|
+
|
|
29
|
+
var _default = _dashboard.default;
|
|
30
|
+
exports.default = _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare function randomNum(minNum: number, maxNum: number): number;
|
|
3
|
+
export declare const getPosition: (random: any, fontSize: number) => {
|
|
4
|
+
fontSize: number;
|
|
5
|
+
top?: undefined;
|
|
6
|
+
left?: undefined;
|
|
7
|
+
} | {
|
|
8
|
+
fontSize: number;
|
|
9
|
+
top: string;
|
|
10
|
+
left: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function generateUuid(len?: number, radix?: number): string;
|
|
13
|
+
interface confirmUtilAsyncProps {
|
|
14
|
+
content: string | ReactNode;
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* 异步确认弹窗,抛出确认或取消布尔值
|
|
19
|
+
*
|
|
20
|
+
* @param {confirmUtilAsyncProps} props
|
|
21
|
+
*/
|
|
22
|
+
export declare const confirmUtilAsync: (props: confirmUtilAsyncProps) => Promise<boolean>;
|
|
23
|
+
export declare function reducer(state: any, action: any): any;
|
|
24
|
+
export {};
|