@opentinyvue/vue-grid-select 2.21.0 → 3.21.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
@@ -2,38 +2,42 @@ import { defineComponent, $prefix, setup } from '@opentinyvue/vue-common';
2
2
  import { renderless, api } from '@opentinyvue/vue-renderless/grid-select/vue';
3
3
  import Grid from '@opentinyvue/vue-grid';
4
4
  import BaseSelect from '@opentinyvue/vue-base-select';
5
+ import { resolveComponent, openBlock, createBlock, withCtx, createVNode, mergeProps, withModifiers } from 'vue';
5
6
 
6
- function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
7
- var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
8
- if (render) {
9
- options.render = render;
10
- options.staticRenderFns = staticRenderFns;
11
- options._compiled = true;
7
+ function _createForOfIteratorHelperLoose(r, e) {
8
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
9
+ if (t) return (t = t.call(r)).next.bind(t);
10
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
11
+ t && (r = t);
12
+ var o = 0;
13
+ return function() {
14
+ return o >= r.length ? { done: true } : { done: false, value: r[o++] };
15
+ };
12
16
  }
13
- var hook;
14
- if (injectStyles) {
15
- hook = injectStyles;
16
- }
17
- if (hook) {
18
- if (options.functional) {
19
- options._injectStyles = hook;
20
- var originalRender = options.render;
21
- options.render = function renderWithStyleInjection(h, context) {
22
- hook.call(context);
23
- return originalRender(h, context);
24
- };
25
- } else {
26
- var existing = options.beforeCreate;
27
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
28
- }
17
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
18
+ }
19
+ function _unsupportedIterableToArray(r, a) {
20
+ if (r) {
21
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
22
+ var t = {}.toString.call(r).slice(8, -1);
23
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
29
24
  }
30
- return {
31
- exports: scriptExports,
32
- options
33
- };
34
25
  }
26
+ function _arrayLikeToArray(r, a) {
27
+ (null == a || a > r.length) && (a = r.length);
28
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
29
+ return n;
30
+ }
31
+ var _export_sfc = function _export_sfc2(sfc, props) {
32
+ var target = sfc.__vccOpts || sfc;
33
+ for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
34
+ var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
35
+ target[key] = val;
36
+ }
37
+ return target;
38
+ };
35
39
 
36
- var __vue2_script = defineComponent({
40
+ var _sfc_main = defineComponent({
37
41
  name: $prefix + "GridSelect",
38
42
  components: {
39
43
  TinyGrid: Grid,
@@ -111,65 +115,43 @@ var __vue2_script = defineComponent({
111
115
  });
112
116
  }
113
117
  });
114
- var render = function render2() {
115
- var _vm = this;
116
- var _h = _vm.$createElement;
117
- var _c = _vm._self._c || _h;
118
- return _c("tiny-base-select", {
118
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
119
+ var _component_tiny_grid = resolveComponent("tiny-grid");
120
+ var _component_tiny_base_select = resolveComponent("tiny-base-select");
121
+ return openBlock(), createBlock(_component_tiny_base_select, {
119
122
  ref: "baseSelectRef",
120
- staticClass: "tiny-grid-select",
121
- attrs: {
122
- "multiple": _vm.multiple,
123
- "filterable": _vm.filterable,
124
- "filter-method": _vm.filter
125
- },
126
- scopedSlots: _vm._u([{
127
- key: "panel",
128
- fn: function fn() {
129
- return [_c("tiny-grid", _vm._b({
130
- ref: "gridRef",
131
- attrs: {
132
- "auto-resize": "",
133
- "row-id": _vm.valueField,
134
- "select-config": _vm.buildSelectConfig(),
135
- "radio-config": _vm.buildRadioConfig(),
136
- "highlight-current-row": true,
137
- "columns": _vm.state.gridData.columns,
138
- "data": _vm.state.gridData
139
- },
140
- on: {
141
- "select-all": _vm.selectChange,
142
- "select-change": _vm.selectChange,
143
- "radio-change": _vm.radioChange,
144
- "mousedown": function mousedown($event) {
145
- $event.stopPropagation();
146
- }
147
- }
148
- }, "tiny-grid", _vm.gridOp, false))];
149
- },
150
- proxy: true
151
- }]),
152
- model: {
153
- value: _vm.state.value,
154
- callback: function callback($$v) {
155
- _vm.$set(_vm.state, "value", $$v);
156
- },
157
- expression: "state.value"
158
- }
159
- });
160
- };
161
- var staticRenderFns = [];
162
- var __cssModules = {};
163
- var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
164
- function __vue2_injectStyles(context) {
165
- for (var o in __cssModules) {
166
- this[o] = __cssModules[o];
167
- }
123
+ class: "tiny-grid-select",
124
+ modelValue: _ctx.state.value,
125
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = function($event) {
126
+ return _ctx.state.value = $event;
127
+ }),
128
+ multiple: _ctx.multiple,
129
+ filterable: _ctx.filterable,
130
+ "filter-method": _ctx.filter
131
+ }, {
132
+ panel: withCtx(function() {
133
+ return [createVNode(_component_tiny_grid, mergeProps({
134
+ ref: "gridRef",
135
+ "auto-resize": "",
136
+ "row-id": _ctx.valueField,
137
+ "select-config": _ctx.buildSelectConfig(),
138
+ "radio-config": _ctx.buildRadioConfig(),
139
+ "highlight-current-row": true,
140
+ columns: _ctx.state.gridData.columns,
141
+ data: _ctx.state.gridData,
142
+ onSelectAll: _ctx.selectChange,
143
+ onSelectChange: _ctx.selectChange,
144
+ onRadioChange: _ctx.radioChange,
145
+ onMousedown: _cache[0] || (_cache[0] = withModifiers(function() {
146
+ }, ["stop"]))
147
+ }, _ctx.gridOp), null, 16, ["row-id", "select-config", "radio-config", "columns", "data", "onSelectAll", "onSelectChange", "onRadioChange"])];
148
+ }),
149
+ _: 1
150
+ /* STABLE */
151
+ }, 8, ["modelValue", "multiple", "filterable", "filter-method"]);
168
152
  }
169
- var GridSelect = /* @__PURE__ */ function() {
170
- return __component__.exports;
171
- }();
172
- var version = "2.21.0";
153
+ var GridSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
154
+ var version = "3.21.0";
173
155
  GridSelect.install = function(Vue) {
174
156
  Vue.component(GridSelect.name, GridSelect);
175
157
  };
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-grid-select",
3
- "version": "2.21.0",
3
+ "version": "3.21.0",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",
7
7
  "sideEffects": false,
8
8
  "type": "module",
9
9
  "dependencies": {
10
- "@opentinyvue/vue-common": "~2.21.0",
10
+ "@opentinyvue/vue-common": "~3.21.0",
11
11
  "@opentinyvue/vue-renderless": "~3.21.0",
12
- "@opentinyvue/vue-base-select": "~2.21.0",
13
- "@opentinyvue/vue-grid": "~2.21.0"
12
+ "@opentinyvue/vue-base-select": "~3.21.0",
13
+ "@opentinyvue/vue-grid": "~3.21.0"
14
14
  },
15
15
  "license": "MIT",
16
16
  "types": "index.d.ts",
package/src/pc.vue.d.ts CHANGED
@@ -1,2 +1,125 @@
1
- declare const _default: any;
1
+ declare const _default: import("@vue/runtime-core").DefineComponent<{
2
+ clearable: BooleanConstructor;
3
+ extraQueryParams: {
4
+ type: (StringConstructor | BooleanConstructor | ObjectConstructor | ArrayConstructor | NumberConstructor)[];
5
+ default: string;
6
+ };
7
+ filterable: BooleanConstructor;
8
+ filterMethod: FunctionConstructor;
9
+ gridOp: {
10
+ type: ObjectConstructor;
11
+ default: () => {};
12
+ };
13
+ initLabel: {
14
+ type: StringConstructor;
15
+ default: string;
16
+ };
17
+ initQuery: FunctionConstructor;
18
+ modelValue: {};
19
+ multiple: BooleanConstructor;
20
+ radioConfig: {
21
+ type: ObjectConstructor;
22
+ default(): {
23
+ checkMethod(): true;
24
+ };
25
+ };
26
+ remote: BooleanConstructor;
27
+ remoteConfig: {
28
+ type: ObjectConstructor;
29
+ default(): {
30
+ showIcon: boolean;
31
+ clearData: boolean;
32
+ autoSearch: boolean;
33
+ };
34
+ };
35
+ remoteMethod: FunctionConstructor;
36
+ reserveKeyword: BooleanConstructor;
37
+ selectConfig: {
38
+ type: ObjectConstructor;
39
+ default(): {
40
+ checkMethod(): true;
41
+ };
42
+ };
43
+ textField: {
44
+ type: StringConstructor;
45
+ default: string;
46
+ };
47
+ valueField: {
48
+ type: StringConstructor;
49
+ default: string;
50
+ };
51
+ }, {
52
+ t: (this: any, path: any, options?: any) => any;
53
+ vm: any;
54
+ f: (props: any, attrs?: {}) => {};
55
+ a: (attrs: any, filters: any, include: any) => {};
56
+ d: (props: any) => void;
57
+ dp: (props: any) => void;
58
+ gcls: (key: any) => any;
59
+ m: (...cssClasses: any[]) => string;
60
+ }, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
61
+ clearable: BooleanConstructor;
62
+ extraQueryParams: {
63
+ type: (StringConstructor | BooleanConstructor | ObjectConstructor | ArrayConstructor | NumberConstructor)[];
64
+ default: string;
65
+ };
66
+ filterable: BooleanConstructor;
67
+ filterMethod: FunctionConstructor;
68
+ gridOp: {
69
+ type: ObjectConstructor;
70
+ default: () => {};
71
+ };
72
+ initLabel: {
73
+ type: StringConstructor;
74
+ default: string;
75
+ };
76
+ initQuery: FunctionConstructor;
77
+ modelValue: {};
78
+ multiple: BooleanConstructor;
79
+ radioConfig: {
80
+ type: ObjectConstructor;
81
+ default(): {
82
+ checkMethod(): true;
83
+ };
84
+ };
85
+ remote: BooleanConstructor;
86
+ remoteConfig: {
87
+ type: ObjectConstructor;
88
+ default(): {
89
+ showIcon: boolean;
90
+ clearData: boolean;
91
+ autoSearch: boolean;
92
+ };
93
+ };
94
+ remoteMethod: FunctionConstructor;
95
+ reserveKeyword: BooleanConstructor;
96
+ selectConfig: {
97
+ type: ObjectConstructor;
98
+ default(): {
99
+ checkMethod(): true;
100
+ };
101
+ };
102
+ textField: {
103
+ type: StringConstructor;
104
+ default: string;
105
+ };
106
+ valueField: {
107
+ type: StringConstructor;
108
+ default: string;
109
+ };
110
+ }>>, {
111
+ textField: string;
112
+ valueField: string;
113
+ clearable: boolean;
114
+ multiple: boolean;
115
+ remote: boolean;
116
+ remoteConfig: Record<string, any>;
117
+ filterable: boolean;
118
+ reserveKeyword: boolean;
119
+ gridOp: Record<string, any>;
120
+ selectConfig: Record<string, any>;
121
+ radioConfig: Record<string, any>;
122
+ extraQueryParams: string | number | boolean | Record<string, any> | unknown[];
123
+ initLabel: string;
124
+ }, {}>;
2
125
  export default _default;