@yourself.create/ngx-form-designer 0.0.13 → 0.0.14
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 +132 -19
- package/fesm2022/uch-web-ngx-form-designer.mjs.map +1 -1
- package/lib/form-core/form-event-runner.d.ts +2 -0
- package/lib/form-core/models.d.ts +5 -1
- package/lib/form-designer/events-workspace.component.d.ts +5 -2
- package/lib/form-designer/widget-inspector.component.d.ts +1 -1
- package/lib/widgets/field-widgets/text-field/text-field.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -27,6 +27,8 @@ export declare class FormEventRunner {
|
|
|
27
27
|
private clearInactiveApiBindingDatasources;
|
|
28
28
|
private executeAction;
|
|
29
29
|
private handleSetValue;
|
|
30
|
+
private handleClearFields;
|
|
31
|
+
private applyFieldValue;
|
|
30
32
|
private handleApiAction;
|
|
31
33
|
private handleNavigateAction;
|
|
32
34
|
private evaluateNavigateCondition;
|
|
@@ -173,6 +173,10 @@ export interface WidgetEventActionSetValue {
|
|
|
173
173
|
valueLiteral?: unknown;
|
|
174
174
|
sourceFieldId?: string;
|
|
175
175
|
}
|
|
176
|
+
export interface WidgetEventActionClearFields {
|
|
177
|
+
type: 'clearFields';
|
|
178
|
+
targetFieldIds: string[];
|
|
179
|
+
}
|
|
176
180
|
export interface WidgetEventActionLog {
|
|
177
181
|
type: 'log';
|
|
178
182
|
message?: string;
|
|
@@ -192,7 +196,7 @@ export interface WidgetEventActionNavigate {
|
|
|
192
196
|
targetPageId: string;
|
|
193
197
|
when?: LogicGroup;
|
|
194
198
|
}
|
|
195
|
-
export type WidgetEventAction = WidgetEventActionSetValue | WidgetEventActionLog | WidgetEventActionApi | WidgetEventActionNavigate;
|
|
199
|
+
export type WidgetEventAction = WidgetEventActionSetValue | WidgetEventActionClearFields | WidgetEventActionLog | WidgetEventActionApi | WidgetEventActionNavigate;
|
|
196
200
|
export interface WidgetEventApiExecutionRequest {
|
|
197
201
|
eventId: string;
|
|
198
202
|
action: WidgetEventActionApi;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConditionOperator, DesignerEventApiBrowser, DesignerEventApiDefinition, EventsWorkspaceSavePayload, FieldSchema, FormSchema, LogicGroup, WidgetEventAction, WidgetEventActionApi, WidgetEventActionLog, WidgetEventActionNavigate, WidgetEventActionSetValue, WidgetEventBinding, WidgetEventType } from '../form-core/models';
|
|
1
|
+
import { ConditionOperator, DesignerEventApiBrowser, DesignerEventApiDefinition, EventsWorkspaceSavePayload, FieldSchema, FormSchema, LogicGroup, WidgetEventAction, WidgetEventActionApi, WidgetEventActionClearFields, WidgetEventActionLog, WidgetEventActionNavigate, WidgetEventActionSetValue, WidgetEventBinding, WidgetEventType } from '../form-core/models';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
type WorkspaceTab = 'fields' | 'input' | 'output';
|
|
4
4
|
interface WorkspaceFieldItem {
|
|
@@ -89,7 +89,7 @@ export declare class EventsWorkspaceComponent {
|
|
|
89
89
|
removeAction(bindingIndex: number, actionIndex: number): void;
|
|
90
90
|
setActionType(action: WidgetEventAction, type: WidgetEventAction['type']): void;
|
|
91
91
|
updateActionType(bindingIndex: number, actionIndex: number, type: WidgetEventAction['type']): void;
|
|
92
|
-
patchAction(bindingIndex: number, actionIndex: number, patch: Partial<WidgetEventActionSetValue> | Partial<WidgetEventActionLog> | Partial<WidgetEventActionApi> | Partial<WidgetEventActionNavigate>): void;
|
|
92
|
+
patchAction(bindingIndex: number, actionIndex: number, patch: Partial<WidgetEventActionSetValue> | Partial<WidgetEventActionClearFields> | Partial<WidgetEventActionLog> | Partial<WidgetEventActionApi> | Partial<WidgetEventActionNavigate>): void;
|
|
93
93
|
patchApiAction(action: WidgetEventAction, patch: Partial<WidgetEventActionApi>): void;
|
|
94
94
|
getSelectableActionFields(action: WidgetEventAction): WorkspaceFieldItem[];
|
|
95
95
|
actionFieldSearch(action: WidgetEventAction): string;
|
|
@@ -114,6 +114,7 @@ export declare class EventsWorkspaceComponent {
|
|
|
114
114
|
selectApiOption(action: WidgetEventAction, api: DesignerEventApiDefinition): Promise<void>;
|
|
115
115
|
saveEventConfig(): void;
|
|
116
116
|
asSetValue(action: WidgetEventAction): WidgetEventActionSetValue;
|
|
117
|
+
asClearFields(action: WidgetEventAction): WidgetEventActionClearFields;
|
|
117
118
|
asLog(action: WidgetEventAction): WidgetEventActionLog;
|
|
118
119
|
asApi(action: WidgetEventAction): WidgetEventActionApi;
|
|
119
120
|
asNavigate(action: WidgetEventAction): WidgetEventActionNavigate;
|
|
@@ -134,6 +135,8 @@ export declare class EventsWorkspaceComponent {
|
|
|
134
135
|
trackActionByIndex(index: number): number;
|
|
135
136
|
trackApiOption(_: number, api: DesignerEventApiDefinition): string;
|
|
136
137
|
hasApiAction(binding: WidgetEventBinding): boolean;
|
|
138
|
+
isClearFieldSelected(action: WidgetEventActionClearFields, fieldId: string): boolean;
|
|
139
|
+
toggleClearFieldTarget(action: WidgetEventAction, fieldId: string, selected: boolean): void;
|
|
137
140
|
canSelectApiAction(binding: WidgetEventBinding, actionIndex: number): boolean;
|
|
138
141
|
isEventExpanded(bindingId: string): boolean;
|
|
139
142
|
toggleEventExpansion(bindingId: string): void;
|
|
@@ -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<"image" | "
|
|
20
|
+
dataConsumer: import("@angular/core").Signal<"image" | "value" | "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;
|
|
@@ -55,6 +55,7 @@ export declare class TextFieldWidgetComponent implements OnInit, OnDestroy {
|
|
|
55
55
|
private refreshValueFromDataSource;
|
|
56
56
|
private hasResolvedRows;
|
|
57
57
|
private clearResolvedValue;
|
|
58
|
+
private applyResolvedValue;
|
|
58
59
|
private hasSelectedRowMatch;
|
|
59
60
|
private getDataConfigSignature;
|
|
60
61
|
private seedDependencySnapshotFromEngine;
|