@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.
Files changed (128) hide show
  1. package/README.md +23 -0
  2. package/dist/cjs/ag-grid-plus/ag-gridPlus.d.ts +5 -0
  3. package/dist/cjs/ag-grid-plus/ag-gridPlus.js +191 -0
  4. package/dist/cjs/ag-grid-plus/global.scss +65 -0
  5. package/dist/cjs/ag-grid-plus/gridManager/index.d.ts +8 -0
  6. package/dist/cjs/ag-grid-plus/gridManager/index.js +51 -0
  7. package/dist/cjs/ag-grid-plus/index.d.ts +3 -0
  8. package/dist/cjs/ag-grid-plus/index.js +23 -0
  9. package/dist/cjs/ag-grid-plus/interface.d.ts +25 -0
  10. package/dist/cjs/ag-grid-plus/interface.js +17 -0
  11. package/dist/cjs/ag-grid-plus/queryForm/index.d.ts +10 -0
  12. package/dist/cjs/ag-grid-plus/queryForm/index.js +210 -0
  13. package/dist/cjs/ag-grid-plus/queryForm/index.less +48 -0
  14. package/dist/cjs/ag-grid-plus/queryForm/queryForm.d.ts +3 -0
  15. package/dist/cjs/ag-grid-plus/queryForm/queryForm.js +110 -0
  16. package/dist/cjs/array-table/index.d.ts +10 -0
  17. package/dist/cjs/array-table/index.js +205 -0
  18. package/dist/cjs/dashboard/dashboard/components/index.d.ts +2 -0
  19. package/dist/cjs/dashboard/dashboard/components/index.js +15 -0
  20. package/dist/cjs/dashboard/dashboard/components/modal/index.d.ts +3 -0
  21. package/dist/cjs/dashboard/dashboard/components/modal/index.js +26 -0
  22. package/dist/cjs/dashboard/dashboard/components/toolbar/index.d.ts +11 -0
  23. package/dist/cjs/dashboard/dashboard/components/toolbar/index.js +37 -0
  24. package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.d.ts +1 -0
  25. package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.js +3 -0
  26. package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.less +49 -0
  27. package/dist/cjs/dashboard/dashboard/index.d.ts +62 -0
  28. package/dist/cjs/dashboard/dashboard/index.js +603 -0
  29. package/dist/cjs/dashboard/dashboard/index.less +173 -0
  30. package/dist/cjs/dashboard/dashboard/service.d.ts +8 -0
  31. package/dist/cjs/dashboard/dashboard/service.js +114 -0
  32. package/dist/cjs/dashboard/dashboard/utils.d.ts +9 -0
  33. package/dist/cjs/dashboard/dashboard/utils.js +126 -0
  34. package/dist/cjs/dashboard/index.d.ts +3 -0
  35. package/dist/cjs/dashboard/index.js +30 -0
  36. package/dist/cjs/dashboard/utils.d.ts +24 -0
  37. package/dist/cjs/dashboard/utils.js +162 -0
  38. package/dist/cjs/dashboard/widget/index.d.ts +13 -0
  39. package/dist/cjs/dashboard/widget/index.js +79 -0
  40. package/dist/cjs/dashboard/widget/index.less +7 -0
  41. package/dist/cjs/dashboard/widget/selector/index.d.ts +4 -0
  42. package/dist/cjs/dashboard/widget/selector/index.js +271 -0
  43. package/dist/cjs/dashboard/widget/selector/index.less +434 -0
  44. package/dist/cjs/dashboard/widget/utils.d.ts +4 -0
  45. package/dist/cjs/dashboard/widget/utils.js +116 -0
  46. package/dist/cjs/elsaFlow/config-graph.d.ts +1 -0
  47. package/dist/cjs/elsaFlow/config-graph.js +57 -0
  48. package/dist/cjs/elsaFlow/index.d.ts +6 -0
  49. package/dist/cjs/elsaFlow/index.js +199 -0
  50. package/dist/cjs/elsaFlow/react-edge/edge1.d.ts +4 -0
  51. package/dist/cjs/elsaFlow/react-edge/edge1.js +31 -0
  52. package/dist/cjs/elsaFlow/react-edge/edge1.less +0 -0
  53. package/dist/cjs/elsaFlow/react-edge/edge2.d.ts +4 -0
  54. package/dist/cjs/elsaFlow/react-edge/edge2.js +31 -0
  55. package/dist/cjs/elsaFlow/react-edge/edge2.less +0 -0
  56. package/dist/cjs/elsaFlow/react-node/node1.d.ts +4 -0
  57. package/dist/cjs/elsaFlow/react-node/node1.js +28 -0
  58. package/dist/cjs/elsaFlow/react-node/node1.less +11 -0
  59. package/dist/cjs/elsaFlow/react-node/node2.d.ts +4 -0
  60. package/dist/cjs/elsaFlow/react-node/node2.js +28 -0
  61. package/dist/cjs/elsaFlow/react-node/node2.less +11 -0
  62. package/dist/cjs/index.d.ts +4 -0
  63. package/dist/cjs/index.js +37 -0
  64. package/dist/esm/ag-grid-plus/ag-gridPlus.d.ts +5 -0
  65. package/dist/esm/ag-grid-plus/ag-gridPlus.js +169 -0
  66. package/dist/esm/ag-grid-plus/global.scss +65 -0
  67. package/dist/esm/ag-grid-plus/gridManager/index.d.ts +8 -0
  68. package/dist/esm/ag-grid-plus/gridManager/index.js +44 -0
  69. package/dist/esm/ag-grid-plus/index.d.ts +3 -0
  70. package/dist/esm/ag-grid-plus/index.js +3 -0
  71. package/dist/esm/ag-grid-plus/interface.d.ts +25 -0
  72. package/dist/esm/ag-grid-plus/interface.js +9 -0
  73. package/dist/esm/ag-grid-plus/queryForm/index.d.ts +10 -0
  74. package/dist/esm/ag-grid-plus/queryForm/index.js +189 -0
  75. package/dist/esm/ag-grid-plus/queryForm/index.less +48 -0
  76. package/dist/esm/ag-grid-plus/queryForm/queryForm.d.ts +3 -0
  77. package/dist/esm/ag-grid-plus/queryForm/queryForm.js +92 -0
  78. package/dist/esm/array-table/index.d.ts +10 -0
  79. package/dist/esm/array-table/index.js +179 -0
  80. package/dist/esm/dashboard/dashboard/components/index.d.ts +2 -0
  81. package/dist/esm/dashboard/dashboard/components/index.js +2 -0
  82. package/dist/esm/dashboard/dashboard/components/modal/index.d.ts +3 -0
  83. package/dist/esm/dashboard/dashboard/components/modal/index.js +17 -0
  84. package/dist/esm/dashboard/dashboard/components/toolbar/index.d.ts +11 -0
  85. package/dist/esm/dashboard/dashboard/components/toolbar/index.js +24 -0
  86. package/dist/esm/dashboard/dashboard/components/toolbar/style/index.d.ts +1 -0
  87. package/dist/esm/dashboard/dashboard/components/toolbar/style/index.js +1 -0
  88. package/dist/esm/dashboard/dashboard/components/toolbar/style/index.less +49 -0
  89. package/dist/esm/dashboard/dashboard/index.d.ts +62 -0
  90. package/dist/esm/dashboard/dashboard/index.js +571 -0
  91. package/dist/esm/dashboard/dashboard/index.less +173 -0
  92. package/dist/esm/dashboard/dashboard/service.d.ts +8 -0
  93. package/dist/esm/dashboard/dashboard/service.js +102 -0
  94. package/dist/esm/dashboard/dashboard/utils.d.ts +9 -0
  95. package/dist/esm/dashboard/dashboard/utils.js +106 -0
  96. package/dist/esm/dashboard/index.d.ts +3 -0
  97. package/dist/esm/dashboard/index.js +3 -0
  98. package/dist/esm/dashboard/utils.d.ts +24 -0
  99. package/dist/esm/dashboard/utils.js +142 -0
  100. package/dist/esm/dashboard/widget/index.d.ts +13 -0
  101. package/dist/esm/dashboard/widget/index.js +59 -0
  102. package/dist/esm/dashboard/widget/index.less +7 -0
  103. package/dist/esm/dashboard/widget/selector/index.d.ts +4 -0
  104. package/dist/esm/dashboard/widget/selector/index.js +249 -0
  105. package/dist/esm/dashboard/widget/selector/index.less +434 -0
  106. package/dist/esm/dashboard/widget/utils.d.ts +4 -0
  107. package/dist/esm/dashboard/widget/utils.js +88 -0
  108. package/dist/esm/elsaFlow/config-graph.d.ts +1 -0
  109. package/dist/esm/elsaFlow/config-graph.js +42 -0
  110. package/dist/esm/elsaFlow/index.d.ts +6 -0
  111. package/dist/esm/elsaFlow/index.js +189 -0
  112. package/dist/esm/elsaFlow/react-edge/edge1.d.ts +4 -0
  113. package/dist/esm/elsaFlow/react-edge/edge1.js +18 -0
  114. package/dist/esm/elsaFlow/react-edge/edge1.less +0 -0
  115. package/dist/esm/elsaFlow/react-edge/edge2.d.ts +4 -0
  116. package/dist/esm/elsaFlow/react-edge/edge2.js +18 -0
  117. package/dist/esm/elsaFlow/react-edge/edge2.less +0 -0
  118. package/dist/esm/elsaFlow/react-node/node1.d.ts +4 -0
  119. package/dist/esm/elsaFlow/react-node/node1.js +16 -0
  120. package/dist/esm/elsaFlow/react-node/node1.less +11 -0
  121. package/dist/esm/elsaFlow/react-node/node2.d.ts +4 -0
  122. package/dist/esm/elsaFlow/react-node/node2.js +16 -0
  123. package/dist/esm/elsaFlow/react-node/node2.less +11 -0
  124. package/dist/esm/index.d.ts +4 -0
  125. package/dist/esm/index.js +5 -0
  126. package/dist/umd/qc-ui.min.css +1 -0
  127. package/dist/umd/qc-ui.min.js +1 -0
  128. package/package.json +61 -0
@@ -0,0 +1,189 @@
1
+ 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); }
2
+
3
+ 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; }
4
+
5
+ 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); } }
6
+
7
+ 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); }); }; }
8
+
9
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
10
+
11
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
+
13
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
14
+
15
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
16
+
17
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
18
+
19
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
+
21
+ import React, { useState } from 'react';
22
+ /** 图核心组件 & 类型定义 */
23
+
24
+ import { FlowchartExtension, FlowchartFormPanel } from '@antv/xflow';
25
+ import { XFlow, XFlowCanvas } from '@antv/xflow';
26
+ /** 图的各种扩展交互组件 */
27
+
28
+ import { CanvasScaleToolbar, CanvasSnapline } from '@antv/xflow';
29
+ /** 图的配置项 */
30
+
31
+ import { useGraphConfig } from "./config-graph";
32
+ import { message } from 'antd';
33
+ import '@antv/xflow/dist/index.css';
34
+
35
+ var ElsaFlow = function ElsaFlow() {
36
+ /** 画布配置 */
37
+ var graphConfig = useGraphConfig();
38
+ /** 画布渲染数据 */
39
+
40
+ var _useState = useState(),
41
+ _useState2 = _slicedToArray(_useState, 2),
42
+ graphData = _useState2[0],
43
+ setGraphData = _useState2[1];
44
+ /** XFlow初始化完成的回调 */
45
+
46
+
47
+ var onLoad = /*#__PURE__*/function () {
48
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(app) {
49
+ var nodes, edges, newGraphData, graph;
50
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
51
+ while (1) {
52
+ switch (_context.prev = _context.next) {
53
+ case 0:
54
+ nodes = [{
55
+ id: 'root1',
56
+ width: 150,
57
+ height: 40,
58
+ renderKey: 'NODE1',
59
+ info: {
60
+ text: 'root1'
61
+ }
62
+ }, {
63
+ id: 'down1',
64
+ width: 150,
65
+ height: 40,
66
+ renderKey: 'NODE2',
67
+ info: {
68
+ text: 'down1'
69
+ }
70
+ }, {
71
+ id: 'down2',
72
+ width: 150,
73
+ height: 40,
74
+ renderKey: 'NODE2',
75
+ info: {
76
+ text: 'down2'
77
+ }
78
+ }, {
79
+ id: 'down3',
80
+ width: 150,
81
+ height: 40,
82
+ renderKey: 'NODE2',
83
+ info: {
84
+ text: 'down3'
85
+ }
86
+ }];
87
+ edges = [{
88
+ id: 'root1-down1',
89
+ source: 'root1',
90
+ target: 'down1',
91
+ renderKey: 'EDGE1',
92
+ edgeContentWidth: 60,
93
+ edgeContentHeight: 30,
94
+ info: {
95
+ line: 'root1-down1'
96
+ }
97
+ }, {
98
+ id: 'root1-down2',
99
+ source: 'root1',
100
+ target: 'down2',
101
+ renderKey: 'EDGE2',
102
+ edgeContentWidth: 60,
103
+ edgeContentHeight: 30,
104
+ info: {
105
+ line: 'root1-down2'
106
+ }
107
+ }, {
108
+ id: 'root1-down3',
109
+ source: 'root1',
110
+ target: 'down3',
111
+ label: '1:N(纯文本)',
112
+ info: {
113
+ line: 'root1-down3'
114
+ }
115
+ }];
116
+ newGraphData = {
117
+ nodes: nodes,
118
+ edges: edges
119
+ };
120
+ setGraphData(newGraphData);
121
+ _context.next = 6;
122
+ return app.getGraphInstance();
123
+
124
+ case 6:
125
+ graph = _context.sent;
126
+ graph.on('node:click', function (_ref2) {
127
+ var node = _ref2.node;
128
+ var nodeData = node.getData();
129
+ message.success("".concat(nodeData.id, "\u8282\u70B9\u88AB\u70B9\u51FB\u4E86"));
130
+ });
131
+ graph.on('edge:click', function (_ref3) {
132
+ var edge = _ref3.edge;
133
+ edge.toFront();
134
+ var edgeData = edge.getData();
135
+ message.success("".concat(edgeData.id, "\u8FDE\u7EBF\u88AB\u70B9\u51FB\u4E86"));
136
+ });
137
+
138
+ case 9:
139
+ case "end":
140
+ return _context.stop();
141
+ }
142
+ }
143
+ }, _callee);
144
+ }));
145
+
146
+ return function onLoad(_x) {
147
+ return _ref.apply(this, arguments);
148
+ };
149
+ }();
150
+
151
+ return /*#__PURE__*/React.createElement("div", {
152
+ style: {
153
+ height: 500
154
+ }
155
+ }, /*#__PURE__*/React.createElement(XFlow, {
156
+ className: "xflow-user-container",
157
+ graphData: graphData,
158
+ graphLayout: {
159
+ layoutType: 'dagre',
160
+ layoutOptions: {
161
+ type: 'dagre',
162
+ rankdir: 'TB',
163
+ nodesep: 60,
164
+ ranksep: 40
165
+ }
166
+ },
167
+ onLoad: onLoad,
168
+ isAutoCenter: true
169
+ }, /*#__PURE__*/React.createElement(FlowchartExtension, null), /*#__PURE__*/React.createElement(XFlowCanvas, {
170
+ config: graphConfig
171
+ }, /*#__PURE__*/React.createElement(CanvasScaleToolbar, {
172
+ position: {
173
+ top: 12,
174
+ left: 12
175
+ }
176
+ }), /*#__PURE__*/React.createElement(CanvasSnapline, {
177
+ color: "#1890ff"
178
+ })), /*#__PURE__*/React.createElement(FlowchartFormPanel, {
179
+ show: true,
180
+ position: {
181
+ width: 200,
182
+ top: 40,
183
+ bottom: 0,
184
+ right: 0
185
+ }
186
+ })));
187
+ };
188
+
189
+ export default ElsaFlow;
@@ -0,0 +1,4 @@
1
+ import type { NsGraph } from '@antv/xflow';
2
+ import './edge1.less';
3
+ declare const Edge1: NsGraph.IEdgeRender;
4
+ export default Edge1;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { useAppContext } from '@antv/xflow';
3
+ import { Tooltip } from 'antd';
4
+ import "./edge1.less";
5
+
6
+ var Edge1 = function Edge1(props) {
7
+ var ctx = useAppContext(); // console.log('edge useAppContext', ctx);
8
+ // console.log('edge props:', props);
9
+
10
+ return /*#__PURE__*/React.createElement("div", {
11
+ className: "edge1-container"
12
+ }, /*#__PURE__*/React.createElement(Tooltip, {
13
+ title: "\u8FD9\u662F\u8FDE\u7EBF\u4E0A\u6E32\u67D3\u7684React\u5185\u5BB9" // defaultVisible={true}
14
+
15
+ }, /*#__PURE__*/React.createElement("div", null, "hover\u6211")));
16
+ };
17
+
18
+ export default Edge1;
File without changes
@@ -0,0 +1,4 @@
1
+ import type { NsGraph } from '@antv/xflow';
2
+ import './edge1.less';
3
+ declare const Edge1: NsGraph.IEdgeRender;
4
+ export default Edge1;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { useAppContext } from '@antv/xflow';
3
+ import { Tooltip } from 'antd';
4
+ import "./edge1.less";
5
+
6
+ var Edge1 = function Edge1(props) {
7
+ var ctx = useAppContext(); // console.log('edge useAppContext', ctx);
8
+ // console.log('edge props:', props);
9
+
10
+ return /*#__PURE__*/React.createElement("div", {
11
+ className: "edge1-container"
12
+ }, /*#__PURE__*/React.createElement(Tooltip, {
13
+ title: "\u8FD9\u662F\u8FDE\u7EBF\u4E0A\u6E32\u67D3\u7684React\u5185\u5BB9" // defaultVisible={true}
14
+
15
+ }, /*#__PURE__*/React.createElement("div", null, "hover\u6211")));
16
+ };
17
+
18
+ export default Edge1;
File without changes
@@ -0,0 +1,4 @@
1
+ import { NsGraph } from '@antv/xflow';
2
+ import './node1.less';
3
+ declare const Node1: NsGraph.INodeRender;
4
+ export default Node1;
@@ -0,0 +1,16 @@
1
+ import { useAppContext } from '@antv/xflow';
2
+ import React from 'react';
3
+ import "./node1.less";
4
+
5
+ var Node1 = function Node1(props) {
6
+ /**
7
+ * 1. 节点的数据、位置信息通过props取
8
+ * 2. 当节点被触发更新时, props返回的数据也会动态更新, 触发节点重新渲染
9
+ */
10
+ var ctx = useAppContext();
11
+ return /*#__PURE__*/React.createElement("div", {
12
+ className: "node1-container"
13
+ }, /*#__PURE__*/React.createElement("div", null, 'React节点1'));
14
+ };
15
+
16
+ export default Node1;
@@ -0,0 +1,11 @@
1
+ .node1-container {
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ width: 100%;
6
+ height: 100%;
7
+ font-weight: 600;
8
+ background-color: #fff;
9
+ border: 1px solid #873bf4;
10
+ border-radius: 4px;
11
+ }
@@ -0,0 +1,4 @@
1
+ import { NsGraph } from '@antv/xflow';
2
+ import './node1.less';
3
+ declare const Node1: NsGraph.INodeRender;
4
+ export default Node1;
@@ -0,0 +1,16 @@
1
+ import { useAppContext } from '@antv/xflow';
2
+ import React from 'react';
3
+ import "./node1.less";
4
+
5
+ var Node1 = function Node1(props) {
6
+ /**
7
+ * 1. 节点的数据、位置信息通过props取
8
+ * 2. 当节点被触发更新时, props返回的数据也会动态更新, 触发节点重新渲染
9
+ */
10
+ var ctx = useAppContext();
11
+ return /*#__PURE__*/React.createElement("div", {
12
+ className: "node1-container"
13
+ }, /*#__PURE__*/React.createElement("div", null, 'React节点1'));
14
+ };
15
+
16
+ export default Node1;
@@ -0,0 +1,11 @@
1
+ .node2-container {
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ width: 100%;
6
+ height: 100%;
7
+ font-weight: 600;
8
+ background-color: #fff;
9
+ border: 1px solid #dd4a68;
10
+ border-radius: 4px;
11
+ }
@@ -0,0 +1,4 @@
1
+ import ArrayTable from "./array-table";
2
+ import { AgGridColumn, AgGridPlus } from "./ag-grid-plus";
3
+ import Dashboard from "./dashboard";
4
+ export { ArrayTable, AgGridColumn, AgGridPlus, Dashboard };
@@ -0,0 +1,5 @@
1
+ // import ElsaFlow from "./elsaFlow"
2
+ import ArrayTable from "./array-table";
3
+ import { AgGridColumn, AgGridPlus } from "./ag-grid-plus";
4
+ import Dashboard from "./dashboard";
5
+ export { ArrayTable, AgGridColumn, AgGridPlus, Dashboard };