ngx-st-qty-input 1.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.
package/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # NgxStQtyInput
2
+
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.0.
4
+
5
+ ## Code scaffolding
6
+
7
+ Run `ng generate component component-name --project ngx-st-qty-input` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ngx-st-qty-input`.
8
+ > Note: Don't forget to add `--project ngx-st-qty-input` or else it will be added to the default project in your `angular.json` file.
9
+
10
+ ## Build
11
+
12
+ Run `ng build ngx-st-qty-input` to build the project. The build artifacts will be stored in the `dist/` directory.
13
+
14
+ ## Publishing
15
+
16
+ After building your library with `ng build ngx-st-qty-input`, go to the dist folder `cd dist/ngx-st-qty-input` and run `npm publish`.
17
+
18
+ ## Running unit tests
19
+
20
+ Run `ng test ngx-st-qty-input` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
+
22
+ ## Further help
23
+
24
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
@@ -0,0 +1,39 @@
1
+ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ import * as i1 from "@angular/forms";
4
+ import * as i2 from "@angular/material/button";
5
+ import * as i3 from "@angular/material/form-field";
6
+ import * as i4 from "@angular/material/input";
7
+ import * as i5 from "@angular/material/icon";
8
+ export class QtyInputComponent {
9
+ constructor(changeDetectorRef) {
10
+ this.changeDetectorRef = changeDetectorRef;
11
+ this.newValueEmitter = new EventEmitter();
12
+ }
13
+ ngOnInit() {
14
+ }
15
+ removeClicked() {
16
+ this.qtyModel -= 1;
17
+ this.newValueEmitter.emit(this.qtyModel);
18
+ this.changeDetectorRef.markForCheck();
19
+ }
20
+ addClicked() {
21
+ this.qtyModel += 1;
22
+ this.newValueEmitter.emit(this.qtyModel);
23
+ this.changeDetectorRef.markForCheck();
24
+ }
25
+ qtyModelChanged() {
26
+ this.newValueEmitter.emit(this.qtyModel);
27
+ }
28
+ }
29
+ QtyInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QtyInputComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
30
+ QtyInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: QtyInputComponent, selector: "ngx-st-qty-input", inputs: { qtyModel: "qtyModel" }, outputs: { newValueEmitter: "newValueEmitter" }, ngImport: i0, template: "<div class=\"row st-qty-input\">\r\n <div class=\"col-auto\">\r\n <button mat-icon-button color=\"warn\" (click)=\"removeClicked()\">\r\n <mat-icon>remove</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"col\">\r\n <mat-form-field>\r\n <input\r\n matInput\r\n type=\"number\"\r\n [(ngModel)]=\"qtyModel\"\r\n (ngModelChange)=\"qtyModelChanged()\"\r\n style=\"text-align: right\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-auto\">\r\n <button mat-icon-button color=\"accent\" (click)=\"addClicked()\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.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: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QtyInputComponent, decorators: [{
32
+ type: Component,
33
+ args: [{ selector: 'ngx-st-qty-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"row st-qty-input\">\r\n <div class=\"col-auto\">\r\n <button mat-icon-button color=\"warn\" (click)=\"removeClicked()\">\r\n <mat-icon>remove</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"col\">\r\n <mat-form-field>\r\n <input\r\n matInput\r\n type=\"number\"\r\n [(ngModel)]=\"qtyModel\"\r\n (ngModelChange)=\"qtyModelChanged()\"\r\n style=\"text-align: right\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-auto\">\r\n <button mat-icon-button color=\"accent\" (click)=\"addClicked()\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n </div>\r\n</div>\r\n" }]
34
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { qtyModel: [{
35
+ type: Input
36
+ }], newValueEmitter: [{
37
+ type: Output
38
+ }] } });
39
+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0XHJcbiAgICAgICAgICAgICAgICBtYXRJbnB1dFxyXG4gICAgICAgICAgICAgICAgdHlwZT1cIm51bWJlclwiXHJcbiAgICAgICAgICAgICAgICBbKG5nTW9kZWwpXT1cInF0eU1vZGVsXCJcclxuICAgICAgICAgICAgICAgIChuZ01vZGVsQ2hhbmdlKT1cInF0eU1vZGVsQ2hhbmdlZCgpXCJcclxuICAgICAgICAgICAgICAgIHN0eWxlPVwidGV4dC1hbGlnbjogcmlnaHRcIlxyXG4gICAgICAgICAgICAvPlxyXG4gICAgICAgIDwvbWF0LWZvcm0tZmllbGQ+XHJcbiAgICA8L2Rpdj5cclxuICAgIDxkaXYgY2xhc3M9XCJjb2wtYXV0b1wiPlxyXG4gICAgICAgIDxidXR0b24gbWF0LWljb24tYnV0dG9uIGNvbG9yPVwiYWNjZW50XCIgKGNsaWNrKT1cImFkZENsaWNrZWQoKVwiPlxyXG4gICAgICAgICAgICA8bWF0LWljb24+YWRkPC9tYXQtaWNvbj5cclxuICAgICAgICA8L2J1dHRvbj5cclxuICAgIDwvZGl2PlxyXG48L2Rpdj5cclxuIl19
@@ -0,0 +1,43 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { QtyInputComponent } from './components/qty-input.component';
3
+ import { CommonModule } from "@angular/common";
4
+ import { FormsModule, ReactiveFormsModule } from "@angular/forms";
5
+ import { MatButtonModule } from "@angular/material/button";
6
+ import { MatInputModule } from "@angular/material/input";
7
+ import { MatIconModule } from "@angular/material/icon";
8
+ import * as i0 from "@angular/core";
9
+ export class StQtyInputModule {
10
+ }
11
+ StQtyInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StQtyInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
12
+ StQtyInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: StQtyInputModule, declarations: [QtyInputComponent], imports: [CommonModule,
13
+ FormsModule,
14
+ ReactiveFormsModule,
15
+ MatButtonModule,
16
+ MatInputModule,
17
+ MatIconModule], exports: [QtyInputComponent] });
18
+ StQtyInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StQtyInputModule, imports: [CommonModule,
19
+ FormsModule,
20
+ ReactiveFormsModule,
21
+ MatButtonModule,
22
+ MatInputModule,
23
+ MatIconModule] });
24
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StQtyInputModule, decorators: [{
25
+ type: NgModule,
26
+ args: [{
27
+ declarations: [
28
+ QtyInputComponent
29
+ ],
30
+ imports: [
31
+ CommonModule,
32
+ FormsModule,
33
+ ReactiveFormsModule,
34
+ MatButtonModule,
35
+ MatInputModule,
36
+ MatIconModule
37
+ ],
38
+ exports: [
39
+ QtyInputComponent
40
+ ]
41
+ }]
42
+ }] });
43
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3QtcXR5LWlucHV0Lm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1zdC1xdHktaW5wdXQvc3JjL2xpYi9zdC1xdHktaW5wdXQubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sa0NBQWtDLENBQUM7QUFDckUsT0FBTyxFQUFDLFlBQVksRUFBQyxNQUFNLGlCQUFpQixDQUFDO0FBQzdDLE9BQU8sRUFBQyxXQUFXLEVBQUUsbUJBQW1CLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQztBQUNoRSxPQUFPLEVBQUMsZUFBZSxFQUFDLE1BQU0sMEJBQTBCLENBQUM7QUFDekQsT0FBTyxF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XRlcmlhbC9idXR0b25cIjtcbmltcG9ydCB7TWF0SW5wdXRNb2R1bGV9IGZyb20gXCJAYW5ndWxhci9tYXRlcmlhbC9pbnB1dFwiO1xuaW1wb3J0IHtNYXRJY29uTW9kdWxlfSBmcm9tIFwiQGFuZ3VsYXIvbWF0ZXJpYWwvaWNvblwiO1xuXG5ATmdNb2R1bGUoe1xuICBkZWNsYXJhdGlvbnM6IFtcbiAgICBRdHlJbnB1dENvbXBvbmVudFxuICBdLFxuICBpbXBvcnRzOiBbXG4gICAgICBDb21tb25Nb2R1bGUsXG4gICAgICBGb3Jtc01vZHVsZSxcbiAgICAgIFJlYWN0aXZlRm9ybXNNb2R1bGUsXG4gICAgICBNYXRCdXR0b25Nb2R1bGUsXG4gICAgICBNYXRJbnB1dE1vZHVsZSxcbiAgICAgIE1hdEljb25Nb2R1bGVcbiAgXSxcbiAgZXhwb3J0czogW1xuICAgIFF0eUlucHV0Q29tcG9uZW50XG4gIF1cbn0pXG5leHBvcnQgY2xhc3MgU3RRdHlJbnB1dE1vZHVsZSB7IH1cbiJdfQ==
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public-api';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXN0LXF0eS1pbnB1dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL25neC1zdC1xdHktaW5wdXQvc3JjL25neC1zdC1xdHktaW5wdXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
@@ -0,0 +1,6 @@
1
+ /*
2
+ * Public API Surface of ngx-st-qty-input
3
+ */
4
+ export * from './lib/components/qty-input.component';
5
+ export * from './lib/st-qty-input.module';
6
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL25neC1zdC1xdHktaW5wdXQvc3JjL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLHNDQUFzQyxDQUFDO0FBQ3JELGNBQWMsMkJBQTJCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIG5neC1zdC1xdHktaW5wdXRcbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2xpYi9jb21wb25lbnRzL3F0eS1pbnB1dC5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvc3QtcXR5LWlucHV0Lm1vZHVsZSc7XG4iXX0=
@@ -0,0 +1,90 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/forms';
4
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
5
+ import * as i2 from '@angular/material/button';
6
+ import { MatButtonModule } from '@angular/material/button';
7
+ import * as i3 from '@angular/material/form-field';
8
+ import * as i4 from '@angular/material/input';
9
+ import { MatInputModule } from '@angular/material/input';
10
+ import * as i5 from '@angular/material/icon';
11
+ import { MatIconModule } from '@angular/material/icon';
12
+ import { CommonModule } from '@angular/common';
13
+
14
+ class QtyInputComponent {
15
+ constructor(changeDetectorRef) {
16
+ this.changeDetectorRef = changeDetectorRef;
17
+ this.newValueEmitter = new EventEmitter();
18
+ }
19
+ ngOnInit() {
20
+ }
21
+ removeClicked() {
22
+ this.qtyModel -= 1;
23
+ this.newValueEmitter.emit(this.qtyModel);
24
+ this.changeDetectorRef.markForCheck();
25
+ }
26
+ addClicked() {
27
+ this.qtyModel += 1;
28
+ this.newValueEmitter.emit(this.qtyModel);
29
+ this.changeDetectorRef.markForCheck();
30
+ }
31
+ qtyModelChanged() {
32
+ this.newValueEmitter.emit(this.qtyModel);
33
+ }
34
+ }
35
+ QtyInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QtyInputComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
36
+ QtyInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: QtyInputComponent, selector: "ngx-st-qty-input", inputs: { qtyModel: "qtyModel" }, outputs: { newValueEmitter: "newValueEmitter" }, ngImport: i0, template: "<div class=\"row st-qty-input\">\r\n <div class=\"col-auto\">\r\n <button mat-icon-button color=\"warn\" (click)=\"removeClicked()\">\r\n <mat-icon>remove</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"col\">\r\n <mat-form-field>\r\n <input\r\n matInput\r\n type=\"number\"\r\n [(ngModel)]=\"qtyModel\"\r\n (ngModelChange)=\"qtyModelChanged()\"\r\n style=\"text-align: right\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-auto\">\r\n <button mat-icon-button color=\"accent\" (click)=\"addClicked()\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.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: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QtyInputComponent, decorators: [{
38
+ type: Component,
39
+ args: [{ selector: 'ngx-st-qty-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"row st-qty-input\">\r\n <div class=\"col-auto\">\r\n <button mat-icon-button color=\"warn\" (click)=\"removeClicked()\">\r\n <mat-icon>remove</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"col\">\r\n <mat-form-field>\r\n <input\r\n matInput\r\n type=\"number\"\r\n [(ngModel)]=\"qtyModel\"\r\n (ngModelChange)=\"qtyModelChanged()\"\r\n style=\"text-align: right\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-auto\">\r\n <button mat-icon-button color=\"accent\" (click)=\"addClicked()\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n </div>\r\n</div>\r\n" }]
40
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { qtyModel: [{
41
+ type: Input
42
+ }], newValueEmitter: [{
43
+ type: Output
44
+ }] } });
45
+
46
+ class StQtyInputModule {
47
+ }
48
+ StQtyInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StQtyInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
49
+ StQtyInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: StQtyInputModule, declarations: [QtyInputComponent], imports: [CommonModule,
50
+ FormsModule,
51
+ ReactiveFormsModule,
52
+ MatButtonModule,
53
+ MatInputModule,
54
+ MatIconModule], exports: [QtyInputComponent] });
55
+ StQtyInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StQtyInputModule, imports: [CommonModule,
56
+ FormsModule,
57
+ ReactiveFormsModule,
58
+ MatButtonModule,
59
+ MatInputModule,
60
+ MatIconModule] });
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StQtyInputModule, decorators: [{
62
+ type: NgModule,
63
+ args: [{
64
+ declarations: [
65
+ QtyInputComponent
66
+ ],
67
+ imports: [
68
+ CommonModule,
69
+ FormsModule,
70
+ ReactiveFormsModule,
71
+ MatButtonModule,
72
+ MatInputModule,
73
+ MatIconModule
74
+ ],
75
+ exports: [
76
+ QtyInputComponent
77
+ ]
78
+ }]
79
+ }] });
80
+
81
+ /*
82
+ * Public API Surface of ngx-st-qty-input
83
+ */
84
+
85
+ /**
86
+ * Generated bundle index. Do not edit.
87
+ */
88
+
89
+ export { QtyInputComponent, StQtyInputModule };
90
+ //# sourceMappingURL=ngx-st-qty-input.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-st-qty-input.mjs","sources":["../../../projects/ngx-st-qty-input/src/lib/components/qty-input.component.ts","../../../projects/ngx-st-qty-input/src/lib/components/qty-input-component.html","../../../projects/ngx-st-qty-input/src/lib/st-qty-input.module.ts","../../../projects/ngx-st-qty-input/src/public-api.ts","../../../projects/ngx-st-qty-input/src/ngx-st-qty-input.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnInit,\n Output\n} from '@angular/core';\n\n@Component({\n selector: 'ngx-st-qty-input',\n templateUrl: './qty-input-component.html',\n styleUrls: ['./qty-input.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class QtyInputComponent implements OnInit {\n\n @Input()\n qtyModel: number;\n\n @Output()\n newValueEmitter = new EventEmitter<number>();\n\n constructor(\n private changeDetectorRef: ChangeDetectorRef\n ) { }\n\n ngOnInit(): void {\n }\n\n removeClicked() {\n this.qtyModel -= 1;\n this.newValueEmitter.emit(this.qtyModel);\n this.changeDetectorRef.markForCheck();\n }\n\n addClicked() {\n this.qtyModel += 1;\n this.newValueEmitter.emit(this.qtyModel);\n this.changeDetectorRef.markForCheck();\n }\n\n qtyModelChanged() {\n this.newValueEmitter.emit(this.qtyModel);\n }\n}\n","<div class=\"row st-qty-input\">\r\n <div class=\"col-auto\">\r\n <button mat-icon-button color=\"warn\" (click)=\"removeClicked()\">\r\n <mat-icon>remove</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"col\">\r\n <mat-form-field>\r\n <input\r\n matInput\r\n type=\"number\"\r\n [(ngModel)]=\"qtyModel\"\r\n (ngModelChange)=\"qtyModelChanged()\"\r\n style=\"text-align: right\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-auto\">\r\n <button mat-icon-button color=\"accent\" (click)=\"addClicked()\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\nimport { QtyInputComponent } from './components/qty-input.component';\nimport {CommonModule} from \"@angular/common\";\nimport {FormsModule, ReactiveFormsModule} from \"@angular/forms\";\nimport {MatButtonModule} from \"@angular/material/button\";\nimport {MatInputModule} from \"@angular/material/input\";\nimport {MatIconModule} from \"@angular/material/icon\";\n\n@NgModule({\n declarations: [\n QtyInputComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n MatButtonModule,\n MatInputModule,\n MatIconModule\n ],\n exports: [\n QtyInputComponent\n ]\n})\nexport class StQtyInputModule { }\n","/*\n * Public API Surface of ngx-st-qty-input\n */\n\nexport * from './lib/components/qty-input.component';\nexport * from './lib/st-qty-input.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAgBa,iBAAiB,CAAA;AAQ1B,IAAA,WAAA,CACY,iBAAoC,EAAA;AAApC,QAAA,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAmB;AAHhD,QAAA,IAAA,CAAA,eAAe,GAAG,IAAI,YAAY,EAAU,CAAC;KAIxC;IAEL,QAAQ,GAAA;KACP;IAED,aAAa,GAAA;AACT,QAAA,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;QACnB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACzC,QAAA,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,CAAC;KACzC;IAED,UAAU,GAAA;AACN,QAAA,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;QACnB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACzC,QAAA,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,CAAC;KACzC;IAED,eAAe,GAAA;QACX,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KAC5C;;8GA7BQ,iBAAiB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,iB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AAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAXvB,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,eAAe;QACf,cAAc;QACd,aAAa,CAAA,EAAA,CAAA,CAAA;2FAMN,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAhB5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,eAAe;wBACf,cAAc;wBACd,aAAa;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,iBAAiB;AAClB,qBAAA;iBACF,CAAA;;;ACvBD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -0,0 +1,90 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/forms';
4
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
5
+ import * as i2 from '@angular/material/button';
6
+ import { MatButtonModule } from '@angular/material/button';
7
+ import * as i3 from '@angular/material/form-field';
8
+ import * as i4 from '@angular/material/input';
9
+ import { MatInputModule } from '@angular/material/input';
10
+ import * as i5 from '@angular/material/icon';
11
+ import { MatIconModule } from '@angular/material/icon';
12
+ import { CommonModule } from '@angular/common';
13
+
14
+ class QtyInputComponent {
15
+ constructor(changeDetectorRef) {
16
+ this.changeDetectorRef = changeDetectorRef;
17
+ this.newValueEmitter = new EventEmitter();
18
+ }
19
+ ngOnInit() {
20
+ }
21
+ removeClicked() {
22
+ this.qtyModel -= 1;
23
+ this.newValueEmitter.emit(this.qtyModel);
24
+ this.changeDetectorRef.markForCheck();
25
+ }
26
+ addClicked() {
27
+ this.qtyModel += 1;
28
+ this.newValueEmitter.emit(this.qtyModel);
29
+ this.changeDetectorRef.markForCheck();
30
+ }
31
+ qtyModelChanged() {
32
+ this.newValueEmitter.emit(this.qtyModel);
33
+ }
34
+ }
35
+ QtyInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QtyInputComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
36
+ QtyInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: QtyInputComponent, selector: "ngx-st-qty-input", inputs: { qtyModel: "qtyModel" }, outputs: { newValueEmitter: "newValueEmitter" }, ngImport: i0, template: "<div class=\"row st-qty-input\">\r\n <div class=\"col-auto\">\r\n <button mat-icon-button color=\"warn\" (click)=\"removeClicked()\">\r\n <mat-icon>remove</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"col\">\r\n <mat-form-field>\r\n <input\r\n matInput\r\n type=\"number\"\r\n [(ngModel)]=\"qtyModel\"\r\n (ngModelChange)=\"qtyModelChanged()\"\r\n style=\"text-align: right\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-auto\">\r\n <button mat-icon-button color=\"accent\" (click)=\"addClicked()\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.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: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: QtyInputComponent, decorators: [{
38
+ type: Component,
39
+ args: [{ selector: 'ngx-st-qty-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"row st-qty-input\">\r\n <div class=\"col-auto\">\r\n <button mat-icon-button color=\"warn\" (click)=\"removeClicked()\">\r\n <mat-icon>remove</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"col\">\r\n <mat-form-field>\r\n <input\r\n matInput\r\n type=\"number\"\r\n [(ngModel)]=\"qtyModel\"\r\n (ngModelChange)=\"qtyModelChanged()\"\r\n style=\"text-align: right\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-auto\">\r\n <button mat-icon-button color=\"accent\" (click)=\"addClicked()\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n </div>\r\n</div>\r\n" }]
40
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { qtyModel: [{
41
+ type: Input
42
+ }], newValueEmitter: [{
43
+ type: Output
44
+ }] } });
45
+
46
+ class StQtyInputModule {
47
+ }
48
+ StQtyInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StQtyInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
49
+ StQtyInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: StQtyInputModule, declarations: [QtyInputComponent], imports: [CommonModule,
50
+ FormsModule,
51
+ ReactiveFormsModule,
52
+ MatButtonModule,
53
+ MatInputModule,
54
+ MatIconModule], exports: [QtyInputComponent] });
55
+ StQtyInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StQtyInputModule, imports: [CommonModule,
56
+ FormsModule,
57
+ ReactiveFormsModule,
58
+ MatButtonModule,
59
+ MatInputModule,
60
+ MatIconModule] });
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: StQtyInputModule, decorators: [{
62
+ type: NgModule,
63
+ args: [{
64
+ declarations: [
65
+ QtyInputComponent
66
+ ],
67
+ imports: [
68
+ CommonModule,
69
+ FormsModule,
70
+ ReactiveFormsModule,
71
+ MatButtonModule,
72
+ MatInputModule,
73
+ MatIconModule
74
+ ],
75
+ exports: [
76
+ QtyInputComponent
77
+ ]
78
+ }]
79
+ }] });
80
+
81
+ /*
82
+ * Public API Surface of ngx-st-qty-input
83
+ */
84
+
85
+ /**
86
+ * Generated bundle index. Do not edit.
87
+ */
88
+
89
+ export { QtyInputComponent, StQtyInputModule };
90
+ //# sourceMappingURL=ngx-st-qty-input.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-st-qty-input.mjs","sources":["../../../projects/ngx-st-qty-input/src/lib/components/qty-input.component.ts","../../../projects/ngx-st-qty-input/src/lib/components/qty-input-component.html","../../../projects/ngx-st-qty-input/src/lib/st-qty-input.module.ts","../../../projects/ngx-st-qty-input/src/public-api.ts","../../../projects/ngx-st-qty-input/src/ngx-st-qty-input.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnInit,\n Output\n} from '@angular/core';\n\n@Component({\n selector: 'ngx-st-qty-input',\n templateUrl: './qty-input-component.html',\n styleUrls: ['./qty-input.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class QtyInputComponent implements OnInit {\n\n @Input()\n qtyModel: number;\n\n @Output()\n newValueEmitter = new EventEmitter<number>();\n\n constructor(\n private changeDetectorRef: ChangeDetectorRef\n ) { }\n\n ngOnInit(): void {\n }\n\n removeClicked() {\n this.qtyModel -= 1;\n this.newValueEmitter.emit(this.qtyModel);\n this.changeDetectorRef.markForCheck();\n }\n\n addClicked() {\n this.qtyModel += 1;\n this.newValueEmitter.emit(this.qtyModel);\n this.changeDetectorRef.markForCheck();\n }\n\n qtyModelChanged() {\n this.newValueEmitter.emit(this.qtyModel);\n }\n}\n","<div class=\"row st-qty-input\">\r\n <div class=\"col-auto\">\r\n <button mat-icon-button color=\"warn\" (click)=\"removeClicked()\">\r\n <mat-icon>remove</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"col\">\r\n <mat-form-field>\r\n <input\r\n matInput\r\n type=\"number\"\r\n [(ngModel)]=\"qtyModel\"\r\n (ngModelChange)=\"qtyModelChanged()\"\r\n style=\"text-align: right\"\r\n />\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-auto\">\r\n <button mat-icon-button color=\"accent\" (click)=\"addClicked()\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\nimport { QtyInputComponent } from './components/qty-input.component';\nimport {CommonModule} from \"@angular/common\";\nimport {FormsModule, ReactiveFormsModule} from \"@angular/forms\";\nimport {MatButtonModule} from \"@angular/material/button\";\nimport {MatInputModule} from \"@angular/material/input\";\nimport {MatIconModule} from \"@angular/material/icon\";\n\n@NgModule({\n declarations: [\n QtyInputComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n MatButtonModule,\n MatInputModule,\n MatIconModule\n ],\n exports: [\n QtyInputComponent\n ]\n})\nexport class StQtyInputModule { }\n","/*\n * Public API Surface of ngx-st-qty-input\n */\n\nexport * from './lib/components/qty-input.component';\nexport * from './lib/st-qty-input.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAgBa,iBAAiB,CAAA;AAQ1B,IAAA,WAAA,CACY,iBAAoC,EAAA;QAApC,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAmB;AAHhD,QAAA,IAAA,CAAA,eAAe,GAAG,IAAI,YAAY,EAAU,CAAC;KAIxC;IAEL,QAAQ,GAAA;KACP;IAED,aAAa,GAAA;AACT,QAAA,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;QACnB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACzC,QAAA,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,CAAC;KACzC;IAED,UAAU,GAAA;AACN,QAAA,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;QACnB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACzC,QAAA,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,CAAC;KACzC;IAED,eAAe,GAAA;QACX,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KAC5C;;8GA7BQ,iBAAiB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,2IChB9B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AA;AACR,oBAAA,YAAY,EAAE;wBACZ,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,eAAe;wBACf,cAAc;wBACd,aAAa;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,iBAAiB;AAClB,qBAAA;AACF,iBAAA,CAAA;;;ACvBD;;AAEG;;ACFH;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="ngx-st-qty-input" />
5
+ export * from './public-api';
@@ -0,0 +1,14 @@
1
+ import { ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class QtyInputComponent implements OnInit {
4
+ private changeDetectorRef;
5
+ qtyModel: number;
6
+ newValueEmitter: EventEmitter<number>;
7
+ constructor(changeDetectorRef: ChangeDetectorRef);
8
+ ngOnInit(): void;
9
+ removeClicked(): void;
10
+ addClicked(): void;
11
+ qtyModelChanged(): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<QtyInputComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<QtyInputComponent, "ngx-st-qty-input", never, { "qtyModel": "qtyModel"; }, { "newValueEmitter": "newValueEmitter"; }, never, never, false>;
14
+ }
@@ -0,0 +1,12 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./components/qty-input.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/forms";
5
+ import * as i4 from "@angular/material/button";
6
+ import * as i5 from "@angular/material/input";
7
+ import * as i6 from "@angular/material/icon";
8
+ export declare class StQtyInputModule {
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<StQtyInputModule, never>;
10
+ static ɵmod: i0.ɵɵNgModuleDeclaration<StQtyInputModule, [typeof i1.QtyInputComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.MatButtonModule, typeof i5.MatInputModule, typeof i6.MatIconModule], [typeof i1.QtyInputComponent]>;
11
+ static ɵinj: i0.ɵɵInjectorDeclaration<StQtyInputModule>;
12
+ }
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "ngx-st-qty-input",
3
+ "version": "1.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^14.2.0",
6
+ "@angular/core": "^14.2.0",
7
+ "@angular/material": "^14.2.0"
8
+ },
9
+ "dependencies": {
10
+ "tslib": "^2.3.0"
11
+ },
12
+ "module": "fesm2015/ngx-st-qty-input.mjs",
13
+ "es2020": "fesm2020/ngx-st-qty-input.mjs",
14
+ "esm2020": "esm2020/ngx-st-qty-input.mjs",
15
+ "fesm2020": "fesm2020/ngx-st-qty-input.mjs",
16
+ "fesm2015": "fesm2015/ngx-st-qty-input.mjs",
17
+ "typings": "index.d.ts",
18
+ "exports": {
19
+ "./package.json": {
20
+ "default": "./package.json"
21
+ },
22
+ ".": {
23
+ "types": "./index.d.ts",
24
+ "esm2020": "./esm2020/ngx-st-qty-input.mjs",
25
+ "es2020": "./fesm2020/ngx-st-qty-input.mjs",
26
+ "es2015": "./fesm2015/ngx-st-qty-input.mjs",
27
+ "node": "./fesm2015/ngx-st-qty-input.mjs",
28
+ "default": "./fesm2020/ngx-st-qty-input.mjs"
29
+ }
30
+ },
31
+ "sideEffects": false
32
+ }
@@ -0,0 +1,2 @@
1
+ export * from './lib/components/qty-input.component';
2
+ export * from './lib/st-qty-input.module';