@opentiny/vue-renderless 3.12.0 → 3.13.0-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 (298) hide show
  1. package/action-sheet/index.js +20 -13
  2. package/action-sheet/vue.js +8 -7
  3. package/alert/index.js +50 -1
  4. package/alert/vue.js +36 -9
  5. package/amount/index.js +100 -25
  6. package/amount/vue.js +102 -26
  7. package/anchor/index.js +1 -0
  8. package/area/index.js +8 -8
  9. package/area/vue.js +5 -5
  10. package/async-flowchart/index.js +16 -3
  11. package/autocomplete/index.js +58 -14
  12. package/autocomplete/vue.js +40 -12
  13. package/badge/index.js +12 -0
  14. package/badge/vue.js +6 -4
  15. package/breadcrumb/vue.js +3 -1
  16. package/breadcrumb-item/vue.js +6 -2
  17. package/button/index.js +5 -1
  18. package/calendar/index.js +2 -86
  19. package/calendar-bar/index.js +20 -6
  20. package/calendar-view/index.js +10 -12
  21. package/calendar-view/vue.js +17 -4
  22. package/cascader/index.js +80 -34
  23. package/cascader/vue.js +49 -19
  24. package/cascader-menu/index.js +7 -7
  25. package/cascader-menu/vue.js +2 -3
  26. package/cascader-mobile/index.js +37 -24
  27. package/cascader-mobile/vue.js +7 -1
  28. package/cascader-node/index.js +13 -1
  29. package/cascader-node/vue.js +15 -4
  30. package/cascader-panel/index.js +1 -1
  31. package/cascader-select/column-index.js +150 -0
  32. package/cascader-select/column.js +120 -0
  33. package/cascader-select/index.js +29 -165
  34. package/cascader-select/usePicker.js +251 -0
  35. package/cascader-select/useTouch.js +65 -0
  36. package/cascader-select/vue.js +35 -47
  37. package/cascader-view/index.js +1 -1
  38. package/cell/vue.js +2 -1
  39. package/chart-bar/index.js +2 -3
  40. package/chart-core/deps/constants.js +43 -43
  41. package/chart-core/index.js +1 -1
  42. package/chart-gauge/index.js +2 -2
  43. package/chart-heatmap/index.js +17 -10
  44. package/chart-line/index.js +8 -9
  45. package/chart-tree/index.js +2 -2
  46. package/chart-waterfall/index.js +4 -6
  47. package/checkbox/index.js +17 -0
  48. package/checkbox/vue.js +16 -7
  49. package/checkbox-group/vue.js +2 -0
  50. package/col/index.js +7 -2
  51. package/col/vue.js +1 -1
  52. package/collapse/index.js +3 -3
  53. package/color-select-panel/vue.js +0 -7
  54. package/column-list-item/index.js +17 -1
  55. package/column-list-item/vue.js +8 -3
  56. package/common/date.js +2 -0
  57. package/common/deps/dom.js +19 -4
  58. package/common/deps/popper.js +48 -5
  59. package/common/deps/touch-emulator.js +4 -1
  60. package/common/deps/tree-model/node.js +1 -1
  61. package/common/deps/tree-model/tree-store.js +2 -13
  62. package/common/deps/useRect.js +25 -0
  63. package/common/deps/vue-popper.js +22 -10
  64. package/common/index.js +1 -1
  65. package/common/runtime.js +1 -1
  66. package/common/type.js +2 -1
  67. package/common/validate/rules/enum.js +1 -1
  68. package/common/validate/rules/pattern.js +2 -2
  69. package/common/validate/rules/range.js +8 -5
  70. package/common/validate/rules/required.js +1 -1
  71. package/common/validate/rules/type.js +5 -5
  72. package/common/validate/rules/whitespace.js +1 -1
  73. package/common/validate/util.js +15 -16
  74. package/common/validate/validations/integer.js +1 -1
  75. package/common/validate/validations/method.js +1 -1
  76. package/container/index.js +17 -1
  77. package/container/vue.js +12 -3
  78. package/currency/index.js +74 -7
  79. package/currency/vue.js +21 -5
  80. package/date-panel/index.js +16 -0
  81. package/date-panel/vue.js +8 -2
  82. package/date-picker-mobile/index.js +12 -0
  83. package/date-picker-mobile/vue.js +7 -1
  84. package/date-range/vue.js +12 -5
  85. package/date-table/index.js +5 -0
  86. package/date-table/vue.js +3 -1
  87. package/dialog-box/index.js +17 -6
  88. package/dialog-select/index.js +6 -3
  89. package/dialog-select/vue.js +8 -4
  90. package/drawer/index.js +26 -5
  91. package/drawer/vue.js +13 -7
  92. package/dropdown/index.js +7 -7
  93. package/dropdown/vue.js +6 -2
  94. package/dropdown-item/index.js +9 -1
  95. package/dropdown-item/mf.js +6 -10
  96. package/dropdown-item/vue.js +21 -8
  97. package/dropdown-menu/index.js +20 -7
  98. package/dropdown-menu/vue.js +4 -3
  99. package/exception/index.js +2 -7
  100. package/exception/vue.js +7 -10
  101. package/fall-menu/index.js +5 -1
  102. package/fall-menu/vue.js +13 -2
  103. package/file-upload/index.js +47 -12
  104. package/file-upload/vue.js +38 -8
  105. package/filter-box/index.js +1 -0
  106. package/floating-button/index.js +62 -16
  107. package/floating-button/vue.js +27 -9
  108. package/flowchart/index.js +134 -25
  109. package/flowchart/node.js +13 -4
  110. package/flowchart/vue.js +16 -4
  111. package/form/vue.js +3 -1
  112. package/form-item/index.js +4 -4
  113. package/form-item/vue.js +3 -1
  114. package/fullscreen/index.js +5 -5
  115. package/fullscreen/vue.js +3 -3
  116. package/grid/utils/common.js +10 -5
  117. package/grid/utils/dom.js +7 -1
  118. package/image/index.js +6 -0
  119. package/image/vue.js +6 -3
  120. package/image-viewer/index.js +62 -51
  121. package/image-viewer/vue.js +17 -5
  122. package/input/index.js +89 -22
  123. package/input/vue.js +52 -21
  124. package/ip-address/index.js +61 -19
  125. package/ip-address/vue.js +22 -4
  126. package/label/index.js +56 -0
  127. package/label/vue.js +26 -0
  128. package/link/vue.js +3 -1
  129. package/loading/vue.js +8 -2
  130. package/logout/index.js +1 -1
  131. package/mask/index.js +13 -0
  132. package/mask/vue.js +18 -0
  133. package/mind-map/index.js +47 -0
  134. package/mind-map/vue.js +53 -0
  135. package/multi-select/index.js +150 -10
  136. package/multi-select/vue.js +46 -11
  137. package/multi-select-item/index.js +17 -0
  138. package/multi-select-item/vue.js +31 -0
  139. package/numeric/index.js +51 -9
  140. package/numeric/vue.js +44 -14
  141. package/option/index.js +12 -5
  142. package/option/vue.js +15 -7
  143. package/option-group/index.js +3 -3
  144. package/package.json +1 -1
  145. package/pager/index.js +372 -0
  146. package/pager/vue.js +125 -2
  147. package/picker/index.js +253 -48
  148. package/picker/mb.js +42 -0
  149. package/picker/vue.js +70 -17
  150. package/picker-column/index.js +1 -1
  151. package/pop-upload/index.js +0 -2
  152. package/pop-upload/vue.js +3 -4
  153. package/popconfirm/index.js +3 -6
  154. package/popconfirm/vue.js +1 -1
  155. package/popeditor/index.js +55 -24
  156. package/popeditor/vue.js +15 -11
  157. package/popover/index.js +4 -4
  158. package/popover/vue.js +6 -6
  159. package/popup/index.js +3 -3
  160. package/popup/vue.js +5 -5
  161. package/pull-refresh/index.js +57 -65
  162. package/pull-refresh/vue.js +23 -7
  163. package/radio/index.js +0 -17
  164. package/radio/vue.js +4 -10
  165. package/rate/index.js +1 -1
  166. package/rate/vue.js +0 -2
  167. package/record/index.js +4 -1
  168. package/{rich-text-edtior → rich-text-editor}/index.js +2 -2
  169. package/{rich-text-edtior → rich-text-editor}/vue.js +2 -5
  170. package/scrollbar/index.js +11 -11
  171. package/scrollbar/vue-bar.js +3 -3
  172. package/scrollbar/vue.js +5 -5
  173. package/search/index.js +1 -1
  174. package/search/vue.js +3 -1
  175. package/select/index.js +185 -113
  176. package/select/vue.js +105 -20
  177. package/select-dropdown/index.js +62 -4
  178. package/select-dropdown/vue.js +85 -8
  179. package/select-view/index.js +3 -1
  180. package/signature/index.js +241 -0
  181. package/signature/vue.js +88 -0
  182. package/skeleton/index.js +14 -0
  183. package/skeleton/vue.js +15 -0
  184. package/skeleton-item/vue.js +15 -0
  185. package/slider/index.js +27 -7
  186. package/slider/vue.js +26 -7
  187. package/split/index.js +1 -1
  188. package/split/vue.js +4 -6
  189. package/standard-list-item/index.js +15 -1
  190. package/standard-list-item/vue.js +6 -5
  191. package/steps/index.js +25 -2
  192. package/steps/slide-bar.js +8 -1
  193. package/steps/vue.js +15 -3
  194. package/tab-item-mf/vue.js +14 -8
  195. package/tab-nav/index.js +9 -4
  196. package/tab-nav/vue.js +6 -2
  197. package/tabbar/vue.js +9 -3
  198. package/tabbar-item/vue.js +3 -2
  199. package/tabs/index.js +1 -1
  200. package/tabs/vue.js +1 -0
  201. package/tabs-mf/index.js +20 -6
  202. package/tabs-mf/vue-nav.js +26 -11
  203. package/tabs-mf/vue.js +7 -7
  204. package/tag/index.js +1 -1
  205. package/tag/vue.js +5 -1
  206. package/tag-group/index.js +2 -1
  207. package/tall-storage/index.js +4 -5
  208. package/time/index.js +4 -1
  209. package/time/vue.js +1 -1
  210. package/time-line/vue.js +1 -1
  211. package/time-picker-mobile/index.js +24 -5
  212. package/time-picker-mobile/vue.js +17 -7
  213. package/time-range/index.js +2 -0
  214. package/time-spinner/index.js +0 -3
  215. package/time-spinner/vue.js +2 -3
  216. package/timeline-item/vue.js +1 -1
  217. package/tooltip/index.js +1 -2
  218. package/tooltip/vue.js +3 -3
  219. package/transfer/index.js +20 -22
  220. package/transfer/vue.js +1 -6
  221. package/transfer-panel/vue.js +3 -5
  222. package/tree/index.js +21 -4
  223. package/tree/vue.js +10 -8
  224. package/tree-menu/index.js +27 -3
  225. package/tree-menu/vue.js +27 -14
  226. package/tree-node/index.js +12 -10
  227. package/tree-node/vue.js +6 -5
  228. package/types/action-menu.type.d.ts +5 -0
  229. package/types/action-sheet.type.d.ts +118 -1
  230. package/types/alert.type.d.ts +16 -1
  231. package/types/amount.type.d.ts +168 -1
  232. package/types/area.type.d.ts +134 -1
  233. package/types/async-flowchart.type.d.ts +72 -0
  234. package/types/autocomplete.type.d.ts +199 -1
  235. package/types/badge.type.d.ts +3 -1
  236. package/types/breadcrumb-item.type.d.ts +2 -0
  237. package/types/breadcrumb.type.d.ts +2 -0
  238. package/types/button.type.d.ts +5 -0
  239. package/types/cascader-menu.type.d.ts +3 -4
  240. package/types/cascader-node.type.d.ts +5 -2
  241. package/types/cascader-panel.type-2bd03be3.d.ts +241 -0
  242. package/types/cascader-panel.type.d.ts +3 -241
  243. package/types/cascader.type.d.ts +327 -1
  244. package/types/checkbox.type.d.ts +9 -0
  245. package/types/collapse.type.d.ts +19 -2
  246. package/types/date-picker.type.d.ts +33 -0
  247. package/types/dialog-box.type.d.ts +5 -1
  248. package/types/drawer.type.d.ts +132 -1
  249. package/types/{dropdown-item.type-bf83e929.d.ts → dropdown-item.type-8475a549.d.ts} +8 -14
  250. package/types/dropdown-item.type.d.ts +1 -1
  251. package/types/dropdown-menu.type.d.ts +1 -1
  252. package/types/dropdown.type.d.ts +2 -5
  253. package/types/fall-menu.type.d.ts +94 -1
  254. package/types/file-upload.type.d.ts +1 -1
  255. package/types/form-item.type.d.ts +1 -1
  256. package/types/{form.type-d0fd42f3.d.ts → form.type-d88482e4.d.ts} +3 -0
  257. package/types/form.type.d.ts +1 -1
  258. package/types/input.type.d.ts +23 -9
  259. package/types/ip-address.type.d.ts +160 -1
  260. package/types/label.type.d.ts +81 -0
  261. package/types/link.type.d.ts +6 -3
  262. package/types/mind-map.type.d.ts +20 -0
  263. package/types/modal.type.d.ts +4 -2
  264. package/types/numeric.type.d.ts +36 -9
  265. package/types/pager.type.d.ts +171 -1
  266. package/types/picker.type.d.ts +14 -0
  267. package/types/popconfirm.type.d.ts +85 -1
  268. package/types/popeditor.type.d.ts +4 -0
  269. package/types/popover.type.d.ts +3 -3
  270. package/types/radio.type.d.ts +0 -4
  271. package/types/rate.type.d.ts +236 -1
  272. package/types/search.type.d.ts +88 -1
  273. package/types/shared.type.d.ts +1 -1
  274. package/types/skeleton-item.type.d.ts +38 -0
  275. package/types/skeleton.type.d.ts +45 -0
  276. package/types/slider.type.d.ts +8 -1
  277. package/types/steps.type.d.ts +14 -3
  278. package/types/tab-item.type.d.ts +0 -1
  279. package/types/tab-nav.type.d.ts +6 -1
  280. package/types/tabs.type.d.ts +5 -0
  281. package/types/tag-group.type.d.ts +64 -1
  282. package/types/tag.type.d.ts +12 -0
  283. package/types/tooltip.type.d.ts +1 -1
  284. package/types/transfer.type.d.ts +183 -1
  285. package/types/tree-menu.type.d.ts +210 -1
  286. package/types/upload-dragger.type.d.ts +1 -1
  287. package/types/{upload-list.type-343e8c11.d.ts → upload-list.type-1078fba2.d.ts} +27 -6
  288. package/types/upload-list.type.d.ts +1 -1
  289. package/types/upload.type.d.ts +1 -1
  290. package/types/wizard.type.d.ts +1 -0
  291. package/upload/index.js +59 -29
  292. package/upload/vue.js +6 -4
  293. package/upload-list/index.js +14 -14
  294. package/upload-list/vue.js +5 -2
  295. package/user/index.js +5 -4
  296. package/user-head/index.js +1 -1
  297. package/wheel/index.js +3 -0
  298. package/wizard/vue.js +4 -2
package/popup/index.js CHANGED
@@ -52,10 +52,10 @@ const close = ({ api, constants, emit, props, state }) => () => {
52
52
  emit("update:modelValue", false);
53
53
  emit("close");
54
54
  };
55
- const onTouchMove = ({ refs, state }) => (event) => {
55
+ const onTouchMove = ({ vm, state }) => (event) => {
56
56
  touchMove(event);
57
57
  const direction = state.deltaY > 0 ? "10" : "01";
58
- const el = getScroller()(event.target, refs.$el);
58
+ const el = getScroller()(event.target, vm.$refs.$el);
59
59
  const { scrollHeight, offsetHeight, scrollTop } = el;
60
60
  let status = "11";
61
61
  if (scrollTop === 0) {
@@ -78,7 +78,7 @@ const renderOverlay = ({ api, nextTick, props, state }) => () => {
78
78
  }
79
79
  });
80
80
  };
81
- const updateZIndex = ({ refs, state }) => (value = 0) => refs.popup.style.zIndex = ++state.context.zIndex + value;
81
+ const updateZIndex = ({ vm, state }) => (value = 0) => vm.$refs.popup.style.zIndex = ++state.context.zIndex + value;
82
82
  const clickOverlay = ({ api, props, emit }) => () => {
83
83
  if (props.closeOnClickOverlay) {
84
84
  api.close();
package/popup/vue.js CHANGED
@@ -38,25 +38,25 @@ const initState = ({ reactive, computed, props, api: api2 }) => {
38
38
  });
39
39
  return state;
40
40
  };
41
- const initApi = ({ api: api2, props, state, refs, emit, nextTick, constants }) => {
41
+ const initApi = ({ api: api2, props, state, vm, emit, nextTick, constants }) => {
42
42
  Object.assign(api2, {
43
43
  state,
44
44
  opened: opened(emit),
45
45
  closed: closed(emit),
46
46
  getStyle: getStyle(props),
47
47
  watchValue: watchValue(api2),
48
- updateZIndex: updateZIndex({ refs, state }),
48
+ updateZIndex: updateZIndex({ vm, state }),
49
49
  clickOverlay: clickOverlay({ api: api2, emit, props }),
50
50
  renderOverlay: renderOverlay({ api: api2, nextTick, props, state }),
51
- onTouchMove: onTouchMove({ refs, state }),
51
+ onTouchMove: onTouchMove({ vm, state }),
52
52
  open: open({ api: api2, constants, emit, props, state }),
53
53
  close: close({ api: api2, constants, emit, props, state })
54
54
  });
55
55
  };
56
- const renderless = (props, { computed, onMounted, reactive, watch, nextTick }, { constants, refs, emit }) => {
56
+ const renderless = (props, { computed, onMounted, reactive, watch, nextTick }, { constants, vm, emit }) => {
57
57
  const api2 = {};
58
58
  const state = initState({ reactive, computed, props, api: api2 });
59
- initApi({ api: api2, props, state, refs, emit, nextTick, constants });
59
+ initApi({ api: api2, props, state, vm, emit, nextTick, constants });
60
60
  watch(() => props.modelValue, api2.watchValue, { immediate: true });
61
61
  onMounted(() => {
62
62
  props.modelValue && api2.open();
@@ -2,6 +2,7 @@ import {
2
2
  __spreadValues
3
3
  } from "../chunk-G2ADBYYC.js";
4
4
  import { on, off } from "../common/deps/dom";
5
+ const PULL_UP_TIME_OUT = 300;
5
6
  const initPullRefresh = ({ t, props, state }) => () => {
6
7
  var _a, _b, _c;
7
8
  const defaultOption = {
@@ -9,15 +10,10 @@ const initPullRefresh = ({ t, props, state }) => () => {
9
10
  pullingDownText: t("ui.pullRefresh.pullingDown"),
10
11
  pullUpDisabled: false,
11
12
  pullDownDisabled: false,
12
- headHeight: 50,
13
- footHeight: 50
13
+ headHeight: 48
14
14
  };
15
15
  state.pullUp = __spreadValues(__spreadValues({}, defaultOption), props.pullUp);
16
16
  state.pullDown = __spreadValues(__spreadValues({}, defaultOption), props.pullDown);
17
- state.refreshStyle = {
18
- paddingTop: state.pullDown.headHeight + "px",
19
- paddingBottom: state.pullUp.footHeight + "px"
20
- };
21
17
  state.loosingText = (_a = props.loosingText) != null ? _a : t("ui.pullRefresh.loosing");
22
18
  state.successText = (_b = props.successText) != null ? _b : t("ui.pullRefresh.success");
23
19
  state.failedText = (_c = props.failedText) != null ? _c : t("ui.pullRefresh.failed");
@@ -25,82 +21,73 @@ const initPullRefresh = ({ t, props, state }) => () => {
25
21
  const onTouchstart = (state) => (event) => {
26
22
  state.draggposition = event.touches[0].clientY;
27
23
  };
28
- const onTouchmove = ({ props, state }) => (event) => {
29
- if (event.touches[0].clientY < state.draggposition) {
30
- if (!state.pullUp.pullUpDisabled) {
31
- if (props.hasMore) {
32
- state.translate3d = (event.touches[0].clientY - state.draggposition) / 2;
33
- state.pullUpReplaces = Math.abs(state.translate3d) > state.pullUp.footHeight ? state.loosingText : state.pullUp.pullingUpText;
34
- state.pullDownReplaces = "";
35
- }
36
- }
37
- } else {
38
- if (!state.pullDown.pullDownDisabled) {
39
- state.translate3d = (event.touches[0].clientY - state.draggposition) / 2;
40
- state.pullDownReplaces = Math.abs(state.translate3d) > state.pullDown.headHeight ? state.loosingText : state.pullDown.pullingDownText;
41
- state.pullUpReplaces = "";
42
- }
24
+ const onTouchmove = ({ state, refs }) => (event) => {
25
+ if (event.touches[0].clientY > state.draggposition) {
26
+ pullDownTouchMove(state, refs, event);
27
+ }
28
+ };
29
+ const pullDownTouchMove = (state, refs, event) => {
30
+ if (state.disabledPullDown || state.pullDownLoading) {
31
+ return;
32
+ }
33
+ if (refs.content.scrollTop <= 0) {
34
+ event.preventDefault();
35
+ state.translate3d = (event.touches[0].clientY - state.draggposition) / 2;
36
+ state.pullDownReplaces = Math.abs(state.translate3d) > state.pullDown.headHeight ? state.loosingText : state.pullDown.pullingDownText;
43
37
  }
44
38
  state.animationDuration = 0;
45
- state.pullUpLoading = false;
46
- state.pullDownLoading = false;
47
39
  };
48
- const onTouchend = ({ api, props, state }) => () => {
40
+ const onTouchend = ({ api, props, state, emit, refs }) => (event) => {
49
41
  state.animationDuration = props.animationDuration;
50
- if (Math.abs(state.translate3d) >= state.pullDown.headHeight || Math.abs(state.translate3d) >= state.pullUp.footHeight) {
51
- if (state.translate3d >= 0) {
52
- state.translate3d = state.pullDown.headHeight;
53
- const { handler } = state.pullDown;
54
- const pullDownPromise = handler && handler();
55
- state.pullDownLoading = true;
56
- if (pullDownPromise == null ? void 0 : pullDownPromise.then) {
57
- pullDownPromise.then(
58
- () => {
59
- api.handlerModelValue("down", "success");
60
- },
61
- (e) => {
62
- api.handlerModelValue("down", "failed");
63
- }
64
- );
65
- return;
66
- }
67
- console.error(new Error("handler down is not promise"));
68
- } else {
69
- state.translate3d = -state.pullUp.footHeight;
70
- const { handler } = state.pullUp;
71
- const pullUpPromise = handler && handler();
72
- state.pullUpLoading = true;
73
- if (pullUpPromise == null ? void 0 : pullUpPromise.then) {
74
- pullUpPromise.then(
75
- () => {
76
- api.handlerModelValue("up", "success");
77
- },
78
- (e) => {
79
- api.handlerModelValue("up", "failed");
80
- }
81
- );
82
- return;
83
- }
84
- console.error(new Error("handler up is not promise"));
85
- }
86
- api.clearPullRefresh();
42
+ if (event.changedTouches[0].clientY < state.draggposition) {
43
+ pullUpTouchEnd(state, emit, refs);
87
44
  } else {
88
- state.pullUpLoading = false;
45
+ pullDownTouchEnd(api, state, emit);
46
+ }
47
+ };
48
+ const pullDownTouchEnd = (api, state, emit) => {
49
+ if (Math.abs(state.translate3d) < state.pullDown.headHeight) {
89
50
  state.pullDownLoading = false;
90
51
  api.clearPullRefresh();
52
+ return;
91
53
  }
54
+ state.translate3d = state.pullDown.headHeight;
55
+ state.pullDownLoading = true;
56
+ emit("update:modelValue", true);
57
+ emit("pullDown");
58
+ };
59
+ const pullUpTouchEnd = (state, emit, refs) => {
60
+ clearTimeout(state.timer);
61
+ state.timer = setTimeout(() => {
62
+ const footNode = refs.foot;
63
+ if (!state.hasMore || !footNode) {
64
+ return;
65
+ }
66
+ const contentNode = refs.content;
67
+ const bottomDis = footNode.offsetTop + footNode.clientHeight - contentNode.scrollTop - contentNode.clientHeight;
68
+ if (bottomDis <= state.pullUpDistance) {
69
+ state.pullUpLoading = true;
70
+ emit("update:modelValue", true);
71
+ emit("pullUp");
72
+ }
73
+ }, PULL_UP_TIME_OUT);
74
+ };
75
+ const onScroll = ({ state, emit, refs }) => () => {
76
+ pullUpTouchEnd(state, emit, refs);
92
77
  };
93
78
  const mountedHandler = ({ api, refs }) => () => {
94
79
  const track = refs.track;
95
80
  on(track, "touchstart", api.onTouchstart);
96
81
  on(track, "touchmove", api.onTouchmove);
97
82
  on(track, "touchend", api.onTouchend);
83
+ on(track, "scroll", api.onScroll);
98
84
  };
99
85
  const beforeUnmountHandler = ({ api, refs }) => () => {
100
86
  const track = refs.track;
101
87
  off(track, "touchstart", api.onTouchstart);
102
88
  off(track, "touchmove", api.onTouchmove);
103
89
  off(track, "touchend", api.onTouchend);
90
+ off(track, "scroll", api.onScroll);
104
91
  };
105
92
  const handlerModelValue = ({ api, state }) => (value, result) => {
106
93
  state.pullUpLoading = false;
@@ -108,7 +95,7 @@ const handlerModelValue = ({ api, state }) => (value, result) => {
108
95
  if (value === "down") {
109
96
  state.pullDownReplaces = state[`${result}Text`];
110
97
  } else {
111
- state.pullUpReplaces = state[`${result}Text`];
98
+ state.pullUpStateText = state[`${result}Text`];
112
99
  }
113
100
  setTimeout(() => {
114
101
  api.clearPullRefresh();
@@ -116,8 +103,9 @@ const handlerModelValue = ({ api, state }) => (value, result) => {
116
103
  };
117
104
  const clearPullRefresh = (state) => () => {
118
105
  state.translate3d = 0;
119
- state.pullUpReplaces = "";
120
106
  state.pullDownReplaces = "";
107
+ state.pullDownLoading = false;
108
+ state.pullUpLoading = false;
121
109
  };
122
110
  export {
123
111
  beforeUnmountHandler,
@@ -125,7 +113,11 @@ export {
125
113
  handlerModelValue,
126
114
  initPullRefresh,
127
115
  mountedHandler,
116
+ onScroll,
128
117
  onTouchend,
129
118
  onTouchmove,
130
- onTouchstart
119
+ onTouchstart,
120
+ pullDownTouchEnd,
121
+ pullDownTouchMove,
122
+ pullUpTouchEnd
131
123
  };
@@ -6,14 +6,14 @@ import {
6
6
  onTouchstart,
7
7
  onTouchmove,
8
8
  onTouchend,
9
+ onScroll,
9
10
  initPullRefresh,
10
11
  clearPullRefresh
11
12
  } from "./index";
12
13
  const api = ["state"];
13
- const renderless = (props, { watch, onMounted, reactive, onBeforeUnmount }, { t, refs }) => {
14
+ const renderless = (props, { watch, onMounted, reactive, onBeforeUnmount }, { t, refs, emit, nextTick }) => {
14
15
  const api2 = {};
15
16
  const state = reactive({
16
- pullUpReplaces: "",
17
17
  pullDownReplaces: "",
18
18
  refreshStyle: {},
19
19
  translate3d: 0,
@@ -23,17 +23,25 @@ const renderless = (props, { watch, onMounted, reactive, onBeforeUnmount }, { t,
23
23
  loosingText: "",
24
24
  successText: "",
25
25
  failedText: "",
26
- noMoreText: "",
26
+ noMoreText: t("ui.pullRefresh.noMore"),
27
+ pullUpLoadingText: props.pullUpLoadingText,
28
+ pullDownLoadingText: props.pullDownLoadingText,
27
29
  pullUp: null,
28
30
  pullDown: null,
31
+ hasMore: true,
29
32
  successDuration: props.successDuration,
30
- animationDuration: props.animationDuration
33
+ animationDuration: props.animationDuration,
34
+ disabledPullDown: props.disabledPullDown,
35
+ disabledPullUp: props.disabledPullUp,
36
+ pullUpDistance: typeof props.pullUpDistance === "string" ? Number(props.pullUpDistance) : props.pullUpDistance,
37
+ timer: null
31
38
  });
32
39
  Object.assign(api2, {
33
40
  state,
34
41
  onTouchstart: onTouchstart(state),
35
- onTouchmove: onTouchmove({ props, state }),
36
- onTouchend: onTouchend({ api: api2, props, state }),
42
+ onTouchmove: onTouchmove({ state, refs }),
43
+ onTouchend: onTouchend({ api: api2, props, state, emit, refs }),
44
+ onScroll: onScroll({ state, emit, refs }),
37
45
  mountedHandler: mountedHandler({ api: api2, refs }),
38
46
  beforeUnmountHandler: beforeUnmountHandler({ api: api2, refs }),
39
47
  handlerModelValue: handlerModelValue({ api: api2, state }),
@@ -44,7 +52,15 @@ const renderless = (props, { watch, onMounted, reactive, onBeforeUnmount }, { t,
44
52
  () => props.hasMore,
45
53
  (value) => {
46
54
  if (!value) {
47
- state.noMoreText = t("ui.pullRefresh.noMore");
55
+ state.hasMore = false;
56
+ }
57
+ },
58
+ { immediate: true }
59
+ );
60
+ watch(
61
+ () => props.modelValue,
62
+ (value) => {
63
+ if (!value) {
48
64
  api2.clearPullRefresh();
49
65
  }
50
66
  }
package/radio/index.js CHANGED
@@ -61,24 +61,7 @@ const toggleEvent = ({ props, vm, type }) => {
61
61
  });
62
62
  }
63
63
  };
64
- const dispatchDisplayedValue = ({ state, dispatch, api }) => () => {
65
- if (state.isDisplayOnly) {
66
- dispatch("FormItem", "displayed-value-changed", {
67
- type: "radio",
68
- val: api.getDisplayedValue()
69
- });
70
- }
71
- };
72
- const getDisplayedValue = ({ vm, state, props }) => () => {
73
- if (state.model === props.label) {
74
- return vm.$refs.label && vm.$refs.label.innerText || props.text || props.label;
75
- } else {
76
- return "";
77
- }
78
- };
79
64
  export {
80
- dispatchDisplayedValue,
81
- getDisplayedValue,
82
65
  getModel,
83
66
  handleChange,
84
67
  isDisabled,
package/radio/vue.js CHANGED
@@ -8,17 +8,15 @@ import {
8
8
  tabIndex,
9
9
  getModel,
10
10
  setModel,
11
- toggleEvent,
12
- dispatchDisplayedValue,
13
- getDisplayedValue
11
+ toggleEvent
14
12
  } from "./index";
15
13
  const api = ["state", "handleChange"];
16
- const renderless = (props, { onMounted, onBeforeUnmount, computed, reactive, inject, watch }, { vm, parent, emit, constants, nextTick, dispatch }) => {
14
+ const renderless = (props, { onMounted, onBeforeUnmount, computed, reactive, inject }, { vm, parent, emit, constants, nextTick, dispatch }) => {
17
15
  parent.tinyForm = parent.tinyForm || inject("form", null);
18
16
  const api2 = {};
19
17
  const state = reactive({
20
18
  vertical: inject("radioVertical", false),
21
- size: props.size || inject("size", null),
19
+ size: computed(() => props.size || inject("size", null) || (parent.tinyForm || {}).size),
22
20
  focus: false,
23
21
  radioGroup: null,
24
22
  isGroup: computed(() => api2.isGroup()),
@@ -41,13 +39,9 @@ const renderless = (props, { onMounted, onBeforeUnmount, computed, reactive, inj
41
39
  isDisabled: isDisabled({ props, state }),
42
40
  isDisplayOnly: isDisplayOnly({ props }),
43
41
  setModel: setModel({ constants, dispatch, emit, props, vm, state }),
44
- handleChange: handleChange({ constants, dispatch, emit, state, nextTick }),
45
- dispatchDisplayedValue: dispatchDisplayedValue({ state, api: api2, dispatch }),
46
- getDisplayedValue: getDisplayedValue({ vm, state, props })
42
+ handleChange: handleChange({ constants, dispatch, emit, state, nextTick })
47
43
  });
48
- watch(() => state.isDisplayOnly, api2.dispatchDisplayedValue);
49
44
  onMounted(() => {
50
- api2.dispatchDisplayedValue();
51
45
  dispatch("Tooltip", "tooltip-update");
52
46
  toggleEvent({ props, vm, type: "add" });
53
47
  });
package/rate/index.js CHANGED
@@ -136,7 +136,7 @@ const computedText = ({ props, state }) => {
136
136
  currentValue = props.texts.length;
137
137
  }
138
138
  if (props.showScore) {
139
- result = props.scoreTemplate.replace(/\{\s*value\s*\}/, currentValue);
139
+ result = props.scoreTemplate.replace(/\{\s*value\s*\}/, String(currentValue));
140
140
  return result;
141
141
  }
142
142
  if (props.showText && currentValue > 0) {
package/rate/vue.js CHANGED
@@ -30,7 +30,6 @@ const api = [
30
30
  "resetCurrentValue"
31
31
  ];
32
32
  const useChangeValue = ({
33
- computed,
34
33
  constants,
35
34
  emit,
36
35
  props,
@@ -85,7 +84,6 @@ const useChangeValue = ({
85
84
  const renderless = (props, { computed, reactive, toRefs, watch, onMounted, onUnmounted, inject }, { constants, emit, parent }) => {
86
85
  const api2 = {};
87
86
  const changeValue = useChangeValue({
88
- computed,
89
87
  constants,
90
88
  emit,
91
89
  props,
package/record/index.js CHANGED
@@ -148,7 +148,9 @@ const toogleRecord = ({ state, api, emit, constants, props }) => ($event) => {
148
148
  };
149
149
  const handleConfirm = ({ state, emit, props, constants, api }) => ($event) => {
150
150
  if (props.isHwh5) {
151
- api.triggerClick($event, constants.HWH5_STATUS.CANCEL, () => emit("update:modelValue", false));
151
+ api.triggerClick($event, constants.HWH5_STATUS.END, () => {
152
+ emit("update:modelValue", false);
153
+ });
152
154
  } else {
153
155
  state.isClickConfirm = true;
154
156
  emit("update:modelValue", false);
@@ -195,6 +197,7 @@ const calcVoice = (analyser) => {
195
197
  if (highValue <= val) {
196
198
  return voiceNum = idx + 1 + (val === 0 ? lowValue / 1e3 : highValue / val);
197
199
  }
200
+ return false;
198
201
  });
199
202
  !ismatch && (voiceNum = 6);
200
203
  return voiceNum;
@@ -58,7 +58,7 @@ const tableMouseMove = (state, vm) => (e) => {
58
58
  state.flagX = Math.ceil((e.x - x) / 30);
59
59
  state.flagY = Math.ceil((e.y - y) / 30);
60
60
  };
61
- const tableChoose = (state, vm) => (e) => {
61
+ const tableChoose = (state) => () => {
62
62
  if (state.flagX && state.flagY) {
63
63
  state.editor.chain().focus().insertTable({ rows: state.flagY, cols: state.flagX, withHeaderRow: true }).run();
64
64
  }
@@ -70,7 +70,7 @@ const toggleTablePanel = (state) => () => {
70
70
  const closeTablePanel = (state) => () => {
71
71
  state.isShowTable && (state.isShowTable = false);
72
72
  };
73
- const shouldShow = ({ editor, view, state, oldState, from, to }) => {
73
+ const shouldShow = ({ editor }) => {
74
74
  return editor.isActive("table");
75
75
  };
76
76
  const eventMap = /* @__PURE__ */ new Map();
@@ -27,7 +27,7 @@ const api = [
27
27
  "eventClick",
28
28
  "Active"
29
29
  ];
30
- const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref, markRaw }, { vm, emit, parent }, {
30
+ const renderless = (props, { computed, onBeforeUnmount, reactive }, { vm, emit }, {
31
31
  Editor,
32
32
  StarterKit,
33
33
  Table,
@@ -235,10 +235,7 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref
235
235
  emit("create", { editor });
236
236
  },
237
237
  onUpdate({ editor }) {
238
- const json = editor.getJSON();
239
238
  const html = editor.getHTML();
240
- const text = editor.getText();
241
- const lineText = editor.getText({ blockSeparator: "--" });
242
239
  emit("update", { editor });
243
240
  emit("update:modelValue", html);
244
241
  },
@@ -260,7 +257,7 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, ref
260
257
  }, props.options);
261
258
  let options = Object.assign(defaultOptions, props.options);
262
259
  const state = reactive({
263
- editor: markRaw(new Editor(options)),
260
+ editor: new Editor(options),
264
261
  toolbar: computed(() => props.customToolBar.length ? props.customToolBar : defaultToolBar),
265
262
  // table 变量
266
263
  isShowTable: false,
@@ -37,10 +37,10 @@ const clickThumbHandler = ({ api, state }) => (event) => {
37
37
  api.startDrag(event);
38
38
  state[state.bar.axis] = event.currentTarget[state.bar.offset] - (event[state.bar.client] - event.currentTarget.getBoundingClientRect()[state.bar.direction]);
39
39
  };
40
- const clickTrackHandler = ({ refs, state }) => (event) => {
40
+ const clickTrackHandler = ({ vm, state }) => (event) => {
41
41
  const offset = Math.abs(event.target.getBoundingClientRect()[state.bar.direction] - event[state.bar.client]);
42
- const thumbHalf = refs.thumb[state.bar.offset] / 2;
43
- const thumbPositionPercentage = (offset - thumbHalf) * 100 / refs.bar[state.bar.offset];
42
+ const thumbHalf = vm.$refs.thumb[state.bar.offset] / 2;
43
+ const thumbPositionPercentage = (offset - thumbHalf) * 100 / vm.$refs.bar[state.bar.offset];
44
44
  state.wrap[state.bar.scroll] = thumbPositionPercentage * state.wrap[state.bar.scrollSize] / 100;
45
45
  };
46
46
  const startDrag = ({ api, on, state }) => (event) => {
@@ -50,7 +50,7 @@ const startDrag = ({ api, on, state }) => (event) => {
50
50
  on(document, "mouseup", api.mouseUpDocumentHandler);
51
51
  document.onselectstart = () => false;
52
52
  };
53
- const mouseMoveDocumentHandler = ({ refs, state }) => (event) => {
53
+ const mouseMoveDocumentHandler = ({ vm, state }) => (event) => {
54
54
  if (state.cursorDown === false) {
55
55
  return;
56
56
  }
@@ -58,9 +58,9 @@ const mouseMoveDocumentHandler = ({ refs, state }) => (event) => {
58
58
  if (!prevPage) {
59
59
  return;
60
60
  }
61
- const offset = (refs.bar.getBoundingClientRect()[state.bar.direction] - event[state.bar.client]) * -1;
62
- const thumbClickPosition = refs.thumb[state.bar.offset] - prevPage;
63
- const thumbPositionPercentage = (offset - thumbClickPosition) * 100 / refs.bar[state.bar.offset];
61
+ const offset = (vm.$refs.bar.getBoundingClientRect()[state.bar.direction] - event[state.bar.client]) * -1;
62
+ const thumbClickPosition = vm.$refs.thumb[state.bar.offset] - prevPage;
63
+ const thumbPositionPercentage = (offset - thumbClickPosition) * 100 / vm.$refs.bar[state.bar.offset];
64
64
  state.wrap[state.bar.scroll] = thumbPositionPercentage * state.wrap[state.bar.scrollSize] / 100;
65
65
  };
66
66
  const mouseUpDocumentHandler = ({ api, off, state }) => () => {
@@ -69,15 +69,15 @@ const mouseUpDocumentHandler = ({ api, off, state }) => () => {
69
69
  off(document, "mousemove", api.mouseMoveDocumentHandler);
70
70
  document.onselectstart = null;
71
71
  };
72
- const handleScroll = ({ refs, state, emit }) => (event) => {
73
- const wrap = refs.wrap;
72
+ const handleScroll = ({ vm, state, emit }) => (event) => {
73
+ const wrap = vm.$refs.wrap;
74
74
  state.moveY = wrap.scrollTop * 100 / wrap.clientHeight;
75
75
  state.moveX = wrap.scrollLeft * 100 / wrap.clientWidth;
76
76
  emit("scroll", event);
77
77
  };
78
- const update = ({ refs, state }) => () => {
78
+ const update = ({ vm, state }) => () => {
79
79
  let heightPercentage, widthPercentage;
80
- const wrap = refs.wrap;
80
+ const wrap = vm.$refs.wrap;
81
81
  if (!wrap) {
82
82
  return;
83
83
  }
@@ -18,7 +18,7 @@ const api = [
18
18
  "mouseUpDocumentHandler",
19
19
  "mouseMoveDocumentHandler"
20
20
  ];
21
- const renderless = (props, { computed, onUnmounted, reactive }, { refs, parent }) => {
21
+ const renderless = (props, { computed, onUnmounted, reactive }, { vm, parent }) => {
22
22
  const state = reactive({
23
23
  bar: computed(() => BAR_MAP[props.vertical ? "vertical" : "horizontal"]),
24
24
  wrap: computed(() => parent.$refs.wrap)
@@ -26,8 +26,8 @@ const renderless = (props, { computed, onUnmounted, reactive }, { refs, parent }
26
26
  const api2 = {
27
27
  state,
28
28
  renderThumbStyle,
29
- clickTrackHandler: clickTrackHandler({ refs, state }),
30
- mouseMoveDocumentHandler: mouseMoveDocumentHandler({ refs, state })
29
+ clickTrackHandler: clickTrackHandler({ vm, state }),
30
+ mouseMoveDocumentHandler: mouseMoveDocumentHandler({ vm, state })
31
31
  };
32
32
  onUnmounted(() => off(document, "mouseup", api2.mouseUpDocumentHandler));
33
33
  return Object.assign(api2, {
package/scrollbar/vue.js CHANGED
@@ -2,7 +2,7 @@ import "../chunk-G2ADBYYC.js";
2
2
  import { handleScroll, update } from "./index";
3
3
  import { addResizeListener, removeResizeListener } from "../common/deps/resize-event";
4
4
  const api = ["state", "update", "handleScroll"];
5
- const renderless = (props, { onBeforeUnmount, onMounted, reactive }, { refs, nextTick, emit }) => {
5
+ const renderless = (props, { onBeforeUnmount, onMounted, reactive }, { vm, nextTick, emit }) => {
6
6
  const state = reactive({
7
7
  sizeWidth: "0",
8
8
  sizeHeight: "0",
@@ -11,21 +11,21 @@ const renderless = (props, { onBeforeUnmount, onMounted, reactive }, { refs, nex
11
11
  });
12
12
  const api2 = {
13
13
  state,
14
- update: update({ refs, state }),
15
- handleScroll: handleScroll({ refs, state, emit })
14
+ update: update({ vm, state }),
15
+ handleScroll: handleScroll({ vm, state, emit })
16
16
  };
17
17
  onMounted(() => {
18
18
  if (props.native) {
19
19
  return;
20
20
  }
21
21
  nextTick(api2.update);
22
- !props.noresize && addResizeListener(refs.resize, api2.update);
22
+ !props.noresize && addResizeListener(vm.$refs.resize, api2.update);
23
23
  });
24
24
  onBeforeUnmount(() => {
25
25
  if (props.native) {
26
26
  return;
27
27
  }
28
- !props.noresize && removeResizeListener(refs.resize, api2.update);
28
+ !props.noresize && removeResizeListener(vm.$refs.resize, api2.update);
29
29
  });
30
30
  return api2;
31
31
  };
package/search/index.js CHANGED
@@ -76,8 +76,8 @@ const clear = ({ api, emit, refs, state }) => (event) => {
76
76
  state.currentValue = "";
77
77
  refs.input.focus();
78
78
  state.focus = true;
79
- emit("change", [], "");
80
79
  api.emitInput("", state.searchValue);
80
+ emit("change", [], "");
81
81
  emit("clear");
82
82
  };
83
83
  export {
package/search/vue.js CHANGED
@@ -66,7 +66,9 @@ const renderless = (props, { computed, onBeforeUnmount, onMounted, reactive, toR
66
66
  collapse: props.mini,
67
67
  currentValue: props.modelValue
68
68
  }, formatSearchTypes2.state), {
69
- showClear: computed(() => props.clearable && (state.focus || state.hovering) && state.currentValue)
69
+ showClear: computed(() => props.clearable && (state.focus || state.hovering) && state.currentValue),
70
+ formItemSize: computed(() => (parent.formItem || {}).formItemSize),
71
+ searchSize: computed(() => props.size || state.formItemSize)
70
72
  }));
71
73
  const api2 = __spreadValues({
72
74
  state,