@opentinyvue/vue-grid-toolbar 2.21.0 → 2.22.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 (2) hide show
  1. package/lib/index.js +23 -21
  2. package/package.json +33 -31
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { isNumber } from '@opentinyvue/vue-renderless/common/type';
1
+ import { extend, isNumber, formatDateByPattern } from '@opentinyvue/utils';
2
2
  import { IconSave, IconEdit, IconDel, IconEyeopen, IconEyeclose, IconUnlock, IconLeftFrozen, IconRightFrozen, IconLock, IconMinus, IconDescending, IconAscending, IconClose, IconChevronRight, iconFullscreen, iconMinscreen } from '@opentinyvue/vue-icon';
3
3
  import { defineComponent, $props, appProperties, directive, useDefer, isVue2, $prefix, hooks, h } from '@opentinyvue/vue-common';
4
4
  import { find as find$1, toStringJSON, toJSONString, isPlainObject, isEmpty } from '@opentinyvue/vue-renderless/grid/static/';
@@ -20,8 +20,6 @@ import Col from '@opentinyvue/vue-col';
20
20
  import DialogBox from '@opentinyvue/vue-dialog-box';
21
21
  import Popover from '@opentinyvue/vue-popover';
22
22
  import Radio from '@opentinyvue/vue-radio';
23
- import { format } from '@opentinyvue/vue-renderless/common/date';
24
- import { extend } from '@opentinyvue/vue-renderless/common/object';
25
23
  import Tree from '@opentinyvue/vue-tree';
26
24
  import Split from '@opentinyvue/vue-split';
27
25
  import Checkbox from '@opentinyvue/vue-checkbox';
@@ -32,7 +30,7 @@ import Dropdown from '@opentinyvue/vue-dropdown';
32
30
  import DropdownMenu from '@opentinyvue/vue-dropdown-menu';
33
31
  import DropdownItem from '@opentinyvue/vue-dropdown-item';
34
32
  import Tooltip from '@opentinyvue/vue-tooltip';
35
- import Clickoutside from '@opentinyvue/vue-renderless/common/deps/clickoutside';
33
+ import { Clickoutside } from '@opentinyvue/vue-directive';
36
34
  import '@opentinyvue/vue-theme/grid-toolbar/index.css';
37
35
 
38
36
  function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
@@ -70,7 +68,7 @@ function _objectWithoutPropertiesLoose2(r, e) {
70
68
  if (null == r) return {};
71
69
  var t2 = {};
72
70
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
73
- if (e.includes(n)) continue;
71
+ if (-1 !== e.indexOf(n)) continue;
74
72
  t2[n] = r[n];
75
73
  }
76
74
  return t2;
@@ -112,7 +110,7 @@ function setStorage(storageKey, valueObj, storageType, vm, eventName) {
112
110
  function generateId() {
113
111
  var now = /* @__PURE__ */ new Date();
114
112
  var suf = /GMT[-+]\d+/.exec(now.toString())[0].replace(/\+/, "E").replace(/-/, "W").replace(/0/g, "");
115
- var name = format(now, "yyyy-MM-dd hh:mm:ss.SSS");
113
+ var name = formatDateByPattern(now, "yyyy-MM-dd hh:mm:ss.SSS");
116
114
  return {
117
115
  id: now.getTime() + suf,
118
116
  name
@@ -1350,8 +1348,8 @@ function _objectWithoutProperties(e, t2) {
1350
1348
  if (null == e) return {};
1351
1349
  var o, r, i = _objectWithoutPropertiesLoose(e, t2);
1352
1350
  if (Object.getOwnPropertySymbols) {
1353
- var s = Object.getOwnPropertySymbols(e);
1354
- for (r = 0; r < s.length; r++) o = s[r], t2.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
1351
+ var n = Object.getOwnPropertySymbols(e);
1352
+ for (r = 0; r < n.length; r++) o = n[r], -1 === t2.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
1355
1353
  }
1356
1354
  return i;
1357
1355
  }
@@ -1359,7 +1357,7 @@ function _objectWithoutPropertiesLoose(r, e) {
1359
1357
  if (null == r) return {};
1360
1358
  var t2 = {};
1361
1359
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
1362
- if (e.includes(n)) continue;
1360
+ if (-1 !== e.indexOf(n)) continue;
1363
1361
  t2[n] = r[n];
1364
1362
  }
1365
1363
  return t2;
@@ -1838,6 +1836,7 @@ var __vue2_script = defineComponent({
1838
1836
  default: null
1839
1837
  }
1840
1838
  },
1839
+ emits: ["delete-template", "input", "saveSettings", "resetSettings", "cancelSettings", "showModal"],
1841
1840
  props: _extends({}, $props, {
1842
1841
  data: {
1843
1842
  type: Array,
@@ -2132,8 +2131,11 @@ var __vue2_script = defineComponent({
2132
2131
  this.hideOrShowColumns(false);
2133
2132
  }
2134
2133
  },
2135
- checkNode: function checkNode(node, data6, checked) {
2136
- node.visible = checked;
2134
+ // 勿同步,tree组件check事件参数不一致
2135
+ checkNode: function checkNode(node, data6) {
2136
+ var _data$checkedNodes;
2137
+ var isCheck = data6 == null ? void 0 : (_data$checkedNodes = data6.checkedNodes) == null ? void 0 : _data$checkedNodes.includes(node);
2138
+ node.visible = isCheck;
2137
2139
  if (node.children && Array.isArray(node.children)) {
2138
2140
  node.children.forEach(function(item) {
2139
2141
  item.visible = node.visible;
@@ -3114,18 +3116,18 @@ var render2 = function render3() {
3114
3116
  return _vm.hiddenColumn(column.property);
3115
3117
  }
3116
3118
  }
3117
- }, [_c("icon-close")], 1) : _vm._e()]) : _vm._e(), column.children ? _c("ul", _vm._l(column.children, function(column2, index2) {
3119
+ }, [_c("icon-close")], 1) : _vm._e()]) : _vm._e(), column.children ? _c("ul", _vm._l(column.children, function(columnLi, indexLi) {
3118
3120
  return _c("li", {
3119
3121
  directives: [{
3120
3122
  name: "show",
3121
3123
  rawName: "v-show",
3122
- value: column2.visible,
3123
- expression: "column.visible"
3124
+ value: columnLi.visible,
3125
+ expression: "columnLi.visible"
3124
3126
  }],
3125
- key: column2.property + index2,
3126
- class: [column2.fixed, _vm.getRowClassName(column2)],
3127
+ key: columnLi.property + indexLi,
3128
+ class: [columnLi.fixed, _vm.getRowClassName(columnLi)],
3127
3129
  attrs: {
3128
- "data-row": column2.property
3130
+ "data-row": columnLi.property
3129
3131
  }
3130
3132
  }, [_c("div", {
3131
3133
  staticClass: "column-container"
@@ -3137,14 +3139,14 @@ var render2 = function render3() {
3137
3139
  }
3138
3140
  }, [_c("title-render", {
3139
3141
  attrs: {
3140
- "column": column2
3142
+ "column": columnLi
3141
3143
  }
3142
3144
  })], 1)])]);
3143
3145
  }), 0) : _vm._e()])]);
3144
3146
  }), 0)])];
3145
3147
  },
3146
3148
  proxy: true
3147
- }], null, false, 1239171024),
3149
+ }], null, false, 3162414192),
3148
3150
  model: {
3149
3151
  value: _vm.splitVal,
3150
3152
  callback: function callback($$v) {
@@ -3718,7 +3720,7 @@ var GridToolbar = defineComponent({
3718
3720
  var id = this.id, resizableOpts2 = this.resizableOpts;
3719
3721
  if (resizableOpts2.storage) {
3720
3722
  var width = this.getStorageMap(resizableOpts2.storageKey)[id] || {};
3721
- {
3723
+ if (width) {
3722
3724
  var widthSet = {};
3723
3725
  for (var key in width) {
3724
3726
  if (Object.prototype.hasOwnProperty.call(width, key)) {
@@ -4028,7 +4030,7 @@ var GridToolbar = defineComponent({
4028
4030
  }
4029
4031
  }
4030
4032
  });
4031
- var version = "2.21.0";
4033
+ var version = "2.undefined";
4032
4034
  GridToolbar.install = function(Vue) {
4033
4035
  Vue.component(GridToolbar.name, GridToolbar);
4034
4036
  };
package/package.json CHANGED
@@ -1,43 +1,45 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-grid-toolbar",
3
3
  "type": "module",
4
- "version": "2.21.0",
4
+ "version": "2.22.1",
5
5
  "description": "",
6
6
  "license": "MIT",
7
7
  "sideEffects": false,
8
8
  "main": "./lib/index.js",
9
9
  "module": "./lib/index.js",
10
10
  "dependencies": {
11
- "@opentinyvue/vue-alert": "~2.21.0",
12
- "@opentinyvue/vue-button": "~2.21.0",
13
- "@opentinyvue/vue-checkbox": "~2.21.0",
14
- "@opentinyvue/vue-checkbox-group": "~2.21.0",
15
- "@opentinyvue/vue-col": "~2.21.0",
16
- "@opentinyvue/vue-common": "~2.21.0",
17
- "@opentinyvue/vue-dialog-box": "~2.21.0",
18
- "@opentinyvue/vue-dropdown": "~2.21.0",
19
- "@opentinyvue/vue-dropdown-item": "~2.21.0",
20
- "@opentinyvue/vue-dropdown-menu": "~2.21.0",
21
- "@opentinyvue/vue-grid": "~2.21.0",
22
- "@opentinyvue/vue-icon": "~2.21.0",
23
- "@opentinyvue/vue-input": "~2.21.0",
24
- "@opentinyvue/vue-layout": "~2.21.0",
25
- "@opentinyvue/vue-locale": "~2.21.0",
26
- "@opentinyvue/vue-modal": "~2.21.0",
27
- "@opentinyvue/vue-option": "~2.21.0",
28
- "@opentinyvue/vue-popover": "~2.21.0",
29
- "@opentinyvue/vue-radio": "~2.21.0",
30
- "@opentinyvue/vue-radio-group": "~2.21.0",
31
- "@opentinyvue/vue-renderless": "~3.21.0",
32
- "@opentinyvue/vue-row": "~2.21.0",
33
- "@opentinyvue/vue-search": "~2.21.0",
34
- "@opentinyvue/vue-select": "~2.21.0",
35
- "@opentinyvue/vue-split": "~2.21.0",
36
- "@opentinyvue/vue-tab-item": "~2.21.0",
37
- "@opentinyvue/vue-tabs": "~2.21.0",
38
- "@opentinyvue/vue-theme": "~3.21.0",
39
- "@opentinyvue/vue-tooltip": "~2.21.0",
40
- "@opentinyvue/vue-tree": "~2.21.0"
11
+ "@opentinyvue/utils": "~3.22.0",
12
+ "@opentinyvue/vue-alert": "~2.22.0",
13
+ "@opentinyvue/vue-button": "~2.22.0",
14
+ "@opentinyvue/vue-checkbox": "~2.22.0",
15
+ "@opentinyvue/vue-checkbox-group": "~2.22.0",
16
+ "@opentinyvue/vue-col": "~2.22.0",
17
+ "@opentinyvue/vue-common": "~2.22.0",
18
+ "@opentinyvue/vue-dialog-box": "~2.22.0",
19
+ "@opentinyvue/vue-directive": "~2.22.0",
20
+ "@opentinyvue/vue-dropdown": "~2.22.0",
21
+ "@opentinyvue/vue-dropdown-item": "~2.22.0",
22
+ "@opentinyvue/vue-dropdown-menu": "~2.22.0",
23
+ "@opentinyvue/vue-grid": "~2.22.0",
24
+ "@opentinyvue/vue-icon": "~2.22.0",
25
+ "@opentinyvue/vue-input": "~2.22.0",
26
+ "@opentinyvue/vue-layout": "~2.22.0",
27
+ "@opentinyvue/vue-locale": "~2.22.0",
28
+ "@opentinyvue/vue-modal": "~2.22.0",
29
+ "@opentinyvue/vue-option": "~2.22.0",
30
+ "@opentinyvue/vue-popover": "~2.22.0",
31
+ "@opentinyvue/vue-radio": "~2.22.0",
32
+ "@opentinyvue/vue-radio-group": "~2.22.0",
33
+ "@opentinyvue/vue-renderless": "~3.22.0",
34
+ "@opentinyvue/vue-row": "~2.22.0",
35
+ "@opentinyvue/vue-search": "~2.22.0",
36
+ "@opentinyvue/vue-select": "~2.22.0",
37
+ "@opentinyvue/vue-split": "~2.22.0",
38
+ "@opentinyvue/vue-tab-item": "~2.22.0",
39
+ "@opentinyvue/vue-tabs": "~2.22.0",
40
+ "@opentinyvue/vue-theme": "~3.22.0",
41
+ "@opentinyvue/vue-tooltip": "~2.22.0",
42
+ "@opentinyvue/vue-tree": "~2.22.0"
41
43
  },
42
44
  "types": "index.d.ts",
43
45
  "scripts": {