kebs-huge-input-search-d1 0.0.4

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
+ # HugeInputSearchD1
2
+
3
+ This library supports Angular version 14.
4
+
5
+ ## Code scaffolding
6
+
7
+ Run `ng generate component component-name --project huge-input-search-d1` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project huge-input-search-d1`.
8
+ > Note: Don't forget to add `--project huge-input-search-d1` or else it will be added to the default project in your `angular.json` file.
9
+
10
+ ## Build
11
+
12
+ Run `ng build huge-input-search-d1` 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 huge-input-search-d1`, go to the dist folder `cd dist/huge-input-search-d1` and run `npm publish`.
17
+
18
+ ## Running unit tests
19
+
20
+ Run `ng test huge-input-search-d1` 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,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public-api';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia2Vicy1odWdlLWlucHV0LXNlYXJjaC1kMS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2h1Z2UtaW5wdXQtc2VhcmNoLWQxL3NyYy9rZWJzLWh1Z2UtaW5wdXQtc2VhcmNoLWQxLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljLWFwaSc7XG4iXX0=
@@ -0,0 +1,149 @@
1
+ import { Component, Input, forwardRef, EventEmitter, Output, } from "@angular/core";
2
+ import { HttpHeaders } from "@angular/common/http";
3
+ import { Subject } from "rxjs";
4
+ import { FormControl, NG_VALUE_ACCESSOR, } from "@angular/forms";
5
+ import { takeUntil, debounceTime } from "rxjs/operators";
6
+ import * as i0 from "@angular/core";
7
+ import * as i1 from "@angular/common/http";
8
+ import * as i2 from "@angular/common";
9
+ import * as i3 from "@angular/forms";
10
+ import * as i4 from "@angular/material/form-field";
11
+ import * as i5 from "@angular/material/input";
12
+ import * as i6 from "@angular/material/autocomplete";
13
+ import * as i7 from "@angular/material/core";
14
+ import * as i8 from "@angular/material/tooltip";
15
+ //import { LoginService } from 'src/app/services/login/login.service';
16
+ class BaseControlValueAccessor {
17
+ constructor() {
18
+ this.disabled = false;
19
+ }
20
+ onChange(newVal) { }
21
+ onTouched(_) { }
22
+ writeValue(obj) {
23
+ this.value = obj;
24
+ }
25
+ registerOnChange(fn) {
26
+ this.onChange = fn;
27
+ }
28
+ registerOnTouched(fn) {
29
+ this.onTouched = fn;
30
+ }
31
+ setDisabledState(isDisabled) {
32
+ this.disabled = isDisabled;
33
+ }
34
+ }
35
+ export class HugeInputSearchD1Component extends BaseControlValueAccessor {
36
+ constructor(http, renderer) {
37
+ super();
38
+ this.http = http;
39
+ this.renderer = renderer;
40
+ this.isRequired = false;
41
+ this.emitVal = new EventEmitter();
42
+ this.optClicked = false;
43
+ this.searchTextControl = new FormControl();
44
+ this.isLoading = false;
45
+ this._onDestroy = new Subject();
46
+ this.resultClicked = (result, event) => {
47
+ setTimeout(() => {
48
+ this.optClicked = true;
49
+ if (this.outputParam) {
50
+ this.onChange(result[this.outputParam]);
51
+ this.emitVal.emit(result[this.outputParam]);
52
+ }
53
+ else {
54
+ this.onChange(JSON.stringify(result));
55
+ this.emitVal.emit(JSON.stringify(result));
56
+ }
57
+ let txt = result[this.optionLabel[0]] +
58
+ (this.optionLabel.length > 1 ? " " + result[this.optionLabel[1]] : "");
59
+ this.searchTextControl.patchValue(txt);
60
+ }, 100);
61
+ };
62
+ }
63
+ ngOnInit() {
64
+ this.searchTxtControlSubscription = this.searchTextControl.valueChanges
65
+ .pipe(takeUntil(this._onDestroy), debounceTime(700))
66
+ .subscribe((text) => {
67
+ if (text)
68
+ if (text.length > 0) {
69
+ this.isLoading = true;
70
+ this.http
71
+ .post(this.apiUri, {
72
+ searchParameter: text,
73
+ options: this.bodyParams,
74
+ }, { headers: new HttpHeaders({ 'Authorization': 'Bearer ' + this.loginToken }) })
75
+ .pipe(takeUntil(this._onDestroy))
76
+ .subscribe((res) => {
77
+ console.log(res);
78
+ this.isLoading = false;
79
+ this.searchResult = res;
80
+ }, (err) => {
81
+ console.error(err);
82
+ });
83
+ }
84
+ });
85
+ }
86
+ resetSuggestion() {
87
+ this.searchTextControl.patchValue("");
88
+ }
89
+ writeValue(value) {
90
+ if (value) {
91
+ let arr = JSON.parse(value);
92
+ console.log(arr);
93
+ let txt = arr[this.optionLabel[0]] +
94
+ (this.optionLabel.length > 1 ? " " + arr[this.optionLabel[1]] : "");
95
+ this.searchTextControl.patchValue(txt);
96
+ }
97
+ else {
98
+ this.searchTextControl.patchValue('');
99
+ }
100
+ }
101
+ ngOnDestroy() {
102
+ if (this.searchTxtControlSubscription)
103
+ this.searchTxtControlSubscription.unsubscribe();
104
+ }
105
+ checkAndClearInput() {
106
+ if (!this.optClicked) {
107
+ this.searchTextControl.reset();
108
+ this.onChange(null);
109
+ this.emitVal.emit(null);
110
+ }
111
+ }
112
+ }
113
+ HugeInputSearchD1Component.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Component, deps: [{ token: i1.HttpClient }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
114
+ HugeInputSearchD1Component.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: HugeInputSearchD1Component, selector: "kebs-huge-input-search-d1", inputs: { apiUri: "apiUri", bodyParams: "bodyParams", outputParam: "outputParam", optionLabel: "optionLabel", optionValue: "optionValue", label: "label", isRequired: "isRequired", loginToken: "loginToken" }, outputs: { emitVal: "emitVal" }, providers: [
115
+ {
116
+ provide: NG_VALUE_ACCESSOR,
117
+ useExisting: forwardRef(() => HugeInputSearchD1Component),
118
+ multi: true,
119
+ },
120
+ ], usesInheritance: true, ngImport: i0, template: "<mat-form-field appearance='outline'>\r\n <mat-label>{{label}}</mat-label>\r\n <input matInput placeholder=\"Search {{label}}\" aria-label=\"State\" [matAutocomplete]=\"auto\"\r\n [formControl]=\"searchTextControl\" (focusout)='checkAndClearInput()' (keyup)='optClicked = false' autocomplete=\"off\"\r\n [required]=\"isRequired\">\r\n <mat-autocomplete #auto=\"matAutocomplete\" [displayWith]=\"displayFn\">\r\n <mat-option class=\"is-loading\" *ngIf='isLoading'>\r\n <div class=\"lds-facebook\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n </mat-option>\r\n <ng-container *ngIf=\"isLoading == false\">\r\n <mat-option *ngFor=\"let item of searchResult\" (onSelectionChange)=\"resultClicked(item,$event)\">\r\n <span>\r\n <small style=\"padding-left: 12px;\" matTooltip=\"{{item[optionLabel[0]]}} - {{item[optionLabel[1]]?item[optionLabel[1]]:''}}\">{{item[optionLabel[0]] +\" | \" }}\r\n {{item[optionLabel[1]]?item[optionLabel[1]]:''}}</small></span>1\r\n </mat-option>\r\n </ng-container>\r\n </mat-autocomplete>\r\n </mat-form-field>", styles: [".mat-form-field{width:100%}.mat-form-field ::ng-deep .mat-form-field-wrapper{padding-bottom:8px!important}.mat-form-field ::ng-deep .mat-form-field-underline{bottom:0}.mat-form-field ::ng-deep .mat-form-field-infix{padding:.65em 0!important;border-top:.54375em solid transparent!important;font-size:13px}.mat-form-field ::ng-deep .mat-select-arrow{margin:0 4px!important}.lds-facebook{display:inline-block;position:sticky;width:80px;height:24px;margin-left:110px}.lds-facebook div{display:inline-block;position:absolute;left:4px;width:5px;background:#cf0001;animation:lds-facebook 1.2s cubic-bezier(0,.5,.5,1) infinite}.lds-facebook div:nth-child(1){left:8px;animation-delay:-.24s}.lds-facebook div:nth-child(2){left:16px;animation-delay:-.12s}.lds-facebook div:nth-child(3){left:24px;animation-delay:0}@keyframes lds-facebook{0%{top:8px;height:32px}50%,to{top:12px;height:16px}}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.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: i6.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i6.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
121
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Component, decorators: [{
122
+ type: Component,
123
+ args: [{ selector: 'kebs-huge-input-search-d1', providers: [
124
+ {
125
+ provide: NG_VALUE_ACCESSOR,
126
+ useExisting: forwardRef(() => HugeInputSearchD1Component),
127
+ multi: true,
128
+ },
129
+ ], template: "<mat-form-field appearance='outline'>\r\n <mat-label>{{label}}</mat-label>\r\n <input matInput placeholder=\"Search {{label}}\" aria-label=\"State\" [matAutocomplete]=\"auto\"\r\n [formControl]=\"searchTextControl\" (focusout)='checkAndClearInput()' (keyup)='optClicked = false' autocomplete=\"off\"\r\n [required]=\"isRequired\">\r\n <mat-autocomplete #auto=\"matAutocomplete\" [displayWith]=\"displayFn\">\r\n <mat-option class=\"is-loading\" *ngIf='isLoading'>\r\n <div class=\"lds-facebook\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n </mat-option>\r\n <ng-container *ngIf=\"isLoading == false\">\r\n <mat-option *ngFor=\"let item of searchResult\" (onSelectionChange)=\"resultClicked(item,$event)\">\r\n <span>\r\n <small style=\"padding-left: 12px;\" matTooltip=\"{{item[optionLabel[0]]}} - {{item[optionLabel[1]]?item[optionLabel[1]]:''}}\">{{item[optionLabel[0]] +\" | \" }}\r\n {{item[optionLabel[1]]?item[optionLabel[1]]:''}}</small></span>1\r\n </mat-option>\r\n </ng-container>\r\n </mat-autocomplete>\r\n </mat-form-field>", styles: [".mat-form-field{width:100%}.mat-form-field ::ng-deep .mat-form-field-wrapper{padding-bottom:8px!important}.mat-form-field ::ng-deep .mat-form-field-underline{bottom:0}.mat-form-field ::ng-deep .mat-form-field-infix{padding:.65em 0!important;border-top:.54375em solid transparent!important;font-size:13px}.mat-form-field ::ng-deep .mat-select-arrow{margin:0 4px!important}.lds-facebook{display:inline-block;position:sticky;width:80px;height:24px;margin-left:110px}.lds-facebook div{display:inline-block;position:absolute;left:4px;width:5px;background:#cf0001;animation:lds-facebook 1.2s cubic-bezier(0,.5,.5,1) infinite}.lds-facebook div:nth-child(1){left:8px;animation-delay:-.24s}.lds-facebook div:nth-child(2){left:16px;animation-delay:-.12s}.lds-facebook div:nth-child(3){left:24px;animation-delay:0}@keyframes lds-facebook{0%{top:8px;height:32px}50%,to{top:12px;height:16px}}\n"] }]
130
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i0.Renderer2 }]; }, propDecorators: { apiUri: [{
131
+ type: Input
132
+ }], bodyParams: [{
133
+ type: Input
134
+ }], outputParam: [{
135
+ type: Input
136
+ }], optionLabel: [{
137
+ type: Input
138
+ }], optionValue: [{
139
+ type: Input
140
+ }], label: [{
141
+ type: Input
142
+ }], isRequired: [{
143
+ type: Input
144
+ }], loginToken: [{
145
+ type: Input
146
+ }], emitVal: [{
147
+ type: Output
148
+ }] } });
149
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHVnZS1pbnB1dC1zZWFyY2gtZDEuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvaHVnZS1pbnB1dC1zZWFyY2gtZDEvc3JjL2xpYi9odWdlLWlucHV0LXNlYXJjaC1kMS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi9wcm9qZWN0cy9odWdlLWlucHV0LXNlYXJjaC1kMS9zcmMvbGliL2h1Z2UtaW5wdXQtc2VhcmNoLWQxLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdBLE9BQU8sRUFDTCx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lzLnNlYXJjaFR4dENvbnRyb2xTdWJzY3JpcHRpb24gPSB0aGlzLnNlYXJjaFRleHRDb250cm9sLnZhbHVlQ2hhbmdlc1xyXG4gICAgICAucGlwZSh0YWtlVW50aWwodGhpcy5fb25EZXN0cm95KSwgZGVib3VuY2VUaW1lKDcwMCkpXHJcbiAgICAgIC5zdWJzY3JpYmUoKHRleHQ6YW55KSA9PiB7XHJcbiAgICAgICAgaWYgKHRleHQpXHJcbiAgICAgICAgICBpZiAodGV4dC5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgIHRoaXMuaXNMb2FkaW5nID0gdHJ1ZTtcclxuXHJcbiAgICAgICAgICAgIHRoaXMuaHR0cFxyXG4gICAgICAgICAgICAgIC5wb3N0KHRoaXMuYXBpVXJpLCB7XHJcbiAgICAgICAgICAgICAgICBzZWFyY2hQYXJhbWV0ZXI6IHRleHQsXHJcbiAgICAgICAgICAgICAgICBvcHRpb25zOiB0aGlzLmJvZHlQYXJhbXMsXHJcbiAgICAgICAgICAgICAgfSwgeyBoZWFkZXJzOiBuZXcgSHR0cEhlYWRlcnMoeydBdXRob3JpemF0aW9uJzogJ0JlYXJlciAnICsgdGhpcy5sb2dpblRva2VufSl9KVxyXG4gICAgICAgICAgICAgIC5waXBlKHRha2VVbnRpbCh0aGlzLl9vbkRlc3Ryb3kpKVxyXG4gICAgICAgICAgICAgIC5zdWJzY3JpYmUoXHJcbiAgICAgICAgICAgICAgICAocmVzKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKHJlcyk7XHJcbiAgICAgICAgICAgICAgICAgIHRoaXMuaXNMb2FkaW5nID0gZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgIHRoaXMuc2VhcmNoUmVzdWx0ID0gcmVzO1xyXG4gICAgICAgICAgICAgICAgICBcclxuXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICAgICAgKGVycikgPT4ge1xyXG4gICAgICAgICAgICAgICAgIC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57e2l0ZW1bb3B0aW9uTGFiZWxbMF1dICtcIiB8IFwiIH19XHJcbiAgICAgICAgICAgICAge3tpdGVtW29wdGlvbkxhYmVsWzFdXT9pdGVtW29wdGlvbkxhYmVsWzFdXTonJ319PC9zbWFsbD48L3NwYW4+MVxyXG4gICAgICAgIDwvbWF0LW9wdGlvbj5cclxuICAgICAgPC9uZy1jb250YWluZXI+XHJcbiAgICA8L21hdC1hdXRvY29tcGxldGU+XHJcbiAgPC9tYXQtZm9ybS1maWVsZD4iXX0=
@@ -0,0 +1,56 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { HugeInputSearchD1Component } from './huge-input-search-d1.component';
3
+ import { FormsModule, ReactiveFormsModule } from "@angular/forms";
4
+ import { HttpClientModule } from '@angular/common/http';
5
+ import { CommonModule } from '@angular/common';
6
+ import { BrowserModule } from '@angular/platform-browser';
7
+ // material
8
+ import { MatFormFieldModule } from '@angular/material/form-field';
9
+ import { MatInputModule } from '@angular/material/input';
10
+ import { MatAutocompleteModule } from "@angular/material/autocomplete";
11
+ import { MatSelectModule } from '@angular/material/select';
12
+ import { MatTooltipModule } from '@angular/material/tooltip';
13
+ import * as i0 from "@angular/core";
14
+ export class HugeInputSearchD1Module {
15
+ }
16
+ HugeInputSearchD1Module.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
17
+ HugeInputSearchD1Module.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Module, declarations: [HugeInputSearchD1Component], imports: [CommonModule,
18
+ BrowserModule,
19
+ FormsModule,
20
+ MatFormFieldModule,
21
+ MatInputModule,
22
+ MatAutocompleteModule,
23
+ MatSelectModule,
24
+ MatTooltipModule,
25
+ ReactiveFormsModule,
26
+ HttpClientModule], exports: [HugeInputSearchD1Component] });
27
+ HugeInputSearchD1Module.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Module, imports: [CommonModule,
28
+ BrowserModule,
29
+ FormsModule,
30
+ MatFormFieldModule,
31
+ MatInputModule,
32
+ MatAutocompleteModule,
33
+ MatSelectModule,
34
+ MatTooltipModule,
35
+ ReactiveFormsModule,
36
+ HttpClientModule] });
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Module, decorators: [{
38
+ type: NgModule,
39
+ args: [{
40
+ declarations: [HugeInputSearchD1Component],
41
+ imports: [
42
+ CommonModule,
43
+ BrowserModule,
44
+ FormsModule,
45
+ MatFormFieldModule,
46
+ MatInputModule,
47
+ MatAutocompleteModule,
48
+ MatSelectModule,
49
+ MatTooltipModule,
50
+ ReactiveFormsModule,
51
+ HttpClientModule
52
+ ],
53
+ exports: [HugeInputSearchD1Component]
54
+ }]
55
+ }] });
56
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHVnZS1pbnB1dC1zZWFyY2gtZDEubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvaHVnZS1pbnB1dC1zZWFyY2gtZDEvc3JjL2xpYi9odWdlLWlucHV0LXNlYXJjaC1kMS5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsMEJBQTBCLEVBQUUsTUFBTSxrQ0FBa0MsQ0FBQztBQUM5RSxPQUFPLEVBQUUsV0FBVyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDbEUsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDeEQsT0F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xuaW1wb3J0IHsgTWF0VG9vbHRpcE1vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL21hdGVyaWFsL3Rvb2x0aXAnO1xyXG5cclxuXHJcbkBOZ01vZHVsZSh7XHJcbiAgZGVjbGFyYXRpb25zOiBbSHVnZUlucHV0U2VhcmNoRDFDb21wb25lbnRdLFxyXG4gIGltcG9ydHM6IFtcclxuICAgIENvbW1vbk1vZHVsZSxcclxuICAgIEJyb3dzZXJNb2R1bGUsXHJcbiAgICBGb3Jtc01vZHVsZSxcclxuICAgIE1hdEZvcm1GaWVsZE1vZHVsZSxcclxuICAgIE1hdElucHV0TW9kdWxlLFxyXG4gICAgTWF0QXV0b2NvbXBsZXRlTW9kdWxlLFxyXG4gICAgTWF0U2VsZWN0TW9kdWxlLFxyXG4gICAgTWF0VG9vbHRpcE1vZHVsZSxcclxuICAgIFJlYWN0aXZlRm9ybXNNb2R1bGUsXHJcbiAgICBIdHRwQ2xpZW50TW9kdWxlXHJcblxyXG4gIF0sXHJcbiAgZXhwb3J0czogW0h1Z2VJbnB1dFNlYXJjaEQxQ29tcG9uZW50XVxyXG59KVxyXG5leHBvcnQgY2xhc3MgSHVnZUlucHV0U2VhcmNoRDFNb2R1bGUgeyB9XHJcbiJdfQ==
@@ -0,0 +1,14 @@
1
+ import { Injectable } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class HugeInputSearchD1Service {
4
+ constructor() { }
5
+ }
6
+ HugeInputSearchD1Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Service, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7
+ HugeInputSearchD1Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Service, providedIn: 'root' });
8
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Service, decorators: [{
9
+ type: Injectable,
10
+ args: [{
11
+ providedIn: 'root'
12
+ }]
13
+ }], ctorParameters: function () { return []; } });
14
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHVnZS1pbnB1dC1zZWFyY2gtZDEuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2h1Z2UtaW5wdXQtc2VhcmNoLWQxL3NyYy9saWIvaHVnZS1pbnB1dC1zZWFyY2gtZDEuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQUszQyxNQUFNLE9BQU8sd0JBQXdCO0lBRW5DLGdCQUFnQixDQUFDOztxSEFGTix3QkFBd0I7eUhBQXhCLHdCQUF3QixjQUZ2QixNQUFNOzJGQUVQLHdCQUF3QjtrQkFIcEMsVUFBVTttQkFBQztvQkFDVixVQUFVLEVBQUUsTUFBTTtpQkFDbkIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3RhYmxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XHJcblxyXG5ASW5qZWN0YWJsZSh7XHJcbiAgcHJvdmlkZWRJbjogJ3Jvb3QnXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBIdWdlSW5wdXRTZWFyY2hEMVNlcnZpY2Uge1xyXG5cclxuICBjb25zdHJ1Y3RvcigpIHsgfVxyXG59XHJcbiJdfQ==
@@ -0,0 +1,7 @@
1
+ /*
2
+ * Public API Surface of huge-input-search-d1
3
+ */
4
+ export * from './lib/huge-input-search-d1.service';
5
+ export * from './lib/huge-input-search-d1.component';
6
+ export * from './lib/huge-input-search-d1.module';
7
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2h1Z2UtaW5wdXQtc2VhcmNoLWQxL3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxvQ0FBb0MsQ0FBQztBQUNuRCxjQUFjLHNDQUFzQyxDQUFDO0FBQ3JELGNBQWMsbUNBQW1DLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxyXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2YgaHVnZS1pbnB1dC1zZWFyY2gtZDFcclxuICovXHJcblxyXG5leHBvcnQgKiBmcm9tICcuL2xpYi9odWdlLWlucHV0LXNlYXJjaC1kMS5zZXJ2aWNlJztcclxuZXhwb3J0ICogZnJvbSAnLi9saWIvaHVnZS1pbnB1dC1zZWFyY2gtZDEuY29tcG9uZW50JztcclxuZXhwb3J0ICogZnJvbSAnLi9saWIvaHVnZS1pbnB1dC1zZWFyY2gtZDEubW9kdWxlJztcclxuIl19
@@ -0,0 +1,222 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, EventEmitter, forwardRef, Component, Input, Output, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/common/http';
4
+ import { HttpHeaders, HttpClientModule } from '@angular/common/http';
5
+ import { Subject } from 'rxjs';
6
+ import * as i3 from '@angular/forms';
7
+ import { FormControl, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
8
+ import { takeUntil, debounceTime } from 'rxjs/operators';
9
+ import * as i2 from '@angular/common';
10
+ import { CommonModule } from '@angular/common';
11
+ import * as i4 from '@angular/material/form-field';
12
+ import { MatFormFieldModule } from '@angular/material/form-field';
13
+ import * as i5 from '@angular/material/input';
14
+ import { MatInputModule } from '@angular/material/input';
15
+ import * as i6 from '@angular/material/autocomplete';
16
+ import { MatAutocompleteModule } from '@angular/material/autocomplete';
17
+ import * as i7 from '@angular/material/core';
18
+ import * as i8 from '@angular/material/tooltip';
19
+ import { MatTooltipModule } from '@angular/material/tooltip';
20
+ import { BrowserModule } from '@angular/platform-browser';
21
+ import { MatSelectModule } from '@angular/material/select';
22
+
23
+ class HugeInputSearchD1Service {
24
+ constructor() { }
25
+ }
26
+ HugeInputSearchD1Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Service, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
27
+ HugeInputSearchD1Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Service, providedIn: 'root' });
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Service, decorators: [{
29
+ type: Injectable,
30
+ args: [{
31
+ providedIn: 'root'
32
+ }]
33
+ }], ctorParameters: function () { return []; } });
34
+
35
+ //import { LoginService } from 'src/app/services/login/login.service';
36
+ class BaseControlValueAccessor {
37
+ constructor() {
38
+ this.disabled = false;
39
+ }
40
+ onChange(newVal) { }
41
+ onTouched(_) { }
42
+ writeValue(obj) {
43
+ this.value = obj;
44
+ }
45
+ registerOnChange(fn) {
46
+ this.onChange = fn;
47
+ }
48
+ registerOnTouched(fn) {
49
+ this.onTouched = fn;
50
+ }
51
+ setDisabledState(isDisabled) {
52
+ this.disabled = isDisabled;
53
+ }
54
+ }
55
+ class HugeInputSearchD1Component extends BaseControlValueAccessor {
56
+ constructor(http, renderer) {
57
+ super();
58
+ this.http = http;
59
+ this.renderer = renderer;
60
+ this.isRequired = false;
61
+ this.emitVal = new EventEmitter();
62
+ this.optClicked = false;
63
+ this.searchTextControl = new FormControl();
64
+ this.isLoading = false;
65
+ this._onDestroy = new Subject();
66
+ this.resultClicked = (result, event) => {
67
+ setTimeout(() => {
68
+ this.optClicked = true;
69
+ if (this.outputParam) {
70
+ this.onChange(result[this.outputParam]);
71
+ this.emitVal.emit(result[this.outputParam]);
72
+ }
73
+ else {
74
+ this.onChange(JSON.stringify(result));
75
+ this.emitVal.emit(JSON.stringify(result));
76
+ }
77
+ let txt = result[this.optionLabel[0]] +
78
+ (this.optionLabel.length > 1 ? " " + result[this.optionLabel[1]] : "");
79
+ this.searchTextControl.patchValue(txt);
80
+ }, 100);
81
+ };
82
+ }
83
+ ngOnInit() {
84
+ this.searchTxtControlSubscription = this.searchTextControl.valueChanges
85
+ .pipe(takeUntil(this._onDestroy), debounceTime(700))
86
+ .subscribe((text) => {
87
+ if (text)
88
+ if (text.length > 0) {
89
+ this.isLoading = true;
90
+ this.http
91
+ .post(this.apiUri, {
92
+ searchParameter: text,
93
+ options: this.bodyParams,
94
+ }, { headers: new HttpHeaders({ 'Authorization': 'Bearer ' + this.loginToken }) })
95
+ .pipe(takeUntil(this._onDestroy))
96
+ .subscribe((res) => {
97
+ console.log(res);
98
+ this.isLoading = false;
99
+ this.searchResult = res;
100
+ }, (err) => {
101
+ console.error(err);
102
+ });
103
+ }
104
+ });
105
+ }
106
+ resetSuggestion() {
107
+ this.searchTextControl.patchValue("");
108
+ }
109
+ writeValue(value) {
110
+ if (value) {
111
+ let arr = JSON.parse(value);
112
+ console.log(arr);
113
+ let txt = arr[this.optionLabel[0]] +
114
+ (this.optionLabel.length > 1 ? " " + arr[this.optionLabel[1]] : "");
115
+ this.searchTextControl.patchValue(txt);
116
+ }
117
+ else {
118
+ this.searchTextControl.patchValue('');
119
+ }
120
+ }
121
+ ngOnDestroy() {
122
+ if (this.searchTxtControlSubscription)
123
+ this.searchTxtControlSubscription.unsubscribe();
124
+ }
125
+ checkAndClearInput() {
126
+ if (!this.optClicked) {
127
+ this.searchTextControl.reset();
128
+ this.onChange(null);
129
+ this.emitVal.emit(null);
130
+ }
131
+ }
132
+ }
133
+ HugeInputSearchD1Component.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Component, deps: [{ token: i1.HttpClient }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
134
+ HugeInputSearchD1Component.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: HugeInputSearchD1Component, selector: "kebs-huge-input-search-d1", inputs: { apiUri: "apiUri", bodyParams: "bodyParams", outputParam: "outputParam", optionLabel: "optionLabel", optionValue: "optionValue", label: "label", isRequired: "isRequired", loginToken: "loginToken" }, outputs: { emitVal: "emitVal" }, providers: [
135
+ {
136
+ provide: NG_VALUE_ACCESSOR,
137
+ useExisting: forwardRef(() => HugeInputSearchD1Component),
138
+ multi: true,
139
+ },
140
+ ], usesInheritance: true, ngImport: i0, template: "<mat-form-field appearance='outline'>\r\n <mat-label>{{label}}</mat-label>\r\n <input matInput placeholder=\"Search {{label}}\" aria-label=\"State\" [matAutocomplete]=\"auto\"\r\n [formControl]=\"searchTextControl\" (focusout)='checkAndClearInput()' (keyup)='optClicked = false' autocomplete=\"off\"\r\n [required]=\"isRequired\">\r\n <mat-autocomplete #auto=\"matAutocomplete\" [displayWith]=\"displayFn\">\r\n <mat-option class=\"is-loading\" *ngIf='isLoading'>\r\n <div class=\"lds-facebook\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n </mat-option>\r\n <ng-container *ngIf=\"isLoading == false\">\r\n <mat-option *ngFor=\"let item of searchResult\" (onSelectionChange)=\"resultClicked(item,$event)\">\r\n <span>\r\n <small style=\"padding-left: 12px;\" matTooltip=\"{{item[optionLabel[0]]}} - {{item[optionLabel[1]]?item[optionLabel[1]]:''}}\">{{item[optionLabel[0]] +\" | \" }}\r\n {{item[optionLabel[1]]?item[optionLabel[1]]:''}}</small></span>1\r\n </mat-option>\r\n </ng-container>\r\n </mat-autocomplete>\r\n </mat-form-field>", styles: [".mat-form-field{width:100%}.mat-form-field ::ng-deep .mat-form-field-wrapper{padding-bottom:8px!important}.mat-form-field ::ng-deep .mat-form-field-underline{bottom:0}.mat-form-field ::ng-deep .mat-form-field-infix{padding:.65em 0!important;border-top:.54375em solid transparent!important;font-size:13px}.mat-form-field ::ng-deep .mat-select-arrow{margin:0 4px!important}.lds-facebook{display:inline-block;position:sticky;width:80px;height:24px;margin-left:110px}.lds-facebook div{display:inline-block;position:absolute;left:4px;width:5px;background:#cf0001;animation:lds-facebook 1.2s cubic-bezier(0,.5,.5,1) infinite}.lds-facebook div:nth-child(1){left:8px;animation-delay:-.24s}.lds-facebook div:nth-child(2){left:16px;animation-delay:-.12s}.lds-facebook div:nth-child(3){left:24px;animation-delay:0}@keyframes lds-facebook{0%{top:8px;height:32px}50%,to{top:12px;height:16px}}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.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: i6.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i6.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
141
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Component, decorators: [{
142
+ type: Component,
143
+ args: [{ selector: 'kebs-huge-input-search-d1', providers: [
144
+ {
145
+ provide: NG_VALUE_ACCESSOR,
146
+ useExisting: forwardRef(() => HugeInputSearchD1Component),
147
+ multi: true,
148
+ },
149
+ ], template: "<mat-form-field appearance='outline'>\r\n <mat-label>{{label}}</mat-label>\r\n <input matInput placeholder=\"Search {{label}}\" aria-label=\"State\" [matAutocomplete]=\"auto\"\r\n [formControl]=\"searchTextControl\" (focusout)='checkAndClearInput()' (keyup)='optClicked = false' autocomplete=\"off\"\r\n [required]=\"isRequired\">\r\n <mat-autocomplete #auto=\"matAutocomplete\" [displayWith]=\"displayFn\">\r\n <mat-option class=\"is-loading\" *ngIf='isLoading'>\r\n <div class=\"lds-facebook\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n </mat-option>\r\n <ng-container *ngIf=\"isLoading == false\">\r\n <mat-option *ngFor=\"let item of searchResult\" (onSelectionChange)=\"resultClicked(item,$event)\">\r\n <span>\r\n <small style=\"padding-left: 12px;\" matTooltip=\"{{item[optionLabel[0]]}} - {{item[optionLabel[1]]?item[optionLabel[1]]:''}}\">{{item[optionLabel[0]] +\" | \" }}\r\n {{item[optionLabel[1]]?item[optionLabel[1]]:''}}</small></span>1\r\n </mat-option>\r\n </ng-container>\r\n </mat-autocomplete>\r\n </mat-form-field>", styles: [".mat-form-field{width:100%}.mat-form-field ::ng-deep .mat-form-field-wrapper{padding-bottom:8px!important}.mat-form-field ::ng-deep .mat-form-field-underline{bottom:0}.mat-form-field ::ng-deep .mat-form-field-infix{padding:.65em 0!important;border-top:.54375em solid transparent!important;font-size:13px}.mat-form-field ::ng-deep .mat-select-arrow{margin:0 4px!important}.lds-facebook{display:inline-block;position:sticky;width:80px;height:24px;margin-left:110px}.lds-facebook div{display:inline-block;position:absolute;left:4px;width:5px;background:#cf0001;animation:lds-facebook 1.2s cubic-bezier(0,.5,.5,1) infinite}.lds-facebook div:nth-child(1){left:8px;animation-delay:-.24s}.lds-facebook div:nth-child(2){left:16px;animation-delay:-.12s}.lds-facebook div:nth-child(3){left:24px;animation-delay:0}@keyframes lds-facebook{0%{top:8px;height:32px}50%,to{top:12px;height:16px}}\n"] }]
150
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i0.Renderer2 }]; }, propDecorators: { apiUri: [{
151
+ type: Input
152
+ }], bodyParams: [{
153
+ type: Input
154
+ }], outputParam: [{
155
+ type: Input
156
+ }], optionLabel: [{
157
+ type: Input
158
+ }], optionValue: [{
159
+ type: Input
160
+ }], label: [{
161
+ type: Input
162
+ }], isRequired: [{
163
+ type: Input
164
+ }], loginToken: [{
165
+ type: Input
166
+ }], emitVal: [{
167
+ type: Output
168
+ }] } });
169
+
170
+ class HugeInputSearchD1Module {
171
+ }
172
+ HugeInputSearchD1Module.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
173
+ HugeInputSearchD1Module.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Module, declarations: [HugeInputSearchD1Component], imports: [CommonModule,
174
+ BrowserModule,
175
+ FormsModule,
176
+ MatFormFieldModule,
177
+ MatInputModule,
178
+ MatAutocompleteModule,
179
+ MatSelectModule,
180
+ MatTooltipModule,
181
+ ReactiveFormsModule,
182
+ HttpClientModule], exports: [HugeInputSearchD1Component] });
183
+ HugeInputSearchD1Module.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Module, imports: [CommonModule,
184
+ BrowserModule,
185
+ FormsModule,
186
+ MatFormFieldModule,
187
+ MatInputModule,
188
+ MatAutocompleteModule,
189
+ MatSelectModule,
190
+ MatTooltipModule,
191
+ ReactiveFormsModule,
192
+ HttpClientModule] });
193
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Module, decorators: [{
194
+ type: NgModule,
195
+ args: [{
196
+ declarations: [HugeInputSearchD1Component],
197
+ imports: [
198
+ CommonModule,
199
+ BrowserModule,
200
+ FormsModule,
201
+ MatFormFieldModule,
202
+ MatInputModule,
203
+ MatAutocompleteModule,
204
+ MatSelectModule,
205
+ MatTooltipModule,
206
+ ReactiveFormsModule,
207
+ HttpClientModule
208
+ ],
209
+ exports: [HugeInputSearchD1Component]
210
+ }]
211
+ }] });
212
+
213
+ /*
214
+ * Public API Surface of huge-input-search-d1
215
+ */
216
+
217
+ /**
218
+ * Generated bundle index. Do not edit.
219
+ */
220
+
221
+ export { HugeInputSearchD1Component, HugeInputSearchD1Module, HugeInputSearchD1Service };
222
+ //# sourceMappingURL=kebs-huge-input-search-d1.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kebs-huge-input-search-d1.mjs","sources":["../../../projects/huge-input-search-d1/src/lib/huge-input-search-d1.service.ts","../../../projects/huge-input-search-d1/src/lib/huge-input-search-d1.component.ts","../../../projects/huge-input-search-d1/src/lib/huge-input-search-d1.component.html","../../../projects/huge-input-search-d1/src/lib/huge-input-search-d1.module.ts","../../../projects/huge-input-search-d1/src/public-api.ts","../../../projects/huge-input-search-d1/src/kebs-huge-input-search-d1.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class HugeInputSearchD1Service {\r\n\r\n constructor() { }\r\n}\r\n","import { ControlValueAccessor } from \"@angular/forms\";\r\n\r\n\r\nimport {\r\n Component,\r\n OnInit,\r\n Input,\r\n OnDestroy,\r\n forwardRef,\r\n Renderer2,\r\n EventEmitter,\r\n Output,\r\n} from \"@angular/core\";\r\nimport { HttpClient, HttpHeaders } from \"@angular/common/http\";\r\nimport { Subscription, Subject } from \"rxjs\";\r\nimport {\r\n FormControl,\r\n NG_VALUE_ACCESSOR,\r\n} from \"@angular/forms\";\r\nimport { takeUntil, debounceTime } from \"rxjs/operators\";\r\n//import { LoginService } from 'src/app/services/login/login.service';\r\n\r\nclass BaseControlValueAccessor<T> implements ControlValueAccessor {\r\n public disabled = false;\r\n\r\n public onChange(newVal: T) {}\r\n public onTouched(_?: any) {}\r\n public value: T;\r\n\r\n public writeValue(obj: T): void {\r\n this.value = obj;\r\n }\r\n public registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n public registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n public setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n}\r\n\r\n@Component({\r\n selector: 'kebs-huge-input-search-d1',\r\n templateUrl: 'huge-input-search-d1.component.html',\r\n styleUrls: ['huge-input-search-d1.component.scss'],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => HugeInputSearchD1Component),\r\n multi: true,\r\n },\r\n ],\r\n})\r\n\r\n\r\n\r\nexport class HugeInputSearchD1Component\r\n extends BaseControlValueAccessor<any> implements OnInit, OnDestroy {\r\n @Input() apiUri: string;\r\n @Input() bodyParams: string;\r\n @Input() outputParam:string;\r\n @Input() optionLabel: any;\r\n @Input() optionValue: string;\r\n @Input() label: string;\r\n @Input() isRequired: boolean = false;\r\n @Input() loginToken: any;\r\n @Output() emitVal = new EventEmitter<any>()\r\n \r\n optClicked: boolean = false;\r\n\r\n searchTextControl = <any>new FormControl();\r\n searchResult: any;\r\n isLoading = false;\r\n displayFn: any;\r\n\r\n //subscriptons\r\n searchTxtControlSubscription: Subscription\r\n\r\n protected _onDestroy = new Subject<void>();\r\n\r\n constructor(private http: HttpClient, private renderer: Renderer2) {\r\n super();\r\n }\r\n\r\n\r\n\r\n ngOnInit() {\r\n this.searchTxtControlSubscription = this.searchTextControl.valueChanges\r\n .pipe(takeUntil(this._onDestroy), debounceTime(700))\r\n .subscribe((text:any) => {\r\n if (text)\r\n if (text.length > 0) {\r\n this.isLoading = true;\r\n\r\n this.http\r\n .post(this.apiUri, {\r\n searchParameter: text,\r\n options: this.bodyParams,\r\n }, { headers: new HttpHeaders({'Authorization': 'Bearer ' + this.loginToken})})\r\n .pipe(takeUntil(this._onDestroy))\r\n .subscribe(\r\n (res) => {\r\n console.log(res);\r\n this.isLoading = false;\r\n this.searchResult = res;\r\n \r\n\r\n },\r\n (err) => {\r\n console.error(err);\r\n }\r\n );\r\n }\r\n });\r\n }\r\n resetSuggestion() {\r\n this.searchTextControl.patchValue(\"\");\r\n }\r\n\r\n resultClicked = (result, event) => {\r\n setTimeout(() => {\r\n this.optClicked = true;\r\n if(this.outputParam){\r\n this.onChange(result[this.outputParam])\r\n this.emitVal.emit(result[this.outputParam])\r\n }\r\n else\r\n {\r\n this.onChange(JSON.stringify(result));\r\n this.emitVal.emit(JSON.stringify(result))\r\n }\r\n let txt =\r\n result[this.optionLabel[0]] +\r\n (this.optionLabel.length > 1 ? \" \" + result[this.optionLabel[1]] : \"\");\r\n this.searchTextControl.patchValue(txt);\r\n }, 100)\r\n };\r\n\r\n writeValue(value) {\r\n if (value) {\r\n let arr = JSON.parse(value);\r\n console.log(arr);\r\n let txt =\r\n arr[this.optionLabel[0]] +\r\n (this.optionLabel.length > 1 ? \" \" + arr[this.optionLabel[1]] : \"\");\r\n this.searchTextControl.patchValue(txt);\r\n }\r\n else {\r\n this.searchTextControl.patchValue('');\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n if (this.searchTxtControlSubscription)\r\n this.searchTxtControlSubscription.unsubscribe();\r\n }\r\n\r\n\r\n checkAndClearInput() {\r\n if (!this.optClicked) {\r\n this.searchTextControl.reset();\r\n this.onChange(null)\r\n this.emitVal.emit(null)\r\n }\r\n }\r\n}\r\n","<mat-form-field appearance='outline'>\r\n <mat-label>{{label}}</mat-label>\r\n <input matInput placeholder=\"Search {{label}}\" aria-label=\"State\" [matAutocomplete]=\"auto\"\r\n [formControl]=\"searchTextControl\" (focusout)='checkAndClearInput()' (keyup)='optClicked = false' autocomplete=\"off\"\r\n [required]=\"isRequired\">\r\n <mat-autocomplete #auto=\"matAutocomplete\" [displayWith]=\"displayFn\">\r\n <mat-option class=\"is-loading\" *ngIf='isLoading'>\r\n <div class=\"lds-facebook\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n </mat-option>\r\n <ng-container *ngIf=\"isLoading == false\">\r\n <mat-option *ngFor=\"let item of searchResult\" (onSelectionChange)=\"resultClicked(item,$event)\">\r\n <span>\r\n <small style=\"padding-left: 12px;\" matTooltip=\"{{item[optionLabel[0]]}} - {{item[optionLabel[1]]?item[optionLabel[1]]:''}}\">{{item[optionLabel[0]] +\" | \" }}\r\n {{item[optionLabel[1]]?item[optionLabel[1]]:''}}</small></span>1\r\n </mat-option>\r\n </ng-container>\r\n </mat-autocomplete>\r\n </mat-form-field>","import { NgModule } from '@angular/core';\r\nimport { HugeInputSearchD1Component } from './huge-input-search-d1.component';\r\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\r\nimport { HttpClientModule } from '@angular/common/http';\r\nimport { CommonModule } from '@angular/common'; \r\nimport { BrowserModule } from '@angular/platform-browser';\r\n// material\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatAutocompleteModule } from \"@angular/material/autocomplete\";\r\nimport { MatSelectModule } from '@angular/material/select';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\n\r\n@NgModule({\r\n declarations: [HugeInputSearchD1Component],\r\n imports: [\r\n CommonModule,\r\n BrowserModule,\r\n FormsModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatAutocompleteModule,\r\n MatSelectModule,\r\n MatTooltipModule,\r\n ReactiveFormsModule,\r\n HttpClientModule\r\n\r\n ],\r\n exports: [HugeInputSearchD1Component]\r\n})\r\nexport class HugeInputSearchD1Module { }\r\n","/*\r\n * Public API Surface of huge-input-search-d1\r\n */\r\n\r\nexport * from './lib/huge-input-search-d1.service';\r\nexport * from './lib/huge-input-search-d1.component';\r\nexport * from './lib/huge-input-search-d1.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;MAKa,wBAAwB,CAAA;AAEnC,IAAA,WAAA,GAAA,GAAiB;;qHAFN,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAxB,wBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,cAFvB,MAAM,EAAA,CAAA,CAAA;2FAEP,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;iBACnB,CAAA;;;ACgBD;AAEA,MAAM,wBAAwB,CAAA;AAA9B,IAAA,WAAA,GAAA;AACS,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;KAkBzB;IAhBQ,QAAQ,CAAC,MAAS,EAAA,GAAI;IACtB,SAAS,CAAC,CAAO,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,gBAAgB;AAEjB,qBAAA;oBACD,OAAO,EAAE,CAAC,0BAA0B,CAAC;iBACtC,CAAA;;;AC9BD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -0,0 +1,222 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, EventEmitter, forwardRef, Component, Input, Output, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/common/http';
4
+ import { HttpHeaders, HttpClientModule } from '@angular/common/http';
5
+ import { Subject } from 'rxjs';
6
+ import * as i3 from '@angular/forms';
7
+ import { FormControl, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
8
+ import { takeUntil, debounceTime } from 'rxjs/operators';
9
+ import * as i2 from '@angular/common';
10
+ import { CommonModule } from '@angular/common';
11
+ import * as i4 from '@angular/material/form-field';
12
+ import { MatFormFieldModule } from '@angular/material/form-field';
13
+ import * as i5 from '@angular/material/input';
14
+ import { MatInputModule } from '@angular/material/input';
15
+ import * as i6 from '@angular/material/autocomplete';
16
+ import { MatAutocompleteModule } from '@angular/material/autocomplete';
17
+ import * as i7 from '@angular/material/core';
18
+ import * as i8 from '@angular/material/tooltip';
19
+ import { MatTooltipModule } from '@angular/material/tooltip';
20
+ import { BrowserModule } from '@angular/platform-browser';
21
+ import { MatSelectModule } from '@angular/material/select';
22
+
23
+ class HugeInputSearchD1Service {
24
+ constructor() { }
25
+ }
26
+ HugeInputSearchD1Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Service, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
27
+ HugeInputSearchD1Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Service, providedIn: 'root' });
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Service, decorators: [{
29
+ type: Injectable,
30
+ args: [{
31
+ providedIn: 'root'
32
+ }]
33
+ }], ctorParameters: function () { return []; } });
34
+
35
+ //import { LoginService } from 'src/app/services/login/login.service';
36
+ class BaseControlValueAccessor {
37
+ constructor() {
38
+ this.disabled = false;
39
+ }
40
+ onChange(newVal) { }
41
+ onTouched(_) { }
42
+ writeValue(obj) {
43
+ this.value = obj;
44
+ }
45
+ registerOnChange(fn) {
46
+ this.onChange = fn;
47
+ }
48
+ registerOnTouched(fn) {
49
+ this.onTouched = fn;
50
+ }
51
+ setDisabledState(isDisabled) {
52
+ this.disabled = isDisabled;
53
+ }
54
+ }
55
+ class HugeInputSearchD1Component extends BaseControlValueAccessor {
56
+ constructor(http, renderer) {
57
+ super();
58
+ this.http = http;
59
+ this.renderer = renderer;
60
+ this.isRequired = false;
61
+ this.emitVal = new EventEmitter();
62
+ this.optClicked = false;
63
+ this.searchTextControl = new FormControl();
64
+ this.isLoading = false;
65
+ this._onDestroy = new Subject();
66
+ this.resultClicked = (result, event) => {
67
+ setTimeout(() => {
68
+ this.optClicked = true;
69
+ if (this.outputParam) {
70
+ this.onChange(result[this.outputParam]);
71
+ this.emitVal.emit(result[this.outputParam]);
72
+ }
73
+ else {
74
+ this.onChange(JSON.stringify(result));
75
+ this.emitVal.emit(JSON.stringify(result));
76
+ }
77
+ let txt = result[this.optionLabel[0]] +
78
+ (this.optionLabel.length > 1 ? " " + result[this.optionLabel[1]] : "");
79
+ this.searchTextControl.patchValue(txt);
80
+ }, 100);
81
+ };
82
+ }
83
+ ngOnInit() {
84
+ this.searchTxtControlSubscription = this.searchTextControl.valueChanges
85
+ .pipe(takeUntil(this._onDestroy), debounceTime(700))
86
+ .subscribe((text) => {
87
+ if (text)
88
+ if (text.length > 0) {
89
+ this.isLoading = true;
90
+ this.http
91
+ .post(this.apiUri, {
92
+ searchParameter: text,
93
+ options: this.bodyParams,
94
+ }, { headers: new HttpHeaders({ 'Authorization': 'Bearer ' + this.loginToken }) })
95
+ .pipe(takeUntil(this._onDestroy))
96
+ .subscribe((res) => {
97
+ console.log(res);
98
+ this.isLoading = false;
99
+ this.searchResult = res;
100
+ }, (err) => {
101
+ console.error(err);
102
+ });
103
+ }
104
+ });
105
+ }
106
+ resetSuggestion() {
107
+ this.searchTextControl.patchValue("");
108
+ }
109
+ writeValue(value) {
110
+ if (value) {
111
+ let arr = JSON.parse(value);
112
+ console.log(arr);
113
+ let txt = arr[this.optionLabel[0]] +
114
+ (this.optionLabel.length > 1 ? " " + arr[this.optionLabel[1]] : "");
115
+ this.searchTextControl.patchValue(txt);
116
+ }
117
+ else {
118
+ this.searchTextControl.patchValue('');
119
+ }
120
+ }
121
+ ngOnDestroy() {
122
+ if (this.searchTxtControlSubscription)
123
+ this.searchTxtControlSubscription.unsubscribe();
124
+ }
125
+ checkAndClearInput() {
126
+ if (!this.optClicked) {
127
+ this.searchTextControl.reset();
128
+ this.onChange(null);
129
+ this.emitVal.emit(null);
130
+ }
131
+ }
132
+ }
133
+ HugeInputSearchD1Component.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Component, deps: [{ token: i1.HttpClient }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
134
+ HugeInputSearchD1Component.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: HugeInputSearchD1Component, selector: "kebs-huge-input-search-d1", inputs: { apiUri: "apiUri", bodyParams: "bodyParams", outputParam: "outputParam", optionLabel: "optionLabel", optionValue: "optionValue", label: "label", isRequired: "isRequired", loginToken: "loginToken" }, outputs: { emitVal: "emitVal" }, providers: [
135
+ {
136
+ provide: NG_VALUE_ACCESSOR,
137
+ useExisting: forwardRef(() => HugeInputSearchD1Component),
138
+ multi: true,
139
+ },
140
+ ], usesInheritance: true, ngImport: i0, template: "<mat-form-field appearance='outline'>\r\n <mat-label>{{label}}</mat-label>\r\n <input matInput placeholder=\"Search {{label}}\" aria-label=\"State\" [matAutocomplete]=\"auto\"\r\n [formControl]=\"searchTextControl\" (focusout)='checkAndClearInput()' (keyup)='optClicked = false' autocomplete=\"off\"\r\n [required]=\"isRequired\">\r\n <mat-autocomplete #auto=\"matAutocomplete\" [displayWith]=\"displayFn\">\r\n <mat-option class=\"is-loading\" *ngIf='isLoading'>\r\n <div class=\"lds-facebook\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n </mat-option>\r\n <ng-container *ngIf=\"isLoading == false\">\r\n <mat-option *ngFor=\"let item of searchResult\" (onSelectionChange)=\"resultClicked(item,$event)\">\r\n <span>\r\n <small style=\"padding-left: 12px;\" matTooltip=\"{{item[optionLabel[0]]}} - {{item[optionLabel[1]]?item[optionLabel[1]]:''}}\">{{item[optionLabel[0]] +\" | \" }}\r\n {{item[optionLabel[1]]?item[optionLabel[1]]:''}}</small></span>1\r\n </mat-option>\r\n </ng-container>\r\n </mat-autocomplete>\r\n </mat-form-field>", styles: [".mat-form-field{width:100%}.mat-form-field ::ng-deep .mat-form-field-wrapper{padding-bottom:8px!important}.mat-form-field ::ng-deep .mat-form-field-underline{bottom:0}.mat-form-field ::ng-deep .mat-form-field-infix{padding:.65em 0!important;border-top:.54375em solid transparent!important;font-size:13px}.mat-form-field ::ng-deep .mat-select-arrow{margin:0 4px!important}.lds-facebook{display:inline-block;position:sticky;width:80px;height:24px;margin-left:110px}.lds-facebook div{display:inline-block;position:absolute;left:4px;width:5px;background:#cf0001;animation:lds-facebook 1.2s cubic-bezier(0,.5,.5,1) infinite}.lds-facebook div:nth-child(1){left:8px;animation-delay:-.24s}.lds-facebook div:nth-child(2){left:16px;animation-delay:-.12s}.lds-facebook div:nth-child(3){left:24px;animation-delay:0}@keyframes lds-facebook{0%{top:8px;height:32px}50%,to{top:12px;height:16px}}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.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: i6.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i6.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
141
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Component, decorators: [{
142
+ type: Component,
143
+ args: [{ selector: 'kebs-huge-input-search-d1', providers: [
144
+ {
145
+ provide: NG_VALUE_ACCESSOR,
146
+ useExisting: forwardRef(() => HugeInputSearchD1Component),
147
+ multi: true,
148
+ },
149
+ ], template: "<mat-form-field appearance='outline'>\r\n <mat-label>{{label}}</mat-label>\r\n <input matInput placeholder=\"Search {{label}}\" aria-label=\"State\" [matAutocomplete]=\"auto\"\r\n [formControl]=\"searchTextControl\" (focusout)='checkAndClearInput()' (keyup)='optClicked = false' autocomplete=\"off\"\r\n [required]=\"isRequired\">\r\n <mat-autocomplete #auto=\"matAutocomplete\" [displayWith]=\"displayFn\">\r\n <mat-option class=\"is-loading\" *ngIf='isLoading'>\r\n <div class=\"lds-facebook\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n </mat-option>\r\n <ng-container *ngIf=\"isLoading == false\">\r\n <mat-option *ngFor=\"let item of searchResult\" (onSelectionChange)=\"resultClicked(item,$event)\">\r\n <span>\r\n <small style=\"padding-left: 12px;\" matTooltip=\"{{item[optionLabel[0]]}} - {{item[optionLabel[1]]?item[optionLabel[1]]:''}}\">{{item[optionLabel[0]] +\" | \" }}\r\n {{item[optionLabel[1]]?item[optionLabel[1]]:''}}</small></span>1\r\n </mat-option>\r\n </ng-container>\r\n </mat-autocomplete>\r\n </mat-form-field>", styles: [".mat-form-field{width:100%}.mat-form-field ::ng-deep .mat-form-field-wrapper{padding-bottom:8px!important}.mat-form-field ::ng-deep .mat-form-field-underline{bottom:0}.mat-form-field ::ng-deep .mat-form-field-infix{padding:.65em 0!important;border-top:.54375em solid transparent!important;font-size:13px}.mat-form-field ::ng-deep .mat-select-arrow{margin:0 4px!important}.lds-facebook{display:inline-block;position:sticky;width:80px;height:24px;margin-left:110px}.lds-facebook div{display:inline-block;position:absolute;left:4px;width:5px;background:#cf0001;animation:lds-facebook 1.2s cubic-bezier(0,.5,.5,1) infinite}.lds-facebook div:nth-child(1){left:8px;animation-delay:-.24s}.lds-facebook div:nth-child(2){left:16px;animation-delay:-.12s}.lds-facebook div:nth-child(3){left:24px;animation-delay:0}@keyframes lds-facebook{0%{top:8px;height:32px}50%,to{top:12px;height:16px}}\n"] }]
150
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i0.Renderer2 }]; }, propDecorators: { apiUri: [{
151
+ type: Input
152
+ }], bodyParams: [{
153
+ type: Input
154
+ }], outputParam: [{
155
+ type: Input
156
+ }], optionLabel: [{
157
+ type: Input
158
+ }], optionValue: [{
159
+ type: Input
160
+ }], label: [{
161
+ type: Input
162
+ }], isRequired: [{
163
+ type: Input
164
+ }], loginToken: [{
165
+ type: Input
166
+ }], emitVal: [{
167
+ type: Output
168
+ }] } });
169
+
170
+ class HugeInputSearchD1Module {
171
+ }
172
+ HugeInputSearchD1Module.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
173
+ HugeInputSearchD1Module.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Module, declarations: [HugeInputSearchD1Component], imports: [CommonModule,
174
+ BrowserModule,
175
+ FormsModule,
176
+ MatFormFieldModule,
177
+ MatInputModule,
178
+ MatAutocompleteModule,
179
+ MatSelectModule,
180
+ MatTooltipModule,
181
+ ReactiveFormsModule,
182
+ HttpClientModule], exports: [HugeInputSearchD1Component] });
183
+ HugeInputSearchD1Module.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Module, imports: [CommonModule,
184
+ BrowserModule,
185
+ FormsModule,
186
+ MatFormFieldModule,
187
+ MatInputModule,
188
+ MatAutocompleteModule,
189
+ MatSelectModule,
190
+ MatTooltipModule,
191
+ ReactiveFormsModule,
192
+ HttpClientModule] });
193
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: HugeInputSearchD1Module, decorators: [{
194
+ type: NgModule,
195
+ args: [{
196
+ declarations: [HugeInputSearchD1Component],
197
+ imports: [
198
+ CommonModule,
199
+ BrowserModule,
200
+ FormsModule,
201
+ MatFormFieldModule,
202
+ MatInputModule,
203
+ MatAutocompleteModule,
204
+ MatSelectModule,
205
+ MatTooltipModule,
206
+ ReactiveFormsModule,
207
+ HttpClientModule
208
+ ],
209
+ exports: [HugeInputSearchD1Component]
210
+ }]
211
+ }] });
212
+
213
+ /*
214
+ * Public API Surface of huge-input-search-d1
215
+ */
216
+
217
+ /**
218
+ * Generated bundle index. Do not edit.
219
+ */
220
+
221
+ export { HugeInputSearchD1Component, HugeInputSearchD1Module, HugeInputSearchD1Service };
222
+ //# sourceMappingURL=kebs-huge-input-search-d1.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kebs-huge-input-search-d1.mjs","sources":["../../../projects/huge-input-search-d1/src/lib/huge-input-search-d1.service.ts","../../../projects/huge-input-search-d1/src/lib/huge-input-search-d1.component.ts","../../../projects/huge-input-search-d1/src/lib/huge-input-search-d1.component.html","../../../projects/huge-input-search-d1/src/lib/huge-input-search-d1.module.ts","../../../projects/huge-input-search-d1/src/public-api.ts","../../../projects/huge-input-search-d1/src/kebs-huge-input-search-d1.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class HugeInputSearchD1Service {\r\n\r\n constructor() { }\r\n}\r\n","import { ControlValueAccessor } from \"@angular/forms\";\r\n\r\n\r\nimport {\r\n Component,\r\n OnInit,\r\n Input,\r\n OnDestroy,\r\n forwardRef,\r\n Renderer2,\r\n EventEmitter,\r\n Output,\r\n} from \"@angular/core\";\r\nimport { HttpClient, HttpHeaders } from \"@angular/common/http\";\r\nimport { Subscription, Subject } from \"rxjs\";\r\nimport {\r\n FormControl,\r\n NG_VALUE_ACCESSOR,\r\n} from \"@angular/forms\";\r\nimport { takeUntil, debounceTime } from \"rxjs/operators\";\r\n//import { LoginService } from 'src/app/services/login/login.service';\r\n\r\nclass BaseControlValueAccessor<T> implements ControlValueAccessor {\r\n public disabled = false;\r\n\r\n public onChange(newVal: T) {}\r\n public onTouched(_?: any) {}\r\n public value: T;\r\n\r\n public writeValue(obj: T): void {\r\n this.value = obj;\r\n }\r\n public registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n public registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n public setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n}\r\n\r\n@Component({\r\n selector: 'kebs-huge-input-search-d1',\r\n templateUrl: 'huge-input-search-d1.component.html',\r\n styleUrls: ['huge-input-search-d1.component.scss'],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => HugeInputSearchD1Component),\r\n multi: true,\r\n },\r\n ],\r\n})\r\n\r\n\r\n\r\nexport class HugeInputSearchD1Component\r\n extends BaseControlValueAccessor<any> implements OnInit, OnDestroy {\r\n @Input() apiUri: string;\r\n @Input() bodyParams: string;\r\n @Input() outputParam:string;\r\n @Input() optionLabel: any;\r\n @Input() optionValue: string;\r\n @Input() label: string;\r\n @Input() isRequired: boolean = false;\r\n @Input() loginToken: any;\r\n @Output() emitVal = new EventEmitter<any>()\r\n \r\n optClicked: boolean = false;\r\n\r\n searchTextControl = <any>new FormControl();\r\n searchResult: any;\r\n isLoading = false;\r\n displayFn: any;\r\n\r\n //subscriptons\r\n searchTxtControlSubscription: Subscription\r\n\r\n protected _onDestroy = new Subject<void>();\r\n\r\n constructor(private http: HttpClient, private renderer: Renderer2) {\r\n super();\r\n }\r\n\r\n\r\n\r\n ngOnInit() {\r\n this.searchTxtControlSubscription = this.searchTextControl.valueChanges\r\n .pipe(takeUntil(this._onDestroy), debounceTime(700))\r\n .subscribe((text:any) => {\r\n if (text)\r\n if (text.length > 0) {\r\n this.isLoading = true;\r\n\r\n this.http\r\n .post(this.apiUri, {\r\n searchParameter: text,\r\n options: this.bodyParams,\r\n }, { headers: new HttpHeaders({'Authorization': 'Bearer ' + this.loginToken})})\r\n .pipe(takeUntil(this._onDestroy))\r\n .subscribe(\r\n (res) => {\r\n console.log(res);\r\n this.isLoading = false;\r\n this.searchResult = res;\r\n \r\n\r\n },\r\n (err) => {\r\n console.error(err);\r\n }\r\n );\r\n }\r\n });\r\n }\r\n resetSuggestion() {\r\n this.searchTextControl.patchValue(\"\");\r\n }\r\n\r\n resultClicked = (result, event) => {\r\n setTimeout(() => {\r\n this.optClicked = true;\r\n if(this.outputParam){\r\n this.onChange(result[this.outputParam])\r\n this.emitVal.emit(result[this.outputParam])\r\n }\r\n else\r\n {\r\n this.onChange(JSON.stringify(result));\r\n this.emitVal.emit(JSON.stringify(result))\r\n }\r\n let txt =\r\n result[this.optionLabel[0]] +\r\n (this.optionLabel.length > 1 ? \" \" + result[this.optionLabel[1]] : \"\");\r\n this.searchTextControl.patchValue(txt);\r\n }, 100)\r\n };\r\n\r\n writeValue(value) {\r\n if (value) {\r\n let arr = JSON.parse(value);\r\n console.log(arr);\r\n let txt =\r\n arr[this.optionLabel[0]] +\r\n (this.optionLabel.length > 1 ? \" \" + arr[this.optionLabel[1]] : \"\");\r\n this.searchTextControl.patchValue(txt);\r\n }\r\n else {\r\n this.searchTextControl.patchValue('');\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n if (this.searchTxtControlSubscription)\r\n this.searchTxtControlSubscription.unsubscribe();\r\n }\r\n\r\n\r\n checkAndClearInput() {\r\n if (!this.optClicked) {\r\n this.searchTextControl.reset();\r\n this.onChange(null)\r\n this.emitVal.emit(null)\r\n }\r\n }\r\n}\r\n","<mat-form-field appearance='outline'>\r\n <mat-label>{{label}}</mat-label>\r\n <input matInput placeholder=\"Search {{label}}\" aria-label=\"State\" [matAutocomplete]=\"auto\"\r\n [formControl]=\"searchTextControl\" (focusout)='checkAndClearInput()' (keyup)='optClicked = false' autocomplete=\"off\"\r\n [required]=\"isRequired\">\r\n <mat-autocomplete #auto=\"matAutocomplete\" [displayWith]=\"displayFn\">\r\n <mat-option class=\"is-loading\" *ngIf='isLoading'>\r\n <div class=\"lds-facebook\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n </mat-option>\r\n <ng-container *ngIf=\"isLoading == false\">\r\n <mat-option *ngFor=\"let item of searchResult\" (onSelectionChange)=\"resultClicked(item,$event)\">\r\n <span>\r\n <small style=\"padding-left: 12px;\" matTooltip=\"{{item[optionLabel[0]]}} - {{item[optionLabel[1]]?item[optionLabel[1]]:''}}\">{{item[optionLabel[0]] +\" | \" }}\r\n {{item[optionLabel[1]]?item[optionLabel[1]]:''}}</small></span>1\r\n </mat-option>\r\n </ng-container>\r\n </mat-autocomplete>\r\n </mat-form-field>","import { NgModule } from '@angular/core';\r\nimport { HugeInputSearchD1Component } from './huge-input-search-d1.component';\r\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\r\nimport { HttpClientModule } from '@angular/common/http';\r\nimport { CommonModule } from '@angular/common'; \r\nimport { BrowserModule } from '@angular/platform-browser';\r\n// material\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatAutocompleteModule } from \"@angular/material/autocomplete\";\r\nimport { MatSelectModule } from '@angular/material/select';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\n\r\n@NgModule({\r\n declarations: [HugeInputSearchD1Component],\r\n imports: [\r\n CommonModule,\r\n BrowserModule,\r\n FormsModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatAutocompleteModule,\r\n MatSelectModule,\r\n MatTooltipModule,\r\n ReactiveFormsModule,\r\n HttpClientModule\r\n\r\n ],\r\n exports: [HugeInputSearchD1Component]\r\n})\r\nexport class HugeInputSearchD1Module { }\r\n","/*\r\n * Public API Surface of huge-input-search-d1\r\n */\r\n\r\nexport * from './lib/huge-input-search-d1.service';\r\nexport * from './lib/huge-input-search-d1.component';\r\nexport * from './lib/huge-input-search-d1.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;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ChB,mBAAmB;AACnB,QAAA,gBAAgB,aAGR,0BAA0B,CAAA,EAAA,CAAA,CAAA;AAEzB,uBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,YAdhC,YAAY;QACZ,aAAa;QACb,WAAW;QACX,kBAAkB;QAClB,cAAc;QACd,qBAAqB;QACrB,eAAe;QACf,gBAAgB;QAChB,mBAAmB;QACnB,gBAAgB,CAAA,EAAA,CAAA,CAAA;2FAKP,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAjBnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,0BAA0B,CAAC;AAC1C,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,aAAa;wBACb,WAAW;wBACX,kBAAkB;wBAClB,cAAc;wBACd,qBAAqB;wBACrB,eAAe;wBACf,gBAAgB;wBAChB,mBAAmB;wBACnB,gBAAgB;AAEjB,qBAAA;oBACD,OAAO,EAAE,CAAC,0BAA0B,CAAC;AACtC,iBAAA,CAAA;;;AC9BD;;AAEG;;ACFH;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="kebs-huge-input-search-d1" />
5
+ export * from './public-api';
6
+ //# sourceMappingURL=kebs-huge-input-search-d1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kebs-huge-input-search-d1.d.ts","sourceRoot":"","sources":["../../projects/huge-input-search-d1/src/kebs-huge-input-search-d1.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { ControlValueAccessor } from "@angular/forms";
2
+ import { OnInit, OnDestroy, Renderer2, EventEmitter } from "@angular/core";
3
+ import { HttpClient } from "@angular/common/http";
4
+ import { Subscription, Subject } from "rxjs";
5
+ import * as i0 from "@angular/core";
6
+ declare class BaseControlValueAccessor<T> implements ControlValueAccessor {
7
+ disabled: boolean;
8
+ onChange(newVal: T): void;
9
+ onTouched(_?: any): void;
10
+ value: T;
11
+ writeValue(obj: T): void;
12
+ registerOnChange(fn: any): void;
13
+ registerOnTouched(fn: any): void;
14
+ setDisabledState(isDisabled: boolean): void;
15
+ }
16
+ export declare class HugeInputSearchD1Component extends BaseControlValueAccessor<any> implements OnInit, OnDestroy {
17
+ private http;
18
+ private renderer;
19
+ apiUri: string;
20
+ bodyParams: string;
21
+ outputParam: string;
22
+ optionLabel: any;
23
+ optionValue: string;
24
+ label: string;
25
+ isRequired: boolean;
26
+ loginToken: any;
27
+ emitVal: EventEmitter<any>;
28
+ optClicked: boolean;
29
+ searchTextControl: any;
30
+ searchResult: any;
31
+ isLoading: boolean;
32
+ displayFn: any;
33
+ searchTxtControlSubscription: Subscription;
34
+ protected _onDestroy: Subject<void>;
35
+ constructor(http: HttpClient, renderer: Renderer2);
36
+ ngOnInit(): void;
37
+ resetSuggestion(): void;
38
+ resultClicked: (result: any, event: any) => void;
39
+ writeValue(value: any): void;
40
+ ngOnDestroy(): void;
41
+ checkAndClearInput(): void;
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<HugeInputSearchD1Component, never>;
43
+ static ɵcmp: i0.ɵɵComponentDeclaration<HugeInputSearchD1Component, "kebs-huge-input-search-d1", never, { "apiUri": "apiUri"; "bodyParams": "bodyParams"; "outputParam": "outputParam"; "optionLabel": "optionLabel"; "optionValue": "optionValue"; "label": "label"; "isRequired": "isRequired"; "loginToken": "loginToken"; }, { "emitVal": "emitVal"; }, never, never, false>;
44
+ }
45
+ export {};
46
+ //# sourceMappingURL=huge-input-search-d1.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"huge-input-search-d1.component.d.ts","sourceRoot":"","sources":["../../../projects/huge-input-search-d1/src/lib/huge-input-search-d1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CAAC,UAAU,gBAAuB;gBAEvB,IAAI,EAAE,UAAU,EAAU,QAAQ,EAAE,SAAS;IAMjE,QAAQ;IA6BR,eAAe;IAIf,aAAa,oCAiBX;IAEF,UAAU,CAAC,KAAK,KAAA;IAchB,WAAW;IAMX,kBAAkB;yCAtGP,0BAA0B;2CAA1B,0BAA0B;CA6GtC"}
@@ -0,0 +1,17 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./huge-input-search-d1.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/platform-browser";
5
+ import * as i4 from "@angular/forms";
6
+ import * as i5 from "@angular/material/form-field";
7
+ import * as i6 from "@angular/material/input";
8
+ import * as i7 from "@angular/material/autocomplete";
9
+ import * as i8 from "@angular/material/select";
10
+ import * as i9 from "@angular/material/tooltip";
11
+ import * as i10 from "@angular/common/http";
12
+ export declare class HugeInputSearchD1Module {
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<HugeInputSearchD1Module, never>;
14
+ static ɵmod: i0.ɵɵNgModuleDeclaration<HugeInputSearchD1Module, [typeof i1.HugeInputSearchD1Component], [typeof i2.CommonModule, typeof i3.BrowserModule, typeof i4.FormsModule, typeof i5.MatFormFieldModule, typeof i6.MatInputModule, typeof i7.MatAutocompleteModule, typeof i8.MatSelectModule, typeof i9.MatTooltipModule, typeof i4.ReactiveFormsModule, typeof i10.HttpClientModule], [typeof i1.HugeInputSearchD1Component]>;
15
+ static ɵinj: i0.ɵɵInjectorDeclaration<HugeInputSearchD1Module>;
16
+ }
17
+ //# sourceMappingURL=huge-input-search-d1.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"huge-input-search-d1.module.d.ts","sourceRoot":"","sources":["../../../projects/huge-input-search-d1/src/lib/huge-input-search-d1.module.ts"],"names":[],"mappings":";;;;;;;;;;;AAcA,qBAiBa,uBAAuB;yCAAvB,uBAAuB;0CAAvB,uBAAuB;0CAAvB,uBAAuB;CAAI"}
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class HugeInputSearchD1Service {
3
+ constructor();
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<HugeInputSearchD1Service, never>;
5
+ static ɵprov: i0.ɵɵInjectableDeclaration<HugeInputSearchD1Service>;
6
+ }
7
+ //# sourceMappingURL=huge-input-search-d1.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"huge-input-search-d1.service.d.ts","sourceRoot":"","sources":["../../../projects/huge-input-search-d1/src/lib/huge-input-search-d1.service.ts"],"names":[],"mappings":";AAEA,qBAGa,wBAAwB;;yCAAxB,wBAAwB;6CAAxB,wBAAwB;CAGpC"}
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "kebs-huge-input-search-d1",
3
+ "version": "0.0.4",
4
+ "peerDependencies": {
5
+ "@angular/animations": "~15.2.10",
6
+ "@angular/cdk": "~15.2.9",
7
+ "@angular/common": "~15.2.10",
8
+ "@angular/core": "~15.2.10",
9
+ "@angular/forms": "~15.2.10",
10
+ "@angular/material": "~15.2.9"
11
+ },
12
+ "dependencies": {
13
+ "tslib": "^2.0.0"
14
+ },
15
+ "module": "fesm2015/kebs-huge-input-search-d1.mjs",
16
+ "es2020": "fesm2020/kebs-huge-input-search-d1.mjs",
17
+ "esm2020": "esm2020/kebs-huge-input-search-d1.mjs",
18
+ "fesm2020": "fesm2020/kebs-huge-input-search-d1.mjs",
19
+ "fesm2015": "fesm2015/kebs-huge-input-search-d1.mjs",
20
+ "typings": "index.d.ts",
21
+ "exports": {
22
+ "./package.json": {
23
+ "default": "./package.json"
24
+ },
25
+ ".": {
26
+ "types": "./index.d.ts",
27
+ "esm2020": "./esm2020/kebs-huge-input-search-d1.mjs",
28
+ "es2020": "./fesm2020/kebs-huge-input-search-d1.mjs",
29
+ "es2015": "./fesm2015/kebs-huge-input-search-d1.mjs",
30
+ "node": "./fesm2015/kebs-huge-input-search-d1.mjs",
31
+ "default": "./fesm2020/kebs-huge-input-search-d1.mjs"
32
+ }
33
+ },
34
+ "sideEffects": false
35
+ }
@@ -0,0 +1,4 @@
1
+ export * from './lib/huge-input-search-d1.service';
2
+ export * from './lib/huge-input-search-d1.component';
3
+ export * from './lib/huge-input-search-d1.module';
4
+ //# sourceMappingURL=public-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../../projects/huge-input-search-d1/src/public-api.ts"],"names":[],"mappings":"AAIA,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,mCAAmC,CAAC"}