@capillarytech/blaze-ui 1.0.3-alpha.6 → 1.0.3-alpha.7
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/CapUnifiedSelect/CapUnifiedSelect.d.ts +2 -9
- package/CapUnifiedSelect/CapUnifiedSelect.d.ts.map +1 -1
- package/CapUnifiedSelect/constants.d.ts +57 -0
- package/CapUnifiedSelect/constants.d.ts.map +1 -0
- package/CapUnifiedSelect/index.js +196 -92
- package/CapUnifiedSelect/index.js.map +1 -1
- package/CapUnifiedSelect/testData.d.ts +107 -0
- package/CapUnifiedSelect/testData.d.ts.map +1 -0
- package/index.js +198 -94
- package/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Mock data for CapUnifiedSelect component tests
|
|
4
|
+
* Centralized test data to ensure consistency across all test cases
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Basic flat options array - used in most test cases
|
|
8
|
+
*/
|
|
9
|
+
export declare const mockOptions: {
|
|
10
|
+
label: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}[];
|
|
13
|
+
/**
|
|
14
|
+
* Tree structure options with parent-child relationships
|
|
15
|
+
*/
|
|
16
|
+
export declare const mockTreeOptions: {
|
|
17
|
+
label: string;
|
|
18
|
+
value: string;
|
|
19
|
+
children: {
|
|
20
|
+
label: string;
|
|
21
|
+
value: string;
|
|
22
|
+
}[];
|
|
23
|
+
}[];
|
|
24
|
+
/**
|
|
25
|
+
* Tree options with mixed structure (parent with children, some parents may not be leaf values)
|
|
26
|
+
*/
|
|
27
|
+
export declare const mockTreeOptionsWithMixed: {
|
|
28
|
+
label: string;
|
|
29
|
+
value: string;
|
|
30
|
+
children: {
|
|
31
|
+
label: string;
|
|
32
|
+
value: string;
|
|
33
|
+
}[];
|
|
34
|
+
}[];
|
|
35
|
+
/**
|
|
36
|
+
* Async search results - used for testing API-based search functionality
|
|
37
|
+
*/
|
|
38
|
+
export declare const mockAsyncResults: {
|
|
39
|
+
label: string;
|
|
40
|
+
value: string;
|
|
41
|
+
}[];
|
|
42
|
+
/**
|
|
43
|
+
* Async search results for caching tests
|
|
44
|
+
*/
|
|
45
|
+
export declare const mockAsyncResultsForCache: {
|
|
46
|
+
label: string;
|
|
47
|
+
value: string;
|
|
48
|
+
}[];
|
|
49
|
+
/**
|
|
50
|
+
* Async search results for resetSearch tests
|
|
51
|
+
*/
|
|
52
|
+
export declare const mockAsyncResultsForResetSearch: {
|
|
53
|
+
label: string;
|
|
54
|
+
value: string;
|
|
55
|
+
}[];
|
|
56
|
+
/**
|
|
57
|
+
* Async search results for scroll tests
|
|
58
|
+
*/
|
|
59
|
+
export declare const mockAsyncResultsForScroll: {
|
|
60
|
+
label: string;
|
|
61
|
+
value: string;
|
|
62
|
+
}[];
|
|
63
|
+
/**
|
|
64
|
+
* Simple async result for basic tests
|
|
65
|
+
*/
|
|
66
|
+
export declare const mockSimpleAsyncResult: {
|
|
67
|
+
label: string;
|
|
68
|
+
value: string;
|
|
69
|
+
}[];
|
|
70
|
+
/**
|
|
71
|
+
* Initial options for resetData timeout tests
|
|
72
|
+
*/
|
|
73
|
+
export declare const mockInitialOptions: {
|
|
74
|
+
label: string;
|
|
75
|
+
value: string;
|
|
76
|
+
}[];
|
|
77
|
+
/**
|
|
78
|
+
* Updated options for resetData timeout tests
|
|
79
|
+
*/
|
|
80
|
+
export declare const mockUpdatedOptions: {
|
|
81
|
+
label: string;
|
|
82
|
+
value: string;
|
|
83
|
+
}[];
|
|
84
|
+
/**
|
|
85
|
+
* New options for resetData cleanup tests
|
|
86
|
+
*/
|
|
87
|
+
export declare const mockNewOptions: {
|
|
88
|
+
label: string;
|
|
89
|
+
value: string;
|
|
90
|
+
}[];
|
|
91
|
+
/**
|
|
92
|
+
* Options with React element titles - used for testing custom title rendering
|
|
93
|
+
* Returns a function that creates the options with React elements
|
|
94
|
+
*/
|
|
95
|
+
export declare const getMockOptionsWithReactTitle: () => {
|
|
96
|
+
label: string;
|
|
97
|
+
value: string;
|
|
98
|
+
title: React.DetailedReactHTMLElement<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
99
|
+
}[];
|
|
100
|
+
/**
|
|
101
|
+
* Empty options array - used for testing empty states
|
|
102
|
+
*/
|
|
103
|
+
export declare const mockEmptyOptions: Array<{
|
|
104
|
+
label: string;
|
|
105
|
+
value: string;
|
|
106
|
+
}>;
|
|
107
|
+
//# sourceMappingURL=testData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testData.d.ts","sourceRoot":"","sources":["../../components/CapUnifiedSelect/testData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;GAGG;AAEH;;GAEG;AACH,eAAO,MAAM,WAAW;;;GAIvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;GAc3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;GASpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;GAG5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;GAGpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,8BAA8B;;;GAG1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;GAGrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;GAAyC,CAAC;AAE5E;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;GAG9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;GAG9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc;;;GAG1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B;;;;GAWxC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAM,CAAC"}
|