@opentinyvue/vue-filter-panel 2.22.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 +72 -87
- package/package.json +4 -4
- package/src/pc.vue.d.ts +89 -1
package/lib/index.js
CHANGED
|
@@ -2,37 +2,41 @@ import { renderless, api } from '@opentinyvue/vue-renderless/filter-panel/vue';
|
|
|
2
2
|
import { defineComponent, $prefix, $props, setup } from '@opentinyvue/vue-common';
|
|
3
3
|
import FilterBox from '@opentinyvue/vue-filter-box';
|
|
4
4
|
import Popover from '@opentinyvue/vue-popover';
|
|
5
|
+
import { resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, renderSlot } from 'vue';
|
|
5
6
|
import '@opentinyvue/vue-theme/filter-panel/index.css';
|
|
6
7
|
|
|
7
|
-
function
|
|
8
|
-
var
|
|
9
|
-
if (
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
function _createForOfIteratorHelperLoose(r, e) {
|
|
9
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
10
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
11
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
12
|
+
t && (r = t);
|
|
13
|
+
var o = 0;
|
|
14
|
+
return function() {
|
|
15
|
+
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
16
|
+
};
|
|
13
17
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
}
|
|
18
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
19
|
+
}
|
|
20
|
+
function _unsupportedIterableToArray(r, a) {
|
|
21
|
+
if (r) {
|
|
22
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
23
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
24
|
+
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;
|
|
30
25
|
}
|
|
31
|
-
return {
|
|
32
|
-
exports: scriptExports,
|
|
33
|
-
options
|
|
34
|
-
};
|
|
35
26
|
}
|
|
27
|
+
function _arrayLikeToArray(r, a) {
|
|
28
|
+
(null == a || a > r.length) && (a = r.length);
|
|
29
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
30
|
+
return n;
|
|
31
|
+
}
|
|
32
|
+
var _export_sfc = function _export_sfc2(sfc, props) {
|
|
33
|
+
var target = sfc.__vccOpts || sfc;
|
|
34
|
+
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
|
|
35
|
+
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
|
|
36
|
+
target[key] = val;
|
|
37
|
+
}
|
|
38
|
+
return target;
|
|
39
|
+
};
|
|
36
40
|
|
|
37
41
|
function _extends() {
|
|
38
42
|
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
@@ -43,7 +47,7 @@ function _extends() {
|
|
|
43
47
|
return n;
|
|
44
48
|
}, _extends.apply(null, arguments);
|
|
45
49
|
}
|
|
46
|
-
var
|
|
50
|
+
var _sfc_main = defineComponent({
|
|
47
51
|
name: $prefix + "FilterPanel",
|
|
48
52
|
emits: ["handle-clear", "visible-change"],
|
|
49
53
|
components: {
|
|
@@ -89,68 +93,49 @@ var __vue2_script = defineComponent({
|
|
|
89
93
|
});
|
|
90
94
|
}
|
|
91
95
|
});
|
|
92
|
-
var
|
|
93
|
-
|
|
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);
|
|
96
|
+
var _hoisted_1 = {
|
|
97
|
+
class: "tiny-filter-panel"
|
|
141
98
|
};
|
|
142
|
-
|
|
143
|
-
var
|
|
144
|
-
var
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
99
|
+
function _sfc_render(_ctx, _cache, $props2, $setup, $data, $options) {
|
|
100
|
+
var _component_tiny_filter_box = resolveComponent("tiny-filter-box");
|
|
101
|
+
var _component_tiny_popover = resolveComponent("tiny-popover");
|
|
102
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(_component_tiny_popover, {
|
|
103
|
+
ref: "popover",
|
|
104
|
+
modelValue: _ctx.state.visible,
|
|
105
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) {
|
|
106
|
+
return _ctx.state.visible = $event;
|
|
107
|
+
}),
|
|
108
|
+
placement: _ctx.placement,
|
|
109
|
+
"visible-arrow": false,
|
|
110
|
+
"popper-class": _ctx.popperClass + " tiny-filter-panel__popover",
|
|
111
|
+
"append-to-body": _ctx.popperAppendToBody,
|
|
112
|
+
trigger: "manual",
|
|
113
|
+
onShow: _ctx.popoverShow,
|
|
114
|
+
onHide: _ctx.popoverHide
|
|
115
|
+
}, {
|
|
116
|
+
reference: withCtx(function() {
|
|
117
|
+
return [createElementVNode("div", null, [createVNode(_component_tiny_filter_box, {
|
|
118
|
+
ref: "filterBox",
|
|
119
|
+
onClick: _ctx.togglePanel,
|
|
120
|
+
onHandleClear: _ctx.handleClear,
|
|
121
|
+
"show-close": _ctx.clearable,
|
|
122
|
+
disabled: _ctx.disabled,
|
|
123
|
+
label: _ctx.label,
|
|
124
|
+
tip: _ctx.tip,
|
|
125
|
+
value: _ctx.value,
|
|
126
|
+
"drop-down-visible": _ctx.state.visible,
|
|
127
|
+
blank: _ctx.blank
|
|
128
|
+
}, null, 8, ["onClick", "onHandleClear", "show-close", "disabled", "label", "tip", "value", "drop-down-visible", "blank"])])];
|
|
129
|
+
}),
|
|
130
|
+
default: withCtx(function() {
|
|
131
|
+
return [createElementVNode("div", null, [renderSlot(_ctx.$slots, "default")])];
|
|
132
|
+
}),
|
|
133
|
+
_: 3
|
|
134
|
+
/* FORWARDED */
|
|
135
|
+
}, 8, ["modelValue", "placement", "popper-class", "append-to-body", "onShow", "onHide"])]);
|
|
149
136
|
}
|
|
150
|
-
var FilterPanel = /* @__PURE__ */
|
|
151
|
-
|
|
152
|
-
}();
|
|
153
|
-
var version = "2.22.0";
|
|
137
|
+
var FilterPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
138
|
+
var version = "3.22.0";
|
|
154
139
|
FilterPanel.install = function(Vue) {
|
|
155
140
|
Vue.component(FilterPanel.name, FilterPanel);
|
|
156
141
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentinyvue/vue-filter-panel",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.22.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib/index.js",
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"type": "module",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@opentinyvue/vue-renderless": "~3.22.0",
|
|
11
|
-
"@opentinyvue/vue-common": "~
|
|
12
|
-
"@opentinyvue/vue-filter-box": "~
|
|
13
|
-
"@opentinyvue/vue-popover": "~
|
|
11
|
+
"@opentinyvue/vue-common": "~3.22.0",
|
|
12
|
+
"@opentinyvue/vue-filter-box": "~3.22.0",
|
|
13
|
+
"@opentinyvue/vue-popover": "~3.22.0",
|
|
14
14
|
"@opentinyvue/vue-theme": "~3.22.0"
|
|
15
15
|
},
|
|
16
16
|
"license": "MIT",
|
package/src/pc.vue.d.ts
CHANGED
|
@@ -1,2 +1,90 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("@vue/runtime-core").DefineComponent<{
|
|
2
|
+
label: StringConstructor;
|
|
3
|
+
value: (StringConstructor | NumberConstructor)[];
|
|
4
|
+
tip: StringConstructor;
|
|
5
|
+
popperClass: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
clearable: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: boolean;
|
|
12
|
+
};
|
|
13
|
+
disabled: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
placement: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
popperAppendToBody: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
blank: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
tiny_mode: StringConstructor;
|
|
30
|
+
tiny_mode_root: BooleanConstructor;
|
|
31
|
+
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
32
|
+
tiny_renderless: FunctionConstructor;
|
|
33
|
+
tiny_theme: StringConstructor;
|
|
34
|
+
tiny_chart_theme: ObjectConstructor;
|
|
35
|
+
}, {
|
|
36
|
+
t: (this: any, path: any, options?: any) => any;
|
|
37
|
+
vm: any;
|
|
38
|
+
f: (props: any, attrs?: {}) => {};
|
|
39
|
+
a: (attrs: any, filters: any, include: any) => {};
|
|
40
|
+
d: (props: any) => void;
|
|
41
|
+
dp: (props: any) => void;
|
|
42
|
+
gcls: (key: any) => any;
|
|
43
|
+
m: (...cssClasses: any[]) => string;
|
|
44
|
+
}, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("visible-change" | "handle-clear")[], "visible-change" | "handle-clear", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
45
|
+
label: StringConstructor;
|
|
46
|
+
value: (StringConstructor | NumberConstructor)[];
|
|
47
|
+
tip: StringConstructor;
|
|
48
|
+
popperClass: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
clearable: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
56
|
+
disabled: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
placement: {
|
|
61
|
+
type: StringConstructor;
|
|
62
|
+
default: string;
|
|
63
|
+
};
|
|
64
|
+
popperAppendToBody: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
default: boolean;
|
|
67
|
+
};
|
|
68
|
+
blank: {
|
|
69
|
+
type: BooleanConstructor;
|
|
70
|
+
default: boolean;
|
|
71
|
+
};
|
|
72
|
+
tiny_mode: StringConstructor;
|
|
73
|
+
tiny_mode_root: BooleanConstructor;
|
|
74
|
+
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
75
|
+
tiny_renderless: FunctionConstructor;
|
|
76
|
+
tiny_theme: StringConstructor;
|
|
77
|
+
tiny_chart_theme: ObjectConstructor;
|
|
78
|
+
}>> & {
|
|
79
|
+
"onVisible-change"?: ((...args: any[]) => any) | undefined;
|
|
80
|
+
"onHandle-clear"?: ((...args: any[]) => any) | undefined;
|
|
81
|
+
}, {
|
|
82
|
+
disabled: boolean;
|
|
83
|
+
placement: string;
|
|
84
|
+
tiny_mode_root: boolean;
|
|
85
|
+
popperClass: string;
|
|
86
|
+
popperAppendToBody: boolean;
|
|
87
|
+
clearable: boolean;
|
|
88
|
+
blank: boolean;
|
|
89
|
+
}, {}>;
|
|
2
90
|
export default _default;
|