@umbraco-forms/backoffice 16.3.1 → 16.4.0-rc2

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/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "url": "https://umbraco.com"
10
10
  },
11
11
  "type": "module",
12
- "version": "16.3.1",
12
+ "version": "16.4.0-rc2",
13
13
  "types": "./types/umbraco-forms-public.d.ts",
14
14
  "exports": {
15
15
  ".": {
@@ -25,7 +25,7 @@
25
25
  "npm": ">=10.9"
26
26
  },
27
27
  "peerDependencies": {
28
- "@umbraco-cms/backoffice": ">= 16.3.0 < 17",
28
+ "@umbraco-cms/backoffice": ">= 16.4.0 < 17",
29
29
  "aspnet-client-validation": "^0.11.1",
30
30
  "json-logic-js": "^2.0.5",
31
31
  "moment": "^2.30.1"
@@ -11,15 +11,15 @@ import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
11
11
  import type { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
12
12
  import { UmbDataSourceResponse } from '@umbraco-cms/backoffice/repository';
13
13
  import { UmbDetailRepositoryBase } from '@umbraco-cms/backoffice/repository';
14
- import { UmbError } from '@umbraco-cms/backoffice/resources';
14
+ import { UmbEntityDetailWorkspaceContextCreateArgs } from '@umbraco-cms/backoffice/workspace';
15
+ import { UmbEntityNamedDetailWorkspaceContextBase } from '@umbraco-cms/backoffice/workspace';
15
16
  import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
16
17
  import { UmbPagedModel } from '@umbraco-cms/backoffice/repository';
17
18
  import type { UmbPropertyEditorConfig } from '@umbraco-cms/backoffice/property-editor';
18
19
  import { UmbPropertyEditorConfigCollection } from '@umbraco-cms/backoffice/property-editor';
19
20
  import type { UmbPropertyValueData } from '@umbraco-cms/backoffice/property';
20
- import type { UmbRoutableWorkspaceContext } from '@umbraco-cms/backoffice/workspace';
21
- import type { UmbSaveableWorkspaceContext } from '@umbraco-cms/backoffice/workspace';
22
- import { UmbSubmittableWorkspaceContextBase } from '@umbraco-cms/backoffice/workspace';
21
+ import { UmbRoutableWorkspaceContext } from '@umbraco-cms/backoffice/workspace';
22
+ import { UmbSaveableWorkspaceContext } from '@umbraco-cms/backoffice/workspace';
23
23
  import type { UmbWorkspaceContext } from '@umbraco-cms/backoffice/workspace';
24
24
 
25
25
  export declare interface ActionType {
@@ -96,15 +96,19 @@ export declare type FieldCondition = {
96
96
  rules: Array<FieldConditionRule>;
97
97
  };
98
98
 
99
- export declare enum FieldConditionActionType {
100
- SHOW = "Show",
101
- HIDE = "Hide"
102
- }
99
+ export declare const FieldConditionActionType: {
100
+ readonly SHOW: "Show";
101
+ readonly HIDE: "Hide";
102
+ };
103
103
 
104
- export declare enum FieldConditionLogicType {
105
- ALL = "All",
106
- ANY = "Any"
107
- }
104
+ export declare type FieldConditionActionType = (typeof FieldConditionActionType)[keyof typeof FieldConditionActionType];
105
+
106
+ export declare const FieldConditionLogicType: {
107
+ readonly ALL: "All";
108
+ readonly ANY: "Any";
109
+ };
110
+
111
+ export declare type FieldConditionLogicType = (typeof FieldConditionLogicType)[keyof typeof FieldConditionLogicType];
108
112
 
109
113
  export declare type FieldConditionRule = {
110
114
  id: string;
@@ -113,32 +117,36 @@ export declare type FieldConditionRule = {
113
117
  value: string;
114
118
  };
115
119
 
116
- export declare enum FieldConditionRuleOperator {
117
- IS = "Is",
118
- IS_NOT = "IsNot",
119
- GREATER_THEN = "GreaterThen",
120
- LESS_THEN = "LessThen",
121
- CONTAINS = "Contains",
122
- CONTAINS_IGNORE_CASE = "ContainsIgnoreCase",
123
- STARTS_WITH = "StartsWith",
124
- STARTS_WITH_IGNORE_CASE = "StartsWithIgnoreCase",
125
- ENDS_WITH = "EndsWith",
126
- ENDS_WITH_IGNORE_CASE = "EndsWithIgnoreCase",
127
- NOT_CONTAINS = "NotContains",
128
- NOT_CONTAINS_IGNORE_CASE = "NotContainsIgnoreCase",
129
- NOT_STARTS_WITH = "NotStartsWith",
130
- NOT_STARTS_WITH_IGNORE_CASE = "NotStartsWithIgnoreCase",
131
- NOT_ENDS_WITH = "NotEndsWith",
132
- NOT_ENDS_WITH_IGNORE_CASE = "NotEndsWithIgnoreCase"
133
- }
120
+ export declare const FieldConditionRuleOperator: {
121
+ readonly IS: "Is";
122
+ readonly IS_NOT: "IsNot";
123
+ readonly GREATER_THEN: "GreaterThen";
124
+ readonly LESS_THEN: "LessThen";
125
+ readonly CONTAINS: "Contains";
126
+ readonly CONTAINS_IGNORE_CASE: "ContainsIgnoreCase";
127
+ readonly STARTS_WITH: "StartsWith";
128
+ readonly STARTS_WITH_IGNORE_CASE: "StartsWithIgnoreCase";
129
+ readonly ENDS_WITH: "EndsWith";
130
+ readonly ENDS_WITH_IGNORE_CASE: "EndsWithIgnoreCase";
131
+ readonly NOT_CONTAINS: "NotContains";
132
+ readonly NOT_CONTAINS_IGNORE_CASE: "NotContainsIgnoreCase";
133
+ readonly NOT_STARTS_WITH: "NotStartsWith";
134
+ readonly NOT_STARTS_WITH_IGNORE_CASE: "NotStartsWithIgnoreCase";
135
+ readonly NOT_ENDS_WITH: "NotEndsWith";
136
+ readonly NOT_ENDS_WITH_IGNORE_CASE: "NotEndsWithIgnoreCase";
137
+ };
134
138
 
135
- export declare enum FieldDataType {
136
- STRING = "String",
137
- LONG_STRING = "LongString",
138
- INTEGER = "Integer",
139
- DATE_TIME = "DateTime",
140
- BIT = "Bit"
141
- }
139
+ export declare type FieldConditionRuleOperator = (typeof FieldConditionRuleOperator)[keyof typeof FieldConditionRuleOperator];
140
+
141
+ export declare const FieldDataType: {
142
+ readonly STRING: "String";
143
+ readonly LONG_STRING: "LongString";
144
+ readonly INTEGER: "Integer";
145
+ readonly DATE_TIME: "DateTime";
146
+ readonly BIT: "Bit";
147
+ };
148
+
149
+ export declare type FieldDataType = (typeof FieldDataType)[keyof typeof FieldDataType];
142
150
 
143
151
  export declare type FieldPrevalue = {
144
152
  value: string;
@@ -282,11 +290,13 @@ export declare type FormEntityType = typeof FORMS_FORM_ENTITY_TYPE;
282
290
 
283
291
  export declare type FormEntryEntityType = typeof FORMS_FORM_ENTRY_ENTITY_TYPE;
284
292
 
285
- export declare enum FormFieldIndication {
286
- NO_INDICATOR = "NoIndicator",
287
- MARK_MANDATORY_FIELDS = "MarkMandatoryFields",
288
- MARK_OPTIONAL_FIELDS = "MarkOptionalFields"
289
- }
293
+ export declare const FormFieldIndication: {
294
+ readonly NO_INDICATOR: "NoIndicator";
295
+ readonly MARK_MANDATORY_FIELDS: "MarkMandatoryFields";
296
+ readonly MARK_OPTIONAL_FIELDS: "MarkOptionalFields";
297
+ };
298
+
299
+ export declare type FormFieldIndication = (typeof FormFieldIndication)[keyof typeof FormFieldIndication];
290
300
 
291
301
  export declare type FormFolderEntityType = typeof FORMS_FORM_FOLDER_ENTITY_TYPE;
292
302
 
@@ -323,11 +333,13 @@ export declare type FormSecurityForUser = {
323
333
  formsSecurity: Array<UserFormSecurity>;
324
334
  };
325
335
 
326
- export declare enum FormSecurityType {
327
- FULL = "Full",
328
- READ_ONLY_VIEW_AND_EXPORT_ENTRIES = "ReadOnlyViewAndExportEntries",
329
- READ_ONLY_VIEW_ENTRIES = "ReadOnlyViewEntries"
330
- }
336
+ export declare const FormSecurityType: {
337
+ readonly FULL: "Full";
338
+ readonly READ_ONLY_VIEW_AND_EXPORT_ENTRIES: "ReadOnlyViewAndExportEntries";
339
+ readonly READ_ONLY_VIEW_ENTRIES: "ReadOnlyViewEntries";
340
+ };
341
+
342
+ export declare type FormSecurityType = (typeof FormSecurityType)[keyof typeof FormSecurityType];
331
343
 
332
344
  export declare interface FormsFieldPreviewApi extends UmbApi {
333
345
  getSettingValue(alias: string): string;
@@ -344,7 +356,7 @@ export declare class FormsFieldPreviewBaseElement extends UmbLitElement {
344
356
  export declare class FormsFieldTypeDetailRepository extends UmbDetailRepositoryBase<FieldTypeWithSettings> {
345
357
  constructor(host: UmbControllerHost);
346
358
  requestValidationPatterns(): Promise<{
347
- error: UmbError | UmbApiError | UmbCancelError | Error;
359
+ error: UmbApiError | UmbCancelError;
348
360
  data?: undefined;
349
361
  } | {
350
362
  data: ValidationPattern[];
@@ -355,49 +367,49 @@ export declare class FormsFieldTypeDetailRepository extends UmbDetailRepositoryB
355
367
  export declare class FormsFormDetailRepository extends UmbDetailRepositoryBase<FormDesign> {
356
368
  constructor(host: UmbControllerHost);
357
369
  requestRecordsMetaData(unique: string): Promise<{
358
- error: UmbError | UmbApiError | UmbCancelError | Error;
370
+ error: UmbApiError | UmbCancelError;
359
371
  data?: undefined;
360
372
  } | {
361
373
  data: EntrySearchResultMetadata;
362
374
  error?: undefined;
363
375
  }>;
364
376
  requestHasRelations(unique: string): Promise<{
365
- error: UmbError | UmbApiError | UmbCancelError | Error;
377
+ error: UmbApiError | UmbCancelError;
366
378
  data?: undefined;
367
379
  } | {
368
380
  data: boolean;
369
381
  error?: undefined;
370
382
  }>;
371
383
  requestTemplates(): Promise<{
372
- error: UmbError | UmbApiError | UmbCancelError | Error;
384
+ error: UmbApiError | UmbCancelError;
373
385
  data?: undefined;
374
386
  } | {
375
387
  data: FormTemplateBase[];
376
388
  error?: undefined;
377
389
  }>;
378
390
  requestFormScaffold(template: string): Promise<{
379
- error: UmbError | UmbApiError | UmbCancelError | Error;
391
+ error: UmbApiError | UmbCancelError;
380
392
  data?: undefined;
381
393
  } | {
382
394
  data: FormDesign;
383
395
  error?: undefined;
384
396
  }>;
385
397
  copyForm(unique: string, copyWorkflows: boolean, newName?: string, copyToFolderId?: string): Promise<{
386
- error: UmbError | UmbApiError | UmbCancelError | Error;
398
+ error: UmbApiError | UmbCancelError;
387
399
  data?: undefined;
388
400
  } | {
389
401
  data: unknown;
390
402
  error?: undefined;
391
403
  }>;
392
404
  copyFormWorkflows(sourceId: string, destinationId: string, workflowIds: Array<string>): Promise<{
393
- error: UmbError | UmbApiError | UmbCancelError | Error;
405
+ error: UmbApiError | UmbCancelError;
394
406
  data?: undefined;
395
407
  } | {
396
408
  data: unknown;
397
409
  error?: undefined;
398
410
  }>;
399
411
  moveForm(unique: string, newParentId: string): Promise<{
400
- error: UmbError | UmbApiError | UmbCancelError | Error;
412
+ error: UmbApiError | UmbCancelError;
401
413
  data?: undefined;
402
414
  } | {
403
415
  data: unknown;
@@ -405,35 +417,22 @@ export declare class FormsFormDetailRepository extends UmbDetailRepositoryBase<F
405
417
  }>;
406
418
  }
407
419
 
408
- export declare class FormsFormWorkspaceContext extends UmbSubmittableWorkspaceContextBase<FormDesign> implements UmbSaveableWorkspaceContext, UmbRoutableWorkspaceContext {
420
+ export declare class FormsFormWorkspaceContext extends UmbEntityNamedDetailWorkspaceContextBase<FormDesign, FormsFormDetailRepository, FormsFormWorkspaceCreateArgs> implements UmbSaveableWorkspaceContext, UmbRoutableWorkspaceContext {
409
421
  #private;
410
- readonly formRepository: FormsFormDetailRepository;
411
422
  readonly fieldTypeRepository: FormsFieldTypeDetailRepository;
412
423
  readonly workflowTypeRepository: FormsWorkflowTypeDetailRepository;
413
424
  readonly prevalueSourceCollectionRepository: FormsPrevalueSourceCollectionRepository;
414
- readonly data: Observable<FormDesign | undefined>;
415
- readonly unique: Observable<string | undefined>;
416
- readonly name: Observable<string | undefined>;
425
+ get formRepository(): FormsFormDetailRepository;
417
426
  readonly id: Observable<string | undefined>;
427
+ getUnique(): string;
418
428
  constructor(host: UmbControllerHostElement);
419
- load(id: string): Promise<void>;
420
- create(parent: {
421
- entityType: string;
422
- unique: string | null;
423
- }, template: string | null): Promise<{
424
- data: FormDesign;
425
- }>;
429
+ createScaffold(args: FormsFormWorkspaceCreateArgs): Promise<FormDesign | undefined>;
426
430
  requestSave(): Promise<void>;
427
431
  submit(): Promise<void>;
428
432
  loadFieldType(id: string): Promise<FieldTypeWithSettings | undefined>;
429
433
  loadWorkflowType(id: string): Promise<WorkflowTypeWithSettings | undefined>;
430
434
  loadValidationPatterns(): Promise<ValidationPattern[] | undefined>;
431
435
  loadPrevalueSources(): Promise<FieldPreValueSource[] | undefined>;
432
- getData(): FormDesign | undefined;
433
- getUnique(): string;
434
- getEntityType(): string;
435
- getName(): string | undefined;
436
- setName(name: string): void;
437
436
  setFormProperty(alias: string, value: unknown): void;
438
437
  getFormProperty(alias: string): any;
439
438
  setPageProperty(pageIndex: number, alias: string, value: unknown): void;
@@ -454,7 +453,10 @@ export declare class FormsFormWorkspaceContext extends UmbSubmittableWorkspaceCo
454
453
  getConditionLogicTypes: Array<LogicType>;
455
454
  getConditionOperators: Array<OperatorType>;
456
455
  getRichTextConfiguration(): Promise<UmbPropertyEditorConfigCollection>;
457
- destroy(): void;
456
+ }
457
+
458
+ export declare interface FormsFormWorkspaceCreateArgs extends UmbEntityDetailWorkspaceContextCreateArgs<FormDesign> {
459
+ template?: string;
458
460
  }
459
461
 
460
462
  export declare interface FormsPrevalueSourceCollectionFilterModel {
@@ -533,11 +535,13 @@ export declare type GetFormTemplateResponses = {
533
535
 
534
536
  export declare const GUID_EMPTY: string;
535
537
 
536
- export declare enum IncludeSensitiveData {
537
- FALSE = "False",
538
- TRUE = "True",
539
- UNDEFINED = "Undefined"
540
- }
538
+ export declare const IncludeSensitiveData: {
539
+ readonly FALSE: "False";
540
+ readonly TRUE: "True";
541
+ readonly UNDEFINED: "Undefined";
542
+ };
543
+
544
+ export declare type IncludeSensitiveData = (typeof IncludeSensitiveData)[keyof typeof IncludeSensitiveData];
541
545
 
542
546
  export declare interface LogicType {
543
547
  name: string;
@@ -555,11 +559,13 @@ export declare interface ManifestFormsSettingValueConverterPreview extends Manif
555
559
  api: ApiLoaderProperty<FormsSettingValueConverterApi>;
556
560
  }
557
561
 
558
- export declare enum MultiPageNavigationOption {
559
- NONE = "None",
560
- SHOW_AT_TOP = "ShowAtTop",
561
- SHOW_AT_BOTTOM = "ShowAtBottom"
562
- }
562
+ export declare const MultiPageNavigationOption: {
563
+ readonly NONE: "None";
564
+ readonly SHOW_AT_TOP: "ShowAtTop";
565
+ readonly SHOW_AT_BOTTOM: "ShowAtBottom";
566
+ };
567
+
568
+ export declare type MultiPageNavigationOption = (typeof MultiPageNavigationOption)[keyof typeof MultiPageNavigationOption];
563
569
 
564
570
  export declare interface OperatorType {
565
571
  name: string;
@@ -581,11 +587,13 @@ export declare type RecordFieldDisplay = {
581
587
  isSystem: boolean;
582
588
  };
583
589
 
584
- export declare enum RenderInputType {
585
- SINGLE = "Single",
586
- MULTIPLE = "Multiple",
587
- CUSTOM = "Custom"
588
- }
590
+ export declare const RenderInputType: {
591
+ readonly SINGLE: "Single";
592
+ readonly MULTIPLE: "Multiple";
593
+ readonly CUSTOM: "Custom";
594
+ };
595
+
596
+ export declare type RenderInputType = (typeof RenderInputType)[keyof typeof RenderInputType];
589
597
 
590
598
  export declare type Setting = {
591
599
  name: string;