@umbraco-forms/backoffice 16.2.0 → 17.0.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.2.0",
12
+ "version": "17.0.0-rc2",
13
13
  "types": "./types/umbraco-forms-public.d.ts",
14
14
  "files": [
15
15
  "README.md",
@@ -20,14 +20,9 @@
20
20
  "npm": ">=10.9"
21
21
  },
22
22
  "peerDependencies": {
23
- "@umbraco-cms/backoffice": ">= 16.0.0 < 17",
23
+ "@umbraco-cms/backoffice": "^17.0.0-rc2",
24
24
  "aspnet-client-validation": "^0.11.1",
25
25
  "json-logic-js": "^2.0.5",
26
26
  "moment": "^2.30.1"
27
- },
28
- "overrides": {
29
- "@umbraco-cms/backoffice": {
30
- "@hey-api/client-fetch": "^0.13.1"
31
- }
32
27
  }
33
28
  }
@@ -1,3 +1,6 @@
1
+ import type { ApiLoaderProperty } from '@umbraco-cms/backoffice/extension-api';
2
+ import type { ManifestElement } from '@umbraco-cms/backoffice/extension-api';
3
+ import type { ManifestElementAndApi } from '@umbraco-cms/backoffice/extension-api';
1
4
  import { Observable } from 'rxjs';
2
5
  import type { UmbApi } from '@umbraco-cms/backoffice/extension-api';
3
6
  import { UmbApiError } from '@umbraco-cms/backoffice/resources';
@@ -9,7 +12,7 @@ import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
9
12
  import type { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
10
13
  import { UmbDataSourceResponse } from '@umbraco-cms/backoffice/repository';
11
14
  import { UmbDetailRepositoryBase } from '@umbraco-cms/backoffice/repository';
12
- import { UmbError } from '@umbraco-cms/backoffice/resources';
15
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
13
16
  import { UmbPagedModel } from '@umbraco-cms/backoffice/repository';
14
17
  import type { UmbPropertyEditorConfig } from '@umbraco-cms/backoffice/property-editor';
15
18
  import { UmbPropertyEditorConfigCollection } from '@umbraco-cms/backoffice/property-editor';
@@ -93,15 +96,19 @@ export declare type FieldCondition = {
93
96
  rules: Array<FieldConditionRule>;
94
97
  };
95
98
 
96
- export declare enum FieldConditionActionType {
97
- SHOW = "Show",
98
- HIDE = "Hide"
99
- }
99
+ export declare const FieldConditionActionType: {
100
+ readonly SHOW: "Show";
101
+ readonly HIDE: "Hide";
102
+ };
100
103
 
101
- export declare enum FieldConditionLogicType {
102
- ALL = "All",
103
- ANY = "Any"
104
- }
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];
105
112
 
106
113
  export declare type FieldConditionRule = {
107
114
  id: string;
@@ -110,32 +117,36 @@ export declare type FieldConditionRule = {
110
117
  value: string;
111
118
  };
112
119
 
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
- }
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
+ };
131
138
 
132
- export declare enum FieldDataType {
133
- STRING = "String",
134
- LONG_STRING = "LongString",
135
- INTEGER = "Integer",
136
- DATE_TIME = "DateTime",
137
- BIT = "Bit"
138
- }
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];
139
150
 
140
151
  export declare type FieldPrevalue = {
141
152
  value: string;
@@ -279,11 +290,13 @@ export declare type FormEntityType = typeof FORMS_FORM_ENTITY_TYPE;
279
290
 
280
291
  export declare type FormEntryEntityType = typeof FORMS_FORM_ENTRY_ENTITY_TYPE;
281
292
 
282
- export declare enum FormFieldIndication {
283
- NO_INDICATOR = "NoIndicator",
284
- MARK_MANDATORY_FIELDS = "MarkMandatoryFields",
285
- MARK_OPTIONAL_FIELDS = "MarkOptionalFields"
286
- }
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];
287
300
 
288
301
  export declare type FormFolderEntityType = typeof FORMS_FORM_FOLDER_ENTITY_TYPE;
289
302
 
@@ -320,11 +333,13 @@ export declare type FormSecurityForUser = {
320
333
  formsSecurity: Array<UserFormSecurity>;
321
334
  };
322
335
 
323
- export declare enum FormSecurityType {
324
- FULL = "Full",
325
- READ_ONLY_VIEW_AND_EXPORT_ENTRIES = "ReadOnlyViewAndExportEntries",
326
- READ_ONLY_VIEW_ENTRIES = "ReadOnlyViewEntries"
327
- }
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];
328
343
 
329
344
  export declare interface FormsFieldPreviewApi extends UmbApi {
330
345
  getSettingValue(alias: string): string;
@@ -332,10 +347,16 @@ export declare interface FormsFieldPreviewApi extends UmbApi {
332
347
  prevalues: Array<FieldPrevalue>;
333
348
  }
334
349
 
350
+ export declare class FormsFieldPreviewBaseElement extends UmbLitElement implements FormsFieldPreviewApi {
351
+ prevalues: Array<FieldPrevalue>;
352
+ settings: Record<string, string>;
353
+ getSettingValue(alias: string): string;
354
+ }
355
+
335
356
  export declare class FormsFieldTypeDetailRepository extends UmbDetailRepositoryBase<FieldTypeWithSettings> {
336
357
  constructor(host: UmbControllerHost);
337
358
  requestValidationPatterns(): Promise<{
338
- error: UmbError | UmbApiError | UmbCancelError | Error;
359
+ error: UmbApiError | UmbCancelError;
339
360
  data?: undefined;
340
361
  } | {
341
362
  data: ValidationPattern[];
@@ -346,49 +367,49 @@ export declare class FormsFieldTypeDetailRepository extends UmbDetailRepositoryB
346
367
  export declare class FormsFormDetailRepository extends UmbDetailRepositoryBase<FormDesign> {
347
368
  constructor(host: UmbControllerHost);
348
369
  requestRecordsMetaData(unique: string): Promise<{
349
- error: UmbError | UmbApiError | UmbCancelError | Error;
370
+ error: UmbApiError | UmbCancelError;
350
371
  data?: undefined;
351
372
  } | {
352
373
  data: EntrySearchResultMetadata;
353
374
  error?: undefined;
354
375
  }>;
355
376
  requestHasRelations(unique: string): Promise<{
356
- error: UmbError | UmbApiError | UmbCancelError | Error;
377
+ error: UmbApiError | UmbCancelError;
357
378
  data?: undefined;
358
379
  } | {
359
380
  data: boolean;
360
381
  error?: undefined;
361
382
  }>;
362
383
  requestTemplates(): Promise<{
363
- error: UmbError | UmbApiError | UmbCancelError | Error;
384
+ error: UmbApiError | UmbCancelError;
364
385
  data?: undefined;
365
386
  } | {
366
387
  data: FormTemplateBase[];
367
388
  error?: undefined;
368
389
  }>;
369
390
  requestFormScaffold(template: string): Promise<{
370
- error: UmbError | UmbApiError | UmbCancelError | Error;
391
+ error: UmbApiError | UmbCancelError;
371
392
  data?: undefined;
372
393
  } | {
373
394
  data: FormDesign;
374
395
  error?: undefined;
375
396
  }>;
376
397
  copyForm(unique: string, copyWorkflows: boolean, newName?: string, copyToFolderId?: string): Promise<{
377
- error: UmbError | UmbApiError | UmbCancelError | Error;
398
+ error: UmbApiError | UmbCancelError;
378
399
  data?: undefined;
379
400
  } | {
380
401
  data: unknown;
381
402
  error?: undefined;
382
403
  }>;
383
404
  copyFormWorkflows(sourceId: string, destinationId: string, workflowIds: Array<string>): Promise<{
384
- error: UmbError | UmbApiError | UmbCancelError | Error;
405
+ error: UmbApiError | UmbCancelError;
385
406
  data?: undefined;
386
407
  } | {
387
408
  data: unknown;
388
409
  error?: undefined;
389
410
  }>;
390
411
  moveForm(unique: string, newParentId: string): Promise<{
391
- error: UmbError | UmbApiError | UmbCancelError | Error;
412
+ error: UmbApiError | UmbCancelError;
392
413
  data?: undefined;
393
414
  } | {
394
415
  data: unknown;
@@ -524,23 +545,37 @@ export declare type GetFormTemplateResponses = {
524
545
 
525
546
  export declare const GUID_EMPTY: string;
526
547
 
527
- export declare enum IncludeSensitiveData {
528
- FALSE = "False",
529
- TRUE = "True",
530
- UNDEFINED = "Undefined"
531
- }
548
+ export declare const IncludeSensitiveData: {
549
+ readonly FALSE: "False";
550
+ readonly TRUE: "True";
551
+ readonly UNDEFINED: "Undefined";
552
+ };
553
+
554
+ export declare type IncludeSensitiveData = (typeof IncludeSensitiveData)[keyof typeof IncludeSensitiveData];
532
555
 
533
556
  export declare interface LogicType {
534
557
  name: string;
535
558
  value: string;
536
559
  }
537
560
 
538
- export declare enum MultiPageNavigationOption {
539
- NONE = "None",
540
- SHOW_AT_TOP = "ShowAtTop",
541
- SHOW_AT_BOTTOM = "ShowAtBottom"
561
+ export declare interface ManifestFormsFieldPreview extends ManifestElement {
562
+ type: "formsFieldPreview";
542
563
  }
543
564
 
565
+ export declare interface ManifestFormsSettingValueConverterPreview extends ManifestElementAndApi {
566
+ type: "formsSettingValueConverter";
567
+ propertyEditorUiAlias: string;
568
+ api: ApiLoaderProperty<FormsSettingValueConverterApi>;
569
+ }
570
+
571
+ export declare const MultiPageNavigationOption: {
572
+ readonly NONE: "None";
573
+ readonly SHOW_AT_TOP: "ShowAtTop";
574
+ readonly SHOW_AT_BOTTOM: "ShowAtBottom";
575
+ };
576
+
577
+ export declare type MultiPageNavigationOption = (typeof MultiPageNavigationOption)[keyof typeof MultiPageNavigationOption];
578
+
544
579
  export declare interface OperatorType {
545
580
  name: string;
546
581
  value: string;
@@ -561,11 +596,13 @@ export declare type RecordFieldDisplay = {
561
596
  isSystem: boolean;
562
597
  };
563
598
 
564
- export declare enum RenderInputType {
565
- SINGLE = "Single",
566
- MULTIPLE = "Multiple",
567
- CUSTOM = "Custom"
568
- }
599
+ export declare const RenderInputType: {
600
+ readonly SINGLE: "Single";
601
+ readonly MULTIPLE: "Multiple";
602
+ readonly CUSTOM: "Custom";
603
+ };
604
+
605
+ export declare type RenderInputType = (typeof RenderInputType)[keyof typeof RenderInputType];
569
606
 
570
607
  export declare type Setting = {
571
608
  name: string;