@umbraco-forms/backoffice 17.2.1 → 17.3.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 +5 -3
- package/types/umbraco-forms-public.d.ts +601 -1
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"url": "https://umbraco.com"
|
|
10
10
|
},
|
|
11
11
|
"type": "module",
|
|
12
|
-
"version": "17.
|
|
12
|
+
"version": "17.3.0-rc2",
|
|
13
13
|
"types": "./types/umbraco-forms-public.d.ts",
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
|
@@ -25,9 +25,11 @@
|
|
|
25
25
|
"npm": ">=10.9"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@umbraco-cms/backoffice": "^17.
|
|
28
|
+
"@umbraco-cms/backoffice": "^17.3.0",
|
|
29
29
|
"aspnet-client-validation": "^0.11.1",
|
|
30
30
|
"json-logic-js": "^2.0.5",
|
|
31
|
-
"moment": "^2.30.1"
|
|
31
|
+
"moment": "^2.30.1",
|
|
32
|
+
"chart.js": "^4.5.1",
|
|
33
|
+
"chartjs-plugin-annotation": "^3.1.0"
|
|
32
34
|
}
|
|
33
35
|
}
|
|
@@ -1,27 +1,44 @@
|
|
|
1
1
|
import type { ApiLoaderProperty } from '@umbraco-cms/backoffice/extension-api';
|
|
2
|
+
import type { Chart } from 'chart.js';
|
|
3
|
+
import { ChartData } from 'chart.js';
|
|
4
|
+
import type { ChartType } from 'chart.js';
|
|
5
|
+
import type { ChartTypeRegistry } from 'chart.js';
|
|
6
|
+
import { CSSResult } from 'lit';
|
|
7
|
+
import { HTMLElementConstructor } from '@umbraco-cms/backoffice/extension-api';
|
|
2
8
|
import type { ManifestElement } from '@umbraco-cms/backoffice/extension-api';
|
|
3
9
|
import type { ManifestElementAndApi } from '@umbraco-cms/backoffice/extension-api';
|
|
4
10
|
import { Observable } from 'rxjs';
|
|
11
|
+
import { PropertyValues } from '@umbraco-cms/backoffice/external/lit';
|
|
12
|
+
import { TemplateResult } from 'lit-html';
|
|
13
|
+
import { TemplateResult as TemplateResult_2 } from '@umbraco-cms/backoffice/external/lit';
|
|
14
|
+
import type { TooltipOptions } from 'chart.js';
|
|
5
15
|
import type { UmbApi } from '@umbraco-cms/backoffice/extension-api';
|
|
6
16
|
import { UmbApiError } from '@umbraco-cms/backoffice/resources';
|
|
7
17
|
import { UmbCancelError } from '@umbraco-cms/backoffice/resources';
|
|
8
18
|
import type { UmbCollectionRepository } from '@umbraco-cms/backoffice/collection';
|
|
9
19
|
import { UmbContextBase } from '@umbraco-cms/backoffice/class-api';
|
|
10
20
|
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
|
21
|
+
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
|
|
11
22
|
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
|
12
23
|
import type { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
|
13
24
|
import { UmbDataSourceResponse } from '@umbraco-cms/backoffice/repository';
|
|
14
25
|
import { UmbDetailRepositoryBase } from '@umbraco-cms/backoffice/repository';
|
|
26
|
+
import { UmbElement } from '@umbraco-cms/backoffice/element-api';
|
|
15
27
|
import { UmbEntityDetailWorkspaceContextCreateArgs } from '@umbraco-cms/backoffice/workspace';
|
|
16
28
|
import { UmbEntityNamedDetailWorkspaceContextBase } from '@umbraco-cms/backoffice/workspace';
|
|
17
29
|
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
|
|
30
|
+
import { UmbModalBaseElement } from '@umbraco-cms/backoffice/modal';
|
|
31
|
+
import { UmbModalToken } from '@umbraco-cms/backoffice/modal';
|
|
18
32
|
import { UmbPagedModel } from '@umbraco-cms/backoffice/repository';
|
|
19
33
|
import type { UmbPropertyEditorConfig } from '@umbraco-cms/backoffice/property-editor';
|
|
20
34
|
import { UmbPropertyEditorConfigCollection } from '@umbraco-cms/backoffice/property-editor';
|
|
35
|
+
import type { UmbPropertyEditorUiElement } from '@umbraco-cms/backoffice/property-editor';
|
|
21
36
|
import type { UmbPropertyValueData } from '@umbraco-cms/backoffice/property';
|
|
22
37
|
import { UmbRoutableWorkspaceContext } from '@umbraco-cms/backoffice/workspace';
|
|
23
38
|
import { UmbSaveableWorkspaceContext } from '@umbraco-cms/backoffice/workspace';
|
|
24
39
|
import type { UmbWorkspaceContext } from '@umbraco-cms/backoffice/workspace';
|
|
40
|
+
import { UUIFormControlMixinElement } from '@umbraco-ui/uui-base';
|
|
41
|
+
import { UUIRefNodeFormElement } from '@umbraco-cms/backoffice/external/uui';
|
|
25
42
|
|
|
26
43
|
export declare interface ActionType {
|
|
27
44
|
name: string;
|
|
@@ -34,6 +51,37 @@ export declare type AllowedUploadType = {
|
|
|
34
51
|
checked: string;
|
|
35
52
|
};
|
|
36
53
|
|
|
54
|
+
export declare interface AnalyticsConfigType extends Partial<AnalyticsQueryGet> {
|
|
55
|
+
alias?: FormsPrefabType;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export declare type AnalyticsGroupBy = "day" | "week" | "month";
|
|
59
|
+
|
|
60
|
+
export declare type AnalyticsQueryGet = {
|
|
61
|
+
startDate: string;
|
|
62
|
+
endDate: string;
|
|
63
|
+
metrics: Array<Metric>;
|
|
64
|
+
dimensions: Array<Dimension>;
|
|
65
|
+
sort: Column;
|
|
66
|
+
ascending: boolean;
|
|
67
|
+
page: number;
|
|
68
|
+
pageSize: number;
|
|
69
|
+
includeSubpages: boolean;
|
|
70
|
+
formId?: string | null;
|
|
71
|
+
filter?: string | null;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export declare type AnalyticsQueryResult = {
|
|
75
|
+
columns: Array<Column>;
|
|
76
|
+
currentPage: number;
|
|
77
|
+
rows: Array<Array<unknown>>;
|
|
78
|
+
rowsPerPage: number;
|
|
79
|
+
totalRows: number;
|
|
80
|
+
totalPages: number;
|
|
81
|
+
readonly fromRow: number;
|
|
82
|
+
readonly toRow: number;
|
|
83
|
+
};
|
|
84
|
+
|
|
37
85
|
export declare type BackOfficeConfig = {
|
|
38
86
|
maxNumberOfColumnsInFormGroup: number;
|
|
39
87
|
manageSecurityWithUserGroups: boolean;
|
|
@@ -50,6 +98,15 @@ export declare type BasicForm = {
|
|
|
50
98
|
name: string;
|
|
51
99
|
fields: string;
|
|
52
100
|
summary: string;
|
|
101
|
+
entries: number;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
declare type BasicForm_2 = {
|
|
105
|
+
id: string;
|
|
106
|
+
name: string;
|
|
107
|
+
fields: string;
|
|
108
|
+
summary: string;
|
|
109
|
+
entries: number;
|
|
53
110
|
};
|
|
54
111
|
|
|
55
112
|
export declare type BasicFormExtended = BasicForm & {
|
|
@@ -57,10 +114,76 @@ export declare type BasicFormExtended = BasicForm & {
|
|
|
57
114
|
count: number;
|
|
58
115
|
};
|
|
59
116
|
|
|
117
|
+
declare type BasicFormExtended_2 = BasicForm_2 & {
|
|
118
|
+
gotEntries: boolean;
|
|
119
|
+
count: number;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export declare const Column: {
|
|
123
|
+
readonly UNDEFINED: "UNDEFINED";
|
|
124
|
+
readonly ENTRIES: "entries";
|
|
125
|
+
readonly WORKFLOW_ERRORS: "workflowErrors";
|
|
126
|
+
readonly WORKFLOW_COUNT: "workflowCount";
|
|
127
|
+
readonly FORM_ID: "formId";
|
|
128
|
+
readonly FORM_NAME: "formName";
|
|
129
|
+
readonly STORE_RECORDS: "storeRecords";
|
|
130
|
+
readonly RETENTION_DAYS: "retentionDays";
|
|
131
|
+
readonly IS_MULTI_PAGE: "isMultiPage";
|
|
132
|
+
readonly SOURCES: "sources";
|
|
133
|
+
readonly PAGE_ID: "pageId";
|
|
134
|
+
readonly PAGE_NAME: "pageName";
|
|
135
|
+
readonly PAGE_URL: "pageUrl";
|
|
136
|
+
readonly WORKFLOW_ID: "workflowId";
|
|
137
|
+
readonly WORKFLOW_NAME: "workflowName";
|
|
138
|
+
readonly TRIGGERED: "triggered";
|
|
139
|
+
readonly FAILURES: "failures";
|
|
140
|
+
readonly SUCCESS: "success";
|
|
141
|
+
readonly DATE: "date";
|
|
142
|
+
readonly HOUR: "hour";
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
export declare type Column = (typeof Column)[keyof typeof Column];
|
|
146
|
+
|
|
147
|
+
export declare type ContainersSelectOptions = {
|
|
148
|
+
id: string;
|
|
149
|
+
pageName: string;
|
|
150
|
+
groupName: string;
|
|
151
|
+
selected: boolean;
|
|
152
|
+
};
|
|
153
|
+
|
|
60
154
|
export declare const DateOptions: Intl.DateTimeFormatOptions;
|
|
61
155
|
|
|
156
|
+
export declare const DATEPICKER_MODES: {
|
|
157
|
+
readonly CUSTOM: "custom";
|
|
158
|
+
readonly TODAY: "today";
|
|
159
|
+
readonly YESTERDAY: "yesterday";
|
|
160
|
+
readonly LAST_7_DAYS: "last-7-days";
|
|
161
|
+
readonly LAST_30_DAYS: "last-30-days";
|
|
162
|
+
readonly THIS_MONTH: "this-month";
|
|
163
|
+
readonly LAST_MONTH: "last-month";
|
|
164
|
+
readonly THIS_YEAR: "this-year";
|
|
165
|
+
readonly LAST_YEAR: "last-year";
|
|
166
|
+
readonly PREVIOUS_YEAR: "previous-year";
|
|
167
|
+
readonly PREVIOUS_PERIOD: "previous-period";
|
|
168
|
+
};
|
|
169
|
+
|
|
62
170
|
export declare const DateTimeOptions: Intl.DateTimeFormatOptions;
|
|
63
171
|
|
|
172
|
+
export declare const Dimension: {
|
|
173
|
+
readonly UNDEFINED: "UNDEFINED";
|
|
174
|
+
readonly FORM_ID: "formId";
|
|
175
|
+
readonly FORM_NAME: "formName";
|
|
176
|
+
readonly PAGE_ID: "pageId";
|
|
177
|
+
readonly PAGE_NAME: "pageName";
|
|
178
|
+
readonly PAGE_URL: "pageUrl";
|
|
179
|
+
readonly WORKFLOW_ID: "workflowId";
|
|
180
|
+
readonly WORKFLOW_NAME: "workflowName";
|
|
181
|
+
readonly DATE: "date";
|
|
182
|
+
readonly HOUR: "hour";
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
export declare type Dimension = (typeof Dimension)[keyof typeof Dimension];
|
|
186
|
+
|
|
64
187
|
export declare type EntrySearchResultMetadata = {
|
|
65
188
|
count: number;
|
|
66
189
|
lastSubmittedDate: string;
|
|
@@ -255,6 +378,7 @@ export declare type FormDesign = {
|
|
|
255
378
|
invalidErrorMessage: string;
|
|
256
379
|
messageOnSubmit?: string | null;
|
|
257
380
|
messageOnSubmitIsHtml: boolean;
|
|
381
|
+
messageOnSubmitBlocks?: string | null;
|
|
258
382
|
goToPageOnSubmit?: string | null;
|
|
259
383
|
xPathOnSubmit?: string | null;
|
|
260
384
|
manualApproval: boolean;
|
|
@@ -305,8 +429,18 @@ export declare type FormFolderEntityType = typeof FORMS_FORM_FOLDER_ENTITY_TYPE;
|
|
|
305
429
|
|
|
306
430
|
export declare type FormRootEntityType = typeof FORMS_FORM_ROOT_ENTITY_TYPE;
|
|
307
431
|
|
|
432
|
+
export declare const FORMS_ANALYTICS_CONTEXT: UmbContextToken<FormsAnalyticsContext, FormsAnalyticsContext>;
|
|
433
|
+
|
|
434
|
+
export declare const FORMS_ANALYTICS_WIDGET_TYPE = "formsAnalyticsWidget";
|
|
435
|
+
|
|
308
436
|
export declare const FORMS_CONTEXT: UmbContextToken<FormsContext, FormsContext>;
|
|
309
437
|
|
|
438
|
+
export declare const FORMS_DATERANGE_MANAGER_CONTEXT: UmbContextToken<FormsDateRangeManagerContext, FormsDateRangeManagerContext>;
|
|
439
|
+
|
|
440
|
+
export declare const FORMS_DATERANGE_PICKER_MODAL: UmbModalToken<FormsDateRangePickerModalData, FormsDateRangePickerModalValue>;
|
|
441
|
+
|
|
442
|
+
export declare const FORMS_DATERANGE_PICKER_MODAL_ALIAS = "Forms.Modal.DaterangePicker";
|
|
443
|
+
|
|
310
444
|
export declare const FORMS_FORM_ENTITY_TYPE = "forms-form";
|
|
311
445
|
|
|
312
446
|
export declare const FORMS_FORM_ENTRY_ENTITY_TYPE = "forms-form-entry";
|
|
@@ -317,6 +451,181 @@ export declare const FORMS_FORM_ROOT_ENTITY_TYPE = "forms-form-root";
|
|
|
317
451
|
|
|
318
452
|
export declare const FORMS_FORM_WORKSPACE_CONTEXT: UmbContextToken<UmbWorkspaceContext, FormsFormWorkspaceContext>;
|
|
319
453
|
|
|
454
|
+
export declare class FormsAnalyticsChartElement extends FormsChartBaseElement {
|
|
455
|
+
#private;
|
|
456
|
+
config?: FormsChartConfigUnionType;
|
|
457
|
+
showPercentages: boolean;
|
|
458
|
+
percentageData?: ChartData & {
|
|
459
|
+
dates: Array<Array<string>>;
|
|
460
|
+
};
|
|
461
|
+
absoluteData?: ChartData & {
|
|
462
|
+
dates: Array<Array<string>>;
|
|
463
|
+
};
|
|
464
|
+
drilldown?: Record<string, string | number>;
|
|
465
|
+
constructor();
|
|
466
|
+
protected updated(_changedProperties: PropertyValues): void;
|
|
467
|
+
loadChart(): Promise<void>;
|
|
468
|
+
render(): TemplateResult<1>;
|
|
469
|
+
static styles: CSSResult[];
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
export declare class FormsAnalyticsContext extends UmbContextBase {
|
|
473
|
+
#private;
|
|
474
|
+
readonly STORAGE_KEY = "formsAnalyticsContext";
|
|
475
|
+
readonly DEFAULT_DAY_RANGE = 30;
|
|
476
|
+
settings: Observable<FormsAnalyticsContextDefaultSettings>;
|
|
477
|
+
groupBy: Observable<AnalyticsGroupBy>;
|
|
478
|
+
constructor(host: UmbControllerHost);
|
|
479
|
+
query(config: AnalyticsConfigType): Promise<{
|
|
480
|
+
queryResults: Array<AnalyticsQueryResult | null | undefined>;
|
|
481
|
+
primaryQueryConfig: Partial<AnalyticsQueryGet>;
|
|
482
|
+
secondaryQueryConfig?: Partial<AnalyticsQueryGet>;
|
|
483
|
+
}>;
|
|
484
|
+
updateSettings(settings: Partial<FormsAnalyticsContextDefaultSettings>): void;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
export declare interface FormsAnalyticsContextDefaultSettings {
|
|
488
|
+
includeNodeDescendants: boolean;
|
|
489
|
+
groupBy: AnalyticsGroupBy;
|
|
490
|
+
dateRange?: FormsDateRangePickerInputConfig;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
export declare class FormsAnalyticsGroupByControlsElement extends UmbLitElement {
|
|
494
|
+
#private;
|
|
495
|
+
analyticsContext?: typeof FORMS_ANALYTICS_CONTEXT.TYPE;
|
|
496
|
+
private _groupBy;
|
|
497
|
+
constructor();
|
|
498
|
+
render(): TemplateResult<1>;
|
|
499
|
+
static styles: CSSResult;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
export declare interface FormsAnalyticsMergedRow {
|
|
503
|
+
dimensions: Array<any>;
|
|
504
|
+
dateRanges: Array<FormsAnalyticsMergedRowDateRange>;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
export declare interface FormsAnalyticsMergedRowDateRange {
|
|
508
|
+
label: string;
|
|
509
|
+
values?: Array<number | boolean>;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
export declare interface FormsAnalyticsMergedTable {
|
|
513
|
+
columns?: Array<Column>;
|
|
514
|
+
rows: Array<FormsAnalyticsMergedRow>;
|
|
515
|
+
totalRows?: number;
|
|
516
|
+
dimensions: Array<Dimension>;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
export declare class FormsAnalyticsPrefabTableElement extends FormsAnalyticsTableElement {
|
|
520
|
+
#private;
|
|
521
|
+
get alias(): FormsPrefabType | undefined;
|
|
522
|
+
set alias(value: FormsPrefabType | undefined);
|
|
523
|
+
get formId(): string | undefined;
|
|
524
|
+
set formId(value: string | undefined);
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
export declare class FormsAnalyticsTableElement extends UmbLitElement {
|
|
528
|
+
#private;
|
|
529
|
+
readonly PAGESIZES: number[];
|
|
530
|
+
set config(value: FormsTableConfigUnionType | undefined);
|
|
531
|
+
get config(): FormsTableConfigUnionType | undefined;
|
|
532
|
+
drilldownHandler?: (row?: FormsAnalyticsMergedRow) => void;
|
|
533
|
+
private _data?;
|
|
534
|
+
private _filteredRows;
|
|
535
|
+
private _dataPage?;
|
|
536
|
+
private _pageSize;
|
|
537
|
+
private _loading;
|
|
538
|
+
private _metricTotals;
|
|
539
|
+
constructor();
|
|
540
|
+
loadTable(): Promise<void>;
|
|
541
|
+
readonly metricGuardKeys: Set<string>;
|
|
542
|
+
disconnectedCallback(): void;
|
|
543
|
+
render(): TemplateResult<1>;
|
|
544
|
+
static styles: CSSResult;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
export declare interface FormsAnalyticsWidget extends UmbControllerHostElement {
|
|
548
|
+
formId: string | undefined;
|
|
549
|
+
manifest: ManifestFormsAnalyticsWidget;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
export declare interface FormsBarChartData {
|
|
553
|
+
label: string;
|
|
554
|
+
key: string;
|
|
555
|
+
data: Array<{
|
|
556
|
+
month: number;
|
|
557
|
+
year: number;
|
|
558
|
+
count: number;
|
|
559
|
+
}>;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
export declare class FormsButtonGroupElement extends UmbLitElement implements UmbPropertyEditorUiElement {
|
|
563
|
+
#private;
|
|
564
|
+
label?: string;
|
|
565
|
+
value?: string | boolean;
|
|
566
|
+
values: Array<string | boolean>;
|
|
567
|
+
/**
|
|
568
|
+
* Provide an array of values to append to the button labels. This must be equal length to the values array
|
|
569
|
+
* This is reactive, so can be set asynchronously after the buttons have rendered
|
|
570
|
+
*/
|
|
571
|
+
args: Array<any | undefined>;
|
|
572
|
+
/** Optionally provide an array of button label keys. These are localized, so must include the full key value */
|
|
573
|
+
buttonLabels?: Array<string>;
|
|
574
|
+
/** values can be provided from config via manifest, on the items config property */
|
|
575
|
+
set config(config: UmbPropertyEditorConfigCollection | undefined);
|
|
576
|
+
get config(): UmbPropertyEditorConfigCollection | undefined;
|
|
577
|
+
render(): TemplateResult<1>;
|
|
578
|
+
static styles: CSSResult;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
export declare abstract class FormsChartBaseElement extends UmbLitElement {
|
|
582
|
+
#private;
|
|
583
|
+
chartElement?: HTMLCanvasElement;
|
|
584
|
+
legend?: TemplateResult_2;
|
|
585
|
+
protected loading: boolean;
|
|
586
|
+
protected chart?: Chart<keyof ChartTypeRegistry, [] | undefined, string>;
|
|
587
|
+
protected umsColors: string[];
|
|
588
|
+
protected readonly trendColor = "#FFBA00";
|
|
589
|
+
disconnectedCallback(): void;
|
|
590
|
+
protected empty: boolean;
|
|
591
|
+
protected chartColors: Array<string>;
|
|
592
|
+
protected legendLabels: Array<string>;
|
|
593
|
+
protected generateLegendItem(text: string, idx: number, subText?: TemplateResult_2): TemplateResult_2<1>;
|
|
594
|
+
protected defaultLegend(): TemplateResult_2<1>;
|
|
595
|
+
protected buildChartColors(key: string, i: number): void;
|
|
596
|
+
protected percentage(v?: number, total?: number): string;
|
|
597
|
+
static styles: CSSResult[];
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
export declare interface FormsChartConfig extends FormsPrefabChartPrefab {
|
|
601
|
+
alias?: FormsPrefabType;
|
|
602
|
+
type: ChartType;
|
|
603
|
+
size?: FormsChartSize;
|
|
604
|
+
showAnnotations?: boolean;
|
|
605
|
+
isFullHeight?: boolean;
|
|
606
|
+
stack?: boolean;
|
|
607
|
+
page: number;
|
|
608
|
+
pageSize: number;
|
|
609
|
+
aspect?: number;
|
|
610
|
+
dateRange?: FormsDateRangePickerInputConfig;
|
|
611
|
+
formId?: string | null;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
export declare type FormsChartConfigUnionType = Partial<AnalyticsQueryGet> & Partial<FormsChartConfig>;
|
|
615
|
+
|
|
616
|
+
export declare type FormsChartSize = "small" | "medium" | "large";
|
|
617
|
+
|
|
618
|
+
export declare interface FormsChartTheme {
|
|
619
|
+
borderColor: string;
|
|
620
|
+
borderWidth?: number;
|
|
621
|
+
backgroundColor: string;
|
|
622
|
+
pointBackgroundColor?: string;
|
|
623
|
+
pointHoverBackgroundColor?: string;
|
|
624
|
+
type?: ChartType;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
export declare const FormsChartTooltipDefaults: Partial<TooltipOptions>;
|
|
628
|
+
|
|
320
629
|
export declare class FormsContext extends UmbContextBase {
|
|
321
630
|
#private;
|
|
322
631
|
config: Observable<BackOfficeConfig | undefined>;
|
|
@@ -326,6 +635,93 @@ export declare class FormsContext extends UmbContextBase {
|
|
|
326
635
|
getUserSecurity(): Promise<void>;
|
|
327
636
|
}
|
|
328
637
|
|
|
638
|
+
export declare type FormsDatePickerModeKey = keyof typeof DATEPICKER_MODES;
|
|
639
|
+
|
|
640
|
+
export declare type FormsDatePickerModeValue = (typeof DATEPICKER_MODES)[FormsDatePickerModeKey];
|
|
641
|
+
|
|
642
|
+
export declare class FormsDateRangeManagerContext extends UmbContextBase {
|
|
643
|
+
#private;
|
|
644
|
+
dateRangeRange: {
|
|
645
|
+
primary: FormsDateRangePickerRangeConfig;
|
|
646
|
+
secondary: FormsDateRangePickerRangeConfig;
|
|
647
|
+
};
|
|
648
|
+
value: Observable<FormsDateRangePickerRangeConfig | undefined>;
|
|
649
|
+
config: Observable<FormsDateRangePickerInputConfig>;
|
|
650
|
+
constructor(host: UmbControllerHost);
|
|
651
|
+
updateConfig(value: FormsDateRangePickerInputConfig): void;
|
|
652
|
+
getValue(): FormsDateRangePickerRangeConfig | undefined;
|
|
653
|
+
getConfig(): FormsDateRangePickerInputConfig;
|
|
654
|
+
clear(): void;
|
|
655
|
+
computeDefaultRange(): void;
|
|
656
|
+
/**
|
|
657
|
+
* Calculate the date range based on the provided mode and range
|
|
658
|
+
* but does not update the internal state.
|
|
659
|
+
* This is useful for getting the computed range without affecting the current state - eg in a modal
|
|
660
|
+
* where we don't want to update the context until the user confirms their selection.
|
|
661
|
+
*/
|
|
662
|
+
getComputedRange(config: FormsDateRangePickerModeConfig, range?: FormsDateRangePickerRangeConfig, compareToConfig?: FormsDateRangePickerModeConfig, compareToRange?: FormsDateRangePickerRangeConfig): {
|
|
663
|
+
from: string;
|
|
664
|
+
to: string;
|
|
665
|
+
};
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
export declare interface FormsDateRangePickerConfig {
|
|
669
|
+
range: any;
|
|
670
|
+
ui: {
|
|
671
|
+
isHidden: boolean;
|
|
672
|
+
};
|
|
673
|
+
pickers: {
|
|
674
|
+
primary: FormsDateRangePickerModeConfig;
|
|
675
|
+
secondary: FormsDateRangePickerModeConfig;
|
|
676
|
+
};
|
|
677
|
+
dateFormat?: string | null;
|
|
678
|
+
showToday?: boolean;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
export declare class FormsDateRangePickerElement extends UmbLitElement {
|
|
682
|
+
#private;
|
|
683
|
+
showCompare: boolean;
|
|
684
|
+
label?: string;
|
|
685
|
+
private _currentDate;
|
|
686
|
+
private _config?;
|
|
687
|
+
value?: FormsDateRangePickerRangeConfig;
|
|
688
|
+
constructor();
|
|
689
|
+
render(): TemplateResult<1>;
|
|
690
|
+
static styles: CSSResult;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
export declare interface FormsDateRangePickerInputConfig {
|
|
694
|
+
compare: boolean;
|
|
695
|
+
primary: FormsDateRangePickerModeConfig;
|
|
696
|
+
secondary: FormsDateRangePickerModeConfig;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
export declare interface FormsDateRangePickerModalData extends FormsDateRangePickerInputConfig {
|
|
700
|
+
allowCompare: boolean;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
export declare class FormsDaterangePickerModalElement extends UmbModalBaseElement<FormsDateRangePickerModalData, FormsDateRangePickerModalValue> {
|
|
704
|
+
#private;
|
|
705
|
+
constructor();
|
|
706
|
+
private _dateConfig?;
|
|
707
|
+
connectedCallback(): void;
|
|
708
|
+
render(): TemplateResult<1>;
|
|
709
|
+
static styles: CSSResult;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
export declare interface FormsDateRangePickerModalValue extends FormsDateRangePickerInputConfig {
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
export declare interface FormsDateRangePickerModeConfig {
|
|
716
|
+
mode?: FormsDatePickerModeValue;
|
|
717
|
+
range: FormsDateRangePickerRangeConfig;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
export declare interface FormsDateRangePickerRangeConfig {
|
|
721
|
+
from: string;
|
|
722
|
+
to: string;
|
|
723
|
+
}
|
|
724
|
+
|
|
329
725
|
export declare type FormSecurityForUser = {
|
|
330
726
|
key: string;
|
|
331
727
|
name: string;
|
|
@@ -451,17 +847,166 @@ export declare class FormsFormWorkspaceContext extends UmbEntityNamedDetailWorks
|
|
|
451
847
|
getAllFields(): Field[];
|
|
452
848
|
getAllFieldAliases(): string[];
|
|
453
849
|
getFieldsWithPrevalues(): Array<FieldPrevalueDetail>;
|
|
850
|
+
getField(id: string): Field | null;
|
|
851
|
+
getContainerIndexPath(id: string): string;
|
|
454
852
|
getContainerIndexPathForField(id: string): string;
|
|
853
|
+
getFullIndexPathForField(id: string): {
|
|
854
|
+
containerIndexPath: string;
|
|
855
|
+
fieldIndex: number;
|
|
856
|
+
pageIndex: number;
|
|
857
|
+
fieldsetIndex: number;
|
|
858
|
+
containerIndex: number;
|
|
859
|
+
} | null;
|
|
860
|
+
getContainersSelectOptions(fieldContainerIndexPath: string): Array<ContainersSelectOptions>;
|
|
455
861
|
getConditionActionTypes: Array<ActionType>;
|
|
456
862
|
getConditionLogicTypes: Array<LogicType>;
|
|
457
863
|
getConditionOperators: Array<OperatorType>;
|
|
458
|
-
getRichTextConfiguration(): Promise<
|
|
864
|
+
getRichTextConfiguration(): Promise<{
|
|
865
|
+
config: UmbPropertyEditorConfigCollection;
|
|
866
|
+
propertyEditorUiAlias: string;
|
|
867
|
+
}>;
|
|
459
868
|
}
|
|
460
869
|
|
|
461
870
|
export declare interface FormsFormWorkspaceCreateArgs extends UmbEntityDetailWorkspaceContextCreateArgs<FormDesign> {
|
|
462
871
|
template?: string;
|
|
463
872
|
}
|
|
464
873
|
|
|
874
|
+
export declare class FormsInputFolderElement extends FormsInputFolderElement_base {
|
|
875
|
+
#private;
|
|
876
|
+
get selection(): Array<string>;
|
|
877
|
+
set selection(ids: Array<string>);
|
|
878
|
+
set value(idsString: string);
|
|
879
|
+
get value(): string;
|
|
880
|
+
private _items?;
|
|
881
|
+
constructor();
|
|
882
|
+
connectedCallback(): void;
|
|
883
|
+
protected getFormElement(): undefined;
|
|
884
|
+
render(): TemplateResult<1>;
|
|
885
|
+
static styles: CSSResult[];
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
declare const FormsInputFolderElement_base: (new (...args: any[]) => UUIFormControlMixinElement<FormDataEntryValue | FormData>) & typeof UmbLitElement;
|
|
889
|
+
|
|
890
|
+
export declare class FormsInputFormElement extends FormsInputFormElement_base {
|
|
891
|
+
#private;
|
|
892
|
+
get selection(): Array<string>;
|
|
893
|
+
set selection(ids: Array<string>);
|
|
894
|
+
multiple: boolean;
|
|
895
|
+
allowedFolders: Array<string>;
|
|
896
|
+
allowedForms: Array<string>;
|
|
897
|
+
private _userSecurity?;
|
|
898
|
+
private _items?;
|
|
899
|
+
constructor();
|
|
900
|
+
connectedCallback(): Promise<void>;
|
|
901
|
+
protected getFormElement(): undefined;
|
|
902
|
+
render(): TemplateResult<1>;
|
|
903
|
+
static styles: CSSResult[];
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
declare const FormsInputFormElement_base: (new (...args: any[]) => UUIFormControlMixinElement<FormDataEntryValue | FormData>) & typeof UmbLitElement;
|
|
907
|
+
|
|
908
|
+
export declare class FormsInputThemeElement extends FormsInputThemeElement_base {
|
|
909
|
+
#private;
|
|
910
|
+
private _options;
|
|
911
|
+
private _value;
|
|
912
|
+
set value(val: string);
|
|
913
|
+
get value(): string;
|
|
914
|
+
connectedCallback(): Promise<void>;
|
|
915
|
+
protected getFormElement(): undefined;
|
|
916
|
+
render(): TemplateResult<1>;
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
declare const FormsInputThemeElement_base: (new (...args: any[]) => UUIFormControlMixinElement<FormDataEntryValue | FormData>) & typeof UmbLitElement;
|
|
920
|
+
|
|
921
|
+
export declare interface FormsPieChartData {
|
|
922
|
+
label: string;
|
|
923
|
+
key: string;
|
|
924
|
+
data: number;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
/**
|
|
928
|
+
* A prefab chart element that generates configuration from an alias.
|
|
929
|
+
* This provides a declarative way to use charts - just set the alias
|
|
930
|
+
* and formId, and the chart configures itself.
|
|
931
|
+
*
|
|
932
|
+
* @example
|
|
933
|
+
* ```html
|
|
934
|
+
* <forms-prefab-chart alias="submissions" .formId=${formId}></forms-prefab-chart>
|
|
935
|
+
* ```
|
|
936
|
+
*/
|
|
937
|
+
export declare class FormsPrefabChartElement extends FormsAnalyticsChartElement {
|
|
938
|
+
#private;
|
|
939
|
+
/**
|
|
940
|
+
* The prefab alias to use for generating chart configuration.
|
|
941
|
+
* When set, the chart will automatically configure itself based on the prefab definition.
|
|
942
|
+
*/
|
|
943
|
+
get alias(): FormsPrefabType | undefined;
|
|
944
|
+
set alias(value: FormsPrefabType | undefined);
|
|
945
|
+
/**
|
|
946
|
+
* The form ID to query analytics for.
|
|
947
|
+
*/
|
|
948
|
+
get formId(): string | undefined;
|
|
949
|
+
set formId(value: string | undefined);
|
|
950
|
+
/**
|
|
951
|
+
* The aspect ratio override.
|
|
952
|
+
*/
|
|
953
|
+
get aspect(): number | undefined;
|
|
954
|
+
set aspect(value: number | undefined);
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
export declare class FormsPrefabChartGeneratorController extends FormsPrefabGeneratorControllerBase<FormsPrefabChartPrefab, FormsChartConfigUnionType> {
|
|
958
|
+
constructor(host: UmbControllerHost, callback?: () => unknown);
|
|
959
|
+
initializePrefabs(callback?: () => unknown): void;
|
|
960
|
+
generate<ConfigType extends FormsPrefabEntityBase>(prefabAlias: FormsPrefabType, config?: ConfigType): ConfigType;
|
|
961
|
+
options: FormsPrefabCollection<FormsPrefabChartPrefab>;
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
export declare interface FormsPrefabChartPrefab extends FormsPrefabEntityBase {
|
|
965
|
+
unit?: string;
|
|
966
|
+
unitSingular?: string;
|
|
967
|
+
type?: ChartType;
|
|
968
|
+
stack?: boolean;
|
|
969
|
+
trendIndex?: number;
|
|
970
|
+
colors?: Partial<Record<Metric, string | [string, string]>>;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
export declare interface FormsPrefabCollection<T> extends Partial<Record<FormsPrefabType & string, T>> {
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
export declare interface FormsPrefabEntityBase {
|
|
977
|
+
alias?: FormsPrefabType;
|
|
978
|
+
metrics?: Array<Metric>;
|
|
979
|
+
dimensions?: Array<Dimension>;
|
|
980
|
+
realtime?: boolean;
|
|
981
|
+
filter?: string | null;
|
|
982
|
+
hideColumns?: Array<number>;
|
|
983
|
+
documentUnique?: string;
|
|
984
|
+
culture?: string;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
export declare abstract class FormsPrefabGeneratorControllerBase<FormsPrefabType extends FormsPrefabEntityBase, ConfigType extends FormsPrefabType> extends UmbControllerBase {
|
|
988
|
+
protected abstract initializePrefabs(callback?: () => unknown): any;
|
|
989
|
+
protected abstract generate<ConfigType extends FormsPrefabType>(prefabAlias?: string, config?: ConfigType): ConfigType;
|
|
990
|
+
config?: ConfigType;
|
|
991
|
+
protected abstract options: FormsPrefabCollection<FormsPrefabType>;
|
|
992
|
+
protected prefab?: FormsPrefabType;
|
|
993
|
+
protected dataGenerationEnabled: boolean;
|
|
994
|
+
constructor(host: UmbControllerHost, callback?: () => unknown);
|
|
995
|
+
protected getPrefabFromConfiguration(prefabAlias?: string): void;
|
|
996
|
+
protected enableRealTimeReporting(): void;
|
|
997
|
+
protected determineAllMetrics(): void;
|
|
998
|
+
protected setPrefabProperty(key: keyof ConfigType, defaultValue?: any, prependDefault?: boolean): void;
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
export declare interface FormsPrefabTablePrefab extends FormsPrefabEntityBase {
|
|
1002
|
+
name?: string;
|
|
1003
|
+
ascending?: boolean;
|
|
1004
|
+
columnWidths?: Array<string | undefined>;
|
|
1005
|
+
boxed?: boolean;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
export declare type FormsPrefabType = "overview" | "submissions" | "submissions-hourly" | "origins" | "origins-overview" | "workflows";
|
|
1009
|
+
|
|
465
1010
|
export declare interface FormsPrevalueSourceCollectionFilterModel {
|
|
466
1011
|
skip?: number;
|
|
467
1012
|
take?: number;
|
|
@@ -474,12 +1019,33 @@ export declare class FormsPrevalueSourceCollectionRepository implements UmbColle
|
|
|
474
1019
|
destroy(): void;
|
|
475
1020
|
}
|
|
476
1021
|
|
|
1022
|
+
export declare class FormsRefFormElement extends FormsRefFormElement_base {
|
|
1023
|
+
#private;
|
|
1024
|
+
selectable: boolean;
|
|
1025
|
+
model?: BasicForm | BasicFormExtended_2;
|
|
1026
|
+
config?: UserSecurity;
|
|
1027
|
+
_count: number;
|
|
1028
|
+
willUpdate(changedProperties: PropertyValues<this>): void;
|
|
1029
|
+
render(): TemplateResult<1>;
|
|
1030
|
+
static styles: CSSResult[];
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
declare const FormsRefFormElement_base: HTMLElementConstructor<UmbElement> & typeof UUIRefNodeFormElement;
|
|
1034
|
+
|
|
477
1035
|
export declare interface FormsSettingValueConverterApi extends UmbApi {
|
|
478
1036
|
getSettingValueForEditor(setting: Setting, alias: string, value: string): Promise<unknown>;
|
|
479
1037
|
getSettingValueForPersistence(setting: Setting, valueData: UmbPropertyValueData): Promise<string>;
|
|
480
1038
|
getSettingPropertyConfig(setting: Setting, alias: string, values: Array<UmbPropertyValueData>): Promise<UmbPropertyEditorConfig>;
|
|
481
1039
|
}
|
|
482
1040
|
|
|
1041
|
+
export declare interface FormsTableConfig extends FormsPrefabTablePrefab {
|
|
1042
|
+
hasData?: boolean;
|
|
1043
|
+
page: number;
|
|
1044
|
+
pageSize: number;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
export declare type FormsTableConfigUnionType = Partial<AnalyticsQueryGet> & Partial<FormsTableConfig>;
|
|
1048
|
+
|
|
483
1049
|
export declare class FormsWorkflowTypeDetailRepository extends UmbDetailRepositoryBase<WorkflowTypeWithSettings> {
|
|
484
1050
|
constructor(host: UmbControllerHost);
|
|
485
1051
|
}
|
|
@@ -551,6 +1117,11 @@ export declare interface LogicType {
|
|
|
551
1117
|
value: string;
|
|
552
1118
|
}
|
|
553
1119
|
|
|
1120
|
+
export declare interface ManifestFormsAnalyticsWidget extends ManifestElement<FormsAnalyticsWidget> {
|
|
1121
|
+
type: typeof FORMS_ANALYTICS_WIDGET_TYPE;
|
|
1122
|
+
meta: MetaFormsAnalytics;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
554
1125
|
export declare interface ManifestFormsFieldPreview extends ManifestElement {
|
|
555
1126
|
type: "formsFieldPreview";
|
|
556
1127
|
}
|
|
@@ -561,6 +1132,35 @@ export declare interface ManifestFormsSettingValueConverterPreview extends Manif
|
|
|
561
1132
|
api: ApiLoaderProperty<FormsSettingValueConverterApi>;
|
|
562
1133
|
}
|
|
563
1134
|
|
|
1135
|
+
export declare interface MetaFormsAnalytics {
|
|
1136
|
+
size: MetaFormsAnalyticsSize;
|
|
1137
|
+
headline?: string | undefined;
|
|
1138
|
+
chartAlias?: string | undefined;
|
|
1139
|
+
aspect?: number | undefined;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
export declare type MetaFormsAnalyticsSize = "small" | "large";
|
|
1143
|
+
|
|
1144
|
+
export declare const Metric: {
|
|
1145
|
+
readonly UNDEFINED: "UNDEFINED";
|
|
1146
|
+
readonly ENTRIES: "entries";
|
|
1147
|
+
readonly WORKFLOW_ERRORS: "workflowErrors";
|
|
1148
|
+
readonly WORKFLOW_COUNT: "workflowCount";
|
|
1149
|
+
readonly STORE_RECORDS: "storeRecords";
|
|
1150
|
+
readonly RETENTION_DAYS: "retentionDays";
|
|
1151
|
+
readonly IS_MULTI_PAGE: "isMultiPage";
|
|
1152
|
+
readonly SOURCES: "sources";
|
|
1153
|
+
readonly PAGE_ID: "pageId";
|
|
1154
|
+
readonly PAGE_NAME: "pageName";
|
|
1155
|
+
readonly WORKFLOW_ID: "workflowId";
|
|
1156
|
+
readonly WORKFLOW_NAME: "workflowName";
|
|
1157
|
+
readonly TRIGGERED: "triggered";
|
|
1158
|
+
readonly FAILURES: "failures";
|
|
1159
|
+
readonly SUCCESS: "success";
|
|
1160
|
+
};
|
|
1161
|
+
|
|
1162
|
+
export declare type Metric = (typeof Metric)[keyof typeof Metric];
|
|
1163
|
+
|
|
564
1164
|
export declare const MultiPageNavigationOption: {
|
|
565
1165
|
readonly NONE: "None";
|
|
566
1166
|
readonly SHOW_AT_TOP: "ShowAtTop";
|