@nokecy/qc-ui 1.1.37 → 1.1.38

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 (234) hide show
  1. package/README.md +25 -25
  2. package/dist/cjs/ConfirmPro/index.js +4 -4
  3. package/dist/cjs/RuleBuilder/LogicSelector.js +7 -7
  4. package/dist/cjs/RuleBuilder/RuleBuilderContainer.js +27 -27
  5. package/dist/cjs/RuleBuilder/RuleCard.js +6 -6
  6. package/dist/cjs/RuleBuilder/RuleGroupEditor.js +7 -7
  7. package/dist/cjs/RuleBuilder/constants/operators.js +18 -18
  8. package/dist/cjs/RuleBuilder/context/RuleBuilderContext.js +38 -38
  9. package/dist/cjs/RuleBuilder/inputs/BetweenValueInput.js +5 -5
  10. package/dist/cjs/RuleBuilder/inputs/MultiValueInput.js +5 -5
  11. package/dist/cjs/RuleBuilder/inputs/SingleValueInput.js +8 -8
  12. package/dist/cjs/RuleBuilder/inputs/ValueInput.js +8 -8
  13. package/dist/cjs/RuleBuilder/selectors/FieldSelector.js +5 -5
  14. package/dist/cjs/RuleBuilder/selectors/OperatorSelector.js +5 -5
  15. package/dist/cjs/RuleBuilder/styles/index.module.less +443 -443
  16. package/dist/cjs/RuleBuilder/styles/index.module.less.d.ts +43 -43
  17. package/dist/cjs/RuleBuilder/types/index.js +42 -42
  18. package/dist/cjs/RuleBuilder/utils/pathHelpers.js +47 -47
  19. package/dist/cjs/RuleBuilder/utils/ruleHelpers.js +31 -31
  20. package/dist/cjs/RuleBuilder/utils/validation.js +22 -22
  21. package/dist/cjs/ag-grid-plus/_utils/boolSelect.js +5 -5
  22. package/dist/cjs/ag-grid-plus/_utils/processColumnGroups.js +9 -9
  23. package/dist/cjs/ag-grid-plus/ag-grid-theme-builder.css +352 -352
  24. package/dist/cjs/ag-grid-plus/ag-gridPlus.js +63 -65
  25. package/dist/cjs/ag-grid-plus/context/gridContext.js +19 -19
  26. package/dist/cjs/ag-grid-plus/context/useSchemeDataFlow.js +56 -56
  27. package/dist/cjs/ag-grid-plus/context/useSchemeManager.js +93 -93
  28. package/dist/cjs/ag-grid-plus/errors/ErrorBoundary.js +8 -8
  29. package/dist/cjs/ag-grid-plus/errors/types.js +14 -14
  30. package/dist/cjs/ag-grid-plus/hooks/useAgGridCalculation.js +45 -45
  31. package/dist/cjs/ag-grid-plus/hooks/useAgGridData.js +44 -44
  32. package/dist/cjs/ag-grid-plus/hooks/useGridPlusColumnState.js +3 -3
  33. package/dist/cjs/ag-grid-plus/hooks/useGridState.js +36 -36
  34. package/dist/cjs/ag-grid-plus/index.less +50 -50
  35. package/dist/cjs/ag-grid-plus/queryForm/index.less +72 -72
  36. package/dist/cjs/ag-grid-plus/setting/ColumnConfigForm.js +11 -11
  37. package/dist/cjs/ag-grid-plus/setting/ColumnConfigTable.js +3 -3
  38. package/dist/cjs/ag-grid-plus/setting/ColumnNameCellRenderer.js +10 -10
  39. package/dist/cjs/ag-grid-plus/setting/ColumnSetting.js +29 -29
  40. package/dist/cjs/ag-grid-plus/setting/DebounceInputs.js +9 -9
  41. package/dist/cjs/ag-grid-plus/setting/MoveNodeModal.js +7 -7
  42. package/dist/cjs/ag-grid-plus/setting/NameColumnRenderer.js +6 -6
  43. package/dist/cjs/ag-grid-plus/setting/QuerySchemeManager.js +34 -34
  44. package/dist/cjs/ag-grid-plus/setting/columnGroupUtils.js +76 -76
  45. package/dist/cjs/ag-grid-plus/setting/performanceMonitor.js +5 -5
  46. package/dist/cjs/ag-grid-plus/shared/storage/backendApiAdapter.js +46 -46
  47. package/dist/cjs/ag-grid-plus/shared/storage/localStorageAdapter.js +39 -39
  48. package/dist/cjs/ag-grid-plus/shared/utils/schemeDataMigration.js +18 -18
  49. package/dist/cjs/ag-grid-plus/theme.js +3 -3
  50. package/dist/cjs/ag-grid-plus/toolBar/index.js +4 -4
  51. package/dist/cjs/ag-grid-plus/utils/columnProcessors.js +52 -52
  52. package/dist/cjs/ag-grid-plus/utils/constants.js +22 -22
  53. package/dist/cjs/ag-grid-plus/utils/entityExtensionColumns.js +20 -20
  54. package/dist/cjs/ag-grid-plus/utils/logger.js +2 -2
  55. package/dist/cjs/ag-grid-plus/utils/sanitize.js +10 -10
  56. package/dist/cjs/ag-grid-plus/utils.js +3 -3
  57. package/dist/cjs/array-table/columnHelper.js +43 -43
  58. package/dist/cjs/array-table/hooks.js +11 -9
  59. package/dist/cjs/array-table/index.js +40 -41
  60. package/dist/cjs/array-table/utils.js +4 -3
  61. package/dist/cjs/components/RegexEditor/core/RegexEditor.js +32 -32
  62. package/dist/cjs/components/RegexEditor/core/RegexEditor.less +119 -119
  63. package/dist/cjs/components/RegexEditor/core/extensions/errorMarker.js +52 -52
  64. package/dist/cjs/components/RegexEditor/hooks/useRegexTester.js +48 -48
  65. package/dist/cjs/components/RegexEditor/hooks/useRegexValidation.js +54 -54
  66. package/dist/cjs/components/RegexEditor/hooks/useTemplateManager.js +5 -5
  67. package/dist/cjs/components/RegexEditor/templates/TemplateSelector.js +28 -28
  68. package/dist/cjs/components/RegexEditor/templates/builtinTemplates.js +24 -24
  69. package/dist/cjs/components/RegexEditor/templates/storage.js +29 -29
  70. package/dist/cjs/components/RegexEditor/templates/templateManager.js +29 -29
  71. package/dist/cjs/components/RegexEditor/templates/types.js +74 -74
  72. package/dist/cjs/components/RegexEditor/validation/complexity.js +40 -40
  73. package/dist/cjs/components/RegexEditor/validation/parser.js +47 -47
  74. package/dist/cjs/components/RegexEditor/validation/validator.js +54 -54
  75. package/dist/cjs/components/RegexEditor/visualizer/FlagsSelector.js +19 -19
  76. package/dist/cjs/components/RegexEditor/visualizer/MatchItem.js +20 -20
  77. package/dist/cjs/components/RegexEditor/visualizer/RegexRailroadDiagram.js +15 -15
  78. package/dist/cjs/components/RegexEditor/visualizer/RegexTester.js +17 -17
  79. package/dist/cjs/components/RegexEditor/visualizer/astToRailroad.js +11 -11
  80. package/dist/cjs/components/RegexEditor/visualizer/utils.js +92 -92
  81. package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.less +49 -49
  82. package/dist/cjs/dashboard/dashboard/index.less +173 -173
  83. package/dist/cjs/dashboard/dashboard/utils.js +4 -4
  84. package/dist/cjs/dashboard/utils.js +8 -8
  85. package/dist/cjs/dashboard/widget/index.less +7 -7
  86. package/dist/cjs/dashboard/widget/selector/index.less +172 -172
  87. package/dist/cjs/deleteConfirm/index.js +17 -17
  88. package/dist/cjs/draggableModal/index.js +4 -4
  89. package/dist/cjs/draggableModal/style.less +122 -122
  90. package/dist/cjs/editable/index.js +16 -1
  91. package/dist/cjs/formDesigner/arrayTable/styles.less +2 -2
  92. package/dist/cjs/formDesigner/index.less +2 -2
  93. package/dist/cjs/fullScreenAlert/index.js +13 -13
  94. package/dist/cjs/fullScreenAlert/index.less +133 -133
  95. package/dist/cjs/generatedListPage/ConfigurableToolbar.js +2 -2
  96. package/dist/cjs/generatedListPage/GeneratedListPage.js +20 -20
  97. package/dist/cjs/generatedListPage/OptionsColumn.js +3 -3
  98. package/dist/cjs/generatedListPage/PerformanceMonitor.js +9 -9
  99. package/dist/cjs/generatedListPage/RequestManager.js +39 -39
  100. package/dist/cjs/generatedListPage/_utils/AccessWrapper.js +6 -6
  101. package/dist/cjs/generatedListPage/_utils/defaultHandlers.js +14 -14
  102. package/dist/cjs/generatedListPage/usePermissionCheck.js +27 -27
  103. package/dist/cjs/generatedListPage/useRequestManager.js +20 -20
  104. package/dist/cjs/importModal/index.js +4 -4
  105. package/dist/cjs/standardFormDialog/FormValidation.js +45 -45
  106. package/dist/cjs/standardFormDialog/PortalManager.js +46 -46
  107. package/dist/cjs/standardFormDialog/StandardFormDialog.js +20 -20
  108. package/dist/cjs/standardFormDialog/useStandardFormSchema.js +24 -24
  109. package/dist/cjs/toolBar/index.less +25 -25
  110. package/dist/cjs/types/railroad-diagrams.d.ts +59 -59
  111. package/dist/cjs/types/regexp-tree.d.ts +175 -175
  112. package/dist/esm/ConfirmPro/index.js +4 -4
  113. package/dist/esm/RuleBuilder/LogicSelector.js +7 -7
  114. package/dist/esm/RuleBuilder/RuleBuilderContainer.js +27 -27
  115. package/dist/esm/RuleBuilder/RuleCard.js +6 -6
  116. package/dist/esm/RuleBuilder/RuleGroupEditor.js +7 -7
  117. package/dist/esm/RuleBuilder/constants/operators.js +18 -18
  118. package/dist/esm/RuleBuilder/context/RuleBuilderContext.js +38 -38
  119. package/dist/esm/RuleBuilder/index.js +6 -6
  120. package/dist/esm/RuleBuilder/inputs/BetweenValueInput.js +5 -5
  121. package/dist/esm/RuleBuilder/inputs/MultiValueInput.js +5 -5
  122. package/dist/esm/RuleBuilder/inputs/SingleValueInput.js +8 -8
  123. package/dist/esm/RuleBuilder/inputs/ValueInput.js +8 -8
  124. package/dist/esm/RuleBuilder/selectors/FieldSelector.js +5 -5
  125. package/dist/esm/RuleBuilder/selectors/OperatorSelector.js +5 -5
  126. package/dist/esm/RuleBuilder/styles/index.module.less +443 -443
  127. package/dist/esm/RuleBuilder/styles/index.module.less.d.ts +43 -43
  128. package/dist/esm/RuleBuilder/types/index.js +42 -42
  129. package/dist/esm/RuleBuilder/utils/pathHelpers.js +47 -47
  130. package/dist/esm/RuleBuilder/utils/ruleHelpers.js +31 -31
  131. package/dist/esm/RuleBuilder/utils/validation.js +22 -22
  132. package/dist/esm/ag-grid-plus/_utils/boolSelect.js +5 -5
  133. package/dist/esm/ag-grid-plus/_utils/processColumnGroups.js +9 -9
  134. package/dist/esm/ag-grid-plus/ag-grid-theme-builder.css +352 -352
  135. package/dist/esm/ag-grid-plus/ag-gridPlus.js +63 -65
  136. package/dist/esm/ag-grid-plus/context/gridContext.js +19 -19
  137. package/dist/esm/ag-grid-plus/context/useSchemeDataFlow.js +56 -56
  138. package/dist/esm/ag-grid-plus/context/useSchemeManager.js +93 -93
  139. package/dist/esm/ag-grid-plus/errors/ErrorBoundary.js +8 -8
  140. package/dist/esm/ag-grid-plus/errors/types.js +14 -14
  141. package/dist/esm/ag-grid-plus/hooks/index.js +2 -2
  142. package/dist/esm/ag-grid-plus/hooks/useAgGridCalculation.js +45 -45
  143. package/dist/esm/ag-grid-plus/hooks/useAgGridData.js +44 -44
  144. package/dist/esm/ag-grid-plus/hooks/useGridPlusColumnState.js +3 -3
  145. package/dist/esm/ag-grid-plus/hooks/useGridState.js +36 -36
  146. package/dist/esm/ag-grid-plus/index.less +50 -50
  147. package/dist/esm/ag-grid-plus/queryForm/index.less +72 -72
  148. package/dist/esm/ag-grid-plus/setting/ColumnConfigForm.js +11 -11
  149. package/dist/esm/ag-grid-plus/setting/ColumnConfigTable.js +3 -3
  150. package/dist/esm/ag-grid-plus/setting/ColumnNameCellRenderer.js +10 -10
  151. package/dist/esm/ag-grid-plus/setting/ColumnSetting.js +29 -29
  152. package/dist/esm/ag-grid-plus/setting/DebounceInputs.js +9 -9
  153. package/dist/esm/ag-grid-plus/setting/MoveNodeModal.js +7 -7
  154. package/dist/esm/ag-grid-plus/setting/NameColumnRenderer.js +6 -6
  155. package/dist/esm/ag-grid-plus/setting/QuerySchemeManager.js +34 -34
  156. package/dist/esm/ag-grid-plus/setting/columnGroupUtils.js +76 -76
  157. package/dist/esm/ag-grid-plus/setting/performanceMonitor.js +5 -5
  158. package/dist/esm/ag-grid-plus/shared/storage/backendApiAdapter.js +46 -46
  159. package/dist/esm/ag-grid-plus/shared/storage/localStorageAdapter.js +39 -39
  160. package/dist/esm/ag-grid-plus/shared/utils/schemeDataMigration.js +18 -18
  161. package/dist/esm/ag-grid-plus/theme.js +3 -3
  162. package/dist/esm/ag-grid-plus/toolBar/index.js +4 -4
  163. package/dist/esm/ag-grid-plus/utils/columnProcessors.js +52 -52
  164. package/dist/esm/ag-grid-plus/utils/constants.js +22 -22
  165. package/dist/esm/ag-grid-plus/utils/entityExtensionColumns.js +20 -20
  166. package/dist/esm/ag-grid-plus/utils/logger.js +2 -2
  167. package/dist/esm/ag-grid-plus/utils/sanitize.js +10 -10
  168. package/dist/esm/ag-grid-plus/utils.js +3 -3
  169. package/dist/esm/array-table/columnHelper.js +43 -43
  170. package/dist/esm/array-table/hooks.js +11 -9
  171. package/dist/esm/array-table/index.js +40 -41
  172. package/dist/esm/array-table/utils.js +4 -3
  173. package/dist/esm/components/RegexEditor/core/RegexEditor.js +32 -32
  174. package/dist/esm/components/RegexEditor/core/RegexEditor.less +119 -119
  175. package/dist/esm/components/RegexEditor/core/extensions/errorMarker.js +52 -52
  176. package/dist/esm/components/RegexEditor/hooks/index.js +4 -4
  177. package/dist/esm/components/RegexEditor/hooks/useRegexTester.js +48 -48
  178. package/dist/esm/components/RegexEditor/hooks/useRegexValidation.js +54 -54
  179. package/dist/esm/components/RegexEditor/hooks/useTemplateManager.js +5 -5
  180. package/dist/esm/components/RegexEditor/templates/TemplateSelector.js +28 -28
  181. package/dist/esm/components/RegexEditor/templates/builtinTemplates.js +24 -24
  182. package/dist/esm/components/RegexEditor/templates/index.js +2 -2
  183. package/dist/esm/components/RegexEditor/templates/storage.js +29 -29
  184. package/dist/esm/components/RegexEditor/templates/templateManager.js +29 -29
  185. package/dist/esm/components/RegexEditor/templates/types.js +74 -74
  186. package/dist/esm/components/RegexEditor/validation/complexity.js +40 -40
  187. package/dist/esm/components/RegexEditor/validation/parser.js +47 -47
  188. package/dist/esm/components/RegexEditor/validation/validator.js +54 -54
  189. package/dist/esm/components/RegexEditor/visualizer/FlagsSelector.js +19 -19
  190. package/dist/esm/components/RegexEditor/visualizer/MatchItem.js +20 -20
  191. package/dist/esm/components/RegexEditor/visualizer/RegexRailroadDiagram.js +15 -15
  192. package/dist/esm/components/RegexEditor/visualizer/RegexTester.js +17 -17
  193. package/dist/esm/components/RegexEditor/visualizer/astToRailroad.js +11 -11
  194. package/dist/esm/components/RegexEditor/visualizer/index.js +5 -5
  195. package/dist/esm/components/RegexEditor/visualizer/utils.js +92 -92
  196. package/dist/esm/dashboard/dashboard/components/toolbar/style/index.less +49 -49
  197. package/dist/esm/dashboard/dashboard/index.less +173 -173
  198. package/dist/esm/dashboard/dashboard/utils.js +4 -4
  199. package/dist/esm/dashboard/utils.js +8 -8
  200. package/dist/esm/dashboard/widget/index.less +7 -7
  201. package/dist/esm/dashboard/widget/selector/index.less +172 -172
  202. package/dist/esm/deleteConfirm/index.js +17 -17
  203. package/dist/esm/draggableModal/index.js +4 -4
  204. package/dist/esm/draggableModal/style.less +122 -122
  205. package/dist/esm/editable/index.js +16 -1
  206. package/dist/esm/formDesigner/arrayTable/styles.less +2 -2
  207. package/dist/esm/formDesigner/index.less +2 -2
  208. package/dist/esm/fullScreenAlert/index.js +13 -13
  209. package/dist/esm/fullScreenAlert/index.less +133 -133
  210. package/dist/esm/generatedListPage/ConfigurableToolbar.js +2 -2
  211. package/dist/esm/generatedListPage/GeneratedListPage.js +20 -20
  212. package/dist/esm/generatedListPage/OptionsColumn.js +3 -3
  213. package/dist/esm/generatedListPage/PerformanceMonitor.js +9 -9
  214. package/dist/esm/generatedListPage/RequestManager.js +39 -39
  215. package/dist/esm/generatedListPage/_utils/AccessWrapper.js +6 -6
  216. package/dist/esm/generatedListPage/_utils/defaultHandlers.js +14 -14
  217. package/dist/esm/generatedListPage/index.js +9 -9
  218. package/dist/esm/generatedListPage/usePermissionCheck.js +27 -27
  219. package/dist/esm/generatedListPage/useRequestManager.js +20 -20
  220. package/dist/esm/importModal/index.js +4 -4
  221. package/dist/esm/standardFormDialog/FormValidation.js +45 -45
  222. package/dist/esm/standardFormDialog/PortalManager.js +46 -46
  223. package/dist/esm/standardFormDialog/StandardFormDialog.js +20 -20
  224. package/dist/esm/standardFormDialog/useStandardFormSchema.js +24 -24
  225. package/dist/esm/standardFormDialog/withStandardForm.d.ts +2 -2
  226. package/dist/esm/toolBar/index.less +25 -25
  227. package/dist/esm/types/railroad-diagrams.d.ts +59 -59
  228. package/dist/esm/types/regexp-tree.d.ts +175 -175
  229. package/dist/umd/qc-ui.min.js +1 -1
  230. package/package.json +90 -90
  231. package/dist/cjs/ag-grid-plus/shared/hooks/useSchemeManager.d.ts +0 -66
  232. package/dist/cjs/ag-grid-plus/shared/hooks/useSchemeManager.js +0 -648
  233. package/dist/esm/ag-grid-plus/shared/hooks/useSchemeManager.d.ts +0 -66
  234. package/dist/esm/ag-grid-plus/shared/hooks/useSchemeManager.js +0 -643
@@ -9,11 +9,11 @@ var _antd = require("antd");
9
9
  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 e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
10
10
  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); } }
11
11
  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); }); }; }
12
- /**
13
- * 默认的导出处理器
14
- * @param exportApi 导出API函数
15
- * @param params 导出参数
16
- * @param fileName 文件名
12
+ /**
13
+ * 默认的导出处理器
14
+ * @param exportApi 导出API函数
15
+ * @param params 导出参数
16
+ * @param fileName 文件名
17
17
  */
18
18
  var defaultHandleExport = exports.defaultHandleExport = /*#__PURE__*/function () {
19
19
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(exportApi, params, fileName) {
@@ -76,11 +76,11 @@ var defaultHandleExport = exports.defaultHandleExport = /*#__PURE__*/function ()
76
76
  };
77
77
  }();
78
78
 
79
- /**
80
- * 默认的删除处理器
81
- * @param deleteApi 删除API函数
82
- * @param id 要删除的ID
83
- * @param onSuccess 成功回调
79
+ /**
80
+ * 默认的删除处理器
81
+ * @param deleteApi 删除API函数
82
+ * @param id 要删除的ID
83
+ * @param onSuccess 成功回调
84
84
  */
85
85
  var defaultHandleDelete = exports.defaultHandleDelete = /*#__PURE__*/function () {
86
86
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(deleteApi, id, onSuccess) {
@@ -123,10 +123,10 @@ var defaultHandleDelete = exports.defaultHandleDelete = /*#__PURE__*/function ()
123
123
  };
124
124
  }();
125
125
 
126
- /**
127
- * 文件下载工具函数
128
- * @param blob 文件Blob对象
129
- * @param fileName 文件名
126
+ /**
127
+ * 文件下载工具函数
128
+ * @param blob 文件Blob对象
129
+ * @param fileName 文件名
130
130
  */
131
131
  var downloadFile = exports.downloadFile = function downloadFile(blob, fileName) {
132
132
  var url = window.URL.createObjectURL(blob);
@@ -12,23 +12,23 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
12
12
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
13
13
  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; }
14
14
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
15
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
16
- * usePermissionCheck Hook
17
- *
18
- * 提供统一的权限检查功能,避免重复的权限检查逻辑
19
- * 适配版:支持外部传入 access 对象或使用默认的全部允许策略
15
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
16
+ * usePermissionCheck Hook
17
+ *
18
+ * 提供统一的权限检查功能,避免重复的权限检查逻辑
19
+ * 适配版:支持外部传入 access 对象或使用默认的全部允许策略
20
20
  */
21
- /**
22
- * 权限检查 Hook
23
- * @param permissions 权限配置对象(可选)
24
- * @param access 可选的 access 对象(如果不传入,默认全部允许)
25
- * @returns 权限检查结果
21
+ /**
22
+ * 权限检查 Hook
23
+ * @param permissions 权限配置对象(可选)
24
+ * @param access 可选的 access 对象(如果不传入,默认全部允许)
25
+ * @returns 权限检查结果
26
26
  */
27
27
  function usePermissionCheck(permissions, access) {
28
28
  // 缓存权限检查结果
29
29
  var permissionResult = (0, _react.useMemo)(function () {
30
- /**
31
- * 检查单个权限
30
+ /**
31
+ * 检查单个权限
32
32
  */
33
33
  var hasPermission = function hasPermission(permission) {
34
34
  if (!permission) return true; // 未配置权限则默认有权限
@@ -36,8 +36,8 @@ function usePermissionCheck(permissions, access) {
36
36
  return !!access[permission];
37
37
  };
38
38
 
39
- /**
40
- * 检查多个权限(需要全部满足)
39
+ /**
40
+ * 检查多个权限(需要全部满足)
41
41
  */
42
42
  var hasAllPermissions = function hasAllPermissions() {
43
43
  for (var _len = arguments.length, perms = new Array(_len), _key = 0; _key < _len; _key++) {
@@ -49,8 +49,8 @@ function usePermissionCheck(permissions, access) {
49
49
  });
50
50
  };
51
51
 
52
- /**
53
- * 检查多个权限(满足任一即可)
52
+ /**
53
+ * 检查多个权限(满足任一即可)
54
54
  */
55
55
  var hasAnyPermission = function hasAnyPermission() {
56
56
  for (var _len2 = arguments.length, perms = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
@@ -76,9 +76,9 @@ function usePermissionCheck(permissions, access) {
76
76
  return permissionResult;
77
77
  }
78
78
 
79
- /**
80
- * 权限检查工具类
81
- * 用于非 Hook 场景下的权限检查
79
+ /**
80
+ * 权限检查工具类
81
+ * 用于非 Hook 场景下的权限检查
82
82
  */
83
83
  var PermissionChecker = exports.PermissionChecker = /*#__PURE__*/function () {
84
84
  function PermissionChecker(access) {
@@ -87,8 +87,8 @@ var PermissionChecker = exports.PermissionChecker = /*#__PURE__*/function () {
87
87
  this.access = access;
88
88
  }
89
89
 
90
- /**
91
- * 检查单个权限
90
+ /**
91
+ * 检查单个权限
92
92
  */
93
93
  _createClass(PermissionChecker, [{
94
94
  key: "hasPermission",
@@ -97,8 +97,8 @@ var PermissionChecker = exports.PermissionChecker = /*#__PURE__*/function () {
97
97
  return !!this.access[permission];
98
98
  }
99
99
 
100
- /**
101
- * 检查多个权限(需要全部满足)
100
+ /**
101
+ * 检查多个权限(需要全部满足)
102
102
  */
103
103
  }, {
104
104
  key: "hasAllPermissions",
@@ -113,8 +113,8 @@ var PermissionChecker = exports.PermissionChecker = /*#__PURE__*/function () {
113
113
  });
114
114
  }
115
115
 
116
- /**
117
- * 检查多个权限(满足任一即可)
116
+ /**
117
+ * 检查多个权限(满足任一即可)
118
118
  */
119
119
  }, {
120
120
  key: "hasAnyPermission",
@@ -129,8 +129,8 @@ var PermissionChecker = exports.PermissionChecker = /*#__PURE__*/function () {
129
129
  });
130
130
  }
131
131
 
132
- /**
133
- * 检查权限配置对象
132
+ /**
133
+ * 检查权限配置对象
134
134
  */
135
135
  }, {
136
136
  key: "checkConfig",
@@ -10,13 +10,13 @@ var _react = require("react");
10
10
  var _RequestManager = require("./RequestManager");
11
11
  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 e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
12
12
  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); } }
13
- 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); }); }; } /**
14
- * useRequestManager Hook
15
- *
16
- * 为组件提供请求管理功能的 React Hook
13
+ 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); }); }; } /**
14
+ * useRequestManager Hook
15
+ *
16
+ * 为组件提供请求管理功能的 React Hook
17
17
  */
18
- /**
19
- * 使用请求管理器的 Hook
18
+ /**
19
+ * 使用请求管理器的 Hook
20
20
  */
21
21
  function useRequestManager(options) {
22
22
  var managerRef = (0, _react.useRef)();
@@ -34,8 +34,8 @@ function useRequestManager(options) {
34
34
  };
35
35
  }, [manager]);
36
36
 
37
- /**
38
- * 执行请求
37
+ /**
38
+ * 执行请求
39
39
  */
40
40
  var request = (0, _react.useCallback)( /*#__PURE__*/function () {
41
41
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params, requestFn) {
@@ -54,8 +54,8 @@ function useRequestManager(options) {
54
54
  };
55
55
  }(), [manager]);
56
56
 
57
- /**
58
- * 防抖请求
57
+ /**
58
+ * 防抖请求
59
59
  */
60
60
  var debouncedRequest = (0, _react.useCallback)( /*#__PURE__*/function () {
61
61
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(key, params, requestFn) {
@@ -74,36 +74,36 @@ function useRequestManager(options) {
74
74
  };
75
75
  }(), [manager]);
76
76
 
77
- /**
78
- * 取消请求
77
+ /**
78
+ * 取消请求
79
79
  */
80
80
  var cancelRequest = (0, _react.useCallback)(function (params) {
81
81
  manager.cancelRequest(params);
82
82
  }, [manager]);
83
83
 
84
- /**
85
- * 取消所有请求
84
+ /**
85
+ * 取消所有请求
86
86
  */
87
87
  var cancelAllRequests = (0, _react.useCallback)(function () {
88
88
  manager.cancelAllPendingRequests();
89
89
  }, [manager]);
90
90
 
91
- /**
92
- * 清理缓存
91
+ /**
92
+ * 清理缓存
93
93
  */
94
94
  var clearCache = (0, _react.useCallback)(function () {
95
95
  manager.clearCache();
96
96
  }, [manager]);
97
97
 
98
- /**
99
- * 清理过期缓存
98
+ /**
99
+ * 清理过期缓存
100
100
  */
101
101
  var cleanupCache = (0, _react.useCallback)(function () {
102
102
  manager.cleanupExpiredCache();
103
103
  }, [manager]);
104
104
 
105
- /**
106
- * 获取统计信息
105
+ /**
106
+ * 获取统计信息
107
107
  */
108
108
  var getStats = (0, _react.useCallback)(function () {
109
109
  return manager.getStats();
@@ -16,8 +16,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
16
16
  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; }
17
17
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
18
18
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
19
- /**
20
- * 默认的下载 Blob 实现
19
+ /**
20
+ * 默认的下载 Blob 实现
21
21
  */
22
22
  var defaultDownloadBlob = function defaultDownloadBlob(url, filename) {
23
23
  var link = document.createElement('a');
@@ -26,8 +26,8 @@ var defaultDownloadBlob = function defaultDownloadBlob(url, filename) {
26
26
  link.click();
27
27
  };
28
28
 
29
- /**
30
- * 通用导入弹出框
29
+ /**
30
+ * 通用导入弹出框
31
31
  */
32
32
  var ImportModal = function ImportModal(props) {
33
33
  var onAfterSubmit = props.onAfterSubmit,
@@ -10,14 +10,14 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
10
10
  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; }
11
11
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
12
12
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
13
- /**
14
- * 表单验证工具函数
13
+ /**
14
+ * 表单验证工具函数
15
15
  */
16
16
 
17
17
  // 常用验证规则
18
18
  var ValidationRules = exports.ValidationRules = {
19
- /**
20
- * 必填验证
19
+ /**
20
+ * 必填验证
21
21
  */
22
22
  required: function required(message) {
23
23
  return {
@@ -25,8 +25,8 @@ var ValidationRules = exports.ValidationRules = {
25
25
  message: message || '此字段为必填项'
26
26
  };
27
27
  },
28
- /**
29
- * 邮箱验证
28
+ /**
29
+ * 邮箱验证
30
30
  */
31
31
  email: function email(message) {
32
32
  return {
@@ -34,8 +34,8 @@ var ValidationRules = exports.ValidationRules = {
34
34
  message: message || '请输入有效的邮箱地址'
35
35
  };
36
36
  },
37
- /**
38
- * 手机号验证
37
+ /**
38
+ * 手机号验证
39
39
  */
40
40
  phone: function phone(message) {
41
41
  return {
@@ -43,8 +43,8 @@ var ValidationRules = exports.ValidationRules = {
43
43
  message: message || '请输入有效的手机号码'
44
44
  };
45
45
  },
46
- /**
47
- * 长度验证
46
+ /**
47
+ * 长度验证
48
48
  */
49
49
  length: function length(min, max, message) {
50
50
  if (max) {
@@ -59,8 +59,8 @@ var ValidationRules = exports.ValidationRules = {
59
59
  message: message || "\u957F\u5EA6\u4E0D\u80FD\u5C11\u4E8E".concat(min, "\u4E2A\u5B57\u7B26")
60
60
  };
61
61
  },
62
- /**
63
- * 数字范围验证
62
+ /**
63
+ * 数字范围验证
64
64
  */
65
65
  range: function range(min, max, message) {
66
66
  if (max !== undefined) {
@@ -75,8 +75,8 @@ var ValidationRules = exports.ValidationRules = {
75
75
  message: message || "\u503C\u4E0D\u80FD\u5C0F\u4E8E".concat(min)
76
76
  };
77
77
  },
78
- /**
79
- * 正则表达式验证
78
+ /**
79
+ * 正则表达式验证
80
80
  */
81
81
  pattern: function pattern(_pattern, message) {
82
82
  return {
@@ -84,8 +84,8 @@ var ValidationRules = exports.ValidationRules = {
84
84
  message: message
85
85
  };
86
86
  },
87
- /**
88
- * 身份证号验证
87
+ /**
88
+ * 身份证号验证
89
89
  */
90
90
  idCard: function idCard(message) {
91
91
  return {
@@ -93,8 +93,8 @@ var ValidationRules = exports.ValidationRules = {
93
93
  message: message || '请输入有效的身份证号码'
94
94
  };
95
95
  },
96
- /**
97
- * URL验证
96
+ /**
97
+ * URL验证
98
98
  */
99
99
  url: function url(message) {
100
100
  return {
@@ -102,8 +102,8 @@ var ValidationRules = exports.ValidationRules = {
102
102
  message: message || '请输入有效的URL地址'
103
103
  };
104
104
  },
105
- /**
106
- * 整数验证
105
+ /**
106
+ * 整数验证
107
107
  */
108
108
  integer: function integer(message) {
109
109
  return {
@@ -111,8 +111,8 @@ var ValidationRules = exports.ValidationRules = {
111
111
  message: message || '请输入整数'
112
112
  };
113
113
  },
114
- /**
115
- * 正整数验证
114
+ /**
115
+ * 正整数验证
116
116
  */
117
117
  positiveInteger: function positiveInteger(message) {
118
118
  return {
@@ -120,8 +120,8 @@ var ValidationRules = exports.ValidationRules = {
120
120
  message: message || '请输入正整数'
121
121
  };
122
122
  },
123
- /**
124
- * 非负整数验证
123
+ /**
124
+ * 非负整数验证
125
125
  */
126
126
  nonNegativeInteger: function nonNegativeInteger(message) {
127
127
  return {
@@ -129,8 +129,8 @@ var ValidationRules = exports.ValidationRules = {
129
129
  message: message || '请输入非负整数'
130
130
  };
131
131
  },
132
- /**
133
- * 小数验证
132
+ /**
133
+ * 小数验证
134
134
  */
135
135
  decimal: function decimal(precision, message) {
136
136
  var pattern = precision ? new RegExp("^-?\\d+(\\.\\d{1,".concat(precision, "})?$")) : /^-?\d+(\.\d+)?$/;
@@ -158,56 +158,56 @@ var conditionalValidation = exports.conditionalValidation = function conditional
158
158
 
159
159
  // 常用验证组合
160
160
  var CommonValidations = exports.CommonValidations = {
161
- /**
162
- * 编码字段(必填,长度限制,字母数字)
161
+ /**
162
+ * 编码字段(必填,长度限制,字母数字)
163
163
  */
164
164
  code: function code() {
165
165
  var maxLength = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 50;
166
166
  return combineValidation(ValidationRules.required('编码不能为空'), ValidationRules.length(1, maxLength), ValidationRules.pattern(/^[a-zA-Z0-9_-]+$/, '编码只能包含字母、数字、下划线和短横线'));
167
167
  },
168
- /**
169
- * 名称字段(必填,长度限制)
168
+ /**
169
+ * 名称字段(必填,长度限制)
170
170
  */
171
171
  name: function name() {
172
172
  var maxLength = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 100;
173
173
  return combineValidation(ValidationRules.required('名称不能为空'), ValidationRules.length(1, maxLength));
174
174
  },
175
- /**
176
- * 手机号字段(必填,格式验证)
175
+ /**
176
+ * 手机号字段(必填,格式验证)
177
177
  */
178
178
  requiredPhone: function requiredPhone() {
179
179
  return combineValidation(ValidationRules.required('手机号不能为空'), ValidationRules.phone());
180
180
  },
181
- /**
182
- * 邮箱字段(必填,格式验证)
181
+ /**
182
+ * 邮箱字段(必填,格式验证)
183
183
  */
184
184
  requiredEmail: function requiredEmail() {
185
185
  return combineValidation(ValidationRules.required('邮箱不能为空'), ValidationRules.email());
186
186
  },
187
- /**
188
- * 备注字段(可选,长度限制)
187
+ /**
188
+ * 备注字段(可选,长度限制)
189
189
  */
190
190
  remark: function remark() {
191
191
  var maxLength = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 500;
192
192
  return [ValidationRules.length(0, maxLength)];
193
193
  },
194
- /**
195
- * 金额字段(必填,非负数,两位小数)
194
+ /**
195
+ * 金额字段(必填,非负数,两位小数)
196
196
  */
197
197
  amount: function amount() {
198
198
  return combineValidation(ValidationRules.required('金额不能为空'), ValidationRules.decimal(2, '请输入有效的金额(最多2位小数)'), ValidationRules.range(0, undefined, '金额不能为负数'));
199
199
  },
200
- /**
201
- * 数量字段(必填,正整数)
200
+ /**
201
+ * 数量字段(必填,正整数)
202
202
  */
203
203
  quantity: function quantity() {
204
204
  return combineValidation(ValidationRules.required('数量不能为空'), ValidationRules.positiveInteger('请输入正整数'));
205
205
  }
206
206
  };
207
207
 
208
- /**
209
- * 表单字段增强工具
210
- * 为FieldCreators添加验证功能
208
+ /**
209
+ * 表单字段增强工具
210
+ * 为FieldCreators添加验证功能
211
211
  */
212
212
  var enhanceFieldWithValidation = exports.enhanceFieldWithValidation = function enhanceFieldWithValidation(field, validations) {
213
213
  return _objectSpread(_objectSpread({}, field), {}, {
@@ -215,8 +215,8 @@ var enhanceFieldWithValidation = exports.enhanceFieldWithValidation = function e
215
215
  });
216
216
  };
217
217
 
218
- /**
219
- * 批量添加验证的工具函数
218
+ /**
219
+ * 批量添加验证的工具函数
220
220
  */
221
221
  var addValidationToFields = exports.addValidationToFields = function addValidationToFields(fields, validationMap) {
222
222
  var result = _objectSpread({}, fields);