ngx-dynamic-entity-builder 1.3.0 → 1.5.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/README.md +2 -1
- package/fesm2022/ngx-dynamic-entity-builder.mjs +521 -105
- package/fesm2022/ngx-dynamic-entity-builder.mjs.map +1 -1
- package/package.json +7 -7
- package/types/ngx-dynamic-entity-builder.d.ts +582 -0
- package/esm2022/lib/builder-store.service.mjs +0 -1057
- package/esm2022/lib/clone.mjs +0 -14
- package/esm2022/lib/components/entity-builder-canvas.component.mjs +0 -84
- package/esm2022/lib/components/entity-builder-tree-node.component.mjs +0 -192
- package/esm2022/lib/components/entity-reference-config.component.mjs +0 -405
- package/esm2022/lib/components/field-inspector.component.mjs +0 -139
- package/esm2022/lib/components/field-palette.component.mjs +0 -57
- package/esm2022/lib/components/field-rules-list.component.mjs +0 -224
- package/esm2022/lib/components/referenced-field-config.component.mjs +0 -235
- package/esm2022/lib/components/rule-form.component.mjs +0 -201
- package/esm2022/lib/components/tab-manager.component.mjs +0 -354
- package/esm2022/lib/entity-builder.component.mjs +0 -159
- package/esm2022/lib/field-catalog.mjs +0 -6
- package/esm2022/ngx-dynamic-entity-builder.mjs +0 -5
- package/esm2022/public-api.mjs +0 -16
- package/index.d.ts +0 -5
- package/lib/builder-store.service.d.ts +0 -206
- package/lib/clone.d.ts +0 -9
- package/lib/components/entity-builder-canvas.component.d.ts +0 -9
- package/lib/components/entity-builder-tree-node.component.d.ts +0 -17
- package/lib/components/entity-reference-config.component.d.ts +0 -29
- package/lib/components/field-inspector.component.d.ts +0 -33
- package/lib/components/field-palette.component.d.ts +0 -13
- package/lib/components/field-rules-list.component.d.ts +0 -19
- package/lib/components/referenced-field-config.component.d.ts +0 -24
- package/lib/components/rule-form.component.d.ts +0 -16
- package/lib/components/tab-manager.component.d.ts +0 -28
- package/lib/entity-builder.component.d.ts +0 -45
- package/lib/field-catalog.d.ts +0 -5
- package/public-api.d.ts +0 -12
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { FormRule } from '@dynamic-entity/core';
|
|
2
|
-
import { BuilderStore } from '../builder-store.service';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* FieldRulesListComponent — the rules attached to the selected field: view, reorder,
|
|
6
|
-
* enable/disable, edit, delete. `RuleFormComponent` authors one rule; this owns the set.
|
|
7
|
-
*/
|
|
8
|
-
export declare class FieldRulesListComponent {
|
|
9
|
-
protected readonly store: BuilderStore;
|
|
10
|
-
/** The rule currently open in the editor — a new draft or a copy of an existing rule. */
|
|
11
|
-
protected readonly editing: import("@angular/core").WritableSignal<FormRule>;
|
|
12
|
-
protected startCreate(): void;
|
|
13
|
-
protected startEdit(rule: FormRule): void;
|
|
14
|
-
protected commit(rule: FormRule): void;
|
|
15
|
-
/** One-line human summary: `status EQUAL "archived" → hide`. */
|
|
16
|
-
protected summarize(rule: FormRule): string;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FieldRulesListComponent, never>;
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FieldRulesListComponent, "ngx-field-rules-list", never, {}, {}, never, never, true, never>;
|
|
19
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ConfigSourceService } from 'ngx-dynamic-entity';
|
|
2
|
-
import type { NestedFieldConfig } from '@dynamic-entity/core';
|
|
3
|
-
import { BuilderStore } from '../builder-store.service';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class ReferencedFieldConfigComponent {
|
|
6
|
-
protected readonly store: BuilderStore;
|
|
7
|
-
protected readonly configSource: ConfigSourceService;
|
|
8
|
-
protected readonly field: import("@angular/core").Signal<NestedFieldConfig>;
|
|
9
|
-
protected toggleReferenced(field: NestedFieldConfig, enabled: boolean): void;
|
|
10
|
-
protected updateEntityKey(field: NestedFieldConfig, key: string): void;
|
|
11
|
-
protected updateFieldId(field: NestedFieldConfig, fieldId: string): void;
|
|
12
|
-
protected syncWithSource(field: NestedFieldConfig): Promise<void>;
|
|
13
|
-
/**
|
|
14
|
-
* Both callers pass the id of the field they just edited. This used to ignore that
|
|
15
|
-
* argument and read `store.selectedField()` instead, so whenever the edited field was not
|
|
16
|
-
* the selected one it checked drift against the wrong field's source entity — or bailed
|
|
17
|
-
* out entirely if nothing was selected.
|
|
18
|
-
*/
|
|
19
|
-
private checkDriftForField;
|
|
20
|
-
private findField;
|
|
21
|
-
private findFieldInList;
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ReferencedFieldConfigComponent, never>;
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ReferencedFieldConfigComponent, "ngx-referenced-field-config", never, {}, {}, never, never, true, never>;
|
|
24
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import type { FormRule, RuleOperator } from '@dynamic-entity/core';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* RuleFormComponent — dialog/panel form for creating or editing a FormRule.
|
|
6
|
-
*/
|
|
7
|
-
export declare class RuleFormComponent {
|
|
8
|
-
rule: FormRule;
|
|
9
|
-
save: EventEmitter<FormRule>;
|
|
10
|
-
cancel: EventEmitter<void>;
|
|
11
|
-
readonly operators: RuleOperator[];
|
|
12
|
-
addCondition(): void;
|
|
13
|
-
removeCondition(index: number): void;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RuleFormComponent, never>;
|
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RuleFormComponent, "ngx-rule-form", never, { "rule": { "alias": "rule"; "required": false; }; }, { "save": "save"; "cancel": "cancel"; }, never, never, true, never>;
|
|
16
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { NestedTabConfig } from '@dynamic-entity/core';
|
|
2
|
-
import { SYSTEM_DEFAULT_CAN_EDIT } from 'ngx-dynamic-entity';
|
|
3
|
-
import { BuilderStore } from '../builder-store.service';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* Re-exported so existing imports from this package keep working.
|
|
7
|
-
*
|
|
8
|
-
* This file used to declare its own `new InjectionToken('SYSTEM_DEFAULT_CAN_EDIT')` while
|
|
9
|
-
* `ngx-dynamic-entity` exported another under the same name. InjectionToken identity is by
|
|
10
|
-
* object reference, so a consumer providing the renderer's — the documented one — was
|
|
11
|
-
* providing a token nothing injected, and the predicate silently never ran. One token now,
|
|
12
|
-
* defined in the lower-level package that both depend on.
|
|
13
|
-
*/
|
|
14
|
-
export { SYSTEM_DEFAULT_CAN_EDIT };
|
|
15
|
-
/**
|
|
16
|
-
* TabManagerComponent — add / rename / reorder / remove tabs & sub-tabs with systemDefault protection.
|
|
17
|
-
*/
|
|
18
|
-
export declare class TabManagerComponent {
|
|
19
|
-
protected readonly store: BuilderStore;
|
|
20
|
-
private readonly canEditSystemDefaultsFn;
|
|
21
|
-
protected lang(): string;
|
|
22
|
-
protected tabLabel(tab: {
|
|
23
|
-
label?: any;
|
|
24
|
-
}): string;
|
|
25
|
-
protected canEditTab(tab: NestedTabConfig): boolean;
|
|
26
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TabManagerComponent, never>;
|
|
27
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TabManagerComponent, "ngx-tab-manager", never, {}, {}, never, never, true, never>;
|
|
28
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { type CommonModuleEntry, type EntityFormConfig, type EntityPermissions } from '@dynamic-entity/core';
|
|
3
|
-
import { BuilderStore } from './builder-store.service';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* EntityBuilderComponent — the top-level visual builder for an EntityFormConfig.
|
|
7
|
-
*/
|
|
8
|
-
export declare class EntityBuilderComponent implements OnChanges {
|
|
9
|
-
protected readonly store: BuilderStore;
|
|
10
|
-
/**
|
|
11
|
-
* Optional: only apps that registered a CONFIG_SOURCE have one. Used to drop the cached
|
|
12
|
-
* copy of a config the moment it is edited — see `doSave`.
|
|
13
|
-
*/
|
|
14
|
-
private readonly configSource;
|
|
15
|
-
/** Existing config to edit. When omitted, the builder starts blank. */
|
|
16
|
-
config?: EntityFormConfig;
|
|
17
|
-
/** Languages available for label/placeholder editing. First entry is the default. */
|
|
18
|
-
languages: string[];
|
|
19
|
-
/** Optional role list — enables multi-select role pickers for RBAC instead of free text. */
|
|
20
|
-
availableRoles: string[];
|
|
21
|
-
/**
|
|
22
|
-
* Roles of the person using the builder. Distinct from `availableRoles`, which is the
|
|
23
|
-
* vocabulary a schema may reference. Passed to the `SYSTEM_DEFAULT_CAN_EDIT` predicate so
|
|
24
|
-
* it can decide whether this user may edit system-default tabs.
|
|
25
|
-
*/
|
|
26
|
-
userRoles: string[];
|
|
27
|
-
/** Optional common-module definitions for module tabs; defaults to the built-in list from core. */
|
|
28
|
-
commonModules: readonly CommonModuleEntry[];
|
|
29
|
-
/** Emitted on every change to the working config. */
|
|
30
|
-
configChange: EventEmitter<EntityFormConfig>;
|
|
31
|
-
/** Emitted when the user clicks Save. Carries a clean, deep-cloned config. */
|
|
32
|
-
save: EventEmitter<EntityFormConfig>;
|
|
33
|
-
protected readonly rbacActions: (keyof EntityPermissions)[];
|
|
34
|
-
constructor();
|
|
35
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
36
|
-
protected doSave(): void;
|
|
37
|
-
protected get json(): string;
|
|
38
|
-
protected copyJson(): void;
|
|
39
|
-
protected rolesFor(action: keyof EntityPermissions): readonly string[];
|
|
40
|
-
protected setRoles(action: keyof EntityPermissions, roles: string[]): void;
|
|
41
|
-
/** Parse a comma-separated role string into a trimmed, de-duplicated array. */
|
|
42
|
-
protected setRolesFromText(action: keyof EntityPermissions, text: string): void;
|
|
43
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<EntityBuilderComponent, never>;
|
|
44
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<EntityBuilderComponent, "ngx-entity-builder", never, { "config": { "alias": "config"; "required": false; }; "languages": { "alias": "languages"; "required": false; }; "availableRoles": { "alias": "availableRoles"; "required": false; }; "userRoles": { "alias": "userRoles"; "required": false; }; "commonModules": { "alias": "commonModules"; "required": false; }; }, { "configChange": "configChange"; "save": "save"; }, never, ["[ngxBuilderPreview]"], true, never>;
|
|
45
|
-
}
|
package/lib/field-catalog.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* field-catalog.ts — re-exports shared field catalog from @dynamic-entity/core.
|
|
3
|
-
* Single source of truth shared by both visual builder and renderer.
|
|
4
|
-
*/
|
|
5
|
-
export { FIELD_TYPE_CATALOG, getFieldTypeMeta, humanizeId, createFieldConfig, type FieldTypeMeta, type FlagValidator, type ParamValidator, } from '@dynamic-entity/core';
|
package/public-api.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from './lib/entity-builder.component';
|
|
2
|
-
export * from './lib/components/field-palette.component';
|
|
3
|
-
export * from './lib/components/field-inspector.component';
|
|
4
|
-
export * from './lib/components/tab-manager.component';
|
|
5
|
-
export * from './lib/components/rule-form.component';
|
|
6
|
-
export * from './lib/components/field-rules-list.component';
|
|
7
|
-
export * from './lib/components/entity-reference-config.component';
|
|
8
|
-
export * from './lib/components/entity-builder-canvas.component';
|
|
9
|
-
export * from './lib/components/entity-builder-tree-node.component';
|
|
10
|
-
export * from './lib/builder-store.service';
|
|
11
|
-
export * from './lib/field-catalog';
|
|
12
|
-
export type { EntityFormConfig, NestedTabConfig, NestedFieldConfig, RichFieldType, DropdownOption, EntityPermissions, EntityReferenceConfig, AutoPatchConfig, AutoPatchMapping, PatchOnTrueMapping, FormRule, RuleCondition, RuleAction, RuleOperator, } from '@dynamic-entity/core';
|