@masterteam/form-builder 0.0.26 → 0.0.27
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masterteam/form-builder",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.27",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"directory": "../../../dist/masterteam/form-builder",
|
|
6
6
|
"linkDirectory": true,
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"rxjs": "^7.8.2",
|
|
20
20
|
"tailwindcss": "^4.2.2",
|
|
21
21
|
"tailwindcss-primeui": "^0.6.1",
|
|
22
|
-
"@masterteam/properties": "^0.0.
|
|
23
|
-
"@masterteam/
|
|
24
|
-
"@masterteam/
|
|
25
|
-
"@masterteam/
|
|
22
|
+
"@masterteam/properties": "^0.0.48",
|
|
23
|
+
"@masterteam/forms": "^0.0.75",
|
|
24
|
+
"@masterteam/icons": "^0.0.15",
|
|
25
|
+
"@masterteam/components": "^0.0.166"
|
|
26
26
|
},
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"exports": {
|
|
@@ -2,7 +2,7 @@ import * as _masterteam_form_builder from '@masterteam/form-builder';
|
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
3
|
import { OnInit } from '@angular/core';
|
|
4
4
|
import { LoadingStateShape, CrudStateBase, Response as Response$1 } from '@masterteam/components';
|
|
5
|
-
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
5
|
+
import { CdkDragDrop, CdkDrag } from '@angular/cdk/drag-drop';
|
|
6
6
|
import * as rxjs from 'rxjs';
|
|
7
7
|
import { StateContext } from '@ngxs/store';
|
|
8
8
|
|
|
@@ -13,6 +13,7 @@ declare enum FormBuilderActionKey {
|
|
|
13
13
|
AddSection = "addSection",
|
|
14
14
|
UpdateSection = "updateSection",
|
|
15
15
|
DeleteSection = "deleteSection",
|
|
16
|
+
ReorderSections = "reorderSections",
|
|
16
17
|
AddField = "addField",
|
|
17
18
|
UpdateField = "updateField",
|
|
18
19
|
DeleteField = "deleteField",
|
|
@@ -115,6 +116,10 @@ interface ReorderFieldPayload {
|
|
|
115
116
|
id: string;
|
|
116
117
|
order: number;
|
|
117
118
|
}
|
|
119
|
+
interface ReorderSectionPayload {
|
|
120
|
+
id: string;
|
|
121
|
+
order: number;
|
|
122
|
+
}
|
|
118
123
|
interface AddValidationPayload {
|
|
119
124
|
formulaTokens: string;
|
|
120
125
|
formulaText: string;
|
|
@@ -193,6 +198,7 @@ declare class FormBuilderFacade {
|
|
|
193
198
|
readonly isAddingSection: _angular_core.Signal<boolean>;
|
|
194
199
|
readonly isUpdatingSection: _angular_core.Signal<boolean>;
|
|
195
200
|
readonly isDeletingSection: _angular_core.Signal<boolean>;
|
|
201
|
+
readonly isReorderingSections: _angular_core.Signal<boolean>;
|
|
196
202
|
readonly isAddingField: _angular_core.Signal<boolean>;
|
|
197
203
|
readonly isUpdatingField: _angular_core.Signal<boolean>;
|
|
198
204
|
readonly isDeletingField: _angular_core.Signal<boolean>;
|
|
@@ -215,6 +221,7 @@ declare class FormBuilderFacade {
|
|
|
215
221
|
addSection(payload: AddSectionPayload): rxjs.Observable<void>;
|
|
216
222
|
updateSection(sectionId: string, payload: UpdateSectionPayload): rxjs.Observable<void>;
|
|
217
223
|
deleteSection(sectionId: string): rxjs.Observable<void>;
|
|
224
|
+
reorderSections(payload: ReorderSectionPayload[]): rxjs.Observable<void>;
|
|
218
225
|
addField(sectionId: string, payload: AddFieldPayload): rxjs.Observable<void>;
|
|
219
226
|
updateField(sectionId: string, fieldId: string, payload: UpdateFieldPayload): rxjs.Observable<void>;
|
|
220
227
|
deleteField(sectionId: string, fieldId: string): rxjs.Observable<void>;
|
|
@@ -283,6 +290,9 @@ declare class FormBuilder implements OnInit {
|
|
|
283
290
|
key: ScopeKey;
|
|
284
291
|
label: string;
|
|
285
292
|
}[]>;
|
|
293
|
+
readonly fieldDropListIds: _angular_core.Signal<string[]>;
|
|
294
|
+
private readonly toolboxDropListIds;
|
|
295
|
+
readonly fieldDropListConnections: _angular_core.Signal<string[]>;
|
|
286
296
|
/** Enriched sections for display */
|
|
287
297
|
readonly enrichedSections: _angular_core.Signal<EnrichedFormSection[]>;
|
|
288
298
|
readonly selectedRenderMode: _angular_core.Signal<FormRenderMode>;
|
|
@@ -348,6 +358,9 @@ declare class FormBuilder implements OnInit {
|
|
|
348
358
|
private formatContextKey;
|
|
349
359
|
private mergeContextOptions;
|
|
350
360
|
drop(event: CdkDragDrop<EnrichedFormField[] | PropertyItem[]>): void;
|
|
361
|
+
dropSection(event: CdkDragDrop<EnrichedFormSection[]>): void;
|
|
362
|
+
/** Sections list only accepts other sections — block fields/properties from dropping in. */
|
|
363
|
+
sectionsDropPredicate: (drag: CdkDrag) => boolean;
|
|
351
364
|
addSection(): void;
|
|
352
365
|
openPreview(): void;
|
|
353
366
|
onRenderModeChange(renderMode: FormRenderMode): void;
|
|
@@ -421,6 +434,11 @@ declare class DeleteSection {
|
|
|
421
434
|
static readonly type = "[FormBuilder] Delete Section";
|
|
422
435
|
constructor(sectionId: string);
|
|
423
436
|
}
|
|
437
|
+
declare class ReorderSections {
|
|
438
|
+
payload: ReorderSectionPayload[];
|
|
439
|
+
static readonly type = "[FormBuilder] Reorder Sections";
|
|
440
|
+
constructor(payload: ReorderSectionPayload[]);
|
|
441
|
+
}
|
|
424
442
|
declare class AddField {
|
|
425
443
|
sectionId: string;
|
|
426
444
|
payload: AddFieldPayload;
|
|
@@ -501,6 +519,9 @@ declare class FormBuilderState extends CrudStateBase<FormSection, FormBuilderSta
|
|
|
501
519
|
updateFormSettings(ctx: StateContext<FormBuilderStateModel>, action: UpdateFormSettings): rxjs.Observable<Response$1<FormConfiguration>> | undefined;
|
|
502
520
|
addSection(ctx: StateContext<FormBuilderStateModel>, action: AddSection): rxjs.Observable<Response$1<FormSection>>;
|
|
503
521
|
updateSection(ctx: StateContext<FormBuilderStateModel>, action: UpdateSection): rxjs.Observable<Response$1<FormSection>>;
|
|
522
|
+
reorderSections(ctx: StateContext<FormBuilderStateModel>, action: ReorderSections): rxjs.Observable<Response$1<{
|
|
523
|
+
sections: FormSection[];
|
|
524
|
+
}>>;
|
|
504
525
|
deleteSection(ctx: StateContext<FormBuilderStateModel>, action: DeleteSection): rxjs.Observable<Response$1<{
|
|
505
526
|
id: string;
|
|
506
527
|
}>>;
|
|
@@ -524,5 +545,5 @@ declare class FormBuilderState extends CrudStateBase<FormSection, FormBuilderSta
|
|
|
524
545
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FormBuilderState>;
|
|
525
546
|
}
|
|
526
547
|
|
|
527
|
-
export { AddField, AddSection, AddValidation, DeleteField, DeleteSection, DeleteValidation, FormBuilder, FormBuilderActionKey, FormBuilderFacade, FormBuilderState, GetFormConfiguration, MoveField, ReorderFields, ResetFormBuilderState, ResetFormConfiguration, SetModuleInfo, SetPreviewInfo, SetProperties, ToggleValidationActive, UpdateField, UpdateFormSettings, UpdateSection, UpdateValidation };
|
|
528
|
-
export type { AddFieldPayload, AddSectionPayload, AddValidationPayload, EnrichedFormField, EnrichedFormSection, FieldWidth, FormBuilderMode, FormBuilderStateModel, FormConfiguration, FormField, FormRenderMode, FormSection, MoveFieldPayload, PreviewInfo, PropertyItem, ReorderFieldPayload, Response, ToggleValidationPayload, UpdateFieldPayload, UpdateFormSettingsPayload, UpdateSectionPayload, UpdateValidationPayload, ValidationRule, ValidationSeverity };
|
|
548
|
+
export { AddField, AddSection, AddValidation, DeleteField, DeleteSection, DeleteValidation, FormBuilder, FormBuilderActionKey, FormBuilderFacade, FormBuilderState, GetFormConfiguration, MoveField, ReorderFields, ReorderSections, ResetFormBuilderState, ResetFormConfiguration, SetModuleInfo, SetPreviewInfo, SetProperties, ToggleValidationActive, UpdateField, UpdateFormSettings, UpdateSection, UpdateValidation };
|
|
549
|
+
export type { AddFieldPayload, AddSectionPayload, AddValidationPayload, EnrichedFormField, EnrichedFormSection, FieldWidth, FormBuilderMode, FormBuilderStateModel, FormConfiguration, FormField, FormRenderMode, FormSection, MoveFieldPayload, PreviewInfo, PropertyItem, ReorderFieldPayload, ReorderSectionPayload, Response, ToggleValidationPayload, UpdateFieldPayload, UpdateFormSettingsPayload, UpdateSectionPayload, UpdateValidationPayload, ValidationRule, ValidationSeverity };
|