@umbraco-forms/backoffice 16.2.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 +7 -0
- package/package.json +33 -0
- package/types/umbraco-forms-public.d.ts +630 -0
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@umbraco-forms/backoffice",
|
|
3
|
+
"bugs": {
|
|
4
|
+
"url": "https://github.com/umbraco/Umbraco.Forms.Issues/issues"
|
|
5
|
+
},
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Umbraco A/S",
|
|
8
|
+
"email": "dxp@umbraco.com",
|
|
9
|
+
"url": "https://umbraco.com"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"version": "16.2.0",
|
|
13
|
+
"types": "./types/umbraco-forms-public.d.ts",
|
|
14
|
+
"files": [
|
|
15
|
+
"README.md",
|
|
16
|
+
"types/umbraco-forms-public.d.ts"
|
|
17
|
+
],
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=22",
|
|
20
|
+
"npm": ">=10.9"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"@umbraco-cms/backoffice": ">= 16.0.0 < 17",
|
|
24
|
+
"aspnet-client-validation": "^0.11.1",
|
|
25
|
+
"json-logic-js": "^2.0.5",
|
|
26
|
+
"moment": "^2.30.1"
|
|
27
|
+
},
|
|
28
|
+
"overrides": {
|
|
29
|
+
"@umbraco-cms/backoffice": {
|
|
30
|
+
"@hey-api/client-fetch": "^0.13.1"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,630 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import type { UmbApi } from '@umbraco-cms/backoffice/extension-api';
|
|
3
|
+
import { UmbApiError } from '@umbraco-cms/backoffice/resources';
|
|
4
|
+
import { UmbCancelError } from '@umbraco-cms/backoffice/resources';
|
|
5
|
+
import type { UmbCollectionRepository } from '@umbraco-cms/backoffice/collection';
|
|
6
|
+
import { UmbContextBase } from '@umbraco-cms/backoffice/class-api';
|
|
7
|
+
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
|
8
|
+
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
|
9
|
+
import type { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
|
10
|
+
import { UmbDataSourceResponse } from '@umbraco-cms/backoffice/repository';
|
|
11
|
+
import { UmbDetailRepositoryBase } from '@umbraco-cms/backoffice/repository';
|
|
12
|
+
import { UmbError } from '@umbraco-cms/backoffice/resources';
|
|
13
|
+
import { UmbPagedModel } from '@umbraco-cms/backoffice/repository';
|
|
14
|
+
import type { UmbPropertyEditorConfig } from '@umbraco-cms/backoffice/property-editor';
|
|
15
|
+
import { UmbPropertyEditorConfigCollection } from '@umbraco-cms/backoffice/property-editor';
|
|
16
|
+
import type { UmbPropertyValueData } from '@umbraco-cms/backoffice/property';
|
|
17
|
+
import type { UmbRoutableWorkspaceContext } from '@umbraco-cms/backoffice/workspace';
|
|
18
|
+
import type { UmbSaveableWorkspaceContext } from '@umbraco-cms/backoffice/workspace';
|
|
19
|
+
import { UmbSubmittableWorkspaceContextBase } from '@umbraco-cms/backoffice/workspace';
|
|
20
|
+
import type { UmbWorkspaceContext } from '@umbraco-cms/backoffice/workspace';
|
|
21
|
+
|
|
22
|
+
export declare interface ActionType {
|
|
23
|
+
name: string;
|
|
24
|
+
value: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export declare type AllowedUploadType = {
|
|
28
|
+
type: string;
|
|
29
|
+
name: string;
|
|
30
|
+
checked: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export declare type BackOfficeConfig = {
|
|
34
|
+
maxNumberOfColumnsInFormGroup: number;
|
|
35
|
+
manageSecurityWithUserGroups: boolean;
|
|
36
|
+
scheduledRecordDeletionEnabled: boolean;
|
|
37
|
+
mandatoryFieldsetLegends: boolean;
|
|
38
|
+
disallowedFileUploadExtensions: string;
|
|
39
|
+
allowedFileUploadExtensions: string;
|
|
40
|
+
enableMultiPageFormSettings: boolean;
|
|
41
|
+
enableAdvancedValidationRules: boolean;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export declare type BasicForm = {
|
|
45
|
+
id: string;
|
|
46
|
+
name: string;
|
|
47
|
+
fields: string;
|
|
48
|
+
summary: string;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export declare type BasicFormExtended = BasicForm & {
|
|
52
|
+
gotEntries: boolean;
|
|
53
|
+
count: number;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export declare const DateOptions: Intl.DateTimeFormatOptions;
|
|
57
|
+
|
|
58
|
+
export declare const DateTimeOptions: Intl.DateTimeFormatOptions;
|
|
59
|
+
|
|
60
|
+
export declare type EntrySearchResultMetadata = {
|
|
61
|
+
count: number;
|
|
62
|
+
lastSubmittedDate: string;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export declare type Field = {
|
|
66
|
+
caption: string;
|
|
67
|
+
tooltip?: string | null;
|
|
68
|
+
cssClass?: string | null;
|
|
69
|
+
alias: string;
|
|
70
|
+
id: string;
|
|
71
|
+
fieldTypeId: string;
|
|
72
|
+
prevalueSourceId: string;
|
|
73
|
+
dataSourceFieldKey?: string | null;
|
|
74
|
+
containsSensitiveData: boolean;
|
|
75
|
+
mandatory: boolean;
|
|
76
|
+
regex?: string | null;
|
|
77
|
+
requiredErrorMessage?: string | null;
|
|
78
|
+
invalidErrorMessage?: string | null;
|
|
79
|
+
condition?: FieldCondition | null;
|
|
80
|
+
settings: {
|
|
81
|
+
[key: string]: string;
|
|
82
|
+
};
|
|
83
|
+
preValues: Array<FieldPrevalue>;
|
|
84
|
+
allowedUploadTypes?: Array<AllowedUploadType> | null;
|
|
85
|
+
allowMultipleFileUploads: boolean;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export declare type FieldCondition = {
|
|
89
|
+
id: string;
|
|
90
|
+
enabled: boolean;
|
|
91
|
+
actionType: FieldConditionActionType;
|
|
92
|
+
logicType: FieldConditionLogicType;
|
|
93
|
+
rules: Array<FieldConditionRule>;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export declare enum FieldConditionActionType {
|
|
97
|
+
SHOW = "Show",
|
|
98
|
+
HIDE = "Hide"
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export declare enum FieldConditionLogicType {
|
|
102
|
+
ALL = "All",
|
|
103
|
+
ANY = "Any"
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export declare type FieldConditionRule = {
|
|
107
|
+
id: string;
|
|
108
|
+
field: string;
|
|
109
|
+
operator: FieldConditionRuleOperator;
|
|
110
|
+
value: string;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export declare enum FieldConditionRuleOperator {
|
|
114
|
+
IS = "Is",
|
|
115
|
+
IS_NOT = "IsNot",
|
|
116
|
+
GREATER_THEN = "GreaterThen",
|
|
117
|
+
LESS_THEN = "LessThen",
|
|
118
|
+
CONTAINS = "Contains",
|
|
119
|
+
CONTAINS_IGNORE_CASE = "ContainsIgnoreCase",
|
|
120
|
+
STARTS_WITH = "StartsWith",
|
|
121
|
+
STARTS_WITH_IGNORE_CASE = "StartsWithIgnoreCase",
|
|
122
|
+
ENDS_WITH = "EndsWith",
|
|
123
|
+
ENDS_WITH_IGNORE_CASE = "EndsWithIgnoreCase",
|
|
124
|
+
NOT_CONTAINS = "NotContains",
|
|
125
|
+
NOT_CONTAINS_IGNORE_CASE = "NotContainsIgnoreCase",
|
|
126
|
+
NOT_STARTS_WITH = "NotStartsWith",
|
|
127
|
+
NOT_STARTS_WITH_IGNORE_CASE = "NotStartsWithIgnoreCase",
|
|
128
|
+
NOT_ENDS_WITH = "NotEndsWith",
|
|
129
|
+
NOT_ENDS_WITH_IGNORE_CASE = "NotEndsWithIgnoreCase"
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export declare enum FieldDataType {
|
|
133
|
+
STRING = "String",
|
|
134
|
+
LONG_STRING = "LongString",
|
|
135
|
+
INTEGER = "Integer",
|
|
136
|
+
DATE_TIME = "DateTime",
|
|
137
|
+
BIT = "Bit"
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export declare type FieldPrevalue = {
|
|
141
|
+
value: string;
|
|
142
|
+
caption?: string | null;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export declare interface FieldPrevalueDetail {
|
|
146
|
+
id: string;
|
|
147
|
+
prevalues: Array<FieldPrevalue>;
|
|
148
|
+
prevalueSourceId: string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export declare type FieldPreValueSource = {
|
|
152
|
+
id: string;
|
|
153
|
+
readonly unique: string;
|
|
154
|
+
readonly entityType: string;
|
|
155
|
+
name: string;
|
|
156
|
+
created: string;
|
|
157
|
+
createdBy?: number | null;
|
|
158
|
+
createdByName?: string | null;
|
|
159
|
+
updated: string;
|
|
160
|
+
updatedBy?: number | null;
|
|
161
|
+
updatedByName?: string | null;
|
|
162
|
+
settings: {
|
|
163
|
+
[key: string]: string;
|
|
164
|
+
};
|
|
165
|
+
fieldPreValueSourceTypeId: string;
|
|
166
|
+
cachePrevaluesFor: string;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export declare type FieldSet = {
|
|
170
|
+
caption?: string | null;
|
|
171
|
+
sortOrder: number;
|
|
172
|
+
id: string;
|
|
173
|
+
page: string;
|
|
174
|
+
containers: Array<FieldsetContainer>;
|
|
175
|
+
condition?: FieldCondition | null;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
export declare type FieldsetContainer = {
|
|
179
|
+
id: string;
|
|
180
|
+
caption?: string | null;
|
|
181
|
+
width: number;
|
|
182
|
+
fields: Array<Field>;
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
export declare type FieldTypeWithSettings = {
|
|
186
|
+
id: string;
|
|
187
|
+
readonly unique: string;
|
|
188
|
+
readonly entityType: string;
|
|
189
|
+
alias: string;
|
|
190
|
+
name: string;
|
|
191
|
+
icon: string;
|
|
192
|
+
group: string;
|
|
193
|
+
sortOrder: number;
|
|
194
|
+
description: string;
|
|
195
|
+
supportsPrevalues: boolean;
|
|
196
|
+
supportsUploadTypes: boolean;
|
|
197
|
+
supportsMandatory: boolean;
|
|
198
|
+
supportsRegex: boolean;
|
|
199
|
+
hideLabel: boolean;
|
|
200
|
+
renderInputType: RenderInputType;
|
|
201
|
+
settings: Array<Setting>;
|
|
202
|
+
view: string;
|
|
203
|
+
previewView: string;
|
|
204
|
+
mandatoryByDefault: boolean;
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
export declare type FormDataSourceDefinition = {
|
|
208
|
+
id: string;
|
|
209
|
+
mappings: Array<FormDataSourceMapping>;
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
export declare type FormDataSourceMapping = {
|
|
213
|
+
formId: string;
|
|
214
|
+
dataFieldKey: string;
|
|
215
|
+
prevalueKeyfield: string;
|
|
216
|
+
prevalueValueField: string;
|
|
217
|
+
prevalueTable: string;
|
|
218
|
+
dataType: FieldDataType;
|
|
219
|
+
defaultValue: string;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
export declare type FormDesign = {
|
|
223
|
+
name: string;
|
|
224
|
+
created: string;
|
|
225
|
+
createdBy?: number | null;
|
|
226
|
+
createdByName?: string | null;
|
|
227
|
+
updated: string;
|
|
228
|
+
updatedBy?: number | null;
|
|
229
|
+
updatedByName?: string | null;
|
|
230
|
+
pages: Array<Page>;
|
|
231
|
+
validationRules: Array<ValidationRule>;
|
|
232
|
+
id: string;
|
|
233
|
+
readonly unique: string;
|
|
234
|
+
readonly parentUnique?: string | null;
|
|
235
|
+
readonly entityType: string;
|
|
236
|
+
fieldIndicationType: FormFieldIndication;
|
|
237
|
+
indicator: string;
|
|
238
|
+
showValidationSummary: boolean;
|
|
239
|
+
hideFieldValidation: boolean;
|
|
240
|
+
requiredErrorMessage: string;
|
|
241
|
+
invalidErrorMessage: string;
|
|
242
|
+
messageOnSubmit?: string | null;
|
|
243
|
+
messageOnSubmitIsHtml: boolean;
|
|
244
|
+
goToPageOnSubmit?: string | null;
|
|
245
|
+
xPathOnSubmit?: string | null;
|
|
246
|
+
manualApproval: boolean;
|
|
247
|
+
storeRecordsLocally: boolean;
|
|
248
|
+
autocompleteAttribute?: string | null;
|
|
249
|
+
displayDefaultFields: boolean;
|
|
250
|
+
selectedDisplayFields: Array<RecordFieldDisplay>;
|
|
251
|
+
daysToRetainSubmittedRecordsFor: number;
|
|
252
|
+
daysToRetainApprovedRecordsFor: number;
|
|
253
|
+
daysToRetainRejectedRecordsFor: number;
|
|
254
|
+
cssClass?: string | null;
|
|
255
|
+
disableDefaultStylesheet: boolean;
|
|
256
|
+
datasource?: FormDataSourceDefinition | null;
|
|
257
|
+
submitLabel?: string | null;
|
|
258
|
+
nextLabel?: string | null;
|
|
259
|
+
prevLabel?: string | null;
|
|
260
|
+
folderId?: string | null;
|
|
261
|
+
nodeId: number;
|
|
262
|
+
showPagingOnMultiPageForms: MultiPageNavigationOption;
|
|
263
|
+
pagingDetailsFormat: string;
|
|
264
|
+
pageCaptionFormat: string;
|
|
265
|
+
showSummaryPageOnMultiPageForms: boolean;
|
|
266
|
+
summaryLabel?: string | null;
|
|
267
|
+
formWorkflows: FormWorkflows;
|
|
268
|
+
path: string;
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
export declare interface FormDetailModel {
|
|
272
|
+
entityType: FormEntityType;
|
|
273
|
+
unique: string;
|
|
274
|
+
parentUnique: string | null;
|
|
275
|
+
name: string;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export declare type FormEntityType = typeof FORMS_FORM_ENTITY_TYPE;
|
|
279
|
+
|
|
280
|
+
export declare type FormEntryEntityType = typeof FORMS_FORM_ENTRY_ENTITY_TYPE;
|
|
281
|
+
|
|
282
|
+
export declare enum FormFieldIndication {
|
|
283
|
+
NO_INDICATOR = "NoIndicator",
|
|
284
|
+
MARK_MANDATORY_FIELDS = "MarkMandatoryFields",
|
|
285
|
+
MARK_OPTIONAL_FIELDS = "MarkOptionalFields"
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export declare type FormFolderEntityType = typeof FORMS_FORM_FOLDER_ENTITY_TYPE;
|
|
289
|
+
|
|
290
|
+
export declare type FormRootEntityType = typeof FORMS_FORM_ROOT_ENTITY_TYPE;
|
|
291
|
+
|
|
292
|
+
export declare const FORMS_CONTEXT: UmbContextToken<FormsContext, FormsContext>;
|
|
293
|
+
|
|
294
|
+
export declare const FORMS_FORM_ENTITY_TYPE = "forms-form";
|
|
295
|
+
|
|
296
|
+
export declare const FORMS_FORM_ENTRY_ENTITY_TYPE = "forms-form-entry";
|
|
297
|
+
|
|
298
|
+
export declare const FORMS_FORM_FOLDER_ENTITY_TYPE = "forms-folder";
|
|
299
|
+
|
|
300
|
+
export declare const FORMS_FORM_ROOT_ENTITY_TYPE = "forms-form-root";
|
|
301
|
+
|
|
302
|
+
export declare const FORMS_FORM_WORKSPACE_CONTEXT: UmbContextToken<UmbWorkspaceContext, FormsFormWorkspaceContext>;
|
|
303
|
+
|
|
304
|
+
export declare class FormsContext extends UmbContextBase {
|
|
305
|
+
#private;
|
|
306
|
+
config: Observable<BackOfficeConfig | undefined>;
|
|
307
|
+
userSecurity: Observable<FormSecurityForUser | undefined>;
|
|
308
|
+
constructor(host: UmbControllerHost);
|
|
309
|
+
hostConnected(): Promise<void>;
|
|
310
|
+
getUserSecurity(): Promise<void>;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export declare type FormSecurityForUser = {
|
|
314
|
+
key: string;
|
|
315
|
+
name: string;
|
|
316
|
+
readonly unique: string;
|
|
317
|
+
readonly entityType: string;
|
|
318
|
+
userSecurity: UserSecurity;
|
|
319
|
+
startFolderIds: Array<string>;
|
|
320
|
+
formsSecurity: Array<UserFormSecurity>;
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
export declare enum FormSecurityType {
|
|
324
|
+
FULL = "Full",
|
|
325
|
+
READ_ONLY_VIEW_AND_EXPORT_ENTRIES = "ReadOnlyViewAndExportEntries",
|
|
326
|
+
READ_ONLY_VIEW_ENTRIES = "ReadOnlyViewEntries"
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export declare interface FormsFieldPreviewApi extends UmbApi {
|
|
330
|
+
getSettingValue(alias: string): string;
|
|
331
|
+
settings: Record<string, string>;
|
|
332
|
+
prevalues: Array<FieldPrevalue>;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export declare class FormsFieldTypeDetailRepository extends UmbDetailRepositoryBase<FieldTypeWithSettings> {
|
|
336
|
+
constructor(host: UmbControllerHost);
|
|
337
|
+
requestValidationPatterns(): Promise<{
|
|
338
|
+
error: UmbError | UmbApiError | UmbCancelError | Error;
|
|
339
|
+
data?: undefined;
|
|
340
|
+
} | {
|
|
341
|
+
data: ValidationPattern[];
|
|
342
|
+
error?: undefined;
|
|
343
|
+
}>;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export declare class FormsFormDetailRepository extends UmbDetailRepositoryBase<FormDesign> {
|
|
347
|
+
constructor(host: UmbControllerHost);
|
|
348
|
+
requestRecordsMetaData(unique: string): Promise<{
|
|
349
|
+
error: UmbError | UmbApiError | UmbCancelError | Error;
|
|
350
|
+
data?: undefined;
|
|
351
|
+
} | {
|
|
352
|
+
data: EntrySearchResultMetadata;
|
|
353
|
+
error?: undefined;
|
|
354
|
+
}>;
|
|
355
|
+
requestHasRelations(unique: string): Promise<{
|
|
356
|
+
error: UmbError | UmbApiError | UmbCancelError | Error;
|
|
357
|
+
data?: undefined;
|
|
358
|
+
} | {
|
|
359
|
+
data: boolean;
|
|
360
|
+
error?: undefined;
|
|
361
|
+
}>;
|
|
362
|
+
requestTemplates(): Promise<{
|
|
363
|
+
error: UmbError | UmbApiError | UmbCancelError | Error;
|
|
364
|
+
data?: undefined;
|
|
365
|
+
} | {
|
|
366
|
+
data: FormTemplateBase[];
|
|
367
|
+
error?: undefined;
|
|
368
|
+
}>;
|
|
369
|
+
requestFormScaffold(template: string): Promise<{
|
|
370
|
+
error: UmbError | UmbApiError | UmbCancelError | Error;
|
|
371
|
+
data?: undefined;
|
|
372
|
+
} | {
|
|
373
|
+
data: FormDesign;
|
|
374
|
+
error?: undefined;
|
|
375
|
+
}>;
|
|
376
|
+
copyForm(unique: string, copyWorkflows: boolean, newName?: string, copyToFolderId?: string): Promise<{
|
|
377
|
+
error: UmbError | UmbApiError | UmbCancelError | Error;
|
|
378
|
+
data?: undefined;
|
|
379
|
+
} | {
|
|
380
|
+
data: unknown;
|
|
381
|
+
error?: undefined;
|
|
382
|
+
}>;
|
|
383
|
+
copyFormWorkflows(sourceId: string, destinationId: string, workflowIds: Array<string>): Promise<{
|
|
384
|
+
error: UmbError | UmbApiError | UmbCancelError | Error;
|
|
385
|
+
data?: undefined;
|
|
386
|
+
} | {
|
|
387
|
+
data: unknown;
|
|
388
|
+
error?: undefined;
|
|
389
|
+
}>;
|
|
390
|
+
moveForm(unique: string, newParentId: string): Promise<{
|
|
391
|
+
error: UmbError | UmbApiError | UmbCancelError | Error;
|
|
392
|
+
data?: undefined;
|
|
393
|
+
} | {
|
|
394
|
+
data: unknown;
|
|
395
|
+
error?: undefined;
|
|
396
|
+
}>;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export declare class FormsFormWorkspaceContext extends UmbSubmittableWorkspaceContextBase<FormDesign> implements UmbSaveableWorkspaceContext, UmbRoutableWorkspaceContext {
|
|
400
|
+
#private;
|
|
401
|
+
readonly formRepository: FormsFormDetailRepository;
|
|
402
|
+
readonly fieldTypeRepository: FormsFieldTypeDetailRepository;
|
|
403
|
+
readonly workflowTypeRepository: FormsWorkflowTypeDetailRepository;
|
|
404
|
+
readonly prevalueSourceCollectionRepository: FormsPrevalueSourceCollectionRepository;
|
|
405
|
+
readonly data: Observable<FormDesign | undefined>;
|
|
406
|
+
readonly unique: Observable<string | undefined>;
|
|
407
|
+
readonly name: Observable<string | undefined>;
|
|
408
|
+
readonly id: Observable<string | undefined>;
|
|
409
|
+
constructor(host: UmbControllerHostElement);
|
|
410
|
+
load(id: string): Promise<void>;
|
|
411
|
+
create(parent: {
|
|
412
|
+
entityType: string;
|
|
413
|
+
unique: string | null;
|
|
414
|
+
}, template: string | null): Promise<{
|
|
415
|
+
data: FormDesign;
|
|
416
|
+
}>;
|
|
417
|
+
requestSave(): Promise<void>;
|
|
418
|
+
submit(): Promise<void>;
|
|
419
|
+
loadFieldType(id: string): Promise<FieldTypeWithSettings | undefined>;
|
|
420
|
+
loadWorkflowType(id: string): Promise<WorkflowTypeWithSettings | undefined>;
|
|
421
|
+
loadValidationPatterns(): Promise<ValidationPattern[] | undefined>;
|
|
422
|
+
loadPrevalueSources(): Promise<FieldPreValueSource[] | undefined>;
|
|
423
|
+
getData(): FormDesign | undefined;
|
|
424
|
+
getUnique(): string;
|
|
425
|
+
getEntityType(): string;
|
|
426
|
+
getName(): string | undefined;
|
|
427
|
+
setName(name: string): void;
|
|
428
|
+
setFormProperty(alias: string, value: unknown): void;
|
|
429
|
+
getFormProperty(alias: string): any;
|
|
430
|
+
setPageProperty(pageIndex: number, alias: string, value: unknown): void;
|
|
431
|
+
setFieldsetProperty(pageIndex: number, fieldsetIndex: number, alias: string, value: unknown): void;
|
|
432
|
+
setContainerProperty(pageIndex: number, fieldsetIndex: number, containerIndex: number, alias: string, value: unknown): void;
|
|
433
|
+
setFieldProperty(pageIndex: number, fieldsetIndex: number, containerIndex: number, fieldIndex: number, alias: string, value: unknown): void;
|
|
434
|
+
setWorkflowProperty(collectionName: string, index: number, alias: string, value: unknown): void;
|
|
435
|
+
moveFieldSet(currentPageIndex: number, currentFieldsetIndex: number, newPageIndex: number): void;
|
|
436
|
+
moveField(fieldId: string, currentIndexPath: string, newIndexPath: string): void;
|
|
437
|
+
moveWorkflow(workflowIndex: number, fromCollectionName: string, toCollectionName: string): void;
|
|
438
|
+
getAllPages(): Page[];
|
|
439
|
+
getAllContainers(): FieldsetContainer[];
|
|
440
|
+
getAllFields(): Field[];
|
|
441
|
+
getAllFieldAliases(): string[];
|
|
442
|
+
getFieldsWithPrevalues(): Array<FieldPrevalueDetail>;
|
|
443
|
+
getContainerIndexPathForField(id: string): string;
|
|
444
|
+
getConditionActionTypes: Array<ActionType>;
|
|
445
|
+
getConditionLogicTypes: Array<LogicType>;
|
|
446
|
+
getConditionOperators: Array<OperatorType>;
|
|
447
|
+
getRichTextConfiguration(): Promise<UmbPropertyEditorConfigCollection>;
|
|
448
|
+
destroy(): void;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
export declare interface FormsPrevalueSourceCollectionFilterModel {
|
|
452
|
+
skip?: number;
|
|
453
|
+
take?: number;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
export declare class FormsPrevalueSourceCollectionRepository implements UmbCollectionRepository {
|
|
457
|
+
#private;
|
|
458
|
+
constructor(host: UmbControllerHost);
|
|
459
|
+
requestCollection(filter: FormsPrevalueSourceCollectionFilterModel): Promise<UmbDataSourceResponse<UmbPagedModel<FieldPreValueSource>>>;
|
|
460
|
+
destroy(): void;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
export declare interface FormsSettingValueConverterApi extends UmbApi {
|
|
464
|
+
getSettingValueForEditor(setting: Setting, alias: string, value: string): Promise<unknown>;
|
|
465
|
+
getSettingValueForPersistence(setting: Setting, valueData: UmbPropertyValueData): Promise<string>;
|
|
466
|
+
getSettingPropertyConfig(setting: Setting, alias: string, values: Array<UmbPropertyValueData>): Promise<UmbPropertyEditorConfig>;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
export declare class FormsWorkflowTypeDetailRepository extends UmbDetailRepositoryBase<WorkflowTypeWithSettings> {
|
|
470
|
+
constructor(host: UmbControllerHost);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
export declare type FormTemplateBase = {
|
|
474
|
+
alias: string;
|
|
475
|
+
readonly unique: string;
|
|
476
|
+
readonly entityType: string;
|
|
477
|
+
name: string;
|
|
478
|
+
description: string;
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
export declare type FormWorkflows = {
|
|
482
|
+
onSubmit: Array<FormWorkflowWithTypeSettings>;
|
|
483
|
+
onApprove: Array<FormWorkflowWithTypeSettings>;
|
|
484
|
+
onReject: Array<FormWorkflowWithTypeSettings>;
|
|
485
|
+
};
|
|
486
|
+
|
|
487
|
+
export declare type FormWorkflowWithTypeSettings = {
|
|
488
|
+
id: string;
|
|
489
|
+
name: string;
|
|
490
|
+
form: string;
|
|
491
|
+
active: boolean;
|
|
492
|
+
includeSensitiveData: IncludeSensitiveData;
|
|
493
|
+
isDeleted: boolean;
|
|
494
|
+
sortOrder: number;
|
|
495
|
+
workflowTypeId: string;
|
|
496
|
+
workflowTypeName: string;
|
|
497
|
+
workflowTypeDescription: string;
|
|
498
|
+
workflowTypeIcon: string;
|
|
499
|
+
workflowTypeGroup: string;
|
|
500
|
+
settings: {
|
|
501
|
+
[key: string]: string;
|
|
502
|
+
};
|
|
503
|
+
isMandatory: boolean;
|
|
504
|
+
condition?: FieldCondition | null;
|
|
505
|
+
};
|
|
506
|
+
|
|
507
|
+
export declare type GetFieldTypeValidationPatternResponse = GetFieldTypeValidationPatternResponses[keyof GetFieldTypeValidationPatternResponses];
|
|
508
|
+
|
|
509
|
+
export declare type GetFieldTypeValidationPatternResponses = {
|
|
510
|
+
/**
|
|
511
|
+
* OK
|
|
512
|
+
*/
|
|
513
|
+
200: Array<ValidationPattern>;
|
|
514
|
+
};
|
|
515
|
+
|
|
516
|
+
export declare type GetFormTemplateResponse = GetFormTemplateResponses[keyof GetFormTemplateResponses];
|
|
517
|
+
|
|
518
|
+
export declare type GetFormTemplateResponses = {
|
|
519
|
+
/**
|
|
520
|
+
* OK
|
|
521
|
+
*/
|
|
522
|
+
200: Array<FormTemplateBase>;
|
|
523
|
+
};
|
|
524
|
+
|
|
525
|
+
export declare const GUID_EMPTY: string;
|
|
526
|
+
|
|
527
|
+
export declare enum IncludeSensitiveData {
|
|
528
|
+
FALSE = "False",
|
|
529
|
+
TRUE = "True",
|
|
530
|
+
UNDEFINED = "Undefined"
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
export declare interface LogicType {
|
|
534
|
+
name: string;
|
|
535
|
+
value: string;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
export declare enum MultiPageNavigationOption {
|
|
539
|
+
NONE = "None",
|
|
540
|
+
SHOW_AT_TOP = "ShowAtTop",
|
|
541
|
+
SHOW_AT_BOTTOM = "ShowAtBottom"
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
export declare interface OperatorType {
|
|
545
|
+
name: string;
|
|
546
|
+
value: string;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
export declare type Page = {
|
|
550
|
+
fieldSets: Array<FieldSet>;
|
|
551
|
+
caption?: string | null;
|
|
552
|
+
sortOrder: number;
|
|
553
|
+
id: string;
|
|
554
|
+
form: string;
|
|
555
|
+
buttonCondition?: FieldCondition | null;
|
|
556
|
+
};
|
|
557
|
+
|
|
558
|
+
export declare type RecordFieldDisplay = {
|
|
559
|
+
alias: string;
|
|
560
|
+
caption: string;
|
|
561
|
+
isSystem: boolean;
|
|
562
|
+
};
|
|
563
|
+
|
|
564
|
+
export declare enum RenderInputType {
|
|
565
|
+
SINGLE = "Single",
|
|
566
|
+
MULTIPLE = "Multiple",
|
|
567
|
+
CUSTOM = "Custom"
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
export declare type Setting = {
|
|
571
|
+
name: string;
|
|
572
|
+
alias: string;
|
|
573
|
+
description: string;
|
|
574
|
+
prevalues: Array<string>;
|
|
575
|
+
view: string;
|
|
576
|
+
displayOrder: number;
|
|
577
|
+
defaultValue: string;
|
|
578
|
+
isReadOnly: boolean;
|
|
579
|
+
isMandatory: boolean;
|
|
580
|
+
};
|
|
581
|
+
|
|
582
|
+
export declare type UserFormSecurity = {
|
|
583
|
+
formName: string;
|
|
584
|
+
formCreated: string;
|
|
585
|
+
fields: string;
|
|
586
|
+
hasAccess: boolean;
|
|
587
|
+
securityType: FormSecurityType;
|
|
588
|
+
allowInEditor: boolean;
|
|
589
|
+
securityTypeInt: number;
|
|
590
|
+
id: number;
|
|
591
|
+
user: string;
|
|
592
|
+
form: string;
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
export declare type UserSecurity = {
|
|
596
|
+
manageDataSources: boolean;
|
|
597
|
+
managePreValueSources: boolean;
|
|
598
|
+
manageWorkflows: boolean;
|
|
599
|
+
manageForms: boolean;
|
|
600
|
+
viewEntries: boolean;
|
|
601
|
+
editEntries: boolean;
|
|
602
|
+
deleteEntries: boolean;
|
|
603
|
+
user: string;
|
|
604
|
+
};
|
|
605
|
+
|
|
606
|
+
export declare type ValidationPattern = {
|
|
607
|
+
name: string;
|
|
608
|
+
labelKey: string;
|
|
609
|
+
pattern: string;
|
|
610
|
+
};
|
|
611
|
+
|
|
612
|
+
export declare type ValidationRule = {
|
|
613
|
+
rule: string;
|
|
614
|
+
errorMessage: string;
|
|
615
|
+
fieldId: string;
|
|
616
|
+
};
|
|
617
|
+
|
|
618
|
+
export declare type WorkflowTypeWithSettings = {
|
|
619
|
+
id: string;
|
|
620
|
+
readonly unique: string;
|
|
621
|
+
readonly entityType: string;
|
|
622
|
+
alias: string;
|
|
623
|
+
name: string;
|
|
624
|
+
description: string;
|
|
625
|
+
icon: string;
|
|
626
|
+
group: string;
|
|
627
|
+
settings: Array<Setting>;
|
|
628
|
+
};
|
|
629
|
+
|
|
630
|
+
export { }
|