@opentinyvue/vue-grid-manager 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 +22 -0
- package/index.d.ts +13 -0
- package/lib/index.js +52 -0
- package/package.json +18 -0
- package/src/antd.d.ts +1 -0
- package/src/element-ui.d.ts +1 -0
- package/src/index.d.ts +33 -0
- package/src/iview.d.ts +1 -0
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 GridManager from './src/index';
|
|
13
|
+
export default GridManager;
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { GridAdapter } from "@opentinyvue/vue-grid";
|
|
2
|
+
function useAntd() {
|
|
3
|
+
function handleClearEvent(params, event) {
|
|
4
|
+
if (!params) {
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
var getTarget = params.$table.getEventTargetNode;
|
|
8
|
+
var bodyEl = document.body;
|
|
9
|
+
if (getTarget(event, bodyEl, "ant-select-dropdown").flag || getTarget(event, bodyEl, "ant-cascader-menus").flag || getTarget(event, bodyEl, "ant-calendar-picker-container").flag || getTarget(event, bodyEl, "ant-time-picker-panel").flag) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
GridAdapter.interceptor.add("event.clear_actived", handleClearEvent);
|
|
14
|
+
GridAdapter.interceptor.add("event.clear_filter", handleClearEvent);
|
|
15
|
+
}
|
|
16
|
+
function useiView() {
|
|
17
|
+
function handleClearEvent(params, event) {
|
|
18
|
+
if (!params) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
var getTarget = params.$table.getEventTargetNode;
|
|
22
|
+
var bodyEl = document.body;
|
|
23
|
+
if (getTarget(event, bodyEl, "ivu-select-dropdown").flag) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
GridAdapter.interceptor.add("event.clear_actived", handleClearEvent);
|
|
28
|
+
GridAdapter.interceptor.add("event.clear_filter", handleClearEvent);
|
|
29
|
+
}
|
|
30
|
+
function useElementUI() {
|
|
31
|
+
function handleClearEvent(params, event) {
|
|
32
|
+
if (!params) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
var getTarget = params.$table.getEventTargetNode;
|
|
36
|
+
var bodyEl = document.body;
|
|
37
|
+
if (getTarget(event, bodyEl, "el-autocomplete-suggestion").flag || getTarget(event, bodyEl, "el-select-dropdown").flag || getTarget(event, bodyEl, "el-cascader__dropdown").flag || getTarget(event, bodyEl, "el-cascader-menus").flag || getTarget(event, bodyEl, "el-picker-panel").flag) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
GridAdapter.interceptor.add("event.clear_actived", handleClearEvent);
|
|
42
|
+
GridAdapter.interceptor.add("event.clear_filter", handleClearEvent);
|
|
43
|
+
}
|
|
44
|
+
var GridManager = {
|
|
45
|
+
useAntd,
|
|
46
|
+
useiView,
|
|
47
|
+
useElementUI,
|
|
48
|
+
Interceptor: GridAdapter
|
|
49
|
+
};
|
|
50
|
+
export {
|
|
51
|
+
GridManager as default
|
|
52
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@opentinyvue/vue-grid-manager",
|
|
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-grid": "~2.21.0"
|
|
11
|
+
},
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"types": "index.d.ts",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "pnpm -w build:ui $npm_package_name",
|
|
16
|
+
"//postversion": "pnpm build"
|
|
17
|
+
}
|
|
18
|
+
}
|
package/src/antd.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): void;
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import useAntd from './antd';
|
|
2
|
+
import useiView from './iview';
|
|
3
|
+
import useElementUI from './element-ui';
|
|
4
|
+
declare const _default: {
|
|
5
|
+
useAntd: typeof useAntd;
|
|
6
|
+
useiView: typeof useiView;
|
|
7
|
+
useElementUI: typeof useElementUI;
|
|
8
|
+
Interceptor: {
|
|
9
|
+
use(Plugin: any, options: any): any;
|
|
10
|
+
setup: (options?: {}) => void;
|
|
11
|
+
interceptor: {
|
|
12
|
+
mixin(map: any): any;
|
|
13
|
+
get(type: any): any;
|
|
14
|
+
add(type: any, callback: any): any;
|
|
15
|
+
delete(type: any, callback: any): any;
|
|
16
|
+
};
|
|
17
|
+
renderer: {};
|
|
18
|
+
buttons: {
|
|
19
|
+
mixin(map: any): any;
|
|
20
|
+
get(type: any): any;
|
|
21
|
+
add(type: any, callback: any): any;
|
|
22
|
+
delete(type: any): any;
|
|
23
|
+
};
|
|
24
|
+
menus: {
|
|
25
|
+
mixin(map: any): any;
|
|
26
|
+
get(type: any): any;
|
|
27
|
+
add(type: any, callback: any): any;
|
|
28
|
+
delete(type: any): any;
|
|
29
|
+
};
|
|
30
|
+
_tooltip: boolean;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
package/src/iview.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): void;
|