@kominal/common-angular 0.0.1 → 0.0.2

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.
@@ -1,33 +1,31 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Component } from '@angular/core';
2
+ import { input, Component } from '@angular/core';
3
+ import * as i2 from '@angular/forms';
4
+ import { ReactiveFormsModule } from '@angular/forms';
5
+ import * as i1 from 'primeng/inputtext';
6
+ import { InputTextModule } from 'primeng/inputtext';
7
+ import { TranslatePipe } from '@ngx-translate/core';
3
8
 
4
- class CommonAngularService {
5
- constructor() { }
6
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: CommonAngularService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: CommonAngularService, providedIn: 'root' });
9
+ class LabelComponent {
10
+ label = input.required();
11
+ formElement = input.required();
12
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
13
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.10", type: LabelComponent, isStandalone: true, selector: "app-label", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, formElement: { classPropertyName: "formElement", publicName: "formElement", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<span>{{ label() | translate }}</span>\r\n", dependencies: [{ kind: "pipe", type: TranslatePipe, name: "translate" }] });
8
14
  }
9
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: CommonAngularService, decorators: [{
10
- type: Injectable,
11
- args: [{
12
- providedIn: 'root'
13
- }]
14
- }], ctorParameters: () => [] });
15
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LabelComponent, decorators: [{
16
+ type: Component,
17
+ args: [{ selector: 'app-label', imports: [TranslatePipe], template: "<span>{{ label() | translate }}</span>\r\n" }]
18
+ }] });
15
19
 
16
- class CommonAngularComponent {
17
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: CommonAngularComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
18
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.10", type: CommonAngularComponent, isStandalone: true, selector: "lib-common-angular", ngImport: i0, template: `
19
- <p>
20
- common-angular works!
21
- </p>
22
- `, isInline: true, styles: [""] });
20
+ class InputTextComponent {
21
+ label = input.required();
22
+ formElement = input.required();
23
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: InputTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
24
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.10", type: InputTextComponent, isStandalone: true, selector: "app-input-text", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, formElement: { classPropertyName: "formElement", publicName: "formElement", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "flex flex-col gap-1 w-full" }, ngImport: i0, template: "<app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n<input pInputText [formControl]=\"formElement()\" />\r\n", dependencies: [{ kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i1.InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: LabelComponent, selector: "app-label", inputs: ["label", "formElement"] }] });
23
25
  }
24
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: CommonAngularComponent, decorators: [{
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: InputTextComponent, decorators: [{
25
27
  type: Component,
26
- args: [{ selector: 'lib-common-angular', imports: [], template: `
27
- <p>
28
- common-angular works!
29
- </p>
30
- ` }]
28
+ args: [{ selector: 'app-input-text', imports: [InputTextModule, ReactiveFormsModule, LabelComponent], host: { class: 'flex flex-col gap-1 w-full' }, template: "<app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n<input pInputText [formControl]=\"formElement()\" />\r\n" }]
31
29
  }] });
32
30
 
33
31
  /*
@@ -38,5 +36,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
38
36
  * Generated bundle index. Do not edit.
39
37
  */
40
38
 
41
- export { CommonAngularComponent, CommonAngularService };
39
+ export { InputTextComponent };
42
40
  //# sourceMappingURL=kominal-common-angular.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"kominal-common-angular.mjs","sources":["../../../projects/common-angular/src/lib/common-angular.service.ts","../../../projects/common-angular/src/lib/common-angular.component.ts","../../../projects/common-angular/src/public-api.ts","../../../projects/common-angular/src/kominal-common-angular.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CommonAngularService {\r\n\r\n constructor() { }\r\n}\r\n","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'lib-common-angular',\r\n imports: [],\r\n template: `\r\n <p>\r\n common-angular works!\r\n </p>\r\n `,\r\n styles: ``\r\n})\r\nexport class CommonAngularComponent {\r\n\r\n}\r\n","/*\r\n * Public API Surface of common-angular\r\n */\r\n\r\nexport * from './lib/common-angular.service';\r\nexport * from './lib/common-angular.component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAKa,oBAAoB,CAAA;AAE/B,IAAA,WAAA,GAAA;wGAFW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAApB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,cAFnB,MAAM,EAAA,CAAA;;4FAEP,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAHhC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;MCQY,sBAAsB,CAAA;wGAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAtB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,sBAAsB,EAPvB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAGU,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAVlC,SAAS;+BACE,oBAAoB,EAAA,OAAA,EACrB,EAAE,EACD,QAAA,EAAA,CAAA;;;;AAIT,EAAA,CAAA,EAAA;;;ACTH;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"kominal-common-angular.mjs","sources":["../../../projects/common-angular/src/lib/label/label.component.ts","../../../projects/common-angular/src/lib/label/label.component.html","../../../projects/common-angular/src/lib/input-text/input-text.component.ts","../../../projects/common-angular/src/lib/input-text/input-text.component.html","../../../projects/common-angular/src/public-api.ts","../../../projects/common-angular/src/kominal-common-angular.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\r\nimport { AbstractControl } from '@angular/forms';\r\nimport { TranslatePipe } from '@ngx-translate/core';\r\n\r\n@Component({\r\n selector: 'app-label',\r\n imports: [TranslatePipe],\r\n templateUrl: './label.component.html',\r\n})\r\nexport class LabelComponent {\r\n public label = input.required<string>();\r\n public formElement = input.required<AbstractControl>();\r\n}\r\n","<span>{{ label() | translate }}</span>\r\n","import { Component, input } from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { InputTextModule } from 'primeng/inputtext';\r\nimport { LabelComponent } from '../label/label.component';\r\n\r\n@Component({\r\n selector: 'app-input-text',\r\n imports: [InputTextModule, ReactiveFormsModule, LabelComponent],\r\n templateUrl: './input-text.component.html',\r\n host: { class: 'flex flex-col gap-1 w-full' },\r\n})\r\nexport class InputTextComponent {\r\n public label = input.required<string>();\r\n public formElement = input.required<FormControl<string>>();\r\n}\r\n","<app-label [label]=\"label()\" [formElement]=\"formElement()\" />\r\n<input pInputText [formControl]=\"formElement()\" />\r\n","/*\r\n * Public API Surface of common-angular\r\n */\r\n\r\nexport * from './lib/input-text/input-text.component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MASa,cAAc,CAAA;AAClB,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAU;AAChC,IAAA,WAAW,GAAG,KAAK,CAAC,QAAQ,EAAmB;wGAF3C,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAA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AA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,OAAA,EAAA,OAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,mBAAmB,0kBAAE,cAAc,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,aAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAInD,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAN9B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,EACjB,OAAA,EAAA,CAAC,eAAe,EAAE,mBAAmB,EAAE,cAAc,CAAC,EAEzD,IAAA,EAAA,EAAE,KAAK,EAAE,4BAA4B,EAAE,EAAA,QAAA,EAAA,+HAAA,EAAA;;;AET/C;;AAEG;;ACFH;;AAEG;;;;"}
@@ -0,0 +1,8 @@
1
+ import { FormControl } from '@angular/forms';
2
+ import * as i0 from "@angular/core";
3
+ export declare class InputTextComponent {
4
+ label: import("@angular/core").InputSignal<string>;
5
+ formElement: import("@angular/core").InputSignal<FormControl<string>>;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputTextComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputTextComponent, "app-input-text", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "formElement": { "alias": "formElement"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
8
+ }
@@ -0,0 +1,8 @@
1
+ import { AbstractControl } from '@angular/forms';
2
+ import * as i0 from "@angular/core";
3
+ export declare class LabelComponent {
4
+ label: import("@angular/core").InputSignal<string>;
5
+ formElement: import("@angular/core").InputSignal<AbstractControl<any, any>>;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<LabelComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<LabelComponent, "app-label", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "formElement": { "alias": "formElement"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
8
+ }
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "@kominal/common-angular",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.0",
6
- "@angular/core": "^19.2.0"
6
+ "@angular/core": "^19.2.0",
7
+ "@ngx-translate/core": "^16.0.4",
8
+ "primeng": "^19.1.2"
7
9
  },
8
10
  "dependencies": {
9
11
  "tslib": "^2.3.0"
package/public-api.d.ts CHANGED
@@ -1,2 +1 @@
1
- export * from './lib/common-angular.service';
2
- export * from './lib/common-angular.component';
1
+ export * from './lib/input-text/input-text.component';
@@ -1,5 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class CommonAngularComponent {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<CommonAngularComponent, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<CommonAngularComponent, "lib-common-angular", never, {}, {}, never, never, true, never>;
5
- }
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class CommonAngularService {
3
- constructor();
4
- static ɵfac: i0.ɵɵFactoryDeclaration<CommonAngularService, never>;
5
- static ɵprov: i0.ɵɵInjectableDeclaration<CommonAngularService>;
6
- }