@unvired/turboforms-embed-sdk 2.0.46 → 2.0.48
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/dist/index.d.ts +268 -0
- package/dist/turboforms.esm.js +3 -3
- package/dist/turboforms.html +1 -1
- package/dist/turboforms.js +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
// TypeScript definitions for unvired-forms-lib
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export interface loadFormOptions {
|
|
5
|
+
nestedFormData?: any[];
|
|
6
|
+
masterData?: any[];
|
|
7
|
+
|
|
8
|
+
mode?: "pdf" | "readOnly" | "form" | "render" | "print" | string;
|
|
9
|
+
platform?: "android" | "web" | "ios" | string;
|
|
10
|
+
permission?: "writemultiple" | "writesingle" | "read" | string;
|
|
11
|
+
language?: string;
|
|
12
|
+
privateExternal?: string | boolean;
|
|
13
|
+
title?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
|
|
16
|
+
translations?: any;
|
|
17
|
+
themeData?: any;
|
|
18
|
+
userData?: any;
|
|
19
|
+
controlData?: any;
|
|
20
|
+
|
|
21
|
+
commentsData?: any[];
|
|
22
|
+
vobArr?: any[];
|
|
23
|
+
appData?: any[];
|
|
24
|
+
environmentVariable?: any[];
|
|
25
|
+
|
|
26
|
+
showComments?: boolean;
|
|
27
|
+
showDocuments?: boolean;
|
|
28
|
+
showHelp?: boolean;
|
|
29
|
+
showBackButton?: boolean;
|
|
30
|
+
showLoader?: boolean;
|
|
31
|
+
showMoreButton?: boolean;
|
|
32
|
+
showFooter?: boolean;
|
|
33
|
+
showHeader?: boolean;
|
|
34
|
+
|
|
35
|
+
showCompleteAlways?: boolean;
|
|
36
|
+
requireCompleteForm?: boolean;
|
|
37
|
+
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Event Types
|
|
41
|
+
export const FORM_EVENTS: {
|
|
42
|
+
FORM_RENDER: "FORM_RENDER";
|
|
43
|
+
SAVE: "FORM_SAVE";
|
|
44
|
+
SUBMIT: "FORM_SUBMIT";
|
|
45
|
+
SUBMIT_ERROR: "FORM_SUBMIT_ERROR";
|
|
46
|
+
BACK_NAVIGATION: "FORM_BACK_NAVIGATION";
|
|
47
|
+
ONCHANGE: "FORM_ONCHANGE";
|
|
48
|
+
ACTION: "ACTION";
|
|
49
|
+
GET_ATTACHMENT: "GET_ATTACHMENT";
|
|
50
|
+
FORM_LOADED: "FORM_LOADED";
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// Event Structures
|
|
54
|
+
export interface SuccessEvent {
|
|
55
|
+
type:
|
|
56
|
+
| "FORM_RENDER"
|
|
57
|
+
| "FORM_SAVE"
|
|
58
|
+
| "FORM_SUBMIT"
|
|
59
|
+
| "FORM_BACK_NAVIGATION"
|
|
60
|
+
| "FORM_ONCHANGE"
|
|
61
|
+
| "ACTION"
|
|
62
|
+
| "OPEN_CAMERA"
|
|
63
|
+
| "BARCODE_SCAN"
|
|
64
|
+
| "LOCATION_REQUEST"
|
|
65
|
+
| "GET_ATTACHMENT";
|
|
66
|
+
message: string;
|
|
67
|
+
data: {
|
|
68
|
+
formData?: any;
|
|
69
|
+
templateData?: any;
|
|
70
|
+
completeFlag?: boolean;
|
|
71
|
+
completionPercentage?: number;
|
|
72
|
+
result?: any;
|
|
73
|
+
controlId?: string;
|
|
74
|
+
scannedValue?: string;
|
|
75
|
+
location?: string;
|
|
76
|
+
coordinates?: { lat: number; lng: number };
|
|
77
|
+
fileName?: string;
|
|
78
|
+
missingFiles?: Array<{ fileId: string; field: string }>;
|
|
79
|
+
[key: string]: any;
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface ErrorEvent {
|
|
84
|
+
type: "ERROR"
|
|
85
|
+
errorMessage: string;
|
|
86
|
+
data: {
|
|
87
|
+
technicalError?: any;
|
|
88
|
+
reason?: string;
|
|
89
|
+
error?: any;
|
|
90
|
+
formData?: any;
|
|
91
|
+
completeFlag?: boolean;
|
|
92
|
+
completionPercentage?: number;
|
|
93
|
+
[key: string]: any;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export type FormEvent = SuccessEvent | ErrorEvent;
|
|
98
|
+
|
|
99
|
+
// Error Codes Reference
|
|
100
|
+
export const ERROR_CODES: {
|
|
101
|
+
"001": "Invalid formsData JSON";
|
|
102
|
+
"002": "Nested form validation error";
|
|
103
|
+
"003": "Master data validation error";
|
|
104
|
+
"004": "User Data not Provided";
|
|
105
|
+
"005": "Formio not rendered the forms";
|
|
106
|
+
"006": "Formio not submit the form";
|
|
107
|
+
"008": "Location permission denied";
|
|
108
|
+
"009": "Location unavailable";
|
|
109
|
+
"010": "Location request timeout";
|
|
110
|
+
"011": "Location unknown error";
|
|
111
|
+
"012": "Camera access error";
|
|
112
|
+
"013": "Attachments missing from storage";
|
|
113
|
+
"014": "Failed to validate attachments";
|
|
114
|
+
"015": "File not found in IndexedDB during processing";
|
|
115
|
+
"016": "Formio library not loaded";
|
|
116
|
+
"017": "Document not found";
|
|
117
|
+
"018": "Invalid file format";
|
|
118
|
+
"019": "File is corrupted (invalid base64)";
|
|
119
|
+
"020": "File is empty";
|
|
120
|
+
"021": "File is corrupted (invalid encoding)";
|
|
121
|
+
"022": "Failed to process file";
|
|
122
|
+
"023": "File is empty";
|
|
123
|
+
"024": "No downloadable content found";
|
|
124
|
+
"025": "Failed to load documents";
|
|
125
|
+
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
// Event Callback Function
|
|
129
|
+
export type EventCallback = (event: FormEvent) => void;
|
|
130
|
+
|
|
131
|
+
// Main Function Interface
|
|
132
|
+
export interface loadFormParams {
|
|
133
|
+
formsData: string | any;
|
|
134
|
+
submissionData?: any;
|
|
135
|
+
eventCallback?: EventCallback;
|
|
136
|
+
container?: HTMLElement;
|
|
137
|
+
options?: loadFormOptions;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export interface AttachmentInfo {
|
|
141
|
+
id: string;
|
|
142
|
+
name: string;
|
|
143
|
+
originalName: string;
|
|
144
|
+
size: number;
|
|
145
|
+
type: string;
|
|
146
|
+
url: string;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface FormInstance {
|
|
150
|
+
sendAction: (action: any) => void;
|
|
151
|
+
getAttachments?: () => Promise<AttachmentInfo[]>;
|
|
152
|
+
clearAttachments?: () => Promise<boolean>;
|
|
153
|
+
validateAttachments?: (formData: any) => void;
|
|
154
|
+
deleteAttachment?: (fileId: string) => Promise<boolean>;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export function loadForm(params: loadFormParams): FormInstance;
|
|
158
|
+
|
|
159
|
+
export function getBuildVersion(): string;
|
|
160
|
+
|
|
161
|
+
// Events that will be triggered:
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* SUCCESS EVENTS:
|
|
165
|
+
*
|
|
166
|
+
* 1. FORM_RENDER - Form rendered successfully
|
|
167
|
+
* { type: "FORM_RENDER", message: "Success: Form rendered successfully.", data: {} }
|
|
168
|
+
*
|
|
169
|
+
* 2. FORM_ONCHANGE - Form data changed
|
|
170
|
+
* { type: "FORM_ONCHANGE", message: "Success: Form onchange triggered.", data: { formData: submission, templateData: template } }
|
|
171
|
+
*
|
|
172
|
+
* 3. FORM_SUBMIT - Form submitted successfully
|
|
173
|
+
* { type: "FORM_SUBMIT", message: "Success: Form submitted successfully.", data: { formData: currentData, completeFlag, completionPercentage, result } }
|
|
174
|
+
*
|
|
175
|
+
* 4. FORM_SAVE - Form data saved
|
|
176
|
+
* { type: "FORM_SAVE", message: "Success: Data saved successfully.", data: { formData: updatedData, completeFlag, completionPercentage } }
|
|
177
|
+
*
|
|
178
|
+
* 5. FORM_BACK_NAVIGATION - Back navigation triggered
|
|
179
|
+
* { type: "FORM_BACK_NAVIGATION", message: "Back navigation triggered.", data: {} }
|
|
180
|
+
*
|
|
181
|
+
* 6. OPEN_CAMERA - Photo captured successfully
|
|
182
|
+
* { type: "OPEN_CAMERA", message: "Photo captured successfully", data: { controlId: "id", fileName: "photo.jpg" } }
|
|
183
|
+
*
|
|
184
|
+
* 7. BARCODE_SCAN - Barcode scanned successfully
|
|
185
|
+
* { type: "BARCODE_SCAN", message: "Barcode scanned successfully", data: { controlId: "id", scannedValue: "value" } }
|
|
186
|
+
*
|
|
187
|
+
* 8. LOCATION_REQUEST - Location retrieved successfully
|
|
188
|
+
* { type: "LOCATION_REQUEST", message: "Location retrieved successfully", data: { controlId: "id", location: "lat,lng", coordinates: { lat: 0, lng: 0 } } }
|
|
189
|
+
*
|
|
190
|
+
* 9. GET_ATTACHMENT - Request missing attachments from middleware
|
|
191
|
+
* { type: "GET_ATTACHMENT", message: "Requesting missing attachments from middleware", data: { missingFiles: [{fileId: "id", field: "fieldName"}] } }
|
|
192
|
+
*
|
|
193
|
+
* ERROR EVENTS:
|
|
194
|
+
*
|
|
195
|
+
* 1. ERROR Code 001 - Invalid formsData JSON
|
|
196
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 001, Invalid formsData JSON", data: { error: e } }
|
|
197
|
+
*
|
|
198
|
+
* 2. ERROR Code 002 - Nested form validation error
|
|
199
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 002, Nested form validation error", data: { technicalError: nestedFormError } }
|
|
200
|
+
*
|
|
201
|
+
* 3. ERROR Code 003 - Master data validation error
|
|
202
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 003, Master data validation error", data: { technicalError: masterdataError } }
|
|
203
|
+
*
|
|
204
|
+
* 4. ERROR Code 004 - User Data not Provided
|
|
205
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 004, User Data not Provided", data: { reason: "User Data not Provided" } }
|
|
206
|
+
*
|
|
207
|
+
* 5. ERROR Code 005 - Formio not rendered the forms
|
|
208
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 005, Formio not rendered the forms", data: { technicalError: error } }
|
|
209
|
+
*
|
|
210
|
+
* 6. ERROR Code 006 - Formio not submit the form
|
|
211
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 006, Formio not submit the form", data: { formData: currentData, completeFlag, completionPercentage, technicalError: error } }
|
|
212
|
+
*
|
|
213
|
+
* 8. ERROR Code 008 - Location permission denied
|
|
214
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 008, Location permission denied", data: { technicalError: error, reason: "Location permission denied" } }
|
|
215
|
+
*
|
|
216
|
+
* 9. ERROR Code 009 - Location unavailable
|
|
217
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 009, Location unavailable", data: { technicalError: error, reason: "Location unavailable" } }
|
|
218
|
+
*
|
|
219
|
+
* 10. ERROR Code 010 - Location request timeout
|
|
220
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 010, Location request timeout", data: { technicalError: error, reason: "Location timeout" } }
|
|
221
|
+
*
|
|
222
|
+
* 11. ERROR Code 011 - Location unknown error
|
|
223
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 011, Location unknown error", data: { technicalError: error, reason: "Location unknown error" } }
|
|
224
|
+
*
|
|
225
|
+
* 12. ERROR Code 012 - Camera access error
|
|
226
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 012, Camera access error", data: { technicalError: error, reason: "Camera access error" } }
|
|
227
|
+
*
|
|
228
|
+
* 13. ERROR Code 013 - Attachments missing from storage
|
|
229
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 013, Attachments missing from storage", data: { reason: "Some attachments are missing from storage", missingFiles: [] } }
|
|
230
|
+
*
|
|
231
|
+
* 14. ERROR Code 014 - Failed to validate attachments
|
|
232
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 014, Failed to validate attachments", data: { reason: "Failed to validate attachments", technicalError: error } }
|
|
233
|
+
*
|
|
234
|
+
* 15. ERROR Code 015 - File not found in IndexedDB during processing
|
|
235
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 015, File not found in IndexedDB during processing", data: { reason: "File not found in IndexedDB: fileId", fileId: "id", field: "fieldName" } }
|
|
236
|
+
*
|
|
237
|
+
* 16. ERROR Code 016 - Formio library not loaded
|
|
238
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 016, Formio library not loaded", data: { reason: "Formio library not loaded" } }
|
|
239
|
+
*
|
|
240
|
+
* 17. ERROR Code 017 - Document not found
|
|
241
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 017, Document not found", data: { reason: "Document not found" } }
|
|
242
|
+
*
|
|
243
|
+
* 18. ERROR Code 018 - Invalid file format
|
|
244
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 018, Invalid file format", data: { reason: "Invalid file format" } }
|
|
245
|
+
*
|
|
246
|
+
* 19. ERROR Code 019 - File is corrupted (invalid base64)
|
|
247
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 019, File is corrupted (invalid base64)", data: { reason: "File is corrupted (invalid base64)" } }
|
|
248
|
+
*
|
|
249
|
+
* 20. ERROR Code 020 - File is empty
|
|
250
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 020, File is empty", data: { reason: "File is empty" } }
|
|
251
|
+
*
|
|
252
|
+
* 21. ERROR Code 021 - File is corrupted (invalid encoding)
|
|
253
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 021, File is corrupted (invalid encoding)", data: { reason: "File is corrupted (invalid encoding)", technicalError: error } }
|
|
254
|
+
*
|
|
255
|
+
* 22. ERROR Code 022 - Failed to process file
|
|
256
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 022, Failed to process file", data: { reason: "Failed to process file", technicalError: error } }
|
|
257
|
+
*
|
|
258
|
+
* 23. ERROR Code 023 - File is empty
|
|
259
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 023, File is empty", data: { reason: "File is empty" } }
|
|
260
|
+
*
|
|
261
|
+
* 24. ERROR Code 024 - No downloadable content found
|
|
262
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 024, No downloadable content found", data: { reason: "No downloadable content found" } }
|
|
263
|
+
*
|
|
264
|
+
* 25. ERROR Code 025 - Failed to load documents
|
|
265
|
+
* { type: "ERROR", errorMessage: "ErrorCode : 025, Failed to load documents", data: { reason: "Failed to load documents", technicalError: error } }
|
|
266
|
+
*
|
|
267
|
+
|
|
268
|
+
*/
|
package/dist/turboforms.esm.js
CHANGED
|
@@ -131,7 +131,7 @@ var ke=Object.create;var ie=Object.defineProperty;var Ee=Object.getOwnPropertyDe
|
|
|
131
131
|
|
|
132
132
|
/* === STYLE_SEPARATOR === */
|
|
133
133
|
|
|
134
|
-
.tf-formio-sdk table.table,.tf-formio-sdk table.datagrid-table,.tf-formio-sdk .table>:not(caption)>*>*{border:1px solid var(--tf-border-color)!important;margin-bottom:.5rem!important;font-weight:var(--tf-app-font-weight)!important}.tf-formio-sdk .formio-component-datagrid{border-radius:8px!important;overflow-x:auto!important;overflow-y:visible!important;width:100%!important}.tf-formio-sdk .formio-component-datagrid:has(.choices.is-open){overflow-x:visible!important;z-index:9999!important}.tf-formio-sdk table.table td,.tf-formio-sdk table.table th{font-weight:var(--tf-app-font-weight)!important}.tf-formio-sdk .table td .formio-component-signature{width:100%!important}.tf-formio-sdk .table-responsive{display:block!important;width:100%!important;overflow-x:auto!important;overflow-y:visible!important;-webkit-overflow-scrolling:touch;transition:all .2s ease}.tf-formio-sdk .table-responsive::-webkit-scrollbar{width:0px!important}.tf-formio-sdk .table-responsive:has(.choices.is-open){z-index:9999!important}.tf-formio-sdk .formio-component-datagrid .table-responsive:has(.choices.is-open){overflow-x:
|
|
134
|
+
.tf-formio-sdk table.table,.tf-formio-sdk table.datagrid-table,.tf-formio-sdk .table>:not(caption)>*>*{border:1px solid var(--tf-border-color)!important;margin-bottom:.5rem!important;font-weight:var(--tf-app-font-weight)!important}.tf-formio-sdk .formio-component-datagrid{border-radius:8px!important;overflow-x:auto!important;overflow-y:visible!important;width:100%!important}.tf-formio-sdk .formio-component-datagrid:has(.choices.is-open){overflow-x:visible!important;z-index:9999!important}.tf-formio-sdk table.table td,.tf-formio-sdk table.table th{font-weight:var(--tf-app-font-weight)!important}.tf-formio-sdk .table td .formio-component-signature{width:100%!important}.tf-formio-sdk .table-responsive{display:block!important;width:100%!important;overflow-x:auto!important;overflow-y:visible!important;-webkit-overflow-scrolling:touch;transition:all .2s ease}.tf-formio-sdk .table-responsive::-webkit-scrollbar{width:0px!important}.tf-formio-sdk .table-responsive:has(.choices.is-open){z-index:9999!important}.tf-formio-sdk .formio-component-datagrid .table-responsive:has(.choices.is-open){overflow-x:auto!important;overflow-y:auto!important}.tf-formio-sdk .table-responsive:not(.formio-component-datagrid .table-responsive):has(.choices.is-open){overflow-x:auto!important;overflow-y:visible!important}.tf-formio-sdk .table-responsive:has(.choices.is-open) thead{z-index:1!important;position:relative!important;overflow:visible!important}.tf-formio-sdk .table-responsive:has(.choices.is-open) tbody{overflow:visible!important}.tf-formio-sdk .table-responsive:has(.choices.is-open) table.table,.tf-formio-sdk .table-responsive:has(.choices.is-open) .table>:not(caption)>*>*,.tf-formio-sdk table.table:has(.choices.is-open),.tf-formio-sdk table.table:has(.choices.is-open) td,.tf-formio-sdk table.table:has(.choices.is-open) th,.tf-formio-sdk tr:has(.choices.is-open) td{border:1px solid var(--tf-border-color)!important;border-color:var(--tf-border-color)!important;visibility:visible!important;opacity:1!important}.tf-formio-sdk table.table:has(.choices.is-open){border-spacing:0!important}.tf-formio-sdk.formio-form table.table thead th,.tf-formio-sdk.formio-form table.table tbody td,.tf-formio-sdk.formio-form table.table tfoot td,.tf-formio-sdk .formio-component-datagrid table thead th,.tf-formio-sdk .formio-component-datagrid table tbody td,.tf-formio-sdk .formio-component-datagrid table tfoot td{padding:.5rem .75rem!important;vertical-align:top!important;border:1px solid var(--tf-border-color)!important;word-wrap:break-word!important;overflow:visible!important;font-size:var(--tf-app-font-size-base)!important;color:var(--tf-app-font-color)!important;line-height:1.2!important;border-radius:5px}.tf-formio-sdk .formio-component-datagrid table tbody td{border:1px solid var(--tf-border-color)!important}.tf-formio-sdk .formio-component-datagrid table tfoot td{border:none!important}.tf-formio-sdk .table-striped>tbody>tr:nth-of-type(odd)>*{color:var(--tf-app-font-color)!important;--bs-table-color-type: var(--tf-app-font-color) !important}.tf-formio-sdk .formio-component-datagrid table.datagrid-table thead th:last-child,.tf-formio-sdk .formio-component-datagrid table.datagrid-table tbody tr td:last-child,.tf-formio-sdk table td:has([ref=removeRow]),.tf-formio-sdk table td:has(.formio-button-remove-row),.tf-formio-sdk table th:has([ref=removeRow]),.tf-formio-sdk table th:has(.formio-button-remove-row){text-align:center!important;min-width:45px!important}@media (min-width: 769px){.tf-formio-sdk table td:has([ref=removeRow]),.tf-formio-sdk table td:has(.formio-button-remove-row),.tf-formio-sdk table th:has([ref=removeRow]),.tf-formio-sdk table th:has(.formio-button-remove-row){width:1%!important}}.tf-formio-sdk tr:has(.choices.is-open){z-index:100!important;position:relative!important}.tf-formio-sdk .formio-component-datagrid table tfoot tr td,.tf-formio-sdk .formio-form table tfoot tr td{text-align:left!important;padding-left:.75rem!important;background-color:transparent!important}@media (max-width: 768px){.tf-formio-sdk .table-responsive,.tf-formio-sdk .formio-component-table,.tf-formio-sdk .formio-component-datagrid,.tf-formio-sdk .formio-component-multiple{overflow:visible!important}.tf-formio-sdk .formio-form table.table thead,.tf-formio-sdk .formio-component-datagrid table thead,.tf-formio-sdk .formio-component-multiple table thead{display:none!important}.tf-formio-sdk .formio-form table.table,.tf-formio-sdk .formio-form tbody,.tf-formio-sdk .formio-form tr,.tf-formio-sdk .formio-form td,.tf-formio-sdk .formio-component table,.tf-formio-sdk .formio-component tbody,.tf-formio-sdk .formio-component tr,.tf-formio-sdk .formio-component td{display:block!important;width:100%!important;border-radius:10px}.tf-formio-sdk .formio-form tbody,.tf-formio-sdk .formio-form tr,.tf-formio-sdk .formio-component tbody,.tf-formio-sdk .formio-component tr{border-style:none!important}.tf-formio-sdk .formio-form tr,.tf-formio-sdk .formio-component-datagrid tr{border-radius:10px!important}.tf-formio-sdk .formio-form td,.tf-formio-sdk .formio-component-datagrid td{border:none!important;border-bottom:1px solid #f1f5f9!important;padding:.6rem .8rem!important;font-size:.8125rem!important}.tf-formio-sdk table td:has(>[ref=removeRow]),.tf-formio-sdk table td:has(>.formio-button-remove-row){text-align:center!important;display:flex!important;justify-content:center!important;align-items:center!important;padding:.8rem!important;width:100%!important}.tf-formio-sdk .formio-component-datagrid td[data-label]:before{content:attr(data-label);display:block;font-family:var(--tf-app-font-family)!important;font-weight:600;margin-bottom:.25rem;font-size:var(--tf-app-font-size-base)!important;color:var(--tf-app-font-color, #333);text-align:left}}.tf-formio-sdk .formio-component-datagrid .row [class*=col-]{min-width:60px!important}.tf-formio-sdk .formio-component-datagrid .row [class*=col-].formio-component-select,.tf-formio-sdk .formio-component-datagrid .row [class*=col-]:has([class*=formio-component-select]),.tf-formio-sdk .formio-component-datagrid .row [class*=col-]:has(.formio-component-select){min-width:50px!important}.tf-formio-sdk .formio-component-datagrid .col-form-label{max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.tf-formio-sdk .formio-component-table table,.tf-formio-sdk .formio-component-datagrid table{width:100%!important;table-layout:auto!important}.tf-formio-sdk .formio-component-datagrid table th:not(:last-child),.tf-formio-sdk .formio-component-datagrid table td:not(:last-child){min-width:200px}.tf-formio-sdk .table td .formio-component{width:100%!important;max-width:100%!important}.tf-formio-sdk .table td label:not(.custom-control-label){max-width:100%!important;word-break:break-word!important;white-space:normal!important;line-height:1.1!important;font-size:.75rem!important;margin-bottom:2px!important;display:block!important}
|
|
135
135
|
|
|
136
136
|
/* === STYLE_SEPARATOR === */
|
|
137
137
|
|
|
@@ -199,7 +199,7 @@ var ke=Object.create;var ie=Object.defineProperty;var Ee=Object.getOwnPropertyDe
|
|
|
199
199
|
</div>
|
|
200
200
|
${(W=e.themeData)!=null&&W.isCard?"</div>":""}
|
|
201
201
|
<div id="sticky-footer" class="${e.showFooter===!1?"footer-hidden":""}">
|
|
202
|
-
<div class="build-version">SDK v2.0.
|
|
202
|
+
<div class="build-version">SDK v2.0.48</div>
|
|
203
203
|
|
|
204
204
|
<button class="footer-btn footer-btn-secondary" id="prevBtn" style="display:none" onclick="FormOnPrevious()">
|
|
205
205
|
<i class="bi bi-chevron-left"></i> Previous
|
|
@@ -262,4 +262,4 @@ var ke=Object.create;var ie=Object.defineProperty;var Ee=Object.getOwnPropertyDe
|
|
|
262
262
|
|
|
263
263
|
// === SCRIPT_SEPARATOR ===
|
|
264
264
|
|
|
265
|
-
`);if(!window.__unviredSdkScriptsLoaded&&!window.__unviredSdkScriptsLoading){window.__unviredSdkScriptsLoading=!0,l.info("[TF_SDK:14] \u2705 Loading SDK scripts (jQuery, Formio, Recogito, LESS, components)...");let m=d=>{if(b){let C=b.querySelector(".sdk-loader-text");C&&(C.textContent=d)}};if(m("Loading Core Components..."),c[0]&&c[0].trim()){let d=document.createElement("script");d.textContent=c[0],d.setAttribute("data-unvired-script","jquery"),document.head.appendChild(d)}if(c[4]&&c[4].trim()){let d=document.createElement("script");d.textContent=c[4],d.setAttribute("data-unvired-script","choices"),document.head.appendChild(d)}if(m("Loading Formio Library..."),c[5]&&c[5].trim()){let d=document.createElement("script");d.textContent=c[5],d.setAttribute("data-unvired-script","formio"),document.head.appendChild(d),l.info("[TF_SDK:15] \u2705 Bundled Formio library injected.")}if(e.showComments){m("Loading Annotation Tools...");for(let d=1;d<=2;d++)if(c[d]&&c[d].trim()){let C=document.createElement("script");C.textContent=c[d],C.setAttribute("data-unvired-script",`recogito-${d}`),document.head.appendChild(C),await new Promise(A=>setTimeout(A,0))}}else l.info("[TF_SDK:16] \u2705 Skipping Recogito (comments disabled, optimized load)");if(m("Initializing Engine..."),c[3]&&c[3].trim()){let d=document.createElement("script");d.textContent=c[3],d.setAttribute("data-unvired-script","less"),document.head.appendChild(d)}window.form=window.form||{},window.platform=window.platform||{},window.ResizeObserver=window.ResizeObserver||ResizeObserver,typeof browserMD5File!="undefined"&&(window.form.BMF=new browserMD5File),window.less=window.less||{},typeof window.__Html5QrcodeLibrary__!="undefined"&&(window.html5QrCode=window.__Html5QrcodeLibrary__),typeof window.Html5QrcodeScanner=="undefined"&&(window.Html5QrcodeScanner=class{constructor(){l.warn("[TF_SDK:17] \u26A0\uFE0F Barcode library (Html5QrcodeScanner) is not loaded.")}render(){}clear(){}}),m("Initializing Components...");for(let d=6;d<c.length;d++){let C=c[d];if(C&&C.trim()){let A=document.createElement("script");A.textContent=C,A.setAttribute("data-unvired-script",`script-${d}`),document.head.appendChild(A),d%5===0&&await new Promise(V=>setTimeout(V,0))}}window.__unviredSdkScriptsLoaded=!0,window.__unviredSdkScriptsLoading=!1,l.info("[TF_SDK:18] \u2705 All SDK scripts injected successfully"),document.addEventListener("click",function(d){let C=document.getElementById("unvired-more-btn"),A=document.getElementById("moreTooltip");C&&A&&!C.contains(d.target)&&!A.contains(d.target)&&(A.style.display="none")})}else if(window.__unviredSdkScriptsLoading)window.__unviredSdkScriptsLoaded||(l.warn("[TF_SDK:19] \u26A0\uFE0F Scripts marked as loading but not yet loaded - waiting..."),window.__unviredSdkScriptsLoaded=!0,window.__unviredSdkScriptsLoading=!1);else{if(l.info("[TF_SDK:20] \u2705 SDK scripts already loaded \u2014 skipping injection"),typeof window.Formio=="undefined"){let m="ErrorCode : 005, Formio library not available even though scripts were loaded.";throw l.error("[TF_SDK:21] \u274C ",m),b&&b.classList.add("hidden"),s({type:"ERROR",errorMessage:m,data:{technicalError:new Error(m),formioPath:"bundled",timestamp:new Date().toISOString()}}),new Error(m)}l.info("[TF_SDK:22] \u2705 Formio verified (previously loaded)")}window.FORM_TEMPLATE=h,window.FORM_PREVIOUS_DATA=n,window.FORM_MODE=e.mode,window.FORM_COMMENTS_DATA=e.commentsData,window.FORM_VOB_ARR=e.vobArr,window.FORM_PLATFORM=e.platform,window.FORM_LANGUAGE=e.language,window.FORM_TRASLATIONS=e.translations,window.FORM_ENV=e.environmentVariable,window.FORM_THEME_DATA=e.themeData,window.FORM_USER_DATA=e.userData,window.FORM_USERS_LIST=e.usersList,window.FORM_CONTROL_DATA=e.controlData,window.FORM_PRIVATE_EXTERNAL=e.privateExternal,window.FORM_PERMISSION=e.permission,window.FORM_ATTACHMENT_FILE_KEYS=i,window.sendEventCallback=s,window.FORM_EVENTS={FORM_RENDER:"FORM_RENDER",SAVE:"FORM_SAVE",SUBMIT:"FORM_SUBMIT",SUBMIT_ERROR:"FORM_SUBMIT_ERROR",BACK_NAVIGATION:"FORM_BACK_NAVIGATION",ONCHANGE:"FORM_ONCHANGE",FORM_LOADED:"FORM_LOADED"};let v=r.querySelector("#form-back-btn"),E=r.querySelector("#unvired-more-btn");v&&(e.showBackButton?v.style.setProperty("display","flex","important"):v.style.setProperty("display","none","important")),E&&!e.showMoreButton&&E.style.setProperty("display","none","important"),window.__unviredFormsOptions=e,window.checkDocumentsVisibility(),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility(),e.platform==="web"?window.platform={isBrowser:!0,isAndroid:!1,iosPlatform:!1}:e.platform==="android"?window.platform={isBrowser:!1,isAndroid:!0,iosPlatform:!1}:e.platform==="ios"&&(window.platform={isBrowser:!1,isAndroid:!1,iosPlatform:!0});let O={};if(((oe=e.environmentVariable)==null?void 0:oe.length)>0)for(let m of e.environmentVariable)for(let d in m)O[d]=m[d];Object.keys(O).length>0&&(window.env=O);let S=r.querySelector("#sticky-header"),N=r.querySelector("#sticky-footer"),L=r.querySelector("#formio-wrapper"),H=r.querySelector("#comments-header");e.mode==="pdf"||e.mode==="print"?(r.classList.add(`${e.mode}-mode`),L&&L.classList.add(`${e.mode}-mode`),S&&(S.style.display="none"),N&&(N.style.display="none")):(S&&(S.style.display="flex"),N&&(N.style.display="flex")),H&&(H.style.display="none"),e.themeData&&Object.keys(e.themeData).length>0&&(window.FORM_THEME_DATA=e.themeData),e.language&&(window.FORMIO_LANGUAGE=e.language),e.translations&&(window.FORMIO_I18N=e.translations),e.userData&&(window.firstName=e.userData.firstName,window.lastName=e.userData.lastName,window.form=window.form||{},Object.assign(window.form,e.userData)),window.less=window.less||{},Object.assign(window.less,{async:!0,environment:"production",fileAsync:!1,onReady:!0,useFileCache:!0});let _=n;if(n&&(l.info("[TF_SDK:23] \u2705 Processing file IDs in submission data (fetching from IndexedDB)..."),_=await pe(n,s,i),l.info("[TF_SDK:24] \u2705 File IDs processed \u2014 handing off to form renderer")),b){let m=b.querySelector(".sdk-loader-text");m&&(m.textContent="Initializing Form...")}return typeof window.loadTRform!="function"?(l.info("[TF_SDK:25] \u2705 loadTRform not ready yet \u2014 waiting for web-turbo-formio.js to signal..."),await new Promise(m=>{let d=()=>{document.removeEventListener("LoadRNformReady",d),l.info("[TF_SDK:26] \u2705 loadTRform is now ready (LoadRNformReady event received)"),m()};document.addEventListener("LoadRNformReady",d),typeof window.loadTRform=="function"&&d()})):l.info("[TF_SDK:27] \u2705 loadTRform already available \u2014 invoking immediately"),l.info("[TF_SDK:28] \u2705 Handing off to loadTRform (web-turbo-formio.js)..."),await window.loadTRform(h,_,e.themeData,e.mode,e.language,e.translations,e.controlData,e.privateExternal,e.permission,i),Ce(),{sendAction:m=>{var d;m.type==="SET_IMAGE_DATA"&&((d=window.setImageData)==null||d.call(window,m.imageData,m.controlId,m.fileName))},destroy:()=>{r.innerHTML=""}}}window.closeDocumentsModal=function(){if(typeof $!="undefined"&&$.fn.modal)$("#documentsModal").modal("hide");else{let t=document.getElementById("documentsModal");t&&(t.style.display="none",t.classList.remove("active"))}};window.checkDocumentsVisibility=async function(){let t=document.getElementById("documentsOption"),n=document.getElementById("documentsDivider"),o=await te();t.style.display=o?"block":"none",n&&(n.style.display=o?"block":"none"),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()};window.insertAppDocument=async function(t){try{return await be(t),l.info("[TF_SDK:29] \u2705 Document inserted",{id:t==null?void 0:t.id}),await window.checkDocumentsVisibility(),!0}catch(n){return l.error("[TF_SDK:30] \u274C Failed to insert document",n),!1}};window.deleteAppDocument=async function(t){try{return await ge(t),l.info("[TF_SDK:31] \u2705 Document deleted",{id:t}),await window.checkDocumentsVisibility(),!0}catch(n){return l.error("[TF_SDK:32] \u274C Failed to delete document",n),!1}};window.getAllDocuments=me;window.hasDocuments=te;function He(){return"2.0.
|
|
265
|
+
`);if(!window.__unviredSdkScriptsLoaded&&!window.__unviredSdkScriptsLoading){window.__unviredSdkScriptsLoading=!0,l.info("[TF_SDK:14] \u2705 Loading SDK scripts (jQuery, Formio, Recogito, LESS, components)...");let m=d=>{if(b){let C=b.querySelector(".sdk-loader-text");C&&(C.textContent=d)}};if(m("Loading Core Components..."),c[0]&&c[0].trim()){let d=document.createElement("script");d.textContent=c[0],d.setAttribute("data-unvired-script","jquery"),document.head.appendChild(d)}if(c[4]&&c[4].trim()){let d=document.createElement("script");d.textContent=c[4],d.setAttribute("data-unvired-script","choices"),document.head.appendChild(d)}if(m("Loading Formio Library..."),c[5]&&c[5].trim()){let d=document.createElement("script");d.textContent=c[5],d.setAttribute("data-unvired-script","formio"),document.head.appendChild(d),l.info("[TF_SDK:15] \u2705 Bundled Formio library injected.")}if(e.showComments){m("Loading Annotation Tools...");for(let d=1;d<=2;d++)if(c[d]&&c[d].trim()){let C=document.createElement("script");C.textContent=c[d],C.setAttribute("data-unvired-script",`recogito-${d}`),document.head.appendChild(C),await new Promise(A=>setTimeout(A,0))}}else l.info("[TF_SDK:16] \u2705 Skipping Recogito (comments disabled, optimized load)");if(m("Initializing Engine..."),c[3]&&c[3].trim()){let d=document.createElement("script");d.textContent=c[3],d.setAttribute("data-unvired-script","less"),document.head.appendChild(d)}window.form=window.form||{},window.platform=window.platform||{},window.ResizeObserver=window.ResizeObserver||ResizeObserver,typeof browserMD5File!="undefined"&&(window.form.BMF=new browserMD5File),window.less=window.less||{},typeof window.__Html5QrcodeLibrary__!="undefined"&&(window.html5QrCode=window.__Html5QrcodeLibrary__),typeof window.Html5QrcodeScanner=="undefined"&&(window.Html5QrcodeScanner=class{constructor(){l.warn("[TF_SDK:17] \u26A0\uFE0F Barcode library (Html5QrcodeScanner) is not loaded.")}render(){}clear(){}}),m("Initializing Components...");for(let d=6;d<c.length;d++){let C=c[d];if(C&&C.trim()){let A=document.createElement("script");A.textContent=C,A.setAttribute("data-unvired-script",`script-${d}`),document.head.appendChild(A),d%5===0&&await new Promise(V=>setTimeout(V,0))}}window.__unviredSdkScriptsLoaded=!0,window.__unviredSdkScriptsLoading=!1,l.info("[TF_SDK:18] \u2705 All SDK scripts injected successfully"),document.addEventListener("click",function(d){let C=document.getElementById("unvired-more-btn"),A=document.getElementById("moreTooltip");C&&A&&!C.contains(d.target)&&!A.contains(d.target)&&(A.style.display="none")})}else if(window.__unviredSdkScriptsLoading)window.__unviredSdkScriptsLoaded||(l.warn("[TF_SDK:19] \u26A0\uFE0F Scripts marked as loading but not yet loaded - waiting..."),window.__unviredSdkScriptsLoaded=!0,window.__unviredSdkScriptsLoading=!1);else{if(l.info("[TF_SDK:20] \u2705 SDK scripts already loaded \u2014 skipping injection"),typeof window.Formio=="undefined"){let m="ErrorCode : 005, Formio library not available even though scripts were loaded.";throw l.error("[TF_SDK:21] \u274C ",m),b&&b.classList.add("hidden"),s({type:"ERROR",errorMessage:m,data:{technicalError:new Error(m),formioPath:"bundled",timestamp:new Date().toISOString()}}),new Error(m)}l.info("[TF_SDK:22] \u2705 Formio verified (previously loaded)")}window.FORM_TEMPLATE=h,window.FORM_PREVIOUS_DATA=n,window.FORM_MODE=e.mode,window.FORM_COMMENTS_DATA=e.commentsData,window.FORM_VOB_ARR=e.vobArr,window.FORM_PLATFORM=e.platform,window.FORM_LANGUAGE=e.language,window.FORM_TRASLATIONS=e.translations,window.FORM_ENV=e.environmentVariable,window.FORM_THEME_DATA=e.themeData,window.FORM_USER_DATA=e.userData,window.FORM_USERS_LIST=e.usersList,window.FORM_CONTROL_DATA=e.controlData,window.FORM_PRIVATE_EXTERNAL=e.privateExternal,window.FORM_PERMISSION=e.permission,window.FORM_ATTACHMENT_FILE_KEYS=i,window.sendEventCallback=s,window.FORM_EVENTS={FORM_RENDER:"FORM_RENDER",SAVE:"FORM_SAVE",SUBMIT:"FORM_SUBMIT",SUBMIT_ERROR:"FORM_SUBMIT_ERROR",BACK_NAVIGATION:"FORM_BACK_NAVIGATION",ONCHANGE:"FORM_ONCHANGE",FORM_LOADED:"FORM_LOADED"};let v=r.querySelector("#form-back-btn"),E=r.querySelector("#unvired-more-btn");v&&(e.showBackButton?v.style.setProperty("display","flex","important"):v.style.setProperty("display","none","important")),E&&!e.showMoreButton&&E.style.setProperty("display","none","important"),window.__unviredFormsOptions=e,window.checkDocumentsVisibility(),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility(),e.platform==="web"?window.platform={isBrowser:!0,isAndroid:!1,iosPlatform:!1}:e.platform==="android"?window.platform={isBrowser:!1,isAndroid:!0,iosPlatform:!1}:e.platform==="ios"&&(window.platform={isBrowser:!1,isAndroid:!1,iosPlatform:!0});let O={};if(((oe=e.environmentVariable)==null?void 0:oe.length)>0)for(let m of e.environmentVariable)for(let d in m)O[d]=m[d];Object.keys(O).length>0&&(window.env=O);let S=r.querySelector("#sticky-header"),N=r.querySelector("#sticky-footer"),L=r.querySelector("#formio-wrapper"),H=r.querySelector("#comments-header");e.mode==="pdf"||e.mode==="print"?(r.classList.add(`${e.mode}-mode`),L&&L.classList.add(`${e.mode}-mode`),S&&(S.style.display="none"),N&&(N.style.display="none")):(S&&(S.style.display="flex"),N&&(N.style.display="flex")),H&&(H.style.display="none"),e.themeData&&Object.keys(e.themeData).length>0&&(window.FORM_THEME_DATA=e.themeData),e.language&&(window.FORMIO_LANGUAGE=e.language),e.translations&&(window.FORMIO_I18N=e.translations),e.userData&&(window.firstName=e.userData.firstName,window.lastName=e.userData.lastName,window.form=window.form||{},Object.assign(window.form,e.userData)),window.less=window.less||{},Object.assign(window.less,{async:!0,environment:"production",fileAsync:!1,onReady:!0,useFileCache:!0});let _=n;if(n&&(l.info("[TF_SDK:23] \u2705 Processing file IDs in submission data (fetching from IndexedDB)..."),_=await pe(n,s,i),l.info("[TF_SDK:24] \u2705 File IDs processed \u2014 handing off to form renderer")),b){let m=b.querySelector(".sdk-loader-text");m&&(m.textContent="Initializing Form...")}return typeof window.loadTRform!="function"?(l.info("[TF_SDK:25] \u2705 loadTRform not ready yet \u2014 waiting for web-turbo-formio.js to signal..."),await new Promise(m=>{let d=()=>{document.removeEventListener("LoadRNformReady",d),l.info("[TF_SDK:26] \u2705 loadTRform is now ready (LoadRNformReady event received)"),m()};document.addEventListener("LoadRNformReady",d),typeof window.loadTRform=="function"&&d()})):l.info("[TF_SDK:27] \u2705 loadTRform already available \u2014 invoking immediately"),l.info("[TF_SDK:28] \u2705 Handing off to loadTRform (web-turbo-formio.js)..."),await window.loadTRform(h,_,e.themeData,e.mode,e.language,e.translations,e.controlData,e.privateExternal,e.permission,i),Ce(),{sendAction:m=>{var d;m.type==="SET_IMAGE_DATA"&&((d=window.setImageData)==null||d.call(window,m.imageData,m.controlId,m.fileName))},destroy:()=>{r.innerHTML=""}}}window.closeDocumentsModal=function(){if(typeof $!="undefined"&&$.fn.modal)$("#documentsModal").modal("hide");else{let t=document.getElementById("documentsModal");t&&(t.style.display="none",t.classList.remove("active"))}};window.checkDocumentsVisibility=async function(){let t=document.getElementById("documentsOption"),n=document.getElementById("documentsDivider"),o=await te();t.style.display=o?"block":"none",n&&(n.style.display=o?"block":"none"),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()};window.insertAppDocument=async function(t){try{return await be(t),l.info("[TF_SDK:29] \u2705 Document inserted",{id:t==null?void 0:t.id}),await window.checkDocumentsVisibility(),!0}catch(n){return l.error("[TF_SDK:30] \u274C Failed to insert document",n),!1}};window.deleteAppDocument=async function(t){try{return await ge(t),l.info("[TF_SDK:31] \u2705 Document deleted",{id:t}),await window.checkDocumentsVisibility(),!0}catch(n){return l.error("[TF_SDK:32] \u274C Failed to delete document",n),!1}};window.getAllDocuments=me;window.hasDocuments=te;function He(){return"2.0.48"}function Se(t){let n=typeof t=="string"?document.getElementById(t):t;n||(n=document.querySelector(".tf-formio-sdk")||document.body);let o=n.querySelectorAll("table"),r=0,e=null;return o.forEach(i=>{let a=i.getBoundingClientRect().width;a>r&&(r=a,e=i)}),{maxWidth:r,widestTable:e}}window.getMaxTableWidth=Se;typeof window!="undefined"&&(window.TurboForms=window.TurboForms||{loadForm:ze,getBuildVersion:He,getMaxTableWidth:Se});export{He as getBuildVersion,Se as getMaxTableWidth,ze as loadForm};
|
package/dist/turboforms.html
CHANGED
|
@@ -42902,7 +42902,7 @@ window.CommentOnBack = CommentOnBack;
|
|
|
42902
42902
|
|
|
42903
42903
|
|
|
42904
42904
|
<div id="sticky-footer">
|
|
42905
|
-
<div class="build-version">SDK v2.0.
|
|
42905
|
+
<div class="build-version">SDK v2.0.48</div>
|
|
42906
42906
|
<div class="relative-position">
|
|
42907
42907
|
<button id="unvired-more-btn" class="ui button primary dataGrid-addRow" onclick="toggleTooltip()">
|
|
42908
42908
|
<i class="icon options"></i>
|
package/dist/turboforms.js
CHANGED
|
@@ -131,7 +131,7 @@ var TurboForms=(()=>{var Oe=Object.create;var q=Object.defineProperty;var Pe=Obj
|
|
|
131
131
|
|
|
132
132
|
/* === STYLE_SEPARATOR === */
|
|
133
133
|
|
|
134
|
-
.tf-formio-sdk table.table,.tf-formio-sdk table.datagrid-table,.tf-formio-sdk .table>:not(caption)>*>*{border:1px solid var(--tf-border-color)!important;margin-bottom:.5rem!important;font-weight:var(--tf-app-font-weight)!important}.tf-formio-sdk .formio-component-datagrid{border-radius:8px!important;overflow-x:auto!important;overflow-y:visible!important;width:100%!important}.tf-formio-sdk .formio-component-datagrid:has(.choices.is-open){overflow-x:visible!important;z-index:9999!important}.tf-formio-sdk table.table td,.tf-formio-sdk table.table th{font-weight:var(--tf-app-font-weight)!important}.tf-formio-sdk .table td .formio-component-signature{width:100%!important}.tf-formio-sdk .table-responsive{display:block!important;width:100%!important;overflow-x:auto!important;overflow-y:visible!important;-webkit-overflow-scrolling:touch;transition:all .2s ease}.tf-formio-sdk .table-responsive::-webkit-scrollbar{width:0px!important}.tf-formio-sdk .table-responsive:has(.choices.is-open){z-index:9999!important}.tf-formio-sdk .formio-component-datagrid .table-responsive:has(.choices.is-open){overflow-x:
|
|
134
|
+
.tf-formio-sdk table.table,.tf-formio-sdk table.datagrid-table,.tf-formio-sdk .table>:not(caption)>*>*{border:1px solid var(--tf-border-color)!important;margin-bottom:.5rem!important;font-weight:var(--tf-app-font-weight)!important}.tf-formio-sdk .formio-component-datagrid{border-radius:8px!important;overflow-x:auto!important;overflow-y:visible!important;width:100%!important}.tf-formio-sdk .formio-component-datagrid:has(.choices.is-open){overflow-x:visible!important;z-index:9999!important}.tf-formio-sdk table.table td,.tf-formio-sdk table.table th{font-weight:var(--tf-app-font-weight)!important}.tf-formio-sdk .table td .formio-component-signature{width:100%!important}.tf-formio-sdk .table-responsive{display:block!important;width:100%!important;overflow-x:auto!important;overflow-y:visible!important;-webkit-overflow-scrolling:touch;transition:all .2s ease}.tf-formio-sdk .table-responsive::-webkit-scrollbar{width:0px!important}.tf-formio-sdk .table-responsive:has(.choices.is-open){z-index:9999!important}.tf-formio-sdk .formio-component-datagrid .table-responsive:has(.choices.is-open){overflow-x:auto!important;overflow-y:auto!important}.tf-formio-sdk .table-responsive:not(.formio-component-datagrid .table-responsive):has(.choices.is-open){overflow-x:auto!important;overflow-y:visible!important}.tf-formio-sdk .table-responsive:has(.choices.is-open) thead{z-index:1!important;position:relative!important;overflow:visible!important}.tf-formio-sdk .table-responsive:has(.choices.is-open) tbody{overflow:visible!important}.tf-formio-sdk .table-responsive:has(.choices.is-open) table.table,.tf-formio-sdk .table-responsive:has(.choices.is-open) .table>:not(caption)>*>*,.tf-formio-sdk table.table:has(.choices.is-open),.tf-formio-sdk table.table:has(.choices.is-open) td,.tf-formio-sdk table.table:has(.choices.is-open) th,.tf-formio-sdk tr:has(.choices.is-open) td{border:1px solid var(--tf-border-color)!important;border-color:var(--tf-border-color)!important;visibility:visible!important;opacity:1!important}.tf-formio-sdk table.table:has(.choices.is-open){border-spacing:0!important}.tf-formio-sdk.formio-form table.table thead th,.tf-formio-sdk.formio-form table.table tbody td,.tf-formio-sdk.formio-form table.table tfoot td,.tf-formio-sdk .formio-component-datagrid table thead th,.tf-formio-sdk .formio-component-datagrid table tbody td,.tf-formio-sdk .formio-component-datagrid table tfoot td{padding:.5rem .75rem!important;vertical-align:top!important;border:1px solid var(--tf-border-color)!important;word-wrap:break-word!important;overflow:visible!important;font-size:var(--tf-app-font-size-base)!important;color:var(--tf-app-font-color)!important;line-height:1.2!important;border-radius:5px}.tf-formio-sdk .formio-component-datagrid table tbody td{border:1px solid var(--tf-border-color)!important}.tf-formio-sdk .formio-component-datagrid table tfoot td{border:none!important}.tf-formio-sdk .table-striped>tbody>tr:nth-of-type(odd)>*{color:var(--tf-app-font-color)!important;--bs-table-color-type: var(--tf-app-font-color) !important}.tf-formio-sdk .formio-component-datagrid table.datagrid-table thead th:last-child,.tf-formio-sdk .formio-component-datagrid table.datagrid-table tbody tr td:last-child,.tf-formio-sdk table td:has([ref=removeRow]),.tf-formio-sdk table td:has(.formio-button-remove-row),.tf-formio-sdk table th:has([ref=removeRow]),.tf-formio-sdk table th:has(.formio-button-remove-row){text-align:center!important;min-width:45px!important}@media (min-width: 769px){.tf-formio-sdk table td:has([ref=removeRow]),.tf-formio-sdk table td:has(.formio-button-remove-row),.tf-formio-sdk table th:has([ref=removeRow]),.tf-formio-sdk table th:has(.formio-button-remove-row){width:1%!important}}.tf-formio-sdk tr:has(.choices.is-open){z-index:100!important;position:relative!important}.tf-formio-sdk .formio-component-datagrid table tfoot tr td,.tf-formio-sdk .formio-form table tfoot tr td{text-align:left!important;padding-left:.75rem!important;background-color:transparent!important}@media (max-width: 768px){.tf-formio-sdk .table-responsive,.tf-formio-sdk .formio-component-table,.tf-formio-sdk .formio-component-datagrid,.tf-formio-sdk .formio-component-multiple{overflow:visible!important}.tf-formio-sdk .formio-form table.table thead,.tf-formio-sdk .formio-component-datagrid table thead,.tf-formio-sdk .formio-component-multiple table thead{display:none!important}.tf-formio-sdk .formio-form table.table,.tf-formio-sdk .formio-form tbody,.tf-formio-sdk .formio-form tr,.tf-formio-sdk .formio-form td,.tf-formio-sdk .formio-component table,.tf-formio-sdk .formio-component tbody,.tf-formio-sdk .formio-component tr,.tf-formio-sdk .formio-component td{display:block!important;width:100%!important;border-radius:10px}.tf-formio-sdk .formio-form tbody,.tf-formio-sdk .formio-form tr,.tf-formio-sdk .formio-component tbody,.tf-formio-sdk .formio-component tr{border-style:none!important}.tf-formio-sdk .formio-form tr,.tf-formio-sdk .formio-component-datagrid tr{border-radius:10px!important}.tf-formio-sdk .formio-form td,.tf-formio-sdk .formio-component-datagrid td{border:none!important;border-bottom:1px solid #f1f5f9!important;padding:.6rem .8rem!important;font-size:.8125rem!important}.tf-formio-sdk table td:has(>[ref=removeRow]),.tf-formio-sdk table td:has(>.formio-button-remove-row){text-align:center!important;display:flex!important;justify-content:center!important;align-items:center!important;padding:.8rem!important;width:100%!important}.tf-formio-sdk .formio-component-datagrid td[data-label]:before{content:attr(data-label);display:block;font-family:var(--tf-app-font-family)!important;font-weight:600;margin-bottom:.25rem;font-size:var(--tf-app-font-size-base)!important;color:var(--tf-app-font-color, #333);text-align:left}}.tf-formio-sdk .formio-component-datagrid .row [class*=col-]{min-width:60px!important}.tf-formio-sdk .formio-component-datagrid .row [class*=col-].formio-component-select,.tf-formio-sdk .formio-component-datagrid .row [class*=col-]:has([class*=formio-component-select]),.tf-formio-sdk .formio-component-datagrid .row [class*=col-]:has(.formio-component-select){min-width:50px!important}.tf-formio-sdk .formio-component-datagrid .col-form-label{max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}.tf-formio-sdk .formio-component-table table,.tf-formio-sdk .formio-component-datagrid table{width:100%!important;table-layout:auto!important}.tf-formio-sdk .formio-component-datagrid table th:not(:last-child),.tf-formio-sdk .formio-component-datagrid table td:not(:last-child){min-width:200px}.tf-formio-sdk .table td .formio-component{width:100%!important;max-width:100%!important}.tf-formio-sdk .table td label:not(.custom-control-label){max-width:100%!important;word-break:break-word!important;white-space:normal!important;line-height:1.1!important;font-size:.75rem!important;margin-bottom:2px!important;display:block!important}
|
|
135
135
|
|
|
136
136
|
/* === STYLE_SEPARATOR === */
|
|
137
137
|
|
|
@@ -199,7 +199,7 @@ var TurboForms=(()=>{var Oe=Object.create;var q=Object.defineProperty;var Pe=Obj
|
|
|
199
199
|
</div>
|
|
200
200
|
${(W=e.themeData)!=null&&W.isCard?"</div>":""}
|
|
201
201
|
<div id="sticky-footer" class="${e.showFooter===!1?"footer-hidden":""}">
|
|
202
|
-
<div class="build-version">SDK v2.0.
|
|
202
|
+
<div class="build-version">SDK v2.0.48</div>
|
|
203
203
|
|
|
204
204
|
<button class="footer-btn footer-btn-secondary" id="prevBtn" style="display:none" onclick="FormOnPrevious()">
|
|
205
205
|
<i class="bi bi-chevron-left"></i> Previous
|
|
@@ -262,4 +262,4 @@ var TurboForms=(()=>{var Oe=Object.create;var q=Object.defineProperty;var Pe=Obj
|
|
|
262
262
|
|
|
263
263
|
// === SCRIPT_SEPARATOR ===
|
|
264
264
|
|
|
265
|
-
`);if(!window.__unviredSdkScriptsLoaded&&!window.__unviredSdkScriptsLoading){window.__unviredSdkScriptsLoading=!0,l.info("[TF_SDK:14] \u2705 Loading SDK scripts (jQuery, Formio, Recogito, LESS, components)...");let m=d=>{if(b){let C=b.querySelector(".sdk-loader-text");C&&(C.textContent=d)}};if(m("Loading Core Components..."),c[0]&&c[0].trim()){let d=document.createElement("script");d.textContent=c[0],d.setAttribute("data-unvired-script","jquery"),document.head.appendChild(d)}if(c[4]&&c[4].trim()){let d=document.createElement("script");d.textContent=c[4],d.setAttribute("data-unvired-script","choices"),document.head.appendChild(d)}if(m("Loading Formio Library..."),c[5]&&c[5].trim()){let d=document.createElement("script");d.textContent=c[5],d.setAttribute("data-unvired-script","formio"),document.head.appendChild(d),l.info("[TF_SDK:15] \u2705 Bundled Formio library injected.")}if(e.showComments){m("Loading Annotation Tools...");for(let d=1;d<=2;d++)if(c[d]&&c[d].trim()){let C=document.createElement("script");C.textContent=c[d],C.setAttribute("data-unvired-script",`recogito-${d}`),document.head.appendChild(C),await new Promise(A=>setTimeout(A,0))}}else l.info("[TF_SDK:16] \u2705 Skipping Recogito (comments disabled, optimized load)");if(m("Initializing Engine..."),c[3]&&c[3].trim()){let d=document.createElement("script");d.textContent=c[3],d.setAttribute("data-unvired-script","less"),document.head.appendChild(d)}window.form=window.form||{},window.platform=window.platform||{},window.ResizeObserver=window.ResizeObserver||ResizeObserver,typeof browserMD5File!="undefined"&&(window.form.BMF=new browserMD5File),window.less=window.less||{},typeof window.__Html5QrcodeLibrary__!="undefined"&&(window.html5QrCode=window.__Html5QrcodeLibrary__),typeof window.Html5QrcodeScanner=="undefined"&&(window.Html5QrcodeScanner=class{constructor(){l.warn("[TF_SDK:17] \u26A0\uFE0F Barcode library (Html5QrcodeScanner) is not loaded.")}render(){}clear(){}}),m("Initializing Components...");for(let d=6;d<c.length;d++){let C=c[d];if(C&&C.trim()){let A=document.createElement("script");A.textContent=C,A.setAttribute("data-unvired-script",`script-${d}`),document.head.appendChild(A),d%5===0&&await new Promise(V=>setTimeout(V,0))}}window.__unviredSdkScriptsLoaded=!0,window.__unviredSdkScriptsLoading=!1,l.info("[TF_SDK:18] \u2705 All SDK scripts injected successfully"),document.addEventListener("click",function(d){let C=document.getElementById("unvired-more-btn"),A=document.getElementById("moreTooltip");C&&A&&!C.contains(d.target)&&!A.contains(d.target)&&(A.style.display="none")})}else if(window.__unviredSdkScriptsLoading)window.__unviredSdkScriptsLoaded||(l.warn("[TF_SDK:19] \u26A0\uFE0F Scripts marked as loading but not yet loaded - waiting..."),window.__unviredSdkScriptsLoaded=!0,window.__unviredSdkScriptsLoading=!1);else{if(l.info("[TF_SDK:20] \u2705 SDK scripts already loaded \u2014 skipping injection"),typeof window.Formio=="undefined"){let m="ErrorCode : 005, Formio library not available even though scripts were loaded.";throw l.error("[TF_SDK:21] \u274C ",m),b&&b.classList.add("hidden"),s({type:"ERROR",errorMessage:m,data:{technicalError:new Error(m),formioPath:"bundled",timestamp:new Date().toISOString()}}),new Error(m)}l.info("[TF_SDK:22] \u2705 Formio verified (previously loaded)")}window.FORM_TEMPLATE=h,window.FORM_PREVIOUS_DATA=n,window.FORM_MODE=e.mode,window.FORM_COMMENTS_DATA=e.commentsData,window.FORM_VOB_ARR=e.vobArr,window.FORM_PLATFORM=e.platform,window.FORM_LANGUAGE=e.language,window.FORM_TRASLATIONS=e.translations,window.FORM_ENV=e.environmentVariable,window.FORM_THEME_DATA=e.themeData,window.FORM_USER_DATA=e.userData,window.FORM_USERS_LIST=e.usersList,window.FORM_CONTROL_DATA=e.controlData,window.FORM_PRIVATE_EXTERNAL=e.privateExternal,window.FORM_PERMISSION=e.permission,window.FORM_ATTACHMENT_FILE_KEYS=i,window.sendEventCallback=s,window.FORM_EVENTS={FORM_RENDER:"FORM_RENDER",SAVE:"FORM_SAVE",SUBMIT:"FORM_SUBMIT",SUBMIT_ERROR:"FORM_SUBMIT_ERROR",BACK_NAVIGATION:"FORM_BACK_NAVIGATION",ONCHANGE:"FORM_ONCHANGE",FORM_LOADED:"FORM_LOADED"};let v=r.querySelector("#form-back-btn"),E=r.querySelector("#unvired-more-btn");v&&(e.showBackButton?v.style.setProperty("display","flex","important"):v.style.setProperty("display","none","important")),E&&!e.showMoreButton&&E.style.setProperty("display","none","important"),window.__unviredFormsOptions=e,window.checkDocumentsVisibility(),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility(),e.platform==="web"?window.platform={isBrowser:!0,isAndroid:!1,iosPlatform:!1}:e.platform==="android"?window.platform={isBrowser:!1,isAndroid:!0,iosPlatform:!1}:e.platform==="ios"&&(window.platform={isBrowser:!1,isAndroid:!1,iosPlatform:!0});let O={};if(((ie=e.environmentVariable)==null?void 0:ie.length)>0)for(let m of e.environmentVariable)for(let d in m)O[d]=m[d];Object.keys(O).length>0&&(window.env=O);let S=r.querySelector("#sticky-header"),N=r.querySelector("#sticky-footer"),L=r.querySelector("#formio-wrapper"),H=r.querySelector("#comments-header");e.mode==="pdf"||e.mode==="print"?(r.classList.add(`${e.mode}-mode`),L&&L.classList.add(`${e.mode}-mode`),S&&(S.style.display="none"),N&&(N.style.display="none")):(S&&(S.style.display="flex"),N&&(N.style.display="flex")),H&&(H.style.display="none"),e.themeData&&Object.keys(e.themeData).length>0&&(window.FORM_THEME_DATA=e.themeData),e.language&&(window.FORMIO_LANGUAGE=e.language),e.translations&&(window.FORMIO_I18N=e.translations),e.userData&&(window.firstName=e.userData.firstName,window.lastName=e.userData.lastName,window.form=window.form||{},Object.assign(window.form,e.userData)),window.less=window.less||{},Object.assign(window.less,{async:!0,environment:"production",fileAsync:!1,onReady:!0,useFileCache:!0});let _=n;if(n&&(l.info("[TF_SDK:23] \u2705 Processing file IDs in submission data (fetching from IndexedDB)..."),_=await me(n,s,i),l.info("[TF_SDK:24] \u2705 File IDs processed \u2014 handing off to form renderer")),b){let m=b.querySelector(".sdk-loader-text");m&&(m.textContent="Initializing Form...")}return typeof window.loadTRform!="function"?(l.info("[TF_SDK:25] \u2705 loadTRform not ready yet \u2014 waiting for web-turbo-formio.js to signal..."),await new Promise(m=>{let d=()=>{document.removeEventListener("LoadRNformReady",d),l.info("[TF_SDK:26] \u2705 loadTRform is now ready (LoadRNformReady event received)"),m()};document.addEventListener("LoadRNformReady",d),typeof window.loadTRform=="function"&&d()})):l.info("[TF_SDK:27] \u2705 loadTRform already available \u2014 invoking immediately"),l.info("[TF_SDK:28] \u2705 Handing off to loadTRform (web-turbo-formio.js)..."),await window.loadTRform(h,_,e.themeData,e.mode,e.language,e.translations,e.controlData,e.privateExternal,e.permission,i),ke(),{sendAction:m=>{var d;m.type==="SET_IMAGE_DATA"&&((d=window.setImageData)==null||d.call(window,m.imageData,m.controlId,m.fileName))},destroy:()=>{r.innerHTML=""}}}window.closeDocumentsModal=function(){if(typeof $!="undefined"&&$.fn.modal)$("#documentsModal").modal("hide");else{let t=document.getElementById("documentsModal");t&&(t.style.display="none",t.classList.remove("active"))}};window.checkDocumentsVisibility=async function(){let t=document.getElementById("documentsOption"),n=document.getElementById("documentsDivider"),o=await ne();t.style.display=o?"block":"none",n&&(n.style.display=o?"block":"none"),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()};window.insertAppDocument=async function(t){try{return await ve(t),l.info("[TF_SDK:29] \u2705 Document inserted",{id:t==null?void 0:t.id}),await window.checkDocumentsVisibility(),!0}catch(n){return l.error("[TF_SDK:30] \u274C Failed to insert document",n),!1}};window.deleteAppDocument=async function(t){try{return await ye(t),l.info("[TF_SDK:31] \u2705 Document deleted",{id:t}),await window.checkDocumentsVisibility(),!0}catch(n){return l.error("[TF_SDK:32] \u274C Failed to delete document",n),!1}};window.getAllDocuments=ge;window.hasDocuments=ne;function Ae(){return"2.0.
|
|
265
|
+
`);if(!window.__unviredSdkScriptsLoaded&&!window.__unviredSdkScriptsLoading){window.__unviredSdkScriptsLoading=!0,l.info("[TF_SDK:14] \u2705 Loading SDK scripts (jQuery, Formio, Recogito, LESS, components)...");let m=d=>{if(b){let C=b.querySelector(".sdk-loader-text");C&&(C.textContent=d)}};if(m("Loading Core Components..."),c[0]&&c[0].trim()){let d=document.createElement("script");d.textContent=c[0],d.setAttribute("data-unvired-script","jquery"),document.head.appendChild(d)}if(c[4]&&c[4].trim()){let d=document.createElement("script");d.textContent=c[4],d.setAttribute("data-unvired-script","choices"),document.head.appendChild(d)}if(m("Loading Formio Library..."),c[5]&&c[5].trim()){let d=document.createElement("script");d.textContent=c[5],d.setAttribute("data-unvired-script","formio"),document.head.appendChild(d),l.info("[TF_SDK:15] \u2705 Bundled Formio library injected.")}if(e.showComments){m("Loading Annotation Tools...");for(let d=1;d<=2;d++)if(c[d]&&c[d].trim()){let C=document.createElement("script");C.textContent=c[d],C.setAttribute("data-unvired-script",`recogito-${d}`),document.head.appendChild(C),await new Promise(A=>setTimeout(A,0))}}else l.info("[TF_SDK:16] \u2705 Skipping Recogito (comments disabled, optimized load)");if(m("Initializing Engine..."),c[3]&&c[3].trim()){let d=document.createElement("script");d.textContent=c[3],d.setAttribute("data-unvired-script","less"),document.head.appendChild(d)}window.form=window.form||{},window.platform=window.platform||{},window.ResizeObserver=window.ResizeObserver||ResizeObserver,typeof browserMD5File!="undefined"&&(window.form.BMF=new browserMD5File),window.less=window.less||{},typeof window.__Html5QrcodeLibrary__!="undefined"&&(window.html5QrCode=window.__Html5QrcodeLibrary__),typeof window.Html5QrcodeScanner=="undefined"&&(window.Html5QrcodeScanner=class{constructor(){l.warn("[TF_SDK:17] \u26A0\uFE0F Barcode library (Html5QrcodeScanner) is not loaded.")}render(){}clear(){}}),m("Initializing Components...");for(let d=6;d<c.length;d++){let C=c[d];if(C&&C.trim()){let A=document.createElement("script");A.textContent=C,A.setAttribute("data-unvired-script",`script-${d}`),document.head.appendChild(A),d%5===0&&await new Promise(V=>setTimeout(V,0))}}window.__unviredSdkScriptsLoaded=!0,window.__unviredSdkScriptsLoading=!1,l.info("[TF_SDK:18] \u2705 All SDK scripts injected successfully"),document.addEventListener("click",function(d){let C=document.getElementById("unvired-more-btn"),A=document.getElementById("moreTooltip");C&&A&&!C.contains(d.target)&&!A.contains(d.target)&&(A.style.display="none")})}else if(window.__unviredSdkScriptsLoading)window.__unviredSdkScriptsLoaded||(l.warn("[TF_SDK:19] \u26A0\uFE0F Scripts marked as loading but not yet loaded - waiting..."),window.__unviredSdkScriptsLoaded=!0,window.__unviredSdkScriptsLoading=!1);else{if(l.info("[TF_SDK:20] \u2705 SDK scripts already loaded \u2014 skipping injection"),typeof window.Formio=="undefined"){let m="ErrorCode : 005, Formio library not available even though scripts were loaded.";throw l.error("[TF_SDK:21] \u274C ",m),b&&b.classList.add("hidden"),s({type:"ERROR",errorMessage:m,data:{technicalError:new Error(m),formioPath:"bundled",timestamp:new Date().toISOString()}}),new Error(m)}l.info("[TF_SDK:22] \u2705 Formio verified (previously loaded)")}window.FORM_TEMPLATE=h,window.FORM_PREVIOUS_DATA=n,window.FORM_MODE=e.mode,window.FORM_COMMENTS_DATA=e.commentsData,window.FORM_VOB_ARR=e.vobArr,window.FORM_PLATFORM=e.platform,window.FORM_LANGUAGE=e.language,window.FORM_TRASLATIONS=e.translations,window.FORM_ENV=e.environmentVariable,window.FORM_THEME_DATA=e.themeData,window.FORM_USER_DATA=e.userData,window.FORM_USERS_LIST=e.usersList,window.FORM_CONTROL_DATA=e.controlData,window.FORM_PRIVATE_EXTERNAL=e.privateExternal,window.FORM_PERMISSION=e.permission,window.FORM_ATTACHMENT_FILE_KEYS=i,window.sendEventCallback=s,window.FORM_EVENTS={FORM_RENDER:"FORM_RENDER",SAVE:"FORM_SAVE",SUBMIT:"FORM_SUBMIT",SUBMIT_ERROR:"FORM_SUBMIT_ERROR",BACK_NAVIGATION:"FORM_BACK_NAVIGATION",ONCHANGE:"FORM_ONCHANGE",FORM_LOADED:"FORM_LOADED"};let v=r.querySelector("#form-back-btn"),E=r.querySelector("#unvired-more-btn");v&&(e.showBackButton?v.style.setProperty("display","flex","important"):v.style.setProperty("display","none","important")),E&&!e.showMoreButton&&E.style.setProperty("display","none","important"),window.__unviredFormsOptions=e,window.checkDocumentsVisibility(),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility(),e.platform==="web"?window.platform={isBrowser:!0,isAndroid:!1,iosPlatform:!1}:e.platform==="android"?window.platform={isBrowser:!1,isAndroid:!0,iosPlatform:!1}:e.platform==="ios"&&(window.platform={isBrowser:!1,isAndroid:!1,iosPlatform:!0});let O={};if(((ie=e.environmentVariable)==null?void 0:ie.length)>0)for(let m of e.environmentVariable)for(let d in m)O[d]=m[d];Object.keys(O).length>0&&(window.env=O);let S=r.querySelector("#sticky-header"),N=r.querySelector("#sticky-footer"),L=r.querySelector("#formio-wrapper"),H=r.querySelector("#comments-header");e.mode==="pdf"||e.mode==="print"?(r.classList.add(`${e.mode}-mode`),L&&L.classList.add(`${e.mode}-mode`),S&&(S.style.display="none"),N&&(N.style.display="none")):(S&&(S.style.display="flex"),N&&(N.style.display="flex")),H&&(H.style.display="none"),e.themeData&&Object.keys(e.themeData).length>0&&(window.FORM_THEME_DATA=e.themeData),e.language&&(window.FORMIO_LANGUAGE=e.language),e.translations&&(window.FORMIO_I18N=e.translations),e.userData&&(window.firstName=e.userData.firstName,window.lastName=e.userData.lastName,window.form=window.form||{},Object.assign(window.form,e.userData)),window.less=window.less||{},Object.assign(window.less,{async:!0,environment:"production",fileAsync:!1,onReady:!0,useFileCache:!0});let _=n;if(n&&(l.info("[TF_SDK:23] \u2705 Processing file IDs in submission data (fetching from IndexedDB)..."),_=await me(n,s,i),l.info("[TF_SDK:24] \u2705 File IDs processed \u2014 handing off to form renderer")),b){let m=b.querySelector(".sdk-loader-text");m&&(m.textContent="Initializing Form...")}return typeof window.loadTRform!="function"?(l.info("[TF_SDK:25] \u2705 loadTRform not ready yet \u2014 waiting for web-turbo-formio.js to signal..."),await new Promise(m=>{let d=()=>{document.removeEventListener("LoadRNformReady",d),l.info("[TF_SDK:26] \u2705 loadTRform is now ready (LoadRNformReady event received)"),m()};document.addEventListener("LoadRNformReady",d),typeof window.loadTRform=="function"&&d()})):l.info("[TF_SDK:27] \u2705 loadTRform already available \u2014 invoking immediately"),l.info("[TF_SDK:28] \u2705 Handing off to loadTRform (web-turbo-formio.js)..."),await window.loadTRform(h,_,e.themeData,e.mode,e.language,e.translations,e.controlData,e.privateExternal,e.permission,i),ke(),{sendAction:m=>{var d;m.type==="SET_IMAGE_DATA"&&((d=window.setImageData)==null||d.call(window,m.imageData,m.controlId,m.fileName))},destroy:()=>{r.innerHTML=""}}}window.closeDocumentsModal=function(){if(typeof $!="undefined"&&$.fn.modal)$("#documentsModal").modal("hide");else{let t=document.getElementById("documentsModal");t&&(t.style.display="none",t.classList.remove("active"))}};window.checkDocumentsVisibility=async function(){let t=document.getElementById("documentsOption"),n=document.getElementById("documentsDivider"),o=await ne();t.style.display=o?"block":"none",n&&(n.style.display=o?"block":"none"),typeof window.checkMoreButtonVisibility=="function"&&window.checkMoreButtonVisibility()};window.insertAppDocument=async function(t){try{return await ve(t),l.info("[TF_SDK:29] \u2705 Document inserted",{id:t==null?void 0:t.id}),await window.checkDocumentsVisibility(),!0}catch(n){return l.error("[TF_SDK:30] \u274C Failed to insert document",n),!1}};window.deleteAppDocument=async function(t){try{return await ye(t),l.info("[TF_SDK:31] \u2705 Document deleted",{id:t}),await window.checkDocumentsVisibility(),!0}catch(n){return l.error("[TF_SDK:32] \u274C Failed to delete document",n),!1}};window.getAllDocuments=ge;window.hasDocuments=ne;function Ae(){return"2.0.48"}function re(t){let n=typeof t=="string"?document.getElementById(t):t;n||(n=document.querySelector(".tf-formio-sdk")||document.body);let o=n.querySelectorAll("table"),r=0,e=null;return o.forEach(i=>{let a=i.getBoundingClientRect().width;a>r&&(r=a,e=i)}),{maxWidth:r,widestTable:e}}window.getMaxTableWidth=re;typeof window!="undefined"&&(window.TurboForms=window.TurboForms||{loadForm:Ee,getBuildVersion:Ae,getMaxTableWidth:re});return Fe(Ge);})();
|
package/package.json
CHANGED