@opentiny/vue-renderless 3.9.2 → 3.10.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 (198) hide show
  1. package/action-sheet/vue.js +25 -2
  2. package/anchor/index.js +3 -3
  3. package/anchor/vue.js +7 -1
  4. package/area/index.js +4 -4
  5. package/button/vue.js +4 -2
  6. package/button-group/index.js +8 -1
  7. package/button-group/vue.js +5 -10
  8. package/calendar/index.js +14 -14
  9. package/calendar-bar/index.js +3 -3
  10. package/carousel-item/index.js +1 -1
  11. package/cascader/vue.js +1 -1
  12. package/cascader-mobile/index.js +299 -0
  13. package/cascader-mobile/vue.js +102 -0
  14. package/cascader-panel/store.js +3 -1
  15. package/chart-boxplot/index.js +0 -1
  16. package/chart-core/deps/constants.js +20 -2
  17. package/chart-core/index.js +9 -1
  18. package/chart-core/modules/extend.js +14 -1
  19. package/chart-gauge/index.js +3 -1
  20. package/chart-graph/index.js +3 -1
  21. package/chart-map/index.js +11 -1
  22. package/chart-scatter/index.js +10 -2
  23. package/chart-waterfall/index.js +4 -1
  24. package/checkbox/index.js +16 -14
  25. package/checkbox/vue.js +14 -10
  26. package/checkbox-button/vue.js +7 -3
  27. package/column-list-item/vue.js +10 -1
  28. package/common/bigInt.js +4 -11
  29. package/common/date.js +2 -2
  30. package/common/deps/ResizeObserver.js +3 -1
  31. package/common/deps/date-util.js +9 -1
  32. package/common/deps/date.js +18 -5
  33. package/common/deps/fastdom/async.js +41 -0
  34. package/common/deps/fastdom/index.js +9 -0
  35. package/common/deps/fastdom/sandbox.js +53 -0
  36. package/common/deps/fastdom/singleton.js +80 -0
  37. package/common/deps/fullscreen/screenfull.js +16 -2
  38. package/common/deps/memorize.js +3 -3
  39. package/common/deps/popup-manager.js +0 -1
  40. package/common/deps/requestAnimationFrame.js +1 -1
  41. package/common/deps/throttle.js +2 -2
  42. package/common/deps/tree-model/node.js +23 -11
  43. package/common/deps/tree-model/tree-store.js +28 -7
  44. package/common/deps/vue-popper.js +14 -2
  45. package/common/deps/vue-popup.js +16 -23
  46. package/common/index.js +7 -35
  47. package/common/runtime.js +1 -1
  48. package/common/validate/rules/type.js +3 -1
  49. package/credit-card-form/vue.js +2 -2
  50. package/date-panel/index.js +35 -31
  51. package/date-panel/vue.js +12 -12
  52. package/date-picker/index.js +9 -5
  53. package/date-picker/vue.js +20 -8
  54. package/date-picker-mobile/index.js +3 -3
  55. package/date-range/index.js +91 -19
  56. package/date-range/vue.js +19 -11
  57. package/date-table/index.js +39 -6
  58. package/date-table/vue.js +2 -2
  59. package/dept/index.js +1 -1
  60. package/detail-page/vue.js +9 -1
  61. package/dialog-box/index.js +11 -2
  62. package/dialog-box/vue.js +30 -6
  63. package/dialog-select/index.js +27 -5
  64. package/dialog-select/vue.js +11 -4
  65. package/drop-roles/index.js +3 -1
  66. package/dropdown/index.js +28 -7
  67. package/dropdown/vue.js +12 -7
  68. package/dropdown-item/index.js +9 -1
  69. package/dropdown-item/mf.js +3 -3
  70. package/dropdown-item/vue.js +12 -10
  71. package/dropdown-menu/index.js +13 -14
  72. package/dropdown-menu/vue.js +8 -7
  73. package/espace/vue.js +9 -1
  74. package/fall-menu/vue.js +12 -1
  75. package/file-upload/index.js +137 -89
  76. package/file-upload/vue.js +24 -14
  77. package/filter/index.js +1 -1
  78. package/filter/vue.js +1 -3
  79. package/floating-button/index.js +73 -0
  80. package/floating-button/vue.js +35 -0
  81. package/form/index.js +13 -4
  82. package/form/vue.js +7 -2
  83. package/form-item/index.js +4 -1
  84. package/form-item/vue.js +6 -3
  85. package/fullscreen/vue.js +24 -3
  86. package/grid/plugins/exportExcel.js +54 -8
  87. package/grid/static/base/helperGetHGSKeys.js +1 -4
  88. package/grid/utils/common.js +15 -11
  89. package/grid/utils/dom.js +5 -1
  90. package/guide/index.js +2 -3
  91. package/hrapprover/index.js +3 -1
  92. package/index-bar/vue.js +8 -1
  93. package/input/index.js +1 -11
  94. package/input/vue.js +6 -12
  95. package/ip-address/index.js +66 -33
  96. package/ip-address/vue.js +8 -1
  97. package/link-menu/vue.js +22 -2
  98. package/locales/index.js +4 -2
  99. package/logon-user/index.js +3 -1
  100. package/logout/index.js +6 -2
  101. package/milestone/vue.js +1 -1
  102. package/mini-picker/index.js +12 -10
  103. package/mini-picker/vue.js +10 -10
  104. package/modal/index.js +5 -3
  105. package/modal/vue.js +4 -2
  106. package/month-range/index.js +18 -18
  107. package/month-range/vue.js +16 -4
  108. package/month-table/index.js +7 -3
  109. package/multi-select/vue.js +1 -9
  110. package/nav-menu/index.js +33 -4
  111. package/nav-menu/vue.js +9 -1
  112. package/notify/vue.js +12 -1
  113. package/numeric/vue.js +6 -2
  114. package/option/index.js +10 -2
  115. package/option/vue.js +20 -9
  116. package/option-group/index.js +3 -1
  117. package/package.json +2 -1
  118. package/picker/index.js +88 -17
  119. package/picker/vue.js +42 -17
  120. package/picker-column/index.js +6 -6
  121. package/picker-column/vue.js +5 -5
  122. package/popconfirm/vue.js +3 -1
  123. package/popeditor/index.js +55 -13
  124. package/popeditor/vue.js +23 -7
  125. package/popover/vue.js +1 -2
  126. package/popup/vue.js +15 -2
  127. package/progress/index.js +9 -7
  128. package/progress/vue.js +12 -4
  129. package/pull-refresh/vue.js +10 -1
  130. package/query-builder/index.js +9 -0
  131. package/query-builder/vue.js +18 -0
  132. package/radio/vue.js +3 -1
  133. package/radio-button/vue.js +1 -1
  134. package/rate/index.js +8 -2
  135. package/rate/vue.js +27 -4
  136. package/recycle-scroller/index.js +0 -1
  137. package/scrollbar/vue-bar.js +18 -2
  138. package/search/index.js +12 -5
  139. package/search/vue.js +7 -5
  140. package/select/index.js +596 -304
  141. package/select/vue.js +167 -101
  142. package/select-dropdown/vue.js +8 -6
  143. package/select-mobile/index.js +26 -13
  144. package/select-mobile/vue.js +14 -5
  145. package/select-view/index.js +5 -21
  146. package/select-view/vue.js +0 -3
  147. package/selected-box/index.js +3 -1
  148. package/slider/index.js +5 -5
  149. package/slider/vue.js +16 -0
  150. package/slider-button/index.js +41 -0
  151. package/slider-button/vue.js +36 -0
  152. package/slider-button-group/slide-button.js +142 -0
  153. package/slider-button-group/vue.js +52 -0
  154. package/steps/slide-bar.js +0 -1
  155. package/switch/index.js +1 -1
  156. package/switch/vue.js +1 -1
  157. package/tab-bar/index.js +8 -6
  158. package/tab-nav/index.js +19 -13
  159. package/tab-nav/vue.js +10 -9
  160. package/tabs/index.js +21 -17
  161. package/tabs/vue.js +1 -4
  162. package/tag/vue.js +2 -1
  163. package/tag-group/index.js +23 -10
  164. package/tag-group/vue.js +5 -4
  165. package/time/index.js +8 -8
  166. package/time/vue.js +9 -9
  167. package/time-line/index.js +24 -2
  168. package/time-line/vue.js +30 -4
  169. package/time-panel/index.js +2 -2
  170. package/time-panel/vue.js +2 -2
  171. package/time-range/index.js +24 -21
  172. package/time-range/vue.js +26 -16
  173. package/time-spinner/index.js +32 -21
  174. package/time-spinner/vue.js +37 -12
  175. package/timeline-item/index.js +77 -0
  176. package/timeline-item/vue.js +44 -0
  177. package/toggle-menu/vue.js +0 -1
  178. package/tooltip/index.js +11 -12
  179. package/tooltip/vue.js +11 -1
  180. package/top-box/vue.js +13 -1
  181. package/tree/index.js +228 -15
  182. package/tree/vue.js +119 -15
  183. package/tree-menu/index.js +35 -0
  184. package/tree-menu/vue.js +27 -5
  185. package/tree-node/index.js +75 -10
  186. package/tree-node/vue.js +45 -23
  187. package/upload/index.js +90 -49
  188. package/upload/vue.js +22 -10
  189. package/upload-dragger/index.js +4 -3
  190. package/upload-list/index.js +67 -16
  191. package/upload-list/vue.js +26 -9
  192. package/user/index.js +7 -4
  193. package/user-link/index.js +2 -1
  194. package/wizard/index.js +4 -1
  195. package/wizard/vue.js +19 -2
  196. package/year-range/index.js +1 -1
  197. package/year-range/vue.js +3 -3
  198. package/year-table/index.js +2 -2
package/radio/vue.js CHANGED
@@ -17,12 +17,14 @@ const renderless = (props, { onMounted, onBeforeUnmount, computed, reactive, inj
17
17
  parent.tinyForm = parent.tinyForm || inject("form", null);
18
18
  const api2 = {};
19
19
  const state = reactive({
20
+ vertical: inject("radioVertical", false),
21
+ size: props.size || inject("size", null),
20
22
  focus: false,
21
23
  radioGroup: "",
22
24
  isGroup: computed(() => api2.isGroup()),
23
25
  radioSize: computed(() => api2.radioSize()),
24
26
  isDisabled: computed(() => api2.isDisabled()),
25
- isDisplayOnly: computed(() => api2.isDisplayOnly() || (parent.auiForm || {}).displayOnly),
27
+ isDisplayOnly: computed(() => api2.isDisplayOnly() || (parent.tinyForm || {}).displayOnly),
26
28
  tabIndex: computed(() => api2.tabIndex()),
27
29
  formDisabled: computed(() => (parent.tinyForm || {}).disabled),
28
30
  model: computed({
@@ -10,7 +10,7 @@ import {
10
10
  handleFocus,
11
11
  handleBlur
12
12
  } from "./index";
13
- const api = ["state", "handleChange"];
13
+ const api = ["state", "handleChange", "keydownHandle", "handleFocus", "handleBlur"];
14
14
  const renderless = (props, { computed, reactive, onMounted, onBeforeUnmount, inject }, { emit, parent, dispatch, constants, nextTick, refs }) => {
15
15
  const api2 = {
16
16
  getGroup: getGroup({ constants, parent }),
package/rate/index.js CHANGED
@@ -74,8 +74,14 @@ const setCurrentValue = ({ constants: { RATENODECLS, DECIMALCLS, ICON_PREFIXCLS
74
74
  target = target[key];
75
75
  }
76
76
  if (target.nodeName === "path") {
77
- className = target[key][key].className;
78
- target = target[key][key];
77
+ for (let i = 0; i < 10; i++) {
78
+ target = target[key];
79
+ if (target.nodeName === "svg") {
80
+ className = target[key].className;
81
+ target = target[key];
82
+ break;
83
+ }
84
+ }
79
85
  }
80
86
  if (className.includes(RATENODECLS)) {
81
87
  target = target.querySelector(ICON_PREFIXCLS);
package/rate/vue.js CHANGED
@@ -19,8 +19,30 @@ import {
19
19
  computedActiveClass
20
20
  } from "./index";
21
21
  import { on, off } from "../common/deps/dom";
22
- const api = ["state", "showDecimalIcon", "getIconStyle", "getTextStyle", "selectValue", "handelKey", "setCurrentValue", "resetCurrentValue"];
23
- const useChangeValue = ({ constants, emit, props, reactive, toRefs, watch, onMounted, onUnmounted, parent }) => {
22
+ const api = [
23
+ "state",
24
+ "showDecimalIcon",
25
+ "getIconStyle",
26
+ "getTextStyle",
27
+ "selectValue",
28
+ "handelKey",
29
+ "setCurrentValue",
30
+ "resetCurrentValue"
31
+ ];
32
+ const useChangeValue = ({
33
+ computed,
34
+ constants,
35
+ emit,
36
+ props,
37
+ reactive,
38
+ toRefs,
39
+ watch,
40
+ onMounted,
41
+ onUnmounted,
42
+ parent,
43
+ inject
44
+ }) => {
45
+ parent.tinyForm = parent.tinyForm || inject("form", null);
24
46
  const state = reactive({
25
47
  hoverIndex: -1,
26
48
  currentValue: props.modelValue
@@ -60,7 +82,7 @@ const useChangeValue = ({ constants, emit, props, reactive, toRefs, watch, onMou
60
82
  state: toRefs(state)
61
83
  };
62
84
  };
63
- const renderless = (props, { computed, reactive, toRefs, watch, onMounted, onUnmounted }, { constants, emit, parent }) => {
85
+ const renderless = (props, { computed, reactive, toRefs, watch, onMounted, onUnmounted, inject }, { constants, emit, parent }) => {
64
86
  const api2 = {};
65
87
  const changeValue = useChangeValue({
66
88
  computed,
@@ -72,7 +94,8 @@ const renderless = (props, { computed, reactive, toRefs, watch, onMounted, onUnm
72
94
  watch,
73
95
  onMounted,
74
96
  onUnmounted,
75
- parent
97
+ parent,
98
+ inject
76
99
  });
77
100
  const state = reactive(__spreadValues({
78
101
  pointerAtLeftHalf: true,
@@ -6,7 +6,6 @@ if (typeof window !== "undefined") {
6
6
  supportsPassive = false;
7
7
  try {
8
8
  const opts = Object.defineProperty({}, "passive", {
9
- // eslint-disable-next-line getter-return
10
9
  get() {
11
10
  supportsPassive = true;
12
11
  }
@@ -1,7 +1,23 @@
1
1
  import "../chunk-PKUHTIDK.js";
2
- import { BAR_MAP, renderThumbStyle, clickThumbHandler, clickTrackHandler, startDrag, mouseMoveDocumentHandler, mouseUpDocumentHandler } from "./index";
2
+ import {
3
+ BAR_MAP,
4
+ renderThumbStyle,
5
+ clickThumbHandler,
6
+ clickTrackHandler,
7
+ startDrag,
8
+ mouseMoveDocumentHandler,
9
+ mouseUpDocumentHandler
10
+ } from "./index";
3
11
  import { on, off } from "../common/deps/dom";
4
- const api = ["state", "startDrag", "renderThumbStyle", "clickTrackHandler", "clickThumbHandler", "mouseUpDocumentHandler", "mouseMoveDocumentHandler"];
12
+ const api = [
13
+ "state",
14
+ "startDrag",
15
+ "renderThumbStyle",
16
+ "clickTrackHandler",
17
+ "clickThumbHandler",
18
+ "mouseUpDocumentHandler",
19
+ "mouseMoveDocumentHandler"
20
+ ];
5
21
  const renderless = (props, { computed, onUnmounted, reactive }, { refs, parent }) => {
6
22
  const state = reactive({
7
23
  bar: computed(() => BAR_MAP[props.vertical ? "vertical" : "horizontal"]),
package/search/index.js CHANGED
@@ -2,13 +2,17 @@ import "../chunk-PKUHTIDK.js";
2
2
  import { on, off } from "../common/deps/dom";
3
3
  import PopupManager from "../common/deps/popup-manager";
4
4
  import { isObject, typeOf } from "../common/type";
5
+ const emitInput = (emit) => (...args) => {
6
+ emit("update:modelValue", ...args);
7
+ emit("input", ...args);
8
+ };
5
9
  const handleChange = ({ emit, state }) => (event) => {
6
10
  const value = event.target.value;
7
11
  emit("change", state.searchValue, value);
8
12
  };
9
- const handleInput = ({ emit, state }) => (event) => {
13
+ const handleInput = ({ api, state }) => (event) => {
10
14
  const value = event.target.value;
11
- emit("update:modelValue", value, state.searchValue);
15
+ api.emitInput(value, state.searchValue);
12
16
  };
13
17
  const showSelector = ({ refs, state }) => () => {
14
18
  refs.selector.style.zIndex = PopupManager.nextZIndex();
@@ -19,7 +23,8 @@ const changeKey = ({ emit, state }) => (key) => {
19
23
  state.show = false;
20
24
  emit("select", key);
21
25
  };
22
- const searchClick = ({ emit, props, state }) => () => {
26
+ const searchClick = ({ emit, props, state }) => (e) => {
27
+ e.preventDefault();
23
28
  if (props.mini && state.collapse) {
24
29
  state.collapse = false;
25
30
  } else {
@@ -63,12 +68,13 @@ const mounted = (api) => () => {
63
68
  const beforeDestroy = (api) => () => {
64
69
  off(document.body, "click", api.clickOutside);
65
70
  };
66
- const clear = ({ emit, refs, state }) => () => {
71
+ const clear = ({ api, emit, refs, state }) => (e) => {
72
+ e.preventDefault();
67
73
  state.currentValue = "";
68
74
  refs.input.focus();
69
75
  state.focus = true;
70
76
  emit("change", [], "");
71
- emit("update:modelValue", "", state.searchValue);
77
+ api.emitInput("", state.searchValue);
72
78
  emit("clear");
73
79
  };
74
80
  export {
@@ -76,6 +82,7 @@ export {
76
82
  changeKey,
77
83
  clear,
78
84
  clickOutside,
85
+ emitInput,
79
86
  formatSearchTypes,
80
87
  handleChange,
81
88
  handleInput,
package/search/vue.js CHANGED
@@ -14,7 +14,8 @@ import {
14
14
  mounted,
15
15
  formatSearchTypes,
16
16
  setDefaultType,
17
- searchEnterKey
17
+ searchEnterKey,
18
+ emitInput
18
19
  } from "./index";
19
20
  const api = [
20
21
  "state",
@@ -69,15 +70,16 @@ const renderless = (props, { computed, onBeforeUnmount, onMounted, reactive, toR
69
70
  }));
70
71
  const api2 = __spreadValues({
71
72
  state,
72
- clear: clear({ emit, refs, state }),
73
73
  changeKey: changeKey({ state, emit }),
74
- handleChange: handleChange({ emit, state, props }),
75
- handleInput: handleInput({ emit, state, props }),
74
+ handleChange: handleChange({ emit, state }),
76
75
  showSelector: showSelector({ refs, state }),
77
76
  searchClick: searchClick({ emit, props, state }),
78
- clickOutside: clickOutside({ parent, props, state })
77
+ clickOutside: clickOutside({ parent, props, state }),
78
+ emitInput: emitInput(emit)
79
79
  }, formatSearchTypes2.api);
80
80
  Object.assign(api2, {
81
+ clear: clear({ api: api2, emit, refs, state }),
82
+ handleInput: handleInput({ api: api2, state }),
81
83
  searchEnterKey: searchEnterKey({ api: api2, props, refs, nextTick })
82
84
  });
83
85
  onMounted(mounted(api2));