@opentinyvue/vue-grid-toolbar 3.21.0 → 3.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.
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 { resolveComponent, openBlock, createBlock, withCtx, createVNode, createTextVNode, toDisplayString, createElementVNode, createElementBlock, createCommentVNode, normalizeClass, resolveDynamicComponent, Fragment, renderList, resolveDirective, withDirectives, vShow } from 'vue';
26
24
  import Tree from '@opentinyvue/vue-tree';
27
25
  import Split from '@opentinyvue/vue-split';
@@ -33,7 +31,7 @@ import Dropdown from '@opentinyvue/vue-dropdown';
33
31
  import DropdownMenu from '@opentinyvue/vue-dropdown-menu';
34
32
  import DropdownItem from '@opentinyvue/vue-dropdown-item';
35
33
  import Tooltip from '@opentinyvue/vue-tooltip';
36
- import Clickoutside from '@opentinyvue/vue-renderless/common/deps/clickoutside';
34
+ import { Clickoutside } from '@opentinyvue/vue-directive';
37
35
  import '@opentinyvue/vue-theme/grid-toolbar/index.css';
38
36
 
39
37
  function _createForOfIteratorHelperLoose(r, e) {
@@ -74,7 +72,7 @@ function _objectWithoutPropertiesLoose(r, e) {
74
72
  if (null == r) return {};
75
73
  var t2 = {};
76
74
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
77
- if (e.includes(n)) continue;
75
+ if (-1 !== e.indexOf(n)) continue;
78
76
  t2[n] = r[n];
79
77
  }
80
78
  return t2;
@@ -116,7 +114,7 @@ function setStorage(storageKey, valueObj, storageType, vm, eventName) {
116
114
  function generateId() {
117
115
  var now = /* @__PURE__ */ new Date();
118
116
  var suf = /GMT[-+]\d+/.exec(now.toString())[0].replace(/\+/, "E").replace(/-/, "W").replace(/0/g, "");
119
- var name = format(now, "yyyy-MM-dd hh:mm:ss.SSS");
117
+ var name = formatDateByPattern(now, "yyyy-MM-dd hh:mm:ss.SSS");
120
118
  return {
121
119
  id: now.getTime() + suf,
122
120
  name
@@ -2068,6 +2066,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
2068
2066
  default: null
2069
2067
  }
2070
2068
  },
2069
+ emits: ["delete-template", "input", "saveSettings", "resetSettings", "cancelSettings", "showModal"],
2071
2070
  props: _extends({}, $props, {
2072
2071
  data: {
2073
2072
  type: Array,
@@ -3634,11 +3633,11 @@ function _sfc_render(_ctx, _cache, $props2, $setup, $data, $options) {
3634
3633
  )) : createCommentVNode("v-if", true), column.children ? (openBlock(), createElementBlock("ul", _hoisted_36, [(openBlock(true), createElementBlock(
3635
3634
  Fragment,
3636
3635
  null,
3637
- renderList(column.children, function(column2, index2) {
3636
+ renderList(column.children, function(columnLi, indexLi) {
3638
3637
  return withDirectives((openBlock(), createElementBlock("li", {
3639
- key: column2.property + index2,
3640
- class: normalizeClass([column2.fixed, _ctx.getRowClassName(column2)]),
3641
- "data-row": column2.property
3638
+ key: columnLi.property + indexLi,
3639
+ class: normalizeClass([columnLi.fixed, _ctx.getRowClassName(columnLi)]),
3640
+ "data-row": columnLi.property
3642
3641
  }, [createElementVNode("div", _hoisted_38, [createElementVNode(
3643
3642
  "p",
3644
3643
  {
@@ -3651,11 +3650,11 @@ function _sfc_render(_ctx, _cache, $props2, $setup, $data, $options) {
3651
3650
  })
3652
3651
  },
3653
3652
  [createVNode(_component_title_render, {
3654
- column: column2
3653
+ column: columnLi
3655
3654
  }, null, 8, ["column"])],
3656
3655
  32
3657
3656
  /* NEED_HYDRATION */
3658
- )])], 10, _hoisted_37)), [[vShow, column2.visible]]);
3657
+ )])], 10, _hoisted_37)), [[vShow, columnLi.visible]]);
3659
3658
  }),
3660
3659
  128
3661
3660
  /* KEYED_FRAGMENT */
@@ -4253,7 +4252,7 @@ var GridToolbar = defineComponent({
4253
4252
  var id = this.id, resizableOpts2 = this.resizableOpts;
4254
4253
  if (resizableOpts2.storage) {
4255
4254
  var width = this.getStorageMap(resizableOpts2.storageKey)[id] || {};
4256
- {
4255
+ if (width) {
4257
4256
  var widthSet = {};
4258
4257
  for (var key in width) {
4259
4258
  if (Object.prototype.hasOwnProperty.call(width, key)) {
@@ -4563,7 +4562,7 @@ var GridToolbar = defineComponent({
4563
4562
  }
4564
4563
  }
4565
4564
  });
4566
- var version = "3.21.0";
4565
+ var version = "3.22.0";
4567
4566
  GridToolbar.install = function(Vue) {
4568
4567
  Vue.component(GridToolbar.name, GridToolbar);
4569
4568
  };
package/package.json CHANGED
@@ -1,43 +1,45 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-grid-toolbar",
3
3
  "type": "module",
4
- "version": "3.21.0",
4
+ "version": "3.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": "~3.21.0",
12
- "@opentinyvue/vue-button": "~3.21.0",
13
- "@opentinyvue/vue-checkbox": "~3.21.0",
14
- "@opentinyvue/vue-checkbox-group": "~3.21.0",
15
- "@opentinyvue/vue-col": "~3.21.0",
16
- "@opentinyvue/vue-common": "~3.21.0",
17
- "@opentinyvue/vue-dialog-box": "~3.21.0",
18
- "@opentinyvue/vue-dropdown": "~3.21.0",
19
- "@opentinyvue/vue-dropdown-item": "~3.21.0",
20
- "@opentinyvue/vue-dropdown-menu": "~3.21.0",
21
- "@opentinyvue/vue-grid": "~3.21.0",
22
- "@opentinyvue/vue-icon": "~3.21.0",
23
- "@opentinyvue/vue-input": "~3.21.0",
24
- "@opentinyvue/vue-layout": "~3.21.0",
25
- "@opentinyvue/vue-locale": "~3.21.0",
26
- "@opentinyvue/vue-modal": "~3.21.0",
27
- "@opentinyvue/vue-option": "~3.21.0",
28
- "@opentinyvue/vue-popover": "~3.21.0",
29
- "@opentinyvue/vue-radio": "~3.21.0",
30
- "@opentinyvue/vue-radio-group": "~3.21.0",
31
- "@opentinyvue/vue-renderless": "~3.21.0",
32
- "@opentinyvue/vue-row": "~3.21.0",
33
- "@opentinyvue/vue-search": "~3.21.0",
34
- "@opentinyvue/vue-select": "~3.21.0",
35
- "@opentinyvue/vue-split": "~3.21.0",
36
- "@opentinyvue/vue-tab-item": "~3.21.0",
37
- "@opentinyvue/vue-tabs": "~3.21.0",
38
- "@opentinyvue/vue-theme": "~3.21.0",
39
- "@opentinyvue/vue-tooltip": "~3.21.0",
40
- "@opentinyvue/vue-tree": "~3.21.0"
11
+ "@opentinyvue/utils": "~3.22.0",
12
+ "@opentinyvue/vue-alert": "~3.22.0",
13
+ "@opentinyvue/vue-button": "~3.22.0",
14
+ "@opentinyvue/vue-checkbox": "~3.22.0",
15
+ "@opentinyvue/vue-checkbox-group": "~3.22.0",
16
+ "@opentinyvue/vue-col": "~3.22.0",
17
+ "@opentinyvue/vue-common": "~3.22.0",
18
+ "@opentinyvue/vue-dialog-box": "~3.22.0",
19
+ "@opentinyvue/vue-directive": "~3.22.0",
20
+ "@opentinyvue/vue-dropdown": "~3.22.0",
21
+ "@opentinyvue/vue-dropdown-item": "~3.22.0",
22
+ "@opentinyvue/vue-dropdown-menu": "~3.22.0",
23
+ "@opentinyvue/vue-grid": "~3.22.0",
24
+ "@opentinyvue/vue-icon": "~3.22.0",
25
+ "@opentinyvue/vue-input": "~3.22.0",
26
+ "@opentinyvue/vue-layout": "~3.22.0",
27
+ "@opentinyvue/vue-locale": "~3.22.0",
28
+ "@opentinyvue/vue-modal": "~3.22.0",
29
+ "@opentinyvue/vue-option": "~3.22.0",
30
+ "@opentinyvue/vue-popover": "~3.22.0",
31
+ "@opentinyvue/vue-radio": "~3.22.0",
32
+ "@opentinyvue/vue-radio-group": "~3.22.0",
33
+ "@opentinyvue/vue-renderless": "~3.22.0",
34
+ "@opentinyvue/vue-row": "~3.22.0",
35
+ "@opentinyvue/vue-search": "~3.22.0",
36
+ "@opentinyvue/vue-select": "~3.22.0",
37
+ "@opentinyvue/vue-split": "~3.22.0",
38
+ "@opentinyvue/vue-tab-item": "~3.22.0",
39
+ "@opentinyvue/vue-tabs": "~3.22.0",
40
+ "@opentinyvue/vue-theme": "~3.22.0",
41
+ "@opentinyvue/vue-tooltip": "~3.22.0",
42
+ "@opentinyvue/vue-tree": "~3.22.0"
41
43
  },
42
44
  "types": "index.d.ts",
43
45
  "scripts": {
package/src/index.d.ts CHANGED
@@ -184,8 +184,8 @@ declare const _default: hooks.DefineComponent<{
184
184
  tiny_theme: StringConstructor;
185
185
  tiny_chart_theme: ObjectConstructor;
186
186
  }>>, {
187
- tiny_mode_root: boolean;
188
187
  loading: boolean;
188
+ tiny_mode_root: boolean;
189
189
  refresh: boolean | Record<string, any>;
190
190
  setting: boolean | Record<string, any>;
191
191
  resizable: boolean | Record<string, any>;