angular-table-searcher
Version:
This is an angular table searcher. it helps to use keys provided to search through a list of objects and if no keys are provided, it searches for the occurrence of the input value. it also makes request to endpoint if url is provided for backend search.
1 lines • 5.33 kB
JSON
{"__symbolic":"module","version":3,"metadata":{"EventsService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"on":[{"__symbolic":"method"}],"broadcast":[{"__symbolic":"method"}]}},"TableSearcherService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient"}]}],"initSearch":[{"__symbolic":"method"}],"startSearching":[{"__symbolic":"method"}],"processObject":[{"__symbolic":"method"}],"processArray":[{"__symbolic":"method"}],"processValidation":[{"__symbolic":"method"}],"searchResource":[{"__symbolic":"method"}]}},"TableSearcherInterface":{"__symbolic":"interface"},"TableSearcherTypesEnum":{"ON_TABLE":0,"ON_BACKEND":1,"EMPTY_TABLE_APPLY_BACKEND":2},"AngularTableSearcherModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClientModule"},{"__symbolic":"reference","module":"@angular/common","name":"CommonModule"}],"declarations":[{"__symbolic":"reference","name":"ɵa"}],"exports":[{"__symbolic":"reference","name":"ɵa"}]}]}],"members":{},"statics":{"forRoot":{"__symbolic":"function","parameters":[],"value":{"ngModule":{"__symbolic":"reference","name":"AngularTableSearcherModule"},"providers":[{"__symbolic":"reference","name":"TableSearcherService"},{"__symbolic":"reference","name":"EventsService"}]}}}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"app-table-searcher","template":"\n <div class=\"table-searcher\" [ngStyle]=\"setBorderColor()\" [class.disabled]=\"searching\">\n <input [disabled]=\"searching\" (keyup.enter)=\"doSearch(searchItem.value)\" #searchItem type=\"text\" placeholder=\"{{allSettings.placeholder}}\">\n <!--<i *ngIf=\"searching\" class=\"fa fa-spin fa-spinner\"></i>-->\n <button [disabled]=\"searching\" type=\"button\" (click)=\"doSearch(searchItem.value)\" class=\"button\" [ngStyle]=\"setButtonColor()\">\n <i *ngIf=\"searching\" class=\"fa fa-spin fa-spinner\"></i> <i class=\"fa fa-search\"></i>\n </button>\n </div>\n <span class=\"clearOut\"></span>\n ","styles":["\n input {\n width: 80% !important;\n border: 0 !important;\n height: 20px !important;\n padding: 5px !important;\n }\n\n input:visited, input:active, input:link, input:after, input:hover, input:focus, button:focus {\n border: 0 !important;\n outline: none;\n }\n\n .table-searcher {\n border-radius: 5px !important;\n -moz-border-radius: 5px !important;\n -webkit-border-radius: 5px !important;\n width: 100% !important;\n color: #000;\n border: 1px solid #ccc;\n border-bottom: 3px solid #eee000;\n padding: 0 !important;\n margin: 0 !important;\n font-size: 11px !important;\n }\n\n .disabled {\n background: rgb(235, 235, 228) !important;\n }\n\n .button {\n background: #83e6bc;\n padding: 9px !important;\n color: #fff !important;\n border: 0 !important;\n cursor: pointer !important;\n font-size: 11px;\n float: right;\n border-radius: 0 5px 5px 0 !important;\n -moz-border-radius: 0 5px 5px 0 !important;\n -webkit-border-radius: 0 5px 5px 0 !important;\n }\n .clearOut {\n clear: both;\n }\n "]}]}],"members":{"allSettings":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"TableSearcherService"},{"__symbolic":"reference","name":"EventsService"}]}],"setBorderColor":[{"__symbolic":"method"}],"setButtonColor":[{"__symbolic":"method"}],"doSearch":[{"__symbolic":"method"}],"processSearching":[{"__symbolic":"method"}],"doSearchBackend":[{"__symbolic":"method"}],"ValidateSettings":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}]},"statics":{"defaultAllSettings":{"path":null,"placeholder":"What are you looking for?","data":[],"searchKeys":[],"from":null,"queryField":"search","borderColor":"#eee000","buttonColor":"#83e6bc","searchType":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"./table-seacher-types.enum","name":"TableSearcherTypesEnum"},"member":"EMPTY_TABLE_APPLY_BACKEND"}}}}},"origins":{"EventsService":"./src/app/table-searcher/event.service","TableSearcherService":"./src/app/table-searcher/table-searcher.service","TableSearcherInterface":"./src/app/table-searcher/table-searcher.interface","TableSearcherTypesEnum":"./src/app/table-searcher/table-seacher-types.enum","AngularTableSearcherModule":"./src/app/table-searcher/angular-table-searcher.module","ɵa":"./src/app/table-searcher/table-searcher.component"},"importAs":"angular-table-searcher"}