@kissflow/create-component 0.1.0
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/LICENSE +21 -0
- package/README.md +9 -0
- package/bin/index.js +130 -0
- package/package.json +49 -0
- package/scaffolders/constants.js +33 -0
- package/scaffolders/form/helpers.js +12 -0
- package/scaffolders/form/index.js +52 -0
- package/scaffolders/form/template/.vscode/_settings.json +3 -0
- package/scaffolders/form/template/_AGENTS.md +90 -0
- package/scaffolders/form/template/_README.md +505 -0
- package/scaffolders/form/template/_eslintrc.cjs +6 -0
- package/scaffolders/form/template/_gitignore +25 -0
- package/scaffolders/form/template/_npmrc +1 -0
- package/scaffolders/form/template/_package.json +52 -0
- package/scaffolders/form/template/_prettierrc +6 -0
- package/scaffolders/form/template/cert/localhost.crt +21 -0
- package/scaffolders/form/template/cert/localhost.key +28 -0
- package/scaffolders/form/template/components.json +22 -0
- package/scaffolders/form/template/index.html +12 -0
- package/scaffolders/form/template/jsconfig.json +10 -0
- package/scaffolders/form/template/public/_gitkeep +0 -0
- package/scaffolders/form/template/scripts/zip.js +54 -0
- package/scaffolders/form/template/src/App.jsx +46 -0
- package/scaffolders/form/template/src/components/fields/AggregationField.jsx +42 -0
- package/scaffolders/form/template/src/components/fields/AttachmentField.jsx +175 -0
- package/scaffolders/form/template/src/components/fields/BooleanField.jsx +47 -0
- package/scaffolders/form/template/src/components/fields/CheckboxField.jsx +79 -0
- package/scaffolders/form/template/src/components/fields/ChecklistField.jsx +190 -0
- package/scaffolders/form/template/src/components/fields/CurrencyField.jsx +183 -0
- package/scaffolders/form/template/src/components/fields/DateField.jsx +65 -0
- package/scaffolders/form/template/src/components/fields/DateTimeField.jsx +186 -0
- package/scaffolders/form/template/src/components/fields/EmailField.jsx +30 -0
- package/scaffolders/form/template/src/components/fields/FieldError.jsx +11 -0
- package/scaffolders/form/template/src/components/fields/FieldLabel.jsx +14 -0
- package/scaffolders/form/template/src/components/fields/GeolocationField.jsx +99 -0
- package/scaffolders/form/template/src/components/fields/ImageField.jsx +149 -0
- package/scaffolders/form/template/src/components/fields/LookupField.jsx +256 -0
- package/scaffolders/form/template/src/components/fields/MultiSelectField.jsx +152 -0
- package/scaffolders/form/template/src/components/fields/MultiUserSelectField.jsx +153 -0
- package/scaffolders/form/template/src/components/fields/NumberField.jsx +30 -0
- package/scaffolders/form/template/src/components/fields/RadioField.jsx +78 -0
- package/scaffolders/form/template/src/components/fields/RatingField.jsx +64 -0
- package/scaffolders/form/template/src/components/fields/ScannerField.jsx +62 -0
- package/scaffolders/form/template/src/components/fields/SelectField.jsx +74 -0
- package/scaffolders/form/template/src/components/fields/SequenceNumberField.jsx +22 -0
- package/scaffolders/form/template/src/components/fields/SignatureField.jsx +344 -0
- package/scaffolders/form/template/src/components/fields/SliderField.jsx +39 -0
- package/scaffolders/form/template/src/components/fields/SmartAttachmentField.jsx +188 -0
- package/scaffolders/form/template/src/components/fields/TextField.jsx +30 -0
- package/scaffolders/form/template/src/components/fields/TextareaField.jsx +30 -0
- package/scaffolders/form/template/src/components/fields/UserSelectField.jsx +76 -0
- package/scaffolders/form/template/src/components/fields/index.js +87 -0
- package/scaffolders/form/template/src/components/fields/useGeolocationPicker.js +42 -0
- package/scaffolders/form/template/src/components/fields/useScanner.js +43 -0
- package/scaffolders/form/template/src/components/tablefields/TableAggregationField.jsx +14 -0
- package/scaffolders/form/template/src/components/tablefields/TableAttachmentField.jsx +53 -0
- package/scaffolders/form/template/src/components/tablefields/TableBooleanField.jsx +26 -0
- package/scaffolders/form/template/src/components/tablefields/TableCheckboxField.jsx +6 -0
- package/scaffolders/form/template/src/components/tablefields/TableChecklistField.jsx +48 -0
- package/scaffolders/form/template/src/components/tablefields/TableCurrencyField.jsx +140 -0
- package/scaffolders/form/template/src/components/tablefields/TableDateField.jsx +49 -0
- package/scaffolders/form/template/src/components/tablefields/TableDateTimeField.jsx +170 -0
- package/scaffolders/form/template/src/components/tablefields/TableGeolocationField.jsx +69 -0
- package/scaffolders/form/template/src/components/tablefields/TableImageField.jsx +78 -0
- package/scaffolders/form/template/src/components/tablefields/TableLookupField.jsx +165 -0
- package/scaffolders/form/template/src/components/tablefields/TableMultiSelectField.jsx +111 -0
- package/scaffolders/form/template/src/components/tablefields/TableMultiUserSelectField.jsx +109 -0
- package/scaffolders/form/template/src/components/tablefields/TableNumberField.jsx +33 -0
- package/scaffolders/form/template/src/components/tablefields/TableRatingField.jsx +45 -0
- package/scaffolders/form/template/src/components/tablefields/TableScannerField.jsx +67 -0
- package/scaffolders/form/template/src/components/tablefields/TableSelectField.jsx +47 -0
- package/scaffolders/form/template/src/components/tablefields/TableSequenceNumberField.jsx +7 -0
- package/scaffolders/form/template/src/components/tablefields/TableSignatureField.jsx +59 -0
- package/scaffolders/form/template/src/components/tablefields/TableSliderField.jsx +26 -0
- package/scaffolders/form/template/src/components/tablefields/TableTextField.jsx +28 -0
- package/scaffolders/form/template/src/components/tablefields/TableUserSelectField.jsx +51 -0
- package/scaffolders/form/template/src/components/tablefields/index.js +71 -0
- package/scaffolders/form/template/src/components/tablefields/useTableFieldOptions.js +33 -0
- package/scaffolders/form/template/src/components/ui/badge.jsx +40 -0
- package/scaffolders/form/template/src/components/ui/button.jsx +61 -0
- package/scaffolders/form/template/src/components/ui/calendar.jsx +207 -0
- package/scaffolders/form/template/src/components/ui/card.jsx +92 -0
- package/scaffolders/form/template/src/components/ui/checkbox.jsx +27 -0
- package/scaffolders/form/template/src/components/ui/dialog.jsx +122 -0
- package/scaffolders/form/template/src/components/ui/input.jsx +21 -0
- package/scaffolders/form/template/src/components/ui/popover.jsx +40 -0
- package/scaffolders/form/template/src/components/ui/progress.jsx +25 -0
- package/scaffolders/form/template/src/components/ui/radio-group.jsx +37 -0
- package/scaffolders/form/template/src/components/ui/scroll-area.jsx +48 -0
- package/scaffolders/form/template/src/components/ui/select.jsx +156 -0
- package/scaffolders/form/template/src/components/ui/skeleton.jsx +13 -0
- package/scaffolders/form/template/src/components/ui/slider.jsx +61 -0
- package/scaffolders/form/template/src/components/ui/switch.jsx +26 -0
- package/scaffolders/form/template/src/components/ui/table.jsx +111 -0
- package/scaffolders/form/template/src/components/ui/textarea.jsx +18 -0
- package/scaffolders/form/template/src/form/FormAction.jsx +86 -0
- package/scaffolders/form/template/src/form/FormBody.jsx +163 -0
- package/scaffolders/form/template/src/form/FormHeader.jsx +65 -0
- package/scaffolders/form/template/src/form/ProcessActions.jsx +270 -0
- package/scaffolders/form/template/src/form/index.jsx +119 -0
- package/scaffolders/form/template/src/form/shared.jsx +213 -0
- package/scaffolders/form/template/src/hooks/useForm.js +844 -0
- package/scaffolders/form/template/src/index.css +172 -0
- package/scaffolders/form/template/src/lib/utils.js +6 -0
- package/scaffolders/form/template/src/main.jsx +14 -0
- package/scaffolders/form/template/src/sdk/index.js +1 -0
- package/scaffolders/form/template/src/sdk/wrapper.jsx +33 -0
- package/scaffolders/form/template/vite.config.js +41 -0
- package/scaffolders/form-field/constants.js +9 -0
- package/scaffolders/form-field/file-templates/ReactComponent.ejs +13 -0
- package/scaffolders/form-field/helpers.js +31 -0
- package/scaffolders/form-field/index.js +135 -0
- package/scaffolders/form-field/project-template/.vscode/extensions.json +6 -0
- package/scaffolders/form-field/project-template/.vscode/settings.json +6 -0
- package/scaffolders/form-field/project-template/_README.md +27 -0
- package/scaffolders/form-field/project-template/_gitignore +25 -0
- package/scaffolders/form-field/project-template/_npmrc +1 -0
- package/scaffolders/form-field/project-template/_package.json +60 -0
- package/scaffolders/form-field/project-template/_prettierrc +6 -0
- package/scaffolders/form-field/project-template/form-field.config.ejs +12 -0
- package/scaffolders/form-field/utils.js +33 -0
- package/scaffolders/helpers.js +12 -0
- package/scaffolders/page/constants.js +6 -0
- package/scaffolders/page/helpers.js +18 -0
- package/scaffolders/page/index.js +54 -0
- package/scaffolders/page/template/react/_eslintrc.cjs +6 -0
- package/scaffolders/page/template/react/_gitignore +25 -0
- package/scaffolders/page/template/react/_npmrc +1 -0
- package/scaffolders/page/template/react/_package.json +31 -0
- package/scaffolders/page/template/react/_prettierrc +6 -0
- package/scaffolders/page/template/react/cert/localhost.crt +18 -0
- package/scaffolders/page/template/react/cert/localhost.key +28 -0
- package/scaffolders/page/template/react/index.html +12 -0
- package/scaffolders/page/template/react/public/_gitkeep +0 -0
- package/scaffolders/page/template/react/scripts/zip.js +54 -0
- package/scaffolders/page/template/react/src/App.jsx +13 -0
- package/scaffolders/page/template/react/src/assets/kf.logo.png +0 -0
- package/scaffolders/page/template/react/src/hooks/index.js +1 -0
- package/scaffolders/page/template/react/src/hooks/useForm.js +363 -0
- package/scaffolders/page/template/react/src/index.css +77 -0
- package/scaffolders/page/template/react/src/landing/index.jsx +42 -0
- package/scaffolders/page/template/react/src/landing/styles.module.css +62 -0
- package/scaffolders/page/template/react/src/main.jsx +14 -0
- package/scaffolders/page/template/react/src/sdk/index.js +1 -0
- package/scaffolders/page/template/react/src/sdk/wrapper.jsx +33 -0
- package/scaffolders/page/template/react/vite.config.js +35 -0
- package/scaffolders/page/template/vannila/_gitignore +14 -0
- package/scaffolders/page/template/vannila/_npmrc +1 -0
- package/scaffolders/page/template/vannila/_package.json +19 -0
- package/scaffolders/page/template/vannila/_prettierrc +6 -0
- package/scaffolders/page/template/vannila/cert/localhost.crt +18 -0
- package/scaffolders/page/template/vannila/cert/localhost.key +28 -0
- package/scaffolders/page/template/vannila/index.html +46 -0
- package/scaffolders/page/template/vannila/index.js +23 -0
- package/scaffolders/page/template/vannila/public/kf.logo.png +0 -0
- package/scaffolders/page/template/vannila/scripts/zip.js +54 -0
- package/scaffolders/page/template/vannila/src/landing/index.js +23 -0
- package/scaffolders/page/template/vannila/src/landing/styles.css +62 -0
- package/scaffolders/page/template/vannila/style.css +68 -0
- package/scaffolders/page/template/vannila/vite.config.js +37 -0
- package/scaffolders/utils.js +109 -0
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
# useForm Hook - Custom Form Builder Guide
|
|
2
|
+
|
|
3
|
+
The `useForm` hook lets you build fully custom React forms while leaning on Kissflow's
|
|
4
|
+
validation, permissions, dynamic field state, and persistence through the underlying form
|
|
5
|
+
store. It drives standalone **dataform**, **board**, and **process** records — including
|
|
6
|
+
their child tables — from a single dynamic configuration.
|
|
7
|
+
|
|
8
|
+
For a complete, production-ready reference implementation, see
|
|
9
|
+
[`src/form/index.jsx`](./src/form/index.jsx) (header in
|
|
10
|
+
[`src/form/FormHeader.jsx`](./src/form/FormHeader.jsx), body in
|
|
11
|
+
[`src/form/FormBody.jsx`](./src/form/FormBody.jsx), action bar in
|
|
12
|
+
[`src/form/FormAction.jsx`](./src/form/FormAction.jsx) and
|
|
13
|
+
[`src/form/ProcessActions.jsx`](./src/form/ProcessActions.jsx)).
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
```javascript
|
|
18
|
+
import { useForm } from './hooks/useForm'
|
|
19
|
+
|
|
20
|
+
export function MyCustomForm() {
|
|
21
|
+
const { formData, config, updateField, isSaving, errors } = useForm({
|
|
22
|
+
flowType: 'dataform',
|
|
23
|
+
flowId: 'EmpMaster',
|
|
24
|
+
instanceId: 'emp_123', // omit to create a new record
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
// Render fields from `config.sections`, read values from `formData`,
|
|
28
|
+
// push changes with `updateField` — every call autosaves immediately,
|
|
29
|
+
// `isSaving` just reflects that in-flight request.
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Hook API
|
|
34
|
+
|
|
35
|
+
### `useForm({ flowType, flowId, viewId, instanceId, activityInstanceId })`
|
|
36
|
+
|
|
37
|
+
The hook takes a **single options object** (not positional arguments).
|
|
38
|
+
|
|
39
|
+
#### Parameters
|
|
40
|
+
|
|
41
|
+
| Key | Type | Required | Description |
|
|
42
|
+
| -------------------- | ------ | -------- | ------------------------------------------------------------------------- |
|
|
43
|
+
| `flowType` | string | yes | `"dataform"`, `"board"`, or `"process"` |
|
|
44
|
+
| `flowId` | string | yes | ID of the dataform / board / process (e.g. `"EmpMaster"`) |
|
|
45
|
+
| `instanceId` | string | no | Record instance ID to load. Omit to create a **new** record. |
|
|
46
|
+
| `viewId` | string | no | Dataform/board only — the view whose layout & permissions to apply. |
|
|
47
|
+
| `activityInstanceId` | string | no | Process only — the activity (task) instance the form is being filled for. |
|
|
48
|
+
|
|
49
|
+
> **Per-flow-type init:** internally the form is initialised as
|
|
50
|
+
> `flowInstance.initForm(instanceId, viewId)` for dataform/board, and
|
|
51
|
+
> `flowInstance.initForm(instanceId, activityInstanceId)` for process. Pass the one that
|
|
52
|
+
> matches your `flowType`.
|
|
53
|
+
|
|
54
|
+
> **Note:** the legacy page-form signatures (`useForm(formInstanceId)` and the positional
|
|
55
|
+
> `useForm(flowType, flowId, instanceId)`) have been **removed**. Calling the hook without
|
|
56
|
+
> `flowType`/`flowId` throws.
|
|
57
|
+
|
|
58
|
+
#### Returns
|
|
59
|
+
|
|
60
|
+
An object containing:
|
|
61
|
+
|
|
62
|
+
| Property | Type | Description |
|
|
63
|
+
| -------------------------------------------- | -------------- | --------------------------------------------------------------------------------------------- |
|
|
64
|
+
| `formData` | object | Current values, keyed by field ID. Child-table rows live at `formData[tableId]`. |
|
|
65
|
+
| `config` | object | Form configuration — `{ formPermission, sections }` (see below). |
|
|
66
|
+
| `errors` | object | Validation errors (nested — see _Error Handling_). |
|
|
67
|
+
| `loading` | boolean | True during initial load and while `runAction()` is in flight. |
|
|
68
|
+
| `error` | string \| null | General error message if an operation failed. |
|
|
69
|
+
| `isSaving` | boolean | True while an `updateField`/`updateFields` autosave request is in flight. There is no "unsaved changes" state — every edit persists on its own. |
|
|
70
|
+
| `isNewRecord` | boolean | True when no `instanceId` was provided. |
|
|
71
|
+
| `updateField(fieldId, value)` | function | `=> Promise<boolean>`. Validates, autosaves, and refreshes field state. |
|
|
72
|
+
| `updateFields(updates)` | function | `=> Promise<boolean>`. Batch autosave of `{ fieldId: value }`. |
|
|
73
|
+
| `getField(fieldId)` | function | `=> Promise<object>`. Full details for one field. |
|
|
74
|
+
| `getFieldOptions(fieldId, tableId?, rowId?)` | function | `=> Promise<object[]>`. Dropdown/select options; pass `tableId` + `rowId` for a table cell. |
|
|
75
|
+
| `getFormData()` | function | `=> Promise<object>`. Latest data straight from the store. |
|
|
76
|
+
| `parseAttachment(fieldId, file)` | function | `=> Promise<{ appliedFields, suggestedBy }>`. **Process only** — AI Smart Attachment parsing. |
|
|
77
|
+
| `runAction(action, extra?)` | function | `=> Promise<boolean>`. Single dispatcher for every lifecycle action, resolved from `flowType` — see _Actions_. |
|
|
78
|
+
| `getTable(tableId)` | function | Returns child-table operations (see _Child Tables_). |
|
|
79
|
+
| `processStatus` | string | **Process only** — the item's current status (`Draft`, `InProgress`, `Completed`, …). |
|
|
80
|
+
| `isStartStep` | boolean | **Process only** — true when the current activity is the process's start step. |
|
|
81
|
+
| `formActions` | object[] | **Process only** — ordered workflow-action descriptors for the current step (see _Actions_). Empty array for dataform/board. |
|
|
82
|
+
| `getReassignees(query?)` | function | `=> Promise<object[]>`. **Process only** — candidate assignees for the Reassign action. |
|
|
83
|
+
|
|
84
|
+
## The `config` object
|
|
85
|
+
|
|
86
|
+
`config` is the raw `getFormConfiguration()` response, shaped as:
|
|
87
|
+
|
|
88
|
+
```javascript
|
|
89
|
+
{
|
|
90
|
+
formPermission: 'Edit' | 'View', // outer VBAC gate for the whole flow/view
|
|
91
|
+
sections: [
|
|
92
|
+
{
|
|
93
|
+
Type: 'Section', // a regular field group
|
|
94
|
+
Id: 'section_1',
|
|
95
|
+
Name: 'Basic Details',
|
|
96
|
+
IsHidden: false,
|
|
97
|
+
Permission: 'Edit',
|
|
98
|
+
Fields: [
|
|
99
|
+
{
|
|
100
|
+
Id: 'firstName',
|
|
101
|
+
Name: 'First Name',
|
|
102
|
+
Type: 'Text',
|
|
103
|
+
Widget: 'SingleLine',
|
|
104
|
+
Required: true,
|
|
105
|
+
Permission: 'Edit',
|
|
106
|
+
IsHidden: false,
|
|
107
|
+
IsReadOnly: false,
|
|
108
|
+
Validations: [ /* ... */ ],
|
|
109
|
+
},
|
|
110
|
+
// ...
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
Type: 'Model', // a child table; columns are in Fields[]
|
|
115
|
+
Id: 'lineItems',
|
|
116
|
+
Name: 'Line Items',
|
|
117
|
+
IsHidden: false,
|
|
118
|
+
Permission: 'Edit',
|
|
119
|
+
Fields: [ /* column definitions, same field shape */ ],
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
- **`formPermission`** is the outer access gate. When it is `'View'`, the whole form is
|
|
126
|
+
read-only and it **overrides** every field's own `Permission`.
|
|
127
|
+
- Field-level `Permission`, `IsHidden`, `IsReadOnly`, and `Required` are kept in sync
|
|
128
|
+
automatically after each `updateField` / `updateFields` (via `getFieldState()`), so
|
|
129
|
+
conditional show/hide and read-only rules re-render as the user types.
|
|
130
|
+
- Note the **capitalized keys** (`Type`, `Id`, `Name`, `Fields`, `IsHidden`, …).
|
|
131
|
+
|
|
132
|
+
### Rendering from config
|
|
133
|
+
|
|
134
|
+
```javascript
|
|
135
|
+
const { formData, config, updateField } = useForm({
|
|
136
|
+
flowType: 'dataform',
|
|
137
|
+
flowId: 'EmpMaster',
|
|
138
|
+
})
|
|
139
|
+
|
|
140
|
+
const isFormReadOnly = config.formPermission === 'View'
|
|
141
|
+
const visibleSections = (config.sections || []).filter((s) => !s.IsHidden)
|
|
142
|
+
|
|
143
|
+
visibleSections.map((section) => {
|
|
144
|
+
if (section.Type === 'Section') {
|
|
145
|
+
return section.Fields.filter((f) => !f.IsHidden).map((field) => (
|
|
146
|
+
<input
|
|
147
|
+
key={field.Id}
|
|
148
|
+
value={formData[field.Id] || ''}
|
|
149
|
+
disabled={isFormReadOnly || field.IsReadOnly}
|
|
150
|
+
onChange={(e) => updateField(field.Id, e.target.value)}
|
|
151
|
+
/>
|
|
152
|
+
))
|
|
153
|
+
}
|
|
154
|
+
if (section.Type === 'Model') {
|
|
155
|
+
// child table — see "Child Tables" below
|
|
156
|
+
}
|
|
157
|
+
})
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
The reference implementation doesn't hand-roll `<input>`s like the snippet above —
|
|
161
|
+
`src/form/shared.jsx` resolves each field to a component via
|
|
162
|
+
`getFieldComponent(field.Type, field.Widget)` (`src/components/fields/index.js`), or
|
|
163
|
+
`getTableFieldComponent` for child-table cells. Most field types are resolved purely by
|
|
164
|
+
`Type`; a few also key off `Widget`. Two worth calling out:
|
|
165
|
+
|
|
166
|
+
- **Geolocation** (`Type: 'Geolocation'`) renders `GeolocationField` — opens the host's
|
|
167
|
+
native map picker via `window.kf.client.pickLocation()` and stores
|
|
168
|
+
`{ Address, Latitude, Longitude, City, State, Country, ZipCode, Area, PlaceId }`
|
|
169
|
+
(matches the SDK's `GeolocationValue` type). Cleared with a `null` value.
|
|
170
|
+
- **Scanner** (`Type: 'Scanner'`, or any other field with `Widget: 'Scanner'`) renders
|
|
171
|
+
`ScannerField` — opens the host's barcode/QR scanner via
|
|
172
|
+
`window.kf.client.openScanner()` and stores the decoded string. Set
|
|
173
|
+
`field.ScanFromStorage` to let the user decode from an uploaded image instead of the
|
|
174
|
+
live camera.
|
|
175
|
+
|
|
176
|
+
## Usage Examples
|
|
177
|
+
|
|
178
|
+
### Basic form with field updates
|
|
179
|
+
|
|
180
|
+
```javascript
|
|
181
|
+
import { useForm } from './hooks/useForm'
|
|
182
|
+
|
|
183
|
+
export function EmployeeForm() {
|
|
184
|
+
const { formData, updateField, runAction, isSaving, loading, isNewRecord } =
|
|
185
|
+
useForm({
|
|
186
|
+
flowType: 'dataform',
|
|
187
|
+
flowId: 'EmpMaster',
|
|
188
|
+
instanceId: 'emp_123',
|
|
189
|
+
})
|
|
190
|
+
|
|
191
|
+
// Only a new record needs an explicit Submit — runAction('submit')
|
|
192
|
+
// finalizes the draft. An existing record has nothing to do here; every
|
|
193
|
+
// updateField call already autosaved.
|
|
194
|
+
const handleSubmit = async () => {
|
|
195
|
+
if (!isNewRecord) return
|
|
196
|
+
const success = await runAction('submit')
|
|
197
|
+
if (success) console.log('Record submitted!')
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
return (
|
|
201
|
+
<div>
|
|
202
|
+
<h2>{isNewRecord ? 'New Employee' : 'Edit Employee'}</h2>
|
|
203
|
+
{isSaving && <span>Saving…</span>}
|
|
204
|
+
<input
|
|
205
|
+
value={formData.firstName || ''}
|
|
206
|
+
onChange={(e) => updateField('firstName', e.target.value)}
|
|
207
|
+
placeholder="First Name"
|
|
208
|
+
/>
|
|
209
|
+
{isNewRecord && (
|
|
210
|
+
<button onClick={handleSubmit} disabled={loading}>
|
|
211
|
+
{loading ? 'Submitting...' : 'Submit'}
|
|
212
|
+
</button>
|
|
213
|
+
)}
|
|
214
|
+
</div>
|
|
215
|
+
)
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### New record
|
|
220
|
+
|
|
221
|
+
```javascript
|
|
222
|
+
const { runAction, isNewRecord } = useForm({
|
|
223
|
+
flowType: 'dataform',
|
|
224
|
+
flowId: 'EmpMaster',
|
|
225
|
+
})
|
|
226
|
+
// No instanceId => isNewRecord === true; runAction('submit') finalizes the draft record.
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
## Saving vs Submitting (dataform / board)
|
|
230
|
+
|
|
231
|
+
Omitting `instanceId` doesn't just mark the form dirty locally — `initForm` immediately
|
|
232
|
+
creates a real **draft** record on the backend, and every `updateField` / `updateFields`
|
|
233
|
+
call autosaves straight to that draft (there's no separate "unsaved changes buffered
|
|
234
|
+
client-side" state to worry about).
|
|
235
|
+
|
|
236
|
+
Because of that autosave, `runAction('submit')` behaves differently depending on
|
|
237
|
+
`isNewRecord`:
|
|
238
|
+
|
|
239
|
+
- **Existing record** (`isNewRecord === false`): fields already autosaved as you edited
|
|
240
|
+
them, so `runAction('submit')` only validates.
|
|
241
|
+
- **New record** (`isNewRecord === true`, `flowType` `dataform` or `board`): the draft
|
|
242
|
+
still needs to be **finalized** — `runAction('submit')` validates, then calls the SDK's
|
|
243
|
+
`submitItem` to turn the draft into a submitted record, and flips `isNewRecord` to
|
|
244
|
+
`false`.
|
|
245
|
+
|
|
246
|
+
Only show a footer action for a **new** dataform/board record — Submit
|
|
247
|
+
(`runAction('submit')`) and Discard (`runAction('discard')`); an existing record has no
|
|
248
|
+
footer action at all, since there's nothing left to persist. See
|
|
249
|
+
`src/form/FormAction.jsx` for the reference pattern (it returns `null` once `isNewRecord`
|
|
250
|
+
is `false`), and `src/form/FormHeader.jsx` for how to surface autosave status
|
|
251
|
+
(`isSaving`) instead of a Save button.
|
|
252
|
+
|
|
253
|
+
This finalize step does not apply to `flowType: 'process'` — process forms always expose
|
|
254
|
+
a separate `submit` workflow action (see _Actions_ below).
|
|
255
|
+
|
|
256
|
+
### Displaying validation errors
|
|
257
|
+
|
|
258
|
+
```javascript
|
|
259
|
+
const { formData, errors, updateField } = useForm({
|
|
260
|
+
flowType: 'dataform',
|
|
261
|
+
flowId: 'EmpMaster',
|
|
262
|
+
})
|
|
263
|
+
|
|
264
|
+
<input
|
|
265
|
+
value={formData.email || ''}
|
|
266
|
+
onChange={(e) => updateField('email', e.target.value)}
|
|
267
|
+
type="email"
|
|
268
|
+
/>
|
|
269
|
+
{errors.email && <span className="error">{errors.email[0]}</span>}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
`errors` refreshes on every `updateField` call — no separate "Save" click needed to see
|
|
273
|
+
them.
|
|
274
|
+
|
|
275
|
+
### Multiple field updates
|
|
276
|
+
|
|
277
|
+
```javascript
|
|
278
|
+
const { updateFields } = useForm({ flowType: 'dataform', flowId: 'EmpMaster' })
|
|
279
|
+
|
|
280
|
+
await updateFields({
|
|
281
|
+
firstName: 'John',
|
|
282
|
+
lastName: 'Doe',
|
|
283
|
+
email: 'john@example.com',
|
|
284
|
+
})
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### Discard a draft
|
|
288
|
+
|
|
289
|
+
```javascript
|
|
290
|
+
const { runAction, isNewRecord } = useForm({
|
|
291
|
+
flowType: 'dataform',
|
|
292
|
+
flowId: 'EmpMaster',
|
|
293
|
+
})
|
|
294
|
+
// Only meaningful while isNewRecord is true — deletes the draft outright
|
|
295
|
+
// (Dataform/Board) or runs the process `discard` workflow action.
|
|
296
|
+
if (isNewRecord) await runAction('discard')
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
There's no `reset()` — since every field autosaves immediately, there's no
|
|
300
|
+
local "unsaved changes" buffer to revert to. `runAction('discard')` is the
|
|
301
|
+
equivalent of "I don't want this record" for a still-in-progress draft.
|
|
302
|
+
|
|
303
|
+
## Child Tables
|
|
304
|
+
|
|
305
|
+
For `Model` sections, get table operations with `getTable(tableId)`. **Rows are read from
|
|
306
|
+
`formData[tableId]`** — the table object itself does **not** expose a `rows` property.
|
|
307
|
+
|
|
308
|
+
```javascript
|
|
309
|
+
const { formData, getTable } = useForm({
|
|
310
|
+
flowType: 'process',
|
|
311
|
+
flowId: 'PurchaseOrder',
|
|
312
|
+
})
|
|
313
|
+
|
|
314
|
+
const table = getTable('lineItems')
|
|
315
|
+
const rows = formData.lineItems || []
|
|
316
|
+
|
|
317
|
+
// Mutations refresh formData automatically:
|
|
318
|
+
await table.addRow({ item: 'Widget', qty: 2 })
|
|
319
|
+
await table.addRows([{ item: 'A' }, { item: 'B' }])
|
|
320
|
+
await table.updateRow(rowId, 'qty', 5)
|
|
321
|
+
await table.deleteRow(rowId)
|
|
322
|
+
await table.deleteRows([rowId1, rowId2])
|
|
323
|
+
|
|
324
|
+
const field = await table.getRowField(rowId, 'qty')
|
|
325
|
+
const selected = await table.getSelectedRows()
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
`getTable` returns:
|
|
329
|
+
|
|
330
|
+
| Method | Description |
|
|
331
|
+
| ---------------------------------- | --------------------------------------- |
|
|
332
|
+
| `addRow(rowData)` | Append a row, then refresh `formData`. |
|
|
333
|
+
| `addRows(rows)` | Append multiple rows. |
|
|
334
|
+
| `updateRow(rowId, fieldId, value)` | Update one cell. |
|
|
335
|
+
| `deleteRow(rowId)` | Delete one row. |
|
|
336
|
+
| `deleteRows(rowIds)` | Delete multiple rows. |
|
|
337
|
+
| `getRowField(rowId, fieldId)` | `=> Promise<object>` — a row's field. |
|
|
338
|
+
| `getSelectedRows()` | `=> Promise<object[]>` — selected rows. |
|
|
339
|
+
|
|
340
|
+
## Field Options (dropdowns / lookups)
|
|
341
|
+
|
|
342
|
+
```javascript
|
|
343
|
+
const { getFieldOptions } = useForm({
|
|
344
|
+
flowType: 'dataform',
|
|
345
|
+
flowId: 'EmpMaster',
|
|
346
|
+
})
|
|
347
|
+
|
|
348
|
+
const options = await getFieldOptions('department') // top-level field
|
|
349
|
+
const cellOptions = await getFieldOptions('item', 'lineItems', rowId) // table cell
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
## Smart Attachment Parsing (process only)
|
|
353
|
+
|
|
354
|
+
`parseAttachment` triggers AI document parsing on a Smart Attachment field. Matching empty
|
|
355
|
+
fields are auto-filled by the platform and `formData` is refreshed for you.
|
|
356
|
+
|
|
357
|
+
```javascript
|
|
358
|
+
const { parseAttachment } = useForm({
|
|
359
|
+
flowType: 'process',
|
|
360
|
+
flowId: 'InvoiceApproval',
|
|
361
|
+
})
|
|
362
|
+
|
|
363
|
+
const { appliedFields, suggestedBy } = await parseAttachment(
|
|
364
|
+
'invoiceFile',
|
|
365
|
+
file
|
|
366
|
+
)
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
Calling it for a non-process flow throws.
|
|
370
|
+
|
|
371
|
+
## Actions
|
|
372
|
+
|
|
373
|
+
`runAction(action, extra?)` is the **single dispatcher for every lifecycle action** —
|
|
374
|
+
it resolves its behavior from `flowType` internally, so the same function works
|
|
375
|
+
uniformly for a Discard button, a Submit button, and every process workflow button. This
|
|
376
|
+
is deliberate: don't special-case which function to call per flow type in your UI: always
|
|
377
|
+
call `runAction(action, extra?)`.
|
|
378
|
+
|
|
379
|
+
- **Dataform/board**: only `'submit'` and `'discard'` are supported (see _Saving vs
|
|
380
|
+
Submitting_ and _Discard a draft_ above).
|
|
381
|
+
- **Process**: `action` is one of `submit`, `reject`, `sendback`, `reassign`, `withdraw`,
|
|
382
|
+
`restart`, `discard`. `extra` carries action-specific payload: `{ comment }` for
|
|
383
|
+
reject/sendback/withdraw, `{ stepId, comment }` for sendback, `{ reassignTo, comment,
|
|
384
|
+
reassignType }` for reassign. `submit`/`reject`/`sendback`/`reassign` validate the form
|
|
385
|
+
first and return `false` (without transitioning) if there are errors — these persist
|
|
386
|
+
data alongside the transition (a comment, a corrected field). `withdraw`/`restart`/
|
|
387
|
+
`discard` skip validation — they're exit/reset actions with no data of their own to
|
|
388
|
+
lose.
|
|
389
|
+
|
|
390
|
+
For `flowType: 'process'`, `formActions` gives you the ordered list of workflow actions
|
|
391
|
+
valid at the item's **current step** — resolved from `processStatus` + `isStartStep`
|
|
392
|
+
(e.g. a fresh Draft item shows `discard`, `submit`; an approver's step shows `reassign`,
|
|
393
|
+
`sendback`, `reject`, `submit`). There is no `save` action in this list — every field
|
|
394
|
+
edit already autosaved, so only real workflow transitions are listed. Dataform/board
|
|
395
|
+
always return `[]` for `formActions` (their Discard/Submit buttons aren't step-dependent
|
|
396
|
+
the way process actions are).
|
|
397
|
+
|
|
398
|
+
```javascript
|
|
399
|
+
const {
|
|
400
|
+
formActions, // [{ key, label, primary?, destructive?, requiresComment?, requiresReassignee?, confirm? }, ...]
|
|
401
|
+
runAction,
|
|
402
|
+
getReassignees,
|
|
403
|
+
} = useForm({ flowType: 'process', flowId: 'PurchaseOrder', instanceId, activityInstanceId })
|
|
404
|
+
|
|
405
|
+
formActions.map((action) => (
|
|
406
|
+
<button key={action.key} onClick={() => runAction(action.key, { comment, reassignTo })}>
|
|
407
|
+
{action.label}
|
|
408
|
+
</button>
|
|
409
|
+
))
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
Each descriptor's `requiresComment` / `requiresReassignee` / `confirm` flags tell you
|
|
413
|
+
whether to open a confirmation modal before calling `runAction` — see
|
|
414
|
+
`ProcessActions.jsx` for the reference modal. `getReassignees(query?)` returns candidate
|
|
415
|
+
users for the Reassign picker.
|
|
416
|
+
|
|
417
|
+
## Error Handling
|
|
418
|
+
|
|
419
|
+
Two levels of errors:
|
|
420
|
+
|
|
421
|
+
1. **General error** (`error`) — set when an operation fails (network, init, etc.).
|
|
422
|
+
|
|
423
|
+
```javascript
|
|
424
|
+
if (error) console.error('General error:', error)
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
2. **Validation errors** (`errors`) — the raw `getValidationErrors()` response. It is
|
|
428
|
+
**nested**, not a flat map. Top-level fields appear under `_root`, and child-table
|
|
429
|
+
errors are keyed by table → row → field:
|
|
430
|
+
|
|
431
|
+
```javascript
|
|
432
|
+
{
|
|
433
|
+
_root: { firstName: ['First name is required'], email: ['Invalid email'] },
|
|
434
|
+
lineItems: {
|
|
435
|
+
row_1: { qty: ['Must be greater than 0'] },
|
|
436
|
+
},
|
|
437
|
+
}
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
The validated branches of `runAction` (`submit`/`reject`/`sendback`/`reassign`)
|
|
441
|
+
inspect this whole structure and return `false` (setting `error`) if any `_root`
|
|
442
|
+
field or any table-row field has messages. When binding a single field's error in the
|
|
443
|
+
UI, read it from the shape your render layer normalises (the reference
|
|
444
|
+
`src/form/index.jsx` passes each field its own `errors[fieldId]`).
|
|
445
|
+
|
|
446
|
+
**Hidden fields are filtered out automatically.** The underlying `getValidationErrors()`
|
|
447
|
+
validates every field regardless of visibility, which would otherwise block
|
|
448
|
+
`runAction('submit')` on a required field the user can't even see. `useForm`
|
|
449
|
+
cross-references the current `config.sections` (including per-field `IsHidden` and
|
|
450
|
+
per-section `IsHidden`) and strips out errors for anything not currently visible before
|
|
451
|
+
they ever reach `errors` or the has-errors check — you don't need to filter them yourself.
|
|
452
|
+
|
|
453
|
+
## Loading State
|
|
454
|
+
|
|
455
|
+
Two different signals, don't conflate them:
|
|
456
|
+
|
|
457
|
+
- `loading` — `true` during the initial load and while `runAction()` is in flight.
|
|
458
|
+
- `isSaving` — `true` only while a field autosave (`updateField`/`updateFields`) is in
|
|
459
|
+
flight. This is what a header-style "Saving…" indicator should watch (see
|
|
460
|
+
`src/form/FormHeader.jsx` for the reference pattern) — it's typically a much shorter,
|
|
461
|
+
much more frequent blip than `loading`.
|
|
462
|
+
|
|
463
|
+
```javascript
|
|
464
|
+
<button disabled={loading}>{loading ? 'Loading...' : 'Submit'}</button>
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
## Best Practices
|
|
468
|
+
|
|
469
|
+
1. **Render from `config.sections`** rather than hard-coding fields — permissions and
|
|
470
|
+
visibility stay correct as rules evaluate.
|
|
471
|
+
2. **Respect `formPermission === 'View'`** and each field's `IsReadOnly` / `IsHidden`.
|
|
472
|
+
3. **Always surface validation errors** before/after `runAction('submit')`.
|
|
473
|
+
4. **Show `loading`** to disable interaction during async work; show `isSaving`
|
|
474
|
+
separately as a lightweight autosave indicator (don't block input on it).
|
|
475
|
+
5. **Don't build a Save button for existing records** — every `updateField`/
|
|
476
|
+
`updateFields` call already persisted. Only new dataform/board records need a visible
|
|
477
|
+
Submit/Discard pair (see _Saving vs Submitting_, _Discard a draft_).
|
|
478
|
+
6. **Always call `runAction(action, extra?)`** rather than special-casing which function
|
|
479
|
+
to call per flow type — it resolves the right behavior internally.
|
|
480
|
+
|
|
481
|
+
## Troubleshooting
|
|
482
|
+
|
|
483
|
+
### `useForm requires (flowType, flowId) ...`
|
|
484
|
+
|
|
485
|
+
You called the hook without `flowType`/`flowId`. The legacy page-form form is gone — always
|
|
486
|
+
pass at least `{ flowType, flowId }`.
|
|
487
|
+
|
|
488
|
+
### `SDK not initialized`
|
|
489
|
+
|
|
490
|
+
Ensure the component is rendered inside the SDK wrapper (`window.kf` must exist). See
|
|
491
|
+
`src/sdk/`.
|
|
492
|
+
|
|
493
|
+
### Validation errors not updating
|
|
494
|
+
|
|
495
|
+
They refresh automatically after `updateField` / `updateFields` / `runAction`. No extra call needed.
|
|
496
|
+
|
|
497
|
+
### Table rows not showing
|
|
498
|
+
|
|
499
|
+
Read rows from `formData[tableId]`, not from the object returned by `getTable`.
|
|
500
|
+
|
|
501
|
+
## Support
|
|
502
|
+
|
|
503
|
+
1. Study the reference component: [`src/form/index.jsx`](./src/form/index.jsx).
|
|
504
|
+
2. Review the form-store validation rules.
|
|
505
|
+
3. Check the Kissflow SDK documentation.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
pnpm-debug.log*
|
|
8
|
+
lerna-debug.log*
|
|
9
|
+
|
|
10
|
+
cert
|
|
11
|
+
node_modules
|
|
12
|
+
dist
|
|
13
|
+
dist-ssr
|
|
14
|
+
*.local
|
|
15
|
+
|
|
16
|
+
# Editor directories and files
|
|
17
|
+
.vscode/*
|
|
18
|
+
!.vscode/extensions.json
|
|
19
|
+
.idea
|
|
20
|
+
.DS_Store
|
|
21
|
+
*.suo
|
|
22
|
+
*.ntvs*
|
|
23
|
+
*.njsproj
|
|
24
|
+
*.sln
|
|
25
|
+
*.sw?
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
engine-strict=true
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "<%= projectName %>",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"zip": "node scripts/zip.js",
|
|
9
|
+
"build": "vite build",
|
|
10
|
+
"preview": "vite preview"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@kissflow/lowcode-client-sdk": "latest",
|
|
14
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
15
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
16
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
17
|
+
"@radix-ui/react-progress": "^1.1.8",
|
|
18
|
+
"@radix-ui/react-radio-group": "^1.3.8",
|
|
19
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
20
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
21
|
+
"@radix-ui/react-slider": "^1.3.6",
|
|
22
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
23
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
24
|
+
"@tailwindcss/vite": "^4.1.17",
|
|
25
|
+
"class-variance-authority": "^0.7.1",
|
|
26
|
+
"clsx": "^2.1.1",
|
|
27
|
+
"date-fns": "^4.4.0",
|
|
28
|
+
"lucide-react": "^0.555.0",
|
|
29
|
+
"radix-ui": "^1.6.2",
|
|
30
|
+
"react": "^19.0.0",
|
|
31
|
+
"react-day-picker": "^10.0.1",
|
|
32
|
+
"react-dom": "^19.0.0",
|
|
33
|
+
"tailwind-merge": "^3.4.0",
|
|
34
|
+
"tailwindcss": "^4.1.17"
|
|
35
|
+
},
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": "^18.0.0 || >=20.0.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/react": "^19.0.0",
|
|
41
|
+
"@types/react-dom": "^19.0.0",
|
|
42
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
43
|
+
"archiver": "^7.0.1",
|
|
44
|
+
"baseline-browser-mapping": "^2.9.0",
|
|
45
|
+
"eslint": "^8.57.0",
|
|
46
|
+
"eslint-plugin-react": "^7.34.0",
|
|
47
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
48
|
+
"eslint-plugin-react-refresh": "^0.4.5",
|
|
49
|
+
"tw-animate-css": "^1.4.0",
|
|
50
|
+
"vite": "^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X0FRVAsATrXLQS1Mpp/Xj9bRsqKGI
|
|
26
|
+
I20eEr0/IxKwbhpKUoacC4wqzmlQi4XPMlFek31xzZKmhKmGQAr0JfoA4cz0JKQ8
|
|
27
|
+
fxTW3HlyUu2Qw5w9KTt7WXM=
|
|
28
|
+
-----END PRIVATE KEY-----
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
+
"style": "new-york",
|
|
4
|
+
"rsc": false,
|
|
5
|
+
"tsx": false,
|
|
6
|
+
"tailwind": {
|
|
7
|
+
"config": "",
|
|
8
|
+
"css": "src/index.css",
|
|
9
|
+
"baseColor": "slate",
|
|
10
|
+
"cssVariables": true,
|
|
11
|
+
"prefix": ""
|
|
12
|
+
},
|
|
13
|
+
"iconLibrary": "lucide",
|
|
14
|
+
"aliases": {
|
|
15
|
+
"components": "@/components",
|
|
16
|
+
"utils": "@/lib/utils",
|
|
17
|
+
"ui": "@/components/ui",
|
|
18
|
+
"lib": "@/lib",
|
|
19
|
+
"hooks": "@/hooks"
|
|
20
|
+
},
|
|
21
|
+
"registries": {}
|
|
22
|
+
}
|