@capillarytech/blaze-ui 5.20.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/CapAskAira/CapAiMediaGeneration/saga.js +1446 -0
- package/CapAskAira/CapAiMediaGeneration/saga.js.map +1 -0
- package/CapCollapsibleLeftNavigation/saga.js +1441 -0
- package/CapCollapsibleLeftNavigation/saga.js.map +1 -0
- 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/CapLanguageProvider/reducer.js +130 -0
- package/CapLanguageProvider/reducer.js.map +1 -0
- package/CapLanguageProvider/saga.js +1457 -0
- package/CapLanguageProvider/saga.js.map +1 -0
- package/CapLanguageProvider/selector.js +186 -0
- package/CapLanguageProvider/selector.js.map +1 -0
- package/CapSupportVideosWrapper/utils.js +34 -0
- package/CapSupportVideosWrapper/utils.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/CapColorPicker/README.md
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
# CapColorPicker Component
|
|
2
|
-
|
|
3
|
-
A React component for selecting colors using a color picker interface.
|
|
4
|
-
|
|
5
|
-
## Migration from cap-ui-library to blaze-ui
|
|
6
|
-
|
|
7
|
-
### Summary of Changes
|
|
8
|
-
|
|
9
|
-
This component has been migrated from JavaScript to TypeScript with the following improvements:
|
|
10
|
-
|
|
11
|
-
1. **TypeScript Conversion**
|
|
12
|
-
- Converted from JavaScript to TypeScript
|
|
13
|
-
- Added comprehensive TypeScript interfaces in `types.ts`
|
|
14
|
-
- Replaced PropTypes with TypeScript types
|
|
15
|
-
- Removed PropTypes dependency
|
|
16
|
-
|
|
17
|
-
2. **Modern React Patterns**
|
|
18
|
-
- Converted from class component to functional component
|
|
19
|
-
- Uses React.FC for type safety
|
|
20
|
-
- Better type safety with TypeScript
|
|
21
|
-
|
|
22
|
-
3. **Styling**
|
|
23
|
-
- Maintained SCSS structure
|
|
24
|
-
- Updated border-radius to use rem units for consistency
|
|
25
|
-
- Uses SCSS variables from `components/styles/_variables.scss`
|
|
26
|
-
|
|
27
|
-
### Breaking Changes
|
|
28
|
-
|
|
29
|
-
**No breaking changes from cap-ui-library v8.x**
|
|
30
|
-
|
|
31
|
-
All props remain backward compatible. The component maintains the same API and behavior as the cap-ui-library version.
|
|
32
|
-
|
|
33
|
-
### Deprecated Props
|
|
34
|
-
|
|
35
|
-
**No deprecated Ant Design props**
|
|
36
|
-
|
|
37
|
-
This component does not use any Ant Design components. It uses `react-colorful`'s `HexColorPicker` component for color picking functionality. Therefore, there are no Ant Design component prop changes or deprecated props to document.
|
|
38
|
-
|
|
39
|
-
**Verification:**
|
|
40
|
-
- ✅ No Ant Design components imported (`antd`, `@ant-design/icons`, etc.)
|
|
41
|
-
- ✅ Component uses only `react-colorful` library
|
|
42
|
-
- ✅ No Ant Design props or APIs used
|
|
43
|
-
- ✅ No migration from deprecated Ant Design APIs required
|
|
44
|
-
|
|
45
|
-
### Props
|
|
46
|
-
|
|
47
|
-
| Prop Name | Type | Default | Description |
|
|
48
|
-
|-----------|------|---------|-------------|
|
|
49
|
-
| `className` | `string` | `''` | Additional CSS class name |
|
|
50
|
-
| `color` | `string` | `'#d42020'` | Current color value (hex format) |
|
|
51
|
-
| `setColor` | `(color: string) => void` | `() => {}` | Callback function when color changes |
|
|
52
|
-
| `hexSelector` | `boolean` | `false` | Whether to show hex selector |
|
|
53
|
-
|
|
54
|
-
### Behavioral Changes
|
|
55
|
-
|
|
56
|
-
- Component is now a functional component instead of a class component
|
|
57
|
-
- TypeScript provides better type safety and IntelliSense support
|
|
58
|
-
- Border radius uses rem units for consistency with design system
|
|
59
|
-
|
|
60
|
-
### Usage
|
|
61
|
-
|
|
62
|
-
#### Basic Usage
|
|
63
|
-
|
|
64
|
-
```tsx
|
|
65
|
-
import { CapColorPicker } from '@capillarytech/blaze-ui';
|
|
66
|
-
import { useState } from 'react';
|
|
67
|
-
|
|
68
|
-
const MyComponent = () => {
|
|
69
|
-
const [color, setColor] = useState('#d42020');
|
|
70
|
-
|
|
71
|
-
return (
|
|
72
|
-
<CapColorPicker color={color} setColor={setColor} />
|
|
73
|
-
);
|
|
74
|
-
};
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
#### With Hex Selector
|
|
78
|
-
|
|
79
|
-
```tsx
|
|
80
|
-
<CapColorPicker
|
|
81
|
-
color={color}
|
|
82
|
-
setColor={setColor}
|
|
83
|
-
hexSelector={true}
|
|
84
|
-
/>
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
#### With Custom Class Name
|
|
88
|
-
|
|
89
|
-
```tsx
|
|
90
|
-
<CapColorPicker
|
|
91
|
-
color={color}
|
|
92
|
-
setColor={setColor}
|
|
93
|
-
className="my-custom-picker"
|
|
94
|
-
/>
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### Notes
|
|
98
|
-
|
|
99
|
-
- The component uses `react-colorful` library for color picking functionality
|
|
100
|
-
- When `hexSelector` is `false`, the component uses the `cap-slider-v2` class
|
|
101
|
-
- When `hexSelector` is `true`, the component uses the `cap-hexslider-v2` class
|
|
102
|
-
- The saturation control is hidden by default via CSS
|
|
103
|
-
|
|
104
|
-
### Import Examples
|
|
105
|
-
|
|
106
|
-
```tsx
|
|
107
|
-
// Named import (recommended)
|
|
108
|
-
import { CapColorPicker } from '@capillarytech/blaze-ui';
|
|
109
|
-
|
|
110
|
-
// Type import
|
|
111
|
-
import type { CapColorPickerProps } from '@capillarytech/blaze-ui';
|
|
112
|
-
```
|
package/CapColorPicker/Status.md
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# Migration Status: CapColorPicker
|
|
2
|
-
|
|
3
|
-
**Last Updated**: 2026-02-04 02:03:49
|
|
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-04 02:03:49
|
|
36
|
-
**Maximum Mismatch**: 0%
|
|
37
|
-
|
|
38
|
-
### Mismatched Variants:
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
## CSS Fixes Applied
|
|
43
|
-
|
|
44
|
-
**Date**: 2026-01-31 17:05:14
|
|
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/CapColorPicker/css-fix-analysis.md`_
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
## Notes
|
|
51
|
-
|
|
52
|
-
_No notes yet._
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
# CapColorPicker Use Cases Analysis
|
|
2
|
-
|
|
3
|
-
## Phase 0: Use Cases Extraction
|
|
4
|
-
|
|
5
|
-
**Status**: ⚠️ **Unable to access Google Sheets MCP server**
|
|
6
|
-
|
|
7
|
-
The Google Sheets MCP server (`google_sheets`) was not available during test creation. Use cases were inferred from component analysis and standard color picker requirements.
|
|
8
|
-
|
|
9
|
-
## Phase 1: Use Cases NOT Fulfilled by Component
|
|
10
|
-
|
|
11
|
-
Based on analysis of `CapColorPicker` component code, the following use cases are **NOT currently supported**:
|
|
12
|
-
|
|
13
|
-
### 1. **Preset Color Palette**
|
|
14
|
-
- ❌ No predefined color swatches
|
|
15
|
-
- ❌ No recent colors history
|
|
16
|
-
- ❌ No favorite colors functionality
|
|
17
|
-
|
|
18
|
-
### 2. **Multiple Color Format Support**
|
|
19
|
-
- ❌ Only supports hex format (`#RRGGBB`)
|
|
20
|
-
- ❌ No RGB input fields
|
|
21
|
-
- ❌ No HSL input fields
|
|
22
|
-
- ❌ No conversion between formats
|
|
23
|
-
|
|
24
|
-
### 3. **Input Validation**
|
|
25
|
-
- ❌ No validation for invalid hex colors
|
|
26
|
-
- ❌ No error messages for invalid input
|
|
27
|
-
- ❌ No format enforcement
|
|
28
|
-
|
|
29
|
-
### 4. **Component States**
|
|
30
|
-
- ❌ No disabled state
|
|
31
|
-
- ❌ No loading state
|
|
32
|
-
- ❌ No error state
|
|
33
|
-
- ❌ No readonly state
|
|
34
|
-
|
|
35
|
-
### 5. **Size Variants**
|
|
36
|
-
- ❌ No size prop (small, medium, large)
|
|
37
|
-
- ❌ Fixed size only
|
|
38
|
-
|
|
39
|
-
### 6. **Advanced Features**
|
|
40
|
-
- ❌ No alpha/opacity channel support
|
|
41
|
-
- ❌ No color picker presets
|
|
42
|
-
- ❌ No color picker themes
|
|
43
|
-
- ❌ No keyboard shortcuts documentation
|
|
44
|
-
|
|
45
|
-
### 7. **Accessibility Enhancements**
|
|
46
|
-
- ❌ No aria-label prop (relies on underlying library)
|
|
47
|
-
- ❌ No aria-describedby for helper text
|
|
48
|
-
- ❌ No focus management documentation
|
|
49
|
-
- ⚠️ Limited keyboard navigation (depends on react-colorful)
|
|
50
|
-
|
|
51
|
-
### 8. **Event Handling**
|
|
52
|
-
- ❌ Only onChange callback (setColor)
|
|
53
|
-
- ❌ No onComplete/onBlur callback
|
|
54
|
-
- ❌ No onFocus callback
|
|
55
|
-
- ❌ No onChangeStart/onChangeEnd callbacks
|
|
56
|
-
|
|
57
|
-
### 9. **UI Enhancements**
|
|
58
|
-
- ❌ No label prop
|
|
59
|
-
- ❌ No helper text
|
|
60
|
-
- ❌ No error message display
|
|
61
|
-
- ❌ No placeholder/initial value distinction
|
|
62
|
-
|
|
63
|
-
### 10. **Integration Features**
|
|
64
|
-
- ❌ No form integration helpers (Form.Item wrapper)
|
|
65
|
-
- ❌ No validation integration
|
|
66
|
-
- ❌ No controlled/uncontrolled mode distinction
|
|
67
|
-
|
|
68
|
-
## Current Component Capabilities
|
|
69
|
-
|
|
70
|
-
✅ **Supported Features**:
|
|
71
|
-
- Basic hex color selection via visual picker
|
|
72
|
-
- Custom className support
|
|
73
|
-
- Hex selector toggle (visual difference via CSS class)
|
|
74
|
-
- Color change callback (setColor)
|
|
75
|
-
- Default color value
|
|
76
|
-
- CSS class customization
|
|
77
|
-
|
|
78
|
-
## Recommendations
|
|
79
|
-
|
|
80
|
-
If the Google Sheets contains use cases requiring any of the above features, the component would need enhancements to support them. The current implementation is a minimal wrapper around `react-colorful`'s `HexColorPicker`.
|
|
81
|
-
|
|
82
|
-
## Test Coverage
|
|
83
|
-
|
|
84
|
-
Comprehensive tests have been created covering:
|
|
85
|
-
- ✅ Default rendering and initialization
|
|
86
|
-
- ✅ Prop variations (color, className, hexSelector)
|
|
87
|
-
- ✅ User interactions (click, mouse move)
|
|
88
|
-
- ✅ Callbacks (setColor)
|
|
89
|
-
- ✅ Edge cases (empty, invalid colors)
|
|
90
|
-
- ✅ Accessibility (role, aria-label, tabIndex)
|
|
91
|
-
- ✅ Data flow and state management
|
|
92
|
-
- ✅ Conditional rendering logic
|
package/CapColoredTag/README.md
DELETED
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
# CapColoredTag
|
|
2
|
-
|
|
3
|
-
An extended version of Ant Design's Tag component with custom color styling capabilities and enhanced customization options.
|
|
4
|
-
|
|
5
|
-
## Migration from Ant Design v3 to v6
|
|
6
|
-
|
|
7
|
-
This component has been migrated from Ant Design v3 to v6 with the following changes:
|
|
8
|
-
|
|
9
|
-
### Ant Design Components Used
|
|
10
|
-
|
|
11
|
-
This component uses the following Ant Design components:
|
|
12
|
-
- **Tag** (`antd-v5`) - Base tag component
|
|
13
|
-
- **Tag.CheckableTag** (`antd-v5`) - Checkable tag variant
|
|
14
|
-
|
|
15
|
-
**Verification Status:** ✅ No deprecated props found
|
|
16
|
-
- The `Tag` component is not listed in the Ant Design v6 migration guide's deprecated API fixes table
|
|
17
|
-
- All `Tag` component props remain valid and unchanged between v3 and v6
|
|
18
|
-
- No prop mapping or backward compatibility code required for Ant Design props
|
|
19
|
-
|
|
20
|
-
### Breaking Changes
|
|
21
|
-
|
|
22
|
-
**No breaking changes** - The component maintains full backward compatibility with the previous version.
|
|
23
|
-
|
|
24
|
-
**Ant Design Tag Component:** The Ant Design `Tag` component API remains fully compatible between v3 and v6, so no API changes were required. All Ant Design `Tag` props continue to work as before.
|
|
25
|
-
|
|
26
|
-
### Deprecated Props
|
|
27
|
-
|
|
28
|
-
**No deprecated Ant Design props** - The Ant Design `Tag` component API remains fully compatible between v3 and v6, with no deprecated props.
|
|
29
|
-
|
|
30
|
-
**Verification:**
|
|
31
|
-
- ✅ Checked against Ant Design v6 migration guide - `Tag` component is not listed in deprecated API fixes
|
|
32
|
-
- ✅ All Ant Design `Tag` props (`closable`, `onClose`, `color`, `icon`, etc.) remain valid and unchanged
|
|
33
|
-
- ✅ `Tag.CheckableTag` API remains unchanged
|
|
34
|
-
- ✅ No backward compatibility mapping required for Ant Design props
|
|
35
|
-
|
|
36
|
-
**Note:** This component uses the Ant Design `Tag` component internally. All standard Ant Design `Tag` props are passed through via `{...rest}` and remain fully supported.
|
|
37
|
-
|
|
38
|
-
### Prop Changes
|
|
39
|
-
|
|
40
|
-
#### Cap Component Props
|
|
41
|
-
|
|
42
|
-
| Prop | Status | Notes |
|
|
43
|
-
|------|--------|-------|
|
|
44
|
-
| `tagColor` | ✅ Unchanged | Custom background color for the tag |
|
|
45
|
-
| `tagTextColor` | ✅ Unchanged | Custom text color for the tag |
|
|
46
|
-
| `tagHeight` | ✅ Unchanged | Custom height for the tag (default: '24px') |
|
|
47
|
-
| `tagFontSize` | ✅ Unchanged | Custom font size for the tag (default: 0.857rem / 12px) |
|
|
48
|
-
| `tagBorderColor` | ✅ Unchanged | Custom border color for the tag |
|
|
49
|
-
| `tagCloseIconColor` | ✅ Unchanged | Custom close icon color for the tag (default: white) |
|
|
50
|
-
| `styleProps` | ✅ Unchanged | Unused prop kept for backward compatibility |
|
|
51
|
-
| `type` | ✅ Unchanged | Tag type modifier ('static') |
|
|
52
|
-
| `disabled` | ✅ Unchanged | Whether the tag is disabled |
|
|
53
|
-
| `className` | ✅ Unchanged | Additional CSS class name |
|
|
54
|
-
|
|
55
|
-
#### Ant Design Tag Component Props
|
|
56
|
-
|
|
57
|
-
| Prop | Status | Notes |
|
|
58
|
-
|------|--------|-------|
|
|
59
|
-
| `closable` | ✅ Unchanged | Whether the tag can be closed (Ant Design Tag prop) |
|
|
60
|
-
| `onClose` | ✅ Unchanged | Callback when tag is closed (Ant Design Tag prop) |
|
|
61
|
-
| `color` | ✅ Unchanged | Tag color preset (Ant Design Tag prop) |
|
|
62
|
-
| `icon` | ✅ Unchanged | Custom icon (Ant Design Tag prop) |
|
|
63
|
-
| `bordered` | ✅ Unchanged | Whether to show border (Ant Design Tag prop) |
|
|
64
|
-
| All other Ant Design Tag props | ✅ Unchanged | All props from `TagProps` are passed through to underlying Ant Design `Tag` component |
|
|
65
|
-
|
|
66
|
-
**Note:** This component extends Ant Design's `TagProps` interface, so all standard Ant Design `Tag` component props are supported and passed through unchanged.
|
|
67
|
-
|
|
68
|
-
### API Changes
|
|
69
|
-
|
|
70
|
-
- **TypeScript Support:** Full TypeScript support with exported `CapColoredTagProps` interface
|
|
71
|
-
- **Ant Design Version:** Upgraded from Ant Design v3 to v6
|
|
72
|
-
- **Styling:** Uses SCSS modules with design tokens
|
|
73
|
-
|
|
74
|
-
### Behavioral Changes
|
|
75
|
-
|
|
76
|
-
- **Dynamic Styling:** The component uses inline styles for dynamic color props (`tagColor`, `tagTextColor`, etc.) to allow runtime customization
|
|
77
|
-
- **Close Icon Styling:** Close icon color is controlled via CSS custom property (`--tag-close-icon-color`) for consistent theming
|
|
78
|
-
- **Static Type:** Tags with `type="static"` have `pointer-events: none` to prevent interaction
|
|
79
|
-
|
|
80
|
-
### Code Improvements
|
|
81
|
-
|
|
82
|
-
1. **Design Tokens:** Uses `$CAP_*` variables from the design system
|
|
83
|
-
2. **Type Safety:** Full TypeScript support with proper type definitions
|
|
84
|
-
3. **Backward Compatibility:** All props from previous versions remain supported
|
|
85
|
-
|
|
86
|
-
### Usage Examples
|
|
87
|
-
|
|
88
|
-
#### Basic Usage
|
|
89
|
-
|
|
90
|
-
```tsx
|
|
91
|
-
import { CapColoredTag } from '@capillarytech/blaze-ui';
|
|
92
|
-
|
|
93
|
-
<CapColoredTag>Default Tag</CapColoredTag>
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
#### Custom Colors
|
|
97
|
-
|
|
98
|
-
```tsx
|
|
99
|
-
<CapColoredTag
|
|
100
|
-
tagColor="#1890ff"
|
|
101
|
-
tagTextColor="#ffffff"
|
|
102
|
-
>
|
|
103
|
-
Custom Colored Tag
|
|
104
|
-
</CapColoredTag>
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
#### Static Tag
|
|
108
|
-
|
|
109
|
-
```tsx
|
|
110
|
-
<CapColoredTag type="static">
|
|
111
|
-
Static Tag (non-interactive)
|
|
112
|
-
</CapColoredTag>
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
#### Closable Tag with Custom Close Icon Color
|
|
116
|
-
|
|
117
|
-
```tsx
|
|
118
|
-
<CapColoredTag
|
|
119
|
-
closable
|
|
120
|
-
tagCloseIconColor="#ff0000"
|
|
121
|
-
onClose={() => console.log('Tag closed')}
|
|
122
|
-
>
|
|
123
|
-
Closable Tag
|
|
124
|
-
</CapColoredTag>
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
#### Disabled Tag
|
|
128
|
-
|
|
129
|
-
```tsx
|
|
130
|
-
<CapColoredTag disabled>
|
|
131
|
-
Disabled Tag
|
|
132
|
-
</CapColoredTag>
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
#### Checkable Tag
|
|
136
|
-
|
|
137
|
-
```tsx
|
|
138
|
-
<CapColoredTag.CheckableTag
|
|
139
|
-
checked={isChecked}
|
|
140
|
-
onChange={(checked) => setChecked(checked)}
|
|
141
|
-
>
|
|
142
|
-
Checkable Tag
|
|
143
|
-
</CapColoredTag.CheckableTag>
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
### Styling
|
|
147
|
-
|
|
148
|
-
The component uses SCSS modules with the following design tokens:
|
|
149
|
-
- `$CAP_SPACE_24` - Default tag height
|
|
150
|
-
- `$CAP_G08` - Default background color
|
|
151
|
-
- `$CAP_WHITE` - Default text and close icon color
|
|
152
|
-
- `$FONT_SIZE_S` - Default font size
|
|
153
|
-
|
|
154
|
-
Custom colors can be applied via props (`tagColor`, `tagTextColor`, etc.) which override the default styles.
|
|
155
|
-
|
|
156
|
-
### Migration Guide
|
|
157
|
-
|
|
158
|
-
If you're migrating from an older version:
|
|
159
|
-
|
|
160
|
-
1. **No code changes required** - The component maintains full backward compatibility
|
|
161
|
-
2. **Import path unchanged** - Continue using `@capillarytech/blaze-ui`
|
|
162
|
-
3. **Props unchanged** - All existing props continue to work as before
|
|
163
|
-
|
|
164
|
-
### Related Components
|
|
165
|
-
|
|
166
|
-
- `CapTag` - Standard tag component with predefined variants
|
|
167
|
-
- `Tag` (Ant Design) - Base tag component from Ant Design
|
package/CapColoredTag/Status.md
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# Migration Status: CapColoredTag
|
|
2
|
-
|
|
3
|
-
**Last Updated**: 2026-01-31 11:15:48
|
|
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-01-31 11:14:49
|
|
36
|
-
**Maximum Mismatch**: 0%
|
|
37
|
-
|
|
38
|
-
### Mismatched Variants:
|
|
39
|
-
- ✅ All variants match perfectly!
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
## CSS Fixes Applied
|
|
43
|
-
|
|
44
|
-
_No CSS fixes applied yet._
|
|
45
|
-
|
|
46
|
-
## Notes
|
|
47
|
-
|
|
48
|
-
_No notes yet._
|
|
49
|
-
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
# Stage 1: Pre-Analysis Report for CapConditionPreview
|
|
2
|
-
|
|
3
|
-
## 1. Antd Style Overrides Found
|
|
4
|
-
|
|
5
|
-
| Line # | Old Override | Can Tokenize? | Token Path | Token Value | Override Reason |
|
|
6
|
-
|--------|-------------|---------------|------------|-------------|-----------------|
|
|
7
|
-
| — | — | — | — | — | — |
|
|
8
|
-
|
|
9
|
-
**Tokenizable overrides**: 0
|
|
10
|
-
**Non-tokenizable overrides**: 0
|
|
11
|
-
**No antd overrides found - will skip theme config update.**
|
|
12
|
-
|
|
13
|
-
CapConditionPreview does not use any Ant Design components. It uses only Cap UI primitives (CapRow, CapColumn, CapLabel, CapIcon, CapTruncateList) and react-intl FormattedMessage. `styles.scss` contains only BEM class `.capConditionPreview__string` (text-overflow/ellipsis) with no `:global` or `.ant-` usage.
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## 2. API Breaking Changes
|
|
18
|
-
|
|
19
|
-
| Old API | New API | Affected Props |
|
|
20
|
-
|---------|---------|----------------|
|
|
21
|
-
| — | — | None |
|
|
22
|
-
|
|
23
|
-
No Antd components are used; no v3→v6 API changes apply to this component.
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## 3. Backward Compatibility Plan
|
|
28
|
-
|
|
29
|
-
| Deprecated Prop | Fallback Logic |
|
|
30
|
-
|----------------|----------------|
|
|
31
|
-
| — | — |
|
|
32
|
-
|
|
33
|
-
No deprecated props in this component.
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## 4. Type Definitions Needed
|
|
38
|
-
|
|
39
|
-
- **CapConditionPreviewProps** – Main props interface (all current props with TypeScript types).
|
|
40
|
-
- **LinkedConditionExpression** – Shape for `additionalFields[key].expression` (operator, operand, storeSource, isStoreUploadFailed, isStoreUploadInvalid, storeUploadIsInProgress).
|
|
41
|
-
- **AdditionalFieldEntry** – Shape for `additionalFields[key]` (description, factId, expression).
|
|
42
|
-
- **DateTypeData** – Shape for `dateTypeData` (dateType, startDate, endDate, date, days, contextData with profileName).
|
|
43
|
-
- **DstData** – Shape for `dstData` (e.g. couponSeriesNames); optional/minimal for type safety.
|
|
44
|
-
- **ViewMoreLinkComponent** – React component type for `ViewMoreLink` (e.g. `React.ComponentType<{ onClick: () => void; children: React.ReactNode }>`).
|
|
45
|
-
|
|
46
|
-
Complex types: `operand` and `listData` are polymorphic (number, string, string[], etc.) depending on `type`; we will use union types or careful typing to avoid `any`.
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
## 5. PropTypes Removal
|
|
51
|
-
|
|
52
|
-
- [x] Component uses PropTypes: **YES**
|
|
53
|
-
- [x] PropTypes file exists: **NO** (PropTypes live in index.tsx)
|
|
54
|
-
- [x] PropTypes imports found: **YES** (`import PropTypes from 'prop-types'` in index.tsx)
|
|
55
|
-
- [x] Component.propTypes assignments found: **YES** (`CapConditionPreview.propTypes = { ... }` in index.tsx)
|
|
56
|
-
- **Action**: Remove all PropTypes and replace with TypeScript types from `types.ts`.
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
## 6. DefaultProps Removal
|
|
61
|
-
|
|
62
|
-
- [x] Component uses defaultProps: **NO**
|
|
63
|
-
- [x] Component.defaultProps assignments found: **NO**
|
|
64
|
-
- [x] Old function syntax with props parameter: **NO** (already uses destructuring `({ ... })`)
|
|
65
|
-
- [x] Default values assigned inside function body: **NO** (only `listData = null` and `hideNumberAndProductFields = false` in destructuring)
|
|
66
|
-
- **Action**: No defaultProps to remove. Keep destructuring defaults as-is; ensure any other optional props that need defaults get them in destructuring in index.tsx.
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
**STAGE 1 COMPLETE. Proceeding to Stage 2 (skip theme config) and Stage 3 (implementation).**
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# CapConditionPreview
|
|
2
|
-
|
|
3
|
-
Preview block for condition configuration (e.g. "Include whose [condition name] is [operator] [operand]").
|
|
4
|
-
|
|
5
|
-
## Migration (Antd v3 → v6)
|
|
6
|
-
|
|
7
|
-
- **Antd usage**: This component does **not** use any Ant Design components. It uses only Cap UI primitives (CapRow, CapColumn, CapLabel, CapIcon, CapTruncateList) and `react-intl` FormattedMessage. No theme config or antd API changes apply.
|
|
8
|
-
- **PropTypes removed**: All runtime PropTypes were removed and replaced with TypeScript types from `types.ts`.
|
|
9
|
-
- **defaultProps**: None were present; default values use destructuring in the component signature (`listData = null`, `hideNumberAndProductFields = false`).
|
|
10
|
-
- **Styles**: `styles.scss` has no `:global` or `.ant-` overrides. A single BEM-style class is used for the string truncation state, applied via CSS Modules (`styles.capConditionPreview__string`).
|
|
11
|
-
|
|
12
|
-
## Props
|
|
13
|
-
|
|
14
|
-
See `types.ts` for full interfaces. Main props:
|
|
15
|
-
|
|
16
|
-
| Prop | Type | Description |
|
|
17
|
-
|------|------|-------------|
|
|
18
|
-
| `type` | `string` | Data type: NUMBER, STRING, LIST, MULTI_SELECT, STRING_LIST, DATE, entryTriggerEventAttribute, etc. |
|
|
19
|
-
| `operand` | `number \| string \| string[]` | Value(s) for the condition. |
|
|
20
|
-
| `operator` | `string` | Operator key (EQ, GT, LT, IN, NOT_IN, IS_EXACT_DATE, etc.). |
|
|
21
|
-
| `conditionName` | `string` | Label for the condition (e.g. "Extended fields in the transaction"). |
|
|
22
|
-
| `isExcluded` | `boolean` | When true, shows "Exclude" instead of "Include". |
|
|
23
|
-
| `listData` | `string[] \| null` | List of values for MULTI_SELECT (e.g. SKU list). Default `null`. |
|
|
24
|
-
| `additionalFields` | `Record<string, AdditionalFieldEntry>` | Extra condition entries (EXTENDED_FIELD, CUSTOM_FIELD, STORE_FILTER, etc.). |
|
|
25
|
-
| `hideNumberAndProductFields` | `boolean` | When true, hides operand/operator block (e.g. journey context). Default `false`. |
|
|
26
|
-
| `dateTypeData` | `DateTypeData \| null` | For DATE type: RANGE, SINGLE, DAYS_AFTER, DAYS_BEFORE. |
|
|
27
|
-
| `ViewMoreLink` | `ComponentType<ViewMoreLinkProps>` | Custom link component for "View more" (e.g. store filter). |
|
|
28
|
-
| `onClickConfigure` | `(blockId: string) => void` | Called when "View more" is clicked. |
|
|
29
|
-
| `setPopoverVisible` | `(visible: boolean) => void` | Called to close popover when "View more" is used. |
|
|
30
|
-
|
|
31
|
-
Message props (`includeMsg`, `excludeMsg`, `whoseMsg`, `equalMsg`, etc.) are typically provided by `LocaleHoc` from translations.
|
|
32
|
-
|
|
33
|
-
## Breaking changes
|
|
34
|
-
|
|
35
|
-
None. This component did not use antd or deprecated APIs.
|
|
36
|
-
|
|
37
|
-
## Dependencies
|
|
38
|
-
|
|
39
|
-
- `classnames`, `lodash`, `react-intl` (already in blaze-ui dependencies).
|
|
40
|
-
- No new package.json entries required for this migration.
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# Test Cases: CapConditionPreview (Antd v3→v6)
|
|
2
|
-
|
|
3
|
-
**Component:** CapConditionPreview
|
|
4
|
-
**Complexity:** medium (≤20 test cases)
|
|
5
|
-
**Source:** blaze-ui/components/CapConditionPreview/
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Google Sheets
|
|
10
|
-
|
|
11
|
-
**Spreadsheet ID:** `1Xt8l8Q6Hw0cUYV65SlGvGcPnOtzprr0fukDR9UWJ3kg`
|
|
12
|
-
**Tab:** CapConditionPreview
|
|
13
|
-
|
|
14
|
-
### Steps (run in your environment)
|
|
15
|
-
|
|
16
|
-
1. Check connection: `COMPOSIO_CHECK_ACTIVE_CONNECTION` toolkit="googlesheets"
|
|
17
|
-
2. Create tab: `GOOGLESHEETS_ADD_SHEET` with title `CapConditionPreview`, gridProperties `{ "rowCount": 100, "columnCount": 7 }`
|
|
18
|
-
3. Write data: `GOOGLESHEETS_VALUES_UPDATE` with range `CapConditionPreview!A1` and the values table below.
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## Use cases table (for Storybook + migration validation)
|
|
23
|
-
|
|
24
|
-
| ID | Use Case | Props/Config | Expected Visual/Behavior | Priority | Storybook Story | Notes |
|
|
25
|
-
|----|----------|--------------|---------------------------|----------|-----------------|--------|
|
|
26
|
-
| UC-001 | All data type and operator variants | type: NUMBER \| STRING \| LIST \| MULTI_SELECT \| STRING_LIST \| ENTRY_TRIGGER_EVENT_ATTRIBUTE \| DATE; operator: EQ, GT, LT, GTE, LTE, IN_RANGE, NEQ, IN, NOT_IN, IS_EXACT_DATE, IS_BEFORE_DATE, IS_AFTER_DATE, IS_INBETWEEN_DATES, IS_BEFORE_DAYS, IS_AFTER_DAYS; operand/listData/dateTypeData as needed | Correct label and value for each type and operator (e.g. "greater than" + "42" for NUMBER+GT; "Include whose … is on 1/15/2024" for DATE SINGLE) | P0 | TypeAndOperatorVariants | Grouped all type + operator combos into one test |
|
|
27
|
-
| UC-002 | Include vs Exclude and hideNumberAndProductFields | isExcluded: true \| false; hideNumberAndProductFields: true \| false | "Exclude" vs "Include"; when hideNumberAndProductFields true, operand/operator block hidden for STRING/NUMBER/etc., condition name and "whose" still visible | P0 | VisualStates | Default, excluded, and journey/store profile modes |
|
|
28
|
-
| UC-003 | Store upload states (STORE_FILTER) | additionalFields.STORE_FILTER with storeSource: UPLOAD; storeUploadIsInProgress \| isStoreUploadFailed \| isStoreUploadInvalid \| success (operand count) | Progress icon + "Upload in progress"; error icon + "Upload failed" or "Invalid file uploaded"; or "N Stores" when success | P0 | StoreUploadStates | Grouped in progress / failed / invalid / success |
|
|
29
|
-
| UC-004 | ViewMoreLink and SKU download interactions | ViewMoreLink with onClick; setPopoverVisible, onClickConfigure, blockId; MULTI_SELECT + listData (SKU) for download link | Click View more → setPopoverVisible(false) and onClickConfigure(blockId); click "uploaded" → CSV download with SKU list and skuFileName | P0 | Interactions | All interactive handlers in one test |
|
|
30
|
-
| UC-005 | Content: normal, empty, long | operand/listData: normal values; empty listData or []; long operand string; additionalFields: {} vs multiple entries | Renders without crash; empty list shows attachment icon or empty state; long text truncates or wraps; multiple additional conditions show "and" + lineItemMsg | P1 | ContentVariants | Normal, empty, long, multiple conditions |
|
|
31
|
-
| UC-006 | Styling (className) | className: "custom-class" | Root has class "custom-class" and "cap-condition-wrapper"; layout and styled labels (pill background) unchanged | P1 | Styling | className only; no style prop on component |
|
|
32
|
-
| UC-007 | Additional fields (EXTENDED_FIELD, CUSTOM_FIELD, STORE_FILTER, multiple) | additionalFields: EXTENDED_FIELD, CUSTOM_FIELD, STORE_FILTER; expression with operator/operand; multiple keys | Correct description, operator label, and OperandValues for each; "only for lineitems with" and "and" between items when multiple | P0 | AdditionalFields | Grouped all additional field variants |
|
|
33
|
-
| UC-008 | DATE_TYPE sub-variants (RANGE, SINGLE, DAYS_AFTER, DAYS_BEFORE) | type: DATE; dateTypeData: RANGE (startDate, endDate), SINGLE (date or contextData.profileName), DAYS_AFTER/DAYS_BEFORE (days, contextData) | RANGE: "between" + two formatted dates; SINGLE: date or "End date of {profileName} event date attribute"; DAYS_AFTER/BEFORE: "{days} days after/before" + End date of profile | P0 | DateTypeVariants | Grouped RANGE, SINGLE, DAYS_AFTER, DAYS_BEFORE |
|
|
34
|
-
| UC-009 | DATE_TYPE edge cases | dateTypeData: null, undefined; dateType: null, "", "INVALID_TYPE"; startDate/endDate/date: null, undefined, "", invalid string | No date content rendered when null/undefined/invalid; no crash; empty dates show "and" only where applicable | P1 | DateTypeEdgeCases | Production-safe null/undefined/invalid handling |
|
|
35
|
-
| UC-010 | STRING_LIST single vs multiple | type: STRING_LIST; operand: [single] vs [v1, v2, …] | Single: "value1" only; multiple: "value1 +N more" with correct count | P1 | StringListContent | Grouped single and multiple values |
|
|
36
|
-
| UC-011 | MULTI_SELECT: SKU (download) vs non-SKU vs store upload | type: MULTI_SELECT; listData; additionalFields SKU vs none vs STORE_FILTER with UPLOAD | SKU: TruncateList + "uploaded" download link; non-SKU: TruncateList only; store upload: StoreUploadMsg + View more | P0 | MultiSelectVariants | SKU download, list-only, store upload |
|
|
37
|
-
| UC-012 | Entry trigger event attribute | type: ENTRY_TRIGGER_EVENT_ATTRIBUTE; entryTriggerEventAttribute: string; operator | Shows operator label and "Entry trigger event attribute" + attribute name (e.g. "fact1") | P1 | EntryTriggerAttribute | Single test for entry trigger block |
|
|
38
|
-
| UC-013 | Event handlers and callbacks | ViewMoreLink onClick, setPopoverVisible, onClickConfigure; download (setAttribute href/download) | All callbacks invoked with correct args; download link gets correct data URI and filename | P1 | EventHandlers | Grouped all handlers; no mock of Cap components |
|
|
39
|
-
| UC-014 | OperandsMapping labels (i18n) | All operator keys: equalMsg, greaterThanMsg, lessThanMsg, greaterThanOrEqualMsg, lessThanorEqualMsg, inRangeMsg, notEqualMsg, inMsg, notInMsg, date msgs | Correct translated label for each operator in UI | P1 | OperandsMapping | Grouped all operator label props |
|
|
40
|
-
| UC-015 | Empty or missing operand / listData | operand: null, undefined, ""; listData: null, []; type NUMBER/STRING/LIST/MULTI_SELECT | No crash; missing values render empty or fallback (e.g. attachment icon for MULTI_SELECT with no listData) | P1 | EmptyOperand | Edge case for missing data |
|
|
41
|
-
| UC-016 | DATE_TYPE_SINGLE with contextData vs raw date | dateTypeData: SINGLE with date only vs contextData only vs both (contextData takes precedence) | Raw date: formatted date; contextData: "End date of {profileName} event date attribute"; both: contextData branch shown | P1 | DateSingleContext | Precedence and profile name display |
|
|
42
|
-
| UC-017 | Format date for preview (YYYY-MM-DD, ISO, invalid) | dateTypeData with date: "2024-01-15", "2024-01-15T00:00:00.000Z", "invalid" | YYYY-MM-DD and ISO format as en-US locale; invalid returns empty string, no broken UI | P1 | FormatDateForPreview | Timezone-safe and invalid handling |
|
|
43
|
-
| UC-018 | Migration parity (v3 → v6) | Same props as v3 usage; FormattedMessage (react-intl); no antd in component | Same copy and structure as v3; FormattedMessage resolves; no antd dependency in CapConditionPreview | P0 | MigrationParity | i18n and structure parity |
|
|
44
|
-
| UC-019 | Default and optional props | listData=null, hideNumberAndProductFields=false; omit optional msg props (use defaults from LocaleHoc) | Sensible defaults; no crash when optional props omitted; LocaleHoc provides messages | P2 | DefaultProps | Grouped default/optional behavior |
|
|
45
|
-
| UC-020 | Multiple additional conditions (and + lineItemMsg) | additionalFields with 2+ entries (e.g. EXTENDED_FIELD + CUSTOM_FIELD) | First condition without "and"; subsequent with "and" + lineItemMsg; each shows description + operator + OperandValues | P1 | MultipleAdditionalConditions | And/lineItemMsg grouping |
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
## Requirements checklist
|
|
50
|
-
|
|
51
|
-
- Stay within strict limit for complexity level: **medium ≤20** (20 rows).
|
|
52
|
-
- Group similar scenarios aggressively (types, operators, store states, date variants, events).
|
|
53
|
-
- Each test is manually verifiable in Storybook and with RTL.
|
|
54
|
-
- Focus on real-world usage (conditions, store filter, SKU, dates).
|
|
55
|
-
- Prioritize P0/P1 over P2.
|
|
56
|
-
- Grouping rationale noted in Notes column.
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
## Testing notes (Do / Don't)
|
|
61
|
-
|
|
62
|
-
- **Do:** Use React Testing Library with Jest; prefer `data-testid` for querying; clear mocks between tests if applicable.
|
|
63
|
-
- **Don't:** Mock Cap UI Library components unless instructed; avoid over-reliance on getByRole; don’t write overly complex tests.
|
|
64
|
-
|
|
65
|
-
**If approaching limit, merge more test cases. Quality > quantity.**
|