@buildocsdev/sdk 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 +13 -0
- package/dist/buildocslib.esm-7H4WK2QM.js +1 -0
- package/dist/chunk-7RKPIXVG.js +1 -0
- package/dist/chunk-EK7ODJWE.js +1 -0
- package/dist/chunk-EXE2TZP4.js +1 -0
- package/dist/chunk-FRAOYRZD.js +1 -0
- package/dist/chunk-GLSA7ZBG.js +1 -0
- package/dist/chunk-KMT3KKZP.js +1 -0
- package/dist/chunk-LBMVBVXW.js +1 -0
- package/dist/chunk-LQXFE73I.js +2 -0
- package/dist/chunk-NOHQQSA7.js +2 -0
- package/dist/chunk-OPK746DI.js +4 -0
- package/dist/chunk-SDIZEEZP.js +1 -0
- package/dist/chunk-SYCZSSRF.js +1 -0
- package/dist/chunk-TO4AS5KE.js +2 -0
- package/dist/chunk-U4T4ACDE.js +0 -0
- package/dist/chunk-UB4UI4WT.js +14 -0
- package/dist/chunk-X2F7ACCC.js +4 -0
- package/dist/chunk-XUX4HB5C.js +11 -0
- package/dist/datatable-JUVSEKE5.js +1 -0
- package/dist/fileviewer-47WRW232.css +1 -0
- package/dist/fileviewer-CW5UNGEV.js +1 -0
- package/dist/form.css +1 -0
- package/dist/form.d.ts +14 -0
- package/dist/form.js +1 -0
- package/dist/formeditor-UE4HC4V2.js +1 -0
- package/dist/formeditor-WIH4NSK4.css +1 -0
- package/dist/formeditor.css +1 -0
- package/dist/formeditor.d.ts +16 -0
- package/dist/formeditor.js +1 -0
- package/dist/imageviewer-UDUGX2II.js +32 -0
- package/dist/index.d.ts +1068 -0
- package/dist/index.esm-BDKPT66B.js +1 -0
- package/dist/index.esm-EQZLQZWV.js +1 -0
- package/dist/index.esm-JIDMKFSE.js +1 -0
- package/dist/index.js +2 -0
- package/dist/loadingcomponent-XO7SMUYB.js +1 -0
- package/dist/mdaviewer-K7TPDII4.js +2 -0
- package/dist/metafile-esm.json +1 -0
- package/dist/nopreviewer-GNJFARBH.js +1 -0
- package/dist/pdfviewer-45IJHO46.js +2 -0
- package/dist/providers/theme.css +1 -0
- package/dist/style.d.ts +1 -0
- package/dist/tabulator-SQ554EQC.js +1 -0
- package/dist/tabulator-TN7JIT3J.css +1 -0
- package/dist/ui/css/fonts.css +1 -0
- package/dist/ui/css/form.css +1 -0
- package/dist/ui/css/formcanvas.css +1 -0
- package/dist/ui/css/formeditor.css +1 -0
- package/dist/ui/css/office.css +1 -0
- package/dist/ui/css/tabulator.css +1 -0
- package/dist/ui/img/form-grid.png +0 -0
- package/dist/videopreviewer-CADOHSNG.js +1 -0
- package/dist/xlsxviewer-FA53RTSZ.js +1 -0
- package/dist/xlsxviewer-REJCVNUX.css +1 -0
- package/img/form-grid.png +0 -0
- package/package.json +325 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1068 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import React__default, { ReactNode } from 'react';
|
|
3
|
+
import { FieldValues } from 'react-hook-form';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
import { CancelTokenSource } from 'axios';
|
|
6
|
+
|
|
7
|
+
type TAutoSave = {
|
|
8
|
+
pluginCode: string;
|
|
9
|
+
formCode: string;
|
|
10
|
+
guid: string;
|
|
11
|
+
projectGuid?: string;
|
|
12
|
+
pGuid?: string;
|
|
13
|
+
fieldName: string;
|
|
14
|
+
value: string;
|
|
15
|
+
tabId?: string;
|
|
16
|
+
widgetEvent: string;
|
|
17
|
+
widgetValue: string;
|
|
18
|
+
formData: Record<string, any> | {};
|
|
19
|
+
};
|
|
20
|
+
type TFormEvent = {
|
|
21
|
+
tabIndex?: number;
|
|
22
|
+
widgetName: string;
|
|
23
|
+
widgetValue?: string | [] | null;
|
|
24
|
+
widgetEvent?: string | null;
|
|
25
|
+
widgetContext?: string | null;
|
|
26
|
+
feCommand?: {} | null;
|
|
27
|
+
skipFormDataItem?: boolean;
|
|
28
|
+
autoSave?: TAutoSave;
|
|
29
|
+
};
|
|
30
|
+
type TWidgetContext = {
|
|
31
|
+
referer: string;
|
|
32
|
+
parentWidgetId: string | null;
|
|
33
|
+
};
|
|
34
|
+
type TRowItemResult = {
|
|
35
|
+
item: any;
|
|
36
|
+
component: any;
|
|
37
|
+
index: string;
|
|
38
|
+
path: [];
|
|
39
|
+
hasChildren: boolean;
|
|
40
|
+
};
|
|
41
|
+
type TSegmentItemResult = {
|
|
42
|
+
item: any;
|
|
43
|
+
index: number;
|
|
44
|
+
};
|
|
45
|
+
type WidgetItemResult = {
|
|
46
|
+
item: any;
|
|
47
|
+
index: number;
|
|
48
|
+
path: [];
|
|
49
|
+
count: number;
|
|
50
|
+
};
|
|
51
|
+
type THotReloadContext = {
|
|
52
|
+
maxAttempts: number;
|
|
53
|
+
pluginCode: string;
|
|
54
|
+
formCode: string;
|
|
55
|
+
guid?: string | null;
|
|
56
|
+
};
|
|
57
|
+
type TBuildPlugin = {
|
|
58
|
+
guid?: string | undefined;
|
|
59
|
+
maxattempts?: string | undefined;
|
|
60
|
+
plugincode: string | undefined;
|
|
61
|
+
referer?: string | undefined;
|
|
62
|
+
url?: string | undefined;
|
|
63
|
+
open?: boolean;
|
|
64
|
+
modalCloseCallBack?: Function;
|
|
65
|
+
redraw?: boolean | null;
|
|
66
|
+
};
|
|
67
|
+
type TCommandCollection = {
|
|
68
|
+
AfterRecordSave?: {
|
|
69
|
+
guid: string;
|
|
70
|
+
};
|
|
71
|
+
BuildPlugin?: TBuildPlugin;
|
|
72
|
+
CloseDisplayComponent?: {
|
|
73
|
+
componentName: string;
|
|
74
|
+
options?: object;
|
|
75
|
+
};
|
|
76
|
+
DisplayButtonLoader?: boolean;
|
|
77
|
+
DisplayComponent?: {
|
|
78
|
+
componentName: string;
|
|
79
|
+
options?: object;
|
|
80
|
+
};
|
|
81
|
+
DisplayErrorPage?: null;
|
|
82
|
+
ReplaceContextRecordGuid?: {
|
|
83
|
+
guid: string;
|
|
84
|
+
};
|
|
85
|
+
Cancel?: null;
|
|
86
|
+
CloseForm?: null;
|
|
87
|
+
FetchUserMenu?: {
|
|
88
|
+
projectGuid?: string | null;
|
|
89
|
+
};
|
|
90
|
+
FormValidationData?: Record<string, string>;
|
|
91
|
+
Messages?: [];
|
|
92
|
+
MoveToTab?: {
|
|
93
|
+
widgetName: string;
|
|
94
|
+
};
|
|
95
|
+
MoveToPreviousTab?: null;
|
|
96
|
+
OpenModal?: TModalWindow;
|
|
97
|
+
PreviewDocument?: TPreviewDocument;
|
|
98
|
+
Redirect?: {
|
|
99
|
+
context?: {
|
|
100
|
+
referer: string;
|
|
101
|
+
widgetName: string;
|
|
102
|
+
parentWidgetId: string;
|
|
103
|
+
} | null;
|
|
104
|
+
url: string;
|
|
105
|
+
};
|
|
106
|
+
RedrawScreen?: boolean;
|
|
107
|
+
RedrawFolders?: TFolderId;
|
|
108
|
+
SetActivePageData?: {
|
|
109
|
+
[key: string]: {
|
|
110
|
+
pageIndex: number;
|
|
111
|
+
pageSize: number;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
UpdateFieldAllowedValues?: object;
|
|
115
|
+
UpdateFormData?: object;
|
|
116
|
+
UpdateFormDataItem?: {
|
|
117
|
+
name: string;
|
|
118
|
+
value: object;
|
|
119
|
+
};
|
|
120
|
+
UpdateWidgetsState?: TWidgetsState;
|
|
121
|
+
HotReloadEnabled?: THotReloadContext;
|
|
122
|
+
Login?: FieldValues;
|
|
123
|
+
Logout?: null;
|
|
124
|
+
};
|
|
125
|
+
type TFolderId = {
|
|
126
|
+
folderId: string | null;
|
|
127
|
+
isRoot?: string;
|
|
128
|
+
captions: [];
|
|
129
|
+
};
|
|
130
|
+
type TMessage = {
|
|
131
|
+
code: string;
|
|
132
|
+
text: string;
|
|
133
|
+
};
|
|
134
|
+
type TDeleteRecordPrompt = {
|
|
135
|
+
delete: {
|
|
136
|
+
buttonAgree: string;
|
|
137
|
+
buttonDisagree: string;
|
|
138
|
+
dialogTitle: string;
|
|
139
|
+
dialogContent: string;
|
|
140
|
+
showDialog: boolean;
|
|
141
|
+
callBackFunc: any;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
type TParent = {
|
|
145
|
+
widgetName: string;
|
|
146
|
+
params: TOriginatorParams;
|
|
147
|
+
};
|
|
148
|
+
type TOriginator = {
|
|
149
|
+
params: TOriginatorParams;
|
|
150
|
+
};
|
|
151
|
+
type TOriginatorParams = {
|
|
152
|
+
pluginCode: string;
|
|
153
|
+
formCode: string;
|
|
154
|
+
guid?: string;
|
|
155
|
+
};
|
|
156
|
+
type TModalWindow = {
|
|
157
|
+
component?: React.ReactElement;
|
|
158
|
+
folderData?: TFolderData;
|
|
159
|
+
prefillData?: object;
|
|
160
|
+
id?: string | null;
|
|
161
|
+
parentId?: string | null;
|
|
162
|
+
pluginCode?: string;
|
|
163
|
+
formCode?: string;
|
|
164
|
+
guid?: string | null;
|
|
165
|
+
pGuid?: string | null | undefined;
|
|
166
|
+
onCloseModal?: Function | null;
|
|
167
|
+
originator?: TOriginator;
|
|
168
|
+
parent?: TParent;
|
|
169
|
+
isFormEditorMode?: boolean;
|
|
170
|
+
windowMode?: "fullWindow" | "halfWindow" | string | null;
|
|
171
|
+
};
|
|
172
|
+
type TMethodProvider = {
|
|
173
|
+
eventDispatcher: (args: TFormEvent) => Function;
|
|
174
|
+
findRowItem: (tabId: string, panelId: string, id: string) => TRowItemResult;
|
|
175
|
+
findSegmentItem: (tabId: string, panelId: string, rowId: string, segmentId: string) => TSegmentItemResult;
|
|
176
|
+
findWidgetItem: (widgetId: string) => WidgetItemResult;
|
|
177
|
+
getActiveTabIndex: (parentTabId: string, tabId: string) => number | null;
|
|
178
|
+
setActiveTabIndex: (parentTabId: string, tabId: string, panelIndex: number) => void;
|
|
179
|
+
setRedrawComponent: () => void;
|
|
180
|
+
execCommands: (command: TCommandCollection) => void;
|
|
181
|
+
};
|
|
182
|
+
type TPreviewDocument = {
|
|
183
|
+
context: {
|
|
184
|
+
pluginCode: string;
|
|
185
|
+
formCode: string;
|
|
186
|
+
guid?: string;
|
|
187
|
+
pGuid?: string;
|
|
188
|
+
} | null;
|
|
189
|
+
fileId: string;
|
|
190
|
+
data: string;
|
|
191
|
+
type: string;
|
|
192
|
+
fieldName: string;
|
|
193
|
+
};
|
|
194
|
+
type TWidgetsState = {
|
|
195
|
+
visibility: {
|
|
196
|
+
[key: string]: boolean;
|
|
197
|
+
};
|
|
198
|
+
readonly: {
|
|
199
|
+
[key: string]: boolean;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
type TFieldValues = Record<string, any>;
|
|
203
|
+
type TFolderData = {
|
|
204
|
+
id: string;
|
|
205
|
+
captions: string[];
|
|
206
|
+
label?: string;
|
|
207
|
+
addedFolderId?: string;
|
|
208
|
+
isRoot?: string;
|
|
209
|
+
};
|
|
210
|
+
type TRedrawFolders = {
|
|
211
|
+
folderId?: string;
|
|
212
|
+
};
|
|
213
|
+
type TContextType = {
|
|
214
|
+
activeWidgetId?: string;
|
|
215
|
+
command: TCommandCollection;
|
|
216
|
+
containerSetup?: any;
|
|
217
|
+
displayButtonLoader?: boolean;
|
|
218
|
+
doValidateForm: boolean;
|
|
219
|
+
enableEventHandlers: boolean;
|
|
220
|
+
fieldAllowedValues: any;
|
|
221
|
+
formData: Record<string, any>;
|
|
222
|
+
widgetRelatedData: string[];
|
|
223
|
+
widgetsState: TWidgetsState;
|
|
224
|
+
formDimension: {
|
|
225
|
+
width: number;
|
|
226
|
+
height: number;
|
|
227
|
+
};
|
|
228
|
+
formValidationData?: object;
|
|
229
|
+
isModal: boolean;
|
|
230
|
+
hasParentForm: boolean;
|
|
231
|
+
formLayout: string | null;
|
|
232
|
+
requiredFields?: Record<string, string>;
|
|
233
|
+
params: {
|
|
234
|
+
id: string | null;
|
|
235
|
+
parentId: string | null;
|
|
236
|
+
guid: string;
|
|
237
|
+
pGuid: string;
|
|
238
|
+
formCode: string;
|
|
239
|
+
pluginCode: string;
|
|
240
|
+
modal: boolean;
|
|
241
|
+
modalCloseFn: Function;
|
|
242
|
+
modalCloseAndOpenFn?: Function;
|
|
243
|
+
originator?: TOriginator;
|
|
244
|
+
parent?: TParent;
|
|
245
|
+
hasParentForm: boolean;
|
|
246
|
+
folderData: TFolderData;
|
|
247
|
+
prefillData?: object;
|
|
248
|
+
};
|
|
249
|
+
redrawComponent: boolean;
|
|
250
|
+
redrawFoldersComponent: boolean;
|
|
251
|
+
tabIndex?: number;
|
|
252
|
+
};
|
|
253
|
+
type TDataTableMeta = {
|
|
254
|
+
rowsPerPage: number;
|
|
255
|
+
pageIndex: number;
|
|
256
|
+
serverPaginationEnabled: boolean;
|
|
257
|
+
nextToken?: string;
|
|
258
|
+
paginationDirection?: "first" | "next" | "previous" | "last";
|
|
259
|
+
previousToken?: string;
|
|
260
|
+
rowCount: number;
|
|
261
|
+
qId?: string;
|
|
262
|
+
lastRequestLimit?: number;
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
interface IFormRequest {
|
|
266
|
+
pluginCode: string;
|
|
267
|
+
formCode: string;
|
|
268
|
+
guid?: string | null | undefined;
|
|
269
|
+
originator?: TOriginator;
|
|
270
|
+
pGuid?: string;
|
|
271
|
+
folderData?: TFolderData;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
type TDynProps = {
|
|
275
|
+
modalCloseFn: () => void;
|
|
276
|
+
modalCloseAndOpenFn?: (formData: IFormRequest) => void;
|
|
277
|
+
params?: any;
|
|
278
|
+
options?: any;
|
|
279
|
+
formData?: object;
|
|
280
|
+
execCommands: (command: TCommandCollection) => void;
|
|
281
|
+
};
|
|
282
|
+
interface DynamicComponentProps {
|
|
283
|
+
componentName: string;
|
|
284
|
+
options?: object;
|
|
285
|
+
params?: TDynProps;
|
|
286
|
+
fallback?: React__default.ReactNode;
|
|
287
|
+
}
|
|
288
|
+
declare const DynamicComponent: React__default.FC<DynamicComponentProps>;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Initialize dayjs with required plugins for buildocsformviewer
|
|
292
|
+
* Call this function in your parent project before using form components with date fields
|
|
293
|
+
*
|
|
294
|
+
* @example
|
|
295
|
+
* // In your parent project's index.tsx or App.tsx:
|
|
296
|
+
* import { initializeDayjs } from '@alexrussdev/buildocsformviewer/utils/dayjsConfig';
|
|
297
|
+
* import 'dayjs/locale/en';
|
|
298
|
+
* import 'dayjs/locale/de';
|
|
299
|
+
* import 'dayjs/locale/fr';
|
|
300
|
+
* // ... import other locales you need
|
|
301
|
+
*
|
|
302
|
+
* initializeDayjs();
|
|
303
|
+
*/
|
|
304
|
+
declare const initializeDayjs: () => void;
|
|
305
|
+
/**
|
|
306
|
+
* Check if dayjs has been initialized
|
|
307
|
+
*/
|
|
308
|
+
declare const isDayjsInitialized: () => boolean;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Dynamically loads a dayjs locale on demand
|
|
312
|
+
* @param locale - The locale code (e.g., 'en', 'de', 'fr')
|
|
313
|
+
* @returns Promise that resolves when locale is loaded
|
|
314
|
+
*/
|
|
315
|
+
declare const loadLocale: (locale: string) => Promise<boolean>;
|
|
316
|
+
/**
|
|
317
|
+
* Check if a locale has been loaded
|
|
318
|
+
* @param locale - The locale code to check
|
|
319
|
+
*/
|
|
320
|
+
declare const isLocaleLoaded: (locale: string) => boolean;
|
|
321
|
+
/**
|
|
322
|
+
* Preload multiple locales at once
|
|
323
|
+
* @param locales - Array of locale codes to preload
|
|
324
|
+
* @example
|
|
325
|
+
* preloadLocales(['de', 'fr', 'es']);
|
|
326
|
+
*/
|
|
327
|
+
declare const preloadLocales: (locales: string[]) => Promise<void>;
|
|
328
|
+
/**
|
|
329
|
+
* Get list of all loaded locales
|
|
330
|
+
*/
|
|
331
|
+
declare const getLoadedLocales: () => string[];
|
|
332
|
+
|
|
333
|
+
interface LanguageOption {
|
|
334
|
+
code: string;
|
|
335
|
+
label: string;
|
|
336
|
+
flag?: string;
|
|
337
|
+
}
|
|
338
|
+
interface LanguageSwitcherProps {
|
|
339
|
+
/** Custom list of available languages (defaults to all supported) */
|
|
340
|
+
languages?: LanguageOption[];
|
|
341
|
+
/** Show flags next to language names */
|
|
342
|
+
showFlags?: boolean;
|
|
343
|
+
/** Label for the select input */
|
|
344
|
+
label?: string;
|
|
345
|
+
/** Variant of the select input */
|
|
346
|
+
variant?: 'outlined' | 'filled' | 'standard';
|
|
347
|
+
/** Size of the select input */
|
|
348
|
+
size?: 'small' | 'medium';
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Language switcher component for testing different locales
|
|
352
|
+
* Changes both i18next language and preloads dayjs locales
|
|
353
|
+
*/
|
|
354
|
+
declare const LanguageSwitcher: React__default.FC<LanguageSwitcherProps>;
|
|
355
|
+
|
|
356
|
+
interface UploadArgs {
|
|
357
|
+
content: FormData;
|
|
358
|
+
onUploadProgress?: (e: ProgressEvent) => void;
|
|
359
|
+
cancelTokenSource?: CancelTokenSource;
|
|
360
|
+
headers?: Record<string, string>;
|
|
361
|
+
}
|
|
362
|
+
interface DataTableMeta {
|
|
363
|
+
serverPaginationEnabled: boolean;
|
|
364
|
+
rowsPerPage: number;
|
|
365
|
+
pageIndex: number;
|
|
366
|
+
nextToken?: string;
|
|
367
|
+
previousToken?: string;
|
|
368
|
+
paginationDirection?: string;
|
|
369
|
+
rowCount?: number;
|
|
370
|
+
qId?: string;
|
|
371
|
+
lastRequestLimit?: number;
|
|
372
|
+
oppositeDirection?: boolean;
|
|
373
|
+
}
|
|
374
|
+
type RunEventArgs = {
|
|
375
|
+
DataTableMeta?: DataTableMeta;
|
|
376
|
+
pluginCode: string;
|
|
377
|
+
formCode: string;
|
|
378
|
+
guid?: string;
|
|
379
|
+
projectGuid?: string;
|
|
380
|
+
pGuid?: string;
|
|
381
|
+
formData?: Record<string, any>;
|
|
382
|
+
widgetContext?: string | null | undefined;
|
|
383
|
+
widgetEvent: string | undefined;
|
|
384
|
+
widgetName?: string | null;
|
|
385
|
+
widgetValue?: string | null;
|
|
386
|
+
widgetsState?: TWidgetsState;
|
|
387
|
+
};
|
|
388
|
+
type TLoadForm = {
|
|
389
|
+
pluginCode: string;
|
|
390
|
+
formCode: string;
|
|
391
|
+
guid?: string;
|
|
392
|
+
originator?: {};
|
|
393
|
+
parent?: {};
|
|
394
|
+
isFormEditor?: boolean;
|
|
395
|
+
eventWidgetName?: string;
|
|
396
|
+
projectGuid?: string;
|
|
397
|
+
pGuid?: string;
|
|
398
|
+
previewMode?: any;
|
|
399
|
+
widgetContext?: string;
|
|
400
|
+
};
|
|
401
|
+
type TPingArgs = {
|
|
402
|
+
cmd: string;
|
|
403
|
+
};
|
|
404
|
+
interface FileEventArgs {
|
|
405
|
+
pluginCode: string;
|
|
406
|
+
formCode: string;
|
|
407
|
+
guid?: string;
|
|
408
|
+
projectGuid?: string;
|
|
409
|
+
pGuid?: string;
|
|
410
|
+
fieldName: string;
|
|
411
|
+
fileId: string;
|
|
412
|
+
}
|
|
413
|
+
interface FileMetaEventArgs extends FileEventArgs {
|
|
414
|
+
context: {
|
|
415
|
+
action: string;
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
interface DeleteFileEventArgs extends FileEventArgs {
|
|
419
|
+
}
|
|
420
|
+
interface DownloadFileEventArgs extends FileEventArgs {
|
|
421
|
+
}
|
|
422
|
+
interface GetLinkedFileMetaEventArgs extends FileMetaEventArgs {
|
|
423
|
+
}
|
|
424
|
+
interface ChunkRequestArgs extends DownloadFileEventArgs {
|
|
425
|
+
range: string;
|
|
426
|
+
}
|
|
427
|
+
interface ChunkPayload$1 {
|
|
428
|
+
payload: ArrayBuffer;
|
|
429
|
+
contentRange?: string;
|
|
430
|
+
etag?: string;
|
|
431
|
+
lastModified?: string;
|
|
432
|
+
headers: Record<string, string>;
|
|
433
|
+
}
|
|
434
|
+
type MenuItemType = {
|
|
435
|
+
title: string;
|
|
436
|
+
link?: string;
|
|
437
|
+
icon?: string;
|
|
438
|
+
subMenus?: MenuItemType[];
|
|
439
|
+
};
|
|
440
|
+
type TProjectItem = {
|
|
441
|
+
guid: string;
|
|
442
|
+
title: string;
|
|
443
|
+
desc?: string;
|
|
444
|
+
dashboardLink?: string;
|
|
445
|
+
settingsLink?: string;
|
|
446
|
+
icon?: string;
|
|
447
|
+
};
|
|
448
|
+
type TProjectMeta = {
|
|
449
|
+
pluginCode: string;
|
|
450
|
+
formCode: string;
|
|
451
|
+
};
|
|
452
|
+
type TProjectRights = {
|
|
453
|
+
adminRights: boolean;
|
|
454
|
+
};
|
|
455
|
+
type TUserMenuRequest = {
|
|
456
|
+
ProjectGuid: string | null;
|
|
457
|
+
pGuid?: string | null;
|
|
458
|
+
};
|
|
459
|
+
interface IUserMenu {
|
|
460
|
+
loadingUserMenu: boolean;
|
|
461
|
+
userMenuData: {
|
|
462
|
+
mainMenu: MenuItemType[];
|
|
463
|
+
loginMenu: MenuItemType[];
|
|
464
|
+
projectMenu: MenuItemType[];
|
|
465
|
+
};
|
|
466
|
+
userProjectData: {
|
|
467
|
+
meta: TProjectMeta;
|
|
468
|
+
data: TProjectItem[];
|
|
469
|
+
rights: TProjectRights;
|
|
470
|
+
prjEntryCode?: string;
|
|
471
|
+
};
|
|
472
|
+
redirectOnLoginUrl?: string;
|
|
473
|
+
error?: string | null | undefined;
|
|
474
|
+
}
|
|
475
|
+
interface IUser {
|
|
476
|
+
email: string;
|
|
477
|
+
fullName: string;
|
|
478
|
+
token: string;
|
|
479
|
+
roles?: string[];
|
|
480
|
+
userEnv?: IUserEnv[] | null;
|
|
481
|
+
currentCulture: string;
|
|
482
|
+
}
|
|
483
|
+
interface IUserEnv {
|
|
484
|
+
TenantUrl: string;
|
|
485
|
+
EnvUrl: string;
|
|
486
|
+
}
|
|
487
|
+
interface HostBridge {
|
|
488
|
+
apiConfig?: {
|
|
489
|
+
token?: string;
|
|
490
|
+
baseURL: string;
|
|
491
|
+
iframeMode?: boolean;
|
|
492
|
+
lang?: string;
|
|
493
|
+
};
|
|
494
|
+
appSettings?: {
|
|
495
|
+
MAX_DOWNLOAD_NOCHUNK_FILESIZE: number;
|
|
496
|
+
SCREEN_WIDTH_TABLET: number;
|
|
497
|
+
TOASTER_AUTOCLOSE: number;
|
|
498
|
+
};
|
|
499
|
+
viewPort: {
|
|
500
|
+
isMobileDevice: boolean;
|
|
501
|
+
width: number;
|
|
502
|
+
height: number;
|
|
503
|
+
};
|
|
504
|
+
runFormEvent: (args: RunEventArgs) => Promise<any>;
|
|
505
|
+
runFormUploadFiles: (args: UploadArgs) => Promise<any>;
|
|
506
|
+
runFormDeleteFileEvent: (args: DeleteFileEventArgs) => Promise<any>;
|
|
507
|
+
runFormDownloadFileEvent: (args: DownloadFileEventArgs) => Promise<Blob>;
|
|
508
|
+
runFormGetLinkedFileEvent: (args: GetLinkedFileMetaEventArgs) => Promise<any>;
|
|
509
|
+
runFormGetLinkedFileMetaEvent: (args: GetLinkedFileMetaEventArgs) => Promise<any>;
|
|
510
|
+
runFormGetLinkedFileByChunks: (args: ChunkRequestArgs) => Promise<ChunkPayload$1>;
|
|
511
|
+
runFormGetPresignedUrl: (args: FileMetaEventArgs) => Promise<any>;
|
|
512
|
+
runFormGetMdaUrn?: (args: FileMetaEventArgs) => Promise<any>;
|
|
513
|
+
runServerPingEvent?: (args: TPingArgs) => Promise<any>;
|
|
514
|
+
runLoadFormEvent: (args: TLoadForm) => Promise<any>;
|
|
515
|
+
fetchUserMenu?: (args: TUserMenuRequest) => Promise<IUserMenu>;
|
|
516
|
+
signInUser?: (args: TFieldValues) => Promise<IUser>;
|
|
517
|
+
signOut?: () => void;
|
|
518
|
+
loadForm?: (args: any) => Promise<any>;
|
|
519
|
+
saveForm?: (args: any) => Promise<any>;
|
|
520
|
+
loadFields?: (args: any) => Promise<any>;
|
|
521
|
+
buildPlugin?: (args: any) => Promise<any>;
|
|
522
|
+
ping?: (args: any) => Promise<any>;
|
|
523
|
+
}
|
|
524
|
+
declare function HostBridgeProvider({ value, children }: Readonly<{
|
|
525
|
+
value: HostBridge;
|
|
526
|
+
children: React__default.ReactNode;
|
|
527
|
+
}>): react_jsx_runtime.JSX.Element;
|
|
528
|
+
declare function useHostBridgeProvider(): HostBridge;
|
|
529
|
+
|
|
530
|
+
interface UserDialogProps {
|
|
531
|
+
buttonAgree: string;
|
|
532
|
+
buttonDisagree: string;
|
|
533
|
+
dialogTitle: string;
|
|
534
|
+
dialogContent: string;
|
|
535
|
+
handleDialogClose: (result: boolean) => void;
|
|
536
|
+
showDialog: boolean;
|
|
537
|
+
}
|
|
538
|
+
type UserDialogComponent = React__default.ComponentType<UserDialogProps>;
|
|
539
|
+
interface UiComponents {
|
|
540
|
+
UserDialog: UserDialogComponent;
|
|
541
|
+
}
|
|
542
|
+
declare function UiComponentsProvider({ value, children }: {
|
|
543
|
+
value: UiComponents;
|
|
544
|
+
children: React__default.ReactNode;
|
|
545
|
+
}): react_jsx_runtime.JSX.Element;
|
|
546
|
+
declare function useUiComponents(): UiComponents;
|
|
547
|
+
|
|
548
|
+
declare const HostUserDialog: React__default.NamedExoticComponent<UserDialogProps>;
|
|
549
|
+
|
|
550
|
+
interface ToastMessageProps {
|
|
551
|
+
msg: string;
|
|
552
|
+
toastID?: string | number;
|
|
553
|
+
clearQueue?: boolean;
|
|
554
|
+
hideProgressBar?: boolean;
|
|
555
|
+
}
|
|
556
|
+
type ToastFn = (p: ToastMessageProps) => void;
|
|
557
|
+
interface ToastApi {
|
|
558
|
+
warn: ToastFn;
|
|
559
|
+
success: ToastFn;
|
|
560
|
+
info: ToastFn;
|
|
561
|
+
error: ToastFn;
|
|
562
|
+
dismissAll?: () => void;
|
|
563
|
+
}
|
|
564
|
+
declare const ToastFnsProvider: React$1.Provider<ToastApi>;
|
|
565
|
+
declare function useToast(): ToastApi;
|
|
566
|
+
declare function useWarningMessage(): ToastFn;
|
|
567
|
+
declare function useSuccessMessage(): ToastFn;
|
|
568
|
+
declare function useInfoMessage(): ToastFn;
|
|
569
|
+
declare function useErrorMessage(): ToastFn;
|
|
570
|
+
|
|
571
|
+
declare function ErrorMessage({ toastID, msg, clearQueue, hideProgressBar, }: ToastMessageProps): void;
|
|
572
|
+
declare function InfoMessage({ toastID, msg, clearQueue, hideProgressBar, }: ToastMessageProps): void;
|
|
573
|
+
declare function SuccessMessage({ toastID, msg, clearQueue, hideProgressBar, }: ToastMessageProps): void;
|
|
574
|
+
declare function WarningMessage({ toastID, msg, clearQueue, hideProgressBar, }: ToastMessageProps): void;
|
|
575
|
+
declare const ToastNotification: React__default.FC;
|
|
576
|
+
|
|
577
|
+
interface FormParams {
|
|
578
|
+
pluginCode: string;
|
|
579
|
+
formCode: string;
|
|
580
|
+
guid?: string;
|
|
581
|
+
pGuid?: string;
|
|
582
|
+
[k: string]: any;
|
|
583
|
+
}
|
|
584
|
+
interface FormLayoutProps {
|
|
585
|
+
children: React__default.ReactNode;
|
|
586
|
+
formlayout: string | null;
|
|
587
|
+
params: FormParams;
|
|
588
|
+
onFolderSelected: Function;
|
|
589
|
+
onFolderAdded: Function;
|
|
590
|
+
redrawComponent: boolean;
|
|
591
|
+
eventDispatcher?: (event: any) => void;
|
|
592
|
+
formData: object;
|
|
593
|
+
execCommands: (command: TCommandCollection) => void;
|
|
594
|
+
}
|
|
595
|
+
type FormLayoutComponent = React__default.ComponentType<FormLayoutProps>;
|
|
596
|
+
declare const FormLayoutProviderBridge: React__default.Provider<FormLayoutComponent>;
|
|
597
|
+
declare function useFormLayoutComponent(): FormLayoutComponent;
|
|
598
|
+
|
|
599
|
+
/** A dynamically imported module that exposes a default React component */
|
|
600
|
+
type LoadedModule = {
|
|
601
|
+
default: React__default.ComponentType<any>;
|
|
602
|
+
};
|
|
603
|
+
/** Loader function that resolves a component module by name */
|
|
604
|
+
type ComponentLoader = (name: string) => Promise<LoadedModule>;
|
|
605
|
+
/** Optional map of known components to importers (host/package/remote) */
|
|
606
|
+
type Registry = Record<string, () => Promise<LoadedModule>>;
|
|
607
|
+
declare const DynamicComponentLoaderProvider: React__default.Provider<ComponentLoader>;
|
|
608
|
+
declare function useComponentLoader(): ComponentLoader;
|
|
609
|
+
type CreateLoaderOptions = {
|
|
610
|
+
/** Time-to-live for cache entries in ms (default: Infinity = never expire) */
|
|
611
|
+
ttl?: number;
|
|
612
|
+
/** Called when a load fails (centralized logging) */
|
|
613
|
+
onError?: (name: string, error: unknown) => void;
|
|
614
|
+
};
|
|
615
|
+
/**
|
|
616
|
+
* Factory: create a cached loader from a registry and optional fallback importer.
|
|
617
|
+
* - registry[name] wins; fallback is used only if not in registry.
|
|
618
|
+
* - fallback receives the name (handy for templated paths).
|
|
619
|
+
*/
|
|
620
|
+
declare function createCachedComponentLoader(registry: Registry, fallback?: (name: string) => Promise<LoadedModule>, opts?: CreateLoaderOptions): ComponentLoader & {
|
|
621
|
+
preload: (name: string) => Promise<LoadedModule | undefined>;
|
|
622
|
+
warm: (names: string[]) => Promise<undefined>;
|
|
623
|
+
evict: (name: string) => undefined;
|
|
624
|
+
clear: () => undefined;
|
|
625
|
+
};
|
|
626
|
+
|
|
627
|
+
interface ApiConfig {
|
|
628
|
+
token?: string;
|
|
629
|
+
/** Separate token for form events, file uploads, and other consumer-facing operations.
|
|
630
|
+
* When set, event/file methods use this token while form-definition loading uses `token`.
|
|
631
|
+
* Falls back to `token` if not provided. */
|
|
632
|
+
eventToken?: string;
|
|
633
|
+
lang?: string;
|
|
634
|
+
baseURL?: string;
|
|
635
|
+
iframeMode?: boolean;
|
|
636
|
+
}
|
|
637
|
+
declare function useApiConfig(): ApiConfig;
|
|
638
|
+
interface ApiConfigProviderProps {
|
|
639
|
+
readonly token?: string;
|
|
640
|
+
readonly eventToken?: string;
|
|
641
|
+
readonly lang?: string;
|
|
642
|
+
readonly baseURL?: string;
|
|
643
|
+
readonly iframeMode?: boolean;
|
|
644
|
+
readonly children: React__default.ReactNode;
|
|
645
|
+
}
|
|
646
|
+
declare function ApiConfigProvider({ token, eventToken, lang, baseURL, iframeMode, children }: ApiConfigProviderProps): react_jsx_runtime.JSX.Element;
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* Generic persistent state store for widgets.
|
|
650
|
+
* Allows any widget to store and retrieve state by widget name.
|
|
651
|
+
* State persists across component remounts as long as the provider stays mounted.
|
|
652
|
+
*/
|
|
653
|
+
type WidgetState = Record<string, any>;
|
|
654
|
+
interface PersistentStateContextValue {
|
|
655
|
+
getState: <T = any>(widgetName: string, key: string, defaultValue?: T) => T;
|
|
656
|
+
setState: <T = any>(widgetName: string, key: string, value: T) => void;
|
|
657
|
+
resetState: (widgetName: string) => void;
|
|
658
|
+
getWidgetState: <T extends WidgetState = WidgetState>(widgetName: string) => T | undefined;
|
|
659
|
+
setWidgetState: <T extends WidgetState = WidgetState>(widgetName: string, state: T) => void;
|
|
660
|
+
pagination: {
|
|
661
|
+
getPageIndex: (widgetName: string) => number;
|
|
662
|
+
getPageSize: (widgetName: string, defaultSize?: number) => number;
|
|
663
|
+
setPageIndex: (widgetName: string, index: number) => void;
|
|
664
|
+
setPageSize: (widgetName: string, size: number) => void;
|
|
665
|
+
getLastEvaluatedKey: (widgetName: string, pageIndex: number) => string | null;
|
|
666
|
+
setLastEvaluatedKey: (widgetName: string, pageIndex: number, key: string | null) => void;
|
|
667
|
+
reset: (widgetName: string, initialPageSize?: number) => void;
|
|
668
|
+
};
|
|
669
|
+
}
|
|
670
|
+
declare function PersistentStateProvider({ children }: {
|
|
671
|
+
children: React__default.ReactNode;
|
|
672
|
+
}): react_jsx_runtime.JSX.Element;
|
|
673
|
+
/**
|
|
674
|
+
* Hook to access the persistent state store.
|
|
675
|
+
* Must be used within a PersistentStateProvider.
|
|
676
|
+
*/
|
|
677
|
+
declare function usePersistentState(): PersistentStateContextValue;
|
|
678
|
+
/**
|
|
679
|
+
* Hook to get/set state for a specific widget.
|
|
680
|
+
* Convenience wrapper around usePersistentState for a single widget.
|
|
681
|
+
*/
|
|
682
|
+
declare function useWidgetPersistentState<T extends WidgetState = WidgetState>(widgetName: string): {
|
|
683
|
+
get: <V = any>(key: string, defaultValue?: V | undefined) => V;
|
|
684
|
+
set: <V_1 = any>(key: string, value: V_1) => void;
|
|
685
|
+
reset: () => void;
|
|
686
|
+
getAll: () => T | undefined;
|
|
687
|
+
setAll: (state: T) => void;
|
|
688
|
+
};
|
|
689
|
+
/**
|
|
690
|
+
* Hook specifically for datatable pagination state.
|
|
691
|
+
* Convenience wrapper for pagination operations.
|
|
692
|
+
*/
|
|
693
|
+
declare function useDatatablePagination(widgetName: string, defaultPageSize?: number): {
|
|
694
|
+
pageIndex: number;
|
|
695
|
+
pageSize: number;
|
|
696
|
+
setPageIndex: (index: number) => void;
|
|
697
|
+
setPageSize: (size: number) => void;
|
|
698
|
+
getLastEvaluatedKey: (pageIndex: number) => string | null;
|
|
699
|
+
setLastEvaluatedKey: (pageIndex: number, key: string | null) => void;
|
|
700
|
+
reset: (initialPageSize?: number) => void;
|
|
701
|
+
};
|
|
702
|
+
|
|
703
|
+
interface FormThemeProviderProps {
|
|
704
|
+
readonly children: React__default.ReactNode;
|
|
705
|
+
readonly enabled?: boolean;
|
|
706
|
+
}
|
|
707
|
+
declare function FormThemeProvider({ children, enabled, }: FormThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
708
|
+
|
|
709
|
+
type IModalState = {
|
|
710
|
+
pluginCode: string;
|
|
711
|
+
formCode: string;
|
|
712
|
+
guid: string | null;
|
|
713
|
+
};
|
|
714
|
+
type ICurrentModalContext = [IModalState, React__default.Dispatch<React__default.SetStateAction<IModalState>>];
|
|
715
|
+
declare const ModalContext: React__default.Context<ICurrentModalContext>;
|
|
716
|
+
declare const ModalProvider: ({ children }: {
|
|
717
|
+
children: React__default.ReactNode;
|
|
718
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
719
|
+
|
|
720
|
+
declare const ViewportProvider: ({ children }: {
|
|
721
|
+
children: React__default.ReactNode;
|
|
722
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
723
|
+
declare const useViewport: () => {
|
|
724
|
+
width: number;
|
|
725
|
+
height: number;
|
|
726
|
+
isMobileDevice: boolean;
|
|
727
|
+
};
|
|
728
|
+
|
|
729
|
+
interface ThemeConfig {
|
|
730
|
+
palette: {
|
|
731
|
+
primary: {
|
|
732
|
+
main: string;
|
|
733
|
+
dark: string;
|
|
734
|
+
light: string;
|
|
735
|
+
};
|
|
736
|
+
secondary: {
|
|
737
|
+
main: string;
|
|
738
|
+
dark: string;
|
|
739
|
+
};
|
|
740
|
+
background: {
|
|
741
|
+
default: string;
|
|
742
|
+
paper: string;
|
|
743
|
+
};
|
|
744
|
+
text: {
|
|
745
|
+
primary: string;
|
|
746
|
+
secondary: string;
|
|
747
|
+
};
|
|
748
|
+
};
|
|
749
|
+
customColors: {
|
|
750
|
+
elBgClass: string;
|
|
751
|
+
elBorderClass: string;
|
|
752
|
+
elTextClass: string;
|
|
753
|
+
disabledElBgClass: string;
|
|
754
|
+
disabledElBorderClass: string;
|
|
755
|
+
disabledElTextClass: string;
|
|
756
|
+
};
|
|
757
|
+
typography: {
|
|
758
|
+
fontFamily: string;
|
|
759
|
+
};
|
|
760
|
+
}
|
|
761
|
+
declare const fetchProjectTheme: (baseURL: string, token: string) => Promise<ThemeConfig | null>;
|
|
762
|
+
declare const applyThemeToDom: (theme: ThemeConfig) => void;
|
|
763
|
+
declare const removeThemeFromDom: () => void;
|
|
764
|
+
|
|
765
|
+
interface ChunkPayload {
|
|
766
|
+
payload: ArrayBuffer;
|
|
767
|
+
contentRange?: string;
|
|
768
|
+
etag?: string;
|
|
769
|
+
lastModified?: string;
|
|
770
|
+
headers: Record<string, string>;
|
|
771
|
+
}
|
|
772
|
+
type TFile = {
|
|
773
|
+
pluginCode: string;
|
|
774
|
+
formCode: string;
|
|
775
|
+
guid?: string;
|
|
776
|
+
projectGuid?: string;
|
|
777
|
+
fieldName: string;
|
|
778
|
+
fileId: string;
|
|
779
|
+
};
|
|
780
|
+
type TGetLinkedFileMetaEvent = TFile & {
|
|
781
|
+
context: {
|
|
782
|
+
action: string;
|
|
783
|
+
};
|
|
784
|
+
};
|
|
785
|
+
type TGetFileByChunks = TFile & {
|
|
786
|
+
range: string;
|
|
787
|
+
};
|
|
788
|
+
type TGetPresignedUrlEvent = TFile & {
|
|
789
|
+
context: {
|
|
790
|
+
action: string;
|
|
791
|
+
};
|
|
792
|
+
};
|
|
793
|
+
declare function useBuildocsApi(customApiUrl?: string, tokenOverride?: string, langOverride?: string): {
|
|
794
|
+
fetchFormDefinitionWithMeta: (formId: string, data?: object) => Promise<{
|
|
795
|
+
type: string;
|
|
796
|
+
payload: any;
|
|
797
|
+
meta: {
|
|
798
|
+
requestStatus: string;
|
|
799
|
+
};
|
|
800
|
+
error?: undefined;
|
|
801
|
+
} | {
|
|
802
|
+
type: string;
|
|
803
|
+
payload: undefined;
|
|
804
|
+
error: any;
|
|
805
|
+
meta: {
|
|
806
|
+
requestStatus: string;
|
|
807
|
+
};
|
|
808
|
+
}>;
|
|
809
|
+
fetchFormDefinitionApi: (formId: string, data?: object) => Promise<any>;
|
|
810
|
+
uploadFiles: (params: {
|
|
811
|
+
content: FormData;
|
|
812
|
+
onUploadProgress?: Function;
|
|
813
|
+
cancelTokenSource?: CancelTokenSource;
|
|
814
|
+
}, customPath?: string) => Promise<{
|
|
815
|
+
type: string;
|
|
816
|
+
payload: any;
|
|
817
|
+
meta: {
|
|
818
|
+
requestStatus: string;
|
|
819
|
+
};
|
|
820
|
+
error?: undefined;
|
|
821
|
+
} | {
|
|
822
|
+
type: string;
|
|
823
|
+
payload: undefined;
|
|
824
|
+
error: any;
|
|
825
|
+
meta: {
|
|
826
|
+
requestStatus: string;
|
|
827
|
+
};
|
|
828
|
+
}>;
|
|
829
|
+
deleteFile: (payload: TFile, customPath?: string) => Promise<{
|
|
830
|
+
type: string;
|
|
831
|
+
payload: any;
|
|
832
|
+
meta: {
|
|
833
|
+
requestStatus: string;
|
|
834
|
+
};
|
|
835
|
+
error?: undefined;
|
|
836
|
+
} | {
|
|
837
|
+
type: string;
|
|
838
|
+
payload: undefined;
|
|
839
|
+
error: any;
|
|
840
|
+
meta: {
|
|
841
|
+
requestStatus: string;
|
|
842
|
+
};
|
|
843
|
+
}>;
|
|
844
|
+
getLinkedFile: (payload: TGetLinkedFileMetaEvent, customPath?: string) => Promise<{
|
|
845
|
+
type: string;
|
|
846
|
+
payload: any;
|
|
847
|
+
meta: {
|
|
848
|
+
requestStatus: string;
|
|
849
|
+
};
|
|
850
|
+
error?: undefined;
|
|
851
|
+
} | {
|
|
852
|
+
type: string;
|
|
853
|
+
payload: undefined;
|
|
854
|
+
error: any;
|
|
855
|
+
meta: {
|
|
856
|
+
requestStatus: string;
|
|
857
|
+
};
|
|
858
|
+
}>;
|
|
859
|
+
getLinkedFileByChunks: (payload: TGetFileByChunks, customPath?: string) => Promise<ChunkPayload>;
|
|
860
|
+
getPresignedUrl: (payload: TGetPresignedUrlEvent, customPath?: string) => Promise<{
|
|
861
|
+
type: string;
|
|
862
|
+
payload: any;
|
|
863
|
+
meta: {
|
|
864
|
+
requestStatus: string;
|
|
865
|
+
};
|
|
866
|
+
error?: undefined;
|
|
867
|
+
} | {
|
|
868
|
+
type: string;
|
|
869
|
+
payload: undefined;
|
|
870
|
+
error: any;
|
|
871
|
+
meta: {
|
|
872
|
+
requestStatus: string;
|
|
873
|
+
};
|
|
874
|
+
}>;
|
|
875
|
+
downloadFile: (payload: TFile, customPath?: string) => Promise<any>;
|
|
876
|
+
getLinkedFileMetaEvent: (payload: TGetLinkedFileMetaEvent, customPath?: string) => Promise<{
|
|
877
|
+
type: string;
|
|
878
|
+
payload: any;
|
|
879
|
+
meta: {
|
|
880
|
+
requestStatus: string;
|
|
881
|
+
};
|
|
882
|
+
error?: undefined;
|
|
883
|
+
} | {
|
|
884
|
+
type: string;
|
|
885
|
+
payload: undefined;
|
|
886
|
+
error: any;
|
|
887
|
+
meta: {
|
|
888
|
+
requestStatus: string;
|
|
889
|
+
};
|
|
890
|
+
}>;
|
|
891
|
+
checkFormAccess: (formId: string) => Promise<any>;
|
|
892
|
+
registerFormSubmitEvent: (formId: string) => Promise<any>;
|
|
893
|
+
submitForm: (formId: string, data: Record<string, any>, customPath?: string) => Promise<{
|
|
894
|
+
type: string;
|
|
895
|
+
payload: any;
|
|
896
|
+
meta: {
|
|
897
|
+
requestStatus: string;
|
|
898
|
+
};
|
|
899
|
+
error?: undefined;
|
|
900
|
+
} | {
|
|
901
|
+
type: string;
|
|
902
|
+
payload: undefined;
|
|
903
|
+
error: any;
|
|
904
|
+
meta: {
|
|
905
|
+
requestStatus: string;
|
|
906
|
+
};
|
|
907
|
+
}>;
|
|
908
|
+
runEvent: (payload: RunEventArgs, customPath?: string) => Promise<{
|
|
909
|
+
type: string;
|
|
910
|
+
payload: any;
|
|
911
|
+
meta: {
|
|
912
|
+
requestStatus: string;
|
|
913
|
+
};
|
|
914
|
+
error?: undefined;
|
|
915
|
+
} | {
|
|
916
|
+
type: string;
|
|
917
|
+
payload: undefined;
|
|
918
|
+
error: any;
|
|
919
|
+
meta: {
|
|
920
|
+
requestStatus: string;
|
|
921
|
+
};
|
|
922
|
+
}>;
|
|
923
|
+
createCancelToken: () => CancelTokenSource;
|
|
924
|
+
};
|
|
925
|
+
|
|
926
|
+
declare function useSubscriptionPlan(): string | null;
|
|
927
|
+
|
|
928
|
+
interface BuildocsProviderProps {
|
|
929
|
+
readonly children: React__default.ReactNode;
|
|
930
|
+
readonly apiKey: string;
|
|
931
|
+
readonly themeEnabled?: boolean;
|
|
932
|
+
}
|
|
933
|
+
declare function BuildocsProvider({ children, apiKey, themeEnabled, }: BuildocsProviderProps): react_jsx_runtime.JSX.Element;
|
|
934
|
+
|
|
935
|
+
interface BuildocsHostProviderProps {
|
|
936
|
+
readonly children: React__default.ReactNode;
|
|
937
|
+
readonly hostBridge: HostBridge;
|
|
938
|
+
}
|
|
939
|
+
declare function BuildocsHostProvider({ children, hostBridge, }: BuildocsHostProviderProps): react_jsx_runtime.JSX.Element;
|
|
940
|
+
|
|
941
|
+
interface BuildocsExtendedEditorContextType {
|
|
942
|
+
isBuildocsExtendedEditor: boolean;
|
|
943
|
+
}
|
|
944
|
+
interface BuildocsExtendedEditorProviderProps {
|
|
945
|
+
children: ReactNode;
|
|
946
|
+
isBuildocsExtendedEditor?: boolean;
|
|
947
|
+
}
|
|
948
|
+
declare const BuildocsExtendedEditorProvider: React__default.FC<BuildocsExtendedEditorProviderProps>;
|
|
949
|
+
declare const useBuildocsExtendedEditor: () => BuildocsExtendedEditorContextType;
|
|
950
|
+
|
|
951
|
+
interface IFormEditor {
|
|
952
|
+
formDefinition: {} | null;
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
declare const PluginWaitForm: React$1.NamedExoticComponent<TBuildPlugin>;
|
|
956
|
+
|
|
957
|
+
declare class FormCommon {
|
|
958
|
+
static debounce<T extends (...args: any[]) => void>(fn: T, wait?: number): T & {
|
|
959
|
+
cancel: () => void;
|
|
960
|
+
flush: () => void;
|
|
961
|
+
};
|
|
962
|
+
static getDefaultTabIndex: (formData: any) => number;
|
|
963
|
+
static getComponentByStrictType: (stricttype: string) => React$1.NamedExoticComponent<any> | undefined;
|
|
964
|
+
static getItemDefaultName: (component: any, nodeData: any) => string;
|
|
965
|
+
static getTypeAsString: (component: any) => string | undefined;
|
|
966
|
+
static getItemCount: (component: any, nodeData: any, ElCounter: any) => any;
|
|
967
|
+
/**
|
|
968
|
+
* Returns container data (recursion)
|
|
969
|
+
* @param nodeData
|
|
970
|
+
* @param widgetId
|
|
971
|
+
* @param path
|
|
972
|
+
* @returns {{path: *[], data}|{path: *[], data: *}|{path: *[], data: *}|*|{path: *[], data: [], index: *}|{path: *[], data: [], index: *}|{path: *[], data: [], index}}
|
|
973
|
+
* @private
|
|
974
|
+
*/
|
|
975
|
+
static getTabContainerChildrens: (nodeData: any, widgetId: any, path?: any) => any;
|
|
976
|
+
static mapComponents: (data: []) => void;
|
|
977
|
+
/**
|
|
978
|
+
* Returns the widget item (recursion)
|
|
979
|
+
* @param nodeData
|
|
980
|
+
* @param widgetId
|
|
981
|
+
* @returns {*|{item: *, index: *}|{item: *, index: *}|{item, index}}
|
|
982
|
+
* @private
|
|
983
|
+
*/
|
|
984
|
+
static findWidgetByIdRecursive: (nodeData: any, widgetId: any, path?: any) => WidgetItemResult | undefined;
|
|
985
|
+
static findPanelItem: (tabId: string, panelId: string, data: any) => {
|
|
986
|
+
item: any;
|
|
987
|
+
index: any;
|
|
988
|
+
};
|
|
989
|
+
static findRowItem: (tabId: string | null, panelId: string | null, id: string, data: any) => TRowItemResult;
|
|
990
|
+
static findTableCellItem: (tabId: string, panelId: string, rowId: string, segmentId: string, data: any) => {
|
|
991
|
+
item: any;
|
|
992
|
+
index: any;
|
|
993
|
+
};
|
|
994
|
+
static findSegmentItem: (tabId: string, panelId: string, rowId: string, segmentId: string, data: any) => {
|
|
995
|
+
item: any;
|
|
996
|
+
index: any;
|
|
997
|
+
};
|
|
998
|
+
static GetParentTabId(nodeData: any, tabId: string, tabIndex?: {
|
|
999
|
+
[key: string]: number;
|
|
1000
|
+
}): {
|
|
1001
|
+
tabId: string;
|
|
1002
|
+
index: number;
|
|
1003
|
+
} | null;
|
|
1004
|
+
static getTabWidgetByFieldName(fieldName: string, nodeData: any, tabIndex?: {
|
|
1005
|
+
[key: string]: number;
|
|
1006
|
+
}): {
|
|
1007
|
+
tabId: any;
|
|
1008
|
+
index: number;
|
|
1009
|
+
} | null;
|
|
1010
|
+
/**
|
|
1011
|
+
* Returns the correct container widget (recursion)
|
|
1012
|
+
* @param nodeData
|
|
1013
|
+
* @param tabId
|
|
1014
|
+
* @returns {{path: *[], item, index}|*|{path: [], item: *, index: *}|{path: [], item: *, index: *}|null}
|
|
1015
|
+
* @private
|
|
1016
|
+
*/
|
|
1017
|
+
static getTabContainer: (nodeData: any, tabId: string, path?: any) => any;
|
|
1018
|
+
/**
|
|
1019
|
+
* Returns an element update path for immutable (nested position in form widgets data object)
|
|
1020
|
+
* @param pos
|
|
1021
|
+
* @param path
|
|
1022
|
+
* @param experssion
|
|
1023
|
+
* @returns {{}}
|
|
1024
|
+
* @private
|
|
1025
|
+
*/
|
|
1026
|
+
static getNodeUpdatePath: (path: any, experssion: any) => {};
|
|
1027
|
+
static getActiveTabIndex: (data: any, tabId: string) => number | null;
|
|
1028
|
+
static getActiveTabPanelId: (data: any, tabId: string) => any;
|
|
1029
|
+
static isChildrenTab: (formData: any, targetId: string, tabId: string) => boolean;
|
|
1030
|
+
static getAllTabIdInChain: (formData: any, result?: any) => any;
|
|
1031
|
+
static getUrlParameter: (parameterName: string) => string | null;
|
|
1032
|
+
static hasParentForm2: () => boolean;
|
|
1033
|
+
static hasParentForm: () => boolean;
|
|
1034
|
+
static extractProjectGuid: (url: string) => string | null;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
declare const ModalWindow: React__default.NamedExoticComponent<TModalWindow>;
|
|
1038
|
+
|
|
1039
|
+
declare class FormEvents {
|
|
1040
|
+
static readonly onChange = "onChange";
|
|
1041
|
+
static readonly onClick = "onClick";
|
|
1042
|
+
static readonly onCancel = "onCancel";
|
|
1043
|
+
static readonly onDelete = "onDelete";
|
|
1044
|
+
static readonly onPrint = "onPrint";
|
|
1045
|
+
static readonly onSave = "onSave";
|
|
1046
|
+
static readonly onRefresh = "onRefresh";
|
|
1047
|
+
static readonly onTableDataLoad = "onTableLoadData";
|
|
1048
|
+
static readonly onTableEditDataLoad = "onTableEditLoadData";
|
|
1049
|
+
static readonly onTableCreateRecordEvent = "onTableCreateRecordEvent";
|
|
1050
|
+
static readonly onFolderCreateRecordEvent = "onFolderCreateRecordEvent";
|
|
1051
|
+
static readonly onFolderEditRecordEvent = "onFolderEditRecordEvent";
|
|
1052
|
+
static readonly onFolderShareRecordEvent = "onFolderShareRecordEvent";
|
|
1053
|
+
static readonly onTableSelectRowEvent = "onTableSelectRowEvent";
|
|
1054
|
+
static readonly onTableRunActionEvent = "onTableRunActionEvent";
|
|
1055
|
+
static readonly onTableRunBatchActionEvent = "onTableRunBatchActionEvent";
|
|
1056
|
+
static readonly onTableEditRunActionEvent = "onTableEditRunActionEvent";
|
|
1057
|
+
static readonly onFoldersDataLoad = "onFoldersLoadData";
|
|
1058
|
+
static readonly onFileUploadEvent = "onFileUpload";
|
|
1059
|
+
static readonly onFileUploadCreateDocumentEvent = "onFileUploadCreateDocument";
|
|
1060
|
+
static readonly onStartSignProcess = "onStartSignProcess";
|
|
1061
|
+
static readonly onFinishSignProcess = "onFinishSignProcess";
|
|
1062
|
+
static readonly onLoadNewRecordTemplates = "onLoadNewRecordTemplates";
|
|
1063
|
+
static readonly onDirectRunFormEvent = "onDirectRunFormEvent";
|
|
1064
|
+
static readonly onGetCustomResponse = "onGetCustomResponse";
|
|
1065
|
+
static getFormButtonEvent(type: string): string | null;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
export { type ApiConfig, ApiConfigProvider, BuildocsExtendedEditorProvider, BuildocsHostProvider, type BuildocsHostProviderProps, BuildocsProvider, type BuildocsProviderProps, type ChunkPayload$1 as ChunkPayload, type ChunkRequestArgs, type ComponentLoader, type DataTableMeta, type DeleteFileEventArgs, type DownloadFileEventArgs, DynamicComponent, DynamicComponentLoaderProvider, type FileMetaEventArgs, FormCommon, FormEvents, FormLayoutProviderBridge, FormThemeProvider, type FormThemeProviderProps, type GetLinkedFileMetaEventArgs, type HostBridge, HostBridgeProvider, type ICurrentModalContext, type IFormEditor, type IFormRequest, type IModalState, type IUser, type IUserEnv, type IUserMenu, LanguageSwitcher, type LoadedModule, ModalContext, ModalProvider, ModalWindow, PersistentStateProvider, PluginWaitForm, type RunEventArgs, type TAutoSave, type TBuildPlugin, type TCommandCollection, type TContextType, type TDataTableMeta, type TDeleteRecordPrompt, type TFieldValues, type TFolderData, type TFolderId, type TFormEvent, type THotReloadContext, type TLoadForm, type TMessage, type TMethodProvider, type TModalWindow, type TOriginator, type TOriginatorParams, type TParent, type TPingArgs, type TPreviewDocument, type TProjectItem, type TProjectMeta, type TProjectRights, type TRedrawFolders, type TRowItemResult, type TSegmentItemResult, type TUserMenuRequest, type TWidgetContext, type TWidgetsState, type ThemeConfig, type ToastApi, ErrorMessage as ToastErrorMessage, ToastFnsProvider, InfoMessage as ToastInfoMessage, type ToastMessageProps, ToastNotification as ToastNotificationAdapter, SuccessMessage as ToastSuccessMessage, WarningMessage as ToastWarningMessage, UiComponentsProvider, type UploadArgs, HostUserDialog as UserDialogAdapter, type UserDialogProps, ViewportProvider, type WidgetItemResult, applyThemeToDom, createCachedComponentLoader, fetchProjectTheme, getLoadedLocales, initializeDayjs, isDayjsInitialized, isLocaleLoaded, loadLocale, preloadLocales, removeThemeFromDom, useApiConfig, useBuildocsApi, useBuildocsExtendedEditor, useComponentLoader, useDatatablePagination, useErrorMessage, useFormLayoutComponent, useHostBridgeProvider, useInfoMessage, usePersistentState, useSubscriptionPlan, useSuccessMessage, useToast, useUiComponents, useViewport, useWarningMessage, useWidgetPersistentState };
|