lew-ui 2.7.57 → 2.7.59

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.
Files changed (38) hide show
  1. package/LICENSE +21 -21
  2. package/dist/_components/CommonInput.vue.d.ts +499 -0
  3. package/dist/components/data/table/src/LewTable.vue.d.ts +1 -1
  4. package/dist/components/data/tree/src/LewTree.vue.d.ts +12 -1
  5. package/dist/components/data/tree/src/props.d.ts +5 -0
  6. package/dist/components/feedback/drawer/src/LewDrawer.vue.d.ts +22 -0
  7. package/dist/components/feedback/drawer/src/props.d.ts +10 -0
  8. package/dist/components/form/cascader/src/LewCascader.vue.d.ts +46 -31
  9. package/dist/components/form/cascader/src/cascader.d.ts +15 -0
  10. package/dist/components/form/cascader/src/emits.d.ts +8 -1
  11. package/dist/components/form/cascader/src/props.d.ts +15 -10
  12. package/dist/components/form/index.d.ts +0 -1
  13. package/dist/components/form/input/src/LewInput.vue.d.ts +2 -2
  14. package/dist/components/form/input-number/src/LewInputNumber.vue.d.ts +2 -2
  15. package/dist/components/form/input-tag/src/LewInputTag.vue.d.ts +4 -4
  16. package/dist/components/form/select/src/LewSelect.vue.d.ts +1480 -411
  17. package/dist/components/form/select/src/emits.d.ts +5 -1
  18. package/dist/components/form/select/src/props.d.ts +7 -2
  19. package/dist/components/form/textarea/src/LewTextarea.vue.d.ts +4 -2
  20. package/dist/components/form/tree-select/src/LewTreeSelect.vue.d.ts +40 -23
  21. package/dist/components/form/tree-select/src/props.d.ts +0 -5
  22. package/dist/components/form/tree-select-multiple/index.d.ts +3 -0
  23. package/dist/components/form/{select-multiple/src/LewSelectMultiple.vue.d.ts → tree-select-multiple/src/LewTreeSelectMultiple.vue.d.ts} +492 -930
  24. package/dist/components/form/tree-select-multiple/src/emits.d.ts +4 -0
  25. package/dist/components/form/{select-multiple → tree-select-multiple}/src/props.d.ts +63 -55
  26. package/dist/components/navigation/steps/src/LewSteps.vue.d.ts +21 -1
  27. package/dist/components/navigation/steps/src/props.d.ts +8 -0
  28. package/dist/hooks/index.d.ts +4 -2
  29. package/dist/hooks/useDOMCreate.d.ts +1 -0
  30. package/dist/hooks/useEventListener.d.ts +1 -0
  31. package/dist/hooks/useTreeSelection.d.ts +35 -0
  32. package/dist/index.css +1 -1
  33. package/dist/index.js +1615 -1720
  34. package/dist/index.umd.cjs +7 -7
  35. package/dist/types/components.d.ts +2 -1
  36. package/package.json +1 -1
  37. package/dist/components/form/select-multiple/index.d.ts +0 -3
  38. package/dist/components/form/select-multiple/src/emits.d.ts +0 -11
@@ -1,4 +1,9 @@
1
1
  import { LewCascaderOption } from '../../../../types';
2
+ declare function getSelected(): LewCascaderOption | {
3
+ key: string;
4
+ disabled?: boolean;
5
+ isLeaf: boolean;
6
+ }[] | null;
2
7
  declare function show(): Promise<void>;
3
8
  declare function hide(): void;
4
9
  declare function __VLS_template(): {
@@ -240,7 +245,6 @@ declare function __VLS_template(): {
240
245
  }): any;
241
246
  };
242
247
  }) | null;
243
- lewCascaderRef: HTMLDivElement;
244
248
  };
245
249
  rootEl: HTMLDivElement;
246
250
  };
@@ -271,16 +275,6 @@ declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractP
271
275
  default: boolean;
272
276
  validator: (value: any) => boolean;
273
277
  };
274
- showAllLevels: {
275
- type: BooleanConstructor;
276
- default: boolean;
277
- validator: (value: any) => boolean;
278
- };
279
- multiple: {
280
- type: BooleanConstructor;
281
- default: boolean;
282
- validator: (value: any) => boolean;
283
- };
284
278
  free: {
285
279
  type: BooleanConstructor;
286
280
  default: boolean;
@@ -322,17 +316,33 @@ declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractP
322
316
  default: boolean;
323
317
  validator: (value: any) => boolean;
324
318
  };
319
+ onlyLeafSelectable: {
320
+ type: BooleanConstructor;
321
+ default: boolean;
322
+ validator: (value: any) => boolean;
323
+ };
324
+ multiple: {
325
+ type: BooleanConstructor;
326
+ default: boolean;
327
+ validator: (value: any) => boolean;
328
+ };
329
+ showAllLevels: {
330
+ type: BooleanConstructor;
331
+ default: boolean;
332
+ validator: (value: any) => boolean;
333
+ };
325
334
  modelValue: {
326
- type: globalThis.PropType<any>;
327
- required: true;
335
+ type: globalThis.PropType<string | string[]>;
328
336
  };
329
337
  }>, {
330
338
  show: typeof show;
331
339
  hide: typeof hide;
340
+ getSelected: typeof getSelected;
332
341
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
333
- change: (value?: string | undefined) => void;
342
+ change: (value: any, items: any) => void;
334
343
  clear: () => void;
335
- "update:modelValue": (value: any) => void;
344
+ delete: (value: string[], deletedItem: string) => void;
345
+ "update:modelValue": (value: string | string[] | undefined) => void;
336
346
  }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
337
347
  options: {
338
348
  type: PropType<LewCascaderOption[]>;
@@ -359,16 +369,6 @@ declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractP
359
369
  default: boolean;
360
370
  validator: (value: any) => boolean;
361
371
  };
362
- showAllLevels: {
363
- type: BooleanConstructor;
364
- default: boolean;
365
- validator: (value: any) => boolean;
366
- };
367
- multiple: {
368
- type: BooleanConstructor;
369
- default: boolean;
370
- validator: (value: any) => boolean;
371
- };
372
372
  free: {
373
373
  type: BooleanConstructor;
374
374
  default: boolean;
@@ -410,14 +410,29 @@ declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractP
410
410
  default: boolean;
411
411
  validator: (value: any) => boolean;
412
412
  };
413
+ onlyLeafSelectable: {
414
+ type: BooleanConstructor;
415
+ default: boolean;
416
+ validator: (value: any) => boolean;
417
+ };
418
+ multiple: {
419
+ type: BooleanConstructor;
420
+ default: boolean;
421
+ validator: (value: any) => boolean;
422
+ };
423
+ showAllLevels: {
424
+ type: BooleanConstructor;
425
+ default: boolean;
426
+ validator: (value: any) => boolean;
427
+ };
413
428
  modelValue: {
414
- type: globalThis.PropType<any>;
415
- required: true;
429
+ type: globalThis.PropType<string | string[]>;
416
430
  };
417
431
  }>> & Readonly<{
418
- onChange?: ((value?: string | undefined) => any) | undefined;
432
+ onChange?: ((value: any, items: any) => any) | undefined;
419
433
  onClear?: (() => any) | undefined;
420
- "onUpdate:modelValue"?: ((value: any) => any) | undefined;
434
+ onDelete?: ((value: string[], deletedItem: string) => any) | undefined;
435
+ "onUpdate:modelValue"?: ((value: string | string[] | undefined) => any) | undefined;
421
436
  }>, {
422
437
  size: import('../../../..').LewSize;
423
438
  disabled: boolean;
@@ -425,10 +440,11 @@ declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractP
425
440
  readonly: boolean;
426
441
  trigger: import('../../../..').LewTrigger;
427
442
  clearable: boolean;
428
- initMethod: () => Promise<LewCascaderOption[]>;
429
443
  multiple: boolean;
444
+ initMethod: () => Promise<LewCascaderOption[]>;
430
445
  free: boolean;
431
446
  loadMethod: () => Promise<LewCascaderOption[]>;
447
+ onlyLeafSelectable: boolean;
432
448
  showAllLevels: boolean;
433
449
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
434
450
  lewPopoverRef: ({
@@ -664,7 +680,6 @@ declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractP
664
680
  }): any;
665
681
  };
666
682
  }) | null;
667
- lewCascaderRef: HTMLDivElement;
668
683
  }, HTMLDivElement>;
669
684
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
670
685
  export default _default;
@@ -0,0 +1,15 @@
1
+ import { LewCascaderOption } from '../../../../types';
2
+ export declare class CascaderNodeCache {
3
+ private nodeCache;
4
+ get(value: string): LewCascaderOption | undefined;
5
+ set(value: string, node: LewCascaderOption): void;
6
+ has(value: string): boolean;
7
+ clear(): void;
8
+ }
9
+ export declare function formatTree(tree: LewCascaderOption[], parentValuePaths?: string[], parentLabelPaths?: string[]): LewCascaderOption[];
10
+ export declare function findObjectByValue(treeList: LewCascaderOption[], value: string, cache?: CascaderNodeCache): LewCascaderOption | null;
11
+ export declare function findAndAddChildrenByValue(tree: LewCascaderOption[], value: string, children: LewCascaderOption[], cache?: CascaderNodeCache): LewCascaderOption[];
12
+ export declare function findChildrenByValue(tree: LewCascaderOption[], value: string, cache?: CascaderNodeCache): LewCascaderOption[];
13
+ export declare function createCascaderCache(): CascaderNodeCache;
14
+ export declare function validateCascaderTree(tree: LewCascaderOption[]): boolean;
15
+ export declare function findAllChildrenByValue(tree: LewCascaderOption[], value: string): LewCascaderOption[];
@@ -1,4 +1,11 @@
1
1
  export declare const cascaderEmits: {
2
- readonly change: (value?: string) => string | undefined;
2
+ readonly change: (value: any, items: any) => {
3
+ value: any;
4
+ items: any;
5
+ };
3
6
  readonly clear: () => boolean;
7
+ readonly delete: (value: string[], deletedItem: string) => {
8
+ value: string[];
9
+ deletedItem: string;
10
+ };
4
11
  };
@@ -27,16 +27,6 @@ export declare const cascaderProps: {
27
27
  default: boolean;
28
28
  validator: (value: any) => boolean;
29
29
  };
30
- showAllLevels: {
31
- type: BooleanConstructor;
32
- default: boolean;
33
- validator: (value: any) => boolean;
34
- };
35
- multiple: {
36
- type: BooleanConstructor;
37
- default: boolean;
38
- validator: (value: any) => boolean;
39
- };
40
30
  free: {
41
31
  type: BooleanConstructor;
42
32
  default: boolean;
@@ -78,5 +68,20 @@ export declare const cascaderProps: {
78
68
  default: boolean;
79
69
  validator: (value: any) => boolean;
80
70
  };
71
+ onlyLeafSelectable: {
72
+ type: BooleanConstructor;
73
+ default: boolean;
74
+ validator: (value: any) => boolean;
75
+ };
76
+ multiple: {
77
+ type: BooleanConstructor;
78
+ default: boolean;
79
+ validator: (value: any) => boolean;
80
+ };
81
+ showAllLevels: {
82
+ type: BooleanConstructor;
83
+ default: boolean;
84
+ validator: (value: any) => boolean;
85
+ };
81
86
  };
82
87
  export type LewCascaderProps = ExtractPublicPropTypes<typeof cascaderProps>;
@@ -11,7 +11,6 @@ export * from './input-tag';
11
11
  export * from './radio';
12
12
  export * from './rate';
13
13
  export * from './select';
14
- export * from './select-multiple';
15
14
  export * from './slider';
16
15
  export * from './slider-range';
17
16
  export * from './switch';
@@ -126,8 +126,8 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
126
126
  type: globalThis.PropType<string>;
127
127
  };
128
128
  }>, {
129
- toFocus: () => any;
130
- toBlur: () => any;
129
+ focus: () => any;
130
+ blur: () => any;
131
131
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
132
132
  input: (value?: string | undefined) => void;
133
133
  blur: (e: FocusEvent) => void;
@@ -1,4 +1,4 @@
1
- declare function toFocus(): void;
1
+ declare function focus(): void;
2
2
  declare function validCheck(): boolean;
3
3
  declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
4
4
  min: {
@@ -56,7 +56,7 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
56
56
  required: true;
57
57
  };
58
58
  }>, {
59
- toFocus: typeof toFocus;
59
+ focus: typeof focus;
60
60
  validCheck: typeof validCheck;
61
61
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
62
62
  input: (value?: string | undefined) => void;
@@ -246,8 +246,8 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
246
246
  "onUpdate:suffixValue"?: ((value: string | undefined) => any) | undefined;
247
247
  onOk?: ((value?: string | undefined) => any) | undefined;
248
248
  }>, {
249
- toFocus: () => any;
250
- toBlur: () => any;
249
+ focus: () => any;
250
+ blur: () => any;
251
251
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
252
252
  input: (value?: string | undefined) => void;
253
253
  blur: (e: FocusEvent) => void;
@@ -427,8 +427,8 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
427
427
  "onUpdate:suffixValue"?: ((value: string | undefined) => any) | undefined;
428
428
  onOk?: ((value?: string | undefined) => any) | undefined;
429
429
  }>, {
430
- toFocus: () => any;
431
- toBlur: () => any;
430
+ focus: () => any;
431
+ blur: () => any;
432
432
  }, {}, {}, {}, {
433
433
  maxLength: string | number;
434
434
  type: import('../../../..').LewInputType;