extended-dynamic-forms 0.3.6 → 0.3.7

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.
@@ -11,8 +11,12 @@ export interface EnhancedWidgetProps extends WidgetProps {
11
11
  export interface AntInputOptions {
12
12
  size?: 'large' | 'middle' | 'small';
13
13
  placeholder?: string;
14
+ autoFocus?: boolean;
15
+ autoComplete?: string;
14
16
  prefix?: React.ReactNode;
15
17
  suffix?: React.ReactNode;
18
+ prefixIconName?: string;
19
+ suffixIconName?: string;
16
20
  allowClear?: boolean;
17
21
  bordered?: boolean;
18
22
  variant?: 'outlined' | 'borderless' | 'filled';
@@ -30,6 +34,8 @@ export interface AntInputOptions {
30
34
  className?: string;
31
35
  addonBefore?: React.ReactNode;
32
36
  addonAfter?: React.ReactNode;
37
+ addonBeforeIconName?: string;
38
+ addonAfterIconName?: string;
33
39
  emptyValue?: any;
34
40
  }
35
41
  /**
@@ -57,6 +63,10 @@ export interface AntDatePickerOptions {
57
63
  picker?: 'date' | 'week' | 'month' | 'quarter' | 'year';
58
64
  placeholder?: string | [string, string];
59
65
  placement?: 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight';
66
+ range?: boolean;
67
+ disablePastDates?: boolean;
68
+ disableFutureDates?: boolean;
69
+ disableWeekends?: boolean;
60
70
  showTime?: boolean | object;
61
71
  showNow?: boolean;
62
72
  showToday?: boolean;
@@ -65,10 +75,12 @@ export interface AntDatePickerOptions {
65
75
  bordered?: boolean;
66
76
  variant?: 'outlined' | 'borderless' | 'filled';
67
77
  suffixIcon?: React.ReactNode;
78
+ suffixIconName?: string;
68
79
  style?: React.CSSProperties;
69
80
  className?: string;
70
81
  status?: 'error' | 'warning';
71
82
  emptyValue?: any;
83
+ [key: string]: any;
72
84
  }
73
85
  /**
74
86
  * Ant Design InputNumber component options
@@ -77,6 +89,9 @@ export interface AntInputNumberOptions {
77
89
  size?: 'large' | 'middle' | 'small';
78
90
  placeholder?: string;
79
91
  prefix?: React.ReactNode;
92
+ prefixIconName?: string;
93
+ addonBeforeIconName?: string;
94
+ addonAfterIconName?: string;
80
95
  min?: number;
81
96
  max?: number;
82
97
  step?: number;
@@ -101,6 +116,148 @@ export interface AntInputNumberOptions {
101
116
  addonAfter?: React.ReactNode;
102
117
  emptyValue?: any;
103
118
  }
119
+ /**
120
+ * Ant Design Slider component options
121
+ */
122
+ export interface AntSliderOptions {
123
+ min?: number;
124
+ max?: number;
125
+ step?: number | null;
126
+ range?: boolean | {
127
+ draggableTrack?: boolean;
128
+ };
129
+ dots?: boolean;
130
+ marks?: Record<number, React.ReactNode> | boolean;
131
+ included?: boolean;
132
+ vertical?: boolean;
133
+ reverse?: boolean;
134
+ tooltip?: any;
135
+ trackStyle?: React.CSSProperties | React.CSSProperties[];
136
+ handleStyle?: React.CSSProperties | React.CSSProperties[];
137
+ railStyle?: React.CSSProperties;
138
+ style?: React.CSSProperties;
139
+ className?: string;
140
+ keyboard?: boolean;
141
+ disabled?: boolean;
142
+ }
143
+ /**
144
+ * Ant Design Rate component options
145
+ */
146
+ export interface AntRateOptions {
147
+ allowHalf?: boolean;
148
+ allowClear?: boolean;
149
+ autoFocus?: boolean;
150
+ character?: React.ReactNode | ((props: {
151
+ index: number;
152
+ }) => React.ReactNode);
153
+ count?: number;
154
+ tooltips?: string[];
155
+ iconName?: string;
156
+ style?: React.CSSProperties;
157
+ className?: string;
158
+ }
159
+ /**
160
+ * Ant Design TimePicker component options
161
+ */
162
+ export interface AntTimePickerOptions {
163
+ format?: string;
164
+ use12Hours?: boolean;
165
+ hourStep?: number;
166
+ minuteStep?: number;
167
+ secondStep?: number;
168
+ showNow?: boolean;
169
+ placement?: 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight';
170
+ size?: 'large' | 'middle' | 'small';
171
+ bordered?: boolean;
172
+ variant?: 'outlined' | 'borderless' | 'filled';
173
+ status?: 'error' | 'warning';
174
+ suffixIconName?: string;
175
+ style?: React.CSSProperties;
176
+ className?: string;
177
+ [key: string]: any;
178
+ }
179
+ /**
180
+ * Ant Design ColorPicker component options
181
+ */
182
+ export interface AntColorPickerOptions {
183
+ format?: 'hex' | 'hsb' | 'rgb';
184
+ onFormatChange?: (format: string) => void;
185
+ disabledAlpha?: boolean;
186
+ presets?: any[];
187
+ showText?: boolean | ((color: any) => React.ReactNode);
188
+ placement?: 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight';
189
+ size?: 'large' | 'middle' | 'small';
190
+ allowClear?: boolean;
191
+ style?: React.CSSProperties;
192
+ className?: string;
193
+ [key: string]: any;
194
+ }
195
+ /**
196
+ * Ant Design Switch component options
197
+ */
198
+ export interface AntSwitchOptions {
199
+ checkedChildren?: React.ReactNode;
200
+ unCheckedChildren?: React.ReactNode;
201
+ checkedIconName?: string;
202
+ unCheckedIconName?: string;
203
+ size?: 'small' | 'default';
204
+ loading?: boolean;
205
+ autoFocus?: boolean;
206
+ style?: React.CSSProperties;
207
+ className?: string;
208
+ [key: string]: any;
209
+ }
210
+ /**
211
+ * Ant Design Image component options
212
+ */
213
+ export interface AntImageOptions {
214
+ src?: string;
215
+ alt?: string;
216
+ width?: number | string;
217
+ height?: number | string;
218
+ fallback?: string;
219
+ preview?: boolean | {
220
+ visible?: boolean;
221
+ onVisibleChange?: (visible: boolean) => void;
222
+ };
223
+ placeholder?: React.ReactNode;
224
+ crossOrigin?: '' | 'anonymous' | 'use-credentials';
225
+ decoding?: 'async' | 'auto' | 'sync';
226
+ loading?: 'eager' | 'lazy';
227
+ referrerPolicy?: string;
228
+ sizes?: string;
229
+ srcSet?: string;
230
+ draggable?: boolean;
231
+ previewMask?: React.ReactNode;
232
+ rootClassName?: string;
233
+ wrapperClassName?: string;
234
+ wrapperStyle?: React.CSSProperties;
235
+ onClick?: (e: any) => void;
236
+ onLoad?: () => void;
237
+ onError?: (e: any) => void;
238
+ style?: React.CSSProperties;
239
+ className?: string;
240
+ [key: string]: any;
241
+ }
242
+ /**
243
+ * Ant Design Alert component options
244
+ */
245
+ export interface AntAlertOptions {
246
+ message?: React.ReactNode;
247
+ description?: React.ReactNode;
248
+ type?: 'success' | 'info' | 'warning' | 'error';
249
+ showIcon?: boolean;
250
+ iconName?: string;
251
+ banner?: boolean;
252
+ closable?: boolean;
253
+ closeText?: React.ReactNode;
254
+ action?: React.ReactNode;
255
+ icon?: React.ReactNode;
256
+ style?: React.CSSProperties;
257
+ className?: string;
258
+ afterClose?: () => void;
259
+ [key: string]: any;
260
+ }
104
261
  /**
105
262
  * Type mapping for widget options
106
263
  */
@@ -114,6 +271,13 @@ export type WidgetOptionsMap = {
114
271
  number: AntInputNumberOptions;
115
272
  date: AntDatePickerOptions;
116
273
  'datetime-local': AntDatePickerOptions;
274
+ time?: AntTimePickerOptions;
275
+ range?: AntSliderOptions;
276
+ rating?: AntRateOptions;
277
+ color?: AntColorPickerOptions;
278
+ switch?: AntSwitchOptions;
279
+ image?: AntImageOptions;
280
+ alert?: AntAlertOptions;
117
281
  file: any;
118
282
  };
119
283
  /**
@@ -1,7 +1,14 @@
1
1
  import { InputProps, TextAreaProps } from 'antd/es/input';
2
2
  import { DatePickerProps } from 'antd/es/date-picker';
3
3
  import { InputNumberProps } from 'antd/es/input-number';
4
- import { AntInputOptions, AntTextAreaOptions, AntDatePickerOptions, AntInputNumberOptions } from './types';
4
+ import { AntInputOptions, AntTextAreaOptions, AntDatePickerOptions, AntInputNumberOptions, AntSliderOptions, AntRateOptions, AntTimePickerOptions, AntColorPickerOptions, AntSwitchOptions, AntImageOptions, AntAlertOptions } from './types';
5
+ import { SliderSingleProps } from 'antd/es/slider';
6
+ import { RateProps } from 'antd/es/rate';
7
+ import { TimePickerProps } from 'antd/es/time-picker';
8
+ import { ColorPickerProps } from 'antd/es/color-picker';
9
+ import { SwitchProps } from 'antd/es/switch';
10
+ import { ImageProps } from 'antd/es/image';
11
+ import { AlertProps } from 'antd/es/alert';
5
12
 
6
13
  /**
7
14
  * Extract Ant Design Input props from uiSchema options
@@ -19,6 +26,34 @@ export declare const getAntDatePickerProps: (options?: AntDatePickerOptions) =>
19
26
  * Extract Ant Design InputNumber props from uiSchema options
20
27
  */
21
28
  export declare const getAntInputNumberProps: (options?: AntInputNumberOptions) => Partial<InputNumberProps>;
29
+ /**
30
+ * Extract Ant Design Slider props from uiSchema options
31
+ */
32
+ export declare const getAntSliderProps: (options?: AntSliderOptions) => Partial<SliderSingleProps>;
33
+ /**
34
+ * Extract Ant Design Rate props from uiSchema options
35
+ */
36
+ export declare const getAntRateProps: (options?: AntRateOptions) => Partial<RateProps>;
37
+ /**
38
+ * Extract Ant Design TimePicker props from uiSchema options
39
+ */
40
+ export declare const getAntTimePickerProps: (options?: AntTimePickerOptions) => Partial<TimePickerProps>;
41
+ /**
42
+ * Extract Ant Design ColorPicker props from uiSchema options
43
+ */
44
+ export declare const getAntColorPickerProps: (options?: AntColorPickerOptions) => Partial<ColorPickerProps>;
45
+ /**
46
+ * Extract Ant Design Switch props from uiSchema options
47
+ */
48
+ export declare const getAntSwitchProps: (options?: AntSwitchOptions) => Partial<SwitchProps>;
49
+ /**
50
+ * Extract Ant Design Image props from uiSchema options
51
+ */
52
+ export declare const getAntImageProps: (options?: AntImageOptions) => Partial<ImageProps>;
53
+ /**
54
+ * Extract Ant Design Alert props from uiSchema options
55
+ */
56
+ export declare const getAntAlertProps: (options?: AntAlertOptions) => Partial<AlertProps>;
22
57
  /**
23
58
  * Check if the widget has validation errors
24
59
  */
@@ -1,4 +1,6 @@
1
1
  import { WidgetProps } from '@rjsf/utils';
2
+ import { SelectProps, RadioGroupProps, RadioProps } from 'antd';
3
+ import { CheckboxGroupProps, CheckboxProps } from 'antd/es/checkbox';
2
4
 
3
5
  /**
4
6
  * Presentation modes for the Choice Widget
@@ -340,6 +342,24 @@ export interface ChoiceWidgetConfig {
340
342
  validation?: ValidationConfig;
341
343
  /** Accessibility configuration */
342
344
  accessibility?: AccessibilityConfig;
345
+ /**
346
+ * Layout preferences for radio/checkbox presentations
347
+ */
348
+ layout?: {
349
+ /** Direction to lay out options */
350
+ direction?: 'horizontal' | 'vertical';
351
+ };
352
+ /**
353
+ * Raw Ant Design props to pass to sub-widgets (Select, Radio, Checkbox).
354
+ * EDF-managed handlers/values take precedence; conflicting keys are ignored.
355
+ */
356
+ antd?: {
357
+ select?: Partial<SelectProps>;
358
+ radioGroup?: Partial<RadioGroupProps>;
359
+ radio?: Partial<RadioProps>;
360
+ checkboxGroup?: Partial<CheckboxGroupProps>;
361
+ checkbox?: Partial<CheckboxProps>;
362
+ };
343
363
  /** Custom CSS class names */
344
364
  className?: string;
345
365
  /** Custom inline styles */
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { WidgetProps } from '@rjsf/utils';
3
+
4
+ /**
5
+ * Time Widget using Ant Design TimePicker with full prop pass-through
6
+ */
7
+ declare const TimeWidget: FC<WidgetProps>;
8
+ export default TimeWidget;
9
+ export { TimeWidget };
@@ -0,0 +1,3 @@
1
+ import { default as dayjs } from 'dayjs';
2
+
3
+ export default dayjs;
@@ -10,4 +10,5 @@
10
10
  export { DateWidget } from './DateWidget';
11
11
  export { EnhancedDateWidget } from './EnhancedDateWidget';
12
12
  export { DateTimeWidget } from './DateTimeWidget';
13
+ export { TimeWidget } from './TimeWidget';
13
14
  export { DateWidget as default } from './DateWidget';
@@ -37,10 +37,18 @@ export declare const customWidgets: {
37
37
  EmailWidget: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
38
38
  url: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
39
39
  URLWidget: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
40
+ switch: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
41
+ SwitchWidget: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
42
+ image: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
43
+ ImageWidget: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
44
+ alert: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
45
+ AlertWidget: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
40
46
  date: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
41
47
  DateWidget: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
42
48
  'datetime-local': import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
43
49
  DateTimeWidget: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
50
+ time: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
51
+ TimeWidget: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
44
52
  file: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
45
53
  FileWidget: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
46
54
  fileUpload: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { WidgetProps } from '@rjsf/utils';
3
+
4
+ /**
5
+ * Display-only widget using Ant Design Alert
6
+ * Message/description can come from ui:options or fall back to schema title/description, or value.
7
+ */
8
+ declare const AlertWidget: FC<WidgetProps>;
9
+ export default AlertWidget;
10
+ export { AlertWidget };
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { WidgetProps } from '@rjsf/utils';
3
+
4
+ /**
5
+ * Display-only widget using Ant Design Image
6
+ * Uses the field value as the `src` by default; ui:options.src can override.
7
+ */
8
+ declare const ImageWidget: FC<WidgetProps>;
9
+ export default ImageWidget;
10
+ export { ImageWidget };
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { WidgetProps } from '@rjsf/utils';
3
+
4
+ /**
5
+ * Boolean input widget using Ant Design Switch with full prop pass-through
6
+ */
7
+ declare const SwitchWidget: FC<WidgetProps>;
8
+ export default SwitchWidget;
9
+ export { SwitchWidget };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "extended-dynamic-forms",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "Extended React JSON Schema Form (RJSF) v6 with custom components, widgets, templates, layouts, and form events",
5
5
  "main": "dist/index.umd.js",
6
6
  "module": "dist/index.es.js",
@@ -66,7 +66,8 @@
66
66
  "peerDependencies": {
67
67
  "antd": "^5.24.0",
68
68
  "react": "^18.0.0 || ^19.0.0",
69
- "react-dom": "^18.0.0 || ^19.0.0"
69
+ "react-dom": "^18.0.0 || ^19.0.0",
70
+ "dayjs": "^1.11.13"
70
71
  },
71
72
  "devDependencies": {
72
73
  "@rjsf/antd": "6.0.0-beta.17",
@@ -105,7 +106,7 @@
105
106
  "dependencies": {
106
107
  "@types/json-logic-js": "^2.0.8",
107
108
  "date-fns": "^4.1.0",
108
- "dayjs": "^1.11.13",
109
+ "lucide-react": "^0.452.0",
109
110
  "json-logic-js": "^2.0.5",
110
111
  "json-rules-engine-simplified": "^0.2.0"
111
112
  },