@opentiny/vue-renderless 3.9.3 → 3.10.1

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 (197) 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 +8 -16
  25. package/checkbox/vue.js +7 -9
  26. package/column-list-item/vue.js +10 -1
  27. package/common/bigInt.js +4 -11
  28. package/common/date.js +2 -2
  29. package/common/deps/ResizeObserver.js +3 -1
  30. package/common/deps/date-util.js +9 -1
  31. package/common/deps/date.js +18 -5
  32. package/common/deps/fastdom/async.js +41 -0
  33. package/common/deps/fastdom/index.js +9 -0
  34. package/common/deps/fastdom/sandbox.js +53 -0
  35. package/common/deps/fastdom/singleton.js +80 -0
  36. package/common/deps/fullscreen/screenfull.js +16 -2
  37. package/common/deps/memorize.js +3 -3
  38. package/common/deps/popup-manager.js +0 -1
  39. package/common/deps/requestAnimationFrame.js +1 -1
  40. package/common/deps/throttle.js +2 -2
  41. package/common/deps/tree-model/node.js +23 -11
  42. package/common/deps/tree-model/tree-store.js +28 -7
  43. package/common/deps/vue-popper.js +14 -2
  44. package/common/deps/vue-popup.js +16 -23
  45. package/common/index.js +7 -35
  46. package/common/runtime.js +1 -1
  47. package/common/validate/rules/type.js +3 -1
  48. package/credit-card-form/vue.js +2 -2
  49. package/date-panel/index.js +35 -31
  50. package/date-panel/vue.js +12 -12
  51. package/date-picker/index.js +9 -5
  52. package/date-picker/vue.js +20 -8
  53. package/date-picker-mobile/index.js +3 -3
  54. package/date-range/index.js +91 -19
  55. package/date-range/vue.js +19 -11
  56. package/date-table/index.js +39 -6
  57. package/date-table/vue.js +2 -2
  58. package/dept/index.js +1 -1
  59. package/detail-page/vue.js +9 -1
  60. package/dialog-box/index.js +11 -2
  61. package/dialog-box/vue.js +30 -6
  62. package/dialog-select/index.js +27 -5
  63. package/dialog-select/vue.js +11 -4
  64. package/drop-roles/index.js +3 -1
  65. package/dropdown/index.js +28 -7
  66. package/dropdown/vue.js +12 -7
  67. package/dropdown-item/index.js +9 -1
  68. package/dropdown-item/mf.js +3 -3
  69. package/dropdown-item/vue.js +12 -10
  70. package/dropdown-menu/index.js +13 -14
  71. package/dropdown-menu/vue.js +8 -7
  72. package/espace/vue.js +9 -1
  73. package/fall-menu/vue.js +12 -1
  74. package/file-upload/index.js +137 -89
  75. package/file-upload/vue.js +24 -14
  76. package/filter/index.js +1 -1
  77. package/filter/vue.js +1 -3
  78. package/floating-button/index.js +73 -0
  79. package/floating-button/vue.js +35 -0
  80. package/form/index.js +13 -4
  81. package/form/vue.js +7 -2
  82. package/form-item/index.js +4 -1
  83. package/form-item/vue.js +6 -3
  84. package/fullscreen/vue.js +24 -3
  85. package/grid/plugins/exportExcel.js +54 -8
  86. package/grid/static/base/helperGetHGSKeys.js +1 -4
  87. package/grid/utils/common.js +15 -11
  88. package/grid/utils/dom.js +5 -1
  89. package/guide/index.js +2 -3
  90. package/hrapprover/index.js +3 -1
  91. package/index-bar/vue.js +8 -1
  92. package/input/index.js +1 -11
  93. package/input/vue.js +6 -12
  94. package/ip-address/index.js +4 -11
  95. package/ip-address/vue.js +8 -1
  96. package/link-menu/vue.js +22 -2
  97. package/locales/index.js +4 -2
  98. package/logon-user/index.js +3 -1
  99. package/logout/index.js +6 -2
  100. package/milestone/vue.js +1 -1
  101. package/mini-picker/index.js +12 -10
  102. package/mini-picker/vue.js +10 -10
  103. package/modal/index.js +5 -3
  104. package/modal/vue.js +4 -2
  105. package/month-range/index.js +18 -18
  106. package/month-range/vue.js +16 -4
  107. package/month-table/index.js +7 -3
  108. package/multi-select/vue.js +1 -9
  109. package/nav-menu/index.js +33 -4
  110. package/nav-menu/vue.js +9 -1
  111. package/notify/vue.js +12 -1
  112. package/numeric/vue.js +6 -2
  113. package/option/index.js +10 -2
  114. package/option/vue.js +20 -9
  115. package/option-group/index.js +3 -1
  116. package/package.json +1 -1
  117. package/picker/index.js +88 -17
  118. package/picker/vue.js +42 -17
  119. package/picker-column/index.js +6 -6
  120. package/picker-column/vue.js +5 -5
  121. package/popconfirm/vue.js +3 -1
  122. package/popeditor/index.js +55 -13
  123. package/popeditor/vue.js +23 -7
  124. package/popover/vue.js +1 -2
  125. package/popup/vue.js +15 -2
  126. package/progress/index.js +9 -7
  127. package/progress/vue.js +12 -4
  128. package/pull-refresh/vue.js +10 -1
  129. package/query-builder/index.js +9 -0
  130. package/query-builder/vue.js +18 -0
  131. package/radio/vue.js +3 -1
  132. package/radio-button/vue.js +1 -1
  133. package/rate/index.js +8 -2
  134. package/rate/vue.js +27 -4
  135. package/recycle-scroller/index.js +0 -1
  136. package/scrollbar/vue-bar.js +18 -2
  137. package/search/index.js +12 -5
  138. package/search/vue.js +7 -5
  139. package/select/index.js +567 -283
  140. package/select/vue.js +141 -85
  141. package/select-dropdown/vue.js +8 -6
  142. package/select-mobile/index.js +26 -13
  143. package/select-mobile/vue.js +14 -5
  144. package/select-view/index.js +5 -21
  145. package/select-view/vue.js +0 -3
  146. package/selected-box/index.js +3 -1
  147. package/slider/index.js +5 -5
  148. package/slider/vue.js +16 -0
  149. package/slider-button/index.js +41 -0
  150. package/slider-button/vue.js +36 -0
  151. package/slider-button-group/slide-button.js +142 -0
  152. package/slider-button-group/vue.js +52 -0
  153. package/steps/slide-bar.js +0 -1
  154. package/switch/index.js +1 -1
  155. package/switch/vue.js +1 -1
  156. package/tab-bar/index.js +8 -6
  157. package/tab-nav/index.js +19 -13
  158. package/tab-nav/vue.js +10 -9
  159. package/tabs/index.js +21 -17
  160. package/tabs/vue.js +1 -4
  161. package/tag/vue.js +2 -1
  162. package/tag-group/index.js +23 -10
  163. package/tag-group/vue.js +5 -4
  164. package/time/index.js +8 -8
  165. package/time/vue.js +9 -9
  166. package/time-line/index.js +24 -2
  167. package/time-line/vue.js +30 -4
  168. package/time-panel/index.js +2 -2
  169. package/time-panel/vue.js +2 -2
  170. package/time-range/index.js +24 -21
  171. package/time-range/vue.js +26 -16
  172. package/time-spinner/index.js +32 -21
  173. package/time-spinner/vue.js +37 -12
  174. package/timeline-item/index.js +77 -0
  175. package/timeline-item/vue.js +44 -0
  176. package/toggle-menu/vue.js +0 -1
  177. package/tooltip/index.js +11 -12
  178. package/tooltip/vue.js +11 -1
  179. package/top-box/vue.js +13 -1
  180. package/tree/index.js +228 -15
  181. package/tree/vue.js +119 -15
  182. package/tree-menu/index.js +35 -0
  183. package/tree-menu/vue.js +27 -5
  184. package/tree-node/index.js +75 -10
  185. package/tree-node/vue.js +45 -23
  186. package/upload/index.js +90 -49
  187. package/upload/vue.js +22 -10
  188. package/upload-dragger/index.js +4 -3
  189. package/upload-list/index.js +67 -16
  190. package/upload-list/vue.js +26 -9
  191. package/user/index.js +7 -4
  192. package/user-link/index.js +2 -1
  193. package/wizard/index.js +4 -1
  194. package/wizard/vue.js +19 -2
  195. package/year-range/index.js +1 -1
  196. package/year-range/vue.js +3 -3
  197. package/year-table/index.js +2 -2
@@ -30,7 +30,10 @@ const createSearchForm = (props) => (isRest) => props.conditions.reduce((acc, it
30
30
  }, {});
31
31
  const getColumns = ({ constants, props }) => {
32
32
  const { columns } = props.gridOp;
33
- const selectionCol = find(columns, (col) => col.type === constants.COLUMNS_TYPE.selection || col.type === constants.COLUMNS_TYPE.radio);
33
+ const selectionCol = find(
34
+ columns,
35
+ (col) => col.type === constants.COLUMNS_TYPE.selection || col.type === constants.COLUMNS_TYPE.radio
36
+ );
34
37
  if (selectionCol) {
35
38
  selectionCol.type = props.multi ? constants.COLUMNS_TYPE.selection : constants.COLUMNS_TYPE.radio;
36
39
  } else {
@@ -92,7 +95,11 @@ const handleClear = ({ constants, emit, props, state }) => () => {
92
95
  state.selectedValues = [];
93
96
  if (!isEqual(state.commitValue, props.modelValue)) {
94
97
  emit("update:modelValue", state.commitValue);
95
- emit("change", state.commitValue, props.popseletor === constants.TYPE_GRID ? state.treeSelectList : state.selectedDatas);
98
+ emit(
99
+ "change",
100
+ state.commitValue,
101
+ props.popseletor === constants.TYPE_GRID ? state.treeSelectList : state.selectedDatas
102
+ );
96
103
  }
97
104
  };
98
105
  const handleConfirm = ({ api, constants, emit, props, state }) => (skipBeforeClose) => {
@@ -248,13 +255,16 @@ const openDialog = ({ api, props, state, emit }) => () => {
248
255
  state.closeSuggestPanelInvoker = "openDialog";
249
256
  api.closeSuggestPanel(true);
250
257
  state.open = true;
258
+ state.showContent = true;
251
259
  emit("popup");
252
260
  props.autoLookup && props.alwaysLoad && api.query();
253
261
  };
254
262
  const localFilter = ({ props, state }) => {
255
263
  const keys = Object.keys(state.search);
256
264
  const dataset = props.gridOp && props.gridOp.data || [];
257
- return dataset.filter((item) => keys.every((key) => item[key] && item[key].toString().toLowerCase().includes(state.search[key].toLowerCase())));
265
+ return dataset.filter(
266
+ (item) => keys.every((key) => item[key] && item[key].toString().toLowerCase().includes(state.search[key].toLowerCase()))
267
+ );
258
268
  };
259
269
  const query = ({ props, state, parent, constants }) => (page) => {
260
270
  const { remoteSearch, dataset } = props;
@@ -263,6 +273,13 @@ const query = ({ props, state, parent, constants }) => (page) => {
263
273
  state.loading = true;
264
274
  if (remoteSearch || dataset) {
265
275
  const { currentPage, pageSize } = state.pagerConfig;
276
+ let final = true;
277
+ const onFinally = () => {
278
+ if (final) {
279
+ final = false;
280
+ state.loading = false;
281
+ }
282
+ };
266
283
  if (remoteSearch) {
267
284
  props.remoteSearch({
268
285
  page: { currentPage, pageSize },
@@ -272,11 +289,12 @@ const query = ({ props, state, parent, constants }) => (page) => {
272
289
  state.pagerConfig.total = data.total;
273
290
  state.loading = false;
274
291
  resolve();
275
- }).finally(() => {
276
- state.loading = false;
277
- });
292
+ }).then(onFinally).catch(onFinally);
278
293
  } else {
279
- getDataset({ dataset, service: parent.$service, tree: props.treeOp }, { pageVO: { curPage: currentPage, pageSize } }).then((data) => {
294
+ getDataset(
295
+ { dataset, service: parent.$service, tree: props.treeOp },
296
+ { pageVO: { curPage: currentPage, pageSize } }
297
+ ).then((data) => {
280
298
  const { result, pageVO = {} } = data;
281
299
  if (props.popseletor === constants.TYPE_TREE) {
282
300
  props.treeOp.data = result || data;
@@ -286,9 +304,7 @@ const query = ({ props, state, parent, constants }) => (page) => {
286
304
  }
287
305
  state.loading = false;
288
306
  resolve();
289
- }).finally(() => {
290
- state.loading = false;
291
- });
307
+ }).then(onFinally).catch(onFinally);
292
308
  }
293
309
  } else {
294
310
  state.fullGridData = localFilter({ state, props });
@@ -316,7 +332,7 @@ const selectedGridSelectChange = ({ constants, props, vm, state }) => ({ checked
316
332
  const refs = vm.$refs;
317
333
  if (!checked) {
318
334
  const len = state.selectedValues.length;
319
- event.target.checked = !checked;
335
+ event && (event.target.checked = !checked);
320
336
  for (let i = 0; i < len; i++) {
321
337
  if (state.selectedValues[i] == row[props.valueField]) {
322
338
  state.selectedValues.splice(i, 1);
@@ -365,6 +381,7 @@ const sourceGridSelectAll = ({ props, state, api }) => ({ selection, checked })
365
381
  api.handleConfirm();
366
382
  }
367
383
  copySelectDatas(state);
384
+ api.selectedBoxInit();
368
385
  };
369
386
  const sourceGridSelectChange = ({ props, state, api }) => ({ checked, row, confirm }) => {
370
387
  if (checked) {
@@ -382,6 +399,7 @@ const sourceGridSelectChange = ({ props, state, api }) => ({ checked, row, confi
382
399
  api.handleConfirm();
383
400
  }
384
401
  copySelectDatas(state);
402
+ api.selectedBoxInit();
385
403
  };
386
404
  const filterNode = () => (value, data) => {
387
405
  if (!value) {
@@ -483,7 +501,7 @@ const updateSuggestWidth = ({ refs }) => () => {
483
501
  let $input = refs.reference.getInput();
484
502
  refs.popper.style.width = $input.clientWidth + "px";
485
503
  };
486
- const doSuggesst = ({ state, props, popper, api }) => (event) => {
504
+ const doSuggesst = ({ state, props, popper, api, nextTick }) => (event) => {
487
505
  if (!props.suggest) {
488
506
  return;
489
507
  }
@@ -498,13 +516,16 @@ const doSuggesst = ({ state, props, popper, api }) => (event) => {
498
516
  state.suggestList = [].concat(state.selectedDatas);
499
517
  }
500
518
  state.showSuggestPanel = true;
519
+ setTimeout(popper.updatePopper);
501
520
  }
502
521
  if (props.remoteSearch) {
503
522
  const doQuery = (query3) => {
504
523
  state.showSuggestPanel = true;
505
524
  props.remoteSearch({ query: query3 }).then((data) => {
506
525
  state.suggestList = data.data;
507
- popper.updatePopper();
526
+ nextTick(() => {
527
+ popper.updatePopper();
528
+ });
508
529
  });
509
530
  };
510
531
  if (!props.bypass && props.multi) {
@@ -572,6 +593,22 @@ const mounted = ({ api, props }) => () => {
572
593
  api.initDisplay(props.modelValue);
573
594
  }
574
595
  };
596
+ const doDestroy = ({ popper }) => () => {
597
+ popper.doDestroy();
598
+ };
599
+ const selectedBoxInit = (refs) => () => refs.selectedBox && refs.selectedBox.init();
600
+ const selectedBoxClear = (api) => () => api.selectedGridSelectAll({ checked: false });
601
+ const selectedBoxDelete = (api) => ({ option: row }) => api.selectedGridSelectChange({ checked: false, row });
602
+ const selectedBoxDrag = ({ props, state }) => ({ state: { select } }) => {
603
+ const { valueField } = props;
604
+ const { selectedDatas } = state;
605
+ if (select && select.length) {
606
+ const datas = select.map((opt) => String(opt[valueField])).map((strVal) => selectedDatas.find((opt) => strVal === String(opt[valueField])));
607
+ const values = datas.map((opt) => opt[valueField]);
608
+ state.selectedDatas = datas;
609
+ state.selectedValues = values;
610
+ }
611
+ };
575
612
  export {
576
613
  closeSuggestPanel,
577
614
  computedGetTitle,
@@ -579,6 +616,7 @@ export {
579
616
  computedTreeOp,
580
617
  createSearchForm,
581
618
  doClear,
619
+ doDestroy,
582
620
  doSearch,
583
621
  doSuggesst,
584
622
  filterNode,
@@ -602,6 +640,10 @@ export {
602
640
  mounted,
603
641
  openDialog,
604
642
  query,
643
+ selectedBoxClear,
644
+ selectedBoxDelete,
645
+ selectedBoxDrag,
646
+ selectedBoxInit,
605
647
  selectedGridSelectAll,
606
648
  selectedGridSelectChange,
607
649
  sourceGridSelectAll,
package/popeditor/vue.js CHANGED
@@ -40,7 +40,12 @@ import {
40
40
  updateSuggestWidth,
41
41
  handlePager,
42
42
  initSearchOption,
43
- mounted
43
+ mounted,
44
+ doDestroy,
45
+ selectedBoxInit,
46
+ selectedBoxClear,
47
+ selectedBoxDelete,
48
+ selectedBoxDrag
44
49
  } from "./index";
45
50
  const api = [
46
51
  "state",
@@ -65,10 +70,15 @@ const api = [
65
70
  "closeSuggestPanel",
66
71
  "popper",
67
72
  "doSuggesstNow",
68
- "suggestRadioChange"
73
+ "suggestRadioChange",
74
+ "doDestroy",
75
+ "selectedBoxClear",
76
+ "selectedBoxDelete",
77
+ "selectedBoxDrag"
69
78
  ];
70
- const initState = ({ reactive, computed, props, api: api2, constants, t, parent }) => {
79
+ const initState = ({ reactive, computed, props, api: api2, constants, t, parent, vm }) => {
71
80
  const state = reactive({
81
+ showContent: false,
72
82
  open: false,
73
83
  display: "",
74
84
  getTitle: computed(() => api2.computedGetTitle({ constants, props, t })),
@@ -86,6 +96,7 @@ const initState = ({ reactive, computed, props, api: api2, constants, t, parent
86
96
  historyGridDataset: [],
87
97
  filterText: "",
88
98
  treeOp: computed(() => api2.computedTreeOp(props, state)),
99
+ theme: vm.theme,
89
100
  pagerConfig: reactive(__spreadValues({
90
101
  currentPage: 1,
91
102
  pageSize: 10,
@@ -138,8 +149,8 @@ const initApi = ({ api: api2, props, state, parent, refs, emit, popper, constant
138
149
  doSearch: doSearch({ api: api2, state, props }),
139
150
  doClear: doClear({ api: api2, state, props }),
140
151
  updateSuggestWidth: updateSuggestWidth({ refs }),
141
- doSuggesstNow: doSuggesst({ api: api2, state, props, popper }),
142
- doSuggesst: debounce(1e3, doSuggesst({ api: api2, state, props, popper })),
152
+ doSuggesstNow: doSuggesst({ api: api2, state, props, popper, nextTick }),
153
+ doSuggesst: debounce(1e3, doSuggesst({ api: api2, state, props, popper, nextTick })),
143
154
  closeSuggestPanel: closeSuggestPanel({ api: api2, state, refs }),
144
155
  sourceGridSelectChange: sourceGridSelectChange({ props, state, api: api2 }),
145
156
  sourceGridSelectAll: sourceGridSelectAll({ props, state, api: api2 }),
@@ -147,7 +158,12 @@ const initApi = ({ api: api2, props, state, parent, refs, emit, popper, constant
147
158
  suggestRadioChange: suggestRadioChange({ api: api2, state }),
148
159
  handlePager: handlePager({ api: api2, props, state }),
149
160
  initSearchOption: initSearchOption({ api: api2, state }),
150
- mounted: mounted({ api: api2, props })
161
+ mounted: mounted({ api: api2, props }),
162
+ doDestroy: doDestroy({ popper }),
163
+ selectedBoxInit: selectedBoxInit(refs),
164
+ selectedBoxClear: selectedBoxClear(api2),
165
+ selectedBoxDelete: selectedBoxDelete(api2),
166
+ selectedBoxDrag: selectedBoxDrag({ props, state })
151
167
  });
152
168
  state.search = api2.createSearchForm(false);
153
169
  };
@@ -173,7 +189,7 @@ const initWatch = ({ watch, props, api: api2, state, popper }) => {
173
189
  };
174
190
  const renderless = (props, { computed, onMounted, reactive, watch, inject, toRefs, onBeforeUnmount, onDeactivated }, { t, refs, parent, emit, constants, vm, nextTick, slots }) => {
175
191
  const api2 = {};
176
- const state = initState({ reactive, computed, props, api: api2, constants, t, parent });
192
+ const state = initState({ reactive, computed, props, api: api2, constants, t, parent, vm });
177
193
  const popper = userPopper({
178
194
  emit,
179
195
  refs,
package/popover/vue.js CHANGED
@@ -76,8 +76,7 @@ const initWatch = ({ watch, props, state, emit, api: api2, nextTick }) => {
76
76
  return;
77
77
  }
78
78
  val ? emit("show") : emit("hide");
79
- },
80
- { immediate: true }
79
+ }
81
80
  );
82
81
  watch(
83
82
  () => props.reference,
package/popup/vue.js CHANGED
@@ -1,11 +1,24 @@
1
1
  import {
2
2
  __spreadValues
3
3
  } from "../chunk-PKUHTIDK.js";
4
- import { getStyle, watchValue, open, opened, closed, onTouchMove, close, renderOverlay, clickOverlay, updateZIndex } from "./index";
4
+ import {
5
+ getStyle,
6
+ watchValue,
7
+ open,
8
+ opened,
9
+ closed,
10
+ onTouchMove,
11
+ close,
12
+ renderOverlay,
13
+ clickOverlay,
14
+ updateZIndex
15
+ } from "./index";
5
16
  const api = ["state", "open", "close", "clickOverlay", "onTouchMove", "opened", "closed"];
6
17
  const initState = ({ reactive, computed, props, api: api2 }) => {
7
18
  const state = reactive({
8
- transitionName: computed(() => props.transition || props.position === "center" ? "tiny-fade" : `tiny-popup-slide-${props.position}`),
19
+ transitionName: computed(
20
+ () => props.transition || props.position === "center" ? "tiny-fade" : `tiny-popup-slide-${props.position}`
21
+ ),
9
22
  style: computed(() => api2.getStyle()),
10
23
  inited: computed(() => state.inited || props.modelValue),
11
24
  opened: false,
package/progress/index.js CHANGED
@@ -6,9 +6,9 @@ const computedBarStyle = ({ api, props }) => () => ({
6
6
  const computedRelativeStrokeWidth = ({ constants, state }) => () => {
7
7
  if (state.width === 0 || state.strokeWidth === 0)
8
8
  return constants.REL_STROKE_WIDTH;
9
- return (state.strokeWidth / state.width * 100).toFixed(1);
9
+ return Number((state.strokeWidth / state.width * 100).toFixed(1));
10
10
  };
11
- const computedRadius = ({ constants, props, state }) => () => props.type === constants.PROGRESS_TYPE.CIRCLE || props.type === constants.PROGRESS_TYPE.DASHBOARD ? parseInt(50 - parseFloat(state.relativeStrokeWidth) / 2, 10) : 0;
11
+ const computedRadius = ({ constants, props, state }) => () => props.type === constants.PROGRESS_TYPE.CIRCLE || props.type === constants.PROGRESS_TYPE.DASHBOARD ? parseInt(String(50 - parseFloat(state.relativeStrokeWidth) / 2), 10) : 0;
12
12
  const computedTrackPath = ({ constants, props, state }) => () => {
13
13
  const radiusValue = state.radius;
14
14
  const isDashboardType = props.type === constants.PROGRESS_TYPE.DASHBOARD;
@@ -42,6 +42,8 @@ const computedIconClass = ({ constants, props, mode }) => () => {
42
42
  } else if (props.status === constants.PROGRESS_STATUS.EXCEPTION) {
43
43
  const iconClasses = props.type === constants.PROGRESS_TYPE.LINE ? [constants.ICON_EXCEPTION, constants.ICON_CIRCLE_EXCEPTION] : [constants.ICON_CIRCLE_EXCEPTION, constants.ICON_EXCEPTION];
44
44
  return mode === "mobile-first" ? iconClasses[1] : iconClasses[0];
45
+ } else {
46
+ return "";
45
47
  }
46
48
  };
47
49
  const computedIconStyle = ({ constants, props, state }) => () => {
@@ -84,7 +86,7 @@ const getCurrentColor = ({ api, props }) => (percentage) => {
84
86
  return api.getLevelColor(percentage);
85
87
  }
86
88
  };
87
- const getLevelColor = (api) => (percentage) => {
89
+ const getLevelColor = ({ api }) => (percentage) => {
88
90
  const colorArray = api.getColorArray().sort((a, b) => a.percentage - b.percentage);
89
91
  for (let i = 0; i < colorArray.length; i++) {
90
92
  if (colorArray[i].percentage > percentage) {
@@ -93,7 +95,7 @@ const getLevelColor = (api) => (percentage) => {
93
95
  }
94
96
  return colorArray[colorArray.length - 1].color;
95
97
  };
96
- const getColorArray = (props) => () => {
98
+ const getColorArray = ({ props }) => () => {
97
99
  const color = props.color;
98
100
  const span = 100 / color.length;
99
101
  return color.map((seriesColor, index) => {
@@ -108,9 +110,9 @@ const getColorArray = (props) => () => {
108
110
  };
109
111
  const customBeforeAppearHook = ({ props, state }) => (el) => {
110
112
  if (props.type === "line") {
111
- el.style.width = 0;
113
+ el.style.width = String(0);
112
114
  } else if (props.type === "circle") {
113
- el.style.strokeDasharray = state.perimeter * state.content;
115
+ el.style.strokeDasharray = String(state.perimeter * state.content);
114
116
  el.style.strokeDashoffset = state.perimeter;
115
117
  }
116
118
  };
@@ -121,7 +123,7 @@ const customAfterAppearHook = ({ state, props }) => (el) => {
121
123
  if (props.type === "line") {
122
124
  el.style.width = state.barStyle.width;
123
125
  } else if (props.type === "circle") {
124
- el.style.strokeDashoffset = 0;
126
+ el.style.strokeDashoffset = String(0);
125
127
  }
126
128
  };
127
129
  export {
package/progress/vue.js CHANGED
@@ -22,7 +22,15 @@ import {
22
22
  customAppearHook,
23
23
  customAfterAppearHook
24
24
  } from "./index";
25
- const api = ["state", "getCurrentColor", "getLevelColor", "getColorArray", "customBeforeAppearHook", "customAppearHook", "customAfterAppearHook"];
25
+ const api = [
26
+ "state",
27
+ "getCurrentColor",
28
+ "getLevelColor",
29
+ "getColorArray",
30
+ "customBeforeAppearHook",
31
+ "customAppearHook",
32
+ "customAfterAppearHook"
33
+ ];
26
34
  const renderless = (props, { computed, reactive }, { constants, mode }) => {
27
35
  const api2 = {};
28
36
  const state = reactive({
@@ -51,14 +59,14 @@ const renderless = (props, { computed, reactive }, { constants, mode }) => {
51
59
  state,
52
60
  customAppearHook,
53
61
  computedContent: computedContent({ props }),
54
- getColorArray: getColorArray(props),
62
+ getColorArray: getColorArray({ props }),
55
63
  computedRate: computedRate({ constants, props }),
56
64
  computedPerimeter: computedPerimeter({ state }),
57
65
  computedRadius: computedRadius({ constants, props, state }),
58
66
  computedTrackPath: computedTrackPath({ constants, props, state }),
59
67
  computedIconClass: computedIconClass({ constants, props, mode }),
60
68
  computedIconStyle: computedIconStyle({ constants, props, state }),
61
- computedCircleStyle: computedCircleStyle({ props, state }),
69
+ computedCircleStyle: computedCircleStyle({ state }),
62
70
  computedCirclePathStyle: computedCirclePathStyle({ props, state }),
63
71
  computedStrokeDashoffset: computedStrokeDashoffset({ state }),
64
72
  computedTrailPathStyle: computedTrailPathStyle({ state }),
@@ -66,7 +74,7 @@ const renderless = (props, { computed, reactive }, { constants, mode }) => {
66
74
  computedProgressTextSize: computedProgressTextSize({ state, constants, props, mode }),
67
75
  customAfterAppearHook: customAfterAppearHook({ state, props }),
68
76
  customBeforeAppearHook: customBeforeAppearHook({ props, state }),
69
- getLevelColor: getLevelColor(api2),
77
+ getLevelColor: getLevelColor({ api: api2 }),
70
78
  computedBarStyle: computedBarStyle({ api: api2, props }),
71
79
  getCurrentColor: getCurrentColor({ api: api2, props }),
72
80
  computedStroke: computedStroke({ api: api2, constants, props })
@@ -1,5 +1,14 @@
1
1
  import "../chunk-PKUHTIDK.js";
2
- import { mountedHandler, beforeUnmountHandler, handlerModelValue, onTouchstart, onTouchmove, onTouchend, initPullRefresh, clearPullRefresh } from "./index";
2
+ import {
3
+ mountedHandler,
4
+ beforeUnmountHandler,
5
+ handlerModelValue,
6
+ onTouchstart,
7
+ onTouchmove,
8
+ onTouchend,
9
+ initPullRefresh,
10
+ clearPullRefresh
11
+ } from "./index";
3
12
  const api = ["state"];
4
13
  const renderless = (props, { watch, onMounted, reactive, onBeforeUnmount }, { t, refs }) => {
5
14
  const api2 = {};
@@ -0,0 +1,9 @@
1
+ import "../chunk-PKUHTIDK.js";
2
+ const filter = () => (value, data) => {
3
+ if (!value)
4
+ return true;
5
+ return data.label.includes(value);
6
+ };
7
+ export {
8
+ filter
9
+ };
@@ -0,0 +1,18 @@
1
+ import "../chunk-PKUHTIDK.js";
2
+ import { filter } from "./index";
3
+ const api = ["state", "filter"];
4
+ const renderless = (props, { reactive }, { emit, vm }) => {
5
+ const api2 = {};
6
+ const state = reactive({
7
+ fields: null
8
+ });
9
+ Object.assign(api2, {
10
+ state,
11
+ filter: filter({ emit, vm })
12
+ });
13
+ return api2;
14
+ };
15
+ export {
16
+ api,
17
+ renderless
18
+ };
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));