@ngstarter-ui/components 21.0.60 → 21.0.61
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/ai/component-registry.json +10 -1
- package/fesm2022/ngstarter-ui-components-form-builder-plain-text-settings-D_MiuzJL.mjs +150 -0
- package/fesm2022/ngstarter-ui-components-form-builder-plain-text-settings-D_MiuzJL.mjs.map +1 -0
- package/fesm2022/ngstarter-ui-components-form-builder.mjs +719 -29
- package/fesm2022/ngstarter-ui-components-form-builder.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ngstarter-ui-components-form-builder.d.ts +63 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngstarter-ui/components",
|
|
3
3
|
"description": "NgStarter - AI-friendly Enterprise Angular UI Components and Admin Panel",
|
|
4
|
-
"version": "21.0.
|
|
4
|
+
"version": "21.0.61",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/elementarlabsdev/ngstarter.git"
|
|
@@ -88,10 +88,22 @@ interface FormBuilderLayoutItem {
|
|
|
88
88
|
kind: 'field' | 'section';
|
|
89
89
|
id: string;
|
|
90
90
|
}
|
|
91
|
+
interface FormBuilderStep {
|
|
92
|
+
id: string;
|
|
93
|
+
title: string;
|
|
94
|
+
description?: string;
|
|
95
|
+
optional?: boolean;
|
|
96
|
+
items: FormBuilderLayoutItem[];
|
|
97
|
+
}
|
|
98
|
+
interface FormBuilderFlow {
|
|
99
|
+
mode: 'single' | 'steps';
|
|
100
|
+
steps?: FormBuilderStep[];
|
|
101
|
+
}
|
|
91
102
|
interface FormBuilderSchema {
|
|
92
103
|
title?: string;
|
|
93
104
|
fields?: FormBuilderField[];
|
|
94
105
|
layout?: FormBuilderLayoutItem[];
|
|
106
|
+
flow?: FormBuilderFlow;
|
|
95
107
|
sections: FormBuilderSection[];
|
|
96
108
|
}
|
|
97
109
|
interface FormBuilderFieldRenderContext {
|
|
@@ -227,15 +239,19 @@ interface FormBuilderFieldTreeNode {
|
|
|
227
239
|
name?: string;
|
|
228
240
|
type: string;
|
|
229
241
|
icon: string;
|
|
230
|
-
kind: 'section' | 'field';
|
|
242
|
+
kind: 'step' | 'section' | 'field';
|
|
231
243
|
field?: FormBuilderField;
|
|
232
244
|
section?: FormBuilderSection;
|
|
245
|
+
step?: FormBuilderStep;
|
|
233
246
|
children?: FormBuilderFieldTreeNode[];
|
|
234
247
|
}
|
|
235
248
|
interface FormBuilderCanvasItem extends FormBuilderLayoutItem {
|
|
236
249
|
field?: FormBuilderField;
|
|
237
250
|
section?: FormBuilderSection;
|
|
238
251
|
}
|
|
252
|
+
interface FormBuilderCanvasStep extends FormBuilderStep {
|
|
253
|
+
items: FormBuilderCanvasItem[];
|
|
254
|
+
}
|
|
239
255
|
type FormBuilderNativeDragItem = {
|
|
240
256
|
kind: 'field';
|
|
241
257
|
definition: FormBuilderFieldDefinition;
|
|
@@ -294,10 +310,13 @@ declare class FormBuilder implements OnDestroy {
|
|
|
294
310
|
protected readonly filteredMimeTypes: _angular_core.Signal<string[]>;
|
|
295
311
|
protected readonly validationSettingsField: FormBuilderField;
|
|
296
312
|
protected readonly canvasItems: _angular_core.Signal<FormBuilderCanvasItem[]>;
|
|
313
|
+
protected readonly stepsMode: _angular_core.Signal<boolean>;
|
|
314
|
+
protected readonly canvasSteps: _angular_core.Signal<FormBuilderCanvasStep[]>;
|
|
297
315
|
protected readonly layoutDefinitions: _angular_core.Signal<FormBuilderFieldDefinition[]>;
|
|
298
316
|
protected readonly paletteGroups: _angular_core.Signal<FormBuilderPaletteGroup[]>;
|
|
299
317
|
protected readonly selectedField: _angular_core.Signal<FormBuilderField | null>;
|
|
300
318
|
protected readonly selectedSection: _angular_core.Signal<FormBuilderSection | null>;
|
|
319
|
+
protected readonly selectedStep: _angular_core.Signal<FormBuilderStep | null>;
|
|
301
320
|
protected readonly fieldTree: _angular_core.Signal<FormBuilderFieldTreeNode[]>;
|
|
302
321
|
protected readonly fieldTreeChildrenAccessor: (node: FormBuilderFieldTreeNode) => FormBuilderFieldTreeNode[];
|
|
303
322
|
protected readonly hasFieldTreeChildren: (_: number, node: FormBuilderFieldTreeNode) => boolean;
|
|
@@ -306,12 +325,15 @@ declare class FormBuilder implements OnDestroy {
|
|
|
306
325
|
protected readonly fieldTreeDropPredicate: (source: FormBuilderFieldTreeNode, target: FormBuilderFieldTreeNode, position: TreeNodeDropPosition) => boolean;
|
|
307
326
|
protected readonly updateSelectedField: (changes: Partial<FormBuilderField>) => void;
|
|
308
327
|
protected readonly updateSelectedSection: (changes: Partial<FormBuilderSection>) => void;
|
|
328
|
+
protected readonly updateSelectedStep: (changes: Partial<FormBuilderStep>) => void;
|
|
309
329
|
ngOnDestroy(): void;
|
|
310
330
|
protected paletteDragStarted(event: DragEvent, definition: FormBuilderFieldDefinition): void;
|
|
311
331
|
protected sectionPaletteDragStarted(event: DragEvent): void;
|
|
312
332
|
protected paletteDragEnded(): void;
|
|
313
333
|
protected paletteClicked(definition: FormBuilderFieldDefinition): void;
|
|
314
334
|
protected nativeCanvasDragOver(event: DragEvent): void;
|
|
335
|
+
protected nativeStepDragOver(event: DragEvent, step: FormBuilderStep): void;
|
|
336
|
+
protected nativeStepDrop(event: DragEvent, step: FormBuilderStep): void;
|
|
315
337
|
protected nativeFieldDragOver(event: DragEvent, containerId: string): void;
|
|
316
338
|
protected nativeSectionDragOver(event: DragEvent, section: FormBuilderSection): void;
|
|
317
339
|
protected nativeSectionDrop(event: DragEvent, section: FormBuilderSection): void;
|
|
@@ -323,6 +345,7 @@ declare class FormBuilder implements OnDestroy {
|
|
|
323
345
|
protected isNativeDropTarget(containerId: string, index: number): boolean;
|
|
324
346
|
protected addField(definition: FormBuilderFieldDefinition, sectionId?: string): void;
|
|
325
347
|
protected addSection(): void;
|
|
348
|
+
protected addStep(): void;
|
|
326
349
|
protected openPreview(template: TemplateRef<unknown>): void;
|
|
327
350
|
protected openAddValidatorDialog(template: TemplateRef<unknown>): void;
|
|
328
351
|
protected openEditValidatorDialog(template: TemplateRef<unknown>, rule: FormBuilderValidationRule, index: number): void;
|
|
@@ -349,9 +372,12 @@ declare class FormBuilder implements OnDestroy {
|
|
|
349
372
|
private normalizeValidationRule;
|
|
350
373
|
protected removeSection(section: FormBuilderSection): void;
|
|
351
374
|
protected updateSection(section: FormBuilderSection, changes: Partial<FormBuilderSection>): void;
|
|
375
|
+
protected updateStep(step: FormBuilderStep, changes: Partial<FormBuilderStep>): void;
|
|
376
|
+
protected removeStep(step: FormBuilderStep): void;
|
|
352
377
|
protected isSectionCollapsed(section: FormBuilderSection): boolean;
|
|
353
378
|
protected selectField(field: FormBuilderField, section?: FormBuilderSection): void;
|
|
354
379
|
protected selectSection(section: FormBuilderSection): void;
|
|
380
|
+
protected selectStep(step: FormBuilderStep): void;
|
|
355
381
|
protected selectCanvasField(field: FormBuilderField, section?: FormBuilderSection): void;
|
|
356
382
|
protected selectFieldTreeNode(node: FormBuilderFieldTreeNode): void;
|
|
357
383
|
protected toggleFieldTreeNode(tree: Tree<FormBuilderFieldTreeNode>, node: FormBuilderFieldTreeNode, event: MouseEvent): void;
|
|
@@ -361,6 +387,7 @@ declare class FormBuilder implements OnDestroy {
|
|
|
361
387
|
protected confirmRemoveField(field: FormBuilderField): void;
|
|
362
388
|
private removeField;
|
|
363
389
|
protected sectionDropListId(section: FormBuilderSection): string;
|
|
390
|
+
protected stepDropListId(step: FormBuilderStep): string;
|
|
364
391
|
protected fieldDropListId(field: FormBuilderField): string;
|
|
365
392
|
protected rootDropListId(): string;
|
|
366
393
|
protected previewControl(field: FormBuilderField): FormControl;
|
|
@@ -385,21 +412,35 @@ declare class FormBuilder implements OnDestroy {
|
|
|
385
412
|
private getCanvasAnimatedItemKey;
|
|
386
413
|
private insertNativeField;
|
|
387
414
|
private insertNativeSection;
|
|
415
|
+
private insertNativeSectionIntoStep;
|
|
388
416
|
private resolveNativeDragItem;
|
|
389
417
|
private resolveNativeDropIndex;
|
|
390
418
|
private setPaletteDragImage;
|
|
391
419
|
private createField;
|
|
392
420
|
private defaultWidth;
|
|
393
421
|
private resolveCanvasItems;
|
|
422
|
+
private resolveCanvasSteps;
|
|
423
|
+
private resolveLayoutItems;
|
|
394
424
|
private normalizedLayout;
|
|
425
|
+
private isStepsMode;
|
|
426
|
+
private normalizedSteps;
|
|
427
|
+
private ensureStepsFlow;
|
|
428
|
+
private validLayoutItemSet;
|
|
429
|
+
private insertStepItem;
|
|
430
|
+
private removeStepItemReferences;
|
|
431
|
+
private findStepContainingItem;
|
|
432
|
+
private isStepDropListId;
|
|
433
|
+
private findStepByDropListId;
|
|
395
434
|
private detachFieldFromLocation;
|
|
396
435
|
private insertFieldIntoTreeSection;
|
|
397
436
|
private insertFieldAroundTreeSection;
|
|
437
|
+
private insertFieldAroundStepTreeItem;
|
|
398
438
|
private resolveTreeFieldInsertTarget;
|
|
399
439
|
private insertRootFieldIntoLayout;
|
|
400
440
|
private resetFieldTreeAfterRejectedDrop;
|
|
401
441
|
private canDropFieldTreeNode;
|
|
402
442
|
private dropFieldTreeSection;
|
|
443
|
+
private dropFieldTreeStep;
|
|
403
444
|
private isRootFieldTreeNode;
|
|
404
445
|
private restoreFieldTreeExpansion;
|
|
405
446
|
private expandFieldTreeOwner;
|
|
@@ -410,13 +451,16 @@ declare class FormBuilder implements OnDestroy {
|
|
|
410
451
|
private findFieldTreeNodeElement;
|
|
411
452
|
private scrollCanvasFieldIntoView;
|
|
412
453
|
private scrollCanvasSectionIntoView;
|
|
454
|
+
private scrollCanvasStepIntoView;
|
|
413
455
|
private scrollCanvasItemIntoView;
|
|
414
456
|
private findCanvasFieldElement;
|
|
415
457
|
private findCanvasSectionElement;
|
|
458
|
+
private findCanvasStepElement;
|
|
416
459
|
private syncPreviewControl;
|
|
417
460
|
private fieldInitialValue;
|
|
418
461
|
private scrollElementFullyIntoView;
|
|
419
462
|
private afterNextPaint;
|
|
463
|
+
private upsertStepTreeNode;
|
|
420
464
|
private upsertSectionTreeNode;
|
|
421
465
|
private upsertFieldTreeNode;
|
|
422
466
|
private getCachedFieldTreeNode;
|
|
@@ -442,6 +486,9 @@ interface FormRendererCanvasItem extends FormBuilderLayoutItem {
|
|
|
442
486
|
field?: FormBuilderField;
|
|
443
487
|
section?: FormBuilderSection;
|
|
444
488
|
}
|
|
489
|
+
interface FormRendererStep extends FormBuilderStep {
|
|
490
|
+
items: FormRendererCanvasItem[];
|
|
491
|
+
}
|
|
445
492
|
declare class FormRenderer {
|
|
446
493
|
private readonly providedItems;
|
|
447
494
|
private readonly providedFields;
|
|
@@ -458,6 +505,8 @@ declare class FormRenderer {
|
|
|
458
505
|
readonly formReady: _angular_core.OutputEmitterRef<FormGroup<any>>;
|
|
459
506
|
protected readonly definitions: _angular_core.Signal<FormBuilderFieldDefinition[]>;
|
|
460
507
|
protected readonly visibleCanvasItems: _angular_core.Signal<FormRendererCanvasItem[]>;
|
|
508
|
+
protected readonly stepsMode: _angular_core.Signal<boolean>;
|
|
509
|
+
protected readonly visibleSteps: _angular_core.Signal<FormRendererStep[]>;
|
|
461
510
|
protected readonly validatorDefinitions: _angular_core.Signal<_ngstarter_ui_components_form_builder.FormBuilderValidatorDefinition[]>;
|
|
462
511
|
protected readonly formGroup: _angular_core.Signal<FormGroup<any>>;
|
|
463
512
|
constructor();
|
|
@@ -479,9 +528,13 @@ declare class FormRenderer {
|
|
|
479
528
|
private applyCalculations;
|
|
480
529
|
private applyRepeaterCalculations;
|
|
481
530
|
private applyCalculatedFields;
|
|
531
|
+
private applyPlainTextFields;
|
|
532
|
+
private renderPlainTextTemplate;
|
|
482
533
|
private orderCalculatedFields;
|
|
483
534
|
private scopeFields;
|
|
484
535
|
private writeCalculatedValue;
|
|
536
|
+
private writeDisplayValue;
|
|
537
|
+
private getOrCreateOrphanControl;
|
|
485
538
|
private coerceCalculatedValue;
|
|
486
539
|
private emptyCalculatedValue;
|
|
487
540
|
private setCalculationError;
|
|
@@ -491,6 +544,10 @@ declare class FormRenderer {
|
|
|
491
544
|
private fieldInitialValue;
|
|
492
545
|
private allowsNullValue;
|
|
493
546
|
private resolveCanvasItems;
|
|
547
|
+
private resolveSteps;
|
|
548
|
+
private resolveLayoutItems;
|
|
549
|
+
private isStepsMode;
|
|
550
|
+
private normalizedSteps;
|
|
494
551
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormRenderer, never>;
|
|
495
552
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormRenderer, "ngs-form-renderer", ["ngsFormRenderer"], { "schema": { "alias": "schema"; "required": true; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "showSubmit": { "alias": "showSubmit"; "required": false; "isSignal": true; }; "submitLabel": { "alias": "submitLabel"; "required": false; "isSignal": true; }; "uploadCallback": { "alias": "uploadCallback"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "formSubmit": "formSubmit"; "formReady": "formReady"; }, never, never, true, never>;
|
|
496
553
|
}
|
|
@@ -510,6 +567,9 @@ declare class FormBuilderFieldHost {
|
|
|
510
567
|
protected readonly controlStateVersion: _angular_core.WritableSignal<number>;
|
|
511
568
|
protected readonly textInputType: _angular_core.Signal<"email" | "text" | "number">;
|
|
512
569
|
protected readonly calculatedInputType: _angular_core.Signal<"text" | "number">;
|
|
570
|
+
protected readonly plainTextValue: _angular_core.Signal<string>;
|
|
571
|
+
protected readonly alertVariant: _angular_core.Signal<string>;
|
|
572
|
+
protected readonly alertFieldPath: _angular_core.Signal<string>;
|
|
513
573
|
protected readonly radioOrientation: _angular_core.Signal<RadioGroupOrientation>;
|
|
514
574
|
protected readonly uploadAccept: _angular_core.Signal<any>;
|
|
515
575
|
protected readonly uploadDisabled: _angular_core.Signal<boolean>;
|
|
@@ -593,6 +653,7 @@ declare class FormBuilderSettingsHost {
|
|
|
593
653
|
private resolveOwnSettingsSchema;
|
|
594
654
|
private inferSettingsInheritance;
|
|
595
655
|
private baseSettingsSchema;
|
|
656
|
+
private withFieldPathInfo;
|
|
596
657
|
private withRegisteredSelectDataSources;
|
|
597
658
|
private withSelectDataSourceOptions;
|
|
598
659
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormBuilderSettingsHost, never>;
|
|
@@ -655,4 +716,4 @@ declare class BasicFormBuilderSectionSettings {
|
|
|
655
716
|
}
|
|
656
717
|
|
|
657
718
|
export { BasicFormBuilderFieldSettings, BasicFormBuilderLayoutSettings, BasicFormBuilderSectionSettings, DEFAULT_FORM_BUILDER_CALCULATION_ENGINE, DEFAULT_FORM_BUILDER_FIELDS, DEFAULT_FORM_BUILDER_ITEMS, DEFAULT_FORM_BUILDER_VALIDATORS, FORM_BUILDER_CALCULATION_ENGINE, FORM_BUILDER_FIELDS, FORM_BUILDER_FIELD_BASE_SETTINGS_SCHEMA, FORM_BUILDER_INPUT_FIELD_BASE_SETTINGS_SCHEMA, FORM_BUILDER_ITEMS, FORM_BUILDER_LAYOUT_BASE_SETTINGS_SCHEMA, FORM_BUILDER_LAYOUT_CONTAINER_BASE_SETTINGS_SCHEMA, FORM_BUILDER_SECTION_BASE_SETTINGS_SCHEMA, FORM_BUILDER_SELECT_DATA_SOURCES, FORM_BUILDER_SETTINGS, FORM_BUILDER_STATIC_BASE_SETTINGS_SCHEMA, FORM_BUILDER_UPLOAD_CALLBACK, FORM_BUILDER_VALIDATORS, FormBuilder, FormBuilderFieldHost, FormBuilderSettingsHost, FormLogic, FormRenderer, asyncValidatorsFromRules, createDefaultFormBuilderSchema, formBuilderField, formBuilderItem, formBuilderSettings, formBuilderValidator, mergeFormBuilderValidatorDefinitions, provideFormBuilder, provideFormBuilderField, provideFormBuilderFields, provideFormBuilderSelectDataSource, provideFormBuilderSelectDataSources, provideFormBuilderValidator, provideFormBuilderValidators, validatorsFromRules };
|
|
658
|
-
export type { FormBuilderCalculationContext, FormBuilderCalculationEngine, FormBuilderCalculationResult, FormBuilderComponentImporter, FormBuilderField, FormBuilderFieldChange, FormBuilderFieldDefinition, FormBuilderFieldRenderContext, FormBuilderFieldSettingsContext, FormBuilderFieldWidth, FormBuilderItemDefinition, FormBuilderItemKind, FormBuilderLayoutItem, FormBuilderOption, FormBuilderSchema, FormBuilderSection, FormBuilderSectionSettingsContext, FormBuilderSelectDataSourceDefinition, FormBuilderSelectDataSourceOptions, FormBuilderSelectOptionsSource, FormBuilderSettingsConfig, FormBuilderSettingsContext, FormBuilderSettingsDefinition, FormBuilderSettingsInheritance, FormBuilderSettingsSchemaFactory, FormBuilderUploadCallback, FormBuilderUploadContext, FormBuilderValidationRule, FormBuilderValidatorDefinition, FormBuilderValidatorFactory, FormBuilderValidatorValueType };
|
|
719
|
+
export type { FormBuilderCalculationContext, FormBuilderCalculationEngine, FormBuilderCalculationResult, FormBuilderComponentImporter, FormBuilderField, FormBuilderFieldChange, FormBuilderFieldDefinition, FormBuilderFieldRenderContext, FormBuilderFieldSettingsContext, FormBuilderFieldWidth, FormBuilderFlow, FormBuilderItemDefinition, FormBuilderItemKind, FormBuilderLayoutItem, FormBuilderOption, FormBuilderSchema, FormBuilderSection, FormBuilderSectionSettingsContext, FormBuilderSelectDataSourceDefinition, FormBuilderSelectDataSourceOptions, FormBuilderSelectOptionsSource, FormBuilderSettingsConfig, FormBuilderSettingsContext, FormBuilderSettingsDefinition, FormBuilderSettingsInheritance, FormBuilderSettingsSchemaFactory, FormBuilderStep, FormBuilderUploadCallback, FormBuilderUploadContext, FormBuilderValidationRule, FormBuilderValidatorDefinition, FormBuilderValidatorFactory, FormBuilderValidatorValueType };
|