@scvzerng/element-plus-search-vue2 0.0.3 → 0.0.4

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.
@@ -9,12 +9,7 @@ type __VLS_Props = {
9
9
  itemHeight?: number;
10
10
  resetAutoSearch?: boolean;
11
11
  };
12
- declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
13
- defaultSpan: number;
14
- maxRows: number;
15
- itemHeight: number;
16
- resetAutoSearch: boolean;
17
- }>, {
12
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
18
13
  getSearchItems: () => {
19
14
  field: string;
20
15
  label: string;
@@ -36,32 +31,13 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
36
31
  }[];
37
32
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
38
33
  change: (...args: any[]) => void;
39
- }, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
40
- defaultSpan: number;
41
- maxRows: number;
42
- itemHeight: number;
43
- resetAutoSearch: boolean;
44
- }>>>, {
34
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
35
+ onChange?: ((...args: any[]) => any) | undefined;
36
+ }>, {
45
37
  defaultSpan: number;
46
38
  maxRows: number;
47
39
  itemHeight: number;
48
40
  resetAutoSearch: boolean;
49
- }>;
41
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
42
+ declare const _default: typeof __VLS_export;
50
43
  export default _default;
51
- type __VLS_WithDefaults<P, D> = {
52
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
53
- default: D[K];
54
- }> : P[K];
55
- };
56
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
57
- type __VLS_TypePropsToOption<T> = {
58
- [K in keyof T]-?: {} extends Pick<T, K> ? {
59
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
60
- } : {
61
- type: import('vue').PropType<T[K]>;
62
- required: true;
63
- };
64
- };
65
- type __VLS_PrettifyLocal<T> = {
66
- [K in keyof T]: T[K];
67
- } & {};
@@ -1,11 +1,12 @@
1
1
  import { SearchItem } from './model/SearchItem';
2
2
  import { SearchConfig } from './model/SearchConfig';
3
3
  import { SearchTag } from './model/SearchTag';
4
+ import { Reactive } from 'vue';
4
5
  import { Searchable } from './types/Searchable';
5
6
  export declare class SearchBarState {
6
7
  id: string;
7
8
  items: SearchItem[];
8
- config: SearchConfig;
9
+ config: Reactive<SearchConfig>;
9
10
  searching: boolean;
10
11
  tags: SearchTag[];
11
12
  searchCallback: <T>(params: T) => Promise<void>;
@@ -1,22 +1,7 @@
1
+ import type { FunctionalComponent } from 'vue';
1
2
  import type { SearchItem } from './model/SearchItem';
2
- import { PropType } from 'vue';
3
3
  import { SearchBarState } from './SearchBarState';
4
- declare const _default: {
5
- functional: boolean;
6
- props: {
7
- search: {
8
- type: PropType<SearchItem>;
9
- required: boolean;
10
- };
11
- api: {
12
- type: PropType<SearchBarState>;
13
- };
14
- };
15
- render(h: any, context: {
16
- props: {
17
- search: SearchItem;
18
- api: SearchBarState;
19
- };
20
- }): import("vue").VNode;
21
- };
22
- export default _default;
4
+ export declare const SearchItemRender: FunctionalComponent<{
5
+ search: SearchItem;
6
+ api: SearchBarState;
7
+ }>;
@@ -1,20 +1,7 @@
1
+ import type { SearchTag } from './model/SearchTag';
1
2
  type __VLS_Props = {
2
- tags: ({
3
- required?: boolean;
4
- valueText?: string;
5
- label: string;
6
- field: string;
7
- clean: () => void;
8
- } & any)[];
3
+ tags: SearchTag[];
9
4
  };
10
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
11
7
  export default _default;
12
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
13
- type __VLS_TypePropsToOption<T> = {
14
- [K in keyof T]-?: {} extends Pick<T, K> ? {
15
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
16
- } : {
17
- type: import('vue').PropType<T[K]>;
18
- required: true;
19
- };
20
- };
@@ -1,6 +1,5 @@
1
1
  import { TransformCallback } from './types/Searchable';
2
2
  import { SearchValueLike } from './types/SearchValueLike';
3
- export * from "./helper/vModel";
4
3
  export * from "./types/Searchable";
5
4
  export { default as SearchBar } from './SearchBar.vue';
6
5
  export type SearchBarInstance = {
@@ -1,4 +1,5 @@
1
- declare const _default: import("vue").DefineComponent<{}, {
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
2
2
  show: (api: import("../SearchBarState").SearchBarState) => void;
3
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
3
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
4
+ declare const _default: typeof __VLS_export;
4
5
  export default _default;
@@ -3,14 +3,6 @@ import { SearchBarState } from '../SearchBarState';
3
3
  type __VLS_Props = {
4
4
  state: UnwrapNestedRefs<SearchBarState>;
5
5
  };
6
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
7
8
  export default _default;
8
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
- type __VLS_TypePropsToOption<T> = {
10
- [K in keyof T]-?: {} extends Pick<T, K> ? {
11
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
12
- } : {
13
- type: import('vue').PropType<T[K]>;
14
- required: true;
15
- };
16
- };
@@ -1,14 +1,24 @@
1
1
  import type { SearchBarState } from '../SearchBarState';
2
+ import { TreeInstance } from 'element-plus';
3
+ type TreeNode = {
4
+ label: string;
5
+ id: string;
6
+ children?: TreeNode[];
7
+ };
2
8
  export declare const useSetting: () => {
3
- treeRef: import("vue").Ref<any>;
4
- visible: import("vue").Ref<boolean>;
9
+ treeRef: import("vue").Ref<TreeInstance | undefined, TreeInstance | undefined>;
10
+ visible: import("vue").Ref<boolean, boolean>;
5
11
  snapshot: import("vue").Ref<{
6
12
  label: string;
7
13
  id: string;
8
14
  children?: /*elided*/ any[] | undefined;
15
+ }[], TreeNode[] | {
16
+ label: string;
17
+ id: string;
18
+ children?: /*elided*/ any[] | undefined;
9
19
  }[]>;
10
- defaultCheckedKeys: import("vue").Ref<string[] | undefined>;
11
- drawerWidth: import("vue").Ref<number>;
20
+ defaultCheckedKeys: import("vue").Ref<string[] | undefined, string[] | undefined>;
21
+ drawerWidth: import("vue").Ref<number, number>;
12
22
  updateSnapshot: (api: SearchBarState) => void;
13
23
  show: (api: SearchBarState) => void;
14
24
  save: () => void;
@@ -18,3 +28,4 @@ export declare const useSetting: () => {
18
28
  allowDrop: (_: any, __: any, type: string) => boolean;
19
29
  allowDrag: (node: any) => boolean;
20
30
  };
31
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scvzerng/element-plus-search-vue2",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "scripts": {
@@ -17,7 +17,7 @@
17
17
  "require": "./dist/ElementPlusSearch.umd.js"
18
18
  },
19
19
  "./style": {
20
- "default": "./dist/element-plus-search.css"
20
+ "default": "./dist/style.css"
21
21
  }
22
22
 
23
23
  },
package/dist/style.css DELETED
@@ -1 +0,0 @@
1
- @charset "UTF-8";.tags-scroll-container{display:flex}.tags-scroll-container .pointer{cursor:pointer}.tags-scroll-container .search-tags{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:10px}.tags-scroll-container .search-tags::-webkit-scrollbar{display:none}.tags-scroll-container .scroll-left-bar{cursor:pointer;margin-right:10px}.tags-scroll-container .scroll-right-bar{cursor:pointer;margin-left:10px}.setting-container{display:flex;flex-direction:column;height:100%}.setting-container .tree{flex:1;overflow-y:auto}.setting-container div[aria-disabled=true]{display:none}.setting-container .footer{margin-top:auto;margin-left:auto;padding:10px 15px;display:flex;gap:10px}.setting-container .footer .el-button{width:90px}.search-bar-container{font-size:14px;width:100%;display:flex;flex-direction:column}.search-bar-container .search,.search-bar-container .el-input-number,.search-bar-container .el-select,.search-bar-container .el-date-editor,.search-bar-container .el-cascader{width:100%}.search-bar-container .search-bottom{display:flex}.search-bar-container .search-bottom .tags-scroll-container{flex:1;min-width:0;margin-right:10px}.search-bar-container .search-bottom .actions{display:flex;margin-left:auto}.search-bar-container .search-bottom .actions .el-button{width:90px}.search-bar-container .search-bottom .actions .icon-button{padding:0 8px;width:34px;font-size:larger}.search-bar-container .search-item{margin-bottom:12px}.search-bar-container .search-item-content{margin-top:4px}.search-bar-container .preview{overflow-x:scroll;overflow-y:hidden}.search-bar-container .scroll-tags{display:flex;align-items:center}.search-bar-container .scroll-tags .left{margin-right:10px}.search-bar-container .scroll-tags .right{margin-left:10px}
@@ -1,14 +0,0 @@
1
- import { SearchValueLike } from '../types/SearchValueLike';
2
- /**
3
- * vue2 翻译jsx片段时在非组件上下文中会生成this.$set 尝试设置属性导致报错 此时使用此方法绕过生成
4
- *
5
- * 此函数为变种专用于search组件
6
- *
7
- * @param searchValue
8
- */
9
- export declare const vModel: (searchValue: SearchValueLike) => {
10
- model: {
11
- value: any;
12
- callback: (newValue: any) => void;
13
- };
14
- };