@opentinyvue/vue-grid-toolbar 2.21.0 → 2.22.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 (2) hide show
  1. package/lib/index.js +18 -19
  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,
@@ -3114,18 +3113,18 @@ var render2 = function render3() {
3114
3113
  return _vm.hiddenColumn(column.property);
3115
3114
  }
3116
3115
  }
3117
- }, [_c("icon-close")], 1) : _vm._e()]) : _vm._e(), column.children ? _c("ul", _vm._l(column.children, function(column2, index2) {
3116
+ }, [_c("icon-close")], 1) : _vm._e()]) : _vm._e(), column.children ? _c("ul", _vm._l(column.children, function(columnLi, indexLi) {
3118
3117
  return _c("li", {
3119
3118
  directives: [{
3120
3119
  name: "show",
3121
3120
  rawName: "v-show",
3122
- value: column2.visible,
3123
- expression: "column.visible"
3121
+ value: columnLi.visible,
3122
+ expression: "columnLi.visible"
3124
3123
  }],
3125
- key: column2.property + index2,
3126
- class: [column2.fixed, _vm.getRowClassName(column2)],
3124
+ key: columnLi.property + indexLi,
3125
+ class: [columnLi.fixed, _vm.getRowClassName(columnLi)],
3127
3126
  attrs: {
3128
- "data-row": column2.property
3127
+ "data-row": columnLi.property
3129
3128
  }
3130
3129
  }, [_c("div", {
3131
3130
  staticClass: "column-container"
@@ -3137,14 +3136,14 @@ var render2 = function render3() {
3137
3136
  }
3138
3137
  }, [_c("title-render", {
3139
3138
  attrs: {
3140
- "column": column2
3139
+ "column": columnLi
3141
3140
  }
3142
3141
  })], 1)])]);
3143
3142
  }), 0) : _vm._e()])]);
3144
3143
  }), 0)])];
3145
3144
  },
3146
3145
  proxy: true
3147
- }], null, false, 1239171024),
3146
+ }], null, false, 3162414192),
3148
3147
  model: {
3149
3148
  value: _vm.splitVal,
3150
3149
  callback: function callback($$v) {
@@ -3718,7 +3717,7 @@ var GridToolbar = defineComponent({
3718
3717
  var id = this.id, resizableOpts2 = this.resizableOpts;
3719
3718
  if (resizableOpts2.storage) {
3720
3719
  var width = this.getStorageMap(resizableOpts2.storageKey)[id] || {};
3721
- {
3720
+ if (width) {
3722
3721
  var widthSet = {};
3723
3722
  for (var key in width) {
3724
3723
  if (Object.prototype.hasOwnProperty.call(width, key)) {
@@ -4028,7 +4027,7 @@ var GridToolbar = defineComponent({
4028
4027
  }
4029
4028
  }
4030
4029
  });
4031
- var version = "2.21.0";
4030
+ var version = "2.22.0";
4032
4031
  GridToolbar.install = function(Vue) {
4033
4032
  Vue.component(GridToolbar.name, GridToolbar);
4034
4033
  };
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.0",
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": "~2.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": {