eli-video-interview 1.2.40-alpha.8 → 1.2.41-alpha.0

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 (149) hide show
  1. package/esm/components/Charts/ReportPie.js +21 -6
  2. package/esm/components/SvgIcon/index.js +17 -1
  3. package/esm/components/react-photo-view/PhotoBox.js +32 -7
  4. package/esm/components/react-photo-view/PhotoPage.js +18 -2
  5. package/esm/components/react-photo-view/PhotoProvider.js +17 -1
  6. package/esm/components/react-photo-view/PhotoSlider.js +19 -3
  7. package/esm/components/react-photo-view/hooks/useAnimationOrigin.js +18 -2
  8. package/esm/components/react-photo-view/hooks/useAnimationPosition.js +18 -2
  9. package/esm/components/react-photo-view/hooks/useAnimationVisible.js +19 -3
  10. package/esm/components/react-photo-view/hooks/useContinuousTap.js +28 -3
  11. package/esm/components/react-photo-view/hooks/useMethods.js +17 -1
  12. package/esm/components/react-photo-view/hooks/useScrollPosition.js +21 -5
  13. package/esm/components/react-photo-view/hooks/useTargetScale.js +17 -1
  14. package/esm/components/react-photo-view/utils/getPositionOnMoveOrScale.js +18 -2
  15. package/esm/components/react-photo-view/utils/getSuitableImageSize.js +17 -1
  16. package/esm/modules/ai-ability/Root.js +21 -5
  17. package/esm/modules/ai-ability/components/AbilityFormItem/index.js +18 -2
  18. package/esm/modules/ai-ability/components/AddAbility/index.js +19 -3
  19. package/esm/modules/ai-ability/components/UpdateAbility/index.js +21 -5
  20. package/esm/modules/ai-ability-select/components/AiAbilityItem/index.js +17 -1
  21. package/esm/modules/ai-question/components/AiAnalysis/MainPoints.js +17 -1
  22. package/esm/modules/ai-question/components/AiAnalysis/MainPointsItem.js +17 -1
  23. package/esm/modules/ai-question/components/AiAnalysis/index.js +17 -1
  24. package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +23 -7
  25. package/esm/modules/ai-question/components/AiAssessmentCriteria/utils.js +17 -1
  26. package/esm/modules/ai-question/components/BaseAccordion/index.js +19 -3
  27. package/esm/modules/ai-question/components/BootVideo/index.js +22 -6
  28. package/esm/modules/ai-question/components/QuestionModel/Interactive.js +17 -1
  29. package/esm/modules/ai-question/components/QuestionModel/Item.js +37 -3
  30. package/esm/modules/ai-question/components/QuestionPreview/index.js +18 -2
  31. package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +18 -2
  32. package/esm/modules/ai-question/components/QuestionUpdate/Chioce.js +17 -1
  33. package/esm/modules/ai-question/components/QuestionUpdate/Form.js +23 -6
  34. package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +17 -1
  35. package/esm/modules/ai-question/components/QuestionUpdate/Score.d.ts +15 -0
  36. package/esm/modules/ai-question/components/QuestionUpdate/Score.js +69 -0
  37. package/esm/modules/ai-question/components/QuestionUpdate/SelectQuestion.js +18 -2
  38. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.js +20 -4
  39. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +18 -2
  40. package/esm/modules/ai-question/components/QuestionUpdate/const.js +1 -0
  41. package/esm/modules/ai-question/components/QuestionUpdate/index.js +18 -2
  42. package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +1 -0
  43. package/esm/modules/ai-report/components/AIEvaluate/Evaluate.js +18 -2
  44. package/esm/modules/ai-report/components/AIEvaluate/Graph.js +18 -2
  45. package/esm/modules/ai-report/components/AIEvaluate/index.js +17 -1
  46. package/esm/modules/ai-report/components/MenuAnchor/index.js +18 -2
  47. package/esm/modules/ai-report/components/RankingRange/Item.js +17 -1
  48. package/esm/modules/ai-report/components/RankingRange/index.js +18 -2
  49. package/esm/modules/ai-report/components/ScoreReport/Bar.js +18 -2
  50. package/esm/modules/ai-report/components/ScoreReport/Score.js +19 -3
  51. package/esm/modules/ai-report/components/VideoQuestion/Abilities.js +3 -1
  52. package/esm/modules/ai-report/components/VideoQuestion/BodyImages.js +18 -2
  53. package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +25 -5
  54. package/esm/modules/ai-report/components/VideoQuestion/ScoreSlider.js +17 -1
  55. package/esm/modules/ai-report/components/VideoQuestion/index.js +1 -1
  56. package/esm/modules/ai-report/components/WorkPlaces/WorkPlace.js +18 -2
  57. package/esm/modules/ai-report/interface.d.ts +1 -0
  58. package/esm/modules/ai-template/Root.js +18 -2
  59. package/esm/modules/ai-template/components/QuestionList/Item.js +17 -1
  60. package/esm/modules/ai-template/components/TemplateList/index.js +17 -1
  61. package/esm/modules/ai-template/components/TemplateMenu/index.js +19 -3
  62. package/esm/store/ai-ability/question-ability-store.js +19 -3
  63. package/esm/store/ai-ability-select/question-ability-store.js +20 -4
  64. package/esm/store/ai-question/ai-analysis-store.js +22 -6
  65. package/esm/store/ai-question/boot-video-store.js +20 -4
  66. package/esm/store/ai-question/global-store.js +20 -4
  67. package/esm/store/ai-question/interview-room-store.js +20 -4
  68. package/esm/store/ai-question/question-model-store.js +19 -3
  69. package/esm/store/ai-question/question-preview-store.js +20 -4
  70. package/esm/store/ai-question/question-template-store.js +19 -3
  71. package/esm/store/ai-question/question-update-store.js +20 -4
  72. package/esm/store/ai-report/global-store.js +21 -5
  73. package/esm/store/ai-template/global-store.js +20 -4
  74. package/esm/store/enterprise/enterprise-store.js +20 -4
  75. package/lib/components/Charts/ReportPie.js +21 -6
  76. package/lib/components/SvgIcon/index.js +17 -1
  77. package/lib/components/react-photo-view/PhotoBox.js +32 -7
  78. package/lib/components/react-photo-view/PhotoPage.js +18 -2
  79. package/lib/components/react-photo-view/PhotoProvider.js +17 -1
  80. package/lib/components/react-photo-view/PhotoSlider.js +19 -3
  81. package/lib/components/react-photo-view/hooks/useAnimationOrigin.js +18 -2
  82. package/lib/components/react-photo-view/hooks/useAnimationPosition.js +18 -2
  83. package/lib/components/react-photo-view/hooks/useAnimationVisible.js +19 -3
  84. package/lib/components/react-photo-view/hooks/useContinuousTap.js +28 -3
  85. package/lib/components/react-photo-view/hooks/useMethods.js +17 -1
  86. package/lib/components/react-photo-view/hooks/useScrollPosition.js +21 -5
  87. package/lib/components/react-photo-view/hooks/useTargetScale.js +17 -1
  88. package/lib/components/react-photo-view/utils/getPositionOnMoveOrScale.js +18 -2
  89. package/lib/components/react-photo-view/utils/getSuitableImageSize.js +17 -1
  90. package/lib/modules/ai-ability/Root.js +21 -5
  91. package/lib/modules/ai-ability/components/AbilityFormItem/index.js +18 -2
  92. package/lib/modules/ai-ability/components/AddAbility/index.js +19 -3
  93. package/lib/modules/ai-ability/components/UpdateAbility/index.js +21 -5
  94. package/lib/modules/ai-ability-select/components/AiAbilityItem/index.js +17 -1
  95. package/lib/modules/ai-question/components/AiAnalysis/MainPoints.js +17 -1
  96. package/lib/modules/ai-question/components/AiAnalysis/MainPointsItem.js +17 -1
  97. package/lib/modules/ai-question/components/AiAnalysis/index.js +17 -1
  98. package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +23 -7
  99. package/lib/modules/ai-question/components/AiAssessmentCriteria/utils.js +17 -1
  100. package/lib/modules/ai-question/components/BaseAccordion/index.js +19 -3
  101. package/lib/modules/ai-question/components/BootVideo/index.js +22 -6
  102. package/lib/modules/ai-question/components/QuestionModel/Interactive.js +17 -1
  103. package/lib/modules/ai-question/components/QuestionModel/Item.js +36 -2
  104. package/lib/modules/ai-question/components/QuestionPreview/index.js +18 -2
  105. package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +18 -2
  106. package/lib/modules/ai-question/components/QuestionUpdate/Chioce.js +17 -1
  107. package/lib/modules/ai-question/components/QuestionUpdate/Form.js +23 -6
  108. package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +17 -1
  109. package/lib/modules/ai-question/components/QuestionUpdate/Score.d.ts +15 -0
  110. package/lib/modules/ai-question/components/QuestionUpdate/Score.js +73 -0
  111. package/lib/modules/ai-question/components/QuestionUpdate/SelectQuestion.js +18 -2
  112. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.js +20 -4
  113. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +18 -2
  114. package/lib/modules/ai-question/components/QuestionUpdate/const.js +1 -0
  115. package/lib/modules/ai-question/components/QuestionUpdate/index.js +18 -2
  116. package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +1 -0
  117. package/lib/modules/ai-report/components/AIEvaluate/Evaluate.js +18 -2
  118. package/lib/modules/ai-report/components/AIEvaluate/Graph.js +18 -2
  119. package/lib/modules/ai-report/components/AIEvaluate/index.js +17 -1
  120. package/lib/modules/ai-report/components/MenuAnchor/index.js +18 -2
  121. package/lib/modules/ai-report/components/RankingRange/Item.js +17 -1
  122. package/lib/modules/ai-report/components/RankingRange/index.js +18 -2
  123. package/lib/modules/ai-report/components/ScoreReport/Bar.js +18 -2
  124. package/lib/modules/ai-report/components/ScoreReport/Score.js +19 -3
  125. package/lib/modules/ai-report/components/VideoQuestion/Abilities.js +3 -1
  126. package/lib/modules/ai-report/components/VideoQuestion/BodyImages.js +18 -2
  127. package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +25 -5
  128. package/lib/modules/ai-report/components/VideoQuestion/ScoreSlider.js +17 -1
  129. package/lib/modules/ai-report/components/VideoQuestion/index.js +1 -1
  130. package/lib/modules/ai-report/components/WorkPlaces/WorkPlace.js +18 -2
  131. package/lib/modules/ai-report/interface.d.ts +1 -0
  132. package/lib/modules/ai-template/Root.js +18 -2
  133. package/lib/modules/ai-template/components/QuestionList/Item.js +17 -1
  134. package/lib/modules/ai-template/components/TemplateList/index.js +17 -1
  135. package/lib/modules/ai-template/components/TemplateMenu/index.js +19 -3
  136. package/lib/store/ai-ability/question-ability-store.js +19 -3
  137. package/lib/store/ai-ability-select/question-ability-store.js +20 -4
  138. package/lib/store/ai-question/ai-analysis-store.js +22 -6
  139. package/lib/store/ai-question/boot-video-store.js +20 -4
  140. package/lib/store/ai-question/global-store.js +20 -4
  141. package/lib/store/ai-question/interview-room-store.js +20 -4
  142. package/lib/store/ai-question/question-model-store.js +19 -3
  143. package/lib/store/ai-question/question-preview-store.js +20 -4
  144. package/lib/store/ai-question/question-template-store.js +19 -3
  145. package/lib/store/ai-question/question-update-store.js +20 -4
  146. package/lib/store/ai-report/global-store.js +21 -5
  147. package/lib/store/ai-template/global-store.js +20 -4
  148. package/lib/store/enterprise/enterprise-store.js +20 -4
  149. package/package.json +1 -1
@@ -20,6 +20,22 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  }
21
21
  return t;
22
22
  };
23
+ var __read = (this && this.__read) || function (o, n) {
24
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
25
+ if (!m) return o;
26
+ var i = m.call(o), r, ar = [], e;
27
+ try {
28
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
29
+ }
30
+ catch (error) { e = { error: error }; }
31
+ finally {
32
+ try {
33
+ if (r && !r.done && (m = i["return"])) m.call(i);
34
+ }
35
+ finally { if (e) throw e.error; }
36
+ }
37
+ return ar;
38
+ };
23
39
  import { jsx as _jsx } from "react/jsx-runtime";
24
40
  import { levelMapping } from './const';
25
41
  import Chart from "./Chart";
@@ -31,7 +47,7 @@ var formateTitle = function (originalTitle) {
31
47
  }
32
48
  return originalTitle;
33
49
  }
34
- var _a = originalTitle.match(regex), no = _a[1];
50
+ var _a = __read(originalTitle.match(regex), 2), no = _a[1];
35
51
  return "\u7B2C".concat(no, "\u9898");
36
52
  };
37
53
  var ReportPie = function (props) {
@@ -46,14 +62,13 @@ var ReportPie = function (props) {
46
62
  }).includes(0);
47
63
  var min = Math.min.apply(Math, scores);
48
64
  var max = Math.max.apply(Math, scores);
49
- var data = source
50
- .map(function (_a) {
65
+ var data = source.map(function (_a) {
51
66
  var name = _a.name, score = _a.score, params = __rest(_a, ["name", "score"]);
52
67
  return (__assign({ name: formateTitle(name), originalName: name, value: score }, params));
53
- })
54
- .sort(function (a, b) {
55
- return a.weight - b.weight;
56
68
  });
69
+ // .sort(function (a, b) {
70
+ // return a.weight - b.weight;
71
+ // });
57
72
  var options = {
58
73
  tooltip: {
59
74
  trigger: 'item',
@@ -20,12 +20,28 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  }
21
21
  return t;
22
22
  };
23
+ var __read = (this && this.__read) || function (o, n) {
24
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
25
+ if (!m) return o;
26
+ var i = m.call(o), r, ar = [], e;
27
+ try {
28
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
29
+ }
30
+ catch (error) { e = { error: error }; }
31
+ finally {
32
+ try {
33
+ if (r && !r.done && (m = i["return"])) m.call(i);
34
+ }
35
+ finally { if (e) throw e.error; }
36
+ }
37
+ return ar;
38
+ };
23
39
  import { jsx as _jsx } from "react/jsx-runtime";
24
40
  import { useState } from 'react';
25
41
  import { ReactSVG } from 'react-svg';
26
42
  var Icon = function (_a) {
27
43
  var name = _a.name, props = __rest(_a, ["name"]);
28
- var _b = useState(''), src = _b[0], setSrc = _b[1];
44
+ var _b = __read(useState(''), 2), src = _b[0], setSrc = _b[1];
29
45
  import("../../assets/icons/".concat(name, ".svg")).then(function (v) { return setSrc(v.default); });
30
46
  return _jsx(ReactSVG, __assign({ src: src }, props));
31
47
  };
@@ -9,6 +9,31 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
+ var __read = (this && this.__read) || function (o, n) {
13
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
14
+ if (!m) return o;
15
+ var i = m.call(o), r, ar = [], e;
16
+ try {
17
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
18
+ }
19
+ catch (error) { e = { error: error }; }
20
+ finally {
21
+ try {
22
+ if (r && !r.done && (m = i["return"])) m.call(i);
23
+ }
24
+ finally { if (e) throw e.error; }
25
+ }
26
+ return ar;
27
+ };
28
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
29
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
30
+ if (ar || !(i in from)) {
31
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
32
+ ar[i] = from[i];
33
+ }
34
+ }
35
+ return to.concat(ar || Array.prototype.slice.call(from));
36
+ };
12
37
  import { jsx as _jsx } from "react/jsx-runtime";
13
38
  import { useRef } from 'react';
14
39
  import useAnimationPosition from './hooks/useAnimationPosition';
@@ -82,7 +107,7 @@ var initialState = {
82
107
  };
83
108
  export default function PhotoBox(_a) {
84
109
  var _b = _a.item, src = _b.src, render = _b.render, _c = _b.width, customWidth = _c === void 0 ? 0 : _c, _d = _b.height, customHeight = _d === void 0 ? 0 : _d, originRef = _b.originRef, visible = _a.visible, speed = _a.speed, easing = _a.easing, wrapClassName = _a.wrapClassName, className = _a.className, style = _a.style, loadingElement = _a.loadingElement, brokenElement = _a.brokenElement, onPhotoTap = _a.onPhotoTap, onMaskTap = _a.onMaskTap, onReachMove = _a.onReachMove, onReachUp = _a.onReachUp, onPhotoResize = _a.onPhotoResize, isActive = _a.isActive, expose = _a.expose;
85
- var _e = useSetState(initialState), state = _e[0], updateState = _e[1];
110
+ var _e = __read(useSetState(initialState), 2), state = _e[0], updateState = _e[1];
86
111
  var initialTouchRef = useRef(0);
87
112
  var mounted = useMountedRef();
88
113
  var _f = state.naturalWidth, naturalWidth = _f === void 0 ? customWidth : _f, _g = state.naturalHeight, naturalHeight = _g === void 0 ? customHeight : _g, _h = state.width, width = _h === void 0 ? customWidth : _h, _j = state.height, height = _j === void 0 ? customHeight : _j, _k = state.loaded, loaded = _k === void 0 ? !src : _k, broken = state.broken, x = state.x, y = state.y, touched = state.touched, stopRaf = state.stopRaf, maskTouched = state.maskTouched, rotate = state.rotate, scale = state.scale, CX = state.CX, CY = state.CY, lastX = state.lastX, lastY = state.lastY, lastCX = state.lastCX, lastCY = state.lastCY, lastScale = state.lastScale, touchTime = state.touchTime, touchLength = state.touchLength, pause = state.pause, reach = state.reach;
@@ -106,7 +131,7 @@ export default function PhotoBox(_a) {
106
131
  if (currentTouchLength === void 0) { currentTouchLength = 0; }
107
132
  if ((touched || maskTouched) && isActive) {
108
133
  // 通过旋转调换宽高
109
- var _a = getRotateSize(rotate, width, height), currentWidth_1 = _a[0], currentHeight_1 = _a[1];
134
+ var _a = __read(getRotateSize(rotate, width, height), 2), currentWidth_1 = _a[0], currentHeight_1 = _a[1];
110
135
  // 单指最小缩放下,以初始移动距离来判断意图
111
136
  if (currentTouchLength === 0 && initialTouchRef.current === 0) {
112
137
  var isStillX = Math.abs(nextClientX - CX) <= minStartTouchOffset;
@@ -126,8 +151,8 @@ export default function PhotoBox(_a) {
126
151
  var currentReach = undefined;
127
152
  if (currentTouchLength === 0) {
128
153
  // 边缘超出状态
129
- var horizontalCloseEdge = computePositionEdge(offsetX + lastX, scale, currentWidth_1, window.innerWidth)[0];
130
- var verticalCloseEdge = computePositionEdge(offsetY + lastY, scale, currentHeight_1, window.innerHeight)[0];
154
+ var _b = __read(computePositionEdge(offsetX + lastX, scale, currentWidth_1, window.innerWidth), 1), horizontalCloseEdge = _b[0];
155
+ var _c = __read(computePositionEdge(offsetY + lastY, scale, currentHeight_1, window.innerHeight), 1), verticalCloseEdge = _c[0];
131
156
  // 边缘触发检测
132
157
  currentReach = getReachType(initialTouchRef.current, horizontalCloseEdge, verticalCloseEdge, reach);
133
158
  // 接触边缘
@@ -210,7 +235,7 @@ export default function PhotoBox(_a) {
210
235
  useEventListener(isTouchDevice ? 'touchmove' : undefined, function (e) {
211
236
  e.preventDefault();
212
237
  var position = getMultipleTouchPosition(e);
213
- handleMove.apply(void 0, position);
238
+ handleMove.apply(void 0, __spreadArray([], __read(position), false));
214
239
  }, { passive: false });
215
240
  useEventListener(isTouchDevice ? 'touchend' : undefined, function (_a) {
216
241
  var changedTouches = _a.changedTouches;
@@ -265,7 +290,7 @@ export default function PhotoBox(_a) {
265
290
  }
266
291
  function handleTouchStart(e) {
267
292
  e.stopPropagation();
268
- handleStart.apply(void 0, getMultipleTouchPosition(e));
293
+ handleStart.apply(void 0, __spreadArray([], __read(getMultipleTouchPosition(e)), false));
269
294
  }
270
295
  function handleMouseDown(e) {
271
296
  e.stopPropagation();
@@ -274,7 +299,7 @@ export default function PhotoBox(_a) {
274
299
  }
275
300
  }
276
301
  // 计算位置
277
- var _l = useAnimationPosition(visible, originRef, loaded, x, y, width, height, scale, speed, function (isPause) { return updateState({ pause: isPause }); }), translateX = _l[0], translateY = _l[1], currentWidth = _l[2], currentHeight = _l[3], currentScale = _l[4], opacity = _l[5], easingMode = _l[6], FIT = _l[7];
302
+ var _l = __read(useAnimationPosition(visible, originRef, loaded, x, y, width, height, scale, speed, function (isPause) { return updateState({ pause: isPause }); }), 8), translateX = _l[0], translateY = _l[1], currentWidth = _l[2], currentHeight = _l[3], currentScale = _l[4], opacity = _l[5], easingMode = _l[6], FIT = _l[7];
278
303
  // 图片 objectFit 渐变时间
279
304
  var transitionLayoutTime = easingMode < 4 ? speed / 2 : easingMode > 4 ? speed : 0;
280
305
  var transitionCSS = "transform ".concat(speed, "ms ").concat(easing);
@@ -9,6 +9,22 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
+ var __read = (this && this.__read) || function (o, n) {
13
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
14
+ if (!m) return o;
15
+ var i = m.call(o), r, ar = [], e;
16
+ try {
17
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
18
+ }
19
+ catch (error) { e = { error: error }; }
20
+ finally {
21
+ try {
22
+ if (r && !r.done && (m = i["return"])) m.call(i);
23
+ }
24
+ finally { if (e) throw e.error; }
25
+ }
26
+ return ar;
27
+ };
12
28
  var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
13
29
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
14
30
  if (ar || !(i in from)) {
@@ -22,7 +38,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
38
  import { useEffect, useState } from 'react';
23
39
  import { Box, KeyboardArrowLeftIcon, KeyboardArrowRightIcon, styled, Typography } from 'fbm-ui';
24
40
  import { Stack } from 'fbm-ui/lib/mui';
25
- var chunk = function (a, n) { return __spreadArray([], Array(Math.ceil(a.length / n)), true).map(function (_, i) { return a.slice(n * i, n + n * i); }); };
41
+ var chunk = function (a, n) { return __spreadArray([], __read(Array(Math.ceil(a.length / n))), false).map(function (_, i) { return a.slice(n * i, n + n * i); }); };
26
42
  var IconButton = styled(Box)(function (_a) {
27
43
  var disabled = _a.disabled;
28
44
  return ({
@@ -57,7 +73,7 @@ var PhotoPage = function (_a) {
57
73
  var images = _a.images, index = _a.index, onSelected = _a.onSelected;
58
74
  var pre = Math.floor((window.innerWidth - 200) / 110);
59
75
  var maxPage = Math.ceil(images.length / pre);
60
- var _b = useState(0), page = _b[0], setPage = _b[1];
76
+ var _b = __read(useState(0), 2), page = _b[0], setPage = _b[1];
61
77
  var handleNext = function () {
62
78
  if (page < maxPage - 1)
63
79
  setPage(function (prevPage) { return prevPage + 1; });
@@ -20,6 +20,22 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  }
21
21
  return t;
22
22
  };
23
+ var __read = (this && this.__read) || function (o, n) {
24
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
25
+ if (!m) return o;
26
+ var i = m.call(o), r, ar = [], e;
27
+ try {
28
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
29
+ }
30
+ catch (error) { e = { error: error }; }
31
+ finally {
32
+ try {
33
+ if (r && !r.done && (m = i["return"])) m.call(i);
34
+ }
35
+ finally { if (e) throw e.error; }
36
+ }
37
+ return ar;
38
+ };
23
39
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
40
  import { useMemo, useRef } from 'react';
25
41
  import useMethods from './hooks/useMethods';
@@ -33,7 +49,7 @@ var initialState = {
33
49
  };
34
50
  export default function PhotoProvider(_a) {
35
51
  var children = _a.children, onIndexChange = _a.onIndexChange, onVisibleChange = _a.onVisibleChange, restProps = __rest(_a, ["children", "onIndexChange", "onVisibleChange"]);
36
- var _b = useSetState(initialState), state = _b[0], updateState = _b[1];
52
+ var _b = __read(useSetState(initialState), 2), state = _b[0], updateState = _b[1];
37
53
  var uniqueIdRef = useRef(0);
38
54
  var images = state.images, visible = state.visible, index = state.index;
39
55
  var methods = useMethods({
@@ -9,6 +9,22 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
+ var __read = (this && this.__read) || function (o, n) {
13
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
14
+ if (!m) return o;
15
+ var i = m.call(o), r, ar = [], e;
16
+ try {
17
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
18
+ }
19
+ catch (error) { e = { error: error }; }
20
+ finally {
21
+ try {
22
+ if (r && !r.done && (m = i["return"])) m.call(i);
23
+ }
24
+ finally { if (e) throw e.error; }
25
+ }
26
+ return ar;
27
+ };
12
28
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
13
29
  import { useRef, useState } from 'react';
14
30
  import ArrowLeft from './components/ArrowLeft';
@@ -42,8 +58,8 @@ var initialState = {
42
58
  };
43
59
  export default function PhotoSlider(props) {
44
60
  var _a = props.loop, loop = _a === void 0 ? 3 : _a, speedFn = props.speed, easingFn = props.easing, photoClosable = props.photoClosable, _b = props.maskClosable, maskClosable = _b === void 0 ? true : _b, _c = props.maskOpacity, maskOpacity = _c === void 0 ? defaultOpacity : _c, _d = props.pullClosable, pullClosable = _d === void 0 ? true : _d, _e = props.bannerVisible, bannerVisible = _e === void 0 ? true : _e, overlayRender = props.overlayRender, toolbarRender = props.toolbarRender, className = props.className, maskClassName = props.maskClassName, photoClassName = props.photoClassName, photoWrapClassName = props.photoWrapClassName, loadingElement = props.loadingElement, brokenElement = props.brokenElement, images = props.images, _f = props.index, controlledIndex = _f === void 0 ? 0 : _f, controlledIndexChange = props.onIndexChange, visible = props.visible, onClose = props.onClose, afterClose = props.afterClose, portalContainer = props.portalContainer;
45
- var _g = useSetState(initialState), state = _g[0], updateState = _g[1];
46
- var _h = useState(0), innerIndex = _h[0], updateInnerIndex = _h[1];
61
+ var _g = __read(useSetState(initialState), 2), state = _g[0], updateState = _g[1];
62
+ var _h = __read(useState(0), 2), innerIndex = _h[0], updateInnerIndex = _h[1];
47
63
  var x = state.x, touched = state.touched, pause = state.pause, lastCX = state.lastCX, lastCY = state.lastCY, _j = state.bg, bg = _j === void 0 ? maskOpacity : _j, lastBg = state.lastBg, overlay = state.overlay, minimal = state.minimal, scale = state.scale, rotate = state.rotate, onScale = state.onScale, onRotate = state.onRotate;
48
64
  // 受控 index
49
65
  // eslint-disable-next-line no-prototype-builtins
@@ -59,7 +75,7 @@ export default function PhotoSlider(props) {
59
75
  // noinspection SuspiciousTypeOfGuard
60
76
  var enableLoop = typeof loop === 'boolean' ? loop : imageLength > loop;
61
77
  // 显示动画处理
62
- var _k = useAnimationVisible(visible, afterClose), realVisible = _k[0], activeAnimation = _k[1], onAnimationEnd = _k[2];
78
+ var _k = __read(useAnimationVisible(visible, afterClose), 3), realVisible = _k[0], activeAnimation = _k[1], onAnimationEnd = _k[2];
63
79
  useIsomorphicLayoutEffect(function () {
64
80
  // 显示弹出层,修正正确的指向
65
81
  if (realVisible) {
@@ -1,3 +1,19 @@
1
+ var __read = (this && this.__read) || function (o, n) {
2
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
3
+ if (!m) return o;
4
+ var i = m.call(o), r, ar = [], e;
5
+ try {
6
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
7
+ }
8
+ catch (error) { e = { error: error }; }
9
+ finally {
10
+ try {
11
+ if (r && !r.done && (m = i["return"])) m.call(i);
12
+ }
13
+ finally { if (e) throw e.error; }
14
+ }
15
+ return ar;
16
+ };
1
17
  import { useEffect, useRef, useState } from 'react';
2
18
  import { maxWaitAnimationTime } from '../variables';
3
19
  import useMethods from './useMethods';
@@ -10,9 +26,9 @@ var initialRect = {
10
26
  FIT: undefined,
11
27
  };
12
28
  export default function useAnimationOrigin(visible, originRef, loaded, speed, updateEasing) {
13
- var _a = useState(initialRect), originRect = _a[0], updateOriginRect = _a[1];
29
+ var _a = __read(useState(initialRect), 2), originRect = _a[0], updateOriginRect = _a[1];
14
30
  // 动画状态
15
- var _b = useState(0), easingMode = _b[0], updateEasingMode = _b[1];
31
+ var _b = __read(useState(0), 2), easingMode = _b[0], updateEasingMode = _b[1];
16
32
  var initialTime = useRef();
17
33
  var fn = useMethods({
18
34
  OK: function () { return visible && updateEasingMode(4); },
@@ -1,10 +1,26 @@
1
+ var __read = (this && this.__read) || function (o, n) {
2
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
3
+ if (!m) return o;
4
+ var i = m.call(o), r, ar = [], e;
5
+ try {
6
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
7
+ }
8
+ catch (error) { e = { error: error }; }
9
+ finally {
10
+ try {
11
+ if (r && !r.done && (m = i["return"])) m.call(i);
12
+ }
13
+ finally { if (e) throw e.error; }
14
+ }
15
+ return ar;
16
+ };
1
17
  import useAnimationOrigin from './useAnimationOrigin';
2
18
  import useTargetScale from './useTargetScale';
3
19
  export default function useAnimationPosition(visible, originRef, loaded, x, y, width, height, scale, speed, updateEasing) {
4
20
  // 延迟更新 width/height
5
- var _a = useTargetScale(width, height, scale, speed, updateEasing), autoWidth = _a[0], autoHeight = _a[1], autoScale = _a[2];
21
+ var _a = __read(useTargetScale(width, height, scale, speed, updateEasing), 3), autoWidth = _a[0], autoHeight = _a[1], autoScale = _a[2];
6
22
  // 动画源处理
7
- var _b = useAnimationOrigin(visible, originRef, loaded, speed, updateEasing), easingMode = _b[0], originRect = _b[1];
23
+ var _b = __read(useAnimationOrigin(visible, originRef, loaded, speed, updateEasing), 2), easingMode = _b[0], originRect = _b[1];
8
24
  // 计算动画位置
9
25
  var T = originRect.T, L = originRect.L, W = originRect.W, H = originRect.H, FIT = originRect.FIT;
10
26
  // 偏移量,x: 0, y: 0 居中为初始
@@ -1,3 +1,19 @@
1
+ var __read = (this && this.__read) || function (o, n) {
2
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
3
+ if (!m) return o;
4
+ var i = m.call(o), r, ar = [], e;
5
+ try {
6
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
7
+ }
8
+ catch (error) { e = { error: error }; }
9
+ finally {
10
+ try {
11
+ if (r && !r.done && (m = i["return"])) m.call(i);
12
+ }
13
+ finally { if (e) throw e.error; }
14
+ }
15
+ return ar;
16
+ };
1
17
  import { useReducer, useRef } from 'react';
2
18
  import useForkedVariable from './useForkedVariable';
3
19
  /**
@@ -5,10 +21,10 @@ import useForkedVariable from './useForkedVariable';
5
21
  * 通过 onAnimationEnd 回调实现 leaveCallback
6
22
  */
7
23
  export default function useAnimationVisible(visible, afterClose) {
8
- var _a = useReducer(function (c) { return !c; }, false), handleRender = _a[1];
24
+ var _a = __read(useReducer(function (c) { return !c; }, false), 2), handleRender = _a[1];
9
25
  var activeAnimation = useRef(0);
10
26
  // 可见状态分支
11
- var _b = useForkedVariable(visible, function (modify) {
27
+ var _b = __read(useForkedVariable(visible, function (modify) {
12
28
  // 可见状态:设置进入动画
13
29
  if (visible) {
14
30
  modify(visible);
@@ -17,7 +33,7 @@ export default function useAnimationVisible(visible, afterClose) {
17
33
  else {
18
34
  activeAnimation.current = 2;
19
35
  }
20
- }), realVisible = _b[0], modifyRealVisible = _b[1];
36
+ }), 2), realVisible = _b[0], modifyRealVisible = _b[1];
21
37
  function onAnimationEnd() {
22
38
  // 动画结束后触发渲染
23
39
  handleRender();
@@ -1,3 +1,28 @@
1
+ var __read = (this && this.__read) || function (o, n) {
2
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
3
+ if (!m) return o;
4
+ var i = m.call(o), r, ar = [], e;
5
+ try {
6
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
7
+ }
8
+ catch (error) { e = { error: error }; }
9
+ finally {
10
+ try {
11
+ if (r && !r.done && (m = i["return"])) m.call(i);
12
+ }
13
+ finally { if (e) throw e.error; }
14
+ }
15
+ return ar;
16
+ };
17
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
18
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
19
+ if (ar || !(i in from)) {
20
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
21
+ ar[i] = from[i];
22
+ }
23
+ }
24
+ return to.concat(ar || Array.prototype.slice.call(from));
25
+ };
1
26
  import { useRef } from 'react';
2
27
  import useDebounceCallback from './useDebounceCallback';
3
28
  /**
@@ -15,7 +40,7 @@ export default function useContinuousTap(singleTap, doubleTap) {
15
40
  args[_i] = arguments[_i];
16
41
  }
17
42
  continuousClick.current = 0;
18
- singleTap.apply(void 0, args);
43
+ singleTap.apply(void 0, __spreadArray([], __read(args), false));
19
44
  }, {
20
45
  wait: 300,
21
46
  });
@@ -25,12 +50,12 @@ export default function useContinuousTap(singleTap, doubleTap) {
25
50
  args[_i] = arguments[_i];
26
51
  }
27
52
  continuousClick.current += 1;
28
- debounceTap.apply(void 0, args);
53
+ debounceTap.apply(void 0, __spreadArray([], __read(args), false));
29
54
  // 双击
30
55
  if (continuousClick.current >= 2) {
31
56
  debounceTap.cancel();
32
57
  continuousClick.current = 0;
33
- doubleTap.apply(void 0, args);
58
+ doubleTap.apply(void 0, __spreadArray([], __read(args), false));
34
59
  }
35
60
  };
36
61
  }
@@ -1,3 +1,19 @@
1
+ var __read = (this && this.__read) || function (o, n) {
2
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
3
+ if (!m) return o;
4
+ var i = m.call(o), r, ar = [], e;
5
+ try {
6
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
7
+ }
8
+ catch (error) { e = { error: error }; }
9
+ finally {
10
+ try {
11
+ if (r && !r.done && (m = i["return"])) m.call(i);
12
+ }
13
+ finally { if (e) throw e.error; }
14
+ }
15
+ return ar;
16
+ };
1
17
  var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
2
18
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3
19
  if (ar || !(i in from)) {
@@ -26,7 +42,7 @@ export default function useMethods(fn) {
26
42
  for (var _i = 0; _i < arguments.length; _i++) {
27
43
  args[_i] = arguments[_i];
28
44
  }
29
- return (_a = current.fn[key]).call.apply(_a, __spreadArray([current.fn], args, false));
45
+ return (_a = current.fn[key]).call.apply(_a, __spreadArray([current.fn], __read(args), false));
30
46
  };
31
47
  });
32
48
  current.curr = curr_1;
@@ -1,3 +1,19 @@
1
+ var __read = (this && this.__read) || function (o, n) {
2
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
3
+ if (!m) return o;
4
+ var i = m.call(o), r, ar = [], e;
5
+ try {
6
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
7
+ }
8
+ catch (error) { e = { error: error }; }
9
+ finally {
10
+ try {
11
+ if (r && !r.done && (m = i["return"])) m.call(i);
12
+ }
13
+ finally { if (e) throw e.error; }
14
+ }
15
+ return ar;
16
+ };
1
17
  import { computePositionEdge } from '../utils/edgeHandle';
2
18
  import getPositionOnMoveOrScale from '../utils/getPositionOnMoveOrScale';
3
19
  import getRotateSize from '../utils/getRotateSize';
@@ -17,10 +33,10 @@ export default function useScrollPosition(callbackX, callbackY, callbackS) {
17
33
  S: function (spatial) { return callbackS(spatial); },
18
34
  });
19
35
  return function (x, y, lastX, lastY, width, height, scale, safeScale, lastScale, rotate, touchedTime) {
20
- var _a = getRotateSize(rotate, width, height), currentWidth = _a[0], currentHeight = _a[1];
36
+ var _a = __read(getRotateSize(rotate, width, height), 2), currentWidth = _a[0], currentHeight = _a[1];
21
37
  // 开始状态下边缘触发状态
22
- var _b = computePositionEdge(x, safeScale, currentWidth, window.innerWidth), beginEdgeX = _b[0], beginX = _b[1];
23
- var _c = computePositionEdge(y, safeScale, currentHeight, window.innerHeight), beginEdgeY = _c[0], beginY = _c[1];
38
+ var _b = __read(computePositionEdge(x, safeScale, currentWidth, window.innerWidth), 2), beginEdgeX = _b[0], beginX = _b[1];
39
+ var _c = __read(computePositionEdge(y, safeScale, currentHeight, window.innerHeight), 2), beginEdgeY = _c[0], beginY = _c[1];
24
40
  var moveTime = Date.now() - touchedTime;
25
41
  // 时间过长、超出安全范围的情况下不执行滚动逻辑,恢复安全范围
26
42
  if (moveTime >= maxTouchTime || safeScale !== scale || Math.abs(lastScale - scale) > 1) {
@@ -49,8 +65,8 @@ export default function useScrollPosition(callbackX, callbackY, callbackS) {
49
65
  scrollMove(speedT, function (spatial) {
50
66
  var nextX = x + spatial * (speedX / speedT);
51
67
  var nextY = y + spatial * (speedY / speedT);
52
- var _a = computePositionEdge(nextX, scale, currentWidth, window.innerWidth), isEdgeX = _a[0], currentX = _a[1];
53
- var _b = computePositionEdge(nextY, scale, currentHeight, window.innerHeight), isEdgeY = _b[0], currentY = _b[1];
68
+ var _a = __read(computePositionEdge(nextX, scale, currentWidth, window.innerWidth), 2), isEdgeX = _a[0], currentX = _a[1];
69
+ var _b = __read(computePositionEdge(nextY, scale, currentHeight, window.innerHeight), 2), isEdgeY = _b[0], currentY = _b[1];
54
70
  if (isEdgeX && !edgeX) {
55
71
  edgeX = true;
56
72
  if (beginEdgeX) {
@@ -34,6 +34,22 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
34
34
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
35
  }
36
36
  };
37
+ var __read = (this && this.__read) || function (o, n) {
38
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
39
+ if (!m) return o;
40
+ var i = m.call(o), r, ar = [], e;
41
+ try {
42
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
43
+ }
44
+ catch (error) { e = { error: error }; }
45
+ finally {
46
+ try {
47
+ if (r && !r.done && (m = i["return"])) m.call(i);
48
+ }
49
+ finally { if (e) throw e.error; }
50
+ }
51
+ return ar;
52
+ };
37
53
  import { useRef } from 'react';
38
54
  import useDebounceCallback from './useDebounceCallback';
39
55
  import useIsomorphicLayoutEffect from './useIsomorphicLayoutEffect';
@@ -44,7 +60,7 @@ import useSetState from './useSetState';
44
60
  export default function useTargetScale(realWidth, realHeight, realScale, speed, updateEasing) {
45
61
  var _this = this;
46
62
  var execRef = useRef(false);
47
- var _a = useSetState({ lead: true, scale: realScale }), _b = _a[0], lead = _b.lead, scale = _b.scale, updateState = _a[1];
63
+ var _a = __read(useSetState({ lead: true, scale: realScale }), 2), _b = _a[0], lead = _b.lead, scale = _b.scale, updateState = _a[1];
48
64
  var moveScale = useDebounceCallback(function (current) { return __awaiter(_this, void 0, void 0, function () {
49
65
  return __generator(this, function (_a) {
50
66
  updateEasing(true);
@@ -1,3 +1,19 @@
1
+ var __read = (this && this.__read) || function (o, n) {
2
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
3
+ if (!m) return o;
4
+ var i = m.call(o), r, ar = [], e;
5
+ try {
6
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
7
+ }
8
+ catch (error) { e = { error: error }; }
9
+ finally {
10
+ try {
11
+ if (r && !r.done && (m = i["return"])) m.call(i);
12
+ }
13
+ finally { if (e) throw e.error; }
14
+ }
15
+ return ar;
16
+ };
1
17
  import { longModeRatio } from '../variables';
2
18
  import { computePositionEdge } from './edgeHandle';
3
19
  /**
@@ -9,8 +25,8 @@ export default function getPositionOnMoveOrScale(x, y, width, height, scale, toS
9
25
  if (offsetX === void 0) { offsetX = 0; }
10
26
  if (offsetY === void 0) { offsetY = 0; }
11
27
  // 是否接触边缘
12
- var closedEdgeX = computePositionEdge(x, toScale, width, window.innerWidth)[0];
13
- var closedEdgeY = computePositionEdge(y, toScale, height, window.innerWidth)[0];
28
+ var _a = __read(computePositionEdge(x, toScale, width, window.innerWidth), 1), closedEdgeX = _a[0];
29
+ var _b = __read(computePositionEdge(y, toScale, height, window.innerWidth), 1), closedEdgeY = _b[0];
14
30
  var centerClientX = window.innerWidth / 2;
15
31
  var centerClientY = window.innerWidth / 2;
16
32
  // 坐标偏移
@@ -1,10 +1,26 @@
1
+ var __read = (this && this.__read) || function (o, n) {
2
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
3
+ if (!m) return o;
4
+ var i = m.call(o), r, ar = [], e;
5
+ try {
6
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
7
+ }
8
+ catch (error) { e = { error: error }; }
9
+ finally {
10
+ try {
11
+ if (r && !r.done && (m = i["return"])) m.call(i);
12
+ }
13
+ finally { if (e) throw e.error; }
14
+ }
15
+ return ar;
16
+ };
1
17
  import { longModeRatio } from '../variables';
2
18
  import getRotateSize from './getRotateSize';
3
19
  /**
4
20
  * 获取图片合适的大小
5
21
  */
6
22
  export default function getSuitableImageSize(naturalWidth, naturalHeight, rotate) {
7
- var _a = getRotateSize(rotate, window.innerWidth, window.innerHeight), currentWidth = _a[0], currentHeight = _a[1], isVertical = _a[2];
23
+ var _a = __read(getRotateSize(rotate, window.innerWidth, window.innerHeight), 3), currentWidth = _a[0], currentHeight = _a[1], isVertical = _a[2];
8
24
  var y = 0;
9
25
  var width = currentWidth;
10
26
  var height = currentHeight;
@@ -45,6 +45,22 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
45
45
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
46
  }
47
47
  };
48
+ var __read = (this && this.__read) || function (o, n) {
49
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
50
+ if (!m) return o;
51
+ var i = m.call(o), r, ar = [], e;
52
+ try {
53
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
54
+ }
55
+ catch (error) { e = { error: error }; }
56
+ finally {
57
+ try {
58
+ if (r && !r.done && (m = i["return"])) m.call(i);
59
+ }
60
+ finally { if (e) throw e.error; }
61
+ }
62
+ return ar;
63
+ };
48
64
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
49
65
  import AddAbility from './components/AddAbility';
50
66
  import UpdateAbility from './components/UpdateAbility';
@@ -57,15 +73,15 @@ import { useCallback, useState } from 'react';
57
73
  var PAGE_SIZE = 20;
58
74
  var AiAbilityRoot = function (_a) {
59
75
  var _b = _a.ablilityNameLength, ablilityNameLength = _b === void 0 ? 30 : _b;
60
- var _c = useSetState({
76
+ var _c = __read(useSetState({
61
77
  name: '',
62
78
  token: '',
63
79
  type: 3,
64
80
  isWorkplace: false,
65
- }), state = _c[0], setState = _c[1];
66
- var _d = useState(0), page = _d[0], setPage = _d[1];
67
- var _e = useState(false), AddAbilityOpen = _e[0], setAddAbilityOpen = _e[1];
68
- var _f = useState(false), UpdateAbilityOpen = _f[0], setUpdateAbilityOpen = _f[1];
81
+ }), 2), state = _c[0], setState = _c[1];
82
+ var _d = __read(useState(0), 2), page = _d[0], setPage = _d[1];
83
+ var _e = __read(useState(false), 2), AddAbilityOpen = _e[0], setAddAbilityOpen = _e[1];
84
+ var _f = __read(useState(false), 2), UpdateAbilityOpen = _f[0], setUpdateAbilityOpen = _f[1];
69
85
  var _g = useRequest(function () { return PostQuestionCollectionList({ page: page, pageSize: PAGE_SIZE }); }, {
70
86
  refreshDeps: [page],
71
87
  }), data = _g.data, getList = _g.run, listLoading = _g.loading;