@adobe-commerce/aio-experience-kit 1.0.2 → 1.0.4
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/CHANGELOG.md +117 -0
- package/README.md +590 -2
- package/dist/cjs/components/DataForm/ButtonContainer/index.js +158 -0
- package/dist/cjs/components/DataForm/ButtonContainer/index.js.map +1 -0
- package/dist/cjs/components/DataForm/FieldBuilder/index.js +3 -2
- package/dist/cjs/components/DataForm/FieldBuilder/index.js.map +1 -1
- package/dist/cjs/components/DataForm/FormBuilder/index.js +178 -65
- package/dist/cjs/components/DataForm/FormBuilder/index.js.map +1 -1
- package/dist/cjs/components/DataForm/FormBuilder/types.js.map +1 -1
- package/dist/cjs/components/DataForm/index.js +6 -3
- package/dist/cjs/components/DataForm/index.js.map +1 -1
- package/dist/cjs/components/DataTable/GridBuilder/index.js +72 -58
- package/dist/cjs/components/DataTable/GridBuilder/index.js.map +1 -1
- package/dist/cjs/components/DataTable/SearchBar/index.js +184 -0
- package/dist/cjs/components/DataTable/SearchBar/index.js.map +1 -0
- package/dist/cjs/components/DataTable/index.js +53 -33
- package/dist/cjs/components/DataTable/index.js.map +1 -1
- package/dist/cjs/components/DataTable/types.js.map +1 -1
- package/dist/cjs/components/FileUpload/index.js +12 -2
- package/dist/cjs/components/FileUpload/index.js.map +1 -1
- package/dist/esm/components/DataForm/ButtonContainer/index.js +154 -0
- package/dist/esm/components/DataForm/ButtonContainer/index.js.map +1 -0
- package/dist/esm/components/DataForm/FieldBuilder/index.js +3 -2
- package/dist/esm/components/DataForm/FieldBuilder/index.js.map +1 -1
- package/dist/esm/components/DataForm/FormBuilder/index.js +180 -67
- package/dist/esm/components/DataForm/FormBuilder/index.js.map +1 -1
- package/dist/esm/components/DataForm/FormBuilder/types.js.map +1 -1
- package/dist/esm/components/DataForm/index.js +7 -4
- package/dist/esm/components/DataForm/index.js.map +1 -1
- package/dist/esm/components/DataTable/GridBuilder/index.js +74 -60
- package/dist/esm/components/DataTable/GridBuilder/index.js.map +1 -1
- package/dist/esm/components/DataTable/SearchBar/index.js +180 -0
- package/dist/esm/components/DataTable/SearchBar/index.js.map +1 -0
- package/dist/esm/components/DataTable/index.js +53 -33
- package/dist/esm/components/DataTable/index.js.map +1 -1
- package/dist/esm/components/DataTable/types.js.map +1 -1
- package/dist/esm/components/FileUpload/index.js +13 -3
- package/dist/esm/components/FileUpload/index.js.map +1 -1
- package/dist/esm/types/components/DataForm/ButtonContainer/index.d.ts +12 -0
- package/dist/esm/types/components/DataForm/ButtonContainer/index.d.ts.map +1 -0
- package/dist/esm/types/components/DataForm/ButtonContainer/types.d.ts +82 -0
- package/dist/esm/types/components/DataForm/ButtonContainer/types.d.ts.map +1 -0
- package/dist/esm/types/components/DataForm/FieldBuilder/index.d.ts.map +1 -1
- package/dist/esm/types/components/DataForm/FormBuilder/index.d.ts.map +1 -1
- package/dist/esm/types/components/DataForm/FormBuilder/types.d.ts +40 -0
- package/dist/esm/types/components/DataForm/FormBuilder/types.d.ts.map +1 -1
- package/dist/esm/types/components/DataForm/index.d.ts.map +1 -1
- package/dist/esm/types/components/DataForm/types.d.ts +2 -0
- package/dist/esm/types/components/DataForm/types.d.ts.map +1 -1
- package/dist/esm/types/components/DataTable/GridBuilder/index.d.ts +1 -1
- package/dist/esm/types/components/DataTable/GridBuilder/index.d.ts.map +1 -1
- package/dist/esm/types/components/DataTable/GridBuilder/types.d.ts +1 -0
- package/dist/esm/types/components/DataTable/GridBuilder/types.d.ts.map +1 -1
- package/dist/esm/types/components/DataTable/SearchBar/index.d.ts +11 -0
- package/dist/esm/types/components/DataTable/SearchBar/index.d.ts.map +1 -0
- package/dist/esm/types/components/DataTable/index.d.ts +1 -1
- package/dist/esm/types/components/DataTable/index.d.ts.map +1 -1
- package/dist/esm/types/components/DataTable/types.d.ts +38 -0
- package/dist/esm/types/components/DataTable/types.d.ts.map +1 -1
- package/dist/esm/types/components/FileUpload/index.d.ts +2 -3
- package/dist/esm/types/components/FileUpload/index.d.ts.map +1 -1
- package/dist/esm/types/components/FileUpload/types.d.ts +14 -0
- package/dist/esm/types/components/FileUpload/types.d.ts.map +1 -1
- package/dist/esm/types/components/index.d.ts +2 -1
- package/dist/esm/types/components/index.d.ts.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,123 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.4] - 2025-01-01
|
|
9
|
+
|
|
10
|
+
### ✨ Added
|
|
11
|
+
|
|
12
|
+
- **[DataTable - SearchBar](./src/components/DataTable/SearchBar/index.tsx)** - Comprehensive search functionality with filtering capabilities (#33)
|
|
13
|
+
- Added configurable search bar component integrated into DataTable header
|
|
14
|
+
- **Two Search Modes**:
|
|
15
|
+
- Button mode: Search triggered only on button click or Enter key press
|
|
16
|
+
- Type mode: Real-time search-as-you-type with configurable debouncing
|
|
17
|
+
- **Search Configuration** via `DataTableSearchConfig` interface with 14 properties:
|
|
18
|
+
- `enabled` - Enable/disable search bar
|
|
19
|
+
- `placeholder` - Customizable search input placeholder
|
|
20
|
+
- `searchButtonLabel` - Button label text (displayed with icon)
|
|
21
|
+
- `searchOnType` - Toggle between button and type modes
|
|
22
|
+
- `debounceMs` - Configurable debounce delay (default: 300ms)
|
|
23
|
+
- `minCharacters` - Minimum character validation
|
|
24
|
+
- `maxLength` - Maximum input length constraint
|
|
25
|
+
- `searchableColumns` - Column-specific filtering
|
|
26
|
+
- `showClearButton` - Clear button visibility
|
|
27
|
+
- `isSearching` - Loading state with progress indicator
|
|
28
|
+
- `caseSensitive` - Case sensitivity control
|
|
29
|
+
- `showResultsCount` - Results count display
|
|
30
|
+
- `ariaLabel` - Accessibility label customization
|
|
31
|
+
- **Keyboard Shortcuts**:
|
|
32
|
+
- Enter: Trigger search (bypasses debounce in type mode)
|
|
33
|
+
- Escape: Clear search (when clear button enabled)
|
|
34
|
+
- **Layout**: Right-aligned in header with `justifyContent="space-between"`, maintaining ActionsBuilder and ProgressCircle left alignment
|
|
35
|
+
- **Accessibility**: Full ARIA label support, keyboard navigation, screen reader compatible, high contrast mode support
|
|
36
|
+
- **Debouncing**: Smart debounce implementation with timer cleanup on unmount and clear operations
|
|
37
|
+
- **Use Cases**: Product catalog search, customer lookup, order management, inventory filtering, log/audit trail search, multi-column search
|
|
38
|
+
- **API Design**: Uncontrolled component with single `onSearch` callback for both button and type modes
|
|
39
|
+
- **Test Coverage**: 32 unit tests + 12 integration tests, 98.03% statement coverage, 100% function coverage
|
|
40
|
+
- **Documentation**: Comprehensive README with 5 usage examples, configuration table, keyboard shortcuts, and accessibility features
|
|
41
|
+
|
|
42
|
+
- **[DataForm - FieldDependency](./src/components/DataForm/FormBuilder/types.ts)** - Conditional field visibility based on other field values (#32)
|
|
43
|
+
- Added `FieldDependency` interface with field reference and condition configuration
|
|
44
|
+
- Added `DependencyCondition` type union with 9 condition types:
|
|
45
|
+
- `equals` - Field value equals specified value
|
|
46
|
+
- `notEquals` - Field value does not equal specified value
|
|
47
|
+
- `in` - Field value exists in array of values
|
|
48
|
+
- `notIn` - Field value not in array of values
|
|
49
|
+
- `greaterThan` - Numeric field value greater than threshold
|
|
50
|
+
- `lessThan` - Numeric field value less than threshold
|
|
51
|
+
- `truthy` - Field value is truthy (for toggle/boolean fields)
|
|
52
|
+
- `falsy` - Field value is falsy
|
|
53
|
+
- `custom` - Custom validator function for complex conditions
|
|
54
|
+
- **Features**:
|
|
55
|
+
- Dynamic show/hide fields based on dependency conditions
|
|
56
|
+
- Automatic value clearing for hidden fields (optional via `clearValueOnHide`)
|
|
57
|
+
- Excluded hidden fields from form validation and submission
|
|
58
|
+
- Performance optimized with React memoization
|
|
59
|
+
- Multiple fields can depend on same source field
|
|
60
|
+
- **Use Cases**: Progressive disclosure, conditional required fields, multi-step forms, dynamic field groups
|
|
61
|
+
- **Test Coverage**: 18 comprehensive unit tests covering all condition types and edge cases
|
|
62
|
+
- **Code Coverage**: 98.85% for FormBuilder component
|
|
63
|
+
- **Documentation**: README updated with examples and configuration options
|
|
64
|
+
|
|
65
|
+
- **[DataForm - ButtonContainer](./src/components/DataForm/ButtonContainer/index.tsx)** - Configurable form buttons with custom layout control (#34)
|
|
66
|
+
- Added `ButtonContainer` component for flexible form action button customization
|
|
67
|
+
- Added `FormButtonConfig` interface with comprehensive button configuration
|
|
68
|
+
- **Customizable Submit Button**:
|
|
69
|
+
- Custom label, icon, visibility, and ARIA labels
|
|
70
|
+
- Default label: "Save" with SaveFloppy icon
|
|
71
|
+
- **Customizable Back Button**:
|
|
72
|
+
- Custom label, icon, visibility, and ARIA labels
|
|
73
|
+
- Default label: "Back" with Back icon
|
|
74
|
+
- **Secondary Buttons**:
|
|
75
|
+
- Add multiple custom action buttons
|
|
76
|
+
- Support async handlers with independent loading states
|
|
77
|
+
- Button variants: primary, secondary, negative
|
|
78
|
+
- Custom labels, icons, and ARIA labels
|
|
79
|
+
- **Layout Configuration**:
|
|
80
|
+
- Button positioning: before or after form content
|
|
81
|
+
- Button alignment: start, center, end
|
|
82
|
+
- Button gap: small (8px), medium (16px), large (24px)
|
|
83
|
+
- **Features**:
|
|
84
|
+
- Independent loading states for each secondary button
|
|
85
|
+
- Automatic disabled state during form submission
|
|
86
|
+
- Full accessibility with ARIA labels and keyboard navigation
|
|
87
|
+
- 100% backward compatible (defaults match original behavior)
|
|
88
|
+
- **Test Coverage**: 37 comprehensive unit tests covering all customization scenarios
|
|
89
|
+
- **Documentation**: README updated with 10 usage examples for different configurations
|
|
90
|
+
|
|
91
|
+
### 🐛 Fixed
|
|
92
|
+
|
|
93
|
+
- **[DataForm - FieldDependency Test](./test/components/DataForm/FieldDependency.test.tsx)** - TypeScript type errors
|
|
94
|
+
- Added `FormBuilderComponents` import for proper type handling
|
|
95
|
+
- Used type assertion for intentional invalid test case testing
|
|
96
|
+
- Removed unused `@ts-expect-error` directive
|
|
97
|
+
- All 583 tests passing with proper TypeScript compilation
|
|
98
|
+
|
|
99
|
+
## [1.0.3] - 2024-11-19
|
|
100
|
+
|
|
101
|
+
### ✨ Added
|
|
102
|
+
|
|
103
|
+
- **[FileUpload](./src/components/FileUpload/index.tsx)** - Imperative handle for programmatic control
|
|
104
|
+
- Added `FileUploadHandle` interface exposing `reset()` and `getFiles()` methods via React refs
|
|
105
|
+
- Enables parent components to imperatively clear selected files and reset component state
|
|
106
|
+
- Supports form reset workflows, multi-step wizards, and conditional clearing scenarios
|
|
107
|
+
- Maintains 100% backward compatibility (ref is optional)
|
|
108
|
+
- Full test coverage with comprehensive ref functionality testing
|
|
109
|
+
|
|
110
|
+
- **[DataTable](./src/components/DataTable/index.tsx)** - Vertical scrolling for large datasets
|
|
111
|
+
- Added `maxHeight` prop to enable vertical scrolling when displaying large datasets
|
|
112
|
+
- Supports Spectrum dimension tokens (`size-6000`), CSS values (`500px`), and viewport units (`60vh`)
|
|
113
|
+
- Prevents excessive page scrolling and improves performance with many rows
|
|
114
|
+
- Maintains table header visibility while scrolling content
|
|
115
|
+
- Backward compatible (defaults to existing behavior without maxHeight)
|
|
116
|
+
|
|
117
|
+
### 🔧 Changed
|
|
118
|
+
|
|
119
|
+
- **[FieldBuilder](./src/components/DataForm/FieldBuilder/index.tsx)** - Improved Toggle field spacing and alignment
|
|
120
|
+
- Reduced gap between Switch label and Contextual Help from `size-100` (8px) to `size-25` (2px)
|
|
121
|
+
- Changed alignment from `start` to `center` for better vertical positioning
|
|
122
|
+
- Improved visual consistency with other form field types
|
|
123
|
+
- Enhanced user experience with tighter, more cohesive appearance
|
|
124
|
+
|
|
8
125
|
## [1.0.2] - 2024-11-15
|
|
9
126
|
|
|
10
127
|
### ✨ Added
|