xt-components 0.4.0 → 0.4.3
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 +4 -20
- package/fesm2022/xt-components.mjs +64 -48
- package/fesm2022/xt-components.mjs.map +1 -1
- package/lib/output/xt-base-input.d.ts +5 -0
- package/lib/output/xt-base-output.d.ts +3 -4
- package/lib/render/xt-render-sub.component.d.ts +8 -2
- package/lib/render/xt-render.component.d.ts +8 -2
- package/lib/xt-component.d.ts +9 -7
- package/lib/xt-simple/xt-simple.component.d.ts +14 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,24 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+

|
|
2
|
+
# XT-Components
|
|
2
3
|
|
|
3
|
-
This
|
|
4
|
+
This is the core of [ng-xtend framework](https://github.com/dont-code/ng-xtend/blob/main/README.md), where xt-components are defined.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Include this library in all your projects using ng-xtend.
|
|
6
7
|
|
|
7
|
-
Run `ng generate component component-name --project xt-components` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project xt-components`.
|
|
8
|
-
> Note: Don't forget to add `--project xt-components` or else it will be added to the default project in your `angular.json` file.
|
|
9
8
|
|
|
10
|
-
## Build
|
|
11
|
-
|
|
12
|
-
Run `ng build xt-components` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
-
|
|
14
|
-
## Publishing
|
|
15
|
-
|
|
16
|
-
After building your library with `ng build xt-components`, go to the dist folder `cd dist/xt-components` and run `npm publish`.
|
|
17
|
-
|
|
18
|
-
## Running unit tests
|
|
19
|
-
|
|
20
|
-
Run `ng test xt-components` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
-
|
|
22
|
-
## Further help
|
|
23
|
-
|
|
24
|
-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
|
@@ -565,6 +565,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
|
|
|
565
565
|
}]
|
|
566
566
|
}], ctorParameters: () => [] });
|
|
567
567
|
|
|
568
|
+
class XtBaseOutput {
|
|
569
|
+
}
|
|
570
|
+
|
|
568
571
|
/**
|
|
569
572
|
* Offers a nice and easy to dynamically embed a component.
|
|
570
573
|
* You set the type, the display mode, and either the value or the formgroup & subName to use.
|
|
@@ -581,8 +584,9 @@ class XtRenderComponent {
|
|
|
581
584
|
// Or we are inside a Form
|
|
582
585
|
this.formGroup = input();
|
|
583
586
|
this.subName = input();
|
|
587
|
+
this.outputsObject = new XtBaseOutput();
|
|
588
|
+
this.inputs = input();
|
|
584
589
|
this.outputs = output();
|
|
585
|
-
this.hasOutputs = false;
|
|
586
590
|
this.outlet = viewChild.required(NgComponentOutlet);
|
|
587
591
|
this.context = computed(() => {
|
|
588
592
|
let form = this.formGroup();
|
|
@@ -615,15 +619,30 @@ class XtRenderComponent {
|
|
|
615
619
|
return type ?? null;
|
|
616
620
|
});
|
|
617
621
|
}
|
|
622
|
+
/**
|
|
623
|
+
* Transfers the input and outputs from the host to the rendered component
|
|
624
|
+
*/
|
|
618
625
|
ngAfterViewInit() {
|
|
619
626
|
const instance = this.outlet().componentInstance;
|
|
620
|
-
if (
|
|
621
|
-
|
|
622
|
-
|
|
627
|
+
if (instance?.outputsObject != null) {
|
|
628
|
+
let hasOneOutput = false;
|
|
629
|
+
for (const key of Object.keys(instance.outputsObject)) {
|
|
630
|
+
this.outputsObject[key] = instance.outputsObject[key];
|
|
631
|
+
hasOneOutput = true;
|
|
632
|
+
}
|
|
633
|
+
if (hasOneOutput) {
|
|
634
|
+
this.outputs.emit(this.outputsObject);
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
const inputs = this.inputs();
|
|
638
|
+
if ((inputs != null) && (instance?.inputsObject != null)) {
|
|
639
|
+
for (const key of Object.keys(inputs)) {
|
|
640
|
+
instance.inputsObject[key] = inputs[key];
|
|
641
|
+
}
|
|
623
642
|
}
|
|
624
643
|
}
|
|
625
644
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: XtRenderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
626
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.4", type: XtRenderComponent, isStandalone: true, selector: "xt-render", inputs: { componentType: { classPropertyName: "componentType", publicName: "componentType", isSignal: true, isRequired: false, transformFunction: null }, displayMode: { classPropertyName: "displayMode", publicName: "displayMode", isSignal: true, isRequired: true, transformFunction: null }, valueType: { classPropertyName: "valueType", publicName: "valueType", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null }, subName: { classPropertyName: "subName", publicName: "subName", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", outputs: "outputs" }, viewQueries: [{ propertyName: "outlet", first: true, predicate: NgComponentOutlet, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *ngComponentOutlet=\"type(); inputs: {context:context ()}\" />\n", styles: [""], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "ngmodule", type: ReactiveFormsModule }] }); }
|
|
645
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.4", type: XtRenderComponent, isStandalone: true, selector: "xt-render", inputs: { componentType: { classPropertyName: "componentType", publicName: "componentType", isSignal: true, isRequired: false, transformFunction: null }, displayMode: { classPropertyName: "displayMode", publicName: "displayMode", isSignal: true, isRequired: true, transformFunction: null }, valueType: { classPropertyName: "valueType", publicName: "valueType", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null }, subName: { classPropertyName: "subName", publicName: "subName", isSignal: true, isRequired: false, transformFunction: null }, inputs: { classPropertyName: "inputs", publicName: "inputs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", outputs: "outputs" }, viewQueries: [{ propertyName: "outlet", first: true, predicate: NgComponentOutlet, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *ngComponentOutlet=\"type(); inputs: {context:context ()}\" />\n", styles: [""], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "ngmodule", type: ReactiveFormsModule }] }); }
|
|
627
646
|
}
|
|
628
647
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: XtRenderComponent, decorators: [{
|
|
629
648
|
type: Component,
|
|
@@ -641,8 +660,9 @@ class XtRenderSubComponent {
|
|
|
641
660
|
constructor() {
|
|
642
661
|
this.context = input.required();
|
|
643
662
|
this.componentType = input();
|
|
663
|
+
this.outputsObject = new XtBaseOutput();
|
|
664
|
+
this.inputs = input();
|
|
644
665
|
this.outputs = output();
|
|
645
|
-
this.hasOutputs = false;
|
|
646
666
|
this.outlet = viewChild.required(NgComponentOutlet);
|
|
647
667
|
this.resolverService = inject(XtResolverService);
|
|
648
668
|
this.type = computed(() => {
|
|
@@ -660,15 +680,30 @@ class XtRenderSubComponent {
|
|
|
660
680
|
return type ?? null;
|
|
661
681
|
});
|
|
662
682
|
}
|
|
683
|
+
/**
|
|
684
|
+
* Transfers the input and outputs from the host to the rendered component
|
|
685
|
+
*/
|
|
663
686
|
ngAfterViewInit() {
|
|
664
687
|
const instance = this.outlet().componentInstance;
|
|
665
|
-
if (
|
|
666
|
-
|
|
667
|
-
|
|
688
|
+
if (instance?.outputsObject != null) {
|
|
689
|
+
let hasOneOutput = false;
|
|
690
|
+
for (const key of Object.keys(instance.outputsObject)) {
|
|
691
|
+
this.outputsObject[key] = instance.outputsObject[key];
|
|
692
|
+
hasOneOutput = true;
|
|
693
|
+
}
|
|
694
|
+
if (hasOneOutput) {
|
|
695
|
+
this.outputs.emit(this.outputsObject);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
const inputs = this.inputs();
|
|
699
|
+
if ((inputs != null) && (instance?.inputsObject != null)) {
|
|
700
|
+
for (const key of Object.keys(inputs)) {
|
|
701
|
+
instance.inputsObject[key] = inputs[key];
|
|
702
|
+
}
|
|
668
703
|
}
|
|
669
704
|
}
|
|
670
705
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: XtRenderSubComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
671
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.4", type: XtRenderSubComponent, isStandalone: true, selector: "xt-render-sub", inputs: { context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: true, transformFunction: null }, componentType: { classPropertyName: "componentType", publicName: "componentType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outputs: "outputs" }, viewQueries: [{ propertyName: "outlet", first: true, predicate: NgComponentOutlet, descendants: true, isSignal: true }], ngImport: i0, template: "{{componentType()}}\n<ng-container *ngComponentOutlet=\"type(); inputs: {context:context ()}\" />\n", styles: [""], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "ngmodule", type: ReactiveFormsModule }] }); }
|
|
706
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.4", type: XtRenderSubComponent, isStandalone: true, selector: "xt-render-sub", inputs: { context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: true, transformFunction: null }, componentType: { classPropertyName: "componentType", publicName: "componentType", isSignal: true, isRequired: false, transformFunction: null }, inputs: { classPropertyName: "inputs", publicName: "inputs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outputs: "outputs" }, viewQueries: [{ propertyName: "outlet", first: true, predicate: NgComponentOutlet, descendants: true, isSignal: true }], ngImport: i0, template: "{{componentType()}}\n<ng-container *ngComponentOutlet=\"type(); inputs: {context:context ()}\" />\n", styles: [""], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "ngmodule", type: ReactiveFormsModule }] }); }
|
|
672
707
|
}
|
|
673
708
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: XtRenderSubComponent, decorators: [{
|
|
674
709
|
type: Component,
|
|
@@ -678,18 +713,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImpor
|
|
|
678
713
|
], template: "{{componentType()}}\n<ng-container *ngComponentOutlet=\"type(); inputs: {context:context ()}\" />\n" }]
|
|
679
714
|
}] });
|
|
680
715
|
|
|
681
|
-
class
|
|
682
|
-
setNewOutput(name, value) {
|
|
683
|
-
let ret = false;
|
|
684
|
-
if (this[name] == null) {
|
|
685
|
-
this[name] = signal(value);
|
|
686
|
-
ret = true;
|
|
687
|
-
}
|
|
688
|
-
else {
|
|
689
|
-
this[name].set(value);
|
|
690
|
-
}
|
|
691
|
-
return ret;
|
|
692
|
-
}
|
|
716
|
+
class XtBaseInput {
|
|
693
717
|
}
|
|
694
718
|
|
|
695
719
|
/**
|
|
@@ -699,12 +723,9 @@ class XtBaseOutput {
|
|
|
699
723
|
class XtSimpleComponent {
|
|
700
724
|
constructor() {
|
|
701
725
|
this.context = input.required();
|
|
726
|
+
this.outputsObject = new XtBaseOutput();
|
|
727
|
+
this.inputsObject = new XtBaseInput();
|
|
702
728
|
this.outputs = output();
|
|
703
|
-
/**
|
|
704
|
-
* Does the component provides Output or not ?
|
|
705
|
-
* @protected
|
|
706
|
-
*/
|
|
707
|
-
this.hasOutputs = false;
|
|
708
729
|
this.isInForm = computed(() => {
|
|
709
730
|
return this.context()?.isInForm() ?? false;
|
|
710
731
|
});
|
|
@@ -753,10 +774,12 @@ class XtSimpleComponent {
|
|
|
753
774
|
this.displayValue = computed(() => {
|
|
754
775
|
return this.context().displayValue();
|
|
755
776
|
});
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
777
|
+
}
|
|
778
|
+
ngOnInit() {
|
|
779
|
+
this.setupInputOutput();
|
|
780
|
+
if (Object.keys(this.outputsObject).length > 0) {
|
|
781
|
+
// At least one output has been defined
|
|
782
|
+
this.outputs.emit(this.outputsObject);
|
|
760
783
|
}
|
|
761
784
|
}
|
|
762
785
|
manageFormControl(ctrlName) {
|
|
@@ -778,19 +801,12 @@ class XtSimpleComponent {
|
|
|
778
801
|
componentDescriptor() {
|
|
779
802
|
return "Component with type " + this.constructor.name + " with context " + this.context().toString();
|
|
780
803
|
}
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
this.outputElement = new XtBaseOutput();
|
|
788
|
-
newOutput = true;
|
|
789
|
-
}
|
|
790
|
-
newOutput = this.outputElement.setNewOutput(outputName, newValue) || newOutput;
|
|
791
|
-
if (newOutput) {
|
|
792
|
-
this.outputs?.emit(this.outputElement);
|
|
793
|
-
}
|
|
804
|
+
/**
|
|
805
|
+
* This is where components can assign their output() and input() into the XtComponent inputs and outputs member
|
|
806
|
+
* @protected
|
|
807
|
+
*/
|
|
808
|
+
setupInputOutput() {
|
|
809
|
+
// Nothing to do here
|
|
794
810
|
}
|
|
795
811
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: XtSimpleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
796
812
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.4", type: XtSimpleComponent, isStandalone: true, selector: "ng-component", inputs: { context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { outputs: "outputs" }, ngImport: i0, template: '', isInline: true }); }
|
|
@@ -866,7 +882,7 @@ class HostTestSimpleComponent {
|
|
|
866
882
|
this.value = input(undefined);
|
|
867
883
|
}
|
|
868
884
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: HostTestSimpleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
869
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.4", type: HostTestSimpleComponent, isStandalone: true, selector: "test-host", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, displayMode: { classPropertyName: "displayMode", publicName: "displayMode", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '<h1>Test Simple Component</h1> <xt-render [componentType]="type()" [displayMode]="displayMode()" [value]="value()" ></xt-render> ', isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: XtRenderComponent, selector: "xt-render", inputs: ["componentType", "displayMode", "valueType", "value", "formGroup", "subName"], outputs: ["valueChange", "outputs"] }] }); }
|
|
885
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.4", type: HostTestSimpleComponent, isStandalone: true, selector: "test-host", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, displayMode: { classPropertyName: "displayMode", publicName: "displayMode", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '<h1>Test Simple Component</h1> <xt-render [componentType]="type()" [displayMode]="displayMode()" [value]="value()" ></xt-render> ', isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: XtRenderComponent, selector: "xt-render", inputs: ["componentType", "displayMode", "valueType", "value", "formGroup", "subName", "inputs"], outputs: ["valueChange", "outputs"] }] }); }
|
|
870
886
|
}
|
|
871
887
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: HostTestSimpleComponent, decorators: [{
|
|
872
888
|
type: Component,
|
|
@@ -915,7 +931,7 @@ class HostTestFormComponent {
|
|
|
915
931
|
throw new Error("FormGroup not yet created. Did you set formGroup or formDescription property ?");
|
|
916
932
|
}
|
|
917
933
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: HostTestFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
918
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.4", type: HostTestFormComponent, isStandalone: true, selector: "test-form-host", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, controlName: { classPropertyName: "controlName", publicName: "controlName", isSignal: true, isRequired: true, transformFunction: null }, formDescription: { classPropertyName: "formDescription", publicName: "formDescription", isSignal: true, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '<h1>Test Form Component</h1> <form [formGroup]="computedFormGroup()"> <xt-render [componentType]="type()" displayMode="FULL_EDITABLE" [subName]="controlName()" [formGroup]="computedFormGroup()"></xt-render></form>', isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: XtRenderComponent, selector: "xt-render", inputs: ["componentType", "displayMode", "valueType", "value", "formGroup", "subName"], outputs: ["valueChange", "outputs"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] }); }
|
|
934
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.4", type: HostTestFormComponent, isStandalone: true, selector: "test-form-host", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, controlName: { classPropertyName: "controlName", publicName: "controlName", isSignal: true, isRequired: true, transformFunction: null }, formDescription: { classPropertyName: "formDescription", publicName: "formDescription", isSignal: true, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '<h1>Test Form Component</h1> <form [formGroup]="computedFormGroup()"> <xt-render [componentType]="type()" displayMode="FULL_EDITABLE" [subName]="controlName()" [formGroup]="computedFormGroup()"></xt-render></form>', isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: XtRenderComponent, selector: "xt-render", inputs: ["componentType", "displayMode", "valueType", "value", "formGroup", "subName", "inputs"], outputs: ["valueChange", "outputs"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] }); }
|
|
919
935
|
}
|
|
920
936
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: HostTestFormComponent, decorators: [{
|
|
921
937
|
type: Component,
|
|
@@ -943,7 +959,7 @@ class HostTestTypedComponent {
|
|
|
943
959
|
});
|
|
944
960
|
}
|
|
945
961
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: HostTestTypedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
946
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.4", type: HostTestTypedComponent, isStandalone: true, selector: "test-typed-host", inputs: { displayMode: { classPropertyName: "displayMode", publicName: "displayMode", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, valueType: { classPropertyName: "valueType", publicName: "valueType", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '<h1>Test Typed Component</h1> <xt-render-sub [context]="context()" ></xt-render-sub> ', isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: XtRenderSubComponent, selector: "xt-render-sub", inputs: ["context", "componentType"], outputs: ["outputs"] }] }); }
|
|
962
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.4", type: HostTestTypedComponent, isStandalone: true, selector: "test-typed-host", inputs: { displayMode: { classPropertyName: "displayMode", publicName: "displayMode", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, valueType: { classPropertyName: "valueType", publicName: "valueType", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '<h1>Test Typed Component</h1> <xt-render-sub [context]="context()" ></xt-render-sub> ', isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: XtRenderSubComponent, selector: "xt-render-sub", inputs: ["context", "componentType", "inputs"], outputs: ["outputs"] }] }); }
|
|
947
963
|
}
|
|
948
964
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: HostTestTypedComponent, decorators: [{
|
|
949
965
|
type: Component,
|
|
@@ -1003,7 +1019,7 @@ class HostTestTypedFormComponent {
|
|
|
1003
1019
|
return this.computedFormGroup().value[controlName];
|
|
1004
1020
|
}
|
|
1005
1021
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: HostTestTypedFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1006
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.4", type: HostTestTypedFormComponent, isStandalone: true, selector: "test-typed-form-host", inputs: { valueType: { classPropertyName: "valueType", publicName: "valueType", isSignal: true, isRequired: false, transformFunction: null }, controlName: { classPropertyName: "controlName", publicName: "controlName", isSignal: true, isRequired: false, transformFunction: null }, formDescription: { classPropertyName: "formDescription", publicName: "formDescription", isSignal: true, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '<h1>Test Typed Form Component</h1> <form [formGroup]="parentFormGroup"> <xt-render-sub [context]="subContext()"></xt-render-sub></form>', isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: XtRenderSubComponent, selector: "xt-render-sub", inputs: ["context", "componentType"], outputs: ["outputs"] }] }); }
|
|
1022
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.4", type: HostTestTypedFormComponent, isStandalone: true, selector: "test-typed-form-host", inputs: { valueType: { classPropertyName: "valueType", publicName: "valueType", isSignal: true, isRequired: false, transformFunction: null }, controlName: { classPropertyName: "controlName", publicName: "controlName", isSignal: true, isRequired: false, transformFunction: null }, formDescription: { classPropertyName: "formDescription", publicName: "formDescription", isSignal: true, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '<h1>Test Typed Form Component</h1> <form [formGroup]="parentFormGroup"> <xt-render-sub [context]="subContext()"></xt-render-sub></form>', isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: XtRenderSubComponent, selector: "xt-render-sub", inputs: ["context", "componentType", "inputs"], outputs: ["outputs"] }] }); }
|
|
1007
1023
|
}
|
|
1008
1024
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: HostTestTypedFormComponent, decorators: [{
|
|
1009
1025
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xt-components.mjs","sources":["../../../projects/xt-components/src/lib/xt-context.ts","../../../projects/xt-components/src/lib/xt-resolved-component.ts","../../../projects/xt-components/src/lib/registry/xt-plugin-registry.ts","../../../projects/xt-components/src/lib/angular/xt-tokens.ts","../../../projects/xt-components/src/lib/resolver/xt-registry-resolver.ts","../../../projects/xt-components/src/lib/type/xt-type-resolver.ts","../../../projects/xt-components/src/lib/angular/xt-resolver.service.ts","../../../projects/xt-components/src/lib/render/xt-render.component.ts","../../../projects/xt-components/src/lib/render/xt-render.component.html","../../../projects/xt-components/src/lib/render/xt-render-sub.component.ts","../../../projects/xt-components/src/lib/render/xt-render-sub.component.html","../../../projects/xt-components/src/lib/output/xt-base-output.ts","../../../projects/xt-components/src/lib/xt-simple/xt-simple.component.ts","../../../projects/xt-components/src/lib/xt-composite/xt-composite.component.ts","../../../projects/xt-components/src/lib/test/xt-unit-test-helper.ts","../../../projects/xt-components/src/lib/test/xt-test-helper-components.ts","../../../projects/xt-components/src/public-api.ts","../../../projects/xt-components/src/xt-components.ts"],"sourcesContent":["import { FormGroup } from '@angular/forms';\nimport { XtTypeResolver } from './type/xt-type-resolver';\nimport { computed, Signal, signal, WritableSignal } from '@angular/core';\n\n/**\n * A XtContext provides all the necessary information for an ng-extended component to operate. It is passed from parent to child component and pass\n * - The display mode - View, Inline view or Edit\n * - The value, either directly as a signal or in a formgroup when editing.\n * - The valueType, necessary to find the right ng-extended component to display\n *\n * To do this, it maintains a hierarchy of context and subContexts by name.\n */\nexport type XtContext<T> = {\n\n displayMode: XtDisplayMode;\n\n subName?: string; // The subName in the parentFormGroup and parentContext\n parentFormGroup?: FormGroup;\n localFormGroup?: FormGroup;\n\n // A parentContext if defined\n parentContext?:XtContext<any>;\n\n isInForm (): boolean;\n\n formGroup () : FormGroup | undefined;\n\n formControlNameOrNull():string|null;\n\n formControlValue (): any | null;\n\n subValue (subName?:string):T | null | undefined;\n\n subContext(subName: string | undefined | null, subType?:string, typeResolver?: XtTypeResolver<XtContext<T>> | null): XtContext<any>;\n\n elementSetContext(subElement: any): XtContext<any>;\n\n displayValue: Signal<T|null>;\n\n setDisplayValue (newValue:T|null|undefined, type?:string): XtContext<T>;\n\n value(): T | null | undefined;\n\n valueType?:string;\n\n toString (): string;\n\n}\n\nexport type XtDisplayMode = 'INLINE_VIEW'|'FULL_VIEW'|'FULL_EDITABLE'|'LIST_VIEW';\n\nexport class XtBaseContext<T> implements XtContext<T>{\n displayMode: XtDisplayMode = 'FULL_VIEW';\n\n /**\n * When editable, the value is stored in a parent formGroup\n */\n subName?: string;\n parentFormGroup?: FormGroup<any>;\n\n /**\n * When the context is a child, it potentially needs to update its parent value\n */\n parentContext?:XtBaseContext<any>;\n\n /**\n * All child contexts are kept in this map\n */\n protected childContexts?:Map<string, XtBaseContext<any>>;\n\n /**\n * localFormGroup exists only for composite components: it's children are all gathered in a form group\n */\n localFormGroup?: FormGroup<any>;\n\n /**\n * When not managed by a form, the value is here\n */\n nonFormValue?: WritableSignal<T|null>;\n\n valueType?:string;\n\n /**\n *\n * @param displayMode\n * @param readOnly\n * @param parentGroup\n * @param controlName\n */\n\n constructor (displayMode: XtDisplayMode, subName?: string, parentGroup?: FormGroup, parentContext?:XtBaseContext<any>)\n {\n this.displayMode=displayMode;\n this.parentFormGroup=parentGroup;\n this.parentContext=parentContext;\n this.subName=subName;\n }\n\n setDisplayValue (newValue:T|null|undefined, type?:string, updateParent:boolean=true): XtBaseContext<T> {\n if (newValue!==undefined){\n const oldValue = this.nonFormValue?this.nonFormValue():null;\n if (this.nonFormValue==null) {\n if ((this.childContexts!=null) && (this.childContexts.size>0)) throw new Error ('An XtContext with no values cannot have children ',{cause:this});\n this.nonFormValue=signal(newValue);\n }else {\n this.nonFormValue.set(newValue);\n }\n\n // Change the children values if needed\n if (this.childContexts!=null) {\n if (newValue==null) {\n for (const [subName, child] of this.childContexts) {\n child.setDisplayValue(null, undefined, false);\n }\n\n } else if (oldValue!=null) {\n for (const [subName, child] of this.childContexts) {\n if (newValue[subName as keyof T]!=oldValue[subName as keyof T]) {\n // The value has changed, let's update\n child.setDisplayValue(newValue[subName as keyof T], undefined, false);\n }\n }\n }\n }\n\n if ((updateParent) && (this.subName!=null))\n this.parentContext?.updateSubDisplayValue(this.subName,newValue);\n }\n\n if (type!==undefined)\n this.valueType = type;\n return this;\n }\n\n displayValue = computed( ()=> {\n if (this.nonFormValue!==undefined) {\n return this.nonFormValue();\n } else {\n throw new Error (\"Cannot display a value that does not exist. Are you sure you're not using Reactive Form with this context? \"+ this.toString());\n }\n });\n\n isInForm (): boolean {\n return ((this.subName != null) && (this.formGroup()!=null));\n }\n\n formControlNameOrNull():string|null {\n return this.subName??null;\n }\n\n value ():T | null | undefined {\n if (this.nonFormValue!=null)\n return this.nonFormValue()??this.formControlValue();\n else\n return this.formControlValue();\n }\n\n subValue (subsubName?:string):any | null | undefined {\n const value = this.nonFormValue?this.nonFormValue():this.formControlValue();\n if ((subsubName != null) && (value != null)) {\n return value[subsubName as keyof typeof value];\n }else {\n return value;\n }\n }\n\n /**\n * Enable child contexts to update its own value in the parent context whenever it's value changes\n */\n protected updateSubDisplayValue (subName:string, subValue:any): void {\n if (this.nonFormValue!=null) {\n let newValue = this.nonFormValue();\n if (newValue==null) {\n const newValue = {} as T;\n newValue[subName as keyof T]=subValue\n this.nonFormValue.set(newValue);\n } else {\n newValue[subName as keyof T] = subValue; // Discretly update the subValue without triggering parent signal\n }\n } else {\n throw new Error (\"No nonFormValue to update subDisplayValue\"+this.toString());\n }\n }\n\n formControlValue (): T | null | undefined {\n let ret:T|undefined|null=undefined;\n if (this.isInForm()) {\n if (this.subName!=null) {\n //console.debug (\"formControlValue parentGroup value is \", this.parentFormGroup?.value);\n ret=this.parentFormGroup?.value[this.subName];\n } else {\n ret= this.parentFormGroup?.value;\n }\n } else {\n ret= undefined;\n }\n //console.debug(\"formControlValue of \"+this.subName+ \" is \",ret);\n return ret;\n }\n\n /**\n * Returns the context associated with a specific element in a set.\n * Value must be an array.\n * @param elementIndex\n */\n elementSetContext(elementIndex:number): XtContext<any> {\n const value = this.value();\n\n if (!Array.isArray(this.value())) {\n throw new Error (\"The value must be an Array / Set to create a subElement context.\")\n }\n\n const ret = new XtBaseContext<T> (this.displayMode, undefined, undefined, this);\n ret.setDisplayValue((value as any[])[elementIndex]);\n if (this.valueType!=null) {\n // Convert potential array type into single type\n ret.valueType=this.valueType.endsWith('[]')?this.valueType.substring(0, this.valueType.length-2):this.valueType;\n }\n return ret;\n }\n\n subContext(subName: string | undefined | null, subType?:string, typeResolver?:XtTypeResolver<XtContext<T>> | null): XtContext<any> {\n if ((subName==null) || (subName.length==0)) {\n return this;\n } else if (this.childContexts?.has(subName)) {\n return this.childContexts?.get(subName)!;\n }else {\n let subValue:WritableSignal<any|null> | null = null;\n let parentGroup = this.formGroup();\n // Recalculate parentGroup and formControlName and value if needed.\n if (parentGroup==null){\n let curValue = this.nonFormValue;\n if (curValue!=null){\n if (curValue()!=null) {\n subValue = signal ((curValue() as any)[subName]);\n }\n }\n if (subValue==null) {\n subValue = signal (null);\n }\n }\n\n const ret = new XtBaseContext<T> (this.displayMode, subName, parentGroup, this);\n if( subValue!=null) ret.nonFormValue=subValue;\n\n if (subType!=null) {\n ret.valueType=subType;\n } else if ((this.valueType!=null) && (typeResolver!=null)) {\n ret.valueType=typeResolver.findType(this, subName, this.value())??undefined;\n }\n\n if (this.childContexts==null) this.childContexts=new Map<string, XtBaseContext<any>>();\n this.childContexts.set(subName, ret);\n return ret;\n }\n }\n\n formGroup (): FormGroup|undefined {\n return this.localFormGroup??this.parentFormGroup;\n }\n\n toString():string {\n let ret='XtContext named ';\n ret += this.subName??'None';\n ret += ' with type ';\n ret += this.valueType??'None';\n ret +=' with value ';\n ret += this.nonFormValue?this.nonFormValue():this.formControlValue();\n return ret;\n }\n}\n","import { XtComponentInfo } from './plugin/xt-plugin-info';\n\nexport class XtResolvedComponent {\n componentName: string;\n componentClass: any;\n outputs:boolean;\n\n constructor (componantName:string, componentClass:any, outputs:boolean=false) {\n this.componentName = componantName;\n this.componentClass = componentClass;\n this.outputs = outputs;\n }\n\n public static from (info:XtComponentInfo<any>): XtResolvedComponent {\n const ret = new XtResolvedComponent(info.componentName, info.componentClass);\n if ( (info.outputs!=null) && (info.outputs.length>0)){\n ret.outputs=true;\n }\n return ret;\n }\n}\n","import { XtComponentInfo, XtPluginInfo } from \"../plugin/xt-plugin-info\";\nimport { signal, Type } from '@angular/core';\nimport { XtComponent } from '../xt-component';\nimport { A } from '@angular/cdk/keycodes';\n\nexport class XtPluginRegistry {\n\n pluginRegistry = new Map<string, XtPluginInfo> ();\n componentRegistry = new Map<string, XtComponentInfo<any>> ();\n componentByTypeCache = new Map<string, XtComponentInfo<any>[]> ();\n\n listComponents = signal(new Array<XtComponentInfo<any>>());\n\n /**\n * The component can manage any standard javascript primitives types. That's usually the default whenever we don't know any particular type\n * string\n * number\n * bigint\n * boolean\n * undefined\n * null\n * symbol is not managed\n * Date, while an object and not a primitive, is managed\n */\n public static readonly ANY_PRIMITIVE_TYPE=\"ANY_PRIMITIVE_TYPE\";\n /**\n * The components can manage any composite javascript type. Default when no type has been defined and it's a user defined javascript object (not a data type)\n */\n public static readonly ANY_OBJECT_TYPE=\"ANY_OBJECT_TYPE\";\n\n public static readonly ANY_PRIMITIVE_SET = \"ANY_PRIMITIVE_SET\";\n\n public static readonly ANY_OBJECT_SET = \"ANY_OBJECT_SET\";\n\n registerPlugin (info:XtPluginInfo) {\n this.pluginRegistry.set (info.name, info);\n if (info.components != null) {\n let updated=false;\n for (const comp of info.components) {\n updated=true;\n this.registerComponent (comp);\n }\n if (updated) this.componentByTypeCache.clear(); // Force recalculation of type\n }\n }\n\n registerComponent<T> (info:XtComponentInfo<T>) {\n this.componentRegistry.set (info.componentName, info);\n this.listComponents.update((array) => {\n let found=false;\n for (let i=0; i<array.length; i++) {\n if (array[i].componentName==info.componentName) {\n found=true;\n array[i] = info;\n }\n }\n if( !found)\n array.push(info);\n return array;\n });\n }\n\n findComponentsForType<T> (valueType:string|null|undefined, value?:T): XtComponentInfo<any>[] {\n let originalType=valueType;\n //console.debug('Finding type from '+valueType+' with value ',value);\n // We don't know the value type, let's try to guess if it's a primitive or object based on the value\n if ( valueType == null) {\n valueType = XtPluginRegistry.ANY_OBJECT_TYPE;\n if ((value == null) || (typeof value != 'object')) {\n valueType=XtPluginRegistry.ANY_PRIMITIVE_TYPE;\n } else if (value instanceof Date) {\n valueType=XtPluginRegistry.ANY_PRIMITIVE_TYPE;\n }\n\n if (Array.isArray(value)) {\n valueType = (valueType===XtPluginRegistry.ANY_PRIMITIVE_TYPE)?XtPluginRegistry.ANY_PRIMITIVE_SET:XtPluginRegistry.ANY_OBJECT_SET;\n }\n } else { // originalType has been defined.\n if (Array.isArray(value)) {\n valueType=valueType.endsWith('[]')?valueType:valueType+'[]';\n originalType=valueType;\n }\n }\n //console.debug('Type found is '+valueType);\n\n let ret = this.componentByTypeCache.get(valueType);\n if (ret == null) {\n ret = new Array<XtComponentInfo<any>> ()\n for (const comp of this.componentRegistry) {\n const info=comp[1];\n if (info.typesHandled.includes (valueType)) {\n ret.push(info);\n }\n }\n\n if ((ret.length == 0) && (originalType!=null)) {\n // Couldn't find a specific component, let's try the generic ones, so we don't pass any type\n ret = this.findComponentsForType(null, value);\n // Cache the component only if we were able to assert its type.\n // If no type has been given and value is null, then we cannot assess the real type\n if (value!=null) {\n this.componentByTypeCache.set(originalType, ret);\n }\n } else {\n // Cache the component only if we were able to assert its type.\n // If no type has been given and value is null, then we cannot assess the real type\n if ((value!=null) || (originalType!=null)) {\n this.componentByTypeCache.set(originalType ?? valueType, ret);\n }\n }\n\n }\n return ret;\n }\n\n public static registry (): XtPluginRegistry {\n return XT_REGISTRY;\n }\n\n findComponentInfo(type: Type<XtComponent<any>>): XtComponentInfo<any>|null {\n // Search for the component registered with this class\n for (const info of this.componentRegistry.values()) {\n if (info.componentClass==type) {\n return info;\n }\n }\n return null;\n }\n\n getComponentInfo(type: Type<XtComponent<any>>): XtComponentInfo<any> {\n const ret= this.findComponentInfo(type);\n if (ret==null) {throw new Error (\"No component found with class \"+type);}\n return ret;\n }\n}\n\nexport const XT_REGISTRY=new XtPluginRegistry ();\n","import { InjectionToken } from \"@angular/core\";\nimport { XtResolver } from \"../resolver/xt-resolver\";\nimport { XT_REGISTRY, XtPluginRegistry } from \"../registry/xt-plugin-registry\";\nimport { XtTypeResolver } from \"../type/xt-type-resolver\";\n\nexport const XT_RESOLVER_TOKEN = new InjectionToken<XtResolver> ('Enable providing a custom component resolver.');\n\nexport const XT_TYPE_RESOLVER_TOKEN = new InjectionToken<XtTypeResolver<any>> ('Enable providing a custom type resolver.');\n\nexport const XT_REGISTRY_TOKEN = new InjectionToken<XtPluginRegistry> (\"Injects the Plugin Registry right into your angular component\", \n {\n factory: () => {\n return XT_REGISTRY;\n }\n }\n )","import { XtPluginRegistry } from \"../registry/xt-plugin-registry\";\nimport { XtTypeResolver } from \"../type/xt-type-resolver\";\nimport { XtContext } from \"../xt-context\";\nimport { XtResolvedComponent } from \"../xt-resolved-component\";\nimport { XtResolver } from \"./xt-resolver\";\n\nexport class XtRegistryResolver implements XtResolver {\n\n registry:XtPluginRegistry;\n typeResolver: XtTypeResolver<any>;\n\n constructor (registry:XtPluginRegistry, typeResolver:XtTypeResolver<any>) {\n this.registry = registry;\n this.typeResolver = typeResolver;\n }\n\n resolve<T>(baseContext: XtContext<T>, subName?:string): XtResolvedComponent | null {\n const ret= this.registry.findComponentsForType (this.typeResolver.findType(baseContext, subName), baseContext.subValue(subName));\n if (ret!=null && ret.length>0) {\n return XtResolvedComponent.from( ret[0]);\n }\n return null;\n }\n\n}\n","import { FormControl, FormGroup } from '@angular/forms';\nimport { XtTypeInfo } from \"../plugin/xt-plugin-info\";\nimport { XtContext } from '../xt-context';\n\n/**\n * Determines the type of elements based on a hierarchy of type\n */\nexport type XtTypeResolver<TypeContext> = {\n\n findType (typeInfo:TypeContext|null|undefined, subName?:string, value?:any):string|null|undefined;\n\n listSubNames (typeInfo: TypeContext | null | undefined, value?: any):string[];\n\n canUpdate (): boolean;\n}\n\nexport type XtUpdatableTypeResolver<TypeContext> = XtTypeResolver<TypeContext> & {\n addType (typeName:string, type:XtTypeInfo|string):void;\n\n}\n\nexport class XtTypeHierarchyResolver<T> implements XtUpdatableTypeResolver<XtContext<T>> {\n types= new Map<string, XtTypeHierarchy> ();\n\n addType (typeName:string, type:XtTypeInfo|string):void {\n this.types.set (typeName, fromDescription (type));\n }\n\n canUpdate(): boolean {\n return true;\n }\n\n findType(typeInfo: XtContext<T> | null | undefined, subName?: string, value?: any):string | null | undefined {\n if( typeInfo==null)\n return typeInfo;\n if (typeInfo.valueType==null)\n return typeInfo.valueType;\n\n if (subName==null) {\n return typeInfo.valueType;\n } else {\n const selectedType = this.types.get(typeInfo.valueType);\n if( (selectedType != null) && (selectedType.children!=null)) {\n const type = selectedType.children[subName].type;\n if (type==null) {\n throw new Error('SubType named '+subName+' of '+typeInfo.valueType+ ' doesn\\'t have a type name.');\n } else {\n return type;\n }\n }\n }\n\n return undefined;\n }\n\n listSubNames (context: XtContext<T> | null | undefined, value?: any):string[] {\n let ret:string[] = [];\n if ((context!=null)&&(context.valueType!=null)) {\n const typeInfo = this.types.get(context.valueType);\n if( typeInfo?.children!=null) {\n ret = Object.keys(typeInfo.children);\n }\n }\n\n if (ret.length==0){\n // We will use the value to extract properties\n if (value!=null) {\n if (Array.isArray(value)) {\n if (value.length>0) {\n const setOfKeys=new Set<string>();\n for (const element of value) {\n const elementKeys=Object.keys(element);\n for (const key of elementKeys) {\n setOfKeys.add(key);\n }\n }\n ret= Array.from(setOfKeys.values());\n }\n }else {\n ret = Object.keys(value);\n }\n }\n }\n\n return ret;\n }\n\n}\n\nexport type XtTypeHierarchy = {\n type?:string;\n children?:{[key:string]: XtTypeHierarchy} ;\n parent?:XtTypeHierarchy;\n\n addChild (key:string, child:XtTypeHierarchy) : void;\n}\n\nexport class XtBaseTypeHierarchy implements XtTypeHierarchy {\n type?:string;\n children?:{[key:string]: XtTypeHierarchy} ;\n parent?:XtTypeHierarchy;\n\n constructor (type?:string, parent?:XtTypeHierarchy) {\n this.type=type;\n this.parent=parent;\n }\n\n addChild (key:string, child:XtTypeHierarchy) : void {\n if (this.children==null) this.children= {};\n this.children[key]=child;\n }\n\n}\n\nexport function fromDescription (typeHierarchy:XtTypeInfo|string, name?:string, parent?:XtTypeHierarchy): XtTypeHierarchy {\n let ret: XtBaseTypeHierarchy|null = null;\n if (typeof typeHierarchy == 'string') {\n ret= new XtBaseTypeHierarchy(typeHierarchy, parent);\n } else {\n\n ret = new XtBaseTypeHierarchy(undefined, parent);\n\n for (const key of Object.keys(typeHierarchy)) {\n const value = typeHierarchy[key];\n fromDescription(value, key, ret);\n }\n }\n\n if((parent!=null) && (name!=null))\n parent.addChild(name, ret);\n else if ((parent!=null) && (name==null)) {\n throw new Error(\"Cannot add type to parent without a name.\");\n }\n return ret;\n}\n\n\nexport function updateFormGroupWithValue(formGroup: FormGroup, value:{[key:string]:any}) {\n\n const toDelete = new Set<string>(Object.keys(formGroup.controls));\n\n for (const valueKey in value) {\n const primitive = isPrimitive(value[valueKey]);\n if (toDelete.delete(valueKey)) {\n // Already a control\n const oldControl = formGroup.get(valueKey)!;\n // Is it the right type ?\n if (primitive) {\n // Must be an FormControl2\n if ((oldControl as any).controls === undefined) {\n // It's ok, just set the value\n oldControl.setValue(value[valueKey]);\n } else {\n formGroup.setControl(valueKey, new FormControl(value[valueKey]));\n }\n } else {\n // Must be a FormGroup\n if ((oldControl as any).controls === undefined) {\n const newFormGroup = new FormGroup({});\n formGroup.setControl(valueKey, newFormGroup);\n updateFormGroupWithValue(newFormGroup, value[valueKey]);\n } else {\n // It was already a formgroup, so just update it\n updateFormGroupWithValue(oldControl as FormGroup, value[valueKey]);\n }\n }\n } else {\n if (primitive) {\n formGroup.addControl(valueKey, new FormControl(value[valueKey]));\n } else {\n const newFormGroup = new FormGroup({});\n formGroup.addControl(valueKey, newFormGroup);\n updateFormGroupWithValue(newFormGroup, value[valueKey]);\n }\n }\n }\n\n // Delete controls that are no more used\n for (const delName of toDelete) {\n formGroup.removeControl(delName);\n }\n}\n\nfunction isPrimitive(valueElement: any): boolean {\n if (typeof valueElement == 'object') {\n if (valueElement==null) return true;\n else {\n return valueElement instanceof Date;\n }\n } else return true;\n}\n","import { computed, inject, Injectable, Type } from '@angular/core';\nimport { XtContext } from '../xt-context';\nimport { XtRegistryResolver } from '../resolver/xt-registry-resolver';\nimport { XT_REGISTRY_TOKEN, XT_RESOLVER_TOKEN, XT_TYPE_RESOLVER_TOKEN } from './xt-tokens';\nimport { XtResolvedComponent } from '../xt-resolved-component';\nimport { XtTypeHierarchyResolver, XtTypeResolver, XtUpdatableTypeResolver } from '../type/xt-type-resolver';\nimport { XtComponentInfo, XtPluginInfo, XtTypeInfo } from '../plugin/xt-plugin-info';\nimport { XtResolver } from '../resolver/xt-resolver';\nimport { XtComponent } from '../xt-component';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class XtResolverService {\n\n pluginRegistry = inject (XT_REGISTRY_TOKEN);\n\n protected baseResolver = inject (XT_RESOLVER_TOKEN, {optional:true});\n protected baseTypeResolver = inject (XT_TYPE_RESOLVER_TOKEN, {optional:true});\n\n resolver:XtResolver;\n typeResolver:XtTypeResolver<any>;\n\n constructor() {\n\n if (this.baseTypeResolver==null) {\n this.typeResolver = new XtTypeHierarchyResolver ();\n } else this.typeResolver=this.baseTypeResolver;\n\n if (this.baseResolver==null) {\n this.resolver=new XtRegistryResolver (this.pluginRegistry, this.typeResolver);\n } else this.resolver=this.baseResolver;\n\n }\n\n findBestComponent<T> (baseContext: XtContext<T>, subName?:string) : XtResolvedComponent{\n const ret= this.resolver.resolve(baseContext, subName);\n if (ret!=null) return ret;\n else throw new Error (\"No components found for this context \"+ baseContext.toString());\n }\n\n findTypeOf<T> (baseContext:XtContext<T>, subName?:string, value?:T): any | undefined {\n const ret = this.typeResolver.findType (baseContext, subName, value);\n return ret;\n }\n\n listSubNamesOf<T> (baseContext:XtContext<T>, value?:T): string[] {\n return this.typeResolver.listSubNames(baseContext, value);\n }\n\n registerPlugin (info:XtPluginInfo) {\n this.pluginRegistry.registerPlugin (info);\n this.registerTypes (info.types);\n }\n\n registerTypes (types:XtTypeInfo|undefined) {\n if ((types !=null) && (this.typeResolver.canUpdate())) {\n for (const newType in types) {\n (this.typeResolver as XtUpdatableTypeResolver<string>).addType (newType, types[newType]);\n }\n }\n }\n\n getComponentInfo<T>(type: Type<XtComponent<T>>):XtResolvedComponent {\n return XtResolvedComponent.from(this.pluginRegistry.getComponentInfo (type));\n }\n\n findComponentInfo<T>(type: Type<XtComponent<T>>):XtResolvedComponent|null {\n const ret=this.pluginRegistry.findComponentInfo (type);\n if (ret==null) return null;\n else return XtResolvedComponent.from(ret);\n }\n\n public listComponents = computed<Array<XtComponentInfo<any>>>(() => {\n return this.pluginRegistry.listComponents();\n });\n\n\n}\n","import {\n AfterViewInit,\n Component,\n computed,\n inject,\n input,\n model,\n output,\n Signal,\n Type,\n viewChild\n} from '@angular/core';\nimport { NgComponentOutlet } from '@angular/common';\nimport { XtComponent, XtComponentOutput } from '../xt-component';\nimport { XtBaseContext, XtContext, XtDisplayMode } from '../xt-context';\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { XtResolverService } from '../angular/xt-resolver.service';\nimport { XtResolvedComponent } from '../xt-resolved-component';\n\n/**\n * Offers a nice and easy to dynamically embed a component.\n * You set the type, the display mode, and either the value or the formgroup & subName to use.\n * XtRender will then instantiate the component, bind it to the value or form, and display it.\n */\n@Component({\n selector: 'xt-render',\n standalone: true,\n imports: [\n NgComponentOutlet,\n ReactiveFormsModule\n ],\n templateUrl: './xt-render.component.html',\n styleUrl: './xt-render.component.css'\n})\nexport class XtRenderComponent<T> implements AfterViewInit {\n resolverService = inject(XtResolverService);\n\n componentType = input<Type<XtComponent<T>>> ();\n displayMode = input.required<XtDisplayMode> ();\n valueType = input<string> ();\n\n // Either we set the value directly\n value= model<T> ();\n // Or we are inside a Form\n formGroup=input<FormGroup>();\n subName= input<string>();\n\n outputs = output<XtComponentOutput> ();\n hasOutputs:boolean = false;\n\n outlet = viewChild.required(NgComponentOutlet);\n\n constructor() {\n\n }\n\n\n context: Signal<XtContext<any>> = computed(() => {\n let form = this.formGroup();\n\n const ret= new XtBaseContext<any>(this.displayMode(), this.subName(), form);\n ret.valueType=this.valueType();\n if (!ret.isInForm()) {\n const subName = this.subName();\n const value = this.value();\n if ( (subName == null) || (value == null)) {\n ret.setDisplayValue(value);\n } else {\n ret.setDisplayValue(value[subName as keyof typeof value]);\n }\n }\n return ret as XtContext<T>;\n });\n\n type:Signal<Type<XtComponent<T>>|null> = computed( () => {\n //console.debug(\"Calculating type in XtRenderSubComponent\");\n\n let type=this.componentType();\n let compFound:XtResolvedComponent|null = null;\n if (type==null) {\n //console.debug('XtRender, using component set '+ type);\n //compFound = this.resolverService.findComponentInfo (type);\n //} else {\n compFound= this.resolverService.findBestComponent(this.context());\n //console.debug('XtRender, found component ',compFound.componentName);\n type= compFound.componentClass;\n }\n\n return type??null;\n });\n\n ngAfterViewInit() {\n const instance=this.outlet().componentInstance as XtComponent;\n if ((instance != null) && (instance.hasOutputs) && (instance.outputs!=null)) {\n instance.outputs.subscribe ((out) => this.outputs.emit(out));\n this.hasOutputs=true;\n }\n\n }\n\n}\n","<ng-container *ngComponentOutlet=\"type(); inputs: {context:context ()}\" />\n","import { AfterViewInit, Component, computed, inject, input, output, Signal, Type, viewChild } from '@angular/core';\nimport { NgComponentOutlet } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { XtContext } from '../xt-context';\nimport { XtComponent, XtComponentOutput } from '../xt-component';\nimport { XtResolverService } from '../angular/xt-resolver.service';\nimport { XtResolvedComponent } from '../xt-resolved-component';\n\n/**\n * Dynamically render a component that will display the given subValue.\n * To be used only inside an XtSimpleComponent or XtCompositeComponent\n */\n@Component({\n selector: 'xt-render-sub',\n standalone: true,\n imports: [\n NgComponentOutlet,\n ReactiveFormsModule\n ],\n templateUrl: './xt-render-sub.component.html',\n styleUrl: './xt-render-sub.component.css'\n})\nexport class XtRenderSubComponent<T> implements AfterViewInit {\n context = input.required<XtContext<T>> ();\n componentType = input<Type<XtComponent<T>>> ();\n\n outputs = output<XtComponentOutput> ();\n hasOutputs:boolean = false;\n\n outlet = viewChild.required(NgComponentOutlet);\n\n resolverService = inject(XtResolverService);\n\n type:Signal<Type<XtComponent<T>>|null> = computed( () => {\n //console.debug(\"Calculating type in XtRenderSubComponent\");\n\n let type=this.componentType();\n let compFound:XtResolvedComponent|null = null;\n if (type==null) {\n //console.debug('XtRender, using component set '+ type);\n //compFound = this.resolverService.findComponentInfo (type);\n //} else {\n compFound= this.resolverService.findBestComponent(this.context());\n //console.debug('XtRender, found component ',compFound.componentName);\n type= compFound.componentClass;\n }\n\n return type??null;\n\n });\n\n ngAfterViewInit() {\n const instance=this.outlet().componentInstance as XtComponent;\n if ((instance != null) && (instance.hasOutputs) && (instance.outputs!=null)) {\n instance.outputs.subscribe ((out) => this.outputs.emit(out));\n this.hasOutputs=true;\n }\n\n }\n\n}\n","{{componentType()}}\n<ng-container *ngComponentOutlet=\"type(); inputs: {context:context ()}\" />\n","import { signal, WritableSignal } from '@angular/core';\nimport { XtComponentOutput, XtOutputType } from '../xt-component';\n\nexport class XtBaseOutput implements XtComponentOutput {\n valueSelected: WritableSignal<any> | undefined;\n\n setNewOutput (name:XtOutputType, value:any):boolean {\n let ret=false;\n if (this[name] == null) {\n this[name] = signal<any>(value);\n ret=true;\n }else {\n this[name].set (value);\n }\n return ret;\n }\n}\n","import { Component, computed, input, InputSignal, OnInit, output, OutputEmitterRef } from '@angular/core';\nimport { AbstractControl, FormControl, FormGroup } from '@angular/forms';\nimport { XtContext } from '../xt-context';\nimport { XtComponent, XtComponentOutput, XtOutputType } from '../xt-component';\nimport { XtBaseOutput } from '../output/xt-base-output';\n\n/**\n * An XtSimpleComponent just displays the given value or element in a form.\n * If you need to dynamically embed other XtComponents to display sub elements, then please use the XtCompositeComponent\n */\n@Component({\n standalone: true,\n imports: [],\n template: ''\n})\nexport class XtSimpleComponent<T = any> implements XtComponent<T>{\n context = input.required<XtContext<T>>();\n outputs = output<XtComponentOutput> ();\n /**\n * Does the component provides Output or not ?\n * @protected\n */\n hasOutputs= false;\n\n protected outputElement?: XtBaseOutput\n\n isInForm = computed<boolean> ( () => {\n return this.context()?.isInForm()??false;\n });\n\n formControlNameIfAny = computed<string | undefined> (() => {\n return this.context()?.subName;\n });\n\n formGroupIfAny = computed<FormGroup | undefined> (() => {\n return this.context()?.formGroup();\n })\n\n formGroup = computed<FormGroup> (() => {\n const ret= this.context()?.formGroup();\n if (ret==null) throw new Error ('No form groups in this component of type '+this.componentDescriptor());\n return ret;\n });\n\n /**\n * Returns the component form name, which is for now the subName\n */\n componentNameInForm=computed<string> ( () => {\n return this.safelyGetSubName();\n });\n\n constructor() {\n if (this.hasOutputs) {\n if (this.outputElement == null) {\n this.outputElement = new XtBaseOutput();\n }\n }\n }\n\n manageFormControl<T> (ctrlName:string): AbstractControl<T>|undefined {\n const formGroup = this.formGroupIfAny();\n if (formGroup==null) {\n // You can call manageFormControl even in not a form, it just get ignored\n //console.debug('FormGroup is undefined when declaring managedcontrol '+ctrlName);\n return undefined;\n } else {\n let ctrl=formGroup.get(ctrlName);\n if (ctrl==null) {\n ctrl = new FormControl<T|undefined>(undefined);\n formGroup.setControl(ctrlName, ctrl);\n }\n return ctrl;\n }\n }\n\n safelyGetSubName = computed<string>(() => {\n const ret = this.context()?.subName;\n if (ret==null) throw new Error ('This component has no name in the form '+this.componentDescriptor());\n return ret;\n });\n\n /**\n * Returns the form control name and create a form control behind the scene\n */\n formControlName = computed<string> (() => {\n const ret = this.safelyGetSubName();\n\n this.manageFormControl<any>(ret); // Creates the form control\n return ret;\n });\n\n formControl = computed<AbstractControl<any>> (() => {\n const subName = this.safelyGetSubName();\n const formControl= this.manageFormControl(subName);\n if (formControl==null) throw new Error (\"Calling formControl for subName \"+subName+\" when none exist.\");\n return formControl;\n});\n\n componentDescriptor (): string {\n return \"Component with type \"+this.constructor.name+\" with context \"+this.context().toString();\n }\n\n getValue= computed (()=> {\n return this.context().value();\n });\n\n displayValue = computed (() => {\n return this.context().displayValue();\n });\n\n protected emitOutput(outputName: XtOutputType, newValue: any) {\n if (!this.hasOutputs) {\n throw new Error (\"Component without outputs cannot emit output\");\n }\n\n let newOutput = false;\n if (this.outputElement==null) {\n this.outputElement = new XtBaseOutput();\n newOutput=true;\n }\n\n newOutput = this.outputElement.setNewOutput(outputName, newValue) || newOutput;\n if (newOutput) {\n this.outputs?.emit(this.outputElement);\n }\n }\n\n}\n","import { Component, computed, inject } from '@angular/core';\nimport { XtSimpleComponent } from '../xt-simple/xt-simple.component';\nimport { FormGroup } from '@angular/forms';\nimport { XtResolverService } from '../angular/xt-resolver.service';\nimport { XtContext } from '../xt-context';\n\n@Component({\n standalone: true,\n imports: [],\n template: '',\n styleUrl: './xt-composite.component.css'\n})\nexport class XtCompositeComponent<T = any> extends XtSimpleComponent<T> {\n\n resolverService = inject(XtResolverService);\n\n override formGroupIfAny = computed<FormGroup | undefined> (() => {\n const context = this.context();\n if (context==null) return undefined;\n let ret= context.localFormGroup;\n if ((ret==null) && (context.parentFormGroup!=null) && (context.subName!=null)) {\n if (context.parentFormGroup.contains(context.subName)) {\n context.localFormGroup = context.parentFormGroup.get(context.subName) as FormGroup;\n } else {\n context.localFormGroup= new FormGroup ({});\n context.parentFormGroup.addControl(context.subName, context.localFormGroup);\n }\n ret=context.localFormGroup;\n }\n return ret;\n })\n\n /**\n * We need to create a new form group to manage the sub elements.\n */\n override formGroup = computed<FormGroup> (() => {\n const ret= this.formGroupIfAny();\n if (ret==null) throw new Error ('No form groups in this component of type '+this.componentDescriptor());\n return ret;\n });\n\n /**\n * Helper function to calculate the sub context\n * @param subName\n * @param subType\n */\n subContext (subName:string, subType?:string):XtContext<any> {\n this.formGroupIfAny(); // Ensure the context is properly initialized\n return this.context().subContext(subName, subType, this.resolverService.typeResolver);\n }\n\n}\n","import { XtResolverService } from '../angular/xt-resolver.service';\nimport { inject } from '@angular/core';\n\nexport class XtUnitTestHelper {\n/* public static registerComponent<T> (name:string, compClass:T, type:string){\n this.resolverService.pluginRegistry.registerComponent({\n componentName:name,\n componentClass: compClass,\n typesHandled: [type]\n });\n }\n*/\n}\n","import { Component, computed, inject, input, Type } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AbstractControl, FormArray, FormBuilder, FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { XtRenderComponent } from '../render/xt-render.component';\nimport { XtComponent } from '../xt-component';\nimport { XtBaseContext, XtDisplayMode } from '../xt-context';\nimport { XtRenderSubComponent } from '../render/xt-render-sub.component';\nimport { XtResolverService } from '../angular/xt-resolver.service';\n\n/**\n * Component that can be used to bootstrap tests.\n * Just set the value and component type, and it will be injected in your test.\n */\n@Component({\n selector:'test-host',\n standalone:true,\n imports: [CommonModule, XtRenderComponent],\n template: '<h1>Test Simple Component</h1> <xt-render [componentType]=\"type()\" [displayMode]=\"displayMode()\" [value]=\"value()\" ></xt-render> '\n\n})\nexport class HostTestSimpleComponent {\n type = input.required<Type<XtComponent<any>>>();\n displayMode = input<XtDisplayMode> ('FULL_VIEW');\n value = input<any|undefined> (undefined);\n\n}\n\n/**\n * Same as HostTestSimpleComponent but it includes everything in a form.\n * Just set the component type, the formGroup and the component name, and your component will be run.\n * You can as well easily read and set the value.\n */\n@Component({\n selector:'test-form-host',\n standalone:true,\n imports: [CommonModule, XtRenderComponent, ReactiveFormsModule],\n template: '<h1>Test Form Component</h1> <form [formGroup]=\"computedFormGroup()\"> <xt-render [componentType]=\"type()\" displayMode=\"FULL_EDITABLE\" [subName]=\"controlName()\" [formGroup]=\"computedFormGroup()\"></xt-render></form>'\n})\nexport class HostTestFormComponent {\n builder = inject(FormBuilder);\n type = input.required<Type<XtComponent<any>>>();\n controlName = input.required<string>();\n // You can send the description to be used in a FormBuilder to create the formgroup;\n formDescription = input<any> ({ });\n // Or set the FormGroup directly\n formGroup= input<FormGroup>();\n\n createdFormGroup: FormGroup|null = null;\n\n computedFormGroup () {\n if( this.createdFormGroup==null) {\n const formGroup=this.formGroup();\n this.createdFormGroup=formGroup??generateFormGroup(this.formDescription());\n }\n return this.createdFormGroup;\n }\n\n patchValue (newVal:any) {\n const patch:{[key:string]:any}={};\n patch[this.controlName()]=newVal;\n if (this.createdFormGroup!=null)\n this.createdFormGroup.patchValue(patch);\n else throw new Error (\"FormGroup not yet created. Did you set formGroup or formDescription property ?\");\n }\n\n retrieveValue (): any {\n if (this.createdFormGroup!=null)\n return this.createdFormGroup.value[this.controlName()];\n else throw new Error (\"FormGroup not yet created. Did you set formGroup or formDescription property ?\");\n }\n}\n\n/**\n * Component that can be used to test your component based on the type it handles\n * Just set the type hierarchy to register, the value, and it will instantiate the right component in your plugin\n */\n@Component({\n selector:'test-typed-host',\n standalone:true,\n imports: [CommonModule, XtRenderSubComponent],\n template: '<h1>Test Typed Component</h1> <xt-render-sub [context]=\"context()\" ></xt-render-sub> '\n\n})\nexport class HostTestTypedComponent {\n\n displayMode = input<XtDisplayMode> ('FULL_VIEW');\n value = input<any> ();\n valueType = input<string> ();\n\n context = computed( () => {\n const ret = new XtBaseContext(this.displayMode());\n\n ret.valueType=this.valueType();\n ret.setDisplayValue(this.value());\n return ret;\n });\n}\n\n/**\n * Same as HostTestSimpleComponent but it includes everything in a form.\n * Just set the component type, the formGroup and the component name, and your component will be run.\n * You can as well easily read and set the value.\n */\n@Component({\n selector:'test-typed-form-host',\n standalone:true,\n imports: [CommonModule, ReactiveFormsModule, XtRenderSubComponent],\n template: '<h1>Test Typed Form Component</h1> <form [formGroup]=\"parentFormGroup\"> <xt-render-sub [context]=\"subContext()\"></xt-render-sub></form>'\n})\nexport class HostTestTypedFormComponent {\n builder = inject(FormBuilder);\n resolver = inject(XtResolverService);\n\n static readonly CONTROL_NAME='ForTest';\n\n valueType = input<string> ();\n controlName = input<string>();\n // You can send the description to be used in a FormBuilder to create the formgroup;\n formDescription = input<any> ({ });\n // Or set the FormGroup directly\n formGroup= input<FormGroup>();\n\n parentFormGroup = this.builder.group<{[keys:string]: AbstractControl}>({});\n\n createdFormGroup: FormGroup|null = null;\n\n computedFormGroup = computed(() =>{\n if( this.createdFormGroup==null) {\n const formGroup=this.formGroup();\n this.createdFormGroup=formGroup??generateFormGroup(this.formDescription());\n this.parentFormGroup.addControl(this.controlName()??HostTestTypedFormComponent.CONTROL_NAME, this.createdFormGroup);\n }\n return this.createdFormGroup;\n });\n\n subContext = computed( () => {\n this.computedFormGroup(); // Make sure the subformgroups are created\n\n const ctrlName = this.controlName();\n let ret:XtBaseContext<any>|null = null;\n if (ctrlName==null){\n ret = new XtBaseContext('FULL_EDITABLE', HostTestTypedFormComponent.CONTROL_NAME, this.parentFormGroup);\n }\n else{\n ret = new XtBaseContext('FULL_EDITABLE', ctrlName, this.createdFormGroup!);\n }\n ret.valueType=this.valueType();\n\n return ret;\n });\n\n patchValue (controlName:string, newVal:any) {\n const patch:{[key:string]:any}={};\n patch[controlName]=newVal;\n this.computedFormGroup().patchValue(patch);\n }\n\n retrieveValue (controlName:string): any {\n return this.computedFormGroup().value[controlName];\n }\n\n}\n\nfunction generateFormGroup(formDescription: any):FormGroup {\n if (typeof formDescription != 'object') {\n throw new Error ('Form Description should be an object of values');\n }\n return generateFormControl(formDescription) as FormGroup;\n}\n\nfunction generateFormControl(formDescription: any): AbstractControl {\n\n if (formDescription==null) {\n return new FormControl(formDescription);\n }\n\n if (Array.isArray(formDescription)){\n const retArray = new FormArray<AbstractControl>([]);\n for (const val of formDescription) {\n retArray.push(generateFormControl(val), {emitEvent:false});\n }\n return retArray;\n }\n\n if ((typeof formDescription=='object')&&(!(formDescription instanceof Date))) {\n const retObject=new FormGroup({});\n for (const key of Object.keys(formDescription)) {\n retObject.addControl(key, generateFormControl(formDescription[key]));\n }\n return retObject;\n }\n return new FormControl(formDescription);\n}\n","/*\n * Public API Surface of xt-components\n */\n\nexport * from './lib/xt-component';\nexport * from './lib/xt-context';\nexport * from './lib/xt-resolved-component';\nexport * from './lib/resolver/xt-resolver';\nexport * from './lib/registry/xt-plugin-registry'\nexport * from './lib/plugin/xt-plugin-info'\n\nexport * from './lib/angular/xt-tokens';\nexport * from './lib/angular/xt-resolver.service';\n\nexport * from './lib/render/xt-render.component';\nexport * from './lib/render/xt-render-sub.component';\nexport * from './lib/xt-simple/xt-simple.component';\nexport * from './lib/xt-composite/xt-composite.component';\n\nexport * from './lib/type/xt-type-resolver';\nexport * from './lib/test/xt-unit-test-helper';\nexport * from './lib/test/xt-test-helper-components';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAmDa,aAAa,CAAA;AA+BtB;;;;;;AAMG;AAEH,IAAA,WAAA,CAAa,WAA0B,EAAE,OAAgB,EAAE,WAAuB,EAAE,aAAiC,EAAA;QAtCrH,IAAW,CAAA,WAAA,GAAkB,WAAW;AAkFxC,QAAA,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAE,MAAI;AAC3B,YAAA,IAAI,IAAI,CAAC,YAAY,KAAG,SAAS,EAAE;AACjC,gBAAA,OAAO,IAAI,CAAC,YAAY,EAAE;;iBACrB;gBACL,MAAM,IAAI,KAAK,CAAE,6GAA6G,GAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;;AAEpJ,SAAC,CAAC;AAhDE,QAAA,IAAI,CAAC,WAAW,GAAC,WAAW;AAC5B,QAAA,IAAI,CAAC,eAAe,GAAC,WAAW;AAChC,QAAA,IAAI,CAAC,aAAa,GAAC,aAAa;AAChC,QAAA,IAAI,CAAC,OAAO,GAAC,OAAO;;AAGxB,IAAA,eAAe,CAAE,QAAyB,EAAE,IAAY,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A,OAAO,SAAS;;AAElB,IAAA,OAAO,IAAI,WAAW,CAAC,eAAe,CAAC;AACzC;;AChMA;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"xt-components.mjs","sources":["../../../projects/xt-components/src/lib/xt-context.ts","../../../projects/xt-components/src/lib/xt-resolved-component.ts","../../../projects/xt-components/src/lib/registry/xt-plugin-registry.ts","../../../projects/xt-components/src/lib/angular/xt-tokens.ts","../../../projects/xt-components/src/lib/resolver/xt-registry-resolver.ts","../../../projects/xt-components/src/lib/type/xt-type-resolver.ts","../../../projects/xt-components/src/lib/angular/xt-resolver.service.ts","../../../projects/xt-components/src/lib/output/xt-base-output.ts","../../../projects/xt-components/src/lib/render/xt-render.component.ts","../../../projects/xt-components/src/lib/render/xt-render.component.html","../../../projects/xt-components/src/lib/render/xt-render-sub.component.ts","../../../projects/xt-components/src/lib/render/xt-render-sub.component.html","../../../projects/xt-components/src/lib/output/xt-base-input.ts","../../../projects/xt-components/src/lib/xt-simple/xt-simple.component.ts","../../../projects/xt-components/src/lib/xt-composite/xt-composite.component.ts","../../../projects/xt-components/src/lib/test/xt-unit-test-helper.ts","../../../projects/xt-components/src/lib/test/xt-test-helper-components.ts","../../../projects/xt-components/src/public-api.ts","../../../projects/xt-components/src/xt-components.ts"],"sourcesContent":["import { FormGroup } from '@angular/forms';\nimport { XtTypeResolver } from './type/xt-type-resolver';\nimport { computed, Signal, signal, WritableSignal } from '@angular/core';\n\n/**\n * A XtContext provides all the necessary information for an ng-extended component to operate. It is passed from parent to child component and pass\n * - The display mode - View, Inline view or Edit\n * - The value, either directly as a signal or in a formgroup when editing.\n * - The valueType, necessary to find the right ng-extended component to display\n *\n * To do this, it maintains a hierarchy of context and subContexts by name.\n */\nexport type XtContext<T> = {\n\n displayMode: XtDisplayMode;\n\n subName?: string; // The subName in the parentFormGroup and parentContext\n parentFormGroup?: FormGroup;\n localFormGroup?: FormGroup;\n\n // A parentContext if defined\n parentContext?:XtContext<any>;\n\n isInForm (): boolean;\n\n formGroup () : FormGroup | undefined;\n\n formControlNameOrNull():string|null;\n\n formControlValue (): any | null;\n\n subValue (subName?:string):T | null | undefined;\n\n subContext(subName: string | undefined | null, subType?:string, typeResolver?: XtTypeResolver<XtContext<T>> | null): XtContext<any>;\n\n elementSetContext(subElement: any): XtContext<any>;\n\n displayValue: Signal<T|null>;\n\n setDisplayValue (newValue:T|null|undefined, type?:string): XtContext<T>;\n\n value(): T | null | undefined;\n\n valueType?:string;\n\n toString (): string;\n\n}\n\nexport type XtDisplayMode = 'INLINE_VIEW'|'FULL_VIEW'|'FULL_EDITABLE'|'LIST_VIEW';\n\nexport class XtBaseContext<T> implements XtContext<T>{\n displayMode: XtDisplayMode = 'FULL_VIEW';\n\n /**\n * When editable, the value is stored in a parent formGroup\n */\n subName?: string;\n parentFormGroup?: FormGroup<any>;\n\n /**\n * When the context is a child, it potentially needs to update its parent value\n */\n parentContext?:XtBaseContext<any>;\n\n /**\n * All child contexts are kept in this map\n */\n protected childContexts?:Map<string, XtBaseContext<any>>;\n\n /**\n * localFormGroup exists only for composite components: it's children are all gathered in a form group\n */\n localFormGroup?: FormGroup<any>;\n\n /**\n * When not managed by a form, the value is here\n */\n nonFormValue?: WritableSignal<T|null>;\n\n valueType?:string;\n\n /**\n *\n * @param displayMode\n * @param readOnly\n * @param parentGroup\n * @param controlName\n */\n\n constructor (displayMode: XtDisplayMode, subName?: string, parentGroup?: FormGroup, parentContext?:XtBaseContext<any>)\n {\n this.displayMode=displayMode;\n this.parentFormGroup=parentGroup;\n this.parentContext=parentContext;\n this.subName=subName;\n }\n\n setDisplayValue (newValue:T|null|undefined, type?:string, updateParent:boolean=true): XtBaseContext<T> {\n if (newValue!==undefined){\n const oldValue = this.nonFormValue?this.nonFormValue():null;\n if (this.nonFormValue==null) {\n if ((this.childContexts!=null) && (this.childContexts.size>0)) throw new Error ('An XtContext with no values cannot have children ',{cause:this});\n this.nonFormValue=signal(newValue);\n }else {\n this.nonFormValue.set(newValue);\n }\n\n // Change the children values if needed\n if (this.childContexts!=null) {\n if (newValue==null) {\n for (const [subName, child] of this.childContexts) {\n child.setDisplayValue(null, undefined, false);\n }\n\n } else if (oldValue!=null) {\n for (const [subName, child] of this.childContexts) {\n if (newValue[subName as keyof T]!=oldValue[subName as keyof T]) {\n // The value has changed, let's update\n child.setDisplayValue(newValue[subName as keyof T], undefined, false);\n }\n }\n }\n }\n\n if ((updateParent) && (this.subName!=null))\n this.parentContext?.updateSubDisplayValue(this.subName,newValue);\n }\n\n if (type!==undefined)\n this.valueType = type;\n return this;\n }\n\n displayValue = computed( ()=> {\n if (this.nonFormValue!==undefined) {\n return this.nonFormValue();\n } else {\n throw new Error (\"Cannot display a value that does not exist. Are you sure you're not using Reactive Form with this context? \"+ this.toString());\n }\n });\n\n isInForm (): boolean {\n return ((this.subName != null) && (this.formGroup()!=null));\n }\n\n formControlNameOrNull():string|null {\n return this.subName??null;\n }\n\n value ():T | null | undefined {\n if (this.nonFormValue!=null)\n return this.nonFormValue()??this.formControlValue();\n else\n return this.formControlValue();\n }\n\n subValue (subsubName?:string):any | null | undefined {\n const value = this.nonFormValue?this.nonFormValue():this.formControlValue();\n if ((subsubName != null) && (value != null)) {\n return value[subsubName as keyof typeof value];\n }else {\n return value;\n }\n }\n\n /**\n * Enable child contexts to update its own value in the parent context whenever it's value changes\n */\n protected updateSubDisplayValue (subName:string, subValue:any): void {\n if (this.nonFormValue!=null) {\n let newValue = this.nonFormValue();\n if (newValue==null) {\n const newValue = {} as T;\n newValue[subName as keyof T]=subValue\n this.nonFormValue.set(newValue);\n } else {\n newValue[subName as keyof T] = subValue; // Discretly update the subValue without triggering parent signal\n }\n } else {\n throw new Error (\"No nonFormValue to update subDisplayValue\"+this.toString());\n }\n }\n\n formControlValue (): T | null | undefined {\n let ret:T|undefined|null=undefined;\n if (this.isInForm()) {\n if (this.subName!=null) {\n //console.debug (\"formControlValue parentGroup value is \", this.parentFormGroup?.value);\n ret=this.parentFormGroup?.value[this.subName];\n } else {\n ret= this.parentFormGroup?.value;\n }\n } else {\n ret= undefined;\n }\n //console.debug(\"formControlValue of \"+this.subName+ \" is \",ret);\n return ret;\n }\n\n /**\n * Returns the context associated with a specific element in a set.\n * Value must be an array.\n * @param elementIndex\n */\n elementSetContext(elementIndex:number): XtContext<any> {\n const value = this.value();\n\n if (!Array.isArray(this.value())) {\n throw new Error (\"The value must be an Array / Set to create a subElement context.\")\n }\n\n const ret = new XtBaseContext<T> (this.displayMode, undefined, undefined, this);\n ret.setDisplayValue((value as any[])[elementIndex]);\n if (this.valueType!=null) {\n // Convert potential array type into single type\n ret.valueType=this.valueType.endsWith('[]')?this.valueType.substring(0, this.valueType.length-2):this.valueType;\n }\n return ret;\n }\n\n subContext(subName: string | undefined | null, subType?:string, typeResolver?:XtTypeResolver<XtContext<T>> | null): XtContext<any> {\n if ((subName==null) || (subName.length==0)) {\n return this;\n } else if (this.childContexts?.has(subName)) {\n return this.childContexts?.get(subName)!;\n }else {\n let subValue:WritableSignal<any|null> | null = null;\n let parentGroup = this.formGroup();\n // Recalculate parentGroup and formControlName and value if needed.\n if (parentGroup==null){\n let curValue = this.nonFormValue;\n if (curValue!=null){\n if (curValue()!=null) {\n subValue = signal ((curValue() as any)[subName]);\n }\n }\n if (subValue==null) {\n subValue = signal (null);\n }\n }\n\n const ret = new XtBaseContext<T> (this.displayMode, subName, parentGroup, this);\n if( subValue!=null) ret.nonFormValue=subValue;\n\n if (subType!=null) {\n ret.valueType=subType;\n } else if ((this.valueType!=null) && (typeResolver!=null)) {\n ret.valueType=typeResolver.findType(this, subName, this.value())??undefined;\n }\n\n if (this.childContexts==null) this.childContexts=new Map<string, XtBaseContext<any>>();\n this.childContexts.set(subName, ret);\n return ret;\n }\n }\n\n formGroup (): FormGroup|undefined {\n return this.localFormGroup??this.parentFormGroup;\n }\n\n toString():string {\n let ret='XtContext named ';\n ret += this.subName??'None';\n ret += ' with type ';\n ret += this.valueType??'None';\n ret +=' with value ';\n ret += this.nonFormValue?this.nonFormValue():this.formControlValue();\n return ret;\n }\n}\n","import { XtComponentInfo } from './plugin/xt-plugin-info';\n\nexport class XtResolvedComponent {\n componentName: string;\n componentClass: any;\n outputs:boolean;\n\n constructor (componantName:string, componentClass:any, outputs:boolean=false) {\n this.componentName = componantName;\n this.componentClass = componentClass;\n this.outputs = outputs;\n }\n\n public static from (info:XtComponentInfo<any>): XtResolvedComponent {\n const ret = new XtResolvedComponent(info.componentName, info.componentClass);\n if ( (info.outputs!=null) && (info.outputs.length>0)){\n ret.outputs=true;\n }\n return ret;\n }\n}\n","import { XtComponentInfo, XtPluginInfo } from \"../plugin/xt-plugin-info\";\nimport { signal, Type } from '@angular/core';\nimport { XtComponent } from '../xt-component';\nimport { A } from '@angular/cdk/keycodes';\n\nexport class XtPluginRegistry {\n\n pluginRegistry = new Map<string, XtPluginInfo> ();\n componentRegistry = new Map<string, XtComponentInfo<any>> ();\n componentByTypeCache = new Map<string, XtComponentInfo<any>[]> ();\n\n listComponents = signal(new Array<XtComponentInfo<any>>());\n\n /**\n * The component can manage any standard javascript primitives types. That's usually the default whenever we don't know any particular type\n * string\n * number\n * bigint\n * boolean\n * undefined\n * null\n * symbol is not managed\n * Date, while an object and not a primitive, is managed\n */\n public static readonly ANY_PRIMITIVE_TYPE=\"ANY_PRIMITIVE_TYPE\";\n /**\n * The components can manage any composite javascript type. Default when no type has been defined and it's a user defined javascript object (not a data type)\n */\n public static readonly ANY_OBJECT_TYPE=\"ANY_OBJECT_TYPE\";\n\n public static readonly ANY_PRIMITIVE_SET = \"ANY_PRIMITIVE_SET\";\n\n public static readonly ANY_OBJECT_SET = \"ANY_OBJECT_SET\";\n\n registerPlugin (info:XtPluginInfo) {\n this.pluginRegistry.set (info.name, info);\n if (info.components != null) {\n let updated=false;\n for (const comp of info.components) {\n updated=true;\n this.registerComponent (comp);\n }\n if (updated) this.componentByTypeCache.clear(); // Force recalculation of type\n }\n }\n\n registerComponent<T> (info:XtComponentInfo<T>) {\n this.componentRegistry.set (info.componentName, info);\n this.listComponents.update((array) => {\n let found=false;\n for (let i=0; i<array.length; i++) {\n if (array[i].componentName==info.componentName) {\n found=true;\n array[i] = info;\n }\n }\n if( !found)\n array.push(info);\n return array;\n });\n }\n\n findComponentsForType<T> (valueType:string|null|undefined, value?:T): XtComponentInfo<any>[] {\n let originalType=valueType;\n //console.debug('Finding type from '+valueType+' with value ',value);\n // We don't know the value type, let's try to guess if it's a primitive or object based on the value\n if ( valueType == null) {\n valueType = XtPluginRegistry.ANY_OBJECT_TYPE;\n if ((value == null) || (typeof value != 'object')) {\n valueType=XtPluginRegistry.ANY_PRIMITIVE_TYPE;\n } else if (value instanceof Date) {\n valueType=XtPluginRegistry.ANY_PRIMITIVE_TYPE;\n }\n\n if (Array.isArray(value)) {\n valueType = (valueType===XtPluginRegistry.ANY_PRIMITIVE_TYPE)?XtPluginRegistry.ANY_PRIMITIVE_SET:XtPluginRegistry.ANY_OBJECT_SET;\n }\n } else { // originalType has been defined.\n if (Array.isArray(value)) {\n valueType=valueType.endsWith('[]')?valueType:valueType+'[]';\n originalType=valueType;\n }\n }\n //console.debug('Type found is '+valueType);\n\n let ret = this.componentByTypeCache.get(valueType);\n if (ret == null) {\n ret = new Array<XtComponentInfo<any>> ()\n for (const comp of this.componentRegistry) {\n const info=comp[1];\n if (info.typesHandled.includes (valueType)) {\n ret.push(info);\n }\n }\n\n if ((ret.length == 0) && (originalType!=null)) {\n // Couldn't find a specific component, let's try the generic ones, so we don't pass any type\n ret = this.findComponentsForType(null, value);\n // Cache the component only if we were able to assert its type.\n // If no type has been given and value is null, then we cannot assess the real type\n if (value!=null) {\n this.componentByTypeCache.set(originalType, ret);\n }\n } else {\n // Cache the component only if we were able to assert its type.\n // If no type has been given and value is null, then we cannot assess the real type\n if ((value!=null) || (originalType!=null)) {\n this.componentByTypeCache.set(originalType ?? valueType, ret);\n }\n }\n\n }\n return ret;\n }\n\n public static registry (): XtPluginRegistry {\n return XT_REGISTRY;\n }\n\n findComponentInfo(type: Type<XtComponent<any>>): XtComponentInfo<any>|null {\n // Search for the component registered with this class\n for (const info of this.componentRegistry.values()) {\n if (info.componentClass==type) {\n return info;\n }\n }\n return null;\n }\n\n getComponentInfo(type: Type<XtComponent<any>>): XtComponentInfo<any> {\n const ret= this.findComponentInfo(type);\n if (ret==null) {throw new Error (\"No component found with class \"+type);}\n return ret;\n }\n}\n\nexport const XT_REGISTRY=new XtPluginRegistry ();\n","import { InjectionToken } from \"@angular/core\";\nimport { XtResolver } from \"../resolver/xt-resolver\";\nimport { XT_REGISTRY, XtPluginRegistry } from \"../registry/xt-plugin-registry\";\nimport { XtTypeResolver } from \"../type/xt-type-resolver\";\n\nexport const XT_RESOLVER_TOKEN = new InjectionToken<XtResolver> ('Enable providing a custom component resolver.');\n\nexport const XT_TYPE_RESOLVER_TOKEN = new InjectionToken<XtTypeResolver<any>> ('Enable providing a custom type resolver.');\n\nexport const XT_REGISTRY_TOKEN = new InjectionToken<XtPluginRegistry> (\"Injects the Plugin Registry right into your angular component\", \n {\n factory: () => {\n return XT_REGISTRY;\n }\n }\n )","import { XtPluginRegistry } from \"../registry/xt-plugin-registry\";\nimport { XtTypeResolver } from \"../type/xt-type-resolver\";\nimport { XtContext } from \"../xt-context\";\nimport { XtResolvedComponent } from \"../xt-resolved-component\";\nimport { XtResolver } from \"./xt-resolver\";\n\nexport class XtRegistryResolver implements XtResolver {\n\n registry:XtPluginRegistry;\n typeResolver: XtTypeResolver<any>;\n\n constructor (registry:XtPluginRegistry, typeResolver:XtTypeResolver<any>) {\n this.registry = registry;\n this.typeResolver = typeResolver;\n }\n\n resolve<T>(baseContext: XtContext<T>, subName?:string): XtResolvedComponent | null {\n const ret= this.registry.findComponentsForType (this.typeResolver.findType(baseContext, subName), baseContext.subValue(subName));\n if (ret!=null && ret.length>0) {\n return XtResolvedComponent.from( ret[0]);\n }\n return null;\n }\n\n}\n","import { FormControl, FormGroup } from '@angular/forms';\nimport { XtTypeInfo } from \"../plugin/xt-plugin-info\";\nimport { XtContext } from '../xt-context';\n\n/**\n * Determines the type of elements based on a hierarchy of type\n */\nexport type XtTypeResolver<TypeContext> = {\n\n findType (typeInfo:TypeContext|null|undefined, subName?:string, value?:any):string|null|undefined;\n\n listSubNames (typeInfo: TypeContext | null | undefined, value?: any):string[];\n\n canUpdate (): boolean;\n}\n\nexport type XtUpdatableTypeResolver<TypeContext> = XtTypeResolver<TypeContext> & {\n addType (typeName:string, type:XtTypeInfo|string):void;\n\n}\n\nexport class XtTypeHierarchyResolver<T> implements XtUpdatableTypeResolver<XtContext<T>> {\n types= new Map<string, XtTypeHierarchy> ();\n\n addType (typeName:string, type:XtTypeInfo|string):void {\n this.types.set (typeName, fromDescription (type));\n }\n\n canUpdate(): boolean {\n return true;\n }\n\n findType(typeInfo: XtContext<T> | null | undefined, subName?: string, value?: any):string | null | undefined {\n if( typeInfo==null)\n return typeInfo;\n if (typeInfo.valueType==null)\n return typeInfo.valueType;\n\n if (subName==null) {\n return typeInfo.valueType;\n } else {\n const selectedType = this.types.get(typeInfo.valueType);\n if( (selectedType != null) && (selectedType.children!=null)) {\n const type = selectedType.children[subName].type;\n if (type==null) {\n throw new Error('SubType named '+subName+' of '+typeInfo.valueType+ ' doesn\\'t have a type name.');\n } else {\n return type;\n }\n }\n }\n\n return undefined;\n }\n\n listSubNames (context: XtContext<T> | null | undefined, value?: any):string[] {\n let ret:string[] = [];\n if ((context!=null)&&(context.valueType!=null)) {\n const typeInfo = this.types.get(context.valueType);\n if( typeInfo?.children!=null) {\n ret = Object.keys(typeInfo.children);\n }\n }\n\n if (ret.length==0){\n // We will use the value to extract properties\n if (value!=null) {\n if (Array.isArray(value)) {\n if (value.length>0) {\n const setOfKeys=new Set<string>();\n for (const element of value) {\n const elementKeys=Object.keys(element);\n for (const key of elementKeys) {\n setOfKeys.add(key);\n }\n }\n ret= Array.from(setOfKeys.values());\n }\n }else {\n ret = Object.keys(value);\n }\n }\n }\n\n return ret;\n }\n\n}\n\nexport type XtTypeHierarchy = {\n type?:string;\n children?:{[key:string]: XtTypeHierarchy} ;\n parent?:XtTypeHierarchy;\n\n addChild (key:string, child:XtTypeHierarchy) : void;\n}\n\nexport class XtBaseTypeHierarchy implements XtTypeHierarchy {\n type?:string;\n children?:{[key:string]: XtTypeHierarchy} ;\n parent?:XtTypeHierarchy;\n\n constructor (type?:string, parent?:XtTypeHierarchy) {\n this.type=type;\n this.parent=parent;\n }\n\n addChild (key:string, child:XtTypeHierarchy) : void {\n if (this.children==null) this.children= {};\n this.children[key]=child;\n }\n\n}\n\nexport function fromDescription (typeHierarchy:XtTypeInfo|string, name?:string, parent?:XtTypeHierarchy): XtTypeHierarchy {\n let ret: XtBaseTypeHierarchy|null = null;\n if (typeof typeHierarchy == 'string') {\n ret= new XtBaseTypeHierarchy(typeHierarchy, parent);\n } else {\n\n ret = new XtBaseTypeHierarchy(undefined, parent);\n\n for (const key of Object.keys(typeHierarchy)) {\n const value = typeHierarchy[key];\n fromDescription(value, key, ret);\n }\n }\n\n if((parent!=null) && (name!=null))\n parent.addChild(name, ret);\n else if ((parent!=null) && (name==null)) {\n throw new Error(\"Cannot add type to parent without a name.\");\n }\n return ret;\n}\n\n\nexport function updateFormGroupWithValue(formGroup: FormGroup, value:{[key:string]:any}) {\n\n const toDelete = new Set<string>(Object.keys(formGroup.controls));\n\n for (const valueKey in value) {\n const primitive = isPrimitive(value[valueKey]);\n if (toDelete.delete(valueKey)) {\n // Already a control\n const oldControl = formGroup.get(valueKey)!;\n // Is it the right type ?\n if (primitive) {\n // Must be an FormControl2\n if ((oldControl as any).controls === undefined) {\n // It's ok, just set the value\n oldControl.setValue(value[valueKey]);\n } else {\n formGroup.setControl(valueKey, new FormControl(value[valueKey]));\n }\n } else {\n // Must be a FormGroup\n if ((oldControl as any).controls === undefined) {\n const newFormGroup = new FormGroup({});\n formGroup.setControl(valueKey, newFormGroup);\n updateFormGroupWithValue(newFormGroup, value[valueKey]);\n } else {\n // It was already a formgroup, so just update it\n updateFormGroupWithValue(oldControl as FormGroup, value[valueKey]);\n }\n }\n } else {\n if (primitive) {\n formGroup.addControl(valueKey, new FormControl(value[valueKey]));\n } else {\n const newFormGroup = new FormGroup({});\n formGroup.addControl(valueKey, newFormGroup);\n updateFormGroupWithValue(newFormGroup, value[valueKey]);\n }\n }\n }\n\n // Delete controls that are no more used\n for (const delName of toDelete) {\n formGroup.removeControl(delName);\n }\n}\n\nfunction isPrimitive(valueElement: any): boolean {\n if (typeof valueElement == 'object') {\n if (valueElement==null) return true;\n else {\n return valueElement instanceof Date;\n }\n } else return true;\n}\n","import { computed, inject, Injectable, Type } from '@angular/core';\nimport { XtContext } from '../xt-context';\nimport { XtRegistryResolver } from '../resolver/xt-registry-resolver';\nimport { XT_REGISTRY_TOKEN, XT_RESOLVER_TOKEN, XT_TYPE_RESOLVER_TOKEN } from './xt-tokens';\nimport { XtResolvedComponent } from '../xt-resolved-component';\nimport { XtTypeHierarchyResolver, XtTypeResolver, XtUpdatableTypeResolver } from '../type/xt-type-resolver';\nimport { XtComponentInfo, XtPluginInfo, XtTypeInfo } from '../plugin/xt-plugin-info';\nimport { XtResolver } from '../resolver/xt-resolver';\nimport { XtComponent } from '../xt-component';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class XtResolverService {\n\n pluginRegistry = inject (XT_REGISTRY_TOKEN);\n\n protected baseResolver = inject (XT_RESOLVER_TOKEN, {optional:true});\n protected baseTypeResolver = inject (XT_TYPE_RESOLVER_TOKEN, {optional:true});\n\n resolver:XtResolver;\n typeResolver:XtTypeResolver<any>;\n\n constructor() {\n\n if (this.baseTypeResolver==null) {\n this.typeResolver = new XtTypeHierarchyResolver ();\n } else this.typeResolver=this.baseTypeResolver;\n\n if (this.baseResolver==null) {\n this.resolver=new XtRegistryResolver (this.pluginRegistry, this.typeResolver);\n } else this.resolver=this.baseResolver;\n\n }\n\n findBestComponent<T> (baseContext: XtContext<T>, subName?:string) : XtResolvedComponent{\n const ret= this.resolver.resolve(baseContext, subName);\n if (ret!=null) return ret;\n else throw new Error (\"No components found for this context \"+ baseContext.toString());\n }\n\n findTypeOf<T> (baseContext:XtContext<T>, subName?:string, value?:T): any | undefined {\n const ret = this.typeResolver.findType (baseContext, subName, value);\n return ret;\n }\n\n listSubNamesOf<T> (baseContext:XtContext<T>, value?:T): string[] {\n return this.typeResolver.listSubNames(baseContext, value);\n }\n\n registerPlugin (info:XtPluginInfo) {\n this.pluginRegistry.registerPlugin (info);\n this.registerTypes (info.types);\n }\n\n registerTypes (types:XtTypeInfo|undefined) {\n if ((types !=null) && (this.typeResolver.canUpdate())) {\n for (const newType in types) {\n (this.typeResolver as XtUpdatableTypeResolver<string>).addType (newType, types[newType]);\n }\n }\n }\n\n getComponentInfo<T>(type: Type<XtComponent<T>>):XtResolvedComponent {\n return XtResolvedComponent.from(this.pluginRegistry.getComponentInfo (type));\n }\n\n findComponentInfo<T>(type: Type<XtComponent<T>>):XtResolvedComponent|null {\n const ret=this.pluginRegistry.findComponentInfo (type);\n if (ret==null) return null;\n else return XtResolvedComponent.from(ret);\n }\n\n public listComponents = computed<Array<XtComponentInfo<any>>>(() => {\n return this.pluginRegistry.listComponents();\n });\n\n\n}\n","import { OutputEmitterRef } from '@angular/core';\nimport { XtComponentOutput } from '../xt-component';\n\nexport class XtBaseOutput implements XtComponentOutput {\n valueSelected: OutputEmitterRef<any> | undefined;\n\n}\n","import {\n AfterViewInit,\n Component,\n computed,\n inject,\n input,\n model,\n output,\n Signal,\n Type,\n viewChild\n} from '@angular/core';\nimport { NgComponentOutlet } from '@angular/common';\nimport { XtComponent, XtComponentOutput, XtInputType, XtOutputType } from '../xt-component';\nimport { XtBaseContext, XtContext, XtDisplayMode } from '../xt-context';\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { XtResolverService } from '../angular/xt-resolver.service';\nimport { XtResolvedComponent } from '../xt-resolved-component';\nimport { XtBaseOutput } from '../output/xt-base-output';\nimport { XtBaseInput } from '../output/xt-base-input';\n\n/**\n * Offers a nice and easy to dynamically embed a component.\n * You set the type, the display mode, and either the value or the formgroup & subName to use.\n * XtRender will then instantiate the component, bind it to the value or form, and display it.\n */\n@Component({\n selector: 'xt-render',\n standalone: true,\n imports: [\n NgComponentOutlet,\n ReactiveFormsModule\n ],\n templateUrl: './xt-render.component.html',\n styleUrl: './xt-render.component.css'\n})\nexport class XtRenderComponent<T> implements AfterViewInit {\n resolverService = inject(XtResolverService);\n\n componentType = input<Type<XtComponent<T>>> ();\n displayMode = input.required<XtDisplayMode> ();\n valueType = input<string> ();\n\n // Either we set the value directly\n value= model<T> ();\n // Or we are inside a Form\n formGroup=input<FormGroup>();\n subName= input<string>();\n\n outputsObject = new XtBaseOutput();\n\n inputs = input<XtBaseInput>();\n outputs = output<XtComponentOutput>();\n\n outlet = viewChild.required(NgComponentOutlet);\n\n constructor() {\n\n }\n\n\n context: Signal<XtContext<any>> = computed(() => {\n let form = this.formGroup();\n\n const ret= new XtBaseContext<any>(this.displayMode(), this.subName(), form);\n ret.valueType=this.valueType();\n if (!ret.isInForm()) {\n const subName = this.subName();\n const value = this.value();\n if ( (subName == null) || (value == null)) {\n ret.setDisplayValue(value);\n } else {\n ret.setDisplayValue(value[subName as keyof typeof value]);\n }\n }\n return ret as XtContext<T>;\n });\n\n type:Signal<Type<XtComponent<T>>|null> = computed( () => {\n //console.debug(\"Calculating type in XtRenderSubComponent\");\n\n let type=this.componentType();\n let compFound:XtResolvedComponent|null = null;\n if (type==null) {\n //console.debug('XtRender, using component set '+ type);\n //compFound = this.resolverService.findComponentInfo (type);\n //} else {\n compFound= this.resolverService.findBestComponent(this.context());\n //console.debug('XtRender, found component ',compFound.componentName);\n type= compFound.componentClass;\n }\n\n return type??null;\n });\n\n /**\n * Transfers the input and outputs from the host to the rendered component\n */\n ngAfterViewInit() {\n const instance=this.outlet().componentInstance as XtComponent;\n if (instance?.outputsObject!=null) {\n let hasOneOutput = false;\n for (const key of Object.keys(instance.outputsObject) as XtOutputType[] ) {\n this.outputsObject[key] = instance.outputsObject[key];\n hasOneOutput=true;\n }\n if (hasOneOutput) {\n this.outputs.emit(this.outputsObject);\n }\n }\n const inputs = this.inputs();\n if ((inputs!=null) && (instance?.inputsObject!=null)) {\n for (const key of Object.keys(inputs) as XtInputType[] ) {\n instance.inputsObject[key] = inputs[key];\n }\n\n }\n\n }\n\n}\n","<ng-container *ngComponentOutlet=\"type(); inputs: {context:context ()}\" />\n","import { AfterViewInit, Component, computed, inject, input, output, Signal, Type, viewChild } from '@angular/core';\nimport { NgComponentOutlet } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { XtContext } from '../xt-context';\nimport { XtComponent, XtComponentInput, XtComponentOutput, XtInputType, XtOutputType } from '../xt-component';\nimport { XtResolverService } from '../angular/xt-resolver.service';\nimport { XtResolvedComponent } from '../xt-resolved-component';\nimport { XtBaseOutput } from '../output/xt-base-output';\nimport { XtBaseInput } from '../output/xt-base-input';\n\n/**\n * Dynamically render a component that will display the given subValue.\n * To be used only inside an XtSimpleComponent or XtCompositeComponent\n */\n@Component({\n selector: 'xt-render-sub',\n standalone: true,\n imports: [\n NgComponentOutlet,\n ReactiveFormsModule\n ],\n templateUrl: './xt-render-sub.component.html',\n styleUrl: './xt-render-sub.component.css'\n})\nexport class XtRenderSubComponent<T> implements AfterViewInit {\n context = input.required<XtContext<T>> ();\n componentType = input<Type<XtComponent<T>>> ();\n\n outputsObject = new XtBaseOutput();\n\n inputs = input<XtBaseInput>();\n outputs = output<XtComponentOutput>();\n\n outlet = viewChild.required(NgComponentOutlet);\n\n resolverService = inject(XtResolverService);\n\n type:Signal<Type<XtComponent<T>>|null> = computed( () => {\n //console.debug(\"Calculating type in XtRenderSubComponent\");\n\n let type=this.componentType();\n let compFound:XtResolvedComponent|null = null;\n if (type==null) {\n //console.debug('XtRender, using component set '+ type);\n //compFound = this.resolverService.findComponentInfo (type);\n //} else {\n compFound= this.resolverService.findBestComponent(this.context());\n //console.debug('XtRender, found component ',compFound.componentName);\n type= compFound.componentClass;\n }\n\n return type??null;\n\n });\n\n /**\n * Transfers the input and outputs from the host to the rendered component\n */\n ngAfterViewInit() {\n const instance=this.outlet().componentInstance as XtComponent;\n if (instance?.outputsObject!=null) {\n let hasOneOutput = false;\n for (const key of Object.keys(instance.outputsObject) as XtOutputType[] ) {\n this.outputsObject[key] = instance.outputsObject[key];\n hasOneOutput=true;\n }\n if (hasOneOutput) {\n this.outputs.emit(this.outputsObject);\n }\n }\n const inputs = this.inputs();\n if ((inputs!=null) && (instance?.inputsObject!=null)) {\n for (const key of Object.keys(inputs) as XtInputType[] ) {\n instance.inputsObject[key] = inputs[key];\n }\n\n }\n\n\n }\n\n}\n","{{componentType()}}\n<ng-container *ngComponentOutlet=\"type(); inputs: {context:context ()}\" />\n","import { InputSignal } from '@angular/core';\nimport { XtComponentInput } from '../xt-component';\n\nexport class XtBaseInput implements XtComponentInput {\n valueSelected: InputSignal<any>|undefined;\n}\n","import { Component, computed, input, OnInit, output } from '@angular/core';\nimport { AbstractControl, FormControl, FormGroup } from '@angular/forms';\nimport { XtContext } from '../xt-context';\nimport { XtComponent, XtComponentOutput } from '../xt-component';\nimport { XtBaseOutput } from '../output/xt-base-output';\nimport { XtBaseInput } from '../output/xt-base-input';\n\n/**\n * An XtSimpleComponent just displays the given value or element in a form.\n * If you need to dynamically embed other XtComponents to display sub elements, then please use the XtCompositeComponent\n */\n@Component({\n standalone: true,\n imports: [],\n template: ''\n})\nexport class XtSimpleComponent<T = any> implements XtComponent<T>, OnInit{\n context = input.required<XtContext<T>>();\n outputsObject = new XtBaseOutput();\n inputsObject = new XtBaseInput();\n outputs=output<XtComponentOutput>();\n\n isInForm = computed<boolean> ( () => {\n return this.context()?.isInForm()??false;\n });\n\n formControlNameIfAny = computed<string | undefined> (() => {\n return this.context()?.subName;\n });\n\n formGroupIfAny = computed<FormGroup | undefined> (() => {\n return this.context()?.formGroup();\n })\n\n formGroup = computed<FormGroup> (() => {\n const ret= this.context()?.formGroup();\n if (ret==null) throw new Error ('No form groups in this component of type '+this.componentDescriptor());\n return ret;\n });\n\n /**\n * Returns the component form name, which is for now the subName\n */\n componentNameInForm=computed<string> ( () => {\n return this.safelyGetSubName();\n });\n\n constructor() {\n }\n\n ngOnInit(): void {\n this.setupInputOutput();\n if (Object.keys(this.outputsObject).length > 0) {\n // At least one output has been defined\n this.outputs.emit(this.outputsObject);\n }\n }\n\n\n manageFormControl<T> (ctrlName:string): AbstractControl<T>|undefined {\n const formGroup = this.formGroupIfAny();\n if (formGroup==null) {\n // You can call manageFormControl even in not a form, it just get ignored\n //console.debug('FormGroup is undefined when declaring managedcontrol '+ctrlName);\n return undefined;\n } else {\n let ctrl=formGroup.get(ctrlName);\n if (ctrl==null) {\n ctrl = new FormControl<T|undefined>(undefined);\n formGroup.setControl(ctrlName, ctrl);\n }\n return ctrl;\n }\n }\n\n safelyGetSubName = computed<string>(() => {\n const ret = this.context()?.subName;\n if (ret==null) throw new Error ('This component has no name in the form '+this.componentDescriptor());\n return ret;\n });\n\n /**\n * Returns the form control name and create a form control behind the scene\n */\n formControlName = computed<string> (() => {\n const ret = this.safelyGetSubName();\n\n this.manageFormControl<any>(ret); // Creates the form control\n return ret;\n });\n\n formControl = computed<AbstractControl<any>> (() => {\n const subName = this.safelyGetSubName();\n const formControl= this.manageFormControl(subName);\n if (formControl==null) throw new Error (\"Calling formControl for subName \"+subName+\" when none exist.\");\n return formControl;\n});\n\n componentDescriptor (): string {\n return \"Component with type \"+this.constructor.name+\" with context \"+this.context().toString();\n }\n\n getValue= computed (()=> {\n return this.context().value();\n });\n\n displayValue = computed (() => {\n return this.context().displayValue();\n });\n\n /**\n * This is where components can assign their output() and input() into the XtComponent inputs and outputs member\n * @protected\n */\n protected setupInputOutput () {\n // Nothing to do here\n }\n}\n","import { Component, computed, inject } from '@angular/core';\nimport { XtSimpleComponent } from '../xt-simple/xt-simple.component';\nimport { FormGroup } from '@angular/forms';\nimport { XtResolverService } from '../angular/xt-resolver.service';\nimport { XtContext } from '../xt-context';\n\n@Component({\n standalone: true,\n imports: [],\n template: '',\n styleUrl: './xt-composite.component.css'\n})\nexport class XtCompositeComponent<T = any> extends XtSimpleComponent<T> {\n\n resolverService = inject(XtResolverService);\n\n override formGroupIfAny = computed<FormGroup | undefined> (() => {\n const context = this.context();\n if (context==null) return undefined;\n let ret= context.localFormGroup;\n if ((ret==null) && (context.parentFormGroup!=null) && (context.subName!=null)) {\n if (context.parentFormGroup.contains(context.subName)) {\n context.localFormGroup = context.parentFormGroup.get(context.subName) as FormGroup;\n } else {\n context.localFormGroup= new FormGroup ({});\n context.parentFormGroup.addControl(context.subName, context.localFormGroup);\n }\n ret=context.localFormGroup;\n }\n return ret;\n })\n\n /**\n * We need to create a new form group to manage the sub elements.\n */\n override formGroup = computed<FormGroup> (() => {\n const ret= this.formGroupIfAny();\n if (ret==null) throw new Error ('No form groups in this component of type '+this.componentDescriptor());\n return ret;\n });\n\n /**\n * Helper function to calculate the sub context\n * @param subName\n * @param subType\n */\n subContext (subName:string, subType?:string):XtContext<any> {\n this.formGroupIfAny(); // Ensure the context is properly initialized\n return this.context().subContext(subName, subType, this.resolverService.typeResolver);\n }\n\n}\n","import { XtResolverService } from '../angular/xt-resolver.service';\nimport { inject } from '@angular/core';\n\nexport class XtUnitTestHelper {\n/* public static registerComponent<T> (name:string, compClass:T, type:string){\n this.resolverService.pluginRegistry.registerComponent({\n componentName:name,\n componentClass: compClass,\n typesHandled: [type]\n });\n }\n*/\n}\n","import { Component, computed, inject, input, Type } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AbstractControl, FormArray, FormBuilder, FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';\nimport { XtRenderComponent } from '../render/xt-render.component';\nimport { XtComponent } from '../xt-component';\nimport { XtBaseContext, XtDisplayMode } from '../xt-context';\nimport { XtRenderSubComponent } from '../render/xt-render-sub.component';\nimport { XtResolverService } from '../angular/xt-resolver.service';\n\n/**\n * Component that can be used to bootstrap tests.\n * Just set the value and component type, and it will be injected in your test.\n */\n@Component({\n selector:'test-host',\n standalone:true,\n imports: [CommonModule, XtRenderComponent],\n template: '<h1>Test Simple Component</h1> <xt-render [componentType]=\"type()\" [displayMode]=\"displayMode()\" [value]=\"value()\" ></xt-render> '\n\n})\nexport class HostTestSimpleComponent {\n type = input.required<Type<XtComponent<any>>>();\n displayMode = input<XtDisplayMode> ('FULL_VIEW');\n value = input<any|undefined> (undefined);\n\n}\n\n/**\n * Same as HostTestSimpleComponent but it includes everything in a form.\n * Just set the component type, the formGroup and the component name, and your component will be run.\n * You can as well easily read and set the value.\n */\n@Component({\n selector:'test-form-host',\n standalone:true,\n imports: [CommonModule, XtRenderComponent, ReactiveFormsModule],\n template: '<h1>Test Form Component</h1> <form [formGroup]=\"computedFormGroup()\"> <xt-render [componentType]=\"type()\" displayMode=\"FULL_EDITABLE\" [subName]=\"controlName()\" [formGroup]=\"computedFormGroup()\"></xt-render></form>'\n})\nexport class HostTestFormComponent {\n builder = inject(FormBuilder);\n type = input.required<Type<XtComponent<any>>>();\n controlName = input.required<string>();\n // You can send the description to be used in a FormBuilder to create the formgroup;\n formDescription = input<any> ({ });\n // Or set the FormGroup directly\n formGroup= input<FormGroup>();\n\n createdFormGroup: FormGroup|null = null;\n\n computedFormGroup () {\n if( this.createdFormGroup==null) {\n const formGroup=this.formGroup();\n this.createdFormGroup=formGroup??generateFormGroup(this.formDescription());\n }\n return this.createdFormGroup;\n }\n\n patchValue (newVal:any) {\n const patch:{[key:string]:any}={};\n patch[this.controlName()]=newVal;\n if (this.createdFormGroup!=null)\n this.createdFormGroup.patchValue(patch);\n else throw new Error (\"FormGroup not yet created. Did you set formGroup or formDescription property ?\");\n }\n\n retrieveValue (): any {\n if (this.createdFormGroup!=null)\n return this.createdFormGroup.value[this.controlName()];\n else throw new Error (\"FormGroup not yet created. Did you set formGroup or formDescription property ?\");\n }\n}\n\n/**\n * Component that can be used to test your component based on the type it handles\n * Just set the type hierarchy to register, the value, and it will instantiate the right component in your plugin\n */\n@Component({\n selector:'test-typed-host',\n standalone:true,\n imports: [CommonModule, XtRenderSubComponent],\n template: '<h1>Test Typed Component</h1> <xt-render-sub [context]=\"context()\" ></xt-render-sub> '\n\n})\nexport class HostTestTypedComponent {\n\n displayMode = input<XtDisplayMode> ('FULL_VIEW');\n value = input<any> ();\n valueType = input<string> ();\n\n context = computed( () => {\n const ret = new XtBaseContext(this.displayMode());\n\n ret.valueType=this.valueType();\n ret.setDisplayValue(this.value());\n return ret;\n });\n}\n\n/**\n * Same as HostTestSimpleComponent but it includes everything in a form.\n * Just set the component type, the formGroup and the component name, and your component will be run.\n * You can as well easily read and set the value.\n */\n@Component({\n selector:'test-typed-form-host',\n standalone:true,\n imports: [CommonModule, ReactiveFormsModule, XtRenderSubComponent],\n template: '<h1>Test Typed Form Component</h1> <form [formGroup]=\"parentFormGroup\"> <xt-render-sub [context]=\"subContext()\"></xt-render-sub></form>'\n})\nexport class HostTestTypedFormComponent {\n builder = inject(FormBuilder);\n resolver = inject(XtResolverService);\n\n static readonly CONTROL_NAME='ForTest';\n\n valueType = input<string> ();\n controlName = input<string>();\n // You can send the description to be used in a FormBuilder to create the formgroup;\n formDescription = input<any> ({ });\n // Or set the FormGroup directly\n formGroup= input<FormGroup>();\n\n parentFormGroup = this.builder.group<{[keys:string]: AbstractControl}>({});\n\n createdFormGroup: FormGroup|null = null;\n\n computedFormGroup = computed(() =>{\n if( this.createdFormGroup==null) {\n const formGroup=this.formGroup();\n this.createdFormGroup=formGroup??generateFormGroup(this.formDescription());\n this.parentFormGroup.addControl(this.controlName()??HostTestTypedFormComponent.CONTROL_NAME, this.createdFormGroup);\n }\n return this.createdFormGroup;\n });\n\n subContext = computed( () => {\n this.computedFormGroup(); // Make sure the subformgroups are created\n\n const ctrlName = this.controlName();\n let ret:XtBaseContext<any>|null = null;\n if (ctrlName==null){\n ret = new XtBaseContext('FULL_EDITABLE', HostTestTypedFormComponent.CONTROL_NAME, this.parentFormGroup);\n }\n else{\n ret = new XtBaseContext('FULL_EDITABLE', ctrlName, this.createdFormGroup!);\n }\n ret.valueType=this.valueType();\n\n return ret;\n });\n\n patchValue (controlName:string, newVal:any) {\n const patch:{[key:string]:any}={};\n patch[controlName]=newVal;\n this.computedFormGroup().patchValue(patch);\n }\n\n retrieveValue (controlName:string): any {\n return this.computedFormGroup().value[controlName];\n }\n\n}\n\nfunction generateFormGroup(formDescription: any):FormGroup {\n if (typeof formDescription != 'object') {\n throw new Error ('Form Description should be an object of values');\n }\n return generateFormControl(formDescription) as FormGroup;\n}\n\nfunction generateFormControl(formDescription: any): AbstractControl {\n\n if (formDescription==null) {\n return new FormControl(formDescription);\n }\n\n if (Array.isArray(formDescription)){\n const retArray = new FormArray<AbstractControl>([]);\n for (const val of formDescription) {\n retArray.push(generateFormControl(val), {emitEvent:false});\n }\n return retArray;\n }\n\n if ((typeof formDescription=='object')&&(!(formDescription instanceof Date))) {\n const retObject=new FormGroup({});\n for (const key of Object.keys(formDescription)) {\n retObject.addControl(key, generateFormControl(formDescription[key]));\n }\n return retObject;\n }\n return new FormControl(formDescription);\n}\n","/*\n * Public API Surface of xt-components\n */\n\nexport * from './lib/xt-component';\nexport * from './lib/xt-context';\nexport * from './lib/xt-resolved-component';\nexport * from './lib/resolver/xt-resolver';\nexport * from './lib/registry/xt-plugin-registry'\nexport * from './lib/plugin/xt-plugin-info'\n\nexport * from './lib/angular/xt-tokens';\nexport * from './lib/angular/xt-resolver.service';\n\nexport * from './lib/render/xt-render.component';\nexport * from './lib/render/xt-render-sub.component';\nexport * from './lib/xt-simple/xt-simple.component';\nexport * from './lib/xt-composite/xt-composite.component';\n\nexport * from './lib/type/xt-type-resolver';\nexport * from './lib/test/xt-unit-test-helper';\nexport * from './lib/test/xt-test-helper-components';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAmDa,aAAa,CAAA;AA+BtB;;;;;;AAMG;AAEH,IAAA,WAAA,CAAa,WAA0B,EAAE,OA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AAI,OAAO,eAAe,IAAI,QAAQ,EAAE;AACtC,QAAA,MAAM,IAAI,KAAK,CAAE,gDAAgD,CAAC;;AAEpE,IAAA,OAAO,mBAAmB,CAAC,eAAe,CAAc;AAC1D;AAEA,SAAS,mBAAmB,CAAC,eAAoB,EAAA;AAE/C,IAAA,IAAI,eAAe,IAAE,IAAI,EAAE;AACzB,QAAA,OAAO,IAAI,WAAW,CAAC,eAAe,CAAC;;AAGzC,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,EAAC;AACjC,QAAA,MAAM,QAAQ,GAAG,IAAI,SAAS,CAAkB,EAAE,CAAC;AACnD,QAAA,KAAK,MAAM,GAAG,IAAI,eAAe,EAAE;AACjC,YAAA,QAAQ,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,EAAE,EAAC,SAAS,EAAC,KAAK,EAAC,CAAC;;AAE5D,QAAA,OAAO,QAAQ;;AAGjB,IAAA,IAAI,CAAC,OAAO,eAAe,IAAE,QAAQ,MAAI,EAAE,eAAe,YAAY,IAAI,CAAC,CAAC,EAAE;AAC5E,QAAA,MAAM,SAAS,GAAC,IAAI,SAAS,CAAC,EAAE,CAAC;QACjC,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE;AAC9C,YAAA,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,mBAAmB,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;;AAEtE,QAAA,OAAO,SAAS;;AAElB,IAAA,OAAO,IAAI,WAAW,CAAC,eAAe,CAAC;AACzC;;AChMA;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { XtComponentOutput
|
|
1
|
+
import { OutputEmitterRef } from '@angular/core';
|
|
2
|
+
import { XtComponentOutput } from '../xt-component';
|
|
3
3
|
export declare class XtBaseOutput implements XtComponentOutput {
|
|
4
|
-
valueSelected:
|
|
5
|
-
setNewOutput(name: XtOutputType, value: any): boolean;
|
|
4
|
+
valueSelected: OutputEmitterRef<any> | undefined;
|
|
6
5
|
}
|
|
@@ -3,6 +3,8 @@ import { NgComponentOutlet } from '@angular/common';
|
|
|
3
3
|
import { XtContext } from '../xt-context';
|
|
4
4
|
import { XtComponent, XtComponentOutput } from '../xt-component';
|
|
5
5
|
import { XtResolverService } from '../angular/xt-resolver.service';
|
|
6
|
+
import { XtBaseOutput } from '../output/xt-base-output';
|
|
7
|
+
import { XtBaseInput } from '../output/xt-base-input';
|
|
6
8
|
import * as i0 from "@angular/core";
|
|
7
9
|
/**
|
|
8
10
|
* Dynamically render a component that will display the given subValue.
|
|
@@ -11,12 +13,16 @@ import * as i0 from "@angular/core";
|
|
|
11
13
|
export declare class XtRenderSubComponent<T> implements AfterViewInit {
|
|
12
14
|
context: import("@angular/core").InputSignal<XtContext<T>>;
|
|
13
15
|
componentType: import("@angular/core").InputSignal<Type<XtComponent<T>> | undefined>;
|
|
16
|
+
outputsObject: XtBaseOutput;
|
|
17
|
+
inputs: import("@angular/core").InputSignal<XtBaseInput | undefined>;
|
|
14
18
|
outputs: import("@angular/core").OutputEmitterRef<XtComponentOutput>;
|
|
15
|
-
hasOutputs: boolean;
|
|
16
19
|
outlet: Signal<NgComponentOutlet<any>>;
|
|
17
20
|
resolverService: XtResolverService;
|
|
18
21
|
type: Signal<Type<XtComponent<T>> | null>;
|
|
22
|
+
/**
|
|
23
|
+
* Transfers the input and outputs from the host to the rendered component
|
|
24
|
+
*/
|
|
19
25
|
ngAfterViewInit(): void;
|
|
20
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<XtRenderSubComponent<any>, never>;
|
|
21
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<XtRenderSubComponent<any>, "xt-render-sub", never, { "context": { "alias": "context"; "required": true; "isSignal": true; }; "componentType": { "alias": "componentType"; "required": false; "isSignal": true; }; }, { "outputs": "outputs"; }, never, never, true, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<XtRenderSubComponent<any>, "xt-render-sub", never, { "context": { "alias": "context"; "required": true; "isSignal": true; }; "componentType": { "alias": "componentType"; "required": false; "isSignal": true; }; "inputs": { "alias": "inputs"; "required": false; "isSignal": true; }; }, { "outputs": "outputs"; }, never, never, true, never>;
|
|
22
28
|
}
|
|
@@ -4,6 +4,8 @@ import { XtComponent, XtComponentOutput } from '../xt-component';
|
|
|
4
4
|
import { XtContext, XtDisplayMode } from '../xt-context';
|
|
5
5
|
import { FormGroup } from '@angular/forms';
|
|
6
6
|
import { XtResolverService } from '../angular/xt-resolver.service';
|
|
7
|
+
import { XtBaseOutput } from '../output/xt-base-output';
|
|
8
|
+
import { XtBaseInput } from '../output/xt-base-input';
|
|
7
9
|
import * as i0 from "@angular/core";
|
|
8
10
|
/**
|
|
9
11
|
* Offers a nice and easy to dynamically embed a component.
|
|
@@ -18,13 +20,17 @@ export declare class XtRenderComponent<T> implements AfterViewInit {
|
|
|
18
20
|
value: import("@angular/core").ModelSignal<T | undefined>;
|
|
19
21
|
formGroup: import("@angular/core").InputSignal<FormGroup<any> | undefined>;
|
|
20
22
|
subName: import("@angular/core").InputSignal<string | undefined>;
|
|
23
|
+
outputsObject: XtBaseOutput;
|
|
24
|
+
inputs: import("@angular/core").InputSignal<XtBaseInput | undefined>;
|
|
21
25
|
outputs: import("@angular/core").OutputEmitterRef<XtComponentOutput>;
|
|
22
|
-
hasOutputs: boolean;
|
|
23
26
|
outlet: Signal<NgComponentOutlet<any>>;
|
|
24
27
|
constructor();
|
|
25
28
|
context: Signal<XtContext<any>>;
|
|
26
29
|
type: Signal<Type<XtComponent<T>> | null>;
|
|
30
|
+
/**
|
|
31
|
+
* Transfers the input and outputs from the host to the rendered component
|
|
32
|
+
*/
|
|
27
33
|
ngAfterViewInit(): void;
|
|
28
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<XtRenderComponent<any>, never>;
|
|
29
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<XtRenderComponent<any>, "xt-render", never, { "componentType": { "alias": "componentType"; "required": false; "isSignal": true; }; "displayMode": { "alias": "displayMode"; "required": true; "isSignal": true; }; "valueType": { "alias": "valueType"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "formGroup": { "alias": "formGroup"; "required": false; "isSignal": true; }; "subName": { "alias": "subName"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "outputs": "outputs"; }, never, never, true, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<XtRenderComponent<any>, "xt-render", never, { "componentType": { "alias": "componentType"; "required": false; "isSignal": true; }; "displayMode": { "alias": "displayMode"; "required": true; "isSignal": true; }; "valueType": { "alias": "valueType"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "formGroup": { "alias": "formGroup"; "required": false; "isSignal": true; }; "subName": { "alias": "subName"; "required": false; "isSignal": true; }; "inputs": { "alias": "inputs"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "outputs": "outputs"; }, never, never, true, never>;
|
|
30
36
|
}
|
package/lib/xt-component.d.ts
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import { InputSignal, OutputEmitterRef
|
|
1
|
+
import { InputSignal, OutputEmitterRef } from '@angular/core';
|
|
2
2
|
import { XtContext } from './xt-context';
|
|
3
3
|
import { FormGroup } from '@angular/forms';
|
|
4
4
|
export type XtComponent<T = any> = {
|
|
5
5
|
context: InputSignal<XtContext<T>>;
|
|
6
|
+
inputsObject?: XtComponentInput;
|
|
7
|
+
outputsObject?: XtComponentOutput;
|
|
8
|
+
inputs?: InputSignal<XtComponentInput>;
|
|
6
9
|
outputs?: OutputEmitterRef<XtComponentOutput>;
|
|
7
|
-
/**
|
|
8
|
-
* Does the component provides Output or not ?
|
|
9
|
-
* @protected
|
|
10
|
-
*/
|
|
11
|
-
hasOutputs?: boolean;
|
|
12
10
|
isInForm(): boolean;
|
|
13
11
|
formControlName(): string | undefined;
|
|
14
12
|
formGroup(): FormGroup;
|
|
15
13
|
formGroupIfAny(): FormGroup | undefined;
|
|
16
14
|
};
|
|
17
15
|
export type XtOutputType = 'valueSelected';
|
|
16
|
+
export type XtInputType = 'valueSelected';
|
|
18
17
|
export type XtComponentOutput = {
|
|
19
|
-
[key in XtOutputType]:
|
|
18
|
+
[key in XtOutputType]: OutputEmitterRef<any> | undefined;
|
|
19
|
+
};
|
|
20
|
+
export type XtComponentInput = {
|
|
21
|
+
[key in XtInputType]: InputSignal<any> | undefined;
|
|
20
22
|
};
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
2
|
import { AbstractControl, FormGroup } from '@angular/forms';
|
|
3
3
|
import { XtContext } from '../xt-context';
|
|
4
|
-
import { XtComponent, XtComponentOutput
|
|
4
|
+
import { XtComponent, XtComponentOutput } from '../xt-component';
|
|
5
5
|
import { XtBaseOutput } from '../output/xt-base-output';
|
|
6
|
+
import { XtBaseInput } from '../output/xt-base-input';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
/**
|
|
8
9
|
* An XtSimpleComponent just displays the given value or element in a form.
|
|
9
10
|
* If you need to dynamically embed other XtComponents to display sub elements, then please use the XtCompositeComponent
|
|
10
11
|
*/
|
|
11
|
-
export declare class XtSimpleComponent<T = any> implements XtComponent<T
|
|
12
|
-
context: InputSignal<XtContext<T>>;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* @protected
|
|
17
|
-
*/
|
|
18
|
-
hasOutputs: boolean;
|
|
19
|
-
protected outputElement?: XtBaseOutput;
|
|
12
|
+
export declare class XtSimpleComponent<T = any> implements XtComponent<T>, OnInit {
|
|
13
|
+
context: import("@angular/core").InputSignal<XtContext<T>>;
|
|
14
|
+
outputsObject: XtBaseOutput;
|
|
15
|
+
inputsObject: XtBaseInput;
|
|
16
|
+
outputs: import("@angular/core").OutputEmitterRef<XtComponentOutput>;
|
|
20
17
|
isInForm: import("@angular/core").Signal<boolean>;
|
|
21
18
|
formControlNameIfAny: import("@angular/core").Signal<string | undefined>;
|
|
22
19
|
formGroupIfAny: import("@angular/core").Signal<FormGroup<any> | undefined>;
|
|
@@ -26,6 +23,7 @@ export declare class XtSimpleComponent<T = any> implements XtComponent<T> {
|
|
|
26
23
|
*/
|
|
27
24
|
componentNameInForm: import("@angular/core").Signal<string>;
|
|
28
25
|
constructor();
|
|
26
|
+
ngOnInit(): void;
|
|
29
27
|
manageFormControl<T>(ctrlName: string): AbstractControl<T> | undefined;
|
|
30
28
|
safelyGetSubName: import("@angular/core").Signal<string>;
|
|
31
29
|
/**
|
|
@@ -36,7 +34,11 @@ export declare class XtSimpleComponent<T = any> implements XtComponent<T> {
|
|
|
36
34
|
componentDescriptor(): string;
|
|
37
35
|
getValue: import("@angular/core").Signal<T | null | undefined>;
|
|
38
36
|
displayValue: import("@angular/core").Signal<T | null>;
|
|
39
|
-
|
|
37
|
+
/**
|
|
38
|
+
* This is where components can assign their output() and input() into the XtComponent inputs and outputs member
|
|
39
|
+
* @protected
|
|
40
|
+
*/
|
|
41
|
+
protected setupInputOutput(): void;
|
|
40
42
|
static ɵfac: i0.ɵɵFactoryDeclaration<XtSimpleComponent<any>, never>;
|
|
41
43
|
static ɵcmp: i0.ɵɵComponentDeclaration<XtSimpleComponent<any>, "ng-component", never, { "context": { "alias": "context"; "required": true; "isSignal": true; }; }, { "outputs": "outputs"; }, never, never, true, never>;
|
|
42
44
|
}
|