Skip to content
This repository was archived by the owner on Jan 30, 2026. It is now read-only.

Commit a64e8b8

Browse files
authored
feat: enhance field management with grouping and improved UI (#19)
* feat: enhance field management with grouping and improved UI - Introduced grouping functionality for fields in FieldList component. - Added FieldItem component for better encapsulation of field rendering logic. - Implemented expand/collapse feature for grouped fields. - Enhanced styling for field items and group headers for better UX. - Updated FieldMenu to support selection of existing fields with grouping. - Modified TemplateField type to include group property for better organization. - Improved overall code structure and readability. * fix: include group comparison in template fields equality check
1 parent 0756e82 commit a64e8b8

File tree

9 files changed

+736
-511
lines changed

9 files changed

+736
-511
lines changed

demo/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"@superdoc-dev/template-builder": "link:../.",
1212
"react": "^19.2.0",
1313
"react-dom": "^19.2.0",
14-
"superdoc": "^0.29.0"
14+
"superdoc": "^0.31.2"
1515
},
1616
"devDependencies": {
1717
"@types/react": "^19.2.6",
@@ -20,4 +20,4 @@
2020
"typescript": "^5.9.3",
2121
"vite": "^7.2.2"
2222
}
23-
}
23+
}

demo/pnpm-lock.yaml

Lines changed: 9 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/src/App.tsx

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,13 @@ import "superdoc/dist/style.css";
99
import "./App.css";
1010

1111
const availableFields: FieldDefinition[] = [
12-
// Agreement
13-
{ id: '1242142770', label: 'Agreement Date', category: 'Agreement' },
14-
15-
// Parties
16-
{ id: '1242142771', label: 'User Name', category: 'Parties' },
17-
{ id: '1242142772', label: 'Company Name', category: 'Parties' },
18-
19-
// Scope
20-
{ id: '1242142773', label: 'Service Type', category: 'Scope' },
21-
22-
// Legal
23-
{ id: '1242142774', label: 'Agreement Jurisdiction', category: 'Legal' },
24-
25-
// Company Details
26-
{ id: '1242142775', label: 'Company Address', category: 'Company' },
27-
28-
// Signatures
29-
{ id: '1242142776', label: 'Signature', category: 'Signatures' },
12+
{ id: '1242142770', label: 'Agreement Date' },
13+
{ id: '1242142771', label: 'User Name' },
14+
{ id: '1242142772', label: 'Company Name' },
15+
{ id: '1242142773', label: 'Service Type' },
16+
{ id: '1242142774', label: 'Agreement Jurisdiction' },
17+
{ id: '1242142775', label: 'Company Address' },
18+
{ id: '1242142776', label: 'Signature' },
3019
];
3120

3221
export function App() {

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"peerDependencies": {
5353
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
5454
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
55-
"superdoc": "^0.29.0"
55+
"superdoc": "^0.31.2"
5656
},
5757
"devDependencies": {
5858
"@commitlint/cli": "^20.1.0",
@@ -78,9 +78,9 @@
7878
"semantic-release": "^25.0.2",
7979
"typescript": "^5.9.3",
8080
"typescript-eslint": "^8.47.0",
81-
"vite": "^7.2.2",
81+
"vite": "^7.2.4",
8282
"vite-plugin-dts": "^4.5.4",
83-
"vitest": "^4.0.10"
83+
"vitest": "^4.0.13"
8484
},
8585
"publishConfig": {
8686
"access": "public"

0 commit comments

Comments
 (0)