hazo_collab_forms 1.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/README.md +114 -0
- package/dist/components/collab_form_file_upload.d.ts +65 -0
- package/dist/components/collab_form_file_upload.d.ts.map +1 -0
- package/dist/components/collab_form_file_upload.js +339 -0
- package/dist/components/collab_form_file_upload.js.map +1 -0
- package/dist/components/data_ok_checkbox.d.ts +36 -0
- package/dist/components/data_ok_checkbox.d.ts.map +1 -0
- package/dist/components/data_ok_checkbox.js +26 -0
- package/dist/components/data_ok_checkbox.js.map +1 -0
- package/dist/components/hazo_collab_form_base.d.ts +398 -0
- package/dist/components/hazo_collab_form_base.d.ts.map +1 -0
- package/dist/components/hazo_collab_form_base.js +206 -0
- package/dist/components/hazo_collab_form_base.js.map +1 -0
- package/dist/components/hazo_collab_form_checkbox.d.ts +52 -0
- package/dist/components/hazo_collab_form_checkbox.d.ts.map +1 -0
- package/dist/components/hazo_collab_form_checkbox.js +65 -0
- package/dist/components/hazo_collab_form_checkbox.js.map +1 -0
- package/dist/components/hazo_collab_form_combo.d.ts +91 -0
- package/dist/components/hazo_collab_form_combo.d.ts.map +1 -0
- package/dist/components/hazo_collab_form_combo.js +192 -0
- package/dist/components/hazo_collab_form_combo.js.map +1 -0
- package/dist/components/hazo_collab_form_date.d.ts +71 -0
- package/dist/components/hazo_collab_form_date.d.ts.map +1 -0
- package/dist/components/hazo_collab_form_date.js +251 -0
- package/dist/components/hazo_collab_form_date.js.map +1 -0
- package/dist/components/hazo_collab_form_group.d.ts +40 -0
- package/dist/components/hazo_collab_form_group.d.ts.map +1 -0
- package/dist/components/hazo_collab_form_group.js +151 -0
- package/dist/components/hazo_collab_form_group.js.map +1 -0
- package/dist/components/hazo_collab_form_inputbox.d.ts +44 -0
- package/dist/components/hazo_collab_form_inputbox.d.ts.map +1 -0
- package/dist/components/hazo_collab_form_inputbox.js +64 -0
- package/dist/components/hazo_collab_form_inputbox.js.map +1 -0
- package/dist/components/hazo_collab_form_radio.d.ts +73 -0
- package/dist/components/hazo_collab_form_radio.d.ts.map +1 -0
- package/dist/components/hazo_collab_form_radio.js +65 -0
- package/dist/components/hazo_collab_form_radio.js.map +1 -0
- package/dist/components/hazo_collab_form_set.d.ts +181 -0
- package/dist/components/hazo_collab_form_set.d.ts.map +1 -0
- package/dist/components/hazo_collab_form_set.js +425 -0
- package/dist/components/hazo_collab_form_set.js.map +1 -0
- package/dist/components/hazo_collab_form_textarea.d.ts +43 -0
- package/dist/components/hazo_collab_form_textarea.d.ts.map +1 -0
- package/dist/components/hazo_collab_form_textarea.js +61 -0
- package/dist/components/hazo_collab_form_textarea.js.map +1 -0
- package/dist/components/index.d.ts +23 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +14 -0
- package/dist/components/index.js.map +1 -0
- package/dist/index.client.d.ts +7 -0
- package/dist/index.client.d.ts.map +1 -0
- package/dist/index.client.js +7 -0
- package/dist/index.client.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/config.d.ts +15 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +62 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/index.d.ts +5 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +5 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/utils/cn.d.ts +12 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/cn.js +15 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +7 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/use_chat_messages_check.d.ts +40 -0
- package/dist/utils/use_chat_messages_check.d.ts.map +1 -0
- package/dist/utils/use_chat_messages_check.js +80 -0
- package/dist/utils/use_chat_messages_check.js.map +1 -0
- package/dist/utils/use_collab_chat.d.ts +21 -0
- package/dist/utils/use_collab_chat.d.ts.map +1 -0
- package/dist/utils/use_collab_chat.js +49 -0
- package/dist/utils/use_collab_chat.js.map +1 -0
- package/package.json +78 -0
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared base functionality for collaboration form components
|
|
3
|
+
* Provides common utilities and rendering logic for input and textarea fields
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
/**
|
|
7
|
+
* Common props shared by all collaboration form field components
|
|
8
|
+
*/
|
|
9
|
+
export interface CollabFormFieldBaseProps {
|
|
10
|
+
/**
|
|
11
|
+
* Label text for the field
|
|
12
|
+
*/
|
|
13
|
+
label: string;
|
|
14
|
+
/**
|
|
15
|
+
* Error message to display below the field
|
|
16
|
+
*/
|
|
17
|
+
error?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Field identifier for chat context
|
|
20
|
+
*/
|
|
21
|
+
field_id?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Field data ID - separate identifier for data storage/retrieval
|
|
24
|
+
*/
|
|
25
|
+
field_data_id?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Field name for chat context
|
|
28
|
+
*/
|
|
29
|
+
field_name?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Callback when chat icon is clicked
|
|
32
|
+
* Called with field_data_id and field_name
|
|
33
|
+
*/
|
|
34
|
+
on_chat_click?: (field_data_id: string, field_name?: string) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Whether this field has chat messages
|
|
37
|
+
* When true, adds a red border to indicate active chat
|
|
38
|
+
*/
|
|
39
|
+
has_chat_messages?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Whether this field's chat is currently active/open
|
|
42
|
+
* When true, adds a grey background to the field container
|
|
43
|
+
*/
|
|
44
|
+
is_chat_active?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Background color class to apply when chat is active
|
|
47
|
+
* Default: "bg-muted"
|
|
48
|
+
*/
|
|
49
|
+
chat_background_color?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Whether this field has the default value for the data_ok checkbox
|
|
52
|
+
* When true, adds a visual indicator (e.g., border) to show the field is in its default state
|
|
53
|
+
*/
|
|
54
|
+
is_data_ok_default?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Data OK checkbox state
|
|
57
|
+
* If provided, controls the data OK checkbox state externally
|
|
58
|
+
*/
|
|
59
|
+
data_ok_checked?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Callback when data OK checkbox state changes
|
|
62
|
+
*/
|
|
63
|
+
on_data_ok_change?: (checked: boolean) => void;
|
|
64
|
+
/**
|
|
65
|
+
* Custom className for the container
|
|
66
|
+
*/
|
|
67
|
+
container_class_name?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Custom className for the label
|
|
70
|
+
*/
|
|
71
|
+
label_class_name?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Custom className for the field wrapper
|
|
74
|
+
*/
|
|
75
|
+
field_wrapper_class_name?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Custom className for the error message
|
|
78
|
+
*/
|
|
79
|
+
error_class_name?: string;
|
|
80
|
+
/**
|
|
81
|
+
* HTML id attribute
|
|
82
|
+
*/
|
|
83
|
+
id?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Recipient user ID for chat functionality
|
|
86
|
+
* Required for chat features to work properly
|
|
87
|
+
* @deprecated Use hazo_chat_receiver_user_id instead
|
|
88
|
+
*/
|
|
89
|
+
recipient_user_id?: string;
|
|
90
|
+
/**
|
|
91
|
+
* HazoChat receiver user ID
|
|
92
|
+
* Required for chat to work, maps to HazoChat receiver_user_id
|
|
93
|
+
* If recipient_user_id is provided, it will be used as fallback
|
|
94
|
+
*/
|
|
95
|
+
hazo_chat_receiver_user_id?: string;
|
|
96
|
+
/**
|
|
97
|
+
* HazoChat reference ID
|
|
98
|
+
* Maps to HazoChat reference_id, defaults to field_data_id
|
|
99
|
+
*/
|
|
100
|
+
hazo_chat_reference_id?: string;
|
|
101
|
+
/**
|
|
102
|
+
* HazoChat reference type
|
|
103
|
+
* Maps to HazoChat reference_type, default: 'field'
|
|
104
|
+
*/
|
|
105
|
+
hazo_chat_reference_type?: string;
|
|
106
|
+
/**
|
|
107
|
+
* HazoChat API base URL
|
|
108
|
+
* Maps to HazoChat api_base_url
|
|
109
|
+
*/
|
|
110
|
+
hazo_chat_api_base_url?: string;
|
|
111
|
+
/**
|
|
112
|
+
* HazoChat timezone
|
|
113
|
+
* Maps to HazoChat timezone
|
|
114
|
+
*/
|
|
115
|
+
hazo_chat_timezone?: string;
|
|
116
|
+
/**
|
|
117
|
+
* HazoChat title
|
|
118
|
+
* Maps to HazoChat title, defaults to field_name or label
|
|
119
|
+
*/
|
|
120
|
+
hazo_chat_title?: string;
|
|
121
|
+
/**
|
|
122
|
+
* HazoChat subtitle
|
|
123
|
+
* Maps to HazoChat subtitle
|
|
124
|
+
*/
|
|
125
|
+
hazo_chat_subtitle?: string;
|
|
126
|
+
/**
|
|
127
|
+
* HazoChat realtime mode
|
|
128
|
+
* Maps to HazoChat realtime_mode: 'polling' (automatic) or 'manual' (refresh only)
|
|
129
|
+
*/
|
|
130
|
+
hazo_chat_realtime_mode?: 'polling' | 'manual';
|
|
131
|
+
/**
|
|
132
|
+
* HazoChat polling interval
|
|
133
|
+
* Maps to HazoChat polling_interval (milliseconds, only used when realtime_mode = 'polling')
|
|
134
|
+
*/
|
|
135
|
+
hazo_chat_polling_interval?: number;
|
|
136
|
+
/**
|
|
137
|
+
* HazoChat messages per page
|
|
138
|
+
* Maps to HazoChat messages_per_page
|
|
139
|
+
*/
|
|
140
|
+
hazo_chat_messages_per_page?: number;
|
|
141
|
+
/**
|
|
142
|
+
* HazoChat className
|
|
143
|
+
* Maps to HazoChat className
|
|
144
|
+
*/
|
|
145
|
+
hazo_chat_class_name?: string;
|
|
146
|
+
/**
|
|
147
|
+
* HazoChat on close callback
|
|
148
|
+
* Maps to HazoChat on_close
|
|
149
|
+
*/
|
|
150
|
+
hazo_chat_on_close?: () => void;
|
|
151
|
+
/**
|
|
152
|
+
* Whether HazoChat is open
|
|
153
|
+
* Controls chat visibility externally
|
|
154
|
+
*/
|
|
155
|
+
hazo_chat_is_open?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* HazoChat on open change callback
|
|
158
|
+
* Called when chat open state changes
|
|
159
|
+
*/
|
|
160
|
+
hazo_chat_on_open_change?: (is_open: boolean) => void;
|
|
161
|
+
/**
|
|
162
|
+
* HazoChat show sidebar toggle
|
|
163
|
+
* Maps to HazoChat show_sidebar_toggle: Show/hide the hamburger menu button
|
|
164
|
+
* Default: false
|
|
165
|
+
*/
|
|
166
|
+
hazo_chat_show_sidebar_toggle?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* HazoChat show delete button
|
|
169
|
+
* Maps to HazoChat show_delete_button: Show/hide delete button on chat bubbles
|
|
170
|
+
* Default: true
|
|
171
|
+
*/
|
|
172
|
+
hazo_chat_show_delete_button?: boolean;
|
|
173
|
+
/**
|
|
174
|
+
* HazoChat bubble radius
|
|
175
|
+
* Maps to HazoChat bubble_radius: Bubble border radius style
|
|
176
|
+
* 'default' (rounded with tail) or 'full' (fully round)
|
|
177
|
+
* Default: 'default'
|
|
178
|
+
*/
|
|
179
|
+
hazo_chat_bubble_radius?: 'default' | 'full';
|
|
180
|
+
/**
|
|
181
|
+
* Whether to disable the data OK checkbox
|
|
182
|
+
* When true, the data OK checkbox will not be rendered
|
|
183
|
+
* Useful when data OK is handled at a group level
|
|
184
|
+
*/
|
|
185
|
+
disable_data_ok?: boolean;
|
|
186
|
+
/**
|
|
187
|
+
* Whether to disable the chat icon
|
|
188
|
+
* When true, the chat icon will not be rendered
|
|
189
|
+
* Useful when chat is handled at a group level
|
|
190
|
+
*/
|
|
191
|
+
disable_chat?: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* Whether the data OK checkbox is editable (clickable)
|
|
194
|
+
* When false, the checkbox is disabled.
|
|
195
|
+
* Default: false
|
|
196
|
+
*/
|
|
197
|
+
data_ok_editable?: boolean;
|
|
198
|
+
/**
|
|
199
|
+
* Custom className for field width
|
|
200
|
+
* Used to control the width of the field container
|
|
201
|
+
*/
|
|
202
|
+
field_width_class_name?: string;
|
|
203
|
+
/**
|
|
204
|
+
* Whether the field is required
|
|
205
|
+
* When true, displays required indicator on label
|
|
206
|
+
*/
|
|
207
|
+
required?: boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Multi-state radio configuration
|
|
210
|
+
* If provided, displays a MultiStateRadio component next to the chat icon
|
|
211
|
+
*/
|
|
212
|
+
multi_state_radio?: {
|
|
213
|
+
/**
|
|
214
|
+
* Array of 3 icon options for the multi-state radio
|
|
215
|
+
* Each item should have label, value, and icon names
|
|
216
|
+
*/
|
|
217
|
+
data: Array<{
|
|
218
|
+
label: string;
|
|
219
|
+
value: string;
|
|
220
|
+
icon_selected?: string;
|
|
221
|
+
icon_unselected?: string;
|
|
222
|
+
}>;
|
|
223
|
+
/**
|
|
224
|
+
* Current selected value
|
|
225
|
+
*/
|
|
226
|
+
value: string;
|
|
227
|
+
/**
|
|
228
|
+
* Callback when selection changes
|
|
229
|
+
*/
|
|
230
|
+
onChange: (value: string) => void;
|
|
231
|
+
/**
|
|
232
|
+
* Icon set to use (e.g., 'fa', 'md', 'io5')
|
|
233
|
+
* Default: 'io5'
|
|
234
|
+
*/
|
|
235
|
+
icon_set?: string;
|
|
236
|
+
/**
|
|
237
|
+
* Selection mode: 'single' or 'multi'
|
|
238
|
+
* Default: 'single'
|
|
239
|
+
*/
|
|
240
|
+
selection?: 'single' | 'multi';
|
|
241
|
+
/**
|
|
242
|
+
* Background color for the buttons
|
|
243
|
+
* Can be a Tailwind CSS class name (e.g., "bg-red-100") or a hex color (e.g., "#fee2e2")
|
|
244
|
+
* Default: "bg-red-100"
|
|
245
|
+
*/
|
|
246
|
+
bgcolor?: string;
|
|
247
|
+
/**
|
|
248
|
+
* Foreground/icon color for the buttons
|
|
249
|
+
* Can be a Tailwind CSS class name (e.g., "text-red-600") or a hex color (e.g., "#dc2626")
|
|
250
|
+
* Default: "text-red-600"
|
|
251
|
+
*/
|
|
252
|
+
fgcolor?: string;
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* File upload configuration
|
|
256
|
+
*/
|
|
257
|
+
/**
|
|
258
|
+
* Whether to enable file upload functionality
|
|
259
|
+
* When true, displays a Files accordion with upload capabilities
|
|
260
|
+
* Default: false
|
|
261
|
+
*/
|
|
262
|
+
accept_files?: boolean;
|
|
263
|
+
/**
|
|
264
|
+
* Server directory path where files should be saved
|
|
265
|
+
* Required if accept_files is true
|
|
266
|
+
*/
|
|
267
|
+
files_dir?: string;
|
|
268
|
+
/**
|
|
269
|
+
* Maximum file size in bytes per file
|
|
270
|
+
* If not specified, no size limit is enforced
|
|
271
|
+
*/
|
|
272
|
+
max_size?: number;
|
|
273
|
+
/**
|
|
274
|
+
* Minimum number of files required
|
|
275
|
+
* If not specified, no minimum is enforced
|
|
276
|
+
*/
|
|
277
|
+
min_files?: number;
|
|
278
|
+
/**
|
|
279
|
+
* Maximum number of files allowed
|
|
280
|
+
* Default: 10
|
|
281
|
+
*/
|
|
282
|
+
max_files?: number;
|
|
283
|
+
/**
|
|
284
|
+
* File type accept attribute (e.g., "image/*", ".pdf,.doc")
|
|
285
|
+
* Follows HTML input accept attribute format
|
|
286
|
+
*/
|
|
287
|
+
file_accept?: string;
|
|
288
|
+
/**
|
|
289
|
+
* Callback function called after a file is successfully uploaded
|
|
290
|
+
* Receives file data and component reference
|
|
291
|
+
*/
|
|
292
|
+
file_processor?: (file_data: FileData, component_ref: React.RefObject<any>) => Promise<void> | void;
|
|
293
|
+
/**
|
|
294
|
+
* Controlled files state
|
|
295
|
+
* When provided, component is controlled and uses this array
|
|
296
|
+
* When not provided, component manages files internally
|
|
297
|
+
*/
|
|
298
|
+
files?: FileData[];
|
|
299
|
+
/**
|
|
300
|
+
* Callback when files change
|
|
301
|
+
* Called with the updated files array
|
|
302
|
+
*/
|
|
303
|
+
on_files_change?: (files: FileData[]) => void;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* File data structure for uploaded files
|
|
307
|
+
*/
|
|
308
|
+
export interface FileData {
|
|
309
|
+
/**
|
|
310
|
+
* Server path where file is saved
|
|
311
|
+
*/
|
|
312
|
+
file_path: string;
|
|
313
|
+
/**
|
|
314
|
+
* Original filename
|
|
315
|
+
*/
|
|
316
|
+
file_name: string;
|
|
317
|
+
/**
|
|
318
|
+
* File size in bytes
|
|
319
|
+
*/
|
|
320
|
+
file_size: number;
|
|
321
|
+
/**
|
|
322
|
+
* MIME type
|
|
323
|
+
*/
|
|
324
|
+
file_type: string;
|
|
325
|
+
/**
|
|
326
|
+
* Unique identifier for the file
|
|
327
|
+
*/
|
|
328
|
+
file_id: string;
|
|
329
|
+
/**
|
|
330
|
+
* Upload timestamp
|
|
331
|
+
*/
|
|
332
|
+
uploaded_at: Date;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Hook for common collaboration form field functionality
|
|
336
|
+
*/
|
|
337
|
+
export declare function use_collab_form_field({ label, field_id, id, field_data_id, field_name, on_chat_click, hazo_chat_receiver_user_id, recipient_user_id, hazo_chat_on_open_change, hazo_chat_is_open, }: Pick<CollabFormFieldBaseProps, 'label' | 'field_id' | 'id' | 'field_data_id' | 'field_name' | 'on_chat_click' | 'hazo_chat_receiver_user_id' | 'recipient_user_id' | 'hazo_chat_on_open_change' | 'hazo_chat_is_open'>): {
|
|
338
|
+
field_id_final: string;
|
|
339
|
+
handle_chat_icon_click: () => void;
|
|
340
|
+
chat_is_open: boolean;
|
|
341
|
+
is_chat_disabled: boolean;
|
|
342
|
+
receiver_user_id: string | undefined;
|
|
343
|
+
};
|
|
344
|
+
/**
|
|
345
|
+
* Render the container wrapper with red border for chat messages and grey background when chat is active
|
|
346
|
+
*/
|
|
347
|
+
export declare function CollabFormFieldContainer({ has_chat_messages, is_chat_active, chat_background_color, is_data_ok_default, container_class_name, children, hazo_chat_is_open, hazo_chat_receiver_user_id, recipient_user_id, hazo_chat_reference_id, hazo_chat_reference_type, hazo_chat_api_base_url, hazo_chat_timezone, hazo_chat_title, hazo_chat_subtitle, hazo_chat_realtime_mode, hazo_chat_polling_interval, hazo_chat_messages_per_page, hazo_chat_class_name, hazo_chat_on_close, hazo_chat_on_open_change, hazo_chat_show_sidebar_toggle, hazo_chat_show_delete_button, hazo_chat_bubble_radius, field_data_id, field_name, label, files, }: Pick<CollabFormFieldBaseProps, 'has_chat_messages' | 'is_chat_active' | 'chat_background_color' | 'is_data_ok_default' | 'container_class_name' | 'hazo_chat_is_open' | 'hazo_chat_receiver_user_id' | 'recipient_user_id' | 'hazo_chat_reference_id' | 'hazo_chat_reference_type' | 'hazo_chat_api_base_url' | 'hazo_chat_timezone' | 'hazo_chat_title' | 'hazo_chat_subtitle' | 'hazo_chat_realtime_mode' | 'hazo_chat_polling_interval' | 'hazo_chat_messages_per_page' | 'hazo_chat_class_name' | 'hazo_chat_on_close' | 'hazo_chat_on_open_change' | 'hazo_chat_show_sidebar_toggle' | 'hazo_chat_show_delete_button' | 'hazo_chat_bubble_radius' | 'field_data_id' | 'field_name' | 'label' | 'files'> & {
|
|
348
|
+
children: React.ReactNode;
|
|
349
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
350
|
+
/**
|
|
351
|
+
* Render the field label
|
|
352
|
+
*/
|
|
353
|
+
export declare function CollabFormFieldLabel({ field_id_final, label, label_class_name, required, }: {
|
|
354
|
+
field_id_final: string;
|
|
355
|
+
label: string;
|
|
356
|
+
label_class_name?: string;
|
|
357
|
+
required?: boolean;
|
|
358
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
359
|
+
/**
|
|
360
|
+
* Render the chat icon button
|
|
361
|
+
*/
|
|
362
|
+
export declare function CollabFormChatIcon({ label, error, on_click, multi_state_radio, has_chat_messages, disabled, button_disabled, }: {
|
|
363
|
+
label: string;
|
|
364
|
+
error?: string;
|
|
365
|
+
on_click: () => void;
|
|
366
|
+
multi_state_radio?: CollabFormFieldBaseProps['multi_state_radio'];
|
|
367
|
+
has_chat_messages?: boolean;
|
|
368
|
+
disabled?: boolean;
|
|
369
|
+
button_disabled?: boolean;
|
|
370
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
371
|
+
/**
|
|
372
|
+
* Render the error message
|
|
373
|
+
*/
|
|
374
|
+
export declare function CollabFormFieldError({ field_id_final, error, error_class_name, }: {
|
|
375
|
+
field_id_final: string;
|
|
376
|
+
error?: string;
|
|
377
|
+
error_class_name?: string;
|
|
378
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
379
|
+
/**
|
|
380
|
+
* Render the data OK checkbox
|
|
381
|
+
* Provides consistent data OK checkbox functionality across all form fields
|
|
382
|
+
*/
|
|
383
|
+
export declare function CollabFormDataOkCheckbox({ label, data_ok_checked: controlled_data_ok_checked, on_data_ok_change, disabled, editable, }: {
|
|
384
|
+
label: string;
|
|
385
|
+
data_ok_checked?: boolean;
|
|
386
|
+
on_data_ok_change?: (checked: boolean) => void;
|
|
387
|
+
disabled?: boolean;
|
|
388
|
+
editable?: boolean;
|
|
389
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
390
|
+
/**
|
|
391
|
+
* Render the file upload component
|
|
392
|
+
* Provides file upload functionality for collaboration form fields
|
|
393
|
+
*/
|
|
394
|
+
export declare function CollabFormFileUploadSection({ field_id_final, accept_files, files_dir, max_size, min_files, max_files, file_accept, file_processor, files, on_files_change, component_ref, }: Pick<CollabFormFieldBaseProps, 'accept_files' | 'files_dir' | 'max_size' | 'min_files' | 'max_files' | 'file_accept' | 'file_processor' | 'files' | 'on_files_change'> & {
|
|
395
|
+
field_id_final: string;
|
|
396
|
+
component_ref?: React.RefObject<any>;
|
|
397
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
398
|
+
//# sourceMappingURL=hazo_collab_form_base.d.ts.map
|
|
@@ -0,0 +1 @@
|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ACR,QAAgB,GACjB,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,kDAoCA;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,cAAc,EACd,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,SAAS,EACT,SAAS,EACT,WAAW,EACX,cAAc,EACd,KAAK,EACL,eAAe,EACf,aAAa,GACd,EAAE,IAAI,CACL,wBAAwB,EACtB,cAAc,GACd,WAAW,GACX,UAAU,GACV,WAAW,GACX,WAAW,GACX,aAAa,GACb,gBAAgB,GAChB,OAAO,GACP,iBAAiB,CACpB,GAAG;IACF,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;CACtC,2CAsBA"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared base functionality for collaboration form components
|
|
3
|
+
* Provides common utilities and rendering logic for input and textarea fields
|
|
4
|
+
*/
|
|
5
|
+
'use client';
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { IoChatbox } from 'react-icons/io5';
|
|
9
|
+
import { cn } from '../utils/cn.js';
|
|
10
|
+
import { DataOkCheckbox } from './data_ok_checkbox.js';
|
|
11
|
+
import { CollabFormFileUpload } from './collab_form_file_upload.js';
|
|
12
|
+
import { HazoChat } from 'hazo_chat';
|
|
13
|
+
/**
|
|
14
|
+
* Convert FileData array to ReferenceItem array for HazoChat
|
|
15
|
+
*/
|
|
16
|
+
function convert_files_to_references(files) {
|
|
17
|
+
return files.map((file) => {
|
|
18
|
+
// Determine reference type from file type
|
|
19
|
+
let reference_type = 'document';
|
|
20
|
+
const mime_type = file.file_type.toLowerCase();
|
|
21
|
+
if (mime_type.startsWith('image/')) {
|
|
22
|
+
reference_type = 'document';
|
|
23
|
+
}
|
|
24
|
+
else if (mime_type === 'application/pdf' || mime_type.includes('document') || mime_type.includes('text')) {
|
|
25
|
+
reference_type = 'document';
|
|
26
|
+
}
|
|
27
|
+
// Construct file URL
|
|
28
|
+
const file_url = file.file_path.startsWith('/')
|
|
29
|
+
? file.file_path
|
|
30
|
+
: `/api/collab-forms/files/${encodeURIComponent(file.file_path)}`;
|
|
31
|
+
return {
|
|
32
|
+
id: file.file_id,
|
|
33
|
+
type: reference_type,
|
|
34
|
+
scope: 'field',
|
|
35
|
+
name: file.file_name,
|
|
36
|
+
url: file_url,
|
|
37
|
+
mime_type: file.file_type,
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Hook for common collaboration form field functionality
|
|
43
|
+
*/
|
|
44
|
+
export function use_collab_form_field({ label, field_id, id, field_data_id, field_name, on_chat_click, hazo_chat_receiver_user_id, recipient_user_id, hazo_chat_on_open_change, hazo_chat_is_open, }) {
|
|
45
|
+
// Generate field ID if not provided
|
|
46
|
+
const field_id_final = id || field_id || `collab-field-${label.toLowerCase().replace(/\s+/g, '-')}`;
|
|
47
|
+
// Internal state for chat open/close (if not controlled externally)
|
|
48
|
+
const [internal_chat_is_open, set_internal_chat_is_open] = React.useState(false);
|
|
49
|
+
// Use controlled value if provided, otherwise use internal state
|
|
50
|
+
const chat_is_open = hazo_chat_is_open !== undefined ? hazo_chat_is_open : internal_chat_is_open;
|
|
51
|
+
const is_chat_controlled = hazo_chat_is_open !== undefined;
|
|
52
|
+
// Get receiver user ID (prefer hazo_chat_receiver_user_id, fallback to recipient_user_id)
|
|
53
|
+
const receiver_user_id = hazo_chat_receiver_user_id || recipient_user_id;
|
|
54
|
+
// Chat is disabled if no receiver_user_id is available (unless on_chat_click is provided as fallback)
|
|
55
|
+
const is_chat_disabled = !receiver_user_id && !on_chat_click;
|
|
56
|
+
/**
|
|
57
|
+
* Handle chat icon click - trigger callback or open chat
|
|
58
|
+
*/
|
|
59
|
+
const handle_chat_icon_click = React.useCallback(() => {
|
|
60
|
+
// If custom on_chat_click is provided, use it (existing behavior)
|
|
61
|
+
if (field_data_id && on_chat_click) {
|
|
62
|
+
on_chat_click(field_data_id, field_name || label);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
// If hazo_chat_receiver_user_id is provided, open chat internally
|
|
66
|
+
if (receiver_user_id) {
|
|
67
|
+
const new_open_state = !chat_is_open;
|
|
68
|
+
if (!is_chat_controlled) {
|
|
69
|
+
set_internal_chat_is_open(new_open_state);
|
|
70
|
+
}
|
|
71
|
+
if (hazo_chat_on_open_change) {
|
|
72
|
+
hazo_chat_on_open_change(new_open_state);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}, [
|
|
76
|
+
field_data_id,
|
|
77
|
+
field_name,
|
|
78
|
+
label,
|
|
79
|
+
on_chat_click,
|
|
80
|
+
receiver_user_id,
|
|
81
|
+
chat_is_open,
|
|
82
|
+
is_chat_controlled,
|
|
83
|
+
hazo_chat_on_open_change,
|
|
84
|
+
]);
|
|
85
|
+
return {
|
|
86
|
+
field_id_final,
|
|
87
|
+
handle_chat_icon_click,
|
|
88
|
+
chat_is_open,
|
|
89
|
+
is_chat_disabled,
|
|
90
|
+
receiver_user_id,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Render the container wrapper with red border for chat messages and grey background when chat is active
|
|
95
|
+
*/
|
|
96
|
+
export function CollabFormFieldContainer({ has_chat_messages, is_chat_active, chat_background_color = 'bg-muted', is_data_ok_default, container_class_name, children,
|
|
97
|
+
// Chat-related props
|
|
98
|
+
hazo_chat_is_open, hazo_chat_receiver_user_id, recipient_user_id, hazo_chat_reference_id, hazo_chat_reference_type, hazo_chat_api_base_url, hazo_chat_timezone, hazo_chat_title, hazo_chat_subtitle, hazo_chat_realtime_mode, hazo_chat_polling_interval, hazo_chat_messages_per_page, hazo_chat_class_name, hazo_chat_on_close, hazo_chat_on_open_change, hazo_chat_show_sidebar_toggle, hazo_chat_show_delete_button, hazo_chat_bubble_radius, field_data_id, field_name, label, files, }) {
|
|
99
|
+
// Get receiver user ID (prefer hazo_chat_receiver_user_id, fallback to recipient_user_id)
|
|
100
|
+
const receiver_user_id = hazo_chat_receiver_user_id || recipient_user_id;
|
|
101
|
+
// Internal state for chat open/close (if not controlled externally)
|
|
102
|
+
const [internal_chat_is_open, set_internal_chat_is_open] = React.useState(false);
|
|
103
|
+
// Use controlled value if provided, otherwise use internal state
|
|
104
|
+
const chat_is_open = hazo_chat_is_open !== undefined ? hazo_chat_is_open : internal_chat_is_open;
|
|
105
|
+
const is_chat_controlled = hazo_chat_is_open !== undefined;
|
|
106
|
+
// Determine if chat should be shown
|
|
107
|
+
const show_chat = chat_is_open && receiver_user_id;
|
|
108
|
+
// Auto-determine is_chat_active from chat_is_open if not explicitly provided
|
|
109
|
+
const is_chat_active_final = is_chat_active !== undefined ? is_chat_active : chat_is_open;
|
|
110
|
+
// Convert files to references
|
|
111
|
+
const additional_references = files ? convert_files_to_references(files) : undefined;
|
|
112
|
+
// Determine chat props
|
|
113
|
+
const chat_reference_id = hazo_chat_reference_id || field_data_id || '';
|
|
114
|
+
const chat_reference_type = hazo_chat_reference_type || 'field';
|
|
115
|
+
const chat_title = hazo_chat_title || field_name || label;
|
|
116
|
+
const chat_subtitle = hazo_chat_subtitle || `Discussing ${field_name || label}`;
|
|
117
|
+
// Handle chat close
|
|
118
|
+
const handle_chat_close = React.useCallback(() => {
|
|
119
|
+
// Update internal state if not controlled
|
|
120
|
+
if (!is_chat_controlled) {
|
|
121
|
+
set_internal_chat_is_open(false);
|
|
122
|
+
}
|
|
123
|
+
// Call on_close callback if provided
|
|
124
|
+
if (hazo_chat_on_close) {
|
|
125
|
+
hazo_chat_on_close();
|
|
126
|
+
}
|
|
127
|
+
// Call on_open_change callback if provided
|
|
128
|
+
if (hazo_chat_on_open_change) {
|
|
129
|
+
hazo_chat_on_open_change(false);
|
|
130
|
+
}
|
|
131
|
+
}, [hazo_chat_on_close, hazo_chat_on_open_change, is_chat_controlled]);
|
|
132
|
+
// Container content
|
|
133
|
+
const container_content = (_jsx("div", { className: cn('cls_collab_field_container space-y-2 rounded-md p-2 transition-colors', has_chat_messages && 'border-2 border-destructive', is_chat_active_final && chat_background_color, is_data_ok_default && 'border border-primary/30', container_class_name), children: children }));
|
|
134
|
+
// If chat is open, wrap in flex layout
|
|
135
|
+
if (show_chat) {
|
|
136
|
+
return (_jsxs("div", { className: "cls_collab_field_with_chat flex items-start gap-4", children: [_jsx("div", { className: "cls_collab_field_content flex-1 min-w-0", children: container_content }), _jsx("div", { className: "cls_collab_chat_wrapper w-96 flex-shrink-0", children: _jsx("div", { className: cn('cls_collab_chat_card flex flex-col min-h-0 rounded-md', chat_background_color), style: { height: '400px' }, children: _jsx("div", { className: "cls_collab_chat_content flex-1 flex flex-col min-h-0", children: _jsx("div", { className: "cls_collab_chat_inner flex-1 min-h-0 w-full", children: _jsx(HazoChat, { receiver_user_id: receiver_user_id, reference_id: chat_reference_id, reference_type: chat_reference_type, api_base_url: hazo_chat_api_base_url, timezone: hazo_chat_timezone, title: chat_title, subtitle: chat_subtitle, on_close: handle_chat_close, realtime_mode: hazo_chat_realtime_mode, polling_interval: hazo_chat_polling_interval, messages_per_page: hazo_chat_messages_per_page, show_sidebar_toggle: hazo_chat_show_sidebar_toggle, show_delete_button: hazo_chat_show_delete_button, bubble_radius: hazo_chat_bubble_radius, className: cn('h-full w-full', hazo_chat_class_name), additional_references: additional_references }) }) }) }) })] }));
|
|
137
|
+
}
|
|
138
|
+
// Otherwise, just return the container
|
|
139
|
+
return container_content;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Render the field label
|
|
143
|
+
*/
|
|
144
|
+
export function CollabFormFieldLabel({ field_id_final, label, label_class_name, required, }) {
|
|
145
|
+
return (_jsxs("label", { htmlFor: field_id_final, className: cn('cls_collab_field_label text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70', label_class_name), children: [label, required && _jsx("span", { className: "text-destructive ml-1", children: "*" })] }));
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Render the chat icon button
|
|
149
|
+
*/
|
|
150
|
+
export function CollabFormChatIcon({ label, error, on_click, multi_state_radio, has_chat_messages, disabled, button_disabled, }) {
|
|
151
|
+
// Don't render if explicitly disabled (hide completely)
|
|
152
|
+
if (disabled) {
|
|
153
|
+
return null;
|
|
154
|
+
}
|
|
155
|
+
// Button is disabled if button_disabled is true (but icon is still visible)
|
|
156
|
+
const is_button_disabled = button_disabled === true;
|
|
157
|
+
return (_jsx("div", { className: "cls_collab_chat_icon_wrapper flex items-center gap-2", children: _jsx("button", { type: "button", onClick: on_click, disabled: is_button_disabled, className: cn('cls_collab_chat_icon flex h-9 w-9 items-center justify-center rounded-md border border-input bg-transparent text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50', error && 'border-destructive', has_chat_messages && 'bg-destructive/10 border-destructive'), "aria-label": `Chat about ${label}`, title: is_button_disabled ? 'Chat unavailable (recipient not configured)' : `Chat about ${label}`, children: _jsx(IoChatbox, { className: cn("h-5 w-5", has_chat_messages && "text-destructive") }) }) }));
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Render the error message
|
|
161
|
+
*/
|
|
162
|
+
export function CollabFormFieldError({ field_id_final, error, error_class_name, }) {
|
|
163
|
+
if (!error)
|
|
164
|
+
return null;
|
|
165
|
+
return (_jsx("p", { id: `${field_id_final}-error`, className: cn('cls_collab_field_error text-sm text-destructive', error_class_name), role: "alert", children: error }));
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Render the data OK checkbox
|
|
169
|
+
* Provides consistent data OK checkbox functionality across all form fields
|
|
170
|
+
*/
|
|
171
|
+
export function CollabFormDataOkCheckbox({ label, data_ok_checked: controlled_data_ok_checked, on_data_ok_change, disabled, editable = false, }) {
|
|
172
|
+
if (disabled) {
|
|
173
|
+
return null;
|
|
174
|
+
}
|
|
175
|
+
// Internal state for data OK checkbox (uncontrolled mode)
|
|
176
|
+
// Always initialize to false for consistent server/client rendering
|
|
177
|
+
const [internal_data_ok_checked, set_internal_data_ok_checked] = React.useState(false);
|
|
178
|
+
// Use controlled value if provided, otherwise use internal state
|
|
179
|
+
// Always default to false for consistent server/client rendering
|
|
180
|
+
const data_ok_checked = controlled_data_ok_checked !== undefined
|
|
181
|
+
? controlled_data_ok_checked
|
|
182
|
+
: internal_data_ok_checked;
|
|
183
|
+
const is_controlled = controlled_data_ok_checked !== undefined;
|
|
184
|
+
/**
|
|
185
|
+
* Handle data OK checkbox change
|
|
186
|
+
*/
|
|
187
|
+
const handle_data_ok_change = (checked) => {
|
|
188
|
+
if (!is_controlled) {
|
|
189
|
+
set_internal_data_ok_checked(checked);
|
|
190
|
+
}
|
|
191
|
+
if (on_data_ok_change) {
|
|
192
|
+
on_data_ok_change(checked);
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
return (_jsx(DataOkCheckbox, { checked: data_ok_checked, onChange: handle_data_ok_change, "aria-label": `Data OK for ${label}`, disabled: !editable }));
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Render the file upload component
|
|
199
|
+
* Provides file upload functionality for collaboration form fields
|
|
200
|
+
*/
|
|
201
|
+
export function CollabFormFileUploadSection({ field_id_final, accept_files, files_dir, max_size, min_files, max_files, file_accept, file_processor, files, on_files_change, component_ref, }) {
|
|
202
|
+
// Always render wrapper div to maintain consistent DOM structure
|
|
203
|
+
// This prevents hydration mismatches when accept_files changes between server and client
|
|
204
|
+
return (_jsx("div", { className: "cls_collab_file_upload_section_wrapper", suppressHydrationWarning: true, children: accept_files ? (_jsx(CollabFormFileUpload, { field_id_final: field_id_final, accept_files: accept_files, files_dir: files_dir, max_size: max_size, min_files: min_files, max_files: max_files, file_accept: file_accept, file_processor: file_processor, files: files, on_files_change: on_files_change, component_ref: component_ref })) : null }));
|
|
205
|
+
}
|
|
206
|
+
//# sourceMappingURL=hazo_collab_form_base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hazo_collab_form_base.js","sourceRoot":"","sources":["../../src/components/hazo_collab_form_base.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAsYrC;;GAEG;AACH,SAAS,2BAA2B,CAAC,KAAiB;IACpD,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACxB,0CAA0C;QAC1C,IAAI,cAAc,GAAiC,UAAU,CAAC;QAC9D,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;QAC/C,IAAI,SAAS,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YACnC,cAAc,GAAG,UAAU,CAAC;QAC9B,CAAC;aAAM,IAAI,SAAS,KAAK,iBAAiB,IAAI,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YAC3G,cAAc,GAAG,UAAU,CAAC;QAC9B,CAAC;QAED,qBAAqB;QACrB,MAAM,QAAQ,GAAG,IAAI,CAAC,SAA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