@capillarytech/blaze-ui 5.21.0 → 5.22.0
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/CapLanguageProvider/actions.js +125 -0
- package/CapLanguageProvider/actions.js.map +1 -0
- package/CapLanguageProvider/constants.js +37 -0
- package/CapLanguageProvider/constants.js.map +1 -0
- package/package.json +1 -1
- package/CapActionBar/README.md +0 -11
- package/CapAdvancedIcon/README.md +0 -185
- package/CapAdvancedIcon/use-cases.md +0 -44
- package/CapAlert/README.md +0 -144
- package/CapAppNotEnabled/README.md +0 -84
- package/CapAskAira/README.md +0 -328
- package/CapBanner/README.md +0 -4
- package/CapBlock/README.md +0 -175
- package/CapBorderedBox/Status.md +0 -40
- package/CapCSVFileUploader/README.md +0 -124
- package/CapCSVFileUploader/Status.md +0 -47
- package/CapCard/README.md +0 -85
- package/CapCard/Status.md +0 -41
- package/CapCardBox/README.md +0 -169
- package/CapCardBox/Status.md +0 -52
- package/CapCarousel/README.md +0 -190
- package/CapCarousel/Status.md +0 -73
- package/CapCheckbox/README.md +0 -254
- package/CapCheckbox/Status.md +0 -41
- package/CapColorPicker/README.md +0 -112
- package/CapColorPicker/Status.md +0 -52
- package/CapColorPicker/tests/USE_CASES_ANALYSIS.md +0 -92
- package/CapColoredTag/README.md +0 -167
- package/CapColoredTag/Status.md +0 -49
- package/CapConditionPreview/MIGRATION_ANALYSIS.md +0 -70
- package/CapConditionPreview/README.md +0 -40
- package/CapConditionPreview/tests/USE_CASES_CapConditionPreview.md +0 -65
- package/CapCustomCard/README.md +0 -182
- package/CapCustomCard/Status.md +0 -40
- package/CapCustomCarousel/Status.md +0 -69
- package/CapCustomCheckboxList/README.md +0 -178
- package/CapCustomCheckboxList/Status.md +0 -52
- package/CapCustomCheckboxList/tests/USE_CASES_ANALYSIS.md +0 -174
- package/CapCustomList/README.md +0 -117
- package/CapCustomList/Status.md +0 -77
- package/CapCustomList/tests/USE_CASES_ANALYSIS.md +0 -124
- package/CapCustomSelect/README.md +0 -38
- package/CapDatePicker/README.md +0 -139
- package/CapDateRangePicker/README.md +0 -159
- package/CapDateTimePicker/README.md +0 -136
- package/CapDateTimeRangePicker/README.md +0 -243
- package/CapDivider/README.md +0 -122
- package/CapDrawer/README.md +0 -207
- package/CapDrawer/Status.md +0 -52
- package/CapDrawer/tests/MISSING_USE_CASES.md +0 -170
- package/CapDropdown/README.md +0 -515
- package/CapDropdown/Status.md +0 -45
- package/CapDropdown/tests/USE_CASES_ANALYSIS.md +0 -137
- package/CapError/README.md +0 -88
- package/CapErrorBoundary/CapErrorBoundary-use-cases.md +0 -89
- package/CapErrorBoundary/README.md +0 -150
- package/CapErrorStateIllustration/README.md +0 -222
- package/CapErrorStateIllustration/USE_CASES.md +0 -33
- package/CapExpressionEditor/README.md +0 -32
- package/CapForm/README.md +0 -132
- package/CapForm/Status.md +0 -40
- package/CapForm/tests/PHASE1_UNFULFILLED_USE_CASES.md +0 -113
- package/CapForm/tests/USE_CASES_ANALYSIS.md +0 -119
- package/CapFormItem/README.md +0 -320
- package/CapFormItem/Status.md +0 -73
- package/CapFormItem/tests/USE_CASES_ANALYSIS.md +0 -84
- package/CapGraph/README.md +0 -69
- package/CapGraph/USE_CASES.md +0 -66
- package/CapHamburgerMenu/README.md +0 -234
- package/CapHamburgerMenu/USE_CASES.md +0 -48
- package/CapHeader/Status.md +0 -41
- package/CapHeading/README.md +0 -220
- package/CapHeading/Status.md +0 -41
- package/CapIcon/README.md +0 -207
- package/CapIllustration/Status.md +0 -41
- package/CapImage/README.md +0 -50
- package/CapImportMFEComponent/README.md +0 -121
- package/CapInfoNote/Status.md +0 -40
- package/CapInfoNote/tests/USE_CASES_ANALYSIS.md +0 -114
- package/CapInput/README.md +0 -196
- package/CapInput/Status.md +0 -123
- package/CapInput/tests/USE_CASES_ANALYSIS.md +0 -169
- package/CapLanguageProvider/CapLanguageProvider-use-cases.md +0 -56
- package/CapLanguageProvider/README.md +0 -206
- package/CapLevelGraphRenderer/CapLevelGraphRenderer-test-cases.md +0 -50
- package/CapLevelGraphRenderer/README.md +0 -123
- package/CapLevelGraphRenderer/Tooltip_MIGRATION_ANALYSIS.md +0 -120
- package/CapLink/README.md +0 -203
- package/CapLink/Status.md +0 -32
- package/CapLink/tests/CapLink.missingUseCases.md +0 -95
- package/CapList/README.md +0 -129
- package/CapList/Status.md +0 -69
- package/CapListLayout/README.md +0 -7
- package/CapLogin/README.md +0 -7
- package/CapMenu/README.md +0 -86
- package/CapModal/README.md +0 -357
- package/CapModal/Status.md +0 -52
- package/CapModal/tests/USE_CASES_GAPS.md +0 -207
- package/CapMultiSelect/README.md +0 -170
- package/CapMultiSelect/tests/USE_CASES_ANALYSIS.md +0 -29
- package/CapMultiSelectDatePicker/README.md +0 -11
- package/CapNavigation/README.md +0 -72
- package/CapNotification/README.md +0 -228
- package/CapNotificationDropdown/README.md +0 -5
- package/CapPopover/README.md +0 -234
- package/CapProgress/Status.md +0 -40
- package/CapRadio/Status.md +0 -54
- package/CapRadioButton/README.md +0 -152
- package/CapRadioButton/Status.md +0 -70
- package/CapRadioButton/tests/USE_CASES_ANALYSIS.md +0 -120
- package/CapRadioCard/README.md +0 -161
- package/CapRadioCard/Status.md +0 -78
- package/CapRadioGroup/README.md +0 -141
- package/CapRadioGroup/Status.md +0 -59
- package/CapReorderComponent/README.md +0 -179
- package/CapReorderComponent/Status.md +0 -41
- package/CapRoadMap/README.md +0 -126
- package/CapRoadMap/Status.md +0 -53
- package/CapRoadMap/tests/USE_CASE_GAPS.md +0 -92
- package/CapRow/README.md +0 -424
- package/CapSKUUploader/README.md +0 -189
- package/CapSKUUploader/Status.md +0 -66
- package/CapSecondaryTopBar/README.md +0 -7
- package/CapSelect/README.md +0 -243
- package/CapSelectFilter/README.md +0 -121
- package/CapShape/README.md +0 -96
- package/CapShape/Status.md +0 -36
- package/CapShape/tests/USE_CASES_ANALYSIS.md +0 -120
- package/CapSideBar/README.md +0 -298
- package/CapSideBar/Status.md +0 -5
- package/CapSlideBox/README.md +0 -68
- package/CapSlider/README.md +0 -423
- package/CapSlider/Status.md +0 -48
- package/CapSlider/tests/TEST_COVERAGE.md +0 -118
- package/CapSnackBar/README.md +0 -222
- package/CapSnackBar/Status.md +0 -41
- package/CapSomethingWentWrong/README.md +0 -97
- package/CapSplit/README.md +0 -19
- package/CapStatisticCard/README.md +0 -138
- package/CapStatus/README.md +0 -148
- package/CapStatus/Status.md +0 -40
- package/CapSteps/Status.md +0 -40
- package/CapStepsAccordian/README.md +0 -305
- package/CapStepsAccordian/Status.md +0 -48
- package/CapSupportVideosWrapper/README.md +0 -14
- package/CapSwitch/README.md +0 -351
- package/CapTab/README.md +0 -406
- package/CapTab/Status.md +0 -104
- package/CapTab/tests/USE_CASE_GAPS.md +0 -143
- package/CapTabV3/ANALYSIS.md +0 -60
- package/CapTabV3/README.md +0 -156
- package/CapTabV3/Status.md +0 -52
- package/CapTabV3/tests/USE_CASE_GAPS.md +0 -149
- package/CapTable/README.md +0 -160
- package/CapTable/Status.md +0 -41
- package/CapTag/README.md +0 -16
- package/CapTagDropdown/README.md +0 -171
- package/CapTagDropdown/Status.md +0 -55
- package/CapTimePicker/README.md +0 -170
- package/CapTooltip/README.md +0 -336
- package/CapTooltipWithInfo/Status.md +0 -75
- package/CapTopBar/README.md +0 -146
- package/CapTree/README.md +0 -124
- package/CapTree/Status.md +0 -48
- package/CapTree/tests/STATUS.md +0 -154
- package/CapTreeSelect/README.md +0 -217
- package/CapTreeSelect/Status.md +0 -52
- package/CapTruncateList/README.md +0 -13
- package/CapUnifiedSelect/README.md +0 -40
- package/CapUploader/README.md +0 -313
- package/CapUploader/Status.md +0 -76
- package/CapUploader/tests/USE_CASES_ANALYSIS.md +0 -225
- package/CapUserProfile/README.md +0 -105
- package/CapUserProfile/Status.md +0 -95
- package/CapVirtualList/README.md +0 -162
- package/CapVirtualList/Status.md +0 -71
- package/assets/HOCs/ComponentWithLabelHOC/README.md +0 -230
package/CapTree/Status.md
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# Migration Status: CapTree
|
|
2
|
-
|
|
3
|
-
**Last Updated**: 2026-02-05 09:45:06
|
|
4
|
-
|
|
5
|
-
## Migration Steps
|
|
6
|
-
|
|
7
|
-
- [x] **Step 0**: Setup branch and remote tracking
|
|
8
|
-
- [x] **Step 1**: Migration Prompt 1 (Main migration)
|
|
9
|
-
- [x] **Step 1.5**: Export component in blaze-ui/components/index.ts
|
|
10
|
-
- [x] **Step 2**: Migration Prompt 2 (Storybook support)
|
|
11
|
-
- [x] **Step 2.5**: Verify deprecated props and prop changes (REQUIRED - enforced)
|
|
12
|
-
- [x] **Step 3**: Migration Prompt 3 (Unit tests)
|
|
13
|
-
- [x] **Step 4**: Migration Prompt 4 (Visual test cases)
|
|
14
|
-
- [x] **Step 5**: Linting (ESLint)
|
|
15
|
-
- [x] **Step 6**: Pre-build Validation
|
|
16
|
-
- [x] **Step 7**: Build blaze-ui
|
|
17
|
-
- [x] **Step 8**: Visual Testing
|
|
18
|
-
- [ ] **Step 9**: CSS Analysis (if mismatches found)
|
|
19
|
-
- [ ] **Step 9.5**: CSS Analysis Completed
|
|
20
|
-
- [x] **Step 10**: Git Commit & Push to branch (pre-commit hook will run tests)
|
|
21
|
-
- [x] **Step 11**: Create Pull Request
|
|
22
|
-
|
|
23
|
-
## Deprecated Props Verification
|
|
24
|
-
|
|
25
|
-
_No deprecated props verification results yet._
|
|
26
|
-
|
|
27
|
-
**Note**: Step 2.5 is REQUIRED and enforced.
|
|
28
|
-
- Focus: **Ant Design component prop changes** (e.g., Dropdown, Input, Alert, Tooltip, etc.)
|
|
29
|
-
- Reference: MIGRATION_CHANGELOG_TEMPLATE.md for format, ANTD_V6_MIGRATION.md for Ant Design deprecated APIs
|
|
30
|
-
- Skip: If original component doesn't exist in cap-ui-library
|
|
31
|
-
- All deprecated Ant Design props and prop changes must be documented before proceeding.
|
|
32
|
-
|
|
33
|
-
## Visual Testing Results
|
|
34
|
-
|
|
35
|
-
**Last Test**: 2026-02-05 09:45:06
|
|
36
|
-
**Maximum Mismatch**: 0%
|
|
37
|
-
|
|
38
|
-
### Mismatched Variants:
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
## CSS Fixes Applied
|
|
43
|
-
|
|
44
|
-
_No CSS fixes applied yet._
|
|
45
|
-
|
|
46
|
-
## Notes
|
|
47
|
-
|
|
48
|
-
_No notes yet._
|
package/CapTree/tests/STATUS.md
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
# CapTree Test Implementation Status
|
|
2
|
-
|
|
3
|
-
## Phase 0: Use Cases Extraction
|
|
4
|
-
|
|
5
|
-
**Status**: ⚠️ **LIMITATION** - Google Sheets access unavailable
|
|
6
|
-
|
|
7
|
-
**Note**: The MCP server `google_sheets` was not accessible during test creation. Tests were created based on:
|
|
8
|
-
- Component implementation analysis (`index.tsx`, `types.ts`)
|
|
9
|
-
- Storybook examples (`CapTree.stories.tsx`)
|
|
10
|
-
- Ant Design Tree component documentation
|
|
11
|
-
- Existing test patterns in the codebase
|
|
12
|
-
|
|
13
|
-
## Phase 1: Use Cases Analysis
|
|
14
|
-
|
|
15
|
-
### Use Cases CapTree DOES Fulfill ✅
|
|
16
|
-
|
|
17
|
-
1. **Basic Tree Rendering**
|
|
18
|
-
- ✅ Renders tree structure from `treeData` prop
|
|
19
|
-
- ✅ Supports nested/hierarchical data
|
|
20
|
-
- ✅ Handles empty tree data
|
|
21
|
-
|
|
22
|
-
2. **Selection Features**
|
|
23
|
-
- ✅ Single and multiple selection (`multiple` prop)
|
|
24
|
-
- ✅ Controlled and uncontrolled selection (`selectedKeys`)
|
|
25
|
-
- ✅ Default selected keys (`defaultSelectedKeys`)
|
|
26
|
-
|
|
27
|
-
3. **Expansion Features**
|
|
28
|
-
- ✅ Expand/collapse nodes
|
|
29
|
-
- ✅ Default expanded keys (`defaultExpandedKeys`)
|
|
30
|
-
- ✅ Expand all (`defaultExpandAll`)
|
|
31
|
-
- ✅ Controlled expansion (`expandedKeys`)
|
|
32
|
-
|
|
33
|
-
4. **Checkbox Features**
|
|
34
|
-
- ✅ Checkable nodes (`checkable` prop)
|
|
35
|
-
- ✅ Controlled checked keys (`checkedKeys`)
|
|
36
|
-
- ✅ Default checked keys (`defaultCheckedKeys`)
|
|
37
|
-
- ✅ Half-checked state support
|
|
38
|
-
|
|
39
|
-
5. **Visual Customization**
|
|
40
|
-
- ✅ Show/hide lines (`showLine`)
|
|
41
|
-
- ✅ Show/hide icons (`showIcon`)
|
|
42
|
-
- ✅ Custom icons per node
|
|
43
|
-
- ✅ Custom className
|
|
44
|
-
- ✅ Block node layout (`blockNode`)
|
|
45
|
-
|
|
46
|
-
6. **Interaction Handlers**
|
|
47
|
-
- ✅ `onSelect` callback
|
|
48
|
-
- ✅ `onExpand` callback
|
|
49
|
-
- ✅ `onCheck` callback
|
|
50
|
-
- ✅ `onRightClick` callback
|
|
51
|
-
- ✅ `onDoubleClick` callback
|
|
52
|
-
- ✅ `loadData` for async loading
|
|
53
|
-
|
|
54
|
-
7. **Accessibility**
|
|
55
|
-
- ✅ Keyboard navigation (Arrow keys, Enter, Space)
|
|
56
|
-
- ✅ ARIA attributes support
|
|
57
|
-
- ✅ Tree role
|
|
58
|
-
|
|
59
|
-
8. **Backward Compatibility**
|
|
60
|
-
- ✅ Deprecated `TreeNode` children pattern (with warnings)
|
|
61
|
-
- ✅ All Ant Design Tree props pass-through
|
|
62
|
-
|
|
63
|
-
### Use Cases CapTree DOES NOT Fulfill ❌
|
|
64
|
-
|
|
65
|
-
**Note**: These may be intentional design decisions since CapTree is a thin wrapper around Ant Design Tree.
|
|
66
|
-
|
|
67
|
-
1. **Built-in Search Functionality**
|
|
68
|
-
- ❌ No search/filter capability (unlike `CapTreeView` and `CapPopoverTree`)
|
|
69
|
-
- **Workaround**: Implement search externally and filter `treeData`
|
|
70
|
-
|
|
71
|
-
2. **Loading States**
|
|
72
|
-
- ❌ No built-in loading indicator
|
|
73
|
-
- **Workaround**: Wrap component with `CapSpin` or show loading externally
|
|
74
|
-
|
|
75
|
-
3. **Empty State Messages**
|
|
76
|
-
- ❌ No custom empty state message
|
|
77
|
-
- **Workaround**: Conditionally render message when `treeData` is empty
|
|
78
|
-
|
|
79
|
-
4. **Select All Functionality**
|
|
80
|
-
- ❌ No built-in "select all" feature (unlike `CapMultiSelectWithTree`)
|
|
81
|
-
- **Workaround**: Implement externally by managing `checkedKeys`
|
|
82
|
-
|
|
83
|
-
5. **Node Counter/Statistics**
|
|
84
|
-
- ❌ No built-in node counting (unlike `CapTreeView`)
|
|
85
|
-
- **Workaround**: Calculate externally from `treeData`
|
|
86
|
-
|
|
87
|
-
6. **Custom Node Rendering**
|
|
88
|
-
- ❌ Limited to Ant Design's default node rendering
|
|
89
|
-
- **Workaround**: Use `title` prop with React nodes or `titleRender` prop
|
|
90
|
-
|
|
91
|
-
7. **Drag and Drop**
|
|
92
|
-
- ❌ No built-in drag-and-drop support
|
|
93
|
-
- **Workaround**: Use Ant Design's `draggable` prop (if supported in v6)
|
|
94
|
-
|
|
95
|
-
8. **Virtual Scrolling**
|
|
96
|
-
- ❌ No virtual scrolling for large trees
|
|
97
|
-
- **Workaround**: Use Ant Design's virtual scrolling features (if available)
|
|
98
|
-
|
|
99
|
-
9. **Search Highlighting**
|
|
100
|
-
- ❌ No built-in search result highlighting
|
|
101
|
-
- **Workaround**: Implement externally by modifying node titles
|
|
102
|
-
|
|
103
|
-
10. **Bulk Operations**
|
|
104
|
-
- ❌ No built-in bulk select/expand/collapse
|
|
105
|
-
- **Workaround**: Implement externally by managing state
|
|
106
|
-
|
|
107
|
-
## Phase 2: Test Implementation
|
|
108
|
-
|
|
109
|
-
**Status**: ✅ **COMPLETE**
|
|
110
|
-
|
|
111
|
-
### Test Coverage
|
|
112
|
-
|
|
113
|
-
- ✅ Default rendering and initialization (6 tests)
|
|
114
|
-
- ✅ Prop variations and functional impact (10 tests)
|
|
115
|
-
- ✅ Controlled state management (4 tests)
|
|
116
|
-
- ✅ User interactions (6 tests)
|
|
117
|
-
- ✅ Callbacks and event handlers (5 tests)
|
|
118
|
-
- ✅ Edge cases (7 tests)
|
|
119
|
-
- ✅ Accessibility (6 tests)
|
|
120
|
-
- ✅ Backward compatibility (5 tests)
|
|
121
|
-
- ✅ Data flow and state management (4 tests)
|
|
122
|
-
- ✅ Conditional rendering logic (6 tests)
|
|
123
|
-
|
|
124
|
-
**Total**: ~59 test cases
|
|
125
|
-
|
|
126
|
-
### Test Files Created
|
|
127
|
-
|
|
128
|
-
1. `CapTree.test.tsx` - Comprehensive test suite
|
|
129
|
-
2. `CapTree.mockData.ts` - Reusable mock data structures (converted from .tsx to .ts)
|
|
130
|
-
|
|
131
|
-
### Test Patterns Used
|
|
132
|
-
|
|
133
|
-
- ✅ `it.each` for repetitive prop variations
|
|
134
|
-
- ✅ Reusable `renderWithProps` helper function
|
|
135
|
-
- ✅ Mock data separated into dedicated file
|
|
136
|
-
- ✅ Focus on functional behavior and user interactions
|
|
137
|
-
- ✅ No styling/CSS class testing (only functional behavior)
|
|
138
|
-
- ✅ No implementation detail testing
|
|
139
|
-
- ✅ DRY principles with helper functions
|
|
140
|
-
- ✅ Comprehensive edge case coverage
|
|
141
|
-
|
|
142
|
-
## Recommendations
|
|
143
|
-
|
|
144
|
-
1. **For Search Functionality**: Consider creating `CapTreeWithSearch` wrapper component
|
|
145
|
-
2. **For Loading States**: Document wrapping pattern with `CapSpin`
|
|
146
|
-
3. **For Empty States**: Document conditional rendering pattern
|
|
147
|
-
4. **For Advanced Features**: Consider if these belong in CapTree or separate components
|
|
148
|
-
|
|
149
|
-
## Next Steps
|
|
150
|
-
|
|
151
|
-
1. Run test suite: `npm test -- components/CapTree/tests/CapTree.test.tsx`
|
|
152
|
-
2. Check coverage: `npm test -- --coverage components/CapTree`
|
|
153
|
-
3. Review and update use cases based on Google Sheets data (when accessible)
|
|
154
|
-
4. Add integration tests if needed
|
package/CapTreeSelect/README.md
DELETED
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
# CapTreeSelect Migration Guide
|
|
2
|
-
|
|
3
|
-
## Summary
|
|
4
|
-
|
|
5
|
-
CapTreeSelect has been migrated from `cap-ui-library` to `blaze-ui` with the following changes:
|
|
6
|
-
|
|
7
|
-
- Converted from JavaScript to TypeScript
|
|
8
|
-
- Converted from styled-components to SCSS modules
|
|
9
|
-
- Migrated to Ant Design v6 APIs
|
|
10
|
-
- Added backward compatibility for deprecated props
|
|
11
|
-
- Added TypeScript interfaces for props
|
|
12
|
-
- Maintained backward compatibility with the existing API
|
|
13
|
-
|
|
14
|
-
## Breaking Changes
|
|
15
|
-
|
|
16
|
-
**No breaking changes from cap-ui-library v8.x**
|
|
17
|
-
|
|
18
|
-
The component maintains backward compatibility with deprecated props. However, deprecated props will show console warnings in development mode and should be migrated to the new API.
|
|
19
|
-
|
|
20
|
-
## Prop Changes
|
|
21
|
-
|
|
22
|
-
### New Props (v6 API)
|
|
23
|
-
|
|
24
|
-
| Prop | Type | Default | Description |
|
|
25
|
-
|------|------|---------|-------------|
|
|
26
|
-
| `open` | `boolean` | `undefined` | Whether the dropdown is open (Ant Design TreeSelect v6 API) |
|
|
27
|
-
| `onOpenChange` | `(open: boolean) => void` | `undefined` | Callback when dropdown open state changes (Ant Design TreeSelect v6 API) |
|
|
28
|
-
| `popupClassName` | `string` | `undefined` | Custom class name for the popup dropdown (Ant Design TreeSelect v6 API) |
|
|
29
|
-
|
|
30
|
-
### Deprecated Props (Still Supported)
|
|
31
|
-
|
|
32
|
-
The following props are deprecated Ant Design TreeSelect component props but still supported for backward compatibility. They will show console warnings in development mode:
|
|
33
|
-
|
|
34
|
-
| Deprecated Prop | Replacement | Ant Design Component | Notes |
|
|
35
|
-
|----------------|-------------|---------------------|-------|
|
|
36
|
-
| `visible` | `open` | TreeSelect | Use `open` for controlled state (Ant Design v6 API) |
|
|
37
|
-
| `onVisibleChange` | `onOpenChange` | TreeSelect | Use `onOpenChange` for controlled state callbacks (Ant Design v6 API) |
|
|
38
|
-
| `dropdownClassName` | `popupClassName` | TreeSelect | Use `popupClassName` for popup dropdown styling (Ant Design v6 API) |
|
|
39
|
-
|
|
40
|
-
**Note**: These deprecated props are Ant Design TreeSelect component prop changes from v5 to v6. They will be removed in the next major version. Please migrate to the new prop names.
|
|
41
|
-
|
|
42
|
-
**Reference**: See [Ant Design v6 Migration Guide](https://ant.design/docs/react/migration-v6) for details on Ant Design component prop changes.
|
|
43
|
-
|
|
44
|
-
### Other Props
|
|
45
|
-
|
|
46
|
-
| Prop | Type | Default | Description |
|
|
47
|
-
|------|------|---------|-------------|
|
|
48
|
-
| `treeData` | `TreeSelectProps['treeData']` | **Required** | Tree data for TreeSelect component |
|
|
49
|
-
| `className` | `string` | `undefined` | Additional CSS class name |
|
|
50
|
-
| `headerTitle` | `string` | `undefined` | Optional header title displayed above the TreeSelect |
|
|
51
|
-
| `headerDescription` | `string` | `undefined` | Optional header description displayed below the title |
|
|
52
|
-
| `treeSelectSideLabel` | `string` | `undefined` | Optional label displayed to the left of the TreeSelect |
|
|
53
|
-
| `disabledTooltip` | `string` | `undefined` | Optional tooltip text shown when TreeSelect is disabled |
|
|
54
|
-
| `infoNote` | `string` | `undefined` | Optional info note message displayed above the TreeSelect |
|
|
55
|
-
| `infoNoteWidth` | `string` | `'60%'` | Optional width for the info note |
|
|
56
|
-
| `...rest` | `TreeSelectProps` | - | All other TreeSelect props from Ant Design v6 |
|
|
57
|
-
|
|
58
|
-
## API Changes
|
|
59
|
-
|
|
60
|
-
### Ant Design TreeSelect Component Prop Changes
|
|
61
|
-
|
|
62
|
-
CapTreeSelect wraps Ant Design's TreeSelect component. The following Ant Design TreeSelect props have been deprecated in v6:
|
|
63
|
-
|
|
64
|
-
#### Controlled Open State (Ant Design TreeSelect v6 API)
|
|
65
|
-
|
|
66
|
-
**Ant Design TreeSelect prop change**: `visible` → `open`, `onVisibleChange` → `onOpenChange`
|
|
67
|
-
|
|
68
|
-
```tsx
|
|
69
|
-
// New Ant Design v6 API (recommended)
|
|
70
|
-
const [open, setOpen] = useState(false);
|
|
71
|
-
|
|
72
|
-
<CapTreeSelect
|
|
73
|
-
treeData={treeData}
|
|
74
|
-
open={open}
|
|
75
|
-
onOpenChange={setOpen}
|
|
76
|
-
/>
|
|
77
|
-
|
|
78
|
-
// Old Ant Design v5 API (deprecated, still works)
|
|
79
|
-
const [visible, setVisible] = useState(false);
|
|
80
|
-
|
|
81
|
-
<CapTreeSelect
|
|
82
|
-
treeData={treeData}
|
|
83
|
-
visible={visible}
|
|
84
|
-
onVisibleChange={setVisible}
|
|
85
|
-
/>
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
#### Popup Class Name (Ant Design TreeSelect v6 API)
|
|
89
|
-
|
|
90
|
-
**Ant Design TreeSelect prop change**: `dropdownClassName` → `popupClassName`
|
|
91
|
-
|
|
92
|
-
```tsx
|
|
93
|
-
// New Ant Design v6 API (recommended)
|
|
94
|
-
<CapTreeSelect
|
|
95
|
-
treeData={treeData}
|
|
96
|
-
popupClassName="custom-popup-class"
|
|
97
|
-
/>
|
|
98
|
-
|
|
99
|
-
// Old Ant Design v5 API (deprecated, still works)
|
|
100
|
-
<CapTreeSelect
|
|
101
|
-
treeData={treeData}
|
|
102
|
-
dropdownClassName="custom-popup-class"
|
|
103
|
-
/>
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## Behavioral Changes
|
|
107
|
-
|
|
108
|
-
### Development Warnings
|
|
109
|
-
|
|
110
|
-
When using deprecated Ant Design TreeSelect props in development mode, console warnings will be displayed:
|
|
111
|
-
|
|
112
|
-
```
|
|
113
|
-
[CapTreeSelect] "dropdownClassName" prop is deprecated. Use "popupClassName" instead.
|
|
114
|
-
[CapTreeSelect] "visible" prop is deprecated. Use "open" instead.
|
|
115
|
-
[CapTreeSelect] "onVisibleChange" prop is deprecated. Use "onOpenChange" instead.
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
**Note**: These warnings indicate that deprecated Ant Design TreeSelect component props are being used. The component maintains backward compatibility by mapping these deprecated props to their Ant Design v6 equivalents internally.
|
|
119
|
-
|
|
120
|
-
### Width and placeholder (backward compatibility with cap-ui-library)
|
|
121
|
-
|
|
122
|
-
**Why blaze-ui shows the placeholder with fitted width automatically**
|
|
123
|
-
|
|
124
|
-
- **blaze-ui** always applies a full-width class (`.tree-select-full-width`) to the underlying TreeSelect, so the trigger fills the row and the placeholder is visible without extra props.
|
|
125
|
-
- **cap-ui-library** only sets `style={{ width: '100%' }}` on the TreeSelect when `disabledTooltip` is set. When `disabledTooltip` is not set, the TreeSelect gets no width from the wrapper, so in a flex/narrow container the trigger can collapse and the placeholder can be clipped.
|
|
126
|
-
|
|
127
|
-
So in blaze-ui the same usage “just works”; in cap-ui-library you need either a full-width container or an explicit width (e.g. via `style`) for the placeholder to show reliably.
|
|
128
|
-
|
|
129
|
-
**What to follow for backward compatibility**
|
|
130
|
-
|
|
131
|
-
- **When you need the placeholder to be visible and the select to use full width** (e.g. in visual tests or shared layouts), pass **`style={{ width: '100%' }}`** (or use a full-width wrapper). That works in both cap-ui-library and blaze-ui.
|
|
132
|
-
- In **cap-ui-library** this is required (unless you use `disabledTooltip` or a full-width wrapper). In **blaze-ui** it is optional but recommended for:
|
|
133
|
-
- Consistent behavior when swapping between cap-ui-library and blaze-ui.
|
|
134
|
-
- Predictable layout in narrow/flex containers (e.g. test harness with `width: fit-content` and a `min-width` on the container).
|
|
135
|
-
|
|
136
|
-
So: **use `style={{ width: '100%' }}` (or an equivalent full-width wrapper) whenever you rely on the placeholder and full-width layout**; that keeps behavior aligned with cap-ui-library and works in blaze-ui as well.
|
|
137
|
-
|
|
138
|
-
## Migration Steps
|
|
139
|
-
|
|
140
|
-
### 1. Update Import
|
|
141
|
-
|
|
142
|
-
```tsx
|
|
143
|
-
// Before (cap-ui-library)
|
|
144
|
-
import CapTreeSelect from '@capillarytech/cap-ui-library/CapTreeSelect';
|
|
145
|
-
|
|
146
|
-
// After (blaze-ui)
|
|
147
|
-
import { CapTreeSelect } from '@capillarytech/blaze-ui';
|
|
148
|
-
// or
|
|
149
|
-
import CapTreeSelect from '@capillarytech/blaze-ui/CapTreeSelect';
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
### 2. Update Ant Design TreeSelect Controlled State Props
|
|
153
|
-
|
|
154
|
-
**Ant Design TreeSelect prop change**: `visible` → `open`, `onVisibleChange` → `onOpenChange`
|
|
155
|
-
|
|
156
|
-
```tsx
|
|
157
|
-
// Before (deprecated Ant Design v5 API)
|
|
158
|
-
const [visible, setVisible] = useState(false);
|
|
159
|
-
|
|
160
|
-
<CapTreeSelect
|
|
161
|
-
treeData={treeData}
|
|
162
|
-
visible={visible}
|
|
163
|
-
onVisibleChange={setVisible}
|
|
164
|
-
/>
|
|
165
|
-
|
|
166
|
-
// After (Ant Design v6 API)
|
|
167
|
-
const [open, setOpen] = useState(false);
|
|
168
|
-
|
|
169
|
-
<CapTreeSelect
|
|
170
|
-
treeData={treeData}
|
|
171
|
-
open={open}
|
|
172
|
-
onOpenChange={setOpen}
|
|
173
|
-
/>
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
### 3. Update Ant Design TreeSelect Popup Class Name
|
|
177
|
-
|
|
178
|
-
**Ant Design TreeSelect prop change**: `dropdownClassName` → `popupClassName`
|
|
179
|
-
|
|
180
|
-
```tsx
|
|
181
|
-
// Before (deprecated Ant Design v5 API)
|
|
182
|
-
<CapTreeSelect
|
|
183
|
-
treeData={treeData}
|
|
184
|
-
dropdownClassName="custom-popup-class"
|
|
185
|
-
/>
|
|
186
|
-
|
|
187
|
-
// After (Ant Design v6 API)
|
|
188
|
-
<CapTreeSelect
|
|
189
|
-
treeData={treeData}
|
|
190
|
-
popupClassName="custom-popup-class"
|
|
191
|
-
/>
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
## Code Improvements
|
|
195
|
-
|
|
196
|
-
1. **Removed styled-components dependency**: Replaced with SCSS module `cap-tree-select-v2-row`
|
|
197
|
-
2. **Using deprecation warning utility**: Now uses `logDeprecationWarning` utility for consistent deprecation warnings
|
|
198
|
-
3. **Improved backward compatibility**: Deprecated props are mapped using nullish coalescing (`??`) for cleaner code
|
|
199
|
-
4. **TypeScript support**: Full TypeScript type definitions with proper Ant Design v6 types
|
|
200
|
-
|
|
201
|
-
## What Stayed the Same
|
|
202
|
-
|
|
203
|
-
- All component props and behavior
|
|
204
|
-
- DOM structure and component hierarchy
|
|
205
|
-
- Conditional rendering logic
|
|
206
|
-
- API surface area (backward compatible)
|
|
207
|
-
- Support for headerTitle, headerDescription, treeSelectSideLabel, disabledTooltip, and infoNote props
|
|
208
|
-
|
|
209
|
-
## What Changed
|
|
210
|
-
|
|
211
|
-
- **Removed**: `styled-components` dependency
|
|
212
|
-
- **Removed**: `PropTypes` (replaced with TypeScript types)
|
|
213
|
-
- **Removed**: `defaultProps` (replaced with default parameters)
|
|
214
|
-
- **Updated**: Ant Design imports from `antd` to `antd-v5`
|
|
215
|
-
- **Added**: TypeScript type definitions in `types.ts`
|
|
216
|
-
- **Added**: SCSS module for styling
|
|
217
|
-
- **Added**: Backward compatibility for deprecated props
|
package/CapTreeSelect/Status.md
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# Migration Status: CapTreeSelect
|
|
2
|
-
|
|
3
|
-
**Last Updated**: 2026-02-20 14:33:28
|
|
4
|
-
|
|
5
|
-
## Migration Steps
|
|
6
|
-
|
|
7
|
-
- [x] **Step 0**: Setup branch and remote tracking
|
|
8
|
-
- [x] **Step 1**: Migration Prompt 1 (Main migration)
|
|
9
|
-
- [x] **Step 1.5**: Export component in blaze-ui/components/index.ts
|
|
10
|
-
- [x] **Step 2**: Migration Prompt 2 (Storybook support)
|
|
11
|
-
- [x] **Step 2.5**: Verify deprecated props and prop changes (REQUIRED - enforced)
|
|
12
|
-
- [x] **Step 3**: Migration Prompt 3 (Unit tests)
|
|
13
|
-
- [x] **Step 4**: Migration Prompt 4 (Visual test cases)
|
|
14
|
-
- [x] **Step 5**: Linting (ESLint)
|
|
15
|
-
- [x] **Step 6**: Pre-build Validation
|
|
16
|
-
- [x] **Step 7**: Build blaze-ui
|
|
17
|
-
- [x] **Step 8**: Visual Testing
|
|
18
|
-
- [x] **Step 9**: CSS Analysis (if mismatches found)
|
|
19
|
-
- [x] **Step 9.5**: CSS Analysis Completed
|
|
20
|
-
- [x] **Step 10**: Git Commit & Push to branch (pre-commit hook will run tests)
|
|
21
|
-
- [x] **Step 11**: Create Pull Request
|
|
22
|
-
|
|
23
|
-
## Deprecated Props Verification
|
|
24
|
-
|
|
25
|
-
_No deprecated props verification results yet._
|
|
26
|
-
|
|
27
|
-
**Note**: Step 2.5 is REQUIRED and enforced.
|
|
28
|
-
- Focus: **Ant Design component prop changes** (e.g., Dropdown, Input, Alert, Tooltip, etc.)
|
|
29
|
-
- Reference: MIGRATION_CHANGELOG_TEMPLATE.md for format, ANTD_V6_MIGRATION.md for Ant Design deprecated APIs
|
|
30
|
-
- Skip: If original component doesn't exist in cap-ui-library
|
|
31
|
-
- All deprecated Ant Design props and prop changes must be documented before proceeding.
|
|
32
|
-
|
|
33
|
-
## Visual Testing Results
|
|
34
|
-
|
|
35
|
-
**Last Test**: 2026-02-20 14:33:28
|
|
36
|
-
**Maximum Mismatch**: 0%
|
|
37
|
-
|
|
38
|
-
### Mismatched Variants:
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
## CSS Fixes Applied
|
|
43
|
-
|
|
44
|
-
**Date**: 2026-02-07 00:31:17
|
|
45
|
-
**Summary**: CSS fixes applied based on visual testing analysis.
|
|
46
|
-
|
|
47
|
-
_See full analysis in: `/Users/sarahkhader/repos/migration/blaze-ui/tools/visual-testing/report/CapTreeSelect/css-fix-analysis.md`_
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
## Notes
|
|
51
|
-
|
|
52
|
-
_No notes yet._
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# CapTruncateList
|
|
2
|
-
|
|
3
|
-
Component for displaying a truncated list of items with a "more" indicator. Built on Ant Design v6 with Cap UI styling.
|
|
4
|
-
|
|
5
|
-
### No Breaking Changes
|
|
6
|
-
|
|
7
|
-
The component maintains **100% backward compatibility** with `cap-ui-library` v8.x. All existing code will continue to work without modifications.
|
|
8
|
-
|
|
9
|
-
## Notes
|
|
10
|
-
|
|
11
|
-
- **Translations**: The component now uses `InjectIntl` for translations instead of LocalHoc
|
|
12
|
-
- **SCSS**: Even though component used classnames, the style file is missing (assumption is that consumer is injecting styles directly).
|
|
13
|
-
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# CapUnifiedSelect
|
|
2
|
-
|
|
3
|
-
Unified select component supporting single select, multi-select, tree select, and multi-tree select. Built on Ant Design’s TreeSelect (antd-v5) with custom popup, search, confirm flow, and optional list virtualization.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Virtualization
|
|
8
|
-
|
|
9
|
-
List virtualization is implemented **without** third-party libraries like react-virtuoso. It is provided entirely by **Ant Design’s TreeSelect** (antd-v5). TreeSelect uses `rc-tree-select`, which in turn uses **rc-virtual-list** (from react-component) for virtual scrolling. No custom virtualization logic lives in this component.
|
|
10
|
-
|
|
11
|
-
### How rc-virtual-list works
|
|
12
|
-
|
|
13
|
-
- Only items in the visible viewport (plus a small overscan) are rendered in the DOM. As the user scrolls, the set of mounted items is updated.
|
|
14
|
-
- The scrollable container has a fixed height (`listHeight`). Total content height is computed as `(number of items) × listItemHeight`.
|
|
15
|
-
- A transform or spacer is used so that non-visible items still contribute to scroll height and scroll position stays correct.
|
|
16
|
-
|
|
17
|
-
### Configuration
|
|
18
|
-
|
|
19
|
-
| Prop | Type | Default | Description |
|
|
20
|
-
|------|------|--------|-------------|
|
|
21
|
-
| `enableVirtualization` | `boolean` | `false` | When **false** (default), TreeSelect uses antd’s built-in virtual list. When **true**, the virtual list is disabled and the full list is rendered (e.g. for custom popup width or compatibility). |
|
|
22
|
-
| `virtualRowHeight` | `number` | `32` | Fixed height per option in px. Used by the virtual list to compute total height and which slice of items to render. Only relevant when the virtual list is enabled. |
|
|
23
|
-
| `listHeight` | `number` | `256` | Viewport height in px for the dropdown list. Passed through to TreeSelect / rc-virtual-list. |
|
|
24
|
-
|
|
25
|
-
In code, these are wired as:
|
|
26
|
-
|
|
27
|
-
- `virtual={!enableVirtualization}` — so default behaviour is virtual list **on**.
|
|
28
|
-
- `listHeight` and `listItemHeight={virtualRowHeight}` are passed through to TreeSelect, which forwards them to rc-virtual-list.
|
|
29
|
-
|
|
30
|
-
### Infinite scroll (onPopupScroll)
|
|
31
|
-
|
|
32
|
-
For “load more on scroll”, the scrollable DOM node must be found so listeners can attach. **`getScrollContainer()`** in `utils.ts` does this by:
|
|
33
|
-
|
|
34
|
-
1. Finding the visible Ant Design select dropdown (`.ant-select-dropdown`).
|
|
35
|
-
2. Looking for a scrollable container in this order:
|
|
36
|
-
- `.ant-select-tree-list-holder` (when the virtual list is **off**),
|
|
37
|
-
- `.rc-virtual-list-holder` (when the virtual list is **on**),
|
|
38
|
-
- or the dropdown root if neither exists.
|
|
39
|
-
|
|
40
|
-
So both virtual and non-virtual dropdowns are supported for `onPopupScroll` and infinite loading.
|