@lingxiteam/assets 1.0.11-alpha.9 → 1.0.12

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 (127) hide show
  1. package/es/error/errorDisplay/Web/Drawer/Drawer.less +31 -0
  2. package/es/error/errorDisplay/Web/Drawer/index.js +12 -4
  3. package/es/error/errorDisplay/Web/ErrorMsg/index.js +27 -4
  4. package/es/error/errorDisplay/Web/Notification/index.js +22 -11
  5. package/es/theme/bin/cucc/theme.js +275 -0
  6. package/es/theme/bin/cucc/theme.less +272 -0
  7. package/es/theme/bin/cucc/theme.scss +272 -0
  8. package/es/theme/bin/default/theme.js +275 -0
  9. package/es/theme/bin/default/theme.less +272 -0
  10. package/es/theme/bin/default/theme.scss +272 -0
  11. package/es/theme/build.js +42 -0
  12. package/es/theme/src/cucc/index.js +131 -0
  13. package/es/theme/src/default/index.js +131 -0
  14. package/es/theme/utils/colorPaletteMixin.js +59 -0
  15. package/es/theme/utils/px2Num.js +12 -0
  16. package/es/theme/utils/renderColors.js +16 -0
  17. package/lib/IconSvg/index.d.ts +6 -0
  18. package/lib/IconSvg/index.js +30 -0
  19. package/lib/dealDsl/PropType.d.ts +7 -0
  20. package/lib/dealDsl/PropType.js +5 -0
  21. package/lib/dealDsl/events/actionObj.d.ts +3 -0
  22. package/lib/dealDsl/events/actionObj.js +13 -0
  23. package/lib/dealDsl/events/index.d.ts +6 -0
  24. package/lib/dealDsl/events/index.js +21 -0
  25. package/lib/dealDsl/index.d.ts +2 -0
  26. package/lib/dealDsl/index.js +31 -0
  27. package/lib/dealDsl/preprocess/common.d.ts +9 -0
  28. package/lib/dealDsl/preprocess/common.js +277 -0
  29. package/lib/dealDsl/preprocess/editor.d.ts +9 -0
  30. package/lib/dealDsl/preprocess/editor.js +28 -0
  31. package/lib/dealDsl/preprocess/engine.d.ts +9 -0
  32. package/lib/dealDsl/preprocess/engine.js +26 -0
  33. package/lib/dealDsl/preprocessDSL.d.ts +21 -0
  34. package/lib/dealDsl/preprocessDSL.js +88 -0
  35. package/lib/dealDsl/utils/index.d.ts +13 -0
  36. package/lib/dealDsl/utils/index.js +29 -0
  37. package/lib/error/errorCatch/index.js +48 -0
  38. package/lib/error/errorDisplay/Mobile/Drawer/Drawer.js +115 -0
  39. package/lib/error/errorDisplay/Mobile/Drawer/Drawer.less +201 -0
  40. package/lib/error/errorDisplay/Mobile/Drawer/index.js +140 -0
  41. package/lib/error/errorDisplay/Mobile/ErrorMsg/index.js +207 -0
  42. package/lib/error/errorDisplay/Mobile/Modal/Modal.js +53 -0
  43. package/lib/error/errorDisplay/Mobile/Modal/Modal.less +146 -0
  44. package/lib/error/errorDisplay/Mobile/Modal/index.js +127 -0
  45. package/lib/error/errorDisplay/Mobile/defaultGlobalConfig.js +21 -0
  46. package/lib/error/errorDisplay/SVGstring.js +18 -0
  47. package/lib/error/errorDisplay/Web/Drawer/Drawer.js +274 -0
  48. package/lib/error/errorDisplay/Web/Drawer/Drawer.less +420 -0
  49. package/lib/error/errorDisplay/Web/Drawer/DrawerConnect.js +213 -0
  50. package/lib/error/errorDisplay/Web/Drawer/index.js +142 -0
  51. package/lib/error/errorDisplay/Web/ErrorMsg/index.js +301 -0
  52. package/lib/error/errorDisplay/Web/Notification/Notice.js +161 -0
  53. package/lib/error/errorDisplay/Web/Notification/Notification.js +149 -0
  54. package/lib/error/errorDisplay/Web/Notification/Notification.less +137 -0
  55. package/lib/error/errorDisplay/Web/Notification/index.js +104 -0
  56. package/lib/error/errorDisplay/Web/defaultGlobalConfig.js +29 -0
  57. package/lib/error/errorDisplay/animation.less +112 -0
  58. package/lib/error/errorDisplay/compUtils.js +52 -0
  59. package/lib/error/errorDisplay/const.js +83 -0
  60. package/lib/error/errorDisplay/http.js +103 -0
  61. package/lib/error/errorDisplay/variables.less +1 -0
  62. package/lib/error/index.js +34 -0
  63. package/lib/images/ico-back.png +0 -0
  64. package/lib/index.d.ts +9 -0
  65. package/lib/rootConfig/index.d.ts +5 -0
  66. package/lib/rootConfig/index.js +28 -0
  67. package/lib/rootConfig/mobile/BusiComp.d.ts +66 -0
  68. package/lib/rootConfig/mobile/BusiComp.js +88 -0
  69. package/lib/rootConfig/mobile/MobileModal.d.ts +114 -0
  70. package/lib/rootConfig/mobile/MobileModal.js +140 -0
  71. package/lib/rootConfig/mobile/MobilePopover.d.ts +81 -0
  72. package/lib/rootConfig/mobile/MobilePopover.js +89 -0
  73. package/lib/rootConfig/mobile/index.d.ts +4 -0
  74. package/lib/rootConfig/mobile/index.js +34 -0
  75. package/lib/rootConfig/mobile/page.d.ts +157 -0
  76. package/lib/rootConfig/mobile/page.js +161 -0
  77. package/lib/rootConfig/pc/BusiComp.d.ts +66 -0
  78. package/lib/rootConfig/pc/BusiComp.js +88 -0
  79. package/lib/rootConfig/pc/Drawer.d.ts +150 -0
  80. package/lib/rootConfig/pc/Drawer.js +203 -0
  81. package/lib/rootConfig/pc/Modal.d.ts +160 -0
  82. package/lib/rootConfig/pc/Modal.js +195 -0
  83. package/lib/rootConfig/pc/Popover.d.ts +90 -0
  84. package/lib/rootConfig/pc/Popover.js +104 -0
  85. package/lib/rootConfig/pc/index.d.ts +5 -0
  86. package/lib/rootConfig/pc/index.js +41 -0
  87. package/lib/rootConfig/pc/page.d.ts +146 -0
  88. package/lib/rootConfig/pc/page.js +153 -0
  89. package/lib/rootConfig/todoActionList.d.ts +3082 -0
  90. package/lib/rootConfig/todoActionList.js +3600 -0
  91. package/lib/rootConfig/todoOptionList.d.ts +1466 -0
  92. package/lib/rootConfig/todoOptionList.js +1685 -0
  93. package/lib/security/const.d.ts +22 -0
  94. package/lib/security/const.js +38 -0
  95. package/lib/security/encipher/aes.d.ts +2 -0
  96. package/lib/security/encipher/aes.js +35 -0
  97. package/lib/security/encipher/des.d.ts +2 -0
  98. package/lib/security/encipher/des.js +34 -0
  99. package/lib/security/encipher/rsa.d.ts +2 -0
  100. package/lib/security/encipher/rsa.js +26 -0
  101. package/lib/security/encipher/sign.d.ts +6 -0
  102. package/lib/security/encipher/sign.js +102 -0
  103. package/lib/security/fetch.d.ts +9 -0
  104. package/lib/security/fetch.js +212 -0
  105. package/lib/security/httpEncryption.js +83 -0
  106. package/lib/security/index.d.ts +39 -0
  107. package/lib/security/index.js +29 -0
  108. package/lib/svg/check.svg +10 -0
  109. package/lib/svg/normal-check.svg +10 -0
  110. package/lib/svg/webViewError.svg +40 -0
  111. package/lib/theme/bin/cucc/theme.js +277 -0
  112. package/lib/theme/bin/cucc/theme.less +272 -0
  113. package/lib/theme/bin/cucc/theme.scss +272 -0
  114. package/lib/theme/bin/default/theme.js +277 -0
  115. package/lib/theme/bin/default/theme.less +272 -0
  116. package/lib/theme/bin/default/theme.scss +272 -0
  117. package/lib/theme/build.js +44 -0
  118. package/lib/theme/src/cucc/index.js +133 -0
  119. package/lib/theme/src/default/index.js +133 -0
  120. package/lib/theme/utils/colorPaletteMixin.js +61 -0
  121. package/lib/theme/utils/px2Num.js +14 -0
  122. package/lib/theme/utils/renderColors.js +18 -0
  123. package/lib/utils/img.d.ts +1 -0
  124. package/lib/utils/img.js +10 -0
  125. package/lib/utils/url.d.ts +16 -0
  126. package/lib/utils/url.js +111 -0
  127. package/package.json +6 -3
@@ -386,4 +386,35 @@
386
386
  border-radius: 4px;
387
387
  }
388
388
  }
389
+
390
+ &-btn {
391
+ display: inline-block;
392
+ padding: 0 15px;
393
+ border: 1px solid rgba(28, 36, 46, 0.15);
394
+ border-radius: 4px;
395
+ height: 32px;
396
+ line-height: 30px;
397
+ color: #1c242e;
398
+ &:hover {
399
+ border-color: rgb(112, 158, 250);
400
+ color: rgb(112, 158, 250);
401
+ }
402
+ }
403
+
404
+ &-btn&-btn-primary {
405
+ color: rgb(68, 119, 238);
406
+ background-color: rgb(68, 119, 238);
407
+ &,
408
+ &:hover {
409
+ color: white;
410
+ }
411
+ &:hover {
412
+ border-color: rgb(112, 158, 250);
413
+ background-color: rgb(112, 158, 250);
414
+ }
415
+ }
416
+
417
+ &-footer &-btn {
418
+ margin-left: 8px;
419
+ }
389
420
  }
@@ -50,7 +50,8 @@ function getDrawerInstance() {
50
50
  drawerInstance === null || drawerInstance === void 0 ? void 0 : drawerInstance.update(_objectSpread(_objectSpread({}, prarms), {}, {
51
51
  key: cacheKey
52
52
  }));
53
- }
53
+ },
54
+ key: cacheKey
54
55
  });
55
56
  });
56
57
  });
@@ -62,11 +63,13 @@ var drawerHandel = {
62
63
  getDrawerInstance(options, function (_ref) {
63
64
  var instance = _ref.instance,
64
65
  _close = _ref.close,
65
- update = _ref.update;
66
+ update = _ref.update,
67
+ key = _ref.key;
66
68
  var _ref2 = instance || {},
67
69
  open = _ref2.open,
68
70
  otherInstace = _objectWithoutProperties(_ref2, _excluded);
69
71
  open(options);
72
+ drawerHandel.key = key;
70
73
  resolve(_objectSpread(_objectSpread({}, otherInstace), {}, {
71
74
  close: function close() {
72
75
  if ((options === null || options === void 0 ? void 0 : options.onClose) instanceof Function) {
@@ -81,10 +84,15 @@ var drawerHandel = {
81
84
  });
82
85
  });
83
86
  },
84
- close: function close(key) {
87
+ close: function close() {
88
+ var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : drawerHandel.key;
85
89
  Object.keys(drawerInstances).forEach(function (cacheKey) {
86
90
  Promise.resolve(drawerInstances[cacheKey]).then(function (instance) {
87
- instance.remove(key);
91
+ if (instance === null || instance === void 0 ? void 0 : instance.remove) {
92
+ instance.remove(key);
93
+ } else {
94
+ instance.close(key);
95
+ }
88
96
  });
89
97
  delete drawerInstances[cacheKey];
90
98
  });
@@ -109,7 +109,7 @@ var ErrorMsg = {
109
109
  footer: function () {
110
110
  var _footer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
111
111
  var _msg$resolve;
112
- var resolve, footerContent;
112
+ var resolve, _ref, feedbackCallback, footerContent;
113
113
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
114
114
  while (1) {
115
115
  switch (_context2.prev = _context2.next) {
@@ -118,7 +118,17 @@ var ErrorMsg = {
118
118
  return (_msg$resolve = msg === null || msg === void 0 ? void 0 : msg.resolve) !== null && _msg$resolve !== void 0 ? _msg$resolve : opts.resolve;
119
119
  case 2:
120
120
  resolve = _context2.sent;
121
+ _ref = msg || {}, feedbackCallback = _ref.feedbackCallback;
121
122
  footerContent = [];
123
+ if (typeof feedbackCallback === 'function') {
124
+ footerContent.push( /*#__PURE__*/React.createElement("a", {
125
+ onClick: function onClick() {
126
+ if (feedbackCallback()) {
127
+ Notification.close();
128
+ }
129
+ }
130
+ }, "\u6545\u969C\u4E0A\u62A5"));
131
+ }
122
132
  if (opts.extendFooter) {
123
133
  if (typeof opts.footer === 'function') {
124
134
  footerContent.push(opts.extendFooter());
@@ -232,7 +242,20 @@ var ErrorMsg = {
232
242
  break;
233
243
  }
234
244
  }
235
- }
245
+ },
246
+ footer: typeof feedbackCallback === 'function' ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("a", {
247
+ className: "lx-drawer-btn",
248
+ onClick: function onClick() {
249
+ drawerHandel.close();
250
+ }
251
+ }, "\u53D6 \u6D88"), /*#__PURE__*/React.createElement("a", {
252
+ className: "lx-drawer-btn lx-drawer-btn-primary",
253
+ onClick: function onClick() {
254
+ if (feedbackCallback()) {
255
+ drawerHandel.close();
256
+ }
257
+ }
258
+ }, "\u6545\u969C\u4E0A\u62A5")) : null
236
259
  });
237
260
  case 22:
238
261
  case "end":
@@ -241,10 +264,10 @@ var ErrorMsg = {
241
264
  }
242
265
  }, _callee, null, [[8, 15]]);
243
266
  }))
244
- }, "\u67E5\u770B\u8BE6\u60C5"));
267
+ }, "\u5F02\u5E38\u5E2E\u52A9"));
245
268
  }
246
269
  return _context2.abrupt("return", footerContent);
247
- case 7:
270
+ case 9:
248
271
  case "end":
249
272
  return _context2.stop();
250
273
  }
@@ -1,9 +1,15 @@
1
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
2
  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, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $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 defineProperty(generator, "_invoke", { value: makeInvokeMethod(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; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(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); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), 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, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), 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 (val) { var object = Object(val), 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; }
3
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
3
8
  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); } }
4
9
  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); }); }; }
5
10
  import Notification from './Notification';
6
11
  var notificationInstance = {};
12
+ var notificationNbr = 0;
7
13
  function getNotificationInstance() {
8
14
  return _getNotificationInstance.apply(this, arguments);
9
15
  }
@@ -16,13 +22,13 @@ function _getNotificationInstance() {
16
22
  placement,
17
23
  cacheKey,
18
24
  cacheInstance,
19
- _args = arguments;
25
+ _args2 = arguments;
20
26
  return _regeneratorRuntime().wrap(function _callee$(_context) {
21
27
  while (1) {
22
28
  switch (_context.prev = _context.next) {
23
29
  case 0:
24
- args = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
25
- callback = _args.length > 1 ? _args[1] : undefined;
30
+ args = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
31
+ callback = _args2.length > 1 ? _args2[1] : undefined;
26
32
  _ref2 = args || {}, _ref2$placement = _ref2.placement, placement = _ref2$placement === void 0 ? 'topRight' : _ref2$placement;
27
33
  cacheKey = "lx-notification-root ".concat(placement);
28
34
  cacheInstance = notificationInstance[cacheKey];
@@ -57,15 +63,20 @@ function _getNotificationInstance() {
57
63
  }));
58
64
  return _getNotificationInstance.apply(this, arguments);
59
65
  }
60
- function notice(args) {
61
- getNotificationInstance(args, function (_ref) {
62
- var instance = _ref.instance;
63
- instance.open(args);
64
- });
65
- }
66
66
  var ontificationAPI = {
67
- open: notice,
68
- close: function close(key) {
67
+ open: function open(_args) {
68
+ getNotificationInstance(_args, function (_ref) {
69
+ var instance = _ref.instance;
70
+ var nKey = "lx-notification-".concat(notificationNbr);
71
+ instance.open(_objectSpread(_objectSpread({}, _args), {}, {
72
+ key: nKey
73
+ }));
74
+ notificationNbr += 1;
75
+ ontificationAPI.key = nKey;
76
+ });
77
+ },
78
+ close: function close() {
79
+ var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ontificationAPI.key;
69
80
  Object.keys(notificationInstance).forEach(function (cacheKey) {
70
81
  return Promise.resolve(notificationInstance[cacheKey]).then(function (instance) {
71
82
  instance.close(key);
@@ -0,0 +1,275 @@
1
+ var theme = {
2
+ 'blue-base': '#3295fa',
3
+ 'blue-1': '#f0faff',
4
+ 'blue-2': '#d6f0ff',
5
+ 'blue-3': '#addeff',
6
+ 'blue-4': '#85caff',
7
+ 'blue-5': '#5cb3ff',
8
+ 'blue-6': '#3296fa',
9
+ 'blue-7': '#2074d4',
10
+ 'blue-8': '#1155ad',
11
+ 'blue-9': '#073a87',
12
+ 'blue-10': '#042661',
13
+ 'cyan-base': '#0dd1a9',
14
+ 'cyan-1': '#e6fff6',
15
+ 'cyan-2': '#b3ffe5',
16
+ 'cyan-3': '#86f7d5',
17
+ 'cyan-4': '#59ebc4',
18
+ 'cyan-5': '#31deb5',
19
+ 'cyan-6': '#0dd1aa',
20
+ 'cyan-7': '#02ab8f',
21
+ 'cyan-8': '#008573',
22
+ 'cyan-9': '#005e55',
23
+ 'cyan-10': '#003834',
24
+ 'green-base': '#02b342',
25
+ 'green-1': '#daf2df',
26
+ 'green-2': '#95e6a8',
27
+ 'green-3': '#6ad988',
28
+ 'green-4': '#43cc6c',
29
+ 'green-5': '#21bf55',
30
+ 'green-6': '#02b343',
31
+ 'green-7': '#008c38',
32
+ 'green-8': '#00662c',
33
+ 'green-9': '#00401e',
34
+ 'green-10': '#001a0d',
35
+ 'gold-base': '#faaf0c',
36
+ 'gold-1': '#fffbe6',
37
+ 'gold-2': '#fff1b0',
38
+ 'gold-3': '#ffe587',
39
+ 'gold-4': '#ffd75e',
40
+ 'gold-5': '#ffc636',
41
+ 'gold-6': '#faaf0c',
42
+ 'gold-7': '#d48a00',
43
+ 'gold-8': '#ad6b00',
44
+ 'gold-9': '#874f00',
45
+ 'gold-10': '#613500',
46
+ 'volcano-base': '#fa6432',
47
+ 'volcano-1': '#fff6f0',
48
+ 'volcano-2': '#ffe6d6',
49
+ 'volcano-3': '#ffcaad',
50
+ 'volcano-4': '#ffab85',
51
+ 'volcano-5': '#ff8a5c',
52
+ 'volcano-6': '#fa6432',
53
+ 'volcano-7': '#d44720',
54
+ 'volcano-8': '#ad2e11',
55
+ 'volcano-9': '#871a07',
56
+ 'volcano-10': '#610f04',
57
+ 'red-base': '#f23030',
58
+ 'red-1': '#fff2f0',
59
+ 'red-2': '#ffdcd6',
60
+ 'red-3': '#ffb6ad',
61
+ 'red-4': '#ff8d85',
62
+ 'red-5': '#ff615c',
63
+ 'red-6': '#f23030',
64
+ 'red-7': '#cc1f24',
65
+ 'red-8': '#a6111b',
66
+ 'red-9': '#800612',
67
+ 'red-10': '#59040f',
68
+ 'purple-base': '#6732e6',
69
+ 'purple-1': '#f7f0ff',
70
+ 'purple-2': '#ebdbff',
71
+ 'purple-3': '#d1b3ff',
72
+ 'purple-4': '#b58aff',
73
+ 'purple-5': '#8e5cf2',
74
+ 'purple-6': '#6832e6',
75
+ 'purple-7': '#4b21bf',
76
+ 'purple-8': '#321299',
77
+ 'purple-9': '#1d0873',
78
+ 'purple-10': '#11054d',
79
+ 'geekblue-base': '#3366ee',
80
+ 'geekblue-1': '#f0f6ff',
81
+ 'geekblue-2': '#d9e8ff',
82
+ 'geekblue-3': '#b0cdff',
83
+ 'geekblue-4': '#87afff',
84
+ 'geekblue-5': '#5c8cfa',
85
+ 'geekblue-6': '#3264ed',
86
+ 'geekblue-7': '#2047c7',
87
+ 'geekblue-8': '#122ea1',
88
+ 'geekblue-9': '#071b7a',
89
+ 'geekblue-10': '#040f54',
90
+ 'pink-base': '#eb2f96',
91
+ 'pink-1': '#fff0f6',
92
+ 'pink-2': '#ffd6e7',
93
+ 'pink-3': '#ffadd2',
94
+ 'pink-4': '#ff85c0',
95
+ 'pink-5': '#f759ab',
96
+ 'pink-6': '#eb2f96',
97
+ 'pink-7': '#c41d7f',
98
+ 'pink-8': '#9e1068',
99
+ 'pink-9': '#780650',
100
+ 'pink-10': '#520339',
101
+ 'orange-base': '#fa8c16',
102
+ 'orange-1': '#fff7e6',
103
+ 'orange-2': '#ffe7ba',
104
+ 'orange-3': '#ffd591',
105
+ 'orange-4': '#ffc069',
106
+ 'orange-5': '#ffa940',
107
+ 'orange-6': '#fa8c16',
108
+ 'orange-7': '#d46b08',
109
+ 'orange-8': '#ad4e00',
110
+ 'orange-9': '#873800',
111
+ 'orange-10': '#612500',
112
+ 'yellow-base': '#fadb14',
113
+ 'yellow-1': '#feffe6',
114
+ 'yellow-2': '#ffffb8',
115
+ 'yellow-3': '#fffb8f',
116
+ 'yellow-4': '#fff566',
117
+ 'yellow-5': '#ffec3d',
118
+ 'yellow-6': '#fadb14',
119
+ 'yellow-7': '#d4b106',
120
+ 'yellow-8': '#ad8b00',
121
+ 'yellow-9': '#876800',
122
+ 'yellow-10': '#614700',
123
+ 'lime-base': '#a0d911',
124
+ 'lime-1': '#fcffe6',
125
+ 'lime-2': '#f4ffb8',
126
+ 'lime-3': '#eaff8f',
127
+ 'lime-4': '#d3f261',
128
+ 'lime-5': '#bae637',
129
+ 'lime-6': '#a0d911',
130
+ 'lime-7': '#7cb305',
131
+ 'lime-8': '#5b8c00',
132
+ 'lime-9': '#3f6600',
133
+ 'lime-10': '#254000',
134
+ 'primary-color': '#445566',
135
+ 'primary-1': '#9ca2a6',
136
+ 'primary-2': '#909699',
137
+ 'primary-3': '#84898c',
138
+ 'primary-4': '#787c80',
139
+ 'primary-5': '#5f6a73',
140
+ 'primary-6': '#445566',
141
+ 'primary-7': '#283340',
142
+ 'primary-8': '#0f131a',
143
+ 'primary-9': '#000000',
144
+ 'primary-10': '#000000',
145
+ 'info-color': '#4477ee',
146
+ 'info-1': '#f0f7ff',
147
+ 'info-2': '#edf5ff',
148
+ 'info-3': '#c4dcff',
149
+ 'info-4': '#9cc0ff',
150
+ 'info-5': '#709efa',
151
+ 'info-6': '#4577ed',
152
+ 'info-7': '#3058c7',
153
+ 'info-8': '#1f3da1',
154
+ 'info-9': '#11267a',
155
+ 'info-10': '#0b1754',
156
+ 'success-color': '#36bf36',
157
+ 'success-1': '#f2fff0',
158
+ 'success-2': '#e1f2df',
159
+ 'success-3': '#b4e6ae',
160
+ 'success-4': '#88d982',
161
+ 'success-5': '#5ecc5a',
162
+ 'success-6': '#36bf36',
163
+ 'success-7': '#239927',
164
+ 'success-8': '#15731b',
165
+ 'success-9': '#0a4d11',
166
+ 'success-10': '#052609',
167
+ 'warning-color': '#faad14',
168
+ 'warning-1': '#fffbe6',
169
+ 'warning-2': '#fff1b8',
170
+ 'warning-3': '#ffe58f',
171
+ 'warning-4': '#ffd666',
172
+ 'warning-5': '#ffc53d',
173
+ 'warning-6': '#faad14',
174
+ 'warning-7': '#d48806',
175
+ 'warning-8': '#ad6800',
176
+ 'warning-9': '#874d00',
177
+ 'warning-10': '#613400',
178
+ 'error-color': '#f52230',
179
+ 'error-1': '#fff1f0',
180
+ 'error-2': '#ffcbc7',
181
+ 'error-3': '#ffa19e',
182
+ 'error-4': '#ff7575',
183
+ 'error-5': '#ff4d52',
184
+ 'error-6': '#f52230',
185
+ 'error-7': '#cf1325',
186
+ 'error-8': '#a8071c',
187
+ 'error-9': '#820016',
188
+ 'error-10': '#5c0012',
189
+ 'highlight-color': '#fa6432',
190
+ 'highlight-1': '#fff6f0',
191
+ 'highlight-2': '#ffe6d6',
192
+ 'highlight-3': '#ffcaad',
193
+ 'highlight-4': '#ffab85',
194
+ 'highlight-5': '#ff8a5c',
195
+ 'highlight-6': '#fa6432',
196
+ 'highlight-7': '#d44720',
197
+ 'highlight-8': '#ad2e11',
198
+ 'highlight-9': '#871a07',
199
+ 'highlight-10': '#610f04',
200
+ 'black-1': 'rgba(28, 36, 46, 0.15)',
201
+ 'black-2': 'rgba(28, 36, 46, 0.25)',
202
+ 'black-3': 'rgba(28, 36, 46, 0.35)',
203
+ 'black-4': 'rgba(28, 36, 46, 0.45)',
204
+ 'black-5': 'rgba(28, 36, 46, 0.55)',
205
+ 'black-6': 'rgba(28, 36, 46, 0.65)',
206
+ 'black-7': 'rgba(28, 36, 46, 0.75)',
207
+ 'black-8': 'rgba(28, 36, 46, 0.85)',
208
+ 'black-9': 'rgba(28, 36, 46, 0.95)',
209
+ 'black-10': 'rgba(28, 36, 46, 1)',
210
+ white: '#fff',
211
+ black: 'rgba(28, 36, 46, 1)',
212
+ 'link-color': '#2299ff',
213
+ 'body-background': '#fff',
214
+ 'background-color-base': '#edf0f5',
215
+ 'border-color-base': '#e5e5e5',
216
+ 'dividing-color': '#e5e5e5',
217
+ 'border-color-split': '#f0f0f0',
218
+ 'component-background': '#fff',
219
+ 'background-color-light': 'hsv(0, 0, 98%)',
220
+ 'disabled-bg': '#f5f5f5',
221
+ 'modal-mask-bg': 'rgba(28, 36, 46, 0.45)',
222
+ 'item-hover-bg': '#f5f5f5',
223
+ 'heading-color': 'rgba(28, 36, 46, 1)',
224
+ 'text-color': 'rgba(28, 36, 46, 0.85)',
225
+ 'text-color-paragraph': 'rgba(28, 36, 46, 0.65)',
226
+ 'text-color-secondary': 'rgba(28, 36, 46, 0.45)',
227
+ 'disabled-color': 'rgba(28, 36, 46, 0.25)',
228
+ 'text-color-inverse': '#fff',
229
+ 'line-height-base': '1.5715',
230
+ 'icon-color': 'inherit',
231
+ 'icon-color-hover': 'rgba(28, 36, 46, 0.75)',
232
+ 'icon-color-secondary': 'rgba(28, 36, 46, 0.45)',
233
+ 'icon-color-heading': 'rgba(28, 36, 46, 1)',
234
+ 'font-size-base': '14px',
235
+ 'font-size-lg': '16px',
236
+ 'font-size-md': '15px',
237
+ 'font-size-sm': '12px',
238
+ 'font-weight': '500',
239
+ 'heading-1-size': '38px',
240
+ 'heading-2-size': '30px',
241
+ 'heading-3-size': '24px',
242
+ 'heading-4-size': '20px',
243
+ 'heading-5-size': '16px',
244
+ 'heading-6-size': '14px',
245
+ 'border-radius-base': '2px',
246
+ 'border-radius-md': '4px',
247
+ 'border-radius-lg': '8px',
248
+ 'border-radius-round': '50%',
249
+ 'padding-lg': '20px',
250
+ 'padding-md': '16px',
251
+ 'padding-sm': '12px',
252
+ 'padding-xs': '8px',
253
+ 'padding-xxs': '4px',
254
+ 'padding-xxxs': '2px',
255
+ 'size-xs': '16px',
256
+ 'size-sm': '24px',
257
+ 'size-md': '28px',
258
+ 'size-base': '32px',
259
+ 'size-lg': '40px',
260
+ 'size-xl': '56px',
261
+ 'btn-height-base': '32px',
262
+ 'btn-height-lg': '40px',
263
+ 'btn-height-sm': '24px',
264
+ 'radio-size': '16px',
265
+ 'checkbox-size': '16px',
266
+ 'input-height-base': '32px',
267
+ 'input-height-lg': '40px',
268
+ 'input-height-sm': '24px',
269
+ 'menu-inline-toplevel-item-height': '40px',
270
+ 'menu-item-height': '40px',
271
+ 'tabs-card-height': '40px',
272
+ 'tree-title-height': '24px',
273
+ 'transfer-header-height': '40px'
274
+ };
275
+ module.exports = theme;