@opentinyvue/vue-filter-panel 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,2 @@
1
+ import FilterPanel from './src/pc.vue';
2
+ export default FilterPanel;
package/lib/index.js ADDED
@@ -0,0 +1,159 @@
1
+ import { renderless, api } from '@opentinyvue/vue-renderless/filter-panel/vue';
2
+ import { defineComponent, $prefix, $props, setup } from '@opentinyvue/vue-common';
3
+ import FilterBox from '@opentinyvue/vue-filter-box';
4
+ import Popover from '@opentinyvue/vue-popover';
5
+ import '@opentinyvue/vue-theme/filter-panel/index.css';
6
+
7
+ function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
8
+ var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
9
+ if (render) {
10
+ options.render = render;
11
+ options.staticRenderFns = staticRenderFns;
12
+ options._compiled = true;
13
+ }
14
+ var hook;
15
+ if (injectStyles) {
16
+ hook = injectStyles;
17
+ }
18
+ if (hook) {
19
+ if (options.functional) {
20
+ options._injectStyles = hook;
21
+ var originalRender = options.render;
22
+ options.render = function renderWithStyleInjection(h, context) {
23
+ hook.call(context);
24
+ return originalRender(h, context);
25
+ };
26
+ } else {
27
+ var existing = options.beforeCreate;
28
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
29
+ }
30
+ }
31
+ return {
32
+ exports: scriptExports,
33
+ options
34
+ };
35
+ }
36
+
37
+ function _extends() {
38
+ return _extends = Object.assign ? Object.assign.bind() : function(n) {
39
+ for (var e = 1; e < arguments.length; e++) {
40
+ var t = arguments[e];
41
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
42
+ }
43
+ return n;
44
+ }, _extends.apply(null, arguments);
45
+ }
46
+ var __vue2_script = defineComponent({
47
+ name: $prefix + "FilterPanel",
48
+ emits: ["handle-clear", "visible-change"],
49
+ components: {
50
+ TinyPopover: Popover,
51
+ TinyFilterBox: FilterBox
52
+ },
53
+ props: _extends({}, $props, {
54
+ label: String,
55
+ value: [String, Number],
56
+ tip: String,
57
+ popperClass: {
58
+ type: String,
59
+ default: ""
60
+ },
61
+ clearable: {
62
+ type: Boolean,
63
+ default: true
64
+ },
65
+ disabled: {
66
+ type: Boolean,
67
+ default: false
68
+ },
69
+ placement: {
70
+ type: String,
71
+ default: "bottom-start"
72
+ },
73
+ popperAppendToBody: {
74
+ type: Boolean,
75
+ default: true
76
+ },
77
+ blank: {
78
+ type: Boolean,
79
+ default: false
80
+ }
81
+ }),
82
+ setup: function setup$1(props, context) {
83
+ return setup({
84
+ props,
85
+ context,
86
+ renderless,
87
+ api,
88
+ mono: true
89
+ });
90
+ }
91
+ });
92
+ var render = function render2() {
93
+ var _vm = this;
94
+ var _h = _vm.$createElement;
95
+ var _c = _vm._self._c || _h;
96
+ return _c("div", {
97
+ staticClass: "tiny-filter-panel"
98
+ }, [_c("tiny-popover", {
99
+ ref: "popover",
100
+ attrs: {
101
+ "placement": _vm.placement,
102
+ "visible-arrow": false,
103
+ "popper-class": _vm.popperClass + " tiny-filter-panel__popover",
104
+ "append-to-body": _vm.popperAppendToBody,
105
+ "trigger": "manual"
106
+ },
107
+ on: {
108
+ "show": _vm.popoverShow,
109
+ "hide": _vm.popoverHide
110
+ },
111
+ scopedSlots: _vm._u([{
112
+ key: "reference",
113
+ fn: function fn() {
114
+ return [_c("div", [_c("tiny-filter-box", {
115
+ ref: "filterBox",
116
+ attrs: {
117
+ "show-close": _vm.clearable,
118
+ "disabled": _vm.disabled,
119
+ "label": _vm.label,
120
+ "tip": _vm.tip,
121
+ "value": _vm.value,
122
+ "drop-down-visible": _vm.state.visible,
123
+ "blank": _vm.blank
124
+ },
125
+ on: {
126
+ "click": _vm.togglePanel,
127
+ "handle-clear": _vm.handleClear
128
+ }
129
+ })], 1)];
130
+ },
131
+ proxy: true
132
+ }]),
133
+ model: {
134
+ value: _vm.state.visible,
135
+ callback: function callback($$v) {
136
+ _vm.$set(_vm.state, "visible", $$v);
137
+ },
138
+ expression: "state.visible"
139
+ }
140
+ }, [_c("div", [_vm._t("default")], 2)])], 1);
141
+ };
142
+ var staticRenderFns = [];
143
+ var __cssModules = {};
144
+ var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
145
+ function __vue2_injectStyles(context) {
146
+ for (var o in __cssModules) {
147
+ this[o] = __cssModules[o];
148
+ }
149
+ }
150
+ var FilterPanel = /* @__PURE__ */ function() {
151
+ return __component__.exports;
152
+ }();
153
+ var version = "2.21.0";
154
+ FilterPanel.install = function(Vue) {
155
+ Vue.component(FilterPanel.name, FilterPanel);
156
+ };
157
+ FilterPanel.version = version;
158
+
159
+ export { FilterPanel as default };
package/package.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "@opentinyvue/vue-filter-panel",
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-renderless": "~3.21.0",
11
+ "@opentinyvue/vue-common": "~2.21.0",
12
+ "@opentinyvue/vue-filter-box": "~2.21.0",
13
+ "@opentinyvue/vue-popover": "~2.21.0",
14
+ "@opentinyvue/vue-theme": "~3.21.0"
15
+ },
16
+ "license": "MIT",
17
+ "types": "index.d.ts"
18
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;