ngx-dynamic-entity-builder 2.0.1 → 2.1.0
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": "ngx-dynamic-entity-builder",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Angular standalone visual builder for authoring dynamic-entity EntityConfig (fields, tabs, validators, RBAC).",
|
|
5
5
|
"//typings": "Local workspace resolution only: ng-packagr 21 writes types/ngx-dynamic-entity-builder.d.ts into dist/package.json. Do NOT add a 'main' field here — ng-packagr does not generate one, so it would be copied verbatim and resolve wrongly in the published package.",
|
|
6
6
|
"typings": "types/ngx-dynamic-entity-builder.d.ts",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"@angular/core": "^17.2.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
11
11
|
"@angular/forms": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
12
12
|
"@angular/material": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
13
|
-
"@dynamic-entity/core": "^2.0
|
|
14
|
-
"ngx-dynamic-entity": "^2.0
|
|
13
|
+
"@dynamic-entity/core": "^2.1.0",
|
|
14
|
+
"ngx-dynamic-entity": "^2.1.0",
|
|
15
15
|
"rxjs": "^7.0.0"
|
|
16
16
|
},
|
|
17
17
|
"keywords": [
|
|
@@ -5,6 +5,7 @@ export { AutoPatchConfig, AutoPatchMapping, DropdownOption, EntityFormConfig, En
|
|
|
5
5
|
import * as ngx_dynamic_entity from 'ngx-dynamic-entity';
|
|
6
6
|
import { UiTextOverridesFor, UiTextParams } from 'ngx-dynamic-entity';
|
|
7
7
|
export { SYSTEM_DEFAULT_CAN_EDIT } from 'ngx-dynamic-entity';
|
|
8
|
+
import * as ngx_dynamic_entity_builder from 'ngx-dynamic-entity-builder';
|
|
8
9
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
9
10
|
|
|
10
11
|
interface BuilderProblem {
|
|
@@ -246,6 +247,7 @@ declare class BuilderStore {
|
|
|
246
247
|
setFieldHint(id: string, language: string, value: string): void;
|
|
247
248
|
toggleFlagValidator(id: string, validator: FlagValidator, on: boolean): void;
|
|
248
249
|
setParamValidator(id: string, validator: ParamValidator, value: number | null): void;
|
|
250
|
+
setPatternValidator(id: string, pattern: string | null): void;
|
|
249
251
|
getParamValidator(field: NestedFieldConfig, validator: ParamValidator): number | null;
|
|
250
252
|
hasFlagValidator(field: NestedFieldConfig, validator: FlagValidator): boolean;
|
|
251
253
|
/**
|
|
@@ -492,6 +494,7 @@ declare const DEFAULT_BUILDER_TEXT: {
|
|
|
492
494
|
sectionAutomation: string;
|
|
493
495
|
sectionRules: string;
|
|
494
496
|
sectionReference: string;
|
|
497
|
+
sectionDependencies: string;
|
|
495
498
|
width: string;
|
|
496
499
|
widthQuarter: string;
|
|
497
500
|
widthThird: string;
|
|
@@ -609,6 +612,30 @@ declare const DEFAULT_BUILDER_TEXT: {
|
|
|
609
612
|
driftHeading: string;
|
|
610
613
|
driftBody: string;
|
|
611
614
|
syncWithSource: string;
|
|
615
|
+
pattern: string;
|
|
616
|
+
patternHint: string;
|
|
617
|
+
testPattern: string;
|
|
618
|
+
testPatternPlaceholder: string;
|
|
619
|
+
patternMatch: string;
|
|
620
|
+
patternNoMatch: string;
|
|
621
|
+
patternInvalid: string;
|
|
622
|
+
patternEmptyPrompt: string;
|
|
623
|
+
quickPresets: string;
|
|
624
|
+
dependsOn: string;
|
|
625
|
+
affects: string;
|
|
626
|
+
noDependencies: string;
|
|
627
|
+
ruleGraph: string;
|
|
628
|
+
ruleGraphTitle: string;
|
|
629
|
+
ruleGraphSubtitle: string;
|
|
630
|
+
filterDependencies: string;
|
|
631
|
+
noDependenciesFound: string;
|
|
632
|
+
jumpToField: string;
|
|
633
|
+
closeDialog: string;
|
|
634
|
+
dependencyTypeRule: string;
|
|
635
|
+
dependencyTypeShowWhen: string;
|
|
636
|
+
dependencyTypeCascade: string;
|
|
637
|
+
dependencyTypePatch: string;
|
|
638
|
+
totalDependencies: string;
|
|
612
639
|
};
|
|
613
640
|
/** The keys above, as a union — checked in templates, completed in a host's overrides. */
|
|
614
641
|
type BuilderTextKey = keyof typeof DEFAULT_BUILDER_TEXT;
|
|
@@ -722,6 +749,10 @@ declare class EntityBuilderComponent implements OnChanges {
|
|
|
722
749
|
toggleRightSidebar(): void;
|
|
723
750
|
toggleFields(): void;
|
|
724
751
|
togglePreview(): void;
|
|
752
|
+
readonly ruleGraphOpen: _angular_core.WritableSignal<boolean>;
|
|
753
|
+
openRuleGraph(): void;
|
|
754
|
+
closeRuleGraph(): void;
|
|
755
|
+
onSelectFieldFromGraph(key: string): void;
|
|
725
756
|
protected collapseLeft(): void;
|
|
726
757
|
protected expandLeft(): void;
|
|
727
758
|
protected collapseRight(): void;
|
|
@@ -833,6 +864,32 @@ declare function fieldPathOptions(config: EntityFormConfig | null | undefined, l
|
|
|
833
864
|
*/
|
|
834
865
|
declare function withExistingOptions(options: readonly FieldPathOption[], current: readonly (string | undefined)[]): FieldPathOption[];
|
|
835
866
|
|
|
867
|
+
type DependencyType = 'rule' | 'showWhen' | 'cascade' | 'patchOnTrue' | 'autoPatch';
|
|
868
|
+
interface RuleDependencyEdge {
|
|
869
|
+
id: string;
|
|
870
|
+
sourceKey: string;
|
|
871
|
+
sourceLabel: string;
|
|
872
|
+
targetKey: string;
|
|
873
|
+
targetLabel: string;
|
|
874
|
+
type: DependencyType;
|
|
875
|
+
actionSummary: string;
|
|
876
|
+
description: string;
|
|
877
|
+
sourceValid: boolean;
|
|
878
|
+
targetValid: boolean;
|
|
879
|
+
}
|
|
880
|
+
interface RuleDependencyGraphData {
|
|
881
|
+
edges: RuleDependencyEdge[];
|
|
882
|
+
totalRules: number;
|
|
883
|
+
totalShowWhen: number;
|
|
884
|
+
totalCascades: number;
|
|
885
|
+
totalPatches: number;
|
|
886
|
+
}
|
|
887
|
+
/**
|
|
888
|
+
* Computes all dependency edges (rules, showWhen, cascades, patchOnTrue, autoPatch)
|
|
889
|
+
* across an EntityFormConfig and its rules.
|
|
890
|
+
*/
|
|
891
|
+
declare function computeRuleDependencies(config: EntityFormConfig | null | undefined, rules?: readonly FormRule[], language?: string): RuleDependencyGraphData;
|
|
892
|
+
|
|
836
893
|
/**
|
|
837
894
|
* FieldInspectorComponent — edits every property of the currently selected field.
|
|
838
895
|
*/
|
|
@@ -937,6 +994,21 @@ declare class FieldInspectorComponent {
|
|
|
937
994
|
*/
|
|
938
995
|
private parseShowWhen;
|
|
939
996
|
private stringifyShowWhen;
|
|
997
|
+
protected readonly testSample: _angular_core.WritableSignal<string>;
|
|
998
|
+
protected readonly regexEvaluation: _angular_core.Signal<{
|
|
999
|
+
status: "empty" | "idle" | "match" | "no-match" | "invalid";
|
|
1000
|
+
error?: string;
|
|
1001
|
+
}>;
|
|
1002
|
+
protected readonly patternPresets: {
|
|
1003
|
+
label: string;
|
|
1004
|
+
pattern: string;
|
|
1005
|
+
}[];
|
|
1006
|
+
protected supportsPattern(type: string): boolean;
|
|
1007
|
+
protected applyPreset(field: NestedFieldConfig, pattern: string): void;
|
|
1008
|
+
protected readonly allDependencies: _angular_core.Signal<ngx_dynamic_entity_builder.RuleDependencyGraphData>;
|
|
1009
|
+
protected readonly incomingDependencies: _angular_core.Signal<RuleDependencyEdge[]>;
|
|
1010
|
+
protected readonly outgoingDependencies: _angular_core.Signal<RuleDependencyEdge[]>;
|
|
1011
|
+
protected selectField(key: string): void;
|
|
940
1012
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FieldInspectorComponent, never>;
|
|
941
1013
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FieldInspectorComponent, "ngx-field-inspector", never, {}, {}, never, never, true, never>;
|
|
942
1014
|
}
|
|
@@ -1092,5 +1164,21 @@ declare class EntityBuilderTreeNodeComponent {
|
|
|
1092
1164
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EntityBuilderTreeNodeComponent, "ngx-entity-builder-tree-node", never, { "field": { "alias": "field"; "required": true; }; "index": { "alias": "index"; "required": true; }; "totalCount": { "alias": "totalCount"; "required": true; }; }, {}, never, never, true, never>;
|
|
1093
1165
|
}
|
|
1094
1166
|
|
|
1095
|
-
|
|
1096
|
-
|
|
1167
|
+
declare class RuleDependencyGraphComponent {
|
|
1168
|
+
protected readonly ui: BuilderTextService;
|
|
1169
|
+
protected readonly store: BuilderStore;
|
|
1170
|
+
readonly dismiss: EventEmitter<void>;
|
|
1171
|
+
readonly selectField: EventEmitter<string>;
|
|
1172
|
+
protected readonly filterQuery: _angular_core.WritableSignal<string>;
|
|
1173
|
+
protected readonly selectedType: _angular_core.WritableSignal<DependencyType | "all">;
|
|
1174
|
+
protected readonly graphData: _angular_core.Signal<ngx_dynamic_entity_builder.RuleDependencyGraphData>;
|
|
1175
|
+
protected readonly filteredEdges: _angular_core.Signal<RuleDependencyEdge[]>;
|
|
1176
|
+
protected typeName(type: DependencyType): string;
|
|
1177
|
+
protected onNodeClick(key: string): void;
|
|
1178
|
+
protected onBackdropClick(event: MouseEvent): void;
|
|
1179
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RuleDependencyGraphComponent, never>;
|
|
1180
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RuleDependencyGraphComponent, "ngx-rule-dependency-graph", never, {}, { "dismiss": "dismiss"; "selectField": "selectField"; }, never, never, true, never>;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
export { BUILDER_TEXT, BuilderStore, BuilderTextService, DEFAULT_BUILDER_TEXT, EntityBuilderCanvasComponent, EntityBuilderComponent, EntityBuilderTreeNodeComponent, EntityReferenceConfigComponent, FieldInspectorComponent, FieldPaletteComponent, FieldRulesListComponent, RuleDependencyGraphComponent, RuleFormComponent, TabManagerComponent, computeRuleDependencies, fieldPathOptions, withExistingOptions };
|
|
1184
|
+
export type { BuilderFieldGroup, BuilderProblem, BuilderTextKey, BuilderTextOverrides, DependencyType, FieldPathOption, RuleDependencyEdge, RuleDependencyGraphData };
|