ngx-dynamic-entity 1.4.0 → 1.6.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",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Angular standalone UI library for rendering dynamic entity forms.",
|
|
5
5
|
"//typings": "Local workspace resolution only: ng-packagr 21 writes types/ngx-dynamic-entity.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.d.ts",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@angular/common": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
9
9
|
"@angular/core": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
10
10
|
"@angular/forms": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
11
|
-
"@dynamic-entity/core": "^1.
|
|
11
|
+
"@dynamic-entity/core": "^1.6.0",
|
|
12
12
|
"rxjs": "^7.0.0"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
@@ -798,8 +798,20 @@ declare class DynamicFormComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
798
798
|
ngOnInit(): void;
|
|
799
799
|
ngOnChanges(changes: SimpleChanges): void;
|
|
800
800
|
ngOnDestroy(): void;
|
|
801
|
-
|
|
802
|
-
|
|
801
|
+
/**
|
|
802
|
+
* `focusPanel: false` is for a caller that is about to focus something more specific.
|
|
803
|
+
*
|
|
804
|
+
* Activating a tab moves focus into its panel, which is right for a keyboard user pressing
|
|
805
|
+
* a tab. A quick-jump also switches tabs, but then focuses the field it was aiming at — and
|
|
806
|
+
* the panel focus runs on `requestAnimationFrame`, after `afterNextRender`, so it landed
|
|
807
|
+
* second and took the focus back every time. Saying so is better than out-timing it.
|
|
808
|
+
*/
|
|
809
|
+
setActiveTab(tabId: string, options?: {
|
|
810
|
+
focusPanel?: boolean;
|
|
811
|
+
}): void;
|
|
812
|
+
setActiveSubTab(subTabId: string, options?: {
|
|
813
|
+
focusPanel?: boolean;
|
|
814
|
+
}): void;
|
|
803
815
|
getFieldSpan(field: NestedFieldConfig): string;
|
|
804
816
|
/** A critical field stays read-only until the user deliberately unlocks it. */
|
|
805
817
|
isFieldLocked(field: NestedFieldConfig): boolean;
|
|
@@ -866,9 +878,8 @@ declare class DynamicFormComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
866
878
|
* `flattenFormValues` keys by bare id, so one of the two silently wins and the rule reads
|
|
867
879
|
* whichever landed there.
|
|
868
880
|
*
|
|
869
|
-
* `validateConfig` catches this
|
|
870
|
-
*
|
|
871
|
-
* checked for them and this is the only place both are in hand.
|
|
881
|
+
* `validateConfig({ rules })` catches this statically. The check here remains because
|
|
882
|
+
* consumers that never call the validator still get a signal in development.
|
|
872
883
|
*/
|
|
873
884
|
private warnAmbiguousRuleReferences;
|
|
874
885
|
private static readonly warnedAmbiguousIds;
|
|
@@ -1000,6 +1011,7 @@ declare class DynamicRecordFormComponent implements OnChanges {
|
|
|
1000
1011
|
}>;
|
|
1001
1012
|
dynamicFormComp?: DynamicFormComponent;
|
|
1002
1013
|
private readonly rulesEvaluation;
|
|
1014
|
+
private readonly rbacService;
|
|
1003
1015
|
private readonly host;
|
|
1004
1016
|
private readonly injector;
|
|
1005
1017
|
readonly currentData: i0.WritableSignal<Record<string, any>>;
|
|
@@ -1024,6 +1036,16 @@ declare class DynamicRecordFormComponent implements OnChanges {
|
|
|
1024
1036
|
message: string;
|
|
1025
1037
|
}[];
|
|
1026
1038
|
dismissInfoBanner(fieldId: string): void;
|
|
1039
|
+
/**
|
|
1040
|
+
* Whether the current roles may edit this record.
|
|
1041
|
+
*
|
|
1042
|
+
* `userRoles` was declared as an input here and then read by nothing at all — this
|
|
1043
|
+
* component computed no permissions of any kind, so the record view was fully editable
|
|
1044
|
+
* for every role while the plain form at least hid its Save button. Cached on the same
|
|
1045
|
+
* terms as the sibling component: it depends only on `config` and `userRoles`.
|
|
1046
|
+
*/
|
|
1047
|
+
private permissionsCache;
|
|
1048
|
+
get permissions(): ReturnType<RbacService['getPermissions']>;
|
|
1027
1049
|
/** True when nothing in the record may be edited. */
|
|
1028
1050
|
get recordReadOnly(): boolean;
|
|
1029
1051
|
/**
|