df-ae-forms-package 1.0.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/README.md +458 -0
- package/dist/ComponentActionFeatures.d.ts +19 -0
- package/dist/ComponentActionFeatures.d.ts.map +1 -0
- package/dist/DfFormPreview.d.ts +24 -0
- package/dist/DfFormPreview.d.ts.map +1 -0
- package/dist/ThresholdAlert.d.ts +15 -0
- package/dist/ThresholdAlert.d.ts.map +1 -0
- package/dist/components/ComponentSubmissionActions.d.ts +9 -0
- package/dist/components/ComponentSubmissionActions.d.ts.map +1 -0
- package/dist/components/RaiseIssueModal.d.ts +24 -0
- package/dist/components/RaiseIssueModal.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-checkbox/DfFormCheckbox.d.ts +22 -0
- package/dist/df-form-controls/df-form-checkbox/DfFormCheckbox.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-checkbox/index.d.ts +3 -0
- package/dist/df-form-controls/df-form-checkbox/index.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-comments/DfFormComments.d.ts +12 -0
- package/dist/df-form-controls/df-form-comments/DfFormComments.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-comments/index.d.ts +3 -0
- package/dist/df-form-controls/df-form-comments/index.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-date-time/DfFormDateTime.d.ts +21 -0
- package/dist/df-form-controls/df-form-date-time/DfFormDateTime.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-date-time/index.d.ts +3 -0
- package/dist/df-form-controls/df-form-date-time/index.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-error-msg/DfFormErrorMsg.d.ts +5 -0
- package/dist/df-form-controls/df-form-error-msg/DfFormErrorMsg.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-error-msg/index.d.ts +3 -0
- package/dist/df-form-controls/df-form-error-msg/index.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-file-upload/DfFormFileUpload.d.ts +33 -0
- package/dist/df-form-controls/df-form-file-upload/DfFormFileUpload.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-file-upload/example.d.ts +8 -0
- package/dist/df-form-controls/df-form-file-upload/example.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-file-upload/index.d.ts +3 -0
- package/dist/df-form-controls/df-form-file-upload/index.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-grid/df-form-grid.d.ts +41 -0
- package/dist/df-form-controls/df-form-grid/df-form-grid.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-heading/DfFormHeading.d.ts +12 -0
- package/dist/df-form-controls/df-form-heading/DfFormHeading.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-heading/index.d.ts +3 -0
- package/dist/df-form-controls/df-form-heading/index.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-input/DfFormInput.d.ts +25 -0
- package/dist/df-form-controls/df-form-input/DfFormInput.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-input/index.d.ts +3 -0
- package/dist/df-form-controls/df-form-input/index.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-instruction/DfFormInstruction.d.ts +13 -0
- package/dist/df-form-controls/df-form-instruction/DfFormInstruction.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-instruction/index.d.ts +3 -0
- package/dist/df-form-controls/df-form-instruction/index.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-location/DfFormLocation.d.ts +31 -0
- package/dist/df-form-controls/df-form-location/DfFormLocation.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-location/index.d.ts +3 -0
- package/dist/df-form-controls/df-form-location/index.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-preview-interfaces.d.ts +389 -0
- package/dist/df-form-controls/df-form-preview-interfaces.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-radio/DfFormRadio.d.ts +22 -0
- package/dist/df-form-controls/df-form-radio/DfFormRadio.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-radio/index.d.ts +3 -0
- package/dist/df-form-controls/df-form-radio/index.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-section/df-form-section.d.ts +35 -0
- package/dist/df-form-controls/df-form-section/df-form-section.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-segment/DfFormSegment.d.ts +23 -0
- package/dist/df-form-controls/df-form-segment/DfFormSegment.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-segment/index.d.ts +3 -0
- package/dist/df-form-controls/df-form-segment/index.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-select/DfFormSelect.d.ts +22 -0
- package/dist/df-form-controls/df-form-select/DfFormSelect.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-select/index.d.ts +3 -0
- package/dist/df-form-controls/df-form-select/index.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-signature/DfFormSignature.d.ts +21 -0
- package/dist/df-form-controls/df-form-signature/DfFormSignature.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-signature/index.d.ts +3 -0
- package/dist/df-form-controls/df-form-signature/index.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-table/df-form-table.d.ts +43 -0
- package/dist/df-form-controls/df-form-table/df-form-table.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-textarea/DfFormTextarea.d.ts +21 -0
- package/dist/df-form-controls/df-form-textarea/DfFormTextarea.d.ts.map +1 -0
- package/dist/df-form-controls/df-form-textarea/index.d.ts +3 -0
- package/dist/df-form-controls/df-form-textarea/index.d.ts.map +1 -0
- package/dist/index.css +11 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +943 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +11 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/services/conditionalLogicService.d.ts +47 -0
- package/dist/services/conditionalLogicService.d.ts.map +1 -0
- package/dist/services/toast.service.d.ts +27 -0
- package/dist/services/toast.service.d.ts.map +1 -0
- package/dist/types/form-builder-schema.model.d.ts +75 -0
- package/dist/types/form-builder-schema.model.d.ts.map +1 -0
- package/package.json +88 -0
package/README.md
ADDED
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
# DF AE Forms Package
|
|
2
|
+
|
|
3
|
+
A comprehensive React form preview component library with form controls, validation, conditional logic, and responsive design. This package provides a complete set of form components that can be used to build dynamic forms with real-time validation, conditional logic, threshold alerts, and component actions. Designed for integration with Angular/Ionic applications.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🎨 **Responsive Design**: Desktop, tablet, and mobile views
|
|
8
|
+
- ✅ **Form Validation**: Real-time validation with custom error messages
|
|
9
|
+
- 🔧 **Form Controls**: Complete set of form input components (text, number, email, textarea, select, checkbox, radio, segment, date/time, signature, file upload, location, heading, instructions, section, table, datagrid)
|
|
10
|
+
- 🎯 **Conditional Logic**: Show/hide fields based on other field values
|
|
11
|
+
- 📊 **Threshold Alerts**: Visual alerts when threshold conditions are met
|
|
12
|
+
- 📝 **Component Actions**: Add notes, attachments, send emails, and raise issues for form components
|
|
13
|
+
- 🌐 **Internationalization**: Built-in i18n support via react-i18next
|
|
14
|
+
- 📱 **Device Preview**: Preview forms in different device sizes
|
|
15
|
+
- 🎨 **Customizable Styling**: CSS variables for easy theming
|
|
16
|
+
- 📦 **TypeScript**: Full TypeScript support with comprehensive type definitions
|
|
17
|
+
- 🔄 **Drag and Drop**: Optional drag-and-drop support for form sections and grids (edit mode only)
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install df-ae-forms-package
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Peer Dependencies
|
|
26
|
+
|
|
27
|
+
This package requires the following peer dependencies to be installed in your project:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install react react-dom react-i18next lucide-react @dnd-kit/core @dnd-kit/sortable @dnd-kit/utilities
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Quick Start
|
|
34
|
+
|
|
35
|
+
### 1. Import CSS
|
|
36
|
+
|
|
37
|
+
First, import the package styles in your application:
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
import 'df-ae-forms-package/dist/index.css';
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### 2. Setup i18n (Required)
|
|
44
|
+
|
|
45
|
+
The package uses `react-i18next` for internationalization. You must set up i18n in your application:
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
import i18n from 'i18next';
|
|
49
|
+
import { initReactI18next } from 'react-i18next';
|
|
50
|
+
|
|
51
|
+
i18n
|
|
52
|
+
.use(initReactI18next)
|
|
53
|
+
.init({
|
|
54
|
+
resources: {
|
|
55
|
+
en: {
|
|
56
|
+
translation: {
|
|
57
|
+
'formBuilder.submit': 'Submit'
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
lng: 'en',
|
|
62
|
+
fallbackLng: 'en'
|
|
63
|
+
});
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 3. Use the Component
|
|
67
|
+
|
|
68
|
+
```tsx
|
|
69
|
+
import React from 'react';
|
|
70
|
+
import { DfFormPreview, FormComponentType } from 'df-ae-forms-package';
|
|
71
|
+
import 'df-ae-forms-package/dist/index.css';
|
|
72
|
+
|
|
73
|
+
const formComponents: FormComponentType[] = [
|
|
74
|
+
{
|
|
75
|
+
id: 'name',
|
|
76
|
+
name: 'text-input',
|
|
77
|
+
basic: {
|
|
78
|
+
label: 'Full Name',
|
|
79
|
+
placeholder: 'Enter your full name',
|
|
80
|
+
defaultValue: ''
|
|
81
|
+
},
|
|
82
|
+
validation: {
|
|
83
|
+
required: true,
|
|
84
|
+
minLength: 2,
|
|
85
|
+
maxLength: 50
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: 'email',
|
|
90
|
+
name: 'email-input',
|
|
91
|
+
basic: {
|
|
92
|
+
label: 'Email Address',
|
|
93
|
+
placeholder: 'Enter your email',
|
|
94
|
+
defaultValue: ''
|
|
95
|
+
},
|
|
96
|
+
validation: {
|
|
97
|
+
required: true
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
];
|
|
101
|
+
|
|
102
|
+
function MyForm() {
|
|
103
|
+
const handleSubmit = (formData: Record<string, any>) => {
|
|
104
|
+
console.log('Form submitted:', formData);
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const handleFormDataChange = (formData: Record<string, any>) => {
|
|
108
|
+
console.log('Form data changed:', formData);
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
return (
|
|
112
|
+
<DfFormPreview
|
|
113
|
+
formComponents={formComponents}
|
|
114
|
+
currentDevice="desktop"
|
|
115
|
+
mode="test"
|
|
116
|
+
onSubmit={handleSubmit}
|
|
117
|
+
onFormDataChange={handleFormDataChange}
|
|
118
|
+
/>
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Components
|
|
124
|
+
|
|
125
|
+
### DfFormPreview
|
|
126
|
+
|
|
127
|
+
The main form preview component that renders all form controls.
|
|
128
|
+
|
|
129
|
+
#### Props
|
|
130
|
+
|
|
131
|
+
| Prop | Type | Default | Description |
|
|
132
|
+
|------|------|---------|-------------|
|
|
133
|
+
| `formComponents` | `FormComponentType[]` | `[]` | Array of form components to render |
|
|
134
|
+
| `currentDevice` | `'desktop' \| 'tablet' \| 'mobile'` | `'desktop'` | Device type for responsive preview |
|
|
135
|
+
| `mode` | `'edit' \| 'preview' \| 'test'` | `'test'` | Form mode: edit (with drag-drop), preview (readonly), test (interactive) |
|
|
136
|
+
| `initialFormData` | `Record<string, any>` | `{}` | Initial form data with default values |
|
|
137
|
+
| `onSubmit` | `(formData: Record<string, any>) => void` | - | Callback when form is submitted |
|
|
138
|
+
| `onFormDataChange` | `(formData: Record<string, any>) => void` | - | Callback when form data changes |
|
|
139
|
+
| `onComponentUpdate` | `(change: IFormControlChange) => void` | - | Callback when a component value changes |
|
|
140
|
+
| `selectedComponent` | `string \| null` | `null` | Currently selected component ID (for edit mode) |
|
|
141
|
+
| `formTemplateId` | `string` | - | Form template ID (for component actions) |
|
|
142
|
+
| `onThresholdActionCompletion` | `(conditionId: string, action: string, completed: boolean) => void` | - | Callback when threshold action is completed |
|
|
143
|
+
| `onThresholdIssueRaised` | `(conditionId: string) => void` | - | Callback when threshold issue is raised |
|
|
144
|
+
| `onNotesChange` | `(componentId: string, notes: string) => void` | - | Callback when component notes change |
|
|
145
|
+
| `onAttachmentChange` | `(componentId: string, attachments: File[]) => void` | - | Callback when component attachments change |
|
|
146
|
+
|
|
147
|
+
### Form Controls
|
|
148
|
+
|
|
149
|
+
The package includes the following form control components:
|
|
150
|
+
|
|
151
|
+
- **DfFormInput**: Text, number, and email input fields
|
|
152
|
+
- **DfFormTextarea**: Multi-line text input
|
|
153
|
+
- **DfFormSelect**: Dropdown selection
|
|
154
|
+
- **DfFormCheckbox**: Checkbox inputs
|
|
155
|
+
- **DfFormRadio**: Radio button selection
|
|
156
|
+
- **DfFormSegment**: Segment/button group selection
|
|
157
|
+
- **DfFormDateTime**: Date and time inputs
|
|
158
|
+
- **DfFormSignature**: Signature pad component
|
|
159
|
+
- **DfFormFileUpload**: File upload component
|
|
160
|
+
- **DfFormLocation**: Location picker component
|
|
161
|
+
- **DfFormHeading**: Heading component for form sections
|
|
162
|
+
- **DfFormInstruction**: Instruction text component
|
|
163
|
+
- **DfFormSection**: Section container with collapsible children
|
|
164
|
+
- **DfFormDataGrid**: Data grid component for tabular data
|
|
165
|
+
- **DfFormTable**: Table component with nested form controls
|
|
166
|
+
- **DfFormComments**: Comments component
|
|
167
|
+
- **DfFormErrorMsg**: Error message display component
|
|
168
|
+
|
|
169
|
+
## Conditional Logic
|
|
170
|
+
|
|
171
|
+
You can show/hide fields based on other field values:
|
|
172
|
+
|
|
173
|
+
```tsx
|
|
174
|
+
{
|
|
175
|
+
id: 'has-phone',
|
|
176
|
+
name: 'checkbox',
|
|
177
|
+
basic: {
|
|
178
|
+
label: 'Do you have a phone number?',
|
|
179
|
+
defaultValue: false
|
|
180
|
+
},
|
|
181
|
+
options: [
|
|
182
|
+
{ label: 'Yes', value: 'yes' }
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
id: 'phone',
|
|
187
|
+
name: 'text-input',
|
|
188
|
+
basic: {
|
|
189
|
+
label: 'Phone Number',
|
|
190
|
+
placeholder: 'Enter phone number',
|
|
191
|
+
defaultValue: ''
|
|
192
|
+
},
|
|
193
|
+
conditional: {
|
|
194
|
+
action: 'show',
|
|
195
|
+
when: 'all',
|
|
196
|
+
conditions: [{
|
|
197
|
+
fieldId: 'has-phone',
|
|
198
|
+
operator: 'equals',
|
|
199
|
+
value: 'yes'
|
|
200
|
+
}]
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## Threshold Alerts
|
|
206
|
+
|
|
207
|
+
Components can have threshold conditions that trigger alerts:
|
|
208
|
+
|
|
209
|
+
```tsx
|
|
210
|
+
{
|
|
211
|
+
id: 'temperature',
|
|
212
|
+
name: 'number-input',
|
|
213
|
+
basic: {
|
|
214
|
+
label: 'Temperature',
|
|
215
|
+
defaultValue: 0
|
|
216
|
+
},
|
|
217
|
+
threshold: {
|
|
218
|
+
conditions: [{
|
|
219
|
+
id: 'high-temp',
|
|
220
|
+
operator: 'greaterThan',
|
|
221
|
+
value: 100,
|
|
222
|
+
alertMessage: 'Temperature is too high!',
|
|
223
|
+
actions: ['notes', 'attachments', 'email']
|
|
224
|
+
}]
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
## Component Actions
|
|
230
|
+
|
|
231
|
+
In `test` mode, components can have action features:
|
|
232
|
+
- **Notes**: Add notes to components
|
|
233
|
+
- **Attachments**: Attach files to components
|
|
234
|
+
- **Email**: Send email notifications
|
|
235
|
+
- **Raise Issue**: Raise an issue for the component
|
|
236
|
+
|
|
237
|
+
## Styling
|
|
238
|
+
|
|
239
|
+
The package uses CSS variables for theming. You can override these variables in your application:
|
|
240
|
+
|
|
241
|
+
```css
|
|
242
|
+
:root {
|
|
243
|
+
--df-color-primary: #3b82f6;
|
|
244
|
+
--df-color-primary-hover: #2563eb;
|
|
245
|
+
--df-color-primary-disabled: #9ca3af;
|
|
246
|
+
--df-color-error-primary: #ef4444;
|
|
247
|
+
--df-color-success-primary: #10b981;
|
|
248
|
+
--df-color-text-dark: #1f2937;
|
|
249
|
+
--df-color-text-light: #6b7280;
|
|
250
|
+
--df-color-fb-container: #ffffff;
|
|
251
|
+
--df-color-fb-border: #e5e7eb;
|
|
252
|
+
--df-color-fb-bg: #f9fafb;
|
|
253
|
+
}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Import the design system CSS to get all the base styles:
|
|
257
|
+
|
|
258
|
+
```tsx
|
|
259
|
+
import 'df-ae-forms-package/dist/index.css';
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
## TypeScript Support
|
|
263
|
+
|
|
264
|
+
The package is fully typed with TypeScript. All types are exported:
|
|
265
|
+
|
|
266
|
+
```tsx
|
|
267
|
+
import type {
|
|
268
|
+
FormComponentType,
|
|
269
|
+
IFormControlChange,
|
|
270
|
+
IFormValidationErrors,
|
|
271
|
+
DfFormPreviewProps,
|
|
272
|
+
// ... and many more
|
|
273
|
+
} from 'df-ae-forms-package';
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
## Development
|
|
277
|
+
|
|
278
|
+
### Prerequisites
|
|
279
|
+
|
|
280
|
+
- Node.js >= 14.0.0
|
|
281
|
+
- npm >= 6.0.0
|
|
282
|
+
|
|
283
|
+
### Setup
|
|
284
|
+
|
|
285
|
+
1. Clone the repository
|
|
286
|
+
2. Install dependencies:
|
|
287
|
+
```bash
|
|
288
|
+
cd df-ae-forms-package
|
|
289
|
+
npm install
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### Available Scripts
|
|
293
|
+
|
|
294
|
+
- `npm run build` - Build the package for production
|
|
295
|
+
- `npm run build:watch` - Build and watch for changes
|
|
296
|
+
- `npm run dev` - Development mode with watch
|
|
297
|
+
- `npm run clean` - Clean the dist directory
|
|
298
|
+
- `npm run lint` - Run ESLint
|
|
299
|
+
- `npm run type-check` - Run TypeScript type checking
|
|
300
|
+
|
|
301
|
+
### Building
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
npm run build
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
This will create the following files in the `dist` directory:
|
|
308
|
+
- `index.js` - CommonJS build
|
|
309
|
+
- `index.esm.js` - ES modules build
|
|
310
|
+
- `index.d.ts` - TypeScript declarations
|
|
311
|
+
- `index.css` - Compiled CSS
|
|
312
|
+
|
|
313
|
+
## Publishing
|
|
314
|
+
|
|
315
|
+
### Prerequisites for Publishing
|
|
316
|
+
|
|
317
|
+
1. **NPM Account**: Create an account at [npmjs.com](https://www.npmjs.com)
|
|
318
|
+
2. **Login to NPM**: Run `npm login` in your terminal
|
|
319
|
+
3. **Package Name**: Ensure the package name `df-ae-forms-package` is available
|
|
320
|
+
|
|
321
|
+
### Publishing Steps
|
|
322
|
+
|
|
323
|
+
#### 1. Prepare the Package
|
|
324
|
+
|
|
325
|
+
```bash
|
|
326
|
+
# Clean previous builds
|
|
327
|
+
npm run clean
|
|
328
|
+
|
|
329
|
+
# Build the package
|
|
330
|
+
npm run build
|
|
331
|
+
|
|
332
|
+
# Run type checking
|
|
333
|
+
npm run type-check
|
|
334
|
+
|
|
335
|
+
# Run linting
|
|
336
|
+
npm run lint
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
#### 2. Test the Package Locally
|
|
340
|
+
|
|
341
|
+
```bash
|
|
342
|
+
# Pack the package to test it
|
|
343
|
+
npm pack
|
|
344
|
+
|
|
345
|
+
# This creates a .tgz file that you can test locally
|
|
346
|
+
# Install it in a test project:
|
|
347
|
+
# npm install /path/to/df-ae-forms-package-1.0.0.tgz
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
#### 3. Publish to NPM
|
|
351
|
+
|
|
352
|
+
**For Patch Version (1.0.0 → 1.0.1):**
|
|
353
|
+
```bash
|
|
354
|
+
npm run publish:patch
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
**For Minor Version (1.0.0 → 1.1.0):**
|
|
358
|
+
```bash
|
|
359
|
+
npm run publish:minor
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
**For Major Version (1.0.0 → 2.0.0):**
|
|
363
|
+
```bash
|
|
364
|
+
npm run publish:major
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
**Manual Publishing:**
|
|
368
|
+
```bash
|
|
369
|
+
# Update version manually
|
|
370
|
+
npm version patch # or minor, major
|
|
371
|
+
|
|
372
|
+
# Publish
|
|
373
|
+
npm publish
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
#### 4. Verify Publication
|
|
377
|
+
|
|
378
|
+
1. Check your package on [npmjs.com](https://www.npmjs.com/package/df-ae-forms-package)
|
|
379
|
+
2. Test installation in a new project:
|
|
380
|
+
```bash
|
|
381
|
+
npm install df-ae-forms-package
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### Publishing Checklist
|
|
385
|
+
|
|
386
|
+
- [ ] All tests pass
|
|
387
|
+
- [ ] TypeScript compilation succeeds
|
|
388
|
+
- [ ] ESLint passes
|
|
389
|
+
- [ ] Package builds successfully
|
|
390
|
+
- [ ] README.md is up to date
|
|
391
|
+
- [ ] Version number is correct
|
|
392
|
+
- [ ] All dependencies are properly listed
|
|
393
|
+
- [ ] Package is tested locally with `npm pack`
|
|
394
|
+
|
|
395
|
+
## Integration with Angular/Ionic
|
|
396
|
+
|
|
397
|
+
This package is designed to work with Angular/Ionic applications. To use it:
|
|
398
|
+
|
|
399
|
+
1. Install the package and peer dependencies
|
|
400
|
+
2. Import the CSS file in your Angular application
|
|
401
|
+
3. Use React components via `@angular/react` or a similar bridge
|
|
402
|
+
4. Ensure i18n is properly configured
|
|
403
|
+
|
|
404
|
+
## Troubleshooting
|
|
405
|
+
|
|
406
|
+
### Styles Not Reflecting
|
|
407
|
+
|
|
408
|
+
- Make sure you're importing the CSS file: `import 'df-ae-forms-package/dist/index.css';`
|
|
409
|
+
- Check that CSS variables are properly defined in your application
|
|
410
|
+
- Verify that the build includes the CSS file in the dist directory
|
|
411
|
+
|
|
412
|
+
### Components Not Visible
|
|
413
|
+
|
|
414
|
+
- Check that `formComponents` array is not empty
|
|
415
|
+
- Verify that conditional logic is not hiding components
|
|
416
|
+
- Ensure that component IDs are unique
|
|
417
|
+
|
|
418
|
+
### i18n Issues
|
|
419
|
+
|
|
420
|
+
- Make sure `react-i18next` is properly configured
|
|
421
|
+
- Verify that translation keys exist in your i18n resources
|
|
422
|
+
- Check that the i18n provider wraps your application
|
|
423
|
+
|
|
424
|
+
## Contributing
|
|
425
|
+
|
|
426
|
+
1. Fork the repository
|
|
427
|
+
2. Create a feature branch
|
|
428
|
+
3. Make your changes
|
|
429
|
+
4. Add tests if applicable
|
|
430
|
+
5. Run the build and tests
|
|
431
|
+
6. Submit a pull request
|
|
432
|
+
|
|
433
|
+
## License
|
|
434
|
+
|
|
435
|
+
MIT License - see LICENSE file for details.
|
|
436
|
+
|
|
437
|
+
## Support
|
|
438
|
+
|
|
439
|
+
For issues and questions:
|
|
440
|
+
- Create an issue on GitHub
|
|
441
|
+
- Check the documentation
|
|
442
|
+
- Review the examples in the README
|
|
443
|
+
|
|
444
|
+
## Changelog
|
|
445
|
+
|
|
446
|
+
### 1.0.0
|
|
447
|
+
- Initial release
|
|
448
|
+
- Complete form preview component
|
|
449
|
+
- All form controls (input, textarea, select, checkbox, radio, segment, date, signature, file upload, location, heading, instructions, section, table, datagrid)
|
|
450
|
+
- Validation system
|
|
451
|
+
- Conditional logic
|
|
452
|
+
- Threshold alerts
|
|
453
|
+
- Component actions (notes, attachments, email, raise issue)
|
|
454
|
+
- Responsive design
|
|
455
|
+
- TypeScript support
|
|
456
|
+
- i18n support
|
|
457
|
+
- Drag and drop support (edit mode)
|
|
458
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormComponentType as TFormComponent } from '../df-form-controls/df-form-preview-interfaces';
|
|
3
|
+
import './ComponentActionFeatures.scss';
|
|
4
|
+
interface IComponentActionFeaturesProps {
|
|
5
|
+
component: TFormComponent;
|
|
6
|
+
mode: 'edit' | 'preview' | 'test';
|
|
7
|
+
formTemplateId?: string;
|
|
8
|
+
formValue?: any;
|
|
9
|
+
onNotesChange?: (notes: string) => void;
|
|
10
|
+
onAttachmentChange?: (files: File[] | null) => void;
|
|
11
|
+
notes?: string;
|
|
12
|
+
attachments?: File[] | null;
|
|
13
|
+
onThresholdActionCompletion?: (conditionId: string, action: 'notes' | 'attachments' | 'email', completed: boolean) => void;
|
|
14
|
+
onThresholdIssueRaised?: (conditionId: string) => void;
|
|
15
|
+
onBasicPropertyActionCompletion?: (action: 'notes' | 'attachments' | 'email' | 'issue', completed: boolean) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare const ComponentActionFeatures: React.FC<IComponentActionFeaturesProps>;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=ComponentActionFeatures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentActionFeatures.d.ts","sourceRoot":"","sources":["../src/ComponentActionFeatures.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAExE,OAAO,EAAE,iBAAiB,IAAI,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAErG,OAAO,gCAAgC,CAAC;AA0FxC,UAAU,6BAA6B;IACrC,SAAS,EAAE,cAAc,CAAC;IAC1B,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,GAAG,CAAC;IAChB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,KAAK,IAAI,CAAC;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAC5B,2BAA2B,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,aAAa,GAAG,OAAO,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3H,sBAAsB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,+BAA+B,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,GAAG,aAAa,GAAG,OAAO,GAAG,OAAO,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CACrH;AAED,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAwmB3E,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormComponentType } from './df-form-controls/df-form-preview-interfaces';
|
|
3
|
+
import './DfFormPreview.scss';
|
|
4
|
+
export type DeviceType = 'desktop' | 'tablet' | 'mobile';
|
|
5
|
+
export interface DfFormPreviewProps {
|
|
6
|
+
formComponents: FormComponentType[];
|
|
7
|
+
formData?: any;
|
|
8
|
+
currentDevice?: DeviceType;
|
|
9
|
+
isPreviewMode?: boolean;
|
|
10
|
+
initialFormData?: FormComponentType[];
|
|
11
|
+
onSubmit?: (formData: FormComponentType[]) => void;
|
|
12
|
+
onFormDataChange?: (formData: FormComponentType[]) => void;
|
|
13
|
+
formTitle?: string;
|
|
14
|
+
formDescription?: string;
|
|
15
|
+
formTemplateId?: string;
|
|
16
|
+
onComponentSelect?: (component: FormComponentType) => void;
|
|
17
|
+
onComponentDelete?: (component: FormComponentType, event: React.MouseEvent) => void;
|
|
18
|
+
onComponentEdit?: (component: FormComponentType) => void;
|
|
19
|
+
onComponentUpdate?: (componentId: string, updates: Partial<FormComponentType>) => void;
|
|
20
|
+
selectedComponent?: FormComponentType | null;
|
|
21
|
+
}
|
|
22
|
+
export declare const DfFormPreview: React.FC<DfFormPreviewProps>;
|
|
23
|
+
export default DfFormPreview;
|
|
24
|
+
//# sourceMappingURL=DfFormPreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DfFormPreview.d.ts","sourceRoot":"","sources":["../src/DfFormPreview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAE/D,OAAO,EACL,iBAAiB,EAGlB,MAAM,+CAA+C,CAAA;AAwBtD,OAAO,sBAAsB,CAAA;AAK7B,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAExD,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE,iBAAiB,EAAE,CAAA;IACnC,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,aAAa,CAAC,EAAE,UAAU,CAAA;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,eAAe,CAAC,EAAE,iBAAiB,EAAE,CAAA;IACrC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAA;IAClD,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAA;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,iBAAiB,KAAK,IAAI,CAAA;IAC1D,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAA;IACnF,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,iBAAiB,KAAK,IAAI,CAAA;IACxD,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAA;IACtF,iBAAiB,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;CAC7C;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA6lCtD,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './ThresholdAlert.scss';
|
|
3
|
+
interface IThresholdAlertProps {
|
|
4
|
+
component: any;
|
|
5
|
+
condition: any;
|
|
6
|
+
currentValue: string | number;
|
|
7
|
+
thresholdValue: string | number;
|
|
8
|
+
formTemplateId?: string;
|
|
9
|
+
onDismiss?: () => void;
|
|
10
|
+
onIssueRaised?: (conditionId: string) => void;
|
|
11
|
+
isIssueRaised?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const ThresholdAlert: React.FC<IThresholdAlertProps>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=ThresholdAlert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThresholdAlert.d.ts","sourceRoot":"","sources":["../src/ThresholdAlert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAiBhE,OAAO,uBAAuB,CAAC;AAE/B,UAAU,oBAAoB;IAC5B,SAAS,EAAE,GAAG,CAAC;IACf,SAAS,EAAE,GAAG,CAAC;IACf,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,cAAc,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,aAAa,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAkLzD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormComponentType as TFormComponent } from '../df-form-controls/df-form-preview-interfaces';
|
|
3
|
+
import './ComponentSubmissionActions.scss';
|
|
4
|
+
interface IComponentSubmissionActionsProps {
|
|
5
|
+
component: TFormComponent;
|
|
6
|
+
}
|
|
7
|
+
export declare const ComponentSubmissionActions: React.FC<IComponentSubmissionActionsProps>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=ComponentSubmissionActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentSubmissionActions.d.ts","sourceRoot":"","sources":["../../src/components/ComponentSubmissionActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iBAAiB,IAAI,cAAc,EAAE,MAAM,gDAAgD,CAAC;AACrG,OAAO,mCAAmC,CAAC;AAE3C,UAAU,gCAAgC;IACxC,SAAS,EAAE,cAAc,CAAC;CAC3B;AAsDD,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,gCAAgC,CAqCjF,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormComponentType } from '../df-form-controls/df-form-preview-interfaces';
|
|
3
|
+
interface IRaiseIssueModalProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onSuccess?: (createdIssue?: any) => void;
|
|
7
|
+
component?: FormComponentType;
|
|
8
|
+
formTemplateId?: string;
|
|
9
|
+
formInstanceId?: string;
|
|
10
|
+
notes?: string;
|
|
11
|
+
attachments?: File[] | null;
|
|
12
|
+
issue?: any | null;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* RaiseIssueModal - Stub implementation for package
|
|
16
|
+
*
|
|
17
|
+
* This is a stub component that can be replaced by the consuming application
|
|
18
|
+
* with their own implementation that integrates with their issue management system.
|
|
19
|
+
*
|
|
20
|
+
* For now, it simply calls onSuccess when the user "raises" an issue.
|
|
21
|
+
*/
|
|
22
|
+
export declare const RaiseIssueModal: React.FC<IRaiseIssueModalProps>;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=RaiseIssueModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RaiseIssueModal.d.ts","sourceRoot":"","sources":["../../src/components/RaiseIssueModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAEnF,UAAU,qBAAqB;IAC7B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,CAAC,YAAY,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IACzC,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAuG3D,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ICheckboxComponent, IFormControlChange, IFormValidationErrors } from '../df-form-preview-interfaces';
|
|
3
|
+
interface DfFormCheckboxProps {
|
|
4
|
+
id: string;
|
|
5
|
+
properties: ICheckboxComponent;
|
|
6
|
+
validationErrors?: IFormValidationErrors;
|
|
7
|
+
formValue?: string[];
|
|
8
|
+
readonly?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
touchedFields?: Record<string, boolean>;
|
|
11
|
+
formSubmitted?: boolean;
|
|
12
|
+
mode?: 'edit' | 'preview' | 'test';
|
|
13
|
+
onValueChange?: (change: IFormControlChange) => void;
|
|
14
|
+
onBlur?: () => void;
|
|
15
|
+
onFocus?: () => void;
|
|
16
|
+
className?: string;
|
|
17
|
+
hideLabel?: boolean;
|
|
18
|
+
showCommentsInPreview?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const DfFormCheckbox: React.FC<DfFormCheckboxProps>;
|
|
21
|
+
export default DfFormCheckbox;
|
|
22
|
+
//# sourceMappingURL=DfFormCheckbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DfFormCheckbox.d.ts","sourceRoot":"","sources":["../../../src/df-form-controls/df-form-checkbox/DfFormCheckbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAChE,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,+BAA+B,CAAC;AAGvC,UAAU,mBAAmB;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,kBAAkB,CAAC;IAC/B,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;IACnC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACrD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA8MxD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/df-form-controls/df-form-checkbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './df-form-comments.scss';
|
|
3
|
+
interface DfFormCommentsProps {
|
|
4
|
+
comment?: string;
|
|
5
|
+
onSave?: (comment: string) => void;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const DfFormComments: React.FC<DfFormCommentsProps>;
|
|
11
|
+
export default DfFormComments;
|
|
12
|
+
//# sourceMappingURL=DfFormComments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DfFormComments.d.ts","sourceRoot":"","sources":["../../../src/df-form-controls/df-form-comments/DfFormComments.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAChE,OAAO,yBAAyB,CAAC;AAEjC,UAAU,mBAAmB;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAqFxD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/df-form-controls/df-form-comments/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IDateComponent, IFormControlChange, IFormValidationErrors } from '../df-form-preview-interfaces';
|
|
3
|
+
interface DfFormDateTimeProps {
|
|
4
|
+
id: string;
|
|
5
|
+
properties: IDateComponent;
|
|
6
|
+
validationErrors?: IFormValidationErrors;
|
|
7
|
+
formValue?: string;
|
|
8
|
+
readonly?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
touchedFields?: Record<string, boolean>;
|
|
11
|
+
formSubmitted?: boolean;
|
|
12
|
+
mode?: 'edit' | 'preview' | 'test';
|
|
13
|
+
onValueChange?: (change: IFormControlChange) => void;
|
|
14
|
+
onBlur?: () => void;
|
|
15
|
+
onFocus?: () => void;
|
|
16
|
+
className?: string;
|
|
17
|
+
hideLabel?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const DfFormDateTime: React.FC<DfFormDateTimeProps>;
|
|
20
|
+
export default DfFormDateTime;
|
|
21
|
+
//# sourceMappingURL=DfFormDateTime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DfFormDateTime.d.ts","sourceRoot":"","sources":["../../../src/df-form-controls/df-form-date-time/DfFormDateTime.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAChE,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,+BAA+B,CAAC;AAGvC,UAAU,mBAAmB;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,cAAc,CAAC;IAC3B,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;IACnC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACrD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA+PxD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/df-form-controls/df-form-date-time/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC"}
|