@opentiny/vue-renderless 3.13.1 → 3.14.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 (321) hide show
  1. package/action-sheet/index.js +20 -13
  2. package/action-sheet/vue.js +8 -7
  3. package/amount/index.js +100 -25
  4. package/amount/vue.js +102 -26
  5. package/anchor/index.js +1 -0
  6. package/area/index.js +8 -8
  7. package/area/vue.js +5 -5
  8. package/async-flowchart/index.js +16 -3
  9. package/autocomplete/index.js +58 -14
  10. package/autocomplete/vue.js +40 -12
  11. package/badge/index.js +12 -0
  12. package/badge/vue.js +6 -4
  13. package/breadcrumb/vue.js +3 -1
  14. package/breadcrumb-item/vue.js +6 -2
  15. package/button/index.js +5 -1
  16. package/calendar/index.js +2 -86
  17. package/calendar-bar/index.js +18 -4
  18. package/calendar-view/index.js +5 -1
  19. package/calendar-view/vue.js +16 -3
  20. package/card-group/vue.js +4 -2
  21. package/cascader/index.js +86 -34
  22. package/cascader/vue.js +61 -20
  23. package/cascader-menu/index.js +7 -7
  24. package/cascader-menu/vue.js +2 -3
  25. package/cascader-mobile/index.js +36 -23
  26. package/cascader-mobile/vue.js +6 -0
  27. package/cascader-node/index.js +13 -1
  28. package/cascader-node/vue.js +15 -4
  29. package/cascader-panel/index.js +1 -1
  30. package/cascader-select/column-index.js +150 -0
  31. package/cascader-select/column.js +120 -0
  32. package/cascader-select/index.js +29 -165
  33. package/cascader-select/usePicker.js +251 -0
  34. package/cascader-select/useTouch.js +65 -0
  35. package/cascader-select/vue.js +35 -47
  36. package/cell/vue.js +2 -1
  37. package/chart-bar/index.js +2 -3
  38. package/chart-core/deps/constants.js +43 -43
  39. package/chart-core/index.js +1 -1
  40. package/chart-gauge/index.js +2 -2
  41. package/chart-heatmap/index.js +17 -10
  42. package/chart-line/index.js +8 -9
  43. package/chart-tree/index.js +2 -2
  44. package/chart-waterfall/index.js +4 -6
  45. package/checkbox/index.js +18 -1
  46. package/checkbox/vue.js +15 -7
  47. package/checkbox-group/vue.js +1 -0
  48. package/col/vue.js +1 -1
  49. package/collapse/index.js +3 -3
  50. package/color-select-panel/vue.js +0 -7
  51. package/column-list-item/index.js +17 -1
  52. package/column-list-item/vue.js +8 -3
  53. package/common/date.js +7 -5
  54. package/common/deps/clickoutside.js +6 -2
  55. package/common/deps/dom.js +19 -4
  56. package/common/deps/popper.js +44 -11
  57. package/common/deps/resize-event.js +1 -0
  58. package/common/deps/touch-emulator.js +4 -1
  59. package/common/deps/tree-model/node.js +2 -2
  60. package/common/deps/tree-model/tree-store.js +2 -13
  61. package/common/deps/useRect.js +25 -0
  62. package/common/deps/vue-popper.js +38 -20
  63. package/common/index.js +2 -2
  64. package/common/runtime.js +1 -1
  65. package/common/string.js +2 -2
  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/currency/index.js +74 -7
  77. package/currency/vue.js +21 -5
  78. package/date-panel/index.js +16 -0
  79. package/date-panel/vue.js +8 -2
  80. package/date-picker-mobile/index.js +12 -0
  81. package/date-picker-mobile/vue.js +7 -1
  82. package/date-range/vue.js +14 -6
  83. package/date-table/index.js +5 -0
  84. package/date-table/vue.js +3 -1
  85. package/dialog-box/index.js +46 -14
  86. package/dialog-box/vue.js +30 -7
  87. package/dialog-select/index.js +6 -3
  88. package/dialog-select/vue.js +8 -4
  89. package/drawer/index.js +27 -5
  90. package/drawer/vue.js +14 -7
  91. package/dropdown/index.js +7 -7
  92. package/dropdown/vue.js +6 -2
  93. package/dropdown-item/index.js +9 -1
  94. package/dropdown-item/mf.js +6 -10
  95. package/dropdown-item/vue.js +20 -7
  96. package/dropdown-menu/index.js +20 -7
  97. package/dropdown-menu/vue.js +4 -3
  98. package/exception/index.js +2 -7
  99. package/exception/vue.js +7 -10
  100. package/fall-menu/index.js +5 -1
  101. package/fall-menu/vue.js +13 -2
  102. package/file-upload/index.js +68 -18
  103. package/file-upload/vue.js +38 -8
  104. package/filter-box/index.js +1 -0
  105. package/float-button/index.js +42 -0
  106. package/float-button/vue.js +101 -0
  107. package/floating-button/index.js +62 -16
  108. package/floating-button/vue.js +27 -9
  109. package/flowchart/index.js +134 -25
  110. package/flowchart/node.js +13 -4
  111. package/flowchart/vue.js +16 -4
  112. package/form/vue.js +8 -0
  113. package/form-item/index.js +5 -5
  114. package/form-item/vue.js +3 -1
  115. package/fullscreen/index.js +5 -5
  116. package/fullscreen/vue.js +3 -3
  117. package/grid/plugins/export.js +5 -2
  118. package/grid/utils/column.js +1 -0
  119. package/grid/utils/dom.js +7 -1
  120. package/image/index.js +6 -1
  121. package/image/vue.js +6 -3
  122. package/image-viewer/index.js +62 -51
  123. package/image-viewer/vue.js +17 -5
  124. package/input/index.js +81 -20
  125. package/input/vue.js +44 -18
  126. package/ip-address/index.js +61 -19
  127. package/ip-address/vue.js +22 -4
  128. package/link/vue.js +3 -1
  129. package/loading/index.js +2 -2
  130. package/loading/vue.js +8 -2
  131. package/logout/index.js +1 -1
  132. package/menu/index.js +15 -2
  133. package/menu/vue.js +22 -17
  134. package/mind-map/index.js +47 -0
  135. package/mind-map/vue.js +53 -0
  136. package/modal/index.js +44 -4
  137. package/modal/vue.js +18 -4
  138. package/multi-select/index.js +186 -11
  139. package/multi-select/vue.js +60 -15
  140. package/multi-select-item/index.js +23 -0
  141. package/multi-select-item/vue.js +31 -0
  142. package/numeric/index.js +46 -12
  143. package/numeric/vue.js +44 -19
  144. package/option/index.js +27 -9
  145. package/option/vue.js +37 -21
  146. package/option-group/index.js +3 -3
  147. package/package.json +1 -1
  148. package/pager/index.js +18 -4
  149. package/pager/vue.js +16 -5
  150. package/picker/index.js +258 -49
  151. package/picker/mb.js +42 -0
  152. package/picker/vue.js +70 -17
  153. package/picker-column/index.js +1 -1
  154. package/pop-upload/vue.js +3 -0
  155. package/popconfirm/index.js +3 -6
  156. package/popconfirm/vue.js +1 -1
  157. package/popeditor/index.js +71 -32
  158. package/popeditor/vue.js +15 -11
  159. package/popover/index.js +4 -4
  160. package/popover/vue.js +6 -6
  161. package/popup/index.js +3 -3
  162. package/popup/vue.js +5 -5
  163. package/pull-refresh/index.js +13 -13
  164. package/pull-refresh/vue.js +5 -4
  165. package/radio/index.js +0 -17
  166. package/radio/vue.js +4 -10
  167. package/rate/index.js +1 -1
  168. package/rate/vue.js +0 -2
  169. package/record/index.js +4 -1
  170. package/rich-text/clipboard.js +54 -0
  171. package/rich-text/index.js +192 -0
  172. package/rich-text/module/file-upload.js +107 -0
  173. package/rich-text/module/image-drop.js +63 -0
  174. package/rich-text/module/image-upload.js +89 -0
  175. package/rich-text/options.js +141 -0
  176. package/rich-text/table-module.js +382 -0
  177. package/rich-text/vue.js +102 -0
  178. package/{rich-text-edtior → rich-text-editor}/index.js +2 -2
  179. package/{rich-text-edtior → rich-text-editor}/vue.js +2 -5
  180. package/scrollbar/index.js +11 -11
  181. package/scrollbar/vue-bar.js +3 -3
  182. package/scrollbar/vue.js +5 -5
  183. package/search/index.js +9 -9
  184. package/search/vue.js +8 -6
  185. package/select/index.js +457 -389
  186. package/select/vue.js +257 -161
  187. package/select-dropdown/index.js +61 -3
  188. package/select-dropdown/vue.js +85 -8
  189. package/select-view/index.js +3 -1
  190. package/selected-box/index.js +2 -0
  191. package/selected-box/vue.js +6 -3
  192. package/signature/index.js +241 -0
  193. package/signature/vue.js +88 -0
  194. package/skeleton/index.js +14 -0
  195. package/skeleton/vue.js +15 -0
  196. package/skeleton-item/vue.js +15 -0
  197. package/slider/index.js +70 -17
  198. package/slider/vue.js +16 -7
  199. package/split/index.js +5 -3
  200. package/split/vue.js +4 -6
  201. package/standard-list-item/index.js +15 -1
  202. package/standard-list-item/vue.js +6 -5
  203. package/steps/index.js +25 -2
  204. package/steps/slide-bar.js +8 -1
  205. package/steps/vue.js +15 -3
  206. package/tab-item-mf/vue.js +14 -8
  207. package/tab-nav/index.js +30 -5
  208. package/tab-nav/vue.js +16 -4
  209. package/tabbar/vue.js +9 -3
  210. package/tabbar-item/vue.js +3 -2
  211. package/tabs/index.js +16 -4
  212. package/tabs/vue.js +2 -1
  213. package/tabs-mf/index.js +20 -6
  214. package/tabs-mf/vue-nav.js +26 -11
  215. package/tabs-mf/vue.js +7 -7
  216. package/tabs-mf/wheel.js +1 -0
  217. package/tag/index.js +1 -1
  218. package/tag-group/index.js +2 -1
  219. package/time/index.js +5 -2
  220. package/time/vue.js +1 -1
  221. package/time-line/index.js +3 -3
  222. package/time-line/vue.js +2 -2
  223. package/time-picker-mobile/index.js +24 -5
  224. package/time-picker-mobile/vue.js +17 -7
  225. package/time-range/index.js +2 -0
  226. package/timeline-item/vue.js +1 -1
  227. package/tooltip/index.js +6 -3
  228. package/tooltip/vue.js +4 -4
  229. package/transfer/index.js +20 -22
  230. package/transfer/vue.js +1 -6
  231. package/transfer-panel/vue.js +3 -5
  232. package/tree/index.js +21 -4
  233. package/tree/vue.js +10 -8
  234. package/tree-menu/index.js +31 -5
  235. package/tree-menu/vue.js +28 -15
  236. package/tree-node/index.js +18 -18
  237. package/tree-node/vue.js +6 -5
  238. package/types/action-sheet.type.d.ts +118 -1
  239. package/types/alert.type.d.ts +1 -1
  240. package/types/amount.type.d.ts +168 -1
  241. package/types/area.type.d.ts +134 -1
  242. package/types/async-flowchart.type.d.ts +72 -0
  243. package/types/autocomplete.type.d.ts +199 -1
  244. package/types/badge.type.d.ts +3 -1
  245. package/types/breadcrumb-item.type.d.ts +2 -0
  246. package/types/breadcrumb.type.d.ts +2 -0
  247. package/types/button-group.type.d.ts +3 -3
  248. package/types/button.type.d.ts +4 -0
  249. package/types/cascader-menu.type.d.ts +3 -4
  250. package/types/cascader-node.type.d.ts +5 -2
  251. package/types/cascader-panel.type-2bd03be3.d.ts +241 -0
  252. package/types/cascader-panel.type.d.ts +3 -241
  253. package/types/cascader.type.d.ts +329 -1
  254. package/types/checkbox.type.d.ts +9 -3
  255. package/types/collapse.type.d.ts +20 -3
  256. package/types/date-picker.type.d.ts +37 -0
  257. package/types/dialog-box.type.d.ts +13 -3
  258. package/types/drawer.type.d.ts +133 -1
  259. package/types/{dropdown-item.type-8ea6c633.d.ts → dropdown-item.type-8475a549.d.ts} +7 -13
  260. package/types/dropdown-item.type.d.ts +1 -1
  261. package/types/dropdown-menu.type.d.ts +1 -1
  262. package/types/dropdown.type.d.ts +1 -5
  263. package/types/fall-menu.type.d.ts +94 -1
  264. package/types/file-upload.type.d.ts +1 -1
  265. package/types/float-button.type.d.ts +123 -0
  266. package/types/form-item.type.d.ts +1 -1
  267. package/types/{form.type-d0fd42f3.d.ts → form.type-222799ae.d.ts} +5 -2
  268. package/types/form.type.d.ts +1 -1
  269. package/types/{index-e0250f63.d.ts → index-b012f687.d.ts} +9 -0
  270. package/types/input.type.d.ts +1 -5
  271. package/types/ip-address.type.d.ts +160 -1
  272. package/types/link.type.d.ts +6 -3
  273. package/types/loading.type.d.ts +7 -0
  274. package/types/milestone.type.d.ts +1 -1
  275. package/types/mind-map.type.d.ts +20 -0
  276. package/types/modal.type.d.ts +29 -2
  277. package/types/numeric.type.d.ts +41 -10
  278. package/types/pager.type.d.ts +13 -1
  279. package/types/picker.type.d.ts +18 -0
  280. package/types/popconfirm.type.d.ts +86 -1
  281. package/types/popeditor.type.d.ts +5 -1
  282. package/types/popover.type.d.ts +3 -3
  283. package/types/progress.type.d.ts +3 -1
  284. package/types/radio.type.d.ts +0 -4
  285. package/types/rate.type.d.ts +236 -1
  286. package/types/search.type.d.ts +88 -1
  287. package/types/shared.type.d.ts +1 -1
  288. package/types/skeleton-item.type.d.ts +38 -0
  289. package/types/skeleton.type.d.ts +45 -0
  290. package/types/slider.type.d.ts +49 -10
  291. package/types/steps.type.d.ts +15 -4
  292. package/types/switch.type.d.ts +3 -3
  293. package/types/tab-bar.type.d.ts +1 -1
  294. package/types/tab-nav.type.d.ts +7 -2
  295. package/types/tabs.type.d.ts +9 -1
  296. package/types/tag-group.type.d.ts +64 -1
  297. package/types/{time-line.type-d7daa669.d.ts → time-line.type-b155cb4f.d.ts} +12 -0
  298. package/types/time-line.type.d.ts +1 -1
  299. package/types/timeline-item.type.d.ts +1 -1
  300. package/types/tooltip.type.d.ts +2 -2
  301. package/types/transfer.type.d.ts +185 -1
  302. package/types/tree-menu.type.d.ts +210 -1
  303. package/types/upload-dragger.type.d.ts +2 -2
  304. package/types/{upload-list.type-343e8c11.d.ts → upload-list.type-a29aea50.d.ts} +31 -8
  305. package/types/upload-list.type.d.ts +1 -1
  306. package/types/upload.type.d.ts +1 -1
  307. package/types/user-head.type.d.ts +146 -1
  308. package/types/wizard.type.d.ts +1 -0
  309. package/upload/index.js +64 -34
  310. package/upload/vue.js +9 -5
  311. package/upload-dragger/index.js +22 -20
  312. package/upload-list/index.js +24 -18
  313. package/upload-list/vue.js +9 -4
  314. package/user/index.js +34 -25
  315. package/user/vue.js +1 -1
  316. package/user-head/index.js +3 -3
  317. package/watermark/index.js +11 -0
  318. package/wheel/index.js +3 -0
  319. package/wizard/vue.js +4 -2
  320. package/common/deps/modal-queue.js +0 -6
  321. package/common/deps/requestAnimationFrame.js +0 -25
package/pager/index.js CHANGED
@@ -34,11 +34,11 @@ const computedTotalText = ({ props, t }) => () => {
34
34
  const HUNDRED_THOUSAND = 1e5;
35
35
  const MILLION = 1e6;
36
36
  const TEN_MILLION = 1e7;
37
- if (totals <= HUNDRED_THOUSAND) {
37
+ if (totals < HUNDRED_THOUSAND) {
38
38
  return String(totals);
39
- } else if (totals <= MILLION) {
39
+ } else if (totals < MILLION) {
40
40
  return t("ui.page.hundredThousand");
41
- } else if (totals <= TEN_MILLION) {
41
+ } else if (totals < TEN_MILLION) {
42
42
  return t("ui.page.million");
43
43
  } else {
44
44
  return t("ui.page.tenMillion");
@@ -61,7 +61,7 @@ const watchInternalCurrentPage = ({ state, emit }) => (currentPage) => {
61
61
  if (state.jumperValue !== value) {
62
62
  state.jumperValue = value;
63
63
  }
64
- emit("update:currentPage", currentPage);
64
+ emit("update:current-page", currentPage);
65
65
  emit("current-change", currentPage);
66
66
  state.lastEmittedPage = -1;
67
67
  };
@@ -89,6 +89,17 @@ const watchPageSize = ({ state }) => (pageSize) => {
89
89
  const watchTotal = ({ state }) => (total) => {
90
90
  state.internalTotal = total;
91
91
  };
92
+ const watchShowSizes = ({ nextTick, vm }) => (newVal) => {
93
+ if (newVal) {
94
+ nextTick(() => {
95
+ const width = vm.$refs.pageSize[0].getBoundingClientRect().width;
96
+ const popover = document.querySelectorAll(".tiny-pager__selector");
97
+ Array.from(popover).forEach((ele) => {
98
+ ele.style.width = width + "px";
99
+ });
100
+ });
101
+ }
102
+ };
92
103
  const handleSizeChange = ({ props, state, api, emit, vm }) => (val) => {
93
104
  val = Number(val);
94
105
  if (val !== state.internalPageSize) {
@@ -322,6 +333,7 @@ const emitChange = ({ state, nextTick, emit }) => () => {
322
333
  const setTotal = ({ state }) => (val) => {
323
334
  state.internalTotal = val;
324
335
  };
336
+ const clickSizes = () => (e) => e.stopPropagation();
325
337
  export {
326
338
  beforeChangeHandler,
327
339
  beforeJumperChangeHandler,
@@ -329,6 +341,7 @@ export {
329
341
  beforeSizeChangeHandler,
330
342
  buildBeforePageChangeParam,
331
343
  canJumperGo,
344
+ clickSizes,
332
345
  computedInternalLayout,
333
346
  computedInternalPageCount,
334
347
  computedShowPager,
@@ -354,5 +367,6 @@ export {
354
367
  watchInternalPageCount,
355
368
  watchPageSize,
356
369
  watchPageSizes,
370
+ watchShowSizes,
357
371
  watchTotal
358
372
  };
package/pager/vue.js CHANGED
@@ -25,12 +25,14 @@ import {
25
25
  getValidCurrentPage,
26
26
  emitChange,
27
27
  setTotal,
28
+ clickSizes,
28
29
  watchInternalCurrentPage,
29
30
  watchPageSizes,
30
31
  watchCurrentPage,
31
32
  watchInternalPageCount,
32
33
  watchPageSize,
33
- watchTotal
34
+ watchTotal,
35
+ watchShowSizes
34
36
  } from "./index";
35
37
  const api = [
36
38
  "state",
@@ -54,9 +56,11 @@ const api = [
54
56
  "buildBeforePageChangeParam",
55
57
  "getValidCurrentPage",
56
58
  "emitChange",
57
- "setTotal"
59
+ "setTotal",
60
+ "clickSizes"
58
61
  ];
59
- const renderless = (props, { reactive, computed, watch }, { emit, vm, nextTick, t }) => {
62
+ const renderless = (props, { reactive, computed, watch }, { emit, vm, nextTick, t, designConfig }) => {
63
+ var _a, _b, _c, _d, _e, _f, _g;
60
64
  const api2 = {};
61
65
  const state = reactive({
62
66
  showSizes: false,
@@ -70,7 +74,11 @@ const renderless = (props, { reactive, computed, watch }, { emit, vm, nextTick,
70
74
  showPager: computed(() => api2.computedShowPager()),
71
75
  internalLayout: computed(() => api2.computedInternalLayout()),
72
76
  totalText: computed(() => api2.computedTotalText()),
73
- internalPageCount: computed(() => api2.computedInternalPageCount())
77
+ internalPageCount: computed(() => api2.computedInternalPageCount()),
78
+ showJumperSufix: (_b = (_a = designConfig == null ? void 0 : designConfig.state) == null ? void 0 : _a.showJumperSufix) != null ? _b : true,
79
+ align: props.align || ((_c = designConfig == null ? void 0 : designConfig.state) == null ? void 0 : _c.align) || "left",
80
+ totalI18n: ((_d = designConfig == null ? void 0 : designConfig.state) == null ? void 0 : _d.totalI18n) || "totals",
81
+ totalFixedLeft: (_g = (_f = props.totalFixedLeft) != null ? _f : (_e = designConfig == null ? void 0 : designConfig.state) == null ? void 0 : _e.totalFixedLeft) != null ? _g : false
74
82
  });
75
83
  Object.assign(api2, {
76
84
  state,
@@ -99,13 +107,15 @@ const renderless = (props, { reactive, computed, watch }, { emit, vm, nextTick,
99
107
  buildBeforePageChangeParam: buildBeforePageChangeParam({ state }),
100
108
  emitChange: emitChange({ state, nextTick, emit }),
101
109
  setTotal: setTotal({ state }),
110
+ clickSizes: clickSizes(),
102
111
  // watch
103
112
  watchInternalCurrentPage: watchInternalCurrentPage({ state, emit }),
104
113
  watchPageSizes: watchPageSizes({ state, props }),
105
114
  watchCurrentPage: watchCurrentPage({ state, api: api2 }),
106
115
  watchInternalPageCount: watchInternalPageCount({ state, api: api2 }),
107
116
  watchPageSize: watchPageSize({ state }),
108
- watchTotal: watchTotal({ state })
117
+ watchTotal: watchTotal({ state }),
118
+ watchShowSizes: watchShowSizes({ nextTick, vm })
109
119
  });
110
120
  state.internalCurrentPage = api2.getValidCurrentPage(props.currentPage);
111
121
  watch(() => state.internalCurrentPage, api2.watchInternalCurrentPage);
@@ -114,6 +124,7 @@ const renderless = (props, { reactive, computed, watch }, { emit, vm, nextTick,
114
124
  watch(() => state.internalPageCount, api2.watchInternalPageCount);
115
125
  watch(() => props.pageSize, api2.watchPageSize, { immediate: true });
116
126
  watch(() => props.total, api2.watchTotal);
127
+ watch(() => state.showSizes, api2.watchShowSizes);
117
128
  return api2;
118
129
  };
119
130
  export {
package/picker/index.js CHANGED
@@ -6,7 +6,7 @@ import { toDate, getDateWithNewTimezone, getStrTimezone, getLocalTimezone } from
6
6
  import { isNumber, isDate } from "../common/type";
7
7
  import userPopper from "../common/deps/vue-popper";
8
8
  import { DATEPICKER } from "../common";
9
- import { formatDate, parseDate, isDateObject, getWeekNumber } from "../common/deps/date-util";
9
+ import { formatDate, parseDate, isDateObject, getWeekNumber, prevDate, nextDate } from "../common/deps/date-util";
10
10
  import { extend } from "../common/object";
11
11
  import { isFunction } from "../common/type";
12
12
  import globalTimezone from "./timezone";
@@ -28,9 +28,8 @@ const getPanel = ({ DatePanel, DateRangePanel, MonthRangePanel, YearRangePanel,
28
28
  return DatePanel;
29
29
  };
30
30
  const watchPickerVisible = ({ api, vm, dispatch, emit, props, state }) => (value) => {
31
- if (props.readonly || state.pickerDisabled) {
31
+ if (props.readonly || state.pickerDisabled || state.isMobileScreen)
32
32
  return;
33
- }
34
33
  if (value) {
35
34
  api.showPicker();
36
35
  state.valueOnOpen = Array.isArray(props.modelValue) ? [...props.modelValue] : props.modelValue;
@@ -41,6 +40,9 @@ const watchPickerVisible = ({ api, vm, dispatch, emit, props, state }) => (value
41
40
  if (props.validateEvent) {
42
41
  dispatch("FormItem", "form.blur");
43
42
  }
43
+ if (props.changeOnConfirm && !valueEquals(props.modelValue, state.oldValue)) {
44
+ emit("update:modelValue", state.oldValue);
45
+ }
44
46
  emit("blur", vm);
45
47
  api.blur();
46
48
  }
@@ -72,16 +74,24 @@ const getMode = ({ state }) => () => {
72
74
  }
73
75
  return DATEPICKER.Day;
74
76
  };
75
- const formatAsFormatAndType = ({ api }) => (value, customFormat, type) => {
76
- if (!value) {
77
+ const formatAsFormatAndType = ({ api }) => (value, customFormat, type, formatObj) => {
78
+ if (!value)
77
79
  return null;
78
- }
79
80
  const formatter = (api.typeValueResolveMap()[type] || api.typeValueResolveMap().default).formatter;
80
81
  const format = customFormat || DATEPICKER.DateFormats[type];
81
- return formatter(value, format);
82
+ return formatter(value, format, formatObj);
82
83
  };
83
84
  const displayValue = ({ api, props, state }) => () => {
84
- const formattedValue = api.formatAsFormatAndType(state.parsedValue, state.format, state.type, props.rangeSeparator);
85
+ const formatObj = {
86
+ rangeSeparator: props.rangeSeparator
87
+ };
88
+ const formattedValue = api.formatAsFormatAndType(
89
+ state.parsedValue,
90
+ state.format,
91
+ state.type,
92
+ props.rangeSeparator,
93
+ formatObj
94
+ );
85
95
  if (Array.isArray(state.userInput)) {
86
96
  return [
87
97
  state.userInput[0] || formattedValue && formattedValue[0] || "",
@@ -110,7 +120,7 @@ const parsedValue = ({ api, props, state, t }) => () => {
110
120
  return props.modelValue;
111
121
  }
112
122
  const valueIsDateObject = isDateObject(props.modelValue) || Array.isArray(props.modelValue) && props.modelValue.every(isDateObject);
113
- const { from, to, isServiceTimezone } = state.timezone;
123
+ const { from, to, isServiceTimezone, timezoneOffset } = state.timezone;
114
124
  if (valueIsDateObject && !isServiceTimezone) {
115
125
  return props.modelValue;
116
126
  }
@@ -125,18 +135,18 @@ const parsedValue = ({ api, props, state, t }) => () => {
125
135
  }
126
136
  const result = api.parseAsFormatAndType(date, state.valueFormat, state.type, props.rangeSeparator);
127
137
  if (Array.isArray(result)) {
128
- return result.map((date2) => getDateWithNewTimezone(date2, from, to));
138
+ return result.map((date2) => getDateWithNewTimezone(date2, from, to, timezoneOffset));
129
139
  }
130
- return getDateWithNewTimezone(result || props.modelValue, from, to);
140
+ return getDateWithNewTimezone(result || props.modelValue, from, to, timezoneOffset);
131
141
  }
132
142
  const trans = (value) => typeof value === "string" || isNumber(value) ? toDate(value) : value;
133
- const values = [].concat(props.modelValue).map((val) => getDateWithNewTimezone(trans(val), from, to));
143
+ const values = [].concat(props.modelValue).map((val) => getDateWithNewTimezone(trans(val), from, to, timezoneOffset));
134
144
  return values.length > 1 ? values : values[0];
135
145
  };
136
146
  const getTimezone = ({ props, utils }) => () => {
137
- const { dbTimezone, timezone, isutc8, type = "date", iso8601 } = props;
147
+ const { dbTimezone, timezone, isutc8, type = "date", iso8601, timezoneOffset } = props;
138
148
  const setting = utils.getDateFormat && utils.getDateFormat();
139
- const { DbTimezone, Timezone } = setting || {};
149
+ const { DbTimezone, Timezone, TimezoneOffset } = setting || {};
140
150
  const cur = getLocalTimezone();
141
151
  const isTzNumber = (z) => typeof z === "number" && z >= -12 && z <= 12;
142
152
  if (!~type.indexOf("datetime")) {
@@ -144,6 +154,7 @@ const getTimezone = ({ props, utils }) => () => {
144
154
  }
145
155
  let serveTimezone = isTzNumber(dbTimezone) ? dbTimezone : isTzNumber(DbTimezone) ? DbTimezone : cur;
146
156
  let clientTimezone = isTzNumber(timezone) ? timezone : isTzNumber(Timezone) ? Timezone : cur;
157
+ let clientTimezoneOffset = isNumber(timezoneOffset) ? timezoneOffset : isNumber(TimezoneOffset) ? TimezoneOffset : 0;
147
158
  const value = props.modelValue;
148
159
  const str = (Array.isArray(value) ? value[0] : value) || "";
149
160
  const match = typeof str === "string" && str.match(/(-|\+)(\d{2}):?(\d{2})$/);
@@ -153,7 +164,8 @@ const getTimezone = ({ props, utils }) => () => {
153
164
  return {
154
165
  from: serveTimezone,
155
166
  to: isutc8 ? 8 : clientTimezone,
156
- isServiceTimezone: !!setting
167
+ isServiceTimezone: !!setting,
168
+ timezoneOffset: clientTimezoneOffset
157
169
  };
158
170
  };
159
171
  const nullOrString = (value) => {
@@ -182,11 +194,12 @@ const dateFormatter = ({ t }) => (value, format) => {
182
194
  }
183
195
  return formatDate(value, format, t);
184
196
  };
185
- const dateParser = ({ t }) => (text, format) => {
197
+ const dateParser = ({ t, props }) => (text, format) => {
186
198
  if (format === DATEPICKER.TimesTamp) {
187
199
  return new Date(Number(text));
188
200
  }
189
- return parseDate(text, format, t);
201
+ const value = props.autoFormat ? formatText({ text, format }) : text;
202
+ return parseDate(value, format, t);
190
203
  };
191
204
  const rangeFormatter = (api) => (value, format) => {
192
205
  if (Array.isArray(value) && value.length === 2) {
@@ -227,24 +240,43 @@ const getDefaultOfTypeValueResolveMap = () => ({
227
240
  return text === void 0 || text === "" ? null : text;
228
241
  }
229
242
  });
230
- const getWeekOfTypeValueResolveMap = ({ t, api }) => ({
231
- formatter(value, format) {
243
+ const getWeekOfTypeValueResolveMap = ({ t, props, api }) => ({
244
+ formatter(value, format, formatObj) {
232
245
  const weekDate = getWeekData(value);
233
246
  let week = getWeekNumber(weekDate);
234
247
  let month = weekDate.getMonth();
235
248
  const trueDate = new Date(weekDate);
249
+ const { rangeSeparator = "-", type = "format" } = formatObj;
236
250
  if (week === 1 && month === 11) {
237
251
  trueDate.setHours(0, 0, 0, 0);
238
252
  trueDate.setDate(trueDate.getDate() + 3 - (trueDate.getDay() + 6) % 7);
239
253
  }
240
- let date = formatDate(trueDate, format, t);
241
- date = /WW/.test(date) ? date.replace(/WW/, week < 10 ? "0" + week : week) : date.replace(/W/, week);
254
+ let date;
255
+ if (type === "format" && !/W/.test(format)) {
256
+ const { start, end } = getWeekRange(value, format, t, props.pickerOptions);
257
+ date = `${start} ${rangeSeparator} ${end}`;
258
+ } else {
259
+ date = formatDate(trueDate, format, t);
260
+ date = /WW/.test(date) ? date.replace(/WW/, week < 10 ? "0" + week : week) : date.replace(/W/, week);
261
+ }
242
262
  return date;
243
263
  },
244
264
  parser(text, format) {
245
265
  return api.typeValueResolveMap().date.parser(text, format);
246
266
  }
247
267
  });
268
+ const getWeekRange = (value, format, t, pickerOptions) => {
269
+ const firstDayOfWeek = pickerOptions && pickerOptions.firstDayOfWeek ? pickerOptions.firstDayOfWeek : 7;
270
+ const dayOffset = (value.getDay() - firstDayOfWeek + 7) % 7;
271
+ const startDate = prevDate(value, dayOffset);
272
+ const endDate = nextDate(startDate, 6);
273
+ const start = formatDate(startDate, format, t);
274
+ const end = formatDate(endDate, format, t);
275
+ return {
276
+ start,
277
+ end
278
+ };
279
+ };
248
280
  const getNumberOfTypeValueResolveMap = () => ({
249
281
  formatter(value) {
250
282
  return value ? String(value) : "";
@@ -264,9 +296,9 @@ const getDatesOfTypeValueResolveMap = (api) => ({
264
296
  );
265
297
  }
266
298
  });
267
- const typeValueResolveMap = ({ api, t }) => () => ({
299
+ const typeValueResolveMap = ({ api, props, t }) => () => ({
268
300
  default: getDefaultOfTypeValueResolveMap(),
269
- week: getWeekOfTypeValueResolveMap({ t, api }),
301
+ week: getWeekOfTypeValueResolveMap({ t, props, api }),
270
302
  date: { formatter: api.dateFormatter, parser: api.dateParser },
271
303
  datetime: { formatter: api.dateFormatter, parser: api.dateParser },
272
304
  daterange: { formatter: api.rangeFormatter, parser: api.rangeParser },
@@ -305,7 +337,7 @@ const secondInputId = ({ props, state }) => () => {
305
337
  }
306
338
  return obj;
307
339
  };
308
- const focus = ({ api, props, vm }) => () => !props.isRange ? vm.$refs.reference.focus() : api.handleFocus();
340
+ const focus = ({ api, props, vm }) => () => !props.isRange ? vm.$refs.reference.querySelector("input").focus() : api.handleFocus();
309
341
  const blur = (state) => () => state.refInput.forEach((input) => input.blur());
310
342
  const parseValue = ({ api, props, state }) => (value) => {
311
343
  const isParsed = isDateObject(value) || Array.isArray(value) && value.every(isDateObject);
@@ -314,10 +346,12 @@ const parseValue = ({ api, props, state }) => (value) => {
314
346
  }
315
347
  return value;
316
348
  };
317
- const formatToValue = ({ api, props, state }) => (date) => {
349
+ const formatToValue = ({ api, state }) => (date) => {
318
350
  const isFormattable = isDateObject(date) || Array.isArray(date) && date.every(isDateObject);
319
351
  if (state.valueFormat && isFormattable) {
320
- return api.formatAsFormatAndType(date, state.valueFormat, state.type, props.rangeSeparator);
352
+ return api.formatAsFormatAndType(date, state.valueFormat, state.type, {
353
+ type: "value-format"
354
+ });
321
355
  }
322
356
  return date;
323
357
  };
@@ -354,18 +388,20 @@ const handleChange = ({ api, state }) => () => {
354
388
  state.userInput = null;
355
389
  }
356
390
  };
357
- const handleStartInput = (state) => (event) => {
391
+ const handleStartInput = ({ state, props, api }) => (event) => {
392
+ const value = props.autoFormat ? api.formatInputValue({ event, prevValue: state.displayValue[0] }) : event.target.value;
358
393
  if (state.userInput) {
359
- state.userInput = [event.target.value, state.userInput[1]];
394
+ state.userInput = [value, state.userInput[1]];
360
395
  } else {
361
- state.userInput = [event.target.value, null];
396
+ state.userInput = [value, null];
362
397
  }
363
398
  };
364
- const handleEndInput = (state) => (event) => {
399
+ const handleEndInput = ({ state, props, api }) => (event) => {
400
+ const value = props.autoFormat ? api.formatInputValue({ event, prevValue: state.displayValue[1] }) : event.target.value;
365
401
  if (state.userInput) {
366
- state.userInput = [state.userInput[0], event.target.value];
402
+ state.userInput = [state.userInput[0], value];
367
403
  } else {
368
- state.userInput = [null, event.target.value];
404
+ state.userInput = [null, value];
369
405
  }
370
406
  };
371
407
  const handleStartChange = ({ api, state }) => () => {
@@ -463,13 +499,19 @@ const handleClose = ({ api, props, state }) => () => {
463
499
  state.pickerVisible = false;
464
500
  if (state.type === DATEPICKER.Dates) {
465
501
  const oldValue = api.parseAsFormatAndType(state.valueOnOpen, state.valueFormat, state.type, props.rangeSeparator) || state.valueOnOpen;
466
- api.emitInput(oldValue);
502
+ api.emitInput(oldValue, true);
467
503
  }
468
504
  };
469
- const handleFocus = ({ emit, vm, state }) => () => {
505
+ const handleFocus = ({ emit, vm, state, api }) => () => {
470
506
  const type = state.type;
471
- if (DATEPICKER.TriggerTypes.includes(type) && !state.pickerVisible) {
472
- state.pickerVisible = true;
507
+ if (DATEPICKER.TriggerTypes.includes(type)) {
508
+ if (state.isMobileScreen && state.isDateMobileComponent) {
509
+ api.dateMobileToggle(true);
510
+ } else if (state.isMobileScreen && state.isTimeMobileComponent) {
511
+ api.timeMobileToggle(true);
512
+ } else {
513
+ state.pickerVisible = true;
514
+ }
473
515
  }
474
516
  emit("focus", vm.$refs.reference);
475
517
  };
@@ -533,13 +575,17 @@ const showPicker = ({ api, nextTick, updatePopper, state }) => () => {
533
575
  state.pickerVisible = state.picker.state.visible = true;
534
576
  state.picker.state.value = state.parsedValue;
535
577
  state.picker.resetView && state.picker.resetView();
536
- updatePopper(state.picker.$el);
537
- state.picker.adjustSpinners && state.picker.adjustSpinners();
578
+ nextTick(() => {
579
+ updatePopper(state.picker.$el);
580
+ state.picker.adjustSpinners && state.picker.adjustSpinners();
581
+ });
538
582
  };
539
583
  const handlePick = ({ state, api }) => (date = "", visible = false) => {
584
+ if (!state.picker)
585
+ return;
540
586
  state.userInput = null;
541
587
  state.pickerVisible = state.picker.state.visible = visible;
542
- api.emitInput(date);
588
+ api.emitInput(date, visible);
543
589
  state.date = date;
544
590
  state.picker.resetView && state.picker.resetView();
545
591
  };
@@ -659,18 +705,21 @@ const emitChange = ({ api, dispatch, emit, props, state }) => (val) => {
659
705
  api.emitDbTime(props.value);
660
706
  }
661
707
  };
662
- const emitInput = ({ api, emit, props, state }) => (val) => {
708
+ const emitInput = ({ api, emit, props, state }) => (val, visible = false) => {
663
709
  let value = val;
664
- const { from, to } = state.timezone;
710
+ const { from, to, timezoneOffset } = state.timezone;
665
711
  if (props.type === "datetime") {
666
- value = getDateWithNewTimezone(value, to, from);
712
+ value = getDateWithNewTimezone(value, to, from, -timezoneOffset);
667
713
  } else if (props.type === "datetimerange" && Array.isArray(value)) {
668
- value = value.map((val2) => getDateWithNewTimezone(val2, to, from));
714
+ value = value.map((val2) => getDateWithNewTimezone(val2, to, from, -timezoneOffset));
669
715
  }
670
716
  const formatted = api.formatToValue(value) || val;
671
717
  if (!valueEquals(props.modelValue, formatted)) {
672
718
  emit("update:modelValue", formatted);
673
719
  }
720
+ if (!visible && !valueEquals(state.oldValue, formatted)) {
721
+ state.oldValue = formatted;
722
+ }
674
723
  };
675
724
  const isValidValue = ({ api, state }) => (value) => {
676
725
  if (!state.picker) {
@@ -686,10 +735,10 @@ const watchIsRange = ({ api, state, TimePanel, TimeRangePanel }) => (value) => {
686
735
  state.panel = value ? TimeRangePanel : TimePanel;
687
736
  api.mountPicker();
688
737
  };
689
- const getType = ({ props }) => () => {
690
- if (props.componentName === DATEPICKER.DatePicker) {
738
+ const getType = ({ parent, props }) => () => {
739
+ if (parent.componentName === DATEPICKER.DatePicker) {
691
740
  return props.type;
692
- } else if (props.componentName === DATEPICKER.TimePicker) {
741
+ } else if (parent.componentName === DATEPICKER.TimePicker) {
693
742
  return props.isRange ? DATEPICKER.TimeRange : DATEPICKER.Time;
694
743
  }
695
744
  return DATEPICKER.TimeSelect;
@@ -702,7 +751,9 @@ const watchModelValue = ({ api, props, state, dispatch }) => (value, oldValue) =
702
751
  api.parseString(state.historyInput && state.historyInput[1])
703
752
  ];
704
753
  }
705
- api.emitChange(props.modelValue);
754
+ if (props.changeCompat) {
755
+ api.emitChange(props.modelValue);
756
+ }
706
757
  if (!valueEquals(value, oldValue) && !state.pickerVisible && props.validateEvent) {
707
758
  dispatch("FormItem", "form.change", value);
708
759
  }
@@ -724,7 +775,7 @@ const computedTriggerClass = ({ props, state }) => () => props.suffixIcon || pro
724
775
  const computedHaveTrigger = ({ props }) => () => typeof props.showTrigger !== "undefined" ? props.showTrigger : DATEPICKER.TriggerTypes.includes(props.type);
725
776
  const initPopper = ({ props, hooks, vnode }) => {
726
777
  const { reactive, watch, toRefs, onBeforeUnmount, onDeactivated } = hooks;
727
- const { emit, refs, slots, nextTick } = vnode;
778
+ const { emit, vm, slots, nextTick } = vnode;
728
779
  const placementMap = DATEPICKER.PlacementMap;
729
780
  return userPopper({
730
781
  reactive,
@@ -739,7 +790,7 @@ const initPopper = ({ props, hooks, vnode }) => {
739
790
  placement: placementMap[props.align] || placementMap.left
740
791
  }),
741
792
  toRefs,
742
- refs,
793
+ vm,
743
794
  slots,
744
795
  nextTick,
745
796
  onBeforeUnmount,
@@ -795,6 +846,161 @@ const setInputPaddingLeft = ({ props, state, vm, nextTick }) => () => {
795
846
  });
796
847
  }
797
848
  };
849
+ const getSelectionStart = ({ value, format, regx, event }) => {
850
+ const formatMatchArr = format.match(regx);
851
+ let selectionStart = getSelectionStartIndex(event);
852
+ let I = 0;
853
+ if (value !== "") {
854
+ const match = value.match(/[0-9]/g);
855
+ I = match === null ? 0 : match.length;
856
+ for (let i = 0; i < formatMatchArr.length; i++) {
857
+ I -= Math.max(formatMatchArr[i].length, 2);
858
+ }
859
+ I = I >= 0 ? 1 : 0;
860
+ I === 1 && selectionStart >= value.length && (selectionStart = value.length - 1);
861
+ }
862
+ return { selectionStart, I };
863
+ };
864
+ const getNum = (value, format, regx) => {
865
+ let len = value.length;
866
+ if (format && regx) {
867
+ const formatMatchArr = format.match(regx);
868
+ len = Math.max(len, formatMatchArr.join("").length);
869
+ }
870
+ let num = { str: "", arr: [] };
871
+ for (let i = 0; i < len; i++) {
872
+ let char = value.charAt(i) ? value.charAt(i) : "00";
873
+ if (/[0-9]/.test(char)) {
874
+ num.str += char;
875
+ } else {
876
+ num.arr[i] = 1;
877
+ }
878
+ }
879
+ return num;
880
+ };
881
+ const getSelectionStartIndex = (event) => {
882
+ const inputElem = event.target;
883
+ return inputElem.selectionStart - (event.data ? event.data.length : 0);
884
+ };
885
+ const getNumAndSelectionStart = ({ value, format, regx, event, needSelectionStart }) => {
886
+ if (needSelectionStart) {
887
+ let { selectionStart, I } = getSelectionStart({ value, format, regx, event });
888
+ let valueStr;
889
+ if (event.data) {
890
+ valueStr = value.substring(0, selectionStart) + event.data + value.substring(selectionStart + I);
891
+ selectionStart++;
892
+ } else {
893
+ valueStr = value;
894
+ }
895
+ const numStr = getNum(valueStr);
896
+ return { numStr, selectionStart };
897
+ } else {
898
+ const numStr = getNum(value, format, regx);
899
+ return { numStr };
900
+ }
901
+ };
902
+ const checkFormat = ({ value, format, startIndex, selectionStart, regx, needSelectionStart }) => {
903
+ if (!needSelectionStart && regx.lastIndex === 0 || needSelectionStart && regx.lastIndex === 0 && selectionStart >= startIndex) {
904
+ const subFormat = `(?<=${format.substring(0, startIndex)})(\\s*\\S*\\s*)+`;
905
+ const pattern = new RegExp(subFormat, "g");
906
+ const res = format.match(pattern);
907
+ if (res) {
908
+ value += res[0];
909
+ selectionStart = value.length;
910
+ }
911
+ }
912
+ return { value, selectionStart };
913
+ };
914
+ const moveStart = (inputElem, moveStartIndex) => {
915
+ if (inputElem.setSelectionRange) {
916
+ inputElem.focus();
917
+ setTimeout(() => {
918
+ inputElem.setSelectionRange(moveStartIndex, moveStartIndex);
919
+ }, 0);
920
+ }
921
+ };
922
+ const handleInput = ({ state, props, api }) => (val, event) => {
923
+ event = val.target ? val : event;
924
+ if (props.autoFormat) {
925
+ const value = api.formatInputValue({ event, prevValue: state.displayValue });
926
+ state.userInput = value;
927
+ } else {
928
+ const val2 = event.target.value;
929
+ state.userInput = val2;
930
+ }
931
+ };
932
+ const formatInputValue = ({ props, state }) => ({ event, prevValue = "" }) => {
933
+ const val = event.target.value;
934
+ const inputData = event.data;
935
+ const format = state.type === "time-select" ? "HH:mm" : props.format || DATEPICKER.DateFormats[state.type];
936
+ if (inputData && inputData.charCodeAt() >= 48 && inputData.charCodeAt() <= 57) {
937
+ return formatText({ event, format, text: prevValue, needSelectionStart: true });
938
+ } else {
939
+ return val;
940
+ }
941
+ };
942
+ const formatText = ({ event, text, format, needSelectionStart = false }) => {
943
+ if (!format)
944
+ return text;
945
+ let cursorOffset = 0;
946
+ let value = "";
947
+ let regx = /yyyy|yyy|yy|y|MM|M|dd|d|HH|hh|H|h|mm|m|ss|s|WW|W|w/g;
948
+ let startIndex = 0;
949
+ let { numStr, selectionStart } = getNumAndSelectionStart({
950
+ value: text,
951
+ format,
952
+ regx,
953
+ event,
954
+ needSelectionStart
955
+ });
956
+ let matchResult = regx.exec(format);
957
+ while (numStr.str !== "" && matchResult !== null) {
958
+ let subStr;
959
+ let newNum;
960
+ let subLen;
961
+ const endIndex = matchResult.index;
962
+ if (startIndex >= 0) {
963
+ value += format.substring(startIndex, endIndex);
964
+ }
965
+ selectionStart >= startIndex + cursorOffset && selectionStart <= endIndex + cursorOffset && (selectionStart = selectionStart + endIndex - startIndex);
966
+ startIndex = regx.lastIndex;
967
+ subLen = startIndex - endIndex;
968
+ subStr = numStr.str.substring(0, subLen);
969
+ const firstMatchChar = matchResult[0].charAt(0);
970
+ const firstChar = parseInt(subStr.charAt(0), 10);
971
+ if (numStr.str.length > 1) {
972
+ const secondChar = numStr.str.charAt(1);
973
+ newNum = 10 * firstChar + parseInt(secondChar, 10);
974
+ } else {
975
+ newNum = firstChar;
976
+ }
977
+ if (numStr.arr[endIndex + 1] || firstMatchChar === "M" && newNum > 12 || firstMatchChar === "d" && newNum > 31 || ["H", "h"].includes(firstMatchChar) && newNum > 23 || "ms".includes(firstMatchChar) && newNum > 59) {
978
+ subStr = matchResult[0].length === 2 ? "0" + firstChar : firstChar;
979
+ selectionStart++;
980
+ } else {
981
+ if (subLen === 1) {
982
+ subStr = String(newNum);
983
+ subLen++;
984
+ cursorOffset++;
985
+ }
986
+ }
987
+ value += subStr;
988
+ numStr.str = numStr.str.substring(subLen);
989
+ matchResult = regx.exec(format);
990
+ }
991
+ const { value: val, selectionStart: cursorPos } = checkFormat({
992
+ value,
993
+ format,
994
+ startIndex,
995
+ selectionStart,
996
+ regx,
997
+ needSelectionStart
998
+ });
999
+ value = val;
1000
+ selectionStart = cursorPos;
1001
+ needSelectionStart && moveStart(event.target, selectionStart);
1002
+ return value;
1003
+ };
798
1004
  export {
799
1005
  blur,
800
1006
  computedFormat,
@@ -809,6 +1015,8 @@ export {
809
1015
  firstInputId,
810
1016
  focus,
811
1017
  formatAsFormatAndType,
1018
+ formatInputValue,
1019
+ formatText,
812
1020
  formatToString,
813
1021
  formatToValue,
814
1022
  getMode,
@@ -826,6 +1034,7 @@ export {
826
1034
  handleEnterDisplayOnlyContent,
827
1035
  handleEnterPickerlabel,
828
1036
  handleFocus,
1037
+ handleInput,
829
1038
  handleKeydown,
830
1039
  handleMouseEnter,
831
1040
  handlePick,