ynotsoft-dynamic-form 1.0.81 → 1.0.83

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/README.md CHANGED
@@ -59,6 +59,7 @@ npm run dev --workspace ynotsoft-dynamic-form
59
59
  ### 5\. How to push changes
60
60
 
61
61
  #### For Regular Development Changes:
62
+
62
63
  ```bash
63
64
  # 1. Commit your changes
64
65
  git add .
@@ -69,6 +70,7 @@ git tag v1.0.[version-number]
69
70
  ```
70
71
 
71
72
  #### For NPM Package Releases:
73
+
72
74
  ```bash
73
75
  # 1. Update version in package.json (in packages/dynamic-form-lib/)
74
76
  npm version patch # for bug fixes (1.0.0 → 1.0.1)
@@ -83,12 +85,14 @@ git push origin v1.0.[version-number] # Replace with your actual version
83
85
  ```
84
86
 
85
87
  #### Version Management:
88
+
86
89
  - **Single Source of Truth:** Version is maintained in `packages/dynamic-form-lib/package.json`
87
90
  - **Git Tags:** Use format `v1.0.[version-number]` (matches package.json version with "v" prefix)
88
91
  - **NPM Registry:** GitHub Actions reads git tag, strips "v" prefix, publishes as `1.0.[version-number]` to NPM
89
92
  - **Auto-Sync:** Git tag version must match package.json version for successful deployment
90
93
 
91
94
  **Quick Check:**
95
+
92
96
  ```bash
93
97
  # Verify versions match before pushing
94
98
  cat packages/dynamic-form-lib/package.json | grep version
@@ -116,7 +120,7 @@ const formDefinition = {
116
120
 
117
121
  <DynamicForm
118
122
  formDefinition={formDefinition}
119
- returnType= {false}
123
+ returnType={false}
120
124
  defaultValues={{ name: "John Doe" }}
121
125
  sendFormValues={(values) => console.log(values)}
122
126
  onFieldsChange={(values) => console.log("Changed:", values)}
@@ -254,10 +258,10 @@ Search for selections and select multiple/single
254
258
  required: true,
255
259
  placeholder: "Type to search users...",
256
260
  // layout: "inline", // default inline
257
- layout: "dialog",
261
+ layout: "dialog",
258
262
  optionsUrl: "/api/users/search", // API endpoint
259
- minSearchLength: 2, // Minimum characters before search (default: 2)
260
- selectMode: "single", // 'single' | 'multiple' (default: 'single')
263
+ minSearchLength: 2, // Minimum characters before search (default: 2)
264
+ selectMode: "single", // 'single' | 'multiple' (default: 'single')
261
265
  }
262
266
  ```
263
267
 
@@ -551,6 +555,34 @@ Load options from API:
551
555
  }
552
556
  ```
553
557
 
558
+ ### Adding Custom styles per field
559
+
560
+ Add custom styles to control field layout flow like: col-span-full | col-span-6
561
+
562
+ field property: 'class:'
563
+
564
+ ```javascript
565
+ {
566
+ name: 'city',
567
+ label: 'City',
568
+ type: 'select',
569
+ class: "col-span-6" // using tailwind classes to control layout flow.
570
+ }
571
+ ```
572
+
573
+ ### Adding description per field.
574
+
575
+ Add description below the input field to give helpful information to users
576
+
577
+ ```javascript
578
+ {
579
+ name: 'sort',
580
+ label: 'Sort Order',
581
+ type: 'select',
582
+ description: "Sort by priority. 1: Highest Priority , 5 Lowerst Priority" // Use to add description below fields
583
+ }
584
+ ```
585
+
554
586
  ---
555
587
 
556
588
  ## Complete Example