@capillarytech/blaze-ui 1.0.3-alpha.12 → 1.0.3-alpha.14
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 +1 -21
- package/CapUnifiedSelect/CapUnifiedSelect.d.ts.map +1 -1
- package/CapUnifiedSelect/components.d.ts +9 -0
- package/CapUnifiedSelect/components.d.ts.map +1 -0
- package/CapUnifiedSelect/constants.d.ts +0 -28
- package/CapUnifiedSelect/constants.d.ts.map +1 -1
- package/CapUnifiedSelect/index.js +406 -699
- package/CapUnifiedSelect/index.js.map +1 -1
- package/CapUnifiedSelect/testData.d.ts +0 -50
- package/CapUnifiedSelect/testData.d.ts.map +1 -1
- package/CapUnifiedSelect/types.d.ts +45 -0
- package/CapUnifiedSelect/types.d.ts.map +1 -0
- package/CapUnifiedSelect/utils.d.ts +34 -0
- package/CapUnifiedSelect/utils.d.ts.map +1 -0
- package/index.js +406 -699
- package/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
import type { TreeSelectProps } from 'antd-v5';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { type SelectType } from './constants';
|
|
4
|
-
|
|
5
|
-
label?: React.ReactNode;
|
|
6
|
-
value?: string | number;
|
|
7
|
-
key?: string | number;
|
|
8
|
-
title?: React.ReactNode;
|
|
9
|
-
children?: OptionData[];
|
|
10
|
-
optionSuffix?: React.ReactNode;
|
|
11
|
-
optionSuffixInfo?: React.ReactNode;
|
|
12
|
-
optionTooltipInfo?: React.ReactNode;
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
[key: string]: unknown;
|
|
15
|
-
}
|
|
4
|
+
import type { OptionData } from './types';
|
|
16
5
|
export interface CapUnifiedSelectProps extends Omit<TreeSelectProps, 'treeData' | 'value' | 'onChange'> {
|
|
17
6
|
type?: SelectType;
|
|
18
7
|
options?: OptionData[];
|
|
@@ -128,10 +117,6 @@ export interface CapUnifiedSelectProps extends Omit<TreeSelectProps, 'treeData'
|
|
|
128
117
|
* Callback function triggered to reset/load initial data.
|
|
129
118
|
* Called when dropdown closes, confirm button is clicked, or clear button is clicked.
|
|
130
119
|
* This allows the developer to trigger an API call to reload initial data.
|
|
131
|
-
* @example
|
|
132
|
-
* resetData={() => {
|
|
133
|
-
* actions.loadInitialDataRequest();
|
|
134
|
-
* }}
|
|
135
120
|
*/
|
|
136
121
|
resetData?: () => void;
|
|
137
122
|
/**
|
|
@@ -140,11 +125,6 @@ export interface CapUnifiedSelectProps extends Omit<TreeSelectProps, 'treeData'
|
|
|
140
125
|
* The component automatically detects missing selected values and calls this function with an array of missing values.
|
|
141
126
|
* Only called when there are actually missing values to prevent unnecessary API calls.
|
|
142
127
|
* @param missingValues - Array of selected values that are not present in the current options
|
|
143
|
-
* @example
|
|
144
|
-
* fetchMissingOptions={(missingValues) => {
|
|
145
|
-
* // Fetch the missing options from API
|
|
146
|
-
* actions.fetchOptionsByIds({ ids: missingValues });
|
|
147
|
-
* }}
|
|
148
128
|
*/
|
|
149
129
|
fetchMissingOptions?: (missingValues: (string | number)[]) => void;
|
|
150
130
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CapUnifiedSelect.d.ts","sourceRoot":"","sources":["../../components/CapUnifiedSelect/CapUnifiedSelect.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"CapUnifiedSelect.d.ts","sourceRoot":"","sources":["../../components/CapUnifiedSelect/CapUnifiedSelect.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,KAA4D,MAAM,OAAO,CAAC;AAUjF,OAAO,EAAoC,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAEhF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAU1C,MAAM,WAAW,qBACf,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MG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,SAAS,KAAK,IAAI,CAAC;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC;IAC/D;;;;;;;;;;;;OAYG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,CAAC,aAAa,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC;CACpE;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAs0CrD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { NoResultProps, SelectAllCheckboxProps } from './types';
|
|
3
|
+
export declare const NoResult: React.FC<NoResultProps>;
|
|
4
|
+
/**
|
|
5
|
+
* SelectAllCheckbox component for selecting/deselecting all available options
|
|
6
|
+
* Only shown for multi-select with static data
|
|
7
|
+
*/
|
|
8
|
+
export declare const SelectAllCheckbox: React.FC<SelectAllCheckboxProps>;
|
|
9
|
+
//# sourceMappingURL=components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../components/CapUnifiedSelect/components.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,KAAK,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAErE,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAiB5C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA+C9D,CAAC"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Select type constants for CapUnifiedSelect component
|
|
3
|
-
*/
|
|
4
1
|
export declare const SELECT_TYPES: {
|
|
5
2
|
readonly SELECT: "select";
|
|
6
3
|
readonly MULTI_SELECT: "multiSelect";
|
|
@@ -8,52 +5,27 @@ export declare const SELECT_TYPES: {
|
|
|
8
5
|
readonly MULTI_TREE_SELECT: "multiTreeSelect";
|
|
9
6
|
};
|
|
10
7
|
export type SelectType = (typeof SELECT_TYPES)[keyof typeof SELECT_TYPES];
|
|
11
|
-
/**
|
|
12
|
-
* Timeout constants (in milliseconds)
|
|
13
|
-
*/
|
|
14
8
|
export declare const TIMEOUTS: {
|
|
15
|
-
/** Default search debounce timeout */
|
|
16
9
|
readonly DEFAULT_SEARCH_DEBOUNCE: 300;
|
|
17
|
-
/** Delay for state updates after search */
|
|
18
10
|
readonly SEARCH_STATE_UPDATE_DELAY: 100;
|
|
19
|
-
/** Minimum time since search was cleared to consider data ready */
|
|
20
11
|
readonly SEARCH_CLEARED_TIMEOUT: 200;
|
|
21
|
-
/** Buffer time added to debounce for cleared search */
|
|
22
12
|
readonly SEARCH_CLEARED_BUFFER: 300;
|
|
23
|
-
/** Buffer time added to debounce for regular search */
|
|
24
13
|
readonly SEARCH_REGULAR_BUFFER: 500;
|
|
25
|
-
/** Brief delay to show loading indicator for static search */
|
|
26
14
|
readonly STATIC_SEARCH_DELAY: 150;
|
|
27
|
-
/** Timeout for resetData fallback (1 second) */
|
|
28
15
|
readonly RESET_DATA_TIMEOUT: 1000;
|
|
29
|
-
/** Minimum time since resetData was called to consider data ready */
|
|
30
16
|
readonly RESET_DATA_MIN_TIME: 300;
|
|
31
|
-
/** Maximum time since resetData was called to consider data ready */
|
|
32
17
|
readonly RESET_DATA_MAX_TIME: 2000;
|
|
33
|
-
/** Fallback timeout for scroll loading (10 seconds) */
|
|
34
18
|
readonly SCROLL_LOADING_TIMEOUT: 10000;
|
|
35
|
-
/** Delay before setting up scroll container listener */
|
|
36
19
|
readonly SCROLL_CONTAINER_DELAY: 100;
|
|
37
20
|
};
|
|
38
|
-
/**
|
|
39
|
-
* Default values for component props
|
|
40
|
-
*/
|
|
41
21
|
export declare const DEFAULTS: {
|
|
42
|
-
/** Default placeholder text */
|
|
43
22
|
readonly PLACEHOLDER: "Select an option";
|
|
44
|
-
/** Default upload button label */
|
|
45
23
|
readonly UPLOAD_LABEL: "Upload";
|
|
46
|
-
/** Default clear button text */
|
|
47
24
|
readonly CLEAR_TEXT: "Clear";
|
|
48
|
-
/** Default no results message */
|
|
49
25
|
readonly NO_RESULT_TEXT: "No results found";
|
|
50
|
-
/** Default no results icon */
|
|
51
26
|
readonly NO_RESULT_ICON: "warning";
|
|
52
|
-
/** Default virtual row height in pixels */
|
|
53
27
|
readonly VIRTUAL_ROW_HEIGHT: 32;
|
|
54
|
-
/** Default list height in pixels */
|
|
55
28
|
readonly LIST_HEIGHT: 256;
|
|
56
|
-
/** Default search input placeholder */
|
|
57
29
|
readonly SEARCH_PLACEHOLDER: "Search";
|
|
58
30
|
};
|
|
59
31
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../components/CapUnifiedSelect/constants.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../components/CapUnifiedSelect/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;CAKf,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE1E,eAAO,MAAM,QAAQ;;;;;;;;;;;;CAYX,CAAC;AAEX,eAAO,MAAM,QAAQ;;;;;;;;;CASX,CAAC"}
|