@opentinyvue/vue-grid-select 2.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/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 - present TinyVue Authors.
4
+ Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/index.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Copyright (c) 2022 - present TinyVue Authors.
3
+ * Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license.
6
+ *
7
+ * THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
8
+ * BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
9
+ * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
10
+ *
11
+ */
12
+ import GridSelect from './src/pc.vue';
13
+ export default GridSelect;
package/lib/index.js ADDED
@@ -0,0 +1,178 @@
1
+ import { defineComponent, $prefix, setup } from '@opentinyvue/vue-common';
2
+ import { renderless, api } from '@opentinyvue/vue-renderless/grid-select/vue';
3
+ import Grid from '@opentinyvue/vue-grid';
4
+ import BaseSelect from '@opentinyvue/vue-base-select';
5
+
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;
12
+ }
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
+ }
29
+ }
30
+ return {
31
+ exports: scriptExports,
32
+ options
33
+ };
34
+ }
35
+
36
+ var __vue2_script = defineComponent({
37
+ name: $prefix + "GridSelect",
38
+ components: {
39
+ TinyGrid: Grid,
40
+ TinyBaseSelect: BaseSelect
41
+ },
42
+ props: {
43
+ clearable: Boolean,
44
+ extraQueryParams: {
45
+ type: [Object, String, Boolean, Array, Number],
46
+ default: ""
47
+ },
48
+ filterable: Boolean,
49
+ filterMethod: Function,
50
+ gridOp: {
51
+ type: Object,
52
+ default: function _default() {
53
+ return {};
54
+ }
55
+ },
56
+ initLabel: {
57
+ type: String,
58
+ default: ""
59
+ },
60
+ initQuery: Function,
61
+ modelValue: {},
62
+ multiple: Boolean,
63
+ radioConfig: {
64
+ type: Object,
65
+ default: function _default2() {
66
+ return {
67
+ checkMethod: function checkMethod() {
68
+ return true;
69
+ }
70
+ };
71
+ }
72
+ },
73
+ remote: Boolean,
74
+ remoteConfig: {
75
+ type: Object,
76
+ default: function _default3() {
77
+ return {
78
+ showIcon: false,
79
+ clearData: false,
80
+ autoSearch: false
81
+ };
82
+ }
83
+ },
84
+ remoteMethod: Function,
85
+ reserveKeyword: Boolean,
86
+ selectConfig: {
87
+ type: Object,
88
+ default: function _default4() {
89
+ return {
90
+ checkMethod: function checkMethod() {
91
+ return true;
92
+ }
93
+ };
94
+ }
95
+ },
96
+ textField: {
97
+ type: String,
98
+ default: "label"
99
+ },
100
+ valueField: {
101
+ type: String,
102
+ default: "value"
103
+ }
104
+ },
105
+ setup: function setup$1(props, context) {
106
+ return setup({
107
+ props,
108
+ context,
109
+ renderless,
110
+ api
111
+ });
112
+ }
113
+ });
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", {
119
+ 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
+ }
168
+ }
169
+ var GridSelect = /* @__PURE__ */ function() {
170
+ return __component__.exports;
171
+ }();
172
+ var version = "2.21.0";
173
+ GridSelect.install = function(Vue) {
174
+ Vue.component(GridSelect.name, GridSelect);
175
+ };
176
+ GridSelect.version = version;
177
+
178
+ export { GridSelect as default };
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@opentinyvue/vue-grid-select",
3
+ "version": "2.21.0",
4
+ "description": "",
5
+ "main": "./lib/index.js",
6
+ "module": "./lib/index.js",
7
+ "sideEffects": false,
8
+ "type": "module",
9
+ "dependencies": {
10
+ "@opentinyvue/vue-common": "~2.21.0",
11
+ "@opentinyvue/vue-renderless": "~3.21.0",
12
+ "@opentinyvue/vue-base-select": "~2.21.0",
13
+ "@opentinyvue/vue-grid": "~2.21.0"
14
+ },
15
+ "license": "MIT",
16
+ "types": "index.d.ts",
17
+ "scripts": {
18
+ "build": "pnpm -w build:ui $npm_package_name",
19
+ "//postversion": "pnpm build"
20
+ }
21
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;