@yourself.create/ngx-form-designer 0.0.5 → 0.0.7
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/fesm2022/uch-web-ngx-form-designer.mjs +398 -96
- package/fesm2022/uch-web-ngx-form-designer.mjs.map +1 -1
- package/lib/data/data-provider.d.ts +10 -0
- package/lib/form-core/models.d.ts +3 -2
- package/lib/form-designer/data-panel/data-panel.component.d.ts +4 -2
- package/lib/form-designer/widget-inspector.component.d.ts +1 -1
- package/lib/form-renderer/json-form-renderer.component.d.ts +3 -1
- package/lib/widgets/field-widgets/select/select-widget.component.d.ts +12 -2
- package/package.json +1 -1
|
@@ -51,16 +51,26 @@ export declare class DefaultDataProvider extends DataProvider {
|
|
|
51
51
|
getValue(field: FieldSchema, engine?: FormEngine): Promise<unknown>;
|
|
52
52
|
resolveValue(field: FieldSchema, value: unknown): Promise<string>;
|
|
53
53
|
private getRawRows;
|
|
54
|
+
private getCurrentFieldValue;
|
|
54
55
|
private getGlobalRows;
|
|
56
|
+
private getOptionRowContexts;
|
|
57
|
+
private resolveCollectionRowContexts;
|
|
55
58
|
private resolveCollectionRows;
|
|
59
|
+
private extractRowContexts;
|
|
56
60
|
private extractRows;
|
|
57
61
|
private selectScalarRow;
|
|
62
|
+
private selectOptionContext;
|
|
58
63
|
private applyRowFilters;
|
|
64
|
+
private applyOptionRowFilters;
|
|
65
|
+
private matchesRowFilters;
|
|
59
66
|
private resolveFilters;
|
|
60
67
|
private resolveFilterValue;
|
|
61
68
|
private toOptionValue;
|
|
62
69
|
private toRowRecord;
|
|
63
70
|
private mapRowToOption;
|
|
71
|
+
private mapContextToOption;
|
|
72
|
+
private resolveOptionLabelPrefix;
|
|
73
|
+
private formatOptionLabel;
|
|
64
74
|
private getRuntimeOptions;
|
|
65
75
|
private shouldSuppressRemoteAccess;
|
|
66
76
|
private shouldUseLocalResolution;
|
|
@@ -139,8 +139,9 @@ export interface DataSourceConfig {
|
|
|
139
139
|
contextKey?: string;
|
|
140
140
|
datasourceId?: string;
|
|
141
141
|
rowsPath?: string;
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
formatNumericOptionLabels?: boolean;
|
|
143
|
+
optionLabelPrefixPath?: string;
|
|
144
|
+
optionLabelPrefixFieldId?: string;
|
|
144
145
|
rowSelectionMode?: 'first' | 'selected';
|
|
145
146
|
selectionFieldId?: string;
|
|
146
147
|
selectionMatchPath?: string;
|
|
@@ -32,6 +32,8 @@ export declare class DataPanelComponent implements OnChanges {
|
|
|
32
32
|
selectionFieldId?: string;
|
|
33
33
|
selectionMatchPath?: string;
|
|
34
34
|
childRowsPath?: string;
|
|
35
|
+
formatNumericOptionLabels: boolean;
|
|
36
|
+
optionLabelPrefixPath?: string;
|
|
35
37
|
rootPathOptions: string[];
|
|
36
38
|
rowPathOptions: string[];
|
|
37
39
|
staticValue?: any;
|
|
@@ -97,6 +99,7 @@ export declare class DataPanelComponent implements OnChanges {
|
|
|
97
99
|
showRowsPathControls(): boolean;
|
|
98
100
|
showScalarMappingControls(): boolean;
|
|
99
101
|
showOptionMappingControls(): boolean;
|
|
102
|
+
showOptionLabelFormattingControls(): boolean;
|
|
100
103
|
showStaticOptionsEditor(): boolean;
|
|
101
104
|
showStaticScalarEditor(): boolean;
|
|
102
105
|
staticScalarLabel(): string;
|
|
@@ -107,8 +110,7 @@ export declare class DataPanelComponent implements OnChanges {
|
|
|
107
110
|
availableRowPaths(): string[];
|
|
108
111
|
availableParentRowPaths(): string[];
|
|
109
112
|
availableChildCollectionPaths(): string[];
|
|
110
|
-
private
|
|
111
|
-
private shouldPersistStructuredValuePath;
|
|
113
|
+
private shouldPersistOptionLabelFormatting;
|
|
112
114
|
private usesOptionMapping;
|
|
113
115
|
private scalarTargetPath;
|
|
114
116
|
private readScalarTargetValue;
|
|
@@ -17,7 +17,7 @@ export declare class WidgetInspectorComponent {
|
|
|
17
17
|
private readonly readOnlyFieldSnapshot;
|
|
18
18
|
readonly inspectorField: import("@angular/core").Signal<FieldSchema>;
|
|
19
19
|
currentStyle: import("@angular/core").Signal<Partial<StyleTokenSet>>;
|
|
20
|
-
dataConsumer: import("@angular/core").Signal<"
|
|
20
|
+
dataConsumer: import("@angular/core").Signal<"value" | "image" | "none" | "list">;
|
|
21
21
|
bindingShape: import("@angular/core").Signal<import("@uch-web/ngx-form-designer").DataShape | null>;
|
|
22
22
|
dataTargetPath: import("@angular/core").Signal<string>;
|
|
23
23
|
getWidgetIcon(): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnInit, OnChanges, SimpleChanges, EventEmitter, OnDestroy } from '@angular/core';
|
|
2
|
-
import { DesignerEventApiDefinition, FieldDisplayLabel, FormSchema, UploadedFileRef, WidgetEventApiExecutor } from '../form-core/models';
|
|
2
|
+
import { DesignerEventApiDefinition, FieldSchema, FieldDisplayLabel, FormSchema, UploadedFileRef, WidgetEventApiExecutor } from '../form-core/models';
|
|
3
3
|
import { FormEngine } from '../form-core/form-engine';
|
|
4
4
|
import { DesignerStateService } from '../form-designer/designer-state.service';
|
|
5
5
|
import { type FieldDataAccessMap, type RuntimeFieldDataAccessApi } from '../data/runtime-field-data-access-registry.service';
|
|
@@ -7,6 +7,7 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
export interface FormFieldValue {
|
|
8
8
|
fieldName: string;
|
|
9
9
|
fieldValue: unknown;
|
|
10
|
+
fieldType?: FieldSchema['type'];
|
|
10
11
|
fieldLabel?: FieldDisplayLabel;
|
|
11
12
|
fileType?: string | string[];
|
|
12
13
|
data?: string | string[];
|
|
@@ -116,6 +117,7 @@ export declare class JsonFormRendererComponent implements OnInit, OnChanges, OnD
|
|
|
116
117
|
private readFileBytes;
|
|
117
118
|
private encodeBytesToBase64;
|
|
118
119
|
private toSingleOrList;
|
|
120
|
+
private normalizeFileFieldSubmitValue;
|
|
119
121
|
private getUploadedFileRefs;
|
|
120
122
|
private buildFieldLabelMetadata;
|
|
121
123
|
private mergeFileMetadata;
|
|
@@ -16,12 +16,14 @@ export declare class SelectWidgetComponent implements OnInit, OnDestroy {
|
|
|
16
16
|
loading: boolean;
|
|
17
17
|
loadError: string | null;
|
|
18
18
|
options: OptionSchema[];
|
|
19
|
+
private rawOptions;
|
|
19
20
|
protected readonly searchTerms$: Subject<string>;
|
|
20
21
|
private requestId;
|
|
21
22
|
private currentSearchTerm;
|
|
22
23
|
private runtimeManagedField;
|
|
23
24
|
private runtimeOptionsLoaded;
|
|
24
25
|
private readonly dependencyValueSnapshot;
|
|
26
|
+
private readonly displayDependencyValueSnapshot;
|
|
25
27
|
private cachedStyleSource;
|
|
26
28
|
private cachedWrapperStyles;
|
|
27
29
|
private cachedControlCssVars;
|
|
@@ -65,12 +67,14 @@ export declare class SelectWidgetComponent implements OnInit, OnDestroy {
|
|
|
65
67
|
onPillMouseDown(event: MouseEvent): void;
|
|
66
68
|
onPillClick(): void;
|
|
67
69
|
private getDependencyFieldIds;
|
|
70
|
+
private getDisplayDependencyFieldIds;
|
|
68
71
|
private toCssVarMap;
|
|
69
72
|
private loadOptions;
|
|
70
73
|
private syncEnabledState;
|
|
71
74
|
private ensureRuntimeOptionsLoaded;
|
|
72
|
-
private
|
|
73
|
-
private
|
|
75
|
+
private seedValueSnapshotFromValues;
|
|
76
|
+
private resolveFieldNames;
|
|
77
|
+
private haveFieldValuesChanged;
|
|
74
78
|
private hasSelectedValue;
|
|
75
79
|
private handleConfigChange;
|
|
76
80
|
private getConfigSignature;
|
|
@@ -78,6 +82,11 @@ export declare class SelectWidgetComponent implements OnInit, OnDestroy {
|
|
|
78
82
|
private stringifyValue;
|
|
79
83
|
private getAccessibleLabel;
|
|
80
84
|
private syncTemplateBindingCaches;
|
|
85
|
+
private setOptionsFromRaw;
|
|
86
|
+
private applyDisplayFormatting;
|
|
87
|
+
private formatOptionLabel;
|
|
88
|
+
private resolveOptionLabelPrefix;
|
|
89
|
+
private formatNumericLabel;
|
|
81
90
|
private toSafeNonNegativeInt;
|
|
82
91
|
private areApiCallsSuppressed;
|
|
83
92
|
private withSelectedValueFallbackOptions;
|
|
@@ -87,6 +96,7 @@ export declare class SelectWidgetComponent implements OnInit, OnDestroy {
|
|
|
87
96
|
private hasMeaningfulValue;
|
|
88
97
|
private syncStoredFieldLabel;
|
|
89
98
|
private getStoredFieldLabel;
|
|
99
|
+
private shouldUseStoredFallbackLabel;
|
|
90
100
|
private setStoredFieldLabel;
|
|
91
101
|
static ɵfac: i0.ɵɵFactoryDeclaration<SelectWidgetComponent, never>;
|
|
92
102
|
static ɵcmp: i0.ɵɵComponentDeclaration<SelectWidgetComponent, "app-select-widget", never, { "config": { "alias": "config"; "required": false; }; "engine": { "alias": "engine"; "required": false; }; "control": { "alias": "control"; "required": false; }; }, {}, never, never, true, never>;
|