@bigbinary/neeto-form-frontend 1.0.10 → 1.0.12

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.
Files changed (5) hide show
  1. package/README.md +38 -5
  2. package/dist/index.js +56419 -26380
  3. package/dist/main.css +2 -2272
  4. package/index.d.ts +2 -0
  5. package/package.json +75 -62
package/README.md CHANGED
@@ -23,6 +23,21 @@ Import stylesheet from the following location:
23
23
  @import "@bigbinary/neeto-form-frontend/dist/main.css";
24
24
  ```
25
25
 
26
+ This package relies on the host project's tailwind configuration. So add
27
+ neeto-form-frontend to your project's tailwind.config.js file:
28
+
29
+ ```js
30
+ module.exports = {
31
+ purge: {
32
+ content: [
33
+ // ... other content directories
34
+ "./node_modules/@bigbinary/neeto-form-frontend/**/*.js",
35
+ ],
36
+ },
37
+ // ... other tailwind config options
38
+ };
39
+ ```
40
+
26
41
  Add `NeetoFormProvider` to the root of your application:
27
42
 
28
43
  ```jsx
@@ -87,6 +102,8 @@ import { ExternalForm } from "@bigbinary/neeto-form-frontend";
87
102
  | `clearValuesOnSubmit` | `boolean` | To clear local storage values on submit |
88
103
  | `clearValuesOnReset` | `boolean` | To clear local storage values on reset |
89
104
  | `formDomProps` | `object` | To set props for form element |
105
+ | `initialValues` | `object` | To set initial values for form |
106
+ | `onChange` | `function` | Callback for form field values change |
90
107
 
91
108
  `Submission` component is used to render a form result.
92
109
 
@@ -167,11 +184,27 @@ Then run the below command on the host application root directory
167
184
  yalc add @bigbinary/neeto-form-frontend
168
185
  ```
169
186
 
170
- ## Building
171
-
172
- The neetoFormEngine-frontend package gets auto-published to npm for every new
173
- merge to the main branch. You can checkout the `publish` workflow in git actions
174
- to get a live update.
187
+ # Building and releasing.
188
+
189
+ The `@bigbinary/neeto-form-frontend` package gets published to NPM when we merge
190
+ a PR with `patch`, `minor` or `major` label to the `main` branch. The `patch`
191
+ label is used for bug fixes, `minor` label is used for new features and `major`
192
+ label is used for breaking changes. You can checkout the
193
+ `Create and publish releases` workflow in GitHub Actions to get a live update.
194
+
195
+ In case if you missed to add the label, you can manually publish the package.
196
+ For that first you need to create a PR to update the version number in the
197
+ `package.json` file and merge it to the `main` branch. After merging the PR, you
198
+ need to create a
199
+ [new github release](https://github.com/bigbinary/neeto-form-frontend/releases/new)
200
+ from main branch. Whenever a new release is created with a new version number,
201
+ the github actions will automatically publish the built package to npm. You can
202
+ checkout the `Publish to npm` workflow in GitHub Actions to get a live update.
203
+
204
+ Please note that before publishing the package, you need to verify the
205
+ functionality in some of the neeto web-apps locally using `yalc` package
206
+ manager. The usage of yalc is explained in this video:
207
+ https://youtu.be/QBiYGP0Rhe0
175
208
 
176
209
  ## Used in
177
210