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

Commit 61a473d

Browse files
committed
fix: update field IDs and categories in README and App component
1 parent 18ca298 commit 61a473d

2 files changed

Lines changed: 21 additions & 20 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ function TemplateEditor() {
2424

2525
fields={{
2626
available: [
27-
{ id: 'customer_name', label: 'Customer Name', category: 'Contact' },
28-
{ id: 'invoice_date', label: 'Invoice Date', category: 'Invoice' },
29-
{ id: 'amount', label: 'Amount', category: 'Invoice' }
27+
{ id: '1324567890', label: 'Customer Name', category: 'Contact' },
28+
{ id: '1324567891', label: 'Invoice Date', category: 'Invoice' },
29+
{ id: '1324567892', label: 'Amount', category: 'Invoice' }
3030
]
3131
}}
3232

@@ -47,8 +47,8 @@ function TemplateEditor() {
4747
```javascript
4848
{
4949
fields: [
50-
{ id: "field_123", alias: "Customer Name", tag: "contact" },
51-
{ id: "field_124", alias: "Invoice Date", tag: "invoice" }
50+
{ id: "1324567890", alias: "Customer Name", tag: "contact" },
51+
{ id: "1324567891", alias: "Invoice Date", tag: "invoice" }
5252
],
5353
document: { /* ProseMirror document JSON */ }
5454
}

demo/src/App.tsx

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

1111
const availableFields: FieldDefinition[] = [
12-
// Contact Information
13-
{ id: "applicant_name", label: "Applicant Name", category: "Applicant" },
14-
{ id: "applicant_email", label: "Applicant Email", category: "Applicant" },
15-
{ id: "applicant_phone", label: "Applicant Phone", category: "Applicant" },
12+
// Agreement
13+
{ id: '1242142770', label: 'Agreement Date', category: 'Agreement' },
1614

17-
// Company Information
18-
{ id: 'organization_name', label: 'Organization Name', category: 'Organization' },
19-
{ id: 'organization_email', label: 'Organization Email', category: 'Organization' },
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' },
2021

2122
// Legal
22-
{ id: 'effective_date', label: 'Effective Date', category: 'Legal' },
23-
{ id: 'termination_date', label: 'Termination Date', category: 'Legal' },
24-
{ id: 'jurisdiction', label: 'Jurisdiction', category: 'Legal' },
25-
{ id: 'governing_law', label: 'Governing Law', category: 'Legal' },
23+
{ id: '1242142774', label: 'Agreement Jurisdiction', category: 'Legal' },
24+
25+
// Company Details
26+
{ id: '1242142775', label: 'Company Address', category: 'Company' },
2627

27-
// Product/Service
28-
{ id: 'service_description', label: 'Service Description', category: 'Product' },
28+
// Signatures
29+
{ id: '1242142776', label: 'Signature', category: 'Signatures' },
2930
];
3031

3132
export function App() {
@@ -35,7 +36,7 @@ export function App() {
3536
const [isImporting, setIsImporting] = useState(false);
3637
const [importError, setImportError] = useState<string | null>(null);
3738
const [documentSource, setDocumentSource] = useState<string | File>(
38-
"https://storage.googleapis.com/public_static_hosting/public_demo_docs/service_agreement.docx",
39+
"https://storage.googleapis.com/public_static_hosting/public_demo_docs/new_service_agreement.docx",
3940
);
4041
const builderRef = useRef<SuperDocTemplateBuilderHandle>(null);
4142
const fileInputRef = useRef<HTMLInputElement>(null);
@@ -56,7 +57,7 @@ export function App() {
5657
log(`✓ Inserted: ${field.alias}`);
5758
}, [log]);
5859

59-
const handleFieldDelete = useCallback((fieldId: string) => {
60+
const handleFieldDelete = useCallback((fieldId: string | number) => {
6061
log(`✗ Deleted: ${fieldId}`);
6162
}, [log]);
6263

0 commit comments

Comments
 (0)