@masterteam/form-builder 0.0.25 → 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>;
|
|
@@ -243,6 +250,7 @@ declare class FormBuilder implements OnInit {
|
|
|
243
250
|
private readonly modalService;
|
|
244
251
|
private readonly confirmationService;
|
|
245
252
|
private readonly translocoService;
|
|
253
|
+
private readonly activeLang;
|
|
246
254
|
protected readonly facade: FormBuilderFacade;
|
|
247
255
|
private readonly contextService;
|
|
248
256
|
private readonly popovers;
|
|
@@ -282,6 +290,9 @@ declare class FormBuilder implements OnInit {
|
|
|
282
290
|
key: ScopeKey;
|
|
283
291
|
label: string;
|
|
284
292
|
}[]>;
|
|
293
|
+
readonly fieldDropListIds: _angular_core.Signal<string[]>;
|
|
294
|
+
private readonly toolboxDropListIds;
|
|
295
|
+
readonly fieldDropListConnections: _angular_core.Signal<string[]>;
|
|
285
296
|
/** Enriched sections for display */
|
|
286
297
|
readonly enrichedSections: _angular_core.Signal<EnrichedFormSection[]>;
|
|
287
298
|
readonly selectedRenderMode: _angular_core.Signal<FormRenderMode>;
|
|
@@ -347,6 +358,9 @@ declare class FormBuilder implements OnInit {
|
|
|
347
358
|
private formatContextKey;
|
|
348
359
|
private mergeContextOptions;
|
|
349
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;
|
|
350
364
|
addSection(): void;
|
|
351
365
|
openPreview(): void;
|
|
352
366
|
onRenderModeChange(renderMode: FormRenderMode): void;
|
|
@@ -420,6 +434,11 @@ declare class DeleteSection {
|
|
|
420
434
|
static readonly type = "[FormBuilder] Delete Section";
|
|
421
435
|
constructor(sectionId: string);
|
|
422
436
|
}
|
|
437
|
+
declare class ReorderSections {
|
|
438
|
+
payload: ReorderSectionPayload[];
|
|
439
|
+
static readonly type = "[FormBuilder] Reorder Sections";
|
|
440
|
+
constructor(payload: ReorderSectionPayload[]);
|
|
441
|
+
}
|
|
423
442
|
declare class AddField {
|
|
424
443
|
sectionId: string;
|
|
425
444
|
payload: AddFieldPayload;
|
|
@@ -500,6 +519,9 @@ declare class FormBuilderState extends CrudStateBase<FormSection, FormBuilderSta
|
|
|
500
519
|
updateFormSettings(ctx: StateContext<FormBuilderStateModel>, action: UpdateFormSettings): rxjs.Observable<Response$1<FormConfiguration>> | undefined;
|
|
501
520
|
addSection(ctx: StateContext<FormBuilderStateModel>, action: AddSection): rxjs.Observable<Response$1<FormSection>>;
|
|
502
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
|
+
}>>;
|
|
503
525
|
deleteSection(ctx: StateContext<FormBuilderStateModel>, action: DeleteSection): rxjs.Observable<Response$1<{
|
|
504
526
|
id: string;
|
|
505
527
|
}>>;
|
|
@@ -523,5 +545,5 @@ declare class FormBuilderState extends CrudStateBase<FormSection, FormBuilderSta
|
|
|
523
545
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FormBuilderState>;
|
|
524
546
|
}
|
|
525
547
|
|
|
526
|
-
export { AddField, AddSection, AddValidation, DeleteField, DeleteSection, DeleteValidation, FormBuilder, FormBuilderActionKey, FormBuilderFacade, FormBuilderState, GetFormConfiguration, MoveField, ReorderFields, ResetFormBuilderState, ResetFormConfiguration, SetModuleInfo, SetPreviewInfo, SetProperties, ToggleValidationActive, UpdateField, UpdateFormSettings, UpdateSection, UpdateValidation };
|
|
527
|
-
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 };
|