@kaskad/angular 0.0.1

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.
Files changed (27) hide show
  1. package/README.md +7 -0
  2. package/fesm2022/kaskad-angular-boolean-input-group.component-OTuIH22A.mjs +24 -0
  3. package/fesm2022/kaskad-angular-boolean-input-group.component-OTuIH22A.mjs.map +1 -0
  4. package/fesm2022/kaskad-angular-box.component-DT8snyrR.mjs +24 -0
  5. package/fesm2022/kaskad-angular-box.component-DT8snyrR.mjs.map +1 -0
  6. package/fesm2022/kaskad-angular-custom-input.component-BAFEfDxO.mjs +24 -0
  7. package/fesm2022/kaskad-angular-custom-input.component-BAFEfDxO.mjs.map +1 -0
  8. package/fesm2022/kaskad-angular-default.component-C-67t747.mjs +23 -0
  9. package/fesm2022/kaskad-angular-default.component-C-67t747.mjs.map +1 -0
  10. package/fesm2022/kaskad-angular-dialog.component-B_024_A6.mjs +49 -0
  11. package/fesm2022/kaskad-angular-dialog.component-B_024_A6.mjs.map +1 -0
  12. package/fesm2022/kaskad-angular-element.component-3CvZ-N6y.mjs +87 -0
  13. package/fesm2022/kaskad-angular-element.component-3CvZ-N6y.mjs.map +1 -0
  14. package/fesm2022/kaskad-angular-facade.component-BAkH4L3V.mjs +24 -0
  15. package/fesm2022/kaskad-angular-facade.component-BAkH4L3V.mjs.map +1 -0
  16. package/fesm2022/kaskad-angular-group.component-Bh65Yk30.mjs +32 -0
  17. package/fesm2022/kaskad-angular-group.component-Bh65Yk30.mjs.map +1 -0
  18. package/fesm2022/kaskad-angular-input-array.component-DWcLPned.mjs +24 -0
  19. package/fesm2022/kaskad-angular-input-array.component-DWcLPned.mjs.map +1 -0
  20. package/fesm2022/kaskad-angular-input-group.component-DZPGF3Dg.mjs +24 -0
  21. package/fesm2022/kaskad-angular-input-group.component-DZPGF3Dg.mjs.map +1 -0
  22. package/fesm2022/kaskad-angular-ref-space.component-DzwKtvwe.mjs +24 -0
  23. package/fesm2022/kaskad-angular-ref-space.component-DzwKtvwe.mjs.map +1 -0
  24. package/fesm2022/kaskad-angular.mjs +447 -0
  25. package/fesm2022/kaskad-angular.mjs.map +1 -0
  26. package/package.json +30 -0
  27. package/types/kaskad-angular.d.ts +74 -0
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # angular
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Running unit tests
6
+
7
+ Run `nx test angular` to execute the unit tests.
@@ -0,0 +1,24 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { ComponentOutletDirective } from './kaskad-angular.mjs';
4
+
5
+ class BooleanInputGroupComponent {
6
+ content = input(null, ...(ngDevMode ? [{ debugName: "content" }] : []));
7
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: BooleanInputGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.3", type: BooleanInputGroupComponent, isStandalone: true, selector: "kk-boolean-input-group", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.display": "\"contents\"" } }, ngImport: i0, template: ` <ng-container [kkComponentOutlet]="content()" /> `, isInline: true, dependencies: [{ kind: "directive", type: ComponentOutletDirective, selector: "[kkComponentOutlet]", inputs: ["kkComponentOutlet", "elementInjector"], outputs: ["kkComponentOutletChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9
+ }
10
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: BooleanInputGroupComponent, decorators: [{
11
+ type: Component,
12
+ args: [{
13
+ selector: 'kk-boolean-input-group',
14
+ changeDetection: ChangeDetectionStrategy.OnPush,
15
+ host: {
16
+ '[style.display]': '"contents"',
17
+ },
18
+ template: ` <ng-container [kkComponentOutlet]="content()" /> `,
19
+ imports: [ComponentOutletDirective],
20
+ }]
21
+ }], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }] } });
22
+
23
+ export { BooleanInputGroupComponent };
24
+ //# sourceMappingURL=kaskad-angular-boolean-input-group.component-OTuIH22A.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kaskad-angular-boolean-input-group.component-OTuIH22A.mjs","sources":["../../../../libs/angular/src/lib/components/forms/boolean-input-group.component.ts"],"sourcesContent":["import { ComponentId } from '@kaskad/types';\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nimport { ComponentOutletDirective } from '../../component-outlet.directive';\n\n@Component({\n selector: 'kk-boolean-input-group',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.display]': '\"contents\"',\n },\n template: ` <ng-container [kkComponentOutlet]=\"content()\" /> `,\n imports: [ComponentOutletDirective],\n})\nexport class BooleanInputGroupComponent {\n content = input<ComponentId | null>(null);\n}\n"],"names":[],"mappings":";;;;MAca,0BAA0B,CAAA;AACrC,IAAA,OAAO,GAAG,KAAK,CAAqB,IAAI,mDAAC;uGAD9B,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,cAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAH3B,CAAA,kDAAA,CAAoD,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACpD,wBAAwB,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,mBAAA,EAAA,iBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,yBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAEvB,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBATtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,wBAAwB;oBAClC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,iBAAiB,EAAE,YAAY;AAChC,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA,kDAAA,CAAoD;oBAC9D,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACpC,iBAAA;;;;;"}
@@ -0,0 +1,24 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { ComponentOutletDirective } from './kaskad-angular.mjs';
4
+
5
+ class BoxComponent {
6
+ content = input(null, ...(ngDevMode ? [{ debugName: "content" }] : []));
7
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: BoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.3", type: BoxComponent, isStandalone: true, selector: "kk-sys-box", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.display": "\"contents\"" } }, ngImport: i0, template: ` <ng-container [kkComponentOutlet]="content()" /> `, isInline: true, dependencies: [{ kind: "directive", type: ComponentOutletDirective, selector: "[kkComponentOutlet]", inputs: ["kkComponentOutlet", "elementInjector"], outputs: ["kkComponentOutletChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9
+ }
10
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: BoxComponent, decorators: [{
11
+ type: Component,
12
+ args: [{
13
+ selector: 'kk-sys-box',
14
+ changeDetection: ChangeDetectionStrategy.OnPush,
15
+ host: {
16
+ '[style.display]': '"contents"',
17
+ },
18
+ template: ` <ng-container [kkComponentOutlet]="content()" /> `,
19
+ imports: [ComponentOutletDirective],
20
+ }]
21
+ }], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }] } });
22
+
23
+ export { BoxComponent };
24
+ //# sourceMappingURL=kaskad-angular-box.component-DT8snyrR.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kaskad-angular-box.component-DT8snyrR.mjs","sources":["../../../../libs/angular/src/lib/components/sys/box.component.ts"],"sourcesContent":["import { ComponentId } from '@kaskad/core';\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nimport { ComponentOutletDirective } from '../../component-outlet.directive';\n\n@Component({\n selector: 'kk-sys-box',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.display]': '\"contents\"',\n },\n template: ` <ng-container [kkComponentOutlet]=\"content()\" /> `,\n imports: [ComponentOutletDirective],\n})\nexport class BoxComponent {\n content = input<ComponentId | null>(null);\n}\n"],"names":[],"mappings":";;;;MAca,YAAY,CAAA;AACvB,IAAA,OAAO,GAAG,KAAK,CAAqB,IAAI,mDAAC;uGAD9B,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,cAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAHb,CAAA,kDAAA,CAAoD,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACpD,wBAAwB,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,mBAAA,EAAA,iBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,yBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAEvB,YAAY,EAAA,UAAA,EAAA,CAAA;kBATxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,YAAY;oBACtB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,iBAAiB,EAAE,YAAY;AAChC,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA,kDAAA,CAAoD;oBAC9D,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACpC,iBAAA;;;;;"}
@@ -0,0 +1,24 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { ComponentOutletDirective } from './kaskad-angular.mjs';
4
+
5
+ class CustomInputComponent {
6
+ content = input(null, ...(ngDevMode ? [{ debugName: "content" }] : []));
7
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: CustomInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.3", type: CustomInputComponent, isStandalone: true, selector: "kk-custom-input", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.display": "\"contents\"" } }, ngImport: i0, template: ` <ng-container [kkComponentOutlet]="content()" /> `, isInline: true, dependencies: [{ kind: "directive", type: ComponentOutletDirective, selector: "[kkComponentOutlet]", inputs: ["kkComponentOutlet", "elementInjector"], outputs: ["kkComponentOutletChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9
+ }
10
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: CustomInputComponent, decorators: [{
11
+ type: Component,
12
+ args: [{
13
+ selector: 'kk-custom-input',
14
+ changeDetection: ChangeDetectionStrategy.OnPush,
15
+ host: {
16
+ '[style.display]': '"contents"',
17
+ },
18
+ template: ` <ng-container [kkComponentOutlet]="content()" /> `,
19
+ imports: [ComponentOutletDirective],
20
+ }]
21
+ }], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }] } });
22
+
23
+ export { CustomInputComponent };
24
+ //# sourceMappingURL=kaskad-angular-custom-input.component-BAFEfDxO.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kaskad-angular-custom-input.component-BAFEfDxO.mjs","sources":["../../../../libs/angular/src/lib/components/forms/custom-input.component.ts"],"sourcesContent":["import { ComponentId } from '@kaskad/core';\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nimport { ComponentOutletDirective } from '../../component-outlet.directive';\n\n@Component({\n selector: 'kk-custom-input',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.display]': '\"contents\"',\n },\n template: ` <ng-container [kkComponentOutlet]=\"content()\" /> `,\n imports: [ComponentOutletDirective],\n})\nexport class CustomInputComponent {\n content = input<ComponentId | null>(null);\n}\n"],"names":[],"mappings":";;;;MAca,oBAAoB,CAAA;AAC/B,IAAA,OAAO,GAAG,KAAK,CAAqB,IAAI,mDAAC;uGAD9B,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,cAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAHrB,CAAA,kDAAA,CAAoD,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACpD,wBAAwB,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,mBAAA,EAAA,iBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,yBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAEvB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAThC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;oBAC3B,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,iBAAiB,EAAE,YAAY;AAChC,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA,kDAAA,CAAoD;oBAC9D,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACpC,iBAAA;;;;;"}
@@ -0,0 +1,23 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+
4
+ class DefaultComponent {
5
+ id = input('', ...(ngDevMode ? [{ debugName: "id" }] : []));
6
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: DefaultComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.3", type: DefaultComponent, isStandalone: true, selector: "kk-default", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
8
+ <div class="props">
9
+ <div>id: {{ id() }}</div>
10
+ </div>
11
+ `, isInline: true, styles: [".props{border:1px dashed black;padding:5px}.prop{display:flex;align-items:flex-start;gap:.5em}pre{margin:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
12
+ }
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: DefaultComponent, decorators: [{
14
+ type: Component,
15
+ args: [{ selector: 'kk-default', imports: [], template: `
16
+ <div class="props">
17
+ <div>id: {{ id() }}</div>
18
+ </div>
19
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".props{border:1px dashed black;padding:5px}.prop{display:flex;align-items:flex-start;gap:.5em}pre{margin:0}\n"] }]
20
+ }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }] } });
21
+
22
+ export { DefaultComponent };
23
+ //# sourceMappingURL=kaskad-angular-default.component-C-67t747.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kaskad-angular-default.component-C-67t747.mjs","sources":["../../../../libs/angular/src/lib/components/default.component.ts"],"sourcesContent":["import { ComponentId } from '@kaskad/types';\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\n@Component({\n selector: 'kk-default',\n imports: [],\n template: `\n <div class=\"props\">\n <div>id: {{ id() }}</div>\n </div>\n `,\n styles: `\n .props {\n border: 1px dashed black;\n padding: 5px;\n }\n\n .prop {\n display: flex;\n align-items: flex-start;\n gap: 0.5em;\n }\n\n pre {\n margin: 0;\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DefaultComponent {\n id = input<ComponentId>('');\n}\n"],"names":[],"mappings":";;;MA6Ba,gBAAgB,CAAA;AAC3B,IAAA,EAAE,GAAG,KAAK,CAAc,EAAE,8CAAC;uGADhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,EAAA,EAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAvBjB;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,+GAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAmBU,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBA1B5B,SAAS;+BACE,YAAY,EAAA,OAAA,EACb,EAAE,EAAA,QAAA,EACD;;;;GAIT,EAAA,eAAA,EAiBgB,uBAAuB,CAAC,MAAM,EAAA,MAAA,EAAA,CAAA,+GAAA,CAAA,EAAA;;;;;"}
@@ -0,0 +1,49 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, viewChild, effect, HostListener, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { ComponentOutletDirective } from './kaskad-angular.mjs';
4
+
5
+ class DialogComponent {
6
+ styleClass = input(...(ngDevMode ? [undefined, { debugName: "styleClass" }] : []));
7
+ content = input(null, ...(ngDevMode ? [{ debugName: "content" }] : []));
8
+ close = input(...(ngDevMode ? [undefined, { debugName: "close" }] : []));
9
+ dialog = viewChild('dialog', ...(ngDevMode ? [{ debugName: "dialog" }] : []));
10
+ constructor() {
11
+ effect(() => {
12
+ this.dialog()?.nativeElement.showModal();
13
+ });
14
+ }
15
+ onClick(event) {
16
+ // close dialog when clicking on the backdrop
17
+ if (event.target.tagName === 'DIALOG') {
18
+ this.close()?.execute(false);
19
+ }
20
+ }
21
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: DialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
22
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.1.3", type: DialogComponent, isStandalone: true, selector: "kk-dialog", inputs: { styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, close: { classPropertyName: "close", publicName: "close", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick($event)" }, properties: { "style.display": "\"contents\"" } }, viewQueries: [{ propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true, isSignal: true }], ngImport: i0, template: `
23
+ <dialog #dialog [class]="styleClass()" (close)="close()?.execute(false)">
24
+ <ng-container [kkComponentOutlet]="content()" />
25
+ </dialog>
26
+ `, isInline: true, dependencies: [{ kind: "directive", type: ComponentOutletDirective, selector: "[kkComponentOutlet]", inputs: ["kkComponentOutlet", "elementInjector"], outputs: ["kkComponentOutletChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
27
+ }
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: DialogComponent, decorators: [{
29
+ type: Component,
30
+ args: [{
31
+ selector: 'kk-dialog',
32
+ imports: [ComponentOutletDirective],
33
+ host: {
34
+ '[style.display]': '"contents"',
35
+ },
36
+ template: `
37
+ <dialog #dialog [class]="styleClass()" (close)="close()?.execute(false)">
38
+ <ng-container [kkComponentOutlet]="content()" />
39
+ </dialog>
40
+ `,
41
+ changeDetection: ChangeDetectionStrategy.OnPush,
42
+ }]
43
+ }], ctorParameters: () => [], propDecorators: { styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], close: [{ type: i0.Input, args: [{ isSignal: true, alias: "close", required: false }] }], dialog: [{ type: i0.ViewChild, args: ['dialog', { isSignal: true }] }], onClick: [{
44
+ type: HostListener,
45
+ args: ['click', ['$event']]
46
+ }] } });
47
+
48
+ export { DialogComponent };
49
+ //# sourceMappingURL=kaskad-angular-dialog.component-B_024_A6.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kaskad-angular-dialog.component-B_024_A6.mjs","sources":["../../../../libs/angular/src/lib/components/browser/dialog.component.ts"],"sourcesContent":["import { CommandRef, ComponentId } from '@kaskad/core';\nimport { ChangeDetectionStrategy, Component, effect, ElementRef, HostListener, input, viewChild } from '@angular/core';\n\nimport { ComponentOutletDirective } from '../../component-outlet.directive';\n\n@Component({\n selector: 'kk-dialog',\n imports: [ComponentOutletDirective],\n host: {\n '[style.display]': '\"contents\"',\n },\n template: `\n <dialog #dialog [class]=\"styleClass()\" (close)=\"close()?.execute(false)\">\n <ng-container [kkComponentOutlet]=\"content()\" />\n </dialog>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class DialogComponent {\n styleClass = input<string>();\n content = input<ComponentId | null>(null);\n close = input<CommandRef<{ returnValue: unknown }, void>>();\n\n dialog = viewChild<ElementRef<HTMLDialogElement>>('dialog');\n\n constructor() {\n effect(() => {\n this.dialog()?.nativeElement.showModal();\n });\n }\n\n @HostListener('click', ['$event'])\n onClick(event: MouseEvent): void {\n // close dialog when clicking on the backdrop\n if ((event.target as HTMLElement).tagName === 'DIALOG') {\n this.close()?.execute(false);\n }\n }\n}\n"],"names":[],"mappings":";;;;MAk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AA;sBAQzD,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;;;;;"}
@@ -0,0 +1,87 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, inject, TemplateRef, ViewContainerRef, Renderer2, effect, SecurityContext, DestroyRef, Directive, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { ComponentOutletDirective } from './kaskad-angular.mjs';
4
+ import { DomSanitizer } from '@angular/platform-browser';
5
+
6
+ class TagWrapDirective {
7
+ kkTagWrap = input.required(...(ngDevMode ? [{ debugName: "kkTagWrap" }] : []));
8
+ kkTagWrapClass = input(...(ngDevMode ? [undefined, { debugName: "kkTagWrapClass" }] : []));
9
+ kkTagWrapInnerHTML = input(...(ngDevMode ? [undefined, { debugName: "kkTagWrapInnerHTML" }] : []));
10
+ templateRef = inject(TemplateRef);
11
+ vcr = inject(ViewContainerRef);
12
+ renderer = inject(Renderer2);
13
+ sanitizer = inject(DomSanitizer);
14
+ wrapperEl = null;
15
+ constructor() {
16
+ effect(() => {
17
+ const tag = this.kkTagWrap();
18
+ if (!this.wrapperEl) {
19
+ this.createWrapper(tag);
20
+ }
21
+ });
22
+ effect(() => {
23
+ if (!this.wrapperEl)
24
+ return;
25
+ this.wrapperEl.className = this.kkTagWrapClass() ?? '';
26
+ });
27
+ effect(() => {
28
+ if (!this.wrapperEl)
29
+ return;
30
+ const html = this.kkTagWrapInnerHTML();
31
+ if (html) {
32
+ const sanitized = this.sanitizer.sanitize(SecurityContext.HTML, html) ?? '';
33
+ this.renderer.setProperty(this.wrapperEl, 'innerHTML', sanitized);
34
+ }
35
+ });
36
+ inject(DestroyRef).onDestroy(() => this.wrapperEl?.remove());
37
+ }
38
+ createWrapper(tag) {
39
+ const anchor = this.vcr.element.nativeElement;
40
+ this.wrapperEl = document.createElement(tag);
41
+ anchor.parentNode?.insertBefore(this.wrapperEl, anchor);
42
+ this.wrapperEl.appendChild(anchor);
43
+ this.vcr.createEmbeddedView(this.templateRef);
44
+ }
45
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TagWrapDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
46
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.3", type: TagWrapDirective, isStandalone: true, selector: "[kkTagWrap]", inputs: { kkTagWrap: { classPropertyName: "kkTagWrap", publicName: "kkTagWrap", isSignal: true, isRequired: true, transformFunction: null }, kkTagWrapClass: { classPropertyName: "kkTagWrapClass", publicName: "kkTagWrapClass", isSignal: true, isRequired: false, transformFunction: null }, kkTagWrapInnerHTML: { classPropertyName: "kkTagWrapInnerHTML", publicName: "kkTagWrapInnerHTML", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
47
+ }
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: TagWrapDirective, decorators: [{
49
+ type: Directive,
50
+ args: [{ selector: '[kkTagWrap]' }]
51
+ }], ctorParameters: () => [], propDecorators: { kkTagWrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "kkTagWrap", required: true }] }], kkTagWrapClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "kkTagWrapClass", required: false }] }], kkTagWrapInnerHTML: [{ type: i0.Input, args: [{ isSignal: true, alias: "kkTagWrapInnerHTML", required: false }] }] } });
52
+
53
+ class ElementComponent {
54
+ tag = input(...(ngDevMode ? [undefined, { debugName: "tag" }] : []));
55
+ styleClass = input(...(ngDevMode ? [undefined, { debugName: "styleClass" }] : []));
56
+ innerHTML = input(...(ngDevMode ? [undefined, { debugName: "innerHTML" }] : []));
57
+ children = input(...(ngDevMode ? [undefined, { debugName: "children" }] : []));
58
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ElementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
59
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: ElementComponent, isStandalone: true, selector: "kk-browser-element", inputs: { tag: { classPropertyName: "tag", publicName: "tag", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, innerHTML: { classPropertyName: "innerHTML", publicName: "innerHTML", isSignal: true, isRequired: false, transformFunction: null }, children: { classPropertyName: "children", publicName: "children", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.display": "\"contents\"" } }, ngImport: i0, template: `
60
+ <ng-container *kkTagWrap="tag() ?? 'div'; class: styleClass(); innerHTML: innerHTML()">
61
+ @for (child of children(); track child) {
62
+ <ng-container [kkComponentOutlet]="child" />
63
+ }
64
+ </ng-container>
65
+ `, isInline: true, dependencies: [{ kind: "directive", type: ComponentOutletDirective, selector: "[kkComponentOutlet]", inputs: ["kkComponentOutlet", "elementInjector"], outputs: ["kkComponentOutletChange"] }, { kind: "directive", type: TagWrapDirective, selector: "[kkTagWrap]", inputs: ["kkTagWrap", "kkTagWrapClass", "kkTagWrapInnerHTML"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
66
+ }
67
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ElementComponent, decorators: [{
68
+ type: Component,
69
+ args: [{
70
+ selector: 'kk-browser-element',
71
+ changeDetection: ChangeDetectionStrategy.OnPush,
72
+ imports: [ComponentOutletDirective, TagWrapDirective],
73
+ host: {
74
+ '[style.display]': '"contents"',
75
+ },
76
+ template: `
77
+ <ng-container *kkTagWrap="tag() ?? 'div'; class: styleClass(); innerHTML: innerHTML()">
78
+ @for (child of children(); track child) {
79
+ <ng-container [kkComponentOutlet]="child" />
80
+ }
81
+ </ng-container>
82
+ `,
83
+ }]
84
+ }], propDecorators: { tag: [{ type: i0.Input, args: [{ isSignal: true, alias: "tag", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], innerHTML: [{ type: i0.Input, args: [{ isSignal: true, alias: "innerHTML", required: false }] }], children: [{ type: i0.Input, args: [{ isSignal: true, alias: "children", required: false }] }] } });
85
+
86
+ export { ElementComponent };
87
+ //# sourceMappingURL=kaskad-angular-element.component-3CvZ-N6y.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kaskad-angular-element.component-3CvZ-N6y.mjs","sources":["../../../../libs/angular/src/lib/directives/tag-wrap.directive.ts","../../../../libs/angular/src/lib/components/browser/element.component.ts"],"sourcesContent":["import {\n DestroyRef,\n Directive,\n effect,\n inject,\n input,\n Renderer2,\n SecurityContext,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\n\n@Directive({ selector: '[kkTagWrap]' })\nexport class TagWrapDirective {\n kkTagWrap = input.required<string>();\n kkTagWrapClass = input<string>();\n kkTagWrapInnerHTML = input<string>();\n\n private templateRef = inject(TemplateRef);\n private vcr = inject(ViewContainerRef);\n private renderer = inject(Renderer2);\n private sanitizer = inject(DomSanitizer);\n\n private wrapperEl: HTMLElement | null = null;\n\n constructor() {\n effect(() => {\n const tag = this.kkTagWrap();\n if (!this.wrapperEl) {\n this.createWrapper(tag);\n }\n });\n\n effect(() => {\n if (!this.wrapperEl) return;\n this.wrapperEl.className = this.kkTagWrapClass() ?? '';\n });\n\n effect(() => {\n if (!this.wrapperEl) return;\n const html = this.kkTagWrapInnerHTML();\n if (html) {\n const sanitized = this.sanitizer.sanitize(SecurityContext.HTML, html) ?? '';\n this.renderer.setProperty(this.wrapperEl, 'innerHTML', sanitized);\n }\n });\n\n inject(DestroyRef).onDestroy(() => this.wrapperEl?.remove());\n }\n\n private createWrapper(tag: string): void {\n const anchor = this.vcr.element.nativeElement as Comment;\n this.wrapperEl = document.createElement(tag);\n anchor.parentNode?.insertBefore(this.wrapperEl, anchor);\n this.wrapperEl.appendChild(anchor);\n this.vcr.createEmbeddedView(this.templateRef);\n }\n}\n","import { ComponentId } from '@kaskad/types';\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nimport { ComponentOutletDirective } from '../../component-outlet.directive';\nimport { TagWrapDirective } from '../../directives/tag-wrap.directive';\n\n@Component({\n selector: 'kk-browser-element',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ComponentOutletDirective, TagWrapDirective],\n host: {\n '[style.display]': '\"contents\"',\n },\n template: `\n <ng-container *kkTagWrap=\"tag() ?? 'div'; class: styleClass(); innerHTML: innerHTML()\">\n @for (child of children(); track child) {\n <ng-container [kkComponentOutlet]=\"child\" />\n }\n </ng-container>\n `,\n})\nexport class ElementComponent {\n tag = input<string>();\n styleClass = input<string>();\n innerHTML = input<string>();\n children = input<ComponentId[]>();\n}\n"],"names":[],"mappings":";;;;;MAca,gBAAgB,CAAA;AAC3B,IAAA,SAAS,GAAG,KAAK,CAAC,QAAQ,oDAAU;IACpC,cAAc,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;IAChC,kBAAkB,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,oBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AAE5B,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AACjC,IAAA,GAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC9B,IAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;AAC5B,IAAA,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC;IAEhC,SAAS,GAAuB,IAAI;AAE5C,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,EAAE;AAC5B,YAAA,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;AACnB,gBAAA,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC;;AA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AAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;oBAC9B,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,OAAO,EAAE,CAAC,wBAAwB,EAAE,gBAAgB,CAAC;AACrD,oBAAA,IAAI,EAAE;AACJ,wBAAA,iBAAiB,EAAE,YAAY;AAChC,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;AAMT,EAAA,CAAA;AACF,iBAAA;;;;;"}
@@ -0,0 +1,24 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { ComponentOutletDirective } from './kaskad-angular.mjs';
4
+
5
+ class FacadeComponent {
6
+ content = input(null, ...(ngDevMode ? [{ debugName: "content" }] : []));
7
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: FacadeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.3", type: FacadeComponent, isStandalone: true, selector: "kk-sys-template-facade", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.display": "\"contents\"" } }, ngImport: i0, template: ` <ng-container [kkComponentOutlet]="content()" /> `, isInline: true, dependencies: [{ kind: "directive", type: ComponentOutletDirective, selector: "[kkComponentOutlet]", inputs: ["kkComponentOutlet", "elementInjector"], outputs: ["kkComponentOutletChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9
+ }
10
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: FacadeComponent, decorators: [{
11
+ type: Component,
12
+ args: [{
13
+ selector: 'kk-sys-template-facade',
14
+ changeDetection: ChangeDetectionStrategy.OnPush,
15
+ host: {
16
+ '[style.display]': '"contents"',
17
+ },
18
+ template: ` <ng-container [kkComponentOutlet]="content()" /> `,
19
+ imports: [ComponentOutletDirective],
20
+ }]
21
+ }], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }] } });
22
+
23
+ export { FacadeComponent };
24
+ //# sourceMappingURL=kaskad-angular-facade.component-BAkH4L3V.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kaskad-angular-facade.component-BAkH4L3V.mjs","sources":["../../../../libs/angular/src/lib/components/sys/facade.component.ts"],"sourcesContent":["import { ComponentId } from '@kaskad/core';\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nimport { ComponentOutletDirective } from '../../component-outlet.directive';\n\n@Component({\n selector: 'kk-sys-template-facade',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.display]': '\"contents\"',\n },\n template: ` <ng-container [kkComponentOutlet]=\"content()\" /> `,\n imports: [ComponentOutletDirective],\n})\nexport class FacadeComponent {\n content = input<ComponentId | null>(null);\n}\n"],"names":[],"mappings":";;;;MAca,eAAe,CAAA;AAC1B,IAAA,OAAO,GAAG,KAAK,CAAqB,IAAI,mDAAC;uGAD9B,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,cAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAHhB,CAAA,kDAAA,CAAoD,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACpD,wBAAwB,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,mBAAA,EAAA,iBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,yBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAEvB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAT3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,wBAAwB;oBAClC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,iBAAiB,EAAE,YAAY;AAChC,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA,kDAAA,CAAoD;oBAC9D,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACpC,iBAAA;;;;;"}
@@ -0,0 +1,32 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { ComponentOutletDirective } from './kaskad-angular.mjs';
4
+
5
+ class GroupComponent {
6
+ children = input([], ...(ngDevMode ? [{ debugName: "children" }] : []));
7
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: GroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: GroupComponent, isStandalone: true, selector: "kk-sys-group", inputs: { children: { classPropertyName: "children", publicName: "children", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.display": "\"contents\"" } }, ngImport: i0, template: `
9
+ @for (child of children(); track child) {
10
+ <ng-container [kkComponentOutlet]="child" />
11
+ }
12
+ `, isInline: true, dependencies: [{ kind: "directive", type: ComponentOutletDirective, selector: "[kkComponentOutlet]", inputs: ["kkComponentOutlet", "elementInjector"], outputs: ["kkComponentOutletChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
13
+ }
14
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: GroupComponent, decorators: [{
15
+ type: Component,
16
+ args: [{
17
+ selector: 'kk-sys-group',
18
+ imports: [ComponentOutletDirective],
19
+ host: {
20
+ '[style.display]': '"contents"',
21
+ },
22
+ template: `
23
+ @for (child of children(); track child) {
24
+ <ng-container [kkComponentOutlet]="child" />
25
+ }
26
+ `,
27
+ changeDetection: ChangeDetectionStrategy.OnPush,
28
+ }]
29
+ }], propDecorators: { children: [{ type: i0.Input, args: [{ isSignal: true, alias: "children", required: false }] }] } });
30
+
31
+ export { GroupComponent };
32
+ //# sourceMappingURL=kaskad-angular-group.component-Bh65Yk30.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kaskad-angular-group.component-Bh65Yk30.mjs","sources":["../../../../libs/angular/src/lib/components/sys/group.component.ts"],"sourcesContent":["import { ComponentId } from '@kaskad/core';\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nimport { ComponentOutletDirective } from '../../component-outlet.directive';\n\n@Component({\n selector: 'kk-sys-group',\n imports: [ComponentOutletDirective],\n host: {\n '[style.display]': '\"contents\"',\n },\n template: `\n @for (child of children(); track child) {\n <ng-container [kkComponentOutlet]=\"child\" />\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class GroupComponent {\n children = input<ComponentId[]>([]);\n}\n"],"names":[],"mappings":";;;;MAkBa,cAAc,CAAA;AACzB,IAAA,QAAQ,GAAG,KAAK,CAAgB,EAAE,oDAAC;uGADxB,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,cAAc,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,cAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAPf;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EARS,wBAAwB,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,mBAAA,EAAA,iBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,yBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAWvB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAb1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;oBACxB,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACnC,oBAAA,IAAI,EAAE;AACJ,wBAAA,iBAAiB,EAAE,YAAY;AAChC,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;AAIT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;;;"}
@@ -0,0 +1,24 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { ComponentOutletDirective } from './kaskad-angular.mjs';
4
+
5
+ class InputArrayComponent {
6
+ content = input(null, ...(ngDevMode ? [{ debugName: "content" }] : []));
7
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: InputArrayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.3", type: InputArrayComponent, isStandalone: true, selector: "kk-input-array", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.display": "\"contents\"" } }, ngImport: i0, template: ` <ng-container [kkComponentOutlet]="content()" /> `, isInline: true, dependencies: [{ kind: "directive", type: ComponentOutletDirective, selector: "[kkComponentOutlet]", inputs: ["kkComponentOutlet", "elementInjector"], outputs: ["kkComponentOutletChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9
+ }
10
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: InputArrayComponent, decorators: [{
11
+ type: Component,
12
+ args: [{
13
+ selector: 'kk-input-array',
14
+ changeDetection: ChangeDetectionStrategy.OnPush,
15
+ host: {
16
+ '[style.display]': '"contents"',
17
+ },
18
+ template: ` <ng-container [kkComponentOutlet]="content()" /> `,
19
+ imports: [ComponentOutletDirective],
20
+ }]
21
+ }], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }] } });
22
+
23
+ export { InputArrayComponent };
24
+ //# sourceMappingURL=kaskad-angular-input-array.component-DWcLPned.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kaskad-angular-input-array.component-DWcLPned.mjs","sources":["../../../../libs/angular/src/lib/components/forms/input-array.component.ts"],"sourcesContent":["import { ComponentId } from '@kaskad/types';\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nimport { ComponentOutletDirective } from '../../component-outlet.directive';\n\n@Component({\n selector: 'kk-input-array',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.display]': '\"contents\"',\n },\n template: ` <ng-container [kkComponentOutlet]=\"content()\" /> `,\n imports: [ComponentOutletDirective],\n})\nexport class InputArrayComponent {\n content = input<ComponentId | null>(null);\n}\n"],"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
+ import { input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { ComponentOutletDirective } from './kaskad-angular.mjs';
4
+
5
+ class InputGroupComponent {
6
+ content = input(null, ...(ngDevMode ? [{ debugName: "content" }] : []));
7
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: InputGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.3", type: InputGroupComponent, isStandalone: true, selector: "kk-input-group", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.display": "\"contents\"" } }, ngImport: i0, template: ` <ng-container [kkComponentOutlet]="content()" /> `, isInline: true, dependencies: [{ kind: "directive", type: ComponentOutletDirective, selector: "[kkComponentOutlet]", inputs: ["kkComponentOutlet", "elementInjector"], outputs: ["kkComponentOutletChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9
+ }
10
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: InputGroupComponent, decorators: [{
11
+ type: Component,
12
+ args: [{
13
+ selector: 'kk-input-group',
14
+ changeDetection: ChangeDetectionStrategy.OnPush,
15
+ host: {
16
+ '[style.display]': '"contents"',
17
+ },
18
+ template: ` <ng-container [kkComponentOutlet]="content()" /> `,
19
+ imports: [ComponentOutletDirective],
20
+ }]
21
+ }], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }] } });
22
+
23
+ export { InputGroupComponent };
24
+ //# sourceMappingURL=kaskad-angular-input-group.component-DZPGF3Dg.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kaskad-angular-input-group.component-DZPGF3Dg.mjs","sources":["../../../../libs/angular/src/lib/components/forms/input-group.component.ts"],"sourcesContent":["import { ComponentId } from '@kaskad/types';\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nimport { ComponentOutletDirective } from '../../component-outlet.directive';\n\n@Component({\n selector: 'kk-input-group',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.display]': '\"contents\"',\n },\n template: ` <ng-container [kkComponentOutlet]=\"content()\" /> `,\n imports: [ComponentOutletDirective],\n})\nexport class InputGroupComponent {\n content = input<ComponentId | null>(null);\n}\n"],"names":[],"mappings":";;;;MAca,mBAAmB,CAAA;AAC9B,IAAA,OAAO,GAAG,KAAK,CAAqB,IAAI,mDAAC;uGAD9B,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,cAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAHpB,CAAA,kDAAA,CAAoD,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACpD,wBAAwB,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,mBAAA,EAAA,iBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,yBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAEvB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAT/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;oBAC1B,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,iBAAiB,EAAE,YAAY;AAChC,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA,kDAAA,CAAoD;oBAC9D,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACpC,iBAAA;;;;;"}
@@ -0,0 +1,24 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { ComponentOutletDirective } from './kaskad-angular.mjs';
4
+
5
+ class RefSpaceComponent {
6
+ content = input(null, ...(ngDevMode ? [{ debugName: "content" }] : []));
7
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: RefSpaceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.3", type: RefSpaceComponent, isStandalone: true, selector: "kk-sys-ref-space", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.display": "\"contents\"" } }, ngImport: i0, template: ` <ng-container [kkComponentOutlet]="content()" /> `, isInline: true, dependencies: [{ kind: "directive", type: ComponentOutletDirective, selector: "[kkComponentOutlet]", inputs: ["kkComponentOutlet", "elementInjector"], outputs: ["kkComponentOutletChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9
+ }
10
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: RefSpaceComponent, decorators: [{
11
+ type: Component,
12
+ args: [{
13
+ selector: 'kk-sys-ref-space',
14
+ changeDetection: ChangeDetectionStrategy.OnPush,
15
+ host: {
16
+ '[style.display]': '"contents"',
17
+ },
18
+ template: ` <ng-container [kkComponentOutlet]="content()" /> `,
19
+ imports: [ComponentOutletDirective],
20
+ }]
21
+ }], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }] } });
22
+
23
+ export { RefSpaceComponent };
24
+ //# sourceMappingURL=kaskad-angular-ref-space.component-DzwKtvwe.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kaskad-angular-ref-space.component-DzwKtvwe.mjs","sources":["../../../../libs/angular/src/lib/components/sys/ref-space.component.ts"],"sourcesContent":["import { ComponentId } from '@kaskad/core';\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nimport { ComponentOutletDirective } from '../../component-outlet.directive';\n\n@Component({\n selector: 'kk-sys-ref-space',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.display]': '\"contents\"',\n },\n template: ` <ng-container [kkComponentOutlet]=\"content()\" /> `,\n imports: [ComponentOutletDirective],\n})\nexport class RefSpaceComponent {\n content = input<ComponentId | null>(null);\n}\n"],"names":[],"mappings":";;;;MAca,iBAAiB,CAAA;AAC5B,IAAA,OAAO,GAAG,KAAK,CAAqB,IAAI,mDAAC;uGAD9B,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,cAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAHlB,CAAA,kDAAA,CAAoD,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACpD,wBAAwB,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,mBAAA,EAAA,iBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,yBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAEvB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAT7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;oBAC5B,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,iBAAiB,EAAE,YAAY;AAChC,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA,kDAAA,CAAoD;oBAC9D,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACpC,iBAAA;;;;;"}
@@ -0,0 +1,447 @@
1
+ import { ComponentStore, componentInstanceMap, unfoldNodeSchema as unfoldNodeSchema$1, createRootNode, activateNode, DefinitionStore } from '@kaskad/core';
2
+ import { reaction, comparer } from 'mobx';
3
+ import * as i0 from '@angular/core';
4
+ import { input, Directive, Injectable, model, inject, ViewContainerRef, DestroyRef, NgZone, EnvironmentInjector, effect, Injector, createComponent, signal, inputBinding, isSignal, runInInjectionContext, computed, untracked, makeEnvironmentProviders, provideEnvironmentInitializer } from '@angular/core';
5
+ import { log } from '@kaskad/config';
6
+ import { templateRegistry, unfoldNodeSchema, loadTemplates } from '@kaskad/schema';
7
+ import { ComponentTreeApi } from '@kaskad/component-tree';
8
+
9
+ class ClickableDirective {
10
+ click = input.required(...(ngDevMode ? [{ debugName: "click" }] : []));
11
+ stopPropagation = input(false, ...(ngDevMode ? [{ debugName: "stopPropagation" }] : []));
12
+ handleClick(event) {
13
+ if (this.stopPropagation()) {
14
+ event.stopPropagation();
15
+ }
16
+ log.trace('Click handler executing');
17
+ this.click()
18
+ .execute()
19
+ .catch((error) => {
20
+ log.error('Click handler failed:', error);
21
+ });
22
+ }
23
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClickableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
24
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.3", type: ClickableDirective, isStandalone: true, selector: "[kkClickable]", inputs: { click: { classPropertyName: "click", publicName: "click", isSignal: true, isRequired: true, transformFunction: null }, stopPropagation: { classPropertyName: "stopPropagation", publicName: "stopPropagation", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "handleClick($event)" }, styleAttribute: "cursor: pointer" }, ngImport: i0 });
25
+ }
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ClickableDirective, decorators: [{
27
+ type: Directive,
28
+ args: [{
29
+ selector: '[kkClickable]',
30
+ host: {
31
+ '(click)': 'handleClick($event)',
32
+ style: 'cursor: pointer',
33
+ },
34
+ }]
35
+ }], propDecorators: { click: [{ type: i0.Input, args: [{ isSignal: true, alias: "click", required: true }] }], stopPropagation: [{ type: i0.Input, args: [{ isSignal: true, alias: "stopPropagation", required: false }] }] } });
36
+
37
+ class FocusableDirective {
38
+ tabIndex = input(0, ...(ngDevMode ? [{ debugName: "tabIndex" }] : []));
39
+ blur = input(...(ngDevMode ? [undefined, { debugName: "blur" }] : []));
40
+ onBlur() {
41
+ this.blur()?.execute();
42
+ }
43
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: FocusableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
44
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.3", type: FocusableDirective, isStandalone: true, selector: "[kkFocusable]", inputs: { tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, blur: { classPropertyName: "blur", publicName: "blur", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "blur": "onBlur()" }, properties: { "tabIndex": "tabIndex()" } }, ngImport: i0 });
45
+ }
46
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: FocusableDirective, decorators: [{
47
+ type: Directive,
48
+ args: [{
49
+ selector: '[kkFocusable]',
50
+ host: {
51
+ '[tabIndex]': 'tabIndex()',
52
+ '(blur)': 'onBlur()',
53
+ },
54
+ }]
55
+ }], propDecorators: { tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }], blur: [{ type: i0.Input, args: [{ isSignal: true, alias: "blur", required: false }] }] } });
56
+
57
+ class ComponentRegistry {
58
+ components = {
59
+ default: () => import('./kaskad-angular-default.component-C-67t747.mjs').then((m) => m.DefaultComponent),
60
+ 'sys.Box': () => import('./kaskad-angular-box.component-DT8snyrR.mjs').then((m) => m.BoxComponent),
61
+ 'sys.Group': () => import('./kaskad-angular-group.component-Bh65Yk30.mjs').then((m) => m.GroupComponent),
62
+ 'sys.RefSpace': () => import('./kaskad-angular-ref-space.component-DzwKtvwe.mjs').then((m) => m.RefSpaceComponent),
63
+ 'sys.Facade': () => import('./kaskad-angular-facade.component-BAkH4L3V.mjs').then((m) => m.FacadeComponent),
64
+ 'forms.InputGroup': () => import('./kaskad-angular-input-group.component-DZPGF3Dg.mjs').then((m) => m.InputGroupComponent),
65
+ 'forms.InputArray': () => import('./kaskad-angular-input-array.component-DWcLPned.mjs').then((m) => m.InputArrayComponent),
66
+ 'forms.BooleanInputGroup': () => import('./kaskad-angular-boolean-input-group.component-OTuIH22A.mjs').then((m) => m.BooleanInputGroupComponent),
67
+ 'forms.CustomInput': () => import('./kaskad-angular-custom-input.component-BAFEfDxO.mjs').then((m) => m.CustomInputComponent),
68
+ 'browser.Clickable': { directive: ClickableDirective },
69
+ 'browser.Focusable': { directive: FocusableDirective },
70
+ 'browser.Element': () => import('./kaskad-angular-element.component-3CvZ-N6y.mjs').then((m) => m.ElementComponent),
71
+ 'browser.Dialog': () => import('./kaskad-angular-dialog.component-B_024_A6.mjs').then((m) => m.DialogComponent),
72
+ };
73
+ setAll(entries) {
74
+ for (const [componentType, component] of Object.entries(entries)) {
75
+ this.set(componentType, component);
76
+ }
77
+ }
78
+ set(type, component) {
79
+ this.components[type] = component;
80
+ }
81
+ get(type) {
82
+ return this.components[type] || this.components['default'];
83
+ }
84
+ getAll() {
85
+ return this.components;
86
+ }
87
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ComponentRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
88
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ComponentRegistry, providedIn: 'root' });
89
+ }
90
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ComponentRegistry, decorators: [{
91
+ type: Injectable,
92
+ args: [{ providedIn: 'root' }]
93
+ }] });
94
+ function isLazyComponent(entry) {
95
+ return typeof entry === 'function' && !/^class\s/.test(Function.prototype.toString.call(entry));
96
+ }
97
+
98
+ function isDirective(entry) {
99
+ return typeof entry === 'object' && entry !== null && 'directive' in entry;
100
+ }
101
+ function prepareValueToRender(node) {
102
+ // Filter out empty component IDs
103
+ if (node.valueType.type === 'array' && node.valueType.item.type === 'component') {
104
+ return node.viewModel.filter(Boolean);
105
+ }
106
+ return node.viewModel;
107
+ }
108
+
109
+ class ComponentOutletDirective {
110
+ componentId = model(null, { ...(ngDevMode ? { debugName: "componentId" } : {}), alias: 'kkComponentOutlet' });
111
+ elementInjector = input(...(ngDevMode ? [undefined, { debugName: "elementInjector" }] : []));
112
+ store = inject(ComponentStore);
113
+ componentRegistry = inject(ComponentRegistry);
114
+ vcr = inject(ViewContainerRef);
115
+ destroyRef = inject(DestroyRef);
116
+ ngZone = inject(NgZone);
117
+ environmentInjector = inject(EnvironmentInjector);
118
+ disposers = [];
119
+ componentRef = null;
120
+ constructor() {
121
+ effect(() => {
122
+ const id = this.componentId();
123
+ if (!id) {
124
+ this.clear();
125
+ return;
126
+ }
127
+ this.ngZone.runOutsideAngular(() => {
128
+ const rootComponent = this.store.getComponent(id);
129
+ if (rootComponent) {
130
+ this.renderComponent(rootComponent);
131
+ }
132
+ });
133
+ });
134
+ this.destroyRef.onDestroy(() => this.clear());
135
+ }
136
+ renderComponent(component) {
137
+ const { finalComponent, directives } = this.collectDirectives(component);
138
+ // Clear any existing component
139
+ if (this.componentRef) {
140
+ this.vcr.clear();
141
+ this.componentRef = null;
142
+ }
143
+ // Create new component
144
+ this.componentRef = this.createComponent(finalComponent, directives);
145
+ }
146
+ collectDirectives(component) {
147
+ const directives = [];
148
+ let current = component;
149
+ while (isDirective(this.componentRegistry.get(current.componentType))) {
150
+ directives.push(current);
151
+ const contentId = current.getNodeValue('content');
152
+ if (!contentId)
153
+ break;
154
+ const contentComponent = this.store.getComponent(contentId);
155
+ if (!contentComponent)
156
+ break;
157
+ current = contentComponent;
158
+ }
159
+ return { finalComponent: current, directives };
160
+ }
161
+ createComponent(model, directives = []) {
162
+ const entry = this.componentRegistry.get(model.componentType);
163
+ // All components should be preloaded at this point
164
+ if (isLazyComponent(entry)) {
165
+ throw new Error(`Component "${model.componentType}" is not preloaded. This is a bug in the preloading logic.`);
166
+ }
167
+ return this.mapComponentToAngular(entry, model, directives);
168
+ }
169
+ mapComponentToAngular(componentType, model, directives = []) {
170
+ const directivesWithBindings = directives.map((d) => {
171
+ const entry = this.componentRegistry.get(d.componentType);
172
+ const bindings = this.createDirectiveBindings(d);
173
+ return { type: entry.directive, bindings };
174
+ });
175
+ // Build reactive inputs
176
+ const bindings = this.createPropsBindings(model);
177
+ const elementInjector = this.elementInjector() ??
178
+ Injector.create({
179
+ providers: [{ provide: ComponentOutletDirective, useValue: this }],
180
+ parent: this.vcr.injector,
181
+ });
182
+ const compRef = createComponent(componentType, {
183
+ environmentInjector: this.environmentInjector,
184
+ elementInjector,
185
+ directives: directivesWithBindings,
186
+ bindings,
187
+ });
188
+ this.vcr.insert(compRef.hostView);
189
+ // Bookkeeping
190
+ componentInstanceMap.set(model.id, compRef.instance);
191
+ compRef.onDestroy(() => componentInstanceMap.delete(model.id));
192
+ // Input & metadata wiring
193
+ compRef.location.nativeElement.setAttribute('data-component-id', model.id);
194
+ compRef.location.nativeElement.setAttribute('data-component-scope-id', model.refSpaceId);
195
+ return compRef;
196
+ }
197
+ createPropsBindings(model) {
198
+ const bindings = [];
199
+ for (const [key, node] of model.props.entries()) {
200
+ const s = signal(prepareValueToRender(node), ...(ngDevMode ? [{ debugName: "s" }] : []));
201
+ bindings.push(inputBinding(key, s));
202
+ this.addReaction(() => node.extractedValue, () => s.set(prepareValueToRender(node)));
203
+ }
204
+ return bindings;
205
+ }
206
+ createDirectiveBindings(model) {
207
+ const bindings = [];
208
+ for (const [propName, node] of model.props.entries()) {
209
+ if (propName === 'content')
210
+ continue;
211
+ const directiveSignal = signal(prepareValueToRender(node), ...(ngDevMode ? [{ debugName: "directiveSignal" }] : []));
212
+ this.addReaction(() => node.extractedValue, () => directiveSignal.set(prepareValueToRender(node)));
213
+ bindings.push(inputBinding(propName, directiveSignal));
214
+ }
215
+ return bindings;
216
+ }
217
+ clear() {
218
+ this.vcr.clear();
219
+ this.componentRef = null;
220
+ this.disposeReactions();
221
+ }
222
+ addReaction(trackFn, effectFn, options) {
223
+ const disposer = reaction(trackFn, effectFn, options);
224
+ this.disposers.push(disposer);
225
+ }
226
+ disposeReactions() {
227
+ this.disposers.forEach((dispose) => dispose());
228
+ this.disposers = [];
229
+ }
230
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ComponentOutletDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
231
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.3", type: ComponentOutletDirective, isStandalone: true, selector: "[kkComponentOutlet]", inputs: { componentId: { classPropertyName: "componentId", publicName: "kkComponentOutlet", isSignal: true, isRequired: false, transformFunction: null }, elementInjector: { classPropertyName: "elementInjector", publicName: "elementInjector", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { componentId: "kkComponentOutletChange" }, ngImport: i0 });
232
+ }
233
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ComponentOutletDirective, decorators: [{
234
+ type: Directive,
235
+ args: [{ selector: '[kkComponentOutlet]' }]
236
+ }], ctorParameters: () => [], propDecorators: { componentId: [{ type: i0.Input, args: [{ isSignal: true, alias: "kkComponentOutlet", required: false }] }, { type: i0.Output, args: ["kkComponentOutletChange"] }], elementInjector: [{ type: i0.Input, args: [{ isSignal: true, alias: "elementInjector", required: false }] }] } });
237
+
238
+ class SignalKaskadSync {
239
+ injector = inject(Injector);
240
+ destroyRef = inject(DestroyRef);
241
+ run(rootId, templateUrl, props) {
242
+ const writableSignals = Object.entries(props()).filter(([, v]) => isSignal(v));
243
+ if (!writableSignals.length) {
244
+ return; // nothing to bind
245
+ }
246
+ const template = templateRegistry.get(templateUrl);
247
+ if (!template) {
248
+ log.error('failed to setup two-way binding, unable to find template in registry', templateUrl);
249
+ return;
250
+ }
251
+ const component = ComponentTreeApi.findComponent(rootId, ':' + template.recipe.componentType);
252
+ if (!component) {
253
+ log.error('failed to setup two-way binding, unable to find root schema component:', template.recipe.componentType);
254
+ return;
255
+ }
256
+ const disposers = [];
257
+ for (const [key, signal] of writableSignals) {
258
+ const contract = template.recipe['contract'];
259
+ const entry = contract?.[key];
260
+ if (!entry) {
261
+ log.warn(`unable to find contract entry for signal "${key}" in template ${templateUrl}`);
262
+ continue;
263
+ }
264
+ const node = component.getNode(entry);
265
+ const schema = unfoldNodeSchema(signal(), node.valueType, node.position.path);
266
+ if (this.hasComponentOrComputation(schema)) {
267
+ log.warn(`skipping signal/kaskad sync for "${key}" as it contains component or computation schema`);
268
+ continue;
269
+ }
270
+ // mobx to signal
271
+ const disposer = this.addReaction(() => component.getNode(entry).extractedValue, (v) => signal.set(v), { equals: comparer.structural });
272
+ disposers.push(disposer);
273
+ // signal to mobx
274
+ runInInjectionContext(this.injector, () => {
275
+ let firstRun = true;
276
+ effect(() => {
277
+ const signalValue = signal();
278
+ // skip first run as it's already handled by mobx
279
+ if (firstRun) {
280
+ firstRun = false;
281
+ return;
282
+ }
283
+ ComponentTreeApi.setNodeRawSchema(component.id, entry, signalValue);
284
+ });
285
+ });
286
+ }
287
+ this.destroyRef.onDestroy(() => {
288
+ disposers.forEach((dispose) => dispose());
289
+ });
290
+ }
291
+ addReaction(trackFn, effectFn, options) {
292
+ return reaction(trackFn, effectFn, options);
293
+ }
294
+ hasComponentOrComputation(schema) {
295
+ if (schema.valueType.type === 'component' || schema.computation !== null) {
296
+ return true;
297
+ }
298
+ if (!schema.value) {
299
+ return false;
300
+ }
301
+ if (schema.valueType.type === 'object') {
302
+ const objectValue = schema.value;
303
+ for (const childSchema of Object.values(objectValue || {})) {
304
+ if (this.hasComponentOrComputation(childSchema)) {
305
+ return true;
306
+ }
307
+ }
308
+ }
309
+ if (schema.valueType.type === 'array') {
310
+ const arrayValue = schema.value;
311
+ for (const childSchema of arrayValue || []) {
312
+ if (this.hasComponentOrComputation(childSchema)) {
313
+ return true;
314
+ }
315
+ }
316
+ }
317
+ if (schema.valueType.type === 'map') {
318
+ const mapValue = schema.value;
319
+ for (const childSchema of Object.values(mapValue || {})) {
320
+ if (this.hasComponentOrComputation(childSchema)) {
321
+ return true;
322
+ }
323
+ }
324
+ }
325
+ return false;
326
+ }
327
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: SignalKaskadSync, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
328
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: SignalKaskadSync, providedIn: 'root' });
329
+ }
330
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: SignalKaskadSync, decorators: [{
331
+ type: Injectable,
332
+ args: [{ providedIn: 'root' }]
333
+ }] });
334
+
335
+ class ViewOutletDirective {
336
+ static counter = 0;
337
+ src = input.required({ ...(ngDevMode ? { debugName: "src" } : {}), alias: 'kkViewOutlet' });
338
+ props = input({}, ...(ngDevMode ? [{ debugName: "props" }] : []));
339
+ refSpaceId = computed(() => this.src() + '-' + ViewOutletDirective.counter++, ...(ngDevMode ? [{ debugName: "refSpaceId" }] : []));
340
+ rawSchema = computed(() => {
341
+ const content = {
342
+ templateUrl: this.src(),
343
+ };
344
+ untracked(() => {
345
+ for (const [key, value] of Object.entries(this.props())) {
346
+ content[key] = isSignal(value) ? untracked(() => value()) : value;
347
+ }
348
+ });
349
+ return {
350
+ componentType: 'sys.Facade',
351
+ content,
352
+ };
353
+ }, ...(ngDevMode ? [{ debugName: "rawSchema" }] : []));
354
+ destroyRef = inject(DestroyRef);
355
+ store = inject(ComponentStore);
356
+ componentOutlet = inject(ComponentOutletDirective);
357
+ componentRegistry = inject(ComponentRegistry);
358
+ signalKaskadSync = inject(SignalKaskadSync);
359
+ currentComponentId = null;
360
+ constructor() {
361
+ effect(() => this.processRawSchema(this.rawSchema()));
362
+ this.destroyRef.onDestroy(() => {
363
+ if (this.currentComponentId) {
364
+ this.store.removeComponent(this.currentComponentId);
365
+ }
366
+ });
367
+ }
368
+ async processRawSchema(rawSchema) {
369
+ await this.preloadComponentTypes(new Set(['sys.Box', 'sys.Group', 'sys.RefSpace', 'sys.Facade']));
370
+ await loadTemplates(rawSchema);
371
+ const componentTypes = templateRegistry.getAggregatedComponentTypes(this.src());
372
+ await this.preloadComponentTypes(componentTypes);
373
+ const schema = unfoldNodeSchema$1(rawSchema, { type: 'component' });
374
+ const root = createRootNode(this.refSpaceId(), schema, null, null, this.src());
375
+ activateNode(root);
376
+ const rootId = root.extractedValue;
377
+ // Clean up previous component if schema changes
378
+ if (this.currentComponentId && this.currentComponentId !== rootId) {
379
+ this.store.removeComponent(this.currentComponentId);
380
+ }
381
+ this.currentComponentId = rootId;
382
+ this.signalKaskadSync.run(rootId, this.src(), this.props);
383
+ this.componentOutlet.componentId.set(rootId);
384
+ }
385
+ async preloadComponentTypes(componentTypes) {
386
+ const promises = [];
387
+ for (const componentType of componentTypes) {
388
+ const entry = this.componentRegistry.get(componentType);
389
+ // Skip directive (?)
390
+ if (isDirective(entry)) {
391
+ continue;
392
+ }
393
+ // Only preload if it's still lazy
394
+ if (isLazyComponent(entry)) {
395
+ promises.push(entry().then((component) => {
396
+ // Replace lazy entry with loaded component in registry
397
+ this.componentRegistry.set(componentType, component);
398
+ }));
399
+ }
400
+ }
401
+ if (promises.length > 0) {
402
+ await Promise.all(promises);
403
+ }
404
+ }
405
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ViewOutletDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
406
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.3", type: ViewOutletDirective, isStandalone: true, selector: "[kkViewOutlet]", inputs: { src: { classPropertyName: "src", publicName: "kkViewOutlet", isSignal: true, isRequired: true, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["outlet"], hostDirectives: [{ directive: ComponentOutletDirective, inputs: ["elementInjector", "elementInjector"] }], ngImport: i0 });
407
+ }
408
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ViewOutletDirective, decorators: [{
409
+ type: Directive,
410
+ args: [{
411
+ selector: '[kkViewOutlet]',
412
+ exportAs: 'outlet',
413
+ hostDirectives: [
414
+ {
415
+ directive: ComponentOutletDirective,
416
+ inputs: ['elementInjector'],
417
+ },
418
+ ],
419
+ }]
420
+ }], ctorParameters: () => [], propDecorators: { src: [{ type: i0.Input, args: [{ isSignal: true, alias: "kkViewOutlet", required: true }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
421
+
422
+ function provideKaskad(config) {
423
+ return makeEnvironmentProviders([
424
+ { provide: ComponentStore, useValue: ComponentStore.getInstance() },
425
+ { provide: DefinitionStore, useValue: DefinitionStore.getInstance() },
426
+ provideEnvironmentInitializer(() => {
427
+ if (config?.logLevel) {
428
+ log.level = config.logLevel;
429
+ }
430
+ const store = inject(ComponentStore);
431
+ const defStore = inject(DefinitionStore);
432
+ // Expose stores globally for debugging
433
+ if (typeof window !== 'undefined') {
434
+ const global = window;
435
+ global.store = store;
436
+ global.defStore = defStore;
437
+ }
438
+ }),
439
+ ]);
440
+ }
441
+
442
+ /**
443
+ * Generated bundle index. Do not edit.
444
+ */
445
+
446
+ export { ComponentOutletDirective, ComponentRegistry, ViewOutletDirective, isLazyComponent, provideKaskad };
447
+ //# sourceMappingURL=kaskad-angular.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kaskad-angular.mjs","sources":["../../../../libs/angular/src/lib/directives/clickable.directive.ts","../../../../libs/angular/src/lib/directives/focusable.directive.ts","../../../../libs/angular/src/lib/component-registry.ts","../../../../libs/angular/src/lib/util.ts","../../../../libs/angular/src/lib/component-outlet.directive.ts","../../../../libs/angular/src/lib/signal-kaskad-sync.ts","../../../../libs/angular/src/lib/view-outlet.directive.ts","../../../../libs/angular/src/lib/provider.ts","../../../../libs/angular/src/kaskad-angular.ts"],"sourcesContent":["import { CommandNodeViewModel } from '@kaskad/component-tree';\nimport { log } from '@kaskad/config';\nimport { Directive, input } from '@angular/core';\n\n@Directive({\n selector: '[kkClickable]',\n host: {\n '(click)': 'handleClick($event)',\n style: 'cursor: pointer',\n },\n})\nexport class ClickableDirective {\n click = input.required<CommandNodeViewModel>();\n stopPropagation = input<boolean>(false);\n\n handleClick(event: Event) {\n if (this.stopPropagation()) {\n event.stopPropagation();\n }\n log.trace('Click handler executing');\n this.click()\n .execute()\n .catch((error: unknown) => {\n log.error('Click handler failed:', error);\n });\n }\n}\n","import { CommandNodeViewModel } from '@kaskad/component-tree';\nimport { Directive, input } from '@angular/core';\n\n@Directive({\n selector: '[kkFocusable]',\n host: {\n '[tabIndex]': 'tabIndex()',\n '(blur)': 'onBlur()',\n },\n})\nexport class FocusableDirective {\n tabIndex = input<number>(0);\n blur = input<CommandNodeViewModel>();\n\n onBlur() {\n this.blur()?.execute();\n }\n}\n","import { Injectable, Type } from '@angular/core';\n\nimport { ClickableDirective } from './directives/clickable.directive';\nimport { FocusableDirective } from './directives/focusable.directive';\n\ntype LazyComponent = () => Promise<Type<unknown>>;\n\nexport type ComponentEntry =\n | Type<unknown> // eager Angular component\n | LazyComponent // lazy Angular component\n | { directive: Type<unknown> }; // Angular directive\n\n@Injectable({ providedIn: 'root' })\nexport class ComponentRegistry {\n private components: Record<string, ComponentEntry> = {\n default: () => import('./components/default.component').then((m) => m.DefaultComponent),\n\n 'sys.Box': () => import('./components/sys/box.component').then((m) => m.BoxComponent),\n 'sys.Group': () => import('./components/sys/group.component').then((m) => m.GroupComponent),\n 'sys.RefSpace': () => import('./components/sys/ref-space.component').then((m) => m.RefSpaceComponent),\n 'sys.Facade': () => import('./components/sys/facade.component').then((m) => m.FacadeComponent),\n\n 'forms.InputGroup': () => import('./components/forms/input-group.component').then((m) => m.InputGroupComponent),\n 'forms.InputArray': () => import('./components/forms/input-array.component').then((m) => m.InputArrayComponent),\n 'forms.BooleanInputGroup': () =>\n import('./components/forms/boolean-input-group.component').then((m) => m.BooleanInputGroupComponent),\n 'forms.CustomInput': () => import('./components/forms/custom-input.component').then((m) => m.CustomInputComponent),\n\n 'browser.Clickable': { directive: ClickableDirective },\n 'browser.Focusable': { directive: FocusableDirective },\n 'browser.Element': () => import('./components/browser/element.component').then((m) => m.ElementComponent),\n 'browser.Dialog': () => import('./components/browser/dialog.component').then((m) => m.DialogComponent),\n };\n\n setAll(entries: Record<string, ComponentEntry>): void {\n for (const [componentType, component] of Object.entries(entries)) {\n this.set(componentType, component);\n }\n }\n\n set(type: string, component: ComponentEntry): void {\n this.components[type] = component;\n }\n\n get(type: string): ComponentEntry {\n return this.components[type] || this.components['default'];\n }\n\n getAll(): Record<string, ComponentEntry> {\n return this.components;\n }\n}\n\nexport function isLazyComponent(entry: ComponentEntry): entry is LazyComponent {\n return typeof entry === 'function' && !/^class\\s/.test(Function.prototype.toString.call(entry));\n}\n","import { AbstractNode } from '@kaskad/component-tree';\nimport { ComponentId } from '@kaskad/core';\nimport { ValueType } from '@kaskad/types';\nimport { Type } from '@angular/core';\n\nimport type { ComponentEntry } from './component-registry';\n\nexport function isDirective(entry: ComponentEntry): entry is { directive: Type<unknown> } {\n return typeof entry === 'object' && entry !== null && 'directive' in entry;\n}\n\nexport function prepareValueToRender(node: AbstractNode<ValueType>) {\n // Filter out empty component IDs\n if (node.valueType.type === 'array' && node.valueType.item.type === 'component') {\n return (node.viewModel as ComponentId[]).filter(Boolean);\n }\n\n return node.viewModel;\n}\n","import { ComponentId, componentInstanceMap, ComponentStore, TComponent } from '@kaskad/core';\nimport { IReactionOptions, IReactionPublic, reaction } from 'mobx';\nimport {\n Binding,\n ComponentRef,\n createComponent,\n DestroyRef,\n Directive,\n effect,\n EnvironmentInjector,\n inject,\n Injector,\n input,\n inputBinding,\n model,\n NgZone,\n signal,\n Type,\n ViewContainerRef,\n} from '@angular/core';\n\nimport { ComponentRegistry, isLazyComponent } from './component-registry';\nimport { KComponent } from './types';\nimport { isDirective, prepareValueToRender } from './util';\n\n@Directive({ selector: '[kkComponentOutlet]' })\nexport class ComponentOutletDirective {\n componentId = model<ComponentId | null>(null, { alias: 'kkComponentOutlet' });\n elementInjector = input<Injector>();\n\n private readonly store = inject(ComponentStore);\n private readonly componentRegistry = inject(ComponentRegistry);\n private readonly vcr = inject(ViewContainerRef);\n private readonly destroyRef = inject(DestroyRef);\n private readonly ngZone = inject(NgZone);\n private readonly environmentInjector = inject(EnvironmentInjector);\n\n private disposers: Array<() => void> = [];\n private componentRef: ComponentRef<unknown> | null = null;\n\n constructor() {\n effect(() => {\n const id = this.componentId();\n if (!id) {\n this.clear();\n return;\n }\n\n this.ngZone.runOutsideAngular(() => {\n const rootComponent = this.store.getComponent(id);\n if (rootComponent) {\n this.renderComponent(rootComponent);\n }\n });\n });\n\n this.destroyRef.onDestroy(() => this.clear());\n }\n\n private renderComponent(component: TComponent): void {\n const { finalComponent, directives } = this.collectDirectives(component);\n\n // Clear any existing component\n if (this.componentRef) {\n this.vcr.clear();\n this.componentRef = null;\n }\n\n // Create new component\n this.componentRef = this.createComponent(finalComponent, directives);\n }\n\n private collectDirectives(component: TComponent): { finalComponent: TComponent; directives: TComponent[] } {\n const directives: TComponent[] = [];\n let current = component;\n\n while (isDirective(this.componentRegistry.get(current.componentType))) {\n directives.push(current);\n const contentId = current.getNodeValue<ComponentId>('content');\n if (!contentId) break;\n\n const contentComponent = this.store.getComponent(contentId);\n if (!contentComponent) break;\n\n current = contentComponent;\n }\n\n return { finalComponent: current, directives };\n }\n\n private createComponent(model: TComponent, directives: TComponent[] = []): ComponentRef<unknown> | null {\n const entry = this.componentRegistry.get(model.componentType);\n\n // All components should be preloaded at this point\n if (isLazyComponent(entry)) {\n throw new Error(`Component \"${model.componentType}\" is not preloaded. This is a bug in the preloading logic.`);\n }\n\n return this.mapComponentToAngular(entry as Type<KComponent>, model, directives);\n }\n\n private mapComponentToAngular(\n componentType: Type<KComponent>,\n model: TComponent,\n directives: TComponent[] = [],\n ): ComponentRef<unknown> {\n const directivesWithBindings = directives.map((d) => {\n const entry = this.componentRegistry.get(d.componentType) as { directive: Type<unknown> };\n const bindings = this.createDirectiveBindings(d);\n return { type: entry.directive, bindings };\n });\n\n // Build reactive inputs\n const bindings = this.createPropsBindings(model);\n\n const elementInjector =\n this.elementInjector() ??\n Injector.create({\n providers: [{ provide: ComponentOutletDirective, useValue: this }],\n parent: this.vcr.injector,\n });\n\n const compRef = createComponent(componentType, {\n environmentInjector: this.environmentInjector,\n elementInjector,\n directives: directivesWithBindings,\n bindings,\n });\n\n this.vcr.insert(compRef.hostView);\n\n // Bookkeeping\n componentInstanceMap.set(model.id, compRef.instance);\n compRef.onDestroy(() => componentInstanceMap.delete(model.id));\n\n // Input & metadata wiring\n compRef.location.nativeElement.setAttribute('data-component-id', model.id);\n compRef.location.nativeElement.setAttribute('data-component-scope-id', model.refSpaceId);\n\n return compRef;\n }\n\n private createPropsBindings(model: TComponent): Binding[] {\n const bindings: Binding[] = [];\n\n for (const [key, node] of model.props.entries()) {\n const s = signal(prepareValueToRender(node));\n bindings.push(inputBinding(key, s));\n\n this.addReaction(\n () => node.extractedValue,\n () => s.set(prepareValueToRender(node)),\n );\n }\n\n return bindings;\n }\n\n private createDirectiveBindings(model: TComponent): Binding[] {\n const bindings: Binding[] = [];\n\n for (const [propName, node] of model.props.entries()) {\n if (propName === 'content') continue;\n\n const directiveSignal = signal(prepareValueToRender(node));\n\n this.addReaction(\n () => node.extractedValue,\n () => directiveSignal.set(prepareValueToRender(node)),\n );\n\n bindings.push(inputBinding(propName, directiveSignal));\n }\n return bindings;\n }\n\n private clear(): void {\n this.vcr.clear();\n this.componentRef = null;\n this.disposeReactions();\n }\n\n private addReaction<T>(\n trackFn: (r: IReactionPublic) => T,\n effectFn: (value: T, prevValue?: T) => void,\n options?: IReactionOptions<T, true>,\n ): void {\n const disposer = reaction(trackFn, effectFn, options);\n this.disposers.push(disposer);\n }\n\n private disposeReactions(): void {\n this.disposers.forEach((dispose) => dispose());\n this.disposers = [];\n }\n}\n","import { ComponentTreeApi } from '@kaskad/component-tree';\nimport { log } from '@kaskad/config';\nimport { templateRegistry, unfoldNodeSchema } from '@kaskad/schema';\nimport { ComponentId, NodeSchema } from '@kaskad/types';\nimport { comparer, IReactionDisposer, IReactionOptions, IReactionPublic, reaction } from 'mobx';\nimport {\n DestroyRef,\n effect,\n inject,\n Injectable,\n Injector,\n isSignal,\n runInInjectionContext,\n Signal,\n WritableSignal,\n} from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class SignalKaskadSync {\n private injector = inject(Injector);\n private destroyRef = inject(DestroyRef);\n\n public run(rootId: ComponentId, templateUrl: string, props: Signal<Record<string, unknown>>) {\n const writableSignals = Object.entries(props()).filter(([, v]) => isSignal(v)) as [\n string,\n WritableSignal<unknown>,\n ][];\n if (!writableSignals.length) {\n return; // nothing to bind\n }\n\n const template = templateRegistry.get(templateUrl);\n if (!template) {\n log.error('failed to setup two-way binding, unable to find template in registry', templateUrl);\n return;\n }\n\n const component = ComponentTreeApi.findComponent(rootId, ':' + template.recipe.componentType);\n if (!component) {\n log.error(\n 'failed to setup two-way binding, unable to find root schema component:',\n template.recipe.componentType,\n );\n return;\n }\n\n const disposers: IReactionDisposer[] = [];\n for (const [key, signal] of writableSignals) {\n const contract = template.recipe['contract'] as Record<string, string> | undefined;\n const entry = contract?.[key];\n if (!entry) {\n log.warn(`unable to find contract entry for signal \"${key}\" in template ${templateUrl}`);\n continue;\n }\n\n const node = component.getNode(entry);\n const schema = unfoldNodeSchema(signal(), node.valueType, node.position.path);\n if (this.hasComponentOrComputation(schema)) {\n log.warn(`skipping signal/kaskad sync for \"${key}\" as it contains component or computation schema`);\n continue;\n }\n\n // mobx to signal\n const disposer = this.addReaction(\n () => component.getNode(entry).extractedValue,\n (v) => signal.set(v),\n { equals: comparer.structural },\n );\n\n disposers.push(disposer);\n\n // signal to mobx\n runInInjectionContext(this.injector, () => {\n let firstRun = true;\n effect(() => {\n const signalValue = signal();\n\n // skip first run as it's already handled by mobx\n if (firstRun) {\n firstRun = false;\n return;\n }\n\n ComponentTreeApi.setNodeRawSchema(component.id, entry, signalValue);\n });\n });\n }\n\n this.destroyRef.onDestroy(() => {\n disposers.forEach((dispose) => dispose());\n });\n }\n\n private addReaction<T>(\n trackFn: (r: IReactionPublic) => T,\n effectFn: (value: T, prevValue?: T) => void,\n options?: IReactionOptions<T, boolean>,\n ): IReactionDisposer {\n return reaction(trackFn, effectFn, options);\n }\n\n private hasComponentOrComputation(schema: NodeSchema): boolean {\n if (schema.valueType.type === 'component' || schema.computation !== null) {\n return true;\n }\n\n if (!schema.value) {\n return false;\n }\n\n if (schema.valueType.type === 'object') {\n const objectValue = schema.value as Record<string, NodeSchema>;\n for (const childSchema of Object.values(objectValue || {})) {\n if (this.hasComponentOrComputation(childSchema)) {\n return true;\n }\n }\n }\n if (schema.valueType.type === 'array') {\n const arrayValue = schema.value as NodeSchema[];\n for (const childSchema of arrayValue || []) {\n if (this.hasComponentOrComputation(childSchema)) {\n return true;\n }\n }\n }\n if (schema.valueType.type === 'map') {\n const mapValue = schema.value as Record<string, NodeSchema>;\n for (const childSchema of Object.values(mapValue || {})) {\n if (this.hasComponentOrComputation(childSchema)) {\n return true;\n }\n }\n }\n\n return false;\n }\n}\n","import {\n activateNode,\n ComponentId,\n ComponentRecipe,\n ComponentStore,\n createRootNode,\n unfoldNodeSchema,\n} from '@kaskad/core';\nimport { loadTemplates, templateRegistry } from '@kaskad/schema';\nimport { computed, DestroyRef, Directive, effect, inject, input, isSignal, untracked } from '@angular/core';\n\nimport { ComponentOutletDirective } from './component-outlet.directive';\nimport { ComponentRegistry, isLazyComponent } from './component-registry';\nimport { SignalKaskadSync } from './signal-kaskad-sync';\nimport { isDirective } from './util';\n\n@Directive({\n selector: '[kkViewOutlet]',\n exportAs: 'outlet',\n hostDirectives: [\n {\n directive: ComponentOutletDirective,\n inputs: ['elementInjector'],\n },\n ],\n})\nexport class ViewOutletDirective {\n static counter = 0;\n src = input.required<string>({ alias: 'kkViewOutlet' });\n props = input<Record<string, unknown>>({});\n refSpaceId = computed(() => this.src() + '-' + ViewOutletDirective.counter++);\n rawSchema = computed<ComponentRecipe>(() => {\n const content: Record<string, unknown> = {\n templateUrl: this.src(),\n };\n\n untracked(() => {\n for (const [key, value] of Object.entries(this.props())) {\n content[key] = isSignal(value) ? untracked(() => value()) : value;\n }\n });\n\n return {\n componentType: 'sys.Facade',\n content,\n };\n });\n private destroyRef = inject(DestroyRef);\n private store = inject(ComponentStore);\n private componentOutlet = inject(ComponentOutletDirective);\n private componentRegistry = inject(ComponentRegistry);\n private signalKaskadSync = inject(SignalKaskadSync);\n private currentComponentId: ComponentId | null = null;\n\n constructor() {\n effect(() => this.processRawSchema(this.rawSchema()));\n\n this.destroyRef.onDestroy(() => {\n if (this.currentComponentId) {\n this.store.removeComponent(this.currentComponentId);\n }\n });\n }\n\n private async processRawSchema(rawSchema: ComponentRecipe) {\n await this.preloadComponentTypes(new Set<string>(['sys.Box', 'sys.Group', 'sys.RefSpace', 'sys.Facade']));\n\n await loadTemplates(rawSchema);\n\n const componentTypes = templateRegistry.getAggregatedComponentTypes(this.src());\n await this.preloadComponentTypes(componentTypes);\n\n const schema = unfoldNodeSchema(rawSchema, { type: 'component' });\n const root = createRootNode(this.refSpaceId(), schema, null, null, this.src());\n\n activateNode(root);\n\n const rootId = root.extractedValue as ComponentId;\n\n // Clean up previous component if schema changes\n if (this.currentComponentId && this.currentComponentId !== rootId) {\n this.store.removeComponent(this.currentComponentId);\n }\n\n this.currentComponentId = rootId;\n\n this.signalKaskadSync.run(rootId, this.src(), this.props);\n this.componentOutlet.componentId.set(rootId);\n }\n\n private async preloadComponentTypes(componentTypes: Set<string>): Promise<void> {\n const promises: Promise<void>[] = [];\n\n for (const componentType of componentTypes) {\n const entry = this.componentRegistry.get(componentType);\n\n // Skip directive (?)\n if (isDirective(entry)) {\n continue;\n }\n\n // Only preload if it's still lazy\n if (isLazyComponent(entry)) {\n promises.push(\n entry().then((component) => {\n // Replace lazy entry with loaded component in registry\n this.componentRegistry.set(componentType, component);\n }),\n );\n }\n }\n\n if (promises.length > 0) {\n await Promise.all(promises);\n }\n }\n}\n","import { log, LogLevel } from '@kaskad/config';\nimport { ComponentStore, DefinitionStore } from '@kaskad/core';\nimport { EnvironmentProviders, inject, makeEnvironmentProviders, provideEnvironmentInitializer } from '@angular/core';\n\nexport function provideKaskad(config?: { logLevel?: LogLevel }): EnvironmentProviders {\n return makeEnvironmentProviders([\n { provide: ComponentStore, useValue: ComponentStore.getInstance() },\n { provide: DefinitionStore, useValue: DefinitionStore.getInstance() },\n\n provideEnvironmentInitializer(() => {\n if (config?.logLevel) {\n log.level = config.logLevel;\n }\n\n const store = inject(ComponentStore);\n const defStore = inject(DefinitionStore);\n\n // Expose stores globally for debugging\n if (typeof window !== 'undefined') {\n const global = window as Window & { store?: ComponentStore; defStore?: DefinitionStore };\n global.store = store;\n global.defStore = defStore;\n }\n }),\n ]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["unfoldNodeSchema","i1.ComponentOutletDirective"],"mappings":";;;;;;;;MAWa,kBAAkB,CAAA;AAC7B,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,gDAAwB;AAC9C,IAAA,eAAe,GAAG,KAAK,CAAU,KAAK,2DAAC;AAEvC,IAAA,WAAW,CAAC,KAAY,EAAA;AACtB,QAAA,IAAI,IAAI,CAAC,eAAe,EAAE,EAAE;YAC1B,KAAK,CAAC,eAAe,EAAE;;AAEzB,QAAA,GAAG,CAAC,KAAK,CAAC,yBAAyB,CAAC;QACpC,IAAI,CAAC,KAAK;AACP,aAAA,OAAO;AACP,aAAA,KAAK,CAAC,CAAC,KAAc,KAAI;AACxB,YAAA,GAAG,CAAC,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC;AAC3C,SAAC,CAAC;;uGAbK,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,eAAA,EAAA,EAAA,iBAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA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AC;QAC9B,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,CAAC,WAAW,EAAE,EAAE;QACnE,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,eAAe,CAAC,WAAW,EAAE,EAAE;QAErE,6BAA6B,CAAC,MAAK;AACjC,YAAA,IAAI,MAAM,EAAE,QAAQ,EAAE;AACpB,gBAAA,GAAG,CAAC,KAAK,GAAG,MAAM,CAAC,QAAQ;;AAG7B,YAAA,MAAM,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AACpC,YAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,eAAe,CAAC;;AAGxC,YAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;gBACjC,MAAM,MAAM,GAAG,MAAyE;AACxF,gBAAA,MAAM,CAAC,KAAK,GAAG,KAAK;AACpB,gBAAA,MAAM,CAAC,QAAQ,GAAG,QAAQ;;AAE9B,SAAC,CAAC;AACH,KAAA,CAAC;AACJ;;ACzBA;;AAEG;;;;"}
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@kaskad/angular",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/core": "21.1.3",
6
+ "@angular/platform-browser": "21.1.3",
7
+ "@kaskad/config": "0.0.1",
8
+ "@kaskad/core": "0.0.1",
9
+ "mobx": "^6.13.7",
10
+ "@kaskad/types": "0.0.1",
11
+ "@kaskad/component-tree": "0.0.1",
12
+ "@kaskad/schema": "0.0.1",
13
+ "@analogjs/vite-plugin-angular": "2.1.3"
14
+ },
15
+ "sideEffects": false,
16
+ "module": "fesm2022/kaskad-angular.mjs",
17
+ "typings": "types/kaskad-angular.d.ts",
18
+ "exports": {
19
+ "./package.json": {
20
+ "default": "./package.json"
21
+ },
22
+ ".": {
23
+ "types": "./types/kaskad-angular.d.ts",
24
+ "default": "./fesm2022/kaskad-angular.mjs"
25
+ }
26
+ },
27
+ "dependencies": {
28
+ "tslib": "^2.3.0"
29
+ }
30
+ }
@@ -0,0 +1,74 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { Injector, Type, Signal, EnvironmentProviders } from '@angular/core';
3
+ import { ComponentRecipe } from '@kaskad/core';
4
+ import { LogLevel } from '@kaskad/config';
5
+
6
+ declare class ComponentOutletDirective {
7
+ componentId: _angular_core.ModelSignal<string | null>;
8
+ elementInjector: _angular_core.InputSignal<Injector | undefined>;
9
+ private readonly store;
10
+ private readonly componentRegistry;
11
+ private readonly vcr;
12
+ private readonly destroyRef;
13
+ private readonly ngZone;
14
+ private readonly environmentInjector;
15
+ private disposers;
16
+ private componentRef;
17
+ constructor();
18
+ private renderComponent;
19
+ private collectDirectives;
20
+ private createComponent;
21
+ private mapComponentToAngular;
22
+ private createPropsBindings;
23
+ private createDirectiveBindings;
24
+ private clear;
25
+ private addReaction;
26
+ private disposeReactions;
27
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComponentOutletDirective, never>;
28
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ComponentOutletDirective, "[kkComponentOutlet]", never, { "componentId": { "alias": "kkComponentOutlet"; "required": false; "isSignal": true; }; "elementInjector": { "alias": "elementInjector"; "required": false; "isSignal": true; }; }, { "componentId": "kkComponentOutletChange"; }, never, never, true, never>;
29
+ }
30
+
31
+ declare class ViewOutletDirective {
32
+ static counter: number;
33
+ src: _angular_core.InputSignal<string>;
34
+ props: _angular_core.InputSignal<Record<string, unknown>>;
35
+ refSpaceId: _angular_core.Signal<string>;
36
+ rawSchema: _angular_core.Signal<ComponentRecipe>;
37
+ private destroyRef;
38
+ private store;
39
+ private componentOutlet;
40
+ private componentRegistry;
41
+ private signalKaskadSync;
42
+ private currentComponentId;
43
+ constructor();
44
+ private processRawSchema;
45
+ private preloadComponentTypes;
46
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ViewOutletDirective, never>;
47
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ViewOutletDirective, "[kkViewOutlet]", ["outlet"], { "src": { "alias": "kkViewOutlet"; "required": true; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof ComponentOutletDirective; inputs: { "elementInjector": "elementInjector"; }; outputs: {}; }]>;
48
+ }
49
+
50
+ type LazyComponent = () => Promise<Type<unknown>>;
51
+ type ComponentEntry = Type<unknown> | LazyComponent | {
52
+ directive: Type<unknown>;
53
+ };
54
+ declare class ComponentRegistry {
55
+ private components;
56
+ setAll(entries: Record<string, ComponentEntry>): void;
57
+ set(type: string, component: ComponentEntry): void;
58
+ get(type: string): ComponentEntry;
59
+ getAll(): Record<string, ComponentEntry>;
60
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComponentRegistry, never>;
61
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ComponentRegistry>;
62
+ }
63
+ declare function isLazyComponent(entry: ComponentEntry): entry is LazyComponent;
64
+
65
+ interface KComponent {
66
+ [x: string]: Signal<unknown>;
67
+ }
68
+
69
+ declare function provideKaskad(config?: {
70
+ logLevel?: LogLevel;
71
+ }): EnvironmentProviders;
72
+
73
+ export { ComponentOutletDirective, ComponentRegistry, ViewOutletDirective, isLazyComponent, provideKaskad };
74
+ export type { ComponentEntry, KComponent };