xt-components 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,8 @@
1
+ import { XtComponentInfo } from './plugin/xt-plugin-info';
2
+ export declare class XtResolvedComponent {
3
+ componentName: string;
4
+ componentClass: any;
5
+ outputs: boolean;
6
+ constructor(componantName: string, componentClass: any, outputs?: boolean);
7
+ static from(info: XtComponentInfo<any>): XtResolvedComponent;
8
+ }
@@ -0,0 +1,42 @@
1
+ import { InputSignal, OutputEmitterRef } from '@angular/core';
2
+ import { AbstractControl, FormGroup } from '@angular/forms';
3
+ import { XtContext } from '../xt-context';
4
+ import { XtComponent, XtComponentOutput, XtOutputType } from '../xt-component';
5
+ import { XtBaseOutput } from '../output/xt-base-output';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * An XtSimpleComponent just displays the given value or element in a form.
9
+ * If you need to dynamically embed other XtComponents to display sub elements, then please use the XtCompositeComponent
10
+ */
11
+ export declare class XtSimpleComponent<T = any> implements XtComponent<T> {
12
+ context: InputSignal<XtContext<T>>;
13
+ outputs: OutputEmitterRef<XtComponentOutput>;
14
+ /**
15
+ * Does the component provides Output or not ?
16
+ * @protected
17
+ */
18
+ hasOutputs: boolean;
19
+ protected outputElement?: XtBaseOutput;
20
+ isInForm: import("@angular/core").Signal<boolean>;
21
+ formControlNameIfAny: import("@angular/core").Signal<string | undefined>;
22
+ formGroupIfAny: import("@angular/core").Signal<FormGroup<any> | undefined>;
23
+ formGroup: import("@angular/core").Signal<FormGroup<any>>;
24
+ /**
25
+ * Returns the component form name, which is for now the subName
26
+ */
27
+ componentNameInForm: import("@angular/core").Signal<string>;
28
+ constructor();
29
+ manageFormControl<T>(ctrlName: string): AbstractControl<T> | undefined;
30
+ safelyGetSubName: import("@angular/core").Signal<string>;
31
+ /**
32
+ * Returns the form control name and create a form control behind the scene
33
+ */
34
+ formControlName: import("@angular/core").Signal<string>;
35
+ formControl: import("@angular/core").Signal<AbstractControl<any, any>>;
36
+ componentDescriptor(): string;
37
+ getValue: import("@angular/core").Signal<T | null | undefined>;
38
+ displayValue: import("@angular/core").Signal<T | null>;
39
+ protected emitOutput(outputName: XtOutputType, newValue: any): void;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<XtSimpleComponent<any>, never>;
41
+ static ɵcmp: i0.ɵɵComponentDeclaration<XtSimpleComponent<any>, "ng-component", never, { "context": { "alias": "context"; "required": true; "isSignal": true; }; }, { "outputs": "outputs"; }, never, never, true, never>;
42
+ }
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "xt-components",
3
+ "version": "0.4.0",
4
+ "peerDependencies": {
5
+ "@angular/animations": "^18.1.2",
6
+ "@angular/common": "^18.1.2",
7
+ "@angular/compiler": "^18.1.2",
8
+ "@angular/core": "^18.1.2",
9
+ "@angular/forms": "^18.1.2",
10
+ "@angular/platform-browser": "^18.1.2",
11
+ "@angular/platform-browser-dynamic": "^18.1.2",
12
+ "@angular/router": "~18.1.2",
13
+ "rxjs": "~7.8.0",
14
+ "primeng": "~17.18.6",
15
+ "primeicons": "~7.0.0"
16
+ },
17
+ "dependencies": {
18
+ "tslib": "^2.3.0"
19
+ },
20
+ "module": "fesm2022/xt-components.mjs",
21
+ "typings": "index.d.ts",
22
+ "exports": {
23
+ "./package.json": {
24
+ "default": "./package.json"
25
+ },
26
+ ".": {
27
+ "types": "./index.d.ts",
28
+ "default": "./fesm2022/xt-components.mjs"
29
+ }
30
+ },
31
+ "sideEffects": false
32
+ }
@@ -0,0 +1,15 @@
1
+ export * from './lib/xt-component';
2
+ export * from './lib/xt-context';
3
+ export * from './lib/xt-resolved-component';
4
+ export * from './lib/resolver/xt-resolver';
5
+ export * from './lib/registry/xt-plugin-registry';
6
+ export * from './lib/plugin/xt-plugin-info';
7
+ export * from './lib/angular/xt-tokens';
8
+ export * from './lib/angular/xt-resolver.service';
9
+ export * from './lib/render/xt-render.component';
10
+ export * from './lib/render/xt-render-sub.component';
11
+ export * from './lib/xt-simple/xt-simple.component';
12
+ export * from './lib/xt-composite/xt-composite.component';
13
+ export * from './lib/type/xt-type-resolver';
14
+ export * from './lib/test/xt-unit-test-helper';
15
+ export * from './lib/test/xt-test-helper-components';