yahee-components 0.0.67 → 0.0.69

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.
@@ -1,4 +1,184 @@
1
- import f from "./complex-search.vue.js";
1
+ import { defineComponent as K, toRefs as D, ref as s } from "vue";
2
+ import S from "../_virtual/lodash.js";
3
+ import { defaultComplexSearchProps as t } from "./props.js";
4
+ import { ElLink as G, ElOption as H, ElButton as V, ElRow as _, ElFormItem as L, ElForm as P, ElIcon as q, ElDialog as j, ElSelect as Y, ElCheckbox as z, ElInput as J } from "element-plus";
5
+ import "element-plus/theme-chalk/src/base.scss";
6
+ import "element-plus/theme-chalk/src/input.scss";
7
+ import "element-plus/theme-chalk/src/checkbox.scss";
8
+ import "element-plus/theme-chalk/src/tag.scss";
9
+ import "element-plus/theme-chalk/src/option.scss";
10
+ import "element-plus/theme-chalk/src/option-group.scss";
11
+ import "element-plus/theme-chalk/src/scrollbar.scss";
12
+ import "element-plus/theme-chalk/src/popper.scss";
13
+ import "element-plus/theme-chalk/src/select.scss";
14
+ import "element-plus/theme-chalk/src/dialog.scss";
15
+ import "element-plus/theme-chalk/src/overlay.scss";
16
+ import "element-plus/theme-chalk/src/form.scss";
17
+ import "element-plus/theme-chalk/src/form-item.scss";
18
+ import "element-plus/theme-chalk/src/row.scss";
19
+ import "element-plus/theme-chalk/src/button.scss";
20
+ import "element-plus/theme-chalk/src/link.scss";
21
+ import { Search as M } from "@element-plus/icons-vue";
22
+ const Se = K({
23
+ name: "YaheeComplexSearch",
24
+ // 使用 components 选项注册所有 Element Plus 组件
25
+ components: {
26
+ ElInput: J,
27
+ ElCheckbox: z,
28
+ ElSelect: Y,
29
+ ElDialog: j,
30
+ ElIcon: q,
31
+ ElForm: P,
32
+ ElFormItem: L,
33
+ ElRow: _,
34
+ ElButton: V,
35
+ ElOption: H,
36
+ ElLink: G,
37
+ Search: M
38
+ },
39
+ props: {
40
+ defaultSearch: {
41
+ type: String,
42
+ default: t().defaultSearch
43
+ },
44
+ options: {
45
+ type: Array,
46
+ default: t().options
47
+ },
48
+ placeholderText: {
49
+ type: String,
50
+ default: t().placeholderText
51
+ },
52
+ showPatchSearch: {
53
+ type: Boolean,
54
+ default: t().showPatchSearch
55
+ },
56
+ showWithinFilterCheckbox: {
57
+ type: Boolean,
58
+ default: t().showWithinFilterCheckbox
59
+ },
60
+ specialOptions: {
61
+ type: Array,
62
+ default: t().specialOptions
63
+ },
64
+ normalOptions: {
65
+ type: Array,
66
+ default: t().normalOptions
67
+ },
68
+ showSelect: {
69
+ type: Boolean,
70
+ default: t().showSelect
71
+ },
72
+ searchItem: {
73
+ type: Object,
74
+ default: t().searchItem
75
+ },
76
+ isBatchSelectOptionsSameWithInput: {
77
+ type: Boolean,
78
+ default: t().isBatchSelectOptionsSameWithInput
79
+ },
80
+ batchOptions: {
81
+ type: Array,
82
+ default: t().batchOptions
83
+ }
84
+ },
85
+ emits: ["filterChangeGrandson"],
86
+ setup(v, { emit: h }) {
87
+ const { specialOptions: y, normalOptions: w, searchItem: n } = D(v), r = s(v.defaultSearch || "WHOLE_SEARCH"), i = s(""), u = s(!1), f = s(!1), p = s(!1), m = s(null), o = s({ searchType: "WHOLE_SEARCH", searchContent: "" }), C = {
88
+ selectedSearchType: [{ required: !0, message: "请输入查询类型", trigger: "blur" }],
89
+ searchContent: [{ required: !0, message: "请输入查询内容", trigger: "blur" }]
90
+ }, g = [{ value: "WHOLE_SEARCH", label: "综合搜索" }], E = () => {
91
+ p.value = !0;
92
+ }, O = () => {
93
+ p.value = !1;
94
+ }, b = () => {
95
+ u.value || (delete n.value.putSearch, h(
96
+ "filterChangeGrandson",
97
+ n.value,
98
+ r.value,
99
+ u.value
100
+ ));
101
+ }, W = () => n.value, I = () => {
102
+ i.value ? A() : h("filterChangeGrandson", W(), r.value);
103
+ }, R = (e, l) => {
104
+ const a = { ...e };
105
+ return S.map(y.value, (c) => c.key).includes(l.filterKey) ? y.value.forEach((c) => delete a[c.key]) : delete a[l.filterKey], a;
106
+ }, k = (e) => {
107
+ S.forEach(e, (l) => {
108
+ const a = R(n.value, l), { checkedValues: c, filterKey: d } = l;
109
+ S.isEmpty(c) || (w.value.includes(d) ? a[d] = c[0] : a[d] = c), n.value = a;
110
+ }), h("filterChangeGrandson", n.value, r.value);
111
+ }, T = (e) => {
112
+ i.value = B(e) || "";
113
+ }, x = (e) => {
114
+ o.value.searchContent = B(e) || "";
115
+ }, B = (e) => {
116
+ var a;
117
+ e.preventDefault();
118
+ const l = (a = e.clipboardData) == null ? void 0 : a.getData("text/plain");
119
+ return l == null ? void 0 : l.replace(/[\n\r\t]+/g, ",");
120
+ }, A = () => {
121
+ u.value ? k([
122
+ { filterKey: "putSearch", checkedValues: i.value },
123
+ { filterKey: "searchType", checkedValues: r.value }
124
+ ]) : h(
125
+ "filterChangeGrandson",
126
+ { putSearch: i.value, searchType: r.value },
127
+ r.value
128
+ );
129
+ }, F = () => {
130
+ m.value && m.value.validate((e) => {
131
+ e && (f.value = !0, u.value ? k([
132
+ { filterKey: "putSearch", checkedValues: o.value.searchContent },
133
+ { filterKey: "searchType", checkedValues: o.value.searchType }
134
+ ]) : h(
135
+ "filterChangeGrandson",
136
+ {
137
+ putSearch: o.value.searchContent,
138
+ searchType: o.value.searchType
139
+ },
140
+ r.value
141
+ ), p.value = !1, f.value = !1);
142
+ });
143
+ };
144
+ return {
145
+ ...{
146
+ selectedSearchType: r,
147
+ putSearch: i,
148
+ isWithinFilterOptions: u,
149
+ confirmLoading: f,
150
+ showBatchSearch: p,
151
+ batchSearchFormRef: m,
152
+ batchSearchForm: o,
153
+ defalutOptions: g,
154
+ rules: C,
155
+ showBatchSearchDialog: E,
156
+ handleBatchSearchClose: O,
157
+ searchWithinFilterOptions: b,
158
+ handleSearch: I,
159
+ pasteFormatInput: T,
160
+ confirmSearch: F,
161
+ pasteFormat: x
162
+ },
163
+ selectedSearchType: r,
164
+ putSearch: i,
165
+ isWithinFilterOptions: u,
166
+ confirmLoading: f,
167
+ showBatchSearch: p,
168
+ batchSearchFormRef: m,
169
+ batchSearchForm: o,
170
+ defalutOptions: g,
171
+ rules: C,
172
+ showBatchSearchDialog: E,
173
+ handleBatchSearchClose: O,
174
+ searchWithinFilterOptions: b,
175
+ handleSearch: I,
176
+ pasteFormatInput: T,
177
+ confirmSearch: F,
178
+ pasteFormat: x
179
+ };
180
+ }
181
+ });
2
182
  export {
3
- f as default
183
+ Se as default
4
184
  };
@@ -1,7 +1,7 @@
1
- import { withInstall as o } from "../utils/install.js";
2
- import t from "./complex-search.vue.js";
3
- const m = o(t);
1
+ import { withInstall as e } from "../utils/install.js";
2
+ import o from "./complex-search.vue.js";
3
+ const a = e(o);
4
4
  export {
5
- m as YaheeComplexSearch,
6
- m as default
5
+ a as YaheeComplexSearch,
6
+ a as default
7
7
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "yahee-components",
3
3
  "private": false,
4
- "version": "0.0.67",
4
+ "version": "0.0.69",
5
5
  "description": "深圳前海亚讯前端组件库",
6
6
  "main": "lib",
7
7
  "module": "es",
@@ -0,0 +1,3 @@
1
+ import { DefineComponent } from 'vue';
2
+ declare const _default: DefineComponent;
3
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { SFCWithInstall } from '../utils/typescript';
2
+ import { DefineComponent } from 'vue';
3
+ export declare const YaheeComplexSearch: SFCWithInstall<DefineComponent> & Record<string, any>;
4
+ export default YaheeComplexSearch;
5
+ export * from './complex-search.vue';
6
+ export * from './complex-search';
7
+ export * from './props';
@@ -138,7 +138,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
138
138
  };
139
139
  readonly disabled: BooleanConstructor;
140
140
  readonly role: {
141
- readonly type: PropType<"dialog" | "menu" | "tree" | "grid" | "listbox" | "tooltip" | "group" | "navigation">;
141
+ readonly type: PropType<"dialog" | "menu" | "grid" | "listbox" | "tooltip" | "tree" | "group" | "navigation">;
142
142
  readonly required: false;
143
143
  readonly validator: ((val: unknown) => boolean) | undefined;
144
144
  __epPropKey: true;
@@ -218,7 +218,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
218
218
  readonly effect: PopperEffect;
219
219
  readonly trigger: TooltipTriggerType | TooltipTriggerType[];
220
220
  readonly tabindex: string | number;
221
- readonly role: "dialog" | "menu" | "tree" | "grid" | "listbox" | "tooltip" | "group" | "navigation";
221
+ readonly role: "dialog" | "menu" | "grid" | "listbox" | "tooltip" | "tree" | "group" | "navigation";
222
222
  readonly loop: boolean;
223
223
  readonly popperOptions: Partial< Options>;
224
224
  readonly popperClass: string;
@@ -350,7 +350,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
350
350
  };
351
351
  readonly disabled: BooleanConstructor;
352
352
  readonly role: {
353
- readonly type: PropType<"dialog" | "menu" | "tree" | "grid" | "listbox" | "tooltip" | "group" | "navigation">;
353
+ readonly type: PropType<"dialog" | "menu" | "grid" | "listbox" | "tooltip" | "tree" | "group" | "navigation">;
354
354
  readonly required: false;
355
355
  readonly validator: ((val: unknown) => boolean) | undefined;
356
356
  __epPropKey: true;
@@ -430,7 +430,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
430
430
  readonly effect: PopperEffect;
431
431
  readonly trigger: TooltipTriggerType | TooltipTriggerType[];
432
432
  readonly tabindex: string | number;
433
- readonly role: "dialog" | "menu" | "tree" | "grid" | "listbox" | "tooltip" | "group" | "navigation";
433
+ readonly role: "dialog" | "menu" | "grid" | "listbox" | "tooltip" | "tree" | "group" | "navigation";
434
434
  readonly loop: boolean;
435
435
  readonly popperOptions: Partial< Options>;
436
436
  readonly popperClass: string;
@@ -153,7 +153,7 @@ export declare const YaheeDropDownCondition: SFCWithInstall<DefineComponent<{
153
153
  };
154
154
  readonly disabled: BooleanConstructor;
155
155
  readonly role: {
156
- readonly type: PropType<"dialog" | "menu" | "tree" | "grid" | "listbox" | "tooltip" | "group" | "navigation">;
156
+ readonly type: PropType<"dialog" | "menu" | "grid" | "listbox" | "tooltip" | "tree" | "group" | "navigation">;
157
157
  readonly required: false;
158
158
  readonly validator: ((val: unknown) => boolean) | undefined;
159
159
  __epPropKey: true;
@@ -233,7 +233,7 @@ export declare const YaheeDropDownCondition: SFCWithInstall<DefineComponent<{
233
233
  readonly effect: PopperEffect;
234
234
  readonly trigger: TooltipTriggerType | TooltipTriggerType[];
235
235
  readonly tabindex: string | number;
236
- readonly role: "dialog" | "menu" | "tree" | "grid" | "listbox" | "tooltip" | "group" | "navigation";
236
+ readonly role: "dialog" | "menu" | "grid" | "listbox" | "tooltip" | "tree" | "group" | "navigation";
237
237
  readonly loop: boolean;
238
238
  readonly popperOptions: Partial< Options>;
239
239
  readonly popperClass: string;
@@ -365,7 +365,7 @@ export declare const YaheeDropDownCondition: SFCWithInstall<DefineComponent<{
365
365
  };
366
366
  readonly disabled: BooleanConstructor;
367
367
  readonly role: {
368
- readonly type: PropType<"dialog" | "menu" | "tree" | "grid" | "listbox" | "tooltip" | "group" | "navigation">;
368
+ readonly type: PropType<"dialog" | "menu" | "grid" | "listbox" | "tooltip" | "tree" | "group" | "navigation">;
369
369
  readonly required: false;
370
370
  readonly validator: ((val: unknown) => boolean) | undefined;
371
371
  __epPropKey: true;
@@ -445,7 +445,7 @@ export declare const YaheeDropDownCondition: SFCWithInstall<DefineComponent<{
445
445
  readonly effect: PopperEffect;
446
446
  readonly trigger: TooltipTriggerType | TooltipTriggerType[];
447
447
  readonly tabindex: string | number;
448
- readonly role: "dialog" | "menu" | "tree" | "grid" | "listbox" | "tooltip" | "group" | "navigation";
448
+ readonly role: "dialog" | "menu" | "grid" | "listbox" | "tooltip" | "tree" | "group" | "navigation";
449
449
  readonly loop: boolean;
450
450
  readonly popperOptions: Partial< Options>;
451
451
  readonly popperClass: string;