Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

vipera-npm-registry / wa-motif-open-api-kitchensink-module   js

Repository URL to install this package:

Version: 0.0.6 

/ bundles / wa-motif-open-api-kitchensink-module.umd.min.js

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("web-console-core"),require("web-console-ui-kit"),require("rxjs"),require("@progress/kendo-angular-grid"),require("@wa-motif-open-api/platform-service"),require("typescript-string-operations"),require("lodash"),require("@angular/common/http"),require("@angular/common"),require("@angular/forms")):"function"==typeof define&&define.amd?define("wa-motif-open-api-kitchensink-module",["exports","@angular/core","web-console-core","web-console-ui-kit","rxjs","@progress/kendo-angular-grid","@wa-motif-open-api/platform-service","typescript-string-operations","lodash","@angular/common/http","@angular/common","@angular/forms"],t):t(e["wa-motif-open-api-kitchensink-module"]={},e.ng.core,null,null,e.rxjs,null,null,null,null,e.ng.common.http,e.ng.common,e.ng.forms)}(this,function(e,t,i,r,n,o,s,d,a,l,c,u){"use strict";function m(e,t,n,o){var s,i=arguments.length,r=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,n,o);else for(var a=e.length-1;0<=a;a--)(s=e[a])&&(r=(i<3?s(r):3<i?s(t,n,r):s(t,n))||r);return 3<i&&r&&Object.defineProperty(t,n,r),r}function p(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}var g=function(){function e(e){this.toaster=e,this.dateTime=new Date,this.counter=1,this.numOfSessions=4,this.gaugeType="semi",this.gaugeValue=33,this.gaugeLabel="",this.gaugeAppendText="%",this.view=[700,400],this.showXAxis=!0,this.showYAxis=!0,this.gradient=!1,this.showLegend=!0,this.showXAxisLabel=!0,this.xAxisLabel="Country",this.showYAxisLabel=!0,this.yAxisLabel="Population",this.colorScheme={domain:["#5AA454","#A10A28","#C7B42C","#AAAAAA"]},this.autoScale=!0,this.single=[{name:"Germany",value:894e4},{name:"USA",value:5e6},{name:"France",value:72e5}],this.multi=[{name:"Germany",series:[{name:"2010",value:73e5},{name:"2011",value:894e4}]},{name:"USA",series:[{name:"2010",value:787e4},{name:"2011",value:827e4}]},{name:"France",series:[{name:"2010",value:5000002},{name:"2011",value:58e5}]}]}return e.prototype.itemChange=function(e,t){console.info("itemChanged",e,t)},e.prototype.itemResize=function(e,t){console.info("itemResized",e,t)},e.prototype.ngOnInit=function(){var t=this;this.options={itemChangeCallback:this.itemChange,itemResizeCallback:this.itemResize,gridType:r.Gridster.GridType.Fixed,compactType:r.Gridster.CompactType.None,draggable:{enabled:!0},resizable:{enabled:!0},displayGrid:"onDrag&Resize",minCols:3,maxCols:100,minRows:3,maxRows:100,maxItemCols:100,minItemCols:1,maxItemRows:100,minItemRows:1,maxItemArea:2500,minItemArea:1,defaultItemCols:1,defaultItemRows:1,fixedColWidth:70,fixedRowHeight:70},this.operationCountsItem={cols:3,rows:2,y:0,x:0},this.dateTimeItem={cols:5,rows:2,y:0,x:3},this.gaugeItem={cols:3,rows:3,y:0,x:8},n.timer(0,1560).subscribe(function(e){t.counter++}),n.timer(0,1e3).subscribe(function(e){t.dateTime=new Date})},e.prototype.ngOnDestroy=function(){},e.prototype.ngAfterViewInit=function(){},e.prototype.onSelect=function(e){console.log(e)},e.decorators=[{type:t.Component,args:[{selector:"wc-uikit-ks-dashboard-test",template:'<wc-dashboard-header [title]="\'Dashboard\'"></wc-dashboard-header>\n\n  <gridster [options]="options" class="row">\n\n    <ng-template [aclPermission]="[\'test23\']" >\n        <gridster-item [item]="operationCountsItem">\n            <wc-panel [title]="\'Operations Count\'">\n                <wc-data-counter [title]="\'REST Calls\'" [value]="counter"></wc-data-counter>\n            </wc-panel>\n        </gridster-item>\n    </ng-template>\n        \n    \n    <ng-template [aclPermissionOneOf]="[\'test20\', \'test1\']" >\n        <gridster-item [item]="dateTimeItem">\n            <wc-panel [title]="\'Today\'"> \n                <wc-data-counter [title]="dateTime | date " [value]="dateTime | date:\'h:mm.ss a\' "></wc-data-counter>\n            </wc-panel>\n        </gridster-item>\n    </ng-template>\n    \n\n    <gridster-item [item]="gaugeItem">\n            <wc-panel [title]="\'CPU Usage\'">\n                <ngx-gauge [type]="gaugeType" \n                    [value]="gaugeValue" \n                    [label]="gaugeLabel"  \n                    [append]="gaugeAppendText"\n                    [thick]="10"\n                    [foregroundColor]="\'#fc0\'"\n                    [cap]="\'flat\'">\n                </ngx-gauge>\n            </wc-panel>\n    </gridster-item>\n\n    <gridster-item [item]="{cols: 8, rows: 3, y: 2, x: 0}">\n        <wc-panel [title]="\'Chart Demo\'">\n                <ngx-charts-area-chart\n                [view]="view"\n                [scheme]="colorScheme"\n                [results]="multi"\n                [gradient]="gradient"\n                [xAxis]="showXAxis"\n                [yAxis]="showYAxis"\n                [legend]="showLegend"\n                [showXAxisLabel]="showXAxisLabel"\n                [showYAxisLabel]="showYAxisLabel"\n                [xAxisLabel]="xAxisLabel"\n                [yAxisLabel]="yAxisLabel"\n                [autoScale]="autoScale"\n                (select)="onSelect($event)">\n            </ngx-charts-area-chart>\n        </wc-panel>\n    </gridster-item>\n  \n    <gridster-item [item]="{cols: 8, rows: 3, y: 2, x: 8}">\n            <wc-panel [title]="\'Chart Demo\'">\n                    <ngx-charts-heat-map\n                    [view]="view"\n                    [scheme]="colorScheme"\n                    [results]="multi"\n                    [legend]="showLegend"\n                    [gradient]="gradient"\n                    [xAxis]="showXAxis"\n                    [yAxis]="showYAxis"\n                    [showXAxisLabel]="showXAxisLabel"\n                    [showYAxisLabel]="showYAxisLabel"\n                    [xAxisLabel]="xAxisLabel"\n                    [yAxisLabel]="yAxisLabel"\n                    (select)="onSelect($event)">\n                  </ngx-charts-heat-map>\n            </wc-panel>\n        </gridster-item>\n\n\n        <gridster-item [item]="{cols: 8, rows: 3, y: 2, x: 8}">\n                <wc-panel [title]="\'Chart Demo\'">\n            <ngx-charts-gauge\n        [view]="view"\n        [scheme]="colorScheme"\n        [results]="single"\n        [min]="0"\n        [max]="100"\n        [angleSpan]="240"\n        [startAngle]="-120"\n        [units]="\'alerts\'"\n        [bigSegments]="10"\n        [smallSegments]="5"\n        (select)="onSelect($event)">\n      </ngx-charts-gauge>\n    </wc-panel>\n</gridster-item>\n\n\n</gridster>\n\n\n\n',styles:[""]}]}],e.ctorParameters=function(){return[{type:r.WCToasterService}]},e=m([i.PluginView("Dashboard",{iconName:"ico-json"}),p("design:paramtypes",[r.WCToasterService])],e)}(),h=function(){function e(e,t,n,o,s){this.usersService=e,this.domainsService=t,this.motifQueryService=n,this.toaster=o,this.overlayPaneService=s,this.usersList=[],this.domainList=[],this.sort=[],this.groups=[],this.type="numeric",this.pageSize=15,this.skip=0,this.currentPage=1,this.totalPages=0,this.totalRecords=0,this.isFieldSortable=!1,this.newUserId="",this.newUserModel={},console.log("usersService=",e),this.gridConfiguration={columns:[{label:"Domain",name:"domain",sortable:!1},{label:"User ID",name:"userId",sortable:!0},{label:"State",name:"state",sortable:!0},{label:"",name:"",sortable:!0,type:r.WCGridColumnType.Command}]}}return e.prototype.ngOnInit=function(){this.refreshDomainList()},e.prototype.refreshDomainList=function(){var t=this;this.domainsService.getDomains().subscribe(function(e){t.domainList=e},function(e){console.error("Error: ",e)})},e.prototype.pageChange=function(e){var t=e.skip,n=e.take;this.skip=t,this.pageSize=n;var o=this.calculatePageIndex(t,n);this.loadData(this._selectedDomain.name,o,this.pageSize)},e.prototype.loadData=function(e,t,n){var o=this;if(this._selectedDomain){console.log("loadData pageIndex="+t+" pageSize="+n);var s=this.buildQuerySort();this.usersService.getUsersList(e,null,null,null,t,n,s.encode(new l.HttpParams).get("sort"),"response",!1).subscribe(function(e){var t=i.MotifQueryResults.fromHttpResponse(e);o.usersList=a.forEach(t.data,function(e){e.created=new Date(e.created),e.lastLogin=new Date(e.lastLogin)}),o.totalPages=t.totalPages,o.totalRecords=t.totalRecords,o.currentPage=t.pageIndex,o.gridView={data:o.usersList,total:t.totalRecords},o.currentPage=t.pageIndex},function(e){console.log("MotifPagedQueryInterceptor test query error: ",e)})}},e.prototype.getUserListEx=function(o,s,i,r,a){var l=this;return new Promise(function(t,e){var n=d.String.Format("/platform/domains/{0}/users",o);l.motifQueryService.query(n,s,i,r,a).subscribe(function(e){console.log("Get Users List done: ",e),t(e)},e)})},e.prototype.calculatePageIndex=function(e,t){return e/t+1},e.prototype.buildQuerySort=function(){console.log("*****SORT ",this.sort);var e=new i.MotifQuerySort;if(this.sort)for(var t=0;t<this.sort.length;t++){var n=this.sort[t];n.dir&&"asc"===n.dir?e.orderAscendingBy(n.field):n.dir&&"desc"===n.dir&&e.orderDescendingBy(n.field)}return e},e.prototype.refreshData=function(){this.loadData(this._selectedDomain.name,this.currentPage,this.pageSize)},Object.defineProperty(e.prototype,"selectedDomain",{set:function(e){this._selectedDomain=e,this._selectedDomain?this.loadData(this._selectedDomain.name,1,this.pageSize):this.gridView=undefined},enumerable:!0,configurable:!0}),e.prototype.sortChange=function(e){this.sort=e,this.refreshData()},e.prototype.groupChange=function(e){this.groups=e},e.prototype.doSort=function(){},e.prototype.onStatusChangeOKPressed=function(e){this.toaster.info("Not yet implemented","Attention Please",{positionClass:"toast-top-center"})},e.prototype.onStatusChangeCancelPressed=function(e){},e.prototype.onDeleteOKPressed=function(e){this.toaster.info("Not yet implemented","Attention Please",{positionClass:"toast-top-center"})},e.prototype.onDeleteCancelPressed=function(e){},e.prototype.onAddButtonPressed=function(){this._slideDownEditor.open()},e.prototype.onEditorDismissButtonPressed=function(){this.dismissNewUserEditor()},e.prototype.onEditorConfirmButtonPressed=function(){},e.prototype.dismissNewUserEditor=function(){this.newUserModel={},this._slideDownEditor.close()},Object.defineProperty(e.prototype,"statusButtonClass",{get:function(){return"btn status-activated"},enumerable:!0,configurable:!0}),e.prototype.getStatusButtonClass=function(e){return e&&"ACTIVE"===e.toUpperCase()?"btn user-status-active":e&&"PREACTIVE"===e.toUpperCase()?"btn user-status-preactive":""},e.prototype.getStatusButtonQuestion=function(e){return e&&"ACTIVE"===e.toUpperCase()?"Suspend?":e&&"PREACTIVE"===e.toUpperCase()?"Activate?":""},e.decorators=[{type:t.Component,args:[{selector:"wa-users-list",styles:[":host ::ng-deep table .edit>label.btn.user-status-active{background-color:green!important}:host ::ng-deep table .edit>label.btn.user-status-preactive{background-color:#69ca3c!important;color:#000}:host ::ng-deep .grid-btn-editor.wc-table-delete-command{justify-content:center}"],template:'<wc-dashboard-header [title]="\'User Management\'"></wc-dashboard-header>\n\n<div class="row spread">\n    <div>\n        <label>Domain</label>\n        <kendo-combobox [data]="domainList" [allowCustom]="false" [valueField]="\'name\'" [textField]="\'name\'" [(ngModel)]="selectedDomain"></kendo-combobox>\n    </div>\n\n    <div class="flex-cmd">\n        <a data-slidedown="#user-add" class="btn" (click)="onAddButtonPressed()">\n            <svg data-id="add"><use xlink:href="assets/img/icons.svg#ico-add"></use></svg> \n            Add User\n        </a>\n    </div>\n\n</div>\n\n<div class="row">\n    <div>\n        <wc-slide-down-panel>\n                <div id="user-add" class="editor slidedown">\n\t\t\t\t\t\t<input placeholder="UserID" id="new-user-userid" [(ngModel)]="newUserModel.userId">\n\t\t\t\t\t\t<input placeholder="UserIDInt" id="new-user-useridint" [(ngModel)]="newUserModel.userIdInt">\n\t\t\t\t\t\t<input placeholder="msisdn" id="new-user-msisdn" [(ngModel)]="newUserModel.msisdn">\n\t\t\t\t\t\t<input placeholder="serial" id="new-user-serial" [(ngModel)]="newUserModel.serial">\n                        \x3c!--\n\t\t\t\t\t\t<input type="password" placeholder="Password" class="error">\n\t\t\t\t\t\t<input type="password" placeholder="Confirm password" class="error">\n\t\t\t\t\t\t--\x3e\n\t\t\t\t\t\t<div class="cmd">\n\t\t\t\t\t\t\t<a>\n\t\t\t\t\t\t\t\t<svg class="ok" data-id="ok" (click)="onEditorConfirmButtonPressed()"><use xlink:href="assets/img/icons.svg#ico-ok"></use></svg> \n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t<a data-slideup="#user-add" (click)="onEditorDismissButtonPressed()">\n\t\t\t\t\t\t\t\t<svg class="ko" data-id="ko"><use xlink:href="assets/img/icons.svg#ico-ko"></use></svg>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n        </wc-slide-down-panel>\n    </div>\n</div>\n\n<div class="row">\n\n    \x3c!--\n        <div id="user-add" class="editor slidedown AVAST_PAM_signupform">\n                <input placeholder="UserID">\n            \n                <select>\n                    <option>Storeman</option>\n                </select>\n            \n                <input type="password" placeholder="Password" class="error">\n                <input type="password" placeholder="Confirm password" class="error">\n                \n                <div class="cmd">\n                    <a>\n                        <svg class="ok" data-id="ok"><use xlink:href="img/icons.svg#ico-ok"></use></svg> \n                    </a>\n                    <a data-slideup="#user-add">\n                        <svg class="ko" data-id="ko"><use xlink:href="img/icons.svg#ico-ko"></use></svg>\n                    </a>\n                </div>\n            </div>\n        --\x3e\n\n    <div>\n            <kendo-grid [data]="gridView" \n            [columnMenu]="true"\n            [resizable]="true" \n            [reorderable]="true" \n            [groupable]="false" [group]="groups" (groupChange)="groupChange($event)"\n            [sort]="sort" (sortChange)="sortChange($event)" [sortable]="{ allowUnsort: true, mode: \'multiple\' }" \n            style="height: 100%"\n            [pageSize]="pageSize"\n            [skip]="skip"\n            [pageable]="{\n                buttonCount: 5,\n                info: true,\n                type: type,\n                pageSizes: true,\n                previousNext: true\n                }"\n            [scrollable]="\'none\'"\n            (pageChange)="pageChange($event)"\n            >\n                <kendo-grid-column field="created" title="Created" sortable="isFieldSortable" format="{0:dd/MM/yyyy HH:mm:ss}">\n                </kendo-grid-column>\n                <kendo-grid-column field="userId" title="User ID">\n                </kendo-grid-column>\n                <kendo-grid-column field="userIdInt" title="User ID Int.">\n                </kendo-grid-column>\n                <kendo-grid-column field="domain" title="Domain">\n                </kendo-grid-column>\n                <kendo-grid-column field="email" title="Email">\n                </kendo-grid-column>\n                <kendo-grid-column field="lastLogin" title="Last Login" format="{0:dd/MM/yyyy HH:mm:ss}">\n                </kendo-grid-column>\n                <kendo-grid-column field="locale" title="Locale">\n                </kendo-grid-column>\n                <kendo-grid-column field="msisdn" title="MSISDN">\n                </kendo-grid-column>\n                <kendo-grid-column field="prevState" title="Prev. State">\n                </kendo-grid-column>\n                <kendo-grid-column field="serial" title="Serial">\n                </kendo-grid-column>\n                \n                <kendo-grid-column field="state" title="State">\n                    <ng-template kendoGridCellTemplate let-dataItem let-columnIndex="columnIndex" let-rowIndex="rowIndex" let-column="column">\n                        <wc-grid-editor \n                            [question]="getStatusButtonQuestion(dataItem[column.field])" \n                            [rowIndex]="rowIndex" \n                            [columnIndex]="columnIndex" \n                            [column]="column" \n                            [value]="dataItem[column.field]" \n                            [dataItem]="dataItem" \n                            [buttonClass]="getStatusButtonClass(dataItem[column.field])" \n                            (onConfirmation)="onStatusChangeOKPressed(dataItem)"\n                            (onCancel)="onStatusChangeCancelPressed(dataItem)">\n                            {{dataItem[column.field]}}\n                        </wc-grid-editor>\n                    </ng-template>\n                </kendo-grid-column>\n\n                <kendo-grid-column title="" width="150" minResizableWidth="140">\n                        <ng-template kendoGridCellTemplate let-dataItem let-columnIndex="columnIndex" let-rowIndex="rowIndex" let-column="column">\n                                <wc-grid-editor \n                                [question]="\'Delete ?\'" \n                                [rowIndex]="rowIndex" \n                                [columnIndex]="columnIndex" \n                                [column]="column" \n                                [value]="dataItem[column.field]" \n                                [dataItem]="dataItem"\n                                [buttonClass]="\'\'" \n                                [mainClass]="\'wc-table-delete-command\'"\n                                (onConfirmation)="onDeleteOKPressed(dataItem)" (onCancel)="onDeleteCancelPressed(dataItem)">\n                                    <svg data-id="no"><use xlink:href="assets/img/icons.svg#ico-no"></use></svg>\n                                </wc-grid-editor>\n                        </ng-template>\n                </kendo-grid-column>\n            </kendo-grid>\n\n    </div>\n\n</div>\n\n\x3c!--\n    <wc-grid [data]="usersList" [configuration]="gridConfiguration">\n    </wc-grid>\n--\x3e\n\n \n'}]}],e.ctorParameters=function(){return[{type:s.UsersService},{type:s.DomainsService},{type:i.MotifQueryService},{type:r.WCToasterService},{type:r.WCOverlayPaneService}]},e.propDecorators={_grid:[{type:t.ViewChild,args:[o.GridComponent]}],_slideDownEditor:[{type:t.ViewChild,args:[r.WCSlideDownPanelComponent]}],newUserId:[{type:t.Input,args:["newUserId"]}],newUserModel:[{type:t.Input,args:["newUserModel"]}],selectedDomain:[{type:t.Input}]},e=m([i.PluginView("Users List",{iconName:"ico-users"}),p("design:paramtypes",[s.UsersService,s.DomainsService,i.MotifQueryService,r.WCToasterService,r.WCOverlayPaneService])],e)}(),f=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[i.WebConsoleCoreModule,r.WebConsoleUIKitCoreModule,r.WebConsoleUIKitDataModule,r.WebConsoleUIKitGridsterProviderModule,r.WebConsoleUIKitNgxChartsProviderModule,r.WebConsoleUIKitKendoProviderModule,c.CommonModule,u.FormsModule],entryComponents:[g,h],declarations:[g,h],exports:[g,h,u.FormsModule]}]}],e}();e.DashboardTestComponent=g,e.UsersListComponent=h,e.UIKITKitchenSinkModule=f,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=wa-motif-open-api-kitchensink-module.umd.min.js.map