vxe-pc-ui 4.16.4 → 4.16.6

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 (64) hide show
  1. package/dist/all.esm.js +50 -30
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/icon/style.css +1 -1
  5. package/es/icon-picker/src/icon-picker.js +15 -17
  6. package/es/icon-picker/style.css +3 -8
  7. package/es/icon-picker/style.min.css +1 -1
  8. package/es/list/src/list.js +21 -9
  9. package/es/menu/style.css +4 -2
  10. package/es/menu/style.min.css +1 -1
  11. package/es/style.css +1 -1
  12. package/es/style.min.css +1 -1
  13. package/es/tree/src/tree.js +12 -2
  14. package/es/ui/index.js +1 -1
  15. package/es/ui/src/log.js +1 -1
  16. package/es/vxe-icon-picker/style.css +3 -8
  17. package/es/vxe-icon-picker/style.min.css +1 -1
  18. package/es/vxe-menu/style.css +4 -2
  19. package/es/vxe-menu/style.min.css +1 -1
  20. package/lib/icon/style/style.css +1 -1
  21. package/lib/icon/style/style.min.css +1 -1
  22. package/lib/icon-picker/src/icon-picker.js +39 -45
  23. package/lib/icon-picker/src/icon-picker.min.js +1 -1
  24. package/lib/icon-picker/style/style.css +3 -8
  25. package/lib/icon-picker/style/style.min.css +1 -1
  26. package/lib/index.umd.js +74 -58
  27. package/lib/index.umd.min.js +1 -1
  28. package/lib/list/src/list.js +21 -9
  29. package/lib/list/src/list.min.js +1 -1
  30. package/lib/menu/style/style.css +4 -2
  31. package/lib/menu/style/style.min.css +1 -1
  32. package/lib/style.css +1 -1
  33. package/lib/style.min.css +1 -1
  34. package/lib/tree/src/tree.js +12 -2
  35. package/lib/tree/src/tree.min.js +1 -1
  36. package/lib/ui/index.js +1 -1
  37. package/lib/ui/index.min.js +1 -1
  38. package/lib/ui/src/log.js +1 -1
  39. package/lib/ui/src/log.min.js +1 -1
  40. package/lib/vxe-icon-picker/style/style.css +3 -8
  41. package/lib/vxe-icon-picker/style/style.min.css +1 -1
  42. package/lib/vxe-menu/style/style.css +4 -2
  43. package/lib/vxe-menu/style/style.min.css +1 -1
  44. package/package.json +1 -1
  45. package/packages/icon-picker/src/icon-picker.ts +14 -16
  46. package/packages/list/src/list.ts +25 -13
  47. package/packages/tree/src/tree.ts +12 -2
  48. package/styles/components/icon-picker.scss +3 -8
  49. package/styles/components/menu.scss +4 -2
  50. package/types/components/icon-picker.d.ts +7 -3
  51. package/types/components/list.d.ts +12 -0
  52. package/types/components/tree.d.ts +12 -0
  53. /package/es/icon/{iconfont.1783654856324.ttf → iconfont.1783838735018.ttf} +0 -0
  54. /package/es/icon/{iconfont.1783654856324.woff → iconfont.1783838735018.woff} +0 -0
  55. /package/es/icon/{iconfont.1783654856324.woff2 → iconfont.1783838735018.woff2} +0 -0
  56. /package/es/{iconfont.1783654856324.ttf → iconfont.1783838735018.ttf} +0 -0
  57. /package/es/{iconfont.1783654856324.woff → iconfont.1783838735018.woff} +0 -0
  58. /package/es/{iconfont.1783654856324.woff2 → iconfont.1783838735018.woff2} +0 -0
  59. /package/lib/icon/style/{iconfont.1783654856324.ttf → iconfont.1783838735018.ttf} +0 -0
  60. /package/lib/icon/style/{iconfont.1783654856324.woff → iconfont.1783838735018.woff} +0 -0
  61. /package/lib/icon/style/{iconfont.1783654856324.woff2 → iconfont.1783838735018.woff2} +0 -0
  62. /package/lib/{iconfont.1783654856324.ttf → iconfont.1783838735018.ttf} +0 -0
  63. /package/lib/{iconfont.1783654856324.woff → iconfont.1783838735018.woff} +0 -0
  64. /package/lib/{iconfont.1783654856324.woff2 → iconfont.1783838735018.woff2} +0 -0
package/dist/all.esm.js CHANGED
@@ -81,7 +81,7 @@ function checkDynamic() {
81
81
  }
82
82
 
83
83
  const { log } = VxeUI;
84
- const uiVersion = `ui v${"4.16.4"}`;
84
+ const uiVersion = `ui v${"4.16.6"}`;
85
85
  function createComponentLog(name) {
86
86
  const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
87
87
  const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
@@ -95,7 +95,7 @@ function createComponentLog(name) {
95
95
  const warnLog$h = log.create('warn', uiVersion);
96
96
  log.create('error', uiVersion);
97
97
 
98
- const version = "4.16.4";
98
+ const version = "4.16.6";
99
99
  VxeUI.uiVersion = version;
100
100
  VxeUI.dynamicApp = dynamicApp;
101
101
  function config(options) {
@@ -7248,7 +7248,12 @@ var VxeListComponent = defineVxeComponent({
7248
7248
  const el = refElem.value;
7249
7249
  if (el) {
7250
7250
  const parentEl = el.parentElement;
7251
- reactData.parentHeight = parentEl ? parentEl.clientHeight : 0;
7251
+ let parentHeight = 0;
7252
+ if (parentEl) {
7253
+ const parentStyle = getComputedStyle(parentEl);
7254
+ parentHeight = parentEl.clientHeight - Math.ceil(XEUtils.toNumber(parentStyle.paddingLeft) + XEUtils.toNumber(parentStyle.paddingRight));
7255
+ }
7256
+ reactData.parentHeight = parentHeight;
7252
7257
  updateHeight();
7253
7258
  if (el.clientWidth && el.clientHeight) {
7254
7259
  return computeScrollLoad();
@@ -7940,7 +7945,7 @@ var VxeListComponent = defineVxeComponent({
7940
7945
  emitCheckboxMode(value);
7941
7946
  return updateCheckboxStatus();
7942
7947
  };
7943
- const getCheckboxRows = () => {
7948
+ const getCheckboxRecords = () => {
7944
7949
  const { updateCheckboxFlag } = reactData;
7945
7950
  const { selectCheckboxMaps } = internalData;
7946
7951
  const rowList = [];
@@ -8288,7 +8293,8 @@ var VxeListComponent = defineVxeComponent({
8288
8293
  clearRadioRow,
8289
8294
  setCheckboxRow,
8290
8295
  setCheckboxRowByKey,
8291
- getCheckboxRows,
8296
+ getCheckboxRecords,
8297
+ getCheckboxRows: getCheckboxRecords,
8292
8298
  getCheckboxRowKeys,
8293
8299
  clearCheckboxRow,
8294
8300
  setAllCheckboxRow,
@@ -8385,6 +8391,12 @@ var VxeListComponent = defineVxeComponent({
8385
8391
  isRemoveByRow(row) {
8386
8392
  const rowid = getRowId(row);
8387
8393
  return !!reactData.removeRowFlag && !!internalData.removeRowMaps[rowid];
8394
+ },
8395
+ getRecordset() {
8396
+ return {
8397
+ insertRecords: $xeList.getInsertRecords(),
8398
+ removeRecords: $xeList.getRemoveRecords()
8399
+ };
8388
8400
  }
8389
8401
  };
8390
8402
  const listPrivateMethods = {
@@ -8689,6 +8701,12 @@ var VxeListComponent = defineVxeComponent({
8689
8701
  isCheckboxChecked = !!(updateCheckboxFlag && selectCheckboxMaps[rowid]);
8690
8702
  }
8691
8703
  const ctVNs = [];
8704
+ if (showRadio) {
8705
+ ctVNs.push(renderRadio(row, rowid, isRadioChecked));
8706
+ }
8707
+ if (showCheckbox) {
8708
+ ctVNs.push(renderCheckbox(row, rowid, isCheckboxChecked));
8709
+ }
8692
8710
  let isDragDisabled = false;
8693
8711
  if (isDrag && keyField && (!visibleMethod || visibleMethod(rowParams))) {
8694
8712
  const handleOns = {};
@@ -8712,12 +8730,6 @@ var VxeListComponent = defineVxeComponent({
8712
8730
  ])
8713
8731
  ]));
8714
8732
  }
8715
- if (showRadio) {
8716
- ctVNs.push(renderRadio(row, rowid, isRadioChecked));
8717
- }
8718
- if (showCheckbox) {
8719
- ctVNs.push(renderCheckbox(row, rowid, isCheckboxChecked));
8720
- }
8721
8733
  ctVNs.push(h('div', {
8722
8734
  key: 'ct5',
8723
8735
  class: 'vxe-list--row-content'
@@ -26031,7 +26043,7 @@ function createReactData$b() {
26031
26043
  isAniVisible: false,
26032
26044
  isActivated: false,
26033
26045
  searchValue: '',
26034
- iconGroups: []
26046
+ iconList: []
26035
26047
  };
26036
26048
  }
26037
26049
  function createInternalData$a() {
@@ -26163,9 +26175,9 @@ var VxeIconPickerComponent = defineVxeComponent({
26163
26175
  });
26164
26176
  const computeWrapperStyle = computed(() => {
26165
26177
  const popupOpts = computePopupOpts.value;
26166
- const { chunkSize, height, maxHeight } = popupOpts;
26178
+ const { chunkSize, height, chunkWidth, maxHeight } = popupOpts;
26167
26179
  const stys = {
26168
- '--vxe-ui-icon-picker-item-width': `${100 / (chunkSize || 4)}%`
26180
+ '--vxe-ui-icon-picker-item-width': chunkWidth ? toCssUnit(chunkWidth) : `${100 / (chunkSize || 4)}%`
26169
26181
  };
26170
26182
  if (height) {
26171
26183
  stys['--vxe-ui-icon-picker-panel-height'] = toCssUnit(height);
@@ -26217,7 +26229,7 @@ var VxeIconPickerComponent = defineVxeComponent({
26217
26229
  const panelElem = refOptionPanel.value;
26218
26230
  const btnTransfer = computeBtnTransfer.value;
26219
26231
  const popupOpts = computePopupOpts.value;
26220
- const { width, transfer } = popupOpts;
26232
+ const { width } = popupOpts;
26221
26233
  const handleStyle = () => {
26222
26234
  const ppObj = updatePanelPlacement(targetElem, panelElem, {
26223
26235
  placement: popupOpts.placement || placement,
@@ -26225,12 +26237,12 @@ var VxeIconPickerComponent = defineVxeComponent({
26225
26237
  teleportTo: btnTransfer
26226
26238
  });
26227
26239
  const panelStyle = Object.assign(ppObj.style, {
26228
- zIndex: panelIndex
26240
+ zIndex: panelIndex,
26241
+ minWidth: undefined
26229
26242
  });
26230
26243
  if (width) {
26231
26244
  Object.assign(panelStyle, {
26232
- width: toCssUnit(width),
26233
- minWidth: transfer ? undefined : toCssUnit(width)
26245
+ width: toCssUnit(width)
26234
26246
  });
26235
26247
  }
26236
26248
  reactData.panelStyle = panelStyle;
@@ -26282,8 +26294,6 @@ var VxeIconPickerComponent = defineVxeComponent({
26282
26294
  const { searchValue } = reactData;
26283
26295
  const filterOpts = computeFilterOpts.value;
26284
26296
  const { filterMethod } = filterOpts;
26285
- const popupOpts = computePopupOpts.value;
26286
- const { chunkSize } = popupOpts;
26287
26297
  const iconList = computeIconList.value;
26288
26298
  let visibleList = iconList;
26289
26299
  if (searchValue) {
@@ -26295,7 +26305,7 @@ var VxeIconPickerComponent = defineVxeComponent({
26295
26305
  return (item.title && `${item.title}`.toLowerCase().indexOf(searchTxt) > -1) || (item.icon && `${item.icon}`.indexOf(searchTxt) > -1);
26296
26306
  });
26297
26307
  }
26298
- reactData.iconGroups = XEUtils.chunk(visibleList, chunkSize || 4);
26308
+ reactData.iconList = visibleList;
26299
26309
  };
26300
26310
  const changeEvent = (evnt, selectValue) => {
26301
26311
  reactData.selectIcon = selectValue;
@@ -26494,18 +26504,18 @@ var VxeIconPickerComponent = defineVxeComponent({
26494
26504
  Object.assign($xeIconPicker, iconPickerMethods);
26495
26505
  const renderIconWrapper = () => {
26496
26506
  const { showIconTitle } = props;
26497
- const { selectIcon, iconGroups } = reactData;
26498
- if (!iconGroups.length) {
26507
+ const { selectIcon, iconList } = reactData;
26508
+ if (!iconList.length) {
26499
26509
  return h('div', {
26500
26510
  class: 'vxe-ico-picker--empty-placeholder'
26501
26511
  }, getI18n$2('vxe.iconPicker.emptyText'));
26502
26512
  }
26503
26513
  return h('div', {
26504
26514
  class: 'vxe-ico-picker--list-wrapper'
26505
- }, iconGroups.map(list => {
26506
- return h('div', {
26515
+ }, [
26516
+ h('div', {
26507
26517
  class: 'vxe-ico-picker--list'
26508
- }, list.map(item => {
26518
+ }, iconList.map(item => {
26509
26519
  const { iconRender } = item;
26510
26520
  const compConf = iconRender ? renderer.get(iconRender.name) : null;
26511
26521
  const iconMethod = compConf ? compConf.renderIconPickerOptionIcon : null;
@@ -26539,8 +26549,8 @@ var VxeIconPickerComponent = defineVxeComponent({
26539
26549
  : renderEmptyElement($xeIconPicker)
26540
26550
  ])
26541
26551
  ]);
26542
- }));
26543
- }));
26552
+ }))
26553
+ ]);
26544
26554
  };
26545
26555
  const renderIconView = () => {
26546
26556
  const { selectIcon } = reactData;
@@ -42218,6 +42228,9 @@ var VxeTreeComponent = defineVxeComponent({
42218
42228
  return nodeKeys;
42219
42229
  },
42220
42230
  getCheckboxNodes() {
42231
+ return $xeTree.getCheckboxRecords();
42232
+ },
42233
+ getCheckboxRecords() {
42221
42234
  const { nodeMaps, selectCheckboxMaps } = internalData;
42222
42235
  const list = [];
42223
42236
  XEUtils.each(selectCheckboxMaps, (item, nodeid) => {
@@ -42622,7 +42635,13 @@ var VxeTreeComponent = defineVxeComponent({
42622
42635
  const nodeid = getNodeId(node);
42623
42636
  return !!reactData.removeNodeFlag && !!internalData.removeNodeMaps[nodeid];
42624
42637
  },
42625
- closeTooltip
42638
+ closeTooltip,
42639
+ getRecordset() {
42640
+ return {
42641
+ insertRecords: $xeTree.getInsertRecords(),
42642
+ removeRecords: $xeTree.getRemoveRecords()
42643
+ };
42644
+ }
42626
42645
  };
42627
42646
  const handleNodeDragEndClearStatus = () => {
42628
42647
  clearNodeDragData();
@@ -43551,9 +43570,9 @@ var VxeTreeComponent = defineVxeComponent({
43551
43570
  ])
43552
43571
  ]
43553
43572
  : []),
43554
- renderDragIcon(node, nodeid),
43555
43573
  renderRadio(node, nodeid, isExistChild, nLevel, isRadioChecked),
43556
43574
  renderCheckbox(node, nodeid, isExistChild, nLevel, isCheckboxChecked, isIndeterminate),
43575
+ renderDragIcon(node, nodeid),
43557
43576
  h('div', {
43558
43577
  class: 'vxe-tree--node-item-inner'
43559
43578
  }, [
@@ -43841,6 +43860,7 @@ var VxeTreeComponent = defineVxeComponent({
43841
43860
  }
43842
43861
  internalData.resizeObserver = resizeObserver;
43843
43862
  }
43863
+ recalculate();
43844
43864
  globalEvents.on($xeTree, 'resize', handleGlobalResizeEvent);
43845
43865
  });
43846
43866
  onBeforeUnmount(() => {