@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
@@ -1,10 +1,9 @@
1
1
  import {
2
- __spreadProps,
3
2
  __spreadValues
4
3
  } from "../chunk-G2ADBYYC.js";
5
4
  import { getFormated, getStackMap, getLegend, hexToRgb, set } from "../chart-core/deps/utils";
6
5
  import { isNull } from "../common/type";
7
- import { itemPoint, itemLabel, itemContent, SAAS_DEFAULT_COLORS_10 } from "../chart-core/deps/constants";
6
+ import { itemPoint, itemLabel, itemContent, SAAS_DEFAULT_COLORS } from "../chart-core/deps/constants";
8
7
  const getLineXAxis = (args) => {
9
8
  const { xAxisType, dimension, rows, xAxisName, axisVisible } = args;
10
9
  return dimension.map((item, idx) => ({
@@ -28,10 +27,10 @@ const getAreaSeries = ({ color, seriesItem }) => {
28
27
  };
29
28
  const setSingLineSeries = ({ defaultSeriesItem, seriesItem }) => {
30
29
  defaultSeriesItem.showSymbol = true;
31
- set(defaultSeriesItem, "emphasis.itemStyle.color", SAAS_DEFAULT_COLORS_10[0]);
30
+ set(defaultSeriesItem, "emphasis.itemStyle.color", SAAS_DEFAULT_COLORS[0]);
32
31
  seriesItem.label = __spreadValues({ show: true }, seriesItem.label);
33
32
  seriesItem.itemStyle = __spreadValues({ color: "transparent" }, seriesItem.itemStyle);
34
- seriesItem.lineStyle = __spreadValues({ color: SAAS_DEFAULT_COLORS_10[0] }, seriesItem.lineStyle);
33
+ seriesItem.lineStyle = __spreadValues({ color: SAAS_DEFAULT_COLORS[0] }, seriesItem.lineStyle);
35
34
  seriesItem.animation = seriesItem.animation || false;
36
35
  };
37
36
  const getLineSeries = (args) => {
@@ -83,7 +82,7 @@ const getLineYAxis = (args) => {
83
82
  let yAxis = [];
84
83
  for (let k = 0; k < 2; k++) {
85
84
  if (yAxisType[k]) {
86
- yAxis[k] = __spreadProps(__spreadValues({}, yAxisBase), {
85
+ yAxis[k] = Object.assign({}, yAxisBase, {
87
86
  axisLabel: {
88
87
  formatter(val) {
89
88
  return getFormated(val, yAxisType[k], digit);
@@ -91,7 +90,7 @@ const getLineYAxis = (args) => {
91
90
  }
92
91
  });
93
92
  } else {
94
- yAxis[k] = __spreadValues({}, yAxisBase);
93
+ yAxis[k] = Object.assign({}, yAxisBase);
95
94
  }
96
95
  yAxis[k].name = yAxisName[k] || "";
97
96
  yAxis[k].scale = scale[k] || false;
@@ -115,7 +114,7 @@ const getLineTooltip = (args) => {
115
114
  template.push(`${title}<br>`);
116
115
  items.forEach(({ seriesName, data, color }) => {
117
116
  if (color === "transparent" && items.length === 1) {
118
- color = SAAS_DEFAULT_COLORS_10[0];
117
+ color = SAAS_DEFAULT_COLORS[0];
119
118
  }
120
119
  let showData = null;
121
120
  const type = ~rightListArr.indexOf(seriesName) ? yAxisType[1] : yAxisType[0];
@@ -150,7 +149,7 @@ const line = (columns, rows, settings, extra) => {
150
149
  }
151
150
  let legendItemStyle;
152
151
  if (metrics.length === 1) {
153
- legendItemStyle = { itemStyle: { color: SAAS_DEFAULT_COLORS_10[0] } };
152
+ legendItemStyle = { itemStyle: { color: SAAS_DEFAULT_COLORS[0] } };
154
153
  }
155
154
  const legend = legendVisible && getLegend({ legendName, metrics, labelMap, legendItemStyle });
156
155
  const tooltip = tooltipVisible && getLineTooltip({ axisSite, digit, labelMap, tooltipFormatter, xAxisType, yAxisType });
@@ -160,7 +159,7 @@ const line = (columns, rows, settings, extra) => {
160
159
  Object.assign(seriesParam, { label, labelMap, metrics, nullAddZero, rows, xAxisType, stack, color, smooth });
161
160
  const series = getLineSeries(seriesParam);
162
161
  let options = { legend, xAxis, series, yAxis, tooltip };
163
- return __spreadValues(__spreadValues({}, options), settings);
162
+ return options;
164
163
  };
165
164
  export {
166
165
  line
@@ -1,6 +1,6 @@
1
1
  import "../chunk-G2ADBYYC.js";
2
2
  import { isObject } from "../chart-core/deps/utils";
3
- import { itemLabel, itemContent, SAAS_DEFAULT_COLORS_10 } from "../chart-core/deps/constants";
3
+ import { itemLabel, itemContent, SAAS_DEFAULT_COLORS } from "../chart-core/deps/constants";
4
4
  const getTreeLegend = (args) => {
5
5
  const { dimension, rows } = args;
6
6
  const result = rows.map((row) => row[dimension]);
@@ -33,7 +33,7 @@ const getTreeSeries = (args) => {
33
33
  rows.forEach((row) => {
34
34
  const seriesItem = seriesMap[row[dimension]];
35
35
  const label = { position: "right", fontSize: 12, color: "#191919" };
36
- const itemStyle = { color: SAAS_DEFAULT_COLORS_10[0] };
36
+ const itemStyle = { color: SAAS_DEFAULT_COLORS[0] };
37
37
  const lineStyle = { color: "rgba(25 ,25 ,25 , 0.10)" };
38
38
  const symbolSize = 16;
39
39
  const result = { type: "tree", name: row[dimension], data: row[metrics], itemStyle, label, lineStyle, symbolSize };
@@ -4,10 +4,10 @@ import {
4
4
  } from "../chunk-G2ADBYYC.js";
5
5
  import { getFormated } from "../chart-core/deps/utils";
6
6
  import { isNull } from "../common/type";
7
- import { itemLabel, itemContent, SAAS_DEFAULT_COLORS_10 } from "../chart-core/deps/constants";
7
+ import { itemLabel, itemContent, SAAS_DEFAULT_COLORS } from "../chart-core/deps/constants";
8
8
  const getWaterfallTooltip = (dataType, digit) => {
9
9
  let trigger = "axis";
10
- let axisPointer = { type: "shadow" };
10
+ let axisPointer = { type: "shadow", z: 1, shadowStyle: { color: "#f5f5f5" } };
11
11
  let formatter = function(items) {
12
12
  const item = items[1];
13
13
  return [
@@ -24,10 +24,8 @@ const getWaterfallXAxis = (args) => {
24
24
  let name = labelMap && labelMap[xAxisName] || xAxisName;
25
25
  const xAxis = { type: "category", name, splitLine: { show: false }, data: xAxisData, show: axisVisible };
26
26
  const axisLine = { show: true, lineStyle: { color: "#191919", opacity: 0.1, width: 2 } };
27
- const axisPointer = { type: "shadow", z: 1, shadowStyle: { color: "#f5f5f5" } };
28
27
  return __spreadProps(__spreadValues({}, xAxis), {
29
- axisLine,
30
- axisPointer
28
+ axisLine
31
29
  });
32
30
  };
33
31
  const getWaterfallYAxis = (args) => {
@@ -69,7 +67,7 @@ const getWaterfallSeries = (args) => {
69
67
  series.push(
70
68
  Object.assign(seriesAdv, __spreadProps(__spreadValues({}, seriesBase), {
71
69
  itemStyle: { borderRadius: [4, 4, 0, 0] },
72
- color: SAAS_DEFAULT_COLORS_10[0]
70
+ color: SAAS_DEFAULT_COLORS[0]
73
71
  }))
74
72
  );
75
73
  return series;
package/checkbox/index.js CHANGED
@@ -40,7 +40,7 @@ const handleChange = ({
40
40
  };
41
41
  const computedGetModelGet = ({ state, props }) => () => {
42
42
  const model = state.isGroup ? state.store : props.modelValue !== void 0 ? props.modelValue : state.selfModel;
43
- return isNull(model) ? [] : model;
43
+ return isNull(model) ? state.isGroup ? [] : "" : model;
44
44
  };
45
45
  const computedGetModelSet = ({
46
46
  state,
@@ -124,6 +124,21 @@ const computedShowText = ({ props }) => () => {
124
124
  return props.label;
125
125
  }
126
126
  };
127
+ const handleLabelMouseenter = ({ state, vm }) => (e) => {
128
+ const label = e.target;
129
+ if (label && label.scrollWidth > label.offsetWidth) {
130
+ const tooltip = vm.$refs.tooltip;
131
+ tooltip.state.referenceElm = label;
132
+ tooltip.state.popperElm && (tooltip.state.popperElm.style.display = "none");
133
+ tooltip.doDestroy();
134
+ state.tooltipVisible = true;
135
+ state.displayedValue = label.textContent;
136
+ setTimeout(tooltip.updatePopper, 20);
137
+ }
138
+ };
139
+ const handleMouseleave = (state) => () => {
140
+ state.tooltipVisible = false;
141
+ };
127
142
  export {
128
143
  addToStore,
129
144
  computedCheckboxSize,
@@ -141,6 +156,8 @@ export {
141
156
  computedShowText,
142
157
  computedStore,
143
158
  handleChange,
159
+ handleLabelMouseenter,
160
+ handleMouseleave,
144
161
  mounted,
145
162
  removeFromStore,
146
163
  toggleEvent
package/checkbox/vue.js CHANGED
@@ -18,12 +18,14 @@ import {
18
18
  mounted,
19
19
  toggleEvent,
20
20
  computedIsShowText,
21
- computedShowText
21
+ computedShowText,
22
+ handleLabelMouseenter,
23
+ handleMouseleave
22
24
  } from "./index";
23
- const api = ["state", "handleChange", "computedStore"];
25
+ const api = ["state", "handleChange", "computedStore", "handleLabelMouseenter", "handleMouseleave"];
24
26
  const initState = ({ reactive, computed, parent, api: api2, inject, props }) => {
25
27
  const state = reactive({
26
- size: props.size || inject("size", null),
28
+ size: computed(() => props.size || inject("size", null) || (parent.tinyForm || {}).size),
27
29
  vertical: inject("vertical", null),
28
30
  iconPosition: props.iconPosition || inject("iconPosition", "center"),
29
31
  focus: false,
@@ -48,7 +50,10 @@ const initState = ({ reactive, computed, parent, api: api2, inject, props }) =>
48
50
  set: (value) => api2.computedGetModelSet(value)
49
51
  }),
50
52
  showText: computed(() => api2.computedShowText()),
51
- isShowText: computed(() => api2.computedIsShowText())
53
+ isShowText: computed(() => api2.computedIsShowText()),
54
+ shape: inject("shape", null) || props.shape,
55
+ tooltipVisible: false,
56
+ displayedValue: ""
52
57
  });
53
58
  return state;
54
59
  };
@@ -62,7 +67,8 @@ const initApi = ({
62
67
  formItemSize,
63
68
  emit,
64
69
  nextTick,
65
- t
70
+ t,
71
+ vm
66
72
  }) => {
67
73
  Object.assign(api2, {
68
74
  state,
@@ -83,7 +89,9 @@ const initApi = ({
83
89
  handleChange: handleChange({ state, props, emit, nextTick, dispatch, constants }),
84
90
  computedDisplayLabel: computedDisplayLabel({ state, props, t }),
85
91
  computedIsShowText: computedIsShowText({ props }),
86
- computedShowText: computedShowText({ props })
92
+ computedShowText: computedShowText({ props }),
93
+ handleLabelMouseenter: handleLabelMouseenter({ state, vm }),
94
+ handleMouseleave: handleMouseleave(state)
87
95
  });
88
96
  };
89
97
  const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, watch, inject }, { vm, parent, emit, constants, nextTick, dispatch, t }) => {
@@ -91,7 +99,7 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, wat
91
99
  const formItemSize = computed(() => api2.computedFormItemSize());
92
100
  const state = initState({ reactive, computed, parent, api: api2, inject, props });
93
101
  parent.tinyForm = parent.tinyForm || inject("form", null);
94
- initApi({ api: api2, state, dispatch, props, parent, constants, formItemSize, emit, nextTick, t });
102
+ initApi({ api: api2, state, dispatch, props, parent, constants, formItemSize, emit, nextTick, t, vm });
95
103
  watch(
96
104
  () => props.modelValue,
97
105
  (value) => props.validateEvent && api2.dispatch(constants.FORM_ITEM, constants.FORM_CHANGE, value)
@@ -20,6 +20,7 @@ const renderless = (props, { computed, reactive, watch, provide }, { dispatch, c
20
20
  provide("size", props.size);
21
21
  provide("vertical", props.vertical);
22
22
  provide("iconPosition", props.iconPosition);
23
+ provide("shape", props.shape);
23
24
  return api2;
24
25
  };
25
26
  export {
package/col/vue.js CHANGED
@@ -7,7 +7,7 @@ const renderless = (props, { computed, reactive, inject }, { parent }) => {
7
7
  row: computed(() => api2.row()),
8
8
  style: computed(() => api2.getStyle()),
9
9
  className: computed(() => api2.getClassName()),
10
- layout: inject("layout")
10
+ layout: inject("layout", {})
11
11
  });
12
12
  Object.assign(api2, {
13
13
  state,
package/collapse/index.js CHANGED
@@ -8,7 +8,7 @@ const setActiveNames = ({ emit, props, state }) => (activeNames) => {
8
8
  };
9
9
  const handleItemClick = ({ api, props, state }) => (item) => {
10
10
  const activeNames = state.activeNames.slice(0);
11
- const index = activeNames.indexOf(item.name);
11
+ const index = activeNames.indexOf(item == null ? void 0 : item.name);
12
12
  const beforeClose = () => {
13
13
  let result = props.beforeClose ? props.beforeClose(item, state.activeNames) : true;
14
14
  return new Promise((resolve) => {
@@ -22,10 +22,10 @@ const handleItemClick = ({ api, props, state }) => (item) => {
22
22
  beforeClose().then((next) => {
23
23
  if (props.accordion) {
24
24
  if (next || !activeNames.length) {
25
- api.setActiveNames(activeNames[0] === item.name ? "" : item.name);
25
+ api.setActiveNames(activeNames[0] === (item == null ? void 0 : item.name) ? "" : item == null ? void 0 : item.name);
26
26
  }
27
27
  } else {
28
- index > -1 ? next && activeNames.splice(index, 1) : activeNames.push(item.name);
28
+ index > -1 ? next && activeNames.splice(index, 1) : activeNames.push(item == null ? void 0 : item.name);
29
29
  api.setActiveNames(activeNames);
30
30
  }
31
31
  });
@@ -57,13 +57,6 @@ const renderless = (props, context, { emit }) => {
57
57
  },
58
58
  { deep: true }
59
59
  );
60
- context.watch(
61
- state,
62
- () => {
63
- state.color = state.color;
64
- },
65
- { deep: true }
66
- );
67
60
  context.watch(modelValue, (newValue) => {
68
61
  pre.value = res.value;
69
62
  hex.value = newValue;
@@ -1,4 +1,7 @@
1
- import "../chunk-G2ADBYYC.js";
1
+ import {
2
+ __spreadProps,
3
+ __spreadValues
4
+ } from "../chunk-G2ADBYYC.js";
2
5
  import { isNull } from "../common/type";
3
6
  const handelIconClick = ({ emit }) => (item, index, event) => {
4
7
  if (item.disabled)
@@ -51,12 +54,25 @@ const getItemChecked = ({ props, state }) => () => {
51
54
  return state.model === props.label;
52
55
  }
53
56
  };
57
+ const computedOptions = ({ props }) => () => {
58
+ return props.options.filter((item) => {
59
+ const hidden = typeof item.hidden === "function" ? item.hidden(props.data) : item.hidden;
60
+ return !hidden;
61
+ }).map((opt) => {
62
+ return __spreadProps(__spreadValues({}, opt), {
63
+ disabled: typeof opt.disabled === "function" ? opt.disabled(props.data) : opt.disabled
64
+ });
65
+ });
66
+ };
67
+ const getType = ({ props, state }) => () => state.isGroup ? state.columnGroup.type || props.type : props.type;
54
68
  export {
69
+ computedOptions,
55
70
  computedStore,
56
71
  getIsGroup,
57
72
  getItemChecked,
58
73
  getModel,
59
74
  getSize,
75
+ getType,
60
76
  handelIconClick,
61
77
  handleChange,
62
78
  isDisabled,
@@ -8,22 +8,25 @@ import {
8
8
  handleChange,
9
9
  getIsGroup,
10
10
  getSize,
11
- isDisabled
11
+ isDisabled,
12
+ computedOptions,
13
+ getType
12
14
  } from "./index";
13
15
  const api = ["state", "handelIconClick", "handleChange"];
14
16
  const renderless = (props, { reactive, computed }, { vm, parent, emit, nextTick, dispatch, constants }) => {
15
17
  const api2 = {};
16
18
  const state = reactive({
17
19
  columnGroup: {},
20
+ type: computed(() => api2.getType()),
18
21
  size: computed(() => api2.getSize()),
19
22
  disabled: computed(() => api2.isDisabled()),
20
23
  itemChecked: computed(() => api2.getItemChecked()),
21
24
  sliceNum: computed(() => props.size === "small" ? 1 : 2),
22
25
  iconNum: computed(() => props.size === "small" ? 2 : 3),
23
- effectOptions: computed(() => props.options.filter((item) => !item.hidden)),
24
26
  showCheckbox: computed(() => props.showCheckbox || state.columnGroup.showCheckbox),
25
27
  showRadio: computed(() => props.showRadio || state.columnGroup.showRadio),
26
28
  store: computed(() => api2.computedStore()),
29
+ effectOptions: computed(() => api2.computedOptions()),
27
30
  isGroup: computed(() => api2.getIsGroup()),
28
31
  model: computed({
29
32
  get: () => api2.getModel(),
@@ -40,7 +43,9 @@ const renderless = (props, { reactive, computed }, { vm, parent, emit, nextTick,
40
43
  handleChange: handleChange({ constants, dispatch, emit, state, nextTick }),
41
44
  computedStore: computedStore({ state, props }),
42
45
  handelIconClick: handelIconClick({ emit }),
43
- getItemChecked: getItemChecked({ state, props })
46
+ getItemChecked: getItemChecked({ state, props }),
47
+ computedOptions: computedOptions({ props }),
48
+ getType: getType({ props, state })
44
49
  });
45
50
  return api2;
46
51
  };
package/common/date.js CHANGED
@@ -48,13 +48,14 @@ const getTimezone = (date) => {
48
48
  return timezone;
49
49
  };
50
50
  const isLeapYear = (year) => year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;
51
+ const getMilliseconds = (milliseconds) => milliseconds > maxDateValues.MILLISECOND ? Number(String(milliseconds).substring(0, 3)) : milliseconds;
51
52
  const getDateFromData = ({ year, month, date, hours, minutes, seconds, milliseconds }) => {
52
53
  let daysInMonth = daysInMonths[month];
53
54
  if (isLeapYear(year) && month === 1) {
54
55
  daysInMonth += 1;
55
56
  }
56
57
  if (date <= daysInMonth) {
57
- return new Date(year, month, date, hours, minutes, seconds, milliseconds);
58
+ return new Date(year, month, date, hours, minutes, seconds, getMilliseconds(milliseconds));
58
59
  }
59
60
  };
60
61
  const yyyymmddDateParser = (m) => {
@@ -133,7 +134,7 @@ const iso8601DateParser = (m) => {
133
134
  actHours = sign === "+" ? hours - offsetHours - offset / 60 : Number(hours) + Number(offsetHours) - offset / 60;
134
135
  actMinutes = sign === "+" ? minutes - offsetMinutes : Number(minutes) + Number(offsetMinutes);
135
136
  }
136
- return new Date(year, month, date, actHours, actMinutes, seconds, milliseconds);
137
+ return new Date(year, month, date, actHours, actMinutes, seconds, getMilliseconds(milliseconds));
137
138
  }
138
139
  };
139
140
  const dateParsers = [
@@ -298,14 +299,15 @@ const format = function(date, dateFormat = "yyyy/MM/dd hh:mm:ss") {
298
299
  return dateValue ? format(dateValue, afterFormat) : "";
299
300
  }
300
301
  };
301
- const getDateWithNewTimezone = (date, otz, ntz) => {
302
- if (!isDate(date) || !isNumeric(otz) || !isNumeric(ntz)) {
302
+ const getDateWithNewTimezone = (date, otz, ntz, timezoneOffset = 0) => {
303
+ if (!isDate(date) || !isNumeric(otz) || !isNumeric(ntz) || !isNumeric(timezoneOffset)) {
303
304
  return;
304
305
  }
305
306
  const otzOffset = -otz * 60;
306
307
  const ntzOffset = -ntz * 60;
308
+ const dstOffeset = timezoneOffset * 60;
307
309
  const utc = date.getTime() + otzOffset * 6e4;
308
- return new Date(utc - ntzOffset * 6e4);
310
+ return new Date(utc - (ntzOffset - dstOffeset) * 6e4);
309
311
  };
310
312
  const toDateStr = (date, dateFormat, timezone) => {
311
313
  if (date && isNumeric(timezone)) {
@@ -9,11 +9,12 @@ if (!isServer) {
9
9
  on(document, "mousedown", (event) => startClick = event);
10
10
  on(document, "mouseup", (event) => {
11
11
  nodeList.forEach((node) => node[nameSpace].documentHandler(event, startClick));
12
+ startClick = void 0;
12
13
  });
13
14
  }
14
15
  const createDocumentHandler = (el, binding, vnode) => function(mouseup = {}, mousedown = {}) {
15
- let popperElm = vnode.context.popperElm || vnode.context.state.popperElm;
16
- if (!mouseup.target || !mousedown.target || el.contains(mouseup.target) || el.contains(mousedown.target) || el === mouseup.target || popperElm && (popperElm.contains(mouseup.target) || popperElm.contains(mousedown.target))) {
16
+ let popperElm = vnode.context.popperElm || vnode.context.state && vnode.context.state.popperElm;
17
+ if (!mouseup || !mouseup.target || !mousedown || !mousedown.target || el.contains(mouseup.target) || el.contains(mousedown.target) || el === mouseup.target || popperElm && (popperElm.contains(mouseup.target) || popperElm.contains(mousedown.target))) {
17
18
  return;
18
19
  }
19
20
  if (binding.expression && el[nameSpace].methodName && vnode.context[el[nameSpace].methodName]) {
@@ -49,6 +50,9 @@ var clickoutside_default = {
49
50
  break;
50
51
  }
51
52
  }
53
+ if (nodeList.length === 0 && startClick) {
54
+ startClick = null;
55
+ }
52
56
  delete el[nameSpace];
53
57
  }
54
58
  };
@@ -1,5 +1,5 @@
1
1
  import "../../chunk-G2ADBYYC.js";
2
- import { hasOwn, isObject, isNull } from "../type";
2
+ import { hasOwn, isNull } from "../type";
3
3
  import globalConfig from "../global";
4
4
  const isServer = typeof window === "undefined";
5
5
  const SPECIAL_CHARS_REGEXP = /([:\-_]+(.))/g;
@@ -11,7 +11,6 @@ const on = (el, event, handler, options = false) => {
11
11
  }
12
12
  };
13
13
  const off = (el, event, handler, options = false) => {
14
- window.document;
15
14
  if (el && event) {
16
15
  el.removeEventListener(event, handler, options);
17
16
  }
@@ -133,7 +132,6 @@ const isInContainer = (el, container) => {
133
132
  }
134
133
  return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
135
134
  };
136
- const isVNode = (node) => node !== null && isObject(node) && hasOwn.call(node, "componentOptions");
137
135
  const getDomNode = () => {
138
136
  const viewportWindow = globalConfig.viewportWindow || window;
139
137
  let documentElement = viewportWindow.document.documentElement;
@@ -172,6 +170,23 @@ const getScrollParent = (el, root = defaultRoot) => {
172
170
  }
173
171
  return root;
174
172
  };
173
+ const isDisplayNone = (elm) => {
174
+ if (isServer)
175
+ return false;
176
+ if (elm) {
177
+ const computedStyle = getComputedStyle(elm);
178
+ if (computedStyle.getPropertyValue("position") === "fixed") {
179
+ if (computedStyle.getPropertyValue("display") === "none") {
180
+ return true;
181
+ } else if (elm.parentNode !== document.body) {
182
+ return isDisplayNone(elm.parentNode);
183
+ }
184
+ } else {
185
+ return elm.offsetParent === null;
186
+ }
187
+ }
188
+ return false;
189
+ };
175
190
  export {
176
191
  addClass,
177
192
  getDomNode,
@@ -180,10 +195,10 @@ export {
180
195
  getScrollTop,
181
196
  getStyle,
182
197
  hasClass,
198
+ isDisplayNone,
183
199
  isInContainer,
184
200
  isScroll,
185
201
  isServer,
186
- isVNode,
187
202
  off,
188
203
  on,
189
204
  once,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __spreadValues
3
3
  } from "../../chunk-G2ADBYYC.js";
4
- import { on, off } from "./dom";
4
+ import { on, off, isDisplayNone } from "./dom";
5
5
  import PopupManager from "./popup-manager";
6
6
  import globalConfig from "../global";
7
7
  import { typeOf } from "../type";
@@ -16,12 +16,13 @@ const DEFAULTS = {
16
16
  // 全局没有修改过它,所以它一直是flip
17
17
  forceAbsolute: false,
18
18
  gpuAcceleration: true,
19
- // 这个用不到了,默认使用tranform3d
20
19
  offset: 0,
21
20
  placement: "bottom",
22
21
  preventOverflowOrder: positions,
23
- modifiers
22
+ modifiers,
24
23
  // 此处是string数组, 构造函数调用之后转为函数数组
24
+ updateHiddenPopperOnScroll: false
25
+ // 滚动过程中是否更新隐藏的弹出层位置
25
26
  };
26
27
  const setStyle = (el, styles) => {
27
28
  const isNumeric = (n) => n !== "" && !isNaN(parseFloat(n)) && isFinite(n);
@@ -255,8 +256,12 @@ class Popper {
255
256
  let styles = { position: data.offsets.popper.position };
256
257
  let left = Math.round(data.offsets.popper.left);
257
258
  let top = Math.round(data.offsets.popper.top);
258
- styles.transform = `translate3d(${left}px, ${top}px, 0)`;
259
- Object.assign(styles, { top: 0, left: 0 });
259
+ if (this._options.gpuAcceleration) {
260
+ styles.transform = `translate3d(${left}px, ${top}px, 0)`;
261
+ Object.assign(styles, { top: 0, left: 0 });
262
+ } else {
263
+ Object.assign(styles, { top, left });
264
+ }
260
265
  Object.assign(styles, data.styles);
261
266
  setStyle(this._popper, styles);
262
267
  this._popper.setAttribute("x-placement", data.placement);
@@ -480,10 +485,29 @@ class Popper {
480
485
  };
481
486
  }
482
487
  _setupEventListeners() {
488
+ var _a, _b;
483
489
  this.state.updateBoundFn = this.update.bind(this);
490
+ this.state.scrollUpdate = () => {
491
+ if (this._options.updateHiddenPopperOnScroll) {
492
+ this.state.updateBoundFn();
493
+ } else {
494
+ if (isDisplayNone(this._popper))
495
+ return;
496
+ this.state.updateBoundFn();
497
+ }
498
+ };
484
499
  on(window, "resize", this.state.updateBoundFn);
485
500
  if (this._options.boundariesElement !== "window") {
486
501
  let target = getScrollParent(this._reference);
502
+ const customTargets = [];
503
+ if ((_b = (_a = target == null ? void 0 : target.dataset) == null ? void 0 : _a.tag) == null ? void 0 : _b.includes("-form")) {
504
+ customTargets.push(target);
505
+ let realTarget = getScrollParent(target);
506
+ if (realTarget === window.document.body || realTarget === window.document.documentElement) {
507
+ realTarget = window;
508
+ }
509
+ customTargets.push(realTarget);
510
+ }
487
511
  if (target === window.document.body || target === window.document.documentElement) {
488
512
  target = window;
489
513
  }
@@ -492,27 +516,35 @@ class Popper {
492
516
  let targets = getAllScrollParents(this._reference);
493
517
  this.state.scrollTargets = targets || [];
494
518
  targets.forEach((target2) => {
495
- on(target2, "scroll", this.state.updateBoundFn);
519
+ on(target2, "scroll", this.state.scrollUpdate);
496
520
  });
497
521
  } else {
498
- on(target, "scroll", this.state.updateBoundFn);
522
+ if (customTargets.length) {
523
+ this.state.scrollTargets = customTargets;
524
+ customTargets.forEach((target2) => {
525
+ on(target2, "scroll", this.state.scrollUpdate);
526
+ });
527
+ } else {
528
+ on(target, "scroll", this.state.scrollUpdate);
529
+ }
499
530
  }
500
531
  }
501
532
  }
502
533
  _removeEventListeners() {
503
534
  off(window, "resize", this.state.updateBoundFn);
504
535
  if (this._options.boundariesElement !== "window" && this.state.scrollTarget) {
505
- off(this.state.scrollTarget, "scroll", this.state.updateBoundFn);
536
+ off(this.state.scrollTarget, "scroll", this.state.scrollUpdate);
506
537
  this.state.scrollTarget = null;
507
538
  if (this._options.bubbling || PopupManager.globalScroll) {
508
539
  let targets = this.state.scrollTargets || [];
509
540
  targets.forEach((target) => {
510
- off(target, "scroll", this.state.updateBoundFn);
541
+ off(target, "scroll", this.state.scrollUpdate);
511
542
  });
512
543
  this.state.scrollTargets = null;
513
544
  }
514
545
  }
515
546
  this.state.updateBoundFn = null;
547
+ this.state.scrollUpdate = null;
516
548
  }
517
549
  /** 实时计算一下Boundary的位置 */
518
550
  _getBoundaries(data, padding, boundariesElement) {
@@ -527,8 +559,9 @@ class Popper {
527
559
  let scrollParent = getScrollParent(this._popper);
528
560
  let offsetParentRect = getOffsetRect(offsetParent);
529
561
  let isFixed2 = data.offsets.popper.position === "fixed";
530
- let scrollTop = isFixed2 ? 0 : getScrollTopValue(scrollParent);
531
- let scrollLeft = isFixed2 ? 0 : getScrollLeftValue(scrollParent);
562
+ const noScroll = isFixed2 || !this._options.appendToBody && ["right", "left"].includes(this._options.placement);
563
+ let scrollTop = noScroll ? 0 : getScrollTopValue(scrollParent);
564
+ let scrollLeft = noScroll ? 0 : getScrollLeftValue(scrollParent);
532
565
  const viewportWindow = globalConfig.viewportWindow || PopupManager.viewportWindow || window;
533
566
  boundaries = {
534
567
  top: 0 - (offsetParentRect.top - scrollTop),
@@ -30,6 +30,7 @@ const removeResizeListener = (el, fn) => {
30
30
  el[cacheKey].splice(el[cacheKey].indexOf(fn), 1);
31
31
  if (!el[cacheKey].length) {
32
32
  el.__ro__.disconnect();
33
+ delete el.__ro__;
33
34
  }
34
35
  };
35
36
  export {
@@ -24,6 +24,8 @@ class Touch {
24
24
  this.screenY = pos.screenY + deltaY;
25
25
  this.clientX = pos.clientX + deltaX;
26
26
  this.clientY = pos.clientY + deltaY;
27
+ this.offsetX = pos.offsetX + deltaX;
28
+ this.offsetY = pos.offsetY + deltaY;
27
29
  }
28
30
  }
29
31
  const TouchList = () => {
@@ -69,7 +71,8 @@ const onMouse = (touchType) => (ev) => {
69
71
  if (ev.type === "mousedown" || !mouseTarget) {
70
72
  mouseTarget = ev.target;
71
73
  }
72
- if ((eventTarget = closest(mouseTarget, "[data-tiny-touch-simulate-container]")) && eventTarget.dispatchEvent) {
74
+ eventTarget = closest(mouseTarget, "[data-tiny-touch-simulate-container]");
75
+ if (eventTarget && eventTarget.dispatchEvent) {
73
76
  triggerTouch(touchType, ev);
74
77
  }
75
78
  if (ev.type === "mouseup") {
@@ -120,7 +120,7 @@ class Node {
120
120
  });
121
121
  const isLeafKey = ((_b = (_a = this.store) == null ? void 0 : _a.props) == null ? void 0 : _b.isLeaf) || defaultIsLeafKey;
122
122
  this.isLeaf = !!(this.data && this.data[isLeafKey]);
123
- this.loaded = false;
123
+ this.loaded = this.isLeaf;
124
124
  this.loading = false;
125
125
  this.childNodes = [];
126
126
  this.level = this.parent ? this.parent.level + 1 : 0;
@@ -216,7 +216,7 @@ class Node {
216
216
  };
217
217
  if (!(child instanceof Node)) {
218
218
  if (!batch) {
219
- const children = this.getChildren(true);
219
+ const children = this.getChildren(true) || [];
220
220
  if (!~children.indexOf(child.data)) {
221
221
  insertNode({ arr: children, index, item: child.data });
222
222
  }